@vincentt-xr/sdk 2.0.0-alpha.7 → 2.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/GROUNDING.md +1109 -13
  2. package/dist/{DebuggerUI-BjOMr8q_.js → DebuggerUI-C-ldiozL.js} +1 -1
  3. package/dist/{DebuggerUI-B6bP6P9r.cjs → DebuggerUI-CWX5EtQv.cjs} +1 -1
  4. package/dist/FaceMeshRenderer-BEEXZwS6.cjs +158 -0
  5. package/dist/FaceMeshRenderer-UuH5sTXG.js +1322 -0
  6. package/dist/FaceRetouch-C7h7x9kd.js +683 -0
  7. package/dist/FaceRetouch-DqftT26Y.cjs +134 -0
  8. package/dist/GLTFLoader-C5q63sKO.js +1633 -0
  9. package/dist/GLTFLoader-Cb_CRwmG.cjs +1 -0
  10. package/dist/SegmentationOverlay-DQuW3dsc.js +133 -0
  11. package/dist/SegmentationOverlay-aWVod8Kl.cjs +1 -0
  12. package/dist/assets/cache.d.ts +99 -0
  13. package/dist/assets/estimate.d.ts +11 -0
  14. package/dist/assets/index.d.ts +7 -0
  15. package/dist/assets/loaders.d.ts +28 -0
  16. package/dist/assets/react.d.ts +33 -0
  17. package/dist/calibration/calibration.d.ts +70 -0
  18. package/dist/calibration/index.d.ts +6 -0
  19. package/dist/calibration/storage.d.ts +13 -0
  20. package/dist/calibration/types.d.ts +53 -0
  21. package/dist/calibration/useXRCalibration.d.ts +46 -0
  22. package/dist/camera/CameraPermissionGate.d.ts +26 -0
  23. package/dist/camera/devices.d.ts +26 -0
  24. package/dist/camera/index.d.ts +8 -0
  25. package/dist/camera/permission.d.ts +86 -0
  26. package/dist/camera/useCameraPermission.d.ts +35 -0
  27. package/dist/capabilities/detect.d.ts +45 -0
  28. package/dist/capabilities/index.d.ts +5 -0
  29. package/dist/capabilities/types.d.ts +120 -0
  30. package/dist/capabilities/useXRCapabilities.d.ts +18 -0
  31. package/dist/compat/environment.d.ts +5 -0
  32. package/dist/compat/index.d.ts +4 -0
  33. package/dist/compat/run.d.ts +18 -0
  34. package/dist/compat/scenarios.d.ts +10 -0
  35. package/dist/compat/types.d.ts +101 -0
  36. package/dist/components/BodyTracker/index.d.ts +9 -0
  37. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +33 -3
  38. package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +12 -0
  39. package/dist/components/FaceMesh/canonical/shaders.d.ts +1 -1
  40. package/dist/components/FaceMesh/index.d.ts +1 -1
  41. package/dist/components/GestureListener/index.d.ts +11 -0
  42. package/dist/components/HandTracker/index.d.ts +10 -0
  43. package/dist/components/HolisticTracker/index.d.ts +69 -0
  44. package/dist/components/HolisticTracker/settings.d.ts +58 -0
  45. package/dist/components/HolisticTracker/signals.d.ts +49 -0
  46. package/dist/components/IrisEffect/IrisMaterial.d.ts +73 -0
  47. package/dist/components/IrisEffect/index.d.ts +51 -0
  48. package/dist/components/IrisEffect/settings.d.ts +117 -0
  49. package/dist/components/LipEffect/LipEffect.d.ts +7 -1
  50. package/dist/components/LipEffect/LipEffectMaterial.d.ts +43 -7
  51. package/dist/components/LipEffect/LipEffects.d.ts +9 -0
  52. package/dist/components/LipEffect/defaults.d.ts +27 -4
  53. package/dist/components/LipEffect/index.d.ts +11 -3
  54. package/dist/components/LipEffect/settings.d.ts +271 -0
  55. package/dist/components/LipEffect/types.d.ts +56 -9
  56. package/dist/components/LipEffect/useLipDesignTextures.d.ts +11 -0
  57. package/dist/components/LipEffect/uvGuide.d.ts +59 -0
  58. package/dist/components/PersonCutout/index.d.ts +50 -0
  59. package/dist/components/PersonCutout/personCutout.d.ts +16 -0
  60. package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +1 -1
  61. package/dist/components/ScreenImage/index.d.ts +3 -1
  62. package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +1 -1
  63. package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
  64. package/dist/components/ScreenImage/source.d.ts +6 -0
  65. package/dist/components/ScreenImage/types.d.ts +18 -0
  66. package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
  67. package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
  68. package/dist/components/SegmentationOverlay/index.d.ts +9 -0
  69. package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
  70. package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
  71. package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
  72. package/dist/components/XRProvider/index.d.ts +16 -2
  73. package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +1 -1
  74. package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +1 -1
  75. package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +1 -1
  76. package/dist/components/index.d.ts +3 -0
  77. package/dist/constants/index.d.ts +4 -1
  78. package/dist/contexts-CO0sd4JQ.cjs +1 -0
  79. package/dist/{contexts-ByhzppYl.js → contexts-FzlnnMYD.js} +252 -246
  80. package/dist/coordinates/feed.d.ts +52 -0
  81. package/dist/coordinates/index.d.ts +5 -0
  82. package/dist/coordinates/spaces.d.ts +49 -0
  83. package/dist/coordinates/viewport.d.ts +22 -0
  84. package/dist/coordinates/world.d.ts +15 -0
  85. package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
  86. package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
  87. package/dist/debug-ui/index.d.ts +14 -0
  88. package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
  89. package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
  90. package/dist/debug-ui/media-source.cjs +1 -1
  91. package/dist/debug-ui/media-source.js +1 -1
  92. package/dist/debug-ui/product-hotspots/index.d.ts +24 -0
  93. package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
  94. package/dist/debug-ui/xr-diagnostics/index.d.ts +25 -0
  95. package/dist/debug-ui.cjs +3 -3
  96. package/dist/debug-ui.js +2057 -1687
  97. package/dist/detector-K8aej4MB.js +59 -0
  98. package/dist/detector-ijypGtse.cjs +1 -0
  99. package/dist/entries/core.d.ts +18 -1
  100. package/dist/entries/face-effects.d.ts +11 -3
  101. package/dist/entries/low-level.d.ts +22 -3
  102. package/dist/entries/product.d.ts +11 -0
  103. package/dist/entries/tracking.d.ts +24 -1
  104. package/dist/face-effects.cjs +155 -1
  105. package/dist/face-effects.js +1134 -2197
  106. package/dist/gestures/definitions.d.ts +85 -0
  107. package/dist/gestures/detector.d.ts +87 -0
  108. package/dist/gestures/index.d.ts +8 -0
  109. package/dist/gestures/measures.d.ts +101 -0
  110. package/dist/gestures/settings.d.ts +49 -0
  111. package/dist/{getFaceInfo-C4QpCQIY.js → getFaceInfo-BkZfaQs-.js} +5 -5
  112. package/dist/{getFaceInfo-fA1bFBub.cjs → getFaceInfo-ahPxQFGu.cjs} +1 -1
  113. package/dist/hooks/selectors.d.ts +68 -1
  114. package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
  115. package/dist/hooks/useFaceInfo.d.ts +13 -1
  116. package/dist/hooks/useFaceInfos.d.ts +1 -1
  117. package/dist/hooks/useGesture.d.ts +32 -0
  118. package/dist/hooks/useIrisTracking.d.ts +45 -0
  119. package/dist/hooks/useXRDiagnostics.d.ts +81 -0
  120. package/dist/hooks/useXRModel.d.ts +7 -0
  121. package/dist/hooks/useXRSession/facade.d.ts +42 -2
  122. package/dist/hooks/useXRSession/index.d.ts +2 -2
  123. package/dist/hooks/useXRSession/reason.d.ts +3 -1
  124. package/dist/hooks/useXRSession/registry.d.ts +14 -0
  125. package/dist/hooks/useXRSession/store.d.ts +52 -3
  126. package/dist/index--RgGzZ6X.cjs +47 -0
  127. package/dist/{index-VJ0SJwmG.js → index-CHVbH0hz.js} +4 -4
  128. package/dist/index-CeVkgsag.cjs +1 -0
  129. package/dist/index-CnGox6Xr.js +3054 -0
  130. package/dist/{index-ByoNj0QP.js → index-CsUdQ-pn.js} +113 -111
  131. package/dist/{index-BjmTe9eM.cjs → index-DKBAh6hV.cjs} +1 -1
  132. package/dist/index-DsZwTfG0.cjs +1 -0
  133. package/dist/index-Dw6tj2Mi.js +144 -0
  134. package/dist/index-OCPjOaeP.cjs +1 -0
  135. package/dist/{index-DXT3WccE.js → index-s9pF4zkG.js} +1065 -1101
  136. package/dist/internal-BYza1h8_.cjs +1 -0
  137. package/dist/{internal-Dmk1cTXq.js → internal-vsfNQycj.js} +15 -16
  138. package/dist/internal.cjs +1 -1
  139. package/dist/internal.js +2 -2
  140. package/dist/iris/compute.d.ts +25 -0
  141. package/dist/iris/index.d.ts +4 -0
  142. package/dist/iris/lead.d.ts +19 -0
  143. package/dist/iris/types.d.ts +87 -0
  144. package/dist/landmarkMask-CbTFzBYG.js +224 -0
  145. package/dist/landmarkMask-u7es2k4X.cjs +1 -0
  146. package/dist/low-level.cjs +1 -1
  147. package/dist/low-level.js +1085 -634
  148. package/dist/main.cjs +1 -1
  149. package/dist/main.js +1519 -465
  150. package/dist/measures-9dQPdw96.js +154 -0
  151. package/dist/measures-KfJzpvod.cjs +1 -0
  152. package/dist/models/Base/index.d.ts +49 -0
  153. package/dist/models/Body/index.d.ts +1 -1
  154. package/dist/models/Face/index.d.ts +1 -1
  155. package/dist/models/Hand/GestureTracking.d.ts +1 -1
  156. package/dist/models/Hand/HandTracking.d.ts +1 -1
  157. package/dist/models/Holistic/index.d.ts +49 -0
  158. package/dist/models/Holistic/result.d.ts +68 -0
  159. package/dist/models/SemanticSegmentation/index.d.ts +31 -0
  160. package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
  161. package/dist/models/index.d.ts +2 -0
  162. package/dist/product/ProductDimensions.d.ts +16 -0
  163. package/dist/product/ProductHotspot.d.ts +16 -0
  164. package/dist/product/ProductViewer.d.ts +9 -0
  165. package/dist/product/details.d.ts +53 -0
  166. package/dist/product/index.d.ts +14 -0
  167. package/dist/product/loadModelViewer.d.ts +4 -0
  168. package/dist/product/types.d.ts +71 -0
  169. package/dist/product/useProductAr.d.ts +37 -0
  170. package/dist/product/useProductDetails.d.ts +60 -0
  171. package/dist/product.cjs +1 -0
  172. package/dist/product.js +414 -0
  173. package/dist/providers-C0Dlhh9Z.js +365 -0
  174. package/dist/providers-YNwkmNeK.cjs +62 -0
  175. package/dist/quality/XRQualityController.d.ts +25 -0
  176. package/dist/quality/controller.d.ts +33 -0
  177. package/dist/quality/index.d.ts +6 -0
  178. package/dist/quality/types.d.ts +100 -0
  179. package/dist/quality/useXRQuality.d.ts +28 -0
  180. package/dist/{renderGroups-KZk6eRiY.js → renderGroups-CN1cGFUo.js} +1 -1
  181. package/dist/{renderGroups-80H3DpTl.cjs → renderGroups-O4KmaMl9.cjs} +1 -1
  182. package/dist/renderPasses-Cg-zqmEz.cjs +21 -0
  183. package/dist/renderPasses-NnKZVfBy.js +1460 -0
  184. package/dist/scene-object.cjs +1 -1
  185. package/dist/scene-object.js +2 -2
  186. package/dist/screenTransform-BenfCtZt.js +44 -0
  187. package/dist/screenTransform-BiXdpVf0.cjs +1 -0
  188. package/dist/segmentation-9PhSvc-R.cjs +1 -0
  189. package/dist/segmentation-CeOTKemr.js +5 -0
  190. package/dist/segmentation2d/faceMemory.d.ts +28 -0
  191. package/dist/segmentation2d/faceRegions.d.ts +24 -0
  192. package/dist/segmentation2d/index.d.ts +9 -0
  193. package/dist/segmentation2d/maskUv.d.ts +23 -0
  194. package/dist/segmentation2d/rasterize.d.ts +14 -0
  195. package/dist/segmentation2d/types.d.ts +46 -0
  196. package/dist/selectors-C5G1PMYL.js +195 -0
  197. package/dist/selectors-Du_PsVnW.cjs +1 -0
  198. package/dist/{session-CpkiK5YA.cjs → session-BBr0yN8h.cjs} +7 -7
  199. package/dist/{session-DLFN_VII.js → session-Cy0m7l7-.js} +76 -76
  200. package/dist/settings-DRR7-snV.cjs +1 -0
  201. package/dist/settings-aQk845NJ.js +73 -0
  202. package/dist/subjects/index.d.ts +2 -0
  203. package/dist/subjects/select.d.ts +62 -0
  204. package/dist/subjects/types.d.ts +55 -0
  205. package/dist/tracking-config/apply.d.ts +57 -0
  206. package/dist/tracking-config/index.d.ts +7 -0
  207. package/dist/tracking-config/resolve.d.ts +25 -0
  208. package/dist/tracking-config/storage.d.ts +8 -0
  209. package/dist/tracking-config/types.d.ts +106 -0
  210. package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
  211. package/dist/tracking.cjs +1 -1
  212. package/dist/tracking.js +1056 -383
  213. package/dist/types/compositor.d.ts +21 -0
  214. package/dist/types/holistic.d.ts +121 -0
  215. package/dist/types/index.d.ts +1 -0
  216. package/dist/types/model.d.ts +22 -2
  217. package/dist/types/nodes.d.ts +27 -2
  218. package/dist/types/segmentation.d.ts +19 -0
  219. package/dist/types/session.d.ts +41 -3
  220. package/dist/useFaceInfo-Blf7FCu3.js +303 -0
  221. package/dist/useFaceInfo-C5mO8NQY.cjs +1 -0
  222. package/dist/useXRCapabilities-B1R2ghy-.cjs +1 -0
  223. package/dist/useXRCapabilities-C68v__wB.js +30 -0
  224. package/dist/utils/fns.d.ts +6 -3
  225. package/dist/utils/integrity.d.ts +4 -1
  226. package/dist/utils/updateThrottle.d.ts +2 -0
  227. package/dist/utils/useStableUniforms.d.ts +18 -0
  228. package/docs/api/adaptive-quality.mdx +104 -0
  229. package/docs/api/asset-lifecycle.mdx +78 -0
  230. package/docs/api/camera-permission.mdx +142 -0
  231. package/docs/api/coordinate-spaces.mdx +165 -0
  232. package/docs/api/cross-camera.mdx +88 -0
  233. package/docs/api/diagnostics-calibration.mdx +97 -0
  234. package/docs/api/face-effects.mdx +6 -0
  235. package/docs/api/face-mesh.mdx +4 -2
  236. package/docs/api/gestures.mdx +173 -0
  237. package/docs/api/holistic-tracker.mdx +159 -0
  238. package/docs/api/iris-tracking.mdx +242 -0
  239. package/docs/api/multi-subject.mdx +95 -0
  240. package/docs/api/person-cutout.mdx +136 -0
  241. package/docs/api/product-ar.mdx +111 -0
  242. package/docs/api/product-details.mdx +78 -0
  243. package/docs/api/screen-space-coordinates.mdx +4 -1
  244. package/docs/api/segmentation-overlay.mdx +301 -0
  245. package/docs/api/session-lifecycle.mdx +136 -0
  246. package/docs/api/trackers.mdx +5 -0
  247. package/docs/api/tracking-config.mdx +108 -0
  248. package/docs/docs.json +23 -1
  249. package/docs/examples/lip-shaders.mdx +224 -0
  250. package/docs/guides/lip-effect-textures.mdx +292 -0
  251. package/docs/guides/lip-uv-template.png +0 -0
  252. package/docs/guides/lip-uv-template.svg +1 -0
  253. package/package.json +13 -1
  254. package/dist/FaceMeshRenderer-C5l6VLdO.cjs +0 -155
  255. package/dist/FaceMeshRenderer-wjAHrJzP.js +0 -1270
  256. package/dist/FaceRetouch-BkJzoA79.cjs +0 -134
  257. package/dist/FaceRetouch-DwbKQJAN.js +0 -551
  258. package/dist/contexts-Dr62It_K.cjs +0 -1
  259. package/dist/index-9dlAQAhy.js +0 -1462
  260. package/dist/index-BpEf2BBb.cjs +0 -1
  261. package/dist/index-CyUUurQT.cjs +0 -1
  262. package/dist/index-DCiMbxC3.cjs +0 -1
  263. package/dist/index-DpI-qo5X.cjs +0 -17
  264. package/dist/index-DyVF4vEW.js +0 -111
  265. package/dist/internal-Cq-TEQ5Y.cjs +0 -1
  266. package/dist/renderLayers-lDtL0_43.cjs +0 -1
  267. package/dist/renderLayers-zrK2pv5O.js +0 -13
  268. package/dist/renderPasses-BOoBSr8z.cjs +0 -21
  269. package/dist/renderPasses-BcquyVtu.js +0 -1500
  270. package/dist/selectors-B8H97CKA.js +0 -59
  271. package/dist/selectors-CZLKT2Iv.cjs +0 -1
  272. package/dist/useFaceInfo-BJ8-_MOs.cjs +0 -1
  273. package/dist/useFaceInfo-Dk426LTu.js +0 -62
  274. package/dist/useFaceResults-CtetsO9M.js +0 -19
  275. package/dist/useFaceResults-wBJF3zyp.cjs +0 -1
package/dist/tracking.js CHANGED
@@ -1,20 +1,28 @@
1
- import { u as N, T as O } from "./index-ByoNj0QP.js";
2
- import { d as Ve, c as We, b as qe } from "./index-ByoNj0QP.js";
3
- import { jsx as A, Fragment as J } from "react/jsx-runtime";
4
- import { useThree as C, useFrame as b } from "@react-three/fiber";
5
- import { useRef as R, useMemo as _, useCallback as P, useEffect as L, useState as I } from "react";
6
- import * as U from "three";
7
- import { X as F, u as Q, f as ee } from "./index-9dlAQAhy.js";
8
- import { n as $e, t as Ze } from "./index-9dlAQAhy.js";
9
- import { R as z } from "./renderLayers-zrK2pv5O.js";
10
- import { B as Qe, D as et, F as tt, H as nt, T as rt, g as ot } from "./index-DyVF4vEW.js";
11
- import { u as ut } from "./useFaceResults-CtetsO9M.js";
12
- import { u as te } from "./useFaceInfo-Dk426LTu.js";
13
- import { a as ct } from "./useFaceInfo-Dk426LTu.js";
14
- import { a as T } from "./getFaceInfo-C4QpCQIY.js";
15
- import { D as lt, b as dt, h as ht } from "./getFaceInfo-C4QpCQIY.js";
16
- import { d as ne } from "./drawNormalizedCrop-CRdIDyl1.js";
17
- const re = {
1
+ import { u as U, T as q, r as $e } from "./index-CsUdQ-pn.js";
2
+ import { d as Mr, c as Fr, b as Pr } from "./index-CsUdQ-pn.js";
3
+ import { jsx as b, Fragment as Ze } from "react/jsx-runtime";
4
+ import { useThree as Z, useFrame as D } from "@react-three/fiber";
5
+ import { useRef as g, useMemo as E, useCallback as O, useContext as Qe, useEffect as k, useState as B, createContext as et, useSyncExternalStore as tt } from "react";
6
+ import { X as I, r as L, v as rt, o as Le, i as nt, u as He, p as st } from "./index-CnGox6Xr.js";
7
+ import { y as Br, w as Ur, D as jr, x as Gr, b as Kr, e as zr, n as Wr, t as Xr } from "./index-CnGox6Xr.js";
8
+ import { R as J } from "./selectors-C5G1PMYL.js";
9
+ import { a as ke } from "./segmentation-CeOTKemr.js";
10
+ import { S as Vr } from "./segmentation-CeOTKemr.js";
11
+ import { B as Jr, D as $r, F as Zr, H as Qr, b as en, g as tn } from "./index-Dw6tj2Mi.js";
12
+ import { r as _e, c as me, s as Be, a as ot, g as it } from "./detector-K8aej4MB.js";
13
+ import { D as nn } from "./detector-K8aej4MB.js";
14
+ import { a as A, c as at, b as ct } from "./getFaceInfo-BkZfaQs-.js";
15
+ import { D as on, d as an, h as cn } from "./getFaceInfo-BkZfaQs-.js";
16
+ import { O as ut, m as lt, a as G, b as we, c as K, d as dt, e as ht, f as ft, g as mt } from "./measures-9dQPdw96.js";
17
+ import { u as ln } from "./measures-9dQPdw96.js";
18
+ import { u as pt } from "./useFaceInfo-Blf7FCu3.js";
19
+ import { b as hn, D as fn, E as mn, X as pn, a as gn, f as Tn, j as Sn, s as yn, c as Rn } from "./useFaceInfo-Blf7FCu3.js";
20
+ import { S as bn, u as An } from "./SegmentationOverlay-DQuW3dsc.js";
21
+ import { d as gt } from "./drawNormalizedCrop-CRdIDyl1.js";
22
+ import { b as vn, D as On, G as Ln, H as kn, a as _n, c as wn, p as Dn, d as In, r as Nn, t as Cn } from "./settings-aQk845NJ.js";
23
+ import { h as Fn, i as Pn, P as Hn, e as Bn, f as Un, g as jn } from "./providers-C0Dlhh9Z.js";
24
+ import { D as Kn, f as zn, r as Wn } from "./landmarkMask-CbTFzBYG.js";
25
+ const Ue = {
18
26
  "hand.wrist": 0,
19
27
  "hand.thumbTip": 4,
20
28
  "hand.indexTip": 8,
@@ -26,9 +34,9 @@ const re = {
26
34
  "hand.ringBase": 13,
27
35
  "hand.pinkyBase": 17
28
36
  };
29
- function oe(e, t, r = 0) {
30
- var o;
31
- const n = (o = e == null ? void 0 : e.hands) != null && o.length ? e.hands : e != null && e.coordinates ? [
37
+ function je(e, r, t = 0) {
38
+ var s;
39
+ const n = (s = e == null ? void 0 : e.hands) != null && s.length ? e.hands : e != null && e.coordinates ? [
32
40
  {
33
41
  coordinates: e.coordinates,
34
42
  gesture: e.gesture,
@@ -36,60 +44,55 @@ function oe(e, t, r = 0) {
36
44
  }
37
45
  ] : [];
38
46
  if (n.length) {
39
- if (t) {
40
- const u = n.find((i) => i.handedness === t);
41
- if (u) return u;
47
+ if (r) {
48
+ const o = n.find((a) => a.handedness === r);
49
+ if (o) return o;
42
50
  }
43
- return n[r] ?? n[0];
51
+ return n[t] ?? n[0];
44
52
  }
45
53
  }
46
- const Ne = ({
54
+ const mr = ({
47
55
  children: e,
48
- hand: t,
49
- handIndex: r = 0,
56
+ hand: r,
57
+ handIndex: t = 0,
50
58
  targetFps: n,
51
- active: o = !0
59
+ active: s = !0
52
60
  }) => {
53
- const u = R(null), i = _(
61
+ const o = g(null), a = E(
54
62
  () => n === void 0 ? void 0 : { targetFps: n },
55
63
  [n]
56
- ), { ready: a, node: y } = N(
57
- F.HAND_TRACKER,
58
- i,
59
- o
60
- ), { camera: s } = C(), c = R(s);
61
- c.current !== s && (c.current = s);
62
- const l = R(null);
63
- b(() => {
64
- var m;
65
- if (!a || !y || !u.current) return;
66
- const g = oe(y, t, r);
67
- l.current = g ?? null;
68
- const d = (m = g == null ? void 0 : g.coordinates) == null ? void 0 : m[0];
69
- if (!d) {
70
- u.current.visible = !1;
64
+ ), { ready: i, node: u } = U(
65
+ I.HAND_TRACKER,
66
+ a,
67
+ s
68
+ ), { camera: c } = Z(), h = g(c);
69
+ h.current !== c && (h.current = c);
70
+ const d = g(null);
71
+ D(() => {
72
+ var l;
73
+ if (!i || !u || !o.current) return;
74
+ const S = je(u, r, t);
75
+ d.current = S ?? null;
76
+ const T = (l = S == null ? void 0 : S.coordinates) == null ? void 0 : l[0];
77
+ if (!T) {
78
+ o.current.visible = !1;
71
79
  return;
72
80
  }
73
- const p = K(d, c.current);
74
- u.current.visible = !0, u.current.position.copy(p);
81
+ const y = L(T, h.current);
82
+ o.current.visible = !0, o.current.position.copy(y);
75
83
  });
76
- const f = P((g) => {
77
- var m, E;
78
- const d = re[g];
79
- if (d === void 0) return null;
80
- const p = (E = (m = l.current) == null ? void 0 : m.coordinates) == null ? void 0 : E[d];
81
- return p ? { position: K(p, c.current) } : null;
82
- }, []), h = _(
83
- () => ({ type: "hand", resolveLandmark: f }),
84
- [f]
84
+ const m = O((S) => {
85
+ var l, p;
86
+ const T = Ue[S];
87
+ if (T === void 0) return null;
88
+ const y = (p = (l = d.current) == null ? void 0 : l.coordinates) == null ? void 0 : p[T];
89
+ return y ? { position: L(y, h.current) } : null;
90
+ }, []), f = E(
91
+ () => ({ type: "hand", resolveLandmark: m }),
92
+ [m]
85
93
  );
86
- return /* @__PURE__ */ A(O.Provider, { value: h, children: /* @__PURE__ */ A("group", { ref: u, renderOrder: z.TRACKED, children: e }) });
87
- }, K = (e, t) => {
88
- const r = new U.Vector3(e.x, e.y, e.z);
89
- r.unproject(t);
90
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
91
- return t.position.clone().add(n.multiplyScalar(o));
92
- }, se = {
94
+ return /* @__PURE__ */ b(q.Provider, { value: f, children: /* @__PURE__ */ b("group", { ref: o, renderOrder: J.TRACKED, children: e }) });
95
+ }, Tt = {
93
96
  "hand.wrist": 0,
94
97
  "hand.thumbTip": 4,
95
98
  "hand.indexTip": 8,
@@ -100,46 +103,41 @@ const Ne = ({
100
103
  "hand.middleBase": 9,
101
104
  "hand.ringBase": 13,
102
105
  "hand.pinkyBase": 17
103
- }, Fe = ({ children: e, targetFps: t, active: r = !0 }) => {
104
- const n = R(null), o = _(
105
- () => t === void 0 ? void 0 : { targetFps: t },
106
- [t]
107
- ), { ready: u, node: i } = N(
108
- F.GESTURE_TRACKER,
109
- o,
110
- r
111
- ), { camera: a } = C(), y = R(a);
112
- y.current !== a && (y.current = a);
113
- const s = R(null);
114
- b(() => {
115
- var g;
116
- if (!u || !i || !n.current) return;
117
- s.current = i;
118
- const f = (g = i == null ? void 0 : i.coordinates) == null ? void 0 : g[0];
119
- if (!f) {
106
+ }, pr = ({ children: e, targetFps: r, active: t = !0 }) => {
107
+ const n = g(null), s = E(
108
+ () => r === void 0 ? void 0 : { targetFps: r },
109
+ [r]
110
+ ), { ready: o, node: a } = U(
111
+ I.GESTURE_TRACKER,
112
+ s,
113
+ t
114
+ ), { camera: i } = Z(), u = g(i);
115
+ u.current !== i && (u.current = i);
116
+ const c = g(null);
117
+ D(() => {
118
+ var S;
119
+ if (!o || !a || !n.current) return;
120
+ c.current = a;
121
+ const m = (S = a == null ? void 0 : a.coordinates) == null ? void 0 : S[0];
122
+ if (!m) {
120
123
  n.current.visible = !1;
121
124
  return;
122
125
  }
123
- const h = G(f, y.current);
124
- n.current.visible = !0, n.current.position.copy(h);
126
+ const f = L(m, u.current);
127
+ n.current.visible = !0, n.current.position.copy(f);
125
128
  });
126
- const c = P((f) => {
127
- var d, p;
128
- const h = se[f];
129
- if (h === void 0) return null;
130
- const g = (p = (d = s.current) == null ? void 0 : d.coordinates) == null ? void 0 : p[h];
131
- return g ? { position: G(g, y.current) } : null;
132
- }, []), l = _(
133
- () => ({ type: "hand", resolveLandmark: c }),
134
- [c]
129
+ const h = O((m) => {
130
+ var T, y;
131
+ const f = Tt[m];
132
+ if (f === void 0) return null;
133
+ const S = (y = (T = c.current) == null ? void 0 : T.coordinates) == null ? void 0 : y[f];
134
+ return S ? { position: L(S, u.current) } : null;
135
+ }, []), d = E(
136
+ () => ({ type: "hand", resolveLandmark: h }),
137
+ [h]
135
138
  );
136
- return /* @__PURE__ */ A(O.Provider, { value: l, children: /* @__PURE__ */ A("group", { ref: n, renderOrder: z.TRACKED, children: e }) });
137
- }, G = (e, t) => {
138
- const r = new U.Vector3(e.x, e.y, e.z);
139
- r.unproject(t);
140
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
141
- return t.position.clone().add(n.multiplyScalar(o));
142
- }, ue = {
139
+ return /* @__PURE__ */ b(q.Provider, { value: d, children: /* @__PURE__ */ b("group", { ref: n, renderOrder: J.TRACKED, children: e }) });
140
+ }, Ge = {
143
141
  "body.head": 0,
144
142
  "body.leftShoulder": 11,
145
143
  "body.rightShoulder": 12,
@@ -153,150 +151,321 @@ const Ne = ({
153
151
  "body.rightKnee": 26,
154
152
  "body.leftAnkle": 27,
155
153
  "body.rightAnkle": 28
156
- }, Me = ({ bodyIndex: e = 0, active: t = !0, children: r }) => {
157
- const n = R(null), { ready: o, node: u } = N(
158
- F.BODY_TRACKER,
154
+ }, gr = ({ bodyIndex: e = 0, active: r = !0, children: t }) => {
155
+ const n = g(null), { ready: s, node: o } = U(
156
+ I.BODY_TRACKER,
159
157
  void 0,
160
- t
161
- ), { camera: i } = C(), a = R(i);
162
- a.current !== i && (a.current = i);
163
- const y = R(null);
164
- b(() => {
165
- if (!o || !u || !n.current) return;
166
- const l = u;
167
- y.current = l;
168
- const f = l.getLandmarks2D(e), h = f == null ? void 0 : f[0];
169
- if (!h) {
158
+ r
159
+ ), { camera: a } = Z(), i = g(a);
160
+ i.current !== a && (i.current = a);
161
+ const u = g(null);
162
+ D(() => {
163
+ if (!s || !o || !n.current) return;
164
+ const d = o;
165
+ u.current = d;
166
+ const m = d.getLandmarks2D(e), f = m == null ? void 0 : m[0];
167
+ if (!f) {
170
168
  n.current.visible = !1;
171
169
  return;
172
170
  }
173
- const g = B(h, a.current);
174
- n.current.visible = !0, n.current.position.copy(g);
171
+ const S = L(f, i.current);
172
+ n.current.visible = !0, n.current.position.copy(S);
175
173
  });
176
- const s = P(
177
- (l) => {
178
- const f = y.current;
174
+ const c = O(
175
+ (d) => {
176
+ const m = u.current;
177
+ if (!m) return null;
178
+ const f = m.getLandmarks2D(e);
179
179
  if (!f) return null;
180
- const h = f.getLandmarks2D(e);
181
- if (!h) return null;
182
- if (l === "body.neck") {
183
- const p = h[11], m = h[12];
184
- if (!p || !m) return null;
185
- const E = {
186
- x: (p.x + m.x) / 2,
187
- y: (p.y + m.y) / 2,
188
- z: (p.z + m.z) / 2
180
+ if (d === "body.neck") {
181
+ const y = f[11], l = f[12];
182
+ if (!y || !l) return null;
183
+ const p = {
184
+ x: (y.x + l.x) / 2,
185
+ y: (y.y + l.y) / 2,
186
+ z: (y.z + l.z) / 2
189
187
  };
190
- return { position: B(E, a.current) };
188
+ return { position: L(p, i.current) };
191
189
  }
192
- const g = ue[l];
193
- if (g === void 0) return null;
194
- const d = h[g];
195
- return d ? { position: B(d, a.current) } : null;
190
+ const S = Ge[d];
191
+ if (S === void 0) return null;
192
+ const T = f[S];
193
+ return T ? { position: L(T, i.current) } : null;
194
+ },
195
+ [e]
196
+ ), h = E(
197
+ () => ({ type: "body", resolveLandmark: c }),
198
+ [c]
199
+ );
200
+ return /* @__PURE__ */ b(q.Provider, { value: h, children: /* @__PURE__ */ b("group", { ref: n, renderOrder: J.TRACKED, children: t }) });
201
+ }, te = { leftShoulder: 11, rightShoulder: 12, leftWrist: 15, rightWrist: 16 }, St = 0, yt = [
202
+ [5, 8],
203
+ [9, 12],
204
+ [13, 16],
205
+ [17, 20]
206
+ ], pe = {
207
+ smile: 0.3,
208
+ mouthOpen: 0.25,
209
+ minVisibility: 0.5,
210
+ fingerExtension: 1.25
211
+ }, Rt = () => ({
212
+ facePresent: !1,
213
+ leftHandPresent: !1,
214
+ rightHandPresent: !1,
215
+ posePresent: !1,
216
+ smile: 0,
217
+ mouthOpen: 0,
218
+ smiling: !1,
219
+ mouthIsOpen: !1,
220
+ leftHandRaised: !1,
221
+ rightHandRaised: !1,
222
+ leftPalmOpen: !1,
223
+ rightPalmOpen: !1,
224
+ greeting: null
225
+ }), De = (e, r) => Math.hypot(e.x - r.x, e.y - r.y), Ie = (e, r = pe.fingerExtension) => {
226
+ if (!e || e.landmarks.length < 21) return !1;
227
+ const t = e.landmarks[St];
228
+ let n = 0;
229
+ for (const [s, o] of yt) {
230
+ const a = De(e.landmarks[s], t), i = De(e.landmarks[o], t);
231
+ a > 0 && i >= a * r && (n += 1);
232
+ }
233
+ return n >= 3;
234
+ }, Ne = (e, r, t = pe.minVisibility) => {
235
+ const { pose: n } = e;
236
+ if (!n || n.landmarks.length < 33) return !1;
237
+ const s = r === "left" ? te.leftWrist : te.rightWrist, o = r === "left" ? te.leftShoulder : te.rightShoulder;
238
+ return n.visibility[s] < t || n.visibility[o] < t ? !1 : n.landmarks[s].y > n.landmarks[o].y;
239
+ }, Tr = (e, r = {}, t = Rt()) => {
240
+ const n = { ...pe, ...r }, { face: s, leftHand: o, rightHand: a, pose: i } = e;
241
+ t.facePresent = s !== null, t.leftHandPresent = o !== null, t.rightHandPresent = a !== null, t.posePresent = i !== null;
242
+ const u = s == null ? void 0 : s.blendshapes;
243
+ return t.smile = u ? ((u.mouthSmileLeft ?? 0) + (u.mouthSmileRight ?? 0)) / 2 : 0, t.mouthOpen = (u == null ? void 0 : u.jawOpen) ?? 0, t.smiling = s !== null && t.smile >= n.smile, t.mouthIsOpen = s !== null && t.mouthOpen >= n.mouthOpen, t.leftHandRaised = Ne(e, "left", n.minVisibility), t.rightHandRaised = Ne(e, "right", n.minVisibility), t.leftPalmOpen = Ie(o, n.fingerExtension), t.rightPalmOpen = Ie(a, n.fingerExtension), t.smiling && t.rightHandRaised && t.rightPalmOpen ? t.greeting = "right" : t.smiling && t.leftHandRaised && t.leftPalmOpen ? t.greeting = "left" : t.greeting = null, t;
244
+ }, Et = {
245
+ node: null,
246
+ ready: !1,
247
+ status: "loading",
248
+ error: null
249
+ }, Ke = et(null), bt = () => Qe(Ke) ?? Et, Ce = (e, r) => r ? "error" : e ? e.getStatus() : "loading", At = ({
250
+ children: e,
251
+ active: r = !0,
252
+ onStatusChange: t,
253
+ modelUrl: n,
254
+ delegate: s,
255
+ minFaceDetectionConfidence: o,
256
+ minFacePresenceConfidence: a,
257
+ minPoseDetectionConfidence: i,
258
+ minPosePresenceConfidence: u,
259
+ minHandLandmarksConfidence: c,
260
+ outputFaceBlendshapes: h,
261
+ targetFps: d,
262
+ hands: m,
263
+ analysisMaxDimension: f,
264
+ holdMs: S,
265
+ predictMs: T
266
+ }) => {
267
+ const y = E(() => {
268
+ const R = {};
269
+ return n !== void 0 && (R.modelUrl = n), s !== void 0 && (R.delegate = s), o !== void 0 && (R.minFaceDetectionConfidence = o), a !== void 0 && (R.minFacePresenceConfidence = a), i !== void 0 && (R.minPoseDetectionConfidence = i), u !== void 0 && (R.minPosePresenceConfidence = u), c !== void 0 && (R.minHandLandmarksConfidence = c), h !== void 0 && (R.outputFaceBlendshapes = h), d !== void 0 && (R.targetFps = d), Object.keys(R).length > 0 ? R : void 0;
270
+ }, [
271
+ s,
272
+ o,
273
+ a,
274
+ c,
275
+ i,
276
+ u,
277
+ n,
278
+ h,
279
+ d
280
+ ]), { ready: l, node: p, error: _ } = U(
281
+ I.HOLISTIC_TRACKER,
282
+ y,
283
+ r
284
+ );
285
+ k(() => {
286
+ p && p.setOptions(
287
+ rt({ hands: m, analysisMaxDimension: f, holdMs: S, predictMs: T })
288
+ );
289
+ }, [p, m, f, S, T]);
290
+ const [x, N] = B(() => Ce(p, _)), F = g(x), C = g(t);
291
+ C.current = t, D(() => {
292
+ var j;
293
+ const R = Ce(p, _);
294
+ R !== F.current && (F.current = R, N(R), (j = C.current) == null || j.call(C, R, _ ?? (p == null ? void 0 : p.getError()) ?? null));
295
+ });
296
+ const Q = E(
297
+ () => ({
298
+ node: p,
299
+ ready: l && x === "ready",
300
+ status: x,
301
+ error: _ ?? (p == null ? void 0 : p.getError()) ?? null
302
+ }),
303
+ [p, l, x, _]
304
+ );
305
+ return /* @__PURE__ */ b(Ke.Provider, { value: Q, children: e });
306
+ }, xt = () => {
307
+ const { camera: e } = Z(), r = g(e);
308
+ return r.current !== e && (r.current = e), r;
309
+ }, ge = (e, r) => {
310
+ const t = g(null), { node: n, ready: s } = bt(), o = xt();
311
+ return D(() => {
312
+ const a = t.current;
313
+ if (!a) return;
314
+ const i = s && n ? e(n.getResult()) : null;
315
+ if (!i) {
316
+ a.visible = !1;
317
+ return;
318
+ }
319
+ a.visible = !0, a.position.copy(r(i, o.current));
320
+ }), { groupRef: t, cameraRef: o, node: n };
321
+ }, ze = ({ children: e }) => {
322
+ const r = g({ x: 0, y: 0, z: 0, visibility: 0 }), { groupRef: t, cameraRef: n, node: s } = ge(
323
+ (i) => {
324
+ var u;
325
+ return ((u = i.face) == null ? void 0 : u.landmarks[4]) ?? null;
326
+ },
327
+ (i, u) => Le(i, u)
328
+ ), o = O(
329
+ (i, u) => {
330
+ var d;
331
+ const c = (d = s == null ? void 0 : s.getResult().face) == null ? void 0 : d.landmarks;
332
+ if (!c || c.length === 0) return null;
333
+ const h = $e(
334
+ i,
335
+ c,
336
+ u,
337
+ r.current
338
+ );
339
+ return h ? { position: Le(h, n.current) } : null;
196
340
  },
341
+ [n, s]
342
+ ), a = E(
343
+ () => ({ type: "face", resolveLandmark: o }),
344
+ [o]
345
+ );
346
+ return /* @__PURE__ */ b(q.Provider, { value: a, children: /* @__PURE__ */ b("group", { ref: t, renderOrder: J.TRACKED, visible: !1, children: e }) });
347
+ };
348
+ ze.displayName = "HolisticTracker.Face";
349
+ const We = ({ hand: e, children: r }) => {
350
+ const t = O(
351
+ (u) => e === "left" ? u.leftHand : u.rightHand,
197
352
  [e]
198
- ), c = _(
353
+ ), { groupRef: n, cameraRef: s, node: o } = ge(
354
+ (u) => {
355
+ var c;
356
+ return ((c = t(u)) == null ? void 0 : c.landmarks[0]) ?? null;
357
+ },
358
+ L
359
+ ), a = O(
360
+ (u) => {
361
+ var d;
362
+ const c = Ue[u];
363
+ if (c === void 0 || !o) return null;
364
+ const h = (d = t(o.getResult())) == null ? void 0 : d.landmarks[c];
365
+ return h ? { position: L(h, s.current) } : null;
366
+ },
367
+ [s, o, t]
368
+ ), i = E(
369
+ () => ({ type: "hand", resolveLandmark: a }),
370
+ [a]
371
+ );
372
+ return /* @__PURE__ */ b(q.Provider, { value: i, children: /* @__PURE__ */ b("group", { ref: n, renderOrder: J.TRACKED, visible: !1, children: r }) });
373
+ };
374
+ We.displayName = "HolisticTracker.Hand";
375
+ const Xe = ({ children: e }) => {
376
+ const { groupRef: r, cameraRef: t, node: n } = ge(
377
+ (a) => {
378
+ var i;
379
+ return ((i = a.pose) == null ? void 0 : i.landmarks[0]) ?? null;
380
+ },
381
+ L
382
+ ), s = O(
383
+ (a) => {
384
+ var h;
385
+ const i = (h = n == null ? void 0 : n.getResult().pose) == null ? void 0 : h.landmarks;
386
+ if (!i) return null;
387
+ if (a === "body.neck") {
388
+ const d = i[11], m = i[12];
389
+ if (!d || !m) return null;
390
+ const f = { x: (d.x + m.x) / 2, y: (d.y + m.y) / 2, z: (d.z + m.z) / 2 };
391
+ return { position: L(f, t.current) };
392
+ }
393
+ const u = Ge[a];
394
+ if (u === void 0) return null;
395
+ const c = i[u];
396
+ return c ? { position: L(c, t.current) } : null;
397
+ },
398
+ [t, n]
399
+ ), o = E(
199
400
  () => ({ type: "body", resolveLandmark: s }),
200
401
  [s]
201
402
  );
202
- return /* @__PURE__ */ A(O.Provider, { value: c, children: /* @__PURE__ */ A("group", { ref: n, renderOrder: z.TRACKED, children: r }) });
203
- }, B = (e, t) => {
204
- const r = new U.Vector3(e.x, e.y, e.z);
205
- r.unproject(t);
206
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
207
- return t.position.clone().add(n.multiplyScalar(o));
208
- }, X = ["portrait"], Be = ({ type: e, active: t = !0, children: r }) => (N(F.BACKGROUND_SEGMENTATION, { type: e }, t), L(() => {
209
- X.includes(e) || console.warn(
210
- `[Segmentation] unsupported type "${e}"; valid values: ${X.join(", ")}`
403
+ return /* @__PURE__ */ b(q.Provider, { value: o, children: /* @__PURE__ */ b("group", { ref: r, renderOrder: J.TRACKED, visible: !1, children: e }) });
404
+ };
405
+ Xe.displayName = "HolisticTracker.Body";
406
+ const Te = At;
407
+ Te.Face = ze;
408
+ Te.Hand = We;
409
+ Te.Body = Xe;
410
+ const Sr = ({ type: e, active: r = !0, children: t }) => (U(I.BACKGROUND_SEGMENTATION, { type: e }, r), k(() => {
411
+ ke.includes(e) || console.warn(
412
+ `[Segmentation] unsupported type "${e}"; valid values: ${ke.join(", ")}`
211
413
  );
212
- }, [e]), /* @__PURE__ */ A(J, { children: r })), ie = 800, ce = 200, ae = () => ({
414
+ }, [e]), /* @__PURE__ */ b(Ze, { children: t })), vt = 800, Ot = 200, Lt = () => ({
213
415
  armed: !1,
214
416
  armStart: null,
215
417
  holdStart: null,
216
418
  fired: !1
217
- }), le = (e, {
218
- isTrigger: t,
219
- gesture: r,
419
+ }), kt = (e, {
420
+ isTrigger: r,
421
+ gesture: t,
220
422
  now: n,
221
- mode: o,
222
- debounceMs: u,
223
- holdMs: i
423
+ mode: s,
424
+ debounceMs: o,
425
+ holdMs: a
224
426
  }) => {
225
427
  if (e.fired) return null;
226
- if (o === "hold") {
227
- if (t && r) {
228
- if (e.holdStart === null && (e.holdStart = n), n - e.holdStart >= i)
229
- return e.fired = !0, r;
428
+ if (s === "hold") {
429
+ if (r && t) {
430
+ if (e.holdStart === null && (e.holdStart = n), n - e.holdStart >= a)
431
+ return e.fired = !0, t;
230
432
  } else
231
433
  e.holdStart = null;
232
434
  return null;
233
435
  }
234
- return e.armed ? t && r ? (e.fired = !0, r) : null : (t ? e.armStart = null : (e.armStart === null && (e.armStart = n), n - e.armStart >= u && (e.armed = !0)), null);
436
+ return e.armed ? r && t ? (e.fired = !0, t) : null : (r ? e.armStart = null : (e.armStart === null && (e.armStart = n), n - e.armStart >= o && (e.armed = !0)), null);
235
437
  };
236
- function de({
438
+ function _t({
237
439
  gestures: e,
238
- mode: t = "arm",
239
- debounceMs: r = ie,
240
- holdMs: n = ce,
241
- onTrigger: o,
242
- enabled: u = !0
440
+ mode: r = "arm",
441
+ debounceMs: t = vt,
442
+ holdMs: n = Ot,
443
+ onTrigger: s,
444
+ enabled: o = !0
243
445
  }) {
244
- const { ready: i, node: a } = N(F.GESTURE_TRACKER), y = R(o);
245
- L(() => {
246
- y.current = o;
247
- }, [o]);
248
- const s = R(/* @__PURE__ */ new Set());
249
- L(() => {
250
- s.current = new Set(Array.isArray(e) ? e : [e]);
446
+ const { ready: a, node: i } = U(I.GESTURE_TRACKER), u = g(s);
447
+ k(() => {
448
+ u.current = s;
449
+ }, [s]);
450
+ const c = g(/* @__PURE__ */ new Set());
451
+ k(() => {
452
+ c.current = new Set(Array.isArray(e) ? e : [e]);
251
453
  }, [e]);
252
- const c = R(ae());
253
- b(() => {
254
- if (!u || !i || !a) return;
255
- const l = a.gesture, f = !!(l && s.current.has(l)), h = le(c.current, {
256
- isTrigger: f,
257
- gesture: l,
454
+ const h = g(Lt());
455
+ D(() => {
456
+ if (!o || !a || !i) return;
457
+ const d = i.gesture, m = !!(d && c.current.has(d)), f = kt(h.current, {
458
+ isTrigger: m,
459
+ gesture: d,
258
460
  now: performance.now(),
259
- mode: t,
260
- debounceMs: r,
461
+ mode: r,
462
+ debounceMs: t,
261
463
  holdMs: n
262
464
  });
263
- h && y.current(h);
465
+ f && u.current(f);
264
466
  });
265
467
  }
266
- const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "end" : t ? "stay" : "none", fe = {
267
- face: null,
268
- faces: [],
269
- faceCount: 0,
270
- detected: !1,
271
- justDetected: !1,
272
- justLost: !1,
273
- phase: "none"
274
- }, Oe = ({
275
- faceIndex: e = 0,
276
- numFaces: t,
277
- ...r
278
- } = {}) => {
279
- const n = Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0, o = te({
280
- ...r,
281
- numFaces: Math.max(t ?? n + 1, n + 1)
282
- }), u = R([]), i = R(n), a = R({ detected: !1, faceIndex: n }), [y, s] = I(fe), c = R(y);
283
- return L(() => {
284
- u.current = o, i.current = n;
285
- }, [o, n]), b(() => {
286
- const l = u.current, f = i.current, h = l[f] ?? null, g = !!h, d = a.current.faceIndex === f && a.current.detected, p = he(d, g);
287
- a.current = { detected: g, faceIndex: f };
288
- const m = {
289
- face: h,
290
- faces: l,
291
- faceCount: l.length,
292
- detected: g,
293
- justDetected: p === "begin",
294
- justLost: p === "end",
295
- phase: p
296
- }, E = c.current;
297
- E.face === m.face && E.faces === m.faces && E.faceCount === m.faceCount && E.detected === m.detected && E.justDetected === m.justDetected && E.justLost === m.justLost && E.phase === m.phase || (c.current = m, s(m));
298
- }), y;
299
- }, Ce = [
468
+ const yr = (e) => (_t(e), null), Rr = [
300
469
  "_neutral",
301
470
  "browDownLeft",
302
471
  "browDownRight",
@@ -349,13 +518,13 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
349
518
  "mouthUpperUpRight",
350
519
  "noseSneerLeft",
351
520
  "noseSneerRight"
352
- ], pe = ({
521
+ ], wt = ({
353
522
  source: e,
354
- face: t,
355
- canvas: r,
523
+ face: r,
524
+ canvas: t,
356
525
  outputSize: n,
357
- padding: o = 0.2
358
- }) => ne({ source: e, bounds: t.bounds, canvas: r, outputSize: n, padding: o }), Pe = [
526
+ padding: s = 0.2
527
+ }) => gt({ source: e, bounds: r.bounds, canvas: t, outputSize: n, padding: s }), Er = [
359
528
  "browRaise",
360
529
  "eyeBlink",
361
530
  "eyeBlinkLeft",
@@ -369,86 +538,86 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
369
538
  "mouthPout",
370
539
  "headTiltLeft",
371
540
  "headTiltRight"
372
- ], S = (e = 0.5) => ({
541
+ ], H = (e = 0.5) => ({
373
542
  threshold: e,
374
543
  releaseThreshold: Math.max(0, e - 0.15),
375
544
  holdMs: 50
376
- }), w = {
545
+ }), z = {
377
546
  threshold: Math.PI / 18,
378
547
  releaseThreshold: Math.PI / 30,
379
548
  holdMs: 80
380
- }, me = {
381
- browRaise: S(0.45),
382
- eyeBlink: S(0.55),
383
- eyeBlinkLeft: S(0.55),
384
- eyeBlinkRight: S(0.55),
385
- eyeBlinkEither: S(0.55),
386
- headUp: w,
387
- headDown: w,
388
- headTurnLeft: w,
389
- headTurnRight: w,
390
- mouthOpen: S(0.45),
391
- mouthPout: S(0.5),
392
- headTiltLeft: w,
393
- headTiltRight: w
394
- }, x = (e) => Math.max(0, e), v = (e, t) => e !== void 0 && Number.isFinite(e) ? e : t, q = (e, t = {}) => {
395
- const r = me[e], n = Math.max(0, v(t.threshold, r.threshold));
549
+ }, Dt = {
550
+ browRaise: H(0.45),
551
+ eyeBlink: H(0.55),
552
+ eyeBlinkLeft: H(0.55),
553
+ eyeBlinkRight: H(0.55),
554
+ eyeBlinkEither: H(0.55),
555
+ headUp: z,
556
+ headDown: z,
557
+ headTurnLeft: z,
558
+ headTurnRight: z,
559
+ mouthOpen: H(0.45),
560
+ mouthPout: H(0.5),
561
+ headTiltLeft: z,
562
+ headTiltRight: z
563
+ }, W = (e) => Math.max(0, e), Y = (e, r) => e !== void 0 && Number.isFinite(e) ? e : r, Ye = (e, r = {}) => {
564
+ const t = Dt[e], n = Math.max(0, Y(r.threshold, t.threshold));
396
565
  return {
397
566
  threshold: n,
398
567
  releaseThreshold: Math.min(
399
568
  n,
400
- Math.max(0, v(t.releaseThreshold, r.releaseThreshold))
569
+ Math.max(0, Y(r.releaseThreshold, t.releaseThreshold))
401
570
  ),
402
- holdMs: Math.max(0, v(t.holdMs, r.holdMs))
571
+ holdMs: Math.max(0, Y(r.holdMs, t.holdMs))
403
572
  };
404
- }, H = (e, t, { neutralRotation: r = { x: 0, y: 0, z: 0 } } = {}) => {
405
- const n = v(r.x, 0), o = v(r.y, 0), u = v(r.z, 0);
406
- switch (t) {
573
+ }, V = (e, r, { neutralRotation: t = { x: 0, y: 0, z: 0 } } = {}) => {
574
+ const n = Y(t.x, 0), s = Y(t.y, 0), o = Y(t.z, 0);
575
+ switch (r) {
407
576
  case "browRaise":
408
577
  return Math.max(
409
- T(e, "browInnerUp"),
410
- T(e, "browOuterUpLeft"),
411
- T(e, "browOuterUpRight")
578
+ A(e, "browInnerUp"),
579
+ A(e, "browOuterUpLeft"),
580
+ A(e, "browOuterUpRight")
412
581
  );
413
582
  case "eyeBlink":
414
583
  return Math.min(
415
- T(e, "eyeBlinkLeft"),
416
- T(e, "eyeBlinkRight")
584
+ A(e, "eyeBlinkLeft"),
585
+ A(e, "eyeBlinkRight")
417
586
  );
418
587
  case "eyeBlinkLeft":
419
- return T(e, "eyeBlinkRight");
588
+ return A(e, "eyeBlinkRight");
420
589
  case "eyeBlinkRight":
421
- return T(e, "eyeBlinkLeft");
590
+ return A(e, "eyeBlinkLeft");
422
591
  case "eyeBlinkEither":
423
592
  return Math.max(
424
- T(e, "eyeBlinkLeft"),
425
- T(e, "eyeBlinkRight")
593
+ A(e, "eyeBlinkLeft"),
594
+ A(e, "eyeBlinkRight")
426
595
  );
427
596
  case "mouthOpen":
428
- return T(e, "jawOpen");
597
+ return A(e, "jawOpen");
429
598
  case "mouthPout":
430
- return T(e, "mouthPucker");
599
+ return A(e, "mouthPucker");
431
600
  case "headUp":
432
- return x(e.pose.rotation.x - n);
601
+ return W(e.pose.rotation.x - n);
433
602
  case "headDown":
434
- return x(n - e.pose.rotation.x);
603
+ return W(n - e.pose.rotation.x);
435
604
  case "headTurnLeft":
436
- return x(e.pose.rotation.y - o);
605
+ return W(e.pose.rotation.y - s);
437
606
  case "headTurnRight":
438
- return x(o - e.pose.rotation.y);
607
+ return W(s - e.pose.rotation.y);
439
608
  case "headTiltLeft":
440
- return x(e.pose.rotation.z - u);
609
+ return W(e.pose.rotation.z - o);
441
610
  case "headTiltRight":
442
- return x(u - e.pose.rotation.z);
611
+ return W(o - e.pose.rotation.z);
443
612
  }
444
- }, Ie = (e, t, r = {}) => H(e, t, r) >= q(t, r).threshold, Ue = (e, t, r = {}) => {
445
- let n = null, o = 0;
446
- for (const u of e) {
447
- const i = H(u, t, r);
448
- (!n || i > o) && (n = u, o = i);
613
+ }, br = (e, r, t = {}) => V(e, r, t) >= Ye(r, t).threshold, Ar = (e, r, t = {}) => {
614
+ let n = null, s = 0;
615
+ for (const o of e) {
616
+ const a = V(o, r, t);
617
+ (!n || a > s) && (n = o, s = a);
449
618
  }
450
- return { face: n, value: o };
451
- }, V = (e) => ({
619
+ return { face: n, value: s };
620
+ }, Me = (e) => ({
452
621
  action: e,
453
622
  active: !1,
454
623
  value: 0,
@@ -456,54 +625,488 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
456
625
  justEnded: !1,
457
626
  phase: "none",
458
627
  holdStartedAt: null
459
- }), Re = (e, t, r, n, o) => {
460
- const u = e.phase === "begin";
461
- if (e.value = t, e.justStarted = !1, e.justEnded = !1, e.phase = e.active ? "stay" : "none", !n)
628
+ }), It = (e, r, t, n, s) => {
629
+ const o = e.phase === "begin";
630
+ if (e.value = r, e.justStarted = !1, e.justEnded = !1, e.phase = e.active ? "stay" : "none", !n)
462
631
  return e.holdStartedAt = null, e.active && (e.active = !1, e.justEnded = !0, e.phase = "end"), e;
463
632
  if (e.active) {
464
- if (t <= o.releaseThreshold) {
465
- if (u) return e;
633
+ if (r <= s.releaseThreshold) {
634
+ if (o) return e;
466
635
  e.active = !1, e.justEnded = !0, e.phase = "end";
467
636
  }
468
637
  return e;
469
638
  }
470
- return t < o.threshold ? (e.holdStartedAt = null, e) : (e.holdStartedAt === null && (e.holdStartedAt = r), r - e.holdStartedAt >= o.holdMs && (e.active = !0, e.justStarted = !0, e.phase = "begin", e.holdStartedAt = null), e);
471
- }, W = (e) => ({
639
+ return r < s.threshold ? (e.holdStartedAt = null, e) : (e.holdStartedAt === null && (e.holdStartedAt = t), t - e.holdStartedAt >= s.holdMs && (e.active = !0, e.justStarted = !0, e.phase = "begin", e.holdStartedAt = null), e);
640
+ }, se = (e) => ({ value: e, confidence: 1 }), re = (e, r, t, n) => ({
641
+ name: e,
642
+ kind: "face",
643
+ description: r,
644
+ defaults: n,
645
+ measure: (s) => s ? se(t(s)) : null
646
+ }), v = (e, r, t, n) => ({
647
+ name: e,
648
+ kind: "hand",
649
+ description: r,
650
+ defaults: n,
651
+ measure: (s) => s && s.length >= 21 ? se(t(s)) : null
652
+ }), $ = (e, r, t, n) => ({
653
+ name: e,
654
+ kind: "body",
655
+ description: r,
656
+ defaults: n,
657
+ measure: (s) => s && s.length >= 33 ? se(t(s)) : null
658
+ }), le = (e) => () => ({
659
+ tracker: new ut(e),
660
+ wasPresent: !1
661
+ }), de = (e, r, t) => r === null ? (e.wasPresent = !1, null) : (e.wasPresent || e.tracker.reset(), e.wasPresent = !0, se(e.tracker.push(r, t))), he = {
662
+ enterThreshold: 0.99,
663
+ exitThreshold: 0.3,
664
+ cooldownMs: 600
665
+ }, Ve = {
666
+ // ── Face ───────────────────────────────────────────────────────────────
667
+ mouthOpen: re(
668
+ "mouthOpen",
669
+ "Jaw open (blendshape jawOpen).",
670
+ (e) => V(e, "mouthOpen")
671
+ ),
672
+ smile: re(
673
+ "smile",
674
+ "Mean of the two mouthSmile blendshapes.",
675
+ (e) => (A(e, "mouthSmileLeft") + A(e, "mouthSmileRight")) / 2,
676
+ { enterThreshold: 0.4 }
677
+ ),
678
+ blink: re(
679
+ "blink",
680
+ "Both eyes closed (min of the eyeBlink blendshapes).",
681
+ (e) => V(e, "eyeBlink"),
682
+ { enterThreshold: 0.55, holdMs: 50 }
683
+ ),
684
+ browRaise: re(
685
+ "browRaise",
686
+ "Eyebrows raised (max of the brow-up blendshapes).",
687
+ (e) => V(e, "browRaise"),
688
+ { enterThreshold: 0.45 }
689
+ ),
690
+ headNod: {
691
+ name: "headNod",
692
+ kind: "face",
693
+ description: "Pitch oscillation: three turning points of at least 0.12 rad within 1.5 s.",
694
+ defaults: he,
695
+ createMemory: le({ minAmplitude: 0.12, requiredReversals: 3, windowMs: 1500 }),
696
+ measure: (e, r, t) => de(r, e ? e.pose.rotation.x : null, t)
697
+ },
698
+ headShake: {
699
+ name: "headShake",
700
+ kind: "face",
701
+ description: "Yaw oscillation: three turning points of at least 0.15 rad within 1.5 s.",
702
+ defaults: he,
703
+ createMemory: le({ minAmplitude: 0.15, requiredReversals: 3, windowMs: 1500 }),
704
+ measure: (e, r, t) => de(r, e ? e.pose.rotation.y : null, t)
705
+ },
706
+ // ── Hand ───────────────────────────────────────────────────────────────
707
+ pinch: v(
708
+ "pinch",
709
+ "Thumb and index tips touching, relative to palm size.",
710
+ mt,
711
+ {
712
+ enterThreshold: 0.75,
713
+ exitThreshold: 0.5
714
+ }
715
+ ),
716
+ grab: v("grab", "Fist: index to pinky curled toward the wrist.", ft, {
717
+ enterThreshold: 0.7,
718
+ exitThreshold: 0.45
719
+ }),
720
+ openPalm: v("openPalm", "Index to pinky extended.", ht, {
721
+ enterThreshold: 0.7,
722
+ exitThreshold: 0.45
723
+ }),
724
+ handRaised: v(
725
+ "handRaised",
726
+ "Wrist in the upper part of the frame (0 bottom edge, 1 top edge).",
727
+ dt,
728
+ { enterThreshold: 0.7, exitThreshold: 0.6 }
729
+ ),
730
+ // Finger-count signs: each required finger must agree; 1 only when all do.
731
+ oneFinger: v(
732
+ "oneFinger",
733
+ "Index extended, other fingers curled (pointing).",
734
+ (e) => K(e, { fingers: [!0, !1, !1, !1] }),
735
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
736
+ ),
737
+ peaceSign: v(
738
+ "peaceSign",
739
+ "Index and middle extended, ring and pinky curled.",
740
+ (e) => K(e, { fingers: [!0, !0, !1, !1] }),
741
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
742
+ ),
743
+ threeFingers: v(
744
+ "threeFingers",
745
+ "Index, middle and ring extended, pinky curled.",
746
+ (e) => K(e, { fingers: [!0, !0, !0, !1] }),
747
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
748
+ ),
749
+ fourFingers: v(
750
+ "fourFingers",
751
+ "Index to pinky extended, thumb tucked.",
752
+ (e) => K(e, { fingers: [!0, !0, !0, !0], thumb: !1 }),
753
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
754
+ ),
755
+ fist: v(
756
+ "fist",
757
+ "All four fingers curled and the thumb tucked.",
758
+ (e) => K(e, { fingers: [!1, !1, !1, !1], thumb: !1 }),
759
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
760
+ ),
761
+ palm: v(
762
+ "palm",
763
+ "All four fingers extended and the thumb out.",
764
+ (e) => K(e, { fingers: [!0, !0, !0, !0], thumb: !0 }),
765
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
766
+ ),
767
+ thumbUp: v(
768
+ "thumbUp",
769
+ "Thumb out and pointing up, fingers curled.",
770
+ (e) => we(e, "up"),
771
+ { enterThreshold: 0.6, exitThreshold: 0.4 }
772
+ ),
773
+ thumbDown: v(
774
+ "thumbDown",
775
+ "Thumb out and pointing down, fingers curled.",
776
+ (e) => we(e, "down"),
777
+ { enterThreshold: 0.6, exitThreshold: 0.4 }
778
+ ),
779
+ wave: {
780
+ name: "wave",
781
+ kind: "hand",
782
+ description: "Wrist swinging side to side: three turning points of at least 0.08 within 1.2 s.",
783
+ defaults: he,
784
+ createMemory: le({ minAmplitude: 0.08, requiredReversals: 3, windowMs: 1200 }),
785
+ measure: (e, r, t) => de(r, e && e.length >= 21 ? e[0].x : null, t)
786
+ },
787
+ // ── Body ───────────────────────────────────────────────────────────────
788
+ armRaisedLeft: $(
789
+ "armRaisedLeft",
790
+ "Person's left wrist above the left shoulder, in shoulder widths.",
791
+ (e) => G(e, "left"),
792
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
793
+ ),
794
+ armRaisedRight: $(
795
+ "armRaisedRight",
796
+ "Person's right wrist above the right shoulder, in shoulder widths.",
797
+ (e) => G(e, "right"),
798
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
799
+ ),
800
+ armRaised: $(
801
+ "armRaised",
802
+ "Either wrist above its shoulder.",
803
+ (e) => Math.max(G(e, "left"), G(e, "right")),
804
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
805
+ ),
806
+ bothArmsRaised: $(
807
+ "bothArmsRaised",
808
+ "Both wrists above their shoulders.",
809
+ (e) => Math.min(G(e, "left"), G(e, "right")),
810
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
811
+ ),
812
+ tPose: $("tPose", "Both arms level and outstretched.", lt, {
813
+ enterThreshold: 0.6,
814
+ exitThreshold: 0.4,
815
+ holdMs: 150
816
+ })
817
+ }, xr = Object.keys(Ve), Nt = (e) => typeof e == "string" ? Ve[e] : e, vr = (e) => e, Ct = {
818
+ face: I.FACE_TRACKER,
819
+ hand: I.HAND_TRACKER,
820
+ body: I.BODY_TRACKER
821
+ }, Fe = (e) => Be(me(e)), Mt = (e, r = {}) => {
822
+ var Ae;
823
+ const t = E(() => Nt(e), [e]), {
824
+ active: n = !0,
825
+ faceIndex: s = 0,
826
+ numFaces: o,
827
+ hand: a,
828
+ handIndex: i = 0,
829
+ bodyIndex: u = 0,
830
+ targetFps: c,
831
+ onBegin: h,
832
+ onEnd: d,
833
+ onChange: m,
834
+ ...f
835
+ } = r, S = Ct[t.kind], T = Math.max(o ?? s + 1, s + 1), y = E(() => {
836
+ const w = {};
837
+ return t.kind === "face" && (w.numFaces = T), c !== void 0 && c > 0 && (w.targetFps = c), Object.keys(w).length > 0 ? w : void 0;
838
+ }, [t.kind, T, c]), { node: l, ready: p } = U(S, y, n), { camera: _ } = Z();
839
+ k(() => {
840
+ !l || t.kind !== "face" || l.setCamera(_, s);
841
+ }, [_, t.kind, s, l]);
842
+ const x = E(
843
+ () => _e(
844
+ f,
845
+ _e(t.defaults)
846
+ ),
847
+ // eslint-disable-next-line react-hooks/exhaustive-deps
848
+ [
849
+ t,
850
+ f.enterThreshold,
851
+ f.exitThreshold,
852
+ f.holdMs,
853
+ f.cooldownMs,
854
+ f.minConfidence,
855
+ f.lostGraceMs
856
+ ]
857
+ ), N = g(me(t.name)), F = g((Ae = t.createMemory) == null ? void 0 : Ae.call(t)), C = g(at()), [Q, R] = B(() => Fe(t.name)), j = g(Q);
858
+ k(() => {
859
+ var M;
860
+ N.current = me(t.name), F.current = (M = t.createMemory) == null ? void 0 : M.call(t);
861
+ const w = Fe(t.name);
862
+ j.current = w, R(w);
863
+ }, [t]);
864
+ const Ee = g({ onBegin: h, onEnd: d, onChange: m });
865
+ Ee.current = { onBegin: h, onEnd: d, onChange: m };
866
+ const be = g({ faceIndex: s, hand: a, handIndex: i, bodyIndex: u, active: n });
867
+ return be.current = { faceIndex: s, hand: a, handIndex: i, bodyIndex: u, active: n }, D(() => {
868
+ var Oe;
869
+ const w = performance.now(), M = be.current;
870
+ let xe = null;
871
+ if (M.active && p && l) {
872
+ let ee;
873
+ t.kind === "face" ? ee = ct(l, M.faceIndex, C.current) : t.kind === "hand" ? ee = (Oe = je(
874
+ l,
875
+ M.hand,
876
+ M.handIndex
877
+ )) == null ? void 0 : Oe.coordinates : ee = l.getLandmarks2D(M.bodyIndex), xe = t.measure(ee, F.current, w);
878
+ }
879
+ const ve = ot(N.current, xe, w, x);
880
+ if (it(j.current, ve)) return;
881
+ const P = Be(ve);
882
+ j.current = P, R(P);
883
+ const { onBegin: ae, onEnd: ce, onChange: ue } = Ee.current;
884
+ P.justBegan && (ae == null || ae(P)), P.justEnded && (ce == null || ce(P)), ue == null || ue(P);
885
+ }), Q;
886
+ }, Or = ({ gesture: e, ...r }) => (Mt(e, r), null), Se = 1, ye = Object.freeze({
887
+ version: Se,
888
+ orientation: 0,
889
+ mirrored: "auto",
890
+ scale: 1,
891
+ offset: Object.freeze({ x: 0, y: 0 }),
892
+ face: null,
893
+ body: null,
894
+ updatedAt: 0
895
+ }), Ft = (e = {}) => oe(ye, e, 0), Pt = [0, 90, 180, 270], Ht = (e) => Math.min(4, Math.max(0.25, e)), oe = (e, r, t = Date.now()) => ({
896
+ version: Se,
897
+ orientation: r.orientation !== void 0 && Pt.includes(r.orientation) ? r.orientation : e.orientation,
898
+ mirrored: r.mirrored === !0 || r.mirrored === !1 || r.mirrored === "auto" ? r.mirrored : e.mirrored,
899
+ scale: r.scale !== void 0 && Number.isFinite(r.scale) && r.scale > 0 ? Ht(r.scale) : e.scale,
900
+ offset: r.offset && Number.isFinite(r.offset.x) && Number.isFinite(r.offset.y) ? { x: r.offset.x, y: r.offset.y } : { ...e.offset },
901
+ face: r.face !== void 0 ? r.face : e.face,
902
+ body: r.body !== void 0 ? r.body : e.body,
903
+ updatedAt: t
904
+ }), Bt = (e = Date.now()) => oe(ye, {}, e), Lr = (e) => e.orientation === 0 && e.mirrored === "auto" && e.scale === 1 && e.offset.x === 0 && e.offset.y === 0, Ut = (e, r) => e.mirrored === "auto" ? !1 : e.mirrored !== nt(r), jt = (e, r, t, n = { x: 0, y: 0 }) => {
905
+ let { x: s, y: o } = e;
906
+ switch (r.orientation) {
907
+ case 90:
908
+ [s, o] = [1 - o, s];
909
+ break;
910
+ case 180:
911
+ [s, o] = [1 - s, 1 - o];
912
+ break;
913
+ case 270:
914
+ [s, o] = [o, 1 - s];
915
+ break;
916
+ }
917
+ return Ut(r, t) && (s = 1 - s), s = 0.5 + (s - 0.5) * r.scale + r.offset.x, o = 0.5 + (o - 0.5) * r.scale + r.offset.y, n.x = s, n.y = o, e.z !== void 0 && (n.z = e.z), n;
918
+ }, ne = (e, r) => e && r ? Math.hypot(e.x - r.x, e.y - r.y) : null, Gt = Object.freeze({
919
+ leftTemple: 234,
920
+ rightTemple: 454,
921
+ leftEyeOuter: 33,
922
+ rightEyeOuter: 263
923
+ }), qe = (e, r = Date.now()) => {
924
+ if (!e || e.length < 468) return null;
925
+ const { leftTemple: t, rightTemple: n, leftEyeOuter: s, rightEyeOuter: o } = Gt, a = ne(e[t], e[n]), i = ne(e[s], e[o]);
926
+ return !a || !i ? null : { faceWidth: a, eyeDistance: i, capturedAt: r };
927
+ }, Kt = Object.freeze({
928
+ leftShoulder: 11,
929
+ rightShoulder: 12,
930
+ leftHip: 23,
931
+ rightHip: 24
932
+ }), Je = (e, r = Date.now()) => {
933
+ if (!e || e.length < 33) return null;
934
+ const { leftShoulder: t, rightShoulder: n, leftHip: s, rightHip: o } = Kt, a = ne(e[t], e[n]), i = ne(e[s], e[o]), u = e[t], c = e[n], h = e[s], d = e[o];
935
+ if (!a || !i || !u || !c || !h || !d) return null;
936
+ const m = Math.hypot(
937
+ (u.x + c.x) / 2 - (h.x + d.x) / 2,
938
+ (u.y + c.y) / 2 - (h.y + d.y) / 2
939
+ );
940
+ return { shoulderWidth: a, hipWidth: i, torsoLength: m, capturedAt: r };
941
+ }, zt = (e, r) => {
942
+ const t = r.face, n = qe(e, 0);
943
+ return !t || !n ? null : t.faceWidth > 0 && n.faceWidth > 0 ? n.faceWidth / t.faceWidth : t.eyeDistance > 0 && n.eyeDistance > 0 ? n.eyeDistance / t.eyeDistance : null;
944
+ }, Wt = (e, r) => {
945
+ const t = r.body, n = Je(e, 0);
946
+ return !t || !n || t.shoulderWidth <= 0 ? null : n.shoulderWidth / t.shoulderWidth;
947
+ }, ie = "vincentt.xr.calibration", Re = () => {
948
+ try {
949
+ return typeof localStorage < "u" ? localStorage : null;
950
+ } catch {
951
+ return null;
952
+ }
953
+ }, Xt = (e = ie, r = Re()) => {
954
+ if (!r) return null;
955
+ try {
956
+ const t = r.getItem(e);
957
+ if (!t) return null;
958
+ const n = JSON.parse(t);
959
+ return !n || typeof n != "object" || n.version !== Se ? null : oe(
960
+ ye,
961
+ {
962
+ orientation: n.orientation,
963
+ mirrored: n.mirrored,
964
+ scale: n.scale,
965
+ offset: n.offset,
966
+ face: n.face ?? null,
967
+ body: n.body ?? null
968
+ },
969
+ typeof n.updatedAt == "number" ? n.updatedAt : 0
970
+ );
971
+ } catch {
972
+ return null;
973
+ }
974
+ }, Yt = (e, r = ie, t = Re()) => {
975
+ if (!t) return !1;
976
+ try {
977
+ return t.setItem(r, JSON.stringify(e)), !0;
978
+ } catch {
979
+ return !1;
980
+ }
981
+ }, Vt = (e = ie, r = Re()) => {
982
+ if (r)
983
+ try {
984
+ r.removeItem(e);
985
+ } catch {
986
+ }
987
+ }, kr = (e = {}) => {
988
+ const { storageKey: r = ie, persist: t = !0 } = e, n = e.storage === void 0 ? void 0 : e.storage, s = g(e.initial), { session: o } = He(), a = tt(
989
+ (l) => o.store.subscribe(l),
990
+ () => o.store.getSnapshot().sourceKind,
991
+ () => {
992
+ }
993
+ ), [i, u] = B(
994
+ () => Ft(s.current)
995
+ ), [c, h] = B(!t), d = g(i);
996
+ d.current = i, k(() => {
997
+ if (!t) {
998
+ h(!0);
999
+ return;
1000
+ }
1001
+ const l = Xt(r, n);
1002
+ l && (d.current = l, u(l)), h(!0);
1003
+ }, [t, r, n]);
1004
+ const m = O(
1005
+ (l) => (d.current = l, u(l), t && Yt(l, r, n), l),
1006
+ [t, r, n]
1007
+ ), f = O(
1008
+ (l) => m(oe(d.current, l)),
1009
+ [m]
1010
+ ), S = O(() => {
1011
+ const l = Bt();
1012
+ return d.current = l, u(l), t && Vt(r, n), l;
1013
+ }, [t, r, n]), T = O(
1014
+ (l) => {
1015
+ const p = qe(l);
1016
+ return p ? (f({ face: p }), !0) : !1;
1017
+ },
1018
+ [f]
1019
+ ), y = O(
1020
+ (l) => {
1021
+ const p = Je(l);
1022
+ return p ? (f({ body: p }), !0) : !1;
1023
+ },
1024
+ [f]
1025
+ );
1026
+ return E(
1027
+ () => ({
1028
+ calibration: i,
1029
+ hydrated: c,
1030
+ update: f,
1031
+ reset: S,
1032
+ calibrateFace: T,
1033
+ calibrateBody: y,
1034
+ applyToFeedPoint: (l, p) => jt(l, i, a, p),
1035
+ faceDistance: (l) => zt(l, i),
1036
+ bodyScale: (l) => Wt(l, i),
1037
+ sourceKind: a
1038
+ }),
1039
+ [i, c, f, S, T, y, a]
1040
+ );
1041
+ }, qt = (e, r) => r && !e ? "begin" : !r && e ? "end" : r ? "stay" : "none", Jt = {
1042
+ face: null,
1043
+ faces: [],
1044
+ faceCount: 0,
1045
+ detected: !1,
1046
+ justDetected: !1,
1047
+ justLost: !1,
1048
+ phase: "none"
1049
+ }, _r = ({
1050
+ faceIndex: e = 0,
1051
+ numFaces: r,
1052
+ ...t
1053
+ } = {}) => {
1054
+ const n = Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0, s = pt({
1055
+ ...t,
1056
+ numFaces: Math.max(r ?? n + 1, n + 1)
1057
+ }), o = g([]), a = g(n), i = g({ detected: !1, faceIndex: n }), [u, c] = B(Jt), h = g(u);
1058
+ return k(() => {
1059
+ o.current = s, a.current = n;
1060
+ }, [s, n]), D(() => {
1061
+ const d = o.current, m = a.current, f = d[m] ?? null, S = !!f, T = i.current.faceIndex === m && i.current.detected, y = qt(T, S);
1062
+ i.current = { detected: S, faceIndex: m };
1063
+ const l = {
1064
+ face: f,
1065
+ faces: d,
1066
+ faceCount: d.length,
1067
+ detected: S,
1068
+ justDetected: y === "begin",
1069
+ justLost: y === "end",
1070
+ phase: y
1071
+ }, p = h.current;
1072
+ p.face === l.face && p.faces === l.faces && p.faceCount === l.faceCount && p.detected === l.detected && p.justDetected === l.justDetected && p.justLost === l.justLost && p.phase === l.phase || (h.current = l, c(l));
1073
+ }), u;
1074
+ }, Pe = (e) => ({
472
1075
  action: e,
473
1076
  active: !1,
474
1077
  value: 0,
475
1078
  justStarted: !1,
476
1079
  justEnded: !1,
477
1080
  phase: "none"
478
- }), ze = (e, t, r = {}) => {
479
- const n = R(V(t)), o = R(null), u = R(t), i = R({}), [a, y] = I(() => W(t)), s = R(a);
480
- return L(() => {
481
- o.current = e, i.current = r;
482
- }, [e, r]), L(() => {
483
- u.current = t, n.current = V(t);
484
- const c = W(t);
485
- s.current = c, y(c);
486
- }, [t]), b(({ clock: c }) => {
487
- const l = o.current, f = u.current, h = i.current, g = l ? H(l, f, h) : 0, d = Re(
1081
+ }), wr = (e, r, t = {}) => {
1082
+ const n = g(Me(r)), s = g(null), o = g(r), a = g({}), [i, u] = B(() => Pe(r)), c = g(i);
1083
+ return k(() => {
1084
+ s.current = e, a.current = t;
1085
+ }, [e, t]), k(() => {
1086
+ o.current = r, n.current = Me(r);
1087
+ const h = Pe(r);
1088
+ c.current = h, u(h);
1089
+ }, [r]), D(({ clock: h }) => {
1090
+ const d = s.current, m = o.current, f = a.current, S = d ? V(d, m, f) : 0, T = It(
488
1091
  n.current,
489
- g,
490
- c.elapsedTime * 1e3,
491
- !!l,
492
- q(f, h)
493
- ), p = s.current;
494
- if (p.action === d.action && p.active === d.active && p.value === d.value && p.justStarted === d.justStarted && p.justEnded === d.justEnded && p.phase === d.phase)
1092
+ S,
1093
+ h.elapsedTime * 1e3,
1094
+ !!d,
1095
+ Ye(m, f)
1096
+ ), y = c.current;
1097
+ if (y.action === T.action && y.active === T.active && y.value === T.value && y.justStarted === T.justStarted && y.justEnded === T.justEnded && y.phase === T.phase)
495
1098
  return;
496
- const m = {
497
- action: d.action,
498
- active: d.active,
499
- value: d.value,
500
- justStarted: d.justStarted,
501
- justEnded: d.justEnded,
502
- phase: d.phase
1099
+ const l = {
1100
+ action: T.action,
1101
+ active: T.active,
1102
+ value: T.value,
1103
+ justStarted: T.justStarted,
1104
+ justEnded: T.justEnded,
1105
+ phase: T.phase
503
1106
  };
504
- s.current = m, y(m);
505
- }), a;
506
- }, He = [
1107
+ c.current = l, u(l);
1108
+ }), i;
1109
+ }, Dr = [
507
1110
  "angry",
508
1111
  "disgust",
509
1112
  "fear",
@@ -512,7 +1115,7 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
512
1115
  "sad",
513
1116
  "surprise",
514
1117
  "unknown"
515
- ], k = [
1118
+ ], X = [
516
1119
  "angry",
517
1120
  "disgust",
518
1121
  "fear",
@@ -520,112 +1123,182 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
520
1123
  "neutral",
521
1124
  "sad",
522
1125
  "surprise"
523
- ], ye = (e, t = 0.55) => {
524
- let r = -1 / 0;
525
- for (let s = 0; s < k.length; s += 1)
526
- r = Math.max(r, Number(e[s]) || 0);
527
- const n = new Array(k.length);
528
- let o = 0;
529
- for (let s = 0; s < k.length; s += 1) {
530
- const c = Math.exp((Number(e[s]) || 0) - r);
531
- n[s] = c, o += c;
1126
+ ], $t = (e, r = 0.55) => {
1127
+ let t = -1 / 0;
1128
+ for (let c = 0; c < X.length; c += 1)
1129
+ t = Math.max(t, Number(e[c]) || 0);
1130
+ const n = new Array(X.length);
1131
+ let s = 0;
1132
+ for (let c = 0; c < X.length; c += 1) {
1133
+ const h = Math.exp((Number(e[c]) || 0) - t);
1134
+ n[c] = h, s += h;
532
1135
  }
533
- const u = Object.fromEntries(k.map((s) => [s, 0]));
534
- let i = "unknown", a = 0;
535
- for (let s = 0; s < k.length; s += 1) {
536
- const c = o ? n[s] / o : 0, l = k[s];
537
- u[l] = c, c > a && (i = l, a = c);
1136
+ const o = Object.fromEntries(X.map((c) => [c, 0]));
1137
+ let a = "unknown", i = 0;
1138
+ for (let c = 0; c < X.length; c += 1) {
1139
+ const h = s ? n[c] / s : 0, d = X[c];
1140
+ o[d] = h, h > i && (a = d, i = h);
538
1141
  }
539
- const y = Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : 0.55;
540
- return { expression: a >= y ? i : "unknown", confidence: a, scores: u };
541
- }, ge = (e) => {
542
- const t = e.width * e.height, r = new Float32Array(t * 3);
543
- for (let n = 0, o = 0; n < t; n += 1, o += 4)
544
- r[n] = e.data[o] / 127.5 - 1, r[t + n] = e.data[o + 1] / 127.5 - 1, r[t * 2 + n] = e.data[o + 2] / 127.5 - 1;
545
- return r;
546
- }, Ee = "https://huggingface.co/opencv/facial_expression_recognition/resolve/main/facial_expression_recognition_mobilefacenet_2022july_int8.onnx", Te = (e) => `https://cdn.jsdelivr.net/npm/onnxruntime-web@${e.env.versions.web}/dist/`, j = /* @__PURE__ */ new Map(), Se = (e) => {
547
- let t = j.get(e);
548
- return t || (t = Promise.all([import("onnxruntime-web/wasm"), ee(e)]).then(([r, n]) => (r.env.wasm.wasmPaths = Te(r), r.InferenceSession.create(n, { executionProviders: ["wasm"] }))).catch((r) => {
549
- throw j.delete(e), r;
550
- }), j.set(e, t)), t;
551
- }, Ke = (e, {
552
- active: t = !0,
553
- targetFps: r = 5,
1142
+ const u = Number.isFinite(r) ? Math.min(1, Math.max(0, r)) : 0.55;
1143
+ return { expression: i >= u ? a : "unknown", confidence: i, scores: o };
1144
+ }, Zt = (e) => {
1145
+ const r = e.width * e.height, t = new Float32Array(r * 3);
1146
+ for (let n = 0, s = 0; n < r; n += 1, s += 4)
1147
+ t[n] = e.data[s] / 127.5 - 1, t[r + n] = e.data[s + 1] / 127.5 - 1, t[r * 2 + n] = e.data[s + 2] / 127.5 - 1;
1148
+ return t;
1149
+ }, Qt = "https://huggingface.co/opencv/facial_expression_recognition/resolve/main/facial_expression_recognition_mobilefacenet_2022july_int8.onnx", er = (e) => `https://cdn.jsdelivr.net/npm/onnxruntime-web@${e.env.versions.web}/dist/`, fe = /* @__PURE__ */ new Map(), tr = (e) => {
1150
+ let r = fe.get(e);
1151
+ return r || (r = Promise.all([import("onnxruntime-web/wasm"), st(e)]).then(([t, n]) => (t.env.wasm.wasmPaths = er(t), t.InferenceSession.create(n, { executionProviders: ["wasm"] }))).catch((t) => {
1152
+ throw fe.delete(e), t;
1153
+ }), fe.set(e, r)), r;
1154
+ }, Ir = (e, {
1155
+ active: r = !0,
1156
+ targetFps: t = 5,
554
1157
  minConfidence: n = 0.55,
555
- modelUrl: o = Ee
1158
+ modelUrl: s = Qt
556
1159
  } = {}) => {
557
- const { session: u } = Q(), i = R(null), a = R(null), y = R(!1), s = R(-1 / 0), c = R(!0), [l, f] = I({
1160
+ const { session: o } = He(), a = g(null), i = g(null), u = g(!1), c = g(-1 / 0), h = g(!0), [d, m] = B({
558
1161
  status: "idle",
559
1162
  result: null,
560
1163
  error: null
561
1164
  });
562
- return L(() => {
563
- const h = document.createElement("canvas");
564
- return i.current = h, a.current = h.getContext("2d", { willReadFrequently: !0 }), c.current = !0, () => {
565
- c.current = !1, i.current = null, a.current = null;
1165
+ return k(() => {
1166
+ const f = document.createElement("canvas");
1167
+ return a.current = f, i.current = f.getContext("2d", { willReadFrequently: !0 }), h.current = !0, () => {
1168
+ h.current = !1, a.current = null, i.current = null;
566
1169
  };
567
- }, []), b(({ clock: h }) => {
568
- if (!t || !e || y.current || l.status === "error") return;
569
- const g = Number.isFinite(r) && r > 0 ? r : 5, d = h.elapsedTime * 1e3;
570
- if (d - s.current < 1e3 / g) return;
571
- const p = u.getInputFrame(), m = i.current, E = a.current;
572
- if (!p || !m || !E || !pe({ source: p, face: e, canvas: m, outputSize: { width: 112, height: 112 } })) return;
573
- s.current = d, y.current = !0, l.status === "idle" && f({ status: "loading", result: null, error: null });
574
- const Y = ge(E.getImageData(0, 0, 112, 112));
575
- Promise.all([import("onnxruntime-web/wasm"), Se(o)]).then(async ([D, M]) => {
576
- const $ = await M.run({
577
- [M.inputNames[0]]: new D.Tensor("float32", Y, [1, 3, 112, 112])
578
- }), Z = ye(
579
- $[M.outputNames[0]].data,
1170
+ }, []), D(({ clock: f }) => {
1171
+ if (!r || !e || u.current || d.status === "error") return;
1172
+ const S = Number.isFinite(t) && t > 0 ? t : 5, T = f.elapsedTime * 1e3;
1173
+ if (T - c.current < 1e3 / S) return;
1174
+ const y = o.getInputFrame(), l = a.current, p = i.current;
1175
+ if (!y || !l || !p || !wt({ source: y, face: e, canvas: l, outputSize: { width: 112, height: 112 } })) return;
1176
+ c.current = T, u.current = !0, d.status === "idle" && m({ status: "loading", result: null, error: null });
1177
+ const _ = Zt(p.getImageData(0, 0, 112, 112));
1178
+ Promise.all([import("onnxruntime-web/wasm"), tr(s)]).then(async ([x, N]) => {
1179
+ const F = await N.run({
1180
+ [N.inputNames[0]]: new x.Tensor("float32", _, [1, 3, 112, 112])
1181
+ }), C = $t(
1182
+ F[N.outputNames[0]].data,
580
1183
  n
581
1184
  );
582
- c.current && f({ status: "ready", result: Z, error: null });
583
- }).catch((D) => {
584
- c.current && f({
1185
+ h.current && m({ status: "ready", result: C, error: null });
1186
+ }).catch((x) => {
1187
+ h.current && m({
585
1188
  status: "error",
586
1189
  result: null,
587
- error: D instanceof Error ? D : new Error(String(D))
1190
+ error: x instanceof Error ? x : new Error(String(x))
588
1191
  });
589
1192
  }).finally(() => {
590
- y.current = !1;
1193
+ u.current = !1;
591
1194
  });
592
- }), l;
1195
+ }), d;
593
1196
  };
594
1197
  export {
595
- Qe as BODY_TARGETS,
596
- Me as BodyTracker,
597
- me as DEFAULT_FACE_ACTION_OPTIONS,
598
- Ee as DEFAULT_FACE_ATTRIBUTE_EXPRESSION_MODEL_URL,
599
- lt as DEFAULT_FACE_EXPRESSION_THRESHOLD,
600
- et as DEFAULT_TRACKING_ANCHOR,
601
- Pe as FACE_ACTION_NAMES,
602
- He as FACE_ATTRIBUTE_EXPRESSION_NAMES,
603
- Ce as FACE_BLENDSHAPE_NAMES,
604
- Ve as FACE_LANDMARK_INDICES,
605
- tt as FACE_TARGETS,
606
- We as FaceMesh,
607
- qe as FaceTracker,
608
- Fe as GestureTracker,
609
- je as GestureTrigger,
610
- nt as HAND_TARGETS,
611
- Ne as HandTracker,
612
- X as SEGMENTATION_TYPES,
613
- Be as Segmentation,
614
- rt as TrackingAnchor,
615
- pe as drawFaceCrop,
616
- H as getFaceActionValue,
617
- T as getFaceBlendshape,
618
- dt as getFaceEyeDistance,
619
- Ue as getStrongestFaceAction,
620
- ot as getTargetNamespace,
621
- Ie as hasFaceAction,
622
- ht as hasFaceExpression,
623
- $e as normalizedTrackerPointToTrackerPoint,
624
- Ze as trackerPointToNormalizedTrackerPoint,
625
- ze as useFaceAction,
626
- Ke as useFaceAttributeExpression,
627
- Oe as useFaceDetection,
628
- ct as useFaceInfo,
629
- te as useFaceInfos,
630
- ut as useFaceResults
1198
+ Kt as BODY_CALIBRATION_LANDMARKS,
1199
+ Jr as BODY_TARGETS,
1200
+ gr as BodyTracker,
1201
+ ie as CALIBRATION_STORAGE_KEY,
1202
+ Se as CALIBRATION_VERSION,
1203
+ ye as DEFAULT_CALIBRATION,
1204
+ Dt as DEFAULT_FACE_ACTION_OPTIONS,
1205
+ Qt as DEFAULT_FACE_ATTRIBUTE_EXPRESSION_MODEL_URL,
1206
+ on as DEFAULT_FACE_EXPRESSION_THRESHOLD,
1207
+ nn as DEFAULT_GESTURE_DETECTOR_OPTIONS,
1208
+ vn as DEFAULT_GESTURE_SETTINGS,
1209
+ Br as DEFAULT_HOLISTIC_ANALYSIS_MAX_DIMENSION,
1210
+ Ur as DEFAULT_HOLISTIC_HOLD_MS,
1211
+ jr as DEFAULT_HOLISTIC_MODEL_URL,
1212
+ Gr as DEFAULT_HOLISTIC_PREDICT_MS,
1213
+ pe as DEFAULT_HOLISTIC_SIGNAL_THRESHOLDS,
1214
+ On as DEFAULT_HOLISTIC_TRACKER_SETTINGS,
1215
+ hn as DEFAULT_POLICY_NUM_FACES,
1216
+ Kn as DEFAULT_SEGMENTATION_OVERLAY_SETTINGS,
1217
+ fn as DEFAULT_SUBJECT_POLICY,
1218
+ $r as DEFAULT_TRACKING_ANCHOR,
1219
+ mn as EMPTY_SUBJECT_MEMORY,
1220
+ Er as FACE_ACTION_NAMES,
1221
+ Dr as FACE_ATTRIBUTE_EXPRESSION_NAMES,
1222
+ Rr as FACE_BLENDSHAPE_NAMES,
1223
+ Gt as FACE_CALIBRATION_LANDMARKS,
1224
+ Mr as FACE_LANDMARK_INDICES,
1225
+ Zr as FACE_TARGETS,
1226
+ Fr as FaceMesh,
1227
+ Pr as FaceTracker,
1228
+ Ve as GESTURES,
1229
+ xr as GESTURE_NAMES,
1230
+ Ln as GESTURE_SETTINGS_FIELDS,
1231
+ Or as GestureListener,
1232
+ pr as GestureTracker,
1233
+ yr as GestureTrigger,
1234
+ Qr as HAND_TARGETS,
1235
+ kn as HOLISTIC_HANDS_OPTIONS,
1236
+ _n as HOLISTIC_TRACKER_SETTINGS_FIELDS,
1237
+ mr as HandTracker,
1238
+ Te as HolisticTracker,
1239
+ Fn as IRIS_LANDMARKS,
1240
+ Pn as IRIS_LANDMARK_COUNT,
1241
+ Hn as PERSON_MASK_LABELS,
1242
+ ke as SEGMENTATION_TYPES,
1243
+ Vr as SEMANTIC_SEGMENTATION_PRESETS,
1244
+ Sr as Segmentation,
1245
+ bn as SegmentationOverlay,
1246
+ en as TrackingAnchor,
1247
+ pn as XR_MAX_SUBJECTS,
1248
+ jt as applyCalibrationToFeedPoint,
1249
+ gn as associateSubjects,
1250
+ Vt as clearCalibration,
1251
+ Kr as clearSemanticMask,
1252
+ Ft as createCalibration,
1253
+ Rt as createHolisticSignals,
1254
+ zr as createSemanticMask,
1255
+ vr as defineGesture,
1256
+ wt as drawFaceCrop,
1257
+ Wt as estimateBodyScale,
1258
+ zt as estimateFaceDistance,
1259
+ Tn as faceCandidates,
1260
+ V as getFaceActionValue,
1261
+ A as getFaceBlendshape,
1262
+ an as getFaceEyeDistance,
1263
+ Tr as getHolisticSignals,
1264
+ Ar as getStrongestFaceAction,
1265
+ tn as getTargetNamespace,
1266
+ br as hasFaceAction,
1267
+ cn as hasFaceExpression,
1268
+ Ne as isHandRaised,
1269
+ Lr as isIdentityCalibration,
1270
+ Ie as isPalmOpen,
1271
+ Sn as jointCandidates,
1272
+ Xt as loadCalibration,
1273
+ Je as measureBodyCalibration,
1274
+ qe as measureFaceCalibration,
1275
+ Wr as normalizedTrackerPointToTrackerPoint,
1276
+ wn as patchGestureSettings,
1277
+ Dn as patchHolisticTrackerSettings,
1278
+ zn as patchSegmentationOverlaySettings,
1279
+ Bt as resetCalibration,
1280
+ Ut as resolveCalibrationMirror,
1281
+ Nt as resolveGestureDefinition,
1282
+ _e as resolveGestureDetectorOptions,
1283
+ In as resolveGestureSettings,
1284
+ Nn as resolveHolisticTrackerSettings,
1285
+ Wn as resolveSegmentationOverlaySettings,
1286
+ Yt as saveCalibration,
1287
+ yn as selectSubject,
1288
+ Cn as toHolisticTrackerProps,
1289
+ Xr as trackerPointToNormalizedTrackerPoint,
1290
+ oe as updateCalibration,
1291
+ wr as useFaceAction,
1292
+ Ir as useFaceAttributeExpression,
1293
+ _r as useFaceDetection,
1294
+ Rn as useFaceInfo,
1295
+ pt as useFaceInfos,
1296
+ ln as useFaceResults,
1297
+ Mt as useGesture,
1298
+ Bn as useHairMask,
1299
+ bt as useHolisticTracking,
1300
+ An as useIrisTracking,
1301
+ Un as usePersonMask,
1302
+ jn as useSemanticSegmentationMask,
1303
+ kr as useXRCalibration
631
1304
  };