@mediapipe/tasks-vision 0.10.35 → 0.10.36-rc.20260514

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