@saywright/studio 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.md +0 -6
- package/dist/bridge.js +1188 -210
- package/dist/cli.mjs +9464 -7528
- package/dist/client/assets/CommandPalette-BM1BSUxc.js +1 -0
- package/dist/client/assets/CommandPalette-BM1BSUxc.js.br +0 -0
- package/dist/client/assets/CommandPalette-BM1BSUxc.js.gz +0 -0
- package/dist/client/assets/HelpDialog-Bc6yjiVi.js +1 -0
- package/dist/client/assets/HelpDialog-Bc6yjiVi.js.br +0 -0
- package/dist/client/assets/HelpDialog-Bc6yjiVi.js.gz +0 -0
- package/dist/client/assets/ReportView-DKcggbSt.js +4 -0
- package/dist/client/assets/ReportView-DKcggbSt.js.br +0 -0
- package/dist/client/assets/ReportView-DKcggbSt.js.gz +0 -0
- package/dist/client/assets/SettingsDialog-CIpvauuY.js +1 -0
- package/dist/client/assets/SettingsDialog-CIpvauuY.js.br +0 -0
- package/dist/client/assets/SettingsDialog-CIpvauuY.js.gz +0 -0
- package/dist/client/assets/arrow-left-5LUh_bW3.js +1 -0
- package/dist/client/assets/brand-BcIB43Uo.js +57 -0
- package/dist/client/assets/brand-BcIB43Uo.js.br +0 -0
- package/dist/client/assets/brand-BcIB43Uo.js.gz +0 -0
- package/dist/client/assets/footprints-CfMi7MiN.js +1 -0
- package/dist/client/assets/index-BrM0s_jp.css +2 -0
- package/dist/client/assets/index-BrM0s_jp.css.br +0 -0
- package/dist/client/assets/index-BrM0s_jp.css.gz +0 -0
- package/dist/client/assets/index-D1ooswLS.js +19 -0
- package/dist/client/assets/index-D1ooswLS.js.br +0 -0
- package/dist/client/assets/index-D1ooswLS.js.gz +0 -0
- package/dist/client/assets/refresh-cw-BM1RSPTL.js +1 -0
- package/dist/client/index.html +3 -5
- package/dist/client/index.html.br +0 -0
- package/dist/client/index.html.gz +0 -0
- package/dist/sample/package.json +1 -1
- package/dist/sample/src/App.tsx +3 -2
- package/dist/sample/src/lib/route.ts +3 -2
- package/dist/sample/src/pages/Account.tsx +88 -0
- package/dist/sample/src/styles.css +5 -0
- package/package.json +1 -2
- package/dist/client/assets/Calibration-xY4YDLzU.js +0 -1
- package/dist/client/assets/Calibration-xY4YDLzU.js.br +0 -0
- package/dist/client/assets/Calibration-xY4YDLzU.js.gz +0 -0
- package/dist/client/assets/CommandPalette-BA3akF-p.js +0 -1
- package/dist/client/assets/CommandPalette-BA3akF-p.js.br +0 -0
- package/dist/client/assets/CommandPalette-BA3akF-p.js.gz +0 -0
- package/dist/client/assets/HelpDialog-C6qmdEwi.js +0 -1
- package/dist/client/assets/HelpDialog-C6qmdEwi.js.br +0 -0
- package/dist/client/assets/HelpDialog-C6qmdEwi.js.gz +0 -0
- package/dist/client/assets/ReportView-Bj9xxLCi.js +0 -4
- package/dist/client/assets/ReportView-Bj9xxLCi.js.br +0 -0
- package/dist/client/assets/ReportView-Bj9xxLCi.js.gz +0 -0
- package/dist/client/assets/SettingsDialog-VrACcdUX.js +0 -1
- package/dist/client/assets/SettingsDialog-VrACcdUX.js.br +0 -0
- package/dist/client/assets/SettingsDialog-VrACcdUX.js.gz +0 -0
- package/dist/client/assets/button-B2NFEpCs.js +0 -18
- package/dist/client/assets/button-B2NFEpCs.js.br +0 -0
- package/dist/client/assets/button-B2NFEpCs.js.gz +0 -0
- package/dist/client/assets/camera-BD9K1f5I.js +0 -1
- package/dist/client/assets/confirm-D1U-bFIL.js +0 -41
- package/dist/client/assets/confirm-D1U-bFIL.js.br +0 -0
- package/dist/client/assets/confirm-D1U-bFIL.js.gz +0 -0
- package/dist/client/assets/footprints-DiYtIryA.js +0 -1
- package/dist/client/assets/index-BakNwOFF.css +0 -2
- package/dist/client/assets/index-BakNwOFF.css.br +0 -0
- package/dist/client/assets/index-BakNwOFF.css.gz +0 -0
- package/dist/client/assets/index-DUAtV_Av.js +0 -18
- package/dist/client/assets/index-DUAtV_Av.js.br +0 -0
- package/dist/client/assets/index-DUAtV_Av.js.gz +0 -0
- package/dist/client/assets/preload-helper-BLdHbfdN.js +0 -1
- package/dist/client/assets/preload-helper-BLdHbfdN.js.br +0 -0
- package/dist/client/assets/preload-helper-BLdHbfdN.js.gz +0 -0
- package/dist/client/assets/refresh-cw-Dobx2YmO.js +0 -1
- package/dist/client/assets/tracker.worker-DWwj76VA.js +0 -41
- package/dist/client/assets/tracker.worker-DWwj76VA.js.br +0 -0
- package/dist/client/assets/tracker.worker-DWwj76VA.js.gz +0 -0
- package/dist/client/assets/vision_bundle-ByYCzljp.js +0 -41
- package/dist/client/assets/vision_bundle-ByYCzljp.js.br +0 -0
- package/dist/client/assets/vision_bundle-ByYCzljp.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=function(e){return`/`+e},t={},n=function(e){return e.pathname.endsWith(`.css`)},r=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},i=function(i,a,o){let s=Promise.resolve();if(a&&a.length>0){let i,c=document.querySelector(`meta[property=csp-nonce]`),l=c?.nonce||c?.getAttribute(`nonce`);function u(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function d(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}s=u(a.map(a=>{a=e(a,o);let s=d(a),c=n(s);return r(t,s.href,()=>{if(i===void 0){i={all:new Set,styles:new Set};let e=document.getElementsByTagName(`link`);for(let t=e.length-1;t>=0;t--){let n=e[t];i.all.add(n.href),n.rel===`stylesheet`&&i.styles.add(n.href)}}if((c?i.styles:i.all).has(s.href))return;let e=document.createElement(`link`);if(e.rel=c?`stylesheet`:`modulepreload`,c||(e.as=`script`),e.crossOrigin=``,e.href=s.href,l&&e.setAttribute(`nonce`,l),document.head.appendChild(e),c)return new Promise((t,n)=>{e.addEventListener(`load`,t),e.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${s}`)))})})}).filter(e=>e!==void 0))}function c(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return s.then(e=>{for(let t of e||[])t.status===`rejected`&&c(t.reason);return i().catch(c)})};export{i as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./button-B2NFEpCs.js";var t={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};t.node;var n=e(t),r={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
(function(){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(t,n){t=t.split(`.`);for(var r,i=e;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}function r(){throw Error(`Invalid UTF8`)}function i(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}var a,o,s=void 0,c=typeof TextDecoder<`u`,l=typeof TextEncoder<`u`;function u(e){if(l)e=(o||=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}function d(t){e.setTimeout(()=>{throw t},0)}var ee=t(610401301,!1),te=t(748402147,!0);function ne(){var t=e.navigator;return(t&&=t.userAgent)?t:``}var re,ie=e.navigator;function ae(e){return ae[` `](e),e}re=ie&&ie.userAgentData||null,ae[` `]=function(){};var oe={},se=null;function ce(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;){let t=e.charAt(r++),n=se[t];if(n!=null)return n;if(!/^[\s\xa0]*$/.test(t))throw Error(`Unknown base64 encoding at char: `+t)}return t}le();for(var r=0;;){let e=n(-1),r=n(0),i=n(64),a=n(64);if(a===64&&e===-1)break;t(e<<2|r>>4),i!=64&&(t(r<<4&240|i>>2),a!=64&&t(i<<6&192|a))}}(e,function(e){r[i++]=e}),i===n?r:r.subarray(0,i)}function le(){if(!se){se={};var e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.split(``),t=[`+/=`,`+/`,`-_=`,`-_.`,`-_`];for(let n=0;n<5;n++){let r=e.concat(t[n].split(``));oe[n]=r;for(let e=0;e<r.length;e++){let t=r[e];se[t]===void 0&&(se[t]=e)}}}}var ue=typeof Uint8Array<`u`,de=(!!(ee&&re&&re.brands.length>0)||ne().indexOf(`Trident`)==-1&&ne().indexOf(`MSIE`)==-1)&&typeof btoa==`function`,fe=/[-_.]/g,pe={"-":`+`,_:`/`,".":`=`};function me(e){return pe[e]||``}function he(e){if(!de)return ce(e);e=fe.test(e)?e.replace(fe,me):e,e=atob(e);var t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function ge(e){return ue&&e!=null&&e instanceof Uint8Array}var _e={};function ve(){return be||=new xe(null,_e)}function ye(e){Se(_e);var t=e.h;return(t=t==null||ge(t)?t:typeof t==`string`?he(t):null)==null?t:e.h=t}var be,xe=class{i(){return new Uint8Array(ye(this)||0)}constructor(e,t){if(Se(t),this.h=e,e!=null&&e.length===0)throw Error(`ByteString should be constructed with non-empty values`)}};function Se(e){if(e!==_e)throw Error(`illegal external caller`)}function Ce(e,t){e.__closure__error__context__984382||={},e.__closure__error__context__984382.severity=t}var we=void 0;function Te(e){return Ce(e=Error(e),`warning`),e}function Ee(e,t){if(e!=null){var n=we??={},r=n[e]||0;r>=t||(n[e]=r+1,Ce(e=Error(),`incident`),d(e))}}function De(){return typeof BigInt==`function`}var Oe=typeof Symbol==`function`&&typeof Symbol()==`symbol`;function ke(e,t,n=!1){return typeof Symbol==`function`&&typeof Symbol()==`symbol`?n&&Symbol.for&&e?Symbol.for(e):e==null?Symbol():Symbol(e):t}var Ae,je=ke(`jas`,void 0,!0),Me=ke(void 0,`0di`),Ne=ke(void 0,`1oa`),Pe=ke(void 0,Symbol()),Fe=ke(void 0,`0ub`),Ie=ke(void 0,`0ubs`),Le=ke(void 0,`0ubsb`),Re=ke(void 0,`0actk`),ze=ke(`m_m`,`lb`,!0),Be=ke(),Ve={Wa:{value:0,configurable:!0,writable:!0,enumerable:!1}},He=Object.defineProperties,f=Oe?je:`Wa`,Ue=[];function We(e,t){Oe||f in e||He(e,Ve),e[f]|=t}function p(e,t){Oe||f in e||He(e,Ve),e[f]=t}function Ge(e){return We(e,34),e}function Ke(e){return We(e,8192),e}p(Ue,7),Ae=Object.freeze(Ue);var qe={};function Je(e,t){return t===void 0?e.i!==Ye&&!!(2&e.B[f]):!!(2&t)&&e.i!==Ye}var Ye={};function Xe(e,t){if(e!=null){if(typeof e==`string`)e=e?new xe(e,_e):ve();else if(e.constructor!==xe){if(ge(e))e=e.length?new xe(new Uint8Array(e),_e):ve();else{if(!t)throw Error();e=void 0}}}return e}var Ze=class{constructor(e,t,n){this.h=e,this.i=t,this.l=n}next(){var e=this.h.next();return e.done||(e.value=this.i.call(this.l,e.value)),e}[Symbol.iterator](){return this}},Qe=Object.freeze({});function $e(e,t,n){var r,i=128&t?0:-1,a=e.length;(r=!!a)&&(r=(r=e[a-1])!=null&&typeof r==`object`&&r.constructor===Object);var o=a+(r?-1:0);for(t=128&t?1:0;t<o;t++)n(t-i,e[t]);if(r){e=e[a-1];for(let t in e)!isNaN(t)&&n(+t,e[t])}}var et={};function tt(e){return 128&e?et:void 0}function nt(e){return e.jb=!0,e}var rt=nt(e=>typeof e==`number`),it=nt(e=>typeof e==`string`),at=nt(e=>typeof e==`boolean`),ot=typeof e.BigInt==`function`&&typeof e.BigInt(0)==`bigint`;function m(e){var t=e;if(it(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(rt(t)&&!Number.isSafeInteger(t))throw Error(String(t));return ot?BigInt(e):e=at(e)?e?`1`:`0`:it(e)?e.trim()||`0`:String(e)}var st=nt(e=>ot?e>=lt&&e<=dt:e[0]===`-`?ft(e,ct):ft(e,ut)),ct=(-(2**53-1)).toString(),lt=ot?BigInt(-(2**53-1)):void 0,ut=(2**53-1).toString(),dt=ot?BigInt(2**53-1):void 0;function ft(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 pt,mt=typeof Uint8Array.prototype.slice==`function`,h=0,g=0;function ht(e){var t=e>>>0;h=t,g=(e-t)/4294967296>>>0}function gt(e){if(e<0){ht(-e);let[t,n]=Tt(h,g);h=t>>>0,g=n>>>0}else ht(e)}function _t(e){var t=pt||=/* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));t.setFloat32(0,+e,!0),g=0,h=t.getUint32(0,!0)}function vt(e,t){var n=4294967296*t+(e>>>0);return Number.isSafeInteger(n)?n:xt(e,t)}function yt(e,t){return m(De()?BigInt.asUintN(64,(BigInt(t>>>0)<<BigInt(32))+BigInt(e>>>0)):xt(e,t))}function bt(e,t){return De()?m(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(t))<<BigInt(32))+BigInt.asUintN(32,BigInt(e)))):m(Ct(e,t))}function xt(e,t){if(e>>>=0,(t>>>=0)<=2097151)var n=``+(4294967296*t+e);else De()?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+St(n)+St(e));return n}function St(e){return e=String(e),`0000000`.slice(e.length)+e}function Ct(e,t){if(2147483648&t){if(De())e=``+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{let[n,r]=Tt(e,t);e=`-`+xt(n,r)}}else e=xt(e,t);return e}function wt(e){if(e.length<16)gt(Number(e));else if(De())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)>=4294967296&&(g+=Math.trunc(h/4294967296),g>>>=0,h>>>=0)}if(t){let[e,t]=Tt(h,g);h=e,g=t}}}function Tt(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function Et(e){return Array.prototype.slice.call(e)}var Dt=typeof BigInt==`function`?BigInt.asIntN:void 0,Ot=typeof BigInt==`function`?BigInt.asUintN:void 0,kt=Number.isSafeInteger,At=Number.isFinite,jt=Math.trunc,Mt=m(0);function Nt(e){if(typeof e!=`number`)throw Error(`Value of float/double field must be a number, found ${typeof e}: ${e}`);return e}function Pt(e){return e==null||typeof e==`number`?e:e===`NaN`||e===`Infinity`||e===`-Infinity`?Number(e):void 0}function Ft(e){if(typeof e!=`boolean`){var t=typeof e;throw Error(`Expected boolean but got ${t==`object`?e?Array.isArray(e)?`array`:t:`null`:t}: ${e}`)}return e}var It=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Lt(e){switch(typeof e){case`bigint`:return!0;case`number`:return At(e);case`string`:return It.test(e);default:return!1}}function Rt(e){if(e!=null){if(!At(e))throw Te(`enum`);e|=0}return e}function zt(e){if(e==null)return e;if(typeof e==`string`&&e)e=+e;else if(typeof e!=`number`)return;return At(e)?0|e:void 0}function Bt(e){if(e==null)return e;if(typeof e==`string`&&e)e=+e;else if(typeof e!=`number`)return;return At(e)?e>>>0:void 0}function Vt(e,t){if(t??=1024,!Lt(e))throw Te(`int64`);var n=typeof e;switch(t){case 512:switch(n){case`string`:return qt(e);case`bigint`:return String(Dt(64,e));default:return Kt(e)}case 1024:switch(n){case`string`:return Jt(e);case`bigint`:return m(Dt(64,e));default:return Yt(e)}case 0:switch(n){case`string`:return qt(e);case`bigint`:return m(Dt(64,e));default:return Wt(e)}default:return function(e,t=`unexpected value ${e}!`){throw Error(t)}(t,`Unknown format requested type for int64`)}}function Ht(e){var t=e.length;return(e[0]===`-`?t<20||t===20&&e<=`-9223372036854775808`:t<19||t===19&&e<=`9223372036854775807`)?e:(wt(e),Ct(h,g))}function Ut(e){if(e[0]===`-`)var t=!1;else t=(t=e.length)<20||t===20&&e<=`18446744073709551615`;return t?e:(wt(e),xt(h,g))}function Wt(e){if(e=jt(e),!kt(e)){gt(e);var t=h,n=g;(e=2147483648&n)&&(n=~n>>>0,(t=1+~t>>>0)==0&&(n=n+1>>>0)),e=typeof(t=vt(t,n))==`number`?e?-t:t:e?`-`+t:t}return e}function Gt(e){return(e=jt(e))>=0&&kt(e)||(gt(e),e=vt(h,g)),e}function Kt(e){return e=jt(e),kt(e)?e=String(e):(gt(e),e=Ct(h,g)),e}function qt(e){var t=jt(Number(e));return kt(t)?String(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),Ht(e))}function Jt(e){var t=jt(Number(e));return kt(t)?m(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),De()?m(Dt(64,BigInt(e))):m(Ht(e)))}function Yt(e){return kt(e)?m(Wt(e)):m(Kt(e))}function Xt(e){var t=typeof e;return e==null?e:t===`bigint`?m(Dt(64,e)):Lt(e)?t===`string`?Jt(e):Yt(e):void 0}function Zt(e){if(e==null)return e;var t=typeof e;if(t===`bigint`)return String(Dt(64,e));if(Lt(e)){if(t===`string`)return qt(e);if(t===`number`)return Wt(e)}}function Qt(e){if(e==null||typeof e==`string`||e instanceof xe)return e}function $t(e){if(typeof e!=`string`)throw Error();return e}function en(e){if(e!=null&&typeof e!=`string`)throw Error();return e}function _(e){return e==null||typeof e==`string`?e:void 0}function tn(e,t,n,r){return e!=null&&e[ze]===qe?e:Array.isArray(e)?((r=(n=0|e[f])|32&r|2&r)!==n&&p(e,r),new t(e)):(n?2&r?((e=t[Me])||(Ge((e=new t).B),e=t[Me]=e),t=e):t=new t:t=void 0,t)}function nn(e,t,n){return(e=t?Vt(e,1024):Xt(e))??(n?Mt:void 0)}function rn(e){return e}var an={},on=function(){try{return ae(new class extends Map{constructor(){super()}}),!1}catch{return!0}}(),sn=class{constructor(){this.h=/* @__PURE__ */ new Map}get(e){return this.h.get(e)}set(e,t){return this.h.set(e,t),this.size=this.h.size,this}delete(e){return e=this.h.delete(e),this.size=this.h.size,e}clear(){this.h.clear(),this.size=this.h.size}has(e){return this.h.has(e)}entries(){return this.h.entries()}keys(){return this.h.keys()}values(){return this.h.values()}forEach(e,t){return this.h.forEach(e,t)}[Symbol.iterator](){return this.entries()}},cn=on?(Object.setPrototypeOf(sn.prototype,Map.prototype),Object.defineProperties(sn.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),sn):class extends Map{constructor(){super()}};function ln(e){return e}function un(e){if(2&e.N)throw Error(`Cannot mutate an immutable Map`)}var dn,fn=class extends cn{constructor(e,t,n=ln,r=ln){super(),this.N=0|e[f],this.O=t,this.ca=n,this.oa=this.O?pn:r;for(let i=0;i<e.length;i++){let a=e[i],o=n(a[0],!1,!0),s=a[1];t?s===void 0&&(s=null):s=r(a[1],!1,!0,void 0,void 0,this.N),super.set(o,s)}}fa(e){return Ke(Array.from(super.entries(),e))}clear(){un(this),super.clear()}delete(e){return un(this),super.delete(this.ca(e,!0,!1))}entries(){if(this.O){var e=super.keys();e=new Ze(e,mn,this)}else e=super.entries();return e}values(){if(this.O){var e=super.keys();e=new Ze(e,fn.prototype.get,this)}else e=super.values();return e}forEach(e,t){this.O?super.forEach((n,r,i)=>{e.call(t,i.get(r),r,i)}):super.forEach(e,t)}set(e,t){return un(this),(e=this.ca(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.oa(t,!0,!0,this.O,!1,this.N))}hb(e){var t=this.ca(e[0],!1,!0);e=e[1],e=this.O?e===void 0?null:e:this.oa(e,!1,!0,void 0,!1,this.N),super.set(t,e)}has(e){return super.has(this.ca(e,!1,!1))}get(e){e=this.ca(e,!1,!1);var t=super.get(e);if(t!==void 0){var n=this.O;return n?((n=this.oa(t,!1,!0,n,this.Ga,this.N))!==t&&super.set(e,n),n):t}}[Symbol.iterator](){return this.entries()}};function pn(e,t,n,r,i,a){return e=tn(e,r,n,a),i&&(e=Pn(e)),e}function mn(e){return[e,this.get(e)]}function hn(){return dn||=new fn(Ge([]),void 0,void 0,void 0,an)}function gn(e){return Pe?e[Pe]:void 0}function _n(e,t){for(let n in e)!isNaN(n)&&t(e,+n,e[n])}fn.prototype.toJSON=void 0;var vn,yn,bn=class{},xn={eb:!0};function Sn(e,t){t<100||Ee(Ie,1)}function Cn(e,t,n,r){var i=r!==void 0;r=!!r;var a,o=Pe;!i&&Oe&&o&&(a=e[o])&&_n(a,Sn),o=[];var s=e.length;a=4294967295;var c=!1,l=!!(64&t),u=l?128&t?0:-1:void 0;if(!(1&t)){var d=s&&e[s-1];typeof d==`object`&&d&&d.constructor===Object?a=--s:d=void 0,!l||128&t||i||(c=!0,a=rn(a-u,u,e,d,void 0)+u)}t=void 0;for(var ee=0;ee<s;ee++){let i=e[ee];if(i!=null&&(i=n(i,r))!=null){if(l&&ee>=a){let e=ee-u;(t??={})[e]=i}else o[ee]=i}}if(d)for(let e in d){if((s=d[e])==null||(s=n(s,r))==null)continue;let i;ee=+e,l&&!Number.isNaN(ee)&&(i=ee+u)<a?o[i]=s:(t??={})[e]=s}return t&&(c?o.push(t):o[a]=t),i&&Pe&&(e=gn(e))&&e instanceof bn&&(o[Pe]=function(e){var t=new bn;return _n(e,(e,n,r)=>{t[n]=Et(r)}),t.la=e.la,t}(e)),o}function wn(e){return e[0]=Tn(e[0]),e[1]=Tn(e[1]),e}function Tn(e){switch(typeof e){case`number`:return Number.isFinite(e)?e:``+e;case`bigint`:return st(e)?Number(e):``+e;case`boolean`:return+!!e;case`object`:if(Array.isArray(e)){var t=0|e[f];return e.length===0&&1&t?void 0:Cn(e,t,Tn)}if(e!=null&&e[ze]===qe)return En(e);if(e instanceof xe){if((t=e.h)==null)e=``;else if(typeof t==`string`)e=t;else{if(de){for(var n=``,r=0,i=t.length-10240;r<i;)n+=String.fromCharCode.apply(null,t.subarray(r,r+=10240));n+=String.fromCharCode.apply(null,r?t.subarray(r):t),t=btoa(n)}else{n===void 0&&(n=0),le(),n=oe[n],r=Array(Math.floor(t.length/3)),i=n[64]||``;let e=0,l=0;for(;e<t.length-2;e+=3){var a=t[e],o=t[e+1],s=t[e+2],c=n[a>>2];a=n[(3&a)<<4|o>>4],o=n[(15&o)<<2|s>>6],s=n[63&s],r[l++]=c+a+o+s}switch(c=0,s=i,t.length-e){case 2:s=n[(15&(c=t[e+1]))<<2]||i;case 1:t=t[e],r[l]=n[t>>2]+n[(3&t)<<4|c>>4]+s+i}t=r.join(``)}e=e.h=t}return e}return e instanceof fn?e=e.size===0?void 0:e.fa(wn):void 0}return e}function En(e){return Cn(e=e.B,0|e[f],Tn)}function Dn(e,t){return On(e,t[0],t[1])}function On(e,t,n,r=0){if(e==null){var i=32;n?(e=[n],i|=128):e=[],t&&(i=-16760833&i|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error(`narr`);if(i=0|e[f],te&&1&i)throw Error(`rfarr`);if(2048&i&&!(2&i)&&function(){if(te)throw Error(`carr`);Ee(Re,5)}(),256&i)throw Error(`farr`);if(64&i)return(i|r)!==i&&p(e,i|r),e;if(n&&(i|=128,n!==e[0]))throw Error(`mid`);t:{i|=64;var a=(n=e).length;if(a){var o=a-1;let e=n[o];if(typeof e==`object`&&e&&e.constructor===Object){if((o-=t=128&i?0:-1)>=1024)throw Error(`pvtlmt`);for(var s in e)(a=+s)<o&&(n[a+t]=e[s],delete e[s]);i=-16760833&i|(1023&o)<<14;break t}}if(t){if((s=Math.max(t,a-(128&i?0:-1)))>1024)throw Error(`spvt`);i=-16760833&i|(1023&s)<<14}}}return p(e,64|i|r),e}function kn(e,t){if(typeof e!=`object`)return e;if(Array.isArray(e)){var n=0|e[f];return e.length===0&&1&n?void 0:An(e,n,t)}if(e!=null&&e[ze]===qe)return Mn(e);if(e instanceof fn){if(2&(t=e.N))return e;if(!e.size)return;if(n=Ge(e.fa()),e.O)for(e=0;e<n.length;e++){let r=n[e],i=r[1];i=typeof i!=`object`||!i?void 0:i!=null&&i[ze]===qe?Mn(i):Array.isArray(i)?An(i,0|i[f],!!(32&t)):void 0,r[1]=i}return n}return e instanceof xe?e:void 0}function An(e,t,n){return 2&t||(!n||4096&t||16&t?e=Nn(e,t,!1,n&&!(16&t)):(We(e,34),4&t&&Object.freeze(e))),e}function jn(e,t,n){return e=new e.constructor(t),n&&(e.i=Ye),e.o=Ye,e}function Mn(e){var t=e.B,n=0|t[f];return Je(e,n)?e:Rn(e,t,n)?jn(e,t):Nn(t,n)}function Nn(e,t,n,r){return r??=!!(34&t),e=Cn(e,t,kn,r),r=32,n&&(r|=2),p(e,t=16769217&t|r),e}function Pn(e){var t=e.B,n=0|t[f];return Je(e,n)?Rn(e,t,n)?jn(e,t,!0):new e.constructor(Nn(t,n,!1)):e}function Fn(e){if(e.i!==Ye)return!1;var t=e.B;return We(t=Nn(t,0|t[f]),2048),e.B=t,e.i=void 0,e.o=void 0,!0}function In(e){if(!Fn(e)&&Je(e,0|e.B[f]))throw Error()}function Ln(e,t){t===void 0&&(t=0|e[f]),32&t&&!(4096&t)&&p(e,4096|t)}function Rn(e,t,n){return!!(2&n)||!(!(32&n)||4096&n)&&(p(t,2|n),e.i=Ye,!0)}var zn=m(0),Bn={};function v(e,t,n,r){if((t=Vn(e.B,t,void 0,r))!==null||n&&e.o!==Ye)return t}function Vn(e,t,n,r){if(t===-1)return null;var i=t+(n?0:-1),a=e.length-1;if(!(a<1+(n?0:-1))){if(i>=a){var o=e[a];if(typeof o==`object`&&o&&o.constructor===Object){n=o[t];var s=!0}else{if(i!==a)return;n=o}}else n=e[i];if(r&&n!=null){if((r=r(n))==null)return r;if(!Object.is(r,n))return s?o[t]=r:e[i]=r,r}return n}}function y(e,t,n,r){In(e);var i=e.B;return b(i,0|i[f],t,n,r),e}function b(e,t,n,r,i){var a=n+(i?0:-1),o=e.length-1;if(o>=1+(i?0:-1)&&a>=o){let i=e[o];if(typeof i==`object`&&i&&i.constructor===Object)return i[n]=r,t}return a<=o?(e[a]=r,t):(r!==void 0&&(n>=(o=(t??=0|e[f])>>14&1023||536870912)?r!=null&&(e[o+(i?0:-1)]={[n]:r}):e[a]=r),t)}function Hn(e,t,n,r){var i=e.B;return ir(i,0|i[f],t,e=$n(e,r)===n?n:-1)!==void 0}function Un(){return Qe===void 0?2:4}function Wn(e,t,n,r,i){var a=e.B,o=0|a[f];r=Je(e,o)?1:r,i=!!i||r===3,r===2&&Fn(e)&&(o=0|(a=e.B)[f]);var s=(e=Kn(a,t))===Ae?7:0|e[f],c=qn(s,o),l=!(4&c);if(l){4&c&&(e=Et(e),s=0,c=ur(c,o),o=b(a,o,t,e));let r=0,i=0;for(;r<e.length;r++){let t=n(e[r]);t!=null&&(e[i++]=t)}i<r&&(e.length=i),n=-513&c|4,c=n&=-1025,c&=-4097}return c!==s&&(p(e,c),2&c&&Object.freeze(e)),Gn(e,c,a,o,t,r,l,i)}function Gn(e,t,n,r,i,a,o,s){var c=t;return a===1||a===4&&(2&t||!(16&t)&&32&r)?Jn(t)||((t|=!e.length||o&&!(4096&t)||32&r&&!(4096&t||16&t)?2:256)!==c&&p(e,t),Object.freeze(e)):(a===2&&Jn(t)&&(e=Et(e),c=0,t=ur(t,r),r=b(n,r,i,e)),Jn(t)||(s||(t|=16),t!==c&&p(e,t))),2&t||!(4096&t||16&t)||Ln(n,r),e}function Kn(e,t,n){return e=Vn(e,t,n),Array.isArray(e)?e:Ae}function qn(e,t){return 2&t&&(e|=2),1|e}function Jn(e){return!!(2&e)&&!!(4&e)||!!(256&e)}function Yn(e){return Xe(e,!0)}function Xn(e){e=Et(e);for(let t=0;t<e.length;t++){let n=e[t]=Et(e[t]);Array.isArray(n[1])&&(n[1]=Ge(n[1]))}return Ke(e)}function Zn(e,t,n,r){In(e),b(e=e.B,0|e[f],t,(r===`0`?Number(n)===0:n===r)?void 0:n)}function Qn(e,t,n){if(2&t)throw Error();var r=tt(t),i=Kn(e,n,r),a=i===Ae?7:0|i[f],o=qn(a,t);return(2&o||Jn(o)||16&o)&&(o===a||Jn(o)||p(i,o),i=Et(i),a=0,o=ur(o,t),b(e,t,n,i,r)),(o&=-13)!==a&&p(i,o),i}function $n(e,t){return nr(er(e=e.B),e,void 0,t)}function er(e){if(Oe)return e[Ne]??(e[Ne]=/* @__PURE__ */ new Map);if(Ne in e)return e[Ne];var t=/* @__PURE__ */ new Map;return Object.defineProperty(e,Ne,{value:t}),t}function tr(e,t,n,r,i){var a=er(e),o=nr(a,e,t,n,i);return o!==r&&(o&&(t=b(e,t,o,void 0,i)),a.set(n,r)),t}function nr(e,t,n,r,i){var a=e.get(r);if(a!=null)return a;a=0;for(let e=0;e<r.length;e++){let o=r[e];Vn(t,o,i)!=null&&(a!==0&&(n=b(t,n,a,void 0,i)),a=o)}return e.set(r,a),a}function rr(e,t,n){var r=0|e[f],i=tt(r),a=Vn(e,n,i);if(a!=null&&a[ze]===qe){if(!Je(a))return Fn(a),a.B;var o=a.B}else Array.isArray(a)&&(o=a);if(o){let e=0|o[f];2&e&&(o=Nn(o,e))}return(o=Dn(o,t))!==a&&b(e,r,n,o,i),o}function ir(e,t,n,r,i){var a=!1;if((r=Vn(e,r,i,e=>{var r=tn(e,n,!1,t);return a=r!==e&&r!=null,r}))!=null)return a&&!Je(r)&&Ln(e,t),r}function x(e,t,n,r){var i=e.B,a=0|i[f];if((t=ir(i,a,t,n,r))==null)return t;if(!Je(e,a=0|i[f])){let o=Pn(t);o!==t&&(Fn(e)&&(a=0|(i=e.B)[f]),Ln(i,a=b(i,a,n,t=o,r)))}return t}function ar(e,t,n,r,i,a,o,s){var c=Je(e,n);a=c?1:a,o=!!o||a===3,c=s&&!c,(a===2||c)&&Fn(e)&&(n=0|(t=e.B)[f]);var l=(e=Kn(t,i))===Ae?7:0|e[f],u=qn(l,n);if(s=!(4&u)){var d=e,ee=n;let t=!!(2&u);t&&(ee|=2);let i=!t,a=!0,o=0,s=0;for(;o<d.length;o++){let e=tn(d[o],r,!1,ee);if(e instanceof r){if(!t){let t=Je(e);i&&=!t,a&&=t}d[s++]=e}}s<o&&(d.length=s),u|=4,u=a?-4097&u:4096|u,u=i?8|u:-9&u}if(u!==l&&(p(e,u),2&u&&Object.freeze(e)),c&&!(8&u||!e.length&&(a===1||a===4&&(2&u||!(16&u)&&32&n)))){for(Jn(u)&&(e=Et(e),u=ur(u,n),n=b(t,n,i,e)),r=e,c=u,l=0;l<r.length;l++)(d=r[l])!==(u=Pn(d))&&(r[l]=u);c|=8,p(e,u=c=r.length?4096|c:-4097&c)}return Gn(e,u,t,n,i,a,s,o)}function or(e,t,n){var r=e.B;return ar(e,r,0|r[f],t,n,Un(),!1,!0)}function sr(e){return e??=void 0,e}function S(e,t,n,r,i){return y(e,n,r=sr(r),i),r&&!Je(r)&&Ln(e.B),e}function cr(e,t,n,r){t:{var i=r=sr(r);In(e);let a=e.B,o=0|a[f];if(i==null){let e=er(a);if(nr(e,a,o,n)!==t)break t;e.set(n,0)}else o=tr(a,o,n,t);b(a,o,t,i)}return r&&!Je(r)&&Ln(e.B),e}function lr(e,t,n){In(e);var r=e.B,i=0|r[f];if(n==null)return b(r,i,t),e;var a=n===Ae?7:0|n[f],o=a,s=Jn(a),c=s||Object.isFrozen(n),l=!0,u=!0;for(let e=0;e<n.length;e++){var d=n[e];s||(d=Je(d),l&&=!d,u&&=d)}return s||(a=l?13:5,a=u?-4097&a:4096|a),c&&a===o||(n=Et(n),o=0,a=ur(a,i)),a!==o&&p(n,a),i=b(r,i,t,n),2&a||!(4096&a||16&a)||Ln(r,i),e}function ur(e,t){return-273&(2&t?2|e:-3&e)}function dr(e,t,n,r){var i=r;In(e),e=ar(e,r=e.B,0|r[f],n,t,2,!0),i??=new n,e.push(i),t=n=e===Ae?7:0|e[f],(i=Je(i))?(n&=-9,e.length===1&&(n&=-4097)):n|=4096,n!==t&&p(e,n),i||Ln(r)}function fr(e,t,n){return zt(v(e,t,n))}function C(e,t){return v(e,t,void 0,Pt)??0}function pr(e,t,n,r){return x(e,t,n=$n(e,r)===n?n:-1,void 0)}function mr(e,t){Zn(e,3,t==null?t:Ft(t),!1)}function hr(e,t,n){if(n!=null){if(typeof n!=`number`||!At(n))throw Te(`int32`);n|=0}y(e,t,n)}function gr(e,t,n){return y(e,t,n==null?n:Vt(n))}function _r(e,t,n){return y(e,t,n==null?n:function(e){if(!Lt(e))throw Te(`uint64`);switch(typeof e){case`string`:var t=jt(Number(e));return kt(t)&&t>=0?e=m(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),e=De()?m(Ot(64,BigInt(e))):m(Ut(e))),e;case`bigint`:return m(Ot(64,e));default:return kt(e)?e=m(Gt(e)):((e=jt(e))>=0&&kt(e)?e=String(e):(gt(e),e=xt(h,g)),e=m(e)),e}}(n))}function w(e,t,n){y(e,t,n==null?n:Nt(n))}function vr(e,t,n){Zn(e,t,n==null?n:Nt(n),0)}function yr(e,t,n){Zn(e,t,en(n),``)}function br(e,t,n){{In(e);let o=e.B,s=0|o[f];if(n==null)b(o,s,t);else{var r=e=n===Ae?7:0|n[f],i=Jn(e),a=i||Object.isFrozen(n);for(i||(e=0),a||=(n=Et(n),r=0,e=ur(e,s),!1),e|=5,e|=(4&e?512&e?512:1024&e?1024:0:void 0)??1024,i=0;i<n.length;i++){let t=n[i],o=$t(t);Object.is(t,o)||(a&&=(n=Et(n),r=0,e=ur(e,s),!1),n[i]=o)}e!==r&&(a&&(n=Et(n),e=ur(e,s)),p(n,e)),b(o,s,t,n)}}}function xr(e,t,n){In(e),Wn(e,t,_,2,!0).push($t(n))}var Sr=class{constructor(e,t,n){if(this.buffer=e,n&&!t)throw Error();this.h=t}};function Cr(e,t){if(typeof e==`string`)return new Sr(he(e),t);if(Array.isArray(e))return new Sr(new Uint8Array(e),t);if(e.constructor===Uint8Array)return new Sr(e,!1);if(e.constructor===ArrayBuffer)return e=new Uint8Array(e),new Sr(e,!1);if(e.constructor===xe)return t=ye(e)||/* @__PURE__ */ new Uint8Array,new Sr(t,!0,e);if(e instanceof Uint8Array)return e=e.constructor===Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Sr(e,!1);throw Error()}function wr(e,t){var n=0,r=0,i=0,a=e.i,o=e.h;do{var s=a[o++];n|=(127&s)<<i,i+=7}while(i<32&&128&s);if(i>32)for(r|=(127&s)>>4,i=3;i<32&&128&s;i+=7)r|=(127&(s=a[o++]))<<i;if(Mr(e,o),!(128&s))return t(n>>>0,r>>>0);throw Error()}function Tr(e){for(var t=0,n=e.h,r=n+10,i=e.i;n<r;){let r=i[n++];if(t|=r,!(128&r))return Mr(e,n),!!(127&t)}throw Error()}function Er(e){var t=e.i,n=e.h,r=t[n++],i=127&r;if(128&r&&(i|=(127&(r=t[n++]))<<7,128&r&&(i|=(127&(r=t[n++]))<<14,128&r&&(i|=(127&(r=t[n++]))<<21,128&r&&(i|=(r=t[n++])<<28,128&r&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++])))))throw Error();return Mr(e,n),i}function Dr(e){return Er(e)>>>0}function Or(e){return wr(e,bt)}function kr(e){var t=e.i,n=e.h,r=t[n],i=t[n+1],a=t[n+2];return t=t[n+3],Mr(e,e.h+4),(r|i<<8|a<<16|t<<24)>>>0}function Ar(e){var t=kr(e);e=2*(t>>31)+1;var n=t>>>23&255;return t&=8388607,n==255?t?NaN:1/0*e:n==0?1401298464324817e-60*e*t:e*2**(n-150)*(t+8388608)}function jr(e){return Er(e)}function Mr(e,t){if(e.h=t,t>e.l)throw Error()}function Nr(e,t){if(t<0)throw Error();var n=e.h;if((t=n+t)>e.l)throw Error();return e.h=t,n}function Pr(e,t){if(t==0)return ve();var n=Nr(e,t);return e.ga&&e.u?n=e.i.subarray(n,n+t):(e=e.i,n=n===(t=n+t)?/* @__PURE__ */ new Uint8Array:mt?e.slice(n,t):new Uint8Array(e.subarray(n,t))),n.length==0?ve():new xe(n,_e)}var Fr=class{constructor(e,t,n,r){this.i=null,this.u=!1,this.h=this.l=this.o=0,this.init(e,t,n,r)}init(e,t,n,{ga:r=!1,na:i=!1}={}){this.ga=r,this.na=i,e&&(e=Cr(e,this.na),this.i=e.buffer,this.u=e.h,this.o=t||0,this.l=n===void 0?this.i.length:this.o+n,this.h=this.o)}clear(){this.i=null,this.u=!1,this.h=this.l=this.o=0,this.ga=!1}},Ir=[],Lr=0;function Rr(e,t,n,r){if(Jr.length){let i=Jr.pop();return i.A(r),i.h.init(e,t,n,r),i}return new qr(e,t,n,r)}function zr(e){e.h.clear(),e.l=-1,e.i=-1,Jr.length<100&&Jr.push(e)}function Br(e){var t=e.h;if(t.h==t.l)return!1;e.o=e.h.h;var n=Dr(e.h);if(t=n>>>3,!((n&=7)>=0&&n<=5)||t<1)throw Error();return e.l=t,e.i=n,!0}function Vr(e){try{switch(e.i){case 0:e.i==0?Tr(e.h):Vr(e);break;case 1:var t=e.h;Mr(t,t.h+8);break;case 2:if(e.i!=2)Vr(e);else{var n=Dr(e.h),r=e.h;Mr(r,r.h+n)}break;case 5:var i=e.h;Mr(i,i.h+4);break;case 3:Hr();let a=e.l;try{for(;;){if(!Br(e))throw Error();if(e.i==4){if(e.l!=a)throw Error();break}Vr(e)}}catch(e){throw e instanceof RangeError?SyntaxError():e}finally{Lr>0&&Lr--}break;default:throw Error()}}catch(e){throw e instanceof RangeError?SyntaxError():e}}function Hr(){if(Lr>=100)throw SyntaxError();Lr++}function Ur(e,t,n){var r=e.h.l,i=Dr(e.h),a=(i=e.h.h+i)-r;if(a<=0&&(e.h.l=i,n(t,e,void 0,void 0,void 0),a=i-e.h.h),a)throw Error();return e.h.h=i,e.h.l=r,t}function Wr(e){var t=Dr(e.h),n=Nr(e=e.h,t);if(e=e.i,c){var o,l=e;(o=a)||(o=a=new TextDecoder(`utf-8`,{fatal:!0})),t=n+t,l=n===0&&t===l.length?l:l.subarray(n,t);try{var u=o.decode(l)}catch(e){if(s===void 0){try{o.decode(new Uint8Array([128]))}catch{}try{o.decode(new Uint8Array([97])),s=!0}catch{s=!1}}throw!s&&(a=void 0),e}}else{t=(u=n)+t,n=[];let a,s=null;for(;u<t;){var d=e[u++];d<128?n.push(d):d<224?u>=t?r():(a=e[u++],d<194||(192&a)!=128?(u--,r()):n.push((31&d)<<6|63&a)):d<240?u>=t-1?r():(a=e[u++],(192&a)!=128||d===224&&a<160||d===237&&a>=160||(192&(o=e[u++]))!=128?(u--,r()):n.push((15&d)<<12|(63&a)<<6|63&o)):d<=244?u>=t-2?r():(a=e[u++],(192&a)!=128||a-144+(d<<28)>>30||(192&(o=e[u++]))!=128||(192&(l=e[u++]))!=128?(u--,r()):(d=(7&d)<<18|(63&a)<<12|(63&o)<<6|63&l,d-=65536,n.push(55296+(d>>10&1023),56320+(1023&d)))):r(),n.length>=8192&&(s=i(s,n),n.length=0)}u=i(s,n)}return u}function Gr(e){var t=Dr(e.h);return Pr(e.h,t)}function Kr(e,t,n){var r=Dr(e.h);for(r=e.h.h+r;e.h.h<r;)n.push(t(e.h))}var qr=class{constructor(e,t,n,r){if(Ir.length){let i=Ir.pop();i.init(e,t,n,r),e=i}else e=new Fr(e,t,n,r);this.h=e,this.o=this.h.h,this.i=this.l=-1,this.A(r)}A({sa:e=!1}={}){this.sa=e}},Jr=[];function Yr(e){return new Qr(0|e,Math.floor(e/4294967296))}function Xr(e){return e?/^\d+$/.test(e)?(wt(e),new Qr(h,g)):null:Zr||=new Qr(0,0)}var Zr,Qr=class{constructor(e,t){this.i=e>>>0,this.h=t>>>0}};function $r(e){return new li(0|e,Math.floor(e/4294967296))}function ei(e){return e?/^-?\d+$/.test(e)?(wt(e),new li(h,g)):null:ti||=new li(0,0)}var ti,ni,ri,ii,ai,oi,si,ci,li=class{constructor(e,t){this.i=e>>>0,this.h=t>>>0}};function ui(e,t,n){return typeof BigInt64Array<`u`?(si||(si=/* @__PURE__ */ new BigInt64Array(1),ci=new Uint32Array(si.buffer),si[0]=BigInt(1),oi=ci[0]===1),si[0]=e,new t(ci[e=+!oi],ci[1-e])):(ai||=(ni=BigInt(-(2**53-1)),ri=BigInt(2**53-1),ii=BigInt(4294967295),BigInt(32)),e>=ni&&e<=ri?n(Number(e)):(e=BigInt.asUintN(64,e),new t(Number(e&ii),Number(e>>ai))))}function di(e,t,n){for(;n>0||t>127;)e.h.push(127&t|128),t=(t>>>7|n<<25)>>>0,n>>>=7;e.h.push(t)}function fi(e,t){for(;t>127;)e.h.push(127&t|128),t>>>=7;e.h.push(t)}function pi(e,t){if(t>=0)fi(e,t);else{for(let n=0;n<9;n++)e.h.push(127&t|128),t>>=7;e.h.push(1)}}function mi(e,t){wt(t),function(e){var t=g>>31;e(h<<1^t,(g<<1|h>>>31)^t)}((t,n)=>{di(e,t>>>0,n>>>0)})}function hi(e,t){e.h.push(t>>>0&255),e.h.push(t>>>8&255),e.h.push(t>>>16&255),e.h.push(t>>>24&255)}var gi=class{constructor(){this.h=[]}length(){return this.h.length}end(){var e=this.h;return this.h=[],e}};function _i(e,t){t.length!==0&&(e.l.push(t),e.i+=t.length)}function T(e,t,n){fi(e.h,8*t+n)}function vi(e,t){return T(e,t,2),t=e.h.end(),_i(e,t),t.push(e.i),t}function yi(e,t){var n=t.pop();for(n=e.i+e.h.length()-n;n>127;)t.push(127&n|128),n>>>=7,e.i++;t.push(n),e.i++}function bi(e,t,n){if(n!=null)switch(T(e,t,0),typeof n){case`number`:e=e.h,gt(n),di(e,h,g);break;case`bigint`:n=ui(n,li,$r),di(e.h,n.i,n.h);break;default:n=ei(n),di(e.h,n.i,n.h)}}function xi(e,t,n){T(e,t,2),fi(e.h,n.length),_i(e,e.h.end()),_i(e,n)}function Si(e,t,n,r){n!=null&&(t=vi(e,t),r(n,e),yi(e,t))}var Ci=class{constructor(){this.l=[],this.i=0,this.h=new gi}};function wi(e){typeof e==`string`&&ei(e)}function Ti(){var e=class{constructor(){throw Error()}};return Object.setPrototypeOf(e,e.prototype),e}var Ei=Ti(),Di=Ti(),Oi=Ti(),ki=Ti(),Ai=Ti(),ji=Ti(),Mi=Ti(),Ni=Ti(),Pi=Ti(),Fi=Ti(),Ii=Ti(),Li=Ti();function Ri(e,t,n){var r=e.B;Pe&&Pe in r&&(r=r[Pe])&&delete r[t.h],t.i?t.u(e,t.i,t.h,n,t.l):t.u(e,t.h,n,t.l)}var E=class{constructor(e,t){this.B=On(e,t,void 0,2048)}toJSON(){return En(this)}u(){var e=Us,t=this.B,n=e.h,r=Pe;if(Oe&&r&&t[r]?.[n]!=null&&Ee(Fe,3),t=e.h,Be&&Pe&&Be===void 0&&(r=(n=this.B)[Pe])&&(r=r.la))try{r(n,t,xn)}catch(e){d(e)}return e.i?e.o(this,e.i,e.h,e.l):e.o(this,e.h,e.defaultValue,e.l)}clone(){var e=this.B,t=0|e[f];return Rn(this,e,t)?jn(this,e,!0):new this.constructor(Nn(e,t,!1))}};E.prototype[ze]=qe,E.prototype.toString=function(){return this.B.toString()};var zi=class{constructor(e,t,n){this.h=e,this.i=t,e=Ei,this.l=!!e&&n===e||!1}};function Bi(e,t){return new zi(e,t,Ei)}function Vi(e,t,n,r,i){Si(e,n,$i(t,r),i)}var Hi,Ui,Wi=Bi(function(e,t,n,r,i){return e.i===2&&(Ur(e,rr(t,r,n),i),!0)},Vi),Gi=Bi(function(e,t,n,r,i){return e.i===2&&(Ur(e,rr(t,r,n),i),!0)},Vi),Ki=Symbol(),qi=Symbol(),Ji=Symbol(),Yi=Symbol(),Xi=Symbol();function Zi(e,t,n,r){var i=r[e];if(i)return i;(i={}).Fa=r,i.da=function(e){switch(typeof e){case`boolean`:return vn||=[0,void 0,!0];case`number`:return e>0?void 0:e===0?yn||=[0,void 0]:[-e,void 0];case`string`:return[0,e];case`object`:return e}}(r[0]);var a=r[1],o=1;a&&a.constructor===Object&&(i.ja=a,typeof(a=r[++o])==`function`&&(i.xa=!0,Hi??=a,Ui??=r[o+1],a=r[o+=2]));for(var s={};a&&Array.isArray(a)&&a.length&&typeof a[0]==`number`&&a[0]>0;){for(var c=0;c<a.length;c++)s[a[c]]=a;a=r[++o]}for(c=1;a!==void 0;){let e;typeof a==`number`&&(c+=a,a=r[++o]);var l=void 0;if(a instanceof zi?e=a:(e=Wi,o--),e?.l){a=r[++o],l=r;var u=o;typeof a==`function`&&(a=a(),l[u]=a),l=a}for(u=c+1,typeof(a=r[++o])==`number`&&a<0&&(u-=a,a=r[++o]);c<u;c++){let r=s[c];l?n(i,c,e,l,r):t(i,c,e,r)}}return r[e]=i}function Qi(e){return Array.isArray(e)?e[0]instanceof zi?e:[Gi,e]:[e,void 0]}function $i(e,t){return e instanceof E?e.B:Array.isArray(e)?Dn(e,t):void 0}function ea(e,t,n,r){var i=n.h;e[t]=r?(e,t,n)=>i(e,t,n,r):i}function ta(e,t,n,r,i){var a,o,s=n.h;e[t]=(e,t,n)=>s(e,t,n,o||=Zi(qi,ea,ta,r).da,a||=na(r),i)}function na(e){var t=e[Ji];if(t!=null)return t;var n=Zi(qi,ea,ta,e);return t=n.xa?(e,t)=>Hi(e,t,n):(e,t)=>{t:{Hr();try{for(;Br(t)&&t.i!=4;){let c=t.l,l=n[c];if(l==null){let e=n.ja;if(e){let t=e[c];if(t){let e=ia(t);e!=null&&(l=n[c]=e)}}}if(l==null||!l(t,e,c)){var r=t;let n=r.o;if(Vr(r),r.sa)var i=void 0;else{let e=r.h.h-n;r.h.h=n,i=Pr(r.h,e)}r=void 0;var a=e,o=c,s=i;s&&((r=a[Pe]??(a[Pe]=new bn))[o]??(r[o]=[])).push(s)}}let l=gn(e);l&&(l.la=n.Fa[Xi]);var c=!0;break t}catch(e){throw e instanceof RangeError?SyntaxError():e}finally{Lr>0&&Lr--}}return c},e[Ji]=t,e[Xi]=ra.bind(e),t}function ra(e,t,n,r){var i=this[qi],a=this[Ji],o=Dn(void 0,i.da),s=gn(e);if(s){var c=!1,l=i.ja;if(l){if(i=(t,n,i)=>{if(i.length!==0){if(l[n])for(let e of i){t=Rr(e);try{c=!0,a(o,t)}finally{zr(t)}}else r?.(e,n,i)}},t==null)_n(s,i);else if(s!=null){let e=s[t];e&&i(s,t,e)}if(c){let r=0|e[f];if(2&r&&2048&r&&!n?.eb)throw Error();let i=tt(r),a=(t,a)=>{if(Vn(e,t,i)!=null){if(n?.mb===1)return;throw Error()}a!=null&&(r=b(e,r,t,a,i)),delete s[t]};t==null?$e(o,0|o[f],(e,t)=>{a(e,t)}):a(t,Vn(o,t,i))}}}}function ia(e){var t=(e=Qi(e))[0].h;if(e=e[1]){let n=na(e),r=Zi(qi,ea,ta,e).da;return(e,i,a)=>t(e,i,a,r,n)}return t}function aa(e,t,n){e[t]=n.i}function oa(e,t,n,r){var i,a,o=n.i;e[t]=(e,t,n)=>o(e,t,n,a||=Zi(Ki,aa,oa,r).da,i||=sa(r))}function sa(e){var t=e[Yi];if(!t){let n=Zi(Ki,aa,oa,e);t=(e,t)=>ca(e,t,n),e[Yi]=t}return t}function ca(e,t,n){$e(e,0|e[f],(e,r)=>{if(r!=null){var i=function(e,t){var n=e[t];if(n)return n;if((n=e.ja)&&(n=n[t])){var r=(n=Qi(n))[0].i;if(n=n[1]){let t=sa(n),i=Zi(Ki,aa,oa,n).da;n=e.xa?Ui(i,t):(e,n,a)=>r(e,n,a,i,t)}else n=r;return e[t]=n}}(n,e);i?i(t,r,e):e<500||Ee(Le,3)}}),(e=gn(e))&&_n(e,(e,n,r)=>{for(_i(t,t.h.end()),e=0;e<r.length;e++)_i(t,ye(r[e])||/* @__PURE__ */ new Uint8Array)})}var la=m(0);function ua(e,t,n){if(Array.isArray(t)){var r=0|t[f];if(4&r)return t;for(var i=0,a=0;i<t.length;i++){let n=e(t[i]);n!=null&&(t[a++]=n)}return a<i&&(t.length=a),e=1|r,n&&(e=-1537&e|4),e!==r&&p(t,e),n&&2&e&&Object.freeze(t),t}}var da=(e,t)=>{var n=new Ci;ca(e.B,n,Zi(Ki,aa,oa,t)),_i(n,n.h.end()),e=new Uint8Array(n.i);var r=(t=n.l).length,i=0;for(let n=0;n<r;n++){let r=t[n];e.set(r,i),i+=r.length}return n.l=[e],e};function D(e,t,n){return new zi(e,t,n)}function fa(e,t,n){return new zi(e,t,n)}function O(e,t,n){b(e,0|e[f],t,n,tt(0|e[f]))}var pa=Bi(function(e,t,n,r,i){if(e.i!==2)return!1;if(e=Et(e=Ur(e,Dn([void 0,void 0],r),i)),i=tt(r=0|t[f]),2&r)throw Error();var a=Vn(t,n,i);if(a instanceof fn)2&a.N?((a=a.fa()).push(e),b(t,r,n,a,i)):a.hb(e);else if(Array.isArray(a)){var o=0|a[f];8192&o||p(a,o|=8192),2&o&&b(t,r,n,a=Xn(a),i),a.push(e)}else b(t,r,n,Ke([e]),i);return!0},function(e,t,n,r,i){if(t instanceof fn)t.forEach((t,a)=>{Si(e,n,Dn([a,t],r),i)});else if(Array.isArray(t)){for(let a=0;a<t.length;a++){let o=t[a];Array.isArray(o)&&Si(e,n,Dn(o,r),i)}Ke(t)}});function ma(e,t,n){(t=Pt(t))!=null&&(T(e,n,5),e=e.h,_t(t),hi(e,h))}function ha(e,t,n){(t=Zt(t))!=null&&(wi(t),bi(e,n,t))}function ga(e,t,n){(t=zt(t))!=null&&t!=null&&(T(e,n,0),pi(e.h,t))}function _a(e,t,n){(t=t==null||typeof t==`boolean`?t:typeof t==`number`?!!t:void 0)!=null&&(T(e,n,0),e.h.h.push(+!!t))}function va(e,t,n){(t=_(t))!=null&&xi(e,n,u(t))}function ya(e,t,n,r,i){Si(e,n,$i(t,r),i)}function ba(e,t,n){(t=Qt(t))!=null&&xi(e,n,Cr(t,!0).buffer)}function xa(e,t,n){(t=Bt(t))!=null&&t!=null&&(T(e,n,0),fi(e.h,t))}function Sa(e,t,n){(t=zt(t))!=null&&(t=parseInt(t,10),T(e,n,0),pi(e.h,t))}function Ca(e,t,n){return(e.i===5||e.i===2)&&(t=Qn(t,0|t[f],n),e.i==2?Kr(e,Ar,t):t.push(Ar(e.h)),!0)}function wa(e,t,n){return e.i===0&&(O(t,n,Or(e.h)),!0)}function Ta(e,t,n){return(e.i===0||e.i===2)&&(t=Qn(t,0|t[f],n),e.i==2?Kr(e,Er,t):t.push(Er(e.h)),!0)}function Ea(e,t,n){return e.i===2&&(O(t,n,(e=Gr(e))===ve()?void 0:e),!0)}var Da=D(function(e,t,n){if(e.i!==1)return!1;var r=e.h;e=kr(r);var i=kr(r);r=2*(i>>31)+1;var a=i>>>20&2047;return e=4294967296*(1048575&i)+e,O(t,n,a==2047?e?NaN:1/0*r:a==0?5e-324*r*e:r*2**(a-1075)*(e+4503599627370496)),!0},function(e,t,n){(t=Pt(t))!=null&&(T(e,n,1),e=e.h,(n=pt||=/* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8))).setFloat64(0,+t,!0),h=n.getUint32(0,!0),g=n.getUint32(4,!0),hi(e,h),hi(e,g))},Fi),k=D(function(e,t,n){return e.i===5&&(O(t,n,Ar(e.h)),!0)},ma,Pi),Oa=fa(Ca,function(e,t,n){if((t=ua(Pt,t,!0))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&(T(r,i,5),r=r.h,_t(a),hi(r,h))}},Pi),ka=fa(Ca,function(e,t,n){if((t=ua(Pt,t,!0))!=null&&t.length){T(e,n,2),fi(e.h,4*t.length);for(let r=0;r<t.length;r++)n=e.h,_t(t[r]),hi(n,h)}},Pi),Aa=D(function(e,t,n){return e.i===5&&(O(t,n,(e=Ar(e.h))===0?void 0:e),!0)},ma,Pi),ja=D(function(e,t,n){return wa(e,t,n)},ha,ji),A=D(function(e,t,n){return wa(e,t,n)},ha,ji),Ma=fa(function(e,t,n){return e.i!==0&&e.i!==2?e=!1:(t=Qn(t,0|t[f],n),e.i==2?Kr(e,Or,t):t.push(Or(e.h)),e=!0),e},function(e,t,n){if((t=ua(Zt,t,!1))!=null)for(let r=0;r<t.length;r++)bi(e,n,t[r])},ji),Na=D(function(e,t,n){return e.i===0?(O(t,n,(e=Or(e.h))===la?void 0:e),t=!0):t=!1,t},ha,ji),Pa=D(function(e,t,n){return e.i===0?(O(t,n,wr(e.h,yt)),e=!0):e=!1,e},function(e,t,n){if(t=function(e){if(e==null)return e;var t=typeof e;if(t===`bigint`)return String(Ot(64,e));if(Lt(e)){if(t===`string`)return t=jt(Number(e)),kt(t)&&t>=0?e=String(t):((t=e.indexOf(`.`))!==-1&&(e=e.substring(0,t)),e=Ut(e)),e;if(t===`number`)return Gt(e)}}(t),t!=null&&(typeof t==`string`&&Xr(t),t!=null))switch(T(e,n,0),typeof t){case`number`:e=e.h,gt(t),di(e,h,g);break;case`bigint`:n=ui(t,Qr,Yr),di(e.h,n.i,n.h);break;default:n=Xr(t),di(e.h,n.i,n.h)}},Mi),j=D(function(e,t,n){return e.i===0&&(O(t,n,Er(e.h)),!0)},ga,ki),Fa=fa(Ta,function(e,t,n){if((t=ua(zt,t,!0))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&(T(r,i,0),pi(r.h,a))}},ki),Ia=fa(Ta,function(e,t,n){if((t=ua(zt,t,!0))!=null&&t.length){n=vi(e,n);for(let n=0;n<t.length;n++)pi(e.h,t[n]);yi(e,n)}},ki),La=D(function(e,t,n){return e.i===0&&(O(t,n,(e=Er(e.h))===0?void 0:e),!0)},ga,ki),M=D(function(e,t,n){return e.i===0&&(O(t,n,Tr(e.h)),!0)},_a,Di),Ra=D(function(e,t,n){return e.i===0&&(O(t,n,!1===(e=Tr(e.h))?void 0:e),!0)},_a,Di),N=fa(function(e,t,n){return e.i===2&&(e=Wr(e),Qn(t,0|t[f],n).push(e),!0)},function(e,t,n){if((t=ua(_,t,!0))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&xi(r,i,u(a))}},Oi),za=D(function(e,t,n){return e.i===2&&(O(t,n,(e=Wr(e))===``?void 0:e),!0)},va,Oi),P=D(function(e,t,n){return e.i===2&&(O(t,n,Wr(e)),!0)},va,Oi),F=function(e,t,n=Ei){return new zi(e,t,n)}(function(e,t,n,r,i){return e.i===2&&(r=Dn(void 0,r),Qn(t,0|t[f],n).push(r),Ur(e,r,i),!0)},function(e,t,n,r,i){if(Array.isArray(t)){for(let a=0;a<t.length;a++)ya(e,t[a],n,r,i);1&(e=0|t[f])||p(t,1|e)}}),I=Bi(function(e,t,n,r,i,a){if(e.i!==2)return!1;var o=0|t[f];return tr(t,o,a,n,tt(o)),Ur(e,t=rr(t,r,n),i),!0},ya),Ba=D(function(e,t,n){return e.i===2&&(O(t,n,Gr(e)),!0)},ba,Ii),Va=fa(function(e,t,n){return e.i===2&&(e=Gr(e),Qn(t,0|t[f],n).push(e),!0)},function(e,t,n){if((t=ua(Qt,t,!1))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&xi(r,i,Cr(a,!0).buffer)}},Ii),Ha=D(function(e,t,n){return e.i===0&&(O(t,n,Dr(e.h)),!0)},xa,Ai),Ua=fa(function(e,t,n){return(e.i===0||e.i===2)&&(t=Qn(t,0|t[f],n),e.i==2?Kr(e,Dr,t):t.push(Dr(e.h)),!0)},function(e,t,n){if((t=ua(Bt,t,!0))!=null)for(let o=0;o<t.length;o++){var r=e,i=n,a=t[o];a!=null&&(T(r,i,0),fi(r.h,a))}},Ai),Wa=D(function(e,t,n){return e.i===0&&(O(t,n,(e=Dr(e.h))===0?void 0:e),!0)},xa,Ai),L=D(function(e,t,n){return e.i===0&&(O(t,n,Er(e.h)),!0)},Sa,Li),Ga=D(function(e,t,n){return e.i===0&&(O(t,n,(e=Er(e.h))===0?void 0:e),!0)},Sa,Li),Ka=D(function(e,t,n){return e.i===0?(O(t,n,function(e){return wr(e,(e,t)=>{var n=-(1&e);return bt(e=(e>>>1|t<<31)^n,t>>>1^n)})}(e.h)),e=!0):e=!1,e},function(e,t,n){if((t=Zt(t))!=null&&(wi(t),t!=null))switch(T(e,n,0),typeof t){case`number`:e=e.h,t=(n=t)<0,ht(n=2*Math.abs(n)),n=h;let r=g;t&&(n==0?r==0?r=n=4294967295:(r--,n=4294967295):n--),di(e,h=n,g=r);break;case`bigint`:e=e.h,t=t<<BigInt(1)^t>>BigInt(63),h=Number(BigInt.asUintN(32,t)),g=Number(BigInt.asUintN(32,t>>BigInt(32))),di(e,h,g);break;default:mi(e.h,t)}},Ni),qa=class{constructor(e,t){var n=So;this.h=e,this.i=t,this.o=x,this.u=S,this.defaultValue=void 0,this.l=n.kb==null?void 0:et}register(){ae(this)}};function Ja(e,t){return new qa(e,t)}function Ya(e,t){return(n,r)=>{t:{let a={na:!0};r&&Object.assign(a,r),n=Rr(n,void 0,void 0,a);try{let r=new e,a=r.B;na(t)(a,n);var i=r;break t}catch(e){throw e instanceof RangeError?SyntaxError():e}finally{zr(n)}}return i}}function Xa(e){return t=>da(t,e)}function Za(e){return function(){return da(this,e)}}var Qa=[0,Ba,Va,M,P],$a=[0,za,[0,Ga,[0,Na,La],Ga,-1,[0,L],Ga,-1],D(Ea,ba,Ii)],eo,to=class extends E{constructor(e){super(e)}},no=[0,za,D(Ea,function(e,t,n){if(t!=null){if(t instanceof E){let r=t.nb;r?(t=r(t),t!=null&&xi(e,n,Cr(t,!0).buffer)):Ee(Le,3);return}if(Array.isArray(t))return void Ee(Le,3)}ba(e,t,n)},Ii)],ro=[0,1,[0,12,j,10,M],[0,7,[0,j,-1]]],io=globalThis.trustedTypes,ao=class{constructor(e){this.h=e}toString(){return this.h+``}};function oo(e){var t;return eo===void 0&&(eo=function(){var e=null;if(!io)return e;try{let t=e=>e;e=io.createPolicy(`goog#html`,{createHTML:t,createScript:t,createScriptURL:t})}catch{}return e}()),e=(t=eo)?t.createScriptURL(e):e,new ao(e)}function so(e,...t){if(t.length===0)return oo(e[0]);var n=e[0];for(let r=0;r<t.length;r++)n+=encodeURIComponent(t[r])+e[r+1];return oo(n)}var co=[0,j,L,M,-1,Ia,L,-1,M,-1],lo=[0,L,-1,M],uo=class extends E{constructor(e){super(e)}},fo=[0,M,P,M,L,-1,fa(function(e,t,n){return(e.i===0||e.i===2)&&(t=Qn(t,0|t[f],n),e.i==2?Kr(e,jr,t):t.push(Er(e.h)),!0)},function(e,t,n){if((t=ua(zt,t,!0))!=null&&t.length){n=vi(e,n);for(let n=0;n<t.length;n++)pi(e.h,t[n]);yi(e,n)}},Li),P,-1,[0,M,-1],L,M,-1,lo],po=class extends E{constructor(e){super(e)}},mo=class extends E{constructor(e){super(e)}},ho=class extends E{constructor(e){super(e)}h(){var e=this.B;return ir(e,0|e[f],mo,9)!==void 0}},go=[0,3,M,-1,2,[0,[2],j,I,[0,Ha]],[0,L,M,L,M,L,4,[0,M,P,-1,M]],[0,[3,4],P,-1,I,[0,j],I,[0,L,-1]],[0],P],_o=[0,P,-2],vo=class extends E{constructor(e){super(e)}},yo=[0],bo=class extends E{constructor(e){super(e)}},xo=[0,j,M,1,M,-4],So=class extends E{constructor(e){super(e,2)}},R={};R[336783863]=[0,P,M,-1,j,[0,[1,2,3,4,5,6,7,8,9],I,yo,I,fo,I,_o,I,xo,I,co,I,[0,P,-2],I,[0,P,L],I,go,I,lo],[0,P],M,[0,[1,3],[2,4],I,[0,Ia],-1,I,[0,N],-1,F,[0,P,-1]],P];var Co=[0,Na,-1,Ra,-3,Na,Ia,za,La,Na,-1,Ra,La,Ra,-2,za];function z(e,t){xr(e,3,t)}function B(e,t){xr(e,4,t)}var wo=class extends E{constructor(e){super(e,500)}A(e){return S(this,0,7,e)}},To=[-1,{}],Eo=[0,P,1,To],Do=[0,P,N,To];function Oo(e,t){dr(e,1,wo,t)}function V(e,t){xr(e,10,t)}function H(e,t){xr(e,15,t)}var ko=class extends E{constructor(e){super(e,500)}A(e){return S(this,0,1001,e)}},Ao=[-500,F,[-500,za,-1,N,-3,[-2,R,M],F,no,La,-1,Eo,Do,F,[0,za,Ra],za,Co,La,N,987,N],4,F,[-500,P,-1,[-1,{}],998,P],F,[-500,P,N,-1,[-2,{},M],997,N,-1],La,F,[-500,P,N,To,998,N],N,La,Eo,Do,F,[0,za,-1,To],N,-2,Co,za,-1,Ra,[0,Ra,Wa],978,To,F,no];ko.prototype.h=Za(Ao);var jo=Ya(ko,Ao),Mo=class extends E{constructor(e){super(e)}},No=class extends E{constructor(e){super(e)}h(){return or(this,Mo,1)}},Po=[0,F,[0,j,k,P,-1]],Fo=Ya(No,Po),Io=class extends E{constructor(e){super(e)}},Lo=class extends E{constructor(e){super(e)}},Ro=class extends E{constructor(e){super(e)}l(){return x(this,Io,2)}h(){return or(this,Lo,5)}},zo=Ya(class extends E{constructor(e){super(e)}},[0,N,Ia,ka,[0,L,[0,j,-3],[0,k,-3],[0,j,-1,[0,F,[0,j,-2]]],F,[0,k,-1,P,k]],P,-1,A,F,[0,j,k],N,A]),Bo=class extends E{constructor(e){super(e)}},Vo=Ya(class extends E{constructor(e){super(e)}},[0,F,[0,k,-4]]),Ho=class extends E{constructor(e){super(e)}},Uo=Ya(class extends E{constructor(e){super(e)}},[0,F,[0,k,-4]]),Wo=class extends E{constructor(e){super(e)}},Go=[0,j,-1,ka,L],Ko=class extends E{constructor(e){super(e)}};Ko.prototype.h=Za([0,k,-4,A]);var qo=class extends E{constructor(e){super(e)}},Jo=Ya(class extends E{constructor(e){super(e)}},[0,F,[0,1,j,P,Po],A]),Yo=class extends E{constructor(e){super(e)}},Xo=class extends E{constructor(e){super(e)}h(){return v(this,1,void 0,Yn)??ve()}},Zo=class extends E{constructor(e){super(e)}},Qo=[1,2],$o=Ya(class extends E{constructor(e){super(e)}},[0,F,[0,Qo,I,[0,ka],I,[0,Ba],j,P],A]),es=class extends E{constructor(e){super(e)}},ts=[0,P,j,k,N,-1],ns=class extends E{constructor(e){super(e)}},rs=[0,M,-1],is=class extends E{constructor(e){super(e)}h(){return Hn(this,uo,2,as)}l(){return pr(this,ho,6,as)}},as=[1,2,3,4,5,6],os=class extends E{constructor(e){super(e)}h(){return v(this,1,void 0,Yn)!=null}l(){return _(v(this,2))!=null}},U=class extends E{constructor(e){super(e)}},ss=[0,Ba,P,[0,j,A,-1],[0,Pa,A]],W=[0,ss,M,[0,as,I,xo,I,fo,I,co,I,yo,I,_o,I,go],L],cs=Xa(W),ls=class extends E{constructor(e){super(e)}},us=[0,W,k,-1,j],ds=Ja(502141897,ls);R[502141897]=us;var fs=Ya(class extends E{constructor(e){super(e)}},[0,[0,L,-1,Oa,Ua],Go]),ps=class extends E{constructor(e){super(e)}},ms=class extends E{constructor(e){super(e)}},hs=[0,W,k,[0,W],M],gs=Ja(508968150,ms);R[508968150]=[0,W,us,hs,k,[0,[0,ss]]],R[508968149]=hs;var _s=class extends E{constructor(e){super(e)}l(){return x(this,es,2)}h(){y(this,2)}},vs=[0,W,ts];R[478825465]=vs;var ys=class extends E{constructor(e){super(e)}},bs=class extends E{constructor(e){super(e)}},xs=class extends E{constructor(e){super(e)}},Ss=class extends E{constructor(e){super(e)}},Cs=class extends E{constructor(e){super(e)}},ws=[0,W,[0,W],vs,-1],Ts=[0,W,k,j],Es=[0,W,k],Ds=[0,W,Ts,Es,k],Os=Ja(479097054,Cs);R[479097054]=[0,W,Ds,ws],R[463370452]=ws,R[464864288]=Ts;var ks=Ja(462713202,Ss);R[462713202]=Ds,R[474472470]=Es;var As=class extends E{constructor(e){super(e)}},js=class extends E{constructor(e){super(e)}},Ms=class extends E{constructor(e){super(e)}},Ns=class extends E{constructor(e){super(e)}},Ps=[0,W,k,-1,j],Fs=[0,W,k,M];Ns.prototype.h=Za([0,W,Es,[0,W],us,hs,Ps,Fs]);var Is=class extends E{constructor(e){super(e)}},Ls=Ja(456383383,Is);R[456383383]=[0,W,ts];var Rs=class extends E{constructor(e){super(e)}},zs=Ja(476348187,Rs);R[476348187]=[0,W,rs];var Bs=class extends E{constructor(e){super(e)}},Vs=class extends E{constructor(e){super(e)}},Hs=[0,L,-1],Us=Ja(458105876,class extends E{constructor(e){super(e)}h(){var e=this.B,t=0|e[f],n=Je(this,t);return e=function(e,t,n,r){var i=Vs;!r&&Fn(e)&&(n=0|(t=e.B)[f]);var a=Vn(t,2);if(e=!1,a==null){if(r)return hn();a=[]}else if(a.constructor===fn){if(!(2&a.N)||r)return a;a=a.fa()}else Array.isArray(a)?e=!!(2&a[f]):a=[];if(r){if(!a.length)return hn();e||(e=!0,Ge(a))}else e&&(e=!1,Ke(a),a=Xn(a));return!e&&32&n&&We(a,32),n=b(t,n,2,r=new fn(a,i,nn,void 0)),e||Ln(t,n),r}(this,e,t,n),!n&&Vs&&(e.Ga=!0),e}});R[458105876]=[0,Hs,pa,[!0,A,[0,P,-1,N]],[0,Ia,M,L],M];var Ws=class extends E{constructor(e){super(e)}},Gs=Ja(458105758,Ws);R[458105758]=[0,W,P,Hs];var Ks=class extends E{constructor(e){super(e)}},qs=class extends E{constructor(e){super(e)}},Js=class extends E{constructor(e){super(e)}},Ys=Xa([0,F,[0,Ga,F,[0,Aa,-1],Ra]]),Xs=class extends E{constructor(e){super(e)}},Zs=[0,Aa,-1,Ra],Qs=class extends E{constructor(e){super(e)}},$s=class extends E{constructor(e){super(e)}},ec=[1,2];$s.prototype.h=Za([0,ec,I,Zs,I,[0,F,Zs]]);var tc=class extends E{constructor(e){super(e)}},nc=Ja(443442058,tc);R[443442058]=[0,W,P,j,k,N,-1,M,k],R[514774813]=Ps;var rc=class extends E{constructor(e){super(e)}},ic=Ja(516587230,rc);function ac(e,t){return t=t?t.clone():new es,e.displayNamesLocale===void 0?e.displayNamesLocale===void 0&&y(t,1):y(t,1,en(e.displayNamesLocale)),e.maxResults===void 0?`maxResults`in e&&y(t,2):hr(t,2,e.maxResults),e.scoreThreshold===void 0?`scoreThreshold`in e&&y(t,3):w(t,3,e.scoreThreshold),e.categoryAllowlist===void 0?`categoryAllowlist`in e&&y(t,4):br(t,4,e.categoryAllowlist),e.categoryDenylist===void 0?`categoryDenylist`in e&&y(t,5):br(t,5,e.categoryDenylist),t}function oc(e){var t=Number(e);return Number.isSafeInteger(t)?t:String(e)}function sc(e,t=-1,n=``){return{categories:e.map(e=>({index:fr(e,1)??0??-1,score:C(e,2)??0,categoryName:_(v(e,3))??``??``,displayName:_(v(e,4))??``??``})),headIndex:t,headName:n}}function cc(e){var t={classifications:or(e,qo,1).map(e=>sc(x(e,No,4)?.h()??[],fr(e,2)??0,_(v(e,3))??``))};return function(e){return e==null?e:typeof e==`bigint`?(st(e)?e=Number(e):(e=Dt(64,e),e=st(e)?Number(e):String(e)),e):Lt(e)?typeof e==`number`?Wt(e):qt(e):void 0}(v(e,2,void 0,Xt))!=null&&(t.timestampMs=oc(v(e,2,void 0,Xt)??zn)),t}function lc(e){var t=Wn(e,3,Pt,Un()),n=Wn(e,2,zt,Un()),r=Wn(e,1,_,Un()),i=Wn(e,9,_,Un()),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=x(e,Ro,4)?.l())&&(a.boundingBox={originX:fr(t,1,Bn)??0,originY:fr(t,2,Bn)??0,width:fr(t,3,Bn)??0,height:fr(t,4,Bn)??0,angle:0}),x(e,Ro,4)?.h().length)for(let t of x(e,Ro,4).h())a.keypoints.push({x:v(t,1,Bn,Pt)??0,y:v(t,2,Bn,Pt)??0,score:v(t,4,Bn,Pt)??0,label:_(v(t,3,Bn))??``});return a}function uc(e){var t=[];for(let n of or(e,Ho,1))e={x:C(n,1)??0,y:C(n,2)??0,z:C(n,3)??0,visibility:C(n,4)??0},v(n,5,void 0,Pt)!=null&&(e.presence=C(n,5)??0),t.push(e);return t}function dc(e){var t=[];for(let n of or(e,Bo,1))e={x:C(n,1)??0,y:C(n,2)??0,z:C(n,3)??0,visibility:C(n,4)??0},v(n,5,void 0,Pt)!=null&&(e.presence=C(n,5)??0),t.push(e);return t}function fc(e){return Array.from(e,e=>e>127?e-256:e)}function pc(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);var 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)}R[516587230]=[0,W,Ps,Fs,k],R[518928384]=Fs;var mc,hc=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 gc(e){if(e)return!0;if(mc===void 0)try{await WebAssembly.instantiate(hc),mc=!0}catch{mc=!1}return mc}async function _c(e,t,n){return{wasmLoaderPath:`${t}/${e}_${n=`wasm${n?`_module`:``}${await gc(n)?``:`_nosimd`}_internal`}.js`,wasmBinaryPath:`${t}/${e}_${n}.wasm`}}var vc=class{};function yc(e){return y(new bc,1,Rt(e))}vc.forVisionTasks=function(e,t=!1){return _c(`vision`,e??so``,t)},vc.forLiteRtLmTextTasks=function(e,t=!1){return _c(`litertlm_text`,e??so``,t)},vc.forTextTasks=function(e,t=!1){return _c(`text`,e??so``,t)},vc.forRetrievalTasks=function(e,t=!1){return _c(`retrieval`,e??so``,t)},vc.forGenAiTasks=function(e,t=!1){return _c(`genai`,e??so``,t)},vc.forDecisionTasks=function(e,t=!1){return _c(`decision`,e??so``,t)},vc.forAudioTasks=function(e,t=!1){return _c(`audio`,e??so``,t)},vc.isSimdSupported=function(e=!1){return gc(e)};var bc=class extends E{constructor(e){super(e)}},xc=class extends E{constructor(e){super(e)}},Sc=[0,L,2,Pa,-2,A,F,[0,L,A]],Cc=class extends E{constructor(e){super(e)}},wc=class extends E{constructor(e){super(e)}};function Tc(e,t){return y(e,1,Rt(t))}function Ec(e,t){return y(e,2,Rt(t))}var Dc=class extends E{constructor(e){super(e)}},Oc=[3,4,5,6,7],kc=class extends E{constructor(e){super(e)}},Ac=class extends E{constructor(e){super(e)}};Ac.prototype.h=Za([0,[0,L,P,-3,L],[0,Oc,L,-1,I,[0,L,P,Pa],I,Sc,I,[0,1,Sc],I,[0,L],I,[0,L,P,Pa]]]);var jc=class{constructor(){this.h=typeof AbortController<`u`}async send(e,t,n){var r=this.h?new AbortController:void 0,i=r&&e.ma>0?setTimeout(()=>{r.abort()},e.ma):void 0;try{let i=await fetch(e.url,{method:e.cb,headers:{...e.bb},...e.body&&{body:e.body},...e.withCredentials&&{credentials:`include`},signal:e.ma&&r?r.signal:null});i.status===200?t?.(await i.text()):n?.(i.status)}catch(e){e?.name===`AbortError`?n?.(408):n?.(400)}finally{clearTimeout(i)}}},Mc=class extends E{constructor(e){super(e,37)}},Nc=[-4,{},ro,L,$a],Pc=[0,P,L,1,P,-1,L,1,L,1,A],Fc=[0,L,P,-2],Ic=[0,P,L],Lc=[0,P,L],Rc=[0,M,-3],zc=[0,L,P,-1,A,j,-1,P,-5,F,[0,P,-4],-1,M,[0,M,-3],L],Bc=class extends E{constructor(e){super(e,19)}},Vc=Xa([-19,{},[0,L,1,[0,P,-6,A,j,P,-1,A],1,[0,P,1,P,-5],P,-1,[0,L,P,-8],[0,P,-3],[0,P,L,P,-2],[0,P,-1,L,P,-1,L,P,-1,[0,F,[0,P,-1],M,P,-5],[0,L,M,j,-2]],A,[0,P,-3,A,j,P,-1],[0,L,P,-1],[0,P,-9],[0,P,-6,L,P,1,P,M,L,-1,M,P,-2,L,P,L,P,j,-1],1,[0,L],1,[0,P,-4],1,Pc,[0,[1,2,3,4,5,6],I,Pc,I,Ic,I,Lc,I,[0,L],I,zc,I,Fc],Ic,Lc,zc,[0,[0,L,P,-1,A,j,-1,P,-4,F,[0,P,-4],-1,1,Rc],[0,L,P,-1,A,j,-1,P,-4,Rc]],Fc,[0,P,[0,j,-3,L],L,-2,[0,j,-1],M],4,[0,P,L,P,-1,A,L,P,-1,L,j,-1]],L,F,[-37,{},ja,P,F,[0,P,-1],Ba,1,Ba,[0,N,-1,Fa,Ma,-1],P,[0,j,P,-1],M,j,A,P,-1,Ka,Qa,ja,Ba,L,Fa,A,-1,[0,L,-1],P,M,P,Ia,P,-1,Da,1,Da,Nc,M,[0,L,[0,k,j,-2],[0,k]],[0,L,A]],ja,Va,P,-1,ja,L,-1,[0,M,-1,L,M],[0,A,-1,P],[0,ja,M,A],A,1,Ha,1,Nc]),Hc=class{constructor(e){this.i=[],this.o=new jc,this.l=e??``,this.h=setInterval(()=>{this.flush()},6e4)}close(){this.h!==void 0&&(clearInterval(this.h),this.h=void 0),this.flush()}flush(e,t){if(this.error)t?.(`net-send-failed`);else if(this.i.length===0)e?.();else{var n=this.i;this.i=[],n=function(e){var t=new Bc;return lr(t=y(t,2,Rt(1786)),3,e)}(n),n=Vc(n),this.o.send({url:`https://odml.pa.googleapis.com/v1/log`,cb:`POST`,ma:1e4,body:n,ib:2,bb:{"Content-Type":`application/x-protobuf`,"x-goog-api-key":this.l},withCredentials:!1},()=>{e?.()},e=>{this.error=Error(`Logging failed with HTTP error: ${e}`),this.i=[],this.h!==void 0&&(clearInterval(this.h),this.h=void 0),t?.(`net-send-failed`,e)})}}},Uc=class{constructor(){this.ba=this.V=this.Y=this.S=this.W=this.U=this.R=0}};function Wc(e,t){var n=new Ac;n=S(n,0,1,e.C),n=S(n,0,2,t),t=y(t=new Mc,6,Xe(n=n.h(),!1)),(e=e.m).error||e.i.push(t)}function Gc(e,t){var n={R:t.R-e.l.R,U:t.U-e.l.U,W:t.W-e.l.W,S:t.S-e.l.S,Y:t.Y-e.l.Y,V:t.V,ba:t.ba},r=Ec(Tc(new Dc,e.D),1);n=Kc(e,n),Wc(e,r=cr(r,4,Oc,n)),e.l=t}function Kc(e,t){var n=new xc;return e=_r(e=gr(e=y(n,1,Rt(e.F)),7,t.S),5,t.V),e=_r(e,6,t.ba),t.W>0&&_r(e,4,t.Y/t.W),t.R!==0&&(n=gr(n=yc(3),2,t.R),dr(e,8,bc,n)),t.U!==0&&(t=gr(n=yc(4),2,t.U),dr(e,8,bc,t)),e}var qc=class{constructor(e,t,n){this.v=performance.now(),this.o=performance.now(),this.i=/* @__PURE__ */ new Map,this.u=0,this.h=new Uc,this.l=new Uc,this.m=new Hc(n),this.D=function(e){switch(e){case`AudioClassifier`:return 4;case`AudioEmbedder`:return 5;case`TextClassifier`:return 6;case`TextEmbedder`:return 7;case`GestureRecognizer`:return 8;case`HandDetector`:return 9;case`HandLandmarker`:return 10;case`ImageClassifier`:return 11;case`ImageEmbedder`:return 12;case`ImageSegmenter`:return 13;case`ObjectDetector`:return 14;case`FaceDetector`:return 15;case`FaceLandmarker`:return 16;case`InteractiveSegmenter`:case`InteractiveSegmenterLegacy`:return 18;case`HolisticLandmarker`:return 20;case`LlmInference`:return 21;case`LanguageDetector`:return 22;case`PoseLandmarker`:return 23;case`UniversalEmbedder`:return 28;case`SemanticRetriever`:return 29;case`DecisionMaker`:return 30;default:return 0}}(e),this.F=function(e){switch(e){case`IMAGE`:return 11;case`VIDEO`:return 12;case`LIVE_STREAM`:return 13;case`AUDIO_CLIPS`:return 14;case`AUDIO_STREAM`:return 15;default:return 10}}(t),e=new kc,typeof window>`u`?t=0:(t=navigator.userAgent,t=/Android/i.test(t)?1:/iPhone|iPad|iPod/i.test(t)?2:/Windows/i.test(t)?5:/Macintosh/i.test(t)?4:/Linux/i.test(t)?3:0),e=y(e,1,Rt(t)),e=y(e,2,en(``)),e=y(e,3,en(``)),e=y(e,4,en(`1.1.0`)),e=y(e,5,en(``)),this.C=y(e,6,Rt(4))}za(){var e=new wc;e=_r(e=y(e,1,Rt(this.F)),3,performance.now()-this.v),Wc(this,e=cr(Ec(Tc(new Dc,this.D),0),3,Oc,e)),this.o=performance.now()}Aa(e){var t=this.i.get(e);if(t!==void 0&&(this.i.delete(e),e=performance.now()-t,++this.h.W,this.h.Y+=e,this.h.V=Math.max(this.h.V,e),this.u=Math.max(this.u,e),performance.now()>this.o+3e4)){for(let[n,r]of this.i.entries())e=n,r<t&&(this.h.S++,this.i.delete(e));t={...this.h,ba:performance.now()-this.o},this.h.V=0,this.o=performance.now(),Gc(this,t)}}ya(){var e={...this.h,S:this.h.S+this.i.size,V:this.u,ba:performance.now()-this.v};Gc(this,e);var t=new Cc;t=S(t,0,2,e=Kc(this,e)),Wc(this,t=cr(e=Ec(Tc(new Dc,this.D),2),5,Oc,t))}close(){var e=this.m;typeof e.close==`function`?e.close():e.flush()}};function Jc(){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 Yc(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)})}try{importScripts(e.toString())}catch(t){if(!(t instanceof TypeError))throw t;{let t=self.import;t?await t(e.toString()):await import(e.toString())}}}function Xc(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 G(e,t,n){e.o||console.error(`No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target`),n(t=e.j.stringToNewUTF8(t)),e.j._free(t)}function Zc(e,t,n){if(!e.j.canvas)throw Error(`No OpenGL canvas configured.`);if(n?e.j._bindTextureToStream(n):e.j._bindTextureToCanvas(),!(n=e.j.canvas.getContext(`webgl2`)||e.j.canvas.getContext(`webgl`)))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.j.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.j.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);var[r,i]=Xc(t);return!e.l||r===e.j.canvas.width&&i===e.j.canvas.height||(e.j.canvas.width=r,e.j.canvas.height=i),[r,i]}function Qc(e,t,n){e.o||console.error(`No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target`);var r=new Uint32Array(t.length);for(let n=0;n<t.length;n++)r[n]=e.j.stringToNewUTF8(t[n]);t=e.j._malloc(4*r.length),e.j.HEAPU32.set(r,t>>2),n(t);for(let t of r)e.j._free(t);e.j._free(t)}function $c(e,t,n){e.j.simpleListeners=e.j.simpleListeners||{},e.j.simpleListeners[t]=n}function el(e,t,n){var r=[];e.j.simpleListeners=e.j.simpleListeners||{},e.j.simpleListeners[t]=(e,t,i)=>{t?(n(r,i),r=[]):r.push(e)}}var tl=class{constructor(e,t){this.l=!0,this.j=e,this.h=null,this.i=0,this.o=typeof this.j._addIntToInputStream==`function`,t===void 0?Jc()?this.j.canvas=new OffscreenCanvas(1,1):(console.warn(`OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas.`),this.j.canvas=document.createElement(`canvas`)):this.j.canvas=t}async initializeGraph(e){var 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){var n=e.length,r=this.j._malloc(n);this.j.HEAPU8.set(e,r),t?this.j._changeBinaryGraph(n,r):this.j._changeTextGraph(n,r),this.j._free(r)}configureAudio(e,t,n,r,i){this.j._configureAudio||console.warn(`Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?`),G(this,r||`input_audio`,r=>{G(this,i||=`audio_header`,i=>{this.j._configureAudio(r,i,e,t??0,n)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.j._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.j.gpuOriginForWebTexturesIsBottomLeft=e}ka(e){$c(this,`__graph_config__`,t=>{e(t)}),G(this,`__graph_config__`,e=>{this.j._getGraphConfig(e,void 0)}),delete this.j.simpleListeners.__graph_config__}attachErrorListener(e){this.j.errorListener=e}attachEmptyPacketListener(e,t){this.j.emptyPacketListeners=this.j.emptyPacketListeners||{},this.j.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,r,i){var a=4*e.length;this.i!==a&&(this.h&&this.j._free(this.h),this.h=this.j._malloc(a),this.i=a),this.j.HEAPF32.set(e,this.h/4),G(this,r,e=>{this.j._addAudioToInputStream(this.h,t,n,e,i)})}addGpuBufferToStream(e,t,n){G(this,t,t=>{var[r,i]=Zc(this,e,t);this.j._addBoundTextureToStream(t,r,i,n)})}addBoolToStream(e,t,n){G(this,t,t=>{this.j._addBoolToInputStream(e,t,n)})}addDoubleToStream(e,t,n){G(this,t,t=>{this.j._addDoubleToInputStream(e,t,n)})}addFloatToStream(e,t,n){G(this,t,t=>{this.j._addFloatToInputStream(e,t,n)})}addIntToStream(e,t,n){G(this,t,t=>{this.j._addIntToInputStream(e,t,n)})}addUintToStream(e,t,n){G(this,t,t=>{this.j._addUintToInputStream(e,t,n)})}addStringToStream(e,t,n){G(this,t,t=>{G(this,e,e=>{this.j._addStringToInputStream(e,t,n)})})}addStringRecordToStream(e,t,n){G(this,t,t=>{Qc(this,Object.keys(e),r=>{Qc(this,Object.values(e),i=>{this.j._addFlatHashMapToInputStream(r,i,Object.keys(e).length,t,n)})})})}addProtoToStream(e,t,n,r){G(this,n,n=>{G(this,t,t=>{var i=this.j._malloc(e.length);this.j.HEAPU8.set(e,i),this.j._addProtoToInputStream(i,e.length,t,n,r),this.j._free(i)})})}addEmptyPacketToStream(e,t){G(this,e,e=>{this.j._addEmptyPacketToInputStream(e,t)})}addBoolVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateBoolVector(e.length);if(!r)throw Error(`Unable to allocate new bool vector on heap.`);for(let t of e)this.j._addBoolVectorEntry(r,t);this.j._addBoolVectorToInputStream(r,t,n)})}addDoubleVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateDoubleVector(e.length);if(!r)throw Error(`Unable to allocate new double vector on heap.`);for(let t of e)this.j._addDoubleVectorEntry(r,t);this.j._addDoubleVectorToInputStream(r,t,n)})}addFloatVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateFloatVector(e.length);if(!r)throw Error(`Unable to allocate new float vector on heap.`);for(let t of e)this.j._addFloatVectorEntry(r,t);this.j._addFloatVectorToInputStream(r,t,n)})}addIntVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateIntVector(e.length);if(!r)throw Error(`Unable to allocate new int vector on heap.`);for(let t of e)this.j._addIntVectorEntry(r,t);this.j._addIntVectorToInputStream(r,t,n)})}addUintVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateUintVector(e.length);if(!r)throw Error(`Unable to allocate new unsigned int vector on heap.`);for(let t of e)this.j._addUintVectorEntry(r,t);this.j._addUintVectorToInputStream(r,t,n)})}addStringVectorToStream(e,t,n){G(this,t,t=>{var r=this.j._allocateStringVector(e.length);if(!r)throw Error(`Unable to allocate new string vector on heap.`);for(let t of e)G(this,t,e=>{this.j._addStringVectorEntry(r,e)});this.j._addStringVectorToInputStream(r,t,n)})}addBoolToInputSidePacket(e,t){G(this,t,t=>{this.j._addBoolToInputSidePacket(e,t)})}addDoubleToInputSidePacket(e,t){G(this,t,t=>{this.j._addDoubleToInputSidePacket(e,t)})}addFloatToInputSidePacket(e,t){G(this,t,t=>{this.j._addFloatToInputSidePacket(e,t)})}addIntToInputSidePacket(e,t){G(this,t,t=>{this.j._addIntToInputSidePacket(e,t)})}addUintToInputSidePacket(e,t){G(this,t,t=>{this.j._addUintToInputSidePacket(e,t)})}addStringToInputSidePacket(e,t){G(this,t,t=>{G(this,e,e=>{this.j._addStringToInputSidePacket(e,t)})})}addProtoToInputSidePacket(e,t,n){G(this,n,n=>{G(this,t,t=>{var r=this.j._malloc(e.length);this.j.HEAPU8.set(e,r),this.j._addProtoToInputSidePacket(r,e.length,t,n),this.j._free(r)})})}addBoolVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateBoolVector(e.length);if(!n)throw Error(`Unable to allocate new bool vector on heap.`);for(let t of e)this.j._addBoolVectorEntry(n,t);this.j._addBoolVectorToInputSidePacket(n,t)})}addDoubleVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateDoubleVector(e.length);if(!n)throw Error(`Unable to allocate new double vector on heap.`);for(let t of e)this.j._addDoubleVectorEntry(n,t);this.j._addDoubleVectorToInputSidePacket(n,t)})}addFloatVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateFloatVector(e.length);if(!n)throw Error(`Unable to allocate new float vector on heap.`);for(let t of e)this.j._addFloatVectorEntry(n,t);this.j._addFloatVectorToInputSidePacket(n,t)})}addIntVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateIntVector(e.length);if(!n)throw Error(`Unable to allocate new int vector on heap.`);for(let t of e)this.j._addIntVectorEntry(n,t);this.j._addIntVectorToInputSidePacket(n,t)})}addUintVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateUintVector(e.length);if(!n)throw Error(`Unable to allocate new unsigned int vector on heap.`);for(let t of e)this.j._addUintVectorEntry(n,t);this.j._addUintVectorToInputSidePacket(n,t)})}addStringVectorToInputSidePacket(e,t){G(this,t,t=>{var n=this.j._allocateStringVector(e.length);if(!n)throw Error(`Unable to allocate new string vector on heap.`);for(let t of e)G(this,t,e=>{this.j._addStringVectorEntry(n,e)});this.j._addStringVectorToInputSidePacket(n,t)})}attachBoolListener(e,t){$c(this,e,t),G(this,e,e=>{this.j._attachBoolListener(e)})}attachBoolVectorListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachBoolVectorListener(e)})}attachIntListener(e,t){$c(this,e,t),G(this,e,e=>{this.j._attachIntListener(e)})}attachIntVectorListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachIntVectorListener(e)})}attachUintListener(e,t){$c(this,e,t),G(this,e,e=>{this.j._attachUintListener(e)})}attachUintVectorListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachUintVectorListener(e)})}attachDoubleListener(e,t){$c(this,e,t),G(this,e,e=>{this.j._attachDoubleListener(e)})}attachDoubleVectorListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachDoubleVectorListener(e)})}attachFloatListener(e,t){$c(this,e,t),G(this,e,e=>{this.j._attachFloatListener(e)})}attachFloatVectorListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachFloatVectorListener(e)})}attachStringListener(e,t){$c(this,e,t),G(this,e,e=>{this.j._attachStringListener(e)})}attachStringVectorListener(e,t){el(this,e,t),G(this,e,e=>{this.j._attachStringVectorListener(e)})}attachProtoListener(e,t,n){$c(this,e,t),G(this,e,e=>{this.j._attachProtoListener(e,n||!1)})}attachProtoVectorListener(e,t,n){el(this,e,t),G(this,e,e=>{this.j._attachProtoVectorListener(e,n||!1)})}attachAudioListener(e,t,n){this.j._attachAudioListener||console.warn(`Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?`),$c(this,e,(e,n)=>{e=new Float32Array(e.buffer,e.byteOffset,e.length/4),t(e,n)}),G(this,e,e=>{this.j._attachAudioListener(e,n||!1)})}finishProcessing(){this.j._waitUntilIdle()}closeGraph(){this.j._closeGraph(),this.j.simpleListeners=void 0,this.j.emptyPacketListeners=void 0}};function nl(e){return class extends e{get qa(){return this.j}Ta(){if(typeof this.qa._mediapipeLoggerGetEncodedApiKey==`function`){let e=this.qa._mediapipeLoggerGetEncodedApiKey();return this.qa._decodeBase64(e)}}}}function rl(e){return class extends e{ab(){this.j._registerModelResourcesGraphService()}}}var il=nl(rl(tl)),al=class extends il{};async function ol(e,t,n,r){return e=await(async(e,t,n,r,i)=>{if(t&&await Yc(t),!self.ModuleFactory||n&&(await Yc(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}),function(e,t){t=t.runningMode??``;var n=e.h.Ta();e.o=new qc(e.D(),t,n)}(e,r),await e.A(r),e}async function sl(e,t,n,r){return ol(e,t,n,r)}function cl(e,t,n){try{e.h.j.FS_unlink(`/${n}`)}catch{}e.h.j.FS_createDataFile(`/`,n,t,!0,!1,!1),ll(e,`/${n}`)}function ll(e,t){var n=x(e.baseOptions,os,1)||new os;typeof t==`string`?(y(n,2,en(t)),y(n,1)):t instanceof Uint8Array&&(y(n,1,Xe(t,!1)),y(n,2)),S(e.baseOptions,0,1,n)}function ul(e){try{let t=e.L.length;if(t===1)throw Error(e.L[0].message);if(t>1)throw Error(`Encountered multiple errors: `+e.L.map(e=>e.message).join(`, `))}finally{e.L=[]}}function K(e,t){e.J=Math.max(e.J,t)}function dl(e,t){e.F=new wo,yr(e.F,2,`PassThroughCalculator`),z(e.F,`free_memory`),B(e.F,`free_memory_unused_out`),V(t,`free_memory`),Oo(t,e.F)}function fl(e,t){z(e.F,t),B(e.F,t+`_unused_out`)}function pl(e){e.h.addBoolToStream(!0,`free_memory`,e.J)}var ml=class{constructor(e){this.h=e,this.L=[],this.J=0,this.h.setAutoRenderToScreen(!1)}l(e,t=!0,n=!1,r=!1){if(t){let t=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error(`Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer`);if(!(x(this.baseOptions,os,1)?.h()||x(this.baseOptions,os,1)?.l()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error(`Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set`);(function(e,t,n=!1){var r=x(e.baseOptions,is,3);if(!r){var i=r=new is,a=new vo;cr(i,4,as,a)}`delegate`in t&&(t.delegate===`GPU`?(t=r,i=new uo,cr(t,2,as,i)):(t=r,i=new vo,cr(t,4,as,i))),n&&(n=r.l(),t=r.h()||!0===n?.h(),n=new ho,t?S(n,0,9,t=new mo):S(n,0,8,t=new po),cr(r,6,as,n)),S(e.baseOptions,0,3,r)})(this,t,r);let i=n?`model.litertlm`:`model.dat`;if(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=>{cl(this,new Uint8Array(e),i),this.u(),this.M()});if(t.modelAssetBuffer instanceof Uint8Array)n?cl(this,t.modelAssetBuffer,i):ll(this,t.modelAssetBuffer);else if(t.modelAssetBuffer)return async function(e){for(var t=[],n=0;;){let{done:r,value:i}=await e.read();if(r)break;t.push(i),n+=i.length}if(t.length===0)return/* @__PURE__ */ 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=>{n?cl(this,e,i):ll(this,e),this.u(),this.M()})}return this.u(),this.M(),Promise.resolve()}M(){}ka(){var e;if(this.h.ka(t=>{e=jo(t)}),!e)throw Error(`Failed to retrieve CalculatorGraphConfig`);return e}setGraph(e,t){this.h.attachErrorListener((e,t)=>{this.L.push(Error(t))}),this.h.ab(),this.h.setGraph(e,t),this.o?.za(),this.F=void 0,ul(this)}finishProcessing(e){this.h.finishProcessing(),ul(this),this.o&&e!==void 0&&this.o.Aa(e)}close(){this.F=void 0,this.o?.ya(),this.o?.close(),this.h.closeGraph()}};function q(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}ml.prototype.close=ml.prototype.close;var hl=class{constructor(e,t,n,r){this.h=e,this.i=t,this.o=n,this.l=r}bind(){this.h.bindVertexArray(this.i)}close(){this.h.deleteVertexArray(this.i),this.h.deleteBuffer(this.o),this.h.deleteBuffer(this.l)}};function gl(e,t,n){var r=e.h;if(n=q(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.i,n),n}function _l(e,t){var n=e.h,r=q(n.createVertexArray(),`Failed to create vertex array`);n.bindVertexArray(r);var i=q(n.createBuffer(),`Failed to create buffer`);n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(e.G),n.vertexAttribPointer(e.G,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);var a=q(n.createBuffer(),`Failed to create buffer`);return n.bindBuffer(n.ARRAY_BUFFER,a),n.enableVertexAttribArray(e.L),n.vertexAttribPointer(e.L,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 hl(n,r,i,a)}function vl(e,t){if(e.h){if(t!==e.h)throw Error(`Cannot change GL context once initialized`)}else e.h=t}function yl(e,t,n,r){return vl(e,t),e.i||(e.o(),e.J()),n?(e.m||(e.m=_l(e,!0)),n=e.m):(e.F||(e.F=_l(e,!1)),n=e.F),t.useProgram(e.i),n.bind(),e.l(),e=r(),n.h.bindVertexArray(null),e}function bl(e,t,n){return vl(e,t),e=q(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 xl(e,t,n){vl(e,t),e.D||=q(t.createFramebuffer(),`Failed to create framebuffe.`),t.bindFramebuffer(t.FRAMEBUFFER,e.D),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)}function Sl(e){e.h?.bindFramebuffer(e.h.FRAMEBUFFER,null)}var Cl=class{C(){return`
|
|
2
|
-
precision mediump float;
|
|
3
|
-
varying vec2 vTex;
|
|
4
|
-
uniform sampler2D inputTexture;
|
|
5
|
-
void main() {
|
|
6
|
-
gl_FragColor = texture2D(inputTexture, vTex);
|
|
7
|
-
}
|
|
8
|
-
`}o(){var e=this.h;if(this.i=q(e.createProgram(),`Failed to create WebGL program`),this.ea=gl(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.aa=gl(this,this.C(),e.FRAGMENT_SHADER),e.linkProgram(this.i),!e.getProgramParameter(this.i,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.i)}`);this.G=e.getAttribLocation(this.i,`aVertex`),this.L=e.getAttribLocation(this.i,`aTex`)}J(){}l(){}close(){if(this.i){let e=this.h;e.deleteProgram(this.i),e.deleteShader(this.ea),e.deleteShader(this.aa)}this.D&&this.h.deleteFramebuffer(this.D),this.F&&this.F.close(),this.m&&this.m.close()}},wl=class extends Cl{C(){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
|
-
`}J(){var e=this.h;e.activeTexture(e.TEXTURE1),this.v=bl(this,e,e.LINEAR),e.activeTexture(e.TEXTURE2),this.u=bl(this,e,e.NEAREST)}o(){super.o();var e=this.h;this.P=q(e.getUniformLocation(this.i,`backgroundTexture`),`Uniform location`),this.Z=q(e.getUniformLocation(this.i,`colorMappingTexture`),`Uniform location`),this.M=q(e.getUniformLocation(this.i,`maskTexture`),`Uniform location`)}l(){super.l();var e=this.h;e.uniform1i(this.M,0),e.uniform1i(this.P,1),e.uniform1i(this.Z,2)}close(){this.v&&this.h.deleteTexture(this.v),this.u&&this.h.deleteTexture(this.u),super.close()}},Tl=class extends Cl{C(){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
|
-
`}J(){var e=this.h;e.activeTexture(e.TEXTURE1),this.u=bl(this,e),e.activeTexture(e.TEXTURE2),this.v=bl(this,e)}o(){super.o();var e=this.h;this.M=q(e.getUniformLocation(this.i,`defaultTexture`),`Uniform location`),this.P=q(e.getUniformLocation(this.i,`overlayTexture`),`Uniform location`),this.K=q(e.getUniformLocation(this.i,`maskTexture`),`Uniform location`)}l(){super.l();var e=this.h;e.uniform1i(this.K,0),e.uniform1i(this.M,1),e.uniform1i(this.P,2)}close(){this.u&&this.h.deleteTexture(this.u),this.v&&this.h.deleteTexture(this.v),super.close()}};function El(e,t){switch(t){case 0:return e.h.find(e=>e instanceof Uint8Array);case 1:return e.h.find(e=>e instanceof Float32Array);case 2:return e.h.find(e=>typeof WebGLTexture<`u`&&e instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function Dl(e){var t=El(e,1);if(!t){if(t=El(e,0))t=new Float32Array(t).map(e=>e/255);else{t=new Float32Array(e.width*e.height);let r=kl(e);var n=jl(e);if(xl(n,r,Ol(e)),`iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod`.split(`;`).includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`document`in self&&`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.h.push(t)}return t}function Ol(e){var t=El(e,2);if(!t){let n=kl(e);t=Ml(e);let r=Dl(e),i=Al(e);n.texImage2D(n.TEXTURE_2D,0,i,e.width,e.height,0,n.RED,n.FLOAT,r),Nl(e)}return t}function kl(e){if(!e.canvas)throw Error(`Conversion to different image formats require that a canvas is passed when initializing the image.`);return e.i||=q(e.canvas.getContext(`webgl2`),`You cannot use a canvas that is already bound to a different type of rendering context.`),e.i}function Al(e){if(e=kl(e),!Pl){if(e.getExtension(`EXT_color_buffer_float`)&&e.getExtension(`OES_texture_float_linear`)&&e.getExtension(`EXT_float_blend`))Pl=e.R32F;else{if(!e.getExtension(`EXT_color_buffer_half_float`))throw Error(`GPU does not fully support 4-channel float32 or float16 formats`);Pl=e.R16F}}return Pl}function jl(e){return e.l||=new Cl,e.l}function Ml(e){var t=kl(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);var n=El(e,2);return n||(n=bl(jl(e),t,e.o?t.LINEAR:t.NEAREST),e.h.push(n),e.u=!0),t.bindTexture(t.TEXTURE_2D,n),n}function Nl(e){e.i.bindTexture(e.i.TEXTURE_2D,null)}var Pl,J=class{constructor(e,t,n,r,i,a,o){this.h=e,this.o=t,this.u=n,this.canvas=r,this.l=i,this.width=a,this.height=o,this.u&&--Fl===0&&console.error(`You seem to be creating MPMask instances without invoking .close(). This leaks resources.`)}Va(){return!!El(this,0)}va(){return!!El(this,1)}X(){return!!El(this,2)}ua(){return(t=El(e=this,0))||(t=Dl(e),t=new Uint8Array(t.map(e=>Math.round(255*e))),e.h.push(t)),t;var e,t}ta(){return Dl(this)}T(){return Ol(this)}clone(){var e=[];for(let t of this.h){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=kl(this),t=jl(this);e.activeTexture(e.TEXTURE1),n=bl(t,e,this.o?e.LINEAR:e.NEAREST),e.bindTexture(e.TEXTURE_2D,n);let r=Al(this);e.texImage2D(e.TEXTURE_2D,0,r,this.width,this.height,0,e.RED,e.FLOAT,null),e.bindTexture(e.TEXTURE_2D,null),xl(t,e,n),yl(t,e,!1,()=>{Ml(this),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),Nl(this)}),Sl(t),Nl(this)}}e.push(n)}return new J(e,this.o,this.X(),this.canvas,this.l,this.width,this.height)}close(){this.u&&kl(this).deleteTexture(El(this,2)),Fl=-1}};J.prototype.close=J.prototype.close,J.prototype.clone=J.prototype.clone,J.prototype.getAsWebGLTexture=J.prototype.T,J.prototype.getAsFloat32Array=J.prototype.ta,J.prototype.getAsUint8Array=J.prototype.ua,J.prototype.hasWebGLTexture=J.prototype.X,J.prototype.hasFloat32Array=J.prototype.va,J.prototype.hasUint8Array=J.prototype.Va;var Fl=250,Il={color:`white`,lineWidth:4,radius:6};function Ll(e){return{...Il,fillColor:(e||={}).color,...e}}function Rl(e,t){return e instanceof Function?e(t):e}function zl(e,t,n){return Math.max(Math.min(t,n),Math.min(Math.max(t,n),e))}function Bl(e){if(!e.l)throw Error(`CPU rendering requested but CanvasRenderingContext2D not provided.`);return e.l}function Vl(e){if(!e.u)throw Error(`GPU rendering requested but WebGL2RenderingContext not provided.`);return e.u}function Hl(e,t,n){if(t.X())n(t.T());else{let r=t.va()?t.ta():t.ua();e.o=e.o??new Cl;let i=Vl(e);n((e=new J([r],t.o,!1,i.canvas,e.o,t.width,t.height)).T()),e.close()}}function Ul(e,t,n,r){var i=function(e){return e.h||=new wl,e.h}(e),a=Vl(e),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;yl(i,a,!0,()=>{(function(e,t,n,r){var i=e.h;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,e.v),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),e.K&&function(e,t){if(e!==t)return!1;e=e.entries(),t=t.entries();for(let[n,r]of e){e=n;let i=r,a=t.next();if(a.done)return!1;let[o,s]=a.value;if(e!==o||i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2]||i[3]!==s[3])return!1}return!!t.next().done}(e.K,r))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,e.u);else{e.K=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.u),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);var e=i.h;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 Wl(e,t,n,r){var i=Vl(e),a=function(e){return e.i||=new Tl,e.i}(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;yl(a,i,!0,()=>{var e=a.h;e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,a.u),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,a.v),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.h).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 Gl=class{constructor(e,t){typeof CanvasRenderingContext2D<`u`&&e instanceof CanvasRenderingContext2D||e instanceof OffscreenCanvasRenderingContext2D?(this.l=e,this.u=t):this.u=e}Na(e,t){if(e){var n=Bl(this);t=Ll(t),n.save();var r=n.canvas,i=0;for(let a of e)n.fillStyle=Rl(t.fillColor,{index:i,from:a}),n.strokeStyle=Rl(t.color,{index:i,from:a}),n.lineWidth=Rl(t.lineWidth,{index:i,from:a}),(e=new Path2D).arc(a.x*r.width,a.y*r.height,Rl(t.radius,{index:i,from:a}),0,2*Math.PI),n.fill(e),n.stroke(e),++i;n.restore()}}Ma(e,t,n){if(e&&t){var r=Bl(this);n=Ll(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=Rl(n.color,{index:a,from:t,to:s}),r.lineWidth=Rl(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()}}Ja(e,t){var n=Bl(this);t=Ll(t),n.save(),n.beginPath(),n.lineWidth=Rl(t.lineWidth,{}),n.strokeStyle=Rl(t.color,{}),n.fillStyle=Rl(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()}Ka(e,t,n=[0,0,0,255]){this.l?function(e,t,n,r){var i=Vl(e);Hl(e,t,t=>{Ul(e,t,n,r),(t=Bl(e)).drawImage(i.canvas,0,0,t.canvas.width,t.canvas.height)})}(this,e,n,t):Ul(this,e.T(),n,t)}La(e,t,n){this.l?function(e,t,n,r){var i=Vl(e);Hl(e,t,t=>{Wl(e,t,n,r),(t=Bl(e)).drawImage(i.canvas,0,0,t.canvas.width,t.canvas.height)})}(this,e,t,n):Wl(this,e.T(),t,n)}close(){this.h?.close(),this.h=void 0,this.i?.close(),this.i=void 0,this.o?.close(),this.o=void 0}};function Kl(e,t){switch(t){case 0:return e.h.find(e=>e instanceof ImageData);case 1:return e.h.find(e=>typeof ImageBitmap<`u`&&e instanceof ImageBitmap);case 2:return e.h.find(e=>typeof WebGLTexture<`u`&&e instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function ql(e){var t=Kl(e,0);if(!t){t=Yl(e);let n=Xl(e),r=new Uint8Array(e.width*e.height*4);xl(n,t,Jl(e)),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,r),Sl(n),t=new ImageData(new Uint8ClampedArray(r.buffer),e.width,e.height),e.h.push(t)}return t}function Jl(e){var t=Kl(e,2);if(!t){let n=Yl(e);t=Zl(e);let r=Kl(e,1)||ql(e);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Ql(e)}return t}function Yl(e){if(!e.canvas)throw Error(`Conversion to different image formats require that a canvas is passed when initializing the image.`);return e.i||=q(e.canvas.getContext(`webgl2`),`You cannot use a canvas that is already bound to a different type of rendering context.`),e.i}function Xl(e){return e.l||=new Cl,e.l}function Zl(e){var t=Yl(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);var n=Kl(e,2);return n||(n=bl(Xl(e),t),e.h.push(n),e.o=!0),t.bindTexture(t.TEXTURE_2D,n),n}function Ql(e){e.i.bindTexture(e.i.TEXTURE_2D,null)}function $l(e){var t=Yl(e);return yl(Xl(e),t,!0,()=>function(e,t){var n=e.canvas;if(n.width===e.width&&n.height===e.height)return t();var 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()}))}Gl.prototype.close=Gl.prototype.close,Gl.prototype.drawConfidenceMask=Gl.prototype.La,Gl.prototype.drawCategoryMask=Gl.prototype.Ka,Gl.prototype.drawBoundingBox=Gl.prototype.Ja,Gl.prototype.drawConnectors=Gl.prototype.Ma,Gl.prototype.drawLandmarks=Gl.prototype.Na,Gl.lerp=function(e,t,n,r,i){return zl(r*(1-(e-t)/(n-t))+i*(1-(n-e)/(n-t)),r,i)},Gl.clamp=zl;var Y=class{constructor(e,t,n,r,i,a,o){this.h=e,this.u=t,this.o=n,this.canvas=r,this.l=i,this.width=a,this.height=o,(this.u||this.o)&&--eu===0&&console.error(`You seem to be creating MPImage instances without invoking .close(). This leaks resources.`)}Ua(){return!!Kl(this,0)}wa(){return!!Kl(this,1)}X(){return!!Kl(this,2)}Ra(){return ql(this)}Qa(){var e=Kl(this,1);return e||(Jl(this),Zl(this),e=$l(this),Ql(this),this.h.push(e),this.u=!0),e}T(){return Jl(this)}clone(){var e=[];for(let t of this.h){let n;if(t instanceof ImageData)n=new ImageData(t.data,this.width,this.height);else if(t instanceof WebGLTexture){let e=Yl(this),t=Xl(this);e.activeTexture(e.TEXTURE1),n=bl(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),xl(t,e,n),yl(t,e,!1,()=>{Zl(this),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),Ql(this)}),Sl(t),Ql(this)}else{if(!(t instanceof ImageBitmap))throw Error(`Type is not supported: ${t}`);Jl(this),Zl(this),n=$l(this),Ql(this)}e.push(n)}return new Y(e,this.wa(),this.X(),this.canvas,this.l,this.width,this.height)}close(){this.u&&Kl(this,1).close(),this.o&&Yl(this).deleteTexture(Kl(this,2)),eu=-1}};Y.prototype.close=Y.prototype.close,Y.prototype.clone=Y.prototype.clone,Y.prototype.getAsWebGLTexture=Y.prototype.T,Y.prototype.getAsImageBitmap=Y.prototype.Qa,Y.prototype.getAsImageData=Y.prototype.Ra,Y.prototype.hasWebGLTexture=Y.prototype.X,Y.prototype.hasImageBitmap=Y.prototype.wa,Y.prototype.hasImageData=Y.prototype.Ua;var eu=250;function tu(...e){return e.map(([e,t])=>({start:e,end:t}))}var nu,ru=rl((nu=nl(tl),class extends nu{get pa(){return this.j}Ea(e,t,n){G(this,t,t=>{var[r,i]=Zc(this,e,t);this.pa._addBoundTextureAsImageToStream(t,r,i,n)})}ha(e,t){$c(this,e,t),G(this,e,e=>{this.pa._attachImageListener(e)})}ia(e,t){el(this,e,t),G(this,e,e=>{this.pa._attachImageVectorListener(e)})}})),iu=class extends ru{};async function X(e,t,n){return sl(e,n.canvas??(Jc()?void 0:document.createElement(`canvas`)),t,n)}function au(e,t,n,r){if(e.o&&r!==void 0){var i=x(e.baseOptions,is,3);i?.h()||i?.l()?.h()?(++(i=e.o).h.U,i.i.set(r,performance.now())):(++(i=e.o).h.R,i.i.set(r,performance.now()))}if(e.ra){if(i=new Ko,n?.regionOfInterest){if(!e.Da)throw Error(`This task doesn't support region-of-interest.`);var a=n.regionOfInterest;if(a.left>=a.right||a.top>=a.bottom)throw Error(`Expected RectF with left < right and top < bottom.`);if(a.left<0||a.top<0||a.right>1||a.bottom>1)throw Error(`Expected RectF values to be in [0,1].`);w(i,1,(a.left+a.right)/2),w(i,2,(a.top+a.bottom)/2),w(i,4,a.right-a.left),w(i,3,a.bottom-a.top)}else w(i,1,.5),w(i,2,.5),w(i,4,1),w(i,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error(`Expected rotation to be a multiple of 90°.`);if(w(i,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){let[e,r]=Xc(t);n=C(i,3)*r/e,a=C(i,4)*e/r,w(i,4,n),w(i,3,a)}}e.h.addProtoToStream(i.h(),`mediapipe.NormalizedRect`,e.ra,r)}e.h.Ea(t,e.Ca,r??performance.now()),e.finishProcessing(r)}function ou(e,t,n){if(e.K)throw Error(`Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.`);au(e,t,n,e.J+1)}function su(e,t,n,r){if(!e.K)throw Error(`Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.`);au(e,t,n,r)}function cu(e,t,n,r){var i=t.data,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 J([i],n,!1,e.h.j.canvas,e.ea,a,t),r?e.clone():e}var lu=class extends ml{constructor(e,t,n,r){super(e),this.h=e,this.Ca=t,this.ra=n,this.Da=r,this.ea=new Cl,this.K=!1}l(e,t=!0,n=!1,r=!1){if(`runningMode`in e){var i=this.K=!!e.runningMode&&e.runningMode!==`IMAGE`;y(this.baseOptions,2,i==null?i:Ft(i))}if(e.canvas!==void 0&&this.h.j.canvas!==e.canvas)throw Error(`You must create a new task to reset the canvas.`);return super.l(e,t,n,r)}close(){this.ea.close(),super.close()}};lu.prototype.close=lu.prototype.close;var uu=class extends lu{constructor(e,t){super(new iu(e,t),`image_in`,`norm_rect_in`,!1),this.m={detections:[]},S(e=this.i=new ls,0,1,t=new U),w(this.i,2,.5),w(this.i,3,.3)}D(){return`FaceDetector`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`minDetectionConfidence`in e&&w(this.i,2,e.minDetectionConfidence??.5),`minSuppressionThreshold`in e&&w(this.i,3,e.minSuppressionThreshold??.3),this.l(e)}H(e,t){return this.m={detections:[]},ou(this,e,t),this.m}I(e,t,n){return this.m={detections:[]},su(this,e,n,t),this.m}u(){var e=new ko;V(e,`image_in`),V(e,`norm_rect_in`),H(e,`detections`);var t=new So;Ri(t,ds,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.face_detector.FaceDetectorGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect_in`),B(n,`DETECTIONS:detections`),n.A(t),Oo(e,n),this.h.attachProtoVectorListener(`detections`,(e,t)=>{for(let t of e)e=zo(t),this.m.detections.push(lc(e));K(this,t)}),this.h.attachEmptyPacketListener(`detections`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};uu.prototype.detectForVideo=uu.prototype.I,uu.prototype.detect=uu.prototype.H,uu.prototype.setOptions=uu.prototype.A,uu.createFromModelPath=async function(e,t){return X(uu,e,{baseOptions:{modelAssetPath:t}})},uu.createFromModelBuffer=function(e,t){return X(uu,e,{baseOptions:{modelAssetBuffer:t}})},uu.createFromOptions=function(e,t){return X(uu,e,t)};var du=tu([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]),fu=tu([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]),pu=tu([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),mu=tu([474,475],[475,476],[476,477],[477,474]),hu=tu([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]),gu=tu([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),_u=tu([469,470],[470,471],[471,472],[472,469]),vu=tu([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]),yu=[...du,...fu,...pu,...hu,...gu,...vu],bu=tu([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 xu(e){e.m={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Z=class extends lu{constructor(e,t){super(new iu(e,t),`image_in`,`norm_rect`,!1),this.m={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,S(e=this.i=new ms,0,1,t=new U),this.C=new ps,S(this.i,0,3,this.C),this.v=new ls,S(this.i,0,2,this.v),hr(this.v,4,1),w(this.v,2,.5),w(this.C,2,.5),w(this.i,4,.5)}D(){return`FaceLandmarker`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`numFaces`in e&&hr(this.v,4,e.numFaces??1),`minFaceDetectionConfidence`in e&&w(this.v,2,e.minFaceDetectionConfidence??.5),`minTrackingConfidence`in e&&w(this.i,4,e.minTrackingConfidence??.5),`minFacePresenceConfidence`in e&&w(this.C,2,e.minFacePresenceConfidence??.5),`outputFaceBlendshapes`in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),`outputFacialTransformationMatrixes`in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}H(e,t){return xu(this),ou(this,e,t),this.m}I(e,t,n){return xu(this),su(this,e,n,t),this.m}u(){var e=new ko;V(e,`image_in`),V(e,`norm_rect`),H(e,`face_landmarks`);var t=new So;Ri(t,gs,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`NORM_LANDMARKS:face_landmarks`),n.A(t),Oo(e,n),this.h.attachProtoVectorListener(`face_landmarks`,(e,t)=>{for(let t of e)e=Uo(t),this.m.faceLandmarks.push(uc(e));K(this,t)}),this.h.attachEmptyPacketListener(`face_landmarks`,e=>{K(this,e)}),this.outputFaceBlendshapes&&(H(e,`blendshapes`),B(n,`BLENDSHAPES:blendshapes`),this.h.attachProtoVectorListener(`blendshapes`,(e,t)=>{if(this.outputFaceBlendshapes)for(let t of e)e=Fo(t),this.m.faceBlendshapes.push(sc(e.h()??[]));K(this,t)}),this.h.attachEmptyPacketListener(`blendshapes`,e=>{K(this,e)})),this.outputFacialTransformationMatrixes&&(H(e,`face_geometry`),B(n,`FACE_GEOMETRY:face_geometry`),this.h.attachProtoVectorListener(`face_geometry`,(e,t)=>{if(this.outputFacialTransformationMatrixes)for(let t of e)(e=x(e=fs(t),Wo,2))&&this.m.facialTransformationMatrixes.push({rows:fr(e,1)??0??0,columns:fr(e,2)??0??0,data:Wn(e,3,Pt,Un()).slice()??[]});K(this,t)}),this.h.attachEmptyPacketListener(`face_geometry`,e=>{K(this,e)})),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Z.prototype.detectForVideo=Z.prototype.I,Z.prototype.detect=Z.prototype.H,Z.prototype.setOptions=Z.prototype.A,Z.createFromModelPath=function(e,t){return X(Z,e,{baseOptions:{modelAssetPath:t}})},Z.createFromModelBuffer=function(e,t){return X(Z,e,{baseOptions:{modelAssetBuffer:t}})},Z.createFromOptions=function(e,t){return X(Z,e,t)},Z.FACE_LANDMARKS_LIPS=du,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS`,Z.FACE_LANDMARKS_LIPS),Z.FACE_LANDMARKS_LEFT_EYE=fu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE`,Z.FACE_LANDMARKS_LEFT_EYE),Z.FACE_LANDMARKS_LEFT_EYEBROW=pu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW`,Z.FACE_LANDMARKS_LEFT_EYEBROW),Z.FACE_LANDMARKS_LEFT_IRIS=mu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS`,Z.FACE_LANDMARKS_LEFT_IRIS),Z.FACE_LANDMARKS_RIGHT_EYE=hu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE`,Z.FACE_LANDMARKS_RIGHT_EYE),Z.FACE_LANDMARKS_RIGHT_EYEBROW=gu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW`,Z.FACE_LANDMARKS_RIGHT_EYEBROW),Z.FACE_LANDMARKS_RIGHT_IRIS=_u,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS`,Z.FACE_LANDMARKS_RIGHT_IRIS),Z.FACE_LANDMARKS_FACE_OVAL=vu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL`,Z.FACE_LANDMARKS_FACE_OVAL),Z.FACE_LANDMARKS_CONTOURS=yu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS`,Z.FACE_LANDMARKS_CONTOURS),Z.FACE_LANDMARKS_TESSELATION=bu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION`,Z.FACE_LANDMARKS_TESSELATION);var Su=tu([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 Cu(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function wu(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 Tu(e,t=!0){var n=[];for(let i of e){var r=Fo(i);e=[];for(let n of r.h())r=t&&fr(n,1)!=null?fr(n,1)??0:-1,e.push({score:C(n,2)??0,index:r,categoryName:_(v(n,3))??``??``,displayName:_(v(n,4))??``??``});n.push(e)}return n}var Eu=class extends lu{constructor(e,t){super(new iu(e,t),`image_in`,`norm_rect`,!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],S(e=this.m=new Cs,0,1,t=new U),this.v=new Ss,S(this.m,0,2,this.v),this.G=new xs,S(this.v,0,3,this.G),this.C=new bs,S(this.v,0,2,this.C),this.i=new ys,S(this.m,0,3,this.i),w(this.C,2,.5),w(this.v,4,.5),w(this.G,2,.5)}D(){return`GestureRecognizer`}get baseOptions(){return x(this.m,U,1)}set baseOptions(e){S(this.m,0,1,e)}A(e){if(hr(this.C,3,e.numHands??1),`minHandDetectionConfidence`in e&&w(this.C,2,e.minHandDetectionConfidence??.5),`minTrackingConfidence`in e&&w(this.v,4,e.minTrackingConfidence??.5),`minHandPresenceConfidence`in e&&w(this.G,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new _s,n=t,r=ac(e.cannedGesturesClassifierOptions,x(this.i,_s,3)?.l());S(n,0,2,r),S(this.i,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&x(this.i,_s,3)?.h();return e.customGesturesClassifierOptions?(S(n=t=new _s,0,2,r=ac(e.customGesturesClassifierOptions,x(this.i,_s,4)?.l())),S(this.i,0,4,t)):e.customGesturesClassifierOptions===void 0&&x(this.i,_s,4)?.h(),this.l(e)}Ya(e,t){return Cu(this),ou(this,e,t),wu(this)}Za(e,t,n){return Cu(this),su(this,e,n,t),wu(this)}u(){var e=new ko;V(e,`image_in`),V(e,`norm_rect`),H(e,`hand_gestures`),H(e,`hand_landmarks`),H(e,`world_hand_landmarks`),H(e,`handedness`);var t=new So;Ri(t,Os,this.m);var n=new wo;yr(n,2,`mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`HAND_GESTURES:hand_gestures`),B(n,`LANDMARKS:hand_landmarks`),B(n,`WORLD_LANDMARKS:world_hand_landmarks`),B(n,`HANDEDNESS:handedness`),n.A(t),Oo(e,n),this.h.attachProtoVectorListener(`hand_landmarks`,(e,t)=>{for(let t of e)e=Uo(t),this.landmarks.push(uc(e));K(this,t)}),this.h.attachEmptyPacketListener(`hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`world_hand_landmarks`,(e,t)=>{for(let t of e)e=Vo(t),this.worldLandmarks.push(dc(e));K(this,t)}),this.h.attachEmptyPacketListener(`world_hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`hand_gestures`,(e,t)=>{this.gestures.push(...Tu(e,!1)),K(this,t)}),this.h.attachEmptyPacketListener(`hand_gestures`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`handedness`,(e,t)=>{this.handedness.push(...Tu(e)),K(this,t)}),this.h.attachEmptyPacketListener(`handedness`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};function Du(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}Eu.prototype.recognizeForVideo=Eu.prototype.Za,Eu.prototype.recognize=Eu.prototype.Ya,Eu.prototype.setOptions=Eu.prototype.A,Eu.createFromModelPath=function(e,t){return X(Eu,e,{baseOptions:{modelAssetPath:t}})},Eu.createFromModelBuffer=function(e,t){return X(Eu,e,{baseOptions:{modelAssetBuffer:t}})},Eu.createFromOptions=function(e,t){return X(Eu,e,t)},Eu.HAND_CONNECTIONS=Su,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS`,Eu.HAND_CONNECTIONS);var Q=class extends lu{constructor(e,t){super(new iu(e,t),`image_in`,`norm_rect`,!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],S(e=this.i=new Ss,0,1,t=new U),this.v=new xs,S(this.i,0,3,this.v),this.m=new bs,S(this.i,0,2,this.m),hr(this.m,3,1),w(this.m,2,.5),w(this.v,2,.5),w(this.i,4,.5)}D(){return`HandLandmarker`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`numHands`in e&&hr(this.m,3,e.numHands??1),`minHandDetectionConfidence`in e&&w(this.m,2,e.minHandDetectionConfidence??.5),`minTrackingConfidence`in e&&w(this.i,4,e.minTrackingConfidence??.5),`minHandPresenceConfidence`in e&&w(this.v,2,e.minHandPresenceConfidence??.5),this.l(e)}H(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],ou(this,e,t),Du(this)}I(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],su(this,e,n,t),Du(this)}u(){var e=new ko;V(e,`image_in`),V(e,`norm_rect`),H(e,`hand_landmarks`),H(e,`world_hand_landmarks`),H(e,`handedness`);var t=new So;Ri(t,ks,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`LANDMARKS:hand_landmarks`),B(n,`WORLD_LANDMARKS:world_hand_landmarks`),B(n,`HANDEDNESS:handedness`),n.A(t),Oo(e,n),this.h.attachProtoVectorListener(`hand_landmarks`,(e,t)=>{for(let t of e)e=Uo(t),this.landmarks.push(uc(e));K(this,t)}),this.h.attachEmptyPacketListener(`hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`world_hand_landmarks`,(e,t)=>{for(let t of e)e=Vo(t),this.worldLandmarks.push(dc(e));K(this,t)}),this.h.attachEmptyPacketListener(`world_hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoVectorListener(`handedness`,(e,t)=>{var n=this.handedness,r=n.push,i=[];for(let t of e){e=Fo(t);let n=[];for(let t of e.h())n.push({score:C(t,2)??0,index:fr(t,1)??0??-1,categoryName:_(v(t,3))??``??``,displayName:_(v(t,4))??``??``});i.push(n)}r.call(n,...i),K(this,t)}),this.h.attachEmptyPacketListener(`handedness`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Q.prototype.detectForVideo=Q.prototype.I,Q.prototype.detect=Q.prototype.H,Q.prototype.setOptions=Q.prototype.A,Q.createFromModelPath=function(e,t){return X(Q,e,{baseOptions:{modelAssetPath:t}})},Q.createFromModelBuffer=function(e,t){return X(Q,e,{baseOptions:{modelAssetBuffer:t}})},Q.createFromOptions=function(e,t){return X(Q,e,t)},Q.HAND_CONNECTIONS=Su,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS`,Q.HAND_CONNECTIONS);var Ou=tu([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 ku(e){e.i={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Au(e){try{if(!e.G)return e.i;e.G(e.i)}finally{pl(e)}}function ju(e,t){e=Uo(e),t.push(uc(e))}var $=class extends lu{constructor(e,t){super(new iu(e,t),`input_frames_image`,null,!1),this.i={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,S(e=this.m=new Ns,0,1,t=new U),this.Z=new xs,S(this.m,0,2,this.Z),this.Ba=new As,S(this.m,0,3,this.Ba),this.v=new ls,S(this.m,0,4,this.v),this.P=new ps,S(this.m,0,5,this.P),this.C=new js,S(this.m,0,6,this.C),this.aa=new Ms,S(this.m,0,7,this.aa),w(this.v,2,.5),w(this.v,3,.3),w(this.P,2,.5),w(this.C,2,.5),w(this.C,3,.3),w(this.aa,2,.5),w(this.Z,2,.5)}D(){return`HolisticLandmarker`}get baseOptions(){return x(this.m,U,1)}set baseOptions(e){S(this.m,0,1,e)}A(e){return`minFaceDetectionConfidence`in e&&w(this.v,2,e.minFaceDetectionConfidence??.5),`minFaceSuppressionThreshold`in e&&w(this.v,3,e.minFaceSuppressionThreshold??.3),`minFacePresenceConfidence`in e&&w(this.P,2,e.minFacePresenceConfidence??.5),`outputFaceBlendshapes`in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),`minPoseDetectionConfidence`in e&&w(this.C,2,e.minPoseDetectionConfidence??.5),`minPoseSuppressionThreshold`in e&&w(this.C,3,e.minPoseSuppressionThreshold??.3),`minPosePresenceConfidence`in e&&w(this.aa,2,e.minPosePresenceConfidence??.5),`outputPoseSegmentationMasks`in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),`minHandLandmarksConfidence`in e&&w(this.Z,2,e.minHandLandmarksConfidence??.5),this.l(e)}H(e,t,n){var r=typeof t==`function`?{}:t;return this.G=typeof t==`function`?t:n,ku(this),ou(this,e,r),Au(this)}I(e,t,n,r){var i=typeof n==`function`?{}:n;return this.G=typeof n==`function`?n:r,ku(this),su(this,e,i,t),Au(this)}u(){var e=new ko;V(e,`input_frames_image`),H(e,`pose_landmarks`),H(e,`pose_world_landmarks`),H(e,`face_landmarks`),H(e,`left_hand_landmarks`),H(e,`left_hand_world_landmarks`),H(e,`right_hand_landmarks`),H(e,`right_hand_world_landmarks`);var t=new So,n=new to;yr(n,1,`type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions`),function(e,t){if(t!=null){if(Array.isArray(t))y(e,2,Cn(t,0,Tn));else{if(!(typeof t==`string`||t instanceof xe||ge(t)))throw Error(`invalid value in Any.value field: `+t+` expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array`);Zn(e,2,Xe(t,!1),ve())}}}(n,this.m.h());var r=new wo;yr(r,2,`mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph`),dr(r,8,to,n),z(r,`IMAGE:input_frames_image`),B(r,`POSE_LANDMARKS:pose_landmarks`),B(r,`POSE_WORLD_LANDMARKS:pose_world_landmarks`),B(r,`FACE_LANDMARKS:face_landmarks`),B(r,`LEFT_HAND_LANDMARKS:left_hand_landmarks`),B(r,`LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks`),B(r,`RIGHT_HAND_LANDMARKS:right_hand_landmarks`),B(r,`RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks`),r.A(t),Oo(e,r),dl(this,e),this.h.attachProtoListener(`pose_landmarks`,(e,t)=>{ju(e,this.i.poseLandmarks),K(this,t)}),this.h.attachEmptyPacketListener(`pose_landmarks`,e=>{K(this,e)}),this.h.attachProtoListener(`pose_world_landmarks`,(e,t)=>{var n=this.i.poseWorldLandmarks;e=Vo(e),n.push(dc(e)),K(this,t)}),this.h.attachEmptyPacketListener(`pose_world_landmarks`,e=>{K(this,e)}),this.outputPoseSegmentationMasks&&(B(r,`POSE_SEGMENTATION_MASK:pose_segmentation_mask`),fl(this,`pose_segmentation_mask`),this.h.ha(`pose_segmentation_mask`,(e,t)=>{this.i.poseSegmentationMasks=[cu(this,e,!0,!this.G)],K(this,t)}),this.h.attachEmptyPacketListener(`pose_segmentation_mask`,e=>{this.i.poseSegmentationMasks=[],K(this,e)})),this.h.attachProtoListener(`face_landmarks`,(e,t)=>{ju(e,this.i.faceLandmarks),K(this,t)}),this.h.attachEmptyPacketListener(`face_landmarks`,e=>{K(this,e)}),this.outputFaceBlendshapes&&(H(e,`extra_blendshapes`),B(r,`FACE_BLENDSHAPES:extra_blendshapes`),this.h.attachProtoListener(`extra_blendshapes`,(e,t)=>{var n=this.i.faceBlendshapes;this.outputFaceBlendshapes&&(e=Fo(e),n.push(sc(e.h()??[]))),K(this,t)}),this.h.attachEmptyPacketListener(`extra_blendshapes`,e=>{K(this,e)})),this.h.attachProtoListener(`left_hand_landmarks`,(e,t)=>{ju(e,this.i.leftHandLandmarks),K(this,t)}),this.h.attachEmptyPacketListener(`left_hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoListener(`left_hand_world_landmarks`,(e,t)=>{var n=this.i.leftHandWorldLandmarks;e=Vo(e),n.push(dc(e)),K(this,t)}),this.h.attachEmptyPacketListener(`left_hand_world_landmarks`,e=>{K(this,e)}),this.h.attachProtoListener(`right_hand_landmarks`,(e,t)=>{ju(e,this.i.rightHandLandmarks),K(this,t)}),this.h.attachEmptyPacketListener(`right_hand_landmarks`,e=>{K(this,e)}),this.h.attachProtoListener(`right_hand_world_landmarks`,(e,t)=>{var n=this.i.rightHandWorldLandmarks;e=Vo(e),n.push(dc(e)),K(this,t)}),this.h.attachEmptyPacketListener(`right_hand_world_landmarks`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};$.prototype.detectForVideo=$.prototype.I,$.prototype.detect=$.prototype.H,$.prototype.setOptions=$.prototype.A,$.createFromModelPath=function(e,t){return X($,e,{baseOptions:{modelAssetPath:t}})},$.createFromModelBuffer=function(e,t){return X($,e,{baseOptions:{modelAssetBuffer:t}})},$.createFromOptions=function(e,t){return X($,e,t)},$.HAND_CONNECTIONS=Su,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.HAND_CONNECTIONS`,$.HAND_CONNECTIONS),$.POSE_CONNECTIONS=Ou,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.POSE_CONNECTIONS`,$.POSE_CONNECTIONS),$.FACE_LANDMARKS_LIPS=du,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LIPS`,$.FACE_LANDMARKS_LIPS),$.FACE_LANDMARKS_LEFT_EYE=fu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYE`,$.FACE_LANDMARKS_LEFT_EYE),$.FACE_LANDMARKS_LEFT_EYEBROW=pu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYEBROW`,$.FACE_LANDMARKS_LEFT_EYEBROW),$.FACE_LANDMARKS_LEFT_IRIS=mu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_IRIS`,$.FACE_LANDMARKS_LEFT_IRIS),$.FACE_LANDMARKS_RIGHT_EYE=hu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYE`,$.FACE_LANDMARKS_RIGHT_EYE),$.FACE_LANDMARKS_RIGHT_EYEBROW=gu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW`,$.FACE_LANDMARKS_RIGHT_EYEBROW),$.FACE_LANDMARKS_RIGHT_IRIS=_u,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_IRIS`,$.FACE_LANDMARKS_RIGHT_IRIS),$.FACE_LANDMARKS_FACE_OVAL=vu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_FACE_OVAL`,$.FACE_LANDMARKS_FACE_OVAL),$.FACE_LANDMARKS_CONTOURS=yu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_CONTOURS`,$.FACE_LANDMARKS_CONTOURS),$.FACE_LANDMARKS_TESSELATION=bu,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_TESSELATION`,$.FACE_LANDMARKS_TESSELATION);var Mu=class extends lu{constructor(e,t){super(new iu(e,t),`input_image`,`norm_rect`,!0),this.m={classifications:[]},S(e=this.i=new Is,0,1,t=new U)}D(){return`ImageClassifier`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return S(this.i,0,2,ac(e,x(this.i,es,2))),this.l(e)}Ha(e,t){return this.m={classifications:[]},ou(this,e,t),this.m}Ia(e,t,n){return this.m={classifications:[]},su(this,e,n,t),this.m}u(){var e=new ko;V(e,`input_image`),V(e,`norm_rect`),H(e,`classifications`);var t=new So;Ri(t,Ls,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.image_classifier.ImageClassifierGraph`),z(n,`IMAGE:input_image`),z(n,`NORM_RECT:norm_rect`),B(n,`CLASSIFICATIONS:classifications`),n.A(t),Oo(e,n),this.h.attachProtoListener(`classifications`,(e,t)=>{this.m=cc(Jo(e)),K(this,t)}),this.h.attachEmptyPacketListener(`classifications`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Mu.prototype.classifyForVideo=Mu.prototype.Ia,Mu.prototype.classify=Mu.prototype.Ha,Mu.prototype.setOptions=Mu.prototype.A,Mu.createFromModelPath=function(e,t){return X(Mu,e,{baseOptions:{modelAssetPath:t}})},Mu.createFromModelBuffer=function(e,t){return X(Mu,e,{baseOptions:{modelAssetBuffer:t}})},Mu.createFromOptions=function(e,t){return X(Mu,e,t)};var Nu=class extends lu{constructor(e,t){super(new iu(e,t),`image_in`,`norm_rect`,!0),this.i=new Rs,this.embeddings={embeddings:[]},S(e=this.i,0,1,t=new U)}D(){return`ImageEmbedder`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){var t=this.i,n=x(this.i,ns,2);if(n=n?n.clone():new ns,e.l2Normalize!==void 0){var r=e.l2Normalize;y(n,1,r==null?r:Ft(r))}else`l2Normalize`in e&&y(n,1);return e.quantize===void 0?`quantize`in e&&y(n,2):y(n,2,(r=e.quantize)==null?r:Ft(r)),S(t,0,2,n),this.l(e)}Oa(e,t){return ou(this,e,t),this.embeddings}Pa(e,t,n){return su(this,e,n,t),this.embeddings}u(){var e=new ko;V(e,`image_in`),V(e,`norm_rect`),H(e,`embeddings_out`);var t=new So;Ri(t,zs,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`EMBEDDINGS:embeddings_out`),n.A(t),Oo(e,n),this.h.attachProtoListener(`embeddings_out`,(e,t)=>{e=$o(e),this.embeddings=function(e){return{embeddings:or(e,Zo,1).map(e=>{var t={headIndex:fr(e,3)??0??-1,headName:_(v(e,4))??``??``};if(Hn(e,Yo,1,Qo))e=Wn(e=pr(e,Yo,1,Qo),1,Pt,Un()),t.floatEmbedding=e.slice();else{let n=/* @__PURE__ */ new Uint8Array;t.quantizedEmbedding=pr(e,Xo,2,Qo)?.h()?.i()??n}return t}),timestampMs:oc(v(e,2,void 0,Xt)??zn)}}(e),K(this,t)}),this.h.attachEmptyPacketListener(`embeddings_out`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Nu.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=pc(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error(`Cannot compute cosine similarity between quantized and float embeddings.`);e=pc(fc(e.quantizedEmbedding),fc(t.quantizedEmbedding))}return e},Nu.prototype.embedForVideo=Nu.prototype.Pa,Nu.prototype.embed=Nu.prototype.Oa,Nu.prototype.setOptions=Nu.prototype.A,Nu.createFromModelPath=function(e,t){return X(Nu,e,{baseOptions:{modelAssetPath:t}})},Nu.createFromModelBuffer=function(e,t){return X(Nu,e,{baseOptions:{modelAssetBuffer:t}})},Nu.createFromOptions=function(e,t){return X(Nu,e,t)};var Pu=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 Fu(e){var t=function(e){return or(e,wo,1)}(e.ka()).filter(e=>(_(v(e,1))??``).includes(`mediapipe.tasks.TensorsToSegmentationCalculator`));if(e.v=[],t.length>1)throw Error(`The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.`);t.length===1&&(x(t[0],So,7)?.u()?.h()??/* @__PURE__ */ new Map).forEach((t,n)=>{e.v[Number(n)]=_(v(t,1))??``})}function Iu(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function Lu(e){try{let t=new Pu(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.m)return t;e.m(t)}finally{pl(e)}}Pu.prototype.close=Pu.prototype.close;var Ru=class extends lu{constructor(e,t){super(new iu(e,t),`image_in`,`norm_rect`,!1),this.v=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.i=new Ws,this.C=new Bs,S(this.i,0,3,this.C),S(e=this.i,0,1,t=new U)}D(){return`ImageSegmenter`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return e.displayNamesLocale===void 0?`displayNamesLocale`in e&&y(this.i,2):y(this.i,2,en(e.displayNamesLocale)),`outputCategoryMask`in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),`outputConfidenceMasks`in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}M(){Fu(this)}segment(e,t,n){var r=typeof t==`function`?{}:t;return this.m=typeof t==`function`?t:n,Iu(this),ou(this,e,r),Lu(this)}fb(e,t,n,r){var i=typeof n==`function`?{}:n;return this.m=typeof n==`function`?n:r,Iu(this),su(this,e,i,t),Lu(this)}Sa(){return this.v}u(){var e=new ko;V(e,`image_in`),V(e,`norm_rect`);var t=new So;Ri(t,Gs,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),n.A(t),Oo(e,n),dl(this,e),this.outputConfidenceMasks&&(H(e,`confidence_masks`),B(n,`CONFIDENCE_MASKS:confidence_masks`),fl(this,`confidence_masks`),this.h.ia(`confidence_masks`,(e,t)=>{this.confidenceMasks=e.map(e=>cu(this,e,!0,!this.m)),K(this,t)}),this.h.attachEmptyPacketListener(`confidence_masks`,e=>{this.confidenceMasks=[],K(this,e)})),this.outputCategoryMask&&(H(e,`category_mask`),B(n,`CATEGORY_MASK:category_mask`),fl(this,`category_mask`),this.h.ha(`category_mask`,(e,t)=>{this.categoryMask=cu(this,e,!1,!this.m),K(this,t)}),this.h.attachEmptyPacketListener(`category_mask`,e=>{this.categoryMask=void 0,K(this,e)})),H(e,`quality_scores`),B(n,`QUALITY_SCORES:quality_scores`),this.h.attachFloatVectorListener(`quality_scores`,(e,t)=>{this.qualityScores=e,K(this,t)}),this.h.attachEmptyPacketListener(`quality_scores`,e=>{this.categoryMask=void 0,K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Ru.prototype.getLabels=Ru.prototype.Sa,Ru.prototype.segmentForVideo=Ru.prototype.fb,Ru.prototype.segment=Ru.prototype.segment,Ru.prototype.setOptions=Ru.prototype.A,Ru.createFromModelPath=function(e,t){return X(Ru,e,{baseOptions:{modelAssetPath:t}})},Ru.createFromModelBuffer=function(e,t){return X(Ru,e,{baseOptions:{modelAssetBuffer:t}})},Ru.createFromOptions=function(e,t){return X(Ru,e,t)};var zu={0:0,1:1,2:2,3:3};function Bu(){return Jc()?void 0:document.createElement(`canvas`)}var Vu=class extends ml{constructor(e,t){super(new al(e,t)),this.v=new Cl,this.delegate=`CPU`,this.i=0,this.baseOptions=new U,this.C=this.m=0}D(){return`InteractiveSegmenter`}get j(){return this.h.j}A(e){return this.delegate=e.baseOptions?.delegate??`CPU`,super.l(e)}gb(e){if(this.i===0)throw Error(`Segmenter is not initialized.`);var t;if(this.m!==0&&(this.j._free(this.m),this.m=0),!(t=typeof ImageData<`u`&&e instanceof ImageData)){if(typeof e!=`object`||!e)t=!1;else{t=e.data;var n=e.width,r=e.height;t=Number.isInteger(n)&&n>0&&Number.isInteger(r)&&r>0&&(t instanceof Uint8ClampedArray||t instanceof Uint8Array)}}if(t)t=e.width,n=e.height,e=e.data;else{if([t,n]=Xc(e),typeof OffscreenCanvas<`u`)r=new OffscreenCanvas(t,n);else{if(typeof document>`u`)throw Error(`Canvas is not supported in this environment.`);r=document.createElement(`canvas`)}if(r.width=t,r.height=n,!(r=r.getContext(`2d`)))throw Error(`Canvas 2D context is not supported in this environment.`);r.drawImage(e,0,0),e=r.getImageData(0,0,t,n).data}if(!e)throw Error(`Unsupported image source or failed to extract image pixels.`);r=function({Xa:e,width:t,height:n}){if(t<=0||n<=0)throw Error(`Invalid image dimensions: ${t}x${n}. Dimensions must be positive.`);if(e%(t*n)!==0)throw Error(`Invalid image dimensions or pixel data length. Pixel data length ${e} is not a multiple of the number of pixels (${t*n}).`);if((e/=t*n)!==4&&e!==3&&e!==1)throw Error(`Invalid image dimensions or pixel data length. Calculated channels: ${e}. Expected 1, 3, or 4.`);return e}({Xa:e.length,width:t,height:n});var i=this.j._malloc(e.length);if(this.j.HEAPU8.set(e,i),this.m=i,!this.j._interactive_segmenter_set_image(this.i,i,t,n,r))throw Error(`Failed to set image on native engine.`)}segment(e){if(this.i===0)throw Error(`Segmenter is not initialized.`);var t=function(e){e=e.map(({isCompleted:e,brushMode:t,point:n})=>{t=zu[t]??0,n=n.map(({x:e,y:t})=>{var n=new Ks;return vr(n,1,e),vr(n,2,t),n});var r=new qs;return mr(r,e),Zn(r,1,Rt(t),0),lr(r,2,n),r});var t=new Js;return lr(t,1,e),Ys(t)}(e);e=this.j._malloc(t.length),this.j.HEAPU8.set(t,e);var n=this.j._malloc(12),r=n+4,i=n+8,a=0,o=this.C++;try{if(this.o){if(this.delegate===`GPU`){var s=this.o;++s.h.U,s.i.set(o,performance.now())}else{var c=this.o;++c.h.R,c.i.set(o,performance.now())}}if((a=this.j._interactive_segmenter_segment(this.i,e,t.length,n,r,i))===0)throw Error(`Segmentation failed.`);this.o?.Aa(o);let u=this.j.HEAPU32[n/4],d=this.j.HEAPU32[r/4],ee=new Float32Array(this.j.HEAPU8.buffer,a,this.j.HEAPU32[i/4]/4);var l=new Float32Array(ee);if(s=u*d,(l instanceof Uint8Array||l instanceof Float32Array)&&l.length!==s)throw Error(`Unsupported channel count: `+l.length/s);return new J([l],!0,!1,this.h.j.canvas??void 0,this.v,u,d)}finally{e!==0&&this.j._free(e),n!==0&&this.j._free(n),a!==0&&this.j._free(a)}}u(){this.i!==0&&(this.o?.ya(),this.j._interactive_segmenter_close(this.i),this.i=0),this.m!==0&&(this.j._free(this.m),this.m=0);var e=new is;if(this.delegate===`GPU`){var t=new uo;cr(e,2,as,t)}else hr(t=new bo,1,4),cr(e,1,as,t);if(S(this.baseOptions,0,3,e),e=cs(this.baseOptions),t=this.j._malloc(e.length),this.j.HEAPU8.set(e,t),this.i=this.j._interactive_segmenter_create(t,e.length),this.j._free(t),this.i===0)throw Error(`Failed to create native InteractiveSegmenter engine.`);this.o?.za()}close(){this.i!==0&&(this.j._interactive_segmenter_close(this.i),this.i=0),this.m!==0&&(this.j._free(this.m),this.m=0),this.v.close(),super.close()}};Vu.prototype.close=Vu.prototype.close,Vu.prototype.segment=Vu.prototype.segment,Vu.prototype.setImage=Vu.prototype.gb,Vu.prototype.setOptions=Vu.prototype.A,Vu.createFromModelPath=function(e,t){return sl(Vu,Bu(),e,{baseOptions:{modelAssetPath:t}})},Vu.createFromModelBuffer=function(e,t){return sl(Vu,Bu(),e,{baseOptions:{modelAssetBuffer:t}})},Vu.createFromOptions=function(e,t){return sl(Vu,t.canvas??Bu(),e,t)};var Hu=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){this.confidenceMasks?.forEach(e=>{e.close()}),this.categoryMask?.close()}};Hu.prototype.close=Hu.prototype.close;var Uu=class extends lu{constructor(e,t){super(new iu(e,t),`image_in`,`norm_rect_in`,!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.i=new Ws,this.v=new Bs,S(this.i,0,3,this.v),S(e=this.i,0,1,t=new U)}D(){return`InteractiveSegmenterLegacy`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`outputCategoryMask`in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),`outputConfidenceMasks`in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,r){var i=typeof n==`function`?{}:n;if(this.m=typeof n==`function`?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.J+1,r=new $s,t.keypoint&&t.scribble)throw Error(`Cannot provide both keypoint and scribble.`);if(t.keypoint){var a=new Xs;mr(a,!0),vr(a,1,t.keypoint.x),vr(a,2,t.keypoint.y),cr(r,1,ec,a)}else{if(!t.scribble)throw Error(`Must provide either a keypoint or a scribble.`);{let e=new Qs;for(a of t.scribble)mr(t=new Xs,!0),vr(t,1,a.x),vr(t,2,a.y),dr(e,1,Xs,t);cr(r,2,ec,e)}}this.h.addProtoToStream(r.h(),`mediapipe.tasks.vision.interactive_segmenter_legacy.proto.RegionOfInterest`,`roi_in`,n),ou(this,e,i);t:{try{let e=new Hu(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.m){var o=e;break t}this.m(e)}finally{pl(this)}o=void 0}return o}u(){var e=new ko;V(e,`image_in`),V(e,`roi_in`),V(e,`norm_rect_in`);var t=new So;Ri(t,Gs,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.interactive_segmenter_legacy.InteractiveSegmenterLegacyGraph`),z(n,`IMAGE:image_in`),z(n,`ROI:roi_in`),z(n,`NORM_RECT:norm_rect_in`),n.A(t),Oo(e,n),dl(this,e),this.outputConfidenceMasks&&(H(e,`confidence_masks`),B(n,`CONFIDENCE_MASKS:confidence_masks`),fl(this,`confidence_masks`),this.h.ia(`confidence_masks`,(e,t)=>{this.confidenceMasks=e.map(e=>cu(this,e,!0,!this.m)),K(this,t)}),this.h.attachEmptyPacketListener(`confidence_masks`,e=>{this.confidenceMasks=[],K(this,e)})),this.outputCategoryMask&&(H(e,`category_mask`),B(n,`CATEGORY_MASK:category_mask`),fl(this,`category_mask`),this.h.ha(`category_mask`,(e,t)=>{this.categoryMask=cu(this,e,!1,!this.m),K(this,t)}),this.h.attachEmptyPacketListener(`category_mask`,e=>{this.categoryMask=void 0,K(this,e)})),H(e,`quality_scores`),B(n,`QUALITY_SCORES:quality_scores`),this.h.attachFloatVectorListener(`quality_scores`,(e,t)=>{this.qualityScores=e,K(this,t)}),this.h.attachEmptyPacketListener(`quality_scores`,e=>{this.categoryMask=void 0,K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Uu.prototype.segment=Uu.prototype.segment,Uu.prototype.setOptions=Uu.prototype.A,Uu.createFromModelPath=function(e,t){return X(Uu,e,{baseOptions:{modelAssetPath:t}})},Uu.createFromModelBuffer=function(e,t){return X(Uu,e,{baseOptions:{modelAssetBuffer:t}})},Uu.createFromOptions=function(e,t){return X(Uu,e,t)};var Wu=class extends lu{constructor(e,t){super(new iu(e,t),`input_frame_gpu`,`norm_rect`,!1),this.m={detections:[]},S(e=this.i=new tc,0,1,t=new U)}D(){return`ObjectDetector`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return e.displayNamesLocale===void 0?`displayNamesLocale`in e&&y(this.i,2):y(this.i,2,en(e.displayNamesLocale)),e.maxResults===void 0?`maxResults`in e&&y(this.i,3):hr(this.i,3,e.maxResults),e.scoreThreshold===void 0?`scoreThreshold`in e&&y(this.i,4):w(this.i,4,e.scoreThreshold),e.categoryAllowlist===void 0?`categoryAllowlist`in e&&y(this.i,5):br(this.i,5,e.categoryAllowlist),e.categoryDenylist===void 0?`categoryDenylist`in e&&y(this.i,6):br(this.i,6,e.categoryDenylist),this.l(e)}H(e,t){return this.m={detections:[]},ou(this,e,t),this.m}I(e,t,n){return this.m={detections:[]},su(this,e,n,t),this.m}u(){var e=new ko;V(e,`input_frame_gpu`),V(e,`norm_rect`),H(e,`detections`);var t=new So;Ri(t,nc,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.ObjectDetectorGraph`),z(n,`IMAGE:input_frame_gpu`),z(n,`NORM_RECT:norm_rect`),B(n,`DETECTIONS:detections`),n.A(t),Oo(e,n),this.h.attachProtoVectorListener(`detections`,(e,t)=>{for(let t of e)e=zo(t),this.m.detections.push(lc(e));K(this,t)}),this.h.attachEmptyPacketListener(`detections`,e=>{K(this,e)}),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Wu.prototype.detectForVideo=Wu.prototype.I,Wu.prototype.detect=Wu.prototype.H,Wu.prototype.setOptions=Wu.prototype.A,Wu.createFromModelPath=async function(e,t){return X(Wu,e,{baseOptions:{modelAssetPath:t}})},Wu.createFromModelBuffer=function(e,t){return X(Wu,e,{baseOptions:{modelAssetBuffer:t}})},Wu.createFromOptions=function(e,t){return X(Wu,e,t)};var Gu=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach(e=>{e.close()})}};function Ku(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function qu(e){try{let t=new Gu(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.v)return t;e.v(t)}finally{pl(e)}}Gu.prototype.close=Gu.prototype.close;var Ju=class extends lu{constructor(e,t){super(new iu(e,t),`image_in`,`norm_rect`,!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,S(e=this.i=new rc,0,1,t=new U),this.C=new Ms,S(this.i,0,3,this.C),this.m=new js,S(this.i,0,2,this.m),hr(this.m,4,1),w(this.m,2,.5),w(this.C,2,.5),w(this.i,4,.5)}D(){return`PoseLandmarker`}get baseOptions(){return x(this.i,U,1)}set baseOptions(e){S(this.i,0,1,e)}A(e){return`numPoses`in e&&hr(this.m,4,e.numPoses??1),`minPoseDetectionConfidence`in e&&w(this.m,2,e.minPoseDetectionConfidence??.5),`minTrackingConfidence`in e&&w(this.i,4,e.minTrackingConfidence??.5),`minPosePresenceConfidence`in e&&w(this.C,2,e.minPosePresenceConfidence??.5),`outputSegmentationMasks`in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}H(e,t,n){var r=typeof t==`function`?{}:t;return this.v=typeof t==`function`?t:n,Ku(this),ou(this,e,r),qu(this)}I(e,t,n,r){var i=typeof n==`function`?{}:n;return this.v=typeof n==`function`?n:r,Ku(this),su(this,e,i,t),qu(this)}u(){var e=new ko;V(e,`image_in`),V(e,`norm_rect`),H(e,`normalized_landmarks`),H(e,`world_landmarks`),H(e,`segmentation_masks`);var t=new So;Ri(t,ic,this.i);var n=new wo;yr(n,2,`mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph`),z(n,`IMAGE:image_in`),z(n,`NORM_RECT:norm_rect`),B(n,`NORM_LANDMARKS:normalized_landmarks`),B(n,`WORLD_LANDMARKS:world_landmarks`),n.A(t),Oo(e,n),dl(this,e),this.h.attachProtoVectorListener(`normalized_landmarks`,(e,t)=>{this.landmarks=[];for(let t of e)e=Uo(t),this.landmarks.push(uc(e));K(this,t)}),this.h.attachEmptyPacketListener(`normalized_landmarks`,e=>{this.landmarks=[],K(this,e)}),this.h.attachProtoVectorListener(`world_landmarks`,(e,t)=>{this.worldLandmarks=[];for(let t of e)e=Vo(t),this.worldLandmarks.push(dc(e));K(this,t)}),this.h.attachEmptyPacketListener(`world_landmarks`,e=>{this.worldLandmarks=[],K(this,e)}),this.outputSegmentationMasks&&(B(n,`SEGMENTATION_MASK:segmentation_masks`),fl(this,`segmentation_masks`),this.h.ia(`segmentation_masks`,(e,t)=>{this.segmentationMasks=e.map(e=>cu(this,e,!0,!this.v)),K(this,t)}),this.h.attachEmptyPacketListener(`segmentation_masks`,e=>{this.segmentationMasks=[],K(this,e)})),e=e.h(),this.setGraph(new Uint8Array(e),!0)}};Ju.prototype.detectForVideo=Ju.prototype.I,Ju.prototype.detect=Ju.prototype.H,Ju.prototype.setOptions=Ju.prototype.A,Ju.createFromModelPath=function(e,t){return X(Ju,e,{baseOptions:{modelAssetPath:t}})},Ju.createFromModelBuffer=function(e,t){return X(Ju,e,{baseOptions:{modelAssetBuffer:t}})},Ju.createFromOptions=function(e,t){return X(Ju,e,t)},Ju.POSE_CONNECTIONS=Ou,n(`module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS`,Ju.POSE_CONNECTIONS);function Yu(e){try{return new URL(typeof e==`string`?e:e instanceof URL?e.href:e.url,globalThis.location?.href).hostname}catch{return``}}function Xu(e){let t=e.fetch,n=(n,r)=>Yu(n)===`odml.pa.googleapis.com`?Promise.reject(/* @__PURE__ */ TypeError(`MediaPipe’s usage log is off`)):t.call(e,n,r);return e.fetch=n,()=>{e.fetch===n&&(e.fetch=t)}}let Zu=null,Qu=`GPU`,$u=null,ed=[],td=!1,nd=()=>void 0,rd=e=>self.postMessage(e);Xu(self);function id(){try{let e=new OffscreenCanvas(1,1).getContext(`webgl2`);if(!e)return!0;let t=e.getExtension(`WEBGL_debug_renderer_info`),n=String(t?e.getParameter(t.UNMASKED_RENDERER_WEBGL):e.getParameter(e.RENDERER));return/swiftshader|llvmpipe|softpipe|software|basic render/i.test(n)}catch{return!0}}async function ad(e){let t=await vc.forVisionTasks(e.wasm,!0),n=e.numHands;$u=r=>Q.createFromOptions(t,{baseOptions:{modelAssetPath:e.model,delegate:r},runningMode:`VIDEO`,numHands:n,minHandDetectionConfidence:.6,minHandPresenceConfidence:.6,minTrackingConfidence:.5,...r===`GPU`?{canvas:new OffscreenCanvas(1,1)}:{}}),nd=e=>n=e,Qu=id()?`CPU`:`GPU`;try{Zu=await $u(Qu)}catch{Qu=`CPU`,Zu=await $u(`CPU`)}rd({type:`ready`,delegate:Qu})}async function od(){if(!td&&$u){td=!0;try{let e=await $u(`CPU`);Zu?.close(),Zu=e,Qu=`CPU`,rd({type:`delegate`,delegate:Qu})}catch{}}}self.onmessage=e=>{let t=e.data;switch(t.type){case`init`:ad(t).catch(e=>rd({type:`failed`,message:e instanceof Error?e.message:String(e)}));return;case`frame`:try{if(!Zu)return rd({type:`result`,t:t.t,aspect:t.aspect,hands:[]});let e=performance.now(),n=Zu.detectForVideo(t.image,t.t),r=performance.now()-e;if(Qu===`GPU`&&ed.length<12){ed.push(r);let e=ed.slice(2).sort((e,t)=>e-t);ed.length===12&&e[Math.floor(e.length/2)]>70&&od()}let i=n.landmarks.map((e,t)=>({landmarks:e,handedness:n.handedness[t]?.[0]?.categoryName===`Left`?`Left`:`Right`,score:n.handedness[t]?.[0]?.score??0}));rd({type:`result`,t:t.t,aspect:t.aspect,hands:i,ms:r})}catch(e){rd({type:`result`,t:t.t,aspect:t.aspect,hands:[],error:e instanceof Error?e.message:String(e)})}finally{t.image.close()}return;case`numHands`:nd(t.n),Zu?.setOptions({numHands:t.n}).catch(()=>void 0);return;case`close`:Zu?.close(),Zu=null;return}}})();
|
|
Binary file
|
|
Binary file
|