@alfadocs/ui-kit 0.47.0 → 0.49.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.
- package/dist/_chunks/{address-autocomplete-CSjMrBvu.js → address-autocomplete-CT-9AOli.js} +2 -2
- package/dist/_chunks/{agenda-card-CFyWSX7Z.js → agenda-card-BaSfVfrL.js} +25 -29
- package/dist/_chunks/{agenda-tray-Dyj9ChHC.js → agenda-tray-DQayYmQ0.js} +50 -67
- package/dist/_chunks/ai-consent-banner-F2md5JD3.js +169 -0
- package/dist/_chunks/ai-tools-rail-CYLWrRmm.js +280 -0
- package/dist/_chunks/{alert-ywPR59NE.js → alert-CUTxnym2.js} +56 -35
- package/dist/_chunks/{alia-sidebar-CVIPrdc9.js → alia-sidebar-DlvyXgVC.js} +3 -2
- package/dist/_chunks/anamnesis-card-CmkBVAln.js +156 -0
- package/dist/_chunks/antenatal-schedule-timeline-Dg0m0yFl.js +412 -0
- package/dist/_chunks/appointment-tray-BwDHhWWC.js +419 -0
- package/dist/_chunks/{ar-DEz65ZJW.js → ar-C68WKG5a.js} +2 -2
- package/dist/_chunks/{audio-recorder-DC-v9YFW.js → audio-recorder-DVJXV7_k.js} +2 -2
- package/dist/_chunks/bishop-score-2MzAz8NE.js +185 -0
- package/dist/_chunks/{bmi-calculator-CQqXTVNL.js → bmi-calculator-DdylQzT6.js} +2 -2
- package/dist/_chunks/{booking-DlDVuWMd.js → booking-DljH0JkS.js} +294 -306
- package/dist/_chunks/{calculator-dialog-D-nfvteH.js → calculator-dialog-CFk4I91b.js} +2 -2
- package/dist/_chunks/calendar-days-C4BmpCZg.js +23 -0
- package/dist/_chunks/{calendar-YHFknAGv.js → calendar-oYWOCrnf.js} +195 -210
- package/dist/_chunks/care-plan-card-QmNpGggC.js +252 -0
- package/dist/_chunks/care-plan-entry-card-Cnra7vUc.js +318 -0
- package/dist/_chunks/{chat-message-B5JpFj0F.js → chat-message-Dm8U2RY1.js} +36 -35
- package/dist/_chunks/circle-arrow-up-CC_85SuH.js +16 -0
- package/dist/_chunks/clinical-note-card-BYo437dU.js +333 -0
- package/dist/_chunks/{contact-profile-card-DHyuAPXM.js → contact-profile-card-DvvVfAA2.js} +102 -115
- package/dist/_chunks/cycle-calculator-oOkj5wlB.js +252 -0
- package/dist/_chunks/{date-picker-Bq7xhMA-.js → date-picker-BfHblqwA.js} +2 -2
- package/dist/_chunks/{date-picker-variants-DLi1Va_e.js → date-picker-variants-CXEAx3O_.js} +22 -22
- package/dist/_chunks/{date-range-picker-DcXuI9y7.js → date-range-picker-hcAMs1wO.js} +3 -3
- package/dist/_chunks/{date-time-picker-RimumeLR.js → date-time-picker-H-3Pwqlb.js} +9 -9
- package/dist/_chunks/{de-bTBGdjPS.js → de-DK4A9_a8.js} +2 -2
- package/dist/_chunks/{dialog-BTpZV6It.js → dialog-DMGnSelc.js} +55 -55
- package/dist/_chunks/{document-scanner-BqLsGs4Y.js → document-scanner-Cxqvq7GR.js} +2 -2
- package/dist/_chunks/due-date-calculator-tDqZXPWO.js +256 -0
- package/dist/_chunks/{editable-currency-cell-renderer-CLil9B29.js → editable-currency-cell-renderer-Bh48OHRv.js} +2 -2
- package/dist/_chunks/{el-BWG5RXxa.js → el-B29HXhG5.js} +2 -2
- package/dist/_chunks/entity-card-COhmqHly.js +69 -0
- package/dist/_chunks/{es-DfO_G435.js → es-BOwPVwWn.js} +2 -2
- package/dist/_chunks/fetal-weight-Da-B4P4k.js +122 -0
- package/dist/_chunks/{fr-BTn24bs8.js → fr-DoDBtn0T.js} +2 -2
- package/dist/_chunks/{freemium-paywall-DzpD63WY.js → freemium-paywall-BWaLWje-.js} +2 -2
- package/dist/_chunks/gestational-age-calculator-DbDfTJU2.js +311 -0
- package/dist/_chunks/hcg-doubling-DAnpbale.js +170 -0
- package/dist/_chunks/{hi-Dj3oYd84.js → hi-DGByrKby.js} +2 -2
- package/dist/_chunks/{insert-result-C5ABnzDl.js → insert-result-DNdi_JYW.js} +140 -168
- package/dist/_chunks/is-safe-url-DkETxeHz.js +7 -0
- package/dist/_chunks/{isSameWeek-HfxKk6Lz.js → isSameWeek-B1odL2vR.js} +2 -2
- package/dist/_chunks/{it-Y85ofIQQ.js → it-B16rEecm.js} +3 -3
- package/dist/_chunks/{ja-CQ7J6YoA.js → ja-B0viOgft.js} +2 -2
- package/dist/_chunks/languages-DsVf_WzT.js +19 -0
- package/dist/_chunks/layers-pzGcbLPj.js +34 -0
- package/dist/_chunks/{marketplace-app-shell-Gfsf78ge.js → marketplace-app-shell-UKSLx9K_.js} +3 -3
- package/dist/_chunks/{message-card-DSPw5ghw.js → message-card-Dvl1TgaN.js} +15 -19
- package/dist/_chunks/{message-tray-hSQff9u4.js → message-tray-Dl6GQaaV.js} +2 -2
- package/dist/_chunks/{nl-D9kHCmp3.js → nl-cBxEX2QU.js} +2 -2
- package/dist/_chunks/operator-hero-CM8949Hd.js +198 -0
- package/dist/_chunks/{patient-search-CocVcGJ3.js → patient-search-BJOmTmDA.js} +2 -2
- package/dist/_chunks/{patient-shell-CnT4L8gn.js → patient-shell-DUmhXnFq.js} +2 -2
- package/dist/_chunks/patient-summary-card-BnTqxcTr.js +443 -0
- package/dist/_chunks/{payment-form-BNTx4876.js → payment-form-xmeCkxas.js} +2 -2
- package/dist/_chunks/payment-request-card-B_lyobd0.js +478 -0
- package/dist/_chunks/{pdf-viewer-CWEXTlwq.js → pdf-viewer-q1D3Uion.js} +4 -4
- package/dist/_chunks/periodontal-chart-card-BYs9hax1.js +455 -0
- package/dist/_chunks/phone-Bi5yUm4I.js +20 -0
- package/dist/_chunks/{pl-B3Smqpkr.js → pl-DtS08ioY.js} +3 -3
- package/dist/_chunks/{practice-results-DDi-kvaD.js → practice-results-Cq1y8JFD.js} +4 -3
- package/dist/_chunks/pregnancy-weight-gain-CCGrvarh.js +322 -0
- package/dist/_chunks/product-hub-panel-CkfZBA3t.js +620 -0
- package/dist/_chunks/{pt-D3J-1c_7.js → pt-yFXs1VvH.js} +2 -2
- package/dist/_chunks/{ro-BKAbbEA3.js → ro-DsCzSrzR.js} +2 -2
- package/dist/_chunks/{ru-BeG8f0Ep.js → ru-DgDxL0pc.js} +3 -3
- package/dist/_chunks/scan-line-lGioFwLC.js +18 -0
- package/dist/_chunks/shield-check-BjCGH_Sr.js +21 -0
- package/dist/_chunks/{sidebar-_vJXI9rB.js → sidebar-h78cTNLh.js} +440 -338
- package/dist/_chunks/{sign-document-BCyLpFHJ.js → sign-document-CZkAf28g.js} +2 -2
- package/dist/_chunks/{sq-_hRPaeUy.js → sq-DHlCYN67.js} +2 -2
- package/dist/_chunks/subDays-Bs00akhK.js +8 -0
- package/dist/_chunks/{sv-g009fSpe.js → sv-O0QaQs_s.js} +2 -2
- package/dist/_chunks/{tr-OKUOuhMW.js → tr-BmNDRuio.js} +2 -2
- package/dist/_chunks/{transaction-chip-B8ujzowA.js → transaction-chip-BZCa6XDn.js} +8 -6
- package/dist/_chunks/{unit-converter-u3CwNDpP.js → unit-converter-jWp3Z85y.js} +2 -2
- package/dist/_chunks/user-cog-BS_qc8nA.js +24 -0
- package/dist/_chunks/video-BAeICxCT.js +21 -0
- package/dist/_chunks/warning-stack-CXfoAT-_.js +220 -0
- package/dist/_chunks/{workflow-map-Djn1QMJc.js → workflow-map-DzX_LI4y.js} +139 -157
- package/dist/_chunks/{zh-CN-De4zwEhx.js → zh-CN-CgVJZEzz.js} +3 -3
- package/dist/agent-catalog.json +367 -1
- package/dist/components/_shared/antenatal-schedule-timeline.d.ts +18 -0
- package/dist/components/_shared/antenatal-schedule.d.ts +68 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts +40 -0
- package/dist/components/_shared/entity-card/index.d.ts +3 -0
- package/dist/components/_shared/index.d.ts +5 -0
- package/dist/components/_shared/is-safe-url.d.ts +13 -0
- package/dist/components/_shared/obstetrics.d.ts +138 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/agenda-card/agenda-card.d.ts +1 -2
- package/dist/components/agenda-card/index.d.ts +2 -1
- package/dist/components/agenda-card/index.js +6 -5
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts +4 -0
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +45 -0
- package/dist/components/ai-consent-banner/index.d.ts +4 -0
- package/dist/components/ai-consent-banner/index.js +6 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +4 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +60 -0
- package/dist/components/ai-tools-rail/index.d.ts +4 -0
- package/dist/components/ai-tools-rail/index.js +6 -0
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/anamnesis-card.d.ts +68 -0
- package/dist/components/anamnesis-card/index.d.ts +3 -0
- package/dist/components/anamnesis-card/index.js +5 -0
- package/dist/components/appointment-card/appointment-card.agent.d.ts +3 -0
- package/dist/components/appointment-card/appointment-card.d.ts +93 -0
- package/dist/components/appointment-card/appointment-tray.agent.d.ts +4 -0
- package/dist/components/appointment-card/appointment-tray.d.ts +48 -0
- package/dist/components/appointment-card/index.d.ts +8 -0
- package/dist/components/appointment-card/index.js +10 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bishop-score/bishop-score.d.ts +27 -0
- package/dist/components/bishop-score/bishop.d.ts +30 -0
- package/dist/components/bishop-score/index.d.ts +4 -0
- package/dist/components/bishop-score/index.js +10 -0
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/care-plan-card/care-plan-card.agent.d.ts +4 -0
- package/dist/components/care-plan-card/care-plan-card.d.ts +102 -0
- package/dist/components/care-plan-card/index.d.ts +4 -0
- package/dist/components/care-plan-card/index.js +6 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.agent.d.ts +4 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.d.ts +110 -0
- package/dist/components/care-plan-entry-card/index.d.ts +4 -0
- package/dist/components/care-plan-entry-card/index.js +6 -0
- package/dist/components/chat-message/chat-message.d.ts +7 -0
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.agent.d.ts +4 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +98 -0
- package/dist/components/clinical-note-card/index.d.ts +4 -0
- package/dist/components/clinical-note-card/index.js +6 -0
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/cycle.d.ts +5 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +7 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +13 -1
- package/dist/components/due-date-calculator/gestation.d.ts +1 -59
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.js +16 -10
- package/dist/components/fetal-weight/efw.d.ts +25 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts +27 -0
- package/dist/components/fetal-weight/index.d.ts +4 -0
- package/dist/components/fetal-weight/index.js +6 -0
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +25 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/hcg-doubling.d.ts +31 -0
- package/dist/components/hcg-doubling/hcg.d.ts +33 -0
- package/dist/components/hcg-doubling/index.d.ts +4 -0
- package/dist/components/hcg-doubling/index.js +7 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/message-card/index.js +5 -4
- package/dist/components/message-card/message-card.d.ts +1 -2
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +9 -0
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.d.ts +4 -0
- package/dist/components/patient-summary-card/index.js +6 -0
- package/dist/components/patient-summary-card/patient-summary-card.agent.d.ts +4 -0
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +120 -0
- package/dist/components/payment-card/index.d.ts +7 -0
- package/dist/components/payment-card/index.js +8 -0
- package/dist/components/payment-card/payment-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-card.d.ts +71 -0
- package/dist/components/payment-card/payment-request-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-request-card.d.ts +43 -0
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.d.ts +4 -0
- package/dist/components/periodontal-chart-card/index.js +7 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.agent.d.ts +4 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +74 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +7 -0
- package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +33 -8
- package/dist/components/product-hub-tray/index.d.ts +8 -0
- package/dist/components/product-hub-tray/index.js +10 -0
- package/dist/components/product-hub-tray/product-hub-panel.agent.d.ts +4 -0
- package/dist/components/product-hub-tray/product-hub-panel.d.ts +54 -0
- package/dist/components/product-hub-tray/product-hub-tray.agent.d.ts +4 -0
- package/dist/components/product-hub-tray/product-hub-tray.d.ts +115 -0
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/sidebar/index.d.ts +2 -2
- package/dist/components/sidebar/index.js +12 -11
- package/dist/components/sidebar/sidebar.d.ts +14 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +561 -1
- package/dist/i18n/locales/ar.js +560 -2
- package/dist/i18n/locales/de.d.ts +561 -1
- package/dist/i18n/locales/de.js +560 -2
- package/dist/i18n/locales/el.d.ts +561 -1
- package/dist/i18n/locales/el.js +560 -2
- package/dist/i18n/locales/en.d.ts +561 -1
- package/dist/i18n/locales/en.js +560 -2
- package/dist/i18n/locales/es.d.ts +561 -1
- package/dist/i18n/locales/es.js +560 -2
- package/dist/i18n/locales/fr.d.ts +561 -1
- package/dist/i18n/locales/fr.js +560 -2
- package/dist/i18n/locales/hi.d.ts +561 -1
- package/dist/i18n/locales/hi.js +560 -2
- package/dist/i18n/locales/it.d.ts +561 -1
- package/dist/i18n/locales/it.js +560 -2
- package/dist/i18n/locales/ja.d.ts +561 -1
- package/dist/i18n/locales/ja.js +560 -2
- package/dist/i18n/locales/nl.d.ts +561 -1
- package/dist/i18n/locales/nl.js +560 -2
- package/dist/i18n/locales/pl.d.ts +561 -1
- package/dist/i18n/locales/pl.js +560 -2
- package/dist/i18n/locales/pt.d.ts +561 -1
- package/dist/i18n/locales/pt.js +560 -2
- package/dist/i18n/locales/ro.d.ts +561 -1
- package/dist/i18n/locales/ro.js +560 -2
- package/dist/i18n/locales/ru.d.ts +561 -1
- package/dist/i18n/locales/ru.js +560 -2
- package/dist/i18n/locales/sq.d.ts +561 -1
- package/dist/i18n/locales/sq.js +560 -2
- package/dist/i18n/locales/sv.d.ts +561 -1
- package/dist/i18n/locales/sv.js +560 -2
- package/dist/i18n/locales/tr.d.ts +561 -1
- package/dist/i18n/locales/tr.js +560 -2
- package/dist/i18n/locales/zh.d.ts +561 -1
- package/dist/i18n/locales/zh.js +560 -2
- package/dist/index.js +663 -600
- package/dist/locales/ar.json +562 -2
- package/dist/locales/de.json +562 -2
- package/dist/locales/el.json +562 -2
- package/dist/locales/en.json +562 -2
- package/dist/locales/es.json +562 -2
- package/dist/locales/fr.json +562 -2
- package/dist/locales/hi.json +562 -2
- package/dist/locales/it.json +562 -2
- package/dist/locales/ja.json +562 -2
- package/dist/locales/nl.json +562 -2
- package/dist/locales/pl.json +562 -2
- package/dist/locales/pt.json +562 -2
- package/dist/locales/ro.json +562 -2
- package/dist/locales/ru.json +562 -2
- package/dist/locales/sq.json +562 -2
- package/dist/locales/sv.json +562 -2
- package/dist/locales/tr.json +562 -2
- package/dist/locales/zh.json +562 -2
- package/dist/patterns/alia-assistant/alia-types.d.ts +15 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +58 -1
- package/dist/_chunks/cycle-calculator-KxA8dqDf.js +0 -211
- package/dist/_chunks/due-date-calculator-mFxpHLml.js +0 -216
- package/dist/_chunks/gestation-mWF4AXea.js +0 -50
- package/dist/_chunks/gestational-age-calculator-gWI_uRA1.js +0 -203
- package/dist/_chunks/operator-hero-7LiiP7zi.js +0 -171
- package/dist/_chunks/pregnancy-weight-gain-BtEHaSqy.js +0 -246
- package/dist/_chunks/shield-check-C73ma9Cs.js +0 -36
- package/dist/_chunks/subDays-Dv7q9S7u.js +0 -8
- package/dist/_chunks/warning-stack-DNR3-IbP.js +0 -180
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import { a as y, j as N } from "./date-picker-variants-CXEAx3O_.js";
|
|
2
|
+
import { s as p } from "./subDays-Bs00akhK.js";
|
|
3
|
+
import { jsx as u, jsxs as f } from "react/jsx-runtime";
|
|
4
|
+
import { useMemo as M } from "react";
|
|
5
|
+
import { useTranslation as T } from "react-i18next";
|
|
6
|
+
import { C as I } from "./card-DPmk26CL.js";
|
|
7
|
+
import { B as x } from "./badge-zsf5i5bH.js";
|
|
8
|
+
const _ = 280, S = 14, b = 266, C = 28;
|
|
9
|
+
function w(t) {
|
|
10
|
+
if (t < 0) return "preconception";
|
|
11
|
+
const a = Math.floor(t / 7);
|
|
12
|
+
return a < 14 ? "first" : a < 28 ? "second" : a < 42 ? "third" : "postterm";
|
|
13
|
+
}
|
|
14
|
+
function mt(t, a) {
|
|
15
|
+
const { method: s, date: r } = t;
|
|
16
|
+
let o, c;
|
|
17
|
+
if (s === "lmp") {
|
|
18
|
+
const m = t.cycleLength ?? C;
|
|
19
|
+
o = r, c = y(r, _ + (m - C));
|
|
20
|
+
} else if (s === "conception")
|
|
21
|
+
o = p(r, S), c = y(r, b);
|
|
22
|
+
else {
|
|
23
|
+
const m = t.embryoAge ?? 5, h = p(r, m);
|
|
24
|
+
o = p(h, S), c = y(h, b);
|
|
25
|
+
}
|
|
26
|
+
const e = N(a, o), l = e < 0 ? null : {
|
|
27
|
+
weeks: Math.floor(e / 7),
|
|
28
|
+
days: e % 7,
|
|
29
|
+
totalDays: e
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
dueDate: c,
|
|
33
|
+
gestationalStart: o,
|
|
34
|
+
gestationalAge: l,
|
|
35
|
+
trimester: w(e)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const R = [12, 24, 28, 37, 40];
|
|
39
|
+
function gt(t) {
|
|
40
|
+
return R.map((a) => ({
|
|
41
|
+
key: `w${a}`,
|
|
42
|
+
week: a,
|
|
43
|
+
date: y(t, a * 7)
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
const Dt = {
|
|
47
|
+
preconception: "neutral",
|
|
48
|
+
first: "info",
|
|
49
|
+
second: "success",
|
|
50
|
+
third: "warning",
|
|
51
|
+
postterm: "error"
|
|
52
|
+
}, $ = {
|
|
53
|
+
preconception: "--muted",
|
|
54
|
+
first: "--info",
|
|
55
|
+
second: "--success",
|
|
56
|
+
third: "--warning-readable",
|
|
57
|
+
postterm: "--destructive"
|
|
58
|
+
};
|
|
59
|
+
function ft(t) {
|
|
60
|
+
return $[t];
|
|
61
|
+
}
|
|
62
|
+
const i = (t, a = 0) => t * 7 + a;
|
|
63
|
+
function F(t, a = "unknown", s = "nice") {
|
|
64
|
+
if (t === "singleton") return null;
|
|
65
|
+
if (t === "triplet")
|
|
66
|
+
return { startDay: i(35, 0), endDay: i(35, 6), source: "NICE-NG137" };
|
|
67
|
+
const r = a === "unknown" ? "monochorionic-diamniotic" : a;
|
|
68
|
+
if (s === "acog")
|
|
69
|
+
switch (r) {
|
|
70
|
+
case "dichorionic-diamniotic":
|
|
71
|
+
return {
|
|
72
|
+
startDay: i(38, 0),
|
|
73
|
+
endDay: i(38, 6),
|
|
74
|
+
source: "ACOG-PB231"
|
|
75
|
+
};
|
|
76
|
+
case "monochorionic-diamniotic":
|
|
77
|
+
return {
|
|
78
|
+
startDay: i(36, 0),
|
|
79
|
+
endDay: i(37, 6),
|
|
80
|
+
source: "ACOG-PB231"
|
|
81
|
+
};
|
|
82
|
+
case "monochorionic-monoamniotic":
|
|
83
|
+
return {
|
|
84
|
+
startDay: i(32, 0),
|
|
85
|
+
endDay: i(34, 0),
|
|
86
|
+
source: "ACOG-PB231"
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
switch (r) {
|
|
90
|
+
case "dichorionic-diamniotic":
|
|
91
|
+
return { startDay: i(37, 0), endDay: i(37, 6), source: "NICE-NG137" };
|
|
92
|
+
case "monochorionic-diamniotic":
|
|
93
|
+
return { startDay: i(36, 0), endDay: i(36, 6), source: "NICE-NG137" };
|
|
94
|
+
case "monochorionic-monoamniotic":
|
|
95
|
+
return { startDay: i(32, 0), endDay: i(33, 6), source: "NICE-NG137" };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const L = 45, B = 84;
|
|
99
|
+
function H(t) {
|
|
100
|
+
return 8.052 * Math.sqrt(t * 1.037) + 23.73;
|
|
101
|
+
}
|
|
102
|
+
function U(t) {
|
|
103
|
+
return t <= i(8, 6) ? 5 : t <= i(15, 6) ? 7 : t <= i(21, 6) ? 10 : t <= i(27, 6) ? 14 : 21;
|
|
104
|
+
}
|
|
105
|
+
function ht(t) {
|
|
106
|
+
const a = N(t.scanDate, t.lmp), s = Math.round(H(t.crlMm)), r = Math.abs(a - s), o = U(a), c = r > o;
|
|
107
|
+
return {
|
|
108
|
+
gestationalStart: c ? p(t.scanDate, s) : t.lmp,
|
|
109
|
+
redated: c,
|
|
110
|
+
discrepancyDays: r,
|
|
111
|
+
thresholdDays: o,
|
|
112
|
+
ecoDiffDays: s - a,
|
|
113
|
+
crlInRange: t.crlMm >= L && t.crlMm <= B
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const n = (t, a = 0) => t * 7 + a, P = (t) => t === "uk" ? {
|
|
117
|
+
key: "dating-nt",
|
|
118
|
+
category: "screening",
|
|
119
|
+
startDay: n(11, 2),
|
|
120
|
+
endDay: n(14, 1),
|
|
121
|
+
source: "NICE-NG201"
|
|
122
|
+
} : {
|
|
123
|
+
key: "dating-nt",
|
|
124
|
+
category: "screening",
|
|
125
|
+
startDay: n(11, 0),
|
|
126
|
+
endDay: n(13, 6),
|
|
127
|
+
source: "SIEOG-2021"
|
|
128
|
+
}, W = {
|
|
129
|
+
key: "nipt",
|
|
130
|
+
category: "screening",
|
|
131
|
+
startDay: n(10, 0),
|
|
132
|
+
endDay: n(13, 6),
|
|
133
|
+
condition: "on-indication",
|
|
134
|
+
source: "ACOG-CO700"
|
|
135
|
+
}, Y = {
|
|
136
|
+
key: "cvs",
|
|
137
|
+
category: "diagnostic",
|
|
138
|
+
startDay: n(11, 0),
|
|
139
|
+
endDay: n(13, 6),
|
|
140
|
+
condition: "on-indication",
|
|
141
|
+
source: "ISS"
|
|
142
|
+
}, j = {
|
|
143
|
+
key: "amnio",
|
|
144
|
+
category: "diagnostic",
|
|
145
|
+
startDay: n(15, 0),
|
|
146
|
+
endDay: n(18, 0),
|
|
147
|
+
condition: "on-indication",
|
|
148
|
+
source: "ISS"
|
|
149
|
+
}, K = (t) => t === "uk" ? {
|
|
150
|
+
key: "morphology",
|
|
151
|
+
category: "scan",
|
|
152
|
+
startDay: n(18, 0),
|
|
153
|
+
endDay: n(20, 6),
|
|
154
|
+
source: "NICE-NG201"
|
|
155
|
+
} : t === "international" ? {
|
|
156
|
+
key: "morphology",
|
|
157
|
+
category: "scan",
|
|
158
|
+
startDay: n(18, 0),
|
|
159
|
+
endDay: n(22, 0),
|
|
160
|
+
source: "ACOG-CO700"
|
|
161
|
+
} : {
|
|
162
|
+
key: "morphology",
|
|
163
|
+
category: "scan",
|
|
164
|
+
startDay: n(19, 0),
|
|
165
|
+
endDay: n(21, 6),
|
|
166
|
+
source: "SIEOG-2021"
|
|
167
|
+
}, V = {
|
|
168
|
+
key: "growth",
|
|
169
|
+
category: "scan",
|
|
170
|
+
startDay: n(30, 0),
|
|
171
|
+
endDay: n(33, 6),
|
|
172
|
+
condition: "on-indication",
|
|
173
|
+
source: "SIEOG-2021"
|
|
174
|
+
}, q = {
|
|
175
|
+
key: "ogtt-high",
|
|
176
|
+
category: "lab",
|
|
177
|
+
startDay: n(16, 0),
|
|
178
|
+
endDay: n(18, 6),
|
|
179
|
+
condition: "gdm-high",
|
|
180
|
+
source: "SID-AMD"
|
|
181
|
+
}, X = {
|
|
182
|
+
key: "ogtt-medium",
|
|
183
|
+
category: "lab",
|
|
184
|
+
startDay: n(24, 0),
|
|
185
|
+
endDay: n(28, 6),
|
|
186
|
+
condition: "gdm-medium",
|
|
187
|
+
source: "SID-AMD"
|
|
188
|
+
}, v = (t) => t === "it" ? {
|
|
189
|
+
key: "gbs",
|
|
190
|
+
category: "lab",
|
|
191
|
+
startDay: n(36, 0),
|
|
192
|
+
endDay: n(37, 6),
|
|
193
|
+
source: "ISS"
|
|
194
|
+
} : {
|
|
195
|
+
// CDC / legacy international protocols open a week earlier.
|
|
196
|
+
key: "gbs",
|
|
197
|
+
category: "lab",
|
|
198
|
+
startDay: n(35, 0),
|
|
199
|
+
endDay: n(37, 6),
|
|
200
|
+
source: "NICE-NG201"
|
|
201
|
+
}, z = {
|
|
202
|
+
key: "anti-d",
|
|
203
|
+
category: "prophylaxis",
|
|
204
|
+
startDay: n(28, 0),
|
|
205
|
+
endDay: n(28, 0),
|
|
206
|
+
condition: "rh-negative",
|
|
207
|
+
source: "ISS"
|
|
208
|
+
}, J = {
|
|
209
|
+
key: "term",
|
|
210
|
+
category: "milestone",
|
|
211
|
+
startDay: n(37, 0),
|
|
212
|
+
endDay: n(37, 0),
|
|
213
|
+
plurality: ["singleton"],
|
|
214
|
+
source: "ACOG-CO700"
|
|
215
|
+
}, Q = {
|
|
216
|
+
key: "edd",
|
|
217
|
+
category: "milestone",
|
|
218
|
+
startDay: n(40, 0),
|
|
219
|
+
endDay: n(40, 0),
|
|
220
|
+
plurality: ["singleton"],
|
|
221
|
+
source: "ACOG-CO700"
|
|
222
|
+
}, Z = {
|
|
223
|
+
key: "chorionicity",
|
|
224
|
+
category: "scan",
|
|
225
|
+
startDay: n(11, 2),
|
|
226
|
+
endDay: n(14, 1),
|
|
227
|
+
plurality: ["twin", "triplet"],
|
|
228
|
+
source: "ISUOG-2025"
|
|
229
|
+
};
|
|
230
|
+
function tt(t) {
|
|
231
|
+
return [
|
|
232
|
+
P(t),
|
|
233
|
+
W,
|
|
234
|
+
Y,
|
|
235
|
+
Z,
|
|
236
|
+
j,
|
|
237
|
+
K(t),
|
|
238
|
+
q,
|
|
239
|
+
V,
|
|
240
|
+
X,
|
|
241
|
+
J,
|
|
242
|
+
v(t),
|
|
243
|
+
z,
|
|
244
|
+
Q
|
|
245
|
+
];
|
|
246
|
+
}
|
|
247
|
+
function at(t, a, s) {
|
|
248
|
+
if (t === "singleton") return [];
|
|
249
|
+
const r = a === "dichorionic-diamniotic", o = r ? 4 : 2, c = r ? 20 : 16, e = F(t, a, s), l = [
|
|
250
|
+
{
|
|
251
|
+
key: "surveillance",
|
|
252
|
+
category: "scan",
|
|
253
|
+
startDay: n(c, 0),
|
|
254
|
+
// Runs until the planned-birth window opens (fallback 36w if none).
|
|
255
|
+
endDay: e ? e.startDay : n(36, 0),
|
|
256
|
+
source: r ? "NICE-NG137" : "ISUOG-2025",
|
|
257
|
+
meta: { everyWeeks: o, fromWeek: c }
|
|
258
|
+
}
|
|
259
|
+
];
|
|
260
|
+
return e && l.push({
|
|
261
|
+
key: "birth",
|
|
262
|
+
category: "milestone",
|
|
263
|
+
startDay: e.startDay,
|
|
264
|
+
endDay: e.endDay,
|
|
265
|
+
source: e.source
|
|
266
|
+
}), l;
|
|
267
|
+
}
|
|
268
|
+
function et(t, a) {
|
|
269
|
+
if (t.plurality && !t.plurality.includes(a.plurality) || t.chorionicity && !t.chorionicity.includes(a.chorionicity))
|
|
270
|
+
return !1;
|
|
271
|
+
switch (t.condition) {
|
|
272
|
+
case "rh-negative":
|
|
273
|
+
return a.rhNegative;
|
|
274
|
+
case "gdm-high":
|
|
275
|
+
return a.gdmRisk === "high";
|
|
276
|
+
case "gdm-medium":
|
|
277
|
+
return a.gdmRisk === "medium";
|
|
278
|
+
case "on-indication":
|
|
279
|
+
return a.includeOnIndication;
|
|
280
|
+
default:
|
|
281
|
+
return !0;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
function nt(t, a, s, r) {
|
|
285
|
+
const o = N(t, s);
|
|
286
|
+
return N(a, s) < 0 ? { status: "past", near: !1 } : o <= 0 ? { status: "current", near: !0 } : { status: "upcoming", near: o <= r };
|
|
287
|
+
}
|
|
288
|
+
function pt(t, a = {}) {
|
|
289
|
+
const {
|
|
290
|
+
today: s = /* @__PURE__ */ new Date(),
|
|
291
|
+
schedule: r = "it",
|
|
292
|
+
plurality: o = "singleton",
|
|
293
|
+
chorionicity: c = "unknown",
|
|
294
|
+
rhNegative: e = !1,
|
|
295
|
+
gdmRisk: l,
|
|
296
|
+
includeOnIndication: m = !1,
|
|
297
|
+
birthGuideline: h = "nice",
|
|
298
|
+
nearDays: G = 14
|
|
299
|
+
} = a;
|
|
300
|
+
return [
|
|
301
|
+
...tt(r),
|
|
302
|
+
...at(o, c, h)
|
|
303
|
+
].filter(
|
|
304
|
+
(d) => et(d, {
|
|
305
|
+
plurality: o,
|
|
306
|
+
chorionicity: c,
|
|
307
|
+
rhNegative: e,
|
|
308
|
+
gdmRisk: l,
|
|
309
|
+
includeOnIndication: m
|
|
310
|
+
})
|
|
311
|
+
).map((d) => {
|
|
312
|
+
const g = y(t, d.startDay), D = y(t, d.endDay), { status: O, near: A } = nt(g, D, s, G);
|
|
313
|
+
return {
|
|
314
|
+
...d,
|
|
315
|
+
start: g,
|
|
316
|
+
end: D,
|
|
317
|
+
single: d.startDay === d.endDay,
|
|
318
|
+
status: O,
|
|
319
|
+
near: A
|
|
320
|
+
};
|
|
321
|
+
}).sort((d, g) => {
|
|
322
|
+
const D = d.startDay - g.startDay;
|
|
323
|
+
return D !== 0 ? D : d.endDay - g.endDay;
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
function rt(t, a) {
|
|
327
|
+
return t === "past" ? "neutral" : t === "current" || a ? "warning" : "info";
|
|
328
|
+
}
|
|
329
|
+
function k(t) {
|
|
330
|
+
return `${Math.floor(t / 7)}+${t % 7}`;
|
|
331
|
+
}
|
|
332
|
+
const st = {
|
|
333
|
+
scan: "activity",
|
|
334
|
+
screening: "activity",
|
|
335
|
+
diagnostic: "activity",
|
|
336
|
+
lab: "droplets",
|
|
337
|
+
prophylaxis: "heart",
|
|
338
|
+
milestone: "calendar"
|
|
339
|
+
};
|
|
340
|
+
function E(t, a) {
|
|
341
|
+
return a(`antenatalSchedule.event.${t.key}`, t.meta ?? {});
|
|
342
|
+
}
|
|
343
|
+
function Nt(t, a, s) {
|
|
344
|
+
return t.map((r) => ({
|
|
345
|
+
icon: st[r.category],
|
|
346
|
+
label: E(r, a),
|
|
347
|
+
value: r.single ? s(r.start) : `${s(r.start)} – ${s(r.end)}`
|
|
348
|
+
}));
|
|
349
|
+
}
|
|
350
|
+
function It({
|
|
351
|
+
events: t
|
|
352
|
+
}) {
|
|
353
|
+
const { t: a, i18n: s } = T(), r = M(
|
|
354
|
+
() => new Intl.DateTimeFormat(s.language, { dateStyle: "medium" }),
|
|
355
|
+
[s.language]
|
|
356
|
+
), o = (e) => E(e, a), c = (e) => e.single ? r.format(e.start) : `${r.format(e.start)} – ${r.format(
|
|
357
|
+
e.end
|
|
358
|
+
)}`;
|
|
359
|
+
return /* @__PURE__ */ u(I, { variant: "elevated", children: /* @__PURE__ */ f(I.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
360
|
+
/* @__PURE__ */ u("span", { className: "type-label ds:text-muted-foreground", children: a("antenatalSchedule.scheduleLabel") }),
|
|
361
|
+
/* @__PURE__ */ u("ul", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: t.map((e) => /* @__PURE__ */ f(
|
|
362
|
+
"li",
|
|
363
|
+
{
|
|
364
|
+
"data-status": e.status,
|
|
365
|
+
className: "ds:flex ds:flex-wrap ds:items-start ds:justify-between ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:border-b ds:border-border ds:pb-[var(--spacing-sm)] ds:last:border-b-0 ds:last:pb-0",
|
|
366
|
+
children: [
|
|
367
|
+
/* @__PURE__ */ f("span", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
|
|
368
|
+
/* @__PURE__ */ u("span", { className: "type-body ds:text-foreground", children: o(e) }),
|
|
369
|
+
/* @__PURE__ */ f("span", { className: "type-meta ds:text-muted-foreground", children: [
|
|
370
|
+
a(`antenatalSchedule.category.${e.category}`),
|
|
371
|
+
" ·",
|
|
372
|
+
" ",
|
|
373
|
+
k(e.startDay),
|
|
374
|
+
e.single ? "" : ` – ${k(e.endDay)}`,
|
|
375
|
+
" ·",
|
|
376
|
+
" ",
|
|
377
|
+
a(`antenatalSchedule.source.${e.source}`),
|
|
378
|
+
e.condition === "on-indication" ? ` · ${a("antenatalSchedule.onIndication")}` : ""
|
|
379
|
+
] })
|
|
380
|
+
] }),
|
|
381
|
+
/* @__PURE__ */ f("span", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-2xs)] ds:text-end", children: [
|
|
382
|
+
/* @__PURE__ */ u("span", { className: "type-body ds:text-foreground", children: c(e) }),
|
|
383
|
+
/* @__PURE__ */ u(x, { variant: rt(e.status, e.near), children: e.status === "upcoming" && e.near ? a("antenatalSchedule.near") : a(`antenatalSchedule.status.${e.status}`) })
|
|
384
|
+
] })
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
e.key
|
|
388
|
+
)) }),
|
|
389
|
+
/* @__PURE__ */ u("p", { className: "type-meta ds:text-muted-foreground", children: a("antenatalSchedule.disclaimer") })
|
|
390
|
+
] }) });
|
|
391
|
+
}
|
|
392
|
+
export {
|
|
393
|
+
It as A,
|
|
394
|
+
B as C,
|
|
395
|
+
C as D,
|
|
396
|
+
_ as G,
|
|
397
|
+
R as M,
|
|
398
|
+
b as T,
|
|
399
|
+
L as a,
|
|
400
|
+
H as b,
|
|
401
|
+
mt as c,
|
|
402
|
+
U as d,
|
|
403
|
+
pt as e,
|
|
404
|
+
Dt as f,
|
|
405
|
+
gt as g,
|
|
406
|
+
Nt as h,
|
|
407
|
+
ft as i,
|
|
408
|
+
F as p,
|
|
409
|
+
ht as r,
|
|
410
|
+
w as t
|
|
411
|
+
};
|
|
412
|
+
//# sourceMappingURL=antenatal-schedule-timeline-Dg0m0yFl.js.map
|