@vincentt-xr/sdk 2.0.0-alpha.16 → 2.0.0-alpha.18
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/GROUNDING.md +224 -1
- package/components.json +144 -0
- package/dist/{CanonicalHeadFrame-vn-jM9fG.js → CanonicalHeadFrame-CQe2YX9a.js} +3 -3
- package/dist/{DebuggerUI-DDpU-nBF.js → DebuggerUI-CKYrYmod.js} +1 -1
- package/dist/{FaceRetouch-D2xH5OpW.js → FaceRetouch-l7y4oZBu.js} +4 -4
- package/dist/Scenes-BX0bR1j4.js +44 -0
- package/dist/Scenes-Dtt8UGE8.cjs +1 -0
- package/dist/{TextLabel-DPJBtkUS.cjs → TextLabel-C-AibH5A.cjs} +1 -1
- package/dist/{TextLabel--skGFws8.js → TextLabel-fEF1o3wE.js} +1 -1
- package/dist/audio/AudioPlayer.d.ts +2 -1
- package/dist/{bodyMaskMaterial-C3aXItLo.js → bodyMaskMaterial-BOdSJUEM.js} +1 -1
- package/dist/{cache-C85JjyZA.js → cache-Mu-VO_6E.js} +2 -2
- package/dist/components/Button/index.d.ts +23 -0
- package/dist/components/Button/safeLink.d.ts +6 -0
- package/dist/components/HtmlRegion/index.d.ts +8 -0
- package/dist/components/Model/index.d.ts +16 -0
- package/dist/components/Object3D/index.d.ts +13 -0
- package/dist/components/ScreenImage/types.d.ts +2 -2
- package/dist/components/ScreenText/types.d.ts +2 -1
- package/dist/components/ThemeProvider/index.d.ts +24 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/{contexts-B5GODwuV.js → contexts-Cl-4dUOI.js} +2 -2
- package/dist/debug-ui/media-source.js +1 -1
- package/dist/debug-ui.cjs +1 -1
- package/dist/debug-ui.js +11 -11
- package/dist/{drawNormalizedCrop-BLfB484W.js → drawNormalizedCrop-D606u5-F.js} +5 -5
- package/dist/editor-defs/definitions.d.ts +2 -0
- package/dist/editor-defs/index.d.ts +3 -0
- package/dist/editor-defs/types.d.ts +54 -0
- package/dist/editor-sample/sample.d.ts +15 -0
- package/dist/editor-scenes.cjs +1 -0
- package/dist/editor-scenes.js +59 -0
- package/dist/entries/core.d.ts +12 -0
- package/dist/entries/editor-scenes.d.ts +8 -0
- package/dist/face-effects.js +17 -17
- package/dist/{getFaceInfo-D_tCSQC7.js → getFaceInfo-Mt44zlej.js} +1 -1
- package/dist/{index-B9DdHE4u.js → index-B0EYdofX.js} +1 -1
- package/dist/{index-jkUdoklh.cjs → index-B5X4N2tc.cjs} +3 -3
- package/dist/{index-CTqQJj5p.js → index-BDxJWWyy.js} +85 -85
- package/dist/{index-nRQNXOVk.cjs → index-BkjRuUdW.cjs} +1 -1
- package/dist/{index-DlP4xxaT.js → index-Bn72laBn.js} +4 -4
- package/dist/{index-D10O6vqR.js → index-CbBCl2ZU.js} +2 -2
- package/dist/{index-CNt8esFO.js → index-CicO_Tnw.js} +1 -1
- package/dist/{index-YI3Yidg_.js → index-D5NbXaCn.js} +5 -5
- package/dist/{index-DJkmBF-0.js → index-DN_eHnag.js} +203 -197
- package/dist/instructions.cjs +1 -1
- package/dist/instructions.js +8 -8
- package/dist/{internal-TD4QhIry.js → internal-BoFDq5hC.js} +3 -3
- package/dist/internal.js +2 -2
- package/dist/{landmarks-vLy5QKt6.js → landmarks-C3LvDhMt.js} +1 -1
- package/dist/low-level.js +17 -17
- package/dist/main.cjs +1 -1
- package/dist/main.js +932 -746
- package/dist/particles.js +5 -5
- package/dist/product.js +2 -2
- package/dist/{providers-DmJlgrDD.js → providers-Bxt_MfPK.js} +3 -3
- package/dist/{renderGroups-BcQYy_J2.js → renderGroups-uYPzUa66.js} +1 -1
- package/dist/{renderPasses-DIPTIU_x.js → renderPasses-C0wu5Cwg.js} +4 -4
- package/dist/scene-object.cjs +1 -1
- package/dist/scene-object.js +2 -2
- package/dist/scenes/Scenes.d.ts +44 -0
- package/dist/scenes/edit.d.ts +37 -0
- package/dist/{segmentation-CZs5aVvY.js → segmentation-DccvYBBO.js} +9 -9
- package/dist/{selectors-K5JKCWxw.js → selectors-J06V0eDb.js} +1 -1
- package/dist/{session-DHBNTyJJ.js → session-CYiWfcvz.js} +1 -1
- package/dist/tracking.js +25 -25
- package/dist/{trigger-BwZ81ENx.js → trigger-CQviD4xp.js} +155 -155
- package/dist/{useBodies-BMKHXAOL.js → useBodies-DOuwRuew.js} +2 -2
- package/dist/{useEditOverrides-DpPTA6BW.js → useEditOverrides-BBkK8cN2.js} +1 -0
- package/dist/useEditOverrides-CgapHJzA.cjs +1 -0
- package/dist/{useFaceInfo-BNVdnprN.js → useFaceInfo-XUGYTdfN.js} +4 -4
- package/dist/{useFaceResultReader-B15wn6RB.js → useFaceResultReader-D8wXbF1L.js} +1 -1
- package/dist/{useIrisTracking-CYm-KDIZ.js → useIrisTracking-B0uLWgNE.js} +10 -10
- package/dist/{useXRCapabilities-ClWlG5_Y.js → useXRCapabilities-DPUOvpdf.js} +1 -1
- package/dist/utils/useEditOverrides.d.ts +1 -0
- package/package.json +11 -2
- package/settings.json +2 -1
- package/dist/useEditOverrides-C8Kzr6M7.cjs +0 -1
package/dist/main.js
CHANGED
|
@@ -1,77 +1,80 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var P = (e, t,
|
|
4
|
-
import { j as
|
|
5
|
-
import {
|
|
6
|
-
import { S as
|
|
7
|
-
import { X as
|
|
8
|
-
import { S as
|
|
9
|
-
import { jsxs as
|
|
10
|
-
import { useRef as
|
|
11
|
-
import * as
|
|
12
|
-
import { MathUtils as
|
|
13
|
-
import { D as
|
|
14
|
-
import { useThree as
|
|
15
|
-
import { R as
|
|
16
|
-
import { c as
|
|
17
|
-
import { u as
|
|
18
|
-
import { d as
|
|
19
|
-
import { S as
|
|
20
|
-
import { L as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { M as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
var ze = Object.defineProperty;
|
|
2
|
+
var We = (e, t, r) => t in e ? ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var P = (e, t, r) => We(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { j as x, J as Be, u as Xe, as as $e, at as He, au as Ke, av as je, aw as Ve, ax as Ze } from "./index-BDxJWWyy.js";
|
|
5
|
+
import { b8 as gs, az as ys, b9 as Ss, M as Ms, P as Ts, L as Es, w as bs, ay as Rs, ba as As, b5 as Fs, b6 as Cs, aA as vs, c as xs, z as ks, y as _s, d as ws, k as Ps, aR as Ds, aS as Us, aT as Ns, aU as Ls, n as Is, aV as Os, i as Gs, aB as qs, O as zs, aW as Ws, aC as Bs, aD as Xs, aX as $s, aY as Hs, b3 as Ks, p as js, A as Vs, b7 as Zs, r as Ys, K as Js, a3 as Qs, aI as ea, aZ as ta, aJ as ra, aK as sa, aL as aa, aH as na, aM as oa, aN as ia, aE as ca, aO as la, a_ as ua, b4 as da, aP as ma, a$ as fa, t as pa, aF as ha, aG as ga, b0 as ya, b1 as Sa, aQ as Ma, b2 as Ta } from "./index-BDxJWWyy.js";
|
|
6
|
+
import { S as Ye } from "./contexts-Cl-4dUOI.js";
|
|
7
|
+
import { X as ba } from "./contexts-Cl-4dUOI.js";
|
|
8
|
+
import { S as Aa, T as Fa } from "./TextLabel-fEF1o3wE.js";
|
|
9
|
+
import { jsxs as I, jsx as g, Fragment as ae } from "react/jsx-runtime";
|
|
10
|
+
import { useRef as b, useMemo as X, useEffect as v, useState as k, Suspense as Je, useCallback as R, forwardRef as Qe, useImperativeHandle as et, useContext as tt, createContext as rt, useId as st, useSyncExternalStore as at } from "react";
|
|
11
|
+
import * as ue from "three";
|
|
12
|
+
import { MathUtils as nt, Vector2 as ot, Vector3 as it, DoubleSide as te, RepeatWrapping as Te, LinearFilter as Ee } from "three";
|
|
13
|
+
import { D as va, H as xa, G as ka, E as _a, J as wa, K as Pa, P as Da, S as Ua, C as Na, I as La, L as Ia, M as Oa, F as Ga, B as qa } from "./index-D5NbXaCn.js";
|
|
14
|
+
import { useThree as ct, useFrame as we } from "@react-three/fiber";
|
|
15
|
+
import { R as lt } from "./uv-DJU_XfmN.js";
|
|
16
|
+
import { c as Pe, b as ut } from "./selectors-J06V0eDb.js";
|
|
17
|
+
import { u as dt, a as mt, s as ft, F as pt } from "./drawNormalizedCrop-D606u5-F.js";
|
|
18
|
+
import { d as Wa, b as Ba, r as Xa } from "./drawNormalizedCrop-D606u5-F.js";
|
|
19
|
+
import { S as ht, c as gt } from "./index-DN_eHnag.js";
|
|
20
|
+
import { L as Ha, d as Ka, R as ja, a as Va, e as Za, b as Ya, f as Ja } from "./index-DN_eHnag.js";
|
|
21
|
+
import { a as en, b as tn, u as rn } from "./Scenes-BX0bR1j4.js";
|
|
22
|
+
import { useTexture as yt } from "@react-three/drei";
|
|
23
|
+
import { a as St } from "./context-DTxSQvp4.js";
|
|
24
|
+
import { j as re, T as Mt } from "./renderPasses-C0wu5Cwg.js";
|
|
25
|
+
import { k as an, D as nn, E as on, M as cn, h as ln, S as un, l as dn, g as mn, n as fn, r as pn } from "./renderPasses-C0wu5Cwg.js";
|
|
26
|
+
import { D as be, M as Tt } from "./index-Bn72laBn.js";
|
|
27
|
+
import { c as gn, n as yn } from "./index-Bn72laBn.js";
|
|
28
|
+
import { M as Mn } from "./index-CbBCl2ZU.js";
|
|
29
|
+
import { u as En } from "./useXRCapabilities-DPUOvpdf.js";
|
|
30
|
+
import { g as De } from "./cache-Mu-VO_6E.js";
|
|
31
|
+
import { D as Rn, X as An, c as Fn, u as Cn } from "./cache-Mu-VO_6E.js";
|
|
32
|
+
import { a as Et } from "./segmentation-DccvYBBO.js";
|
|
33
|
+
import { d as xn, b as kn, e as _n, f as wn, g as Pn, h as Dn, i as Un } from "./segmentation-DccvYBBO.js";
|
|
34
|
+
const Z = (e, t, r, s) => nt.damp(e, t, Math.max(0, r), Math.max(0, s)), Dr = (e, t, r, s, a = new ot()) => a.set(
|
|
35
|
+
Z(e.x, t.x, r, s),
|
|
36
|
+
Z(e.y, t.y, r, s)
|
|
37
|
+
), Ur = (e, t, r, s, a = new it()) => a.set(
|
|
38
|
+
Z(e.x, t.x, r, s),
|
|
39
|
+
Z(e.y, t.y, r, s),
|
|
40
|
+
Z(e.z, t.z, r, s)
|
|
41
|
+
), bt = "rgba(20,40,110,0.88)", Rt = 24, At = 512;
|
|
42
|
+
function Nr({
|
|
43
|
+
color: e = bt,
|
|
41
44
|
borderColor: t,
|
|
42
|
-
borderWidth:
|
|
43
|
-
borderRadius:
|
|
44
|
-
resolution: a =
|
|
45
|
+
borderWidth: r = 0,
|
|
46
|
+
borderRadius: s = Rt,
|
|
47
|
+
resolution: a = At,
|
|
45
48
|
aspect: n = 1,
|
|
46
|
-
opacity:
|
|
49
|
+
opacity: o = 1,
|
|
47
50
|
name: c,
|
|
48
|
-
overlay:
|
|
51
|
+
overlay: i = !0,
|
|
49
52
|
position: l,
|
|
50
53
|
rotation: h,
|
|
51
54
|
scale: d,
|
|
52
55
|
visible: m
|
|
53
56
|
}) {
|
|
54
|
-
const u =
|
|
57
|
+
const u = b(null), f = b(null), S = X(() => Ft({
|
|
55
58
|
width: Math.round(a * Math.max(n, 0.05)),
|
|
56
59
|
height: Math.round(a),
|
|
57
60
|
color: e,
|
|
58
61
|
borderColor: t,
|
|
59
|
-
borderWidth:
|
|
60
|
-
borderRadius:
|
|
61
|
-
}), [e, t,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, [
|
|
65
|
-
const
|
|
66
|
-
return
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
return
|
|
70
|
-
|
|
62
|
+
borderWidth: r,
|
|
63
|
+
borderRadius: s
|
|
64
|
+
}), [e, t, r, s, a, n]);
|
|
65
|
+
v(() => () => {
|
|
66
|
+
S.dispose();
|
|
67
|
+
}, [S]);
|
|
68
|
+
const T = b(null), p = b(o);
|
|
69
|
+
return p.current !== o && (p.current = o, T.current = null, f.current && (f.current.opacity = o)), v(() => {
|
|
70
|
+
const y = u.current;
|
|
71
|
+
if (y)
|
|
72
|
+
return y.userData.setOpacity = (A) => {
|
|
73
|
+
T.current = A, f.current && (f.current.opacity = A);
|
|
71
74
|
}, () => {
|
|
72
|
-
delete
|
|
75
|
+
delete y.userData.setOpacity;
|
|
73
76
|
};
|
|
74
|
-
}, []), /* @__PURE__ */
|
|
77
|
+
}, []), /* @__PURE__ */ I(
|
|
75
78
|
"mesh",
|
|
76
79
|
{
|
|
77
80
|
ref: u,
|
|
@@ -85,54 +88,54 @@ function ds({
|
|
|
85
88
|
/* @__PURE__ */ g(
|
|
86
89
|
"meshBasicMaterial",
|
|
87
90
|
{
|
|
88
|
-
ref:
|
|
89
|
-
map:
|
|
91
|
+
ref: f,
|
|
92
|
+
map: S,
|
|
90
93
|
transparent: !0,
|
|
91
|
-
opacity:
|
|
92
|
-
depthTest: !
|
|
93
|
-
depthWrite: !
|
|
94
|
+
opacity: o,
|
|
95
|
+
depthTest: !i,
|
|
96
|
+
depthWrite: !i
|
|
94
97
|
}
|
|
95
98
|
)
|
|
96
99
|
]
|
|
97
100
|
}
|
|
98
101
|
);
|
|
99
102
|
}
|
|
100
|
-
function
|
|
101
|
-
const { width: t, height:
|
|
103
|
+
function Ft(e) {
|
|
104
|
+
const { width: t, height: r, color: s, borderColor: a, borderWidth: n, borderRadius: o } = e, c = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(t, r) : (() => {
|
|
102
105
|
const d = document.createElement("canvas");
|
|
103
|
-
return d.width = t, d.height =
|
|
104
|
-
})(),
|
|
105
|
-
|
|
106
|
-
const l = Math.min(
|
|
107
|
-
|
|
108
|
-
const h = new
|
|
106
|
+
return d.width = t, d.height = r, d;
|
|
107
|
+
})(), i = c.getContext("2d");
|
|
108
|
+
i.clearRect(0, 0, t, r);
|
|
109
|
+
const l = Math.min(o, Math.min(t, r) / 2);
|
|
110
|
+
i.beginPath(), i.moveTo(l, 0), i.lineTo(t - l, 0), i.quadraticCurveTo(t, 0, t, l), i.lineTo(t, r - l), i.quadraticCurveTo(t, r, t - l, r), i.lineTo(l, r), i.quadraticCurveTo(0, r, 0, r - l), i.lineTo(0, l), i.quadraticCurveTo(0, 0, l, 0), i.closePath(), i.fillStyle = s, i.fill(), a && n > 0 && (i.lineWidth = n, i.strokeStyle = a, i.stroke());
|
|
111
|
+
const h = new ue.CanvasTexture(c);
|
|
109
112
|
return h.needsUpdate = !0, h;
|
|
110
113
|
}
|
|
111
|
-
const
|
|
114
|
+
const Lr = ({
|
|
112
115
|
segmentationMask: e,
|
|
113
116
|
segmentation: t,
|
|
114
|
-
invert:
|
|
115
|
-
customBackground:
|
|
116
|
-
renderOrder: a =
|
|
117
|
+
invert: r = !1,
|
|
118
|
+
customBackground: s,
|
|
119
|
+
renderOrder: a = lt.BACKGROUND
|
|
117
120
|
}) => {
|
|
118
|
-
const { camera: n, size:
|
|
119
|
-
|
|
121
|
+
const { camera: n, size: o } = ct(), c = Pe(), i = ut(x.BACKGROUND_SEGMENTATION), l = t ? i == null ? void 0 : i.backgroundSegmentationMask : void 0, h = b(!1);
|
|
122
|
+
v(() => {
|
|
120
123
|
if (!t) {
|
|
121
124
|
h.current = !1;
|
|
122
125
|
return;
|
|
123
126
|
}
|
|
124
|
-
|
|
127
|
+
i === null && !h.current && (console.warn(
|
|
125
128
|
`[VideoBackground] segmentation="${t}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
|
|
126
129
|
), h.current = !0);
|
|
127
|
-
}, [t,
|
|
128
|
-
const d = t ? l : e, m =
|
|
130
|
+
}, [t, i]);
|
|
131
|
+
const d = t ? l : e, m = X(() => {
|
|
129
132
|
if (!n.isPerspectiveCamera)
|
|
130
133
|
return [10, 10];
|
|
131
|
-
const u = n,
|
|
132
|
-
return [
|
|
133
|
-
}, [n,
|
|
134
|
-
return c ? /* @__PURE__ */ g("group", { position: [0, 0, -1], children:
|
|
135
|
-
/* @__PURE__ */
|
|
134
|
+
const u = n, T = (u.position.z || 5) - -1, p = u.fov * Math.PI / 180, y = 2 * Math.tan(p / 2) * T;
|
|
135
|
+
return [y * (o.width / o.height), y];
|
|
136
|
+
}, [n, o]);
|
|
137
|
+
return c ? /* @__PURE__ */ g("group", { position: [0, 0, -1], children: r ? /* @__PURE__ */ I(ae, { children: [
|
|
138
|
+
/* @__PURE__ */ I("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
|
|
136
139
|
/* @__PURE__ */ g("planeGeometry", { args: m }),
|
|
137
140
|
/* @__PURE__ */ g(
|
|
138
141
|
"meshBasicMaterial",
|
|
@@ -145,13 +148,13 @@ const ms = ({
|
|
|
145
148
|
}
|
|
146
149
|
)
|
|
147
150
|
] }),
|
|
148
|
-
|
|
151
|
+
s && d && /* @__PURE__ */ I("mesh", { position: [0, 0, 0], renderOrder: a, children: [
|
|
149
152
|
/* @__PURE__ */ g("planeGeometry", { args: m }),
|
|
150
153
|
/* @__PURE__ */ g(
|
|
151
154
|
"meshBasicMaterial",
|
|
152
155
|
{
|
|
153
|
-
map: typeof
|
|
154
|
-
color: typeof
|
|
156
|
+
map: typeof s == "string" ? void 0 : s,
|
|
157
|
+
color: typeof s == "string" ? s : void 0,
|
|
155
158
|
alphaMap: d,
|
|
156
159
|
transparent: !1,
|
|
157
160
|
alphaTest: 0.5,
|
|
@@ -163,14 +166,14 @@ const ms = ({
|
|
|
163
166
|
"inverted-mask"
|
|
164
167
|
)
|
|
165
168
|
] })
|
|
166
|
-
] }) : /* @__PURE__ */
|
|
167
|
-
|
|
169
|
+
] }) : /* @__PURE__ */ I(ae, { children: [
|
|
170
|
+
s && d && /* @__PURE__ */ I("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
|
|
168
171
|
/* @__PURE__ */ g("planeGeometry", { args: m }),
|
|
169
172
|
/* @__PURE__ */ g(
|
|
170
173
|
"meshBasicMaterial",
|
|
171
174
|
{
|
|
172
|
-
map: typeof
|
|
173
|
-
color: typeof
|
|
175
|
+
map: typeof s == "string" ? void 0 : s,
|
|
176
|
+
color: typeof s == "string" ? s : void 0,
|
|
174
177
|
depthTest: !1,
|
|
175
178
|
depthWrite: !1,
|
|
176
179
|
toneMapped: !1,
|
|
@@ -178,7 +181,7 @@ const ms = ({
|
|
|
178
181
|
}
|
|
179
182
|
)
|
|
180
183
|
] }),
|
|
181
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ I("mesh", { position: [0, 0, 0], renderOrder: a, children: [
|
|
182
185
|
/* @__PURE__ */ g("planeGeometry", { args: m }),
|
|
183
186
|
/* @__PURE__ */ g(
|
|
184
187
|
"meshBasicMaterial",
|
|
@@ -196,57 +199,57 @@ const ms = ({
|
|
|
196
199
|
)
|
|
197
200
|
] })
|
|
198
201
|
] }) }) : null;
|
|
199
|
-
},
|
|
202
|
+
}, Ue = ({
|
|
200
203
|
mask: e,
|
|
201
204
|
status: t,
|
|
202
|
-
error:
|
|
203
|
-
invert:
|
|
205
|
+
error: r,
|
|
206
|
+
invert: s = !1,
|
|
204
207
|
fallback: a = "camera",
|
|
205
208
|
onStatusChange: n,
|
|
206
|
-
fit:
|
|
207
|
-
anchors: c =
|
|
208
|
-
renderOrder:
|
|
209
|
+
fit: o = "cover",
|
|
210
|
+
anchors: c = pt,
|
|
211
|
+
renderOrder: i = 100,
|
|
209
212
|
visible: l = !0,
|
|
210
213
|
maskFeather: h = 4,
|
|
211
214
|
maskErode: d = 0.7,
|
|
212
215
|
...m
|
|
213
216
|
}) => {
|
|
214
|
-
const u =
|
|
215
|
-
if (
|
|
216
|
-
n == null || n(t,
|
|
217
|
-
}, [t,
|
|
218
|
-
const
|
|
219
|
-
return !
|
|
220
|
-
|
|
217
|
+
const u = Pe();
|
|
218
|
+
if (v(() => {
|
|
219
|
+
n == null || n(t, r);
|
|
220
|
+
}, [t, r, n]), !u) return null;
|
|
221
|
+
const f = t === "ready" && e;
|
|
222
|
+
return !f && !ft(t, a) ? null : /* @__PURE__ */ g(
|
|
223
|
+
ht,
|
|
221
224
|
{
|
|
222
225
|
...m,
|
|
223
226
|
source: { kind: "texture", texture: u },
|
|
224
|
-
fit:
|
|
227
|
+
fit: o,
|
|
225
228
|
anchors: c,
|
|
226
|
-
renderOrder:
|
|
229
|
+
renderOrder: i,
|
|
227
230
|
visible: l,
|
|
228
|
-
maskTexture:
|
|
231
|
+
maskTexture: f ? e : null,
|
|
229
232
|
maskChannel: "green",
|
|
230
|
-
maskInvert:
|
|
233
|
+
maskInvert: s,
|
|
231
234
|
maskFeather: h,
|
|
232
235
|
maskErode: d
|
|
233
236
|
}
|
|
234
237
|
);
|
|
235
|
-
},
|
|
236
|
-
const { texture:
|
|
237
|
-
return /* @__PURE__ */ g(
|
|
238
|
-
},
|
|
239
|
-
const { texture: n, status:
|
|
240
|
-
return /* @__PURE__ */ g(
|
|
241
|
-
},
|
|
242
|
-
const [t,
|
|
243
|
-
return
|
|
244
|
-
const
|
|
245
|
-
const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight,
|
|
246
|
-
let
|
|
247
|
-
|
|
238
|
+
}, Ct = ({ active: e = !0, ...t }) => {
|
|
239
|
+
const { texture: r, status: s, error: a } = mt(e);
|
|
240
|
+
return /* @__PURE__ */ g(Ue, { ...t, mask: r, status: s, error: a });
|
|
241
|
+
}, vt = ({ bodyId: e, subject: t, numBodies: r, active: s = !0, ...a }) => {
|
|
242
|
+
const { texture: n, status: o, error: c } = dt({ bodyId: e, subject: t, numBodies: r, active: s });
|
|
243
|
+
return /* @__PURE__ */ g(Ue, { ...a, mask: n, status: o, error: c });
|
|
244
|
+
}, Ir = ({ bodyId: e, subject: t, numBodies: r, ...s }) => e !== void 0 || t ? /* @__PURE__ */ g(vt, { ...s, bodyId: e, subject: t, numBodies: r }) : /* @__PURE__ */ g(Ct, { ...s }), ie = 9, ce = 16, Or = ({ children: e }) => {
|
|
245
|
+
const [t, r] = k({ width: 0, height: 0 });
|
|
246
|
+
return v(() => {
|
|
247
|
+
const s = () => {
|
|
248
|
+
const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, o = a / n, c = ie / ce;
|
|
249
|
+
let i, l;
|
|
250
|
+
o > c ? (l = n, i = l * ie / ce) : (i = a, l = i * ce / ie), r({ width: i, height: l });
|
|
248
251
|
};
|
|
249
|
-
return
|
|
252
|
+
return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
|
|
250
253
|
}, []), /* @__PURE__ */ g(
|
|
251
254
|
"div",
|
|
252
255
|
{
|
|
@@ -261,34 +264,209 @@ const ms = ({
|
|
|
261
264
|
children: /* @__PURE__ */ g("div", { style: { width: t.width, height: t.height, position: "relative" }, children: e })
|
|
262
265
|
}
|
|
263
266
|
);
|
|
264
|
-
},
|
|
265
|
-
const
|
|
266
|
-
return { x:
|
|
267
|
-
},
|
|
267
|
+
}, Gr = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ g("axesHelper", { args: [e], ...t }), xt = { left: -1, right: 1, top: 1, bottom: -1 }, kt = (e, t, r) => {
|
|
268
|
+
const s = e % t, a = Math.floor(e / t);
|
|
269
|
+
return { x: s / t, y: (r - 1 - a) / r };
|
|
270
|
+
}, _t = ({
|
|
268
271
|
sheet: e,
|
|
269
272
|
contentAspect: t,
|
|
270
|
-
renderOrder:
|
|
271
|
-
name:
|
|
273
|
+
renderOrder: r,
|
|
274
|
+
name: s
|
|
272
275
|
}) => {
|
|
273
|
-
const a =
|
|
274
|
-
return
|
|
275
|
-
a.wrapS =
|
|
276
|
+
const a = yt(e.url), n = b(0), o = b(-1), c = St(), [i, l] = t != null ? gt(c, t) : [1, 1];
|
|
277
|
+
return we((h, d) => {
|
|
278
|
+
a.wrapS = Te, a.wrapT = Te, a.magFilter = Ee, a.minFilter = Ee, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current += d;
|
|
276
279
|
const m = Math.floor(n.current * e.fps) % e.frames;
|
|
277
|
-
if (m ===
|
|
278
|
-
|
|
279
|
-
const { x: u, y:
|
|
280
|
-
a.offset.set(u,
|
|
281
|
-
}), /* @__PURE__ */
|
|
280
|
+
if (m === o.current) return;
|
|
281
|
+
o.current = m;
|
|
282
|
+
const { x: u, y: f } = kt(m, e.cols, e.rows);
|
|
283
|
+
a.offset.set(u, f);
|
|
284
|
+
}), /* @__PURE__ */ I("mesh", { name: s, renderOrder: r, scale: [i, l, 1], children: [
|
|
282
285
|
/* @__PURE__ */ g("planeGeometry", { args: [1, 1] }),
|
|
283
286
|
/* @__PURE__ */ g("meshBasicMaterial", { map: a, transparent: !0, toneMapped: !1, depthWrite: !1 })
|
|
284
287
|
] });
|
|
285
|
-
},
|
|
288
|
+
}, qr = ({
|
|
286
289
|
sheet: e,
|
|
287
|
-
anchors: t =
|
|
288
|
-
contentAspect:
|
|
289
|
-
renderOrder:
|
|
290
|
+
anchors: t = xt,
|
|
291
|
+
contentAspect: r,
|
|
292
|
+
renderOrder: s = 10,
|
|
290
293
|
name: a = "spriteAnimation"
|
|
291
|
-
}) => /* @__PURE__ */ g(
|
|
294
|
+
}) => /* @__PURE__ */ g(Je, { fallback: null, children: /* @__PURE__ */ g(Ye, { anchors: t, children: /* @__PURE__ */ g(_t, { sheet: e, contentAspect: r, renderOrder: s, name: a }) }) }), wt = 64, Pt = 3, Dt = /^[A-Za-z][A-Za-z0-9]{0,39}$/, Ut = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, Nt = /^(?:rgb|rgba|hsl|hsla)\([0-9a-z.,%\s/+-]{1,60}\)$/i, Lt = /^-?[0-9]{1,4}(?:\.[0-9]{1,4})?(?:px|em|rem|%)?$/, It = /^[A-Za-z0-9 ,'"_-]{1,120}$/;
|
|
295
|
+
function Ot(e) {
|
|
296
|
+
return Ut.test(e) || Nt.test(e) || Lt.test(e) || It.test(e);
|
|
297
|
+
}
|
|
298
|
+
const Re = (e) => e.map((t) => t.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`)).join("-");
|
|
299
|
+
function Gt(e) {
|
|
300
|
+
const t = {};
|
|
301
|
+
let r = 0;
|
|
302
|
+
const s = (a, n) => {
|
|
303
|
+
for (const o of Object.keys(a)) {
|
|
304
|
+
if (r >= wt) return;
|
|
305
|
+
if (!Dt.test(o)) continue;
|
|
306
|
+
const c = a[o], i = [...n, o];
|
|
307
|
+
typeof c == "number" ? Number.isFinite(c) && (t[`--vincentt-${Re(i)}`] = String(c), r++) : typeof c == "string" ? Ot(c) && (t[`--vincentt-${Re(i)}`] = c, r++) : c && typeof c == "object" && !Array.isArray(c) && i.length < Pt && s(c, i);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
return e && typeof e == "object" && s(e, []), t;
|
|
311
|
+
}
|
|
312
|
+
function zr({ theme: e, className: t, children: r }) {
|
|
313
|
+
const s = { display: "contents", ...Gt(e) };
|
|
314
|
+
return /* @__PURE__ */ g("div", { className: t, style: s, children: r });
|
|
315
|
+
}
|
|
316
|
+
const le = (e, t) => ({
|
|
317
|
+
x: (t == null ? void 0 : t.x) ?? e.x,
|
|
318
|
+
y: (t == null ? void 0 : t.y) ?? e.y,
|
|
319
|
+
z: (t == null ? void 0 : t.z) ?? e.z
|
|
320
|
+
});
|
|
321
|
+
function Wr({
|
|
322
|
+
src: e,
|
|
323
|
+
position: t,
|
|
324
|
+
rotation: r,
|
|
325
|
+
scale: s,
|
|
326
|
+
visible: a = !0,
|
|
327
|
+
material: n,
|
|
328
|
+
// `name` and `locked` are editor metadata; neither changes rendering.
|
|
329
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
330
|
+
name: o,
|
|
331
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
332
|
+
locked: c
|
|
333
|
+
}) {
|
|
334
|
+
const [i, l, h] = [t == null ? void 0 : t.x, t == null ? void 0 : t.y, t == null ? void 0 : t.z], [d, m, u] = [r == null ? void 0 : r.x, r == null ? void 0 : r.y, r == null ? void 0 : r.z], [f, S, T] = [s == null ? void 0 : s.x, s == null ? void 0 : s.y, s == null ? void 0 : s.z], p = X(
|
|
335
|
+
() => ({
|
|
336
|
+
...re,
|
|
337
|
+
position: le(re.position, { x: i, y: l, z: h }),
|
|
338
|
+
rotation: le(re.rotation, { x: d, y: m, z: u }),
|
|
339
|
+
scale: le(re.scale, { x: f, y: S, z: T }),
|
|
340
|
+
visible: a
|
|
341
|
+
}),
|
|
342
|
+
[i, l, h, d, m, u, f, S, T, a]
|
|
343
|
+
), y = X(
|
|
344
|
+
() => ({
|
|
345
|
+
...be,
|
|
346
|
+
assetUrl: e,
|
|
347
|
+
material: { ...be.material, ...n }
|
|
348
|
+
}),
|
|
349
|
+
[e, n]
|
|
350
|
+
);
|
|
351
|
+
return /* @__PURE__ */ g(Mt, { value: p, children: /* @__PURE__ */ g(Tt, { value: y }) });
|
|
352
|
+
}
|
|
353
|
+
const qt = (e) => Array.isArray(e) ? e : [e], zt = (e) => {
|
|
354
|
+
const [t, r] = k(null);
|
|
355
|
+
return v(() => {
|
|
356
|
+
if (!e) return;
|
|
357
|
+
let s = !0, a = null;
|
|
358
|
+
return new ue.TextureLoader().load(
|
|
359
|
+
e,
|
|
360
|
+
(n) => {
|
|
361
|
+
if (a = n, !s) {
|
|
362
|
+
n.dispose();
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
n.colorSpace = ue.SRGBColorSpace, n.flipY = !1, r({ url: e, texture: n });
|
|
366
|
+
},
|
|
367
|
+
void 0,
|
|
368
|
+
() => console.warn(`${Be.loggerPrefix} Object3D could not load ${e}`)
|
|
369
|
+
), () => {
|
|
370
|
+
s = !1, a == null || a.dispose();
|
|
371
|
+
};
|
|
372
|
+
}, [e]), e && (t == null ? void 0 : t.url) === e ? t.texture : null;
|
|
373
|
+
};
|
|
374
|
+
function Br({
|
|
375
|
+
colour: e,
|
|
376
|
+
texture: t,
|
|
377
|
+
size: r = 1,
|
|
378
|
+
visible: s = !0,
|
|
379
|
+
children: a,
|
|
380
|
+
// `name` and `locked` are editor metadata; neither changes rendering.
|
|
381
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
382
|
+
name: n,
|
|
383
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
384
|
+
locked: o
|
|
385
|
+
}) {
|
|
386
|
+
const c = b(null), i = b(/* @__PURE__ */ new Map()), l = zt(t), h = e !== void 0 || l !== null, d = () => {
|
|
387
|
+
for (const [m, { original: u, own: f }] of i.current)
|
|
388
|
+
m.material = u, f.forEach((S) => S.dispose());
|
|
389
|
+
i.current.clear();
|
|
390
|
+
};
|
|
391
|
+
return we(() => {
|
|
392
|
+
!h || !c.current || c.current.traverse((m) => {
|
|
393
|
+
const u = m;
|
|
394
|
+
if (!u.isMesh || i.current.has(u)) return;
|
|
395
|
+
const f = u.material, S = qt(f).map((T) => {
|
|
396
|
+
var y;
|
|
397
|
+
const p = T.clone();
|
|
398
|
+
return e !== void 0 && ((y = p.color) == null || y.set(e)), l && (p.map = l, p.needsUpdate = !0), p;
|
|
399
|
+
});
|
|
400
|
+
u.material = Array.isArray(f) ? S : S[0], i.current.set(u, { original: f, own: S });
|
|
401
|
+
});
|
|
402
|
+
}), v(() => (d(), d), [e, l]), /* @__PURE__ */ g("group", { ref: c, visible: s, scale: r, children: a });
|
|
403
|
+
}
|
|
404
|
+
function Xr({
|
|
405
|
+
className: e,
|
|
406
|
+
children: t,
|
|
407
|
+
// `name` and `locked` are editor metadata; neither changes rendering.
|
|
408
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
409
|
+
name: r,
|
|
410
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
411
|
+
locked: s
|
|
412
|
+
}) {
|
|
413
|
+
return /* @__PURE__ */ g("div", { className: e, children: t });
|
|
414
|
+
}
|
|
415
|
+
const Wt = 2048;
|
|
416
|
+
function Bt(e) {
|
|
417
|
+
return e <= 32 || e >= 127 && e <= 160 || e === 173 || e === 92 || e === 1564 || e === 6158 || e >= 8192 && e <= 8207 || e >= 8232 && e <= 8238 || e >= 8288 && e <= 8303 || e === 12288 || e === 65279 || e >= 917504 && e <= 917631;
|
|
418
|
+
}
|
|
419
|
+
function Xt(e) {
|
|
420
|
+
if (typeof e != "string" || e.length === 0 || e.length > Wt) return;
|
|
421
|
+
for (const s of e)
|
|
422
|
+
if (Bt(s.codePointAt(0) ?? 0)) return;
|
|
423
|
+
const t = e.toLowerCase();
|
|
424
|
+
return t.startsWith("https://") || t.startsWith("http://") || t.startsWith("mailto:") || t.startsWith("#") || t.startsWith("/") && !t.startsWith("//") ? e : void 0;
|
|
425
|
+
}
|
|
426
|
+
const Ae = {
|
|
427
|
+
display: "inline-block",
|
|
428
|
+
padding: "0.6em 1.2em",
|
|
429
|
+
border: "none",
|
|
430
|
+
borderRadius: "var(--vincentt-radius, 0.5em)",
|
|
431
|
+
background: "var(--vincentt-button, #111827)",
|
|
432
|
+
color: "var(--vincentt-button-text, #ffffff)",
|
|
433
|
+
font: "inherit",
|
|
434
|
+
textDecoration: "none",
|
|
435
|
+
cursor: "pointer"
|
|
436
|
+
};
|
|
437
|
+
function $r({
|
|
438
|
+
label: e,
|
|
439
|
+
link: t,
|
|
440
|
+
onTap: r,
|
|
441
|
+
color: s,
|
|
442
|
+
visible: a = !0,
|
|
443
|
+
className: n,
|
|
444
|
+
children: o,
|
|
445
|
+
// `name` and `locked` are editor metadata; neither changes rendering.
|
|
446
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
447
|
+
name: c,
|
|
448
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
449
|
+
locked: i
|
|
450
|
+
}) {
|
|
451
|
+
if (!a) return null;
|
|
452
|
+
const l = s ? { ...Ae, background: s } : Ae, h = Xt(t), d = o ?? e;
|
|
453
|
+
if (h) {
|
|
454
|
+
const m = /^https?:/i.test(h);
|
|
455
|
+
return /* @__PURE__ */ g(
|
|
456
|
+
"a",
|
|
457
|
+
{
|
|
458
|
+
href: h,
|
|
459
|
+
className: n,
|
|
460
|
+
style: l,
|
|
461
|
+
onClick: r,
|
|
462
|
+
...m ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
463
|
+
children: d
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
return /* @__PURE__ */ g("button", { type: "button", className: n, style: l, onClick: r, children: d });
|
|
468
|
+
}
|
|
469
|
+
const q = (e) => {
|
|
292
470
|
switch (e) {
|
|
293
471
|
case "start":
|
|
294
472
|
return "starting";
|
|
@@ -306,180 +484,180 @@ const ms = ({
|
|
|
306
484
|
case "clear":
|
|
307
485
|
return "idle";
|
|
308
486
|
}
|
|
309
|
-
},
|
|
487
|
+
}, $t = [
|
|
310
488
|
"video/mp4",
|
|
311
489
|
"video/webm;codecs=vp9",
|
|
312
490
|
"video/webm;codecs=vp8",
|
|
313
491
|
"video/webm"
|
|
314
492
|
];
|
|
315
|
-
function
|
|
493
|
+
function Hr(e = {}) {
|
|
316
494
|
const {
|
|
317
495
|
audio: t = !1,
|
|
318
|
-
mimeType:
|
|
319
|
-
bitsPerSecond:
|
|
496
|
+
mimeType: r,
|
|
497
|
+
bitsPerSecond: s,
|
|
320
498
|
onData: a,
|
|
321
499
|
onStop: n,
|
|
322
|
-
onRecordingStart:
|
|
500
|
+
onRecordingStart: o,
|
|
323
501
|
onRecordingPause: c,
|
|
324
|
-
onRecordingResume:
|
|
502
|
+
onRecordingResume: i,
|
|
325
503
|
onRecordingStop: l,
|
|
326
504
|
onRecordingComplete: h,
|
|
327
505
|
onError: d,
|
|
328
506
|
passThroughStream: m
|
|
329
|
-
} = e, u =
|
|
507
|
+
} = e, u = b(null), f = b(null), S = b([]), [T, p] = k("idle"), [y, A] = k(null), [$, F] = k(null), w = R(() => {
|
|
330
508
|
var C;
|
|
331
|
-
const
|
|
332
|
-
for (const
|
|
333
|
-
if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder,
|
|
334
|
-
}, [
|
|
335
|
-
async (
|
|
509
|
+
const M = [r, ...$t].filter(Boolean);
|
|
510
|
+
for (const E of M)
|
|
511
|
+
if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, E)) return E;
|
|
512
|
+
}, [r]), G = R(
|
|
513
|
+
async (M) => {
|
|
336
514
|
const C = new MediaStream();
|
|
337
|
-
if (
|
|
338
|
-
let
|
|
515
|
+
if (M.getTracks().forEach((E) => C.addTrack(E)), t) {
|
|
516
|
+
let E;
|
|
339
517
|
if (t instanceof MediaStream)
|
|
340
|
-
|
|
518
|
+
E = t;
|
|
341
519
|
else {
|
|
342
|
-
const
|
|
343
|
-
|
|
520
|
+
const _ = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
|
|
521
|
+
E = await navigator.mediaDevices.getUserMedia(_);
|
|
344
522
|
}
|
|
345
|
-
|
|
523
|
+
E.getAudioTracks().forEach((_) => C.addTrack(_));
|
|
346
524
|
}
|
|
347
525
|
if (!C.getTracks().length)
|
|
348
526
|
throw new Error("No tracks available in combined stream.");
|
|
349
|
-
return
|
|
527
|
+
return f.current = C, C;
|
|
350
528
|
},
|
|
351
529
|
[t]
|
|
352
530
|
), Y = R(
|
|
353
|
-
async (
|
|
354
|
-
|
|
531
|
+
async (M, C) => {
|
|
532
|
+
p(q("start")), F(null), A(null);
|
|
355
533
|
try {
|
|
356
|
-
let
|
|
534
|
+
let E;
|
|
357
535
|
if (m)
|
|
358
|
-
|
|
536
|
+
E = m, f.current = E;
|
|
359
537
|
else {
|
|
360
|
-
if (!
|
|
361
|
-
|
|
538
|
+
if (!M) throw new Error("start(stream) requires a MediaStream.");
|
|
539
|
+
E = await G(M);
|
|
362
540
|
}
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
|
|
367
|
-
var
|
|
368
|
-
((
|
|
369
|
-
},
|
|
370
|
-
const N = new Blob(
|
|
371
|
-
type:
|
|
541
|
+
const _ = w(), H = {};
|
|
542
|
+
_ && (H.mimeType = _), s && (H.bitsPerSecond = s);
|
|
543
|
+
const B = new MediaRecorder(E, H);
|
|
544
|
+
B.ondataavailable = (N) => {
|
|
545
|
+
var j;
|
|
546
|
+
((j = N.data) == null ? void 0 : j.size) > 0 && (S.current.push(N.data), a == null || a(N.data));
|
|
547
|
+
}, B.onstop = () => {
|
|
548
|
+
const N = new Blob(S.current, {
|
|
549
|
+
type: _ ?? "video/webm"
|
|
372
550
|
});
|
|
373
|
-
|
|
374
|
-
}, u.current =
|
|
375
|
-
} catch (
|
|
376
|
-
const
|
|
377
|
-
console.error("start(stream) failed",
|
|
551
|
+
A(N), n == null || n(N), h == null || h(N), S.current = [], p(q("complete"));
|
|
552
|
+
}, u.current = B, B.start(C), p(q("started")), o == null || o();
|
|
553
|
+
} catch (E) {
|
|
554
|
+
const _ = E instanceof Error ? E : new Error(String(E));
|
|
555
|
+
console.error("start(stream) failed", _), F(_), p(q("fail")), d == null || d(_);
|
|
378
556
|
}
|
|
379
557
|
},
|
|
380
558
|
[
|
|
381
559
|
G,
|
|
382
560
|
w,
|
|
383
|
-
|
|
561
|
+
s,
|
|
384
562
|
a,
|
|
385
563
|
n,
|
|
386
564
|
h,
|
|
387
|
-
|
|
565
|
+
o,
|
|
388
566
|
d,
|
|
389
567
|
m
|
|
390
568
|
]
|
|
391
|
-
),
|
|
392
|
-
const
|
|
393
|
-
!
|
|
394
|
-
}, [l]),
|
|
395
|
-
const
|
|
396
|
-
(
|
|
569
|
+
), J = R(() => {
|
|
570
|
+
const M = u.current;
|
|
571
|
+
!M || M.state === "inactive" || (p(q("stop")), M.stop(), l == null || l());
|
|
572
|
+
}, [l]), Q = R(() => {
|
|
573
|
+
const M = u.current;
|
|
574
|
+
(M == null ? void 0 : M.state) === "recording" && (M.pause(), p(q("pause")), c == null || c());
|
|
397
575
|
}, [c]), ee = R(() => {
|
|
398
|
-
const
|
|
399
|
-
(
|
|
400
|
-
}, [
|
|
401
|
-
var
|
|
576
|
+
const M = u.current;
|
|
577
|
+
(M == null ? void 0 : M.state) === "paused" && (M.resume(), p(q("resume")), i == null || i());
|
|
578
|
+
}, [i]), K = R(() => {
|
|
579
|
+
var M;
|
|
402
580
|
try {
|
|
403
|
-
u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (
|
|
581
|
+
u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (M = f.current) == null || M.getTracks().forEach((C) => C.stop()), f.current = null, A(null), p(q("clear")), S.current = [], F(null);
|
|
404
582
|
} catch (C) {
|
|
405
583
|
console.error("clear failed", C);
|
|
406
584
|
}
|
|
407
585
|
}, []);
|
|
408
|
-
return
|
|
409
|
-
status:
|
|
586
|
+
return v(() => () => K(), []), {
|
|
587
|
+
status: T,
|
|
410
588
|
start: Y,
|
|
411
|
-
stop:
|
|
412
|
-
pause:
|
|
589
|
+
stop: J,
|
|
590
|
+
pause: Q,
|
|
413
591
|
resume: ee,
|
|
414
|
-
clear:
|
|
415
|
-
isRecording:
|
|
416
|
-
isPaused:
|
|
417
|
-
recordedBlob:
|
|
418
|
-
error:
|
|
419
|
-
getActiveStream: () =>
|
|
592
|
+
clear: K,
|
|
593
|
+
isRecording: T === "recording" || T === "paused",
|
|
594
|
+
isPaused: T === "paused",
|
|
595
|
+
recordedBlob: y,
|
|
596
|
+
error: $,
|
|
597
|
+
getActiveStream: () => f.current
|
|
420
598
|
};
|
|
421
599
|
}
|
|
422
|
-
const
|
|
423
|
-
var
|
|
424
|
-
(
|
|
600
|
+
const Ht = async (e, t = {}) => {
|
|
601
|
+
var r, s, a;
|
|
602
|
+
(r = t.onCaptureStart) == null || r.call(t), await Promise.resolve();
|
|
425
603
|
try {
|
|
426
604
|
const n = e();
|
|
427
|
-
return (
|
|
605
|
+
return (s = t.onCaptureComplete) == null || s.call(t, n), n;
|
|
428
606
|
} catch (n) {
|
|
429
|
-
const
|
|
430
|
-
throw (a = t.onError) == null || a.call(t,
|
|
607
|
+
const o = n instanceof Error ? n : new Error(String(n));
|
|
608
|
+
throw (a = t.onError) == null || a.call(t, o), o;
|
|
431
609
|
}
|
|
432
|
-
},
|
|
433
|
-
const { session: t } =
|
|
434
|
-
captureFrame:
|
|
435
|
-
onCaptureStart:
|
|
610
|
+
}, Kr = (e = {}) => {
|
|
611
|
+
const { session: t } = Xe(), {
|
|
612
|
+
captureFrame: r = t.captureFrame,
|
|
613
|
+
onCaptureStart: s,
|
|
436
614
|
onCaptureComplete: a,
|
|
437
615
|
onError: n
|
|
438
|
-
} = e, [
|
|
616
|
+
} = e, [o, c] = k("idle"), [i, l] = k(null), [h, d] = k(null), m = R(async () => {
|
|
439
617
|
c("capturing"), l(null), d(null);
|
|
440
618
|
try {
|
|
441
|
-
const
|
|
442
|
-
onCaptureStart:
|
|
619
|
+
const f = await Ht(r, {
|
|
620
|
+
onCaptureStart: s,
|
|
443
621
|
onCaptureComplete: a,
|
|
444
622
|
onError: n
|
|
445
623
|
});
|
|
446
|
-
return l(
|
|
447
|
-
} catch (
|
|
448
|
-
const
|
|
449
|
-
return d(
|
|
624
|
+
return l(f), c("completed"), f;
|
|
625
|
+
} catch (f) {
|
|
626
|
+
const S = f instanceof Error ? f : new Error(String(f));
|
|
627
|
+
return d(S), c("error"), null;
|
|
450
628
|
}
|
|
451
|
-
}, [
|
|
629
|
+
}, [r, s, a, n]), u = R(() => {
|
|
452
630
|
c("idle"), l(null), d(null);
|
|
453
631
|
}, []);
|
|
454
|
-
return { status:
|
|
455
|
-
},
|
|
456
|
-
const
|
|
457
|
-
let
|
|
458
|
-
const c = new Uint8Array(
|
|
459
|
-
for (;
|
|
460
|
-
c[
|
|
632
|
+
return { status: o, capturePhoto: m, clear: u, dataUrl: i, error: h };
|
|
633
|
+
}, jr = (e, t) => {
|
|
634
|
+
const r = e.split(","), s = r[0].match(/:(.*?);/), a = s ? s[1] : "application/octet-stream", n = atob(r[r.length - 1]);
|
|
635
|
+
let o = n.length;
|
|
636
|
+
const c = new Uint8Array(o);
|
|
637
|
+
for (; o--; )
|
|
638
|
+
c[o] = n.charCodeAt(o);
|
|
461
639
|
return new File([c], t, { type: a });
|
|
462
|
-
},
|
|
640
|
+
}, Kt = 4, jt = 50, Vt = 5e3, se = (e) => Math.min(1, Math.max(0, e)), Fe = (e) => new Promise((t) => {
|
|
463
641
|
if (e.readyState >= 4) {
|
|
464
642
|
t();
|
|
465
643
|
return;
|
|
466
644
|
}
|
|
467
|
-
let
|
|
468
|
-
const
|
|
469
|
-
|
|
645
|
+
let r = !1;
|
|
646
|
+
const s = () => {
|
|
647
|
+
r || (r = !0, t());
|
|
470
648
|
};
|
|
471
|
-
e.addEventListener("canplaythrough",
|
|
472
|
-
}),
|
|
473
|
-
const
|
|
474
|
-
return
|
|
475
|
-
},
|
|
649
|
+
e.addEventListener("canplaythrough", s, { once: !0 }), e.addEventListener("error", s, { once: !0 }), setTimeout(s, Vt);
|
|
650
|
+
}), Ce = (e, t) => {
|
|
651
|
+
const r = document.createElement("audio");
|
|
652
|
+
return r.src = e, r.loop = t, r.preload = "auto", r.setAttribute("playsinline", ""), r.setAttribute("webkit-playsinline", ""), r.load(), r;
|
|
653
|
+
}, Zt = (e) => {
|
|
476
654
|
e.muted = !0, e.play().then(() => {
|
|
477
655
|
e.pause(), e.currentTime = 0, e.muted = !1;
|
|
478
656
|
}).catch(() => {
|
|
479
657
|
e.muted = !1;
|
|
480
658
|
});
|
|
481
659
|
};
|
|
482
|
-
class
|
|
660
|
+
class Yt {
|
|
483
661
|
constructor(t = {}) {
|
|
484
662
|
P(this, "sfxPoolSize");
|
|
485
663
|
P(this, "coalesceMs");
|
|
@@ -494,19 +672,19 @@ class _t {
|
|
|
494
672
|
P(this, "lastPlayed", /* @__PURE__ */ new Map());
|
|
495
673
|
/** Readiness promises so a loading gate can await decode/buffer. */
|
|
496
674
|
P(this, "ready", /* @__PURE__ */ new Map());
|
|
497
|
-
this.sfxPoolSize = t.sfxPoolSize ??
|
|
675
|
+
this.sfxPoolSize = t.sfxPoolSize ?? Kt, this.coalesceMs = t.coalesceMs ?? jt;
|
|
498
676
|
}
|
|
499
677
|
/**
|
|
500
678
|
* Create + buffer the looping music element. Await in the loading gate so the
|
|
501
679
|
* unmute tap is instant. Idempotent per URL (re-requesting the same track is
|
|
502
680
|
* a no-op that returns the in-flight promise).
|
|
503
681
|
*/
|
|
504
|
-
prefetchMusic(t,
|
|
505
|
-
const
|
|
506
|
-
if (this.musicWanted = { url: t, volume:
|
|
507
|
-
return this.music && (this.music.volume =
|
|
508
|
-
this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music =
|
|
509
|
-
const a =
|
|
682
|
+
prefetchMusic(t, r = 0.4) {
|
|
683
|
+
const s = se(r);
|
|
684
|
+
if (this.musicWanted = { url: t, volume: s }, this.musicUrl === t && this.musicReady)
|
|
685
|
+
return this.music && (this.music.volume = s), this.musicReady;
|
|
686
|
+
this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = Ce(t, !0), this.musicUrl = t, this.music.volume = s;
|
|
687
|
+
const a = Fe(this.music);
|
|
510
688
|
return this.musicReady = a, a;
|
|
511
689
|
}
|
|
512
690
|
/**
|
|
@@ -514,19 +692,19 @@ class _t {
|
|
|
514
692
|
* cut each other off). Returns a promise that resolves when the first element
|
|
515
693
|
* buffers. Idempotent per URL.
|
|
516
694
|
*/
|
|
517
|
-
registerSound(t,
|
|
518
|
-
const
|
|
519
|
-
if (
|
|
520
|
-
const a = se(
|
|
695
|
+
registerSound(t, r = 1) {
|
|
696
|
+
const s = this.ready.get(t);
|
|
697
|
+
if (s) return s;
|
|
698
|
+
const a = se(r), n = [];
|
|
521
699
|
for (let c = 0; c < this.sfxPoolSize; c += 1) {
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}), n.push(
|
|
700
|
+
const i = Ce(t, !1);
|
|
701
|
+
i.volume = a, i.addEventListener("ended", () => {
|
|
702
|
+
i.currentTime = 0;
|
|
703
|
+
}), n.push(i);
|
|
526
704
|
}
|
|
527
705
|
this.pools.set(t, { els: n, next: 0, volume: a });
|
|
528
|
-
const
|
|
529
|
-
return this.ready.set(t,
|
|
706
|
+
const o = Fe(n[0]);
|
|
707
|
+
return this.ready.set(t, o), o;
|
|
530
708
|
}
|
|
531
709
|
/** Subscribe to mute-state changes (for a toggle UI). Fires immediately with
|
|
532
710
|
* the current state. Returns an unsubscribe. */
|
|
@@ -543,7 +721,7 @@ class _t {
|
|
|
543
721
|
* then start the music. All elements are already buffered, so this is instant.
|
|
544
722
|
*/
|
|
545
723
|
setMuted(t) {
|
|
546
|
-
t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((
|
|
724
|
+
t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((r) => r.els.forEach(Zt)), this.applyMusic(), this.listeners.forEach((r) => r(this.muted)));
|
|
547
725
|
}
|
|
548
726
|
toggleMuted() {
|
|
549
727
|
this.setMuted(!this.muted);
|
|
@@ -554,30 +732,30 @@ class _t {
|
|
|
554
732
|
* same sound into one play, and does NO synchronous `currentTime` seek on a
|
|
555
733
|
* ready element (the pool rewinds on `ended`, off the hot path).
|
|
556
734
|
*/
|
|
557
|
-
playOneShot(t,
|
|
735
|
+
playOneShot(t, r) {
|
|
558
736
|
if (this.muted) return;
|
|
559
|
-
const
|
|
560
|
-
if (!
|
|
737
|
+
const s = this.pools.get(t);
|
|
738
|
+
if (!s) return;
|
|
561
739
|
const a = performance.now();
|
|
562
740
|
if (a - (this.lastPlayed.get(t) ?? -1 / 0) < this.coalesceMs) return;
|
|
563
741
|
this.lastPlayed.set(t, a);
|
|
564
|
-
const n =
|
|
565
|
-
let
|
|
742
|
+
const n = s.els.length;
|
|
743
|
+
let o;
|
|
566
744
|
for (let c = 0; c < n; c += 1) {
|
|
567
|
-
const
|
|
568
|
-
if (
|
|
569
|
-
|
|
745
|
+
const i = s.els[(s.next + c) % n];
|
|
746
|
+
if (i.paused) {
|
|
747
|
+
o = i, s.next = (s.next + c + 1) % n;
|
|
570
748
|
break;
|
|
571
749
|
}
|
|
572
750
|
}
|
|
573
|
-
|
|
751
|
+
o || (o = s.els[s.next], s.next = (s.next + 1) % n), o.muted = !1, o.volume = se(r ?? s.volume), o.currentTime !== 0 && (o.currentTime = 0), o.play().catch(() => {
|
|
574
752
|
});
|
|
575
753
|
}
|
|
576
754
|
/** Request the looping background track (buffer it with prefetchMusic, which
|
|
577
755
|
* a loading gate awaits). Remembered while muted; starts on unmute. */
|
|
578
|
-
startMusic(t,
|
|
579
|
-
const
|
|
580
|
-
this.musicUrl !== t && this.prefetchMusic(t,
|
|
756
|
+
startMusic(t, r = 0.4) {
|
|
757
|
+
const s = se(r);
|
|
758
|
+
this.musicUrl !== t && this.prefetchMusic(t, s), this.musicWanted = { url: t, volume: s }, this.applyMusic();
|
|
581
759
|
}
|
|
582
760
|
stopMusic() {
|
|
583
761
|
this.musicWanted = null, this.music && (this.music.pause(), this.music.currentTime = 0);
|
|
@@ -587,70 +765,70 @@ class _t {
|
|
|
587
765
|
}), this.muted && !this.music.paused && this.music.pause());
|
|
588
766
|
}
|
|
589
767
|
}
|
|
590
|
-
const
|
|
768
|
+
const Jt = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(r)) ? "replay" : "ended", Qt = (e, t, r) => e && t !== r, er = (e) => Math.min(100, Math.max(0, e)) / 100, Vr = Qe(function({
|
|
591
769
|
src: t,
|
|
592
|
-
playMode:
|
|
593
|
-
loopCount:
|
|
770
|
+
playMode: r = "once",
|
|
771
|
+
loopCount: s = 1,
|
|
594
772
|
autoplay: a = !1,
|
|
595
773
|
muted: n = !1,
|
|
596
|
-
volume:
|
|
774
|
+
volume: o = 100,
|
|
597
775
|
preload: c = "auto",
|
|
598
|
-
onReady:
|
|
776
|
+
onReady: i,
|
|
599
777
|
onPlay: l,
|
|
600
778
|
onPause: h,
|
|
601
779
|
onEnded: d,
|
|
602
780
|
onError: m
|
|
603
781
|
}, u) {
|
|
604
|
-
const
|
|
605
|
-
const
|
|
606
|
-
if (
|
|
782
|
+
const f = b(null), S = b(0), T = b(null), p = R(async () => {
|
|
783
|
+
const F = f.current;
|
|
784
|
+
if (F)
|
|
607
785
|
try {
|
|
608
|
-
await
|
|
786
|
+
await F.play();
|
|
609
787
|
} catch (w) {
|
|
610
788
|
const G = w instanceof Error ? w : new Error(String(w));
|
|
611
789
|
throw m == null || m(G), G;
|
|
612
790
|
}
|
|
613
|
-
}, [m]),
|
|
614
|
-
var
|
|
615
|
-
return (
|
|
616
|
-
}, []),
|
|
617
|
-
const
|
|
618
|
-
|
|
791
|
+
}, [m]), y = R(() => {
|
|
792
|
+
var F;
|
|
793
|
+
return (F = f.current) == null ? void 0 : F.pause();
|
|
794
|
+
}, []), A = R(() => {
|
|
795
|
+
const F = f.current;
|
|
796
|
+
F && (F.pause(), F.currentTime = 0, S.current = 0);
|
|
619
797
|
}, []);
|
|
620
|
-
|
|
798
|
+
et(
|
|
621
799
|
u,
|
|
622
800
|
() => ({
|
|
623
|
-
play:
|
|
624
|
-
pause:
|
|
625
|
-
stop:
|
|
801
|
+
play: p,
|
|
802
|
+
pause: y,
|
|
803
|
+
stop: A,
|
|
626
804
|
get current() {
|
|
627
|
-
return
|
|
805
|
+
return f.current;
|
|
628
806
|
}
|
|
629
807
|
}),
|
|
630
|
-
[
|
|
631
|
-
),
|
|
632
|
-
|
|
633
|
-
}, [t]),
|
|
634
|
-
|
|
635
|
-
}, [
|
|
636
|
-
|
|
808
|
+
[y, p, A]
|
|
809
|
+
), v(() => {
|
|
810
|
+
S.current = 0, T.current = null;
|
|
811
|
+
}, [t]), v(() => {
|
|
812
|
+
f.current && (f.current.volume = er(o));
|
|
813
|
+
}, [o]), v(() => {
|
|
814
|
+
Qt(a, T.current, t) && (T.current = t, p().catch(() => {
|
|
637
815
|
}));
|
|
638
816
|
}, [a, t]);
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
const
|
|
642
|
-
if (
|
|
643
|
-
const w =
|
|
644
|
-
w && (w.currentTime = 0,
|
|
817
|
+
const $ = R(() => {
|
|
818
|
+
S.current += 1;
|
|
819
|
+
const F = Math.max(1, Math.floor(s));
|
|
820
|
+
if (Jt(r, S.current, F) === "replay") {
|
|
821
|
+
const w = f.current;
|
|
822
|
+
w && (w.currentTime = 0, p().catch(() => {
|
|
645
823
|
}));
|
|
646
824
|
return;
|
|
647
825
|
}
|
|
648
|
-
|
|
649
|
-
}, [
|
|
826
|
+
S.current = 0, d == null || d();
|
|
827
|
+
}, [s, d, p, r]);
|
|
650
828
|
return /* @__PURE__ */ g(
|
|
651
829
|
"audio",
|
|
652
830
|
{
|
|
653
|
-
ref:
|
|
831
|
+
ref: f,
|
|
654
832
|
src: t,
|
|
655
833
|
preload: c,
|
|
656
834
|
autoPlay: !1,
|
|
@@ -658,58 +836,58 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
658
836
|
loop: !1,
|
|
659
837
|
playsInline: !0,
|
|
660
838
|
style: { display: "none" },
|
|
661
|
-
onCanPlayThrough:
|
|
839
|
+
onCanPlayThrough: i,
|
|
662
840
|
onPlay: l,
|
|
663
841
|
onPause: h,
|
|
664
|
-
onEnded:
|
|
842
|
+
onEnded: $,
|
|
665
843
|
onError: () => m == null ? void 0 : m(new Error(`Unable to load audio: ${t}`))
|
|
666
844
|
}
|
|
667
845
|
);
|
|
668
|
-
}), U = new
|
|
669
|
-
const [e, t] =
|
|
670
|
-
return
|
|
671
|
-
},
|
|
672
|
-
const { auto: t = !1 } = e,
|
|
673
|
-
|
|
674
|
-
const [a, n] =
|
|
675
|
-
const d = ++
|
|
676
|
-
if (d !==
|
|
846
|
+
}), U = new Yt(), Zr = (e, t) => U.prefetchMusic(e, t), Yr = (e, t) => U.registerSound(e, t), Jr = (e, t) => U.startMusic(e, t), Qr = () => U.stopMusic(), es = (e, t) => U.playOneShot(e, t), ts = (e) => U.setMuted(e), rs = () => U.toggleMuted(), ss = () => U.isMuted(), as = (e) => U.onMuteChange(e), ns = () => {
|
|
847
|
+
const [e, t] = k(U.isMuted());
|
|
848
|
+
return v(() => U.onMuteChange(t), []), e;
|
|
849
|
+
}, tr = (e = {}) => {
|
|
850
|
+
const { auto: t = !1 } = e, r = b(e.env ?? $e()), s = b(e.constraints);
|
|
851
|
+
s.current = e.constraints;
|
|
852
|
+
const [a, n] = k("unknown"), [o, c] = k(null), i = b(0), l = R(async () => {
|
|
853
|
+
const d = ++i.current, m = await He(r.current);
|
|
854
|
+
if (d !== i.current) return a;
|
|
677
855
|
const u = m.state === "unknown" ? "unknown" : m.state;
|
|
678
|
-
return n((
|
|
856
|
+
return n((f) => f === "requesting" ? f : u), u !== "blocked" && c(null), u;
|
|
679
857
|
}, []), h = R(
|
|
680
858
|
async (d) => {
|
|
681
|
-
const m = ++
|
|
859
|
+
const m = ++i.current;
|
|
682
860
|
n("requesting"), c(null);
|
|
683
|
-
const u = await
|
|
684
|
-
{ constraints: (d == null ? void 0 : d.constraints) ??
|
|
685
|
-
|
|
861
|
+
const u = await Ke(
|
|
862
|
+
{ constraints: (d == null ? void 0 : d.constraints) ?? s.current, keepStream: !1 },
|
|
863
|
+
r.current
|
|
686
864
|
);
|
|
687
|
-
return m !==
|
|
865
|
+
return m !== i.current || (n(u.state), c(u.reason)), u.state;
|
|
688
866
|
},
|
|
689
867
|
[]
|
|
690
868
|
);
|
|
691
|
-
return
|
|
869
|
+
return v(() => {
|
|
692
870
|
let d = () => {
|
|
693
871
|
}, m = !0;
|
|
694
|
-
return t ? h() : l(),
|
|
695
|
-
m && (n((
|
|
696
|
-
},
|
|
872
|
+
return t ? h() : l(), je((u) => {
|
|
873
|
+
m && (n((f) => f === "requesting" ? f : u.state === "unknown" ? "unknown" : u.state), u.state !== "blocked" && c(null));
|
|
874
|
+
}, r.current).then((u) => {
|
|
697
875
|
m ? d = u : u();
|
|
698
876
|
}), () => {
|
|
699
|
-
m = !1,
|
|
877
|
+
m = !1, i.current += 1, d();
|
|
700
878
|
};
|
|
701
|
-
}, [t, l, h]),
|
|
879
|
+
}, [t, l, h]), X(
|
|
702
880
|
() => ({
|
|
703
881
|
state: a,
|
|
704
|
-
reason:
|
|
705
|
-
canPrompt:
|
|
882
|
+
reason: o,
|
|
883
|
+
canPrompt: Ve(a),
|
|
706
884
|
usable: a === "granted",
|
|
707
885
|
request: h,
|
|
708
886
|
refresh: l
|
|
709
887
|
}),
|
|
710
|
-
[a,
|
|
888
|
+
[a, o, h, l]
|
|
711
889
|
);
|
|
712
|
-
},
|
|
890
|
+
}, rr = {
|
|
713
891
|
display: "flex",
|
|
714
892
|
flexDirection: "column",
|
|
715
893
|
alignItems: "center",
|
|
@@ -722,7 +900,7 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
722
900
|
background: "#111827",
|
|
723
901
|
color: "#f9fafb",
|
|
724
902
|
fontFamily: "system-ui, sans-serif"
|
|
725
|
-
},
|
|
903
|
+
}, sr = {
|
|
726
904
|
font: "inherit",
|
|
727
905
|
padding: "10px 18px",
|
|
728
906
|
borderRadius: 8,
|
|
@@ -730,86 +908,86 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
730
908
|
background: "#2563eb",
|
|
731
909
|
color: "#fff",
|
|
732
910
|
cursor: "pointer"
|
|
733
|
-
},
|
|
911
|
+
}, os = ({
|
|
734
912
|
children: e,
|
|
735
913
|
fallback: t,
|
|
736
|
-
auto:
|
|
737
|
-
constraints:
|
|
914
|
+
auto: r = !1,
|
|
915
|
+
constraints: s,
|
|
738
916
|
requestLabel: a = "Allow camera"
|
|
739
917
|
}) => {
|
|
740
|
-
const n =
|
|
741
|
-
if (n.usable) return /* @__PURE__ */ g(
|
|
742
|
-
if (t) return /* @__PURE__ */ g(
|
|
743
|
-
const { state:
|
|
744
|
-
return /* @__PURE__ */
|
|
745
|
-
/* @__PURE__ */ g("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ??
|
|
918
|
+
const n = tr({ auto: r, constraints: s });
|
|
919
|
+
if (n.usable) return /* @__PURE__ */ g(ae, { children: e });
|
|
920
|
+
if (t) return /* @__PURE__ */ g(ae, { children: t(n) });
|
|
921
|
+
const { state: o, reason: c, canPrompt: i, request: l } = n;
|
|
922
|
+
return /* @__PURE__ */ I("div", { style: rr, role: "region", "aria-label": "Camera access", children: [
|
|
923
|
+
/* @__PURE__ */ g("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? Ze[o] }),
|
|
746
924
|
/* @__PURE__ */ g(
|
|
747
925
|
"button",
|
|
748
926
|
{
|
|
749
927
|
type: "button",
|
|
750
928
|
onClick: () => void l(),
|
|
751
|
-
disabled: !
|
|
752
|
-
"aria-disabled": !
|
|
753
|
-
style: { ...
|
|
754
|
-
children:
|
|
929
|
+
disabled: !i || o === "requesting",
|
|
930
|
+
"aria-disabled": !i || o === "requesting",
|
|
931
|
+
style: { ...sr, opacity: i && o !== "requesting" ? 1 : 0.5 },
|
|
932
|
+
children: o === "requesting" ? "Waiting…" : o === "denied" ? "Try again" : a
|
|
755
933
|
}
|
|
756
934
|
)
|
|
757
935
|
] });
|
|
758
|
-
},
|
|
936
|
+
}, ar = () => {
|
|
759
937
|
var e;
|
|
760
938
|
return {
|
|
761
939
|
enumerateDevices: typeof navigator < "u" && ((e = navigator.mediaDevices) != null && e.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
|
|
762
940
|
};
|
|
763
|
-
},
|
|
941
|
+
}, nr = /\b(back|rear|environment|world)\b/i, or = /\b(front|user|facetime|selfie)\b/i, ir = (e) => nr.test(e) ? "environment" : or.test(e) ? "user" : null, is = async (e = ar()) => {
|
|
764
942
|
if (!e.enumerateDevices) return [];
|
|
765
943
|
try {
|
|
766
|
-
return (await e.enumerateDevices()).filter((
|
|
767
|
-
deviceId:
|
|
768
|
-
label:
|
|
769
|
-
facing:
|
|
944
|
+
return (await e.enumerateDevices()).filter((r) => r.kind === "videoinput").map((r) => ({
|
|
945
|
+
deviceId: r.deviceId,
|
|
946
|
+
label: r.label,
|
|
947
|
+
facing: ir(r.label)
|
|
770
948
|
}));
|
|
771
949
|
} catch {
|
|
772
950
|
return [];
|
|
773
951
|
}
|
|
774
|
-
},
|
|
952
|
+
}, cs = (e, t) => e.find((r) => r.facing === t) ?? null, Ne = rt(null), ls = ({
|
|
775
953
|
cache: e,
|
|
776
954
|
disposeUnreferencedOnUnmount: t = !0,
|
|
777
|
-
children:
|
|
955
|
+
children: r
|
|
778
956
|
}) => {
|
|
779
|
-
const
|
|
780
|
-
return
|
|
781
|
-
t &&
|
|
782
|
-
}, [
|
|
783
|
-
},
|
|
784
|
-
const { enabled:
|
|
957
|
+
const s = e ?? De();
|
|
958
|
+
return v(() => () => {
|
|
959
|
+
t && s.disposeUnreferenced();
|
|
960
|
+
}, [s, t]), /* @__PURE__ */ g(Ne.Provider, { value: s, children: r });
|
|
961
|
+
}, Le = () => tt(Ne) ?? De(), us = (e, t = {}) => {
|
|
962
|
+
const { enabled: r = !0 } = t, s = Le(), a = st(), n = (e == null ? void 0 : e.key) ?? null, [o, c] = k({
|
|
785
963
|
value: null,
|
|
786
964
|
status: "idle",
|
|
787
965
|
error: null
|
|
788
966
|
});
|
|
789
|
-
return
|
|
790
|
-
if (!e || !
|
|
967
|
+
return v(() => {
|
|
968
|
+
if (!e || !r) {
|
|
791
969
|
c({ value: null, status: "idle", error: null });
|
|
792
970
|
return;
|
|
793
971
|
}
|
|
794
|
-
let
|
|
795
|
-
const l =
|
|
796
|
-
return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }),
|
|
797
|
-
|
|
972
|
+
let i = !0;
|
|
973
|
+
const l = s.get(e.key);
|
|
974
|
+
return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), s.acquire(e, a).then((h) => {
|
|
975
|
+
i && c({ value: h, status: "ready", error: null });
|
|
798
976
|
}).catch((h) => {
|
|
799
|
-
|
|
977
|
+
i && c({ value: null, status: "error", error: h });
|
|
800
978
|
}), () => {
|
|
801
|
-
|
|
979
|
+
i = !1, s.release(e.key, a);
|
|
802
980
|
};
|
|
803
|
-
}, [
|
|
804
|
-
},
|
|
805
|
-
const t =
|
|
806
|
-
return
|
|
807
|
-
(
|
|
808
|
-
() =>
|
|
809
|
-
() =>
|
|
981
|
+
}, [s, n, r, a]), o;
|
|
982
|
+
}, ds = (e) => {
|
|
983
|
+
const t = Le(), r = e ?? t;
|
|
984
|
+
return at(
|
|
985
|
+
(s) => r.subscribe(s),
|
|
986
|
+
() => r.getStats(),
|
|
987
|
+
() => r.getStats()
|
|
810
988
|
);
|
|
811
|
-
},
|
|
812
|
-
version:
|
|
989
|
+
}, ne = 1, Ie = Object.freeze({
|
|
990
|
+
version: ne,
|
|
813
991
|
trackers: {
|
|
814
992
|
face: { enabled: !0, numFaces: 1, targetFps: null, holdMs: 250, predictMs: 0, smoothing: 0 },
|
|
815
993
|
hand: { enabled: !1, targetFps: null },
|
|
@@ -836,13 +1014,13 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
836
1014
|
fallbacks: { onUnsupported: "degrade", delegate: "auto" },
|
|
837
1015
|
assets: { holisticModelUrl: null, semanticSegmentationModelUrl: null },
|
|
838
1016
|
updatedAt: 0
|
|
839
|
-
}), D = (e, t,
|
|
1017
|
+
}), D = (e, t, r, s, a, n) => {
|
|
840
1018
|
if (e === void 0) return t;
|
|
841
1019
|
if (typeof e != "number" || !Number.isFinite(e))
|
|
842
1020
|
return n(`${a}: not a number, kept ${t}`), t;
|
|
843
|
-
const
|
|
844
|
-
return
|
|
845
|
-
},
|
|
1021
|
+
const o = Math.min(s, Math.max(r, e));
|
|
1022
|
+
return o !== e && n(`${a}: ${e} clamped to ${o}`), o;
|
|
1023
|
+
}, V = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (s(`${r}: invalid fps, kept ${t}`), t) : (e > 120 && s(`${r}: ${e} clamped to 120`), Math.min(120, e)), cr = [
|
|
846
1024
|
"tiers",
|
|
847
1025
|
"budget",
|
|
848
1026
|
"initialTier",
|
|
@@ -850,30 +1028,30 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
850
1028
|
"maxTier",
|
|
851
1029
|
"adaptive",
|
|
852
1030
|
"historySize"
|
|
853
|
-
],
|
|
1031
|
+
], ve = (e) => {
|
|
854
1032
|
const t = {};
|
|
855
|
-
for (const
|
|
1033
|
+
for (const r of cr) e[r] !== void 0 && (t[r] = e[r]);
|
|
856
1034
|
return t;
|
|
857
|
-
},
|
|
858
|
-
var c,
|
|
859
|
-
const
|
|
1035
|
+
}, L = (e, t, r, s) => e === void 0 ? t : typeof e != "boolean" ? (s(`${r}: not a boolean, kept ${t}`), t) : e, z = (e, t, r, s, a) => e === void 0 ? r : t.includes(e) ? e : (a(`${s}: "${String(e)}" is not one of ${t.join(" | ")}, kept ${r}`), r), xe = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "string" || !/^https?:\/\//.test(e) ? (s(`${r}: not an http(s) URL, kept ${t === null ? "the SDK default" : t}`), t) : e, W = (e = {}, t = Ie, r = []) => {
|
|
1036
|
+
var c, i, l, h, d, m, u, f, S, T, p, y, A, $, F, w, G, Y, J, Q, ee, K, M, C, E, _, H, B, N, j, me, fe, pe, he, ge, ye, Se, Me;
|
|
1037
|
+
const s = (qe) => r.push(qe), a = e.trackers ?? {}, n = t.trackers, o = e.quality === void 0 ? t.quality === !1 ? !1 : ve(t.quality) : e.quality === !1 ? !1 : typeof e.quality == "object" && e.quality !== null ? ve(e.quality) : (s("quality: must be an object or false, kept base"), t.quality);
|
|
860
1038
|
return {
|
|
861
|
-
version:
|
|
1039
|
+
version: ne,
|
|
862
1040
|
trackers: {
|
|
863
1041
|
face: {
|
|
864
|
-
enabled:
|
|
1042
|
+
enabled: L((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", s),
|
|
865
1043
|
numFaces: Math.round(
|
|
866
|
-
D((
|
|
1044
|
+
D((i = a.face) == null ? void 0 : i.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", s)
|
|
867
1045
|
),
|
|
868
|
-
targetFps:
|
|
869
|
-
holdMs: D((h = a.face) == null ? void 0 : h.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs",
|
|
1046
|
+
targetFps: V((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", s),
|
|
1047
|
+
holdMs: D((h = a.face) == null ? void 0 : h.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", s),
|
|
870
1048
|
predictMs: D(
|
|
871
1049
|
(d = a.face) == null ? void 0 : d.predictMs,
|
|
872
1050
|
n.face.predictMs,
|
|
873
1051
|
0,
|
|
874
1052
|
1e3,
|
|
875
1053
|
"trackers.face.predictMs",
|
|
876
|
-
|
|
1054
|
+
s
|
|
877
1055
|
),
|
|
878
1056
|
smoothing: D(
|
|
879
1057
|
(m = a.face) == null ? void 0 : m.smoothing,
|
|
@@ -881,40 +1059,40 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
881
1059
|
0,
|
|
882
1060
|
100,
|
|
883
1061
|
"trackers.face.smoothing",
|
|
884
|
-
|
|
1062
|
+
s
|
|
885
1063
|
)
|
|
886
1064
|
},
|
|
887
1065
|
hand: {
|
|
888
|
-
enabled:
|
|
889
|
-
targetFps:
|
|
1066
|
+
enabled: L((u = a.hand) == null ? void 0 : u.enabled, n.hand.enabled, "trackers.hand.enabled", s),
|
|
1067
|
+
targetFps: V((f = a.hand) == null ? void 0 : f.targetFps, n.hand.targetFps, "trackers.hand.targetFps", s)
|
|
890
1068
|
},
|
|
891
1069
|
gesture: {
|
|
892
|
-
enabled:
|
|
893
|
-
targetFps:
|
|
894
|
-
(
|
|
1070
|
+
enabled: L((S = a.gesture) == null ? void 0 : S.enabled, n.gesture.enabled, "trackers.gesture.enabled", s),
|
|
1071
|
+
targetFps: V(
|
|
1072
|
+
(T = a.gesture) == null ? void 0 : T.targetFps,
|
|
895
1073
|
n.gesture.targetFps,
|
|
896
1074
|
"trackers.gesture.targetFps",
|
|
897
|
-
|
|
1075
|
+
s
|
|
898
1076
|
)
|
|
899
1077
|
},
|
|
900
1078
|
body: {
|
|
901
|
-
enabled:
|
|
902
|
-
targetFps:
|
|
1079
|
+
enabled: L((p = a.body) == null ? void 0 : p.enabled, n.body.enabled, "trackers.body.enabled", s),
|
|
1080
|
+
targetFps: V((y = a.body) == null ? void 0 : y.targetFps, n.body.targetFps, "trackers.body.targetFps", s)
|
|
903
1081
|
},
|
|
904
1082
|
holistic: {
|
|
905
|
-
enabled:
|
|
906
|
-
targetFps:
|
|
907
|
-
(
|
|
1083
|
+
enabled: L((A = a.holistic) == null ? void 0 : A.enabled, n.holistic.enabled, "trackers.holistic.enabled", s),
|
|
1084
|
+
targetFps: V(
|
|
1085
|
+
($ = a.holistic) == null ? void 0 : $.targetFps,
|
|
908
1086
|
n.holistic.targetFps,
|
|
909
1087
|
"trackers.holistic.targetFps",
|
|
910
|
-
|
|
1088
|
+
s
|
|
911
1089
|
),
|
|
912
|
-
hands:
|
|
913
|
-
(
|
|
1090
|
+
hands: z(
|
|
1091
|
+
(F = a.holistic) == null ? void 0 : F.hands,
|
|
914
1092
|
["both", "left", "right", "none"],
|
|
915
1093
|
n.holistic.hands,
|
|
916
1094
|
"trackers.holistic.hands",
|
|
917
|
-
|
|
1095
|
+
s
|
|
918
1096
|
),
|
|
919
1097
|
holdMs: D(
|
|
920
1098
|
(w = a.holistic) == null ? void 0 : w.holdMs,
|
|
@@ -922,7 +1100,7 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
922
1100
|
0,
|
|
923
1101
|
5e3,
|
|
924
1102
|
"trackers.holistic.holdMs",
|
|
925
|
-
|
|
1103
|
+
s
|
|
926
1104
|
),
|
|
927
1105
|
predictMs: D(
|
|
928
1106
|
(G = a.holistic) == null ? void 0 : G.predictMs,
|
|
@@ -930,7 +1108,7 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
930
1108
|
0,
|
|
931
1109
|
1e3,
|
|
932
1110
|
"trackers.holistic.predictMs",
|
|
933
|
-
|
|
1111
|
+
s
|
|
934
1112
|
),
|
|
935
1113
|
analysisMaxDimension: Math.round(
|
|
936
1114
|
D(
|
|
@@ -939,140 +1117,140 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
939
1117
|
128,
|
|
940
1118
|
2048,
|
|
941
1119
|
"trackers.holistic.analysisMaxDimension",
|
|
942
|
-
|
|
1120
|
+
s
|
|
943
1121
|
)
|
|
944
1122
|
),
|
|
945
|
-
outputFaceBlendshapes:
|
|
946
|
-
(
|
|
1123
|
+
outputFaceBlendshapes: L(
|
|
1124
|
+
(J = a.holistic) == null ? void 0 : J.outputFaceBlendshapes,
|
|
947
1125
|
n.holistic.outputFaceBlendshapes,
|
|
948
1126
|
"trackers.holistic.outputFaceBlendshapes",
|
|
949
|
-
|
|
1127
|
+
s
|
|
950
1128
|
),
|
|
951
1129
|
confidence: D(
|
|
952
|
-
(
|
|
1130
|
+
(Q = a.holistic) == null ? void 0 : Q.confidence,
|
|
953
1131
|
n.holistic.confidence,
|
|
954
1132
|
0,
|
|
955
1133
|
1,
|
|
956
1134
|
"trackers.holistic.confidence",
|
|
957
|
-
|
|
1135
|
+
s
|
|
958
1136
|
),
|
|
959
|
-
delegate:
|
|
1137
|
+
delegate: z(
|
|
960
1138
|
(ee = a.holistic) == null ? void 0 : ee.delegate,
|
|
961
1139
|
["auto", "GPU", "CPU"],
|
|
962
1140
|
n.holistic.delegate,
|
|
963
1141
|
"trackers.holistic.delegate",
|
|
964
|
-
|
|
1142
|
+
s
|
|
965
1143
|
)
|
|
966
1144
|
},
|
|
967
1145
|
segmentation: {
|
|
968
|
-
enabled:
|
|
969
|
-
(
|
|
1146
|
+
enabled: L(
|
|
1147
|
+
(K = a.segmentation) == null ? void 0 : K.enabled,
|
|
970
1148
|
n.segmentation.enabled,
|
|
971
1149
|
"trackers.segmentation.enabled",
|
|
972
|
-
|
|
1150
|
+
s
|
|
973
1151
|
),
|
|
974
|
-
quality:
|
|
975
|
-
(
|
|
1152
|
+
quality: z(
|
|
1153
|
+
(M = a.segmentation) == null ? void 0 : M.quality,
|
|
976
1154
|
["low", "medium", "high"],
|
|
977
1155
|
n.segmentation.quality,
|
|
978
1156
|
"trackers.segmentation.quality",
|
|
979
|
-
|
|
1157
|
+
s
|
|
980
1158
|
)
|
|
981
1159
|
},
|
|
982
1160
|
semanticSegmentation: {
|
|
983
|
-
enabled:
|
|
1161
|
+
enabled: L(
|
|
984
1162
|
(C = a.semanticSegmentation) == null ? void 0 : C.enabled,
|
|
985
1163
|
n.semanticSegmentation.enabled,
|
|
986
1164
|
"trackers.semanticSegmentation.enabled",
|
|
987
|
-
|
|
1165
|
+
s
|
|
988
1166
|
),
|
|
989
|
-
preset:
|
|
990
|
-
(
|
|
991
|
-
|
|
1167
|
+
preset: z(
|
|
1168
|
+
(E = a.semanticSegmentation) == null ? void 0 : E.preset,
|
|
1169
|
+
Et,
|
|
992
1170
|
n.semanticSegmentation.preset,
|
|
993
1171
|
"trackers.semanticSegmentation.preset",
|
|
994
|
-
|
|
1172
|
+
s
|
|
995
1173
|
),
|
|
996
|
-
quality:
|
|
997
|
-
(
|
|
1174
|
+
quality: z(
|
|
1175
|
+
(_ = a.semanticSegmentation) == null ? void 0 : _.quality,
|
|
998
1176
|
["low", "medium", "high"],
|
|
999
1177
|
n.semanticSegmentation.quality,
|
|
1000
1178
|
"trackers.semanticSegmentation.quality",
|
|
1001
|
-
|
|
1179
|
+
s
|
|
1002
1180
|
)
|
|
1003
1181
|
}
|
|
1004
1182
|
},
|
|
1005
1183
|
perf: {
|
|
1006
|
-
targetFps: D((
|
|
1007
|
-
camRes: Math.round(D((
|
|
1008
|
-
cameraZoom: D((N = e.perf) == null ? void 0 : N.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom",
|
|
1184
|
+
targetFps: D((H = e.perf) == null ? void 0 : H.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", s),
|
|
1185
|
+
camRes: Math.round(D((B = e.perf) == null ? void 0 : B.camRes, t.perf.camRes, 160, 3840, "perf.camRes", s)),
|
|
1186
|
+
cameraZoom: D((N = e.perf) == null ? void 0 : N.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", s),
|
|
1009
1187
|
analysisScale: D(
|
|
1010
|
-
(
|
|
1188
|
+
(j = e.perf) == null ? void 0 : j.analysisScale,
|
|
1011
1189
|
t.perf.analysisScale,
|
|
1012
1190
|
0.25,
|
|
1013
1191
|
1,
|
|
1014
1192
|
"perf.analysisScale",
|
|
1015
|
-
|
|
1193
|
+
s
|
|
1016
1194
|
)
|
|
1017
1195
|
},
|
|
1018
1196
|
lifecycle: {
|
|
1019
|
-
pauseWhenHidden:
|
|
1020
|
-
(
|
|
1197
|
+
pauseWhenHidden: L(
|
|
1198
|
+
(me = e.lifecycle) == null ? void 0 : me.pauseWhenHidden,
|
|
1021
1199
|
t.lifecycle.pauseWhenHidden,
|
|
1022
1200
|
"lifecycle.pauseWhenHidden",
|
|
1023
|
-
|
|
1201
|
+
s
|
|
1024
1202
|
)
|
|
1025
1203
|
},
|
|
1026
|
-
quality:
|
|
1204
|
+
quality: o,
|
|
1027
1205
|
camera: {
|
|
1028
|
-
facingMode:
|
|
1029
|
-
(
|
|
1206
|
+
facingMode: z(
|
|
1207
|
+
(fe = e.camera) == null ? void 0 : fe.facingMode,
|
|
1030
1208
|
["user", "environment"],
|
|
1031
1209
|
t.camera.facingMode,
|
|
1032
1210
|
"camera.facingMode",
|
|
1033
|
-
|
|
1211
|
+
s
|
|
1034
1212
|
),
|
|
1035
|
-
deviceId: ((
|
|
1036
|
-
mirrored: ((
|
|
1213
|
+
deviceId: ((pe = e.camera) == null ? void 0 : pe.deviceId) === void 0 ? t.camera.deviceId : typeof e.camera.deviceId == "string" || e.camera.deviceId === null ? e.camera.deviceId : (s("camera.deviceId: not a string, kept base"), t.camera.deviceId),
|
|
1214
|
+
mirrored: ((he = e.camera) == null ? void 0 : he.mirrored) === void 0 ? t.camera.mirrored : e.camera.mirrored === "auto" || typeof e.camera.mirrored == "boolean" ? e.camera.mirrored : (s('camera.mirrored: must be boolean or "auto", kept base'), t.camera.mirrored)
|
|
1037
1215
|
},
|
|
1038
1216
|
fallbacks: {
|
|
1039
|
-
onUnsupported:
|
|
1040
|
-
(
|
|
1217
|
+
onUnsupported: z(
|
|
1218
|
+
(ge = e.fallbacks) == null ? void 0 : ge.onUnsupported,
|
|
1041
1219
|
["block", "degrade"],
|
|
1042
1220
|
t.fallbacks.onUnsupported,
|
|
1043
1221
|
"fallbacks.onUnsupported",
|
|
1044
|
-
|
|
1222
|
+
s
|
|
1045
1223
|
),
|
|
1046
|
-
delegate:
|
|
1047
|
-
(
|
|
1224
|
+
delegate: z(
|
|
1225
|
+
(ye = e.fallbacks) == null ? void 0 : ye.delegate,
|
|
1048
1226
|
["auto", "GPU", "CPU"],
|
|
1049
1227
|
t.fallbacks.delegate,
|
|
1050
1228
|
"fallbacks.delegate",
|
|
1051
|
-
|
|
1229
|
+
s
|
|
1052
1230
|
)
|
|
1053
1231
|
},
|
|
1054
1232
|
assets: {
|
|
1055
|
-
holisticModelUrl:
|
|
1056
|
-
(
|
|
1233
|
+
holisticModelUrl: xe(
|
|
1234
|
+
(Se = e.assets) == null ? void 0 : Se.holisticModelUrl,
|
|
1057
1235
|
t.assets.holisticModelUrl,
|
|
1058
1236
|
"assets.holisticModelUrl",
|
|
1059
|
-
|
|
1237
|
+
s
|
|
1060
1238
|
),
|
|
1061
|
-
semanticSegmentationModelUrl:
|
|
1062
|
-
(
|
|
1239
|
+
semanticSegmentationModelUrl: xe(
|
|
1240
|
+
(Me = e.assets) == null ? void 0 : Me.semanticSegmentationModelUrl,
|
|
1063
1241
|
t.assets.semanticSegmentationModelUrl,
|
|
1064
1242
|
"assets.semanticSegmentationModelUrl",
|
|
1065
|
-
|
|
1243
|
+
s
|
|
1066
1244
|
)
|
|
1067
1245
|
},
|
|
1068
1246
|
updatedAt: typeof e.updatedAt == "number" && Number.isFinite(e.updatedAt) ? e.updatedAt : t.updatedAt
|
|
1069
1247
|
};
|
|
1070
|
-
},
|
|
1248
|
+
}, ke = (e, t, r = Date.now()) => W({ ...t, updatedAt: r }, e), Oe = (e) => JSON.stringify(W({}, e)), Ge = (e) => {
|
|
1071
1249
|
const t = [];
|
|
1072
|
-
let
|
|
1250
|
+
let r = e;
|
|
1073
1251
|
if (typeof e == "string")
|
|
1074
1252
|
try {
|
|
1075
|
-
|
|
1253
|
+
r = JSON.parse(e);
|
|
1076
1254
|
} catch {
|
|
1077
1255
|
return {
|
|
1078
1256
|
config: W(),
|
|
@@ -1080,17 +1258,17 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1080
1258
|
warnings: ["not valid JSON; defaults used"]
|
|
1081
1259
|
};
|
|
1082
1260
|
}
|
|
1083
|
-
if (!
|
|
1261
|
+
if (!r || typeof r != "object")
|
|
1084
1262
|
return {
|
|
1085
1263
|
config: W(),
|
|
1086
1264
|
migrated: !0,
|
|
1087
1265
|
warnings: ["not an object; defaults used"]
|
|
1088
1266
|
};
|
|
1089
|
-
const
|
|
1267
|
+
const s = r, a = s.version !== ne;
|
|
1090
1268
|
return a && t.push(
|
|
1091
|
-
`migrated from version ${String(
|
|
1092
|
-
), { config: W(
|
|
1093
|
-
},
|
|
1269
|
+
`migrated from version ${String(s.version ?? "none")} to ${ne}`
|
|
1270
|
+
), { config: W(s, Ie, t), migrated: a, warnings: t };
|
|
1271
|
+
}, ms = [
|
|
1094
1272
|
"face",
|
|
1095
1273
|
"hand",
|
|
1096
1274
|
"gesture",
|
|
@@ -1098,7 +1276,7 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1098
1276
|
"holistic",
|
|
1099
1277
|
"segmentation",
|
|
1100
1278
|
"semanticSegmentation"
|
|
1101
|
-
],
|
|
1279
|
+
], lr = (e) => ({
|
|
1102
1280
|
perf: {
|
|
1103
1281
|
targetFps: e.perf.targetFps > 0 ? e.perf.targetFps : void 0,
|
|
1104
1282
|
camRes: e.perf.camRes,
|
|
@@ -1107,341 +1285,349 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1107
1285
|
},
|
|
1108
1286
|
lifecycle: { pauseWhenHidden: e.lifecycle.pauseWhenHidden },
|
|
1109
1287
|
quality: e.quality
|
|
1110
|
-
}),
|
|
1288
|
+
}), ur = (e) => ({
|
|
1111
1289
|
facingMode: e.camera.facingMode,
|
|
1112
1290
|
...e.camera.deviceId ? { deviceId: e.camera.deviceId } : {},
|
|
1113
1291
|
...e.camera.mirrored === "auto" ? {} : { mirrored: e.camera.mirrored }
|
|
1114
|
-
}), O = (e) => e === null ? {} : { targetFps: e },
|
|
1115
|
-
const
|
|
1292
|
+
}), O = (e) => e === null ? {} : { targetFps: e }, dr = (e, t) => {
|
|
1293
|
+
const r = e.trackers;
|
|
1116
1294
|
return {
|
|
1117
1295
|
face: {
|
|
1118
|
-
numFaces:
|
|
1119
|
-
...O(
|
|
1120
|
-
holdMs:
|
|
1121
|
-
predictMs:
|
|
1122
|
-
active:
|
|
1296
|
+
numFaces: r.face.numFaces,
|
|
1297
|
+
...O(r.face.targetFps),
|
|
1298
|
+
holdMs: r.face.holdMs,
|
|
1299
|
+
predictMs: r.face.predictMs,
|
|
1300
|
+
active: r.face.enabled
|
|
1123
1301
|
},
|
|
1124
|
-
hand: { ...O(
|
|
1125
|
-
gesture: { ...O(
|
|
1126
|
-
body: { active:
|
|
1302
|
+
hand: { ...O(r.hand.targetFps), active: r.hand.enabled },
|
|
1303
|
+
gesture: { ...O(r.gesture.targetFps), active: r.gesture.enabled },
|
|
1304
|
+
body: { active: r.body.enabled },
|
|
1127
1305
|
holistic: {
|
|
1128
|
-
...O(
|
|
1129
|
-
hands:
|
|
1130
|
-
holdMs:
|
|
1131
|
-
predictMs:
|
|
1132
|
-
analysisMaxDimension:
|
|
1133
|
-
outputFaceBlendshapes:
|
|
1134
|
-
delegate:
|
|
1306
|
+
...O(r.holistic.targetFps),
|
|
1307
|
+
hands: r.holistic.hands,
|
|
1308
|
+
holdMs: r.holistic.holdMs,
|
|
1309
|
+
predictMs: r.holistic.predictMs,
|
|
1310
|
+
analysisMaxDimension: r.holistic.analysisMaxDimension,
|
|
1311
|
+
outputFaceBlendshapes: r.holistic.outputFaceBlendshapes,
|
|
1312
|
+
delegate: r.holistic.delegate === "auto" ? e.fallbacks.delegate : r.holistic.delegate,
|
|
1135
1313
|
...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {},
|
|
1136
|
-
active:
|
|
1314
|
+
active: r.holistic.enabled
|
|
1137
1315
|
},
|
|
1138
|
-
segmentation: { quality:
|
|
1316
|
+
segmentation: { quality: r.segmentation.quality, active: r.segmentation.enabled },
|
|
1139
1317
|
semanticSegmentation: {
|
|
1140
|
-
preset:
|
|
1141
|
-
quality:
|
|
1318
|
+
preset: r.semanticSegmentation.preset,
|
|
1319
|
+
quality: r.semanticSegmentation.quality,
|
|
1142
1320
|
...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {},
|
|
1143
|
-
active:
|
|
1321
|
+
active: r.semanticSegmentation.enabled
|
|
1144
1322
|
}
|
|
1145
1323
|
}[t];
|
|
1146
|
-
},
|
|
1147
|
-
const
|
|
1324
|
+
}, mr = (e, t) => {
|
|
1325
|
+
const r = e.trackers;
|
|
1148
1326
|
switch (t) {
|
|
1149
|
-
case
|
|
1150
|
-
return { numFaces:
|
|
1151
|
-
case
|
|
1152
|
-
return { ...O(
|
|
1153
|
-
case
|
|
1154
|
-
return { ...O(
|
|
1155
|
-
case
|
|
1156
|
-
return { ...O(
|
|
1157
|
-
case
|
|
1158
|
-
const
|
|
1327
|
+
case x.FACE_TRACKER:
|
|
1328
|
+
return { numFaces: r.face.numFaces, ...O(r.face.targetFps) };
|
|
1329
|
+
case x.HAND_TRACKER:
|
|
1330
|
+
return { ...O(r.hand.targetFps) };
|
|
1331
|
+
case x.GESTURE_TRACKER:
|
|
1332
|
+
return { ...O(r.gesture.targetFps) };
|
|
1333
|
+
case x.BODY_TRACKER:
|
|
1334
|
+
return { ...O(r.body.targetFps) };
|
|
1335
|
+
case x.HOLISTIC_TRACKER: {
|
|
1336
|
+
const s = r.holistic;
|
|
1159
1337
|
return {
|
|
1160
|
-
...O(
|
|
1161
|
-
hands:
|
|
1162
|
-
holdMs:
|
|
1163
|
-
predictMs:
|
|
1164
|
-
analysisMaxDimension:
|
|
1165
|
-
outputFaceBlendshapes:
|
|
1166
|
-
minFaceDetectionConfidence:
|
|
1167
|
-
minFacePresenceConfidence:
|
|
1168
|
-
minPoseDetectionConfidence:
|
|
1169
|
-
minPosePresenceConfidence:
|
|
1170
|
-
minHandLandmarksConfidence:
|
|
1171
|
-
delegate:
|
|
1338
|
+
...O(s.targetFps),
|
|
1339
|
+
hands: s.hands,
|
|
1340
|
+
holdMs: s.holdMs,
|
|
1341
|
+
predictMs: s.predictMs,
|
|
1342
|
+
analysisMaxDimension: s.analysisMaxDimension,
|
|
1343
|
+
outputFaceBlendshapes: s.outputFaceBlendshapes,
|
|
1344
|
+
minFaceDetectionConfidence: s.confidence,
|
|
1345
|
+
minFacePresenceConfidence: s.confidence,
|
|
1346
|
+
minPoseDetectionConfidence: s.confidence,
|
|
1347
|
+
minPosePresenceConfidence: s.confidence,
|
|
1348
|
+
minHandLandmarksConfidence: s.confidence,
|
|
1349
|
+
delegate: s.delegate === "auto" ? e.fallbacks.delegate : s.delegate,
|
|
1172
1350
|
...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {}
|
|
1173
1351
|
};
|
|
1174
1352
|
}
|
|
1175
|
-
case
|
|
1176
|
-
return { quality:
|
|
1177
|
-
case
|
|
1353
|
+
case x.BACKGROUND_SEGMENTATION:
|
|
1354
|
+
return { quality: r.segmentation.quality };
|
|
1355
|
+
case x.SEMANTIC_SEGMENTATION:
|
|
1178
1356
|
return {
|
|
1179
|
-
preset:
|
|
1180
|
-
quality:
|
|
1357
|
+
preset: r.semanticSegmentation.preset,
|
|
1358
|
+
quality: r.semanticSegmentation.quality,
|
|
1181
1359
|
...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {}
|
|
1182
1360
|
};
|
|
1183
1361
|
default:
|
|
1184
1362
|
return {};
|
|
1185
1363
|
}
|
|
1186
|
-
},
|
|
1187
|
-
const t = e.trackers,
|
|
1188
|
-
return t.face.enabled &&
|
|
1189
|
-
},
|
|
1364
|
+
}, fr = (e) => {
|
|
1365
|
+
const t = e.trackers, r = [];
|
|
1366
|
+
return t.face.enabled && r.push(x.FACE_TRACKER), t.hand.enabled && r.push(x.HAND_TRACKER), t.gesture.enabled && r.push(x.GESTURE_TRACKER), t.body.enabled && r.push(x.BODY_TRACKER), t.holistic.enabled && r.push(x.HOLISTIC_TRACKER), t.segmentation.enabled && r.push(x.BACKGROUND_SEGMENTATION), t.semanticSegmentation.enabled && r.push(x.SEMANTIC_SEGMENTATION), r;
|
|
1367
|
+
}, oe = "vincentt.xr.tracking-config", de = () => {
|
|
1190
1368
|
try {
|
|
1191
1369
|
return typeof localStorage < "u" ? localStorage : null;
|
|
1192
1370
|
} catch {
|
|
1193
1371
|
return null;
|
|
1194
1372
|
}
|
|
1195
|
-
},
|
|
1373
|
+
}, pr = (e = oe, t = de()) => {
|
|
1196
1374
|
if (!t) return null;
|
|
1197
1375
|
try {
|
|
1198
|
-
const
|
|
1199
|
-
return
|
|
1376
|
+
const r = t.getItem(e);
|
|
1377
|
+
return r ? Ge(r) : null;
|
|
1200
1378
|
} catch {
|
|
1201
1379
|
return null;
|
|
1202
1380
|
}
|
|
1203
|
-
},
|
|
1204
|
-
if (!
|
|
1381
|
+
}, _e = (e, t = oe, r = de()) => {
|
|
1382
|
+
if (!r) return !1;
|
|
1205
1383
|
try {
|
|
1206
|
-
return
|
|
1384
|
+
return r.setItem(t, Oe(e)), !0;
|
|
1207
1385
|
} catch {
|
|
1208
1386
|
return !1;
|
|
1209
1387
|
}
|
|
1210
|
-
},
|
|
1388
|
+
}, hr = (e = oe, t = de()) => {
|
|
1211
1389
|
if (t)
|
|
1212
1390
|
try {
|
|
1213
1391
|
t.removeItem(e);
|
|
1214
1392
|
} catch {
|
|
1215
1393
|
}
|
|
1216
|
-
},
|
|
1217
|
-
const { storageKey: t =
|
|
1218
|
-
m.current =
|
|
1219
|
-
if (!
|
|
1394
|
+
}, fs = (e = {}) => {
|
|
1395
|
+
const { storageKey: t = oe, persist: r = !0 } = e, s = e.storage, a = b(e.initial), n = X(() => W(a.current ?? {}), []), [o, c] = k(n), [i, l] = k([]), [h, d] = k(!r), m = b(o);
|
|
1396
|
+
m.current = o, v(() => {
|
|
1397
|
+
if (!r) {
|
|
1220
1398
|
d(!0);
|
|
1221
1399
|
return;
|
|
1222
1400
|
}
|
|
1223
|
-
const
|
|
1224
|
-
if (
|
|
1225
|
-
const
|
|
1226
|
-
m.current =
|
|
1401
|
+
const p = pr(t, s);
|
|
1402
|
+
if (p) {
|
|
1403
|
+
const y = W(p.config, n);
|
|
1404
|
+
m.current = y, c(y), l(p.warnings), p.migrated && _e(y, t, s);
|
|
1227
1405
|
}
|
|
1228
1406
|
d(!0);
|
|
1229
|
-
}, [
|
|
1407
|
+
}, [r, t, s, n]);
|
|
1230
1408
|
const u = R(
|
|
1231
|
-
(
|
|
1232
|
-
[
|
|
1233
|
-
),
|
|
1234
|
-
(
|
|
1235
|
-
const
|
|
1236
|
-
return u(
|
|
1409
|
+
(p, y) => (m.current = p, c(p), l(y), r && _e(p, t, s), p),
|
|
1410
|
+
[r, t, s]
|
|
1411
|
+
), f = R(
|
|
1412
|
+
(p) => {
|
|
1413
|
+
const y = [], A = W({ ...p, updatedAt: Date.now() }, m.current, y);
|
|
1414
|
+
return u(A, y);
|
|
1237
1415
|
},
|
|
1238
1416
|
[u]
|
|
1239
|
-
),
|
|
1240
|
-
const
|
|
1241
|
-
return m.current =
|
|
1242
|
-
}, [n,
|
|
1243
|
-
(
|
|
1244
|
-
const
|
|
1245
|
-
return
|
|
1417
|
+
), S = R(() => {
|
|
1418
|
+
const p = ke(n, {}, 0);
|
|
1419
|
+
return m.current = p, c(p), l([]), r && hr(t, s), p;
|
|
1420
|
+
}, [n, r, t, s]), T = R(
|
|
1421
|
+
(p) => {
|
|
1422
|
+
const y = Ge(p);
|
|
1423
|
+
return y.warnings.some((A) => A.startsWith("not valid JSON") || A.startsWith("not an object")) ? (l([`import: ${y.warnings[0]}; config unchanged`]), m.current) : u(ke(y.config, {}, Date.now()), y.warnings);
|
|
1246
1424
|
},
|
|
1247
1425
|
[u]
|
|
1248
1426
|
);
|
|
1249
|
-
return
|
|
1427
|
+
return X(
|
|
1250
1428
|
() => ({
|
|
1251
|
-
config:
|
|
1429
|
+
config: o,
|
|
1252
1430
|
hydrated: h,
|
|
1253
|
-
warnings:
|
|
1254
|
-
update:
|
|
1255
|
-
reset:
|
|
1256
|
-
importJson:
|
|
1257
|
-
json:
|
|
1258
|
-
providerProps:
|
|
1259
|
-
cameraRequest:
|
|
1260
|
-
trackerProps: (
|
|
1261
|
-
modelOptions: (
|
|
1262
|
-
enabledModels:
|
|
1431
|
+
warnings: i,
|
|
1432
|
+
update: f,
|
|
1433
|
+
reset: S,
|
|
1434
|
+
importJson: T,
|
|
1435
|
+
json: Oe(o),
|
|
1436
|
+
providerProps: lr(o),
|
|
1437
|
+
cameraRequest: ur(o),
|
|
1438
|
+
trackerProps: (p) => dr(o, p),
|
|
1439
|
+
modelOptions: (p) => mr(o, p),
|
|
1440
|
+
enabledModels: fr(o)
|
|
1263
1441
|
}),
|
|
1264
|
-
[
|
|
1442
|
+
[o, h, i, f, S, T]
|
|
1265
1443
|
);
|
|
1266
1444
|
};
|
|
1267
1445
|
export {
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1446
|
+
Or as AspectRatioContainer,
|
|
1447
|
+
Yt as AudioEngine,
|
|
1448
|
+
Vr as AudioPlayer,
|
|
1449
|
+
Gr as Axes,
|
|
1450
|
+
$r as Button,
|
|
1451
|
+
Ze as CAMERA_PERMISSION_MESSAGES,
|
|
1452
|
+
os as CameraPermissionGate,
|
|
1453
|
+
Rn as DEFAULT_ASSET_BUDGET_BYTES,
|
|
1454
|
+
an as DEFAULT_MATERIAL_FILL,
|
|
1455
|
+
be as DEFAULT_MESH_RENDERER,
|
|
1456
|
+
gn as DEFAULT_MESH_RENDERER_RENDER_STATE,
|
|
1457
|
+
gs as DEFAULT_PERFORMANCE_BUDGET,
|
|
1458
|
+
ys as DEFAULT_PIXEL_SNAP_INCREMENT,
|
|
1459
|
+
Ss as DEFAULT_QUALITY_TIERS,
|
|
1460
|
+
Ms as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
|
|
1461
|
+
va as DEFAULT_SCREEN_GLASS,
|
|
1462
|
+
nn as DEFAULT_SCREEN_GRADIENT,
|
|
1463
|
+
xa as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
|
|
1464
|
+
ka as DEFAULT_SCREEN_IMAGE_SETTINGS,
|
|
1465
|
+
_a as DEFAULT_SCREEN_SHAPE_SETTINGS,
|
|
1466
|
+
wa as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
|
|
1467
|
+
Pa as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
|
|
1468
|
+
Ts as DEFAULT_SCREEN_TRANSFORM_2D,
|
|
1469
|
+
Es as DEFAULT_SCREEN_TRANSFORM_ROOT,
|
|
1470
|
+
Ie as DEFAULT_TRACKING_CONFIG,
|
|
1471
|
+
re as DEFAULT_TRANSFORM_3D,
|
|
1472
|
+
on as EXTERNAL_BACKGROUND_RENDER_LAYER,
|
|
1473
|
+
pt as FULL_SCREEN_ANCHORS,
|
|
1474
|
+
Xr as HtmlRegion,
|
|
1475
|
+
Ha as LightObject,
|
|
1476
|
+
Ka as LookAt,
|
|
1477
|
+
cn as MAX_RENDER_GROUP_PASSES,
|
|
1478
|
+
ln as MaterialFill,
|
|
1479
|
+
Mn as MeshMaterial,
|
|
1480
|
+
Tt as MeshRenderer,
|
|
1481
|
+
Wr as Model,
|
|
1482
|
+
Br as Object3D,
|
|
1483
|
+
Nr as Panel,
|
|
1484
|
+
Ir as PersonCutout,
|
|
1485
|
+
Da as PinToMesh,
|
|
1486
|
+
ja as RenderGroupLayer,
|
|
1487
|
+
Va as SCREEN_IMAGE_MASK_CHANNELS,
|
|
1488
|
+
en as Scene,
|
|
1489
|
+
Za as SceneObjectRenderer,
|
|
1490
|
+
tn as Scenes,
|
|
1491
|
+
Ua as ScreenGlassMaterial,
|
|
1492
|
+
un as ScreenGradientMaterial,
|
|
1493
|
+
ht as ScreenImage,
|
|
1494
|
+
Na as ScreenShape,
|
|
1495
|
+
Aa as ScreenSpaceUI,
|
|
1496
|
+
Ya as ScreenText,
|
|
1497
|
+
Ye as ScreenTransform,
|
|
1498
|
+
Ja as SequentialRenderPasses,
|
|
1499
|
+
qr as SpriteAnimation,
|
|
1500
|
+
ms as TRACKER_KINDS,
|
|
1501
|
+
oe as TRACKING_CONFIG_STORAGE_KEY,
|
|
1502
|
+
ne as TRACKING_CONFIG_VERSION,
|
|
1503
|
+
Fa as TextLabel,
|
|
1504
|
+
zr as ThemeProvider,
|
|
1505
|
+
Mt as Transform3D,
|
|
1506
|
+
Lr as VideoBackground,
|
|
1507
|
+
An as XRAssetCache,
|
|
1508
|
+
ls as XRAssetCacheProvider,
|
|
1509
|
+
bs as XRMediaSource,
|
|
1510
|
+
x as XRModel,
|
|
1511
|
+
Rs as XRProvider,
|
|
1512
|
+
As as XRQualityController,
|
|
1513
|
+
ba as XRScene,
|
|
1514
|
+
Fs as XR_FALLBACK_MESSAGES,
|
|
1515
|
+
Cs as XR_MODEL_ASSET_URLS,
|
|
1331
1516
|
U as audio,
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1517
|
+
Ve as canPromptForCamera,
|
|
1518
|
+
hr as clearTrackingConfig,
|
|
1519
|
+
vs as clientToScreenPixels,
|
|
1520
|
+
gt as computeContainScale,
|
|
1521
|
+
xs as computeFeedCrop,
|
|
1522
|
+
ks as computeFitLayout,
|
|
1523
|
+
Fn as createAssetCache,
|
|
1524
|
+
_s as createFallbackReason,
|
|
1525
|
+
dn as createTwoStopGradient,
|
|
1526
|
+
jr as dataURLtoFile,
|
|
1527
|
+
xn as defineGltfAsset,
|
|
1528
|
+
kn as defineTextureAsset,
|
|
1529
|
+
_n as defineVideoAsset,
|
|
1530
|
+
ws as detectXRCapabilities,
|
|
1531
|
+
wn as disposeObject3D,
|
|
1532
|
+
Wa as drawNormalizedCrop,
|
|
1533
|
+
fr as enabledModels,
|
|
1534
|
+
Pn as estimateGeometryBytes,
|
|
1535
|
+
Dn as estimateObjectBytes,
|
|
1536
|
+
Un as estimateTextureBytes,
|
|
1537
|
+
Ps as feedSidedName,
|
|
1538
|
+
Ds as feedToScreenPixels,
|
|
1539
|
+
Us as feedToSource,
|
|
1540
|
+
Ns as feedToTracker,
|
|
1541
|
+
Ls as feedToViewport,
|
|
1542
|
+
Is as feedToWorld,
|
|
1543
|
+
cs as findCameraByFacing,
|
|
1544
|
+
De as getDefaultAssetCache,
|
|
1545
|
+
mn as getRenderGroupLayer,
|
|
1546
|
+
Os as isFeedPointInSource,
|
|
1547
|
+
Gs as isMirroredSourceKind,
|
|
1548
|
+
ss as isMuted,
|
|
1549
|
+
is as listCameras,
|
|
1550
|
+
pr as loadTrackingConfig,
|
|
1551
|
+
La as mapScreenImageSettingsToProps,
|
|
1552
|
+
Ia as mapScreenTextInnerShadowToProps,
|
|
1553
|
+
Oa as mapScreenTextSettingsToProps,
|
|
1554
|
+
qs as mediaToScreenPixels,
|
|
1555
|
+
Ga as mergeScreenShapeSettings,
|
|
1556
|
+
zs as mergeScreenTransform2D,
|
|
1557
|
+
ke as mergeTrackingConfig,
|
|
1558
|
+
Ws as mirrorFeedX,
|
|
1559
|
+
yn as normalizeMeshRendererRenderState,
|
|
1560
|
+
qa as normalizeScreenGlass,
|
|
1561
|
+
fn as normalizeScreenGradient,
|
|
1562
|
+
Bs as normalizedToScreenPixels,
|
|
1563
|
+
Xs as normalizedToTransform2DPixels,
|
|
1564
|
+
as as onMuteChange,
|
|
1565
|
+
$s as orientSourcePoint,
|
|
1566
|
+
Hs as orientedSize,
|
|
1567
|
+
Ks as otherSide,
|
|
1568
|
+
Ge as parseTrackingConfig,
|
|
1569
|
+
js as personLeftSign,
|
|
1570
|
+
Vs as personSide,
|
|
1571
|
+
es as playOneShot,
|
|
1572
|
+
Zr as prefetchMusic,
|
|
1573
|
+
He as queryCameraPermission,
|
|
1574
|
+
Yr as registerSound,
|
|
1575
|
+
pn as renderSequentialPasses,
|
|
1576
|
+
Ke as requestCameraAccess,
|
|
1577
|
+
Zs as resolveModelAssetUrl,
|
|
1578
|
+
Ba as resolveNormalizedCrop,
|
|
1579
|
+
Xa as resolvePersonCutoutStatus,
|
|
1580
|
+
Ys as resolveQualityConfig,
|
|
1581
|
+
Js as resolveScreenTransform2D,
|
|
1582
|
+
Qs as resolveTrackerSupport,
|
|
1398
1583
|
W as resolveTrackingConfig,
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1584
|
+
_e as saveTrackingConfig,
|
|
1585
|
+
ea as screenPixelsToClient,
|
|
1586
|
+
ta as screenPixelsToFeed,
|
|
1587
|
+
ra as screenPixelsToMedia,
|
|
1588
|
+
sa as screenPixelsToNormalized,
|
|
1589
|
+
aa as screenPixelsToScreenSpace,
|
|
1590
|
+
na as screenPixelsToUnits,
|
|
1591
|
+
oa as screenPointToRay,
|
|
1592
|
+
ia as screenSpaceToScreenPixels,
|
|
1593
|
+
ca as screenTransform2DScale,
|
|
1594
|
+
la as screenUnitsToPixels,
|
|
1595
|
+
Oe as serializeTrackingConfig,
|
|
1596
|
+
ts as setMuted,
|
|
1597
|
+
ft as shouldDrawFallback,
|
|
1598
|
+
Z as smoothNumber,
|
|
1599
|
+
Dr as smoothVector2,
|
|
1600
|
+
Ur as smoothVector3,
|
|
1601
|
+
ua as sourceToFeed,
|
|
1602
|
+
Jr as startMusic,
|
|
1603
|
+
Qr as stopMusic,
|
|
1604
|
+
je as subscribeCameraPermission,
|
|
1605
|
+
da as swapSidedName,
|
|
1606
|
+
ur as toCameraRequest,
|
|
1607
|
+
mr as toModelOptions,
|
|
1608
|
+
lr as toProviderProps,
|
|
1609
|
+
dr as toTrackerProps,
|
|
1610
|
+
rs as toggleMuted,
|
|
1611
|
+
ma as trackerPointToScreenPixels,
|
|
1612
|
+
fa as trackerToFeed,
|
|
1613
|
+
pa as trackerToWorld,
|
|
1614
|
+
ha as transform2DPixelsToNormalized,
|
|
1615
|
+
tr as useCameraPermission,
|
|
1616
|
+
Kr as useFrameCapture,
|
|
1617
|
+
Hr as useMediaRecorder,
|
|
1618
|
+
ns as useMuted,
|
|
1619
|
+
mt as usePersonMaskTexture,
|
|
1620
|
+
rn as useSceneSample,
|
|
1621
|
+
St as useScreenRectAspect,
|
|
1622
|
+
us as useXRAsset,
|
|
1623
|
+
Le as useXRAssetCache,
|
|
1624
|
+
ds as useXRAssetStats,
|
|
1625
|
+
En as useXRCapabilities,
|
|
1626
|
+
Cn as useXRQuality,
|
|
1627
|
+
fs as useXRTrackingConfig,
|
|
1628
|
+
ga as viewportSizeToTransform2DPixels,
|
|
1629
|
+
ya as viewportToFeed,
|
|
1630
|
+
Sa as worldToFeed,
|
|
1631
|
+
Ma as worldToScreenPixels,
|
|
1632
|
+
Ta as worldToTracker
|
|
1447
1633
|
};
|