cozyclay 1.2.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +193 -0
- package/LICENSE +67 -80
- package/LICENSES/GPL-3.0-or-later.txt +674 -0
- package/LICENSING.md +32 -0
- package/README.md +48 -6
- package/THIRD_PARTY_NOTICES.md +47 -1
- package/bin/cozyclay.mjs +120 -50
- package/bin/mcp-runtime.mjs +115 -0
- package/bin/open-browser.mjs +10 -0
- package/bin/update-check.mjs +158 -0
- package/dist/ai-camera-control/index.html +406 -0
- package/dist/app/index.html +5 -5
- package/dist/ardy/assembled/run-jump-15s.npz +0 -0
- package/dist/assets/app-CqOk49Bk.css +1 -0
- package/dist/assets/app-zu633VCI.js +4811 -0
- package/dist/assets/vision_bundle-jFkh-fIS.js +41 -0
- package/dist/fonts/InstrumentSerif-OFL.txt +93 -0
- package/dist/fonts/Inter-OFL.txt +92 -0
- package/dist/fonts/README.md +15 -0
- package/dist/index.html +62 -17
- package/dist/sitemap.xml +7 -1
- package/mcp/LIVE-PROTOCOL.md +144 -0
- package/mcp/README.md +160 -0
- package/mcp/ardy-prompts.mjs +188 -0
- package/mcp/live-hub.mjs +319 -0
- package/mcp/package.json +27 -0
- package/mcp/runtime/package-lock.json +1211 -0
- package/mcp/runtime/package.json +16 -0
- package/mcp/server.mjs +2008 -0
- package/package.json +142 -90
- package/src/App.jsx +5475 -1028
- package/src/ardy/cskel27.js +7 -2
- package/src/ardy/ik.js +25 -15
- package/src/ardy/motion-edit.js +172 -0
- package/src/ardy/npz.js +64 -3
- package/src/ardy/playback.js +31 -1
- package/src/ardy/pose-pin.js +97 -0
- package/src/ardy/prompt-clips.js +7 -2
- package/src/ardy/retime.js +211 -0
- package/src/ardy/root-drop.js +180 -0
- package/src/ardy/timeline-coordinates.js +13 -0
- package/src/ardy/timeline-resize.js +3 -1
- package/src/ardy/timeline.jsx +471 -63
- package/src/ardy/to-cskel27.js +34 -12
- package/src/ardy/trim.js +33 -0
- package/src/ardy/waypoints.js +4 -1
- package/src/asset-pane.jsx +354 -0
- package/src/asset-shelf.js +82 -0
- package/src/camera-block.js +42 -0
- package/src/camera-follow.js +149 -27
- package/src/camera-move.js +45 -19
- package/src/camera-rail-schedule.js +6 -0
- package/src/cuts.js +67 -54
- package/src/dualview.jsx +58 -12
- package/src/generation/generation-request.js +17 -0
- package/src/generation/use-generation.js +3 -14
- package/src/hierarchy-model.js +100 -16
- package/src/hierarchy-panel.jsx +139 -6
- package/src/live-control.js +142 -0
- package/src/matte-editor.js +543 -0
- package/src/matte.js +503 -0
- package/src/mp4-muxer.js +52 -0
- package/src/multimodel-ingest.js +344 -0
- package/src/object-gizmo.jsx +248 -25
- package/src/offscreen-export.js +166 -0
- package/src/otio.js +217 -0
- package/src/planview.jsx +57 -38
- package/src/pose-extract/detector.js +80 -0
- package/src/pose-extract/image-frame.js +40 -0
- package/src/pose-extract/index.js +4 -0
- package/src/pose-extract/take.js +114 -0
- package/src/pose-extract/video-frames.js +91 -0
- package/src/pose-thumbs.js +152 -0
- package/src/poses.js +19 -265
- package/src/posestudio.jsx +441 -17
- package/src/project-browser.jsx +135 -0
- package/src/project-poses.js +9 -0
- package/src/project.js +373 -0
- package/src/props.jsx +69 -3
- package/src/room.jsx +89 -37
- package/src/sample-at.js +136 -0
- package/src/scene-asset-cache.js +166 -0
- package/src/scene-assets.js +378 -0
- package/src/scene-objects.js +308 -7
- package/src/scenes.js +235 -26
- package/src/shot-authoring.js +120 -41
- package/src/shot.js +53 -13
- package/src/source-offer.jsx +12 -0
- package/src/stable-items.js +83 -0
- package/src/styles.css +2283 -349
- package/src/ui.jsx +32 -4
- package/src/usd-camera.js +145 -0
- package/tools/ardy/BRIDGE.md +11 -7
- package/tools/ardy/README.md +24 -5
- package/tools/ardy/artifacts.mjs +34 -0
- package/tools/ardy/bridge.mjs +89 -12
- package/tools/ardy/bvh-cskel27.mjs +1209 -0
- package/tools/ardy/cclay_constrained_generate.py +123 -11
- package/tools/ardy/cclay_sequence_generate.py +49 -0
- package/tools/ardy/extract.mjs +372 -0
- package/tools/ardy/footage.mjs +467 -0
- package/tools/ardy/npz.mjs +74 -9
- package/tools/ardy/run-on-box.sh +25 -0
- package/tools/ardy/run-sequence-on-box.sh +15 -0
- package/tools/ardy/runners/local.mjs +4 -1
- package/tools/ardy/runners/remote.mjs +8 -2
- package/tools/ardy/setup-text-encoder.py +14 -4
- package/tools/dev-full.mjs +63 -5
- package/tools/generation/bridge.mjs +14 -1
- package/tools/process-supervisor.mjs +97 -1
- package/tools/run-tests.mjs +169 -0
- package/dist/assets/app-Cgpk2hwX.js +0 -4803
- package/dist/assets/app-DgZvaAE1.css +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var e=typeof self<`u`?self:{};function t(t,n){t:{for(var r=[`CLOSURE_FLAGS`],i=e,a=0;a<r.length;a++)if((i=i[r[a]])==null){r=null;break t}r=i}return(t=r&&r[t])??n}function n(){throw Error(`Invalid UTF8`)}function r(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}var i,a,o=typeof TextDecoder<`u`,s,c=typeof TextEncoder<`u`;function l(e){if(c)e=(s||=new TextEncoder).encode(e);else{let n=0,r=new Uint8Array(3*e.length);for(let i=0;i<e.length;i++){var t=e.charCodeAt(i);if(t<128)r[n++]=t;else{if(t<2048)r[n++]=t>>6|192;else{if(t>=55296&&t<=57343){if(t<=56319&&i<e.length){let a=e.charCodeAt(++i);if(a>=56320&&a<=57343){t=1024*(t-55296)+a-56320+65536,r[n++]=t>>18|240,r[n++]=t>>12&63|128,r[n++]=t>>6&63|128,r[n++]=63&t|128;continue}i--}t=65533}r[n++]=t>>12|224,r[n++]=t>>6&63|128}r[n++]=63&t|128}}e=n===r.length?r:r.subarray(0,n)}return e}var u,d=t(610401301,!1),ee=t(653718497,t(1,!0)),te=t(660014094,!1),ne=e.navigator;function re(e){return!!d&&!!u&&u.brands.some((({brand:t})=>t&&t.indexOf(e)!=-1))}function ie(t){var n;return(n=e.navigator)&&(n=n.userAgent)||(n=``),n.indexOf(t)!=-1}function ae(){return!!d&&!!u&&u.brands.length>0}function oe(){return ae()?re(`Chromium`):(ie(`Chrome`)||ie(`CriOS`))&&!(!ae()&&ie(`Edge`))||ie(`Silk`)}function se(e){return se[` `](e),e}u=ne&&ne.userAgentData||null,se[` `]=function(){};var ce=!ae()&&(ie(`Trident`)||ie(`MSIE`));!ie(`Android`)||oe(),oe(),ie(`Safari`)&&(oe()||!ae()&&ie(`Coast`)||!ae()&&ie(`Opera`)||!ae()&&ie(`Edge`)||(ae()?re(`Microsoft Edge`):ie(`Edg/`))||ae()&&re(`Opera`));var le={},ue=null;function de(e){var t=e.length,n=3*t/4;n%3?n=Math.floor(n):`=.`.indexOf(e[t-1])!=-1&&(n=`=.`.indexOf(e[t-2])==-1?n-1:n-2);var r=new Uint8Array(n),i=0;return function(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),i=ue[n];if(i!=null)return i;if(!/^[\s\xa0]*$/.test(n))throw Error(`Unknown base64 encoding at char: `+n)}return t}fe();for(var r=0;;){var i=n(-1),a=n(0),o=n(64),s=n(64);if(s===64&&i===-1)break;t(i<<2|a>>4),o!=64&&(t(a<<4&240|o>>2),s!=64&&t(o<<6&192|s))}}(e,(function(e){r[i++]=e})),i===n?r:r.subarray(0,i)}function fe(){if(!ue){ue={};for(var e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.split(``),t=[`+/=`,`+/`,`-_=`,`-_.`,`-_`],n=0;n<5;n++){var r=e.concat(t[n].split(``));le[n]=r;for(var i=0;i<r.length;i++){var a=r[i];ue[a]===void 0&&(ue[a]=i)}}}}var pe=typeof Uint8Array<`u`,me=!ce&&typeof btoa==`function`;function he(e){if(!me){var t;t===void 0&&(t=0),fe(),t=le[t];var n=Array(Math.floor(e.length/3)),r=t[64]||``;let c=0,l=0;for(;c<e.length-2;c+=3){var i=e[c],a=e[c+1],o=e[c+2],s=t[i>>2];i=t[(3&i)<<4|a>>4],a=t[(15&a)<<2|o>>6],o=t[63&o],n[l++]=s+i+a+o}switch(s=0,o=r,e.length-c){case 2:o=t[(15&(s=e[c+1]))<<2]||r;case 1:e=e[c],n[l]=t[e>>2]+t[(3&e)<<4|s>>4]+o+r}return n.join(``)}for(t=``,n=0,r=e.length-10240;n<r;)t+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));return t+=String.fromCharCode.apply(null,n?e.subarray(n):e),btoa(t)}var ge=/[-_.]/g,_e={"-":`+`,_:`/`,".":`=`};function ve(e){return _e[e]||``}function ye(e){if(!me)return de(e);ge.test(e)&&(e=e.replace(ge,ve)),e=atob(e);let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function be(e){return pe&&e!=null&&e instanceof Uint8Array}var xe={},Se;function Ce(e){if(e!==xe)throw Error(`illegal external caller`)}function we(){return Se||=new Ee(null,xe)}function Te(e){Ce(xe);var t=e.ba;return(t=t==null||be(t)?t:typeof t==`string`?ye(t):null)==null?t:e.ba=t}var Ee=class{constructor(e,t){if(Ce(t),this.ba=e,e!=null&&e.length===0)throw Error(`ByteString should be constructed with non-empty values`)}ua(){return new Uint8Array(Te(this)||0)}};function De(e,t){e.__closure__error__context__984382||={},e.__closure__error__context__984382.severity=t}var Oe;function ke(){let t=Error();De(t,`incident`),function(t){e.setTimeout((()=>{throw t}),0)}(t)}function Ae(e){return De(e=Error(e),`warning`),e}function je(){return typeof BigInt==`function`}function Me(e){return Array.prototype.slice.call(e)}var Ne=typeof Symbol==`function`&&typeof Symbol()==`symbol`;function Pe(e){return typeof Symbol==`function`&&typeof Symbol()==`symbol`?Symbol():e}var Fe=Pe(),Ie=Pe(`0di`),Le=Pe(`2ex`),Re=Pe(`1oa`),ze=Pe(`0dg`),Be=Ne?(e,t)=>{e[Fe]|=t}:(e,t)=>{e.G===void 0?Object.defineProperties(e,{G:{value:t,configurable:!0,writable:!0,enumerable:!1}}):e.G|=t},Ve=Ne?(e,t)=>{e[Fe]&=~t}:(e,t)=>{e.G!==void 0&&(e.G&=~t)},f=Ne?e=>0|e[Fe]:e=>0|e.G,p=Ne?e=>e[Fe]:e=>e.G,m=Ne?(e,t)=>{e[Fe]=t}:(e,t)=>{e.G===void 0?Object.defineProperties(e,{G:{value:t,configurable:!0,writable:!0,enumerable:!1}}):e.G=t};function He(e){return Be(e,34),e}function Ue(e,t){m(t,-14591&(0|e))}function We(e,t){m(t,-14557&(34|e))}var Ge,Ke={},qe={};function Je(e){return!(!e||typeof e!=`object`||e.La!==qe)}function Ye(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&e.constructor===Object}function Xe(e,t,n){if(e!=null){if(typeof e==`string`)e=e?new Ee(e,xe):we();else if(e.constructor!==Ee)if(be(e))e=e.length?new Ee(n?e:new Uint8Array(e),xe):we();else{if(!t)throw Error();e=void 0}}return e}function Ze(e){return!(!Array.isArray(e)||e.length)&&!!(1&f(e))}var Qe=[];function $e(e){if(2&e)throw Error()}m(Qe,55),Ge=Object.freeze(Qe);var et=class e{constructor(e,t,n){this.l=0,this.g=e,this.h=t,this.m=n}next(){if(this.l<this.g.length){let e=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,e):e}}return{done:!0,value:void 0}}[Symbol.iterator](){return new e(this.g,this.h,this.m)}},tt;function nt(e,t){(t=tt?t[tt]:void 0)&&(e[tt]=Me(t))}var rt=Object.freeze({});Object.freeze({});var it=Object.freeze({});function at(e){return e.Sa=!0,e}var ot=at((e=>typeof e==`number`)),st=at((e=>typeof e==`string`)),ct=at((e=>typeof e==`boolean`)),lt=typeof e.BigInt==`function`&&typeof e.BigInt(0)==`bigint`,ut=at((e=>lt?e>=ft&&e<=mt:e[0]===`-`?ht(e,dt):ht(e,pt))),dt=(-(2**53-1)).toString(),ft=lt?BigInt(-(2**53-1)):void 0,pt=(2**53-1).toString(),mt=lt?BigInt(2**53-1):void 0;function ht(e,t){if(e.length>t.length)return!1;if(e.length<t.length||e===t)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r>i)return!1;if(r<i)return!0}}var gt=typeof Uint8Array.prototype.slice==`function`,_t,h=0,g=0;function vt(e){let t=e>>>0;h=t,g=(e-t)/4294967296>>>0}function yt(e){if(e<0){vt(-e);let[t,n]=Et(h,g);h=t>>>0,g=n>>>0}else vt(e)}function bt(e){let t=_t||=new DataView(new ArrayBuffer(8));t.setFloat32(0,+e,!0),g=0,h=t.getUint32(0,!0)}function xt(e,t){return 4294967296*t+(e>>>0)}function St(e,t){let n=2147483648&t;return n&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=xt(e,t),n?-e:e}function Ct(e,t){if(e>>>=0,(t>>>=0)<=2097151)var n=``+(4294967296*t+e);else je()?n=``+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(n=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,e>=1e7&&(n+=e/1e7>>>0,e%=1e7),n>=1e7&&(t+=n/1e7>>>0,n%=1e7),n=t+wt(n)+wt(e));return n}function wt(e){return e=String(e),`0000000`.slice(e.length)+e}function Tt(e){if(e.length<16)yt(Number(e));else if(je())e=BigInt(e),h=Number(e&BigInt(4294967295))>>>0,g=Number(e>>BigInt(32)&BigInt(4294967295));else{let t=+(e[0]===`-`);g=h=0;let n=e.length;for(let r=t,i=(n-t)%6+t;i<=n;r=i,i+=6){let t=Number(e.slice(r,i));g*=1e6,h=1e6*h+t,h>=4294967296&&(g+=Math.trunc(h/4294967296),g>>>=0,h>>>=0)}if(t){let[e,t]=Et(h,g);h=e,g=t}}}function Et(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function Dt(e){return e==null||typeof e==`number`?e:e===`NaN`||e===`Infinity`||e===`-Infinity`?Number(e):void 0}function Ot(e){return e==null||typeof e==`boolean`?e:typeof e==`number`?!!e:void 0}var kt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function At(e){let t=typeof e;switch(t){case`bigint`:return!0;case`number`:return Number.isFinite(e)}return t===`string`&&kt.test(e)}function jt(e){if(e==null)return e;if(typeof e==`string`){if(!e)return;e=+e}return typeof e==`number`&&Number.isFinite(e)?0|e:void 0}function Mt(e){if(e==null)return e;if(typeof e==`string`){if(!e)return;e=+e}return typeof e==`number`&&Number.isFinite(e)?e>>>0:void 0}function Nt(e){return e[0]!==`-`&&(e.length<20||e.length===20&&Number(e.substring(0,6))<184467)}function Pt(e){return e=Math.trunc(e),Number.isSafeInteger(e)||(yt(e),e=St(h,g)),e}function Ft(e){var t=Math.trunc(Number(e));if(Number.isSafeInteger(t))return String(t);if((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),!(e[0]===`-`?e.length<20||e.length===20&&Number(e.substring(0,7))>-922337:e.length<19||e.length===19&&Number(e.substring(0,6))<922337))if(Tt(e),e=h,2147483648&(t=g))if(je())e=``+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{let[n,r]=Et(e,t);e=`-`+Ct(n,r)}else e=Ct(e,t);return e}function It(e){return e==null?e:typeof e==`bigint`?(ut(e)?e=Number(e):(e=BigInt.asIntN(64,e),e=ut(e)?Number(e):String(e)),e):At(e)?typeof e==`number`?Pt(e):Ft(e):void 0}function Lt(e){if(e==null)return e;var t=typeof e;if(t===`bigint`)return String(BigInt.asUintN(64,e));if(At(e)){if(t===`string`)return t=Math.trunc(Number(e)),Number.isSafeInteger(t)&&t>=0?e=String(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),Nt(e)||(Tt(e),e=Ct(h,g))),e;if(t===`number`)return(e=Math.trunc(e))>=0&&Number.isSafeInteger(e)?e:function(e){if(e<0){yt(e);let t=Ct(h,g);return e=Number(t),Number.isSafeInteger(e)?e:t}return Nt(String(e))?e:(yt(e),xt(h,g))}(e)}}function Rt(e){if(typeof e!=`string`)throw Error();return e}function zt(e){if(e!=null&&typeof e!=`string`)throw Error();return e}function Bt(e){return e==null||typeof e==`string`?e:void 0}function Vt(e,t,n,r){if(typeof e==`object`&&e&&e.Y===Ke)return e;if(!Array.isArray(e))return n?2&r?(e=t[Ie])?t=e:(He((e=new t).u),t=t[Ie]=e):t=new t:t=void 0,t;let i=n=f(e);return i===0&&(i|=32&r),i|=2&r,i!==n&&m(e,i),new t(e)}function Ht(e,t,n){if(t)t:{if(!At(t=e))throw Ae(`int64`);switch(typeof t){case`string`:t=Ft(t);break t;case`bigint`:if(e=t=BigInt.asIntN(64,t),st(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(ot(e)&&!Number.isSafeInteger(e))throw Error(String(e));t=lt?BigInt(t):ct(t)?t?`1`:`0`:st(t)?t.trim()||`0`:String(t);break t;default:t=Pt(t)}}else t=It(e);return typeof(n=(e=t)??(n?0:void 0))==`string`&&(t=+n,Number.isSafeInteger(t))?t:n}function Ut(e){if(Kt===void 0&&(Kt=typeof Proxy==`function`?en(Proxy):null),!Kt||!$t())return e;let t=Wt?.get(e);return t||(Math.random()>.01?e:(function(e){if(Jt===void 0){let e=new Kt([],{});Jt=Array.prototype.concat.call([],e).length===1}Jt&&typeof Symbol==`function`&&Symbol.isConcatSpreadable&&(e[Symbol.isConcatSpreadable]=!0)}(e),t=new Kt(e,{set:(e,t,n)=>(ke(),e[t]=n,!0)}),function(e,t){(Wt||=new qt).set(e,t),(Gt||=new qt).set(t,e)}(e,t),t))}var Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt;function $t(){return qt===void 0&&(qt=typeof WeakMap==`function`?en(WeakMap):null),qt}function en(e){try{return e.toString().indexOf(`[native code]`)===-1?null:e}catch{return null}}function tn(e,t,n){if(ee&&$t()){if(Yt?.get(t)?.get(e)){if(n)return}else if(Math.random()>.01)return;var r=e.length;n={length:r};for(var i=0;i<Math.min(r,10);i++){if(r<=10)var a=i;else{a=r/10;let e=Math.floor(i*a);a=e+Math.floor(Math.random()*(Math.floor((i+1)*a)-e))}n[a]=e[a]}rn(e,n)?((i=(r=Yt||=new qt).get(t))||(i=new qt,r.set(t,i)),i.set(e,n)):(ke(),on(e,t))}}function nn(e,t){let n=Yt?.get(t)?.get(e);n&&!rn(e,n)&&(ke(),on(e,t))}function rn(e,t){if(e.length!==t.length)return!1;for(let i in t){var n,r=Number(i);if((n=Number.isInteger(r))&&(n=e[r],r=t[r],n=!(Number.isNaN(n)?Number.isNaN(r):n===r)),n)return!1}return!0}function an(e){if(e&&Yt?.has(e)){var t=e.u;if(t)for(let n=0;n<t.length;n++){let r=t[n];if(n===t.length-1&&Ye(r))for(let t in r){let n=r[t];Array.isArray(n)&&nn(n,e)}else Array.isArray(r)&&nn(r,e)}}}function on(e,t){Yt?.get(t)?.delete(e)}function sn(e,t){return e=cn(e,t[0],t[1]),Be(e,16384),e}function cn(e,t,n){if(e??=Xt,Xt=void 0,e==null){var r=96;n?(e=[n],r|=512):e=[],t&&(r=-33521665&r|(1023&t)<<15)}else{if(!Array.isArray(e))throw Error(`narr`);if(2048&(r=f(e)))throw Error(`farr`);if(64&r)return e;if(r|=64,n&&(r|=512,n!==e[0]))throw Error(`mid`);t:{let i=(n=e).length;if(i){let e=i-1;if(Ye(n[e])){if((t=e-(!!(512&(r|=256))-1))>=1024)throw Error(`pvtlmt`);r=-33521665&r|(1023&t)<<15;break t}}if(t){if((t=Math.max(t,i-(!!(512&r)-1)))>1024)throw Error(`spvt`);r=-33521665&r|(1023&t)<<15}}}return m(e,r),e}var ln={},un=function(){try{return se(new class extends Map{constructor(){super()}}),!1}catch{return!0}}(),dn=class{constructor(){this.g=new Map}get(e){return this.g.get(e)}set(e,t){return this.g.set(e,t),this.size=this.g.size,this}delete(e){return e=this.g.delete(e),this.size=this.g.size,e}clear(){this.g.clear(),this.size=this.g.size}has(e){return this.g.has(e)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(e,t){return this.g.forEach(e,t)}[Symbol.iterator](){return this.entries()}},fn=un?(Object.setPrototypeOf(dn.prototype,Map.prototype),Object.defineProperties(dn.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),dn):class extends Map{constructor(){super()}};function pn(e){return e}function mn(e){if(2&e.M)throw Error(`Cannot mutate an immutable Map`)}var hn=class extends fn{constructor(e,t,n=pn,r=pn){super();let i=f(e);i|=64,m(e,i),this.M=i,this.U=t,this.T=n,this.aa=this.U?gn:r;for(let a=0;a<e.length;a++){let o=e[a],s=n(o[0],!1,!0),c=o[1];t?c===void 0&&(c=null):c=r(o[1],!1,!0,void 0,void 0,i),super.set(s,c)}}pa(e=_n){if(this.size!==0)return this.Z(e)}Z(e=_n){let t=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=e(r[0]),r[1]=e(r[1]),t.push(r);return t}clear(){mn(this),super.clear()}delete(e){return mn(this),super.delete(this.T(e,!0,!1))}entries(){return new et(this.oa(),vn,this)}keys(){return this.Ka()}values(){return new et(this.oa(),hn.prototype.get,this)}forEach(e,t){super.forEach(((n,r)=>{e.call(t,this.get(r),r,this)}))}set(e,t){return mn(this),(e=this.T(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.aa(t,!0,!0,this.U,!1,this.M))}Qa(e){let t=this.T(e[0],!1,!0);e=e[1],e=this.U?e===void 0?null:e:this.aa(e,!1,!0,void 0,!1,this.M),super.set(t,e)}has(e){return super.has(this.T(e,!1,!1))}get(e){e=this.T(e,!1,!1);let t=super.get(e);if(t!==void 0){var n=this.U;return n?((n=this.aa(t,!1,!0,n,this.va,this.M))!==t&&super.set(e,n),n):t}}oa(){return Array.from(super.keys())}Ka(){return super.keys()}[Symbol.iterator](){return this.entries()}};function gn(e,t,n,r,i,a){return e=Vt(e,r,n,a),i&&(e=On(e)),e}function _n(e){return e}function vn(e){return[e,this.get(e)]}var yn;function bn(){return yn||=new hn(He([]),void 0,void 0,void 0,ln)}function xn(e,t,n,r,i){if(e!=null){if(Array.isArray(e))e=Ze(e)?void 0:i&&2&f(e)?e:Sn(e,t,n,r!==void 0,i);else if(Ye(e)){let a={};for(let o in e)a[o]=xn(e[o],t,n,r,i);e=a}else e=t(e,r);return e}}function Sn(e,t,n,r,i){let a=r||n?f(e):0;r=r?!!(32&a):void 0;let o=Me(e);for(let e=0;e<o.length;e++)o[e]=xn(o[e],t,n,r,i);return n&&(nt(o,e),n(a,o)),o}function Cn(e){return xn(e,wn,void 0,void 0,!1)}function wn(e){return e.Y===Ke?e.toJSON():e instanceof hn?e.pa(Cn):function(e){switch(typeof e){case`number`:return isFinite(e)?e:String(e);case`bigint`:return ut(e)?Number(e):String(e);case`boolean`:return+!!e;case`object`:if(e)if(Array.isArray(e)){if(Ze(e))return}else{if(be(e))return he(e);if(e instanceof Ee){let t=e.ba;return t==null?``:typeof t==`string`?t:e.ba=he(t)}if(e instanceof hn)return e.pa()}}return e}(e)}function Tn(e,t,n=We){if(e!=null){if(pe&&e instanceof Uint8Array)return t?e:new Uint8Array(e);if(Array.isArray(e)){var r=f(e);return 2&r?e:(t&&=r===0||!!(32&r)&&!(64&r||!(16&r)),t?(m(e,-12293&(34|r)),e):Sn(e,Tn,4&r?We:n,!0,!0))}return e.Y===Ke?(n=e.u,e=2&(r=p(n))?e:En(e,n,r,!0)):e instanceof hn&&!(2&e.M)&&(n=He(e.Z(Tn)),e=new hn(n,e.U,e.T,e.aa)),e}}function En(e,t,n,r){return an(e),e=e.constructor,Xt=t=Dn(t,n,r),t=new e(t),Xt=void 0,t}function Dn(e,t,n){let r=n||2&t?We:Ue,i=!!(32&t);return e=function(e,t,n){let r=Me(e);var i=r.length;let a=256&t?r[i-1]:void 0;for(i+=a?-1:0,t=512&t?1:0;t<i;t++)r[t]=n(r[t]);if(a){t=r[t]={};for(let e in a)t[e]=n(a[e])}return nt(r,e),r}(e,t,(e=>Tn(e,i,r))),Be(e,32|(n?2:0)),e}function On(e){let t=e.u,n=p(t);return 2&n?En(e,t,n,!1):e}function kn(e,t,n,r){return!(4&t)||n!=null&&(!r&&n===0&&(4096&t||8192&t)&&(e.constructor[ze]=1+(0|e.constructor[ze]))<5&&ke(),n!==0&&!(n&t))}function An(e,t){return Mn(e=e.u,p(e),t)}function jn(e,t,n,r){if(!((t=r+(!!(512&t)-1))<0||t>=e.length||t>=n))return e[t]}function Mn(e,t,n,r){if(n===-1)return null;let i=t>>15&1023||536870912;if(!(n>=i)){var a=e.length;return r&&256&t&&(r=e[a-1][n])!=null?(jn(e,t,i,n)&&Le!=null&&((t=(e=Oe??={})[Le]||0)>=4||(e[Le]=t+1,ke())),r):jn(e,t,i,n)}return 256&t?e[e.length-1][n]:void 0}function _(e,t,n){let r=e.u,i=p(r);return $e(i),v(r,i,t,n),e}function v(e,t,n,r){let i=t>>15&1023||536870912;if(n>=i){let a,o=t;if(256&t)a=e[e.length-1];else{if(r==null)return o;a=e[i+(!!(512&t)-1)]={},o|=256}return a[n]=r,n<i&&(e[n+(!!(512&t)-1)]=void 0),o!==t&&m(e,o),o}return e[n+(!!(512&t)-1)]=r,256&t&&n in(e=e[e.length-1])&&delete e[n],t}function Nn(e,t,n,r,i){var a=2&t;i=Mn(e,t,n,i),Array.isArray(i)||(i=Ge);let o=!(2&r);r=!(1&r);let s=!!(32&t),c=f(i);return c!==0||!s||a||o?1&c||(c|=1,m(i,c)):(c|=33,m(i,c)),a?(e=!1,2&c||(He(i),e=!!(4&c)),(r||e)&&Object.freeze(i)):(a=!!(2&c)||!!(2048&c),r&&a?(i=Me(i),a=1,s&&!o&&(a|=32),m(i,a),v(e,t,n,i)):o&&32&c&&!a&&Ve(i,32)),i}function Pn(e,t){e=e.u;let n=p(e),r=Mn(e,n,t),i=Dt(r);return i!=null&&i!==r&&v(e,n,t,i),i}function Fn(e){e=e.u;let t=p(e),n=Mn(e,t,1),r=Xe(n,!0,!!(34&t));return r!=null&&r!==n&&v(e,t,1,r),r}function In(){return rt===void 0?2:5}function Ln(e,t,n,r,i,a){let o=e.u,s=p(o);r=2&s?1:r,a=!!a,i=Rn(o,s,t,i);var c=f(i),l=i;if(nn(l,e),r!==2&&r!==1||on(l,e),kn(e,c,void 0,a)){4&c&&(i=Me(i),c=Qn(c,s),s=v(o,s,t,i));let e=l=0;for(;l<i.length;l++){let t=n(i[l]);t!=null&&(i[e++]=t)}e<l&&(i.length=e),c=-4097&(20|(c=zn(c,s))),m(i,c&=-8193),2&c&&Object.freeze(i)}let u;return r===1||r===4&&32&c?Bn(c)||(e=c,(c|=2)!==e&&m(i,c),Object.freeze(i)):(n=r===5&&(!!(32&c)||Bn(c)||!!Wt?.get(i)),(r===2||n)&&Bn(c)&&(i=Me(i),c=$n(c=Qn(c,s),s,a),m(i,c),s=v(o,s,t,i)),Bn(c)||(t=c,(c=$n(c,s,a))!==t&&m(i,c)),n?(u=Ut(i),tn(i,e,!0)):r!==2||a||Wt?.delete(i)),u||i}function Rn(e,t,n,r){return e=Mn(e,t,n,r),Array.isArray(e)?e:Ge}function zn(e,t){return e===0&&(e=Qn(e,t)),1|e}function Bn(e){return!!(2&e)&&!!(4&e)||!!(2048&e)}function Vn(e){e=Me(e);for(let t=0;t<e.length;t++){let n=e[t]=Me(e[t]);Array.isArray(n[1])&&(n[1]=He(n[1]))}return e}function Hn(e,t,n,r){e=e.u;let i=p(e);$e(i),v(e,i,t,(r===`0`?Number(n)===0:n===r)?void 0:n)}function Un(e,t){var n=ja;return Kn(Wn(e=e.u),e,p(e),n)===t?t:-1}function Wn(e){if(Ne)return e[Re]??(e[Re]=new Map);if(Re in e)return e[Re];let t=new Map;return Object.defineProperty(e,Re,{value:t}),t}function Gn(e,t,n,r){let i=Wn(e),a=Kn(i,e,t,n);return a!==r&&(a&&(t=v(e,t,a)),i.set(n,r)),t}function Kn(e,t,n,r){let i=e.get(r);if(i!=null)return i;i=0;for(let e=0;e<r.length;e++){let a=r[e];Mn(t,n,a)!=null&&(i!==0&&(n=v(t,n,i)),i=a)}return e.set(r,i),i}function qn(e,t,n,r){let i,a=p(e);if((r=Mn(e,a,n,r))!=null&&r.Y===Ke)return(t=On(r))!==r&&v(e,a,n,t),t.u;if(Array.isArray(r)){let e=f(r);i=2&e?Dn(r,e,!1):r,i=sn(i,t)}else i=sn(void 0,t);return i!==r&&v(e,a,n,i),i}function Jn(e,t,n,r){e=e.u;let i=p(e);return(t=Vt(r=Mn(e,i,n,r),t,!1,i))!==r&&t!=null&&v(e,i,n,t),t}function y(e,t,n,r=!1){if((t=Jn(e,t,n,r))==null)return t;if(e=e.u,!(2&(r=p(e)))){let i=On(t);i!==t&&v(e,r,n,t=i)}return t}function Yn(e,t,n,r,i,a,o){let s=e.u;var c=!!(2&t);i=c?1:i,a=!!a,o&&=!c,c=Rn(s,t,r);var l=f(c),u=c;if(nn(u,e),i!==2&&i!==1||on(u,e),!(u=!!(4&l))){var d=c,ee=t;let e=!!(2&(l=zn(l,t)));e&&(ee|=2);let r=!e,i=!0,a=0,o=0;for(;a<d.length;a++){let t=Vt(d[a],n,!1,ee);if(t instanceof n){if(!e){let e=!!(2&f(t.u));r&&=!e,i&&=e}d[o++]=t}}o<a&&(d.length=o),l|=4,l=i?16|l:-17&l,m(d,l=r?8|l:-9&l),e&&Object.freeze(d)}if(o&&!(8&l||!c.length&&(i===1||i===4&&32&l))){for(Bn(l)?(c=Me(c),l=Qn(l,t),t=v(s,t,r,c)):on(c,e),n=c,o=l,d=0;d<n.length;d++)(l=n[d])!==(ee=On(l))&&(n[d]=ee);o|=8,o=n.length?-17&o:16|o,m(n,o),l=o}let te;return i===1||i===4&&32&l?Bn(l)||(e=l,(l|=!c.length||16&l&&(!u||32&l)?2:2048)!==e&&m(c,l),Object.freeze(c)):(u=i===5&&(!!(32&l)||Bn(l)||!!Wt?.get(c)),(i===2||u)&&Bn(l)&&(c=Me(c),l=$n(l=Qn(l,t),t,a),m(c,l),t=v(s,t,r,c)),Bn(l)||(r=l,(l=$n(l,t,a))!==r&&m(c,l)),u?(te=Ut(c),tn(c,e,!0)):i!==2||a||Wt?.delete(c)),te||c}function Xn(e,t,n){let r=p(e.u);return Yn(e,r,t,n,In(),!1,!(2&r))}function b(e,t,n,r){return r??=void 0,_(e,n,r)}function Zn(e,t,n,r){r??=void 0;t:{e=e.u;let i=p(e);if($e(i),r==null){let r=Wn(e);if(Kn(r,e,i,n)!==t)break t;r.set(n,0)}else i=Gn(e,i,n,t);v(e,i,t,r)}}function Qn(e,t){return-2049&(e=32|(2&t?2|e:-3&e))}function $n(e,t,n){return 32&t&&n||(e&=-33),e}function er(e,t,n,r){let i=p(e.u);$e(i),e=Yn(e,i,n,t,2,!0),n=r??new n,e.push(n),2&f(n.u)?Ve(e,8):Ve(e,16)}function tr(e,t){return e??t}function nr(e,t){return jt(An(e,t))}function x(e,t){return tr(Pn(e,t),0)}function rr(e,t){return tr(Bt(An(e,t)),``)}function ir(e,t,n){if(n!=null&&typeof n!=`boolean`)throw e=typeof n,Error(`Expected boolean but got ${e==`object`?n?Array.isArray(n)?`array`:e:`null`:e}: ${n}`);_(e,t,n)}function ar(e,t,n){if(n!=null){if(typeof n!=`number`||!Number.isFinite(n))throw Ae(`int32`);n|=0}_(e,t,n)}function S(e,t,n){if(n!=null&&typeof n!=`number`)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);_(e,t,n)}function or(e,t,n){{let s=e.u,c=p(s);if($e(c),n==null)v(s,c,t);else{n=Gt?.get(n)||n;var r,i=f(n),a=i,o=!!(2&i)||Object.isFrozen(n);if((r=!o)&&(r=it===void 0||!1),kn(e,i)){i=21,o&&(n=Me(n),a=0,i=$n(i=Qn(i,c),c,!0));for(let e=0;e<n.length;e++)n[e]=Rt(n[e])}r?(n=Me(n),a=0,i=$n(i=Qn(i,c),c,!0)):o||tn(n,e),i!==a&&m(n,i),v(s,c,t,n)}}}function sr(e,t,n){$e(p(e.u)),Ln(e,t,Bt,2,void 0,!0).push(Rt(n))}function cr(e,t){return Error(`Invalid wire type: ${e} (at position ${t})`)}function lr(){return Error(`Failed to read varint, encoding is invalid.`)}function ur(e,t){return Error(`Tried to read past the end of the data ${t} > ${e}`)}function dr(e){if(typeof e==`string`)return{buffer:ye(e),O:!1};if(Array.isArray(e))return{buffer:new Uint8Array(e),O:!1};if(e.constructor===Uint8Array)return{buffer:e,O:!1};if(e.constructor===ArrayBuffer)return{buffer:new Uint8Array(e),O:!1};if(e.constructor===Ee)return{buffer:Te(e)||new Uint8Array,O:!0};if(e instanceof Uint8Array)return{buffer:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),O:!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 fr(e,t){let n,r=0,i=0,a=0,o=e.h,s=e.g;do n=o[s++],r|=(127&n)<<a,a+=7;while(a<32&&128&n);for(a>32&&(i|=(127&n)>>4),a=3;a<32&&128&n;a+=7)n=o[s++],i|=(127&n)<<a;if(br(e,s),n<128)return t(r>>>0,i>>>0);throw lr()}function pr(e){let t=0,n=e.g,r=n+10,i=e.h;for(;n<r;){let r=i[n++];if(t|=r,!(128&r))return br(e,n),!!(127&t)}throw lr()}function mr(e){let t=e.h,n=e.g,r=t[n++],i=127&r;if(128&r&&(r=t[n++],i|=(127&r)<<7,128&r&&(r=t[n++],i|=(127&r)<<14,128&r&&(r=t[n++],i|=(127&r)<<21,128&r&&(r=t[n++],i|=r<<28,128&r&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++])))))throw lr();return br(e,n),i}function hr(e){return mr(e)>>>0}function gr(e){var t=e.h;let n=e.g,r=t[n],i=t[n+1],a=t[n+2];return t=t[n+3],br(e,e.g+4),(r<<0|i<<8|a<<16|t<<24)>>>0}function _r(e){var t=gr(e);e=2*(t>>31)+1;let n=t>>>23&255;return t&=8388607,n==255?t?NaN:e*(1/0):n==0?1401298464324817e-60*e*t:e*2**(n-150)*(t+8388608)}function vr(e){return mr(e)}function yr(e,t,{ea:n=!1}={}){e.ea=n,t&&(t=dr(t),e.h=t.buffer,e.m=t.O,e.j=0,e.l=e.h.length,e.g=e.j)}function br(e,t){if(e.g=t,t>e.l)throw ur(e.l,t)}function xr(e,t){if(t<0)throw Error(`Tried to read a negative byte length: ${t}`);let n=e.g,r=n+t;if(r>e.l)throw ur(t,e.l-n);return e.g=r,n}function Sr(e,t){if(t==0)return we();var n=xr(e,t);return e.ea&&e.m?n=e.h.subarray(n,n+t):(e=e.h,n=n===(t=n+t)?new Uint8Array:gt?e.slice(n,t):new Uint8Array(e.subarray(n,t))),n.length==0?we():new Ee(n,xe)}hn.prototype.toJSON=void 0,hn.prototype.La=qe;var Cr=[];function wr(e){var t=e.g;if(t.g==t.l)return!1;e.l=e.g.g;var n=hr(e.g);if(t=n>>>3,!((n&=7)>=0&&n<=5))throw cr(n,e.l);if(t<1)throw Error(`Invalid field number: ${t} (at position ${e.l})`);return e.m=t,e.h=n,!0}function Tr(e){switch(e.h){case 0:e.h==0?pr(e.g):Tr(e);break;case 1:br(e=e.g,e.g+8);break;case 2:if(e.h!=2)Tr(e);else{var t=hr(e.g);br(e=e.g,e.g+t)}break;case 5:br(e=e.g,e.g+4);break;case 3:for(t=e.m;;){if(!wr(e))throw Error(`Unmatched start-group tag: stream EOF`);if(e.h==4){if(e.m!=t)throw Error(`Unmatched end-group tag`);break}Tr(e)}break;default:throw cr(e.h,e.l)}}function Er(e,t,n){let r=e.g.l,i=hr(e.g),a=e.g.g+i,o=a-r;if(o<=0&&(e.g.l=a,n(t,e,void 0,void 0,void 0),o=a-e.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return e.g.g=a,e.g.l=r,t}function Dr(e){var t=hr(e.g),s=xr(e=e.g,t);if(e=e.h,o){var c,l=e;(c=a)||(c=a=new TextDecoder(`utf-8`,{fatal:!0})),t=s+t,l=s===0&&t===l.length?l:l.subarray(s,t);try{var u=c.decode(l)}catch(e){if(i===void 0){try{c.decode(new Uint8Array([128]))}catch{}try{c.decode(new Uint8Array([97])),i=!0}catch{i=!1}}throw!i&&(a=void 0),e}}else{t=(u=s)+t,s=[];let i,a=null;for(;u<t;){var d=e[u++];d<128?s.push(d):d<224?u>=t?n():(i=e[u++],d<194||(192&i)!=128?(u--,n()):s.push((31&d)<<6|63&i)):d<240?u>=t-1?n():(i=e[u++],(192&i)!=128||d===224&&i<160||d===237&&i>=160||(192&(c=e[u++]))!=128?(u--,n()):s.push((15&d)<<12|(63&i)<<6|63&c)):d<=244?u>=t-2?n():(i=e[u++],(192&i)!=128||i-144+(d<<28)>>30||(192&(c=e[u++]))!=128||(192&(l=e[u++]))!=128?(u--,n()):(d=(7&d)<<18|(63&i)<<12|(63&c)<<6|63&l,d-=65536,s.push(55296+(d>>10&1023),56320+(1023&d)))):n(),s.length>=8192&&(a=r(a,s),s.length=0)}u=r(a,s)}return u}function Or(e){let t=hr(e.g);return Sr(e.g,t)}function kr(e,t,n){var r=hr(e.g);for(r=e.g.g+r;e.g.g<r;)n.push(t(e.g))}var Ar=[],jr;function Mr(e,t,n){t.g?t.m(e,t.g,t.h,n,!0):t.m(e,t.h,n,!0)}var C=class{constructor(e,t){this.u=cn(e,t)}toJSON(){return Nr(this)}l(){var e=Ao;return e.g?e.l(this,e.g,e.h,!0):e.l(this,e.h,e.defaultValue,!0)}clone(){let e=this.u;return En(this,e,p(e),!1)}O(){return!!(2&f(this.u))}};function Nr(e){an(e),e=jr?e.u:Sn(e.u,wn,void 0,void 0,!1);{var t=!jr;let l=e.length;if(l){var n=e[l-1],r=Ye(n);r?l--:n=void 0;var i=e;if(r){t:{var a,o=n,s=!1;if(o)for(let e in o)isNaN(+e)?(a??={})[e]=o[e]:(r=o[e],Array.isArray(r)&&(Ze(r)||Je(r)&&r.size===0)&&(r=null),r??(s=!0),r!=null&&((a??={})[e]=r));if(s||(a=o),a)for(let e in a){s=a;break t}s=null}o=s==null?n!=null:s!==n}for(;l>0&&((a=i[l-1])==null||Ze(a)||Je(a)&&a.size===0);l--)var c=!0;(i!==e||o||c)&&(t?(c||o||s)&&(i.length=l):i=Array.prototype.slice.call(i,0,l),s&&i.push(s)),c=i}else c=e}return c}function Pr(e){return e?/^\d+$/.test(e)?(Tt(e),new Fr(h,g)):null:Ir||=new Fr(0,0)}C.prototype.Y=Ke,C.prototype.toString=function(){try{return jr=!0,Nr(this).toString()}finally{jr=!1}};var Fr=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}},Ir;function Lr(e){return e?/^-?\d+$/.test(e)?(Tt(e),new Rr(h,g)):null:zr||=new Rr(0,0)}var Rr=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}},zr;function Br(e,t,n){for(;n>0||t>127;)e.g.push(127&t|128),t=(t>>>7|n<<25)>>>0,n>>>=7;e.g.push(t)}function Vr(e,t){for(;t>127;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function Hr(e,t){if(t>=0)Vr(e,t);else{for(let n=0;n<9;n++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function Ur(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 Wr(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function Gr(e,t,n){Vr(e.g,8*t+n)}function Kr(e,t){return Gr(e,t,2),t=e.g.end(),Wr(e,t),t.push(e.h),t}function qr(e,t){var n=t.pop();for(n=e.h+e.g.length()-n;n>127;)t.push(127&n|128),n>>>=7,e.h++;t.push(n),e.h++}function Jr(e,t,n){Gr(e,t,2),Vr(e.g,n.length),Wr(e,e.g.end()),Wr(e,n)}function Yr(e,t,n,r){n!=null&&(t=Kr(e,t),r(n,e),qr(e,t))}var Xr=class{constructor(e,t,n){this.g=e,this.h=t,this.qa=n}};function Zr(e){return Array.isArray(e)?e[0]instanceof Xr?e:[Li,e]:[e,void 0]}function Qr(e,t){if(Array.isArray(t)){var n=f(t);if(4&n)return t;for(var r=0,i=0;r<t.length;r++){let n=e(t[r]);n!=null&&(t[i++]=n)}return i<r&&(t.length=i),m(t,-12289&(5|n)),2&n&&Object.freeze(t),t}}var $r=Symbol();function ei(e){let t=e[$r];if(!t){let n=pi(e),r=n.h;t=r?(e,t)=>r(e,t,n):(e,t)=>{for(;wr(t)&&t.h!=4;){var r=t.m;let o=n[r],s=!o,c=!1;if(!o){var i=n.X;if(i){var a=i[r];a&&(c=i.P?.[r],(!te||c)&&(i=ti(a))&&(o=n[r]=i))}}o&&o(t,e,r)||(r=(i=t).l,Tr(i),i.ja?i=void 0:(a=i.g.g-r,i.g.g=r,i=Sr(i.g,a)),r=e,i&&(tt||=Symbol(),(a=r[tt])?a.push(i):r[tt]=[i])),s&&o&&!c&&yi++<5&&ke()}},e[$r]=t}return t}function ti(e){let t=(e=Zr(e))[0].g;if(e=e[1]){let n=ei(e),r=pi(e).g;return(e,i,a)=>t(e,i,a,r,n)}return t}function ni(e,t,n){e[t]=n}function ri(e,t,n,r){var i=ni;t.g=function(e){switch(typeof e){case`boolean`:return Zt||=[0,void 0,!0];case`number`:return e>0?void 0:e===0?Qt||=[0,void 0]:[-e,void 0];case`string`:return[0,e];case`object`:return e}}(e[0]);let a=0;var o=e[++a];o&&o.constructor===Object&&(t.X=o,typeof(o=e[++a])==`function`&&(t.h=o,t.l=e[++a],o=e[++a]));let s={};for(;Array.isArray(o)&&typeof o[0]==`number`&&o[0]>0;){for(var c=0;c<o.length;c++)s[o[c]]=o;o=e[++a]}for(c=1;o!==void 0;){let d;typeof o==`number`&&(c+=o,o=e[++a]);var l=void 0;if(o instanceof Xr?d=o:(d=Ri,a--),d.qa){o=e[++a],l=e;var u=a;typeof o==`function`&&(o=o(),l[u]=o),l=o}for(u=c+1,typeof(o=e[++a])==`number`&&o<0&&(u-=o,o=e[++a]);c<u;c++){let e=s[c];i(t,c,l?r(d,l,e):n(d,e))}}return t}var ii=Symbol();function ai(e){let t=e[ii];if(!t){let n=li(e);t=(e,t)=>hi(e,t,n),e[ii]=t}return t}var oi=Symbol();function si(e){return e.h}function ci(e,t){let n,r,i=e.h;return(e,a,o)=>i(e,a,o,r||=li(t).g,n||=ai(t))}function li(e){let t=e[oi];return t||=ri(e,e[oi]={},si,ci)}var ui=Symbol();function di(e,t){let n=e.g;return t?(e,r,i)=>n(e,r,i,t):n}function fi(e,t,n){let r=e.g,i,a;return(e,o,s)=>r(e,o,s,a||=pi(t).g,i||=ei(t),n)}function pi(e){let t=e[ui];return t||=ri(e,e[ui]={},di,fi)}function mi(e,t){var n=e[t];if(n)return n;if(n=e.X){var r=n[t];if(r){var i=(r=Zr(r))[0].h;if(r=r[1],n=n.P?.[t],!te||n){if(r){let t=ai(r),a=li(r).g;n=(n=e.l)?n(a,t):(e,n,r)=>i(e,n,r,a,t)}else n=i;return e[t]=n}}}}function hi(e,t,n){for(var r=p(e),i=!!(512&r)-1,a=e.length,o=512&r?1:0,s=a+(256&r?-1:0);o<s;o++){let r=e[o];if(r==null)continue;let a=o-i,s=mi(n,a);if(!s)continue;let c=n.X;c?.[a]&&!c?.P?.[a]&&yi++<5&&ke(),s(t,r,a)}if(256&r){r=e[a-1];for(let e in r)i=+e,!Number.isNaN(i)&&(a=r[e])!=null&&(s=mi(n,i))&&((o=n.X)?.[i]&&!o?.P?.[i]&&yi++<5&&ke(),s(t,a,i))}if(e=tt?e[tt]:void 0)for(Wr(t,t.g.end()),n=0;n<e.length;n++)Wr(t,Te(e[n])||new Uint8Array)}function w(e,t){return new Xr(e,t,!1)}function gi(e,t){return new Xr(e,t,!1)}function _i(e,t){return new Xr(e,t,!0)}function T(e,t,n){v(e,p(e),t,n)}var vi=_i((function(e,t,n,r,i){return e.h===2&&(e=Er(e,sn([void 0,void 0],r),i),$e(r=p(t)),(i=Mn(t,r,n))instanceof hn?2&i.M?((i=i.Z()).push(e),v(t,r,n,i)):i.Qa(e):Array.isArray(i)?(2&f(i)&&v(t,r,n,i=Vn(i)),i.push(e)):v(t,r,n,[e]),!0)}),(function(e,t,n,r,i){if(t instanceof hn)t.forEach(((t,a)=>{Yr(e,n,sn([a,t],r),i)}));else if(Array.isArray(t))for(let a=0;a<t.length;a++){let o=t[a];Array.isArray(o)&&Yr(e,n,sn(o,r),i)}})),yi=0;function bi(e,t,n){if(t=function(e){if(e==null)return e;let t=typeof e;if(t===`bigint`)return String(BigInt.asIntN(64,e));if(At(e)){if(t===`string`)return Ft(e);if(t===`number`)return Pt(e)}}(t),t!=null&&(typeof t==`string`&&Lr(t),t!=null))switch(Gr(e,n,0),typeof t){case`number`:e=e.g,yt(t),Br(e,h,g);break;case`bigint`:n=BigInt.asUintN(64,t),n=new Rr(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Br(e.g,n.h,n.g);break;default:n=Lr(t),Br(e.g,n.h,n.g)}}function xi(e,t,n){(t=jt(t))!=null&&t!=null&&(Gr(e,n,0),Hr(e.g,t))}function Si(e,t,n){(t=Ot(t))!=null&&(Gr(e,n,0),e.g.g.push(+!!t))}function Ci(e,t,n){(t=Bt(t))!=null&&Jr(e,n,l(t))}function wi(e,t,n,r,i){t instanceof C?(an(t),t=t.u):t=Array.isArray(t)?sn(t,r):void 0,Yr(e,n,t,i)}function Ti(e,t,n){(t=t==null||typeof t==`string`||be(t)||t instanceof Ee?t:void 0)!=null&&Jr(e,n,dr(t).buffer)}function Ei(e,t,n){return(e.h===5||e.h===2)&&(t=Nn(t,p(t),n,2,!1),e.h==2?kr(e,_r,t):t.push(_r(e.g)),!0)}var E,Di=w((function(e,t,n){if(e.h!==1)return!1;var r=e.g;e=gr(r);let i=gr(r);r=2*(i>>31)+1;let a=i>>>20&2047;return e=4294967296*(1048575&i)+e,T(t,n,a==2047?e?NaN:r*(1/0):a==0?5e-324*r*e:r*2**(a-1075)*(e+4503599627370496)),!0}),(function(e,t,n){(t=Dt(t))!=null&&(Gr(e,n,1),e=e.g,(n=_t||=new DataView(new ArrayBuffer(8))).setFloat64(0,+t,!0),h=n.getUint32(0,!0),g=n.getUint32(4,!0),Ur(e,h),Ur(e,g))})),D=w((function(e,t,n){return e.h===5&&(T(t,n,_r(e.g)),!0)}),(function(e,t,n){(t=Dt(t))!=null&&(Gr(e,n,5),e=e.g,bt(t),Ur(e,h))})),Oi=gi(Ei,(function(e,t,n){if((t=Qr(Dt,t))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&(Gr(r,i,5),r=r.g,bt(a),Ur(r,h))}})),ki=gi(Ei,(function(e,t,n){if((t=Qr(Dt,t))!=null&&t.length){Gr(e,n,2),Vr(e.g,4*t.length);for(let r=0;r<t.length;r++)n=e.g,bt(t[r]),Ur(n,h)}})),Ai=w((function(e,t,n){return e.h===0&&(T(t,n,fr(e.g,St)),!0)}),bi),ji=w((function(e,t,n){return e.h===0&&(T(t,n,(e=fr(e.g,St))===0?void 0:e),!0)}),bi),Mi=w((function(e,t,n){return e.h===0&&(T(t,n,fr(e.g,xt)),!0)}),(function(e,t,n){if((t=Lt(t))!=null&&(typeof t==`string`&&Pr(t),t!=null))switch(Gr(e,n,0),typeof t){case`number`:e=e.g,yt(t),Br(e,h,g);break;case`bigint`:n=BigInt.asUintN(64,t),n=new Fr(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Br(e.g,n.h,n.g);break;default:n=Pr(t),Br(e.g,n.h,n.g)}})),O=w((function(e,t,n){return e.h===0&&(T(t,n,mr(e.g)),!0)}),xi),Ni=gi((function(e,t,n){return(e.h===0||e.h===2)&&(t=Nn(t,p(t),n,2,!1),e.h==2?kr(e,mr,t):t.push(mr(e.g)),!0)}),(function(e,t,n){if((t=Qr(jt,t))!=null&&t.length){n=Kr(e,n);for(let n=0;n<t.length;n++)Hr(e.g,t[n]);qr(e,n)}})),Pi=w((function(e,t,n){return e.h===0&&(T(t,n,(e=mr(e.g))===0?void 0:e),!0)}),xi),k=w((function(e,t,n){return e.h===0&&(T(t,n,pr(e.g)),!0)}),Si),Fi=w((function(e,t,n){return e.h===0&&(T(t,n,!1===(e=pr(e.g))?void 0:e),!0)}),Si),A=gi((function(e,t,n){if(e.h!==2)return!1;e=Dr(e);let r=p(t);return $e(r),Nn(t,r,n,2).push(e),!0}),(function(e,t,n){if((t=Qr(Bt,t))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&Jr(r,i,l(a))}})),Ii=w((function(e,t,n){return e.h===2&&(T(t,n,(e=Dr(e))===``?void 0:e),!0)}),Ci),j=w((function(e,t,n){return e.h===2&&(T(t,n,Dr(e)),!0)}),Ci),Li=_i((function(e,t,n,r,i){return e.h===2&&(Er(e,qn(t,r,n,!0),i),!0)}),wi),Ri=_i((function(e,t,n,r,i){return e.h===2&&(Er(e,qn(t,r,n),i),!0)}),wi);E=new Xr((function(e,t,n,r,i){if(e.h!==2)return!1;r=sn(void 0,r);let a=p(t);$e(a);let o=Nn(t,a,n,3);return a=p(t),4&f(o)&&(o=Me(o),m(o,-2079&(1|f(o))),v(t,a,n,o)),o.push(r),Er(e,r,i),!0}),(function(e,t,n,r,i){if(Array.isArray(t))for(let a=0;a<t.length;a++)wi(e,t[a],n,r,i)}),!0);var M=_i((function(e,t,n,r,i,a){return e.h===2&&(Gn(t,p(t),a,n),Er(e,t=qn(t,r,n),i),!0)}),wi),zi=w((function(e,t,n){return e.h===2&&(T(t,n,Or(e)),!0)}),Ti),Bi=gi((function(e,t,n){return(e.h===0||e.h===2)&&(t=Nn(t,p(t),n,2,!1),e.h==2?kr(e,hr,t):t.push(hr(e.g)),!0)}),(function(e,t,n){if((t=Qr(Mt,t))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&(Gr(r,i,0),Vr(r.g,a))}})),Vi=w((function(e,t,n){return e.h===0&&(T(t,n,mr(e.g)),!0)}),(function(e,t,n){(t=jt(t))!=null&&(t=parseInt(t,10),Gr(e,n,0),Hr(e.g,t))})),Hi=class{constructor(e,t){this.h=e,this.g=t,this.l=y,this.m=b,this.defaultValue=void 0}};function Ui(e,t){return new Hi(e,t)}function Wi(e,t){return(n,r)=>{if(Ar.length){let e=Ar.pop();e.o(r),yr(e.g,n,r),n=e}else n=new class{constructor(e,t){if(Cr.length){let n=Cr.pop();yr(n,e,t),e=n}else e=new class{constructor(e,t){this.h=null,this.m=!1,this.g=this.l=this.j=0,yr(this,e,t)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.ea=!1}}(e,t);this.g=e,this.l=this.g.g,this.h=this.m=-1,this.o(t)}o({ja:e=!1}={}){this.ja=e}}(n,r);try{let r=new e,a=r.u;ei(t)(a,n);var i=r}finally{n.g.clear(),n.m=-1,n.h=-1,Ar.length<100&&Ar.push(n)}return i}}function Gi(e){return function(){an(this);let t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){let e=this.g;return this.g=[],e}}}};hi(this.u,t,li(e)),Wr(t,t.g.end());let n=new Uint8Array(t.h),r=t.l,i=r.length,a=0;for(let e=0;e<i;e++){let t=r[e];n.set(t,a),a+=t.length}return t.l=[n],n}}var Ki=class extends C{constructor(e){super(e)}},qi=[0,Ii,w((function(e,t,n){return e.h===2&&(T(t,n,(e=Or(e))===we()?void 0:e),!0)}),(function(e,t,n){if(t!=null){if(t instanceof C){let r=t.Ta;r&&(t=r(t),t!=null&&Jr(e,n,dr(t).buffer));return}if(Array.isArray(t))return}Ti(e,t,n)}))],Ji=[0,O,Vi,k,-1,Ni,Vi,-1],Yi=class extends C{constructor(){super()}},Xi=[0,k,j,k,Vi,-1,gi((function(e,t,n){return(e.h===0||e.h===2)&&(t=Nn(t,p(t),n,2,!1),e.h==2?kr(e,vr,t):t.push(mr(e.g)),!0)}),(function(e,t,n){if((t=Qr(jt,t))!=null&&t.length){n=Kr(e,n);for(let n=0;n<t.length;n++)Hr(e.g,t[n]);qr(e,n)}})),j,-1,[0,k,-1],Vi,k,-1],Zi=[0,j,-2],Qi=class extends C{constructor(){super()}},$i=[0],ea=[0,O,k,1,k,-3],ta=[0,j,k,-1,O,[0,[1,2,3,4,5,6,7],M,$i,M,Xi,M,Zi,M,ea,M,Ji,M,[0,j,-2],M,[0,j,Vi]],[0,j],k,[0,[1,3],[2,4],M,[0,Ni],-1,M,[0,A],-1,E,[0,j,-1]],j],na=class extends C{constructor(e){super(e,2)}},N={},P=N.P={};N[336783863]=ta,P[336783863]=1;var ra=[0,ji,-1,Fi,-3,ji,Ni,Ii,Pi,ji,-1,Fi,Pi,Fi,-2,Ii];function ia(e,t){Hn(e,2,zt(t),``)}function F(e,t){sr(e,3,t)}function I(e,t){sr(e,4,t)}var L=class extends C{constructor(e){super(e,500)}o(e){return b(this,0,7,e)}},aa=[-1,{P:{}}],oa=[0,j,1,aa],sa=[0,j,A,aa];function ca(e,t){er(e,1,L,t)}function R(e,t){sr(e,10,t)}function z(e,t){sr(e,15,t)}var B=class extends C{constructor(e){super(e,500)}o(e){return b(this,0,1001,e)}},la=[-500,E,[-500,Ii,-1,A,-3,[-2,N,k],E,qi,Pi,-1,oa,sa,E,[0,Ii,Fi],Ii,ra,Pi,A,987,A],4,E,[-500,j,-1,[-1,{P:{}}],998,j],E,[-500,j,A,-1,[-2,{P:{}},k],997,A,-1],Pi,E,[-500,j,A,aa,998,A],A,Pi,oa,sa,E,[0,Ii,-1,aa],A,-2,ra,Ii,-1,Fi,979,aa,E,qi];B.prototype.g=Gi(la);var ua=Wi(B,la),da=class extends C{constructor(e){super(e)}},fa=class extends C{constructor(e){super(e)}g(){return Xn(this,da,1)}},pa=[0,E,[0,O,D,j,-1]],ma=Wi(fa,pa),ha=class extends C{constructor(e){super(e)}},ga=class extends C{constructor(e){super(e)}},_a=class extends C{constructor(e){super(e)}h(){return y(this,ha,2)}g(){return Xn(this,ga,5)}},va=Wi(class extends C{constructor(e){super(e)}},[0,A,Ni,ki,[0,Vi,[0,O,-3],[0,D,-3],[0,O,-1,[0,E,[0,O,-2]]],E,[0,D,-1,j,D]],j,-1,Ai,E,[0,O,D],A,Ai]),ya=class extends C{constructor(e){super(e)}},ba=Wi(class extends C{constructor(e){super(e)}},[0,E,[0,D,-4]]),xa=class extends C{constructor(e){super(e)}},Sa=Wi(class extends C{constructor(e){super(e)}},[0,E,[0,D,-4]]),Ca=class extends C{constructor(e){super(e)}},wa=[0,O,-1,ki,Vi],Ta=class extends C{constructor(){super()}};Ta.prototype.g=Gi([0,D,-4,Ai]);var Ea=class extends C{constructor(e){super(e)}},Da=Wi(class extends C{constructor(e){super(e)}},[0,E,[0,1,O,j,pa],Ai]),Oa=class extends C{constructor(e){super(e)}},ka=class extends C{constructor(e){super(e)}ra(){return Fn(this)??we()}},Aa=class extends C{constructor(e){super(e)}},ja=[1,2],Ma=Wi(class extends C{constructor(e){super(e)}},[0,E,[0,ja,M,[0,ki],M,[0,zi],O,j],Ai]),Na=class extends C{constructor(e){super(e)}},Pa=[0,j,O,D,A,-1],Fa=class extends C{constructor(e){super(e)}},Ia=[0,k,-1],La=class extends C{constructor(e){super(e)}},Ra=[1,2,3,4,5],za=class extends C{constructor(e){super(e)}g(){return Fn(this)!=null}h(){return Bt(An(this,2))!=null}},V=class extends C{constructor(e){super(e)}g(){return Ot(An(this,2))??!1}},Ba=[0,zi,j,[0,O,Ai,-1],[0,Mi,Ai]],H=[0,Ba,k,[0,Ra,M,ea,M,Xi,M,Ji,M,$i,M,Zi],Vi],Va=class extends C{constructor(e){super(e)}},Ha=[0,H,D,-1,O],Ua=Ui(502141897,Va);N[502141897]=Ha,P[502141897]=1;var Wa=[0,Ba];N[512499200]=Wa;var Ga=[0,Wa];N[515723506]=Ga;var Ka=Wi(class extends C{constructor(e){super(e)}},[0,[0,Vi,-1,Oi,Bi],wa]),qa=[0,H];N[508981768]=qa;var Ja=class extends C{constructor(e){super(e)}},Ya=class extends C{constructor(e){super(e)}},Xa=[0,H,D,qa,k],Za=[0,H,Ha,Xa,D,Ga];N[508968149]=Xa;var Qa=Ui(508968150,Ya);N[508968150]=Za,P[508968150]=1,P[508968149]=1;var $a=class extends C{constructor(e){super(e)}},eo=Ui(513916220,$a);N[513916220]=[0,H,Za,O],P[513916220]=1;var to=class extends C{constructor(e){super(e)}h(){return y(this,Na,2)}g(){_(this,2)}},no=[0,H,Pa];N[478825465]=no,P[478825465]=1;var ro=[0,H];N[478825422]=ro;var io=class extends C{constructor(e){super(e)}},ao=class extends C{constructor(e){super(e)}},oo=class extends C{constructor(e){super(e)}},so=class extends C{constructor(e){super(e)}},co=class extends C{constructor(e){super(e)}},lo=[0,H,ro,no,-1],uo=[0,H,D,O],fo=[0,H,D],po=[0,H,uo,fo,D],mo=[0,H,po,lo];N[463370452]=lo,N[464864288]=uo,N[474472470]=fo;var ho=Ui(462713202,so);N[462713202]=po;var go=Ui(479097054,co);N[479097054]=mo,P[479097054]=1,P[463370452]=1,P[464864288]=1,P[462713202]=1,P[474472470]=1;var _o=class extends C{constructor(e){super(e)}},vo=class extends C{constructor(e){super(e)}},yo=class extends C{constructor(e){super(e)}},bo=class extends C{constructor(){super()}},xo=[0,H,D,-1,O],So=[0,H,D,k];bo.prototype.g=Gi([0,H,fo,[0,H],Ha,Xa,xo,So]),N[514774813]=xo,N[518928384]=So;var Co=class extends C{constructor(e){super(e)}},wo=Ui(456383383,Co);N[456383383]=[0,H,Pa],P[456383383]=1;var To=class extends C{constructor(e){super(e)}},Eo=Ui(476348187,To);N[476348187]=[0,H,Ia],P[476348187]=1;var Do=class extends C{constructor(e){super(e)}},Oo=class extends C{constructor(e){super(e)}},ko=[0,Vi,-1],Ao=Ui(458105876,class extends C{constructor(e){super(e)}g(){var e=this.u;let t=p(e),n=2&t;return e=function(e,t,n){var r=Oo;let i=2&t,a=!1;if(n==null){if(i)return bn();n=[]}else if(n.constructor===hn){if(!(2&n.M)||i)return n;n=n.Z()}else Array.isArray(n)?a=!!(2&f(n)):n=[];if(i){if(!n.length)return bn();a||(a=!0,He(n))}else a&&(a=!1,n=Vn(n));return a||(64&f(n)?Ve(n,32):32&t&&Be(n,32)),v(e,t,2,r=new hn(n,r,Ht,void 0)),r}(e,t,Mn(e,t,2)),!n&&Oo&&(e.va=!0),e}});N[458105876]=[0,ko,vi,[!0,Ai,[0,j,-1,A]]],P[458105876]=1;var jo=class extends C{constructor(e){super(e)}},Mo=Ui(458105758,jo);N[458105758]=[0,H,j,ko],P[458105758]=1;var No=class extends C{constructor(e){super(e)}},Po=Ui(443442058,No);N[443442058]=[0,H,j,O,D,A,-1],P[443442058]=1,P[514774813]=1;var Fo=class extends C{constructor(e){super(e)}},Io=Ui(516587230,Fo);function Lo(e,t){return t=t?t.clone():new Na,e.displayNamesLocale===void 0?e.displayNamesLocale===void 0&&_(t,1):_(t,1,zt(e.displayNamesLocale)),e.maxResults===void 0?`maxResults`in e&&_(t,2):ar(t,2,e.maxResults),e.scoreThreshold===void 0?`scoreThreshold`in e&&_(t,3):S(t,3,e.scoreThreshold),e.categoryAllowlist===void 0?`categoryAllowlist`in e&&_(t,4):or(t,4,e.categoryAllowlist),e.categoryDenylist===void 0?`categoryDenylist`in e&&_(t,5):or(t,5,e.categoryDenylist),t}function Ro(e,t=-1,n=``){return{categories:e.map((e=>({index:tr(nr(e,1),0)??-1,score:x(e,2)??0,categoryName:rr(e,3)??``,displayName:rr(e,4)??``}))),headIndex:t,headName:n}}function zo(e){var t=Ln(e,3,Dt,In()),n=Ln(e,2,jt,In()),r=Ln(e,1,Bt,In()),i=Ln(e,9,Bt,In());let a={categories:[],keypoints:[]};for(let e=0;e<t.length;e++)a.categories.push({score:t[e],index:n[e]??-1,categoryName:r[e]??``,displayName:i[e]??``});if((t=y(e,_a,4)?.h())&&(a.boundingBox={originX:nr(t,1)??0,originY:nr(t,2)??0,width:nr(t,3)??0,height:nr(t,4)??0,angle:0}),y(e,_a,4)?.g().length)for(let t of y(e,_a,4).g())a.keypoints.push({x:Pn(t,1)??0,y:Pn(t,2)??0,score:Pn(t,4)??0,label:Bt(An(t,3))??``});return a}function Bo(e){let t=[];for(let n of Xn(e,xa,1))t.push({x:x(n,1)??0,y:x(n,2)??0,z:x(n,3)??0,visibility:x(n,4)??0});return t}function Vo(e){let t=[];for(let n of Xn(e,ya,1))t.push({x:x(n,1)??0,y:x(n,2)??0,z:x(n,3)??0,visibility:x(n,4)??0});return t}function Ho(e){return Array.from(e,(e=>e>127?e-256:e))}function Uo(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let n=0,r=0,i=0;for(let a=0;a<e.length;a++)n+=e[a]*t[a],r+=e[a]*e[a],i+=t[a]*t[a];if(r<=0||i<=0)throw Error(`Cannot compute cosine similarity on embedding with 0 norm.`);return n/Math.sqrt(r*i)}var Wo;N[516587230]=[0,H,xo,So,D],P[516587230]=1,P[518928384]=1;var Go=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 Ko(){if(Wo===void 0)try{await WebAssembly.instantiate(Go),Wo=!0}catch{Wo=!1}return Wo}async function qo(e,t=``){let n=await Ko()?`wasm_internal`:`wasm_nosimd_internal`;return{wasmLoaderPath:`${t}/${e}_${n}.js`,wasmBinaryPath:`${t}/${e}_${n}.wasm`}}var Jo=class{};function Yo(){var e=navigator;return typeof OffscreenCanvas<`u`&&(!function(e=navigator){return(e=e.userAgent).includes(`Safari`)&&!e.includes(`Chrome`)}(e)||!!((e=e.userAgent.match(/Version\/([\d]+).*Safari/))&&e.length>=1&&Number(e[1])>=17))}async function Xo(e){if(typeof importScripts!=`function`){let t=document.createElement(`script`);return t.src=e.toString(),t.crossOrigin=`anonymous`,new Promise(((e,n)=>{t.addEventListener(`load`,(()=>{e()}),!1),t.addEventListener(`error`,(e=>{n(e)}),!1),document.body.appendChild(t)}))}importScripts(e.toString())}function Zo(e){return e.videoWidth===void 0?e.naturalWidth===void 0?e.displayWidth===void 0?[e.width,e.height]:[e.displayWidth,e.displayHeight]:[e.naturalWidth,e.naturalHeight]:[e.videoWidth,e.videoHeight]}function U(e,t,n){e.m||console.error(`No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target`),n(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function Qo(e,t,n){if(!e.i.canvas)throw Error(`No OpenGL canvas configured.`);if(n?e.i._bindTextureToStream(n):e.i._bindTextureToCanvas(),!(n=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`.");e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);let[r,i]=Zo(t);return!e.l||r===e.i.canvas.width&&i===e.i.canvas.height||(e.i.canvas.width=r,e.i.canvas.height=i),[r,i]}function $o(e,t,n){e.m||console.error(`No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target`);let r=new Uint32Array(t.length);for(let n=0;n<t.length;n++)r[n]=e.i.stringToNewUTF8(t[n]);t=e.i._malloc(4*r.length),e.i.HEAPU32.set(r,t>>2),n(t);for(let t of r)e.i._free(t);e.i._free(t)}function es(e,t,n){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=n}function ts(e,t,n){let r=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(e,t,i)=>{t?(n(r,i),r=[]):r.push(e)}}Jo.forVisionTasks=function(e){return qo(`vision`,e)},Jo.forTextTasks=function(e){return qo(`text`,e)},Jo.forGenAiExperimentalTasks=function(e){return qo(`genai_experimental`,e)},Jo.forGenAiTasks=function(e){return qo(`genai`,e)},Jo.forAudioTasks=function(e){return qo(`audio`,e)},Jo.isSimdSupported=function(){return Ko()};async function ns(e,t,n,r){return e=await(async(e,t,n,r,i)=>{if(t&&await Xo(t),!self.ModuleFactory||n&&(await Xo(n),!self.ModuleFactory))throw Error(`ModuleFactory not set.`);return self.Module&&i&&((t=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(t.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new e(i,r)})(e,n.wasmLoaderPath,n.assetLoaderPath,t,{locateFile:e=>e.endsWith(`.wasm`)?n.wasmBinaryPath.toString():n.assetBinaryPath&&e.endsWith(`.data`)?n.assetBinaryPath.toString():e}),await e.o(r),e}function rs(e,t){let n=y(e.baseOptions,za,1)||new za;typeof t==`string`?(_(n,2,zt(t)),_(n,1)):t instanceof Uint8Array&&(_(n,1,Xe(t,!1,!1)),_(n,2)),b(e.baseOptions,0,1,n)}function is(e){try{let t=e.H.length;if(t===1)throw Error(e.H[0].message);if(t>1)throw Error(`Encountered multiple errors: `+e.H.map((e=>e.message)).join(`, `))}finally{e.H=[]}}function W(e,t){e.B=Math.max(e.B,t)}function as(e,t){e.A=new L,ia(e.A,`PassThroughCalculator`),F(e.A,`free_memory`),I(e.A,`free_memory_unused_out`),R(t,`free_memory`),ca(t,e.A)}function os(e,t){F(e.A,t),I(e.A,t+`_unused_out`)}function ss(e){e.g.addBoolToStream(!0,`free_memory`,e.B)}var cs=class{constructor(e){this.g=e,this.H=[],this.B=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){if(t){let t=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error(`Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer`);if(!(y(this.baseOptions,za,1)?.g()||y(this.baseOptions,za,1)?.h()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error(`Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set`);if(function(e,t){let n=y(e.baseOptions,La,3);if(!n){var r=n=new La,i=new Qi;Zn(r,4,Ra,i)}`delegate`in t&&(t.delegate===`GPU`?(t=n,r=new Yi,Zn(t,2,Ra,r)):(t=n,r=new Qi,Zn(t,4,Ra,r))),b(e.baseOptions,0,3,n)}(this,t),t.modelAssetPath)return fetch(t.modelAssetPath.toString()).then((e=>{if(e.ok)return e.arrayBuffer();throw Error(`Failed to fetch model: ${t.modelAssetPath} (${e.status})`)})).then((e=>{try{this.g.i.FS_unlink(`/model.dat`)}catch{}this.g.i.FS_createDataFile(`/`,`model.dat`,new Uint8Array(e),!0,!1,!1),rs(this,`/model.dat`),this.m(),this.J()}));if(t.modelAssetBuffer instanceof Uint8Array)rs(this,t.modelAssetBuffer);else if(t.modelAssetBuffer)return async function(e){let t=[];for(var n=0;;){let{done:r,value:i}=await e.read();if(r)break;t.push(i),n+=i.length}if(t.length===0)return new Uint8Array;if(t.length===1)return t[0];e=new Uint8Array(n),n=0;for(let r of t)e.set(r,n),n+=r.length;return e}(t.modelAssetBuffer).then((e=>{rs(this,e),this.m(),this.J()}))}return this.m(),this.J(),Promise.resolve()}J(){}ga(){let e;if(this.g.ga((t=>{e=ua(t)})),!e)throw Error(`Failed to retrieve CalculatorGraphConfig`);return e}setGraph(e,t){this.g.attachErrorListener(((e,t)=>{this.H.push(Error(t))})),this.g.Oa(),this.g.setGraph(e,t),this.A=void 0,is(this)}finishProcessing(){this.g.finishProcessing(),is(this)}close(){this.A=void 0,this.g.closeGraph()}};function G(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}cs.prototype.close=cs.prototype.close,function(t,n){t=t.split(`.`);var r,i=e;for((t[0]in i)||i.execScript===void 0||i.execScript(`var `+t[0]);t.length&&(r=t.shift());)t.length||n===void 0?i=i[r]&&i[r]!==Object.prototype[r]?i[r]:i[r]={}:i[r]=n}(`TaskRunner`,cs);var ls=class{constructor(e,t,n,r){this.g=e,this.h=t,this.m=n,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}};function us(e,t,n){let r=e.g;if(n=G(r.createShader(n),`Failed to create WebGL shader`),r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(e.h,n),n}function ds(e,t){let n=e.g,r=G(n.createVertexArray(),`Failed to create vertex array`);n.bindVertexArray(r);let i=G(n.createBuffer(),`Failed to create buffer`);n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(e.R),n.vertexAttribPointer(e.R,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);let a=G(n.createBuffer(),`Failed to create buffer`);return n.bindBuffer(n.ARRAY_BUFFER,a),n.enableVertexAttribArray(e.J),n.vertexAttribPointer(e.J,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(t?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new ls(n,r,i,a)}function fs(e,t){if(e.g){if(t!==e.g)throw Error(`Cannot change GL context once initialized`)}else e.g=t}function ps(e,t,n,r){return fs(e,t),e.h||(e.m(),e.C()),n?(e.s||(e.s=ds(e,!0)),n=e.s):(e.v||(e.v=ds(e,!1)),n=e.v),t.useProgram(e.h),n.bind(),e.l(),e=r(),n.g.bindVertexArray(null),e}function ms(e,t,n){return fs(e,t),e=G(t.createTexture(),`Failed to create texture`),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function hs(e,t,n){fs(e,t),e.A||=G(t.createFramebuffer(),`Failed to create framebuffe.`),t.bindFramebuffer(t.FRAMEBUFFER,e.A),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)}function gs(e){e.g?.bindFramebuffer(e.g.FRAMEBUFFER,null)}var _s=class{H(){return`
|
|
2
|
+
precision mediump float;
|
|
3
|
+
varying vec2 vTex;
|
|
4
|
+
uniform sampler2D inputTexture;
|
|
5
|
+
void main() {
|
|
6
|
+
gl_FragColor = texture2D(inputTexture, vTex);
|
|
7
|
+
}
|
|
8
|
+
`}m(){let e=this.g;if(this.h=G(e.createProgram(),`Failed to create WebGL program`),this.da=us(this,`
|
|
9
|
+
attribute vec2 aVertex;
|
|
10
|
+
attribute vec2 aTex;
|
|
11
|
+
varying vec2 vTex;
|
|
12
|
+
void main(void) {
|
|
13
|
+
gl_Position = vec4(aVertex, 0.0, 1.0);
|
|
14
|
+
vTex = aTex;
|
|
15
|
+
}`,e.VERTEX_SHADER),this.ca=us(this,this.H(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.R=e.getAttribLocation(this.h,`aVertex`),this.J=e.getAttribLocation(this.h,`aTex`)}C(){}l(){}close(){if(this.h){let e=this.g;e.deleteProgram(this.h),e.deleteShader(this.da),e.deleteShader(this.ca)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}},vs=class extends _s{H(){return`
|
|
16
|
+
precision mediump float;
|
|
17
|
+
uniform sampler2D backgroundTexture;
|
|
18
|
+
uniform sampler2D maskTexture;
|
|
19
|
+
uniform sampler2D colorMappingTexture;
|
|
20
|
+
varying vec2 vTex;
|
|
21
|
+
void main() {
|
|
22
|
+
vec4 backgroundColor = texture2D(backgroundTexture, vTex);
|
|
23
|
+
float category = texture2D(maskTexture, vTex).r;
|
|
24
|
+
vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));
|
|
25
|
+
gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);
|
|
26
|
+
}
|
|
27
|
+
`}C(){let e=this.g;e.activeTexture(e.TEXTURE1),this.B=ms(this,e,e.LINEAR),e.activeTexture(e.TEXTURE2),this.j=ms(this,e,e.NEAREST)}m(){super.m();let e=this.g;this.L=G(e.getUniformLocation(this.h,`backgroundTexture`),`Uniform location`),this.V=G(e.getUniformLocation(this.h,`colorMappingTexture`),`Uniform location`),this.K=G(e.getUniformLocation(this.h,`maskTexture`),`Uniform location`)}l(){super.l();let e=this.g;e.uniform1i(this.K,0),e.uniform1i(this.L,1),e.uniform1i(this.V,2)}close(){this.B&&this.g.deleteTexture(this.B),this.j&&this.g.deleteTexture(this.j),super.close()}},ys=class extends _s{H(){return`
|
|
28
|
+
precision mediump float;
|
|
29
|
+
uniform sampler2D maskTexture;
|
|
30
|
+
uniform sampler2D defaultTexture;
|
|
31
|
+
uniform sampler2D overlayTexture;
|
|
32
|
+
varying vec2 vTex;
|
|
33
|
+
void main() {
|
|
34
|
+
float confidence = texture2D(maskTexture, vTex).r;
|
|
35
|
+
vec4 defaultColor = texture2D(defaultTexture, vTex);
|
|
36
|
+
vec4 overlayColor = texture2D(overlayTexture, vTex);
|
|
37
|
+
// Apply the alpha from the overlay and merge in the default color
|
|
38
|
+
overlayColor = mix(defaultColor, overlayColor, overlayColor.a);
|
|
39
|
+
gl_FragColor = mix(defaultColor, overlayColor, confidence);
|
|
40
|
+
}
|
|
41
|
+
`}C(){let e=this.g;e.activeTexture(e.TEXTURE1),this.j=ms(this,e),e.activeTexture(e.TEXTURE2),this.B=ms(this,e)}m(){super.m();let e=this.g;this.K=G(e.getUniformLocation(this.h,`defaultTexture`),`Uniform location`),this.L=G(e.getUniformLocation(this.h,`overlayTexture`),`Uniform location`),this.I=G(e.getUniformLocation(this.h,`maskTexture`),`Uniform location`)}l(){super.l();let e=this.g;e.uniform1i(this.I,0),e.uniform1i(this.K,1),e.uniform1i(this.L,2)}close(){this.j&&this.g.deleteTexture(this.j),this.B&&this.g.deleteTexture(this.B),super.close()}};function bs(e,t){switch(t){case 0:return e.g.find((e=>e instanceof Uint8Array));case 1:return e.g.find((e=>e instanceof Float32Array));case 2:return e.g.find((e=>typeof WebGLTexture<`u`&&e instanceof WebGLTexture));default:throw Error(`Type is not supported: ${t}`)}}function xs(e){var t=bs(e,1);if(!t){if(t=bs(e,0))t=new Float32Array(t).map((e=>e/255));else{t=new Float32Array(e.width*e.height);let r=Cs(e);var n=Ts(e);if(hs(n,r,Ss(e)),`iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod`.split(`;`).includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in self.document){n=new Float32Array(e.width*e.height*4),r.readPixels(0,0,e.width,e.height,r.RGBA,r.FLOAT,n);for(let e=0,r=0;e<t.length;++e,r+=4)t[e]=n[r]}else r.readPixels(0,0,e.width,e.height,r.RED,r.FLOAT,t)}e.g.push(t)}return t}function Ss(e){let t=bs(e,2);if(!t){let n=Cs(e);t=Es(e);let r=xs(e),i=ws(e);n.texImage2D(n.TEXTURE_2D,0,i,e.width,e.height,0,n.RED,n.FLOAT,r),Ds(e)}return t}function Cs(e){if(!e.canvas)throw Error(`Conversion to different image formats require that a canvas is passed when initializing the image.`);return e.h||=G(e.canvas.getContext(`webgl2`),`You cannot use a canvas that is already bound to a different type of rendering context.`),e.h}function ws(e){if(e=Cs(e),!Os)if(e.getExtension(`EXT_color_buffer_float`)&&e.getExtension(`OES_texture_float_linear`)&&e.getExtension(`EXT_float_blend`))Os=e.R32F;else{if(!e.getExtension(`EXT_color_buffer_half_float`))throw Error(`GPU does not fully support 4-channel float32 or float16 formats`);Os=e.R16F}return Os}function Ts(e){return e.l||=new _s,e.l}function Es(e){let t=Cs(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=bs(e,2);return n||(n=ms(Ts(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(n),e.j=!0),t.bindTexture(t.TEXTURE_2D,n),n}function Ds(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var Os,K=class{constructor(e,t,n,r,i,a,o){this.g=e,this.m=t,this.j=n,this.canvas=r,this.l=i,this.width=a,this.height=o,this.j&&--ks===0&&console.error(`You seem to be creating MPMask instances without invoking .close(). This leaks resources.`)}Ja(){return!!bs(this,0)}ma(){return!!bs(this,1)}S(){return!!bs(this,2)}la(){return(t=bs(e=this,0))||(t=xs(e),t=new Uint8Array(t.map((e=>255*e))),e.g.push(t)),t;var e,t}ka(){return xs(this)}N(){return Ss(this)}clone(){let e=[];for(let t of this.g){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{let e=Cs(this),t=Ts(this);e.activeTexture(e.TEXTURE1),n=ms(t,e,this.m?e.LINEAR:e.NEAREST),e.bindTexture(e.TEXTURE_2D,n);let r=ws(this);e.texImage2D(e.TEXTURE_2D,0,r,this.width,this.height,0,e.RED,e.FLOAT,null),e.bindTexture(e.TEXTURE_2D,null),hs(t,e,n),ps(t,e,!1,(()=>{Es(this),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),Ds(this)})),gs(t),Ds(this)}}e.push(n)}return new K(e,this.m,this.S(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Cs(this).deleteTexture(bs(this,2)),ks=-1}};K.prototype.close=K.prototype.close,K.prototype.clone=K.prototype.clone,K.prototype.getAsWebGLTexture=K.prototype.N,K.prototype.getAsFloat32Array=K.prototype.ka,K.prototype.getAsUint8Array=K.prototype.la,K.prototype.hasWebGLTexture=K.prototype.S,K.prototype.hasFloat32Array=K.prototype.ma,K.prototype.hasUint8Array=K.prototype.Ja;var ks=250,As={color:`white`,lineWidth:4,radius:6};function js(e){return{...As,fillColor:(e||={}).color,...e}}function Ms(e,t){return e instanceof Function?e(t):e}function Ns(e,t,n){return Math.max(Math.min(t,n),Math.min(Math.max(t,n),e))}function Ps(e){if(!e.l)throw Error(`CPU rendering requested but CanvasRenderingContext2D not provided.`);return e.l}function Fs(e){if(!e.j)throw Error(`GPU rendering requested but WebGL2RenderingContext not provided.`);return e.j}function Is(e,t,n){if(t.S())n(t.N());else{let r=t.ma()?t.ka():t.la();e.m=e.m??new _s;let i=Fs(e);n((e=new K([r],t.m,!1,i.canvas,e.m,t.width,t.height)).N()),e.close()}}function Ls(e,t,n,r){let i=function(e){return e.g||=new vs,e.g}(e),a=Fs(e),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;ps(i,a,!0,(()=>{(function(e,t,n,r){let i=e.g;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,e.B),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),e.I&&function(e,t){if(e!==t)return!1;e=e.entries(),t=t.entries();for(let[r,i]of e){e=r;let a=i;var n=t.next();if(n.done)return!1;let[o,s]=n.value;if(n=s,e!==o||a[0]!==n[0]||a[1]!==n[1]||a[2]!==n[2]||a[3]!==n[3])return!1}return!!t.next().done}(e.I,r))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,e.j);else{e.I=r;let t=Array(1024).fill(0);r.forEach(((e,n)=>{if(e.length!==4)throw Error(`Color at index ${n} is not a four-channel value.`);t[4*n]=e[0],t[4*n+1]=e[1],t[4*n+2]=e[2],t[4*n+3]=e[3]})),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,e.j),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(t))}})(i,t,o,r),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.drawArrays(a.TRIANGLE_FAN,0,4);let e=i.g;e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,null)}))}function Rs(e,t,n,r){let i=Fs(e),a=function(e){return e.h||=new ys,e.h}(e),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n,s=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;ps(a,i,!0,(()=>{var e=a.g;e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,a.j),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,a.B),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,s),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),i.bindTexture(i.TEXTURE_2D,null),(e=a.g).activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,null)}))}var q=class{constructor(e,t){e instanceof CanvasRenderingContext2D||e instanceof OffscreenCanvasRenderingContext2D?(this.l=e,this.j=t):this.j=e}Ca(e,t){if(e){var n=Ps(this);t=js(t),n.save();var r=n.canvas,i=0;for(let a of e)n.fillStyle=Ms(t.fillColor,{index:i,from:a}),n.strokeStyle=Ms(t.color,{index:i,from:a}),n.lineWidth=Ms(t.lineWidth,{index:i,from:a}),(e=new Path2D).arc(a.x*r.width,a.y*r.height,Ms(t.radius,{index:i,from:a}),0,2*Math.PI),n.fill(e),n.stroke(e),++i;n.restore()}}Ba(e,t,n){if(e&&t){var r=Ps(this);n=js(n),r.save();var i=r.canvas,a=0;for(let o of t){r.beginPath(),t=e[o.start];let s=e[o.end];t&&s&&(r.strokeStyle=Ms(n.color,{index:a,from:t,to:s}),r.lineWidth=Ms(n.lineWidth,{index:a,from:t,to:s}),r.moveTo(t.x*i.width,t.y*i.height),r.lineTo(s.x*i.width,s.y*i.height)),++a,r.stroke()}r.restore()}}ya(e,t){let n=Ps(this);t=js(t),n.save(),n.beginPath(),n.lineWidth=Ms(t.lineWidth,{}),n.strokeStyle=Ms(t.color,{}),n.fillStyle=Ms(t.fillColor,{}),n.moveTo(e.originX,e.originY),n.lineTo(e.originX+e.width,e.originY),n.lineTo(e.originX+e.width,e.originY+e.height),n.lineTo(e.originX,e.originY+e.height),n.lineTo(e.originX,e.originY),n.stroke(),n.fill(),n.restore()}za(e,t,n=[0,0,0,255]){this.l?function(e,t,n,r){let i=Fs(e);Is(e,t,(t=>{Ls(e,t,n,r),(t=Ps(e)).drawImage(i.canvas,0,0,t.canvas.width,t.canvas.height)}))}(this,e,n,t):Ls(this,e.N(),n,t)}Aa(e,t,n){this.l?function(e,t,n,r){let i=Fs(e);Is(e,t,(t=>{Rs(e,t,n,r),(t=Ps(e)).drawImage(i.canvas,0,0,t.canvas.width,t.canvas.height)}))}(this,e,t,n):Rs(this,e.N(),t,n)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function zs(e,t){switch(t){case 0:return e.g.find((e=>e instanceof ImageData));case 1:return e.g.find((e=>typeof ImageBitmap<`u`&&e instanceof ImageBitmap));case 2:return e.g.find((e=>typeof WebGLTexture<`u`&&e instanceof WebGLTexture));default:throw Error(`Type is not supported: ${t}`)}}function Bs(e){var t=zs(e,0);if(!t){t=Hs(e);let n=Us(e),r=new Uint8Array(e.width*e.height*4);hs(n,t,Vs(e)),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,r),gs(n),t=new ImageData(new Uint8ClampedArray(r.buffer),e.width,e.height),e.g.push(t)}return t}function Vs(e){let t=zs(e,2);if(!t){let n=Hs(e);t=Ws(e);let r=zs(e,1)||Bs(e);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Gs(e)}return t}function Hs(e){if(!e.canvas)throw Error(`Conversion to different image formats require that a canvas is passed when iniitializing the image.`);return e.h||=G(e.canvas.getContext(`webgl2`),`You cannot use a canvas that is already bound to a different type of rendering context.`),e.h}function Us(e){return e.l||=new _s,e.l}function Ws(e){let t=Hs(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=zs(e,2);return n||(n=ms(Us(e),t),e.g.push(n),e.m=!0),t.bindTexture(t.TEXTURE_2D,n),n}function Gs(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}function Ks(e){let t=Hs(e);return ps(Us(e),t,!0,(()=>function(e,t){let n=e.canvas;if(n.width===e.width&&n.height===e.height)return t();let r=n.width,i=n.height;return n.width=e.width,n.height=e.height,e=t(),n.width=r,n.height=i,e}(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()}))))}q.prototype.close=q.prototype.close,q.prototype.drawConfidenceMask=q.prototype.Aa,q.prototype.drawCategoryMask=q.prototype.za,q.prototype.drawBoundingBox=q.prototype.ya,q.prototype.drawConnectors=q.prototype.Ba,q.prototype.drawLandmarks=q.prototype.Ca,q.lerp=function(e,t,n,r,i){return Ns(r*(1-(e-t)/(n-t))+i*(1-(n-e)/(n-t)),r,i)},q.clamp=Ns;var J=class{constructor(e,t,n,r,i,a,o){this.g=e,this.j=t,this.m=n,this.canvas=r,this.l=i,this.width=a,this.height=o,(this.j||this.m)&&--qs===0&&console.error(`You seem to be creating MPImage instances without invoking .close(). This leaks resources.`)}Ia(){return!!zs(this,0)}na(){return!!zs(this,1)}S(){return!!zs(this,2)}Ga(){return Bs(this)}Fa(){var e=zs(this,1);return e||(Vs(this),Ws(this),e=Ks(this),Gs(this),this.g.push(e),this.j=!0),e}N(){return Vs(this)}clone(){let e=[];for(let t of this.g){let n;if(t instanceof ImageData)n=new ImageData(t.data,this.width,this.height);else if(t instanceof WebGLTexture){let e=Hs(this),t=Us(this);e.activeTexture(e.TEXTURE1),n=ms(t,e),e.bindTexture(e.TEXTURE_2D,n),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,null),e.bindTexture(e.TEXTURE_2D,null),hs(t,e,n),ps(t,e,!1,(()=>{Ws(this),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),Gs(this)})),gs(t),Gs(this)}else{if(!(t instanceof ImageBitmap))throw Error(`Type is not supported: ${t}`);Vs(this),Ws(this),n=Ks(this),Gs(this)}e.push(n)}return new J(e,this.na(),this.S(),this.canvas,this.l,this.width,this.height)}close(){this.j&&zs(this,1).close(),this.m&&Hs(this).deleteTexture(zs(this,2)),qs=-1}};J.prototype.close=J.prototype.close,J.prototype.clone=J.prototype.clone,J.prototype.getAsWebGLTexture=J.prototype.N,J.prototype.getAsImageBitmap=J.prototype.Fa,J.prototype.getAsImageData=J.prototype.Ga,J.prototype.hasWebGLTexture=J.prototype.S,J.prototype.hasImageBitmap=J.prototype.na,J.prototype.hasImageData=J.prototype.Ia;var qs=250;function Js(...e){return e.map((([e,t])=>({start:e,end:t})))}var Ys=function(e){return class extends e{Oa(){this.i._registerModelResourcesGraphService()}}}((Xs=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?Yo()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn(`OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas.`),this.i.canvas=document.createElement(`canvas`)):this.i.canvas=t}async initializeGraph(e){let 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){let n=e.length,r=this.i._malloc(n);this.i.HEAPU8.set(e,r),t?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(e,t,n,r,i){this.i._configureAudio||console.warn(`Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?`),U(this,r||`input_audio`,(r=>{U(this,i||=`audio_header`,(i=>{this.i._configureAudio(r,i,e,t,n)}))}))}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}ga(e){es(this,`__graph_config__`,(t=>{e(t)})),U(this,`__graph_config__`,(e=>{this.i._getGraphConfig(e,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,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,r,i){let a=4*e.length;this.h!==a&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(a),this.h=a),this.i.HEAPF32.set(e,this.g/4),U(this,r,(e=>{this.i._addAudioToInputStream(this.g,t,n,e,i)}))}addGpuBufferToStream(e,t,n){U(this,t,(t=>{let[r,i]=Qo(this,e,t);this.i._addBoundTextureToStream(t,r,i,n)}))}addBoolToStream(e,t,n){U(this,t,(t=>{this.i._addBoolToInputStream(e,t,n)}))}addDoubleToStream(e,t,n){U(this,t,(t=>{this.i._addDoubleToInputStream(e,t,n)}))}addFloatToStream(e,t,n){U(this,t,(t=>{this.i._addFloatToInputStream(e,t,n)}))}addIntToStream(e,t,n){U(this,t,(t=>{this.i._addIntToInputStream(e,t,n)}))}addUintToStream(e,t,n){U(this,t,(t=>{this.i._addUintToInputStream(e,t,n)}))}addStringToStream(e,t,n){U(this,t,(t=>{U(this,e,(e=>{this.i._addStringToInputStream(e,t,n)}))}))}addStringRecordToStream(e,t,n){U(this,t,(t=>{$o(this,Object.keys(e),(r=>{$o(this,Object.values(e),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(e).length,t,n)}))}))}))}addProtoToStream(e,t,n,r){U(this,n,(n=>{U(this,t,(t=>{let i=this.i._malloc(e.length);this.i.HEAPU8.set(e,i),this.i._addProtoToInputStream(i,e.length,t,n,r),this.i._free(i)}))}))}addEmptyPacketToStream(e,t){U(this,e,(e=>{this.i._addEmptyPacketToInputStream(e,t)}))}addBoolVectorToStream(e,t,n){U(this,t,(t=>{let r=this.i._allocateBoolVector(e.length);if(!r)throw Error(`Unable to allocate new bool vector on heap.`);for(let t of e)this.i._addBoolVectorEntry(r,t);this.i._addBoolVectorToInputStream(r,t,n)}))}addDoubleVectorToStream(e,t,n){U(this,t,(t=>{let r=this.i._allocateDoubleVector(e.length);if(!r)throw Error(`Unable to allocate new double vector on heap.`);for(let t of e)this.i._addDoubleVectorEntry(r,t);this.i._addDoubleVectorToInputStream(r,t,n)}))}addFloatVectorToStream(e,t,n){U(this,t,(t=>{let r=this.i._allocateFloatVector(e.length);if(!r)throw Error(`Unable to allocate new float vector on heap.`);for(let t of e)this.i._addFloatVectorEntry(r,t);this.i._addFloatVectorToInputStream(r,t,n)}))}addIntVectorToStream(e,t,n){U(this,t,(t=>{let r=this.i._allocateIntVector(e.length);if(!r)throw Error(`Unable to allocate new int vector on heap.`);for(let t of e)this.i._addIntVectorEntry(r,t);this.i._addIntVectorToInputStream(r,t,n)}))}addUintVectorToStream(e,t,n){U(this,t,(t=>{let r=this.i._allocateUintVector(e.length);if(!r)throw Error(`Unable to allocate new unsigned int vector on heap.`);for(let t of e)this.i._addUintVectorEntry(r,t);this.i._addUintVectorToInputStream(r,t,n)}))}addStringVectorToStream(e,t,n){U(this,t,(t=>{let r=this.i._allocateStringVector(e.length);if(!r)throw Error(`Unable to allocate new string vector on heap.`);for(let t of e)U(this,t,(e=>{this.i._addStringVectorEntry(r,e)}));this.i._addStringVectorToInputStream(r,t,n)}))}addBoolToInputSidePacket(e,t){U(this,t,(t=>{this.i._addBoolToInputSidePacket(e,t)}))}addDoubleToInputSidePacket(e,t){U(this,t,(t=>{this.i._addDoubleToInputSidePacket(e,t)}))}addFloatToInputSidePacket(e,t){U(this,t,(t=>{this.i._addFloatToInputSidePacket(e,t)}))}addIntToInputSidePacket(e,t){U(this,t,(t=>{this.i._addIntToInputSidePacket(e,t)}))}addUintToInputSidePacket(e,t){U(this,t,(t=>{this.i._addUintToInputSidePacket(e,t)}))}addStringToInputSidePacket(e,t){U(this,t,(t=>{U(this,e,(e=>{this.i._addStringToInputSidePacket(e,t)}))}))}addProtoToInputSidePacket(e,t,n){U(this,n,(n=>{U(this,t,(t=>{let r=this.i._malloc(e.length);this.i.HEAPU8.set(e,r),this.i._addProtoToInputSidePacket(r,e.length,t,n),this.i._free(r)}))}))}addBoolVectorToInputSidePacket(e,t){U(this,t,(t=>{let n=this.i._allocateBoolVector(e.length);if(!n)throw Error(`Unable to allocate new bool vector on heap.`);for(let t of e)this.i._addBoolVectorEntry(n,t);this.i._addBoolVectorToInputSidePacket(n,t)}))}addDoubleVectorToInputSidePacket(e,t){U(this,t,(t=>{let n=this.i._allocateDoubleVector(e.length);if(!n)throw Error(`Unable to allocate new double vector on heap.`);for(let t of e)this.i._addDoubleVectorEntry(n,t);this.i._addDoubleVectorToInputSidePacket(n,t)}))}addFloatVectorToInputSidePacket(e,t){U(this,t,(t=>{let n=this.i._allocateFloatVector(e.length);if(!n)throw Error(`Unable to allocate new float vector on heap.`);for(let t of e)this.i._addFloatVectorEntry(n,t);this.i._addFloatVectorToInputSidePacket(n,t)}))}addIntVectorToInputSidePacket(e,t){U(this,t,(t=>{let n=this.i._allocateIntVector(e.length);if(!n)throw Error(`Unable to allocate new int vector on heap.`);for(let t of e)this.i._addIntVectorEntry(n,t);this.i._addIntVectorToInputSidePacket(n,t)}))}addUintVectorToInputSidePacket(e,t){U(this,t,(t=>{let n=this.i._allocateUintVector(e.length);if(!n)throw Error(`Unable to allocate new unsigned int vector on heap.`);for(let t of e)this.i._addUintVectorEntry(n,t);this.i._addUintVectorToInputSidePacket(n,t)}))}addStringVectorToInputSidePacket(e,t){U(this,t,(t=>{let n=this.i._allocateStringVector(e.length);if(!n)throw Error(`Unable to allocate new string vector on heap.`);for(let t of e)U(this,t,(e=>{this.i._addStringVectorEntry(n,e)}));this.i._addStringVectorToInputSidePacket(n,t)}))}attachBoolListener(e,t){es(this,e,t),U(this,e,(e=>{this.i._attachBoolListener(e)}))}attachBoolVectorListener(e,t){ts(this,e,t),U(this,e,(e=>{this.i._attachBoolVectorListener(e)}))}attachIntListener(e,t){es(this,e,t),U(this,e,(e=>{this.i._attachIntListener(e)}))}attachIntVectorListener(e,t){ts(this,e,t),U(this,e,(e=>{this.i._attachIntVectorListener(e)}))}attachUintListener(e,t){es(this,e,t),U(this,e,(e=>{this.i._attachUintListener(e)}))}attachUintVectorListener(e,t){ts(this,e,t),U(this,e,(e=>{this.i._attachUintVectorListener(e)}))}attachDoubleListener(e,t){es(this,e,t),U(this,e,(e=>{this.i._attachDoubleListener(e)}))}attachDoubleVectorListener(e,t){ts(this,e,t),U(this,e,(e=>{this.i._attachDoubleVectorListener(e)}))}attachFloatListener(e,t){es(this,e,t),U(this,e,(e=>{this.i._attachFloatListener(e)}))}attachFloatVectorListener(e,t){ts(this,e,t),U(this,e,(e=>{this.i._attachFloatVectorListener(e)}))}attachStringListener(e,t){es(this,e,t),U(this,e,(e=>{this.i._attachStringListener(e)}))}attachStringVectorListener(e,t){ts(this,e,t),U(this,e,(e=>{this.i._attachStringVectorListener(e)}))}attachProtoListener(e,t,n){es(this,e,t),U(this,e,(e=>{this.i._attachProtoListener(e,n||!1)}))}attachProtoVectorListener(e,t,n){ts(this,e,t),U(this,e,(e=>{this.i._attachProtoVectorListener(e,n||!1)}))}attachAudioListener(e,t,n){this.i._attachAudioListener||console.warn(`Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?`),es(this,e,((e,n)=>{e=new Float32Array(e.buffer,e.byteOffset,e.length/4),t(e,n)})),U(this,e,(e=>{this.i._attachAudioListener(e,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Xs{get ia(){return this.i}ta(e,t,n){U(this,t,(t=>{let[r,i]=Qo(this,e,t);this.ia._addBoundTextureAsImageToStream(t,r,i,n)}))}W(e,t){es(this,e,t),U(this,e,(e=>{this.ia._attachImageListener(e)}))}fa(e,t){ts(this,e,t),U(this,e,(e=>{this.ia._attachImageVectorListener(e)}))}})),Xs,Zs=class extends Ys{};async function Y(e,t,n){return async function(e,t,n,r){return ns(e,t,n,r)}(e,n.canvas??(Yo()?void 0:document.createElement(`canvas`)),t,n)}function Qs(e,t,n,r){if(e.V){let a=new Ta;if(n?.regionOfInterest){if(!e.sa)throw Error(`This task doesn't support region-of-interest.`);var i=n.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error(`Expected RectF with left < right and top < bottom.`);if(i.left<0||i.top<0||i.right>1||i.bottom>1)throw Error(`Expected RectF values to be in [0,1].`);S(a,1,(i.left+i.right)/2),S(a,2,(i.top+i.bottom)/2),S(a,4,i.right-i.left),S(a,3,i.bottom-i.top)}else S(a,1,.5),S(a,2,.5),S(a,4,1),S(a,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error(`Expected rotation to be a multiple of 90°.`);if(S(a,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){let[e,r]=Zo(t);n=x(a,3)*r/e,i=x(a,4)*e/r,S(a,4,n),S(a,3,i)}}e.g.addProtoToStream(a.g(),`mediapipe.NormalizedRect`,e.V,r)}e.g.ta(t,e.da,r??performance.now()),e.finishProcessing()}function $s(e,t,n){if(e.baseOptions?.g())throw Error(`Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.`);Qs(e,t,n,e.B+1)}function ec(e,t,n,r){if(!e.baseOptions?.g())throw Error(`Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.`);Qs(e,t,n,r)}function tc(e,t,n,r){var i=t.data;let a=t.width,o=a*(t=t.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error(`Unsupported channel count: `+i.length/o);return e=new K([i],n,!1,e.g.i.canvas,e.R,a,t),r?e.clone():e}var X=class extends cs{constructor(e,t,n,r){super(e),this.g=e,this.da=t,this.V=n,this.sa=r,this.R=new _s}l(e,t=!0){if(`runningMode`in e&&ir(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.R.close(),super.close()}};X.prototype.close=X.prototype.close;var nc=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect_in`,!1),this.j={detections:[]},b(e=this.h=new Va,0,1,t=new V),S(this.h,2,.5),S(this.h,3,.3)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(this.h,0,1,e)}o(e){return`minDetectionConfidence`in e&&S(this.h,2,e.minDetectionConfidence??.5),`minSuppressionThreshold`in e&&S(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}D(e,t){return this.j={detections:[]},$s(this,e,t),this.j}F(e,t,n){return this.j={detections:[]},ec(this,e,n,t),this.j}m(){var e=new B;R(e,`image_in`),R(e,`norm_rect_in`),z(e,`detections`);let t=new na;Mr(t,Ua,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.face_detector.FaceDetectorGraph`),F(n,`IMAGE:image_in`),F(n,`NORM_RECT:norm_rect_in`),I(n,`DETECTIONS:detections`),n.o(t),ca(e,n),this.g.attachProtoVectorListener(`detections`,((e,t)=>{for(let t of e)e=va(t),this.j.detections.push(zo(e));W(this,t)})),this.g.attachEmptyPacketListener(`detections`,(e=>{W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};nc.prototype.detectForVideo=nc.prototype.F,nc.prototype.detect=nc.prototype.D,nc.prototype.setOptions=nc.prototype.o,nc.createFromModelPath=async function(e,t){return Y(nc,e,{baseOptions:{modelAssetPath:t}})},nc.createFromModelBuffer=function(e,t){return Y(nc,e,{baseOptions:{modelAssetBuffer:t}})},nc.createFromOptions=function(e,t){return Y(nc,e,t)};var rc=Js([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]),ic=Js([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]),ac=Js([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),oc=Js([474,475],[475,476],[476,477],[477,474]),sc=Js([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]),cc=Js([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),lc=Js([469,470],[470,471],[471,472],[472,469]),uc=Js([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]),dc=[...rc,...ic,...ac,...sc,...cc,...uc],fc=Js([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 pc(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Z=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect`,!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,b(e=this.h=new Ya,0,1,t=new V),this.v=new Ja,b(this.h,0,3,this.v),this.s=new Va,b(this.h,0,2,this.s),ar(this.s,4,1),S(this.s,2,.5),S(this.v,2,.5),S(this.h,4,.5)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(this.h,0,1,e)}o(e){return`numFaces`in e&&ar(this.s,4,e.numFaces??1),`minFaceDetectionConfidence`in e&&S(this.s,2,e.minFaceDetectionConfidence??.5),`minTrackingConfidence`in e&&S(this.h,4,e.minTrackingConfidence??.5),`minFacePresenceConfidence`in e&&S(this.v,2,e.minFacePresenceConfidence??.5),`outputFaceBlendshapes`in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),`outputFacialTransformationMatrixes`in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}D(e,t){return pc(this),$s(this,e,t),this.j}F(e,t,n){return pc(this),ec(this,e,n,t),this.j}m(){var e=new B;R(e,`image_in`),R(e,`norm_rect`),z(e,`face_landmarks`);let t=new na;Mr(t,Qa,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph`),F(n,`IMAGE:image_in`),F(n,`NORM_RECT:norm_rect`),I(n,`NORM_LANDMARKS:face_landmarks`),n.o(t),ca(e,n),this.g.attachProtoVectorListener(`face_landmarks`,((e,t)=>{for(let t of e)e=Sa(t),this.j.faceLandmarks.push(Bo(e));W(this,t)})),this.g.attachEmptyPacketListener(`face_landmarks`,(e=>{W(this,e)})),this.outputFaceBlendshapes&&(z(e,`blendshapes`),I(n,`BLENDSHAPES:blendshapes`),this.g.attachProtoVectorListener(`blendshapes`,((e,t)=>{if(this.outputFaceBlendshapes)for(let t of e)e=ma(t),this.j.faceBlendshapes.push(Ro(e.g()??[]));W(this,t)})),this.g.attachEmptyPacketListener(`blendshapes`,(e=>{W(this,e)}))),this.outputFacialTransformationMatrixes&&(z(e,`face_geometry`),I(n,`FACE_GEOMETRY:face_geometry`),this.g.attachProtoVectorListener(`face_geometry`,((e,t)=>{if(this.outputFacialTransformationMatrixes)for(let t of e)(e=y(Ka(t),Ca,2))&&this.j.facialTransformationMatrixes.push({rows:tr(nr(e,1),0)??0,columns:tr(nr(e,2),0)??0,data:Ln(e,3,Dt,In()).slice()??[]});W(this,t)})),this.g.attachEmptyPacketListener(`face_geometry`,(e=>{W(this,e)}))),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Z.prototype.detectForVideo=Z.prototype.F,Z.prototype.detect=Z.prototype.D,Z.prototype.setOptions=Z.prototype.o,Z.createFromModelPath=function(e,t){return Y(Z,e,{baseOptions:{modelAssetPath:t}})},Z.createFromModelBuffer=function(e,t){return Y(Z,e,{baseOptions:{modelAssetBuffer:t}})},Z.createFromOptions=function(e,t){return Y(Z,e,t)},Z.FACE_LANDMARKS_LIPS=rc,Z.FACE_LANDMARKS_LEFT_EYE=ic,Z.FACE_LANDMARKS_LEFT_EYEBROW=ac,Z.FACE_LANDMARKS_LEFT_IRIS=oc,Z.FACE_LANDMARKS_RIGHT_EYE=sc,Z.FACE_LANDMARKS_RIGHT_EYEBROW=cc,Z.FACE_LANDMARKS_RIGHT_IRIS=lc,Z.FACE_LANDMARKS_FACE_OVAL=uc,Z.FACE_LANDMARKS_CONTOURS=dc,Z.FACE_LANDMARKS_TESSELATION=fc;var mc=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect`,!0),b(e=this.j=new $a,0,1,t=new V)}get baseOptions(){return y(this.j,V,1)}set baseOptions(e){b(this.j,0,1,e)}o(e){return super.l(e)}Ra(e,t,n){let r=typeof t==`function`?{}:t;if(this.h=typeof t==`function`?t:n,$s(this,e,r??{}),!this.h)return this.s}m(){var e=new B;R(e,`image_in`),R(e,`norm_rect`),z(e,`stylized_image`);let t=new na;Mr(t,eo,this.j);let n=new L;ia(n,`mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph`),F(n,`IMAGE:image_in`),F(n,`NORM_RECT:norm_rect`),I(n,`STYLIZED_IMAGE:stylized_image`),n.o(t),ca(e,n),this.g.W(`stylized_image`,((e,t)=>{var n=!this.h,r=e.data,i=e.width;let a=i*(e=e.height);if(r instanceof Uint8Array)if(r.length===3*a){let t=new Uint8ClampedArray(4*a);for(let e=0;e<a;++e)t[4*e]=r[3*e],t[4*e+1]=r[3*e+1],t[4*e+2]=r[3*e+2],t[4*e+3]=255;r=new ImageData(t,i,e)}else{if(r.length!==4*a)throw Error(`Unsupported channel count: `+r.length/a);r=new ImageData(new Uint8ClampedArray(r.buffer,r.byteOffset,r.length),i,e)}else if(!(r instanceof WebGLTexture))throw Error(`Unsupported format: ${r.constructor.name}`);i=new J([r],!1,!1,this.g.i.canvas,this.R,i,e),this.s=n=n?i.clone():i,this.h&&this.h(n),W(this,t)})),this.g.attachEmptyPacketListener(`stylized_image`,(e=>{this.s=null,this.h&&this.h(null),W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};mc.prototype.stylize=mc.prototype.Ra,mc.prototype.setOptions=mc.prototype.o,mc.createFromModelPath=function(e,t){return Y(mc,e,{baseOptions:{modelAssetPath:t}})},mc.createFromModelBuffer=function(e,t){return Y(mc,e,{baseOptions:{modelAssetBuffer:t}})},mc.createFromOptions=function(e,t){return Y(mc,e,t)};var hc=Js([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 gc(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function _c(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 vc(e,t=!0){let n=[];for(let i of e){var r=ma(i);e=[];for(let n of r.g())r=t&&nr(n,1)!=null?tr(nr(n,1),0):-1,e.push({score:x(n,2)??0,index:r,categoryName:rr(n,3)??``,displayName:rr(n,4)??``});n.push(e)}return n}var yc=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect`,!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],b(e=this.j=new co,0,1,t=new V),this.s=new so,b(this.j,0,2,this.s),this.C=new oo,b(this.s,0,3,this.C),this.v=new ao,b(this.s,0,2,this.v),this.h=new io,b(this.j,0,3,this.h),S(this.v,2,.5),S(this.s,4,.5),S(this.C,2,.5)}get baseOptions(){return y(this.j,V,1)}set baseOptions(e){b(this.j,0,1,e)}o(e){if(ar(this.v,3,e.numHands??1),`minHandDetectionConfidence`in e&&S(this.v,2,e.minHandDetectionConfidence??.5),`minTrackingConfidence`in e&&S(this.s,4,e.minTrackingConfidence??.5),`minHandPresenceConfidence`in e&&S(this.C,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new to,n=t,r=Lo(e.cannedGesturesClassifierOptions,y(this.h,to,3)?.h());b(n,0,2,r),b(this.h,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&y(this.h,to,3)?.g();return e.customGesturesClassifierOptions?(b(n=t=new to,0,2,r=Lo(e.customGesturesClassifierOptions,y(this.h,to,4)?.h())),b(this.h,0,4,t)):e.customGesturesClassifierOptions===void 0&&y(this.h,to,4)?.g(),this.l(e)}Ma(e,t){return gc(this),$s(this,e,t),_c(this)}Na(e,t,n){return gc(this),ec(this,e,n,t),_c(this)}m(){var e=new B;R(e,`image_in`),R(e,`norm_rect`),z(e,`hand_gestures`),z(e,`hand_landmarks`),z(e,`world_hand_landmarks`),z(e,`handedness`);let t=new na;Mr(t,go,this.j);let n=new L;ia(n,`mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph`),F(n,`IMAGE:image_in`),F(n,`NORM_RECT:norm_rect`),I(n,`HAND_GESTURES:hand_gestures`),I(n,`LANDMARKS:hand_landmarks`),I(n,`WORLD_LANDMARKS:world_hand_landmarks`),I(n,`HANDEDNESS:handedness`),n.o(t),ca(e,n),this.g.attachProtoVectorListener(`hand_landmarks`,((e,t)=>{for(let t of e){e=Sa(t);let n=[];for(let t of Xn(e,xa,1))n.push({x:x(t,1)??0,y:x(t,2)??0,z:x(t,3)??0,visibility:x(t,4)??0});this.landmarks.push(n)}W(this,t)})),this.g.attachEmptyPacketListener(`hand_landmarks`,(e=>{W(this,e)})),this.g.attachProtoVectorListener(`world_hand_landmarks`,((e,t)=>{for(let t of e){e=ba(t);let n=[];for(let t of Xn(e,ya,1))n.push({x:x(t,1)??0,y:x(t,2)??0,z:x(t,3)??0,visibility:x(t,4)??0});this.worldLandmarks.push(n)}W(this,t)})),this.g.attachEmptyPacketListener(`world_hand_landmarks`,(e=>{W(this,e)})),this.g.attachProtoVectorListener(`hand_gestures`,((e,t)=>{this.gestures.push(...vc(e,!1)),W(this,t)})),this.g.attachEmptyPacketListener(`hand_gestures`,(e=>{W(this,e)})),this.g.attachProtoVectorListener(`handedness`,((e,t)=>{this.handedness.push(...vc(e)),W(this,t)})),this.g.attachEmptyPacketListener(`handedness`,(e=>{W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function bc(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}yc.prototype.recognizeForVideo=yc.prototype.Na,yc.prototype.recognize=yc.prototype.Ma,yc.prototype.setOptions=yc.prototype.o,yc.createFromModelPath=function(e,t){return Y(yc,e,{baseOptions:{modelAssetPath:t}})},yc.createFromModelBuffer=function(e,t){return Y(yc,e,{baseOptions:{modelAssetBuffer:t}})},yc.createFromOptions=function(e,t){return Y(yc,e,t)},yc.HAND_CONNECTIONS=hc;var xc=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect`,!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],b(e=this.h=new so,0,1,t=new V),this.s=new oo,b(this.h,0,3,this.s),this.j=new ao,b(this.h,0,2,this.j),ar(this.j,3,1),S(this.j,2,.5),S(this.s,2,.5),S(this.h,4,.5)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(this.h,0,1,e)}o(e){return`numHands`in e&&ar(this.j,3,e.numHands??1),`minHandDetectionConfidence`in e&&S(this.j,2,e.minHandDetectionConfidence??.5),`minTrackingConfidence`in e&&S(this.h,4,e.minTrackingConfidence??.5),`minHandPresenceConfidence`in e&&S(this.s,2,e.minHandPresenceConfidence??.5),this.l(e)}D(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],$s(this,e,t),bc(this)}F(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],ec(this,e,n,t),bc(this)}m(){var e=new B;R(e,`image_in`),R(e,`norm_rect`),z(e,`hand_landmarks`),z(e,`world_hand_landmarks`),z(e,`handedness`);let t=new na;Mr(t,ho,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph`),F(n,`IMAGE:image_in`),F(n,`NORM_RECT:norm_rect`),I(n,`LANDMARKS:hand_landmarks`),I(n,`WORLD_LANDMARKS:world_hand_landmarks`),I(n,`HANDEDNESS:handedness`),n.o(t),ca(e,n),this.g.attachProtoVectorListener(`hand_landmarks`,((e,t)=>{for(let t of e)e=Sa(t),this.landmarks.push(Bo(e));W(this,t)})),this.g.attachEmptyPacketListener(`hand_landmarks`,(e=>{W(this,e)})),this.g.attachProtoVectorListener(`world_hand_landmarks`,((e,t)=>{for(let t of e)e=ba(t),this.worldLandmarks.push(Vo(e));W(this,t)})),this.g.attachEmptyPacketListener(`world_hand_landmarks`,(e=>{W(this,e)})),this.g.attachProtoVectorListener(`handedness`,((e,t)=>{var n=this.handedness,r=n.push;let i=[];for(let t of e){e=ma(t);let n=[];for(let t of e.g())n.push({score:x(t,2)??0,index:tr(nr(t,1),0)??-1,categoryName:rr(t,3)??``,displayName:rr(t,4)??``});i.push(n)}r.call(n,...i),W(this,t)})),this.g.attachEmptyPacketListener(`handedness`,(e=>{W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};xc.prototype.detectForVideo=xc.prototype.F,xc.prototype.detect=xc.prototype.D,xc.prototype.setOptions=xc.prototype.o,xc.createFromModelPath=function(e,t){return Y(xc,e,{baseOptions:{modelAssetPath:t}})},xc.createFromModelBuffer=function(e,t){return Y(xc,e,{baseOptions:{modelAssetBuffer:t}})},xc.createFromOptions=function(e,t){return Y(xc,e,t)},xc.HAND_CONNECTIONS=hc;var Sc=Js([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]);function Cc(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function wc(e){try{if(!e.C)return e.h;e.C(e.h)}finally{ss(e)}}function Tc(e,t){e=Sa(e),t.push(Bo(e))}var Q=class extends X{constructor(e,t){super(new Zs(e,t),`input_frames_image`,null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,b(e=this.j=new bo,0,1,t=new V),this.K=new oo,b(this.j,0,2,this.K),this.ca=new _o,b(this.j,0,3,this.ca),this.s=new Va,b(this.j,0,4,this.s),this.I=new Ja,b(this.j,0,5,this.I),this.v=new vo,b(this.j,0,6,this.v),this.L=new yo,b(this.j,0,7,this.L),S(this.s,2,.5),S(this.s,3,.3),S(this.I,2,.5),S(this.v,2,.5),S(this.v,3,.3),S(this.L,2,.5),S(this.K,2,.5)}get baseOptions(){return y(this.j,V,1)}set baseOptions(e){b(this.j,0,1,e)}o(e){return`minFaceDetectionConfidence`in e&&S(this.s,2,e.minFaceDetectionConfidence??.5),`minFaceSuppressionThreshold`in e&&S(this.s,3,e.minFaceSuppressionThreshold??.3),`minFacePresenceConfidence`in e&&S(this.I,2,e.minFacePresenceConfidence??.5),`outputFaceBlendshapes`in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),`minPoseDetectionConfidence`in e&&S(this.v,2,e.minPoseDetectionConfidence??.5),`minPoseSuppressionThreshold`in e&&S(this.v,3,e.minPoseSuppressionThreshold??.3),`minPosePresenceConfidence`in e&&S(this.L,2,e.minPosePresenceConfidence??.5),`outputPoseSegmentationMasks`in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),`minHandLandmarksConfidence`in e&&S(this.K,2,e.minHandLandmarksConfidence??.5),this.l(e)}D(e,t,n){let r=typeof t==`function`?{}:t;return this.C=typeof t==`function`?t:n,Cc(this),$s(this,e,r),wc(this)}F(e,t,n,r){let i=typeof n==`function`?{}:n;return this.C=typeof n==`function`?n:r,Cc(this),ec(this,e,i,t),wc(this)}m(){var e=new B;R(e,`input_frames_image`),z(e,`pose_landmarks`),z(e,`pose_world_landmarks`),z(e,`face_landmarks`),z(e,`left_hand_landmarks`),z(e,`left_hand_world_landmarks`),z(e,`right_hand_landmarks`),z(e,`right_hand_world_landmarks`);let t=new na,n=new Ki;Hn(n,1,zt(`type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions`),``),function(e,t){if(t!=null)if(Array.isArray(t))_(e,2,Sn(t,wn,void 0,void 0,!1));else{if(!(typeof t==`string`||t instanceof Ee||be(t)))throw Error(`invalid value in Any.value field: `+t+` expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array`);Hn(e,2,Xe(t,!1,!1),we())}}(n,this.j.g());let r=new L;ia(r,`mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph`),er(r,8,Ki,n),F(r,`IMAGE:input_frames_image`),I(r,`POSE_LANDMARKS:pose_landmarks`),I(r,`POSE_WORLD_LANDMARKS:pose_world_landmarks`),I(r,`FACE_LANDMARKS:face_landmarks`),I(r,`LEFT_HAND_LANDMARKS:left_hand_landmarks`),I(r,`LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks`),I(r,`RIGHT_HAND_LANDMARKS:right_hand_landmarks`),I(r,`RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks`),r.o(t),ca(e,r),as(this,e),this.g.attachProtoListener(`pose_landmarks`,((e,t)=>{Tc(e,this.h.poseLandmarks),W(this,t)})),this.g.attachEmptyPacketListener(`pose_landmarks`,(e=>{W(this,e)})),this.g.attachProtoListener(`pose_world_landmarks`,((e,t)=>{var n=this.h.poseWorldLandmarks;e=ba(e),n.push(Vo(e)),W(this,t)})),this.g.attachEmptyPacketListener(`pose_world_landmarks`,(e=>{W(this,e)})),this.outputPoseSegmentationMasks&&(I(r,`POSE_SEGMENTATION_MASK:pose_segmentation_mask`),os(this,`pose_segmentation_mask`),this.g.W(`pose_segmentation_mask`,((e,t)=>{this.h.poseSegmentationMasks=[tc(this,e,!0,!this.C)],W(this,t)})),this.g.attachEmptyPacketListener(`pose_segmentation_mask`,(e=>{this.h.poseSegmentationMasks=[],W(this,e)}))),this.g.attachProtoListener(`face_landmarks`,((e,t)=>{Tc(e,this.h.faceLandmarks),W(this,t)})),this.g.attachEmptyPacketListener(`face_landmarks`,(e=>{W(this,e)})),this.outputFaceBlendshapes&&(z(e,`extra_blendshapes`),I(r,`FACE_BLENDSHAPES:extra_blendshapes`),this.g.attachProtoListener(`extra_blendshapes`,((e,t)=>{var n=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(e=ma(e),n.push(Ro(e.g()??[]))),W(this,t)})),this.g.attachEmptyPacketListener(`extra_blendshapes`,(e=>{W(this,e)}))),this.g.attachProtoListener(`left_hand_landmarks`,((e,t)=>{Tc(e,this.h.leftHandLandmarks),W(this,t)})),this.g.attachEmptyPacketListener(`left_hand_landmarks`,(e=>{W(this,e)})),this.g.attachProtoListener(`left_hand_world_landmarks`,((e,t)=>{var n=this.h.leftHandWorldLandmarks;e=ba(e),n.push(Vo(e)),W(this,t)})),this.g.attachEmptyPacketListener(`left_hand_world_landmarks`,(e=>{W(this,e)})),this.g.attachProtoListener(`right_hand_landmarks`,((e,t)=>{Tc(e,this.h.rightHandLandmarks),W(this,t)})),this.g.attachEmptyPacketListener(`right_hand_landmarks`,(e=>{W(this,e)})),this.g.attachProtoListener(`right_hand_world_landmarks`,((e,t)=>{var n=this.h.rightHandWorldLandmarks;e=ba(e),n.push(Vo(e)),W(this,t)})),this.g.attachEmptyPacketListener(`right_hand_world_landmarks`,(e=>{W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Q.prototype.detectForVideo=Q.prototype.F,Q.prototype.detect=Q.prototype.D,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)},Q.HAND_CONNECTIONS=hc,Q.POSE_CONNECTIONS=Sc,Q.FACE_LANDMARKS_LIPS=rc,Q.FACE_LANDMARKS_LEFT_EYE=ic,Q.FACE_LANDMARKS_LEFT_EYEBROW=ac,Q.FACE_LANDMARKS_LEFT_IRIS=oc,Q.FACE_LANDMARKS_RIGHT_EYE=sc,Q.FACE_LANDMARKS_RIGHT_EYEBROW=cc,Q.FACE_LANDMARKS_RIGHT_IRIS=lc,Q.FACE_LANDMARKS_FACE_OVAL=uc,Q.FACE_LANDMARKS_CONTOURS=dc,Q.FACE_LANDMARKS_TESSELATION=fc;var Ec=class extends X{constructor(e,t){super(new Zs(e,t),`input_image`,`norm_rect`,!0),this.j={classifications:[]},b(e=this.h=new Co,0,1,t=new V)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(this.h,0,1,e)}o(e){return b(this.h,0,2,Lo(e,y(this.h,Na,2))),this.l(e)}wa(e,t){return this.j={classifications:[]},$s(this,e,t),this.j}xa(e,t,n){return this.j={classifications:[]},ec(this,e,n,t),this.j}m(){var e=new B;R(e,`input_image`),R(e,`norm_rect`),z(e,`classifications`);let t=new na;Mr(t,wo,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.image_classifier.ImageClassifierGraph`),F(n,`IMAGE:input_image`),F(n,`NORM_RECT:norm_rect`),I(n,`CLASSIFICATIONS:classifications`),n.o(t),ca(e,n),this.g.attachProtoListener(`classifications`,((e,t)=>{this.j=function(e){let t={classifications:Xn(e,Ea,1).map((e=>Ro(y(e,fa,4)?.g()??[],tr(nr(e,2),0),rr(e,3))))};return It(An(e,2))!=null&&(t.timestampMs=tr(It(An(e,2)),0)),t}(Da(e)),W(this,t)})),this.g.attachEmptyPacketListener(`classifications`,(e=>{W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ec.prototype.classifyForVideo=Ec.prototype.xa,Ec.prototype.classify=Ec.prototype.wa,Ec.prototype.setOptions=Ec.prototype.o,Ec.createFromModelPath=function(e,t){return Y(Ec,e,{baseOptions:{modelAssetPath:t}})},Ec.createFromModelBuffer=function(e,t){return Y(Ec,e,{baseOptions:{modelAssetBuffer:t}})},Ec.createFromOptions=function(e,t){return Y(Ec,e,t)};var Dc=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect`,!0),this.h=new To,this.embeddings={embeddings:[]},b(e=this.h,0,1,t=new V)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(this.h,0,1,e)}o(e){var t=this.h,n=y(this.h,Fa,2);return n=n?n.clone():new Fa,e.l2Normalize===void 0?`l2Normalize`in e&&_(n,1):ir(n,1,e.l2Normalize),e.quantize===void 0?`quantize`in e&&_(n,2):ir(n,2,e.quantize),b(t,0,2,n),this.l(e)}Da(e,t){return $s(this,e,t),this.embeddings}Ea(e,t,n){return ec(this,e,n,t),this.embeddings}m(){var e=new B;R(e,`image_in`),R(e,`norm_rect`),z(e,`embeddings_out`);let t=new na;Mr(t,Eo,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph`),F(n,`IMAGE:image_in`),F(n,`NORM_RECT:norm_rect`),I(n,`EMBEDDINGS:embeddings_out`),n.o(t),ca(e,n),this.g.attachProtoListener(`embeddings_out`,((e,t)=>{e=Ma(e),this.embeddings=function(e){return{embeddings:Xn(e,Aa,1).map((e=>{let t={headIndex:tr(nr(e,3),0)??-1,headName:rr(e,4)??``};if(Jn(e,Oa,Un(e,1))!==void 0)e=Ln(e=y(e,Oa,Un(e,1)),1,Dt,In()),t.floatEmbedding=e.slice();else{let n=new Uint8Array;t.quantizedEmbedding=y(e,ka,Un(e,2))?.ra()?.ua()??n}return t})),timestampMs:tr(It(An(e,2)),0)}}(e),W(this,t)})),this.g.attachEmptyPacketListener(`embeddings_out`,(e=>{W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Dc.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=Uo(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error(`Cannot compute cosine similarity between quantized and float embeddings.`);e=Uo(Ho(e.quantizedEmbedding),Ho(t.quantizedEmbedding))}return e},Dc.prototype.embedForVideo=Dc.prototype.Ea,Dc.prototype.embed=Dc.prototype.Da,Dc.prototype.setOptions=Dc.prototype.o,Dc.createFromModelPath=function(e,t){return Y(Dc,e,{baseOptions:{modelAssetPath:t}})},Dc.createFromModelBuffer=function(e,t){return Y(Dc,e,{baseOptions:{modelAssetBuffer:t}})},Dc.createFromOptions=function(e,t){return Y(Dc,e,t)};var Oc=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){this.confidenceMasks?.forEach((e=>{e.close()})),this.categoryMask?.close()}};function kc(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function Ac(e){try{let t=new Oc(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{ss(e)}}Oc.prototype.close=Oc.prototype.close;var $=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect`,!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new jo,this.v=new Do,b(this.h,0,3,this.v),b(e=this.h,0,1,t=new V)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(this.h,0,1,e)}o(e){return e.displayNamesLocale===void 0?`displayNamesLocale`in e&&_(this.h,2):_(this.h,2,zt(e.displayNamesLocale)),`outputCategoryMask`in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),`outputConfidenceMasks`in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}J(){(function(e){let t=Xn(e.ga(),L,1).filter((e=>rr(e,1).includes(`mediapipe.tasks.TensorsToSegmentationCalculator`)));if(e.s=[],t.length>1)throw Error(`The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.`);t.length===1&&(y(t[0],na,7)?.l()?.g()??new Map).forEach(((t,n)=>{e.s[Number(n)]=rr(t,1)}))})(this)}ha(e,t,n){let r=typeof t==`function`?{}:t;return this.j=typeof t==`function`?t:n,kc(this),$s(this,e,r),Ac(this)}Pa(e,t,n,r){let i=typeof n==`function`?{}:n;return this.j=typeof n==`function`?n:r,kc(this),ec(this,e,i,t),Ac(this)}Ha(){return this.s}m(){var e=new B;R(e,`image_in`),R(e,`norm_rect`);let t=new na;Mr(t,Mo,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph`),F(n,`IMAGE:image_in`),F(n,`NORM_RECT:norm_rect`),n.o(t),ca(e,n),as(this,e),this.outputConfidenceMasks&&(z(e,`confidence_masks`),I(n,`CONFIDENCE_MASKS:confidence_masks`),os(this,`confidence_masks`),this.g.fa(`confidence_masks`,((e,t)=>{this.confidenceMasks=e.map((e=>tc(this,e,!0,!this.j))),W(this,t)})),this.g.attachEmptyPacketListener(`confidence_masks`,(e=>{this.confidenceMasks=[],W(this,e)}))),this.outputCategoryMask&&(z(e,`category_mask`),I(n,`CATEGORY_MASK:category_mask`),os(this,`category_mask`),this.g.W(`category_mask`,((e,t)=>{this.categoryMask=tc(this,e,!1,!this.j),W(this,t)})),this.g.attachEmptyPacketListener(`category_mask`,(e=>{this.categoryMask=void 0,W(this,e)}))),z(e,`quality_scores`),I(n,`QUALITY_SCORES:quality_scores`),this.g.attachFloatVectorListener(`quality_scores`,((e,t)=>{this.qualityScores=e,W(this,t)})),this.g.attachEmptyPacketListener(`quality_scores`,(e=>{this.categoryMask=void 0,W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};$.prototype.getLabels=$.prototype.Ha,$.prototype.segmentForVideo=$.prototype.Pa,$.prototype.segment=$.prototype.ha,$.prototype.setOptions=$.prototype.o,$.createFromModelPath=function(e,t){return Y($,e,{baseOptions:{modelAssetPath:t}})},$.createFromModelBuffer=function(e,t){return Y($,e,{baseOptions:{modelAssetBuffer:t}})},$.createFromOptions=function(e,t){return Y($,e,t)};var jc=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){this.confidenceMasks?.forEach((e=>{e.close()})),this.categoryMask?.close()}};jc.prototype.close=jc.prototype.close;var Mc=class extends C{constructor(e){super(e)}},Nc=[0,O,-2],Pc=[0,Di,-3,k,Di,-1],Fc=[0,Pc],Ic=[0,Pc,O,-1],Lc=class extends C{constructor(e){super(e)}},Rc=[0,Di,-1,k],zc=class extends C{constructor(){super()}},Bc=class extends C{constructor(e){super(e)}},Vc=[1,2,3,4,5,6,7,8,9,10,14,15],Hc=class extends C{constructor(){super()}};Hc.prototype.g=Gi([0,E,[0,Vc,M,Pc,M,[0,Pc,Nc],M,Fc,M,[0,Fc,Nc],M,Rc,M,[0,Di,-3,k,Vi],M,[0,Di,-3,k],M,[0,j,Di,-2,k,O,k,-1,2,Di,Nc],M,Ic,M,[0,Ic,Nc],Di,Nc,j,M,[0,Di,-3,k,Nc,-1],M,[0,E,Rc]],j,[0,j,O,-1,k]]);var Uc=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect_in`,!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new jo,this.s=new Do,b(this.h,0,3,this.s),b(e=this.h,0,1,t=new V)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(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)}ha(e,t,n,r){let i=typeof n==`function`?{}:n;this.j=typeof n==`function`?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,r=new Hc;let a=new Bc;var o=new Mc;if(ar(o,1,255),b(a,0,12,o),t.keypoint&&t.scribble)throw Error(`Cannot provide both keypoint and scribble.`);if(t.keypoint){var s=new Lc;ir(s,3,!0),S(s,1,t.keypoint.x),S(s,2,t.keypoint.y),Zn(a,5,Vc,s)}else{if(!t.scribble)throw Error(`Must provide either a keypoint or a scribble.`);for(s of(o=new zc,t.scribble))ir(t=new Lc,3,!0),S(t,1,s.x),S(t,2,s.y),er(o,1,Lc,t);Zn(a,15,Vc,o)}er(r,1,Bc,a),this.g.addProtoToStream(r.g(),`drishti.RenderData`,`roi_in`,n),$s(this,e,i);t:{try{let e=new jc(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=e;break t}this.j(e)}finally{ss(this)}c=void 0}return c}m(){var e=new B;R(e,`image_in`),R(e,`roi_in`),R(e,`norm_rect_in`);let t=new na;Mr(t,Mo,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph`),F(n,`IMAGE:image_in`),F(n,`ROI:roi_in`),F(n,`NORM_RECT:norm_rect_in`),n.o(t),ca(e,n),as(this,e),this.outputConfidenceMasks&&(z(e,`confidence_masks`),I(n,`CONFIDENCE_MASKS:confidence_masks`),os(this,`confidence_masks`),this.g.fa(`confidence_masks`,((e,t)=>{this.confidenceMasks=e.map((e=>tc(this,e,!0,!this.j))),W(this,t)})),this.g.attachEmptyPacketListener(`confidence_masks`,(e=>{this.confidenceMasks=[],W(this,e)}))),this.outputCategoryMask&&(z(e,`category_mask`),I(n,`CATEGORY_MASK:category_mask`),os(this,`category_mask`),this.g.W(`category_mask`,((e,t)=>{this.categoryMask=tc(this,e,!1,!this.j),W(this,t)})),this.g.attachEmptyPacketListener(`category_mask`,(e=>{this.categoryMask=void 0,W(this,e)}))),z(e,`quality_scores`),I(n,`QUALITY_SCORES:quality_scores`),this.g.attachFloatVectorListener(`quality_scores`,((e,t)=>{this.qualityScores=e,W(this,t)})),this.g.attachEmptyPacketListener(`quality_scores`,(e=>{this.categoryMask=void 0,W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Uc.prototype.segment=Uc.prototype.ha,Uc.prototype.setOptions=Uc.prototype.o,Uc.createFromModelPath=function(e,t){return Y(Uc,e,{baseOptions:{modelAssetPath:t}})},Uc.createFromModelBuffer=function(e,t){return Y(Uc,e,{baseOptions:{modelAssetBuffer:t}})},Uc.createFromOptions=function(e,t){return Y(Uc,e,t)};var Wc=class extends X{constructor(e,t){super(new Zs(e,t),`input_frame_gpu`,`norm_rect`,!1),this.j={detections:[]},b(e=this.h=new No,0,1,t=new V)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(this.h,0,1,e)}o(e){return e.displayNamesLocale===void 0?`displayNamesLocale`in e&&_(this.h,2):_(this.h,2,zt(e.displayNamesLocale)),e.maxResults===void 0?`maxResults`in e&&_(this.h,3):ar(this.h,3,e.maxResults),e.scoreThreshold===void 0?`scoreThreshold`in e&&_(this.h,4):S(this.h,4,e.scoreThreshold),e.categoryAllowlist===void 0?`categoryAllowlist`in e&&_(this.h,5):or(this.h,5,e.categoryAllowlist),e.categoryDenylist===void 0?`categoryDenylist`in e&&_(this.h,6):or(this.h,6,e.categoryDenylist),this.l(e)}D(e,t){return this.j={detections:[]},$s(this,e,t),this.j}F(e,t,n){return this.j={detections:[]},ec(this,e,n,t),this.j}m(){var e=new B;R(e,`input_frame_gpu`),R(e,`norm_rect`),z(e,`detections`);let t=new na;Mr(t,Po,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.ObjectDetectorGraph`),F(n,`IMAGE:input_frame_gpu`),F(n,`NORM_RECT:norm_rect`),I(n,`DETECTIONS:detections`),n.o(t),ca(e,n),this.g.attachProtoVectorListener(`detections`,((e,t)=>{for(let t of e)e=va(t),this.j.detections.push(zo(e));W(this,t)})),this.g.attachEmptyPacketListener(`detections`,(e=>{W(this,e)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Wc.prototype.detectForVideo=Wc.prototype.F,Wc.prototype.detect=Wc.prototype.D,Wc.prototype.setOptions=Wc.prototype.o,Wc.createFromModelPath=async function(e,t){return Y(Wc,e,{baseOptions:{modelAssetPath:t}})},Wc.createFromModelBuffer=function(e,t){return Y(Wc,e,{baseOptions:{modelAssetBuffer:t}})},Wc.createFromOptions=function(e,t){return Y(Wc,e,t)};var Gc=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach((e=>{e.close()}))}};function Kc(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function qc(e){try{let t=new Gc(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.s)return t;e.s(t)}finally{ss(e)}}Gc.prototype.close=Gc.prototype.close;var Jc=class extends X{constructor(e,t){super(new Zs(e,t),`image_in`,`norm_rect`,!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,b(e=this.h=new Fo,0,1,t=new V),this.v=new yo,b(this.h,0,3,this.v),this.j=new vo,b(this.h,0,2,this.j),ar(this.j,4,1),S(this.j,2,.5),S(this.v,2,.5),S(this.h,4,.5)}get baseOptions(){return y(this.h,V,1)}set baseOptions(e){b(this.h,0,1,e)}o(e){return`numPoses`in e&&ar(this.j,4,e.numPoses??1),`minPoseDetectionConfidence`in e&&S(this.j,2,e.minPoseDetectionConfidence??.5),`minTrackingConfidence`in e&&S(this.h,4,e.minTrackingConfidence??.5),`minPosePresenceConfidence`in e&&S(this.v,2,e.minPosePresenceConfidence??.5),`outputSegmentationMasks`in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}D(e,t,n){let r=typeof t==`function`?{}:t;return this.s=typeof t==`function`?t:n,Kc(this),$s(this,e,r),qc(this)}F(e,t,n,r){let i=typeof n==`function`?{}:n;return this.s=typeof n==`function`?n:r,Kc(this),ec(this,e,i,t),qc(this)}m(){var e=new B;R(e,`image_in`),R(e,`norm_rect`),z(e,`normalized_landmarks`),z(e,`world_landmarks`),z(e,`segmentation_masks`);let t=new na;Mr(t,Io,this.h);let n=new L;ia(n,`mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph`),F(n,`IMAGE:image_in`),F(n,`NORM_RECT:norm_rect`),I(n,`NORM_LANDMARKS:normalized_landmarks`),I(n,`WORLD_LANDMARKS:world_landmarks`),n.o(t),ca(e,n),as(this,e),this.g.attachProtoVectorListener(`normalized_landmarks`,((e,t)=>{this.landmarks=[];for(let t of e)e=Sa(t),this.landmarks.push(Bo(e));W(this,t)})),this.g.attachEmptyPacketListener(`normalized_landmarks`,(e=>{this.landmarks=[],W(this,e)})),this.g.attachProtoVectorListener(`world_landmarks`,((e,t)=>{this.worldLandmarks=[];for(let t of e)e=ba(t),this.worldLandmarks.push(Vo(e));W(this,t)})),this.g.attachEmptyPacketListener(`world_landmarks`,(e=>{this.worldLandmarks=[],W(this,e)})),this.outputSegmentationMasks&&(I(n,`SEGMENTATION_MASK:segmentation_masks`),os(this,`segmentation_masks`),this.g.fa(`segmentation_masks`,((e,t)=>{this.segmentationMasks=e.map((e=>tc(this,e,!0,!this.s))),W(this,t)})),this.g.attachEmptyPacketListener(`segmentation_masks`,(e=>{this.segmentationMasks=[],W(this,e)}))),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Jc.prototype.detectForVideo=Jc.prototype.F,Jc.prototype.detect=Jc.prototype.D,Jc.prototype.setOptions=Jc.prototype.o,Jc.createFromModelPath=function(e,t){return Y(Jc,e,{baseOptions:{modelAssetPath:t}})},Jc.createFromModelBuffer=function(e,t){return Y(Jc,e,{baseOptions:{modelAssetBuffer:t}})},Jc.createFromOptions=function(e,t){return Y(Jc,e,t)},Jc.POSE_CONNECTIONS=Sc;export{q as DrawingUtils,nc as FaceDetector,Z as FaceLandmarker,mc as FaceStylizer,Jo as FilesetResolver,yc as GestureRecognizer,xc as HandLandmarker,Q as HolisticLandmarker,Ec as ImageClassifier,Dc as ImageEmbedder,$ as ImageSegmenter,Oc as ImageSegmenterResult,Uc as InteractiveSegmenter,jc as InteractiveSegmenterResult,J as MPImage,K as MPMask,Wc as ObjectDetector,Jc as PoseLandmarker,X as VisionTaskRunner};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2022 The Instrument Serif Project Authors (https://github.com/Instrument/instrument-serif)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
-----------------------------------------------------------
|
|
8
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
PREAMBLE
|
|
12
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
13
|
+
development of collaborative font projects, to support the font creation
|
|
14
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
15
|
+
open framework in which fonts may be shared and improved in partnership
|
|
16
|
+
with others.
|
|
17
|
+
|
|
18
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
19
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
20
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
21
|
+
redistributed and/or sold with any software provided that any reserved
|
|
22
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
23
|
+
however, cannot be released under any other type of license. The
|
|
24
|
+
requirement for fonts to remain under this license does not apply
|
|
25
|
+
to any document created using the fonts or their derivatives.
|
|
26
|
+
|
|
27
|
+
DEFINITIONS
|
|
28
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
29
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
30
|
+
include source files, build scripts and documentation.
|
|
31
|
+
|
|
32
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
33
|
+
copyright statement(s).
|
|
34
|
+
|
|
35
|
+
"Original Version" refers to the collection of Font Software components as
|
|
36
|
+
distributed by the Copyright Holder(s).
|
|
37
|
+
|
|
38
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
39
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
40
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
41
|
+
new environment.
|
|
42
|
+
|
|
43
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
44
|
+
writer or other person who contributed to the Font Software.
|
|
45
|
+
|
|
46
|
+
PERMISSION AND CONDITIONS
|
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
48
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
49
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
50
|
+
Software, subject to the following conditions:
|
|
51
|
+
|
|
52
|
+
1) Neither the Font Software nor any of its individual components,
|
|
53
|
+
in Original or Modified Versions, may be sold by itself.
|
|
54
|
+
|
|
55
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
56
|
+
redistributed and/or sold with any software, provided that each copy
|
|
57
|
+
contains the above copyright notice and this license. These can be
|
|
58
|
+
included either as stand-alone text files, human-readable headers or
|
|
59
|
+
in the appropriate machine-readable metadata fields within text or
|
|
60
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
61
|
+
|
|
62
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
63
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
64
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
65
|
+
presented to the users.
|
|
66
|
+
|
|
67
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
68
|
+
Software shall not be used to promote, endorse or advertise any
|
|
69
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
70
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
71
|
+
permission.
|
|
72
|
+
|
|
73
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
74
|
+
must be distributed entirely under this license, and must not be
|
|
75
|
+
distributed under any other license. The requirement for fonts to
|
|
76
|
+
remain under this license does not apply to any document created
|
|
77
|
+
using the Font Software.
|
|
78
|
+
|
|
79
|
+
TERMINATION
|
|
80
|
+
This license becomes null and void if any of the above conditions are
|
|
81
|
+
not met.
|
|
82
|
+
|
|
83
|
+
DISCLAIMER
|
|
84
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
85
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
86
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
87
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
88
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
89
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
90
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
91
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
92
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Bundled fonts
|
|
2
|
+
|
|
3
|
+
The `.woff2` files in this directory are redistributed with CozyClay under the
|
|
4
|
+
SIL Open Font License 1.1, which permits bundling them with software provided
|
|
5
|
+
each copy carries the copyright notice and the licence. Those are the two
|
|
6
|
+
`-OFL.txt` files here; keep them alongside the fonts.
|
|
7
|
+
|
|
8
|
+
| File | Family | Copyright | Licence |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `inter-latin.woff2` | [Inter](https://github.com/rsms/inter) | Copyright (c) 2016 The Inter Project Authors | [OFL-1.1](Inter-OFL.txt) |
|
|
11
|
+
| `instrument-serif-latin.woff2`, `instrument-serif-italic-latin.woff2` | [Instrument Serif](https://github.com/Instrument/instrument-serif) | Copyright 2022 The Instrument Serif Project Authors | [OFL-1.1](InstrumentSerif-OFL.txt) |
|
|
12
|
+
|
|
13
|
+
Both are subsets. Under OFL a modified copy may not use the Reserved Font Name,
|
|
14
|
+
so if a subset is ever renamed or edited beyond subsetting, check clause 3 before
|
|
15
|
+
shipping it.
|