@needle-tools/facefilter
Version:
Create FaceFilter effects with Needle Engine and Mediapipe
1 lines • 211 kB
JavaScript
import{Renderer as V0,OneEuroFilter as G0,serializable as I,Behaviour as ue,AssetReference as He,isDevEnvironment as Tn,NEEDLE_progressive as En,Mathf as kn,Animator as W0,getIconElement as An,showBalloonMessage as ze,showBalloonError as Ai,hasProLicense as ds,ObjectUtils as Fn,getParam as de,setParamWithoutReload as Xe,PromiseAllWithErrors as H0,ClearFlags as z0,isMobileDevice as X0,GameObject as Ke,instantiate as fs,findObjectOfType as K0,Application as ps,syncField as Y0,makeIdFromRandomWords as $0,showBalloonWarning as q0,TypeStore as it,onStart as J0}from"@needle-tools/engine";import{Matrix4 as rt,MeshBasicMaterial as Fi,DoubleSide as ms,Object3D as qt,Mesh as Si,SkinnedMesh as Q0,TextureLoader as Sn,PerspectiveCamera as gs,Vector3 as Wt,VideoTexture as _s,Texture as fe,ShaderMaterial as Mn,BufferGeometry as Z0,BufferAttribute as vs,Material as t2,Vector4 as ys}from"three";var Ye=typeof self<"u"?self:{};function ws(t){t:{for(var e=["CLOSURE_FLAGS"],n=Ye,i=0;i<e.length;i++)if((n=n[e[i]])==null){e=null;break t}e=n}return(t=e&&e[t])!=null&&t}function pe(){throw Error("Invalid UTF8")}function bs(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}let Cn,Mi;const e2=typeof TextDecoder<"u";let n2;const i2=typeof TextEncoder<"u";function xs(t){if(i2)t=(n2||=new TextEncoder).encode(t);else{let n=0;const i=new Uint8Array(3*t.length);for(let r=0;r<t.length;r++){var e=t.charCodeAt(r);if(128>e)i[n++]=e;else{if(2048>e)i[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&r<t.length){const s=t.charCodeAt(++r);if(56320<=s&&57343>=s){e=1024*(e-55296)+s-56320+65536,i[n++]=e>>18|240,i[n++]=e>>12&63|128,i[n++]=e>>6&63|128,i[n++]=63&e|128;continue}r--}e=65533}i[n++]=e>>12|224,i[n++]=e>>6&63|128}i[n++]=63&e|128}}t=n===i.length?i:i.subarray(0,n)}return t}var $e,Ts=ws(610401301),r2=ws(188588736);const Es=Ye.navigator;function Ci(t){return!!Ts&&!!$e&&$e.brands.some(({brand:e})=>e&&e.indexOf(t)!=-1)}function gt(t){var e;return(e=Ye.navigator)&&(e=e.userAgent)||(e=""),e.indexOf(t)!=-1}function Jt(){return!!Ts&&!!$e&&0<$e.brands.length}function Li(){return Jt()?Ci("Chromium"):(gt("Chrome")||gt("CriOS"))&&!(!Jt()&>("Edge"))||gt("Silk")}function Ri(t){return Ri[" "](t),t}$e=Es&&Es.userAgentData||null,Ri[" "]=function(){};var s2=!Jt()&&(gt("Trident")||gt("MSIE"));!gt("Android")||Li(),Li(),gt("Safari")&&(Li()||!Jt()&>("Coast")||!Jt()&>("Opera")||!Jt()&>("Edge")||(Jt()?Ci("Microsoft Edge"):gt("Edg/"))||Jt()&&Ci("Opera"));var ks={},qe=null;function o2(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):"=.".indexOf(t[e-1])!=-1&&(n="=.".indexOf(t[e-2])!=-1?n-2:n-1);var i=new Uint8Array(n),r=0;return function(s,o){function a(v){for(;c<s.length;){var y=s.charAt(c++),w=qe[y];if(w!=null)return w;if(!/^[\s\xa0]*$/.test(y))throw Error("Unknown base64 encoding at char: "+y)}return v}As();for(var c=0;;){var h=a(-1),u=a(0),l=a(64),d=a(64);if(d===64&&h===-1)break;o(h<<2|u>>4),l!=64&&(o(u<<4&240|l>>2),d!=64&&o(l<<6&192|d))}}(t,function(s){i[r++]=s}),r!==n?i.subarray(0,r):i}function As(){if(!qe){qe={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var i=t.concat(e[n].split(""));ks[n]=i;for(var r=0;r<i.length;r++){var s=i[r];qe[s]===void 0&&(qe[s]=r)}}}}var Fs=typeof Uint8Array<"u",Ss=!s2&&typeof btoa=="function";function Ms(t){if(!Ss){var e;e===void 0&&(e=0),As(),e=ks[e];var n=Array(Math.floor(t.length/3)),i=e[64]||"";let c=0,h=0;for(;c<t.length-2;c+=3){var r=t[c],s=t[c+1],o=t[c+2],a=e[r>>2];r=e[(3&r)<<4|s>>4],s=e[(15&s)<<2|o>>6],o=e[63&o],n[h++]=a+r+s+o}switch(a=0,o=i,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||i;case 1:t=t[c],n[h]=e[t>>2]+e[(3&t)<<4|a>>4]+o+i}return n.join("")}for(e="",n=0,i=t.length-10240;n<i;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const Cs=/[-_.]/g,a2={"-":"+",_:"/",".":"="};function c2(t){return a2[t]||""}function Ls(t){if(!Ss)return o2(t);Cs.test(t)&&(t=t.replace(Cs,c2)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function Je(t){return Fs&&t!=null&&t instanceof Uint8Array}let h2;function Ln(){return h2||=new Uint8Array(0)}var xe={};let l2;function Rs(t){if(t!==xe)throw Error("illegal external caller")}function me(){return l2||=new Ht(null,xe)}function Oi(t){Rs(xe);var e=t.g;return(e=e==null||Je(e)?e:typeof e=="string"?Ls(e):null)==null?e:t.g=e}var Ht=class{constructor(t,e){if(Rs(e),this.g=t,t!=null&&t.length===0)throw Error("ByteString should be constructed with non-empty values")}h(){const t=Oi(this);return t?new Uint8Array(t):Ln()}};function Os(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function Pi(){return Error("Failed to read varint, encoding is invalid.")}function Ps(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function Di(t){if(typeof t=="string")return{buffer:Ls(t),P:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),P:!1};if(t.constructor===Uint8Array)return{buffer:t,P:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),P:!1};if(t.constructor===Ht)return{buffer:Oi(t)||Ln(),P:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.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 Ui(){return typeof BigInt=="function"}const u2=typeof Uint8Array.prototype.slice=="function";let Ds,C=0,H=0;function ge(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[i,r]=ji(n,t);t=r,n=i}C=n>>>0,H=t>>>0}function Ii(t){const e=Ds||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),H=0,C=e.getUint32(0,!0)}function Bi(t,e){return 4294967296*e+(t>>>0)}function Ni(t,e){const n=2147483648&e;return n&&(e=~e>>>0,(t=1+~t>>>0)==0&&(e=e+1>>>0)),t=Bi(t,e),n?-t:t}function Rn(t,e){if(t>>>=0,2097151>=(e>>>=0))var n=""+(4294967296*e+t);else Ui()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,1e7<=t&&(n+=Math.floor(t/1e7),t%=1e7),1e7<=n&&(e+=Math.floor(n/1e7),n%=1e7),n=e+Us(n)+Us(t));return n}function Us(t){return t=String(t),"0000000".slice(t.length)+t}function Is(){var t=C,e=H;if(2147483648&e)if(Ui())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,i]=ji(t,e);t="-"+Rn(n,i)}else t=Rn(t,e);return t}function On(t){if(16>t.length)ge(Number(t));else if(Ui())t=BigInt(t),C=Number(t&BigInt(4294967295))>>>0,H=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+(t[0]==="-");H=C=0;const n=t.length;for(let i=e,r=(n-e)%6+e;r<=n;i=r,r+=6){const s=Number(t.slice(i,r));H*=1e6,C=1e6*C+s,4294967296<=C&&(H+=Math.trunc(C/4294967296),H>>>=0,C>>>=0)}if(e){const[i,r]=ji(C,H);C=i,H=r}}}function ji(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Vi(t,e){let n,i=0,r=0,s=0;const o=t.h;let a=t.g;do n=o[a++],i|=(127&n)<<s,s+=7;while(32>s&&128&n);for(32<s&&(r|=(127&n)>>4),s=3;32>s&&128&n;s+=7)n=o[a++],r|=(127&n)<<s;if(_e(t,a),128>n)return e(i>>>0,r>>>0);throw Pi()}function Gi(t){let e=0,n=t.g;const i=n+10,r=t.h;for(;n<i;){const s=r[n++];if(e|=s,(128&s)==0)return _e(t,n),!!(127&e)}throw Pi()}function Qt(t){const e=t.h;let n=t.g,i=e[n++],r=127&i;if(128&i&&(i=e[n++],r|=(127&i)<<7,128&i&&(i=e[n++],r|=(127&i)<<14,128&i&&(i=e[n++],r|=(127&i)<<21,128&i&&(i=e[n++],r|=i<<28,128&i&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw Pi();return _e(t,n),r}function Zt(t){return Qt(t)>>>0}function Wi(t){var e=t.h;const n=t.g,i=e[n],r=e[n+1],s=e[n+2];return e=e[n+3],_e(t,t.g+4),(i<<0|r<<8|s<<16|e<<24)>>>0}function Hi(t){var e=Wi(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,n==255?e?NaN:1/0*t:n==0?t*Math.pow(2,-149)*e:t*Math.pow(2,n-150)*(e+Math.pow(2,23))}function d2(t){return Qt(t)}function zi(t,e,{ca:n=!1}={}){t.ca=n,e&&(e=Di(e),t.h=e.buffer,t.m=e.P,t.j=0,t.l=t.h.length,t.g=t.j)}function _e(t,e){if(t.g=e,e>t.l)throw Ps(t.l,e)}function Bs(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,i=n+e;if(i>t.l)throw Ps(e,t.l-n);return t.g=i,n}function Ns(t,e){if(e==0)return me();var n=Bs(t,e);return t.ca&&t.m?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?Ln():u2?t.slice(n,e):new Uint8Array(t.subarray(n,e))),n.length==0?me():new Ht(n,xe)}var js=[];function Vs(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=Zt(t.g);if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw Os(n,t.l);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function Pn(t){switch(t.h){case 0:t.h!=0?Pn(t):Gi(t.g);break;case 1:_e(t=t.g,t.g+8);break;case 2:if(t.h!=2)Pn(t);else{var e=Zt(t.g);_e(t=t.g,t.g+e)}break;case 5:_e(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!Vs(t))throw Error("Unmatched start-group tag: stream EOF");if(t.h==4){if(t.m!=e)throw Error("Unmatched end-group tag");break}Pn(t)}break;default:throw Os(t.h,t.l)}}function Qe(t,e,n){const i=t.g.l,r=Zt(t.g),s=t.g.g+r;let o=s-i;if(0>=o&&(t.g.l=s,n(e,t,void 0,void 0,void 0),o=s-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${r} bytes, instead read ${r-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=s,t.g.l=i,e}function Xi(t){var e=Zt(t.g),n=Bs(t=t.g,e);if(t=t.h,e2){var i,r=t;(i=Mi)||(i=Mi=new TextDecoder("utf-8",{fatal:!0})),e=n+e,r=n===0&&e===r.length?r:r.subarray(n,e);try{var s=i.decode(r)}catch(a){if(Cn===void 0){try{i.decode(new Uint8Array([128]))}catch{}try{i.decode(new Uint8Array([97])),Cn=!0}catch{Cn=!1}}throw!Cn&&(Mi=void 0),a}}else{e=(s=n)+e,n=[];let a,c=null;for(;s<e;){var o=t[s++];128>o?n.push(o):224>o?s>=e?pe():(a=t[s++],194>o||(192&a)!=128?(s--,pe()):n.push((31&o)<<6|63&a)):240>o?s>=e-1?pe():(a=t[s++],(192&a)!=128||o===224&&160>a||o===237&&160<=a||(192&(i=t[s++]))!=128?(s--,pe()):n.push((15&o)<<12|(63&a)<<6|63&i)):244>=o?s>=e-2?pe():(a=t[s++],(192&a)!=128||a-144+(o<<28)>>30!=0||(192&(i=t[s++]))!=128||(192&(r=t[s++]))!=128?(s--,pe()):(o=(7&o)<<18|(63&a)<<12|(63&i)<<6|63&r,o-=65536,n.push(55296+(o>>10&1023),56320+(1023&o)))):pe(),8192<=n.length&&(c=bs(c,n),n.length=0)}s=bs(c,n)}return s}function Gs(t){const e=Zt(t.g);return Ns(t.g,e)}function Dn(t,e,n){var i=Zt(t.g);for(i=t.g.g+i;t.g.g<i;)n.push(e(t.g))}var Un=[];function Ws(t){return t?/^\d+$/.test(t)?(On(t),new Hs(C,H)):null:f2||=new Hs(0,0)}var Hs=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let f2;function zs(t){return t?/^-?\d+$/.test(t)?(On(t),new Xs(C,H)):null:p2||=new Xs(0,0)}var Xs=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let p2;function In(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Ze(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Bn(t,e){if(0<=e)Ze(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function tn(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Te(t,e){e.length!==0&&(t.l.push(e),t.h+=e.length)}function _t(t,e,n){Ze(t.g,8*e+n)}function Ki(t,e){return _t(t,e,2),e=t.g.end(),Te(t,e),e.push(t.h),e}function Yi(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function Nn(t,e,n){_t(t,e,2),Ze(t.g,n.length),Te(t,t.g.end()),Te(t,n)}function $i(t,e,n,i){n!=null&&(e=Ki(t,e),i(n,t),Yi(t,e))}class Ee{constructor(e,n,i,r){this.g=e,this.h=n,this.l=i,this.pa=r}}function ht(t){return Array.prototype.slice.call(t)}function qi(t){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol():t}var Ct=qi(),Ks=qi("0di"),Ji=qi("2ex"),Qi=Ct?(t,e)=>{t[Ct]|=e}:(t,e)=>{t.g!==void 0?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})},jn=Ct?(t,e)=>{t[Ct]&=~e}:(t,e)=>{t.g!==void 0&&(t.g&=~e)};function $(t,e,n){return n?t|e:t&~e}var B=Ct?t=>0|t[Ct]:t=>0|t.g,k=Ct?t=>t[Ct]:t=>t.g,N=Ct?(t,e)=>(t[Ct]=e,t):(t,e)=>(t.g!==void 0?t.g=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}}),t);function ke(t){return Qi(t,34),t}function m2(t,e){N(e,-14591&(0|t))}function Zi(t,e){N(e,-14557&(34|t))}function Ys(t){return(t=t>>14&1023)===0?536870912:t}var tr,en={},$s={};function qs(t){return!(!t||typeof t!="object"||t.Ja!==$s)}function er(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&t.constructor===Object}function nr(t,e,n){if(t!=null){if(typeof t=="string")t=t?new Ht(t,xe):me();else if(t.constructor!==Ht)if(Je(t))t=t.length?new Ht(n?t:new Uint8Array(t),xe):me();else{if(!e)throw Error();t=void 0}}return t}function Vn(t,e,n){if(!Array.isArray(t)||t.length)return!1;const i=B(t);return!!(1&i)||!(!e||!(Array.isArray(e)?e.includes(n):e.has(n)))&&(N(t,1|i),!0)}const Js=[];function Lt(t){if(2&t)throw Error()}N(Js,55),tr=Object.freeze(Js);class Ei{constructor(e,n,i){this.l=0,this.g=e,this.h=n,this.m=i}next(){if(this.l<this.g.length){const e=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,e):e}}return{done:!0,value:void 0}}[Symbol.iterator](){return new Ei(this.g,this.h,this.m)}}let te,g2,_2;function Qs(t,e){(e=te?e[te]:void 0)&&(t[te]=ht(e))}function Zs(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function v2(){const t=Error();Zs(t,"incident"),function(e){Ye.setTimeout(()=>{throw e},0)}(t)}function to(t){return Zs(t=Error(t),"warning"),t}function ee(t){return t==null||typeof t=="number"?t:t==="NaN"||t==="Infinity"||t==="-Infinity"?Number(t):void 0}function eo(t){return t==null||typeof t=="boolean"?t:typeof t=="number"?!!t:void 0}Object.freeze(new class{}),Object.freeze(new class{});const y2=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Gn(t){const e=typeof t;return e==="number"?Number.isFinite(t):e==="string"&&y2.test(t)}function Ae(t){if(t==null)return t;if(typeof t=="string"){if(!t)return;t=+t}return typeof t=="number"&&Number.isFinite(t)?0|t:void 0}function w2(t){if(t==null)return t;if(typeof t=="string"){if(!t)return;t=+t}return typeof t=="number"&&Number.isFinite(t)?t>>>0:void 0}function no(t){return t[0]!=="-"&&(20>t.length||t.length===20&&184467>Number(t.substring(0,6)))}function io(t){return t[0]==="-"?20>t.length||t.length===20&&-922337<Number(t.substring(0,7)):19>t.length||t.length===19&&922337>Number(t.substring(0,6))}function ir(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(ge(t),t=Ni(C,H)),t}function rr(t){var e=Math.trunc(Number(t));return Number.isSafeInteger(e)?String(e):((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),io(t)||(On(t),t=Is()),t)}function Wn(t){return t==null?t:Gn(t)?typeof t=="number"?ir(t):rr(t):void 0}function nn(t){if(typeof t!="string")throw Error();return t}function Fe(t){if(t!=null&&typeof t!="string")throw Error();return t}function ve(t){return t==null||typeof t=="string"?t:void 0}function sr(t,e,n,i){if(t!=null&&typeof t=="object"&&t.X===en)return t;if(!Array.isArray(t))return n?2&i?(t=e[Ks])?e=t:(ke((t=new e).s),e=e[Ks]=t):e=new e:e=void 0,e;let r=n=B(t);return r===0&&(r|=32&i),r|=2&i,r!==n&&N(t,r),new e(t)}function b2(t,e,n){if(e){var i=!!i;if(!Gn(e=t))throw to("int64");typeof e=="string"?i=rr(e):i?(i=Math.trunc(e),Number.isSafeInteger(i)?i=String(i):io(e=String(i))?i=e:(ge(i),i=Is())):i=ir(e)}else i=Wn(t);return typeof(n=(t=i)==null?n?0:void 0:t)=="string"&&(i=+n,Number.isSafeInteger(i))?i:n}let Hn,or,x2;function zn(t){switch(typeof t){case"boolean":return or||=[0,void 0,!0];case"number":return 0<t?void 0:t===0?x2||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function ye(t,e){return ro(t,e[0],e[1])}function ro(t,e,n){if(t==null&&(t=Hn),Hn=void 0,t==null){var i=96;n?(t=[n],i|=512):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(2048&(i=B(t)))throw Error("farr");if(64&i)return t;if(i|=64,n&&(i|=512,n!==t[0]))throw Error("mid");t:{const r=(n=t).length;if(r){const s=r-1;if(er(n[s])){if(1024<=(e=s-(+!!(512&(i|=256))-1)))throw Error("pvtlmt");i=-16760833&i|(1023&e)<<14;break t}}if(e){if(1024<(e=Math.max(e,r-(+!!(512&i)-1))))throw Error("spvt");i=-16760833&i|(1023&e)<<14}}}return N(t,i),t}const T2={};let E2=function(){try{return Ri(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class ar{constructor(){this.g=new Map}get(e){return this.g.get(e)}set(e,n){return this.g.set(e,n),this.size=this.g.size,this}delete(e){return e=this.g.delete(e),this.size=this.g.size,e}clear(){this.g.clear(),this.size=this.g.size}has(e){return this.g.has(e)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(e,n){return this.g.forEach(e,n)}[Symbol.iterator](){return this.entries()}}const k2=E2?(Object.setPrototypeOf(ar.prototype,Map.prototype),Object.defineProperties(ar.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),ar):class extends Map{constructor(){super()}};function so(t){return t}function cr(t){if(2&t.N)throw Error("Cannot mutate an immutable Map")}var vt=class extends k2{constructor(t,e,n=so,i=so){super();let r=B(t);r|=64,N(t,r),this.N=r,this.U=e,this.S=n,this.Z=this.U?A2:i;for(let s=0;s<t.length;s++){const o=t[s],a=n(o[0],!1,!0);let c=o[1];e?c===void 0&&(c=null):c=i(o[1],!1,!0,void 0,void 0,r),super.set(a,c)}}oa(t=oo){if(this.size!==0)return this.Y(t)}Y(t=oo){const e=[],n=super.entries();for(var i;!(i=n.next()).done;)(i=i.value)[0]=t(i[0]),i[1]=t(i[1]),e.push(i);return e}clear(){cr(this),super.clear()}delete(t){return cr(this),super.delete(this.S(t,!0,!1))}entries(){var t=this.na();return new Ei(t,F2,this)}keys(){return this.Ia()}values(){var t=this.na();return new Ei(t,vt.prototype.get,this)}forEach(t,e){super.forEach((n,i)=>{t.call(e,this.get(i),i,this)})}set(t,e){return cr(this),(t=this.S(t,!0,!1))==null?this:e==null?(super.delete(t),this):super.set(t,this.Z(e,!0,!0,this.U,!1,this.N))}Oa(t){const e=this.S(t[0],!1,!0);t=t[1],t=this.U?t===void 0?null:t:this.Z(t,!1,!0,void 0,!1,this.N),super.set(e,t)}has(t){return super.has(this.S(t,!1,!1))}get(t){t=this.S(t,!1,!1);const e=super.get(t);if(e!==void 0){var n=this.U;return n?((n=this.Z(e,!1,!0,n,this.ta,this.N))!==e&&super.set(t,n),n):e}}na(){return Array.from(super.keys())}Ia(){return super.keys()}[Symbol.iterator](){return this.entries()}};function A2(t,e,n,i,r,s){return t=sr(t,i,n,s),r&&(t=Kn(t)),t}function oo(t){return t}function F2(t){return[t,this.get(t)]}let S2;function ao(){return S2||=new vt(ke([]),void 0,void 0,void 0,T2)}function hr(t,e,n,i,r){if(t!=null){if(Array.isArray(t))t=Vn(t,void 0,0)?void 0:r&&2&B(t)?t:Xn(t,e,n,i!==void 0,r);else if(er(t)){const s={};for(let o in t)s[o]=hr(t[o],e,n,i,r);t=s}else t=e(t,i);return t}}function Xn(t,e,n,i,r){const s=i||n?B(t):0;i=i?!!(32&s):void 0;const o=ht(t);for(let a=0;a<o.length;a++)o[a]=hr(o[a],e,n,i,r);return n&&(Qs(o,t),n(s,o)),o}function M2(t){return hr(t,lr,void 0,void 0,!1)}function lr(t){return t.X===en?t.toJSON():t instanceof vt?t.oa(M2):function(e){switch(typeof e){case"number":return isFinite(e)?e:String(e);case"boolean":return e?1:0;case"object":if(e)if(Array.isArray(e)){if(Vn(e,void 0,0))return}else{if(Je(e))return Ms(e);if(e instanceof Ht){const n=e.g;return n==null?"":typeof n=="string"?n:e.g=Ms(n)}if(e instanceof vt)return e.oa()}}return e}(t)}function ur(t,e,n=Zi){if(t!=null){if(Fs&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var i=B(t);return 2&i||(e&&=i===0||!!(32&i)&&!(64&i||!(16&i)),t=e?N(t,-12293&(34|i)):Xn(t,ur,4&i?Zi:n,!0,!0)),t}return t.X===en?(n=t.s,t=2&(i=k(n))?t:dr(t,n,i,!0)):t instanceof vt&&!(2&t.N)&&(n=ke(t.Y(ur)),t=new vt(n,t.U,t.S,t.Z)),t}}function dr(t,e,n,i){return t=t.constructor,Hn=e=co(e,n,i),e=new t(e),Hn=void 0,e}function co(t,e,n){const i=n||2&e?Zi:m2,r=!!(32&e);return t=function(s,o,a){const c=ht(s);var h=c.length;const u=256&o?c[h-1]:void 0;for(h+=u?-1:0,o=512&o?1:0;o<h;o++)c[o]=a(c[o]);if(u){o=c[o]={};for(const l in u)o[l]=a(u[l])}return Qs(c,s),c}(t,e,s=>ur(s,r,i)),Qi(t,32|(n?2:0)),t}function Kn(t){const e=t.s,n=k(e);return 2&n?dr(t,e,n,!1):t}function ho(t,e,n,i){return!(4&e)||n!=null}function ne(t,e){return Rt(t=t.s,k(t),e)}function lo(t,e,n,i){if(!(0>(e=i+(+!!(512&e)-1))||e>=t.length||e>=n))return t[e]}function Rt(t,e,n,i){if(n===-1)return null;const r=Ys(e);if(!(n>=r)){var s=t.length;return i&&256&e&&(i=t[s-1][n])!=null?(lo(t,e,r,n)&&Ji!=null&&(4<=(e=(t=_2??={})[Ji]||0)||(t[Ji]=e+1,v2())),i):lo(t,e,r,n)}return 256&e?t[t.length-1][n]:void 0}function S(t,e,n,i){const r=t.s;let s=k(r);return Lt(s),L(r,s,e,n,i),t}function L(t,e,n,i,r){const s=Ys(e);if(n>=s||r){let o=e;if(256&e)r=t[t.length-1];else{if(i==null)return o;r=t[s+(+!!(512&e)-1)]={},o|=256}return r[n]=i,n<s&&(t[n+(+!!(512&e)-1)]=void 0),o!==e&&N(t,o),o}return t[n+(+!!(512&e)-1)]=i,256&e&&n in(t=t[t.length-1])&&delete t[n],e}function Se(t,e,n,i,r){var s=2&e;let o=Rt(t,e,n,r);Array.isArray(o)||(o=tr);const a=!(2&i);i=!(1&i);const c=!!(32&e);let h=B(o);return h!==0||!c||s||a?1&h||(h|=1,N(o,h)):(h|=33,N(o,h)),s?(t=!1,2&h||(ke(o),t=!!(4&h)),(i||t)&&Object.freeze(o)):(s=!!(2&h)||!!(2048&h),i&&s?(o=ht(o),i=1,c&&!a&&(i|=32),N(o,i),L(t,e,n,o,r)):a&&32&h&&!s&&jn(o,32)),o}function Yn(t,e){t=t.s;let n=k(t);const i=Rt(t,n,e),r=ee(i);return r!=null&&r!==i&&L(t,n,e,r),r}function uo(t){t=t.s;let e=k(t);const n=Rt(t,e,1),i=nr(n,!0,!!(34&e));return i!=null&&i!==n&&L(t,e,1,i),i}function Me(t,e,n){const i=t.s;let r=k(i);const s=2&r?1:2;let o=fo(i,r,e);var a=B(o);if(ho(t,a,void 0)){(4&a||Object.isFrozen(o))&&(o=ht(o),a=we(a,r),r=L(i,r,e,o));let c=t=0;for(;t<o.length;t++){const h=n(o[t]);h!=null&&(o[c++]=h)}c<t&&(o.length=c),a=$(a=po(a,r),20,!0),a=$(a,4096,!1),a=$(a,8192,!1),N(o,a),2&a&&Object.freeze(o)}return rn(a)||(n=a,(a=(t=s===1||s===4&&!!(32&a))?$(a,2,!0):Ce(a,r,!1))!==n&&N(o,a),t&&Object.freeze(o)),s===2&&rn(a)&&(o=ht(o),a=Ce(a=we(a,r),r,!1),N(o,a),L(i,r,e,o)),o}function fo(t,e,n){return t=Rt(t,e,n),Array.isArray(t)?t:tr}function po(t,e){return t===0&&(t=we(t,e)),$(t,1,!0)}function rn(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function mo(t){t=ht(t);for(let e=0;e<t.length;e++){const n=t[e]=ht(t[e]);Array.isArray(n[1])&&(n[1]=ke(n[1]))}return t}function $n(t,e,n){{const a=t.s;let c=k(a);if(Lt(c),n==null)L(a,c,e);else{var i,r=B(n),s=r,o=!!(2&r)||Object.isFrozen(n);if((i=!o)&&(i=!1),ho(t,r))for(r=21,o&&(n=ht(n),s=0,r=Ce(r=we(r,c),c,!0)),t=0;t<n.length;t++)n[t]=nn(n[t]);i&&(n=ht(n),s=0,r=Ce(r=we(r,c),c,!0)),r!==s&&N(n,r),L(a,c,e,n)}}}function fr(t,e,n,i){t=t.s;let r=k(t);Lt(r),L(t,r,e,(i==="0"?Number(n)===0:n===i)?void 0:n)}function sn(t,e,n,i){const r=k(t);Lt(r),t=Se(t,r,e,2),i=n(i,!!(4&(e=B(t)))&&!!(4096&e)),t.push(i)}function C2(t){return t}function pr(t,e){return mr(t=t.s,k(t),sa)===e?e:-1}function mr(t,e,n){let i=0;for(let r=0;r<n.length;r++){const s=n[r];Rt(t,e,s)!=null&&(i!==0&&(e=L(t,e,i)),i=s)}return i}function gr(t,e,n,i){let r=k(t);Lt(r);const s=Rt(t,r,n,i);let o;if(s!=null&&s.X===en)return(e=Kn(s))!==s&&L(t,r,n,e,i),e.s;if(Array.isArray(s)){const a=B(s);o=2&a?co(s,a,!1):s,o=ye(o,e)}else o=ye(void 0,e);return o!==s&&L(t,r,n,o,i),o}function go(t,e,n,i){t=t.s;let r=k(t);const s=Rt(t,r,n,i);return(e=sr(s,e,!1,r))!==s&&e!=null&&L(t,r,n,e,i),e}function T(t,e,n,i=!1){if((e=go(t,e,n,i))==null)return e;t=t.s;let r=k(t);if(!(2&r)){const s=Kn(e);s!==e&&L(t,r,n,e=s,i)}return e}function _o(t,e,n,i,r,s){var o=2,a=!!(2&e);o=a?1:o,r=!!r,s&&=!a,a=fo(t,e,i);var c=B(a);const h=!!(4&c);if(!h){var u=a,l=e;const d=!!(2&(c=po(c,e)));d&&(l=$(l,2,!0));let v=!d,y=!0,w=0,Mt=0;for(;w<u.length;w++){const he=sr(u[w],n,!1,l);if(he instanceof n){if(!d){const le=!!(2&B(he.s));v&&=!le,y&&=le}u[Mt++]=he}}Mt<w&&(u.length=Mt),c=$(c,4,!0),c=$(c,16,y),c=$(c,8,v),N(u,c),d&&Object.freeze(u)}if(s&&!(8&c||!a.length&&(o===1||o===4&&32&c))){for(rn(c)&&(a=ht(a),c=we(c,e),e=L(t,e,i,a)),n=a,s=c,u=0;u<n.length;u++)(c=n[u])!==(l=Kn(c))&&(n[u]=l);s=$(s,8,!0),s=$(s,16,!n.length),N(n,s),c=s}return rn(c)||(n=c,(c=(s=o===1||o===4&&!!(32&c))?$(c,!a.length||16&c&&(!h||32&c)?2:2048,!0):Ce(c,e,r))!==n&&N(a,c),s&&Object.freeze(a)),o===2&&rn(c)&&(a=ht(a),c=Ce(c=we(c,e),e,r),N(a,c),L(t,e,i,a)),a}function zt(t,e,n){t=t.s;const i=k(t);return _o(t,i,e,n,!1,!(2&i))}function _(t,e,n,i,r){return i==null&&(i=void 0),S(t,n,i,r)}function on(t,e,n,i){i==null&&(i=void 0),t=t.s;let r=k(t);Lt(r),(n=mr(t,r,n))&&n!==e&&i!=null&&(r=L(t,r,n)),L(t,r,e,i)}function we(t,e){return t=$(t,2,!!(2&e)),t=$(t,32,!0),$(t,2048,!1)}function Ce(t,e,n){return 32&e&&n||(t=$(t,32,!1)),t}function qn(t,e,n,i){t=t.s;const r=k(t);Lt(r),e=_o(t,r,n,e,!0),n=i??new n,e.push(n),2&B(n.s)?jn(e,8):jn(e,16)}function yt(t,e){return Ae(ne(t,e))}function kt(t,e){return t??e}function V(t,e){return kt(Yn(t,e),0)}function Ot(t,e){return kt(ve(ne(t,e)),"")}function an(t,e,n){if(n!=null&&typeof n!="boolean")throw t=typeof n,Error(`Expected boolean but got ${t!="object"?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);S(t,e,n)}function Pt(t,e,n){if(n!=null){if(typeof n!="number"||!Number.isFinite(n))throw to("int32");n|=0}S(t,e,n)}function m(t,e,n){if(n!=null&&typeof n!="number")throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);S(t,e,n)}function At(t,e,n){e.g?e.m(t,e.g,e.h,n,!0):e.m(t,e.h,n,!0)}vt.prototype.toJSON=void 0,vt.prototype.Ja=$s;var p=class{constructor(t,e){this.s=ro(t,e)}toJSON(){return vo(this,Xn(this.s,lr,void 0,void 0,!1),!0)}l(){var t=U1;return t.g?t.l(this,t.g,t.h,!0):t.l(this,t.h,t.defaultValue,!0)}clone(){const t=this.s;return dr(this,t,k(t),!1)}P(){return!!(2&B(this.s))}};function vo(t,e,n){var i=r2?void 0:t.constructor.B;const r=k(n?t.s:e);if(!(t=e.length))return e;let s,o;if(er(n=e[t-1])){t:{var a=n;let u={},l=!1;for(var c in a){let d=a[c];if(Array.isArray(d)){let v=d;(Vn(d,i,+c)||qs(d)&&d.size===0)&&(d=null),d!=v&&(l=!0)}d!=null?u[c]=d:l=!0}if(l){for(var h in u){a=u;break t}a=null}}a!=n&&(s=!0),t--}for(c=+!!(512&r)-1;0<t&&(n=e[h=t-1],h-=c,n==null||Vn(n,i,h)||qs(n)&&n.size===0);t--)o=!0;return(s||o)&&(e=Array.prototype.slice.call(e,0,t),a&&e.push(a)),e}function yo(t){return Array.isArray(t)?t[0]instanceof Ee?t:[V2,t]:[t,void 0]}function Le(t,e){if(Array.isArray(e)){var n=B(e);if(4&n)return e;for(var i=0,r=0;i<e.length;i++){const s=t(e[i]);s!=null&&(e[r++]=s)}return r<i&&(e.length=r),N(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}p.prototype.X=en,p.prototype.toString=function(){return vo(this,this.s,!1).toString()};const wo=Symbol();function _r(t){let e=t[wo];if(!e){const n=To(t),i=xr(t),r=i.l;e=r?(s,o)=>r(s,o,i):(s,o)=>{for(;Vs(o)&&o.h!=4;){var a=o.m,c=i[a];if(!c){var h=i.ea;h&&(h=h[a])&&(c=i[a]=L2(h))}c&&c(o,s,a)||(a=(c=o).l,Pn(c),c.ia?c=void 0:(h=c.g.g-a,c.g.g=a,c=Ns(c.g,h)),a=s,c&&(te||=Symbol(),(h=a[te])?h.push(c):a[te]=[c]))}n===bo||n===Jn||n.j||(s[g2||=Symbol()]=n)},t[wo]=e}return e}function L2(t){const e=(t=yo(t))[0].g;if(t=t[1]){const n=_r(t),i=xr(t).T;return(r,s,o)=>e(r,s,o,i,n)}return e}class vr{}let bo,Jn;const cn=Symbol();function R2(t,e,n){const i=n[1];let r;if(i){const s=i[cn];r=s?s.T:zn(i[0]),t[e]=s??i}r&&r===or?(t.g||(t.g=new Set)).add(e):n[0]&&(t.h||(t.h=new Set)).add(e)}function xo(t,e){return[t.l,!e||0<e[0]?void 0:e]}function To(t){var e=t[cn];if(e)return e;if(!(e=yr(t,t[cn]=new vr,xo,xo,R2)).ea&&!e.h&&!e.g){let n=!0;for(let i in e)isNaN(i)||(n=!1);n?(zn(t[0])===or?Jn?e=Jn:((e=new vr).T=zn(!0),e=Jn=e):e=bo||=new vr,e=t[cn]=e):e.j=!0}return e}function O2(t,e,n){t[e]=n}function yr(t,e,n,i,r=O2){e.T=zn(t[0]);let s=0;var o=t[++s];o&&o.constructor===Object&&(e.ea=o,typeof(o=t[++s])=="function"&&(e.l=o,e.m=t[++s],o=t[++s]));const a={};for(;Array.isArray(o)&&typeof o[0]=="number"&&0<o[0];){for(var c=0;c<o.length;c++)a[o[c]]=o;o=t[++s]}for(c=1;o!==void 0;){let l;typeof o=="number"&&(c+=o,o=t[++s]);var h=void 0;if(o instanceof Ee?l=o:(l=G2,s--),l.pa){o=t[++s],h=t;var u=s;typeof o=="function"&&(o=o(),h[u]=o),h=o}for(u=c+1,typeof(o=t[++s])=="number"&&0>o&&(u-=o,o=t[++s]);c<u;c++){const d=a[c];r(e,c,h?i(l,h,d):n(l,d))}}return e}const Eo=Symbol();function ko(t){let e=t[Eo];if(!e){const n=Qn(t);e=(i,r)=>So(i,r,n),t[Eo]=e}return e}const wr=Symbol();function P2(t){return t.h}function D2(t,e){let n,i;const r=t.h;return(s,o,a)=>r(s,o,a,i||=Qn(e).T,n||=ko(e))}function Qn(t){let e=t[wr];return e||(e=yr(t,t[wr]={},P2,D2),Ao(t),e)}const br=Symbol();function U2(t,e){const n=t.g;return e?(i,r,s)=>n(i,r,s,e):n}function I2(t,e,n){const i=t.g;let r,s;return(o,a,c)=>i(o,a,c,s||=xr(e).T,r||=_r(e),n)}function xr(t){let e=t[br];return e||(To(t),e=yr(t,t[br]={},U2,I2),Ao(t),e)}function Ao(t){br in t&&cn in t&&wr in t&&(t.length=0)}function Fo(t,e){var n=t[e];if(n)return n;if((n=t.ea)&&(n=n[e])){var i=(n=yo(n))[0].h;if(n=n[1]){const r=ko(n),s=Qn(n).T;n=(n=t.m)?n(s,r):(o,a,c)=>i(o,a,c,s,r)}else n=i;return t[e]=n}}function So(t,e,n){for(var i=k(t),r=+!!(512&i)-1,s=t.length,o=512&i?1:0,a=s+(256&i?-1:0);o<a;o++){const c=t[o];if(c==null)continue;const h=o-r,u=Fo(n,h);u&&u(e,c,h)}if(256&i){i=t[s-1];for(let c in i)r=+c,Number.isNaN(r)||(s=i[c])!=null&&(a=Fo(n,r))&&a(e,s,r)}if(t=te?t[te]:void 0)for(Te(e,e.g.end()),n=0;n<t.length;n++)Te(e,Oi(t[n])||Ln())}function st(t,e){return new Ee(t,e,!1,!1)}function Re(t,e){return new Ee(t,e,!0,!1)}function Zn(t,e){return new Ee(t,e,!1,!0)}function ot(t,e,n){L(t,k(t),e,n)}var B2=Zn(function(t,e,n,i,r){return t.h===2&&(t=Qe(t,ye([void 0,void 0],i),r),Lt(i=k(e)),(r=Rt(e,i,n))instanceof vt?(2&r.N)!=0?((r=r.Y()).push(t),L(e,i,n,r)):r.Oa(t):Array.isArray(r)?(2&B(r)&&L(e,i,n,r=mo(r)),r.push(t)):L(e,i,n,[t]),!0)},function(t,e,n,i,r){if(e instanceof vt)e.forEach((s,o)=>{$i(t,n,ye([o,s],i),r)});else if(Array.isArray(e))for(let s=0;s<e.length;s++){const o=e[s];Array.isArray(o)&&$i(t,n,ye(o,i),r)}});function Mo(t,e,n){t:if(e!=null){if(Gn(e)){if(typeof e=="string"){e=rr(e);break t}if(typeof e=="number"){e=ir(e);break t}}e=void 0}e!=null&&(typeof e=="string"&&zs(e),e!=null&&(_t(t,n,0),typeof e=="number"?(t=t.g,ge(e),In(t,C,H)):(n=zs(e),In(t.g,n.h,n.g))))}function Co(t,e,n){(e=Ae(e))!=null&&e!=null&&(_t(t,n,0),Bn(t.g,e))}function Lo(t,e,n){(e=eo(e))!=null&&(_t(t,n,0),t.g.g.push(e?1:0))}function Ro(t,e,n){(e=ve(e))!=null&&Nn(t,n,xs(e))}function ti(t,e,n,i,r){$i(t,n,e instanceof p?e.s:Array.isArray(e)?ye(e,i):void 0,r)}function Oo(t,e,n){(e=e==null||typeof e=="string"||Je(e)||e instanceof Ht?e:void 0)!=null&&Nn(t,n,Di(e).buffer)}function Po(t,e,n){return(t.h===5||t.h===2)&&(e=Se(e,k(e),n,2,!1),t.h==2?Dn(t,Hi,e):e.push(Hi(t.g)),!0)}var z,Xt=st(function(t,e,n){if(t.h!==1)return!1;var i=t.g;t=Wi(i);const r=Wi(i);i=2*(r>>31)+1;const s=r>>>20&2047;return t=4294967296*(1048575&r)+t,ot(e,n,s==2047?t?NaN:1/0*i:s==0?i*Math.pow(2,-1074)*t:i*Math.pow(2,s-1075)*(t+4503599627370496)),!0},function(t,e,n){(e=ee(e))!=null&&(_t(t,n,1),t=t.g,(n=Ds||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),C=n.getUint32(0,!0),H=n.getUint32(4,!0),tn(t,C),tn(t,H))}),X=st(function(t,e,n){return t.h===5&&(ot(e,n,Hi(t.g)),!0)},function(t,e,n){(e=ee(e))!=null&&(_t(t,n,5),t=t.g,Ii(e),tn(t,C))}),N2=Re(Po,function(t,e,n){if((e=Le(ee,e))!=null)for(let o=0;o<e.length;o++){var i=t,r=n,s=e[o];s!=null&&(_t(i,r,5),i=i.g,Ii(s),tn(i,C))}}),Tr=Re(Po,function(t,e,n){if((e=Le(ee,e))!=null&&e.length){_t(t,n,2),Ze(t.g,4*e.length);for(let i=0;i<e.length;i++)n=t.g,Ii(e[i]),tn(n,C)}}),ie=st(function(t,e,n){return t.h===0&&(ot(e,n,Vi(t.g,Ni)),!0)},Mo),Er=st(function(t,e,n){return t.h===0&&(ot(e,n,(t=Vi(t.g,Ni))===0?void 0:t),!0)},Mo),j2=st(function(t,e,n){return t.h===0&&(ot(e,n,Vi(t.g,Bi)),!0)},function(t,e,n){t:if(e!=null){if(Gn(e)){if(typeof e=="string"){var i=Math.trunc(Number(e));Number.isSafeInteger(i)&&0<=i?e=String(i):((i=e.indexOf("."))!==-1&&(e=e.substring(0,i)),no(e)||(On(e),e=Rn(C,H)));break t}if(typeof e=="number"){e=0<=(e=Math.trunc(e))&&Number.isSafeInteger(e)?e:function(r){if(0>r){ge(r);const s=Rn(C,H);return r=Number(s),Number.isSafeInteger(r)?r:s}return no(String(r))?r:(ge(r),Bi(C,H))}(e);break t}}e=void 0}e!=null&&(typeof e=="string"&&Ws(e),e!=null&&(_t(t,n,0),typeof e=="number"?(t=t.g,ge(e),In(t,C,H)):(n=Ws(e),In(t.g,n.h,n.g))))}),j=st(function(t,e,n){return t.h===0&&(ot(e,n,Qt(t.g)),!0)},Co),ei=Re(function(t,e,n){return(t.h===0||t.h===2)&&(e=Se(e,k(e),n,2,!1),t.h==2?Dn(t,Qt,e):e.push(Qt(t.g)),!0)},function(t,e,n){if((e=Le(Ae,e))!=null&&e.length){n=Ki(t,n);for(let i=0;i<e.length;i++)Bn(t.g,e[i]);Yi(t,n)}}),Oe=st(function(t,e,n){return t.h===0&&(ot(e,n,(t=Qt(t.g))===0?void 0:t),!0)},Co),G=st(function(t,e,n){return t.h===0&&(ot(e,n,Gi(t.g)),!0)},Lo),hn=st(function(t,e,n){return t.h===0&&(ot(e,n,(t=Gi(t.g))===!1?void 0:t),!0)},Lo),q=Re(function(t,e,n){return t.h===2&&(sn(e,n,C2,t=Xi(t)),!0)},function(t,e,n){if((e=Le(ve,e))!=null)for(let o=0;o<e.length;o++){var i=t,r=n,s=e[o];s!=null&&Nn(i,r,xs(s))}}),re=st(function(t,e,n){return t.h===2&&(ot(e,n,(t=Xi(t))===""?void 0:t),!0)},Ro),A=st(function(t,e,n){return t.h===2&&(ot(e,n,Xi(t)),!0)},Ro),V2=Zn(function(t,e,n,i,r){return t.h===2&&(Qe(t,gr(e,i,n,!0),r),!0)},ti),G2=Zn(function(t,e,n,i,r){return t.h===2&&(Qe(t,gr(e,i,n),r),!0)},ti);z=new Ee(function(t,e,n,i,r){if(t.h!==2)return!1;i=ye(void 0,i);let s=k(e);Lt(s);let o=Se(e,s,n,3);return s=k(e),4&B(o)&&(o=ht(o),N(o,-2079&(1|B(o))),L(e,s,n,o)),o.push(i),Qe(t,i,r),!0},function(t,e,n,i,r){if(Array.isArray(e))for(let s=0;s<e.length;s++)ti(t,e[s],n,i,r)},!0,!0);var F=Zn(function(t,e,n,i,r,s){if(t.h!==2)return!1;let o=k(e);return Lt(o),(s=mr(e,o,s))&&n!==s&&L(e,o,s),Qe(t,e=gr(e,i,n),r),!0},ti),Do=st(function(t,e,n){return t.h===2&&(ot(e,n,Gs(t)),!0)},Oo),W2=Re(function(t,e,n){return(t.h===0||t.h===2)&&(e=Se(e,k(e),n,2,!1),t.h==2?Dn(t,Zt,e):e.push(Zt(t.g)),!0)},function(t,e,n){if((e=Le(w2,e))!=null)for(let o=0;o<e.length;o++){var i=t,r=n,s=e[o];s!=null&&(_t(i,r,0),Ze(i.g,s))}}),Dt=st(function(t,e,n){return t.h===0&&(ot(e,n,Qt(t.g)),!0)},function(t,e,n){(e=Ae(e))!=null&&(e=parseInt(e,10),_t(t,n,0),Bn(t.g,e))}),H2=Re(function(t,e,n){return(t.h===0||t.h===2)&&(e=Se(e,k(e),n,2,!1),t.h==2?Dn(t,d2,e):e.push(Qt(t.g)),!0)},function(t,e,n){if((e=Le(Ae,e))!=null&&e.length){n=Ki(t,n);for(let i=0;i<e.length;i++)Bn(t.g,e[i]);Yi(t,n)}});class z2{constructor(e,n){this.h=e,this.g=n,this.l=T,this.m=_,this.defaultValue=void 0}}function Ft(t,e){return new z2(t,e)}function se(t,e){return(n,i)=>{if(Un.length){const s=Un.pop();s.o(i),zi(s.g,n,i),n=s}else n=new class{constructor(s,o){if(js.length){const a=js.pop();zi(a,s,o),s=a}else s=new class{constructor(a,c){this.h=null,this.m=!1,this.g=this.l=this.j=0,zi(this,a,c)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.ca=!1}}(s,o);this.g=s,this.l=this.g.g,this.h=this.m=-1,this.o(o)}o({ia:s=!1}={}){this.ia=s}}(n,i);try{const s=new t,o=s.s;_r(e)(o,n);var r=s}finally{n.g.clear(),n.m=-1,n.h=-1,100>Un.length&&Un.push(n)}return r}}function ni(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const o=this.g;return this.g=[],o}}}};So(this.s,e,Qn(t)),Te(e,e.g.end());const n=new Uint8Array(e.h),i=e.l,r=i.length;let s=0;for(let o=0;o<r;o++){const a=i[o];n.set(a,s),s+=a.length}return e.l=[n],n}}var Uo=class extends p{constructor(t){super(t)}},Io=[0,re,st(function(t,e,n){return t.h===2&&(ot(e,n,(t=Gs(t))===me()?void 0:t),!0)},function(t,e,n){if(e!=null){if(e instanceof p){const i=e.Qa;return void(i&&(e=i(e),e!=null&&Nn(t,n,Di(e).buffer)))}if(Array.isArray(e))return}Oo(t,e,n)})],X2=[0,A],Bo=[0,j,Dt,G,-1,ei,Dt,-1],K2=[0,G,-1],No=class extends p{constructor(){super()}};No.B=[6];var jo=[0,G,A,G,Dt,-1,H2,A,-1,K2,Dt],Vo=[0,A,-2],Go=class extends p{constructor(){super()}},Wo=[0],Ho=[0,j,G,-4],lt=class extends p{constructor(t){super(t,2)}},O={},Y2=[-2,O,G];O[336783863]=[0,A,G,-1,j,[0,[1,2,3,4,5,6],F,Wo,F,jo,F,Vo,F,Ho,F,Bo,F,[0,A]],X2,G,[0,[1,3],[2,4],F,[0,ei],-1,F,[0,q],-1,z,[0,A,-1]],A];var $2=[0,re,hn],zo=[0,Er,-1,hn,-3,Er,ei,re,Oe,Er,-1,hn,Oe,hn,-2,re],ln=[-1,{}],Xo=[0,A,1,ln],Ko=[0,A,q,ln];function ut(t,e){fr(t,2,Fe(e),"")}function M(t,e){sn(t.s,3,nn,e)}function x(t,e){sn(t.s,4,nn,e)}var J=class extends p{constructor(t){super(t,500)}o(t){return _(this,0,7,t)}};J.B=[3,4,5,6,8,13,17,1005];var q2=[-500,re,-1,q,-3,Y2,z,Io,Oe,-1,Xo,Ko,z,$2,re,zo,Oe,q,987,q],J2=[0,re,-1,ln],Q2=[-500,A,-1,[-1,{}],998,A],Z2=[-500,A,q,-1,[-2,{},G],997,q,-1],t1=[-500,A,q,ln,998,q];function dt(t,e){qn(t,1,J,e)}function R(t,e){sn(t.s,10,nn,e)}function E(t,e){sn(t.s,15,nn,e)}var Q=class extends p{constructor(t){super(t,500)}o(t){return _(this,0,1001,t)}};Q.B=[1,6,7,9,10,15,16,17,14,1002];var Yo=[-500,z,q2,4,z,Q2,z,Z2,Oe,z,t1,q,Oe,Xo,Ko,z,J2,q,-2,zo,re,-1,hn,979,ln,z,Io],e1=se(Q,Yo);Q.prototype.g=ni(Yo);var n1=[0,z,[0,j,-2]],i1=class extends p{constructor(t){super(t)}},r1=[0,j,X,A,-1],kr=class extends p{constructor(t){super(t)}g(){return zt(this,i1,1)}};kr.B=[1];var $o=[0,z,r1],ii=se(kr,$o),s1=[0,j,X],o1=[0,j,-1,n1],a1=class extends p{constructor(t){super(t)}},c1=[0,j,-3],h1=[0,X,-3],l1=class extends p{constructor(t){super(t)}},u1=[0,X,-1,A,X],ri=class extends p{constructor(t){super(t)}h(){return T(this,a1,2)}g(){return zt(this,l1,5)}};ri.B=[5];var d1=[0,Dt,c1,h1,o1,z,u1],qo=class extends p{constructor(t){super(t)}};qo.B=[1,2,3,8,9];var Jo=se(qo,[0,q,ei,Tr,d1,A,-1,ie,z,s1,q,ie]),Qo=class extends p{constructor(t){super(t)}},f1=[0,X,-4],Zo=class extends p{constructor(t){super(t)}};Zo.B=[1];var Pe=se(Zo,[0,z,f1]),ta=class extends p{constructor(t){super(t)}},p1=[0,X,-4],ea=class extends p{constructor(t){super(t)}};ea.B=[1];var un=se(ea,[0,z,p1]),na=class extends p{constructor(t){super(t)}};na.B=[3];var m1=[0,j,-1,Tr,Dt],ia=class extends p{constructor(){super()}};ia.prototype.g=ni([0,X,-4,ie]);var g1=class extends p{constructor(t){super(t)}},_1=[0,1,j,A,$o],ra=class extends p{constructor(t){super(t)}};ra.B=[1];var v1=se(ra,[0,z,_1,ie]),Ar=class extends p{constructor(t){super(t)}};Ar.B=[1];var y1=class extends p{constructor(t){super(t)}qa(){return uo(this)??me()}},w1=class extends p{constructor(t){super(t)}},sa=[1,2],b1=[0,sa,F,[0,Tr],F,[0,Do],j,A],oa=class extends p{constructor(t){super(t)}};oa.B=[1];var x1=se(oa,[0,z,b1,ie]),si=class extends p{constructor(t){super(t)}};si.B=[4,5];var aa=[0,A,j,X,q,-1],ca=class extends p{constructor(t){super(t)}},T1=[0,G,-1],ha=class extends p{constructor(t){super(t)}},oi=[1,2,3,4,5],ai=class extends p{constructor(t){super(t)}g(){return uo(this)!=null}h(){return ve(ne(this,2))!=null}},la=[0,Do,A,[0,j,ie,-1],[0,j2,ie]],P=class extends p{constructor(t){super(t)}g(){return eo(ne(this,2))??!1}},W=[0,la,G,[0,oi,F,Ho,F,jo,F,Bo,F,Wo,F,Vo],Dt],ci=class extends p{constructor(t){super(t)}},Fr=[0,W,X,-1,j],E1=Ft(502141897,ci);O[502141897]=Fr;var ua=[0,la];O[512499200]=ua;var da=[0,ua];O[515723506]=da;var k1=se(class extends p{constructor(t){super(t)}},[0,[0,Dt,-1,N2,W2],m1]),fa=[0,W];O[508981768]=fa;var pa=class extends p{constructor(t){super(t)}},Sr=[0,W,X,fa,G],ma=class extends p{constructor(t){super(t)}},ga=[0,W,Fr,Sr,X,da];O[508968149]=Sr;var A1=Ft(508968150,ma);O[508968150]=ga;var _a=class extends p{constructor(t){super(t)}},F1=Ft(513916220,_a);O[513916220]=[0,W,ga,j];var De=class extends p{constructor(t){super(t)}h(){return T(this,si,2)}g(){S(this,2)}},va=[0,W,aa];O[478825465]=va;var ya=[0,W];O[478825422]=ya;var S1=class extends p{constructor(t){super(t)}},wa=[0,W,ya,va,-1],ba=class extends p{constructor(t){super(t)}},xa=[0,W,X,j],Mr=class extends p{constructor(t){super(t)}},Cr=[0,W,X],Lr=class extends p{constructor(t){super(t)}},Ta=[0,W,xa,Cr,X],Ea=class extends p{constructor(t){super(t)}},M1=[0,W,Ta,wa];O[463370452]=wa,O[464864288]=xa,O[474472470]=Cr;var C1=Ft(462713202,Lr);O[462713202]=Ta;var L1=Ft(479097054,Ea);O[479097054]=M1;var R1=class extends p{constructor(t){super(t)}},O1=[0,W],ka=class extends p{constructor(t){super(t)}},Rr=[0,W,X,-1,j];O[514774813]=Rr;var Aa=class extends p{constructor(t){super(t)}},Or=[0,W,X,G];O[518928384]=Or;var Fa=class extends p{constructor(){super()}};Fa.prototype.g=ni([0,W,Cr,O1,Fr,Sr,Rr,Or]);var Sa=class extends p{constructor(t){super(t)}},P1=Ft(456383383,Sa);O[456383383]=[0,W,aa];var Ma=class extends p{constructor(t){super(t)}},D1=Ft(476348187,Ma);O[476348187]=[0,W,T1];var Ca=class extends p{constructor(t){super(t)}},La=[0,Dt,-1],Pr=class extends p{constructor(t){super(t)}};Pr.B=[3];var U1=Ft(458105876,class extends p{constructor(t){super(t)}g(){var t=this.s;const e=k(t);var n=2&e;return t=function(i,r,s){var o=Pr;const a=2&r;let c=!1;if(s==null){if(a)return ao();s=[]}else if(s.constructor===vt){if((2&s.N)==0||a)return s;s=s.Y()}else Array.isArray(s)?c=!!(2&B(s)):s=[];if(a){if(!s.length)return ao();c||(c=!0,ke(s))}else c&&(c=!1,s=mo(s));return c||(64&B(s)?jn(s,32):32&r&&Qi(s,32)),L(i,r,2,o=new vt(s,o,b2,void 0),!1),o}(t,e,Rt(t,e,2)),t==null||!n&&Pr&&(t.ta=!0),n=t}});O[458105876]=[0,La,B2,[!0,ie,[0,A,-1,q]]];var Dr=class extends p{constructor(t){super(t)}},Ra=Ft(458105758,Dr);O[458105758]=[0,W,A,La];var Ur=class extends p{constructor(t){super(t)}};Ur.B=[5,6];var I1=Ft(443442058,Ur);O[443442058]=[0,W,A,j,X,q,-1];var Oa=class extends p{constructor(t){super(t)}},B1=Ft(516587230,Oa);function Ir(t,e){return e=e?e.clone():new si,t.displayNamesLocale!==void 0?S(e,1,Fe(t.displayNamesLocale)):t.displayNamesLocale===void 0&&S(e,1),t.maxResults!==void 0?Pt(e,2,t.maxResults):"maxResults"in t&&S(e,2),t.scoreThreshold!==void 0?m(e,3,t.scoreThreshold):"scoreThreshold"in t&&S(e,3),t.categoryAllowlist!==void 0?$n(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&S(e,4),t.categoryDenylist!==void 0?$n(e,5,t.categoryDenylist):"categoryDenylist"in t&&S(e,5),e}function Br(t,e=-1,n=""){return{categories:t.map(i=>({index:kt(yt(i,1),0)??-1,score:V(i,2)??0,categoryName:Ot(i,3)??"",displayName:Ot(i,4)??""})),headIndex:e,headName:n}}function Pa(t){var e=Me(t,3,ee),n=Me(t,2,Ae),i=Me(t,1,ve),r=Me(t,9,ve);const s={categories:[],keypoints:[]};for(let o=0;o<e.length;o++)s.categories.push({score:e[o],index:n[o]??-1,categoryName:i[o]??"",displayName:r[o]??""});if((e=T(t,ri,4)?.h())&&(s.boundingBox={originX:yt(e,1)??0,originY:yt(e,2)??0,width:yt(e,3)??0,height:yt(e,4)??0,angle:0}),T(t,ri,4)?.g().length)for(const o of T(t,ri,4).g())s.keypoints.push({x:Yn(o,1)??0,y:Yn(o,2)??0,score:Yn(o,4)??0,label:ve(ne(o,3))??""});return s}function hi(t){const e=[];for(const n of zt(t,ta,1))e.push({x:V(n,1)??0,y:V(n,2)??0,z:V(n,3)??0,visibility:V(n,4)??0});return e}function dn(t){const e=[];for(const n of zt(t,Qo,1))e.push({x:V(n,1)??0,y:V(n,2)??0,z:V(n,3)??0,visibility:V(n,4)??0});return e}function Da(t){return Array.from(t,e=>127<e?e-256:e)}function Ua(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,i=0,r=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s],i+=t[s]*t[s],r+=e[s]*e[s];if(0>=i||0>=r)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(i*r)}let li;O[516587230]=[0,W,Rr,Or,X];const N1=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function Ia(){if(li===void 0)try{await WebAssembly.instantiate(N1),li=!0}catch{li=!1}return li}async function fn(t,e=""){const n=await Ia()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var be=class{};function Ba(){var t=navigator;return typeof OffscreenCanvas<"u"&&(!function(e=navigator){return(e=e.userAgent).includes("Safari")&&!e.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&1<=t.length&&17<=Number(t[1])))}async function Na(t){if(typeof importScripts!="function"){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((n,i)=>{e.addEventListener("load",()=>{n()},!1),e.addEventListener("error",r=>{i(r)},!1),document.body.appendChild(e)})}importScripts(t.toString())}function ja(t){return t.videoWidth!==void 0?[t.videoWidth,t.videoHeight]:t.naturalWidth!==void 0?[t.naturalWidth,t.naturalHeight]:t.displayWidth!==void 0?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function g(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function Va(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[i,r]=ja(e);return!t.l||i===t.i.canvas.width&&r===t.i.canvas.height||(t.i.canvas.width=i,t.i.canvas.height=r),[i,r]}function Ga(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const i=new Uint32Array(e.length);for(let r=0;r<e.length;r++)i[r]=t.i.stringToNewUTF8(e[r]);e=t.i._malloc(4*i.length),t.i.HEAPU32.set(i,e>>2),n(e);for(const r of i)t.i._free(r);t.i._free(e)}function Ut(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function oe(t,e,n){let i=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(r,s,o)=>{s?(n(i,o),i=[]):i.push(r)}}be.forVisionTasks=function(t){return fn("vision",t)},be.forTextTasks=function(t){return fn("text",t)},be.forGenAiExperimentalTasks=function(t){return fn("genai_experimental",t)},be.forGenAiTasks=function(t){return fn("genai",t)},be.forAudioTasks=function(t){return fn("audio",t)},be.isSimdSupported=function(){return Ia()};async function j1(t,e,n,i){return t=await(async(r,s,o,a,c)=>{if(s&&await Na(s),!self.ModuleFactory||o&&(await Na(o),!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 r(c,a)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:r=>r.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&r.endsWith(".data")?n.assetBinaryPath.toString():r}),await t.o(i),t}function Nr(t,e){const n=T(t.baseOptions,ai,1)||new ai;typeof e=="string"?(S(n,2,Fe(e)),S(n,1)):e instanceof Uint8Array&&(S(n,1,nr(e,!1,!1)),S(n,2)),_(t.baseOptions,0,1,n)}function Wa(t){try{const e=t.K.length;if(e===1)throw Error(t.K[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.K.map(n=>n.message).join(", "))}finally{t.K=[]}}function f(t,e){t.J=Math.max(t.J,e)}function ui(t,e){t.C=new J,ut(t.C,"PassThroughCalculator"),M(t.C,"free_memory"),x(t.C,"free_memory_unused_out"),R(e,"free_memory"),dt(e,t.C)}function Ue(t,e){M(t.C,e),x(t.C,e+"_unused_out")}function di(t){t.g.addBoolToStream(!0,"free_memory",t.J)}var fi=class{constructor(t){this.g=t,this.K=[],this.J=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const n=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(T(this.baseOptions,ai,1)?.g()||T(this.baseOptions,ai,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(i,r){let s=T(i.baseOptions,ha,3);if(!s){var o=s=new ha,a=new Go;on(o,4,oi,a)}"delegate"in r&&(r.delegate==="GPU"?(r=s,o=new No,on(r,2,oi,o)):(r=s,o=new Go,on(r,4,oi,o))),_(i.baseOptions,0,3,s)}(this,n),n.modelAssetPath)return fetch(n.modelAssetPath.toString()).then(i=>{if(i.ok)return i.arrayBuffer();throw Error(`Failed to fetch model: ${n.modelAssetPath} (${i.status})`)}).then(i=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(i),!0,!1,!1),Nr(this,"/model.dat"),this.m(),this.L()});if(n.modelAssetBuffer instanceof Uint8Array)Nr(this,n.modelAssetBuffer);else if(n.modelAssetBuffer)return async function(i){const r=[];for(var s=0;;){const{done:o,value:a}=await i.read();if(o)break;r.push(a),s+=a.length}if(r.length===0)return new Uint8Array(0);if(r.length===1)return r[0];i=new Uint8Array(s),s=0;for(const o of r)i.set(o,s),s+=o.length;return i}(n.modelAssetBuffer).then(i=>{Nr(this,i),this.m(),this.L()})}return this.m(),this.L(),Promise.resolve()}L(){}fa(){let t;if(this.g.fa(e=>{t=e1(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener((n,i)=>{this.K.push(Error(i))}),this.g.Ma(),this.g.setGraph(t,e),this.C=void 0,Wa(this)}finishProcessing(){this.g.finishProcessing(),Wa(this)}close(){this.C=void 0,this.g.closeGraph()}};function Z(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}fi.prototype.close=fi.prototype.close,function(t,e){t=t.split(".");var n,i=Ye;for((t[0]in i)||i.execScript===void 0||i.execScript("var "+t[0]);t.length&&(n=t.shift());)t.length||e===void 0?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=e}("TaskRunner",fi);class V1{constructor(e,n,i,r){this.g=e,this.h=n,this.m=i,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Ha(t,e,n){const i=t.g;if(n=Z(i.createShader(n),"Failed to create WebGL shader"),i.shaderSource(n,e),i.compileShader(n),!i.getShaderParameter(n,i.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${i.getShaderInfoLog(n)}`);return i.attachShader(t.h,n),n}function za(t,e){const n=t.g,i=Z(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(i);const r=Z(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,r),n.enableVertexAttribArray(t.K),n.vertexAttribPointer(t.K,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const s=Z(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.J),n.vertexAttribPointer(t.J,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,ne