@alfadocs/ui-kit 0.69.0 → 0.70.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/{agenda-card-BxSFkqgY.js → agenda-card-BQ-IKAru.js} +2 -2
- package/dist/_chunks/{agenda-tray-g0kg7HwB.js → agenda-tray-CGXRk58j.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-CXlsNX1c.js → ai-consent-banner-Be-h9mRI.js} +3 -3
- package/dist/_chunks/ai-tools-rail-B5NEghsp.js +511 -0
- package/dist/_chunks/{alert-_mUKLmwA.js → alert-CHYZ96tR.js} +150 -96
- package/dist/_chunks/{anamnesis-card-DRmE24OQ.js → anamnesis-card-DvYCa16e.js} +2 -2
- package/dist/_chunks/anatomy-scheme-CJB6dI6p.js +2445 -0
- package/dist/_chunks/annotation-marker-qt5R9WZX.js +120 -0
- package/dist/_chunks/{antenatal-schedule-timeline-35ebkcZT.js → antenatal-schedule-timeline-CwXrQRm1.js} +2 -2
- package/dist/_chunks/appointment-card-C06aZqA7.js +310 -0
- package/dist/_chunks/appointment-timeline-BJM0S_Fg.js +386 -0
- package/dist/_chunks/appointment-tray-DRRw5ROi.js +193 -0
- package/dist/_chunks/{audio-recorder-DYXXnGug.js → audio-recorder-Cpdk5qpQ.js} +2 -2
- package/dist/_chunks/{badge-CqGsX32l.js → badge-DCOqV9mI.js} +32 -27
- package/dist/_chunks/{bishop-score-PJI3AXzA.js → bishop-score-DnYWtZa_.js} +2 -2
- package/dist/_chunks/{bmi-calculator-BZtIJ53x.js → bmi-calculator-zjeY4E7J.js} +2 -2
- package/dist/_chunks/{booking-C3VqFReX.js → booking-DUBI0oqt.js} +4 -4
- package/dist/_chunks/{care-plan-card-CvFGXa2z.js → care-plan-card-C5sTfY9G.js} +5 -5
- package/dist/_chunks/{care-plan-entry-card-C3E_gClk.js → care-plan-entry-card-CXnxGCWA.js} +5 -5
- package/dist/_chunks/care-plan-header-BUwqDTtz.js +206 -0
- package/dist/_chunks/clinical-note-card-BUvNMNGL.js +436 -0
- package/dist/_chunks/{contact-profile-card-Dramqa9C.js → contact-profile-card-DDPwRFiP.js} +2 -2
- package/dist/_chunks/control-room-rail-Y8ryLYsP.js +229 -0
- package/dist/_chunks/{cycle-calculator-DmRGJNaT.js → cycle-calculator-CCmPwcBl.js} +2 -2
- package/dist/_chunks/{dependent-selector-CG_FOHya.js → dependent-selector-DUV4thxX.js} +2 -2
- package/dist/_chunks/{document-scanner-CTubA0-N.js → document-scanner-C_AxLooF.js} +3 -3
- package/dist/_chunks/{due-date-calculator-BTmsIQqD.js → due-date-calculator-Brdj-euS.js} +3 -3
- package/dist/_chunks/editable-currency-cell-renderer-C9twtALM.js +328 -0
- package/dist/_chunks/email-input-DJ7EXklP.js +397 -0
- package/dist/_chunks/{entity-card-COhmqHly.js → entity-card-9_62gY7l.js} +38 -20
- package/dist/_chunks/entity-summary-BxRjFh_4.js +138 -0
- package/dist/_chunks/{fetal-weight-CRz7KE2D.js → fetal-weight-DNCkyeVo.js} +2 -2
- package/dist/_chunks/field-value-NXYczdpO.js +415 -0
- package/dist/_chunks/{file-upload-5ScQd4fE.js → file-upload-DwZcAK8D.js} +2 -1
- package/dist/_chunks/{freemium-paywall-DZ2mBS3w.js → freemium-paywall-WYlNO7yT.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-BleUdhbI.js → gestational-age-calculator-CF2ISaYQ.js} +3 -3
- package/dist/_chunks/hash-CysBBS_N.js +17 -0
- package/dist/_chunks/{hcg-doubling-CnjDXX6U.js → hcg-doubling-C7bmuaU3.js} +2 -2
- package/dist/_chunks/{actions-cell-renderer-DrcaxB0w.js → link-cell-renderer-CTXqtXV-.js} +715 -592
- package/dist/_chunks/lock-CKOIn0IK.js +15 -0
- package/dist/_chunks/{marketplace-app-shell-6T9W4Knl.js → marketplace-app-shell-Skhfp6vK.js} +3 -3
- package/dist/_chunks/notes-panel-ay8_lPrA.js +158 -0
- package/dist/_chunks/{notification-card-BiESdm8q.js → notification-card-D2jiKSJJ.js} +27 -23
- package/dist/_chunks/{notification-tray-Btb9oQeZ.js → notification-tray-AEun6DN2.js} +2 -2
- package/dist/_chunks/{operator-hero-CP2Nhupm.js → operator-hero-CR0Rqh4-.js} +3 -3
- package/dist/_chunks/patient-details-Dlhqb5ig.js +675 -0
- package/dist/_chunks/{patient-search-CBC_ySF6.js → patient-search-Be6cLrHR.js} +2 -2
- package/dist/_chunks/patient-summary-card-WySCMwwA.js +437 -0
- package/dist/_chunks/patient-table-CHxf3Oqk.js +1110 -0
- package/dist/_chunks/{payment-form-DvjwYVIT.js → payment-form-CxqIXqw7.js} +2 -2
- package/dist/_chunks/{payment-request-card-DioWKBUq.js → payment-request-card-BcZJwu9z.js} +125 -136
- package/dist/_chunks/{pdf-viewer-D6BPfW2D.js → pdf-viewer-QfebdLOd.js} +192 -214
- package/dist/_chunks/{periodontal-chart-card-BuDEMbHE.js → periodontal-chart-card-hRRJY1NN.js} +2 -2
- package/dist/_chunks/{practice-results-KrTHqZua.js → practice-results-C6qDfxos.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-DORUAOHB.js → pregnancy-dating-CRVWswD-.js} +3 -3
- package/dist/_chunks/{pregnancy-weight-gain-DVz4rr7-.js → pregnancy-weight-gain-BUNpTsH-.js} +2 -2
- package/dist/_chunks/radiograph-panel.agent-CAX-C3g3.js +558 -0
- package/dist/_chunks/{rich-text-editor-BsV7zUdg.js → rich-text-editor-DlCqPixb.js} +410 -394
- package/dist/_chunks/{sign-document-B4DeRhTe.js → sign-document-By6hMOra.js} +2 -2
- package/dist/_chunks/{stepper-accordion-Dki6r9ZE.js → stepper-accordion-DC-H-8v4.js} +38 -48
- package/dist/_chunks/tab-bar-Bv9nGNdO.js +262 -0
- package/dist/_chunks/tooth-scheme-BhQoPNBD.js +2131 -0
- package/dist/_chunks/{transaction-chip-DK84XCBU.js → transaction-chip-CscoQbxF.js} +88 -61
- package/dist/_chunks/use-clamp-overflow-DQE2kwZ9.js +20 -0
- package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +32 -0
- package/dist/_chunks/use-persistent-state-nZwZAnE9.js +24 -0
- package/dist/_chunks/{warning-stack-BsgaEbL8.js → warning-stack--sTrrBDA.js} +86 -101
- package/dist/_chunks/{workflow-map-Bdam9pGp.js → workflow-map-Dy8mLCqF.js} +3 -3
- package/dist/_chunks/zoom-out-CgVtf2Wx.js +29 -0
- package/dist/agent/index.js +5 -4
- package/dist/agent/types.d.ts +19 -2
- package/dist/agent-catalog.json +1253 -86
- package/dist/agent-i18n/en.json +108 -6
- package/dist/components/_shared/entity-card/entity-card.d.ts +6 -0
- package/dist/components/_shared/entity-card/index.d.ts +1 -1
- package/dist/components/_shared/field-value.d.ts +21 -0
- package/dist/components/_shared/field-visibility-cog.d.ts +20 -0
- package/dist/components/_shared/field-visibility.d.ts +36 -0
- package/dist/components/_shared/patient-fields.d.ts +119 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +75 -0
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anatomy-scheme/anatomy-face-paths.d.ts +15 -0
- package/dist/components/anatomy-scheme/anatomy-muscle-paths.d.ts +20 -0
- package/dist/components/anatomy-scheme/anatomy-scheme-data.d.ts +121 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.agent.d.ts +6 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.d.ts +69 -0
- package/dist/components/anatomy-scheme/index.d.ts +6 -0
- package/dist/components/anatomy-scheme/index.js +17 -0
- package/dist/components/annotation-marker/annotation-marker.d.ts +33 -0
- package/dist/components/annotation-marker/index.d.ts +3 -0
- package/dist/components/annotation-marker/index.js +7 -0
- package/dist/components/appointment-card/appointment-card.d.ts +25 -1
- package/dist/components/appointment-card/index.js +6 -5
- package/dist/components/appointment-timeline/appointment-timeline.agent.d.ts +4 -0
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +66 -0
- package/dist/components/appointment-timeline/index.d.ts +4 -0
- package/dist/components/appointment-timeline/index.js +6 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/badge.d.ts +6 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/care-plan-header.agent.d.ts +4 -0
- package/dist/components/care-plan-header/care-plan-header.d.ts +100 -0
- package/dist/components/care-plan-header/index.d.ts +4 -0
- package/dist/components/care-plan-header/index.js +6 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +21 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-context.d.ts +53 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts +35 -0
- package/dist/components/control-room-rail/index.d.ts +5 -0
- package/dist/components/control-room-rail/index.js +9 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +18 -0
- package/dist/components/data-table/index.d.ts +1 -1
- package/dist/components/data-table/index.js +32 -31
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/entity-summary/entity-summary.d.ts +43 -0
- package/dist/components/entity-summary/index.d.ts +3 -0
- package/dist/components/entity-summary/index.js +5 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/notes-panel/index.d.ts +3 -0
- package/dist/components/notes-panel/index.js +5 -0
- package/dist/components/notes-panel/notes-panel.d.ts +64 -0
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-details/index.d.ts +5 -0
- package/dist/components/patient-details/index.js +6 -0
- package/dist/components/patient-details/patient-details.agent.d.ts +4 -0
- package/dist/components/patient-details/patient-details.d.ts +96 -0
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +40 -1
- package/dist/components/patient-table/columns.d.ts +69 -40
- package/dist/components/patient-table/index.d.ts +2 -6
- package/dist/components/patient-table/index.js +8 -9
- package/dist/components/patient-table/patient-table.d.ts +38 -4
- package/dist/components/patient-table/types.d.ts +52 -2
- package/dist/components/patient-table/use-responsive-columns.d.ts +8 -6
- package/dist/components/payment-card/index.js +1 -1
- 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.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/radiograph-panel/index.d.ts +4 -0
- package/dist/components/radiograph-panel/index.js +7 -0
- package/dist/components/radiograph-panel/radiograph-panel.agent.d.ts +13 -0
- package/dist/components/radiograph-panel/radiograph-panel.d.ts +36 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +18 -1
- package/dist/components/tooth-scheme/index.d.ts +2 -2
- package/dist/components/tooth-scheme/index.js +30 -23
- package/dist/components/tooth-scheme/tooth-data.d.ts +112 -1
- package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +75 -11
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +2 -2
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/warning-stack/warning-stack.d.ts +10 -7
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +24 -22
- package/dist/hooks/use-clamp-overflow.d.ts +19 -0
- package/dist/hooks/use-overflow-collapse.d.ts +46 -0
- package/dist/hooks/use-persistent-state.d.ts +7 -1
- package/dist/hooks/use-scroll-overflow.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts +308 -24
- package/dist/i18n/locales/ar.js +322 -27
- package/dist/i18n/locales/de.d.ts +308 -24
- package/dist/i18n/locales/de.js +322 -27
- package/dist/i18n/locales/el.d.ts +308 -24
- package/dist/i18n/locales/el.js +322 -27
- package/dist/i18n/locales/en.d.ts +309 -32
- package/dist/i18n/locales/en.js +323 -35
- package/dist/i18n/locales/es.d.ts +308 -24
- package/dist/i18n/locales/es.js +322 -27
- package/dist/i18n/locales/fr.d.ts +308 -24
- package/dist/i18n/locales/fr.js +322 -27
- package/dist/i18n/locales/hi.d.ts +308 -24
- package/dist/i18n/locales/hi.js +322 -27
- package/dist/i18n/locales/it.d.ts +308 -24
- package/dist/i18n/locales/it.js +322 -27
- package/dist/i18n/locales/ja.d.ts +308 -24
- package/dist/i18n/locales/ja.js +322 -27
- package/dist/i18n/locales/nl.d.ts +308 -24
- package/dist/i18n/locales/nl.js +322 -27
- package/dist/i18n/locales/pl.d.ts +308 -24
- package/dist/i18n/locales/pl.js +322 -27
- package/dist/i18n/locales/pt.d.ts +308 -24
- package/dist/i18n/locales/pt.js +322 -27
- package/dist/i18n/locales/ro.d.ts +308 -24
- package/dist/i18n/locales/ro.js +322 -27
- package/dist/i18n/locales/ru.d.ts +308 -24
- package/dist/i18n/locales/ru.js +322 -27
- package/dist/i18n/locales/sq.d.ts +308 -24
- package/dist/i18n/locales/sq.js +322 -27
- package/dist/i18n/locales/sv.d.ts +308 -24
- package/dist/i18n/locales/sv.js +322 -27
- package/dist/i18n/locales/tr.d.ts +308 -24
- package/dist/i18n/locales/tr.js +322 -27
- package/dist/i18n/locales/zh.d.ts +308 -24
- package/dist/i18n/locales/zh.js +322 -27
- package/dist/index.js +672 -623
- package/dist/locales/ar.json +311 -27
- package/dist/locales/de.json +311 -27
- package/dist/locales/el.json +311 -27
- package/dist/locales/en.json +311 -27
- package/dist/locales/es.json +311 -27
- package/dist/locales/fr.json +311 -27
- package/dist/locales/hi.json +311 -27
- package/dist/locales/it.json +311 -27
- package/dist/locales/ja.json +311 -27
- package/dist/locales/nl.json +311 -27
- package/dist/locales/pl.json +311 -27
- package/dist/locales/pt.json +311 -27
- package/dist/locales/ro.json +311 -27
- package/dist/locales/ru.json +311 -27
- package/dist/locales/sq.json +311 -27
- package/dist/locales/sv.json +311 -27
- package/dist/locales/tr.json +311 -27
- package/dist/locales/zh.json +311 -27
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +37 -1
- package/dist/_chunks/ai-tools-rail-BA_sqy1A.js +0 -373
- package/dist/_chunks/appointment-tray-CZtvtaH-.js +0 -431
- package/dist/_chunks/clinical-note-card-DqQYf_D4.js +0 -333
- package/dist/_chunks/editable-currency-cell-renderer-kgqp_mIw.js +0 -448
- package/dist/_chunks/email-input-B_Y55f5G.js +0 -396
- package/dist/_chunks/patient-summary-card-B836_fDB.js +0 -435
- package/dist/_chunks/patient-table-CDuosVru.js +0 -889
- package/dist/_chunks/tab-bar-B1ovILzh.js +0 -105
- package/dist/_chunks/tooth-scheme-yBr53cvv.js +0 -1330
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +0 -24
- package/dist/components/patient-table/cell-renderers/contact-cell.d.ts +0 -45
- package/dist/components/patient-table/cell-renderers/patient-identity-cell.d.ts +0 -26
|
@@ -0,0 +1,2131 @@
|
|
|
1
|
+
import { jsxs as k, jsx as d, Fragment as Sn } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as $n, useState as Z, useRef as qe, useEffect as xe, useMemo as Se, useCallback as O, useImperativeHandle as In } from "react";
|
|
3
|
+
import * as K from "@radix-ui/react-tooltip";
|
|
4
|
+
import { c as ne } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { useTranslation as Qt } from "react-i18next";
|
|
6
|
+
import { u as kn } from "./registry-DvAUVLHh.js";
|
|
7
|
+
import { I as Tn } from "./icon-button-LqoiKcUN.js";
|
|
8
|
+
import { P as Je } from "./popover-B2qCDhJC.js";
|
|
9
|
+
import { S as An } from "./select-DMLG44F5.js";
|
|
10
|
+
import { S as et } from "./switch-OILsBLWo.js";
|
|
11
|
+
import { S as Ln } from "./settings-ca2Yi9R8.js";
|
|
12
|
+
const ee = {
|
|
13
|
+
type: "string",
|
|
14
|
+
description: "FDI tooth id ('11'–'48' permanent, '51'–'85' primary) or a special-element id ('Q1'–'Q4' quadrants, 'S1'–'S6' sextants, 'AS'/'AI' arches, 'general'; primary mirrors with an 'm' prefix)."
|
|
15
|
+
}, je = {
|
|
16
|
+
enum: [
|
|
17
|
+
"caries",
|
|
18
|
+
"filled",
|
|
19
|
+
"crowned",
|
|
20
|
+
"temporaryCrown",
|
|
21
|
+
"bridge",
|
|
22
|
+
"missing",
|
|
23
|
+
"implant",
|
|
24
|
+
"implantExtraction",
|
|
25
|
+
"stub",
|
|
26
|
+
"destroyed",
|
|
27
|
+
"rootCanal"
|
|
28
|
+
]
|
|
29
|
+
}, Cn = {
|
|
30
|
+
enum: ["mesial", "distal", "occlusal", "buccal", "lingual"]
|
|
31
|
+
}, Rn = {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
id: { type: "string" },
|
|
35
|
+
url: { type: "string" },
|
|
36
|
+
thumbnailUrl: { type: "string" },
|
|
37
|
+
date: { type: "string", description: "ISO acquisition date (YYYY-MM-DD)." },
|
|
38
|
+
note: { type: "string" },
|
|
39
|
+
kind: { enum: ["periapical", "bitewing", "panoramic", "other"] },
|
|
40
|
+
alt: { type: "string" }
|
|
41
|
+
},
|
|
42
|
+
required: ["id", "url"]
|
|
43
|
+
}, En = {
|
|
44
|
+
id: "tooth-scheme",
|
|
45
|
+
// pick — focus/select a tooth (`focus_tooth`, transient, not persisted);
|
|
46
|
+
// set_value / edit_inline — `set_finding` records a finding and marks the
|
|
47
|
+
// affected surfaces (set-surface), `remove_finding` clears one;
|
|
48
|
+
// view_change — the side/plan projection + dentition are view props.
|
|
49
|
+
capabilities: ["pick", "set_value", "edit_inline", "view_change"],
|
|
50
|
+
state: {
|
|
51
|
+
chart: {
|
|
52
|
+
type: "object",
|
|
53
|
+
descriptionKey: "ui.agent.toothScheme.state.chart",
|
|
54
|
+
description: "Current dental chart — findings (and marked surfaces) keyed by FDI id, or by a special-element id (quadrant / sextant / arch / general) for region-spanning findings.",
|
|
55
|
+
read: (t) => t.getChart()
|
|
56
|
+
},
|
|
57
|
+
chartedTeeth: {
|
|
58
|
+
type: "string[]",
|
|
59
|
+
descriptionKey: "ui.agent.toothScheme.state.chartedTeeth",
|
|
60
|
+
description: "Ids carrying at least one finding — FDI tooth ids and/or special-element ids (quadrant / sextant / arch / general).",
|
|
61
|
+
read: (t) => Object.keys(t.getChart())
|
|
62
|
+
},
|
|
63
|
+
radiographs: {
|
|
64
|
+
// A9: the always-on state snapshot carries identifiers + enums only —
|
|
65
|
+
// never PHI free-text (the radiograph `note`), service dates, or the
|
|
66
|
+
// consumer-hosted image URLs. Those are fetched deliberately, per tooth,
|
|
67
|
+
// via the audited `get_radiographs` action.
|
|
68
|
+
type: "Record<string, { id: string; kind?: string }[]>",
|
|
69
|
+
descriptionKey: "ui.agent.toothScheme.state.radiographs",
|
|
70
|
+
description: "Structural references (id + kind) to the radiographs on each tooth, keyed by FDI id. Notes, dates and image URLs are not exposed here — fetch them on demand via get_radiographs.",
|
|
71
|
+
read: (t) => Object.fromEntries(
|
|
72
|
+
t.teethWithRadiographs().map((n) => [
|
|
73
|
+
n,
|
|
74
|
+
t.getRadiographs(n).map((i) => ({ id: i.id, kind: i.kind ?? "periapical" }))
|
|
75
|
+
])
|
|
76
|
+
)
|
|
77
|
+
},
|
|
78
|
+
teethWithRadiographs: {
|
|
79
|
+
type: "string[]",
|
|
80
|
+
descriptionKey: "ui.agent.toothScheme.state.teethWithRadiographs",
|
|
81
|
+
description: "FDI ids of every tooth carrying at least one radiograph.",
|
|
82
|
+
read: (t) => t.teethWithRadiographs()
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
actions: {
|
|
86
|
+
focus_tooth: {
|
|
87
|
+
safety: "read",
|
|
88
|
+
argsType: "{ id: FdiId }",
|
|
89
|
+
argsSchema: {
|
|
90
|
+
type: "object",
|
|
91
|
+
properties: { id: ee },
|
|
92
|
+
required: ["id"]
|
|
93
|
+
},
|
|
94
|
+
idempotent: !0,
|
|
95
|
+
descriptionKey: "ui.agent.toothScheme.actions.focusTooth",
|
|
96
|
+
description: "Move focus to a specific tooth by FDI id.",
|
|
97
|
+
invoke: (t, n) => {
|
|
98
|
+
t.focusTooth(n.id);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
get_tooth: {
|
|
102
|
+
safety: "read",
|
|
103
|
+
argsType: "{ id: FdiId }",
|
|
104
|
+
argsSchema: {
|
|
105
|
+
type: "object",
|
|
106
|
+
properties: { id: ee },
|
|
107
|
+
required: ["id"]
|
|
108
|
+
},
|
|
109
|
+
returns: "ToothCondition[]",
|
|
110
|
+
returnsSchema: { type: "array", items: je },
|
|
111
|
+
idempotent: !0,
|
|
112
|
+
descriptionKey: "ui.agent.toothScheme.actions.getTooth",
|
|
113
|
+
description: "Read the findings recorded on one tooth (FDI id).",
|
|
114
|
+
invoke: (t, n) => t.getTooth(n.id)
|
|
115
|
+
},
|
|
116
|
+
teeth_with: {
|
|
117
|
+
safety: "read",
|
|
118
|
+
argsType: "{ condition: ToothCondition }",
|
|
119
|
+
argsSchema: {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: { condition: je },
|
|
122
|
+
required: ["condition"]
|
|
123
|
+
},
|
|
124
|
+
returns: "FdiId[]",
|
|
125
|
+
returnsSchema: { type: "array", items: ee },
|
|
126
|
+
idempotent: !0,
|
|
127
|
+
descriptionKey: "ui.agent.toothScheme.actions.teethWith",
|
|
128
|
+
description: "List the ids carrying a given finding — FDI tooth ids and/or special-element ids (e.g. all teeth with caries).",
|
|
129
|
+
invoke: (t, n) => t.teethWith(n.condition)
|
|
130
|
+
},
|
|
131
|
+
get_radiographs: {
|
|
132
|
+
safety: "read",
|
|
133
|
+
argsType: "{ id: FdiId }",
|
|
134
|
+
argsSchema: {
|
|
135
|
+
type: "object",
|
|
136
|
+
properties: { id: ee },
|
|
137
|
+
required: ["id"]
|
|
138
|
+
},
|
|
139
|
+
returns: "Radiograph[]",
|
|
140
|
+
returnsSchema: { type: "array", items: Rn },
|
|
141
|
+
idempotent: !0,
|
|
142
|
+
descriptionKey: "ui.agent.toothScheme.actions.getRadiographs",
|
|
143
|
+
description: "Read the radiographs (x-rays) attached to one tooth.",
|
|
144
|
+
invoke: (t, n) => t.getRadiographs(n.id)
|
|
145
|
+
},
|
|
146
|
+
open_radiographs: {
|
|
147
|
+
safety: "read",
|
|
148
|
+
argsType: "{ id: FdiId }",
|
|
149
|
+
argsSchema: {
|
|
150
|
+
type: "object",
|
|
151
|
+
properties: { id: ee },
|
|
152
|
+
required: ["id"]
|
|
153
|
+
},
|
|
154
|
+
idempotent: !0,
|
|
155
|
+
descriptionKey: "ui.agent.toothScheme.actions.openRadiographs",
|
|
156
|
+
description: "Focus a tooth and open its radiograph archive (fires the host's onOpenRadiographs).",
|
|
157
|
+
invoke: (t, n) => {
|
|
158
|
+
t.openRadiographs(n.id);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
set_finding: {
|
|
162
|
+
safety: "write",
|
|
163
|
+
argsType: "{ id: FdiId; condition: ToothCondition; surfaces?: Surface[] }",
|
|
164
|
+
argsSchema: {
|
|
165
|
+
type: "object",
|
|
166
|
+
properties: {
|
|
167
|
+
id: ee,
|
|
168
|
+
condition: je,
|
|
169
|
+
surfaces: { type: "array", items: Cn }
|
|
170
|
+
},
|
|
171
|
+
required: ["id", "condition"]
|
|
172
|
+
},
|
|
173
|
+
idempotent: !0,
|
|
174
|
+
descriptionKey: "ui.agent.toothScheme.actions.setFinding",
|
|
175
|
+
description: "Record a finding on a tooth or region element (crown, implant, root canal, caries, …). Optionally mark the affected surfaces for a surface finding.",
|
|
176
|
+
invoke: (t, n) => {
|
|
177
|
+
t.setFinding(n.id, n.condition, n.surfaces);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
remove_finding: {
|
|
181
|
+
safety: "write",
|
|
182
|
+
argsType: "{ id: FdiId; condition: ToothCondition }",
|
|
183
|
+
argsSchema: {
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: { id: ee, condition: je },
|
|
186
|
+
required: ["id", "condition"]
|
|
187
|
+
},
|
|
188
|
+
idempotent: !0,
|
|
189
|
+
descriptionKey: "ui.agent.toothScheme.actions.removeFinding",
|
|
190
|
+
description: "Remove a single finding from a tooth.",
|
|
191
|
+
invoke: (t, n) => {
|
|
192
|
+
t.removeFinding(n.id, n.condition);
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
clear_tooth: {
|
|
196
|
+
safety: "destructive",
|
|
197
|
+
argsType: "{ id: FdiId }",
|
|
198
|
+
argsSchema: {
|
|
199
|
+
type: "object",
|
|
200
|
+
properties: { id: ee },
|
|
201
|
+
required: ["id"]
|
|
202
|
+
},
|
|
203
|
+
idempotent: !0,
|
|
204
|
+
descriptionKey: "ui.agent.toothScheme.actions.clearTooth",
|
|
205
|
+
description: "Clear every finding from a tooth.",
|
|
206
|
+
invoke: (t, n) => {
|
|
207
|
+
t.clearTooth(n.id);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
domHooks: {
|
|
212
|
+
root: { attr: "data-component", value: "tooth-scheme" },
|
|
213
|
+
instanceId: {
|
|
214
|
+
attr: "data-component-id",
|
|
215
|
+
sourceProp: "id",
|
|
216
|
+
description: "Sourced from the id prop."
|
|
217
|
+
},
|
|
218
|
+
item: {
|
|
219
|
+
attr: "data-fdi",
|
|
220
|
+
description: "Each rendered tooth `<g>` carries its FDI id as `data-fdi`; selectable special-element slots carry their id there too (plus `data-special` naming the kind). The `data-projection` / `data-view-mode` attributes on the root expose the side/plan/both view."
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}, Te = [
|
|
224
|
+
// upper
|
|
225
|
+
"18",
|
|
226
|
+
"17",
|
|
227
|
+
"16",
|
|
228
|
+
"15",
|
|
229
|
+
"14",
|
|
230
|
+
"13",
|
|
231
|
+
"12",
|
|
232
|
+
"11",
|
|
233
|
+
"21",
|
|
234
|
+
"22",
|
|
235
|
+
"23",
|
|
236
|
+
"24",
|
|
237
|
+
"25",
|
|
238
|
+
"26",
|
|
239
|
+
"27",
|
|
240
|
+
"28",
|
|
241
|
+
// lower
|
|
242
|
+
"48",
|
|
243
|
+
"47",
|
|
244
|
+
"46",
|
|
245
|
+
"45",
|
|
246
|
+
"44",
|
|
247
|
+
"43",
|
|
248
|
+
"42",
|
|
249
|
+
"41",
|
|
250
|
+
"31",
|
|
251
|
+
"32",
|
|
252
|
+
"33",
|
|
253
|
+
"34",
|
|
254
|
+
"35",
|
|
255
|
+
"36",
|
|
256
|
+
"37",
|
|
257
|
+
"38"
|
|
258
|
+
], Ae = [
|
|
259
|
+
// upper
|
|
260
|
+
"55",
|
|
261
|
+
"54",
|
|
262
|
+
"53",
|
|
263
|
+
"52",
|
|
264
|
+
"51",
|
|
265
|
+
"61",
|
|
266
|
+
"62",
|
|
267
|
+
"63",
|
|
268
|
+
"64",
|
|
269
|
+
"65",
|
|
270
|
+
// lower
|
|
271
|
+
"85",
|
|
272
|
+
"84",
|
|
273
|
+
"83",
|
|
274
|
+
"82",
|
|
275
|
+
"81",
|
|
276
|
+
"71",
|
|
277
|
+
"72",
|
|
278
|
+
"73",
|
|
279
|
+
"74",
|
|
280
|
+
"75"
|
|
281
|
+
];
|
|
282
|
+
function Mn(t) {
|
|
283
|
+
return t <= 2 ? "incisor" : t === 3 ? "canine" : t <= 5 ? "premolar" : "molar";
|
|
284
|
+
}
|
|
285
|
+
function Dn(t) {
|
|
286
|
+
return t <= 2 ? "incisor" : t === 3 ? "canine" : "molar";
|
|
287
|
+
}
|
|
288
|
+
function Nn(t, n) {
|
|
289
|
+
const i = (t - 1) % 4 + 1;
|
|
290
|
+
return `${i === 1 ? "UR" : i === 2 ? "UL" : i === 3 ? "LL" : "LR"}${n}`;
|
|
291
|
+
}
|
|
292
|
+
function _n(t, n) {
|
|
293
|
+
switch (t) {
|
|
294
|
+
case 1:
|
|
295
|
+
return String(1 + (8 - n));
|
|
296
|
+
case 2:
|
|
297
|
+
return String(8 + n);
|
|
298
|
+
case 3:
|
|
299
|
+
return String(17 + (8 - n));
|
|
300
|
+
case 4:
|
|
301
|
+
return String(24 + n);
|
|
302
|
+
default:
|
|
303
|
+
return "";
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function On(t, n) {
|
|
307
|
+
const i = "ABCDEFGHIJKLMNOPQRST";
|
|
308
|
+
let o = -1;
|
|
309
|
+
switch (t) {
|
|
310
|
+
case 5:
|
|
311
|
+
o = 0 + (5 - n);
|
|
312
|
+
break;
|
|
313
|
+
case 6:
|
|
314
|
+
o = 5 + (n - 1);
|
|
315
|
+
break;
|
|
316
|
+
case 7:
|
|
317
|
+
o = 10 + (5 - n);
|
|
318
|
+
break;
|
|
319
|
+
case 8:
|
|
320
|
+
o = 15 + (n - 1);
|
|
321
|
+
break;
|
|
322
|
+
default:
|
|
323
|
+
o = -1;
|
|
324
|
+
}
|
|
325
|
+
return o >= 0 ? i[o] : "";
|
|
326
|
+
}
|
|
327
|
+
function qn(t) {
|
|
328
|
+
const n = Number(t[0]), i = Number(t[1]), o = n >= 5, l = o ? Dn(i) : Mn(i), v = n === 1 || n === 2 || n === 5 || n === 6 ? "upper" : "lower", m = n === 1 || n === 4 || n === 5 || n === 8 ? "right" : "left", S = o ? On(n, i) : _n(n, i), w = Nn(n, i);
|
|
329
|
+
return {
|
|
330
|
+
fdi: t,
|
|
331
|
+
universal: S,
|
|
332
|
+
palmer: w,
|
|
333
|
+
quadrant: n,
|
|
334
|
+
positionInQuadrant: i,
|
|
335
|
+
anatomy: l,
|
|
336
|
+
arch: v,
|
|
337
|
+
side: m,
|
|
338
|
+
dentition: o ? "primary" : "permanent"
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
const Q = [
|
|
342
|
+
...Te,
|
|
343
|
+
...Ae
|
|
344
|
+
].reduce((t, n) => (t[n] = qn(n), t), {}), jn = Object.fromEntries(
|
|
345
|
+
Object.entries(Q).map(([t, n]) => [t, n.universal])
|
|
346
|
+
), Kn = Object.fromEntries(
|
|
347
|
+
Object.entries(Q).map(([t, n]) => [t, n.palmer])
|
|
348
|
+
);
|
|
349
|
+
function at(t) {
|
|
350
|
+
return t.dentition !== "primary" ? t.fdi : `${t.quadrant - 4}${t.positionInQuadrant}`;
|
|
351
|
+
}
|
|
352
|
+
const Fn = 0.72, yr = {
|
|
353
|
+
caries: "--destructive",
|
|
354
|
+
filled: "--info",
|
|
355
|
+
crowned: "--warning",
|
|
356
|
+
temporaryCrown: "--warning",
|
|
357
|
+
bridge: "--primary",
|
|
358
|
+
missing: "--muted-foreground",
|
|
359
|
+
implant: "--accent",
|
|
360
|
+
implantExtraction: "--accent",
|
|
361
|
+
stub: "--muted-foreground",
|
|
362
|
+
destroyed: "--destructive",
|
|
363
|
+
rootCanal: "--primary"
|
|
364
|
+
}, Ie = {
|
|
365
|
+
caries: "var(--destructive)",
|
|
366
|
+
filled: "var(--info)",
|
|
367
|
+
crowned: "var(--warning)",
|
|
368
|
+
temporaryCrown: "var(--warning)",
|
|
369
|
+
bridge: "var(--primary)",
|
|
370
|
+
missing: "var(--muted-foreground)",
|
|
371
|
+
implant: "var(--accent)",
|
|
372
|
+
implantExtraction: "var(--accent)",
|
|
373
|
+
stub: "var(--muted-foreground)",
|
|
374
|
+
destroyed: "var(--destructive)",
|
|
375
|
+
rootCanal: "var(--primary)"
|
|
376
|
+
}, ot = {
|
|
377
|
+
crowned: { folder: "crown", resolve: "per-fdi" },
|
|
378
|
+
temporaryCrown: { folder: "temporaryCrown", resolve: "per-fdi" },
|
|
379
|
+
bridge: { folder: "replacement", resolve: "per-fdi" },
|
|
380
|
+
destroyed: { folder: "destroyed", resolve: "per-fdi" },
|
|
381
|
+
implant: { folder: "implant", resolve: "general" },
|
|
382
|
+
implantExtraction: { folder: "implantExtraction", resolve: "general" },
|
|
383
|
+
stub: { folder: "stub", resolve: "general" },
|
|
384
|
+
rootCanal: { folder: "rootTreatment", resolve: "rct" }
|
|
385
|
+
};
|
|
386
|
+
function Ut(t, n, i) {
|
|
387
|
+
const o = t.arch === "upper" ? "top" : "bottom", l = `${n}/side/${i.folder}/${o}`;
|
|
388
|
+
if (i.resolve === "general") return `${l}/general.webp`;
|
|
389
|
+
const v = at(t);
|
|
390
|
+
return i.resolve === "rct" ? `${l}/${v}/full.webp` : `${l}/${v}.webp`;
|
|
391
|
+
}
|
|
392
|
+
const Wn = {
|
|
393
|
+
mesial: "mesial",
|
|
394
|
+
distal: "distal",
|
|
395
|
+
occlusal: "occlusal",
|
|
396
|
+
buccal: "vestibular",
|
|
397
|
+
lingual: "oral"
|
|
398
|
+
}, Pn = {
|
|
399
|
+
caries: "caries",
|
|
400
|
+
filled: "filling"
|
|
401
|
+
};
|
|
402
|
+
function Hn(t, n, i, o) {
|
|
403
|
+
const l = t.arch === "upper" ? "top" : "bottom";
|
|
404
|
+
return `${n}/plan/${i}/${l}/${at(t)}-${Wn[o]}.webp`;
|
|
405
|
+
}
|
|
406
|
+
function tt(t) {
|
|
407
|
+
return t.anatomy === "molar" || t.anatomy === "premolar" ? ["top", "bottom", "left", "right", "center"] : ["top", "bottom", "left", "right"];
|
|
408
|
+
}
|
|
409
|
+
function Ot(t, n) {
|
|
410
|
+
if (n === "center") return "occlusal";
|
|
411
|
+
if (n === "top") return t.arch === "upper" ? "buccal" : "lingual";
|
|
412
|
+
if (n === "bottom") return t.arch === "upper" ? "lingual" : "buccal";
|
|
413
|
+
const i = t.quadrant <= 4 ? t.quadrant : t.quadrant - 4, o = i === 1 || i === 4;
|
|
414
|
+
return n === "left" ? o ? "distal" : "mesial" : o ? "mesial" : "distal";
|
|
415
|
+
}
|
|
416
|
+
const qt = (t) => Math.round(t * 100) / 100;
|
|
417
|
+
function Qn(t, n, i) {
|
|
418
|
+
const { x: o, y: l, w: v, h: m } = n, S = o + v, w = l + m, a = (p, A) => `${qt(p)} ${qt(A)}`;
|
|
419
|
+
if (!i) {
|
|
420
|
+
const p = o + v / 2, A = l + m / 2;
|
|
421
|
+
switch (t) {
|
|
422
|
+
case "top":
|
|
423
|
+
return `M ${a(o, l)} L ${a(S, l)} L ${a(p, A)} Z`;
|
|
424
|
+
case "bottom":
|
|
425
|
+
return `M ${a(o, w)} L ${a(S, w)} L ${a(p, A)} Z`;
|
|
426
|
+
case "left":
|
|
427
|
+
return `M ${a(o, l)} L ${a(p, A)} L ${a(o, w)} Z`;
|
|
428
|
+
case "right":
|
|
429
|
+
return `M ${a(S, l)} L ${a(p, A)} L ${a(S, w)} Z`;
|
|
430
|
+
default:
|
|
431
|
+
return "";
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
const M = o + v * 0.3, $ = l + m * 0.3, F = o + v * 0.7, R = l + m * 0.7;
|
|
435
|
+
switch (t) {
|
|
436
|
+
case "center":
|
|
437
|
+
return `M ${a(M, $)} L ${a(F, $)} L ${a(F, R)} L ${a(M, R)} Z`;
|
|
438
|
+
case "top":
|
|
439
|
+
return `M ${a(o, l)} L ${a(S, l)} L ${a(F, $)} L ${a(M, $)} Z`;
|
|
440
|
+
case "bottom":
|
|
441
|
+
return `M ${a(o, w)} L ${a(S, w)} L ${a(F, R)} L ${a(M, R)} Z`;
|
|
442
|
+
case "left":
|
|
443
|
+
return `M ${a(o, l)} L ${a(M, $)} L ${a(M, R)} L ${a(o, w)} Z`;
|
|
444
|
+
case "right":
|
|
445
|
+
return `M ${a(S, l)} L ${a(F, $)} L ${a(F, R)} L ${a(S, w)} Z`;
|
|
446
|
+
default:
|
|
447
|
+
return "";
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
const ke = 5, it = 40, L = 4, z = 36, Yt = 62;
|
|
451
|
+
function Zt(t, n, i = "default", o = "side") {
|
|
452
|
+
const l = t.arch === "upper" ? "top" : "bottom";
|
|
453
|
+
return `${n}/${o}/${i}/${l}/${at(t)}.webp`;
|
|
454
|
+
}
|
|
455
|
+
function Un(t, n = Yt, i = {}) {
|
|
456
|
+
const o = t === "primary" ? Ae : t === "mixed" ? [...Te, ...Ae] : Te, l = [], v = [];
|
|
457
|
+
for (const p of o)
|
|
458
|
+
Q[p].arch === "upper" ? l.push(p) : v.push(p);
|
|
459
|
+
const m = z + ke, S = Math.max(l.length, v.length), w = S > 0 ? S * m - ke : 0;
|
|
460
|
+
function a(p, A) {
|
|
461
|
+
const ie = p.length > 0 ? p.length * m - ke : 0, q = (w - ie) / 2;
|
|
462
|
+
return p.map((Le, Pe) => {
|
|
463
|
+
const G = Q[Le];
|
|
464
|
+
return {
|
|
465
|
+
fdi: Le,
|
|
466
|
+
meta: G,
|
|
467
|
+
x: q + Pe * m,
|
|
468
|
+
y: A
|
|
469
|
+
};
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
if (i.arch) {
|
|
473
|
+
const p = i.arch === "upper" ? l : v;
|
|
474
|
+
return { teeth: a(p, 0), width: w, height: n };
|
|
475
|
+
}
|
|
476
|
+
const M = a(l, 0), $ = a(v, n + it), F = w > 0 ? w : S * m, R = n * 2 + it;
|
|
477
|
+
return { teeth: [...M, ...$], width: F, height: R };
|
|
478
|
+
}
|
|
479
|
+
const C = (t) => [...Te, ...Ae].filter(
|
|
480
|
+
(n) => Q[n].quadrant === t
|
|
481
|
+
), st = [
|
|
482
|
+
// Upper facial (side) row — Q1, Q2, AS, Gen.
|
|
483
|
+
{
|
|
484
|
+
id: "Q1",
|
|
485
|
+
kind: "quadrant",
|
|
486
|
+
arch: "upper",
|
|
487
|
+
dentition: "permanent",
|
|
488
|
+
labelKey: "quadrant",
|
|
489
|
+
labelIndex: 1,
|
|
490
|
+
code: "Q1",
|
|
491
|
+
teeth: C(1),
|
|
492
|
+
column: 0,
|
|
493
|
+
row: "side"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
id: "Q2",
|
|
497
|
+
kind: "quadrant",
|
|
498
|
+
arch: "upper",
|
|
499
|
+
dentition: "permanent",
|
|
500
|
+
labelKey: "quadrant",
|
|
501
|
+
labelIndex: 2,
|
|
502
|
+
code: "Q2",
|
|
503
|
+
teeth: C(2),
|
|
504
|
+
column: 1,
|
|
505
|
+
row: "side"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
id: "AS",
|
|
509
|
+
kind: "arch",
|
|
510
|
+
arch: "upper",
|
|
511
|
+
dentition: "permanent",
|
|
512
|
+
labelKey: "archUpper",
|
|
513
|
+
code: "AS",
|
|
514
|
+
teeth: [...C(1), ...C(2)],
|
|
515
|
+
column: 2,
|
|
516
|
+
row: "side"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
id: "general",
|
|
520
|
+
kind: "general",
|
|
521
|
+
arch: "upper",
|
|
522
|
+
dentition: "permanent",
|
|
523
|
+
labelKey: "general",
|
|
524
|
+
code: "Gen.",
|
|
525
|
+
teeth: Te,
|
|
526
|
+
column: 3,
|
|
527
|
+
row: "side"
|
|
528
|
+
},
|
|
529
|
+
// Upper occlusal (plan) row — S1, S2, S3 (WHO sextants).
|
|
530
|
+
{
|
|
531
|
+
id: "S1",
|
|
532
|
+
kind: "sextant",
|
|
533
|
+
arch: "upper",
|
|
534
|
+
dentition: "permanent",
|
|
535
|
+
labelKey: "sextant",
|
|
536
|
+
labelIndex: 1,
|
|
537
|
+
code: "S1",
|
|
538
|
+
teeth: ["18", "17", "16", "15", "14"],
|
|
539
|
+
column: 0,
|
|
540
|
+
row: "plan"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
id: "S2",
|
|
544
|
+
kind: "sextant",
|
|
545
|
+
arch: "upper",
|
|
546
|
+
dentition: "permanent",
|
|
547
|
+
labelKey: "sextant",
|
|
548
|
+
labelIndex: 2,
|
|
549
|
+
code: "S2",
|
|
550
|
+
teeth: ["13", "12", "11", "21", "22", "23"],
|
|
551
|
+
column: 1,
|
|
552
|
+
row: "plan"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
id: "S3",
|
|
556
|
+
kind: "sextant",
|
|
557
|
+
arch: "upper",
|
|
558
|
+
dentition: "permanent",
|
|
559
|
+
labelKey: "sextant",
|
|
560
|
+
labelIndex: 3,
|
|
561
|
+
code: "S3",
|
|
562
|
+
teeth: ["24", "25", "26", "27", "28"],
|
|
563
|
+
column: 2,
|
|
564
|
+
row: "plan"
|
|
565
|
+
},
|
|
566
|
+
// Lower occlusal (plan) row — S4, S5, S6.
|
|
567
|
+
{
|
|
568
|
+
id: "S4",
|
|
569
|
+
kind: "sextant",
|
|
570
|
+
arch: "lower",
|
|
571
|
+
dentition: "permanent",
|
|
572
|
+
labelKey: "sextant",
|
|
573
|
+
labelIndex: 4,
|
|
574
|
+
code: "S4",
|
|
575
|
+
teeth: ["34", "35", "36", "37", "38"],
|
|
576
|
+
column: 0,
|
|
577
|
+
row: "plan"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
id: "S5",
|
|
581
|
+
kind: "sextant",
|
|
582
|
+
arch: "lower",
|
|
583
|
+
dentition: "permanent",
|
|
584
|
+
labelKey: "sextant",
|
|
585
|
+
labelIndex: 5,
|
|
586
|
+
code: "S5",
|
|
587
|
+
teeth: ["43", "42", "41", "31", "32", "33"],
|
|
588
|
+
column: 1,
|
|
589
|
+
row: "plan"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
id: "S6",
|
|
593
|
+
kind: "sextant",
|
|
594
|
+
arch: "lower",
|
|
595
|
+
dentition: "permanent",
|
|
596
|
+
labelKey: "sextant",
|
|
597
|
+
labelIndex: 6,
|
|
598
|
+
code: "S6",
|
|
599
|
+
teeth: ["44", "45", "46", "47", "48"],
|
|
600
|
+
column: 2,
|
|
601
|
+
row: "plan"
|
|
602
|
+
},
|
|
603
|
+
// Lower facial (side) row — Q4, Q3, AI.
|
|
604
|
+
{
|
|
605
|
+
id: "Q4",
|
|
606
|
+
kind: "quadrant",
|
|
607
|
+
arch: "lower",
|
|
608
|
+
dentition: "permanent",
|
|
609
|
+
labelKey: "quadrant",
|
|
610
|
+
labelIndex: 4,
|
|
611
|
+
code: "Q4",
|
|
612
|
+
teeth: C(4),
|
|
613
|
+
column: 0,
|
|
614
|
+
row: "side"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
id: "Q3",
|
|
618
|
+
kind: "quadrant",
|
|
619
|
+
arch: "lower",
|
|
620
|
+
dentition: "permanent",
|
|
621
|
+
labelKey: "quadrant",
|
|
622
|
+
labelIndex: 3,
|
|
623
|
+
code: "Q3",
|
|
624
|
+
teeth: C(3),
|
|
625
|
+
column: 1,
|
|
626
|
+
row: "side"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
id: "AI",
|
|
630
|
+
kind: "arch",
|
|
631
|
+
arch: "lower",
|
|
632
|
+
dentition: "permanent",
|
|
633
|
+
labelKey: "archLower",
|
|
634
|
+
code: "AI",
|
|
635
|
+
teeth: [...C(3), ...C(4)],
|
|
636
|
+
column: 2,
|
|
637
|
+
row: "side"
|
|
638
|
+
}
|
|
639
|
+
], ct = [
|
|
640
|
+
// Upper facial (side) row.
|
|
641
|
+
{
|
|
642
|
+
id: "mQ1",
|
|
643
|
+
kind: "quadrant",
|
|
644
|
+
arch: "upper",
|
|
645
|
+
dentition: "primary",
|
|
646
|
+
labelKey: "quadrant",
|
|
647
|
+
labelIndex: 1,
|
|
648
|
+
code: "Q1",
|
|
649
|
+
teeth: C(5),
|
|
650
|
+
column: 0,
|
|
651
|
+
row: "side"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
id: "mQ2",
|
|
655
|
+
kind: "quadrant",
|
|
656
|
+
arch: "upper",
|
|
657
|
+
dentition: "primary",
|
|
658
|
+
labelKey: "quadrant",
|
|
659
|
+
labelIndex: 2,
|
|
660
|
+
code: "Q2",
|
|
661
|
+
teeth: C(6),
|
|
662
|
+
column: 1,
|
|
663
|
+
row: "side"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
id: "mAS",
|
|
667
|
+
kind: "arch",
|
|
668
|
+
arch: "upper",
|
|
669
|
+
dentition: "primary",
|
|
670
|
+
labelKey: "archUpper",
|
|
671
|
+
code: "AS",
|
|
672
|
+
teeth: [...C(5), ...C(6)],
|
|
673
|
+
column: 2,
|
|
674
|
+
row: "side"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
id: "mGeneral",
|
|
678
|
+
kind: "general",
|
|
679
|
+
arch: "upper",
|
|
680
|
+
dentition: "primary",
|
|
681
|
+
labelKey: "general",
|
|
682
|
+
code: "Gen.",
|
|
683
|
+
teeth: Ae,
|
|
684
|
+
column: 3,
|
|
685
|
+
row: "side"
|
|
686
|
+
},
|
|
687
|
+
// Upper occlusal (plan) row.
|
|
688
|
+
{
|
|
689
|
+
id: "mS1",
|
|
690
|
+
kind: "sextant",
|
|
691
|
+
arch: "upper",
|
|
692
|
+
dentition: "primary",
|
|
693
|
+
labelKey: "sextant",
|
|
694
|
+
labelIndex: 1,
|
|
695
|
+
code: "S1",
|
|
696
|
+
teeth: ["55", "54"],
|
|
697
|
+
column: 0,
|
|
698
|
+
row: "plan"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
id: "mS2",
|
|
702
|
+
kind: "sextant",
|
|
703
|
+
arch: "upper",
|
|
704
|
+
dentition: "primary",
|
|
705
|
+
labelKey: "sextant",
|
|
706
|
+
labelIndex: 2,
|
|
707
|
+
code: "S2",
|
|
708
|
+
teeth: ["53", "52", "51", "61", "62", "63"],
|
|
709
|
+
column: 1,
|
|
710
|
+
row: "plan"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
id: "mS3",
|
|
714
|
+
kind: "sextant",
|
|
715
|
+
arch: "upper",
|
|
716
|
+
dentition: "primary",
|
|
717
|
+
labelKey: "sextant",
|
|
718
|
+
labelIndex: 3,
|
|
719
|
+
code: "S3",
|
|
720
|
+
teeth: ["64", "65"],
|
|
721
|
+
column: 2,
|
|
722
|
+
row: "plan"
|
|
723
|
+
},
|
|
724
|
+
// Lower occlusal (plan) row.
|
|
725
|
+
{
|
|
726
|
+
id: "mS4",
|
|
727
|
+
kind: "sextant",
|
|
728
|
+
arch: "lower",
|
|
729
|
+
dentition: "primary",
|
|
730
|
+
labelKey: "sextant",
|
|
731
|
+
labelIndex: 4,
|
|
732
|
+
code: "S4",
|
|
733
|
+
teeth: ["74", "75"],
|
|
734
|
+
column: 0,
|
|
735
|
+
row: "plan"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
id: "mS5",
|
|
739
|
+
kind: "sextant",
|
|
740
|
+
arch: "lower",
|
|
741
|
+
dentition: "primary",
|
|
742
|
+
labelKey: "sextant",
|
|
743
|
+
labelIndex: 5,
|
|
744
|
+
code: "S5",
|
|
745
|
+
teeth: ["73", "72", "71", "81", "82", "83"],
|
|
746
|
+
column: 1,
|
|
747
|
+
row: "plan"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
id: "mS6",
|
|
751
|
+
kind: "sextant",
|
|
752
|
+
arch: "lower",
|
|
753
|
+
dentition: "primary",
|
|
754
|
+
labelKey: "sextant",
|
|
755
|
+
labelIndex: 6,
|
|
756
|
+
code: "S6",
|
|
757
|
+
teeth: ["84", "85"],
|
|
758
|
+
column: 2,
|
|
759
|
+
row: "plan"
|
|
760
|
+
},
|
|
761
|
+
// Lower facial (side) row.
|
|
762
|
+
{
|
|
763
|
+
id: "mQ4",
|
|
764
|
+
kind: "quadrant",
|
|
765
|
+
arch: "lower",
|
|
766
|
+
dentition: "primary",
|
|
767
|
+
labelKey: "quadrant",
|
|
768
|
+
labelIndex: 4,
|
|
769
|
+
code: "Q4",
|
|
770
|
+
teeth: C(8),
|
|
771
|
+
column: 0,
|
|
772
|
+
row: "side"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
id: "mQ3",
|
|
776
|
+
kind: "quadrant",
|
|
777
|
+
arch: "lower",
|
|
778
|
+
dentition: "primary",
|
|
779
|
+
labelKey: "quadrant",
|
|
780
|
+
labelIndex: 3,
|
|
781
|
+
code: "Q3",
|
|
782
|
+
teeth: C(7),
|
|
783
|
+
column: 1,
|
|
784
|
+
row: "side"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
id: "mAI",
|
|
788
|
+
kind: "arch",
|
|
789
|
+
arch: "lower",
|
|
790
|
+
dentition: "primary",
|
|
791
|
+
labelKey: "archLower",
|
|
792
|
+
code: "AI",
|
|
793
|
+
teeth: [...C(7), ...C(8)],
|
|
794
|
+
column: 2,
|
|
795
|
+
row: "side"
|
|
796
|
+
}
|
|
797
|
+
], Yn = [
|
|
798
|
+
...st,
|
|
799
|
+
...ct
|
|
800
|
+
], zt = Yn.reduce((t, n) => (t[n.id] = n, t), {});
|
|
801
|
+
function Zn(t) {
|
|
802
|
+
return t in zt;
|
|
803
|
+
}
|
|
804
|
+
function Ke(t, n, i) {
|
|
805
|
+
return (t === "primary" ? ct : st).filter(
|
|
806
|
+
(l) => l.arch === n && l.row === i && l.kind !== "general"
|
|
807
|
+
).sort((l, v) => l.column - v.column);
|
|
808
|
+
}
|
|
809
|
+
function wr(t) {
|
|
810
|
+
return (t === "primary" ? ct : st).find((i) => i.kind === "general");
|
|
811
|
+
}
|
|
812
|
+
const te = 36;
|
|
813
|
+
function zn(t, n) {
|
|
814
|
+
const i = t.kind === "quadrant" || t.kind === "arch" ? t.code : t.kind === "general" ? "general" : null;
|
|
815
|
+
return i ? `${/\/teeth\/?$/.test(n) ? n.replace(/\/teeth\/?$/, "/global") : `${n}/global`}/${i}.webp` : null;
|
|
816
|
+
}
|
|
817
|
+
const Gn = 8, jt = te + ke;
|
|
818
|
+
function Fe(t, n) {
|
|
819
|
+
if (t.length === 0) return { specials: [], width: n };
|
|
820
|
+
const i = n + Gn, o = t.map((m) => ({
|
|
821
|
+
element: m,
|
|
822
|
+
x: i + m.column * jt,
|
|
823
|
+
y: 0
|
|
824
|
+
})), l = Math.max(...t.map((m) => m.column)), v = i + (l + 1) * jt - ke;
|
|
825
|
+
return { specials: o, width: v };
|
|
826
|
+
}
|
|
827
|
+
function Kt(t, n) {
|
|
828
|
+
switch (n) {
|
|
829
|
+
case "universal":
|
|
830
|
+
return jn[t] ?? t;
|
|
831
|
+
case "palmer":
|
|
832
|
+
return Kn[t] ?? t;
|
|
833
|
+
case "fdi":
|
|
834
|
+
default:
|
|
835
|
+
return t;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
function xr() {
|
|
839
|
+
return {};
|
|
840
|
+
}
|
|
841
|
+
function Ft(t) {
|
|
842
|
+
const n = {};
|
|
843
|
+
for (const [i, o] of Object.entries(t))
|
|
844
|
+
!o || o.length === 0 || (n[i] = { conditions: o, surfaces: [] });
|
|
845
|
+
return n;
|
|
846
|
+
}
|
|
847
|
+
const Vn = ne(
|
|
848
|
+
[
|
|
849
|
+
"ds:tooth-scheme-alfadocs",
|
|
850
|
+
"ds:flex ds:flex-col",
|
|
851
|
+
"ds:gap-[var(--spacing-sm)]",
|
|
852
|
+
"ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
853
|
+
// Block-level flex column so the SVG's w-full can grow to fill the frame.
|
|
854
|
+
// min-w-fit on the SVG floors it at natural size, so narrow frames scroll
|
|
855
|
+
// here rather than shrinking the per-tooth hit target below the 44px floor.
|
|
856
|
+
"ds:max-w-full ds:overflow-x-auto",
|
|
857
|
+
// When the scroll container itself is the tab stop (display mode, see
|
|
858
|
+
// scrollTabIndex) it needs a focus ring. Use an outline (not box-shadow):
|
|
859
|
+
// forced-colors / high-contrast mode zeroes box-shadow, which would leave
|
|
860
|
+
// HCM keyboard users with no visible focus. outline survives, and the
|
|
861
|
+
// CanvasText fallback repaints it in the system palette.
|
|
862
|
+
"ds:outline-none",
|
|
863
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
864
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
865
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
866
|
+
].join(" ")
|
|
867
|
+
), Bn = ne(["ds:flex ds:flex-col ds:gap-0"].join(" ")), Xn = ne(
|
|
868
|
+
[
|
|
869
|
+
"ds:block",
|
|
870
|
+
"ds:w-full ds:min-w-fit ds:h-auto",
|
|
871
|
+
"ds:text-[var(--foreground)]"
|
|
872
|
+
].join(" ")
|
|
873
|
+
), Wt = ne(
|
|
874
|
+
[
|
|
875
|
+
"ds:group ds:cursor-pointer",
|
|
876
|
+
"ds:focus:outline-none",
|
|
877
|
+
"ds:transition-[fill,stroke,opacity] ds:duration-[var(--animation-duration)]",
|
|
878
|
+
"ds:motion-reduce:transition-none"
|
|
879
|
+
].join(" ")
|
|
880
|
+
), Jn = ne(
|
|
881
|
+
[
|
|
882
|
+
"ds:flex ds:flex-wrap ds:items-center",
|
|
883
|
+
"ds:gap-[var(--spacing-sm)]",
|
|
884
|
+
"type-meta ds:text-[var(--muted-foreground)]"
|
|
885
|
+
].join(" ")
|
|
886
|
+
), er = ne(
|
|
887
|
+
["ds:inline-flex ds:items-center", "ds:gap-[var(--spacing-xs)]"].join(" ")
|
|
888
|
+
), tr = ne(["ds:sr-only"].join(" ")), nr = ne(
|
|
889
|
+
[
|
|
890
|
+
"ds:cursor-pointer ds:outline-none",
|
|
891
|
+
"ds:fill-transparent ds:stroke-transparent",
|
|
892
|
+
"ds:transition-[fill] ds:duration-[var(--animation-duration)]",
|
|
893
|
+
"ds:motion-reduce:transition-none",
|
|
894
|
+
"ds:hover:fill-[color-mix(in_srgb,var(--accent)_18%,transparent)]",
|
|
895
|
+
"ds:focus-visible:fill-[color-mix(in_srgb,var(--accent)_22%,transparent)]",
|
|
896
|
+
"ds:focus-visible:stroke-[var(--ring)]",
|
|
897
|
+
"ds:forced-colors:focus-visible:stroke-[CanvasText]"
|
|
898
|
+
].join(" ")
|
|
899
|
+
);
|
|
900
|
+
function nt(t) {
|
|
901
|
+
return t.value !== void 0;
|
|
902
|
+
}
|
|
903
|
+
function We() {
|
|
904
|
+
return { conditions: [], surfaces: [] };
|
|
905
|
+
}
|
|
906
|
+
function Pt(t, n) {
|
|
907
|
+
const i = t ?? [];
|
|
908
|
+
return n ? i.includes(n) ? i.filter((o) => o !== n) : [...i, n] : i.length === 0 ? ["caries"] : [];
|
|
909
|
+
}
|
|
910
|
+
function Ht(t, n) {
|
|
911
|
+
switch (t.labelKey) {
|
|
912
|
+
case "quadrant":
|
|
913
|
+
return n("toothScheme.special.quadrant", { n: t.labelIndex });
|
|
914
|
+
case "sextant":
|
|
915
|
+
return n("toothScheme.special.sextant", { n: t.labelIndex });
|
|
916
|
+
case "archUpper":
|
|
917
|
+
return n("toothScheme.special.archUpper");
|
|
918
|
+
case "archLower":
|
|
919
|
+
return n("toothScheme.special.archLower");
|
|
920
|
+
default:
|
|
921
|
+
return n("toothScheme.special.general");
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
function rr(t, n, i) {
|
|
925
|
+
var l;
|
|
926
|
+
return i ? ((l = {
|
|
927
|
+
top: { ArrowDown: "center" },
|
|
928
|
+
bottom: { ArrowUp: "center" },
|
|
929
|
+
left: { ArrowRight: "center" },
|
|
930
|
+
right: { ArrowLeft: "center" },
|
|
931
|
+
center: {
|
|
932
|
+
ArrowUp: "top",
|
|
933
|
+
ArrowDown: "bottom",
|
|
934
|
+
ArrowLeft: "left",
|
|
935
|
+
ArrowRight: "right"
|
|
936
|
+
}
|
|
937
|
+
}[t]) == null ? void 0 : l[n]) ?? t : n === "ArrowUp" ? "top" : n === "ArrowDown" ? "bottom" : n === "ArrowLeft" ? "left" : n === "ArrowRight" ? "right" : t;
|
|
938
|
+
}
|
|
939
|
+
const or = [
|
|
940
|
+
"caries",
|
|
941
|
+
"filled",
|
|
942
|
+
"crowned",
|
|
943
|
+
"temporaryCrown",
|
|
944
|
+
"bridge",
|
|
945
|
+
"rootCanal",
|
|
946
|
+
"implant",
|
|
947
|
+
"implantExtraction",
|
|
948
|
+
"stub",
|
|
949
|
+
"destroyed",
|
|
950
|
+
"missing"
|
|
951
|
+
];
|
|
952
|
+
function ir({
|
|
953
|
+
condition: t,
|
|
954
|
+
assetBaseUrl: n
|
|
955
|
+
}) {
|
|
956
|
+
const i = Q[16], o = ot[t], l = t === "missing", v = t === "caries" || t === "filled", m = 36 * 0.9, S = 62 * 0.9, w = (36 - m) / 2, a = (62 - S) / 2;
|
|
957
|
+
return /* @__PURE__ */ k(
|
|
958
|
+
"svg",
|
|
959
|
+
{
|
|
960
|
+
width: "22",
|
|
961
|
+
height: "38",
|
|
962
|
+
viewBox: "0 0 36 62",
|
|
963
|
+
"aria-hidden": "true",
|
|
964
|
+
className: "ds:block ds:shrink-0",
|
|
965
|
+
children: [
|
|
966
|
+
/* @__PURE__ */ d(
|
|
967
|
+
"image",
|
|
968
|
+
{
|
|
969
|
+
href: Zt(i, n),
|
|
970
|
+
x: w,
|
|
971
|
+
y: a,
|
|
972
|
+
width: m,
|
|
973
|
+
height: S,
|
|
974
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
975
|
+
opacity: l ? 0.25 : 1
|
|
976
|
+
}
|
|
977
|
+
),
|
|
978
|
+
o ? /* @__PURE__ */ d(
|
|
979
|
+
"image",
|
|
980
|
+
{
|
|
981
|
+
href: Ut(i, n, o),
|
|
982
|
+
x: w,
|
|
983
|
+
y: a,
|
|
984
|
+
width: m,
|
|
985
|
+
height: S,
|
|
986
|
+
preserveAspectRatio: "xMidYMid meet"
|
|
987
|
+
}
|
|
988
|
+
) : null,
|
|
989
|
+
v ? /* @__PURE__ */ d(
|
|
990
|
+
"rect",
|
|
991
|
+
{
|
|
992
|
+
x: 3,
|
|
993
|
+
y: 2,
|
|
994
|
+
width: 30,
|
|
995
|
+
height: 58,
|
|
996
|
+
fill: "none",
|
|
997
|
+
stroke: Ie[t],
|
|
998
|
+
strokeWidth: 2,
|
|
999
|
+
strokeDasharray: t === "filled" ? "4 2" : void 0,
|
|
1000
|
+
rx: 6
|
|
1001
|
+
}
|
|
1002
|
+
) : null,
|
|
1003
|
+
l ? /* @__PURE__ */ d(
|
|
1004
|
+
"path",
|
|
1005
|
+
{
|
|
1006
|
+
d: "M7 9 L29 53 M29 9 L7 53",
|
|
1007
|
+
stroke: Ie.missing,
|
|
1008
|
+
strokeWidth: 2,
|
|
1009
|
+
fill: "none"
|
|
1010
|
+
}
|
|
1011
|
+
) : null
|
|
1012
|
+
]
|
|
1013
|
+
}
|
|
1014
|
+
);
|
|
1015
|
+
}
|
|
1016
|
+
function ar({ assetBaseUrl: t }) {
|
|
1017
|
+
const { t: n } = Qt();
|
|
1018
|
+
return /* @__PURE__ */ k(
|
|
1019
|
+
"section",
|
|
1020
|
+
{
|
|
1021
|
+
"aria-label": n("toothScheme.legendLabel"),
|
|
1022
|
+
"data-testid": "tooth-scheme-legend",
|
|
1023
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:bg-[var(--card)] ds:border ds:border-[color:var(--card-border)] ds:p-[var(--spacing-sm)] ds:shadow-[var(--shadow-card)] ds:[.theme-accessible_&]:border-2",
|
|
1024
|
+
children: [
|
|
1025
|
+
/* @__PURE__ */ d("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: n("toothScheme.legendLabel") }),
|
|
1026
|
+
/* @__PURE__ */ d("ul", { className: Jn(), children: or.map((i) => /* @__PURE__ */ k(
|
|
1027
|
+
"li",
|
|
1028
|
+
{
|
|
1029
|
+
className: er(),
|
|
1030
|
+
"data-condition": i,
|
|
1031
|
+
"data-testid": `tooth-scheme-legend-item-${i}`,
|
|
1032
|
+
children: [
|
|
1033
|
+
/* @__PURE__ */ d(ir, { condition: i, assetBaseUrl: t }),
|
|
1034
|
+
/* @__PURE__ */ d("span", { children: n(`toothScheme.condition.${i}`) })
|
|
1035
|
+
]
|
|
1036
|
+
},
|
|
1037
|
+
i
|
|
1038
|
+
)) })
|
|
1039
|
+
]
|
|
1040
|
+
}
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
function rt({
|
|
1044
|
+
label: t,
|
|
1045
|
+
value: n,
|
|
1046
|
+
options: i,
|
|
1047
|
+
onValueChange: o,
|
|
1048
|
+
container: l
|
|
1049
|
+
}) {
|
|
1050
|
+
return /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1051
|
+
/* @__PURE__ */ d(
|
|
1052
|
+
"span",
|
|
1053
|
+
{
|
|
1054
|
+
"aria-hidden": "true",
|
|
1055
|
+
className: "type-label ds:text-[color:var(--muted-foreground)]",
|
|
1056
|
+
children: t
|
|
1057
|
+
}
|
|
1058
|
+
),
|
|
1059
|
+
/* @__PURE__ */ d(
|
|
1060
|
+
An,
|
|
1061
|
+
{
|
|
1062
|
+
size: "md",
|
|
1063
|
+
"aria-label": t,
|
|
1064
|
+
value: n,
|
|
1065
|
+
options: i,
|
|
1066
|
+
onValueChange: o,
|
|
1067
|
+
container: l
|
|
1068
|
+
}
|
|
1069
|
+
)
|
|
1070
|
+
] });
|
|
1071
|
+
}
|
|
1072
|
+
function sr(t, n) {
|
|
1073
|
+
return t.date === n.date ? 0 : t.date ? n.date && t.date < n.date ? 1 : -1 : 1;
|
|
1074
|
+
}
|
|
1075
|
+
const $e = $n(
|
|
1076
|
+
({
|
|
1077
|
+
id: t,
|
|
1078
|
+
dentition: n = "permanent",
|
|
1079
|
+
numbering: i = "fdi",
|
|
1080
|
+
mode: o = "interactive",
|
|
1081
|
+
projection: l = "side",
|
|
1082
|
+
specialElements: v,
|
|
1083
|
+
value: m,
|
|
1084
|
+
defaultValue: S,
|
|
1085
|
+
onChange: w,
|
|
1086
|
+
onSelect: a,
|
|
1087
|
+
conditions: M,
|
|
1088
|
+
radiographs: $,
|
|
1089
|
+
radiographDisplay: F = "badge",
|
|
1090
|
+
onOpenRadiographs: R,
|
|
1091
|
+
activeCondition: p,
|
|
1092
|
+
assetBaseUrl: A = "/toothscheme/teeth",
|
|
1093
|
+
legend: ie = !1,
|
|
1094
|
+
controls: q = !1,
|
|
1095
|
+
ariaLabel: Le,
|
|
1096
|
+
className: Pe,
|
|
1097
|
+
_arch: G,
|
|
1098
|
+
_numbersPosition: le = "between",
|
|
1099
|
+
_inner: Ce = !1,
|
|
1100
|
+
_contentWidth: Gt
|
|
1101
|
+
}, Vt) => {
|
|
1102
|
+
var Lt;
|
|
1103
|
+
const { t: u } = Qt(), [Bt, dt] = Z(n), [Xt, lt] = Z(i), [Jt, ut] = Z(l), [en, ht] = Z(ie), [tn, pt] = Z(
|
|
1104
|
+
v
|
|
1105
|
+
), [He, nn] = Z(null), j = q ? Bt : n, ue = q ? Xt : i, mt = q ? en : ie, he = q ? Jt : l, D = he === "plan" ? "plan" : "side", Re = he === "both" && !Ce, ft = he === "both", V = q ? tn ?? ft : v ?? ft, gt = qe(q);
|
|
1106
|
+
xe(() => {
|
|
1107
|
+
q && !gt.current && (dt(n), lt(i), ut(l), ht(ie), pt(v)), gt.current = q;
|
|
1108
|
+
}, [
|
|
1109
|
+
q,
|
|
1110
|
+
n,
|
|
1111
|
+
i,
|
|
1112
|
+
l,
|
|
1113
|
+
ie,
|
|
1114
|
+
v
|
|
1115
|
+
]);
|
|
1116
|
+
const [rn, bt] = Z(() => m !== void 0 ? m : S !== void 0 ? S : M ? Ft(M) : {}), f = nt({ value: m }) ? m : rn;
|
|
1117
|
+
xe(() => {
|
|
1118
|
+
nt({ value: m }) || M !== void 0 && bt(Ft(M));
|
|
1119
|
+
}, [M, m]);
|
|
1120
|
+
const I = D === "plan" ? 44 : Yt, N = Se(
|
|
1121
|
+
() => Un(j, I, G ? { arch: G } : {}),
|
|
1122
|
+
[j, I, G]
|
|
1123
|
+
), pe = Se(() => {
|
|
1124
|
+
if (!V) return [];
|
|
1125
|
+
if (G)
|
|
1126
|
+
return Fe(
|
|
1127
|
+
Ke(j, G, D),
|
|
1128
|
+
N.width
|
|
1129
|
+
).specials;
|
|
1130
|
+
const e = Fe(
|
|
1131
|
+
Ke(j, "upper", D),
|
|
1132
|
+
N.width
|
|
1133
|
+
).specials, r = I + it, s = Fe(
|
|
1134
|
+
Ke(j, "lower", D),
|
|
1135
|
+
N.width
|
|
1136
|
+
).specials.map((c) => ({ ...c, y: r }));
|
|
1137
|
+
return [...e, ...s];
|
|
1138
|
+
}, [V, G, j, D, N.width, I]), on = Se(() => {
|
|
1139
|
+
if (!Re) return;
|
|
1140
|
+
if (!V) return N.width;
|
|
1141
|
+
let e = N.width;
|
|
1142
|
+
for (const r of ["upper", "lower"])
|
|
1143
|
+
for (const s of ["side", "plan"]) {
|
|
1144
|
+
const c = Fe(
|
|
1145
|
+
Ke(j, r, s),
|
|
1146
|
+
N.width
|
|
1147
|
+
).width;
|
|
1148
|
+
c > e && (e = c);
|
|
1149
|
+
}
|
|
1150
|
+
return e;
|
|
1151
|
+
}, [Re, V, j, N.width]), re = Se(
|
|
1152
|
+
() => [
|
|
1153
|
+
...N.teeth.map((e) => e.fdi),
|
|
1154
|
+
// Special slots join keyboard nav only when interactive — in display /
|
|
1155
|
+
// radiograph-open mode they are decorative (role="img"), so the
|
|
1156
|
+
// radiograph-open keyboard path never reaches a region id.
|
|
1157
|
+
...o === "interactive" ? pe.map((e) => e.element.id) : []
|
|
1158
|
+
],
|
|
1159
|
+
[N, pe, o]
|
|
1160
|
+
), Qe = re[0], [me, B] = Z(Qe);
|
|
1161
|
+
xe(() => {
|
|
1162
|
+
(!me || !re.includes(me)) && B(Qe);
|
|
1163
|
+
}, [Qe, me, re]);
|
|
1164
|
+
const [an, fe] = Z(""), Ue = qe(null), _ = O(
|
|
1165
|
+
(e) => {
|
|
1166
|
+
nt({ value: m }) || bt(e), w == null || w(e);
|
|
1167
|
+
},
|
|
1168
|
+
[w, m]
|
|
1169
|
+
), W = O((e) => {
|
|
1170
|
+
const r = Ue.current;
|
|
1171
|
+
if (!r) return;
|
|
1172
|
+
const s = r.querySelector(`g[data-fdi="${e}"]`);
|
|
1173
|
+
s && (s.focus(), B(e));
|
|
1174
|
+
}, []), ae = O(
|
|
1175
|
+
(e, r) => {
|
|
1176
|
+
const s = r.map((c) => u(`toothScheme.condition.${c}`)).join(", ");
|
|
1177
|
+
if (Zn(e)) {
|
|
1178
|
+
const c = Ht(zt[e], u);
|
|
1179
|
+
return r.length > 0 ? u("toothScheme.elementSelected", {
|
|
1180
|
+
name: c,
|
|
1181
|
+
conditions: s
|
|
1182
|
+
}) : u("toothScheme.elementDeselected", { name: c });
|
|
1183
|
+
}
|
|
1184
|
+
return r.length > 0 ? u("toothScheme.selected", { id: e, conditions: s }) : u("toothScheme.deselected", { id: e });
|
|
1185
|
+
},
|
|
1186
|
+
[u]
|
|
1187
|
+
), U = D === "plan" && o === "interactive" && (p === "caries" || p === "filled"), [E, ge] = Z(null);
|
|
1188
|
+
xe(() => {
|
|
1189
|
+
(!U || E && !re.includes(E.fdi)) && ge(null);
|
|
1190
|
+
}, [U, E, re]);
|
|
1191
|
+
const vt = O((e, r) => {
|
|
1192
|
+
var c;
|
|
1193
|
+
const s = (c = Ue.current) == null ? void 0 : c.querySelector(
|
|
1194
|
+
`path[data-fdi="${e}"][data-zone="${r}"]`
|
|
1195
|
+
);
|
|
1196
|
+
s == null || s.focus();
|
|
1197
|
+
}, []), Ye = qe(null);
|
|
1198
|
+
xe(() => {
|
|
1199
|
+
E ? vt(E.fdi, E.zone) : Ye.current && W(Ye.current.fdi), Ye.current = E;
|
|
1200
|
+
}, [E, vt, W]);
|
|
1201
|
+
const sn = O(
|
|
1202
|
+
(e, r) => {
|
|
1203
|
+
const s = f[e];
|
|
1204
|
+
return !!(s && s.surfaces.includes(r) && s.conditions.includes(p));
|
|
1205
|
+
},
|
|
1206
|
+
[f, p]
|
|
1207
|
+
), yt = O(
|
|
1208
|
+
(e, r) => {
|
|
1209
|
+
r && r.conditions.length > 0 ? fe(
|
|
1210
|
+
u("toothScheme.selected", {
|
|
1211
|
+
id: e,
|
|
1212
|
+
conditions: r.conditions.map((s) => u(`toothScheme.condition.${s}`)).join(", ")
|
|
1213
|
+
})
|
|
1214
|
+
) : fe(u("toothScheme.deselected", { id: e }));
|
|
1215
|
+
},
|
|
1216
|
+
[u]
|
|
1217
|
+
), Ze = O(
|
|
1218
|
+
(e, r) => {
|
|
1219
|
+
if (!U) return;
|
|
1220
|
+
const s = p, c = f[e] ?? We(), g = c.surfaces.includes(r), T = c.conditions.includes(s);
|
|
1221
|
+
let h, x;
|
|
1222
|
+
g && T ? (h = c.surfaces.filter((Y) => Y !== r), x = h.length === 0 ? c.conditions.filter((Y) => Y !== s) : c.conditions) : (h = g ? c.surfaces : [...c.surfaces, r], x = T ? c.conditions : [...c.conditions, s]);
|
|
1223
|
+
const y = { ...f };
|
|
1224
|
+
x.length === 0 && h.length === 0 ? delete y[e] : y[e] = { ...c, conditions: x, surfaces: h }, _(y), yt(e, y[e]), a == null || a(e);
|
|
1225
|
+
},
|
|
1226
|
+
[
|
|
1227
|
+
U,
|
|
1228
|
+
p,
|
|
1229
|
+
f,
|
|
1230
|
+
_,
|
|
1231
|
+
yt,
|
|
1232
|
+
a
|
|
1233
|
+
]
|
|
1234
|
+
), ze = O((e) => {
|
|
1235
|
+
const r = Q[e];
|
|
1236
|
+
r && (B(e), ge({ fdi: e, zone: tt(r)[0] }));
|
|
1237
|
+
}, []), cn = O(
|
|
1238
|
+
(e, r, s) => {
|
|
1239
|
+
const c = Q[r];
|
|
1240
|
+
if (c)
|
|
1241
|
+
switch (e.key) {
|
|
1242
|
+
case "ArrowUp":
|
|
1243
|
+
case "ArrowDown":
|
|
1244
|
+
case "ArrowLeft":
|
|
1245
|
+
case "ArrowRight": {
|
|
1246
|
+
e.preventDefault(), e.stopPropagation();
|
|
1247
|
+
const g = tt(c).includes("center"), T = rr(s, e.key, g);
|
|
1248
|
+
T !== s && ge({ fdi: r, zone: T });
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
case " ":
|
|
1252
|
+
case "Enter": {
|
|
1253
|
+
e.preventDefault(), e.stopPropagation(), Ze(r, Ot(c, s));
|
|
1254
|
+
return;
|
|
1255
|
+
}
|
|
1256
|
+
case "Escape": {
|
|
1257
|
+
e.preventDefault(), e.stopPropagation(), ge(null);
|
|
1258
|
+
return;
|
|
1259
|
+
}
|
|
1260
|
+
default:
|
|
1261
|
+
return;
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
[Ze]
|
|
1265
|
+
), dn = qe(null), Ee = o === "display" && typeof R == "function", be = o === "interactive" || Ee, ve = O(
|
|
1266
|
+
(e) => {
|
|
1267
|
+
B(e), a == null || a(e), R == null || R(e);
|
|
1268
|
+
},
|
|
1269
|
+
[a, R]
|
|
1270
|
+
), Ge = Se(
|
|
1271
|
+
() => ({
|
|
1272
|
+
focusTooth: (e) => {
|
|
1273
|
+
W(e);
|
|
1274
|
+
},
|
|
1275
|
+
getChart: () => f,
|
|
1276
|
+
getTooth: (e) => {
|
|
1277
|
+
var r;
|
|
1278
|
+
return ((r = f[e]) == null ? void 0 : r.conditions) ?? [];
|
|
1279
|
+
},
|
|
1280
|
+
teethWith: (e) => Object.entries(f).filter(([, r]) => r.conditions.includes(e)).map(([r]) => r),
|
|
1281
|
+
setFinding: (e, r, s) => {
|
|
1282
|
+
const c = f[e] ?? We();
|
|
1283
|
+
if (c.conditions.includes(r) && !s) return;
|
|
1284
|
+
const g = {
|
|
1285
|
+
...f,
|
|
1286
|
+
[e]: {
|
|
1287
|
+
...c,
|
|
1288
|
+
conditions: c.conditions.includes(r) ? c.conditions : [...c.conditions, r],
|
|
1289
|
+
surfaces: s ?? c.surfaces
|
|
1290
|
+
}
|
|
1291
|
+
};
|
|
1292
|
+
_(g);
|
|
1293
|
+
},
|
|
1294
|
+
removeFinding: (e, r) => {
|
|
1295
|
+
const s = f[e];
|
|
1296
|
+
if (!s || !s.conditions.includes(r)) return;
|
|
1297
|
+
const c = s.conditions.filter((T) => T !== r), g = { ...f };
|
|
1298
|
+
c.length === 0 ? delete g[e] : g[e] = { ...s, conditions: c }, _(g);
|
|
1299
|
+
},
|
|
1300
|
+
clearTooth: (e) => {
|
|
1301
|
+
if (!f[e]) return;
|
|
1302
|
+
const r = { ...f };
|
|
1303
|
+
delete r[e], _(r);
|
|
1304
|
+
},
|
|
1305
|
+
getRadiographs: (e) => ($ == null ? void 0 : $[e]) ?? [],
|
|
1306
|
+
teethWithRadiographs: () => Object.keys($ ?? {}).filter(
|
|
1307
|
+
(e) => {
|
|
1308
|
+
var r;
|
|
1309
|
+
return (((r = $ == null ? void 0 : $[e]) == null ? void 0 : r.length) ?? 0) > 0;
|
|
1310
|
+
}
|
|
1311
|
+
),
|
|
1312
|
+
openRadiographs: (e) => {
|
|
1313
|
+
W(e), ve(e);
|
|
1314
|
+
}
|
|
1315
|
+
}),
|
|
1316
|
+
[f, _, W, $, ve]
|
|
1317
|
+
);
|
|
1318
|
+
In(Vt, () => Ge, [Ge]), kn(
|
|
1319
|
+
En,
|
|
1320
|
+
Ge,
|
|
1321
|
+
Ce ? void 0 : t
|
|
1322
|
+
);
|
|
1323
|
+
const wt = O(
|
|
1324
|
+
(e, r) => {
|
|
1325
|
+
var T;
|
|
1326
|
+
if (!be) return;
|
|
1327
|
+
const s = Q[r], c = re, g = c.indexOf(r);
|
|
1328
|
+
switch (e.key) {
|
|
1329
|
+
case "ArrowRight": {
|
|
1330
|
+
e.preventDefault();
|
|
1331
|
+
const h = Math.min(c.length - 1, g + 1);
|
|
1332
|
+
W(c[h]);
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
case "ArrowLeft": {
|
|
1336
|
+
e.preventDefault();
|
|
1337
|
+
const h = Math.max(0, g - 1);
|
|
1338
|
+
W(c[h]);
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
case "ArrowUp":
|
|
1342
|
+
case "ArrowDown": {
|
|
1343
|
+
if (e.preventDefault(), !s) return;
|
|
1344
|
+
const x = {
|
|
1345
|
+
1: 4,
|
|
1346
|
+
4: 1,
|
|
1347
|
+
2: 3,
|
|
1348
|
+
3: 2,
|
|
1349
|
+
5: 8,
|
|
1350
|
+
8: 5,
|
|
1351
|
+
6: 7,
|
|
1352
|
+
7: 6
|
|
1353
|
+
}[s.quadrant];
|
|
1354
|
+
if (!x) return;
|
|
1355
|
+
const y = `${x}${s.positionInQuadrant}`;
|
|
1356
|
+
c.includes(y) && W(y);
|
|
1357
|
+
return;
|
|
1358
|
+
}
|
|
1359
|
+
case "Home": {
|
|
1360
|
+
if (e.preventDefault(), !s) return;
|
|
1361
|
+
const h = c.filter(
|
|
1362
|
+
(x) => {
|
|
1363
|
+
var y;
|
|
1364
|
+
return ((y = Q[x]) == null ? void 0 : y.quadrant) === s.quadrant;
|
|
1365
|
+
}
|
|
1366
|
+
);
|
|
1367
|
+
h.length > 0 && W(h[0]);
|
|
1368
|
+
return;
|
|
1369
|
+
}
|
|
1370
|
+
case "End": {
|
|
1371
|
+
if (e.preventDefault(), !s) return;
|
|
1372
|
+
const h = c.filter(
|
|
1373
|
+
(x) => {
|
|
1374
|
+
var y;
|
|
1375
|
+
return ((y = Q[x]) == null ? void 0 : y.quadrant) === s.quadrant;
|
|
1376
|
+
}
|
|
1377
|
+
);
|
|
1378
|
+
h.length > 0 && W(h[h.length - 1]);
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
case " ":
|
|
1382
|
+
case "Enter": {
|
|
1383
|
+
if (e.preventDefault(), Ee) {
|
|
1384
|
+
ve(r);
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
if (U && s) {
|
|
1388
|
+
ze(r);
|
|
1389
|
+
return;
|
|
1390
|
+
}
|
|
1391
|
+
const h = (T = f[r]) == null ? void 0 : T.conditions, x = Pt(h, p), y = { ...f };
|
|
1392
|
+
x.length === 0 ? delete y[r] : y[r] = {
|
|
1393
|
+
...f[r] ?? We(),
|
|
1394
|
+
conditions: x
|
|
1395
|
+
}, fe(ae(r, x)), _(y), a == null || a(r);
|
|
1396
|
+
return;
|
|
1397
|
+
}
|
|
1398
|
+
default:
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
[
|
|
1403
|
+
p,
|
|
1404
|
+
ae,
|
|
1405
|
+
f,
|
|
1406
|
+
_,
|
|
1407
|
+
ze,
|
|
1408
|
+
W,
|
|
1409
|
+
ve,
|
|
1410
|
+
a,
|
|
1411
|
+
Ee,
|
|
1412
|
+
U,
|
|
1413
|
+
be,
|
|
1414
|
+
re
|
|
1415
|
+
]
|
|
1416
|
+
), xt = O(
|
|
1417
|
+
(e) => {
|
|
1418
|
+
var g;
|
|
1419
|
+
if (o !== "interactive") return;
|
|
1420
|
+
B(e);
|
|
1421
|
+
const r = (g = f[e]) == null ? void 0 : g.conditions, s = Pt(r, p), c = { ...f };
|
|
1422
|
+
s.length === 0 ? delete c[e] : c[e] = {
|
|
1423
|
+
...f[e] ?? We(),
|
|
1424
|
+
conditions: s
|
|
1425
|
+
}, fe(ae(e, s)), _(c), a == null || a(e);
|
|
1426
|
+
},
|
|
1427
|
+
[p, ae, f, _, o, a]
|
|
1428
|
+
), oe = j === "primary" ? "mGeneral" : "general", St = (((Lt = f[oe]) == null ? void 0 : Lt.conditions.length) ?? 0) > 0, ln = O(
|
|
1429
|
+
(e) => {
|
|
1430
|
+
var s;
|
|
1431
|
+
const r = { ...f };
|
|
1432
|
+
e ? r[oe] = {
|
|
1433
|
+
conditions: [p ?? "caries"],
|
|
1434
|
+
surfaces: []
|
|
1435
|
+
} : delete r[oe], fe(
|
|
1436
|
+
ae(oe, ((s = r[oe]) == null ? void 0 : s.conditions) ?? [])
|
|
1437
|
+
), _(r), a == null || a(oe);
|
|
1438
|
+
},
|
|
1439
|
+
[
|
|
1440
|
+
p,
|
|
1441
|
+
ae,
|
|
1442
|
+
f,
|
|
1443
|
+
_,
|
|
1444
|
+
oe,
|
|
1445
|
+
a
|
|
1446
|
+
]
|
|
1447
|
+
), $t = le === "above" ? 16 : 2, un = le === "below" ? 16 : 2, hn = pe.length > 0 ? Math.max(...pe.map((e) => e.x)) + te : 0, It = Math.max(
|
|
1448
|
+
Gt ?? 0,
|
|
1449
|
+
N.width,
|
|
1450
|
+
hn
|
|
1451
|
+
) + 4, kt = N.height + $t + un, Ve = Le ?? u("toothScheme.ariaLabel"), pn = be ? void 0 : 0, Tt = Re ? null : /* @__PURE__ */ k(
|
|
1452
|
+
"svg",
|
|
1453
|
+
{
|
|
1454
|
+
ref: Ue,
|
|
1455
|
+
viewBox: `0 ${-$t} ${It} ${kt}`,
|
|
1456
|
+
width: It,
|
|
1457
|
+
height: kt,
|
|
1458
|
+
className: Xn(),
|
|
1459
|
+
role: "group",
|
|
1460
|
+
"aria-label": Ve,
|
|
1461
|
+
focusable: "false",
|
|
1462
|
+
"data-testid": "tooth-scheme-svg",
|
|
1463
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1464
|
+
children: [
|
|
1465
|
+
N.teeth.map((e) => {
|
|
1466
|
+
var _t;
|
|
1467
|
+
const r = f[e.fdi], s = (_t = r == null ? void 0 : r.conditions) == null ? void 0 : _t[0], c = u(`toothScheme.anatomy.${e.meta.anatomy}`), g = s ? `, ${u(`toothScheme.condition.${s}`)}` : "", T = ($ == null ? void 0 : $[e.fdi]) ?? [], h = T.length, x = h > 0, y = x ? [...T].sort(sr)[0] : void 0, Y = F === "thumbnail" && y !== void 0, Ne = x ? `, ${u("toothScheme.radiographBadge", { count: h })}` : "", X = Ce ? `, ${u(D === "plan" ? "toothScheme.view.occlusal" : "toothScheme.view.side")}` : "", Be = u("toothScheme.toothLabel", {
|
|
1468
|
+
id: Kt(e.fdi, ue),
|
|
1469
|
+
anatomy: c,
|
|
1470
|
+
conditionSuffix: g
|
|
1471
|
+
}) + Ne + X, _e = be ? E ? -1 : e.fdi === me ? 0 : -1 : void 0, se = (r == null ? void 0 : r.conditions) ?? [], Ct = se.includes("missing"), gn = se.map((b) => ({
|
|
1472
|
+
condition: b,
|
|
1473
|
+
spec: ot[b]
|
|
1474
|
+
})).filter(
|
|
1475
|
+
(b) => !!b.spec
|
|
1476
|
+
), Xe = se.find(
|
|
1477
|
+
(b) => b !== "missing" && !ot[b]
|
|
1478
|
+
), Rt = Xe ? Ie[Xe] : void 0, bn = (s ? `${c} · ${u(`toothScheme.condition.${s}`)}` : c) + (x ? ` · ${u("toothScheme.radiographBadge", { count: h })}` : ""), Et = Kt(e.fdi, ue), vn = Zt(
|
|
1479
|
+
e.meta,
|
|
1480
|
+
A,
|
|
1481
|
+
"default",
|
|
1482
|
+
D
|
|
1483
|
+
), yn = Y && y ? y.thumbnailUrl ?? y.url : vn, wn = D === "plan" ? se.flatMap((b) => {
|
|
1484
|
+
const H = Pn[b];
|
|
1485
|
+
return H ? ((r == null ? void 0 : r.surfaces) ?? []).map((Oe) => ({
|
|
1486
|
+
key: `${b}-${Oe}`,
|
|
1487
|
+
url: Hn(
|
|
1488
|
+
e.meta,
|
|
1489
|
+
A,
|
|
1490
|
+
H,
|
|
1491
|
+
Oe
|
|
1492
|
+
)
|
|
1493
|
+
})) : [];
|
|
1494
|
+
}) : [], Mt = (e.meta.dentition === "primary" ? Fn : 1) * 0.9, ce = z * Mt, de = I * Mt, ye = (z - ce) / 2, we = (I - de) / 2, P = U && (E == null ? void 0 : E.fdi) === e.fdi, Dt = U ? tt(e.meta) : [], xn = Dt.includes("center"), Nt = le === "above" ? -4 : le === "below" ? I + 12 : le === "none" ? null : e.meta.arch === "upper" ? I + 12 : -4;
|
|
1495
|
+
return /* @__PURE__ */ k(K.Root, { children: [
|
|
1496
|
+
/* @__PURE__ */ d(K.Trigger, { asChild: !0, children: /* @__PURE__ */ k(
|
|
1497
|
+
"g",
|
|
1498
|
+
{
|
|
1499
|
+
"data-fdi": e.fdi,
|
|
1500
|
+
"data-anatomy": e.meta.anatomy,
|
|
1501
|
+
"data-arch": e.meta.arch,
|
|
1502
|
+
"data-side": e.meta.side,
|
|
1503
|
+
"data-quadrant": e.meta.quadrant,
|
|
1504
|
+
"data-condition": s ?? "none",
|
|
1505
|
+
"data-testid": `tooth-${e.fdi}`,
|
|
1506
|
+
transform: `translate(${e.x}, ${e.y})`,
|
|
1507
|
+
tabIndex: _e,
|
|
1508
|
+
role: P ? "group" : be ? "button" : "img",
|
|
1509
|
+
"aria-label": Be,
|
|
1510
|
+
"aria-pressed": P ? void 0 : o === "interactive" ? s !== void 0 : void 0,
|
|
1511
|
+
className: Wt(),
|
|
1512
|
+
onClick: P ? void 0 : o === "interactive" ? U ? () => ze(e.fdi) : () => xt(e.fdi) : Ee ? () => ve(e.fdi) : void 0,
|
|
1513
|
+
onFocus: () => B(e.fdi),
|
|
1514
|
+
onKeyDown: P ? void 0 : (b) => wt(b, e.fdi),
|
|
1515
|
+
children: [
|
|
1516
|
+
/* @__PURE__ */ d(
|
|
1517
|
+
"rect",
|
|
1518
|
+
{
|
|
1519
|
+
x: -L,
|
|
1520
|
+
y: -L,
|
|
1521
|
+
width: z + L * 2,
|
|
1522
|
+
height: I + L * 2,
|
|
1523
|
+
fill: "transparent"
|
|
1524
|
+
}
|
|
1525
|
+
),
|
|
1526
|
+
/* @__PURE__ */ d(
|
|
1527
|
+
"image",
|
|
1528
|
+
{
|
|
1529
|
+
href: yn,
|
|
1530
|
+
x: ye,
|
|
1531
|
+
y: we,
|
|
1532
|
+
width: ce,
|
|
1533
|
+
height: de,
|
|
1534
|
+
preserveAspectRatio: Y ? "xMidYMid slice" : "xMidYMid meet",
|
|
1535
|
+
opacity: Ct && !Y ? 0.25 : 1,
|
|
1536
|
+
"aria-hidden": "true"
|
|
1537
|
+
}
|
|
1538
|
+
),
|
|
1539
|
+
D === "side" ? gn.map(({ condition: b, spec: H }) => /* @__PURE__ */ d(
|
|
1540
|
+
"image",
|
|
1541
|
+
{
|
|
1542
|
+
href: Ut(
|
|
1543
|
+
e.meta,
|
|
1544
|
+
A,
|
|
1545
|
+
H
|
|
1546
|
+
),
|
|
1547
|
+
x: ye,
|
|
1548
|
+
y: we,
|
|
1549
|
+
width: ce,
|
|
1550
|
+
height: de,
|
|
1551
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
1552
|
+
"aria-hidden": "true",
|
|
1553
|
+
pointerEvents: "none"
|
|
1554
|
+
},
|
|
1555
|
+
b
|
|
1556
|
+
)) : null,
|
|
1557
|
+
D === "plan" ? wn.map(({ key: b, url: H }) => /* @__PURE__ */ d(
|
|
1558
|
+
"image",
|
|
1559
|
+
{
|
|
1560
|
+
href: H,
|
|
1561
|
+
x: ye,
|
|
1562
|
+
y: we,
|
|
1563
|
+
width: ce,
|
|
1564
|
+
height: de,
|
|
1565
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
1566
|
+
"aria-hidden": "true",
|
|
1567
|
+
pointerEvents: "none"
|
|
1568
|
+
},
|
|
1569
|
+
b
|
|
1570
|
+
)) : null,
|
|
1571
|
+
U ? Dt.map((b) => {
|
|
1572
|
+
const H = Ot(e.meta, b), Oe = sn(e.fdi, H);
|
|
1573
|
+
return /* @__PURE__ */ d(
|
|
1574
|
+
"path",
|
|
1575
|
+
{
|
|
1576
|
+
d: Qn(
|
|
1577
|
+
b,
|
|
1578
|
+
{ x: ye, y: we, w: ce, h: de },
|
|
1579
|
+
xn
|
|
1580
|
+
),
|
|
1581
|
+
"data-fdi": e.fdi,
|
|
1582
|
+
"data-zone": b,
|
|
1583
|
+
"data-surface": H,
|
|
1584
|
+
"data-testid": `tooth-${e.fdi}-zone-${b}`,
|
|
1585
|
+
role: P ? "button" : void 0,
|
|
1586
|
+
tabIndex: P ? (E == null ? void 0 : E.zone) === b ? 0 : -1 : void 0,
|
|
1587
|
+
"aria-label": P ? u("toothScheme.toothLabel", {
|
|
1588
|
+
id: Et,
|
|
1589
|
+
anatomy: u(
|
|
1590
|
+
`toothScheme.surface.${H}`
|
|
1591
|
+
),
|
|
1592
|
+
conditionSuffix: ""
|
|
1593
|
+
}) : void 0,
|
|
1594
|
+
"aria-pressed": P ? Oe : void 0,
|
|
1595
|
+
strokeWidth: "var(--focus-ring-width)",
|
|
1596
|
+
className: nr(),
|
|
1597
|
+
onClick: (J) => {
|
|
1598
|
+
J.stopPropagation(), P || B(e.fdi), Ze(e.fdi, H);
|
|
1599
|
+
},
|
|
1600
|
+
onKeyDown: P ? (J) => cn(J, e.fdi, b) : void 0,
|
|
1601
|
+
onFocus: P ? () => ge(
|
|
1602
|
+
(J) => J && J.fdi === e.fdi && J.zone === b ? J : { fdi: e.fdi, zone: b }
|
|
1603
|
+
) : void 0
|
|
1604
|
+
},
|
|
1605
|
+
b
|
|
1606
|
+
);
|
|
1607
|
+
}) : null,
|
|
1608
|
+
D === "side" && Rt ? /* @__PURE__ */ d(
|
|
1609
|
+
"rect",
|
|
1610
|
+
{
|
|
1611
|
+
x: 3,
|
|
1612
|
+
y: 2,
|
|
1613
|
+
width: z - 6,
|
|
1614
|
+
height: I - 4,
|
|
1615
|
+
fill: "none",
|
|
1616
|
+
stroke: Rt,
|
|
1617
|
+
strokeWidth: "2",
|
|
1618
|
+
strokeDasharray: Xe === "filled" ? "4 2" : void 0,
|
|
1619
|
+
rx: "6",
|
|
1620
|
+
pointerEvents: "none"
|
|
1621
|
+
}
|
|
1622
|
+
) : null,
|
|
1623
|
+
Ct ? /* @__PURE__ */ d(
|
|
1624
|
+
"path",
|
|
1625
|
+
{
|
|
1626
|
+
d: `M7 9 L${z - 7} ${I - 9} M${z - 7} 9 L7 ${I - 9}`,
|
|
1627
|
+
stroke: Ie.missing,
|
|
1628
|
+
strokeWidth: "2",
|
|
1629
|
+
fill: "none",
|
|
1630
|
+
pointerEvents: "none"
|
|
1631
|
+
}
|
|
1632
|
+
) : null,
|
|
1633
|
+
Y ? /* @__PURE__ */ d(
|
|
1634
|
+
"rect",
|
|
1635
|
+
{
|
|
1636
|
+
x: ye,
|
|
1637
|
+
y: we,
|
|
1638
|
+
width: ce,
|
|
1639
|
+
height: de,
|
|
1640
|
+
fill: "none",
|
|
1641
|
+
stroke: "var(--border)",
|
|
1642
|
+
strokeWidth: "1",
|
|
1643
|
+
rx: "3",
|
|
1644
|
+
pointerEvents: "none"
|
|
1645
|
+
}
|
|
1646
|
+
) : null,
|
|
1647
|
+
x ? /* @__PURE__ */ k(
|
|
1648
|
+
"g",
|
|
1649
|
+
{
|
|
1650
|
+
"data-testid": `tooth-${e.fdi}-radiograph-badge`,
|
|
1651
|
+
"data-radiograph-count": h,
|
|
1652
|
+
transform: `translate(${z - (h >= 10 ? 19 : 15)}, ${I - 13})`,
|
|
1653
|
+
pointerEvents: "none",
|
|
1654
|
+
"aria-hidden": "true",
|
|
1655
|
+
children: [
|
|
1656
|
+
/* @__PURE__ */ d(
|
|
1657
|
+
"rect",
|
|
1658
|
+
{
|
|
1659
|
+
width: h >= 10 ? 17 : 13,
|
|
1660
|
+
height: 12,
|
|
1661
|
+
rx: "3.5",
|
|
1662
|
+
fill: "var(--card)",
|
|
1663
|
+
stroke: "var(--info-foreground)",
|
|
1664
|
+
strokeWidth: "0.75"
|
|
1665
|
+
}
|
|
1666
|
+
),
|
|
1667
|
+
/* @__PURE__ */ d(
|
|
1668
|
+
"text",
|
|
1669
|
+
{
|
|
1670
|
+
x: (h >= 10 ? 17 : 13) / 2,
|
|
1671
|
+
y: 9,
|
|
1672
|
+
textAnchor: "middle",
|
|
1673
|
+
fontSize: "9",
|
|
1674
|
+
fontWeight: "600",
|
|
1675
|
+
fill: "var(--info-foreground)",
|
|
1676
|
+
className: "ds:select-none",
|
|
1677
|
+
children: h
|
|
1678
|
+
}
|
|
1679
|
+
)
|
|
1680
|
+
]
|
|
1681
|
+
}
|
|
1682
|
+
) : null,
|
|
1683
|
+
/* @__PURE__ */ d(
|
|
1684
|
+
"rect",
|
|
1685
|
+
{
|
|
1686
|
+
x: -L,
|
|
1687
|
+
y: -L,
|
|
1688
|
+
width: z + L * 2,
|
|
1689
|
+
height: I + L * 2,
|
|
1690
|
+
fill: "none",
|
|
1691
|
+
stroke: "var(--ring)",
|
|
1692
|
+
strokeWidth: "var(--focus-ring-width)",
|
|
1693
|
+
className: [
|
|
1694
|
+
"ds:opacity-0",
|
|
1695
|
+
"ds:group-focus-visible:opacity-100",
|
|
1696
|
+
"ds:forced-colors:stroke-[CanvasText]"
|
|
1697
|
+
].join(" "),
|
|
1698
|
+
"data-testid": `tooth-${e.fdi}-focus-ring`,
|
|
1699
|
+
pointerEvents: "none",
|
|
1700
|
+
rx: "4"
|
|
1701
|
+
}
|
|
1702
|
+
),
|
|
1703
|
+
Nt !== null ? /* @__PURE__ */ d(
|
|
1704
|
+
"text",
|
|
1705
|
+
{
|
|
1706
|
+
x: z / 2,
|
|
1707
|
+
y: Nt,
|
|
1708
|
+
textAnchor: "middle",
|
|
1709
|
+
fontSize: "10",
|
|
1710
|
+
fill: "var(--muted-foreground)",
|
|
1711
|
+
className: "ds:select-none",
|
|
1712
|
+
"aria-hidden": "true",
|
|
1713
|
+
children: Et
|
|
1714
|
+
}
|
|
1715
|
+
) : null
|
|
1716
|
+
]
|
|
1717
|
+
}
|
|
1718
|
+
) }),
|
|
1719
|
+
/* @__PURE__ */ d(K.Portal, { children: /* @__PURE__ */ k(
|
|
1720
|
+
K.Content,
|
|
1721
|
+
{
|
|
1722
|
+
side: "top",
|
|
1723
|
+
sideOffset: 6,
|
|
1724
|
+
className: "ds:z-[var(--z-tooltip)] ds:rounded-[var(--radius-sm)] ds:bg-[var(--foreground)] ds:text-[var(--background)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:pt-[calc(var(--spacing-xs)/2)] ds:pb-[calc(var(--spacing-xs)/2)] ds:text-[length:var(--font-size-xs)]",
|
|
1725
|
+
children: [
|
|
1726
|
+
bn,
|
|
1727
|
+
/* @__PURE__ */ d(K.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
1728
|
+
]
|
|
1729
|
+
}
|
|
1730
|
+
) })
|
|
1731
|
+
] }, e.fdi);
|
|
1732
|
+
}),
|
|
1733
|
+
pe.map(({ element: e, x: r, y: s }) => {
|
|
1734
|
+
var _e;
|
|
1735
|
+
const c = f[e.id], g = (_e = c == null ? void 0 : c.conditions) == null ? void 0 : _e[0], T = g !== void 0, h = Ht(e, u), x = g ? `, ${u(`toothScheme.condition.${g}`)}` : "", y = u("toothScheme.elementLabel", {
|
|
1736
|
+
name: h,
|
|
1737
|
+
conditionSuffix: x
|
|
1738
|
+
}), Y = g ? Ie[g] : void 0, Ne = zn(e, A), X = o === "interactive", Be = X ? e.id === me ? 0 : -1 : void 0;
|
|
1739
|
+
return /* @__PURE__ */ k(K.Root, { children: [
|
|
1740
|
+
/* @__PURE__ */ d(K.Trigger, { asChild: !0, children: /* @__PURE__ */ k(
|
|
1741
|
+
"g",
|
|
1742
|
+
{
|
|
1743
|
+
"data-fdi": e.id,
|
|
1744
|
+
"data-special": e.kind,
|
|
1745
|
+
"data-arch": e.arch,
|
|
1746
|
+
"data-condition": g ?? "none",
|
|
1747
|
+
"data-testid": `element-${e.id}`,
|
|
1748
|
+
transform: `translate(${r}, ${s})`,
|
|
1749
|
+
tabIndex: Be,
|
|
1750
|
+
role: X ? "button" : "img",
|
|
1751
|
+
"aria-label": y,
|
|
1752
|
+
"aria-pressed": X ? T : void 0,
|
|
1753
|
+
className: Wt(),
|
|
1754
|
+
onClick: X ? () => xt(e.id) : void 0,
|
|
1755
|
+
onFocus: X ? () => B(e.id) : void 0,
|
|
1756
|
+
onKeyDown: X ? (se) => wt(se, e.id) : void 0,
|
|
1757
|
+
children: [
|
|
1758
|
+
/* @__PURE__ */ d(
|
|
1759
|
+
"rect",
|
|
1760
|
+
{
|
|
1761
|
+
x: -L,
|
|
1762
|
+
y: -L,
|
|
1763
|
+
width: te + L * 2,
|
|
1764
|
+
height: I + L * 2,
|
|
1765
|
+
fill: "transparent"
|
|
1766
|
+
}
|
|
1767
|
+
),
|
|
1768
|
+
/* @__PURE__ */ d(
|
|
1769
|
+
"rect",
|
|
1770
|
+
{
|
|
1771
|
+
x: 0,
|
|
1772
|
+
y: 0,
|
|
1773
|
+
width: te,
|
|
1774
|
+
height: I,
|
|
1775
|
+
rx: 6,
|
|
1776
|
+
fill: T ? "var(--accent)" : "var(--card)",
|
|
1777
|
+
fillOpacity: T ? 0.16 : 1,
|
|
1778
|
+
stroke: Y ?? "var(--border)",
|
|
1779
|
+
strokeWidth: T ? 2 : 1
|
|
1780
|
+
}
|
|
1781
|
+
),
|
|
1782
|
+
Ne ? /* @__PURE__ */ k(Sn, { children: [
|
|
1783
|
+
/* @__PURE__ */ d(
|
|
1784
|
+
"image",
|
|
1785
|
+
{
|
|
1786
|
+
href: Ne,
|
|
1787
|
+
x: 3,
|
|
1788
|
+
y: 3,
|
|
1789
|
+
width: te - 6,
|
|
1790
|
+
height: I - 16,
|
|
1791
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
1792
|
+
"aria-hidden": "true",
|
|
1793
|
+
pointerEvents: "none"
|
|
1794
|
+
}
|
|
1795
|
+
),
|
|
1796
|
+
/* @__PURE__ */ d(
|
|
1797
|
+
"text",
|
|
1798
|
+
{
|
|
1799
|
+
x: te / 2,
|
|
1800
|
+
y: I - 4,
|
|
1801
|
+
textAnchor: "middle",
|
|
1802
|
+
fontSize: "9",
|
|
1803
|
+
fontWeight: "600",
|
|
1804
|
+
fill: "var(--muted-foreground)",
|
|
1805
|
+
className: "ds:select-none",
|
|
1806
|
+
"aria-hidden": "true",
|
|
1807
|
+
children: e.code
|
|
1808
|
+
}
|
|
1809
|
+
)
|
|
1810
|
+
] }) : /* @__PURE__ */ d(
|
|
1811
|
+
"text",
|
|
1812
|
+
{
|
|
1813
|
+
x: te / 2,
|
|
1814
|
+
y: I / 2,
|
|
1815
|
+
textAnchor: "middle",
|
|
1816
|
+
dominantBaseline: "central",
|
|
1817
|
+
fontSize: "11",
|
|
1818
|
+
fontWeight: "600",
|
|
1819
|
+
fill: "var(--foreground)",
|
|
1820
|
+
className: "ds:select-none",
|
|
1821
|
+
"aria-hidden": "true",
|
|
1822
|
+
children: e.code
|
|
1823
|
+
}
|
|
1824
|
+
),
|
|
1825
|
+
/* @__PURE__ */ d(
|
|
1826
|
+
"rect",
|
|
1827
|
+
{
|
|
1828
|
+
x: -L,
|
|
1829
|
+
y: -L,
|
|
1830
|
+
width: te + L * 2,
|
|
1831
|
+
height: I + L * 2,
|
|
1832
|
+
fill: "none",
|
|
1833
|
+
stroke: "var(--ring)",
|
|
1834
|
+
strokeWidth: "var(--focus-ring-width)",
|
|
1835
|
+
className: [
|
|
1836
|
+
"ds:opacity-0",
|
|
1837
|
+
"ds:group-focus-visible:opacity-100",
|
|
1838
|
+
"ds:forced-colors:stroke-[CanvasText]"
|
|
1839
|
+
].join(" "),
|
|
1840
|
+
"data-testid": `element-${e.id}-focus-ring`,
|
|
1841
|
+
pointerEvents: "none",
|
|
1842
|
+
rx: "6"
|
|
1843
|
+
}
|
|
1844
|
+
)
|
|
1845
|
+
]
|
|
1846
|
+
}
|
|
1847
|
+
) }),
|
|
1848
|
+
/* @__PURE__ */ d(K.Portal, { children: /* @__PURE__ */ k(
|
|
1849
|
+
K.Content,
|
|
1850
|
+
{
|
|
1851
|
+
side: "top",
|
|
1852
|
+
sideOffset: 6,
|
|
1853
|
+
className: "ds:z-[var(--z-tooltip)] ds:rounded-[var(--radius-sm)] ds:bg-[var(--foreground)] ds:text-[var(--background)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:pt-[calc(var(--spacing-xs)/2)] ds:pb-[calc(var(--spacing-xs)/2)] ds:text-[length:var(--font-size-xs)]",
|
|
1854
|
+
children: [
|
|
1855
|
+
g ? `${h} · ${u(`toothScheme.condition.${g}`)}` : h,
|
|
1856
|
+
/* @__PURE__ */ d(K.Arrow, { className: "ds:fill-[var(--foreground)]" })
|
|
1857
|
+
]
|
|
1858
|
+
}
|
|
1859
|
+
) })
|
|
1860
|
+
] }, e.id);
|
|
1861
|
+
})
|
|
1862
|
+
]
|
|
1863
|
+
}
|
|
1864
|
+
), At = /* @__PURE__ */ d(
|
|
1865
|
+
"div",
|
|
1866
|
+
{
|
|
1867
|
+
className: tr(),
|
|
1868
|
+
"aria-live": "polite",
|
|
1869
|
+
"aria-atomic": "true",
|
|
1870
|
+
"data-testid": "tooth-scheme-live",
|
|
1871
|
+
children: an
|
|
1872
|
+
}
|
|
1873
|
+
);
|
|
1874
|
+
if (Ce)
|
|
1875
|
+
return /* @__PURE__ */ k(K.Provider, { delayDuration: 200, children: [
|
|
1876
|
+
Tt,
|
|
1877
|
+
At
|
|
1878
|
+
] });
|
|
1879
|
+
const mn = (e) => u(e === "upper" ? "toothScheme.arch.upper" : "toothScheme.arch.lower"), Me = (e, r) => `${Ve} — ${mn(e)}, ${u(r === "plan" ? "toothScheme.view.occlusal" : "toothScheme.view.side")}`, De = {
|
|
1880
|
+
dentition: j,
|
|
1881
|
+
numbering: ue,
|
|
1882
|
+
mode: o,
|
|
1883
|
+
value: f,
|
|
1884
|
+
onChange: _,
|
|
1885
|
+
onSelect: a,
|
|
1886
|
+
activeCondition: p,
|
|
1887
|
+
assetBaseUrl: A,
|
|
1888
|
+
radiographs: $,
|
|
1889
|
+
radiographDisplay: F,
|
|
1890
|
+
onOpenRadiographs: R,
|
|
1891
|
+
specialElements: V,
|
|
1892
|
+
_inner: !0,
|
|
1893
|
+
_contentWidth: on
|
|
1894
|
+
}, fn = /* @__PURE__ */ k("div", { className: Bn(), "data-testid": "tooth-scheme-both", children: [
|
|
1895
|
+
/* @__PURE__ */ d(
|
|
1896
|
+
$e,
|
|
1897
|
+
{
|
|
1898
|
+
...De,
|
|
1899
|
+
projection: "side",
|
|
1900
|
+
_arch: "upper",
|
|
1901
|
+
_numbersPosition: "above",
|
|
1902
|
+
ariaLabel: Me("upper", "side")
|
|
1903
|
+
}
|
|
1904
|
+
),
|
|
1905
|
+
/* @__PURE__ */ d(
|
|
1906
|
+
$e,
|
|
1907
|
+
{
|
|
1908
|
+
...De,
|
|
1909
|
+
projection: "plan",
|
|
1910
|
+
_arch: "upper",
|
|
1911
|
+
_numbersPosition: "none",
|
|
1912
|
+
ariaLabel: Me("upper", "plan")
|
|
1913
|
+
}
|
|
1914
|
+
),
|
|
1915
|
+
/* @__PURE__ */ d(
|
|
1916
|
+
$e,
|
|
1917
|
+
{
|
|
1918
|
+
...De,
|
|
1919
|
+
projection: "plan",
|
|
1920
|
+
_arch: "lower",
|
|
1921
|
+
_numbersPosition: "none",
|
|
1922
|
+
ariaLabel: Me("lower", "plan")
|
|
1923
|
+
}
|
|
1924
|
+
),
|
|
1925
|
+
/* @__PURE__ */ d(
|
|
1926
|
+
$e,
|
|
1927
|
+
{
|
|
1928
|
+
...De,
|
|
1929
|
+
projection: "side",
|
|
1930
|
+
_arch: "lower",
|
|
1931
|
+
_numbersPosition: "below",
|
|
1932
|
+
ariaLabel: Me("lower", "side")
|
|
1933
|
+
}
|
|
1934
|
+
)
|
|
1935
|
+
] });
|
|
1936
|
+
return /* @__PURE__ */ d(K.Provider, { delayDuration: 200, children: /* @__PURE__ */ k(
|
|
1937
|
+
"div",
|
|
1938
|
+
{
|
|
1939
|
+
ref: dn,
|
|
1940
|
+
role: "region",
|
|
1941
|
+
"aria-label": Ve,
|
|
1942
|
+
tabIndex: pn,
|
|
1943
|
+
className: [Vn(), Pe].filter(Boolean).join(" "),
|
|
1944
|
+
"data-component": "tooth-scheme",
|
|
1945
|
+
"data-component-id": t,
|
|
1946
|
+
"data-testid": "tooth-scheme-root",
|
|
1947
|
+
"data-dentition": j,
|
|
1948
|
+
"data-numbering": ue,
|
|
1949
|
+
"data-mode": o,
|
|
1950
|
+
"data-projection": D,
|
|
1951
|
+
"data-view-mode": he,
|
|
1952
|
+
"data-special-elements": V ? "true" : "false",
|
|
1953
|
+
children: [
|
|
1954
|
+
q ? /* @__PURE__ */ d(
|
|
1955
|
+
"div",
|
|
1956
|
+
{
|
|
1957
|
+
className: "ds:flex ds:w-full ds:justify-end",
|
|
1958
|
+
"data-testid": "tooth-scheme-controls",
|
|
1959
|
+
children: /* @__PURE__ */ k(Je.Root, { children: [
|
|
1960
|
+
/* @__PURE__ */ d(Je.Trigger, { asChild: !0, children: /* @__PURE__ */ d(
|
|
1961
|
+
Tn,
|
|
1962
|
+
{
|
|
1963
|
+
size: "sm",
|
|
1964
|
+
intent: "outline",
|
|
1965
|
+
icon: /* @__PURE__ */ d(Ln, { "aria-hidden": "true" }),
|
|
1966
|
+
"aria-label": u("toothScheme.options.label"),
|
|
1967
|
+
tooltip: u("toothScheme.options.label")
|
|
1968
|
+
}
|
|
1969
|
+
) }),
|
|
1970
|
+
/* @__PURE__ */ d(
|
|
1971
|
+
Je.Content,
|
|
1972
|
+
{
|
|
1973
|
+
ref: nn,
|
|
1974
|
+
align: "end",
|
|
1975
|
+
size: "md",
|
|
1976
|
+
"aria-label": u("toothScheme.options.label"),
|
|
1977
|
+
children: /* @__PURE__ */ k("div", { className: "ds:flex ds:w-[var(--popover-size-sm)] ds:max-w-full ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1978
|
+
/* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:border-b ds:border-[color:var(--border)] ds:pb-[var(--spacing-sm)] ds:[&>*]:w-full ds:[&>*]:justify-between", children: [
|
|
1979
|
+
/* @__PURE__ */ d(
|
|
1980
|
+
et,
|
|
1981
|
+
{
|
|
1982
|
+
label: u("toothScheme.options.legend"),
|
|
1983
|
+
labelSide: "start",
|
|
1984
|
+
checked: mt,
|
|
1985
|
+
onCheckedChange: ht
|
|
1986
|
+
}
|
|
1987
|
+
),
|
|
1988
|
+
/* @__PURE__ */ d(
|
|
1989
|
+
et,
|
|
1990
|
+
{
|
|
1991
|
+
label: u("toothScheme.options.specialElements"),
|
|
1992
|
+
labelSide: "start",
|
|
1993
|
+
checked: V,
|
|
1994
|
+
onCheckedChange: pt
|
|
1995
|
+
}
|
|
1996
|
+
)
|
|
1997
|
+
] }),
|
|
1998
|
+
/* @__PURE__ */ d(
|
|
1999
|
+
rt,
|
|
2000
|
+
{
|
|
2001
|
+
container: He,
|
|
2002
|
+
label: u("toothScheme.options.dentition"),
|
|
2003
|
+
value: j,
|
|
2004
|
+
onValueChange: (e) => dt(e),
|
|
2005
|
+
options: [
|
|
2006
|
+
{
|
|
2007
|
+
value: "permanent",
|
|
2008
|
+
label: u("toothScheme.dentition.permanent")
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
value: "primary",
|
|
2012
|
+
label: u("toothScheme.dentition.primary")
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
value: "mixed",
|
|
2016
|
+
label: u("toothScheme.dentition.mixed")
|
|
2017
|
+
}
|
|
2018
|
+
]
|
|
2019
|
+
}
|
|
2020
|
+
),
|
|
2021
|
+
/* @__PURE__ */ d(
|
|
2022
|
+
rt,
|
|
2023
|
+
{
|
|
2024
|
+
container: He,
|
|
2025
|
+
label: u("toothScheme.options.numbering"),
|
|
2026
|
+
value: ue,
|
|
2027
|
+
onValueChange: (e) => lt(e),
|
|
2028
|
+
options: [
|
|
2029
|
+
{
|
|
2030
|
+
value: "fdi",
|
|
2031
|
+
label: u("toothScheme.numbering.fdi")
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
value: "universal",
|
|
2035
|
+
label: u("toothScheme.numbering.universal")
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
value: "palmer",
|
|
2039
|
+
label: u("toothScheme.numbering.palmer")
|
|
2040
|
+
}
|
|
2041
|
+
]
|
|
2042
|
+
}
|
|
2043
|
+
),
|
|
2044
|
+
/* @__PURE__ */ d(
|
|
2045
|
+
rt,
|
|
2046
|
+
{
|
|
2047
|
+
container: He,
|
|
2048
|
+
label: u("toothScheme.options.view"),
|
|
2049
|
+
value: he,
|
|
2050
|
+
onValueChange: (e) => ut(e),
|
|
2051
|
+
options: [
|
|
2052
|
+
{
|
|
2053
|
+
value: "side",
|
|
2054
|
+
label: u("toothScheme.view.side")
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
value: "plan",
|
|
2058
|
+
label: u("toothScheme.view.occlusal")
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
value: "both",
|
|
2062
|
+
label: u("toothScheme.view.both")
|
|
2063
|
+
}
|
|
2064
|
+
]
|
|
2065
|
+
}
|
|
2066
|
+
)
|
|
2067
|
+
] })
|
|
2068
|
+
}
|
|
2069
|
+
)
|
|
2070
|
+
] })
|
|
2071
|
+
}
|
|
2072
|
+
) : null,
|
|
2073
|
+
Re ? fn : Tt,
|
|
2074
|
+
V && (o === "interactive" || St) ? /* @__PURE__ */ d(
|
|
2075
|
+
"div",
|
|
2076
|
+
{
|
|
2077
|
+
className: "ds:flex ds:w-full ds:items-center ds:pt-[var(--spacing-2xs)]",
|
|
2078
|
+
"data-testid": "tooth-scheme-general",
|
|
2079
|
+
children: /* @__PURE__ */ d(
|
|
2080
|
+
et,
|
|
2081
|
+
{
|
|
2082
|
+
label: u("toothScheme.special.general"),
|
|
2083
|
+
labelSide: "end",
|
|
2084
|
+
checked: St,
|
|
2085
|
+
disabled: o !== "interactive",
|
|
2086
|
+
onCheckedChange: ln
|
|
2087
|
+
}
|
|
2088
|
+
)
|
|
2089
|
+
}
|
|
2090
|
+
) : null,
|
|
2091
|
+
mt ? /* @__PURE__ */ d(ar, { assetBaseUrl: A }) : null,
|
|
2092
|
+
At
|
|
2093
|
+
]
|
|
2094
|
+
}
|
|
2095
|
+
) });
|
|
2096
|
+
}
|
|
2097
|
+
);
|
|
2098
|
+
$e.displayName = "ToothScheme";
|
|
2099
|
+
export {
|
|
2100
|
+
Ie as C,
|
|
2101
|
+
Q as F,
|
|
2102
|
+
Te as P,
|
|
2103
|
+
zt as S,
|
|
2104
|
+
$e as T,
|
|
2105
|
+
Pn as a,
|
|
2106
|
+
ot as b,
|
|
2107
|
+
yr as c,
|
|
2108
|
+
Kn as d,
|
|
2109
|
+
jn as e,
|
|
2110
|
+
Ae as f,
|
|
2111
|
+
Yn as g,
|
|
2112
|
+
Wn as h,
|
|
2113
|
+
Ft as i,
|
|
2114
|
+
Ut as j,
|
|
2115
|
+
xr as k,
|
|
2116
|
+
wr as l,
|
|
2117
|
+
Zn as m,
|
|
2118
|
+
Kt as n,
|
|
2119
|
+
Fe as o,
|
|
2120
|
+
Un as p,
|
|
2121
|
+
Ke as q,
|
|
2122
|
+
Hn as r,
|
|
2123
|
+
zn as s,
|
|
2124
|
+
Zt as t,
|
|
2125
|
+
En as u,
|
|
2126
|
+
Vn as v,
|
|
2127
|
+
Ot as w,
|
|
2128
|
+
tt as x,
|
|
2129
|
+
Qn as z
|
|
2130
|
+
};
|
|
2131
|
+
//# sourceMappingURL=tooth-scheme-BhQoPNBD.js.map
|