@alfadocs/ui-kit 1.151.3 → 1.151.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{calendar-appointment-editor-dialog-cbZooOgN.js → calendar-appointment-editor-dialog-DQ9LNxY5.js} +2 -2
- package/dist/_chunks/{face-scheme-CWG3T1xx.js → face-scheme-DR-X-Njb.js} +264 -255
- package/dist/_chunks/{use-appointment-details-read-DOPHCTxO.js → use-appointment-details-read-BcBr4JwL.js} +271 -258
- package/dist/agent-catalog.json +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/index.js +3 -3
- package/dist/patterns/calendar/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/user-round-DZxRG9zq.js +0 -15
|
@@ -4,7 +4,7 @@ import * as Fe from "@radix-ui/react-tooltip";
|
|
|
4
4
|
import { c as qi } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as Gi } from "react-i18next";
|
|
6
6
|
import { u as Ji } from "./registry-DvAUVLHh.js";
|
|
7
|
-
import { m as
|
|
7
|
+
import { m as tt, M as Qi, A as es } from "./annotation-marker-D-M7y4R1.js";
|
|
8
8
|
import { B as P } from "./button-Dp4j9ygh.js";
|
|
9
9
|
import { I as Ke } from "./icon-button-u9VMQn3x.js";
|
|
10
10
|
import { B as ts } from "./button-group-CHQD8GJ0.js";
|
|
@@ -16,7 +16,7 @@ import { S as Tt } from "./separator-Bdc9bqoJ.js";
|
|
|
16
16
|
import { S as rs } from "./slider-pZ95bEm7.js";
|
|
17
17
|
import { S as is } from "./switch-D69iEUUt.js";
|
|
18
18
|
import { a as ss } from "./format-number-DdzqwMs1.js";
|
|
19
|
-
import { c as
|
|
19
|
+
import { c as Be } from "./createLucideIcon-DhHxpK9K.js";
|
|
20
20
|
import { T as os } from "./type-ggmfVs23.js";
|
|
21
21
|
import { C as as } from "./circle-j7oZoouK.js";
|
|
22
22
|
import { S as cs } from "./square-DASBRZ0U.js";
|
|
@@ -31,25 +31,24 @@ import { C as gs } from "./camera-VSklPDCv.js";
|
|
|
31
31
|
import { U as ys } from "./upload-BfT2hzMg.js";
|
|
32
32
|
import { Z as xs, a as vs } from "./zoom-out-Dnif4kJx.js";
|
|
33
33
|
import { M as ws } from "./maximize-2-BYd2Kti7.js";
|
|
34
|
-
import { U as ks } from "./user-round-DZxRG9zq.js";
|
|
35
34
|
/**
|
|
36
35
|
* @license lucide-react v1.22.0 - ISC
|
|
37
36
|
*
|
|
38
37
|
* This source code is licensed under the ISC license.
|
|
39
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
39
|
*/
|
|
41
|
-
const
|
|
40
|
+
const ks = [
|
|
42
41
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
43
42
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
44
43
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
45
|
-
],
|
|
44
|
+
], bs = Be("columns-3", ks);
|
|
46
45
|
/**
|
|
47
46
|
* @license lucide-react v1.22.0 - ISC
|
|
48
47
|
*
|
|
49
48
|
* This source code is licensed under the ISC license.
|
|
50
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
50
|
*/
|
|
52
|
-
const
|
|
51
|
+
const Cs = [
|
|
53
52
|
[
|
|
54
53
|
"path",
|
|
55
54
|
{
|
|
@@ -57,14 +56,14 @@ const Ss = [
|
|
|
57
56
|
key: "edeuup"
|
|
58
57
|
}
|
|
59
58
|
]
|
|
60
|
-
],
|
|
59
|
+
], Ss = Be("mouse-pointer-2", Cs);
|
|
61
60
|
/**
|
|
62
61
|
* @license lucide-react v1.22.0 - ISC
|
|
63
62
|
*
|
|
64
63
|
* This source code is licensed under the ISC license.
|
|
65
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
65
|
*/
|
|
67
|
-
const
|
|
66
|
+
const Ms = [
|
|
68
67
|
[
|
|
69
68
|
"path",
|
|
70
69
|
{
|
|
@@ -72,14 +71,14 @@ const Ns = [
|
|
|
72
71
|
key: "1a8usu"
|
|
73
72
|
}
|
|
74
73
|
]
|
|
75
|
-
],
|
|
74
|
+
], Ns = Be("pen", Ms);
|
|
76
75
|
/**
|
|
77
76
|
* @license lucide-react v1.22.0 - ISC
|
|
78
77
|
*
|
|
79
78
|
* This source code is licensed under the ISC license.
|
|
80
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
80
|
*/
|
|
82
|
-
const
|
|
81
|
+
const Is = [
|
|
83
82
|
[
|
|
84
83
|
"path",
|
|
85
84
|
{ 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" }
|
|
@@ -101,19 +100,29 @@ const As = [
|
|
|
101
100
|
}
|
|
102
101
|
],
|
|
103
102
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
104
|
-
],
|
|
103
|
+
], As = Be("pencil-ruler", Is);
|
|
105
104
|
/**
|
|
106
105
|
* @license lucide-react v1.22.0 - ISC
|
|
107
106
|
*
|
|
108
107
|
* This source code is licensed under the ISC license.
|
|
109
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
109
|
*/
|
|
111
|
-
const
|
|
110
|
+
const Ts = [
|
|
112
111
|
["path", { d: "m19 16-3 3", key: "lp3y45" }],
|
|
113
112
|
["path", { d: "M2 21a8 8 0 0 1 12.664-6.5", key: "1ap0vn" }],
|
|
114
113
|
["path", { d: "M22 19h-6l3 3", key: "13fjle" }],
|
|
115
114
|
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }]
|
|
116
|
-
], Tr =
|
|
115
|
+
], Tr = Be("user-round-arrow-left", Ts);
|
|
116
|
+
/**
|
|
117
|
+
* @license lucide-react v1.22.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/
|
|
122
|
+
const Es = [
|
|
123
|
+
["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
|
|
124
|
+
["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
|
|
125
|
+
], zs = Be("user-round", Es), _s = {
|
|
117
126
|
type: "string",
|
|
118
127
|
enum: [
|
|
119
128
|
"none",
|
|
@@ -134,9 +143,9 @@ const Es = [
|
|
|
134
143
|
type: "string",
|
|
135
144
|
enum: ["front", "profile-left", "profile-right"],
|
|
136
145
|
description: "Active view id: 'front', 'profile-left', or 'profile-right'."
|
|
137
|
-
},
|
|
146
|
+
}, nt = {
|
|
138
147
|
enum: ["observation", "treatment", "concern", "note"]
|
|
139
|
-
},
|
|
148
|
+
}, Rs = {
|
|
140
149
|
id: "face-scheme",
|
|
141
150
|
// pick — focus a zone (transient); set_value / edit_inline — record / clear
|
|
142
151
|
// findings on a zone; view_change — switch the active view (front / left /
|
|
@@ -245,7 +254,7 @@ const Es = [
|
|
|
245
254
|
required: ["id"]
|
|
246
255
|
},
|
|
247
256
|
returns: "string[]",
|
|
248
|
-
returnsSchema: { type: "array", items:
|
|
257
|
+
returnsSchema: { type: "array", items: nt },
|
|
249
258
|
idempotent: !0,
|
|
250
259
|
descriptionKey: "ui.agent.faceScheme.actions.getZone",
|
|
251
260
|
description: "Read the finding types recorded on one zone (notes are not returned).",
|
|
@@ -256,7 +265,7 @@ const Es = [
|
|
|
256
265
|
argsType: "{ finding: FaceFindingType }",
|
|
257
266
|
argsSchema: {
|
|
258
267
|
type: "object",
|
|
259
|
-
properties: { finding:
|
|
268
|
+
properties: { finding: nt },
|
|
260
269
|
required: ["finding"]
|
|
261
270
|
},
|
|
262
271
|
returns: "string[]",
|
|
@@ -273,7 +282,7 @@ const Es = [
|
|
|
273
282
|
type: "object",
|
|
274
283
|
properties: {
|
|
275
284
|
id: ke,
|
|
276
|
-
finding:
|
|
285
|
+
finding: nt,
|
|
277
286
|
note: { type: "string" }
|
|
278
287
|
},
|
|
279
288
|
required: ["id", "finding"]
|
|
@@ -290,7 +299,7 @@ const Es = [
|
|
|
290
299
|
argsType: "{ id: string; finding: FaceFindingType }",
|
|
291
300
|
argsSchema: {
|
|
292
301
|
type: "object",
|
|
293
|
-
properties: { id: ke, finding:
|
|
302
|
+
properties: { id: ke, finding: nt },
|
|
294
303
|
required: ["id", "finding"]
|
|
295
304
|
},
|
|
296
305
|
idempotent: !0,
|
|
@@ -363,7 +372,7 @@ const Es = [
|
|
|
363
372
|
argsType: "{ tool: FaceAnnotationTool | 'none' }",
|
|
364
373
|
argsSchema: {
|
|
365
374
|
type: "object",
|
|
366
|
-
properties: { tool:
|
|
375
|
+
properties: { tool: _s },
|
|
367
376
|
required: ["tool"]
|
|
368
377
|
},
|
|
369
378
|
idempotent: !0,
|
|
@@ -461,7 +470,7 @@ const Es = [
|
|
|
461
470
|
items: ke,
|
|
462
471
|
description: "Zone ids to record the finding on."
|
|
463
472
|
},
|
|
464
|
-
finding:
|
|
473
|
+
finding: nt,
|
|
465
474
|
note: { type: "string" }
|
|
466
475
|
},
|
|
467
476
|
required: ["ids", "finding"]
|
|
@@ -497,7 +506,7 @@ const Es = [
|
|
|
497
506
|
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.'
|
|
498
507
|
}
|
|
499
508
|
}
|
|
500
|
-
},
|
|
509
|
+
}, $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 = {
|
|
501
510
|
"right-eye": [33, 133],
|
|
502
511
|
// subject's right eye, outer + inner corners
|
|
503
512
|
"left-eye": [263, 362],
|
|
@@ -512,7 +521,7 @@ const Es = [
|
|
|
512
521
|
subnasale: [2]
|
|
513
522
|
// base of the nose / top of the philtrum
|
|
514
523
|
}, wn = /* @__PURE__ */ new Map();
|
|
515
|
-
function
|
|
524
|
+
function Os(n, r, o, l) {
|
|
516
525
|
const d = `${n}|${r}|${o}`, c = wn.get(d);
|
|
517
526
|
if (c) return c;
|
|
518
527
|
l == null || l("loading");
|
|
@@ -529,32 +538,32 @@ function Zs(n, r, o, l) {
|
|
|
529
538
|
})();
|
|
530
539
|
return wn.set(d, m), m.catch(() => wn.delete(d)), m;
|
|
531
540
|
}
|
|
532
|
-
function
|
|
541
|
+
function Ps(n) {
|
|
533
542
|
const r = new Image();
|
|
534
543
|
return r.crossOrigin = "anonymous", r.src = n, r.decode().then(() => r);
|
|
535
544
|
}
|
|
536
|
-
async function
|
|
545
|
+
async function Ds(n, r) {
|
|
537
546
|
if (typeof window > "u" || typeof Image > "u")
|
|
538
547
|
throw new Error("detectFaceLandmarks runs in the browser only.");
|
|
539
548
|
const {
|
|
540
549
|
viewWidth: o,
|
|
541
550
|
viewHeight: l,
|
|
542
|
-
visionModuleUrl: d =
|
|
543
|
-
wasmBaseUrl: c =
|
|
544
|
-
modelAssetPath: m =
|
|
551
|
+
visionModuleUrl: d = $s,
|
|
552
|
+
wasmBaseUrl: c = Fs,
|
|
553
|
+
modelAssetPath: m = Ks,
|
|
545
554
|
onStage: h
|
|
546
555
|
} = r, [p, y] = await Promise.all([
|
|
547
|
-
|
|
548
|
-
|
|
556
|
+
Ps(n),
|
|
557
|
+
Os(d, c, m, h)
|
|
549
558
|
]);
|
|
550
559
|
h == null || h("detecting");
|
|
551
560
|
const b = y.detect(p).faceLandmarks[0];
|
|
552
561
|
if (!b || b.length === 0) return null;
|
|
553
|
-
const v = p.naturalWidth || p.width, k = p.naturalHeight || p.height, w = Math.max(o / v, l / k),
|
|
554
|
-
x:
|
|
562
|
+
const v = p.naturalWidth || p.width, k = p.naturalHeight || p.height, w = Math.max(o / v, l / k), L = (o - v * w) / 2, X = (l - k * w) / 2, $ = (R) => ({
|
|
563
|
+
x: L + R.x * v * w,
|
|
555
564
|
y: X + R.y * k * w
|
|
556
565
|
}), I = [];
|
|
557
|
-
for (const [R, H] of Object.entries(
|
|
566
|
+
for (const [R, H] of Object.entries(Zs)) {
|
|
558
567
|
let q = 0, pe = 0, re = 0;
|
|
559
568
|
for (const be of H) {
|
|
560
569
|
const le = b[be];
|
|
@@ -566,14 +575,14 @@ async function Ps(n, r) {
|
|
|
566
575
|
}
|
|
567
576
|
return I.length >= 3 ? I : null;
|
|
568
577
|
}
|
|
569
|
-
const
|
|
578
|
+
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 = [
|
|
570
579
|
"right-eye",
|
|
571
580
|
"left-eye",
|
|
572
581
|
"nose-tip",
|
|
573
582
|
"mouth-right",
|
|
574
583
|
"mouth-left"
|
|
575
584
|
], kn = /* @__PURE__ */ new Map();
|
|
576
|
-
async function
|
|
585
|
+
async function Us(n, r, o, l) {
|
|
577
586
|
const d = `${n}|${r}|${o}`, c = kn.get(d);
|
|
578
587
|
if (c) return c;
|
|
579
588
|
l == null || l("loading");
|
|
@@ -590,14 +599,14 @@ async function Hs(n, r, o, l) {
|
|
|
590
599
|
})();
|
|
591
600
|
return kn.set(d, m), m.catch(() => kn.delete(d)), m;
|
|
592
601
|
}
|
|
593
|
-
function
|
|
602
|
+
function Vs(n) {
|
|
594
603
|
const r = new Image();
|
|
595
604
|
return r.crossOrigin = "anonymous", r.src = n, r.decode().then(() => r);
|
|
596
605
|
}
|
|
597
|
-
async function
|
|
606
|
+
async function Ys() {
|
|
598
607
|
return (await import("./face_detection_yunet_2023mar-BnsRs4bD.js")).default;
|
|
599
608
|
}
|
|
600
|
-
function
|
|
609
|
+
function Xs(n, r) {
|
|
601
610
|
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");
|
|
602
611
|
y.width = F, y.height = F;
|
|
603
612
|
const S = y.getContext("2d");
|
|
@@ -614,7 +623,7 @@ function Ys(n, r) {
|
|
|
614
623
|
};
|
|
615
624
|
}
|
|
616
625
|
const Er = (n) => 1 / (1 + Math.exp(-n));
|
|
617
|
-
function
|
|
626
|
+
function qs(n, r) {
|
|
618
627
|
let o = !1;
|
|
619
628
|
const l = n.cls_8.data;
|
|
620
629
|
for (let c = 0; c < Math.min(l.length, 256); c++)
|
|
@@ -623,47 +632,47 @@ function Xs(n, r) {
|
|
|
623
632
|
break;
|
|
624
633
|
}
|
|
625
634
|
let d = null;
|
|
626
|
-
for (const c of
|
|
635
|
+
for (const c of Ws) {
|
|
627
636
|
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;
|
|
628
637
|
for (let v = 0; v < b; v++) {
|
|
629
638
|
let k = m[v], w = h[v];
|
|
630
639
|
o && (k = Er(k), w = Er(w)), k = Math.min(Math.max(k, 0), 1), w = Math.min(Math.max(w, 0), 1);
|
|
631
|
-
const
|
|
632
|
-
if (
|
|
640
|
+
const L = Math.sqrt(k * w);
|
|
641
|
+
if (L < r || d && L <= d.score) continue;
|
|
633
642
|
const X = v % y, $ = Math.floor(v / y), I = [];
|
|
634
643
|
for (let R = 0; R < 5; R++)
|
|
635
644
|
I.push([
|
|
636
645
|
(X + p[v * 10 + 2 * R]) * c,
|
|
637
646
|
($ + p[v * 10 + 2 * R + 1]) * c
|
|
638
647
|
]);
|
|
639
|
-
d = { score:
|
|
648
|
+
d = { score: L, keypoints: I };
|
|
640
649
|
}
|
|
641
650
|
}
|
|
642
651
|
return d;
|
|
643
652
|
}
|
|
644
|
-
async function
|
|
653
|
+
async function Gs(n, r) {
|
|
645
654
|
if (typeof window > "u" || typeof Image > "u")
|
|
646
655
|
throw new Error("detectFaceYuNet runs in the browser only.");
|
|
647
656
|
const {
|
|
648
657
|
viewWidth: o,
|
|
649
658
|
viewHeight: l,
|
|
650
|
-
ortModuleUrl: d =
|
|
651
|
-
ortWasmBaseUrl: c =
|
|
652
|
-
modelUrl: m = await
|
|
659
|
+
ortModuleUrl: d = Bs,
|
|
660
|
+
ortWasmBaseUrl: c = js,
|
|
661
|
+
modelUrl: m = await Ys(),
|
|
653
662
|
scoreThreshold: h = 0.6,
|
|
654
663
|
onStage: p
|
|
655
664
|
} = r, [y, { ort: S, session: b }] = await Promise.all([
|
|
656
|
-
|
|
657
|
-
|
|
665
|
+
Vs(n),
|
|
666
|
+
Us(d, c, m, p)
|
|
658
667
|
]);
|
|
659
668
|
p == null || p("detecting");
|
|
660
|
-
const { tensor: v, scale: k, padX: w, padY:
|
|
669
|
+
const { tensor: v, scale: k, padX: w, padY: L } = Xs(S.Tensor, y), X = await b.run({ [b.inputNames[0]]: v }), $ = qs(X, h);
|
|
661
670
|
if (!$) return null;
|
|
662
671
|
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;
|
|
663
672
|
return $.keypoints.map(([re, be], le) => {
|
|
664
|
-
const ge = (re - w) / k, ye = (be -
|
|
673
|
+
const ge = (re - w) / k, ye = (be - L) / k;
|
|
665
674
|
return {
|
|
666
|
-
id:
|
|
675
|
+
id: Hs[le],
|
|
667
676
|
photo: {
|
|
668
677
|
x: q + ge * H,
|
|
669
678
|
y: pe + ye * H
|
|
@@ -675,7 +684,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
|
|
|
675
684
|
id: "faceContour",
|
|
676
685
|
labelKey: "faceContour",
|
|
677
686
|
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"
|
|
678
|
-
},
|
|
687
|
+
}, Js = [
|
|
679
688
|
{
|
|
680
689
|
id: "lateralNeckRight",
|
|
681
690
|
labelKey: "lateralNeckRight",
|
|
@@ -852,7 +861,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
|
|
|
852
861
|
cy: 487,
|
|
853
862
|
side: "left"
|
|
854
863
|
}
|
|
855
|
-
],
|
|
864
|
+
], Qs = [
|
|
856
865
|
{ id: "right-eye", labelKey: "rightEye", x: 268, y: 487 },
|
|
857
866
|
{ id: "left-eye", labelKey: "leftEye", x: 535, y: 487 },
|
|
858
867
|
{ id: "nose-tip", labelKey: "noseTip", x: 403, y: 620 },
|
|
@@ -928,7 +937,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
|
|
|
928
937
|
cx: 552,
|
|
929
938
|
cy: 369
|
|
930
939
|
}
|
|
931
|
-
], zr = Wr.find((n) => n.id === "profileContour") ?? jr,
|
|
940
|
+
], zr = Wr.find((n) => n.id === "profileContour") ?? jr, _r = Wr.filter(
|
|
932
941
|
(n) => n.id !== "profileContour"
|
|
933
942
|
).map((n) => ({
|
|
934
943
|
id: n.id,
|
|
@@ -937,7 +946,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
|
|
|
937
946
|
cx: n.cx ?? 0,
|
|
938
947
|
cy: n.cy ?? 0,
|
|
939
948
|
side: n.side ?? "midline"
|
|
940
|
-
})),
|
|
949
|
+
})), Lr = [
|
|
941
950
|
{ id: "eye", labelKey: "eye", x: 561, y: 374 },
|
|
942
951
|
{ id: "nose-tip", labelKey: "noseTip", x: 668, y: 432 },
|
|
943
952
|
{ id: "mouth", labelKey: "mouth", x: 592, y: 532 }
|
|
@@ -951,8 +960,8 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
|
|
|
951
960
|
pivot: Cn,
|
|
952
961
|
contour: jr,
|
|
953
962
|
// The generator guarantees every clickable zone carries cx/cy/side.
|
|
954
|
-
zones:
|
|
955
|
-
landmarks:
|
|
963
|
+
zones: Js,
|
|
964
|
+
landmarks: Qs
|
|
956
965
|
},
|
|
957
966
|
// The reshaped profile zones face +x; the right profile is the same mesh
|
|
958
967
|
// mirrored. Both fit on the eye/nose-tip/mouth anchors — auto-detect and manual
|
|
@@ -965,8 +974,8 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
|
|
|
965
974
|
meshContentBox: { x: 383, y: 213, width: 239, height: 427 },
|
|
966
975
|
pivot: Cn,
|
|
967
976
|
contour: zr,
|
|
968
|
-
zones:
|
|
969
|
-
landmarks:
|
|
977
|
+
zones: _r,
|
|
978
|
+
landmarks: Lr
|
|
970
979
|
},
|
|
971
980
|
"profile-right": {
|
|
972
981
|
id: "profile-right",
|
|
@@ -976,11 +985,11 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
|
|
|
976
985
|
meshContentBox: { x: 383, y: 213, width: 239, height: 427 },
|
|
977
986
|
pivot: Cn,
|
|
978
987
|
contour: zr,
|
|
979
|
-
zones:
|
|
980
|
-
landmarks:
|
|
988
|
+
zones: _r,
|
|
989
|
+
landmarks: Lr,
|
|
981
990
|
mirror: !0
|
|
982
991
|
}
|
|
983
|
-
},
|
|
992
|
+
}, eo = [
|
|
984
993
|
"front",
|
|
985
994
|
"profile-left",
|
|
986
995
|
"profile-right"
|
|
@@ -994,7 +1003,7 @@ const bn = "0 0 808 944", Cn = { x: 404, y: 472 }, jr = {
|
|
|
994
1003
|
treatment: { shape: "square", tone: "success" },
|
|
995
1004
|
concern: { shape: "triangle", tone: "warning" },
|
|
996
1005
|
note: { shape: "diamond", tone: "neutral" }
|
|
997
|
-
},
|
|
1006
|
+
}, to = [
|
|
998
1007
|
"marker",
|
|
999
1008
|
"pen",
|
|
1000
1009
|
"highlighter",
|
|
@@ -1049,11 +1058,11 @@ function Nn(n, r, o) {
|
|
|
1049
1058
|
}
|
|
1050
1059
|
}
|
|
1051
1060
|
}
|
|
1052
|
-
function
|
|
1061
|
+
function no(n, r, o = 16) {
|
|
1053
1062
|
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);
|
|
1054
1063
|
return `M ${r.x} ${r.y} L ${b} ${v} M ${r.x} ${r.y} L ${k} ${w}`;
|
|
1055
1064
|
}
|
|
1056
|
-
function
|
|
1065
|
+
function ro(n) {
|
|
1057
1066
|
switch (n.kind) {
|
|
1058
1067
|
case "marker":
|
|
1059
1068
|
case "text":
|
|
@@ -1072,7 +1081,7 @@ function no(n) {
|
|
|
1072
1081
|
}
|
|
1073
1082
|
}
|
|
1074
1083
|
}
|
|
1075
|
-
function
|
|
1084
|
+
function io(n) {
|
|
1076
1085
|
switch (n.kind) {
|
|
1077
1086
|
case "marker":
|
|
1078
1087
|
case "text":
|
|
@@ -1089,8 +1098,8 @@ function ro(n) {
|
|
|
1089
1098
|
return { x: (n.from.x + n.to.x) / 2, y: (n.from.y + n.to.y) / 2 };
|
|
1090
1099
|
}
|
|
1091
1100
|
}
|
|
1092
|
-
const
|
|
1093
|
-
function
|
|
1101
|
+
const so = 28, Mn = 26;
|
|
1102
|
+
function oo(n, r = 30) {
|
|
1094
1103
|
switch (n.kind) {
|
|
1095
1104
|
case "marker":
|
|
1096
1105
|
return { type: "circle", cx: n.x, cy: n.y, r: Mn };
|
|
@@ -1118,26 +1127,26 @@ const Pe = [1, 0, 0, 1, 0, 0];
|
|
|
1118
1127
|
function zt(n) {
|
|
1119
1128
|
return `matrix(${n[0]} ${n[1]} ${n[2]} ${n[3]} ${n[4]} ${n[5]})`;
|
|
1120
1129
|
}
|
|
1121
|
-
function
|
|
1130
|
+
function rt(n, r) {
|
|
1122
1131
|
return {
|
|
1123
1132
|
x: n[0] * r.x + n[2] * r.y + n[4],
|
|
1124
1133
|
y: n[1] * r.x + n[3] * r.y + n[5]
|
|
1125
1134
|
};
|
|
1126
1135
|
}
|
|
1127
|
-
function
|
|
1136
|
+
function ao(n) {
|
|
1128
1137
|
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;
|
|
1129
1138
|
return [o, l, d, c, -(o * n[4] + d * n[5]), -(l * n[4] + c * n[5])];
|
|
1130
1139
|
}
|
|
1131
|
-
const
|
|
1140
|
+
const co = 0.84;
|
|
1132
1141
|
function $r(n, r, o, l = {}) {
|
|
1133
|
-
const d = `0 0 ${o.width} ${o.height}`, c = l.fraction ??
|
|
1142
|
+
const d = `0 0 ${o.width} ${o.height}`, c = l.fraction ?? co;
|
|
1134
1143
|
if (c <= 0 || c > 1) return d;
|
|
1135
1144
|
const m = [
|
|
1136
1145
|
{ x: n.x, y: n.y },
|
|
1137
1146
|
{ x: n.x + n.width, y: n.y },
|
|
1138
1147
|
{ x: n.x, y: n.y + n.height },
|
|
1139
1148
|
{ x: n.x + n.width, y: n.y + n.height }
|
|
1140
|
-
].map((I) =>
|
|
1149
|
+
].map((I) => rt(r, I));
|
|
1141
1150
|
let h = 1 / 0, p = 1 / 0, y = -1 / 0, S = -1 / 0;
|
|
1142
1151
|
for (const I of m)
|
|
1143
1152
|
h = Math.min(h, I.x), p = Math.min(p, I.y), y = Math.max(y, I.x), S = Math.max(S, I.y);
|
|
@@ -1148,20 +1157,20 @@ function $r(n, r, o, l = {}) {
|
|
|
1148
1157
|
const b = y - h, v = S - p;
|
|
1149
1158
|
if (!Number.isFinite(h + p + b + v) || b <= 0 || v <= 0)
|
|
1150
1159
|
return d;
|
|
1151
|
-
const k = o.width / o.height, w = Math.max(v / c, b / c / k),
|
|
1152
|
-
if (
|
|
1153
|
-
const X = Math.min(Math.max(h + b / 2 -
|
|
1154
|
-
return `${Math.round(X)} ${Math.round($)} ${Math.round(
|
|
1160
|
+
const k = o.width / o.height, w = Math.max(v / c, b / c / k), L = w * k;
|
|
1161
|
+
if (L > o.width || w > o.height) return d;
|
|
1162
|
+
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);
|
|
1163
|
+
return `${Math.round(X)} ${Math.round($)} ${Math.round(L)} ${Math.round(w)}`;
|
|
1155
1164
|
}
|
|
1156
|
-
const
|
|
1157
|
-
function
|
|
1165
|
+
const lo = 1, Ur = 8, it = { k: 1, fx: 0.5, fy: 0.5 }, De = (n) => Math.min(Math.max(n, 0), 1);
|
|
1166
|
+
function _t(n) {
|
|
1158
1167
|
const [r = 0, o = 0, l = 0, d = 0] = n.split(/\s+/).map(Number);
|
|
1159
1168
|
return { x: r, y: o, width: l, height: d };
|
|
1160
1169
|
}
|
|
1161
|
-
function
|
|
1170
|
+
function uo(n) {
|
|
1162
1171
|
return `${Math.round(n.x)} ${Math.round(n.y)} ${Math.round(n.width)} ${Math.round(n.height)}`;
|
|
1163
1172
|
}
|
|
1164
|
-
function
|
|
1173
|
+
function st(n, r) {
|
|
1165
1174
|
if (r.k <= 1) return n;
|
|
1166
1175
|
const o = n.width / r.k, l = n.height / r.k;
|
|
1167
1176
|
return {
|
|
@@ -1172,19 +1181,19 @@ function it(n, r) {
|
|
|
1172
1181
|
};
|
|
1173
1182
|
}
|
|
1174
1183
|
function Fr(n, r, o, l) {
|
|
1175
|
-
const d = Math.min(Math.max(r.k * l,
|
|
1176
|
-
if (d <= 1) return
|
|
1184
|
+
const d = Math.min(Math.max(r.k * l, lo), Ur);
|
|
1185
|
+
if (d <= 1) return it;
|
|
1177
1186
|
if (d === r.k || !Number.isFinite(d)) return r;
|
|
1178
|
-
const c =
|
|
1187
|
+
const c = st(n, r), m = n.width / d, h = n.height / d, p = c.width > 0 ? De((o.x - c.x) / c.width) : 0.5, y = c.height > 0 ? De((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;
|
|
1179
1188
|
return {
|
|
1180
1189
|
k: d,
|
|
1181
1190
|
fx: v > 0 ? De((S - n.x) / v) : 0.5,
|
|
1182
1191
|
fy: k > 0 ? De((b - n.y) / k) : 0.5
|
|
1183
1192
|
};
|
|
1184
1193
|
}
|
|
1185
|
-
function
|
|
1194
|
+
function fo(n, r, o, l) {
|
|
1186
1195
|
if (r.k <= 1) return r;
|
|
1187
|
-
const d =
|
|
1196
|
+
const d = st(n, r), c = n.width - d.width, m = n.height - d.height;
|
|
1188
1197
|
return {
|
|
1189
1198
|
k: r.k,
|
|
1190
1199
|
fx: c > 0 ? De((d.x - o - n.x) / c) : 0.5,
|
|
@@ -1192,11 +1201,11 @@ function uo(n, r, o, l) {
|
|
|
1192
1201
|
};
|
|
1193
1202
|
}
|
|
1194
1203
|
const Ft = Math.PI / 180;
|
|
1195
|
-
function
|
|
1204
|
+
function ho(n, r) {
|
|
1196
1205
|
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);
|
|
1197
1206
|
return [m, h, p, y, S, b];
|
|
1198
1207
|
}
|
|
1199
|
-
function
|
|
1208
|
+
function mo(n, r) {
|
|
1200
1209
|
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);
|
|
1201
1210
|
return { scaleX: p, scaleY: b, rotation: y, shear: v, translateX: k, translateY: w };
|
|
1202
1211
|
}
|
|
@@ -1210,14 +1219,14 @@ function Kr(n, r) {
|
|
|
1210
1219
|
}
|
|
1211
1220
|
const w = l * (m * o - h * h) - d * (d * o - h * c) + c * (d * h - m * c);
|
|
1212
1221
|
if (Math.abs(w) < 1e-9) return Pe;
|
|
1213
|
-
const
|
|
1214
|
-
(
|
|
1222
|
+
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, z, D) => [
|
|
1223
|
+
(L * ie + X * z + $ * D) / w,
|
|
1215
1224
|
(X * ie + I * z + R * D) / w,
|
|
1216
1225
|
($ * ie + R * z + H * D) / w
|
|
1217
1226
|
], [pe, re, be] = q(p, y, S), [le, ge, ye] = q(b, v, k);
|
|
1218
1227
|
return [pe, le, re, ge, be, ye];
|
|
1219
1228
|
}
|
|
1220
|
-
function
|
|
1229
|
+
function po(n) {
|
|
1221
1230
|
const r = (p) => {
|
|
1222
1231
|
var y;
|
|
1223
1232
|
return (y = n.find((S) => S.id === p)) == null ? void 0 : y.photo;
|
|
@@ -1230,14 +1239,14 @@ function mo(n) {
|
|
|
1230
1239
|
{ id: "mouth", photo: h(c, m) }
|
|
1231
1240
|
];
|
|
1232
1241
|
}
|
|
1233
|
-
function
|
|
1242
|
+
function go() {
|
|
1234
1243
|
return typeof navigator < "u" && typeof navigator.mediaDevices < "u" && typeof navigator.mediaDevices.getUserMedia == "function";
|
|
1235
1244
|
}
|
|
1236
|
-
function
|
|
1245
|
+
function yo(n) {
|
|
1237
1246
|
const r = n instanceof Error ? n.name : "";
|
|
1238
1247
|
return r === "NotAllowedError" || r === "SecurityError" ? "permission-denied" : r === "NotFoundError" || r === "OverconstrainedError" ? "no-camera" : r === "NotReadableError" || r === "AbortError" ? "not-readable" : "capture-failed";
|
|
1239
1248
|
}
|
|
1240
|
-
const
|
|
1249
|
+
const xo = {
|
|
1241
1250
|
"permission-denied": "faceScheme.capture.error.permissionDenied",
|
|
1242
1251
|
"no-camera": "faceScheme.capture.error.noCamera",
|
|
1243
1252
|
"not-readable": "faceScheme.capture.error.notReadable",
|
|
@@ -1250,32 +1259,32 @@ const yo = {
|
|
|
1250
1259
|
warning: "ds:[fill:var(--warning)]",
|
|
1251
1260
|
error: "ds:[fill:var(--destructive)]",
|
|
1252
1261
|
accent: "ds:[fill:var(--accent)]"
|
|
1253
|
-
},
|
|
1262
|
+
}, Lt = {
|
|
1254
1263
|
neutral: "ds:[stroke:var(--muted-foreground)]",
|
|
1255
1264
|
info: "ds:[stroke:var(--info)]",
|
|
1256
1265
|
success: "ds:[stroke:var(--success)]",
|
|
1257
1266
|
warning: "ds:[stroke:var(--warning)]",
|
|
1258
1267
|
error: "ds:[stroke:var(--destructive)]",
|
|
1259
1268
|
accent: "ds:[stroke:var(--accent)]"
|
|
1260
|
-
},
|
|
1269
|
+
}, vo = 13, wo = 5, ko = 24, Rt = 5, bo = 26, Zr = 30, $t = 14, Or = [], Pr = "__draft__", Dr = [
|
|
1261
1270
|
"profile-left",
|
|
1262
1271
|
"front",
|
|
1263
1272
|
"profile-right"
|
|
1264
|
-
],
|
|
1273
|
+
], Co = {
|
|
1265
1274
|
"profile-left": /* @__PURE__ */ a(Tr, { "aria-hidden": "true" }),
|
|
1266
|
-
front: /* @__PURE__ */ a(
|
|
1275
|
+
front: /* @__PURE__ */ a(zs, { "aria-hidden": "true" }),
|
|
1267
1276
|
"profile-right": /* @__PURE__ */ a(Tr, { "aria-hidden": "true", className: "ds:-scale-x-100" })
|
|
1268
|
-
},
|
|
1269
|
-
select:
|
|
1277
|
+
}, So = {
|
|
1278
|
+
select: Ss,
|
|
1270
1279
|
marker: fs,
|
|
1271
|
-
pen:
|
|
1280
|
+
pen: Ns,
|
|
1272
1281
|
highlighter: us,
|
|
1273
1282
|
arrow: ds,
|
|
1274
1283
|
line: ls,
|
|
1275
1284
|
rect: cs,
|
|
1276
1285
|
ellipse: as,
|
|
1277
1286
|
text: os
|
|
1278
|
-
},
|
|
1287
|
+
}, Mo = [
|
|
1279
1288
|
"accent",
|
|
1280
1289
|
"info",
|
|
1281
1290
|
"success",
|
|
@@ -1313,21 +1322,21 @@ const yo = {
|
|
|
1313
1322
|
],
|
|
1314
1323
|
defaultVariants: { interactive: !1, marked: !1, selected: !1 }
|
|
1315
1324
|
}
|
|
1316
|
-
),
|
|
1325
|
+
), No = {
|
|
1317
1326
|
scaleX: { min: 0.3, max: 1.8, step: 0.01 },
|
|
1318
1327
|
scaleY: { min: 0.3, max: 1.8, step: 0.01 },
|
|
1319
1328
|
rotation: { min: -20, max: 20, step: 0.5 },
|
|
1320
1329
|
shear: { min: -20, max: 20, step: 0.5 },
|
|
1321
1330
|
translateX: { min: -240, max: 240, step: 1 },
|
|
1322
1331
|
translateY: { min: -240, max: 240, step: 1 }
|
|
1323
|
-
},
|
|
1332
|
+
}, Io = [
|
|
1324
1333
|
"scaleX",
|
|
1325
1334
|
"scaleY",
|
|
1326
1335
|
"rotation",
|
|
1327
1336
|
"shear",
|
|
1328
1337
|
"translateX",
|
|
1329
1338
|
"translateY"
|
|
1330
|
-
],
|
|
1339
|
+
], Ao = Vi(
|
|
1331
1340
|
({
|
|
1332
1341
|
id: n,
|
|
1333
1342
|
patientPhoto: r,
|
|
@@ -1344,7 +1353,7 @@ const yo = {
|
|
|
1344
1353
|
onSelectZone: v,
|
|
1345
1354
|
activeFinding: k,
|
|
1346
1355
|
zoneSelect: w = "off",
|
|
1347
|
-
selectedZones:
|
|
1356
|
+
selectedZones: L,
|
|
1348
1357
|
defaultSelectedZones: X,
|
|
1349
1358
|
onSelectedZonesChange: $,
|
|
1350
1359
|
annotations: I,
|
|
@@ -1363,7 +1372,7 @@ const yo = {
|
|
|
1363
1372
|
defaultRegistration: Vr,
|
|
1364
1373
|
onRegistrationChange: ot,
|
|
1365
1374
|
registrationMode: Yr = "off",
|
|
1366
|
-
autoDetect:
|
|
1375
|
+
autoDetect: je,
|
|
1367
1376
|
onDetectStatus: at,
|
|
1368
1377
|
allowCapture: Kt = !1,
|
|
1369
1378
|
captureFacingMode: Zt = "user",
|
|
@@ -1372,7 +1381,7 @@ const yo = {
|
|
|
1372
1381
|
ariaLabel: Xr,
|
|
1373
1382
|
className: qr
|
|
1374
1383
|
}, Gr) => {
|
|
1375
|
-
const { t: f, i18n: Jr } = Gi("ui"), G = Yi(), lt = n ?? G, An = N(null), dt = N(null), ut = N(null),
|
|
1384
|
+
const { t: f, i18n: Jr } = Gi("ui"), G = Yi(), 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, [Qr, ei] = T(
|
|
1376
1385
|
l ?? d
|
|
1377
1386
|
), A = Pt ? l : Qr, K = N(A);
|
|
1378
1387
|
K.current = A;
|
|
@@ -1381,8 +1390,8 @@ const yo = {
|
|
|
1381
1390
|
Pt || ei(e), c == null || c(e);
|
|
1382
1391
|
},
|
|
1383
1392
|
[Pt, c]
|
|
1384
|
-
), [Dt, ht] = T(be), zn = `${G}-panel`, [mt,
|
|
1385
|
-
j.current =
|
|
1393
|
+
), [Dt, ht] = T(be), zn = `${G}-panel`, [mt, _n] = T(h), [Ln, ti] = T(!0), M = Sn[A], [, , B, se] = M.viewBox.split(" ").map(Number), _ = p === "interactive", Ce = _ && Yr === "adjust", Bt = y !== void 0, [ni, ri] = T(S ?? {}), He = Bt ? y : ni, j = N(He);
|
|
1394
|
+
j.current = He;
|
|
1386
1395
|
const oe = g(
|
|
1387
1396
|
(e) => {
|
|
1388
1397
|
Bt || ri(e), b == null || b(e);
|
|
@@ -1410,9 +1419,9 @@ const yo = {
|
|
|
1410
1419
|
) ? gt(e, t) : pt(e, t);
|
|
1411
1420
|
},
|
|
1412
1421
|
[pt, gt]
|
|
1413
|
-
), J =
|
|
1422
|
+
), J = _ && w === "multi", yt = L !== void 0, [ii, si] = T(
|
|
1414
1423
|
X ?? []
|
|
1415
|
-
), U = yt ?
|
|
1424
|
+
), U = yt ? L : ii, de = N(U);
|
|
1416
1425
|
de.current = U;
|
|
1417
1426
|
const $n = xn(
|
|
1418
1427
|
() => new Set(U),
|
|
@@ -1430,7 +1439,7 @@ const yo = {
|
|
|
1430
1439
|
);
|
|
1431
1440
|
},
|
|
1432
1441
|
[Ee]
|
|
1433
|
-
),
|
|
1442
|
+
), Ue = g(() => {
|
|
1434
1443
|
de.current.length > 0 && Ee([]);
|
|
1435
1444
|
}, [Ee]), [Kn, Zn] = T(""), xt = g(
|
|
1436
1445
|
(e, t, i) => {
|
|
@@ -1469,19 +1478,19 @@ const yo = {
|
|
|
1469
1478
|
},
|
|
1470
1479
|
[Wt, ot, A]
|
|
1471
1480
|
), Ut = xn(
|
|
1472
|
-
() =>
|
|
1481
|
+
() => mo(Q, M.pivot),
|
|
1473
1482
|
[Q, M.pivot]
|
|
1474
1483
|
), ce = g(
|
|
1475
1484
|
(e) => M.mirror ? { x: B - e.x, y: e.y } : e,
|
|
1476
1485
|
[M.mirror, B]
|
|
1477
1486
|
), [Vt, Pn] = T(
|
|
1478
|
-
() => M.landmarks.map((e) => ce(
|
|
1479
|
-
), wt = N(null), [ci, Dn] = T(null), Bn = N(null), [xe, Se] = T(
|
|
1487
|
+
() => M.landmarks.map((e) => ce(rt(Q, e)))
|
|
1488
|
+
), wt = N(null), [ci, Dn] = T(null), Bn = N(null), [xe, Se] = T(it), Yt = N(xe);
|
|
1480
1489
|
Yt.current = xe;
|
|
1481
1490
|
const kt = N(M.viewBox), ze = N(null);
|
|
1482
1491
|
ne(() => {
|
|
1483
1492
|
wt.current === null && Pn(
|
|
1484
|
-
M.landmarks.map((e) => ce(
|
|
1493
|
+
M.landmarks.map((e) => ce(rt(Q, e)))
|
|
1485
1494
|
);
|
|
1486
1495
|
}, [Q, M.landmarks, ce]);
|
|
1487
1496
|
const bt = g(
|
|
@@ -1507,7 +1516,7 @@ const yo = {
|
|
|
1507
1516
|
},
|
|
1508
1517
|
[]
|
|
1509
1518
|
), jn = (e, t) => {
|
|
1510
|
-
const i =
|
|
1519
|
+
const i = _t(kt.current), s = st(i, e);
|
|
1511
1520
|
return Fr(
|
|
1512
1521
|
i,
|
|
1513
1522
|
e,
|
|
@@ -1525,7 +1534,7 @@ const yo = {
|
|
|
1525
1534
|
Number.isFinite(e) && e > 0 ? e / t.k : 1
|
|
1526
1535
|
)
|
|
1527
1536
|
);
|
|
1528
|
-
}, []), qt = g(() => Se(
|
|
1537
|
+
}, []), qt = g(() => Se(it), []), Un = g((e) => {
|
|
1529
1538
|
if (!(!ze.current || ze.current.id !== e.pointerId)) {
|
|
1530
1539
|
ze.current = null;
|
|
1531
1540
|
try {
|
|
@@ -1550,7 +1559,7 @@ const yo = {
|
|
|
1550
1559
|
[Vt, ve, M.landmarks, ae, ce]
|
|
1551
1560
|
), ui = g(() => {
|
|
1552
1561
|
wt.current = null, Dn(null);
|
|
1553
|
-
}, []), [
|
|
1562
|
+
}, []), [Ve, ue] = T("idle"), [Vn, _e] = T(
|
|
1554
1563
|
null
|
|
1555
1564
|
), [Yn, fi] = 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, [hi, mi] = T(R ?? {}), Ct = Gt ? I : hi, W = N(Ct);
|
|
1556
1565
|
W.current = Ct;
|
|
@@ -1574,8 +1583,8 @@ const yo = {
|
|
|
1574
1583
|
(e) => {
|
|
1575
1584
|
const t = dt.current;
|
|
1576
1585
|
if (!t) return null;
|
|
1577
|
-
const i =
|
|
1578
|
-
|
|
1586
|
+
const i = rt(
|
|
1587
|
+
ao(Ht.current),
|
|
1579
1588
|
ce(e)
|
|
1580
1589
|
), s = t.querySelectorAll(
|
|
1581
1590
|
"[data-zone] > path:first-of-type"
|
|
@@ -1592,7 +1601,7 @@ const yo = {
|
|
|
1592
1601
|
[ce]
|
|
1593
1602
|
), Ae = g(
|
|
1594
1603
|
(e) => {
|
|
1595
|
-
const t = e.id ?? Xn(), i = { ...e, id: t }, s = i.zoneId === void 0 ? { ...i, zoneId: qn(
|
|
1604
|
+
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] ?? [];
|
|
1596
1605
|
return Z([...u, s]), O(t), t;
|
|
1597
1606
|
},
|
|
1598
1607
|
[Z, Xn, O, qn]
|
|
@@ -1617,7 +1626,7 @@ const yo = {
|
|
|
1617
1626
|
(W.current[K.current] ?? []).length > 0 && Z([]);
|
|
1618
1627
|
}, [Z]), tn = le !== void 0, [yi, xi] = T(
|
|
1619
1628
|
ge
|
|
1620
|
-
), V =
|
|
1629
|
+
), V = _ ? (tn ? le : yi) ?? null : null, nn = N(V);
|
|
1621
1630
|
nn.current = V;
|
|
1622
1631
|
const rn = g(
|
|
1623
1632
|
(e) => {
|
|
@@ -1628,14 +1637,14 @@ const yo = {
|
|
|
1628
1637
|
ie
|
|
1629
1638
|
), [on, wi] = T(z), Gn = N(sn);
|
|
1630
1639
|
Gn.current = sn;
|
|
1631
|
-
const
|
|
1632
|
-
|
|
1640
|
+
const Ye = N(on);
|
|
1641
|
+
Ye.current = on;
|
|
1633
1642
|
const [an, Mt] = T(null), Jn = N(null);
|
|
1634
1643
|
Jn.current = an;
|
|
1635
|
-
const Nt = N(!1), [
|
|
1636
|
-
cn.current =
|
|
1637
|
-
|
|
1638
|
-
}, [
|
|
1644
|
+
const Nt = N(!1), [Xe, It] = T(null), cn = N(null);
|
|
1645
|
+
cn.current = Xe, ne(() => {
|
|
1646
|
+
Xe !== null && ht(!0);
|
|
1647
|
+
}, [Xe]), ne(() => {
|
|
1639
1648
|
Ie !== null && ht(!0);
|
|
1640
1649
|
}, [Ie]);
|
|
1641
1650
|
const Qn = N(U.length);
|
|
@@ -1649,7 +1658,7 @@ const yo = {
|
|
|
1649
1658
|
const e = te.current;
|
|
1650
1659
|
e !== null && !Ne.some((t) => t.id === e) && O(null);
|
|
1651
1660
|
}, [Ne, O]);
|
|
1652
|
-
const
|
|
1661
|
+
const qe = V !== null, ki = g(
|
|
1653
1662
|
(e) => {
|
|
1654
1663
|
var s, u;
|
|
1655
1664
|
const t = nn.current;
|
|
@@ -1662,7 +1671,7 @@ const yo = {
|
|
|
1662
1671
|
x: i.x,
|
|
1663
1672
|
y: i.y,
|
|
1664
1673
|
shape: Gn.current,
|
|
1665
|
-
tone:
|
|
1674
|
+
tone: Ye.current
|
|
1666
1675
|
});
|
|
1667
1676
|
return;
|
|
1668
1677
|
}
|
|
@@ -1672,7 +1681,7 @@ const yo = {
|
|
|
1672
1681
|
x: i.x,
|
|
1673
1682
|
y: i.y,
|
|
1674
1683
|
text: "",
|
|
1675
|
-
tone:
|
|
1684
|
+
tone: Ye.current
|
|
1676
1685
|
});
|
|
1677
1686
|
It(x);
|
|
1678
1687
|
return;
|
|
@@ -1681,13 +1690,13 @@ const yo = {
|
|
|
1681
1690
|
id: Pr,
|
|
1682
1691
|
kind: t,
|
|
1683
1692
|
points: [i],
|
|
1684
|
-
tone:
|
|
1693
|
+
tone: Ye.current
|
|
1685
1694
|
}) : (t === "arrow" || t === "line" || t === "rect" || t === "ellipse") && Mt({
|
|
1686
1695
|
id: Pr,
|
|
1687
1696
|
kind: t,
|
|
1688
1697
|
from: i,
|
|
1689
1698
|
to: i,
|
|
1690
|
-
tone:
|
|
1699
|
+
tone: Ye.current
|
|
1691
1700
|
});
|
|
1692
1701
|
},
|
|
1693
1702
|
[ve, Ae]
|
|
@@ -1713,7 +1722,7 @@ const yo = {
|
|
|
1713
1722
|
Ae(s);
|
|
1714
1723
|
},
|
|
1715
1724
|
[Ae]
|
|
1716
|
-
), ln =
|
|
1725
|
+
), ln = Xe ? Ne.find((e) => e.id === Xe && e.kind === "text") : void 0, Ci = g(
|
|
1717
1726
|
(e) => {
|
|
1718
1727
|
const t = cn.current;
|
|
1719
1728
|
if (!t) return;
|
|
@@ -1730,21 +1739,21 @@ const yo = {
|
|
|
1730
1739
|
if (It(null), !e) return;
|
|
1731
1740
|
const t = W.current[K.current] ?? [], i = t.find((s) => s.id === e);
|
|
1732
1741
|
i && i.kind === "text" && i.text.trim() === "" && Z(t.filter((s) => s.id !== e));
|
|
1733
|
-
}, [Z]),
|
|
1742
|
+
}, [Z]), Le = g(() => {
|
|
1734
1743
|
var t;
|
|
1735
|
-
(t =
|
|
1744
|
+
(t = We.current) == null || t.getTracks().forEach((i) => i.stop()), We.current = null;
|
|
1736
1745
|
const e = ut.current;
|
|
1737
1746
|
e && (e.srcObject = null);
|
|
1738
1747
|
}, []), dn = g(() => {
|
|
1739
|
-
|
|
1740
|
-
}, [
|
|
1748
|
+
Le(), ue("idle");
|
|
1749
|
+
}, [Le]), un = g(async () => {
|
|
1741
1750
|
var e;
|
|
1742
1751
|
if (Kt) {
|
|
1743
|
-
if (!
|
|
1744
|
-
|
|
1752
|
+
if (!go()) {
|
|
1753
|
+
_e("insecure-context"), ue("error");
|
|
1745
1754
|
return;
|
|
1746
1755
|
}
|
|
1747
|
-
|
|
1756
|
+
_e(null), ue("requesting");
|
|
1748
1757
|
try {
|
|
1749
1758
|
const t = await navigator.mediaDevices.getUserMedia({
|
|
1750
1759
|
video: { facingMode: Zt },
|
|
@@ -1754,7 +1763,7 @@ const yo = {
|
|
|
1754
1763
|
t.getTracks().forEach((s) => s.stop());
|
|
1755
1764
|
return;
|
|
1756
1765
|
}
|
|
1757
|
-
|
|
1766
|
+
We.current = t;
|
|
1758
1767
|
const i = ut.current;
|
|
1759
1768
|
if (i) {
|
|
1760
1769
|
try {
|
|
@@ -1767,10 +1776,10 @@ const yo = {
|
|
|
1767
1776
|
}
|
|
1768
1777
|
ue("streaming");
|
|
1769
1778
|
} catch (t) {
|
|
1770
|
-
|
|
1779
|
+
Le(), _e(yo(t)), ue("error");
|
|
1771
1780
|
}
|
|
1772
1781
|
}
|
|
1773
|
-
}, [Kt, Zt,
|
|
1782
|
+
}, [Kt, Zt, Le]), Ge = g(
|
|
1774
1783
|
(e, t, i) => {
|
|
1775
1784
|
fi((s) => ({ ...s, [A]: e })), ct == null || ct({ src: e, width: t, height: i, view: A });
|
|
1776
1785
|
},
|
|
@@ -1778,24 +1787,24 @@ const yo = {
|
|
|
1778
1787
|
), Si = g(() => {
|
|
1779
1788
|
const e = ut.current, t = (e == null ? void 0 : e.videoWidth) || (e == null ? void 0 : e.clientWidth) || 0, i = (e == null ? void 0 : e.videoHeight) || (e == null ? void 0 : e.clientHeight) || 0;
|
|
1780
1789
|
if (!e || e.readyState < 2 || t === 0 || i === 0) {
|
|
1781
|
-
|
|
1790
|
+
_e("capture-failed"), ue("error");
|
|
1782
1791
|
return;
|
|
1783
1792
|
}
|
|
1784
1793
|
const s = document.createElement("canvas");
|
|
1785
1794
|
s.width = t, s.height = i;
|
|
1786
1795
|
const u = s.getContext("2d");
|
|
1787
1796
|
if (!u) {
|
|
1788
|
-
|
|
1797
|
+
_e("capture-failed"), ue("error");
|
|
1789
1798
|
return;
|
|
1790
1799
|
}
|
|
1791
1800
|
try {
|
|
1792
1801
|
u.drawImage(e, 0, 0, t, i);
|
|
1793
1802
|
} catch {
|
|
1794
|
-
|
|
1803
|
+
_e("capture-failed"), ue("error");
|
|
1795
1804
|
return;
|
|
1796
1805
|
}
|
|
1797
|
-
|
|
1798
|
-
}, [
|
|
1806
|
+
Le(), Ge(s.toDataURL("image/jpeg", 0.92), t, i), ue("idle");
|
|
1807
|
+
}, [Le, Ge]), Mi = g(
|
|
1799
1808
|
(e) => {
|
|
1800
1809
|
var s;
|
|
1801
1810
|
const t = (s = e.target.files) == null ? void 0 : s[0];
|
|
@@ -1805,16 +1814,16 @@ const yo = {
|
|
|
1805
1814
|
const u = typeof i.result == "string" ? i.result : "";
|
|
1806
1815
|
if (!u) return;
|
|
1807
1816
|
const x = new Image();
|
|
1808
|
-
x.onload = () =>
|
|
1817
|
+
x.onload = () => Ge(u, x.naturalWidth, x.naturalHeight), x.onerror = () => Ge(u, B, se), x.src = u;
|
|
1809
1818
|
}, i.readAsDataURL(t);
|
|
1810
1819
|
},
|
|
1811
|
-
[
|
|
1820
|
+
[Ge, B, se]
|
|
1812
1821
|
);
|
|
1813
1822
|
ne(() => (Ot.current = !1, () => {
|
|
1814
1823
|
var e;
|
|
1815
|
-
Ot.current = !0, (e =
|
|
1824
|
+
Ot.current = !0, (e = We.current) == null || e.getTracks().forEach((t) => t.stop()), We.current = null;
|
|
1816
1825
|
}), []);
|
|
1817
|
-
const fe =
|
|
1826
|
+
const fe = Ve === "streaming", ir = N(!1);
|
|
1818
1827
|
ne(() => {
|
|
1819
1828
|
var e;
|
|
1820
1829
|
ir.current && !fe && ((e = En.current) == null || e.focus()), ir.current = fe;
|
|
@@ -1825,14 +1834,14 @@ const yo = {
|
|
|
1825
1834
|
},
|
|
1826
1835
|
[at]
|
|
1827
1836
|
), fn = g(async () => {
|
|
1828
|
-
if (!
|
|
1837
|
+
if (!je || !ee || M.landmarks.length === 0)
|
|
1829
1838
|
return !1;
|
|
1830
|
-
const e = typeof
|
|
1839
|
+
const e = typeof je == "object" ? je : {}, t = (i) => Re(i === "detecting" ? "detecting" : "loading");
|
|
1831
1840
|
try {
|
|
1832
1841
|
Re("loading");
|
|
1833
1842
|
let i;
|
|
1834
1843
|
if (M.id === "front")
|
|
1835
|
-
i = await
|
|
1844
|
+
i = await Ds(ee, {
|
|
1836
1845
|
viewWidth: B,
|
|
1837
1846
|
viewHeight: se,
|
|
1838
1847
|
onStage: t,
|
|
@@ -1840,7 +1849,7 @@ const yo = {
|
|
|
1840
1849
|
modelAssetPath: e.modelAssetPath
|
|
1841
1850
|
});
|
|
1842
1851
|
else {
|
|
1843
|
-
const s = await
|
|
1852
|
+
const s = await Gs(ee, {
|
|
1844
1853
|
viewWidth: B,
|
|
1845
1854
|
viewHeight: se,
|
|
1846
1855
|
onStage: t,
|
|
@@ -1848,14 +1857,14 @@ const yo = {
|
|
|
1848
1857
|
ortWasmBaseUrl: e.ortWasmBaseUrl,
|
|
1849
1858
|
modelUrl: e.yunetModelUrl
|
|
1850
1859
|
});
|
|
1851
|
-
i = s &&
|
|
1860
|
+
i = s && po(s);
|
|
1852
1861
|
}
|
|
1853
1862
|
return !i || i.length < 3 ? (Re("no-face"), !1) : (bt(i), Re("done"), !0);
|
|
1854
1863
|
} catch {
|
|
1855
1864
|
return Re("error"), !1;
|
|
1856
1865
|
}
|
|
1857
1866
|
}, [
|
|
1858
|
-
|
|
1867
|
+
je,
|
|
1859
1868
|
ee,
|
|
1860
1869
|
M.id,
|
|
1861
1870
|
M.landmarks,
|
|
@@ -1916,7 +1925,7 @@ const yo = {
|
|
|
1916
1925
|
setAnnotationZone: Jt,
|
|
1917
1926
|
getSelectedZones: () => de.current,
|
|
1918
1927
|
setSelectedZones: (e) => Ee([...e]),
|
|
1919
|
-
clearZoneSelection:
|
|
1928
|
+
clearZoneSelection: Ue,
|
|
1920
1929
|
applyFindingToSelection: (e, t) => xt(de.current, e, t),
|
|
1921
1930
|
removeFindingFromSelection: (e) => jt(de.current, e),
|
|
1922
1931
|
setFindingBulk: xt
|
|
@@ -1940,14 +1949,14 @@ const yo = {
|
|
|
1940
1949
|
O,
|
|
1941
1950
|
Jt,
|
|
1942
1951
|
Ee,
|
|
1943
|
-
|
|
1952
|
+
Ue,
|
|
1944
1953
|
xt,
|
|
1945
1954
|
jt,
|
|
1946
1955
|
Hn,
|
|
1947
1956
|
qt
|
|
1948
1957
|
]
|
|
1949
1958
|
);
|
|
1950
|
-
Xi(Gr, () => hn, [hn]), Ji(
|
|
1959
|
+
Xi(Gr, () => hn, [hn]), Ji(Rs, hn, lt);
|
|
1951
1960
|
const or = g(
|
|
1952
1961
|
(e) => {
|
|
1953
1962
|
const t = f(`faceScheme.zone.${e.labelKey}`), i = j.current[e.id] ?? [];
|
|
@@ -1961,10 +1970,10 @@ const yo = {
|
|
|
1961
1970
|
[f]
|
|
1962
1971
|
), ar = g(
|
|
1963
1972
|
(e) => {
|
|
1964
|
-
v == null || v(e.id), J ? Fn(e.id) :
|
|
1973
|
+
v == null || v(e.id), J ? Fn(e.id) : _ && k && Rn(e.id, k);
|
|
1965
1974
|
},
|
|
1966
1975
|
[
|
|
1967
|
-
|
|
1976
|
+
_,
|
|
1968
1977
|
J,
|
|
1969
1978
|
Fn,
|
|
1970
1979
|
k,
|
|
@@ -1973,14 +1982,14 @@ const yo = {
|
|
|
1973
1982
|
]
|
|
1974
1983
|
), Ii = Me != null && Me.altKey ? f(Me.altKey) : f("faceScheme.photo.defaultAlt"), Ai = M.mirror ? `translate(${B} 0) scale(-1 1) ${zt(Q)}` : zt(Q), Ti = g(
|
|
1975
1984
|
(e, t) => {
|
|
1976
|
-
ae(
|
|
1985
|
+
ae(ho({ ...Ut, [e]: t }, M.pivot));
|
|
1977
1986
|
},
|
|
1978
1987
|
[ae, Ut, M.pivot]
|
|
1979
|
-
), cr = !!
|
|
1988
|
+
), cr = !!je && !!ee && M.landmarks.length > 0, mn = Kt, lr = m && eo.length > 1, Je = _ && pe, he = _ && re, pn = J || Je || Ce || he, dr = Dt && pn, we = mt === "all" && lr;
|
|
1980
1989
|
ne(() => {
|
|
1981
|
-
Se(
|
|
1990
|
+
Se(it);
|
|
1982
1991
|
}, [A, he]), ne(() => {
|
|
1983
|
-
fe && Se(
|
|
1992
|
+
fe && Se(it);
|
|
1984
1993
|
}, [fe]), ne(() => {
|
|
1985
1994
|
const e = dt.current;
|
|
1986
1995
|
if (!e || !he) return;
|
|
@@ -1989,7 +1998,7 @@ const yo = {
|
|
|
1989
1998
|
const s = ve(i.clientX, i.clientY);
|
|
1990
1999
|
Se(
|
|
1991
2000
|
(u) => Fr(
|
|
1992
|
-
|
|
2001
|
+
_t(kt.current),
|
|
1993
2002
|
u,
|
|
1994
2003
|
s,
|
|
1995
2004
|
i.deltaY < 0 ? 1.15 : 1 / 1.15
|
|
@@ -1998,11 +2007,11 @@ const yo = {
|
|
|
1998
2007
|
};
|
|
1999
2008
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
2000
2009
|
}, [he, ve, we, A, fe]);
|
|
2001
|
-
const
|
|
2010
|
+
const Qe = dr && !we, Ei = 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)]", zi = 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)]", Li = Qe ? "ds:lg:h-0 ds:lg:min-h-full" : void 0, Ri = 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, $i = ur || mn || pn, fr = pn ? /* @__PURE__ */ a(
|
|
2002
2011
|
Ke,
|
|
2003
2012
|
{
|
|
2004
2013
|
size: "sm",
|
|
2005
|
-
icon: /* @__PURE__ */ a(
|
|
2014
|
+
icon: /* @__PURE__ */ a(As, { "aria-hidden": "true" }),
|
|
2006
2015
|
"aria-label": f("faceScheme.panel.toggle"),
|
|
2007
2016
|
"aria-expanded": Dt,
|
|
2008
2017
|
"aria-controls": Dt ? zn : void 0,
|
|
@@ -2010,7 +2019,7 @@ const yo = {
|
|
|
2010
2019
|
onClick: () => ht((e) => !e)
|
|
2011
2020
|
},
|
|
2012
2021
|
"panel"
|
|
2013
|
-
) : null, Fi = V ?? "select", hr = `${G}-draw`, mr = `${G}-fit`, pr = `${G}-zoom`, gr = `${G}-tools`, yr = `${G}-tones`, xr = `${G}-shapes`, Ki = `${G}-ann-zone`,
|
|
2022
|
+
) : null, Fi = V ?? "select", hr = `${G}-draw`, mr = `${G}-fit`, pr = `${G}-zoom`, gr = `${G}-tools`, yr = `${G}-tones`, xr = `${G}-shapes`, Ki = `${G}-ann-zone`, et = Ie !== null ? Ne.find((e) => e.id === Ie) : void 0, Zi = M.zones.map((e) => ({
|
|
2014
2023
|
value: e.id,
|
|
2015
2024
|
label: f(`faceScheme.zone.${e.labelKey}`)
|
|
2016
2025
|
})), me = "ds:text-[length:var(--font-size-xs)] ds:font-medium ds:text-[var(--muted-foreground)]", vr = `${G}-zones`, wr = `${G}-zones-apply`, Oi = J ? /* @__PURE__ */ C(
|
|
@@ -2043,7 +2052,7 @@ const yo = {
|
|
|
2043
2052
|
className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]",
|
|
2044
2053
|
children: Rr.map((e) => {
|
|
2045
2054
|
const t = Et[e], i = U.length > 0 && U.every(
|
|
2046
|
-
(s) => (
|
|
2055
|
+
(s) => (He[s] ?? []).some((u) => u.type === e)
|
|
2047
2056
|
);
|
|
2048
2057
|
return /* @__PURE__ */ a(
|
|
2049
2058
|
P,
|
|
@@ -2055,7 +2064,7 @@ const yo = {
|
|
|
2055
2064
|
startIcon: /* @__PURE__ */ a("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
2056
2065
|
"path",
|
|
2057
2066
|
{
|
|
2058
|
-
d:
|
|
2067
|
+
d: tt(t.shape, 12, 12, 9),
|
|
2059
2068
|
className: Oe[t.tone]
|
|
2060
2069
|
}
|
|
2061
2070
|
) }),
|
|
@@ -2094,14 +2103,14 @@ const yo = {
|
|
|
2094
2103
|
size: "sm",
|
|
2095
2104
|
intent: "outline",
|
|
2096
2105
|
className: "ds:self-start",
|
|
2097
|
-
onClick:
|
|
2106
|
+
onClick: Ue,
|
|
2098
2107
|
disabled: U.length === 0,
|
|
2099
2108
|
children: f("faceScheme.zonesPanel.clearSelection")
|
|
2100
2109
|
}
|
|
2101
2110
|
)
|
|
2102
2111
|
]
|
|
2103
2112
|
}
|
|
2104
|
-
) : null, Pi =
|
|
2113
|
+
) : null, Pi = Je ? /* @__PURE__ */ C(
|
|
2105
2114
|
"div",
|
|
2106
2115
|
{
|
|
2107
2116
|
"data-testid": "face-scheme-toolbar",
|
|
@@ -2122,9 +2131,9 @@ const yo = {
|
|
|
2122
2131
|
className: "ds:self-start",
|
|
2123
2132
|
value: Fi,
|
|
2124
2133
|
onValueChange: (e) => rn(e === "select" ? null : e),
|
|
2125
|
-
children: ["select", ...
|
|
2134
|
+
children: ["select", ...to].map(
|
|
2126
2135
|
(e) => {
|
|
2127
|
-
const t =
|
|
2136
|
+
const t = So[e];
|
|
2128
2137
|
return /* @__PURE__ */ a(
|
|
2129
2138
|
Ke,
|
|
2130
2139
|
{
|
|
@@ -2163,7 +2172,7 @@ const yo = {
|
|
|
2163
2172
|
);
|
|
2164
2173
|
}
|
|
2165
2174
|
},
|
|
2166
|
-
children:
|
|
2175
|
+
children: Mo.map((e) => /* @__PURE__ */ a(
|
|
2167
2176
|
Ke,
|
|
2168
2177
|
{
|
|
2169
2178
|
value: e,
|
|
@@ -2202,7 +2211,7 @@ const yo = {
|
|
|
2202
2211
|
icon: /* @__PURE__ */ a("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
2203
2212
|
"path",
|
|
2204
2213
|
{
|
|
2205
|
-
d:
|
|
2214
|
+
d: tt(e, 12, 12, 9),
|
|
2206
2215
|
className: "ds:[fill:currentColor]"
|
|
2207
2216
|
}
|
|
2208
2217
|
) }),
|
|
@@ -2229,14 +2238,14 @@ const yo = {
|
|
|
2229
2238
|
),
|
|
2230
2239
|
/* @__PURE__ */ a(P, { size: "sm", intent: "primary", onClick: rr, children: f("faceScheme.annotate.textDone") })
|
|
2231
2240
|
] }),
|
|
2232
|
-
|
|
2241
|
+
et && /* @__PURE__ */ C("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
2233
2242
|
/* @__PURE__ */ a("span", { id: Ki, className: me, children: f("faceScheme.annotate.zoneLabel") }),
|
|
2234
2243
|
/* @__PURE__ */ a(
|
|
2235
2244
|
"span",
|
|
2236
2245
|
{
|
|
2237
2246
|
"aria-live": "polite",
|
|
2238
2247
|
className: "ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)] ds:empty:hidden",
|
|
2239
|
-
children:
|
|
2248
|
+
children: et.zoneId === null ? f("faceScheme.annotate.outsideZonesHint") : null
|
|
2240
2249
|
}
|
|
2241
2250
|
),
|
|
2242
2251
|
/* @__PURE__ */ a(
|
|
@@ -2244,11 +2253,11 @@ const yo = {
|
|
|
2244
2253
|
{
|
|
2245
2254
|
size: "sm",
|
|
2246
2255
|
options: Zi,
|
|
2247
|
-
value:
|
|
2256
|
+
value: et.zoneId ?? "",
|
|
2248
2257
|
clearable: !0,
|
|
2249
|
-
placeholder:
|
|
2258
|
+
placeholder: et.zoneId == null ? f("faceScheme.annotate.zoneNone") : f("faceScheme.annotate.zonePlaceholder"),
|
|
2250
2259
|
"aria-label": f("faceScheme.annotate.zoneLabel"),
|
|
2251
|
-
onValueChange: (e) => Jt(
|
|
2260
|
+
onValueChange: (e) => Jt(et.id, e === "" ? null : e)
|
|
2252
2261
|
}
|
|
2253
2262
|
)
|
|
2254
2263
|
] }),
|
|
@@ -2307,7 +2316,7 @@ const yo = {
|
|
|
2307
2316
|
return /* @__PURE__ */ a(
|
|
2308
2317
|
"path",
|
|
2309
2318
|
{
|
|
2310
|
-
d:
|
|
2319
|
+
d: tt(e.shape, e.x, e.y, vo),
|
|
2311
2320
|
className: Oe[t],
|
|
2312
2321
|
pointerEvents: "none"
|
|
2313
2322
|
}
|
|
@@ -2319,16 +2328,16 @@ const yo = {
|
|
|
2319
2328
|
{
|
|
2320
2329
|
d: Hr(e.points),
|
|
2321
2330
|
fill: "none",
|
|
2322
|
-
strokeWidth: e.kind === "highlighter" ?
|
|
2331
|
+
strokeWidth: e.kind === "highlighter" ? ko : wo,
|
|
2323
2332
|
strokeOpacity: e.kind === "highlighter" ? 0.35 : 1,
|
|
2324
2333
|
strokeLinecap: "round",
|
|
2325
2334
|
strokeLinejoin: "round",
|
|
2326
|
-
className:
|
|
2335
|
+
className: Lt[t],
|
|
2327
2336
|
pointerEvents: "none"
|
|
2328
2337
|
}
|
|
2329
2338
|
);
|
|
2330
2339
|
case "arrow":
|
|
2331
|
-
return /* @__PURE__ */ C("g", { className:
|
|
2340
|
+
return /* @__PURE__ */ C("g", { className: Lt[t], pointerEvents: "none", children: [
|
|
2332
2341
|
/* @__PURE__ */ a(
|
|
2333
2342
|
"path",
|
|
2334
2343
|
{
|
|
@@ -2341,7 +2350,7 @@ const yo = {
|
|
|
2341
2350
|
/* @__PURE__ */ a(
|
|
2342
2351
|
"path",
|
|
2343
2352
|
{
|
|
2344
|
-
d:
|
|
2353
|
+
d: no(e.from, e.to, bo),
|
|
2345
2354
|
fill: "none",
|
|
2346
2355
|
strokeWidth: Rt,
|
|
2347
2356
|
strokeLinecap: "round",
|
|
@@ -2360,7 +2369,7 @@ const yo = {
|
|
|
2360
2369
|
strokeWidth: Rt,
|
|
2361
2370
|
strokeLinecap: "round",
|
|
2362
2371
|
strokeLinejoin: "round",
|
|
2363
|
-
className:
|
|
2372
|
+
className: Lt[t],
|
|
2364
2373
|
pointerEvents: "none"
|
|
2365
2374
|
}
|
|
2366
2375
|
);
|
|
@@ -2384,13 +2393,13 @@ const yo = {
|
|
|
2384
2393
|
d: `M ${e.x - 10} ${e.y} H ${e.x + 10} M ${e.x} ${e.y - 10} V ${e.y + 10}`,
|
|
2385
2394
|
strokeWidth: Rt,
|
|
2386
2395
|
strokeLinecap: "round",
|
|
2387
|
-
className:
|
|
2396
|
+
className: Lt[t],
|
|
2388
2397
|
pointerEvents: "none"
|
|
2389
2398
|
}
|
|
2390
2399
|
);
|
|
2391
2400
|
}
|
|
2392
2401
|
}, Bi = (e) => {
|
|
2393
|
-
const t =
|
|
2402
|
+
const t = oo(e, Zr);
|
|
2394
2403
|
switch (t.type) {
|
|
2395
2404
|
case "stroke":
|
|
2396
2405
|
return /* @__PURE__ */ a(
|
|
@@ -2400,7 +2409,7 @@ const yo = {
|
|
|
2400
2409
|
d: t.d,
|
|
2401
2410
|
fill: "none",
|
|
2402
2411
|
stroke: "transparent",
|
|
2403
|
-
strokeWidth:
|
|
2412
|
+
strokeWidth: so,
|
|
2404
2413
|
strokeLinecap: "round",
|
|
2405
2414
|
strokeLinejoin: "round",
|
|
2406
2415
|
pointerEvents: "stroke",
|
|
@@ -2444,7 +2453,7 @@ const yo = {
|
|
|
2444
2453
|
Bn.current = kr;
|
|
2445
2454
|
const yn = ee ? ci ?? kr ?? M.viewBox : we || !Ce ? M.schematicViewBox : M.viewBox;
|
|
2446
2455
|
kt.current = yn;
|
|
2447
|
-
const br = he && xe.k > 1, ji = br ?
|
|
2456
|
+
const br = he && xe.k > 1, ji = br ? uo(st(_t(yn), xe)) : yn, Cr = br && V === null, Sr = (e) => {
|
|
2448
2457
|
if (e !== A) {
|
|
2449
2458
|
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] ?? Pe, x = t.mirror ? `translate(${B} 0) scale(-1 1) ${zt(u)}` : zt(u), Y = Ct[e] ?? Or;
|
|
2450
2459
|
return /* @__PURE__ */ a(Ze, { variant: "elevated", interactive: !0, asChild: !0, children: /* @__PURE__ */ a(
|
|
@@ -2480,7 +2489,7 @@ const yo = {
|
|
|
2480
2489
|
}
|
|
2481
2490
|
),
|
|
2482
2491
|
/* @__PURE__ */ a("g", { transform: x, children: t.zones.map((E) => {
|
|
2483
|
-
const Te =
|
|
2492
|
+
const Te = He[E.id] ?? [], Wi = Te.length > 0;
|
|
2484
2493
|
return /* @__PURE__ */ C("g", { children: [
|
|
2485
2494
|
/* @__PURE__ */ a(
|
|
2486
2495
|
"path",
|
|
@@ -2500,7 +2509,7 @@ const yo = {
|
|
|
2500
2509
|
return /* @__PURE__ */ a(
|
|
2501
2510
|
"path",
|
|
2502
2511
|
{
|
|
2503
|
-
d:
|
|
2512
|
+
d: tt(
|
|
2504
2513
|
Nr.shape,
|
|
2505
2514
|
E.cx + Ui,
|
|
2506
2515
|
E.cy,
|
|
@@ -2540,7 +2549,7 @@ const yo = {
|
|
|
2540
2549
|
role: "group",
|
|
2541
2550
|
"aria-label": f(`faceScheme.view.${M.labelKey}`),
|
|
2542
2551
|
className: Cr ? "ds:block ds:h-auto ds:w-full ds:touch-none ds:cursor-grab" : "ds:block ds:h-auto ds:w-full ds:touch-none",
|
|
2543
|
-
onPointerDown:
|
|
2552
|
+
onPointerDown: _ ? (t) => {
|
|
2544
2553
|
var s, u;
|
|
2545
2554
|
const i = t.target;
|
|
2546
2555
|
if (te.current !== null && !((s = i.closest) != null && s.call(i, "[data-annotation]")) && O(null), Cr && !((u = i.closest) != null && u.call(
|
|
@@ -2563,17 +2572,17 @@ const yo = {
|
|
|
2563
2572
|
if (!i || i.id !== t.pointerId) return;
|
|
2564
2573
|
const s = t.currentTarget.getBoundingClientRect();
|
|
2565
2574
|
if (s.width <= 0 || s.height <= 0) return;
|
|
2566
|
-
const u =
|
|
2575
|
+
const u = _t(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;
|
|
2567
2576
|
ze.current = {
|
|
2568
2577
|
id: i.id,
|
|
2569
2578
|
x: t.clientX,
|
|
2570
2579
|
y: t.clientY
|
|
2571
|
-
}, Se((Te) =>
|
|
2580
|
+
}, Se((Te) => fo(u, Te, Y, E));
|
|
2572
2581
|
} : void 0,
|
|
2573
2582
|
onPointerUp: he ? Un : void 0,
|
|
2574
2583
|
onPointerCancel: he ? Un : void 0,
|
|
2575
2584
|
onKeyDown: J ? (t) => {
|
|
2576
|
-
t.key === "Escape" &&
|
|
2585
|
+
t.key === "Escape" && Ue();
|
|
2577
2586
|
} : void 0,
|
|
2578
2587
|
children: [
|
|
2579
2588
|
ee && /* @__PURE__ */ a(
|
|
@@ -2590,7 +2599,7 @@ const yo = {
|
|
|
2590
2599
|
}
|
|
2591
2600
|
),
|
|
2592
2601
|
/* @__PURE__ */ a("g", { transform: Ai, children: M.zones.map((t) => {
|
|
2593
|
-
const i =
|
|
2602
|
+
const i = He[t.id] ?? [], s = i.length > 0, u = J && $n.has(t.id);
|
|
2594
2603
|
return /* @__PURE__ */ C(Fe.Root, { children: [
|
|
2595
2604
|
/* @__PURE__ */ a(Fe.Trigger, { asChild: !0, children: /* @__PURE__ */ C(
|
|
2596
2605
|
"g",
|
|
@@ -2598,14 +2607,14 @@ const yo = {
|
|
|
2598
2607
|
"data-zone": t.id,
|
|
2599
2608
|
"data-side": t.side,
|
|
2600
2609
|
"data-zone-selected": u ? "true" : void 0,
|
|
2601
|
-
role:
|
|
2610
|
+
role: _ || v ? "button" : "img",
|
|
2602
2611
|
"aria-label": or(t),
|
|
2603
|
-
"aria-pressed": J ? u :
|
|
2612
|
+
"aria-pressed": J ? u : _ && k ? s : void 0,
|
|
2604
2613
|
className: "ds:outline-none ds:[&:focus-visible>*:first-child]:[stroke:var(--ring)] ds:[&:focus-visible>*:first-child]:[stroke-width:var(--focus-ring-width)] ds:[&:focus-visible>*:first-child]:[stroke-opacity:1] ds:forced-colors:[&:focus-visible>*:first-child]:[stroke:CanvasText]",
|
|
2605
|
-
tabIndex:
|
|
2614
|
+
tabIndex: _ || v ? 0 : -1,
|
|
2606
2615
|
onClick: () => ar(t),
|
|
2607
2616
|
onKeyDown: (x) => {
|
|
2608
|
-
x.key === "Enter" || x.key === " " ? (x.preventDefault(), ar(t)) : x.key === "Escape" && J &&
|
|
2617
|
+
x.key === "Enter" || x.key === " " ? (x.preventDefault(), ar(t)) : x.key === "Escape" && J && Ue();
|
|
2609
2618
|
},
|
|
2610
2619
|
children: [
|
|
2611
2620
|
/* @__PURE__ */ a(
|
|
@@ -2613,7 +2622,7 @@ const yo = {
|
|
|
2613
2622
|
{
|
|
2614
2623
|
d: t.d,
|
|
2615
2624
|
className: Br({
|
|
2616
|
-
interactive:
|
|
2625
|
+
interactive: _,
|
|
2617
2626
|
marked: s,
|
|
2618
2627
|
selected: u
|
|
2619
2628
|
})
|
|
@@ -2624,7 +2633,7 @@ const yo = {
|
|
|
2624
2633
|
return /* @__PURE__ */ a(
|
|
2625
2634
|
"path",
|
|
2626
2635
|
{
|
|
2627
|
-
d:
|
|
2636
|
+
d: tt(
|
|
2628
2637
|
E.shape,
|
|
2629
2638
|
t.cx + Te,
|
|
2630
2639
|
t.cy,
|
|
@@ -2654,7 +2663,7 @@ const yo = {
|
|
|
2654
2663
|
}) }),
|
|
2655
2664
|
/* @__PURE__ */ C("g", { "data-testid": "face-scheme-annotations", children: [
|
|
2656
2665
|
Ne.map((t) => {
|
|
2657
|
-
const i =
|
|
2666
|
+
const i = ro(t), s = Ie === t.id;
|
|
2658
2667
|
return /* @__PURE__ */ C(
|
|
2659
2668
|
"g",
|
|
2660
2669
|
{
|
|
@@ -2662,16 +2671,16 @@ const yo = {
|
|
|
2662
2671
|
"data-annotation-kind": t.kind,
|
|
2663
2672
|
"data-annotation-zone": t.zoneId ?? void 0,
|
|
2664
2673
|
"data-selected": s ? "true" : void 0,
|
|
2665
|
-
role:
|
|
2674
|
+
role: _ ? "button" : "img",
|
|
2666
2675
|
"aria-label": Di(t),
|
|
2667
|
-
"aria-pressed":
|
|
2668
|
-
tabIndex:
|
|
2676
|
+
"aria-pressed": _ ? s : void 0,
|
|
2677
|
+
tabIndex: _ ? 0 : -1,
|
|
2669
2678
|
className: "ds:outline-none ds:[&:focus-visible>*:first-child]:[stroke-opacity:1] ds:[&[data-selected=true]>*:first-child]:[stroke-opacity:1] ds:[&[data-selected=true]>*:first-child]:[stroke-dasharray:6_4] ds:forced-colors:[&:focus-visible>*:first-child]:[stroke:CanvasText] ds:forced-colors:[&[data-selected=true]>*:first-child]:[stroke:CanvasText]",
|
|
2670
|
-
onClick:
|
|
2679
|
+
onClick: _ && V === null ? (u) => {
|
|
2671
2680
|
u.currentTarget.focus(), te.current === t.id ? t.kind === "text" ? It(t.id) : O(null) : O(t.id);
|
|
2672
2681
|
} : void 0,
|
|
2673
2682
|
onKeyDown: (u) => {
|
|
2674
|
-
|
|
2683
|
+
_ && (u.key === "Delete" || u.key === "Backspace" ? (u.preventDefault(), St(t.id)) : u.key === "Escape" ? te.current !== null && (u.stopPropagation(), O(null)) : (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t.kind === "text" ? It(t.id) : te.current === t.id ? O(null) : O(t.id)));
|
|
2675
2684
|
},
|
|
2676
2685
|
children: [
|
|
2677
2686
|
/* @__PURE__ */ a(
|
|
@@ -2688,7 +2697,7 @@ const yo = {
|
|
|
2688
2697
|
}
|
|
2689
2698
|
),
|
|
2690
2699
|
gn(t),
|
|
2691
|
-
|
|
2700
|
+
_ && V === null && Bi(t)
|
|
2692
2701
|
]
|
|
2693
2702
|
},
|
|
2694
2703
|
t.id
|
|
@@ -2706,15 +2715,15 @@ const yo = {
|
|
|
2706
2715
|
height: se,
|
|
2707
2716
|
fill: "transparent",
|
|
2708
2717
|
"aria-hidden": "true",
|
|
2709
|
-
className:
|
|
2710
|
-
onPointerDown:
|
|
2711
|
-
onPointerMove:
|
|
2712
|
-
onPointerUp:
|
|
2713
|
-
onPointerCancel:
|
|
2718
|
+
className: qe ? "ds:cursor-crosshair ds:touch-none" : "ds:[pointer-events:none]",
|
|
2719
|
+
onPointerDown: qe ? ki : void 0,
|
|
2720
|
+
onPointerMove: qe ? bi : void 0,
|
|
2721
|
+
onPointerUp: qe ? nr : void 0,
|
|
2722
|
+
onPointerCancel: qe ? nr : void 0
|
|
2714
2723
|
}
|
|
2715
2724
|
),
|
|
2716
2725
|
Ce && ee && V === null && /* @__PURE__ */ a("g", { "aria-hidden": "true", "data-testid": "face-scheme-handles", children: M.landmarks.map((t, i) => {
|
|
2717
|
-
const s = Vt[i] ?? ce(
|
|
2726
|
+
const s = Vt[i] ?? ce(rt(Q, t));
|
|
2718
2727
|
return /* @__PURE__ */ C("g", { children: [
|
|
2719
2728
|
/* @__PURE__ */ a(
|
|
2720
2729
|
"circle",
|
|
@@ -2755,9 +2764,9 @@ const yo = {
|
|
|
2755
2764
|
size: "sm",
|
|
2756
2765
|
intent: t ? "primary" : void 0,
|
|
2757
2766
|
"aria-pressed": t,
|
|
2758
|
-
startIcon:
|
|
2767
|
+
startIcon: Co[e],
|
|
2759
2768
|
onClick: () => {
|
|
2760
|
-
ft(e),
|
|
2769
|
+
ft(e), _n("single");
|
|
2761
2770
|
},
|
|
2762
2771
|
children: f(`faceScheme.viewShort.${Sn[e].labelKey}`)
|
|
2763
2772
|
},
|
|
@@ -2772,8 +2781,8 @@ const yo = {
|
|
|
2772
2781
|
size: "sm",
|
|
2773
2782
|
intent: mt === "all" ? "primary" : void 0,
|
|
2774
2783
|
"aria-pressed": mt === "all",
|
|
2775
|
-
startIcon: /* @__PURE__ */ a(
|
|
2776
|
-
onClick: () =>
|
|
2784
|
+
startIcon: /* @__PURE__ */ a(bs, { "aria-hidden": "true" }),
|
|
2785
|
+
onClick: () => _n("all"),
|
|
2777
2786
|
children: f("faceScheme.viewShort.all")
|
|
2778
2787
|
},
|
|
2779
2788
|
"all"
|
|
@@ -2790,7 +2799,7 @@ const yo = {
|
|
|
2790
2799
|
startIcon: /* @__PURE__ */ a(gs, { "aria-hidden": "true" }),
|
|
2791
2800
|
"data-overflow-pin": !0,
|
|
2792
2801
|
onClick: () => void un(),
|
|
2793
|
-
disabled:
|
|
2802
|
+
disabled: Ve === "requesting",
|
|
2794
2803
|
children: f(
|
|
2795
2804
|
ee ? "faceScheme.capture.retake" : "faceScheme.capture.take"
|
|
2796
2805
|
)
|
|
@@ -2856,11 +2865,11 @@ const yo = {
|
|
|
2856
2865
|
{
|
|
2857
2866
|
role: "status",
|
|
2858
2867
|
"aria-live": "polite",
|
|
2859
|
-
className:
|
|
2860
|
-
children:
|
|
2868
|
+
className: Ve === "requesting" ? "ds:text-start ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)] ds:empty:hidden" : "ds:text-start ds:text-[length:var(--font-size-xs)] ds:text-[var(--destructive)] ds:empty:hidden",
|
|
2869
|
+
children: Ve === "requesting" ? f(
|
|
2861
2870
|
"faceScheme.capture.requesting",
|
|
2862
2871
|
"Waiting for camera permission…"
|
|
2863
|
-
) :
|
|
2872
|
+
) : Ve === "error" && Vn ? f(xo[Vn]) : ""
|
|
2864
2873
|
}
|
|
2865
2874
|
)
|
|
2866
2875
|
] }),
|
|
@@ -2902,7 +2911,7 @@ const yo = {
|
|
|
2902
2911
|
// matching aspects within them.
|
|
2903
2912
|
/* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-1 ds:items-center ds:gap-[var(--spacing-md)] ds:md:grid-cols-3", children: Dr.map((e) => /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: Sr(e) }, e)) })
|
|
2904
2913
|
) : Sr(A)),
|
|
2905
|
-
In &&
|
|
2914
|
+
In && Ln && /* @__PURE__ */ a(Ze, { variant: "elevated", "data-testid": "face-scheme-legend", children: /* @__PURE__ */ a(Ze.Body, { children: /* @__PURE__ */ a(
|
|
2906
2915
|
"ul",
|
|
2907
2916
|
{
|
|
2908
2917
|
"aria-label": f("faceScheme.legendLabel"),
|
|
@@ -2929,18 +2938,18 @@ const yo = {
|
|
|
2929
2938
|
}
|
|
2930
2939
|
) }) })
|
|
2931
2940
|
] }),
|
|
2932
|
-
dr && /* @__PURE__ */ a("div", { className:
|
|
2941
|
+
dr && /* @__PURE__ */ a("div", { className: _i, children: /* @__PURE__ */ a(
|
|
2933
2942
|
Ze,
|
|
2934
2943
|
{
|
|
2935
2944
|
variant: "elevated",
|
|
2936
2945
|
"data-testid": "face-scheme-panel",
|
|
2937
2946
|
id: zn,
|
|
2938
|
-
className:
|
|
2947
|
+
className: Li,
|
|
2939
2948
|
children: /* @__PURE__ */ C(Ze.Body, { className: Ri, children: [
|
|
2940
2949
|
Oi,
|
|
2941
|
-
J && (
|
|
2950
|
+
J && (Je || Ce) && /* @__PURE__ */ a(Tt, {}),
|
|
2942
2951
|
Pi,
|
|
2943
|
-
|
|
2952
|
+
Je && Ce && /* @__PURE__ */ a(Tt, {}),
|
|
2944
2953
|
Ce && /* @__PURE__ */ C(
|
|
2945
2954
|
"div",
|
|
2946
2955
|
{
|
|
@@ -2951,8 +2960,8 @@ const yo = {
|
|
|
2951
2960
|
children: [
|
|
2952
2961
|
/* @__PURE__ */ a("span", { id: mr, className: me, children: f("faceScheme.panel.fit") }),
|
|
2953
2962
|
/* @__PURE__ */ a("p", { className: "ds:m-0 ds:text-[length:var(--font-size-xs)] ds:text-[var(--muted-foreground)]", children: f("faceScheme.registration.hint") }),
|
|
2954
|
-
/* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-2", children:
|
|
2955
|
-
const t =
|
|
2963
|
+
/* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-2", children: Io.map((e) => {
|
|
2964
|
+
const t = No[e], i = e === "scaleX" || e === "scaleY";
|
|
2956
2965
|
return /* @__PURE__ */ C(
|
|
2957
2966
|
"div",
|
|
2958
2967
|
{
|
|
@@ -3016,7 +3025,7 @@ const yo = {
|
|
|
3016
3025
|
}
|
|
3017
3026
|
),
|
|
3018
3027
|
he && /* @__PURE__ */ C(Ir, { children: [
|
|
3019
|
-
(J ||
|
|
3028
|
+
(J || Je || Ce) && /* @__PURE__ */ a(Tt, {}),
|
|
3020
3029
|
/* @__PURE__ */ C(
|
|
3021
3030
|
"div",
|
|
3022
3031
|
{
|
|
@@ -3083,7 +3092,7 @@ const yo = {
|
|
|
3083
3092
|
{
|
|
3084
3093
|
size: "sm",
|
|
3085
3094
|
label: f("faceScheme.showLegend"),
|
|
3086
|
-
checked:
|
|
3095
|
+
checked: Ln,
|
|
3087
3096
|
onCheckedChange: ti
|
|
3088
3097
|
}
|
|
3089
3098
|
)
|
|
@@ -3096,31 +3105,31 @@ const yo = {
|
|
|
3096
3105
|
);
|
|
3097
3106
|
}
|
|
3098
3107
|
);
|
|
3099
|
-
|
|
3108
|
+
Ao.displayName = "FaceScheme";
|
|
3100
3109
|
export {
|
|
3101
3110
|
ca as A,
|
|
3102
|
-
|
|
3111
|
+
to as F,
|
|
3103
3112
|
Pe as I,
|
|
3104
3113
|
Et as a,
|
|
3105
3114
|
Rr as b,
|
|
3106
3115
|
Sn as c,
|
|
3107
|
-
|
|
3108
|
-
|
|
3116
|
+
eo as d,
|
|
3117
|
+
Ao as e,
|
|
3109
3118
|
zt as f,
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3119
|
+
io as g,
|
|
3120
|
+
ro as h,
|
|
3121
|
+
rt as i,
|
|
3122
|
+
no as j,
|
|
3123
|
+
ho as k,
|
|
3124
|
+
mo as l,
|
|
3125
|
+
Ds as m,
|
|
3126
|
+
Rs as n,
|
|
3118
3127
|
Hr as o,
|
|
3119
|
-
|
|
3128
|
+
ao as p,
|
|
3120
3129
|
da as q,
|
|
3121
3130
|
ua as r,
|
|
3122
3131
|
la as s,
|
|
3123
3132
|
Nn as t,
|
|
3124
3133
|
Kr as u
|
|
3125
3134
|
};
|
|
3126
|
-
//# sourceMappingURL=face-scheme-
|
|
3135
|
+
//# sourceMappingURL=face-scheme-DR-X-Njb.js.map
|