@pexip/media-processor 18.0.0 → 18.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/workers/mediaWorker.js +14 -14
- package/dist/workers/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var jn=typeof self<"u"?self:{};function $o(e){e:{for(var t=["CLOSURE_FLAGS"],r=jn,n=0;n<t.length;n++)if((r=r[t[n]])==null){t=null;break e}t=r}return(e=t&&t[e])!=null&&e}function gt(){throw Error("Invalid UTF8")}function Ys(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}var gr,hn,m2=typeof TextDecoder<"u",g2,y2=typeof TextEncoder<"u";function qo(e){if(y2)e=(g2||(g2=new TextEncoder)).encode(e);else{let r=0,n=new Uint8Array(3*e.length);for(let s=0;s<e.length;s++){var t=e.charCodeAt(s);if(128>t)n[r++]=t;else{if(2048>t)n[r++]=t>>6|192;else{if(55296<=t&&57343>=t){if(56319>=t&&s<e.length){let o=e.charCodeAt(++s);if(56320<=o&&57343>=o){t=1024*(t-55296)+o-56320+65536,n[r++]=t>>18|240,n[r++]=t>>12&63|128,n[r++]=t>>6&63|128,n[r++]=63&t|128;continue}s--}t=65533}n[r++]=t>>12|224,n[r++]=t>>6&63|128}n[r++]=63&t|128}}e=r===n.length?n:n.subarray(0,r)}return e}var tr,Jo=$o(610401301),v2=$o(188588736),Ks=jn.navigator;function vn(e){return!!Jo&&!!tr&&tr.brands.some(({brand:t})=>t&&t.indexOf(e)!=-1)}function Ce(e){var t;return(t=jn.navigator)&&(t=t.userAgent)||(t=""),t.indexOf(e)!=-1}function rt(){return!!Jo&&!!tr&&0<tr.brands.length}function ln(){return rt()?vn("Chromium"):(Ce("Chrome")||Ce("CriOS"))&&!(!rt()&&Ce("Edge"))||Ce("Silk")}tr=Ks&&Ks.userAgentData||null;var _2=!rt()&&(Ce("Trident")||Ce("MSIE"));!Ce("Android")||ln(),ln(),Ce("Safari")&&(ln()||!rt()&&Ce("Coast")||!rt()&&Ce("Opera")||!rt()&&Ce("Edge")||(rt()?vn("Microsoft Edge"):Ce("Edg/"))||rt()&&vn("Opera"));var Zo={},zt=null;function E2(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):"=.".indexOf(e[t-1])!=-1&&(r="=.".indexOf(e[t-2])!=-1?r-2:r-1);var n=new Uint8Array(r),s=0;return function(o,i){function a(b){for(;c<o.length;){var A=o.charAt(c++),x=zt[A];if(x!=null)return x;if(!/^[\s\xa0]*$/.test(A))throw Error("Unknown base64 encoding at char: "+A)}return b}Qo();for(var c=0;;){var u=a(-1),f=a(0),h=a(64),m=a(64);if(m===64&&u===-1)break;i(u<<2|f>>4),h!=64&&(i(f<<4&240|h>>2),m!=64&&i(h<<6&192|m))}}(e,function(o){n[s++]=o}),s!==r?n.subarray(0,s):n}function Qo(){if(!zt){zt={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));Zo[r]=n;for(var s=0;s<n.length;s++){var o=n[s];zt[o]===void 0&&(zt[o]=s)}}}}var ei=typeof Uint8Array<"u",ti=!_2&&typeof btoa=="function";function $s(e){if(!ti){var t;t===void 0&&(t=0),Qo(),t=Zo[t];var r=Array(Math.floor(e.length/3)),n=t[64]||"";let c=0,u=0;for(;c<e.length-2;c+=3){var s=e[c],o=e[c+1],i=e[c+2],a=t[s>>2];s=t[(3&s)<<4|o>>4],o=t[(15&o)<<2|i>>6],i=t[63&i],r[u++]=a+s+o+i}switch(a=0,i=n,e.length-c){case 2:i=t[(15&(a=e[c+1]))<<2]||n;case 1:e=e[c],r[u]=t[e>>2]+t[(3&e)<<4|a>>4]+i+n}return r.join("")}for(t="",r=0,n=e.length-10240;r<n;)t+=String.fromCharCode.apply(null,e.subarray(r,r+=10240));return t+=String.fromCharCode.apply(null,r?e.subarray(r):e),btoa(t)}var qs=/[-_.]/g,T2={"-":"+",_:"/",".":"="};function b2(e){return T2[e]||""}function ri(e){if(!ti)return E2(e);qs.test(e)&&(e=e.replace(qs,b2)),e=atob(e);let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}function ir(e){return ei&&e!=null&&e instanceof Uint8Array}var x2;function Gr(){return x2||(x2=new Uint8Array(0))}var St={},A2;function ni(e){if(e!==St)throw Error("illegal external caller")}function bt(){return A2||(A2=new Qe(null,St))}function Xn(e){ni(St);var t=e.g;return(t=t==null||ir(t)?t:typeof t=="string"?ri(t):null)==null?t:e.g=t}var Qe=class{constructor(e,t){if(ni(t),this.g=e,e!=null&&e.length===0)throw Error("ByteString should be constructed with non-empty values")}h(){let e=Xn(this);return e?new Uint8Array(e):Gr()}};function si(e,t){return Error(`Invalid wire type: ${e} (at position ${t})`)}function Wn(){return Error("Failed to read varint, encoding is invalid.")}function oi(e,t){return Error(`Tried to read past the end of the data ${t} > ${e}`)}function Hn(e){if(typeof e=="string")return{buffer:ri(e),N:!1};if(Array.isArray(e))return{buffer:new Uint8Array(e),N:!1};if(e.constructor===Uint8Array)return{buffer:e,N:!1};if(e.constructor===ArrayBuffer)return{buffer:new Uint8Array(e),N:!1};if(e.constructor===Qe)return{buffer:Xn(e)||Gr(),N:!0};if(e instanceof Uint8Array)return{buffer:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),N:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function zn(){return typeof BigInt=="function"}var w2=typeof Uint8Array.prototype.slice=="function",ii,B=0,ee=0;function _t(e){let t=0>e,r=(e=Math.abs(e))>>>0;if(e=Math.floor((e-r)/4294967296),t){let[n,s]=$n(r,e);e=s,r=n}B=r>>>0,ee=e>>>0}function Yn(e){let t=ii||(ii=new DataView(new ArrayBuffer(8)));t.setFloat32(0,+e,!0),ee=0,B=t.getUint32(0,!0)}function _n(e,t){return 4294967296*t+(e>>>0)}function Kn(e,t){let r=2147483648&t;return r&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=_n(e,t),r?-e:e}function Cr(e,t){if(e>>>=0,2097151>=(t>>>=0))var r=""+(4294967296*t+e);else zn()?r=""+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(r=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),r+=8147497*t,t*=2,1e7<=e&&(r+=Math.floor(e/1e7),e%=1e7),1e7<=r&&(t+=Math.floor(r/1e7),r%=1e7),r=t+Js(r)+Js(e));return r}function Js(e){return e=String(e),"0000000".slice(e.length)+e}function ai(){var e=B,t=ee;if(2147483648&t)if(zn())e=""+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{let[r,n]=$n(e,t);e="-"+Cr(r,n)}else e=Cr(e,t);return e}function Vr(e){if(16>e.length)_t(Number(e));else if(zn())e=BigInt(e),B=Number(e&BigInt(4294967295))>>>0,ee=Number(e>>BigInt(32)&BigInt(4294967295));else{let t=+(e[0]==="-");ee=B=0;let r=e.length;for(let n=t,s=(r-t)%6+t;s<=r;n=s,s+=6){let o=Number(e.slice(n,s));ee*=1e6,B=1e6*B+o,4294967296<=B&&(ee+=Math.trunc(B/4294967296),ee>>>=0,B>>>=0)}if(t){let[n,s]=$n(B,ee);B=n,ee=s}}}function $n(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function qn(e,t){let r,n=0,s=0,o=0,i=e.h,a=e.g;do r=i[a++],n|=(127&r)<<o,o+=7;while(32>o&&128&r);for(32<o&&(s|=(127&r)>>4),o=3;32>o&&128&r;o+=7)r=i[a++],s|=(127&r)<<o;if(Et(e,a),128>r)return t(n>>>0,s>>>0);throw Wn()}function Jn(e){let t=0,r=e.g,n=r+10,s=e.h;for(;r<n;){let o=s[r++];if(t|=o,(128&o)==0)return Et(e,r),!!(127&t)}throw Wn()}function st(e){let t=e.h,r=e.g,n=t[r++],s=127&n;if(128&n&&(n=t[r++],s|=(127&n)<<7,128&n&&(n=t[r++],s|=(127&n)<<14,128&n&&(n=t[r++],s|=(127&n)<<21,128&n&&(n=t[r++],s|=n<<28,128&n&&128&t[r++]&&128&t[r++]&&128&t[r++]&&128&t[r++]&&128&t[r++])))))throw Wn();return Et(e,r),s}function ot(e){return st(e)>>>0}function En(e){var t=e.h;let r=e.g,n=t[r],s=t[r+1],o=t[r+2];return t=t[r+3],Et(e,e.g+4),(n<<0|s<<8|o<<16|t<<24)>>>0}function Tn(e){var t=En(e);e=2*(t>>31)+1;let r=t>>>23&255;return t&=8388607,r==255?t?NaN:1/0*e:r==0?e*Math.pow(2,-149)*t:e*Math.pow(2,r-150)*(t+Math.pow(2,23))}function R2(e){return st(e)}function fn(e,t,{ca:r=!1}={}){e.ca=r,t&&(t=Hn(t),e.h=t.buffer,e.m=t.N,e.j=0,e.l=e.h.length,e.g=e.j)}function Et(e,t){if(e.g=t,t>e.l)throw oi(e.l,t)}function ci(e,t){if(0>t)throw Error(`Tried to read a negative byte length: ${t}`);let r=e.g,n=r+t;if(n>e.l)throw oi(t,e.l-r);return e.g=n,r}function ui(e,t){if(t==0)return bt();var r=ci(e,t);return e.ca&&e.m?r=e.h.subarray(r,r+t):(e=e.h,r=r===(t=r+t)?Gr():w2?e.slice(r,t):new Uint8Array(e.subarray(r,t))),r.length==0?bt():new Qe(r,St)}var Zs=[];function hi(e){var t=e.g;if(t.g==t.l)return!1;e.l=e.g.g;var r=ot(e.g);if(t=r>>>3,!(0<=(r&=7)&&5>=r))throw si(r,e.l);if(1>t)throw Error(`Invalid field number: ${t} (at position ${e.l})`);return e.m=t,e.h=r,!0}function br(e){switch(e.h){case 0:e.h!=0?br(e):Jn(e.g);break;case 1:Et(e=e.g,e.g+8);break;case 2:if(e.h!=2)br(e);else{var t=ot(e.g);Et(e=e.g,e.g+t)}break;case 5:Et(e=e.g,e.g+4);break;case 3:for(t=e.m;;){if(!hi(e))throw Error("Unmatched start-group tag: stream EOF");if(e.h==4){if(e.m!=t)throw Error("Unmatched end-group tag");break}br(e)}break;default:throw si(e.h,e.l)}}function ar(e,t,r){let n=e.g.l,s=ot(e.g),o=e.g.g+s,i=o-n;if(0>=i&&(e.g.l=o,r(t,e,void 0,void 0,void 0),i=o-e.g.g),i)throw Error(`Message parsing ended unexpectedly. Expected to read ${s} bytes, instead read ${s-i} bytes, either the data ended unexpectedly or the message misreported its own length`);return e.g.g=o,e.g.l=n,t}function Zn(e){var t=ot(e.g),r=ci(e=e.g,t);if(e=e.h,m2){var n,s=e;(n=hn)||(n=hn=new TextDecoder("utf-8",{fatal:!0})),t=r+t,s=r===0&&t===s.length?s:s.subarray(r,t);try{var o=n.decode(s)}catch(a){if(gr===void 0){try{n.decode(new Uint8Array([128]))}catch{}try{n.decode(new Uint8Array([97])),gr=!0}catch{gr=!1}}throw!gr&&(hn=void 0),a}}else{t=(o=r)+t,r=[];let a,c=null;for(;o<t;){var i=e[o++];128>i?r.push(i):224>i?o>=t?gt():(a=e[o++],194>i||(192&a)!=128?(o--,gt()):r.push((31&i)<<6|63&a)):240>i?o>=t-1?gt():(a=e[o++],(192&a)!=128||i===224&&160>a||i===237&&160<=a||(192&(n=e[o++]))!=128?(o--,gt()):r.push((15&i)<<12|(63&a)<<6|63&n)):244>=i?o>=t-2?gt():(a=e[o++],(192&a)!=128||a-144+(i<<28)>>30||(192&(n=e[o++]))!=128||(192&(s=e[o++]))!=128?(o--,gt()):(i=(7&i)<<18|(63&a)<<12|(63&n)<<6|63&s,i-=65536,r.push(55296+(i>>10&1023),56320+(1023&i)))):gt(),8192<=r.length&&(c=Ys(c,r),r.length=0)}o=Ys(c,r)}return o}function li(e){let t=ot(e.g);return ui(e.g,t)}function jr(e,t,r){var n=ot(e.g);for(n=e.g.g+n;e.g.g<n;)r.push(t(e.g))}var yr=[];function Qs(e){return e?/^\d+$/.test(e)?(Vr(e),new eo(B,ee)):null:k2||(k2=new eo(0,0))}var eo=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}},k2;function to(e){return e?/^-?\d+$/.test(e)?(Vr(e),new ro(B,ee)):null:S2||(S2=new ro(0,0))}var ro=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}},S2;function Fr(e,t,r){for(;0<r||127<t;)e.g.push(127&t|128),t=(t>>>7|r<<25)>>>0,r>>>=7;e.g.push(t)}function cr(e,t){for(;127<t;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function Xr(e,t){if(0<=t)cr(e,t);else{for(let r=0;9>r;r++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function rr(e,t){e.g.push(t>>>0&255),e.g.push(t>>>8&255),e.g.push(t>>>16&255),e.g.push(t>>>24&255)}function Ct(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function Ie(e,t,r){cr(e.g,8*t+r)}function Qn(e,t){return Ie(e,t,2),t=e.g.end(),Ct(e,t),t.push(e.h),t}function es(e,t){var r=t.pop();for(r=e.h+e.g.length()-r;127<r;)t.push(127&r|128),r>>>=7,e.h++;t.push(r),e.h++}function Wr(e,t,r){Ie(e,t,2),cr(e.g,r.length),Ct(e,e.g.end()),Ct(e,r)}function bn(e,t,r,n){r!=null&&(t=Qn(e,t),n(r,e),es(e,t))}var it=class{constructor(t,r,n,s){this.g=t,this.h=r,this.l=n,this.pa=s}};function be(e){return Array.prototype.slice.call(e)}function fi(e){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol():e}var je=fi(),no=fi("0di"),ts=je?(e,t)=>{e[je]|=t}:(e,t)=>{e.g!==void 0?e.g|=t:Object.defineProperties(e,{g:{value:t,configurable:!0,writable:!0,enumerable:!1}})},Lr=je?(e,t)=>{e[je]&=~t}:(e,t)=>{e.g!==void 0&&(e.g&=~t)};function ie(e,t,r){return r?e|t:e&~t}var $=je?e=>0|e[je]:e=>0|e.g,I=je?e=>e[je]:e=>e.g,K=je?(e,t)=>(e[je]=t,e):(e,t)=>(e.g!==void 0?e.g=t:Object.defineProperties(e,{g:{value:t,configurable:!0,writable:!0,enumerable:!1}}),e);function Ut(e){return ts(e,34),e}function C2(e,t){K(t,-14591&(0|e))}function xn(e,t){K(t,-14557&(34|e))}function di(e){return(e=e>>14&1023)===0?536870912:e}var rs,ur={},pi={};function so(e){return!(!e||typeof e!="object"||e.Ja!==pi)}function ns(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.constructor===Object}function ss(e,t,r){if(e!=null){if(typeof e=="string")e=e?new Qe(e,St):bt();else if(e.constructor!==Qe)if(ir(e))e=e.length?new Qe(r?e:new Uint8Array(e),St):bt();else{if(!t)throw Error();e=void 0}}return e}function Mr(e,t,r){if(!Array.isArray(e)||e.length)return!1;let n=$(e);return!!(1&n)||!(!t||!(Array.isArray(t)?t.includes(r):t.has(r)))&&(K(e,1|n),!0)}var oo=[];function ze(e){if(2&e)throw Error()}K(oo,55),rs=Object.freeze(oo);var Ir=class e{constructor(t,r,n){this.l=0,this.g=t,this.h=r,this.m=n}next(){if(this.l<this.g.length){let t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new e(this.g,this.h,this.m)}},nt,F2;function mi(e,t){(t=nt?t[nt]:void 0)&&(e[nt]=be(t))}function An(e){return(e=Error(e)).__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity="warning",e}function ht(e){return e==null||typeof e=="number"?e:e==="NaN"||e==="Infinity"||e==="-Infinity"?Number(e):void 0}function gi(e){return e==null||typeof e=="boolean"?e:typeof e=="number"?!!e:void 0}Object.freeze(new class{}),Object.freeze(new class{});var L2=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Hr(e){let t=typeof e;return t==="number"?Number.isFinite(e):t==="string"&&L2.test(e)}function Bt(e){if(e==null)return e;if(typeof e=="string"){if(!e)return;e=+e}return typeof e=="number"&&Number.isFinite(e)?0|e:void 0}function M2(e){if(e==null)return e;if(typeof e=="string"){if(!e)return;e=+e}return typeof e=="number"&&Number.isFinite(e)?e>>>0:void 0}function io(e){return e[0]!=="-"&&(20>e.length||e.length===20&&184467>Number(e.substring(0,6)))}function yi(e){return e[0]==="-"?20>e.length||e.length===20&&-922337<Number(e.substring(0,7)):19>e.length||e.length===19&&922337>Number(e.substring(0,6))}function os(e){return e=Math.trunc(e),Number.isSafeInteger(e)||(_t(e),e=Kn(B,ee)),e}function is(e){var t=Math.trunc(Number(e));return Number.isSafeInteger(t)?String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),yi(e)||(Vr(e),e=ai()),e)}function Or(e){return e==null?e:Hr(e)?typeof e=="number"?os(e):is(e):void 0}function hr(e){if(typeof e!="string")throw Error();return e}function Nt(e){if(e!=null&&typeof e!="string")throw Error();return e}function nr(e){return e==null||typeof e=="string"?e:void 0}function as(e,t,r,n){if(e!=null&&typeof e=="object"&&e.X===ur)return e;if(!Array.isArray(e))return r?2&n?(e=t[no])?t=e:(Ut((e=new t).u),t=t[no]=e):t=new t:t=void 0,t;let s=r=$(e);return s===0&&(s|=32&n),s|=2&n,s!==r&&K(e,s),new t(e)}function I2(e,t,r){if(t){var n=!!n;if(!Hr(t=e))throw An("int64");typeof t=="string"?n=is(t):n?(n=Math.trunc(t),Number.isSafeInteger(n)?n=String(n):yi(t=String(n))?n=t:(_t(n),n=ai())):n=os(t)}else n=Or(e);return typeof(r=(e=n)==null?r?0:void 0:e)=="string"&&(n=+r,Number.isSafeInteger(n))?n:r}var Pr,cs,O2;function Dr(e){switch(typeof e){case"boolean":return cs||(cs=[0,void 0,!0]);case"number":return 0<e?void 0:e===0?O2||(O2=[0,void 0]):[-e,void 0];case"string":return[0,e];case"object":return e}}function Tt(e,t){return vi(e,t[0],t[1])}function vi(e,t,r){if(e==null&&(e=Pr),Pr=void 0,e==null){var n=96;r?(e=[r],n|=512):e=[],t&&(n=-16760833&n|(1023&t)<<14)}else{if(!Array.isArray(e)||2048&(n=$(e)))throw Error();if(64&n)return e;if(n|=64,r&&(n|=512,r!==e[0]))throw Error();e:{let s=(r=e).length;if(s){let o=s-1;if(ns(r[o])){if(1024<=(t=o-(+!!(512&(n|=256))-1)))throw Error();n=-16760833&n|(1023&t)<<14;break e}}if(t){if(1024<(t=Math.max(t,s-(+!!(512&n)-1))))throw Error();n=-16760833&n|(1023&t)<<14}}}return K(e,n),e}var P2={},D2=function(){try{return new class extends Map{constructor(){super()}},!1}catch{return!0}}(),Kt=class{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,r){return this.g.set(t,r),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,r){return this.g.forEach(t,r)}[Symbol.iterator](){return this.entries()}},U2=D2?(Object.setPrototypeOf(Kt.prototype,Map.prototype),Object.defineProperties(Kt.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),Kt):class extends Map{constructor(){super()}};function ao(e){return e}function dn(e){if(2&e.L)throw Error("Cannot mutate an immutable Map")}var Le=class extends U2{constructor(e,t,r=ao,n=ao){super();let s=$(e);s|=64,K(e,s),this.L=s,this.U=t,this.S=r,this.Z=this.U?B2:n;for(let o=0;o<e.length;o++){let i=e[o],a=r(i[0],!1,!0),c=i[1];t?c===void 0&&(c=null):c=n(i[1],!1,!0,void 0,void 0,s),super.set(a,c)}}oa(e=co){if(this.size!==0)return this.Y(e)}Y(e=co){let t=[],r=super.entries();for(var n;!(n=r.next()).done;)(n=n.value)[0]=e(n[0]),n[1]=e(n[1]),t.push(n);return t}clear(){dn(this),super.clear()}delete(e){return dn(this),super.delete(this.S(e,!0,!1))}entries(){var e=this.na();return new Ir(e,N2,this)}keys(){return this.Ia()}values(){var e=this.na();return new Ir(e,Le.prototype.get,this)}forEach(e,t){super.forEach((r,n)=>{e.call(t,this.get(n),n,this)})}set(e,t){return dn(this),(e=this.S(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.Z(t,!0,!0,this.U,!1,this.L))}Oa(e){let t=this.S(e[0],!1,!0);e=e[1],e=this.U?e===void 0?null:e:this.Z(e,!1,!0,void 0,!1,this.L),super.set(t,e)}has(e){return super.has(this.S(e,!1,!1))}get(e){e=this.S(e,!1,!1);let t=super.get(e);if(t!==void 0){var r=this.U;return r?((r=this.Z(t,!1,!0,r,this.ta,this.L))!==t&&super.set(e,r),r):t}}na(){return Array.from(super.keys())}Ia(){return super.keys()}[Symbol.iterator](){return this.entries()}};function B2(e,t,r,n,s,o){return e=as(e,n,r,o),s&&(e=Yr(e)),e}function co(e){return e}function N2(e){return[e,this.get(e)]}var G2;function uo(){return G2||(G2=new Le(Ut([]),void 0,void 0,void 0,P2))}function us(e,t,r,n,s){if(e!=null){if(Array.isArray(e))e=Mr(e,void 0,0)?void 0:s&&2&$(e)?e:zr(e,t,r,n!==void 0,s);else if(ns(e)){let o={};for(let i in e)o[i]=us(e[i],t,r,n,s);e=o}else e=t(e,n);return e}}function zr(e,t,r,n,s){let o=n||r?$(e):0;n=n?!!(32&o):void 0;let i=be(e);for(let a=0;a<i.length;a++)i[a]=us(i[a],t,r,n,s);return r&&(mi(i,e),r(o,i)),i}function V2(e){return us(e,hs,void 0,void 0,!1)}function hs(e){return e.X===ur?e.toJSON():e instanceof Le?e.oa(V2):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t)if(Array.isArray(t)){if(Mr(t,void 0,0))return}else{if(ir(t))return $s(t);if(t instanceof Qe){let r=t.g;return r==null?"":typeof r=="string"?r:t.g=$s(r)}if(t instanceof Le)return t.oa()}}return t}(e)}function wn(e,t,r=xn){if(e!=null){if(ei&&e instanceof Uint8Array)return t?e:new Uint8Array(e);if(Array.isArray(e)){var n=$(e);return 2&n?e:(t&&(t=n===0||!!(32&n)&&!(64&n||!(16&n))),t?K(e,-12293&(34|n)):zr(e,wn,4&n?xn:r,!0,!0))}return e.X===ur?(r=e.u,e=2&(n=I(r))?e:ls(e,r,n,!0)):e instanceof Le&&!(2&e.L)&&(r=Ut(e.Y(wn)),e=new Le(r,e.U,e.S,e.Z)),e}}function ls(e,t,r,n){return e=e.constructor,Pr=t=_i(t,r,n),t=new e(t),Pr=void 0,t}function _i(e,t,r){let n=r||2&t?xn:C2,s=!!(32&t);return e=function(o,i,a){let c=be(o);var u=c.length;let f=256&i?c[u-1]:void 0;for(u+=f?-1:0,i=512&i?1:0;i<u;i++)c[i]=a(c[i]);if(f){i=c[i]={};for(let h in f)i[h]=a(f[h])}return mi(c,o),c}(e,t,o=>wn(o,s,n)),ts(e,32|(r?2:0)),e}function Yr(e){let t=e.u,r=I(t);return 2&r?ls(e,t,r,!1):e}function Ft(e,t){return Ye(e=e.u,I(e),t)}function Ye(e,t,r,n){if(r===-1)return null;if(r>=di(t)){if(256&t)return e[e.length-1][r]}else{var s=e.length;if(n&&256&t&&(n=e[s-1][r])!=null)return n;if((t=r+(+!!(512&t)-1))<s)return e[t]}}function D(e,t,r,n){let s=e.u,o=I(s);return ze(o),N(s,o,t,r,n),e}function N(e,t,r,n,s){let o=di(t);if(r>=o||s){let i=t;if(256&t)s=e[e.length-1];else{if(n==null)return i;s=e[o+(+!!(512&t)-1)]={},i|=256}return s[r]=n,r<o&&(e[r+(+!!(512&t)-1)]=void 0),i!==t&&K(e,i),i}return e[r+(+!!(512&t)-1)]=n,256&t&&r in(e=e[e.length-1])&&delete e[r],t}function Gt(e,t,r,n,s){var o=2&t;let i=Ye(e,t,r,s);Array.isArray(i)||(i=rs);let a=!(2&n);n=!(1&n);let c=!!(32&t),u=$(i);return u!==0||!c||o||a?1&u||(u|=1,K(i,u)):(u|=33,K(i,u)),o?(e=!1,2&u||(Ut(i),e=!!(4&u)),(n||e)&&Object.freeze(i)):(o=!!(2&u)||!!(2048&u),n&&o?(i=be(i),n=1,c&&!a&&(n|=32),K(i,n),N(e,t,r,i,s)):a&&32&u&&!o&&Lr(i,32)),i}function xr(e,t){e=e.u;let r=I(e),n=Ye(e,r,t),s=ht(n);return s!=null&&s!==n&&N(e,r,t,s),s}function Ei(e){e=e.u;let t=I(e),r=Ye(e,t,1),n=ss(r,!0,!!(34&t));return n!=null&&n!==r&&N(e,t,1,n),n}function Rt(e,t,r){e=e.u;let n=I(e),s=2&n?1:2,o=Ti(e,n,t);var i=$(o);if(!(4&i)){(4&i||Object.isFrozen(o))&&(o=be(o),i=xt(i,n,!1),n=N(e,n,t,o));var a=0;let c=0;for(;a<o.length;a++){let u=r(o[a]);u!=null&&(o[c++]=u)}c<a&&(o.length=c),i=ie(i=bi(i,n,!1),20,!0),i=ie(i,4096,!1),i=ie(i,8192,!1),K(o,i),2&i&&Object.freeze(o)}return $t(i)||(r=i,(i=(a=s===1)?ie(i,2,!0):ie(i,32,!1))!==r&&K(o,i),a&&Object.freeze(o)),s===2&&$t(i)&&(o=be(o),i=xt(i,n,!1),K(o,i),N(e,n,t,o)),o}function Ti(e,t,r){return e=Ye(e,t,r),Array.isArray(e)?e:rs}function bi(e,t,r){return e===0&&(e=xt(e,t,r)),ie(e,1,!0)}function $t(e){return!!(2&e)&&!!(4&e)||!!(2048&e)}function xi(e){e=be(e);for(let t=0;t<e.length;t++){let r=e[t]=be(e[t]);Array.isArray(r[1])&&(r[1]=Ut(r[1]))}return e}function Ur(e,t,r){{let i=e.u,a=I(i);if(ze(a),r==null)N(i,a,t);else{var n,s=e=$(r),o=!!(2&e)||Object.isFrozen(r);if((n=!o)&&(n=!1),!(4&e))for(e=21,o&&(r=be(r),s=0,e=xt(e,a,!0)),o=0;o<r.length;o++)r[o]=hr(r[o]);n&&(r=be(r),s=0,e=xt(e,a,!0)),e!==s&&K(r,e),N(i,a,t,r)}}}function Rn(e,t,r,n){e=e.u;let s=I(e);ze(s),N(e,s,t,(n==="0"?Number(r)===0:r===n)?void 0:r)}function lr(e,t,r,n){let s=I(e);ze(s),e=Gt(e,s,t,2),n=r(n,!!(4&(t=$(e)))&&!!(4096&t)),e.push(n)}function j2(e){return e}function pn(e,t){return fs(e=e.u,I(e),aa)===t?t:-1}function fs(e,t,r){let n=0;for(let s=0;s<r.length;s++){let o=r[s];Ye(e,t,o)!=null&&(n!==0&&(t=N(e,t,n)),n=o)}return n}function ds(e,t,r,n){let s=I(e);ze(s);let o=Ye(e,s,r,n),i;if(o!=null&&o.X===ur)return(t=Yr(o))!==o&&N(e,s,r,t,n),t.u;if(Array.isArray(o)){let a=$(o);i=2&a?_i(o,a,!1):o,i=Tt(i,t)}else i=Tt(void 0,t);return i!==o&&N(e,s,r,i,n),i}function Ai(e,t,r,n){e=e.u;let s=I(e),o=Ye(e,s,r,n);return(t=as(o,t,!1,s))!==o&&t!=null&&N(e,s,r,t,n),t}function C(e,t,r,n=!1){if((t=Ai(e,t,r,n))==null)return t;e=e.u;let s=I(e);if(!(2&s)){let o=Yr(t);o!==t&&N(e,s,r,t=o,n)}return t}function wi(e,t,r,n,s,o){var i=!!(2&t),a=i?1:2;let c=a===1;a=a===2,s=!!s,o&&(o=!i),i=Ti(e,t,n);var u=$(i);let f=!!(4&u);if(!f){var h=i,m=t;let b=!!(2&(u=bi(u,t,s)));b&&(m=ie(m,2,!0));let A=!b,x=!0,O=0,d=0;for(;O<h.length;O++){let l=as(h[O],r,!1,m);if(l instanceof r){if(!b){let g=!!(2&$(l.u));A&&(A=!g),x&&(x=g)}h[d++]=l}}d<O&&(h.length=d),u=ie(u,4,!0),u=ie(u,16,x),u=ie(u,8,A),K(h,u),b&&Object.freeze(h)}if(r=!!(8&u)||c&&!i.length,o&&!r){for($t(u)&&(i=be(i),u=xt(u,t,s),t=N(e,t,n,i)),o=i,r=u,h=0;h<o.length;h++)(u=o[h])!==(m=Yr(u))&&(o[h]=m);r=ie(r,8,!0),r=ie(r,16,!o.length),K(o,r),u=r}return $t(u)||(o=u,c?u=ie(u,!i.length||16&u&&(!f||32&u)?2:2048,!0):s||(u=ie(u,32,!1)),u!==o&&K(i,u),c&&Object.freeze(i)),a&&$t(u)&&(i=be(i),u=xt(u,t,s),K(i,u),N(e,t,n,i)),i}function tt(e,t,r){e=e.u;let n=I(e);return wi(e,n,t,r,!1,!(2&n))}function _(e,t,r,n,s){return n==null&&(n=void 0),D(e,r,n,s)}function qt(e,t,r,n){n==null&&(n=void 0),e=e.u;let s=I(e);ze(s),(r=fs(e,s,r))&&r!==t&&n!=null&&(s=N(e,s,r)),N(e,s,t,n)}function xt(e,t,r){return e=ie(e,2,!!(2&t)),e=ie(e,32,!!(32&t)&&r),ie(e,2048,!1)}function Br(e,t,r,n){e=e.u;let s=I(e);ze(s),t=wi(e,s,r,t,!0),r=n??new r,t.push(r),2&$(r.u)?Lr(t,8):Lr(t,16)}function Fe(e,t){return Bt(Ft(e,t))}function Me(e,t){return nr(Ft(e,t))}function Xe(e){return e??0}function J(e,t){return Xe(xr(e,t))}function sr(e,t,r){if(r!=null&&typeof r!="boolean")throw e=typeof r,Error(`Expected boolean but got ${e!="object"?e:r?Array.isArray(r)?"array":e:"null"}: ${r}`);D(e,t,r)}function We(e,t,r){if(r!=null){if(typeof r!="number"||!Number.isFinite(r))throw An("int32");r|=0}D(e,t,r)}function v(e,t,r){if(r!=null&&typeof r!="number")throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);D(e,t,r)}function De(e,t,r){t.g?t.m(e,t.g,t.h,r,!0):t.m(e,t.h,r,!0)}Le.prototype.toJSON=void 0,Le.prototype.Ja=pi;var y=class{constructor(e,t){this.u=vi(e,t)}toJSON(){return Ri(this,zr(this.u,hs,void 0,void 0,!1),!0)}l(){var e=Y1;return e.g?e.l(this,e.g,e.h,!0):e.l(this,e.h,e.defaultValue,!0)}clone(){let e=this.u;return ls(this,e,I(e),!1)}N(){return!!(2&$(this.u))}};function Ri(e,t,r){var n=v2?void 0:e.constructor.A;let s=I(r?e.u:t);if(!(e=t.length))return t;let o,i;if(ns(r=t[e-1])){e:{var a=r;let f={},h=!1;for(var c in a){let m=a[c];if(Array.isArray(m)){let b=m;(Mr(m,n,+c)||so(m)&&m.size===0)&&(m=null),m!=b&&(h=!0)}m!=null?f[c]=m:h=!0}if(h){for(var u in f){a=f;break e}a=null}}a!=r&&(o=!0),e--}for(c=+!!(512&s)-1;0<e&&(r=t[u=e-1],u-=c,r==null||Mr(r,n,u)||so(r)&&r.size===0);e--)i=!0;return(o||i)&&(t=Array.prototype.slice.call(t,0,e),a&&t.push(a)),t}function ki(e){return Array.isArray(e)?e[0]instanceof it?e:[Q2,e]:[e,void 0]}function Vt(e,t){if(Array.isArray(t)){var r=$(t);if(4&r)return t;for(var n=0,s=0;n<t.length;n++){let o=e(t[n]);o!=null&&(t[s++]=o)}return s<n&&(t.length=s),K(t,-12289&(5|r)),2&r&&Object.freeze(t),t}}y.prototype.X=ur,y.prototype.toString=function(){return Ri(this,this.u,!1).toString()};var ho=Symbol();function ps(e){let t=e[ho];if(!t){let r=Ci(e),n=gs(e),s=n.l;t=s?(o,i)=>s(o,i,n):(o,i)=>{for(;hi(i)&&i.h!=4;){var a=i.m,c=n[a];if(!c){var u=n.ea;u&&(u=u[a])&&(c=n[a]=X2(u))}c&&c(i,o,a)||(a=(c=i).l,br(c),c.ia?c=void 0:(u=c.g.g-a,c.g.g=a,c=ui(c.g,u)),a=o,c&&(nt||(nt=Symbol()),(u=a[nt])?u.push(c):a[nt]=[c]))}r===Si||r===Ar||r.j||(o[F2||(F2=Symbol())]=r)},e[ho]=t}return t}function X2(e){let t=(e=ki(e))[0].g;if(e=e[1]){let r=ps(e),n=gs(e).T;return(s,o,i)=>t(s,o,i,n,r)}return t}var Jt=class{},Si,Ar,Zt=Symbol();function W2(e,t,r){let n=r[1],s;if(n){let o=n[Zt];s=o?o.T:Dr(n[0]),e[t]=o??n}s&&s===cs?(e.g||(e.g=new Set)).add(t):r[0]&&(e.h||(e.h=new Set)).add(t)}function lo(e,t){return[e.l,!t||0<t[0]?void 0:t]}function Ci(e){var t=e[Zt];if(t)return t;if(!(t=ms(e,e[Zt]=new Jt,lo,lo,W2)).ea&&!t.h&&!t.g){let r=!0;for(let n in t)isNaN(n)||(r=!1);r?(Dr(e[0])===cs?Ar?t=Ar:((t=new Jt).T=Dr(!0),t=Ar=t):t=Si||(Si=new Jt),t=e[Zt]=t):t.j=!0}return t}function H2(e,t,r){e[t]=r}function ms(e,t,r,n,s=H2){t.T=Dr(e[0]);let o=0;var i=e[++o];i&&i.constructor===Object&&(t.ea=i,typeof(i=e[++o])=="function"&&(t.l=i,t.m=e[++o],i=e[++o]));let a={};for(;Array.isArray(i)&&typeof i[0]=="number"&&0<i[0];){for(var c=0;c<i.length;c++)a[i[c]]=i;i=e[++o]}for(c=1;i!==void 0;){let h;typeof i=="number"&&(c+=i,i=e[++o]);var u=void 0;if(i instanceof it?h=i:(h=e1,o--),h.pa){i=e[++o],u=e;var f=o;typeof i=="function"&&(i=i(),u[f]=i),u=i}for(f=c+1,typeof(i=e[++o])=="number"&&0>i&&(f-=i,i=e[++o]);c<f;c++){let m=a[c];s(t,c,u?n(h,u,m):r(h,m))}}return t}var fo=Symbol();function Fi(e){let t=e[fo];if(!t){let r=Kr(e);t=(n,s)=>Mi(n,s,r),e[fo]=t}return t}var kn=Symbol();function z2(e){return e.h}function Y2(e,t){let r,n,s=e.h;return(o,i,a)=>s(o,i,a,n||(n=Kr(t).T),r||(r=Fi(t)))}function Kr(e){let t=e[kn];return t||(t=ms(e,e[kn]={},z2,Y2),Li(e),t)}var Sn=Symbol();function K2(e,t){let r=e.g;return t?(n,s,o)=>r(n,s,o,t):r}function $2(e,t,r){let n=e.g,s,o;return(i,a,c)=>n(i,a,c,o||(o=gs(t).T),s||(s=ps(t)),r)}function gs(e){let t=e[Sn];return t||(Ci(e),t=ms(e,e[Sn]={},K2,$2),Li(e),t)}function Li(e){Sn in e&&Zt in e&&kn in e&&(e.length=0)}function po(e,t){var r=e[t];if(r)return r;if((r=e.ea)&&(r=r[t])){var n=(r=ki(r))[0].h;if(r=r[1]){let s=Fi(r),o=Kr(r).T;r=(r=e.m)?r(o,s):(i,a,c)=>n(i,a,c,o,s)}else r=n;return e[t]=r}}function Mi(e,t,r){for(var n=I(e),s=+!!(512&n)-1,o=e.length,i=512&n?1:0,a=o+(256&n?-1:0);i<a;i++){let c=e[i];if(c==null)continue;let u=i-s,f=po(r,u);f&&f(t,c,u)}if(256&n){n=e[o-1];for(let c in n)s=+c,Number.isNaN(s)||(o=n[c])!=null&&(a=po(r,s))&&a(t,o,s)}if(e=nt?e[nt]:void 0)for(Ct(t,t.g.end()),r=0;r<e.length;r++)Ct(t,Xn(e[r])||Gr())}function me(e,t){return new it(e,t,!1,!1)}function jt(e,t){return new it(e,t,!0,!1)}function $r(e,t){return new it(e,t,!1,!0)}function ge(e,t,r){N(e,I(e),t,r)}var q2=$r(function(e,t,r,n,s){return e.h===2&&(e=ar(e,Tt([void 0,void 0],n),s),ze(n=I(t)),(s=Ye(t,n,r))instanceof Le?2&s.L?((s=s.Y()).push(e),N(t,n,r,s)):s.Oa(e):Array.isArray(s)?(2&$(s)&&N(t,n,r,s=xi(s)),s.push(e)):N(t,n,r,[e]),!0)},function(e,t,r,n,s){if(t instanceof Le)t.forEach((o,i)=>{bn(e,r,Tt([i,o],n),s)});else if(Array.isArray(t))for(let o=0;o<t.length;o++){let i=t[o];Array.isArray(i)&&bn(e,r,Tt(i,n),s)}});function Ii(e,t,r){e:if(t!=null){if(Hr(t)){if(typeof t=="string"){t=is(t);break e}if(typeof t=="number"){t=os(t);break e}}t=void 0}t!=null&&(typeof t=="string"&&to(t),t!=null&&(Ie(e,r,0),typeof t=="number"?(e=e.g,_t(t),Fr(e,B,ee)):(r=to(t),Fr(e.g,r.h,r.g))))}function Oi(e,t,r){(t=Bt(t))!=null&&t!=null&&(Ie(e,r,0),Xr(e.g,t))}function Pi(e,t,r){(t=gi(t))!=null&&(Ie(e,r,0),e.g.g.push(t?1:0))}function Di(e,t,r){(t=nr(t))!=null&&Wr(e,r,qo(t))}function qr(e,t,r,n,s){bn(e,r,t instanceof y?t.u:Array.isArray(t)?Tt(t,n):void 0,s)}function Ui(e,t,r){(t=t==null||typeof t=="string"||ir(t)||t instanceof Qe?t:void 0)!=null&&Wr(e,r,Hn(t).buffer)}function Bi(e,t,r){return(e.h===5||e.h===2)&&(t=Gt(t,I(t),r,2,!1),e.h==2?jr(e,Tn,t):t.push(Tn(e.g)),!0)}var ne,et=me(function(e,t,r){if(e.h!==1)return!1;var n=e.g;e=En(n);let s=En(n);n=2*(s>>31)+1;let o=s>>>20&2047;return e=4294967296*(1048575&s)+e,ge(t,r,o==2047?e?NaN:1/0*n:o==0?n*Math.pow(2,-1074)*e:n*Math.pow(2,o-1075)*(e+4503599627370496)),!0},function(e,t,r){(t=ht(t))!=null&&(Ie(e,r,1),e=e.g,(r=ii||(ii=new DataView(new ArrayBuffer(8)))).setFloat64(0,+t,!0),B=r.getUint32(0,!0),ee=r.getUint32(4,!0),rr(e,B),rr(e,ee))}),se=me(function(e,t,r){return e.h===5&&(ge(t,r,Tn(e.g)),!0)},function(e,t,r){(t=ht(t))!=null&&(Ie(e,r,5),e=e.g,Yn(t),rr(e,B))}),J2=jt(Bi,function(e,t,r){if((t=Vt(ht,t))!=null)for(let i=0;i<t.length;i++){var n=e,s=r,o=t[i];o!=null&&(Ie(n,s,5),n=n.g,Yn(o),rr(n,B))}}),ys=jt(Bi,function(e,t,r){if((t=Vt(ht,t))!=null&&t.length){Ie(e,r,2),cr(e.g,4*t.length);for(let n=0;n<t.length;n++)r=e.g,Yn(t[n]),rr(r,B)}}),at=me(function(e,t,r){return e.h===0&&(ge(t,r,qn(e.g,Kn)),!0)},Ii),mn=me(function(e,t,r){return e.h===0&&(ge(t,r,(e=qn(e.g,Kn))===0?void 0:e),!0)},Ii),Z2=me(function(e,t,r){return e.h===0&&(ge(t,r,qn(e.g,_n)),!0)},function(e,t,r){e:if(t!=null){if(Hr(t)){if(typeof t=="string"){var n=Math.trunc(Number(t));Number.isSafeInteger(n)&&0<=n?t=String(n):((n=t.indexOf("."))!==-1&&(t=t.substring(0,n)),io(t)||(Vr(t),t=Cr(B,ee)));break e}if(typeof t=="number"){t=0<=(t=Math.trunc(t))&&Number.isSafeInteger(t)?t:function(s){if(0>s){_t(s);let o=Cr(B,ee);return s=Number(o),Number.isSafeInteger(s)?s:o}return io(String(s))?s:(_t(s),_n(B,ee))}(t);break e}}t=void 0}t!=null&&(typeof t=="string"&&Qs(t),t!=null&&(Ie(e,r,0),typeof t=="number"?(e=e.g,_t(t),Fr(e,B,ee)):(r=Qs(t),Fr(e.g,r.h,r.g))))}),q=me(function(e,t,r){return e.h===0&&(ge(t,r,st(e.g)),!0)},Oi),vs=jt(function(e,t,r){return(e.h===0||e.h===2)&&(t=Gt(t,I(t),r,2,!1),e.h==2?jr(e,st,t):t.push(st(e.g)),!0)},function(e,t,r){if((t=Vt(Bt,t))!=null&&t.length){r=Qn(e,r);for(let n=0;n<t.length;n++)Xr(e.g,t[n]);es(e,r)}}),Lt=me(function(e,t,r){return e.h===0&&(ge(t,r,(e=st(e.g))===0?void 0:e),!0)},Oi),te=me(function(e,t,r){return e.h===0&&(ge(t,r,Jn(e.g)),!0)},Pi),Qt=me(function(e,t,r){return e.h===0&&(ge(t,r,(e=Jn(e.g))===!1?void 0:e),!0)},Pi),ue=jt(function(e,t,r){return e.h===2&&(lr(t,r,j2,e=Zn(e)),!0)},function(e,t,r){if((t=Vt(nr,t))!=null)for(let i=0;i<t.length;i++){var n=e,s=r,o=t[i];o!=null&&Wr(n,s,qo(o))}}),ct=me(function(e,t,r){return e.h===2&&(ge(t,r,(e=Zn(e))===""?void 0:e),!0)},Di),V=me(function(e,t,r){return e.h===2&&(ge(t,r,Zn(e)),!0)},Di),Q2=$r(function(e,t,r,n,s){return e.h===2&&(ar(e,ds(t,n,r,!0),s),!0)},qr),e1=$r(function(e,t,r,n,s){return e.h===2&&(ar(e,ds(t,n,r),s),!0)},qr);ne=new it(function(e,t,r,n,s){if(e.h!==2)return!1;n=Tt(void 0,n);let o=I(t);ze(o);let i=Gt(t,o,r,3);return o=I(t),4&$(i)&&(i=be(i),K(i,-2079&(1|$(i))),N(t,o,r,i)),i.push(n),ar(e,n,s),!0},function(e,t,r,n,s){if(Array.isArray(t))for(let o=0;o<t.length;o++)qr(e,t[o],r,n,s)},!0,!0);var W=$r(function(e,t,r,n,s,o){if(e.h!==2)return!1;let i=I(t);return ze(i),(o=fs(t,i,o))&&r!==o&&N(t,i,o),ar(e,t=ds(t,n,r),s),!0},qr),Ni=me(function(e,t,r){return e.h===2&&(ge(t,r,li(e)),!0)},Ui),t1=jt(function(e,t,r){return(e.h===0||e.h===2)&&(t=Gt(t,I(t),r,2,!1),e.h==2?jr(e,ot,t):t.push(ot(e.g)),!0)},function(e,t,r){if((t=Vt(M2,t))!=null)for(let i=0;i<t.length;i++){var n=e,s=r,o=t[i];o!=null&&(Ie(n,s,0),cr(n.g,o))}}),He=me(function(e,t,r){return e.h===0&&(ge(t,r,st(e.g)),!0)},function(e,t,r){(t=Bt(t))!=null&&(t=parseInt(t,10),Ie(e,r,0),Xr(e.g,t))}),r1=jt(function(e,t,r){return(e.h===0||e.h===2)&&(t=Gt(t,I(t),r,2,!1),e.h==2?jr(e,R2,t):t.push(st(e.g)),!0)},function(e,t,r){if((t=Vt(Bt,t))!=null&&t.length){r=Qn(e,r);for(let n=0;n<t.length;n++)Xr(e.g,t[n]);es(e,r)}}),Cn=class{constructor(t,r){this.h=t,this.g=r,this.l=C,this.m=_,this.defaultValue=void 0}};function Ue(e,t){return new Cn(e,t)}function lt(e,t){return(r,n)=>{e:{if(yr.length){let o=yr.pop();o.o(n),fn(o.g,r,n),r=o}else r=new class{constructor(o,i){if(Zs.length){let a=Zs.pop();fn(a,o,i),o=a}else o=new class{constructor(a,c){this.h=null,this.m=!1,this.g=this.l=this.j=0,fn(this,a,c)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.ca=!1}}(o,i);this.g=o,this.l=this.g.g,this.h=this.m=-1,this.o(i)}o({ia:o=!1}={}){this.ia=o}}(r,n);try{let o=new e,i=o.u;ps(t)(i,r);var s=o;break e}finally{r.g.clear(),r.m=-1,r.h=-1,100>yr.length&&yr.push(r)}s=void 0}return s}}function Jr(e){return function(){let t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){let i=this.g;return this.g=[],i}}}};Mi(this.u,t,Kr(e)),Ct(t,t.g.end());let r=new Uint8Array(t.h),n=t.l,s=n.length,o=0;for(let i=0;i<s;i++){let a=n[i];r.set(a,o),o+=a.length}return t.l=[r],r}}var mo=class extends y{constructor(e){super(e)}},Gi=[0,ct,me(function(e,t,r){return e.h===2&&(ge(t,r,(e=li(e))===bt()?void 0:e),!0)},function(e,t,r){if(t!=null){if(t instanceof y){let n=t.Qa;return void(n&&(t=n(t),t!=null&&Wr(e,r,Hn(t).buffer)))}if(Array.isArray(t))return}Ui(e,t,r)})],n1=[0,V],Vi=[0,q,He,te,-1,vs,He,-1],s1=[0,te,-1],ji=class extends y{constructor(){super()}};ji.A=[6];var Xi=[0,te,V,te,He,-1,r1,V,-1,s1,He],Wi=[0,V,-2],go=class extends y{constructor(){super()}},Hi=[0],zi=[0,q,te,-3],xe=class extends y{constructor(e){super(e,2)}},H={},o1=[-2,H,te];H[336783863]=[0,V,te,-1,q,[0,[1,2,3,4,5],W,Hi,W,Xi,W,Wi,W,zi,W,Vi],n1];var i1=[0,ct,Qt],Yi=[0,mn,-1,Qt,-3,mn,vs,ct,Lt,mn,-1,Qt,Lt,Qt,-2,ct],fr=[-1,{}],Ki=[0,V,1,fr],$i=[0,V,ue,fr];function Ae(e,t){Rn(e,2,Nt(t),"")}function U(e,t){lr(e.u,3,hr,t)}function k(e,t){lr(e.u,4,hr,t)}var ce=class extends y{constructor(e){super(e,500)}o(e){return _(this,0,7,e)}};ce.A=[3,4,5,6,8,13,17,1005];var a1=[-500,ct,-1,ue,-3,o1,ne,Gi,Lt,-1,Ki,$i,ne,i1,ct,Yi,Lt,ue,987,ue],c1=[0,ct,-1,fr],u1=[-500,V,-1,[-1,{}],998,V],h1=[-500,V,ue,-1,[-2,{},te],997,ue,-1],l1=[-500,V,ue,fr,998,ue];function we(e,t){Br(e,1,ce,t)}function G(e,t){lr(e.u,10,hr,t)}function L(e,t){lr(e.u,15,hr,t)}var le=class extends y{constructor(e){super(e,500)}o(e){return _(this,0,1001,e)}};le.A=[1,6,7,9,10,15,16,17,14,1002];var qi=[-500,ne,a1,4,ne,u1,ne,h1,Lt,ne,l1,ue,Lt,Ki,$i,ne,c1,ue,-2,Yi,ct,-1,Qt,979,fr,ne,Gi],f1=lt(le,qi);le.prototype.g=Jr(qi);var d1=[0,ne,[0,q,-2]],p1=class extends y{constructor(e){super(e)}},m1=[0,q,se,V,-1],_s=class extends y{constructor(e){super(e)}g(){return tt(this,p1,1)}};_s.A=[1];var Ji=[0,ne,m1],Zr=lt(_s,Ji),g1=[0,q,se],y1=[0,q,-1,d1],v1=class extends y{constructor(e){super(e)}},_1=[0,q,-3],E1=[0,se,-3],T1=class extends y{constructor(e){super(e)}},b1=[0,se,-1,V,se],wr=class extends y{constructor(e){super(e)}h(){return C(this,v1,2)}g(){return tt(this,T1,5)}};wr.A=[5];var x1=[0,He,_1,E1,y1,ne,b1],Zi=class extends y{constructor(e){super(e)}};Zi.A=[1,2,3,8,9];var Qi=lt(Zi,[0,ue,vs,ys,x1,V,-1,at,ne,g1,ue,at]),ea=class extends y{constructor(e){super(e)}},A1=[0,se,-4],ta=class extends y{constructor(e){super(e)}};ta.A=[1];var kt=lt(ta,[0,ne,A1]),ra=class extends y{constructor(e){super(e)}},w1=[0,se,-4],na=class extends y{constructor(e){super(e)}};na.A=[1];var dr=lt(na,[0,ne,w1]),sa=class extends y{constructor(e){super(e)}};sa.A=[3];var R1=[0,q,-1,ys,He],oa=class extends y{constructor(){super()}};oa.prototype.g=Jr([0,se,-4,at]);var k1=class extends y{constructor(e){super(e)}},S1=[0,1,q,V,Ji],ia=class extends y{constructor(e){super(e)}};ia.A=[1];var C1=lt(ia,[0,ne,S1,at]),Fn=class extends y{constructor(e){super(e)}};Fn.A=[1];var F1=class extends y{constructor(e){super(e)}qa(){let e=Ei(this);return e??bt()}},L1=class extends y{constructor(e){super(e)}},aa=[1,2],M1=[0,aa,W,[0,ys],W,[0,Ni],q,V],ca=class extends y{constructor(e){super(e)}};ca.A=[1];var I1=lt(ca,[0,ne,M1,at]),Qr=class extends y{constructor(e){super(e)}};Qr.A=[4,5];var ua=[0,V,q,se,ue,-1],yo=class extends y{constructor(e){super(e)}},O1=[0,te,-1],vo=class extends y{constructor(e){super(e)}},Rr=[1,2,3,4,5],Nr=class extends y{constructor(e){super(e)}g(){return Ei(this)!=null}h(){return Me(this,2)!=null}},ha=[0,Ni,V,[0,q,at,-1],[0,Z2,at]],z=class extends y{constructor(e){super(e)}g(){return gi(Ft(this,2))??!1}},Z=[0,ha,te,[0,Rr,W,zi,W,Xi,W,Vi,W,Hi,W,Wi],He],en=class extends y{constructor(e){super(e)}},Es=[0,Z,se,-1,q],P1=Ue(502141897,en);H[502141897]=Es;var la=[0,ha];H[512499200]=la;var fa=[0,la];H[515723506]=fa;var D1=lt(class extends y{constructor(e){super(e)}},[0,[0,He,-1,J2,t1],R1]),da=[0,Z];H[508981768]=da;var pa=class extends y{constructor(e){super(e)}},Ts=[0,Z,se,da,te],ma=class extends y{constructor(e){super(e)}},ga=[0,Z,Es,Ts,se,fa];H[508968149]=Ts;var U1=Ue(508968150,ma);H[508968150]=ga;var ya=class extends y{constructor(e){super(e)}},B1=Ue(513916220,ya);H[513916220]=[0,Z,ga,q];var wt=class extends y{constructor(e){super(e)}h(){return C(this,Qr,2)}g(){D(this,2)}},va=[0,Z,ua];H[478825465]=va;var _a=[0,Z];H[478825422]=_a;var N1=class extends y{constructor(e){super(e)}},Ea=[0,Z,_a,va,-1],Ta=class extends y{constructor(e){super(e)}},ba=[0,Z,se,q],bs=class extends y{constructor(e){super(e)}},xs=[0,Z,se],As=class extends y{constructor(e){super(e)}},xa=[0,Z,ba,xs,se],Aa=class extends y{constructor(e){super(e)}},G1=[0,Z,xa,Ea];H[463370452]=Ea,H[464864288]=ba,H[474472470]=xs;var V1=Ue(462713202,As);H[462713202]=xa;var j1=Ue(479097054,Aa);H[479097054]=G1;var X1=class extends y{constructor(e){super(e)}},W1=[0,Z],wa=class extends y{constructor(e){super(e)}},ws=[0,Z,se,-1,q];H[514774813]=ws;var Ra=class extends y{constructor(e){super(e)}},Rs=[0,Z,se,te];H[518928384]=Rs;var ka=class extends y{constructor(){super()}};ka.prototype.g=Jr([0,Z,xs,W1,Es,Ts,ws,Rs]);var Sa=class extends y{constructor(e){super(e)}},H1=Ue(456383383,Sa);H[456383383]=[0,Z,ua];var Ca=class extends y{constructor(e){super(e)}},z1=Ue(476348187,Ca);H[476348187]=[0,Z,O1];var Fa=class extends y{constructor(e){super(e)}},La=[0,He,-1],Ln=class extends y{constructor(e){super(e)}};Ln.A=[3];var Y1=Ue(458105876,class extends y{constructor(e){super(e)}g(){var e=this.u;let t=I(e);var r=2&t;return e=function(n,s,o){var i=Ln;let a=2&s,c=!1;if(o==null){if(a)return uo();o=[]}else if(o.constructor===Le){if(!(2&o.L)||a)return o;o=o.Y()}else Array.isArray(o)?c=!!(2&$(o)):o=[];if(a){if(!o.length)return uo();c||(c=!0,Ut(o))}else c&&(c=!1,o=xi(o));return c||(64&$(o)?Lr(o,32):32&s&&ts(o,32)),N(n,s,2,i=new Le(o,i,I2,void 0),!1),i}(e,t,Ye(e,t,2)),e==null||!r&&Ln&&(e.ta=!0),r=e}});H[458105876]=[0,La,q2,[!0,at,[0,V,-1,ue]]];var ks=class extends y{constructor(e){super(e)}},Ma=Ue(458105758,ks);H[458105758]=[0,Z,V,La];var Ss=class extends y{constructor(e){super(e)}};Ss.A=[5,6];var K1=Ue(443442058,Ss);H[443442058]=[0,Z,V,q,se,ue,-1];var Ia=class extends y{constructor(e){super(e)}},$1=Ue(516587230,Ia);function Mn(e,t){return t=t?t.clone():new Qr,e.displayNamesLocale!==void 0?D(t,1,Nt(e.displayNamesLocale)):e.displayNamesLocale===void 0&&D(t,1),e.maxResults!==void 0?We(t,2,e.maxResults):"maxResults"in e&&D(t,2),e.scoreThreshold!==void 0?v(t,3,e.scoreThreshold):"scoreThreshold"in e&&D(t,3),e.categoryAllowlist!==void 0?Ur(t,4,e.categoryAllowlist):"categoryAllowlist"in e&&D(t,4),e.categoryDenylist!==void 0?Ur(t,5,e.categoryDenylist):"categoryDenylist"in e&&D(t,5),t}function Cs(e,t=-1,r=""){return{categories:e.map(n=>({index:Xe(Fe(n,1))??-1,score:J(n,2)??0,categoryName:Me(n,3)??""??"",displayName:Me(n,4)??""??""})),headIndex:t,headName:r}}function Oa(e){var t=Rt(e,3,ht),r=Rt(e,2,Bt),n=Rt(e,1,nr),s=Rt(e,9,nr);let o={categories:[],keypoints:[]};for(let i=0;i<t.length;i++)o.categories.push({score:t[i],index:r[i]??-1,categoryName:n[i]??"",displayName:s[i]??""});if((t=C(e,wr,4)?.h())&&(o.boundingBox={originX:Fe(t,1)??0,originY:Fe(t,2)??0,width:Fe(t,3)??0,height:Fe(t,4)??0,angle:0}),C(e,wr,4)?.g().length)for(let i of C(e,wr,4).g())o.keypoints.push({x:xr(i,1)??0,y:xr(i,2)??0,score:xr(i,4)??0,label:Me(i,3)??""});return o}function tn(e){let t=[];for(let r of tt(e,ra,1))t.push({x:J(r,1)??0,y:J(r,2)??0,z:J(r,3)??0,visibility:J(r,4)??0});return t}function er(e){let t=[];for(let r of tt(e,ea,1))t.push({x:J(r,1)??0,y:J(r,2)??0,z:J(r,3)??0,visibility:J(r,4)??0});return t}function _o(e){return Array.from(e,t=>127<t?t-256:t)}function Eo(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let r=0,n=0,s=0;for(let o=0;o<e.length;o++)r+=e[o]*t[o],n+=e[o]*e[o],s+=t[o]*t[o];if(0>=n||0>=s)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*s)}var vr;H[516587230]=[0,Z,ws,Rs,se];var q1=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 Pa(){if(vr===void 0)try{await WebAssembly.instantiate(q1),vr=!0}catch{vr=!1}return vr}async function _r(e,t=""){let r=await Pa()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${t}/${e}_${r}.js`,wasmBinaryPath:`${t}/${e}_${r}.wasm`}}var vt=class{};function Da(){let e=navigator.userAgent;return e.includes("Safari")&&!e.includes("Chrome")}async function To(e){if(typeof importScripts!="function"){let t=document.createElement("script");return t.src=e.toString(),t.crossOrigin="anonymous",new Promise((r,n)=>{t.addEventListener("load",()=>{r()},!1),t.addEventListener("error",s=>{n(s)},!1),document.body.appendChild(t)})}importScripts(e.toString())}function Ua(e){return e.videoWidth!==void 0?[e.videoWidth,e.videoHeight]:e.naturalWidth!==void 0?[e.naturalWidth,e.naturalHeight]:e.displayWidth!==void 0?[e.displayWidth,e.displayHeight]:[e.width,e.height]}function T(e,t,r){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function bo(e,t,r){if(!e.i.canvas)throw Error("No OpenGL canvas configured.");if(r?e.i._bindTextureToStream(r):e.i._bindTextureToCanvas(),!(r=e.i.canvas.getContext("webgl2")||e.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);let[n,s]=Ua(t);return!e.l||n===e.i.canvas.width&&s===e.i.canvas.height||(e.i.canvas.width=n,e.i.canvas.height=s),[n,s]}function xo(e,t,r){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");let n=new Uint32Array(t.length);for(let s=0;s<t.length;s++)n[s]=e.i.stringToNewUTF8(t[s]);t=e.i._malloc(4*n.length),e.i.HEAPU32.set(n,t>>2),r(t);for(let s of n)e.i._free(s);e.i._free(t)}function qe(e,t,r){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=r}function yt(e,t,r){let n=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(s,o,i)=>{o?(r(n,i),n=[]):n.push(s)}}vt.forVisionTasks=function(e){return _r("vision",e)},vt.forTextTasks=function(e){return _r("text",e)},vt.forGenAiTasks=function(e){return _r("genai",e)},vt.forAudioTasks=function(e){return _r("audio",e)},vt.isSimdSupported=function(){return Pa()};async function J1(e,t,r,n){return e=await(async(s,o,i,a,c)=>{if(o&&await To(o),!self.ModuleFactory||i&&(await To(i),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&c&&((o=self.Module).locateFile=c.locateFile,c.mainScriptUrlOrBlob&&(o.mainScriptUrlOrBlob=c.mainScriptUrlOrBlob)),c=await self.ModuleFactory(self.Module||c),self.ModuleFactory=self.Module=void 0,new s(c,a)})(e,r.wasmLoaderPath,r.assetLoaderPath,t,{locateFile:s=>s.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&s.endsWith(".data")?r.assetBinaryPath.toString():s}),await e.o(n),e}function Ao(e,t){let r=C(e.baseOptions,Nr,1)||new Nr;typeof t=="string"?(D(r,2,Nt(t)),D(r,1)):t instanceof Uint8Array&&(D(r,1,ss(t,!1,!1)),D(r,2)),_(e.baseOptions,0,1,r)}function wo(e){try{let t=e.H.length;if(t===1)throw Error(e.H[0].message);if(1<t)throw Error("Encountered multiple errors: "+e.H.map(r=>r.message).join(", "))}finally{e.H=[]}}function p(e,t){e.C=Math.max(e.C,t)}function rn(e,t){e.B=new ce,Ae(e.B,"PassThroughCalculator"),U(e.B,"free_memory"),k(e.B,"free_memory_unused_out"),G(t,"free_memory"),we(t,e.B)}function Mt(e,t){U(e.B,t),k(e.B,t+"_unused_out")}function nn(e){e.g.addBoolToStream(!0,"free_memory",e.C)}var In=class{constructor(e){this.g=e,this.H=[],this.C=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){if(t){let r=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(C(this.baseOptions,Nr,1)?.g()||C(this.baseOptions,Nr,1)?.h()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(n,s){let o=C(n.baseOptions,vo,3);if(!o){var i=o=new vo,a=new go;qt(i,4,Rr,a)}"delegate"in s&&(s.delegate==="GPU"?(s=o,i=new ji,qt(s,2,Rr,i)):(s=o,i=new go,qt(s,4,Rr,i))),_(n.baseOptions,0,3,o)}(this,r),r.modelAssetPath)return fetch(r.modelAssetPath.toString()).then(n=>{if(n.ok)return n.arrayBuffer();throw Error(`Failed to fetch model: ${r.modelAssetPath} (${n.status})`)}).then(n=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(n),!0,!1,!1),Ao(this,"/model.dat"),this.m(),this.K()});Ao(this,r.modelAssetBuffer)}return this.m(),this.K(),Promise.resolve()}K(){}fa(){let e;if(this.g.fa(t=>{e=f1(t)}),!e)throw Error("Failed to retrieve CalculatorGraphConfig");return e}setGraph(e,t){this.g.attachErrorListener((r,n)=>{this.H.push(Error(n))}),this.g.Ma(),this.g.setGraph(e,t),this.B=void 0,wo(this)}finishProcessing(){this.g.finishProcessing(),wo(this)}close(){this.B=void 0,this.g.closeGraph()}};function he(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}In.prototype.close=In.prototype.close;var On=class{constructor(t,r,n,s){this.g=t,this.h=r,this.m=n,this.l=s}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}};function Ro(e,t,r){let n=e.g;if(r=he(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,t),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(e.h,r),r}function ko(e,t){let r=e.g,n=he(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);let s=he(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(e.P),r.vertexAttribPointer(e.P,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);let o=he(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,o),r.enableVertexAttribArray(e.O),r.vertexAttribPointer(e.O,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(t?[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 On(r,n,s,o)}function Fs(e,t){if(e.g){if(t!==e.g)throw Error("Cannot change GL context once initialized")}else e.g=t}function pr(e,t,r,n){return Fs(e,t),e.h||(e.m(),e.D()),r?(e.s||(e.s=ko(e,!0)),r=e.s):(e.v||(e.v=ko(e,!1)),r=e.v),t.useProgram(e.h),r.bind(),e.l(),e=n(),r.g.bindVertexArray(null),e}function ut(e,t,r){return Fs(e,t),e=he(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,r??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,r??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function sn(e,t,r){Fs(e,t),e.B||(e.B=he(t.createFramebuffer(),"Failed to create framebuffe.")),t.bindFramebuffer(t.FRAMEBUFFER,e.B),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0)}function Ls(e){e.g?.bindFramebuffer(e.g.FRAMEBUFFER,null)}var Xt=class{H(){return`
|
|
1
|
+
var cr=typeof self<"u"?self:{};function ti(e){e:{for(var t=["CLOSURE_FLAGS"],r=cr,n=0;n<t.length;n++)if((r=r[t[n]])==null){t=null;break e}t=r}return(e=t&&t[e])!=null&&e}function _t(){throw Error("Invalid UTF8")}function Qo(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}var _r,mn,x2=typeof TextDecoder<"u",A2,w2=typeof TextEncoder<"u";function ri(e){if(w2)e=(A2||(A2=new TextEncoder)).encode(e);else{let r=0,n=new Uint8Array(3*e.length);for(let o=0;o<e.length;o++){var t=e.charCodeAt(o);if(128>t)n[r++]=t;else{if(2048>t)n[r++]=t>>6|192;else{if(55296<=t&&57343>=t){if(56319>=t&&o<e.length){let s=e.charCodeAt(++o);if(56320<=s&&57343>=s){t=1024*(t-55296)+s-56320+65536,n[r++]=t>>18|240,n[r++]=t>>12&63|128,n[r++]=t>>6&63|128,n[r++]=63&t|128;continue}o--}t=65533}n[r++]=t>>12|224,n[r++]=t>>6&63|128}n[r++]=63&t|128}}e=r===n.length?n:n.subarray(0,r)}return e}var or,ni=ti(610401301),R2=ti(188588736),es=cr.navigator;function wn(e){return!!ni&&!!or&&or.brands.some(({brand:t})=>t&&t.indexOf(e)!=-1)}function Ce(e){var t;return(t=cr.navigator)&&(t=t.userAgent)||(t=""),t.indexOf(e)!=-1}function ot(){return!!ni&&!!or&&0<or.brands.length}function gn(){return ot()?wn("Chromium"):(Ce("Chrome")||Ce("CriOS"))&&!(!ot()&&Ce("Edge"))||Ce("Silk")}function Kn(e){return Kn[" "](e),e}or=es&&es.userAgentData||null,Kn[" "]=function(){};var S2=!ot()&&(Ce("Trident")||Ce("MSIE"));!Ce("Android")||gn(),gn(),Ce("Safari")&&(gn()||!ot()&&Ce("Coast")||!ot()&&Ce("Opera")||!ot()&&Ce("Edge")||(ot()?wn("Microsoft Edge"):Ce("Edg/"))||ot()&&wn("Opera"));var oi={},$t=null;function k2(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):"=.".indexOf(e[t-1])!=-1&&(r="=.".indexOf(e[t-2])!=-1?r-2:r-1);var n=new Uint8Array(r),o=0;return function(s,i){function a(b){for(;c<s.length;){var A=s.charAt(c++),x=$t[A];if(x!=null)return x;if(!/^[\s\xa0]*$/.test(A))throw Error("Unknown base64 encoding at char: "+A)}return b}si();for(var c=0;;){var u=a(-1),h=a(0),f=a(64),m=a(64);if(m===64&&u===-1)break;i(u<<2|h>>4),f!=64&&(i(h<<4&240|f>>2),m!=64&&i(f<<6&192|m))}}(e,function(s){n[o++]=s}),o!==r?n.subarray(0,o):n}function si(){if(!$t){$t={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));oi[r]=n;for(var o=0;o<n.length;o++){var s=n[o];$t[s]===void 0&&($t[s]=o)}}}}var ii=typeof Uint8Array<"u",ai=!S2&&typeof btoa=="function";function ts(e){if(!ai){var t;t===void 0&&(t=0),si(),t=oi[t];var r=Array(Math.floor(e.length/3)),n=t[64]||"";let c=0,u=0;for(;c<e.length-2;c+=3){var o=e[c],s=e[c+1],i=e[c+2],a=t[o>>2];o=t[(3&o)<<4|s>>4],s=t[(15&s)<<2|i>>6],i=t[63&i],r[u++]=a+o+s+i}switch(a=0,i=n,e.length-c){case 2:i=t[(15&(a=e[c+1]))<<2]||n;case 1:e=e[c],r[u]=t[e>>2]+t[(3&e)<<4|a>>4]+i+n}return r.join("")}for(t="",r=0,n=e.length-10240;r<n;)t+=String.fromCharCode.apply(null,e.subarray(r,r+=10240));return t+=String.fromCharCode.apply(null,r?e.subarray(r):e),btoa(t)}var rs=/[-_.]/g,C2={"-":"+",_:"/",".":"="};function F2(e){return C2[e]||""}function ci(e){if(!ai)return k2(e);rs.test(e)&&(e=e.replace(rs,F2)),e=atob(e);let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}function ur(e){return ii&&e!=null&&e instanceof Uint8Array}var L2;function Wr(){return L2||(L2=new Uint8Array(0))}var Ft={},I2;function ui(e){if(e!==Ft)throw Error("illegal external caller")}function At(){return I2||(I2=new Qe(null,Ft))}function $n(e){ui(Ft);var t=e.g;return(t=t==null||ur(t)?t:typeof t=="string"?ci(t):null)==null?t:e.g=t}var Qe=class{constructor(e,t){if(ui(t),this.g=e,e!=null&&e.length===0)throw Error("ByteString should be constructed with non-empty values")}h(){let e=$n(this);return e?new Uint8Array(e):Wr()}};function hi(e,t){return Error(`Invalid wire type: ${e} (at position ${t})`)}function qn(){return Error("Failed to read varint, encoding is invalid.")}function li(e,t){return Error(`Tried to read past the end of the data ${t} > ${e}`)}function Jn(e){if(typeof e=="string")return{buffer:ci(e),P:!1};if(Array.isArray(e))return{buffer:new Uint8Array(e),P:!1};if(e.constructor===Uint8Array)return{buffer:e,P:!1};if(e.constructor===ArrayBuffer)return{buffer:new Uint8Array(e),P:!1};if(e.constructor===Qe)return{buffer:$n(e)||Wr(),P:!0};if(e instanceof Uint8Array)return{buffer:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),P:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function Zn(){return typeof BigInt=="function"}var M2=typeof Uint8Array.prototype.slice=="function",fi,G=0,te=0;function Tt(e){let t=0>e,r=(e=Math.abs(e))>>>0;if(e=Math.floor((e-r)/4294967296),t){let[n,o]=to(r,e);e=o,r=n}G=r>>>0,te=e>>>0}function Qn(e){let t=fi||(fi=new DataView(new ArrayBuffer(8)));t.setFloat32(0,+e,!0),te=0,G=t.getUint32(0,!0)}function Rn(e,t){return 4294967296*t+(e>>>0)}function eo(e,t){let r=2147483648&t;return r&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=Rn(e,t),r?-e:e}function Ir(e,t){if(e>>>=0,2097151>=(t>>>=0))var r=""+(4294967296*t+e);else Zn()?r=""+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(r=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),r+=8147497*t,t*=2,1e7<=e&&(r+=Math.floor(e/1e7),e%=1e7),1e7<=r&&(t+=Math.floor(r/1e7),r%=1e7),r=t+ns(r)+ns(e));return r}function ns(e){return e=String(e),"0000000".slice(e.length)+e}function di(){var e=G,t=te;if(2147483648&t)if(Zn())e=""+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{let[r,n]=to(e,t);e="-"+Ir(r,n)}else e=Ir(e,t);return e}function Xr(e){if(16>e.length)Tt(Number(e));else if(Zn())e=BigInt(e),G=Number(e&BigInt(4294967295))>>>0,te=Number(e>>BigInt(32)&BigInt(4294967295));else{let t=+(e[0]==="-");te=G=0;let r=e.length;for(let n=t,o=(r-t)%6+t;o<=r;n=o,o+=6){let s=Number(e.slice(n,o));te*=1e6,G=1e6*G+s,4294967296<=G&&(te+=Math.trunc(G/4294967296),te>>>=0,G>>>=0)}if(t){let[n,o]=to(G,te);G=n,te=o}}}function to(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function ro(e,t){let r,n=0,o=0,s=0,i=e.h,a=e.g;do r=i[a++],n|=(127&r)<<s,s+=7;while(32>s&&128&r);for(32<s&&(o|=(127&r)>>4),s=3;32>s&&128&r;s+=7)r=i[a++],o|=(127&r)<<s;if(Et(e,a),128>r)return t(n>>>0,o>>>0);throw qn()}function no(e){let t=0,r=e.g,n=r+10,o=e.h;for(;r<n;){let s=o[r++];if(t|=s,(128&s)==0)return Et(e,r),!!(127&t)}throw qn()}function it(e){let t=e.h,r=e.g,n=t[r++],o=127&n;if(128&n&&(n=t[r++],o|=(127&n)<<7,128&n&&(n=t[r++],o|=(127&n)<<14,128&n&&(n=t[r++],o|=(127&n)<<21,128&n&&(n=t[r++],o|=n<<28,128&n&&128&t[r++]&&128&t[r++]&&128&t[r++]&&128&t[r++]&&128&t[r++])))))throw qn();return Et(e,r),o}function at(e){return it(e)>>>0}function Sn(e){var t=e.h;let r=e.g,n=t[r],o=t[r+1],s=t[r+2];return t=t[r+3],Et(e,e.g+4),(n<<0|o<<8|s<<16|t<<24)>>>0}function kn(e){var t=Sn(e);e=2*(t>>31)+1;let r=t>>>23&255;return t&=8388607,r==255?t?NaN:1/0*e:r==0?e*Math.pow(2,-149)*t:e*Math.pow(2,r-150)*(t+Math.pow(2,23))}function O2(e){return it(e)}function yn(e,t,{ca:r=!1}={}){e.ca=r,t&&(t=Jn(t),e.h=t.buffer,e.m=t.P,e.j=0,e.l=e.h.length,e.g=e.j)}function Et(e,t){if(e.g=t,t>e.l)throw li(e.l,t)}function pi(e,t){if(0>t)throw Error(`Tried to read a negative byte length: ${t}`);let r=e.g,n=r+t;if(n>e.l)throw li(t,e.l-r);return e.g=n,r}function mi(e,t){if(t==0)return At();var r=pi(e,t);return e.ca&&e.m?r=e.h.subarray(r,r+t):(e=e.h,r=r===(t=r+t)?Wr():M2?e.slice(r,t):new Uint8Array(e.subarray(r,t))),r.length==0?At():new Qe(r,Ft)}var os=[];function gi(e){var t=e.g;if(t.g==t.l)return!1;e.l=e.g.g;var r=at(e.g);if(t=r>>>3,!(0<=(r&=7)&&5>=r))throw hi(r,e.l);if(1>t)throw Error(`Invalid field number: ${t} (at position ${e.l})`);return e.m=t,e.h=r,!0}function Ar(e){switch(e.h){case 0:e.h!=0?Ar(e):no(e.g);break;case 1:Et(e=e.g,e.g+8);break;case 2:if(e.h!=2)Ar(e);else{var t=at(e.g);Et(e=e.g,e.g+t)}break;case 5:Et(e=e.g,e.g+4);break;case 3:for(t=e.m;;){if(!gi(e))throw Error("Unmatched start-group tag: stream EOF");if(e.h==4){if(e.m!=t)throw Error("Unmatched end-group tag");break}Ar(e)}break;default:throw hi(e.h,e.l)}}function hr(e,t,r){let n=e.g.l,o=at(e.g),s=e.g.g+o,i=s-n;if(0>=i&&(e.g.l=s,r(t,e,void 0,void 0,void 0),i=s-e.g.g),i)throw Error(`Message parsing ended unexpectedly. Expected to read ${o} bytes, instead read ${o-i} bytes, either the data ended unexpectedly or the message misreported its own length`);return e.g.g=s,e.g.l=n,t}function oo(e){var t=at(e.g),r=pi(e=e.g,t);if(e=e.h,x2){var n,o=e;(n=mn)||(n=mn=new TextDecoder("utf-8",{fatal:!0})),t=r+t,o=r===0&&t===o.length?o:o.subarray(r,t);try{var s=n.decode(o)}catch(a){if(_r===void 0){try{n.decode(new Uint8Array([128]))}catch{}try{n.decode(new Uint8Array([97])),_r=!0}catch{_r=!1}}throw!_r&&(mn=void 0),a}}else{t=(s=r)+t,r=[];let a,c=null;for(;s<t;){var i=e[s++];128>i?r.push(i):224>i?s>=t?_t():(a=e[s++],194>i||(192&a)!=128?(s--,_t()):r.push((31&i)<<6|63&a)):240>i?s>=t-1?_t():(a=e[s++],(192&a)!=128||i===224&&160>a||i===237&&160<=a||(192&(n=e[s++]))!=128?(s--,_t()):r.push((15&i)<<12|(63&a)<<6|63&n)):244>=i?s>=t-2?_t():(a=e[s++],(192&a)!=128||a-144+(i<<28)>>30||(192&(n=e[s++]))!=128||(192&(o=e[s++]))!=128?(s--,_t()):(i=(7&i)<<18|(63&a)<<12|(63&n)<<6|63&o,i-=65536,r.push(55296+(i>>10&1023),56320+(1023&i)))):_t(),8192<=r.length&&(c=Qo(c,r),r.length=0)}s=Qo(c,r)}return s}function yi(e){let t=at(e.g);return mi(e.g,t)}function Hr(e,t,r){var n=at(e.g);for(n=e.g.g+n;e.g.g<n;)r.push(t(e.g))}var Tr=[];function ss(e){return e?/^\d+$/.test(e)?(Xr(e),new is(G,te)):null:P2||(P2=new is(0,0))}var is=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}},P2;function as(e){return e?/^-?\d+$/.test(e)?(Xr(e),new cs(G,te)):null:U2||(U2=new cs(0,0))}var cs=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}},U2;function Mr(e,t,r){for(;0<r||127<t;)e.g.push(127&t|128),t=(t>>>7|r<<25)>>>0,r>>>=7;e.g.push(t)}function lr(e,t){for(;127<t;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function zr(e,t){if(0<=t)lr(e,t);else{for(let r=0;9>r;r++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function sr(e,t){e.g.push(t>>>0&255),e.g.push(t>>>8&255),e.g.push(t>>>16&255),e.g.push(t>>>24&255)}function Lt(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function Ie(e,t,r){lr(e.g,8*t+r)}function so(e,t){return Ie(e,t,2),t=e.g.end(),Lt(e,t),t.push(e.h),t}function io(e,t){var r=t.pop();for(r=e.h+e.g.length()-r;127<r;)t.push(127&r|128),r>>>=7,e.h++;t.push(r),e.h++}function Yr(e,t,r){Ie(e,t,2),lr(e.g,r.length),Lt(e,e.g.end()),Lt(e,r)}function Cn(e,t,r,n){r!=null&&(t=so(e,t),n(r,e),io(e,t))}var ct=class{constructor(t,r,n,o){this.g=t,this.h=r,this.l=n,this.pa=o}};function be(e){return Array.prototype.slice.call(e)}function Kr(e){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol():e}var We=Kr(),us=Kr("0di"),vn=Kr("2ex"),hs=Kr("0dg"),ao=We?(e,t)=>{e[We]|=t}:(e,t)=>{e.g!==void 0?e.g|=t:Object.defineProperties(e,{g:{value:t,configurable:!0,writable:!0,enumerable:!1}})},Or=We?(e,t)=>{e[We]&=~t}:(e,t)=>{e.g!==void 0&&(e.g&=~t)};function ae(e,t,r){return r?e|t:e&~t}var $=We?e=>0|e[We]:e=>0|e.g,M=We?e=>e[We]:e=>e.g,K=We?(e,t)=>(e[We]=t,e):(e,t)=>(e.g!==void 0?e.g=t:Object.defineProperties(e,{g:{value:t,configurable:!0,writable:!0,enumerable:!1}}),e);function Nt(e){return ao(e,34),e}function D2(e,t){K(t,-14591&(0|e))}function Fn(e,t){K(t,-14557&(34|e))}function vi(e){return(e=e>>14&1023)===0?536870912:e}var co,fr={},_i={};function ls(e){return!(!e||typeof e!="object"||e.Ja!==_i)}function uo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.constructor===Object}function ho(e,t,r){if(e!=null){if(typeof e=="string")e=e?new Qe(e,Ft):At();else if(e.constructor!==Qe)if(ur(e))e=e.length?new Qe(r?e:new Uint8Array(e),Ft):At();else{if(!t)throw Error();e=void 0}}return e}function Pr(e,t,r){if(!Array.isArray(e)||e.length)return!1;let n=$(e);return!!(1&n)||!(!t||!(Array.isArray(t)?t.includes(r):t.has(r)))&&(K(e,1|n),!0)}var fs=[];function Ye(e){if(2&e)throw Error()}K(fs,55),co=Object.freeze(fs);var Ur=class e{constructor(t,r,n){this.l=0,this.g=t,this.h=r,this.m=n}next(){if(this.l<this.g.length){let t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new e(this.g,this.h,this.m)}},st,B2,N2;function Ti(e,t){(t=st?t[st]:void 0)&&(e[st]=be(t))}function Ei(e,t){e.__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity=t}function bi(){let e=Error();Ei(e,"incident"),function(t){cr.setTimeout(()=>{throw t},0)}(e)}function Ln(e){return Ei(e=Error(e),"warning"),e}function dt(e){return e==null||typeof e=="number"?e:e==="NaN"||e==="Infinity"||e==="-Infinity"?Number(e):void 0}function xi(e){return e==null||typeof e=="boolean"?e:typeof e=="number"?!!e:void 0}Object.freeze(new class{}),Object.freeze(new class{});var G2=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function $r(e){let t=typeof e;return t==="number"?Number.isFinite(e):t==="string"&&G2.test(e)}function Gt(e){if(e==null)return e;if(typeof e=="string"){if(!e)return;e=+e}return typeof e=="number"&&Number.isFinite(e)?0|e:void 0}function V2(e){if(e==null)return e;if(typeof e=="string"){if(!e)return;e=+e}return typeof e=="number"&&Number.isFinite(e)?e>>>0:void 0}function ds(e){return e[0]!=="-"&&(20>e.length||e.length===20&&184467>Number(e.substring(0,6)))}function Ai(e){return e[0]==="-"?20>e.length||e.length===20&&-922337<Number(e.substring(0,7)):19>e.length||e.length===19&&922337>Number(e.substring(0,6))}function lo(e){return e=Math.trunc(e),Number.isSafeInteger(e)||(Tt(e),e=eo(G,te)),e}function fo(e){var t=Math.trunc(Number(e));return Number.isSafeInteger(t)?String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),Ai(e)||(Xr(e),e=di()),e)}function Dr(e){return e==null?e:$r(e)?typeof e=="number"?lo(e):fo(e):void 0}function dr(e){if(typeof e!="string")throw Error();return e}function Vt(e){if(e!=null&&typeof e!="string")throw Error();return e}function bt(e){return e==null||typeof e=="string"?e:void 0}function po(e,t,r,n){if(e!=null&&typeof e=="object"&&e.X===fr)return e;if(!Array.isArray(e))return r?2&n?(e=t[us])?t=e:(Nt((e=new t).s),t=t[us]=e):t=new t:t=void 0,t;let o=r=$(e);return o===0&&(o|=32&n),o|=2&n,o!==r&&K(e,o),new t(e)}function j2(e,t,r){if(t){var n=!!n;if(!$r(t=e))throw Ln("int64");typeof t=="string"?n=fo(t):n?(n=Math.trunc(t),Number.isSafeInteger(n)?n=String(n):Ai(t=String(n))?n=t:(Tt(n),n=di())):n=lo(t)}else n=Dr(e);return typeof(r=(e=n)==null?r?0:void 0:e)=="string"&&(n=+r,Number.isSafeInteger(n))?n:r}var Br,mo,W2;function Nr(e){switch(typeof e){case"boolean":return mo||(mo=[0,void 0,!0]);case"number":return 0<e?void 0:e===0?W2||(W2=[0,void 0]):[-e,void 0];case"string":return[0,e];case"object":return e}}function xt(e,t){return wi(e,t[0],t[1])}function wi(e,t,r){if(e==null&&(e=Br),Br=void 0,e==null){var n=96;r?(e=[r],n|=512):e=[],t&&(n=-16760833&n|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error("narr");if(2048&(n=$(e)))throw Error("farr");if(64&n)return e;if(n|=64,r&&(n|=512,r!==e[0]))throw Error("mid");e:{let o=(r=e).length;if(o){let s=o-1;if(uo(r[s])){if(1024<=(t=s-(+!!(512&(n|=256))-1)))throw Error("pvtlmt");n=-16760833&n|(1023&t)<<14;break e}}if(t){if(1024<(t=Math.max(t,o-(+!!(512&n)-1))))throw Error("spvt");n=-16760833&n|(1023&t)<<14}}}return K(e,n),e}var X2={},H2=function(){try{return Kn(new class extends Map{constructor(){super()}}),!1}catch{return!0}}(),Jt=class{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,r){return this.g.set(t,r),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,r){return this.g.forEach(t,r)}[Symbol.iterator](){return this.entries()}},z2=H2?(Object.setPrototypeOf(Jt.prototype,Map.prototype),Object.defineProperties(Jt.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),Jt):class extends Map{constructor(){super()}};function ps(e){return e}function _n(e){if(2&e.N)throw Error("Cannot mutate an immutable Map")}var Le=class extends z2{constructor(e,t,r=ps,n=ps){super();let o=$(e);o|=64,K(e,o),this.N=o,this.U=t,this.S=r,this.Z=this.U?Y2:n;for(let s=0;s<e.length;s++){let i=e[s],a=r(i[0],!1,!0),c=i[1];t?c===void 0&&(c=null):c=n(i[1],!1,!0,void 0,void 0,o),super.set(a,c)}}oa(e=ms){if(this.size!==0)return this.Y(e)}Y(e=ms){let t=[],r=super.entries();for(var n;!(n=r.next()).done;)(n=n.value)[0]=e(n[0]),n[1]=e(n[1]),t.push(n);return t}clear(){_n(this),super.clear()}delete(e){return _n(this),super.delete(this.S(e,!0,!1))}entries(){var e=this.na();return new Ur(e,K2,this)}keys(){return this.Ia()}values(){var e=this.na();return new Ur(e,Le.prototype.get,this)}forEach(e,t){super.forEach((r,n)=>{e.call(t,this.get(n),n,this)})}set(e,t){return _n(this),(e=this.S(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.Z(t,!0,!0,this.U,!1,this.N))}Oa(e){let t=this.S(e[0],!1,!0);e=e[1],e=this.U?e===void 0?null:e:this.Z(e,!1,!0,void 0,!1,this.N),super.set(t,e)}has(e){return super.has(this.S(e,!1,!1))}get(e){e=this.S(e,!1,!1);let t=super.get(e);if(t!==void 0){var r=this.U;return r?((r=this.Z(t,!1,!0,r,this.ta,this.N))!==t&&super.set(e,r),r):t}}na(){return Array.from(super.keys())}Ia(){return super.keys()}[Symbol.iterator](){return this.entries()}};function Y2(e,t,r,n,o,s){return e=po(e,n,r,s),o&&(e=Jr(e)),e}function ms(e){return e}function K2(e){return[e,this.get(e)]}var $2;function gs(){return $2||($2=new Le(Nt([]),void 0,void 0,void 0,X2))}function go(e,t,r,n,o){if(e!=null){if(Array.isArray(e))e=Pr(e,void 0,0)?void 0:o&&2&$(e)?e:qr(e,t,r,n!==void 0,o);else if(uo(e)){let s={};for(let i in e)s[i]=go(e[i],t,r,n,o);e=s}else e=t(e,n);return e}}function qr(e,t,r,n,o){let s=n||r?$(e):0;n=n?!!(32&s):void 0;let i=be(e);for(let a=0;a<i.length;a++)i[a]=go(i[a],t,r,n,o);return r&&(Ti(i,e),r(s,i)),i}function q2(e){return go(e,yo,void 0,void 0,!1)}function yo(e){return e.X===fr?e.toJSON():e instanceof Le?e.oa(q2):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t)if(Array.isArray(t)){if(Pr(t,void 0,0))return}else{if(ur(t))return ts(t);if(t instanceof Qe){let r=t.g;return r==null?"":typeof r=="string"?r:t.g=ts(r)}if(t instanceof Le)return t.oa()}}return t}(e)}function In(e,t,r=Fn){if(e!=null){if(ii&&e instanceof Uint8Array)return t?e:new Uint8Array(e);if(Array.isArray(e)){var n=$(e);return 2&n||(t&&(t=n===0||!!(32&n)&&!(64&n||!(16&n))),e=t?K(e,-12293&(34|n)):qr(e,In,4&n?Fn:r,!0,!0)),e}return e.X===fr?(r=e.s,e=2&(n=M(r))?e:vo(e,r,n,!0)):e instanceof Le&&!(2&e.N)&&(r=Nt(e.Y(In)),e=new Le(r,e.U,e.S,e.Z)),e}}function vo(e,t,r,n){return e=e.constructor,Br=t=Ri(t,r,n),t=new e(t),Br=void 0,t}function Ri(e,t,r){let n=r||2&t?Fn:D2,o=!!(32&t);return e=function(s,i,a){let c=be(s);var u=c.length;let h=256&i?c[u-1]:void 0;for(u+=h?-1:0,i=512&i?1:0;i<u;i++)c[i]=a(c[i]);if(h){i=c[i]={};for(let f in h)i[f]=a(h[f])}return Ti(c,s),c}(e,t,s=>In(s,o,n)),ao(e,32|(r?2:0)),e}function Jr(e){let t=e.s,r=M(t);return 2&r?vo(e,t,r,!1):e}function Si(e,t,r,n){return!(4&t)||r!=null&&(!n&&r===0&&(4096&t||8192&t)&&5>(e.constructor[hs]=1+(0|e.constructor[hs]))&&bi(),r!==0&&!(r&t))}function ut(e,t){return Ke(e=e.s,M(e),t)}function ys(e,t,r,n){if(!(0>(t=n+(+!!(512&t)-1))||t>=e.length||t>=r))return e[t]}function Ke(e,t,r,n){if(r===-1)return null;let o=vi(t);if(!(r>=o)){var s=e.length;return n&&256&t&&(n=e[s-1][r])!=null?(ys(e,t,o,r)&&vn!=null&&(4<=(t=(e=N2??(N2={}))[vn]||0)||(e[vn]=t+1,bi())),n):ys(e,t,o,r)}return 256&t?e[e.length-1][r]:void 0}function D(e,t,r,n){let o=e.s,s=M(o);return Ye(s),V(o,s,t,r,n),e}function V(e,t,r,n,o){let s=vi(t);if(r>=s||o){let i=t;if(256&t)o=e[e.length-1];else{if(n==null)return i;o=e[s+(+!!(512&t)-1)]={},i|=256}return o[r]=n,r<s&&(e[r+(+!!(512&t)-1)]=void 0),i!==t&&K(e,i),i}return e[r+(+!!(512&t)-1)]=n,256&t&&r in(e=e[e.length-1])&&delete e[r],t}function jt(e,t,r,n,o){var s=2&t;let i=Ke(e,t,r,o);Array.isArray(i)||(i=co);let a=!(2&n);n=!(1&n);let c=!!(32&t),u=$(i);return u!==0||!c||s||a?1&u||(u|=1,K(i,u)):(u|=33,K(i,u)),s?(e=!1,2&u||(Nt(i),e=!!(4&u)),(n||e)&&Object.freeze(i)):(s=!!(2&u)||!!(2048&u),n&&s?(i=be(i),n=1,c&&!a&&(n|=32),K(i,n),V(e,t,r,i,o)):a&&32&u&&!s&&Or(i,32)),i}function wr(e,t){e=e.s;let r=M(e),n=Ke(e,r,t),o=dt(n);return o!=null&&o!==n&&V(e,r,t,o),o}function ki(e){e=e.s;let t=M(e),r=Ke(e,t,1),n=ho(r,!0,!!(34&t));return n!=null&&n!==r&&V(e,t,1,n),n}function kt(e,t,r){let n=e.s,o=M(n),s=2&o?1:2,i=Ci(n,o,t);var a=$(i);if(Si(e,a,void 0,!1)){(4&a||Object.isFrozen(i))&&(i=be(i),a=wt(a,o),o=V(n,o,t,i));let c=e=0;for(;e<i.length;e++){let u=r(i[e]);u!=null&&(i[c++]=u)}c<e&&(i.length=c),a=ae(a=Fi(a,o),20,!0),a=ae(a,4096,!1),a=ae(a,8192,!1),K(i,a),2&a&&Object.freeze(i)}return Zt(a)||(r=a,(a=(e=s===1||s===4&&!!(32&a))?ae(a,2,!0):It(a,o,!1))!==r&&K(i,a),e&&Object.freeze(i)),s===2&&Zt(a)&&(i=be(i),a=It(a=wt(a,o),o,!1),K(i,a),V(n,o,t,i)),i}function Ci(e,t,r){return e=Ke(e,t,r),Array.isArray(e)?e:co}function Fi(e,t){return e===0&&(e=wt(e,t)),ae(e,1,!0)}function Zt(e){return!!(2&e)&&!!(4&e)||!!(2048&e)}function Li(e){e=be(e);for(let t=0;t<e.length;t++){let r=e[t]=be(e[t]);Array.isArray(r[1])&&(r[1]=Nt(r[1]))}return e}function Gr(e,t,r){{let a=e.s,c=M(a);if(Ye(c),r==null)V(a,c,t);else{var n,o=$(r),s=o,i=!!(2&o)||Object.isFrozen(r);if((n=!i)&&(n=!1),Si(e,o))for(o=21,i&&(r=be(r),s=0,o=It(o=wt(o,c),c,!0)),e=0;e<r.length;e++)r[e]=dr(r[e]);n&&(r=be(r),s=0,o=It(o=wt(o,c),c,!0)),o!==s&&K(r,o),V(a,c,t,r)}}}function Mn(e,t,r,n){e=e.s;let o=M(e);Ye(o),V(e,o,t,(n==="0"?Number(r)===0:r===n)?void 0:r)}function pr(e,t,r,n){let o=M(e);Ye(o),e=jt(e,o,t,2),n=r(n,!!(4&(t=$(e)))&&!!(4096&t)),e.push(n)}function J2(e){return e}function Tn(e,t){return _o(e=e.s,M(e),ma)===t?t:-1}function _o(e,t,r){let n=0;for(let o=0;o<r.length;o++){let s=r[o];Ke(e,t,s)!=null&&(n!==0&&(t=V(e,t,n)),n=s)}return n}function To(e,t,r,n){let o=M(e);Ye(o);let s=Ke(e,o,r,n),i;if(s!=null&&s.X===fr)return(t=Jr(s))!==s&&V(e,o,r,t,n),t.s;if(Array.isArray(s)){let a=$(s);i=2&a?Ri(s,a,!1):s,i=xt(i,t)}else i=xt(void 0,t);return i!==s&&V(e,o,r,i,n),i}function Ii(e,t,r,n){e=e.s;let o=M(e),s=Ke(e,o,r,n);return(t=po(s,t,!1,o))!==s&&t!=null&&V(e,o,r,t,n),t}function C(e,t,r,n=!1){if((t=Ii(e,t,r,n))==null)return t;e=e.s;let o=M(e);if(!(2&o)){let s=Jr(t);s!==t&&V(e,o,r,t=s,n)}return t}function Mi(e,t,r,n,o,s){var i=2,a=!!(2&t);i=a?1:i,o=!!o,s&&(s=!a),a=Ci(e,t,n);var c=$(a);let u=!!(4&c);if(!u){var h=a,f=t;let m=!!(2&(c=Fi(c,t)));m&&(f=ae(f,2,!0));let b=!m,A=!0,x=0,N=0;for(;x<h.length;x++){let d=po(h[x],r,!1,f);if(d instanceof r){if(!m){let l=!!(2&$(d.s));b&&(b=!l),A&&(A=l)}h[N++]=d}}N<x&&(h.length=N),c=ae(c,4,!0),c=ae(c,16,A),c=ae(c,8,b),K(h,c),m&&Object.freeze(h)}if(s&&!(8&c||!a.length&&(i===1||i===4&&32&c))){for(Zt(c)&&(a=be(a),c=wt(c,t),t=V(e,t,n,a)),r=a,s=c,h=0;h<r.length;h++)(c=r[h])!==(f=Jr(c))&&(r[h]=f);s=ae(s,8,!0),s=ae(s,16,!r.length),K(r,s),c=s}return Zt(c)||(r=c,(c=(s=i===1||i===4&&!!(32&c))?ae(c,!a.length||16&c&&(!u||32&c)?2:2048,!0):It(c,t,o))!==r&&K(a,c),s&&Object.freeze(a)),i===2&&Zt(c)&&(a=be(a),c=It(c=wt(c,t),t,o),K(a,c),V(e,t,n,a)),a}function tt(e,t,r){e=e.s;let n=M(e);return Mi(e,n,t,r,!1,!(2&n))}function T(e,t,r,n,o){return n==null&&(n=void 0),D(e,r,n,o)}function Qt(e,t,r,n){n==null&&(n=void 0),e=e.s;let o=M(e);Ye(o),(r=_o(e,o,r))&&r!==t&&n!=null&&(o=V(e,o,r)),V(e,o,t,n)}function wt(e,t){return e=ae(e,2,!!(2&t)),e=ae(e,32,!0),ae(e,2048,!1)}function It(e,t,r){return 32&t&&r||(e=ae(e,32,!1)),e}function Vr(e,t,r,n){e=e.s;let o=M(e);Ye(o),t=Mi(e,o,r,t,!0),r=n??new r,t.push(r),2&$(r.s)?Or(t,8):Or(t,16)}function Fe(e,t){return Gt(ut(e,t))}function Pe(e,t){return e??t}function J(e,t){return Pe(wr(e,t),0)}function Xe(e,t){return Pe(bt(ut(e,t)),"")}function ir(e,t,r){if(r!=null&&typeof r!="boolean")throw e=typeof r,Error(`Expected boolean but got ${e!="object"?e:r?Array.isArray(r)?"array":e:"null"}: ${r}`);D(e,t,r)}function He(e,t,r){if(r!=null){if(typeof r!="number"||!Number.isFinite(r))throw Ln("int32");r|=0}D(e,t,r)}function y(e,t,r){if(r!=null&&typeof r!="number")throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);D(e,t,r)}function Ue(e,t,r){t.g?t.m(e,t.g,t.h,r,!0):t.m(e,t.h,r,!0)}Le.prototype.toJSON=void 0,Le.prototype.Ja=_i;var g=class{constructor(e,t){this.s=wi(e,t)}toJSON(){return Oi(this,qr(this.s,yo,void 0,void 0,!1),!0)}l(){var e=rc;return e.g?e.l(this,e.g,e.h,!0):e.l(this,e.h,e.defaultValue,!0)}clone(){let e=this.s;return vo(this,e,M(e),!1)}P(){return!!(2&$(this.s))}};function Oi(e,t,r){var n=R2?void 0:e.constructor.B;let o=M(r?e.s:t);if(!(e=t.length))return t;let s,i;if(uo(r=t[e-1])){e:{var a=r;let h={},f=!1;for(var c in a){let m=a[c];if(Array.isArray(m)){let b=m;(Pr(m,n,+c)||ls(m)&&m.size===0)&&(m=null),m!=b&&(f=!0)}m!=null?h[c]=m:f=!0}if(f){for(var u in h){a=h;break e}a=null}}a!=r&&(s=!0),e--}for(c=+!!(512&o)-1;0<e&&(r=t[u=e-1],u-=c,r==null||Pr(r,n,u)||ls(r)&&r.size===0);e--)i=!0;return(s||i)&&(t=Array.prototype.slice.call(t,0,e),a&&t.push(a)),t}function Pi(e){return Array.isArray(e)?e[0]instanceof ct?e:[c1,e]:[e,void 0]}function Wt(e,t){if(Array.isArray(t)){var r=$(t);if(4&r)return t;for(var n=0,o=0;n<t.length;n++){let s=e(t[n]);s!=null&&(t[o++]=s)}return o<n&&(t.length=o),K(t,-12289&(5|r)),2&r&&Object.freeze(t),t}}g.prototype.X=fr,g.prototype.toString=function(){return Oi(this,this.s,!1).toString()};var vs=Symbol();function Eo(e){let t=e[vs];if(!t){let r=Di(e),n=xo(e),o=n.l;t=o?(s,i)=>o(s,i,n):(s,i)=>{for(;gi(i)&&i.h!=4;){var a=i.m,c=n[a];if(!c){var u=n.ea;u&&(u=u[a])&&(c=n[a]=Z2(u))}c&&c(i,s,a)||(a=(c=i).l,Ar(c),c.ia?c=void 0:(u=c.g.g-a,c.g.g=a,c=mi(c.g,u)),a=s,c&&(st||(st=Symbol()),(u=a[st])?u.push(c):a[st]=[c]))}r===Ui||r===Rr||r.j||(s[B2||(B2=Symbol())]=r)},e[vs]=t}return t}function Z2(e){let t=(e=Pi(e))[0].g;if(e=e[1]){let r=Eo(e),n=xo(e).T;return(o,s,i)=>t(o,s,i,n,r)}return t}var er=class{},Ui,Rr,tr=Symbol();function Q2(e,t,r){let n=r[1],o;if(n){let s=n[tr];o=s?s.T:Nr(n[0]),e[t]=s??n}o&&o===mo?(e.g||(e.g=new Set)).add(t):r[0]&&(e.h||(e.h=new Set)).add(t)}function _s(e,t){return[e.l,!t||0<t[0]?void 0:t]}function Di(e){var t=e[tr];if(t)return t;if(!(t=bo(e,e[tr]=new er,_s,_s,Q2)).ea&&!t.h&&!t.g){let r=!0;for(let n in t)isNaN(n)||(r=!1);r?(Nr(e[0])===mo?Rr?t=Rr:((t=new er).T=Nr(!0),t=Rr=t):t=Ui||(Ui=new er),t=e[tr]=t):t.j=!0}return t}function e1(e,t,r){e[t]=r}function bo(e,t,r,n,o=e1){t.T=Nr(e[0]);let s=0;var i=e[++s];i&&i.constructor===Object&&(t.ea=i,typeof(i=e[++s])=="function"&&(t.l=i,t.m=e[++s],i=e[++s]));let a={};for(;Array.isArray(i)&&typeof i[0]=="number"&&0<i[0];){for(var c=0;c<i.length;c++)a[i[c]]=i;i=e[++s]}for(c=1;i!==void 0;){let f;typeof i=="number"&&(c+=i,i=e[++s]);var u=void 0;if(i instanceof ct?f=i:(f=u1,s--),f.pa){i=e[++s],u=e;var h=s;typeof i=="function"&&(i=i(),u[h]=i),u=i}for(h=c+1,typeof(i=e[++s])=="number"&&0>i&&(h-=i,i=e[++s]);c<h;c++){let m=a[c];o(t,c,u?n(f,u,m):r(f,m))}}return t}var Ts=Symbol();function Bi(e){let t=e[Ts];if(!t){let r=Zr(e);t=(n,o)=>Gi(n,o,r),e[Ts]=t}return t}var On=Symbol();function t1(e){return e.h}function r1(e,t){let r,n,o=e.h;return(s,i,a)=>o(s,i,a,n||(n=Zr(t).T),r||(r=Bi(t)))}function Zr(e){let t=e[On];return t||(t=bo(e,e[On]={},t1,r1),Ni(e),t)}var Pn=Symbol();function n1(e,t){let r=e.g;return t?(n,o,s)=>r(n,o,s,t):r}function o1(e,t,r){let n=e.g,o,s;return(i,a,c)=>n(i,a,c,s||(s=xo(t).T),o||(o=Eo(t)),r)}function xo(e){let t=e[Pn];return t||(Di(e),t=bo(e,e[Pn]={},n1,o1),Ni(e),t)}function Ni(e){Pn in e&&tr in e&&On in e&&(e.length=0)}function Es(e,t){var r=e[t];if(r)return r;if((r=e.ea)&&(r=r[t])){var n=(r=Pi(r))[0].h;if(r=r[1]){let o=Bi(r),s=Zr(r).T;r=(r=e.m)?r(s,o):(i,a,c)=>n(i,a,c,s,o)}else r=n;return e[t]=r}}function Gi(e,t,r){for(var n=M(e),o=+!!(512&n)-1,s=e.length,i=512&n?1:0,a=s+(256&n?-1:0);i<a;i++){let c=e[i];if(c==null)continue;let u=i-o,h=Es(r,u);h&&h(t,c,u)}if(256&n){n=e[s-1];for(let c in n)o=+c,Number.isNaN(o)||(s=n[c])!=null&&(a=Es(r,o))&&a(t,s,o)}if(e=st?e[st]:void 0)for(Lt(t,t.g.end()),r=0;r<e.length;r++)Lt(t,$n(e[r])||Wr())}function me(e,t){return new ct(e,t,!1,!1)}function Xt(e,t){return new ct(e,t,!0,!1)}function Qr(e,t){return new ct(e,t,!1,!0)}function ge(e,t,r){V(e,M(e),t,r)}var s1=Qr(function(e,t,r,n,o){return e.h===2&&(e=hr(e,xt([void 0,void 0],n),o),Ye(n=M(t)),(o=Ke(t,n,r))instanceof Le?2&o.N?((o=o.Y()).push(e),V(t,n,r,o)):o.Oa(e):Array.isArray(o)?(2&$(o)&&V(t,n,r,o=Li(o)),o.push(e)):V(t,n,r,[e]),!0)},function(e,t,r,n,o){if(t instanceof Le)t.forEach((s,i)=>{Cn(e,r,xt([i,s],n),o)});else if(Array.isArray(t))for(let s=0;s<t.length;s++){let i=t[s];Array.isArray(i)&&Cn(e,r,xt(i,n),o)}});function Vi(e,t,r){e:if(t!=null){if($r(t)){if(typeof t=="string"){t=fo(t);break e}if(typeof t=="number"){t=lo(t);break e}}t=void 0}t!=null&&(typeof t=="string"&&as(t),t!=null&&(Ie(e,r,0),typeof t=="number"?(e=e.g,Tt(t),Mr(e,G,te)):(r=as(t),Mr(e.g,r.h,r.g))))}function ji(e,t,r){(t=Gt(t))!=null&&t!=null&&(Ie(e,r,0),zr(e.g,t))}function Wi(e,t,r){(t=xi(t))!=null&&(Ie(e,r,0),e.g.g.push(t?1:0))}function Xi(e,t,r){(t=bt(t))!=null&&Yr(e,r,ri(t))}function en(e,t,r,n,o){Cn(e,r,t instanceof g?t.s:Array.isArray(t)?xt(t,n):void 0,o)}function Hi(e,t,r){(t=t==null||typeof t=="string"||ur(t)||t instanceof Qe?t:void 0)!=null&&Yr(e,r,Jn(t).buffer)}function zi(e,t,r){return(e.h===5||e.h===2)&&(t=jt(t,M(t),r,2,!1),e.h==2?Hr(e,kn,t):t.push(kn(e.g)),!0)}var re,et=me(function(e,t,r){if(e.h!==1)return!1;var n=e.g;e=Sn(n);let o=Sn(n);n=2*(o>>31)+1;let s=o>>>20&2047;return e=4294967296*(1048575&o)+e,ge(t,r,s==2047?e?NaN:1/0*n:s==0?n*Math.pow(2,-1074)*e:n*Math.pow(2,s-1075)*(e+4503599627370496)),!0},function(e,t,r){(t=dt(t))!=null&&(Ie(e,r,1),e=e.g,(r=fi||(fi=new DataView(new ArrayBuffer(8)))).setFloat64(0,+t,!0),G=r.getUint32(0,!0),te=r.getUint32(4,!0),sr(e,G),sr(e,te))}),oe=me(function(e,t,r){return e.h===5&&(ge(t,r,kn(e.g)),!0)},function(e,t,r){(t=dt(t))!=null&&(Ie(e,r,5),e=e.g,Qn(t),sr(e,G))}),i1=Xt(zi,function(e,t,r){if((t=Wt(dt,t))!=null)for(let i=0;i<t.length;i++){var n=e,o=r,s=t[i];s!=null&&(Ie(n,o,5),n=n.g,Qn(s),sr(n,G))}}),Ao=Xt(zi,function(e,t,r){if((t=Wt(dt,t))!=null&&t.length){Ie(e,r,2),lr(e.g,4*t.length);for(let n=0;n<t.length;n++)r=e.g,Qn(t[n]),sr(r,G)}}),ht=me(function(e,t,r){return e.h===0&&(ge(t,r,ro(e.g,eo)),!0)},Vi),En=me(function(e,t,r){return e.h===0&&(ge(t,r,(e=ro(e.g,eo))===0?void 0:e),!0)},Vi),a1=me(function(e,t,r){return e.h===0&&(ge(t,r,ro(e.g,Rn)),!0)},function(e,t,r){e:if(t!=null){if($r(t)){if(typeof t=="string"){var n=Math.trunc(Number(t));Number.isSafeInteger(n)&&0<=n?t=String(n):((n=t.indexOf("."))!==-1&&(t=t.substring(0,n)),ds(t)||(Xr(t),t=Ir(G,te)));break e}if(typeof t=="number"){t=0<=(t=Math.trunc(t))&&Number.isSafeInteger(t)?t:function(o){if(0>o){Tt(o);let s=Ir(G,te);return o=Number(s),Number.isSafeInteger(o)?o:s}return ds(String(o))?o:(Tt(o),Rn(G,te))}(t);break e}}t=void 0}t!=null&&(typeof t=="string"&&ss(t),t!=null&&(Ie(e,r,0),typeof t=="number"?(e=e.g,Tt(t),Mr(e,G,te)):(r=ss(t),Mr(e.g,r.h,r.g))))}),q=me(function(e,t,r){return e.h===0&&(ge(t,r,it(e.g)),!0)},ji),tn=Xt(function(e,t,r){return(e.h===0||e.h===2)&&(t=jt(t,M(t),r,2,!1),e.h==2?Hr(e,it,t):t.push(it(e.g)),!0)},function(e,t,r){if((t=Wt(Gt,t))!=null&&t.length){r=so(e,r);for(let n=0;n<t.length;n++)zr(e.g,t[n]);io(e,r)}}),Mt=me(function(e,t,r){return e.h===0&&(ge(t,r,(e=it(e.g))===0?void 0:e),!0)},ji),Z=me(function(e,t,r){return e.h===0&&(ge(t,r,no(e.g)),!0)},Wi),rr=me(function(e,t,r){return e.h===0&&(ge(t,r,(e=no(e.g))===!1?void 0:e),!0)},Wi),ce=Xt(function(e,t,r){return e.h===2&&(pr(t,r,J2,e=oo(e)),!0)},function(e,t,r){if((t=Wt(bt,t))!=null)for(let i=0;i<t.length;i++){var n=e,o=r,s=t[i];s!=null&&Yr(n,o,ri(s))}}),lt=me(function(e,t,r){return e.h===2&&(ge(t,r,(e=oo(e))===""?void 0:e),!0)},Xi),O=me(function(e,t,r){return e.h===2&&(ge(t,r,oo(e)),!0)},Xi),c1=Qr(function(e,t,r,n,o){return e.h===2&&(hr(e,To(t,n,r,!0),o),!0)},en),u1=Qr(function(e,t,r,n,o){return e.h===2&&(hr(e,To(t,n,r),o),!0)},en);re=new ct(function(e,t,r,n,o){if(e.h!==2)return!1;n=xt(void 0,n);let s=M(t);Ye(s);let i=jt(t,s,r,3);return s=M(t),4&$(i)&&(i=be(i),K(i,-2079&(1|$(i))),V(t,s,r,i)),i.push(n),hr(e,n,o),!0},function(e,t,r,n,o){if(Array.isArray(t))for(let s=0;s<t.length;s++)en(e,t[s],r,n,o)},!0,!0);var P=Qr(function(e,t,r,n,o,s){if(e.h!==2)return!1;let i=M(t);return Ye(i),(s=_o(t,i,s))&&r!==s&&V(t,i,s),hr(e,t=To(t,n,r),o),!0},en),Yi=me(function(e,t,r){return e.h===2&&(ge(t,r,yi(e)),!0)},Hi),h1=Xt(function(e,t,r){return(e.h===0||e.h===2)&&(t=jt(t,M(t),r,2,!1),e.h==2?Hr(e,at,t):t.push(at(e.g)),!0)},function(e,t,r){if((t=Wt(V2,t))!=null)for(let i=0;i<t.length;i++){var n=e,o=r,s=t[i];s!=null&&(Ie(n,o,0),lr(n.g,s))}}),ze=me(function(e,t,r){return e.h===0&&(ge(t,r,it(e.g)),!0)},function(e,t,r){(t=Gt(t))!=null&&(t=parseInt(t,10),Ie(e,r,0),zr(e.g,t))}),l1=Xt(function(e,t,r){return(e.h===0||e.h===2)&&(t=jt(t,M(t),r,2,!1),e.h==2?Hr(e,O2,t):t.push(it(e.g)),!0)},function(e,t,r){if((t=Wt(Gt,t))!=null&&t.length){r=so(e,r);for(let n=0;n<t.length;n++)zr(e.g,t[n]);io(e,r)}}),Un=class{constructor(t,r){this.h=t,this.g=r,this.l=C,this.m=T,this.defaultValue=void 0}};function De(e,t){return new Un(e,t)}function pt(e,t){return(r,n)=>{if(Tr.length){let s=Tr.pop();s.o(n),yn(s.g,r,n),r=s}else r=new class{constructor(s,i){if(os.length){let a=os.pop();yn(a,s,i),s=a}else s=new class{constructor(a,c){this.h=null,this.m=!1,this.g=this.l=this.j=0,yn(this,a,c)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.ca=!1}}(s,i);this.g=s,this.l=this.g.g,this.h=this.m=-1,this.o(i)}o({ia:s=!1}={}){this.ia=s}}(r,n);try{let s=new e,i=s.s;Eo(t)(i,r);var o=s}finally{r.g.clear(),r.m=-1,r.h=-1,100>Tr.length&&Tr.push(r)}return o}}function rn(e){return function(){let t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){let i=this.g;return this.g=[],i}}}};Gi(this.s,t,Zr(e)),Lt(t,t.g.end());let r=new Uint8Array(t.h),n=t.l,o=n.length,s=0;for(let i=0;i<o;i++){let a=n[i];r.set(a,s),s+=a.length}return t.l=[r],r}}var bs=class extends g{constructor(e){super(e)}},Ki=[0,lt,me(function(e,t,r){return e.h===2&&(ge(t,r,(e=yi(e))===At()?void 0:e),!0)},function(e,t,r){if(t!=null){if(t instanceof g){let n=t.Qa;return void(n&&(t=n(t),t!=null&&Yr(e,r,Jn(t).buffer)))}if(Array.isArray(t))return}Hi(e,t,r)})],f1=[0,O],$i=[0,q,ze,Z,-1,tn,ze,-1],d1=[0,Z,-1],qi=class extends g{constructor(){super()}};qi.B=[6];var Ji=[0,Z,O,Z,ze,-1,l1,O,-1,d1,ze],Zi=[0,O,-2],xs=class extends g{constructor(){super()}},Qi=[0],ea=[0,q,Z,-4],xe=class extends g{constructor(e){super(e,2)}},H={},p1=[-2,H,Z];H[336783863]=[0,O,Z,-1,q,[0,[1,2,3,4,5,6],P,Qi,P,Ji,P,Zi,P,ea,P,$i,P,[0,O]],f1,Z,[0,[1,3],[2,4],P,[0,tn],-1,P,[0,ce],-1,re,[0,O,-1]],O];var m1=[0,lt,rr],ta=[0,En,-1,rr,-3,En,tn,lt,Mt,En,-1,rr,Mt,rr,-2,lt],mr=[-1,{}],ra=[0,O,1,mr],na=[0,O,ce,mr];function Ae(e,t){Mn(e,2,Vt(t),"")}function B(e,t){pr(e.s,3,dr,t)}function S(e,t){pr(e.s,4,dr,t)}var ue=class extends g{constructor(e){super(e,500)}o(e){return T(this,0,7,e)}};ue.B=[3,4,5,6,8,13,17,1005];var g1=[-500,lt,-1,ce,-3,p1,re,Ki,Mt,-1,ra,na,re,m1,lt,ta,Mt,ce,987,ce],y1=[0,lt,-1,mr],v1=[-500,O,-1,[-1,{}],998,O],_1=[-500,O,ce,-1,[-2,{},Z],997,ce,-1],T1=[-500,O,ce,mr,998,ce];function we(e,t){Vr(e,1,ue,t)}function j(e,t){pr(e.s,10,dr,t)}function L(e,t){pr(e.s,15,dr,t)}var le=class extends g{constructor(e){super(e,500)}o(e){return T(this,0,1001,e)}};le.B=[1,6,7,9,10,15,16,17,14,1002];var oa=[-500,re,g1,4,re,v1,re,_1,Mt,re,T1,ce,Mt,ra,na,re,y1,ce,-2,ta,lt,-1,rr,979,mr,re,Ki],E1=pt(le,oa);le.prototype.g=rn(oa);var b1=[0,re,[0,q,-2]],x1=class extends g{constructor(e){super(e)}},A1=[0,q,oe,O,-1],wo=class extends g{constructor(e){super(e)}g(){return tt(this,x1,1)}};wo.B=[1];var sa=[0,re,A1],nn=pt(wo,sa),w1=[0,q,oe],R1=[0,q,-1,b1],S1=class extends g{constructor(e){super(e)}},k1=[0,q,-3],C1=[0,oe,-3],F1=class extends g{constructor(e){super(e)}},L1=[0,oe,-1,O,oe],Sr=class extends g{constructor(e){super(e)}h(){return C(this,S1,2)}g(){return tt(this,F1,5)}};Sr.B=[5];var I1=[0,ze,k1,C1,R1,re,L1],ia=class extends g{constructor(e){super(e)}};ia.B=[1,2,3,8,9];var aa=pt(ia,[0,ce,tn,Ao,I1,O,-1,ht,re,w1,ce,ht]),ca=class extends g{constructor(e){super(e)}},M1=[0,oe,-4],ua=class extends g{constructor(e){super(e)}};ua.B=[1];var Ct=pt(ua,[0,re,M1]),ha=class extends g{constructor(e){super(e)}},O1=[0,oe,-4],la=class extends g{constructor(e){super(e)}};la.B=[1];var gr=pt(la,[0,re,O1]),fa=class extends g{constructor(e){super(e)}};fa.B=[3];var P1=[0,q,-1,Ao,ze],da=class extends g{constructor(){super()}};da.prototype.g=rn([0,oe,-4,ht]);var U1=class extends g{constructor(e){super(e)}},D1=[0,1,q,O,sa],pa=class extends g{constructor(e){super(e)}};pa.B=[1];var B1=pt(pa,[0,re,D1,ht]),Dn=class extends g{constructor(e){super(e)}};Dn.B=[1];var N1=class extends g{constructor(e){super(e)}qa(){let e=ki(this);return e??At()}},G1=class extends g{constructor(e){super(e)}},ma=[1,2],V1=[0,ma,P,[0,Ao],P,[0,Yi],q,O],ga=class extends g{constructor(e){super(e)}};ga.B=[1];var j1=pt(ga,[0,re,V1,ht]),on=class extends g{constructor(e){super(e)}};on.B=[4,5];var ya=[0,O,q,oe,ce,-1],As=class extends g{constructor(e){super(e)}},W1=[0,Z,-1],ws=class extends g{constructor(e){super(e)}},kr=[1,2,3,4,5],jr=class extends g{constructor(e){super(e)}g(){return ki(this)!=null}h(){return bt(ut(this,2))!=null}},va=[0,Yi,O,[0,q,ht,-1],[0,a1,ht]],z=class extends g{constructor(e){super(e)}g(){return xi(ut(this,2))??!1}},Q=[0,va,Z,[0,kr,P,ea,P,Ji,P,$i,P,Qi,P,Zi],ze],sn=class extends g{constructor(e){super(e)}},Ro=[0,Q,oe,-1,q],X1=De(502141897,sn);H[502141897]=Ro;var _a=[0,va];H[512499200]=_a;var Ta=[0,_a];H[515723506]=Ta;var H1=pt(class extends g{constructor(e){super(e)}},[0,[0,ze,-1,i1,h1],P1]),Ea=[0,Q];H[508981768]=Ea;var ba=class extends g{constructor(e){super(e)}},So=[0,Q,oe,Ea,Z],xa=class extends g{constructor(e){super(e)}},Aa=[0,Q,Ro,So,oe,Ta];H[508968149]=So;var z1=De(508968150,xa);H[508968150]=Aa;var wa=class extends g{constructor(e){super(e)}},Y1=De(513916220,wa);H[513916220]=[0,Q,Aa,q];var St=class extends g{constructor(e){super(e)}h(){return C(this,on,2)}g(){D(this,2)}},Ra=[0,Q,ya];H[478825465]=Ra;var Sa=[0,Q];H[478825422]=Sa;var K1=class extends g{constructor(e){super(e)}},ka=[0,Q,Sa,Ra,-1],Ca=class extends g{constructor(e){super(e)}},Fa=[0,Q,oe,q],ko=class extends g{constructor(e){super(e)}},Co=[0,Q,oe],Fo=class extends g{constructor(e){super(e)}},La=[0,Q,Fa,Co,oe],Ia=class extends g{constructor(e){super(e)}},$1=[0,Q,La,ka];H[463370452]=ka,H[464864288]=Fa,H[474472470]=Co;var q1=De(462713202,Fo);H[462713202]=La;var J1=De(479097054,Ia);H[479097054]=$1;var Z1=class extends g{constructor(e){super(e)}},Q1=[0,Q],Ma=class extends g{constructor(e){super(e)}},Lo=[0,Q,oe,-1,q];H[514774813]=Lo;var Oa=class extends g{constructor(e){super(e)}},Io=[0,Q,oe,Z];H[518928384]=Io;var Pa=class extends g{constructor(){super()}};Pa.prototype.g=rn([0,Q,Co,Q1,Ro,So,Lo,Io]);var Ua=class extends g{constructor(e){super(e)}},ec=De(456383383,Ua);H[456383383]=[0,Q,ya];var Da=class extends g{constructor(e){super(e)}},tc=De(476348187,Da);H[476348187]=[0,Q,W1];var Ba=class extends g{constructor(e){super(e)}},Na=[0,ze,-1],Bn=class extends g{constructor(e){super(e)}};Bn.B=[3];var rc=De(458105876,class extends g{constructor(e){super(e)}g(){var e=this.s;let t=M(e);var r=2&t;return e=function(n,o,s){var i=Bn;let a=2&o,c=!1;if(s==null){if(a)return gs();s=[]}else if(s.constructor===Le){if(!(2&s.N)||a)return s;s=s.Y()}else Array.isArray(s)?c=!!(2&$(s)):s=[];if(a){if(!s.length)return gs();c||(c=!0,Nt(s))}else c&&(c=!1,s=Li(s));return c||(64&$(s)?Or(s,32):32&o&&ao(s,32)),V(n,o,2,i=new Le(s,i,j2,void 0),!1),i}(e,t,Ke(e,t,2)),e==null||!r&&Bn&&(e.ta=!0),r=e}});H[458105876]=[0,Na,s1,[!0,ht,[0,O,-1,ce]]];var Mo=class extends g{constructor(e){super(e)}},Ga=De(458105758,Mo);H[458105758]=[0,Q,O,Na];var Oo=class extends g{constructor(e){super(e)}};Oo.B=[5,6];var nc=De(443442058,Oo);H[443442058]=[0,Q,O,q,oe,ce,-1];var Va=class extends g{constructor(e){super(e)}},oc=De(516587230,Va);function Nn(e,t){return t=t?t.clone():new on,e.displayNamesLocale!==void 0?D(t,1,Vt(e.displayNamesLocale)):e.displayNamesLocale===void 0&&D(t,1),e.maxResults!==void 0?He(t,2,e.maxResults):"maxResults"in e&&D(t,2),e.scoreThreshold!==void 0?y(t,3,e.scoreThreshold):"scoreThreshold"in e&&D(t,3),e.categoryAllowlist!==void 0?Gr(t,4,e.categoryAllowlist):"categoryAllowlist"in e&&D(t,4),e.categoryDenylist!==void 0?Gr(t,5,e.categoryDenylist):"categoryDenylist"in e&&D(t,5),t}function Po(e,t=-1,r=""){return{categories:e.map(n=>({index:Pe(Fe(n,1),0)??-1,score:J(n,2)??0,categoryName:Xe(n,3)??"",displayName:Xe(n,4)??""})),headIndex:t,headName:r}}function ja(e){var t=kt(e,3,dt),r=kt(e,2,Gt),n=kt(e,1,bt),o=kt(e,9,bt);let s={categories:[],keypoints:[]};for(let i=0;i<t.length;i++)s.categories.push({score:t[i],index:r[i]??-1,categoryName:n[i]??"",displayName:o[i]??""});if((t=C(e,Sr,4)?.h())&&(s.boundingBox={originX:Fe(t,1)??0,originY:Fe(t,2)??0,width:Fe(t,3)??0,height:Fe(t,4)??0,angle:0}),C(e,Sr,4)?.g().length)for(let i of C(e,Sr,4).g())s.keypoints.push({x:wr(i,1)??0,y:wr(i,2)??0,score:wr(i,4)??0,label:bt(ut(i,3))??""});return s}function an(e){let t=[];for(let r of tt(e,ha,1))t.push({x:J(r,1)??0,y:J(r,2)??0,z:J(r,3)??0,visibility:J(r,4)??0});return t}function nr(e){let t=[];for(let r of tt(e,ca,1))t.push({x:J(r,1)??0,y:J(r,2)??0,z:J(r,3)??0,visibility:J(r,4)??0});return t}function Rs(e){return Array.from(e,t=>127<t?t-256:t)}function Ss(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let r=0,n=0,o=0;for(let s=0;s<e.length;s++)r+=e[s]*t[s],n+=e[s]*e[s],o+=t[s]*t[s];if(0>=n||0>=o)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*o)}var Er;H[516587230]=[0,Q,Lo,Io,oe];var sc=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 Wa(){if(Er===void 0)try{await WebAssembly.instantiate(sc),Er=!0}catch{Er=!1}return Er}async function Yt(e,t=""){let r=await Wa()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${t}/${e}_${r}.js`,wasmBinaryPath:`${t}/${e}_${r}.wasm`}}var nt=class{};function Xa(){var e=navigator;return typeof OffscreenCanvas<"u"&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(e)||!!((e=e.userAgent.match(/Version\/([\d]+).*Safari/))&&1<=e.length&&17<=Number(e[1])))}async function ks(e){if(typeof importScripts!="function"){let t=document.createElement("script");return t.src=e.toString(),t.crossOrigin="anonymous",new Promise((r,n)=>{t.addEventListener("load",()=>{r()},!1),t.addEventListener("error",o=>{n(o)},!1),document.body.appendChild(t)})}importScripts(e.toString())}function Ha(e){return e.videoWidth!==void 0?[e.videoWidth,e.videoHeight]:e.naturalWidth!==void 0?[e.naturalWidth,e.naturalHeight]:e.displayWidth!==void 0?[e.displayWidth,e.displayHeight]:[e.width,e.height]}function _(e,t,r){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function Cs(e,t,r){if(!e.i.canvas)throw Error("No OpenGL canvas configured.");if(r?e.i._bindTextureToStream(r):e.i._bindTextureToCanvas(),!(r=e.i.canvas.getContext("webgl2")||e.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);let[n,o]=Ha(t);return!e.l||n===e.i.canvas.width&&o===e.i.canvas.height||(e.i.canvas.width=n,e.i.canvas.height=o),[n,o]}function Fs(e,t,r){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");let n=new Uint32Array(t.length);for(let o=0;o<t.length;o++)n[o]=e.i.stringToNewUTF8(t[o]);t=e.i._malloc(4*n.length),e.i.HEAPU32.set(n,t>>2),r(t);for(let o of n)e.i._free(o);e.i._free(t)}function Ne(e,t,r){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=r}function rt(e,t,r){let n=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(o,s,i)=>{s?(r(n,i),n=[]):n.push(o)}}nt.forVisionTasks=function(e){return Yt("vision",e)},nt.forTextTasks=function(e){return Yt("text",e)},nt.forGenAiExperimentalTasks=function(e){return Yt("genai_experimental",e)},nt.forGenAiTasks=function(e){return Yt("genai",e)},nt.forAudioTasks=function(e){return Yt("audio",e)},nt.isSimdSupported=function(){return Wa()};async function ic(e,t,r,n){return e=await(async(o,s,i,a,c)=>{if(s&&await ks(s),!self.ModuleFactory||i&&(await ks(i),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&c&&((s=self.Module).locateFile=c.locateFile,c.mainScriptUrlOrBlob&&(s.mainScriptUrlOrBlob=c.mainScriptUrlOrBlob)),c=await self.ModuleFactory(self.Module||c),self.ModuleFactory=self.Module=void 0,new o(c,a)})(e,r.wasmLoaderPath,r.assetLoaderPath,t,{locateFile:o=>o.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&o.endsWith(".data")?r.assetBinaryPath.toString():o}),await e.o(n),e}function bn(e,t){let r=C(e.baseOptions,jr,1)||new jr;typeof t=="string"?(D(r,2,Vt(t)),D(r,1)):t instanceof Uint8Array&&(D(r,1,ho(t,!1,!1)),D(r,2)),T(e.baseOptions,0,1,r)}function Ls(e){try{let t=e.K.length;if(t===1)throw Error(e.K[0].message);if(1<t)throw Error("Encountered multiple errors: "+e.K.map(r=>r.message).join(", "))}finally{e.K=[]}}function p(e,t){e.J=Math.max(e.J,t)}function cn(e,t){e.C=new ue,Ae(e.C,"PassThroughCalculator"),B(e.C,"free_memory"),S(e.C,"free_memory_unused_out"),j(t,"free_memory"),we(t,e.C)}function Ot(e,t){B(e.C,t),S(e.C,t+"_unused_out")}function un(e){e.g.addBoolToStream(!0,"free_memory",e.J)}var Cr=class{constructor(e){this.g=e,this.K=[],this.J=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){if(t){let r=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(C(this.baseOptions,jr,1)?.g()||C(this.baseOptions,jr,1)?.h()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(n,o){let s=C(n.baseOptions,ws,3);if(!s){var i=s=new ws,a=new xs;Qt(i,4,kr,a)}"delegate"in o&&(o.delegate==="GPU"?(o=s,i=new qi,Qt(o,2,kr,i)):(o=s,i=new xs,Qt(o,4,kr,i))),T(n.baseOptions,0,3,s)}(this,r),r.modelAssetPath)return fetch(r.modelAssetPath.toString()).then(n=>{if(n.ok)return n.arrayBuffer();throw Error(`Failed to fetch model: ${r.modelAssetPath} (${n.status})`)}).then(n=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(n),!0,!1,!1),bn(this,"/model.dat"),this.m(),this.L()});if(r.modelAssetBuffer instanceof Uint8Array)bn(this,r.modelAssetBuffer);else if(r.modelAssetBuffer)return async function(n){let o=[];for(var s=0;;){let{done:i,value:a}=await n.read();if(i)break;o.push(a),s+=a.length}if(o.length===0)return new Uint8Array(0);if(o.length===1)return o[0];n=new Uint8Array(s),s=0;for(let i of o)n.set(i,s),s+=i.length;return n}(r.modelAssetBuffer).then(n=>{bn(this,n),this.m(),this.L()})}return this.m(),this.L(),Promise.resolve()}L(){}fa(){let e;if(this.g.fa(t=>{e=E1(t)}),!e)throw Error("Failed to retrieve CalculatorGraphConfig");return e}setGraph(e,t){this.g.attachErrorListener((r,n)=>{this.K.push(Error(n))}),this.g.Ma(),this.g.setGraph(e,t),this.C=void 0,Ls(this)}finishProcessing(){this.g.finishProcessing(),Ls(this)}close(){this.C=void 0,this.g.closeGraph()}};function he(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}Cr.prototype.close=Cr.prototype.close,function(e,t){e=e.split(".");var r,n=cr;for((e[0]in n)||n.execScript===void 0||n.execScript("var "+e[0]);e.length&&(r=e.shift());)e.length||t===void 0?n=n[r]&&n[r]!==Object.prototype[r]?n[r]:n[r]={}:n[r]=t}("TaskRunner",Cr);var Gn=class{constructor(t,r,n,o){this.g=t,this.h=r,this.m=n,this.l=o}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}};function Is(e,t,r){let n=e.g;if(r=he(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,t),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(e.h,r),r}function Ms(e,t){let r=e.g,n=he(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);let o=he(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,o),r.enableVertexAttribArray(e.K),r.vertexAttribPointer(e.K,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);let s=he(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(e.J),r.vertexAttribPointer(e.J,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(t?[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 Gn(r,n,o,s)}function Uo(e,t){if(e.g){if(t!==e.g)throw Error("Cannot change GL context once initialized")}else e.g=t}function yr(e,t,r,n){return Uo(e,t),e.h||(e.m(),e.D()),r?(e.v||(e.v=Ms(e,!0)),r=e.v):(e.A||(e.A=Ms(e,!1)),r=e.A),t.useProgram(e.h),r.bind(),e.l(),e=n(),r.g.bindVertexArray(null),e}function ft(e,t,r){return Uo(e,t),e=he(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,r??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,r??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function hn(e,t,r){Uo(e,t),e.u||(e.u=he(t.createFramebuffer(),"Failed to create framebuffe.")),t.bindFramebuffer(t.FRAMEBUFFER,e.u),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0)}function Do(e){e.g?.bindFramebuffer(e.g.FRAMEBUFFER,null)}var Ht=class{H(){return`
|
|
2
2
|
precision mediump float;
|
|
3
3
|
varying vec2 vTex;
|
|
4
4
|
uniform sampler2D inputTexture;
|
|
5
5
|
void main() {
|
|
6
6
|
gl_FragColor = texture2D(inputTexture, vTex);
|
|
7
7
|
}
|
|
8
|
-
`}m(){let e=this.g;if(this.h=he(e.createProgram(),"Failed to create WebGL program"),this.ba=
|
|
8
|
+
`}m(){let e=this.g;if(this.h=he(e.createProgram(),"Failed to create WebGL program"),this.ba=Is(this,`
|
|
9
9
|
attribute vec2 aVertex;
|
|
10
10
|
attribute vec2 aTex;
|
|
11
11
|
varying vec2 vTex;
|
|
12
12
|
void main(void) {
|
|
13
13
|
gl_Position = vec4(aVertex, 0.0, 1.0);
|
|
14
14
|
vTex = aTex;
|
|
15
|
-
}`,e.VERTEX_SHADER),this.aa=
|
|
15
|
+
}`,e.VERTEX_SHADER),this.aa=Is(this,this.H(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.K=e.getAttribLocation(this.h,"aVertex"),this.J=e.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){let e=this.g;e.deleteProgram(this.h),e.deleteShader(this.ba),e.deleteShader(this.aa)}this.u&&this.g.deleteFramebuffer(this.u),this.A&&this.A.close(),this.v&&this.v.close()}},ac=class extends Ht{H(){return`
|
|
16
16
|
precision mediump float;
|
|
17
17
|
uniform sampler2D backgroundTexture;
|
|
18
18
|
uniform sampler2D maskTexture;
|
|
@@ -24,7 +24,7 @@ var jn=typeof self<"u"?self:{};function $o(e){e:{for(var t=["CLOSURE_FLAGS"],r=j
|
|
|
24
24
|
vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));
|
|
25
25
|
gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);
|
|
26
26
|
}
|
|
27
|
-
`}D(){let e=this.g;e.activeTexture(e.TEXTURE1),this.C=
|
|
27
|
+
`}D(){let e=this.g;e.activeTexture(e.TEXTURE1),this.C=ft(this,e,e.LINEAR),e.activeTexture(e.TEXTURE2),this.j=ft(this,e,e.NEAREST)}m(){super.m();let e=this.g;this.M=he(e.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.V=he(e.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.L=he(e.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();let e=this.g;e.uniform1i(this.L,0),e.uniform1i(this.M,1),e.uniform1i(this.V,2)}close(){this.C&&this.g.deleteTexture(this.C),this.j&&this.g.deleteTexture(this.j),super.close()}},cc=class extends Ht{H(){return`
|
|
28
28
|
precision mediump float;
|
|
29
29
|
uniform sampler2D maskTexture;
|
|
30
30
|
uniform sampler2D defaultTexture;
|
|
@@ -38,15 +38,15 @@ var jn=typeof self<"u"?self:{};function $o(e){e:{for(var t=["CLOSURE_FLAGS"],r=j
|
|
|
38
38
|
overlayColor = mix(defaultColor, overlayColor, overlayColor.a);
|
|
39
39
|
gl_FragColor = mix(defaultColor, overlayColor, confidence);
|
|
40
40
|
}
|
|
41
|
-
`}D(){let e=this.g;e.activeTexture(e.TEXTURE1),this.j=ut(this,e),e.activeTexture(e.TEXTURE2),this.C=ut(this,e)}m(){super.m();let e=this.g;this.J=he(e.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.K=he(e.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.I=he(e.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();let e=this.g;e.uniform1i(this.I,0),e.uniform1i(this.J,1),e.uniform1i(this.K,2)}close(){this.j&&this.g.deleteTexture(this.j),this.C&&this.g.deleteTexture(this.C),super.close()}};function Ze(e,t){switch(t){case 0:return e.g.find(r=>r instanceof Uint8Array);case 1:return e.g.find(r=>r instanceof Float32Array);case 2:return e.g.find(r=>typeof WebGLTexture<"u"&&r instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function Pn(e){var t=Ze(e,1);if(!t){if(t=Ze(e,0))t=new Float32Array(t).map(n=>n/255);else{t=new Float32Array(e.width*e.height);let n=It(e);var r=Ms(e);if(sn(r,n,Ba(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in self.document){r=new Float32Array(e.width*e.height*4),n.readPixels(0,0,e.width,e.height,n.RGBA,n.FLOAT,r);for(let s=0,o=0;s<t.length;++s,o+=4)t[s]=r[o]}else n.readPixels(0,0,e.width,e.height,n.RED,n.FLOAT,t)}e.g.push(t)}return t}function Ba(e){let t=Ze(e,2);if(!t){let r=It(e);t=Ga(e);let n=Pn(e),s=Na(e);r.texImage2D(r.TEXTURE_2D,0,s,e.width,e.height,0,r.RED,r.FLOAT,n),Dn(e)}return t}function It(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=he(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function Na(e){if(e=It(e),!Er)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))Er=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Er=e.R16F}return Er}function Ms(e){return e.l||(e.l=new Xt),e.l}function Ga(e){let t=It(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let r=Ze(e,2);return r||(r=ut(Ms(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(r),e.j=!0),t.bindTexture(t.TEXTURE_2D,r),r}function Dn(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var Er,re=class{constructor(e,t,r,n,s,o,i){this.g=e,this.m=t,this.j=r,this.canvas=n,this.l=s,this.width=o,this.height=i,this.j&&--So===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Ha(){return!!Ze(this,0)}la(){return!!Ze(this,1)}R(){return!!Ze(this,2)}ka(){return(t=Ze(e=this,0))||(t=Pn(e),t=new Uint8Array(t.map(r=>255*r)),e.g.push(t)),t;var e,t}ja(){return Pn(this)}M(){return Ba(this)}clone(){let e=[];for(let t of this.g){let r;if(t instanceof Uint8Array)r=new Uint8Array(t);else if(t instanceof Float32Array)r=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{let n=It(this),s=Ms(this);n.activeTexture(n.TEXTURE1),r=ut(s,n,this.m?n.LINEAR:n.NEAREST),n.bindTexture(n.TEXTURE_2D,r);let o=Na(this);n.texImage2D(n.TEXTURE_2D,0,o,this.width,this.height,0,n.RED,n.FLOAT,null),n.bindTexture(n.TEXTURE_2D,null),sn(s,n,r),pr(s,n,!1,()=>{Ga(this),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_FAN,0,4),Dn(this)}),Ls(s),Dn(this)}}e.push(r)}return new re(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&It(this).deleteTexture(Ze(this,2)),So=-1}};re.prototype.close=re.prototype.close,re.prototype.clone=re.prototype.clone,re.prototype.getAsWebGLTexture=re.prototype.M,re.prototype.getAsFloat32Array=re.prototype.ja,re.prototype.getAsUint8Array=re.prototype.ka,re.prototype.hasWebGLTexture=re.prototype.R,re.prototype.hasFloat32Array=re.prototype.la,re.prototype.hasUint8Array=re.prototype.Ha;var So=250,ec={color:"white",lineWidth:4,radius:6};function gn(e){return{...ec,fillColor:(e=e||{}).color,...e}}function Je(e,t){return e instanceof Function?e(t):e}function Co(e,t,r){return Math.max(Math.min(t,r),Math.min(Math.max(t,r),e))}function Ht(e){if(!e.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return e.l}function or(e){if(!e.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return e.j}function Fo(e,t,r){if(t.R())r(t.M());else{let n=t.la()?t.ja():t.ka();e.m=e.m??new Xt;let s=or(e);r((e=new re([n],t.m,!1,s.canvas,e.m,t.width,t.height)).M()),e.close()}}function Lo(e,t,r,n){let s=function(a){return a.g||(a.g=new Z1),a.g}(e),o=or(e),i=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;pr(s,o,!0,()=>{(function(c,u,f,h){let m=c.g;if(m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,u),m.activeTexture(m.TEXTURE1),m.bindTexture(m.TEXTURE_2D,c.C),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,f),c.I&&function(b,A){if(b!==A)return!1;b=b.entries(),A=A.entries();for(let[O,d]of b){b=O;let l=d;var x=A.next();if(x.done)return!1;let[g,S]=x.value;if(x=S,b!==g||l[0]!==x[0]||l[1]!==x[1]||l[2]!==x[2]||l[3]!==x[3])return!1}return!!A.next().done}(c.I,h))m.activeTexture(m.TEXTURE2),m.bindTexture(m.TEXTURE_2D,c.j);else{c.I=h;let b=Array(1024).fill(0);h.forEach((A,x)=>{if(A.length!==4)throw Error(`Color at index ${x} is not a four-channel value.`);b[4*x]=A[0],b[4*x+1]=A[1],b[4*x+2]=A[2],b[4*x+3]=A[3]}),m.activeTexture(m.TEXTURE2),m.bindTexture(m.TEXTURE_2D,c.j),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,256,1,0,m.RGBA,m.UNSIGNED_BYTE,new Uint8Array(b))}})(s,t,i,n),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.drawArrays(o.TRIANGLE_FAN,0,4);let a=s.g;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,null),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,null),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,null)})}function Mo(e,t,r,n){let s=or(e),o=function(c){return c.h||(c.h=new Q1),c.h}(e),i=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r,a=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;pr(o,s,!0,()=>{var c=o.g;c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,t),c.activeTexture(c.TEXTURE1),c.bindTexture(c.TEXTURE_2D,o.j),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,i),c.activeTexture(c.TEXTURE2),c.bindTexture(c.TEXTURE_2D,o.C),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,a),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4),s.bindTexture(s.TEXTURE_2D,null),(c=o.g).activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,null),c.activeTexture(c.TEXTURE1),c.bindTexture(c.TEXTURE_2D,null),c.activeTexture(c.TEXTURE2),c.bindTexture(c.TEXTURE_2D,null)})}var de=class{constructor(e,t){e instanceof CanvasRenderingContext2D||e instanceof OffscreenCanvasRenderingContext2D?(this.l=e,this.j=t):this.j=e}Aa(e,t){if(e){var r=Ht(this);t=gn(t),r.save();var n=r.canvas,s=0;for(let o of e)r.fillStyle=Je(t.fillColor,{index:s,from:o}),r.strokeStyle=Je(t.color,{index:s,from:o}),r.lineWidth=Je(t.lineWidth,{index:s,from:o}),(e=new Path2D).arc(o.x*n.width,o.y*n.height,Je(t.radius,{index:s,from:o}),0,2*Math.PI),r.fill(e),r.stroke(e),++s;r.restore()}}za(e,t,r){if(e&&t){var n=Ht(this);r=gn(r),n.save();var s=n.canvas,o=0;for(let i of t){n.beginPath(),t=e[i.start];let a=e[i.end];t&&a&&(n.strokeStyle=Je(r.color,{index:o,from:t,to:a}),n.lineWidth=Je(r.lineWidth,{index:o,from:t,to:a}),n.moveTo(t.x*s.width,t.y*s.height),n.lineTo(a.x*s.width,a.y*s.height)),++o,n.stroke()}n.restore()}}wa(e,t){let r=Ht(this);t=gn(t),r.save(),r.beginPath(),r.lineWidth=Je(t.lineWidth,{}),r.strokeStyle=Je(t.color,{}),r.fillStyle=Je(t.fillColor,{}),r.moveTo(e.originX,e.originY),r.lineTo(e.originX+e.width,e.originY),r.lineTo(e.originX+e.width,e.originY+e.height),r.lineTo(e.originX,e.originY+e.height),r.lineTo(e.originX,e.originY),r.stroke(),r.fill(),r.restore()}xa(e,t,r=[0,0,0,255]){this.l?function(n,s,o,i){let a=or(n);Fo(n,s,c=>{Lo(n,c,o,i),(c=Ht(n)).drawImage(a.canvas,0,0,c.canvas.width,c.canvas.height)})}(this,e,r,t):Lo(this,e.M(),r,t)}ya(e,t,r){this.l?function(n,s,o,i){let a=or(n);Fo(n,s,c=>{Mo(n,c,o,i),(c=Ht(n)).drawImage(a.canvas,0,0,c.canvas.width,c.canvas.height)})}(this,e,t,r):Mo(this,e.M(),t,r)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function Ve(e,t){switch(t){case 0:return e.g.find(r=>r instanceof ImageData);case 1:return e.g.find(r=>typeof ImageBitmap<"u"&&r instanceof ImageBitmap);case 2:return e.g.find(r=>typeof WebGLTexture<"u"&&r instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function Va(e){var t=Ve(e,0);if(!t){t=Ot(e);let r=on(e),n=new Uint8Array(e.width*e.height*4);sn(r,t,kr(e)),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,n),Ls(r),t=new ImageData(new Uint8ClampedArray(n.buffer),e.width,e.height),e.g.push(t)}return t}function kr(e){let t=Ve(e,2);if(!t){let r=Ot(e);t=Sr(e);let n=Ve(e,1)||Va(e);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),Yt(e)}return t}function Ot(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");return e.h||(e.h=he(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function on(e){return e.l||(e.l=new Xt),e.l}function Sr(e){let t=Ot(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let r=Ve(e,2);return r||(r=ut(on(e),t),e.g.push(r),e.m=!0),t.bindTexture(t.TEXTURE_2D,r),r}function Yt(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}function Io(e){let t=Ot(e);return pr(on(e),t,!0,()=>function(r,n){let s=r.canvas;if(s.width===r.width&&s.height===r.height)return n();let o=s.width,i=s.height;return s.width=r.width,s.height=r.height,r=n(),s.width=o,s.height=i,r}(e,()=>{if(t.bindFramebuffer(t.FRAMEBUFFER,null),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),!(e.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return e.canvas.transferToImageBitmap()}))}de.prototype.close=de.prototype.close,de.prototype.drawConfidenceMask=de.prototype.ya,de.prototype.drawCategoryMask=de.prototype.xa,de.prototype.drawBoundingBox=de.prototype.wa,de.prototype.drawConnectors=de.prototype.za,de.prototype.drawLandmarks=de.prototype.Aa,de.lerp=function(e,t,r,n,s){return Co(n*(1-(e-t)/(r-t))+s*(1-(r-e)/(r-t)),n,s)},de.clamp=Co;var oe=class{constructor(e,t,r,n,s,o,i){this.g=e,this.j=t,this.m=r,this.canvas=n,this.l=s,this.width=o,this.height=i,(this.j||this.m)&&--Oo===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ga(){return!!Ve(this,0)}ma(){return!!Ve(this,1)}R(){return!!Ve(this,2)}Ea(){return Va(this)}Da(){var e=Ve(this,1);return e||(kr(this),Sr(this),e=Io(this),Yt(this),this.g.push(e),this.j=!0),e}M(){return kr(this)}clone(){let e=[];for(let t of this.g){let r;if(t instanceof ImageData)r=new ImageData(t.data,this.width,this.height);else if(t instanceof WebGLTexture){let n=Ot(this),s=on(this);n.activeTexture(n.TEXTURE1),r=ut(s,n),n.bindTexture(n.TEXTURE_2D,r),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,this.width,this.height,0,n.RGBA,n.UNSIGNED_BYTE,null),n.bindTexture(n.TEXTURE_2D,null),sn(s,n,r),pr(s,n,!1,()=>{Sr(this),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_FAN,0,4),Yt(this)}),Ls(s),Yt(this)}else{if(!(t instanceof ImageBitmap))throw Error(`Type is not supported: ${t}`);kr(this),Sr(this),r=Io(this),Yt(this)}e.push(r)}return new oe(e,this.ma(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ve(this,1).close(),this.m&&Ot(this).deleteTexture(Ve(this,2)),Oo=-1}};oe.prototype.close=oe.prototype.close,oe.prototype.clone=oe.prototype.clone,oe.prototype.getAsWebGLTexture=oe.prototype.M,oe.prototype.getAsImageBitmap=oe.prototype.Da,oe.prototype.getAsImageData=oe.prototype.Ea,oe.prototype.hasWebGLTexture=oe.prototype.R,oe.prototype.hasImageBitmap=oe.prototype.ma,oe.prototype.hasImageData=oe.prototype.Ga;var Oo=250;function Be(...e){return e.map(([t,r])=>({start:t,end:r}))}var tc=function(e){return class extends e{Ma(){this.i._registerModelResourcesGraphService()}}}((Po=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:typeof OffscreenCanvas>"u"||Da()?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas")):this.i.canvas=new OffscreenCanvas(1,1)}async initializeGraph(e){let t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){let r=e.length,n=this.i._malloc(r);this.i.HEAPU8.set(e,n),t?this.i._changeBinaryGraph(r,n):this.i._changeTextGraph(r,n),this.i._free(n)}configureAudio(e,t,r,n,s){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),T(this,n||"input_audio",o=>{T(this,s=s||"audio_header",i=>{this.i._configureAudio(o,i,e,t,r)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}fa(e){qe(this,"__graph_config__",t=>{e(t)}),T(this,"__graph_config__",t=>{this.i._getGraphConfig(t,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,r){this.addAudioToStreamWithShape(e,0,0,t,r)}addAudioToStreamWithShape(e,t,r,n,s){let o=4*e.length;this.h!==o&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(o),this.h=o),this.i.HEAPF32.set(e,this.g/4),T(this,n,i=>{this.i._addAudioToInputStream(this.g,t,r,i,s)})}addGpuBufferToStream(e,t,r){T(this,t,n=>{let[s,o]=bo(this,e,n);this.i._addBoundTextureToStream(n,s,o,r)})}addBoolToStream(e,t,r){T(this,t,n=>{this.i._addBoolToInputStream(e,n,r)})}addDoubleToStream(e,t,r){T(this,t,n=>{this.i._addDoubleToInputStream(e,n,r)})}addFloatToStream(e,t,r){T(this,t,n=>{this.i._addFloatToInputStream(e,n,r)})}addIntToStream(e,t,r){T(this,t,n=>{this.i._addIntToInputStream(e,n,r)})}addStringToStream(e,t,r){T(this,t,n=>{T(this,e,s=>{this.i._addStringToInputStream(s,n,r)})})}addStringRecordToStream(e,t,r){T(this,t,n=>{xo(this,Object.keys(e),s=>{xo(this,Object.values(e),o=>{this.i._addFlatHashMapToInputStream(s,o,Object.keys(e).length,n,r)})})})}addProtoToStream(e,t,r,n){T(this,r,s=>{T(this,t,o=>{let i=this.i._malloc(e.length);this.i.HEAPU8.set(e,i),this.i._addProtoToInputStream(i,e.length,o,s,n),this.i._free(i)})})}addEmptyPacketToStream(e,t){T(this,e,r=>{this.i._addEmptyPacketToInputStream(r,t)})}addBoolVectorToStream(e,t,r){T(this,t,n=>{let s=this.i._allocateBoolVector(e.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(let o of e)this.i._addBoolVectorEntry(s,o);this.i._addBoolVectorToInputStream(s,n,r)})}addDoubleVectorToStream(e,t,r){T(this,t,n=>{let s=this.i._allocateDoubleVector(e.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(let o of e)this.i._addDoubleVectorEntry(s,o);this.i._addDoubleVectorToInputStream(s,n,r)})}addFloatVectorToStream(e,t,r){T(this,t,n=>{let s=this.i._allocateFloatVector(e.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(let o of e)this.i._addFloatVectorEntry(s,o);this.i._addFloatVectorToInputStream(s,n,r)})}addIntVectorToStream(e,t,r){T(this,t,n=>{let s=this.i._allocateIntVector(e.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(let o of e)this.i._addIntVectorEntry(s,o);this.i._addIntVectorToInputStream(s,n,r)})}addStringVectorToStream(e,t,r){T(this,t,n=>{let s=this.i._allocateStringVector(e.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(let o of e)T(this,o,i=>{this.i._addStringVectorEntry(s,i)});this.i._addStringVectorToInputStream(s,n,r)})}addBoolToInputSidePacket(e,t){T(this,t,r=>{this.i._addBoolToInputSidePacket(e,r)})}addDoubleToInputSidePacket(e,t){T(this,t,r=>{this.i._addDoubleToInputSidePacket(e,r)})}addFloatToInputSidePacket(e,t){T(this,t,r=>{this.i._addFloatToInputSidePacket(e,r)})}addIntToInputSidePacket(e,t){T(this,t,r=>{this.i._addIntToInputSidePacket(e,r)})}addStringToInputSidePacket(e,t){T(this,t,r=>{T(this,e,n=>{this.i._addStringToInputSidePacket(n,r)})})}addProtoToInputSidePacket(e,t,r){T(this,r,n=>{T(this,t,s=>{let o=this.i._malloc(e.length);this.i.HEAPU8.set(e,o),this.i._addProtoToInputSidePacket(o,e.length,s,n),this.i._free(o)})})}addBoolVectorToInputSidePacket(e,t){T(this,t,r=>{let n=this.i._allocateBoolVector(e.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let s of e)this.i._addBoolVectorEntry(n,s);this.i._addBoolVectorToInputSidePacket(n,r)})}addDoubleVectorToInputSidePacket(e,t){T(this,t,r=>{let n=this.i._allocateDoubleVector(e.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let s of e)this.i._addDoubleVectorEntry(n,s);this.i._addDoubleVectorToInputSidePacket(n,r)})}addFloatVectorToInputSidePacket(e,t){T(this,t,r=>{let n=this.i._allocateFloatVector(e.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let s of e)this.i._addFloatVectorEntry(n,s);this.i._addFloatVectorToInputSidePacket(n,r)})}addIntVectorToInputSidePacket(e,t){T(this,t,r=>{let n=this.i._allocateIntVector(e.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let s of e)this.i._addIntVectorEntry(n,s);this.i._addIntVectorToInputSidePacket(n,r)})}addStringVectorToInputSidePacket(e,t){T(this,t,r=>{let n=this.i._allocateStringVector(e.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let s of e)T(this,s,o=>{this.i._addStringVectorEntry(n,o)});this.i._addStringVectorToInputSidePacket(n,r)})}attachBoolListener(e,t){qe(this,e,t),T(this,e,r=>{this.i._attachBoolListener(r)})}attachBoolVectorListener(e,t){yt(this,e,t),T(this,e,r=>{this.i._attachBoolVectorListener(r)})}attachIntListener(e,t){qe(this,e,t),T(this,e,r=>{this.i._attachIntListener(r)})}attachIntVectorListener(e,t){yt(this,e,t),T(this,e,r=>{this.i._attachIntVectorListener(r)})}attachDoubleListener(e,t){qe(this,e,t),T(this,e,r=>{this.i._attachDoubleListener(r)})}attachDoubleVectorListener(e,t){yt(this,e,t),T(this,e,r=>{this.i._attachDoubleVectorListener(r)})}attachFloatListener(e,t){qe(this,e,t),T(this,e,r=>{this.i._attachFloatListener(r)})}attachFloatVectorListener(e,t){yt(this,e,t),T(this,e,r=>{this.i._attachFloatVectorListener(r)})}attachStringListener(e,t){qe(this,e,t),T(this,e,r=>{this.i._attachStringListener(r)})}attachStringVectorListener(e,t){yt(this,e,t),T(this,e,r=>{this.i._attachStringVectorListener(r)})}attachProtoListener(e,t,r){qe(this,e,t),T(this,e,n=>{this.i._attachProtoListener(n,r||!1)})}attachProtoVectorListener(e,t,r){yt(this,e,t),T(this,e,n=>{this.i._attachProtoVectorListener(n,r||!1)})}attachAudioListener(e,t,r){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),qe(this,e,(n,s)=>{n=new Float32Array(n.buffer,n.byteOffset,n.length/4),t(n,s)}),T(this,e,n=>{this.i._attachAudioListener(n,r||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Po{get ha(){return this.i}sa(e,t,r){T(this,t,n=>{let[s,o]=bo(this,e,n);this.ha._addBoundTextureAsImageToStream(n,s,o,r)})}W(e,t){qe(this,e,t),T(this,e,r=>{this.ha._attachImageListener(r)})}da(e,t){yt(this,e,t),T(this,e,r=>{this.ha._attachImageVectorListener(r)})}})),Po,Oe=class extends tc{};async function w(e,t,r){return async function(n,s,o,i){return J1(n,s,o,i)}(e,r.canvas??(typeof OffscreenCanvas>"u"||Da()?document.createElement("canvas"):void 0),t,r)}function ja(e,t,r,n){if(e.V){let o=new oa;if(r?.regionOfInterest){if(!e.ra)throw Error("This task doesn't support region-of-interest.");var s=r.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(0>s.left||0>s.top||1<s.right||1<s.bottom)throw Error("Expected RectF values to be in [0,1].");v(o,1,(s.left+s.right)/2),v(o,2,(s.top+s.bottom)/2),v(o,4,s.right-s.left),v(o,3,s.bottom-s.top)}else v(o,1,.5),v(o,2,.5),v(o,4,1),v(o,3,1);if(r?.rotationDegrees){if(r?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90\xB0.");if(v(o,5,-Math.PI*r.rotationDegrees/180),r?.rotationDegrees%180!=0){let[i,a]=Ua(t);r=J(o,3)*a/i,s=J(o,4)*i/a,v(o,4,r),v(o,3,s)}}e.g.addProtoToStream(o.g(),"mediapipe.NormalizedRect",e.V,n)}e.g.sa(t,e.ba,n??performance.now()),e.finishProcessing()}function Pe(e,t,r){if(e.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");ja(e,t,r,e.C+1)}function Ke(e,t,r,n){if(!e.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");ja(e,t,r,n)}function Pt(e,t,r,n){var s=t.data;let o=t.width,i=o*(t=t.height);if((s instanceof Uint8Array||s instanceof Float32Array)&&s.length!==i)throw Error("Unsupported channel count: "+s.length/i);return e=new re([s],r,!1,e.g.i.canvas,e.O,o,t),n?e.clone():e}var pe=class extends In{constructor(e,t,r,n){super(e),this.g=e,this.ba=t,this.V=r,this.ra=n,this.O=new Xt}l(e,t=!0){if("runningMode"in e&&sr(this.baseOptions,2,!!e.runningMode&&e.runningMode!=="IMAGE"),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.O.close(),super.close()}};pe.prototype.close=pe.prototype.close;var Re=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},_(e=this.h=new en,0,1,t=new z),v(this.h,2,.5),v(this.h,3,.3)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&v(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&v(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}F(e,t){return this.j={detections:[]},Pe(this,e,t),this.j}G(e,t,r){return this.j={detections:[]},Ke(this,e,r,t),this.j}m(){var e=new le;G(e,"image_in"),G(e,"norm_rect_in"),L(e,"detections");let t=new xe;De(t,P1,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),U(r,"IMAGE:image_in"),U(r,"NORM_RECT:norm_rect_in"),k(r,"DETECTIONS:detections"),r.o(t),we(e,r),this.g.attachProtoVectorListener("detections",(n,s)=>{for(let o of n)n=Qi(o),this.j.detections.push(Oa(n));p(this,s)}),this.g.attachEmptyPacketListener("detections",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Re.prototype.detectForVideo=Re.prototype.G,Re.prototype.detect=Re.prototype.F,Re.prototype.setOptions=Re.prototype.o,Re.createFromModelPath=async function(e,t){return w(Re,e,{baseOptions:{modelAssetPath:t}})},Re.createFromModelBuffer=function(e,t){return w(Re,e,{baseOptions:{modelAssetBuffer:t}})},Re.createFromOptions=function(e,t){return w(Re,e,t)};var Is=Be([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]),Os=Be([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]),Ps=Be([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Xa=Be([474,475],[475,476],[476,477],[477,474]),Ds=Be([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]),Us=Be([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Wa=Be([469,470],[470,471],[471,472],[472,469]),Bs=Be([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]),Ha=[...Is,...Os,...Ps,...Ds,...Us,...Bs],za=Be([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 Do(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Y=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,_(e=this.h=new ma,0,1,t=new z),this.v=new pa,_(this.h,0,3,this.v),this.s=new en,_(this.h,0,2,this.s),We(this.s,4,1),v(this.s,2,.5),v(this.v,2,.5),v(this.h,4,.5)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numFaces"in e&&We(this.s,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&v(this.s,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&v(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&v(this.v,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}F(e,t){return Do(this),Pe(this,e,t),this.j}G(e,t,r){return Do(this),Ke(this,e,r,t),this.j}m(){var e=new le;G(e,"image_in"),G(e,"norm_rect"),L(e,"face_landmarks");let t=new xe;De(t,U1,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),U(r,"IMAGE:image_in"),U(r,"NORM_RECT:norm_rect"),k(r,"NORM_LANDMARKS:face_landmarks"),r.o(t),we(e,r),this.g.attachProtoVectorListener("face_landmarks",(n,s)=>{for(let o of n)n=dr(o),this.j.faceLandmarks.push(tn(n));p(this,s)}),this.g.attachEmptyPacketListener("face_landmarks",n=>{p(this,n)}),this.outputFaceBlendshapes&&(L(e,"blendshapes"),k(r,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(n,s)=>{if(this.outputFaceBlendshapes)for(let o of n)n=Zr(o),this.j.faceBlendshapes.push(Cs(n.g()??[]));p(this,s)}),this.g.attachEmptyPacketListener("blendshapes",n=>{p(this,n)})),this.outputFacialTransformationMatrixes&&(L(e,"face_geometry"),k(r,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(n,s)=>{if(this.outputFacialTransformationMatrixes)for(let o of n)(n=C(D1(o),sa,2))&&this.j.facialTransformationMatrixes.push({rows:Xe(Fe(n,1))??0,columns:Xe(Fe(n,2))??0,data:Rt(n,3,ht).slice()??[]});p(this,s)}),this.g.attachEmptyPacketListener("face_geometry",n=>{p(this,n)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Y.prototype.detectForVideo=Y.prototype.G,Y.prototype.detect=Y.prototype.F,Y.prototype.setOptions=Y.prototype.o,Y.createFromModelPath=function(e,t){return w(Y,e,{baseOptions:{modelAssetPath:t}})},Y.createFromModelBuffer=function(e,t){return w(Y,e,{baseOptions:{modelAssetBuffer:t}})},Y.createFromOptions=function(e,t){return w(Y,e,t)},Y.FACE_LANDMARKS_LIPS=Is,Y.FACE_LANDMARKS_LEFT_EYE=Os,Y.FACE_LANDMARKS_LEFT_EYEBROW=Ps,Y.FACE_LANDMARKS_LEFT_IRIS=Xa,Y.FACE_LANDMARKS_RIGHT_EYE=Ds,Y.FACE_LANDMARKS_RIGHT_EYEBROW=Us,Y.FACE_LANDMARKS_RIGHT_IRIS=Wa,Y.FACE_LANDMARKS_FACE_OVAL=Bs,Y.FACE_LANDMARKS_CONTOURS=Ha,Y.FACE_LANDMARKS_TESSELATION=za;var Ne=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect",!0),_(e=this.j=new ya,0,1,t=new z)}get baseOptions(){return C(this.j,z,1)}set baseOptions(e){_(this.j,0,1,e)}o(e){return super.l(e)}Pa(e,t,r){let n=typeof t!="function"?t:{};if(this.h=typeof t=="function"?t:r,Pe(this,e,n??{}),!this.h)return this.s}m(){var e=new le;G(e,"image_in"),G(e,"norm_rect"),L(e,"stylized_image");let t=new xe;De(t,B1,this.j);let r=new ce;Ae(r,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),U(r,"IMAGE:image_in"),U(r,"NORM_RECT:norm_rect"),k(r,"STYLIZED_IMAGE:stylized_image"),r.o(t),we(e,r),this.g.W("stylized_image",(n,s)=>{var o=!this.h,i=n.data,a=n.width;let c=a*(n=n.height);if(i instanceof Uint8Array)if(i.length===3*c){let u=new Uint8ClampedArray(4*c);for(let f=0;f<c;++f)u[4*f]=i[3*f],u[4*f+1]=i[3*f+1],u[4*f+2]=i[3*f+2],u[4*f+3]=255;i=new ImageData(u,a,n)}else{if(i.length!==4*c)throw Error("Unsupported channel count: "+i.length/c);i=new ImageData(new Uint8ClampedArray(i.buffer,i.byteOffset,i.length),a,n)}else if(!(i instanceof WebGLTexture))throw Error(`Unsupported format: ${i.constructor.name}`);a=new oe([i],!1,!1,this.g.i.canvas,this.O,a,n),this.s=o=o?a.clone():a,this.h&&this.h(o),p(this,s)}),this.g.attachEmptyPacketListener("stylized_image",n=>{this.s=null,this.h&&this.h(null),p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ne.prototype.stylize=Ne.prototype.Pa,Ne.prototype.setOptions=Ne.prototype.o,Ne.createFromModelPath=function(e,t){return w(Ne,e,{baseOptions:{modelAssetPath:t}})},Ne.createFromModelBuffer=function(e,t){return w(Ne,e,{baseOptions:{modelAssetBuffer:t}})},Ne.createFromOptions=function(e,t){return w(Ne,e,t)};var Ns=Be([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 Uo(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function Bo(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function No(e,t=!0){let r=[];for(let s of e){var n=Zr(s);e=[];for(let o of n.g())n=t&&Fe(o,1)!=null?Xe(Fe(o,1)):-1,e.push({score:J(o,2)??0,index:n,categoryName:Me(o,3)??""??"",displayName:Me(o,4)??""??""});r.push(e)}return r}var ve=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],_(e=this.j=new Aa,0,1,t=new z),this.s=new As,_(this.j,0,2,this.s),this.D=new bs,_(this.s,0,3,this.D),this.v=new Ta,_(this.s,0,2,this.v),this.h=new N1,_(this.j,0,3,this.h),v(this.v,2,.5),v(this.s,4,.5),v(this.D,2,.5)}get baseOptions(){return C(this.j,z,1)}set baseOptions(e){_(this.j,0,1,e)}o(e){if(We(this.v,3,e.numHands??1),"minHandDetectionConfidence"in e&&v(this.v,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&v(this.s,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&v(this.D,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new wt,r=t,n=Mn(e.cannedGesturesClassifierOptions,C(this.h,wt,3)?.h());_(r,0,2,n),_(this.h,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&C(this.h,wt,3)?.g();return e.customGesturesClassifierOptions?(_(r=t=new wt,0,2,n=Mn(e.customGesturesClassifierOptions,C(this.h,wt,4)?.h())),_(this.h,0,4,t)):e.customGesturesClassifierOptions===void 0&&C(this.h,wt,4)?.g(),this.l(e)}Ka(e,t){return Uo(this),Pe(this,e,t),Bo(this)}La(e,t,r){return Uo(this),Ke(this,e,r,t),Bo(this)}m(){var e=new le;G(e,"image_in"),G(e,"norm_rect"),L(e,"hand_gestures"),L(e,"hand_landmarks"),L(e,"world_hand_landmarks"),L(e,"handedness");let t=new xe;De(t,j1,this.j);let r=new ce;Ae(r,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),U(r,"IMAGE:image_in"),U(r,"NORM_RECT:norm_rect"),k(r,"HAND_GESTURES:hand_gestures"),k(r,"LANDMARKS:hand_landmarks"),k(r,"WORLD_LANDMARKS:world_hand_landmarks"),k(r,"HANDEDNESS:handedness"),r.o(t),we(e,r),this.g.attachProtoVectorListener("hand_landmarks",(n,s)=>{for(let o of n){n=dr(o);let i=[];for(let a of tt(n,ra,1))i.push({x:J(a,1)??0,y:J(a,2)??0,z:J(a,3)??0,visibility:J(a,4)??0});this.landmarks.push(i)}p(this,s)}),this.g.attachEmptyPacketListener("hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("world_hand_landmarks",(n,s)=>{for(let o of n){n=kt(o);let i=[];for(let a of tt(n,ea,1))i.push({x:J(a,1)??0,y:J(a,2)??0,z:J(a,3)??0,visibility:J(a,4)??0});this.worldLandmarks.push(i)}p(this,s)}),this.g.attachEmptyPacketListener("world_hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("hand_gestures",(n,s)=>{this.gestures.push(...No(n,!1)),p(this,s)}),this.g.attachEmptyPacketListener("hand_gestures",n=>{p(this,n)}),this.g.attachProtoVectorListener("handedness",(n,s)=>{this.handedness.push(...No(n)),p(this,s)}),this.g.attachEmptyPacketListener("handedness",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function Go(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}ve.prototype.recognizeForVideo=ve.prototype.La,ve.prototype.recognize=ve.prototype.Ka,ve.prototype.setOptions=ve.prototype.o,ve.createFromModelPath=function(e,t){return w(ve,e,{baseOptions:{modelAssetPath:t}})},ve.createFromModelBuffer=function(e,t){return w(ve,e,{baseOptions:{modelAssetBuffer:t}})},ve.createFromOptions=function(e,t){return w(ve,e,t)},ve.HAND_CONNECTIONS=Ns;var _e=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],_(e=this.h=new As,0,1,t=new z),this.s=new bs,_(this.h,0,3,this.s),this.j=new Ta,_(this.h,0,2,this.j),We(this.j,3,1),v(this.j,2,.5),v(this.s,2,.5),v(this.h,4,.5)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numHands"in e&&We(this.j,3,e.numHands??1),"minHandDetectionConfidence"in e&&v(this.j,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&v(this.h,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&v(this.s,2,e.minHandPresenceConfidence??.5),this.l(e)}F(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Pe(this,e,t),Go(this)}G(e,t,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ke(this,e,r,t),Go(this)}m(){var e=new le;G(e,"image_in"),G(e,"norm_rect"),L(e,"hand_landmarks"),L(e,"world_hand_landmarks"),L(e,"handedness");let t=new xe;De(t,V1,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),U(r,"IMAGE:image_in"),U(r,"NORM_RECT:norm_rect"),k(r,"LANDMARKS:hand_landmarks"),k(r,"WORLD_LANDMARKS:world_hand_landmarks"),k(r,"HANDEDNESS:handedness"),r.o(t),we(e,r),this.g.attachProtoVectorListener("hand_landmarks",(n,s)=>{for(let o of n)n=dr(o),this.landmarks.push(tn(n));p(this,s)}),this.g.attachEmptyPacketListener("hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("world_hand_landmarks",(n,s)=>{for(let o of n)n=kt(o),this.worldLandmarks.push(er(n));p(this,s)}),this.g.attachEmptyPacketListener("world_hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("handedness",(n,s)=>{var o=this.handedness,i=o.push;let a=[];for(let c of n){n=Zr(c);let u=[];for(let f of n.g())u.push({score:J(f,2)??0,index:Xe(Fe(f,1))??-1,categoryName:Me(f,3)??""??"",displayName:Me(f,4)??""??""});a.push(u)}i.call(o,...a),p(this,s)}),this.g.attachEmptyPacketListener("handedness",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};_e.prototype.detectForVideo=_e.prototype.G,_e.prototype.detect=_e.prototype.F,_e.prototype.setOptions=_e.prototype.o,_e.createFromModelPath=function(e,t){return w(_e,e,{baseOptions:{modelAssetPath:t}})},_e.createFromModelBuffer=function(e,t){return w(_e,e,{baseOptions:{modelAssetBuffer:t}})},_e.createFromOptions=function(e,t){return w(_e,e,t)},_e.HAND_CONNECTIONS=Ns;var Ya=Be([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 Vo(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function jo(e){try{if(!e.D)return e.h;e.D(e.h)}finally{nn(e)}}function Tr(e,t){e=dr(e),t.push(tn(e))}var X=class extends pe{constructor(e,t){super(new Oe(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,_(e=this.j=new ka,0,1,t=new z),this.I=new bs,_(this.j,0,2,this.I),this.aa=new X1,_(this.j,0,3,this.aa),this.s=new en,_(this.j,0,4,this.s),this.P=new pa,_(this.j,0,5,this.P),this.v=new wa,_(this.j,0,6,this.v),this.J=new Ra,_(this.j,0,7,this.J),v(this.s,2,.5),v(this.s,3,.3),v(this.P,2,.5),v(this.v,2,.5),v(this.v,3,.3),v(this.J,2,.5),v(this.I,2,.5)}get baseOptions(){return C(this.j,z,1)}set baseOptions(e){_(this.j,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&v(this.s,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&v(this.s,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&v(this.P,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&v(this.v,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&v(this.v,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&v(this.J,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&v(this.I,2,e.minHandLandmarksConfidence??.5),this.l(e)}F(e,t,r){let n=typeof t!="function"?t:{};return this.D=typeof t=="function"?t:r,Vo(this),Pe(this,e,n),jo(this)}G(e,t,r,n){let s=typeof r!="function"?r:{};return this.D=typeof r=="function"?r:n,Vo(this),Ke(this,e,s,t),jo(this)}m(){var e=new le;G(e,"input_frames_image"),L(e,"pose_landmarks"),L(e,"pose_world_landmarks"),L(e,"face_landmarks"),L(e,"left_hand_landmarks"),L(e,"left_hand_world_landmarks"),L(e,"right_hand_landmarks"),L(e,"right_hand_world_landmarks");let t=new xe,r=new mo;Rn(r,1,Nt("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(s,o){if(o!=null)if(Array.isArray(o))D(s,2,zr(o,hs,void 0,void 0,!1));else{if(!(typeof o=="string"||o instanceof Qe||ir(o)))throw Error("invalid value in Any.value field: "+o+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");Rn(s,2,ss(o,!1,!1),bt())}}(r,this.j.g());let n=new ce;Ae(n,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Br(n,8,mo,r),U(n,"IMAGE:input_frames_image"),k(n,"POSE_LANDMARKS:pose_landmarks"),k(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),k(n,"FACE_LANDMARKS:face_landmarks"),k(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),k(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),k(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),k(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.o(t),we(e,n),rn(this,e),this.g.attachProtoListener("pose_landmarks",(s,o)=>{Tr(s,this.h.poseLandmarks),p(this,o)}),this.g.attachEmptyPacketListener("pose_landmarks",s=>{p(this,s)}),this.g.attachProtoListener("pose_world_landmarks",(s,o)=>{var i=this.h.poseWorldLandmarks;s=kt(s),i.push(er(s)),p(this,o)}),this.g.attachEmptyPacketListener("pose_world_landmarks",s=>{p(this,s)}),this.outputPoseSegmentationMasks&&(k(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Mt(this,"pose_segmentation_mask"),this.g.W("pose_segmentation_mask",(s,o)=>{this.h.poseSegmentationMasks=[Pt(this,s,!0,!this.D)],p(this,o)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",s=>{this.h.poseSegmentationMasks=[],p(this,s)})),this.g.attachProtoListener("face_landmarks",(s,o)=>{Tr(s,this.h.faceLandmarks),p(this,o)}),this.g.attachEmptyPacketListener("face_landmarks",s=>{p(this,s)}),this.outputFaceBlendshapes&&(L(e,"extra_blendshapes"),k(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(s,o)=>{var i=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(s=Zr(s),i.push(Cs(s.g()??[]))),p(this,o)}),this.g.attachEmptyPacketListener("extra_blendshapes",s=>{p(this,s)})),this.g.attachProtoListener("left_hand_landmarks",(s,o)=>{Tr(s,this.h.leftHandLandmarks),p(this,o)}),this.g.attachEmptyPacketListener("left_hand_landmarks",s=>{p(this,s)}),this.g.attachProtoListener("left_hand_world_landmarks",(s,o)=>{var i=this.h.leftHandWorldLandmarks;s=kt(s),i.push(er(s)),p(this,o)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",s=>{p(this,s)}),this.g.attachProtoListener("right_hand_landmarks",(s,o)=>{Tr(s,this.h.rightHandLandmarks),p(this,o)}),this.g.attachEmptyPacketListener("right_hand_landmarks",s=>{p(this,s)}),this.g.attachProtoListener("right_hand_world_landmarks",(s,o)=>{var i=this.h.rightHandWorldLandmarks;s=kt(s),i.push(er(s)),p(this,o)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",s=>{p(this,s)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};X.prototype.detectForVideo=X.prototype.G,X.prototype.detect=X.prototype.F,X.prototype.setOptions=X.prototype.o,X.createFromModelPath=function(e,t){return w(X,e,{baseOptions:{modelAssetPath:t}})},X.createFromModelBuffer=function(e,t){return w(X,e,{baseOptions:{modelAssetBuffer:t}})},X.createFromOptions=function(e,t){return w(X,e,t)},X.HAND_CONNECTIONS=Ns,X.POSE_CONNECTIONS=Ya,X.FACE_LANDMARKS_LIPS=Is,X.FACE_LANDMARKS_LEFT_EYE=Os,X.FACE_LANDMARKS_LEFT_EYEBROW=Ps,X.FACE_LANDMARKS_LEFT_IRIS=Xa,X.FACE_LANDMARKS_RIGHT_EYE=Ds,X.FACE_LANDMARKS_RIGHT_EYEBROW=Us,X.FACE_LANDMARKS_RIGHT_IRIS=Wa,X.FACE_LANDMARKS_FACE_OVAL=Bs,X.FACE_LANDMARKS_CONTOURS=Ha,X.FACE_LANDMARKS_TESSELATION=za;var ke=class extends pe{constructor(e,t){super(new Oe(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},_(e=this.h=new Sa,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return _(this.h,0,2,Mn(e,C(this.h,Qr,2))),this.l(e)}ua(e,t){return this.j={classifications:[]},Pe(this,e,t),this.j}va(e,t,r){return this.j={classifications:[]},Ke(this,e,r,t),this.j}m(){var e=new le;G(e,"input_image"),G(e,"norm_rect"),L(e,"classifications");let t=new xe;De(t,H1,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),U(r,"IMAGE:input_image"),U(r,"NORM_RECT:norm_rect"),k(r,"CLASSIFICATIONS:classifications"),r.o(t),we(e,r),this.g.attachProtoListener("classifications",(n,s)=>{this.j=function(o){let i={classifications:tt(o,k1,1).map(a=>Cs(C(a,_s,4)?.g()??[],Xe(Fe(a,2)),Me(a,3)??""))};return Or(Ft(o,2))!=null&&(i.timestampMs=Xe(Or(Ft(o,2)))),i}(C1(n)),p(this,s)}),this.g.attachEmptyPacketListener("classifications",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ke.prototype.classifyForVideo=ke.prototype.va,ke.prototype.classify=ke.prototype.ua,ke.prototype.setOptions=ke.prototype.o,ke.createFromModelPath=function(e,t){return w(ke,e,{baseOptions:{modelAssetPath:t}})},ke.createFromModelBuffer=function(e,t){return w(ke,e,{baseOptions:{modelAssetBuffer:t}})},ke.createFromOptions=function(e,t){return w(ke,e,t)};var Ee=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect",!0),this.h=new Ca,this.embeddings={embeddings:[]},_(e=this.h,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){var t=this.h,r=C(this.h,yo,2);return r=r?r.clone():new yo,e.l2Normalize!==void 0?sr(r,1,e.l2Normalize):"l2Normalize"in e&&D(r,1),e.quantize!==void 0?sr(r,2,e.quantize):"quantize"in e&&D(r,2),_(t,0,2,r),this.l(e)}Ba(e,t){return Pe(this,e,t),this.embeddings}Ca(e,t,r){return Ke(this,e,r,t),this.embeddings}m(){var e=new le;G(e,"image_in"),G(e,"norm_rect"),L(e,"embeddings_out");let t=new xe;De(t,z1,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),U(r,"IMAGE:image_in"),U(r,"NORM_RECT:norm_rect"),k(r,"EMBEDDINGS:embeddings_out"),r.o(t),we(e,r),this.g.attachProtoListener("embeddings_out",(n,s)=>{n=I1(n),this.embeddings=function(o){return{embeddings:tt(o,L1,1).map(i=>{let a={headIndex:Xe(Fe(i,3))??-1,headName:Me(i,4)??""??""};if(Ai(i,Fn,pn(i,1))!==void 0)i=Rt(i=C(i,Fn,pn(i,1)),1,ht),a.floatEmbedding=i.slice();else{let c=new Uint8Array(0);a.quantizedEmbedding=C(i,F1,pn(i,2))?.qa()?.h()??c}return a}),timestampMs:Xe(Or(Ft(o,2)))}}(n),p(this,s)}),this.g.attachEmptyPacketListener("embeddings_out",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ee.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=Eo(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=Eo(_o(e.quantizedEmbedding),_o(t.quantizedEmbedding))}return e},Ee.prototype.embedForVideo=Ee.prototype.Ca,Ee.prototype.embed=Ee.prototype.Ba,Ee.prototype.setOptions=Ee.prototype.o,Ee.createFromModelPath=function(e,t){return w(Ee,e,{baseOptions:{modelAssetPath:t}})},Ee.createFromModelBuffer=function(e,t){return w(Ee,e,{baseOptions:{modelAssetBuffer:t}})},Ee.createFromOptions=function(e,t){return w(Ee,e,t)};var Un=class{constructor(e,t,r){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=r}close(){this.confidenceMasks?.forEach(e=>{e.close()}),this.categoryMask?.close()}};function Xo(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function Wo(e){try{let t=new Un(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{nn(e)}}Un.prototype.close=Un.prototype.close;var ae=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ks,this.v=new Fa,_(this.h,0,3,this.v),_(e=this.h,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?D(this.h,2,Nt(e.displayNamesLocale)):"displayNamesLocale"in e&&D(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}K(){(function(e){let t=tt(e.fa(),ce,1).filter(r=>(Me(r,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(e.s=[],1<t.length)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");t.length===1&&(C(t[0],xe,7)?.l()?.g()??new Map).forEach((r,n)=>{e.s[Number(n)]=Me(r,1)??""})})(this)}ga(e,t,r){let n=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:r,Xo(this),Pe(this,e,n),Wo(this)}Na(e,t,r,n){let s=typeof r!="function"?r:{};return this.j=typeof r=="function"?r:n,Xo(this),Ke(this,e,s,t),Wo(this)}Fa(){return this.s}m(){var e=new le;G(e,"image_in"),G(e,"norm_rect");let t=new xe;De(t,Ma,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),U(r,"IMAGE:image_in"),U(r,"NORM_RECT:norm_rect"),r.o(t),we(e,r),rn(this,e),this.outputConfidenceMasks&&(L(e,"confidence_masks"),k(r,"CONFIDENCE_MASKS:confidence_masks"),Mt(this,"confidence_masks"),this.g.da("confidence_masks",(n,s)=>{this.confidenceMasks=n.map(o=>Pt(this,o,!0,!this.j)),p(this,s)}),this.g.attachEmptyPacketListener("confidence_masks",n=>{this.confidenceMasks=[],p(this,n)})),this.outputCategoryMask&&(L(e,"category_mask"),k(r,"CATEGORY_MASK:category_mask"),Mt(this,"category_mask"),this.g.W("category_mask",(n,s)=>{this.categoryMask=Pt(this,n,!1,!this.j),p(this,s)}),this.g.attachEmptyPacketListener("category_mask",n=>{this.categoryMask=void 0,p(this,n)})),L(e,"quality_scores"),k(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(n,s)=>{this.qualityScores=n,p(this,s)}),this.g.attachEmptyPacketListener("quality_scores",n=>{this.categoryMask=void 0,p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ae.prototype.getLabels=ae.prototype.Fa,ae.prototype.segmentForVideo=ae.prototype.Na,ae.prototype.segment=ae.prototype.ga,ae.prototype.setOptions=ae.prototype.o,ae.createFromModelPath=function(e,t){return w(ae,e,{baseOptions:{modelAssetPath:t}})},ae.createFromModelBuffer=function(e,t){return w(ae,e,{baseOptions:{modelAssetBuffer:t}})},ae.createFromOptions=function(e,t){return w(ae,e,t)};var Bn=class{constructor(e,t,r){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=r}close(){this.confidenceMasks?.forEach(e=>{e.close()}),this.categoryMask?.close()}};Bn.prototype.close=Bn.prototype.close;var rc=class extends y{constructor(e){super(e)}},Dt=[0,q,-2],nc=[0,et,-3,te],an=[0,et,-3,te,et,-1],Ka=[0,an],sc=[0,Ka,Dt],oc=[0,an,Dt],$a=[0,an,q,-1],ic=[0,$a,Dt],ac=[0,et,-3,te,Dt,-1],cc=[0,et,-3,te,He],yn=class extends y{constructor(e){super(e)}},Ho=[0,et,-1,te],qa=class extends y{constructor(){super()}};qa.A=[1];var zo=class extends y{constructor(e){super(e)}},Nn=[1,2,3,4,5,6,7,8,9,10,14,15],uc=[0,Nn,W,an,W,oc,W,Ka,W,sc,W,Ho,W,cc,W,nc,W,[0,V,et,-2,te,q,te,-1,2,et,Dt],W,$a,W,ic,et,Dt,V,W,ac,W,[0,ne,Ho]],hc=[0,V,q,-1,te],Gn=class extends y{constructor(){super()}};Gn.A=[1],Gn.prototype.g=Jr([0,ne,uc,V,hc]);var Ge=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ks,this.s=new Fa,_(this.h,0,3,this.s),_(e=this.h,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}ga(e,t,r,n){let s=typeof r!="function"?r:{};this.j=typeof r=="function"?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.C+1,n=new Gn;let o=new zo;var i=new rc;if(We(i,1,255),_(o,0,12,i),t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var a=new yn;sr(a,3,!0),v(a,1,t.keypoint.x),v(a,2,t.keypoint.y),qt(o,5,Nn,a)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(i=new qa,t.scribble))sr(t=new yn,3,!0),v(t,1,a.x),v(t,2,a.y),Br(i,1,yn,t);qt(o,15,Nn,i)}Br(n,1,zo,o),this.g.addProtoToStream(n.g(),"drishti.RenderData","roi_in",r),Pe(this,e,s);e:{try{let u=new Bn(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=u;break e}this.j(u)}finally{nn(this)}c=void 0}return c}m(){var e=new le;G(e,"image_in"),G(e,"roi_in"),G(e,"norm_rect_in");let t=new xe;De(t,Ma,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),U(r,"IMAGE:image_in"),U(r,"ROI:roi_in"),U(r,"NORM_RECT:norm_rect_in"),r.o(t),we(e,r),rn(this,e),this.outputConfidenceMasks&&(L(e,"confidence_masks"),k(r,"CONFIDENCE_MASKS:confidence_masks"),Mt(this,"confidence_masks"),this.g.da("confidence_masks",(n,s)=>{this.confidenceMasks=n.map(o=>Pt(this,o,!0,!this.j)),p(this,s)}),this.g.attachEmptyPacketListener("confidence_masks",n=>{this.confidenceMasks=[],p(this,n)})),this.outputCategoryMask&&(L(e,"category_mask"),k(r,"CATEGORY_MASK:category_mask"),Mt(this,"category_mask"),this.g.W("category_mask",(n,s)=>{this.categoryMask=Pt(this,n,!1,!this.j),p(this,s)}),this.g.attachEmptyPacketListener("category_mask",n=>{this.categoryMask=void 0,p(this,n)})),L(e,"quality_scores"),k(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(n,s)=>{this.qualityScores=n,p(this,s)}),this.g.attachEmptyPacketListener("quality_scores",n=>{this.categoryMask=void 0,p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ge.prototype.segment=Ge.prototype.ga,Ge.prototype.setOptions=Ge.prototype.o,Ge.createFromModelPath=function(e,t){return w(Ge,e,{baseOptions:{modelAssetPath:t}})},Ge.createFromModelBuffer=function(e,t){return w(Ge,e,{baseOptions:{modelAssetBuffer:t}})},Ge.createFromOptions=function(e,t){return w(Ge,e,t)};var Se=class extends pe{constructor(e,t){super(new Oe(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},_(e=this.h=new Ss,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?D(this.h,2,Nt(e.displayNamesLocale)):"displayNamesLocale"in e&&D(this.h,2),e.maxResults!==void 0?We(this.h,3,e.maxResults):"maxResults"in e&&D(this.h,3),e.scoreThreshold!==void 0?v(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&D(this.h,4),e.categoryAllowlist!==void 0?Ur(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&D(this.h,5),e.categoryDenylist!==void 0?Ur(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&D(this.h,6),this.l(e)}F(e,t){return this.j={detections:[]},Pe(this,e,t),this.j}G(e,t,r){return this.j={detections:[]},Ke(this,e,r,t),this.j}m(){var e=new le;G(e,"input_frame_gpu"),G(e,"norm_rect"),L(e,"detections");let t=new xe;De(t,K1,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.ObjectDetectorGraph"),U(r,"IMAGE:input_frame_gpu"),U(r,"NORM_RECT:norm_rect"),k(r,"DETECTIONS:detections"),r.o(t),we(e,r),this.g.attachProtoVectorListener("detections",(n,s)=>{for(let o of n)n=Qi(o),this.j.detections.push(Oa(n));p(this,s)}),this.g.attachEmptyPacketListener("detections",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Se.prototype.detectForVideo=Se.prototype.G,Se.prototype.detect=Se.prototype.F,Se.prototype.setOptions=Se.prototype.o,Se.createFromModelPath=async function(e,t){return w(Se,e,{baseOptions:{modelAssetPath:t}})},Se.createFromModelBuffer=function(e,t){return w(Se,e,{baseOptions:{modelAssetBuffer:t}})},Se.createFromOptions=function(e,t){return w(Se,e,t)};var Vn=class{constructor(e,t,r){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=r}close(){this.segmentationMasks?.forEach(e=>{e.close()})}};function Yo(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function Ko(e){try{let t=new Vn(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.s)return t;e.s(t)}finally{nn(e)}}Vn.prototype.close=Vn.prototype.close;var Te=class extends pe{constructor(e,t){super(new Oe(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,_(e=this.h=new Ia,0,1,t=new z),this.v=new Ra,_(this.h,0,3,this.v),this.j=new wa,_(this.h,0,2,this.j),We(this.j,4,1),v(this.j,2,.5),v(this.v,2,.5),v(this.h,4,.5)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numPoses"in e&&We(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&v(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&v(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&v(this.v,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}F(e,t,r){let n=typeof t!="function"?t:{};return this.s=typeof t=="function"?t:r,Yo(this),Pe(this,e,n),Ko(this)}G(e,t,r,n){let s=typeof r!="function"?r:{};return this.s=typeof r=="function"?r:n,Yo(this),Ke(this,e,s,t),Ko(this)}m(){var e=new le;G(e,"image_in"),G(e,"norm_rect"),L(e,"normalized_landmarks"),L(e,"world_landmarks"),L(e,"segmentation_masks");let t=new xe;De(t,$1,this.h);let r=new ce;Ae(r,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),U(r,"IMAGE:image_in"),U(r,"NORM_RECT:norm_rect"),k(r,"NORM_LANDMARKS:normalized_landmarks"),k(r,"WORLD_LANDMARKS:world_landmarks"),r.o(t),we(e,r),rn(this,e),this.g.attachProtoVectorListener("normalized_landmarks",(n,s)=>{this.landmarks=[];for(let o of n)n=dr(o),this.landmarks.push(tn(n));p(this,s)}),this.g.attachEmptyPacketListener("normalized_landmarks",n=>{this.landmarks=[],p(this,n)}),this.g.attachProtoVectorListener("world_landmarks",(n,s)=>{this.worldLandmarks=[];for(let o of n)n=kt(o),this.worldLandmarks.push(er(n));p(this,s)}),this.g.attachEmptyPacketListener("world_landmarks",n=>{this.worldLandmarks=[],p(this,n)}),this.outputSegmentationMasks&&(k(r,"SEGMENTATION_MASK:segmentation_masks"),Mt(this,"segmentation_masks"),this.g.da("segmentation_masks",(n,s)=>{this.segmentationMasks=n.map(o=>Pt(this,o,!0,!this.s)),p(this,s)}),this.g.attachEmptyPacketListener("segmentation_masks",n=>{this.segmentationMasks=[],p(this,n)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Te.prototype.detectForVideo=Te.prototype.G,Te.prototype.detect=Te.prototype.F,Te.prototype.setOptions=Te.prototype.o,Te.createFromModelPath=function(e,t){return w(Te,e,{baseOptions:{modelAssetPath:t}})},Te.createFromModelBuffer=function(e,t){return w(Te,e,{baseOptions:{modelAssetBuffer:t}})},Te.createFromOptions=function(e,t){return w(Te,e,t)},Te.POSE_CONNECTIONS=Ya;var $e={New:"new",Error:"Error",Opened:"opened",Opening:"opening",Processing:"processing",Idle:"idle",Closing:"closing",Closed:"closed",Destroying:"destroying",Destroyed:"destroyed"},Ja={None:"none",Blur:"blur",Overlay:"overlay"};var ye=(e,t="AssertError")=>{if(e==null)throw new Error(t,{cause:e});return e};var Za=e=>{let t=new Set(Object.keys(e));return r=>{for(let n in r)t.has(n)&&typeof e[n]==typeof r[n]&&(e[n]=r[n])}},Qa=e=>{let t=new Map(e),r=new Set,n=async i=>{let c=await(await fetch(i)).blob();return await createImageBitmap(c)},s=async i=>{let a=t.get(i);if(!a){if(r.has(i))return null;r.add(i);let c=await n(i);return t.set(i,c),r.delete(i),c}return a},o=i=>(t.get(i)?.close(),t.delete(i));return{tryFetchingImage:s,setImage:(i,a)=>{t.has(i)&&o(i),t.set(i,a)},getImage:i=>t.get(i)??null,removeImage:o,clear:()=>{t.forEach(i=>i.close()),t.clear()}}},e2=(e,t)=>r=>Math.min(Math.max(r,e),t);var t2=(e,t,r,n)=>{if(!e||!t||!r||!n||e*n===r*t)return{sx:0,sy:0,sw:e,sh:t,dx:0,dy:0,dw:r,dh:n};let s=e/t,o=r/n;if(s>o){let u=Math.ceil(e*o)/s,f=Math.abs(e-u);return{sx:Math.ceil(f/2),sy:0,sw:u,sh:t,dx:0,dy:0,dw:r,dh:n}}let i=Math.ceil(t*s)/o,a=Math.abs(t-i);return{sx:0,sy:Math.ceil(a/2),sw:e,sh:i,dx:0,dy:0,dw:r,dh:n}};var ft=(e,t)=>{let r=e.getContext("2d",t);if(!r)throw new Error("Cannot get CanvasRenderingContext2D");return r},lc=e=>{let t=ft(e);t.scale(-1,1),t.translate(-e.width,0)},Gs=e=>"VideoFrame"in globalThis&&e instanceof VideoFrame?{height:e.displayHeight,width:e.displayWidth}:"offsetHeight"in e&&typeof e.offsetHeight=="number"&&e.offsetHeight!==0&&"offsetWidth"in e&&typeof e.offsetWidth=="number"&&e.offsetWidth!==0?{height:e.offsetHeight,width:e.offsetWidth}:"videoHeight"in e&&typeof e.videoHeight=="number"&&e.videoHeight!==0&&"videoWidth"in e&&typeof e.videoWidth=="number"&&e.videoWidth!==0?{height:e.videoHeight,width:e.videoWidth}:"height"in e&&e.height!==0&&"width"in e&&e.width!==0?{height:e.height,width:e.width}:{height:0,width:0},mr=(e,t)=>new OffscreenCanvas(e,t);var fc=e=>{ft(e).clearRect(0,0,e.width,e.height)},r2=(e,t)=>{let r={downScaleFactor:3},n=d=>{let l=r[d];if(!l){let g=mr(d==="downScaledCanvas"?Math.trunc(e/r.downScaleFactor):e,d==="downScaledCanvas"?Math.trunc(t/r.downScaleFactor):t);return r[d]=g,g}return l},s=(d,l)=>{let g=n(l);return ft(g).putImageData(d,0,0),g},o=(d,l,g,S,R,M,P,F,j,Q)=>{let mt=l instanceof ImageData?s(l,"drawImageDataCanvas"):l;R===void 0||M===void 0?d.drawImage(mt,g,S):P===void 0||F===void 0||j===void 0||Q===void 0?d.drawImage(mt,g,S,R,M):d.drawImage(mt,g,S,R,M,P,F,j,Q)},i=(d,l,g=e,S=t,R={})=>{let{height:M,width:P}=Gs(d),F=t2(P,M,g,S),j=ft(l,R);o(j,d,F.sx,F.sy,F.sw,F.sh,F.dx,F.dy,F.dw,F.dh)},a=(d,l)=>{let g=n(l);return i(d,g),g},c=(d,l,g)=>{d.globalCompositeOperation=g,o(d,l,0,0)},u=(d,l,g)=>{let S=ft(d),R=0,M=5,P=1/(2*Math.PI*M*M),F=g<3?1:2;for(let j=-g;j<=g;j+=F)for(let Q=-g;Q<=g;Q+=F){let mt=P*Math.exp(-(Q*Q+j*j)/(2*M*M));R+=mt}for(let j=-g;j<=g;j+=F)for(let Q=-g;Q<=g;Q+=F)S.globalAlpha=P*Math.exp(-(Q*Q+j*j)/(2*M*M))/R*g,o(S,l,Q,j);S.globalAlpha=1},f=({image:d,blurAmount:l,canvas:g,preserveOldDrawing:S=!0})=>{let{height:R,width:M}=Gs(d),P=ft(g);if(l<=0)return o(P,d,0,0,M,R);let F=n("downScaledCanvas"),j=ft(F);S||(j.clearRect(0,0,F.width,F.height),P.clearRect(0,0,M,R)),"filter"in P?(j.filter=`blur(${l}px)`,o(j,d,0,0,M,R,0,0,F.width,F.height),o(P,F,0,0,M,R)):u(g,d,l)},h=({image:d,blurAmount:l,offscreenCanvasName:g,preserveOldDrawing:S})=>{let R=n(g);return fc(R),l===0?i(d,R):f({image:d,blurAmount:l,canvas:R,preserveOldDrawing:S}),R},m=(d,l,g)=>{let S=Array.isArray(d)?d[0]?.canvas:d.canvas;if(!S)return n("maskCanvas");let R=h({image:S,offscreenCanvasName:"maskCanvas",blurAmount:0});return g===0?R:h({image:R,blurAmount:g,offscreenCanvasName:"blurredMaskCanvas",preserveOldDrawing:!1})},b=(d,l,g,S,R=.5,M=3,P=3,F=!1)=>{let j=h({image:g,blurAmount:M,offscreenCanvasName:"blurredCanvas"}),Q=ft(d);if(Array.isArray(S)&&S.length===0)return o(Q,j,0,0);let mt=m(S,R,P);Q.save(),F&&lc(d);let{height:d2,width:p2}=Gs(l);o(Q,l,0,0,p2,d2),c(Q,mt,"destination-in"),c(Q,j,"destination-over"),Q.restore()};return{evaluateInput:d=>a(d,"inputCanvas"),renderImageToCanvas:i,drawBlurEffect:(d,l,g,S=.5,R=3,M=3,P=!1)=>b(d,l,l,g,S,R,M,P),drawOverlayEffect:(d,l,g,S,R=.5,M=0,P=3,F=!1)=>b(d,l,g,S,R,M,P,F),renderImageToOffScreenCanvas:a,renderImageDataToOffScreenCanvas:s,drawAndBlurImageOnOffScreenCanvas:h}};var cn={VertexShader:WebGLRenderingContext.VERTEX_SHADER,FragmentShader:WebGLRenderingContext.FRAGMENT_SHADER},Vs={[cn.VertexShader]:"VertexShader",[cn.FragmentShader]:"FragmentShader"},dc=e=>typeof e=="string"?e.startsWith("#version 300 es"):!1,n2=e=>{if(!dc(e))throw new Error("Expecting GLSL ES 3.00 shader source")},pc=/ERROR:\s*\d+:(\d+)/gi;function i2(e,t="",r=0){let n=[...t.matchAll(pc)],s=new Map(n.map((o,i)=>{if(!o[1]||o.index===void 0)return[0,t];let a=parseInt(o[1],10),c=n[i+1],u=c?c.index:t.length,f=t.substring(o.index,u);return[a-1,f]}));return e.split(`
|
|
42
|
-
`).map((
|
|
41
|
+
`}D(){let e=this.g;e.activeTexture(e.TEXTURE1),this.j=ft(this,e),e.activeTexture(e.TEXTURE2),this.C=ft(this,e)}m(){super.m();let e=this.g;this.L=he(e.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.M=he(e.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.I=he(e.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();let e=this.g;e.uniform1i(this.I,0),e.uniform1i(this.L,1),e.uniform1i(this.M,2)}close(){this.j&&this.g.deleteTexture(this.j),this.C&&this.g.deleteTexture(this.C),super.close()}};function Ze(e,t){switch(t){case 0:return e.g.find(r=>r instanceof Uint8Array);case 1:return e.g.find(r=>r instanceof Float32Array);case 2:return e.g.find(r=>typeof WebGLTexture<"u"&&r instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function Vn(e){var t=Ze(e,1);if(!t){if(t=Ze(e,0))t=new Float32Array(t).map(n=>n/255);else{t=new Float32Array(e.width*e.height);let n=Pt(e);var r=Bo(e);if(hn(r,n,za(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in self.document){r=new Float32Array(e.width*e.height*4),n.readPixels(0,0,e.width,e.height,n.RGBA,n.FLOAT,r);for(let o=0,s=0;o<t.length;++o,s+=4)t[o]=r[s]}else n.readPixels(0,0,e.width,e.height,n.RED,n.FLOAT,t)}e.g.push(t)}return t}function za(e){let t=Ze(e,2);if(!t){let r=Pt(e);t=Ka(e);let n=Vn(e),o=Ya(e);r.texImage2D(r.TEXTURE_2D,0,o,e.width,e.height,0,r.RED,r.FLOAT,n),jn(e)}return t}function Pt(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=he(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function Ya(e){if(e=Pt(e),!br)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))br=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");br=e.R16F}return br}function Bo(e){return e.l||(e.l=new Ht),e.l}function Ka(e){let t=Pt(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let r=Ze(e,2);return r||(r=ft(Bo(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(r),e.j=!0),t.bindTexture(t.TEXTURE_2D,r),r}function jn(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var br,ne=class{constructor(e,t,r,n,o,s,i){this.g=e,this.m=t,this.j=r,this.canvas=n,this.l=o,this.width=s,this.height=i,this.j&&--Os===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Ha(){return!!Ze(this,0)}la(){return!!Ze(this,1)}R(){return!!Ze(this,2)}ka(){return(t=Ze(e=this,0))||(t=Vn(e),t=new Uint8Array(t.map(r=>255*r)),e.g.push(t)),t;var e,t}ja(){return Vn(this)}O(){return za(this)}clone(){let e=[];for(let t of this.g){let r;if(t instanceof Uint8Array)r=new Uint8Array(t);else if(t instanceof Float32Array)r=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{let n=Pt(this),o=Bo(this);n.activeTexture(n.TEXTURE1),r=ft(o,n,this.m?n.LINEAR:n.NEAREST),n.bindTexture(n.TEXTURE_2D,r);let s=Ya(this);n.texImage2D(n.TEXTURE_2D,0,s,this.width,this.height,0,n.RED,n.FLOAT,null),n.bindTexture(n.TEXTURE_2D,null),hn(o,n,r),yr(o,n,!1,()=>{Ka(this),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_FAN,0,4),jn(this)}),Do(o),jn(this)}}e.push(r)}return new ne(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Pt(this).deleteTexture(Ze(this,2)),Os=-1}};ne.prototype.close=ne.prototype.close,ne.prototype.clone=ne.prototype.clone,ne.prototype.getAsWebGLTexture=ne.prototype.O,ne.prototype.getAsFloat32Array=ne.prototype.ja,ne.prototype.getAsUint8Array=ne.prototype.ka,ne.prototype.hasWebGLTexture=ne.prototype.R,ne.prototype.hasFloat32Array=ne.prototype.la,ne.prototype.hasUint8Array=ne.prototype.Ha;var Os=250,uc={color:"white",lineWidth:4,radius:6};function xn(e){return{...uc,fillColor:(e=e||{}).color,...e}}function Je(e,t){return e instanceof Function?e(t):e}function Ps(e,t,r){return Math.max(Math.min(t,r),Math.min(Math.max(t,r),e))}function Kt(e){if(!e.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return e.l}function ar(e){if(!e.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return e.j}function Us(e,t,r){if(t.R())r(t.O());else{let n=t.la()?t.ja():t.ka();e.m=e.m??new Ht;let o=ar(e);r((e=new ne([n],t.m,!1,o.canvas,e.m,t.width,t.height)).O()),e.close()}}function Ds(e,t,r,n){let o=function(a){return a.g||(a.g=new ac),a.g}(e),s=ar(e),i=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;yr(o,s,!0,()=>{(function(c,u,h,f){let m=c.g;if(m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,u),m.activeTexture(m.TEXTURE1),m.bindTexture(m.TEXTURE_2D,c.C),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,h),c.I&&function(b,A){if(b!==A)return!1;b=b.entries(),A=A.entries();for(let[N,d]of b){b=N;let l=d;var x=A.next();if(x.done)return!1;let[v,k]=x.value;if(x=k,b!==v||l[0]!==x[0]||l[1]!==x[1]||l[2]!==x[2]||l[3]!==x[3])return!1}return!!A.next().done}(c.I,f))m.activeTexture(m.TEXTURE2),m.bindTexture(m.TEXTURE_2D,c.j);else{c.I=f;let b=Array(1024).fill(0);f.forEach((A,x)=>{if(A.length!==4)throw Error(`Color at index ${x} is not a four-channel value.`);b[4*x]=A[0],b[4*x+1]=A[1],b[4*x+2]=A[2],b[4*x+3]=A[3]}),m.activeTexture(m.TEXTURE2),m.bindTexture(m.TEXTURE_2D,c.j),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,256,1,0,m.RGBA,m.UNSIGNED_BYTE,new Uint8Array(b))}})(o,t,i,n),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);let a=o.g;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,null),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,null),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,null)})}function Bs(e,t,r,n){let o=ar(e),s=function(c){return c.h||(c.h=new cc),c.h}(e),i=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r,a=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;yr(s,o,!0,()=>{var c=s.g;c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,t),c.activeTexture(c.TEXTURE1),c.bindTexture(c.TEXTURE_2D,s.j),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,i),c.activeTexture(c.TEXTURE2),c.bindTexture(c.TEXTURE_2D,s.C),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,a),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.drawArrays(o.TRIANGLE_FAN,0,4),o.bindTexture(o.TEXTURE_2D,null),(c=s.g).activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,null),c.activeTexture(c.TEXTURE1),c.bindTexture(c.TEXTURE_2D,null),c.activeTexture(c.TEXTURE2),c.bindTexture(c.TEXTURE_2D,null)})}var de=class{constructor(e,t){e instanceof CanvasRenderingContext2D||e instanceof OffscreenCanvasRenderingContext2D?(this.l=e,this.j=t):this.j=e}Aa(e,t){if(e){var r=Kt(this);t=xn(t),r.save();var n=r.canvas,o=0;for(let s of e)r.fillStyle=Je(t.fillColor,{index:o,from:s}),r.strokeStyle=Je(t.color,{index:o,from:s}),r.lineWidth=Je(t.lineWidth,{index:o,from:s}),(e=new Path2D).arc(s.x*n.width,s.y*n.height,Je(t.radius,{index:o,from:s}),0,2*Math.PI),r.fill(e),r.stroke(e),++o;r.restore()}}za(e,t,r){if(e&&t){var n=Kt(this);r=xn(r),n.save();var o=n.canvas,s=0;for(let i of t){n.beginPath(),t=e[i.start];let a=e[i.end];t&&a&&(n.strokeStyle=Je(r.color,{index:s,from:t,to:a}),n.lineWidth=Je(r.lineWidth,{index:s,from:t,to:a}),n.moveTo(t.x*o.width,t.y*o.height),n.lineTo(a.x*o.width,a.y*o.height)),++s,n.stroke()}n.restore()}}wa(e,t){let r=Kt(this);t=xn(t),r.save(),r.beginPath(),r.lineWidth=Je(t.lineWidth,{}),r.strokeStyle=Je(t.color,{}),r.fillStyle=Je(t.fillColor,{}),r.moveTo(e.originX,e.originY),r.lineTo(e.originX+e.width,e.originY),r.lineTo(e.originX+e.width,e.originY+e.height),r.lineTo(e.originX,e.originY+e.height),r.lineTo(e.originX,e.originY),r.stroke(),r.fill(),r.restore()}xa(e,t,r=[0,0,0,255]){this.l?function(n,o,s,i){let a=ar(n);Us(n,o,c=>{Ds(n,c,s,i),(c=Kt(n)).drawImage(a.canvas,0,0,c.canvas.width,c.canvas.height)})}(this,e,r,t):Ds(this,e.O(),r,t)}ya(e,t,r){this.l?function(n,o,s,i){let a=ar(n);Us(n,o,c=>{Bs(n,c,s,i),(c=Kt(n)).drawImage(a.canvas,0,0,c.canvas.width,c.canvas.height)})}(this,e,t,r):Bs(this,e.O(),t,r)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function je(e,t){switch(t){case 0:return e.g.find(r=>r instanceof ImageData);case 1:return e.g.find(r=>typeof ImageBitmap<"u"&&r instanceof ImageBitmap);case 2:return e.g.find(r=>typeof WebGLTexture<"u"&&r instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function $a(e){var t=je(e,0);if(!t){t=Ut(e);let r=ln(e),n=new Uint8Array(e.width*e.height*4);hn(r,t,Fr(e)),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,n),Do(r),t=new ImageData(new Uint8ClampedArray(n.buffer),e.width,e.height),e.g.push(t)}return t}function Fr(e){let t=je(e,2);if(!t){let r=Ut(e);t=Lr(e);let n=je(e,1)||$a(e);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),qt(e)}return t}function Ut(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");return e.h||(e.h=he(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function ln(e){return e.l||(e.l=new Ht),e.l}function Lr(e){let t=Ut(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let r=je(e,2);return r||(r=ft(ln(e),t),e.g.push(r),e.m=!0),t.bindTexture(t.TEXTURE_2D,r),r}function qt(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}function Ns(e){let t=Ut(e);return yr(ln(e),t,!0,()=>function(r,n){let o=r.canvas;if(o.width===r.width&&o.height===r.height)return n();let s=o.width,i=o.height;return o.width=r.width,o.height=r.height,r=n(),o.width=s,o.height=i,r}(e,()=>{if(t.bindFramebuffer(t.FRAMEBUFFER,null),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),!(e.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return e.canvas.transferToImageBitmap()}))}de.prototype.close=de.prototype.close,de.prototype.drawConfidenceMask=de.prototype.ya,de.prototype.drawCategoryMask=de.prototype.xa,de.prototype.drawBoundingBox=de.prototype.wa,de.prototype.drawConnectors=de.prototype.za,de.prototype.drawLandmarks=de.prototype.Aa,de.lerp=function(e,t,r,n,o){return Ps(n*(1-(e-t)/(r-t))+o*(1-(r-e)/(r-t)),n,o)},de.clamp=Ps;var se=class{constructor(e,t,r,n,o,s,i){this.g=e,this.j=t,this.m=r,this.canvas=n,this.l=o,this.width=s,this.height=i,(this.j||this.m)&&--Gs===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ga(){return!!je(this,0)}ma(){return!!je(this,1)}R(){return!!je(this,2)}Ea(){return $a(this)}Da(){var e=je(this,1);return e||(Fr(this),Lr(this),e=Ns(this),qt(this),this.g.push(e),this.j=!0),e}O(){return Fr(this)}clone(){let e=[];for(let t of this.g){let r;if(t instanceof ImageData)r=new ImageData(t.data,this.width,this.height);else if(t instanceof WebGLTexture){let n=Ut(this),o=ln(this);n.activeTexture(n.TEXTURE1),r=ft(o,n),n.bindTexture(n.TEXTURE_2D,r),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,this.width,this.height,0,n.RGBA,n.UNSIGNED_BYTE,null),n.bindTexture(n.TEXTURE_2D,null),hn(o,n,r),yr(o,n,!1,()=>{Lr(this),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_FAN,0,4),qt(this)}),Do(o),qt(this)}else{if(!(t instanceof ImageBitmap))throw Error(`Type is not supported: ${t}`);Fr(this),Lr(this),r=Ns(this),qt(this)}e.push(r)}return new se(e,this.ma(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&je(this,1).close(),this.m&&Ut(this).deleteTexture(je(this,2)),Gs=-1}};se.prototype.close=se.prototype.close,se.prototype.clone=se.prototype.clone,se.prototype.getAsWebGLTexture=se.prototype.O,se.prototype.getAsImageBitmap=se.prototype.Da,se.prototype.getAsImageData=se.prototype.Ea,se.prototype.hasWebGLTexture=se.prototype.R,se.prototype.hasImageBitmap=se.prototype.ma,se.prototype.hasImageData=se.prototype.Ga;var Gs=250;function Be(...e){return e.map(([t,r])=>({start:t,end:r}))}var hc=function(e){return class extends e{Ma(){this.i._registerModelResourcesGraphService()}}}((Vs=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:Xa()?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(e){let t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){let r=e.length,n=this.i._malloc(r);this.i.HEAPU8.set(e,n),t?this.i._changeBinaryGraph(r,n):this.i._changeTextGraph(r,n),this.i._free(n)}configureAudio(e,t,r,n,o){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),_(this,n||"input_audio",s=>{_(this,o=o||"audio_header",i=>{this.i._configureAudio(s,i,e,t,r)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}fa(e){Ne(this,"__graph_config__",t=>{e(t)}),_(this,"__graph_config__",t=>{this.i._getGraphConfig(t,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,r){this.addAudioToStreamWithShape(e,0,0,t,r)}addAudioToStreamWithShape(e,t,r,n,o){let s=4*e.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(e,this.g/4),_(this,n,i=>{this.i._addAudioToInputStream(this.g,t,r,i,o)})}addGpuBufferToStream(e,t,r){_(this,t,n=>{let[o,s]=Cs(this,e,n);this.i._addBoundTextureToStream(n,o,s,r)})}addBoolToStream(e,t,r){_(this,t,n=>{this.i._addBoolToInputStream(e,n,r)})}addDoubleToStream(e,t,r){_(this,t,n=>{this.i._addDoubleToInputStream(e,n,r)})}addFloatToStream(e,t,r){_(this,t,n=>{this.i._addFloatToInputStream(e,n,r)})}addIntToStream(e,t,r){_(this,t,n=>{this.i._addIntToInputStream(e,n,r)})}addUintToStream(e,t,r){_(this,t,n=>{this.i._addUintToInputStream(e,n,r)})}addStringToStream(e,t,r){_(this,t,n=>{_(this,e,o=>{this.i._addStringToInputStream(o,n,r)})})}addStringRecordToStream(e,t,r){_(this,t,n=>{Fs(this,Object.keys(e),o=>{Fs(this,Object.values(e),s=>{this.i._addFlatHashMapToInputStream(o,s,Object.keys(e).length,n,r)})})})}addProtoToStream(e,t,r,n){_(this,r,o=>{_(this,t,s=>{let i=this.i._malloc(e.length);this.i.HEAPU8.set(e,i),this.i._addProtoToInputStream(i,e.length,s,o,n),this.i._free(i)})})}addEmptyPacketToStream(e,t){_(this,e,r=>{this.i._addEmptyPacketToInputStream(r,t)})}addBoolVectorToStream(e,t,r){_(this,t,n=>{let o=this.i._allocateBoolVector(e.length);if(!o)throw Error("Unable to allocate new bool vector on heap.");for(let s of e)this.i._addBoolVectorEntry(o,s);this.i._addBoolVectorToInputStream(o,n,r)})}addDoubleVectorToStream(e,t,r){_(this,t,n=>{let o=this.i._allocateDoubleVector(e.length);if(!o)throw Error("Unable to allocate new double vector on heap.");for(let s of e)this.i._addDoubleVectorEntry(o,s);this.i._addDoubleVectorToInputStream(o,n,r)})}addFloatVectorToStream(e,t,r){_(this,t,n=>{let o=this.i._allocateFloatVector(e.length);if(!o)throw Error("Unable to allocate new float vector on heap.");for(let s of e)this.i._addFloatVectorEntry(o,s);this.i._addFloatVectorToInputStream(o,n,r)})}addIntVectorToStream(e,t,r){_(this,t,n=>{let o=this.i._allocateIntVector(e.length);if(!o)throw Error("Unable to allocate new int vector on heap.");for(let s of e)this.i._addIntVectorEntry(o,s);this.i._addIntVectorToInputStream(o,n,r)})}addUintVectorToStream(e,t,r){_(this,t,n=>{let o=this.i._allocateUintVector(e.length);if(!o)throw Error("Unable to allocate new unsigned int vector on heap.");for(let s of e)this.i._addUintVectorEntry(o,s);this.i._addUintVectorToInputStream(o,n,r)})}addStringVectorToStream(e,t,r){_(this,t,n=>{let o=this.i._allocateStringVector(e.length);if(!o)throw Error("Unable to allocate new string vector on heap.");for(let s of e)_(this,s,i=>{this.i._addStringVectorEntry(o,i)});this.i._addStringVectorToInputStream(o,n,r)})}addBoolToInputSidePacket(e,t){_(this,t,r=>{this.i._addBoolToInputSidePacket(e,r)})}addDoubleToInputSidePacket(e,t){_(this,t,r=>{this.i._addDoubleToInputSidePacket(e,r)})}addFloatToInputSidePacket(e,t){_(this,t,r=>{this.i._addFloatToInputSidePacket(e,r)})}addIntToInputSidePacket(e,t){_(this,t,r=>{this.i._addIntToInputSidePacket(e,r)})}addUintToInputSidePacket(e,t){_(this,t,r=>{this.i._addUintToInputSidePacket(e,r)})}addStringToInputSidePacket(e,t){_(this,t,r=>{_(this,e,n=>{this.i._addStringToInputSidePacket(n,r)})})}addProtoToInputSidePacket(e,t,r){_(this,r,n=>{_(this,t,o=>{let s=this.i._malloc(e.length);this.i.HEAPU8.set(e,s),this.i._addProtoToInputSidePacket(s,e.length,o,n),this.i._free(s)})})}addBoolVectorToInputSidePacket(e,t){_(this,t,r=>{let n=this.i._allocateBoolVector(e.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let o of e)this.i._addBoolVectorEntry(n,o);this.i._addBoolVectorToInputSidePacket(n,r)})}addDoubleVectorToInputSidePacket(e,t){_(this,t,r=>{let n=this.i._allocateDoubleVector(e.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let o of e)this.i._addDoubleVectorEntry(n,o);this.i._addDoubleVectorToInputSidePacket(n,r)})}addFloatVectorToInputSidePacket(e,t){_(this,t,r=>{let n=this.i._allocateFloatVector(e.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let o of e)this.i._addFloatVectorEntry(n,o);this.i._addFloatVectorToInputSidePacket(n,r)})}addIntVectorToInputSidePacket(e,t){_(this,t,r=>{let n=this.i._allocateIntVector(e.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let o of e)this.i._addIntVectorEntry(n,o);this.i._addIntVectorToInputSidePacket(n,r)})}addUintVectorToInputSidePacket(e,t){_(this,t,r=>{let n=this.i._allocateUintVector(e.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let o of e)this.i._addUintVectorEntry(n,o);this.i._addUintVectorToInputSidePacket(n,r)})}addStringVectorToInputSidePacket(e,t){_(this,t,r=>{let n=this.i._allocateStringVector(e.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let o of e)_(this,o,s=>{this.i._addStringVectorEntry(n,s)});this.i._addStringVectorToInputSidePacket(n,r)})}attachBoolListener(e,t){Ne(this,e,t),_(this,e,r=>{this.i._attachBoolListener(r)})}attachBoolVectorListener(e,t){rt(this,e,t),_(this,e,r=>{this.i._attachBoolVectorListener(r)})}attachIntListener(e,t){Ne(this,e,t),_(this,e,r=>{this.i._attachIntListener(r)})}attachIntVectorListener(e,t){rt(this,e,t),_(this,e,r=>{this.i._attachIntVectorListener(r)})}attachUintListener(e,t){Ne(this,e,t),_(this,e,r=>{this.i._attachUintListener(r)})}attachUintVectorListener(e,t){rt(this,e,t),_(this,e,r=>{this.i._attachUintVectorListener(r)})}attachDoubleListener(e,t){Ne(this,e,t),_(this,e,r=>{this.i._attachDoubleListener(r)})}attachDoubleVectorListener(e,t){rt(this,e,t),_(this,e,r=>{this.i._attachDoubleVectorListener(r)})}attachFloatListener(e,t){Ne(this,e,t),_(this,e,r=>{this.i._attachFloatListener(r)})}attachFloatVectorListener(e,t){rt(this,e,t),_(this,e,r=>{this.i._attachFloatVectorListener(r)})}attachStringListener(e,t){Ne(this,e,t),_(this,e,r=>{this.i._attachStringListener(r)})}attachStringVectorListener(e,t){rt(this,e,t),_(this,e,r=>{this.i._attachStringVectorListener(r)})}attachProtoListener(e,t,r){Ne(this,e,t),_(this,e,n=>{this.i._attachProtoListener(n,r||!1)})}attachProtoVectorListener(e,t,r){rt(this,e,t),_(this,e,n=>{this.i._attachProtoVectorListener(n,r||!1)})}attachAudioListener(e,t,r){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Ne(this,e,(n,o)=>{n=new Float32Array(n.buffer,n.byteOffset,n.length/4),t(n,o)}),_(this,e,n=>{this.i._attachAudioListener(n,r||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Vs{get ha(){return this.i}sa(e,t,r){_(this,t,n=>{let[o,s]=Cs(this,e,n);this.ha._addBoundTextureAsImageToStream(n,o,s,r)})}W(e,t){Ne(this,e,t),_(this,e,r=>{this.ha._attachImageListener(r)})}da(e,t){rt(this,e,t),_(this,e,r=>{this.ha._attachImageVectorListener(r)})}})),Vs,Me=class extends hc{};async function w(e,t,r){return async function(n,o,s,i){return ic(n,o,s,i)}(e,r.canvas??(Xa()?void 0:document.createElement("canvas")),t,r)}function qa(e,t,r,n){if(e.V){let s=new da;if(r?.regionOfInterest){if(!e.ra)throw Error("This task doesn't support region-of-interest.");var o=r.regionOfInterest;if(o.left>=o.right||o.top>=o.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(0>o.left||0>o.top||1<o.right||1<o.bottom)throw Error("Expected RectF values to be in [0,1].");y(s,1,(o.left+o.right)/2),y(s,2,(o.top+o.bottom)/2),y(s,4,o.right-o.left),y(s,3,o.bottom-o.top)}else y(s,1,.5),y(s,2,.5),y(s,4,1),y(s,3,1);if(r?.rotationDegrees){if(r?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90\xB0.");if(y(s,5,-Math.PI*r.rotationDegrees/180),r?.rotationDegrees%180!=0){let[i,a]=Ha(t);r=J(s,3)*a/i,o=J(s,4)*i/a,y(s,4,r),y(s,3,o)}}e.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",e.V,n)}e.g.sa(t,e.ba,n??performance.now()),e.finishProcessing()}function Oe(e,t,r){if(e.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");qa(e,t,r,e.J+1)}function $e(e,t,r,n){if(!e.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");qa(e,t,r,n)}function Dt(e,t,r,n){var o=t.data;let s=t.width,i=s*(t=t.height);if((o instanceof Uint8Array||o instanceof Float32Array)&&o.length!==i)throw Error("Unsupported channel count: "+o.length/i);return e=new ne([o],r,!1,e.g.i.canvas,e.M,s,t),n?e.clone():e}var pe=class extends Cr{constructor(e,t,r,n){super(e),this.g=e,this.ba=t,this.V=r,this.ra=n,this.M=new Ht}l(e,t=!0){if("runningMode"in e&&ir(this.baseOptions,2,!!e.runningMode&&e.runningMode!=="IMAGE"),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.M.close(),super.close()}};pe.prototype.close=pe.prototype.close;var Re=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},T(e=this.h=new sn,0,1,t=new z),y(this.h,2,.5),y(this.h,3,.3)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){T(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&y(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&y(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}F(e,t){return this.j={detections:[]},Oe(this,e,t),this.j}G(e,t,r){return this.j={detections:[]},$e(this,e,r,t),this.j}m(){var e=new le;j(e,"image_in"),j(e,"norm_rect_in"),L(e,"detections");let t=new xe;Ue(t,X1,this.h);let r=new ue;Ae(r,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),B(r,"IMAGE:image_in"),B(r,"NORM_RECT:norm_rect_in"),S(r,"DETECTIONS:detections"),r.o(t),we(e,r),this.g.attachProtoVectorListener("detections",(n,o)=>{for(let s of n)n=aa(s),this.j.detections.push(ja(n));p(this,o)}),this.g.attachEmptyPacketListener("detections",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Re.prototype.detectForVideo=Re.prototype.G,Re.prototype.detect=Re.prototype.F,Re.prototype.setOptions=Re.prototype.o,Re.createFromModelPath=async function(e,t){return w(Re,e,{baseOptions:{modelAssetPath:t}})},Re.createFromModelBuffer=function(e,t){return w(Re,e,{baseOptions:{modelAssetBuffer:t}})},Re.createFromOptions=function(e,t){return w(Re,e,t)};var No=Be([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]),Go=Be([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]),Vo=Be([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Ja=Be([474,475],[475,476],[476,477],[477,474]),jo=Be([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]),Wo=Be([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Za=Be([469,470],[470,471],[471,472],[472,469]),Xo=Be([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]),Qa=[...No,...Go,...Vo,...jo,...Wo,...Xo],e2=Be([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 js(e){e.u={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Y=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect",!1),this.u={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,T(e=this.h=new xa,0,1,t=new z),this.H=new ba,T(this.h,0,3,this.H),this.j=new sn,T(this.h,0,2,this.j),He(this.j,4,1),y(this.j,2,.5),y(this.H,2,.5),y(this.h,4,.5)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){T(this.h,0,1,e)}o(e){return"numFaces"in e&&He(this.j,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&y(this.j,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&y(this.H,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}F(e,t){return js(this),Oe(this,e,t),this.u}G(e,t,r){return js(this),$e(this,e,r,t),this.u}m(){var e=new le;j(e,"image_in"),j(e,"norm_rect"),L(e,"face_landmarks");let t=new xe;Ue(t,z1,this.h);let r=new ue;Ae(r,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),B(r,"IMAGE:image_in"),B(r,"NORM_RECT:norm_rect"),S(r,"NORM_LANDMARKS:face_landmarks"),r.o(t),we(e,r),this.g.attachProtoVectorListener("face_landmarks",(n,o)=>{for(let s of n)n=gr(s),this.u.faceLandmarks.push(an(n));p(this,o)}),this.g.attachEmptyPacketListener("face_landmarks",n=>{p(this,n)}),this.outputFaceBlendshapes&&(L(e,"blendshapes"),S(r,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(n,o)=>{if(this.outputFaceBlendshapes)for(let s of n)n=nn(s),this.u.faceBlendshapes.push(Po(n.g()??[]));p(this,o)}),this.g.attachEmptyPacketListener("blendshapes",n=>{p(this,n)})),this.outputFacialTransformationMatrixes&&(L(e,"face_geometry"),S(r,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(n,o)=>{if(this.outputFacialTransformationMatrixes)for(let s of n)(n=C(H1(s),fa,2))&&this.u.facialTransformationMatrixes.push({rows:Pe(Fe(n,1),0)??0,columns:Pe(Fe(n,2),0)??0,data:kt(n,3,dt).slice()??[]});p(this,o)}),this.g.attachEmptyPacketListener("face_geometry",n=>{p(this,n)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Y.prototype.detectForVideo=Y.prototype.G,Y.prototype.detect=Y.prototype.F,Y.prototype.setOptions=Y.prototype.o,Y.createFromModelPath=function(e,t){return w(Y,e,{baseOptions:{modelAssetPath:t}})},Y.createFromModelBuffer=function(e,t){return w(Y,e,{baseOptions:{modelAssetBuffer:t}})},Y.createFromOptions=function(e,t){return w(Y,e,t)},Y.FACE_LANDMARKS_LIPS=No,Y.FACE_LANDMARKS_LEFT_EYE=Go,Y.FACE_LANDMARKS_LEFT_EYEBROW=Vo,Y.FACE_LANDMARKS_LEFT_IRIS=Ja,Y.FACE_LANDMARKS_RIGHT_EYE=jo,Y.FACE_LANDMARKS_RIGHT_EYEBROW=Wo,Y.FACE_LANDMARKS_RIGHT_IRIS=Za,Y.FACE_LANDMARKS_FACE_OVAL=Xo,Y.FACE_LANDMARKS_CONTOURS=Qa,Y.FACE_LANDMARKS_TESSELATION=e2;var Ge=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect",!0),T(e=this.j=new wa,0,1,t=new z)}get baseOptions(){return C(this.j,z,1)}set baseOptions(e){T(this.j,0,1,e)}o(e){return super.l(e)}Pa(e,t,r){let n=typeof t!="function"?t:{};if(this.h=typeof t=="function"?t:r,Oe(this,e,n??{}),!this.h)return this.u}m(){var e=new le;j(e,"image_in"),j(e,"norm_rect"),L(e,"stylized_image");let t=new xe;Ue(t,Y1,this.j);let r=new ue;Ae(r,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),B(r,"IMAGE:image_in"),B(r,"NORM_RECT:norm_rect"),S(r,"STYLIZED_IMAGE:stylized_image"),r.o(t),we(e,r),this.g.W("stylized_image",(n,o)=>{var s=!this.h,i=n.data,a=n.width;let c=a*(n=n.height);if(i instanceof Uint8Array)if(i.length===3*c){let u=new Uint8ClampedArray(4*c);for(let h=0;h<c;++h)u[4*h]=i[3*h],u[4*h+1]=i[3*h+1],u[4*h+2]=i[3*h+2],u[4*h+3]=255;i=new ImageData(u,a,n)}else{if(i.length!==4*c)throw Error("Unsupported channel count: "+i.length/c);i=new ImageData(new Uint8ClampedArray(i.buffer,i.byteOffset,i.length),a,n)}else if(!(i instanceof WebGLTexture))throw Error(`Unsupported format: ${i.constructor.name}`);a=new se([i],!1,!1,this.g.i.canvas,this.M,a,n),this.u=s=s?a.clone():a,this.h&&this.h(s),p(this,o)}),this.g.attachEmptyPacketListener("stylized_image",n=>{this.u=null,this.h&&this.h(null),p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ge.prototype.stylize=Ge.prototype.Pa,Ge.prototype.setOptions=Ge.prototype.o,Ge.createFromModelPath=function(e,t){return w(Ge,e,{baseOptions:{modelAssetPath:t}})},Ge.createFromModelBuffer=function(e,t){return w(Ge,e,{baseOptions:{modelAssetBuffer:t}})},Ge.createFromOptions=function(e,t){return w(Ge,e,t)};var Ho=Be([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 Ws(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function Xs(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function Hs(e,t=!0){let r=[];for(let o of e){var n=nn(o);e=[];for(let s of n.g())n=t&&Fe(s,1)!=null?Pe(Fe(s,1),0):-1,e.push({score:J(s,2)??0,index:n,categoryName:Xe(s,3)??"",displayName:Xe(s,4)??""});r.push(e)}return r}var ve=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],T(e=this.v=new Ia,0,1,t=new z),this.A=new Fo,T(this.v,0,2,this.A),this.u=new ko,T(this.A,0,3,this.u),this.h=new Ca,T(this.A,0,2,this.h),this.j=new K1,T(this.v,0,3,this.j),y(this.h,2,.5),y(this.A,4,.5),y(this.u,2,.5)}get baseOptions(){return C(this.v,z,1)}set baseOptions(e){T(this.v,0,1,e)}o(e){if(He(this.h,3,e.numHands??1),"minHandDetectionConfidence"in e&&y(this.h,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.A,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&y(this.u,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new St,r=t,n=Nn(e.cannedGesturesClassifierOptions,C(this.j,St,3)?.h());T(r,0,2,n),T(this.j,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&C(this.j,St,3)?.g();return e.customGesturesClassifierOptions?(T(r=t=new St,0,2,n=Nn(e.customGesturesClassifierOptions,C(this.j,St,4)?.h())),T(this.j,0,4,t)):e.customGesturesClassifierOptions===void 0&&C(this.j,St,4)?.g(),this.l(e)}Ka(e,t){return Ws(this),Oe(this,e,t),Xs(this)}La(e,t,r){return Ws(this),$e(this,e,r,t),Xs(this)}m(){var e=new le;j(e,"image_in"),j(e,"norm_rect"),L(e,"hand_gestures"),L(e,"hand_landmarks"),L(e,"world_hand_landmarks"),L(e,"handedness");let t=new xe;Ue(t,J1,this.v);let r=new ue;Ae(r,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),B(r,"IMAGE:image_in"),B(r,"NORM_RECT:norm_rect"),S(r,"HAND_GESTURES:hand_gestures"),S(r,"LANDMARKS:hand_landmarks"),S(r,"WORLD_LANDMARKS:world_hand_landmarks"),S(r,"HANDEDNESS:handedness"),r.o(t),we(e,r),this.g.attachProtoVectorListener("hand_landmarks",(n,o)=>{for(let s of n){n=gr(s);let i=[];for(let a of tt(n,ha,1))i.push({x:J(a,1)??0,y:J(a,2)??0,z:J(a,3)??0,visibility:J(a,4)??0});this.landmarks.push(i)}p(this,o)}),this.g.attachEmptyPacketListener("hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("world_hand_landmarks",(n,o)=>{for(let s of n){n=Ct(s);let i=[];for(let a of tt(n,ca,1))i.push({x:J(a,1)??0,y:J(a,2)??0,z:J(a,3)??0,visibility:J(a,4)??0});this.worldLandmarks.push(i)}p(this,o)}),this.g.attachEmptyPacketListener("world_hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("hand_gestures",(n,o)=>{this.gestures.push(...Hs(n,!1)),p(this,o)}),this.g.attachEmptyPacketListener("hand_gestures",n=>{p(this,n)}),this.g.attachProtoVectorListener("handedness",(n,o)=>{this.handedness.push(...Hs(n)),p(this,o)}),this.g.attachEmptyPacketListener("handedness",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function zs(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}ve.prototype.recognizeForVideo=ve.prototype.La,ve.prototype.recognize=ve.prototype.Ka,ve.prototype.setOptions=ve.prototype.o,ve.createFromModelPath=function(e,t){return w(ve,e,{baseOptions:{modelAssetPath:t}})},ve.createFromModelBuffer=function(e,t){return w(ve,e,{baseOptions:{modelAssetBuffer:t}})},ve.createFromOptions=function(e,t){return w(ve,e,t)},ve.HAND_CONNECTIONS=Ho;var _e=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],T(e=this.j=new Fo,0,1,t=new z),this.u=new ko,T(this.j,0,3,this.u),this.h=new Ca,T(this.j,0,2,this.h),He(this.h,3,1),y(this.h,2,.5),y(this.u,2,.5),y(this.j,4,.5)}get baseOptions(){return C(this.j,z,1)}set baseOptions(e){T(this.j,0,1,e)}o(e){return"numHands"in e&&He(this.h,3,e.numHands??1),"minHandDetectionConfidence"in e&&y(this.h,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.j,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&y(this.u,2,e.minHandPresenceConfidence??.5),this.l(e)}F(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Oe(this,e,t),zs(this)}G(e,t,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],$e(this,e,r,t),zs(this)}m(){var e=new le;j(e,"image_in"),j(e,"norm_rect"),L(e,"hand_landmarks"),L(e,"world_hand_landmarks"),L(e,"handedness");let t=new xe;Ue(t,q1,this.j);let r=new ue;Ae(r,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),B(r,"IMAGE:image_in"),B(r,"NORM_RECT:norm_rect"),S(r,"LANDMARKS:hand_landmarks"),S(r,"WORLD_LANDMARKS:world_hand_landmarks"),S(r,"HANDEDNESS:handedness"),r.o(t),we(e,r),this.g.attachProtoVectorListener("hand_landmarks",(n,o)=>{for(let s of n)n=gr(s),this.landmarks.push(an(n));p(this,o)}),this.g.attachEmptyPacketListener("hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("world_hand_landmarks",(n,o)=>{for(let s of n)n=Ct(s),this.worldLandmarks.push(nr(n));p(this,o)}),this.g.attachEmptyPacketListener("world_hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("handedness",(n,o)=>{var s=this.handedness,i=s.push;let a=[];for(let c of n){n=nn(c);let u=[];for(let h of n.g())u.push({score:J(h,2)??0,index:Pe(Fe(h,1),0)??-1,categoryName:Xe(h,3)??"",displayName:Xe(h,4)??""});a.push(u)}i.call(s,...a),p(this,o)}),this.g.attachEmptyPacketListener("handedness",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};_e.prototype.detectForVideo=_e.prototype.G,_e.prototype.detect=_e.prototype.F,_e.prototype.setOptions=_e.prototype.o,_e.createFromModelPath=function(e,t){return w(_e,e,{baseOptions:{modelAssetPath:t}})},_e.createFromModelBuffer=function(e,t){return w(_e,e,{baseOptions:{modelAssetBuffer:t}})},_e.createFromOptions=function(e,t){return w(_e,e,t)},_e.HAND_CONNECTIONS=Ho;var t2=Be([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 Ys(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Ks(e){try{if(!e.I)return e.h;e.I(e.h)}finally{un(e)}}function xr(e,t){e=gr(e),t.push(an(e))}var X=class extends pe{constructor(e,t){super(new Me(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,T(e=this.A=new Pa,0,1,t=new z),this.u=new ko,T(this.A,0,2,this.u),this.aa=new Z1,T(this.A,0,3,this.aa),this.j=new sn,T(this.A,0,4,this.j),this.H=new ba,T(this.A,0,5,this.H),this.v=new Ma,T(this.A,0,6,this.v),this.D=new Oa,T(this.A,0,7,this.D),y(this.j,2,.5),y(this.j,3,.3),y(this.H,2,.5),y(this.v,2,.5),y(this.v,3,.3),y(this.D,2,.5),y(this.u,2,.5)}get baseOptions(){return C(this.A,z,1)}set baseOptions(e){T(this.A,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&y(this.j,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&y(this.j,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&y(this.H,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&y(this.v,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&y(this.v,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&y(this.D,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&y(this.u,2,e.minHandLandmarksConfidence??.5),this.l(e)}F(e,t,r){let n=typeof t!="function"?t:{};return this.I=typeof t=="function"?t:r,Ys(this),Oe(this,e,n),Ks(this)}G(e,t,r,n){let o=typeof r!="function"?r:{};return this.I=typeof r=="function"?r:n,Ys(this),$e(this,e,o,t),Ks(this)}m(){var e=new le;j(e,"input_frames_image"),L(e,"pose_landmarks"),L(e,"pose_world_landmarks"),L(e,"face_landmarks"),L(e,"left_hand_landmarks"),L(e,"left_hand_world_landmarks"),L(e,"right_hand_landmarks"),L(e,"right_hand_world_landmarks");let t=new xe,r=new bs;Mn(r,1,Vt("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(o,s){if(s!=null)if(Array.isArray(s))D(o,2,qr(s,yo,void 0,void 0,!1));else{if(!(typeof s=="string"||s instanceof Qe||ur(s)))throw Error("invalid value in Any.value field: "+s+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");Mn(o,2,ho(s,!1,!1),At())}}(r,this.A.g());let n=new ue;Ae(n,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Vr(n,8,bs,r),B(n,"IMAGE:input_frames_image"),S(n,"POSE_LANDMARKS:pose_landmarks"),S(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),S(n,"FACE_LANDMARKS:face_landmarks"),S(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),S(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),S(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),S(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.o(t),we(e,n),cn(this,e),this.g.attachProtoListener("pose_landmarks",(o,s)=>{xr(o,this.h.poseLandmarks),p(this,s)}),this.g.attachEmptyPacketListener("pose_landmarks",o=>{p(this,o)}),this.g.attachProtoListener("pose_world_landmarks",(o,s)=>{var i=this.h.poseWorldLandmarks;o=Ct(o),i.push(nr(o)),p(this,s)}),this.g.attachEmptyPacketListener("pose_world_landmarks",o=>{p(this,o)}),this.outputPoseSegmentationMasks&&(S(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Ot(this,"pose_segmentation_mask"),this.g.W("pose_segmentation_mask",(o,s)=>{this.h.poseSegmentationMasks=[Dt(this,o,!0,!this.I)],p(this,s)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",o=>{this.h.poseSegmentationMasks=[],p(this,o)})),this.g.attachProtoListener("face_landmarks",(o,s)=>{xr(o,this.h.faceLandmarks),p(this,s)}),this.g.attachEmptyPacketListener("face_landmarks",o=>{p(this,o)}),this.outputFaceBlendshapes&&(L(e,"extra_blendshapes"),S(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(o,s)=>{var i=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(o=nn(o),i.push(Po(o.g()??[]))),p(this,s)}),this.g.attachEmptyPacketListener("extra_blendshapes",o=>{p(this,o)})),this.g.attachProtoListener("left_hand_landmarks",(o,s)=>{xr(o,this.h.leftHandLandmarks),p(this,s)}),this.g.attachEmptyPacketListener("left_hand_landmarks",o=>{p(this,o)}),this.g.attachProtoListener("left_hand_world_landmarks",(o,s)=>{var i=this.h.leftHandWorldLandmarks;o=Ct(o),i.push(nr(o)),p(this,s)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",o=>{p(this,o)}),this.g.attachProtoListener("right_hand_landmarks",(o,s)=>{xr(o,this.h.rightHandLandmarks),p(this,s)}),this.g.attachEmptyPacketListener("right_hand_landmarks",o=>{p(this,o)}),this.g.attachProtoListener("right_hand_world_landmarks",(o,s)=>{var i=this.h.rightHandWorldLandmarks;o=Ct(o),i.push(nr(o)),p(this,s)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",o=>{p(this,o)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};X.prototype.detectForVideo=X.prototype.G,X.prototype.detect=X.prototype.F,X.prototype.setOptions=X.prototype.o,X.createFromModelPath=function(e,t){return w(X,e,{baseOptions:{modelAssetPath:t}})},X.createFromModelBuffer=function(e,t){return w(X,e,{baseOptions:{modelAssetBuffer:t}})},X.createFromOptions=function(e,t){return w(X,e,t)},X.HAND_CONNECTIONS=Ho,X.POSE_CONNECTIONS=t2,X.FACE_LANDMARKS_LIPS=No,X.FACE_LANDMARKS_LEFT_EYE=Go,X.FACE_LANDMARKS_LEFT_EYEBROW=Vo,X.FACE_LANDMARKS_LEFT_IRIS=Ja,X.FACE_LANDMARKS_RIGHT_EYE=jo,X.FACE_LANDMARKS_RIGHT_EYEBROW=Wo,X.FACE_LANDMARKS_RIGHT_IRIS=Za,X.FACE_LANDMARKS_FACE_OVAL=Xo,X.FACE_LANDMARKS_CONTOURS=Qa,X.FACE_LANDMARKS_TESSELATION=e2;var Se=class extends pe{constructor(e,t){super(new Me(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},T(e=this.h=new Ua,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){T(this.h,0,1,e)}o(e){return T(this.h,0,2,Nn(e,C(this.h,on,2))),this.l(e)}ua(e,t){return this.j={classifications:[]},Oe(this,e,t),this.j}va(e,t,r){return this.j={classifications:[]},$e(this,e,r,t),this.j}m(){var e=new le;j(e,"input_image"),j(e,"norm_rect"),L(e,"classifications");let t=new xe;Ue(t,ec,this.h);let r=new ue;Ae(r,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),B(r,"IMAGE:input_image"),B(r,"NORM_RECT:norm_rect"),S(r,"CLASSIFICATIONS:classifications"),r.o(t),we(e,r),this.g.attachProtoListener("classifications",(n,o)=>{this.j=function(s){let i={classifications:tt(s,U1,1).map(a=>Po(C(a,wo,4)?.g()??[],Pe(Fe(a,2),0),Xe(a,3)))};return Dr(ut(s,2))!=null&&(i.timestampMs=Pe(Dr(ut(s,2)),0)),i}(B1(n)),p(this,o)}),this.g.attachEmptyPacketListener("classifications",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Se.prototype.classifyForVideo=Se.prototype.va,Se.prototype.classify=Se.prototype.ua,Se.prototype.setOptions=Se.prototype.o,Se.createFromModelPath=function(e,t){return w(Se,e,{baseOptions:{modelAssetPath:t}})},Se.createFromModelBuffer=function(e,t){return w(Se,e,{baseOptions:{modelAssetBuffer:t}})},Se.createFromOptions=function(e,t){return w(Se,e,t)};var Te=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect",!0),this.h=new Da,this.embeddings={embeddings:[]},T(e=this.h,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){T(this.h,0,1,e)}o(e){var t=this.h,r=C(this.h,As,2);return r=r?r.clone():new As,e.l2Normalize!==void 0?ir(r,1,e.l2Normalize):"l2Normalize"in e&&D(r,1),e.quantize!==void 0?ir(r,2,e.quantize):"quantize"in e&&D(r,2),T(t,0,2,r),this.l(e)}Ba(e,t){return Oe(this,e,t),this.embeddings}Ca(e,t,r){return $e(this,e,r,t),this.embeddings}m(){var e=new le;j(e,"image_in"),j(e,"norm_rect"),L(e,"embeddings_out");let t=new xe;Ue(t,tc,this.h);let r=new ue;Ae(r,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),B(r,"IMAGE:image_in"),B(r,"NORM_RECT:norm_rect"),S(r,"EMBEDDINGS:embeddings_out"),r.o(t),we(e,r),this.g.attachProtoListener("embeddings_out",(n,o)=>{n=j1(n),this.embeddings=function(s){return{embeddings:tt(s,G1,1).map(i=>{let a={headIndex:Pe(Fe(i,3),0)??-1,headName:Xe(i,4)??""};if(Ii(i,Dn,Tn(i,1))!==void 0)i=kt(i=C(i,Dn,Tn(i,1)),1,dt),a.floatEmbedding=i.slice();else{let c=new Uint8Array(0);a.quantizedEmbedding=C(i,N1,Tn(i,2))?.qa()?.h()??c}return a}),timestampMs:Pe(Dr(ut(s,2)),0)}}(n),p(this,o)}),this.g.attachEmptyPacketListener("embeddings_out",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Te.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=Ss(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=Ss(Rs(e.quantizedEmbedding),Rs(t.quantizedEmbedding))}return e},Te.prototype.embedForVideo=Te.prototype.Ca,Te.prototype.embed=Te.prototype.Ba,Te.prototype.setOptions=Te.prototype.o,Te.createFromModelPath=function(e,t){return w(Te,e,{baseOptions:{modelAssetPath:t}})},Te.createFromModelBuffer=function(e,t){return w(Te,e,{baseOptions:{modelAssetBuffer:t}})},Te.createFromOptions=function(e,t){return w(Te,e,t)};var Wn=class{constructor(e,t,r){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=r}close(){this.confidenceMasks?.forEach(e=>{e.close()}),this.categoryMask?.close()}};function $s(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function qs(e){try{let t=new Wn(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{un(e)}}Wn.prototype.close=Wn.prototype.close;var ie=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Mo,this.v=new Ba,T(this.h,0,3,this.v),T(e=this.h,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){T(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?D(this.h,2,Vt(e.displayNamesLocale)):"displayNamesLocale"in e&&D(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}L(){(function(e){let t=tt(e.fa(),ue,1).filter(r=>Xe(r,1).includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(e.u=[],1<t.length)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");t.length===1&&(C(t[0],xe,7)?.l()?.g()??new Map).forEach((r,n)=>{e.u[Number(n)]=Xe(r,1)})})(this)}ga(e,t,r){let n=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:r,$s(this),Oe(this,e,n),qs(this)}Na(e,t,r,n){let o=typeof r!="function"?r:{};return this.j=typeof r=="function"?r:n,$s(this),$e(this,e,o,t),qs(this)}Fa(){return this.u}m(){var e=new le;j(e,"image_in"),j(e,"norm_rect");let t=new xe;Ue(t,Ga,this.h);let r=new ue;Ae(r,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),B(r,"IMAGE:image_in"),B(r,"NORM_RECT:norm_rect"),r.o(t),we(e,r),cn(this,e),this.outputConfidenceMasks&&(L(e,"confidence_masks"),S(r,"CONFIDENCE_MASKS:confidence_masks"),Ot(this,"confidence_masks"),this.g.da("confidence_masks",(n,o)=>{this.confidenceMasks=n.map(s=>Dt(this,s,!0,!this.j)),p(this,o)}),this.g.attachEmptyPacketListener("confidence_masks",n=>{this.confidenceMasks=[],p(this,n)})),this.outputCategoryMask&&(L(e,"category_mask"),S(r,"CATEGORY_MASK:category_mask"),Ot(this,"category_mask"),this.g.W("category_mask",(n,o)=>{this.categoryMask=Dt(this,n,!1,!this.j),p(this,o)}),this.g.attachEmptyPacketListener("category_mask",n=>{this.categoryMask=void 0,p(this,n)})),L(e,"quality_scores"),S(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(n,o)=>{this.qualityScores=n,p(this,o)}),this.g.attachEmptyPacketListener("quality_scores",n=>{this.categoryMask=void 0,p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ie.prototype.getLabels=ie.prototype.Fa,ie.prototype.segmentForVideo=ie.prototype.Na,ie.prototype.segment=ie.prototype.ga,ie.prototype.setOptions=ie.prototype.o,ie.createFromModelPath=function(e,t){return w(ie,e,{baseOptions:{modelAssetPath:t}})},ie.createFromModelBuffer=function(e,t){return w(ie,e,{baseOptions:{modelAssetBuffer:t}})},ie.createFromOptions=function(e,t){return w(ie,e,t)};var Xn=class{constructor(e,t,r){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=r}close(){this.confidenceMasks?.forEach(e=>{e.close()}),this.categoryMask?.close()}};Xn.prototype.close=Xn.prototype.close;var lc=class extends g{constructor(e){super(e)}},Bt=[0,q,-2],fc=[0,et,-3,Z],fn=[0,et,-3,Z,et,-1],r2=[0,fn],dc=[0,r2,Bt],pc=[0,fn,Bt],n2=[0,fn,q,-1],mc=[0,n2,Bt],gc=[0,et,-3,Z,Bt,-1],yc=[0,et,-3,Z,ze],An=class extends g{constructor(e){super(e)}},Js=[0,et,-1,Z],o2=class extends g{constructor(){super()}};o2.B=[1];var Zs=class extends g{constructor(e){super(e)}},Hn=[1,2,3,4,5,6,7,8,9,10,14,15],vc=[0,Hn,P,fn,P,pc,P,r2,P,dc,P,Js,P,yc,P,fc,P,[0,O,et,-2,Z,q,Z,-1,2,et,Bt],P,n2,P,mc,et,Bt,O,P,gc,P,[0,re,Js]],_c=[0,O,q,-1,Z],zn=class extends g{constructor(){super()}};zn.B=[1],zn.prototype.g=rn([0,re,vc,O,_c]);var Ve=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Mo,this.v=new Ba,T(this.h,0,3,this.v),T(e=this.h,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){T(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}ga(e,t,r,n){let o=typeof r!="function"?r:{};this.j=typeof r=="function"?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.J+1,n=new zn;let s=new Zs;var i=new lc;if(He(i,1,255),T(s,0,12,i),t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var a=new An;ir(a,3,!0),y(a,1,t.keypoint.x),y(a,2,t.keypoint.y),Qt(s,5,Hn,a)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(i=new o2,t.scribble))ir(t=new An,3,!0),y(t,1,a.x),y(t,2,a.y),Vr(i,1,An,t);Qt(s,15,Hn,i)}Vr(n,1,Zs,s),this.g.addProtoToStream(n.g(),"drishti.RenderData","roi_in",r),Oe(this,e,o);e:{try{let u=new Xn(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=u;break e}this.j(u)}finally{un(this)}c=void 0}return c}m(){var e=new le;j(e,"image_in"),j(e,"roi_in"),j(e,"norm_rect_in");let t=new xe;Ue(t,Ga,this.h);let r=new ue;Ae(r,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),B(r,"IMAGE:image_in"),B(r,"ROI:roi_in"),B(r,"NORM_RECT:norm_rect_in"),r.o(t),we(e,r),cn(this,e),this.outputConfidenceMasks&&(L(e,"confidence_masks"),S(r,"CONFIDENCE_MASKS:confidence_masks"),Ot(this,"confidence_masks"),this.g.da("confidence_masks",(n,o)=>{this.confidenceMasks=n.map(s=>Dt(this,s,!0,!this.j)),p(this,o)}),this.g.attachEmptyPacketListener("confidence_masks",n=>{this.confidenceMasks=[],p(this,n)})),this.outputCategoryMask&&(L(e,"category_mask"),S(r,"CATEGORY_MASK:category_mask"),Ot(this,"category_mask"),this.g.W("category_mask",(n,o)=>{this.categoryMask=Dt(this,n,!1,!this.j),p(this,o)}),this.g.attachEmptyPacketListener("category_mask",n=>{this.categoryMask=void 0,p(this,n)})),L(e,"quality_scores"),S(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(n,o)=>{this.qualityScores=n,p(this,o)}),this.g.attachEmptyPacketListener("quality_scores",n=>{this.categoryMask=void 0,p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ve.prototype.segment=Ve.prototype.ga,Ve.prototype.setOptions=Ve.prototype.o,Ve.createFromModelPath=function(e,t){return w(Ve,e,{baseOptions:{modelAssetPath:t}})},Ve.createFromModelBuffer=function(e,t){return w(Ve,e,{baseOptions:{modelAssetBuffer:t}})},Ve.createFromOptions=function(e,t){return w(Ve,e,t)};var ke=class extends pe{constructor(e,t){super(new Me(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},T(e=this.h=new Oo,0,1,t=new z)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){T(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?D(this.h,2,Vt(e.displayNamesLocale)):"displayNamesLocale"in e&&D(this.h,2),e.maxResults!==void 0?He(this.h,3,e.maxResults):"maxResults"in e&&D(this.h,3),e.scoreThreshold!==void 0?y(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&D(this.h,4),e.categoryAllowlist!==void 0?Gr(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&D(this.h,5),e.categoryDenylist!==void 0?Gr(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&D(this.h,6),this.l(e)}F(e,t){return this.j={detections:[]},Oe(this,e,t),this.j}G(e,t,r){return this.j={detections:[]},$e(this,e,r,t),this.j}m(){var e=new le;j(e,"input_frame_gpu"),j(e,"norm_rect"),L(e,"detections");let t=new xe;Ue(t,nc,this.h);let r=new ue;Ae(r,"mediapipe.tasks.vision.ObjectDetectorGraph"),B(r,"IMAGE:input_frame_gpu"),B(r,"NORM_RECT:norm_rect"),S(r,"DETECTIONS:detections"),r.o(t),we(e,r),this.g.attachProtoVectorListener("detections",(n,o)=>{for(let s of n)n=aa(s),this.j.detections.push(ja(n));p(this,o)}),this.g.attachEmptyPacketListener("detections",n=>{p(this,n)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ke.prototype.detectForVideo=ke.prototype.G,ke.prototype.detect=ke.prototype.F,ke.prototype.setOptions=ke.prototype.o,ke.createFromModelPath=async function(e,t){return w(ke,e,{baseOptions:{modelAssetPath:t}})},ke.createFromModelBuffer=function(e,t){return w(ke,e,{baseOptions:{modelAssetBuffer:t}})},ke.createFromOptions=function(e,t){return w(ke,e,t)};var Yn=class{constructor(e,t,r){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=r}close(){this.segmentationMasks?.forEach(e=>{e.close()})}};function Qs(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function ei(e){try{let t=new Yn(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.j)return t;e.j(t)}finally{un(e)}}Yn.prototype.close=Yn.prototype.close;var Ee=class extends pe{constructor(e,t){super(new Me(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,T(e=this.h=new Va,0,1,t=new z),this.D=new Oa,T(this.h,0,3,this.D),this.v=new Ma,T(this.h,0,2,this.v),He(this.v,4,1),y(this.v,2,.5),y(this.D,2,.5),y(this.h,4,.5)}get baseOptions(){return C(this.h,z,1)}set baseOptions(e){T(this.h,0,1,e)}o(e){return"numPoses"in e&&He(this.v,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&y(this.v,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&y(this.D,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}F(e,t,r){let n=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:r,Qs(this),Oe(this,e,n),ei(this)}G(e,t,r,n){let o=typeof r!="function"?r:{};return this.j=typeof r=="function"?r:n,Qs(this),$e(this,e,o,t),ei(this)}m(){var e=new le;j(e,"image_in"),j(e,"norm_rect"),L(e,"normalized_landmarks"),L(e,"world_landmarks"),L(e,"segmentation_masks");let t=new xe;Ue(t,oc,this.h);let r=new ue;Ae(r,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),B(r,"IMAGE:image_in"),B(r,"NORM_RECT:norm_rect"),S(r,"NORM_LANDMARKS:normalized_landmarks"),S(r,"WORLD_LANDMARKS:world_landmarks"),r.o(t),we(e,r),cn(this,e),this.g.attachProtoVectorListener("normalized_landmarks",(n,o)=>{this.landmarks=[];for(let s of n)n=gr(s),this.landmarks.push(an(n));p(this,o)}),this.g.attachEmptyPacketListener("normalized_landmarks",n=>{this.landmarks=[],p(this,n)}),this.g.attachProtoVectorListener("world_landmarks",(n,o)=>{this.worldLandmarks=[];for(let s of n)n=Ct(s),this.worldLandmarks.push(nr(n));p(this,o)}),this.g.attachEmptyPacketListener("world_landmarks",n=>{this.worldLandmarks=[],p(this,n)}),this.outputSegmentationMasks&&(S(r,"SEGMENTATION_MASK:segmentation_masks"),Ot(this,"segmentation_masks"),this.g.da("segmentation_masks",(n,o)=>{this.segmentationMasks=n.map(s=>Dt(this,s,!0,!this.j)),p(this,o)}),this.g.attachEmptyPacketListener("segmentation_masks",n=>{this.segmentationMasks=[],p(this,n)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ee.prototype.detectForVideo=Ee.prototype.G,Ee.prototype.detect=Ee.prototype.F,Ee.prototype.setOptions=Ee.prototype.o,Ee.createFromModelPath=function(e,t){return w(Ee,e,{baseOptions:{modelAssetPath:t}})},Ee.createFromModelBuffer=function(e,t){return w(Ee,e,{baseOptions:{modelAssetBuffer:t}})},Ee.createFromOptions=function(e,t){return w(Ee,e,t)},Ee.POSE_CONNECTIONS=t2;var qe={New:"new",Error:"Error",Opened:"opened",Opening:"opening",Processing:"processing",Idle:"idle",Closing:"closing",Closed:"closed",Destroying:"destroying",Destroyed:"destroyed"},s2={None:"none",Blur:"blur",Overlay:"overlay"};var ye=(e,t="AssertError")=>{if(e==null)throw new Error(t,{cause:e});return e};var i2=e=>{let t=new Set(Object.keys(e));return r=>{for(let n in r)t.has(n)&&typeof e[n]==typeof r[n]&&(e[n]=r[n])}},a2=e=>{let t=new Map(e),r=new Set,n=async i=>{let c=await(await fetch(i)).blob();return await createImageBitmap(c)},o=async i=>{let a=t.get(i);if(!a){if(r.has(i))return null;r.add(i);let c=await n(i);return t.set(i,c),r.delete(i),c}return a},s=i=>(t.get(i)?.close(),t.delete(i));return{tryFetchingImage:o,setImage:(i,a)=>{t.has(i)&&s(i),t.set(i,a)},getImage:i=>t.get(i)??null,removeImage:s,clear:()=>{t.forEach(i=>i.close()),t.clear()}}},c2=(e,t)=>r=>Math.min(Math.max(r,e),t);var u2=(e,t,r,n)=>{if(!e||!t||!r||!n||e*n===r*t)return{sx:0,sy:0,sw:e,sh:t,dx:0,dy:0,dw:r,dh:n};let o=e/t,s=r/n;if(o>s){let u=Math.ceil(e*s)/o,h=Math.abs(e-u);return{sx:Math.ceil(h/2),sy:0,sw:u,sh:t,dx:0,dy:0,dw:r,dh:n}}let i=Math.ceil(t*o)/s,a=Math.abs(t-i);return{sx:0,sy:Math.ceil(a/2),sw:e,sh:i,dx:0,dy:0,dw:r,dh:n}};var mt=(e,t)=>{let r=e.getContext("2d",t);if(!r)throw new Error("Cannot get CanvasRenderingContext2D");return r},Tc=e=>{let t=mt(e);t.scale(-1,1),t.translate(-e.width,0)},zo=e=>"VideoFrame"in globalThis&&e instanceof VideoFrame?{height:e.displayHeight,width:e.displayWidth}:"offsetHeight"in e&&typeof e.offsetHeight=="number"&&e.offsetHeight!==0&&"offsetWidth"in e&&typeof e.offsetWidth=="number"&&e.offsetWidth!==0?{height:e.offsetHeight,width:e.offsetWidth}:"videoHeight"in e&&typeof e.videoHeight=="number"&&e.videoHeight!==0&&"videoWidth"in e&&typeof e.videoWidth=="number"&&e.videoWidth!==0?{height:e.videoHeight,width:e.videoWidth}:"height"in e&&e.height!==0&&"width"in e&&e.width!==0?{height:e.height,width:e.width}:{height:0,width:0},vr=(e,t)=>new OffscreenCanvas(e,t);var Ec=e=>{mt(e).clearRect(0,0,e.width,e.height)},h2=(e,t)=>{let r={downScaleFactor:3},n=d=>{let l=r[d];if(!l){let v=vr(d==="downScaledCanvas"?Math.trunc(e/r.downScaleFactor):e,d==="downScaledCanvas"?Math.trunc(t/r.downScaleFactor):t);return r[d]=v,v}return l},o=(d,l)=>{let v=n(l);return mt(v).putImageData(d,0,0),v},s=(d,l,v,k,R,I,U,F,W,ee)=>{let vt=l instanceof ImageData?o(l,"drawImageDataCanvas"):l;R===void 0||I===void 0?d.drawImage(vt,v,k):U===void 0||F===void 0||W===void 0||ee===void 0?d.drawImage(vt,v,k,R,I):d.drawImage(vt,v,k,R,I,U,F,W,ee)},i=(d,l,v=e,k=t,R={})=>{let{height:I,width:U}=zo(d),F=u2(U,I,v,k),W=mt(l,R);s(W,d,F.sx,F.sy,F.sw,F.sh,F.dx,F.dy,F.dw,F.dh)},a=(d,l)=>{let v=n(l);return i(d,v),v},c=(d,l,v)=>{d.globalCompositeOperation=v,s(d,l,0,0)},u=(d,l,v)=>{let k=mt(d),R=0,I=5,U=1/(2*Math.PI*I*I),F=v<3?1:2;for(let W=-v;W<=v;W+=F)for(let ee=-v;ee<=v;ee+=F){let vt=U*Math.exp(-(ee*ee+W*W)/(2*I*I));R+=vt}for(let W=-v;W<=v;W+=F)for(let ee=-v;ee<=v;ee+=F)k.globalAlpha=U*Math.exp(-(ee*ee+W*W)/(2*I*I))/R*v,s(k,l,ee,W);k.globalAlpha=1},h=({image:d,blurAmount:l,canvas:v,preserveOldDrawing:k=!0})=>{let{height:R,width:I}=zo(d),U=mt(v);if(l<=0)return s(U,d,0,0,I,R);let F=n("downScaledCanvas"),W=mt(F);k||(W.clearRect(0,0,F.width,F.height),U.clearRect(0,0,I,R)),"filter"in U?(W.filter=`blur(${l}px)`,s(W,d,0,0,I,R,0,0,F.width,F.height),s(U,F,0,0,I,R)):u(v,d,l)},f=({image:d,blurAmount:l,offscreenCanvasName:v,preserveOldDrawing:k})=>{let R=n(v);return Ec(R),l===0?i(d,R):h({image:d,blurAmount:l,canvas:R,preserveOldDrawing:k}),R},m=(d,l,v)=>{let k=Array.isArray(d)?d[0]?.canvas:d.canvas;if(!k)return n("maskCanvas");let R=f({image:k,offscreenCanvasName:"maskCanvas",blurAmount:0});return v===0?R:f({image:R,blurAmount:v,offscreenCanvasName:"blurredMaskCanvas",preserveOldDrawing:!1})},b=(d,l,v,k,R=.5,I=3,U=3,F=!1)=>{let W=f({image:v,blurAmount:I,offscreenCanvasName:"blurredCanvas"}),ee=mt(d);if(Array.isArray(k)&&k.length===0)return s(ee,W,0,0);let vt=m(k,R,U);ee.save(),F&&Tc(d);let{height:E2,width:b2}=zo(l);s(ee,l,0,0,b2,E2),c(ee,vt,"destination-in"),c(ee,W,"destination-over"),ee.restore()};return{evaluateInput:d=>a(d,"inputCanvas"),renderImageToCanvas:i,drawBlurEffect:(d,l,v,k=.5,R=3,I=3,U=!1)=>b(d,l,l,v,k,R,I,U),drawOverlayEffect:(d,l,v,k,R=.5,I=0,U=3,F=!1)=>b(d,l,v,k,R,I,U,F),renderImageToOffScreenCanvas:a,renderImageDataToOffScreenCanvas:o,drawAndBlurImageOnOffScreenCanvas:f}};var dn={VertexShader:WebGLRenderingContext.VERTEX_SHADER,FragmentShader:WebGLRenderingContext.FRAGMENT_SHADER},Yo={[dn.VertexShader]:"VertexShader",[dn.FragmentShader]:"FragmentShader"},bc=e=>typeof e=="string"?e.startsWith("#version 300 es"):!1,l2=e=>{if(!bc(e))throw new Error("Expecting GLSL ES 3.00 shader source")},xc=/ERROR:\s*\d+:(\d+)/gi;function p2(e,t="",r=0){let n=[...t.matchAll(xc)],o=new Map(n.map((s,i)=>{if(!s[1]||s.index===void 0)return[0,t];let a=parseInt(s[1],10),c=n[i+1],u=c?c.index:t.length,h=t.substring(s.index,u);return[a-1,h]}));return e.split(`
|
|
42
|
+
`).map((s,i)=>{let a=o.get(i);return`${i+1+r}: ${s}${a?`
|
|
43
43
|
|
|
44
44
|
^^^ ${a}`:""}`}).join(`
|
|
45
|
-
`)}var
|
|
46
|
-
${
|
|
47
|
-
${t.map(a=>{let c=
|
|
45
|
+
`)}var f2=(e,t,r)=>{let n=e.createShader(t);if(!n)throw new Error(`Unable to create ${Yo[t]}`);if(e.shaderSource(n,r),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS)){let s=e.getShaderInfoLog(n);e.deleteShader(n);let i=`Error compiling ${Yo[t]}: ${s??""}
|
|
46
|
+
${s?p2(r,s):"no error message available"}`;throw new Error(i)}return n},Ac=(e,t,r,n)=>{let o=e.createProgram();if(!o)throw new Error("Unable to create WebGL program");if(t.forEach(function(i){e.attachShader(o,i)}),r?.forEach(function(i,a){let c=n?.[a]??a;e.bindAttribLocation(o,c,i)}),e.linkProgram(o),!e.getProgramParameter(o,e.LINK_STATUS)){let i=e.getProgramInfoLog(o);throw e.deleteProgram(o),new Error(`Error in program linking: ${i??""}
|
|
47
|
+
${t.map(a=>{let c=p2(e.getShaderSource(a)??""),u=e.getShaderParameter(a,e.SHADER_TYPE);return`${Yo[u]}:
|
|
48
48
|
${c}`}).join(`
|
|
49
|
-
`)}`)}return[
|
|
49
|
+
`)}`)}return[o,()=>{t.forEach(i=>{e.detachShader(o,i),e.deleteShader(i)}),e.deleteProgram(o)}]},wc=(e,[t,r],n,o)=>Ac(e,[f2(e,dn.VertexShader,t),f2(e,dn.FragmentShader,r)],n,o),Rt=e=>{let t=e.createTexture();return 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,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),t},d2=(e,t,r)=>Object.keys(r).reduce((n,o)=>{let i=r[o];return i?{...n,[o]:i.startsWith("u_")?e.getUniformLocation(t,i):e.getAttribLocation(t,i)}:n},{}),gt=(e,{attribs:t,uniforms:r,vertexSrc:n,fragmentSrc:o})=>{let s=e.getContext("webgl2",{premultipliedAlpha:!1});if(!s)throw new Error("WebGL2 is not supported");s.enable(s.BLEND),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),l2(n),l2(o);let[i,a]=wc(s,[n,o]);return{gl:s,program:i,attribLocations:d2(s,i,t),uniformLocations:d2(s,i,r),release:a}},Ko=e=>({texture:e.getAsWebGLTexture(),width:e.width,height:e.height});var fe={projection:(e,t,r=-1)=>[2/e,0,0,0,2/t*r,0,-1,1*-r,1],translation:(e,t)=>[1,0,0,0,1,0,e,t,1],rotation:e=>{let t=Math.cos(e),r=Math.sin(e);return[t,-r,0,r,t,0,0,0,1]},scaling:(e,t)=>[e,0,0,0,t,0,0,0,1],multiply:(e,t)=>{let r=e[0],n=e[0*3+1],o=e[0*3+2],s=e[1*3+0],i=e[1*3+1],a=e[1*3+2],c=e[2*3+0],u=e[2*3+1],h=e[2*3+2],f=t[0*3+0],m=t[0*3+1],b=t[0*3+2],A=t[1*3+0],x=t[1*3+1],N=t[1*3+2],d=t[2*3+0],l=t[2*3+1],v=t[2*3+2];return[f*r+m*s+b*c,f*n+m*i+b*u,f*o+m*a+b*h,A*r+x*s+N*c,A*n+x*i+N*u,A*o+x*a+N*h,d*r+l*s+v*c,d*n+l*i+v*u,d*o+l*a+v*h]},translate:(e,t,r)=>fe.multiply(e,fe.translation(t,r)),rotate:(e,t)=>fe.multiply(e,fe.rotation(t)),scale:(e,t,r)=>fe.multiply(e,fe.scaling(t,r))};var yt=`#version 300 es
|
|
50
50
|
// an attribute is an input (in) to a vertex shader.
|
|
51
51
|
// It will receive data from a buffer
|
|
52
52
|
in vec2 a_position;
|
|
@@ -64,7 +64,7 @@ void main() {
|
|
|
64
64
|
// pass the texCoord to the fragment shader
|
|
65
65
|
v_texCoord = a_texCoord;
|
|
66
66
|
}
|
|
67
|
-
`;var
|
|
67
|
+
`;var pn=`#version 300 es
|
|
68
68
|
precision mediump float;
|
|
69
69
|
|
|
70
70
|
// Passed in from the vertex shader.
|
|
@@ -79,7 +79,7 @@ out vec4 outColor;
|
|
|
79
79
|
void main() {
|
|
80
80
|
outColor = texture(u_texture, v_texCoord);
|
|
81
81
|
}
|
|
82
|
-
`;var
|
|
82
|
+
`;var $o=e=>{let{gl:t,program:r,attribLocations:n,uniformLocations:o,release:s}=gt(e,{attribs:{position:"a_position",texCoord:"a_texCoord"},uniforms:{matrix:"u_matrix",texture:"u_texture"},vertexSrc:yt,fragmentSrc:pn}),i=t.createVertexArray();t.bindVertexArray(i);let a=t.createBuffer();t.enableVertexAttribArray(n.position),t.bindBuffer(t.ARRAY_BUFFER,a),t.vertexAttribPointer(n.position,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),t.STATIC_DRAW);let c=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),t.STATIC_DRAW),t.enableVertexAttribArray(n.texCoord),t.vertexAttribPointer(n.texCoord,2,t.FLOAT,!1,0,0);let u=Rt(t),h=Rt(t);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e.width,e.height,0,t.RGBA,t.UNSIGNED_BYTE,null);let f=t.createFramebuffer();return t.bindFramebuffer(t.FRAMEBUFFER,f),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,h,0),{render:m=>{t.bindFramebuffer(t.FRAMEBUFFER,f),t.viewport(0,0,e.width,e.height),t.clearColor(0,0,0,1),t.clear(t.COLOR_BUFFER_BIT),t.useProgram(r),t.bindVertexArray(i),t.uniform1i(o.texture,0);let b=fe.projection(1,1,1);return t.uniformMatrix3fv(o.matrix,!1,b),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,u),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,m.frame),t.generateMipmap(t.TEXTURE_2D),t.drawArrays(t.TRIANGLES,0,6),ye(h),{texture:h,width:e.width,height:e.height}},release:()=>{t.deleteBuffer(a),t.deleteBuffer(c),t.deleteTexture(u),t.deleteTexture(h),t.deleteVertexArray(i),s()}}};var m2=`#version 300 es
|
|
83
83
|
precision mediump float;
|
|
84
84
|
|
|
85
85
|
// our textures
|
|
@@ -123,7 +123,7 @@ void main() {
|
|
|
123
123
|
}
|
|
124
124
|
outColor = Upsample(u_frame, v_texCoord, halfpixel);
|
|
125
125
|
}
|
|
126
|
-
`;var
|
|
126
|
+
`;var Rc=c2(1,9),qo=(e,t)=>{let{gl:r,program:n,attribLocations:o,uniformLocations:s,release:i}=gt(e,{attribs:{position:"a_position",texCoord:"a_texCoord"},uniforms:{matrix:"u_matrix",downsampling:"u_downsampling",frame:"u_frame"},vertexSrc:yt,fragmentSrc:m2}),a=r.createVertexArray();r.bindVertexArray(a);let c=r.createBuffer();r.enableVertexAttribArray(o.position),r.bindBuffer(r.ARRAY_BUFFER,c),r.vertexAttribPointer(o.position,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),r.STATIC_DRAW);let u=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,u),r.bufferData(r.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),r.STATIC_DRAW),r.enableVertexAttribArray(o.texCoord),r.vertexAttribPointer(o.texCoord,2,r.FLOAT,!1,0,0);let h=(A,x,N)=>{r.bindFramebuffer(r.FRAMEBUFFER,A),r.viewport(0,0,x,N)},f=A=>{let x=Rt(r);ye(x);let N=Math.trunc(e.width/Math.pow(2,A)),d=Math.trunc(e.height/Math.pow(2,A));r.texImage2D(r.TEXTURE_2D,0,r.RGBA,N,d,0,r.RGBA,r.UNSIGNED_BYTE,null);let l=r.createFramebuffer();ye(l),r.bindFramebuffer(r.FRAMEBUFFER,l);let v=r.COLOR_ATTACHMENT0;return r.framebufferTexture2D(r.FRAMEBUFFER,v,r.TEXTURE_2D,x,0),{texture:x,frameBuffer:l,width:N,height:d}},m=(A,x=0)=>{let N=Math.max(Rc(x+A)-x,0);return Array.from({length:N}).map((d,l)=>f(x+l))},b=m(t+1);return{render:(A,x)=>{r.useProgram(n),r.bindVertexArray(a),r.activeTexture(r.TEXTURE0),r.uniform1i(s.frame,0),r.bindTexture(r.TEXTURE_2D,A.texture),r.uniform1i(s.downsampling,1);let N=x+1;for(N>b.length&&m(N-b.length,b.length).forEach(d=>b.push(d));N<b.length;){let d=b.pop();r.deleteTexture(d?.texture??null),r.deleteFramebuffer(d?.frameBuffer??null)}for(let d=1;d<N;d++){let{frameBuffer:l=null,texture:v=null,width:k=e.width,height:R=e.height}=b[d]??{};h(l,k,R);let I=fe.projection(1,1,1);r.uniformMatrix3fv(s.matrix,!1,I),r.drawArrays(r.TRIANGLES,0,6);let U=r.checkFramebufferStatus(r.FRAMEBUFFER);if(U!==r.FRAMEBUFFER_COMPLETE)throw new Error(`downsampling FrameBuffer Status: ${U}`);r.bindTexture(r.TEXTURE_2D,v)}r.uniform1i(s.downsampling,0);for(let d=x-1;d>=0;d--){let{frameBuffer:l=null,texture:v=null,width:k=e.width,height:R=e.height}=b[d]??{};h(l,k,R);let I=fe.projection(1,1,1);r.uniformMatrix3fv(s.matrix,!1,I),r.drawArrays(r.TRIANGLES,0,6);let U=r.checkFramebufferStatus(r.FRAMEBUFFER);if(U!==r.FRAMEBUFFER_COMPLETE)throw new Error(`Upsampling FrameBuffer Status: ${U}`);r.bindTexture(r.TEXTURE_2D,v)}return{texture:b[0]?.texture??A.texture,width:b[0]?.width??A.width,height:b[0]?.height??A.height}},release:()=>{b.forEach(({frameBuffer:A,texture:x})=>{r.deleteTexture(x),r.deleteFramebuffer(A)}),r.deleteBuffer(c),r.deleteBuffer(u),r.deleteVertexArray(a),i()}}};var g2=`#version 300 es
|
|
127
127
|
precision mediump float;
|
|
128
128
|
|
|
129
129
|
// our textures
|
|
@@ -185,4 +185,4 @@ void main() {
|
|
|
185
185
|
|
|
186
186
|
outColor = mix(background, foreground, filteredMask);
|
|
187
187
|
}
|
|
188
|
-
`;var
|
|
188
|
+
`;var y2=e=>{let{gl:t,program:r,attribLocations:n,uniformLocations:o,release:s}=gt(e,{attribs:{position:"a_position",texCoord:"a_texCoord"},uniforms:{matrix:"u_matrix",frameBackground:"u_frame_background",frameForeground:"u_frame_foreground",mask:"u_mask",maskCombineRatio:"u_mask_combine_ratio",foregroundThreshold:"u_foreground_threshold",prevMask:"u_mask_prev"},vertexSrc:yt,fragmentSrc:g2});t.enable(t.BLEND);let i=t.createVertexArray();t.bindVertexArray(i);let a=t.createBuffer();t.enableVertexAttribArray(n.position),t.bindBuffer(t.ARRAY_BUFFER,a),t.vertexAttribPointer(n.position,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),t.STATIC_DRAW);let c=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),t.STATIC_DRAW),t.enableVertexAttribArray(n.texCoord),t.vertexAttribPointer(n.texCoord,2,t.FLOAT,!1,0,0);let u=Rt(t);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e.width,e.height,0,t.RGBA,t.UNSIGNED_BYTE,null);let h=t.createFramebuffer();return t.bindFramebuffer(t.FRAMEBUFFER,h),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,u,0),{render:({mask:f,prevMask:m,foreground:b,background:A},x)=>{t.bindFramebuffer(t.FRAMEBUFFER,h),t.viewport(0,0,e.width,e.height),t.useProgram(r),t.bindVertexArray(i),t.activeTexture(t.TEXTURE0),t.uniform1i(o.frameForeground,0),t.bindTexture(t.TEXTURE_2D,b.texture),t.activeTexture(t.TEXTURE1),t.uniform1i(o.frameBackground,1),t.bindTexture(t.TEXTURE_2D,A.texture),t.activeTexture(t.TEXTURE2),t.uniform1i(o.mask,2),t.bindTexture(t.TEXTURE_2D,f.texture),t.activeTexture(t.TEXTURE3),t.uniform1i(o.prevMask,3),t.bindTexture(t.TEXTURE_2D,m?.texture??f.texture);let N=fe.projection(1,1,1);return t.uniformMatrix3fv(o.matrix,!1,N),t.uniform1f(o.maskCombineRatio,x.maskCombineRatio),t.uniform1f(o.foregroundThreshold,x.foregroundThreshold),t.drawArrays(t.TRIANGLES,0,6),ye(u),{texture:u,width:e.width,height:e.height}},release:()=>{t.deleteBuffer(a),t.deleteBuffer(c),t.deleteTexture(u),t.deleteFramebuffer(h),t.deleteVertexArray(i),s()}}};var v2=e=>{let{gl:t,program:r,attribLocations:n,uniformLocations:o,release:s}=gt(e,{attribs:{position:"a_position",texCoord:"a_texCoord"},uniforms:{matrix:"u_matrix",texture:"u_texture"},vertexSrc:yt,fragmentSrc:pn}),i=t.createVertexArray();t.bindVertexArray(i);let a=t.createBuffer();t.enableVertexAttribArray(n.position),t.bindBuffer(t.ARRAY_BUFFER,a),t.vertexAttribPointer(n.position,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),t.STATIC_DRAW);let c=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),t.STATIC_DRAW),t.enableVertexAttribArray(n.texCoord),t.vertexAttribPointer(n.texCoord,2,t.FLOAT,!1,0,0),{render:u=>{t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,e.width,e.height),t.clearColor(0,0,0,1),t.clear(t.COLOR_BUFFER_BIT),t.useProgram(r),t.bindVertexArray(i),t.uniform1i(o.texture,0);let h=fe.projection(1,1);t.uniformMatrix3fv(o.matrix,!1,h),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,u.texture),t.drawArrays(t.TRIANGLES,0,6)},release:()=>{t.deleteBuffer(a),t.deleteBuffer(c),t.deleteVertexArray(i),s()}}};var _2=e=>{let t={};return new Proxy(t,{get(r,n,o){return r[n]||(r[n]=e[n]?.(t)),Reflect.get(r,n,o)}})},T2=(e=new OffscreenCanvas(768,432),{backgroundBlurAmount:t=3,backgroundImageUrl:r="",edgeBlurAmount:n=3,effects:o=s2.None,foregroundThreshold:s=.5,maskCombineRatio:i=.5,onError:a,backgroundImageInits:c}={})=>{let u={videoFrameRenderer:()=>$o(e),canvasRenderer:()=>v2(e),backgroundImageRenderer:()=>$o(e),blendRenderer:()=>y2(e),blurRenderer:()=>qo(e,f.backgroundBlurAmount),maskBlurRenderer:()=>qo(e,f.edgeBlurAmount),release:l=>()=>Object.keys(l).forEach(v=>v!=="release"&&l[v]?.release())},h=_2(u),f={backgroundBlurAmount:t,backgroundImageUrl:r,edgeBlurAmount:n,effects:o,foregroundThreshold:s,maskCombineRatio:i,canvas:e,backgroundImages:a2(c),get videoFrameRenderer(){return h.videoFrameRenderer},get canvasRenderer(){return h.canvasRenderer},get backgroundImageRenderer(){return h.backgroundImageRenderer},get blendRenderer(){return h.blendRenderer},get blurRenderer(){return h.blurRenderer},get maskBlurRenderer(){return h.maskBlurRenderer}},m=i2(f),b=l=>{l.backgroundImage&&f.backgroundImages.setImage(l.backgroundImage.key,l.backgroundImage.image),m(l)},A=l=>{if(l instanceof Error)return a?.(l);throw l};return{init:l=>{l&&b(l)},render:(l,v,k)=>{k&&m(k);let R=f.videoFrameRenderer.render(v),I=R;if(f.effects==="blur"&&f.backgroundBlurAmount)I=f.blurRenderer.render(R,f.backgroundBlurAmount);else if(f?.effects==="overlay"&&f.backgroundImageUrl){let F=f.backgroundImages.getImage(f.backgroundImageUrl);F?I=f.backgroundImageRenderer.render({frame:F,timestamp:performance.now(),width:F.width,height:F.height}):f.backgroundImages.tryFetchingImage(f.backgroundImageUrl).catch(W=>{A(new Error(`FailedToLoadBackgroundImage: ${f.backgroundImageUrl}`,{cause:W}))})}let U=f.blendRenderer.render({prevMask:f.prevMask&&Ko(f.prevMask),mask:Ko(l),foreground:R,background:I},f);f.canvasRenderer.render(U),f.prevMask?.close(),f.prevMask=l.clone()},release:()=>{h.release(),h=_2(u),f.backgroundImages.clear(),f.prevMask?.close(),f.prevMask=void 0},update:b}};var E={width:768,height:432,status:qe.New,directOutput:!1},zt=(e,t)=>postMessage(e,t??[]),Lc=async(e={})=>{try{E.status=qe.Opening,e.processingWidth&&(E.width=e.processingWidth),e.processingHeight&&(E.height=e.processingHeight),E.directOutput=!!e.output,E.output=e.output??vr(E.width,E.height);let{basePath:t,imageSegmenterOptions:r={}}=e;E.processCanvas=r.canvas??vr(E.width,E.height),E.renderer=T2(E.processCanvas,{...e.renderOptions,backgroundImageInits:e.backgroundImage&&[[e.backgroundImage.key,e.backgroundImage.image]],onError:s=>{zt({type:"error",error:s})}}),E.renderer.init();let n=await nt.forVisionTasks(t),o=await ie.createFromOptions(n,{outputCategoryMask:!1,outputConfidenceMasks:!0,runningMode:"VIDEO",canvas:E.processCanvas,baseOptions:{modelAssetPath:r.modelAsset?.path,delegate:r.delegate}});E.renderUtils=h2(E.width,E.height),E.segmenter=o,E.status=qe.Opened,zt({type:"opened"})}catch(t){if(E.status=qe.Error,t instanceof Error)return zt({type:"error",error:t});throw t}};self.addEventListener("message",e=>{switch(e.data.type){case"open":{Lc(e.data.data);break}case"update":{let{renderOptions:t,backgroundImage:r,output:n}=e.data.data;(t||r)&&E.renderer?.update({...t,backgroundImage:r}),n!==void 0&&(E.output=n??vr(E.width,E.height),E.directOutput=!!n);break}case"process":{E.status=qe.Processing;let{videoFrame:t,imageSegmenterOptions:r,renderOptions:n}=e.data.data;E.videoFrame=t,ye(E.segmenter),(r?.delegate||r?.canvas)&&E.segmenter.setOptions({canvas:r.canvas,baseOptions:{delegate:r.delegate}}).catch(o=>{E.status=qe.Error,o instanceof Error&&zt({type:"error",error:o})}),ye(E.renderUtils),E.segmenter.segmentForVideo(E.renderUtils.renderImageToOffScreenCanvas(t.frame,"inputCanvas"),t.timestamp,o=>{let{confidenceMasks:s}=o,i=s?.[0];if(!i)zt({type:"processed"});else{ye(E.output),ye(E.renderer),ye(E.renderUtils),ye(E.processCanvas),E.renderer.render(i,t,n),E.renderUtils.renderImageToCanvas(E.processCanvas,E.output,E.width,E.height),t.frame.close();let a=E.directOutput?void 0:E.output.transferToImageBitmap();zt({type:"processed",data:a&&{frame:a,width:E.output.width,height:E.output.height,timestamp:performance.now()}},a?[a]:void 0)}E.status=qe.Idle});break}case"close":{E.status=qe.Closing,E.renderer?.release(),E.videoFrame?.frame.close(),E.segmenter?.close(),E.status=qe.Closed;break}case"destroy":break}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es5.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2016.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2023.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.esnext.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.webworker.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.decorators.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../src/workers/global.d.ts","../../../../.yarn/cache/@mediapipe-tasks-vision-npm-0.10.12-e5cc5c3d72-ebf75a39e3.zip/node_modules/@mediapipe/tasks-vision/vision.d.ts","../common/constants.d.ts","../../../../.yarn/cache/@types-offscreencanvas-npm-2019.7.3-a966f946e3-53a394a65a.zip/node_modules/@types/offscreencanvas/index.d.ts","../common/types/segmentation.d.ts","../common/types/media.d.ts","../common/types/render.d.ts","../common/types/messageEvents.d.ts","../common/types/processor.d.ts","../common/canvasRenderUtils.d.ts","../common/utils.d.ts","../common/backends/webgl/renderer.d.ts","../../src/workers/mediaWorker.ts","../../../../.yarn/cache/@types-audioworklet-npm-0.0.41-ec4bc90857-2bfd761ab7.zip/node_modules/@types/audioworklet/iterable.d.ts","../../../../.yarn/cache/@types-audioworklet-npm-0.0.41-ec4bc90857-2bfd761ab7.zip/node_modules/@types/audioworklet/index.d.ts","../../../../.yarn/cache/@types-dom-webcodecs-npm-0.1.10-02a2fa8a5c-dd7b1410da.zip/node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts","../../../../.yarn/cache/@types-dom-webcodecs-npm-0.1.10-02a2fa8a5c-dd7b1410da.zip/node_modules/@types/dom-webcodecs/index.d.ts","../../../../.yarn/cache/@types-trusted-types-npm-2.0.6-c4c3cd363b-04250c7175.zip/node_modules/@types/trusted-types/lib/index.d.ts","../../../../.yarn/cache/@types-trusted-types-npm-2.0.6-c4c3cd363b-04250c7175.zip/node_modules/@types/trusted-types/index.d.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","bed7b7ba0eb5a160b69af72814b4dde371968e40b6c5e73d3a9f7bee407d158c",{"version":"5746fca0ef5189a855357e258108524603574457c811ce8143e3279efde9f5b6","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"86a34c7a13de9cabc43161348f663624b56871ed80986e41d214932ddd8d6719","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"4350e5922fecd4bedda2964d69c213a1436349d0b8d260dd902795f5b94dc74b","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"eb92e62eb9d695e81dc79631048ac175cc883999931aed97677610b4df97630c","affectsGlobalScope":true},"2bfb92d43dafd092266c1ba5c4048e59dc0730d393c87b185f4618da11a0e45b","d54f7ec4fd9014241946eba0afae7eedce54b6a2bacd11bb45beaa4e1aba5eab",{"version":"921394bdf2d9f67c9e30d98c4b1c56a899ac06770e5ce3389f95b6b85a58e009","affectsGlobalScope":true},"1f18d5c5b09877bd4bbc23925b3e565c45562db3a1101aed386a290ef6994b4d","a8c26adbb4381a5434218f5b71e4046d90a5ea69fc7a921fe4b04d238796763d","f619393aa4d956552141074b1abf284197acdfe8360c6bf70701919f52979475","6971a1c1d85e303aec5977bc6cdd0cb69b0a0dadfc99876493ac7ecbd9988f25","b85b0e5aac0caaa83157b8e1d6c7f907df1c193694f1aee2ab033adca5b585b4","43187e85542faa586562489e51d75cd5c880e770d95f76ae16b2cc20d19dd5bd","a8bf4d5c321c6a5c9bf359dc4db5d28c8e41bfa493a4fcc9a5980b2904aba08b","ebbb2de3a3b02d66ae958deb69d66fbfdd4bdff577e2ac5403218dd377c6fd40",{"version":"896bf0eb9e8f0d3c5093d7800bbc164158a21b602c0c05cb8c9c243d09bc09d7","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"b38d0bfd2d1c1536d40fc5941fab5c5dd2749fb874fb57c451211ab806a3be8a","affectsGlobalScope":true},{"version":"8c63699627e2dd957f31dddfaf644a96ccf92eec6e9277a430421ae2d7e98b00","affectsGlobalScope":true},{"version":"da4a8f6629bc630a6b85d0899ca3f610402794a1535d3eb8be826acef5efedfb","affectsGlobalScope":true},{"version":"3c57b01d6648405ea1784c0176e2ad77f77568e7a84d5cb4fc8eefabf00ca22b","affectsGlobalScope":true},"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e",{"version":"a4a5a79b9d9b4e4dfa18279d85686fac7eb155b828ddf7a677ceb57f9384f043","affectsGlobalScope":true}],"root":[65,77],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":false,"esModuleInterop":true,"jsx":2,"module":99,"noImplicitAny":true,"noUncheckedIndexedAccess":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true,"sourceMap":false,"strict":true,"target":7},"fileIdsList":[[78],[80],[82],[70,71],[70],[69,70,71,72],[67,69,70],[68],[69,70],[66,67,70,71,73,74,75,76]],"referencedMap":[[79,1],[81,2],[83,3],[76,4],[74,5],[73,6],[71,7],[69,8],[75,9],[77,10]],"exportedModulesMap":[[79,1],[81,2],[83,3],[76,4],[74,5],[73,6],[71,7],[69,8],[75,9]],"semanticDiagnosticsPerFile":[66,79,78,81,80,68,83,82,63,64,14,13,2,15,16,17,18,19,20,21,22,3,4,23,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,59,10,1,11,62,61,60,12,76,74,67,70,72,73,71,69,75,65,77],"latestChangedDtsFile":"./mediaWorker.d.ts"},"version":"5.3.3"}
|
|
1
|
+
{"program":{"fileNames":["../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es5.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2016.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2023.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.esnext.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.webworker.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.decorators.d.ts","../../../../.yarn/cache/typescript-patch-4778c7998b-c93786fcc9.zip/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../src/workers/global.d.ts","../../../../.yarn/cache/@mediapipe-tasks-vision-npm-0.10.14-e3f194e250-59bd0e5da5.zip/node_modules/@mediapipe/tasks-vision/vision.d.ts","../common/constants.d.ts","../../../../.yarn/cache/@types-offscreencanvas-npm-2019.7.3-a966f946e3-53a394a65a.zip/node_modules/@types/offscreencanvas/index.d.ts","../common/types/segmentation.d.ts","../common/types/media.d.ts","../common/types/render.d.ts","../common/types/messageEvents.d.ts","../common/types/processor.d.ts","../common/canvasRenderUtils.d.ts","../common/utils.d.ts","../common/backends/webgl/renderer.d.ts","../../src/workers/mediaWorker.ts","../../../../.yarn/cache/@types-audioworklet-npm-0.0.41-ec4bc90857-2bfd761ab7.zip/node_modules/@types/audioworklet/iterable.d.ts","../../../../.yarn/cache/@types-audioworklet-npm-0.0.41-ec4bc90857-2bfd761ab7.zip/node_modules/@types/audioworklet/index.d.ts","../../../../.yarn/cache/@types-dom-webcodecs-npm-0.1.10-02a2fa8a5c-dd7b1410da.zip/node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts","../../../../.yarn/cache/@types-dom-webcodecs-npm-0.1.10-02a2fa8a5c-dd7b1410da.zip/node_modules/@types/dom-webcodecs/index.d.ts","../../../../.yarn/cache/@types-trusted-types-npm-2.0.6-c4c3cd363b-04250c7175.zip/node_modules/@types/trusted-types/lib/index.d.ts","../../../../.yarn/cache/@types-trusted-types-npm-2.0.6-c4c3cd363b-04250c7175.zip/node_modules/@types/trusted-types/index.d.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","bed7b7ba0eb5a160b69af72814b4dde371968e40b6c5e73d3a9f7bee407d158c",{"version":"5746fca0ef5189a855357e258108524603574457c811ce8143e3279efde9f5b6","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"86a34c7a13de9cabc43161348f663624b56871ed80986e41d214932ddd8d6719","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"4350e5922fecd4bedda2964d69c213a1436349d0b8d260dd902795f5b94dc74b","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"eb92e62eb9d695e81dc79631048ac175cc883999931aed97677610b4df97630c","affectsGlobalScope":true},"fc8a3cf4a55f7d1ae3f2efdda84bbeaeea605a92e535ac52b99deed6366917d5","d54f7ec4fd9014241946eba0afae7eedce54b6a2bacd11bb45beaa4e1aba5eab",{"version":"921394bdf2d9f67c9e30d98c4b1c56a899ac06770e5ce3389f95b6b85a58e009","affectsGlobalScope":true},"1f18d5c5b09877bd4bbc23925b3e565c45562db3a1101aed386a290ef6994b4d","a8c26adbb4381a5434218f5b71e4046d90a5ea69fc7a921fe4b04d238796763d","f619393aa4d956552141074b1abf284197acdfe8360c6bf70701919f52979475","6971a1c1d85e303aec5977bc6cdd0cb69b0a0dadfc99876493ac7ecbd9988f25","b85b0e5aac0caaa83157b8e1d6c7f907df1c193694f1aee2ab033adca5b585b4","43187e85542faa586562489e51d75cd5c880e770d95f76ae16b2cc20d19dd5bd","a8bf4d5c321c6a5c9bf359dc4db5d28c8e41bfa493a4fcc9a5980b2904aba08b","ebbb2de3a3b02d66ae958deb69d66fbfdd4bdff577e2ac5403218dd377c6fd40",{"version":"e0b14dc5f03f86743266af64c8de3a0a086a361e398741d31b396648db664e15","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"b38d0bfd2d1c1536d40fc5941fab5c5dd2749fb874fb57c451211ab806a3be8a","affectsGlobalScope":true},{"version":"8c63699627e2dd957f31dddfaf644a96ccf92eec6e9277a430421ae2d7e98b00","affectsGlobalScope":true},{"version":"da4a8f6629bc630a6b85d0899ca3f610402794a1535d3eb8be826acef5efedfb","affectsGlobalScope":true},{"version":"3c57b01d6648405ea1784c0176e2ad77f77568e7a84d5cb4fc8eefabf00ca22b","affectsGlobalScope":true},"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e",{"version":"a4a5a79b9d9b4e4dfa18279d85686fac7eb155b828ddf7a677ceb57f9384f043","affectsGlobalScope":true}],"root":[65,77],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":false,"esModuleInterop":true,"jsx":2,"module":99,"noImplicitAny":true,"noUncheckedIndexedAccess":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true,"sourceMap":false,"strict":true,"target":7},"fileIdsList":[[78],[80],[82],[70,71],[70],[69,70,71,72],[67,69,70],[68],[69,70],[66,67,70,71,73,74,75,76]],"referencedMap":[[79,1],[81,2],[83,3],[76,4],[74,5],[73,6],[71,7],[69,8],[75,9],[77,10]],"exportedModulesMap":[[79,1],[81,2],[83,3],[76,4],[74,5],[73,6],[71,7],[69,8],[75,9]],"semanticDiagnosticsPerFile":[66,79,78,81,80,68,83,82,63,64,14,13,2,15,16,17,18,19,20,21,22,3,4,23,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,59,10,1,11,62,61,60,12,76,74,67,70,72,73,71,69,75,65,77],"latestChangedDtsFile":"./mediaWorker.d.ts"},"version":"5.3.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pexip/media-processor",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.1.0",
|
|
4
4
|
"description": "Media processor for video and audio",
|
|
5
5
|
"homepage": "https://gitlab.com/pexip/zoo",
|
|
6
6
|
"bugs": "https://gitlab.com/pexip/zoo/issues",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"update-tasks-vision-assets": "unzip -jo ../../.yarn/cache/@mediapipe-tasks-vision-npm-* \"*/wasm/*\" \"*.json\" -d ../media-assets/@mediapipe/tasks-vision/wasm/"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@mediapipe/tasks-vision": "^0.10.
|
|
46
|
+
"@mediapipe/tasks-vision": "^0.10.14",
|
|
47
47
|
"@pexip/denoise": "16.4.0",
|
|
48
48
|
"@pexip/utils": "16.11.0"
|
|
49
49
|
},
|