@mediapipe/tasks-vision 1.0.1-rc.20260730 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/package.json +1 -1
- package/vision.d.ts +1 -1
- package/vision_bundle.cjs +1 -1
- package/vision_bundle.cjs.map +1 -1
- package/vision_bundle.js +1 -1
- package/vision_bundle.mjs +1 -1
- package/vision_bundle.mjs.map +1 -1
- package/wasm/vision_wasm_internal.js +10 -10
- package/wasm/vision_wasm_internal.wasm +0 -0
- package/wasm/vision_wasm_module_internal.js +10 -10
- package/wasm/vision_wasm_module_internal.wasm +0 -0
- package/wasm/vision_wasm_nosimd_internal.js +10 -10
- package/wasm/vision_wasm_nosimd_internal.wasm +0 -0
- package/LICENSE +0 -218
- package/NOTICE +0 -30347
- package/vision_bundle.js.map +0 -1
package/vision_bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Vision=function(t){"use strict";var e="undefined"!=typeof self?self:{};function r(t,r){t:{for(var n=["CLOSURE_FLAGS"],i=e,s=0;s<n.length;s++)if(null==(i=i[n[s]])){n=null;break t}n=i}return null!=(t=n&&n[t])?t:r}function n(t,r){t=t.split(".");for(var n,i=e;t.length&&(n=t.shift());)t.length||void 0===r?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=r}function i(){throw Error("Invalid UTF8")}function s(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}var o,a,h=void 0,u="undefined"!=typeof TextDecoder,c="undefined"!=typeof TextEncoder;function l(t){if(c)t=(a||=new TextEncoder).encode(t);else{let r=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)n[r++]=e;else{if(e<2048)n[r++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){let s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,n[r++]=e>>18|240,n[r++]=e>>12&63|128,n[r++]=e>>6&63|128,n[r++]=63&e|128;continue}i--}e=65533}n[r++]=e>>12|224,n[r++]=e>>6&63|128}n[r++]=63&e|128}}t=r===n.length?n:n.subarray(0,r)}return t}function d(t){e.setTimeout(()=>{throw t},0)}var f=r(610401301,!1),p=r(748402147,!0);function g(){var t=e.navigator;return t&&(t=t.userAgent)?t:""}var m,v=e.navigator;function _(t){return _[" "](t),t}m=v&&v.userAgentData||null,_[" "]=function(){};var y={},E=null;function A(t){var e=t.length,r=3*e/4;r%3?r=Math.floor(r):-1!="=.".indexOf(t[e-1])&&(r=-1!="=.".indexOf(t[e-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function(t,e){function r(e){for(;n<t.length;){let e=t.charAt(n++),r=E[e];if(null!=r)return r;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}w();for(var n=0;;){let t=r(-1),n=r(0),i=r(64),s=r(64);if(64===s&&-1===t)break;e(t<<2|n>>4),64!=i&&(e(n<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,function(t){n[i++]=t}),i!==r?n.subarray(0,i):n}function w(){if(!E){E={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let r=0;r<5;r++){let n=t.concat(e[r].split(""));y[r]=n;for(let t=0;t<n.length;t++){let e=n[t];void 0===E[e]&&(E[e]=t)}}}}var b="undefined"!=typeof Uint8Array,T=!(!(f&&m&&m.brands.length>0)&&(-1!=g().indexOf("Trident")||-1!=g().indexOf("MSIE")))&&"function"==typeof btoa,k=/[-_.]/g,S={"-":"+",_:"/",".":"="};function L(t){return S[t]||""}function x(t){if(!T)return A(t);t=k.test(t)?t.replace(k,L):t,t=atob(t);var e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function R(t){return b&&null!=t&&t instanceof Uint8Array}var I={};function F(){return N||=new O(null,I)}function C(t){M(I);var e=t.g;return null==(e=null==e||R(e)?e:"string"==typeof e?x(e):null)?e:t.g=e}var N,O=class{h(){return new Uint8Array(C(this)||0)}constructor(t,e){if(M(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function M(t){if(t!==I)throw Error("illegal external caller")}function P(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}var D=void 0;function $(t){return P(t=Error(t),"warning"),t}function U(t,e){if(null!=t){var r=D??={},n=r[t]||0;n>=e||(r[t]=n+1,P(t=Error(),"incident"),d(t))}}function B(){return"function"==typeof BigInt}var G="function"==typeof Symbol&&"symbol"==typeof Symbol();function j(t,e,r=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var V,H=j("jas",void 0,!0),K=j(void 0,"0di"),X=j(void 0,"1oa"),W=j(void 0,Symbol()),Y=j(void 0,"0ub"),z=j(void 0,"0ubs"),q=j(void 0,"0ubsb"),J=j(void 0,"0actk"),Z=j("m_m","jb",!0),Q=j(),tt={Ua:{value:0,configurable:!0,writable:!0,enumerable:!1}},et=Object.defineProperties,rt=G?H:"Ua",nt=[];function it(t,e){G||rt in t||et(t,tt),t[rt]|=e}function st(t,e){G||rt in t||et(t,tt),t[rt]=e}function ot(t){return it(t,34),t}function at(t){return it(t,8192),t}st(nt,7),V=Object.freeze(nt);var ht={};function ut(t,e){return void 0===e?t.h!==ct&&!!(2&t.A[rt]):!!(2&e)&&t.h!==ct}var ct={};function lt(t,e){if(null!=t)if("string"==typeof t)t=t?new O(t,I):F();else if(t.constructor!==O)if(R(t))t=t.length?new O(new Uint8Array(t),I):F();else{if(!e)throw Error();t=void 0}return t}class dt{constructor(t,e,r){this.g=t,this.h=e,this.l=r}next(){var t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}var ft=Object.freeze({});function pt(t,e,r){var n,i=128&e?0:-1,s=t.length;(n=!!s)&&(n=null!=(n=t[s-1])&&"object"==typeof n&&n.constructor===Object);var o=s+(n?-1:0);for(e=128&e?1:0;e<o;e++)r(e-i,t[e]);if(n){t=t[s-1];for(let e in t)!isNaN(e)&&r(+e,t[e])}}var gt={};function mt(t){return 128&t?gt:void 0}function vt(t){return t.hb=!0,t}var _t=vt(t=>"number"==typeof t),yt=vt(t=>"string"==typeof t),Et=vt(t=>"boolean"==typeof t),At="function"==typeof e.BigInt&&"bigint"==typeof e.BigInt(0);function wt(t){var e=t;if(yt(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(_t(e)&&!Number.isSafeInteger(e))throw Error(String(e));return At?BigInt(t):t=Et(t)?t?"1":"0":yt(t)?t.trim()||"0":String(t)}var bt=vt(t=>At?t>=kt&&t<=Lt:"-"===t[0]?xt(t,Tt):xt(t,St)),Tt=Number.MIN_SAFE_INTEGER.toString(),kt=At?BigInt(Number.MIN_SAFE_INTEGER):void 0,St=Number.MAX_SAFE_INTEGER.toString(),Lt=At?BigInt(Number.MAX_SAFE_INTEGER):void 0;function xt(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=e[r];if(n>i)return!1;if(n<i)return!0}}var Rt,It="function"==typeof Uint8Array.prototype.slice,Ft=0,Ct=0;function Nt(t){var e=t>>>0;Ft=e,Ct=(t-e)/4294967296>>>0}function Ot(t){if(t<0){Nt(-t);let[e,r]=Vt(Ft,Ct);Ft=e>>>0,Ct=r>>>0}else Nt(t)}function Mt(t){var e=Rt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Ct=0,Ft=e.getUint32(0,!0)}function Pt(t,e){var r=4294967296*e+(t>>>0);return Number.isSafeInteger(r)?r:Ut(t,e)}function Dt(t,e){return wt(B()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):Ut(t,e))}function $t(t,e){return B()?wt(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):wt(Gt(t,e))}function Ut(t,e){if(t>>>=0,(e>>>=0)<=2097151)var r=""+(4294967296*e+t);else B()?r=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(r=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),r+=8147497*e,e*=2,t>=1e7&&(r+=t/1e7>>>0,t%=1e7),r>=1e7&&(e+=r/1e7>>>0,r%=1e7),r=e+Bt(r)+Bt(t));return r}function Bt(t){return t=String(t),"0000000".slice(t.length)+t}function Gt(t,e){if(2147483648&e)if(B())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{let[r,n]=Vt(t,e);t="-"+Ut(r,n)}else t=Ut(t,e);return t}function jt(t){if(t.length<16)Ot(Number(t));else if(B())t=BigInt(t),Ft=Number(t&BigInt(4294967295))>>>0,Ct=Number(t>>BigInt(32)&BigInt(4294967295));else{let e=+("-"===t[0]);Ct=Ft=0;let r=t.length;for(let n=e,i=(r-e)%6+e;i<=r;n=i,i+=6){let e=Number(t.slice(n,i));Ct*=1e6,(Ft=1e6*Ft+e)>=4294967296&&(Ct+=Math.trunc(Ft/4294967296),Ct>>>=0,Ft>>>=0)}if(e){let[t,e]=Vt(Ft,Ct);Ft=t,Ct=e}}}function Vt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Ht(t){return Array.prototype.slice.call(t)}var Kt="function"==typeof BigInt?BigInt.asIntN:void 0,Xt="function"==typeof BigInt?BigInt.asUintN:void 0,Wt=Number.isSafeInteger,Yt=Number.isFinite,zt=Math.trunc,qt=wt(0);function Jt(t){if("number"!=typeof t)throw Error(`Value of float/double field must be a number, found ${typeof t}: ${t}`);return t}function Zt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Qt(t){if("boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}var te=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ee(t){switch(typeof t){case"bigint":return!0;case"number":return Yt(t);case"string":return te.test(t);default:return!1}}function re(t){if(null!=t){if(!Yt(t))throw $("enum");t|=0}return t}function ne(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Yt(t)?0|t:void 0}function ie(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Yt(t)?t>>>0:void 0}function se(t,e){if(e??=1024,!ee(t))throw $("int64");var r=typeof t;switch(e){case 512:switch(r){case"string":return le(t);case"bigint":return String(Kt(64,t));default:return ce(t)}case 1024:switch(r){case"string":return de(t);case"bigint":return wt(Kt(64,t));default:return fe(t)}case 0:switch(r){case"string":return le(t);case"bigint":return wt(Kt(64,t));default:return he(t)}default:return function(t,e=`unexpected value ${t}!`){throw Error(e)}(e,"Unknown format requested type for int64")}}function oe(t){var e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(jt(t),Gt(Ft,Ct))}function ae(t){if("-"===t[0])var e=!1;else e=(e=t.length)<20||20===e&&t<="18446744073709551615";return e?t:(jt(t),Ut(Ft,Ct))}function he(t){if(t=zt(t),!Wt(t)){Ot(t);var e=Ft,r=Ct;(t=2147483648&r)&&(r=~r>>>0,0==(e=1+~e>>>0)&&(r=r+1>>>0)),t="number"==typeof(e=Pt(e,r))?t?-e:e:t?"-"+e:e}return t}function ue(t){return(t=zt(t))>=0&&Wt(t)||(Ot(t),t=Pt(Ft,Ct)),t}function ce(t){return t=zt(t),Wt(t)?t=String(t):(Ot(t),t=Gt(Ft,Ct)),t}function le(t){var e=zt(Number(t));return Wt(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),oe(t))}function de(t){var e=zt(Number(t));return Wt(e)?wt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),B()?wt(Kt(64,BigInt(t))):wt(oe(t)))}function fe(t){return Wt(t)?wt(he(t)):wt(ce(t))}function pe(t){var e=typeof t;return null==t?t:"bigint"===e?wt(Kt(64,t)):ee(t)?"string"===e?de(t):fe(t):void 0}function ge(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Kt(64,t));if(ee(t)){if("string"===e)return le(t);if("number"===e)return he(t)}}function me(t){if(null==t||"string"==typeof t||t instanceof O)return t}function ve(t){if("string"!=typeof t)throw Error();return t}function _e(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ye(t){return null==t||"string"==typeof t?t:void 0}function Ee(t,e,r,n){return null!=t&&t[Z]===ht?t:Array.isArray(t)?((n=(r=0|t[rt])|32&n|2&n)!==r&&st(t,n),new e(t)):(r?2&n?((t=e[K])||(ot((t=new e).A),t=e[K]=t),e=t):e=new e:e=void 0,e)}function Ae(t,e,r){return null==(t=e?se(t,1024):pe(t))?r?qt:void 0:t}function we(t){return t}var be={},Te=function(){try{return _(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class ke{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()}}var Se=Te?(Object.setPrototypeOf(ke.prototype,Map.prototype),Object.defineProperties(ke.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),ke):class extends Map{constructor(){super()}};function Le(t){return t}function xe(t){if(2&t.K)throw Error("Cannot mutate an immutable Map")}var Re,Ie=class extends Se{constructor(t,e,r=Le,n=Le){super(),this.K=0|t[rt],this.L=e,this.aa=r,this.na=this.L?Fe:n;for(let i=0;i<t.length;i++){let s=t[i],o=r(s[0],!1,!0),a=s[1];e?void 0===a&&(a=null):a=n(s[1],!1,!0,void 0,void 0,this.K),super.set(o,a)}}ea(t){return at(Array.from(super.entries(),t))}clear(){xe(this),super.clear()}delete(t){return xe(this),super.delete(this.aa(t,!0,!1))}entries(){if(this.L){var t=super.keys();t=new dt(t,Ce,this)}else t=super.entries();return t}values(){if(this.L){var t=super.keys();t=new dt(t,Ie.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.L?super.forEach((r,n,i)=>{t.call(e,i.get(n),n,i)}):super.forEach(t,e)}set(t,e){return xe(this),null==(t=this.aa(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.na(e,!0,!0,this.L,!1,this.K))}fb(t){var e=this.aa(t[0],!1,!0);t=t[1],t=this.L?void 0===t?null:t:this.na(t,!1,!0,void 0,!1,this.K),super.set(e,t)}has(t){return super.has(this.aa(t,!1,!1))}get(t){t=this.aa(t,!1,!1);var e=super.get(t);if(void 0!==e){var r=this.L;return r?((r=this.na(e,!1,!0,r,this.Ea,this.K))!==e&&super.set(t,r),r):e}}[Symbol.iterator](){return this.entries()}};function Fe(t,e,r,n,i,s){return t=Ee(t,n,r,s),i&&(t=Qe(t)),t}function Ce(t){return[t,this.get(t)]}function Ne(){return Re||=new Ie(ot([]),void 0,void 0,void 0,be)}function Oe(t){return W?t[W]:void 0}function Me(t,e){for(let r in t)!isNaN(r)&&e(t,+r,t[r])}Ie.prototype.toJSON=void 0;var Pe,De,$e,Ue=class{},Be={bb:!0};function Ge(t,e){e<100||U(z,1)}function je(t,e,r,n){var i=void 0!==n;n=!!n;var s,o=W;!i&&G&&o&&(s=t[o])&&Me(s,Ge),o=[];var a=t.length;s=4294967295;var h=!1,u=!!(64&e),c=u?128&e?0:-1:void 0;if(!(1&e)){var l=a&&t[a-1];null!=l&&"object"==typeof l&&l.constructor===Object?s=--a:l=void 0,!u||128&e||i||(h=!0,s=(Pe??we)(s-c,c,t,l,void 0)+c)}e=void 0;for(var d=0;d<a;d++){let i=t[d];if(null!=i&&null!=(i=r(i,n)))if(u&&d>=s){let t=d-c;(e??={})[t]=i}else o[d]=i}if(l)for(let t in l){if(null==(a=l[t])||null==(a=r(a,n)))continue;let i;d=+t,u&&!Number.isNaN(d)&&(i=d+c)<s?o[i]=a:(e??={})[t]=a}return e&&(h?o.push(e):o[s]=e),i&&W&&(t=Oe(t))&&t instanceof Ue&&(o[W]=function(t){var e=new Ue;return Me(t,(t,r,n)=>{e[r]=Ht(n)}),e.ka=t.ka,e}(t)),o}function Ve(t){return t[0]=He(t[0]),t[1]=He(t[1]),t}function He(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return bt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[rt];return 0===t.length&&1&e?void 0:je(t,e,He)}if(null!=t&&t[Z]===ht)return Ke(t);if(t instanceof O){if(null==(e=t.g))t="";else if("string"==typeof e)t=e;else{if(T){for(var r="",n=0,i=e.length-10240;n<i;)r+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));r+=String.fromCharCode.apply(null,n?e.subarray(n):e),e=btoa(r)}else{void 0===r&&(r=0),w(),r=y[r],n=Array(Math.floor(e.length/3)),i=r[64]||"";let t=0,u=0;for(;t<e.length-2;t+=3){var s=e[t],o=e[t+1],a=e[t+2],h=r[s>>2];s=r[(3&s)<<4|o>>4],o=r[(15&o)<<2|a>>6],a=r[63&a],n[u++]=h+s+o+a}switch(h=0,a=i,e.length-t){case 2:a=r[(15&(h=e[t+1]))<<2]||i;case 1:e=e[t],n[u]=r[e>>2]+r[(3&e)<<4|h>>4]+a+i}e=n.join("")}t=t.g=e}return t}return t instanceof Ie?t=0!==t.size?t.ea(Ve):void 0:void 0}return t}function Ke(t){return je(t=t.A,0|t[rt],He)}function Xe(t,e){return We(t,e[0],e[1])}function We(t,e,r,n=0){if(null==t){var i=32;r?(t=[r],i|=128):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[rt],p&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(p)throw Error("carr");U(J,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&st(t,i|n),t;if(r&&(i|=128,r!==t[0]))throw Error("mid");t:{i|=64;var s=(r=t).length;if(s){var o=s-1;let t=r[o];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((o-=e=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var a in t)(s=+a)<o&&(r[s+e]=t[a],delete t[a]);i=-16760833&i|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,s-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&a)<<14}}}return st(t,64|i|n),t}function Ye(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var r=0|t[rt];return 0===t.length&&1&r?void 0:ze(t,r,e)}if(null!=t&&t[Z]===ht)return Je(t);if(t instanceof Ie){if(2&(e=t.K))return t;if(!t.size)return;if(r=ot(t.ea()),t.L)for(t=0;t<r.length;t++){let n=r[t],i=n[1];i=null==i||"object"!=typeof i?void 0:null!=i&&i[Z]===ht?Je(i):Array.isArray(i)?ze(i,0|i[rt],!!(32&e)):void 0,n[1]=i}return r}return t instanceof O?t:void 0}function ze(t,e,r){return 2&e||(!r||4096&e||16&e?t=Ze(t,e,!1,r&&!(16&e)):(it(t,34),4&e&&Object.freeze(t))),t}function qe(t,e,r){return t=new t.constructor(e),r&&(t.h=ct),t.m=ct,t}function Je(t){var e=t.A,r=0|e[rt];return ut(t,r)?t:nr(t,e,r)?qe(t,e):Ze(e,r)}function Ze(t,e,r,n){return n??=!!(34&e),t=je(t,e,Ye,n),n=32,r&&(n|=2),st(t,e=16769217&e|n),t}function Qe(t){var e=t.A,r=0|e[rt];return ut(t,r)?nr(t,e,r)?qe(t,e,!0):new t.constructor(Ze(e,r,!1)):t}function tr(t){if(t.h!==ct)return!1;var e=t.A;return it(e=Ze(e,0|e[rt]),2048),t.A=e,t.h=void 0,t.m=void 0,!0}function er(t){if(!tr(t)&&ut(t,0|t.A[rt]))throw Error()}function rr(t,e){void 0===e&&(e=0|t[rt]),32&e&&!(4096&e)&&st(t,4096|e)}function nr(t,e,r){return!!(2&r)||!(!(32&r)||4096&r)&&(st(e,2|r),t.h=ct,!0)}var ir=wt(0),sr={};function or(t,e,r,n){if(null!==(e=ar(t.A,e,void 0,n))||r&&t.m!==ct)return e}function ar(t,e,r,n){if(-1===e)return null;var i=e+(r?0:-1),s=t.length-1;if(!(s<1+(r?0:-1))){if(i>=s){var o=t[s];if(null!=o&&"object"==typeof o&&o.constructor===Object){r=o[e];var a=!0}else{if(i!==s)return;r=o}}else r=t[i];if(n&&null!=r){if(null==(n=n(r)))return n;if(!Object.is(n,r))return a?o[e]=n:t[i]=n,n}return r}}function hr(t,e,r,n){er(t);var i=t.A;return ur(i,0|i[rt],e,r,n),t}function ur(t,e,r,n,i){var s=r+(i?0:-1),o=t.length-1;if(o>=1+(i?0:-1)&&s>=o){let i=t[o];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[r]=n,e}return s<=o?(t[s]=n,e):(void 0!==n&&(r>=(o=(e??=0|t[rt])>>14&1023||536870912)?null!=n&&(t[o+(i?0:-1)]={[r]:n}):t[s]=n),e)}function cr(t,e,r,n){var i=t.A;return void 0!==Sr(i,0|i[rt],e,t=Ar(t,n)===r?r:-1)}function lr(){return void 0===ft?2:4}function dr(t,e,r,n,i){var s=t.A,o=0|s[rt];n=ut(t,o)?1:n,i=!!i||3===n,2===n&&tr(t)&&(o=0|(s=t.A)[rt]);var a=(t=pr(s,e))===V?7:0|t[rt],h=gr(a,o),u=!(4&h);if(u){4&h&&(t=Ht(t),a=0,h=Or(h,o),o=ur(s,o,e,t));let n=0,i=0;for(;n<t.length;n++){let e=r(t[n]);null!=e&&(t[i++]=e)}i<n&&(t.length=i),r=-513&h|4,h=r&=-1025,h&=-4097}return h!==a&&(st(t,h),2&h&&Object.freeze(t)),fr(t,h,s,o,e,n,u,i)}function fr(t,e,r,n,i,s,o,a){var h=e;return 1===s||4===s&&(2&e||!(16&e)&&32&n)?mr(e)||((e|=!t.length||o&&!(4096&e)||32&n&&!(4096&e||16&e)?2:256)!==h&&st(t,e),Object.freeze(t)):(2===s&&mr(e)&&(t=Ht(t),h=0,e=Or(e,n),n=ur(r,n,i,t)),mr(e)||(a||(e|=16),e!==h&&st(t,e))),2&e||!(4096&e||16&e)||rr(r,n),t}function pr(t,e,r){return t=ar(t,e,r),Array.isArray(t)?t:V}function gr(t,e){return 2&e&&(t|=2),1|t}function mr(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function vr(t){return lt(t,!0)}function _r(t){t=Ht(t);for(let e=0;e<t.length;e++){let r=t[e]=Ht(t[e]);Array.isArray(r[1])&&(r[1]=ot(r[1]))}return at(t)}function yr(t,e,r,n){er(t),ur(t=t.A,0|t[rt],e,("0"===n?0===Number(r):r===n)?void 0:r)}function Er(t,e,r){if(2&e)throw Error();var n=mt(e),i=pr(t,r,n),s=i===V?7:0|i[rt],o=gr(s,e);return(2&o||mr(o)||16&o)&&(o===s||mr(o)||st(i,o),i=Ht(i),s=0,o=Or(o,e),ur(t,e,r,i,n)),(o&=-13)!==s&&st(i,o),i}function Ar(t,e){return Tr(wr(t=t.A),t,void 0,e)}function wr(t){if(G)return t[X]??(t[X]=new Map);if(X in t)return t[X];var e=new Map;return Object.defineProperty(t,X,{value:e}),e}function br(t,e,r,n,i){var s=wr(t),o=Tr(s,t,e,r,i);return o!==n&&(o&&(e=ur(t,e,o,void 0,i)),s.set(r,n)),e}function Tr(t,e,r,n,i){var s=t.get(n);if(null!=s)return s;s=0;for(let t=0;t<n.length;t++){let o=n[t];null!=ar(e,o,i)&&(0!==s&&(r=ur(e,r,s,void 0,i)),s=o)}return t.set(n,s),s}function kr(t,e,r){var n=0|t[rt],i=mt(n),s=ar(t,r,i);if(null!=s&&s[Z]===ht){if(!ut(s))return tr(s),s.A;var o=s.A}else Array.isArray(s)&&(o=s);if(o){let t=0|o[rt];2&t&&(o=Ze(o,t))}return(o=Xe(o,e))!==s&&ur(t,n,r,o,i),o}function Sr(t,e,r,n,i){var s=!1;if(null!=(n=ar(t,n,i,t=>{var n=Ee(t,r,!1,e);return s=n!==t&&null!=n,n})))return s&&!ut(n)&&rr(t,e),n}function Lr(t,e,r,n){var i=t.A,s=0|i[rt];if(null==(e=Sr(i,s,e,r,n)))return e;if(!ut(t,s=0|i[rt])){let o=Qe(e);o!==e&&(tr(t)&&(s=0|(i=t.A)[rt]),rr(i,s=ur(i,s,r,e=o,n)))}return e}function xr(t,e,r,n,i,s,o,a){var h=ut(t,r);s=h?1:s,o=!!o||3===s,h=a&&!h,(2===s||h)&&tr(t)&&(r=0|(e=t.A)[rt]);var u=(t=pr(e,i))===V?7:0|t[rt],c=gr(u,r);if(a=!(4&c)){var l=t,d=r;let e=!!(2&c);e&&(d|=2);let i=!e,s=!0,o=0,a=0;for(;o<l.length;o++){let t=Ee(l[o],n,!1,d);if(t instanceof n){if(!e){let e=ut(t);i&&=!e,s&&=e}l[a++]=t}}a<o&&(l.length=a),c|=4,c=s?-4097&c:4096|c,c=i?8|c:-9&c}if(c!==u&&(st(t,c),2&c&&Object.freeze(t)),h&&!(8&c||!t.length&&(1===s||4===s&&(2&c||!(16&c)&&32&r)))){for(mr(c)&&(t=Ht(t),c=Or(c,r),r=ur(e,r,i,t)),n=t,h=c,u=0;u<n.length;u++)(l=n[u])!==(c=Qe(l))&&(n[u]=c);h|=8,st(t,c=h=n.length?4096|h:-4097&h)}return fr(t,c,e,r,i,s,a,o)}function Rr(t,e,r){var n=t.A;return xr(t,n,0|n[rt],e,r,lr(),!1,!0)}function Ir(t){return null==t&&(t=void 0),t}function Fr(t,e,r,n,i){return hr(t,r,n=Ir(n),i),n&&!ut(n)&&rr(t.A),t}function Cr(t,e,r,n){t:{var i=n=Ir(n);er(t);let s=t.A,o=0|s[rt];if(null==i){let t=wr(s);if(Tr(t,s,o,r)!==e)break t;t.set(r,0)}else o=br(s,o,r,e);ur(s,o,e,i)}return n&&!ut(n)&&rr(t.A),t}function Nr(t,e,r){er(t);var n=t.A,i=0|n[rt];if(null==r)return ur(n,i,e),t;var s=r===V?7:0|r[rt],o=s,a=mr(s),h=a||Object.isFrozen(r),u=!0,c=!0;for(let t=0;t<r.length;t++){var l=r[t];a||(l=ut(l),u&&=!l,c&&=l)}return a||(s=u?13:5,s=c?-4097&s:4096|s),h&&s===o||(r=Ht(r),o=0,s=Or(s,i)),s!==o&&st(r,s),i=ur(n,i,e,r),2&s||!(4096&s||16&s)||rr(n,i),t}function Or(t,e){return-273&(2&e?2|t:-3&t)}function Mr(t,e,r,n){var i=n;er(t),t=xr(t,n=t.A,0|n[rt],r,e,2,!0),i=null!=i?i:new r,t.push(i),e=r=t===V?7:0|t[rt],(i=ut(i))?(r&=-9,1===t.length&&(r&=-4097)):r|=4096,r!==e&&st(t,r),i||rr(n)}function Pr(t,e,r){return ne(or(t,e,r))}function Dr(t,e){return or(t,e,void 0,Zt)??0}function $r(t,e,r){return Lr(t,e,r=Ar(t,Bo)===r?r:-1,void 0)}function Ur(t,e){yr(t,3,null==e?e:Qt(e),!1)}function Br(t,e,r){if(null!=r){if("number"!=typeof r)throw $("int32");if(!Yt(r))throw $("int32");r|=0}hr(t,e,r)}function Gr(t,e,r){return hr(t,e,null==r?r:se(r))}function jr(t,e,r){return hr(t,e,null==r?r:function(t){if(!ee(t))throw $("uint64");switch(typeof t){case"string":var e=zt(Number(t));return Wt(e)&&e>=0?t=wt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=B()?wt(Xt(64,BigInt(t))):wt(ae(t))),t;case"bigint":return wt(Xt(64,t));default:return Wt(t)?t=wt(ue(t)):((t=zt(t))>=0&&Wt(t)?t=String(t):(Ot(t),t=Ut(Ft,Ct)),t=wt(t)),t}}(r))}function Vr(t,e,r){hr(t,e,null==r?r:Jt(r))}function Hr(t,e,r){yr(t,e,null==r?r:Jt(r),0)}function Kr(t,e,r){yr(t,e,_e(r),"")}function Xr(t,e,r){{er(t);let o=t.A,a=0|o[rt];if(null==r)ur(o,a,e);else{var n=t=r===V?7:0|r[rt],i=mr(t),s=i||Object.isFrozen(r);for(i||(t=0),s||(r=Ht(r),n=0,t=Or(t,a),s=!1),t|=5,t|=(4&t?512&t?512:1024&t?1024:0:void 0)??1024,i=0;i<r.length;i++){let e=r[i],o=ve(e);Object.is(e,o)||(s&&(r=Ht(r),n=0,t=Or(t,a),s=!1),r[i]=o)}t!==n&&(s&&(r=Ht(r),t=Or(t,a)),st(r,t)),ur(o,a,e,r)}}}function Wr(t,e,r){er(t),dr(t,e,ye,2,!0).push(ve(r))}var Yr=class{constructor(t,e,r){if(this.buffer=t,r&&!e)throw Error();this.g=e}};function zr(t,e){if("string"==typeof t)return new Yr(x(t),e);if(Array.isArray(t))return new Yr(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new Yr(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Yr(t,!1);if(t.constructor===O)return e=C(t)||new Uint8Array(0),new Yr(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Yr(t,!1);throw Error()}function qr(t,e){var r=0,n=0,i=0,s=t.h,o=t.g;do{var a=s[o++];r|=(127&a)<<i,i+=7}while(i<32&&128&a);if(i>32)for(n|=(127&a)>>4,i=3;i<32&&128&a;i+=7)n|=(127&(a=s[o++]))<<i;if(sn(t,o),!(128&a))return e(r>>>0,n>>>0);throw Error()}function Jr(t){for(var e=0,r=t.g,n=r+10,i=t.h;r<n;){let n=i[r++];if(e|=n,!(128&n))return sn(t,r),!!(127&e)}throw Error()}function Zr(t){var e=t.h,r=t.g,n=e[r++],i=127&n;if(128&n&&(i|=(127&(n=e[r++]))<<7,128&n&&(i|=(127&(n=e[r++]))<<14,128&n&&(i|=(127&(n=e[r++]))<<21,128&n&&(i|=(n=e[r++])<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw Error();return sn(t,r),i}function Qr(t){return Zr(t)>>>0}function tn(t){return qr(t,$t)}function en(t){var e=t.h,r=t.g,n=e[r],i=e[r+1],s=e[r+2];return e=e[r+3],sn(t,t.g+4),(n|i<<8|s<<16|e<<24)>>>0}function rn(t){var e=en(t);t=2*(e>>31)+1;var r=e>>>23&255;return e&=8388607,255==r?e?NaN:t*(1/0):0==r?1401298464324817e-60*t*e:t*Math.pow(2,r-150)*(e+8388608)}function nn(t){return Zr(t)}function sn(t,e){if(t.g=e,e>t.l)throw Error()}function on(t,e){if(e<0)throw Error();var r=t.g;if((e=r+e)>t.l)throw Error();return t.g=e,r}function an(t,e){if(0==e)return F();var r=on(t,e);return t.fa&&t.o?r=t.h.subarray(r,r+e):(t=t.h,r=r===(e=r+e)?new Uint8Array(0):It?t.slice(r,e):new Uint8Array(t.subarray(r,e))),0==r.length?F():new O(r,I)}var hn=class{constructor(t,e,r,n){this.h=null,this.o=!1,this.g=this.l=this.m=0,this.init(t,e,r,n)}init(t,e,r,{fa:n=!1,ma:i=!1}={}){this.fa=n,this.ma=i,t&&(t=zr(t,this.ma),this.h=t.buffer,this.o=t.g,this.m=e||0,this.l=void 0!==r?this.m+r:this.h.length,this.g=this.m)}clear(){this.h=null,this.o=!1,this.g=this.l=this.m=0,this.fa=!1}},un=[],cn=0;function ln(t,e,r,n){if(An.length){let i=An.pop();return i.v(n),i.g.init(t,e,r,n),i}return new En(t,e,r,n)}function dn(t){t.g.clear(),t.l=-1,t.h=-1,An.length<100&&An.push(t)}function fn(t){var e=t.g;if(e.g==e.l)return!1;t.m=t.g.g;var r=Qr(t.g);if(e=r>>>3,!((r&=7)>=0&&r<=5))throw Error();if(e<1)throw Error();return t.l=e,t.h=r,!0}function pn(t){try{switch(t.h){case 0:0!=t.h?pn(t):Jr(t.g);break;case 1:var e=t.g;sn(e,e.g+8);break;case 2:if(2!=t.h)pn(t);else{var r=Qr(t.g),n=t.g;sn(n,n.g+r)}break;case 5:var i=t.g;sn(i,i.g+4);break;case 3:gn();let s=t.l;try{for(;;){if(!fn(t))throw Error();if(4==t.h){if(t.l!=s)throw Error();break}pn(t)}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{cn>0&&cn--}break;default:throw Error()}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}}function gn(){if(cn>=100)throw new SyntaxError;cn++}function mn(t,e,r){var n=t.g.l,i=Qr(t.g),s=(i=t.g.g+i)-n;if(s<=0&&(t.g.l=i,r(e,t,void 0,void 0,void 0),s=i-t.g.g),s)throw Error();return t.g.g=i,t.g.l=n,e}function vn(t){var e=Qr(t.g),r=on(t=t.g,e);if(t=t.h,u){var n,a=t;(n=o)||(n=o=new TextDecoder("utf-8",{fatal:!0})),e=r+e,a=0===r&&e===a.length?a:a.subarray(r,e);try{var c=n.decode(a)}catch(t){if(void 0===h){try{n.decode(new Uint8Array([128]))}catch(t){}try{n.decode(new Uint8Array([97])),h=!0}catch(t){h=!1}}throw!h&&(o=void 0),t}}else{e=(c=r)+e,r=[];let o,h=null;for(;c<e;){var l=t[c++];l<128?r.push(l):l<224?c>=e?i():(o=t[c++],l<194||128!=(192&o)?(c--,i()):r.push((31&l)<<6|63&o)):l<240?c>=e-1?i():(o=t[c++],128!=(192&o)||224===l&&o<160||237===l&&o>=160||128!=(192&(n=t[c++]))?(c--,i()):r.push((15&l)<<12|(63&o)<<6|63&n)):l<=244?c>=e-2?i():(o=t[c++],128!=(192&o)||o-144+(l<<28)>>30||128!=(192&(n=t[c++]))||128!=(192&(a=t[c++]))?(c--,i()):(l=(7&l)<<18|(63&o)<<12|(63&n)<<6|63&a,l-=65536,r.push(55296+(l>>10&1023),56320+(1023&l)))):i(),r.length>=8192&&(h=s(h,r),r.length=0)}c=s(h,r)}return c}function _n(t){var e=Qr(t.g);return an(t.g,e)}function yn(t,e,r){var n=Qr(t.g);for(n=t.g.g+n;t.g.g<n;)r.push(e(t.g))}var En=class{constructor(t,e,r,n){if(un.length){let i=un.pop();i.init(t,e,r,n),t=i}else t=new hn(t,e,r,n);this.g=t,this.m=this.g.g,this.h=this.l=-1,this.v(n)}v({qa:t=!1}={}){this.qa=t}},An=[];function wn(t){return new kn(4294967295&t,Math.floor(t/4294967296))}function bn(t){return t?/^\d+$/.test(t)?(jt(t),new kn(Ft,Ct)):null:Tn||=new kn(0,0)}var Tn,kn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};function Sn(t){return new Pn(4294967295&t,Math.floor(t/4294967296))}function Ln(t){return t?/^-?\d+$/.test(t)?(jt(t),new Pn(Ft,Ct)):null:xn||=new Pn(0,0)}var xn,Rn,In,Fn,Cn,Nn,On,Mn,Pn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};function Dn(t,e,r){return"undefined"!=typeof BigInt64Array?(On||(On=new BigInt64Array(1),Mn=new Uint32Array(On.buffer),On[0]=BigInt(1),Nn=1===Mn[0]),On[0]=t,new e(Mn[t=Nn?0:1],Mn[1-t])):(Cn||(Rn=BigInt(Number.MIN_SAFE_INTEGER),In=BigInt(Number.MAX_SAFE_INTEGER),Fn=BigInt(4294967295),Cn=BigInt(32)),t>=Rn&&t<=In?r(Number(t)):(t=BigInt.asUintN(64,t),new e(Number(t&Fn),Number(t>>Cn))))}function $n(t,e,r){for(;r>0||e>127;)t.g.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.g.push(e)}function Un(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Bn(t,e){if(e>=0)Un(t,e);else{for(let r=0;r<9;r++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Gn(t,e){jt(e),function(t){var e=Ct>>31;t(Ft<<1^e,(Ct<<1|Ft>>>31)^e)}((e,r)=>{$n(t,e>>>0,r>>>0)})}function jn(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)}var Vn=class{constructor(){this.g=[]}length(){return this.g.length}end(){var t=this.g;return this.g=[],t}};function Hn(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function Kn(t,e,r){Un(t.g,8*e+r)}function Xn(t,e){return Kn(t,e,2),e=t.g.end(),Hn(t,e),e.push(t.h),e}function Wn(t,e){var r=e.pop();for(r=t.h+t.g.length()-r;r>127;)e.push(127&r|128),r>>>=7,t.h++;e.push(r),t.h++}function Yn(t,e,r){if(null!=r)switch(Kn(t,e,0),typeof r){case"number":t=t.g,Ot(r),$n(t,Ft,Ct);break;case"bigint":r=Dn(r,Pn,Sn),$n(t.g,r.h,r.g);break;default:r=Ln(r),$n(t.g,r.h,r.g)}}function zn(t,e,r){Kn(t,e,2),Un(t.g,r.length),Hn(t,t.g.end()),Hn(t,r)}function qn(t,e,r,n){null!=r&&(e=Xn(t,e),n(r,t),Wn(t,e))}var Jn=class{constructor(){this.l=[],this.h=0,this.g=new Vn}};function Zn(t){if("string"==typeof t)Ln(t)}function Qn(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var ti=Qn(),ei=Qn(),ri=Qn(),ni=Qn(),ii=Qn(),si=Qn(),oi=Qn(),ai=Qn(),hi=Qn(),ui=Qn(),ci=Qn(),li=Qn();function di(t,e,r){var n=t.A;W&&W in n&&(n=n[W])&&delete n[e.g],e.h?e.o(t,e.h,e.g,r,e.l):e.o(t,e.g,r,e.l)}var fi=class{constructor(t,e){this.A=We(t,e,void 0,2048)}toJSON(){return Ke(this)}o(){var t=Na,e=this.A,r=t.g,n=W;if(G&&n&&null!=e[n]?.[r]&&U(Y,3),e=t.g,Q&&W&&void 0===Q&&(n=(r=this.A)[W])&&(n=n.ka))try{n(r,e,Be)}catch(t){d(t)}return t.h?t.m(this,t.h,t.g,t.l):t.m(this,t.g,t.defaultValue,t.l)}clone(){var t=this.A,e=0|t[rt];return nr(this,t,e)?qe(this,t,!0):new this.constructor(Ze(t,e,!1))}};fi.prototype[Z]=ht,fi.prototype.toString=function(){return this.A.toString()};var pi=class{constructor(t,e,r){this.g=t,this.h=e,t=ti,this.l=!!t&&r===t||!1}};function gi(t,e){return new pi(t,e,ti)}function mi(t,e,r,n,i){qn(t,r,xi(e,n),i)}var vi,_i,yi=gi(function(t,e,r,n,i){return 2===t.h&&(mn(t,kr(e,n,r),i),!0)},mi),Ei=gi(function(t,e,r,n,i){return 2===t.h&&(mn(t,kr(e,n,r),i),!0)},mi),Ai=Symbol(),wi=Symbol(),bi=Symbol(),Ti=Symbol(),ki=Symbol();function Si(t,e,r,n){var i=n[t];if(i)return i;(i={}).Da=n,i.ba=function(t){switch(typeof t){case"boolean":return De||=[0,void 0,!0];case"number":return t>0?void 0:0===t?$e||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var s=n[1],o=1;s&&s.constructor===Object&&(i.ia=s,"function"==typeof(s=n[++o])&&(i.va=!0,vi??=s,_i??=n[o+1],s=n[o+=2]));for(var a={};s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var h=0;h<s.length;h++)a[s[h]]=s;s=n[++o]}for(h=1;void 0!==s;){let t;"number"==typeof s&&(h+=s,s=n[++o]);var u=void 0;if(s instanceof pi?t=s:(t=yi,o--),t?.l){s=n[++o],u=n;var c=o;"function"==typeof s&&(s=s(),u[c]=s),u=s}for(c=h+1,"number"==typeof(s=n[++o])&&s<0&&(c-=s,s=n[++o]);h<c;h++){let n=a[h];u?r(i,h,t,u,n):e(i,h,t,n)}}return n[t]=i}function Li(t){return Array.isArray(t)?t[0]instanceof pi?t:[Ei,t]:[t,void 0]}function xi(t,e){return t instanceof fi?t.A:Array.isArray(t)?Xe(t,e):void 0}function Ri(t,e,r,n){var i=r.g;t[e]=n?(t,e,r)=>i(t,e,r,n):i}function Ii(t,e,r,n,i){var s,o,a=r.g;t[e]=(t,e,r)=>a(t,e,r,o||=Si(wi,Ri,Ii,n).ba,s||=Fi(n),i)}function Fi(t){var e=t[bi];if(null!=e)return e;var r=Si(wi,Ri,Ii,t);return e=r.va?(t,e)=>vi(t,e,r):(t,e)=>{t:{gn();try{for(;fn(e)&&4!=e.h;){let h=e.l,u=r[h];if(null==u){let t=r.ia;if(t){let e=t[h];if(e){let t=Ni(e);null!=t&&(u=r[h]=t)}}}if(null==u||!u(e,t,h)){var n=e;let r=n.m;if(pn(n),n.qa)var i=void 0;else{let t=n.g.g-r;n.g.g=r,i=an(n.g,t)}n=void 0;var s=t,o=h,a=i;a&&((n=s[W]??(s[W]=new Ue))[o]??(n[o]=[])).push(a)}}let u=Oe(t);u&&(u.ka=r.Da[ki]);var h=!0;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{cn>0&&cn--}h=void 0}return h},t[bi]=e,t[ki]=Ci.bind(t),e}function Ci(t,e,r,n){var i=this[wi],s=this[bi],o=Xe(void 0,i.ba),a=Oe(t);if(a){var h=!1,u=i.ia;if(u){if(i=(e,r,i)=>{if(0!==i.length)if(u[r])for(let t of i){e=ln(t);try{h=!0,s(o,e)}finally{dn(e)}}else n?.(t,r,i)},null==e)Me(a,i);else if(null!=a){let t=a[e];t&&i(a,e,t)}if(h){let n=0|t[rt];if(2&n&&2048&n&&!r?.bb)throw Error();let i=mt(n),s=(e,s)=>{if(null!=ar(t,e,i)){if(1===r?.kb)return;throw Error()}null!=s&&(n=ur(t,n,e,s,i)),delete a[e]};null==e?pt(o,0|o[rt],(t,e)=>{s(t,e)}):s(e,ar(o,e,i))}}}}function Ni(t){var e=(t=Li(t))[0].g;if(t=t[1]){let r=Fi(t),n=Si(wi,Ri,Ii,t).ba;return(t,i,s)=>e(t,i,s,n,r)}return e}function Oi(t,e,r){t[e]=r.h}function Mi(t,e,r,n){var i,s,o=r.h;t[e]=(t,e,r)=>o(t,e,r,s||=Si(Ai,Oi,Mi,n).ba,i||=Pi(n))}function Pi(t){var e=t[Ti];if(!e){let r=Si(Ai,Oi,Mi,t);e=(t,e)=>Di(t,e,r),t[Ti]=e}return e}function Di(t,e,r){pt(t,0|t[rt],(t,n)=>{if(null!=n){var i=function(t,e){var r=t[e];if(r)return r;if((r=t.ia)&&(r=r[e])){var n=(r=Li(r))[0].h;if(r=r[1]){let e=Pi(r),i=Si(Ai,Oi,Mi,r).ba;r=t.va?_i(i,e):(t,r,s)=>n(t,r,s,i,e)}else r=n;return t[e]=r}}(r,t);i?i(e,n,t):t<500||U(q,3)}}),(t=Oe(t))&&Me(t,(t,r,n)=>{for(Hn(e,e.g.end()),t=0;t<n.length;t++)Hn(e,C(n[t])||new Uint8Array(0))})}var $i=wt(0);function Ui(t,e,r){if(Array.isArray(e)){var n=0|e[rt];if(4&n)return e;for(var i=0,s=0;i<e.length;i++){let r=t(e[i]);null!=r&&(e[s++]=r)}return s<i&&(e.length=s),t=1|n,r&&(t=-1537&t|4),t!==n&&st(e,t),r&&2&t&&Object.freeze(e),e}}var Bi=(t,e)=>{var r=new Jn;Di(t.A,r,Si(Ai,Oi,Mi,e)),Hn(r,r.g.end()),t=new Uint8Array(r.h);var n=(e=r.l).length,i=0;for(let r=0;r<n;r++){let n=e[r];t.set(n,i),i+=n.length}return r.l=[t],t};function Gi(t,e,r){return new pi(t,e,r)}function ji(t,e,r){return new pi(t,e,r)}function Vi(t,e,r){ur(t,0|t[rt],e,r,mt(0|t[rt]))}var Hi=gi(function(t,e,r,n,i){if(2!==t.h)return!1;if(t=Ht(t=mn(t,Xe([void 0,void 0],n),i)),i=mt(n=0|e[rt]),2&n)throw Error();var s=ar(e,r,i);if(s instanceof Ie)2&s.K?((s=s.ea()).push(t),ur(e,n,r,s,i)):s.fb(t);else if(Array.isArray(s)){var o=0|s[rt];8192&o||st(s,o|=8192),2&o&&ur(e,n,r,s=_r(s),i),s.push(t)}else ur(e,n,r,at([t]),i);return!0},function(t,e,r,n,i){if(e instanceof Ie)e.forEach((e,s)=>{qn(t,r,Xe([s,e],n),i)});else if(Array.isArray(e)){for(let s=0;s<e.length;s++){let o=e[s];Array.isArray(o)&&qn(t,r,Xe(o,n),i)}at(e)}});function Ki(t,e,r){null!=(e=Zt(e))&&(Kn(t,r,5),t=t.g,Mt(e),jn(t,Ft))}function Xi(t,e,r){null!=(e=ge(e))&&(Zn(e),Yn(t,r,e))}function Wi(t,e,r){null!=(e=ne(e))&&null!=e&&(Kn(t,r,0),Bn(t.g,e))}function Yi(t,e,r){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Kn(t,r,0),t.g.g.push(e?1:0))}function zi(t,e,r){null!=(e=ye(e))&&zn(t,r,l(e))}function qi(t,e,r,n,i){qn(t,r,xi(e,n),i)}function Ji(t,e,r){null!=(e=me(e))&&zn(t,r,zr(e,!0).buffer)}function Zi(t,e,r){null!=(e=ie(e))&&null!=e&&(Kn(t,r,0),Un(t.g,e))}function Qi(t,e,r){null!=(e=ne(e))&&(e=parseInt(e,10),Kn(t,r,0),Bn(t.g,e))}function ts(t,e,r){return(5===t.h||2===t.h)&&(e=Er(e,0|e[rt],r),2==t.h?yn(t,rn,e):e.push(rn(t.g)),!0)}function es(t,e,r){return 0===t.h&&(Vi(e,r,tn(t.g)),!0)}function rs(t,e,r){return(0===t.h||2===t.h)&&(e=Er(e,0|e[rt],r),2==t.h?yn(t,Zr,e):e.push(Zr(t.g)),!0)}function ns(t,e,r){return 2===t.h&&(Vi(e,r,(t=_n(t))===F()?void 0:t),!0)}var is=Gi(function(t,e,r){if(1!==t.h)return!1;var n=t.g;t=en(n);var i=en(n);n=2*(i>>31)+1;var s=i>>>20&2047;return t=4294967296*(1048575&i)+t,Vi(e,r,2047==s?t?NaN:n*(1/0):0==s?5e-324*n*t:n*Math.pow(2,s-1075)*(t+4503599627370496)),!0},function(t,e,r){null!=(e=Zt(e))&&(Kn(t,r,1),t=t.g,(r=Rt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),Ft=r.getUint32(0,!0),Ct=r.getUint32(4,!0),jn(t,Ft),jn(t,Ct))},ui),ss=Gi(function(t,e,r){return 5===t.h&&(Vi(e,r,rn(t.g)),!0)},Ki,hi),os=ji(ts,function(t,e,r){if(null!=(e=Ui(Zt,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Kn(n,i,5),n=n.g,Mt(s),jn(n,Ft))}},hi),as=ji(ts,function(t,e,r){if(null!=(e=Ui(Zt,e,!0))&&e.length){Kn(t,r,2),Un(t.g,4*e.length);for(let n=0;n<e.length;n++)r=t.g,Mt(e[n]),jn(r,Ft)}},hi),hs=Gi(function(t,e,r){return 5===t.h&&(Vi(e,r,0===(t=rn(t.g))?void 0:t),!0)},Ki,hi),us=Gi(function(t,e,r){return es(t,e,r)},Xi,si),cs=Gi(function(t,e,r){return es(t,e,r)},Xi,si),ls=ji(function(t,e,r){return 0!==t.h&&2!==t.h?t=!1:(e=Er(e,0|e[rt],r),2==t.h?yn(t,tn,e):e.push(tn(t.g)),t=!0),t},function(t,e,r){if(null!=(e=Ui(ge,e,!1)))for(let n=0;n<e.length;n++)Yn(t,r,e[n])},si),ds=Gi(function(t,e,r){return 0!==t.h?e=!1:(Vi(e,r,(t=tn(t.g))===$i?void 0:t),e=!0),e},Xi,si),fs=Gi(function(t,e,r){return 0!==t.h?t=!1:(Vi(e,r,qr(t.g,Dt)),t=!0),t},function(t,e,r){if(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Xt(64,t));if(ee(t)){if("string"===e)return e=zt(Number(t)),Wt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=ae(t)),t;if("number"===e)return ue(t)}}(e),null!=e){if("string"==typeof e)bn(e);if(null!=e)switch(Kn(t,r,0),typeof e){case"number":t=t.g,Ot(e),$n(t,Ft,Ct);break;case"bigint":r=Dn(e,kn,wn),$n(t.g,r.h,r.g);break;default:r=bn(e),$n(t.g,r.h,r.g)}}},oi),ps=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,Zr(t.g)),!0)},Wi,ni),gs=ji(rs,function(t,e,r){if(null!=(e=Ui(ne,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Kn(n,i,0),Bn(n.g,s))}},ni),ms=ji(rs,function(t,e,r){if(null!=(e=Ui(ne,e,!0))&&e.length){r=Xn(t,r);for(let r=0;r<e.length;r++)Bn(t.g,e[r]);Wn(t,r)}},ni),vs=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,0===(t=Zr(t.g))?void 0:t),!0)},Wi,ni),_s=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,Jr(t.g)),!0)},Yi,ei),ys=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,!1===(t=Jr(t.g))?void 0:t),!0)},Yi,ei),Es=ji(function(t,e,r){return 2===t.h&&(t=vn(t),Er(e,0|e[rt],r).push(t),!0)},function(t,e,r){if(null!=(e=Ui(ye,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&zn(n,i,l(s))}},ri),As=Gi(function(t,e,r){return 2===t.h&&(Vi(e,r,""===(t=vn(t))?void 0:t),!0)},zi,ri),ws=Gi(function(t,e,r){return 2===t.h&&(Vi(e,r,vn(t)),!0)},zi,ri),bs=function(t,e,r=ti){return new pi(t,e,r)}(function(t,e,r,n,i){return 2===t.h&&(n=Xe(void 0,n),Er(e,0|e[rt],r).push(n),mn(t,n,i),!0)},function(t,e,r,n,i){if(Array.isArray(e)){for(let s=0;s<e.length;s++)qi(t,e[s],r,n,i);1&(t=0|e[rt])||st(e,1|t)}}),Ts=gi(function(t,e,r,n,i,s){if(2!==t.h)return!1;var o=0|e[rt];return br(e,o,s,r,mt(o)),mn(t,e=kr(e,n,r),i),!0},qi),ks=Gi(function(t,e,r){return 2===t.h&&(Vi(e,r,_n(t)),!0)},Ji,ci),Ss=ji(function(t,e,r){return 2===t.h&&(t=_n(t),Er(e,0|e[rt],r).push(t),!0)},function(t,e,r){if(null!=(e=Ui(me,e,!1)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&zn(n,i,zr(s,!0).buffer)}},ci),Ls=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,Qr(t.g)),!0)},Zi,ii),xs=ji(function(t,e,r){return(0===t.h||2===t.h)&&(e=Er(e,0|e[rt],r),2==t.h?yn(t,Qr,e):e.push(Qr(t.g)),!0)},function(t,e,r){if(null!=(e=Ui(ie,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Kn(n,i,0),Un(n.g,s))}},ii),Rs=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,0===(t=Qr(t.g))?void 0:t),!0)},Zi,ii),Is=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,Zr(t.g)),!0)},Qi,li),Fs=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,0===(t=Zr(t.g))?void 0:t),!0)},Qi,li),Cs=Gi(function(t,e,r){return 0!==t.h?t=!1:(Vi(e,r,function(t){return qr(t,(t,e)=>{var r=-(1&t);return $t(t=(t>>>1|e<<31)^r,e>>>1^r)})}(t.g)),t=!0),t},function(t,e,r){if(null!=(e=ge(e))&&(Zn(e),null!=e))switch(Kn(t,r,0),typeof e){case"number":t=t.g,e=(r=e)<0,Nt(r=2*Math.abs(r)),r=Ft;let n=Ct;e&&(0==r?0==n?n=r=4294967295:(n--,r=4294967295):r--),$n(t,Ft=r,Ct=n);break;case"bigint":t=t.g,e=e<<BigInt(1)^e>>BigInt(63),Ft=Number(BigInt.asUintN(32,e)),Ct=Number(BigInt.asUintN(32,e>>BigInt(32))),$n(t,Ft,Ct);break;default:Gn(t.g,e)}},ai);class Ns{constructor(t,e){var r=io;this.g=t,this.h=e,this.m=Lr,this.o=Fr,this.defaultValue=void 0,this.l=null!=r.ib?gt:void 0}register(){_(this)}}function Os(t,e){return new Ns(t,e)}function Ms(t,e){return(r,n)=>{t:{let s={ma:!0};n&&Object.assign(s,n),r=ln(r,void 0,void 0,s);try{let n=new t,s=n.A;Fi(e)(s,r);var i=n;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{dn(r)}i=void 0}return i}}function Ps(t){return e=>Bi(e,t)}function Ds(t){return function(){return Bi(this,t)}}var $s=[0,ks,Ss,_s,ws],Us=[0,As,[0,Fs,[0,ds,vs],Fs,-1,[0,Is],Fs,-1],Gi(ns,Ji,ci)];var Bs,Gs=class extends fi{constructor(t){super(t)}},js=[0,As,Gi(ns,function(t,e,r){if(null!=e){if(e instanceof fi){let n=e.lb;return void(n?(e=n(e),null!=e&&zn(t,r,zr(e,!0).buffer)):U(q,3))}if(Array.isArray(e))return void U(q,3)}Ji(t,e,r)},ci)],Vs=[0,1,[0,12,ps,10,_s],[0,7,[0,ps,-1]]],Hs=globalThis.trustedTypes;var Ks=class{constructor(t){this.g=t}toString(){return this.g+""}};function Xs(t){var e;return void 0===Bs&&(Bs=function(){var t=null;if(!Hs)return t;try{let e=t=>t;t=Hs.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}()),t=(e=Bs)?e.createScriptURL(t):t,new Ks(t)}function Ws(t,...e){if(0===e.length)return Xs(t[0]);var r=t[0];for(let n=0;n<e.length;n++)r+=encodeURIComponent(e[n])+t[n+1];return Xs(r)}var Ys=[0,ps,Is,_s,-1,ms,Is,-1,_s,-1],zs=[0,Is,-1,_s],qs=class extends fi{constructor(t){super(t)}},Js=[0,_s,ws,_s,Is,-1,ji(function(t,e,r){return(0===t.h||2===t.h)&&(e=Er(e,0|e[rt],r),2==t.h?yn(t,nn,e):e.push(Zr(t.g)),!0)},function(t,e,r){if(null!=(e=Ui(ne,e,!0))&&e.length){r=Xn(t,r);for(let r=0;r<e.length;r++)Bn(t.g,e[r]);Wn(t,r)}},li),ws,-1,[0,_s,-1],Is,_s,-1,zs],Zs=[0,3,_s,-1,2,[0,[2],ps,Ts,[0,Ls]],[0,Is,_s,Is,_s,Is,4,[0,_s,ws,-1,_s]],[0,[3,4],ws,-1,Ts,[0,ps],Ts,[0,Is,-1]],[0]],Qs=[0,ws,-2],to=class extends fi{constructor(t){super(t)}},eo=[0],ro=class extends fi{constructor(t){super(t)}},no=[0,ps,_s,1,_s,-4],io=class extends fi{constructor(t){super(t,2)}},so={};so[336783863]=[0,ws,_s,-1,ps,[0,[1,2,3,4,5,6,7,8,9],Ts,eo,Ts,Js,Ts,Qs,Ts,no,Ts,Ys,Ts,[0,ws,-2],Ts,[0,ws,Is],Ts,Zs,Ts,zs],[0,ws],_s,[0,[1,3],[2,4],Ts,[0,ms],-1,Ts,[0,Es],-1,bs,[0,ws,-1]],ws];var oo=[0,ds,-1,ys,-3,ds,ms,As,vs,ds,-1,ys,vs,ys,-2,As];function ao(t,e){Wr(t,3,e)}function ho(t,e){Wr(t,4,e)}var uo=class extends fi{constructor(t){super(t,500)}v(t){return Fr(this,0,7,t)}},co=[-1,{}],lo=[0,ws,1,co],fo=[0,ws,Es,co];function po(t,e){Mr(t,1,uo,e)}function go(t,e){Wr(t,10,e)}function mo(t,e){Wr(t,15,e)}var vo=class extends fi{constructor(t){super(t,500)}v(t){return Fr(this,0,1001,t)}},_o=[-500,bs,[-500,As,-1,Es,-3,[-2,so,_s],bs,js,vs,-1,lo,fo,bs,[0,As,ys],As,oo,vs,Es,987,Es],4,bs,[-500,ws,-1,[-1,{}],998,ws],bs,[-500,ws,Es,-1,[-2,{},_s],997,Es,-1],vs,bs,[-500,ws,Es,co,998,Es],Es,vs,lo,fo,bs,[0,As,-1,co],Es,-2,oo,As,-1,ys,[0,ys,Rs],978,co,bs,js];vo.prototype.g=Ds(_o);var yo=Ms(vo,_o),Eo=class extends fi{constructor(t){super(t)}},Ao=class extends fi{constructor(t){super(t)}g(){return Rr(this,Eo,1)}},wo=[0,bs,[0,ps,ss,ws,-1]],bo=Ms(Ao,wo),To=class extends fi{constructor(t){super(t)}},ko=class extends fi{constructor(t){super(t)}},So=class extends fi{constructor(t){super(t)}l(){return Lr(this,To,2)}g(){return Rr(this,ko,5)}},Lo=Ms(class extends fi{constructor(t){super(t)}},[0,Es,ms,as,[0,Is,[0,ps,-3],[0,ss,-3],[0,ps,-1,[0,bs,[0,ps,-2]]],bs,[0,ss,-1,ws,ss]],ws,-1,cs,bs,[0,ps,ss],Es,cs]),xo=class extends fi{constructor(t){super(t)}},Ro=Ms(class extends fi{constructor(t){super(t)}},[0,bs,[0,ss,-4]]),Io=class extends fi{constructor(t){super(t)}},Fo=Ms(class extends fi{constructor(t){super(t)}},[0,bs,[0,ss,-4]]),Co=class extends fi{constructor(t){super(t)}},No=[0,ps,-1,as,Is],Oo=class extends fi{constructor(t){super(t)}};Oo.prototype.g=Ds([0,ss,-4,cs]);var Mo=class extends fi{constructor(t){super(t)}},Po=Ms(class extends fi{constructor(t){super(t)}},[0,bs,[0,1,ps,ws,wo],cs]),Do=class extends fi{constructor(t){super(t)}},$o=class extends fi{constructor(t){super(t)}g(){var t=or(this,1,void 0,vr);return null==t?F():t}},Uo=class extends fi{constructor(t){super(t)}},Bo=[1,2],Go=Ms(class extends fi{constructor(t){super(t)}},[0,bs,[0,Bo,Ts,[0,as],Ts,[0,ks],ps,ws],cs]),jo=class extends fi{constructor(t){super(t)}},Vo=[0,ws,ps,ss,Es,-1],Ho=class extends fi{constructor(t){super(t)}},Ko=[0,_s,-1],Xo=class extends fi{constructor(t){super(t)}g(){return cr(this,qs,2,Wo)}},Wo=[1,2,3,4,5,6],Yo=class extends fi{constructor(t){super(t)}g(){return null!=or(this,1,void 0,vr)}l(){return null!=ye(or(this,2))}},zo=class extends fi{constructor(t){super(t)}},qo=[0,ks,ws,[0,ps,cs,-1],[0,fs,cs]],Jo=[0,qo,_s,[0,Wo,Ts,no,Ts,Js,Ts,Ys,Ts,eo,Ts,Qs,Ts,Zs],Is],Zo=Ps(Jo),Qo=class extends fi{constructor(t){super(t)}},ta=[0,Jo,ss,-1,ps],ea=Os(502141897,Qo);so[502141897]=ta;var ra=Ms(class extends fi{constructor(t){super(t)}},[0,[0,Is,-1,os,xs],No]),na=class extends fi{constructor(t){super(t)}},ia=class extends fi{constructor(t){super(t)}},sa=[0,Jo,ss,[0,Jo],_s],oa=Os(508968150,ia);so[508968150]=[0,Jo,ta,sa,ss,[0,[0,qo]]],so[508968149]=sa;var aa=class extends fi{constructor(t){super(t)}l(){return Lr(this,jo,2)}g(){hr(this,2)}},ha=[0,Jo,Vo];so[478825465]=ha;var ua=class extends fi{constructor(t){super(t)}},ca=class extends fi{constructor(t){super(t)}},la=class extends fi{constructor(t){super(t)}},da=class extends fi{constructor(t){super(t)}},fa=class extends fi{constructor(t){super(t)}},pa=[0,Jo,[0,Jo],ha,-1],ga=[0,Jo,ss,ps],ma=[0,Jo,ss],va=[0,Jo,ga,ma,ss],_a=Os(479097054,fa);so[479097054]=[0,Jo,va,pa],so[463370452]=pa,so[464864288]=ga;var ya=Os(462713202,da);so[462713202]=va,so[474472470]=ma;var Ea=class extends fi{constructor(t){super(t)}},Aa=class extends fi{constructor(t){super(t)}},wa=class extends fi{constructor(t){super(t)}},ba=class extends fi{constructor(t){super(t)}},Ta=[0,Jo,ss,-1,ps],ka=[0,Jo,ss,_s];ba.prototype.g=Ds([0,Jo,ma,[0,Jo],ta,sa,Ta,ka]);var Sa=class extends fi{constructor(t){super(t)}},La=Os(456383383,Sa);so[456383383]=[0,Jo,Vo];var xa=class extends fi{constructor(t){super(t)}},Ra=Os(476348187,xa);so[476348187]=[0,Jo,Ko];var Ia=class extends fi{constructor(t){super(t)}},Fa=class extends fi{constructor(t){super(t)}},Ca=[0,Is,-1],Na=Os(458105876,class extends fi{constructor(t){super(t)}g(){var t=this.A,e=0|t[rt],r=ut(this,e);return t=function(t,e,r,n){var i=Fa;!n&&tr(t)&&(r=0|(e=t.A)[rt]);var s=ar(e,2);if(t=!1,null==s){if(n)return Ne();s=[]}else if(s.constructor===Ie){if(!(2&s.K)||n)return s;s=s.ea()}else Array.isArray(s)?t=!!(2&s[rt]):s=[];if(n){if(!s.length)return Ne();t||(t=!0,ot(s))}else t&&(t=!1,at(s),s=_r(s));return!t&&32&r&&it(s,32),r=ur(e,r,2,n=new Ie(s,i,Ae,void 0)),t||rr(e,r),n}(this,t,e,r),!r&&Fa&&(t.Ea=!0),t}});so[458105876]=[0,Ca,Hi,[!0,cs,[0,ws,-1,Es]],[0,ms,_s,Is],_s];var Oa=class extends fi{constructor(t){super(t)}},Ma=Os(458105758,Oa);so[458105758]=[0,Jo,ws,Ca];var Pa=class extends fi{constructor(t){super(t)}},Da=class extends fi{constructor(t){super(t)}},$a=class extends fi{constructor(t){super(t)}},Ua=Ps([0,bs,[0,Fs,bs,[0,hs,-1],ys]]),Ba=class extends fi{constructor(t){super(t)}},Ga=[0,hs,-1,ys],ja=class extends fi{constructor(t){super(t)}},Va=class extends fi{constructor(t){super(t)}},Ha=[1,2];Va.prototype.g=Ds([0,Ha,Ts,Ga,Ts,[0,bs,Ga]]);var Ka=class extends fi{constructor(t){super(t)}},Xa=Os(443442058,Ka);so[443442058]=[0,Jo,ws,ps,ss,Es,-1,_s,ss],so[514774813]=Ta;var Wa=class extends fi{constructor(t){super(t)}},Ya=Os(516587230,Wa);function za(t,e){return e=e?e.clone():new jo,void 0!==t.displayNamesLocale?hr(e,1,_e(t.displayNamesLocale)):void 0===t.displayNamesLocale&&hr(e,1),void 0!==t.maxResults?Br(e,2,t.maxResults):"maxResults"in t&&hr(e,2),void 0!==t.scoreThreshold?Vr(e,3,t.scoreThreshold):"scoreThreshold"in t&&hr(e,3),void 0!==t.categoryAllowlist?Xr(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&hr(e,4),void 0!==t.categoryDenylist?Xr(e,5,t.categoryDenylist):"categoryDenylist"in t&&hr(e,5),e}function qa(t){var e=Number(t);return Number.isSafeInteger(e)?e:String(t)}function Ja(t,e=-1,r=""){return{categories:t.map(t=>({index:Pr(t,1)??0??-1,score:Dr(t,2)??0,categoryName:ye(or(t,3))??""??"",displayName:ye(or(t,4))??""??""})),headIndex:e,headName:r}}function Za(t){var e={classifications:Rr(t,Mo,1).map(t=>Ja(Lr(t,Ao,4)?.g()??[],Pr(t,2)??0,ye(or(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(bt(t)?t=Number(t):(t=Kt(64,t),t=bt(t)?Number(t):String(t)),t):ee(t)?"number"==typeof t?he(t):le(t):void 0}(or(t,2,void 0,pe))&&(e.timestampMs=qa(or(t,2,void 0,pe)??ir)),e}function Qa(t){var e=dr(t,3,Zt,lr()),r=dr(t,2,ne,lr()),n=dr(t,1,ye,lr()),i=dr(t,9,ye,lr()),s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:r[t]??-1,categoryName:n[t]??"",displayName:i[t]??""});if((e=Lr(t,So,4)?.l())&&(s.boundingBox={originX:Pr(e,1,sr)??0,originY:Pr(e,2,sr)??0,width:Pr(e,3,sr)??0,height:Pr(e,4,sr)??0,angle:0}),Lr(t,So,4)?.g().length)for(let e of Lr(t,So,4).g())s.keypoints.push({x:or(e,1,sr,Zt)??0,y:or(e,2,sr,Zt)??0,score:or(e,4,sr,Zt)??0,label:ye(or(e,3,sr))??""});return s}function th(t){var e=[];for(let r of Rr(t,Io,1))e.push({x:Dr(r,1)??0,y:Dr(r,2)??0,z:Dr(r,3)??0,visibility:Dr(r,4)??0});return e}function eh(t){var e=[];for(let r of Rr(t,xo,1))e.push({x:Dr(r,1)??0,y:Dr(r,2)??0,z:Dr(r,3)??0,visibility:Dr(r,4)??0});return e}function rh(t){return Array.from(t,t=>t>127?t-256:t)}function nh(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);var r=0,n=0,i=0;for(let s=0;s<t.length;s++)r+=t[s]*e[s],n+=t[s]*t[s],i+=e[s]*e[s];if(n<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*i)}so[516587230]=[0,Jo,Ta,ka,ss],so[518928384]=ka;var ih,sh=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 oh(t){if(t)return!0;if(void 0===ih)try{await WebAssembly.instantiate(sh),ih=!0}catch{ih=!1}return ih}async function ah(t,e,r){return{wasmLoaderPath:`${e}/${t}_${r=`wasm${r?"_module":""}${await oh(r)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${e}/${t}_${r}.wasm`}}var hh=class{};function uh(t){return hr(new ch,1,re(t))}hh.forVisionTasks=function(t,e=!1){return ah("vision",t??Ws``,e)},hh.forTextTasks=function(t,e=!1){return ah("text",t??Ws``,e)},hh.forGenAiTasks=function(t,e=!1){return ah("genai",t??Ws``,e)},hh.forAudioTasks=function(t,e=!1){return ah("audio",t??Ws``,e)},hh.isSimdSupported=function(t=!1){return oh(t)};var ch=class extends fi{constructor(t){super(t)}},lh=class extends fi{constructor(t){super(t)}},dh=[0,Is,2,fs,-2,cs,bs,[0,Is,cs]],fh=class extends fi{constructor(t){super(t)}},ph=class extends fi{constructor(t){super(t)}};function gh(t,e){return hr(t,1,re(e))}function mh(t,e){return hr(t,2,re(e))}var vh=class extends fi{constructor(t){super(t)}},_h=[3,4,5,6,7],yh=class extends fi{constructor(t){super(t)}},Eh=class extends fi{constructor(t){super(t)}};Eh.prototype.g=Ds([0,[0,Is,ws,-3,Is],[0,_h,Is,-1,Ts,[0,Is,ws,fs],Ts,dh,Ts,[0,1,dh],Ts,[0,Is],Ts,[0,Is,ws,fs]]]);var Ah=class{constructor(){this.g="undefined"!=typeof AbortController}async send(t,e,r){var n=this.g?new AbortController:void 0,i=n&&t.la>0?setTimeout(()=>{n.abort()},t.la):void 0;try{let i=await fetch(t.url,{method:t.ab,headers:{...t.Za},...t.body&&{body:t.body},...t.withCredentials&&{credentials:"include"},signal:t.la&&n?n.signal:null});200===i.status?e?.(await i.text()):r?.(i.status)}catch(t){if("AbortError"===t?.name)r?.(408);else r?.(400)}finally{clearTimeout(i)}}},wh=class extends fi{constructor(t){super(t,37)}},bh=[-4,{},Vs,Is,Us],Th=[0,ws,Is,1,ws,-1,Is,1,Is,1,cs],kh=[0,Is,ws,-2],Sh=[0,ws,Is],Lh=[0,ws,Is],xh=[0,_s,-3],Rh=[0,Is,ws,-1,cs,ps,-1,ws,-5,bs,[0,ws,-4],-1,_s,[0,_s,-3],Is];var Ih=class extends fi{constructor(t){super(t,19)}},Fh=Ps([-19,{},[0,Is,1,[0,ws,-6,cs,ps,ws,-1,cs],1,[0,ws,1,ws,-5],ws,-1,[0,Is,ws,-8],[0,ws,-3],[0,ws,Is,ws,-2],[0,ws,-1,Is,ws,-1,Is,ws,-1,[0,bs,[0,ws,-1],_s,ws,-5],[0,Is,_s,ps,-2]],cs,[0,ws,-3,cs,ps,ws,-1],[0,Is,ws,-1],[0,ws,-9],[0,ws,-6,Is,ws,1,ws,_s,Is,-1,_s,ws,-2,Is,ws,Is,ws,ps,-1],1,[0,Is],1,[0,ws,-4],1,Th,[0,[1,2,3,4,5,6],Ts,Th,Ts,Sh,Ts,Lh,Ts,[0,Is],Ts,Rh,Ts,kh],Sh,Lh,Rh,[0,[0,Is,ws,-1,cs,ps,-1,ws,-4,bs,[0,ws,-4],-1,1,xh],[0,Is,ws,-1,cs,ps,-1,ws,-4,xh]],kh,[0,ws,[0,ps,-3,Is],Is,-2,[0,ps,-1],_s],4,[0,ws,Is,ws,-1,cs,Is,ws,-1,Is,ps,-1]],Is,bs,[-37,{},us,ws,bs,[0,ws,-1],ks,1,ks,[0,Es,-1,gs,ls,-1],ws,[0,ps,ws,-1],_s,ps,cs,ws,-1,Cs,$s,us,ks,Is,gs,cs,-1,[0,Is,-1],ws,_s,ws,ms,ws,-1,is,1,is,bh,_s,[0,Is,[0,ss,ps,-2],[0,ss]],[0,Is,cs]],us,Ss,ws,-1,us,Is,-1,[0,_s,-1,Is,_s],[0,cs,-1,ws],[0,us,_s,cs],cs,1,Ls,1,bh]),Ch=class{constructor(t){this.h=[],this.m=new Ah,this.l=t??"",this.g=setInterval(()=>{this.flush()},6e4)}close(){void 0!==this.g&&(clearInterval(this.g),this.g=void 0),this.flush()}flush(t,e){if(this.error)e?.("net-send-failed");else if(0===this.h.length)t?.();else{var r=this.h;this.h=[],r=function(t){var e=new Ih;return Nr(e=hr(e,2,re(1786)),3,t)}(r),r=Fh(r),this.m.send({url:"https://odml.pa.googleapis.com/v1/log",ab:"POST",la:1e4,body:r,gb:2,Za:{"Content-Type":"application/x-protobuf","x-goog-api-key":this.l},withCredentials:!1},()=>{t?.()},t=>{this.error=Error(`Logging failed with HTTP error: ${t}`),this.h=[],void 0!==this.g&&(clearInterval(this.g),this.g=void 0),e?.("net-send-failed",t)})}}};class Nh{constructor(){this.Z=this.U=this.X=this.R=this.V=this.T=this.P=0}}function Oh(t,e){var r=new Eh;r=Fr(r,0,1,t.D),r=Fr(r,0,2,e),e=hr(e=new wh,6,lt(r=r.g(),!1)),(t=t.C).error||t.h.push(e)}function Mh(t,e){var r={P:e.P-t.l.P,T:e.T-t.l.T,V:e.V-t.l.V,R:e.R-t.l.R,X:e.X-t.l.X,U:e.U,Z:e.Z},n=mh(gh(new vh,t.j),1);r=Ph(t,r),Oh(t,n=Cr(n,4,_h,r)),t.l=e}function Ph(t,e){var r=new lh;return t=jr(t=Gr(t=hr(r,1,re(t.u)),7,e.R),5,e.U),t=jr(t,6,e.Z),e.V>0&&jr(t,4,e.X/e.V),0!==e.P&&(r=Gr(r=uh(3),2,e.P),Mr(t,8,ch,r)),0!==e.T&&(e=Gr(r=uh(4),2,e.T),Mr(t,8,ch,e)),t}var Dh=class{constructor(t,e,r){this.B=performance.now(),this.m=performance.now(),this.h=new Map,this.o=0,this.g=new Nh,this.l=new Nh,this.C=new Ch(r),this.j=function(t){switch(t){case"AudioClassifier":return 4;case"AudioEmbedder":return 5;case"TextClassifier":return 6;case"TextEmbedder":return 7;case"GestureRecognizer":return 8;case"HandDetector":return 9;case"HandLandmarker":return 10;case"ImageClassifier":return 11;case"ImageEmbedder":return 12;case"ImageSegmenter":return 13;case"ObjectDetector":return 14;case"FaceDetector":return 15;case"FaceLandmarker":return 16;case"InteractiveSegmenter":case"InteractiveSegmenterLegacy":return 18;case"HolisticLandmarker":return 20;case"LlmInference":return 21;case"LanguageDetector":return 22;case"PoseLandmarker":return 23;default:return 0}}(t),this.u=function(t){switch(t){case"IMAGE":return 11;case"VIDEO":return 12;case"LIVE_STREAM":return 13;case"AUDIO_CLIPS":return 14;case"AUDIO_STREAM":return 15;default:return 10}}(e),t=new yh,"undefined"==typeof window?e=0:(e=navigator.userAgent,e=/Android/i.test(e)?1:/iPhone|iPad|iPod/i.test(e)?2:/Windows/i.test(e)?5:/Macintosh/i.test(e)?4:/Linux/i.test(e)?3:0),t=hr(t,1,re(e)),t=hr(t,2,_e("")),t=hr(t,3,_e("")),t=hr(t,4,_e("1.0.1")),t=hr(t,5,_e("")),this.D=hr(t,6,re(4))}xa(){var t=new ph;t=jr(t=hr(t,1,re(this.u)),3,performance.now()-this.B),Oh(this,t=Cr(mh(gh(new vh,this.j),0),3,_h,t)),this.m=performance.now()}ya(t){var e=this.h.get(t);if(void 0!==e&&(this.h.delete(t),t=performance.now()-e,++this.g.V,this.g.X+=t,this.g.U=Math.max(this.g.U,t),this.o=Math.max(this.o,t),performance.now()>this.m+3e4)){for(let[r,n]of this.h.entries())t=r,n<e&&(this.g.R++,this.h.delete(t));e={...this.g,Z:performance.now()-this.m},this.g.U=0,this.m=performance.now(),Mh(this,e)}}wa(){var t={...this.g,R:this.g.R+this.h.size,U:this.o,Z:performance.now()-this.B};Mh(this,t);var e=new fh;e=Fr(e,0,2,t=Ph(this,t)),Oh(this,e=Cr(t=mh(gh(new vh,this.j),2),5,_h,e))}close(){var t=this.C;"function"==typeof t.close?t.close():t.flush()}};function $h(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Uh(t){if("function"!=typeof importScripts){let e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((t,r)=>{e.addEventListener("load",()=>{t()},!1),e.addEventListener("error",t=>{r(t)},!1),document.body.appendChild(e)})}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;{let e=self.import;e?await e(t.toString()):await import(t.toString())}}}function Bh(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function Gh(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function jh(t,e,r){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(r?t.i._bindTextureToStream(r):t.i._bindTextureToCanvas(),!(r=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`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);var[n,i]=Bh(e);return!t.l||n===t.i.canvas.width&&i===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=i),[n,i]}function Vh(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(e.length);for(let r=0;r<e.length;r++)n[r]=t.i.stringToNewUTF8(e[r]);e=t.i._malloc(4*n.length),t.i.HEAPU32.set(n,e>>2),r(e);for(let e of n)t.i._free(e);t.i._free(e)}function Hh(t,e,r){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=r}function Kh(t,e,r){var n=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(r(n,i),n=[]):n.push(t)}}var Xh=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:$h()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){var 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){var r=t.length,n=this.i._malloc(r);this.i.HEAPU8.set(t,n),e?this.i._changeBinaryGraph(r,n):this.i._changeTextGraph(r,n),this.i._free(n)}configureAudio(t,e,r,n,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Gh(this,n||"input_audio",n=>{Gh(this,i=i||"audio_header",i=>{this.i._configureAudio(n,i,t,e??0,r)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ja(t){Hh(this,"__graph_config__",e=>{t(e)}),Gh(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,r){this.addAudioToStreamWithShape(t,0,0,e,r)}addAudioToStreamWithShape(t,e,r,n,i){var 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),Gh(this,n,t=>{this.i._addAudioToInputStream(this.g,e,r,t,i)})}addGpuBufferToStream(t,e,r){Gh(this,e,e=>{var[n,i]=jh(this,t,e);this.i._addBoundTextureToStream(e,n,i,r)})}addBoolToStream(t,e,r){Gh(this,e,e=>{this.i._addBoolToInputStream(t,e,r)})}addDoubleToStream(t,e,r){Gh(this,e,e=>{this.i._addDoubleToInputStream(t,e,r)})}addFloatToStream(t,e,r){Gh(this,e,e=>{this.i._addFloatToInputStream(t,e,r)})}addIntToStream(t,e,r){Gh(this,e,e=>{this.i._addIntToInputStream(t,e,r)})}addUintToStream(t,e,r){Gh(this,e,e=>{this.i._addUintToInputStream(t,e,r)})}addStringToStream(t,e,r){Gh(this,e,e=>{Gh(this,t,t=>{this.i._addStringToInputStream(t,e,r)})})}addStringRecordToStream(t,e,r){Gh(this,e,e=>{Vh(this,Object.keys(t),n=>{Vh(this,Object.values(t),i=>{this.i._addFlatHashMapToInputStream(n,i,Object.keys(t).length,e,r)})})})}addProtoToStream(t,e,r,n){Gh(this,r,r=>{Gh(this,e,e=>{var i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,r,n),this.i._free(i)})})}addEmptyPacketToStream(t,e){Gh(this,t,t=>{this.i._addEmptyPacketToInputStream(t,e)})}addBoolVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputStream(n,e,r)})}addDoubleVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputStream(n,e,r)})}addFloatVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputStream(n,e,r)})}addIntVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputStream(n,e,r)})}addUintVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.i._addUintVectorEntry(n,e);this.i._addUintVectorToInputStream(n,e,r)})}addStringVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let e of t)Gh(this,e,t=>{this.i._addStringVectorEntry(n,t)});this.i._addStringVectorToInputStream(n,e,r)})}addBoolToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addBoolToInputSidePacket(t,e)})}addDoubleToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addDoubleToInputSidePacket(t,e)})}addFloatToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addFloatToInputSidePacket(t,e)})}addIntToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addIntToInputSidePacket(t,e)})}addUintToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addUintToInputSidePacket(t,e)})}addStringToInputSidePacket(t,e){Gh(this,e,e=>{Gh(this,t,t=>{this.i._addStringToInputSidePacket(t,e)})})}addProtoToInputSidePacket(t,e,r){Gh(this,r,r=>{Gh(this,e,e=>{var n=this.i._malloc(t.length);this.i.HEAPU8.set(t,n),this.i._addProtoToInputSidePacket(n,t.length,e,r),this.i._free(n)})})}addBoolVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.i._addBoolVectorEntry(r,e);this.i._addBoolVectorToInputSidePacket(r,e)})}addDoubleVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.i._addDoubleVectorEntry(r,e);this.i._addDoubleVectorToInputSidePacket(r,e)})}addFloatVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.i._addFloatVectorEntry(r,e);this.i._addFloatVectorToInputSidePacket(r,e)})}addIntVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.i._addIntVectorEntry(r,e);this.i._addIntVectorToInputSidePacket(r,e)})}addUintVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.i._addUintVectorEntry(r,e);this.i._addUintVectorToInputSidePacket(r,e)})}addStringVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(let e of t)Gh(this,e,t=>{this.i._addStringVectorEntry(r,t)});this.i._addStringVectorToInputSidePacket(r,e)})}attachBoolListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachBoolListener(t)})}attachBoolVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachBoolVectorListener(t)})}attachIntListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachIntListener(t)})}attachIntVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachIntVectorListener(t)})}attachUintListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachUintListener(t)})}attachUintVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachUintVectorListener(t)})}attachDoubleListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachDoubleListener(t)})}attachDoubleVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachDoubleVectorListener(t)})}attachFloatListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachFloatListener(t)})}attachFloatVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachFloatVectorListener(t)})}attachStringListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachStringListener(t)})}attachStringVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachStringVectorListener(t)})}attachProtoListener(t,e,r){Hh(this,t,e),Gh(this,t,t=>{this.i._attachProtoListener(t,r||!1)})}attachProtoVectorListener(t,e,r){Kh(this,t,e),Gh(this,t,t=>{this.i._attachProtoVectorListener(t,r||!1)})}attachAudioListener(t,e,r){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Hh(this,t,(t,r)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,r)}),Gh(this,t,t=>{this.i._attachAudioListener(t,r||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}};function Wh(t){return class extends t{get pa(){return this.i}Ra(){if("function"==typeof this.pa._mediapipeLoggerGetEncodedApiKey){let t=this.pa._mediapipeLoggerGetEncodedApiKey();return this.pa._decodeBase64(t)}}}}function Yh(t){return class extends t{Ya(){this.i._registerModelResourcesGraphService()}}}var zh=Wh(Yh(Xh)),qh=class extends zh{};async function Jh(t,e,r,n){return e=await(async(t,e,r,n,i)=>{if(e&&await Uh(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await Uh(r),!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,n)})(t,r.wasmLoaderPath,r.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&t.endsWith(".data")?r.assetBinaryPath.toString():t}),function(t,e,r){r=r.runningMode??"";var n=t.g.Ra();t.m=new Dh(e,r,n)}(e,t.name,n),await e.v(n),e}async function Zh(t,e,r,n){return Jh(t,e,r,n)}function Qh(t,e){var r=Lr(t.baseOptions,Yo,1)||new Yo;"string"==typeof e?(hr(r,2,_e(e)),hr(r,1)):e instanceof Uint8Array&&(hr(r,1,lt(e,!1)),hr(r,2)),Fr(t.baseOptions,0,1,r)}function tu(t){try{let e=t.I.length;if(1===e)throw Error(t.I[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.I.map(t=>t.message).join(", "))}finally{t.I=[]}}function eu(t,e){t.D=Math.max(t.D,e)}function ru(t,e){t.C=new uo,Kr(t.C,2,"PassThroughCalculator"),ao(t.C,"free_memory"),ho(t.C,"free_memory_unused_out"),go(e,"free_memory"),po(e,t.C)}function nu(t,e){ao(t.C,e),ho(t.C,e+"_unused_out")}function iu(t){t.g.addBoolToStream(!0,"free_memory",t.D)}var su=class{constructor(t){this.g=t,this.I=[],this.D=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){let e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Lr(this.baseOptions,Yo,1)?.g()||Lr(this.baseOptions,Yo,1)?.l()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){var r=Lr(t.baseOptions,Xo,3);if(!r){var n=r=new Xo,i=new to;Cr(n,4,Wo,i)}"delegate"in e&&("GPU"===e.delegate?(e=r,n=new qs,Cr(e,2,Wo,n)):(e=r,n=new to,Cr(e,4,Wo,n))),Fr(t.baseOptions,0,3,r)}(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),Qh(this,"/model.dat"),this.o(),this.J()});if(e.modelAssetBuffer instanceof Uint8Array)Qh(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){for(var e=[],r=0;;){let{done:n,value:i}=await t.read();if(n)break;e.push(i),r+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(r),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(e.modelAssetBuffer).then(t=>{Qh(this,t),this.o(),this.J()})}return this.o(),this.J(),Promise.resolve()}J(){}ja(){var t;if(this.g.ja(e=>{t=yo(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.Ya(),this.g.setGraph(t,e),this.m?.xa(),this.C=void 0,tu(this)}finishProcessing(t){this.g.finishProcessing(),tu(this),this.m&&void 0!==t&&this.m.ya(t)}close(){this.C=void 0,this.m?.wa(),this.m?.close(),this.g.closeGraph()}};function ou(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}su.prototype.close=su.prototype.close;class au{constructor(t,e,r,n){this.g=t,this.h=e,this.m=r,this.l=n}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function hu(t,e,r){var n=t.g;if(r=ou(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,e),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(t.h,r),r}function uu(t,e){var r=t.g,n=ou(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);var i=ou(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,i),r.enableVertexAttribArray(t.M),r.vertexAttribPointer(t.M,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);var s=ou(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(t.F),r.vertexAttribPointer(t.F,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindVertexArray(null),new au(r,n,i,s)}function cu(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function lu(t,e,r,n){return cu(t,e),t.h||(t.m(),t.I()),r?(t.C||(t.C=uu(t,!0)),r=t.C):(t.u||(t.u=uu(t,!1)),r=t.u),e.useProgram(t.h),r.bind(),t.l(),t=n(),r.g.bindVertexArray(null),t}function du(t,e,r){return cu(t,e),t=ou(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,r??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function fu(t,e,r){cu(t,e),t.j||(t.j=ou(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.j),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}function pu(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var gu=class{D(){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(){var t=this.g;if(this.h=ou(t.createProgram(),"Failed to create WebGL program"),this.da=hu(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.ca=hu(this,this.D(),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.M=t.getAttribLocation(this.h,"aVertex"),this.F=t.getAttribLocation(this.h,"aTex")}I(){}l(){}close(){if(this.h){let t=this.g;t.deleteProgram(this.h),t.deleteShader(this.da),t.deleteShader(this.ca)}this.j&&this.g.deleteFramebuffer(this.j),this.u&&this.u.close(),this.C&&this.C.close()}};var mu=class extends gu{D(){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 "}I(){var t=this.g;t.activeTexture(t.TEXTURE1),this.B=du(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.o=du(this,t,t.NEAREST)}m(){super.m();var t=this.g;this.O=ou(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.Y=ou(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.N=ou(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();var t=this.g;t.uniform1i(this.N,0),t.uniform1i(this.O,1),t.uniform1i(this.Y,2)}close(){this.B&&this.g.deleteTexture(this.B),this.o&&this.g.deleteTexture(this.o),super.close()}},vu=class extends gu{D(){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 "}I(){var t=this.g;t.activeTexture(t.TEXTURE1),this.o=du(this,t),t.activeTexture(t.TEXTURE2),this.B=du(this,t)}m(){super.m();var t=this.g;this.N=ou(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.O=ou(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.J=ou(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();var t=this.g;t.uniform1i(this.J,0),t.uniform1i(this.N,1),t.uniform1i(this.O,2)}close(){this.o&&this.g.deleteTexture(this.o),this.B&&this.g.deleteTexture(this.B),super.close()}};function _u(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 yu(t){var e=_u(t,1);if(!e){if(e=_u(t,0))e=new Float32Array(e).map(t=>t/255);else{e=new Float32Array(t.width*t.height);let n=Au(t);var r=bu(t);if(fu(r,n,Eu(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){r=new Float32Array(t.width*t.height*4),n.readPixels(0,0,t.width,t.height,n.RGBA,n.FLOAT,r);for(let t=0,n=0;t<e.length;++t,n+=4)e[t]=r[n]}else n.readPixels(0,0,t.width,t.height,n.RED,n.FLOAT,e)}t.g.push(e)}return e}function Eu(t){var e=_u(t,2);if(!e){let r=Au(t);e=Tu(t);let n=yu(t),i=wu(t);r.texImage2D(r.TEXTURE_2D,0,i,t.width,t.height,0,r.RED,r.FLOAT,n),ku(t)}return e}function Au(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=ou(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function wu(t){if(t=Au(t),!Su)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))Su=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Su=t.R16F}return Su}function bu(t){return t.l||(t.l=new gu),t.l}function Tu(t){var e=Au(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=_u(t,2);return r||(r=du(bu(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(r),t.o=!0),e.bindTexture(e.TEXTURE_2D,r),r}function ku(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var Su,Lu=class{constructor(t,e,r,n,i,s,o){this.g=t,this.m=e,this.o=r,this.canvas=n,this.l=i,this.width=s,this.height=o,this.o&&(0===--xu&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}Ta(){return!!_u(this,0)}ta(){return!!_u(this,1)}W(){return!!_u(this,2)}sa(){return(e=_u(t=this,0))||(e=yu(t),e=new Uint8Array(e.map(t=>Math.round(255*t))),t.g.push(e)),e;var t,e}ra(){return yu(this)}S(){return Eu(this)}clone(){var t=[];for(let e of this.g){let r;if(e instanceof Uint8Array)r=new Uint8Array(e);else if(e instanceof Float32Array)r=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{let t=Au(this),e=bu(this);t.activeTexture(t.TEXTURE1),r=du(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,r);let n=wu(this);t.texImage2D(t.TEXTURE_2D,0,n,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),fu(e,t,r),lu(e,t,!1,()=>{Tu(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),ku(this)}),pu(e),ku(this)}}t.push(r)}return new Lu(t,this.m,this.W(),this.canvas,this.l,this.width,this.height)}close(){this.o&&Au(this).deleteTexture(_u(this,2)),xu=-1}};Lu.prototype.close=Lu.prototype.close,Lu.prototype.clone=Lu.prototype.clone,Lu.prototype.getAsWebGLTexture=Lu.prototype.S,Lu.prototype.getAsFloat32Array=Lu.prototype.ra,Lu.prototype.getAsUint8Array=Lu.prototype.sa,Lu.prototype.hasWebGLTexture=Lu.prototype.W,Lu.prototype.hasFloat32Array=Lu.prototype.ta,Lu.prototype.hasUint8Array=Lu.prototype.Ta;var xu=250,Ru={color:"white",lineWidth:4,radius:6};function Iu(t){return{...Ru,fillColor:(t=t||{}).color,...t}}function Fu(t,e){return t instanceof Function?t(e):t}function Cu(t,e,r){return Math.max(Math.min(e,r),Math.min(Math.max(e,r),t))}function Nu(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Ou(t){if(!t.o)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.o}function Mu(t,e,r){if(e.W())r(e.S());else{let n=e.ta()?e.ra():e.sa();t.m=t.m??new gu;let i=Ou(t);r((t=new Lu([n],e.m,!1,i.canvas,t.m,e.width,e.height)).S()),t.close()}}function Pu(t,e,r,n){var i=function(t){return t.g||(t.g=new mu),t.g}(t),s=Ou(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;lu(i,s,!0,()=>{!function(t,e,r,n){var 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,r),t.J&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(let[r,n]of t){t=r;let i=n,s=e.next();if(s.done)return!1;let[o,a]=s.value;if(t!==o||i[0]!==a[0]||i[1]!==a[1]||i[2]!==a[2]||i[3]!==a[3])return!1}return!!e.next().done}(t.J,n))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.o);else{t.J=n;let e=Array(1024).fill(0);n.forEach((t,r)=>{if(4!==t.length)throw Error(`Color at index ${r} is not a four-channel value.`);e[4*r]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]}),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.o),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,n),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);var 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 Du(t,e,r,n){var i=Ou(t),s=function(t){return t.h||(t.h=new vu),t.h}(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r,a=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;lu(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.o),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 $u=class{constructor(t,e){"undefined"!=typeof CanvasRenderingContext2D&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.o=e):this.o=t}La(t,e){if(t){var r=Nu(this);e=Iu(e),r.save();var n=r.canvas,i=0;for(let s of t)r.fillStyle=Fu(e.fillColor,{index:i,from:s}),r.strokeStyle=Fu(e.color,{index:i,from:s}),r.lineWidth=Fu(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*n.width,s.y*n.height,Fu(e.radius,{index:i,from:s}),0,2*Math.PI),r.fill(t),r.stroke(t),++i;r.restore()}}Ka(t,e,r){if(t&&e){var n=Nu(this);r=Iu(r),n.save();var i=n.canvas,s=0;for(let o of e){n.beginPath(),e=t[o.start];let a=t[o.end];e&&a&&(n.strokeStyle=Fu(r.color,{index:s,from:e,to:a}),n.lineWidth=Fu(r.lineWidth,{index:s,from:e,to:a}),n.moveTo(e.x*i.width,e.y*i.height),n.lineTo(a.x*i.width,a.y*i.height)),++s,n.stroke()}n.restore()}}Ha(t,e){var r=Nu(this);e=Iu(e),r.save(),r.beginPath(),r.lineWidth=Fu(e.lineWidth,{}),r.strokeStyle=Fu(e.color,{}),r.fillStyle=Fu(e.fillColor,{}),r.moveTo(t.originX,t.originY),r.lineTo(t.originX+t.width,t.originY),r.lineTo(t.originX+t.width,t.originY+t.height),r.lineTo(t.originX,t.originY+t.height),r.lineTo(t.originX,t.originY),r.stroke(),r.fill(),r.restore()}Ia(t,e,r=[0,0,0,255]){this.l?function(t,e,r,n){var i=Ou(t);Mu(t,e,e=>{Pu(t,e,r,n),(e=Nu(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,r,e):Pu(this,t.S(),r,e)}Ja(t,e,r){this.l?function(t,e,r,n){var i=Ou(t);Mu(t,e,e=>{Du(t,e,r,n),(e=Nu(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,e,r):Du(this,t.S(),e,r)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function Uu(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 Bu(t){var e=Uu(t,0);if(!e){e=ju(t);let r=Vu(t),n=new Uint8Array(t.width*t.height*4);fu(r,e,Gu(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,n),pu(r),e=new ImageData(new Uint8ClampedArray(n.buffer),t.width,t.height),t.g.push(e)}return e}function Gu(t){var e=Uu(t,2);if(!e){let r=ju(t);e=Hu(t);let n=Uu(t,1)||Bu(t);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),Ku(t)}return e}function ju(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=ou(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Vu(t){return t.l||(t.l=new gu),t.l}function Hu(t){var e=ju(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=Uu(t,2);return r||(r=du(Vu(t),e),t.g.push(r),t.m=!0),e.bindTexture(e.TEXTURE_2D,r),r}function Ku(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function Xu(t){var e=ju(t);return lu(Vu(t),e,!0,()=>function(t,e){var r=t.canvas;if(r.width===t.width&&r.height===t.height)return e();var n=r.width,i=r.height;return r.width=t.width,r.height=t.height,t=e(),r.width=n,r.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()}))}$u.prototype.close=$u.prototype.close,$u.prototype.drawConfidenceMask=$u.prototype.Ja,$u.prototype.drawCategoryMask=$u.prototype.Ia,$u.prototype.drawBoundingBox=$u.prototype.Ha,$u.prototype.drawConnectors=$u.prototype.Ka,$u.prototype.drawLandmarks=$u.prototype.La,$u.lerp=function(t,e,r,n,i){return Cu(n*(1-(t-e)/(r-e))+i*(1-(r-t)/(r-e)),n,i)},$u.clamp=Cu;var Wu=class{constructor(t,e,r,n,i,s,o){this.g=t,this.o=e,this.m=r,this.canvas=n,this.l=i,this.width=s,this.height=o,(this.o||this.m)&&(0===--Yu&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}Sa(){return!!Uu(this,0)}ua(){return!!Uu(this,1)}W(){return!!Uu(this,2)}Pa(){return Bu(this)}Oa(){var t=Uu(this,1);return t||(Gu(this),Hu(this),t=Xu(this),Ku(this),this.g.push(t),this.o=!0),t}S(){return Gu(this)}clone(){var t=[];for(let e of this.g){let r;if(e instanceof ImageData)r=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){let t=ju(this),e=Vu(this);t.activeTexture(t.TEXTURE1),r=du(e,t),t.bindTexture(t.TEXTURE_2D,r),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),fu(e,t,r),lu(e,t,!1,()=>{Hu(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Ku(this)}),pu(e),Ku(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Gu(this),Hu(this),r=Xu(this),Ku(this)}t.push(r)}return new Wu(t,this.ua(),this.W(),this.canvas,this.l,this.width,this.height)}close(){this.o&&Uu(this,1).close(),this.m&&ju(this).deleteTexture(Uu(this,2)),Yu=-1}};Wu.prototype.close=Wu.prototype.close,Wu.prototype.clone=Wu.prototype.clone,Wu.prototype.getAsWebGLTexture=Wu.prototype.S,Wu.prototype.getAsImageBitmap=Wu.prototype.Oa,Wu.prototype.getAsImageData=Wu.prototype.Pa,Wu.prototype.hasWebGLTexture=Wu.prototype.W,Wu.prototype.hasImageBitmap=Wu.prototype.ua,Wu.prototype.hasImageData=Wu.prototype.Sa;var Yu=250;function zu(...t){return t.map(([t,e])=>({start:t,end:e}))}var qu,Ju=Yh((qu=Wh(Xh),class extends qu{get oa(){return this.i}Ca(t,e,r){Gh(this,e,e=>{var[n,i]=jh(this,t,e);this.oa._addBoundTextureAsImageToStream(e,n,i,r)})}ga(t,e){Hh(this,t,e),Gh(this,t,t=>{this.oa._attachImageListener(t)})}ha(t,e){Kh(this,t,e),Gh(this,t,t=>{this.oa._attachImageVectorListener(t)})}})),Zu=class extends Ju{};async function Qu(t,e,r){return Zh(t,r.canvas??($h()?void 0:document.createElement("canvas")),e,r)}function tc(t,e,r,n){if(t.m&&void 0!==n)if(Lr(t.baseOptions,Xo,3)?.g()){var i=t.m;++i.g.T,i.h.set(n,performance.now())}else++(i=t.m).g.P,i.h.set(n,performance.now());if(t.da){if(i=new Oo,r?.regionOfInterest){if(!t.Ba)throw Error("This task doesn't support region-of-interest.");var s=r.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(s.left<0||s.top<0||s.right>1||s.bottom>1)throw Error("Expected RectF values to be in [0,1].");Vr(i,1,(s.left+s.right)/2),Vr(i,2,(s.top+s.bottom)/2),Vr(i,4,s.right-s.left),Vr(i,3,s.bottom-s.top)}else Vr(i,1,.5),Vr(i,2,.5),Vr(i,4,1),Vr(i,3,1);if(r?.rotationDegrees){if(r?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(Vr(i,5,-Math.PI*r.rotationDegrees/180),r?.rotationDegrees%180!=0){let[t,n]=Bh(e);r=Dr(i,3)*n/t,s=Dr(i,4)*t/n,Vr(i,4,r),Vr(i,3,s)}}t.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",t.da,n)}t.g.Ca(e,t.Aa,n??performance.now()),t.finishProcessing(n)}function ec(t,e,r){if(t.M)throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");tc(t,e,r,t.D+1)}function rc(t,e,r,n){if(!t.M)throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");tc(t,e,r,n)}function nc(t,e,r,n){var i=e.data,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 Lu([i],r,!1,t.g.i.canvas,t.ca,s,e),n?t.clone():t}var ic=class extends su{constructor(t,e,r,n){super(t),this.g=t,this.Aa=e,this.da=r,this.Ba=n,this.ca=new gu,this.M=!1}l(t,e=!0){if("runningMode"in t){var r=this.M=!!t.runningMode&&"IMAGE"!==t.runningMode;hr(this.baseOptions,2,null==r?r:Qt(r))}if(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.ca.close(),super.close()}};ic.prototype.close=ic.prototype.close;var sc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},Fr(t=this.h=new Qo,0,1,e=new zo),Vr(this.h,2,.5),Vr(this.h,3,.3)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"minDetectionConfidence"in t&&Vr(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&Vr(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}G(t,e){return this.j={detections:[]},ec(this,t,e),this.j}H(t,e,r){return this.j={detections:[]},rc(this,t,r,e),this.j}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect_in"),mo(t,"detections");var e=new io;di(e,ea,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect_in"),ho(r,"DETECTIONS:detections"),r.v(e),po(t,r),this.g.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=Lo(e),this.j.detections.push(Qa(t));eu(this,e)}),this.g.attachEmptyPacketListener("detections",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};sc.prototype.detectForVideo=sc.prototype.H,sc.prototype.detect=sc.prototype.G,sc.prototype.setOptions=sc.prototype.v,sc.createFromModelPath=async function(t,e){return Qu(sc,t,{baseOptions:{modelAssetPath:e}})},sc.createFromModelBuffer=function(t,e){return Qu(sc,t,{baseOptions:{modelAssetBuffer:e}})},sc.createFromOptions=function(t,e){return Qu(sc,t,e)};var oc=zu([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]),ac=zu([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]),hc=zu([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),uc=zu([474,475],[475,476],[476,477],[477,474]),cc=zu([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]),lc=zu([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),dc=zu([469,470],[470,471],[471,472],[472,469]),fc=zu([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]),pc=[...oc,...ac,...hc,...cc,...lc,...fc],gc=zu([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 mc(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var vc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,Fr(t=this.h=new ia,0,1,e=new zo),this.B=new na,Fr(this.h,0,3,this.B),this.u=new Qo,Fr(this.h,0,2,this.u),Br(this.u,4,1),Vr(this.u,2,.5),Vr(this.B,2,.5),Vr(this.h,4,.5)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"numFaces"in t&&Br(this.u,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&Vr(this.u,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&Vr(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&Vr(this.B,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 mc(this),ec(this,t,e),this.j}H(t,e,r){return mc(this),rc(this,t,r,e),this.j}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"face_landmarks");var e=new io;di(e,oa,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"NORM_LANDMARKS:face_landmarks"),r.v(e),po(t,r),this.g.attachProtoVectorListener("face_landmarks",(t,e)=>{for(let e of t)t=Fo(e),this.j.faceLandmarks.push(th(t));eu(this,e)}),this.g.attachEmptyPacketListener("face_landmarks",t=>{eu(this,t)}),this.outputFaceBlendshapes&&(mo(t,"blendshapes"),ho(r,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(t,e)=>{if(this.outputFaceBlendshapes)for(let e of t)t=bo(e),this.j.faceBlendshapes.push(Ja(t.g()??[]));eu(this,e)}),this.g.attachEmptyPacketListener("blendshapes",t=>{eu(this,t)})),this.outputFacialTransformationMatrixes&&(mo(t,"face_geometry"),ho(r,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(t,e)=>{if(this.outputFacialTransformationMatrixes)for(let e of t)(t=Lr(t=ra(e),Co,2))&&this.j.facialTransformationMatrixes.push({rows:Pr(t,1)??0??0,columns:Pr(t,2)??0??0,data:dr(t,3,Zt,lr()).slice()??[]});eu(this,e)}),this.g.attachEmptyPacketListener("face_geometry",t=>{eu(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};vc.prototype.detectForVideo=vc.prototype.H,vc.prototype.detect=vc.prototype.G,vc.prototype.setOptions=vc.prototype.v,vc.createFromModelPath=function(t,e){return Qu(vc,t,{baseOptions:{modelAssetPath:e}})},vc.createFromModelBuffer=function(t,e){return Qu(vc,t,{baseOptions:{modelAssetBuffer:e}})},vc.createFromOptions=function(t,e){return Qu(vc,t,e)},vc.FACE_LANDMARKS_LIPS=oc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS",vc.FACE_LANDMARKS_LIPS),vc.FACE_LANDMARKS_LEFT_EYE=ac,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE",vc.FACE_LANDMARKS_LEFT_EYE),vc.FACE_LANDMARKS_LEFT_EYEBROW=hc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",vc.FACE_LANDMARKS_LEFT_EYEBROW),vc.FACE_LANDMARKS_LEFT_IRIS=uc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS",vc.FACE_LANDMARKS_LEFT_IRIS),vc.FACE_LANDMARKS_RIGHT_EYE=cc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE",vc.FACE_LANDMARKS_RIGHT_EYE),vc.FACE_LANDMARKS_RIGHT_EYEBROW=lc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",vc.FACE_LANDMARKS_RIGHT_EYEBROW),vc.FACE_LANDMARKS_RIGHT_IRIS=dc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS",vc.FACE_LANDMARKS_RIGHT_IRIS),vc.FACE_LANDMARKS_FACE_OVAL=fc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL",vc.FACE_LANDMARKS_FACE_OVAL),vc.FACE_LANDMARKS_CONTOURS=pc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS",vc.FACE_LANDMARKS_CONTOURS),vc.FACE_LANDMARKS_TESSELATION=gc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION",vc.FACE_LANDMARKS_TESSELATION);var _c=zu([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 yc(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Ec(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 Ac(t,e=!0){var r=[];for(let i of t){var n=bo(i);t=[];for(let r of n.g())n=e&&null!=Pr(r,1)?Pr(r,1)??0:-1,t.push({score:Dr(r,2)??0,index:n,categoryName:ye(or(r,3))??""??"",displayName:ye(or(r,4))??""??""});r.push(t)}return r}var wc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Fr(t=this.j=new fa,0,1,e=new zo),this.u=new da,Fr(this.j,0,2,this.u),this.F=new la,Fr(this.u,0,3,this.F),this.B=new ca,Fr(this.u,0,2,this.B),this.h=new ua,Fr(this.j,0,3,this.h),Vr(this.B,2,.5),Vr(this.u,4,.5),Vr(this.F,2,.5)}get baseOptions(){return Lr(this.j,zo,1)}set baseOptions(t){Fr(this.j,0,1,t)}v(t){if(Br(this.B,3,t.numHands??1),"minHandDetectionConfidence"in t&&Vr(this.B,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Vr(this.u,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Vr(this.F,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new aa,r=e,n=za(t.cannedGesturesClassifierOptions,Lr(this.h,aa,3)?.l());Fr(r,0,2,n),Fr(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&Lr(this.h,aa,3)?.g();return t.customGesturesClassifierOptions?(Fr(r=e=new aa,0,2,n=za(t.customGesturesClassifierOptions,Lr(this.h,aa,4)?.l())),Fr(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&Lr(this.h,aa,4)?.g(),this.l(t)}Wa(t,e){return yc(this),ec(this,t,e),Ec(this)}Xa(t,e,r){return yc(this),rc(this,t,r,e),Ec(this)}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"hand_gestures"),mo(t,"hand_landmarks"),mo(t,"world_hand_landmarks"),mo(t,"handedness");var e=new io;di(e,_a,this.j);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"HAND_GESTURES:hand_gestures"),ho(r,"LANDMARKS:hand_landmarks"),ho(r,"WORLD_LANDMARKS:world_hand_landmarks"),ho(r,"HANDEDNESS:handedness"),r.v(e),po(t,r),this.g.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t){t=Fo(e);let r=[];for(let e of Rr(t,Io,1))r.push({x:Dr(e,1)??0,y:Dr(e,2)??0,z:Dr(e,3)??0,visibility:Dr(e,4)??0});this.landmarks.push(r)}eu(this,e)}),this.g.attachEmptyPacketListener("hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t){t=Ro(e);let r=[];for(let e of Rr(t,xo,1))r.push({x:Dr(e,1)??0,y:Dr(e,2)??0,z:Dr(e,3)??0,visibility:Dr(e,4)??0});this.worldLandmarks.push(r)}eu(this,e)}),this.g.attachEmptyPacketListener("world_hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoVectorListener("hand_gestures",(t,e)=>{this.gestures.push(...Ac(t,!1)),eu(this,e)}),this.g.attachEmptyPacketListener("hand_gestures",t=>{eu(this,t)}),this.g.attachProtoVectorListener("handedness",(t,e)=>{this.handedness.push(...Ac(t)),eu(this,e)}),this.g.attachEmptyPacketListener("handedness",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function bc(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}wc.prototype.recognizeForVideo=wc.prototype.Xa,wc.prototype.recognize=wc.prototype.Wa,wc.prototype.setOptions=wc.prototype.v,wc.createFromModelPath=function(t,e){return Qu(wc,t,{baseOptions:{modelAssetPath:e}})},wc.createFromModelBuffer=function(t,e){return Qu(wc,t,{baseOptions:{modelAssetBuffer:e}})},wc.createFromOptions=function(t,e){return Qu(wc,t,e)},wc.HAND_CONNECTIONS=_c,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS",wc.HAND_CONNECTIONS);var Tc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Fr(t=this.h=new da,0,1,e=new zo),this.u=new la,Fr(this.h,0,3,this.u),this.j=new ca,Fr(this.h,0,2,this.j),Br(this.j,3,1),Vr(this.j,2,.5),Vr(this.u,2,.5),Vr(this.h,4,.5)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"numHands"in t&&Br(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&Vr(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Vr(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Vr(this.u,2,t.minHandPresenceConfidence??.5),this.l(t)}G(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],ec(this,t,e),bc(this)}H(t,e,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],rc(this,t,r,e),bc(this)}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"hand_landmarks"),mo(t,"world_hand_landmarks"),mo(t,"handedness");var e=new io;di(e,ya,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"LANDMARKS:hand_landmarks"),ho(r,"WORLD_LANDMARKS:world_hand_landmarks"),ho(r,"HANDEDNESS:handedness"),r.v(e),po(t,r),this.g.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t)t=Fo(e),this.landmarks.push(th(t));eu(this,e)}),this.g.attachEmptyPacketListener("hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t)t=Ro(e),this.worldLandmarks.push(eh(t));eu(this,e)}),this.g.attachEmptyPacketListener("world_hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoVectorListener("handedness",(t,e)=>{var r=this.handedness,n=r.push,i=[];for(let e of t){t=bo(e);let r=[];for(let e of t.g())r.push({score:Dr(e,2)??0,index:Pr(e,1)??0??-1,categoryName:ye(or(e,3))??""??"",displayName:ye(or(e,4))??""??""});i.push(r)}n.call(r,...i),eu(this,e)}),this.g.attachEmptyPacketListener("handedness",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Tc.prototype.detectForVideo=Tc.prototype.H,Tc.prototype.detect=Tc.prototype.G,Tc.prototype.setOptions=Tc.prototype.v,Tc.createFromModelPath=function(t,e){return Qu(Tc,t,{baseOptions:{modelAssetPath:e}})},Tc.createFromModelBuffer=function(t,e){return Qu(Tc,t,{baseOptions:{modelAssetBuffer:e}})},Tc.createFromOptions=function(t,e){return Qu(Tc,t,e)},Tc.HAND_CONNECTIONS=_c,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS",Tc.HAND_CONNECTIONS);var kc=zu([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function Sc(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Lc(t){try{if(!t.F)return t.h;t.F(t.h)}finally{iu(t)}}function xc(t,e){t=Fo(t),e.push(th(t))}var Rc=class extends ic{constructor(t,e){super(new Zu(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,Fr(t=this.j=new ba,0,1,e=new zo),this.O=new la,Fr(this.j,0,2,this.O),this.za=new Ea,Fr(this.j,0,3,this.za),this.u=new Qo,Fr(this.j,0,4,this.u),this.N=new na,Fr(this.j,0,5,this.N),this.B=new Aa,Fr(this.j,0,6,this.B),this.Y=new wa,Fr(this.j,0,7,this.Y),Vr(this.u,2,.5),Vr(this.u,3,.3),Vr(this.N,2,.5),Vr(this.B,2,.5),Vr(this.B,3,.3),Vr(this.Y,2,.5),Vr(this.O,2,.5)}get baseOptions(){return Lr(this.j,zo,1)}set baseOptions(t){Fr(this.j,0,1,t)}v(t){return"minFaceDetectionConfidence"in t&&Vr(this.u,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&Vr(this.u,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&Vr(this.N,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&Vr(this.B,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&Vr(this.B,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&Vr(this.Y,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&Vr(this.O,2,t.minHandLandmarksConfidence??.5),this.l(t)}G(t,e,r){var n="function"!=typeof e?e:{};return this.F="function"==typeof e?e:r,Sc(this),ec(this,t,n),Lc(this)}H(t,e,r,n){var i="function"!=typeof r?r:{};return this.F="function"==typeof r?r:n,Sc(this),rc(this,t,i,e),Lc(this)}o(){var t=new vo;go(t,"input_frames_image"),mo(t,"pose_landmarks"),mo(t,"pose_world_landmarks"),mo(t,"face_landmarks"),mo(t,"left_hand_landmarks"),mo(t,"left_hand_world_landmarks"),mo(t,"right_hand_landmarks"),mo(t,"right_hand_world_landmarks");var e=new io,r=new Gs;Kr(r,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(t,e){if(null!=e)if(Array.isArray(e))hr(t,2,je(e,0,He));else{if(!("string"==typeof e||e instanceof O||R(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");yr(t,2,lt(e,!1),F())}}(r,this.j.g());var n=new uo;Kr(n,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Mr(n,8,Gs,r),ao(n,"IMAGE:input_frames_image"),ho(n,"POSE_LANDMARKS:pose_landmarks"),ho(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),ho(n,"FACE_LANDMARKS:face_landmarks"),ho(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),ho(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),ho(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),ho(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.v(e),po(t,n),ru(this,t),this.g.attachProtoListener("pose_landmarks",(t,e)=>{xc(t,this.h.poseLandmarks),eu(this,e)}),this.g.attachEmptyPacketListener("pose_landmarks",t=>{eu(this,t)}),this.g.attachProtoListener("pose_world_landmarks",(t,e)=>{var r=this.h.poseWorldLandmarks;t=Ro(t),r.push(eh(t)),eu(this,e)}),this.g.attachEmptyPacketListener("pose_world_landmarks",t=>{eu(this,t)}),this.outputPoseSegmentationMasks&&(ho(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),nu(this,"pose_segmentation_mask"),this.g.ga("pose_segmentation_mask",(t,e)=>{this.h.poseSegmentationMasks=[nc(this,t,!0,!this.F)],eu(this,e)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",t=>{this.h.poseSegmentationMasks=[],eu(this,t)})),this.g.attachProtoListener("face_landmarks",(t,e)=>{xc(t,this.h.faceLandmarks),eu(this,e)}),this.g.attachEmptyPacketListener("face_landmarks",t=>{eu(this,t)}),this.outputFaceBlendshapes&&(mo(t,"extra_blendshapes"),ho(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(t,e)=>{var r=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=bo(t),r.push(Ja(t.g()??[]))),eu(this,e)}),this.g.attachEmptyPacketListener("extra_blendshapes",t=>{eu(this,t)})),this.g.attachProtoListener("left_hand_landmarks",(t,e)=>{xc(t,this.h.leftHandLandmarks),eu(this,e)}),this.g.attachEmptyPacketListener("left_hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoListener("left_hand_world_landmarks",(t,e)=>{var r=this.h.leftHandWorldLandmarks;t=Ro(t),r.push(eh(t)),eu(this,e)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",t=>{eu(this,t)}),this.g.attachProtoListener("right_hand_landmarks",(t,e)=>{xc(t,this.h.rightHandLandmarks),eu(this,e)}),this.g.attachEmptyPacketListener("right_hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoListener("right_hand_world_landmarks",(t,e)=>{var r=this.h.rightHandWorldLandmarks;t=Ro(t),r.push(eh(t)),eu(this,e)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Rc.prototype.detectForVideo=Rc.prototype.H,Rc.prototype.detect=Rc.prototype.G,Rc.prototype.setOptions=Rc.prototype.v,Rc.createFromModelPath=function(t,e){return Qu(Rc,t,{baseOptions:{modelAssetPath:e}})},Rc.createFromModelBuffer=function(t,e){return Qu(Rc,t,{baseOptions:{modelAssetBuffer:e}})},Rc.createFromOptions=function(t,e){return Qu(Rc,t,e)},Rc.HAND_CONNECTIONS=_c,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.HAND_CONNECTIONS",Rc.HAND_CONNECTIONS),Rc.POSE_CONNECTIONS=kc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.POSE_CONNECTIONS",Rc.POSE_CONNECTIONS),Rc.FACE_LANDMARKS_LIPS=oc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LIPS",Rc.FACE_LANDMARKS_LIPS),Rc.FACE_LANDMARKS_LEFT_EYE=ac,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYE",Rc.FACE_LANDMARKS_LEFT_EYE),Rc.FACE_LANDMARKS_LEFT_EYEBROW=hc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",Rc.FACE_LANDMARKS_LEFT_EYEBROW),Rc.FACE_LANDMARKS_LEFT_IRIS=uc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_IRIS",Rc.FACE_LANDMARKS_LEFT_IRIS),Rc.FACE_LANDMARKS_RIGHT_EYE=cc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYE",Rc.FACE_LANDMARKS_RIGHT_EYE),Rc.FACE_LANDMARKS_RIGHT_EYEBROW=lc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",Rc.FACE_LANDMARKS_RIGHT_EYEBROW),Rc.FACE_LANDMARKS_RIGHT_IRIS=dc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_IRIS",Rc.FACE_LANDMARKS_RIGHT_IRIS),Rc.FACE_LANDMARKS_FACE_OVAL=fc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_FACE_OVAL",Rc.FACE_LANDMARKS_FACE_OVAL),Rc.FACE_LANDMARKS_CONTOURS=pc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_CONTOURS",Rc.FACE_LANDMARKS_CONTOURS),Rc.FACE_LANDMARKS_TESSELATION=gc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_TESSELATION",Rc.FACE_LANDMARKS_TESSELATION);var Ic=class extends ic{constructor(t,e){super(new Zu(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},Fr(t=this.h=new Sa,0,1,e=new zo)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return Fr(this.h,0,2,za(t,Lr(this.h,jo,2))),this.l(t)}Fa(t,e){return this.j={classifications:[]},ec(this,t,e),this.j}Ga(t,e,r){return this.j={classifications:[]},rc(this,t,r,e),this.j}o(){var t=new vo;go(t,"input_image"),go(t,"norm_rect"),mo(t,"classifications");var e=new io;di(e,La,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),ao(r,"IMAGE:input_image"),ao(r,"NORM_RECT:norm_rect"),ho(r,"CLASSIFICATIONS:classifications"),r.v(e),po(t,r),this.g.attachProtoListener("classifications",(t,e)=>{this.j=Za(Po(t)),eu(this,e)}),this.g.attachEmptyPacketListener("classifications",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ic.prototype.classifyForVideo=Ic.prototype.Ga,Ic.prototype.classify=Ic.prototype.Fa,Ic.prototype.setOptions=Ic.prototype.v,Ic.createFromModelPath=function(t,e){return Qu(Ic,t,{baseOptions:{modelAssetPath:e}})},Ic.createFromModelBuffer=function(t,e){return Qu(Ic,t,{baseOptions:{modelAssetBuffer:e}})},Ic.createFromOptions=function(t,e){return Qu(Ic,t,e)};var Fc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!0),this.h=new xa,this.embeddings={embeddings:[]},Fr(t=this.h,0,1,e=new zo)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){var e=this.h,r=Lr(this.h,Ho,2);if(r=r?r.clone():new Ho,void 0!==t.l2Normalize){var n=t.l2Normalize;hr(r,1,null==n?n:Qt(n))}else"l2Normalize"in t&&hr(r,1);return void 0!==t.quantize?hr(r,2,null==(n=t.quantize)?n:Qt(n)):"quantize"in t&&hr(r,2),Fr(e,0,2,r),this.l(t)}Ma(t,e){return ec(this,t,e),this.embeddings}Na(t,e,r){return rc(this,t,r,e),this.embeddings}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"embeddings_out");var e=new io;di(e,Ra,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"EMBEDDINGS:embeddings_out"),r.v(e),po(t,r),this.g.attachProtoListener("embeddings_out",(t,e)=>{t=Go(t),this.embeddings=function(t){return{embeddings:Rr(t,Uo,1).map(t=>{var e={headIndex:Pr(t,3)??0??-1,headName:ye(or(t,4))??""??""};if(cr(t,Do,1,Bo))t=dr(t=$r(t,Do,1),1,Zt,lr()),e.floatEmbedding=t.slice();else{let r=new Uint8Array(0);e.quantizedEmbedding=$r(t,$o,2)?.g()?.h()??r}return e}),timestampMs:qa(or(t,2,void 0,pe)??ir)}}(t),eu(this,e)}),this.g.attachEmptyPacketListener("embeddings_out",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Fc.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=nh(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=nh(rh(t.quantizedEmbedding),rh(e.quantizedEmbedding))}return t},Fc.prototype.embedForVideo=Fc.prototype.Na,Fc.prototype.embed=Fc.prototype.Ma,Fc.prototype.setOptions=Fc.prototype.v,Fc.createFromModelPath=function(t,e){return Qu(Fc,t,{baseOptions:{modelAssetPath:e}})},Fc.createFromModelBuffer=function(t,e){return Qu(Fc,t,{baseOptions:{modelAssetBuffer:e}})},Fc.createFromOptions=function(t,e){return Qu(Fc,t,e)};var Cc=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};function Nc(t){var e=function(t){return Rr(t,uo,1)}(t.ja()).filter(t=>(ye(or(t,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(t.u=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(Lr(e[0],io,7)?.o()?.g()??new Map).forEach((e,r)=>{t.u[Number(r)]=ye(or(e,1))??""})}function Oc(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Mc(t){try{let e=new Cc(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{iu(t)}}Cc.prototype.close=Cc.prototype.close;var Pc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Oa,this.B=new Ia,Fr(this.h,0,3,this.B),Fr(t=this.h,0,1,e=new zo)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return void 0!==t.displayNamesLocale?hr(this.h,2,_e(t.displayNamesLocale)):"displayNamesLocale"in t&&hr(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}J(){Nc(this)}segment(t,e,r){var n="function"!=typeof e?e:{};return this.j="function"==typeof e?e:r,Oc(this),ec(this,t,n),Mc(this)}cb(t,e,r,n){var i="function"!=typeof r?r:{};return this.j="function"==typeof r?r:n,Oc(this),rc(this,t,i,e),Mc(this)}Qa(){return this.u}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect");var e=new io;di(e,Ma,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),r.v(e),po(t,r),ru(this,t),this.outputConfidenceMasks&&(mo(t,"confidence_masks"),ho(r,"CONFIDENCE_MASKS:confidence_masks"),nu(this,"confidence_masks"),this.g.ha("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>nc(this,t,!0,!this.j)),eu(this,e)}),this.g.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],eu(this,t)})),this.outputCategoryMask&&(mo(t,"category_mask"),ho(r,"CATEGORY_MASK:category_mask"),nu(this,"category_mask"),this.g.ga("category_mask",(t,e)=>{this.categoryMask=nc(this,t,!1,!this.j),eu(this,e)}),this.g.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,eu(this,t)})),mo(t,"quality_scores"),ho(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,eu(this,e)}),this.g.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Pc.prototype.getLabels=Pc.prototype.Qa,Pc.prototype.segmentForVideo=Pc.prototype.cb,Pc.prototype.segment=Pc.prototype.segment,Pc.prototype.setOptions=Pc.prototype.v,Pc.createFromModelPath=function(t,e){return Qu(Pc,t,{baseOptions:{modelAssetPath:e}})},Pc.createFromModelBuffer=function(t,e){return Qu(Pc,t,{baseOptions:{modelAssetBuffer:e}})},Pc.createFromOptions=function(t,e){return Qu(Pc,t,e)};var Dc={0:0,1:1,2:2,3:3};function $c(){return $h()?void 0:document.createElement("canvas")}var Uc=class extends su{constructor(t,e){super(new qh(t,e)),this.u=new gu,this.delegate="CPU",this.h=0,this.baseOptions=new zo,this.B=this.j=0}get i(){return this.g.i}v(t){return this.delegate=t.baseOptions?.delegate??"CPU",super.l(t)}eb(t){if(0===this.h)throw Error("Segmenter is not initialized.");var e;if(0!==this.j&&(this.i._free(this.j),this.j=0),!(e="undefined"!=typeof ImageData&&t instanceof ImageData))if("object"!=typeof t||null===t)e=!1;else{e=t.data;var r=t.width,n=t.height;e=Number.isInteger(r)&&r>0&&Number.isInteger(n)&&n>0&&(e instanceof Uint8ClampedArray||e instanceof Uint8Array)}if(e)e=t.width,r=t.height,t=t.data;else{if([e,r]=Bh(t),"undefined"!=typeof OffscreenCanvas)n=new OffscreenCanvas(e,r);else{if("undefined"==typeof document)throw Error("Canvas is not supported in this environment.");n=document.createElement("canvas")}if(n.width=e,n.height=r,!(n=n.getContext("2d")))throw Error("Canvas 2D context is not supported in this environment.");n.drawImage(t,0,0),t=n.getImageData(0,0,e,r).data}if(!t)throw Error("Unsupported image source or failed to extract image pixels.");n=function({Va:t,width:e,height:r}){if(e<=0||r<=0)throw Error(`Invalid image dimensions: ${e}x${r}. Dimensions must be positive.`);if(t%(e*r)!==0)throw Error(`Invalid image dimensions or pixel data length. Pixel data length ${t} is not a multiple of the number of pixels (${e*r}).`);if(4!==(t/=e*r)&&3!==t&&1!==t)throw Error(`Invalid image dimensions or pixel data length. Calculated channels: ${t}. Expected 1, 3, or 4.`);return t}({Va:t.length,width:e,height:r});var i=this.i._malloc(t.length);if(this.i.HEAPU8.set(t,i),this.j=i,!this.i._interactive_segmenter_set_image(this.h,i,e,r,n))throw Error("Failed to set image on native engine.")}segment(t){if(0===this.h)throw Error("Segmenter is not initialized.");var e=function(t){t=t.map(({isCompleted:t,brushMode:e,point:r})=>{e=Dc[e]??0,r=r.map(({x:t,y:e})=>{var r=new Pa;return Hr(r,1,t),Hr(r,2,e),r});var n=new Da;return Ur(n,t),yr(n,1,re(e),0),Nr(n,2,r),n});var e=new $a;return Nr(e,1,t),Ua(e)}(t);t=this.i._malloc(e.length),this.i.HEAPU8.set(e,t);var r=this.i._malloc(12),n=r+4,i=r+8,s=0,o=this.B++;try{if(this.m)if("GPU"===this.delegate){var a=this.m;++a.g.T,a.h.set(o,performance.now())}else{var h=this.m;++h.g.P,h.h.set(o,performance.now())}if(0===(s=this.i._interactive_segmenter_segment(this.h,t,e.length,r,n,i)))throw Error("Segmentation failed.");this.m?.ya(o);let c=this.i.HEAPU32[r/4],l=this.i.HEAPU32[n/4],d=new Float32Array(this.i.HEAPU8.buffer,s,this.i.HEAPU32[i/4]/4);var u=new Float32Array(d);if(a=c*l,(u instanceof Uint8Array||u instanceof Float32Array)&&u.length!==a)throw Error("Unsupported channel count: "+u.length/a);return new Lu([u],!0,!1,this.g.i.canvas??void 0,this.u,c,l)}finally{if("GPU"===this.delegate&&(u=this.i.canvas)&&(u=u.getContext("webgl2")))for(;u.getError()!==u.NO_ERROR;);0!==t&&this.i._free(t),0!==r&&this.i._free(r),0!==s&&this.i._free(s)}}o(){0!==this.h&&(this.m?.wa(),this.i._interactive_segmenter_close(this.h),this.h=0),0!==this.j&&(this.i._free(this.j),this.j=0);var t=new Xo;if("GPU"===this.delegate){var e=new qs;Cr(t,2,Wo,e)}else Br(e=new ro,1,4),Cr(t,1,Wo,e);if(Fr(this.baseOptions,0,3,t),t=Zo(this.baseOptions),e=this.i._malloc(t.length),this.i.HEAPU8.set(t,e),this.h=this.i._interactive_segmenter_create(e,t.length),this.i._free(e),0===this.h)throw Error("Failed to create native InteractiveSegmenter engine.");this.m?.xa()}close(){0!==this.h&&(this.i._interactive_segmenter_close(this.h),this.h=0),0!==this.j&&(this.i._free(this.j),this.j=0),this.u.close(),super.close()}};Uc.prototype.close=Uc.prototype.close,Uc.prototype.segment=Uc.prototype.segment,Uc.prototype.setImage=Uc.prototype.eb,Uc.prototype.setOptions=Uc.prototype.v,Uc.createFromModelPath=function(t,e){return Zh(Uc,$c(),t,{baseOptions:{modelAssetPath:e}})},Uc.createFromModelBuffer=function(t,e){return Zh(Uc,$c(),t,{baseOptions:{modelAssetBuffer:e}})},Uc.createFromOptions=function(t,e){var r=e.canvas??$c();return Zh(Uc,r,t,e)};var Bc=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};Bc.prototype.close=Bc.prototype.close;var Gc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Oa,this.u=new Ia,Fr(this.h,0,3,this.u),Fr(t=this.h,0,1,e=new zo)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}segment(t,e,r,n){var i="function"!=typeof r?r:{};if(this.j="function"==typeof r?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.D+1,n=new Va,e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var s=new Ba;Ur(s,!0),Hr(s,1,e.keypoint.x),Hr(s,2,e.keypoint.y),Cr(n,1,Ha,s)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");{let t=new ja;for(s of e.scribble)Ur(e=new Ba,!0),Hr(e,1,s.x),Hr(e,2,s.y),Mr(t,1,Ba,e);Cr(n,2,Ha,t)}}this.g.addProtoToStream(n.g(),"mediapipe.tasks.vision.interactive_segmenter_legacy.proto.RegionOfInterest","roi_in",r),ec(this,t,i);t:{try{let t=new Bc(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var o=t;break t}this.j(t)}finally{iu(this)}o=void 0}return o}o(){var t=new vo;go(t,"image_in"),go(t,"roi_in"),go(t,"norm_rect_in");var e=new io;di(e,Ma,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.interactive_segmenter_legacy.InteractiveSegmenterGraphV2"),ao(r,"IMAGE:image_in"),ao(r,"ROI:roi_in"),ao(r,"NORM_RECT:norm_rect_in"),r.v(e),po(t,r),ru(this,t),this.outputConfidenceMasks&&(mo(t,"confidence_masks"),ho(r,"CONFIDENCE_MASKS:confidence_masks"),nu(this,"confidence_masks"),this.g.ha("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>nc(this,t,!0,!this.j)),eu(this,e)}),this.g.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],eu(this,t)})),this.outputCategoryMask&&(mo(t,"category_mask"),ho(r,"CATEGORY_MASK:category_mask"),nu(this,"category_mask"),this.g.ga("category_mask",(t,e)=>{this.categoryMask=nc(this,t,!1,!this.j),eu(this,e)}),this.g.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,eu(this,t)})),mo(t,"quality_scores"),ho(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,eu(this,e)}),this.g.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Gc.prototype.segment=Gc.prototype.segment,Gc.prototype.setOptions=Gc.prototype.v,Gc.createFromModelPath=function(t,e){return Qu(Gc,t,{baseOptions:{modelAssetPath:e}})},Gc.createFromModelBuffer=function(t,e){return Qu(Gc,t,{baseOptions:{modelAssetBuffer:e}})},Gc.createFromOptions=function(t,e){return Qu(Gc,t,e)};var jc=class extends ic{constructor(t,e){super(new Zu(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},Fr(t=this.h=new Ka,0,1,e=new zo)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return void 0!==t.displayNamesLocale?hr(this.h,2,_e(t.displayNamesLocale)):"displayNamesLocale"in t&&hr(this.h,2),void 0!==t.maxResults?Br(this.h,3,t.maxResults):"maxResults"in t&&hr(this.h,3),void 0!==t.scoreThreshold?Vr(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&hr(this.h,4),void 0!==t.categoryAllowlist?Xr(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&hr(this.h,5),void 0!==t.categoryDenylist?Xr(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&hr(this.h,6),this.l(t)}G(t,e){return this.j={detections:[]},ec(this,t,e),this.j}H(t,e,r){return this.j={detections:[]},rc(this,t,r,e),this.j}o(){var t=new vo;go(t,"input_frame_gpu"),go(t,"norm_rect"),mo(t,"detections");var e=new io;di(e,Xa,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),ao(r,"IMAGE:input_frame_gpu"),ao(r,"NORM_RECT:norm_rect"),ho(r,"DETECTIONS:detections"),r.v(e),po(t,r),this.g.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=Lo(e),this.j.detections.push(Qa(t));eu(this,e)}),this.g.attachEmptyPacketListener("detections",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};jc.prototype.detectForVideo=jc.prototype.H,jc.prototype.detect=jc.prototype.G,jc.prototype.setOptions=jc.prototype.v,jc.createFromModelPath=async function(t,e){return Qu(jc,t,{baseOptions:{modelAssetPath:e}})},jc.createFromModelBuffer=function(t,e){return Qu(jc,t,{baseOptions:{modelAssetBuffer:e}})},jc.createFromOptions=function(t,e){return Qu(jc,t,e)};var Vc=class{constructor(t,e,r){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=r}close(){this.segmentationMasks?.forEach(t=>{t.close()})}};function Hc(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Kc(t){try{let e=new Vc(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.u)return e;t.u(e)}finally{iu(t)}}Vc.prototype.close=Vc.prototype.close;var Xc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,Fr(t=this.h=new Wa,0,1,e=new zo),this.B=new wa,Fr(this.h,0,3,this.B),this.j=new Aa,Fr(this.h,0,2,this.j),Br(this.j,4,1),Vr(this.j,2,.5),Vr(this.B,2,.5),Vr(this.h,4,.5)}get baseOptions(){return Lr(this.h,zo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"numPoses"in t&&Br(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&Vr(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&Vr(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&Vr(this.B,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}G(t,e,r){var n="function"!=typeof e?e:{};return this.u="function"==typeof e?e:r,Hc(this),ec(this,t,n),Kc(this)}H(t,e,r,n){var i="function"!=typeof r?r:{};return this.u="function"==typeof r?r:n,Hc(this),rc(this,t,i,e),Kc(this)}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"normalized_landmarks"),mo(t,"world_landmarks"),mo(t,"segmentation_masks");var e=new io;di(e,Ya,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"NORM_LANDMARKS:normalized_landmarks"),ho(r,"WORLD_LANDMARKS:world_landmarks"),r.v(e),po(t,r),ru(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(t,e)=>{this.landmarks=[];for(let e of t)t=Fo(e),this.landmarks.push(th(t));eu(this,e)}),this.g.attachEmptyPacketListener("normalized_landmarks",t=>{this.landmarks=[],eu(this,t)}),this.g.attachProtoVectorListener("world_landmarks",(t,e)=>{this.worldLandmarks=[];for(let e of t)t=Ro(e),this.worldLandmarks.push(eh(t));eu(this,e)}),this.g.attachEmptyPacketListener("world_landmarks",t=>{this.worldLandmarks=[],eu(this,t)}),this.outputSegmentationMasks&&(ho(r,"SEGMENTATION_MASK:segmentation_masks"),nu(this,"segmentation_masks"),this.g.ha("segmentation_masks",(t,e)=>{this.segmentationMasks=t.map(t=>nc(this,t,!0,!this.u)),eu(this,e)}),this.g.attachEmptyPacketListener("segmentation_masks",t=>{this.segmentationMasks=[],eu(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};return Xc.prototype.detectForVideo=Xc.prototype.H,Xc.prototype.detect=Xc.prototype.G,Xc.prototype.setOptions=Xc.prototype.v,Xc.createFromModelPath=function(t,e){return Qu(Xc,t,{baseOptions:{modelAssetPath:e}})},Xc.createFromModelBuffer=function(t,e){return Qu(Xc,t,{baseOptions:{modelAssetBuffer:e}})},Xc.createFromOptions=function(t,e){return Qu(Xc,t,e)},Xc.POSE_CONNECTIONS=kc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS",Xc.POSE_CONNECTIONS),t.DrawingUtils=$u,t.FaceDetector=sc,t.FaceLandmarker=vc,t.FilesetResolver=hh,t.GestureRecognizer=wc,t.HandLandmarker=Tc,t.HolisticLandmarker=Rc,t.ImageClassifier=Ic,t.ImageEmbedder=Fc,t.ImageSegmenter=Pc,t.ImageSegmenterResult=Cc,t.InteractiveSegmenter=Uc,t.InteractiveSegmenterLegacy=Gc,t.InteractiveSegmenterLegacyResult=Bc,t.MPImage=Wu,t.MPMask=Lu,t.ObjectDetector=jc,t.PoseLandmarker=Xc,t.TaskRunner=su,t.VisionTaskRunner=ic,t}({});
|
|
1
|
+
var Vision=function(t){"use strict";var e="undefined"!=typeof self?self:{};function r(t,r){t:{for(var n=["CLOSURE_FLAGS"],i=e,s=0;s<n.length;s++)if(null==(i=i[n[s]])){n=null;break t}n=i}return null!=(t=n&&n[t])?t:r}function n(t,r){t=t.split(".");for(var n,i=e;t.length&&(n=t.shift());)t.length||void 0===r?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=r}function i(){throw Error("Invalid UTF8")}function s(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}var o,a,h=void 0,u="undefined"!=typeof TextDecoder,c="undefined"!=typeof TextEncoder;function l(t){if(c)t=(a||=new TextEncoder).encode(t);else{let r=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)n[r++]=e;else{if(e<2048)n[r++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){let s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,n[r++]=e>>18|240,n[r++]=e>>12&63|128,n[r++]=e>>6&63|128,n[r++]=63&e|128;continue}i--}e=65533}n[r++]=e>>12|224,n[r++]=e>>6&63|128}n[r++]=63&e|128}}t=r===n.length?n:n.subarray(0,r)}return t}function d(t){e.setTimeout(()=>{throw t},0)}var f=r(610401301,!1),p=r(748402147,!0);function g(){var t=e.navigator;return t&&(t=t.userAgent)?t:""}var m,v=e.navigator;function _(t){return _[" "](t),t}m=v&&v.userAgentData||null,_[" "]=function(){};var y={},E=null;function A(t){var e=t.length,r=3*e/4;r%3?r=Math.floor(r):-1!="=.".indexOf(t[e-1])&&(r=-1!="=.".indexOf(t[e-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function(t,e){function r(e){for(;n<t.length;){let e=t.charAt(n++),r=E[e];if(null!=r)return r;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}w();for(var n=0;;){let t=r(-1),n=r(0),i=r(64),s=r(64);if(64===s&&-1===t)break;e(t<<2|n>>4),64!=i&&(e(n<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,function(t){n[i++]=t}),i!==r?n.subarray(0,i):n}function w(){if(!E){E={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let r=0;r<5;r++){let n=t.concat(e[r].split(""));y[r]=n;for(let t=0;t<n.length;t++){let e=n[t];void 0===E[e]&&(E[e]=t)}}}}var b="undefined"!=typeof Uint8Array,T=!(!(f&&m&&m.brands.length>0)&&(-1!=g().indexOf("Trident")||-1!=g().indexOf("MSIE")))&&"function"==typeof btoa,k=/[-_.]/g,S={"-":"+",_:"/",".":"="};function L(t){return S[t]||""}function x(t){if(!T)return A(t);t=k.test(t)?t.replace(k,L):t,t=atob(t);var e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function R(t){return b&&null!=t&&t instanceof Uint8Array}var I={};function F(){return N||=new M(null,I)}function C(t){O(I);var e=t.g;return null==(e=null==e||R(e)?e:"string"==typeof e?x(e):null)?e:t.g=e}var N,M=class{h(){return new Uint8Array(C(this)||0)}constructor(t,e){if(O(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function O(t){if(t!==I)throw Error("illegal external caller")}function D(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}var P=void 0;function $(t){return D(t=Error(t),"warning"),t}function U(t,e){if(null!=t){var r=P??={},n=r[t]||0;n>=e||(r[t]=n+1,D(t=Error(),"incident"),d(t))}}function B(){return"function"==typeof BigInt}var G="function"==typeof Symbol&&"symbol"==typeof Symbol();function j(t,e,r=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var V,H=j("jas",void 0,!0),K=j(void 0,"0di"),X=j(void 0,"1oa"),W=j(void 0,Symbol()),z=j(void 0,"0ub"),Y=j(void 0,"0ubs"),q=j(void 0,"0ubsb"),J=j(void 0,"0actk"),Z=j("m_m","kb",!0),Q=j(),tt={Va:{value:0,configurable:!0,writable:!0,enumerable:!1}},et=Object.defineProperties,rt=G?H:"Va",nt=[];function it(t,e){G||rt in t||et(t,tt),t[rt]|=e}function st(t,e){G||rt in t||et(t,tt),t[rt]=e}function ot(t){return it(t,34),t}function at(t){return it(t,8192),t}st(nt,7),V=Object.freeze(nt);var ht={};function ut(t,e){return void 0===e?t.h!==ct&&!!(2&t.A[rt]):!!(2&e)&&t.h!==ct}var ct={};function lt(t,e){if(null!=t)if("string"==typeof t)t=t?new M(t,I):F();else if(t.constructor!==M)if(R(t))t=t.length?new M(new Uint8Array(t),I):F();else{if(!e)throw Error();t=void 0}return t}class dt{constructor(t,e,r){this.g=t,this.h=e,this.j=r}next(){var t=this.g.next();return t.done||(t.value=this.h.call(this.j,t.value)),t}[Symbol.iterator](){return this}}var ft=Object.freeze({});function pt(t,e,r){var n,i=128&e?0:-1,s=t.length;(n=!!s)&&(n=null!=(n=t[s-1])&&"object"==typeof n&&n.constructor===Object);var o=s+(n?-1:0);for(e=128&e?1:0;e<o;e++)r(e-i,t[e]);if(n){t=t[s-1];for(let e in t)!isNaN(e)&&r(+e,t[e])}}var gt={};function mt(t){return 128&t?gt:void 0}function vt(t){return t.ib=!0,t}var _t=vt(t=>"number"==typeof t),yt=vt(t=>"string"==typeof t),Et=vt(t=>"boolean"==typeof t),At="function"==typeof e.BigInt&&"bigint"==typeof e.BigInt(0);function wt(t){var e=t;if(yt(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(_t(e)&&!Number.isSafeInteger(e))throw Error(String(e));return At?BigInt(t):t=Et(t)?t?"1":"0":yt(t)?t.trim()||"0":String(t)}var bt=vt(t=>At?t>=kt&&t<=Lt:"-"===t[0]?xt(t,Tt):xt(t,St)),Tt=Number.MIN_SAFE_INTEGER.toString(),kt=At?BigInt(Number.MIN_SAFE_INTEGER):void 0,St=Number.MAX_SAFE_INTEGER.toString(),Lt=At?BigInt(Number.MAX_SAFE_INTEGER):void 0;function xt(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=e[r];if(n>i)return!1;if(n<i)return!0}}var Rt,It="function"==typeof Uint8Array.prototype.slice,Ft=0,Ct=0;function Nt(t){var e=t>>>0;Ft=e,Ct=(t-e)/4294967296>>>0}function Mt(t){if(t<0){Nt(-t);let[e,r]=Vt(Ft,Ct);Ft=e>>>0,Ct=r>>>0}else Nt(t)}function Ot(t){var e=Rt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Ct=0,Ft=e.getUint32(0,!0)}function Dt(t,e){var r=4294967296*e+(t>>>0);return Number.isSafeInteger(r)?r:Ut(t,e)}function Pt(t,e){return wt(B()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):Ut(t,e))}function $t(t,e){return B()?wt(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):wt(Gt(t,e))}function Ut(t,e){if(t>>>=0,(e>>>=0)<=2097151)var r=""+(4294967296*e+t);else B()?r=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(r=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),r+=8147497*e,e*=2,t>=1e7&&(r+=t/1e7>>>0,t%=1e7),r>=1e7&&(e+=r/1e7>>>0,r%=1e7),r=e+Bt(r)+Bt(t));return r}function Bt(t){return t=String(t),"0000000".slice(t.length)+t}function Gt(t,e){if(2147483648&e)if(B())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{let[r,n]=Vt(t,e);t="-"+Ut(r,n)}else t=Ut(t,e);return t}function jt(t){if(t.length<16)Mt(Number(t));else if(B())t=BigInt(t),Ft=Number(t&BigInt(4294967295))>>>0,Ct=Number(t>>BigInt(32)&BigInt(4294967295));else{let e=+("-"===t[0]);Ct=Ft=0;let r=t.length;for(let n=e,i=(r-e)%6+e;i<=r;n=i,i+=6){let e=Number(t.slice(n,i));Ct*=1e6,(Ft=1e6*Ft+e)>=4294967296&&(Ct+=Math.trunc(Ft/4294967296),Ct>>>=0,Ft>>>=0)}if(e){let[t,e]=Vt(Ft,Ct);Ft=t,Ct=e}}}function Vt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Ht(t){return Array.prototype.slice.call(t)}var Kt="function"==typeof BigInt?BigInt.asIntN:void 0,Xt="function"==typeof BigInt?BigInt.asUintN:void 0,Wt=Number.isSafeInteger,zt=Number.isFinite,Yt=Math.trunc,qt=wt(0);function Jt(t){if("number"!=typeof t)throw Error(`Value of float/double field must be a number, found ${typeof t}: ${t}`);return t}function Zt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Qt(t){if("boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}var te=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ee(t){switch(typeof t){case"bigint":return!0;case"number":return zt(t);case"string":return te.test(t);default:return!1}}function re(t){if(null!=t){if(!zt(t))throw $("enum");t|=0}return t}function ne(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?0|t:void 0}function ie(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?t>>>0:void 0}function se(t,e){if(e??=1024,!ee(t))throw $("int64");var r=typeof t;switch(e){case 512:switch(r){case"string":return le(t);case"bigint":return String(Kt(64,t));default:return ce(t)}case 1024:switch(r){case"string":return de(t);case"bigint":return wt(Kt(64,t));default:return fe(t)}case 0:switch(r){case"string":return le(t);case"bigint":return wt(Kt(64,t));default:return he(t)}default:return function(t,e=`unexpected value ${t}!`){throw Error(e)}(e,"Unknown format requested type for int64")}}function oe(t){var e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(jt(t),Gt(Ft,Ct))}function ae(t){if("-"===t[0])var e=!1;else e=(e=t.length)<20||20===e&&t<="18446744073709551615";return e?t:(jt(t),Ut(Ft,Ct))}function he(t){if(t=Yt(t),!Wt(t)){Mt(t);var e=Ft,r=Ct;(t=2147483648&r)&&(r=~r>>>0,0==(e=1+~e>>>0)&&(r=r+1>>>0)),t="number"==typeof(e=Dt(e,r))?t?-e:e:t?"-"+e:e}return t}function ue(t){return(t=Yt(t))>=0&&Wt(t)||(Mt(t),t=Dt(Ft,Ct)),t}function ce(t){return t=Yt(t),Wt(t)?t=String(t):(Mt(t),t=Gt(Ft,Ct)),t}function le(t){var e=Yt(Number(t));return Wt(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),oe(t))}function de(t){var e=Yt(Number(t));return Wt(e)?wt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),B()?wt(Kt(64,BigInt(t))):wt(oe(t)))}function fe(t){return Wt(t)?wt(he(t)):wt(ce(t))}function pe(t){var e=typeof t;return null==t?t:"bigint"===e?wt(Kt(64,t)):ee(t)?"string"===e?de(t):fe(t):void 0}function ge(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Kt(64,t));if(ee(t)){if("string"===e)return le(t);if("number"===e)return he(t)}}function me(t){if(null==t||"string"==typeof t||t instanceof M)return t}function ve(t){if("string"!=typeof t)throw Error();return t}function _e(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ye(t){return null==t||"string"==typeof t?t:void 0}function Ee(t,e,r,n){return null!=t&&t[Z]===ht?t:Array.isArray(t)?((n=(r=0|t[rt])|32&n|2&n)!==r&&st(t,n),new e(t)):(r?2&n?((t=e[K])||(ot((t=new e).A),t=e[K]=t),e=t):e=new e:e=void 0,e)}function Ae(t,e,r){return null==(t=e?se(t,1024):pe(t))?r?qt:void 0:t}function we(t){return t}var be={},Te=function(){try{return _(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class ke{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()}}var Se=Te?(Object.setPrototypeOf(ke.prototype,Map.prototype),Object.defineProperties(ke.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),ke):class extends Map{constructor(){super()}};function Le(t){return t}function xe(t){if(2&t.M)throw Error("Cannot mutate an immutable Map")}var Re,Ie=class extends Se{constructor(t,e,r=Le,n=Le){super(),this.M=0|t[rt],this.N=e,this.ba=r,this.na=this.N?Fe:n;for(let i=0;i<t.length;i++){let s=t[i],o=r(s[0],!1,!0),a=s[1];e?void 0===a&&(a=null):a=n(s[1],!1,!0,void 0,void 0,this.M),super.set(o,a)}}ea(t){return at(Array.from(super.entries(),t))}clear(){xe(this),super.clear()}delete(t){return xe(this),super.delete(this.ba(t,!0,!1))}entries(){if(this.N){var t=super.keys();t=new dt(t,Ce,this)}else t=super.entries();return t}values(){if(this.N){var t=super.keys();t=new dt(t,Ie.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.N?super.forEach((r,n,i)=>{t.call(e,i.get(n),n,i)}):super.forEach(t,e)}set(t,e){return xe(this),null==(t=this.ba(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.na(e,!0,!0,this.N,!1,this.M))}gb(t){var e=this.ba(t[0],!1,!0);t=t[1],t=this.N?void 0===t?null:t:this.na(t,!1,!0,void 0,!1,this.M),super.set(e,t)}has(t){return super.has(this.ba(t,!1,!1))}get(t){t=this.ba(t,!1,!1);var e=super.get(t);if(void 0!==e){var r=this.N;return r?((r=this.na(e,!1,!0,r,this.Fa,this.M))!==e&&super.set(t,r),r):e}}[Symbol.iterator](){return this.entries()}};function Fe(t,e,r,n,i,s){return t=Ee(t,n,r,s),i&&(t=Qe(t)),t}function Ce(t){return[t,this.get(t)]}function Ne(){return Re||=new Ie(ot([]),void 0,void 0,void 0,be)}function Me(t){return W?t[W]:void 0}function Oe(t,e){for(let r in t)!isNaN(r)&&e(t,+r,t[r])}Ie.prototype.toJSON=void 0;var De,Pe,$e,Ue=class{},Be={cb:!0};function Ge(t,e){e<100||U(Y,1)}function je(t,e,r,n){var i=void 0!==n;n=!!n;var s,o=W;!i&&G&&o&&(s=t[o])&&Oe(s,Ge),o=[];var a=t.length;s=4294967295;var h=!1,u=!!(64&e),c=u?128&e?0:-1:void 0;if(!(1&e)){var l=a&&t[a-1];null!=l&&"object"==typeof l&&l.constructor===Object?s=--a:l=void 0,!u||128&e||i||(h=!0,s=(De??we)(s-c,c,t,l,void 0)+c)}e=void 0;for(var d=0;d<a;d++){let i=t[d];if(null!=i&&null!=(i=r(i,n)))if(u&&d>=s){let t=d-c;(e??={})[t]=i}else o[d]=i}if(l)for(let t in l){if(null==(a=l[t])||null==(a=r(a,n)))continue;let i;d=+t,u&&!Number.isNaN(d)&&(i=d+c)<s?o[i]=a:(e??={})[t]=a}return e&&(h?o.push(e):o[s]=e),i&&W&&(t=Me(t))&&t instanceof Ue&&(o[W]=function(t){var e=new Ue;return Oe(t,(t,r,n)=>{e[r]=Ht(n)}),e.ka=t.ka,e}(t)),o}function Ve(t){return t[0]=He(t[0]),t[1]=He(t[1]),t}function He(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return bt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[rt];return 0===t.length&&1&e?void 0:je(t,e,He)}if(null!=t&&t[Z]===ht)return Ke(t);if(t instanceof M){if(null==(e=t.g))t="";else if("string"==typeof e)t=e;else{if(T){for(var r="",n=0,i=e.length-10240;n<i;)r+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));r+=String.fromCharCode.apply(null,n?e.subarray(n):e),e=btoa(r)}else{void 0===r&&(r=0),w(),r=y[r],n=Array(Math.floor(e.length/3)),i=r[64]||"";let t=0,u=0;for(;t<e.length-2;t+=3){var s=e[t],o=e[t+1],a=e[t+2],h=r[s>>2];s=r[(3&s)<<4|o>>4],o=r[(15&o)<<2|a>>6],a=r[63&a],n[u++]=h+s+o+a}switch(h=0,a=i,e.length-t){case 2:a=r[(15&(h=e[t+1]))<<2]||i;case 1:e=e[t],n[u]=r[e>>2]+r[(3&e)<<4|h>>4]+a+i}e=n.join("")}t=t.g=e}return t}return t instanceof Ie?t=0!==t.size?t.ea(Ve):void 0:void 0}return t}function Ke(t){return je(t=t.A,0|t[rt],He)}function Xe(t,e){return We(t,e[0],e[1])}function We(t,e,r,n=0){if(null==t){var i=32;r?(t=[r],i|=128):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[rt],p&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(p)throw Error("carr");U(J,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&st(t,i|n),t;if(r&&(i|=128,r!==t[0]))throw Error("mid");t:{i|=64;var s=(r=t).length;if(s){var o=s-1;let t=r[o];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((o-=e=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var a in t)(s=+a)<o&&(r[s+e]=t[a],delete t[a]);i=-16760833&i|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,s-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&a)<<14}}}return st(t,64|i|n),t}function ze(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var r=0|t[rt];return 0===t.length&&1&r?void 0:Ye(t,r,e)}if(null!=t&&t[Z]===ht)return Je(t);if(t instanceof Ie){if(2&(e=t.M))return t;if(!t.size)return;if(r=ot(t.ea()),t.N)for(t=0;t<r.length;t++){let n=r[t],i=n[1];i=null==i||"object"!=typeof i?void 0:null!=i&&i[Z]===ht?Je(i):Array.isArray(i)?Ye(i,0|i[rt],!!(32&e)):void 0,n[1]=i}return r}return t instanceof M?t:void 0}function Ye(t,e,r){return 2&e||(!r||4096&e||16&e?t=Ze(t,e,!1,r&&!(16&e)):(it(t,34),4&e&&Object.freeze(t))),t}function qe(t,e,r){return t=new t.constructor(e),r&&(t.h=ct),t.m=ct,t}function Je(t){var e=t.A,r=0|e[rt];return ut(t,r)?t:nr(t,e,r)?qe(t,e):Ze(e,r)}function Ze(t,e,r,n){return n??=!!(34&e),t=je(t,e,ze,n),n=32,r&&(n|=2),st(t,e=16769217&e|n),t}function Qe(t){var e=t.A,r=0|e[rt];return ut(t,r)?nr(t,e,r)?qe(t,e,!0):new t.constructor(Ze(e,r,!1)):t}function tr(t){if(t.h!==ct)return!1;var e=t.A;return it(e=Ze(e,0|e[rt]),2048),t.A=e,t.h=void 0,t.m=void 0,!0}function er(t){if(!tr(t)&&ut(t,0|t.A[rt]))throw Error()}function rr(t,e){void 0===e&&(e=0|t[rt]),32&e&&!(4096&e)&&st(t,4096|e)}function nr(t,e,r){return!!(2&r)||!(!(32&r)||4096&r)&&(st(e,2|r),t.h=ct,!0)}var ir=wt(0),sr={};function or(t,e,r,n){if(null!==(e=ar(t.A,e,void 0,n))||r&&t.m!==ct)return e}function ar(t,e,r,n){if(-1===e)return null;var i=e+(r?0:-1),s=t.length-1;if(!(s<1+(r?0:-1))){if(i>=s){var o=t[s];if(null!=o&&"object"==typeof o&&o.constructor===Object){r=o[e];var a=!0}else{if(i!==s)return;r=o}}else r=t[i];if(n&&null!=r){if(null==(n=n(r)))return n;if(!Object.is(n,r))return a?o[e]=n:t[i]=n,n}return r}}function hr(t,e,r,n){er(t);var i=t.A;return ur(i,0|i[rt],e,r,n),t}function ur(t,e,r,n,i){var s=r+(i?0:-1),o=t.length-1;if(o>=1+(i?0:-1)&&s>=o){let i=t[o];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[r]=n,e}return s<=o?(t[s]=n,e):(void 0!==n&&(r>=(o=(e??=0|t[rt])>>14&1023||536870912)?null!=n&&(t[o+(i?0:-1)]={[r]:n}):t[s]=n),e)}function cr(t,e,r,n){var i=t.A;return void 0!==Sr(i,0|i[rt],e,t=Ar(t,n)===r?r:-1)}function lr(){return void 0===ft?2:4}function dr(t,e,r,n,i){var s=t.A,o=0|s[rt];n=ut(t,o)?1:n,i=!!i||3===n,2===n&&tr(t)&&(o=0|(s=t.A)[rt]);var a=(t=pr(s,e))===V?7:0|t[rt],h=gr(a,o),u=!(4&h);if(u){4&h&&(t=Ht(t),a=0,h=Mr(h,o),o=ur(s,o,e,t));let n=0,i=0;for(;n<t.length;n++){let e=r(t[n]);null!=e&&(t[i++]=e)}i<n&&(t.length=i),r=-513&h|4,h=r&=-1025,h&=-4097}return h!==a&&(st(t,h),2&h&&Object.freeze(t)),fr(t,h,s,o,e,n,u,i)}function fr(t,e,r,n,i,s,o,a){var h=e;return 1===s||4===s&&(2&e||!(16&e)&&32&n)?mr(e)||((e|=!t.length||o&&!(4096&e)||32&n&&!(4096&e||16&e)?2:256)!==h&&st(t,e),Object.freeze(t)):(2===s&&mr(e)&&(t=Ht(t),h=0,e=Mr(e,n),n=ur(r,n,i,t)),mr(e)||(a||(e|=16),e!==h&&st(t,e))),2&e||!(4096&e||16&e)||rr(r,n),t}function pr(t,e,r){return t=ar(t,e,r),Array.isArray(t)?t:V}function gr(t,e){return 2&e&&(t|=2),1|t}function mr(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function vr(t){return lt(t,!0)}function _r(t){t=Ht(t);for(let e=0;e<t.length;e++){let r=t[e]=Ht(t[e]);Array.isArray(r[1])&&(r[1]=ot(r[1]))}return at(t)}function yr(t,e,r,n){er(t),ur(t=t.A,0|t[rt],e,("0"===n?0===Number(r):r===n)?void 0:r)}function Er(t,e,r){if(2&e)throw Error();var n=mt(e),i=pr(t,r,n),s=i===V?7:0|i[rt],o=gr(s,e);return(2&o||mr(o)||16&o)&&(o===s||mr(o)||st(i,o),i=Ht(i),s=0,o=Mr(o,e),ur(t,e,r,i,n)),(o&=-13)!==s&&st(i,o),i}function Ar(t,e){return Tr(wr(t=t.A),t,void 0,e)}function wr(t){if(G)return t[X]??(t[X]=new Map);if(X in t)return t[X];var e=new Map;return Object.defineProperty(t,X,{value:e}),e}function br(t,e,r,n,i){var s=wr(t),o=Tr(s,t,e,r,i);return o!==n&&(o&&(e=ur(t,e,o,void 0,i)),s.set(r,n)),e}function Tr(t,e,r,n,i){var s=t.get(n);if(null!=s)return s;s=0;for(let t=0;t<n.length;t++){let o=n[t];null!=ar(e,o,i)&&(0!==s&&(r=ur(e,r,s,void 0,i)),s=o)}return t.set(n,s),s}function kr(t,e,r){var n=0|t[rt],i=mt(n),s=ar(t,r,i);if(null!=s&&s[Z]===ht){if(!ut(s))return tr(s),s.A;var o=s.A}else Array.isArray(s)&&(o=s);if(o){let t=0|o[rt];2&t&&(o=Ze(o,t))}return(o=Xe(o,e))!==s&&ur(t,n,r,o,i),o}function Sr(t,e,r,n,i){var s=!1;if(null!=(n=ar(t,n,i,t=>{var n=Ee(t,r,!1,e);return s=n!==t&&null!=n,n})))return s&&!ut(n)&&rr(t,e),n}function Lr(t,e,r,n){var i=t.A,s=0|i[rt];if(null==(e=Sr(i,s,e,r,n)))return e;if(!ut(t,s=0|i[rt])){let o=Qe(e);o!==e&&(tr(t)&&(s=0|(i=t.A)[rt]),rr(i,s=ur(i,s,r,e=o,n)))}return e}function xr(t,e,r,n,i,s,o,a){var h=ut(t,r);s=h?1:s,o=!!o||3===s,h=a&&!h,(2===s||h)&&tr(t)&&(r=0|(e=t.A)[rt]);var u=(t=pr(e,i))===V?7:0|t[rt],c=gr(u,r);if(a=!(4&c)){var l=t,d=r;let e=!!(2&c);e&&(d|=2);let i=!e,s=!0,o=0,a=0;for(;o<l.length;o++){let t=Ee(l[o],n,!1,d);if(t instanceof n){if(!e){let e=ut(t);i&&=!e,s&&=e}l[a++]=t}}a<o&&(l.length=a),c|=4,c=s?-4097&c:4096|c,c=i?8|c:-9&c}if(c!==u&&(st(t,c),2&c&&Object.freeze(t)),h&&!(8&c||!t.length&&(1===s||4===s&&(2&c||!(16&c)&&32&r)))){for(mr(c)&&(t=Ht(t),c=Mr(c,r),r=ur(e,r,i,t)),n=t,h=c,u=0;u<n.length;u++)(l=n[u])!==(c=Qe(l))&&(n[u]=c);h|=8,st(t,c=h=n.length?4096|h:-4097&h)}return fr(t,c,e,r,i,s,a,o)}function Rr(t,e,r){var n=t.A;return xr(t,n,0|n[rt],e,r,lr(),!1,!0)}function Ir(t){return null==t&&(t=void 0),t}function Fr(t,e,r,n,i){return hr(t,r,n=Ir(n),i),n&&!ut(n)&&rr(t.A),t}function Cr(t,e,r,n){t:{var i=n=Ir(n);er(t);let s=t.A,o=0|s[rt];if(null==i){let t=wr(s);if(Tr(t,s,o,r)!==e)break t;t.set(r,0)}else o=br(s,o,r,e);ur(s,o,e,i)}return n&&!ut(n)&&rr(t.A),t}function Nr(t,e,r){er(t);var n=t.A,i=0|n[rt];if(null==r)return ur(n,i,e),t;var s=r===V?7:0|r[rt],o=s,a=mr(s),h=a||Object.isFrozen(r),u=!0,c=!0;for(let t=0;t<r.length;t++){var l=r[t];a||(l=ut(l),u&&=!l,c&&=l)}return a||(s=u?13:5,s=c?-4097&s:4096|s),h&&s===o||(r=Ht(r),o=0,s=Mr(s,i)),s!==o&&st(r,s),i=ur(n,i,e,r),2&s||!(4096&s||16&s)||rr(n,i),t}function Mr(t,e){return-273&(2&e?2|t:-3&t)}function Or(t,e,r,n){var i=n;er(t),t=xr(t,n=t.A,0|n[rt],r,e,2,!0),i=null!=i?i:new r,t.push(i),e=r=t===V?7:0|t[rt],(i=ut(i))?(r&=-9,1===t.length&&(r&=-4097)):r|=4096,r!==e&&st(t,r),i||rr(n)}function Dr(t,e,r){return ne(or(t,e,r))}function Pr(t,e){return or(t,e,void 0,Zt)??0}function $r(t,e,r){return Lr(t,e,r=Ar(t,Bo)===r?r:-1,void 0)}function Ur(t,e){yr(t,3,null==e?e:Qt(e),!1)}function Br(t,e,r){if(null!=r){if("number"!=typeof r)throw $("int32");if(!zt(r))throw $("int32");r|=0}hr(t,e,r)}function Gr(t,e,r){return hr(t,e,null==r?r:se(r))}function jr(t,e,r){return hr(t,e,null==r?r:function(t){if(!ee(t))throw $("uint64");switch(typeof t){case"string":var e=Yt(Number(t));return Wt(e)&&e>=0?t=wt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=B()?wt(Xt(64,BigInt(t))):wt(ae(t))),t;case"bigint":return wt(Xt(64,t));default:return Wt(t)?t=wt(ue(t)):((t=Yt(t))>=0&&Wt(t)?t=String(t):(Mt(t),t=Ut(Ft,Ct)),t=wt(t)),t}}(r))}function Vr(t,e,r){hr(t,e,null==r?r:Jt(r))}function Hr(t,e,r){yr(t,e,null==r?r:Jt(r),0)}function Kr(t,e,r){yr(t,e,_e(r),"")}function Xr(t,e,r){{er(t);let o=t.A,a=0|o[rt];if(null==r)ur(o,a,e);else{var n=t=r===V?7:0|r[rt],i=mr(t),s=i||Object.isFrozen(r);for(i||(t=0),s||(r=Ht(r),n=0,t=Mr(t,a),s=!1),t|=5,t|=(4&t?512&t?512:1024&t?1024:0:void 0)??1024,i=0;i<r.length;i++){let e=r[i],o=ve(e);Object.is(e,o)||(s&&(r=Ht(r),n=0,t=Mr(t,a),s=!1),r[i]=o)}t!==n&&(s&&(r=Ht(r),t=Mr(t,a)),st(r,t)),ur(o,a,e,r)}}}function Wr(t,e,r){er(t),dr(t,e,ye,2,!0).push(ve(r))}var zr=class{constructor(t,e,r){if(this.buffer=t,r&&!e)throw Error();this.g=e}};function Yr(t,e){if("string"==typeof t)return new zr(x(t),e);if(Array.isArray(t))return new zr(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new zr(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new zr(t,!1);if(t.constructor===M)return e=C(t)||new Uint8Array(0),new zr(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new zr(t,!1);throw Error()}function qr(t,e){var r=0,n=0,i=0,s=t.h,o=t.g;do{var a=s[o++];r|=(127&a)<<i,i+=7}while(i<32&&128&a);if(i>32)for(n|=(127&a)>>4,i=3;i<32&&128&a;i+=7)n|=(127&(a=s[o++]))<<i;if(sn(t,o),!(128&a))return e(r>>>0,n>>>0);throw Error()}function Jr(t){for(var e=0,r=t.g,n=r+10,i=t.h;r<n;){let n=i[r++];if(e|=n,!(128&n))return sn(t,r),!!(127&e)}throw Error()}function Zr(t){var e=t.h,r=t.g,n=e[r++],i=127&n;if(128&n&&(i|=(127&(n=e[r++]))<<7,128&n&&(i|=(127&(n=e[r++]))<<14,128&n&&(i|=(127&(n=e[r++]))<<21,128&n&&(i|=(n=e[r++])<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw Error();return sn(t,r),i}function Qr(t){return Zr(t)>>>0}function tn(t){return qr(t,$t)}function en(t){var e=t.h,r=t.g,n=e[r],i=e[r+1],s=e[r+2];return e=e[r+3],sn(t,t.g+4),(n|i<<8|s<<16|e<<24)>>>0}function rn(t){var e=en(t);t=2*(e>>31)+1;var r=e>>>23&255;return e&=8388607,255==r?e?NaN:t*(1/0):0==r?1401298464324817e-60*t*e:t*Math.pow(2,r-150)*(e+8388608)}function nn(t){return Zr(t)}function sn(t,e){if(t.g=e,e>t.j)throw Error()}function on(t,e){if(e<0)throw Error();var r=t.g;if((e=r+e)>t.j)throw Error();return t.g=e,r}function an(t,e){if(0==e)return F();var r=on(t,e);return t.fa&&t.o?r=t.h.subarray(r,r+e):(t=t.h,r=r===(e=r+e)?new Uint8Array(0):It?t.slice(r,e):new Uint8Array(t.subarray(r,e))),0==r.length?F():new M(r,I)}var hn=class{constructor(t,e,r,n){this.h=null,this.o=!1,this.g=this.j=this.m=0,this.init(t,e,r,n)}init(t,e,r,{fa:n=!1,ma:i=!1}={}){this.fa=n,this.ma=i,t&&(t=Yr(t,this.ma),this.h=t.buffer,this.o=t.g,this.m=e||0,this.j=void 0!==r?this.m+r:this.h.length,this.g=this.m)}clear(){this.h=null,this.o=!1,this.g=this.j=this.m=0,this.fa=!1}},un=[],cn=0;function ln(t,e,r,n){if(An.length){let i=An.pop();return i.v(n),i.g.init(t,e,r,n),i}return new En(t,e,r,n)}function dn(t){t.g.clear(),t.j=-1,t.h=-1,An.length<100&&An.push(t)}function fn(t){var e=t.g;if(e.g==e.j)return!1;t.m=t.g.g;var r=Qr(t.g);if(e=r>>>3,!((r&=7)>=0&&r<=5))throw Error();if(e<1)throw Error();return t.j=e,t.h=r,!0}function pn(t){try{switch(t.h){case 0:0!=t.h?pn(t):Jr(t.g);break;case 1:var e=t.g;sn(e,e.g+8);break;case 2:if(2!=t.h)pn(t);else{var r=Qr(t.g),n=t.g;sn(n,n.g+r)}break;case 5:var i=t.g;sn(i,i.g+4);break;case 3:gn();let s=t.j;try{for(;;){if(!fn(t))throw Error();if(4==t.h){if(t.j!=s)throw Error();break}pn(t)}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{cn>0&&cn--}break;default:throw Error()}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}}function gn(){if(cn>=100)throw new SyntaxError;cn++}function mn(t,e,r){var n=t.g.j,i=Qr(t.g),s=(i=t.g.g+i)-n;if(s<=0&&(t.g.j=i,r(e,t,void 0,void 0,void 0),s=i-t.g.g),s)throw Error();return t.g.g=i,t.g.j=n,e}function vn(t){var e=Qr(t.g),r=on(t=t.g,e);if(t=t.h,u){var n,a=t;(n=o)||(n=o=new TextDecoder("utf-8",{fatal:!0})),e=r+e,a=0===r&&e===a.length?a:a.subarray(r,e);try{var c=n.decode(a)}catch(t){if(void 0===h){try{n.decode(new Uint8Array([128]))}catch(t){}try{n.decode(new Uint8Array([97])),h=!0}catch(t){h=!1}}throw!h&&(o=void 0),t}}else{e=(c=r)+e,r=[];let o,h=null;for(;c<e;){var l=t[c++];l<128?r.push(l):l<224?c>=e?i():(o=t[c++],l<194||128!=(192&o)?(c--,i()):r.push((31&l)<<6|63&o)):l<240?c>=e-1?i():(o=t[c++],128!=(192&o)||224===l&&o<160||237===l&&o>=160||128!=(192&(n=t[c++]))?(c--,i()):r.push((15&l)<<12|(63&o)<<6|63&n)):l<=244?c>=e-2?i():(o=t[c++],128!=(192&o)||o-144+(l<<28)>>30||128!=(192&(n=t[c++]))||128!=(192&(a=t[c++]))?(c--,i()):(l=(7&l)<<18|(63&o)<<12|(63&n)<<6|63&a,l-=65536,r.push(55296+(l>>10&1023),56320+(1023&l)))):i(),r.length>=8192&&(h=s(h,r),r.length=0)}c=s(h,r)}return c}function _n(t){var e=Qr(t.g);return an(t.g,e)}function yn(t,e,r){var n=Qr(t.g);for(n=t.g.g+n;t.g.g<n;)r.push(e(t.g))}var En=class{constructor(t,e,r,n){if(un.length){let i=un.pop();i.init(t,e,r,n),t=i}else t=new hn(t,e,r,n);this.g=t,this.m=this.g.g,this.h=this.j=-1,this.v(n)}v({ra:t=!1}={}){this.ra=t}},An=[];function wn(t){return new kn(4294967295&t,Math.floor(t/4294967296))}function bn(t){return t?/^\d+$/.test(t)?(jt(t),new kn(Ft,Ct)):null:Tn||=new kn(0,0)}var Tn,kn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};function Sn(t){return new Dn(4294967295&t,Math.floor(t/4294967296))}function Ln(t){return t?/^-?\d+$/.test(t)?(jt(t),new Dn(Ft,Ct)):null:xn||=new Dn(0,0)}var xn,Rn,In,Fn,Cn,Nn,Mn,On,Dn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};function Pn(t,e,r){return"undefined"!=typeof BigInt64Array?(Mn||(Mn=new BigInt64Array(1),On=new Uint32Array(Mn.buffer),Mn[0]=BigInt(1),Nn=1===On[0]),Mn[0]=t,new e(On[t=Nn?0:1],On[1-t])):(Cn||(Rn=BigInt(Number.MIN_SAFE_INTEGER),In=BigInt(Number.MAX_SAFE_INTEGER),Fn=BigInt(4294967295),Cn=BigInt(32)),t>=Rn&&t<=In?r(Number(t)):(t=BigInt.asUintN(64,t),new e(Number(t&Fn),Number(t>>Cn))))}function $n(t,e,r){for(;r>0||e>127;)t.g.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.g.push(e)}function Un(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Bn(t,e){if(e>=0)Un(t,e);else{for(let r=0;r<9;r++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Gn(t,e){jt(e),function(t){var e=Ct>>31;t(Ft<<1^e,(Ct<<1|Ft>>>31)^e)}((e,r)=>{$n(t,e>>>0,r>>>0)})}function jn(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)}var Vn=class{constructor(){this.g=[]}length(){return this.g.length}end(){var t=this.g;return this.g=[],t}};function Hn(t,e){0!==e.length&&(t.j.push(e),t.h+=e.length)}function Kn(t,e,r){Un(t.g,8*e+r)}function Xn(t,e){return Kn(t,e,2),e=t.g.end(),Hn(t,e),e.push(t.h),e}function Wn(t,e){var r=e.pop();for(r=t.h+t.g.length()-r;r>127;)e.push(127&r|128),r>>>=7,t.h++;e.push(r),t.h++}function zn(t,e,r){if(null!=r)switch(Kn(t,e,0),typeof r){case"number":t=t.g,Mt(r),$n(t,Ft,Ct);break;case"bigint":r=Pn(r,Dn,Sn),$n(t.g,r.h,r.g);break;default:r=Ln(r),$n(t.g,r.h,r.g)}}function Yn(t,e,r){Kn(t,e,2),Un(t.g,r.length),Hn(t,t.g.end()),Hn(t,r)}function qn(t,e,r,n){null!=r&&(e=Xn(t,e),n(r,t),Wn(t,e))}var Jn=class{constructor(){this.j=[],this.h=0,this.g=new Vn}};function Zn(t){if("string"==typeof t)Ln(t)}function Qn(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var ti=Qn(),ei=Qn(),ri=Qn(),ni=Qn(),ii=Qn(),si=Qn(),oi=Qn(),ai=Qn(),hi=Qn(),ui=Qn(),ci=Qn(),li=Qn();function di(t,e,r){var n=t.A;W&&W in n&&(n=n[W])&&delete n[e.g],e.h?e.o(t,e.h,e.g,r,e.j):e.o(t,e.g,r,e.j)}var fi=class{constructor(t,e){this.A=We(t,e,void 0,2048)}toJSON(){return Ke(this)}o(){var t=Na,e=this.A,r=t.g,n=W;if(G&&n&&null!=e[n]?.[r]&&U(z,3),e=t.g,Q&&W&&void 0===Q&&(n=(r=this.A)[W])&&(n=n.ka))try{n(r,e,Be)}catch(t){d(t)}return t.h?t.m(this,t.h,t.g,t.j):t.m(this,t.g,t.defaultValue,t.j)}clone(){var t=this.A,e=0|t[rt];return nr(this,t,e)?qe(this,t,!0):new this.constructor(Ze(t,e,!1))}};fi.prototype[Z]=ht,fi.prototype.toString=function(){return this.A.toString()};var pi=class{constructor(t,e,r){this.g=t,this.h=e,t=ti,this.j=!!t&&r===t||!1}};function gi(t,e){return new pi(t,e,ti)}function mi(t,e,r,n,i){qn(t,r,xi(e,n),i)}var vi,_i,yi=gi(function(t,e,r,n,i){return 2===t.h&&(mn(t,kr(e,n,r),i),!0)},mi),Ei=gi(function(t,e,r,n,i){return 2===t.h&&(mn(t,kr(e,n,r),i),!0)},mi),Ai=Symbol(),wi=Symbol(),bi=Symbol(),Ti=Symbol(),ki=Symbol();function Si(t,e,r,n){var i=n[t];if(i)return i;(i={}).Ea=n,i.ca=function(t){switch(typeof t){case"boolean":return Pe||=[0,void 0,!0];case"number":return t>0?void 0:0===t?$e||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var s=n[1],o=1;s&&s.constructor===Object&&(i.ia=s,"function"==typeof(s=n[++o])&&(i.wa=!0,vi??=s,_i??=n[o+1],s=n[o+=2]));for(var a={};s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var h=0;h<s.length;h++)a[s[h]]=s;s=n[++o]}for(h=1;void 0!==s;){let t;"number"==typeof s&&(h+=s,s=n[++o]);var u=void 0;if(s instanceof pi?t=s:(t=yi,o--),t?.j){s=n[++o],u=n;var c=o;"function"==typeof s&&(s=s(),u[c]=s),u=s}for(c=h+1,"number"==typeof(s=n[++o])&&s<0&&(c-=s,s=n[++o]);h<c;h++){let n=a[h];u?r(i,h,t,u,n):e(i,h,t,n)}}return n[t]=i}function Li(t){return Array.isArray(t)?t[0]instanceof pi?t:[Ei,t]:[t,void 0]}function xi(t,e){return t instanceof fi?t.A:Array.isArray(t)?Xe(t,e):void 0}function Ri(t,e,r,n){var i=r.g;t[e]=n?(t,e,r)=>i(t,e,r,n):i}function Ii(t,e,r,n,i){var s,o,a=r.g;t[e]=(t,e,r)=>a(t,e,r,o||=Si(wi,Ri,Ii,n).ca,s||=Fi(n),i)}function Fi(t){var e=t[bi];if(null!=e)return e;var r=Si(wi,Ri,Ii,t);return e=r.wa?(t,e)=>vi(t,e,r):(t,e)=>{t:{gn();try{for(;fn(e)&&4!=e.h;){let h=e.j,u=r[h];if(null==u){let t=r.ia;if(t){let e=t[h];if(e){let t=Ni(e);null!=t&&(u=r[h]=t)}}}if(null==u||!u(e,t,h)){var n=e;let r=n.m;if(pn(n),n.ra)var i=void 0;else{let t=n.g.g-r;n.g.g=r,i=an(n.g,t)}n=void 0;var s=t,o=h,a=i;a&&((n=s[W]??(s[W]=new Ue))[o]??(n[o]=[])).push(a)}}let u=Me(t);u&&(u.ka=r.Ea[ki]);var h=!0;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{cn>0&&cn--}h=void 0}return h},t[bi]=e,t[ki]=Ci.bind(t),e}function Ci(t,e,r,n){var i=this[wi],s=this[bi],o=Xe(void 0,i.ca),a=Me(t);if(a){var h=!1,u=i.ia;if(u){if(i=(e,r,i)=>{if(0!==i.length)if(u[r])for(let t of i){e=ln(t);try{h=!0,s(o,e)}finally{dn(e)}}else n?.(t,r,i)},null==e)Oe(a,i);else if(null!=a){let t=a[e];t&&i(a,e,t)}if(h){let n=0|t[rt];if(2&n&&2048&n&&!r?.cb)throw Error();let i=mt(n),s=(e,s)=>{if(null!=ar(t,e,i)){if(1===r?.lb)return;throw Error()}null!=s&&(n=ur(t,n,e,s,i)),delete a[e]};null==e?pt(o,0|o[rt],(t,e)=>{s(t,e)}):s(e,ar(o,e,i))}}}}function Ni(t){var e=(t=Li(t))[0].g;if(t=t[1]){let r=Fi(t),n=Si(wi,Ri,Ii,t).ca;return(t,i,s)=>e(t,i,s,n,r)}return e}function Mi(t,e,r){t[e]=r.h}function Oi(t,e,r,n){var i,s,o=r.h;t[e]=(t,e,r)=>o(t,e,r,s||=Si(Ai,Mi,Oi,n).ca,i||=Di(n))}function Di(t){var e=t[Ti];if(!e){let r=Si(Ai,Mi,Oi,t);e=(t,e)=>Pi(t,e,r),t[Ti]=e}return e}function Pi(t,e,r){pt(t,0|t[rt],(t,n)=>{if(null!=n){var i=function(t,e){var r=t[e];if(r)return r;if((r=t.ia)&&(r=r[e])){var n=(r=Li(r))[0].h;if(r=r[1]){let e=Di(r),i=Si(Ai,Mi,Oi,r).ca;r=t.wa?_i(i,e):(t,r,s)=>n(t,r,s,i,e)}else r=n;return t[e]=r}}(r,t);i?i(e,n,t):t<500||U(q,3)}}),(t=Me(t))&&Oe(t,(t,r,n)=>{for(Hn(e,e.g.end()),t=0;t<n.length;t++)Hn(e,C(n[t])||new Uint8Array(0))})}var $i=wt(0);function Ui(t,e,r){if(Array.isArray(e)){var n=0|e[rt];if(4&n)return e;for(var i=0,s=0;i<e.length;i++){let r=t(e[i]);null!=r&&(e[s++]=r)}return s<i&&(e.length=s),t=1|n,r&&(t=-1537&t|4),t!==n&&st(e,t),r&&2&t&&Object.freeze(e),e}}var Bi=(t,e)=>{var r=new Jn;Pi(t.A,r,Si(Ai,Mi,Oi,e)),Hn(r,r.g.end()),t=new Uint8Array(r.h);var n=(e=r.j).length,i=0;for(let r=0;r<n;r++){let n=e[r];t.set(n,i),i+=n.length}return r.j=[t],t};function Gi(t,e,r){return new pi(t,e,r)}function ji(t,e,r){return new pi(t,e,r)}function Vi(t,e,r){ur(t,0|t[rt],e,r,mt(0|t[rt]))}var Hi=gi(function(t,e,r,n,i){if(2!==t.h)return!1;if(t=Ht(t=mn(t,Xe([void 0,void 0],n),i)),i=mt(n=0|e[rt]),2&n)throw Error();var s=ar(e,r,i);if(s instanceof Ie)2&s.M?((s=s.ea()).push(t),ur(e,n,r,s,i)):s.gb(t);else if(Array.isArray(s)){var o=0|s[rt];8192&o||st(s,o|=8192),2&o&&ur(e,n,r,s=_r(s),i),s.push(t)}else ur(e,n,r,at([t]),i);return!0},function(t,e,r,n,i){if(e instanceof Ie)e.forEach((e,s)=>{qn(t,r,Xe([s,e],n),i)});else if(Array.isArray(e)){for(let s=0;s<e.length;s++){let o=e[s];Array.isArray(o)&&qn(t,r,Xe(o,n),i)}at(e)}});function Ki(t,e,r){null!=(e=Zt(e))&&(Kn(t,r,5),t=t.g,Ot(e),jn(t,Ft))}function Xi(t,e,r){null!=(e=ge(e))&&(Zn(e),zn(t,r,e))}function Wi(t,e,r){null!=(e=ne(e))&&null!=e&&(Kn(t,r,0),Bn(t.g,e))}function zi(t,e,r){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Kn(t,r,0),t.g.g.push(e?1:0))}function Yi(t,e,r){null!=(e=ye(e))&&Yn(t,r,l(e))}function qi(t,e,r,n,i){qn(t,r,xi(e,n),i)}function Ji(t,e,r){null!=(e=me(e))&&Yn(t,r,Yr(e,!0).buffer)}function Zi(t,e,r){null!=(e=ie(e))&&null!=e&&(Kn(t,r,0),Un(t.g,e))}function Qi(t,e,r){null!=(e=ne(e))&&(e=parseInt(e,10),Kn(t,r,0),Bn(t.g,e))}function ts(t,e,r){return(5===t.h||2===t.h)&&(e=Er(e,0|e[rt],r),2==t.h?yn(t,rn,e):e.push(rn(t.g)),!0)}function es(t,e,r){return 0===t.h&&(Vi(e,r,tn(t.g)),!0)}function rs(t,e,r){return(0===t.h||2===t.h)&&(e=Er(e,0|e[rt],r),2==t.h?yn(t,Zr,e):e.push(Zr(t.g)),!0)}function ns(t,e,r){return 2===t.h&&(Vi(e,r,(t=_n(t))===F()?void 0:t),!0)}var is=Gi(function(t,e,r){if(1!==t.h)return!1;var n=t.g;t=en(n);var i=en(n);n=2*(i>>31)+1;var s=i>>>20&2047;return t=4294967296*(1048575&i)+t,Vi(e,r,2047==s?t?NaN:n*(1/0):0==s?5e-324*n*t:n*Math.pow(2,s-1075)*(t+4503599627370496)),!0},function(t,e,r){null!=(e=Zt(e))&&(Kn(t,r,1),t=t.g,(r=Rt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),Ft=r.getUint32(0,!0),Ct=r.getUint32(4,!0),jn(t,Ft),jn(t,Ct))},ui),ss=Gi(function(t,e,r){return 5===t.h&&(Vi(e,r,rn(t.g)),!0)},Ki,hi),os=ji(ts,function(t,e,r){if(null!=(e=Ui(Zt,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Kn(n,i,5),n=n.g,Ot(s),jn(n,Ft))}},hi),as=ji(ts,function(t,e,r){if(null!=(e=Ui(Zt,e,!0))&&e.length){Kn(t,r,2),Un(t.g,4*e.length);for(let n=0;n<e.length;n++)r=t.g,Ot(e[n]),jn(r,Ft)}},hi),hs=Gi(function(t,e,r){return 5===t.h&&(Vi(e,r,0===(t=rn(t.g))?void 0:t),!0)},Ki,hi),us=Gi(function(t,e,r){return es(t,e,r)},Xi,si),cs=Gi(function(t,e,r){return es(t,e,r)},Xi,si),ls=ji(function(t,e,r){return 0!==t.h&&2!==t.h?t=!1:(e=Er(e,0|e[rt],r),2==t.h?yn(t,tn,e):e.push(tn(t.g)),t=!0),t},function(t,e,r){if(null!=(e=Ui(ge,e,!1)))for(let n=0;n<e.length;n++)zn(t,r,e[n])},si),ds=Gi(function(t,e,r){return 0!==t.h?e=!1:(Vi(e,r,(t=tn(t.g))===$i?void 0:t),e=!0),e},Xi,si),fs=Gi(function(t,e,r){return 0!==t.h?t=!1:(Vi(e,r,qr(t.g,Pt)),t=!0),t},function(t,e,r){if(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Xt(64,t));if(ee(t)){if("string"===e)return e=Yt(Number(t)),Wt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=ae(t)),t;if("number"===e)return ue(t)}}(e),null!=e){if("string"==typeof e)bn(e);if(null!=e)switch(Kn(t,r,0),typeof e){case"number":t=t.g,Mt(e),$n(t,Ft,Ct);break;case"bigint":r=Pn(e,kn,wn),$n(t.g,r.h,r.g);break;default:r=bn(e),$n(t.g,r.h,r.g)}}},oi),ps=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,Zr(t.g)),!0)},Wi,ni),gs=ji(rs,function(t,e,r){if(null!=(e=Ui(ne,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Kn(n,i,0),Bn(n.g,s))}},ni),ms=ji(rs,function(t,e,r){if(null!=(e=Ui(ne,e,!0))&&e.length){r=Xn(t,r);for(let r=0;r<e.length;r++)Bn(t.g,e[r]);Wn(t,r)}},ni),vs=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,0===(t=Zr(t.g))?void 0:t),!0)},Wi,ni),_s=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,Jr(t.g)),!0)},zi,ei),ys=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,!1===(t=Jr(t.g))?void 0:t),!0)},zi,ei),Es=ji(function(t,e,r){return 2===t.h&&(t=vn(t),Er(e,0|e[rt],r).push(t),!0)},function(t,e,r){if(null!=(e=Ui(ye,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&Yn(n,i,l(s))}},ri),As=Gi(function(t,e,r){return 2===t.h&&(Vi(e,r,""===(t=vn(t))?void 0:t),!0)},Yi,ri),ws=Gi(function(t,e,r){return 2===t.h&&(Vi(e,r,vn(t)),!0)},Yi,ri),bs=function(t,e,r=ti){return new pi(t,e,r)}(function(t,e,r,n,i){return 2===t.h&&(n=Xe(void 0,n),Er(e,0|e[rt],r).push(n),mn(t,n,i),!0)},function(t,e,r,n,i){if(Array.isArray(e)){for(let s=0;s<e.length;s++)qi(t,e[s],r,n,i);1&(t=0|e[rt])||st(e,1|t)}}),Ts=gi(function(t,e,r,n,i,s){if(2!==t.h)return!1;var o=0|e[rt];return br(e,o,s,r,mt(o)),mn(t,e=kr(e,n,r),i),!0},qi),ks=Gi(function(t,e,r){return 2===t.h&&(Vi(e,r,_n(t)),!0)},Ji,ci),Ss=ji(function(t,e,r){return 2===t.h&&(t=_n(t),Er(e,0|e[rt],r).push(t),!0)},function(t,e,r){if(null!=(e=Ui(me,e,!1)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&Yn(n,i,Yr(s,!0).buffer)}},ci),Ls=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,Qr(t.g)),!0)},Zi,ii),xs=ji(function(t,e,r){return(0===t.h||2===t.h)&&(e=Er(e,0|e[rt],r),2==t.h?yn(t,Qr,e):e.push(Qr(t.g)),!0)},function(t,e,r){if(null!=(e=Ui(ie,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Kn(n,i,0),Un(n.g,s))}},ii),Rs=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,0===(t=Qr(t.g))?void 0:t),!0)},Zi,ii),Is=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,Zr(t.g)),!0)},Qi,li),Fs=Gi(function(t,e,r){return 0===t.h&&(Vi(e,r,0===(t=Zr(t.g))?void 0:t),!0)},Qi,li),Cs=Gi(function(t,e,r){return 0!==t.h?t=!1:(Vi(e,r,function(t){return qr(t,(t,e)=>{var r=-(1&t);return $t(t=(t>>>1|e<<31)^r,e>>>1^r)})}(t.g)),t=!0),t},function(t,e,r){if(null!=(e=ge(e))&&(Zn(e),null!=e))switch(Kn(t,r,0),typeof e){case"number":t=t.g,e=(r=e)<0,Nt(r=2*Math.abs(r)),r=Ft;let n=Ct;e&&(0==r?0==n?n=r=4294967295:(n--,r=4294967295):r--),$n(t,Ft=r,Ct=n);break;case"bigint":t=t.g,e=e<<BigInt(1)^e>>BigInt(63),Ft=Number(BigInt.asUintN(32,e)),Ct=Number(BigInt.asUintN(32,e>>BigInt(32))),$n(t,Ft,Ct);break;default:Gn(t.g,e)}},ai);class Ns{constructor(t,e){var r=io;this.g=t,this.h=e,this.m=Lr,this.o=Fr,this.defaultValue=void 0,this.j=null!=r.jb?gt:void 0}register(){_(this)}}function Ms(t,e){return new Ns(t,e)}function Os(t,e){return(r,n)=>{t:{let s={ma:!0};n&&Object.assign(s,n),r=ln(r,void 0,void 0,s);try{let n=new t,s=n.A;Fi(e)(s,r);var i=n;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{dn(r)}i=void 0}return i}}function Ds(t){return e=>Bi(e,t)}function Ps(t){return function(){return Bi(this,t)}}var $s=[0,ks,Ss,_s,ws],Us=[0,As,[0,Fs,[0,ds,vs],Fs,-1,[0,Is],Fs,-1],Gi(ns,Ji,ci)];var Bs,Gs=class extends fi{constructor(t){super(t)}},js=[0,As,Gi(ns,function(t,e,r){if(null!=e){if(e instanceof fi){let n=e.mb;return void(n?(e=n(e),null!=e&&Yn(t,r,Yr(e,!0).buffer)):U(q,3))}if(Array.isArray(e))return void U(q,3)}Ji(t,e,r)},ci)],Vs=[0,1,[0,12,ps,10,_s],[0,7,[0,ps,-1]]],Hs=globalThis.trustedTypes;var Ks=class{constructor(t){this.g=t}toString(){return this.g+""}};function Xs(t){var e;return void 0===Bs&&(Bs=function(){var t=null;if(!Hs)return t;try{let e=t=>t;t=Hs.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}()),t=(e=Bs)?e.createScriptURL(t):t,new Ks(t)}function Ws(t,...e){if(0===e.length)return Xs(t[0]);var r=t[0];for(let n=0;n<e.length;n++)r+=encodeURIComponent(e[n])+t[n+1];return Xs(r)}var zs=[0,ps,Is,_s,-1,ms,Is,-1,_s,-1],Ys=[0,Is,-1,_s],qs=class extends fi{constructor(t){super(t)}},Js=[0,_s,ws,_s,Is,-1,ji(function(t,e,r){return(0===t.h||2===t.h)&&(e=Er(e,0|e[rt],r),2==t.h?yn(t,nn,e):e.push(Zr(t.g)),!0)},function(t,e,r){if(null!=(e=Ui(ne,e,!0))&&e.length){r=Xn(t,r);for(let r=0;r<e.length;r++)Bn(t.g,e[r]);Wn(t,r)}},li),ws,-1,[0,_s,-1],Is,_s,-1,Ys],Zs=[0,3,_s,-1,2,[0,[2],ps,Ts,[0,Ls]],[0,Is,_s,Is,_s,Is,4,[0,_s,ws,-1,_s]],[0,[3,4],ws,-1,Ts,[0,ps],Ts,[0,Is,-1]],[0]],Qs=[0,ws,-2],to=class extends fi{constructor(t){super(t)}},eo=[0],ro=class extends fi{constructor(t){super(t)}},no=[0,ps,_s,1,_s,-4],io=class extends fi{constructor(t){super(t,2)}},so={};so[336783863]=[0,ws,_s,-1,ps,[0,[1,2,3,4,5,6,7,8,9],Ts,eo,Ts,Js,Ts,Qs,Ts,no,Ts,zs,Ts,[0,ws,-2],Ts,[0,ws,Is],Ts,Zs,Ts,Ys],[0,ws],_s,[0,[1,3],[2,4],Ts,[0,ms],-1,Ts,[0,Es],-1,bs,[0,ws,-1]],ws];var oo=[0,ds,-1,ys,-3,ds,ms,As,vs,ds,-1,ys,vs,ys,-2,As];function ao(t,e){Wr(t,3,e)}function ho(t,e){Wr(t,4,e)}var uo=class extends fi{constructor(t){super(t,500)}v(t){return Fr(this,0,7,t)}},co=[-1,{}],lo=[0,ws,1,co],fo=[0,ws,Es,co];function po(t,e){Or(t,1,uo,e)}function go(t,e){Wr(t,10,e)}function mo(t,e){Wr(t,15,e)}var vo=class extends fi{constructor(t){super(t,500)}v(t){return Fr(this,0,1001,t)}},_o=[-500,bs,[-500,As,-1,Es,-3,[-2,so,_s],bs,js,vs,-1,lo,fo,bs,[0,As,ys],As,oo,vs,Es,987,Es],4,bs,[-500,ws,-1,[-1,{}],998,ws],bs,[-500,ws,Es,-1,[-2,{},_s],997,Es,-1],vs,bs,[-500,ws,Es,co,998,Es],Es,vs,lo,fo,bs,[0,As,-1,co],Es,-2,oo,As,-1,ys,[0,ys,Rs],978,co,bs,js];vo.prototype.g=Ps(_o);var yo=Os(vo,_o),Eo=class extends fi{constructor(t){super(t)}},Ao=class extends fi{constructor(t){super(t)}g(){return Rr(this,Eo,1)}},wo=[0,bs,[0,ps,ss,ws,-1]],bo=Os(Ao,wo),To=class extends fi{constructor(t){super(t)}},ko=class extends fi{constructor(t){super(t)}},So=class extends fi{constructor(t){super(t)}j(){return Lr(this,To,2)}g(){return Rr(this,ko,5)}},Lo=Os(class extends fi{constructor(t){super(t)}},[0,Es,ms,as,[0,Is,[0,ps,-3],[0,ss,-3],[0,ps,-1,[0,bs,[0,ps,-2]]],bs,[0,ss,-1,ws,ss]],ws,-1,cs,bs,[0,ps,ss],Es,cs]),xo=class extends fi{constructor(t){super(t)}},Ro=Os(class extends fi{constructor(t){super(t)}},[0,bs,[0,ss,-4]]),Io=class extends fi{constructor(t){super(t)}},Fo=Os(class extends fi{constructor(t){super(t)}},[0,bs,[0,ss,-4]]),Co=class extends fi{constructor(t){super(t)}},No=[0,ps,-1,as,Is],Mo=class extends fi{constructor(t){super(t)}};Mo.prototype.g=Ps([0,ss,-4,cs]);var Oo=class extends fi{constructor(t){super(t)}},Do=Os(class extends fi{constructor(t){super(t)}},[0,bs,[0,1,ps,ws,wo],cs]),Po=class extends fi{constructor(t){super(t)}},$o=class extends fi{constructor(t){super(t)}g(){var t=or(this,1,void 0,vr);return null==t?F():t}},Uo=class extends fi{constructor(t){super(t)}},Bo=[1,2],Go=Os(class extends fi{constructor(t){super(t)}},[0,bs,[0,Bo,Ts,[0,as],Ts,[0,ks],ps,ws],cs]),jo=class extends fi{constructor(t){super(t)}},Vo=[0,ws,ps,ss,Es,-1],Ho=class extends fi{constructor(t){super(t)}},Ko=[0,_s,-1],Xo=class extends fi{constructor(t){super(t)}g(){return cr(this,qs,2,Wo)}},Wo=[1,2,3,4,5,6],zo=class extends fi{constructor(t){super(t)}g(){return null!=or(this,1,void 0,vr)}j(){return null!=ye(or(this,2))}},Yo=class extends fi{constructor(t){super(t)}},qo=[0,ks,ws,[0,ps,cs,-1],[0,fs,cs]],Jo=[0,qo,_s,[0,Wo,Ts,no,Ts,Js,Ts,zs,Ts,eo,Ts,Qs,Ts,Zs],Is],Zo=Ds(Jo),Qo=class extends fi{constructor(t){super(t)}},ta=[0,Jo,ss,-1,ps],ea=Ms(502141897,Qo);so[502141897]=ta;var ra=Os(class extends fi{constructor(t){super(t)}},[0,[0,Is,-1,os,xs],No]),na=class extends fi{constructor(t){super(t)}},ia=class extends fi{constructor(t){super(t)}},sa=[0,Jo,ss,[0,Jo],_s],oa=Ms(508968150,ia);so[508968150]=[0,Jo,ta,sa,ss,[0,[0,qo]]],so[508968149]=sa;var aa=class extends fi{constructor(t){super(t)}j(){return Lr(this,jo,2)}g(){hr(this,2)}},ha=[0,Jo,Vo];so[478825465]=ha;var ua=class extends fi{constructor(t){super(t)}},ca=class extends fi{constructor(t){super(t)}},la=class extends fi{constructor(t){super(t)}},da=class extends fi{constructor(t){super(t)}},fa=class extends fi{constructor(t){super(t)}},pa=[0,Jo,[0,Jo],ha,-1],ga=[0,Jo,ss,ps],ma=[0,Jo,ss],va=[0,Jo,ga,ma,ss],_a=Ms(479097054,fa);so[479097054]=[0,Jo,va,pa],so[463370452]=pa,so[464864288]=ga;var ya=Ms(462713202,da);so[462713202]=va,so[474472470]=ma;var Ea=class extends fi{constructor(t){super(t)}},Aa=class extends fi{constructor(t){super(t)}},wa=class extends fi{constructor(t){super(t)}},ba=class extends fi{constructor(t){super(t)}},Ta=[0,Jo,ss,-1,ps],ka=[0,Jo,ss,_s];ba.prototype.g=Ps([0,Jo,ma,[0,Jo],ta,sa,Ta,ka]);var Sa=class extends fi{constructor(t){super(t)}},La=Ms(456383383,Sa);so[456383383]=[0,Jo,Vo];var xa=class extends fi{constructor(t){super(t)}},Ra=Ms(476348187,xa);so[476348187]=[0,Jo,Ko];var Ia=class extends fi{constructor(t){super(t)}},Fa=class extends fi{constructor(t){super(t)}},Ca=[0,Is,-1],Na=Ms(458105876,class extends fi{constructor(t){super(t)}g(){var t=this.A,e=0|t[rt],r=ut(this,e);return t=function(t,e,r,n){var i=Fa;!n&&tr(t)&&(r=0|(e=t.A)[rt]);var s=ar(e,2);if(t=!1,null==s){if(n)return Ne();s=[]}else if(s.constructor===Ie){if(!(2&s.M)||n)return s;s=s.ea()}else Array.isArray(s)?t=!!(2&s[rt]):s=[];if(n){if(!s.length)return Ne();t||(t=!0,ot(s))}else t&&(t=!1,at(s),s=_r(s));return!t&&32&r&&it(s,32),r=ur(e,r,2,n=new Ie(s,i,Ae,void 0)),t||rr(e,r),n}(this,t,e,r),!r&&Fa&&(t.Fa=!0),t}});so[458105876]=[0,Ca,Hi,[!0,cs,[0,ws,-1,Es]],[0,ms,_s,Is],_s];var Ma=class extends fi{constructor(t){super(t)}},Oa=Ms(458105758,Ma);so[458105758]=[0,Jo,ws,Ca];var Da=class extends fi{constructor(t){super(t)}},Pa=class extends fi{constructor(t){super(t)}},$a=class extends fi{constructor(t){super(t)}},Ua=Ds([0,bs,[0,Fs,bs,[0,hs,-1],ys]]),Ba=class extends fi{constructor(t){super(t)}},Ga=[0,hs,-1,ys],ja=class extends fi{constructor(t){super(t)}},Va=class extends fi{constructor(t){super(t)}},Ha=[1,2];Va.prototype.g=Ps([0,Ha,Ts,Ga,Ts,[0,bs,Ga]]);var Ka=class extends fi{constructor(t){super(t)}},Xa=Ms(443442058,Ka);so[443442058]=[0,Jo,ws,ps,ss,Es,-1,_s,ss],so[514774813]=Ta;var Wa=class extends fi{constructor(t){super(t)}},za=Ms(516587230,Wa);function Ya(t,e){return e=e?e.clone():new jo,void 0!==t.displayNamesLocale?hr(e,1,_e(t.displayNamesLocale)):void 0===t.displayNamesLocale&&hr(e,1),void 0!==t.maxResults?Br(e,2,t.maxResults):"maxResults"in t&&hr(e,2),void 0!==t.scoreThreshold?Vr(e,3,t.scoreThreshold):"scoreThreshold"in t&&hr(e,3),void 0!==t.categoryAllowlist?Xr(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&hr(e,4),void 0!==t.categoryDenylist?Xr(e,5,t.categoryDenylist):"categoryDenylist"in t&&hr(e,5),e}function qa(t){var e=Number(t);return Number.isSafeInteger(e)?e:String(t)}function Ja(t,e=-1,r=""){return{categories:t.map(t=>({index:Dr(t,1)??0??-1,score:Pr(t,2)??0,categoryName:ye(or(t,3))??""??"",displayName:ye(or(t,4))??""??""})),headIndex:e,headName:r}}function Za(t){var e={classifications:Rr(t,Oo,1).map(t=>Ja(Lr(t,Ao,4)?.g()??[],Dr(t,2)??0,ye(or(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(bt(t)?t=Number(t):(t=Kt(64,t),t=bt(t)?Number(t):String(t)),t):ee(t)?"number"==typeof t?he(t):le(t):void 0}(or(t,2,void 0,pe))&&(e.timestampMs=qa(or(t,2,void 0,pe)??ir)),e}function Qa(t){var e=dr(t,3,Zt,lr()),r=dr(t,2,ne,lr()),n=dr(t,1,ye,lr()),i=dr(t,9,ye,lr()),s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:r[t]??-1,categoryName:n[t]??"",displayName:i[t]??""});if((e=Lr(t,So,4)?.j())&&(s.boundingBox={originX:Dr(e,1,sr)??0,originY:Dr(e,2,sr)??0,width:Dr(e,3,sr)??0,height:Dr(e,4,sr)??0,angle:0}),Lr(t,So,4)?.g().length)for(let e of Lr(t,So,4).g())s.keypoints.push({x:or(e,1,sr,Zt)??0,y:or(e,2,sr,Zt)??0,score:or(e,4,sr,Zt)??0,label:ye(or(e,3,sr))??""});return s}function th(t){var e=[];for(let r of Rr(t,Io,1))e.push({x:Pr(r,1)??0,y:Pr(r,2)??0,z:Pr(r,3)??0,visibility:Pr(r,4)??0});return e}function eh(t){var e=[];for(let r of Rr(t,xo,1))e.push({x:Pr(r,1)??0,y:Pr(r,2)??0,z:Pr(r,3)??0,visibility:Pr(r,4)??0});return e}function rh(t){return Array.from(t,t=>t>127?t-256:t)}function nh(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);var r=0,n=0,i=0;for(let s=0;s<t.length;s++)r+=t[s]*e[s],n+=t[s]*t[s],i+=e[s]*e[s];if(n<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*i)}so[516587230]=[0,Jo,Ta,ka,ss],so[518928384]=ka;var ih,sh=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 oh(t){if(t)return!0;if(void 0===ih)try{await WebAssembly.instantiate(sh),ih=!0}catch{ih=!1}return ih}async function ah(t,e,r){return{wasmLoaderPath:`${e}/${t}_${r=`wasm${r?"_module":""}${await oh(r)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${e}/${t}_${r}.wasm`}}var hh=class{};function uh(t){return hr(new ch,1,re(t))}hh.forVisionTasks=function(t,e=!1){return ah("vision",t??Ws``,e)},hh.forTextTasks=function(t,e=!1){return ah("text",t??Ws``,e)},hh.forGenAiTasks=function(t,e=!1){return ah("genai",t??Ws``,e)},hh.forAudioTasks=function(t,e=!1){return ah("audio",t??Ws``,e)},hh.isSimdSupported=function(t=!1){return oh(t)};var ch=class extends fi{constructor(t){super(t)}},lh=class extends fi{constructor(t){super(t)}},dh=[0,Is,2,fs,-2,cs,bs,[0,Is,cs]],fh=class extends fi{constructor(t){super(t)}},ph=class extends fi{constructor(t){super(t)}};function gh(t,e){return hr(t,1,re(e))}function mh(t,e){return hr(t,2,re(e))}var vh=class extends fi{constructor(t){super(t)}},_h=[3,4,5,6,7],yh=class extends fi{constructor(t){super(t)}},Eh=class extends fi{constructor(t){super(t)}};Eh.prototype.g=Ps([0,[0,Is,ws,-3,Is],[0,_h,Is,-1,Ts,[0,Is,ws,fs],Ts,dh,Ts,[0,1,dh],Ts,[0,Is],Ts,[0,Is,ws,fs]]]);var Ah=class{constructor(){this.g="undefined"!=typeof AbortController}async send(t,e,r){var n=this.g?new AbortController:void 0,i=n&&t.la>0?setTimeout(()=>{n.abort()},t.la):void 0;try{let i=await fetch(t.url,{method:t.bb,headers:{...t.ab},...t.body&&{body:t.body},...t.withCredentials&&{credentials:"include"},signal:t.la&&n?n.signal:null});200===i.status?e?.(await i.text()):r?.(i.status)}catch(t){if("AbortError"===t?.name)r?.(408);else r?.(400)}finally{clearTimeout(i)}}},wh=class extends fi{constructor(t){super(t,37)}},bh=[-4,{},Vs,Is,Us],Th=[0,ws,Is,1,ws,-1,Is,1,Is,1,cs],kh=[0,Is,ws,-2],Sh=[0,ws,Is],Lh=[0,ws,Is],xh=[0,_s,-3],Rh=[0,Is,ws,-1,cs,ps,-1,ws,-5,bs,[0,ws,-4],-1,_s,[0,_s,-3],Is];var Ih=class extends fi{constructor(t){super(t,19)}},Fh=Ds([-19,{},[0,Is,1,[0,ws,-6,cs,ps,ws,-1,cs],1,[0,ws,1,ws,-5],ws,-1,[0,Is,ws,-8],[0,ws,-3],[0,ws,Is,ws,-2],[0,ws,-1,Is,ws,-1,Is,ws,-1,[0,bs,[0,ws,-1],_s,ws,-5],[0,Is,_s,ps,-2]],cs,[0,ws,-3,cs,ps,ws,-1],[0,Is,ws,-1],[0,ws,-9],[0,ws,-6,Is,ws,1,ws,_s,Is,-1,_s,ws,-2,Is,ws,Is,ws,ps,-1],1,[0,Is],1,[0,ws,-4],1,Th,[0,[1,2,3,4,5,6],Ts,Th,Ts,Sh,Ts,Lh,Ts,[0,Is],Ts,Rh,Ts,kh],Sh,Lh,Rh,[0,[0,Is,ws,-1,cs,ps,-1,ws,-4,bs,[0,ws,-4],-1,1,xh],[0,Is,ws,-1,cs,ps,-1,ws,-4,xh]],kh,[0,ws,[0,ps,-3,Is],Is,-2,[0,ps,-1],_s],4,[0,ws,Is,ws,-1,cs,Is,ws,-1,Is,ps,-1]],Is,bs,[-37,{},us,ws,bs,[0,ws,-1],ks,1,ks,[0,Es,-1,gs,ls,-1],ws,[0,ps,ws,-1],_s,ps,cs,ws,-1,Cs,$s,us,ks,Is,gs,cs,-1,[0,Is,-1],ws,_s,ws,ms,ws,-1,is,1,is,bh,_s,[0,Is,[0,ss,ps,-2],[0,ss]],[0,Is,cs]],us,Ss,ws,-1,us,Is,-1,[0,_s,-1,Is,_s],[0,cs,-1,ws],[0,us,_s,cs],cs,1,Ls,1,bh]),Ch=class{constructor(t){this.h=[],this.m=new Ah,this.j=t??"",this.g=setInterval(()=>{this.flush()},6e4)}close(){void 0!==this.g&&(clearInterval(this.g),this.g=void 0),this.flush()}flush(t,e){if(this.error)e?.("net-send-failed");else if(0===this.h.length)t?.();else{var r=this.h;this.h=[],r=function(t){var e=new Ih;return Nr(e=hr(e,2,re(1786)),3,t)}(r),r=Fh(r),this.m.send({url:"https://odml.pa.googleapis.com/v1/log",bb:"POST",la:1e4,body:r,hb:2,ab:{"Content-Type":"application/x-protobuf","x-goog-api-key":this.j},withCredentials:!1},()=>{t?.()},t=>{this.error=Error(`Logging failed with HTTP error: ${t}`),this.h=[],void 0!==this.g&&(clearInterval(this.g),this.g=void 0),e?.("net-send-failed",t)})}}};class Nh{constructor(){this.aa=this.U=this.X=this.R=this.V=this.T=this.P=0}}function Mh(t,e){var r=new Eh;r=Fr(r,0,1,t.B),r=Fr(r,0,2,e),e=hr(e=new wh,6,lt(r=r.g(),!1)),(t=t.l).error||t.h.push(e)}function Oh(t,e){var r={P:e.P-t.j.P,T:e.T-t.j.T,V:e.V-t.j.V,R:e.R-t.j.R,X:e.X-t.j.X,U:e.U,aa:e.aa},n=mh(gh(new vh,t.C),1);r=Dh(t,r),Mh(t,n=Cr(n,4,_h,r)),t.j=e}function Dh(t,e){var r=new lh;return t=jr(t=Gr(t=hr(r,1,re(t.D)),7,e.R),5,e.U),t=jr(t,6,e.aa),e.V>0&&jr(t,4,e.X/e.V),0!==e.P&&(r=Gr(r=uh(3),2,e.P),Or(t,8,ch,r)),0!==e.T&&(e=Gr(r=uh(4),2,e.T),Or(t,8,ch,e)),t}var Ph=class{constructor(t,e,r){this.u=performance.now(),this.m=performance.now(),this.h=new Map,this.o=0,this.g=new Nh,this.j=new Nh,this.l=new Ch(r),this.C=function(t){switch(t){case"AudioClassifier":return 4;case"AudioEmbedder":return 5;case"TextClassifier":return 6;case"TextEmbedder":return 7;case"GestureRecognizer":return 8;case"HandDetector":return 9;case"HandLandmarker":return 10;case"ImageClassifier":return 11;case"ImageEmbedder":return 12;case"ImageSegmenter":return 13;case"ObjectDetector":return 14;case"FaceDetector":return 15;case"FaceLandmarker":return 16;case"InteractiveSegmenter":case"InteractiveSegmenterLegacy":return 18;case"HolisticLandmarker":return 20;case"LlmInference":return 21;case"LanguageDetector":return 22;case"PoseLandmarker":return 23;default:return 0}}(t),this.D=function(t){switch(t){case"IMAGE":return 11;case"VIDEO":return 12;case"LIVE_STREAM":return 13;case"AUDIO_CLIPS":return 14;case"AUDIO_STREAM":return 15;default:return 10}}(e),t=new yh,"undefined"==typeof window?e=0:(e=navigator.userAgent,e=/Android/i.test(e)?1:/iPhone|iPad|iPod/i.test(e)?2:/Windows/i.test(e)?5:/Macintosh/i.test(e)?4:/Linux/i.test(e)?3:0),t=hr(t,1,re(e)),t=hr(t,2,_e("")),t=hr(t,3,_e("")),t=hr(t,4,_e("1.0.1")),t=hr(t,5,_e("")),this.B=hr(t,6,re(4))}ya(){var t=new ph;t=jr(t=hr(t,1,re(this.D)),3,performance.now()-this.u),Mh(this,t=Cr(mh(gh(new vh,this.C),0),3,_h,t)),this.m=performance.now()}za(t){var e=this.h.get(t);if(void 0!==e&&(this.h.delete(t),t=performance.now()-e,++this.g.V,this.g.X+=t,this.g.U=Math.max(this.g.U,t),this.o=Math.max(this.o,t),performance.now()>this.m+3e4)){for(let[r,n]of this.h.entries())t=r,n<e&&(this.g.R++,this.h.delete(t));e={...this.g,aa:performance.now()-this.m},this.g.U=0,this.m=performance.now(),Oh(this,e)}}xa(){var t={...this.g,R:this.g.R+this.h.size,U:this.o,aa:performance.now()-this.u};Oh(this,t);var e=new fh;e=Fr(e,0,2,t=Dh(this,t)),Mh(this,e=Cr(t=mh(gh(new vh,this.C),2),5,_h,e))}close(){var t=this.l;"function"==typeof t.close?t.close():t.flush()}};function $h(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Uh(t){if("function"!=typeof importScripts){let e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((t,r)=>{e.addEventListener("load",()=>{t()},!1),e.addEventListener("error",t=>{r(t)},!1),document.body.appendChild(e)})}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;{let e=self.import;e?await e(t.toString()):await import(t.toString())}}}function Bh(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function Gh(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function jh(t,e,r){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(r?t.i._bindTextureToStream(r):t.i._bindTextureToCanvas(),!(r=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`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);var[n,i]=Bh(e);return!t.j||n===t.i.canvas.width&&i===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=i),[n,i]}function Vh(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(e.length);for(let r=0;r<e.length;r++)n[r]=t.i.stringToNewUTF8(e[r]);e=t.i._malloc(4*n.length),t.i.HEAPU32.set(n,e>>2),r(e);for(let e of n)t.i._free(e);t.i._free(e)}function Hh(t,e,r){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=r}function Kh(t,e,r){var n=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(r(n,i),n=[]):n.push(t)}}var Xh=class{constructor(t,e){this.j=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:$h()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){var 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){var r=t.length,n=this.i._malloc(r);this.i.HEAPU8.set(t,n),e?this.i._changeBinaryGraph(r,n):this.i._changeTextGraph(r,n),this.i._free(n)}configureAudio(t,e,r,n,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Gh(this,n||"input_audio",n=>{Gh(this,i=i||"audio_header",i=>{this.i._configureAudio(n,i,t,e??0,r)})})}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ja(t){Hh(this,"__graph_config__",e=>{t(e)}),Gh(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,r){this.addAudioToStreamWithShape(t,0,0,e,r)}addAudioToStreamWithShape(t,e,r,n,i){var 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),Gh(this,n,t=>{this.i._addAudioToInputStream(this.g,e,r,t,i)})}addGpuBufferToStream(t,e,r){Gh(this,e,e=>{var[n,i]=jh(this,t,e);this.i._addBoundTextureToStream(e,n,i,r)})}addBoolToStream(t,e,r){Gh(this,e,e=>{this.i._addBoolToInputStream(t,e,r)})}addDoubleToStream(t,e,r){Gh(this,e,e=>{this.i._addDoubleToInputStream(t,e,r)})}addFloatToStream(t,e,r){Gh(this,e,e=>{this.i._addFloatToInputStream(t,e,r)})}addIntToStream(t,e,r){Gh(this,e,e=>{this.i._addIntToInputStream(t,e,r)})}addUintToStream(t,e,r){Gh(this,e,e=>{this.i._addUintToInputStream(t,e,r)})}addStringToStream(t,e,r){Gh(this,e,e=>{Gh(this,t,t=>{this.i._addStringToInputStream(t,e,r)})})}addStringRecordToStream(t,e,r){Gh(this,e,e=>{Vh(this,Object.keys(t),n=>{Vh(this,Object.values(t),i=>{this.i._addFlatHashMapToInputStream(n,i,Object.keys(t).length,e,r)})})})}addProtoToStream(t,e,r,n){Gh(this,r,r=>{Gh(this,e,e=>{var i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,r,n),this.i._free(i)})})}addEmptyPacketToStream(t,e){Gh(this,t,t=>{this.i._addEmptyPacketToInputStream(t,e)})}addBoolVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputStream(n,e,r)})}addDoubleVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputStream(n,e,r)})}addFloatVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputStream(n,e,r)})}addIntVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputStream(n,e,r)})}addUintVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.i._addUintVectorEntry(n,e);this.i._addUintVectorToInputStream(n,e,r)})}addStringVectorToStream(t,e,r){Gh(this,e,e=>{var n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let e of t)Gh(this,e,t=>{this.i._addStringVectorEntry(n,t)});this.i._addStringVectorToInputStream(n,e,r)})}addBoolToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addBoolToInputSidePacket(t,e)})}addDoubleToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addDoubleToInputSidePacket(t,e)})}addFloatToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addFloatToInputSidePacket(t,e)})}addIntToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addIntToInputSidePacket(t,e)})}addUintToInputSidePacket(t,e){Gh(this,e,e=>{this.i._addUintToInputSidePacket(t,e)})}addStringToInputSidePacket(t,e){Gh(this,e,e=>{Gh(this,t,t=>{this.i._addStringToInputSidePacket(t,e)})})}addProtoToInputSidePacket(t,e,r){Gh(this,r,r=>{Gh(this,e,e=>{var n=this.i._malloc(t.length);this.i.HEAPU8.set(t,n),this.i._addProtoToInputSidePacket(n,t.length,e,r),this.i._free(n)})})}addBoolVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.i._addBoolVectorEntry(r,e);this.i._addBoolVectorToInputSidePacket(r,e)})}addDoubleVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.i._addDoubleVectorEntry(r,e);this.i._addDoubleVectorToInputSidePacket(r,e)})}addFloatVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.i._addFloatVectorEntry(r,e);this.i._addFloatVectorToInputSidePacket(r,e)})}addIntVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.i._addIntVectorEntry(r,e);this.i._addIntVectorToInputSidePacket(r,e)})}addUintVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.i._addUintVectorEntry(r,e);this.i._addUintVectorToInputSidePacket(r,e)})}addStringVectorToInputSidePacket(t,e){Gh(this,e,e=>{var r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(let e of t)Gh(this,e,t=>{this.i._addStringVectorEntry(r,t)});this.i._addStringVectorToInputSidePacket(r,e)})}attachBoolListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachBoolListener(t)})}attachBoolVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachBoolVectorListener(t)})}attachIntListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachIntListener(t)})}attachIntVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachIntVectorListener(t)})}attachUintListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachUintListener(t)})}attachUintVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachUintVectorListener(t)})}attachDoubleListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachDoubleListener(t)})}attachDoubleVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachDoubleVectorListener(t)})}attachFloatListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachFloatListener(t)})}attachFloatVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachFloatVectorListener(t)})}attachStringListener(t,e){Hh(this,t,e),Gh(this,t,t=>{this.i._attachStringListener(t)})}attachStringVectorListener(t,e){Kh(this,t,e),Gh(this,t,t=>{this.i._attachStringVectorListener(t)})}attachProtoListener(t,e,r){Hh(this,t,e),Gh(this,t,t=>{this.i._attachProtoListener(t,r||!1)})}attachProtoVectorListener(t,e,r){Kh(this,t,e),Gh(this,t,t=>{this.i._attachProtoVectorListener(t,r||!1)})}attachAudioListener(t,e,r){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Hh(this,t,(t,r)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,r)}),Gh(this,t,t=>{this.i._attachAudioListener(t,r||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}};function Wh(t){return class extends t{get pa(){return this.i}Sa(){if("function"==typeof this.pa._mediapipeLoggerGetEncodedApiKey){let t=this.pa._mediapipeLoggerGetEncodedApiKey();return this.pa._decodeBase64(t)}}}}function zh(t){return class extends t{Za(){this.i._registerModelResourcesGraphService()}}}var Yh=Wh(zh(Xh)),qh=class extends Yh{};async function Jh(t,e,r,n){return t=await(async(t,e,r,n,i)=>{if(e&&await Uh(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await Uh(r),!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,n)})(t,r.wasmLoaderPath,r.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&t.endsWith(".data")?r.assetBinaryPath.toString():t}),function(t,e){e=e.runningMode??"";var r=t.g.Sa();t.m=new Ph(t.C(),e,r)}(t,n),await t.v(n),t}async function Zh(t,e,r,n){return Jh(t,e,r,n)}function Qh(t,e){var r=Lr(t.baseOptions,zo,1)||new zo;"string"==typeof e?(hr(r,2,_e(e)),hr(r,1)):e instanceof Uint8Array&&(hr(r,1,lt(e,!1)),hr(r,2)),Fr(t.baseOptions,0,1,r)}function tu(t){try{let e=t.K.length;if(1===e)throw Error(t.K[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.K.map(t=>t.message).join(", "))}finally{t.K=[]}}function eu(t,e){t.I=Math.max(t.I,e)}function ru(t,e){t.D=new uo,Kr(t.D,2,"PassThroughCalculator"),ao(t.D,"free_memory"),ho(t.D,"free_memory_unused_out"),go(e,"free_memory"),po(e,t.D)}function nu(t,e){ao(t.D,e),ho(t.D,e+"_unused_out")}function iu(t){t.g.addBoolToStream(!0,"free_memory",t.I)}var su=class{constructor(t){this.g=t,this.K=[],this.I=0,this.g.setAutoRenderToScreen(!1)}j(t,e=!0){if(e){let e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Lr(this.baseOptions,zo,1)?.g()||Lr(this.baseOptions,zo,1)?.j()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){var r=Lr(t.baseOptions,Xo,3);if(!r){var n=r=new Xo,i=new to;Cr(n,4,Wo,i)}"delegate"in e&&("GPU"===e.delegate?(e=r,n=new qs,Cr(e,2,Wo,n)):(e=r,n=new to,Cr(e,4,Wo,n))),Fr(t.baseOptions,0,3,r)}(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),Qh(this,"/model.dat"),this.o(),this.L()});if(e.modelAssetBuffer instanceof Uint8Array)Qh(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){for(var e=[],r=0;;){let{done:n,value:i}=await t.read();if(n)break;e.push(i),r+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(r),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(e.modelAssetBuffer).then(t=>{Qh(this,t),this.o(),this.L()})}return this.o(),this.L(),Promise.resolve()}L(){}ja(){var t;if(this.g.ja(e=>{t=yo(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener((t,e)=>{this.K.push(Error(e))}),this.g.Za(),this.g.setGraph(t,e),this.m?.ya(),this.D=void 0,tu(this)}finishProcessing(t){this.g.finishProcessing(),tu(this),this.m&&void 0!==t&&this.m.za(t)}close(){this.D=void 0,this.m?.xa(),this.m?.close(),this.g.closeGraph()}};function ou(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}su.prototype.close=su.prototype.close;class au{constructor(t,e,r,n){this.g=t,this.h=e,this.m=r,this.j=n}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.j)}}function hu(t,e,r){var n=t.g;if(r=ou(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,e),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(t.h,r),r}function uu(t,e){var r=t.g,n=ou(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);var i=ou(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,i),r.enableVertexAttribArray(t.F),r.vertexAttribPointer(t.F,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);var s=ou(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(t.K),r.vertexAttribPointer(t.K,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindVertexArray(null),new au(r,n,i,s)}function cu(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function lu(t,e,r,n){return cu(t,e),t.h||(t.m(),t.I()),r?(t.l||(t.l=uu(t,!0)),r=t.l):(t.D||(t.D=uu(t,!1)),r=t.D),e.useProgram(t.h),r.bind(),t.j(),t=n(),r.g.bindVertexArray(null),t}function du(t,e,r){return cu(t,e),t=ou(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,r??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function fu(t,e,r){cu(t,e),t.C||(t.C=ou(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.C),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}function pu(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var gu=class{B(){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(){var t=this.g;if(this.h=ou(t.createProgram(),"Failed to create WebGL program"),this.da=hu(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.Z=hu(this,this.B(),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.F=t.getAttribLocation(this.h,"aVertex"),this.K=t.getAttribLocation(this.h,"aTex")}I(){}j(){}close(){if(this.h){let t=this.g;t.deleteProgram(this.h),t.deleteShader(this.da),t.deleteShader(this.Z)}this.C&&this.g.deleteFramebuffer(this.C),this.D&&this.D.close(),this.l&&this.l.close()}};var mu=class extends gu{B(){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 "}I(){var t=this.g;t.activeTexture(t.TEXTURE1),this.u=du(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.o=du(this,t,t.NEAREST)}m(){super.m();var t=this.g;this.O=ou(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.Y=ou(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.L=ou(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}j(){super.j();var t=this.g;t.uniform1i(this.L,0),t.uniform1i(this.O,1),t.uniform1i(this.Y,2)}close(){this.u&&this.g.deleteTexture(this.u),this.o&&this.g.deleteTexture(this.o),super.close()}},vu=class extends gu{B(){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 "}I(){var t=this.g;t.activeTexture(t.TEXTURE1),this.o=du(this,t),t.activeTexture(t.TEXTURE2),this.u=du(this,t)}m(){super.m();var t=this.g;this.L=ou(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.O=ou(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.J=ou(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}j(){super.j();var t=this.g;t.uniform1i(this.J,0),t.uniform1i(this.L,1),t.uniform1i(this.O,2)}close(){this.o&&this.g.deleteTexture(this.o),this.u&&this.g.deleteTexture(this.u),super.close()}};function _u(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 yu(t){var e=_u(t,1);if(!e){if(e=_u(t,0))e=new Float32Array(e).map(t=>t/255);else{e=new Float32Array(t.width*t.height);let n=Au(t);var r=bu(t);if(fu(r,n,Eu(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){r=new Float32Array(t.width*t.height*4),n.readPixels(0,0,t.width,t.height,n.RGBA,n.FLOAT,r);for(let t=0,n=0;t<e.length;++t,n+=4)e[t]=r[n]}else n.readPixels(0,0,t.width,t.height,n.RED,n.FLOAT,e)}t.g.push(e)}return e}function Eu(t){var e=_u(t,2);if(!e){let r=Au(t);e=Tu(t);let n=yu(t),i=wu(t);r.texImage2D(r.TEXTURE_2D,0,i,t.width,t.height,0,r.RED,r.FLOAT,n),ku(t)}return e}function Au(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=ou(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function wu(t){if(t=Au(t),!Su)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))Su=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Su=t.R16F}return Su}function bu(t){return t.j||(t.j=new gu),t.j}function Tu(t){var e=Au(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=_u(t,2);return r||(r=du(bu(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(r),t.o=!0),e.bindTexture(e.TEXTURE_2D,r),r}function ku(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var Su,Lu=class{constructor(t,e,r,n,i,s,o){this.g=t,this.m=e,this.o=r,this.canvas=n,this.j=i,this.width=s,this.height=o,this.o&&(0===--xu&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}Ua(){return!!_u(this,0)}ua(){return!!_u(this,1)}W(){return!!_u(this,2)}ta(){return(e=_u(t=this,0))||(e=yu(t),e=new Uint8Array(e.map(t=>Math.round(255*t))),t.g.push(e)),e;var t,e}sa(){return yu(this)}S(){return Eu(this)}clone(){var t=[];for(let e of this.g){let r;if(e instanceof Uint8Array)r=new Uint8Array(e);else if(e instanceof Float32Array)r=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{let t=Au(this),e=bu(this);t.activeTexture(t.TEXTURE1),r=du(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,r);let n=wu(this);t.texImage2D(t.TEXTURE_2D,0,n,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),fu(e,t,r),lu(e,t,!1,()=>{Tu(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),ku(this)}),pu(e),ku(this)}}t.push(r)}return new Lu(t,this.m,this.W(),this.canvas,this.j,this.width,this.height)}close(){this.o&&Au(this).deleteTexture(_u(this,2)),xu=-1}};Lu.prototype.close=Lu.prototype.close,Lu.prototype.clone=Lu.prototype.clone,Lu.prototype.getAsWebGLTexture=Lu.prototype.S,Lu.prototype.getAsFloat32Array=Lu.prototype.sa,Lu.prototype.getAsUint8Array=Lu.prototype.ta,Lu.prototype.hasWebGLTexture=Lu.prototype.W,Lu.prototype.hasFloat32Array=Lu.prototype.ua,Lu.prototype.hasUint8Array=Lu.prototype.Ua;var xu=250,Ru={color:"white",lineWidth:4,radius:6};function Iu(t){return{...Ru,fillColor:(t=t||{}).color,...t}}function Fu(t,e){return t instanceof Function?t(e):t}function Cu(t,e,r){return Math.max(Math.min(e,r),Math.min(Math.max(e,r),t))}function Nu(t){if(!t.j)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.j}function Mu(t){if(!t.o)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.o}function Ou(t,e,r){if(e.W())r(e.S());else{let n=e.ua()?e.sa():e.ta();t.m=t.m??new gu;let i=Mu(t);r((t=new Lu([n],e.m,!1,i.canvas,t.m,e.width,e.height)).S()),t.close()}}function Du(t,e,r,n){var i=function(t){return t.g||(t.g=new mu),t.g}(t),s=Mu(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;lu(i,s,!0,()=>{!function(t,e,r,n){var i=t.g;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.u),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,r),t.J&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(let[r,n]of t){t=r;let i=n,s=e.next();if(s.done)return!1;let[o,a]=s.value;if(t!==o||i[0]!==a[0]||i[1]!==a[1]||i[2]!==a[2]||i[3]!==a[3])return!1}return!!e.next().done}(t.J,n))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.o);else{t.J=n;let e=Array(1024).fill(0);n.forEach((t,r)=>{if(4!==t.length)throw Error(`Color at index ${r} is not a four-channel value.`);e[4*r]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]}),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.o),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,n),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);var 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 Pu(t,e,r,n){var i=Mu(t),s=function(t){return t.h||(t.h=new vu),t.h}(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r,a=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;lu(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.o),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s.u),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 $u=class{constructor(t,e){"undefined"!=typeof CanvasRenderingContext2D&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.j=t,this.o=e):this.o=t}Ma(t,e){if(t){var r=Nu(this);e=Iu(e),r.save();var n=r.canvas,i=0;for(let s of t)r.fillStyle=Fu(e.fillColor,{index:i,from:s}),r.strokeStyle=Fu(e.color,{index:i,from:s}),r.lineWidth=Fu(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*n.width,s.y*n.height,Fu(e.radius,{index:i,from:s}),0,2*Math.PI),r.fill(t),r.stroke(t),++i;r.restore()}}La(t,e,r){if(t&&e){var n=Nu(this);r=Iu(r),n.save();var i=n.canvas,s=0;for(let o of e){n.beginPath(),e=t[o.start];let a=t[o.end];e&&a&&(n.strokeStyle=Fu(r.color,{index:s,from:e,to:a}),n.lineWidth=Fu(r.lineWidth,{index:s,from:e,to:a}),n.moveTo(e.x*i.width,e.y*i.height),n.lineTo(a.x*i.width,a.y*i.height)),++s,n.stroke()}n.restore()}}Ia(t,e){var r=Nu(this);e=Iu(e),r.save(),r.beginPath(),r.lineWidth=Fu(e.lineWidth,{}),r.strokeStyle=Fu(e.color,{}),r.fillStyle=Fu(e.fillColor,{}),r.moveTo(t.originX,t.originY),r.lineTo(t.originX+t.width,t.originY),r.lineTo(t.originX+t.width,t.originY+t.height),r.lineTo(t.originX,t.originY+t.height),r.lineTo(t.originX,t.originY),r.stroke(),r.fill(),r.restore()}Ja(t,e,r=[0,0,0,255]){this.j?function(t,e,r,n){var i=Mu(t);Ou(t,e,e=>{Du(t,e,r,n),(e=Nu(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,r,e):Du(this,t.S(),r,e)}Ka(t,e,r){this.j?function(t,e,r,n){var i=Mu(t);Ou(t,e,e=>{Pu(t,e,r,n),(e=Nu(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,e,r):Pu(this,t.S(),e,r)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function Uu(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 Bu(t){var e=Uu(t,0);if(!e){e=ju(t);let r=Vu(t),n=new Uint8Array(t.width*t.height*4);fu(r,e,Gu(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,n),pu(r),e=new ImageData(new Uint8ClampedArray(n.buffer),t.width,t.height),t.g.push(e)}return e}function Gu(t){var e=Uu(t,2);if(!e){let r=ju(t);e=Hu(t);let n=Uu(t,1)||Bu(t);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),Ku(t)}return e}function ju(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=ou(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Vu(t){return t.j||(t.j=new gu),t.j}function Hu(t){var e=ju(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=Uu(t,2);return r||(r=du(Vu(t),e),t.g.push(r),t.m=!0),e.bindTexture(e.TEXTURE_2D,r),r}function Ku(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function Xu(t){var e=ju(t);return lu(Vu(t),e,!0,()=>function(t,e){var r=t.canvas;if(r.width===t.width&&r.height===t.height)return e();var n=r.width,i=r.height;return r.width=t.width,r.height=t.height,t=e(),r.width=n,r.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()}))}$u.prototype.close=$u.prototype.close,$u.prototype.drawConfidenceMask=$u.prototype.Ka,$u.prototype.drawCategoryMask=$u.prototype.Ja,$u.prototype.drawBoundingBox=$u.prototype.Ia,$u.prototype.drawConnectors=$u.prototype.La,$u.prototype.drawLandmarks=$u.prototype.Ma,$u.lerp=function(t,e,r,n,i){return Cu(n*(1-(t-e)/(r-e))+i*(1-(r-t)/(r-e)),n,i)},$u.clamp=Cu;var Wu=class{constructor(t,e,r,n,i,s,o){this.g=t,this.o=e,this.m=r,this.canvas=n,this.j=i,this.width=s,this.height=o,(this.o||this.m)&&(0===--zu&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}Ta(){return!!Uu(this,0)}va(){return!!Uu(this,1)}W(){return!!Uu(this,2)}Qa(){return Bu(this)}Pa(){var t=Uu(this,1);return t||(Gu(this),Hu(this),t=Xu(this),Ku(this),this.g.push(t),this.o=!0),t}S(){return Gu(this)}clone(){var t=[];for(let e of this.g){let r;if(e instanceof ImageData)r=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){let t=ju(this),e=Vu(this);t.activeTexture(t.TEXTURE1),r=du(e,t),t.bindTexture(t.TEXTURE_2D,r),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),fu(e,t,r),lu(e,t,!1,()=>{Hu(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Ku(this)}),pu(e),Ku(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Gu(this),Hu(this),r=Xu(this),Ku(this)}t.push(r)}return new Wu(t,this.va(),this.W(),this.canvas,this.j,this.width,this.height)}close(){this.o&&Uu(this,1).close(),this.m&&ju(this).deleteTexture(Uu(this,2)),zu=-1}};Wu.prototype.close=Wu.prototype.close,Wu.prototype.clone=Wu.prototype.clone,Wu.prototype.getAsWebGLTexture=Wu.prototype.S,Wu.prototype.getAsImageBitmap=Wu.prototype.Pa,Wu.prototype.getAsImageData=Wu.prototype.Qa,Wu.prototype.hasWebGLTexture=Wu.prototype.W,Wu.prototype.hasImageBitmap=Wu.prototype.va,Wu.prototype.hasImageData=Wu.prototype.Ta;var zu=250;function Yu(...t){return t.map(([t,e])=>({start:t,end:e}))}var qu,Ju=zh((qu=Wh(Xh),class extends qu{get oa(){return this.i}Da(t,e,r){Gh(this,e,e=>{var[n,i]=jh(this,t,e);this.oa._addBoundTextureAsImageToStream(e,n,i,r)})}ga(t,e){Hh(this,t,e),Gh(this,t,t=>{this.oa._attachImageListener(t)})}ha(t,e){Kh(this,t,e),Gh(this,t,t=>{this.oa._attachImageVectorListener(t)})}})),Zu=class extends Ju{};async function Qu(t,e,r){return Zh(t,r.canvas??($h()?void 0:document.createElement("canvas")),e,r)}function tc(t,e,r,n){if(t.m&&void 0!==n)if(Lr(t.baseOptions,Xo,3)?.g()){var i=t.m;++i.g.T,i.h.set(n,performance.now())}else++(i=t.m).g.P,i.h.set(n,performance.now());if(t.qa){if(i=new Mo,r?.regionOfInterest){if(!t.Ca)throw Error("This task doesn't support region-of-interest.");var s=r.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(s.left<0||s.top<0||s.right>1||s.bottom>1)throw Error("Expected RectF values to be in [0,1].");Vr(i,1,(s.left+s.right)/2),Vr(i,2,(s.top+s.bottom)/2),Vr(i,4,s.right-s.left),Vr(i,3,s.bottom-s.top)}else Vr(i,1,.5),Vr(i,2,.5),Vr(i,4,1),Vr(i,3,1);if(r?.rotationDegrees){if(r?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(Vr(i,5,-Math.PI*r.rotationDegrees/180),r?.rotationDegrees%180!=0){let[t,n]=Bh(e);r=Pr(i,3)*n/t,s=Pr(i,4)*t/n,Vr(i,4,r),Vr(i,3,s)}}t.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",t.qa,n)}t.g.Da(e,t.Ba,n??performance.now()),t.finishProcessing(n)}function ec(t,e,r){if(t.J)throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");tc(t,e,r,t.I+1)}function rc(t,e,r,n){if(!t.J)throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");tc(t,e,r,n)}function nc(t,e,r,n){var i=e.data,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 Lu([i],r,!1,t.g.i.canvas,t.da,s,e),n?t.clone():t}var ic=class extends su{constructor(t,e,r,n){super(t),this.g=t,this.Ba=e,this.qa=r,this.Ca=n,this.da=new gu,this.J=!1}j(t,e=!0){if("runningMode"in t){var r=this.J=!!t.runningMode&&"IMAGE"!==t.runningMode;hr(this.baseOptions,2,null==r?r:Qt(r))}if(void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.j(t,e)}close(){this.da.close(),super.close()}};ic.prototype.close=ic.prototype.close;var sc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect_in",!1),this.l={detections:[]},Fr(t=this.h=new Qo,0,1,e=new Yo),Vr(this.h,2,.5),Vr(this.h,3,.3)}C(){return"FaceDetector"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"minDetectionConfidence"in t&&Vr(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&Vr(this.h,3,t.minSuppressionThreshold??.3),this.j(t)}G(t,e){return this.l={detections:[]},ec(this,t,e),this.l}H(t,e,r){return this.l={detections:[]},rc(this,t,r,e),this.l}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect_in"),mo(t,"detections");var e=new io;di(e,ea,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect_in"),ho(r,"DETECTIONS:detections"),r.v(e),po(t,r),this.g.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=Lo(e),this.l.detections.push(Qa(t));eu(this,e)}),this.g.attachEmptyPacketListener("detections",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};sc.prototype.detectForVideo=sc.prototype.H,sc.prototype.detect=sc.prototype.G,sc.prototype.setOptions=sc.prototype.v,sc.createFromModelPath=async function(t,e){return Qu(sc,t,{baseOptions:{modelAssetPath:e}})},sc.createFromModelBuffer=function(t,e){return Qu(sc,t,{baseOptions:{modelAssetBuffer:e}})},sc.createFromOptions=function(t,e){return Qu(sc,t,e)};var oc=Yu([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]),ac=Yu([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]),hc=Yu([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),uc=Yu([474,475],[475,476],[476,477],[477,474]),cc=Yu([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]),lc=Yu([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),dc=Yu([469,470],[470,471],[471,472],[472,469]),fc=Yu([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]),pc=[...oc,...ac,...hc,...cc,...lc,...fc],gc=Yu([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 mc(t){t.l={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var vc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.l={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,Fr(t=this.h=new ia,0,1,e=new Yo),this.B=new na,Fr(this.h,0,3,this.B),this.u=new Qo,Fr(this.h,0,2,this.u),Br(this.u,4,1),Vr(this.u,2,.5),Vr(this.B,2,.5),Vr(this.h,4,.5)}C(){return"FaceLandmarker"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"numFaces"in t&&Br(this.u,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&Vr(this.u,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&Vr(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&Vr(this.B,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.j(t)}G(t,e){return mc(this),ec(this,t,e),this.l}H(t,e,r){return mc(this),rc(this,t,r,e),this.l}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"face_landmarks");var e=new io;di(e,oa,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"NORM_LANDMARKS:face_landmarks"),r.v(e),po(t,r),this.g.attachProtoVectorListener("face_landmarks",(t,e)=>{for(let e of t)t=Fo(e),this.l.faceLandmarks.push(th(t));eu(this,e)}),this.g.attachEmptyPacketListener("face_landmarks",t=>{eu(this,t)}),this.outputFaceBlendshapes&&(mo(t,"blendshapes"),ho(r,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(t,e)=>{if(this.outputFaceBlendshapes)for(let e of t)t=bo(e),this.l.faceBlendshapes.push(Ja(t.g()??[]));eu(this,e)}),this.g.attachEmptyPacketListener("blendshapes",t=>{eu(this,t)})),this.outputFacialTransformationMatrixes&&(mo(t,"face_geometry"),ho(r,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(t,e)=>{if(this.outputFacialTransformationMatrixes)for(let e of t)(t=Lr(t=ra(e),Co,2))&&this.l.facialTransformationMatrixes.push({rows:Dr(t,1)??0??0,columns:Dr(t,2)??0??0,data:dr(t,3,Zt,lr()).slice()??[]});eu(this,e)}),this.g.attachEmptyPacketListener("face_geometry",t=>{eu(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};vc.prototype.detectForVideo=vc.prototype.H,vc.prototype.detect=vc.prototype.G,vc.prototype.setOptions=vc.prototype.v,vc.createFromModelPath=function(t,e){return Qu(vc,t,{baseOptions:{modelAssetPath:e}})},vc.createFromModelBuffer=function(t,e){return Qu(vc,t,{baseOptions:{modelAssetBuffer:e}})},vc.createFromOptions=function(t,e){return Qu(vc,t,e)},vc.FACE_LANDMARKS_LIPS=oc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS",vc.FACE_LANDMARKS_LIPS),vc.FACE_LANDMARKS_LEFT_EYE=ac,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE",vc.FACE_LANDMARKS_LEFT_EYE),vc.FACE_LANDMARKS_LEFT_EYEBROW=hc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",vc.FACE_LANDMARKS_LEFT_EYEBROW),vc.FACE_LANDMARKS_LEFT_IRIS=uc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS",vc.FACE_LANDMARKS_LEFT_IRIS),vc.FACE_LANDMARKS_RIGHT_EYE=cc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE",vc.FACE_LANDMARKS_RIGHT_EYE),vc.FACE_LANDMARKS_RIGHT_EYEBROW=lc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",vc.FACE_LANDMARKS_RIGHT_EYEBROW),vc.FACE_LANDMARKS_RIGHT_IRIS=dc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS",vc.FACE_LANDMARKS_RIGHT_IRIS),vc.FACE_LANDMARKS_FACE_OVAL=fc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL",vc.FACE_LANDMARKS_FACE_OVAL),vc.FACE_LANDMARKS_CONTOURS=pc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS",vc.FACE_LANDMARKS_CONTOURS),vc.FACE_LANDMARKS_TESSELATION=gc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION",vc.FACE_LANDMARKS_TESSELATION);var _c=Yu([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 yc(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Ec(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 Ac(t,e=!0){var r=[];for(let i of t){var n=bo(i);t=[];for(let r of n.g())n=e&&null!=Dr(r,1)?Dr(r,1)??0:-1,t.push({score:Pr(r,2)??0,index:n,categoryName:ye(or(r,3))??""??"",displayName:ye(or(r,4))??""??""});r.push(t)}return r}var wc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Fr(t=this.l=new fa,0,1,e=new Yo),this.u=new da,Fr(this.l,0,2,this.u),this.F=new la,Fr(this.u,0,3,this.F),this.B=new ca,Fr(this.u,0,2,this.B),this.h=new ua,Fr(this.l,0,3,this.h),Vr(this.B,2,.5),Vr(this.u,4,.5),Vr(this.F,2,.5)}C(){return"GestureRecognizer"}get baseOptions(){return Lr(this.l,Yo,1)}set baseOptions(t){Fr(this.l,0,1,t)}v(t){if(Br(this.B,3,t.numHands??1),"minHandDetectionConfidence"in t&&Vr(this.B,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Vr(this.u,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Vr(this.F,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new aa,r=e,n=Ya(t.cannedGesturesClassifierOptions,Lr(this.h,aa,3)?.j());Fr(r,0,2,n),Fr(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&Lr(this.h,aa,3)?.g();return t.customGesturesClassifierOptions?(Fr(r=e=new aa,0,2,n=Ya(t.customGesturesClassifierOptions,Lr(this.h,aa,4)?.j())),Fr(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&Lr(this.h,aa,4)?.g(),this.j(t)}Xa(t,e){return yc(this),ec(this,t,e),Ec(this)}Ya(t,e,r){return yc(this),rc(this,t,r,e),Ec(this)}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"hand_gestures"),mo(t,"hand_landmarks"),mo(t,"world_hand_landmarks"),mo(t,"handedness");var e=new io;di(e,_a,this.l);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"HAND_GESTURES:hand_gestures"),ho(r,"LANDMARKS:hand_landmarks"),ho(r,"WORLD_LANDMARKS:world_hand_landmarks"),ho(r,"HANDEDNESS:handedness"),r.v(e),po(t,r),this.g.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t){t=Fo(e);let r=[];for(let e of Rr(t,Io,1))r.push({x:Pr(e,1)??0,y:Pr(e,2)??0,z:Pr(e,3)??0,visibility:Pr(e,4)??0});this.landmarks.push(r)}eu(this,e)}),this.g.attachEmptyPacketListener("hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t){t=Ro(e);let r=[];for(let e of Rr(t,xo,1))r.push({x:Pr(e,1)??0,y:Pr(e,2)??0,z:Pr(e,3)??0,visibility:Pr(e,4)??0});this.worldLandmarks.push(r)}eu(this,e)}),this.g.attachEmptyPacketListener("world_hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoVectorListener("hand_gestures",(t,e)=>{this.gestures.push(...Ac(t,!1)),eu(this,e)}),this.g.attachEmptyPacketListener("hand_gestures",t=>{eu(this,t)}),this.g.attachProtoVectorListener("handedness",(t,e)=>{this.handedness.push(...Ac(t)),eu(this,e)}),this.g.attachEmptyPacketListener("handedness",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function bc(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}wc.prototype.recognizeForVideo=wc.prototype.Ya,wc.prototype.recognize=wc.prototype.Xa,wc.prototype.setOptions=wc.prototype.v,wc.createFromModelPath=function(t,e){return Qu(wc,t,{baseOptions:{modelAssetPath:e}})},wc.createFromModelBuffer=function(t,e){return Qu(wc,t,{baseOptions:{modelAssetBuffer:e}})},wc.createFromOptions=function(t,e){return Qu(wc,t,e)},wc.HAND_CONNECTIONS=_c,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS",wc.HAND_CONNECTIONS);var Tc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Fr(t=this.h=new da,0,1,e=new Yo),this.u=new la,Fr(this.h,0,3,this.u),this.l=new ca,Fr(this.h,0,2,this.l),Br(this.l,3,1),Vr(this.l,2,.5),Vr(this.u,2,.5),Vr(this.h,4,.5)}C(){return"HandLandmarker"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"numHands"in t&&Br(this.l,3,t.numHands??1),"minHandDetectionConfidence"in t&&Vr(this.l,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Vr(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Vr(this.u,2,t.minHandPresenceConfidence??.5),this.j(t)}G(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],ec(this,t,e),bc(this)}H(t,e,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],rc(this,t,r,e),bc(this)}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"hand_landmarks"),mo(t,"world_hand_landmarks"),mo(t,"handedness");var e=new io;di(e,ya,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"LANDMARKS:hand_landmarks"),ho(r,"WORLD_LANDMARKS:world_hand_landmarks"),ho(r,"HANDEDNESS:handedness"),r.v(e),po(t,r),this.g.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t)t=Fo(e),this.landmarks.push(th(t));eu(this,e)}),this.g.attachEmptyPacketListener("hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t)t=Ro(e),this.worldLandmarks.push(eh(t));eu(this,e)}),this.g.attachEmptyPacketListener("world_hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoVectorListener("handedness",(t,e)=>{var r=this.handedness,n=r.push,i=[];for(let e of t){t=bo(e);let r=[];for(let e of t.g())r.push({score:Pr(e,2)??0,index:Dr(e,1)??0??-1,categoryName:ye(or(e,3))??""??"",displayName:ye(or(e,4))??""??""});i.push(r)}n.call(r,...i),eu(this,e)}),this.g.attachEmptyPacketListener("handedness",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Tc.prototype.detectForVideo=Tc.prototype.H,Tc.prototype.detect=Tc.prototype.G,Tc.prototype.setOptions=Tc.prototype.v,Tc.createFromModelPath=function(t,e){return Qu(Tc,t,{baseOptions:{modelAssetPath:e}})},Tc.createFromModelBuffer=function(t,e){return Qu(Tc,t,{baseOptions:{modelAssetBuffer:e}})},Tc.createFromOptions=function(t,e){return Qu(Tc,t,e)},Tc.HAND_CONNECTIONS=_c,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS",Tc.HAND_CONNECTIONS);var kc=Yu([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function Sc(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Lc(t){try{if(!t.F)return t.h;t.F(t.h)}finally{iu(t)}}function xc(t,e){t=Fo(t),e.push(th(t))}var Rc=class extends ic{constructor(t,e){super(new Zu(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,Fr(t=this.l=new ba,0,1,e=new Yo),this.Y=new la,Fr(this.l,0,2,this.Y),this.Aa=new Ea,Fr(this.l,0,3,this.Aa),this.u=new Qo,Fr(this.l,0,4,this.u),this.O=new na,Fr(this.l,0,5,this.O),this.B=new Aa,Fr(this.l,0,6,this.B),this.Z=new wa,Fr(this.l,0,7,this.Z),Vr(this.u,2,.5),Vr(this.u,3,.3),Vr(this.O,2,.5),Vr(this.B,2,.5),Vr(this.B,3,.3),Vr(this.Z,2,.5),Vr(this.Y,2,.5)}C(){return"HolisticLandmarker"}get baseOptions(){return Lr(this.l,Yo,1)}set baseOptions(t){Fr(this.l,0,1,t)}v(t){return"minFaceDetectionConfidence"in t&&Vr(this.u,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&Vr(this.u,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&Vr(this.O,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&Vr(this.B,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&Vr(this.B,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&Vr(this.Z,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&Vr(this.Y,2,t.minHandLandmarksConfidence??.5),this.j(t)}G(t,e,r){var n="function"!=typeof e?e:{};return this.F="function"==typeof e?e:r,Sc(this),ec(this,t,n),Lc(this)}H(t,e,r,n){var i="function"!=typeof r?r:{};return this.F="function"==typeof r?r:n,Sc(this),rc(this,t,i,e),Lc(this)}o(){var t=new vo;go(t,"input_frames_image"),mo(t,"pose_landmarks"),mo(t,"pose_world_landmarks"),mo(t,"face_landmarks"),mo(t,"left_hand_landmarks"),mo(t,"left_hand_world_landmarks"),mo(t,"right_hand_landmarks"),mo(t,"right_hand_world_landmarks");var e=new io,r=new Gs;Kr(r,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(t,e){if(null!=e)if(Array.isArray(e))hr(t,2,je(e,0,He));else{if(!("string"==typeof e||e instanceof M||R(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");yr(t,2,lt(e,!1),F())}}(r,this.l.g());var n=new uo;Kr(n,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Or(n,8,Gs,r),ao(n,"IMAGE:input_frames_image"),ho(n,"POSE_LANDMARKS:pose_landmarks"),ho(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),ho(n,"FACE_LANDMARKS:face_landmarks"),ho(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),ho(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),ho(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),ho(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.v(e),po(t,n),ru(this,t),this.g.attachProtoListener("pose_landmarks",(t,e)=>{xc(t,this.h.poseLandmarks),eu(this,e)}),this.g.attachEmptyPacketListener("pose_landmarks",t=>{eu(this,t)}),this.g.attachProtoListener("pose_world_landmarks",(t,e)=>{var r=this.h.poseWorldLandmarks;t=Ro(t),r.push(eh(t)),eu(this,e)}),this.g.attachEmptyPacketListener("pose_world_landmarks",t=>{eu(this,t)}),this.outputPoseSegmentationMasks&&(ho(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),nu(this,"pose_segmentation_mask"),this.g.ga("pose_segmentation_mask",(t,e)=>{this.h.poseSegmentationMasks=[nc(this,t,!0,!this.F)],eu(this,e)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",t=>{this.h.poseSegmentationMasks=[],eu(this,t)})),this.g.attachProtoListener("face_landmarks",(t,e)=>{xc(t,this.h.faceLandmarks),eu(this,e)}),this.g.attachEmptyPacketListener("face_landmarks",t=>{eu(this,t)}),this.outputFaceBlendshapes&&(mo(t,"extra_blendshapes"),ho(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(t,e)=>{var r=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=bo(t),r.push(Ja(t.g()??[]))),eu(this,e)}),this.g.attachEmptyPacketListener("extra_blendshapes",t=>{eu(this,t)})),this.g.attachProtoListener("left_hand_landmarks",(t,e)=>{xc(t,this.h.leftHandLandmarks),eu(this,e)}),this.g.attachEmptyPacketListener("left_hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoListener("left_hand_world_landmarks",(t,e)=>{var r=this.h.leftHandWorldLandmarks;t=Ro(t),r.push(eh(t)),eu(this,e)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",t=>{eu(this,t)}),this.g.attachProtoListener("right_hand_landmarks",(t,e)=>{xc(t,this.h.rightHandLandmarks),eu(this,e)}),this.g.attachEmptyPacketListener("right_hand_landmarks",t=>{eu(this,t)}),this.g.attachProtoListener("right_hand_world_landmarks",(t,e)=>{var r=this.h.rightHandWorldLandmarks;t=Ro(t),r.push(eh(t)),eu(this,e)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Rc.prototype.detectForVideo=Rc.prototype.H,Rc.prototype.detect=Rc.prototype.G,Rc.prototype.setOptions=Rc.prototype.v,Rc.createFromModelPath=function(t,e){return Qu(Rc,t,{baseOptions:{modelAssetPath:e}})},Rc.createFromModelBuffer=function(t,e){return Qu(Rc,t,{baseOptions:{modelAssetBuffer:e}})},Rc.createFromOptions=function(t,e){return Qu(Rc,t,e)},Rc.HAND_CONNECTIONS=_c,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.HAND_CONNECTIONS",Rc.HAND_CONNECTIONS),Rc.POSE_CONNECTIONS=kc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.POSE_CONNECTIONS",Rc.POSE_CONNECTIONS),Rc.FACE_LANDMARKS_LIPS=oc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LIPS",Rc.FACE_LANDMARKS_LIPS),Rc.FACE_LANDMARKS_LEFT_EYE=ac,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYE",Rc.FACE_LANDMARKS_LEFT_EYE),Rc.FACE_LANDMARKS_LEFT_EYEBROW=hc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",Rc.FACE_LANDMARKS_LEFT_EYEBROW),Rc.FACE_LANDMARKS_LEFT_IRIS=uc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_IRIS",Rc.FACE_LANDMARKS_LEFT_IRIS),Rc.FACE_LANDMARKS_RIGHT_EYE=cc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYE",Rc.FACE_LANDMARKS_RIGHT_EYE),Rc.FACE_LANDMARKS_RIGHT_EYEBROW=lc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",Rc.FACE_LANDMARKS_RIGHT_EYEBROW),Rc.FACE_LANDMARKS_RIGHT_IRIS=dc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_IRIS",Rc.FACE_LANDMARKS_RIGHT_IRIS),Rc.FACE_LANDMARKS_FACE_OVAL=fc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_FACE_OVAL",Rc.FACE_LANDMARKS_FACE_OVAL),Rc.FACE_LANDMARKS_CONTOURS=pc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_CONTOURS",Rc.FACE_LANDMARKS_CONTOURS),Rc.FACE_LANDMARKS_TESSELATION=gc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_TESSELATION",Rc.FACE_LANDMARKS_TESSELATION);var Ic=class extends ic{constructor(t,e){super(new Zu(t,e),"input_image","norm_rect",!0),this.l={classifications:[]},Fr(t=this.h=new Sa,0,1,e=new Yo)}C(){return"ImageClassifier"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return Fr(this.h,0,2,Ya(t,Lr(this.h,jo,2))),this.j(t)}Ga(t,e){return this.l={classifications:[]},ec(this,t,e),this.l}Ha(t,e,r){return this.l={classifications:[]},rc(this,t,r,e),this.l}o(){var t=new vo;go(t,"input_image"),go(t,"norm_rect"),mo(t,"classifications");var e=new io;di(e,La,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),ao(r,"IMAGE:input_image"),ao(r,"NORM_RECT:norm_rect"),ho(r,"CLASSIFICATIONS:classifications"),r.v(e),po(t,r),this.g.attachProtoListener("classifications",(t,e)=>{this.l=Za(Do(t)),eu(this,e)}),this.g.attachEmptyPacketListener("classifications",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ic.prototype.classifyForVideo=Ic.prototype.Ha,Ic.prototype.classify=Ic.prototype.Ga,Ic.prototype.setOptions=Ic.prototype.v,Ic.createFromModelPath=function(t,e){return Qu(Ic,t,{baseOptions:{modelAssetPath:e}})},Ic.createFromModelBuffer=function(t,e){return Qu(Ic,t,{baseOptions:{modelAssetBuffer:e}})},Ic.createFromOptions=function(t,e){return Qu(Ic,t,e)};var Fc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!0),this.h=new xa,this.embeddings={embeddings:[]},Fr(t=this.h,0,1,e=new Yo)}C(){return"ImageEmbedder"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){var e=this.h,r=Lr(this.h,Ho,2);if(r=r?r.clone():new Ho,void 0!==t.l2Normalize){var n=t.l2Normalize;hr(r,1,null==n?n:Qt(n))}else"l2Normalize"in t&&hr(r,1);return void 0!==t.quantize?hr(r,2,null==(n=t.quantize)?n:Qt(n)):"quantize"in t&&hr(r,2),Fr(e,0,2,r),this.j(t)}Na(t,e){return ec(this,t,e),this.embeddings}Oa(t,e,r){return rc(this,t,r,e),this.embeddings}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"embeddings_out");var e=new io;di(e,Ra,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"EMBEDDINGS:embeddings_out"),r.v(e),po(t,r),this.g.attachProtoListener("embeddings_out",(t,e)=>{t=Go(t),this.embeddings=function(t){return{embeddings:Rr(t,Uo,1).map(t=>{var e={headIndex:Dr(t,3)??0??-1,headName:ye(or(t,4))??""??""};if(cr(t,Po,1,Bo))t=dr(t=$r(t,Po,1),1,Zt,lr()),e.floatEmbedding=t.slice();else{let r=new Uint8Array(0);e.quantizedEmbedding=$r(t,$o,2)?.g()?.h()??r}return e}),timestampMs:qa(or(t,2,void 0,pe)??ir)}}(t),eu(this,e)}),this.g.attachEmptyPacketListener("embeddings_out",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Fc.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=nh(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=nh(rh(t.quantizedEmbedding),rh(e.quantizedEmbedding))}return t},Fc.prototype.embedForVideo=Fc.prototype.Oa,Fc.prototype.embed=Fc.prototype.Na,Fc.prototype.setOptions=Fc.prototype.v,Fc.createFromModelPath=function(t,e){return Qu(Fc,t,{baseOptions:{modelAssetPath:e}})},Fc.createFromModelBuffer=function(t,e){return Qu(Fc,t,{baseOptions:{modelAssetBuffer:e}})},Fc.createFromOptions=function(t,e){return Qu(Fc,t,e)};var Cc=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};function Nc(t){var e=function(t){return Rr(t,uo,1)}(t.ja()).filter(t=>(ye(or(t,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(t.u=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(Lr(e[0],io,7)?.o()?.g()??new Map).forEach((e,r)=>{t.u[Number(r)]=ye(or(e,1))??""})}function Mc(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Oc(t){try{let e=new Cc(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.l)return e;t.l(e)}finally{iu(t)}}Cc.prototype.close=Cc.prototype.close;var Dc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Ma,this.B=new Ia,Fr(this.h,0,3,this.B),Fr(t=this.h,0,1,e=new Yo)}C(){return"ImageSegmenter"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return void 0!==t.displayNamesLocale?hr(this.h,2,_e(t.displayNamesLocale)):"displayNamesLocale"in t&&hr(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.j(t)}L(){Nc(this)}segment(t,e,r){var n="function"!=typeof e?e:{};return this.l="function"==typeof e?e:r,Mc(this),ec(this,t,n),Oc(this)}eb(t,e,r,n){var i="function"!=typeof r?r:{};return this.l="function"==typeof r?r:n,Mc(this),rc(this,t,i,e),Oc(this)}Ra(){return this.u}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect");var e=new io;di(e,Oa,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),r.v(e),po(t,r),ru(this,t),this.outputConfidenceMasks&&(mo(t,"confidence_masks"),ho(r,"CONFIDENCE_MASKS:confidence_masks"),nu(this,"confidence_masks"),this.g.ha("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>nc(this,t,!0,!this.l)),eu(this,e)}),this.g.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],eu(this,t)})),this.outputCategoryMask&&(mo(t,"category_mask"),ho(r,"CATEGORY_MASK:category_mask"),nu(this,"category_mask"),this.g.ga("category_mask",(t,e)=>{this.categoryMask=nc(this,t,!1,!this.l),eu(this,e)}),this.g.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,eu(this,t)})),mo(t,"quality_scores"),ho(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,eu(this,e)}),this.g.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Dc.prototype.getLabels=Dc.prototype.Ra,Dc.prototype.segmentForVideo=Dc.prototype.eb,Dc.prototype.segment=Dc.prototype.segment,Dc.prototype.setOptions=Dc.prototype.v,Dc.createFromModelPath=function(t,e){return Qu(Dc,t,{baseOptions:{modelAssetPath:e}})},Dc.createFromModelBuffer=function(t,e){return Qu(Dc,t,{baseOptions:{modelAssetBuffer:e}})},Dc.createFromOptions=function(t,e){return Qu(Dc,t,e)};var Pc={0:0,1:1,2:2,3:3};function $c(){return $h()?void 0:document.createElement("canvas")}var Uc=class extends su{constructor(t,e){super(new qh(t,e)),this.u=new gu,this.delegate="CPU",this.h=0,this.baseOptions=new Yo,this.B=this.l=0}C(){return"InteractiveSegmenter"}get i(){return this.g.i}v(t){return this.delegate=t.baseOptions?.delegate??"CPU",super.j(t)}fb(t){if(0===this.h)throw Error("Segmenter is not initialized.");var e;if(0!==this.l&&(this.i._free(this.l),this.l=0),!(e="undefined"!=typeof ImageData&&t instanceof ImageData))if("object"!=typeof t||null===t)e=!1;else{e=t.data;var r=t.width,n=t.height;e=Number.isInteger(r)&&r>0&&Number.isInteger(n)&&n>0&&(e instanceof Uint8ClampedArray||e instanceof Uint8Array)}if(e)e=t.width,r=t.height,t=t.data;else{if([e,r]=Bh(t),"undefined"!=typeof OffscreenCanvas)n=new OffscreenCanvas(e,r);else{if("undefined"==typeof document)throw Error("Canvas is not supported in this environment.");n=document.createElement("canvas")}if(n.width=e,n.height=r,!(n=n.getContext("2d")))throw Error("Canvas 2D context is not supported in this environment.");n.drawImage(t,0,0),t=n.getImageData(0,0,e,r).data}if(!t)throw Error("Unsupported image source or failed to extract image pixels.");n=function({Wa:t,width:e,height:r}){if(e<=0||r<=0)throw Error(`Invalid image dimensions: ${e}x${r}. Dimensions must be positive.`);if(t%(e*r)!==0)throw Error(`Invalid image dimensions or pixel data length. Pixel data length ${t} is not a multiple of the number of pixels (${e*r}).`);if(4!==(t/=e*r)&&3!==t&&1!==t)throw Error(`Invalid image dimensions or pixel data length. Calculated channels: ${t}. Expected 1, 3, or 4.`);return t}({Wa:t.length,width:e,height:r});var i=this.i._malloc(t.length);if(this.i.HEAPU8.set(t,i),this.l=i,!this.i._interactive_segmenter_set_image(this.h,i,e,r,n))throw Error("Failed to set image on native engine.")}segment(t){if(0===this.h)throw Error("Segmenter is not initialized.");var e=function(t){t=t.map(({isCompleted:t,brushMode:e,point:r})=>{e=Pc[e]??0,r=r.map(({x:t,y:e})=>{var r=new Da;return Hr(r,1,t),Hr(r,2,e),r});var n=new Pa;return Ur(n,t),yr(n,1,re(e),0),Nr(n,2,r),n});var e=new $a;return Nr(e,1,t),Ua(e)}(t);t=this.i._malloc(e.length),this.i.HEAPU8.set(e,t);var r=this.i._malloc(12),n=r+4,i=r+8,s=0,o=this.B++;try{if(this.m)if("GPU"===this.delegate){var a=this.m;++a.g.T,a.h.set(o,performance.now())}else{var h=this.m;++h.g.P,h.h.set(o,performance.now())}if(0===(s=this.i._interactive_segmenter_segment(this.h,t,e.length,r,n,i)))throw Error("Segmentation failed.");this.m?.za(o);let c=this.i.HEAPU32[r/4],l=this.i.HEAPU32[n/4],d=new Float32Array(this.i.HEAPU8.buffer,s,this.i.HEAPU32[i/4]/4);var u=new Float32Array(d);if(a=c*l,(u instanceof Uint8Array||u instanceof Float32Array)&&u.length!==a)throw Error("Unsupported channel count: "+u.length/a);return new Lu([u],!0,!1,this.g.i.canvas??void 0,this.u,c,l)}finally{0!==t&&this.i._free(t),0!==r&&this.i._free(r),0!==s&&this.i._free(s)}}o(){0!==this.h&&(this.m?.xa(),this.i._interactive_segmenter_close(this.h),this.h=0),0!==this.l&&(this.i._free(this.l),this.l=0);var t=new Xo;if("GPU"===this.delegate){var e=new qs;Cr(t,2,Wo,e)}else Br(e=new ro,1,4),Cr(t,1,Wo,e);if(Fr(this.baseOptions,0,3,t),t=Zo(this.baseOptions),e=this.i._malloc(t.length),this.i.HEAPU8.set(t,e),this.h=this.i._interactive_segmenter_create(e,t.length),this.i._free(e),0===this.h)throw Error("Failed to create native InteractiveSegmenter engine.");this.m?.ya()}close(){0!==this.h&&(this.i._interactive_segmenter_close(this.h),this.h=0),0!==this.l&&(this.i._free(this.l),this.l=0),this.u.close(),super.close()}};Uc.prototype.close=Uc.prototype.close,Uc.prototype.segment=Uc.prototype.segment,Uc.prototype.setImage=Uc.prototype.fb,Uc.prototype.setOptions=Uc.prototype.v,Uc.createFromModelPath=function(t,e){return Zh(Uc,$c(),t,{baseOptions:{modelAssetPath:e}})},Uc.createFromModelBuffer=function(t,e){return Zh(Uc,$c(),t,{baseOptions:{modelAssetBuffer:e}})},Uc.createFromOptions=function(t,e){var r=e.canvas??$c();return Zh(Uc,r,t,e)};var Bc=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};Bc.prototype.close=Bc.prototype.close;var Gc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Ma,this.u=new Ia,Fr(this.h,0,3,this.u),Fr(t=this.h,0,1,e=new Yo)}C(){return"InteractiveSegmenterLegacy"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.j(t)}segment(t,e,r,n){var i="function"!=typeof r?r:{};if(this.l="function"==typeof r?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.I+1,n=new Va,e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var s=new Ba;Ur(s,!0),Hr(s,1,e.keypoint.x),Hr(s,2,e.keypoint.y),Cr(n,1,Ha,s)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");{let t=new ja;for(s of e.scribble)Ur(e=new Ba,!0),Hr(e,1,s.x),Hr(e,2,s.y),Or(t,1,Ba,e);Cr(n,2,Ha,t)}}this.g.addProtoToStream(n.g(),"mediapipe.tasks.vision.interactive_segmenter_legacy.proto.RegionOfInterest","roi_in",r),ec(this,t,i);t:{try{let t=new Bc(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.l){var o=t;break t}this.l(t)}finally{iu(this)}o=void 0}return o}o(){var t=new vo;go(t,"image_in"),go(t,"roi_in"),go(t,"norm_rect_in");var e=new io;di(e,Oa,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.interactive_segmenter_legacy.InteractiveSegmenterGraphV2"),ao(r,"IMAGE:image_in"),ao(r,"ROI:roi_in"),ao(r,"NORM_RECT:norm_rect_in"),r.v(e),po(t,r),ru(this,t),this.outputConfidenceMasks&&(mo(t,"confidence_masks"),ho(r,"CONFIDENCE_MASKS:confidence_masks"),nu(this,"confidence_masks"),this.g.ha("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>nc(this,t,!0,!this.l)),eu(this,e)}),this.g.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],eu(this,t)})),this.outputCategoryMask&&(mo(t,"category_mask"),ho(r,"CATEGORY_MASK:category_mask"),nu(this,"category_mask"),this.g.ga("category_mask",(t,e)=>{this.categoryMask=nc(this,t,!1,!this.l),eu(this,e)}),this.g.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,eu(this,t)})),mo(t,"quality_scores"),ho(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,eu(this,e)}),this.g.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Gc.prototype.segment=Gc.prototype.segment,Gc.prototype.setOptions=Gc.prototype.v,Gc.createFromModelPath=function(t,e){return Qu(Gc,t,{baseOptions:{modelAssetPath:e}})},Gc.createFromModelBuffer=function(t,e){return Qu(Gc,t,{baseOptions:{modelAssetBuffer:e}})},Gc.createFromOptions=function(t,e){return Qu(Gc,t,e)};var jc=class extends ic{constructor(t,e){super(new Zu(t,e),"input_frame_gpu","norm_rect",!1),this.l={detections:[]},Fr(t=this.h=new Ka,0,1,e=new Yo)}C(){return"ObjectDetector"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return void 0!==t.displayNamesLocale?hr(this.h,2,_e(t.displayNamesLocale)):"displayNamesLocale"in t&&hr(this.h,2),void 0!==t.maxResults?Br(this.h,3,t.maxResults):"maxResults"in t&&hr(this.h,3),void 0!==t.scoreThreshold?Vr(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&hr(this.h,4),void 0!==t.categoryAllowlist?Xr(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&hr(this.h,5),void 0!==t.categoryDenylist?Xr(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&hr(this.h,6),this.j(t)}G(t,e){return this.l={detections:[]},ec(this,t,e),this.l}H(t,e,r){return this.l={detections:[]},rc(this,t,r,e),this.l}o(){var t=new vo;go(t,"input_frame_gpu"),go(t,"norm_rect"),mo(t,"detections");var e=new io;di(e,Xa,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),ao(r,"IMAGE:input_frame_gpu"),ao(r,"NORM_RECT:norm_rect"),ho(r,"DETECTIONS:detections"),r.v(e),po(t,r),this.g.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=Lo(e),this.l.detections.push(Qa(t));eu(this,e)}),this.g.attachEmptyPacketListener("detections",t=>{eu(this,t)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};jc.prototype.detectForVideo=jc.prototype.H,jc.prototype.detect=jc.prototype.G,jc.prototype.setOptions=jc.prototype.v,jc.createFromModelPath=async function(t,e){return Qu(jc,t,{baseOptions:{modelAssetPath:e}})},jc.createFromModelBuffer=function(t,e){return Qu(jc,t,{baseOptions:{modelAssetBuffer:e}})},jc.createFromOptions=function(t,e){return Qu(jc,t,e)};var Vc=class{constructor(t,e,r){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=r}close(){this.segmentationMasks?.forEach(t=>{t.close()})}};function Hc(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Kc(t){try{let e=new Vc(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.u)return e;t.u(e)}finally{iu(t)}}Vc.prototype.close=Vc.prototype.close;var Xc=class extends ic{constructor(t,e){super(new Zu(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,Fr(t=this.h=new Wa,0,1,e=new Yo),this.B=new wa,Fr(this.h,0,3,this.B),this.l=new Aa,Fr(this.h,0,2,this.l),Br(this.l,4,1),Vr(this.l,2,.5),Vr(this.B,2,.5),Vr(this.h,4,.5)}C(){return"PoseLandmarker"}get baseOptions(){return Lr(this.h,Yo,1)}set baseOptions(t){Fr(this.h,0,1,t)}v(t){return"numPoses"in t&&Br(this.l,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&Vr(this.l,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&Vr(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&Vr(this.B,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.j(t)}G(t,e,r){var n="function"!=typeof e?e:{};return this.u="function"==typeof e?e:r,Hc(this),ec(this,t,n),Kc(this)}H(t,e,r,n){var i="function"!=typeof r?r:{};return this.u="function"==typeof r?r:n,Hc(this),rc(this,t,i,e),Kc(this)}o(){var t=new vo;go(t,"image_in"),go(t,"norm_rect"),mo(t,"normalized_landmarks"),mo(t,"world_landmarks"),mo(t,"segmentation_masks");var e=new io;di(e,za,this.h);var r=new uo;Kr(r,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"NORM_LANDMARKS:normalized_landmarks"),ho(r,"WORLD_LANDMARKS:world_landmarks"),r.v(e),po(t,r),ru(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(t,e)=>{this.landmarks=[];for(let e of t)t=Fo(e),this.landmarks.push(th(t));eu(this,e)}),this.g.attachEmptyPacketListener("normalized_landmarks",t=>{this.landmarks=[],eu(this,t)}),this.g.attachProtoVectorListener("world_landmarks",(t,e)=>{this.worldLandmarks=[];for(let e of t)t=Ro(e),this.worldLandmarks.push(eh(t));eu(this,e)}),this.g.attachEmptyPacketListener("world_landmarks",t=>{this.worldLandmarks=[],eu(this,t)}),this.outputSegmentationMasks&&(ho(r,"SEGMENTATION_MASK:segmentation_masks"),nu(this,"segmentation_masks"),this.g.ha("segmentation_masks",(t,e)=>{this.segmentationMasks=t.map(t=>nc(this,t,!0,!this.u)),eu(this,e)}),this.g.attachEmptyPacketListener("segmentation_masks",t=>{this.segmentationMasks=[],eu(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};return Xc.prototype.detectForVideo=Xc.prototype.H,Xc.prototype.detect=Xc.prototype.G,Xc.prototype.setOptions=Xc.prototype.v,Xc.createFromModelPath=function(t,e){return Qu(Xc,t,{baseOptions:{modelAssetPath:e}})},Xc.createFromModelBuffer=function(t,e){return Qu(Xc,t,{baseOptions:{modelAssetBuffer:e}})},Xc.createFromOptions=function(t,e){return Qu(Xc,t,e)},Xc.POSE_CONNECTIONS=kc,n("module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS",Xc.POSE_CONNECTIONS),t.DrawingUtils=$u,t.FaceDetector=sc,t.FaceLandmarker=vc,t.FilesetResolver=hh,t.GestureRecognizer=wc,t.HandLandmarker=Tc,t.HolisticLandmarker=Rc,t.ImageClassifier=Ic,t.ImageEmbedder=Fc,t.ImageSegmenter=Dc,t.ImageSegmenterResult=Cc,t.InteractiveSegmenter=Uc,t.InteractiveSegmenterLegacy=Gc,t.InteractiveSegmenterLegacyResult=Bc,t.MPImage=Wu,t.MPMask=Lu,t.ObjectDetector=jc,t.PoseLandmarker=Xc,t.TaskRunner=su,t.VisionTaskRunner=ic,t}({});
|
|
2
2
|
//# sourceMappingURL=vision_bundle_iife.js.map
|