vuer 0.0.32rc7__py3-none-any.whl → 0.0.32rc23__py3-none-any.whl
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.
Potentially problematic release.
This version of vuer might be problematic. Click here for more details.
- vuer/__pycache__/events.cpython-38.pyc +0 -0
- vuer/__pycache__/server.cpython-38.pyc +0 -0
- vuer/addons/camera_rtc.py +171 -0
- vuer/client_build/404.html +8 -11
- vuer/client_build/assets/chunks/chunk-42690cd5.js +15 -0
- vuer/client_build/assets/chunks/chunk-8db1b443.js +1 -0
- vuer/client_build/assets/chunks/chunk-9ee83150.js +220 -0
- vuer/client_build/assets/chunks/chunk-B5NqXhlg.js +2 -0
- vuer/client_build/assets/chunks/chunk-B5NqXhlg.js.map +1 -0
- vuer/client_build/assets/chunks/chunk-CmlEsaFt.js +6816 -0
- vuer/client_build/assets/chunks/chunk-CmlEsaFt.js.map +1 -0
- vuer/client_build/assets/chunks/chunk-DAfdqQjW.js +16 -0
- vuer/client_build/assets/chunks/chunk-DAfdqQjW.js.map +1 -0
- vuer/client_build/assets/chunks/chunk-DM5X-Fsx.js +53 -0
- vuer/client_build/assets/chunks/chunk-DM5X-Fsx.js.map +1 -0
- vuer/client_build/assets/chunks/chunk-DT-Gzcc9.js +102 -0
- vuer/client_build/assets/chunks/chunk-DT-Gzcc9.js.map +1 -0
- vuer/client_build/assets/chunks/chunk-af3ddd0a.js +6786 -0
- vuer/client_build/assets/chunks/chunk-bbf8b6fc.js +85 -0
- vuer/client_build/assets/chunks/chunk-mF18BbkE.js +3 -0
- vuer/client_build/assets/chunks/chunk-mF18BbkE.js.map +1 -0
- vuer/client_build/assets/entries/entry-client-routing.3c853994.js +2 -0
- vuer/client_build/assets/entries/entry-client-routing.DcliWhPk.js +5 -0
- vuer/client_build/assets/entries/entry-client-routing.DcliWhPk.js.map +1 -0
- vuer/client_build/assets/entries/entry-server-routing.40c0fcc6.js +1 -0
- vuer/client_build/assets/entries/pages_editor.dxxI6p1y.js +2 -0
- vuer/client_build/assets/entries/pages_editor.dxxI6p1y.js.map +1 -0
- vuer/client_build/assets/entries/pages_error.CLFwp4P1.js +2 -0
- vuer/client_build/assets/entries/pages_error.CLFwp4P1.js.map +1 -0
- vuer/client_build/assets/entries/pages_hands.page.8bc91e13.js +1 -0
- vuer/client_build/assets/entries/pages_index.cBvCoMtg.js +2 -0
- vuer/client_build/assets/entries/pages_index.cBvCoMtg.js.map +1 -0
- vuer/client_build/assets/entries/pages_index.page.041ef5af.js +97 -0
- vuer/client_build/assets/entries/pages_simple.DNtn6Zih.js +2 -0
- vuer/client_build/assets/entries/pages_simple.DNtn6Zih.js.map +1 -0
- vuer/client_build/assets/entries/pages_stereo_plane.page.186386ed.js +54 -0
- vuer/client_build/assets/entries/pages_video_plane.page.9303749c.js +1 -0
- vuer/client_build/assets/static/editor.e6iYOnjc.css +1 -0
- vuer/client_build/assets/static/index.CdgWIjKL.css +1 -0
- vuer/client_build/assets/static/logo.2_7Lo9tV.svg +36 -0
- vuer/client_build/assets/static/onRenderClient.DQ-loHhw.css +1 -0
- vuer/client_build/editor/index.html +17 -0
- vuer/client_build/editor/index.pageContext.json +1 -0
- vuer/client_build/hands/index.html +3 -3
- vuer/client_build/index.html +10 -13
- vuer/client_build/index.pageContext.json +1 -1
- vuer/client_build/pages/_error/+Page.d.ts +2 -0
- vuer/client_build/pages/editor/+Page.d.ts +1 -0
- vuer/client_build/pages/index/+Page.d.ts +2 -0
- vuer/client_build/pages/simple/+Page.d.ts +1 -0
- vuer/client_build/renderer/+config.d.ts +45 -0
- vuer/client_build/renderer/+onHydrationEnd.d.ts +3 -0
- vuer/client_build/renderer/+onPageTransitionEnd.d.ts +3 -0
- vuer/client_build/renderer/+onPageTransitionStart.d.ts +3 -0
- vuer/client_build/renderer/+onRenderClient.d.ts +2 -0
- vuer/client_build/renderer/+onRenderHtml.d.ts +2 -0
- vuer/client_build/renderer/Layout.d.ts +6 -0
- vuer/client_build/renderer/Link.d.ts +7 -0
- vuer/client_build/renderer/PageContext.d.ts +19 -0
- vuer/client_build/renderer/getPageTitle.d.ts +3 -0
- vuer/client_build/renderer/useData.d.ts +2 -0
- vuer/client_build/renderer/usePageContext.d.ts +9 -0
- vuer/client_build/simple/index.html +16 -0
- vuer/client_build/simple/index.pageContext.json +1 -0
- vuer/client_build/stereo_plane/index.html +3 -3
- vuer/client_build/video_plane/index.html +3 -3
- vuer/events.py +25 -7
- vuer/schemas/__init__.py +1 -0
- vuer/schemas/__pycache__/__init__.cpython-38.pyc +0 -0
- vuer/schemas/__pycache__/physics_components.cpython-38.pyc +0 -0
- vuer/schemas/__pycache__/scene_components.cpython-38.pyc +0 -0
- vuer/schemas/physics_components.py +19 -0
- vuer/schemas/scene_components.py +28 -3
- vuer/schemas/timeline_components.py +0 -0
- {vuer-0.0.32rc7.dist-info → vuer-0.0.32rc23.dist-info}/METADATA +16 -1
- {vuer-0.0.32rc7.dist-info → vuer-0.0.32rc23.dist-info}/RECORD +80 -19
- {vuer-0.0.32rc7.dist-info → vuer-0.0.32rc23.dist-info}/LICENSE +0 -0
- {vuer-0.0.32rc7.dist-info → vuer-0.0.32rc23.dist-info}/WHEEL +0 -0
- {vuer-0.0.32rc7.dist-info → vuer-0.0.32rc23.dist-info}/entry_points.txt +0 -0
- {vuer-0.0.32rc7.dist-info → vuer-0.0.32rc23.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import json
|
|
3
|
+
import logging
|
|
4
|
+
import os
|
|
5
|
+
import platform
|
|
6
|
+
import ssl
|
|
7
|
+
|
|
8
|
+
import aiohttp_cors
|
|
9
|
+
from aiohttp import web
|
|
10
|
+
from aiortc import RTCPeerConnection, RTCSessionDescription
|
|
11
|
+
from aiortc.contrib.media import MediaPlayer, MediaRelay
|
|
12
|
+
from aiortc.rtcrtpsender import RTCRtpSender
|
|
13
|
+
|
|
14
|
+
ROOT = os.path.dirname(__file__)
|
|
15
|
+
|
|
16
|
+
relay = None
|
|
17
|
+
webcam = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def create_local_tracks(play_from, decode):
|
|
21
|
+
global relay, webcam
|
|
22
|
+
|
|
23
|
+
if play_from:
|
|
24
|
+
player = MediaPlayer(play_from, decode=decode)
|
|
25
|
+
return player.audio, player.video
|
|
26
|
+
else:
|
|
27
|
+
options = {"framerate": "30", "video_size": "1280x720"}
|
|
28
|
+
if relay is None:
|
|
29
|
+
if platform.system() == "Darwin":
|
|
30
|
+
webcam = MediaPlayer(
|
|
31
|
+
"default:none", format="avfoundation", options=options
|
|
32
|
+
)
|
|
33
|
+
elif platform.system() == "Windows":
|
|
34
|
+
webcam = MediaPlayer(
|
|
35
|
+
"video=Integrated Camera", format="dshow", options=options
|
|
36
|
+
)
|
|
37
|
+
else:
|
|
38
|
+
webcam = MediaPlayer("/dev/video0", format=None, options=options)
|
|
39
|
+
relay = MediaRelay()
|
|
40
|
+
return None, relay.subscribe(webcam.video)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def force_codec(pc, sender, forced_codec):
|
|
44
|
+
kind = forced_codec.split("/")[0]
|
|
45
|
+
codecs = RTCRtpSender.getCapabilities(kind).codecs
|
|
46
|
+
transceiver = next(t for t in pc.getTransceivers() if t.sender == sender)
|
|
47
|
+
transceiver.setCodecPreferences(
|
|
48
|
+
[codec for codec in codecs if codec.mimeType == forced_codec]
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
async def index(request):
|
|
53
|
+
content = open(os.path.join(ROOT, "index.html"), "r").read()
|
|
54
|
+
return web.Response(content_type="text/html", text=content)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
async def javascript(request):
|
|
58
|
+
content = open(os.path.join(ROOT, "client.js"), "r").read()
|
|
59
|
+
return web.Response(content_type="application/javascript", text=content)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
async def offer(request):
|
|
63
|
+
params = await request.json()
|
|
64
|
+
offer = RTCSessionDescription(sdp=params["sdp"], type=params["type"])
|
|
65
|
+
|
|
66
|
+
pc = RTCPeerConnection()
|
|
67
|
+
pcs.add(pc)
|
|
68
|
+
|
|
69
|
+
@pc.on("connectionstatechange")
|
|
70
|
+
async def on_connectionstatechange():
|
|
71
|
+
print("Connection state is %s" % pc.connectionState)
|
|
72
|
+
if pc.connectionState == "failed":
|
|
73
|
+
await pc.close()
|
|
74
|
+
pcs.discard(pc)
|
|
75
|
+
|
|
76
|
+
# open media source
|
|
77
|
+
audio, video = create_local_tracks(
|
|
78
|
+
Args.play_from, decode=not Args.play_without_decoding
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
if audio:
|
|
82
|
+
audio_sender = pc.addTrack(audio)
|
|
83
|
+
if Args.audio_codec:
|
|
84
|
+
force_codec(pc, audio_sender, Args.audio_codec)
|
|
85
|
+
elif Args.play_without_decoding:
|
|
86
|
+
raise Exception("You must specify the audio codec using --audio-codec")
|
|
87
|
+
|
|
88
|
+
if video:
|
|
89
|
+
video_sender = pc.addTrack(video)
|
|
90
|
+
if Args.video_codec:
|
|
91
|
+
force_codec(pc, video_sender, Args.video_codec)
|
|
92
|
+
elif Args.play_without_decoding:
|
|
93
|
+
raise Exception("You must specify the video codec using --video-codec")
|
|
94
|
+
|
|
95
|
+
await pc.setRemoteDescription(offer)
|
|
96
|
+
|
|
97
|
+
answer = await pc.createAnswer()
|
|
98
|
+
await pc.setLocalDescription(answer)
|
|
99
|
+
|
|
100
|
+
return web.Response(
|
|
101
|
+
content_type="application/json",
|
|
102
|
+
text=json.dumps(
|
|
103
|
+
{"sdp": pc.localDescription.sdp, "type": pc.localDescription.type}
|
|
104
|
+
),
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
pcs = set()
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
async def on_shutdown(app):
|
|
112
|
+
# close peer connections
|
|
113
|
+
coros = [pc.close() for pc in pcs]
|
|
114
|
+
await asyncio.gather(*coros)
|
|
115
|
+
pcs.clear()
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
from params_proto import ParamsProto, Proto, Flag
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class Args(ParamsProto):
|
|
122
|
+
description = "WebRTC webcam demo"
|
|
123
|
+
cert_file = Proto(help="SSL certificate file (for HTTPS)")
|
|
124
|
+
key_file = Proto(help="SSL key file (for HTTPS)")
|
|
125
|
+
|
|
126
|
+
host = Proto(default="localhost", help="Host for HTTP server (default: 0.0.0.0)")
|
|
127
|
+
port = Proto(default=8080, dtype=int, help="Port for HTTP server (default: 8080)")
|
|
128
|
+
|
|
129
|
+
play_from = Proto(help="Read the media from a file and send it.")
|
|
130
|
+
play_without_decoding = Flag(
|
|
131
|
+
"Read the media without decoding it (experimental). "
|
|
132
|
+
"For now it only works with an MPEGTS container with only H.264 video."
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
audio_codec = Proto(help="Force a specific audio codec (e.g. audio/opus)")
|
|
136
|
+
video_codec = Proto(help="Force a specific video codec (e.g. video/H264)")
|
|
137
|
+
|
|
138
|
+
verbose = Flag()
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
if __name__ == "__main__":
|
|
142
|
+
if Args.verbose:
|
|
143
|
+
logging.basicConfig(level=logging.DEBUG)
|
|
144
|
+
else:
|
|
145
|
+
logging.basicConfig(level=logging.INFO)
|
|
146
|
+
|
|
147
|
+
if Args.cert_file:
|
|
148
|
+
ssl_context = ssl.SSLContext()
|
|
149
|
+
ssl_context.load_cert_chain(Args.cert_file, Args.key_file)
|
|
150
|
+
else:
|
|
151
|
+
ssl_context = None
|
|
152
|
+
|
|
153
|
+
app = web.Application()
|
|
154
|
+
cors = aiohttp_cors.setup(
|
|
155
|
+
app,
|
|
156
|
+
defaults={
|
|
157
|
+
"*": aiohttp_cors.ResourceOptions(
|
|
158
|
+
allow_credentials=True,
|
|
159
|
+
expose_headers="*",
|
|
160
|
+
allow_headers="*",
|
|
161
|
+
allow_methods="*",
|
|
162
|
+
)
|
|
163
|
+
},
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
app.on_shutdown.append(on_shutdown)
|
|
167
|
+
cors.add(app.router.add_get("/", index))
|
|
168
|
+
cors.add(app.router.add_get("/client.js", javascript))
|
|
169
|
+
cors.add(app.router.add_post("/offer", offer))
|
|
170
|
+
|
|
171
|
+
web.run_app(app, host=Args.host, port=Args.port, ssl_context=ssl_context)
|
vuer/client_build/404.html
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
|
-
<link rel="stylesheet" type="text/css" href="/assets/static/
|
|
5
|
-
<title>Vuer
|
|
4
|
+
<link rel="stylesheet" type="text/css" href="/assets/static/onRenderClient.DQ-loHhw.css">
|
|
5
|
+
<title>Vuer.AI</title>
|
|
6
6
|
</head>
|
|
7
7
|
<body>
|
|
8
|
-
<div id="
|
|
9
|
-
<script
|
|
10
|
-
<
|
|
11
|
-
<link rel="modulepreload" href="/assets/
|
|
12
|
-
<link rel="modulepreload" href="/assets/
|
|
13
|
-
<link rel="modulepreload" href="/assets/chunks/chunk-
|
|
14
|
-
<link rel="modulepreload" href="/assets/chunks/chunk-3d735b94.js" as="script" type="text/javascript">
|
|
15
|
-
<link rel="modulepreload" href="/assets/chunks/chunk-cf010ec4.js" as="script" type="text/javascript">
|
|
16
|
-
<script id="vike_pageContext" type="application/json">{"pageProps":{"is404":true},"documentProps":"!undefined","someAsyncProps":42,"abortReason":"!undefined","_urlRewrite":null,"_urlRedirect":"!undefined","abortStatusCode":"!undefined","_abortCall":"!undefined","_pageContextInitHasClientData":"!undefined","_pageId":"/renderer/_error","is404":true,"_isError":"!undefined"}</script>
|
|
8
|
+
<div id="react-root"><div id="react-root" style="padding:0;height:100%;width:100%"><div style="height:calc(100vh - 100px);display:flex;justify-content:center;align-items:center"><p style="font-size:1.3em">Page not found.</p></div></div></div>
|
|
9
|
+
<script id="vike_pageContext" type="application/json">{"someAsyncProps":42,"abortReason":"!undefined","_urlRewrite":null,"_urlRedirect":"!undefined","abortStatusCode":"!undefined","_abortCall":"!undefined","_pageContextInitIsPassedToClient":"!undefined","_pageId":"/pages/_error","routeParams":{},"data":"!undefined","pageProps":{"is404":true},"is404":true,"_isServerSideError":"!undefined"}</script>
|
|
10
|
+
<script src="/assets/entries/entry-client-routing.DcliWhPk.js" type="module" async></script>
|
|
11
|
+
<link rel="modulepreload" href="/assets/entries/pages_error.CLFwp4P1.js" as="script" type="text/javascript">
|
|
12
|
+
<link rel="modulepreload" href="/assets/chunks/chunk-DM5X-Fsx.js" as="script" type="text/javascript">
|
|
13
|
+
<link rel="modulepreload" href="/assets/chunks/chunk-B5NqXhlg.js" as="script" type="text/javascript">
|
|
17
14
|
</body>
|
|
18
15
|
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var or=typeof self<"u"?self:{};function Dr(e,t){e:{for(var r=["CLOSURE_FLAGS"],n=or,s=0;s<r.length;s++)if((n=n[r[s]])==null){r=null;break e}r=n}return(e=r&&r[e])!=null?e:t}function Xe(){throw Error("Invalid UTF8")}function $n(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}let Rt,Lr;const aa=typeof TextDecoder<"u";let qn;const ca=typeof TextEncoder<"u";function Ys(e){if(ca)e=(qn||(qn=new TextEncoder)).encode(e);else{let r=0;const n=new Uint8Array(3*e.length);for(let s=0;s<e.length;s++){var t=e.charCodeAt(s);if(128>t)n[r++]=t;else{if(2048>t)n[r++]=t>>6|192;else{if(55296<=t&&57343>=t){if(56319>=t&&s<e.length){const i=e.charCodeAt(++s);if(56320<=i&&57343>=i){t=1024*(t-55296)+i-56320+65536,n[r++]=t>>18|240,n[r++]=t>>12&63|128,n[r++]=t>>6&63|128,n[r++]=63&t|128;continue}s--}t=65533}n[r++]=t>>12|224,n[r++]=t>>6&63|128}n[r++]=63&t|128}}e=r===n.length?n:n.subarray(0,r)}return e}var vt,Js=Dr(610401301,!1),an=Dr(572417392,Dr(1,!0));const Yn=or.navigator;function Ur(e){return!!Js&&!!vt&&vt.brands.some(({brand:t})=>t&&t.indexOf(e)!=-1)}function ce(e){var t;return(t=or.navigator)&&(t=t.userAgent)||(t=""),t.indexOf(e)!=-1}function Ne(){return!!Js&&!!vt&&0<vt.brands.length}function Or(){return Ne()?Ur("Chromium"):(ce("Chrome")||ce("CriOS"))&&!(!Ne()&&ce("Edge"))||ce("Silk")}vt=Yn&&Yn.userAgentData||null;var ua=!Ne()&&(ce("Trident")||ce("MSIE"));!ce("Android")||Or(),Or(),ce("Safari")&&(Or()||!Ne()&&ce("Coast")||!Ne()&&ce("Opera")||!Ne()&&ce("Edge")||(Ne()?Ur("Microsoft Edge"):ce("Edg/"))||Ne()&&Ur("Opera"));var Zs={},dt=null;function ha(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):"=.".indexOf(e[t-1])!=-1&&(r="=.".indexOf(e[t-2])!=-1?r-2:r-1);var n=new Uint8Array(r),s=0;return function(i,o){function c(De){for(;a<i.length;){var G=i.charAt(a++),X=dt[G];if(X!=null)return X;if(!/^[\s\xa0]*$/.test(G))throw Error("Unknown base64 encoding at char: "+G)}return De}Qs();for(var a=0;;){var u=c(-1),h=c(0),m=c(64),O=c(64);if(O===64&&u===-1)break;o(u<<2|h>>4),m!=64&&(o(h<<4&240|m>>2),O!=64&&o(m<<6&192|O))}}(e,function(i){n[s++]=i}),s!==r?n.subarray(0,s):n}function Qs(){if(!dt){dt={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));Zs[r]=n;for(var s=0;s<n.length;s++){var i=n[s];dt[i]===void 0&&(dt[i]=s)}}}}var ei=typeof Uint8Array<"u",ti=!ua&&typeof btoa=="function";function Jn(e){if(!ti){var t;t===void 0&&(t=0),Qs(),t=Zs[t];var r=Array(Math.floor(e.length/3)),n=t[64]||"";let a=0,u=0;for(;a<e.length-2;a+=3){var s=e[a],i=e[a+1],o=e[a+2],c=t[s>>2];s=t[(3&s)<<4|i>>4],i=t[(15&i)<<2|o>>6],o=t[63&o],r[u++]=c+s+i+o}switch(c=0,o=n,e.length-a){case 2:o=t[(15&(c=e[a+1]))<<2]||n;case 1:e=e[a],r[u]=t[e>>2]+t[(3&e)<<4|c>>4]+o+n}return r.join("")}for(t="",r=0,n=e.length-10240;r<n;)t+=String.fromCharCode.apply(null,e.subarray(r,r+=10240));return t+=String.fromCharCode.apply(null,r?e.subarray(r):e),btoa(t)}const Zn=/[-_.]/g,la={"-":"+",_:"/",".":"="};function fa(e){return la[e]||""}function ri(e){if(!ti)return ha(e);Zn.test(e)&&(e=e.replace(Zn,fa)),e=atob(e);const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}function ar(e){return ei&&e!=null&&e instanceof Uint8Array}let Qn;function cr(){return Qn||(Qn=new Uint8Array(0))}var tt={};let es;function ni(e){if(e!==tt)throw Error("illegal external caller")}function rt(){return es||(es=new Ge(null,tt))}function cn(e){ni(tt);var t=e.T;return(t=t==null||ar(t)?t:typeof t=="string"?ri(t):null)==null?t:e.T=t}var Ge=class{constructor(e,t){if(ni(t),this.T=e,e!=null&&e.length===0)throw Error("ByteString should be constructed with non-empty values")}qa(){const e=cn(this);return e?new Uint8Array(e):cr()}};function si(e,t){return Error(`Invalid wire type: ${e} (at position ${t})`)}function un(){return Error("Failed to read varint, encoding is invalid.")}function ii(e,t){return Error(`Tried to read past the end of the data ${t} > ${e}`)}function oi(e){return e.length==0?rt():new Ge(e,tt)}function hn(e){if(typeof e=="string")return{buffer:ri(e),H:!1};if(Array.isArray(e))return{buffer:new Uint8Array(e),H:!1};if(e.constructor===Uint8Array)return{buffer:e,H:!1};if(e.constructor===ArrayBuffer)return{buffer:new Uint8Array(e),H:!1};if(e.constructor===Ge)return{buffer:cn(e)||cr(),H:!0};if(e instanceof Uint8Array)return{buffer:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),H:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function ln(){return typeof BigInt=="function"}var Nr=!an;let ts=!an;const da=typeof Uint8Array.prototype.slice=="function";let qt,P=0,W=0;function ur(e){const t=0>e;let r=(e=Math.abs(e))>>>0;if(e=Math.floor((e-r)/4294967296),t){const[n,s]=dn(r,e);e=s,r=n}P=r>>>0,W=e>>>0}function fn(e){const t=qt||(qt=new DataView(new ArrayBuffer(8)));t.setFloat32(0,+e,!0),W=0,P=t.getUint32(0,!0)}function ai(e,t){return 4294967296*t+(e>>>0)}function ci(e,t){const r=2147483648&t;return r&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=ai(e,t),r?-e:e}function Gr(e,t){if(e>>>=0,2097151>=(t>>>=0))var r=""+(4294967296*t+e);else ln()?r=""+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(r=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),r+=8147497*t,t*=2,1e7<=e&&(r+=Math.floor(e/1e7),e%=1e7),1e7<=r&&(t+=Math.floor(r/1e7),r%=1e7),r=t+rs(r)+rs(e));return r}function rs(e){return e=String(e),"0000000".slice(e.length)+e}function ui(){var e=P,t=W;if(2147483648&t)if(ln())e=""+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{const[r,n]=dn(e,t);e="-"+Gr(r,n)}else e=Gr(e,t);return e}function hr(e){if(16>e.length)ur(Number(e));else if(ln())e=BigInt(e),P=Number(e&BigInt(4294967295))>>>0,W=Number(e>>BigInt(32)&BigInt(4294967295));else{const t=+(e[0]==="-");W=P=0;const r=e.length;for(let n=t,s=(r-t)%6+t;s<=r;n=s,s+=6){const i=Number(e.slice(n,s));W*=1e6,P=1e6*P+i,4294967296<=P&&(W+=Math.trunc(P/4294967296),W>>>=0,P>>>=0)}if(t){const[n,s]=dn(P,W);P=n,W=s}}}function dn(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function jr(e,t,{W:r=!1}={}){e.W=r,t&&(t=hn(t),e.h=t.buffer,e.u=t.H,e.v=0,e.l=e.h.length,e.g=e.v)}function $e(e,t){if(e.g=t,t>e.l)throw ii(e.l,t)}function pn(e,t){let r,n=0,s=0,i=0;const o=e.h;let c=e.g;do r=o[c++],n|=(127&r)<<i,i+=7;while(32>i&&128&r);for(32<i&&(s|=(127&r)>>4),i=3;32>i&&128&r;i+=7)r=o[c++],s|=(127&r)<<i;if($e(e,c),128>r)return t(n>>>0,s>>>0);throw un()}function gn(e){let t=0,r=e.g;const n=r+10,s=e.h;for(;r<n;){const i=s[r++];if(t|=i,(128&i)==0)return $e(e,r),!!(127&t)}throw un()}function Vr(e){var t=e.h;const r=e.g,n=t[r],s=t[r+1],i=t[r+2];return t=t[r+3],$e(e,e.g+4),(n<<0|s<<8|i<<16|t<<24)>>>0}function hi(e,t){if(0>t)throw Error(`Tried to read a negative byte length: ${t}`);const r=e.g,n=r+t;if(n>e.l)throw ii(t,e.l-r);return e.g=n,r}function li(e,t){if(t==0)return rt();var r=hi(e,t);return e.W&&e.u?r=e.h.subarray(r,r+t):(e=e.h,r=r===(t=r+t)?cr():da?e.slice(r,t):new Uint8Array(e.subarray(r,t))),oi(r)}var kt=class{constructor(e,t){this.h=null,this.u=!1,this.g=this.l=this.v=0,jr(this,e,t)}clear(){this.h=null,this.u=!1,this.g=this.l=this.v=0,this.W=!1}m(){const e=this.h;let t=this.g,r=e[t++],n=127&r;if(128&r&&(r=e[t++],n|=(127&r)<<7,128&r&&(r=e[t++],n|=(127&r)<<14,128&r&&(r=e[t++],n|=(127&r)<<21,128&r&&(r=e[t++],n|=r<<28,128&r&&128&e[t++]&&128&e[t++]&&128&e[t++]&&128&e[t++]&&128&e[t++])))))throw un();return $e(this,t),n}j(){return this.m()>>>0}B(){var e=Vr(this);const t=2*(e>>31)+1,r=e>>>23&255;return e&=8388607,r==255?e?NaN:1/0*t:r==0?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))}C(){return this.m()}},ns=[];function fi(e){var t=e.g;if(t.g==t.l)return!1;e.l=e.g.g;var r=e.g.j();if(t=r>>>3,!(0<=(r&=7)&&5>=r))throw si(r,e.l);if(1>t)throw Error(`Invalid field number: ${t} (at position ${e.l})`);return e.m=t,e.h=r,!0}function Gt(e){switch(e.h){case 0:e.h!=0?Gt(e):gn(e.g);break;case 1:$e(e=e.g,e.g+8);break;case 2:if(e.h!=2)Gt(e);else{var t=e.g.j();$e(e=e.g,e.g+t)}break;case 5:$e(e=e.g,e.g+4);break;case 3:for(t=e.m;;){if(!fi(e))throw Error("Unmatched start-group tag: stream EOF");if(e.h==4){if(e.m!=t)throw Error("Unmatched end-group tag");break}Gt(e)}break;default:throw si(e.h,e.l)}}function St(e,t,r){const n=e.g.l,s=e.g.j(),i=e.g.g+s;let o=i-n;if(0>=o&&(e.g.l=i,r(t,e,void 0,void 0,void 0),o=i-e.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${s} bytes, instead read ${s-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return e.g.g=i,e.g.l=n,t}function mn(e){var t=e.g.j(),r=hi(e=e.g,t);if(e=e.h,aa){var n,s=e;(n=Lr)||(n=Lr=new TextDecoder("utf-8",{fatal:!0})),e=r+t,s=r===0&&e===s.length?s:s.subarray(r,e);try{var i=n.decode(s)}catch(c){if(Rt===void 0){try{n.decode(new Uint8Array([128]))}catch{}try{n.decode(new Uint8Array([97])),Rt=!0}catch{Rt=!1}}throw!Rt&&(Lr=void 0),c}}else{t=(i=r)+t,r=[];let c,a=null;for(;i<t;){var o=e[i++];128>o?r.push(o):224>o?i>=t?Xe():(c=e[i++],194>o||(192&c)!=128?(i--,Xe()):r.push((31&o)<<6|63&c)):240>o?i>=t-1?Xe():(c=e[i++],(192&c)!=128||o===224&&160>c||o===237&&160<=c||(192&(s=e[i++]))!=128?(i--,Xe()):r.push((15&o)<<12|(63&c)<<6|63&s)):244>=o?i>=t-2?Xe():(c=e[i++],(192&c)!=128||c-144+(o<<28)>>30||(192&(s=e[i++]))!=128||(192&(n=e[i++]))!=128?(i--,Xe()):(o=(7&o)<<18|(63&c)<<12|(63&s)<<6|63&n,o-=65536,r.push(55296+(o>>10&1023),56320+(1023&o)))):Xe(),8192<=r.length&&(a=$n(a,r),r.length=0)}i=$n(a,r)}return i}function di(e){const t=e.g.j();return li(e.g,t)}function lr(e,t,r){var n=e.g.j();for(n=e.g.g+n;e.g.g<n;)r.push(t.call(e.g))}var Ct=[];function ss(e){return e?/^\d+$/.test(e)?(hr(e),new is(P,W)):null:os||(os=new is(0,0))}var is=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let os;function as(e){return e?/^-?\d+$/.test(e)?(hr(e),new cs(P,W)):null:us||(us=new cs(0,0))}var cs=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let us;function Yt(e,t,r){for(;0<r||127<t;)e.g.push(127&t|128),t=(t>>>7|r<<25)>>>0,r>>>=7;e.g.push(t)}function xt(e,t){for(;127<t;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function fr(e,t){if(0<=t)xt(e,t);else{for(let r=0;9>r;r++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function _t(e,t){e.g.push(t>>>0&255),e.g.push(t>>>8&255),e.g.push(t>>>16&255),e.g.push(t>>>24&255)}function nt(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function pe(e,t,r){xt(e.g,8*t+r)}function yn(e,t){return pe(e,t,2),t=e.g.end(),nt(e,t),t.push(e.h),t}function vn(e,t){var r=t.pop();for(r=e.h+e.g.length()-r;127<r;)t.push(127&r|128),r>>>=7,e.h++;t.push(r),e.h++}function dr(e,t,r){pe(e,t,2),xt(e.g,r.length),nt(e,e.g.end()),nt(e,r)}function zr(e,t,r,n){r!=null&&(t=yn(e,t),n(r,e),vn(e,t))}class ct{constructor(t,r,n,s){this.g=t,this.h=r,this.l=n,this.la=s}}function Y(e){return Array.prototype.slice.call(e)}const ke=typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol():void 0;var pr=ke?(e,t)=>{e[ke]|=t}:(e,t)=>{e.D!==void 0?e.D|=t:Object.defineProperties(e,{D:{value:t,configurable:!0,writable:!0,enumerable:!1}})};function hs(e){const t=L(e);(1&t)!=1&&(Object.isFrozen(e)&&(e=Y(e)),C(e,1|t))}var Jt=ke?(e,t)=>{e[ke]&=~t}:(e,t)=>{e.D!==void 0&&(e.D&=~t)};function z(e,t,r){return r?e|t:e&~t}var L=ke?e=>0|e[ke]:e=>0|e.D,v=ke?e=>e[ke]:e=>e.D,C=ke?(e,t)=>{e[ke]=t}:(e,t)=>{e.D!==void 0?e.D=t:Object.defineProperties(e,{D:{value:t,configurable:!0,writable:!0,enumerable:!1}})};function ls(){var e=[];return pr(e,1),e}function ut(e){return pr(e,34),e}function pa(e,t){C(t,-14591&(0|e))}function Wr(e,t){C(t,-14557&(34|e))}function Zt(e){return(e=e>>14&1023)===0?536870912:e}var Ft={},pi={};function fs(e){return!(!e||typeof e!="object"||e.Ia!==pi)}function gt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.constructor===Object}let gi=!an;function mi(e,t,r){if(e!=null){if(typeof e=="string")e=e?new Ge(e,tt):rt();else if(e.constructor!==Ge)if(ar(e))e=r?oi(e):e.length?new Ge(new Uint8Array(e),tt):rt();else{if(!t)throw Error();e=void 0}}return e}function Hr(e,t,r){if(!Array.isArray(e)||e.length)return!1;const n=L(e);return!!(1&n)||!(!t||!(Array.isArray(t)?t.includes(r):t.has(r)))&&(C(e,1|n),!0)}var Qe;const ds=[];function Le(e){if(2&e)throw Error()}C(ds,55),Qe=Object.freeze(ds);class Qt{constructor(t,r,n){this.l=0,this.g=t,this.h=r,this.m=n}next(){if(this.l<this.g.length){const t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new Qt(this.g,this.h,this.m)}}var ga={};let Pe,st;function yi(e,t){(t=Pe?t[Pe]:void 0)&&(e[Pe]=Y(t))}function vi(e,t){e.__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity=t}function _i(e){return vi(e=Error(e),"warning"),e}function ze(e){return e==null?e:typeof e=="number"||e==="NaN"||e==="Infinity"||e==="-Infinity"?Number(e):void 0}function wi(e){return e==null?e:typeof e=="boolean"||typeof e=="number"?!!e:void 0}const ma=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function gr(e){const t=typeof e;return t==="number"?Number.isFinite(e):t==="string"&&ma.test(e)}function ht(e){if(e==null)return e;if(typeof e=="string"){if(!e)return;e=+e}return typeof e=="number"?e:void 0}function ya(e){if(e==null)return e;if(typeof e=="string"){if(!e)return;e=+e}return typeof e=="number"?e:void 0}function _n(e){return Math.trunc(e)}function wn(e,t){var r=Math.trunc(Number(e));return Number.isSafeInteger(r)?String(r):((r=e.indexOf("."))!==-1&&(e=e.substring(0,r)),t&&(hr(e),e=ui()),e)}function er(e){return e==null?e:gr(e)?typeof e=="number"?_n(e):wn(e,!1):void 0}function Lt(e){if(typeof e!="string")throw Error();return e}function Ot(e){if(e!=null&&typeof e!="string")throw Error();return e}function wt(e){return e==null||typeof e=="string"?e:void 0}function bn(e,t,r,n){if(e!=null&&typeof e=="object"&&e.P===Ft)return e;if(!Array.isArray(e))return r?2&n?(e=t[ps])?t=e:(ut((e=new t).s),t=t[ps]=e):t=new t:t=void 0,t;let s=r=L(e);return s===0&&(s|=32&n),s|=2&n,s!==r&&C(e,s),new t(e)}const ps=typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol():"di";function Bt(e){return e}function va(e,t,r){if(t){var n=!!n;if(!gr(t=e))throw _i("int64");typeof t=="string"?n=wn(t,n):n?(t=Math.trunc(t),!n||Number.isSafeInteger(t)?n=String(t):(ur(t),n=ui())):n=_n(t)}else n=er(e);return typeof(r=(e=n)==null?r?0:void 0:e)=="string"&&(n=+r,Number.isSafeInteger(n))?n:r}let tr,rr,gs;function nr(e){switch(typeof e){case"boolean":return rr||(rr=[0,void 0,!0]);case"number":return 0<e?void 0:e===0?gs||(gs=[0,void 0]):[-e,void 0];case"string":return[0,e];case"object":return e}}function qe(e,t){return bi(e,t[0],t[1])}function bi(e,t,r){if(e==null&&(e=tr),tr=void 0,e==null){var n=96;r?(e=[r],n|=512):e=[],t&&(n=-16760833&n|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error();if(64&(n=L(e)))return st&&delete e[st],e;if(n|=64,r&&(n|=512,r!==e[0]))throw Error();e:{if(r=n,n=e.length){const s=n-1;if(gt(e[s])){if(1024<=(t=s-(+!!(512&(r|=256))-1)))throw Error();n=-16760833&r|(1023&t)<<14;break e}}if(t){if(1024<(t=Math.max(t,n-(+!!(512&r)-1))))throw Error();n=-16760833&r|(1023&t)<<14}else n=r}}return C(e,n),e}let _a=function(){try{return new class extends Map{constructor(){super()}},!1}catch{return!0}}();class Mr{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,r){return this.g.set(t,r),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,r){return this.g.forEach(t,r)}[Symbol.iterator](){return this.entries()}}const wa=_a?(Object.setPrototypeOf(Mr.prototype,Map.prototype),Object.defineProperties(Mr.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),Mr):class extends Map{constructor(){super()}};function Pr(e){if(2&e.I)throw Error("Cannot mutate an immutable Map")}var le=class extends wa{constructor(e,t,r=Bt,n=Bt){super();let s=L(e);s|=64,C(e,s),this.I=s,this.O=t,this.J=r||Bt,this.S=this.O?ba:n||Bt;for(let i=0;i<e.length;i++){const o=e[i],c=r(o[0],!1,!0);let a=o[1];t?a===void 0&&(a=null):a=n(o[1],!1,!0,void 0,void 0,s),super.set(c,a)}}ka(e=ms){return this.R(e)}R(e=ms){const t=[],r=super.entries();for(var n;!(n=r.next()).done;)(n=n.value)[0]=e(n[0]),n[1]=e(n[1]),t.push(n);return t}clear(){Pr(this),super.clear()}delete(e){return Pr(this),super.delete(this.J(e,!0,!1))}entries(){var e=this.ha();return new Qt(e,Ea,this)}keys(){return this.Ha()}values(){var e=this.ha();return new Qt(e,le.prototype.get,this)}forEach(e,t){super.forEach((r,n)=>{e.call(t,this.get(n),n,this)})}set(e,t){return Pr(this),(e=this.J(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.S(t,!0,!0,this.O,!1,this.I))}Oa(e){const t=this.J(e[0],!1,!0);e=e[1],e=this.O?e===void 0?null:e:this.S(e,!1,!0,void 0,!1,this.I),super.set(t,e)}has(e){return super.has(this.J(e,!1,!1))}get(e){e=this.J(e,!1,!1);const t=super.get(e);if(t!==void 0){var r=this.O;return r?((r=this.S(t,!1,!0,r,this.ra,this.I))!==t&&super.set(e,r),r):t}}ha(){return Array.from(super.keys())}Ha(){return super.keys()}[Symbol.iterator](){return this.entries()}};function ba(e,t,r,n,s,i){return e=bn(e,n,r,i),s&&(e=mr(e)),e}function ms(e){return e}function Ea(e){return[e,this.get(e)]}function En(e,t,r,n,s,i){if(e!=null){if(Array.isArray(e))e=s&&e.length==0&&1&L(e)?void 0:i&&2&L(e)?e:An(e,t,r,n!==void 0,s,i);else if(gt(e)){const o={};for(let c in e)o[c]=En(e[c],t,r,n,s,i);e=o}else e=t(e,n);return e}}function An(e,t,r,n,s,i){const o=n||r?L(e):0;n=n?!!(32&o):void 0;const c=Y(e);for(let a=0;a<c.length;a++)c[a]=En(c[a],t,r,n,s,i);return r&&(yi(c,e),r(o,c)),c}function Aa(e){return En(e,Ei,void 0,void 0,!1,!1)}function Ei(e){return e.P===Ft?e.toJSON():e instanceof le?e.ka(Aa):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t){if(Array.isArray(t))return gi||!Hr(t,void 0,9999)?t:void 0;if(ar(t))return Jn(t);if(t instanceof Ge){const r=t.T;return r==null?"":typeof r=="string"?r:t.T=Jn(r)}if(t instanceof le)return t=t.ka(),Nr||t.length!==0?t:void 0}}return t}(e)}function Xr(e,t,r=Wr){if(e!=null){if(ei&&e instanceof Uint8Array)return t?e:new Uint8Array(e);if(Array.isArray(e)){var n=L(e);return 2&n?e:(t&&(t=n===0||!!(32&n)&&!(64&n||!(16&n))),t?(C(e,-12293&(34|n)),e):An(e,Xr,4&n?Wr:r,!0,!1,!0))}return e.P===Ft?(r=e.s,e=2&(n=v(r))?e:Tn(e,r,n,!0)):e instanceof le&&(r=ut(e.R(Xr)),e=new le(r,e.O,e.J,e.S)),e}}function Tn(e,t,r,n){return e=e.constructor,tr=t=Ai(t,r,n),t=new e(t),tr=void 0,t}function Ai(e,t,r){const n=r||2&t?Wr:pa,s=!!(32&t);return e=function(i,o,c){const a=Y(i);var u=a.length;const h=256&o?a[u-1]:void 0;for(u+=h?-1:0,o=512&o?1:0;o<u;o++)a[o]=c(a[o]);if(h){o=a[o]={};for(const m in h)o[m]=c(h[m])}return yi(a,i),a}(e,t,i=>Xr(i,s,n)),pr(e,32|(r?2:0)),e}function mr(e){const t=e.s,r=v(t);return 2&r?Tn(e,t,r,!1):e}function it(e,t){return Ce(e=e.s,v(e),t)}function Ce(e,t,r,n){if(r===-1)return null;if(r>=Zt(t)){if(256&t)return e[e.length-1][r]}else{var s=e.length;if(n&&256&t&&(n=e[s-1][r])!=null)return n;if((t=r+(+!!(512&t)-1))<s)return e[t]}}function b(e,t,r,n){const s=e.s;let i=v(s);return Le(i),E(s,i,t,r,n),e}function E(e,t,r,n,s){var i=Zt(t);if(r>=i||s){if(s=t,256&t)i=e[e.length-1];else{if(n==null)return s;i=e[i+(+!!(512&t)-1)]={},s|=256}return i[r]=n,s!==t&&C(e,s),s}return e[r+(+!!(512&t)-1)]=n,256&t&&r in(e=e[e.length-1])&&delete e[r],t}function We(e,t,r,n,s){var i=2&t;let o=Ce(e,t,r,s);Array.isArray(o)||(o=Qe);const c=!(2&n);n=!(1&n);const a=!!(32&t);let u=L(o);return u!==0||!a||i||c?1&u||(u|=1,C(o,u)):(u|=33,C(o,u)),i?(e=!1,2&u||(ut(o),e=!!(4&u)),(n||e)&&Object.freeze(o)):(i=!!(2&u)||!!(2048&u),n&&i?(o=Y(o),n=1,a&&!c&&(n|=32),C(o,n),E(e,t,r,o,s)):c&&32&u&&!i&&Jt(o,32)),o}function jt(e,t){e=e.s;let r=v(e);const n=Ce(e,r,t),s=ze(n);return s!=null&&s!==n&&E(e,r,t,s),s}function Ti(e){e=e.s;let t=v(e);const r=Ce(e,t,1),n=mi(r,!0,!!(34&t));return n!=null&&n!==r&&E(e,t,1,n),n}function et(e,t,r){var n=2;e=e.s;let s=v(e);2&s&&(n=1);let i=We(e,s,t,1);s=v(e);var o=L(i);let c=o,a=!!(2&o);const u=a&&!!(4&o);if(!(4&o)){Object.isFrozen(i)&&(i=Y(i),c=0,a=!!(2&(o=bt(o,s,!1))),s=E(e,s,t,i)),o=z(o,4,!1),o=z(o,4096,!1),o=z(o,8192,!1);let h=0,m=0;for(;h<i.length;h++){const O=r(i[h]);O!=null&&(i[m++]=O)}m<h&&(i.length=m),o=z(o,20,!0)}return u||((r=n===1)&&(o=z(o,2,!0)),o!==c&&C(i,o),(r||a)&&Object.freeze(i)),n===2&&a&&(i=Y(i),o=bt(o,s,!1),C(i,o),E(e,s,t,i)),i}let ys;function vs(){return ys??(ys=new le(ut([]),void 0,void 0,void 0,ga))}function ki(e){e=Y(e);for(let t=0;t<e.length;t++){const r=e[t]=Y(e[t]);Array.isArray(r[1])&&(r[1]=ut(r[1]))}return e}function sr(e,t,r){{const o=e.s;let c=v(o);if(Le(c),r==null)E(o,c,t);else{var n=e=L(r),s=!!(2&e)||Object.isFrozen(r),i=!s&&!1;if(!(4&e)){e=21,s&&(r=Y(r),n=0,e=bt(e,c,!0)),s=!!(4&e)&&!!(4096&e);for(let a=0;a<r.length;a++)r[a]=Lt(r[a])}i&&(e=z(e,2,!0)),e!==n&&C(r,e),i&&Object.freeze(r),E(o,c,t,r)}}}function Mt(e,t,r,n){const s=v(e);Le(s),e=We(e,s,t,2),n=r(n,!!(4&(t=L(e)))&&!!(4096&t)),e.push(n)}function Ta(e){return e}function Ir(e,t){return kn(e=e.s,v(e),ao)===t?t:-1}function kn(e,t,r){let n=0;for(let s=0;s<r.length;s++){const i=r[s];Ce(e,t,i)!=null&&(n!==0&&(t=E(e,t,n)),n=i)}return n}function Sn(e,t,r,n){let s=v(e);Le(s);const i=Ce(e,s,r,n);let o;if(i!=null&&i.P===Ft)return(t=mr(i))!==i&&E(e,s,r,t,n),t.s;if(Array.isArray(i)){const c=L(i);o=2&c?Ai(i,c,!1):i,o=qe(o,t)}else o=qe(void 0,t);return o!==i&&E(e,s,r,o,n),o}function Si(e,t,r,n){e=e.s;let s=v(e);const i=Ce(e,s,r,n);return(t=bn(i,t,!1,s))!==i&&t!=null&&E(e,s,r,t,n),t}function _(e,t,r,n=!1){if((t=Si(e,t,r,n))==null)return t;e=e.s;let s=v(e);if(!(2&s)){const i=mr(t);i!==t&&E(e,s,r,t=i,n)}return t}function xi(e,t,r,n,s,i,o){const c=s===1;s=s===2,i=!!i;var a=!!(2&t)&&s;let u=We(e,t,n,3);t=v(e);var h=L(u),m=!!(2&h);const O=!!(4&h),De=!!(32&h);let G=m&&O||!!(2048&h);if(!O){var X=u,Ue=t;const Tr=!!(2&h);Tr&&(Ue=z(Ue,2,!0));let kr=!Tr,Sr=!0,It=0,xr=0;for(;It<X.length;It++){const Fr=bn(X[It],r,!1,Ue);if(Fr instanceof r){if(!Tr){const Kn=!!(2&L(Fr.s));kr&&(kr=!Kn),Sr&&(Sr=Kn)}X[xr++]=Fr}}xr<It&&(X.length=xr),h=z(h,4,!0),h=z(h,16,Sr),h=z(h,8,kr),C(X,h),m&&!a&&(Object.freeze(u),G=!0)}if(r=h,a=!!(8&h)||c&&!u.length,o&&!a){for(G&&(u=Y(u),G=!1,r=0,h=bt(h,t,i),t=E(e,t,n,u)),o=u,a=h,m=0;m<o.length;m++)(X=o[m])!==(h=mr(X))&&(o[m]=h);a=z(a,8,!0),h=a=z(a,16,!o.length)}return G||(c?h=z(h,!u.length||16&h&&(!O||De)?2:2048,!0):i||(h=z(h,32,!1)),h!==r&&C(u,h),c&&(Object.freeze(u),G=!0)),s&&G&&(u=Y(u),h=bt(h,t,i),C(u,h),E(e,t,n,u)),u}function Re(e,t,r){e=e.s;const n=v(e),s=!!(2&n);return xi(e,n,t,r,s?1:2,!1,!s)}function p(e,t,r,n,s){return n==null&&(n=void 0),b(e,r,n,s)}function mt(e,t,r,n){n==null&&(n=void 0),e=e.s;let s=v(e);Le(s),(r=kn(e,s,r))&&r!==t&&n!=null&&(s=E(e,s,r)),E(e,s,t,n)}function bt(e,t,r){return e=z(e,2,!!(2&t)),e=z(e,32,!!(32&t)&&r),z(e,2048,!1)}function Kr(e,t,r){e=e.s;const n=v(e);Le(n),e=xi(e,n,t,1,2),t=r??new t,e.push(t),2&L(t.s)?Jt(e,8):Jt(e,16)}function ue(e,t){return ht(it(e,t))}function fe(e,t){return wt(it(e,t))}function Se(e){return e??0}function H(e,t){return Se(jt(e,t))}function Et(e,t,r){if(r!=null){if(typeof r!="boolean")throw e=typeof r,Error(`Expected boolean but got ${e!="object"?e:r?Array.isArray(r)?"array":e:"null"}: ${r}`);r=!!r}b(e,t,r)}function xe(e,t,r){if(r!=null){if(typeof r!="number")throw _i("int32");if(!Number.isFinite(r)){const n=Error();vi(n,"incident"),function(s){or.setTimeout(()=>{throw s},0)}(n)}}b(e,t,r)}function g(e,t,r){if(r!=null&&typeof r!="number")throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);b(e,t,r)}function ye(e,t,r){t.g?t.m(e,t.g,t.h,r,!0):t.m(e,t.h,r,!0)}le.prototype.toJSON=void 0,le.prototype.Ia=pi;var l=class{constructor(e,t){this.s=bi(e,t)}toJSON(){return Fi(this,An(this.s,Ei,void 0,void 0,!1,!1),!0)}l(){var e=L1;return e.g?e.l(this,e.g,e.h,!0,2):e.l(this,e.h,e.defaultValue,!0)}clone(){const e=this.s;return Tn(this,e,v(e),!1)}H(){return!!(2&L(this.s))}};function Fi(e,t,r){const n=e.constructor.A;var s=v(r?e.s:t),i=Zt(s),o=!1;if(n&&gi){if(!r){var c;if((t=Y(t)).length&>(c=t[t.length-1])){for(o=0;o<n.length;o++)if(n[o]>=i){Object.assign(t[t.length-1]={},c);break}}o=!0}var a;i=t,r=!r,e=Zt(c=v(e.s)),c=+!!(512&c)-1;for(let Ue=0;Ue<n.length;Ue++){var u=n[Ue];if(u<e){var h=i[u+=c];h==null?i[u]=r?Qe:ls():r&&h!==Qe&&hs(h)}else{if(!a){var m=void 0;i.length&>(m=i[i.length-1])?a=m:i.push(a={})}h=a[u],a[u]==null?a[u]=r?Qe:ls():r&&h!==Qe&&hs(h)}}}if(!(a=t.length))return t;let O,De;if(gt(m=t[a-1])){e:{var G=m;for(var X in i={},r=!1,G)e=G[X],Array.isArray(e)&&(c=e,(!ts&&Hr(e,n,+X)||!Nr&&fs(e)&&e.size===0)&&(e=null),e!=c&&(r=!0)),e!=null?i[X]=e:r=!0;if(r){for(let Ue in i){G=i;break e}G=null}}G!=m&&(O=!0),a--}for(s=+!!(512&s)-1;0<a&&((m=t[X=a-1])==null||!ts&&Hr(m,n,X-s)||!Nr&&fs(m)&&m.size===0);a--)De=!0;return(O||De)&&(t=o?t:Array.prototype.slice.call(t,0,a),o&&(t.length=a),G&&t.push(G)),t}function Li(e){return Array.isArray(e)?e[0]instanceof ct?e:[Ca,e]:[e,void 0]}function lt(e,t){if(Array.isArray(t)){var r=L(t);if(4&r)return t;for(var n=0,s=0;n<t.length;n++){const i=e(t[n]);i!=null&&(t[s++]=i)}return s<n&&(t.length=s),C(t,-12289&(5|r)),2&r&&Object.freeze(t),t}}l.prototype.P=Ft,l.prototype.toString=function(){return Fi(this,this.s,!1).toString()};const _s=Symbol();function xn(e){let t=e[_s];if(!t){const r=Oi(e),n=Ln(e),s=n.g;t=s?(i,o)=>s(i,o,n):(i,o)=>{for(;fi(o)&&o.h!=4;){var c=o.m,a=n[c];if(!a){var u=n.fa;u&&(u=u[c])&&(a=n[c]=ka(u))}a&&a(o,i,c)||(c=(a=o).l,Gt(a),a.ea?a=void 0:(u=a.g.g-c,a.g.g=c,a=li(a.g,u)),c=i,a&&(Pe||(Pe=Symbol()),(u=c[Pe])?u.push(a):c[Pe]=[a]))}r===$r||r===qr||r.Ja||(i[st||(st=Symbol())]=r)},e[_s]=t}return t}function ka(e){const t=(e=Li(e))[0].g;if(e=e[1]){const r=xn(e),n=Ln(e).K;return(s,i,o)=>t(s,i,o,n,r)}return t}let $r,qr;const Vt=Symbol();function Sa(e,t,r){const n=r[1];let s;if(n){const i=n[Vt];s=i?i.K:nr(n[0]),e[t]=i??n}s&&s===rr?(e.ia||(e.ia=[])).push(t):r[0]&&(e.ja||(e.ja=[])).push(t)}function ws(e,t){return[e.l,!t||0<t[0]?void 0:t]}function Oi(e){var t=e[Vt];if(t)return t;if(!(t=Fn(e,e[Vt]={},ws,ws,Sa)).ja&&!t.ia){let r=!0;for(let n in t){isNaN(n)||(r=!1);break}r?(t=nr(e[0])===rr,t=e[Vt]=t?qr||(qr={K:nr(!0)}):$r||($r={})):t.Ja=!0}return t}function xa(e,t,r){e[t]=r}function Fn(e,t,r,n,s=xa){t.K=nr(e[0]);let i=0;var o=e[++i];o&&o.constructor===Object&&(t.fa=o,typeof(o=e[++i])=="function"&&(t.g=o,t.h=e[++i],o=e[++i]));const c={};for(;Array.isArray(o)&&typeof o[0]=="number"&&0<o[0];){for(var a=0;a<o.length;a++)c[o[a]]=o;o=e[++i]}for(a=1;o!==void 0;){let m;typeof o=="number"&&(a+=o,o=e[++i]);var u=void 0;if(o instanceof ct?m=o:(m=Ba,i--),m.la){o=e[++i],u=e;var h=i;typeof o=="function"&&(o=o(),u[h]=o),u=o}for(h=a+1,typeof(o=e[++i])=="number"&&0>o&&(h-=o,o=e[++i]);a<h;a++){const O=c[a];s(t,a,u?n(m,u,O):r(m,O))}}return t}const bs=Symbol();function Mi(e){let t=e[bs];if(!t){const r=yr(e);t=(n,s)=>Pi(n,s,r),e[bs]=t}return t}const zt=Symbol();function Fa(e){return e.h}function La(e,t){let r,n;const s=e.h;return(i,o,c)=>s(i,o,c,n||(n=yr(t).K),r||(r=Mi(t)))}function yr(e){let t=e[zt];return t||(t=Fn(e,e[zt]={},Fa,La),Wt in e&&zt in e&&(e.length=0),t)}const Wt=Symbol();function Oa(e,t){const r=e.g;return t?(n,s,i)=>r(n,s,i,t):r}function Ma(e,t,r){const n=e.g;let s,i;return(o,c,a)=>n(o,c,a,i||(i=Ln(t).K),s||(s=xn(t)),r)}function Ln(e){let t=e[Wt];return t||(Oi(e),t=Fn(e,e[Wt]={},Oa,Ma),Wt in e&&zt in e&&(e.length=0),t)}function Es(e,t){var r=e[t];if(r)return r;if((r=e.fa)&&(r=r[t])){var n=(r=Li(r))[0].h;if(r=r[1]){const s=Mi(r),i=yr(r).K;r=(r=e.h)?r(i,s):(o,c,a)=>n(o,c,a,i,s)}else r=n;return e[t]=r}}function Pi(e,t,r){for(var n=v(e),s=+!!(512&n)-1,i=e.length,o=512&n?1:0,c=i+(256&n?-1:0);o<c;o++){const a=e[o];if(a==null)continue;const u=o-s,h=Es(r,u);h&&h(t,a,u)}if(256&n){n=e[i-1];for(let a in n)s=+a,Number.isNaN(s)||(i=n[a])!=null&&(c=Es(r,s))&&c(t,i,s)}if(e=Pe?e[Pe]:void 0)for(nt(t,t.g.end()),r=0;r<e.length;r++)nt(t,cn(e[r])||cr())}function J(e,t){return new ct(e,t,!1,!1)}function ft(e,t){return new ct(e,t,!0,!1)}function vr(e,t){return new ct(e,t,!1,!0)}function Z(e,t,r){E(e,v(e),t,r)}var Pa=vr(function(e,t,r,n,s){return e.h===2&&(e=St(e,qe([void 0,void 0],n),s),Le(n=v(t)),(s=Ce(t,n,r))instanceof le?2&s.I?((s=s.R()).push(e),E(t,n,r,s)):s.Oa(e):Array.isArray(s)?(2&L(s)&&E(t,n,r,s=ki(s)),s.push(e)):E(t,n,r,[e]),!0)},function(e,t,r,n,s){if(t instanceof le)t.forEach((i,o)=>{zr(e,r,qe([o,i],n),s)});else if(Array.isArray(t))for(let i=0;i<t.length;i++){const o=t[i];Array.isArray(o)&&zr(e,r,qe(o,n),s)}});function Ii(e,t,r){e:if(t!=null){if(gr(t)){if(typeof t=="string"){t=wn(t,!1);break e}if(typeof t=="number"){t=_n(t);break e}}t=void 0}t!=null&&(typeof t=="string"&&as(t),t!=null&&(pe(e,r,0),typeof t=="number"?(e=e.g,ur(t),Yt(e,P,W)):(r=as(t),Yt(e.g,r.h,r.g))))}function Ri(e,t,r){(t=ht(t))!=null&&t!=null&&(pe(e,r,0),fr(e.g,t))}function Ci(e,t,r){(t=wi(t))!=null&&(pe(e,r,0),e.g.g.push(t?1:0))}function Bi(e,t,r){(t=wt(t))!=null&&dr(e,r,Ys(t))}function _r(e,t,r,n,s){zr(e,r,t instanceof l?t.s:Array.isArray(t)?qe(t,n):void 0,s)}function Di(e,t,r){(t=t==null||typeof t=="string"||ar(t)||t instanceof Ge?t:void 0)!=null&&dr(e,r,hn(t).buffer)}function Ui(e,t,r){return(e.h===5||e.h===2)&&(t=We(t,v(t),r,2,!1),e.h==2?lr(e,kt.prototype.B,t):t.push(e.g.B()),!0)}var D,Ie=J(function(e,t,r){if(e.h!==1)return!1;var n=e.g;e=Vr(n);const s=Vr(n);n=2*(s>>31)+1;const i=s>>>20&2047;return e=4294967296*(1048575&s)+e,Z(t,r,i==2047?e?NaN:1/0*n:i==0?n*Math.pow(2,-1074)*e:n*Math.pow(2,i-1075)*(e+4503599627370496)),!0},function(e,t,r){(t=ze(t))!=null&&(pe(e,r,1),e=e.g,(r=qt||(qt=new DataView(new ArrayBuffer(8)))).setFloat64(0,+t,!0),P=r.getUint32(0,!0),W=r.getUint32(4,!0),_t(e,P),_t(e,W))}),U=J(function(e,t,r){return e.h===5&&(Z(t,r,e.g.B()),!0)},function(e,t,r){(t=ze(t))!=null&&(pe(e,r,5),e=e.g,fn(t),_t(e,P))}),Ia=ft(Ui,function(e,t,r){if((t=lt(ze,t))!=null)for(let i=0;i<t.length;i++){var n=e,s=t[i];s!=null&&(pe(n,r,5),n=n.g,fn(s),_t(n,P))}}),On=ft(Ui,function(e,t,r){if((t=lt(ze,t))!=null&&t.length){pe(e,r,2),xt(e.g,4*t.length);for(let n=0;n<t.length;n++)r=e.g,fn(t[n]),_t(r,P)}}),je=J(function(e,t,r){return e.h===0&&(Z(t,r,pn(e.g,ci)),!0)},Ii),Rr=J(function(e,t,r){return e.h===0&&(Z(t,r,(e=pn(e.g,ci))===0?void 0:e),!0)},Ii),Ra=J(function(e,t,r){return e.h===0&&(Z(t,r,pn(e.g,ai)),!0)},function(e,t,r){e:if(t!=null){if(gr(t)){if(typeof t=="string"){var n=Math.trunc(Number(t));Number.isSafeInteger(n)?t=String(n):((n=t.indexOf("."))!==-1&&(t=t.substring(0,n)),hr(t),t=Gr(P,W));break e}if(typeof t=="number"){t=Math.trunc(t);break e}}t=void 0}t!=null&&(typeof t=="string"&&ss(t),t!=null&&(pe(e,r,0),typeof t=="number"?(e=e.g,ur(t),Yt(e,P,W)):(r=ss(t),Yt(e.g,r.h,r.g))))}),R=J(function(e,t,r){return e.h===0&&(Z(t,r,e.g.m()),!0)},Ri),Mn=ft(function(e,t,r){return(e.h===0||e.h===2)&&(t=We(t,v(t),r,2,!1),e.h==2?lr(e,kt.prototype.m,t):t.push(e.g.m()),!0)},function(e,t,r){if((t=lt(ht,t))!=null&&t.length){r=yn(e,r);for(let n=0;n<t.length;n++)fr(e.g,t[n]);vn(e,r)}}),ot=J(function(e,t,r){return e.h===0&&(Z(t,r,(e=e.g.m())===0?void 0:e),!0)},Ri),B=J(function(e,t,r){return e.h===0&&(Z(t,r,gn(e.g)),!0)},Ci),yt=J(function(e,t,r){return e.h===0&&(Z(t,r,(e=gn(e.g))===!1?void 0:e),!0)},Ci),K=ft(function(e,t,r){return e.h===2&&(Mt(t,r,Ta,e=mn(e)),!0)},function(e,t,r){if((t=lt(wt,t))!=null)for(let s=0;s<t.length;s++){var n=t[s];n!=null&&dr(e,r,Ys(n))}}),Ve=J(function(e,t,r){return e.h===2&&(Z(t,r,(e=mn(e))===""?void 0:e),!0)},Bi),T=J(function(e,t,r){return e.h===2&&(Z(t,r,mn(e)),!0)},Bi),Ca=vr(function(e,t,r,n,s){return e.h===2&&(St(e,Sn(t,n,r,!0),s),!0)},_r),Ba=vr(function(e,t,r,n,s){return e.h===2&&(St(e,Sn(t,n,r),s),!0)},_r);D=new ct(function(e,t,r,n,s){if(e.h!==2)return!1;n=qe(void 0,n);let i=v(t);Le(i);let o=We(t,i,r,3);return i=v(t),4&L(o)&&(o=Y(o),C(o,-2079&(1|L(o))),E(t,i,r,o)),o.push(n),St(e,n,s),!0},function(e,t,r,n,s){if(Array.isArray(t))for(let i=0;i<t.length;i++)_r(e,t[i],r,n,s)},!0,!0);var k=vr(function(e,t,r,n,s,i){if(e.h!==2)return!1;let o=v(t);return Le(o),(i=kn(t,o,i))&&r!==i&&E(t,o,i),St(e,t=Sn(t,n,r),s),!0},_r),Ni=J(function(e,t,r){return e.h===2&&(Z(t,r,di(e)),!0)},Di),Da=ft(function(e,t,r){return(e.h===0||e.h===2)&&(t=We(t,v(t),r,2,!1),e.h==2?lr(e,kt.prototype.j,t):t.push(e.g.j()),!0)},function(e,t,r){if((t=lt(ya,t))!=null)for(let i=0;i<t.length;i++){var n=e,s=t[i];s!=null&&(pe(n,r,0),xt(n.g,s))}}),Fe=J(function(e,t,r){return e.h===0&&(Z(t,r,e.g.m()),!0)},function(e,t,r){(t=ht(t))!=null&&(t=parseInt(t,10),pe(e,r,0),fr(e.g,t))}),Ua=ft(function(e,t,r){return(e.h===0||e.h===2)&&(t=We(t,v(t),r,2,!1),e.h==2?lr(e,kt.prototype.C,t):t.push(e.g.m()),!0)},function(e,t,r){if((t=lt(ht,t))!=null&&t.length){r=yn(e,r);for(let n=0;n<t.length;n++)fr(e.g,t[n]);vn(e,r)}});class Na{constructor(t,r){this.h=t,this.g=r,this.l=_,this.m=p,this.defaultValue=void 0}}function ve(e,t){return new Na(e,t)}function He(e,t){return(r,n)=>{e:{if(Ct.length){const i=Ct.pop();i.o(n),jr(i.g,r,n),r=i}else r=new class{constructor(i,o){if(ns.length){const c=ns.pop();jr(c,i,o),i=c}else i=new kt(i,o);this.g=i,this.l=this.g.g,this.h=this.m=-1,this.o(o)}o({ea:i=!1}={}){this.ea=i}}(r,n);try{const i=new e,o=i.s;xn(t)(o,r),st&&delete o[st];var s=i;break e}finally{r.g.clear(),r.m=-1,r.h=-1,100>Ct.length&&Ct.push(r)}s=void 0}return s}}function Pn(e){return function(){const t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const o=this.g;return this.g=[],o}}}};Pi(this.s,t,yr(e)),nt(t,t.g.end());const r=new Uint8Array(t.h),n=t.l,s=n.length;let i=0;for(let o=0;o<s;o++){const c=n[o];r.set(c,i),i+=c.length}return t.l=[r],r}}var Gi=[0,Ve,J(function(e,t,r){return e.h===2&&(Z(t,r,(e=di(e))===rt()?void 0:e),!0)},function(e,t,r){if(t!=null){if(t instanceof l){const n=t.Qa;return void(n&&(t=n(t),t!=null&&dr(e,r,hn(t).buffer)))}if(Array.isArray(t))return}Di(e,t,r)})],Ga=[0,T],ji=[0,R,Fe,B,-1,Mn,Fe,-1],ja=[0,B,-1],Vi=class extends l{constructor(){super()}};Vi.A=[6];var zi=[0,B,T,B,Fe,-1,Ua,T,-1,ja,Fe],Wi=[0,T,-2],As=class extends l{constructor(){super()}},Hi=[0],Xi=[0,R,B,-2],de=class extends l{constructor(e){super(e,2)}},x={},Va=[-2,x,B];x[336783863]=[0,T,B,-1,R,[0,[1,2,3,4,5],k,Hi,k,zi,k,Wi,k,Xi,k,ji],Ga];var za=[0,Ve,yt],Ki=[0,Rr,-1,yt,-3,Rr,Mn,Ve,ot,Rr,-1,yt,ot,yt,-2,Ve],Pt=[-1,{}],$i=[0,T,1,Pt],qi=[0,T,K,Pt];function ge(e,t){t=Ot(t),e=e.s;let r=v(e);Le(r),E(e,r,2,t===""?void 0:t)}function A(e,t){Mt(e.s,3,Lt,t)}function w(e,t){Mt(e.s,4,Lt,t)}var $=class extends l{constructor(e){super(e,500)}o(e){return p(this,0,7,e)}};$.A=[3,4,5,6,8,13,17,1005];var Wa=[-500,Ve,-1,K,-3,Va,D,Gi,ot,-1,$i,qi,D,za,Ve,Ki,ot,K,987,K],Ha=[0,Ve,-1,Pt],Xa=[-500,T,-1,[-1,{}],998,T],Ka=[-500,T,K,-1,[-2,{},B],997,K,-1],$a=[-500,T,K,Pt,998,K];function me(e,t){Kr(e,$,t)}function F(e,t){Mt(e.s,10,Lt,t)}function S(e,t){Mt(e.s,15,Lt,t)}var Q=class extends l{constructor(e){super(e,500)}o(e){return p(this,0,1001,e)}};Q.A=[1,6,7,9,10,15,16,17,14,1002];var Yi=[-500,D,Wa,4,D,Xa,D,Ka,ot,D,$a,K,ot,$i,qi,D,Ha,K,-2,Ki,Ve,-1,yt,979,Pt,D,Gi],qa=He(Q,Yi);Q.prototype.g=Pn(Yi);var Ya=[0,D,[0,R,-2]],Ja=class extends l{constructor(e){super(e)}},Za=[0,R,U,T,-1],In=class extends l{constructor(e){super(e)}g(){return Re(this,Ja,1)}};In.A=[1];var Ji=[0,D,Za],Rn=He(In,Ji),Qa=[0,R,U],e1=[0,R,-1,Ya],t1=class extends l{constructor(e){super(e)}},r1=[0,R,-3],n1=[0,U,-3],s1=class extends l{constructor(e){super(e)}},i1=[0,U,-1,T,U],Ht=class extends l{constructor(e){super(e)}h(){return _(this,t1,2)}g(){return Re(this,s1,5)}};Ht.A=[5];var o1=[0,Fe,r1,n1,e1,D,i1],Zi=class extends l{constructor(e){super(e)}};Zi.A=[1,2,3,8,9];var Qi=He(Zi,[0,K,Mn,On,o1,T,-1,je,D,Qa,K,je]),eo=class extends l{constructor(e){super(e)}},a1=[0,U,-4],to=class extends l{constructor(e){super(e)}};to.A=[1];var Cn=He(to,[0,D,a1]),ro=class extends l{constructor(e){super(e)}},c1=[0,U,-4],no=class extends l{constructor(e){super(e)}};no.A=[1];var wr=He(no,[0,D,c1]),so=class extends l{constructor(e){super(e)}};so.A=[3];var u1=[0,R,-1,On,Fe],io=class extends l{constructor(){super()}};io.prototype.g=Pn([0,U,-4,je]);var h1=class extends l{constructor(e){super(e)}},l1=[0,1,R,T,Ji],oo=class extends l{constructor(e){super(e)}};oo.A=[1];var f1=He(oo,[0,D,l1,je]),Yr=class extends l{constructor(e){super(e)}};Yr.A=[1];var d1=class extends l{constructor(e){super(e)}oa(){const e=Ti(this);return e??rt()}},p1=class extends l{constructor(e){super(e)}},ao=[1,2],g1=[0,ao,k,[0,On],k,[0,Ni],R,T],co=class extends l{constructor(e){super(e)}};co.A=[1];var m1=He(co,[0,D,g1,je]),br=class extends l{constructor(e){super(e)}};br.A=[4,5];var uo=[0,T,R,U,K,-1],Ts=class extends l{constructor(e){super(e)}},y1=[0,B,-1],ks=class extends l{constructor(e){super(e)}},Xt=[1,2,3,4,5],ir=class extends l{constructor(e){super(e)}g(){return Ti(this)!=null}h(){return fe(this,2)!=null}},ho=[0,Ni,T,[0,R,je,-1],[0,Ra,je]],I=class extends l{constructor(e){super(e)}g(){return wi(it(this,2))??!1}},N=[0,ho,B,[0,Xt,k,Xi,k,zi,k,ji,k,Hi,k,Wi],Fe],Bn=class extends l{constructor(e){super(e)}},lo=[0,N,U,-1,R],v1=ve(502141897,Bn);x[502141897]=lo;var fo=[0,ho];x[512499200]=fo;var po=[0,fo];x[515723506]=po;var _1=He(class extends l{constructor(e){super(e)}},[0,[0,Fe,-1,Ia,Da],u1]),go=[0,N];x[508981768]=go;var w1=class extends l{constructor(e){super(e)}},mo=[0,N,U,go,B],yo=class extends l{constructor(e){super(e)}},vo=[0,N,lo,mo,U,po];x[508968149]=mo;var b1=ve(508968150,yo);x[508968150]=vo;var _o=class extends l{constructor(e){super(e)}},E1=ve(513916220,_o);x[513916220]=[0,N,vo,R];var Ze=class extends l{constructor(e){super(e)}h(){return _(this,br,2)}g(){b(this,2)}},wo=[0,N,uo];x[478825465]=wo;var bo=[0,N];x[478825422]=bo;var A1=class extends l{constructor(e){super(e)}},Eo=[0,N,bo,wo,-1],Ao=class extends l{constructor(e){super(e)}},To=[0,N,U,R],ko=class extends l{constructor(e){super(e)}},So=[0,N,U],Dn=class extends l{constructor(e){super(e)}},xo=[0,N,To,So,U],Fo=class extends l{constructor(e){super(e)}},T1=[0,N,xo,Eo];x[463370452]=Eo,x[464864288]=To,x[474472470]=So;var k1=ve(462713202,Dn);x[462713202]=xo;var S1=ve(479097054,Fo);x[479097054]=T1;var Lo=class extends l{constructor(e){super(e)}},x1=ve(456383383,Lo);x[456383383]=[0,N,uo];var Oo=class extends l{constructor(e){super(e)}},F1=ve(476348187,Oo);x[476348187]=[0,N,y1];var Mo=class extends l{constructor(e){super(e)}},Po=[0,Fe,-1],Jr=class extends l{constructor(e){super(e)}};Jr.A=[3];var L1=ve(458105876,class extends l{constructor(e){super(e)}g(){var e=this.s;const t=v(e);var r=2&t;return e=function(n,s,i){var o=Jr;const c=2&s;let a=!1;if(i==null){if(c)return vs();i=[]}else if(i.constructor===le){if(!(2&i.I)||c)return i;i=i.R()}else Array.isArray(i)?a=!!(2&L(i)):i=[];if(c){if(!i.length)return vs();a||(a=!0,ut(i))}else a&&(a=!1,i=ki(i));return a||(64&L(i)?Jt(i,32):32&s&&pr(i,32)),E(n,s,2,o=new le(i,o,va,void 0),!1),o}(e,t,Ce(e,t,2)),e==null||!r&&Jr&&(e.ra=!0),r=e}});x[458105876]=[0,Po,Pa,[!0,je,[0,T,-1,K]]];var Un=class extends l{constructor(e){super(e)}},Io=ve(458105758,Un);x[458105758]=[0,N,T,Po];var Nn=class extends l{constructor(e){super(e)}};Nn.A=[5,6];var O1=ve(443442058,Nn);x[443442058]=[0,N,T,R,U,K,-1];var M1=class extends l{constructor(e){super(e)}},Ro=[0,N,U,-1,R];x[514774813]=Ro;var P1=class extends l{constructor(e){super(e)}},Co=[0,N,U,B],Bo=class extends l{constructor(e){super(e)}},I1=[0,N,Ro,Co,U];x[518928384]=Co;var R1=ve(516587230,Bo);function Zr(e,t){return t=t?t.clone():new br,e.displayNamesLocale!==void 0?b(t,1,Ot(e.displayNamesLocale)):e.displayNamesLocale===void 0&&b(t,1),e.maxResults!==void 0?xe(t,2,e.maxResults):"maxResults"in e&&b(t,2),e.scoreThreshold!==void 0?g(t,3,e.scoreThreshold):"scoreThreshold"in e&&b(t,3),e.categoryAllowlist!==void 0?sr(t,4,e.categoryAllowlist):"categoryAllowlist"in e&&b(t,4),e.categoryDenylist!==void 0?sr(t,5,e.categoryDenylist):"categoryDenylist"in e&&b(t,5),t}function Do(e,t=-1,r=""){return{categories:e.map(n=>({index:Se(ue(n,1))??-1,score:H(n,2)??0,categoryName:fe(n,3)??""??"",displayName:fe(n,4)??""??""})),headIndex:t,headName:r}}function Uo(e){var t,r,n=et(e,3,ze),s=et(e,2,ht);const i=et(e,1,wt),o=et(e,9,wt),c={categories:[],keypoints:[]};for(let a=0;a<n.length;a++)c.categories.push({score:n[a],index:s[a]??-1,categoryName:i[a]??"",displayName:o[a]??""});if((n=(t=_(e,Ht,4))==null?void 0:t.h())&&(c.boundingBox={originX:ue(n,1)??0,originY:ue(n,2)??0,width:ue(n,3)??0,height:ue(n,4)??0,angle:0}),(r=_(e,Ht,4))==null?void 0:r.g().length)for(const a of _(e,Ht,4).g())c.keypoints.push({x:jt(a,1)??0,y:jt(a,2)??0,score:jt(a,4)??0,label:fe(a,3)??""});return c}function Gn(e){const t=[];for(const r of Re(e,ro,1))t.push({x:H(r,1)??0,y:H(r,2)??0,z:H(r,3)??0});return t}function No(e){const t=[];for(const r of Re(e,eo,1))t.push({x:H(r,1)??0,y:H(r,2)??0,z:H(r,3)??0});return t}function Ss(e){return Array.from(e,t=>127<t?t-256:t)}function xs(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let r=0,n=0,s=0;for(let i=0;i<e.length;i++)r+=e[i]*t[i],n+=e[i]*e[i],s+=t[i]*t[i];if(0>=n||0>=s)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*s)}let Dt;x[516587230]=I1;const C1=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function Go(){if(Dt===void 0)try{await WebAssembly.instantiate(C1),Dt=!0}catch{Dt=!1}return Dt}async function Cr(e,t=""){const r=await Go()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${t}/${e}_${r}.js`,wasmBinaryPath:`${t}/${e}_${r}.wasm`}}var Ut=class{};function jo(){const e=navigator.userAgent;return e.includes("Safari")&&!e.includes("Chrome")}async function Fs(e){if(typeof importScripts!="function"){const t=document.createElement("script");return t.src=e.toString(),t.crossOrigin="anonymous",new Promise((r,n)=>{t.addEventListener("load",()=>{r()},!1),t.addEventListener("error",s=>{n(s)},!1),document.body.appendChild(t)})}importScripts(e.toString())}function f(e,t,r){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function Ls(e,t,r){if(!e.i.canvas)throw Error("No OpenGL canvas configured.");if(r?e.i._bindTextureToStream(r):e.i._bindTextureToCanvas(),!(r=e.i.canvas.getContext("webgl2")||e.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");return e.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),t.videoWidth?(r=t.videoWidth,t=t.videoHeight):t.naturalWidth?(r=t.naturalWidth,t=t.naturalHeight):(r=t.width,t=t.height),!e.l||r===e.i.canvas.width&&t===e.i.canvas.height||(e.i.canvas.width=r,e.i.canvas.height=t),[r,t]}function Os(e,t,r){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const n=new Uint32Array(t.length);for(let s=0;s<t.length;s++)n[s]=e.i.stringToNewUTF8(t[s]);t=e.i._malloc(4*n.length),e.i.HEAPU32.set(n,t>>2),r(t);for(const s of n)e.i._free(s);e.i._free(t)}function Oe(e,t,r){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=r}function Ke(e,t,r){let n=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(s,i,o)=>{i?(r(n,o),n=[]):n.push(s)}}Ut.forVisionTasks=function(e){return Cr("vision",e)},Ut.forTextTasks=function(e){return Cr("text",e)},Ut.forAudioTasks=function(e){return Cr("audio",e)},Ut.isSimdSupported=function(){return Go()};async function B1(e,t,r,n){return e=await(async(s,i,o,c,a)=>{if(i&&await Fs(i),!self.ModuleFactory||o&&(await Fs(o),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&a&&((i=self.Module).locateFile=a.locateFile,a.mainScriptUrlOrBlob&&(i.mainScriptUrlOrBlob=a.mainScriptUrlOrBlob)),a=await self.ModuleFactory(self.Module||a),self.ModuleFactory=self.Module=void 0,new s(a,c)})(e,r.wasmLoaderPath,r.assetLoaderPath,t,{locateFile:s=>s.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&s.endsWith(".data")?r.assetBinaryPath.toString():s}),await e.o(n),e}function Ms(e,t){const r=_(e.baseOptions,ir,1)||new ir;typeof t=="string"?(b(r,2,Ot(t)),b(r,1)):t instanceof Uint8Array&&(b(r,1,mi(t,!1,!1)),b(r,2)),p(e.baseOptions,0,1,r)}function Ps(e){try{const t=e.L.length;if(t===1)throw Error(e.L[0].message);if(1<t)throw Error("Encountered multiple errors: "+e.L.map(r=>r.message).join(", "))}finally{e.L=[]}}function d(e,t){e.N=Math.max(e.N,t)}function jn(e,t){e.B=new $,ge(e.B,"PassThroughCalculator"),A(e.B,"free_memory"),w(e.B,"free_memory_unused_out"),F(t,"free_memory"),me(t,e.B)}function At(e,t){A(e.B,t),w(e.B,t+"_unused_out")}function Vn(e){e.g.addBoolToStream(!0,"free_memory",e.N)}var Qr=class{constructor(e){this.g=e,this.L=[],this.N=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){var r,n,s,i,o,c;if(t){const a=e.baseOptions||{};if((r=e.baseOptions)!=null&&r.modelAssetBuffer&&((n=e.baseOptions)!=null&&n.modelAssetPath))throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!((s=_(this.baseOptions,ir,1))!=null&&s.g()||(i=_(this.baseOptions,ir,1))!=null&&i.h()||(o=e.baseOptions)!=null&&o.modelAssetBuffer||(c=e.baseOptions)!=null&&c.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(u,h){let m=_(u.baseOptions,ks,3);if(!m){var O=m=new ks,De=new As;mt(O,4,Xt,De)}"delegate"in h&&(h.delegate==="GPU"?(h=m,O=new Vi,mt(h,2,Xt,O)):(h=m,O=new As,mt(h,4,Xt,O))),p(u.baseOptions,0,3,m)}(this,a),a.modelAssetPath)return fetch(a.modelAssetPath.toString()).then(u=>{if(u.ok)return u.arrayBuffer();throw Error(`Failed to fetch model: ${a.modelAssetPath} (${u.status})`)}).then(u=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(u),!0,!1,!1),Ms(this,"/model.dat"),this.m(),this.V()});Ms(this,a.modelAssetBuffer)}return this.m(),this.V(),Promise.resolve()}V(){}aa(){let e;if(this.g.aa(t=>{e=qa(t)}),!e)throw Error("Failed to retrieve CalculatorGraphConfig");return e}setGraph(e,t){this.g.attachErrorListener((r,n)=>{this.L.push(Error(n))}),this.g.Ma(),this.g.setGraph(e,t),this.B=void 0,Ps(this)}finishProcessing(){this.g.finishProcessing(),Ps(this)}close(){this.B=void 0,this.g.closeGraph()}};function he(e,t){if(e===null)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}Qr.prototype.close=Qr.prototype.close;class D1{constructor(t,r,n,s){this.g=t,this.h=r,this.m=n,this.l=s}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Is(e,t,r){const n=e.h;if(r=he(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,t),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(e.g,r),r}function Rs(e,t){const r=e.h,n=he(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);const s=he(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(e.u),r.vertexAttribPointer(e.u,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);const i=he(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,i),r.enableVertexAttribArray(e.B),r.vertexAttribPointer(e.B,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(t?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindVertexArray(null),new D1(r,n,s,i)}function Vo(e,t){if(e.h){if(t!==e.h)throw Error("Cannot change GL context once initialized")}else e.h=t}function zn(e,t,r,n){if(Vo(e,t),!e.g){const s=e.h;if(e.g=he(s.createProgram(),"Failed to create WebGL program"),e.C=Is(e,`
|
|
2
|
+
attribute vec2 aVertex;
|
|
3
|
+
attribute vec2 aTex;
|
|
4
|
+
varying vec2 vTex;
|
|
5
|
+
void main(void) {
|
|
6
|
+
gl_Position = vec4(aVertex, 0.0, 1.0);
|
|
7
|
+
vTex = aTex;
|
|
8
|
+
}`,s.VERTEX_SHADER),e.v=Is(e,`
|
|
9
|
+
precision mediump float;
|
|
10
|
+
varying vec2 vTex;
|
|
11
|
+
uniform sampler2D inputTexture;
|
|
12
|
+
void main() {
|
|
13
|
+
gl_FragColor = texture2D(inputTexture, vTex);
|
|
14
|
+
}
|
|
15
|
+
`,s.FRAGMENT_SHADER),s.linkProgram(e.g),!s.getProgramParameter(e.g,s.LINK_STATUS))throw Error(`Error during program linking: ${s.getProgramInfoLog(e.g)}`);e.u=s.getAttribLocation(e.g,"aVertex"),e.B=s.getAttribLocation(e.g,"aTex")}return r?(e.m||(e.m=Rs(e,!0)),r=e.m):(e.j||(e.j=Rs(e,!1)),r=e.j),t.useProgram(e.g),r.bind(),e=n(),r.g.bindVertexArray(null),e}function Er(e,t,r){Vo(e,t),e.l||(e.l=he(t.createFramebuffer(),"Failed to create framebuffe.")),t.bindFramebuffer(t.FRAMEBUFFER,e.l),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0)}function Wn(e){var t;(t=e.h)==null||t.bindFramebuffer(e.h.FRAMEBUFFER,null)}var Hn=class{close(){if(this.g){const e=this.h;e.deleteProgram(this.g),e.deleteShader(this.C),e.deleteShader(this.v)}this.l&&this.h.deleteFramebuffer(this.l),this.j&&this.j.close(),this.m&&this.m.close()}};function Me(e,t){switch(t){case 0:return e.g.find(r=>r instanceof Uint8Array);case 1:return e.g.find(r=>r instanceof Float32Array);case 2:return e.g.find(r=>typeof WebGLTexture<"u"&&r instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function en(e){var t=Me(e,1);if(!t){if(t=Me(e,0))t=new Float32Array(t).map(n=>n/255);else{t=new Float32Array(e.width*e.height);const n=Ye(e);var r=Ho(e);if(Er(r,n,zo(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in self.document){r=new Float32Array(e.width*e.height*4),n.readPixels(0,0,e.width,e.height,n.RGBA,n.FLOAT,r);for(let s=0,i=0;s<t.length;++s,i+=4)t[s]=r[i]}else n.readPixels(0,0,e.width,e.height,n.RED,n.FLOAT,t)}e.g.push(t)}return t}function zo(e){let t=Me(e,2);if(!t){const r=Ye(e);t=Ko(e);const n=en(e),s=Wo(e);r.texImage2D(r.TEXTURE_2D,0,s,e.width,e.height,0,r.RED,r.FLOAT,n),tn(e)}return t}function Ye(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=he(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function Wo(e){if(e=Ye(e),!Nt)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))Nt=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Nt=e.R16F}return Nt}function Ho(e){return e.l||(e.l=new Hn),e.l}function Xo(e){(e=Ye(e)).texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST)}function Ko(e){const t=Ye(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let r=Me(e,2);return r?t.bindTexture(t.TEXTURE_2D,r):(r=he(t.createTexture(),"Failed to create texture"),e.g.push(r),e.m=!0,t.bindTexture(t.TEXTURE_2D,r),Xo(e)),r}function tn(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var Nt,j=class{constructor(e,t,r,n,s,i){this.g=e,this.m=t,this.canvas=r,this.l=n,this.width=s,this.height=i,this.m&&--Cs===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Ga(){return!!Me(this,0)}Ea(){return!!Me(this,1)}M(){return!!Me(this,2)}Ca(){return(t=Me(e=this,0))||(t=en(e),t=new Uint8Array(t.map(r=>255*r)),e.g.push(t)),t;var e,t}za(){return en(this)}Z(){return zo(this)}clone(){const e=[];for(const t of this.g){let r;if(t instanceof Uint8Array)r=new Uint8Array(t);else if(t instanceof Float32Array)r=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{const n=Ye(this),s=Ho(this);n.activeTexture(n.TEXTURE1),r=he(n.createTexture(),"Failed to create texture"),n.bindTexture(n.TEXTURE_2D,r),Xo(this);const i=Wo(this);n.texImage2D(n.TEXTURE_2D,0,i,this.width,this.height,0,n.RED,n.FLOAT,null),n.bindTexture(n.TEXTURE_2D,null),Er(s,n,r),zn(s,n,!1,()=>{Ko(this),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_FAN,0,4),tn(this)}),Wn(s),tn(this)}}e.push(r)}return new j(e,this.M(),this.canvas,this.l,this.width,this.height)}close(){this.m&&Ye(this).deleteTexture(Me(this,2)),Cs=-1}};j.prototype.close=j.prototype.close,j.prototype.clone=j.prototype.clone,j.prototype.getAsWebGLTexture=j.prototype.Z,j.prototype.getAsFloat32Array=j.prototype.za,j.prototype.getAsUint8Array=j.prototype.Ca,j.prototype.hasWebGLTexture=j.prototype.M,j.prototype.hasFloat32Array=j.prototype.Ea,j.prototype.hasUint8Array=j.prototype.Ga;var Cs=250;function Te(e,t){switch(t){case 0:return e.g.find(r=>r instanceof ImageData);case 1:return e.g.find(r=>typeof ImageBitmap<"u"&&r instanceof ImageBitmap);case 2:return e.g.find(r=>typeof WebGLTexture<"u"&&r instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function $o(e){var t=Te(e,0);if(!t){t=Je(e);const r=Xn(e),n=new Uint8Array(e.width*e.height*4);Er(r,t,Kt(e)),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,n),Wn(r),t=new ImageData(new Uint8ClampedArray(n.buffer),e.width,e.height),e.g.push(t)}return t}function Kt(e){let t=Te(e,2);if(!t){const r=Je(e);t=$t(e);const n=Te(e,1)||$o(e);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),pt(e)}return t}function Je(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");return e.h||(e.h=he(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function Xn(e){return e.l||(e.l=new Hn),e.l}function qo(e){(e=Je(e)).texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR)}function $t(e){const t=Je(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let r=Te(e,2);return r?t.bindTexture(t.TEXTURE_2D,r):(r=he(t.createTexture(),"Failed to create texture"),e.g.push(r),e.m=!0,t.bindTexture(t.TEXTURE_2D,r),qo(e)),r}function pt(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}function Bs(e){const t=Je(e);return zn(Xn(e),t,!0,()=>function(r,n){const s=r.canvas;if(s.width===r.width&&s.height===r.height)return n();const i=s.width,o=s.height;return s.width=r.width,s.height=r.height,r=n(),s.width=i,s.height=o,r}(e,()=>{if(t.bindFramebuffer(t.FRAMEBUFFER,null),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),!(e.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return e.canvas.transferToImageBitmap()}))}var V=class{constructor(e,t,r,n,s,i,o){this.g=e,this.j=t,this.m=r,this.canvas=n,this.l=s,this.width=i,this.height=o,(this.j||this.m)&&--Ds===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Fa(){return!!Te(this,0)}ga(){return!!Te(this,1)}M(){return!!Te(this,2)}Ba(){return $o(this)}Aa(){var e=Te(this,1);return e||(Kt(this),$t(this),e=Bs(this),pt(this),this.g.push(e),this.j=!0),e}Z(){return Kt(this)}clone(){const e=[];for(const t of this.g){let r;if(t instanceof ImageData)r=new ImageData(t.data,this.width,this.height);else if(t instanceof WebGLTexture){const n=Je(this),s=Xn(this);n.activeTexture(n.TEXTURE1),r=he(n.createTexture(),"Failed to create texture"),n.bindTexture(n.TEXTURE_2D,r),qo(this),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,this.width,this.height,0,n.RGBA,n.UNSIGNED_BYTE,null),n.bindTexture(n.TEXTURE_2D,null),Er(s,n,r),zn(s,n,!1,()=>{$t(this),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_FAN,0,4),pt(this)}),Wn(s),pt(this)}else{if(!(t instanceof ImageBitmap))throw Error(`Type is not supported: ${t}`);Kt(this),$t(this),r=Bs(this),pt(this)}e.push(r)}return new V(e,this.ga(),this.M(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Te(this,1).close(),this.m&&Je(this).deleteTexture(Te(this,2)),Ds=-1}};V.prototype.close=V.prototype.close,V.prototype.clone=V.prototype.clone,V.prototype.getAsWebGLTexture=V.prototype.Z,V.prototype.getAsImageBitmap=V.prototype.Aa,V.prototype.getAsImageData=V.prototype.Ba,V.prototype.hasWebGLTexture=V.prototype.M,V.prototype.hasImageBitmap=V.prototype.ga,V.prototype.hasImageData=V.prototype.Fa;var Ds=250;function _e(...e){return e.map(([t,r])=>({start:t,end:r}))}const U1=function(e){return class extends e{Ma(){this.i._registerModelResourcesGraphService()}}}((Us=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:typeof OffscreenCanvas>"u"||jo()?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas")):this.i.canvas=new OffscreenCanvas(1,1)}async initializeGraph(e){const t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){const r=e.length,n=this.i._malloc(r);this.i.HEAPU8.set(e,n),t?this.i._changeBinaryGraph(r,n):this.i._changeTextGraph(r,n),this.i._free(n)}configureAudio(e,t,r,n,s){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),f(this,n||"input_audio",i=>{f(this,s=s||"audio_header",o=>{this.i._configureAudio(i,o,e,t,r)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}aa(e){Oe(this,"__graph_config__",t=>{e(t)}),f(this,"__graph_config__",t=>{this.i._getGraphConfig(t,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,r){this.addAudioToStreamWithShape(e,0,0,t,r)}addAudioToStreamWithShape(e,t,r,n,s){const i=4*e.length;this.h!==i&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(i),this.h=i),this.i.HEAPF32.set(e,this.g/4),f(this,n,o=>{this.i._addAudioToInputStream(this.g,t,r,o,s)})}addGpuBufferToStream(e,t,r){f(this,t,n=>{const[s,i]=Ls(this,e,n);this.i._addBoundTextureToStream(n,s,i,r)})}addBoolToStream(e,t,r){f(this,t,n=>{this.i._addBoolToInputStream(e,n,r)})}addDoubleToStream(e,t,r){f(this,t,n=>{this.i._addDoubleToInputStream(e,n,r)})}addFloatToStream(e,t,r){f(this,t,n=>{this.i._addFloatToInputStream(e,n,r)})}addIntToStream(e,t,r){f(this,t,n=>{this.i._addIntToInputStream(e,n,r)})}addStringToStream(e,t,r){f(this,t,n=>{f(this,e,s=>{this.i._addStringToInputStream(s,n,r)})})}addStringRecordToStream(e,t,r){f(this,t,n=>{Os(this,Object.keys(e),s=>{Os(this,Object.values(e),i=>{this.i._addFlatHashMapToInputStream(s,i,Object.keys(e).length,n,r)})})})}addProtoToStream(e,t,r,n){f(this,r,s=>{f(this,t,i=>{const o=this.i._malloc(e.length);this.i.HEAPU8.set(e,o),this.i._addProtoToInputStream(o,e.length,i,s,n),this.i._free(o)})})}addEmptyPacketToStream(e,t){f(this,e,r=>{this.i._addEmptyPacketToInputStream(r,t)})}addBoolVectorToStream(e,t,r){f(this,t,n=>{const s=this.i._allocateBoolVector(e.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(const i of e)this.i._addBoolVectorEntry(s,i);this.i._addBoolVectorToInputStream(s,n,r)})}addDoubleVectorToStream(e,t,r){f(this,t,n=>{const s=this.i._allocateDoubleVector(e.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(const i of e)this.i._addDoubleVectorEntry(s,i);this.i._addDoubleVectorToInputStream(s,n,r)})}addFloatVectorToStream(e,t,r){f(this,t,n=>{const s=this.i._allocateFloatVector(e.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(const i of e)this.i._addFloatVectorEntry(s,i);this.i._addFloatVectorToInputStream(s,n,r)})}addIntVectorToStream(e,t,r){f(this,t,n=>{const s=this.i._allocateIntVector(e.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(const i of e)this.i._addIntVectorEntry(s,i);this.i._addIntVectorToInputStream(s,n,r)})}addStringVectorToStream(e,t,r){f(this,t,n=>{const s=this.i._allocateStringVector(e.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(const i of e)f(this,i,o=>{this.i._addStringVectorEntry(s,o)});this.i._addStringVectorToInputStream(s,n,r)})}addBoolToInputSidePacket(e,t){f(this,t,r=>{this.i._addBoolToInputSidePacket(e,r)})}addDoubleToInputSidePacket(e,t){f(this,t,r=>{this.i._addDoubleToInputSidePacket(e,r)})}addFloatToInputSidePacket(e,t){f(this,t,r=>{this.i._addFloatToInputSidePacket(e,r)})}addIntToInputSidePacket(e,t){f(this,t,r=>{this.i._addIntToInputSidePacket(e,r)})}addStringToInputSidePacket(e,t){f(this,t,r=>{f(this,e,n=>{this.i._addStringToInputSidePacket(n,r)})})}addProtoToInputSidePacket(e,t,r){f(this,r,n=>{f(this,t,s=>{const i=this.i._malloc(e.length);this.i.HEAPU8.set(e,i),this.i._addProtoToInputSidePacket(i,e.length,s,n),this.i._free(i)})})}addBoolVectorToInputSidePacket(e,t){f(this,t,r=>{const n=this.i._allocateBoolVector(e.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const s of e)this.i._addBoolVectorEntry(n,s);this.i._addBoolVectorToInputSidePacket(n,r)})}addDoubleVectorToInputSidePacket(e,t){f(this,t,r=>{const n=this.i._allocateDoubleVector(e.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const s of e)this.i._addDoubleVectorEntry(n,s);this.i._addDoubleVectorToInputSidePacket(n,r)})}addFloatVectorToInputSidePacket(e,t){f(this,t,r=>{const n=this.i._allocateFloatVector(e.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const s of e)this.i._addFloatVectorEntry(n,s);this.i._addFloatVectorToInputSidePacket(n,r)})}addIntVectorToInputSidePacket(e,t){f(this,t,r=>{const n=this.i._allocateIntVector(e.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const s of e)this.i._addIntVectorEntry(n,s);this.i._addIntVectorToInputSidePacket(n,r)})}addStringVectorToInputSidePacket(e,t){f(this,t,r=>{const n=this.i._allocateStringVector(e.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const s of e)f(this,s,i=>{this.i._addStringVectorEntry(n,i)});this.i._addStringVectorToInputSidePacket(n,r)})}attachBoolListener(e,t){Oe(this,e,t),f(this,e,r=>{this.i._attachBoolListener(r)})}attachBoolVectorListener(e,t){Ke(this,e,t),f(this,e,r=>{this.i._attachBoolVectorListener(r)})}attachIntListener(e,t){Oe(this,e,t),f(this,e,r=>{this.i._attachIntListener(r)})}attachIntVectorListener(e,t){Ke(this,e,t),f(this,e,r=>{this.i._attachIntVectorListener(r)})}attachDoubleListener(e,t){Oe(this,e,t),f(this,e,r=>{this.i._attachDoubleListener(r)})}attachDoubleVectorListener(e,t){Ke(this,e,t),f(this,e,r=>{this.i._attachDoubleVectorListener(r)})}attachFloatListener(e,t){Oe(this,e,t),f(this,e,r=>{this.i._attachFloatListener(r)})}attachFloatVectorListener(e,t){Ke(this,e,t),f(this,e,r=>{this.i._attachFloatVectorListener(r)})}attachStringListener(e,t){Oe(this,e,t),f(this,e,r=>{this.i._attachStringListener(r)})}attachStringVectorListener(e,t){Ke(this,e,t),f(this,e,r=>{this.i._attachStringVectorListener(r)})}attachProtoListener(e,t,r){Oe(this,e,t),f(this,e,n=>{this.i._attachProtoListener(n,r||!1)})}attachProtoVectorListener(e,t,r){Ke(this,e,t),f(this,e,n=>{this.i._attachProtoVectorListener(n,r||!1)})}attachAudioListener(e,t,r){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Oe(this,e,(n,s)=>{n=new Float32Array(n.buffer,n.byteOffset,n.length/4),t(n,s)}),f(this,e,n=>{this.i._attachAudioListener(n,r||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Us{get ca(){return this.i}pa(e,t,r){f(this,t,n=>{const[s,i]=Ls(this,e,n);this.ca._addBoundTextureAsImageToStream(n,s,i,r)})}X(e,t){Oe(this,e,t),f(this,e,r=>{this.ca._attachImageListener(r)})}Y(e,t){Ke(this,e,t),f(this,e,r=>{this.ca._attachImageVectorListener(r)})}}));var Us,we=class extends U1{};async function y(e,t,r){return async function(n,s,i,o){return B1(n,s,i,o)}(e,r.canvas??(typeof OffscreenCanvas>"u"||jo()?document.createElement("canvas"):void 0),t,r)}function Yo(e,t,r,n){if(e.da){const i=new io;if(r!=null&&r.regionOfInterest){if(!e.na)throw Error("This task doesn't support region-of-interest.");var s=r.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(0>s.left||0>s.top||1<s.right||1<s.bottom)throw Error("Expected RectF values to be in [0,1].");g(i,1,(s.left+s.right)/2),g(i,2,(s.top+s.bottom)/2),g(i,4,s.right-s.left),g(i,3,s.bottom-s.top)}else g(i,1,.5),g(i,2,.5),g(i,4,1),g(i,3,1);if(r!=null&&r.rotationDegrees){if((r==null?void 0:r.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(g(i,5,-Math.PI*r.rotationDegrees/180),(r==null?void 0:r.rotationDegrees)%180!=0){const[o,c]=t.videoWidth!==void 0?[t.videoWidth,t.videoHeight]:t.naturalWidth!==void 0?[t.naturalWidth,t.naturalHeight]:[t.width,t.height];r=H(i,3)*c/o,s=H(i,4)*o/c,g(i,4,r),g(i,3,s)}}e.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",e.da,n)}e.g.pa(t,e.ma,n??performance.now()),e.finishProcessing()}function be(e,t,r){var n;if((n=e.baseOptions)!=null&&n.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Yo(e,t,r,e.N+1)}function Be(e,t,r,n){var s;if(!((s=e.baseOptions)!=null&&s.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Yo(e,t,r,n)}function Tt(e,t,r){var n=t.data;const s=t.width,i=s*(t=t.height);if((n instanceof Uint8Array||n instanceof Float32Array)&&n.length!==i)throw Error("Unsupported channel count: "+n.length/i);return e=new j([n],!1,e.g.i.canvas,e.U,s,t),r?e.clone():e}var se=class extends Qr{constructor(e,t,r,n){super(e),this.g=e,this.ma=t,this.da=r,this.na=n,this.U=new Hn}l(e,t=!0){if("runningMode"in e&&Et(this.baseOptions,2,!!e.runningMode&&e.runningMode!=="IMAGE"),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.U.close(),super.close()}};se.prototype.close=se.prototype.close;var ie=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},this.h=new Bn,e=new I,p(this.h,0,1,e),g(this.h,2,.5),g(this.h,3,.3)}get baseOptions(){return _(this.h,I,1)}set baseOptions(e){p(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&g(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&g(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}F(e,t){return this.j={detections:[]},be(this,e,t),this.j}G(e,t,r){return this.j={detections:[]},Be(this,e,r,t),this.j}m(){var e=new Q;F(e,"image_in"),F(e,"norm_rect_in"),S(e,"detections");const t=new de;ye(t,v1,this.h);const r=new $;ge(r,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),A(r,"IMAGE:image_in"),A(r,"NORM_RECT:norm_rect_in"),w(r,"DETECTIONS:detections"),r.o(t),me(e,r),this.g.attachProtoVectorListener("detections",(n,s)=>{for(const i of n)n=Qi(i),this.j.detections.push(Uo(n));d(this,s)}),this.g.attachEmptyPacketListener("detections",n=>{d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ie.prototype.detectForVideo=ie.prototype.G,ie.prototype.detect=ie.prototype.F,ie.prototype.setOptions=ie.prototype.o,ie.createFromModelPath=async function(e,t){return y(ie,e,{baseOptions:{modelAssetPath:t}})},ie.createFromModelBuffer=function(e,t){return y(ie,e,{baseOptions:{modelAssetBuffer:t}})},ie.createFromOptions=function(e,t){return y(ie,e,t)};var Jo=_e([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]),Zo=_e([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]),Qo=_e([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),N1=_e([474,475],[475,476],[476,477],[477,474]),ea=_e([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]),ta=_e([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),G1=_e([469,470],[470,471],[471,472],[472,469]),ra=_e([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]),j1=[...Jo,...Zo,...Qo,...ea,...ta,...ra],V1=_e([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]);function Ns(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var M=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,this.h=new yo,e=new I,p(this.h,0,1,e),this.v=new w1,p(this.h,0,3,this.v),this.u=new Bn,p(this.h,0,2,this.u),xe(this.u,4,1),g(this.u,2,.5),g(this.v,2,.5),g(this.h,4,.5)}get baseOptions(){return _(this.h,I,1)}set baseOptions(e){p(this.h,0,1,e)}o(e){return"numFaces"in e&&xe(this.u,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&g(this.u,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&g(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&g(this.v,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}F(e,t){return Ns(this),be(this,e,t),this.j}G(e,t,r){return Ns(this),Be(this,e,r,t),this.j}m(){var e=new Q;F(e,"image_in"),F(e,"norm_rect"),S(e,"face_landmarks");const t=new de;ye(t,b1,this.h);const r=new $;ge(r,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),A(r,"IMAGE:image_in"),A(r,"NORM_RECT:norm_rect"),w(r,"NORM_LANDMARKS:face_landmarks"),r.o(t),me(e,r),this.g.attachProtoVectorListener("face_landmarks",(n,s)=>{for(const i of n)n=wr(i),this.j.faceLandmarks.push(Gn(n));d(this,s)}),this.g.attachEmptyPacketListener("face_landmarks",n=>{d(this,n)}),this.outputFaceBlendshapes&&(S(e,"blendshapes"),w(r,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(n,s)=>{if(this.outputFaceBlendshapes)for(const i of n)n=Rn(i),this.j.faceBlendshapes.push(Do(n.g()??[]));d(this,s)}),this.g.attachEmptyPacketListener("blendshapes",n=>{d(this,n)})),this.outputFacialTransformationMatrixes&&(S(e,"face_geometry"),w(r,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(n,s)=>{if(this.outputFacialTransformationMatrixes)for(const i of n)(n=_(_1(i),so,2))&&this.j.facialTransformationMatrixes.push({rows:Se(ue(n,1))??0,columns:Se(ue(n,2))??0,data:et(n,3,ze)??[]});d(this,s)}),this.g.attachEmptyPacketListener("face_geometry",n=>{d(this,n)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};M.prototype.detectForVideo=M.prototype.G,M.prototype.detect=M.prototype.F,M.prototype.setOptions=M.prototype.o,M.createFromModelPath=function(e,t){return y(M,e,{baseOptions:{modelAssetPath:t}})},M.createFromModelBuffer=function(e,t){return y(M,e,{baseOptions:{modelAssetBuffer:t}})},M.createFromOptions=function(e,t){return y(M,e,t)},M.FACE_LANDMARKS_LIPS=Jo,M.FACE_LANDMARKS_LEFT_EYE=Zo,M.FACE_LANDMARKS_LEFT_EYEBROW=Qo,M.FACE_LANDMARKS_LEFT_IRIS=N1,M.FACE_LANDMARKS_RIGHT_EYE=ea,M.FACE_LANDMARKS_RIGHT_EYEBROW=ta,M.FACE_LANDMARKS_RIGHT_IRIS=G1,M.FACE_LANDMARKS_FACE_OVAL=ra,M.FACE_LANDMARKS_CONTOURS=j1,M.FACE_LANDMARKS_TESSELATION=V1;var Ee=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect",!0),this.j=new _o,e=new I,p(this.j,0,1,e)}get baseOptions(){return _(this.j,I,1)}set baseOptions(e){p(this.j,0,1,e)}o(e){return super.l(e)}Pa(e,t,r){const n=typeof t!="function"?t:{};if(this.h=typeof t=="function"?t:r,be(this,e,n??{}),!this.h)return this.u}m(){var e=new Q;F(e,"image_in"),F(e,"norm_rect"),S(e,"stylized_image");const t=new de;ye(t,E1,this.j);const r=new $;ge(r,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),A(r,"IMAGE:image_in"),A(r,"NORM_RECT:norm_rect"),w(r,"STYLIZED_IMAGE:stylized_image"),r.o(t),me(e,r),this.g.X("stylized_image",(n,s)=>{var i=!this.h,o=n.data,c=n.width;const a=c*(n=n.height);if(o instanceof Uint8Array)if(o.length===3*a){const u=new Uint8ClampedArray(4*a);for(let h=0;h<a;++h)u[4*h]=o[3*h],u[4*h+1]=o[3*h+1],u[4*h+2]=o[3*h+2],u[4*h+3]=255;o=new ImageData(u,c,n)}else{if(o.length!==4*a)throw Error("Unsupported channel count: "+o.length/a);o=new ImageData(new Uint8ClampedArray(o.buffer,o.byteOffset,o.length),c,n)}else if(!(o instanceof WebGLTexture))throw Error(`Unsupported format: ${o.constructor.name}`);c=new V([o],!1,!1,this.g.i.canvas,this.U,c,n),this.u=i=i?c.clone():c,this.h&&this.h(i),d(this,s)}),this.g.attachEmptyPacketListener("stylized_image",n=>{this.u=null,this.h&&this.h(null),d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ee.prototype.stylize=Ee.prototype.Pa,Ee.prototype.setOptions=Ee.prototype.o,Ee.createFromModelPath=function(e,t){return y(Ee,e,{baseOptions:{modelAssetPath:t}})},Ee.createFromModelBuffer=function(e,t){return y(Ee,e,{baseOptions:{modelAssetBuffer:t}})},Ee.createFromOptions=function(e,t){return y(Ee,e,t)};var na=_e([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]);function Gs(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function js(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function Vs(e,t=!0){const r=[];for(const s of e){var n=Rn(s);e=[];for(const i of n.g())n=t&&ue(i,1)!=null?Se(ue(i,1)):-1,e.push({score:H(i,2)??0,index:n,categoryName:fe(i,3)??""??"",displayName:fe(i,4)??""??""});r.push(e)}return r}var ee=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],this.v=new Fo,e=new I,p(this.v,0,1,e),this.C=new Dn,p(this.v,0,2,this.C),this.u=new ko,p(this.C,0,3,this.u),this.h=new Ao,p(this.C,0,2,this.h),this.j=new A1,p(this.v,0,3,this.j),g(this.h,2,.5),g(this.C,4,.5),g(this.u,2,.5)}get baseOptions(){return _(this.v,I,1)}set baseOptions(e){p(this.v,0,1,e)}o(e){var t,r,n,s;if(xe(this.h,3,e.numHands??1),"minHandDetectionConfidence"in e&&g(this.h,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&g(this.C,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&g(this.u,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var i=new Ze,o=Zr(e.cannedGesturesClassifierOptions,(t=_(this.j,Ze,3))==null?void 0:t.h());p(i,0,2,o),p(this.j,0,3,i)}else e.cannedGesturesClassifierOptions===void 0&&((r=_(this.j,Ze,3))==null||r.g());return e.customGesturesClassifierOptions?(p(i=new Ze,0,2,o=Zr(e.customGesturesClassifierOptions,(n=_(this.j,Ze,4))==null?void 0:n.h())),p(this.j,0,4,i)):e.customGesturesClassifierOptions===void 0&&((s=_(this.j,Ze,4))==null||s.g()),this.l(e)}Ka(e,t){return Gs(this),be(this,e,t),js(this)}La(e,t,r){return Gs(this),Be(this,e,r,t),js(this)}m(){var e=new Q;F(e,"image_in"),F(e,"norm_rect"),S(e,"hand_gestures"),S(e,"hand_landmarks"),S(e,"world_hand_landmarks"),S(e,"handedness");const t=new de;ye(t,S1,this.v);const r=new $;ge(r,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),A(r,"IMAGE:image_in"),A(r,"NORM_RECT:norm_rect"),w(r,"HAND_GESTURES:hand_gestures"),w(r,"LANDMARKS:hand_landmarks"),w(r,"WORLD_LANDMARKS:world_hand_landmarks"),w(r,"HANDEDNESS:handedness"),r.o(t),me(e,r),this.g.attachProtoVectorListener("hand_landmarks",(n,s)=>{for(const i of n){n=wr(i);const o=[];for(const c of Re(n,ro,1))o.push({x:H(c,1)??0,y:H(c,2)??0,z:H(c,3)??0});this.landmarks.push(o)}d(this,s)}),this.g.attachEmptyPacketListener("hand_landmarks",n=>{d(this,n)}),this.g.attachProtoVectorListener("world_hand_landmarks",(n,s)=>{for(const i of n){n=Cn(i);const o=[];for(const c of Re(n,eo,1))o.push({x:H(c,1)??0,y:H(c,2)??0,z:H(c,3)??0});this.worldLandmarks.push(o)}d(this,s)}),this.g.attachEmptyPacketListener("world_hand_landmarks",n=>{d(this,n)}),this.g.attachProtoVectorListener("hand_gestures",(n,s)=>{this.gestures.push(...Vs(n,!1)),d(this,s)}),this.g.attachEmptyPacketListener("hand_gestures",n=>{d(this,n)}),this.g.attachProtoVectorListener("handedness",(n,s)=>{this.handedness.push(...Vs(n)),d(this,s)}),this.g.attachEmptyPacketListener("handedness",n=>{d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function zs(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}ee.prototype.recognizeForVideo=ee.prototype.La,ee.prototype.recognize=ee.prototype.Ka,ee.prototype.setOptions=ee.prototype.o,ee.createFromModelPath=function(e,t){return y(ee,e,{baseOptions:{modelAssetPath:t}})},ee.createFromModelBuffer=function(e,t){return y(ee,e,{baseOptions:{modelAssetBuffer:t}})},ee.createFromOptions=function(e,t){return y(ee,e,t)},ee.HAND_CONNECTIONS=na;var te=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],this.j=new Dn,e=new I,p(this.j,0,1,e),this.u=new ko,p(this.j,0,3,this.u),this.h=new Ao,p(this.j,0,2,this.h),xe(this.h,3,1),g(this.h,2,.5),g(this.u,2,.5),g(this.j,4,.5)}get baseOptions(){return _(this.j,I,1)}set baseOptions(e){p(this.j,0,1,e)}o(e){return"numHands"in e&&xe(this.h,3,e.numHands??1),"minHandDetectionConfidence"in e&&g(this.h,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&g(this.j,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&g(this.u,2,e.minHandPresenceConfidence??.5),this.l(e)}F(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],be(this,e,t),zs(this)}G(e,t,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Be(this,e,r,t),zs(this)}m(){var e=new Q;F(e,"image_in"),F(e,"norm_rect"),S(e,"hand_landmarks"),S(e,"world_hand_landmarks"),S(e,"handedness");const t=new de;ye(t,k1,this.j);const r=new $;ge(r,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),A(r,"IMAGE:image_in"),A(r,"NORM_RECT:norm_rect"),w(r,"LANDMARKS:hand_landmarks"),w(r,"WORLD_LANDMARKS:world_hand_landmarks"),w(r,"HANDEDNESS:handedness"),r.o(t),me(e,r),this.g.attachProtoVectorListener("hand_landmarks",(n,s)=>{for(const i of n)n=wr(i),this.landmarks.push(Gn(n));d(this,s)}),this.g.attachEmptyPacketListener("hand_landmarks",n=>{d(this,n)}),this.g.attachProtoVectorListener("world_hand_landmarks",(n,s)=>{for(const i of n)n=Cn(i),this.worldLandmarks.push(No(n));d(this,s)}),this.g.attachEmptyPacketListener("world_hand_landmarks",n=>{d(this,n)}),this.g.attachProtoVectorListener("handedness",(n,s)=>{var i=this.handedness,o=i.push;const c=[];for(const a of n){n=Rn(a);const u=[];for(const h of n.g())u.push({score:H(h,2)??0,index:Se(ue(h,1))??-1,categoryName:fe(h,3)??""??"",displayName:fe(h,4)??""??""});c.push(u)}o.call(i,...c),d(this,s)}),this.g.attachEmptyPacketListener("handedness",n=>{d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};te.prototype.detectForVideo=te.prototype.G,te.prototype.detect=te.prototype.F,te.prototype.setOptions=te.prototype.o,te.createFromModelPath=function(e,t){return y(te,e,{baseOptions:{modelAssetPath:t}})},te.createFromModelBuffer=function(e,t){return y(te,e,{baseOptions:{modelAssetBuffer:t}})},te.createFromOptions=function(e,t){return y(te,e,t)},te.HAND_CONNECTIONS=na;var oe=class extends se{constructor(e,t){super(new we(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},this.h=new Lo,e=new I,p(this.h,0,1,e)}get baseOptions(){return _(this.h,I,1)}set baseOptions(e){p(this.h,0,1,e)}o(e){var t=Zr(e,_(this.h,br,2));return p(this.h,0,2,t),this.l(e)}sa(e,t){return this.j={classifications:[]},be(this,e,t),this.j}ta(e,t,r){return this.j={classifications:[]},Be(this,e,r,t),this.j}m(){var e=new Q;F(e,"input_image"),F(e,"norm_rect"),S(e,"classifications");const t=new de;ye(t,x1,this.h);const r=new $;ge(r,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),A(r,"IMAGE:input_image"),A(r,"NORM_RECT:norm_rect"),w(r,"CLASSIFICATIONS:classifications"),r.o(t),me(e,r),this.g.attachProtoListener("classifications",(n,s)=>{this.j=function(i){const o={classifications:Re(i,h1,1).map(c=>{var a;return Do(((a=_(c,In,4))==null?void 0:a.g())??[],Se(ue(c,2)),fe(c,3)??"")})};return er(it(i,2))!=null&&(o.timestampMs=Se(er(it(i,2)))),o}(f1(n)),d(this,s)}),this.g.attachEmptyPacketListener("classifications",n=>{d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};oe.prototype.classifyForVideo=oe.prototype.ta,oe.prototype.classify=oe.prototype.sa,oe.prototype.setOptions=oe.prototype.o,oe.createFromModelPath=function(e,t){return y(oe,e,{baseOptions:{modelAssetPath:t}})},oe.createFromModelBuffer=function(e,t){return y(oe,e,{baseOptions:{modelAssetBuffer:t}})},oe.createFromOptions=function(e,t){return y(oe,e,t)};var re=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect",!0),this.h=new Oo,this.embeddings={embeddings:[]},e=new I,p(this.h,0,1,e)}get baseOptions(){return _(this.h,I,1)}set baseOptions(e){p(this.h,0,1,e)}o(e){var t=this.h,r=_(this.h,Ts,2);return r=r?r.clone():new Ts,e.l2Normalize!==void 0?Et(r,1,e.l2Normalize):"l2Normalize"in e&&b(r,1),e.quantize!==void 0?Et(r,2,e.quantize):"quantize"in e&&b(r,2),p(t,0,2,r),this.l(e)}xa(e,t){return be(this,e,t),this.embeddings}ya(e,t,r){return Be(this,e,r,t),this.embeddings}m(){var e=new Q;F(e,"image_in"),F(e,"norm_rect"),S(e,"embeddings_out");const t=new de;ye(t,F1,this.h);const r=new $;ge(r,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),A(r,"IMAGE:image_in"),A(r,"NORM_RECT:norm_rect"),w(r,"EMBEDDINGS:embeddings_out"),r.o(t),me(e,r),this.g.attachProtoListener("embeddings_out",(n,s)=>{n=m1(n),this.embeddings=function(i){return{embeddings:Re(i,p1,1).map(o=>{var c,a;const u={headIndex:Se(ue(o,3))??-1,headName:fe(o,4)??""??""};if(Si(o,Yr,Ir(o,1))!==void 0)o=et(o=_(o,Yr,Ir(o,1)),1,ze),u.floatEmbedding=o;else{const h=new Uint8Array(0);u.quantizedEmbedding=((a=(c=_(o,d1,Ir(o,2)))==null?void 0:c.oa())==null?void 0:a.qa())??h}return u}),timestampMs:Se(er(it(i,2)))}}(n),d(this,s)}),this.g.attachEmptyPacketListener("embeddings_out",n=>{d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};re.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=xs(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=xs(Ss(e.quantizedEmbedding),Ss(t.quantizedEmbedding))}return e},re.prototype.embedForVideo=re.prototype.ya,re.prototype.embed=re.prototype.xa,re.prototype.setOptions=re.prototype.o,re.createFromModelPath=function(e,t){return y(re,e,{baseOptions:{modelAssetPath:t}})},re.createFromModelBuffer=function(e,t){return y(re,e,{baseOptions:{modelAssetBuffer:t}})},re.createFromOptions=function(e,t){return y(re,e,t)};var rn=class{constructor(e,t,r){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=r}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(r=>{r.close()}),(t=this.categoryMask)==null||t.close()}};function Ws(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function Hs(e){try{const t=new rn(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{Vn(e)}}rn.prototype.close=rn.prototype.close;var q=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Un,this.v=new Mo,p(this.h,0,3,this.v),e=new I,p(this.h,0,1,e)}get baseOptions(){return _(this.h,I,1)}set baseOptions(e){p(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?b(this.h,2,Ot(e.displayNamesLocale)):"displayNamesLocale"in e&&b(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}V(){(function(e){var t,r;const n=Re(e.aa(),$,1).filter(s=>(fe(s,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(e.u=[],1<n.length)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");n.length===1&&(((r=(t=_(n[0],de,7))==null?void 0:t.l())==null?void 0:r.g())??new Map).forEach((s,i)=>{e.u[Number(i)]=fe(s,1)??""})})(this)}ba(e,t,r){const n=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:r,Ws(this),be(this,e,n),Hs(this)}Na(e,t,r,n){const s=typeof r!="function"?r:{};return this.j=typeof r=="function"?r:n,Ws(this),Be(this,e,s,t),Hs(this)}Da(){return this.u}m(){var e=new Q;F(e,"image_in"),F(e,"norm_rect");const t=new de;ye(t,Io,this.h);const r=new $;ge(r,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),A(r,"IMAGE:image_in"),A(r,"NORM_RECT:norm_rect"),r.o(t),me(e,r),jn(this,e),this.outputConfidenceMasks&&(S(e,"confidence_masks"),w(r,"CONFIDENCE_MASKS:confidence_masks"),At(this,"confidence_masks"),this.g.Y("confidence_masks",(n,s)=>{this.confidenceMasks=n.map(i=>Tt(this,i,!this.j)),d(this,s)}),this.g.attachEmptyPacketListener("confidence_masks",n=>{this.confidenceMasks=[],d(this,n)})),this.outputCategoryMask&&(S(e,"category_mask"),w(r,"CATEGORY_MASK:category_mask"),At(this,"category_mask"),this.g.X("category_mask",(n,s)=>{this.categoryMask=Tt(this,n,!this.j),d(this,s)}),this.g.attachEmptyPacketListener("category_mask",n=>{this.categoryMask=void 0,d(this,n)})),S(e,"quality_scores"),w(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(n,s)=>{this.qualityScores=n,d(this,s)}),this.g.attachEmptyPacketListener("quality_scores",n=>{this.categoryMask=void 0,d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};q.prototype.getLabels=q.prototype.Da,q.prototype.segmentForVideo=q.prototype.Na,q.prototype.segment=q.prototype.ba,q.prototype.setOptions=q.prototype.o,q.createFromModelPath=function(e,t){return y(q,e,{baseOptions:{modelAssetPath:t}})},q.createFromModelBuffer=function(e,t){return y(q,e,{baseOptions:{modelAssetBuffer:t}})},q.createFromOptions=function(e,t){return y(q,e,t)};var nn=class{constructor(e,t,r){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=r}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(r=>{r.close()}),(t=this.categoryMask)==null||t.close()}};nn.prototype.close=nn.prototype.close;var z1=class extends l{constructor(e){super(e)}},at=[0,R,-2],W1=[0,Ie,-3,B],Ar=[0,Ie,-3,B,Ie,-1],sa=[0,Ar],H1=[0,sa,at],X1=[0,Ar,at],ia=[0,Ar,R,-1],K1=[0,ia,at],$1=[0,Ie,-3,B,at,-1],q1=[0,Ie,-3,B,Fe],Br=class extends l{constructor(e){super(e)}},Xs=[0,Ie,-1,B],oa=class extends l{constructor(){super()}};oa.A=[1];var Ks=class extends l{constructor(e){super(e)}},sn=[1,2,3,4,5,6,7,8,9,10,14,15],Y1=[0,sn,k,Ar,k,X1,k,sa,k,H1,k,Xs,k,q1,k,W1,k,[0,T,Ie,-2,B,R,B,-1,2,Ie,at],k,ia,k,K1,Ie,at,T,k,$1,k,[0,D,Xs]],J1=[0,T,R,-1,B],on=class extends l{constructor(){super()}};on.A=[1],on.prototype.g=Pn([0,D,Y1,T,J1]);var Ae=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Un,this.v=new Mo,p(this.h,0,3,this.v),e=new I,p(this.h,0,1,e)}get baseOptions(){return _(this.h,I,1)}set baseOptions(e){p(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}ba(e,t,r,n){const s=typeof r!="function"?r:{};this.j=typeof r=="function"?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.N+1,n=new on;const i=new Ks;var o=new z1;if(xe(o,1,255),p(i,0,12,o),t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var c=new Br;Et(c,3,!0),g(c,1,t.keypoint.x),g(c,2,t.keypoint.y),mt(i,5,sn,c)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");for(c of(o=new oa,t.scribble))Et(t=new Br,3,!0),g(t,1,c.x),g(t,2,c.y),Kr(o,Br,t);mt(i,15,sn,o)}Kr(n,Ks,i),this.g.addProtoToStream(n.g(),"drishti.RenderData","roi_in",r),be(this,e,s);e:{try{const u=new nn(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var a=u;break e}this.j(u)}finally{Vn(this)}a=void 0}return a}m(){var e=new Q;F(e,"image_in"),F(e,"roi_in"),F(e,"norm_rect_in");const t=new de;ye(t,Io,this.h);const r=new $;ge(r,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),A(r,"IMAGE:image_in"),A(r,"ROI:roi_in"),A(r,"NORM_RECT:norm_rect_in"),r.o(t),me(e,r),jn(this,e),this.outputConfidenceMasks&&(S(e,"confidence_masks"),w(r,"CONFIDENCE_MASKS:confidence_masks"),At(this,"confidence_masks"),this.g.Y("confidence_masks",(n,s)=>{this.confidenceMasks=n.map(i=>Tt(this,i,!this.j)),d(this,s)}),this.g.attachEmptyPacketListener("confidence_masks",n=>{this.confidenceMasks=[],d(this,n)})),this.outputCategoryMask&&(S(e,"category_mask"),w(r,"CATEGORY_MASK:category_mask"),At(this,"category_mask"),this.g.X("category_mask",(n,s)=>{this.categoryMask=Tt(this,n,!this.j),d(this,s)}),this.g.attachEmptyPacketListener("category_mask",n=>{this.categoryMask=void 0,d(this,n)})),S(e,"quality_scores"),w(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(n,s)=>{this.qualityScores=n,d(this,s)}),this.g.attachEmptyPacketListener("quality_scores",n=>{this.categoryMask=void 0,d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ae.prototype.segment=Ae.prototype.ba,Ae.prototype.setOptions=Ae.prototype.o,Ae.createFromModelPath=function(e,t){return y(Ae,e,{baseOptions:{modelAssetPath:t}})},Ae.createFromModelBuffer=function(e,t){return y(Ae,e,{baseOptions:{modelAssetBuffer:t}})},Ae.createFromOptions=function(e,t){return y(Ae,e,t)};var ae=class extends se{constructor(e,t){super(new we(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},this.h=new Nn,e=new I,p(this.h,0,1,e)}get baseOptions(){return _(this.h,I,1)}set baseOptions(e){p(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?b(this.h,2,Ot(e.displayNamesLocale)):"displayNamesLocale"in e&&b(this.h,2),e.maxResults!==void 0?xe(this.h,3,e.maxResults):"maxResults"in e&&b(this.h,3),e.scoreThreshold!==void 0?g(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&b(this.h,4),e.categoryAllowlist!==void 0?sr(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&b(this.h,5),e.categoryDenylist!==void 0?sr(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&b(this.h,6),this.l(e)}F(e,t){return this.j={detections:[]},be(this,e,t),this.j}G(e,t,r){return this.j={detections:[]},Be(this,e,r,t),this.j}m(){var e=new Q;F(e,"input_frame_gpu"),F(e,"norm_rect"),S(e,"detections");const t=new de;ye(t,O1,this.h);const r=new $;ge(r,"mediapipe.tasks.vision.ObjectDetectorGraph"),A(r,"IMAGE:input_frame_gpu"),A(r,"NORM_RECT:norm_rect"),w(r,"DETECTIONS:detections"),r.o(t),me(e,r),this.g.attachProtoVectorListener("detections",(n,s)=>{for(const i of n)n=Qi(i),this.j.detections.push(Uo(n));d(this,s)}),this.g.attachEmptyPacketListener("detections",n=>{d(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ae.prototype.detectForVideo=ae.prototype.G,ae.prototype.detect=ae.prototype.F,ae.prototype.setOptions=ae.prototype.o,ae.createFromModelPath=async function(e,t){return y(ae,e,{baseOptions:{modelAssetPath:t}})},ae.createFromModelBuffer=function(e,t){return y(ae,e,{baseOptions:{modelAssetBuffer:t}})},ae.createFromOptions=function(e,t){return y(ae,e,t)};function $s(e){e.landmarks=[],e.worldLandmarks=[],e.v=void 0}function qs(e){try{const t=new class{constructor(r,n,s){this.landmarks=r,this.worldLandmarks=n,this.g=s}close(){var r;(r=this.g)==null||r.forEach(n=>{n.close()})}}(e.landmarks,e.worldLandmarks,e.v);if(!e.u)return t;e.u(t)}finally{Vn(e)}}var ne=class extends se{constructor(e,t){super(new we(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,this.h=new Bo,e=new I,p(this.h,0,1,e),this.C=new P1,p(this.h,0,3,this.C),this.j=new M1,p(this.h,0,2,this.j),xe(this.j,4,1),g(this.j,2,.5),g(this.C,2,.5),g(this.h,4,.5)}get baseOptions(){return _(this.h,I,1)}set baseOptions(e){p(this.h,0,1,e)}o(e){return"numPoses"in e&&xe(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&g(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&g(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&g(this.C,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}F(e,t,r){const n=typeof t!="function"?t:{};return this.u=typeof t=="function"?t:r,$s(this),be(this,e,n),qs(this)}G(e,t,r,n){const s=typeof r!="function"?r:{};return this.u=typeof r=="function"?r:n,$s(this),Be(this,e,s,t),qs(this)}m(){var e=new Q;F(e,"image_in"),F(e,"norm_rect"),S(e,"normalized_landmarks"),S(e,"world_landmarks"),S(e,"segmentation_masks");const t=new de;ye(t,R1,this.h);const r=new $;ge(r,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),A(r,"IMAGE:image_in"),A(r,"NORM_RECT:norm_rect"),w(r,"NORM_LANDMARKS:normalized_landmarks"),w(r,"WORLD_LANDMARKS:world_landmarks"),r.o(t),me(e,r),jn(this,e),this.g.attachProtoVectorListener("normalized_landmarks",(n,s)=>{this.landmarks=[];for(const i of n)n=wr(i),this.landmarks.push(Gn(n));d(this,s)}),this.g.attachEmptyPacketListener("normalized_landmarks",n=>{this.landmarks=[],d(this,n)}),this.g.attachProtoVectorListener("world_landmarks",(n,s)=>{this.worldLandmarks=[];for(const i of n)n=Cn(i),this.worldLandmarks.push(No(n));d(this,s)}),this.g.attachEmptyPacketListener("world_landmarks",n=>{this.worldLandmarks=[],d(this,n)}),this.outputSegmentationMasks&&(w(r,"SEGMENTATION_MASK:segmentation_masks"),At(this,"segmentation_masks"),this.g.Y("segmentation_masks",(n,s)=>{this.v=n.map(i=>Tt(this,i,!this.u)),d(this,s)}),this.g.attachEmptyPacketListener("segmentation_masks",n=>{this.v=[],d(this,n)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ne.prototype.detectForVideo=ne.prototype.G,ne.prototype.detect=ne.prototype.F,ne.prototype.setOptions=ne.prototype.o,ne.createFromModelPath=function(e,t){return y(ne,e,{baseOptions:{modelAssetPath:t}})},ne.createFromModelBuffer=function(e,t){return y(ne,e,{baseOptions:{modelAssetBuffer:t}})},ne.createFromOptions=function(e,t){return y(ne,e,t)},ne.POSE_CONNECTIONS=_e([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]);export{ie as FaceDetector,M as FaceLandmarker,Ee as FaceStylizer,Ut as FilesetResolver,ee as GestureRecognizer,te as HandLandmarker,oe as ImageClassifier,re as ImageEmbedder,q as ImageSegmenter,rn as ImageSegmenterResult,Ae as InteractiveSegmenter,nn as InteractiveSegmenterResult,V as MPImage,j as MPMask,ae as ObjectDetector,ne as PoseLandmarker,Qr as TaskRunner,se as VisionTaskRunner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as u}from"./chunk-cf010ec4.js";import{p as l,q as c}from"./chunk-af3ddd0a.js";import{r as a}from"./chunk-3010a972.js";import"./chunk-d9bdcef8.js";const p={all:255,foregrounds:2,backgrounds:1};let s=!1;async function m(e=t=>{s=t}){if(typeof window>"u")return;const{LumaSplatsThree:o}=await u(()=>import("./chunk-bbf8b6fc.js"),["assets/chunks/chunk-bbf8b6fc.js","assets/chunks/chunk-af3ddd0a.js","assets/chunks/chunk-3010a972.js","assets/chunks/chunk-cf010ec4.js","assets/chunks/chunk-d9bdcef8.js"]);c({LumaSplats:o}),e(!0)}function L({src:e,semantics:t="all",...o}){const[n,i]=a.useState(s);return a.useEffect(()=>{s||(async()=>{console.log("registering LumaSplats component. This should occur only once."),await m(r=>{i(r),s=r})})()},[]),n?l.jsx("lumaSplats",{semanticsMask:p[t],source:e,...o}):null}export{L as default};
|