@react-three/drei 10.7.7 → 11.0.0-alpha.1

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 (580) hide show
  1. package/README.md +49 -758
  2. package/_chunks/hls.mjs +3 -0
  3. package/_chunks/libs/@mediapipe/tasks-vision.mjs +4781 -0
  4. package/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  5. package/_chunks/libs/@use-gesture/core.mjs +1650 -0
  6. package/_chunks/libs/@use-gesture/react.mjs +207 -0
  7. package/_chunks/libs/camera-controls.mjs +2207 -0
  8. package/_chunks/libs/detect-gpu.mjs +515 -0
  9. package/_chunks/libs/hls.js.mjs +21925 -0
  10. package/_chunks/libs/maath.mjs +5200 -0
  11. package/_chunks/libs/stats-gl.mjs +301 -0
  12. package/_chunks/libs/stats.js.mjs +90 -0
  13. package/_chunks/libs/suspend-react.mjs +60 -0
  14. package/_chunks/libs/three.mjs +23169 -0
  15. package/_chunks/libs/tunnel-rat.mjs +458 -0
  16. package/_chunks/libs/zustand.mjs +104 -0
  17. package/_chunks/rolldown-runtime.mjs +47 -0
  18. package/_chunks/vision_bundle.mjs +3 -0
  19. package/core/_chunks/hls.mjs +3 -0
  20. package/core/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  21. package/core/_chunks/libs/@use-gesture/core.mjs +1650 -0
  22. package/core/_chunks/libs/@use-gesture/react.mjs +207 -0
  23. package/core/_chunks/libs/detect-gpu.mjs +515 -0
  24. package/core/_chunks/libs/hls.js.mjs +21925 -0
  25. package/core/_chunks/libs/maath.mjs +5200 -0
  26. package/core/_chunks/libs/stats-gl.mjs +301 -0
  27. package/core/_chunks/libs/stats.js.mjs +90 -0
  28. package/core/_chunks/libs/suspend-react.mjs +60 -0
  29. package/core/_chunks/libs/three.mjs +22457 -0
  30. package/core/_chunks/libs/tunnel-rat.mjs +458 -0
  31. package/core/_chunks/libs/zustand.mjs +104 -0
  32. package/core/_chunks/rolldown-runtime.mjs +47 -0
  33. package/core/core/index.d.mts +2232 -0
  34. package/core/core/index.mjs +11082 -0
  35. package/experimental/_chunks/libs/three.mjs +15386 -0
  36. package/experimental/experimental/index.d.mts +253 -0
  37. package/experimental/experimental/index.mjs +434 -0
  38. package/external/_chunks/hls.mjs +3 -0
  39. package/external/_chunks/libs/@mediapipe/tasks-vision.mjs +4781 -0
  40. package/external/_chunks/libs/camera-controls.mjs +2207 -0
  41. package/external/_chunks/libs/hls.js.mjs +21925 -0
  42. package/external/_chunks/libs/maath.mjs +5200 -0
  43. package/external/_chunks/libs/suspend-react.mjs +58 -0
  44. package/external/_chunks/libs/three.mjs +15387 -0
  45. package/external/_chunks/rolldown-runtime.mjs +32 -0
  46. package/external/_chunks/vision_bundle.mjs +3 -0
  47. package/external/external/index.d.mts +499 -0
  48. package/external/external/index.mjs +9422 -0
  49. package/index.d.mts +2567 -0
  50. package/index.mjs +20571 -0
  51. package/legacy/_chunks/hls.mjs +3 -0
  52. package/legacy/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  53. package/legacy/_chunks/libs/@use-gesture/core.mjs +1650 -0
  54. package/legacy/_chunks/libs/@use-gesture/react.mjs +207 -0
  55. package/legacy/_chunks/libs/bidi-js.mjs +675 -0
  56. package/legacy/_chunks/libs/detect-gpu.mjs +515 -0
  57. package/legacy/_chunks/libs/hls.js.mjs +21925 -0
  58. package/legacy/_chunks/libs/maath.mjs +5200 -0
  59. package/legacy/_chunks/libs/stats-gl.mjs +301 -0
  60. package/legacy/_chunks/libs/stats.js.mjs +90 -0
  61. package/legacy/_chunks/libs/suspend-react.mjs +60 -0
  62. package/legacy/_chunks/libs/three.mjs +26062 -0
  63. package/legacy/_chunks/libs/troika-three-text.mjs +6494 -0
  64. package/legacy/_chunks/libs/tunnel-rat.mjs +458 -0
  65. package/legacy/_chunks/libs/zustand.mjs +104 -0
  66. package/legacy/_chunks/rolldown-runtime.mjs +47 -0
  67. package/legacy/legacy/index.d.mts +2788 -0
  68. package/legacy/legacy/index.mjs +14984 -0
  69. package/native/_chunks/hls.mjs +3 -0
  70. package/native/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  71. package/native/_chunks/libs/@use-gesture/core.mjs +1650 -0
  72. package/native/_chunks/libs/@use-gesture/react.mjs +207 -0
  73. package/native/_chunks/libs/detect-gpu.mjs +515 -0
  74. package/native/_chunks/libs/hls.js.mjs +21925 -0
  75. package/native/_chunks/libs/maath.mjs +5200 -0
  76. package/native/_chunks/libs/stats-gl.mjs +301 -0
  77. package/native/_chunks/libs/stats.js.mjs +90 -0
  78. package/native/_chunks/libs/suspend-react.mjs +60 -0
  79. package/native/_chunks/libs/three.mjs +22592 -0
  80. package/native/_chunks/libs/tunnel-rat.mjs +458 -0
  81. package/native/_chunks/libs/zustand.mjs +104 -0
  82. package/native/_chunks/rolldown-runtime.mjs +47 -0
  83. package/native/native/index.d.mts +3168 -0
  84. package/native/native/index.mjs +14863 -0
  85. package/package.json +41 -10
  86. package/webgpu/_chunks/hls.mjs +3 -0
  87. package/webgpu/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  88. package/webgpu/_chunks/libs/@use-gesture/core.mjs +1650 -0
  89. package/webgpu/_chunks/libs/@use-gesture/react.mjs +207 -0
  90. package/webgpu/_chunks/libs/detect-gpu.mjs +515 -0
  91. package/webgpu/_chunks/libs/hls.js.mjs +21925 -0
  92. package/webgpu/_chunks/libs/maath.mjs +5200 -0
  93. package/webgpu/_chunks/libs/stats-gl.mjs +301 -0
  94. package/webgpu/_chunks/libs/stats.js.mjs +90 -0
  95. package/webgpu/_chunks/libs/suspend-react.mjs +60 -0
  96. package/webgpu/_chunks/libs/three.mjs +22592 -0
  97. package/webgpu/_chunks/libs/tunnel-rat.mjs +458 -0
  98. package/webgpu/_chunks/libs/zustand.mjs +104 -0
  99. package/webgpu/_chunks/rolldown-runtime.mjs +47 -0
  100. package/webgpu/webgpu/index.d.mts +3166 -0
  101. package/webgpu/webgpu/index.mjs +15015 -0
  102. package/core/AccumulativeShadows.cjs.js +0 -1
  103. package/core/AccumulativeShadows.d.ts +0 -59
  104. package/core/AccumulativeShadows.js +0 -310
  105. package/core/AdaptiveDpr.cjs.js +0 -1
  106. package/core/AdaptiveDpr.d.ts +0 -3
  107. package/core/AdaptiveDpr.js +0 -28
  108. package/core/AdaptiveEvents.cjs.js +0 -1
  109. package/core/AdaptiveEvents.d.ts +0 -1
  110. package/core/AdaptiveEvents.js +0 -20
  111. package/core/ArcballControls.cjs.js +0 -1
  112. package/core/ArcballControls.d.ts +0 -15
  113. package/core/ArcballControls.js +0 -67
  114. package/core/AsciiRenderer.cjs.js +0 -1
  115. package/core/AsciiRenderer.d.ts +0 -11
  116. package/core/AsciiRenderer.js +0 -66
  117. package/core/BBAnchor.cjs.js +0 -1
  118. package/core/BBAnchor.d.ts +0 -7
  119. package/core/BBAnchor.js +0 -37
  120. package/core/Backdrop.cjs.js +0 -1
  121. package/core/Backdrop.d.ts +0 -15
  122. package/core/Backdrop.js +0 -33
  123. package/core/BakeShadows.cjs.js +0 -1
  124. package/core/BakeShadows.d.ts +0 -1
  125. package/core/BakeShadows.js +0 -16
  126. package/core/Billboard.cjs.js +0 -1
  127. package/core/Billboard.d.ts +0 -10
  128. package/core/Billboard.js +0 -53
  129. package/core/Bounds.cjs.js +0 -1
  130. package/core/Bounds.d.ts +0 -36
  131. package/core/Bounds.js +0 -254
  132. package/core/Bvh.cjs.js +0 -1
  133. package/core/Bvh.d.ts +0 -19
  134. package/core/Bvh.js +0 -92
  135. package/core/CameraControls.cjs.js +0 -1
  136. package/core/CameraControls.d.ts +0 -48
  137. package/core/CameraControls.js +0 -151
  138. package/core/CameraShake.cjs.js +0 -1
  139. package/core/CameraShake.d.ts +0 -17
  140. package/core/CameraShake.js +0 -57
  141. package/core/CatmullRomLine.cjs.js +0 -1
  142. package/core/CatmullRomLine.d.ts +0 -10
  143. package/core/CatmullRomLine.js +0 -42
  144. package/core/Caustics.cjs.js +0 -1
  145. package/core/Caustics.d.ts +0 -32
  146. package/core/Caustics.js +0 -388
  147. package/core/Center.cjs.js +0 -1
  148. package/core/Center.d.ts +0 -33
  149. package/core/Center.js +0 -67
  150. package/core/Clone.cjs.js +0 -1
  151. package/core/Clone.d.ts +0 -15
  152. package/core/Clone.js +0 -100
  153. package/core/Cloud.cjs.js +0 -1
  154. package/core/Cloud.d.ts +0 -97
  155. package/core/Cloud.js +0 -231
  156. package/core/ComputedAttribute.cjs.js +0 -1
  157. package/core/ComputedAttribute.d.ts +0 -8
  158. package/core/ComputedAttribute.js +0 -33
  159. package/core/ContactShadows.cjs.js +0 -1
  160. package/core/ContactShadows.d.ts +0 -18
  161. package/core/ContactShadows.js +0 -114
  162. package/core/CubeCamera.cjs.js +0 -1
  163. package/core/CubeCamera.d.ts +0 -21
  164. package/core/CubeCamera.js +0 -86
  165. package/core/CubeTexture.cjs.js +0 -1
  166. package/core/CubeTexture.d.ts +0 -14
  167. package/core/CubeTexture.js +0 -25
  168. package/core/CubicBezierLine.cjs.js +0 -1
  169. package/core/CubicBezierLine.d.ts +0 -12
  170. package/core/CubicBezierLine.js +0 -28
  171. package/core/CurveModifier.cjs.js +0 -1
  172. package/core/CurveModifier.d.ts +0 -11
  173. package/core/CurveModifier.js +0 -27
  174. package/core/Decal.cjs.js +0 -1
  175. package/core/Decal.d.ts +0 -16
  176. package/core/Decal.js +0 -128
  177. package/core/Detailed.cjs.js +0 -1
  178. package/core/Detailed.d.ts +0 -10
  179. package/core/Detailed.js +0 -33
  180. package/core/DetectGPU.cjs.js +0 -1
  181. package/core/DetectGPU.d.ts +0 -7
  182. package/core/DetectGPU.js +0 -14
  183. package/core/DeviceOrientationControls.cjs.js +0 -1
  184. package/core/DeviceOrientationControls.d.ts +0 -10
  185. package/core/DeviceOrientationControls.js +0 -51
  186. package/core/Edges.cjs.js +0 -1
  187. package/core/Edges.d.ts +0 -13
  188. package/core/Edges.js +0 -38
  189. package/core/Effects.cjs.js +0 -1
  190. package/core/Effects.d.ts +0 -25
  191. package/core/Effects.js +0 -91
  192. package/core/Environment.cjs.js +0 -1
  193. package/core/Environment.d.ts +0 -37
  194. package/core/Environment.js +0 -189
  195. package/core/Example.cjs.js +0 -1
  196. package/core/Example.d.ts +0 -13
  197. package/core/Example.js +0 -46
  198. package/core/Fbo.cjs.js +0 -1
  199. package/core/Fbo.d.ts +0 -22
  200. package/core/Fbo.js +0 -63
  201. package/core/Fbx.cjs.js +0 -1
  202. package/core/Fbx.d.ts +0 -11
  203. package/core/Fbx.js +0 -23
  204. package/core/FirstPersonControls.cjs.js +0 -1
  205. package/core/FirstPersonControls.d.ts +0 -8
  206. package/core/FirstPersonControls.js +0 -38
  207. package/core/Fisheye.cjs.js +0 -1
  208. package/core/Fisheye.d.ts +0 -10
  209. package/core/Fisheye.js +0 -95
  210. package/core/Float.cjs.js +0 -1
  211. package/core/Float.d.ts +0 -14
  212. package/core/Float.js +0 -37
  213. package/core/FlyControls.cjs.js +0 -1
  214. package/core/FlyControls.d.ts +0 -10
  215. package/core/FlyControls.js +0 -55
  216. package/core/GizmoHelper.cjs.js +0 -1
  217. package/core/GizmoHelper.d.ts +0 -16
  218. package/core/GizmoHelper.js +0 -116
  219. package/core/GizmoViewcube.cjs.js +0 -1
  220. package/core/GizmoViewcube.d.ts +0 -14
  221. package/core/GizmoViewcube.js +0 -133
  222. package/core/GizmoViewport.cjs.js +0 -1
  223. package/core/GizmoViewport.d.ts +0 -16
  224. package/core/GizmoViewport.js +0 -140
  225. package/core/Gltf.cjs.js +0 -1
  226. package/core/Gltf.d.ts +0 -27
  227. package/core/Gltf.js +0 -52
  228. package/core/GradientTexture.cjs.js +0 -1
  229. package/core/GradientTexture.d.ts +0 -18
  230. package/core/GradientTexture.js +0 -54
  231. package/core/Grid.cjs.js +0 -1
  232. package/core/Grid.d.ts +0 -26
  233. package/core/Grid.js +0 -142
  234. package/core/Helper.cjs.js +0 -1
  235. package/core/Helper.d.ts +0 -16
  236. package/core/Helper.js +0 -47
  237. package/core/Hud.cjs.js +0 -1
  238. package/core/Hud.d.ts +0 -6
  239. package/core/Hud.js +0 -55
  240. package/core/Image.cjs.js +0 -1
  241. package/core/Image.d.ts +0 -38
  242. package/core/Image.js +0 -160
  243. package/core/Instances.cjs.js +0 -1
  244. package/core/Instances.d.ts +0 -64
  245. package/core/Instances.js +0 -313
  246. package/core/Ktx2.cjs.js +0 -1
  247. package/core/Ktx2.d.ts +0 -14
  248. package/core/Ktx2.js +0 -48
  249. package/core/Lightformer.cjs.js +0 -1
  250. package/core/Lightformer.d.ts +0 -15
  251. package/core/Lightformer.js +0 -63
  252. package/core/Line.cjs.js +0 -1
  253. package/core/Line.d.ts +0 -13
  254. package/core/Line.js +0 -73
  255. package/core/MapControls.cjs.js +0 -1
  256. package/core/MapControls.d.ts +0 -14
  257. package/core/MapControls.js +0 -63
  258. package/core/MarchingCubes.cjs.js +0 -1
  259. package/core/MarchingCubes.d.ts +0 -24
  260. package/core/MarchingCubes.js +0 -78
  261. package/core/Mask.cjs.js +0 -1
  262. package/core/Mask.d.ts +0 -17
  263. package/core/Mask.js +0 -42
  264. package/core/MatcapTexture.cjs.js +0 -1
  265. package/core/MatcapTexture.d.ts +0 -9
  266. package/core/MatcapTexture.js +0 -51
  267. package/core/MeshDiscardMaterial.cjs.js +0 -1
  268. package/core/MeshDiscardMaterial.d.ts +0 -10
  269. package/core/MeshDiscardMaterial.js +0 -15
  270. package/core/MeshDistortMaterial.cjs.js +0 -1
  271. package/core/MeshDistortMaterial.d.ts +0 -39
  272. package/core/MeshDistortMaterial.js +0 -72
  273. package/core/MeshPortalMaterial.cjs.js +0 -1
  274. package/core/MeshPortalMaterial.d.ts +0 -25
  275. package/core/MeshPortalMaterial.js +0 -467
  276. package/core/MeshReflectorMaterial.cjs.js +0 -1
  277. package/core/MeshReflectorMaterial.d.ts +0 -14
  278. package/core/MeshReflectorMaterial.js +0 -180
  279. package/core/MeshRefractionMaterial.cjs.js +0 -1
  280. package/core/MeshRefractionMaterial.d.ts +0 -19
  281. package/core/MeshRefractionMaterial.js +0 -73
  282. package/core/MeshTransmissionMaterial.cjs.js +0 -1
  283. package/core/MeshTransmissionMaterial.d.ts +0 -34
  284. package/core/MeshTransmissionMaterial.js +0 -402
  285. package/core/MeshWobbleMaterial.cjs.js +0 -1
  286. package/core/MeshWobbleMaterial.d.ts +0 -36
  287. package/core/MeshWobbleMaterial.js +0 -60
  288. package/core/MotionPathControls.cjs.js +0 -1
  289. package/core/MotionPathControls.d.ts +0 -33
  290. package/core/MotionPathControls.js +0 -121
  291. package/core/MultiMaterial.cjs.js +0 -1
  292. package/core/MultiMaterial.d.ts +0 -4
  293. package/core/MultiMaterial.js +0 -29
  294. package/core/NormalTexture.cjs.js +0 -1
  295. package/core/NormalTexture.d.ts +0 -14
  296. package/core/NormalTexture.js +0 -42
  297. package/core/OrbitControls.cjs.js +0 -1
  298. package/core/OrbitControls.d.ts +0 -22
  299. package/core/OrbitControls.js +0 -79
  300. package/core/OrthographicCamera.cjs.js +0 -1
  301. package/core/OrthographicCamera.d.ts +0 -14
  302. package/core/OrthographicCamera.js +0 -76
  303. package/core/Outlines.cjs.js +0 -1
  304. package/core/Outlines.d.ts +0 -17
  305. package/core/Outlines.js +0 -166
  306. package/core/PerformanceMonitor.cjs.js +0 -1
  307. package/core/PerformanceMonitor.d.ts +0 -36
  308. package/core/PerformanceMonitor.js +0 -116
  309. package/core/PerspectiveCamera.cjs.js +0 -1
  310. package/core/PerspectiveCamera.d.ts +0 -14
  311. package/core/PerspectiveCamera.js +0 -72
  312. package/core/PointMaterial.cjs.js +0 -1
  313. package/core/PointMaterial.d.ts +0 -8
  314. package/core/PointMaterial.js +0 -36
  315. package/core/PointerLockControls.cjs.js +0 -1
  316. package/core/PointerLockControls.d.ts +0 -15
  317. package/core/PointerLockControls.js +0 -89
  318. package/core/Points.cjs.js +0 -1
  319. package/core/Points.d.ts +0 -31
  320. package/core/Points.js +0 -202
  321. package/core/PositionalAudio.cjs.js +0 -1
  322. package/core/PositionalAudio.d.ts +0 -9
  323. package/core/PositionalAudio.js +0 -46
  324. package/core/Preload.cjs.js +0 -1
  325. package/core/Preload.d.ts +0 -7
  326. package/core/Preload.js +0 -44
  327. package/core/Progress.cjs.js +0 -1
  328. package/core/Progress.d.ts +0 -14
  329. package/core/Progress.js +0 -55
  330. package/core/QuadraticBezierLine.cjs.js +0 -1
  331. package/core/QuadraticBezierLine.d.ts +0 -14
  332. package/core/QuadraticBezierLine.js +0 -42
  333. package/core/RenderCubeTexture.cjs.js +0 -1
  334. package/core/RenderCubeTexture.d.ts +0 -30
  335. package/core/RenderCubeTexture.js +0 -96
  336. package/core/RenderTexture.cjs.js +0 -1
  337. package/core/RenderTexture.d.ts +0 -18
  338. package/core/RenderTexture.js +0 -105
  339. package/core/Resize.cjs.js +0 -1
  340. package/core/Resize.d.ts +0 -17
  341. package/core/Resize.js +0 -39
  342. package/core/RoundedBox.cjs.js +0 -1
  343. package/core/RoundedBox.d.ts +0 -14
  344. package/core/RoundedBox.js +0 -70
  345. package/core/Sampler.cjs.js +0 -1
  346. package/core/Sampler.d.ts +0 -28
  347. package/core/Sampler.js +0 -75
  348. package/core/ScreenQuad.cjs.js +0 -1
  349. package/core/ScreenQuad.d.ts +0 -5
  350. package/core/ScreenQuad.js +0 -25
  351. package/core/ScreenSizer.cjs.js +0 -1
  352. package/core/ScreenSizer.d.ts +0 -7
  353. package/core/ScreenSizer.js +0 -39
  354. package/core/ScreenSpace.cjs.js +0 -1
  355. package/core/ScreenSpace.d.ts +0 -7
  356. package/core/ScreenSpace.js +0 -25
  357. package/core/Segments.cjs.js +0 -1
  358. package/core/Segments.d.ts +0 -29
  359. package/core/Segments.js +0 -96
  360. package/core/Shadow.cjs.js +0 -1
  361. package/core/Shadow.d.ts +0 -12
  362. package/core/Shadow.js +0 -42
  363. package/core/ShadowAlpha.cjs.js +0 -1
  364. package/core/ShadowAlpha.d.ts +0 -7
  365. package/core/ShadowAlpha.js +0 -108
  366. package/core/Sky.cjs.js +0 -1
  367. package/core/Sky.d.ts +0 -16
  368. package/core/Sky.js +0 -39
  369. package/core/Sparkles.cjs.js +0 -1
  370. package/core/Sparkles.d.ts +0 -26
  371. package/core/Sparkles.js +0 -161
  372. package/core/Splat.cjs.js +0 -1
  373. package/core/Splat.d.ts +0 -56
  374. package/core/Splat.js +0 -506
  375. package/core/SpotLight.cjs.js +0 -1
  376. package/core/SpotLight.d.ts +0 -27
  377. package/core/SpotLight.js +0 -223
  378. package/core/SpriteAnimator.cjs.js +0 -1
  379. package/core/SpriteAnimator.d.ts +0 -88
  380. package/core/SpriteAnimator.js +0 -413
  381. package/core/Stage.cjs.js +0 -1
  382. package/core/Stage.d.ts +0 -27
  383. package/core/Stage.js +0 -133
  384. package/core/Stars.cjs.js +0 -1
  385. package/core/Stars.d.ts +0 -22
  386. package/core/Stars.js +0 -100
  387. package/core/Stats.cjs.js +0 -1
  388. package/core/Stats.d.ts +0 -7
  389. package/core/Stats.js +0 -32
  390. package/core/StatsGl.cjs.js +0 -1
  391. package/core/StatsGl.d.ts +0 -14
  392. package/core/StatsGl.js +0 -44
  393. package/core/Svg.cjs.js +0 -1
  394. package/core/Svg.d.ts +0 -13
  395. package/core/Svg.js +0 -62
  396. package/core/Text.cjs.js +0 -1
  397. package/core/Text.d.ts +0 -38
  398. package/core/Text.js +0 -57
  399. package/core/Text3D.cjs.js +0 -1
  400. package/core/Text3D.d.ts +0 -20
  401. package/core/Text3D.js +0 -74
  402. package/core/Texture.cjs.js +0 -1
  403. package/core/Texture.d.ts +0 -20
  404. package/core/Texture.js +0 -60
  405. package/core/TrackballControls.cjs.js +0 -1
  406. package/core/TrackballControls.d.ts +0 -15
  407. package/core/TrackballControls.js +0 -72
  408. package/core/Trail.cjs.js +0 -1
  409. package/core/Trail.d.ts +0 -21
  410. package/core/Trail.js +0 -150
  411. package/core/TrailTexture.cjs.js +0 -1
  412. package/core/TrailTexture.d.ts +0 -19
  413. package/core/TrailTexture.js +0 -159
  414. package/core/TransformControls.cjs.js +0 -1
  415. package/core/TransformControls.d.ts +0 -28
  416. package/core/TransformControls.js +0 -114
  417. package/core/VideoTexture.cjs.js +0 -1
  418. package/core/VideoTexture.d.ts +0 -26
  419. package/core/VideoTexture.js +0 -111
  420. package/core/Wireframe.cjs.js +0 -1
  421. package/core/Wireframe.d.ts +0 -15
  422. package/core/Wireframe.js +0 -157
  423. package/core/calculateScaleFactor.cjs.js +0 -1
  424. package/core/calculateScaleFactor.d.ts +0 -3
  425. package/core/calculateScaleFactor.js +0 -31
  426. package/core/index.cjs.js +0 -1
  427. package/core/index.d.ts +0 -122
  428. package/core/index.js +0 -150
  429. package/core/meshBounds.cjs.js +0 -1
  430. package/core/meshBounds.d.ts +0 -2
  431. package/core/meshBounds.js +0 -28
  432. package/core/shaderMaterial.cjs.js +0 -1
  433. package/core/shaderMaterial.d.ts +0 -9
  434. package/core/shaderMaterial.js +0 -29
  435. package/core/shapes.cjs.js +0 -1
  436. package/core/shapes.d.ts +0 -26
  437. package/core/shapes.js +0 -65
  438. package/core/softShadows.cjs.js +0 -1
  439. package/core/softShadows.d.ts +0 -6
  440. package/core/softShadows.js +0 -158
  441. package/core/useAnimations.cjs.js +0 -1
  442. package/core/useAnimations.d.ts +0 -13
  443. package/core/useAnimations.js +0 -52
  444. package/core/useAspect.cjs.js +0 -1
  445. package/core/useAspect.d.ts +0 -1
  446. package/core/useAspect.js +0 -10
  447. package/core/useBoxProjectedEnv.cjs.js +0 -1
  448. package/core/useBoxProjectedEnv.d.ts +0 -19
  449. package/core/useBoxProjectedEnv.js +0 -95
  450. package/core/useCamera.cjs.js +0 -1
  451. package/core/useCamera.d.ts +0 -3
  452. package/core/useCamera.js +0 -19
  453. package/core/useContextBridge.cjs.js +0 -1
  454. package/core/useContextBridge.d.ts +0 -4
  455. package/core/useContextBridge.js +0 -20
  456. package/core/useDepthBuffer.cjs.js +0 -1
  457. package/core/useDepthBuffer.d.ts +0 -6
  458. package/core/useDepthBuffer.js +0 -38
  459. package/core/useEnvironment.cjs.js +0 -1
  460. package/core/useEnvironment.d.ts +0 -17
  461. package/core/useEnvironment.js +0 -150
  462. package/core/useFont.cjs.js +0 -1
  463. package/core/useFont.d.ts +0 -24
  464. package/core/useFont.js +0 -24
  465. package/core/useIntersect.cjs.js +0 -1
  466. package/core/useIntersect.d.ts +0 -3
  467. package/core/useIntersect.js +0 -36
  468. package/core/useSpriteLoader.cjs.js +0 -1
  469. package/core/useSpriteLoader.d.ts +0 -57
  470. package/core/useSpriteLoader.js +0 -402
  471. package/helpers/constants.cjs.js +0 -1
  472. package/helpers/constants.d.ts +0 -1
  473. package/helpers/constants.js +0 -6
  474. package/helpers/deprecated.cjs.js +0 -1
  475. package/helpers/deprecated.d.ts +0 -5
  476. package/helpers/deprecated.js +0 -8
  477. package/helpers/environment-assets.cjs.js +0 -1
  478. package/helpers/environment-assets.d.ts +0 -13
  479. package/helpers/environment-assets.js +0 -14
  480. package/helpers/glsl/DefaultSpotlightShadowShadows.glsl.js +0 -3
  481. package/helpers/glsl/distort.vert.glsl.js +0 -3
  482. package/helpers/ts-utils.cjs.js +0 -1
  483. package/helpers/ts-utils.d.ts +0 -7
  484. package/helpers/ts-utils.js +0 -1
  485. package/helpers/useEffectfulState.cjs.js +0 -1
  486. package/helpers/useEffectfulState.d.ts +0 -4
  487. package/helpers/useEffectfulState.js +0 -17
  488. package/index.cjs.js +0 -1
  489. package/index.d.ts +0 -1
  490. package/index.js +0 -139
  491. package/materials/BlurPass.cjs.js +0 -1
  492. package/materials/BlurPass.d.ts +0 -23
  493. package/materials/BlurPass.js +0 -72
  494. package/materials/ConvolutionMaterial.cjs.js +0 -1
  495. package/materials/ConvolutionMaterial.d.ts +0 -7
  496. package/materials/ConvolutionMaterial.js +0 -97
  497. package/materials/DiscardMaterial.cjs.js +0 -1
  498. package/materials/DiscardMaterial.d.ts +0 -3
  499. package/materials/DiscardMaterial.js +0 -5
  500. package/materials/MeshReflectorMaterial.cjs.js +0 -1
  501. package/materials/MeshReflectorMaterial.d.ts +0 -50
  502. package/materials/MeshReflectorMaterial.js +0 -256
  503. package/materials/MeshRefractionMaterial.cjs.js +0 -1
  504. package/materials/MeshRefractionMaterial.d.ts +0 -18
  505. package/materials/MeshRefractionMaterial.js +0 -163
  506. package/materials/SpotLightMaterial.cjs.js +0 -1
  507. package/materials/SpotLightMaterial.d.ts +0 -4
  508. package/materials/SpotLightMaterial.js +0 -115
  509. package/materials/WireframeMaterial.cjs.js +0 -1
  510. package/materials/WireframeMaterial.d.ts +0 -64
  511. package/materials/WireframeMaterial.js +0 -217
  512. package/native/index.cjs.js +0 -1
  513. package/native/index.d.ts +0 -1
  514. package/native/index.js +0 -150
  515. package/web/CycleRaycast.cjs.js +0 -1
  516. package/web/CycleRaycast.d.ts +0 -10
  517. package/web/CycleRaycast.js +0 -93
  518. package/web/DragControls.cjs.js +0 -1
  519. package/web/DragControls.d.ts +0 -17
  520. package/web/DragControls.js +0 -127
  521. package/web/FaceControls.cjs.js +0 -1
  522. package/web/FaceControls.d.ts +0 -29
  523. package/web/FaceControls.js +0 -236
  524. package/web/FaceLandmarker.cjs.js +0 -1
  525. package/web/FaceLandmarker.d.ts +0 -14
  526. package/web/FaceLandmarker.js +0 -49
  527. package/web/Facemesh.cjs.js +0 -1
  528. package/web/Facemesh.d.ts +0 -118
  529. package/web/Facemesh.js +0 -4538
  530. package/web/Html.cjs.js +0 -1
  531. package/web/Html.d.ts +0 -34
  532. package/web/Html.js +0 -375
  533. package/web/KeyboardControls.cjs.js +0 -1
  534. package/web/KeyboardControls.d.ts +0 -37
  535. package/web/KeyboardControls.js +0 -104
  536. package/web/Loader.cjs.js +0 -1
  537. package/web/Loader.d.ts +0 -12
  538. package/web/Loader.js +0 -101
  539. package/web/PresentationControls.cjs.js +0 -1
  540. package/web/PresentationControls.d.ts +0 -16
  541. package/web/PresentationControls.js +0 -79
  542. package/web/ScreenVideoTexture.cjs.js +0 -1
  543. package/web/ScreenVideoTexture.d.ts +0 -17
  544. package/web/ScreenVideoTexture.js +0 -30
  545. package/web/ScrollControls.cjs.js +0 -1
  546. package/web/ScrollControls.d.ts +0 -45
  547. package/web/ScrollControls.js +0 -237
  548. package/web/Select.cjs.js +0 -1
  549. package/web/Select.d.ts +0 -14
  550. package/web/Select.js +0 -171
  551. package/web/View.cjs.js +0 -1
  552. package/web/View.d.ts +0 -34
  553. package/web/View.js +0 -259
  554. package/web/WebcamVideoTexture.cjs.js +0 -1
  555. package/web/WebcamVideoTexture.d.ts +0 -17
  556. package/web/WebcamVideoTexture.js +0 -33
  557. package/web/index.cjs.js +0 -1
  558. package/web/index.d.ts +0 -17
  559. package/web/index.js +0 -176
  560. package/web/pivotControls/AxisArrow.cjs.js +0 -1
  561. package/web/pivotControls/AxisArrow.d.ts +0 -7
  562. package/web/pivotControls/AxisArrow.js +0 -193
  563. package/web/pivotControls/AxisRotator.cjs.js +0 -1
  564. package/web/pivotControls/AxisRotator.d.ts +0 -7
  565. package/web/pivotControls/AxisRotator.js +0 -220
  566. package/web/pivotControls/PlaneSlider.cjs.js +0 -1
  567. package/web/pivotControls/PlaneSlider.d.ts +0 -7
  568. package/web/pivotControls/PlaneSlider.js +0 -202
  569. package/web/pivotControls/ScalingSphere.cjs.js +0 -1
  570. package/web/pivotControls/ScalingSphere.d.ts +0 -7
  571. package/web/pivotControls/ScalingSphere.js +0 -192
  572. package/web/pivotControls/context.cjs.js +0 -1
  573. package/web/pivotControls/context.d.ts +0 -33
  574. package/web/pivotControls/context.js +0 -5
  575. package/web/pivotControls/index.cjs.js +0 -1
  576. package/web/pivotControls/index.d.ts +0 -39
  577. package/web/pivotControls/index.js +0 -213
  578. package/web/useCursor.cjs.js +0 -1
  579. package/web/useCursor.d.ts +0 -1
  580. package/web/useCursor.js +0 -12
@@ -0,0 +1,4781 @@
1
+ //#region node_modules/@mediapipe/tasks-vision/vision_bundle.mjs
2
+ var t = "undefined" != typeof self ? self : {};
3
+ function e(e$1, n$1) {
4
+ t: {
5
+ for (var r$1 = ["CLOSURE_FLAGS"], i$1 = t, s$1 = 0; s$1 < r$1.length; s$1++) if (null == (i$1 = i$1[r$1[s$1]])) {
6
+ r$1 = null;
7
+ break t;
8
+ }
9
+ r$1 = i$1;
10
+ }
11
+ return null != (e$1 = r$1 && r$1[e$1]) ? e$1 : n$1;
12
+ }
13
+ function n() {
14
+ throw Error("Invalid UTF8");
15
+ }
16
+ function r(t$1, e$1) {
17
+ return e$1 = String.fromCharCode.apply(null, e$1), null == t$1 ? e$1 : t$1 + e$1;
18
+ }
19
+ let i, s;
20
+ const o = "undefined" != typeof TextDecoder;
21
+ let a;
22
+ const h = "undefined" != typeof TextEncoder;
23
+ function c(t$1) {
24
+ if (h) t$1 = (a ||= new TextEncoder()).encode(t$1);
25
+ else {
26
+ let n$1 = 0;
27
+ const r$1 = new Uint8Array(3 * t$1.length);
28
+ for (let i$1 = 0; i$1 < t$1.length; i$1++) {
29
+ var e$1 = t$1.charCodeAt(i$1);
30
+ if (e$1 < 128) r$1[n$1++] = e$1;
31
+ else {
32
+ if (e$1 < 2048) r$1[n$1++] = e$1 >> 6 | 192;
33
+ else {
34
+ if (e$1 >= 55296 && e$1 <= 57343) {
35
+ if (e$1 <= 56319 && i$1 < t$1.length) {
36
+ const s$1 = t$1.charCodeAt(++i$1);
37
+ if (s$1 >= 56320 && s$1 <= 57343) {
38
+ e$1 = 1024 * (e$1 - 55296) + s$1 - 56320 + 65536, r$1[n$1++] = e$1 >> 18 | 240, r$1[n$1++] = e$1 >> 12 & 63 | 128, r$1[n$1++] = e$1 >> 6 & 63 | 128, r$1[n$1++] = 63 & e$1 | 128;
39
+ continue;
40
+ }
41
+ i$1--;
42
+ }
43
+ e$1 = 65533;
44
+ }
45
+ r$1[n$1++] = e$1 >> 12 | 224, r$1[n$1++] = e$1 >> 6 & 63 | 128;
46
+ }
47
+ r$1[n$1++] = 63 & e$1 | 128;
48
+ }
49
+ }
50
+ t$1 = n$1 === r$1.length ? r$1 : r$1.subarray(0, n$1);
51
+ }
52
+ return t$1;
53
+ }
54
+ var u, l = e(610401301, !1), f = e(653718497, e(1, !0)), d = e(660014094, !1);
55
+ const p = t.navigator;
56
+ function g(t$1) {
57
+ return !!l && !!u && u.brands.some((({ brand: e$1 }) => e$1 && -1 != e$1.indexOf(t$1)));
58
+ }
59
+ function m(e$1) {
60
+ var n$1;
61
+ return (n$1 = t.navigator) && (n$1 = n$1.userAgent) || (n$1 = ""), -1 != n$1.indexOf(e$1);
62
+ }
63
+ function y() {
64
+ return !!l && !!u && u.brands.length > 0;
65
+ }
66
+ function _() {
67
+ return y() ? g("Chromium") : (m("Chrome") || m("CriOS")) && !(!y() && m("Edge")) || m("Silk");
68
+ }
69
+ function v(t$1) {
70
+ return v[" "](t$1), t$1;
71
+ }
72
+ u = p && p.userAgentData || null, v[" "] = function() {};
73
+ var E = !y() && (m("Trident") || m("MSIE"));
74
+ !m("Android") || _(), _(), m("Safari") && (_() || !y() && m("Coast") || !y() && m("Opera") || !y() && m("Edge") || (y() ? g("Microsoft Edge") : m("Edg/")) || y() && g("Opera"));
75
+ var w = {}, T = null;
76
+ function A(t$1) {
77
+ var e$1 = t$1.length, n$1 = 3 * e$1 / 4;
78
+ n$1 % 3 ? n$1 = Math.floor(n$1) : -1 != "=.".indexOf(t$1[e$1 - 1]) && (n$1 = -1 != "=.".indexOf(t$1[e$1 - 2]) ? n$1 - 2 : n$1 - 1);
79
+ var r$1 = new Uint8Array(n$1), i$1 = 0;
80
+ return function(t$2, e$2) {
81
+ function n$2(e$3) {
82
+ for (; r$2 < t$2.length;) {
83
+ var n$3 = t$2.charAt(r$2++), i$3 = T[n$3];
84
+ if (null != i$3) return i$3;
85
+ if (!/^[\s\xa0]*$/.test(n$3)) throw Error("Unknown base64 encoding at char: " + n$3);
86
+ }
87
+ return e$3;
88
+ }
89
+ b();
90
+ for (var r$2 = 0;;) {
91
+ var i$2 = n$2(-1), s$1 = n$2(0), o$1 = n$2(64), a$1 = n$2(64);
92
+ if (64 === a$1 && -1 === i$2) break;
93
+ e$2(i$2 << 2 | s$1 >> 4), 64 != o$1 && (e$2(s$1 << 4 & 240 | o$1 >> 2), 64 != a$1 && e$2(o$1 << 6 & 192 | a$1));
94
+ }
95
+ }(t$1, (function(t$2) {
96
+ r$1[i$1++] = t$2;
97
+ })), i$1 !== n$1 ? r$1.subarray(0, i$1) : r$1;
98
+ }
99
+ function b() {
100
+ if (!T) {
101
+ T = {};
102
+ for (var t$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), e$1 = [
103
+ "+/=",
104
+ "+/",
105
+ "-_=",
106
+ "-_.",
107
+ "-_"
108
+ ], n$1 = 0; n$1 < 5; n$1++) {
109
+ var r$1 = t$1.concat(e$1[n$1].split(""));
110
+ w[n$1] = r$1;
111
+ for (var i$1 = 0; i$1 < r$1.length; i$1++) {
112
+ var s$1 = r$1[i$1];
113
+ void 0 === T[s$1] && (T[s$1] = i$1);
114
+ }
115
+ }
116
+ }
117
+ }
118
+ var k = "undefined" != typeof Uint8Array, S = !E && "function" == typeof btoa;
119
+ function x(t$1) {
120
+ if (!S) {
121
+ var e$1;
122
+ void 0 === e$1 && (e$1 = 0), b(), e$1 = w[e$1];
123
+ var n$1 = Array(Math.floor(t$1.length / 3)), r$1 = e$1[64] || "";
124
+ let h$1 = 0, c$1 = 0;
125
+ for (; h$1 < t$1.length - 2; h$1 += 3) {
126
+ var i$1 = t$1[h$1], s$1 = t$1[h$1 + 1], o$1 = t$1[h$1 + 2], a$1 = e$1[i$1 >> 2];
127
+ i$1 = e$1[(3 & i$1) << 4 | s$1 >> 4], s$1 = e$1[(15 & s$1) << 2 | o$1 >> 6], o$1 = e$1[63 & o$1], n$1[c$1++] = a$1 + i$1 + s$1 + o$1;
128
+ }
129
+ switch (a$1 = 0, o$1 = r$1, t$1.length - h$1) {
130
+ case 2: o$1 = e$1[(15 & (a$1 = t$1[h$1 + 1])) << 2] || r$1;
131
+ case 1: t$1 = t$1[h$1], n$1[c$1] = e$1[t$1 >> 2] + e$1[(3 & t$1) << 4 | a$1 >> 4] + o$1 + r$1;
132
+ }
133
+ return n$1.join("");
134
+ }
135
+ for (e$1 = "", n$1 = 0, r$1 = t$1.length - 10240; n$1 < r$1;) e$1 += String.fromCharCode.apply(null, t$1.subarray(n$1, n$1 += 10240));
136
+ return e$1 += String.fromCharCode.apply(null, n$1 ? t$1.subarray(n$1) : t$1), btoa(e$1);
137
+ }
138
+ const L = /[-_.]/g, R = {
139
+ "-": "+",
140
+ _: "/",
141
+ ".": "="
142
+ };
143
+ function F(t$1) {
144
+ return R[t$1] || "";
145
+ }
146
+ function M(t$1) {
147
+ if (!S) return A(t$1);
148
+ L.test(t$1) && (t$1 = t$1.replace(L, F)), t$1 = atob(t$1);
149
+ const e$1 = new Uint8Array(t$1.length);
150
+ for (let n$1 = 0; n$1 < t$1.length; n$1++) e$1[n$1] = t$1.charCodeAt(n$1);
151
+ return e$1;
152
+ }
153
+ function I(t$1) {
154
+ return k && null != t$1 && t$1 instanceof Uint8Array;
155
+ }
156
+ var P = {};
157
+ let O;
158
+ function C(t$1) {
159
+ if (t$1 !== P) throw Error("illegal external caller");
160
+ }
161
+ function N() {
162
+ return O ||= new D(null, P);
163
+ }
164
+ function U(t$1) {
165
+ C(P);
166
+ var e$1 = t$1.ba;
167
+ return null == (e$1 = null == e$1 || I(e$1) ? e$1 : "string" == typeof e$1 ? M(e$1) : null) ? e$1 : t$1.ba = e$1;
168
+ }
169
+ var D = class {
170
+ constructor(t$1, e$1) {
171
+ if (C(e$1), this.ba = t$1, null != t$1 && 0 === t$1.length) throw Error("ByteString should be constructed with non-empty values");
172
+ }
173
+ ua() {
174
+ return new Uint8Array(U(this) || 0);
175
+ }
176
+ };
177
+ function B(t$1, e$1) {
178
+ t$1.__closure__error__context__984382 || (t$1.__closure__error__context__984382 = {}), t$1.__closure__error__context__984382.severity = e$1;
179
+ }
180
+ let G;
181
+ function j() {
182
+ const e$1 = Error();
183
+ B(e$1, "incident"), function(e$2) {
184
+ t.setTimeout((() => {
185
+ throw e$2;
186
+ }), 0);
187
+ }(e$1);
188
+ }
189
+ function V(t$1) {
190
+ return B(t$1 = Error(t$1), "warning"), t$1;
191
+ }
192
+ function X() {
193
+ return "function" == typeof BigInt;
194
+ }
195
+ function H(t$1) {
196
+ return Array.prototype.slice.call(t$1);
197
+ }
198
+ var W = "function" == typeof Symbol && "symbol" == typeof Symbol();
199
+ function z(t$1) {
200
+ return "function" == typeof Symbol && "symbol" == typeof Symbol() ? Symbol() : t$1;
201
+ }
202
+ var K = z(), Y = z("0di"), $ = z("2ex"), q = z("1oa"), J = z("0dg"), Z = W ? (t$1, e$1) => {
203
+ t$1[K] |= e$1;
204
+ } : (t$1, e$1) => {
205
+ void 0 !== t$1.G ? t$1.G |= e$1 : Object.defineProperties(t$1, { G: {
206
+ value: e$1,
207
+ configurable: !0,
208
+ writable: !0,
209
+ enumerable: !1
210
+ } });
211
+ }, Q = W ? (t$1, e$1) => {
212
+ t$1[K] &= ~e$1;
213
+ } : (t$1, e$1) => {
214
+ void 0 !== t$1.G && (t$1.G &= ~e$1);
215
+ }, tt = W ? (t$1) => 0 | t$1[K] : (t$1) => 0 | t$1.G, et = W ? (t$1) => t$1[K] : (t$1) => t$1.G, nt = W ? (t$1, e$1) => {
216
+ t$1[K] = e$1;
217
+ } : (t$1, e$1) => {
218
+ void 0 !== t$1.G ? t$1.G = e$1 : Object.defineProperties(t$1, { G: {
219
+ value: e$1,
220
+ configurable: !0,
221
+ writable: !0,
222
+ enumerable: !1
223
+ } });
224
+ };
225
+ function rt(t$1) {
226
+ return Z(t$1, 34), t$1;
227
+ }
228
+ function it(t$1, e$1) {
229
+ nt(e$1, -14591 & (0 | t$1));
230
+ }
231
+ function st(t$1, e$1) {
232
+ nt(e$1, -14557 & (34 | t$1));
233
+ }
234
+ var ot, at = {}, ht = {};
235
+ function ct(t$1) {
236
+ return !(!t$1 || "object" != typeof t$1 || t$1.La !== ht);
237
+ }
238
+ function ut(t$1) {
239
+ return null !== t$1 && "object" == typeof t$1 && !Array.isArray(t$1) && t$1.constructor === Object;
240
+ }
241
+ function lt(t$1, e$1, n$1) {
242
+ if (null != t$1) {
243
+ if ("string" == typeof t$1) t$1 = t$1 ? new D(t$1, P) : N();
244
+ else if (t$1.constructor !== D) if (I(t$1)) t$1 = t$1.length ? new D(n$1 ? t$1 : new Uint8Array(t$1), P) : N();
245
+ else {
246
+ if (!e$1) throw Error();
247
+ t$1 = void 0;
248
+ }
249
+ }
250
+ return t$1;
251
+ }
252
+ function ft(t$1) {
253
+ return !(!Array.isArray(t$1) || t$1.length) && !!(1 & tt(t$1));
254
+ }
255
+ const dt = [];
256
+ function pt(t$1) {
257
+ if (2 & t$1) throw Error();
258
+ }
259
+ nt(dt, 55), ot = Object.freeze(dt);
260
+ var gt = class gt {
261
+ constructor(t$1, e$1, n$1) {
262
+ this.l = 0, this.g = t$1, this.h = e$1, this.m = n$1;
263
+ }
264
+ next() {
265
+ if (this.l < this.g.length) {
266
+ const t$1 = this.g[this.l++];
267
+ return {
268
+ done: !1,
269
+ value: this.h ? this.h.call(this.m, t$1) : t$1
270
+ };
271
+ }
272
+ return {
273
+ done: !0,
274
+ value: void 0
275
+ };
276
+ }
277
+ [Symbol.iterator]() {
278
+ return new gt(this.g, this.h, this.m);
279
+ }
280
+ };
281
+ let mt;
282
+ function yt(t$1, e$1) {
283
+ (e$1 = mt ? e$1[mt] : void 0) && (t$1[mt] = H(e$1));
284
+ }
285
+ var _t = Object.freeze({});
286
+ Object.freeze({});
287
+ var vt = Object.freeze({});
288
+ function Et(t$1) {
289
+ return t$1.Sa = !0, t$1;
290
+ }
291
+ var wt = Et(((t$1) => "number" == typeof t$1)), Tt = Et(((t$1) => "string" == typeof t$1)), At = Et(((t$1) => "boolean" == typeof t$1)), bt = "function" == typeof t.BigInt && "bigint" == typeof t.BigInt(0), kt = Et(((t$1) => bt ? t$1 >= xt && t$1 <= Rt : "-" === t$1[0] ? Ft(t$1, St) : Ft(t$1, Lt)));
292
+ const St = Number.MIN_SAFE_INTEGER.toString(), xt = bt ? BigInt(Number.MIN_SAFE_INTEGER) : void 0, Lt = Number.MAX_SAFE_INTEGER.toString(), Rt = bt ? BigInt(Number.MAX_SAFE_INTEGER) : void 0;
293
+ function Ft(t$1, e$1) {
294
+ if (t$1.length > e$1.length) return !1;
295
+ if (t$1.length < e$1.length || t$1 === e$1) return !0;
296
+ for (let n$1 = 0; n$1 < t$1.length; n$1++) {
297
+ const r$1 = t$1[n$1], i$1 = e$1[n$1];
298
+ if (r$1 > i$1) return !1;
299
+ if (r$1 < i$1) return !0;
300
+ }
301
+ }
302
+ const Mt = "function" == typeof Uint8Array.prototype.slice;
303
+ let It, Pt = 0, Ot = 0;
304
+ function Ct(t$1) {
305
+ const e$1 = t$1 >>> 0;
306
+ Pt = e$1, Ot = (t$1 - e$1) / 4294967296 >>> 0;
307
+ }
308
+ function Nt(t$1) {
309
+ if (t$1 < 0) {
310
+ Ct(-t$1);
311
+ const [e$1, n$1] = Xt(Pt, Ot);
312
+ Pt = e$1 >>> 0, Ot = n$1 >>> 0;
313
+ } else Ct(t$1);
314
+ }
315
+ function Ut(t$1) {
316
+ const e$1 = It ||= /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));
317
+ e$1.setFloat32(0, +t$1, !0), Ot = 0, Pt = e$1.getUint32(0, !0);
318
+ }
319
+ function Dt(t$1, e$1) {
320
+ return 4294967296 * e$1 + (t$1 >>> 0);
321
+ }
322
+ function Bt(t$1, e$1) {
323
+ const n$1 = 2147483648 & e$1;
324
+ return n$1 && (e$1 = ~e$1 >>> 0, 0 == (t$1 = 1 + ~t$1 >>> 0) && (e$1 = e$1 + 1 >>> 0)), t$1 = Dt(t$1, e$1), n$1 ? -t$1 : t$1;
325
+ }
326
+ function Gt(t$1, e$1) {
327
+ if (t$1 >>>= 0, (e$1 >>>= 0) <= 2097151) var n$1 = "" + (4294967296 * e$1 + t$1);
328
+ else X() ? n$1 = "" + (BigInt(e$1) << BigInt(32) | BigInt(t$1)) : (t$1 = (16777215 & t$1) + 6777216 * (n$1 = 16777215 & (t$1 >>> 24 | e$1 << 8)) + 6710656 * (e$1 = e$1 >> 16 & 65535), n$1 += 8147497 * e$1, e$1 *= 2, t$1 >= 1e7 && (n$1 += t$1 / 1e7 >>> 0, t$1 %= 1e7), n$1 >= 1e7 && (e$1 += n$1 / 1e7 >>> 0, n$1 %= 1e7), n$1 = e$1 + jt(n$1) + jt(t$1));
329
+ return n$1;
330
+ }
331
+ function jt(t$1) {
332
+ return t$1 = String(t$1), "0000000".slice(t$1.length) + t$1;
333
+ }
334
+ function Vt(t$1) {
335
+ if (t$1.length < 16) Nt(Number(t$1));
336
+ else if (X()) t$1 = BigInt(t$1), Pt = Number(t$1 & BigInt(4294967295)) >>> 0, Ot = Number(t$1 >> BigInt(32) & BigInt(4294967295));
337
+ else {
338
+ const e$1 = +("-" === t$1[0]);
339
+ Ot = Pt = 0;
340
+ const n$1 = t$1.length;
341
+ for (let r$1 = e$1, i$1 = (n$1 - e$1) % 6 + e$1; i$1 <= n$1; r$1 = i$1, i$1 += 6) {
342
+ const e$2 = Number(t$1.slice(r$1, i$1));
343
+ Ot *= 1e6, Pt = 1e6 * Pt + e$2, Pt >= 4294967296 && (Ot += Math.trunc(Pt / 4294967296), Ot >>>= 0, Pt >>>= 0);
344
+ }
345
+ if (e$1) {
346
+ const [t$2, e$2] = Xt(Pt, Ot);
347
+ Pt = t$2, Ot = e$2;
348
+ }
349
+ }
350
+ }
351
+ function Xt(t$1, e$1) {
352
+ return e$1 = ~e$1, t$1 ? t$1 = 1 + ~t$1 : e$1 += 1, [t$1, e$1];
353
+ }
354
+ function Ht(t$1) {
355
+ return null == t$1 || "number" == typeof t$1 ? t$1 : "NaN" === t$1 || "Infinity" === t$1 || "-Infinity" === t$1 ? Number(t$1) : void 0;
356
+ }
357
+ function Wt(t$1) {
358
+ return null == t$1 || "boolean" == typeof t$1 ? t$1 : "number" == typeof t$1 ? !!t$1 : void 0;
359
+ }
360
+ const zt = /^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;
361
+ function Kt(t$1) {
362
+ const e$1 = typeof t$1;
363
+ switch (e$1) {
364
+ case "bigint": return !0;
365
+ case "number": return Number.isFinite(t$1);
366
+ }
367
+ return "string" === e$1 && zt.test(t$1);
368
+ }
369
+ function Yt(t$1) {
370
+ if (null == t$1) return t$1;
371
+ if ("string" == typeof t$1) {
372
+ if (!t$1) return;
373
+ t$1 = +t$1;
374
+ }
375
+ return "number" == typeof t$1 && Number.isFinite(t$1) ? 0 | t$1 : void 0;
376
+ }
377
+ function $t(t$1) {
378
+ if (null == t$1) return t$1;
379
+ if ("string" == typeof t$1) {
380
+ if (!t$1) return;
381
+ t$1 = +t$1;
382
+ }
383
+ return "number" == typeof t$1 && Number.isFinite(t$1) ? t$1 >>> 0 : void 0;
384
+ }
385
+ function qt(t$1) {
386
+ return "-" !== t$1[0] && (t$1.length < 20 || 20 === t$1.length && Number(t$1.substring(0, 6)) < 184467);
387
+ }
388
+ function Jt(t$1) {
389
+ return t$1 = Math.trunc(t$1), Number.isSafeInteger(t$1) || (Nt(t$1), t$1 = Bt(Pt, Ot)), t$1;
390
+ }
391
+ function Zt(t$1) {
392
+ var e$1 = Math.trunc(Number(t$1));
393
+ if (Number.isSafeInteger(e$1)) return String(e$1);
394
+ if (-1 !== (e$1 = t$1.indexOf(".")) && (t$1 = t$1.substring(0, e$1)), !("-" === t$1[0] ? t$1.length < 20 || 20 === t$1.length && Number(t$1.substring(0, 7)) > -922337 : t$1.length < 19 || 19 === t$1.length && Number(t$1.substring(0, 6)) < 922337)) if (Vt(t$1), t$1 = Pt, 2147483648 & (e$1 = Ot)) if (X()) t$1 = "" + (BigInt(0 | e$1) << BigInt(32) | BigInt(t$1 >>> 0));
395
+ else {
396
+ const [n$1, r$1] = Xt(t$1, e$1);
397
+ t$1 = "-" + Gt(n$1, r$1);
398
+ }
399
+ else t$1 = Gt(t$1, e$1);
400
+ return t$1;
401
+ }
402
+ function Qt(t$1) {
403
+ return null == t$1 ? t$1 : "bigint" == typeof t$1 ? (kt(t$1) ? t$1 = Number(t$1) : (t$1 = BigInt.asIntN(64, t$1), t$1 = kt(t$1) ? Number(t$1) : String(t$1)), t$1) : Kt(t$1) ? "number" == typeof t$1 ? Jt(t$1) : Zt(t$1) : void 0;
404
+ }
405
+ function te(t$1) {
406
+ if (null == t$1) return t$1;
407
+ var e$1 = typeof t$1;
408
+ if ("bigint" === e$1) return String(BigInt.asUintN(64, t$1));
409
+ if (Kt(t$1)) {
410
+ if ("string" === e$1) return e$1 = Math.trunc(Number(t$1)), Number.isSafeInteger(e$1) && e$1 >= 0 ? t$1 = String(e$1) : (-1 !== (e$1 = t$1.indexOf(".")) && (t$1 = t$1.substring(0, e$1)), qt(t$1) || (Vt(t$1), t$1 = Gt(Pt, Ot))), t$1;
411
+ if ("number" === e$1) return (t$1 = Math.trunc(t$1)) >= 0 && Number.isSafeInteger(t$1) ? t$1 : function(t$2) {
412
+ if (t$2 < 0) {
413
+ Nt(t$2);
414
+ const e$2 = Gt(Pt, Ot);
415
+ return t$2 = Number(e$2), Number.isSafeInteger(t$2) ? t$2 : e$2;
416
+ }
417
+ return qt(String(t$2)) ? t$2 : (Nt(t$2), Dt(Pt, Ot));
418
+ }(t$1);
419
+ }
420
+ }
421
+ function ee(t$1) {
422
+ if ("string" != typeof t$1) throw Error();
423
+ return t$1;
424
+ }
425
+ function ne(t$1) {
426
+ if (null != t$1 && "string" != typeof t$1) throw Error();
427
+ return t$1;
428
+ }
429
+ function re(t$1) {
430
+ return null == t$1 || "string" == typeof t$1 ? t$1 : void 0;
431
+ }
432
+ function ie(t$1, e$1, n$1, r$1) {
433
+ if (null != t$1 && "object" == typeof t$1 && t$1.Y === at) return t$1;
434
+ if (!Array.isArray(t$1)) return n$1 ? 2 & r$1 ? (t$1 = e$1[Y]) ? e$1 = t$1 : (rt((t$1 = new e$1()).u), e$1 = e$1[Y] = t$1) : e$1 = new e$1() : e$1 = void 0, e$1;
435
+ let i$1 = n$1 = tt(t$1);
436
+ return 0 === i$1 && (i$1 |= 32 & r$1), i$1 |= 2 & r$1, i$1 !== n$1 && nt(t$1, i$1), new e$1(t$1);
437
+ }
438
+ function se(t$1, e$1, n$1) {
439
+ if (e$1) t: {
440
+ if (!Kt(e$1 = t$1)) throw V("int64");
441
+ switch (typeof e$1) {
442
+ case "string":
443
+ e$1 = Zt(e$1);
444
+ break t;
445
+ case "bigint":
446
+ if (t$1 = e$1 = BigInt.asIntN(64, e$1), Tt(t$1)) {
447
+ if (!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t$1)) throw Error(String(t$1));
448
+ } else if (wt(t$1) && !Number.isSafeInteger(t$1)) throw Error(String(t$1));
449
+ e$1 = bt ? BigInt(e$1) : At(e$1) ? e$1 ? "1" : "0" : Tt(e$1) ? e$1.trim() || "0" : String(e$1);
450
+ break t;
451
+ default: e$1 = Jt(e$1);
452
+ }
453
+ }
454
+ else e$1 = Qt(t$1);
455
+ return "string" == typeof (n$1 = null == (t$1 = e$1) ? n$1 ? 0 : void 0 : t$1) && (e$1 = +n$1, Number.isSafeInteger(e$1)) ? e$1 : n$1;
456
+ }
457
+ function oe(t$1) {
458
+ if (void 0 === ce && (ce = "function" == typeof Proxy ? ye(Proxy) : null), !ce || !me()) return t$1;
459
+ let e$1 = ae?.get(t$1);
460
+ return e$1 || (Math.random() > .01 ? t$1 : (function(t$2) {
461
+ if (void 0 === le) {
462
+ const t$3 = new ce([], {});
463
+ le = 1 === Array.prototype.concat.call([], t$3).length;
464
+ }
465
+ le && "function" == typeof Symbol && Symbol.isConcatSpreadable && (t$2[Symbol.isConcatSpreadable] = !0);
466
+ }(t$1), e$1 = new ce(t$1, { set: (t$2, e$2, n$1) => (j(), t$2[e$2] = n$1, !0) }), function(t$2, e$2) {
467
+ (ae ||= new ue()).set(t$2, e$2), (he ||= new ue()).set(e$2, t$2);
468
+ }(t$1, e$1), e$1));
469
+ }
470
+ let ae, he, ce, ue, le, fe, de, pe, ge;
471
+ function me() {
472
+ return void 0 === ue && (ue = "function" == typeof WeakMap ? ye(WeakMap) : null), ue;
473
+ }
474
+ function ye(t$1) {
475
+ try {
476
+ return -1 !== t$1.toString().indexOf("[native code]") ? t$1 : null;
477
+ } catch {
478
+ return null;
479
+ }
480
+ }
481
+ function _e(t$1, e$1, n$1) {
482
+ if (f && me()) {
483
+ if (fe?.get(e$1)?.get(t$1)) {
484
+ if (n$1) return;
485
+ } else if (Math.random() > .01) return;
486
+ var r$1 = t$1.length;
487
+ n$1 = { length: r$1 };
488
+ for (var i$1 = 0; i$1 < Math.min(r$1, 10); i$1++) {
489
+ if (r$1 <= 10) var s$1 = i$1;
490
+ else {
491
+ s$1 = r$1 / 10;
492
+ const t$2 = Math.floor(i$1 * s$1);
493
+ s$1 = t$2 + Math.floor(Math.random() * (Math.floor((i$1 + 1) * s$1) - t$2));
494
+ }
495
+ n$1[s$1] = t$1[s$1];
496
+ }
497
+ Ee(t$1, n$1) ? ((i$1 = (r$1 = fe ||= new ue()).get(e$1)) || (i$1 = new ue(), r$1.set(e$1, i$1)), i$1.set(t$1, n$1)) : (j(), Te(t$1, e$1));
498
+ }
499
+ }
500
+ function ve(t$1, e$1) {
501
+ const n$1 = fe?.get(e$1)?.get(t$1);
502
+ n$1 && !Ee(t$1, n$1) && (j(), Te(t$1, e$1));
503
+ }
504
+ function Ee(t$1, e$1) {
505
+ if (t$1.length !== e$1.length) return !1;
506
+ for (const i$1 in e$1) {
507
+ var n$1, r$1 = Number(i$1);
508
+ if ((n$1 = Number.isInteger(r$1)) && (n$1 = t$1[r$1], r$1 = e$1[r$1], n$1 = !(Number.isNaN(n$1) ? Number.isNaN(r$1) : n$1 === r$1)), n$1) return !1;
509
+ }
510
+ return !0;
511
+ }
512
+ function we(t$1) {
513
+ if (t$1 && fe?.has(t$1)) {
514
+ var e$1 = t$1.u;
515
+ if (e$1) for (let n$1 = 0; n$1 < e$1.length; n$1++) {
516
+ const r$1 = e$1[n$1];
517
+ if (n$1 === e$1.length - 1 && ut(r$1)) for (const e$2 in r$1) {
518
+ const n$2 = r$1[e$2];
519
+ Array.isArray(n$2) && ve(n$2, t$1);
520
+ }
521
+ else Array.isArray(r$1) && ve(r$1, t$1);
522
+ }
523
+ }
524
+ }
525
+ function Te(t$1, e$1) {
526
+ fe?.get(e$1)?.delete(t$1);
527
+ }
528
+ function Ae(t$1, e$1) {
529
+ return t$1 = be(t$1, e$1[0], e$1[1]), Z(t$1, 16384), t$1;
530
+ }
531
+ function be(t$1, e$1, n$1) {
532
+ if (t$1 ??= de, de = void 0, null == t$1) {
533
+ var r$1 = 96;
534
+ n$1 ? (t$1 = [n$1], r$1 |= 512) : t$1 = [], e$1 && (r$1 = -33521665 & r$1 | (1023 & e$1) << 15);
535
+ } else {
536
+ if (!Array.isArray(t$1)) throw Error("narr");
537
+ if (2048 & (r$1 = tt(t$1))) throw Error("farr");
538
+ if (64 & r$1) return t$1;
539
+ if (r$1 |= 64, n$1 && (r$1 |= 512, n$1 !== t$1[0])) throw Error("mid");
540
+ t: {
541
+ const i$1 = (n$1 = t$1).length;
542
+ if (i$1) {
543
+ const t$2 = i$1 - 1;
544
+ if (ut(n$1[t$2])) {
545
+ if ((e$1 = t$2 - (+!!(512 & (r$1 |= 256)) - 1)) >= 1024) throw Error("pvtlmt");
546
+ r$1 = -33521665 & r$1 | (1023 & e$1) << 15;
547
+ break t;
548
+ }
549
+ }
550
+ if (e$1) {
551
+ if ((e$1 = Math.max(e$1, i$1 - (+!!(512 & r$1) - 1))) > 1024) throw Error("spvt");
552
+ r$1 = -33521665 & r$1 | (1023 & e$1) << 15;
553
+ }
554
+ }
555
+ }
556
+ return nt(t$1, r$1), t$1;
557
+ }
558
+ const ke = {};
559
+ let Se = function() {
560
+ try {
561
+ return v(new class extends Map {
562
+ constructor() {
563
+ super();
564
+ }
565
+ }()), !1;
566
+ } catch {
567
+ return !0;
568
+ }
569
+ }();
570
+ var xe = class {
571
+ constructor() {
572
+ this.g = /* @__PURE__ */ new Map();
573
+ }
574
+ get(t$1) {
575
+ return this.g.get(t$1);
576
+ }
577
+ set(t$1, e$1) {
578
+ return this.g.set(t$1, e$1), this.size = this.g.size, this;
579
+ }
580
+ delete(t$1) {
581
+ return t$1 = this.g.delete(t$1), this.size = this.g.size, t$1;
582
+ }
583
+ clear() {
584
+ this.g.clear(), this.size = this.g.size;
585
+ }
586
+ has(t$1) {
587
+ return this.g.has(t$1);
588
+ }
589
+ entries() {
590
+ return this.g.entries();
591
+ }
592
+ keys() {
593
+ return this.g.keys();
594
+ }
595
+ values() {
596
+ return this.g.values();
597
+ }
598
+ forEach(t$1, e$1) {
599
+ return this.g.forEach(t$1, e$1);
600
+ }
601
+ [Symbol.iterator]() {
602
+ return this.entries();
603
+ }
604
+ };
605
+ const Le = Se ? (Object.setPrototypeOf(xe.prototype, Map.prototype), Object.defineProperties(xe.prototype, { size: {
606
+ value: 0,
607
+ configurable: !0,
608
+ enumerable: !0,
609
+ writable: !0
610
+ } }), xe) : class extends Map {
611
+ constructor() {
612
+ super();
613
+ }
614
+ };
615
+ function Re(t$1) {
616
+ return t$1;
617
+ }
618
+ function Fe(t$1) {
619
+ if (2 & t$1.M) throw Error("Cannot mutate an immutable Map");
620
+ }
621
+ var Me = class extends Le {
622
+ constructor(t$1, e$1, n$1 = Re, r$1 = Re) {
623
+ super();
624
+ let i$1 = tt(t$1);
625
+ i$1 |= 64, nt(t$1, i$1), this.M = i$1, this.U = e$1, this.T = n$1, this.aa = this.U ? Ie : r$1;
626
+ for (let s$1 = 0; s$1 < t$1.length; s$1++) {
627
+ const o$1 = t$1[s$1], a$1 = n$1(o$1[0], !1, !0);
628
+ let h$1 = o$1[1];
629
+ e$1 ? void 0 === h$1 && (h$1 = null) : h$1 = r$1(o$1[1], !1, !0, void 0, void 0, i$1), super.set(a$1, h$1);
630
+ }
631
+ }
632
+ pa(t$1 = Pe) {
633
+ if (0 !== this.size) return this.Z(t$1);
634
+ }
635
+ Z(t$1 = Pe) {
636
+ const e$1 = [], n$1 = super.entries();
637
+ for (var r$1; !(r$1 = n$1.next()).done;) (r$1 = r$1.value)[0] = t$1(r$1[0]), r$1[1] = t$1(r$1[1]), e$1.push(r$1);
638
+ return e$1;
639
+ }
640
+ clear() {
641
+ Fe(this), super.clear();
642
+ }
643
+ delete(t$1) {
644
+ return Fe(this), super.delete(this.T(t$1, !0, !1));
645
+ }
646
+ entries() {
647
+ return new gt(this.oa(), Oe, this);
648
+ }
649
+ keys() {
650
+ return this.Ka();
651
+ }
652
+ values() {
653
+ return new gt(this.oa(), Me.prototype.get, this);
654
+ }
655
+ forEach(t$1, e$1) {
656
+ super.forEach(((n$1, r$1) => {
657
+ t$1.call(e$1, this.get(r$1), r$1, this);
658
+ }));
659
+ }
660
+ set(t$1, e$1) {
661
+ return Fe(this), null == (t$1 = this.T(t$1, !0, !1)) ? this : null == e$1 ? (super.delete(t$1), this) : super.set(t$1, this.aa(e$1, !0, !0, this.U, !1, this.M));
662
+ }
663
+ Qa(t$1) {
664
+ const e$1 = this.T(t$1[0], !1, !0);
665
+ t$1 = t$1[1], t$1 = this.U ? void 0 === t$1 ? null : t$1 : this.aa(t$1, !1, !0, void 0, !1, this.M), super.set(e$1, t$1);
666
+ }
667
+ has(t$1) {
668
+ return super.has(this.T(t$1, !1, !1));
669
+ }
670
+ get(t$1) {
671
+ t$1 = this.T(t$1, !1, !1);
672
+ const e$1 = super.get(t$1);
673
+ if (void 0 !== e$1) {
674
+ var n$1 = this.U;
675
+ return n$1 ? ((n$1 = this.aa(e$1, !1, !0, n$1, this.va, this.M)) !== e$1 && super.set(t$1, n$1), n$1) : e$1;
676
+ }
677
+ }
678
+ oa() {
679
+ return Array.from(super.keys());
680
+ }
681
+ Ka() {
682
+ return super.keys();
683
+ }
684
+ [Symbol.iterator]() {
685
+ return this.entries();
686
+ }
687
+ };
688
+ function Ie(t$1, e$1, n$1, r$1, i$1, s$1) {
689
+ return t$1 = ie(t$1, r$1, n$1, s$1), i$1 && (t$1 = He(t$1)), t$1;
690
+ }
691
+ function Pe(t$1) {
692
+ return t$1;
693
+ }
694
+ function Oe(t$1) {
695
+ return [t$1, this.get(t$1)];
696
+ }
697
+ let Ce;
698
+ function Ne() {
699
+ return Ce ||= new Me(rt([]), void 0, void 0, void 0, ke);
700
+ }
701
+ function Ue(t$1, e$1, n$1, r$1, i$1) {
702
+ if (null != t$1) {
703
+ if (Array.isArray(t$1)) t$1 = ft(t$1) ? void 0 : i$1 && 2 & tt(t$1) ? t$1 : De(t$1, e$1, n$1, void 0 !== r$1, i$1);
704
+ else if (ut(t$1)) {
705
+ const s$1 = {};
706
+ for (let o$1 in t$1) s$1[o$1] = Ue(t$1[o$1], e$1, n$1, r$1, i$1);
707
+ t$1 = s$1;
708
+ } else t$1 = e$1(t$1, r$1);
709
+ return t$1;
710
+ }
711
+ }
712
+ function De(t$1, e$1, n$1, r$1, i$1) {
713
+ const s$1 = r$1 || n$1 ? tt(t$1) : 0;
714
+ r$1 = r$1 ? !!(32 & s$1) : void 0;
715
+ const o$1 = H(t$1);
716
+ for (let t$2 = 0; t$2 < o$1.length; t$2++) o$1[t$2] = Ue(o$1[t$2], e$1, n$1, r$1, i$1);
717
+ return n$1 && (yt(o$1, t$1), n$1(s$1, o$1)), o$1;
718
+ }
719
+ function Be(t$1) {
720
+ return Ue(t$1, Ge, void 0, void 0, !1);
721
+ }
722
+ function Ge(t$1) {
723
+ return t$1.Y === at ? t$1.toJSON() : t$1 instanceof Me ? t$1.pa(Be) : function(t$2) {
724
+ switch (typeof t$2) {
725
+ case "number": return isFinite(t$2) ? t$2 : String(t$2);
726
+ case "bigint": return kt(t$2) ? Number(t$2) : String(t$2);
727
+ case "boolean": return t$2 ? 1 : 0;
728
+ case "object": if (t$2) if (Array.isArray(t$2)) {
729
+ if (ft(t$2)) return;
730
+ } else {
731
+ if (I(t$2)) return x(t$2);
732
+ if (t$2 instanceof D) {
733
+ const e$1 = t$2.ba;
734
+ return null == e$1 ? "" : "string" == typeof e$1 ? e$1 : t$2.ba = x(e$1);
735
+ }
736
+ if (t$2 instanceof Me) return t$2.pa();
737
+ }
738
+ }
739
+ return t$2;
740
+ }(t$1);
741
+ }
742
+ function je(t$1, e$1, n$1 = st) {
743
+ if (null != t$1) {
744
+ if (k && t$1 instanceof Uint8Array) return e$1 ? t$1 : new Uint8Array(t$1);
745
+ if (Array.isArray(t$1)) {
746
+ var r$1 = tt(t$1);
747
+ return 2 & r$1 ? t$1 : (e$1 &&= 0 === r$1 || !!(32 & r$1) && !(64 & r$1 || !(16 & r$1)), e$1 ? (nt(t$1, -12293 & (34 | r$1)), t$1) : De(t$1, je, 4 & r$1 ? st : n$1, !0, !0));
748
+ }
749
+ return t$1.Y === at ? (n$1 = t$1.u, t$1 = 2 & (r$1 = et(n$1)) ? t$1 : Ve(t$1, n$1, r$1, !0)) : t$1 instanceof Me && !(2 & t$1.M) && (n$1 = rt(t$1.Z(je)), t$1 = new Me(n$1, t$1.U, t$1.T, t$1.aa)), t$1;
750
+ }
751
+ }
752
+ function Ve(t$1, e$1, n$1, r$1) {
753
+ return we(t$1), t$1 = t$1.constructor, de = e$1 = Xe(e$1, n$1, r$1), e$1 = new t$1(e$1), de = void 0, e$1;
754
+ }
755
+ function Xe(t$1, e$1, n$1) {
756
+ const r$1 = n$1 || 2 & e$1 ? st : it, i$1 = !!(32 & e$1);
757
+ return t$1 = function(t$2, e$2, n$2) {
758
+ const r$2 = H(t$2);
759
+ var i$2 = r$2.length;
760
+ const s$1 = 256 & e$2 ? r$2[i$2 - 1] : void 0;
761
+ for (i$2 += s$1 ? -1 : 0, e$2 = 512 & e$2 ? 1 : 0; e$2 < i$2; e$2++) r$2[e$2] = n$2(r$2[e$2]);
762
+ if (s$1) {
763
+ e$2 = r$2[e$2] = {};
764
+ for (const t$3 in s$1) e$2[t$3] = n$2(s$1[t$3]);
765
+ }
766
+ return yt(r$2, t$2), r$2;
767
+ }(t$1, e$1, ((t$2) => je(t$2, i$1, r$1))), Z(t$1, 32 | (n$1 ? 2 : 0)), t$1;
768
+ }
769
+ function He(t$1) {
770
+ const e$1 = t$1.u, n$1 = et(e$1);
771
+ return 2 & n$1 ? Ve(t$1, e$1, n$1, !1) : t$1;
772
+ }
773
+ function We(t$1, e$1, n$1, r$1) {
774
+ return !(4 & e$1) || null != n$1 && (!r$1 && 0 === n$1 && (4096 & e$1 || 8192 & e$1) && (t$1.constructor[J] = 1 + (0 | t$1.constructor[J])) < 5 && j(), 0 !== n$1 && !(n$1 & e$1));
775
+ }
776
+ function ze(t$1, e$1) {
777
+ return Ye(t$1 = t$1.u, et(t$1), e$1);
778
+ }
779
+ function Ke(t$1, e$1, n$1, r$1) {
780
+ if (!((e$1 = r$1 + (+!!(512 & e$1) - 1)) < 0 || e$1 >= t$1.length || e$1 >= n$1)) return t$1[e$1];
781
+ }
782
+ function Ye(t$1, e$1, n$1, r$1) {
783
+ if (-1 === n$1) return null;
784
+ const i$1 = e$1 >> 15 & 1023 || 536870912;
785
+ if (!(n$1 >= i$1)) {
786
+ var s$1 = t$1.length;
787
+ return r$1 && 256 & e$1 && null != (r$1 = t$1[s$1 - 1][n$1]) ? (Ke(t$1, e$1, i$1, n$1) && null != $ && ((e$1 = (t$1 = G ??= {})[$] || 0) >= 4 || (t$1[$] = e$1 + 1, j())), r$1) : Ke(t$1, e$1, i$1, n$1);
788
+ }
789
+ return 256 & e$1 ? t$1[t$1.length - 1][n$1] : void 0;
790
+ }
791
+ function $e(t$1, e$1, n$1) {
792
+ const r$1 = t$1.u;
793
+ let i$1 = et(r$1);
794
+ return pt(i$1), qe(r$1, i$1, e$1, n$1), t$1;
795
+ }
796
+ function qe(t$1, e$1, n$1, r$1) {
797
+ const i$1 = e$1 >> 15 & 1023 || 536870912;
798
+ if (n$1 >= i$1) {
799
+ let s$1, o$1 = e$1;
800
+ if (256 & e$1) s$1 = t$1[t$1.length - 1];
801
+ else {
802
+ if (null == r$1) return o$1;
803
+ s$1 = t$1[i$1 + (+!!(512 & e$1) - 1)] = {}, o$1 |= 256;
804
+ }
805
+ return s$1[n$1] = r$1, n$1 < i$1 && (t$1[n$1 + (+!!(512 & e$1) - 1)] = void 0), o$1 !== e$1 && nt(t$1, o$1), o$1;
806
+ }
807
+ return t$1[n$1 + (+!!(512 & e$1) - 1)] = r$1, 256 & e$1 && n$1 in (t$1 = t$1[t$1.length - 1]) && delete t$1[n$1], e$1;
808
+ }
809
+ function Je(t$1, e$1, n$1, r$1, i$1) {
810
+ var s$1 = 2 & e$1;
811
+ i$1 = Ye(t$1, e$1, n$1, i$1), Array.isArray(i$1) || (i$1 = ot);
812
+ const o$1 = !(2 & r$1);
813
+ r$1 = !(1 & r$1);
814
+ const a$1 = !!(32 & e$1);
815
+ let h$1 = tt(i$1);
816
+ return 0 !== h$1 || !a$1 || s$1 || o$1 ? 1 & h$1 || (h$1 |= 1, nt(i$1, h$1)) : (h$1 |= 33, nt(i$1, h$1)), s$1 ? (t$1 = !1, 2 & h$1 || (rt(i$1), t$1 = !!(4 & h$1)), (r$1 || t$1) && Object.freeze(i$1)) : (s$1 = !!(2 & h$1) || !!(2048 & h$1), r$1 && s$1 ? (i$1 = H(i$1), s$1 = 1, a$1 && !o$1 && (s$1 |= 32), nt(i$1, s$1), qe(t$1, e$1, n$1, i$1)) : o$1 && 32 & h$1 && !s$1 && Q(i$1, 32)), i$1;
817
+ }
818
+ function Ze(t$1, e$1) {
819
+ t$1 = t$1.u;
820
+ let n$1 = et(t$1);
821
+ const r$1 = Ye(t$1, n$1, e$1), i$1 = Ht(r$1);
822
+ return null != i$1 && i$1 !== r$1 && qe(t$1, n$1, e$1, i$1), i$1;
823
+ }
824
+ function Qe(t$1) {
825
+ t$1 = t$1.u;
826
+ let e$1 = et(t$1);
827
+ const n$1 = Ye(t$1, e$1, 1), r$1 = lt(n$1, !0, !!(34 & e$1));
828
+ return null != r$1 && r$1 !== n$1 && qe(t$1, e$1, 1, r$1), r$1;
829
+ }
830
+ function tn() {
831
+ return void 0 === _t ? 2 : 5;
832
+ }
833
+ function en(t$1, e$1, n$1, r$1, i$1, s$1) {
834
+ const o$1 = t$1.u;
835
+ let a$1 = et(o$1);
836
+ r$1 = 2 & a$1 ? 1 : r$1, s$1 = !!s$1, i$1 = nn(o$1, a$1, e$1, i$1);
837
+ var h$1 = tt(i$1), c$1 = i$1;
838
+ if (ve(c$1, t$1), 2 !== r$1 && 1 !== r$1 || Te(c$1, t$1), We(t$1, h$1, void 0, s$1)) {
839
+ 4 & h$1 && (i$1 = H(i$1), h$1 = vn(h$1, a$1), a$1 = qe(o$1, a$1, e$1, i$1));
840
+ let t$2 = c$1 = 0;
841
+ for (; c$1 < i$1.length; c$1++) {
842
+ const e$2 = n$1(i$1[c$1]);
843
+ null != e$2 && (i$1[t$2++] = e$2);
844
+ }
845
+ t$2 < c$1 && (i$1.length = t$2), h$1 = -4097 & (20 | (h$1 = rn(h$1, a$1))), nt(i$1, h$1 &= -8193), 2 & h$1 && Object.freeze(i$1);
846
+ }
847
+ let u$1;
848
+ return 1 === r$1 || 4 === r$1 && 32 & h$1 ? sn(h$1) || (t$1 = h$1, (h$1 |= 2) !== t$1 && nt(i$1, h$1), Object.freeze(i$1)) : (n$1 = 5 === r$1 && (!!(32 & h$1) || sn(h$1) || !!ae?.get(i$1)), (2 === r$1 || n$1) && sn(h$1) && (i$1 = H(i$1), h$1 = En(h$1 = vn(h$1, a$1), a$1, s$1), nt(i$1, h$1), a$1 = qe(o$1, a$1, e$1, i$1)), sn(h$1) || (e$1 = h$1, (h$1 = En(h$1, a$1, s$1)) !== e$1 && nt(i$1, h$1)), n$1 ? (u$1 = oe(i$1), _e(i$1, t$1, !0)) : 2 !== r$1 || s$1 || ae?.delete(i$1)), u$1 || i$1;
849
+ }
850
+ function nn(t$1, e$1, n$1, r$1) {
851
+ return t$1 = Ye(t$1, e$1, n$1, r$1), Array.isArray(t$1) ? t$1 : ot;
852
+ }
853
+ function rn(t$1, e$1) {
854
+ return 0 === t$1 && (t$1 = vn(t$1, e$1)), 1 | t$1;
855
+ }
856
+ function sn(t$1) {
857
+ return !!(2 & t$1) && !!(4 & t$1) || !!(2048 & t$1);
858
+ }
859
+ function on(t$1) {
860
+ t$1 = H(t$1);
861
+ for (let e$1 = 0; e$1 < t$1.length; e$1++) {
862
+ const n$1 = t$1[e$1] = H(t$1[e$1]);
863
+ Array.isArray(n$1[1]) && (n$1[1] = rt(n$1[1]));
864
+ }
865
+ return t$1;
866
+ }
867
+ function an(t$1, e$1, n$1, r$1) {
868
+ t$1 = t$1.u;
869
+ let i$1 = et(t$1);
870
+ pt(i$1), qe(t$1, i$1, e$1, ("0" === r$1 ? 0 === Number(n$1) : n$1 === r$1) ? void 0 : n$1);
871
+ }
872
+ function hn(t$1, e$1) {
873
+ var n$1 = _s;
874
+ return ln(cn(t$1 = t$1.u), t$1, et(t$1), n$1) === e$1 ? e$1 : -1;
875
+ }
876
+ function cn(t$1) {
877
+ if (W) return t$1[q] ?? (t$1[q] = /* @__PURE__ */ new Map());
878
+ if (q in t$1) return t$1[q];
879
+ const e$1 = /* @__PURE__ */ new Map();
880
+ return Object.defineProperty(t$1, q, { value: e$1 }), e$1;
881
+ }
882
+ function un(t$1, e$1, n$1, r$1) {
883
+ const i$1 = cn(t$1), s$1 = ln(i$1, t$1, e$1, n$1);
884
+ return s$1 !== r$1 && (s$1 && (e$1 = qe(t$1, e$1, s$1)), i$1.set(n$1, r$1)), e$1;
885
+ }
886
+ function ln(t$1, e$1, n$1, r$1) {
887
+ let i$1 = t$1.get(r$1);
888
+ if (null != i$1) return i$1;
889
+ i$1 = 0;
890
+ for (let t$2 = 0; t$2 < r$1.length; t$2++) {
891
+ const s$1 = r$1[t$2];
892
+ null != Ye(e$1, n$1, s$1) && (0 !== i$1 && (n$1 = qe(e$1, n$1, i$1)), i$1 = s$1);
893
+ }
894
+ return t$1.set(r$1, i$1), i$1;
895
+ }
896
+ function fn(t$1, e$1, n$1, r$1) {
897
+ let i$1, s$1 = et(t$1);
898
+ if (null != (r$1 = Ye(t$1, s$1, n$1, r$1)) && r$1.Y === at) return (e$1 = He(r$1)) !== r$1 && qe(t$1, s$1, n$1, e$1), e$1.u;
899
+ if (Array.isArray(r$1)) {
900
+ const t$2 = tt(r$1);
901
+ i$1 = 2 & t$2 ? Xe(r$1, t$2, !1) : r$1, i$1 = Ae(i$1, e$1);
902
+ } else i$1 = Ae(void 0, e$1);
903
+ return i$1 !== r$1 && qe(t$1, s$1, n$1, i$1), i$1;
904
+ }
905
+ function dn(t$1, e$1, n$1, r$1) {
906
+ t$1 = t$1.u;
907
+ let i$1 = et(t$1);
908
+ return (e$1 = ie(r$1 = Ye(t$1, i$1, n$1, r$1), e$1, !1, i$1)) !== r$1 && null != e$1 && qe(t$1, i$1, n$1, e$1), e$1;
909
+ }
910
+ function pn(t$1, e$1, n$1, r$1 = !1) {
911
+ if (null == (e$1 = dn(t$1, e$1, n$1, r$1))) return e$1;
912
+ if (t$1 = t$1.u, !(2 & (r$1 = et(t$1)))) {
913
+ const i$1 = He(e$1);
914
+ i$1 !== e$1 && qe(t$1, r$1, n$1, e$1 = i$1);
915
+ }
916
+ return e$1;
917
+ }
918
+ function gn(t$1, e$1, n$1, r$1, i$1, s$1, o$1) {
919
+ const a$1 = t$1.u;
920
+ var h$1 = !!(2 & e$1);
921
+ i$1 = h$1 ? 1 : i$1, s$1 = !!s$1, o$1 &&= !h$1, h$1 = nn(a$1, e$1, r$1);
922
+ var c$1 = tt(h$1), u$1 = h$1;
923
+ if (ve(u$1, t$1), 2 !== i$1 && 1 !== i$1 || Te(u$1, t$1), !(u$1 = !!(4 & c$1))) {
924
+ var l$1 = h$1, f$1 = e$1;
925
+ const t$2 = !!(2 & (c$1 = rn(c$1, e$1)));
926
+ t$2 && (f$1 |= 2);
927
+ let r$2 = !t$2, i$2 = !0, s$2 = 0, o$2 = 0;
928
+ for (; s$2 < l$1.length; s$2++) {
929
+ const e$2 = ie(l$1[s$2], n$1, !1, f$1);
930
+ if (e$2 instanceof n$1) {
931
+ if (!t$2) {
932
+ const t$3 = !!(2 & tt(e$2.u));
933
+ r$2 &&= !t$3, i$2 &&= t$3;
934
+ }
935
+ l$1[o$2++] = e$2;
936
+ }
937
+ }
938
+ o$2 < s$2 && (l$1.length = o$2), c$1 |= 4, c$1 = i$2 ? 16 | c$1 : -17 & c$1, nt(l$1, c$1 = r$2 ? 8 | c$1 : -9 & c$1), t$2 && Object.freeze(l$1);
939
+ }
940
+ if (o$1 && !(8 & c$1 || !h$1.length && (1 === i$1 || 4 === i$1 && 32 & c$1))) {
941
+ for (sn(c$1) ? (h$1 = H(h$1), c$1 = vn(c$1, e$1), e$1 = qe(a$1, e$1, r$1, h$1)) : Te(h$1, t$1), n$1 = h$1, o$1 = c$1, l$1 = 0; l$1 < n$1.length; l$1++) (c$1 = n$1[l$1]) !== (f$1 = He(c$1)) && (n$1[l$1] = f$1);
942
+ o$1 |= 8, o$1 = n$1.length ? -17 & o$1 : 16 | o$1, nt(n$1, o$1), c$1 = o$1;
943
+ }
944
+ let d$1;
945
+ return 1 === i$1 || 4 === i$1 && 32 & c$1 ? sn(c$1) || (t$1 = c$1, (c$1 |= !h$1.length || 16 & c$1 && (!u$1 || 32 & c$1) ? 2 : 2048) !== t$1 && nt(h$1, c$1), Object.freeze(h$1)) : (u$1 = 5 === i$1 && (!!(32 & c$1) || sn(c$1) || !!ae?.get(h$1)), (2 === i$1 || u$1) && sn(c$1) && (h$1 = H(h$1), c$1 = En(c$1 = vn(c$1, e$1), e$1, s$1), nt(h$1, c$1), e$1 = qe(a$1, e$1, r$1, h$1)), sn(c$1) || (r$1 = c$1, (c$1 = En(c$1, e$1, s$1)) !== r$1 && nt(h$1, c$1)), u$1 ? (d$1 = oe(h$1), _e(h$1, t$1, !0)) : 2 !== i$1 || s$1 || ae?.delete(h$1)), d$1 || h$1;
946
+ }
947
+ function mn(t$1, e$1, n$1) {
948
+ const r$1 = et(t$1.u);
949
+ return gn(t$1, r$1, e$1, n$1, tn(), !1, !(2 & r$1));
950
+ }
951
+ function yn(t$1, e$1, n$1, r$1) {
952
+ return r$1 ??= void 0, $e(t$1, n$1, r$1);
953
+ }
954
+ function _n(t$1, e$1, n$1, r$1) {
955
+ r$1 ??= void 0;
956
+ t: {
957
+ t$1 = t$1.u;
958
+ let i$1 = et(t$1);
959
+ if (pt(i$1), null == r$1) {
960
+ const r$2 = cn(t$1);
961
+ if (ln(r$2, t$1, i$1, n$1) !== e$1) break t;
962
+ r$2.set(n$1, 0);
963
+ } else i$1 = un(t$1, i$1, n$1, e$1);
964
+ qe(t$1, i$1, e$1, r$1);
965
+ }
966
+ }
967
+ function vn(t$1, e$1) {
968
+ return -2049 & (t$1 = 32 | (2 & e$1 ? 2 | t$1 : -3 & t$1));
969
+ }
970
+ function En(t$1, e$1, n$1) {
971
+ return 32 & e$1 && n$1 || (t$1 &= -33), t$1;
972
+ }
973
+ function wn(t$1, e$1, n$1, r$1) {
974
+ const i$1 = et(t$1.u);
975
+ pt(i$1), t$1 = gn(t$1, i$1, n$1, e$1, 2, !0), n$1 = null != r$1 ? r$1 : new n$1(), t$1.push(n$1), 2 & tt(n$1.u) ? Q(t$1, 8) : Q(t$1, 16);
976
+ }
977
+ function Tn(t$1, e$1) {
978
+ return t$1 ?? e$1;
979
+ }
980
+ function An(t$1, e$1) {
981
+ return Yt(ze(t$1, e$1));
982
+ }
983
+ function bn(t$1, e$1) {
984
+ return Tn(Ze(t$1, e$1), 0);
985
+ }
986
+ function kn(t$1, e$1) {
987
+ return Tn(re(ze(t$1, e$1)), "");
988
+ }
989
+ function Sn(t$1, e$1, n$1) {
990
+ if (null != n$1 && "boolean" != typeof n$1) throw t$1 = typeof n$1, Error(`Expected boolean but got ${"object" != t$1 ? t$1 : n$1 ? Array.isArray(n$1) ? "array" : t$1 : "null"}: ${n$1}`);
991
+ $e(t$1, e$1, n$1);
992
+ }
993
+ function xn(t$1, e$1, n$1) {
994
+ if (null != n$1) {
995
+ if ("number" != typeof n$1) throw V("int32");
996
+ if (!Number.isFinite(n$1)) throw V("int32");
997
+ n$1 |= 0;
998
+ }
999
+ $e(t$1, e$1, n$1);
1000
+ }
1001
+ function Ln(t$1, e$1, n$1) {
1002
+ if (null != n$1 && "number" != typeof n$1) throw Error(`Value of float/double field must be a number, found ${typeof n$1}: ${n$1}`);
1003
+ $e(t$1, e$1, n$1);
1004
+ }
1005
+ function Rn(t$1, e$1, n$1) {
1006
+ {
1007
+ const a$1 = t$1.u;
1008
+ let h$1 = et(a$1);
1009
+ if (pt(h$1), null == n$1) qe(a$1, h$1, e$1);
1010
+ else {
1011
+ n$1 = he?.get(n$1) || n$1;
1012
+ var r$1, i$1 = tt(n$1), s$1 = i$1, o$1 = !!(2 & i$1) || Object.isFrozen(n$1);
1013
+ if ((r$1 = !o$1) && (r$1 = void 0 === vt || !1), We(t$1, i$1)) {
1014
+ i$1 = 21, o$1 && (n$1 = H(n$1), s$1 = 0, i$1 = En(i$1 = vn(i$1, h$1), h$1, !0));
1015
+ for (let t$2 = 0; t$2 < n$1.length; t$2++) n$1[t$2] = ee(n$1[t$2]);
1016
+ }
1017
+ r$1 ? (n$1 = H(n$1), s$1 = 0, i$1 = En(i$1 = vn(i$1, h$1), h$1, !0)) : o$1 || _e(n$1, t$1), i$1 !== s$1 && nt(n$1, i$1), qe(a$1, h$1, e$1, n$1);
1018
+ }
1019
+ }
1020
+ }
1021
+ function Fn(t$1, e$1, n$1) {
1022
+ pt(et(t$1.u)), en(t$1, e$1, re, 2, void 0, !0).push(ee(n$1));
1023
+ }
1024
+ function Mn(t$1, e$1) {
1025
+ return Error(`Invalid wire type: ${t$1} (at position ${e$1})`);
1026
+ }
1027
+ function In() {
1028
+ return Error("Failed to read varint, encoding is invalid.");
1029
+ }
1030
+ function Pn(t$1, e$1) {
1031
+ return Error(`Tried to read past the end of the data ${e$1} > ${t$1}`);
1032
+ }
1033
+ function On(t$1) {
1034
+ if ("string" == typeof t$1) return {
1035
+ buffer: M(t$1),
1036
+ O: !1
1037
+ };
1038
+ if (Array.isArray(t$1)) return {
1039
+ buffer: new Uint8Array(t$1),
1040
+ O: !1
1041
+ };
1042
+ if (t$1.constructor === Uint8Array) return {
1043
+ buffer: t$1,
1044
+ O: !1
1045
+ };
1046
+ if (t$1.constructor === ArrayBuffer) return {
1047
+ buffer: new Uint8Array(t$1),
1048
+ O: !1
1049
+ };
1050
+ if (t$1.constructor === D) return {
1051
+ buffer: U(t$1) || new Uint8Array(0),
1052
+ O: !0
1053
+ };
1054
+ if (t$1 instanceof Uint8Array) return {
1055
+ buffer: new Uint8Array(t$1.buffer, t$1.byteOffset, t$1.byteLength),
1056
+ O: !1
1057
+ };
1058
+ throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers");
1059
+ }
1060
+ function Cn(t$1, e$1) {
1061
+ let n$1, r$1 = 0, i$1 = 0, s$1 = 0;
1062
+ const o$1 = t$1.h;
1063
+ let a$1 = t$1.g;
1064
+ do
1065
+ n$1 = o$1[a$1++], r$1 |= (127 & n$1) << s$1, s$1 += 7;
1066
+ while (s$1 < 32 && 128 & n$1);
1067
+ for (s$1 > 32 && (i$1 |= (127 & n$1) >> 4), s$1 = 3; s$1 < 32 && 128 & n$1; s$1 += 7) n$1 = o$1[a$1++], i$1 |= (127 & n$1) << s$1;
1068
+ if (Xn(t$1, a$1), n$1 < 128) return e$1(r$1 >>> 0, i$1 >>> 0);
1069
+ throw In();
1070
+ }
1071
+ function Nn(t$1) {
1072
+ let e$1 = 0, n$1 = t$1.g;
1073
+ const r$1 = n$1 + 10, i$1 = t$1.h;
1074
+ for (; n$1 < r$1;) {
1075
+ const r$2 = i$1[n$1++];
1076
+ if (e$1 |= r$2, 0 == (128 & r$2)) return Xn(t$1, n$1), !!(127 & e$1);
1077
+ }
1078
+ throw In();
1079
+ }
1080
+ function Un(t$1) {
1081
+ const e$1 = t$1.h;
1082
+ let n$1 = t$1.g, r$1 = e$1[n$1++], i$1 = 127 & r$1;
1083
+ if (128 & r$1 && (r$1 = e$1[n$1++], i$1 |= (127 & r$1) << 7, 128 & r$1 && (r$1 = e$1[n$1++], i$1 |= (127 & r$1) << 14, 128 & r$1 && (r$1 = e$1[n$1++], i$1 |= (127 & r$1) << 21, 128 & r$1 && (r$1 = e$1[n$1++], i$1 |= r$1 << 28, 128 & r$1 && 128 & e$1[n$1++] && 128 & e$1[n$1++] && 128 & e$1[n$1++] && 128 & e$1[n$1++] && 128 & e$1[n$1++]))))) throw In();
1084
+ return Xn(t$1, n$1), i$1;
1085
+ }
1086
+ function Dn(t$1) {
1087
+ return Un(t$1) >>> 0;
1088
+ }
1089
+ function Bn(t$1) {
1090
+ var e$1 = t$1.h;
1091
+ const n$1 = t$1.g, r$1 = e$1[n$1], i$1 = e$1[n$1 + 1], s$1 = e$1[n$1 + 2];
1092
+ return e$1 = e$1[n$1 + 3], Xn(t$1, t$1.g + 4), (r$1 << 0 | i$1 << 8 | s$1 << 16 | e$1 << 24) >>> 0;
1093
+ }
1094
+ function Gn(t$1) {
1095
+ var e$1 = Bn(t$1);
1096
+ t$1 = 2 * (e$1 >> 31) + 1;
1097
+ const n$1 = e$1 >>> 23 & 255;
1098
+ return e$1 &= 8388607, 255 == n$1 ? e$1 ? NaN : t$1 * Infinity : 0 == n$1 ? 1401298464324817e-60 * t$1 * e$1 : t$1 * Math.pow(2, n$1 - 150) * (e$1 + 8388608);
1099
+ }
1100
+ function jn(t$1) {
1101
+ return Un(t$1);
1102
+ }
1103
+ function Vn(t$1, e$1, { ea: n$1 = !1 } = {}) {
1104
+ t$1.ea = n$1, e$1 && (e$1 = On(e$1), t$1.h = e$1.buffer, t$1.m = e$1.O, t$1.j = 0, t$1.l = t$1.h.length, t$1.g = t$1.j);
1105
+ }
1106
+ function Xn(t$1, e$1) {
1107
+ if (t$1.g = e$1, e$1 > t$1.l) throw Pn(t$1.l, e$1);
1108
+ }
1109
+ function Hn(t$1, e$1) {
1110
+ if (e$1 < 0) throw Error(`Tried to read a negative byte length: ${e$1}`);
1111
+ const n$1 = t$1.g, r$1 = n$1 + e$1;
1112
+ if (r$1 > t$1.l) throw Pn(e$1, t$1.l - n$1);
1113
+ return t$1.g = r$1, n$1;
1114
+ }
1115
+ function Wn(t$1, e$1) {
1116
+ if (0 == e$1) return N();
1117
+ var n$1 = Hn(t$1, e$1);
1118
+ return t$1.ea && t$1.m ? n$1 = t$1.h.subarray(n$1, n$1 + e$1) : (t$1 = t$1.h, n$1 = n$1 === (e$1 = n$1 + e$1) ? new Uint8Array(0) : Mt ? t$1.slice(n$1, e$1) : new Uint8Array(t$1.subarray(n$1, e$1))), 0 == n$1.length ? N() : new D(n$1, P);
1119
+ }
1120
+ Me.prototype.toJSON = void 0, Me.prototype.La = ht;
1121
+ var zn = [];
1122
+ function Kn(t$1) {
1123
+ var e$1 = t$1.g;
1124
+ if (e$1.g == e$1.l) return !1;
1125
+ t$1.l = t$1.g.g;
1126
+ var n$1 = Dn(t$1.g);
1127
+ if (e$1 = n$1 >>> 3, !((n$1 &= 7) >= 0 && n$1 <= 5)) throw Mn(n$1, t$1.l);
1128
+ if (e$1 < 1) throw Error(`Invalid field number: ${e$1} (at position ${t$1.l})`);
1129
+ return t$1.m = e$1, t$1.h = n$1, !0;
1130
+ }
1131
+ function Yn(t$1) {
1132
+ switch (t$1.h) {
1133
+ case 0:
1134
+ 0 != t$1.h ? Yn(t$1) : Nn(t$1.g);
1135
+ break;
1136
+ case 1:
1137
+ Xn(t$1 = t$1.g, t$1.g + 8);
1138
+ break;
1139
+ case 2:
1140
+ if (2 != t$1.h) Yn(t$1);
1141
+ else {
1142
+ var e$1 = Dn(t$1.g);
1143
+ Xn(t$1 = t$1.g, t$1.g + e$1);
1144
+ }
1145
+ break;
1146
+ case 5:
1147
+ Xn(t$1 = t$1.g, t$1.g + 4);
1148
+ break;
1149
+ case 3:
1150
+ for (e$1 = t$1.m;;) {
1151
+ if (!Kn(t$1)) throw Error("Unmatched start-group tag: stream EOF");
1152
+ if (4 == t$1.h) {
1153
+ if (t$1.m != e$1) throw Error("Unmatched end-group tag");
1154
+ break;
1155
+ }
1156
+ Yn(t$1);
1157
+ }
1158
+ break;
1159
+ default: throw Mn(t$1.h, t$1.l);
1160
+ }
1161
+ }
1162
+ function $n(t$1, e$1, n$1) {
1163
+ const r$1 = t$1.g.l, i$1 = Dn(t$1.g), s$1 = t$1.g.g + i$1;
1164
+ let o$1 = s$1 - r$1;
1165
+ if (o$1 <= 0 && (t$1.g.l = s$1, n$1(e$1, t$1, void 0, void 0, void 0), o$1 = s$1 - t$1.g.g), o$1) throw Error(`Message parsing ended unexpectedly. Expected to read ${i$1} bytes, instead read ${i$1 - o$1} bytes, either the data ended unexpectedly or the message misreported its own length`);
1166
+ return t$1.g.g = s$1, t$1.g.l = r$1, e$1;
1167
+ }
1168
+ function qn(t$1) {
1169
+ var e$1 = Dn(t$1.g), a$1 = Hn(t$1 = t$1.g, e$1);
1170
+ if (t$1 = t$1.h, o) {
1171
+ var h$1, c$1 = t$1;
1172
+ (h$1 = s) || (h$1 = s = new TextDecoder("utf-8", { fatal: !0 })), e$1 = a$1 + e$1, c$1 = 0 === a$1 && e$1 === c$1.length ? c$1 : c$1.subarray(a$1, e$1);
1173
+ try {
1174
+ var u$1 = h$1.decode(c$1);
1175
+ } catch (t$2) {
1176
+ if (void 0 === i) {
1177
+ try {
1178
+ h$1.decode(new Uint8Array([128]));
1179
+ } catch (t$3) {}
1180
+ try {
1181
+ h$1.decode(new Uint8Array([97])), i = !0;
1182
+ } catch (t$3) {
1183
+ i = !1;
1184
+ }
1185
+ }
1186
+ throw !i && (s = void 0), t$2;
1187
+ }
1188
+ } else {
1189
+ e$1 = (u$1 = a$1) + e$1, a$1 = [];
1190
+ let i$1, s$1 = null;
1191
+ for (; u$1 < e$1;) {
1192
+ var l$1 = t$1[u$1++];
1193
+ l$1 < 128 ? a$1.push(l$1) : l$1 < 224 ? u$1 >= e$1 ? n() : (i$1 = t$1[u$1++], l$1 < 194 || 128 != (192 & i$1) ? (u$1--, n()) : a$1.push((31 & l$1) << 6 | 63 & i$1)) : l$1 < 240 ? u$1 >= e$1 - 1 ? n() : (i$1 = t$1[u$1++], 128 != (192 & i$1) || 224 === l$1 && i$1 < 160 || 237 === l$1 && i$1 >= 160 || 128 != (192 & (h$1 = t$1[u$1++])) ? (u$1--, n()) : a$1.push((15 & l$1) << 12 | (63 & i$1) << 6 | 63 & h$1)) : l$1 <= 244 ? u$1 >= e$1 - 2 ? n() : (i$1 = t$1[u$1++], 128 != (192 & i$1) || i$1 - 144 + (l$1 << 28) >> 30 != 0 || 128 != (192 & (h$1 = t$1[u$1++])) || 128 != (192 & (c$1 = t$1[u$1++])) ? (u$1--, n()) : (l$1 = (7 & l$1) << 18 | (63 & i$1) << 12 | (63 & h$1) << 6 | 63 & c$1, l$1 -= 65536, a$1.push(55296 + (l$1 >> 10 & 1023), 56320 + (1023 & l$1)))) : n(), a$1.length >= 8192 && (s$1 = r(s$1, a$1), a$1.length = 0);
1194
+ }
1195
+ u$1 = r(s$1, a$1);
1196
+ }
1197
+ return u$1;
1198
+ }
1199
+ function Jn(t$1) {
1200
+ const e$1 = Dn(t$1.g);
1201
+ return Wn(t$1.g, e$1);
1202
+ }
1203
+ function Zn(t$1, e$1, n$1) {
1204
+ var r$1 = Dn(t$1.g);
1205
+ for (r$1 = t$1.g.g + r$1; t$1.g.g < r$1;) n$1.push(e$1(t$1.g));
1206
+ }
1207
+ var Qn = [];
1208
+ let tr;
1209
+ function er(t$1, e$1, n$1) {
1210
+ e$1.g ? e$1.m(t$1, e$1.g, e$1.h, n$1, !0) : e$1.m(t$1, e$1.h, n$1, !0);
1211
+ }
1212
+ var nr = class {
1213
+ constructor(t$1, e$1) {
1214
+ this.u = be(t$1, e$1);
1215
+ }
1216
+ toJSON() {
1217
+ return rr(this);
1218
+ }
1219
+ l() {
1220
+ var t$1 = vo;
1221
+ return t$1.g ? t$1.l(this, t$1.g, t$1.h, !0) : t$1.l(this, t$1.h, t$1.defaultValue, !0);
1222
+ }
1223
+ clone() {
1224
+ const t$1 = this.u;
1225
+ return Ve(this, t$1, et(t$1), !1);
1226
+ }
1227
+ O() {
1228
+ return !!(2 & tt(this.u));
1229
+ }
1230
+ };
1231
+ function rr(t$1) {
1232
+ we(t$1), t$1 = tr ? t$1.u : De(t$1.u, Ge, void 0, void 0, !1);
1233
+ {
1234
+ var e$1 = !tr;
1235
+ let c$1 = t$1.length;
1236
+ if (c$1) {
1237
+ var n$1 = t$1[c$1 - 1], r$1 = ut(n$1);
1238
+ r$1 ? c$1-- : n$1 = void 0;
1239
+ var i$1 = t$1;
1240
+ if (r$1) {
1241
+ t: {
1242
+ var s$1, o$1 = n$1, a$1 = !1;
1243
+ if (o$1) for (let t$2 in o$1) isNaN(+t$2) ? (s$1 ??= {})[t$2] = o$1[t$2] : (r$1 = o$1[t$2], Array.isArray(r$1) && (ft(r$1) || ct(r$1) && 0 === r$1.size) && (r$1 = null), r$1 ?? (a$1 = !0), null != r$1 && ((s$1 ??= {})[t$2] = r$1));
1244
+ if (a$1 || (s$1 = o$1), s$1) for (let t$2 in s$1) {
1245
+ a$1 = s$1;
1246
+ break t;
1247
+ }
1248
+ a$1 = null;
1249
+ }
1250
+ o$1 = null == a$1 ? null != n$1 : a$1 !== n$1;
1251
+ }
1252
+ for (; c$1 > 0 && (null == (s$1 = i$1[c$1 - 1]) || ft(s$1) || ct(s$1) && 0 === s$1.size); c$1--) var h$1 = !0;
1253
+ (i$1 !== t$1 || o$1 || h$1) && (e$1 ? (h$1 || o$1 || a$1) && (i$1.length = c$1) : i$1 = Array.prototype.slice.call(i$1, 0, c$1), a$1 && i$1.push(a$1)), h$1 = i$1;
1254
+ } else h$1 = t$1;
1255
+ }
1256
+ return h$1;
1257
+ }
1258
+ function ir(t$1) {
1259
+ return t$1 ? /^\d+$/.test(t$1) ? (Vt(t$1), new sr(Pt, Ot)) : null : or ||= new sr(0, 0);
1260
+ }
1261
+ nr.prototype.Y = at, nr.prototype.toString = function() {
1262
+ try {
1263
+ return tr = !0, rr(this).toString();
1264
+ } finally {
1265
+ tr = !1;
1266
+ }
1267
+ };
1268
+ var sr = class {
1269
+ constructor(t$1, e$1) {
1270
+ this.h = t$1 >>> 0, this.g = e$1 >>> 0;
1271
+ }
1272
+ };
1273
+ let or;
1274
+ function ar(t$1) {
1275
+ return t$1 ? /^-?\d+$/.test(t$1) ? (Vt(t$1), new hr(Pt, Ot)) : null : cr ||= new hr(0, 0);
1276
+ }
1277
+ var hr = class {
1278
+ constructor(t$1, e$1) {
1279
+ this.h = t$1 >>> 0, this.g = e$1 >>> 0;
1280
+ }
1281
+ };
1282
+ let cr;
1283
+ function ur(t$1, e$1, n$1) {
1284
+ for (; n$1 > 0 || e$1 > 127;) t$1.g.push(127 & e$1 | 128), e$1 = (e$1 >>> 7 | n$1 << 25) >>> 0, n$1 >>>= 7;
1285
+ t$1.g.push(e$1);
1286
+ }
1287
+ function lr(t$1, e$1) {
1288
+ for (; e$1 > 127;) t$1.g.push(127 & e$1 | 128), e$1 >>>= 7;
1289
+ t$1.g.push(e$1);
1290
+ }
1291
+ function fr(t$1, e$1) {
1292
+ if (e$1 >= 0) lr(t$1, e$1);
1293
+ else {
1294
+ for (let n$1 = 0; n$1 < 9; n$1++) t$1.g.push(127 & e$1 | 128), e$1 >>= 7;
1295
+ t$1.g.push(1);
1296
+ }
1297
+ }
1298
+ function dr(t$1, e$1) {
1299
+ t$1.g.push(e$1 >>> 0 & 255), t$1.g.push(e$1 >>> 8 & 255), t$1.g.push(e$1 >>> 16 & 255), t$1.g.push(e$1 >>> 24 & 255);
1300
+ }
1301
+ function pr(t$1, e$1) {
1302
+ 0 !== e$1.length && (t$1.l.push(e$1), t$1.h += e$1.length);
1303
+ }
1304
+ function gr(t$1, e$1, n$1) {
1305
+ lr(t$1.g, 8 * e$1 + n$1);
1306
+ }
1307
+ function mr(t$1, e$1) {
1308
+ return gr(t$1, e$1, 2), e$1 = t$1.g.end(), pr(t$1, e$1), e$1.push(t$1.h), e$1;
1309
+ }
1310
+ function yr(t$1, e$1) {
1311
+ var n$1 = e$1.pop();
1312
+ for (n$1 = t$1.h + t$1.g.length() - n$1; n$1 > 127;) e$1.push(127 & n$1 | 128), n$1 >>>= 7, t$1.h++;
1313
+ e$1.push(n$1), t$1.h++;
1314
+ }
1315
+ function _r(t$1, e$1, n$1) {
1316
+ gr(t$1, e$1, 2), lr(t$1.g, n$1.length), pr(t$1, t$1.g.end()), pr(t$1, n$1);
1317
+ }
1318
+ function vr(t$1, e$1, n$1, r$1) {
1319
+ null != n$1 && (e$1 = mr(t$1, e$1), r$1(n$1, t$1), yr(t$1, e$1));
1320
+ }
1321
+ var Er = class {
1322
+ constructor(t$1, e$1, n$1) {
1323
+ this.g = t$1, this.h = e$1, this.qa = n$1;
1324
+ }
1325
+ };
1326
+ function wr(t$1) {
1327
+ return Array.isArray(t$1) ? t$1[0] instanceof Er ? t$1 : [gi, t$1] : [t$1, void 0];
1328
+ }
1329
+ function Tr(t$1, e$1) {
1330
+ if (Array.isArray(e$1)) {
1331
+ var n$1 = tt(e$1);
1332
+ if (4 & n$1) return e$1;
1333
+ for (var r$1 = 0, i$1 = 0; r$1 < e$1.length; r$1++) {
1334
+ const n$2 = t$1(e$1[r$1]);
1335
+ null != n$2 && (e$1[i$1++] = n$2);
1336
+ }
1337
+ return i$1 < r$1 && (e$1.length = i$1), nt(e$1, -12289 & (5 | n$1)), 2 & n$1 && Object.freeze(e$1), e$1;
1338
+ }
1339
+ }
1340
+ const Ar = Symbol();
1341
+ function br(t$1) {
1342
+ let e$1 = t$1[Ar];
1343
+ if (!e$1) {
1344
+ const n$1 = Ur(t$1), r$1 = n$1.h;
1345
+ e$1 = r$1 ? (t$2, e$2) => r$1(t$2, e$2, n$1) : (t$2, e$2) => {
1346
+ for (; Kn(e$2) && 4 != e$2.h;) {
1347
+ var r$2 = e$2.m;
1348
+ let o$1 = n$1[r$2];
1349
+ const a$1 = !o$1;
1350
+ let h$1 = !1;
1351
+ if (!o$1) {
1352
+ var i$1 = n$1.X;
1353
+ if (i$1) {
1354
+ var s$1 = i$1[r$2];
1355
+ s$1 && (h$1 = i$1.P?.[r$2], (!d || h$1) && (i$1 = kr(s$1)) && (o$1 = n$1[r$2] = i$1));
1356
+ }
1357
+ }
1358
+ o$1 && o$1(e$2, t$2, r$2) || (r$2 = (i$1 = e$2).l, Yn(i$1), i$1.ja ? i$1 = void 0 : (s$1 = i$1.g.g - r$2, i$1.g.g = r$2, i$1 = Wn(i$1.g, s$1)), r$2 = t$2, i$1 && (mt ||= Symbol(), (s$1 = r$2[mt]) ? s$1.push(i$1) : r$2[mt] = [i$1])), a$1 && o$1 && !h$1 && Wr++ < 5 && j();
1359
+ }
1360
+ }, t$1[Ar] = e$1;
1361
+ }
1362
+ return e$1;
1363
+ }
1364
+ function kr(t$1) {
1365
+ const e$1 = (t$1 = wr(t$1))[0].g;
1366
+ if (t$1 = t$1[1]) {
1367
+ const n$1 = br(t$1), r$1 = Ur(t$1).g;
1368
+ return (t$2, i$1, s$1) => e$1(t$2, i$1, s$1, r$1, n$1);
1369
+ }
1370
+ return e$1;
1371
+ }
1372
+ function Sr(t$1, e$1, n$1) {
1373
+ t$1[e$1] = n$1;
1374
+ }
1375
+ function xr(t$1, e$1, n$1, r$1) {
1376
+ var i$1 = Sr;
1377
+ e$1.g = function(t$2) {
1378
+ switch (typeof t$2) {
1379
+ case "boolean": return pe ||= [
1380
+ 0,
1381
+ void 0,
1382
+ !0
1383
+ ];
1384
+ case "number": return t$2 > 0 ? void 0 : 0 === t$2 ? ge ||= [0, void 0] : [-t$2, void 0];
1385
+ case "string": return [0, t$2];
1386
+ case "object": return t$2;
1387
+ }
1388
+ }(t$1[0]);
1389
+ let s$1 = 0;
1390
+ var o$1 = t$1[++s$1];
1391
+ o$1 && o$1.constructor === Object && (e$1.X = o$1, "function" == typeof (o$1 = t$1[++s$1]) && (e$1.h = o$1, e$1.l = t$1[++s$1], o$1 = t$1[++s$1]));
1392
+ const a$1 = {};
1393
+ for (; Array.isArray(o$1) && "number" == typeof o$1[0] && o$1[0] > 0;) {
1394
+ for (var h$1 = 0; h$1 < o$1.length; h$1++) a$1[o$1[h$1]] = o$1;
1395
+ o$1 = t$1[++s$1];
1396
+ }
1397
+ for (h$1 = 1; void 0 !== o$1;) {
1398
+ let l$1;
1399
+ "number" == typeof o$1 && (h$1 += o$1, o$1 = t$1[++s$1]);
1400
+ var c$1 = void 0;
1401
+ if (o$1 instanceof Er ? l$1 = o$1 : (l$1 = mi, s$1--), l$1.qa) {
1402
+ o$1 = t$1[++s$1], c$1 = t$1;
1403
+ var u$1 = s$1;
1404
+ "function" == typeof o$1 && (o$1 = o$1(), c$1[u$1] = o$1), c$1 = o$1;
1405
+ }
1406
+ for (u$1 = h$1 + 1, "number" == typeof (o$1 = t$1[++s$1]) && o$1 < 0 && (u$1 -= o$1, o$1 = t$1[++s$1]); h$1 < u$1; h$1++) {
1407
+ const t$2 = a$1[h$1];
1408
+ i$1(e$1, h$1, c$1 ? r$1(l$1, c$1, t$2) : n$1(l$1, t$2));
1409
+ }
1410
+ }
1411
+ return e$1;
1412
+ }
1413
+ const Lr = Symbol();
1414
+ function Rr(t$1) {
1415
+ let e$1 = t$1[Lr];
1416
+ if (!e$1) {
1417
+ const n$1 = Pr(t$1);
1418
+ e$1 = (t$2, e$2) => Br(t$2, e$2, n$1), t$1[Lr] = e$1;
1419
+ }
1420
+ return e$1;
1421
+ }
1422
+ const Fr = Symbol();
1423
+ function Mr(t$1) {
1424
+ return t$1.h;
1425
+ }
1426
+ function Ir(t$1, e$1) {
1427
+ let n$1, r$1;
1428
+ const i$1 = t$1.h;
1429
+ return (t$2, s$1, o$1) => i$1(t$2, s$1, o$1, r$1 ||= Pr(e$1).g, n$1 ||= Rr(e$1));
1430
+ }
1431
+ function Pr(t$1) {
1432
+ let e$1 = t$1[Fr];
1433
+ return e$1 || (e$1 = xr(t$1, t$1[Fr] = {}, Mr, Ir));
1434
+ }
1435
+ const Or = Symbol();
1436
+ function Cr(t$1, e$1) {
1437
+ const n$1 = t$1.g;
1438
+ return e$1 ? (t$2, r$1, i$1) => n$1(t$2, r$1, i$1, e$1) : n$1;
1439
+ }
1440
+ function Nr(t$1, e$1, n$1) {
1441
+ const r$1 = t$1.g;
1442
+ let i$1, s$1;
1443
+ return (t$2, o$1, a$1) => r$1(t$2, o$1, a$1, s$1 ||= Ur(e$1).g, i$1 ||= br(e$1), n$1);
1444
+ }
1445
+ function Ur(t$1) {
1446
+ let e$1 = t$1[Or];
1447
+ return e$1 || (e$1 = xr(t$1, t$1[Or] = {}, Cr, Nr));
1448
+ }
1449
+ function Dr(t$1, e$1) {
1450
+ var n$1 = t$1[e$1];
1451
+ if (n$1) return n$1;
1452
+ if (n$1 = t$1.X) {
1453
+ var r$1 = n$1[e$1];
1454
+ if (r$1) {
1455
+ var i$1 = (r$1 = wr(r$1))[0].h;
1456
+ if (r$1 = r$1[1], n$1 = n$1.P?.[e$1], !d || n$1) {
1457
+ if (r$1) {
1458
+ const e$2 = Rr(r$1), s$1 = Pr(r$1).g;
1459
+ n$1 = (n$1 = t$1.l) ? n$1(s$1, e$2) : (t$2, n$2, r$2) => i$1(t$2, n$2, r$2, s$1, e$2);
1460
+ } else n$1 = i$1;
1461
+ return t$1[e$1] = n$1;
1462
+ }
1463
+ }
1464
+ }
1465
+ }
1466
+ function Br(t$1, e$1, n$1) {
1467
+ for (var r$1 = et(t$1), i$1 = +!!(512 & r$1) - 1, s$1 = t$1.length, o$1 = 512 & r$1 ? 1 : 0, a$1 = s$1 + (256 & r$1 ? -1 : 0); o$1 < a$1; o$1++) {
1468
+ const r$2 = t$1[o$1];
1469
+ if (null == r$2) continue;
1470
+ const s$2 = o$1 - i$1, a$2 = Dr(n$1, s$2);
1471
+ if (!a$2) continue;
1472
+ const h$1 = n$1.X;
1473
+ h$1?.[s$2] && !h$1?.P?.[s$2] && Wr++ < 5 && j(), a$2(e$1, r$2, s$2);
1474
+ }
1475
+ if (256 & r$1) {
1476
+ r$1 = t$1[s$1 - 1];
1477
+ for (let t$2 in r$1) i$1 = +t$2, !Number.isNaN(i$1) && null != (s$1 = r$1[t$2]) && (a$1 = Dr(n$1, i$1)) && ((o$1 = n$1.X)?.[i$1] && !o$1?.P?.[i$1] && Wr++ < 5 && j(), a$1(e$1, s$1, i$1));
1478
+ }
1479
+ if (t$1 = mt ? t$1[mt] : void 0) for (pr(e$1, e$1.g.end()), n$1 = 0; n$1 < t$1.length; n$1++) pr(e$1, U(t$1[n$1]) || new Uint8Array(0));
1480
+ }
1481
+ function Gr(t$1, e$1) {
1482
+ return new Er(t$1, e$1, !1);
1483
+ }
1484
+ function jr(t$1, e$1) {
1485
+ return new Er(t$1, e$1, !1);
1486
+ }
1487
+ function Vr(t$1, e$1) {
1488
+ return new Er(t$1, e$1, !0);
1489
+ }
1490
+ function Xr(t$1, e$1, n$1) {
1491
+ qe(t$1, et(t$1), e$1, n$1);
1492
+ }
1493
+ var Hr = Vr((function(t$1, e$1, n$1, r$1, i$1) {
1494
+ return 2 === t$1.h && (t$1 = $n(t$1, Ae([void 0, void 0], r$1), i$1), pt(r$1 = et(e$1)), (i$1 = Ye(e$1, r$1, n$1)) instanceof Me ? 0 != (2 & i$1.M) ? ((i$1 = i$1.Z()).push(t$1), qe(e$1, r$1, n$1, i$1)) : i$1.Qa(t$1) : Array.isArray(i$1) ? (2 & tt(i$1) && qe(e$1, r$1, n$1, i$1 = on(i$1)), i$1.push(t$1)) : qe(e$1, r$1, n$1, [t$1]), !0);
1495
+ }), (function(t$1, e$1, n$1, r$1, i$1) {
1496
+ if (e$1 instanceof Me) e$1.forEach(((e$2, s$1) => {
1497
+ vr(t$1, n$1, Ae([s$1, e$2], r$1), i$1);
1498
+ }));
1499
+ else if (Array.isArray(e$1)) for (let s$1 = 0; s$1 < e$1.length; s$1++) {
1500
+ const o$1 = e$1[s$1];
1501
+ Array.isArray(o$1) && vr(t$1, n$1, Ae(o$1, r$1), i$1);
1502
+ }
1503
+ }));
1504
+ let Wr = 0;
1505
+ function zr(t$1, e$1, n$1) {
1506
+ if (e$1 = function(t$2) {
1507
+ if (null == t$2) return t$2;
1508
+ const e$2 = typeof t$2;
1509
+ if ("bigint" === e$2) return String(BigInt.asIntN(64, t$2));
1510
+ if (Kt(t$2)) {
1511
+ if ("string" === e$2) return Zt(t$2);
1512
+ if ("number" === e$2) return Jt(t$2);
1513
+ }
1514
+ }(e$1), null != e$1) {
1515
+ if ("string" == typeof e$1) ar(e$1);
1516
+ if (null != e$1) switch (gr(t$1, n$1, 0), typeof e$1) {
1517
+ case "number":
1518
+ t$1 = t$1.g, Nt(e$1), ur(t$1, Pt, Ot);
1519
+ break;
1520
+ case "bigint":
1521
+ n$1 = BigInt.asUintN(64, e$1), n$1 = new hr(Number(n$1 & BigInt(4294967295)), Number(n$1 >> BigInt(32))), ur(t$1.g, n$1.h, n$1.g);
1522
+ break;
1523
+ default: n$1 = ar(e$1), ur(t$1.g, n$1.h, n$1.g);
1524
+ }
1525
+ }
1526
+ }
1527
+ function Kr(t$1, e$1, n$1) {
1528
+ null != (e$1 = Yt(e$1)) && null != e$1 && (gr(t$1, n$1, 0), fr(t$1.g, e$1));
1529
+ }
1530
+ function Yr(t$1, e$1, n$1) {
1531
+ null != (e$1 = Wt(e$1)) && (gr(t$1, n$1, 0), t$1.g.g.push(e$1 ? 1 : 0));
1532
+ }
1533
+ function $r(t$1, e$1, n$1) {
1534
+ null != (e$1 = re(e$1)) && _r(t$1, n$1, c(e$1));
1535
+ }
1536
+ function qr(t$1, e$1, n$1, r$1, i$1) {
1537
+ e$1 instanceof nr ? (we(e$1), e$1 = e$1.u) : e$1 = Array.isArray(e$1) ? Ae(e$1, r$1) : void 0, vr(t$1, n$1, e$1, i$1);
1538
+ }
1539
+ function Jr(t$1, e$1, n$1) {
1540
+ null != (e$1 = null == e$1 || "string" == typeof e$1 || I(e$1) || e$1 instanceof D ? e$1 : void 0) && _r(t$1, n$1, On(e$1).buffer);
1541
+ }
1542
+ function Zr(t$1, e$1, n$1) {
1543
+ return (5 === t$1.h || 2 === t$1.h) && (e$1 = Je(e$1, et(e$1), n$1, 2, !1), 2 == t$1.h ? Zn(t$1, Gn, e$1) : e$1.push(Gn(t$1.g)), !0);
1544
+ }
1545
+ var Qr, ti = Gr((function(t$1, e$1, n$1) {
1546
+ if (1 !== t$1.h) return !1;
1547
+ var r$1 = t$1.g;
1548
+ t$1 = Bn(r$1);
1549
+ const i$1 = Bn(r$1);
1550
+ r$1 = 2 * (i$1 >> 31) + 1;
1551
+ const s$1 = i$1 >>> 20 & 2047;
1552
+ return t$1 = 4294967296 * (1048575 & i$1) + t$1, Xr(e$1, n$1, 2047 == s$1 ? t$1 ? NaN : r$1 * Infinity : 0 == s$1 ? 5e-324 * r$1 * t$1 : r$1 * Math.pow(2, s$1 - 1075) * (t$1 + 4503599627370496)), !0;
1553
+ }), (function(t$1, e$1, n$1) {
1554
+ null != (e$1 = Ht(e$1)) && (gr(t$1, n$1, 1), t$1 = t$1.g, (n$1 = It ||= /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8))).setFloat64(0, +e$1, !0), Pt = n$1.getUint32(0, !0), Ot = n$1.getUint32(4, !0), dr(t$1, Pt), dr(t$1, Ot));
1555
+ })), ei = Gr((function(t$1, e$1, n$1) {
1556
+ return 5 === t$1.h && (Xr(e$1, n$1, Gn(t$1.g)), !0);
1557
+ }), (function(t$1, e$1, n$1) {
1558
+ null != (e$1 = Ht(e$1)) && (gr(t$1, n$1, 5), t$1 = t$1.g, Ut(e$1), dr(t$1, Pt));
1559
+ })), ni = jr(Zr, (function(t$1, e$1, n$1) {
1560
+ if (null != (e$1 = Tr(Ht, e$1))) for (let o$1 = 0; o$1 < e$1.length; o$1++) {
1561
+ var r$1 = t$1, i$1 = n$1, s$1 = e$1[o$1];
1562
+ null != s$1 && (gr(r$1, i$1, 5), r$1 = r$1.g, Ut(s$1), dr(r$1, Pt));
1563
+ }
1564
+ })), ri = jr(Zr, (function(t$1, e$1, n$1) {
1565
+ if (null != (e$1 = Tr(Ht, e$1)) && e$1.length) {
1566
+ gr(t$1, n$1, 2), lr(t$1.g, 4 * e$1.length);
1567
+ for (let r$1 = 0; r$1 < e$1.length; r$1++) n$1 = t$1.g, Ut(e$1[r$1]), dr(n$1, Pt);
1568
+ }
1569
+ })), ii = Gr((function(t$1, e$1, n$1) {
1570
+ return 0 === t$1.h && (Xr(e$1, n$1, Cn(t$1.g, Bt)), !0);
1571
+ }), zr), si = Gr((function(t$1, e$1, n$1) {
1572
+ return 0 === t$1.h && (Xr(e$1, n$1, 0 === (t$1 = Cn(t$1.g, Bt)) ? void 0 : t$1), !0);
1573
+ }), zr), oi = Gr((function(t$1, e$1, n$1) {
1574
+ return 0 === t$1.h && (Xr(e$1, n$1, Cn(t$1.g, Dt)), !0);
1575
+ }), (function(t$1, e$1, n$1) {
1576
+ if (null != (e$1 = te(e$1))) {
1577
+ if ("string" == typeof e$1) ir(e$1);
1578
+ if (null != e$1) switch (gr(t$1, n$1, 0), typeof e$1) {
1579
+ case "number":
1580
+ t$1 = t$1.g, Nt(e$1), ur(t$1, Pt, Ot);
1581
+ break;
1582
+ case "bigint":
1583
+ n$1 = BigInt.asUintN(64, e$1), n$1 = new sr(Number(n$1 & BigInt(4294967295)), Number(n$1 >> BigInt(32))), ur(t$1.g, n$1.h, n$1.g);
1584
+ break;
1585
+ default: n$1 = ir(e$1), ur(t$1.g, n$1.h, n$1.g);
1586
+ }
1587
+ }
1588
+ })), ai = Gr((function(t$1, e$1, n$1) {
1589
+ return 0 === t$1.h && (Xr(e$1, n$1, Un(t$1.g)), !0);
1590
+ }), Kr), hi = jr((function(t$1, e$1, n$1) {
1591
+ return (0 === t$1.h || 2 === t$1.h) && (e$1 = Je(e$1, et(e$1), n$1, 2, !1), 2 == t$1.h ? Zn(t$1, Un, e$1) : e$1.push(Un(t$1.g)), !0);
1592
+ }), (function(t$1, e$1, n$1) {
1593
+ if (null != (e$1 = Tr(Yt, e$1)) && e$1.length) {
1594
+ n$1 = mr(t$1, n$1);
1595
+ for (let n$2 = 0; n$2 < e$1.length; n$2++) fr(t$1.g, e$1[n$2]);
1596
+ yr(t$1, n$1);
1597
+ }
1598
+ })), ci = Gr((function(t$1, e$1, n$1) {
1599
+ return 0 === t$1.h && (Xr(e$1, n$1, 0 === (t$1 = Un(t$1.g)) ? void 0 : t$1), !0);
1600
+ }), Kr), ui = Gr((function(t$1, e$1, n$1) {
1601
+ return 0 === t$1.h && (Xr(e$1, n$1, Nn(t$1.g)), !0);
1602
+ }), Yr), li = Gr((function(t$1, e$1, n$1) {
1603
+ return 0 === t$1.h && (Xr(e$1, n$1, !1 === (t$1 = Nn(t$1.g)) ? void 0 : t$1), !0);
1604
+ }), Yr), fi = jr((function(t$1, e$1, n$1) {
1605
+ if (2 !== t$1.h) return !1;
1606
+ t$1 = qn(t$1);
1607
+ const r$1 = et(e$1);
1608
+ return pt(r$1), Je(e$1, r$1, n$1, 2).push(t$1), !0;
1609
+ }), (function(t$1, e$1, n$1) {
1610
+ if (null != (e$1 = Tr(re, e$1))) for (let o$1 = 0; o$1 < e$1.length; o$1++) {
1611
+ var r$1 = t$1, i$1 = n$1, s$1 = e$1[o$1];
1612
+ null != s$1 && _r(r$1, i$1, c(s$1));
1613
+ }
1614
+ })), di = Gr((function(t$1, e$1, n$1) {
1615
+ return 2 === t$1.h && (Xr(e$1, n$1, "" === (t$1 = qn(t$1)) ? void 0 : t$1), !0);
1616
+ }), $r), pi = Gr((function(t$1, e$1, n$1) {
1617
+ return 2 === t$1.h && (Xr(e$1, n$1, qn(t$1)), !0);
1618
+ }), $r), gi = Vr((function(t$1, e$1, n$1, r$1, i$1) {
1619
+ return 2 === t$1.h && ($n(t$1, fn(e$1, r$1, n$1, !0), i$1), !0);
1620
+ }), qr), mi = Vr((function(t$1, e$1, n$1, r$1, i$1) {
1621
+ return 2 === t$1.h && ($n(t$1, fn(e$1, r$1, n$1), i$1), !0);
1622
+ }), qr);
1623
+ Qr = new Er((function(t$1, e$1, n$1, r$1, i$1) {
1624
+ if (2 !== t$1.h) return !1;
1625
+ r$1 = Ae(void 0, r$1);
1626
+ let s$1 = et(e$1);
1627
+ pt(s$1);
1628
+ let o$1 = Je(e$1, s$1, n$1, 3);
1629
+ return s$1 = et(e$1), 4 & tt(o$1) && (o$1 = H(o$1), nt(o$1, -2079 & (1 | tt(o$1))), qe(e$1, s$1, n$1, o$1)), o$1.push(r$1), $n(t$1, r$1, i$1), !0;
1630
+ }), (function(t$1, e$1, n$1, r$1, i$1) {
1631
+ if (Array.isArray(e$1)) for (let s$1 = 0; s$1 < e$1.length; s$1++) qr(t$1, e$1[s$1], n$1, r$1, i$1);
1632
+ }), !0);
1633
+ var yi = Vr((function(t$1, e$1, n$1, r$1, i$1, s$1) {
1634
+ return 2 === t$1.h && (un(e$1, et(e$1), s$1, n$1), $n(t$1, e$1 = fn(e$1, r$1, n$1), i$1), !0);
1635
+ }), qr), _i = Gr((function(t$1, e$1, n$1) {
1636
+ return 2 === t$1.h && (Xr(e$1, n$1, Jn(t$1)), !0);
1637
+ }), Jr), vi = jr((function(t$1, e$1, n$1) {
1638
+ return (0 === t$1.h || 2 === t$1.h) && (e$1 = Je(e$1, et(e$1), n$1, 2, !1), 2 == t$1.h ? Zn(t$1, Dn, e$1) : e$1.push(Dn(t$1.g)), !0);
1639
+ }), (function(t$1, e$1, n$1) {
1640
+ if (null != (e$1 = Tr($t, e$1))) for (let o$1 = 0; o$1 < e$1.length; o$1++) {
1641
+ var r$1 = t$1, i$1 = n$1, s$1 = e$1[o$1];
1642
+ null != s$1 && (gr(r$1, i$1, 0), lr(r$1.g, s$1));
1643
+ }
1644
+ })), Ei = Gr((function(t$1, e$1, n$1) {
1645
+ return 0 === t$1.h && (Xr(e$1, n$1, Un(t$1.g)), !0);
1646
+ }), (function(t$1, e$1, n$1) {
1647
+ null != (e$1 = Yt(e$1)) && (e$1 = parseInt(e$1, 10), gr(t$1, n$1, 0), fr(t$1.g, e$1));
1648
+ }));
1649
+ var wi = class {
1650
+ constructor(t$1, e$1) {
1651
+ this.h = t$1, this.g = e$1, this.l = pn, this.m = yn, this.defaultValue = void 0;
1652
+ }
1653
+ };
1654
+ function Ti(t$1, e$1) {
1655
+ return new wi(t$1, e$1);
1656
+ }
1657
+ function Ai(t$1, e$1) {
1658
+ return (n$1, r$1) => {
1659
+ if (Qn.length) {
1660
+ const t$2 = Qn.pop();
1661
+ t$2.o(r$1), Vn(t$2.g, n$1, r$1), n$1 = t$2;
1662
+ } else n$1 = new class {
1663
+ constructor(t$2, e$2) {
1664
+ if (zn.length) {
1665
+ const n$2 = zn.pop();
1666
+ Vn(n$2, t$2, e$2), t$2 = n$2;
1667
+ } else t$2 = new class {
1668
+ constructor(t$3, e$3) {
1669
+ this.h = null, this.m = !1, this.g = this.l = this.j = 0, Vn(this, t$3, e$3);
1670
+ }
1671
+ clear() {
1672
+ this.h = null, this.m = !1, this.g = this.l = this.j = 0, this.ea = !1;
1673
+ }
1674
+ }(t$2, e$2);
1675
+ this.g = t$2, this.l = this.g.g, this.h = this.m = -1, this.o(e$2);
1676
+ }
1677
+ o({ ja: t$2 = !1 } = {}) {
1678
+ this.ja = t$2;
1679
+ }
1680
+ }(n$1, r$1);
1681
+ try {
1682
+ const r$2 = new t$1(), s$1 = r$2.u;
1683
+ br(e$1)(s$1, n$1);
1684
+ var i$1 = r$2;
1685
+ } finally {
1686
+ n$1.g.clear(), n$1.m = -1, n$1.h = -1, Qn.length < 100 && Qn.push(n$1);
1687
+ }
1688
+ return i$1;
1689
+ };
1690
+ }
1691
+ function bi(t$1) {
1692
+ return function() {
1693
+ we(this);
1694
+ const e$1 = new class {
1695
+ constructor() {
1696
+ this.l = [], this.h = 0, this.g = new class {
1697
+ constructor() {
1698
+ this.g = [];
1699
+ }
1700
+ length() {
1701
+ return this.g.length;
1702
+ }
1703
+ end() {
1704
+ const t$2 = this.g;
1705
+ return this.g = [], t$2;
1706
+ }
1707
+ }();
1708
+ }
1709
+ }();
1710
+ Br(this.u, e$1, Pr(t$1)), pr(e$1, e$1.g.end());
1711
+ const n$1 = new Uint8Array(e$1.h), r$1 = e$1.l, i$1 = r$1.length;
1712
+ let s$1 = 0;
1713
+ for (let t$2 = 0; t$2 < i$1; t$2++) {
1714
+ const e$2 = r$1[t$2];
1715
+ n$1.set(e$2, s$1), s$1 += e$2.length;
1716
+ }
1717
+ return e$1.l = [n$1], n$1;
1718
+ };
1719
+ }
1720
+ var ki = class extends nr {
1721
+ constructor(t$1) {
1722
+ super(t$1);
1723
+ }
1724
+ }, Si = [
1725
+ 0,
1726
+ di,
1727
+ Gr((function(t$1, e$1, n$1) {
1728
+ return 2 === t$1.h && (Xr(e$1, n$1, (t$1 = Jn(t$1)) === N() ? void 0 : t$1), !0);
1729
+ }), (function(t$1, e$1, n$1) {
1730
+ if (null != e$1) {
1731
+ if (e$1 instanceof nr) {
1732
+ const r$1 = e$1.Ta;
1733
+ r$1 && (e$1 = r$1(e$1), null != e$1 && _r(t$1, n$1, On(e$1).buffer));
1734
+ return;
1735
+ }
1736
+ if (Array.isArray(e$1)) return;
1737
+ }
1738
+ Jr(t$1, e$1, n$1);
1739
+ }))
1740
+ ], xi = [
1741
+ 0,
1742
+ ai,
1743
+ Ei,
1744
+ ui,
1745
+ -1,
1746
+ hi,
1747
+ Ei,
1748
+ -1
1749
+ ], Li = class extends nr {
1750
+ constructor() {
1751
+ super();
1752
+ }
1753
+ }, Ri = [
1754
+ 0,
1755
+ ui,
1756
+ pi,
1757
+ ui,
1758
+ Ei,
1759
+ -1,
1760
+ jr((function(t$1, e$1, n$1) {
1761
+ return (0 === t$1.h || 2 === t$1.h) && (e$1 = Je(e$1, et(e$1), n$1, 2, !1), 2 == t$1.h ? Zn(t$1, jn, e$1) : e$1.push(Un(t$1.g)), !0);
1762
+ }), (function(t$1, e$1, n$1) {
1763
+ if (null != (e$1 = Tr(Yt, e$1)) && e$1.length) {
1764
+ n$1 = mr(t$1, n$1);
1765
+ for (let n$2 = 0; n$2 < e$1.length; n$2++) fr(t$1.g, e$1[n$2]);
1766
+ yr(t$1, n$1);
1767
+ }
1768
+ })),
1769
+ pi,
1770
+ -1,
1771
+ [
1772
+ 0,
1773
+ ui,
1774
+ -1
1775
+ ],
1776
+ Ei,
1777
+ ui,
1778
+ -1
1779
+ ], Fi = [
1780
+ 0,
1781
+ pi,
1782
+ -2
1783
+ ], Mi = class extends nr {
1784
+ constructor() {
1785
+ super();
1786
+ }
1787
+ }, Ii = [0], Pi = [
1788
+ 0,
1789
+ ai,
1790
+ ui,
1791
+ 1,
1792
+ ui,
1793
+ -3
1794
+ ], Oi = [
1795
+ 0,
1796
+ pi,
1797
+ ui,
1798
+ -1,
1799
+ ai,
1800
+ [
1801
+ 0,
1802
+ [
1803
+ 1,
1804
+ 2,
1805
+ 3,
1806
+ 4,
1807
+ 5,
1808
+ 6,
1809
+ 7
1810
+ ],
1811
+ yi,
1812
+ Ii,
1813
+ yi,
1814
+ Ri,
1815
+ yi,
1816
+ Fi,
1817
+ yi,
1818
+ Pi,
1819
+ yi,
1820
+ xi,
1821
+ yi,
1822
+ [
1823
+ 0,
1824
+ pi,
1825
+ -2
1826
+ ],
1827
+ yi,
1828
+ [
1829
+ 0,
1830
+ pi,
1831
+ Ei
1832
+ ]
1833
+ ],
1834
+ [0, pi],
1835
+ ui,
1836
+ [
1837
+ 0,
1838
+ [1, 3],
1839
+ [2, 4],
1840
+ yi,
1841
+ [0, hi],
1842
+ -1,
1843
+ yi,
1844
+ [0, fi],
1845
+ -1,
1846
+ Qr,
1847
+ [
1848
+ 0,
1849
+ pi,
1850
+ -1
1851
+ ]
1852
+ ],
1853
+ pi
1854
+ ], Ci = class extends nr {
1855
+ constructor(t$1) {
1856
+ super(t$1, 2);
1857
+ }
1858
+ }, Ni = {}, Ui = Ni.P = {};
1859
+ Ni[336783863] = Oi, Ui[336783863] = 1;
1860
+ var Di = [
1861
+ 0,
1862
+ si,
1863
+ -1,
1864
+ li,
1865
+ -3,
1866
+ si,
1867
+ hi,
1868
+ di,
1869
+ ci,
1870
+ si,
1871
+ -1,
1872
+ li,
1873
+ ci,
1874
+ li,
1875
+ -2,
1876
+ di
1877
+ ];
1878
+ function Bi(t$1, e$1) {
1879
+ an(t$1, 2, ne(e$1), "");
1880
+ }
1881
+ function Gi(t$1, e$1) {
1882
+ Fn(t$1, 3, e$1);
1883
+ }
1884
+ function ji(t$1, e$1) {
1885
+ Fn(t$1, 4, e$1);
1886
+ }
1887
+ var Vi = class extends nr {
1888
+ constructor(t$1) {
1889
+ super(t$1, 500);
1890
+ }
1891
+ o(t$1) {
1892
+ return yn(this, 0, 7, t$1);
1893
+ }
1894
+ }, Xi = [-1, { P: {} }], Hi = [
1895
+ 0,
1896
+ pi,
1897
+ 1,
1898
+ Xi
1899
+ ], Wi = [
1900
+ 0,
1901
+ pi,
1902
+ fi,
1903
+ Xi
1904
+ ];
1905
+ function zi(t$1, e$1) {
1906
+ wn(t$1, 1, Vi, e$1);
1907
+ }
1908
+ function Ki(t$1, e$1) {
1909
+ Fn(t$1, 10, e$1);
1910
+ }
1911
+ function Yi(t$1, e$1) {
1912
+ Fn(t$1, 15, e$1);
1913
+ }
1914
+ var $i = class extends nr {
1915
+ constructor(t$1) {
1916
+ super(t$1, 500);
1917
+ }
1918
+ o(t$1) {
1919
+ return yn(this, 0, 1001, t$1);
1920
+ }
1921
+ }, qi = [
1922
+ -500,
1923
+ Qr,
1924
+ [
1925
+ -500,
1926
+ di,
1927
+ -1,
1928
+ fi,
1929
+ -3,
1930
+ [
1931
+ -2,
1932
+ Ni,
1933
+ ui
1934
+ ],
1935
+ Qr,
1936
+ Si,
1937
+ ci,
1938
+ -1,
1939
+ Hi,
1940
+ Wi,
1941
+ Qr,
1942
+ [
1943
+ 0,
1944
+ di,
1945
+ li
1946
+ ],
1947
+ di,
1948
+ Di,
1949
+ ci,
1950
+ fi,
1951
+ 987,
1952
+ fi
1953
+ ],
1954
+ 4,
1955
+ Qr,
1956
+ [
1957
+ -500,
1958
+ pi,
1959
+ -1,
1960
+ [-1, { P: {} }],
1961
+ 998,
1962
+ pi
1963
+ ],
1964
+ Qr,
1965
+ [
1966
+ -500,
1967
+ pi,
1968
+ fi,
1969
+ -1,
1970
+ [
1971
+ -2,
1972
+ { P: {} },
1973
+ ui
1974
+ ],
1975
+ 997,
1976
+ fi,
1977
+ -1
1978
+ ],
1979
+ ci,
1980
+ Qr,
1981
+ [
1982
+ -500,
1983
+ pi,
1984
+ fi,
1985
+ Xi,
1986
+ 998,
1987
+ fi
1988
+ ],
1989
+ fi,
1990
+ ci,
1991
+ Hi,
1992
+ Wi,
1993
+ Qr,
1994
+ [
1995
+ 0,
1996
+ di,
1997
+ -1,
1998
+ Xi
1999
+ ],
2000
+ fi,
2001
+ -2,
2002
+ Di,
2003
+ di,
2004
+ -1,
2005
+ li,
2006
+ 979,
2007
+ Xi,
2008
+ Qr,
2009
+ Si
2010
+ ];
2011
+ $i.prototype.g = bi(qi);
2012
+ var Ji = Ai($i, qi), Zi = class extends nr {
2013
+ constructor(t$1) {
2014
+ super(t$1);
2015
+ }
2016
+ }, Qi = class extends nr {
2017
+ constructor(t$1) {
2018
+ super(t$1);
2019
+ }
2020
+ g() {
2021
+ return mn(this, Zi, 1);
2022
+ }
2023
+ }, ts = [
2024
+ 0,
2025
+ Qr,
2026
+ [
2027
+ 0,
2028
+ ai,
2029
+ ei,
2030
+ pi,
2031
+ -1
2032
+ ]
2033
+ ], es = Ai(Qi, ts), ns = class extends nr {
2034
+ constructor(t$1) {
2035
+ super(t$1);
2036
+ }
2037
+ }, rs = class extends nr {
2038
+ constructor(t$1) {
2039
+ super(t$1);
2040
+ }
2041
+ }, is = class extends nr {
2042
+ constructor(t$1) {
2043
+ super(t$1);
2044
+ }
2045
+ h() {
2046
+ return pn(this, ns, 2);
2047
+ }
2048
+ g() {
2049
+ return mn(this, rs, 5);
2050
+ }
2051
+ }, ss = Ai(class extends nr {
2052
+ constructor(t$1) {
2053
+ super(t$1);
2054
+ }
2055
+ }, [
2056
+ 0,
2057
+ fi,
2058
+ hi,
2059
+ ri,
2060
+ [
2061
+ 0,
2062
+ Ei,
2063
+ [
2064
+ 0,
2065
+ ai,
2066
+ -3
2067
+ ],
2068
+ [
2069
+ 0,
2070
+ ei,
2071
+ -3
2072
+ ],
2073
+ [
2074
+ 0,
2075
+ ai,
2076
+ -1,
2077
+ [
2078
+ 0,
2079
+ Qr,
2080
+ [
2081
+ 0,
2082
+ ai,
2083
+ -2
2084
+ ]
2085
+ ]
2086
+ ],
2087
+ Qr,
2088
+ [
2089
+ 0,
2090
+ ei,
2091
+ -1,
2092
+ pi,
2093
+ ei
2094
+ ]
2095
+ ],
2096
+ pi,
2097
+ -1,
2098
+ ii,
2099
+ Qr,
2100
+ [
2101
+ 0,
2102
+ ai,
2103
+ ei
2104
+ ],
2105
+ fi,
2106
+ ii
2107
+ ]), os = class extends nr {
2108
+ constructor(t$1) {
2109
+ super(t$1);
2110
+ }
2111
+ }, as = Ai(class extends nr {
2112
+ constructor(t$1) {
2113
+ super(t$1);
2114
+ }
2115
+ }, [
2116
+ 0,
2117
+ Qr,
2118
+ [
2119
+ 0,
2120
+ ei,
2121
+ -4
2122
+ ]
2123
+ ]), hs = class extends nr {
2124
+ constructor(t$1) {
2125
+ super(t$1);
2126
+ }
2127
+ }, cs = Ai(class extends nr {
2128
+ constructor(t$1) {
2129
+ super(t$1);
2130
+ }
2131
+ }, [
2132
+ 0,
2133
+ Qr,
2134
+ [
2135
+ 0,
2136
+ ei,
2137
+ -4
2138
+ ]
2139
+ ]), us = class extends nr {
2140
+ constructor(t$1) {
2141
+ super(t$1);
2142
+ }
2143
+ }, ls = [
2144
+ 0,
2145
+ ai,
2146
+ -1,
2147
+ ri,
2148
+ Ei
2149
+ ], fs = class extends nr {
2150
+ constructor() {
2151
+ super();
2152
+ }
2153
+ };
2154
+ fs.prototype.g = bi([
2155
+ 0,
2156
+ ei,
2157
+ -4,
2158
+ ii
2159
+ ]);
2160
+ var ds = class extends nr {
2161
+ constructor(t$1) {
2162
+ super(t$1);
2163
+ }
2164
+ }, ps = Ai(class extends nr {
2165
+ constructor(t$1) {
2166
+ super(t$1);
2167
+ }
2168
+ }, [
2169
+ 0,
2170
+ Qr,
2171
+ [
2172
+ 0,
2173
+ 1,
2174
+ ai,
2175
+ pi,
2176
+ ts
2177
+ ],
2178
+ ii
2179
+ ]), gs = class extends nr {
2180
+ constructor(t$1) {
2181
+ super(t$1);
2182
+ }
2183
+ }, ms = class extends nr {
2184
+ constructor(t$1) {
2185
+ super(t$1);
2186
+ }
2187
+ ra() {
2188
+ const t$1 = Qe(this);
2189
+ return null == t$1 ? N() : t$1;
2190
+ }
2191
+ }, ys = class extends nr {
2192
+ constructor(t$1) {
2193
+ super(t$1);
2194
+ }
2195
+ }, _s = [1, 2], vs = Ai(class extends nr {
2196
+ constructor(t$1) {
2197
+ super(t$1);
2198
+ }
2199
+ }, [
2200
+ 0,
2201
+ Qr,
2202
+ [
2203
+ 0,
2204
+ _s,
2205
+ yi,
2206
+ [0, ri],
2207
+ yi,
2208
+ [0, _i],
2209
+ ai,
2210
+ pi
2211
+ ],
2212
+ ii
2213
+ ]), Es = class extends nr {
2214
+ constructor(t$1) {
2215
+ super(t$1);
2216
+ }
2217
+ }, ws = [
2218
+ 0,
2219
+ pi,
2220
+ ai,
2221
+ ei,
2222
+ fi,
2223
+ -1
2224
+ ], Ts = class extends nr {
2225
+ constructor(t$1) {
2226
+ super(t$1);
2227
+ }
2228
+ }, As = [
2229
+ 0,
2230
+ ui,
2231
+ -1
2232
+ ], bs = class extends nr {
2233
+ constructor(t$1) {
2234
+ super(t$1);
2235
+ }
2236
+ }, ks = [
2237
+ 1,
2238
+ 2,
2239
+ 3,
2240
+ 4,
2241
+ 5
2242
+ ], Ss = class extends nr {
2243
+ constructor(t$1) {
2244
+ super(t$1);
2245
+ }
2246
+ g() {
2247
+ return null != Qe(this);
2248
+ }
2249
+ h() {
2250
+ return null != re(ze(this, 2));
2251
+ }
2252
+ }, xs = class extends nr {
2253
+ constructor(t$1) {
2254
+ super(t$1);
2255
+ }
2256
+ g() {
2257
+ return Wt(ze(this, 2)) ?? !1;
2258
+ }
2259
+ }, Ls = [
2260
+ 0,
2261
+ _i,
2262
+ pi,
2263
+ [
2264
+ 0,
2265
+ ai,
2266
+ ii,
2267
+ -1
2268
+ ],
2269
+ [
2270
+ 0,
2271
+ oi,
2272
+ ii
2273
+ ]
2274
+ ], Rs = [
2275
+ 0,
2276
+ Ls,
2277
+ ui,
2278
+ [
2279
+ 0,
2280
+ ks,
2281
+ yi,
2282
+ Pi,
2283
+ yi,
2284
+ Ri,
2285
+ yi,
2286
+ xi,
2287
+ yi,
2288
+ Ii,
2289
+ yi,
2290
+ Fi
2291
+ ],
2292
+ Ei
2293
+ ], Fs = class extends nr {
2294
+ constructor(t$1) {
2295
+ super(t$1);
2296
+ }
2297
+ }, Ms = [
2298
+ 0,
2299
+ Rs,
2300
+ ei,
2301
+ -1,
2302
+ ai
2303
+ ], Is = Ti(502141897, Fs);
2304
+ Ni[502141897] = Ms, Ui[502141897] = 1;
2305
+ var Ps = [0, Ls];
2306
+ Ni[512499200] = Ps;
2307
+ var Os = [0, Ps];
2308
+ Ni[515723506] = Os;
2309
+ var Cs = Ai(class extends nr {
2310
+ constructor(t$1) {
2311
+ super(t$1);
2312
+ }
2313
+ }, [
2314
+ 0,
2315
+ [
2316
+ 0,
2317
+ Ei,
2318
+ -1,
2319
+ ni,
2320
+ vi
2321
+ ],
2322
+ ls
2323
+ ]), Ns = [0, Rs];
2324
+ Ni[508981768] = Ns;
2325
+ var Us = class extends nr {
2326
+ constructor(t$1) {
2327
+ super(t$1);
2328
+ }
2329
+ }, Ds = class extends nr {
2330
+ constructor(t$1) {
2331
+ super(t$1);
2332
+ }
2333
+ }, Bs = [
2334
+ 0,
2335
+ Rs,
2336
+ ei,
2337
+ Ns,
2338
+ ui
2339
+ ], Gs = [
2340
+ 0,
2341
+ Rs,
2342
+ Ms,
2343
+ Bs,
2344
+ ei,
2345
+ Os
2346
+ ];
2347
+ Ni[508968149] = Bs;
2348
+ var js = Ti(508968150, Ds);
2349
+ Ni[508968150] = Gs, Ui[508968150] = 1, Ui[508968149] = 1;
2350
+ var Vs = class extends nr {
2351
+ constructor(t$1) {
2352
+ super(t$1);
2353
+ }
2354
+ }, Xs = Ti(513916220, Vs);
2355
+ Ni[513916220] = [
2356
+ 0,
2357
+ Rs,
2358
+ Gs,
2359
+ ai
2360
+ ], Ui[513916220] = 1;
2361
+ var Hs = class extends nr {
2362
+ constructor(t$1) {
2363
+ super(t$1);
2364
+ }
2365
+ h() {
2366
+ return pn(this, Es, 2);
2367
+ }
2368
+ g() {
2369
+ $e(this, 2);
2370
+ }
2371
+ }, Ws = [
2372
+ 0,
2373
+ Rs,
2374
+ ws
2375
+ ];
2376
+ Ni[478825465] = Ws, Ui[478825465] = 1;
2377
+ var zs = [0, Rs];
2378
+ Ni[478825422] = zs;
2379
+ var Ks = class extends nr {
2380
+ constructor(t$1) {
2381
+ super(t$1);
2382
+ }
2383
+ }, Ys = class extends nr {
2384
+ constructor(t$1) {
2385
+ super(t$1);
2386
+ }
2387
+ }, $s = class extends nr {
2388
+ constructor(t$1) {
2389
+ super(t$1);
2390
+ }
2391
+ }, qs = class extends nr {
2392
+ constructor(t$1) {
2393
+ super(t$1);
2394
+ }
2395
+ }, Js = class extends nr {
2396
+ constructor(t$1) {
2397
+ super(t$1);
2398
+ }
2399
+ }, Zs = [
2400
+ 0,
2401
+ Rs,
2402
+ zs,
2403
+ Ws,
2404
+ -1
2405
+ ], Qs = [
2406
+ 0,
2407
+ Rs,
2408
+ ei,
2409
+ ai
2410
+ ], to = [
2411
+ 0,
2412
+ Rs,
2413
+ ei
2414
+ ], eo = [
2415
+ 0,
2416
+ Rs,
2417
+ Qs,
2418
+ to,
2419
+ ei
2420
+ ], no = [
2421
+ 0,
2422
+ Rs,
2423
+ eo,
2424
+ Zs
2425
+ ];
2426
+ Ni[463370452] = Zs, Ni[464864288] = Qs, Ni[474472470] = to;
2427
+ var ro = Ti(462713202, qs);
2428
+ Ni[462713202] = eo;
2429
+ var io = Ti(479097054, Js);
2430
+ Ni[479097054] = no, Ui[479097054] = 1, Ui[463370452] = 1, Ui[464864288] = 1, Ui[462713202] = 1, Ui[474472470] = 1;
2431
+ var so = class extends nr {
2432
+ constructor(t$1) {
2433
+ super(t$1);
2434
+ }
2435
+ }, oo = class extends nr {
2436
+ constructor(t$1) {
2437
+ super(t$1);
2438
+ }
2439
+ }, ao = class extends nr {
2440
+ constructor(t$1) {
2441
+ super(t$1);
2442
+ }
2443
+ }, ho = class extends nr {
2444
+ constructor() {
2445
+ super();
2446
+ }
2447
+ }, co = [
2448
+ 0,
2449
+ Rs,
2450
+ ei,
2451
+ -1,
2452
+ ai
2453
+ ], uo = [
2454
+ 0,
2455
+ Rs,
2456
+ ei,
2457
+ ui
2458
+ ];
2459
+ ho.prototype.g = bi([
2460
+ 0,
2461
+ Rs,
2462
+ to,
2463
+ [0, Rs],
2464
+ Ms,
2465
+ Bs,
2466
+ co,
2467
+ uo
2468
+ ]), Ni[514774813] = co, Ni[518928384] = uo;
2469
+ var lo = class extends nr {
2470
+ constructor(t$1) {
2471
+ super(t$1);
2472
+ }
2473
+ }, fo = Ti(456383383, lo);
2474
+ Ni[456383383] = [
2475
+ 0,
2476
+ Rs,
2477
+ ws
2478
+ ], Ui[456383383] = 1;
2479
+ var po = class extends nr {
2480
+ constructor(t$1) {
2481
+ super(t$1);
2482
+ }
2483
+ }, go = Ti(476348187, po);
2484
+ Ni[476348187] = [
2485
+ 0,
2486
+ Rs,
2487
+ As
2488
+ ], Ui[476348187] = 1;
2489
+ var mo = class extends nr {
2490
+ constructor(t$1) {
2491
+ super(t$1);
2492
+ }
2493
+ }, yo = class extends nr {
2494
+ constructor(t$1) {
2495
+ super(t$1);
2496
+ }
2497
+ }, _o = [
2498
+ 0,
2499
+ Ei,
2500
+ -1
2501
+ ], vo = Ti(458105876, class extends nr {
2502
+ constructor(t$1) {
2503
+ super(t$1);
2504
+ }
2505
+ g() {
2506
+ var t$1 = this.u;
2507
+ const e$1 = et(t$1);
2508
+ const n$1 = 2 & e$1;
2509
+ return t$1 = function(t$2, e$2, n$2) {
2510
+ var r$1 = yo;
2511
+ const i$1 = 2 & e$2;
2512
+ let s$1 = !1;
2513
+ if (null == n$2) {
2514
+ if (i$1) return Ne();
2515
+ n$2 = [];
2516
+ } else if (n$2.constructor === Me) {
2517
+ if (0 == (2 & n$2.M) || i$1) return n$2;
2518
+ n$2 = n$2.Z();
2519
+ } else Array.isArray(n$2) ? s$1 = !!(2 & tt(n$2)) : n$2 = [];
2520
+ if (i$1) {
2521
+ if (!n$2.length) return Ne();
2522
+ s$1 || (s$1 = !0, rt(n$2));
2523
+ } else s$1 && (s$1 = !1, n$2 = on(n$2));
2524
+ return s$1 || (64 & tt(n$2) ? Q(n$2, 32) : 32 & e$2 && Z(n$2, 32)), qe(t$2, e$2, 2, r$1 = new Me(n$2, r$1, se, void 0)), r$1;
2525
+ }(t$1, e$1, Ye(t$1, e$1, 2)), !n$1 && yo && (t$1.va = !0), t$1;
2526
+ }
2527
+ });
2528
+ Ni[458105876] = [
2529
+ 0,
2530
+ _o,
2531
+ Hr,
2532
+ [
2533
+ !0,
2534
+ ii,
2535
+ [
2536
+ 0,
2537
+ pi,
2538
+ -1,
2539
+ fi
2540
+ ]
2541
+ ]
2542
+ ], Ui[458105876] = 1;
2543
+ var Eo = class extends nr {
2544
+ constructor(t$1) {
2545
+ super(t$1);
2546
+ }
2547
+ }, wo = Ti(458105758, Eo);
2548
+ Ni[458105758] = [
2549
+ 0,
2550
+ Rs,
2551
+ pi,
2552
+ _o
2553
+ ], Ui[458105758] = 1;
2554
+ var To = class extends nr {
2555
+ constructor(t$1) {
2556
+ super(t$1);
2557
+ }
2558
+ }, Ao = Ti(443442058, To);
2559
+ Ni[443442058] = [
2560
+ 0,
2561
+ Rs,
2562
+ pi,
2563
+ ai,
2564
+ ei,
2565
+ fi,
2566
+ -1
2567
+ ], Ui[443442058] = 1, Ui[514774813] = 1;
2568
+ var bo = class extends nr {
2569
+ constructor(t$1) {
2570
+ super(t$1);
2571
+ }
2572
+ }, ko = Ti(516587230, bo);
2573
+ function So(t$1, e$1) {
2574
+ return e$1 = e$1 ? e$1.clone() : new Es(), void 0 !== t$1.displayNamesLocale ? $e(e$1, 1, ne(t$1.displayNamesLocale)) : void 0 === t$1.displayNamesLocale && $e(e$1, 1), void 0 !== t$1.maxResults ? xn(e$1, 2, t$1.maxResults) : "maxResults" in t$1 && $e(e$1, 2), void 0 !== t$1.scoreThreshold ? Ln(e$1, 3, t$1.scoreThreshold) : "scoreThreshold" in t$1 && $e(e$1, 3), void 0 !== t$1.categoryAllowlist ? Rn(e$1, 4, t$1.categoryAllowlist) : "categoryAllowlist" in t$1 && $e(e$1, 4), void 0 !== t$1.categoryDenylist ? Rn(e$1, 5, t$1.categoryDenylist) : "categoryDenylist" in t$1 && $e(e$1, 5), e$1;
2575
+ }
2576
+ function xo(t$1, e$1 = -1, n$1 = "") {
2577
+ return {
2578
+ categories: t$1.map(((t$2) => ({
2579
+ index: Tn(An(t$2, 1), 0) ?? -1,
2580
+ score: bn(t$2, 2) ?? 0,
2581
+ categoryName: kn(t$2, 3) ?? "",
2582
+ displayName: kn(t$2, 4) ?? ""
2583
+ }))),
2584
+ headIndex: e$1,
2585
+ headName: n$1
2586
+ };
2587
+ }
2588
+ function Lo(t$1) {
2589
+ var e$1 = en(t$1, 3, Ht, tn()), n$1 = en(t$1, 2, Yt, tn()), r$1 = en(t$1, 1, re, tn()), i$1 = en(t$1, 9, re, tn());
2590
+ const s$1 = {
2591
+ categories: [],
2592
+ keypoints: []
2593
+ };
2594
+ for (let t$2 = 0; t$2 < e$1.length; t$2++) s$1.categories.push({
2595
+ score: e$1[t$2],
2596
+ index: n$1[t$2] ?? -1,
2597
+ categoryName: r$1[t$2] ?? "",
2598
+ displayName: i$1[t$2] ?? ""
2599
+ });
2600
+ if ((e$1 = pn(t$1, is, 4)?.h()) && (s$1.boundingBox = {
2601
+ originX: An(e$1, 1) ?? 0,
2602
+ originY: An(e$1, 2) ?? 0,
2603
+ width: An(e$1, 3) ?? 0,
2604
+ height: An(e$1, 4) ?? 0,
2605
+ angle: 0
2606
+ }), pn(t$1, is, 4)?.g().length) for (const e$2 of pn(t$1, is, 4).g()) s$1.keypoints.push({
2607
+ x: Ze(e$2, 1) ?? 0,
2608
+ y: Ze(e$2, 2) ?? 0,
2609
+ score: Ze(e$2, 4) ?? 0,
2610
+ label: re(ze(e$2, 3)) ?? ""
2611
+ });
2612
+ return s$1;
2613
+ }
2614
+ function Ro(t$1) {
2615
+ const e$1 = [];
2616
+ for (const n$1 of mn(t$1, hs, 1)) e$1.push({
2617
+ x: bn(n$1, 1) ?? 0,
2618
+ y: bn(n$1, 2) ?? 0,
2619
+ z: bn(n$1, 3) ?? 0,
2620
+ visibility: bn(n$1, 4) ?? 0
2621
+ });
2622
+ return e$1;
2623
+ }
2624
+ function Fo(t$1) {
2625
+ const e$1 = [];
2626
+ for (const n$1 of mn(t$1, os, 1)) e$1.push({
2627
+ x: bn(n$1, 1) ?? 0,
2628
+ y: bn(n$1, 2) ?? 0,
2629
+ z: bn(n$1, 3) ?? 0,
2630
+ visibility: bn(n$1, 4) ?? 0
2631
+ });
2632
+ return e$1;
2633
+ }
2634
+ function Mo(t$1) {
2635
+ return Array.from(t$1, ((t$2) => t$2 > 127 ? t$2 - 256 : t$2));
2636
+ }
2637
+ function Io(t$1, e$1) {
2638
+ if (t$1.length !== e$1.length) throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t$1.length} vs. ${e$1.length}).`);
2639
+ let n$1 = 0, r$1 = 0, i$1 = 0;
2640
+ for (let s$1 = 0; s$1 < t$1.length; s$1++) n$1 += t$1[s$1] * e$1[s$1], r$1 += t$1[s$1] * t$1[s$1], i$1 += e$1[s$1] * e$1[s$1];
2641
+ if (r$1 <= 0 || i$1 <= 0) throw Error("Cannot compute cosine similarity on embedding with 0 norm.");
2642
+ return n$1 / Math.sqrt(r$1 * i$1);
2643
+ }
2644
+ let Po;
2645
+ Ni[516587230] = [
2646
+ 0,
2647
+ Rs,
2648
+ co,
2649
+ uo,
2650
+ ei
2651
+ ], Ui[516587230] = 1, Ui[518928384] = 1;
2652
+ const Oo = new Uint8Array([
2653
+ 0,
2654
+ 97,
2655
+ 115,
2656
+ 109,
2657
+ 1,
2658
+ 0,
2659
+ 0,
2660
+ 0,
2661
+ 1,
2662
+ 5,
2663
+ 1,
2664
+ 96,
2665
+ 0,
2666
+ 1,
2667
+ 123,
2668
+ 3,
2669
+ 2,
2670
+ 1,
2671
+ 0,
2672
+ 10,
2673
+ 10,
2674
+ 1,
2675
+ 8,
2676
+ 0,
2677
+ 65,
2678
+ 0,
2679
+ 253,
2680
+ 15,
2681
+ 253,
2682
+ 98,
2683
+ 11
2684
+ ]);
2685
+ async function Co() {
2686
+ if (void 0 === Po) try {
2687
+ await WebAssembly.instantiate(Oo), Po = !0;
2688
+ } catch {
2689
+ Po = !1;
2690
+ }
2691
+ return Po;
2692
+ }
2693
+ async function No(t$1, e$1 = "") {
2694
+ const n$1 = await Co() ? "wasm_internal" : "wasm_nosimd_internal";
2695
+ return {
2696
+ wasmLoaderPath: `${e$1}/${t$1}_${n$1}.js`,
2697
+ wasmBinaryPath: `${e$1}/${t$1}_${n$1}.wasm`
2698
+ };
2699
+ }
2700
+ var Uo = class {};
2701
+ function Do() {
2702
+ var t$1 = navigator;
2703
+ return "undefined" != typeof OffscreenCanvas && (!function(t$2 = navigator) {
2704
+ return (t$2 = t$2.userAgent).includes("Safari") && !t$2.includes("Chrome");
2705
+ }(t$1) || !!((t$1 = t$1.userAgent.match(/Version\/([\d]+).*Safari/)) && t$1.length >= 1 && Number(t$1[1]) >= 17));
2706
+ }
2707
+ async function Bo(t$1) {
2708
+ if ("function" != typeof importScripts) {
2709
+ const e$1 = document.createElement("script");
2710
+ return e$1.src = t$1.toString(), e$1.crossOrigin = "anonymous", new Promise(((t$2, n$1) => {
2711
+ e$1.addEventListener("load", (() => {
2712
+ t$2();
2713
+ }), !1), e$1.addEventListener("error", ((t$3) => {
2714
+ n$1(t$3);
2715
+ }), !1), document.body.appendChild(e$1);
2716
+ }));
2717
+ }
2718
+ importScripts(t$1.toString());
2719
+ }
2720
+ function Go(t$1) {
2721
+ return void 0 !== t$1.videoWidth ? [t$1.videoWidth, t$1.videoHeight] : void 0 !== t$1.naturalWidth ? [t$1.naturalWidth, t$1.naturalHeight] : void 0 !== t$1.displayWidth ? [t$1.displayWidth, t$1.displayHeight] : [t$1.width, t$1.height];
2722
+ }
2723
+ function jo(t$1, e$1, n$1) {
2724
+ t$1.m || console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"), n$1(e$1 = t$1.i.stringToNewUTF8(e$1)), t$1.i._free(e$1);
2725
+ }
2726
+ function Vo(t$1, e$1, n$1) {
2727
+ if (!t$1.i.canvas) throw Error("No OpenGL canvas configured.");
2728
+ if (n$1 ? t$1.i._bindTextureToStream(n$1) : t$1.i._bindTextureToCanvas(), !(n$1 = t$1.i.canvas.getContext("webgl2") || t$1.i.canvas.getContext("webgl"))) throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");
2729
+ t$1.i.gpuOriginForWebTexturesIsBottomLeft && n$1.pixelStorei(n$1.UNPACK_FLIP_Y_WEBGL, !0), n$1.texImage2D(n$1.TEXTURE_2D, 0, n$1.RGBA, n$1.RGBA, n$1.UNSIGNED_BYTE, e$1), t$1.i.gpuOriginForWebTexturesIsBottomLeft && n$1.pixelStorei(n$1.UNPACK_FLIP_Y_WEBGL, !1);
2730
+ const [r$1, i$1] = Go(e$1);
2731
+ return !t$1.l || r$1 === t$1.i.canvas.width && i$1 === t$1.i.canvas.height || (t$1.i.canvas.width = r$1, t$1.i.canvas.height = i$1), [r$1, i$1];
2732
+ }
2733
+ function Xo(t$1, e$1, n$1) {
2734
+ t$1.m || console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");
2735
+ const r$1 = new Uint32Array(e$1.length);
2736
+ for (let n$2 = 0; n$2 < e$1.length; n$2++) r$1[n$2] = t$1.i.stringToNewUTF8(e$1[n$2]);
2737
+ e$1 = t$1.i._malloc(4 * r$1.length), t$1.i.HEAPU32.set(r$1, e$1 >> 2), n$1(e$1);
2738
+ for (const e$2 of r$1) t$1.i._free(e$2);
2739
+ t$1.i._free(e$1);
2740
+ }
2741
+ function Ho(t$1, e$1, n$1) {
2742
+ t$1.i.simpleListeners = t$1.i.simpleListeners || {}, t$1.i.simpleListeners[e$1] = n$1;
2743
+ }
2744
+ function Wo(t$1, e$1, n$1) {
2745
+ let r$1 = [];
2746
+ t$1.i.simpleListeners = t$1.i.simpleListeners || {}, t$1.i.simpleListeners[e$1] = (t$2, e$2, i$1) => {
2747
+ e$2 ? (n$1(r$1, i$1), r$1 = []) : r$1.push(t$2);
2748
+ };
2749
+ }
2750
+ Uo.forVisionTasks = function(t$1) {
2751
+ return No("vision", t$1);
2752
+ }, Uo.forTextTasks = function(t$1) {
2753
+ return No("text", t$1);
2754
+ }, Uo.forGenAiExperimentalTasks = function(t$1) {
2755
+ return No("genai_experimental", t$1);
2756
+ }, Uo.forGenAiTasks = function(t$1) {
2757
+ return No("genai", t$1);
2758
+ }, Uo.forAudioTasks = function(t$1) {
2759
+ return No("audio", t$1);
2760
+ }, Uo.isSimdSupported = function() {
2761
+ return Co();
2762
+ };
2763
+ async function zo(t$1, e$1, n$1, r$1) {
2764
+ return t$1 = await (async (t$2, e$2, n$2, r$2, i$1) => {
2765
+ if (e$2 && await Bo(e$2), !self.ModuleFactory) throw Error("ModuleFactory not set.");
2766
+ if (n$2 && (await Bo(n$2), !self.ModuleFactory)) throw Error("ModuleFactory not set.");
2767
+ return self.Module && i$1 && ((e$2 = self.Module).locateFile = i$1.locateFile, i$1.mainScriptUrlOrBlob && (e$2.mainScriptUrlOrBlob = i$1.mainScriptUrlOrBlob)), i$1 = await self.ModuleFactory(self.Module || i$1), self.ModuleFactory = self.Module = void 0, new t$2(i$1, r$2);
2768
+ })(t$1, n$1.wasmLoaderPath, n$1.assetLoaderPath, e$1, { locateFile: (t$2) => t$2.endsWith(".wasm") ? n$1.wasmBinaryPath.toString() : n$1.assetBinaryPath && t$2.endsWith(".data") ? n$1.assetBinaryPath.toString() : t$2 }), await t$1.o(r$1), t$1;
2769
+ }
2770
+ function Ko(t$1, e$1) {
2771
+ const n$1 = pn(t$1.baseOptions, Ss, 1) || new Ss();
2772
+ "string" == typeof e$1 ? ($e(n$1, 2, ne(e$1)), $e(n$1, 1)) : e$1 instanceof Uint8Array && ($e(n$1, 1, lt(e$1, !1, !1)), $e(n$1, 2)), yn(t$1.baseOptions, 0, 1, n$1);
2773
+ }
2774
+ function Yo(t$1) {
2775
+ try {
2776
+ const e$1 = t$1.H.length;
2777
+ if (1 === e$1) throw Error(t$1.H[0].message);
2778
+ if (e$1 > 1) throw Error("Encountered multiple errors: " + t$1.H.map(((t$2) => t$2.message)).join(", "));
2779
+ } finally {
2780
+ t$1.H = [];
2781
+ }
2782
+ }
2783
+ function $o(t$1, e$1) {
2784
+ t$1.B = Math.max(t$1.B, e$1);
2785
+ }
2786
+ function qo(t$1, e$1) {
2787
+ t$1.A = new Vi(), Bi(t$1.A, "PassThroughCalculator"), Gi(t$1.A, "free_memory"), ji(t$1.A, "free_memory_unused_out"), Ki(e$1, "free_memory"), zi(e$1, t$1.A);
2788
+ }
2789
+ function Jo(t$1, e$1) {
2790
+ Gi(t$1.A, e$1), ji(t$1.A, e$1 + "_unused_out");
2791
+ }
2792
+ function Zo(t$1) {
2793
+ t$1.g.addBoolToStream(!0, "free_memory", t$1.B);
2794
+ }
2795
+ var Qo = class {
2796
+ constructor(t$1) {
2797
+ this.g = t$1, this.H = [], this.B = 0, this.g.setAutoRenderToScreen(!1);
2798
+ }
2799
+ l(t$1, e$1 = !0) {
2800
+ if (e$1) {
2801
+ const e$2 = t$1.baseOptions || {};
2802
+ if (t$1.baseOptions?.modelAssetBuffer && t$1.baseOptions?.modelAssetPath) throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");
2803
+ if (!(pn(this.baseOptions, Ss, 1)?.g() || pn(this.baseOptions, Ss, 1)?.h() || t$1.baseOptions?.modelAssetBuffer || t$1.baseOptions?.modelAssetPath)) throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");
2804
+ if (function(t$2, e$3) {
2805
+ let n$1 = pn(t$2.baseOptions, bs, 3);
2806
+ if (!n$1) {
2807
+ var r$1 = n$1 = new bs(), i$1 = new Mi();
2808
+ _n(r$1, 4, ks, i$1);
2809
+ }
2810
+ "delegate" in e$3 && ("GPU" === e$3.delegate ? (e$3 = n$1, r$1 = new Li(), _n(e$3, 2, ks, r$1)) : (e$3 = n$1, r$1 = new Mi(), _n(e$3, 4, ks, r$1))), yn(t$2.baseOptions, 0, 3, n$1);
2811
+ }(this, e$2), e$2.modelAssetPath) return fetch(e$2.modelAssetPath.toString()).then(((t$2) => {
2812
+ if (t$2.ok) return t$2.arrayBuffer();
2813
+ throw Error(`Failed to fetch model: ${e$2.modelAssetPath} (${t$2.status})`);
2814
+ })).then(((t$2) => {
2815
+ try {
2816
+ this.g.i.FS_unlink("/model.dat");
2817
+ } catch {}
2818
+ this.g.i.FS_createDataFile("/", "model.dat", new Uint8Array(t$2), !0, !1, !1), Ko(this, "/model.dat"), this.m(), this.J();
2819
+ }));
2820
+ if (e$2.modelAssetBuffer instanceof Uint8Array) Ko(this, e$2.modelAssetBuffer);
2821
+ else if (e$2.modelAssetBuffer) return async function(t$2) {
2822
+ const e$3 = [];
2823
+ for (var n$1 = 0;;) {
2824
+ const { done: r$1, value: i$1 } = await t$2.read();
2825
+ if (r$1) break;
2826
+ e$3.push(i$1), n$1 += i$1.length;
2827
+ }
2828
+ if (0 === e$3.length) return new Uint8Array(0);
2829
+ if (1 === e$3.length) return e$3[0];
2830
+ t$2 = new Uint8Array(n$1), n$1 = 0;
2831
+ for (const r$1 of e$3) t$2.set(r$1, n$1), n$1 += r$1.length;
2832
+ return t$2;
2833
+ }(e$2.modelAssetBuffer).then(((t$2) => {
2834
+ Ko(this, t$2), this.m(), this.J();
2835
+ }));
2836
+ }
2837
+ return this.m(), this.J(), Promise.resolve();
2838
+ }
2839
+ J() {}
2840
+ ga() {
2841
+ let t$1;
2842
+ if (this.g.ga(((e$1) => {
2843
+ t$1 = Ji(e$1);
2844
+ })), !t$1) throw Error("Failed to retrieve CalculatorGraphConfig");
2845
+ return t$1;
2846
+ }
2847
+ setGraph(t$1, e$1) {
2848
+ this.g.attachErrorListener(((t$2, e$2) => {
2849
+ this.H.push(Error(e$2));
2850
+ })), this.g.Oa(), this.g.setGraph(t$1, e$1), this.A = void 0, Yo(this);
2851
+ }
2852
+ finishProcessing() {
2853
+ this.g.finishProcessing(), Yo(this);
2854
+ }
2855
+ close() {
2856
+ this.A = void 0, this.g.closeGraph();
2857
+ }
2858
+ };
2859
+ function ta(t$1, e$1) {
2860
+ if (!t$1) throw Error(`Unable to obtain required WebGL resource: ${e$1}`);
2861
+ return t$1;
2862
+ }
2863
+ Qo.prototype.close = Qo.prototype.close, function(e$1, n$1) {
2864
+ e$1 = e$1.split(".");
2865
+ var r$1, i$1 = t;
2866
+ e$1[0] in i$1 || void 0 === i$1.execScript || i$1.execScript("var " + e$1[0]);
2867
+ for (; e$1.length && (r$1 = e$1.shift());) e$1.length || void 0 === n$1 ? i$1 = i$1[r$1] && i$1[r$1] !== Object.prototype[r$1] ? i$1[r$1] : i$1[r$1] = {} : i$1[r$1] = n$1;
2868
+ }("TaskRunner", Qo);
2869
+ var ea = class {
2870
+ constructor(t$1, e$1, n$1, r$1) {
2871
+ this.g = t$1, this.h = e$1, this.m = n$1, this.l = r$1;
2872
+ }
2873
+ bind() {
2874
+ this.g.bindVertexArray(this.h);
2875
+ }
2876
+ close() {
2877
+ this.g.deleteVertexArray(this.h), this.g.deleteBuffer(this.m), this.g.deleteBuffer(this.l);
2878
+ }
2879
+ };
2880
+ function na(t$1, e$1, n$1) {
2881
+ const r$1 = t$1.g;
2882
+ if (n$1 = ta(r$1.createShader(n$1), "Failed to create WebGL shader"), r$1.shaderSource(n$1, e$1), r$1.compileShader(n$1), !r$1.getShaderParameter(n$1, r$1.COMPILE_STATUS)) throw Error(`Could not compile WebGL shader: ${r$1.getShaderInfoLog(n$1)}`);
2883
+ return r$1.attachShader(t$1.h, n$1), n$1;
2884
+ }
2885
+ function ra(t$1, e$1) {
2886
+ const n$1 = t$1.g, r$1 = ta(n$1.createVertexArray(), "Failed to create vertex array");
2887
+ n$1.bindVertexArray(r$1);
2888
+ const i$1 = ta(n$1.createBuffer(), "Failed to create buffer");
2889
+ n$1.bindBuffer(n$1.ARRAY_BUFFER, i$1), n$1.enableVertexAttribArray(t$1.R), n$1.vertexAttribPointer(t$1.R, 2, n$1.FLOAT, !1, 0, 0), n$1.bufferData(n$1.ARRAY_BUFFER, new Float32Array([
2890
+ -1,
2891
+ -1,
2892
+ -1,
2893
+ 1,
2894
+ 1,
2895
+ 1,
2896
+ 1,
2897
+ -1
2898
+ ]), n$1.STATIC_DRAW);
2899
+ const s$1 = ta(n$1.createBuffer(), "Failed to create buffer");
2900
+ return n$1.bindBuffer(n$1.ARRAY_BUFFER, s$1), n$1.enableVertexAttribArray(t$1.J), n$1.vertexAttribPointer(t$1.J, 2, n$1.FLOAT, !1, 0, 0), n$1.bufferData(n$1.ARRAY_BUFFER, new Float32Array(e$1 ? [
2901
+ 0,
2902
+ 1,
2903
+ 0,
2904
+ 0,
2905
+ 1,
2906
+ 0,
2907
+ 1,
2908
+ 1
2909
+ ] : [
2910
+ 0,
2911
+ 0,
2912
+ 0,
2913
+ 1,
2914
+ 1,
2915
+ 1,
2916
+ 1,
2917
+ 0
2918
+ ]), n$1.STATIC_DRAW), n$1.bindBuffer(n$1.ARRAY_BUFFER, null), n$1.bindVertexArray(null), new ea(n$1, r$1, i$1, s$1);
2919
+ }
2920
+ function ia(t$1, e$1) {
2921
+ if (t$1.g) {
2922
+ if (e$1 !== t$1.g) throw Error("Cannot change GL context once initialized");
2923
+ } else t$1.g = e$1;
2924
+ }
2925
+ function sa(t$1, e$1, n$1, r$1) {
2926
+ return ia(t$1, e$1), t$1.h || (t$1.m(), t$1.C()), n$1 ? (t$1.s || (t$1.s = ra(t$1, !0)), n$1 = t$1.s) : (t$1.v || (t$1.v = ra(t$1, !1)), n$1 = t$1.v), e$1.useProgram(t$1.h), n$1.bind(), t$1.l(), t$1 = r$1(), n$1.g.bindVertexArray(null), t$1;
2927
+ }
2928
+ function oa(t$1, e$1, n$1) {
2929
+ return ia(t$1, e$1), t$1 = ta(e$1.createTexture(), "Failed to create texture"), e$1.bindTexture(e$1.TEXTURE_2D, t$1), e$1.texParameteri(e$1.TEXTURE_2D, e$1.TEXTURE_WRAP_S, e$1.CLAMP_TO_EDGE), e$1.texParameteri(e$1.TEXTURE_2D, e$1.TEXTURE_WRAP_T, e$1.CLAMP_TO_EDGE), e$1.texParameteri(e$1.TEXTURE_2D, e$1.TEXTURE_MIN_FILTER, n$1 ?? e$1.LINEAR), e$1.texParameteri(e$1.TEXTURE_2D, e$1.TEXTURE_MAG_FILTER, n$1 ?? e$1.LINEAR), e$1.bindTexture(e$1.TEXTURE_2D, null), t$1;
2930
+ }
2931
+ function aa(t$1, e$1, n$1) {
2932
+ ia(t$1, e$1), t$1.A || (t$1.A = ta(e$1.createFramebuffer(), "Failed to create framebuffe.")), e$1.bindFramebuffer(e$1.FRAMEBUFFER, t$1.A), e$1.framebufferTexture2D(e$1.FRAMEBUFFER, e$1.COLOR_ATTACHMENT0, e$1.TEXTURE_2D, n$1, 0);
2933
+ }
2934
+ function ha(t$1) {
2935
+ t$1.g?.bindFramebuffer(t$1.g.FRAMEBUFFER, null);
2936
+ }
2937
+ var ca = class {
2938
+ H() {
2939
+ return "\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n ";
2940
+ }
2941
+ m() {
2942
+ const t$1 = this.g;
2943
+ if (this.h = ta(t$1.createProgram(), "Failed to create WebGL program"), this.da = na(this, "\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }", t$1.VERTEX_SHADER), this.ca = na(this, this.H(), t$1.FRAGMENT_SHADER), t$1.linkProgram(this.h), !t$1.getProgramParameter(this.h, t$1.LINK_STATUS)) throw Error(`Error during program linking: ${t$1.getProgramInfoLog(this.h)}`);
2944
+ this.R = t$1.getAttribLocation(this.h, "aVertex"), this.J = t$1.getAttribLocation(this.h, "aTex");
2945
+ }
2946
+ C() {}
2947
+ l() {}
2948
+ close() {
2949
+ if (this.h) {
2950
+ const t$1 = this.g;
2951
+ t$1.deleteProgram(this.h), t$1.deleteShader(this.da), t$1.deleteShader(this.ca);
2952
+ }
2953
+ this.A && this.g.deleteFramebuffer(this.A), this.v && this.v.close(), this.s && this.s.close();
2954
+ }
2955
+ };
2956
+ var ua = class extends ca {
2957
+ H() {
2958
+ return "\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n ";
2959
+ }
2960
+ C() {
2961
+ const t$1 = this.g;
2962
+ t$1.activeTexture(t$1.TEXTURE1), this.B = oa(this, t$1, t$1.LINEAR), t$1.activeTexture(t$1.TEXTURE2), this.j = oa(this, t$1, t$1.NEAREST);
2963
+ }
2964
+ m() {
2965
+ super.m();
2966
+ const t$1 = this.g;
2967
+ this.L = ta(t$1.getUniformLocation(this.h, "backgroundTexture"), "Uniform location"), this.V = ta(t$1.getUniformLocation(this.h, "colorMappingTexture"), "Uniform location"), this.K = ta(t$1.getUniformLocation(this.h, "maskTexture"), "Uniform location");
2968
+ }
2969
+ l() {
2970
+ super.l();
2971
+ const t$1 = this.g;
2972
+ t$1.uniform1i(this.K, 0), t$1.uniform1i(this.L, 1), t$1.uniform1i(this.V, 2);
2973
+ }
2974
+ close() {
2975
+ this.B && this.g.deleteTexture(this.B), this.j && this.g.deleteTexture(this.j), super.close();
2976
+ }
2977
+ }, la = class extends ca {
2978
+ H() {
2979
+ return "\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n ";
2980
+ }
2981
+ C() {
2982
+ const t$1 = this.g;
2983
+ t$1.activeTexture(t$1.TEXTURE1), this.j = oa(this, t$1), t$1.activeTexture(t$1.TEXTURE2), this.B = oa(this, t$1);
2984
+ }
2985
+ m() {
2986
+ super.m();
2987
+ const t$1 = this.g;
2988
+ this.K = ta(t$1.getUniformLocation(this.h, "defaultTexture"), "Uniform location"), this.L = ta(t$1.getUniformLocation(this.h, "overlayTexture"), "Uniform location"), this.I = ta(t$1.getUniformLocation(this.h, "maskTexture"), "Uniform location");
2989
+ }
2990
+ l() {
2991
+ super.l();
2992
+ const t$1 = this.g;
2993
+ t$1.uniform1i(this.I, 0), t$1.uniform1i(this.K, 1), t$1.uniform1i(this.L, 2);
2994
+ }
2995
+ close() {
2996
+ this.j && this.g.deleteTexture(this.j), this.B && this.g.deleteTexture(this.B), super.close();
2997
+ }
2998
+ };
2999
+ function fa(t$1, e$1) {
3000
+ switch (e$1) {
3001
+ case 0: return t$1.g.find(((t$2) => t$2 instanceof Uint8Array));
3002
+ case 1: return t$1.g.find(((t$2) => t$2 instanceof Float32Array));
3003
+ case 2: return t$1.g.find(((t$2) => "undefined" != typeof WebGLTexture && t$2 instanceof WebGLTexture));
3004
+ default: throw Error(`Type is not supported: ${e$1}`);
3005
+ }
3006
+ }
3007
+ function da(t$1) {
3008
+ var e$1 = fa(t$1, 1);
3009
+ if (!e$1) {
3010
+ if (e$1 = fa(t$1, 0)) e$1 = new Float32Array(e$1).map(((t$2) => t$2 / 255));
3011
+ else {
3012
+ e$1 = new Float32Array(t$1.width * t$1.height);
3013
+ const r$1 = ga(t$1);
3014
+ var n$1 = ya(t$1);
3015
+ if (aa(n$1, r$1, pa(t$1)), "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in self.document) {
3016
+ n$1 = new Float32Array(t$1.width * t$1.height * 4), r$1.readPixels(0, 0, t$1.width, t$1.height, r$1.RGBA, r$1.FLOAT, n$1);
3017
+ for (let t$2 = 0, r$2 = 0; t$2 < e$1.length; ++t$2, r$2 += 4) e$1[t$2] = n$1[r$2];
3018
+ } else r$1.readPixels(0, 0, t$1.width, t$1.height, r$1.RED, r$1.FLOAT, e$1);
3019
+ }
3020
+ t$1.g.push(e$1);
3021
+ }
3022
+ return e$1;
3023
+ }
3024
+ function pa(t$1) {
3025
+ let e$1 = fa(t$1, 2);
3026
+ if (!e$1) {
3027
+ const n$1 = ga(t$1);
3028
+ e$1 = _a(t$1);
3029
+ const r$1 = da(t$1), i$1 = ma(t$1);
3030
+ n$1.texImage2D(n$1.TEXTURE_2D, 0, i$1, t$1.width, t$1.height, 0, n$1.RED, n$1.FLOAT, r$1), va(t$1);
3031
+ }
3032
+ return e$1;
3033
+ }
3034
+ function ga(t$1) {
3035
+ if (!t$1.canvas) throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");
3036
+ return t$1.h || (t$1.h = ta(t$1.canvas.getContext("webgl2"), "You cannot use a canvas that is already bound to a different type of rendering context.")), t$1.h;
3037
+ }
3038
+ function ma(t$1) {
3039
+ if (t$1 = ga(t$1), !Ea) if (t$1.getExtension("EXT_color_buffer_float") && t$1.getExtension("OES_texture_float_linear") && t$1.getExtension("EXT_float_blend")) Ea = t$1.R32F;
3040
+ else {
3041
+ if (!t$1.getExtension("EXT_color_buffer_half_float")) throw Error("GPU does not fully support 4-channel float32 or float16 formats");
3042
+ Ea = t$1.R16F;
3043
+ }
3044
+ return Ea;
3045
+ }
3046
+ function ya(t$1) {
3047
+ return t$1.l || (t$1.l = new ca()), t$1.l;
3048
+ }
3049
+ function _a(t$1) {
3050
+ const e$1 = ga(t$1);
3051
+ e$1.viewport(0, 0, t$1.width, t$1.height), e$1.activeTexture(e$1.TEXTURE0);
3052
+ let n$1 = fa(t$1, 2);
3053
+ return n$1 || (n$1 = oa(ya(t$1), e$1, t$1.m ? e$1.LINEAR : e$1.NEAREST), t$1.g.push(n$1), t$1.j = !0), e$1.bindTexture(e$1.TEXTURE_2D, n$1), n$1;
3054
+ }
3055
+ function va(t$1) {
3056
+ t$1.h.bindTexture(t$1.h.TEXTURE_2D, null);
3057
+ }
3058
+ var Ea, wa = class {
3059
+ constructor(t$1, e$1, n$1, r$1, i$1, s$1, o$1) {
3060
+ this.g = t$1, this.m = e$1, this.j = n$1, this.canvas = r$1, this.l = i$1, this.width = s$1, this.height = o$1, this.j && 0 === --Ta && console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.");
3061
+ }
3062
+ Ja() {
3063
+ return !!fa(this, 0);
3064
+ }
3065
+ ma() {
3066
+ return !!fa(this, 1);
3067
+ }
3068
+ S() {
3069
+ return !!fa(this, 2);
3070
+ }
3071
+ la() {
3072
+ return (e$1 = fa(t$1 = this, 0)) || (e$1 = da(t$1), e$1 = new Uint8Array(e$1.map(((t$2) => 255 * t$2))), t$1.g.push(e$1)), e$1;
3073
+ var t$1, e$1;
3074
+ }
3075
+ ka() {
3076
+ return da(this);
3077
+ }
3078
+ N() {
3079
+ return pa(this);
3080
+ }
3081
+ clone() {
3082
+ const t$1 = [];
3083
+ for (const e$1 of this.g) {
3084
+ let n$1;
3085
+ if (e$1 instanceof Uint8Array) n$1 = new Uint8Array(e$1);
3086
+ else if (e$1 instanceof Float32Array) n$1 = new Float32Array(e$1);
3087
+ else {
3088
+ if (!(e$1 instanceof WebGLTexture)) throw Error(`Type is not supported: ${e$1}`);
3089
+ {
3090
+ const t$2 = ga(this), e$2 = ya(this);
3091
+ t$2.activeTexture(t$2.TEXTURE1), n$1 = oa(e$2, t$2, this.m ? t$2.LINEAR : t$2.NEAREST), t$2.bindTexture(t$2.TEXTURE_2D, n$1);
3092
+ const r$1 = ma(this);
3093
+ t$2.texImage2D(t$2.TEXTURE_2D, 0, r$1, this.width, this.height, 0, t$2.RED, t$2.FLOAT, null), t$2.bindTexture(t$2.TEXTURE_2D, null), aa(e$2, t$2, n$1), sa(e$2, t$2, !1, (() => {
3094
+ _a(this), t$2.clearColor(0, 0, 0, 0), t$2.clear(t$2.COLOR_BUFFER_BIT), t$2.drawArrays(t$2.TRIANGLE_FAN, 0, 4), va(this);
3095
+ })), ha(e$2), va(this);
3096
+ }
3097
+ }
3098
+ t$1.push(n$1);
3099
+ }
3100
+ return new wa(t$1, this.m, this.S(), this.canvas, this.l, this.width, this.height);
3101
+ }
3102
+ close() {
3103
+ this.j && ga(this).deleteTexture(fa(this, 2)), Ta = -1;
3104
+ }
3105
+ };
3106
+ wa.prototype.close = wa.prototype.close, wa.prototype.clone = wa.prototype.clone, wa.prototype.getAsWebGLTexture = wa.prototype.N, wa.prototype.getAsFloat32Array = wa.prototype.ka, wa.prototype.getAsUint8Array = wa.prototype.la, wa.prototype.hasWebGLTexture = wa.prototype.S, wa.prototype.hasFloat32Array = wa.prototype.ma, wa.prototype.hasUint8Array = wa.prototype.Ja;
3107
+ var Ta = 250;
3108
+ const Aa = {
3109
+ color: "white",
3110
+ lineWidth: 4,
3111
+ radius: 6
3112
+ };
3113
+ function ba(t$1) {
3114
+ return {
3115
+ ...Aa,
3116
+ fillColor: (t$1 = t$1 || {}).color,
3117
+ ...t$1
3118
+ };
3119
+ }
3120
+ function ka(t$1, e$1) {
3121
+ return t$1 instanceof Function ? t$1(e$1) : t$1;
3122
+ }
3123
+ function Sa(t$1, e$1, n$1) {
3124
+ return Math.max(Math.min(e$1, n$1), Math.min(Math.max(e$1, n$1), t$1));
3125
+ }
3126
+ function xa(t$1) {
3127
+ if (!t$1.l) throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");
3128
+ return t$1.l;
3129
+ }
3130
+ function La(t$1) {
3131
+ if (!t$1.j) throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");
3132
+ return t$1.j;
3133
+ }
3134
+ function Ra(t$1, e$1, n$1) {
3135
+ if (e$1.S()) n$1(e$1.N());
3136
+ else {
3137
+ const r$1 = e$1.ma() ? e$1.ka() : e$1.la();
3138
+ t$1.m = t$1.m ?? new ca();
3139
+ const i$1 = La(t$1);
3140
+ n$1((t$1 = new wa([r$1], e$1.m, !1, i$1.canvas, t$1.m, e$1.width, e$1.height)).N()), t$1.close();
3141
+ }
3142
+ }
3143
+ function Fa(t$1, e$1, n$1, r$1) {
3144
+ const i$1 = function(t$2) {
3145
+ return t$2.g || (t$2.g = new ua()), t$2.g;
3146
+ }(t$1), s$1 = La(t$1), o$1 = Array.isArray(n$1) ? new ImageData(new Uint8ClampedArray(n$1), 1, 1) : n$1;
3147
+ sa(i$1, s$1, !0, (() => {
3148
+ (function(t$3, e$2, n$2, r$2) {
3149
+ const i$2 = t$3.g;
3150
+ if (i$2.activeTexture(i$2.TEXTURE0), i$2.bindTexture(i$2.TEXTURE_2D, e$2), i$2.activeTexture(i$2.TEXTURE1), i$2.bindTexture(i$2.TEXTURE_2D, t$3.B), i$2.texImage2D(i$2.TEXTURE_2D, 0, i$2.RGBA, i$2.RGBA, i$2.UNSIGNED_BYTE, n$2), t$3.I && function(t$4, e$3) {
3151
+ if (t$4 !== e$3) return !1;
3152
+ t$4 = t$4.entries(), e$3 = e$3.entries();
3153
+ for (const [r$3, i$3] of t$4) {
3154
+ t$4 = r$3;
3155
+ const s$2 = i$3;
3156
+ var n$3 = e$3.next();
3157
+ if (n$3.done) return !1;
3158
+ const [o$2, a$1] = n$3.value;
3159
+ if (n$3 = a$1, t$4 !== o$2 || s$2[0] !== n$3[0] || s$2[1] !== n$3[1] || s$2[2] !== n$3[2] || s$2[3] !== n$3[3]) return !1;
3160
+ }
3161
+ return !!e$3.next().done;
3162
+ }(t$3.I, r$2)) i$2.activeTexture(i$2.TEXTURE2), i$2.bindTexture(i$2.TEXTURE_2D, t$3.j);
3163
+ else {
3164
+ t$3.I = r$2;
3165
+ const e$3 = Array(1024).fill(0);
3166
+ r$2.forEach(((t$4, n$3) => {
3167
+ if (4 !== t$4.length) throw Error(`Color at index ${n$3} is not a four-channel value.`);
3168
+ e$3[4 * n$3] = t$4[0], e$3[4 * n$3 + 1] = t$4[1], e$3[4 * n$3 + 2] = t$4[2], e$3[4 * n$3 + 3] = t$4[3];
3169
+ })), i$2.activeTexture(i$2.TEXTURE2), i$2.bindTexture(i$2.TEXTURE_2D, t$3.j), i$2.texImage2D(i$2.TEXTURE_2D, 0, i$2.RGBA, 256, 1, 0, i$2.RGBA, i$2.UNSIGNED_BYTE, new Uint8Array(e$3));
3170
+ }
3171
+ })(i$1, e$1, o$1, r$1), s$1.clearColor(0, 0, 0, 0), s$1.clear(s$1.COLOR_BUFFER_BIT), s$1.drawArrays(s$1.TRIANGLE_FAN, 0, 4);
3172
+ const t$2 = i$1.g;
3173
+ t$2.activeTexture(t$2.TEXTURE0), t$2.bindTexture(t$2.TEXTURE_2D, null), t$2.activeTexture(t$2.TEXTURE1), t$2.bindTexture(t$2.TEXTURE_2D, null), t$2.activeTexture(t$2.TEXTURE2), t$2.bindTexture(t$2.TEXTURE_2D, null);
3174
+ }));
3175
+ }
3176
+ function Ma(t$1, e$1, n$1, r$1) {
3177
+ const i$1 = La(t$1), s$1 = function(t$2) {
3178
+ return t$2.h || (t$2.h = new la()), t$2.h;
3179
+ }(t$1), o$1 = Array.isArray(n$1) ? new ImageData(new Uint8ClampedArray(n$1), 1, 1) : n$1, a$1 = Array.isArray(r$1) ? new ImageData(new Uint8ClampedArray(r$1), 1, 1) : r$1;
3180
+ sa(s$1, i$1, !0, (() => {
3181
+ var t$2 = s$1.g;
3182
+ t$2.activeTexture(t$2.TEXTURE0), t$2.bindTexture(t$2.TEXTURE_2D, e$1), t$2.activeTexture(t$2.TEXTURE1), t$2.bindTexture(t$2.TEXTURE_2D, s$1.j), t$2.texImage2D(t$2.TEXTURE_2D, 0, t$2.RGBA, t$2.RGBA, t$2.UNSIGNED_BYTE, o$1), t$2.activeTexture(t$2.TEXTURE2), t$2.bindTexture(t$2.TEXTURE_2D, s$1.B), t$2.texImage2D(t$2.TEXTURE_2D, 0, t$2.RGBA, t$2.RGBA, t$2.UNSIGNED_BYTE, a$1), i$1.clearColor(0, 0, 0, 0), i$1.clear(i$1.COLOR_BUFFER_BIT), i$1.drawArrays(i$1.TRIANGLE_FAN, 0, 4), i$1.bindTexture(i$1.TEXTURE_2D, null), (t$2 = s$1.g).activeTexture(t$2.TEXTURE0), t$2.bindTexture(t$2.TEXTURE_2D, null), t$2.activeTexture(t$2.TEXTURE1), t$2.bindTexture(t$2.TEXTURE_2D, null), t$2.activeTexture(t$2.TEXTURE2), t$2.bindTexture(t$2.TEXTURE_2D, null);
3183
+ }));
3184
+ }
3185
+ var Ia = class {
3186
+ constructor(t$1, e$1) {
3187
+ t$1 instanceof CanvasRenderingContext2D || t$1 instanceof OffscreenCanvasRenderingContext2D ? (this.l = t$1, this.j = e$1) : this.j = t$1;
3188
+ }
3189
+ Ca(t$1, e$1) {
3190
+ if (t$1) {
3191
+ var n$1 = xa(this);
3192
+ e$1 = ba(e$1), n$1.save();
3193
+ var r$1 = n$1.canvas, i$1 = 0;
3194
+ for (const s$1 of t$1) n$1.fillStyle = ka(e$1.fillColor, {
3195
+ index: i$1,
3196
+ from: s$1
3197
+ }), n$1.strokeStyle = ka(e$1.color, {
3198
+ index: i$1,
3199
+ from: s$1
3200
+ }), n$1.lineWidth = ka(e$1.lineWidth, {
3201
+ index: i$1,
3202
+ from: s$1
3203
+ }), (t$1 = new Path2D()).arc(s$1.x * r$1.width, s$1.y * r$1.height, ka(e$1.radius, {
3204
+ index: i$1,
3205
+ from: s$1
3206
+ }), 0, 2 * Math.PI), n$1.fill(t$1), n$1.stroke(t$1), ++i$1;
3207
+ n$1.restore();
3208
+ }
3209
+ }
3210
+ Ba(t$1, e$1, n$1) {
3211
+ if (t$1 && e$1) {
3212
+ var r$1 = xa(this);
3213
+ n$1 = ba(n$1), r$1.save();
3214
+ var i$1 = r$1.canvas, s$1 = 0;
3215
+ for (const o$1 of e$1) {
3216
+ r$1.beginPath(), e$1 = t$1[o$1.start];
3217
+ const a$1 = t$1[o$1.end];
3218
+ e$1 && a$1 && (r$1.strokeStyle = ka(n$1.color, {
3219
+ index: s$1,
3220
+ from: e$1,
3221
+ to: a$1
3222
+ }), r$1.lineWidth = ka(n$1.lineWidth, {
3223
+ index: s$1,
3224
+ from: e$1,
3225
+ to: a$1
3226
+ }), r$1.moveTo(e$1.x * i$1.width, e$1.y * i$1.height), r$1.lineTo(a$1.x * i$1.width, a$1.y * i$1.height)), ++s$1, r$1.stroke();
3227
+ }
3228
+ r$1.restore();
3229
+ }
3230
+ }
3231
+ ya(t$1, e$1) {
3232
+ const n$1 = xa(this);
3233
+ e$1 = ba(e$1), n$1.save(), n$1.beginPath(), n$1.lineWidth = ka(e$1.lineWidth, {}), n$1.strokeStyle = ka(e$1.color, {}), n$1.fillStyle = ka(e$1.fillColor, {}), n$1.moveTo(t$1.originX, t$1.originY), n$1.lineTo(t$1.originX + t$1.width, t$1.originY), n$1.lineTo(t$1.originX + t$1.width, t$1.originY + t$1.height), n$1.lineTo(t$1.originX, t$1.originY + t$1.height), n$1.lineTo(t$1.originX, t$1.originY), n$1.stroke(), n$1.fill(), n$1.restore();
3234
+ }
3235
+ za(t$1, e$1, n$1 = [
3236
+ 0,
3237
+ 0,
3238
+ 0,
3239
+ 255
3240
+ ]) {
3241
+ this.l ? function(t$2, e$2, n$2, r$1) {
3242
+ const i$1 = La(t$2);
3243
+ Ra(t$2, e$2, ((e$3) => {
3244
+ Fa(t$2, e$3, n$2, r$1), (e$3 = xa(t$2)).drawImage(i$1.canvas, 0, 0, e$3.canvas.width, e$3.canvas.height);
3245
+ }));
3246
+ }(this, t$1, n$1, e$1) : Fa(this, t$1.N(), n$1, e$1);
3247
+ }
3248
+ Aa(t$1, e$1, n$1) {
3249
+ this.l ? function(t$2, e$2, n$2, r$1) {
3250
+ const i$1 = La(t$2);
3251
+ Ra(t$2, e$2, ((e$3) => {
3252
+ Ma(t$2, e$3, n$2, r$1), (e$3 = xa(t$2)).drawImage(i$1.canvas, 0, 0, e$3.canvas.width, e$3.canvas.height);
3253
+ }));
3254
+ }(this, t$1, e$1, n$1) : Ma(this, t$1.N(), e$1, n$1);
3255
+ }
3256
+ close() {
3257
+ this.g?.close(), this.g = void 0, this.h?.close(), this.h = void 0, this.m?.close(), this.m = void 0;
3258
+ }
3259
+ };
3260
+ function Pa(t$1, e$1) {
3261
+ switch (e$1) {
3262
+ case 0: return t$1.g.find(((t$2) => t$2 instanceof ImageData));
3263
+ case 1: return t$1.g.find(((t$2) => "undefined" != typeof ImageBitmap && t$2 instanceof ImageBitmap));
3264
+ case 2: return t$1.g.find(((t$2) => "undefined" != typeof WebGLTexture && t$2 instanceof WebGLTexture));
3265
+ default: throw Error(`Type is not supported: ${e$1}`);
3266
+ }
3267
+ }
3268
+ function Oa(t$1) {
3269
+ var e$1 = Pa(t$1, 0);
3270
+ if (!e$1) {
3271
+ e$1 = Na(t$1);
3272
+ const n$1 = Ua(t$1), r$1 = new Uint8Array(t$1.width * t$1.height * 4);
3273
+ aa(n$1, e$1, Ca(t$1)), e$1.readPixels(0, 0, t$1.width, t$1.height, e$1.RGBA, e$1.UNSIGNED_BYTE, r$1), ha(n$1), e$1 = new ImageData(new Uint8ClampedArray(r$1.buffer), t$1.width, t$1.height), t$1.g.push(e$1);
3274
+ }
3275
+ return e$1;
3276
+ }
3277
+ function Ca(t$1) {
3278
+ let e$1 = Pa(t$1, 2);
3279
+ if (!e$1) {
3280
+ const n$1 = Na(t$1);
3281
+ e$1 = Da(t$1);
3282
+ const r$1 = Pa(t$1, 1) || Oa(t$1);
3283
+ n$1.texImage2D(n$1.TEXTURE_2D, 0, n$1.RGBA, n$1.RGBA, n$1.UNSIGNED_BYTE, r$1), Ba(t$1);
3284
+ }
3285
+ return e$1;
3286
+ }
3287
+ function Na(t$1) {
3288
+ if (!t$1.canvas) throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");
3289
+ return t$1.h || (t$1.h = ta(t$1.canvas.getContext("webgl2"), "You cannot use a canvas that is already bound to a different type of rendering context.")), t$1.h;
3290
+ }
3291
+ function Ua(t$1) {
3292
+ return t$1.l || (t$1.l = new ca()), t$1.l;
3293
+ }
3294
+ function Da(t$1) {
3295
+ const e$1 = Na(t$1);
3296
+ e$1.viewport(0, 0, t$1.width, t$1.height), e$1.activeTexture(e$1.TEXTURE0);
3297
+ let n$1 = Pa(t$1, 2);
3298
+ return n$1 || (n$1 = oa(Ua(t$1), e$1), t$1.g.push(n$1), t$1.m = !0), e$1.bindTexture(e$1.TEXTURE_2D, n$1), n$1;
3299
+ }
3300
+ function Ba(t$1) {
3301
+ t$1.h.bindTexture(t$1.h.TEXTURE_2D, null);
3302
+ }
3303
+ function Ga(t$1) {
3304
+ const e$1 = Na(t$1);
3305
+ return sa(Ua(t$1), e$1, !0, (() => function(t$2, e$2) {
3306
+ const n$1 = t$2.canvas;
3307
+ if (n$1.width === t$2.width && n$1.height === t$2.height) return e$2();
3308
+ const r$1 = n$1.width, i$1 = n$1.height;
3309
+ return n$1.width = t$2.width, n$1.height = t$2.height, t$2 = e$2(), n$1.width = r$1, n$1.height = i$1, t$2;
3310
+ }(t$1, (() => {
3311
+ if (e$1.bindFramebuffer(e$1.FRAMEBUFFER, null), e$1.clearColor(0, 0, 0, 0), e$1.clear(e$1.COLOR_BUFFER_BIT), e$1.drawArrays(e$1.TRIANGLE_FAN, 0, 4), !(t$1.canvas instanceof OffscreenCanvas)) throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");
3312
+ return t$1.canvas.transferToImageBitmap();
3313
+ }))));
3314
+ }
3315
+ Ia.prototype.close = Ia.prototype.close, Ia.prototype.drawConfidenceMask = Ia.prototype.Aa, Ia.prototype.drawCategoryMask = Ia.prototype.za, Ia.prototype.drawBoundingBox = Ia.prototype.ya, Ia.prototype.drawConnectors = Ia.prototype.Ba, Ia.prototype.drawLandmarks = Ia.prototype.Ca, Ia.lerp = function(t$1, e$1, n$1, r$1, i$1) {
3316
+ return Sa(r$1 * (1 - (t$1 - e$1) / (n$1 - e$1)) + i$1 * (1 - (n$1 - t$1) / (n$1 - e$1)), r$1, i$1);
3317
+ }, Ia.clamp = Sa;
3318
+ var ja = class {
3319
+ constructor(t$1, e$1, n$1, r$1, i$1, s$1, o$1) {
3320
+ this.g = t$1, this.j = e$1, this.m = n$1, this.canvas = r$1, this.l = i$1, this.width = s$1, this.height = o$1, (this.j || this.m) && 0 === --Va && console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.");
3321
+ }
3322
+ Ia() {
3323
+ return !!Pa(this, 0);
3324
+ }
3325
+ na() {
3326
+ return !!Pa(this, 1);
3327
+ }
3328
+ S() {
3329
+ return !!Pa(this, 2);
3330
+ }
3331
+ Ga() {
3332
+ return Oa(this);
3333
+ }
3334
+ Fa() {
3335
+ var t$1 = Pa(this, 1);
3336
+ return t$1 || (Ca(this), Da(this), t$1 = Ga(this), Ba(this), this.g.push(t$1), this.j = !0), t$1;
3337
+ }
3338
+ N() {
3339
+ return Ca(this);
3340
+ }
3341
+ clone() {
3342
+ const t$1 = [];
3343
+ for (const e$1 of this.g) {
3344
+ let n$1;
3345
+ if (e$1 instanceof ImageData) n$1 = new ImageData(e$1.data, this.width, this.height);
3346
+ else if (e$1 instanceof WebGLTexture) {
3347
+ const t$2 = Na(this), e$2 = Ua(this);
3348
+ t$2.activeTexture(t$2.TEXTURE1), n$1 = oa(e$2, t$2), t$2.bindTexture(t$2.TEXTURE_2D, n$1), t$2.texImage2D(t$2.TEXTURE_2D, 0, t$2.RGBA, this.width, this.height, 0, t$2.RGBA, t$2.UNSIGNED_BYTE, null), t$2.bindTexture(t$2.TEXTURE_2D, null), aa(e$2, t$2, n$1), sa(e$2, t$2, !1, (() => {
3349
+ Da(this), t$2.clearColor(0, 0, 0, 0), t$2.clear(t$2.COLOR_BUFFER_BIT), t$2.drawArrays(t$2.TRIANGLE_FAN, 0, 4), Ba(this);
3350
+ })), ha(e$2), Ba(this);
3351
+ } else {
3352
+ if (!(e$1 instanceof ImageBitmap)) throw Error(`Type is not supported: ${e$1}`);
3353
+ Ca(this), Da(this), n$1 = Ga(this), Ba(this);
3354
+ }
3355
+ t$1.push(n$1);
3356
+ }
3357
+ return new ja(t$1, this.na(), this.S(), this.canvas, this.l, this.width, this.height);
3358
+ }
3359
+ close() {
3360
+ this.j && Pa(this, 1).close(), this.m && Na(this).deleteTexture(Pa(this, 2)), Va = -1;
3361
+ }
3362
+ };
3363
+ ja.prototype.close = ja.prototype.close, ja.prototype.clone = ja.prototype.clone, ja.prototype.getAsWebGLTexture = ja.prototype.N, ja.prototype.getAsImageBitmap = ja.prototype.Fa, ja.prototype.getAsImageData = ja.prototype.Ga, ja.prototype.hasWebGLTexture = ja.prototype.S, ja.prototype.hasImageBitmap = ja.prototype.na, ja.prototype.hasImageData = ja.prototype.Ia;
3364
+ var Va = 250;
3365
+ function Xa(...t$1) {
3366
+ return t$1.map((([t$2, e$1]) => ({
3367
+ start: t$2,
3368
+ end: e$1
3369
+ })));
3370
+ }
3371
+ const Ha = function(t$1) {
3372
+ return class extends t$1 {
3373
+ Oa() {
3374
+ this.i._registerModelResourcesGraphService();
3375
+ }
3376
+ };
3377
+ }((Wa = class {
3378
+ constructor(t$1, e$1) {
3379
+ this.l = !0, this.i = t$1, this.g = null, this.h = 0, this.m = "function" == typeof this.i._addIntToInputStream, void 0 !== e$1 ? this.i.canvas = e$1 : Do() ? this.i.canvas = new OffscreenCanvas(1, 1) : (console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."), this.i.canvas = document.createElement("canvas"));
3380
+ }
3381
+ async initializeGraph(t$1) {
3382
+ const e$1 = await (await fetch(t$1)).arrayBuffer();
3383
+ t$1 = !(t$1.endsWith(".pbtxt") || t$1.endsWith(".textproto")), this.setGraph(new Uint8Array(e$1), t$1);
3384
+ }
3385
+ setGraphFromString(t$1) {
3386
+ this.setGraph(new TextEncoder().encode(t$1), !1);
3387
+ }
3388
+ setGraph(t$1, e$1) {
3389
+ const n$1 = t$1.length, r$1 = this.i._malloc(n$1);
3390
+ this.i.HEAPU8.set(t$1, r$1), e$1 ? this.i._changeBinaryGraph(n$1, r$1) : this.i._changeTextGraph(n$1, r$1), this.i._free(r$1);
3391
+ }
3392
+ configureAudio(t$1, e$1, n$1, r$1, i$1) {
3393
+ this.i._configureAudio || console.warn("Attempting to use configureAudio without support for input audio. Is build dep \":gl_graph_runner_audio\" missing?"), jo(this, r$1 || "input_audio", ((r$2) => {
3394
+ jo(this, i$1 = i$1 || "audio_header", ((i$2) => {
3395
+ this.i._configureAudio(r$2, i$2, t$1, e$1, n$1);
3396
+ }));
3397
+ }));
3398
+ }
3399
+ setAutoResizeCanvas(t$1) {
3400
+ this.l = t$1;
3401
+ }
3402
+ setAutoRenderToScreen(t$1) {
3403
+ this.i._setAutoRenderToScreen(t$1);
3404
+ }
3405
+ setGpuBufferVerticalFlip(t$1) {
3406
+ this.i.gpuOriginForWebTexturesIsBottomLeft = t$1;
3407
+ }
3408
+ ga(t$1) {
3409
+ Ho(this, "__graph_config__", ((e$1) => {
3410
+ t$1(e$1);
3411
+ })), jo(this, "__graph_config__", ((t$2) => {
3412
+ this.i._getGraphConfig(t$2, void 0);
3413
+ })), delete this.i.simpleListeners.__graph_config__;
3414
+ }
3415
+ attachErrorListener(t$1) {
3416
+ this.i.errorListener = t$1;
3417
+ }
3418
+ attachEmptyPacketListener(t$1, e$1) {
3419
+ this.i.emptyPacketListeners = this.i.emptyPacketListeners || {}, this.i.emptyPacketListeners[t$1] = e$1;
3420
+ }
3421
+ addAudioToStream(t$1, e$1, n$1) {
3422
+ this.addAudioToStreamWithShape(t$1, 0, 0, e$1, n$1);
3423
+ }
3424
+ addAudioToStreamWithShape(t$1, e$1, n$1, r$1, i$1) {
3425
+ const s$1 = 4 * t$1.length;
3426
+ this.h !== s$1 && (this.g && this.i._free(this.g), this.g = this.i._malloc(s$1), this.h = s$1), this.i.HEAPF32.set(t$1, this.g / 4), jo(this, r$1, ((t$2) => {
3427
+ this.i._addAudioToInputStream(this.g, e$1, n$1, t$2, i$1);
3428
+ }));
3429
+ }
3430
+ addGpuBufferToStream(t$1, e$1, n$1) {
3431
+ jo(this, e$1, ((e$2) => {
3432
+ const [r$1, i$1] = Vo(this, t$1, e$2);
3433
+ this.i._addBoundTextureToStream(e$2, r$1, i$1, n$1);
3434
+ }));
3435
+ }
3436
+ addBoolToStream(t$1, e$1, n$1) {
3437
+ jo(this, e$1, ((e$2) => {
3438
+ this.i._addBoolToInputStream(t$1, e$2, n$1);
3439
+ }));
3440
+ }
3441
+ addDoubleToStream(t$1, e$1, n$1) {
3442
+ jo(this, e$1, ((e$2) => {
3443
+ this.i._addDoubleToInputStream(t$1, e$2, n$1);
3444
+ }));
3445
+ }
3446
+ addFloatToStream(t$1, e$1, n$1) {
3447
+ jo(this, e$1, ((e$2) => {
3448
+ this.i._addFloatToInputStream(t$1, e$2, n$1);
3449
+ }));
3450
+ }
3451
+ addIntToStream(t$1, e$1, n$1) {
3452
+ jo(this, e$1, ((e$2) => {
3453
+ this.i._addIntToInputStream(t$1, e$2, n$1);
3454
+ }));
3455
+ }
3456
+ addUintToStream(t$1, e$1, n$1) {
3457
+ jo(this, e$1, ((e$2) => {
3458
+ this.i._addUintToInputStream(t$1, e$2, n$1);
3459
+ }));
3460
+ }
3461
+ addStringToStream(t$1, e$1, n$1) {
3462
+ jo(this, e$1, ((e$2) => {
3463
+ jo(this, t$1, ((t$2) => {
3464
+ this.i._addStringToInputStream(t$2, e$2, n$1);
3465
+ }));
3466
+ }));
3467
+ }
3468
+ addStringRecordToStream(t$1, e$1, n$1) {
3469
+ jo(this, e$1, ((e$2) => {
3470
+ Xo(this, Object.keys(t$1), ((r$1) => {
3471
+ Xo(this, Object.values(t$1), ((i$1) => {
3472
+ this.i._addFlatHashMapToInputStream(r$1, i$1, Object.keys(t$1).length, e$2, n$1);
3473
+ }));
3474
+ }));
3475
+ }));
3476
+ }
3477
+ addProtoToStream(t$1, e$1, n$1, r$1) {
3478
+ jo(this, n$1, ((n$2) => {
3479
+ jo(this, e$1, ((e$2) => {
3480
+ const i$1 = this.i._malloc(t$1.length);
3481
+ this.i.HEAPU8.set(t$1, i$1), this.i._addProtoToInputStream(i$1, t$1.length, e$2, n$2, r$1), this.i._free(i$1);
3482
+ }));
3483
+ }));
3484
+ }
3485
+ addEmptyPacketToStream(t$1, e$1) {
3486
+ jo(this, t$1, ((t$2) => {
3487
+ this.i._addEmptyPacketToInputStream(t$2, e$1);
3488
+ }));
3489
+ }
3490
+ addBoolVectorToStream(t$1, e$1, n$1) {
3491
+ jo(this, e$1, ((e$2) => {
3492
+ const r$1 = this.i._allocateBoolVector(t$1.length);
3493
+ if (!r$1) throw Error("Unable to allocate new bool vector on heap.");
3494
+ for (const e$3 of t$1) this.i._addBoolVectorEntry(r$1, e$3);
3495
+ this.i._addBoolVectorToInputStream(r$1, e$2, n$1);
3496
+ }));
3497
+ }
3498
+ addDoubleVectorToStream(t$1, e$1, n$1) {
3499
+ jo(this, e$1, ((e$2) => {
3500
+ const r$1 = this.i._allocateDoubleVector(t$1.length);
3501
+ if (!r$1) throw Error("Unable to allocate new double vector on heap.");
3502
+ for (const e$3 of t$1) this.i._addDoubleVectorEntry(r$1, e$3);
3503
+ this.i._addDoubleVectorToInputStream(r$1, e$2, n$1);
3504
+ }));
3505
+ }
3506
+ addFloatVectorToStream(t$1, e$1, n$1) {
3507
+ jo(this, e$1, ((e$2) => {
3508
+ const r$1 = this.i._allocateFloatVector(t$1.length);
3509
+ if (!r$1) throw Error("Unable to allocate new float vector on heap.");
3510
+ for (const e$3 of t$1) this.i._addFloatVectorEntry(r$1, e$3);
3511
+ this.i._addFloatVectorToInputStream(r$1, e$2, n$1);
3512
+ }));
3513
+ }
3514
+ addIntVectorToStream(t$1, e$1, n$1) {
3515
+ jo(this, e$1, ((e$2) => {
3516
+ const r$1 = this.i._allocateIntVector(t$1.length);
3517
+ if (!r$1) throw Error("Unable to allocate new int vector on heap.");
3518
+ for (const e$3 of t$1) this.i._addIntVectorEntry(r$1, e$3);
3519
+ this.i._addIntVectorToInputStream(r$1, e$2, n$1);
3520
+ }));
3521
+ }
3522
+ addUintVectorToStream(t$1, e$1, n$1) {
3523
+ jo(this, e$1, ((e$2) => {
3524
+ const r$1 = this.i._allocateUintVector(t$1.length);
3525
+ if (!r$1) throw Error("Unable to allocate new unsigned int vector on heap.");
3526
+ for (const e$3 of t$1) this.i._addUintVectorEntry(r$1, e$3);
3527
+ this.i._addUintVectorToInputStream(r$1, e$2, n$1);
3528
+ }));
3529
+ }
3530
+ addStringVectorToStream(t$1, e$1, n$1) {
3531
+ jo(this, e$1, ((e$2) => {
3532
+ const r$1 = this.i._allocateStringVector(t$1.length);
3533
+ if (!r$1) throw Error("Unable to allocate new string vector on heap.");
3534
+ for (const e$3 of t$1) jo(this, e$3, ((t$2) => {
3535
+ this.i._addStringVectorEntry(r$1, t$2);
3536
+ }));
3537
+ this.i._addStringVectorToInputStream(r$1, e$2, n$1);
3538
+ }));
3539
+ }
3540
+ addBoolToInputSidePacket(t$1, e$1) {
3541
+ jo(this, e$1, ((e$2) => {
3542
+ this.i._addBoolToInputSidePacket(t$1, e$2);
3543
+ }));
3544
+ }
3545
+ addDoubleToInputSidePacket(t$1, e$1) {
3546
+ jo(this, e$1, ((e$2) => {
3547
+ this.i._addDoubleToInputSidePacket(t$1, e$2);
3548
+ }));
3549
+ }
3550
+ addFloatToInputSidePacket(t$1, e$1) {
3551
+ jo(this, e$1, ((e$2) => {
3552
+ this.i._addFloatToInputSidePacket(t$1, e$2);
3553
+ }));
3554
+ }
3555
+ addIntToInputSidePacket(t$1, e$1) {
3556
+ jo(this, e$1, ((e$2) => {
3557
+ this.i._addIntToInputSidePacket(t$1, e$2);
3558
+ }));
3559
+ }
3560
+ addUintToInputSidePacket(t$1, e$1) {
3561
+ jo(this, e$1, ((e$2) => {
3562
+ this.i._addUintToInputSidePacket(t$1, e$2);
3563
+ }));
3564
+ }
3565
+ addStringToInputSidePacket(t$1, e$1) {
3566
+ jo(this, e$1, ((e$2) => {
3567
+ jo(this, t$1, ((t$2) => {
3568
+ this.i._addStringToInputSidePacket(t$2, e$2);
3569
+ }));
3570
+ }));
3571
+ }
3572
+ addProtoToInputSidePacket(t$1, e$1, n$1) {
3573
+ jo(this, n$1, ((n$2) => {
3574
+ jo(this, e$1, ((e$2) => {
3575
+ const r$1 = this.i._malloc(t$1.length);
3576
+ this.i.HEAPU8.set(t$1, r$1), this.i._addProtoToInputSidePacket(r$1, t$1.length, e$2, n$2), this.i._free(r$1);
3577
+ }));
3578
+ }));
3579
+ }
3580
+ addBoolVectorToInputSidePacket(t$1, e$1) {
3581
+ jo(this, e$1, ((e$2) => {
3582
+ const n$1 = this.i._allocateBoolVector(t$1.length);
3583
+ if (!n$1) throw Error("Unable to allocate new bool vector on heap.");
3584
+ for (const e$3 of t$1) this.i._addBoolVectorEntry(n$1, e$3);
3585
+ this.i._addBoolVectorToInputSidePacket(n$1, e$2);
3586
+ }));
3587
+ }
3588
+ addDoubleVectorToInputSidePacket(t$1, e$1) {
3589
+ jo(this, e$1, ((e$2) => {
3590
+ const n$1 = this.i._allocateDoubleVector(t$1.length);
3591
+ if (!n$1) throw Error("Unable to allocate new double vector on heap.");
3592
+ for (const e$3 of t$1) this.i._addDoubleVectorEntry(n$1, e$3);
3593
+ this.i._addDoubleVectorToInputSidePacket(n$1, e$2);
3594
+ }));
3595
+ }
3596
+ addFloatVectorToInputSidePacket(t$1, e$1) {
3597
+ jo(this, e$1, ((e$2) => {
3598
+ const n$1 = this.i._allocateFloatVector(t$1.length);
3599
+ if (!n$1) throw Error("Unable to allocate new float vector on heap.");
3600
+ for (const e$3 of t$1) this.i._addFloatVectorEntry(n$1, e$3);
3601
+ this.i._addFloatVectorToInputSidePacket(n$1, e$2);
3602
+ }));
3603
+ }
3604
+ addIntVectorToInputSidePacket(t$1, e$1) {
3605
+ jo(this, e$1, ((e$2) => {
3606
+ const n$1 = this.i._allocateIntVector(t$1.length);
3607
+ if (!n$1) throw Error("Unable to allocate new int vector on heap.");
3608
+ for (const e$3 of t$1) this.i._addIntVectorEntry(n$1, e$3);
3609
+ this.i._addIntVectorToInputSidePacket(n$1, e$2);
3610
+ }));
3611
+ }
3612
+ addUintVectorToInputSidePacket(t$1, e$1) {
3613
+ jo(this, e$1, ((e$2) => {
3614
+ const n$1 = this.i._allocateUintVector(t$1.length);
3615
+ if (!n$1) throw Error("Unable to allocate new unsigned int vector on heap.");
3616
+ for (const e$3 of t$1) this.i._addUintVectorEntry(n$1, e$3);
3617
+ this.i._addUintVectorToInputSidePacket(n$1, e$2);
3618
+ }));
3619
+ }
3620
+ addStringVectorToInputSidePacket(t$1, e$1) {
3621
+ jo(this, e$1, ((e$2) => {
3622
+ const n$1 = this.i._allocateStringVector(t$1.length);
3623
+ if (!n$1) throw Error("Unable to allocate new string vector on heap.");
3624
+ for (const e$3 of t$1) jo(this, e$3, ((t$2) => {
3625
+ this.i._addStringVectorEntry(n$1, t$2);
3626
+ }));
3627
+ this.i._addStringVectorToInputSidePacket(n$1, e$2);
3628
+ }));
3629
+ }
3630
+ attachBoolListener(t$1, e$1) {
3631
+ Ho(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3632
+ this.i._attachBoolListener(t$2);
3633
+ }));
3634
+ }
3635
+ attachBoolVectorListener(t$1, e$1) {
3636
+ Wo(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3637
+ this.i._attachBoolVectorListener(t$2);
3638
+ }));
3639
+ }
3640
+ attachIntListener(t$1, e$1) {
3641
+ Ho(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3642
+ this.i._attachIntListener(t$2);
3643
+ }));
3644
+ }
3645
+ attachIntVectorListener(t$1, e$1) {
3646
+ Wo(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3647
+ this.i._attachIntVectorListener(t$2);
3648
+ }));
3649
+ }
3650
+ attachUintListener(t$1, e$1) {
3651
+ Ho(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3652
+ this.i._attachUintListener(t$2);
3653
+ }));
3654
+ }
3655
+ attachUintVectorListener(t$1, e$1) {
3656
+ Wo(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3657
+ this.i._attachUintVectorListener(t$2);
3658
+ }));
3659
+ }
3660
+ attachDoubleListener(t$1, e$1) {
3661
+ Ho(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3662
+ this.i._attachDoubleListener(t$2);
3663
+ }));
3664
+ }
3665
+ attachDoubleVectorListener(t$1, e$1) {
3666
+ Wo(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3667
+ this.i._attachDoubleVectorListener(t$2);
3668
+ }));
3669
+ }
3670
+ attachFloatListener(t$1, e$1) {
3671
+ Ho(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3672
+ this.i._attachFloatListener(t$2);
3673
+ }));
3674
+ }
3675
+ attachFloatVectorListener(t$1, e$1) {
3676
+ Wo(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3677
+ this.i._attachFloatVectorListener(t$2);
3678
+ }));
3679
+ }
3680
+ attachStringListener(t$1, e$1) {
3681
+ Ho(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3682
+ this.i._attachStringListener(t$2);
3683
+ }));
3684
+ }
3685
+ attachStringVectorListener(t$1, e$1) {
3686
+ Wo(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3687
+ this.i._attachStringVectorListener(t$2);
3688
+ }));
3689
+ }
3690
+ attachProtoListener(t$1, e$1, n$1) {
3691
+ Ho(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3692
+ this.i._attachProtoListener(t$2, n$1 || !1);
3693
+ }));
3694
+ }
3695
+ attachProtoVectorListener(t$1, e$1, n$1) {
3696
+ Wo(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3697
+ this.i._attachProtoVectorListener(t$2, n$1 || !1);
3698
+ }));
3699
+ }
3700
+ attachAudioListener(t$1, e$1, n$1) {
3701
+ this.i._attachAudioListener || console.warn("Attempting to use attachAudioListener without support for output audio. Is build dep \":gl_graph_runner_audio_out\" missing?"), Ho(this, t$1, ((t$2, n$2) => {
3702
+ t$2 = new Float32Array(t$2.buffer, t$2.byteOffset, t$2.length / 4), e$1(t$2, n$2);
3703
+ })), jo(this, t$1, ((t$2) => {
3704
+ this.i._attachAudioListener(t$2, n$1 || !1);
3705
+ }));
3706
+ }
3707
+ finishProcessing() {
3708
+ this.i._waitUntilIdle();
3709
+ }
3710
+ closeGraph() {
3711
+ this.i._closeGraph(), this.i.simpleListeners = void 0, this.i.emptyPacketListeners = void 0;
3712
+ }
3713
+ }, class extends Wa {
3714
+ get ia() {
3715
+ return this.i;
3716
+ }
3717
+ ta(t$1, e$1, n$1) {
3718
+ jo(this, e$1, ((e$2) => {
3719
+ const [r$1, i$1] = Vo(this, t$1, e$2);
3720
+ this.ia._addBoundTextureAsImageToStream(e$2, r$1, i$1, n$1);
3721
+ }));
3722
+ }
3723
+ W(t$1, e$1) {
3724
+ Ho(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3725
+ this.ia._attachImageListener(t$2);
3726
+ }));
3727
+ }
3728
+ fa(t$1, e$1) {
3729
+ Wo(this, t$1, e$1), jo(this, t$1, ((t$2) => {
3730
+ this.ia._attachImageVectorListener(t$2);
3731
+ }));
3732
+ }
3733
+ }));
3734
+ var Wa, za = class extends Ha {};
3735
+ async function Ka(t$1, e$1, n$1) {
3736
+ return async function(t$2, e$2, n$2, r$1) {
3737
+ return zo(t$2, e$2, n$2, r$1);
3738
+ }(t$1, n$1.canvas ?? (Do() ? void 0 : document.createElement("canvas")), e$1, n$1);
3739
+ }
3740
+ function Ya(t$1, e$1, n$1, r$1) {
3741
+ if (t$1.V) {
3742
+ const s$1 = new fs();
3743
+ if (n$1?.regionOfInterest) {
3744
+ if (!t$1.sa) throw Error("This task doesn't support region-of-interest.");
3745
+ var i$1 = n$1.regionOfInterest;
3746
+ if (i$1.left >= i$1.right || i$1.top >= i$1.bottom) throw Error("Expected RectF with left < right and top < bottom.");
3747
+ if (i$1.left < 0 || i$1.top < 0 || i$1.right > 1 || i$1.bottom > 1) throw Error("Expected RectF values to be in [0,1].");
3748
+ Ln(s$1, 1, (i$1.left + i$1.right) / 2), Ln(s$1, 2, (i$1.top + i$1.bottom) / 2), Ln(s$1, 4, i$1.right - i$1.left), Ln(s$1, 3, i$1.bottom - i$1.top);
3749
+ } else Ln(s$1, 1, .5), Ln(s$1, 2, .5), Ln(s$1, 4, 1), Ln(s$1, 3, 1);
3750
+ if (n$1?.rotationDegrees) {
3751
+ if (n$1?.rotationDegrees % 90 != 0) throw Error("Expected rotation to be a multiple of 90°.");
3752
+ if (Ln(s$1, 5, -Math.PI * n$1.rotationDegrees / 180), n$1?.rotationDegrees % 180 != 0) {
3753
+ const [t$2, r$2] = Go(e$1);
3754
+ n$1 = bn(s$1, 3) * r$2 / t$2, i$1 = bn(s$1, 4) * t$2 / r$2, Ln(s$1, 4, n$1), Ln(s$1, 3, i$1);
3755
+ }
3756
+ }
3757
+ t$1.g.addProtoToStream(s$1.g(), "mediapipe.NormalizedRect", t$1.V, r$1);
3758
+ }
3759
+ t$1.g.ta(e$1, t$1.da, r$1 ?? performance.now()), t$1.finishProcessing();
3760
+ }
3761
+ function $a(t$1, e$1, n$1) {
3762
+ if (t$1.baseOptions?.g()) throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");
3763
+ Ya(t$1, e$1, n$1, t$1.B + 1);
3764
+ }
3765
+ function qa(t$1, e$1, n$1, r$1) {
3766
+ if (!t$1.baseOptions?.g()) throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");
3767
+ Ya(t$1, e$1, n$1, r$1);
3768
+ }
3769
+ function Ja(t$1, e$1, n$1, r$1) {
3770
+ var i$1 = e$1.data;
3771
+ const s$1 = e$1.width, o$1 = s$1 * (e$1 = e$1.height);
3772
+ if ((i$1 instanceof Uint8Array || i$1 instanceof Float32Array) && i$1.length !== o$1) throw Error("Unsupported channel count: " + i$1.length / o$1);
3773
+ return t$1 = new wa([i$1], n$1, !1, t$1.g.i.canvas, t$1.R, s$1, e$1), r$1 ? t$1.clone() : t$1;
3774
+ }
3775
+ var Za = class extends Qo {
3776
+ constructor(t$1, e$1, n$1, r$1) {
3777
+ super(t$1), this.g = t$1, this.da = e$1, this.V = n$1, this.sa = r$1, this.R = new ca();
3778
+ }
3779
+ l(t$1, e$1 = !0) {
3780
+ if ("runningMode" in t$1 && Sn(this.baseOptions, 2, !!t$1.runningMode && "IMAGE" !== t$1.runningMode), void 0 !== t$1.canvas && this.g.i.canvas !== t$1.canvas) throw Error("You must create a new task to reset the canvas.");
3781
+ return super.l(t$1, e$1);
3782
+ }
3783
+ close() {
3784
+ this.R.close(), super.close();
3785
+ }
3786
+ };
3787
+ Za.prototype.close = Za.prototype.close;
3788
+ var Qa = class extends Za {
3789
+ constructor(t$1, e$1) {
3790
+ super(new za(t$1, e$1), "image_in", "norm_rect_in", !1), this.j = { detections: [] }, yn(t$1 = this.h = new Fs(), 0, 1, e$1 = new xs()), Ln(this.h, 2, .5), Ln(this.h, 3, .3);
3791
+ }
3792
+ get baseOptions() {
3793
+ return pn(this.h, xs, 1);
3794
+ }
3795
+ set baseOptions(t$1) {
3796
+ yn(this.h, 0, 1, t$1);
3797
+ }
3798
+ o(t$1) {
3799
+ return "minDetectionConfidence" in t$1 && Ln(this.h, 2, t$1.minDetectionConfidence ?? .5), "minSuppressionThreshold" in t$1 && Ln(this.h, 3, t$1.minSuppressionThreshold ?? .3), this.l(t$1);
3800
+ }
3801
+ D(t$1, e$1) {
3802
+ return this.j = { detections: [] }, $a(this, t$1, e$1), this.j;
3803
+ }
3804
+ F(t$1, e$1, n$1) {
3805
+ return this.j = { detections: [] }, qa(this, t$1, n$1, e$1), this.j;
3806
+ }
3807
+ m() {
3808
+ var t$1 = new $i();
3809
+ Ki(t$1, "image_in"), Ki(t$1, "norm_rect_in"), Yi(t$1, "detections");
3810
+ const e$1 = new Ci();
3811
+ er(e$1, Is, this.h);
3812
+ const n$1 = new Vi();
3813
+ Bi(n$1, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "NORM_RECT:norm_rect_in"), ji(n$1, "DETECTIONS:detections"), n$1.o(e$1), zi(t$1, n$1), this.g.attachProtoVectorListener("detections", ((t$2, e$2) => {
3814
+ for (const e$3 of t$2) t$2 = ss(e$3), this.j.detections.push(Lo(t$2));
3815
+ $o(this, e$2);
3816
+ })), this.g.attachEmptyPacketListener("detections", ((t$2) => {
3817
+ $o(this, t$2);
3818
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
3819
+ }
3820
+ };
3821
+ Qa.prototype.detectForVideo = Qa.prototype.F, Qa.prototype.detect = Qa.prototype.D, Qa.prototype.setOptions = Qa.prototype.o, Qa.createFromModelPath = async function(t$1, e$1) {
3822
+ return Ka(Qa, t$1, { baseOptions: { modelAssetPath: e$1 } });
3823
+ }, Qa.createFromModelBuffer = function(t$1, e$1) {
3824
+ return Ka(Qa, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
3825
+ }, Qa.createFromOptions = function(t$1, e$1) {
3826
+ return Ka(Qa, t$1, e$1);
3827
+ };
3828
+ var th = Xa([61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [314, 405], [405, 321], [321, 375], [375, 291], [61, 185], [185, 40], [40, 39], [39, 37], [37, 0], [0, 267], [267, 269], [269, 270], [270, 409], [409, 291], [78, 95], [95, 88], [88, 178], [178, 87], [87, 14], [14, 317], [317, 402], [402, 318], [318, 324], [324, 308], [78, 191], [191, 80], [80, 81], [81, 82], [82, 13], [13, 312], [312, 311], [311, 310], [310, 415], [415, 308]), eh = Xa([263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]), nh = Xa([276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]), rh = Xa([474, 475], [475, 476], [476, 477], [477, 474]), ih = Xa([33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]), sh = Xa([46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]), oh = Xa([469, 470], [470, 471], [471, 472], [472, 469]), ah = Xa([10, 338], [338, 297], [297, 332], [332, 284], [284, 251], [251, 389], [389, 356], [356, 454], [454, 323], [323, 361], [361, 288], [288, 397], [397, 365], [365, 379], [379, 378], [378, 400], [400, 377], [377, 152], [152, 148], [148, 176], [176, 149], [149, 150], [150, 136], [136, 172], [172, 58], [58, 132], [132, 93], [93, 234], [234, 127], [127, 162], [162, 21], [21, 54], [54, 103], [103, 67], [67, 109], [109, 10]), hh = [
3829
+ ...th,
3830
+ ...eh,
3831
+ ...nh,
3832
+ ...ih,
3833
+ ...sh,
3834
+ ...ah
3835
+ ], ch = Xa([127, 34], [34, 139], [139, 127], [11, 0], [0, 37], [37, 11], [232, 231], [231, 120], [120, 232], [72, 37], [37, 39], [39, 72], [128, 121], [121, 47], [47, 128], [232, 121], [121, 128], [128, 232], [104, 69], [69, 67], [67, 104], [175, 171], [171, 148], [148, 175], [118, 50], [50, 101], [101, 118], [73, 39], [39, 40], [40, 73], [9, 151], [151, 108], [108, 9], [48, 115], [115, 131], [131, 48], [194, 204], [204, 211], [211, 194], [74, 40], [40, 185], [185, 74], [80, 42], [42, 183], [183, 80], [40, 92], [92, 186], [186, 40], [230, 229], [229, 118], [118, 230], [202, 212], [212, 214], [214, 202], [83, 18], [18, 17], [17, 83], [76, 61], [61, 146], [146, 76], [160, 29], [29, 30], [30, 160], [56, 157], [157, 173], [173, 56], [106, 204], [204, 194], [194, 106], [135, 214], [214, 192], [192, 135], [203, 165], [165, 98], [98, 203], [21, 71], [71, 68], [68, 21], [51, 45], [45, 4], [4, 51], [144, 24], [24, 23], [23, 144], [77, 146], [146, 91], [91, 77], [205, 50], [50, 187], [187, 205], [201, 200], [200, 18], [18, 201], [91, 106], [106, 182], [182, 91], [90, 91], [91, 181], [181, 90], [85, 84], [84, 17], [17, 85], [206, 203], [203, 36], [36, 206], [148, 171], [171, 140], [140, 148], [92, 40], [40, 39], [39, 92], [193, 189], [189, 244], [244, 193], [159, 158], [158, 28], [28, 159], [247, 246], [246, 161], [161, 247], [236, 3], [3, 196], [196, 236], [54, 68], [68, 104], [104, 54], [193, 168], [168, 8], [8, 193], [117, 228], [228, 31], [31, 117], [189, 193], [193, 55], [55, 189], [98, 97], [97, 99], [99, 98], [126, 47], [47, 100], [100, 126], [166, 79], [79, 218], [218, 166], [155, 154], [154, 26], [26, 155], [209, 49], [49, 131], [131, 209], [135, 136], [136, 150], [150, 135], [47, 126], [126, 217], [217, 47], [223, 52], [52, 53], [53, 223], [45, 51], [51, 134], [134, 45], [211, 170], [170, 140], [140, 211], [67, 69], [69, 108], [108, 67], [43, 106], [106, 91], [91, 43], [230, 119], [119, 120], [120, 230], [226, 130], [130, 247], [247, 226], [63, 53], [53, 52], [52, 63], [238, 20], [20, 242], [242, 238], [46, 70], [70, 156], [156, 46], [78, 62], [62, 96], [96, 78], [46, 53], [53, 63], [63, 46], [143, 34], [34, 227], [227, 143], [123, 117], [117, 111], [111, 123], [44, 125], [125, 19], [19, 44], [236, 134], [134, 51], [51, 236], [216, 206], [206, 205], [205, 216], [154, 153], [153, 22], [22, 154], [39, 37], [37, 167], [167, 39], [200, 201], [201, 208], [208, 200], [36, 142], [142, 100], [100, 36], [57, 212], [212, 202], [202, 57], [20, 60], [60, 99], [99, 20], [28, 158], [158, 157], [157, 28], [35, 226], [226, 113], [113, 35], [160, 159], [159, 27], [27, 160], [204, 202], [202, 210], [210, 204], [113, 225], [225, 46], [46, 113], [43, 202], [202, 204], [204, 43], [62, 76], [76, 77], [77, 62], [137, 123], [123, 116], [116, 137], [41, 38], [38, 72], [72, 41], [203, 129], [129, 142], [142, 203], [64, 98], [98, 240], [240, 64], [49, 102], [102, 64], [64, 49], [41, 73], [73, 74], [74, 41], [212, 216], [216, 207], [207, 212], [42, 74], [74, 184], [184, 42], [169, 170], [170, 211], [211, 169], [170, 149], [149, 176], [176, 170], [105, 66], [66, 69], [69, 105], [122, 6], [6, 168], [168, 122], [123, 147], [147, 187], [187, 123], [96, 77], [77, 90], [90, 96], [65, 55], [55, 107], [107, 65], [89, 90], [90, 180], [180, 89], [101, 100], [100, 120], [120, 101], [63, 105], [105, 104], [104, 63], [93, 137], [137, 227], [227, 93], [15, 86], [86, 85], [85, 15], [129, 102], [102, 49], [49, 129], [14, 87], [87, 86], [86, 14], [55, 8], [8, 9], [9, 55], [100, 47], [47, 121], [121, 100], [145, 23], [23, 22], [22, 145], [88, 89], [89, 179], [179, 88], [6, 122], [122, 196], [196, 6], [88, 95], [95, 96], [96, 88], [138, 172], [172, 136], [136, 138], [215, 58], [58, 172], [172, 215], [115, 48], [48, 219], [219, 115], [42, 80], [80, 81], [81, 42], [195, 3], [3, 51], [51, 195], [43, 146], [146, 61], [61, 43], [171, 175], [175, 199], [199, 171], [81, 82], [82, 38], [38, 81], [53, 46], [46, 225], [225, 53], [144, 163], [163, 110], [110, 144], [52, 65], [65, 66], [66, 52], [229, 228], [228, 117], [117, 229], [34, 127], [127, 234], [234, 34], [107, 108], [108, 69], [69, 107], [109, 108], [108, 151], [151, 109], [48, 64], [64, 235], [235, 48], [62, 78], [78, 191], [191, 62], [129, 209], [209, 126], [126, 129], [111, 35], [35, 143], [143, 111], [117, 123], [123, 50], [50, 117], [222, 65], [65, 52], [52, 222], [19, 125], [125, 141], [141, 19], [221, 55], [55, 65], [65, 221], [3, 195], [195, 197], [197, 3], [25, 7], [7, 33], [33, 25], [220, 237], [237, 44], [44, 220], [70, 71], [71, 139], [139, 70], [122, 193], [193, 245], [245, 122], [247, 130], [130, 33], [33, 247], [71, 21], [21, 162], [162, 71], [170, 169], [169, 150], [150, 170], [188, 174], [174, 196], [196, 188], [216, 186], [186, 92], [92, 216], [2, 97], [97, 167], [167, 2], [141, 125], [125, 241], [241, 141], [164, 167], [167, 37], [37, 164], [72, 38], [38, 12], [12, 72], [38, 82], [82, 13], [13, 38], [63, 68], [68, 71], [71, 63], [226, 35], [35, 111], [111, 226], [101, 50], [50, 205], [205, 101], [206, 92], [92, 165], [165, 206], [209, 198], [198, 217], [217, 209], [165, 167], [167, 97], [97, 165], [220, 115], [115, 218], [218, 220], [133, 112], [112, 243], [243, 133], [239, 238], [238, 241], [241, 239], [214, 135], [135, 169], [169, 214], [190, 173], [173, 133], [133, 190], [171, 208], [208, 32], [32, 171], [125, 44], [44, 237], [237, 125], [86, 87], [87, 178], [178, 86], [85, 86], [86, 179], [179, 85], [84, 85], [85, 180], [180, 84], [83, 84], [84, 181], [181, 83], [201, 83], [83, 182], [182, 201], [137, 93], [93, 132], [132, 137], [76, 62], [62, 183], [183, 76], [61, 76], [76, 184], [184, 61], [57, 61], [61, 185], [185, 57], [212, 57], [57, 186], [186, 212], [214, 207], [207, 187], [187, 214], [34, 143], [143, 156], [156, 34], [79, 239], [239, 237], [237, 79], [123, 137], [137, 177], [177, 123], [44, 1], [1, 4], [4, 44], [201, 194], [194, 32], [32, 201], [64, 102], [102, 129], [129, 64], [213, 215], [215, 138], [138, 213], [59, 166], [166, 219], [219, 59], [242, 99], [99, 97], [97, 242], [2, 94], [94, 141], [141, 2], [75, 59], [59, 235], [235, 75], [24, 110], [110, 228], [228, 24], [25, 130], [130, 226], [226, 25], [23, 24], [24, 229], [229, 23], [22, 23], [23, 230], [230, 22], [26, 22], [22, 231], [231, 26], [112, 26], [26, 232], [232, 112], [189, 190], [190, 243], [243, 189], [221, 56], [56, 190], [190, 221], [28, 56], [56, 221], [221, 28], [27, 28], [28, 222], [222, 27], [29, 27], [27, 223], [223, 29], [30, 29], [29, 224], [224, 30], [247, 30], [30, 225], [225, 247], [238, 79], [79, 20], [20, 238], [166, 59], [59, 75], [75, 166], [60, 75], [75, 240], [240, 60], [147, 177], [177, 215], [215, 147], [20, 79], [79, 166], [166, 20], [187, 147], [147, 213], [213, 187], [112, 233], [233, 244], [244, 112], [233, 128], [128, 245], [245, 233], [128, 114], [114, 188], [188, 128], [114, 217], [217, 174], [174, 114], [131, 115], [115, 220], [220, 131], [217, 198], [198, 236], [236, 217], [198, 131], [131, 134], [134, 198], [177, 132], [132, 58], [58, 177], [143, 35], [35, 124], [124, 143], [110, 163], [163, 7], [7, 110], [228, 110], [110, 25], [25, 228], [356, 389], [389, 368], [368, 356], [11, 302], [302, 267], [267, 11], [452, 350], [350, 349], [349, 452], [302, 303], [303, 269], [269, 302], [357, 343], [343, 277], [277, 357], [452, 453], [453, 357], [357, 452], [333, 332], [332, 297], [297, 333], [175, 152], [152, 377], [377, 175], [347, 348], [348, 330], [330, 347], [303, 304], [304, 270], [270, 303], [9, 336], [336, 337], [337, 9], [278, 279], [279, 360], [360, 278], [418, 262], [262, 431], [431, 418], [304, 408], [408, 409], [409, 304], [310, 415], [415, 407], [407, 310], [270, 409], [409, 410], [410, 270], [450, 348], [348, 347], [347, 450], [422, 430], [430, 434], [434, 422], [313, 314], [314, 17], [17, 313], [306, 307], [307, 375], [375, 306], [387, 388], [388, 260], [260, 387], [286, 414], [414, 398], [398, 286], [335, 406], [406, 418], [418, 335], [364, 367], [367, 416], [416, 364], [423, 358], [358, 327], [327, 423], [251, 284], [284, 298], [298, 251], [281, 5], [5, 4], [4, 281], [373, 374], [374, 253], [253, 373], [307, 320], [320, 321], [321, 307], [425, 427], [427, 411], [411, 425], [421, 313], [313, 18], [18, 421], [321, 405], [405, 406], [406, 321], [320, 404], [404, 405], [405, 320], [315, 16], [16, 17], [17, 315], [426, 425], [425, 266], [266, 426], [377, 400], [400, 369], [369, 377], [322, 391], [391, 269], [269, 322], [417, 465], [465, 464], [464, 417], [386, 257], [257, 258], [258, 386], [466, 260], [260, 388], [388, 466], [456, 399], [399, 419], [419, 456], [284, 332], [332, 333], [333, 284], [417, 285], [285, 8], [8, 417], [346, 340], [340, 261], [261, 346], [413, 441], [441, 285], [285, 413], [327, 460], [460, 328], [328, 327], [355, 371], [371, 329], [329, 355], [392, 439], [439, 438], [438, 392], [382, 341], [341, 256], [256, 382], [429, 420], [420, 360], [360, 429], [364, 394], [394, 379], [379, 364], [277, 343], [343, 437], [437, 277], [443, 444], [444, 283], [283, 443], [275, 440], [440, 363], [363, 275], [431, 262], [262, 369], [369, 431], [297, 338], [338, 337], [337, 297], [273, 375], [375, 321], [321, 273], [450, 451], [451, 349], [349, 450], [446, 342], [342, 467], [467, 446], [293, 334], [334, 282], [282, 293], [458, 461], [461, 462], [462, 458], [276, 353], [353, 383], [383, 276], [308, 324], [324, 325], [325, 308], [276, 300], [300, 293], [293, 276], [372, 345], [345, 447], [447, 372], [352, 345], [345, 340], [340, 352], [274, 1], [1, 19], [19, 274], [456, 248], [248, 281], [281, 456], [436, 427], [427, 425], [425, 436], [381, 256], [256, 252], [252, 381], [269, 391], [391, 393], [393, 269], [200, 199], [199, 428], [428, 200], [266, 330], [330, 329], [329, 266], [287, 273], [273, 422], [422, 287], [250, 462], [462, 328], [328, 250], [258, 286], [286, 384], [384, 258], [265, 353], [353, 342], [342, 265], [387, 259], [259, 257], [257, 387], [424, 431], [431, 430], [430, 424], [342, 353], [353, 276], [276, 342], [273, 335], [335, 424], [424, 273], [292, 325], [325, 307], [307, 292], [366, 447], [447, 345], [345, 366], [271, 303], [303, 302], [302, 271], [423, 266], [266, 371], [371, 423], [294, 455], [455, 460], [460, 294], [279, 278], [278, 294], [294, 279], [271, 272], [272, 304], [304, 271], [432, 434], [434, 427], [427, 432], [272, 407], [407, 408], [408, 272], [394, 430], [430, 431], [431, 394], [395, 369], [369, 400], [400, 395], [334, 333], [333, 299], [299, 334], [351, 417], [417, 168], [168, 351], [352, 280], [280, 411], [411, 352], [325, 319], [319, 320], [320, 325], [295, 296], [296, 336], [336, 295], [319, 403], [403, 404], [404, 319], [330, 348], [348, 349], [349, 330], [293, 298], [298, 333], [333, 293], [323, 454], [454, 447], [447, 323], [15, 16], [16, 315], [315, 15], [358, 429], [429, 279], [279, 358], [14, 15], [15, 316], [316, 14], [285, 336], [336, 9], [9, 285], [329, 349], [349, 350], [350, 329], [374, 380], [380, 252], [252, 374], [318, 402], [402, 403], [403, 318], [6, 197], [197, 419], [419, 6], [318, 319], [319, 325], [325, 318], [367, 364], [364, 365], [365, 367], [435, 367], [367, 397], [397, 435], [344, 438], [438, 439], [439, 344], [272, 271], [271, 311], [311, 272], [195, 5], [5, 281], [281, 195], [273, 287], [287, 291], [291, 273], [396, 428], [428, 199], [199, 396], [311, 271], [271, 268], [268, 311], [283, 444], [444, 445], [445, 283], [373, 254], [254, 339], [339, 373], [282, 334], [334, 296], [296, 282], [449, 347], [347, 346], [346, 449], [264, 447], [447, 454], [454, 264], [336, 296], [296, 299], [299, 336], [338, 10], [10, 151], [151, 338], [278, 439], [439, 455], [455, 278], [292, 407], [407, 415], [415, 292], [358, 371], [371, 355], [355, 358], [340, 345], [345, 372], [372, 340], [346, 347], [347, 280], [280, 346], [442, 443], [443, 282], [282, 442], [19, 94], [94, 370], [370, 19], [441, 442], [442, 295], [295, 441], [248, 419], [419, 197], [197, 248], [263, 255], [255, 359], [359, 263], [440, 275], [275, 274], [274, 440], [300, 383], [383, 368], [368, 300], [351, 412], [412, 465], [465, 351], [263, 467], [467, 466], [466, 263], [301, 368], [368, 389], [389, 301], [395, 378], [378, 379], [379, 395], [412, 351], [351, 419], [419, 412], [436, 426], [426, 322], [322, 436], [2, 164], [164, 393], [393, 2], [370, 462], [462, 461], [461, 370], [164, 0], [0, 267], [267, 164], [302, 11], [11, 12], [12, 302], [268, 12], [12, 13], [13, 268], [293, 300], [300, 301], [301, 293], [446, 261], [261, 340], [340, 446], [330, 266], [266, 425], [425, 330], [426, 423], [423, 391], [391, 426], [429, 355], [355, 437], [437, 429], [391, 327], [327, 326], [326, 391], [440, 457], [457, 438], [438, 440], [341, 382], [382, 362], [362, 341], [459, 457], [457, 461], [461, 459], [434, 430], [430, 394], [394, 434], [414, 463], [463, 362], [362, 414], [396, 369], [369, 262], [262, 396], [354, 461], [461, 457], [457, 354], [316, 403], [403, 402], [402, 316], [315, 404], [404, 403], [403, 315], [314, 405], [405, 404], [404, 314], [313, 406], [406, 405], [405, 313], [421, 418], [418, 406], [406, 421], [366, 401], [401, 361], [361, 366], [306, 408], [408, 407], [407, 306], [291, 409], [409, 408], [408, 291], [287, 410], [410, 409], [409, 287], [432, 436], [436, 410], [410, 432], [434, 416], [416, 411], [411, 434], [264, 368], [368, 383], [383, 264], [309, 438], [438, 457], [457, 309], [352, 376], [376, 401], [401, 352], [274, 275], [275, 4], [4, 274], [421, 428], [428, 262], [262, 421], [294, 327], [327, 358], [358, 294], [433, 416], [416, 367], [367, 433], [289, 455], [455, 439], [439, 289], [462, 370], [370, 326], [326, 462], [2, 326], [326, 370], [370, 2], [305, 460], [460, 455], [455, 305], [254, 449], [449, 448], [448, 254], [255, 261], [261, 446], [446, 255], [253, 450], [450, 449], [449, 253], [252, 451], [451, 450], [450, 252], [256, 452], [452, 451], [451, 256], [341, 453], [453, 452], [452, 341], [413, 464], [464, 463], [463, 413], [441, 413], [413, 414], [414, 441], [258, 442], [442, 441], [441, 258], [257, 443], [443, 442], [442, 257], [259, 444], [444, 443], [443, 259], [260, 445], [445, 444], [444, 260], [467, 342], [342, 445], [445, 467], [459, 458], [458, 250], [250, 459], [289, 392], [392, 290], [290, 289], [290, 328], [328, 460], [460, 290], [376, 433], [433, 435], [435, 376], [250, 290], [290, 392], [392, 250], [411, 416], [416, 433], [433, 411], [341, 463], [463, 464], [464, 341], [453, 464], [464, 465], [465, 453], [357, 465], [465, 412], [412, 357], [343, 412], [412, 399], [399, 343], [360, 363], [363, 440], [440, 360], [437, 399], [399, 456], [456, 437], [420, 456], [456, 363], [363, 420], [401, 435], [435, 288], [288, 401], [372, 383], [383, 353], [353, 372], [339, 255], [255, 249], [249, 339], [448, 261], [261, 255], [255, 448], [133, 243], [243, 190], [190, 133], [133, 155], [155, 112], [112, 133], [33, 246], [246, 247], [247, 33], [33, 130], [130, 25], [25, 33], [398, 384], [384, 286], [286, 398], [362, 398], [398, 414], [414, 362], [362, 463], [463, 341], [341, 362], [263, 359], [359, 467], [467, 263], [263, 249], [249, 255], [255, 263], [466, 467], [467, 260], [260, 466], [75, 60], [60, 166], [166, 75], [238, 239], [239, 79], [79, 238], [162, 127], [127, 139], [139, 162], [72, 11], [11, 37], [37, 72], [121, 232], [232, 120], [120, 121], [73, 72], [72, 39], [39, 73], [114, 128], [128, 47], [47, 114], [233, 232], [232, 128], [128, 233], [103, 104], [104, 67], [67, 103], [152, 175], [175, 148], [148, 152], [119, 118], [118, 101], [101, 119], [74, 73], [73, 40], [40, 74], [107, 9], [9, 108], [108, 107], [49, 48], [48, 131], [131, 49], [32, 194], [194, 211], [211, 32], [184, 74], [74, 185], [185, 184], [191, 80], [80, 183], [183, 191], [185, 40], [40, 186], [186, 185], [119, 230], [230, 118], [118, 119], [210, 202], [202, 214], [214, 210], [84, 83], [83, 17], [17, 84], [77, 76], [76, 146], [146, 77], [161, 160], [160, 30], [30, 161], [190, 56], [56, 173], [173, 190], [182, 106], [106, 194], [194, 182], [138, 135], [135, 192], [192, 138], [129, 203], [203, 98], [98, 129], [54, 21], [21, 68], [68, 54], [5, 51], [51, 4], [4, 5], [145, 144], [144, 23], [23, 145], [90, 77], [77, 91], [91, 90], [207, 205], [205, 187], [187, 207], [83, 201], [201, 18], [18, 83], [181, 91], [91, 182], [182, 181], [180, 90], [90, 181], [181, 180], [16, 85], [85, 17], [17, 16], [205, 206], [206, 36], [36, 205], [176, 148], [148, 140], [140, 176], [165, 92], [92, 39], [39, 165], [245, 193], [193, 244], [244, 245], [27, 159], [159, 28], [28, 27], [30, 247], [247, 161], [161, 30], [174, 236], [236, 196], [196, 174], [103, 54], [54, 104], [104, 103], [55, 193], [193, 8], [8, 55], [111, 117], [117, 31], [31, 111], [221, 189], [189, 55], [55, 221], [240, 98], [98, 99], [99, 240], [142, 126], [126, 100], [100, 142], [219, 166], [166, 218], [218, 219], [112, 155], [155, 26], [26, 112], [198, 209], [209, 131], [131, 198], [169, 135], [135, 150], [150, 169], [114, 47], [47, 217], [217, 114], [224, 223], [223, 53], [53, 224], [220, 45], [45, 134], [134, 220], [32, 211], [211, 140], [140, 32], [109, 67], [67, 108], [108, 109], [146, 43], [43, 91], [91, 146], [231, 230], [230, 120], [120, 231], [113, 226], [226, 247], [247, 113], [105, 63], [63, 52], [52, 105], [241, 238], [238, 242], [242, 241], [124, 46], [46, 156], [156, 124], [95, 78], [78, 96], [96, 95], [70, 46], [46, 63], [63, 70], [116, 143], [143, 227], [227, 116], [116, 123], [123, 111], [111, 116], [1, 44], [44, 19], [19, 1], [3, 236], [236, 51], [51, 3], [207, 216], [216, 205], [205, 207], [26, 154], [154, 22], [22, 26], [165, 39], [39, 167], [167, 165], [199, 200], [200, 208], [208, 199], [101, 36], [36, 100], [100, 101], [43, 57], [57, 202], [202, 43], [242, 20], [20, 99], [99, 242], [56, 28], [28, 157], [157, 56], [124, 35], [35, 113], [113, 124], [29, 160], [160, 27], [27, 29], [211, 204], [204, 210], [210, 211], [124, 113], [113, 46], [46, 124], [106, 43], [43, 204], [204, 106], [96, 62], [62, 77], [77, 96], [227, 137], [137, 116], [116, 227], [73, 41], [41, 72], [72, 73], [36, 203], [203, 142], [142, 36], [235, 64], [64, 240], [240, 235], [48, 49], [49, 64], [64, 48], [42, 41], [41, 74], [74, 42], [214, 212], [212, 207], [207, 214], [183, 42], [42, 184], [184, 183], [210, 169], [169, 211], [211, 210], [140, 170], [170, 176], [176, 140], [104, 105], [105, 69], [69, 104], [193, 122], [122, 168], [168, 193], [50, 123], [123, 187], [187, 50], [89, 96], [96, 90], [90, 89], [66, 65], [65, 107], [107, 66], [179, 89], [89, 180], [180, 179], [119, 101], [101, 120], [120, 119], [68, 63], [63, 104], [104, 68], [234, 93], [93, 227], [227, 234], [16, 15], [15, 85], [85, 16], [209, 129], [129, 49], [49, 209], [15, 14], [14, 86], [86, 15], [107, 55], [55, 9], [9, 107], [120, 100], [100, 121], [121, 120], [153, 145], [145, 22], [22, 153], [178, 88], [88, 179], [179, 178], [197, 6], [6, 196], [196, 197], [89, 88], [88, 96], [96, 89], [135, 138], [138, 136], [136, 135], [138, 215], [215, 172], [172, 138], [218, 115], [115, 219], [219, 218], [41, 42], [42, 81], [81, 41], [5, 195], [195, 51], [51, 5], [57, 43], [43, 61], [61, 57], [208, 171], [171, 199], [199, 208], [41, 81], [81, 38], [38, 41], [224, 53], [53, 225], [225, 224], [24, 144], [144, 110], [110, 24], [105, 52], [52, 66], [66, 105], [118, 229], [229, 117], [117, 118], [227, 34], [34, 234], [234, 227], [66, 107], [107, 69], [69, 66], [10, 109], [109, 151], [151, 10], [219, 48], [48, 235], [235, 219], [183, 62], [62, 191], [191, 183], [142, 129], [129, 126], [126, 142], [116, 111], [111, 143], [143, 116], [118, 117], [117, 50], [50, 118], [223, 222], [222, 52], [52, 223], [94, 19], [19, 141], [141, 94], [222, 221], [221, 65], [65, 222], [196, 3], [3, 197], [197, 196], [45, 220], [220, 44], [44, 45], [156, 70], [70, 139], [139, 156], [188, 122], [122, 245], [245, 188], [139, 71], [71, 162], [162, 139], [149, 170], [170, 150], [150, 149], [122, 188], [188, 196], [196, 122], [206, 216], [216, 92], [92, 206], [164, 2], [2, 167], [167, 164], [242, 141], [141, 241], [241, 242], [0, 164], [164, 37], [37, 0], [11, 72], [72, 12], [12, 11], [12, 38], [38, 13], [13, 12], [70, 63], [63, 71], [71, 70], [31, 226], [226, 111], [111, 31], [36, 101], [101, 205], [205, 36], [203, 206], [206, 165], [165, 203], [126, 209], [209, 217], [217, 126], [98, 165], [165, 97], [97, 98], [237, 220], [220, 218], [218, 237], [237, 239], [239, 241], [241, 237], [210, 214], [214, 169], [169, 210], [140, 171], [171, 32], [32, 140], [241, 125], [125, 237], [237, 241], [179, 86], [86, 178], [178, 179], [180, 85], [85, 179], [179, 180], [181, 84], [84, 180], [180, 181], [182, 83], [83, 181], [181, 182], [194, 201], [201, 182], [182, 194], [177, 137], [137, 132], [132, 177], [184, 76], [76, 183], [183, 184], [185, 61], [61, 184], [184, 185], [186, 57], [57, 185], [185, 186], [216, 212], [212, 186], [186, 216], [192, 214], [214, 187], [187, 192], [139, 34], [34, 156], [156, 139], [218, 79], [79, 237], [237, 218], [147, 123], [123, 177], [177, 147], [45, 44], [44, 4], [4, 45], [208, 201], [201, 32], [32, 208], [98, 64], [64, 129], [129, 98], [192, 213], [213, 138], [138, 192], [235, 59], [59, 219], [219, 235], [141, 242], [242, 97], [97, 141], [97, 2], [2, 141], [141, 97], [240, 75], [75, 235], [235, 240], [229, 24], [24, 228], [228, 229], [31, 25], [25, 226], [226, 31], [230, 23], [23, 229], [229, 230], [231, 22], [22, 230], [230, 231], [232, 26], [26, 231], [231, 232], [233, 112], [112, 232], [232, 233], [244, 189], [189, 243], [243, 244], [189, 221], [221, 190], [190, 189], [222, 28], [28, 221], [221, 222], [223, 27], [27, 222], [222, 223], [224, 29], [29, 223], [223, 224], [225, 30], [30, 224], [224, 225], [113, 247], [247, 225], [225, 113], [99, 60], [60, 240], [240, 99], [213, 147], [147, 215], [215, 213], [60, 20], [20, 166], [166, 60], [192, 187], [187, 213], [213, 192], [243, 112], [112, 244], [244, 243], [244, 233], [233, 245], [245, 244], [245, 128], [128, 188], [188, 245], [188, 114], [114, 174], [174, 188], [134, 131], [131, 220], [220, 134], [174, 217], [217, 236], [236, 174], [236, 198], [198, 134], [134, 236], [215, 177], [177, 58], [58, 215], [156, 143], [143, 124], [124, 156], [25, 110], [110, 7], [7, 25], [31, 228], [228, 25], [25, 31], [264, 356], [356, 368], [368, 264], [0, 11], [11, 267], [267, 0], [451, 452], [452, 349], [349, 451], [267, 302], [302, 269], [269, 267], [350, 357], [357, 277], [277, 350], [350, 452], [452, 357], [357, 350], [299, 333], [333, 297], [297, 299], [396, 175], [175, 377], [377, 396], [280, 347], [347, 330], [330, 280], [269, 303], [303, 270], [270, 269], [151, 9], [9, 337], [337, 151], [344, 278], [278, 360], [360, 344], [424, 418], [418, 431], [431, 424], [270, 304], [304, 409], [409, 270], [272, 310], [310, 407], [407, 272], [322, 270], [270, 410], [410, 322], [449, 450], [450, 347], [347, 449], [432, 422], [422, 434], [434, 432], [18, 313], [313, 17], [17, 18], [291, 306], [306, 375], [375, 291], [259, 387], [387, 260], [260, 259], [424, 335], [335, 418], [418, 424], [434, 364], [364, 416], [416, 434], [391, 423], [423, 327], [327, 391], [301, 251], [251, 298], [298, 301], [275, 281], [281, 4], [4, 275], [254, 373], [373, 253], [253, 254], [375, 307], [307, 321], [321, 375], [280, 425], [425, 411], [411, 280], [200, 421], [421, 18], [18, 200], [335, 321], [321, 406], [406, 335], [321, 320], [320, 405], [405, 321], [314, 315], [315, 17], [17, 314], [423, 426], [426, 266], [266, 423], [396, 377], [377, 369], [369, 396], [270, 322], [322, 269], [269, 270], [413, 417], [417, 464], [464, 413], [385, 386], [386, 258], [258, 385], [248, 456], [456, 419], [419, 248], [298, 284], [284, 333], [333, 298], [168, 417], [417, 8], [8, 168], [448, 346], [346, 261], [261, 448], [417, 413], [413, 285], [285, 417], [326, 327], [327, 328], [328, 326], [277, 355], [355, 329], [329, 277], [309, 392], [392, 438], [438, 309], [381, 382], [382, 256], [256, 381], [279, 429], [429, 360], [360, 279], [365, 364], [364, 379], [379, 365], [355, 277], [277, 437], [437, 355], [282, 443], [443, 283], [283, 282], [281, 275], [275, 363], [363, 281], [395, 431], [431, 369], [369, 395], [299, 297], [297, 337], [337, 299], [335, 273], [273, 321], [321, 335], [348, 450], [450, 349], [349, 348], [359, 446], [446, 467], [467, 359], [283, 293], [293, 282], [282, 283], [250, 458], [458, 462], [462, 250], [300, 276], [276, 383], [383, 300], [292, 308], [308, 325], [325, 292], [283, 276], [276, 293], [293, 283], [264, 372], [372, 447], [447, 264], [346, 352], [352, 340], [340, 346], [354, 274], [274, 19], [19, 354], [363, 456], [456, 281], [281, 363], [426, 436], [436, 425], [425, 426], [380, 381], [381, 252], [252, 380], [267, 269], [269, 393], [393, 267], [421, 200], [200, 428], [428, 421], [371, 266], [266, 329], [329, 371], [432, 287], [287, 422], [422, 432], [290, 250], [250, 328], [328, 290], [385, 258], [258, 384], [384, 385], [446, 265], [265, 342], [342, 446], [386, 387], [387, 257], [257, 386], [422, 424], [424, 430], [430, 422], [445, 342], [342, 276], [276, 445], [422, 273], [273, 424], [424, 422], [306, 292], [292, 307], [307, 306], [352, 366], [366, 345], [345, 352], [268, 271], [271, 302], [302, 268], [358, 423], [423, 371], [371, 358], [327, 294], [294, 460], [460, 327], [331, 279], [279, 294], [294, 331], [303, 271], [271, 304], [304, 303], [436, 432], [432, 427], [427, 436], [304, 272], [272, 408], [408, 304], [395, 394], [394, 431], [431, 395], [378, 395], [395, 400], [400, 378], [296, 334], [334, 299], [299, 296], [6, 351], [351, 168], [168, 6], [376, 352], [352, 411], [411, 376], [307, 325], [325, 320], [320, 307], [285, 295], [295, 336], [336, 285], [320, 319], [319, 404], [404, 320], [329, 330], [330, 349], [349, 329], [334, 293], [293, 333], [333, 334], [366, 323], [323, 447], [447, 366], [316, 15], [15, 315], [315, 316], [331, 358], [358, 279], [279, 331], [317, 14], [14, 316], [316, 317], [8, 285], [285, 9], [9, 8], [277, 329], [329, 350], [350, 277], [253, 374], [374, 252], [252, 253], [319, 318], [318, 403], [403, 319], [351, 6], [6, 419], [419, 351], [324, 318], [318, 325], [325, 324], [397, 367], [367, 365], [365, 397], [288, 435], [435, 397], [397, 288], [278, 344], [344, 439], [439, 278], [310, 272], [272, 311], [311, 310], [248, 195], [195, 281], [281, 248], [375, 273], [273, 291], [291, 375], [175, 396], [396, 199], [199, 175], [312, 311], [311, 268], [268, 312], [276, 283], [283, 445], [445, 276], [390, 373], [373, 339], [339, 390], [295, 282], [282, 296], [296, 295], [448, 449], [449, 346], [346, 448], [356, 264], [264, 454], [454, 356], [337, 336], [336, 299], [299, 337], [337, 338], [338, 151], [151, 337], [294, 278], [278, 455], [455, 294], [308, 292], [292, 415], [415, 308], [429, 358], [358, 355], [355, 429], [265, 340], [340, 372], [372, 265], [352, 346], [346, 280], [280, 352], [295, 442], [442, 282], [282, 295], [354, 19], [19, 370], [370, 354], [285, 441], [441, 295], [295, 285], [195, 248], [248, 197], [197, 195], [457, 440], [440, 274], [274, 457], [301, 300], [300, 368], [368, 301], [417, 351], [351, 465], [465, 417], [251, 301], [301, 389], [389, 251], [394, 395], [395, 379], [379, 394], [399, 412], [412, 419], [419, 399], [410, 436], [436, 322], [322, 410], [326, 2], [2, 393], [393, 326], [354, 370], [370, 461], [461, 354], [393, 164], [164, 267], [267, 393], [268, 302], [302, 12], [12, 268], [312, 268], [268, 13], [13, 312], [298, 293], [293, 301], [301, 298], [265, 446], [446, 340], [340, 265], [280, 330], [330, 425], [425, 280], [322, 426], [426, 391], [391, 322], [420, 429], [429, 437], [437, 420], [393, 391], [391, 326], [326, 393], [344, 440], [440, 438], [438, 344], [458, 459], [459, 461], [461, 458], [364, 434], [434, 394], [394, 364], [428, 396], [396, 262], [262, 428], [274, 354], [354, 457], [457, 274], [317, 316], [316, 402], [402, 317], [316, 315], [315, 403], [403, 316], [315, 314], [314, 404], [404, 315], [314, 313], [313, 405], [405, 314], [313, 421], [421, 406], [406, 313], [323, 366], [366, 361], [361, 323], [292, 306], [306, 407], [407, 292], [306, 291], [291, 408], [408, 306], [291, 287], [287, 409], [409, 291], [287, 432], [432, 410], [410, 287], [427, 434], [434, 411], [411, 427], [372, 264], [264, 383], [383, 372], [459, 309], [309, 457], [457, 459], [366, 352], [352, 401], [401, 366], [1, 274], [274, 4], [4, 1], [418, 421], [421, 262], [262, 418], [331, 294], [294, 358], [358, 331], [435, 433], [433, 367], [367, 435], [392, 289], [289, 439], [439, 392], [328, 462], [462, 326], [326, 328], [94, 2], [2, 370], [370, 94], [289, 305], [305, 455], [455, 289], [339, 254], [254, 448], [448, 339], [359, 255], [255, 446], [446, 359], [254, 253], [253, 449], [449, 254], [253, 252], [252, 450], [450, 253], [252, 256], [256, 451], [451, 252], [256, 341], [341, 452], [452, 256], [414, 413], [413, 463], [463, 414], [286, 441], [441, 414], [414, 286], [286, 258], [258, 441], [441, 286], [258, 257], [257, 442], [442, 258], [257, 259], [259, 443], [443, 257], [259, 260], [260, 444], [444, 259], [260, 467], [467, 445], [445, 260], [309, 459], [459, 250], [250, 309], [305, 289], [289, 290], [290, 305], [305, 290], [290, 460], [460, 305], [401, 376], [376, 435], [435, 401], [309, 250], [250, 392], [392, 309], [376, 411], [411, 433], [433, 376], [453, 341], [341, 464], [464, 453], [357, 453], [453, 465], [465, 357], [343, 357], [357, 412], [412, 343], [437, 343], [343, 399], [399, 437], [344, 360], [360, 440], [440, 344], [420, 437], [437, 456], [456, 420], [360, 420], [420, 363], [363, 360], [361, 401], [401, 288], [288, 361], [265, 372], [372, 353], [353, 265], [390, 339], [339, 249], [249, 390], [339, 448], [448, 255], [255, 339]);
3836
+ function uh(t$1) {
3837
+ t$1.j = {
3838
+ faceLandmarks: [],
3839
+ faceBlendshapes: [],
3840
+ facialTransformationMatrixes: []
3841
+ };
3842
+ }
3843
+ var lh = class extends Za {
3844
+ constructor(t$1, e$1) {
3845
+ super(new za(t$1, e$1), "image_in", "norm_rect", !1), this.j = {
3846
+ faceLandmarks: [],
3847
+ faceBlendshapes: [],
3848
+ facialTransformationMatrixes: []
3849
+ }, this.outputFacialTransformationMatrixes = this.outputFaceBlendshapes = !1, yn(t$1 = this.h = new Ds(), 0, 1, e$1 = new xs()), this.v = new Us(), yn(this.h, 0, 3, this.v), this.s = new Fs(), yn(this.h, 0, 2, this.s), xn(this.s, 4, 1), Ln(this.s, 2, .5), Ln(this.v, 2, .5), Ln(this.h, 4, .5);
3850
+ }
3851
+ get baseOptions() {
3852
+ return pn(this.h, xs, 1);
3853
+ }
3854
+ set baseOptions(t$1) {
3855
+ yn(this.h, 0, 1, t$1);
3856
+ }
3857
+ o(t$1) {
3858
+ return "numFaces" in t$1 && xn(this.s, 4, t$1.numFaces ?? 1), "minFaceDetectionConfidence" in t$1 && Ln(this.s, 2, t$1.minFaceDetectionConfidence ?? .5), "minTrackingConfidence" in t$1 && Ln(this.h, 4, t$1.minTrackingConfidence ?? .5), "minFacePresenceConfidence" in t$1 && Ln(this.v, 2, t$1.minFacePresenceConfidence ?? .5), "outputFaceBlendshapes" in t$1 && (this.outputFaceBlendshapes = !!t$1.outputFaceBlendshapes), "outputFacialTransformationMatrixes" in t$1 && (this.outputFacialTransformationMatrixes = !!t$1.outputFacialTransformationMatrixes), this.l(t$1);
3859
+ }
3860
+ D(t$1, e$1) {
3861
+ return uh(this), $a(this, t$1, e$1), this.j;
3862
+ }
3863
+ F(t$1, e$1, n$1) {
3864
+ return uh(this), qa(this, t$1, n$1, e$1), this.j;
3865
+ }
3866
+ m() {
3867
+ var t$1 = new $i();
3868
+ Ki(t$1, "image_in"), Ki(t$1, "norm_rect"), Yi(t$1, "face_landmarks");
3869
+ const e$1 = new Ci();
3870
+ er(e$1, js, this.h);
3871
+ const n$1 = new Vi();
3872
+ Bi(n$1, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "NORM_RECT:norm_rect"), ji(n$1, "NORM_LANDMARKS:face_landmarks"), n$1.o(e$1), zi(t$1, n$1), this.g.attachProtoVectorListener("face_landmarks", ((t$2, e$2) => {
3873
+ for (const e$3 of t$2) t$2 = cs(e$3), this.j.faceLandmarks.push(Ro(t$2));
3874
+ $o(this, e$2);
3875
+ })), this.g.attachEmptyPacketListener("face_landmarks", ((t$2) => {
3876
+ $o(this, t$2);
3877
+ })), this.outputFaceBlendshapes && (Yi(t$1, "blendshapes"), ji(n$1, "BLENDSHAPES:blendshapes"), this.g.attachProtoVectorListener("blendshapes", ((t$2, e$2) => {
3878
+ if (this.outputFaceBlendshapes) for (const e$3 of t$2) t$2 = es(e$3), this.j.faceBlendshapes.push(xo(t$2.g() ?? []));
3879
+ $o(this, e$2);
3880
+ })), this.g.attachEmptyPacketListener("blendshapes", ((t$2) => {
3881
+ $o(this, t$2);
3882
+ }))), this.outputFacialTransformationMatrixes && (Yi(t$1, "face_geometry"), ji(n$1, "FACE_GEOMETRY:face_geometry"), this.g.attachProtoVectorListener("face_geometry", ((t$2, e$2) => {
3883
+ if (this.outputFacialTransformationMatrixes) for (const e$3 of t$2) (t$2 = pn(Cs(e$3), us, 2)) && this.j.facialTransformationMatrixes.push({
3884
+ rows: Tn(An(t$2, 1), 0) ?? 0,
3885
+ columns: Tn(An(t$2, 2), 0) ?? 0,
3886
+ data: en(t$2, 3, Ht, tn()).slice() ?? []
3887
+ });
3888
+ $o(this, e$2);
3889
+ })), this.g.attachEmptyPacketListener("face_geometry", ((t$2) => {
3890
+ $o(this, t$2);
3891
+ }))), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
3892
+ }
3893
+ };
3894
+ lh.prototype.detectForVideo = lh.prototype.F, lh.prototype.detect = lh.prototype.D, lh.prototype.setOptions = lh.prototype.o, lh.createFromModelPath = function(t$1, e$1) {
3895
+ return Ka(lh, t$1, { baseOptions: { modelAssetPath: e$1 } });
3896
+ }, lh.createFromModelBuffer = function(t$1, e$1) {
3897
+ return Ka(lh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
3898
+ }, lh.createFromOptions = function(t$1, e$1) {
3899
+ return Ka(lh, t$1, e$1);
3900
+ }, lh.FACE_LANDMARKS_LIPS = th, lh.FACE_LANDMARKS_LEFT_EYE = eh, lh.FACE_LANDMARKS_LEFT_EYEBROW = nh, lh.FACE_LANDMARKS_LEFT_IRIS = rh, lh.FACE_LANDMARKS_RIGHT_EYE = ih, lh.FACE_LANDMARKS_RIGHT_EYEBROW = sh, lh.FACE_LANDMARKS_RIGHT_IRIS = oh, lh.FACE_LANDMARKS_FACE_OVAL = ah, lh.FACE_LANDMARKS_CONTOURS = hh, lh.FACE_LANDMARKS_TESSELATION = ch;
3901
+ var fh = class extends Za {
3902
+ constructor(t$1, e$1) {
3903
+ super(new za(t$1, e$1), "image_in", "norm_rect", !0), yn(t$1 = this.j = new Vs(), 0, 1, e$1 = new xs());
3904
+ }
3905
+ get baseOptions() {
3906
+ return pn(this.j, xs, 1);
3907
+ }
3908
+ set baseOptions(t$1) {
3909
+ yn(this.j, 0, 1, t$1);
3910
+ }
3911
+ o(t$1) {
3912
+ return super.l(t$1);
3913
+ }
3914
+ Ra(t$1, e$1, n$1) {
3915
+ const r$1 = "function" != typeof e$1 ? e$1 : {};
3916
+ if (this.h = "function" == typeof e$1 ? e$1 : n$1, $a(this, t$1, r$1 ?? {}), !this.h) return this.s;
3917
+ }
3918
+ m() {
3919
+ var t$1 = new $i();
3920
+ Ki(t$1, "image_in"), Ki(t$1, "norm_rect"), Yi(t$1, "stylized_image");
3921
+ const e$1 = new Ci();
3922
+ er(e$1, Xs, this.j);
3923
+ const n$1 = new Vi();
3924
+ Bi(n$1, "mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "NORM_RECT:norm_rect"), ji(n$1, "STYLIZED_IMAGE:stylized_image"), n$1.o(e$1), zi(t$1, n$1), this.g.W("stylized_image", ((t$2, e$2) => {
3925
+ var n$2 = !this.h, r$1 = t$2.data, i$1 = t$2.width;
3926
+ const s$1 = i$1 * (t$2 = t$2.height);
3927
+ if (r$1 instanceof Uint8Array) if (r$1.length === 3 * s$1) {
3928
+ const e$3 = new Uint8ClampedArray(4 * s$1);
3929
+ for (let t$3 = 0; t$3 < s$1; ++t$3) e$3[4 * t$3] = r$1[3 * t$3], e$3[4 * t$3 + 1] = r$1[3 * t$3 + 1], e$3[4 * t$3 + 2] = r$1[3 * t$3 + 2], e$3[4 * t$3 + 3] = 255;
3930
+ r$1 = new ImageData(e$3, i$1, t$2);
3931
+ } else {
3932
+ if (r$1.length !== 4 * s$1) throw Error("Unsupported channel count: " + r$1.length / s$1);
3933
+ r$1 = new ImageData(new Uint8ClampedArray(r$1.buffer, r$1.byteOffset, r$1.length), i$1, t$2);
3934
+ }
3935
+ else if (!(r$1 instanceof WebGLTexture)) throw Error(`Unsupported format: ${r$1.constructor.name}`);
3936
+ i$1 = new ja([r$1], !1, !1, this.g.i.canvas, this.R, i$1, t$2), this.s = n$2 = n$2 ? i$1.clone() : i$1, this.h && this.h(n$2), $o(this, e$2);
3937
+ })), this.g.attachEmptyPacketListener("stylized_image", ((t$2) => {
3938
+ this.s = null, this.h && this.h(null), $o(this, t$2);
3939
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
3940
+ }
3941
+ };
3942
+ fh.prototype.stylize = fh.prototype.Ra, fh.prototype.setOptions = fh.prototype.o, fh.createFromModelPath = function(t$1, e$1) {
3943
+ return Ka(fh, t$1, { baseOptions: { modelAssetPath: e$1 } });
3944
+ }, fh.createFromModelBuffer = function(t$1, e$1) {
3945
+ return Ka(fh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
3946
+ }, fh.createFromOptions = function(t$1, e$1) {
3947
+ return Ka(fh, t$1, e$1);
3948
+ };
3949
+ var dh = Xa([0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], [7, 8], [5, 9], [9, 10], [10, 11], [11, 12], [9, 13], [13, 14], [14, 15], [15, 16], [13, 17], [0, 17], [17, 18], [18, 19], [19, 20]);
3950
+ function ph(t$1) {
3951
+ t$1.gestures = [], t$1.landmarks = [], t$1.worldLandmarks = [], t$1.handedness = [];
3952
+ }
3953
+ function gh(t$1) {
3954
+ return 0 === t$1.gestures.length ? {
3955
+ gestures: [],
3956
+ landmarks: [],
3957
+ worldLandmarks: [],
3958
+ handedness: [],
3959
+ handednesses: []
3960
+ } : {
3961
+ gestures: t$1.gestures,
3962
+ landmarks: t$1.landmarks,
3963
+ worldLandmarks: t$1.worldLandmarks,
3964
+ handedness: t$1.handedness,
3965
+ handednesses: t$1.handedness
3966
+ };
3967
+ }
3968
+ function mh(t$1, e$1 = !0) {
3969
+ const n$1 = [];
3970
+ for (const i$1 of t$1) {
3971
+ var r$1 = es(i$1);
3972
+ t$1 = [];
3973
+ for (const n$2 of r$1.g()) r$1 = e$1 && null != An(n$2, 1) ? Tn(An(n$2, 1), 0) : -1, t$1.push({
3974
+ score: bn(n$2, 2) ?? 0,
3975
+ index: r$1,
3976
+ categoryName: kn(n$2, 3) ?? "",
3977
+ displayName: kn(n$2, 4) ?? ""
3978
+ });
3979
+ n$1.push(t$1);
3980
+ }
3981
+ return n$1;
3982
+ }
3983
+ var yh = class extends Za {
3984
+ constructor(t$1, e$1) {
3985
+ super(new za(t$1, e$1), "image_in", "norm_rect", !1), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], yn(t$1 = this.j = new Js(), 0, 1, e$1 = new xs()), this.s = new qs(), yn(this.j, 0, 2, this.s), this.C = new $s(), yn(this.s, 0, 3, this.C), this.v = new Ys(), yn(this.s, 0, 2, this.v), this.h = new Ks(), yn(this.j, 0, 3, this.h), Ln(this.v, 2, .5), Ln(this.s, 4, .5), Ln(this.C, 2, .5);
3986
+ }
3987
+ get baseOptions() {
3988
+ return pn(this.j, xs, 1);
3989
+ }
3990
+ set baseOptions(t$1) {
3991
+ yn(this.j, 0, 1, t$1);
3992
+ }
3993
+ o(t$1) {
3994
+ if (xn(this.v, 3, t$1.numHands ?? 1), "minHandDetectionConfidence" in t$1 && Ln(this.v, 2, t$1.minHandDetectionConfidence ?? .5), "minTrackingConfidence" in t$1 && Ln(this.s, 4, t$1.minTrackingConfidence ?? .5), "minHandPresenceConfidence" in t$1 && Ln(this.C, 2, t$1.minHandPresenceConfidence ?? .5), t$1.cannedGesturesClassifierOptions) {
3995
+ var e$1 = new Hs(), n$1 = e$1, r$1 = So(t$1.cannedGesturesClassifierOptions, pn(this.h, Hs, 3)?.h());
3996
+ yn(n$1, 0, 2, r$1), yn(this.h, 0, 3, e$1);
3997
+ } else void 0 === t$1.cannedGesturesClassifierOptions && pn(this.h, Hs, 3)?.g();
3998
+ return t$1.customGesturesClassifierOptions ? (yn(n$1 = e$1 = new Hs(), 0, 2, r$1 = So(t$1.customGesturesClassifierOptions, pn(this.h, Hs, 4)?.h())), yn(this.h, 0, 4, e$1)) : void 0 === t$1.customGesturesClassifierOptions && pn(this.h, Hs, 4)?.g(), this.l(t$1);
3999
+ }
4000
+ Ma(t$1, e$1) {
4001
+ return ph(this), $a(this, t$1, e$1), gh(this);
4002
+ }
4003
+ Na(t$1, e$1, n$1) {
4004
+ return ph(this), qa(this, t$1, n$1, e$1), gh(this);
4005
+ }
4006
+ m() {
4007
+ var t$1 = new $i();
4008
+ Ki(t$1, "image_in"), Ki(t$1, "norm_rect"), Yi(t$1, "hand_gestures"), Yi(t$1, "hand_landmarks"), Yi(t$1, "world_hand_landmarks"), Yi(t$1, "handedness");
4009
+ const e$1 = new Ci();
4010
+ er(e$1, io, this.j);
4011
+ const n$1 = new Vi();
4012
+ Bi(n$1, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "NORM_RECT:norm_rect"), ji(n$1, "HAND_GESTURES:hand_gestures"), ji(n$1, "LANDMARKS:hand_landmarks"), ji(n$1, "WORLD_LANDMARKS:world_hand_landmarks"), ji(n$1, "HANDEDNESS:handedness"), n$1.o(e$1), zi(t$1, n$1), this.g.attachProtoVectorListener("hand_landmarks", ((t$2, e$2) => {
4013
+ for (const e$3 of t$2) {
4014
+ t$2 = cs(e$3);
4015
+ const n$2 = [];
4016
+ for (const e$4 of mn(t$2, hs, 1)) n$2.push({
4017
+ x: bn(e$4, 1) ?? 0,
4018
+ y: bn(e$4, 2) ?? 0,
4019
+ z: bn(e$4, 3) ?? 0,
4020
+ visibility: bn(e$4, 4) ?? 0
4021
+ });
4022
+ this.landmarks.push(n$2);
4023
+ }
4024
+ $o(this, e$2);
4025
+ })), this.g.attachEmptyPacketListener("hand_landmarks", ((t$2) => {
4026
+ $o(this, t$2);
4027
+ })), this.g.attachProtoVectorListener("world_hand_landmarks", ((t$2, e$2) => {
4028
+ for (const e$3 of t$2) {
4029
+ t$2 = as(e$3);
4030
+ const n$2 = [];
4031
+ for (const e$4 of mn(t$2, os, 1)) n$2.push({
4032
+ x: bn(e$4, 1) ?? 0,
4033
+ y: bn(e$4, 2) ?? 0,
4034
+ z: bn(e$4, 3) ?? 0,
4035
+ visibility: bn(e$4, 4) ?? 0
4036
+ });
4037
+ this.worldLandmarks.push(n$2);
4038
+ }
4039
+ $o(this, e$2);
4040
+ })), this.g.attachEmptyPacketListener("world_hand_landmarks", ((t$2) => {
4041
+ $o(this, t$2);
4042
+ })), this.g.attachProtoVectorListener("hand_gestures", ((t$2, e$2) => {
4043
+ this.gestures.push(...mh(t$2, !1)), $o(this, e$2);
4044
+ })), this.g.attachEmptyPacketListener("hand_gestures", ((t$2) => {
4045
+ $o(this, t$2);
4046
+ })), this.g.attachProtoVectorListener("handedness", ((t$2, e$2) => {
4047
+ this.handedness.push(...mh(t$2)), $o(this, e$2);
4048
+ })), this.g.attachEmptyPacketListener("handedness", ((t$2) => {
4049
+ $o(this, t$2);
4050
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4051
+ }
4052
+ };
4053
+ function _h(t$1) {
4054
+ return {
4055
+ landmarks: t$1.landmarks,
4056
+ worldLandmarks: t$1.worldLandmarks,
4057
+ handednesses: t$1.handedness,
4058
+ handedness: t$1.handedness
4059
+ };
4060
+ }
4061
+ yh.prototype.recognizeForVideo = yh.prototype.Na, yh.prototype.recognize = yh.prototype.Ma, yh.prototype.setOptions = yh.prototype.o, yh.createFromModelPath = function(t$1, e$1) {
4062
+ return Ka(yh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4063
+ }, yh.createFromModelBuffer = function(t$1, e$1) {
4064
+ return Ka(yh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4065
+ }, yh.createFromOptions = function(t$1, e$1) {
4066
+ return Ka(yh, t$1, e$1);
4067
+ }, yh.HAND_CONNECTIONS = dh;
4068
+ var vh = class extends Za {
4069
+ constructor(t$1, e$1) {
4070
+ super(new za(t$1, e$1), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.handedness = [], yn(t$1 = this.h = new qs(), 0, 1, e$1 = new xs()), this.s = new $s(), yn(this.h, 0, 3, this.s), this.j = new Ys(), yn(this.h, 0, 2, this.j), xn(this.j, 3, 1), Ln(this.j, 2, .5), Ln(this.s, 2, .5), Ln(this.h, 4, .5);
4071
+ }
4072
+ get baseOptions() {
4073
+ return pn(this.h, xs, 1);
4074
+ }
4075
+ set baseOptions(t$1) {
4076
+ yn(this.h, 0, 1, t$1);
4077
+ }
4078
+ o(t$1) {
4079
+ return "numHands" in t$1 && xn(this.j, 3, t$1.numHands ?? 1), "minHandDetectionConfidence" in t$1 && Ln(this.j, 2, t$1.minHandDetectionConfidence ?? .5), "minTrackingConfidence" in t$1 && Ln(this.h, 4, t$1.minTrackingConfidence ?? .5), "minHandPresenceConfidence" in t$1 && Ln(this.s, 2, t$1.minHandPresenceConfidence ?? .5), this.l(t$1);
4080
+ }
4081
+ D(t$1, e$1) {
4082
+ return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], $a(this, t$1, e$1), _h(this);
4083
+ }
4084
+ F(t$1, e$1, n$1) {
4085
+ return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], qa(this, t$1, n$1, e$1), _h(this);
4086
+ }
4087
+ m() {
4088
+ var t$1 = new $i();
4089
+ Ki(t$1, "image_in"), Ki(t$1, "norm_rect"), Yi(t$1, "hand_landmarks"), Yi(t$1, "world_hand_landmarks"), Yi(t$1, "handedness");
4090
+ const e$1 = new Ci();
4091
+ er(e$1, ro, this.h);
4092
+ const n$1 = new Vi();
4093
+ Bi(n$1, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "NORM_RECT:norm_rect"), ji(n$1, "LANDMARKS:hand_landmarks"), ji(n$1, "WORLD_LANDMARKS:world_hand_landmarks"), ji(n$1, "HANDEDNESS:handedness"), n$1.o(e$1), zi(t$1, n$1), this.g.attachProtoVectorListener("hand_landmarks", ((t$2, e$2) => {
4094
+ for (const e$3 of t$2) t$2 = cs(e$3), this.landmarks.push(Ro(t$2));
4095
+ $o(this, e$2);
4096
+ })), this.g.attachEmptyPacketListener("hand_landmarks", ((t$2) => {
4097
+ $o(this, t$2);
4098
+ })), this.g.attachProtoVectorListener("world_hand_landmarks", ((t$2, e$2) => {
4099
+ for (const e$3 of t$2) t$2 = as(e$3), this.worldLandmarks.push(Fo(t$2));
4100
+ $o(this, e$2);
4101
+ })), this.g.attachEmptyPacketListener("world_hand_landmarks", ((t$2) => {
4102
+ $o(this, t$2);
4103
+ })), this.g.attachProtoVectorListener("handedness", ((t$2, e$2) => {
4104
+ var n$2 = this.handedness, r$1 = n$2.push;
4105
+ const i$1 = [];
4106
+ for (const e$3 of t$2) {
4107
+ t$2 = es(e$3);
4108
+ const n$3 = [];
4109
+ for (const e$4 of t$2.g()) n$3.push({
4110
+ score: bn(e$4, 2) ?? 0,
4111
+ index: Tn(An(e$4, 1), 0) ?? -1,
4112
+ categoryName: kn(e$4, 3) ?? "",
4113
+ displayName: kn(e$4, 4) ?? ""
4114
+ });
4115
+ i$1.push(n$3);
4116
+ }
4117
+ r$1.call(n$2, ...i$1), $o(this, e$2);
4118
+ })), this.g.attachEmptyPacketListener("handedness", ((t$2) => {
4119
+ $o(this, t$2);
4120
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4121
+ }
4122
+ };
4123
+ vh.prototype.detectForVideo = vh.prototype.F, vh.prototype.detect = vh.prototype.D, vh.prototype.setOptions = vh.prototype.o, vh.createFromModelPath = function(t$1, e$1) {
4124
+ return Ka(vh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4125
+ }, vh.createFromModelBuffer = function(t$1, e$1) {
4126
+ return Ka(vh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4127
+ }, vh.createFromOptions = function(t$1, e$1) {
4128
+ return Ka(vh, t$1, e$1);
4129
+ }, vh.HAND_CONNECTIONS = dh;
4130
+ var Eh = Xa([0, 1], [1, 2], [2, 3], [3, 7], [0, 4], [4, 5], [5, 6], [6, 8], [9, 10], [11, 12], [11, 13], [13, 15], [15, 17], [15, 19], [15, 21], [17, 19], [12, 14], [14, 16], [16, 18], [16, 20], [16, 22], [18, 20], [11, 23], [12, 24], [23, 24], [23, 25], [24, 26], [25, 27], [26, 28], [27, 29], [28, 30], [29, 31], [30, 32], [27, 31], [28, 32]);
4131
+ function wh(t$1) {
4132
+ t$1.h = {
4133
+ faceLandmarks: [],
4134
+ faceBlendshapes: [],
4135
+ poseLandmarks: [],
4136
+ poseWorldLandmarks: [],
4137
+ poseSegmentationMasks: [],
4138
+ leftHandLandmarks: [],
4139
+ leftHandWorldLandmarks: [],
4140
+ rightHandLandmarks: [],
4141
+ rightHandWorldLandmarks: []
4142
+ };
4143
+ }
4144
+ function Th(t$1) {
4145
+ try {
4146
+ if (!t$1.C) return t$1.h;
4147
+ t$1.C(t$1.h);
4148
+ } finally {
4149
+ Zo(t$1);
4150
+ }
4151
+ }
4152
+ function Ah(t$1, e$1) {
4153
+ t$1 = cs(t$1), e$1.push(Ro(t$1));
4154
+ }
4155
+ var bh = class extends Za {
4156
+ constructor(t$1, e$1) {
4157
+ super(new za(t$1, e$1), "input_frames_image", null, !1), this.h = {
4158
+ faceLandmarks: [],
4159
+ faceBlendshapes: [],
4160
+ poseLandmarks: [],
4161
+ poseWorldLandmarks: [],
4162
+ poseSegmentationMasks: [],
4163
+ leftHandLandmarks: [],
4164
+ leftHandWorldLandmarks: [],
4165
+ rightHandLandmarks: [],
4166
+ rightHandWorldLandmarks: []
4167
+ }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = !1, yn(t$1 = this.j = new ho(), 0, 1, e$1 = new xs()), this.K = new $s(), yn(this.j, 0, 2, this.K), this.ca = new so(), yn(this.j, 0, 3, this.ca), this.s = new Fs(), yn(this.j, 0, 4, this.s), this.I = new Us(), yn(this.j, 0, 5, this.I), this.v = new oo(), yn(this.j, 0, 6, this.v), this.L = new ao(), yn(this.j, 0, 7, this.L), Ln(this.s, 2, .5), Ln(this.s, 3, .3), Ln(this.I, 2, .5), Ln(this.v, 2, .5), Ln(this.v, 3, .3), Ln(this.L, 2, .5), Ln(this.K, 2, .5);
4168
+ }
4169
+ get baseOptions() {
4170
+ return pn(this.j, xs, 1);
4171
+ }
4172
+ set baseOptions(t$1) {
4173
+ yn(this.j, 0, 1, t$1);
4174
+ }
4175
+ o(t$1) {
4176
+ return "minFaceDetectionConfidence" in t$1 && Ln(this.s, 2, t$1.minFaceDetectionConfidence ?? .5), "minFaceSuppressionThreshold" in t$1 && Ln(this.s, 3, t$1.minFaceSuppressionThreshold ?? .3), "minFacePresenceConfidence" in t$1 && Ln(this.I, 2, t$1.minFacePresenceConfidence ?? .5), "outputFaceBlendshapes" in t$1 && (this.outputFaceBlendshapes = !!t$1.outputFaceBlendshapes), "minPoseDetectionConfidence" in t$1 && Ln(this.v, 2, t$1.minPoseDetectionConfidence ?? .5), "minPoseSuppressionThreshold" in t$1 && Ln(this.v, 3, t$1.minPoseSuppressionThreshold ?? .3), "minPosePresenceConfidence" in t$1 && Ln(this.L, 2, t$1.minPosePresenceConfidence ?? .5), "outputPoseSegmentationMasks" in t$1 && (this.outputPoseSegmentationMasks = !!t$1.outputPoseSegmentationMasks), "minHandLandmarksConfidence" in t$1 && Ln(this.K, 2, t$1.minHandLandmarksConfidence ?? .5), this.l(t$1);
4177
+ }
4178
+ D(t$1, e$1, n$1) {
4179
+ const r$1 = "function" != typeof e$1 ? e$1 : {};
4180
+ return this.C = "function" == typeof e$1 ? e$1 : n$1, wh(this), $a(this, t$1, r$1), Th(this);
4181
+ }
4182
+ F(t$1, e$1, n$1, r$1) {
4183
+ const i$1 = "function" != typeof n$1 ? n$1 : {};
4184
+ return this.C = "function" == typeof n$1 ? n$1 : r$1, wh(this), qa(this, t$1, i$1, e$1), Th(this);
4185
+ }
4186
+ m() {
4187
+ var t$1 = new $i();
4188
+ Ki(t$1, "input_frames_image"), Yi(t$1, "pose_landmarks"), Yi(t$1, "pose_world_landmarks"), Yi(t$1, "face_landmarks"), Yi(t$1, "left_hand_landmarks"), Yi(t$1, "left_hand_world_landmarks"), Yi(t$1, "right_hand_landmarks"), Yi(t$1, "right_hand_world_landmarks");
4189
+ const e$1 = new Ci(), n$1 = new ki();
4190
+ an(n$1, 1, ne("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), ""), function(t$2, e$2) {
4191
+ if (null != e$2) if (Array.isArray(e$2)) $e(t$2, 2, De(e$2, Ge, void 0, void 0, !1));
4192
+ else {
4193
+ if (!("string" == typeof e$2 || e$2 instanceof D || I(e$2))) throw Error("invalid value in Any.value field: " + e$2 + " expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");
4194
+ an(t$2, 2, lt(e$2, !1, !1), N());
4195
+ }
4196
+ }(n$1, this.j.g());
4197
+ const r$1 = new Vi();
4198
+ Bi(r$1, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), wn(r$1, 8, ki, n$1), Gi(r$1, "IMAGE:input_frames_image"), ji(r$1, "POSE_LANDMARKS:pose_landmarks"), ji(r$1, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), ji(r$1, "FACE_LANDMARKS:face_landmarks"), ji(r$1, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), ji(r$1, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), ji(r$1, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), ji(r$1, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), r$1.o(e$1), zi(t$1, r$1), qo(this, t$1), this.g.attachProtoListener("pose_landmarks", ((t$2, e$2) => {
4199
+ Ah(t$2, this.h.poseLandmarks), $o(this, e$2);
4200
+ })), this.g.attachEmptyPacketListener("pose_landmarks", ((t$2) => {
4201
+ $o(this, t$2);
4202
+ })), this.g.attachProtoListener("pose_world_landmarks", ((t$2, e$2) => {
4203
+ var n$2 = this.h.poseWorldLandmarks;
4204
+ t$2 = as(t$2), n$2.push(Fo(t$2)), $o(this, e$2);
4205
+ })), this.g.attachEmptyPacketListener("pose_world_landmarks", ((t$2) => {
4206
+ $o(this, t$2);
4207
+ })), this.outputPoseSegmentationMasks && (ji(r$1, "POSE_SEGMENTATION_MASK:pose_segmentation_mask"), Jo(this, "pose_segmentation_mask"), this.g.W("pose_segmentation_mask", ((t$2, e$2) => {
4208
+ this.h.poseSegmentationMasks = [Ja(this, t$2, !0, !this.C)], $o(this, e$2);
4209
+ })), this.g.attachEmptyPacketListener("pose_segmentation_mask", ((t$2) => {
4210
+ this.h.poseSegmentationMasks = [], $o(this, t$2);
4211
+ }))), this.g.attachProtoListener("face_landmarks", ((t$2, e$2) => {
4212
+ Ah(t$2, this.h.faceLandmarks), $o(this, e$2);
4213
+ })), this.g.attachEmptyPacketListener("face_landmarks", ((t$2) => {
4214
+ $o(this, t$2);
4215
+ })), this.outputFaceBlendshapes && (Yi(t$1, "extra_blendshapes"), ji(r$1, "FACE_BLENDSHAPES:extra_blendshapes"), this.g.attachProtoListener("extra_blendshapes", ((t$2, e$2) => {
4216
+ var n$2 = this.h.faceBlendshapes;
4217
+ this.outputFaceBlendshapes && (t$2 = es(t$2), n$2.push(xo(t$2.g() ?? []))), $o(this, e$2);
4218
+ })), this.g.attachEmptyPacketListener("extra_blendshapes", ((t$2) => {
4219
+ $o(this, t$2);
4220
+ }))), this.g.attachProtoListener("left_hand_landmarks", ((t$2, e$2) => {
4221
+ Ah(t$2, this.h.leftHandLandmarks), $o(this, e$2);
4222
+ })), this.g.attachEmptyPacketListener("left_hand_landmarks", ((t$2) => {
4223
+ $o(this, t$2);
4224
+ })), this.g.attachProtoListener("left_hand_world_landmarks", ((t$2, e$2) => {
4225
+ var n$2 = this.h.leftHandWorldLandmarks;
4226
+ t$2 = as(t$2), n$2.push(Fo(t$2)), $o(this, e$2);
4227
+ })), this.g.attachEmptyPacketListener("left_hand_world_landmarks", ((t$2) => {
4228
+ $o(this, t$2);
4229
+ })), this.g.attachProtoListener("right_hand_landmarks", ((t$2, e$2) => {
4230
+ Ah(t$2, this.h.rightHandLandmarks), $o(this, e$2);
4231
+ })), this.g.attachEmptyPacketListener("right_hand_landmarks", ((t$2) => {
4232
+ $o(this, t$2);
4233
+ })), this.g.attachProtoListener("right_hand_world_landmarks", ((t$2, e$2) => {
4234
+ var n$2 = this.h.rightHandWorldLandmarks;
4235
+ t$2 = as(t$2), n$2.push(Fo(t$2)), $o(this, e$2);
4236
+ })), this.g.attachEmptyPacketListener("right_hand_world_landmarks", ((t$2) => {
4237
+ $o(this, t$2);
4238
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4239
+ }
4240
+ };
4241
+ bh.prototype.detectForVideo = bh.prototype.F, bh.prototype.detect = bh.prototype.D, bh.prototype.setOptions = bh.prototype.o, bh.createFromModelPath = function(t$1, e$1) {
4242
+ return Ka(bh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4243
+ }, bh.createFromModelBuffer = function(t$1, e$1) {
4244
+ return Ka(bh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4245
+ }, bh.createFromOptions = function(t$1, e$1) {
4246
+ return Ka(bh, t$1, e$1);
4247
+ }, bh.HAND_CONNECTIONS = dh, bh.POSE_CONNECTIONS = Eh, bh.FACE_LANDMARKS_LIPS = th, bh.FACE_LANDMARKS_LEFT_EYE = eh, bh.FACE_LANDMARKS_LEFT_EYEBROW = nh, bh.FACE_LANDMARKS_LEFT_IRIS = rh, bh.FACE_LANDMARKS_RIGHT_EYE = ih, bh.FACE_LANDMARKS_RIGHT_EYEBROW = sh, bh.FACE_LANDMARKS_RIGHT_IRIS = oh, bh.FACE_LANDMARKS_FACE_OVAL = ah, bh.FACE_LANDMARKS_CONTOURS = hh, bh.FACE_LANDMARKS_TESSELATION = ch;
4248
+ var kh = class extends Za {
4249
+ constructor(t$1, e$1) {
4250
+ super(new za(t$1, e$1), "input_image", "norm_rect", !0), this.j = { classifications: [] }, yn(t$1 = this.h = new lo(), 0, 1, e$1 = new xs());
4251
+ }
4252
+ get baseOptions() {
4253
+ return pn(this.h, xs, 1);
4254
+ }
4255
+ set baseOptions(t$1) {
4256
+ yn(this.h, 0, 1, t$1);
4257
+ }
4258
+ o(t$1) {
4259
+ return yn(this.h, 0, 2, So(t$1, pn(this.h, Es, 2))), this.l(t$1);
4260
+ }
4261
+ wa(t$1, e$1) {
4262
+ return this.j = { classifications: [] }, $a(this, t$1, e$1), this.j;
4263
+ }
4264
+ xa(t$1, e$1, n$1) {
4265
+ return this.j = { classifications: [] }, qa(this, t$1, n$1, e$1), this.j;
4266
+ }
4267
+ m() {
4268
+ var t$1 = new $i();
4269
+ Ki(t$1, "input_image"), Ki(t$1, "norm_rect"), Yi(t$1, "classifications");
4270
+ const e$1 = new Ci();
4271
+ er(e$1, fo, this.h);
4272
+ const n$1 = new Vi();
4273
+ Bi(n$1, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), Gi(n$1, "IMAGE:input_image"), Gi(n$1, "NORM_RECT:norm_rect"), ji(n$1, "CLASSIFICATIONS:classifications"), n$1.o(e$1), zi(t$1, n$1), this.g.attachProtoListener("classifications", ((t$2, e$2) => {
4274
+ this.j = function(t$3) {
4275
+ const e$3 = { classifications: mn(t$3, ds, 1).map(((t$4) => xo(pn(t$4, Qi, 4)?.g() ?? [], Tn(An(t$4, 2), 0), kn(t$4, 3)))) };
4276
+ return null != Qt(ze(t$3, 2)) && (e$3.timestampMs = Tn(Qt(ze(t$3, 2)), 0)), e$3;
4277
+ }(ps(t$2)), $o(this, e$2);
4278
+ })), this.g.attachEmptyPacketListener("classifications", ((t$2) => {
4279
+ $o(this, t$2);
4280
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4281
+ }
4282
+ };
4283
+ kh.prototype.classifyForVideo = kh.prototype.xa, kh.prototype.classify = kh.prototype.wa, kh.prototype.setOptions = kh.prototype.o, kh.createFromModelPath = function(t$1, e$1) {
4284
+ return Ka(kh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4285
+ }, kh.createFromModelBuffer = function(t$1, e$1) {
4286
+ return Ka(kh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4287
+ }, kh.createFromOptions = function(t$1, e$1) {
4288
+ return Ka(kh, t$1, e$1);
4289
+ };
4290
+ var Sh = class extends Za {
4291
+ constructor(t$1, e$1) {
4292
+ super(new za(t$1, e$1), "image_in", "norm_rect", !0), this.h = new po(), this.embeddings = { embeddings: [] }, yn(t$1 = this.h, 0, 1, e$1 = new xs());
4293
+ }
4294
+ get baseOptions() {
4295
+ return pn(this.h, xs, 1);
4296
+ }
4297
+ set baseOptions(t$1) {
4298
+ yn(this.h, 0, 1, t$1);
4299
+ }
4300
+ o(t$1) {
4301
+ var e$1 = this.h, n$1 = pn(this.h, Ts, 2);
4302
+ return n$1 = n$1 ? n$1.clone() : new Ts(), void 0 !== t$1.l2Normalize ? Sn(n$1, 1, t$1.l2Normalize) : "l2Normalize" in t$1 && $e(n$1, 1), void 0 !== t$1.quantize ? Sn(n$1, 2, t$1.quantize) : "quantize" in t$1 && $e(n$1, 2), yn(e$1, 0, 2, n$1), this.l(t$1);
4303
+ }
4304
+ Da(t$1, e$1) {
4305
+ return $a(this, t$1, e$1), this.embeddings;
4306
+ }
4307
+ Ea(t$1, e$1, n$1) {
4308
+ return qa(this, t$1, n$1, e$1), this.embeddings;
4309
+ }
4310
+ m() {
4311
+ var t$1 = new $i();
4312
+ Ki(t$1, "image_in"), Ki(t$1, "norm_rect"), Yi(t$1, "embeddings_out");
4313
+ const e$1 = new Ci();
4314
+ er(e$1, go, this.h);
4315
+ const n$1 = new Vi();
4316
+ Bi(n$1, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "NORM_RECT:norm_rect"), ji(n$1, "EMBEDDINGS:embeddings_out"), n$1.o(e$1), zi(t$1, n$1), this.g.attachProtoListener("embeddings_out", ((t$2, e$2) => {
4317
+ t$2 = vs(t$2), this.embeddings = function(t$3) {
4318
+ return {
4319
+ embeddings: mn(t$3, ys, 1).map(((t$4) => {
4320
+ const e$3 = {
4321
+ headIndex: Tn(An(t$4, 3), 0) ?? -1,
4322
+ headName: kn(t$4, 4) ?? ""
4323
+ };
4324
+ if (void 0 !== dn(t$4, gs, hn(t$4, 1))) t$4 = en(t$4 = pn(t$4, gs, hn(t$4, 1)), 1, Ht, tn()), e$3.floatEmbedding = t$4.slice();
4325
+ else {
4326
+ const n$2 = new Uint8Array(0);
4327
+ e$3.quantizedEmbedding = pn(t$4, ms, hn(t$4, 2))?.ra()?.ua() ?? n$2;
4328
+ }
4329
+ return e$3;
4330
+ })),
4331
+ timestampMs: Tn(Qt(ze(t$3, 2)), 0)
4332
+ };
4333
+ }(t$2), $o(this, e$2);
4334
+ })), this.g.attachEmptyPacketListener("embeddings_out", ((t$2) => {
4335
+ $o(this, t$2);
4336
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4337
+ }
4338
+ };
4339
+ Sh.cosineSimilarity = function(t$1, e$1) {
4340
+ if (t$1.floatEmbedding && e$1.floatEmbedding) t$1 = Io(t$1.floatEmbedding, e$1.floatEmbedding);
4341
+ else {
4342
+ if (!t$1.quantizedEmbedding || !e$1.quantizedEmbedding) throw Error("Cannot compute cosine similarity between quantized and float embeddings.");
4343
+ t$1 = Io(Mo(t$1.quantizedEmbedding), Mo(e$1.quantizedEmbedding));
4344
+ }
4345
+ return t$1;
4346
+ }, Sh.prototype.embedForVideo = Sh.prototype.Ea, Sh.prototype.embed = Sh.prototype.Da, Sh.prototype.setOptions = Sh.prototype.o, Sh.createFromModelPath = function(t$1, e$1) {
4347
+ return Ka(Sh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4348
+ }, Sh.createFromModelBuffer = function(t$1, e$1) {
4349
+ return Ka(Sh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4350
+ }, Sh.createFromOptions = function(t$1, e$1) {
4351
+ return Ka(Sh, t$1, e$1);
4352
+ };
4353
+ var xh = class {
4354
+ constructor(t$1, e$1, n$1) {
4355
+ this.confidenceMasks = t$1, this.categoryMask = e$1, this.qualityScores = n$1;
4356
+ }
4357
+ close() {
4358
+ this.confidenceMasks?.forEach(((t$1) => {
4359
+ t$1.close();
4360
+ })), this.categoryMask?.close();
4361
+ }
4362
+ };
4363
+ function Lh(t$1) {
4364
+ t$1.categoryMask = void 0, t$1.confidenceMasks = void 0, t$1.qualityScores = void 0;
4365
+ }
4366
+ function Rh(t$1) {
4367
+ try {
4368
+ const e$1 = new xh(t$1.confidenceMasks, t$1.categoryMask, t$1.qualityScores);
4369
+ if (!t$1.j) return e$1;
4370
+ t$1.j(e$1);
4371
+ } finally {
4372
+ Zo(t$1);
4373
+ }
4374
+ }
4375
+ xh.prototype.close = xh.prototype.close;
4376
+ var Fh = class extends Za {
4377
+ constructor(t$1, e$1) {
4378
+ super(new za(t$1, e$1), "image_in", "norm_rect", !1), this.s = [], this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Eo(), this.v = new mo(), yn(this.h, 0, 3, this.v), yn(t$1 = this.h, 0, 1, e$1 = new xs());
4379
+ }
4380
+ get baseOptions() {
4381
+ return pn(this.h, xs, 1);
4382
+ }
4383
+ set baseOptions(t$1) {
4384
+ yn(this.h, 0, 1, t$1);
4385
+ }
4386
+ o(t$1) {
4387
+ return void 0 !== t$1.displayNamesLocale ? $e(this.h, 2, ne(t$1.displayNamesLocale)) : "displayNamesLocale" in t$1 && $e(this.h, 2), "outputCategoryMask" in t$1 && (this.outputCategoryMask = t$1.outputCategoryMask ?? !1), "outputConfidenceMasks" in t$1 && (this.outputConfidenceMasks = t$1.outputConfidenceMasks ?? !0), super.l(t$1);
4388
+ }
4389
+ J() {
4390
+ (function(t$1) {
4391
+ const e$1 = mn(t$1.ga(), Vi, 1).filter(((t$2) => kn(t$2, 1).includes("mediapipe.tasks.TensorsToSegmentationCalculator")));
4392
+ if (t$1.s = [], e$1.length > 1) throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");
4393
+ 1 === e$1.length && (pn(e$1[0], Ci, 7)?.l()?.g() ?? /* @__PURE__ */ new Map()).forEach(((e$2, n$1) => {
4394
+ t$1.s[Number(n$1)] = kn(e$2, 1);
4395
+ }));
4396
+ })(this);
4397
+ }
4398
+ ha(t$1, e$1, n$1) {
4399
+ const r$1 = "function" != typeof e$1 ? e$1 : {};
4400
+ return this.j = "function" == typeof e$1 ? e$1 : n$1, Lh(this), $a(this, t$1, r$1), Rh(this);
4401
+ }
4402
+ Pa(t$1, e$1, n$1, r$1) {
4403
+ const i$1 = "function" != typeof n$1 ? n$1 : {};
4404
+ return this.j = "function" == typeof n$1 ? n$1 : r$1, Lh(this), qa(this, t$1, i$1, e$1), Rh(this);
4405
+ }
4406
+ Ha() {
4407
+ return this.s;
4408
+ }
4409
+ m() {
4410
+ var t$1 = new $i();
4411
+ Ki(t$1, "image_in"), Ki(t$1, "norm_rect");
4412
+ const e$1 = new Ci();
4413
+ er(e$1, wo, this.h);
4414
+ const n$1 = new Vi();
4415
+ Bi(n$1, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "NORM_RECT:norm_rect"), n$1.o(e$1), zi(t$1, n$1), qo(this, t$1), this.outputConfidenceMasks && (Yi(t$1, "confidence_masks"), ji(n$1, "CONFIDENCE_MASKS:confidence_masks"), Jo(this, "confidence_masks"), this.g.fa("confidence_masks", ((t$2, e$2) => {
4416
+ this.confidenceMasks = t$2.map(((t$3) => Ja(this, t$3, !0, !this.j))), $o(this, e$2);
4417
+ })), this.g.attachEmptyPacketListener("confidence_masks", ((t$2) => {
4418
+ this.confidenceMasks = [], $o(this, t$2);
4419
+ }))), this.outputCategoryMask && (Yi(t$1, "category_mask"), ji(n$1, "CATEGORY_MASK:category_mask"), Jo(this, "category_mask"), this.g.W("category_mask", ((t$2, e$2) => {
4420
+ this.categoryMask = Ja(this, t$2, !1, !this.j), $o(this, e$2);
4421
+ })), this.g.attachEmptyPacketListener("category_mask", ((t$2) => {
4422
+ this.categoryMask = void 0, $o(this, t$2);
4423
+ }))), Yi(t$1, "quality_scores"), ji(n$1, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", ((t$2, e$2) => {
4424
+ this.qualityScores = t$2, $o(this, e$2);
4425
+ })), this.g.attachEmptyPacketListener("quality_scores", ((t$2) => {
4426
+ this.categoryMask = void 0, $o(this, t$2);
4427
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4428
+ }
4429
+ };
4430
+ Fh.prototype.getLabels = Fh.prototype.Ha, Fh.prototype.segmentForVideo = Fh.prototype.Pa, Fh.prototype.segment = Fh.prototype.ha, Fh.prototype.setOptions = Fh.prototype.o, Fh.createFromModelPath = function(t$1, e$1) {
4431
+ return Ka(Fh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4432
+ }, Fh.createFromModelBuffer = function(t$1, e$1) {
4433
+ return Ka(Fh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4434
+ }, Fh.createFromOptions = function(t$1, e$1) {
4435
+ return Ka(Fh, t$1, e$1);
4436
+ };
4437
+ var Mh = class {
4438
+ constructor(t$1, e$1, n$1) {
4439
+ this.confidenceMasks = t$1, this.categoryMask = e$1, this.qualityScores = n$1;
4440
+ }
4441
+ close() {
4442
+ this.confidenceMasks?.forEach(((t$1) => {
4443
+ t$1.close();
4444
+ })), this.categoryMask?.close();
4445
+ }
4446
+ };
4447
+ Mh.prototype.close = Mh.prototype.close;
4448
+ var Ih = class extends nr {
4449
+ constructor(t$1) {
4450
+ super(t$1);
4451
+ }
4452
+ }, Ph = [
4453
+ 0,
4454
+ ai,
4455
+ -2
4456
+ ], Oh = [
4457
+ 0,
4458
+ ti,
4459
+ -3,
4460
+ ui,
4461
+ ti,
4462
+ -1
4463
+ ], Ch = [0, Oh], Nh = [
4464
+ 0,
4465
+ Oh,
4466
+ ai,
4467
+ -1
4468
+ ], Uh = class extends nr {
4469
+ constructor(t$1) {
4470
+ super(t$1);
4471
+ }
4472
+ }, Dh = [
4473
+ 0,
4474
+ ti,
4475
+ -1,
4476
+ ui
4477
+ ], Bh = class extends nr {
4478
+ constructor() {
4479
+ super();
4480
+ }
4481
+ }, Gh = class extends nr {
4482
+ constructor(t$1) {
4483
+ super(t$1);
4484
+ }
4485
+ }, jh = [
4486
+ 1,
4487
+ 2,
4488
+ 3,
4489
+ 4,
4490
+ 5,
4491
+ 6,
4492
+ 7,
4493
+ 8,
4494
+ 9,
4495
+ 10,
4496
+ 14,
4497
+ 15
4498
+ ], Vh = class extends nr {
4499
+ constructor() {
4500
+ super();
4501
+ }
4502
+ };
4503
+ Vh.prototype.g = bi([
4504
+ 0,
4505
+ Qr,
4506
+ [
4507
+ 0,
4508
+ jh,
4509
+ yi,
4510
+ Oh,
4511
+ yi,
4512
+ [
4513
+ 0,
4514
+ Oh,
4515
+ Ph
4516
+ ],
4517
+ yi,
4518
+ Ch,
4519
+ yi,
4520
+ [
4521
+ 0,
4522
+ Ch,
4523
+ Ph
4524
+ ],
4525
+ yi,
4526
+ Dh,
4527
+ yi,
4528
+ [
4529
+ 0,
4530
+ ti,
4531
+ -3,
4532
+ ui,
4533
+ Ei
4534
+ ],
4535
+ yi,
4536
+ [
4537
+ 0,
4538
+ ti,
4539
+ -3,
4540
+ ui
4541
+ ],
4542
+ yi,
4543
+ [
4544
+ 0,
4545
+ pi,
4546
+ ti,
4547
+ -2,
4548
+ ui,
4549
+ ai,
4550
+ ui,
4551
+ -1,
4552
+ 2,
4553
+ ti,
4554
+ Ph
4555
+ ],
4556
+ yi,
4557
+ Nh,
4558
+ yi,
4559
+ [
4560
+ 0,
4561
+ Nh,
4562
+ Ph
4563
+ ],
4564
+ ti,
4565
+ Ph,
4566
+ pi,
4567
+ yi,
4568
+ [
4569
+ 0,
4570
+ ti,
4571
+ -3,
4572
+ ui,
4573
+ Ph,
4574
+ -1
4575
+ ],
4576
+ yi,
4577
+ [
4578
+ 0,
4579
+ Qr,
4580
+ Dh
4581
+ ]
4582
+ ],
4583
+ pi,
4584
+ [
4585
+ 0,
4586
+ pi,
4587
+ ai,
4588
+ -1,
4589
+ ui
4590
+ ]
4591
+ ]);
4592
+ var Xh = class extends Za {
4593
+ constructor(t$1, e$1) {
4594
+ super(new za(t$1, e$1), "image_in", "norm_rect_in", !1), this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Eo(), this.s = new mo(), yn(this.h, 0, 3, this.s), yn(t$1 = this.h, 0, 1, e$1 = new xs());
4595
+ }
4596
+ get baseOptions() {
4597
+ return pn(this.h, xs, 1);
4598
+ }
4599
+ set baseOptions(t$1) {
4600
+ yn(this.h, 0, 1, t$1);
4601
+ }
4602
+ o(t$1) {
4603
+ return "outputCategoryMask" in t$1 && (this.outputCategoryMask = t$1.outputCategoryMask ?? !1), "outputConfidenceMasks" in t$1 && (this.outputConfidenceMasks = t$1.outputConfidenceMasks ?? !0), super.l(t$1);
4604
+ }
4605
+ ha(t$1, e$1, n$1, r$1) {
4606
+ const i$1 = "function" != typeof n$1 ? n$1 : {};
4607
+ this.j = "function" == typeof n$1 ? n$1 : r$1, this.qualityScores = this.categoryMask = this.confidenceMasks = void 0, n$1 = this.B + 1, r$1 = new Vh();
4608
+ const s$1 = new Gh();
4609
+ var o$1 = new Ih();
4610
+ if (xn(o$1, 1, 255), yn(s$1, 0, 12, o$1), e$1.keypoint && e$1.scribble) throw Error("Cannot provide both keypoint and scribble.");
4611
+ if (e$1.keypoint) {
4612
+ var a$1 = new Uh();
4613
+ Sn(a$1, 3, !0), Ln(a$1, 1, e$1.keypoint.x), Ln(a$1, 2, e$1.keypoint.y), _n(s$1, 5, jh, a$1);
4614
+ } else {
4615
+ if (!e$1.scribble) throw Error("Must provide either a keypoint or a scribble.");
4616
+ for (a$1 of (o$1 = new Bh(), e$1.scribble)) Sn(e$1 = new Uh(), 3, !0), Ln(e$1, 1, a$1.x), Ln(e$1, 2, a$1.y), wn(o$1, 1, Uh, e$1);
4617
+ _n(s$1, 15, jh, o$1);
4618
+ }
4619
+ wn(r$1, 1, Gh, s$1), this.g.addProtoToStream(r$1.g(), "drishti.RenderData", "roi_in", n$1), $a(this, t$1, i$1);
4620
+ t: {
4621
+ try {
4622
+ const t$2 = new Mh(this.confidenceMasks, this.categoryMask, this.qualityScores);
4623
+ if (!this.j) {
4624
+ var h$1 = t$2;
4625
+ break t;
4626
+ }
4627
+ this.j(t$2);
4628
+ } finally {
4629
+ Zo(this);
4630
+ }
4631
+ h$1 = void 0;
4632
+ }
4633
+ return h$1;
4634
+ }
4635
+ m() {
4636
+ var t$1 = new $i();
4637
+ Ki(t$1, "image_in"), Ki(t$1, "roi_in"), Ki(t$1, "norm_rect_in");
4638
+ const e$1 = new Ci();
4639
+ er(e$1, wo, this.h);
4640
+ const n$1 = new Vi();
4641
+ Bi(n$1, "mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "ROI:roi_in"), Gi(n$1, "NORM_RECT:norm_rect_in"), n$1.o(e$1), zi(t$1, n$1), qo(this, t$1), this.outputConfidenceMasks && (Yi(t$1, "confidence_masks"), ji(n$1, "CONFIDENCE_MASKS:confidence_masks"), Jo(this, "confidence_masks"), this.g.fa("confidence_masks", ((t$2, e$2) => {
4642
+ this.confidenceMasks = t$2.map(((t$3) => Ja(this, t$3, !0, !this.j))), $o(this, e$2);
4643
+ })), this.g.attachEmptyPacketListener("confidence_masks", ((t$2) => {
4644
+ this.confidenceMasks = [], $o(this, t$2);
4645
+ }))), this.outputCategoryMask && (Yi(t$1, "category_mask"), ji(n$1, "CATEGORY_MASK:category_mask"), Jo(this, "category_mask"), this.g.W("category_mask", ((t$2, e$2) => {
4646
+ this.categoryMask = Ja(this, t$2, !1, !this.j), $o(this, e$2);
4647
+ })), this.g.attachEmptyPacketListener("category_mask", ((t$2) => {
4648
+ this.categoryMask = void 0, $o(this, t$2);
4649
+ }))), Yi(t$1, "quality_scores"), ji(n$1, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", ((t$2, e$2) => {
4650
+ this.qualityScores = t$2, $o(this, e$2);
4651
+ })), this.g.attachEmptyPacketListener("quality_scores", ((t$2) => {
4652
+ this.categoryMask = void 0, $o(this, t$2);
4653
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4654
+ }
4655
+ };
4656
+ Xh.prototype.segment = Xh.prototype.ha, Xh.prototype.setOptions = Xh.prototype.o, Xh.createFromModelPath = function(t$1, e$1) {
4657
+ return Ka(Xh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4658
+ }, Xh.createFromModelBuffer = function(t$1, e$1) {
4659
+ return Ka(Xh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4660
+ }, Xh.createFromOptions = function(t$1, e$1) {
4661
+ return Ka(Xh, t$1, e$1);
4662
+ };
4663
+ var Hh = class extends Za {
4664
+ constructor(t$1, e$1) {
4665
+ super(new za(t$1, e$1), "input_frame_gpu", "norm_rect", !1), this.j = { detections: [] }, yn(t$1 = this.h = new To(), 0, 1, e$1 = new xs());
4666
+ }
4667
+ get baseOptions() {
4668
+ return pn(this.h, xs, 1);
4669
+ }
4670
+ set baseOptions(t$1) {
4671
+ yn(this.h, 0, 1, t$1);
4672
+ }
4673
+ o(t$1) {
4674
+ return void 0 !== t$1.displayNamesLocale ? $e(this.h, 2, ne(t$1.displayNamesLocale)) : "displayNamesLocale" in t$1 && $e(this.h, 2), void 0 !== t$1.maxResults ? xn(this.h, 3, t$1.maxResults) : "maxResults" in t$1 && $e(this.h, 3), void 0 !== t$1.scoreThreshold ? Ln(this.h, 4, t$1.scoreThreshold) : "scoreThreshold" in t$1 && $e(this.h, 4), void 0 !== t$1.categoryAllowlist ? Rn(this.h, 5, t$1.categoryAllowlist) : "categoryAllowlist" in t$1 && $e(this.h, 5), void 0 !== t$1.categoryDenylist ? Rn(this.h, 6, t$1.categoryDenylist) : "categoryDenylist" in t$1 && $e(this.h, 6), this.l(t$1);
4675
+ }
4676
+ D(t$1, e$1) {
4677
+ return this.j = { detections: [] }, $a(this, t$1, e$1), this.j;
4678
+ }
4679
+ F(t$1, e$1, n$1) {
4680
+ return this.j = { detections: [] }, qa(this, t$1, n$1, e$1), this.j;
4681
+ }
4682
+ m() {
4683
+ var t$1 = new $i();
4684
+ Ki(t$1, "input_frame_gpu"), Ki(t$1, "norm_rect"), Yi(t$1, "detections");
4685
+ const e$1 = new Ci();
4686
+ er(e$1, Ao, this.h);
4687
+ const n$1 = new Vi();
4688
+ Bi(n$1, "mediapipe.tasks.vision.ObjectDetectorGraph"), Gi(n$1, "IMAGE:input_frame_gpu"), Gi(n$1, "NORM_RECT:norm_rect"), ji(n$1, "DETECTIONS:detections"), n$1.o(e$1), zi(t$1, n$1), this.g.attachProtoVectorListener("detections", ((t$2, e$2) => {
4689
+ for (const e$3 of t$2) t$2 = ss(e$3), this.j.detections.push(Lo(t$2));
4690
+ $o(this, e$2);
4691
+ })), this.g.attachEmptyPacketListener("detections", ((t$2) => {
4692
+ $o(this, t$2);
4693
+ })), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4694
+ }
4695
+ };
4696
+ Hh.prototype.detectForVideo = Hh.prototype.F, Hh.prototype.detect = Hh.prototype.D, Hh.prototype.setOptions = Hh.prototype.o, Hh.createFromModelPath = async function(t$1, e$1) {
4697
+ return Ka(Hh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4698
+ }, Hh.createFromModelBuffer = function(t$1, e$1) {
4699
+ return Ka(Hh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4700
+ }, Hh.createFromOptions = function(t$1, e$1) {
4701
+ return Ka(Hh, t$1, e$1);
4702
+ };
4703
+ var Wh = class {
4704
+ constructor(t$1, e$1, n$1) {
4705
+ this.landmarks = t$1, this.worldLandmarks = e$1, this.segmentationMasks = n$1;
4706
+ }
4707
+ close() {
4708
+ this.segmentationMasks?.forEach(((t$1) => {
4709
+ t$1.close();
4710
+ }));
4711
+ }
4712
+ };
4713
+ function zh(t$1) {
4714
+ t$1.landmarks = [], t$1.worldLandmarks = [], t$1.segmentationMasks = void 0;
4715
+ }
4716
+ function Kh(t$1) {
4717
+ try {
4718
+ const e$1 = new Wh(t$1.landmarks, t$1.worldLandmarks, t$1.segmentationMasks);
4719
+ if (!t$1.s) return e$1;
4720
+ t$1.s(e$1);
4721
+ } finally {
4722
+ Zo(t$1);
4723
+ }
4724
+ }
4725
+ Wh.prototype.close = Wh.prototype.close;
4726
+ var Yh = class extends Za {
4727
+ constructor(t$1, e$1) {
4728
+ super(new za(t$1, e$1), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.outputSegmentationMasks = !1, yn(t$1 = this.h = new bo(), 0, 1, e$1 = new xs()), this.v = new ao(), yn(this.h, 0, 3, this.v), this.j = new oo(), yn(this.h, 0, 2, this.j), xn(this.j, 4, 1), Ln(this.j, 2, .5), Ln(this.v, 2, .5), Ln(this.h, 4, .5);
4729
+ }
4730
+ get baseOptions() {
4731
+ return pn(this.h, xs, 1);
4732
+ }
4733
+ set baseOptions(t$1) {
4734
+ yn(this.h, 0, 1, t$1);
4735
+ }
4736
+ o(t$1) {
4737
+ return "numPoses" in t$1 && xn(this.j, 4, t$1.numPoses ?? 1), "minPoseDetectionConfidence" in t$1 && Ln(this.j, 2, t$1.minPoseDetectionConfidence ?? .5), "minTrackingConfidence" in t$1 && Ln(this.h, 4, t$1.minTrackingConfidence ?? .5), "minPosePresenceConfidence" in t$1 && Ln(this.v, 2, t$1.minPosePresenceConfidence ?? .5), "outputSegmentationMasks" in t$1 && (this.outputSegmentationMasks = t$1.outputSegmentationMasks ?? !1), this.l(t$1);
4738
+ }
4739
+ D(t$1, e$1, n$1) {
4740
+ const r$1 = "function" != typeof e$1 ? e$1 : {};
4741
+ return this.s = "function" == typeof e$1 ? e$1 : n$1, zh(this), $a(this, t$1, r$1), Kh(this);
4742
+ }
4743
+ F(t$1, e$1, n$1, r$1) {
4744
+ const i$1 = "function" != typeof n$1 ? n$1 : {};
4745
+ return this.s = "function" == typeof n$1 ? n$1 : r$1, zh(this), qa(this, t$1, i$1, e$1), Kh(this);
4746
+ }
4747
+ m() {
4748
+ var t$1 = new $i();
4749
+ Ki(t$1, "image_in"), Ki(t$1, "norm_rect"), Yi(t$1, "normalized_landmarks"), Yi(t$1, "world_landmarks"), Yi(t$1, "segmentation_masks");
4750
+ const e$1 = new Ci();
4751
+ er(e$1, ko, this.h);
4752
+ const n$1 = new Vi();
4753
+ Bi(n$1, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), Gi(n$1, "IMAGE:image_in"), Gi(n$1, "NORM_RECT:norm_rect"), ji(n$1, "NORM_LANDMARKS:normalized_landmarks"), ji(n$1, "WORLD_LANDMARKS:world_landmarks"), n$1.o(e$1), zi(t$1, n$1), qo(this, t$1), this.g.attachProtoVectorListener("normalized_landmarks", ((t$2, e$2) => {
4754
+ this.landmarks = [];
4755
+ for (const e$3 of t$2) t$2 = cs(e$3), this.landmarks.push(Ro(t$2));
4756
+ $o(this, e$2);
4757
+ })), this.g.attachEmptyPacketListener("normalized_landmarks", ((t$2) => {
4758
+ this.landmarks = [], $o(this, t$2);
4759
+ })), this.g.attachProtoVectorListener("world_landmarks", ((t$2, e$2) => {
4760
+ this.worldLandmarks = [];
4761
+ for (const e$3 of t$2) t$2 = as(e$3), this.worldLandmarks.push(Fo(t$2));
4762
+ $o(this, e$2);
4763
+ })), this.g.attachEmptyPacketListener("world_landmarks", ((t$2) => {
4764
+ this.worldLandmarks = [], $o(this, t$2);
4765
+ })), this.outputSegmentationMasks && (ji(n$1, "SEGMENTATION_MASK:segmentation_masks"), Jo(this, "segmentation_masks"), this.g.fa("segmentation_masks", ((t$2, e$2) => {
4766
+ this.segmentationMasks = t$2.map(((t$3) => Ja(this, t$3, !0, !this.s))), $o(this, e$2);
4767
+ })), this.g.attachEmptyPacketListener("segmentation_masks", ((t$2) => {
4768
+ this.segmentationMasks = [], $o(this, t$2);
4769
+ }))), t$1 = t$1.g(), this.setGraph(new Uint8Array(t$1), !0);
4770
+ }
4771
+ };
4772
+ Yh.prototype.detectForVideo = Yh.prototype.F, Yh.prototype.detect = Yh.prototype.D, Yh.prototype.setOptions = Yh.prototype.o, Yh.createFromModelPath = function(t$1, e$1) {
4773
+ return Ka(Yh, t$1, { baseOptions: { modelAssetPath: e$1 } });
4774
+ }, Yh.createFromModelBuffer = function(t$1, e$1) {
4775
+ return Ka(Yh, t$1, { baseOptions: { modelAssetBuffer: e$1 } });
4776
+ }, Yh.createFromOptions = function(t$1, e$1) {
4777
+ return Ka(Yh, t$1, e$1);
4778
+ }, Yh.POSE_CONNECTIONS = Eh;
4779
+
4780
+ //#endregion
4781
+ export { wa as _, Qa as a, Xh as c, bh as d, fh as f, vh as g, lh as h, Mh as i, Yh as l, kh as m, Hh as n, Sh as o, ja as p, Ia as r, Uo as s, Fh as t, Za as u, xh as v, yh as y };