@alfadocs/ui-kit 0.37.0 → 0.39.0

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 (263) hide show
  1. package/dist/_chunks/Alfadocs_Logo_Mark-7o3L3WBI.js +56 -0
  2. package/dist/_chunks/{accordion-bSU21uTV.js → accordion-9lJSMMsZ.js} +6 -6
  3. package/dist/_chunks/{agenda-tray-By_asPN9.js → agenda-tray-Dyj9ChHC.js} +22 -21
  4. package/dist/_chunks/{alia-sidebar-BEoMl6UL.js → alia-sidebar-DXsYPinm.js} +2 -2
  5. package/dist/_chunks/{ar-D1RwVZFj.js → ar-Cn_NxqkN.js} +2 -2
  6. package/dist/_chunks/bmi-BxD-tFzU.js +32 -0
  7. package/dist/_chunks/bmi-calculator-DnEr513I.js +213 -0
  8. package/dist/_chunks/{booking-DqXsd1Mv.js → booking-4mCw3Mpl.js} +5 -5
  9. package/dist/_chunks/calculator-dialog-B74fqpFZ.js +40 -0
  10. package/dist/_chunks/{chart-DnHvmiDX.js → chart-Cbt0_sKv.js} +46 -37
  11. package/dist/_chunks/{chat-message-D53_fH2w.js → chat-message-ASgGtj-L.js} +30 -39
  12. package/dist/_chunks/{collapsible-CERONory.js → collapsible-X3oaLPU3.js} +5 -5
  13. package/dist/_chunks/{contact-profile-card-BA6fgS45.js → contact-profile-card-DHyuAPXM.js} +14 -13
  14. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +185 -0
  15. package/dist/_chunks/{date-picker-CXFpu-qY.js → date-picker-CvQfs6Xh.js} +2 -2
  16. package/dist/_chunks/{date-range-picker-I-q5rifj.js → date-range-picker-U9fn1g9d.js} +3 -3
  17. package/dist/_chunks/{date-time-picker-CqpGPlcH.js → date-time-picker-Cva0ZCWw.js} +2 -2
  18. package/dist/_chunks/{de-HTQ4b4-J.js → de-BMM2H7Bs.js} +2 -2
  19. package/dist/_chunks/dependent-selector-CRWgieHm.js +324 -0
  20. package/dist/_chunks/document-scanner-CqS_klIr.js +703 -0
  21. package/dist/_chunks/due-date-calculator-CUspKSTw.js +171 -0
  22. package/dist/_chunks/{editable-currency-cell-renderer-DnjwZNZP.js → editable-currency-cell-renderer-DgkCIIcO.js} +3 -3
  23. package/dist/_chunks/{el-Dr1pjuDq.js → el-BYPonAaK.js} +2 -2
  24. package/dist/_chunks/{es-CvyTjLS0.js → es-CMkVCQ4F.js} +2 -2
  25. package/dist/_chunks/{file-upload-CdozCPct.js → file-upload-BosbPDb1.js} +3 -2
  26. package/dist/_chunks/fiscal-code-input-BZ0FxwUl.js +540 -0
  27. package/dist/_chunks/{fr-CS7aqaFR.js → fr-BcuWxqft.js} +2 -2
  28. package/dist/_chunks/{freemium-paywall-D1N02Oam.js → freemium-paywall-BAk3a6er.js} +7 -7
  29. package/dist/_chunks/gestation-BXEgDGmP.js +50 -0
  30. package/dist/_chunks/gestational-age-calculator-CsQ05qDy.js +165 -0
  31. package/dist/_chunks/header-settings-CBLwUK6t.js +244 -0
  32. package/dist/_chunks/heart-C0faivFf.js +20 -0
  33. package/dist/_chunks/{hi-3uy8KpsH.js → hi-wkq_rQAh.js} +2 -2
  34. package/dist/_chunks/image-C6RM5hfF.js +16 -0
  35. package/dist/_chunks/insert-result-yJ0QavoN.js +133 -0
  36. package/dist/_chunks/{isSameWeek-DRpMibi9.js → isSameWeek-Bim5ftRd.js} +2 -2
  37. package/dist/_chunks/{it-B_RF5VSw.js → it-GiQrQ9p4.js} +3 -3
  38. package/dist/_chunks/{ja-C1mEYy35.js → ja-qfYg3Rua.js} +2 -2
  39. package/dist/_chunks/{logo-_Z-jLq80.js → logo-yituK7sE.js} +42 -91
  40. package/dist/_chunks/{map-view-vD5pvWs9.js → map-view-qJLybrmN.js} +2 -2
  41. package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +296 -0
  42. package/dist/_chunks/{message-card-BbRhZkDI.js → message-card-DSPw5ghw.js} +20 -19
  43. package/dist/_chunks/{message-tray-B762TKuv.js → message-tray-hSQff9u4.js} +3 -3
  44. package/dist/_chunks/{nl-Dl7lO2t3.js → nl-xOogO4sZ.js} +2 -2
  45. package/dist/_chunks/{notification-card-DMdO4g54.js → notification-card-CObnGdJu.js} +22 -21
  46. package/dist/_chunks/{notification-tray-Dl3FTleW.js → notification-tray-BWHDIjgd.js} +2 -2
  47. package/dist/_chunks/{otp-input-CDTWT5EK.js → otp-input-CMphfBxZ.js} +70 -71
  48. package/dist/_chunks/{patient-shell-CDvMw_Nk.js → patient-shell-DF81lALv.js} +37 -36
  49. package/dist/_chunks/{payment-form-D5rgnZu7.js → payment-form-Dy3WIIsC.js} +18 -18
  50. package/dist/_chunks/{pdf-viewer-DvtEHcEP.js → pdf-viewer-Cy6Ul3hZ.js} +2 -2
  51. package/dist/_chunks/{pl-Dgsogljx.js → pl-GnOW6eGK.js} +3 -3
  52. package/dist/_chunks/{practice-results-BFM_lyUs.js → practice-results-C0d4IL5E.js} +4 -3
  53. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +209 -0
  54. package/dist/_chunks/{privacy-lock-DD-wHxBg.js → privacy-lock-BmX_gkvt.js} +2 -2
  55. package/dist/_chunks/{pt-Dm2JF4bc.js → pt-_bV5b5RW.js} +2 -2
  56. package/dist/_chunks/{public-footer.agent-Cjfe5jus.js → public-footer.agent-okt8ZRc5.js} +3 -3
  57. package/dist/_chunks/qr-code-DNXhi6se.js +568 -0
  58. package/dist/_chunks/{react-day-picker-DYDdR8Vv.js → react-day-picker-CdtIiKjx.js} +24 -24
  59. package/dist/_chunks/{reviews-panel-Dow8Dzoa.js → reviews-panel-CPrXu5TX.js} +2 -2
  60. package/dist/_chunks/{rich-text-editor-CHmr9Bz8.js → rich-text-editor-DLbg2852.js} +114 -124
  61. package/dist/_chunks/{ro-BXFZ_xIX.js → ro-BEcyh5Nj.js} +2 -2
  62. package/dist/_chunks/rotate-ccw-BWANpitO.js +15 -0
  63. package/dist/_chunks/{ru-BPQkNRRV.js → ru-Bi86hqMf.js} +3 -3
  64. package/dist/_chunks/session-countdown-LPnhTHjn.js +214 -0
  65. package/dist/_chunks/{shield-check-BhHyReu8.js → shield-check-C73ma9Cs.js} +8 -24
  66. package/dist/_chunks/{sidebar-BbR8f6oe.js → sidebar-_vJXI9rB.js} +2 -2
  67. package/dist/_chunks/sign-document-DId1p-nn.js +315 -0
  68. package/dist/_chunks/{sign-in-with-alfadocs-button-BI0fVonM.js → sign-in-with-alfadocs-button-DeHBFRNS.js} +2 -2
  69. package/dist/_chunks/{signature-capture-C-fF71xI.js → signature-capture-BRzCklg4.js} +27 -24
  70. package/dist/_chunks/social-sign-in-button-X54ySJr1.js +243 -0
  71. package/dist/_chunks/{sparkline-DEROcSl0.js → sparkline-DGhCSw8M.js} +55 -46
  72. package/dist/_chunks/{sq-ChTlGFcJ.js → sq-BujHSAWu.js} +2 -2
  73. package/dist/_chunks/{stepper-accordion-BfS6lUB9.js → stepper-accordion-Dki6r9ZE.js} +2 -2
  74. package/dist/_chunks/subDays-_T9YeKPX.js +8 -0
  75. package/dist/_chunks/{sv-Do_gs6ir.js → sv-C8AeDrTA.js} +2 -2
  76. package/dist/_chunks/{tag-CyoaEmf_.js → tag-CdA0s_VV.js} +16 -16
  77. package/dist/_chunks/{task-card-BUVMh6HN.js → task-card-CPyQ5AXC.js} +6 -5
  78. package/dist/_chunks/{task-tray-DRK0b0Qb.js → task-tray-B8jFv5FV.js} +36 -35
  79. package/dist/_chunks/{tr-da_UnkYH.js → tr-CMSs_Vgf.js} +2 -2
  80. package/dist/_chunks/{transcript-panel-DyhTpAP7.js → transcript-panel-CR7VY1uw.js} +8 -7
  81. package/dist/_chunks/unit-converter-EUwO6QYq.js +168 -0
  82. package/dist/_chunks/wallet-pay-button-DK4ESYge.js +250 -0
  83. package/dist/_chunks/{warning-stack-bDicCvxs.js → warning-stack-DNR3-IbP.js} +17 -16
  84. package/dist/_chunks/{workflow-map-uSiHbOWQ.js → workflow-map-C3gB0FvB.js} +3 -2
  85. package/dist/_chunks/{zh-CN-C9qi5oak.js → zh-CN-eXB-PFu4.js} +3 -3
  86. package/dist/agent-catalog.json +241 -1
  87. package/dist/brand/provider-marks/apple-pay.d.ts +12 -0
  88. package/dist/brand/provider-marks/apple.d.ts +12 -0
  89. package/dist/brand/provider-marks/google-pay.d.ts +12 -0
  90. package/dist/brand/provider-marks/google.d.ts +13 -0
  91. package/dist/components/_shared/insert-result.d.ts +47 -0
  92. package/dist/components/accordion/index.js +1 -1
  93. package/dist/components/agenda-tray/index.js +1 -1
  94. package/dist/components/bmi-calculator/bmi-calculator.d.ts +3 -0
  95. package/dist/components/bmi-calculator/index.js +6 -5
  96. package/dist/components/booking/index.js +1 -1
  97. package/dist/components/calculator-dialog/calculator-dialog.d.ts +26 -0
  98. package/dist/components/calculator-dialog/index.d.ts +3 -0
  99. package/dist/components/calculator-dialog/index.js +5 -0
  100. package/dist/components/chart/chart.d.ts +1 -1
  101. package/dist/components/chart/index.js +1 -1
  102. package/dist/components/chat-message/index.js +1 -1
  103. package/dist/components/collapsible/index.js +1 -1
  104. package/dist/components/contact-profile-card/index.js +1 -1
  105. package/dist/components/cycle-calculator/cycle-calculator.d.ts +21 -0
  106. package/dist/components/cycle-calculator/cycle.d.ts +37 -0
  107. package/dist/components/cycle-calculator/index.d.ts +4 -0
  108. package/dist/components/cycle-calculator/index.js +7 -0
  109. package/dist/components/data-table/index.js +1 -1
  110. package/dist/components/date-picker/index.js +1 -1
  111. package/dist/components/date-range-picker/index.js +1 -1
  112. package/dist/components/date-time-picker/index.js +1 -1
  113. package/dist/components/dependent-selector/dependent-selector.agent.d.ts +4 -0
  114. package/dist/components/dependent-selector/dependent-selector.d.ts +72 -0
  115. package/dist/components/dependent-selector/index.d.ts +4 -0
  116. package/dist/components/dependent-selector/index.js +6 -0
  117. package/dist/components/document-scanner/document-scanner.agent.d.ts +4 -0
  118. package/dist/components/document-scanner/document-scanner.d.ts +93 -0
  119. package/dist/components/document-scanner/index.d.ts +4 -0
  120. package/dist/components/document-scanner/index.js +6 -0
  121. package/dist/components/due-date-calculator/due-date-calculator.d.ts +3 -0
  122. package/dist/components/due-date-calculator/gestation.d.ts +16 -0
  123. package/dist/components/due-date-calculator/index.d.ts +1 -1
  124. package/dist/components/due-date-calculator/index.js +10 -7
  125. package/dist/components/file-upload/index.js +1 -1
  126. package/dist/components/fiscal-code-input/calculate-codice-fiscale.d.ts +24 -0
  127. package/dist/components/fiscal-code-input/fiscal-code-input.agent.d.ts +4 -0
  128. package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +61 -0
  129. package/dist/components/fiscal-code-input/index.d.ts +6 -0
  130. package/dist/components/fiscal-code-input/index.js +11 -0
  131. package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +21 -0
  132. package/dist/components/freemium-paywall/index.js +1 -1
  133. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +27 -0
  134. package/dist/components/gestational-age-calculator/index.d.ts +3 -0
  135. package/dist/components/gestational-age-calculator/index.js +5 -0
  136. package/dist/components/header-settings/header-settings.agent.d.ts +4 -0
  137. package/dist/components/header-settings/header-settings.d.ts +36 -0
  138. package/dist/components/header-settings/index.d.ts +2 -0
  139. package/dist/components/header-settings/index.js +2 -241
  140. package/dist/components/index.d.ts +14 -0
  141. package/dist/components/locale-picker/locale-picker.agent.d.ts +4 -0
  142. package/dist/components/locale-picker/locale-picker.d.ts +80 -0
  143. package/dist/components/logo/index.js +1 -1
  144. package/dist/components/map-view/index.js +1 -1
  145. package/dist/components/message-card/index.js +1 -1
  146. package/dist/components/message-tray/index.js +1 -1
  147. package/dist/components/notification-card/index.js +1 -1
  148. package/dist/components/notification-tray/index.js +1 -1
  149. package/dist/components/otp-input/index.d.ts +1 -1
  150. package/dist/components/otp-input/index.js +1 -1
  151. package/dist/components/otp-input/otp-input.d.ts +1 -1
  152. package/dist/components/payment-form/index.js +1 -1
  153. package/dist/components/pdf-viewer/index.js +1 -1
  154. package/dist/components/practice-results/index.js +1 -1
  155. package/dist/components/pregnancy-weight-gain/index.d.ts +4 -0
  156. package/dist/components/pregnancy-weight-gain/index.js +9 -0
  157. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +19 -0
  158. package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +41 -0
  159. package/dist/components/privacy-lock/index.js +1 -1
  160. package/dist/components/public-footer/index.js +1 -1
  161. package/dist/components/qr-code/index.d.ts +5 -0
  162. package/dist/components/qr-code/index.js +8 -0
  163. package/dist/components/qr-code/qr-code.agent.d.ts +3 -0
  164. package/dist/components/qr-code/qr-code.d.ts +59 -0
  165. package/dist/components/qr-code/qr-encode.d.ts +46 -0
  166. package/dist/components/reviews-panel/index.js +1 -1
  167. package/dist/components/rich-text-editor/index.js +1 -1
  168. package/dist/components/session-countdown/index.d.ts +4 -0
  169. package/dist/components/session-countdown/index.js +6 -0
  170. package/dist/components/session-countdown/session-countdown.agent.d.ts +3 -0
  171. package/dist/components/session-countdown/session-countdown.d.ts +38 -0
  172. package/dist/components/sidebar/index.js +1 -1
  173. package/dist/components/sign-document/index.d.ts +4 -0
  174. package/dist/components/sign-document/index.js +6 -0
  175. package/dist/components/sign-document/sign-document.agent.d.ts +4 -0
  176. package/dist/components/sign-document/sign-document.d.ts +47 -0
  177. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  178. package/dist/components/signature-capture/index.js +1 -1
  179. package/dist/components/social-sign-in-button/index.d.ts +3 -0
  180. package/dist/components/social-sign-in-button/index.js +5 -0
  181. package/dist/components/social-sign-in-button/social-sign-in-button.d.ts +56 -0
  182. package/dist/components/sparkline/index.js +1 -1
  183. package/dist/components/sparkline/sparkline.d.ts +1 -1
  184. package/dist/components/stepper-accordion/index.js +1 -1
  185. package/dist/components/tag/index.js +1 -1
  186. package/dist/components/task-card/index.js +1 -1
  187. package/dist/components/task-tray/index.js +1 -1
  188. package/dist/components/transcript-panel/index.js +1 -1
  189. package/dist/components/unit-converter/index.d.ts +4 -0
  190. package/dist/components/unit-converter/index.js +9 -0
  191. package/dist/components/unit-converter/unit-converter.d.ts +21 -0
  192. package/dist/components/unit-converter/units.d.ts +18 -0
  193. package/dist/components/wallet-pay-button/index.d.ts +3 -0
  194. package/dist/components/wallet-pay-button/index.js +5 -0
  195. package/dist/components/wallet-pay-button/wallet-pay-button.d.ts +63 -0
  196. package/dist/components/warning-stack/index.js +1 -1
  197. package/dist/components/workflow/index.js +1 -1
  198. package/dist/i18n/locale-meta.d.ts +56 -0
  199. package/dist/i18n/locales/ar.d.ts +274 -0
  200. package/dist/i18n/locales/ar.js +271 -0
  201. package/dist/i18n/locales/de.d.ts +274 -0
  202. package/dist/i18n/locales/de.js +271 -0
  203. package/dist/i18n/locales/el.d.ts +274 -0
  204. package/dist/i18n/locales/el.js +271 -0
  205. package/dist/i18n/locales/en.d.ts +274 -0
  206. package/dist/i18n/locales/en.js +274 -0
  207. package/dist/i18n/locales/es.d.ts +274 -0
  208. package/dist/i18n/locales/es.js +271 -0
  209. package/dist/i18n/locales/fr.d.ts +274 -0
  210. package/dist/i18n/locales/fr.js +271 -0
  211. package/dist/i18n/locales/hi.d.ts +274 -0
  212. package/dist/i18n/locales/hi.js +271 -0
  213. package/dist/i18n/locales/it.d.ts +274 -0
  214. package/dist/i18n/locales/it.js +271 -0
  215. package/dist/i18n/locales/ja.d.ts +274 -0
  216. package/dist/i18n/locales/ja.js +267 -0
  217. package/dist/i18n/locales/nl.d.ts +274 -0
  218. package/dist/i18n/locales/nl.js +271 -0
  219. package/dist/i18n/locales/pl.d.ts +274 -0
  220. package/dist/i18n/locales/pl.js +271 -0
  221. package/dist/i18n/locales/pt.d.ts +274 -0
  222. package/dist/i18n/locales/pt.js +274 -0
  223. package/dist/i18n/locales/ro.d.ts +274 -0
  224. package/dist/i18n/locales/ro.js +271 -0
  225. package/dist/i18n/locales/ru.d.ts +274 -0
  226. package/dist/i18n/locales/ru.js +271 -0
  227. package/dist/i18n/locales/sq.d.ts +274 -0
  228. package/dist/i18n/locales/sq.js +271 -0
  229. package/dist/i18n/locales/sv.d.ts +274 -0
  230. package/dist/i18n/locales/sv.js +271 -0
  231. package/dist/i18n/locales/tr.d.ts +274 -0
  232. package/dist/i18n/locales/tr.js +271 -0
  233. package/dist/i18n/locales/zh.d.ts +274 -0
  234. package/dist/i18n/locales/zh.js +267 -0
  235. package/dist/index.js +590 -535
  236. package/dist/locales/ar.json +274 -0
  237. package/dist/locales/de.json +274 -0
  238. package/dist/locales/el.json +274 -0
  239. package/dist/locales/en.json +274 -0
  240. package/dist/locales/es.json +274 -0
  241. package/dist/locales/fr.json +274 -0
  242. package/dist/locales/hi.json +274 -0
  243. package/dist/locales/it.json +274 -0
  244. package/dist/locales/ja.json +274 -0
  245. package/dist/locales/nl.json +274 -0
  246. package/dist/locales/pl.json +274 -0
  247. package/dist/locales/pt.json +274 -0
  248. package/dist/locales/ro.json +274 -0
  249. package/dist/locales/ru.json +274 -0
  250. package/dist/locales/sq.json +274 -0
  251. package/dist/locales/sv.json +274 -0
  252. package/dist/locales/tr.json +274 -0
  253. package/dist/locales/zh.json +274 -0
  254. package/dist/patterns/alia-assistant/index.js +1 -1
  255. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  256. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +12 -8
  257. package/dist/patterns/patient-shell/index.js +1 -1
  258. package/dist/tokens.css +1 -1
  259. package/package.json +53 -1
  260. package/dist/_chunks/bmi-calculator-DQD5_nE-.js +0 -214
  261. package/dist/_chunks/due-date-calculator-kf9U_g7O.js +0 -173
  262. package/dist/_chunks/marketplace-app-shell-DXHxy9dj.js +0 -295
  263. package/dist/_chunks/subDays-D-WYRpdW.js +0 -8
@@ -0,0 +1,540 @@
1
+ import { jsxs as N, jsx as l, Fragment as Ze } from "react/jsx-runtime";
2
+ import { forwardRef as Xe, useContext as je, useState as oe, useRef as P, useId as Ke, useEffect as Oe, useMemo as H, useCallback as ae } from "react";
3
+ import { c as ue } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as Ge } from "react-i18next";
5
+ import { u as We, F as Ye } from "./form-field-context-B3APVHKx.js";
6
+ import { I as ie, c as qe, a as L, b as Z } from "./input-surface-xyERuLU_.js";
7
+ import { c as Je } from "./compose-refs-C0k0tdqF.js";
8
+ import { u as Qe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
9
+ import { I as et } from "./icon-button-CKEOrN37.js";
10
+ import { u as tt } from "./registry-nPAVE19X.js";
11
+ import { c as st } from "./createLucideIcon-CrFbzy84.js";
12
+ import { C as ce } from "./circle-alert-ChA9opNA.js";
13
+ import { C as le } from "./circle-check-9AeSgJD_.js";
14
+ /**
15
+ * @license lucide-react v1.8.0 - ISC
16
+ *
17
+ * This source code is licensed under the ISC license.
18
+ * See the LICENSE file in the root directory of this source tree.
19
+ */
20
+ const nt = [
21
+ ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", key: "1nb95v" }],
22
+ ["line", { x1: "8", x2: "16", y1: "6", y2: "6", key: "x4nwl0" }],
23
+ ["line", { x1: "16", x2: "16", y1: "14", y2: "18", key: "wjye3r" }],
24
+ ["path", { d: "M16 10h.01", key: "1m94wz" }],
25
+ ["path", { d: "M12 10h.01", key: "1nrarc" }],
26
+ ["path", { d: "M8 10h.01", key: "19clt8" }],
27
+ ["path", { d: "M12 14h.01", key: "1etili" }],
28
+ ["path", { d: "M8 14h.01", key: "6423bh" }],
29
+ ["path", { d: "M12 18h.01", key: "mhygvu" }],
30
+ ["path", { d: "M8 18h.01", key: "lrp35t" }]
31
+ ], rt = st("calculator", nt), ot = {
32
+ id: "fiscal-code-input",
33
+ capabilities: ["edit_inline"],
34
+ state: {
35
+ value: {
36
+ type: "string",
37
+ descriptionKey: "ui.agent.fiscalCodeInput.state.value",
38
+ description: "Current codice fiscale, normalised (uppercased, 0–16 [A-Z0-9] characters).",
39
+ read: (e) => e.getValue()
40
+ },
41
+ isValid: {
42
+ type: "boolean",
43
+ descriptionKey: "ui.agent.fiscalCodeInput.state.isValid",
44
+ description: "Whether the value is 16 structurally-sound characters with a matching control character.",
45
+ read: (e) => e.isValid()
46
+ }
47
+ },
48
+ actions: {
49
+ set_value: {
50
+ safety: "write",
51
+ argsType: "{ value: string }",
52
+ descriptionKey: "ui.agent.fiscalCodeInput.actions.setValue",
53
+ description: "Replace the codice fiscale. The value is uppercased and stripped to [A-Z0-9], capped at 16 characters.",
54
+ invoke: (e, t) => {
55
+ e.setValue(t.value);
56
+ }
57
+ },
58
+ clear: {
59
+ safety: "destructive",
60
+ descriptionKey: "ui.agent.fiscalCodeInput.actions.clear",
61
+ description: "Empty the input. Loses any typed value.",
62
+ invoke: (e) => {
63
+ e.clear();
64
+ }
65
+ },
66
+ focus: {
67
+ safety: "read",
68
+ descriptionKey: "ui.agent.fiscalCodeInput.actions.focus",
69
+ description: "Move keyboard focus to the codice fiscale input.",
70
+ invoke: (e) => {
71
+ e.focus();
72
+ }
73
+ }
74
+ },
75
+ domHooks: {
76
+ root: {
77
+ attr: "data-component",
78
+ value: "fiscal-code-input",
79
+ description: "Marks the FiscalCodeInput wrapper."
80
+ },
81
+ instanceId: {
82
+ attr: "data-component-id",
83
+ sourceProp: "id",
84
+ description: "Sourced from the id prop."
85
+ }
86
+ }
87
+ }, at = /* @__PURE__ */ new Set([0, 1, 2, 3, 4, 5, 8, 11]), it = /* @__PURE__ */ new Set([6, 7, 9, 10, 12, 13, 14]), ct = Object.freeze({
88
+ 0: 1,
89
+ 1: 0,
90
+ 2: 5,
91
+ 3: 7,
92
+ 4: 9,
93
+ 5: 13,
94
+ 6: 15,
95
+ 7: 17,
96
+ 8: 19,
97
+ 9: 21,
98
+ A: 1,
99
+ B: 0,
100
+ C: 5,
101
+ D: 7,
102
+ E: 9,
103
+ F: 13,
104
+ G: 15,
105
+ H: 17,
106
+ I: 19,
107
+ J: 21,
108
+ K: 2,
109
+ L: 4,
110
+ M: 18,
111
+ N: 20,
112
+ O: 11,
113
+ P: 3,
114
+ Q: 6,
115
+ R: 8,
116
+ S: 12,
117
+ T: 14,
118
+ U: 16,
119
+ V: 10,
120
+ W: 22,
121
+ X: 25,
122
+ Y: 24,
123
+ Z: 23
124
+ }), lt = Object.freeze({
125
+ 0: 0,
126
+ 1: 1,
127
+ 2: 2,
128
+ 3: 3,
129
+ 4: 4,
130
+ 5: 5,
131
+ 6: 6,
132
+ 7: 7,
133
+ 8: 8,
134
+ 9: 9,
135
+ A: 0,
136
+ B: 1,
137
+ C: 2,
138
+ D: 3,
139
+ E: 4,
140
+ F: 5,
141
+ G: 6,
142
+ H: 7,
143
+ I: 8,
144
+ J: 9,
145
+ K: 10,
146
+ L: 11,
147
+ M: 12,
148
+ N: 13,
149
+ O: 14,
150
+ P: 15,
151
+ Q: 16,
152
+ R: 17,
153
+ S: 18,
154
+ T: 19,
155
+ U: 20,
156
+ V: 21,
157
+ W: 22,
158
+ X: 23,
159
+ Y: 24,
160
+ Z: 25
161
+ }), dt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
162
+ function ut(e) {
163
+ if (!/^[A-Z0-9]{15}[A-Z]$/.test(e)) return !1;
164
+ for (let t = 0; t < 15; t += 1) {
165
+ const n = e[t], r = n >= "0" && n <= "9";
166
+ if (at.has(t) && r || it.has(t) && !r) return !1;
167
+ }
168
+ return !0;
169
+ }
170
+ function fe(e) {
171
+ let t = 0;
172
+ for (let n = 0; n < 15; n += 1) {
173
+ const r = e[n];
174
+ t += n % 2 === 0 ? ct[r] : lt[r];
175
+ }
176
+ return dt[t % 26];
177
+ }
178
+ function w(e) {
179
+ if (e.length === 0) return "empty";
180
+ if (e.length < 16) return "incomplete";
181
+ const t = e.slice(0, 16);
182
+ return ut(t) ? fe(t.slice(0, 15)) !== t[15] ? "badChecksum" : "valid" : "badFormat";
183
+ }
184
+ function Ut(e) {
185
+ return w(e) === "valid";
186
+ }
187
+ const pe = /* @__PURE__ */ new Set(["A", "E", "I", "O", "U"]), ft = [
188
+ "A",
189
+ "B",
190
+ "C",
191
+ "D",
192
+ "E",
193
+ "H",
194
+ "L",
195
+ "M",
196
+ "P",
197
+ "R",
198
+ "S",
199
+ "T"
200
+ ];
201
+ function me(e) {
202
+ return e.normalize("NFD").replace(/[̀-ͯ]/g, "").toUpperCase().replace(/[^A-Z]/g, "");
203
+ }
204
+ function he(e) {
205
+ return [...e].filter((t) => !pe.has(t)).join("");
206
+ }
207
+ function ge(e) {
208
+ return [...e].filter((t) => pe.has(t)).join("");
209
+ }
210
+ function pt(e) {
211
+ const t = me(e);
212
+ return (he(t) + ge(t) + "XXX").slice(0, 3);
213
+ }
214
+ function mt(e) {
215
+ const t = me(e), n = he(t);
216
+ return n.length >= 4 ? n[0] + n[2] + n[3] : (n + ge(t) + "XXX").slice(0, 3);
217
+ }
218
+ function ht(e) {
219
+ const t = e instanceof Date ? e : new Date(e);
220
+ if (Number.isNaN(t.getTime()))
221
+ throw new Error(`calculateCodiceFiscale: invalid birthDate "${e}"`);
222
+ return t;
223
+ }
224
+ function de(e) {
225
+ return String(e).padStart(2, "0");
226
+ }
227
+ function gt(e, t) {
228
+ const n = ht(e), r = de(n.getUTCFullYear() % 100), i = ft[n.getUTCMonth()], g = n.getUTCDate() + (t === "F" ? 40 : 0);
229
+ return r + i + de(g);
230
+ }
231
+ function Ct(e) {
232
+ const { surname: t, name: n, birthDate: r, sex: i, belfioreCode: g } = e, m = g.trim().toUpperCase();
233
+ if (!/^[A-Z][0-9]{3}$/.test(m))
234
+ throw new Error(
235
+ `calculateCodiceFiscale: belfioreCode must be a letter + 3 digits (e.g. "H501"), got "${g}"`
236
+ );
237
+ const S = pt(t) + mt(n) + gt(r, i) + m;
238
+ return S + fe(S);
239
+ }
240
+ const k = 16, vt = ue(
241
+ ["ds:relative ds:flex ds:items-center ds:w-full", qe].join(
242
+ " "
243
+ ),
244
+ {
245
+ variants: {
246
+ size: {
247
+ sm: L.sm,
248
+ md: L.md,
249
+ lg: L.lg
250
+ },
251
+ tone: {
252
+ default: ie.default,
253
+ error: `${ie.error} ds:focus-within:outline-destructive`
254
+ }
255
+ },
256
+ defaultVariants: { size: "md", tone: "default" }
257
+ }
258
+ ), bt = ue(
259
+ [
260
+ // dir="ltr" + tabular-nums keep the alphanumeric code rendering
261
+ // left-to-right and evenly spaced even under an RTL/CJK surrounding
262
+ // UI — this is a value-RENDERING concern (the code is never mirrored),
263
+ // not a layout-direction violation, so logical-prop rules don't apply
264
+ // to the code glyphs themselves.
265
+ "ds:w-full ds:min-w-0 ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground",
266
+ "ds:border-0 ds:outline-none ds:tabular-nums ds:uppercase ds:tracking-wide",
267
+ "ds:disabled:cursor-not-allowed",
268
+ "ds:read-only:cursor-default"
269
+ ].join(" "),
270
+ {
271
+ variants: {
272
+ size: {
273
+ sm: `ds:pe-3 ${Z.sm}`,
274
+ md: `ds:pe-3 ${Z.md}`,
275
+ lg: `ds:pe-4 ${Z.lg}`
276
+ },
277
+ // When the calculate affordance is shown, the input text starts after
278
+ // the inline-start icon button (mirrors `hasEnd`'s pe-10 reservation).
279
+ hasStart: {
280
+ true: "ds:ps-10",
281
+ false: ""
282
+ },
283
+ hasEnd: {
284
+ true: "ds:pe-10",
285
+ false: ""
286
+ }
287
+ },
288
+ compoundVariants: [
289
+ { size: "sm", hasStart: !1, class: "ds:ps-3" },
290
+ { size: "md", hasStart: !1, class: "ds:ps-3" },
291
+ { size: "lg", hasStart: !1, class: "ds:ps-4" }
292
+ ],
293
+ defaultVariants: { size: "md", hasStart: !1, hasEnd: !1 }
294
+ }
295
+ ), yt = "ds:absolute ds:inset-y-0 ds:end-0 ds:pe-3 ds:flex ds:items-center ds:pointer-events-none ds:[&_svg]:size-4", Et = "ds:absolute ds:inset-y-0 ds:start-0 ds:ps-1 ds:flex ds:items-center", X = "type-body-sm ds:mt-[var(--spacing-xs)]";
296
+ function p(e) {
297
+ return e.normalize("NFKC").replace(/[٠-٩]/g, (t) => String(t.charCodeAt(0) - 1632)).replace(/[۰-۹]/g, (t) => String(t.charCodeAt(0) - 1776)).toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, k);
298
+ }
299
+ function It(e, t) {
300
+ let n = 0;
301
+ for (let r = 0; r < t && r < e.length; r += 1) {
302
+ const i = e[r];
303
+ (i >= "0" && i <= "9" || i >= "A" && i <= "Z" || i >= "a" && i <= "z") && (n += 1);
304
+ }
305
+ return n;
306
+ }
307
+ const xt = Xe(function({
308
+ value: t,
309
+ defaultValue: n,
310
+ onChange: r,
311
+ size: i = "md",
312
+ tone: g = "default",
313
+ validateOn: m = "blur",
314
+ showError: S,
315
+ errorMessage: A,
316
+ disabled: Ce,
317
+ readOnly: d,
318
+ required: ve,
319
+ placeholder: be,
320
+ showFormatHint: ye = !0,
321
+ calculateFrom: R,
322
+ id: V,
323
+ name: Ee,
324
+ className: Ie,
325
+ "aria-label": j
326
+ }, xe) {
327
+ const { t: u } = Ge(), y = We(), f = je(Ye) !== null, C = t !== void 0, [Se, M] = oe(
328
+ () => p(n ?? "")
329
+ ), c = C ? p(t ?? "") : Se, [Te, K] = oe(!1), _ = P(!1), v = P(null), h = P(null), Fe = Je(xe, h), B = Ke(), O = `${B}-hint`, G = `${B}-status`, W = `${B}-error`;
330
+ Oe(() => {
331
+ }, [f, j]);
332
+ const T = H(
333
+ () => w(c),
334
+ [c]
335
+ ), Y = c.length === k, E = T === "valid", D = (f ? y.disabled : !1) || !!Ce, Ne = (f ? y.required : !1) || !!ve, we = !d && (!!S || Y && !E && (m === "change" || m === "blur" && Te)), q = f && y.invalid, b = we && !q, J = q || b, ke = J || g === "error" ? "error" : "default", Ae = H(() => A || u(T === "badChecksum" ? "inputs.fiscalCode.errorChecksum" : T === "badFormat" ? "inputs.fiscalCode.errorFormat" : "inputs.fiscalCode.errorIncomplete"), [A, T, u]), Q = !f && ye && !d, Re = f ? void 0 : [
336
+ Q ? O : null,
337
+ b ? W : G
338
+ ].filter(Boolean).join(" ") || void 0, Ve = f ? y.describedBy || void 0 : Re, Me = V ?? y.id, I = ae(
339
+ (s) => {
340
+ const o = w(s);
341
+ r == null || r(s, {
342
+ isValid: o === "valid",
343
+ isComplete: s.length === k,
344
+ reason: o
345
+ });
346
+ },
347
+ [r]
348
+ ), F = ae(
349
+ (s) => {
350
+ C || M(s), I(s);
351
+ },
352
+ [C, I]
353
+ );
354
+ Qe(() => {
355
+ if (v.current == null) return;
356
+ const s = v.current;
357
+ v.current = null;
358
+ const o = h.current;
359
+ if (o && document.activeElement === o) {
360
+ const a = Math.min(s, o.value.length);
361
+ o.setSelectionRange(a, a);
362
+ }
363
+ });
364
+ const _e = (s) => {
365
+ if (d || _.current) return;
366
+ const o = s.target, a = o.value, $ = o.selectionStart ?? a.length, z = It(a, $), x = p(a);
367
+ v.current = Math.min(z, x.length), F(x);
368
+ }, Be = () => {
369
+ _.current = !0;
370
+ }, De = (s) => {
371
+ if (_.current = !1, d) return;
372
+ const o = p(s.currentTarget.value);
373
+ v.current = o.length, F(o);
374
+ }, Ue = (s) => {
375
+ if (d) return;
376
+ const o = s.clipboardData.getData("text");
377
+ s.preventDefault();
378
+ const a = h.current, $ = (a == null ? void 0 : a.selectionStart) ?? c.length, z = (a == null ? void 0 : a.selectionEnd) ?? c.length, x = p(o), ne = c.slice(0, $), Le = c.slice(z), re = p(ne + x + Le);
379
+ v.current = Math.min((ne + x).length, re.length), F(re);
380
+ }, $e = () => {
381
+ m === "blur" && K(!0);
382
+ }, ze = () => {
383
+ var a;
384
+ if (!R || d || D) return;
385
+ let s;
386
+ try {
387
+ s = Ct(R);
388
+ } catch {
389
+ return;
390
+ }
391
+ const o = p(s);
392
+ m === "blur" && K(!0), F(o), (a = h.current) == null || a.focus();
393
+ }, Pe = H(
394
+ () => ({
395
+ getValue: () => c,
396
+ setValue: (s) => {
397
+ var a;
398
+ const o = p(s);
399
+ C || M(o), I(o), (a = h.current) == null || a.focus();
400
+ },
401
+ clear: () => {
402
+ var s;
403
+ C || M(""), I(""), (s = h.current) == null || s.focus();
404
+ },
405
+ focus: () => {
406
+ var s;
407
+ return (s = h.current) == null ? void 0 : s.focus();
408
+ },
409
+ isValid: () => w(c) === "valid"
410
+ }),
411
+ [c, C, I]
412
+ );
413
+ tt(ot, Pe, V);
414
+ const He = be ?? u("inputs.fiscalCode.placeholder"), U = d || f ? "" : E ? u("inputs.fiscalCode.valid") : c.length > 0 && !Y ? u("inputs.fiscalCode.charactersEntered", {
415
+ count: c.length
416
+ }) : "", ee = b ? Ae : "", te = !d && (b || E && !f), se = !!R && !d && !D;
417
+ return /* @__PURE__ */ N(
418
+ "div",
419
+ {
420
+ className: "ds:flex ds:flex-col",
421
+ "data-component": "fiscal-code-input",
422
+ "data-component-id": V,
423
+ children: [
424
+ /* @__PURE__ */ N(
425
+ "div",
426
+ {
427
+ "data-slot": "fiscal-code-input",
428
+ className: vt({ size: i, tone: ke, className: Ie }),
429
+ children: [
430
+ se ? /* @__PURE__ */ l("span", { className: Et, children: /* @__PURE__ */ l(
431
+ et,
432
+ {
433
+ type: "button",
434
+ size: "sm",
435
+ intent: "ghost",
436
+ icon: /* @__PURE__ */ l(rt, {}),
437
+ "aria-label": u("inputs.fiscalCode.calculate"),
438
+ onClick: ze
439
+ }
440
+ ) }) : null,
441
+ /* @__PURE__ */ l(
442
+ "input",
443
+ {
444
+ ref: Fe,
445
+ id: Me,
446
+ name: Ee,
447
+ dir: "ltr",
448
+ type: "text",
449
+ inputMode: "text",
450
+ autoCapitalize: "characters",
451
+ autoCorrect: "off",
452
+ autoComplete: "off",
453
+ spellCheck: !1,
454
+ maxLength: k,
455
+ pattern: "[A-Z0-9]{15}[A-Z]",
456
+ value: c,
457
+ placeholder: He,
458
+ disabled: D,
459
+ readOnly: d,
460
+ "aria-label": j,
461
+ "aria-describedby": Ve,
462
+ "aria-invalid": J || void 0,
463
+ "aria-required": Ne || void 0,
464
+ onChange: _e,
465
+ onCompositionStart: Be,
466
+ onCompositionEnd: De,
467
+ onPaste: Ue,
468
+ onBlur: $e,
469
+ className: bt({
470
+ size: i,
471
+ hasStart: se,
472
+ hasEnd: te
473
+ })
474
+ }
475
+ ),
476
+ te ? /* @__PURE__ */ l(
477
+ "span",
478
+ {
479
+ "aria-hidden": "true",
480
+ className: `${yt} ${b ? "ds:text-destructive" : "ds:text-success"}`,
481
+ children: b ? /* @__PURE__ */ l(ce, {}) : /* @__PURE__ */ l(le, {})
482
+ }
483
+ ) : null
484
+ ]
485
+ }
486
+ ),
487
+ Q ? /* @__PURE__ */ l(
488
+ "p",
489
+ {
490
+ id: O,
491
+ className: `${X} ds:text-muted-foreground`,
492
+ children: u("inputs.fiscalCode.formatHint")
493
+ }
494
+ ) : null,
495
+ /* @__PURE__ */ l(
496
+ "p",
497
+ {
498
+ id: G,
499
+ role: "status",
500
+ "aria-live": "polite",
501
+ className: `${X} ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ${E ? "ds:text-success" : "ds:text-muted-foreground"} ${U ? "" : "ds:sr-only"}`,
502
+ children: U ? /* @__PURE__ */ N(Ze, { children: [
503
+ E ? /* @__PURE__ */ l(
504
+ le,
505
+ {
506
+ "aria-hidden": "true",
507
+ className: "ds:size-4 ds:shrink-0"
508
+ }
509
+ ) : null,
510
+ /* @__PURE__ */ l("span", { children: U })
511
+ ] }) : null
512
+ }
513
+ ),
514
+ ee ? /* @__PURE__ */ N(
515
+ "p",
516
+ {
517
+ id: W,
518
+ role: "alert",
519
+ className: `${X} ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-destructive`,
520
+ children: [
521
+ /* @__PURE__ */ l(ce, { "aria-hidden": "true", className: "ds:size-4 ds:shrink-0" }),
522
+ /* @__PURE__ */ l("span", { children: ee })
523
+ ]
524
+ }
525
+ ) : null
526
+ ]
527
+ }
528
+ );
529
+ });
530
+ xt.displayName = "FiscalCodeInput";
531
+ export {
532
+ xt as F,
533
+ w as a,
534
+ fe as b,
535
+ Ct as c,
536
+ ot as f,
537
+ Ut as i,
538
+ vt as w
539
+ };
540
+ //# sourceMappingURL=fiscal-code-input-BZ0FxwUl.js.map
@@ -1,4 +1,4 @@
1
- import { o as m, q as r, r as o, v as d } from "./react-day-picker-DYDdR8Vv.js";
1
+ import { o as m, q as r, r as o, v as d } from "./react-day-picker-CdtIiKjx.js";
2
2
  const u = {
3
3
  lessThanXSeconds: {
4
4
  one: "moins d’une seconde",
@@ -335,4 +335,4 @@ const u = {
335
335
  export {
336
336
  q as fr
337
337
  };
338
- //# sourceMappingURL=fr-CS7aqaFR.js.map
338
+ //# sourceMappingURL=fr-BcuWxqft.js.map
@@ -8,7 +8,7 @@ import { u as X } from "./use-controllable-state-BiY4xTzM.js";
8
8
  import { u as Y } from "./registry-nPAVE19X.js";
9
9
  import { B as I } from "./button-DD_0Xdmr.js";
10
10
  import { P as Z } from "./progress-kzIRcdaq.js";
11
- import { f as $ } from "./payment-form-D5rgnZu7.js";
11
+ import { f as $ } from "./payment-form-Dy3WIIsC.js";
12
12
  import { T as ee } from "./triangle-alert-CBPUIzQo.js";
13
13
  import { C as se } from "./check-DPdL_Sm7.js";
14
14
  const ae = {
@@ -199,14 +199,14 @@ const ae = {
199
199
  t.priceAmount,
200
200
  t.currency,
201
201
  O.language
202
- ), N = t.perKey ? s(t.perKey) : void 0, U = N ? s("paywall.pricePer", { price: w, period: N }) : w, B = s(t.nameKey);
202
+ ), N = t.perKey ? s(t.perKey) : void 0, U = N ? s("paywall.pricePer", { price: w, period: N }) : w, _ = s(t.nameKey);
203
203
  return /* @__PURE__ */ d(
204
204
  k.Item,
205
205
  {
206
206
  value: t.id,
207
207
  className: [
208
208
  "ds:group ds:relative ds:flex ds:flex-col ds:items-stretch",
209
- "ds:rounded-[var(--radius-md)] ds:border ds:border-border",
209
+ "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
210
210
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]",
211
211
  "ds:text-start ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]",
212
212
  "ds:data-[state=checked]:border-[color:var(--primary)]",
@@ -216,7 +216,7 @@ const ae = {
216
216
  ].join(" "),
217
217
  children: [
218
218
  /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
219
- /* @__PURE__ */ e("span", { className: "ds:font-semibold", children: B }),
219
+ /* @__PURE__ */ e("span", { className: "ds:font-semibold", children: _ }),
220
220
  /* @__PURE__ */ e("span", { className: "ds:tabular-nums", children: U })
221
221
  ] }),
222
222
  t.featuresKeys && t.featuresKeys.length > 0 ? /* @__PURE__ */ e(
@@ -224,7 +224,7 @@ const ae = {
224
224
  {
225
225
  "aria-label": s("paywall.features"),
226
226
  className: "ds:mt-[var(--spacing-xs)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
227
- children: t.featuresKeys.map((_, q) => /* @__PURE__ */ d(
227
+ children: t.featuresKeys.map((B, q) => /* @__PURE__ */ d(
228
228
  "li",
229
229
  {
230
230
  className: "ds:flex ds:items-start ds:gap-[var(--spacing-xs)] type-body-sm",
@@ -236,7 +236,7 @@ const ae = {
236
236
  className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--primary)] ds:mt-[1px]"
237
237
  }
238
238
  ),
239
- /* @__PURE__ */ e("span", { children: s(_) })
239
+ /* @__PURE__ */ e("span", { children: s(B) })
240
240
  ]
241
241
  },
242
242
  q
@@ -265,4 +265,4 @@ export {
265
265
  te as F,
266
266
  ae as f
267
267
  };
268
- //# sourceMappingURL=freemium-paywall-D1N02Oam.js.map
268
+ //# sourceMappingURL=freemium-paywall-BAk3a6er.js.map
@@ -0,0 +1,50 @@
1
+ import { a, d as E } from "./react-day-picker-CdtIiKjx.js";
2
+ import { s as i } from "./subDays-_T9YeKPX.js";
3
+ const T = 280, m = 14, u = 266, d = 28;
4
+ function p(e) {
5
+ if (e < 0) return "preconception";
6
+ const t = Math.floor(e / 7);
7
+ return t < 14 ? "first" : t < 28 ? "second" : t < 42 ? "third" : "postterm";
8
+ }
9
+ function S(e, t) {
10
+ const { method: f, date: s } = e;
11
+ let o, r;
12
+ if (f === "lmp") {
13
+ const c = e.cycleLength ?? d;
14
+ o = s, r = a(s, T + (c - d));
15
+ } else if (f === "conception")
16
+ o = i(s, m), r = a(s, u);
17
+ else {
18
+ const c = e.embryoAge ?? 5, l = i(s, c);
19
+ o = i(l, m), r = a(l, u);
20
+ }
21
+ const n = E(t, o), D = n < 0 ? null : {
22
+ weeks: Math.floor(n / 7),
23
+ days: n % 7,
24
+ totalDays: n
25
+ };
26
+ return {
27
+ dueDate: r,
28
+ gestationalStart: o,
29
+ gestationalAge: D,
30
+ trimester: p(n)
31
+ };
32
+ }
33
+ const y = [12, 24, 28, 37, 40];
34
+ function g(e) {
35
+ return y.map((t) => ({
36
+ key: `w${t}`,
37
+ week: t,
38
+ date: a(e, t * 7)
39
+ }));
40
+ }
41
+ export {
42
+ d as D,
43
+ T as G,
44
+ y as M,
45
+ u as T,
46
+ S as c,
47
+ g,
48
+ p as t
49
+ };
50
+ //# sourceMappingURL=gestation-BXEgDGmP.js.map