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