deepar 5.5.2 → 5.6.0-alpha-141

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.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.__deeparDynamicJsModule_mediaPipe__=e():t.__deeparDynamicJsModule_mediaPipe__=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{FilesetResolver:()=>Po,ImageSegmenter:()=>Tc});var n="undefined"!=typeof self?self:{};function r(t,e){t:{for(var r=["CLOSURE_FLAGS"],i=n,s=0;s<r.length;s++)if(null==(i=i[r[s]])){r=null;break t}r=i}return null!=(t=r&&r[t])?t:e}function i(){throw Error("Invalid UTF8")}function s(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let o,a;const c="undefined"!=typeof TextDecoder;let h;const u="undefined"!=typeof TextEncoder;function l(t){if(u)t=(h||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&i<t.length){const s=t.charCodeAt(++i);if(56320<=s&&57343>=s){e=1024*(e-55296)+s-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var f,d=r(610401301,!1),p=r(572417392,!0);const g=n.navigator;function m(t){return!!d&&!!f&&f.brands.some((({brand:e})=>e&&-1!=e.indexOf(t)))}function y(t){var e;return(e=n.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}function v(){return!!d&&!!f&&0<f.brands.length}function _(){return v()?m("Chromium"):(y("Chrome")||y("CriOS"))&&!(!v()&&y("Edge"))||y("Silk")}f=g&&g.userAgentData||null;var w=!v()&&(y("Trident")||y("MSIE"));!y("Android")||_(),_(),y("Safari")&&(_()||!v()&&y("Coast")||!v()&&y("Opera")||!v()&&y("Edge")||(v()?m("Microsoft Edge"):y("Edg/"))||v()&&m("Opera"));var T={},E=null;function b(){if(!E){E={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));T[n]=r;for(var i=0;i<r.length;i++){var s=r[i];void 0===E[s]&&(E[s]=i)}}}}var A="undefined"!=typeof Uint8Array,x=!w&&"function"==typeof btoa;function k(t){if(!x){var e;void 0===e&&(e=0),b(),e=T[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let c=0,h=0;for(;c<t.length-2;c+=3){var i=t[c],s=t[c+1],o=t[c+2],a=e[i>>2];i=e[(3&i)<<4|s>>4],s=e[(15&s)<<2|o>>6],o=e[63&o],n[h++]=a+i+s+o}switch(a=0,o=r,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||r;case 1:t=t[c],n[h]=e[t>>2]+e[(3&t)<<4|a>>4]+o+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const S=/[-_.]/g,L={"-":"+",_:"/",".":"="};function R(t){return L[t]||""}function F(t){if(!x)return function(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=E[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}b();for(var r=0;;){var i=n(-1),s=n(0),o=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|s>>4),64!=o&&(e(s<<4&240|o>>2),64!=a&&e(o<<6&192|a))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}(t);S.test(t)&&(t=t.replace(S,R)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function O(t){return A&&null!=t&&t instanceof Uint8Array}let M;function C(){return M||=new Uint8Array(0)}var I={};let P;function U(t){if(t!==I)throw Error("illegal external caller")}function D(){return P||=new N(null,I)}function B(t){U(I);var e=t.Z;return null==(e=null==e||O(e)?e:"string"==typeof e?F(e):null)?e:t.Z=e}var N=class{constructor(t,e){if(U(e),this.Z=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}wa(){const t=B(this);return t?new Uint8Array(t):C()}};function G(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function j(){return Error("Failed to read varint, encoding is invalid.")}function V(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function X(t){return 0==t.length?D():new N(t,I)}function z(t){if("string"==typeof t)return{buffer:F(t),L:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),L:!1};if(t.constructor===Uint8Array)return{buffer:t,L:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),L:!1};if(t.constructor===N)return{buffer:B(t)||C(),L:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),L:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function W(){return"function"==typeof BigInt}var H=!p;let Y=!p;const K="function"==typeof Uint8Array.prototype.slice;let $,q=0,J=0;function Z(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=ot(n,t);t=r,n=e}q=n>>>0,J=t>>>0}function Q(t){const e=$||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),J=0,q=e.getUint32(0,!0)}function tt(t,e){return 4294967296*e+(t>>>0)}function et(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=tt(t,e),n?-t:t}function nt(t,e){if(t>>>=0,2097151>=(e>>>=0))var n=""+(4294967296*e+t);else W()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,1e7<=t&&(n+=Math.floor(t/1e7),t%=1e7),1e7<=n&&(e+=Math.floor(n/1e7),n%=1e7),n=e+rt(n)+rt(t));return n}function rt(t){return t=String(t),"0000000".slice(t.length)+t}function it(){var t=q,e=J;if(2147483648&e)if(W())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=ot(t,e);t="-"+nt(n,r)}else t=nt(t,e);return t}function st(t){if(16>t.length)Z(Number(t));else if(W())t=BigInt(t),q=Number(t&BigInt(4294967295))>>>0,J=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);J=q=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));J*=1e6,q=1e6*q+e,4294967296<=q&&(J+=Math.trunc(q/4294967296),J>>>=0,q>>>=0)}if(e){const[t,e]=ot(q,J);q=t,J=e}}}function ot(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function at(t,e){let n,r=0,i=0,s=0;const o=t.h;let a=t.g;do{n=o[a++],r|=(127&n)<<s,s+=7}while(32>s&&128&n);for(32<s&&(i|=(127&n)>>4),s=3;32>s&&128&n;s+=7)n=o[a++],i|=(127&n)<<s;if(gt(t,a),128>n)return e(r>>>0,i>>>0);throw j()}function ct(t){let e=0,n=t.g;const r=n+10,i=t.h;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return gt(t,n),!!(127&e)}throw j()}function ht(t){const e=t.h;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw j();return gt(t,n),i}function ut(t){return ht(t)>>>0}function lt(t){var e=t.h;const n=t.g,r=e[n],i=e[n+1],s=e[n+2];return e=e[n+3],gt(t,t.g+4),(r<<0|i<<8|s<<16|e<<24)>>>0}function ft(t){var e=lt(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:1/0*t:0==n?t*Math.pow(2,-149)*e:t*Math.pow(2,n-150)*(e+Math.pow(2,23))}function dt(t){return ht(t)}function pt(t,e,{aa:n=!1}={}){t.aa=n,e&&(e=z(e),t.h=e.buffer,t.m=e.L,t.j=0,t.l=t.h.length,t.g=t.j)}function gt(t,e){if(t.g=e,e>t.l)throw V(t.l,e)}function mt(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw V(e,t.l-n);return t.g=r,n}function yt(t,e){if(0==e)return D();var n=mt(t,e);return t.aa&&t.m?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?C():K?t.slice(n,e):new Uint8Array(t.subarray(n,e))),X(n)}var vt=[];function _t(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=ut(t.g);if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw G(n,t.l);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function wt(t){switch(t.h){case 0:0!=t.h?wt(t):ct(t.g);break;case 1:gt(t=t.g,t.g+8);break;case 2:if(2!=t.h)wt(t);else{var e=ut(t.g);gt(t=t.g,t.g+e)}break;case 5:gt(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!_t(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}wt(t)}break;default:throw G(t.h,t.l)}}function Tt(t,e,n){const r=t.g.l,i=ut(t.g),s=t.g.g+i;let o=s-r;if(0>=o&&(t.g.l=s,n(e,t,void 0,void 0,void 0),o=s-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=s,t.g.l=r,e}function Et(t){var e=ut(t.g),n=mt(t=t.g,e);if(t=t.h,c){var r,h=t;(r=a)||(r=a=new TextDecoder("utf-8",{fatal:!0})),e=n+e,h=0===n&&e===h.length?h:h.subarray(n,e);try{var u=r.decode(h)}catch(t){if(void 0===o){try{r.decode(new Uint8Array([128]))}catch(t){}try{r.decode(new Uint8Array([97])),o=!0}catch(t){o=!1}}throw!o&&(a=void 0),t}}else{e=(u=n)+e,n=[];let o,a=null;for(;u<e;){var l=t[u++];128>l?n.push(l):224>l?u>=e?i():(o=t[u++],194>l||128!=(192&o)?(u--,i()):n.push((31&l)<<6|63&o)):240>l?u>=e-1?i():(o=t[u++],128!=(192&o)||224===l&&160>o||237===l&&160<=o||128!=(192&(r=t[u++]))?(u--,i()):n.push((15&l)<<12|(63&o)<<6|63&r)):244>=l?u>=e-2?i():(o=t[u++],128!=(192&o)||0!=o-144+(l<<28)>>30||128!=(192&(r=t[u++]))||128!=(192&(h=t[u++]))?(u--,i()):(l=(7&l)<<18|(63&o)<<12|(63&r)<<6|63&h,l-=65536,n.push(55296+(l>>10&1023),56320+(1023&l)))):i(),8192<=n.length&&(a=s(a,n),n.length=0)}u=s(a,n)}return u}function bt(t){const e=ut(t.g);return yt(t.g,e)}function At(t,e,n){var r=ut(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var xt=[];function kt(t){return t?/^\d+$/.test(t)?(st(t),new St(q,J)):null:Lt||=new St(0,0)}var St=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Lt;function Rt(t){return t?/^-?\d+$/.test(t)?(st(t),new Ft(q,J)):null:Ot||=new Ft(0,0)}var Ft=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Ot;function Mt(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Ct(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function It(t,e){if(0<=e)Ct(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Pt(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Ut(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function Dt(t,e,n){Ct(t.g,8*e+n)}function Bt(t,e){return Dt(t,e,2),e=t.g.end(),Ut(t,e),e.push(t.h),e}function Nt(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function Gt(t,e,n){Dt(t,e,2),Ct(t.g,n.length),Ut(t,t.g.end()),Ut(t,n)}function jt(t,e,n,r){null!=n&&(e=Bt(t,e),r(n,t),Nt(t,e))}class Vt{constructor(t,e,n,r){this.g=t,this.h=e,this.l=n,this.qa=r}}function Xt(t){return Array.prototype.slice.call(t)}function zt(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():t}var Wt=zt(),Ht=zt("0di"),Yt=Wt?(t,e)=>{t[Wt]|=e}:(t,e)=>{void 0!==t.D?t.D|=e:Object.defineProperties(t,{D:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Kt(t){const e=Jt(t);1!=(1&e)&&(Object.isFrozen(t)&&(t=Xt(t)),Qt(t,1|e))}var $t=Wt?(t,e)=>{t[Wt]&=~e}:(t,e)=>{void 0!==t.D&&(t.D&=~e)};function qt(t,e,n){return n?t|e:t&~e}var Jt=Wt?t=>0|t[Wt]:t=>0|t.D,Zt=Wt?t=>t[Wt]:t=>t.D,Qt=Wt?(t,e)=>{t[Wt]=e}:(t,e)=>{void 0!==t.D?t.D=e:Object.defineProperties(t,{D:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function te(){var t=[];return Yt(t,1),t}function ee(t){return Yt(t,34),t}function ne(t,e){Qt(e,-14591&(0|t))}function re(t,e){Qt(e,-14557&(34|t))}function ie(t){return 0==(t=t>>14&1023)?536870912:t}var se={},oe={};function ae(t){return!(!t||"object"!=typeof t||t.Na!==oe)}function ce(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}let he=!p;function ue(t,e,n){if(null!=t)if("string"==typeof t)t=t?new N(t,I):D();else if(t.constructor!==N)if(O(t))t=n?X(t):t.length?new N(new Uint8Array(t),I):D();else{if(!e)throw Error();t=void 0}return t}function le(t,e,n){if(!Array.isArray(t)||t.length)return!1;const r=Jt(t);return!!(1&r)||!(!e||!(Array.isArray(e)?e.includes(n):e.has(n)))&&(Qt(t,1|r),!0)}var fe;const de=[];function pe(t){if(2&t)throw Error()}Qt(de,55),fe=Object.freeze(de);class ge{constructor(t,e,n){this.l=0,this.g=t,this.h=e,this.m=n}next(){if(this.l<this.g.length){const t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new ge(this.g,this.h,this.m)}}var me={};let ye,ve;function _e(t,e){(e=ye?e[ye]:void 0)&&(t[ye]=Xt(e))}function we(t){return(t=Error(t)).__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity="warning",t}function Te(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Ee(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}Object.freeze(new class{}),Object.freeze(new class{});const be=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Ae(t){const e=typeof t;return"number"===e?Number.isFinite(t):"string"===e&&be.test(t)}function xe(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t&&Number.isFinite(t)?0|t:void 0}function ke(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t&&Number.isFinite(t)?t>>>0:void 0}function Se(t){return"-"!==t[0]&&(20>t.length||20===t.length&&184467>Number(t.substring(0,6)))}function Le(t){return"-"===t[0]?20>t.length||20===t.length&&-922337<Number(t.substring(0,7)):19>t.length||19===t.length&&922337>Number(t.substring(0,6))}function Re(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(Z(t),t=et(q,J)),t}function Fe(t){var e=Math.trunc(Number(t));return Number.isSafeInteger(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),Le(t)||(st(t),t=it()),t)}function Oe(t){return null==t?t:Ae(t)?"number"==typeof t?Re(t):Fe(t):void 0}function Me(t){if("string"!=typeof t)throw Error();return t}function Ce(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function Ie(t){return null==t||"string"==typeof t?t:void 0}function Pe(t,e,n,r){if(null!=t&&"object"==typeof t&&t.W===se)return t;if(!Array.isArray(t))return n?2&r?(t=e[Ht])?e=t:(ee((t=new e).s),e=e[Ht]=t):e=new e:e=void 0,e;let i=n=Jt(t);return 0===i&&(i|=32&r),i|=2&r,i!==n&&Qt(t,i),new e(t)}function Ue(t,e,n){if(e){var r=!!r;if(!Ae(e=t))throw we("int64");"string"==typeof e?r=Fe(e):r?(r=Math.trunc(e),Number.isSafeInteger(r)?r=String(r):Le(e=String(r))?r=e:(Z(r),r=it())):r=Re(e)}else r=Oe(t);return"string"==typeof(n=null==(t=r)?n?0:void 0:t)&&(r=+n,Number.isSafeInteger(r))?r:n}let De,Be,Ne;function Ge(t){switch(typeof t){case"boolean":return Be||=[0,void 0,!0];case"number":return 0<t?void 0:0===t?Ne||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function je(t,e){return Ve(t,e[0],e[1])}function Ve(t,e,n){if(null==t&&(t=De),De=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-16760833&r|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error();if(64&(r=Jt(t)))return ve&&delete t[ve],t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error();t:{const i=(n=t).length;if(i){const t=i-1;if(ce(n[t])){if(1024<=(e=t-(+!!(512&(r|=256))-1)))throw Error();r=-16760833&r|(1023&e)<<14;break t}}if(e){if(1024<(e=Math.max(e,i-(+!!(512&r)-1))))throw Error();r=-16760833&r|(1023&e)<<14}}}return Qt(t,r),t}let Xe=function(){try{return new class extends Map{constructor(){super()}},!1}catch{return!0}}();class ze{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}const We=Xe?(Object.setPrototypeOf(ze.prototype,Map.prototype),Object.defineProperties(ze.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),ze):class extends Map{constructor(){super()}};function He(t){return t}function Ye(t){if(2&t.O)throw Error("Cannot mutate an immutable Map")}var Ke=class extends We{constructor(t,e,n=He,r=He){super();let i=Jt(t);i|=64,Qt(t,i),this.O=i,this.V=e,this.R=n||He,this.Y=this.V?$e:r||He;for(let s=0;s<t.length;s++){const o=t[s],a=n(o[0],!1,!0);let c=o[1];e?void 0===c&&(c=null):c=r(o[1],!1,!0,void 0,void 0,i),super.set(a,c)}}pa(t=qe){return this.X(t)}X(t=qe){const e=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=t(r[0]),r[1]=t(r[1]),e.push(r);return e}clear(){Ye(this),super.clear()}delete(t){return Ye(this),super.delete(this.R(t,!0,!1))}entries(){var t=this.ma();return new ge(t,Je,this)}keys(){return this.Ma()}values(){var t=this.ma();return new ge(t,Ke.prototype.get,this)}forEach(t,e){super.forEach(((n,r)=>{t.call(e,this.get(r),r,this)}))}set(t,e){return Ye(this),null==(t=this.R(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.Y(e,!0,!0,this.V,!1,this.O))}Ta(t){const e=this.R(t[0],!1,!0);t=t[1],t=this.V?void 0===t?null:t:this.Y(t,!1,!0,void 0,!1,this.O),super.set(e,t)}has(t){return super.has(this.R(t,!1,!1))}get(t){t=this.R(t,!1,!1);const e=super.get(t);if(void 0!==e){var n=this.V;return n?((n=this.Y(e,!1,!0,n,this.xa,this.O))!==e&&super.set(t,n),n):e}}ma(){return Array.from(super.keys())}Ma(){return super.keys()}[Symbol.iterator](){return this.entries()}};function $e(t,e,n,r,i,s){return t=Pe(t,r,n,s),i&&(t=on(t)),t}function qe(t){return t}function Je(t){return[t,this.get(t)]}function Ze(t,e,n,r,i,s){if(null!=t){if(Array.isArray(t))t=i&&0==t.length&&1&Jt(t)?void 0:s&&2&Jt(t)?t:Qe(t,e,n,void 0!==r,i,s);else if(ce(t)){const o={};for(let a in t)o[a]=Ze(t[a],e,n,r,i,s);t=o}else t=e(t,r);return t}}function Qe(t,e,n,r,i,s){const o=r||n?Jt(t):0;r=r?!!(32&o):void 0;const a=Xt(t);for(let t=0;t<a.length;t++)a[t]=Ze(a[t],e,n,r,i,s);return n&&(_e(a,t),n(o,a)),a}function tn(t){return Ze(t,en,void 0,void 0,!1,!1)}function en(t){return t.W===se?t.toJSON():t instanceof Ke?t.pa(tn):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t){if(Array.isArray(t))return he||!le(t,void 0,9999)?t:void 0;if(O(t))return k(t);if(t instanceof N){const e=t.Z;return null==e?"":"string"==typeof e?e:t.Z=k(e)}if(t instanceof Ke)return t=t.pa(),H||0!==t.length?t:void 0}}return t}(t)}function nn(t,e,n=re){if(null!=t){if(A&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=Jt(t);return 2&r?t:(e&&=0===r||!!(32&r)&&!(64&r||!(16&r)),e?(Qt(t,-12293&(34|r)),t):Qe(t,nn,4&r?re:n,!0,!1,!0))}return t.W===se?(n=t.s,t=2&(r=Zt(n))?t:rn(t,n,r,!0)):t instanceof Ke&&(n=ee(t.X(nn)),t=new Ke(n,t.V,t.R,t.Y)),t}}function rn(t,e,n,r){return t=t.constructor,De=e=sn(e,n,r),e=new t(e),De=void 0,e}function sn(t,e,n){const r=n||2&e?re:ne,i=!!(32&e);return t=function(t,e,n){const r=Xt(t);var i=r.length;const s=256&e?r[i-1]:void 0;for(i+=s?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(s){e=r[e]={};for(const t in s)e[t]=n(s[t])}return _e(r,t),r}(t,e,(t=>nn(t,i,r))),Yt(t,32|(n?2:0)),t}function on(t){const e=t.s,n=Zt(e);return 2&n?rn(t,e,n,!1):t}function an(t,e){return cn(t=t.s,Zt(t),e)}function cn(t,e,n,r){if(-1===n)return null;if(n>=ie(e)){if(256&e)return t[t.length-1][n]}else{var i=t.length;if(r&&256&e&&null!=(r=t[i-1][n]))return r;if((e=n+(+!!(512&e)-1))<i)return t[e]}}function hn(t,e,n,r){const i=t.s;let s=Zt(i);return pe(s),un(i,s,e,n,r),t}function un(t,e,n,r,i){var s=ie(e);if(n>=s||i){if(i=e,256&e)s=t[t.length-1];else{if(null==r)return i;s=t[s+(+!!(512&e)-1)]={},i|=256}return s[n]=r,i!==e&&Qt(t,i),i}return t[n+(+!!(512&e)-1)]=r,256&e&&n in(t=t[t.length-1])&&delete t[n],e}function ln(t,e,n,r,i){var s=2&e;let o=cn(t,e,n,i);Array.isArray(o)||(o=fe);const a=!(2&r);r=!(1&r);const c=!!(32&e);let h=Jt(o);return 0!==h||!c||s||a?1&h||(h|=1,Qt(o,h)):(h|=33,Qt(o,h)),s?(t=!1,2&h||(ee(o),t=!!(4&h)),(r||t)&&Object.freeze(o)):(s=!!(2&h)||!!(2048&h),r&&s?(o=Xt(o),r=1,c&&!a&&(r|=32),Qt(o,r),un(t,e,n,o,i)):a&&32&h&&!s&&$t(o,32)),o}function fn(t,e){t=t.s;let n=Zt(t);const r=cn(t,n,e),i=Te(r);return null!=i&&i!==r&&un(t,n,e,i),i}function dn(t){t=t.s;let e=Zt(t);const n=cn(t,e,1),r=ue(n,!0,!!(34&e));return null!=r&&r!==n&&un(t,e,1,r),r}function pn(t,e,n){t=t.s;let r=Zt(t);const i=2&r?1:2;let s=gn(t,r,e);var o=Jt(s);if(!(4&o)){(4&o||Object.isFrozen(s))&&(s=Xt(s),o=Cn(o,r,!1),r=un(t,r,e,s));var a=0;let i=0;for(;a<s.length;a++){const t=n(s[a]);null!=t&&(s[i++]=t)}i<a&&(s.length=i),o=qt(o=mn(o,r,!1),20,!0),o=qt(o,4096,!1),o=qt(o,8192,!1),Qt(s,o),2&o&&Object.freeze(s)}return yn(o)||(n=o,(o=(a=1===i)?qt(o,2,!0):qt(o,32,!1))!==n&&Qt(s,o),a&&Object.freeze(s)),2===i&&yn(o)&&(s=Xt(s),o=Cn(o,r,!1),Qt(s,o),un(t,r,e,s)),s}function gn(t,e,n){return t=cn(t,e,n),Array.isArray(t)?t:fe}function mn(t,e,n){return 0===t&&(t=Cn(t,e,n)),qt(t,1,!0)}function yn(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}let vn;function _n(){return vn??=new Ke(ee([]),void 0,void 0,void 0,me)}function wn(t){t=Xt(t);for(let e=0;e<t.length;e++){const n=t[e]=Xt(t[e]);Array.isArray(n[1])&&(n[1]=ee(n[1]))}return t}function Tn(t,e,n){{const o=t.s;let a=Zt(o);if(pe(a),null==n)un(o,a,e);else{var r,i=t=Jt(n),s=!!(2&t)||Object.isFrozen(n);if((r=!s)&&(r=!1),!(4&t))for(t=21,s&&(n=Xt(n),i=0,t=Cn(t,a,!0)),s=0;s<n.length;s++)n[s]=Me(n[s]);r&&(n=Xt(n),i=0,t=Cn(t,a,!0)),t!==i&&Qt(n,t),un(o,a,e,n)}}}function En(t,e,n,r){const i=Zt(t);pe(i),t=ln(t,i,e,2),r=n(r,!!(4&(e=Jt(t)))&&!!(4096&e)),t.push(r)}function bn(t){return t}function An(t,e){return xn(t=t.s,Zt(t),gs)===e?e:-1}function xn(t,e,n){let r=0;for(let i=0;i<n.length;i++){const s=n[i];null!=cn(t,e,s)&&(0!==r&&(e=un(t,e,r)),r=s)}return r}function kn(t,e,n,r){let i=Zt(t);pe(i);const s=cn(t,i,n,r);let o;if(null!=s&&s.W===se)return(e=on(s))!==s&&un(t,i,n,e,r),e.s;if(Array.isArray(s)){const t=Jt(s);o=2&t?sn(s,t,!1):s,o=je(o,e)}else o=je(void 0,e);return o!==s&&un(t,i,n,o,r),o}function Sn(t,e,n,r){t=t.s;let i=Zt(t);const s=cn(t,i,n,r);return(e=Pe(s,e,!1,i))!==s&&null!=e&&un(t,i,n,e,r),e}function Ln(t,e,n,r=!1){if(null==(e=Sn(t,e,n,r)))return e;t=t.s;let i=Zt(t);if(!(2&i)){const s=on(e);s!==e&&un(t,i,n,e=s,r)}return e}function Rn(t,e,n,r,i,s){var o=!!(2&e),a=o?1:2;const c=1===a;a=2===a,i=!!i,s&&=!o,o=gn(t,e,r);var h=Jt(o);const u=!!(4&h);if(!u){var l=o,f=e;const t=!!(2&(h=mn(h,e,i)));t&&(f=qt(f,2,!0));let r=!t,s=!0,a=0,c=0;for(;a<l.length;a++){const e=Pe(l[a],n,!1,f);if(e instanceof n){if(!t){const t=!!(2&Jt(e.s));r&&=!t,s&&=t}l[c++]=e}}c<a&&(l.length=c),h=qt(h,4,!0),h=qt(h,16,s),h=qt(h,8,r),Qt(l,h),t&&Object.freeze(l)}if(n=!!(8&h)||c&&!o.length,s&&!n){for(yn(h)&&(o=Xt(o),h=Cn(h,e,i),e=un(t,e,r,o)),s=o,n=h,l=0;l<s.length;l++)(h=s[l])!==(f=on(h))&&(s[l]=f);n=qt(n,8,!0),n=qt(n,16,!s.length),Qt(s,n),h=n}return yn(h)||(s=h,c?h=qt(h,!o.length||16&h&&(!u||32&h)?2:2048,!0):i||(h=qt(h,32,!1)),h!==s&&Qt(o,h),c&&Object.freeze(o)),a&&yn(h)&&(o=Xt(o),h=Cn(h,e,i),Qt(o,h),un(t,e,r,o)),o}function Fn(t,e,n){t=t.s;const r=Zt(t);return Rn(t,r,e,n,!1,!(2&r))}function On(t,e,n,r,i){return null==r&&(r=void 0),hn(t,n,r,i)}function Mn(t,e,n,r){null==r&&(r=void 0),t=t.s;let i=Zt(t);pe(i),(n=xn(t,i,n))&&n!==e&&null!=r&&(i=un(t,i,n)),un(t,i,e,r)}function Cn(t,e,n){return t=qt(t,2,!!(2&e)),t=qt(t,32,!!(32&e)&&n),qt(t,2048,!1)}function In(t,e,n){t=t.s;const r=Zt(t);pe(r),t=Rn(t,r,e,1,!0),e=null!=n?n:new e,t.push(e),2&Jt(e.s)?$t(t,8):$t(t,16)}function Pn(t,e){return xe(an(t,e))}function Un(t,e){return Ie(an(t,e))}function Dn(t){return t??0}function Bn(t,e){return Dn(fn(t,e))}function Nn(t,e,n){if(null!=n&&"boolean"!=typeof n)throw t=typeof n,Error(`Expected boolean but got ${"object"!=t?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);hn(t,e,n)}function Gn(t,e,n){if(null!=n){if("number"!=typeof n)throw we("int32");if(!Number.isFinite(n))throw we("int32");n|=0}hn(t,e,n)}function jn(t,e,n){if(null!=n&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);hn(t,e,n)}function Vn(t,e,n){e.g?e.m(t,e.g,e.h,n,!0):e.m(t,e.h,n,!0)}Ke.prototype.toJSON=void 0,Ke.prototype.Na=oe;var Xn=class{constructor(t,e){this.s=Ve(t,e)}toJSON(){return zn(this,Qe(this.s,en,void 0,void 0,!1,!1),!0)}l(){var t=lo;return t.g?t.l(this,t.g,t.h,!0):t.l(this,t.h,t.defaultValue,!0)}clone(){const t=this.s;return rn(this,t,Zt(t),!1)}L(){return!!(2&Jt(this.s))}};function zn(t,e,n){const r=t.constructor.A;var i=Zt(n?t.s:e),s=ie(i),o=!1;if(r&&he){if(!n){var a;if((e=Xt(e)).length&&ce(a=e[e.length-1]))for(o=0;o<r.length;o++)if(r[o]>=s){Object.assign(e[e.length-1]={},a);break}o=!0}var c;s=e,n=!n,t=ie(a=Zt(t.s)),a=+!!(512&a)-1;for(let e=0;e<r.length;e++){var h=r[e];if(h<t){var u=s[h+=a];null==u?s[h]=n?fe:te():n&&u!==fe&&Kt(u)}else{if(!c){var l=void 0;s.length&&ce(l=s[s.length-1])?c=l:s.push(c={})}u=c[h],null==c[h]?c[h]=n?fe:te():n&&u!==fe&&Kt(u)}}}if(!(c=e.length))return e;let f,d;if(ce(l=e[c-1])){t:{var p=l;for(var g in s={},n=!1,p)t=p[g],Array.isArray(t)&&(a=t,(!Y&&le(t,r,+g)||!H&&ae(t)&&0===t.size)&&(t=null),t!=a&&(n=!0)),null!=t?s[g]=t:n=!0;if(n){for(let t in s){p=s;break t}p=null}}p!=l&&(f=!0),c--}for(i=+!!(512&i)-1;0<c&&(null==(l=e[g=c-1])||!Y&&le(l,r,g-i)||!H&&ae(l)&&0===l.size);c--)d=!0;return f||d?(e=o?e:Array.prototype.slice.call(e,0,c),o&&(e.length=c),p&&e.push(p),e):e}function Wn(t){return Array.isArray(t)?t[0]instanceof Vt?t:[zr,t]:[t,void 0]}function Hn(t,e){if(Array.isArray(e)){var n=Jt(e);if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),Qt(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}Xn.prototype.W=se,Xn.prototype.toString=function(){return zn(this,this.s,!1).toString()};const Yn=Symbol();function Kn(t){let e=t[Yn];if(!e){const n=er(t),r=dr(t),i=r.g;e=i?(t,e)=>i(t,e,r):(t,e)=>{for(;_t(e)&&4!=e.h;){var i=e.m,s=r[i];if(!s){var o=r.ha;o&&(o=o[i])&&(s=r[i]=$n(o))}s&&s(e,t,i)||(i=(s=e).l,wt(s),s.ga?s=void 0:(o=s.g.g-i,s.g.g=i,s=yt(s.g,o)),i=t,s&&(ye||=Symbol(),(o=i[ye])?o.push(s):i[ye]=[s]))}n===qn||n===Jn||n.Oa||(t[ve||=Symbol()]=n)},t[Yn]=e}return e}function $n(t){const e=(t=Wn(t))[0].g;if(t=t[1]){const n=Kn(t),r=dr(t).S;return(t,i,s)=>e(t,i,s,r,n)}return e}let qn,Jn;const Zn=Symbol();function Qn(t,e,n){const r=n[1];let i;if(r){const n=r[Zn];i=n?n.S:Ge(r[0]),t[e]=n??r}i&&i===Be?(t.na||(t.na=[])).push(e):n[0]&&(t.oa||(t.oa=[])).push(e)}function tr(t,e){return[t.l,!e||0<e[0]?void 0:e]}function er(t){var e=t[Zn];if(e)return e;if(!(e=rr(t,t[Zn]={},tr,tr,Qn)).oa&&!e.na){let n=!0;for(let t in e){isNaN(t)||(n=!1);break}n?(e=Ge(t[0])===Be,e=t[Zn]=e?Jn||={S:Ge(!0)}:qn||={}):e.Oa=!0}return e}function nr(t,e,n){t[e]=n}function rr(t,e,n,r,i=nr){e.S=Ge(t[0]);let s=0;var o=t[++s];o&&o.constructor===Object&&(e.ha=o,"function"==typeof(o=t[++s])&&(e.g=o,e.h=t[++s],o=t[++s]));const a={};for(;Array.isArray(o)&&"number"==typeof o[0]&&0<o[0];){for(var c=0;c<o.length;c++)a[o[c]]=o;o=t[++s]}for(c=1;void 0!==o;){let l;"number"==typeof o&&(c+=o,o=t[++s]);var h=void 0;if(o instanceof Vt?l=o:(l=Wr,s--),l.qa){o=t[++s],h=t;var u=s;"function"==typeof o&&(o=o(),h[u]=o),h=o}for(u=c+1,"number"==typeof(o=t[++s])&&0>o&&(u-=o,o=t[++s]);c<u;c++){const t=a[c];i(e,c,h?r(l,h,t):n(l,t))}}return e}const ir=Symbol();function sr(t){let e=t[ir];if(!e){const n=hr(t);e=(t,e)=>gr(t,e,n),t[ir]=e}return e}const or=Symbol();function ar(t){return t.h}function cr(t,e){let n,r;const i=t.h;return(t,s,o)=>i(t,s,o,r||=hr(e).S,n||=sr(e))}function hr(t){let e=t[or];return e||(e=rr(t,t[or]={},ar,cr),ur in t&&or in t&&(t.length=0),e)}const ur=Symbol();function lr(t,e){const n=t.g;return e?(t,r,i)=>n(t,r,i,e):n}function fr(t,e,n){const r=t.g;let i,s;return(t,o,a)=>r(t,o,a,s||=dr(e).S,i||=Kn(e),n)}function dr(t){let e=t[ur];return e||(er(t),e=rr(t,t[ur]={},lr,fr),ur in t&&or in t&&(t.length=0),e)}function pr(t,e){var n=t[e];if(n)return n;if((n=t.ha)&&(n=n[e])){var r=(n=Wn(n))[0].h;if(n=n[1]){const e=sr(n),i=hr(n).S;n=(n=t.h)?n(i,e):(t,n,s)=>r(t,n,s,i,e)}else n=r;return t[e]=n}}function gr(t,e,n){for(var r=Zt(t),i=+!!(512&r)-1,s=t.length,o=512&r?1:0,a=s+(256&r?-1:0);o<a;o++){const r=t[o];if(null==r)continue;const s=o-i,a=pr(n,s);a&&a(e,r,s)}if(256&r){r=t[s-1];for(let t in r)i=+t,Number.isNaN(i)||null!=(s=r[t])&&(a=pr(n,i))&&a(e,s,i)}if(t=ye?t[ye]:void 0)for(Ut(e,e.g.end()),n=0;n<t.length;n++)Ut(e,B(t[n])||C())}function mr(t,e){return new Vt(t,e,!1,!1)}function yr(t,e){return new Vt(t,e,!0,!1)}function vr(t,e){return new Vt(t,e,!1,!0)}function _r(t,e,n){un(t,Zt(t),e,n)}var wr=vr((function(t,e,n,r,i){return 2===t.h&&(t=Tt(t,je([void 0,void 0],r),i),pe(r=Zt(e)),(i=cn(e,r,n))instanceof Ke?0!=(2&i.O)?((i=i.X()).push(t),un(e,r,n,i)):i.Ta(t):Array.isArray(i)?(2&Jt(i)&&un(e,r,n,i=wn(i)),i.push(t)):un(e,r,n,[t]),!0)}),(function(t,e,n,r,i){if(e instanceof Ke)e.forEach(((e,s)=>{jt(t,n,je([s,e],r),i)}));else if(Array.isArray(e))for(let s=0;s<e.length;s++){const o=e[s];Array.isArray(o)&&jt(t,n,je(o,r),i)}}));function Tr(t,e,n){t:if(null!=e){if(Ae(e)){if("string"==typeof e){e=Fe(e);break t}if("number"==typeof e){e=Re(e);break t}}e=void 0}null!=e&&("string"==typeof e&&Rt(e),null!=e&&(Dt(t,n,0),"number"==typeof e?(t=t.g,Z(e),Mt(t,q,J)):(n=Rt(e),Mt(t.g,n.h,n.g))))}function Er(t,e,n){null!=(e=xe(e))&&null!=e&&(Dt(t,n,0),It(t.g,e))}function br(t,e,n){null!=(e=Ee(e))&&(Dt(t,n,0),t.g.g.push(e?1:0))}function Ar(t,e,n){null!=(e=Ie(e))&&Gt(t,n,l(e))}function xr(t,e,n,r,i){jt(t,n,e instanceof Xn?e.s:Array.isArray(e)?je(e,r):void 0,i)}function kr(t,e,n){null!=(e=null==e||"string"==typeof e||O(e)||e instanceof N?e:void 0)&&Gt(t,n,z(e).buffer)}function Sr(t,e,n){return(5===t.h||2===t.h)&&(e=ln(e,Zt(e),n,2,!1),2==t.h?At(t,ft,e):e.push(ft(t.g)),!0)}var Lr,Rr=mr((function(t,e,n){if(1!==t.h)return!1;var r=t.g;t=lt(r);const i=lt(r);r=2*(i>>31)+1;const s=i>>>20&2047;return t=4294967296*(1048575&i)+t,_r(e,n,2047==s?t?NaN:1/0*r:0==s?r*Math.pow(2,-1074)*t:r*Math.pow(2,s-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=Te(e))&&(Dt(t,n,1),t=t.g,(n=$||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),q=n.getUint32(0,!0),J=n.getUint32(4,!0),Pt(t,q),Pt(t,J))})),Fr=mr((function(t,e,n){return 5===t.h&&(_r(e,n,ft(t.g)),!0)}),(function(t,e,n){null!=(e=Te(e))&&(Dt(t,n,5),t=t.g,Q(e),Pt(t,q))})),Or=yr(Sr,(function(t,e,n){if(null!=(e=Hn(Te,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(Dt(r,i,5),r=r.g,Q(s),Pt(r,q))}})),Mr=yr(Sr,(function(t,e,n){if(null!=(e=Hn(Te,e))&&e.length){Dt(t,n,2),Ct(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Q(e[r]),Pt(n,q)}})),Cr=mr((function(t,e,n){return 0===t.h&&(_r(e,n,at(t.g,et)),!0)}),Tr),Ir=mr((function(t,e,n){return 0===t.h&&(_r(e,n,0===(t=at(t.g,et))?void 0:t),!0)}),Tr),Pr=mr((function(t,e,n){return 0===t.h&&(_r(e,n,at(t.g,tt)),!0)}),(function(t,e,n){t:if(null!=e){if(Ae(e)){if("string"==typeof e){var r=Math.trunc(Number(e));Number.isSafeInteger(r)&&0<=r?e=String(r):(-1!==(r=e.indexOf("."))&&(e=e.substring(0,r)),Se(e)||(st(e),e=nt(q,J)));break t}if("number"==typeof e){e=0<=(e=Math.trunc(e))&&Number.isSafeInteger(e)?e:function(t){if(0>t){Z(t);const e=nt(q,J);return t=Number(e),Number.isSafeInteger(t)?t:e}return Se(String(t))?t:(Z(t),tt(q,J))}(e);break t}}e=void 0}null!=e&&("string"==typeof e&&kt(e),null!=e&&(Dt(t,n,0),"number"==typeof e?(t=t.g,Z(e),Mt(t,q,J)):(n=kt(e),Mt(t.g,n.h,n.g))))})),Ur=mr((function(t,e,n){return 0===t.h&&(_r(e,n,ht(t.g)),!0)}),Er),Dr=yr((function(t,e,n){return(0===t.h||2===t.h)&&(e=ln(e,Zt(e),n,2,!1),2==t.h?At(t,ht,e):e.push(ht(t.g)),!0)}),(function(t,e,n){if(null!=(e=Hn(xe,e))&&e.length){n=Bt(t,n);for(let n=0;n<e.length;n++)It(t.g,e[n]);Nt(t,n)}})),Br=mr((function(t,e,n){return 0===t.h&&(_r(e,n,0===(t=ht(t.g))?void 0:t),!0)}),Er),Nr=mr((function(t,e,n){return 0===t.h&&(_r(e,n,ct(t.g)),!0)}),br),Gr=mr((function(t,e,n){return 0===t.h&&(_r(e,n,!1===(t=ct(t.g))?void 0:t),!0)}),br),jr=yr((function(t,e,n){return 2===t.h&&(En(e,n,bn,t=Et(t)),!0)}),(function(t,e,n){if(null!=(e=Hn(Ie,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&Gt(r,i,l(s))}})),Vr=mr((function(t,e,n){return 2===t.h&&(_r(e,n,""===(t=Et(t))?void 0:t),!0)}),Ar),Xr=mr((function(t,e,n){return 2===t.h&&(_r(e,n,Et(t)),!0)}),Ar),zr=vr((function(t,e,n,r,i){return 2===t.h&&(Tt(t,kn(e,r,n,!0),i),!0)}),xr),Wr=vr((function(t,e,n,r,i){return 2===t.h&&(Tt(t,kn(e,r,n),i),!0)}),xr);Lr=new Vt((function(t,e,n,r,i){if(2!==t.h)return!1;r=je(void 0,r);let s=Zt(e);pe(s);let o=ln(e,s,n,3);return s=Zt(e),4&Jt(o)&&(o=Xt(o),Qt(o,-2079&(1|Jt(o))),un(e,s,n,o)),o.push(r),Tt(t,r,i),!0}),(function(t,e,n,r,i){if(Array.isArray(e))for(let s=0;s<e.length;s++)xr(t,e[s],n,r,i)}),!0,!0);var Hr=vr((function(t,e,n,r,i,s){if(2!==t.h)return!1;let o=Zt(e);return pe(o),(s=xn(e,o,s))&&n!==s&&un(e,o,s),Tt(t,e=kn(e,r,n),i),!0}),xr),Yr=mr((function(t,e,n){return 2===t.h&&(_r(e,n,bt(t)),!0)}),kr),Kr=yr((function(t,e,n){return(0===t.h||2===t.h)&&(e=ln(e,Zt(e),n,2,!1),2==t.h?At(t,ut,e):e.push(ut(t.g)),!0)}),(function(t,e,n){if(null!=(e=Hn(ke,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(Dt(r,i,0),Ct(r.g,s))}})),$r=mr((function(t,e,n){return 0===t.h&&(_r(e,n,ht(t.g)),!0)}),(function(t,e,n){null!=(e=xe(e))&&(e=parseInt(e,10),Dt(t,n,0),It(t.g,e))})),qr=yr((function(t,e,n){return(0===t.h||2===t.h)&&(e=ln(e,Zt(e),n,2,!1),2==t.h?At(t,dt,e):e.push(ht(t.g)),!0)}),(function(t,e,n){if(null!=(e=Hn(xe,e))&&e.length){n=Bt(t,n);for(let n=0;n<e.length;n++)It(t.g,e[n]);Nt(t,n)}}));class Jr{constructor(t,e){this.h=t,this.g=e,this.l=Ln,this.m=On,this.defaultValue=void 0}}function Zr(t,e){return new Jr(t,e)}function Qr(t,e){return(n,r)=>{t:{if(xt.length){const t=xt.pop();t.o(r),pt(t.g,n,r),n=t}else n=new class{constructor(t,e){if(vt.length){const n=vt.pop();pt(n,t,e),t=n}else t=new class{constructor(t,e){this.h=null,this.m=!1,this.g=this.l=this.j=0,pt(this,t,e)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.aa=!1}}(t,e);this.g=t,this.l=this.g.g,this.h=this.m=-1,this.o(e)}o({ga:t=!1}={}){this.ga=t}}(n,r);try{const r=new t,s=r.s;Kn(e)(s,n),ve&&delete s[ve];var i=r;break t}finally{n.g.clear(),n.m=-1,n.h=-1,100>xt.length&&xt.push(n)}i=void 0}return i}}function ti(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};gr(this.s,e,hr(t)),Ut(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,i=r.length;let s=0;for(let t=0;t<i;t++){const e=r[t];n.set(e,s),s+=e.length}return e.l=[n],n}}var ei=[0,Vr,mr((function(t,e,n){return 2===t.h&&(_r(e,n,(t=bt(t))===D()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof Xn){const r=e.Va;return void(r&&(e=r(e),null!=e&&Gt(t,n,z(e).buffer)))}if(Array.isArray(e))return}kr(t,e,n)}))],ni=[0,Xr],ri=[0,Ur,$r,Nr,-1,Dr,$r,-1],ii=[0,Nr,-1],si=class extends Xn{constructor(){super()}};si.A=[6];var oi=[0,Nr,Xr,Nr,$r,-1,qr,Xr,-1,ii,$r],ai=[0,Xr,-2],ci=class extends Xn{constructor(){super()}},hi=[0],ui=[0,Ur,Nr,-2],li=class extends Xn{constructor(t){super(t,2)}},fi={},di=[-2,fi,Nr];fi[336783863]=[0,Xr,Nr,-1,Ur,[0,[1,2,3,4,5],Hr,hi,Hr,oi,Hr,ai,Hr,ui,Hr,ri],ni];var pi=[0,Vr,Gr],gi=[0,Ir,-1,Gr,-3,Ir,Dr,Vr,Br,Ir,-1,Gr,Br,Gr,-2,Vr],mi=[-1,{}],yi=[0,Xr,1,mi],vi=[0,Xr,jr,mi];function _i(t,e){e=Ce(e),t=t.s;let n=Zt(t);pe(n),un(t,n,2,""===e?void 0:e)}function wi(t,e){En(t.s,3,Me,e)}function Ti(t,e){En(t.s,4,Me,e)}var Ei=class extends Xn{constructor(t){super(t,500)}o(t){return On(this,0,7,t)}};Ei.A=[3,4,5,6,8,13,17,1005];var bi=[-500,Vr,-1,jr,-3,di,Lr,ei,Br,-1,yi,vi,Lr,pi,Vr,gi,Br,jr,987,jr],Ai=[0,Vr,-1,mi],xi=[-500,Xr,-1,[-1,{}],998,Xr],ki=[-500,Xr,jr,-1,[-2,{},Nr],997,jr,-1],Si=[-500,Xr,jr,mi,998,jr];function Li(t,e){In(t,Ei,e)}function Ri(t,e){En(t.s,10,Me,e)}function Fi(t,e){En(t.s,15,Me,e)}var Oi=class extends Xn{constructor(t){super(t,500)}o(t){return On(this,0,1001,t)}};Oi.A=[1,6,7,9,10,15,16,17,14,1002];var Mi=[-500,Lr,bi,4,Lr,xi,Lr,ki,Br,Lr,Si,jr,Br,yi,vi,Lr,Ai,jr,-2,gi,Vr,-1,Gr,979,mi,Lr,ei],Ci=Qr(Oi,Mi);Oi.prototype.g=ti(Mi);var Ii=[0,Lr,[0,Ur,-2]],Pi=class extends Xn{constructor(t){super(t)}},Ui=[0,Ur,Fr,Xr,-1],Di=class extends Xn{constructor(t){super(t)}g(){return Fn(this,Pi,1)}};Di.A=[1];var Bi=[0,Lr,Ui],Ni=Qr(Di,Bi),Gi=[0,Ur,Fr],ji=[0,Ur,-1,Ii],Vi=class extends Xn{constructor(t){super(t)}},Xi=[0,Ur,-3],zi=[0,Fr,-3],Wi=class extends Xn{constructor(t){super(t)}},Hi=[0,Fr,-1,Xr,Fr],Yi=class extends Xn{constructor(t){super(t)}h(){return Ln(this,Vi,2)}g(){return Fn(this,Wi,5)}};Yi.A=[5];var Ki=[0,$r,Xi,zi,ji,Lr,Hi],$i=class extends Xn{constructor(t){super(t)}};$i.A=[1,2,3,8,9];var qi=Qr($i,[0,jr,Dr,Mr,Ki,Xr,-1,Cr,Lr,Gi,jr,Cr]),Ji=class extends Xn{constructor(t){super(t)}},Zi=[0,Fr,-4],Qi=class extends Xn{constructor(t){super(t)}};Qi.A=[1];var ts=Qr(Qi,[0,Lr,Zi]),es=class extends Xn{constructor(t){super(t)}},ns=[0,Fr,-4],rs=class extends Xn{constructor(t){super(t)}};rs.A=[1];var is=Qr(rs,[0,Lr,ns]),ss=class extends Xn{constructor(t){super(t)}};ss.A=[3];var os=[0,Ur,-1,Mr,$r],as=class extends Xn{constructor(){super()}};as.prototype.g=ti([0,Fr,-4,Cr]);var cs=class extends Xn{constructor(t){super(t)}},hs=[0,1,Ur,Xr,Bi],us=class extends Xn{constructor(t){super(t)}};us.A=[1];var ls=Qr(us,[0,Lr,hs,Cr]),fs=class extends Xn{constructor(t){super(t)}};fs.A=[1];var ds=class extends Xn{constructor(t){super(t)}ua(){const t=dn(this);return null==t?D():t}},ps=class extends Xn{constructor(t){super(t)}},gs=[1,2],ms=[0,gs,Hr,[0,Mr],Hr,[0,Yr],Ur,Xr],ys=class extends Xn{constructor(t){super(t)}};ys.A=[1];var vs=Qr(ys,[0,Lr,ms,Cr]),_s=class extends Xn{constructor(t){super(t)}};_s.A=[4,5];var ws=[0,Xr,Ur,Fr,jr,-1],Ts=class extends Xn{constructor(t){super(t)}},Es=[0,Nr,-1],bs=class extends Xn{constructor(t){super(t)}},As=[1,2,3,4,5],xs=class extends Xn{constructor(t){super(t)}g(){return null!=dn(this)}h(){return null!=Un(this,2)}},ks=[0,Yr,Xr,[0,Ur,Cr,-1],[0,Pr,Cr]],Ss=class extends Xn{constructor(t){super(t)}g(){return Ee(an(this,2))??!1}},Ls=[0,ks,Nr,[0,As,Hr,ui,Hr,oi,Hr,ri,Hr,hi,Hr,ai],$r],Rs=class extends Xn{constructor(t){super(t)}},Fs=[0,Ls,Fr,-1,Ur],Os=Zr(502141897,Rs);fi[502141897]=Fs;var Ms=[0,ks];fi[512499200]=Ms;var Cs=[0,Ms];fi[515723506]=Cs;var Is=Qr(class extends Xn{constructor(t){super(t)}},[0,[0,$r,-1,Or,Kr],os]),Ps=[0,Ls];fi[508981768]=Ps;var Us=class extends Xn{constructor(t){super(t)}},Ds=[0,Ls,Fr,Ps,Nr],Bs=class extends Xn{constructor(t){super(t)}},Ns=[0,Ls,Fs,Ds,Fr,Cs];fi[508968149]=Ds;var Gs=Zr(508968150,Bs);fi[508968150]=Ns;var js=class extends Xn{constructor(t){super(t)}},Vs=Zr(513916220,js);fi[513916220]=[0,Ls,Ns,Ur];var Xs=class extends Xn{constructor(t){super(t)}h(){return Ln(this,_s,2)}g(){hn(this,2)}},zs=[0,Ls,ws];fi[478825465]=zs;var Ws=[0,Ls];fi[478825422]=Ws;var Hs=class extends Xn{constructor(t){super(t)}},Ys=[0,Ls,Ws,zs,-1],Ks=class extends Xn{constructor(t){super(t)}},$s=[0,Ls,Fr,Ur],qs=class extends Xn{constructor(t){super(t)}},Js=[0,Ls,Fr],Zs=class extends Xn{constructor(t){super(t)}},Qs=[0,Ls,$s,Js,Fr],to=class extends Xn{constructor(t){super(t)}},eo=[0,Ls,Qs,Ys];fi[463370452]=Ys,fi[464864288]=$s,fi[474472470]=Js;var no=Zr(462713202,Zs);fi[462713202]=Qs;var ro=Zr(479097054,to);fi[479097054]=eo;var io=class extends Xn{constructor(t){super(t)}},so=Zr(456383383,io);fi[456383383]=[0,Ls,ws];var oo=class extends Xn{constructor(t){super(t)}},ao=Zr(476348187,oo);fi[476348187]=[0,Ls,Es];var co=class extends Xn{constructor(t){super(t)}},ho=[0,$r,-1],uo=class extends Xn{constructor(t){super(t)}};uo.A=[3];var lo=Zr(458105876,class extends Xn{constructor(t){super(t)}g(){var t=this.s;const e=Zt(t);var n=2&e;return t=function(t,e,n){var r=uo;const i=2&e;let s=!1;if(null==n){if(i)return _n();n=[]}else if(n.constructor===Ke){if(0==(2&n.O)||i)return n;n=n.X()}else Array.isArray(n)?s=!!(2&Jt(n)):n=[];if(i){if(!n.length)return _n();s||(s=!0,ee(n))}else s&&(s=!1,n=wn(n));return s||(64&Jt(n)?$t(n,32):32&e&&Yt(n,32)),un(t,e,2,r=new Ke(n,r,Ue,void 0),!1),r}(t,e,cn(t,e,2)),null==t||!n&&uo&&(t.xa=!0),t}});fi[458105876]=[0,ho,wr,[!0,Cr,[0,Xr,-1,jr]]];var fo=class extends Xn{constructor(t){super(t)}},po=Zr(458105758,fo);fi[458105758]=[0,Ls,Xr,ho];var go=class extends Xn{constructor(t){super(t)}};go.A=[5,6];var mo=Zr(443442058,go);fi[443442058]=[0,Ls,Xr,Ur,Fr,jr,-1];var yo=class extends Xn{constructor(t){super(t)}},vo=[0,Ls,Fr,-1,Ur];fi[514774813]=vo;var _o=class extends Xn{constructor(t){super(t)}},wo=[0,Ls,Fr,Nr],To=class extends Xn{constructor(t){super(t)}},Eo=[0,Ls,vo,wo,Fr];fi[518928384]=wo;var bo=Zr(516587230,To);function Ao(t,e){return e=e?e.clone():new _s,void 0!==t.displayNamesLocale?hn(e,1,Ce(t.displayNamesLocale)):void 0===t.displayNamesLocale&&hn(e,1),void 0!==t.maxResults?Gn(e,2,t.maxResults):"maxResults"in t&&hn(e,2),void 0!==t.scoreThreshold?jn(e,3,t.scoreThreshold):"scoreThreshold"in t&&hn(e,3),void 0!==t.categoryAllowlist?Tn(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&hn(e,4),void 0!==t.categoryDenylist?Tn(e,5,t.categoryDenylist):"categoryDenylist"in t&&hn(e,5),e}function xo(t,e=-1,n=""){return{categories:t.map((t=>({index:Dn(Pn(t,1))??-1,score:Bn(t,2)??0,categoryName:Un(t,3)??""??"",displayName:Un(t,4)??""??""}))),headIndex:e,headName:n}}function ko(t){var e=pn(t,3,Te),n=pn(t,2,xe),r=pn(t,1,Ie),i=pn(t,9,Ie);const s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:i[t]??""});if((e=Ln(t,Yi,4)?.h())&&(s.boundingBox={originX:Pn(e,1)??0,originY:Pn(e,2)??0,width:Pn(e,3)??0,height:Pn(e,4)??0,angle:0}),Ln(t,Yi,4)?.g().length)for(const e of Ln(t,Yi,4).g())s.keypoints.push({x:fn(e,1)??0,y:fn(e,2)??0,score:fn(e,4)??0,label:Un(e,3)??""});return s}function So(t){const e=[];for(const n of Fn(t,es,1))e.push({x:Bn(n,1)??0,y:Bn(n,2)??0,z:Bn(n,3)??0});return e}function Lo(t){const e=[];for(const n of Fn(t,Ji,1))e.push({x:Bn(n,1)??0,y:Bn(n,2)??0,z:Bn(n,3)??0});return e}function Ro(t){return Array.from(t,(t=>127<t?t-256:t))}function Fo(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s],r+=t[s]*t[s],i+=e[s]*e[s];if(0>=r||0>=i)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let Oo;fi[516587230]=Eo;const Mo=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 Co(){if(void 0===Oo)try{await WebAssembly.instantiate(Mo),Oo=!0}catch{Oo=!1}return Oo}async function Io(t,e=""){const n=await Co()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Po=class{};function Uo(){const t=navigator.userAgent;return t.includes("Safari")&&!t.includes("Chrome")}async function Do(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}function Bo(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function No(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");return t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),e.videoWidth?(n=e.videoWidth,e=e.videoHeight):e.naturalWidth?(n=e.naturalWidth,e=e.naturalHeight):(n=e.width,e=e.height),!t.l||n===t.i.canvas.width&&e===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=e),[n,e]}function Go(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function jo(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function Vo(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}function Xo(t,e){const n=Ln(t.baseOptions,xs,1)||new xs;"string"==typeof e?(hn(n,2,Ce(e)),hn(n,1)):e instanceof Uint8Array&&(hn(n,1,ue(e,!1,!1)),hn(n,2)),On(t.baseOptions,0,1,n)}function zo(t){try{const e=t.F.length;if(1===e)throw Error(t.F[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.F.map((t=>t.message)).join(", "))}finally{t.F=[]}}function Wo(t,e){t.I=Math.max(t.I,e)}function Ho(t,e){t.C=new Ei,_i(t.C,"PassThroughCalculator"),wi(t.C,"free_memory"),Ti(t.C,"free_memory_unused_out"),Ri(e,"free_memory"),Li(e,t.C)}function Yo(t,e){wi(t.C,e),Ti(t.C,e+"_unused_out")}function Ko(t){t.g.addBoolToStream(!0,"free_memory",t.I)}Po.forVisionTasks=function(t){return Io("vision",t)},Po.forTextTasks=function(t){return Io("text",t)},Po.forAudioTasks=function(t){return Io("audio",t)},Po.isSimdSupported=function(){return Co()};var $o=class{constructor(t){this.g=t,this.F=[],this.I=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Ln(this.baseOptions,xs,1)?.g()||Ln(this.baseOptions,xs,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=Ln(t.baseOptions,bs,3);if(!n){var r=n=new bs,i=new ci;Mn(r,4,As,i)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new si,Mn(e,2,As,r)):(e=n,r=new ci,Mn(e,4,As,r))),On(t.baseOptions,0,3,n)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)})).then((t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),Xo(this,"/model.dat"),this.m(),this.N()}));Xo(this,e.modelAssetBuffer)}return this.m(),this.N(),Promise.resolve()}N(){}da(){let t;if(this.g.da((e=>{t=Ci(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.F.push(Error(e))})),this.g.Ra(),this.g.setGraph(t,e),this.C=void 0,zo(this)}finishProcessing(){this.g.finishProcessing(),zo(this)}close(){this.C=void 0,this.g.closeGraph()}};function qo(t,e){if(null===t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}$o.prototype.close=$o.prototype.close;class Jo{constructor(t,e,n,r){this.g=t,this.h=e,this.m=n,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Zo(t,e,n){const r=t.g;if(n=qo(r.createShader(n),"Failed to create WebGL shader"),r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(t.h,n),n}function Qo(t,e){const n=t.g,r=qo(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const i=qo(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.N),n.vertexAttribPointer(t.N,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const s=qo(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.M),n.vertexAttribPointer(t.M,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[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 Jo(n,r,i,s)}function ta(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function ea(t,e,n,r){return ta(t,e),t.h||(t.m(),t.F()),n?(t.u||(t.u=Qo(t,!0)),n=t.u):(t.v||(t.v=Qo(t,!1)),n=t.v),e.useProgram(t.h),n.bind(),t.l(),t=r(),n.g.bindVertexArray(null),t}function na(t,e,n){return ta(t,e),t=qo(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function ra(t,e,n){ta(t,e),t.C||(t.C=qo(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.C),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function ia(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var sa=class{I(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}m(){const t=this.g;if(this.h=qo(t.createProgram(),"Failed to create WebGL program"),this.ta=Zo(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.sa=Zo(this,this.I(),t.FRAGMENT_SHADER),t.linkProgram(this.h),!t.getProgramParameter(this.h,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.h)}`);this.N=t.getAttribLocation(this.h,"aVertex"),this.M=t.getAttribLocation(this.h,"aTex")}F(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.ta),t.deleteShader(this.sa)}this.C&&this.g.deleteFramebuffer(this.C),this.v&&this.v.close(),this.u&&this.u.close()}},oa=class extends sa{I(){return"\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n "}F(){const t=this.g;t.activeTexture(t.TEXTURE1),this.B=na(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.j=na(this,t,t.NEAREST)}m(){super.m();const t=this.g;this.U=qo(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.ra=qo(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.T=qo(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.T,0),t.uniform1i(this.U,1),t.uniform1i(this.ra,2)}close(){this.B&&this.g.deleteTexture(this.B),this.j&&this.g.deleteTexture(this.j),super.close()}},aa=class extends sa{I(){return"\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n "}F(){const t=this.g;t.activeTexture(t.TEXTURE1),this.j=na(this,t),t.activeTexture(t.TEXTURE2),this.B=na(this,t)}m(){super.m();const t=this.g;this.T=qo(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.U=qo(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.J=qo(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.J,0),t.uniform1i(this.T,1),t.uniform1i(this.U,2)}close(){this.j&&this.g.deleteTexture(this.j),this.B&&this.g.deleteTexture(this.B),super.close()}};function ca(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function ha(t){var e=ca(t,1);if(!e){if(e=ca(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const r=la(t);var n=da(t);if(ra(n,r,ua(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in self.document){n=new Float32Array(t.width*t.height*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.FLOAT,n);for(let t=0,r=0;t<e.length;++t,r+=4)e[t]=n[r]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function ua(t){let e=ca(t,2);if(!e){const n=la(t);e=pa(t);const r=ha(t),i=fa(t);n.texImage2D(n.TEXTURE_2D,0,i,t.width,t.height,0,n.RED,n.FLOAT,r),ga(t)}return e}function la(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=qo(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function fa(t){if(t=la(t),!ma)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))ma=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");ma=t.R16F}return ma}function da(t){return t.l||(t.l=new sa),t.l}function pa(t){const e=la(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=ca(t,2);return n||(n=na(da(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(n),t.j=!0),e.bindTexture(e.TEXTURE_2D,n),n}function ga(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var ma,ya=class{constructor(t,e,n,r,i,s,o){this.g=t,this.m=e,this.j=n,this.canvas=r,this.l=i,this.width=s,this.height=o,this.j&&0==--va&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}La(){return!!ca(this,0)}ka(){return!!ca(this,1)}P(){return!!ca(this,2)}ja(){return(t=ca(this,0))||(t=ha(this),t=new Uint8Array(t.map((t=>255*t))),this.g.push(t)),t;var t}ia(){return ha(this)}K(){return ua(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=la(this),e=da(this);t.activeTexture(t.TEXTURE1),n=na(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,n);const r=fa(this);t.texImage2D(t.TEXTURE_2D,0,r,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),ra(e,t,n),ea(e,t,!1,(()=>{pa(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),ga(this)})),ia(e),ga(this)}}t.push(n)}return new ya(t,this.m,this.P(),this.canvas,this.l,this.width,this.height)}close(){this.j&&la(this).deleteTexture(ca(this,2)),va=-1}};ya.prototype.close=ya.prototype.close,ya.prototype.clone=ya.prototype.clone,ya.prototype.getAsWebGLTexture=ya.prototype.K,ya.prototype.getAsFloat32Array=ya.prototype.ia,ya.prototype.getAsUint8Array=ya.prototype.ja,ya.prototype.hasWebGLTexture=ya.prototype.P,ya.prototype.hasFloat32Array=ya.prototype.ka,ya.prototype.hasUint8Array=ya.prototype.La;var va=250;const _a={color:"white",lineWidth:4,radius:6};function wa(t){return{..._a,fillColor:(t=t||{}).color,...t}}function Ta(t,e){return t instanceof Function?t(e):t}function Ea(t,e,n){return Math.max(Math.min(e,n),Math.min(Math.max(e,n),t))}function ba(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Aa(t){if(!t.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.j}function xa(t,e,n){if(e.P())n(e.K());else{const r=e.ka()?e.ia():e.ja();t.m=t.m??new sa;const i=Aa(t);n((t=new ya([r],e.m,!1,i.canvas,t.m,e.width,e.height)).K()),t.close()}}function ka(t,e,n,r){const i=function(t){return t.g||(t.g=new oa),t.g}(t),s=Aa(t),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;ea(i,s,!0,(()=>{!function(t,e,n,r){const i=t.g;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.B),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),t.J&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(const[r,i]of t){t=r;const s=i;var n=e.next();if(n.done)return!1;const[o,a]=n.value;if(n=a,t!==o||s[0]!==n[0]||s[1]!==n[1]||s[2]!==n[2]||s[3]!==n[3])return!1}return!!e.next().done}(t.J,r))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j);else{t.J=r;const e=Array(1024).fill(0);r.forEach(((t,n)=>{if(4!==t.length)throw Error(`Color at index ${n} is not a four-channel value.`);e[4*n]=t[0],e[4*n+1]=t[1],e[4*n+2]=t[2],e[4*n+3]=t[3]})),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,r),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);const t=i.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)}))}function Sa(t,e,n,r){const i=Aa(t),s=function(t){return t.h||(t.h=new aa),t.h}(t),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n,a=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;ea(s,i,!0,(()=>{var t=s.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s.j),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s.B),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),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),(t=s.g).activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)}))}var La=class{constructor(t,e){t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.j=e):this.j=t}Ea(t,e){if(t){var n=ba(this);e=wa(e),n.save();var r=n.canvas,i=0;for(const s of t)n.fillStyle=Ta(e.fillColor,{index:i,from:s}),n.strokeStyle=Ta(e.color,{index:i,from:s}),n.lineWidth=Ta(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*r.width,s.y*r.height,Ta(e.radius,{index:i,from:s}),0,2*Math.PI),n.fill(t),n.stroke(t),++i;n.restore()}}Da(t,e,n){if(t&&e){var r=ba(this);n=wa(n),r.save();var i=r.canvas,s=0;for(const o of e){r.beginPath(),e=t[o.start];const a=t[o.end];e&&a&&(r.strokeStyle=Ta(n.color,{index:s,from:e,to:a}),r.lineWidth=Ta(n.lineWidth,{index:s,from:e,to:a}),r.moveTo(e.x*i.width,e.y*i.height),r.lineTo(a.x*i.width,a.y*i.height)),++s,r.stroke()}r.restore()}}Aa(t,e){const n=ba(this);e=wa(e),n.save(),n.beginPath(),n.lineWidth=Ta(e.lineWidth,{}),n.strokeStyle=Ta(e.color,{}),n.fillStyle=Ta(e.fillColor,{}),n.moveTo(t.originX,t.originY),n.lineTo(t.originX+t.width,t.originY),n.lineTo(t.originX+t.width,t.originY+t.height),n.lineTo(t.originX,t.originY+t.height),n.lineTo(t.originX,t.originY),n.stroke(),n.fill(),n.restore()}Ba(t,e,n=[0,0,0,255]){this.l?function(t,e,n,r){const i=Aa(t);xa(t,e,(e=>{ka(t,e,n,r),(e=ba(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,n,e):ka(this,t.K(),n,e)}Ca(t,e,n){this.l?function(t,e,n,r){const i=Aa(t);xa(t,e,(e=>{Sa(t,e,n,r),(e=ba(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,e,n):Sa(this,t.K(),e,n)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function Ra(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Fa(t){var e=Ra(t,0);if(!e){e=Ma(t);const n=Ca(t),r=new Uint8Array(t.width*t.height*4);ra(n,e,Oa(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),ia(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function Oa(t){let e=Ra(t,2);if(!e){const n=Ma(t);e=Ia(t);const r=Ra(t,1)||Fa(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Pa(t)}return e}function Ma(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");return t.h||(t.h=qo(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Ca(t){return t.l||(t.l=new sa),t.l}function Ia(t){const e=Ma(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Ra(t,2);return n||(n=na(Ca(t),e),t.g.push(n),t.m=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Pa(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function Ua(t){const e=Ma(t);return ea(Ca(t),e,!0,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const r=n.width,i=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=r,n.height=i,t}(t,(()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))))}La.prototype.close=La.prototype.close,La.prototype.drawConfidenceMask=La.prototype.Ca,La.prototype.drawCategoryMask=La.prototype.Ba,La.prototype.drawBoundingBox=La.prototype.Aa,La.prototype.drawConnectors=La.prototype.Da,La.prototype.drawLandmarks=La.prototype.Ea,La.lerp=function(t,e,n,r,i){return Ea(r*(1-(t-e)/(n-e))+i*(1-(n-t)/(n-e)),r,i)},La.clamp=Ea;var Da=class{constructor(t,e,n,r,i,s,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=i,this.width=s,this.height=o,(this.j||this.m)&&0==--Ba&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ka(){return!!Ra(this,0)}la(){return!!Ra(this,1)}P(){return!!Ra(this,2)}Ia(){return Fa(this)}Ha(){var t=Ra(this,1);return t||(Oa(this),Ia(this),t=Ua(this),Pa(this),this.g.push(t),this.j=!0),t}K(){return Oa(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const t=Ma(this),e=Ca(this);t.activeTexture(t.TEXTURE1),n=na(e,t),t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),ra(e,t,n),ea(e,t,!1,(()=>{Ia(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Pa(this)})),ia(e),Pa(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Oa(this),Ia(this),n=Ua(this),Pa(this)}t.push(n)}return new Da(t,this.la(),this.P(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ra(this,1).close(),this.m&&Ma(this).deleteTexture(Ra(this,2)),Ba=-1}};Da.prototype.close=Da.prototype.close,Da.prototype.clone=Da.prototype.clone,Da.prototype.getAsWebGLTexture=Da.prototype.K,Da.prototype.getAsImageBitmap=Da.prototype.Ha,Da.prototype.getAsImageData=Da.prototype.Ia,Da.prototype.hasWebGLTexture=Da.prototype.P,Da.prototype.hasImageBitmap=Da.prototype.la,Da.prototype.hasImageData=Da.prototype.Ka;var Ba=250;function Na(...t){return t.map((([t,e])=>({start:t,end:e})))}const Ga=function(t){return class extends t{Ra(){this.i._registerModelResourcesGraphService()}}}((ja=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:"undefined"==typeof OffscreenCanvas||Uo()?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas")):this.i.canvas=new OffscreenCanvas(1,1)}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Bo(this,r||"input_audio",(r=>{Bo(this,i=i||"audio_header",(i=>{this.i._configureAudio(r,i,t,e,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}da(t){jo(this,"__graph_config__",(e=>{t(e)})),Bo(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const s=4*t.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(t,this.g/4),Bo(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){Bo(this,e,(e=>{const[r,i]=No(this,t,e);this.i._addBoundTextureToStream(e,r,i,n)}))}addBoolToStream(t,e,n){Bo(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){Bo(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){Bo(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){Bo(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){Bo(this,e,(e=>{Bo(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){Bo(this,e,(e=>{Go(this,Object.keys(t),(r=>{Go(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){Bo(this,n,(n=>{Bo(this,e,(e=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,n,r),this.i._free(i)}))}))}addEmptyPacketToStream(t,e){Bo(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){Bo(this,e,(e=>{const r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(r,e);this.i._addBoolVectorToInputStream(r,e,n)}))}addDoubleVectorToStream(t,e,n){Bo(this,e,(e=>{const r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(r,e);this.i._addDoubleVectorToInputStream(r,e,n)}))}addFloatVectorToStream(t,e,n){Bo(this,e,(e=>{const r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(r,e);this.i._addFloatVectorToInputStream(r,e,n)}))}addIntVectorToStream(t,e,n){Bo(this,e,(e=>{const r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(r,e);this.i._addIntVectorToInputStream(r,e,n)}))}addStringVectorToStream(t,e,n){Bo(this,e,(e=>{const r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const e of t)Bo(this,e,(t=>{this.i._addStringVectorEntry(r,t)}));this.i._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){Bo(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){Bo(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){Bo(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){Bo(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){Bo(this,e,(e=>{Bo(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){Bo(this,n,(n=>{Bo(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}addBoolVectorToInputSidePacket(t,e){Bo(this,e,(e=>{const n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){Bo(this,e,(e=>{const n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){Bo(this,e,(e=>{const n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){Bo(this,e,(e=>{const n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){Bo(this,e,(e=>{const n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)Bo(this,e,(t=>{this.i._addStringVectorEntry(n,t)}));this.i._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){jo(this,t,e),Bo(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Vo(this,t,e),Bo(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){jo(this,t,e),Bo(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){Vo(this,t,e),Bo(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachDoubleListener(t,e){jo(this,t,e),Bo(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Vo(this,t,e),Bo(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){jo(this,t,e),Bo(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Vo(this,t,e),Bo(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){jo(this,t,e),Bo(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){Vo(this,t,e),Bo(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){jo(this,t,e),Bo(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Vo(this,t,e),Bo(this,t,(t=>{this.i._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),jo(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),Bo(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends ja{get fa(){return this.i}va(t,e,n){Bo(this,e,(e=>{const[r,i]=No(this,t,e);this.fa._addBoundTextureAsImageToStream(e,r,i,n)}))}ba(t,e){jo(this,t,e),Bo(this,t,(t=>{this.fa._attachImageListener(t)}))}ca(t,e){Vo(this,t,e),Bo(this,t,(t=>{this.fa._attachImageVectorListener(t)}))}}));var ja,Va=class extends Ga{};async function Xa(t,e,n){return async function(t,e,n,r){return async function(t,e,n,r){return t=await(async(t,e,n,r,i)=>{if(e&&await Do(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await Do(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,r)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&t.endsWith(".data")?n.assetBinaryPath.toString():t}),await t.o(r),t}(t,e,n,r)}(t,n.canvas??("undefined"==typeof OffscreenCanvas||Uo()?document.createElement("canvas"):void 0),e,n)}function za(t,e,n,r){if(t.J){const s=new as;if(n?.regionOfInterest){if(!t.U)throw Error("This task doesn't support region-of-interest.");var i=n.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(0>i.left||0>i.top||1<i.right||1<i.bottom)throw Error("Expected RectF values to be in [0,1].");jn(s,1,(i.left+i.right)/2),jn(s,2,(i.top+i.bottom)/2),jn(s,4,i.right-i.left),jn(s,3,i.bottom-i.top)}else jn(s,1,.5),jn(s,2,.5),jn(s,4,1),jn(s,3,1);if(n?.rotationDegrees){if(0!=n?.rotationDegrees%90)throw Error("Expected rotation to be a multiple of 90°.");if(jn(s,5,-Math.PI*n.rotationDegrees/180),0!=n?.rotationDegrees%180){const[t,r]=void 0!==e.videoWidth?[e.videoWidth,e.videoHeight]:void 0!==e.naturalWidth?[e.naturalWidth,e.naturalHeight]:[e.width,e.height];n=Bn(s,3)*r/t,i=Bn(s,4)*t/r,jn(s,4,n),jn(s,3,i)}}t.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",t.J,r)}t.g.va(e,t.T,r??performance.now()),t.finishProcessing()}function Wa(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");za(t,e,n,t.I+1)}function Ha(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");za(t,e,n,r)}function Ya(t,e,n,r){var i=e.data;const s=e.width,o=s*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error("Unsupported channel count: "+i.length/o);return t=new ya([i],n,!1,t.g.i.canvas,t.M,s,e),r?t.clone():t}var Ka=class extends $o{constructor(t,e,n,r){super(t),this.g=t,this.T=e,this.J=n,this.U=r,this.M=new sa}l(t,e=!0){if("runningMode"in t&&Nn(this.baseOptions,2,!!t.runningMode&&"IMAGE"!==t.runningMode),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.M.close(),super.close()}};Ka.prototype.close=Ka.prototype.close;var $a=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},On(t=this.h=new Rs,0,1,e=new Ss),jn(this.h,2,.5),jn(this.h,3,.3)}get baseOptions(){return Ln(this.h,Ss,1)}set baseOptions(t){On(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&jn(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&jn(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}G(t,e){return this.j={detections:[]},Wa(this,t,e),this.j}H(t,e,n){return this.j={detections:[]},Ha(this,t,n,e),this.j}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"norm_rect_in"),Fi(t,"detections");const e=new li;Vn(e,Os,this.h);const n=new Ei;_i(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),wi(n,"IMAGE:image_in"),wi(n,"NORM_RECT:norm_rect_in"),Ti(n,"DETECTIONS:detections"),n.o(e),Li(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=qi(e),this.j.detections.push(ko(t));Wo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};$a.prototype.detectForVideo=$a.prototype.H,$a.prototype.detect=$a.prototype.G,$a.prototype.setOptions=$a.prototype.o,$a.createFromModelPath=async function(t,e){return Xa($a,t,{baseOptions:{modelAssetPath:e}})},$a.createFromModelBuffer=function(t,e){return Xa($a,t,{baseOptions:{modelAssetBuffer:e}})},$a.createFromOptions=function(t,e){return Xa($a,t,e)};var qa=Na([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]),Ja=Na([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]),Za=Na([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Qa=Na([474,475],[475,476],[476,477],[477,474]),tc=Na([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]),ec=Na([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),nc=Na([469,470],[470,471],[471,472],[472,469]),rc=Na([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]),ic=[...qa,...Ja,...Za,...tc,...ec,...rc],sc=Na([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 oc(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var ac=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,On(t=this.h=new Bs,0,1,e=new Ss),this.v=new Us,On(this.h,0,3,this.v),this.u=new Rs,On(this.h,0,2,this.u),Gn(this.u,4,1),jn(this.u,2,.5),jn(this.v,2,.5),jn(this.h,4,.5)}get baseOptions(){return Ln(this.h,Ss,1)}set baseOptions(t){On(this.h,0,1,t)}o(t){return"numFaces"in t&&Gn(this.u,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&jn(this.u,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&jn(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&jn(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}G(t,e){return oc(this),Wa(this,t,e),this.j}H(t,e,n){return oc(this),Ha(this,t,n,e),this.j}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"norm_rect"),Fi(t,"face_landmarks");const e=new li;Vn(e,Gs,this.h);const n=new Ei;_i(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),wi(n,"IMAGE:image_in"),wi(n,"NORM_RECT:norm_rect"),Ti(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),Li(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=is(e),this.j.faceLandmarks.push(So(t));Wo(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{Wo(this,t)})),this.outputFaceBlendshapes&&(Fi(t,"blendshapes"),Ti(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=Ni(e),this.j.faceBlendshapes.push(xo(t.g()??[]));Wo(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{Wo(this,t)}))),this.outputFacialTransformationMatrixes&&(Fi(t,"face_geometry"),Ti(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=Ln(Is(e),ss,2))&&this.j.facialTransformationMatrixes.push({rows:Dn(Pn(t,1))??0,columns:Dn(Pn(t,2))??0,data:pn(t,3,Te)??[]});Wo(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{Wo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ac.prototype.detectForVideo=ac.prototype.H,ac.prototype.detect=ac.prototype.G,ac.prototype.setOptions=ac.prototype.o,ac.createFromModelPath=function(t,e){return Xa(ac,t,{baseOptions:{modelAssetPath:e}})},ac.createFromModelBuffer=function(t,e){return Xa(ac,t,{baseOptions:{modelAssetBuffer:e}})},ac.createFromOptions=function(t,e){return Xa(ac,t,e)},ac.FACE_LANDMARKS_LIPS=qa,ac.FACE_LANDMARKS_LEFT_EYE=Ja,ac.FACE_LANDMARKS_LEFT_EYEBROW=Za,ac.FACE_LANDMARKS_LEFT_IRIS=Qa,ac.FACE_LANDMARKS_RIGHT_EYE=tc,ac.FACE_LANDMARKS_RIGHT_EYEBROW=ec,ac.FACE_LANDMARKS_RIGHT_IRIS=nc,ac.FACE_LANDMARKS_FACE_OVAL=rc,ac.FACE_LANDMARKS_CONTOURS=ic,ac.FACE_LANDMARKS_TESSELATION=sc;var cc=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!0),On(t=this.j=new js,0,1,e=new Ss)}get baseOptions(){return Ln(this.j,Ss,1)}set baseOptions(t){On(this.j,0,1,t)}o(t){return super.l(t)}Ua(t,e,n){const r="function"!=typeof e?e:{};if(this.h="function"==typeof e?e:n,Wa(this,t,r??{}),!this.h)return this.u}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"norm_rect"),Fi(t,"stylized_image");const e=new li;Vn(e,Vs,this.j);const n=new Ei;_i(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),wi(n,"IMAGE:image_in"),wi(n,"NORM_RECT:norm_rect"),Ti(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),Li(t,n),this.g.ba("stylized_image",((t,e)=>{var n=!this.h,r=t.data,i=t.width;const s=i*(t=t.height);if(r instanceof Uint8Array)if(r.length===3*s){const e=new Uint8ClampedArray(4*s);for(let t=0;t<s;++t)e[4*t]=r[3*t],e[4*t+1]=r[3*t+1],e[4*t+2]=r[3*t+2],e[4*t+3]=255;r=new ImageData(e,i,t)}else{if(r.length!==4*s)throw Error("Unsupported channel count: "+r.length/s);r=new ImageData(new Uint8ClampedArray(r.buffer,r.byteOffset,r.length),i,t)}else if(!(r instanceof WebGLTexture))throw Error(`Unsupported format: ${r.constructor.name}`);i=new Da([r],!1,!1,this.g.i.canvas,this.M,i,t),this.u=n=n?i.clone():i,this.h&&this.h(n),Wo(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.u=null,this.h&&this.h(null),Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};cc.prototype.stylize=cc.prototype.Ua,cc.prototype.setOptions=cc.prototype.o,cc.createFromModelPath=function(t,e){return Xa(cc,t,{baseOptions:{modelAssetPath:e}})},cc.createFromModelBuffer=function(t,e){return Xa(cc,t,{baseOptions:{modelAssetBuffer:e}})},cc.createFromOptions=function(t,e){return Xa(cc,t,e)};var hc=Na([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 uc(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function lc(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function fc(t,e=!0){const n=[];for(const i of t){var r=Ni(i);t=[];for(const n of r.g())r=e&&null!=Pn(n,1)?Dn(Pn(n,1)):-1,t.push({score:Bn(n,2)??0,index:r,categoryName:Un(n,3)??""??"",displayName:Un(n,4)??""??""});n.push(t)}return n}var dc=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],On(t=this.v=new to,0,1,e=new Ss),this.B=new Zs,On(this.v,0,2,this.B),this.u=new qs,On(this.B,0,3,this.u),this.h=new Ks,On(this.B,0,2,this.h),this.j=new Hs,On(this.v,0,3,this.j),jn(this.h,2,.5),jn(this.B,4,.5),jn(this.u,2,.5)}get baseOptions(){return Ln(this.v,Ss,1)}set baseOptions(t){On(this.v,0,1,t)}o(t){if(Gn(this.h,3,t.numHands??1),"minHandDetectionConfidence"in t&&jn(this.h,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&jn(this.B,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&jn(this.u,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new Xs,n=e,r=Ao(t.cannedGesturesClassifierOptions,Ln(this.j,Xs,3)?.h());On(n,0,2,r),On(this.j,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&Ln(this.j,Xs,3)?.g();return t.customGesturesClassifierOptions?(On(n=e=new Xs,0,2,r=Ao(t.customGesturesClassifierOptions,Ln(this.j,Xs,4)?.h())),On(this.j,0,4,e)):void 0===t.customGesturesClassifierOptions&&Ln(this.j,Xs,4)?.g(),this.l(t)}Pa(t,e){return uc(this),Wa(this,t,e),lc(this)}Qa(t,e,n){return uc(this),Ha(this,t,n,e),lc(this)}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"norm_rect"),Fi(t,"hand_gestures"),Fi(t,"hand_landmarks"),Fi(t,"world_hand_landmarks"),Fi(t,"handedness");const e=new li;Vn(e,ro,this.v);const n=new Ei;_i(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),wi(n,"IMAGE:image_in"),wi(n,"NORM_RECT:norm_rect"),Ti(n,"HAND_GESTURES:hand_gestures"),Ti(n,"LANDMARKS:hand_landmarks"),Ti(n,"WORLD_LANDMARKS:world_hand_landmarks"),Ti(n,"HANDEDNESS:handedness"),n.o(e),Li(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=is(e);const n=[];for(const e of Fn(t,es,1))n.push({x:Bn(e,1)??0,y:Bn(e,2)??0,z:Bn(e,3)??0});this.landmarks.push(n)}Wo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{Wo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=ts(e);const n=[];for(const e of Fn(t,Ji,1))n.push({x:Bn(e,1)??0,y:Bn(e,2)??0,z:Bn(e,3)??0});this.worldLandmarks.push(n)}Wo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{Wo(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...fc(t,!1)),Wo(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{Wo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...fc(t)),Wo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function pc(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}dc.prototype.recognizeForVideo=dc.prototype.Qa,dc.prototype.recognize=dc.prototype.Pa,dc.prototype.setOptions=dc.prototype.o,dc.createFromModelPath=function(t,e){return Xa(dc,t,{baseOptions:{modelAssetPath:e}})},dc.createFromModelBuffer=function(t,e){return Xa(dc,t,{baseOptions:{modelAssetBuffer:e}})},dc.createFromOptions=function(t,e){return Xa(dc,t,e)},dc.HAND_CONNECTIONS=hc;var gc=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],On(t=this.j=new Zs,0,1,e=new Ss),this.u=new qs,On(this.j,0,3,this.u),this.h=new Ks,On(this.j,0,2,this.h),Gn(this.h,3,1),jn(this.h,2,.5),jn(this.u,2,.5),jn(this.j,4,.5)}get baseOptions(){return Ln(this.j,Ss,1)}set baseOptions(t){On(this.j,0,1,t)}o(t){return"numHands"in t&&Gn(this.h,3,t.numHands??1),"minHandDetectionConfidence"in t&&jn(this.h,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&jn(this.j,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&jn(this.u,2,t.minHandPresenceConfidence??.5),this.l(t)}G(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Wa(this,t,e),pc(this)}H(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ha(this,t,n,e),pc(this)}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"norm_rect"),Fi(t,"hand_landmarks"),Fi(t,"world_hand_landmarks"),Fi(t,"handedness");const e=new li;Vn(e,no,this.j);const n=new Ei;_i(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),wi(n,"IMAGE:image_in"),wi(n,"NORM_RECT:norm_rect"),Ti(n,"LANDMARKS:hand_landmarks"),Ti(n,"WORLD_LANDMARKS:world_hand_landmarks"),Ti(n,"HANDEDNESS:handedness"),n.o(e),Li(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=is(e),this.landmarks.push(So(t));Wo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{Wo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=ts(e),this.worldLandmarks.push(Lo(t));Wo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{Wo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const i=[];for(const e of t){t=Ni(e);const n=[];for(const e of t.g())n.push({score:Bn(e,2)??0,index:Dn(Pn(e,1))??-1,categoryName:Un(e,3)??""??"",displayName:Un(e,4)??""??""});i.push(n)}r.call(n,...i),Wo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};gc.prototype.detectForVideo=gc.prototype.H,gc.prototype.detect=gc.prototype.G,gc.prototype.setOptions=gc.prototype.o,gc.createFromModelPath=function(t,e){return Xa(gc,t,{baseOptions:{modelAssetPath:e}})},gc.createFromModelBuffer=function(t,e){return Xa(gc,t,{baseOptions:{modelAssetBuffer:e}})},gc.createFromOptions=function(t,e){return Xa(gc,t,e)},gc.HAND_CONNECTIONS=hc;var mc=class extends Ka{constructor(t,e){super(new Va(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},On(t=this.h=new io,0,1,e=new Ss)}get baseOptions(){return Ln(this.h,Ss,1)}set baseOptions(t){On(this.h,0,1,t)}o(t){return On(this.h,0,2,Ao(t,Ln(this.h,_s,2))),this.l(t)}ya(t,e){return this.j={classifications:[]},Wa(this,t,e),this.j}za(t,e,n){return this.j={classifications:[]},Ha(this,t,n,e),this.j}m(){var t=new Oi;Ri(t,"input_image"),Ri(t,"norm_rect"),Fi(t,"classifications");const e=new li;Vn(e,so,this.h);const n=new Ei;_i(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),wi(n,"IMAGE:input_image"),wi(n,"NORM_RECT:norm_rect"),Ti(n,"CLASSIFICATIONS:classifications"),n.o(e),Li(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:Fn(t,cs,1).map((t=>xo(Ln(t,Di,4)?.g()??[],Dn(Pn(t,2)),Un(t,3)??"")))};return null!=Oe(an(t,2))&&(e.timestampMs=Dn(Oe(an(t,2)))),e}(ls(t)),Wo(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};mc.prototype.classifyForVideo=mc.prototype.za,mc.prototype.classify=mc.prototype.ya,mc.prototype.setOptions=mc.prototype.o,mc.createFromModelPath=function(t,e){return Xa(mc,t,{baseOptions:{modelAssetPath:e}})},mc.createFromModelBuffer=function(t,e){return Xa(mc,t,{baseOptions:{modelAssetBuffer:e}})},mc.createFromOptions=function(t,e){return Xa(mc,t,e)};var yc=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!0),this.h=new oo,this.embeddings={embeddings:[]},On(t=this.h,0,1,e=new Ss)}get baseOptions(){return Ln(this.h,Ss,1)}set baseOptions(t){On(this.h,0,1,t)}o(t){var e=this.h,n=Ln(this.h,Ts,2);return n=n?n.clone():new Ts,void 0!==t.l2Normalize?Nn(n,1,t.l2Normalize):"l2Normalize"in t&&hn(n,1),void 0!==t.quantize?Nn(n,2,t.quantize):"quantize"in t&&hn(n,2),On(e,0,2,n),this.l(t)}Fa(t,e){return Wa(this,t,e),this.embeddings}Ga(t,e,n){return Ha(this,t,n,e),this.embeddings}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"norm_rect"),Fi(t,"embeddings_out");const e=new li;Vn(e,ao,this.h);const n=new Ei;_i(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),wi(n,"IMAGE:image_in"),wi(n,"NORM_RECT:norm_rect"),Ti(n,"EMBEDDINGS:embeddings_out"),n.o(e),Li(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=vs(t),this.embeddings=function(t){return{embeddings:Fn(t,ps,1).map((t=>{const e={headIndex:Dn(Pn(t,3))??-1,headName:Un(t,4)??""??""};if(void 0!==Sn(t,fs,An(t,1)))t=pn(t=Ln(t,fs,An(t,1)),1,Te),e.floatEmbedding=t;else{const n=new Uint8Array(0);e.quantizedEmbedding=Ln(t,ds,An(t,2))?.ua()?.wa()??n}return e})),timestampMs:Dn(Oe(an(t,2)))}}(t),Wo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};yc.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=Fo(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=Fo(Ro(t.quantizedEmbedding),Ro(e.quantizedEmbedding))}return t},yc.prototype.embedForVideo=yc.prototype.Ga,yc.prototype.embed=yc.prototype.Fa,yc.prototype.setOptions=yc.prototype.o,yc.createFromModelPath=function(t,e){return Xa(yc,t,{baseOptions:{modelAssetPath:e}})},yc.createFromModelBuffer=function(t,e){return Xa(yc,t,{baseOptions:{modelAssetBuffer:e}})},yc.createFromOptions=function(t,e){return Xa(yc,t,e)};var vc=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};function _c(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function wc(t){try{const e=new vc(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{Ko(t)}}vc.prototype.close=vc.prototype.close;var Tc=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new fo,this.v=new co,On(this.h,0,3,this.v),On(t=this.h,0,1,e=new Ss)}get baseOptions(){return Ln(this.h,Ss,1)}set baseOptions(t){On(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?hn(this.h,2,Ce(t.displayNamesLocale)):"displayNamesLocale"in t&&hn(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}N(){!function(t){const e=Fn(t.da(),Ei,1).filter((t=>(Un(t,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.u=[],1<e.length)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(Ln(e[0],li,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.u[Number(n)]=Un(e,1)??""}))}(this)}ea(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,_c(this),Wa(this,t,r),wc(this)}Sa(t,e,n,r){const i="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,_c(this),Ha(this,t,i,e),wc(this)}Ja(){return this.u}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"norm_rect");const e=new li;Vn(e,po,this.h);const n=new Ei;_i(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),wi(n,"IMAGE:image_in"),wi(n,"NORM_RECT:norm_rect"),n.o(e),Li(t,n),Ho(this,t),this.outputConfidenceMasks&&(Fi(t,"confidence_masks"),Ti(n,"CONFIDENCE_MASKS:confidence_masks"),Yo(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>Ya(this,t,!0,!this.j))),Wo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],Wo(this,t)}))),this.outputCategoryMask&&(Fi(t,"category_mask"),Ti(n,"CATEGORY_MASK:category_mask"),Yo(this,"category_mask"),this.g.ba("category_mask",((t,e)=>{this.categoryMask=Ya(this,t,!1,!this.j),Wo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,Wo(this,t)}))),Fi(t,"quality_scores"),Ti(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,Wo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Tc.prototype.getLabels=Tc.prototype.Ja,Tc.prototype.segmentForVideo=Tc.prototype.Sa,Tc.prototype.segment=Tc.prototype.ea,Tc.prototype.setOptions=Tc.prototype.o,Tc.createFromModelPath=function(t,e){return Xa(Tc,t,{baseOptions:{modelAssetPath:e}})},Tc.createFromModelBuffer=function(t,e){return Xa(Tc,t,{baseOptions:{modelAssetBuffer:e}})},Tc.createFromOptions=function(t,e){return Xa(Tc,t,e)};var Ec=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};Ec.prototype.close=Ec.prototype.close;var bc=class extends Xn{constructor(t){super(t)}},Ac=[0,Ur,-2],xc=[0,Rr,-3,Nr],kc=[0,Rr,-3,Nr,Rr,-1],Sc=[0,kc],Lc=[0,Sc,Ac],Rc=[0,kc,Ac],Fc=[0,kc,Ur,-1],Oc=[0,Fc,Ac],Mc=[0,Rr,-3,Nr,Ac,-1],Cc=[0,Rr,-3,Nr,$r],Ic=class extends Xn{constructor(t){super(t)}},Pc=[0,Rr,-1,Nr],Uc=class extends Xn{constructor(){super()}};Uc.A=[1];var Dc=class extends Xn{constructor(t){super(t)}},Bc=[1,2,3,4,5,6,7,8,9,10,14,15],Nc=[0,Bc,Hr,kc,Hr,Rc,Hr,Sc,Hr,Lc,Hr,Pc,Hr,Cc,Hr,xc,Hr,[0,Xr,Rr,-2,Nr,Ur,Nr,-1,2,Rr,Ac],Hr,Fc,Hr,Oc,Rr,Ac,Xr,Hr,Mc,Hr,[0,Lr,Pc]],Gc=[0,Xr,Ur,-1,Nr],jc=class extends Xn{constructor(){super()}};jc.A=[1],jc.prototype.g=ti([0,Lr,Nc,Xr,Gc]);var Vc=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new fo,this.v=new co,On(this.h,0,3,this.v),On(t=this.h,0,1,e=new Ss)}get baseOptions(){return Ln(this.h,Ss,1)}set baseOptions(t){On(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}ea(t,e,n,r){const i="function"!=typeof n?n:{};this.j="function"==typeof n?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.I+1,r=new jc;const s=new Dc;var o=new bc;if(Gn(o,1,255),On(s,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new Ic;Nn(a,3,!0),jn(a,1,e.keypoint.x),jn(a,2,e.keypoint.y),Mn(s,5,Bc,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new Uc,e.scribble))Nn(e=new Ic,3,!0),jn(e,1,a.x),jn(e,2,a.y),In(o,Ic,e);Mn(s,15,Bc,o)}In(r,Dc,s),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),Wa(this,t,i);t:{try{const t=new Ec(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=t;break t}this.j(t)}finally{Ko(this)}c=void 0}return c}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"roi_in"),Ri(t,"norm_rect_in");const e=new li;Vn(e,po,this.h);const n=new Ei;_i(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),wi(n,"IMAGE:image_in"),wi(n,"ROI:roi_in"),wi(n,"NORM_RECT:norm_rect_in"),n.o(e),Li(t,n),Ho(this,t),this.outputConfidenceMasks&&(Fi(t,"confidence_masks"),Ti(n,"CONFIDENCE_MASKS:confidence_masks"),Yo(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>Ya(this,t,!0,!this.j))),Wo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],Wo(this,t)}))),this.outputCategoryMask&&(Fi(t,"category_mask"),Ti(n,"CATEGORY_MASK:category_mask"),Yo(this,"category_mask"),this.g.ba("category_mask",((t,e)=>{this.categoryMask=Ya(this,t,!1,!this.j),Wo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,Wo(this,t)}))),Fi(t,"quality_scores"),Ti(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,Wo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Vc.prototype.segment=Vc.prototype.ea,Vc.prototype.setOptions=Vc.prototype.o,Vc.createFromModelPath=function(t,e){return Xa(Vc,t,{baseOptions:{modelAssetPath:e}})},Vc.createFromModelBuffer=function(t,e){return Xa(Vc,t,{baseOptions:{modelAssetBuffer:e}})},Vc.createFromOptions=function(t,e){return Xa(Vc,t,e)};var Xc=class extends Ka{constructor(t,e){super(new Va(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},On(t=this.h=new go,0,1,e=new Ss)}get baseOptions(){return Ln(this.h,Ss,1)}set baseOptions(t){On(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?hn(this.h,2,Ce(t.displayNamesLocale)):"displayNamesLocale"in t&&hn(this.h,2),void 0!==t.maxResults?Gn(this.h,3,t.maxResults):"maxResults"in t&&hn(this.h,3),void 0!==t.scoreThreshold?jn(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&hn(this.h,4),void 0!==t.categoryAllowlist?Tn(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&hn(this.h,5),void 0!==t.categoryDenylist?Tn(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&hn(this.h,6),this.l(t)}G(t,e){return this.j={detections:[]},Wa(this,t,e),this.j}H(t,e,n){return this.j={detections:[]},Ha(this,t,n,e),this.j}m(){var t=new Oi;Ri(t,"input_frame_gpu"),Ri(t,"norm_rect"),Fi(t,"detections");const e=new li;Vn(e,mo,this.h);const n=new Ei;_i(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),wi(n,"IMAGE:input_frame_gpu"),wi(n,"NORM_RECT:norm_rect"),Ti(n,"DETECTIONS:detections"),n.o(e),Li(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=qi(e),this.j.detections.push(ko(t));Wo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{Wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function zc(t){t.landmarks=[],t.worldLandmarks=[],t.v=void 0}function Wc(t){try{const e=new class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.g=n}close(){this.g?.forEach((t=>{t.close()}))}}(t.landmarks,t.worldLandmarks,t.v);if(!t.u)return e;t.u(e)}finally{Ko(t)}}Xc.prototype.detectForVideo=Xc.prototype.H,Xc.prototype.detect=Xc.prototype.G,Xc.prototype.setOptions=Xc.prototype.o,Xc.createFromModelPath=async function(t,e){return Xa(Xc,t,{baseOptions:{modelAssetPath:e}})},Xc.createFromModelBuffer=function(t,e){return Xa(Xc,t,{baseOptions:{modelAssetBuffer:e}})},Xc.createFromOptions=function(t,e){return Xa(Xc,t,e)};var Hc=class extends Ka{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,On(t=this.h=new To,0,1,e=new Ss),this.B=new _o,On(this.h,0,3,this.B),this.j=new yo,On(this.h,0,2,this.j),Gn(this.j,4,1),jn(this.j,2,.5),jn(this.B,2,.5),jn(this.h,4,.5)}get baseOptions(){return Ln(this.h,Ss,1)}set baseOptions(t){On(this.h,0,1,t)}o(t){return"numPoses"in t&&Gn(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&jn(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&jn(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&jn(this.B,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}G(t,e,n){const r="function"!=typeof e?e:{};return this.u="function"==typeof e?e:n,zc(this),Wa(this,t,r),Wc(this)}H(t,e,n,r){const i="function"!=typeof n?n:{};return this.u="function"==typeof n?n:r,zc(this),Ha(this,t,i,e),Wc(this)}m(){var t=new Oi;Ri(t,"image_in"),Ri(t,"norm_rect"),Fi(t,"normalized_landmarks"),Fi(t,"world_landmarks"),Fi(t,"segmentation_masks");const e=new li;Vn(e,bo,this.h);const n=new Ei;_i(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),wi(n,"IMAGE:image_in"),wi(n,"NORM_RECT:norm_rect"),Ti(n,"NORM_LANDMARKS:normalized_landmarks"),Ti(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),Li(t,n),Ho(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=is(e),this.landmarks.push(So(t));Wo(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],Wo(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=ts(e),this.worldLandmarks.push(Lo(t));Wo(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],Wo(this,t)})),this.outputSegmentationMasks&&(Ti(n,"SEGMENTATION_MASK:segmentation_masks"),Yo(this,"segmentation_masks"),this.g.ca("segmentation_masks",((t,e)=>{this.v=t.map((t=>Ya(this,t,!0,!this.u))),Wo(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.v=[],Wo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};return Hc.prototype.detectForVideo=Hc.prototype.H,Hc.prototype.detect=Hc.prototype.G,Hc.prototype.setOptions=Hc.prototype.o,Hc.createFromModelPath=function(t,e){return Xa(Hc,t,{baseOptions:{modelAssetPath:e}})},Hc.createFromModelBuffer=function(t,e){return Xa(Hc,t,{baseOptions:{modelAssetBuffer:e}})},Hc.createFromOptions=function(t,e){return Xa(Hc,t,e)},Hc.POSE_CONNECTIONS=Na([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]),e})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.__deeparDynamicJsModule_mediaPipe__=e():t.__deeparDynamicJsModule_mediaPipe__=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{FilesetResolver:()=>oo,ImageSegmenter:()=>Ga});var n=self;function r(t,e){t=t.split(".");var r,i=n;t[0]in i||void 0===i.execScript||i.execScript("var "+t[0]);for(;t.length&&(r=t.shift());)t.length||void 0===e?i=i[r]&&i[r]!==Object.prototype[r]?i[r]:i[r]={}:i[r]=e}function i(t){return t}function s(){throw Error("Invalid UTF8")}function o(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let a,c;const h="undefined"!=typeof TextDecoder;let u;const l="undefined"!=typeof TextEncoder;function d(t){if(l)t=(u||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&i<t.length){const s=t.charCodeAt(++i);if(56320<=s&&57343>=s){e=1024*(e-55296)+s-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var f,p;t:{for(var g=["CLOSURE_FLAGS"],m=n,y=0;y<g.length;y++)if(null==(m=m[g[y]])){p=null;break t}p=m}var _,v=p&&p[610401301];f=null!=v&&v;const A=n.navigator;function w(t){return!!f&&!!_&&_.brands.some((({brand:e})=>e&&-1!=e.indexOf(t)))}function E(t){var e;return(e=n.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}function b(){return!!f&&!!_&&0<_.brands.length}function T(){return b()?w("Chromium"):(E("Chrome")||E("CriOS"))&&!(!b()&&E("Edge"))||E("Silk")}_=A&&A.userAgentData||null;var k=!b()&&(E("Trident")||E("MSIE"));!E("Android")||T(),T(),E("Safari")&&(T()||!b()&&E("Coast")||!b()&&E("Opera")||!b()&&E("Edge")||(b()?w("Microsoft Edge"):E("Edg/"))||b()&&w("Opera"));var L={},S=null;function x(){if(!S){S={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));L[n]=r;for(var i=0;i<r.length;i++){var s=r[i];void 0===S[s]&&(S[s]=i)}}}}var F="undefined"!=typeof Uint8Array,O=!k&&"function"==typeof btoa;function M(t){if(!O){var e;void 0===e&&(e=0),x(),e=L[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let c=0,h=0;for(;c<t.length-2;c+=3){var i=t[c],s=t[c+1],o=t[c+2],a=e[i>>2];i=e[(3&i)<<4|s>>4],s=e[(15&s)<<2|o>>6],o=e[63&o],n[h++]=a+i+s+o}switch(a=0,o=r,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||r;case 1:t=t[c],n[h]=e[t>>2]+e[(3&t)<<4|a>>4]+o+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const R=/[-_.]/g,C={"-":"+",_:"/",".":"="};function P(t){return C[t]||""}function I(t){if(!O)return function(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=S[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}x();for(var r=0;;){var i=n(-1),s=n(0),o=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|s>>4),64!=o&&(e(s<<4&240|o>>2),64!=a&&e(o<<6&192|a))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}(t);R.test(t)&&(t=t.replace(R,P)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function N(t){return F&&null!=t&&t instanceof Uint8Array}let D;function $(){return D||=new Uint8Array(0)}var U={};let B;function G(t){if(t!==U)throw Error("illegal external caller")}function j(){return B||=new W(null,U)}function V(t){G(U);var e=t.L;return null==(e=null==e||N(e)?e:"string"==typeof e?I(e):null)?e:t.L=e}var W=class{constructor(t,e){if(G(e),this.L=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}fa(){const t=V(this);return t?new Uint8Array(t):$()}};function z(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function H(){return Error("Failed to read varint, encoding is invalid.")}function K(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function X(t){return 0==t.length?j():new W(t,U)}function Y(t){if("string"==typeof t)return{buffer:I(t),G:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),G:!1};if(t.constructor===Uint8Array)return{buffer:t,G:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),G:!1};if(t.constructor===W)return{buffer:V(t)||$(),G:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),G:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}const q="function"==typeof Uint8Array.prototype.slice;let J,Z=0,Q=0;function tt(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=st(n,t);t=r,n=e}Z=n>>>0,Q=t>>>0}function et(t){const e=J||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Q=0,Z=e.getUint32(0,!0)}function nt(t,e){return 4294967296*e+(t>>>0)}function rt(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=nt(t,e),n?-t:t}function it(t){if(16>t.length)tt(Number(t));else if("function"==typeof BigInt)t=BigInt(t),Z=Number(t&BigInt(4294967295))>>>0,Q=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);Q=Z=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));Q*=1e6,Z=1e6*Z+e,4294967296<=Z&&(Q+=Math.trunc(Z/4294967296),Q>>>=0,Z>>>=0)}if(e){const[t,e]=st(Z,Q);Z=t,Q=e}}}function st(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function ot(t,e,{O:n=!1}={}){t.O=n,e&&(e=Y(e),t.h=e.buffer,t.s=e.G,t.v=0,t.l=t.h.length,t.g=t.v)}function at(t,e){if(t.g=e,e>t.l)throw K(t.l,e)}function ct(t,e){let n,r=0,i=0,s=0;const o=t.h;let a=t.g;do{n=o[a++],r|=(127&n)<<s,s+=7}while(32>s&&128&n);for(32<s&&(i|=(127&n)>>4),s=3;32>s&&128&n;s+=7)n=o[a++],i|=(127&n)<<s;if(at(t,a),128>n)return e(r>>>0,i>>>0);throw H()}function ht(t){let e=0,n=t.g;const r=n+10,i=t.h;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return at(t,n),!!(127&e)}throw H()}function ut(t){var e=t.h;const n=t.g,r=e[n],i=e[n+1],s=e[n+2];return e=e[n+3],at(t,t.g+4),(r<<0|i<<8|s<<16|e<<24)>>>0}function lt(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw K(e,t.l-n);return t.g=r,n}function dt(t,e){if(0==e)return j();var n=lt(t,e);return t.O&&t.s?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?$():q?t.slice(n,e):new Uint8Array(t.subarray(n,e))),X(n)}var ft=class{constructor(t,e){this.h=null,this.s=!1,this.g=this.l=this.v=0,ot(this,t,e)}m(){const t=this.h;let e=this.g,n=t[e++],r=127&n;if(128&n&&(n=t[e++],r|=(127&n)<<7,128&n&&(n=t[e++],r|=(127&n)<<14,128&n&&(n=t[e++],r|=(127&n)<<21,128&n&&(n=t[e++],r|=n<<28,128&n&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++])))))throw H();return at(this,e),r}j(){return this.m()>>>0}A(){var t=ut(this);const e=2*(t>>31)+1,n=t>>>23&255;return t&=8388607,255==n?t?NaN:1/0*e:0==n?e*Math.pow(2,-149)*t:e*Math.pow(2,n-150)*(t+Math.pow(2,23))}C(){return this.m()}},pt=[];function gt(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=t.g.j();if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw z(n,t.l);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function mt(t){switch(t.h){case 0:0!=t.h?mt(t):ht(t.g);break;case 1:at(t=t.g,t.g+8);break;case 2:if(2!=t.h)mt(t);else{var e=t.g.j();at(t=t.g,t.g+e)}break;case 5:at(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!gt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}mt(t)}break;default:throw z(t.h,t.l)}}function yt(t,e,n){const r=t.g.l,i=t.g.j(),s=t.g.g+i;let o=s-r;if(0>=o&&(t.g.l=s,n(e,t,void 0,void 0,void 0),o=s-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=s,t.g.l=r,e}function _t(t){var e=t.g.j(),n=lt(t=t.g,e);if(t=t.h,h){var r,i=t;(r=c)||(r=c=new TextDecoder("utf-8",{fatal:!0})),t=n+e,i=0===n&&t===i.length?i:i.subarray(n,t);try{var u=r.decode(i)}catch(t){if(void 0===a){try{r.decode(new Uint8Array([128]))}catch(t){}try{r.decode(new Uint8Array([97])),a=!0}catch(t){a=!1}}throw!a&&(c=void 0),t}}else{e=(u=n)+e,n=[];let a,c=null;for(;u<e;){var l=t[u++];128>l?n.push(l):224>l?u>=e?s():(a=t[u++],194>l||128!=(192&a)?(u--,s()):n.push((31&l)<<6|63&a)):240>l?u>=e-1?s():(a=t[u++],128!=(192&a)||224===l&&160>a||237===l&&160<=a||128!=(192&(i=t[u++]))?(u--,s()):n.push((15&l)<<12|(63&a)<<6|63&i)):244>=l?u>=e-2?s():(a=t[u++],128!=(192&a)||0!=a-144+(l<<28)>>30||128!=(192&(i=t[u++]))||128!=(192&(r=t[u++]))?(u--,s()):(l=(7&l)<<18|(63&a)<<12|(63&i)<<6|63&r,l-=65536,n.push(55296+(l>>10&1023),56320+(1023&l)))):s(),8192<=n.length&&(c=o(c,n),n.length=0)}u=o(c,n)}return u}function vt(t){const e=t.g.j();return dt(t.g,e)}function At(t,e,n){var r=t.g.j();for(r=t.g.g+r;t.g.g<r;)n.push(e.call(t.g))}var wt=[];function Et(t){return t?/^\d+$/.test(t)?(it(t),new bt(Z,Q)):null:Tt||=new bt(0,0)}var bt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Tt;function kt(t){return t?/^-?\d+$/.test(t)?(it(t),new Lt(Z,Q)):null:St||=new Lt(0,0)}var Lt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let St;function xt(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Ft(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Ot(t,e){if(0<=e)Ft(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Mt(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Rt(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function Ct(t,e,n){Ft(t.g,8*e+n)}function Pt(t,e){return Ct(t,e,2),e=t.g.end(),Rt(t,e),e.push(t.h),e}function It(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function Nt(t,e,n){Ct(t,e,2),Ft(t.g,n.length),Rt(t,t.g.end()),Rt(t,n)}function Dt(t,e,n,r){null!=n&&(e=Pt(t,e),r(n,t),It(t,e))}class $t{constructor(t,e,n){this.g=t,this.h=e,this.l=n}}function Ut(t){return Array.prototype.slice.call(t)}const Bt="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():void 0;var Gt=Bt?(t,e)=>{t[Bt]|=e}:(t,e)=>{void 0!==t.g?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function jt(t){const e=Wt(t);1!=(1&e)&&(Object.isFrozen(t)&&(t=Ut(t)),Ht(t,1|e))}var Vt=Bt?(t,e)=>{t[Bt]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)},Wt=Bt?t=>0|t[Bt]:t=>0|t.g,zt=Bt?t=>t[Bt]:t=>t.g,Ht=Bt?(t,e)=>{t[Bt]=e}:(t,e)=>{void 0!==t.g?t.g=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Kt(t){return Gt(t,1),t}function Xt(t){return Gt(t,34),t}function Yt(t,e){Ht(e,-255&(0|t))}function qt(t,e){Ht(e,-221&(34|t))}function Jt(t){return 0==(t=t>>11&1023)?536870912:t}var Zt,Qt={};function te(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function ee(t,e,n){if(null!=t)if("string"==typeof t)t=t?new W(t,U):j();else if(t.constructor!==W)if(N(t))t=n?X(t):t.length?new W(new Uint8Array(t),U):j();else{if(!e)throw Error();t=void 0}return t}const ne=[];function re(t){if(2&t)throw Error()}Ht(ne,39),Zt=Object.freeze(ne);class ie{constructor(t,e,n){this.l=0,this.g=t,this.h=e,this.m=n}next(){if(this.l<this.g.length){const t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new ie(this.g,this.h,this.m)}}var se={};let oe,ae;function ce(t,e){(e=oe?e[oe]:void 0)&&(t[oe]=Ut(e))}function he(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function ue(t){return null==t?t:"number"==typeof t||"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function le(t){return null==t?t:"boolean"==typeof t||"number"==typeof t?!!t:void 0}function de(t){return"number"==typeof t&&Number.isFinite(t)||!!t&&"string"==typeof t&&isFinite(t)}function fe(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t?t:void 0}function pe(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t?t:void 0}function ge(t){if("string"!=typeof t)throw Error();return t}function me(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ye(t){return null==t||"string"==typeof t?t:void 0}function _e(t,e,n,r){var i=!1;return null==t||"object"!=typeof t||(i=Array.isArray(t))||t.K!==Qt?i?(0===(i=n=Wt(t))&&(i|=32&r),(i|=2&r)!==n&&Ht(t,i),new e(t)):(n?2&r?(t=e[ve])?e=t:(Xt((t=new e).u),e=e[ve]=t):e=new e:e=void 0,e):t}const ve="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():"di";function Ae(t){return t}function we(t,e,n){return"string"==typeof(t="number"==(e=typeof t)||"string"===e?t:n?0:void 0)&&(n=+t,Number.isSafeInteger(n))?n:t}let Ee,be;function Te(t){switch(typeof t){case"number":return 0<t?void 0:0===t?be||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function ke(t,e){return Le(t,e[0],e[1])}function Le(t,e,n){if(null==t&&(t=Ee),Ee=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-2095105&r|(1023&e)<<11)}else{if(!Array.isArray(t))throw Error();if(64&(r=Wt(t)))return ae&&delete t[ae],t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error();t:{var i=(n=t).length;if(i){const t=i-1;var s=n[t];if(te(s)){1024<=(i=t-(e=+!!(512&(r|=256))-1))&&(Se(n,e,s),i=1023),r=-2095105&r|(1023&i)<<11;break t}}e&&(s=+!!(512&r)-1,1024<(e=Math.max(e,i-s))&&(Se(n,s,{}),r|=256,e=1023),r=-2095105&r|(1023&e)<<11)}}return Ht(t,r),t}function Se(t,e,n){const r=1023+e,i=t.length;for(let s=r;s<i;s++){const r=t[s];null!=r&&r!==n&&(n[s-e]=r)}t.length=r+1,t[r]=n}function xe(t){if(2&t.g)throw Error("Cannot mutate an immutable Map")}var Fe=class extends Map{constructor(t,e,n=Ae,r=Ae){super();let i=Wt(t);i|=64,Ht(t,i),this.g=i,this.l=e,this.h=n||Ae,this.j=this.l?Oe:r||Ae;for(let s=0;s<t.length;s++){const o=t[s],a=n(o[0],!1,!0);let c=o[1];e?void 0===c&&(c=null):c=r(o[1],!1,!0,void 0,void 0,i),super.set(a,c)}}s(t=Me){return this.m(t)}m(t=Me){const e=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=t(r[0]),r[1]=t(r[1]),e.push(r);return e}clear(){xe(this),super.clear()}delete(t){return xe(this),super.delete(this.h(t,!0,!1))}entries(){var t=this.A();return new ie(t,Re,this)}keys(){return this.C()}values(){var t=this.A();return new ie(t,Fe.prototype.get,this)}forEach(t,e){super.forEach(((n,r)=>{t.call(e,this.get(r),r,this)}))}set(t,e){return xe(this),null==(t=this.h(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.j(e,!0,!0,this.l,!1,this.g))}H(t){const e=this.h(t[0],!1,!0);t=t[1],t=this.l?void 0===t?null:t:this.j(t,!1,!0,void 0,!1,this.g),super.set(e,t)}has(t){return super.has(this.h(t,!1,!1))}get(t){t=this.h(t,!1,!1);const e=super.get(t);if(void 0!==e){var n=this.l;return n?((n=this.j(e,!1,!0,n,this.v,this.g))!==e&&super.set(t,n),n):e}}A(){return Array.from(super.keys())}C(){return super.keys()}[Symbol.iterator](){return this.entries()}};function Oe(t,e,n,r,i,s){return t=_e(t,r,n,s),i&&(t=Be(t)),t}function Me(t){return t}function Re(t){return[t,this.get(t)]}function Ce(t,e,n,r,i,s){if(null!=t){if(Array.isArray(t))t=i&&0==t.length&&1&Wt(t)?void 0:s&&2&Wt(t)?t:Pe(t,e,n,void 0!==r,i,s);else if(te(t)){const o={};for(let a in t)o[a]=Ce(t[a],e,n,r,i,s);t=o}else t=e(t,r);return t}}function Pe(t,e,n,r,i,s){const o=r||n?Wt(t):0;r=r?!!(32&o):void 0;const a=Ut(t);for(let t=0;t<a.length;t++)a[t]=Ce(a[t],e,n,r,i,s);return n&&(ce(a,t),n(o,a)),a}function Ie(t){return Ce(t,Ne,void 0,void 0,!1,!1)}function Ne(t){return t.K===Qt?t.toJSON():t instanceof Fe?t.s(Ie):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t&&!Array.isArray(t)){if(N(t))return M(t);if(t instanceof W){const e=t.L;return null==e?"":"string"==typeof e?e:t.L=M(e)}if(t instanceof Fe)return t.s()}}return t}(t)}function De(t,e,n=qt){if(null!=t){if(F&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){const r=Wt(t);return 2&r?t:!e||68&r||!(32&r||0===r)?Pe(t,De,4&r?qt:n,!0,!1,!0):(Ht(t,34|r),t)}return t.K===Qt?(e=t.u,t=2&(n=zt(e))?t:$e(t,e,n,!0)):t instanceof Fe&&(e=Xt(t.m(De)),t=new Fe(e,t.l,t.h,t.j)),t}}function $e(t,e,n,r){return t=t.constructor,Ee=e=Ue(e,n,r),e=new t(e),Ee=void 0,e}function Ue(t,e,n){const r=n||2&e?qt:Yt,i=!!(32&e);return t=function(t,e,n){const r=Ut(t);var i=r.length;const s=256&e?r[i-1]:void 0;for(i+=s?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(s){e=r[e]={};for(const t in s)e[t]=n(s[t])}return ce(r,t),r}(t,e,(t=>De(t,i,r))),Gt(t,32|(n?2:0)),t}function Be(t){const e=t.u,n=zt(e);return 2&n?$e(t,e,n,!1):t}function Ge(t,e){return je(t=t.u,zt(t),e)}function je(t,e,n,r){if(-1===n)return null;if(n>=Jt(e)){if(256&e)return t[t.length-1][n]}else{var i=t.length;if(r&&256&e&&null!=(r=t[i-1][n]))return r;if((e=n+(+!!(512&e)-1))<i)return t[e]}}function Ve(t,e,n,r){const i=t.u,s=zt(i);return re(s),We(i,s,e,n,r),t}function We(t,e,n,r,i){var s=Jt(e);if(n>=s||i){if(i=e,256&e)s=t[t.length-1];else{if(null==r)return;s=t[s+(+!!(512&e)-1)]={},i|=256}s[n]=r,i!==e&&Ht(t,i)}else t[n+(+!!(512&e)-1)]=r,256&e&&n in(t=t[t.length-1])&&delete t[n]}function ze(t,e,n,r,i){var s=2&e;let o=je(t,e,n,i);Array.isArray(o)||(o=Zt);const a=Wt(o);if(1&a||Kt(o),s)2&a||Xt(o),1&r||Object.freeze(o);else{s=!(2&r);const c=2&a;1&r||!c?s&&32&a&&!c&&Vt(o,32):(o=Kt(Ut(o)),We(t,e,n,o,i))}return o}function He(t,e){t=t.u;const n=zt(t),r=je(t,n,e),i=ue(r);return null!=i&&i!==r&&We(t,n,e,i),i}function Ke(t){t=t.u;const e=zt(t),n=je(t,e,1),r=ee(n,!0,!!(34&e));return null!=r&&r!==n&&We(t,e,1,r),r}function Xe(t,e,n){t=t.u;const r=zt(t),i=2&r;let s=ze(t,r,e,1),o=Wt(s);if(!(4&o)){Object.isFrozen(s)&&(o=0,s=Ut(s),We(t,r,e,s));let a=0,c=0;for(;a<s.length;a++){const t=n(s[a]);null!=t&&(s[c++]=t)}c<a&&(s.length=c),o|=5,i&&(o|=34),Ht(s,o),2&o&&Object.freeze(s)}return!i&&(2&o||Object.isFrozen(s))&&(s=Ut(s),Gt(s,5),We(t,r,e,s)),s}let Ye;function qe(){return Ye??=new Fe(Xt([]),void 0,void 0,void 0,se)}function Je(t){t=Ut(t);for(let e=0;e<t.length;e++){const n=t[e]=Ut(t[e]);Array.isArray(n[1])&&(n[1]=Xt(n[1]))}return t}function Ze(t,e,n){{t=t.u;const r=zt(t);if(re(r),null==n)We(t,r,e);else{if(!(4&Wt(n))){Object.isFrozen(n)&&(n=Ut(n));for(let t=0;t<n.length;t++)n[t]=ge(n[t]);Ht(n,5)}We(t,r,e,n)}}}function Qe(t,e){return tn(t=t.u,zt(t),Gi)===e?e:-1}function tn(t,e,n){let r=0;for(let i=0;i<n.length;i++){const s=n[i];null!=je(t,e,s)&&(0!==r&&We(t,e,r),r=s)}return r}function en(t,e,n,r){const i=zt(t);re(i);const s=je(t,i,n,r);let o;if(null!=s&&s.K===Qt)return(e=Be(s))!==s&&We(t,i,n,e,r),e.u;if(Array.isArray(s)){const t=Wt(s);o=2&t?Ue(s,t,!1):s,o=ke(o,e)}else o=ke(void 0,e);return o!==s&&We(t,i,n,o,r),o}function nn(t,e,n,r){t=t.u;const i=zt(t),s=je(t,i,n,r);return(e=_e(s,e,!1,i))!==s&&null!=e&&We(t,i,n,e,r),e}function rn(t,e,n,r=!1){if(null==(e=nn(t,e,n,r)))return e;t=t.u;const i=zt(t);if(!(2&i)){const s=Be(e);s!==e&&We(t,i,n,e=s,r)}return e}function sn(t,e,n,r,i){var s=!!(2&e),o=ze(t,e,r,1);if(o===Zt||!(4&Wt(o))){var a=o;o=!!(2&e);var c=!!(2&Wt(a));s=a,!o&&c&&(a=Ut(a));var h=e|(c?2:0);c=c||void 0;let u=0,l=0;for(;u<a.length;u++){const t=_e(a[u],n,!1,h);void 0!==t&&(c=c||2&zt(t.u),a[l++]=t)}return l<u&&(a.length=l),h=5|(a=Wt(n=a)),a!=(c=c?-9&h:8|h)&&(Object.isFrozen(n)&&(n=Ut(n)),Ht(n,c)),s!==(a=n)&&We(t,e,r,a),(o&&2!==i||1===i)&&Object.freeze(a),a}return 3===i||(s?2===i&&(i=Wt(o),o=Ut(o),Ht(o,i),We(t,e,r,o)):(s=Object.isFrozen(o),1===i?s||Object.freeze(o):(n=-35&(i=Wt(o)),s&&(i=0,We(t,e,r,o=Ut(o))),i!==n&&Ht(o,n)))),o}function on(t,e,n){var r=t.u;const i=zt(r);if(e=sn(r,i,e,n,(t=!!(2&i))?1:2),!(t||8&Wt(e))){for(n=0;n<e.length;n++)(t=e[n])!==(r=Be(t))&&(e[n]=r);Gt(e,8)}return e}function an(t,e,n,r,i){return null==r&&(r=void 0),Ve(t,n,r,i)}function cn(t,e,n,r){null==r&&(r=void 0),t=t.u;const i=zt(t);re(i),(n=tn(t,i,n))&&n!==e&&null!=r&&We(t,i,n),We(t,i,e,r)}function hn(t,e,n){t=t.u;const r=zt(t);re(r),t=sn(t,r,e,1,2),e=null!=n?n:new e,t.push(e),e.G()&&Vt(t,8)}function un(t,e){return fe(Ge(t,e))}function ln(t){return null==(t=Ge(t,2))||de(t)?t:void 0}function dn(t,e){return ye(Ge(t,e))}function fn(t){return t??0}function pn(t,e){return fn(He(t,e))}function gn(t,e,n){if(null!=n){if("boolean"!=typeof n)throw t=typeof n,Error(`Expected boolean but got ${"object"!=t?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);n=!!n}Ve(t,e,n)}function mn(t,e,r){if(null!=r){if("number"!=typeof r)throw he(t=Error(),"warning"),t;if(!Number.isFinite(r)){const t=Error();he(t,"incident"),function(t){n.setTimeout((()=>{throw t}),0)}(t)}}Ve(t,e,r)}function yn(t,e,n){if(null!=n&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Ve(t,e,n)}function _n(t,e,n){n=ge(n),t=t.u;const r=zt(t);re(r),ze(t,r,e,2).push(n)}function vn(t,e,n){e.g?e.m(t,e.g,e.h,n,!0):e.m(t,e.h,n,!0)}Fe.prototype.toJSON=void 0;var An=class{constructor(t,e){this.u=Le(t,e)}toJSON(){return wn(this,Pe(this.u,Ne,void 0,void 0,!1,!1),!0)}l(){var t=Ds;return t.g?t.l(this,t.g,t.h,!0):t.l(this,t.h,t.defaultValue,!0)}clone(){const t=this.u;return $e(this,t,zt(t),!1)}G(){return!!(2&Wt(this.u))}};function wn(t,e,n){var r=t.constructor.B,i=Jt(zt(n?t.u:e)),s=!1;if(r){if(!n){var o;if((e=Ut(e)).length&&te(o=e[e.length-1]))for(s=0;s<r.length;s++)if(r[s]>=i){Object.assign(e[e.length-1]={},o);break}s=!0}var a;i=e,n=!n,t=Jt(o=zt(t.u)),o=+!!(512&o)-1;for(let e=0;e<r.length;e++){var c=r[e];if(c<t){var h=i[c+=o];null==h?i[c]=n?Zt:Kt([]):n&&h!==Zt&&jt(h)}else{if(!a){var u=void 0;i.length&&te(u=i[i.length-1])?a=u:i.push(a={})}h=a[c],null==a[c]?a[c]=n?Zt:Kt([]):n&&h!==Zt&&jt(h)}}}if(!(r=e.length))return e;let l,d;if(te(a=e[r-1])){t:{var f=a;u={},i=!1;for(let t in f)n=f[t],Array.isArray(n)&&n!=n&&(i=!0),null!=n?u[t]=n:i=!0;if(i){for(let t in u){f=u;break t}f=null}}f!=a&&(l=!0),r--}for(;0<r&&null==(a=e[r-1]);r--)d=!0;return l||d?(e=s?e:Array.prototype.slice.call(e,0,r),s&&(e.length=r),f&&e.push(f),e):e}function En(t){return{aa:dr,S:t}}function bn(t,e){if(Array.isArray(e)){var n=Wt(e);if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),Ht(e,5|n),2&n&&Object.freeze(e),e}}An.prototype.K=Qt,An.prototype.toString=function(){return wn(this,this.u,!1).toString()};const Tn=Symbol();function kn(t){let e=t[Tn];if(!e){const n=Dn(t),r=n.m;e=r?(t,e)=>r(t,e,n):(t,e)=>{for(;gt(e)&&4!=e.h;){var r=e.m,i=n[r];if(!i){var s=n.h;s&&(s=s[r])&&(i=n[r]=Ln(s))}i&&i(e,t,r)||(r=(i=e).l,mt(i),i.Y?i=void 0:(s=i.g.g-r,i.g.g=r,i=dt(i.g,s)),r=t,i&&(oe||=Symbol(),(s=r[oe])?s.push(i):r[oe]=[i]))}(e=n.l)&&(t[ae||=Symbol()]=e)},t[Tn]=e}return e}function Ln(t){const e=function(t){if(t=t.S)return kn(t)}(t),n=t.aa.g;if(e){const r=Dn(t.S).g;return(t,i,s)=>n(t,i,s,r,e)}return(t,e,r)=>n(t,e,r)}function Sn(t,e,n,r){e.g=Te(t[0]);let i=1;if(t.length>i&&!(t[i]instanceof $t)){var s=t[i++];if(Array.isArray(s))return e.m=s[0],e.h=s[1],e;e.h=s}for(s=0;i<t.length;){const u=t[i++];var o=t[i];for("number"==typeof o?(i++,s+=o):s++,u.l&&((o=e.l)||(e.l=o=[]),o.push(s)),o=i;o<t.length&&!(t[o]instanceof $t);)o++;if(o-=i){var a=t,c=i,h=a[c];if("function"==typeof h&&(h=h(),a[c]=h),(a=Array.isArray(h))&&!(a=Pn in h||On in h)&&(a=0<h.length)){const t=Te(c=(a=h)[0]);null!=t&&t!==c&&(a[0]=t),a=null!=t}(h=a?h:void 0)?(i++,e[s]=1===o?r(u,h):r(u,h,t[i++])):e[s]=n(u,t[i++])}else e[s]=n(u)}return e}const xn=Symbol();function Fn(t){let e=t[xn];if(!e){const n=Cn(t);e=(t,e)=>Un(t,e,n),t[xn]=e}return e}const On=Symbol();function Mn(t){return t.h}function Rn(t,e){let n,r;const i=t.h;return(t,s,o)=>i(t,s,o,r||=Cn(e).g,n||=Fn(e))}function Cn(t){let e=t[On];return e||(e=Sn(t,t[On]={},Mn,Rn),Pn in t&&On in t&&(t.length=0),e)}const Pn=Symbol();function In(t,e){const n=t.g;return e?(t,r,i)=>n(t,r,i,e):n}function Nn(t,e,n){const r=t.g;let i,s;return(t,o,a)=>r(t,o,a,s||=Dn(e).g,i||=kn(e),n)}function Dn(t){let e=t[Pn];return e||(e=Sn(t,t[Pn]={},In,Nn),Pn in t&&On in t&&(t.length=0),e)}function $n(t,e){var n=t[e];if(n)return n;if((n=t.h)&&(n=n[e])){var r=n.S,i=n.aa.h;if(r){const t=Fn(r),e=Cn(r).g;n=(n,r,s)=>i(n,r,s,e,t)}else n=i;return t[e]=n}}function Un(t,e,n){for(var r=zt(t),i=+!!(512&r)-1,s=t.length,o=512&r?1:0,a=s+(256&r?-1:0);o<a;o++){const r=t[o];if(null==r)continue;const s=o-i,a=$n(n,s);a&&a(e,r,s)}if(256&r){r=t[s-1];for(let t in r)i=+t,Number.isNaN(i)||null!=(s=r[t])&&(a=$n(n,i))&&a(e,s,i)}if(t=oe?t[oe]:void 0)for(Rt(e,e.g.end()),n=0;n<t.length;n++)Rt(e,V(t[n])||$())}function Bn(t,e){return new $t(t,e,!1)}function Gn(t,e){return new $t(t,e,!0)}function jn(t,e,n){We(t,zt(t),e,n)}var Vn=Bn((function(t,e,n,r,i){return 2===t.h&&(t=yt(t,ke([void 0,void 0],r),i),re(r=zt(e)),(i=je(e,r,n))instanceof Fe?0!=(2&i.g)?((i=i.m()).push(t),We(e,r,n,i)):i.H(t):Array.isArray(i)?(2&Wt(i)&&We(e,r,n,i=Je(i)),i.push(t)):We(e,r,n,[t]),!0)}),(function(t,e,n,r,i){if(e instanceof Fe)e.forEach(((e,s)=>{Dt(t,n,ke([s,e],r),i)}));else if(Array.isArray(e))for(let s=0;s<e.length;s++){const o=e[s];Array.isArray(o)&&Dt(t,n,ke(o,r),i)}}));function Wn(t,e,n){t:if(null!=e){if(de(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&kt(e),null!=e&&(Ct(t,n,0),"number"==typeof e?(t=t.g,tt(e),xt(t,Z,Q)):(n=kt(e),xt(t.g,n.h,n.g))))}function zn(t,e,n){null!=(e=fe(e))&&null!=e&&(Ct(t,n,0),Ot(t.g,e))}function Hn(t,e,n){null!=(e=le(e))&&(Ct(t,n,0),t.g.g.push(e?1:0))}function Kn(t,e,n){null!=(e=ye(e))&&Nt(t,n,d(e))}function Xn(t,e,n,r,i){Dt(t,n,e instanceof An?e.u:Array.isArray(e)?ke(e,r):void 0,i)}function Yn(t,e,n){null!=(e=null==e||"string"==typeof e||N(e)||e instanceof W?e:void 0)&&Nt(t,n,Y(e).buffer)}function qn(t,e,n){return(5===t.h||2===t.h)&&(e=ze(e,zt(e),n,2,!1),2==t.h?At(t,ft.prototype.A,e):e.push(t.g.A()),!0)}var Jn=Bn((function(t,e,n){if(1!==t.h)return!1;var r=t.g;t=ut(r);const i=ut(r);r=2*(i>>31)+1;const s=i>>>20&2047;return t=4294967296*(1048575&i)+t,jn(e,n,2047==s?t?NaN:1/0*r:0==s?r*Math.pow(2,-1074)*t:r*Math.pow(2,s-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=ue(e))&&(Ct(t,n,1),t=t.g,(n=J||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),Z=n.getUint32(0,!0),Q=n.getUint32(4,!0),Mt(t,Z),Mt(t,Q))})),Zn=Bn((function(t,e,n){return 5===t.h&&(jn(e,n,t.g.A()),!0)}),(function(t,e,n){null!=(e=ue(e))&&(Ct(t,n,5),t=t.g,et(e),Mt(t,Z))})),Qn=Gn(qn,(function(t,e,n){if(null!=(e=bn(ue,e)))for(let s=0;s<e.length;s++){var r=t,i=e[s];null!=i&&(Ct(r,n,5),r=r.g,et(i),Mt(r,Z))}})),tr=Gn(qn,(function(t,e,n){if(null!=(e=bn(ue,e))&&e.length){Ct(t,n,2),Ft(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,et(e[r]),Mt(n,Z)}})),er=Bn((function(t,e,n){return 0===t.h&&(jn(e,n,ct(t.g,rt)),!0)}),Wn),nr=Bn((function(t,e,n){return 0===t.h&&(jn(e,n,0===(t=ct(t.g,rt))?void 0:t),!0)}),Wn),rr=Bn((function(t,e,n){return 0===t.h&&(jn(e,n,ct(t.g,nt)),!0)}),(function(t,e,n){t:if(null!=e){if(de(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&Et(e),null!=e&&(Ct(t,n,0),"number"==typeof e?(t=t.g,tt(e),xt(t,Z,Q)):(n=Et(e),xt(t.g,n.h,n.g))))})),ir=Bn((function(t,e,n){return 0===t.h&&(jn(e,n,t.g.m()),!0)}),zn),sr=Gn((function(t,e,n){return(0===t.h||2===t.h)&&(e=ze(e,zt(e),n,2,!1),2==t.h?At(t,ft.prototype.m,e):e.push(t.g.m()),!0)}),(function(t,e,n){if(null!=(e=bn(fe,e))&&e.length){n=Pt(t,n);for(let n=0;n<e.length;n++)Ot(t.g,e[n]);It(t,n)}})),or=Bn((function(t,e,n){return 0===t.h&&(jn(e,n,0===(t=t.g.m())?void 0:t),!0)}),zn),ar=Bn((function(t,e,n){return 0===t.h&&(jn(e,n,ht(t.g)),!0)}),Hn),cr=Bn((function(t,e,n){return 0===t.h&&(jn(e,n,!1===(t=ht(t.g))?void 0:t),!0)}),Hn),hr=Gn((function(t,e,n){if(2!==t.h)return!1;t=_t(t);const r=zt(e);return re(r),ze(e,r,n,2).push(t),!0}),(function(t,e,n){if(null!=(e=bn(ye,e)))for(let i=0;i<e.length;i++){var r=e[i];null!=r&&Nt(t,n,d(r))}})),ur=Bn((function(t,e,n){return 2===t.h&&(jn(e,n,""===(t=_t(t))?void 0:t),!0)}),Kn),lr=Bn((function(t,e,n){return 2===t.h&&(jn(e,n,_t(t)),!0)}),Kn),dr=Bn((function(t,e,n,r,i){return 2===t.h&&(yt(t,en(e,r,n,!0),i),!0)}),Xn),fr=Bn((function(t,e,n,r,i){return 2===t.h&&(yt(t,en(e,r,n),i),!0)}),Xn),pr=Gn((function(t,e,n,r,i){if(2!==t.h)return!1;r=ke(void 0,r);const s=zt(e);re(s);let o=ze(e,s,n,3);return(Object.isFrozen(o)||4&Wt(o))&&(o=Ut(o),We(e,s,n,o)),o.push(r),yt(t,r,i),!0}),(function(t,e,n,r,i){if(Array.isArray(e))for(let s=0;s<e.length;s++)Xn(t,e[s],n,r,i)})),gr=Bn((function(t,e,n,r,i,s){if(2!==t.h)return!1;const o=zt(e);return re(o),(s=tn(e,o,s))&&n!==s&&We(e,o,s),yt(t,e=en(e,r,n),i),!0}),Xn),mr=Bn((function(t,e,n){return 2===t.h&&(jn(e,n,vt(t)),!0)}),Yn),yr=Gn((function(t,e,n){return(0===t.h||2===t.h)&&(e=ze(e,zt(e),n,2,!1),2==t.h?At(t,ft.prototype.j,e):e.push(t.g.j()),!0)}),(function(t,e,n){if(null!=(e=bn(pe,e)))for(let s=0;s<e.length;s++){var r=t,i=e[s];null!=i&&(Ct(r,n,0),Ft(r.g,i))}})),_r=Bn((function(t,e,n){return 0===t.h&&(jn(e,n,t.g.m()),!0)}),(function(t,e,n){null!=(e=fe(e))&&(e=parseInt(e,10),Ct(t,n,0),Ot(t.g,e))})),vr=Gn((function(t,e,n){return(0===t.h||2===t.h)&&(e=ze(e,zt(e),n,2,!1),2==t.h?At(t,ft.prototype.C,e):e.push(t.g.m()),!0)}),(function(t,e,n){if(null!=(e=bn(fe,e))&&e.length){n=Pt(t,n);for(let n=0;n<e.length;n++)Ot(t.g,e[n]);It(t,n)}}));class Ar{constructor(t,e){this.h=t,this.g=e,this.l=rn,this.m=an,this.defaultValue=void 0}}function wr(t,e){return new Ar(t,e)}function Er(t,e){return(n,r)=>{t:{if(wt.length){const t=wt.pop();t.o(r),ot(t.g,n,r),n=t}else n=new class{constructor(t,e){if(pt.length){const n=pt.pop();ot(n,t,e),t=n}else t=new ft(t,e);this.g=t,this.l=this.g.g,this.h=this.m=-1,this.o(e)}o({Y:t=!1}={}){this.Y=t}}(n,r);try{var i=new t;const r=i.u;kn(e)(r,n),ae&&delete r[ae];var s=i;break t}finally{(i=n.g).h=null,i.s=!1,i.v=0,i.l=0,i.g=0,i.O=!1,n.m=-1,n.h=-1,100>wt.length&&wt.push(n)}s=void 0}return s}}function br(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};Un(this.u,e,Cn(t)),Rt(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,i=r.length;let s=0;for(let t=0;t<i;t++){const e=r[t];n.set(e,s),s+=e.length}return e.l=[n],n}}var Tr,kr=[0,ur,Bn((function(t,e,n){return 2===t.h&&(jn(e,n,(t=vt(t))===j()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof An){const r=e.Aa;return void(r&&(e=r(e),null!=e&&Nt(t,n,Y(e).buffer)))}if(Array.isArray(e))return}Yn(t,e,n)}))];function Lr(t){if(void 0===Tr){var e=null,r=n.trustedTypes;if(r&&r.createPolicy){try{e=r.createPolicy("goog#html",{createHTML:i,createScript:i,createScriptURL:i})}catch(t){n.console&&n.console.error(t.message)}Tr=e}else Tr=e}return t=(e=Tr)?e.createScriptURL(t):t,new class{constructor(t){this.g=t}toString(){return this.g+""}}(t)}var Sr=[0,lr],xr=[0,ir,_r,ar,ar,sr,_r,_r],Fr=[0,ar,ar],Or=class extends An{constructor(){super()}};Or.B=[6];var Mr=[0,ar,lr,ar,_r,_r,vr,lr,lr,fr,Fr,_r],Rr=[0,lr,lr,lr],Cr=class extends An{constructor(){super()}},Pr=[0],Ir=[0,ir],Nr=[1,2,3,4,5],Dr=class extends An{constructor(t){super(t,2)}},$r={},Ur=[-2,$r,ar];$r[336783863]=En([0,lr,ar,ar,ir,fr,[0,gr,Pr,Nr,gr,Mr,Nr,gr,Rr,Nr,gr,Ir,Nr,gr,xr,Nr],fr,Sr]);var Br=[0,ur,cr],Gr=[0,nr,nr,cr,cr,cr,cr,nr,sr,ur,or,nr,nr,cr,or,cr,cr,cr,ur],jr=[-1,{}],Vr=[0,lr,fr,2,jr],Wr=[0,lr,hr,fr,jr];function zr(t,e){e=me(e),t=t.u;const n=zt(t);re(n),We(t,n,2,""===e?void 0:e)}function Hr(t,e){_n(t,3,e)}function Kr(t,e){_n(t,4,e)}var Xr=class extends An{constructor(t){super(t,500)}o(t){return an(this,0,7,t)}};Xr.B=[3,4,5,6,8,13,17,1005];var Yr=[-500,ur,ur,hr,hr,hr,hr,fr,Ur,pr,kr,or,or,fr,Vr,fr,Wr,pr,Br,ur,fr,Gr,or,hr,hr,988],qr=[0,ur,ur,fr,jr],Jr=[-500,lr,lr,fr,[-1,{}],lr,999],Zr=[-500,lr,hr,hr,fr,[-2,{},ar],hr,998,hr],Qr=[-500,lr,hr,fr,jr,hr,999];function ti(t,e){hn(t,Xr,e)}function ei(t,e){_n(t,10,e)}function ni(t,e){_n(t,15,e)}var ri=class extends An{constructor(t){super(t,500)}o(t){return an(this,0,1001,t)}};ri.B=[1,6,7,9,10,15,16,17,14,1002];var ii=[-500,pr,Yr,pr,5,Jr,pr,Zr,or,pr,Qr,hr,or,fr,Vr,fr,Wr,pr,qr,hr,hr,hr,fr,Gr,ur,ur,cr,fr,980,jr,pr,kr],si=Er(ri,ii);ri.prototype.g=br(ii);var oi=[0,pr,[0,ir,ir,ir]],ai=class extends An{constructor(t){super(t)}},ci=[0,ir,Zn,lr,lr],hi=class extends An{constructor(t){super(t)}g(){return on(this,ai,1)}};hi.B=[1];var ui=[0,pr,ci],li=Er(hi,ui),di=[0,ir,Zn],fi=[0,ir,ir,fr,oi],pi=class extends An{constructor(t){super(t)}},gi=[0,ir,ir,ir,ir],mi=[0,Zn,Zn,Zn,Zn],yi=class extends An{constructor(t){super(t)}},_i=[0,Zn,Zn,lr,Zn],vi=class extends An{constructor(t){super(t)}h(){return rn(this,pi,2)}g(){return on(this,yi,5)}};vi.B=[5];var Ai=[0,_r,fr,gi,fr,mi,fr,fi,pr,_i],wi=class extends An{constructor(t){super(t)}};wi.B=[1,2,3,8,9];var Ei=Er(wi,[0,hr,sr,tr,fr,Ai,lr,lr,er,pr,di,hr,er]),bi=class extends An{constructor(t){super(t)}},Ti=[0,Zn,Zn,Zn,Zn,Zn],ki=class extends An{constructor(t){super(t)}};ki.B=[1];var Li=Er(ki,[0,pr,Ti]),Si=class extends An{constructor(t){super(t)}},xi=[0,Zn,Zn,Zn,Zn,Zn],Fi=class extends An{constructor(t){super(t)}};Fi.B=[1];var Oi=Er(Fi,[0,pr,xi]),Mi=class extends An{constructor(t){super(t)}};Mi.B=[3];var Ri=[0,ir,ir,tr,_r],Ci=class extends An{constructor(){super()}};Ci.prototype.g=br([0,Zn,Zn,Zn,Zn,Zn,er]);var Pi=class extends An{constructor(t){super(t)}},Ii=[0,ir,2,lr,fr,ui],Ni=class extends An{constructor(t){super(t)}};Ni.B=[1];var Di=Er(Ni,[0,pr,Ii,er]),$i=class extends An{constructor(t){super(t)}};$i.B=[1];var Ui=class extends An{constructor(t){super(t)}da(){const t=Ke(this);return null==t?j():t}},Bi=class extends An{constructor(t){super(t)}},Gi=[1,2],ji=[0,gr,[0,tr],Gi,gr,[0,mr],Gi,ir,lr],Vi=class extends An{constructor(t){super(t)}};Vi.B=[1];var Wi=Er(Vi,[0,pr,ji,er]),zi=class extends An{constructor(t){super(t)}};zi.B=[4,5];var Hi=[0,lr,ir,Zn,hr,hr],Ki=class extends An{constructor(t){super(t)}},Xi=[0,ar,ar],Yi=class extends An{constructor(t){super(t)}},qi=[1,2,3,4,5],Ji=class extends An{constructor(t){super(t)}g(){return null!=Ke(this)}h(){return null!=dn(this,2)}},Zi=[0,mr,lr,fr,[0,ir,er,er],fr,[0,rr,er]],Qi=class extends An{constructor(t){super(t)}g(){return le(Ge(this,2))??!1}},ts=[0,fr,Zi,ar,fr,[0,gr,Ir,qi,gr,Mr,qi,gr,xr,qi,gr,Pr,qi,gr,Rr,qi]],es=class extends An{constructor(t){super(t)}},ns=[0,fr,ts,Zn,Zn,ir],rs=wr(502141897,es);$r[502141897]=En(ns);var is=[0,fr,Zi];$r[512499200]=En(is);var ss=[0,fr,is];$r[515723506]=En(ss);var os=Er(class extends An{constructor(t){super(t)}},[0,fr,[0,_r,_r,Qn,yr],fr,Ri]),as=[0,fr,ts];$r[508981768]=En(as);var cs=class extends An{constructor(t){super(t)}},hs=[0,fr,ts,Zn,fr,as,ar],us=class extends An{constructor(t){super(t)}},ls=[0,fr,ts,fr,ns,fr,hs,Zn,fr,ss];$r[508968149]=En(hs);var ds=wr(508968150,us);$r[508968150]=En(ls);var fs=class extends An{constructor(t){super(t)}},ps=wr(513916220,fs);$r[513916220]=En([0,fr,ts,fr,ls,ir]);var gs=class extends An{constructor(t){super(t)}h(){return rn(this,zi,2)}g(){Ve(this,2)}},ms=[0,fr,ts,fr,Hi];$r[478825465]=En(ms);var ys=[0,fr,ts];$r[478825422]=En(ys);var _s=class extends An{constructor(t){super(t)}},vs=[0,fr,ts,fr,ys,fr,ms,fr,ms],As=class extends An{constructor(t){super(t)}},ws=[0,fr,ts,Zn,ir],Es=class extends An{constructor(t){super(t)}},bs=[0,fr,ts,Zn],Ts=class extends An{constructor(t){super(t)}},ks=[0,fr,ts,fr,ws,fr,bs,Zn],Ls=class extends An{constructor(t){super(t)}},Ss=[0,fr,ts,fr,ks,fr,vs];$r[463370452]=En(vs),$r[464864288]=En(ws),$r[474472470]=En(bs);var xs=wr(462713202,Ts);$r[462713202]=En(ks);var Fs=wr(479097054,Ls);$r[479097054]=En(Ss);var Os=class extends An{constructor(t){super(t)}},Ms=wr(456383383,Os);$r[456383383]=En([0,fr,ts,fr,Hi]);var Rs=class extends An{constructor(t){super(t)}},Cs=wr(476348187,Rs);$r[476348187]=En([0,fr,ts,fr,Xi]);var Ps=class extends An{constructor(t){super(t)}},Is=[0,_r,_r],Ns=class extends An{constructor(t){super(t)}};Ns.B=[3];var Ds=wr(458105876,class extends An{constructor(t){super(t)}g(){var t=this.u;const e=zt(t);var n=2&e;return t=function(t,e,n){var r=Ns;const i=2&e;let s=!1;if(null==n){if(i)return qe();n=[]}else if(n.constructor===Fe){if(0==(2&n.g)||i)return n;n=n.m()}else Array.isArray(n)?s=!!(2&Wt(n)):n=[];if(i){if(!n.length)return qe();s||(s=!0,Xt(n))}else s&&(s=!1,n=Je(n));return s||(64&Wt(n)?Vt(n,32):32&e&&Gt(n,32)),We(t,e,2,r=new Fe(n,r,we,void 0),!1),r}(t,e,je(t,e,2)),null==t||!n&&Ns&&(t.v=!0),t}});$r[458105876]=En([0,fr,Is,Vn,[0,er,fr,[0,lr,lr,hr]]]);var $s=class extends An{constructor(t){super(t)}},Us=wr(458105758,$s);$r[458105758]=En([0,fr,ts,lr,fr,Is]);var Bs=class extends An{constructor(t){super(t)}};Bs.B=[5,6];var Gs=wr(443442058,Bs);$r[443442058]=En([0,fr,ts,lr,ir,Zn,hr,hr]);var js=class extends An{constructor(t){super(t)}},Vs=[0,fr,ts,Zn,Zn,ir];$r[514774813]=En(Vs);var Ws=class extends An{constructor(t){super(t)}},zs=[0,fr,ts,Zn],Hs=class extends An{constructor(t){super(t)}},Ks=[0,fr,ts,fr,Vs,fr,zs,Zn];$r[518928384]=En(zs);var Xs=wr(516587230,Hs);function Ys(t,e){return e=e?e.clone():new zi,void 0!==t.displayNamesLocale?Ve(e,1,me(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ve(e,1),void 0!==t.maxResults?mn(e,2,t.maxResults):"maxResults"in t&&Ve(e,2),void 0!==t.scoreThreshold?yn(e,3,t.scoreThreshold):"scoreThreshold"in t&&Ve(e,3),void 0!==t.categoryAllowlist?Ze(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ve(e,4),void 0!==t.categoryDenylist?Ze(e,5,t.categoryDenylist):"categoryDenylist"in t&&Ve(e,5),e}function qs(t,e=-1,n=""){return{categories:t.map((t=>({index:fn(un(t,1))??-1,score:pn(t,2)??0,categoryName:dn(t,3)??""??"",displayName:dn(t,4)??""??""}))),headIndex:e,headName:n}}function Js(t){var e=Xe(t,3,ue),n=Xe(t,2,fe);const r=Xe(t,1,ye),i=Xe(t,9,ye),s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:i[t]??""});if((e=rn(t,vi,4)?.h())&&(s.boundingBox={originX:un(e,1)??0,originY:un(e,2)??0,width:un(e,3)??0,height:un(e,4)??0,angle:0}),rn(t,vi,4)?.g().length)for(const e of rn(t,vi,4).g())s.keypoints.push({x:He(e,1)??0,y:He(e,2)??0,score:He(e,4)??0,label:dn(e,3)??""});return s}function Zs(t){const e=[];for(const n of on(t,Si,1))e.push({x:pn(n,1)??0,y:pn(n,2)??0,z:pn(n,3)??0});return e}function Qs(t){const e=[];for(const n of on(t,bi,1))e.push({x:pn(n,1)??0,y:pn(n,2)??0,z:pn(n,3)??0});return e}function to(t){return Array.from(t,(t=>127<t?t-256:t))}function eo(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s],r+=t[s]*t[s],i+=e[s]*e[s];if(0>=r||0>=i)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let no;$r[516587230]=En(Ks);const ro=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 io(){if(void 0===no)try{await WebAssembly.instantiate(ro),no=!0}catch{no=!1}return no}async function so(t,e){const n=await io()?"wasm_internal":"wasm_nosimd_internal";return void 0!==e?{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}:{wasmLoaderPath:Lr(`./${encodeURIComponent(t)}_${encodeURIComponent(n)}.js`),wasmBinaryPath:Lr(`./${encodeURIComponent(t)}_${encodeURIComponent(n)}.wasm`)}}var oo=class{};function ao(){const t=navigator.userAgent;return t.includes("Safari")&&!t.includes("Chrome")}async function co(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}function ho(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function uo(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");return t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),e.videoWidth?(n=e.videoWidth,e=e.videoHeight):e.naturalWidth?(n=e.naturalWidth,e=e.naturalHeight):(n=e.width,e=e.height),!t.l||n===t.i.canvas.width&&e===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=e),[n,e]}function lo(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function fo(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function po(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}function go(t,e){const n=rn(t.baseOptions,Ji,1)||new Ji;"string"==typeof e?(Ve(n,2,me(e)),Ve(n,1)):e instanceof Uint8Array&&(Ve(n,1,ee(e,!1,!1)),Ve(n,2)),an(t.baseOptions,0,1,n)}function mo(t){try{const e=t.I.length;if(1===e)throw Error(t.I[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.I.map((t=>t.message)).join(", "))}finally{t.I=[]}}function yo(t,e){t.H=Math.max(t.H,e)}function _o(t,e){t.A=new Xr,zr(t.A,"PassThroughCalculator"),Hr(t.A,"free_memory"),Kr(t.A,"free_memory_unused_out"),ei(e,"free_memory"),ti(e,t.A)}function vo(t,e){Hr(t.A,e),Kr(t.A,e+"_unused_out")}function Ao(t){t.g.addBoolToStream(!0,"free_memory",t.H)}oo.forVisionTasks=function(t=""){return so("vision",t)},oo.forTextTasks=function(t=""){return so("text",t)},oo.forAudioTasks=function(t=""){return so("audio",t)},oo.isSimdSupported=function(){return io()};var wo=class{constructor(t){this.g=t,this.I=[],this.H=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(rn(this.baseOptions,Ji,1)?.g()||rn(this.baseOptions,Ji,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=rn(t.baseOptions,Yi,3);if(!n){var r=n=new Yi,i=new Cr;cn(r,4,qi,i)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new Or,cn(e,2,qi,r)):(e=n,r=new Cr,cn(e,4,qi,r))),an(t.baseOptions,0,3,n)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)})).then((t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),go(this,"/model.dat"),this.m(),this.N()}));go(this,e.modelAssetBuffer)}return this.m(),this.N(),Promise.resolve()}N(){}U(){let t;if(this.g.U((e=>{t=si(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.I.push(Error(e))})),this.g.xa(),this.g.setGraph(t,e),this.A=void 0,mo(this)}finishProcessing(){this.g.finishProcessing(),mo(this)}close(){this.A=void 0,this.g.closeGraph()}};wo.prototype.close=wo.prototype.close;const Eo={color:"white",lineWidth:4,radius:6};function bo(t){return{...Eo,fillColor:(t=t||{}).color,...t}}function To(t,e){return t instanceof Function?t(e):t}function ko(t,e,n){return Math.max(Math.min(e,n),Math.min(Math.max(e,n),t))}var Lo=class{constructor(t){this.g=t}ka(t,e){if(t){var n=this.g;e=bo(e),n.save();var r=n.canvas,i=0;for(const s of t)n.fillStyle=To(e.fillColor,{index:i,from:s}),n.strokeStyle=To(e.color,{index:i,from:s}),n.lineWidth=To(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*r.width,s.y*r.height,To(e.radius,{index:i,from:s}),0,2*Math.PI),n.fill(t),n.stroke(t),++i;n.restore()}}ja(t,e,n){if(t&&e){var r=this.g;n=bo(n),r.save();var i=r.canvas,s=0;for(const o of e){r.beginPath(),e=t[o.start];const a=t[o.end];e&&a&&(r.strokeStyle=To(n.color,{index:s,from:e,to:a}),r.lineWidth=To(n.lineWidth,{index:s,from:e,to:a}),r.moveTo(e.x*i.width,e.y*i.height),r.lineTo(a.x*i.width,a.y*i.height)),++s,r.stroke()}r.restore()}}ia(t,e){const n=this.g;e=bo(e),n.save(),n.beginPath(),n.lineWidth=To(e.lineWidth,{}),n.strokeStyle=To(e.color,{}),n.fillStyle=To(e.fillColor,{}),n.moveTo(t.originX,t.originY),n.lineTo(t.originX+t.width,t.originY),n.lineTo(t.originX+t.width,t.originY+t.height),n.lineTo(t.originX,t.originY+t.height),n.lineTo(t.originX,t.originY),n.stroke(),n.fill(),n.restore()}};function So(t,e){if(null===t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}Lo.prototype.drawBoundingBox=Lo.prototype.ia,Lo.prototype.drawConnectors=Lo.prototype.ja,Lo.prototype.drawLandmarks=Lo.prototype.ka,Lo.lerp=function(t,e,n,r,i){return ko(r*(1-(t-e)/(n-e))+i*(1-(n-t)/(n-e)),r,i)},Lo.clamp=ko;class xo{constructor(t,e,n,r){this.g=t,this.h=e,this.m=n,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Fo(t,e,n){const r=t.h;if(n=So(r.createShader(n),"Failed to create WebGL shader"),r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(t.g,n),n}function Oo(t,e){const n=t.h,r=So(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const i=So(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.s),n.vertexAttribPointer(t.s,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const s=So(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.A),n.vertexAttribPointer(t.A,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[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 xo(n,r,i,s)}function Mo(t,e){if(t.h){if(e!==t.h)throw Error("Cannot change GL context once initialized")}else t.h=e}function Ro(t,e,n,r){if(Mo(t,e),!t.g){const e=t.h;if(t.g=So(e.createProgram(),"Failed to create WebGL program"),t.C=Fo(t,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",e.VERTEX_SHADER),t.v=Fo(t,"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n ",e.FRAGMENT_SHADER),e.linkProgram(t.g),!e.getProgramParameter(t.g,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(t.g)}`);t.s=e.getAttribLocation(t.g,"aVertex"),t.A=e.getAttribLocation(t.g,"aTex")}return n?(t.m||(t.m=Oo(t,!0)),n=t.m):(t.j||(t.j=Oo(t,!1)),n=t.j),e.useProgram(t.g),n.bind(),t=r(),n.g.bindVertexArray(null),t}function Co(t,e,n){Mo(t,e),t.l||(t.l=So(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.l),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function Po(t){t.h?.bindFramebuffer(t.h.FRAMEBUFFER,null)}var Io=class{close(){if(this.g){const t=this.h;t.deleteProgram(this.g),t.deleteShader(this.C),t.deleteShader(this.v)}this.l&&this.h.deleteFramebuffer(this.l),this.j&&this.j.close(),this.m&&this.m.close()}};function No(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Do(t){var e=No(t,0);if(!e){e=Uo(t);const n=Bo(t),r=new Uint8Array(t.width*t.height*4);Co(n,e,$o(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),Po(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function $o(t){let e=No(t,2);if(!e){const n=Uo(t);e=jo(t);const r=No(t,1)||Do(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Vo(t)}return e}function Uo(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");return t.h||(t.h=So(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Bo(t){return t.l||(t.l=new Io),t.l}function Go(t){(t=Uo(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,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)}function jo(t){const e=Uo(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=No(t,2);return n?e.bindTexture(e.TEXTURE_2D,n):(n=So(e.createTexture(),"Failed to create texture"),t.g.push(n),t.m=!0,e.bindTexture(e.TEXTURE_2D,n),Go(t)),n}function Vo(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function Wo(t){const e=Uo(t);return Ro(Bo(t),e,!0,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const r=n.width,i=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=r,n.height=i,t}(t,(()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))))}var zo=class{constructor(t,e,n,r,i,s,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=i,this.width=s,this.height=o,(this.j||this.m)&&0==--Ho&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}ta(){return!!No(this,0)}Z(){return!!No(this,1)}J(){return!!No(this,2)}pa(){return Do(this)}oa(){var t=No(this,1);return t||($o(this),jo(this),t=Wo(this),Vo(this),this.g.push(t),this.j=!0),t}T(){return $o(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const t=Uo(this),e=Bo(this);t.activeTexture(t.TEXTURE1),n=So(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,n),Go(this),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),Co(e,t,n),Ro(e,t,!1,(()=>{jo(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Vo(this)})),Po(e),Vo(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);$o(this),jo(this),n=Wo(this),Vo(this)}t.push(n)}return new zo(t,this.Z(),this.J(),this.canvas,this.l,this.width,this.height)}close(){this.j&&No(this,1).close(),this.m&&Uo(this).deleteTexture(No(this,2)),Ho=-1}};zo.prototype.close=zo.prototype.close,zo.prototype.clone=zo.prototype.clone,zo.prototype.getAsWebGLTexture=zo.prototype.T,zo.prototype.getAsImageBitmap=zo.prototype.oa,zo.prototype.getAsImageData=zo.prototype.pa,zo.prototype.hasWebGLTexture=zo.prototype.J,zo.prototype.hasImageBitmap=zo.prototype.Z,zo.prototype.hasImageData=zo.prototype.ta;var Ho=250;function Ko(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Xo(t){var e=Ko(t,1);if(!e){if(e=Ko(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const r=qo(t);var n=Zo(t);if(Co(n,r,Yo(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document){n=new Float32Array(t.width*t.height*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.FLOAT,n);for(let t=0,r=0;t<e.length;++t,r+=4)e[t]=n[r]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function Yo(t){let e=Ko(t,2);if(!e){const n=qo(t);e=ta(t);const r=Xo(t),i=Jo(t);n.texImage2D(n.TEXTURE_2D,0,i,t.width,t.height,0,n.RED,n.FLOAT,r),ea(t)}return e}function qo(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=So(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Jo(t){if(t=qo(t),!na)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))na=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");na=t.R16F}return na}function Zo(t){return t.l||(t.l=new Io),t.l}function Qo(t){(t=qo(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,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST)}function ta(t){const e=qo(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Ko(t,2);return n?e.bindTexture(e.TEXTURE_2D,n):(n=So(e.createTexture(),"Failed to create texture"),t.g.push(n),t.m=!0,e.bindTexture(e.TEXTURE_2D,n),Qo(t)),n}function ea(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var na,ra=class{constructor(t,e,n,r,i,s){this.g=t,this.m=e,this.canvas=n,this.l=r,this.width=i,this.height=s,this.m&&0==--ia&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}ua(){return!!Ko(this,0)}sa(){return!!Ko(this,1)}J(){return!!Ko(this,2)}qa(){return(t=Ko(this,0))||(t=Xo(this),t=new Uint8Array(t.map((t=>255*t))),this.g.push(t)),t;var t}na(){return Xo(this)}T(){return Yo(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=qo(this),e=Zo(this);t.activeTexture(t.TEXTURE1),n=So(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,n),Qo(this);const r=Jo(this);t.texImage2D(t.TEXTURE_2D,0,r,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),Co(e,t,n),Ro(e,t,!1,(()=>{ta(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),ea(this)})),Po(e),ea(this)}}t.push(n)}return new ra(t,this.J(),this.canvas,this.l,this.width,this.height)}close(){this.m&&qo(this).deleteTexture(Ko(this,2)),ia=-1}};ra.prototype.close=ra.prototype.close,ra.prototype.clone=ra.prototype.clone,ra.prototype.getAsWebGLTexture=ra.prototype.T,ra.prototype.getAsFloat32Array=ra.prototype.na,ra.prototype.getAsUint8Array=ra.prototype.qa,ra.prototype.hasWebGLTexture=ra.prototype.J,ra.prototype.hasFloat32Array=ra.prototype.sa,ra.prototype.hasUint8Array=ra.prototype.ua;var ia=250;function sa(...t){return t.map((([t,e])=>({start:t,end:e})))}const oa=function(t){return class extends t{xa(){this.i._registerModelResourcesGraphService()}}}((aa=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:"undefined"==typeof OffscreenCanvas||ao()?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas")):this.i.canvas=new OffscreenCanvas(1,1)}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),ho(this,r||"input_audio",(r=>{ho(this,i=i||"audio_header",(i=>{this.i._configureAudio(r,i,t,e,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}U(t){fo(this,"__graph_config__",(e=>{t(e)})),ho(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const s=4*t.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(t,this.g/4),ho(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){ho(this,e,(e=>{const[r,i]=uo(this,t,e);this.i._addBoundTextureToStream(e,r,i,n)}))}addBoolToStream(t,e,n){ho(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){ho(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){ho(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){ho(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){ho(this,e,(e=>{ho(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){ho(this,e,(e=>{lo(this,Object.keys(t),(r=>{lo(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){ho(this,n,(n=>{ho(this,e,(e=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,n,r),this.i._free(i)}))}))}addEmptyPacketToStream(t,e){ho(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolToInputSidePacket(t,e){ho(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){ho(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){ho(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){ho(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){ho(this,e,(e=>{ho(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){ho(this,n,(n=>{ho(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}attachBoolListener(t,e){fo(this,t,e),ho(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){po(this,t,e),ho(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){fo(this,t,e),ho(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){po(this,t,e),ho(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachDoubleListener(t,e){fo(this,t,e),ho(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){po(this,t,e),ho(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){fo(this,t,e),ho(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){po(this,t,e),ho(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){fo(this,t,e),ho(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){po(this,t,e),ho(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){fo(this,t,e),ho(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){po(this,t,e),ho(this,t,(t=>{this.i._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),fo(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),ho(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends aa{get W(){return this.i}ea(t,e,n){ho(this,e,(e=>{const[r,i]=uo(this,t,e);this.W._addBoundTextureAsImageToStream(e,r,i,n)}))}P(t,e){fo(this,t,e),ho(this,t,(t=>{this.W._attachImageListener(t)}))}R(t,e){po(this,t,e),ho(this,t,(t=>{this.W._attachImageVectorListener(t)}))}}));var aa,ca=class extends oa{};async function ha(t,e,n){return async function(t,e,n,r){return async function(t,e,n,r){return t=await(async(t,e,n,r,i)=>{if(e&&await co(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await co(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,r)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile(t){var e=n.wasmBinaryPath.toString();return e.includes(t)?e:(e=n.assetBinaryPath?.toString(),e?.includes(t)?e:t)}}),await t.o(r),t}(t,e,n,r)}(t,n.canvas??("undefined"==typeof OffscreenCanvas||ao()?document.createElement("canvas"):void 0),e,n)}function ua(t,e,n,r){if(t.X){const s=new Ci;if(n?.regionOfInterest){if(!t.ca)throw Error("This task doesn't support region-of-interest.");var i=n.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(0>i.left||0>i.top||1<i.right||1<i.bottom)throw Error("Expected RectF values to be in [0,1].");yn(s,1,(i.left+i.right)/2),yn(s,2,(i.top+i.bottom)/2),yn(s,4,i.right-i.left),yn(s,3,i.bottom-i.top)}else yn(s,1,.5),yn(s,2,.5),yn(s,4,1),yn(s,3,1);if(n?.rotationDegrees){if(0!=n?.rotationDegrees%90)throw Error("Expected rotation to be a multiple of 90°.");if(yn(s,5,-Math.PI*n.rotationDegrees/180),0!=n?.rotationDegrees%180){const[t,r]=void 0!==e.videoWidth?[e.videoWidth,e.videoHeight]:void 0!==e.naturalWidth?[e.naturalWidth,e.naturalHeight]:[e.width,e.height];n=pn(s,3)*r/t,i=pn(s,4)*t/r,yn(s,4,n),yn(s,3,i)}}t.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",t.X,r)}t.g.ea(e,t.ba,r??performance.now()),t.finishProcessing()}function la(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");ua(t,e,n,t.H+1)}function da(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");ua(t,e,n,r)}function fa(t,e,n){var r=e.data;const i=e.width,s=i*(e=e.height);if((r instanceof Uint8Array||r instanceof Float32Array)&&r.length!==s)throw Error("Unsupported channel count: "+r.length/s);return t=new ra([r],!1,t.g.i.canvas,t.M,i,e),n?t.clone():t}var pa=class extends wo{constructor(t,e,n,r){super(t),this.g=t,this.ba=e,this.X=n,this.ca=r,this.M=new Io}l(t,e=!0){if("runningMode"in t&&gn(this.baseOptions,2,!!t.runningMode&&"IMAGE"!==t.runningMode),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.M.close(),super.close()}};pa.prototype.close=pa.prototype.close;var ga=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},this.h=new es,t=new Qi,an(this.h,0,1,t),yn(this.h,2,.5),yn(this.h,3,.3)}get baseOptions(){return rn(this.h,Qi,1)}set baseOptions(t){an(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&yn(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&yn(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}F(t,e){return this.j={detections:[]},la(this,t,e),this.j}D(t,e,n){return this.j={detections:[]},da(this,t,n,e),this.j}m(){var t=new ri;ei(t,"image_in"),ei(t,"norm_rect_in"),ni(t,"detections");const e=new Dr;vn(e,rs,this.h);const n=new Xr;zr(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"NORM_RECT:norm_rect_in"),Kr(n,"DETECTIONS:detections"),n.o(e),ti(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=Ei(e),this.j.detections.push(Js(t));yo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ga.prototype.detectForVideo=ga.prototype.D,ga.prototype.setOptions=ga.prototype.o,ga.createFromModelPath=async function(t,e){return ha(ga,t,{baseOptions:{modelAssetPath:e}})},ga.createFromModelBuffer=function(t,e){return ha(ga,t,{baseOptions:{modelAssetBuffer:e}})},ga.createFromOptions=function(t,e){return ha(ga,t,e)};var ma=sa([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]),ya=sa([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]),_a=sa([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),va=sa([474,475],[475,476],[476,477],[477,474]),Aa=sa([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]),wa=sa([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Ea=sa([469,470],[470,471],[471,472],[472,469]),ba=sa([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]),Ta=[...ma,...ya,..._a,...Aa,...wa,...ba],ka=sa([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 La(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Sa=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,this.h=new us,t=new Qi,an(this.h,0,1,t),this.v=new cs,an(this.h,0,3,this.v),this.s=new es,an(this.h,0,2,this.s),mn(this.s,4,1),yn(this.s,2,.5),yn(this.v,2,.5),yn(this.h,4,.5)}get baseOptions(){return rn(this.h,Qi,1)}set baseOptions(t){an(this.h,0,1,t)}o(t){return"numFaces"in t&&mn(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&yn(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&yn(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&yn(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}F(t,e){return La(this),la(this,t,e),this.j}D(t,e,n){return La(this),da(this,t,n,e),this.j}m(){var t=new ri;ei(t,"image_in"),ei(t,"norm_rect"),ni(t,"face_landmarks");const e=new Dr;vn(e,ds,this.h);const n=new Xr;zr(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"NORM_RECT:norm_rect"),Kr(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),ti(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=Oi(e),this.j.faceLandmarks.push(Zs(t));yo(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{yo(this,t)})),this.outputFaceBlendshapes&&(ni(t,"blendshapes"),Kr(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=li(e),this.j.faceBlendshapes.push(qs(t.g()??[]));yo(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{yo(this,t)}))),this.outputFacialTransformationMatrixes&&(ni(t,"face_geometry"),Kr(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=rn(os(e),Mi,2))&&this.j.facialTransformationMatrixes.push({rows:fn(un(t,1))??0,columns:fn(un(t,2))??0,data:Xe(t,3,ue)??[]});yo(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{yo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Sa.prototype.detectForVideo=Sa.prototype.D,Sa.prototype.detect=Sa.prototype.F,Sa.prototype.setOptions=Sa.prototype.o,Sa.createFromModelPath=function(t,e){return ha(Sa,t,{baseOptions:{modelAssetPath:e}})},Sa.createFromModelBuffer=function(t,e){return ha(Sa,t,{baseOptions:{modelAssetBuffer:e}})},Sa.createFromOptions=function(t,e){return ha(Sa,t,e)},Sa.FACE_LANDMARKS_LIPS=ma,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS",Sa.FACE_LANDMARKS_LIPS),Sa.FACE_LANDMARKS_LEFT_EYE=ya,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE",Sa.FACE_LANDMARKS_LEFT_EYE),Sa.FACE_LANDMARKS_LEFT_EYEBROW=_a,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",Sa.FACE_LANDMARKS_LEFT_EYEBROW),Sa.FACE_LANDMARKS_LEFT_IRIS=va,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS",Sa.FACE_LANDMARKS_LEFT_IRIS),Sa.FACE_LANDMARKS_RIGHT_EYE=Aa,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE",Sa.FACE_LANDMARKS_RIGHT_EYE),Sa.FACE_LANDMARKS_RIGHT_EYEBROW=wa,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",Sa.FACE_LANDMARKS_RIGHT_EYEBROW),Sa.FACE_LANDMARKS_RIGHT_IRIS=Ea,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS",Sa.FACE_LANDMARKS_RIGHT_IRIS),Sa.FACE_LANDMARKS_FACE_OVAL=ba,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL",Sa.FACE_LANDMARKS_FACE_OVAL),Sa.FACE_LANDMARKS_CONTOURS=Ta,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS",Sa.FACE_LANDMARKS_CONTOURS),Sa.FACE_LANDMARKS_TESSELATION=ka,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION",Sa.FACE_LANDMARKS_TESSELATION);var xa=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!0),this.j=new fs,t=new Qi,an(this.j,0,1,t)}get baseOptions(){return rn(this.j,Qi,1)}set baseOptions(t){an(this.j,0,1,t)}o(t){return super.l(t)}za(t,e,n){const r="function"!=typeof e?e:{};if(this.h="function"==typeof e?e:n,la(this,t,r??{}),!this.h)return this.s}m(){var t=new ri;ei(t,"image_in"),ei(t,"norm_rect"),ni(t,"stylized_image");const e=new Dr;vn(e,ps,this.j);const n=new Xr;zr(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"NORM_RECT:norm_rect"),Kr(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),ti(t,n),this.g.P("stylized_image",((t,e)=>{var n=!this.h,r=t.data,i=t.width;const s=i*(t=t.height);if(r instanceof Uint8Array)if(r.length===3*s){const e=new Uint8ClampedArray(4*s);for(let t=0;t<s;++t)e[4*t]=r[3*t],e[4*t+1]=r[3*t+1],e[4*t+2]=r[3*t+2],e[4*t+3]=255;r=new ImageData(e,i,t)}else{if(r.length!==4*s)throw Error("Unsupported channel count: "+r.length/s);r=new ImageData(new Uint8ClampedArray(r.buffer,r.byteOffset,r.length),i,t)}else if(!(r instanceof WebGLTexture))throw Error(`Unsupported format: ${r.constructor.name}`);i=new zo([r],!1,!1,this.g.i.canvas,this.M,i,t),this.s=n=n?i.clone():i,this.h&&this.h(n),yo(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};xa.prototype.stylize=xa.prototype.za,xa.prototype.setOptions=xa.prototype.o,xa.createFromModelPath=function(t,e){return ha(xa,t,{baseOptions:{modelAssetPath:e}})},xa.createFromModelBuffer=function(t,e){return ha(xa,t,{baseOptions:{modelAssetBuffer:e}})},xa.createFromOptions=function(t,e){return ha(xa,t,e)};var Fa=sa([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 Oa(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Ma(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function Ra(t,e=!0){const n=[];for(const i of t){var r=li(i);t=[];for(const n of r.g())r=e&&null!=un(n,1)?fn(un(n,1)):-1,t.push({score:pn(n,2)??0,index:r,categoryName:dn(n,3)??""??"",displayName:dn(n,4)??""??""});n.push(t)}return n}var Ca=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],this.v=new Ls,t=new Qi,an(this.v,0,1,t),this.C=new Ts,an(this.v,0,2,this.C),this.s=new Es,an(this.C,0,3,this.s),this.h=new As,an(this.C,0,2,this.h),this.j=new _s,an(this.v,0,3,this.j),yn(this.h,2,.5),yn(this.C,4,.5),yn(this.s,2,.5)}get baseOptions(){return rn(this.v,Qi,1)}set baseOptions(t){an(this.v,0,1,t)}o(t){if(mn(this.h,3,t.numHands??1),"minHandDetectionConfidence"in t&&yn(this.h,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&yn(this.C,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&yn(this.s,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new gs,n=Ys(t.cannedGesturesClassifierOptions,rn(this.j,gs,3)?.h());an(e,0,2,n),an(this.j,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&rn(this.j,gs,3)?.g();return t.customGesturesClassifierOptions?(an(e=new gs,0,2,n=Ys(t.customGesturesClassifierOptions,rn(this.j,gs,4)?.h())),an(this.j,0,4,e)):void 0===t.customGesturesClassifierOptions&&rn(this.j,gs,4)?.g(),this.l(t)}va(t,e){return Oa(this),la(this,t,e),Ma(this)}wa(t,e,n){return Oa(this),da(this,t,n,e),Ma(this)}m(){var t=new ri;ei(t,"image_in"),ei(t,"norm_rect"),ni(t,"hand_gestures"),ni(t,"hand_landmarks"),ni(t,"world_hand_landmarks"),ni(t,"handedness");const e=new Dr;vn(e,Fs,this.v);const n=new Xr;zr(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"NORM_RECT:norm_rect"),Kr(n,"HAND_GESTURES:hand_gestures"),Kr(n,"LANDMARKS:hand_landmarks"),Kr(n,"WORLD_LANDMARKS:world_hand_landmarks"),Kr(n,"HANDEDNESS:handedness"),n.o(e),ti(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=Oi(e);const n=[];for(const e of on(t,Si,1))n.push({x:pn(e,1)??0,y:pn(e,2)??0,z:pn(e,3)??0});this.landmarks.push(n)}yo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=Li(e);const n=[];for(const e of on(t,bi,1))n.push({x:pn(e,1)??0,y:pn(e,2)??0,z:pn(e,3)??0});this.worldLandmarks.push(n)}yo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...Ra(t,!1)),yo(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...Ra(t)),yo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Pa(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Ca.prototype.recognizeForVideo=Ca.prototype.wa,Ca.prototype.recognize=Ca.prototype.va,Ca.prototype.setOptions=Ca.prototype.o,Ca.createFromModelPath=function(t,e){return ha(Ca,t,{baseOptions:{modelAssetPath:e}})},Ca.createFromModelBuffer=function(t,e){return ha(Ca,t,{baseOptions:{modelAssetBuffer:e}})},Ca.createFromOptions=function(t,e){return ha(Ca,t,e)},Ca.HAND_CONNECTIONS=Fa,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS",Ca.HAND_CONNECTIONS);var Ia=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],this.j=new Ts,t=new Qi,an(this.j,0,1,t),this.s=new Es,an(this.j,0,3,this.s),this.h=new As,an(this.j,0,2,this.h),mn(this.h,3,1),yn(this.h,2,.5),yn(this.s,2,.5),yn(this.j,4,.5)}get baseOptions(){return rn(this.j,Qi,1)}set baseOptions(t){an(this.j,0,1,t)}o(t){return"numHands"in t&&mn(this.h,3,t.numHands??1),"minHandDetectionConfidence"in t&&yn(this.h,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&yn(this.j,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&yn(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}F(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],la(this,t,e),Pa(this)}D(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],da(this,t,n,e),Pa(this)}m(){var t=new ri;ei(t,"image_in"),ei(t,"norm_rect"),ni(t,"hand_landmarks"),ni(t,"world_hand_landmarks"),ni(t,"handedness");const e=new Dr;vn(e,xs,this.j);const n=new Xr;zr(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"NORM_RECT:norm_rect"),Kr(n,"LANDMARKS:hand_landmarks"),Kr(n,"WORLD_LANDMARKS:world_hand_landmarks"),Kr(n,"HANDEDNESS:handedness"),n.o(e),ti(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=Oi(e),this.landmarks.push(Zs(t));yo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=Li(e),this.worldLandmarks.push(Qs(t));yo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const i=[];for(const e of t){t=li(e);const n=[];for(const e of t.g())n.push({score:pn(e,2)??0,index:fn(un(e,1))??-1,categoryName:dn(e,3)??""??"",displayName:dn(e,4)??""??""});i.push(n)}r.call(n,...i),yo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ia.prototype.detectForVideo=Ia.prototype.D,Ia.prototype.detect=Ia.prototype.F,Ia.prototype.setOptions=Ia.prototype.o,Ia.createFromModelPath=function(t,e){return ha(Ia,t,{baseOptions:{modelAssetPath:e}})},Ia.createFromModelBuffer=function(t,e){return ha(Ia,t,{baseOptions:{modelAssetBuffer:e}})},Ia.createFromOptions=function(t,e){return ha(Ia,t,e)},Ia.HAND_CONNECTIONS=Fa,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS",Ia.HAND_CONNECTIONS);var Na=class extends pa{constructor(t,e){super(new ca(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},this.h=new Os,t=new Qi,an(this.h,0,1,t)}get baseOptions(){return rn(this.h,Qi,1)}set baseOptions(t){an(this.h,0,1,t)}o(t){var e=Ys(t,rn(this.h,zi,2));return an(this.h,0,2,e),this.l(t)}ga(t,e){return this.j={classifications:[]},la(this,t,e),this.j}ha(t,e,n){return this.j={classifications:[]},da(this,t,n,e),this.j}m(){var t=new ri;ei(t,"input_image"),ei(t,"norm_rect"),ni(t,"classifications");const e=new Dr;vn(e,Ms,this.h);const n=new Xr;zr(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Hr(n,"IMAGE:input_image"),Hr(n,"NORM_RECT:norm_rect"),Kr(n,"CLASSIFICATIONS:classifications"),n.o(e),ti(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:on(t,Pi,1).map((t=>qs(rn(t,hi,4)?.g()??[],fn(un(t,2)),dn(t,3)??"")))};return null!=ln(t)&&(e.timestampMs=fn(ln(t))),e}(Di(t)),yo(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Na.prototype.classifyForVideo=Na.prototype.ha,Na.prototype.classify=Na.prototype.ga,Na.prototype.setOptions=Na.prototype.o,Na.createFromModelPath=function(t,e){return ha(Na,t,{baseOptions:{modelAssetPath:e}})},Na.createFromModelBuffer=function(t,e){return ha(Na,t,{baseOptions:{modelAssetBuffer:e}})},Na.createFromOptions=function(t,e){return ha(Na,t,e)};var Da=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!0),this.h=new Rs,this.embeddings={embeddings:[]},t=new Qi,an(this.h,0,1,t)}get baseOptions(){return rn(this.h,Qi,1)}set baseOptions(t){an(this.h,0,1,t)}o(t){var e=this.h,n=rn(this.h,Ki,2);return n=n?n.clone():new Ki,void 0!==t.l2Normalize?gn(n,1,t.l2Normalize):"l2Normalize"in t&&Ve(n,1),void 0!==t.quantize?gn(n,2,t.quantize):"quantize"in t&&Ve(n,2),an(e,0,2,n),this.l(t)}la(t,e){return la(this,t,e),this.embeddings}ma(t,e,n){return da(this,t,n,e),this.embeddings}m(){var t=new ri;ei(t,"image_in"),ei(t,"norm_rect"),ni(t,"embeddings_out");const e=new Dr;vn(e,Cs,this.h);const n=new Xr;zr(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"NORM_RECT:norm_rect"),Kr(n,"EMBEDDINGS:embeddings_out"),n.o(e),ti(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Wi(t),this.embeddings=function(t){return{embeddings:on(t,Bi,1).map((t=>{const e={headIndex:fn(un(t,3))??-1,headName:dn(t,4)??""??""};if(void 0!==nn(t,$i,Qe(t,1)))t=Xe(t=rn(t,$i,Qe(t,1)),1,ue),e.floatEmbedding=t;else{const n=new Uint8Array(0);e.quantizedEmbedding=rn(t,Ui,Qe(t,2))?.da()?.fa()??n}return e})),timestampMs:fn(ln(t))}}(t),yo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Da.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=eo(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=eo(to(t.quantizedEmbedding),to(e.quantizedEmbedding))}return t},Da.prototype.embedForVideo=Da.prototype.ma,Da.prototype.embed=Da.prototype.la,Da.prototype.setOptions=Da.prototype.o,Da.createFromModelPath=function(t,e){return ha(Da,t,{baseOptions:{modelAssetPath:e}})},Da.createFromModelBuffer=function(t,e){return ha(Da,t,{baseOptions:{modelAssetBuffer:e}})},Da.createFromOptions=function(t,e){return ha(Da,t,e)};var $a=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};function Ua(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Ba(t){try{const e=new $a(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{Ao(t)}}$a.prototype.close=$a.prototype.close;var Ga=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new $s,this.v=new Ps,an(this.h,0,3,this.v),t=new Qi,an(this.h,0,1,t)}get baseOptions(){return rn(this.h,Qi,1)}set baseOptions(t){an(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ve(this.h,2,me(t.displayNamesLocale)):"displayNamesLocale"in t&&Ve(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}N(){!function(t){const e=on(t.U(),Xr,1).filter((t=>(dn(t,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.s=[],1<e.length)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(rn(e[0],Dr,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=dn(e,1)??""}))}(this)}V(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Ua(this),la(this,t,r),Ba(this)}ya(t,e,n,r){const i="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,Ua(this),da(this,t,i,e),Ba(this)}ra(){return this.s}m(){var t=new ri;ei(t,"image_in"),ei(t,"norm_rect");const e=new Dr;vn(e,Us,this.h);const n=new Xr;zr(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"NORM_RECT:norm_rect"),n.o(e),ti(t,n),_o(this,t),this.outputConfidenceMasks&&(ni(t,"confidence_masks"),Kr(n,"CONFIDENCE_MASKS:confidence_masks"),vo(this,"confidence_masks"),this.g.R("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>fa(this,t,!this.j))),yo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],yo(this,t)}))),this.outputCategoryMask&&(ni(t,"category_mask"),Kr(n,"CATEGORY_MASK:category_mask"),vo(this,"category_mask"),this.g.P("category_mask",((t,e)=>{this.categoryMask=fa(this,t,!this.j),yo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,yo(this,t)}))),ni(t,"quality_scores"),Kr(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,yo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ga.prototype.getLabels=Ga.prototype.ra,Ga.prototype.segmentForVideo=Ga.prototype.ya,Ga.prototype.segment=Ga.prototype.V,Ga.prototype.setOptions=Ga.prototype.o,Ga.createFromModelPath=function(t,e){return ha(Ga,t,{baseOptions:{modelAssetPath:e}})},Ga.createFromModelBuffer=function(t,e){return ha(Ga,t,{baseOptions:{modelAssetBuffer:e}})},Ga.createFromOptions=function(t,e){return ha(Ga,t,e)};var ja=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};ja.prototype.close=ja.prototype.close;var Va=class extends An{constructor(t){super(t)}},Wa=[0,ir,ir,ir],za=[0,Jn,Jn,Jn,Jn,ar],Ha=[0,Jn,Jn,Jn,Jn,ar,Jn,Jn],Ka=[0,fr,Ha],Xa=[0,fr,Ka,fr,Wa],Ya=[0,fr,Ha,fr,Wa],qa=[0,fr,Ha,ir,ir],Ja=[0,fr,qa,fr,Wa],Za=[0,Jn,Jn,Jn,Jn,ar,fr,Wa,fr,Wa],Qa=[0,Jn,Jn,Jn,Jn,ar,_r],tc=class extends An{constructor(t){super(t)}},ec=[0,Jn,Jn,ar],nc=class extends An{constructor(){super()}};nc.B=[1];var rc=class extends An{constructor(t){super(t)}},ic=[1,2,3,4,5,6,7,8,9,10,14,15],sc=[0,gr,Ha,ic,gr,Ya,ic,gr,Ka,ic,gr,Xa,ic,gr,ec,ic,gr,Qa,ic,gr,za,ic,gr,[0,lr,Jn,Jn,Jn,ar,ir,ar,ar,Jn,3,fr,Wa],ic,gr,qa,ic,gr,Ja,ic,Jn,fr,Wa,lr,gr,Za,ic,gr,[0,pr,ec],ic],oc=[0,lr,ir,ir,ar],ac=class extends An{constructor(){super()}};ac.B=[1],ac.prototype.g=br([0,pr,sc,lr,fr,oc]);var cc=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new $s,this.v=new Ps,an(this.h,0,3,this.v),t=new Qi,an(this.h,0,1,t)}get baseOptions(){return rn(this.h,Qi,1)}set baseOptions(t){an(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}V(t,e,n,r){const i="function"!=typeof n?n:{};this.j="function"==typeof n?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.H+1,r=new ac;const s=new rc;var o=new Va;if(mn(o,1,255),an(s,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new tc;gn(a,3,!0),yn(a,1,e.keypoint.x),yn(a,2,e.keypoint.y),cn(s,5,ic,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new nc,e.scribble))gn(e=new tc,3,!0),yn(e,1,a.x),yn(e,2,a.y),hn(o,tc,e);cn(s,15,ic,o)}hn(r,rc,s),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),la(this,t,i);t:{try{const t=new ja(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=t;break t}this.j(t)}finally{Ao(this)}c=void 0}return c}m(){var t=new ri;ei(t,"image_in"),ei(t,"roi_in"),ei(t,"norm_rect_in");const e=new Dr;vn(e,Us,this.h);const n=new Xr;zr(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"ROI:roi_in"),Hr(n,"NORM_RECT:norm_rect_in"),n.o(e),ti(t,n),_o(this,t),this.outputConfidenceMasks&&(ni(t,"confidence_masks"),Kr(n,"CONFIDENCE_MASKS:confidence_masks"),vo(this,"confidence_masks"),this.g.R("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>fa(this,t,!this.j))),yo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],yo(this,t)}))),this.outputCategoryMask&&(ni(t,"category_mask"),Kr(n,"CATEGORY_MASK:category_mask"),vo(this,"category_mask"),this.g.P("category_mask",((t,e)=>{this.categoryMask=fa(this,t,!this.j),yo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,yo(this,t)}))),ni(t,"quality_scores"),Kr(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,yo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};cc.prototype.segment=cc.prototype.V,cc.prototype.setOptions=cc.prototype.o,cc.createFromModelPath=function(t,e){return ha(cc,t,{baseOptions:{modelAssetPath:e}})},cc.createFromModelBuffer=function(t,e){return ha(cc,t,{baseOptions:{modelAssetBuffer:e}})},cc.createFromOptions=function(t,e){return ha(cc,t,e)};var hc=class extends pa{constructor(t,e){super(new ca(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},this.h=new Bs,t=new Qi,an(this.h,0,1,t)}get baseOptions(){return rn(this.h,Qi,1)}set baseOptions(t){an(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ve(this.h,2,me(t.displayNamesLocale)):"displayNamesLocale"in t&&Ve(this.h,2),void 0!==t.maxResults?mn(this.h,3,t.maxResults):"maxResults"in t&&Ve(this.h,3),void 0!==t.scoreThreshold?yn(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&Ve(this.h,4),void 0!==t.categoryAllowlist?Ze(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&Ve(this.h,5),void 0!==t.categoryDenylist?Ze(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&Ve(this.h,6),this.l(t)}F(t,e){return this.j={detections:[]},la(this,t,e),this.j}D(t,e,n){return this.j={detections:[]},da(this,t,n,e),this.j}m(){var t=new ri;ei(t,"input_frame_gpu"),ei(t,"norm_rect"),ni(t,"detections");const e=new Dr;vn(e,Gs,this.h);const n=new Xr;zr(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),Hr(n,"IMAGE:input_frame_gpu"),Hr(n,"NORM_RECT:norm_rect"),Kr(n,"DETECTIONS:detections"),n.o(e),ti(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=Ei(e),this.j.detections.push(Js(t));yo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function uc(t){t.landmarks=[],t.worldLandmarks=[],t.v=void 0}function lc(t){try{const e=new class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.g=n}close(){this.g?.forEach((t=>{t.close()}))}}(t.landmarks,t.worldLandmarks,t.v);if(!t.s)return e;t.s(e)}finally{Ao(t)}}hc.prototype.detectForVideo=hc.prototype.D,hc.prototype.detect=hc.prototype.F,hc.prototype.setOptions=hc.prototype.o,hc.createFromModelPath=async function(t,e){return ha(hc,t,{baseOptions:{modelAssetPath:e}})},hc.createFromModelBuffer=function(t,e){return ha(hc,t,{baseOptions:{modelAssetBuffer:e}})},hc.createFromOptions=function(t,e){return ha(hc,t,e)};var dc=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,this.h=new Hs,t=new Qi,an(this.h,0,1,t),this.C=new Ws,an(this.h,0,3,this.C),this.j=new js,an(this.h,0,2,this.j),mn(this.j,4,1),yn(this.j,2,.5),yn(this.C,2,.5),yn(this.h,4,.5)}get baseOptions(){return rn(this.h,Qi,1)}set baseOptions(t){an(this.h,0,1,t)}o(t){return"numPoses"in t&&mn(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&yn(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&yn(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&yn(this.C,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}F(t,e,n){const r="function"!=typeof e?e:{};return this.s="function"==typeof e?e:n,uc(this),la(this,t,r),lc(this)}D(t,e,n,r){const i="function"!=typeof n?n:{};return this.s="function"==typeof n?n:r,uc(this),da(this,t,i,e),lc(this)}m(){var t=new ri;ei(t,"image_in"),ei(t,"norm_rect"),ni(t,"normalized_landmarks"),ni(t,"world_landmarks"),ni(t,"segmentation_masks");const e=new Dr;vn(e,Xs,this.h);const n=new Xr;zr(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Hr(n,"IMAGE:image_in"),Hr(n,"NORM_RECT:norm_rect"),Kr(n,"NORM_LANDMARKS:normalized_landmarks"),Kr(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),ti(t,n),_o(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=Oi(e),this.landmarks.push(Zs(t));yo(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],yo(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=Li(e),this.worldLandmarks.push(Qs(t));yo(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],yo(this,t)})),this.outputSegmentationMasks&&(Kr(n,"SEGMENTATION_MASK:segmentation_masks"),vo(this,"segmentation_masks"),this.g.R("segmentation_masks",((t,e)=>{this.v=t.map((t=>fa(this,t,!this.s))),yo(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.v=[],yo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};return dc.prototype.detectForVideo=dc.prototype.D,dc.prototype.detect=dc.prototype.F,dc.prototype.setOptions=dc.prototype.o,dc.createFromModelPath=function(t,e){return ha(dc,t,{baseOptions:{modelAssetPath:e}})},dc.createFromModelBuffer=function(t,e){return ha(dc,t,{baseOptions:{modelAssetBuffer:e}})},dc.createFromOptions=function(t,e){return ha(dc,t,e)},dc.POSE_CONNECTIONS=sa([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]),r("module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS",dc.POSE_CONNECTIONS),e})()));