@alfadocs/ui-kit-debug 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/_chunks/{actions-cell-renderer-ClGCSQnA.js → actions-cell-renderer-Ceah0ywE.js} +2 -2
  2. package/dist/_chunks/{actions-cell-renderer-ClGCSQnA.js.map → actions-cell-renderer-Ceah0ywE.js.map} +1 -1
  3. package/dist/_chunks/anamnesis-i18n-DGRdwc0i.js +8720 -0
  4. package/dist/_chunks/anamnesis-i18n-DGRdwc0i.js.map +1 -0
  5. package/dist/_chunks/arrow-up-BYvcvTkB.js +26 -0
  6. package/dist/_chunks/arrow-up-BYvcvTkB.js.map +1 -0
  7. package/dist/_chunks/{editable-currency-cell-renderer-Dus_sBvX.js → editable-currency-cell-renderer-Uhzkd0ZP.js} +68 -88
  8. package/dist/_chunks/editable-currency-cell-renderer-Uhzkd0ZP.js.map +1 -0
  9. package/dist/_chunks/{exceljs.min-DUJ-5CGx.js → exceljs.min-D2MHbJsF.js} +10 -9
  10. package/dist/_chunks/{exceljs.min-DUJ-5CGx.js.map → exceljs.min-D2MHbJsF.js.map} +1 -1
  11. package/dist/_chunks/{face-scheme-Cou2efl7.js → face-scheme-C00IvkUA.js} +237 -243
  12. package/dist/_chunks/face-scheme-C00IvkUA.js.map +1 -0
  13. package/dist/_chunks/{file-manager-CNSLiuLo.js → file-manager-lNjcSXoD.js} +174 -186
  14. package/dist/_chunks/file-manager-lNjcSXoD.js.map +1 -0
  15. package/dist/_chunks/minus-BQDHq1c1.js +12 -0
  16. package/dist/_chunks/minus-BQDHq1c1.js.map +1 -0
  17. package/dist/_chunks/notebook-pen-CO7HoM-W.js +25 -0
  18. package/dist/_chunks/notebook-pen-CO7HoM-W.js.map +1 -0
  19. package/dist/_chunks/{notes-panel-CCz0J140.js → notes-panel-DPsgB4Mv.js} +73 -92
  20. package/dist/_chunks/notes-panel-DPsgB4Mv.js.map +1 -0
  21. package/dist/_chunks/{patient-table-DXk0wW8Q.js → patient-table-C7QHFC63.js} +2 -2
  22. package/dist/_chunks/{patient-table-DXk0wW8Q.js.map → patient-table-C7QHFC63.js.map} +1 -1
  23. package/dist/_chunks/share-2-B49jcW2I.js +18 -0
  24. package/dist/_chunks/share-2-B49jcW2I.js.map +1 -0
  25. package/dist/_chunks/{sparkline-DJtZBe7O.js → sparkline-BTY4B5tv.js} +153 -145
  26. package/dist/_chunks/sparkline-BTY4B5tv.js.map +1 -0
  27. package/dist/agent-catalog.json +1 -1
  28. package/dist/components/data-table/index.js +2 -2
  29. package/dist/components/face-scheme/index.js +1 -1
  30. package/dist/components/file-manager/index.js +1 -1
  31. package/dist/components/index.d.ts +1 -0
  32. package/dist/components/index.d.ts.map +1 -1
  33. package/dist/components/notes-panel/index.d.ts +1 -1
  34. package/dist/components/notes-panel/index.d.ts.map +1 -1
  35. package/dist/components/notes-panel/index.js +1 -1
  36. package/dist/components/patient-table/index.js +1 -1
  37. package/dist/components/sparkline/index.js +1 -1
  38. package/dist/components/sparkline/sparkline.d.ts +5 -4
  39. package/dist/components/sparkline/sparkline.d.ts.map +1 -1
  40. package/dist/index.js +132 -109
  41. package/dist/index.js.map +1 -1
  42. package/dist/patterns/_shared/target-tile.d.ts +31 -0
  43. package/dist/patterns/_shared/target-tile.d.ts.map +1 -0
  44. package/dist/patterns/anamnesis/anamnesis-catalogue.d.ts +23 -0
  45. package/dist/patterns/anamnesis/anamnesis-catalogue.d.ts.map +1 -0
  46. package/dist/patterns/anamnesis/anamnesis-compare-panel.d.ts +82 -0
  47. package/dist/patterns/anamnesis/anamnesis-compare-panel.d.ts.map +1 -0
  48. package/dist/patterns/anamnesis/anamnesis-compile-blocks.d.ts +46 -0
  49. package/dist/patterns/anamnesis/anamnesis-compile-blocks.d.ts.map +1 -0
  50. package/dist/patterns/anamnesis/anamnesis-compile.d.ts +48 -0
  51. package/dist/patterns/anamnesis/anamnesis-compile.d.ts.map +1 -0
  52. package/dist/patterns/anamnesis/anamnesis-config-editor.d.ts +26 -0
  53. package/dist/patterns/anamnesis/anamnesis-config-editor.d.ts.map +1 -0
  54. package/dist/patterns/anamnesis/anamnesis-config.d.ts +62 -0
  55. package/dist/patterns/anamnesis/anamnesis-config.d.ts.map +1 -0
  56. package/dist/patterns/anamnesis/anamnesis-derive.d.ts +194 -0
  57. package/dist/patterns/anamnesis/anamnesis-derive.d.ts.map +1 -0
  58. package/dist/patterns/anamnesis/anamnesis-digest.d.ts +84 -0
  59. package/dist/patterns/anamnesis/anamnesis-digest.d.ts.map +1 -0
  60. package/dist/patterns/anamnesis/anamnesis-disclosure.d.ts +19 -0
  61. package/dist/patterns/anamnesis/anamnesis-disclosure.d.ts.map +1 -0
  62. package/dist/patterns/anamnesis/anamnesis-event-bar.d.ts +12 -0
  63. package/dist/patterns/anamnesis/anamnesis-event-bar.d.ts.map +1 -0
  64. package/dist/patterns/anamnesis/anamnesis-events.d.ts +60 -0
  65. package/dist/patterns/anamnesis/anamnesis-events.d.ts.map +1 -0
  66. package/dist/patterns/anamnesis/anamnesis-evolution-grid.d.ts +48 -0
  67. package/dist/patterns/anamnesis/anamnesis-evolution-grid.d.ts.map +1 -0
  68. package/dist/patterns/anamnesis/anamnesis-evolution.d.ts +37 -0
  69. package/dist/patterns/anamnesis/anamnesis-evolution.d.ts.map +1 -0
  70. package/dist/patterns/anamnesis/anamnesis-export-download.d.ts +10 -0
  71. package/dist/patterns/anamnesis/anamnesis-export-download.d.ts.map +1 -0
  72. package/dist/patterns/anamnesis/anamnesis-export-menu.d.ts +23 -0
  73. package/dist/patterns/anamnesis/anamnesis-export-menu.d.ts.map +1 -0
  74. package/dist/patterns/anamnesis/anamnesis-export-pdf.d.ts +36 -0
  75. package/dist/patterns/anamnesis/anamnesis-export-pdf.d.ts.map +1 -0
  76. package/dist/patterns/anamnesis/anamnesis-export.d.ts +143 -0
  77. package/dist/patterns/anamnesis/anamnesis-export.d.ts.map +1 -0
  78. package/dist/patterns/anamnesis/anamnesis-field.d.ts +14 -0
  79. package/dist/patterns/anamnesis/anamnesis-field.d.ts.map +1 -0
  80. package/dist/patterns/anamnesis/anamnesis-format.d.ts +67 -0
  81. package/dist/patterns/anamnesis/anamnesis-format.d.ts.map +1 -0
  82. package/dist/patterns/anamnesis/anamnesis-i18n.d.ts +6 -0
  83. package/dist/patterns/anamnesis/anamnesis-i18n.d.ts.map +1 -0
  84. package/dist/patterns/anamnesis/anamnesis-indicators.d.ts +53 -0
  85. package/dist/patterns/anamnesis/anamnesis-indicators.d.ts.map +1 -0
  86. package/dist/patterns/anamnesis/anamnesis-intake.d.ts +16 -0
  87. package/dist/patterns/anamnesis/anamnesis-intake.d.ts.map +1 -0
  88. package/dist/patterns/anamnesis/anamnesis-matrix.d.ts +91 -0
  89. package/dist/patterns/anamnesis/anamnesis-matrix.d.ts.map +1 -0
  90. package/dist/patterns/anamnesis/anamnesis-notes.d.ts +19 -0
  91. package/dist/patterns/anamnesis/anamnesis-notes.d.ts.map +1 -0
  92. package/dist/patterns/anamnesis/anamnesis-readonly.d.ts +17 -0
  93. package/dist/patterns/anamnesis/anamnesis-readonly.d.ts.map +1 -0
  94. package/dist/patterns/anamnesis/anamnesis-summary.d.ts +35 -0
  95. package/dist/patterns/anamnesis/anamnesis-summary.d.ts.map +1 -0
  96. package/dist/patterns/anamnesis/anamnesis-target-editor.d.ts +18 -0
  97. package/dist/patterns/anamnesis/anamnesis-target-editor.d.ts.map +1 -0
  98. package/dist/patterns/anamnesis/anamnesis-target-strip.d.ts +14 -0
  99. package/dist/patterns/anamnesis/anamnesis-target-strip.d.ts.map +1 -0
  100. package/dist/patterns/anamnesis/anamnesis-targets.d.ts +58 -0
  101. package/dist/patterns/anamnesis/anamnesis-targets.d.ts.map +1 -0
  102. package/dist/patterns/anamnesis/anamnesis-types.d.ts +336 -0
  103. package/dist/patterns/anamnesis/anamnesis-types.d.ts.map +1 -0
  104. package/dist/patterns/anamnesis/anamnesis-visit-note.d.ts +35 -0
  105. package/dist/patterns/anamnesis/anamnesis-visit-note.d.ts.map +1 -0
  106. package/dist/patterns/anamnesis/anamnesis-window.d.ts +37 -0
  107. package/dist/patterns/anamnesis/anamnesis-window.d.ts.map +1 -0
  108. package/dist/patterns/anamnesis/anamnesis.d.ts +48 -0
  109. package/dist/patterns/anamnesis/anamnesis.d.ts.map +1 -0
  110. package/dist/patterns/anamnesis/index.d.ts +8 -0
  111. package/dist/patterns/anamnesis/index.d.ts.map +1 -0
  112. package/dist/patterns/anamnesis/index.js +26 -0
  113. package/dist/patterns/anamnesis/index.js.map +1 -0
  114. package/dist/tokens.css +1 -1
  115. package/package.json +5 -1
  116. package/dist/_chunks/editable-currency-cell-renderer-Dus_sBvX.js.map +0 -1
  117. package/dist/_chunks/face-scheme-Cou2efl7.js.map +0 -1
  118. package/dist/_chunks/file-manager-CNSLiuLo.js.map +0 -1
  119. package/dist/_chunks/notes-panel-CCz0J140.js.map +0 -1
  120. package/dist/_chunks/sparkline-DJtZBe7O.js.map +0 -1
@@ -15,44 +15,38 @@ import { C as Oe } from "./card-DPmk26CL.js";
15
15
  import { S as Tt } from "./separator-CYU_bGFn.js";
16
16
  import { S as ns } from "./slider-DN1CWkKB.js";
17
17
  import { S as rs } from "./switch-OILsBLWo.js";
18
- import { c as be } from "./createLucideIcon-DhHxpK9K.js";
18
+ import { c as Ee } from "./createLucideIcon-DhHxpK9K.js";
19
19
  import { T as is } from "./type-ggmfVs23.js";
20
20
  import { C as ss } from "./circle-j7oZoouK.js";
21
21
  import { S as os } from "./square-DASBRZ0U.js";
22
- import { A as as } from "./arrow-up-right-C2v_MKsK.js";
23
- import { H as cs } from "./highlighter-DSkckT2Q.js";
24
- import { M as ls } from "./map-pin-BaY37-Km.js";
25
- import { E as ds } from "./eraser-CHOGQfVv.js";
26
- import { T as us } from "./trash-2-uumy3fy1.js";
27
- import { C as fs } from "./camera-VSklPDCv.js";
28
- import { U as hs } from "./upload-BfT2hzMg.js";
29
- import { Z as ms, a as ps } from "./zoom-out-Dnif4kJx.js";
30
- import { M as gs } from "./maximize-2-BYd2Kti7.js";
22
+ import { M as as } from "./minus-BQDHq1c1.js";
23
+ import { A as cs } from "./arrow-up-right-C2v_MKsK.js";
24
+ import { H as ls } from "./highlighter-DSkckT2Q.js";
25
+ import { M as ds } from "./map-pin-BaY37-Km.js";
26
+ import { E as us } from "./eraser-CHOGQfVv.js";
27
+ import { T as fs } from "./trash-2-uumy3fy1.js";
28
+ import { C as hs } from "./camera-VSklPDCv.js";
29
+ import { U as ms } from "./upload-BfT2hzMg.js";
30
+ import { Z as ps, a as gs } from "./zoom-out-Dnif4kJx.js";
31
+ import { M as ys } from "./maximize-2-BYd2Kti7.js";
31
32
  /**
32
33
  * @license lucide-react v1.22.0 - ISC
33
34
  *
34
35
  * This source code is licensed under the ISC license.
35
36
  * See the LICENSE file in the root directory of this source tree.
36
37
  */
37
- const ys = [
38
+ const xs = [
38
39
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
39
40
  ["path", { d: "M9 3v18", key: "fh3hqa" }],
40
41
  ["path", { d: "M15 3v18", key: "14nvp0" }]
41
- ], xs = be("columns-3", ys);
42
+ ], vs = Ee("columns-3", xs);
42
43
  /**
43
44
  * @license lucide-react v1.22.0 - ISC
44
45
  *
45
46
  * This source code is licensed under the ISC license.
46
47
  * See the LICENSE file in the root directory of this source tree.
47
48
  */
48
- const vs = [["path", { d: "M5 12h14", key: "1ays0h" }]], ws = be("minus", vs);
49
- /**
50
- * @license lucide-react v1.22.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- */
55
- const ks = [
49
+ const ws = [
56
50
  [
57
51
  "path",
58
52
  {
@@ -60,14 +54,14 @@ const ks = [
60
54
  key: "edeuup"
61
55
  }
62
56
  ]
63
- ], bs = be("mouse-pointer-2", ks);
57
+ ], ks = Ee("mouse-pointer-2", ws);
64
58
  /**
65
59
  * @license lucide-react v1.22.0 - ISC
66
60
  *
67
61
  * This source code is licensed under the ISC license.
68
62
  * See the LICENSE file in the root directory of this source tree.
69
63
  */
70
- const Cs = [
64
+ const bs = [
71
65
  [
72
66
  "path",
73
67
  {
@@ -75,14 +69,14 @@ const Cs = [
75
69
  key: "1a8usu"
76
70
  }
77
71
  ]
78
- ], Ss = be("pen", Cs);
72
+ ], Cs = Ee("pen", bs);
79
73
  /**
80
74
  * @license lucide-react v1.22.0 - ISC
81
75
  *
82
76
  * This source code is licensed under the ISC license.
83
77
  * See the LICENSE file in the root directory of this source tree.
84
78
  */
85
- const Ms = [
79
+ const Ss = [
86
80
  [
87
81
  "path",
88
82
  { d: "M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13", key: "orapub" }
@@ -104,39 +98,39 @@ const Ms = [
104
98
  }
105
99
  ],
106
100
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
107
- ], Ns = be("pencil-ruler", Ms);
101
+ ], Ms = Ee("pencil-ruler", Ss);
108
102
  /**
109
103
  * @license lucide-react v1.22.0 - ISC
110
104
  *
111
105
  * This source code is licensed under the ISC license.
112
106
  * See the LICENSE file in the root directory of this source tree.
113
107
  */
114
- const Is = [
108
+ const Ns = [
115
109
  ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
116
110
  ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
117
- ], As = be("undo-2", Is);
111
+ ], Is = Ee("undo-2", Ns);
118
112
  /**
119
113
  * @license lucide-react v1.22.0 - ISC
120
114
  *
121
115
  * This source code is licensed under the ISC license.
122
116
  * See the LICENSE file in the root directory of this source tree.
123
117
  */
124
- const Ts = [
118
+ const As = [
125
119
  ["path", { d: "m19 16-3 3", key: "lp3y45" }],
126
120
  ["path", { d: "M2 21a8 8 0 0 1 12.664-6.5", key: "1ap0vn" }],
127
121
  ["path", { d: "M22 19h-6l3 3", key: "13fjle" }],
128
122
  ["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }]
129
- ], Tr = be("user-round-arrow-left", Ts);
123
+ ], Tr = Ee("user-round-arrow-left", As);
130
124
  /**
131
125
  * @license lucide-react v1.22.0 - ISC
132
126
  *
133
127
  * This source code is licensed under the ISC license.
134
128
  * See the LICENSE file in the root directory of this source tree.
135
129
  */
136
- const _s = [
130
+ const Ts = [
137
131
  ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
138
132
  ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
139
- ], Es = be("user-round", _s), zs = {
133
+ ], Es = Ee("user-round", Ts), _s = {
140
134
  type: "string",
141
135
  enum: [
142
136
  "none",
@@ -153,13 +147,13 @@ const _s = [
153
147
  }, ke = {
154
148
  type: "string",
155
149
  description: "Face-zone id (e.g. 'glabella', 'nasolabialFold', 'forehead', 'mandibularAngleLeft' on the front view; 'cheekbone', 'masseter', 'chin' on a profile view)."
156
- }, Ls = {
150
+ }, zs = {
157
151
  type: "string",
158
152
  enum: ["front", "profile-left", "profile-right"],
159
153
  description: "Active view id: 'front', 'profile-left', or 'profile-right'."
160
154
  }, nt = {
161
155
  enum: ["observation", "treatment", "concern", "note"]
162
- }, Rs = {
156
+ }, Ls = {
163
157
  id: "face-scheme",
164
158
  // pick — focus a zone (transient); set_value / edit_inline — record / clear
165
159
  // findings on a zone; view_change — switch the active view (front / left /
@@ -354,7 +348,7 @@ const _s = [
354
348
  argsType: "{ view: FaceViewId }",
355
349
  argsSchema: {
356
350
  type: "object",
357
- properties: { view: Ls },
351
+ properties: { view: zs },
358
352
  required: ["view"]
359
353
  },
360
354
  idempotent: !0,
@@ -386,7 +380,7 @@ const _s = [
386
380
  argsType: "{ tool: FaceAnnotationTool | 'none' }",
387
381
  argsSchema: {
388
382
  type: "object",
389
- properties: { tool: zs },
383
+ properties: { tool: _s },
390
384
  required: ["tool"]
391
385
  },
392
386
  idempotent: !0,
@@ -520,7 +514,7 @@ const _s = [
520
514
  description: 'Each clickable zone `<g>` carries its zone id as `data-zone` (plus `data-side` for the anatomical side, and `data-zone-selected="true"` while in the multi-selection). Each free-form annotation `<g>` carries `data-annotation` (its id), `data-annotation-kind`, `data-annotation-zone` (its linked zone id, when linked), and `data-selected="true"` while selected. The root `<div>` carries the active view id as `data-view` — only the zones for the active view are in the DOM.'
521
515
  }
522
516
  }
523
- }, $s = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.18/vision_bundle.mjs", Fs = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.18/wasm", Ks = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task", Zs = {
517
+ }, Rs = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.18/vision_bundle.mjs", $s = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.18/wasm", Fs = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task", Ks = {
524
518
  "right-eye": [33, 133],
525
519
  // subject's right eye, outer + inner corners
526
520
  "left-eye": [263, 362],
@@ -535,7 +529,7 @@ const _s = [
535
529
  subnasale: [2]
536
530
  // base of the nose / top of the philtrum
537
531
  }, wn = /* @__PURE__ */ new Map();
538
- function Os(n, r, o, l) {
532
+ function Zs(n, r, o, l) {
539
533
  const d = `${n}|${r}|${o}`, c = wn.get(d);
540
534
  if (c) return c;
541
535
  l == null || l("loading");
@@ -552,23 +546,23 @@ function Os(n, r, o, l) {
552
546
  })();
553
547
  return wn.set(d, m), m.catch(() => wn.delete(d)), m;
554
548
  }
555
- function Ps(n) {
549
+ function Os(n) {
556
550
  const r = new Image();
557
551
  return r.crossOrigin = "anonymous", r.src = n, r.decode().then(() => r);
558
552
  }
559
- async function Ds(n, r) {
553
+ async function Ps(n, r) {
560
554
  if (typeof window > "u" || typeof Image > "u")
561
555
  throw new Error("detectFaceLandmarks runs in the browser only.");
562
556
  const {
563
557
  viewWidth: o,
564
558
  viewHeight: l,
565
- visionModuleUrl: d = $s,
566
- wasmBaseUrl: c = Fs,
567
- modelAssetPath: m = Ks,
559
+ visionModuleUrl: d = Rs,
560
+ wasmBaseUrl: c = $s,
561
+ modelAssetPath: m = Fs,
568
562
  onStage: h
569
563
  } = r, [p, y] = await Promise.all([
570
- Ps(n),
571
- Os(d, c, m, h)
564
+ Os(n),
565
+ Zs(d, c, m, h)
572
566
  ]);
573
567
  h == null || h("detecting");
574
568
  const b = y.detect(p).faceLandmarks[0];
@@ -577,10 +571,10 @@ async function Ds(n, r) {
577
571
  x: L + R.x * v * w,
578
572
  y: X + R.y * k * w
579
573
  }), I = [];
580
- for (const [R, H] of Object.entries(Zs)) {
574
+ for (const [R, H] of Object.entries(Ks)) {
581
575
  let q = 0, pe = 0, re = 0;
582
- for (const Ce of H) {
583
- const le = b[Ce];
576
+ for (const be of H) {
577
+ const le = b[be];
584
578
  if (!le) continue;
585
579
  const ge = $(le);
586
580
  q += ge.x, pe += ge.y, re++;
@@ -589,14 +583,14 @@ async function Ds(n, r) {
589
583
  }
590
584
  return I.length >= 3 ? I : null;
591
585
  }
592
- const Bs = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/ort.min.mjs", js = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/", F = 640, Ws = [8, 16, 32], Hs = [
586
+ const Ds = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/ort.min.mjs", Bs = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/", F = 640, js = [8, 16, 32], Ws = [
593
587
  "right-eye",
594
588
  "left-eye",
595
589
  "nose-tip",
596
590
  "mouth-right",
597
591
  "mouth-left"
598
592
  ], kn = /* @__PURE__ */ new Map();
599
- async function Vs(n, r, o, l) {
593
+ async function Hs(n, r, o, l) {
600
594
  const d = `${n}|${r}|${o}`, c = kn.get(d);
601
595
  if (c) return c;
602
596
  l == null || l("loading");
@@ -613,14 +607,14 @@ async function Vs(n, r, o, l) {
613
607
  })();
614
608
  return kn.set(d, m), m.catch(() => kn.delete(d)), m;
615
609
  }
616
- function Us(n) {
610
+ function Vs(n) {
617
611
  const r = new Image();
618
612
  return r.crossOrigin = "anonymous", r.src = n, r.decode().then(() => r);
619
613
  }
620
- async function Ys() {
614
+ async function Us() {
621
615
  return (await import("./face_detection_yunet_2023mar-BnsRs4bD.js")).default;
622
616
  }
623
- function Xs(n, r) {
617
+ function Ys(n, r) {
624
618
  const o = r.naturalWidth || r.width, l = r.naturalHeight || r.height, d = Math.min(F / o, F / l), c = Math.round(o * d), m = Math.round(l * d), h = Math.floor((F - c) / 2), p = Math.floor((F - m) / 2), y = document.createElement("canvas");
625
619
  y.width = F, y.height = F;
626
620
  const S = y.getContext("2d");
@@ -636,8 +630,8 @@ function Xs(n, r) {
636
630
  padY: p
637
631
  };
638
632
  }
639
- const _r = (n) => 1 / (1 + Math.exp(-n));
640
- function qs(n, r) {
633
+ const Er = (n) => 1 / (1 + Math.exp(-n));
634
+ function Xs(n, r) {
641
635
  let o = !1;
642
636
  const l = n.cls_8.data;
643
637
  for (let c = 0; c < Math.min(l.length, 256); c++)
@@ -646,11 +640,11 @@ function qs(n, r) {
646
640
  break;
647
641
  }
648
642
  let d = null;
649
- for (const c of Ws) {
643
+ for (const c of js) {
650
644
  const m = n[`cls_${c}`].data, h = n[`obj_${c}`].data, p = n[`kps_${c}`].data, y = F / c, S = F / c, b = y * S;
651
645
  for (let v = 0; v < b; v++) {
652
646
  let k = m[v], w = h[v];
653
- o && (k = _r(k), w = _r(w)), k = Math.min(Math.max(k, 0), 1), w = Math.min(Math.max(w, 0), 1);
647
+ o && (k = Er(k), w = Er(w)), k = Math.min(Math.max(k, 0), 1), w = Math.min(Math.max(w, 0), 1);
654
648
  const L = Math.sqrt(k * w);
655
649
  if (L < r || d && L <= d.score) continue;
656
650
  const X = v % y, $ = Math.floor(v / y), I = [];
@@ -664,29 +658,29 @@ function qs(n, r) {
664
658
  }
665
659
  return d;
666
660
  }
667
- async function Gs(n, r) {
661
+ async function qs(n, r) {
668
662
  if (typeof window > "u" || typeof Image > "u")
669
663
  throw new Error("detectFaceYuNet runs in the browser only.");
670
664
  const {
671
665
  viewWidth: o,
672
666
  viewHeight: l,
673
- ortModuleUrl: d = Bs,
674
- ortWasmBaseUrl: c = js,
675
- modelUrl: m = await Ys(),
667
+ ortModuleUrl: d = Ds,
668
+ ortWasmBaseUrl: c = Bs,
669
+ modelUrl: m = await Us(),
676
670
  scoreThreshold: h = 0.6,
677
671
  onStage: p
678
672
  } = r, [y, { ort: S, session: b }] = await Promise.all([
679
- Us(n),
680
- Vs(d, c, m, p)
673
+ Vs(n),
674
+ Hs(d, c, m, p)
681
675
  ]);
682
676
  p == null || p("detecting");
683
- const { tensor: v, scale: k, padX: w, padY: L } = Xs(S.Tensor, y), X = await b.run({ [b.inputNames[0]]: v }), $ = qs(X, h);
677
+ const { tensor: v, scale: k, padX: w, padY: L } = Ys(S.Tensor, y), X = await b.run({ [b.inputNames[0]]: v }), $ = Xs(X, h);
684
678
  if (!$) return null;
685
679
  const I = y.naturalWidth || y.width, R = y.naturalHeight || y.height, H = Math.max(o / I, l / R), q = (o - I * H) / 2, pe = (l - R * H) / 2;
686
- return $.keypoints.map(([re, Ce], le) => {
687
- const ge = (re - w) / k, ye = (Ce - L) / k;
680
+ return $.keypoints.map(([re, be], le) => {
681
+ const ge = (re - w) / k, ye = (be - L) / k;
688
682
  return {
689
- id: Hs[le],
683
+ id: Ws[le],
690
684
  photo: {
691
685
  x: q + ge * H,
692
686
  y: pe + ye * H
@@ -698,7 +692,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
698
692
  id: "faceContour",
699
693
  labelKey: "faceContour",
700
694
  d: "M688.38,439.4c-9.78,0-15.37,4.04-17.86,6.47,1.31-10.99,2.5-20.62,3.49-28.2,7.55-57.89,5.03-94.39,5.03-94.39-15.15-165.92-111.73-221.46-186.21-239.39h0s-.1-.02-.1-.02c-6.18-1.49-12.21-2.72-18.02-3.73l-.96-.2c-46.02-9.51-93.5-9.51-139.52,0l-.95.2c-5.82,1.01-11.85,2.24-18.04,3.73l-.08.02h0c-74.48,17.94-171.06,73.48-186.21,239.39,0,0-2.52,36.5,5.03,94.39,1,7.68,2.2,17.45,3.53,28.61-2.25-2.35-7.91-6.88-18.26-6.88-13.97,0-29.06,16.21-20.12,63.71,8.94,47.5,17.3,80.48,18.43,97.24,1.11,16.47,24.08,47.91,41.43,38.23.9,8.33,1.42,13.17,1.42,13.17,0,0,8.81,59.15,56.63,104.46,12.62,11.95,25.84,23.46,38.49,33.94,7.14-4.56,24-16.96,29.06-35.21.9-3.24,1.73-6.33,2.52-9.29,2.46-9.17,4.59-17.1,7.4-24.46,3.44-9.01,7.62-16.28,13.25-23.04-47.54-46.57-49.82-89.3-48.75-104.93-21.75-2.47-38.06-19.4-47.37-49.37-7.27-23.39-7.77-46.39-7.79-47.36-.02-1.34.43-2.57,1.21-3.54-.47-2.21-.65-3.58-.67-3.77-.28-2.23.97-4.38,3.05-5.24.34-.14.69-.23,1.04-.29.47-3.26,2.23-10.86,8.8-18.21,10.82-12.11,28.95-17.92,53.93-17.22,41.5,1.13,55.11,17.49,59.58,28.15,1.45.85,2.49,2.34,2.68,4.14,0,.05.02.21.05.45.22.48.36,1,.42,1.56.04.41.34,3.71.16,8.68.17,6.11.1,14.39-.75,23.68-.27,2.9-.6,5.73-.98,8.49,4.1-9.94,7.68-20.29,11.15-30.32l.31-.89-10.84-54.18c-2.15-3.39-8.76-12.5-21.75-19.51-21.63-11.68-51.16-12.3-85.4-1.8-2.58.79-5.32-.61-6.19-3.16l-53.03-154.45c-.88-1.09-1.31-2.52-1.05-4.01.26-1.43,6.68-35.35,39.46-69.52,19.15-19.96,43.37-35.84,72.01-47.21,35.3-14.02,77.45-21.18,125.28-21.27h0s.98,0,.98,0c47.83.1,89.98,7.25,125.28,21.27,28.63,11.37,52.86,27.26,72.01,47.21,30.62,31.92,38.24,63.61,39.32,68.82.29.8.42,1.35.47,1.59.17.87.11,1.77-.17,2.61l-53.21,154.96c-.88,2.55-3.62,3.95-6.19,3.16-34.24-10.5-63.77-9.88-85.4,1.8-11.42,6.17-17.92,13.96-20.78,18.06l-11.25,56.25.04.11c2.95,8.52,5.98,17.28,9.34,25.81-.14-1.26-.28-2.53-.4-3.82-.53-5.79-.75-11.19-.81-15.92-1.11-9.09-.51-15.85-.45-16.44.11-1.1.59-2.08,1.3-2.85.19-.72.52-1.37.96-1.94,3.86-10.54,16.77-28.3,60.04-29.48,24.93-.69,43.04,5.1,53.85,17.2,6.53,7.3,8.3,14.85,8.78,18.13.53.04,1.05.16,1.56.37,2.08.86,3.32,3.01,3.05,5.24-.02.14-.12.93-.37,2.25,1.7.96,2.84,2.8,2.8,4.89-.02.97-.52,23.97-7.79,47.36-8.99,28.91-24.49,45.69-45.11,49.05,1.16,15.29-.68,58.78-49.42,106.1,5.35,6.56,9.36,13.63,12.68,22.33,2.81,7.36,4.94,15.28,7.4,24.45.79,2.96,1.62,6.05,2.52,9.29,5.07,18.28,21.97,30.69,29.09,35.23,12.65-10.48,25.88-21.99,38.5-33.95,47.82-45.31,56.63-104.46,56.63-104.46,0,0,.51-4.77,1.4-13,17.31,9.1,39.99-22.04,41.09-38.41,1.13-16.77,9.49-49.74,18.43-97.24,8.94-47.5-6.15-63.71-20.12-63.71Z"
701
- }, Js = [
695
+ }, Gs = [
702
696
  {
703
697
  id: "lateralNeckRight",
704
698
  labelKey: "lateralNeckRight",
@@ -875,7 +869,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
875
869
  cy: 487,
876
870
  side: "left"
877
871
  }
878
- ], Qs = [
872
+ ], Js = [
879
873
  { id: "right-eye", labelKey: "rightEye", x: 268, y: 487 },
880
874
  { id: "left-eye", labelKey: "leftEye", x: 535, y: 487 },
881
875
  { id: "nose-tip", labelKey: "noseTip", x: 403, y: 620 },
@@ -951,7 +945,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
951
945
  cx: 552,
952
946
  cy: 369
953
947
  }
954
- ], Er = Wr.find((n) => n.id === "profileContour") ?? jr, zr = Wr.filter(
948
+ ], _r = Wr.find((n) => n.id === "profileContour") ?? jr, zr = Wr.filter(
955
949
  (n) => n.id !== "profileContour"
956
950
  ).map((n) => ({
957
951
  id: n.id,
@@ -974,8 +968,8 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
974
968
  pivot: Cn,
975
969
  contour: jr,
976
970
  // The generator guarantees every clickable zone carries cx/cy/side.
977
- zones: Js,
978
- landmarks: Qs
971
+ zones: Gs,
972
+ landmarks: Js
979
973
  },
980
974
  // The reshaped profile zones face +x; the right profile is the same mesh
981
975
  // mirrored. Both fit on the eye/nose-tip/mouth anchors — auto-detect and manual
@@ -987,7 +981,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
987
981
  schematicViewBox: "359 189 287 475",
988
982
  meshContentBox: { x: 383, y: 213, width: 239, height: 427 },
989
983
  pivot: Cn,
990
- contour: Er,
984
+ contour: _r,
991
985
  zones: zr,
992
986
  landmarks: Lr
993
987
  },
@@ -998,12 +992,12 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
998
992
  schematicViewBox: "162 189 287 475",
999
993
  meshContentBox: { x: 383, y: 213, width: 239, height: 427 },
1000
994
  pivot: Cn,
1001
- contour: Er,
995
+ contour: _r,
1002
996
  zones: zr,
1003
997
  landmarks: Lr,
1004
998
  mirror: !0
1005
999
  }
1006
- }, eo = [
1000
+ }, Qs = [
1007
1001
  "front",
1008
1002
  "profile-left",
1009
1003
  "profile-right"
@@ -1012,12 +1006,12 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
1012
1006
  "treatment",
1013
1007
  "concern",
1014
1008
  "note"
1015
- ], _t = {
1009
+ ], Et = {
1016
1010
  observation: { shape: "circle", tone: "info" },
1017
1011
  treatment: { shape: "square", tone: "success" },
1018
1012
  concern: { shape: "triangle", tone: "warning" },
1019
1013
  note: { shape: "diamond", tone: "neutral" }
1020
- }, to = [
1014
+ }, eo = [
1021
1015
  "marker",
1022
1016
  "pen",
1023
1017
  "highlighter",
@@ -1072,11 +1066,11 @@ function Nn(n, r, o) {
1072
1066
  }
1073
1067
  }
1074
1068
  }
1075
- function no(n, r, o = 16) {
1069
+ function to(n, r, o = 16) {
1076
1070
  const l = r.x - n.x, d = r.y - n.y, c = Math.hypot(l, d) || 1, m = l / c, h = d / c, p = 0.5, y = Math.cos(p), S = Math.sin(p), b = r.x - o * (m * y - h * S), v = r.y - o * (h * y + m * S), k = r.x - o * (m * y + h * S), w = r.y - o * (h * y - m * S);
1077
1071
  return `M ${r.x} ${r.y} L ${b} ${v} M ${r.x} ${r.y} L ${k} ${w}`;
1078
1072
  }
1079
- function ro(n) {
1073
+ function no(n) {
1080
1074
  switch (n.kind) {
1081
1075
  case "marker":
1082
1076
  case "text":
@@ -1095,7 +1089,7 @@ function ro(n) {
1095
1089
  }
1096
1090
  }
1097
1091
  }
1098
- function io(n) {
1092
+ function ro(n) {
1099
1093
  switch (n.kind) {
1100
1094
  case "marker":
1101
1095
  case "text":
@@ -1112,8 +1106,8 @@ function io(n) {
1112
1106
  return { x: (n.from.x + n.to.x) / 2, y: (n.from.y + n.to.y) / 2 };
1113
1107
  }
1114
1108
  }
1115
- const so = 28, Mn = 26;
1116
- function oo(n, r = 30) {
1109
+ const io = 28, Mn = 26;
1110
+ function so(n, r = 30) {
1117
1111
  switch (n.kind) {
1118
1112
  case "marker":
1119
1113
  return { type: "circle", cx: n.x, cy: n.y, r: Mn };
@@ -1138,7 +1132,7 @@ function oo(n, r = 30) {
1138
1132
  }
1139
1133
  }
1140
1134
  const De = [1, 0, 0, 1, 0, 0];
1141
- function Et(n) {
1135
+ function _t(n) {
1142
1136
  return `matrix(${n[0]} ${n[1]} ${n[2]} ${n[3]} ${n[4]} ${n[5]})`;
1143
1137
  }
1144
1138
  function rt(n, r) {
@@ -1147,13 +1141,13 @@ function rt(n, r) {
1147
1141
  y: n[1] * r.x + n[3] * r.y + n[5]
1148
1142
  };
1149
1143
  }
1150
- function ao(n) {
1144
+ function oo(n) {
1151
1145
  const r = n[0] * n[3] - n[1] * n[2], o = n[3] / r, l = -n[1] / r, d = -n[2] / r, c = n[0] / r;
1152
1146
  return [o, l, d, c, -(o * n[4] + d * n[5]), -(l * n[4] + c * n[5])];
1153
1147
  }
1154
- const co = 0.84;
1148
+ const ao = 0.84;
1155
1149
  function $r(n, r, o, l = {}) {
1156
- const d = `0 0 ${o.width} ${o.height}`, c = l.fraction ?? co;
1150
+ const d = `0 0 ${o.width} ${o.height}`, c = l.fraction ?? ao;
1157
1151
  if (c <= 0 || c > 1) return d;
1158
1152
  const m = [
1159
1153
  { x: n.x, y: n.y },
@@ -1176,12 +1170,12 @@ function $r(n, r, o, l = {}) {
1176
1170
  const X = Math.min(Math.max(h + b / 2 - L / 2, 0), o.width - L), $ = Math.min(Math.max(p + v / 2 - w / 2, 0), o.height - w);
1177
1171
  return `${Math.round(X)} ${Math.round($)} ${Math.round(L)} ${Math.round(w)}`;
1178
1172
  }
1179
- const lo = 1, Vr = 8, it = { k: 1, fx: 0.5, fy: 0.5 }, Be = (n) => Math.min(Math.max(n, 0), 1);
1173
+ const co = 1, Vr = 8, it = { k: 1, fx: 0.5, fy: 0.5 }, Be = (n) => Math.min(Math.max(n, 0), 1);
1180
1174
  function zt(n) {
1181
1175
  const [r = 0, o = 0, l = 0, d = 0] = n.split(/\s+/).map(Number);
1182
1176
  return { x: r, y: o, width: l, height: d };
1183
1177
  }
1184
- function uo(n) {
1178
+ function lo(n) {
1185
1179
  return `${Math.round(n.x)} ${Math.round(n.y)} ${Math.round(n.width)} ${Math.round(n.height)}`;
1186
1180
  }
1187
1181
  function st(n, r) {
@@ -1195,7 +1189,7 @@ function st(n, r) {
1195
1189
  };
1196
1190
  }
1197
1191
  function Fr(n, r, o, l) {
1198
- const d = Math.min(Math.max(r.k * l, lo), Vr);
1192
+ const d = Math.min(Math.max(r.k * l, co), Vr);
1199
1193
  if (d <= 1) return it;
1200
1194
  if (d === r.k || !Number.isFinite(d)) return r;
1201
1195
  const c = st(n, r), m = n.width / d, h = n.height / d, p = c.width > 0 ? Be((o.x - c.x) / c.width) : 0.5, y = c.height > 0 ? Be((o.y - c.y) / c.height) : 0.5, S = o.x - p * m, b = o.y - y * h, v = n.width - m, k = n.height - h;
@@ -1205,7 +1199,7 @@ function Fr(n, r, o, l) {
1205
1199
  fy: k > 0 ? Be((b - n.y) / k) : 0.5
1206
1200
  };
1207
1201
  }
1208
- function fo(n, r, o, l) {
1202
+ function uo(n, r, o, l) {
1209
1203
  if (r.k <= 1) return r;
1210
1204
  const d = st(n, r), c = n.width - d.width, m = n.height - d.height;
1211
1205
  return {
@@ -1215,11 +1209,11 @@ function fo(n, r, o, l) {
1215
1209
  };
1216
1210
  }
1217
1211
  const Ft = Math.PI / 180;
1218
- function ho(n, r) {
1212
+ function fo(n, r) {
1219
1213
  const o = n.rotation * Ft, l = Math.cos(o), d = Math.sin(o), c = Math.tan(n.shear * Ft), m = n.scaleX * l, h = n.scaleX * d, p = n.scaleY * (c * l - d), y = n.scaleY * (c * d + l), S = n.translateX + r.x - (m * r.x + p * r.y), b = n.translateY + r.y - (h * r.x + y * r.y);
1220
1214
  return [m, h, p, y, S, b];
1221
1215
  }
1222
- function mo(n, r) {
1216
+ function ho(n, r) {
1223
1217
  const [o, l, d, c, m, h] = n, p = Math.hypot(o, l), y = Math.atan2(l, o) / Ft, S = o * c - l * d, b = p === 0 ? 0 : S / p, v = Math.atan2(o * d + l * c, S) / Ft, k = m - r.x + (o * r.x + d * r.y), w = h - r.y + (l * r.x + c * r.y);
1224
1218
  return { scaleX: p, scaleY: b, rotation: y, shear: v, translateX: k, translateY: w };
1225
1219
  }
@@ -1228,19 +1222,19 @@ function Kr(n, r) {
1228
1222
  if (o < 3) return De;
1229
1223
  let l = 0, d = 0, c = 0, m = 0, h = 0, p = 0, y = 0, S = 0, b = 0, v = 0, k = 0;
1230
1224
  for (let ie = 0; ie < o; ie++) {
1231
- const E = n[ie], D = r[ie];
1232
- !E || !D || (l += E.x * E.x, d += E.x * E.y, c += E.x, m += E.y * E.y, h += E.y, p += D.x * E.x, y += D.x * E.y, S += D.x, b += D.y * E.x, v += D.y * E.y, k += D.y);
1225
+ const _ = n[ie], D = r[ie];
1226
+ !_ || !D || (l += _.x * _.x, d += _.x * _.y, c += _.x, m += _.y * _.y, h += _.y, p += D.x * _.x, y += D.x * _.y, S += D.x, b += D.y * _.x, v += D.y * _.y, k += D.y);
1233
1227
  }
1234
1228
  const w = l * (m * o - h * h) - d * (d * o - h * c) + c * (d * h - m * c);
1235
1229
  if (Math.abs(w) < 1e-9) return De;
1236
- const L = m * o - h * h, X = c * h - d * o, $ = d * h - c * m, I = l * o - c * c, R = c * d - l * h, H = l * m - d * d, q = (ie, E, D) => [
1237
- (L * ie + X * E + $ * D) / w,
1238
- (X * ie + I * E + R * D) / w,
1239
- ($ * ie + R * E + H * D) / w
1240
- ], [pe, re, Ce] = q(p, y, S), [le, ge, ye] = q(b, v, k);
1241
- return [pe, le, re, ge, Ce, ye];
1230
+ const L = m * o - h * h, X = c * h - d * o, $ = d * h - c * m, I = l * o - c * c, R = c * d - l * h, H = l * m - d * d, q = (ie, _, D) => [
1231
+ (L * ie + X * _ + $ * D) / w,
1232
+ (X * ie + I * _ + R * D) / w,
1233
+ ($ * ie + R * _ + H * D) / w
1234
+ ], [pe, re, be] = q(p, y, S), [le, ge, ye] = q(b, v, k);
1235
+ return [pe, le, re, ge, be, ye];
1242
1236
  }
1243
- function po(n) {
1237
+ function mo(n) {
1244
1238
  const r = (p) => {
1245
1239
  var y;
1246
1240
  return (y = n.find((S) => S.id === p)) == null ? void 0 : y.photo;
@@ -1253,14 +1247,14 @@ function po(n) {
1253
1247
  { id: "mouth", photo: h(c, m) }
1254
1248
  ];
1255
1249
  }
1256
- function go() {
1250
+ function po() {
1257
1251
  return typeof navigator < "u" && typeof navigator.mediaDevices < "u" && typeof navigator.mediaDevices.getUserMedia == "function";
1258
1252
  }
1259
- function yo(n) {
1253
+ function go(n) {
1260
1254
  const r = n instanceof Error ? n.name : "";
1261
1255
  return r === "NotAllowedError" || r === "SecurityError" ? "permission-denied" : r === "NotFoundError" || r === "OverconstrainedError" ? "no-camera" : r === "NotReadableError" || r === "AbortError" ? "not-readable" : "capture-failed";
1262
1256
  }
1263
- const xo = {
1257
+ const yo = {
1264
1258
  "permission-denied": "faceScheme.capture.error.permissionDenied",
1265
1259
  "no-camera": "faceScheme.capture.error.noCamera",
1266
1260
  "not-readable": "faceScheme.capture.error.notReadable",
@@ -1280,25 +1274,25 @@ const xo = {
1280
1274
  warning: "ds:[stroke:var(--warning)]",
1281
1275
  error: "ds:[stroke:var(--destructive)]",
1282
1276
  accent: "ds:[stroke:var(--accent)]"
1283
- }, vo = 13, wo = 5, ko = 24, Rt = 5, bo = 26, Zr = 30, $t = 14, Or = [], Pr = "__draft__", Dr = [
1277
+ }, xo = 13, vo = 5, wo = 24, Rt = 5, ko = 26, Zr = 30, $t = 14, Or = [], Pr = "__draft__", Dr = [
1284
1278
  "profile-left",
1285
1279
  "front",
1286
1280
  "profile-right"
1287
- ], Co = {
1281
+ ], bo = {
1288
1282
  "profile-left": /* @__PURE__ */ a(Tr, { "aria-hidden": "true" }),
1289
1283
  front: /* @__PURE__ */ a(Es, { "aria-hidden": "true" }),
1290
1284
  "profile-right": /* @__PURE__ */ a(Tr, { "aria-hidden": "true", className: "ds:-scale-x-100" })
1291
- }, So = {
1292
- select: bs,
1293
- marker: ls,
1294
- pen: Ss,
1295
- highlighter: cs,
1296
- arrow: as,
1297
- line: ws,
1285
+ }, Co = {
1286
+ select: ks,
1287
+ marker: ds,
1288
+ pen: Cs,
1289
+ highlighter: ls,
1290
+ arrow: cs,
1291
+ line: as,
1298
1292
  rect: os,
1299
1293
  ellipse: ss,
1300
1294
  text: is
1301
- }, Mo = [
1295
+ }, So = [
1302
1296
  "accent",
1303
1297
  "info",
1304
1298
  "success",
@@ -1336,21 +1330,21 @@ const xo = {
1336
1330
  ],
1337
1331
  defaultVariants: { interactive: !1, marked: !1, selected: !1 }
1338
1332
  }
1339
- ), No = {
1333
+ ), Mo = {
1340
1334
  scaleX: { min: 0.3, max: 1.8, step: 0.01 },
1341
1335
  scaleY: { min: 0.3, max: 1.8, step: 0.01 },
1342
1336
  rotation: { min: -20, max: 20, step: 0.5 },
1343
1337
  shear: { min: -20, max: 20, step: 0.5 },
1344
1338
  translateX: { min: -240, max: 240, step: 1 },
1345
1339
  translateY: { min: -240, max: 240, step: 1 }
1346
- }, Io = [
1340
+ }, No = [
1347
1341
  "scaleX",
1348
1342
  "scaleY",
1349
1343
  "rotation",
1350
1344
  "shear",
1351
1345
  "translateX",
1352
1346
  "translateY"
1353
- ], Ao = Vi(
1347
+ ], Io = Vi(
1354
1348
  ({
1355
1349
  id: n,
1356
1350
  patientPhoto: r,
@@ -1376,12 +1370,12 @@ const xo = {
1376
1370
  onAnnotationSelect: q,
1377
1371
  showAnnotationToolbar: pe = !0,
1378
1372
  zoomable: re = !1,
1379
- defaultPanelOpen: Ce = !0,
1373
+ defaultPanelOpen: be = !0,
1380
1374
  activeTool: le,
1381
1375
  defaultTool: ge = null,
1382
1376
  onToolChange: ye,
1383
1377
  defaultAnnotationShape: ie = "circle",
1384
- defaultAnnotationColor: E = "accent",
1378
+ defaultAnnotationColor: _ = "accent",
1385
1379
  registration: D,
1386
1380
  defaultRegistration: Ur,
1387
1381
  onRegistrationChange: ot,
@@ -1395,7 +1389,7 @@ const xo = {
1395
1389
  ariaLabel: Xr,
1396
1390
  className: qr
1397
1391
  }, Gr) => {
1398
- const { t: f } = qi(), G = Ui(), lt = n ?? G, An = N(null), dt = N(null), ut = N(null), We = N(null), Tn = N(null), _n = N(null), Ot = N(!1), Pt = l !== void 0, [Jr, Qr] = T(
1392
+ const { t: f } = qi(), G = Ui(), lt = n ?? G, An = N(null), dt = N(null), ut = N(null), We = N(null), Tn = N(null), En = N(null), Ot = N(!1), Pt = l !== void 0, [Jr, Qr] = T(
1399
1393
  l ?? d
1400
1394
  ), A = Pt ? l : Jr, K = N(A);
1401
1395
  K.current = A;
@@ -1404,7 +1398,7 @@ const xo = {
1404
1398
  Pt || Qr(e), c == null || c(e);
1405
1399
  },
1406
1400
  [Pt, c]
1407
- ), [Dt, ht] = T(Ce), En = `${G}-panel`, [mt, zn] = T(h), [Ln, ei] = T(!0), M = Sn[A], [, , B, se] = M.viewBox.split(" ").map(Number), z = p === "interactive", Se = z && Yr === "adjust", Bt = y !== void 0, [ti, ni] = T(S ?? {}), He = Bt ? y : ti, j = N(He);
1401
+ ), [Dt, ht] = T(be), _n = `${G}-panel`, [mt, zn] = T(h), [Ln, ei] = T(!0), M = Sn[A], [, , B, se] = M.viewBox.split(" ").map(Number), z = p === "interactive", Ce = z && Yr === "adjust", Bt = y !== void 0, [ti, ni] = T(S ?? {}), He = Bt ? y : ti, j = N(He);
1408
1402
  j.current = He;
1409
1403
  const oe = g(
1410
1404
  (e) => {
@@ -1440,7 +1434,7 @@ const xo = {
1440
1434
  const $n = xn(
1441
1435
  () => new Set(V),
1442
1436
  [V]
1443
- ), Ee = g(
1437
+ ), _e = g(
1444
1438
  (e) => {
1445
1439
  yt || (de.current = e), yt || ii(e), $ == null || $(e);
1446
1440
  },
@@ -1448,20 +1442,20 @@ const xo = {
1448
1442
  ), Fn = g(
1449
1443
  (e) => {
1450
1444
  const t = de.current;
1451
- Ee(
1445
+ _e(
1452
1446
  t.includes(e) ? t.filter((i) => i !== e) : [...t, e]
1453
1447
  );
1454
1448
  },
1455
- [Ee]
1449
+ [_e]
1456
1450
  ), Ve = g(() => {
1457
- de.current.length > 0 && Ee([]);
1458
- }, [Ee]), [Kn, Zn] = T(""), xt = g(
1451
+ de.current.length > 0 && _e([]);
1452
+ }, [_e]), [Kn, Zn] = T(""), xt = g(
1459
1453
  (e, t, i) => {
1460
1454
  const s = { ...j.current };
1461
1455
  let u = !1;
1462
1456
  for (const x of e) {
1463
1457
  const Y = s[x] ?? [];
1464
- Y.some((_) => _.type === t) || (s[x] = [...Y, { type: t, note: i }], u = !0);
1458
+ Y.some((E) => E.type === t) || (s[x] = [...Y, { type: t, note: i }], u = !0);
1465
1459
  }
1466
1460
  u && oe(s);
1467
1461
  },
@@ -1472,8 +1466,8 @@ const xo = {
1472
1466
  let s = !1;
1473
1467
  for (const u of e) {
1474
1468
  const x = i[u] ?? [];
1475
- if (!x.some((_) => _.type === t)) continue;
1476
- const Y = x.filter((_) => _.type !== t);
1469
+ if (!x.some((E) => E.type === t)) continue;
1470
+ const Y = x.filter((E) => E.type !== t);
1477
1471
  Y.length > 0 ? i[u] = Y : delete i[u], s = !0;
1478
1472
  }
1479
1473
  s && oe(i);
@@ -1492,14 +1486,14 @@ const xo = {
1492
1486
  },
1493
1487
  [Wt, ot, A]
1494
1488
  ), Vt = xn(
1495
- () => mo(Q, M.pivot),
1489
+ () => ho(Q, M.pivot),
1496
1490
  [Q, M.pivot]
1497
1491
  ), ce = g(
1498
1492
  (e) => M.mirror ? { x: B - e.x, y: e.y } : e,
1499
1493
  [M.mirror, B]
1500
1494
  ), [Ut, Pn] = T(
1501
1495
  () => M.landmarks.map((e) => ce(rt(Q, e)))
1502
- ), wt = N(null), [ai, Dn] = T(null), Bn = N(null), [xe, Me] = T(it), Yt = N(xe);
1496
+ ), wt = N(null), [ai, Dn] = T(null), Bn = N(null), [xe, Se] = T(it), Yt = N(xe);
1503
1497
  Yt.current = xe;
1504
1498
  const kt = N(M.viewBox), ze = N(null);
1505
1499
  ne(() => {
@@ -1540,15 +1534,15 @@ const xo = {
1540
1534
  }, Xt = N(jn);
1541
1535
  Xt.current = jn;
1542
1536
  const Wn = g((e) => {
1543
- Me((t) => Xt.current(t, e));
1537
+ Se((t) => Xt.current(t, e));
1544
1538
  }, []), Hn = g((e) => {
1545
- Me(
1539
+ Se(
1546
1540
  (t) => Xt.current(
1547
1541
  t,
1548
1542
  Number.isFinite(e) && e > 0 ? e / t.k : 1
1549
1543
  )
1550
1544
  );
1551
- }, []), qt = g(() => Me(it), []), Vn = g((e) => {
1545
+ }, []), qt = g(() => Se(it), []), Vn = g((e) => {
1552
1546
  if (!(!ze.current || ze.current.id !== e.pointerId)) {
1553
1547
  ze.current = null;
1554
1548
  try {
@@ -1575,9 +1569,9 @@ const xo = {
1575
1569
  wt.current = null, Dn(null);
1576
1570
  }, []), [Ue, ue] = T("idle"), [Un, Le] = T(
1577
1571
  null
1578
- ), [Yn, ui] = T({}), Ne = (o == null ? void 0 : o[A]) ?? (A === "front" ? r : void 0), ee = Yn[A] ?? (Ne == null ? void 0 : Ne.src), Gt = I !== void 0, [fi, hi] = T(R ?? {}), Ct = Gt ? I : fi, W = N(Ct);
1572
+ ), [Yn, ui] = T({}), Me = (o == null ? void 0 : o[A]) ?? (A === "front" ? r : void 0), ee = Yn[A] ?? (Me == null ? void 0 : Me.src), Gt = I !== void 0, [fi, hi] = T(R ?? {}), Ct = Gt ? I : fi, W = N(Ct);
1579
1573
  W.current = Ct;
1580
- const Ie = Ct[A] ?? Or, Z = g(
1574
+ const Ne = Ct[A] ?? Or, Z = g(
1581
1575
  (e) => {
1582
1576
  const t = { ...W.current };
1583
1577
  e.length > 0 ? t[K.current] = e : delete t[K.current], W.current = t, Gt || hi(t), H == null || H(t);
@@ -1586,8 +1580,8 @@ const xo = {
1586
1580
  ), mi = N(0), Xn = g(
1587
1581
  () => `${lt}-a${mi.current += 1}`,
1588
1582
  [lt]
1589
- ), [Ae, pi] = T(null), te = N(null);
1590
- te.current = Ae;
1583
+ ), [Ie, pi] = T(null), te = N(null);
1584
+ te.current = Ie;
1591
1585
  const O = g(
1592
1586
  (e) => {
1593
1587
  te.current !== e && (te.current = e, pi(e), q == null || q(e));
@@ -1598,7 +1592,7 @@ const xo = {
1598
1592
  const t = dt.current;
1599
1593
  if (!t) return null;
1600
1594
  const i = rt(
1601
- ao(Ht.current),
1595
+ oo(Ht.current),
1602
1596
  ce(e)
1603
1597
  ), s = t.querySelectorAll(
1604
1598
  "[data-zone] > path:first-of-type"
@@ -1613,9 +1607,9 @@ const xo = {
1613
1607
  return null;
1614
1608
  },
1615
1609
  [ce]
1616
- ), Te = g(
1610
+ ), Ae = g(
1617
1611
  (e) => {
1618
- const t = e.id ?? Xn(), i = { ...e, id: t }, s = i.zoneId === void 0 ? { ...i, zoneId: qn(io(i)) } : i, u = W.current[K.current] ?? [];
1612
+ const t = e.id ?? Xn(), i = { ...e, id: t }, s = i.zoneId === void 0 ? { ...i, zoneId: qn(ro(i)) } : i, u = W.current[K.current] ?? [];
1619
1613
  return Z([...u, s]), O(t), t;
1620
1614
  },
1621
1615
  [Z, Xn, O, qn]
@@ -1649,7 +1643,7 @@ const xo = {
1649
1643
  [tn, ye]
1650
1644
  ), [sn, xi] = T(
1651
1645
  ie
1652
- ), [on, vi] = T(E), Gn = N(sn);
1646
+ ), [on, vi] = T(_), Gn = N(sn);
1653
1647
  Gn.current = sn;
1654
1648
  const Ye = N(on);
1655
1649
  Ye.current = on;
@@ -1659,8 +1653,8 @@ const xo = {
1659
1653
  cn.current = Xe, ne(() => {
1660
1654
  Xe !== null && ht(!0);
1661
1655
  }, [Xe]), ne(() => {
1662
- Ae !== null && ht(!0);
1663
- }, [Ae]);
1656
+ Ie !== null && ht(!0);
1657
+ }, [Ie]);
1664
1658
  const Qn = N(V.length);
1665
1659
  ne(() => {
1666
1660
  Qn.current === 0 && V.length > 0 && ht(!0), Qn.current = V.length;
@@ -1670,8 +1664,8 @@ const xo = {
1670
1664
  (er.current !== U || tr.current !== A) && (er.current = U, tr.current = A, O(null));
1671
1665
  }, [U, A, O]), ne(() => {
1672
1666
  const e = te.current;
1673
- e !== null && !Ie.some((t) => t.id === e) && O(null);
1674
- }, [Ie, O]);
1667
+ e !== null && !Ne.some((t) => t.id === e) && O(null);
1668
+ }, [Ne, O]);
1675
1669
  const qe = U !== null, wi = g(
1676
1670
  (e) => {
1677
1671
  var s, u;
@@ -1680,7 +1674,7 @@ const xo = {
1680
1674
  e.stopPropagation();
1681
1675
  const i = ve(e.clientX, e.clientY);
1682
1676
  if (t === "marker") {
1683
- Te({
1677
+ Ae({
1684
1678
  kind: "marker",
1685
1679
  x: i.x,
1686
1680
  y: i.y,
@@ -1690,7 +1684,7 @@ const xo = {
1690
1684
  return;
1691
1685
  }
1692
1686
  if (t === "text") {
1693
- const x = Te({
1687
+ const x = Ae({
1694
1688
  kind: "text",
1695
1689
  x: i.x,
1696
1690
  y: i.y,
@@ -1713,7 +1707,7 @@ const xo = {
1713
1707
  tone: Ye.current
1714
1708
  });
1715
1709
  },
1716
- [ve, Te]
1710
+ [ve, Ae]
1717
1711
  ), ki = g(
1718
1712
  (e) => {
1719
1713
  if (!Nt.current) return;
@@ -1733,10 +1727,10 @@ const xo = {
1733
1727
  } else if ((t.kind === "arrow" || t.kind === "line" || t.kind === "rect" || t.kind === "ellipse") && Math.hypot(t.to.x - t.from.x, t.to.y - t.from.y) < 4)
1734
1728
  return;
1735
1729
  const { id: i, ...s } = t;
1736
- Te(s);
1730
+ Ae(s);
1737
1731
  },
1738
- [Te]
1739
- ), ln = Xe ? Ie.find((e) => e.id === Xe && e.kind === "text") : void 0, bi = g(
1732
+ [Ae]
1733
+ ), ln = Xe ? Ne.find((e) => e.id === Xe && e.kind === "text") : void 0, bi = g(
1740
1734
  (e) => {
1741
1735
  const t = cn.current;
1742
1736
  if (!t) return;
@@ -1763,7 +1757,7 @@ const xo = {
1763
1757
  }, [Re]), un = g(async () => {
1764
1758
  var e;
1765
1759
  if (Kt) {
1766
- if (!go()) {
1760
+ if (!po()) {
1767
1761
  Le("insecure-context"), ue("error");
1768
1762
  return;
1769
1763
  }
@@ -1790,7 +1784,7 @@ const xo = {
1790
1784
  }
1791
1785
  ue("streaming");
1792
1786
  } catch (t) {
1793
- Re(), Le(yo(t)), ue("error");
1787
+ Re(), Le(go(t)), ue("error");
1794
1788
  }
1795
1789
  }
1796
1790
  }, [Kt, Zt, Re]), Ge = g(
@@ -1840,7 +1834,7 @@ const xo = {
1840
1834
  const fe = Ue === "streaming", ir = N(!1);
1841
1835
  ne(() => {
1842
1836
  var e;
1843
- ir.current && !fe && ((e = _n.current) == null || e.focus()), ir.current = fe;
1837
+ ir.current && !fe && ((e = En.current) == null || e.focus()), ir.current = fe;
1844
1838
  }, [fe]);
1845
1839
  const [At, Mi] = T("idle"), $e = g(
1846
1840
  (e) => {
@@ -1855,7 +1849,7 @@ const xo = {
1855
1849
  $e("loading");
1856
1850
  let i;
1857
1851
  if (M.id === "front")
1858
- i = await Ds(ee, {
1852
+ i = await Ps(ee, {
1859
1853
  viewWidth: B,
1860
1854
  viewHeight: se,
1861
1855
  onStage: t,
@@ -1863,7 +1857,7 @@ const xo = {
1863
1857
  modelAssetPath: e.modelAssetPath
1864
1858
  });
1865
1859
  else {
1866
- const s = await Gs(ee, {
1860
+ const s = await qs(ee, {
1867
1861
  viewWidth: B,
1868
1862
  viewHeight: se,
1869
1863
  onStage: t,
@@ -1871,7 +1865,7 @@ const xo = {
1871
1865
  ortWasmBaseUrl: e.ortWasmBaseUrl,
1872
1866
  modelUrl: e.yunetModelUrl
1873
1867
  });
1874
- i = s && po(s);
1868
+ i = s && mo(s);
1875
1869
  }
1876
1870
  return !i || i.length < 3 ? ($e("no-face"), !1) : (bt(i), $e("done"), !0);
1877
1871
  } catch {
@@ -1915,7 +1909,7 @@ const xo = {
1915
1909
  resetZoom: qt,
1916
1910
  setView: ft,
1917
1911
  getAnnotations: () => W.current[K.current] ?? [],
1918
- addAnnotation: Te,
1912
+ addAnnotation: Ae,
1919
1913
  removeAnnotation: St,
1920
1914
  undoAnnotation: Qt,
1921
1915
  clearAnnotations: en,
@@ -1938,7 +1932,7 @@ const xo = {
1938
1932
  },
1939
1933
  setAnnotationZone: Jt,
1940
1934
  getSelectedZones: () => de.current,
1941
- setSelectedZones: (e) => Ee([...e]),
1935
+ setSelectedZones: (e) => _e([...e]),
1942
1936
  clearZoneSelection: Ve,
1943
1937
  applyFindingToSelection: (e, t) => xt(de.current, e, t),
1944
1938
  removeFindingFromSelection: (e) => jt(de.current, e),
@@ -1955,14 +1949,14 @@ const xo = {
1955
1949
  un,
1956
1950
  dn,
1957
1951
  ft,
1958
- Te,
1952
+ Ae,
1959
1953
  St,
1960
1954
  Qt,
1961
1955
  en,
1962
1956
  rn,
1963
1957
  O,
1964
1958
  Jt,
1965
- Ee,
1959
+ _e,
1966
1960
  Ve,
1967
1961
  xt,
1968
1962
  jt,
@@ -1970,7 +1964,7 @@ const xo = {
1970
1964
  qt
1971
1965
  ]
1972
1966
  );
1973
- Yi(Gr, () => hn, [hn]), Gi(Rs, hn, lt);
1967
+ Yi(Gr, () => hn, [hn]), Gi(Ls, hn, lt);
1974
1968
  const or = g(
1975
1969
  (e) => {
1976
1970
  const t = f(`faceScheme.zone.${e.labelKey}`), i = j.current[e.id] ?? [];
@@ -1994,23 +1988,23 @@ const xo = {
1994
1988
  Rn,
1995
1989
  v
1996
1990
  ]
1997
- ), Ni = Ne != null && Ne.altKey ? f(Ne.altKey) : f("faceScheme.photo.defaultAlt"), Ii = M.mirror ? `translate(${B} 0) scale(-1 1) ${Et(Q)}` : Et(Q), Ai = g(
1991
+ ), Ni = Me != null && Me.altKey ? f(Me.altKey) : f("faceScheme.photo.defaultAlt"), Ii = M.mirror ? `translate(${B} 0) scale(-1 1) ${_t(Q)}` : _t(Q), Ai = g(
1998
1992
  (e, t) => {
1999
- ae(ho({ ...Vt, [e]: t }, M.pivot));
1993
+ ae(fo({ ...Vt, [e]: t }, M.pivot));
2000
1994
  },
2001
1995
  [ae, Vt, M.pivot]
2002
- ), cr = !!je && !!ee && M.landmarks.length > 0, mn = Kt, lr = m && eo.length > 1, Je = z && pe, he = z && re, pn = J || Je || Se || he, dr = Dt && pn, we = mt === "all" && lr;
1996
+ ), cr = !!je && !!ee && M.landmarks.length > 0, mn = Kt, lr = m && Qs.length > 1, Je = z && pe, he = z && re, pn = J || Je || Ce || he, dr = Dt && pn, we = mt === "all" && lr;
2003
1997
  ne(() => {
2004
- Me(it);
1998
+ Se(it);
2005
1999
  }, [A, he]), ne(() => {
2006
- fe && Me(it);
2000
+ fe && Se(it);
2007
2001
  }, [fe]), ne(() => {
2008
2002
  const e = dt.current;
2009
2003
  if (!e || !he) return;
2010
2004
  const t = (i) => {
2011
2005
  i.preventDefault();
2012
2006
  const s = ve(i.clientX, i.clientY);
2013
- Me(
2007
+ Se(
2014
2008
  (u) => Fr(
2015
2009
  zt(kt.current),
2016
2010
  u,
@@ -2021,19 +2015,19 @@ const xo = {
2021
2015
  };
2022
2016
  return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
2023
2017
  }, [he, ve, we, A, fe]);
2024
- const Qe = dr && !we, Ti = Qe ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:flex-row ds:lg:items-stretch ds:lg:justify-center" : "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", _i = Qe ? "ds:flex ds:w-full ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)] ds:lg:w-[28rem] ds:lg:shrink-0" : "ds:flex ds:w-full ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]", Ei = Qe ? "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:w-[28rem] ds:lg:shrink-0 ds:lg:self-stretch" : "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-md)]", zi = Qe ? "ds:lg:h-0 ds:lg:min-h-full" : void 0, Li = Qe ? "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:lg:min-h-0 ds:lg:flex-1 ds:lg:overflow-y-auto" : "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", ur = lr, Ri = ur || mn || pn, fr = pn ? /* @__PURE__ */ a(
2018
+ const Qe = dr && !we, Ti = Qe ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:flex-row ds:lg:items-stretch ds:lg:justify-center" : "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", Ei = Qe ? "ds:flex ds:w-full ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)] ds:lg:w-[28rem] ds:lg:shrink-0" : "ds:flex ds:w-full ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]", _i = Qe ? "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:w-[28rem] ds:lg:shrink-0 ds:lg:self-stretch" : "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-md)]", zi = Qe ? "ds:lg:h-0 ds:lg:min-h-full" : void 0, Li = Qe ? "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:lg:min-h-0 ds:lg:flex-1 ds:lg:overflow-y-auto" : "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", ur = lr, Ri = ur || mn || pn, fr = pn ? /* @__PURE__ */ a(
2025
2019
  Ze,
2026
2020
  {
2027
2021
  size: "sm",
2028
- icon: /* @__PURE__ */ a(Ns, { "aria-hidden": "true" }),
2022
+ icon: /* @__PURE__ */ a(Ms, { "aria-hidden": "true" }),
2029
2023
  "aria-label": f("faceScheme.panel.toggle"),
2030
2024
  "aria-expanded": Dt,
2031
- "aria-controls": Dt ? En : void 0,
2025
+ "aria-controls": Dt ? _n : void 0,
2032
2026
  "data-overflow-pin": !0,
2033
2027
  onClick: () => ht((e) => !e)
2034
2028
  },
2035
2029
  "panel"
2036
- ) : null, $i = U ?? "select", hr = `${G}-draw`, mr = `${G}-fit`, pr = `${G}-zoom`, gr = `${G}-tools`, yr = `${G}-tones`, xr = `${G}-shapes`, Fi = `${G}-ann-zone`, et = Ae !== null ? Ie.find((e) => e.id === Ae) : void 0, Ki = M.zones.map((e) => ({
2030
+ ) : null, $i = U ?? "select", hr = `${G}-draw`, mr = `${G}-fit`, pr = `${G}-zoom`, gr = `${G}-tools`, yr = `${G}-tones`, xr = `${G}-shapes`, Fi = `${G}-ann-zone`, et = Ie !== null ? Ne.find((e) => e.id === Ie) : void 0, Ki = M.zones.map((e) => ({
2037
2031
  value: e.id,
2038
2032
  label: f(`faceScheme.zone.${e.labelKey}`)
2039
2033
  })), me = "ds:text-[length:var(--font-size-xs)] ds:font-medium ds:text-[var(--muted-foreground)]", vr = `${G}-zones`, wr = `${G}-zones-apply`, Zi = J ? /* @__PURE__ */ C(
@@ -2065,7 +2059,7 @@ const xo = {
2065
2059
  "aria-labelledby": wr,
2066
2060
  className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]",
2067
2061
  children: Rr.map((e) => {
2068
- const t = _t[e], i = V.length > 0 && V.every(
2062
+ const t = Et[e], i = V.length > 0 && V.every(
2069
2063
  (s) => (He[s] ?? []).some((u) => u.type === e)
2070
2064
  );
2071
2065
  return /* @__PURE__ */ a(
@@ -2145,9 +2139,9 @@ const xo = {
2145
2139
  className: "ds:self-start",
2146
2140
  value: $i,
2147
2141
  onValueChange: (e) => rn(e === "select" ? null : e),
2148
- children: ["select", ...to].map(
2142
+ children: ["select", ...eo].map(
2149
2143
  (e) => {
2150
- const t = So[e];
2144
+ const t = Co[e];
2151
2145
  return /* @__PURE__ */ a(
2152
2146
  Ze,
2153
2147
  {
@@ -2186,7 +2180,7 @@ const xo = {
2186
2180
  );
2187
2181
  }
2188
2182
  },
2189
- children: Mo.map((e) => /* @__PURE__ */ a(
2183
+ children: So.map((e) => /* @__PURE__ */ a(
2190
2184
  Ze,
2191
2185
  {
2192
2186
  value: e,
@@ -2281,12 +2275,12 @@ const xo = {
2281
2275
  {
2282
2276
  size: "sm",
2283
2277
  intent: "outline",
2284
- startIcon: /* @__PURE__ */ a(ds, { "aria-hidden": "true" }),
2278
+ startIcon: /* @__PURE__ */ a(us, { "aria-hidden": "true" }),
2285
2279
  onClick: () => {
2286
2280
  const e = te.current;
2287
2281
  e !== null && St(e);
2288
2282
  },
2289
- disabled: Ae === null,
2283
+ disabled: Ie === null,
2290
2284
  children: f("faceScheme.annotate.deleteSelected")
2291
2285
  }
2292
2286
  ),
@@ -2295,9 +2289,9 @@ const xo = {
2295
2289
  {
2296
2290
  size: "sm",
2297
2291
  intent: "outline",
2298
- startIcon: /* @__PURE__ */ a(As, { "aria-hidden": "true" }),
2292
+ startIcon: /* @__PURE__ */ a(Is, { "aria-hidden": "true" }),
2299
2293
  onClick: Qt,
2300
- disabled: Ie.length === 0,
2294
+ disabled: Ne.length === 0,
2301
2295
  children: f("faceScheme.annotate.undo")
2302
2296
  }
2303
2297
  ),
@@ -2306,9 +2300,9 @@ const xo = {
2306
2300
  {
2307
2301
  size: "sm",
2308
2302
  intent: "outline",
2309
- startIcon: /* @__PURE__ */ a(us, { "aria-hidden": "true" }),
2303
+ startIcon: /* @__PURE__ */ a(fs, { "aria-hidden": "true" }),
2310
2304
  onClick: en,
2311
- disabled: Ie.length === 0,
2305
+ disabled: Ne.length === 0,
2312
2306
  children: f("faceScheme.annotate.clear")
2313
2307
  }
2314
2308
  )
@@ -2330,7 +2324,7 @@ const xo = {
2330
2324
  return /* @__PURE__ */ a(
2331
2325
  "path",
2332
2326
  {
2333
- d: tt(e.shape, e.x, e.y, vo),
2327
+ d: tt(e.shape, e.x, e.y, xo),
2334
2328
  className: Pe[t],
2335
2329
  pointerEvents: "none"
2336
2330
  }
@@ -2342,7 +2336,7 @@ const xo = {
2342
2336
  {
2343
2337
  d: Hr(e.points),
2344
2338
  fill: "none",
2345
- strokeWidth: e.kind === "highlighter" ? ko : wo,
2339
+ strokeWidth: e.kind === "highlighter" ? wo : vo,
2346
2340
  strokeOpacity: e.kind === "highlighter" ? 0.35 : 1,
2347
2341
  strokeLinecap: "round",
2348
2342
  strokeLinejoin: "round",
@@ -2364,7 +2358,7 @@ const xo = {
2364
2358
  /* @__PURE__ */ a(
2365
2359
  "path",
2366
2360
  {
2367
- d: no(e.from, e.to, bo),
2361
+ d: to(e.from, e.to, ko),
2368
2362
  fill: "none",
2369
2363
  strokeWidth: Rt,
2370
2364
  strokeLinecap: "round",
@@ -2413,7 +2407,7 @@ const xo = {
2413
2407
  );
2414
2408
  }
2415
2409
  }, Di = (e) => {
2416
- const t = oo(e, Zr);
2410
+ const t = so(e, Zr);
2417
2411
  switch (t.type) {
2418
2412
  case "stroke":
2419
2413
  return /* @__PURE__ */ a(
@@ -2423,7 +2417,7 @@ const xo = {
2423
2417
  d: t.d,
2424
2418
  fill: "none",
2425
2419
  stroke: "transparent",
2426
- strokeWidth: so,
2420
+ strokeWidth: io,
2427
2421
  strokeLinecap: "round",
2428
2422
  strokeLinejoin: "round",
2429
2423
  pointerEvents: "stroke",
@@ -2465,11 +2459,11 @@ const xo = {
2465
2459
  { mirror: M.mirror }
2466
2460
  ) : null;
2467
2461
  Bn.current = kr;
2468
- const yn = ee ? ai ?? kr ?? M.viewBox : we || !Se ? M.schematicViewBox : M.viewBox;
2462
+ const yn = ee ? ai ?? kr ?? M.viewBox : we || !Ce ? M.schematicViewBox : M.viewBox;
2469
2463
  kt.current = yn;
2470
- const br = he && xe.k > 1, Bi = br ? uo(st(zt(yn), xe)) : yn, Cr = br && U === null, Sr = (e) => {
2464
+ const br = he && xe.k > 1, Bi = br ? lo(st(zt(yn), xe)) : yn, Cr = br && U === null, Sr = (e) => {
2471
2465
  if (e !== A) {
2472
- const t = Sn[e], i = (o == null ? void 0 : o[e]) ?? (e === "front" ? r : void 0), s = Yn[e] ?? (i == null ? void 0 : i.src), u = vt[e] ?? De, x = t.mirror ? `translate(${B} 0) scale(-1 1) ${Et(u)}` : Et(u), Y = Ct[e] ?? Or;
2466
+ const t = Sn[e], i = (o == null ? void 0 : o[e]) ?? (e === "front" ? r : void 0), s = Yn[e] ?? (i == null ? void 0 : i.src), u = vt[e] ?? De, x = t.mirror ? `translate(${B} 0) scale(-1 1) ${_t(u)}` : _t(u), Y = Ct[e] ?? Or;
2473
2467
  return /* @__PURE__ */ a(Oe, { variant: "elevated", interactive: !0, asChild: !0, children: /* @__PURE__ */ a(
2474
2468
  "button",
2475
2469
  {
@@ -2502,31 +2496,31 @@ const xo = {
2502
2496
  preserveAspectRatio: "xMidYMid slice"
2503
2497
  }
2504
2498
  ),
2505
- /* @__PURE__ */ a("g", { transform: x, children: t.zones.map((_) => {
2506
- const _e = He[_.id] ?? [], ji = _e.length > 0;
2499
+ /* @__PURE__ */ a("g", { transform: x, children: t.zones.map((E) => {
2500
+ const Te = He[E.id] ?? [], ji = Te.length > 0;
2507
2501
  return /* @__PURE__ */ C("g", { children: [
2508
2502
  /* @__PURE__ */ a(
2509
2503
  "path",
2510
2504
  {
2511
- d: _.d,
2505
+ d: E.d,
2512
2506
  className: Br({
2513
2507
  interactive: !1,
2514
2508
  marked: ji,
2515
2509
  // Cross-view selection stays visible on the
2516
2510
  // three-up previews (decorative, aria-hidden svg).
2517
- selected: J && $n.has(_.id)
2511
+ selected: J && $n.has(E.id)
2518
2512
  })
2519
2513
  }
2520
2514
  ),
2521
- _e.map((Mr, Wi) => {
2522
- const Nr = _t[Mr.type], Hi = (Wi - (_e.length - 1) / 2) * 26;
2515
+ Te.map((Mr, Wi) => {
2516
+ const Nr = Et[Mr.type], Hi = (Wi - (Te.length - 1) / 2) * 26;
2523
2517
  return /* @__PURE__ */ a(
2524
2518
  "path",
2525
2519
  {
2526
2520
  d: tt(
2527
2521
  Nr.shape,
2528
- _.cx + Hi,
2529
- _.cy,
2522
+ E.cx + Hi,
2523
+ E.cy,
2530
2524
  11
2531
2525
  ),
2532
2526
  className: Pe[Nr.tone]
@@ -2534,9 +2528,9 @@ const xo = {
2534
2528
  Mr.type
2535
2529
  );
2536
2530
  })
2537
- ] }, _.id);
2531
+ ] }, E.id);
2538
2532
  }) }),
2539
- /* @__PURE__ */ a("g", { children: Y.map((_) => /* @__PURE__ */ a("g", { children: gn(_) }, _.id)) })
2533
+ /* @__PURE__ */ a("g", { children: Y.map((E) => /* @__PURE__ */ a("g", { children: gn(E) }, E.id)) })
2540
2534
  ]
2541
2535
  }
2542
2536
  )
@@ -2586,12 +2580,12 @@ const xo = {
2586
2580
  if (!i || i.id !== t.pointerId) return;
2587
2581
  const s = t.currentTarget.getBoundingClientRect();
2588
2582
  if (s.width <= 0 || s.height <= 0) return;
2589
- const u = zt(kt.current), x = st(u, Yt.current), Y = (t.clientX - i.x) * x.width / s.width, _ = (t.clientY - i.y) * x.height / s.height;
2583
+ const u = zt(kt.current), x = st(u, Yt.current), Y = (t.clientX - i.x) * x.width / s.width, E = (t.clientY - i.y) * x.height / s.height;
2590
2584
  ze.current = {
2591
2585
  id: i.id,
2592
2586
  x: t.clientX,
2593
2587
  y: t.clientY
2594
- }, Me((_e) => fo(u, _e, Y, _));
2588
+ }, Se((Te) => uo(u, Te, Y, E));
2595
2589
  } : void 0,
2596
2590
  onPointerUp: he ? Vn : void 0,
2597
2591
  onPointerCancel: he ? Vn : void 0,
@@ -2643,18 +2637,18 @@ const xo = {
2643
2637
  }
2644
2638
  ),
2645
2639
  i.map((x, Y) => {
2646
- const _ = _t[x.type], _e = (Y - (i.length - 1) / 2) * 26;
2640
+ const E = Et[x.type], Te = (Y - (i.length - 1) / 2) * 26;
2647
2641
  return /* @__PURE__ */ a(
2648
2642
  "path",
2649
2643
  {
2650
2644
  d: tt(
2651
- _.shape,
2652
- t.cx + _e,
2645
+ E.shape,
2646
+ t.cx + Te,
2653
2647
  t.cy,
2654
2648
  11
2655
2649
  ),
2656
2650
  "aria-hidden": "true",
2657
- className: Pe[_.tone]
2651
+ className: Pe[E.tone]
2658
2652
  },
2659
2653
  x.type
2660
2654
  );
@@ -2676,8 +2670,8 @@ const xo = {
2676
2670
  ] }, t.id);
2677
2671
  }) }),
2678
2672
  /* @__PURE__ */ C("g", { "data-testid": "face-scheme-annotations", children: [
2679
- Ie.map((t) => {
2680
- const i = ro(t), s = Ae === t.id;
2673
+ Ne.map((t) => {
2674
+ const i = no(t), s = Ie === t.id;
2681
2675
  return /* @__PURE__ */ C(
2682
2676
  "g",
2683
2677
  {
@@ -2736,7 +2730,7 @@ const xo = {
2736
2730
  onPointerCancel: qe ? nr : void 0
2737
2731
  }
2738
2732
  ),
2739
- Se && ee && U === null && /* @__PURE__ */ a("g", { "aria-hidden": "true", "data-testid": "face-scheme-handles", children: M.landmarks.map((t, i) => {
2733
+ Ce && ee && U === null && /* @__PURE__ */ a("g", { "aria-hidden": "true", "data-testid": "face-scheme-handles", children: M.landmarks.map((t, i) => {
2740
2734
  const s = Ut[i] ?? ce(rt(Q, t));
2741
2735
  return /* @__PURE__ */ C("g", { children: [
2742
2736
  /* @__PURE__ */ a(
@@ -2778,7 +2772,7 @@ const xo = {
2778
2772
  size: "sm",
2779
2773
  intent: t ? "primary" : void 0,
2780
2774
  "aria-pressed": t,
2781
- startIcon: Co[e],
2775
+ startIcon: bo[e],
2782
2776
  onClick: () => {
2783
2777
  ft(e), zn("single");
2784
2778
  },
@@ -2795,7 +2789,7 @@ const xo = {
2795
2789
  size: "sm",
2796
2790
  intent: mt === "all" ? "primary" : void 0,
2797
2791
  "aria-pressed": mt === "all",
2798
- startIcon: /* @__PURE__ */ a(xs, { "aria-hidden": "true" }),
2792
+ startIcon: /* @__PURE__ */ a(vs, { "aria-hidden": "true" }),
2799
2793
  onClick: () => zn("all"),
2800
2794
  children: f("faceScheme.viewShort.all")
2801
2795
  },
@@ -2807,10 +2801,10 @@ const xo = {
2807
2801
  /* @__PURE__ */ a(
2808
2802
  P,
2809
2803
  {
2810
- ref: _n,
2804
+ ref: En,
2811
2805
  size: "sm",
2812
2806
  intent: "outline",
2813
- startIcon: /* @__PURE__ */ a(fs, { "aria-hidden": "true" }),
2807
+ startIcon: /* @__PURE__ */ a(hs, { "aria-hidden": "true" }),
2814
2808
  "data-overflow-pin": !0,
2815
2809
  onClick: () => void un(),
2816
2810
  disabled: Ue === "requesting",
@@ -2826,7 +2820,7 @@ const xo = {
2826
2820
  {
2827
2821
  size: "sm",
2828
2822
  intent: "outline",
2829
- startIcon: /* @__PURE__ */ a(hs, { "aria-hidden": "true" }),
2823
+ startIcon: /* @__PURE__ */ a(ms, { "aria-hidden": "true" }),
2830
2824
  onClick: () => {
2831
2825
  var e;
2832
2826
  return (e = Tn.current) == null ? void 0 : e.click();
@@ -2847,7 +2841,7 @@ const xo = {
2847
2841
  role: "group",
2848
2842
  "aria-label": Xr ?? f("faceScheme.ariaLabel"),
2849
2843
  children: [
2850
- /* @__PURE__ */ C("div", { className: _i, children: [
2844
+ /* @__PURE__ */ C("div", { className: Ei, children: [
2851
2845
  !fe && Ri && /* @__PURE__ */ a(
2852
2846
  es,
2853
2847
  {
@@ -2883,7 +2877,7 @@ const xo = {
2883
2877
  children: Ue === "requesting" ? f(
2884
2878
  "faceScheme.capture.requesting",
2885
2879
  "Waiting for camera permission…"
2886
- ) : Ue === "error" && Un ? f(xo[Un]) : ""
2880
+ ) : Ue === "error" && Un ? f(yo[Un]) : ""
2887
2881
  }
2888
2882
  )
2889
2883
  ] }),
@@ -2931,7 +2925,7 @@ const xo = {
2931
2925
  "aria-label": f("faceScheme.legendLabel"),
2932
2926
  className: "ds:m-0 ds:flex ds:flex-wrap ds:gap-x-4 ds:gap-y-1 ds:p-0 ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)]",
2933
2927
  children: Rr.map((e) => {
2934
- const t = _t[e];
2928
+ const t = Et[e];
2935
2929
  return /* @__PURE__ */ a(
2936
2930
  "li",
2937
2931
  {
@@ -2952,19 +2946,19 @@ const xo = {
2952
2946
  }
2953
2947
  ) }) })
2954
2948
  ] }),
2955
- dr && /* @__PURE__ */ a("div", { className: Ei, children: /* @__PURE__ */ a(
2949
+ dr && /* @__PURE__ */ a("div", { className: _i, children: /* @__PURE__ */ a(
2956
2950
  Oe,
2957
2951
  {
2958
2952
  variant: "elevated",
2959
2953
  "data-testid": "face-scheme-panel",
2960
- id: En,
2954
+ id: _n,
2961
2955
  className: zi,
2962
2956
  children: /* @__PURE__ */ C(Oe.Body, { className: Li, children: [
2963
2957
  Zi,
2964
- J && (Je || Se) && /* @__PURE__ */ a(Tt, {}),
2958
+ J && (Je || Ce) && /* @__PURE__ */ a(Tt, {}),
2965
2959
  Oi,
2966
- Je && Se && /* @__PURE__ */ a(Tt, {}),
2967
- Se && /* @__PURE__ */ C(
2960
+ Je && Ce && /* @__PURE__ */ a(Tt, {}),
2961
+ Ce && /* @__PURE__ */ C(
2968
2962
  "div",
2969
2963
  {
2970
2964
  "data-testid": "face-scheme-registration",
@@ -2974,8 +2968,8 @@ const xo = {
2974
2968
  children: [
2975
2969
  /* @__PURE__ */ a("span", { id: mr, className: me, children: f("faceScheme.panel.fit") }),
2976
2970
  /* @__PURE__ */ a("p", { className: "ds:m-0 ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)]", children: f("faceScheme.registration.hint") }),
2977
- /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-2", children: Io.map((e) => {
2978
- const t = No[e], i = e === "scaleX" || e === "scaleY";
2971
+ /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-2", children: No.map((e) => {
2972
+ const t = Mo[e], i = e === "scaleX" || e === "scaleY";
2979
2973
  return /* @__PURE__ */ C(
2980
2974
  "div",
2981
2975
  {
@@ -3036,7 +3030,7 @@ const xo = {
3036
3030
  }
3037
3031
  ),
3038
3032
  he && /* @__PURE__ */ C(Ir, { children: [
3039
- (J || Je || Se) && /* @__PURE__ */ a(Tt, {}),
3033
+ (J || Je || Ce) && /* @__PURE__ */ a(Tt, {}),
3040
3034
  /* @__PURE__ */ C(
3041
3035
  "div",
3042
3036
  {
@@ -3051,7 +3045,7 @@ const xo = {
3051
3045
  Ze,
3052
3046
  {
3053
3047
  size: "sm",
3054
- icon: /* @__PURE__ */ a(ms, { "aria-hidden": "true" }),
3048
+ icon: /* @__PURE__ */ a(ps, { "aria-hidden": "true" }),
3055
3049
  "aria-label": f("faceScheme.zoomOut"),
3056
3050
  disabled: xe.k <= 1,
3057
3051
  onClick: () => Wn(1 / 1.3)
@@ -3074,7 +3068,7 @@ const xo = {
3074
3068
  Ze,
3075
3069
  {
3076
3070
  size: "sm",
3077
- icon: /* @__PURE__ */ a(ps, { "aria-hidden": "true" }),
3071
+ icon: /* @__PURE__ */ a(gs, { "aria-hidden": "true" }),
3078
3072
  "aria-label": f("faceScheme.zoomIn"),
3079
3073
  disabled: xe.k >= Vr,
3080
3074
  onClick: () => Wn(1.3)
@@ -3085,7 +3079,7 @@ const xo = {
3085
3079
  {
3086
3080
  size: "sm",
3087
3081
  intent: "outline",
3088
- startIcon: /* @__PURE__ */ a(gs, { "aria-hidden": "true" }),
3082
+ startIcon: /* @__PURE__ */ a(ys, { "aria-hidden": "true" }),
3089
3083
  disabled: xe.k <= 1,
3090
3084
  onClick: qt,
3091
3085
  children: f("faceScheme.resetView")
@@ -3116,31 +3110,31 @@ const xo = {
3116
3110
  );
3117
3111
  }
3118
3112
  );
3119
- Ao.displayName = "FaceScheme";
3113
+ Io.displayName = "FaceScheme";
3120
3114
  export {
3121
3115
  sa as A,
3122
- to as F,
3116
+ eo as F,
3123
3117
  De as I,
3124
- _t as a,
3118
+ Et as a,
3125
3119
  Rr as b,
3126
3120
  Sn as c,
3127
- eo as d,
3128
- Ao as e,
3129
- Et as f,
3130
- io as g,
3131
- ro as h,
3121
+ Qs as d,
3122
+ Io as e,
3123
+ _t as f,
3124
+ ro as g,
3125
+ no as h,
3132
3126
  rt as i,
3133
- no as j,
3134
- ho as k,
3135
- mo as l,
3136
- Ds as m,
3137
- Rs as n,
3127
+ to as j,
3128
+ fo as k,
3129
+ ho as l,
3130
+ Ps as m,
3131
+ Ls as n,
3138
3132
  Hr as o,
3139
- ao as p,
3133
+ oo as p,
3140
3134
  aa as q,
3141
3135
  ca as r,
3142
3136
  oa as s,
3143
3137
  Nn as t,
3144
3138
  Kr as u
3145
3139
  };
3146
- //# sourceMappingURL=face-scheme-Cou2efl7.js.map
3140
+ //# sourceMappingURL=face-scheme-C00IvkUA.js.map