@mediapipe/tasks-audio 1.0.0 → 1.0.1-rc.20260730

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/audio_bundle.js CHANGED
@@ -1,2 +1,2 @@
1
- var Audio=function(t){"use strict";var r="undefined"!=typeof self?self:{};function e(t,e){t:{for(var n=["CLOSURE_FLAGS"],i=r,o=0;o<n.length;o++)if(null==(i=i[n[o]])){n=null;break t}n=i}return null!=(t=n&&n[t])?t:e}function n(){throw Error("Invalid UTF8")}function i(t,r){return r=String.fromCharCode.apply(null,r),null==t?r:t+r}var o,a,s=void 0,u="undefined"!=typeof TextDecoder,l="undefined"!=typeof TextEncoder;function c(t){if(l)t=(a||=new TextEncoder).encode(t);else{let e=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var r=t.charCodeAt(i);if(r<128)n[e++]=r;else{if(r<2048)n[e++]=r>>6|192;else{if(r>=55296&&r<=57343){if(r<=56319&&i<t.length){let o=t.charCodeAt(++i);if(o>=56320&&o<=57343){r=1024*(r-55296)+o-56320+65536,n[e++]=r>>18|240,n[e++]=r>>12&63|128,n[e++]=r>>6&63|128,n[e++]=63&r|128;continue}i--}r=65533}n[e++]=r>>12|224,n[e++]=r>>6&63|128}n[e++]=63&r|128}}t=e===n.length?n:n.subarray(0,e)}return t}var h=e(610401301,!1),f=e(748402147,!0);function d(){var t=r.navigator;return t&&(t=t.userAgent)?t:""}var g,v=r.navigator;function p(t){return p[" "](t),t}g=v&&v.userAgentData||null,p[" "]=function(){};var m={},y=null;function w(t){var r=t.length,e=3*r/4;e%3?e=Math.floor(e):-1!="=.".indexOf(t[r-1])&&(e=-1!="=.".indexOf(t[r-2])?e-2:e-1);var n=new Uint8Array(e),i=0;return function(t,r){function e(r){for(;n<t.length;){let r=t.charAt(n++),e=y[r];if(null!=e)return e;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return r}b();for(var n=0;;){let t=e(-1),n=e(0),i=e(64),o=e(64);if(64===o&&-1===t)break;r(t<<2|n>>4),64!=i&&(r(n<<4&240|i>>2),64!=o&&r(i<<6&192|o))}}(t,function(t){n[i++]=t}),i!==e?n.subarray(0,i):n}function b(){if(!y){y={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),r=["+/=","+/","-_=","-_.","-_"];for(let e=0;e<5;e++){let n=t.concat(r[e].split(""));m[e]=n;for(let t=0;t<n.length;t++){let r=n[t];void 0===y[r]&&(y[r]=t)}}}}var _="undefined"!=typeof Uint8Array,S=!(!(h&&g&&g.brands.length>0)&&(-1!=d().indexOf("Trident")||-1!=d().indexOf("MSIE")))&&"function"==typeof btoa,A=/[-_.]/g,I={"-":"+",_:"/",".":"="};function E(t){return I[t]||""}function T(t){if(!S)return w(t);t=A.test(t)?t.replace(A,E):t,t=atob(t);var r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}var B={};function U(){return L||=new x(null,B)}function P(t){N(B);var r=t.g;return null==(r=null==r||_&&null!=r&&r instanceof Uint8Array?r:"string"==typeof r?T(r):null)?r:t.g=r}var L,x=class{constructor(t,r){if(N(r),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function N(t){if(t!==B)throw Error("illegal external caller")}function j(t,r){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=r}var O=void 0;function V(t){return j(t=Error(t),"warning"),t}function k(t,e){if(null!=t){var n=O??={},i=n[t]||0;i>=e||(n[t]=i+1,j(t=Error(),"incident"),function(t){r.setTimeout(()=>{throw t},0)}(t))}}function F(){return"function"==typeof BigInt}var M="function"==typeof Symbol&&"symbol"==typeof Symbol();function C(t,r,e=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?e&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():r}var D,G=C("jas",void 0,!0),R=C(void 0,"1oa"),W=C(void 0,Symbol()),H=C(void 0,"0ubs"),$=C(void 0,"0ubsb"),z=C(void 0,"0actk"),K=C("m_m","Ka",!0),J={Y:{value:0,configurable:!0,writable:!0,enumerable:!1}},X=Object.defineProperties,Y=M?G:"Y",Z=[];function q(t,r){M||Y in t||X(t,J),t[Y]|=r}function Q(t,r){M||Y in t||X(t,J),t[Y]=r}Q(Z,7),D=Object.freeze(Z);var tt={};function rt(t,r){return void 0===r?t.g!==et&&!!(2&t.l[Y]):!!(2&r)&&t.g!==et}var et={};function nt(t,r){if(null!=t)if("string"==typeof t)t=t?new x(t,B):U();else if(t.constructor!==x)if(_&&null!=t&&t instanceof Uint8Array)t=t.length?new x(new Uint8Array(t),B):U();else{if(!r)throw Error();t=void 0}return t}var it=Object.freeze({});function ot(t,r,e){var n,i=128&r?0:-1,o=t.length;(n=!!o)&&(n=null!=(n=t[o-1])&&"object"==typeof n&&n.constructor===Object);var a=o+(n?-1:0);for(r=128&r?1:0;r<a;r++)e(r-i,t[r]);if(n){t=t[o-1];for(let r in t)!isNaN(r)&&e(+r,t[r])}}var at={};function st(t){return 128&t?at:void 0}function ut(t){return t.Ia=!0,t}var lt=ut(t=>"number"==typeof t),ct=ut(t=>"string"==typeof t),ht=ut(t=>"boolean"==typeof t),ft="function"==typeof r.BigInt&&"bigint"==typeof r.BigInt(0);function dt(t){var r=t;if(ct(r)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(r))throw Error(String(r))}else if(lt(r)&&!Number.isSafeInteger(r))throw Error(String(r));return ft?BigInt(t):t=ht(t)?t?"1":"0":ct(t)?t.trim()||"0":String(t)}var gt=ut(t=>ft?t>=pt&&t<=yt:"-"===t[0]?wt(t,vt):wt(t,mt)),vt=Number.MIN_SAFE_INTEGER.toString(),pt=ft?BigInt(Number.MIN_SAFE_INTEGER):void 0,mt=Number.MAX_SAFE_INTEGER.toString(),yt=ft?BigInt(Number.MAX_SAFE_INTEGER):void 0;function wt(t,r){if(t.length>r.length)return!1;if(t.length<r.length||t===r)return!0;for(let e=0;e<t.length;e++){let n=t[e],i=r[e];if(n>i)return!1;if(n<i)return!0}}var bt,_t="function"==typeof Uint8Array.prototype.slice,St=0,At=0;function It(t){var r=t>>>0;St=r,At=(t-r)/4294967296>>>0}function Et(t){if(t<0){It(-t);let[r,e]=jt(St,At);St=r>>>0,At=e>>>0}else It(t)}function Tt(t,r){var e=4294967296*r+(t>>>0);return Number.isSafeInteger(e)?e:Pt(t,r)}function Bt(t,r){return dt(F()?BigInt.asUintN(64,(BigInt(r>>>0)<<BigInt(32))+BigInt(t>>>0)):Pt(t,r))}function Ut(t,r){return F()?dt(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(r))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):dt(xt(t,r))}function Pt(t,r){if(t>>>=0,(r>>>=0)<=2097151)var e=""+(4294967296*r+t);else F()?e=""+(BigInt(r)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(e=16777215&(t>>>24|r<<8))+6710656*(r=r>>16&65535),e+=8147497*r,r*=2,t>=1e7&&(e+=t/1e7>>>0,t%=1e7),e>=1e7&&(r+=e/1e7>>>0,e%=1e7),e=r+Lt(e)+Lt(t));return e}function Lt(t){return t=String(t),"0000000".slice(t.length)+t}function xt(t,r){if(2147483648&r)if(F())t=""+(BigInt(0|r)<<BigInt(32)|BigInt(t>>>0));else{let[e,n]=jt(t,r);t="-"+Pt(e,n)}else t=Pt(t,r);return t}function Nt(t){if(t.length<16)Et(Number(t));else if(F())t=BigInt(t),St=Number(t&BigInt(4294967295))>>>0,At=Number(t>>BigInt(32)&BigInt(4294967295));else{let r=+("-"===t[0]);At=St=0;let e=t.length;for(let n=r,i=(e-r)%6+r;i<=e;n=i,i+=6){let r=Number(t.slice(n,i));At*=1e6,(St=1e6*St+r)>=4294967296&&(At+=Math.trunc(St/4294967296),At>>>=0,St>>>=0)}if(r){let[t,r]=jt(St,At);St=t,At=r}}}function jt(t,r){return r=~r,t?t=1+~t:r+=1,[t,r]}function Ot(t){return Array.prototype.slice.call(t)}var Vt="function"==typeof BigInt?BigInt.asIntN:void 0,kt="function"==typeof BigInt?BigInt.asUintN:void 0,Ft=Number.isSafeInteger,Mt=Number.isFinite,Ct=Math.trunc;function Dt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}var Gt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Rt(t){switch(typeof t){case"bigint":return!0;case"number":return Mt(t);case"string":return Gt.test(t);default:return!1}}function Wt(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Mt(t)?0|t:void 0}function Ht(t){var r=t.length;return("-"===t[0]?r<20||20===r&&t<="-9223372036854775808":r<19||19===r&&t<="9223372036854775807")?t:(Nt(t),xt(St,At))}function $t(t){if("-"===t[0])var r=!1;else r=(r=t.length)<20||20===r&&t<="18446744073709551615";return r?t:(Nt(t),Pt(St,At))}function zt(t){if(t=Ct(t),!Ft(t)){Et(t);var r=St,e=At;(t=2147483648&e)&&(e=~e>>>0,0==(r=1+~r>>>0)&&(e=e+1>>>0)),t="number"==typeof(r=Tt(r,e))?t?-r:r:t?"-"+r:r}return t}function Kt(t){return(t=Ct(t))>=0&&Ft(t)||(Et(t),t=Tt(St,At)),t}function Jt(t){var r=Ct(Number(t));return Ft(r)?String(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),Ht(t))}function Xt(t){var r=Ct(Number(t));return Ft(r)?dt(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),F()?dt(Vt(64,BigInt(t))):dt(Ht(t)))}function Yt(t){return Ft(t)?t=dt(zt(t)):(t=Ct(t),Ft(t)?t=String(t):(Et(t),t=xt(St,At)),t=dt(t)),t}function Zt(t){var r=typeof t;return null==t?t:"bigint"===r?dt(Vt(64,t)):Rt(t)?"string"===r?Xt(t):Yt(t):void 0}function qt(t){if(null==t)return t;var r=typeof t;if("bigint"===r)return String(Vt(64,t));if(Rt(t)){if("string"===r)return Jt(t);if("number"===r)return zt(t)}}function Qt(t){if(null==t||"string"==typeof t||t instanceof x)return t}function tr(t){if("string"!=typeof t)throw Error();return t}function rr(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function er(t){return null==t||"string"==typeof t?t:void 0}function nr(t,r,e){if(null!=t&&t[K]===tt)return t;if(Array.isArray(t)){var n=0|t[Y];return(e=n|32&e|2&e)!==n&&Q(t,e),new r(t)}}function ir(t){return t}function or(t){return W?t[W]:void 0}function ar(t,r){for(let e in t)!isNaN(e)&&r(t,+e,t[e])}var sr,ur,lr,cr=class{};function hr(t,r){r<100||k(H,1)}function fr(t,r,e,n){var i=void 0!==n;n=!!n;var o,a=W;!i&&M&&a&&(o=t[a])&&ar(o,hr),a=[];var s=t.length;o=4294967295;var u=!1,l=!!(64&r),c=l?128&r?0:-1:void 0;if(!(1&r)){var h=s&&t[s-1];null!=h&&"object"==typeof h&&h.constructor===Object?o=--s:h=void 0,!l||128&r||i||(u=!0,o=(sr??ir)(o-c,c,t,h,void 0)+c)}r=void 0;for(var f=0;f<s;f++){let i=t[f];if(null!=i&&null!=(i=e(i,n)))if(l&&f>=o){let t=f-c;(r??={})[t]=i}else a[f]=i}if(h)for(let t in h){if(null==(s=h[t])||null==(s=e(s,n)))continue;let i;f=+t,l&&!Number.isNaN(f)&&(i=f+c)<o?a[i]=s:(r??={})[t]=s}return r&&(u?a.push(r):a[o]=r),i&&W&&(t=or(t))&&t instanceof cr&&(a[W]=function(t){var r=new cr;return ar(t,(t,e,n)=>{r[e]=Ot(n)}),r.g=t.g,r}(t)),a}function dr(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return gt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var r=0|t[Y];return 0===t.length&&1&r?void 0:fr(t,r,dr)}if(null!=t&&t[K]===tt)return gr(t);if(t instanceof x){if(null==(r=t.g))t="";else if("string"==typeof r)t=r;else{if(S){for(var e="",n=0,i=r.length-10240;n<i;)e+=String.fromCharCode.apply(null,r.subarray(n,n+=10240));e+=String.fromCharCode.apply(null,n?r.subarray(n):r),r=btoa(e)}else{void 0===e&&(e=0),b(),e=m[e],n=Array(Math.floor(r.length/3)),i=e[64]||"";let t=0,l=0;for(;t<r.length-2;t+=3){var o=r[t],a=r[t+1],s=r[t+2],u=e[o>>2];o=e[(3&o)<<4|a>>4],a=e[(15&a)<<2|s>>6],s=e[63&s],n[l++]=u+o+a+s}switch(u=0,s=i,r.length-t){case 2:s=e[(15&(u=r[t+1]))<<2]||i;case 1:r=r[t],n[l]=e[r>>2]+e[(3&r)<<4|u>>4]+s+i}r=n.join("")}t=t.g=r}return t}return}return t}function gr(t){return fr(t=t.l,0|t[Y],dr)}function vr(t,r){return pr(t,r[0],r[1])}function pr(t,r,e,n=0){if(null==t){var i=32;e?(t=[e],i|=128):t=[],r&&(i=-16760833&i|(1023&r)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[Y],f&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(f)throw Error("carr");k(z,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&Q(t,i|n),t;if(e&&(i|=128,e!==t[0]))throw Error("mid");t:{i|=64;var o=(e=t).length;if(o){var a=o-1;let t=e[a];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((a-=r=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var s in t)(o=+s)<a&&(e[o+r]=t[s],delete t[s]);i=-16760833&i|(1023&a)<<14;break t}}if(r){if((s=Math.max(r,o-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&s)<<14}}}return Q(t,64|i|n),t}function mr(t,r){if("object"!=typeof t)return t;if(Array.isArray(t)){var e=0|t[Y];return 0===t.length&&1&e?t=void 0:2&e||(!r||4096&e||16&e?t=wr(t,e,!1,r&&!(16&e)):(q(t,34),4&e&&Object.freeze(t))),t}return null!=t&&t[K]===tt?rt(t,e=0|(r=t.l)[Y])?t:Ir(t,r,e)?yr(t,r):wr(r,e):t instanceof x?t:void 0}function yr(t,r,e){return t=new t.constructor(r),e&&(t.g=et),t.m=et,t}function wr(t,r,e,n){return n??=!!(34&r),t=fr(t,r,mr,n),n=32,e&&(n|=2),Q(t,r=16769217&r|n),t}function br(t){var r=t.l,e=0|r[Y];return rt(t,e)?Ir(t,r,e)?yr(t,r,!0):new t.constructor(wr(r,e,!1)):t}function _r(t){if(t.g!==et)return!1;var r=t.l;return q(r=wr(r,0|r[Y]),2048),t.l=r,t.g=void 0,t.m=void 0,!0}function Sr(t){if(!_r(t)&&rt(t,0|t.l[Y]))throw Error()}function Ar(t,r){void 0===r&&(r=0|t[Y]),32&r&&!(4096&r)&&Q(t,4096|r)}function Ir(t,r,e){return!!(2&e)||!(!(32&e)||4096&e)&&(Q(r,2|e),t.g=et,!0)}var Er=dt(0);function Tr(t,r,e,n){if(null!==(t=Br(t.l,r,e,n)))return t}function Br(t,r,e,n){if(-1===r)return null;var i=r+(e?0:-1),o=t.length-1;if(!(o<1+(e?0:-1))){if(i>=o){var a=t[o];if(null!=a&&"object"==typeof a&&a.constructor===Object){e=a[r];var s=!0}else{if(i!==o)return;e=a}}else e=t[i];if(n&&null!=e){if(null==(n=n(e)))return n;if(!Object.is(n,e))return s?a[r]=n:t[i]=n,n}return e}}function Ur(t,r,e,n){Sr(t);var i=t.l;return Pr(i,0|i[Y],r,e,n),t}function Pr(t,r,e,n,i){var o=e+(i?0:-1),a=t.length-1;if(a>=1+(i?0:-1)&&o>=a){let i=t[a];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[e]=n,r}return o<=a?(t[o]=n,r):(void 0!==n&&(e>=(a=(r??=0|t[Y])>>14&1023||536870912)?null!=n&&(t[a+(i?0:-1)]={[e]:n}):t[o]=n),r)}function Lr(t,r,e,n,i,o,a,s){var u=r;return 1===o||4===o&&(2&r||!(16&r)&&32&n)?jr(r)||((r|=!t.length||a&&!(4096&r)||32&n&&!(4096&r||16&r)?2:256)!==u&&Q(t,r),Object.freeze(t)):(2===o&&jr(r)&&(t=Ot(t),u=0,r=Jr(r,n),n=Pr(e,n,i,t)),jr(r)||(s||(r|=16),r!==u&&Q(t,r))),2&r||!(4096&r||16&r)||Ar(e,n),t}function xr(t,r,e){return t=Br(t,r,e),Array.isArray(t)?t:D}function Nr(t,r){return 2&r&&(t|=2),1|t}function jr(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function Or(t){return nt(t,!0)}function Vr(t,r,e){Sr(t);var n=0|(t=t.l)[Y];if(null==e)Pr(t,n,r);else{var i=e===D?7:0|e[Y],o=i,a=jr(i),s=a||Object.isFrozen(e);for(a||(i=0),s||(e=Ot(e),o=0,i=Jr(i,n),s=!1),i|=5,i|=(4&i?512&i?512:1024&i?1024:0:void 0)??1024,a=0;a<e.length;a++){let t=e[a],r=tr(t);Object.is(t,r)||(s&&(e=Ot(e),o=0,i=Jr(i,n),s=!1),e[a]=r)}i!==o&&(s&&(e=Ot(e),i=Jr(i,n)),Q(e,i)),Pr(t,n,r,e)}}function kr(t,r,e){if(2&r)throw Error();var n=st(r),i=xr(t,e,n),o=i===D?7:0|i[Y],a=Nr(o,r);return(2&a||jr(a)||16&a)&&(a===o||jr(a)||Q(i,a),i=Ot(i),o=0,a=Jr(a,r),Pr(t,r,e,i,n)),(a&=-13)!==o&&Q(i,a),i}function Fr(t){if(M)return t[R]??(t[R]=new Map);if(R in t)return t[R];var r=new Map;return Object.defineProperty(t,R,{value:r}),r}function Mr(t,r,e,n,i){var o=Fr(t),a=Cr(o,t,r,e,i);return a!==n&&(a&&(r=Pr(t,r,a,void 0,i)),o.set(e,n)),r}function Cr(t,r,e,n,i){var o=t.get(n);if(null!=o)return o;o=0;for(let t=0;t<n.length;t++){let a=n[t];null!=Br(r,a,i)&&(0!==o&&(e=Pr(r,e,o,void 0,i)),o=a)}return t.set(n,o),o}function Dr(t,r,e){var n=0|t[Y],i=st(n),o=Br(t,e,i);if(null!=o&&o[K]===tt){if(!rt(o))return _r(o),o.l;var a=o.l}else Array.isArray(o)&&(a=o);if(a){let t=0|a[Y];2&t&&(a=wr(a,t))}return(a=vr(a,r))!==o&&Pr(t,n,e,a,i),a}function Gr(t,r,e,n){var i=!1;if(null!=(n=Br(t,n,void 0,t=>{var n=nr(t,e,r);return i=n!==t&&null!=n,n})))return i&&!rt(n)&&Ar(t,r),n}function Rr(t,r,e){var n=t.l,i=0|n[Y];if(null==(r=Gr(n,i,r,e)))return r;if(!rt(t,i=0|n[Y])){let o=br(r);o!==r&&(_r(t)&&(i=0|(n=t.l)[Y]),Ar(n,i=Pr(n,i,e,r=o)))}return r}function Wr(t,r,e,n,i,o,a,s){var u=rt(t,e);o=u?1:o,a=!!a||3===o,u=s&&!u,(2===o||u)&&_r(t)&&(e=0|(r=t.l)[Y]);var l=(t=xr(r,i))===D?7:0|t[Y],c=Nr(l,e);if(s=!(4&c)){var h=t,f=e;let r=!!(2&c);r&&(f|=2);let i=!r,o=!0,a=0,s=0;for(;a<h.length;a++){let t=nr(h[a],n,f);if(t instanceof n){if(!r){let r=rt(t);i&&=!r,o&&=r}h[s++]=t}}s<a&&(h.length=s),c|=4,c=o?-4097&c:4096|c,c=i?8|c:-9&c}if(c!==l&&(Q(t,c),2&c&&Object.freeze(t)),u&&!(8&c||!t.length&&(1===o||4===o&&(2&c||!(16&c)&&32&e)))){for(jr(c)&&(t=Ot(t),c=Jr(c,e),e=Pr(r,e,i,t)),n=t,u=c,l=0;l<n.length;l++)(h=n[l])!==(c=br(h))&&(n[l]=c);u|=8,Q(t,c=u=n.length?4096|u:-4097&u)}return Lr(t,c,r,e,i,o,s,a)}function Hr(t,r){var e=t.l;return Wr(t,e,0|e[Y],r,1,void 0===it?2:4,!1,!0)}function $r(t){return null==t&&(t=void 0),t}function zr(t,r,e,n,i){return Ur(t,e,n=$r(n),i),n&&!rt(n)&&Ar(t.l),t}function Kr(t,r,e,n){t:{var i=n=$r(n);Sr(t);let o=t.l,a=0|o[Y];if(null==i){let t=Fr(o);if(Cr(t,o,a,e)!==r)break t;t.set(e,0)}else a=Mr(o,a,e,r);Pr(o,a,r,i)}return n&&!rt(n)&&Ar(t.l),t}function Jr(t,r){return-273&(t=2&r?2|t:-3&t)}function Xr(t,r,e,n){Sr(t);var i=t.l;t=Wr(t,i,0|i[Y],e,r,2,!0),n=null!=n?n:new e,t.push(n),r=e=t===D?7:0|t[Y],(n=rt(n))?(e&=-9,1===t.length&&(e&=-4097)):e|=4096,e!==r&&Q(t,e),n||Ar(i)}function Yr(t,r,e){if(null!=e)t:{if(!Rt(e))throw V("int64");switch(typeof e){case"string":e=Xt(e);break t;case"bigint":e=dt(Vt(64,e));break t;default:e=Yt(e)}}return Ur(t,r,e)}function Zr(t,r,e){return Ur(t,r,null==e?e:function(t){if(!Rt(t))throw V("uint64");switch(typeof t){case"string":var r=Ct(Number(t));return Ft(r)&&r>=0?t=dt(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),t=F()?dt(kt(64,BigInt(t))):dt($t(t))),t;case"bigint":return dt(kt(64,t));default:return Ft(t)?t=dt(Kt(t)):((t=Ct(t))>=0&&Ft(t)?t=String(t):(Et(t),t=Pt(St,At)),t=dt(t)),t}}(e))}function qr(t,r,e){if(null!=e){if(!Mt(e))throw V("enum");e|=0}return Ur(t,r,e)}function Qr(t,r,e){Sr(t);var n=t.l,i=0|n[Y],o=rt(t,i)?1:2;2===o&&_r(t)&&(i=0|(n=t.l)[Y]);var a=(t=xr(n,r))===D?7:0|t[Y],s=Nr(a,i),u=!(4&s);if(u){4&s&&(t=Ot(t),a=0,s=Jr(s,i),i=Pr(n,i,r,t));let e=0,o=0;for(;e<t.length;e++){let r=er(t[e]);null!=r&&(t[o++]=r)}o<e&&(t.length=o),s=-513&s|4,s&=-1025,s&=-4097}s!==a&&(Q(t,s),2&s&&Object.freeze(t)),(t=Lr(t,s,n,i,r,o,u,!0)).push(tr(e))}var te=class{constructor(t,r,e){if(this.buffer=t,e&&!r)throw Error();this.g=r}};function re(t,r){if("string"==typeof t)return new te(T(t),r);if(Array.isArray(t))return new te(new Uint8Array(t),r);if(t.constructor===Uint8Array)return new te(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new te(t,!1);if(t.constructor===x)return r=P(t)||new Uint8Array(0),new te(r,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new te(t,!1);throw Error()}function ee(t,r){var e=0,n=0,i=0,o=t.i,a=t.g;do{var s=o[a++];e|=(127&s)<<i,i+=7}while(i<32&&128&s);if(i>32)for(n|=(127&s)>>4,i=3;i<32&&128&s;i+=7)n|=(127&(s=o[a++]))<<i;if(ue(t,a),!(128&s))return r(e>>>0,n>>>0);throw Error()}function ne(t){for(var r=0,e=t.g,n=e+10,i=t.i;e<n;){let n=i[e++];if(r|=n,!(128&n))return ue(t,e),!!(127&r)}throw Error()}function ie(t){var r=t.i,e=t.g,n=r[e++],i=127&n;if(128&n&&(i|=(127&(n=r[e++]))<<7,128&n&&(i|=(127&(n=r[e++]))<<14,128&n&&(i|=(127&(n=r[e++]))<<21,128&n&&(i|=(n=r[e++])<<28,128&n&&128&r[e++]&&128&r[e++]&&128&r[e++]&&128&r[e++]&&128&r[e++])))))throw Error();return ue(t,e),i}function oe(t){return ee(t,Ut)}function ae(t){var r=t.i,e=t.g,n=r[e],i=r[e+1],o=r[e+2];return r=r[e+3],ue(t,t.g+4),(n|i<<8|o<<16|r<<24)>>>0}function se(t){return ie(t)}function ue(t,r){if(t.g=r,r>t.j)throw Error()}function le(t,r){if(r<0)throw Error();var e=t.g;if((r=e+r)>t.j)throw Error();return t.g=r,e}function ce(t,r){if(0==r)return U();var e=le(t,r);return t.K&&t.o?e=t.i.subarray(e,e+r):(t=t.i,e=e===(r=e+r)?new Uint8Array(0):_t?t.slice(e,r):new Uint8Array(t.subarray(e,r))),0==e.length?U():new x(e,B)}var he=class{constructor(t,r,e,n){this.i=null,this.o=!1,this.g=this.j=this.m=0,this.init(t,r,e,n)}init(t,r,e,{K:n=!1,N:i=!1}={}){this.K=n,this.N=i,t&&(t=re(t,this.N),this.i=t.buffer,this.o=t.g,this.m=r||0,this.j=void 0!==e?this.m+e:this.i.length,this.g=this.m)}clear(){this.i=null,this.o=!1,this.g=this.j=this.m=0,this.K=!1}},fe=[],de=0;function ge(t,r,e,n){if(Ie.length){let i=Ie.pop();return i.F(n),i.g.init(t,r,e,n),i}return new Ae(t,r,e,n)}function ve(t){t.g.clear(),t.j=-1,t.i=-1,Ie.length<100&&Ie.push(t)}function pe(t){var r=t.g;if(r.g==r.j)return!1;t.m=t.g.g;var e=ie(t.g)>>>0;if(r=e>>>3,!((e&=7)>=0&&e<=5))throw Error();if(r<1)throw Error();return t.j=r,t.i=e,!0}function me(t){try{switch(t.i){case 0:0!=t.i?me(t):ne(t.g);break;case 1:var r=t.g;ue(r,r.g+8);break;case 2:if(2!=t.i)me(t);else{var e=ie(t.g)>>>0,n=t.g;ue(n,n.g+e)}break;case 5:var i=t.g;ue(i,i.g+4);break;case 3:ye();let o=t.j;try{for(;;){if(!pe(t))throw Error();if(4==t.i){if(t.j!=o)throw Error();break}me(t)}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{de>0&&de--}break;default:throw Error()}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}}function ye(){if(de>=100)throw new SyntaxError;de++}function we(t,r,e){var n=t.g.j,i=ie(t.g)>>>0,o=(i=t.g.g+i)-n;if(o<=0&&(t.g.j=i,e(r,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error();t.g.g=i,t.g.j=n}function be(t){var r=ie(t.g)>>>0,e=le(t=t.g,r);if(t=t.i,u){var a,l=t;(a=o)||(a=o=new TextDecoder("utf-8",{fatal:!0})),r=e+r,l=0===e&&r===l.length?l:l.subarray(e,r);try{var c=a.decode(l)}catch(t){if(void 0===s){try{a.decode(new Uint8Array([128]))}catch(t){}try{a.decode(new Uint8Array([97])),s=!0}catch(t){s=!1}}throw!s&&(o=void 0),t}}else{r=(c=e)+r,e=[];let o,s=null;for(;c<r;){var h=t[c++];h<128?e.push(h):h<224?c>=r?n():(o=t[c++],h<194||128!=(192&o)?(c--,n()):e.push((31&h)<<6|63&o)):h<240?c>=r-1?n():(o=t[c++],128!=(192&o)||224===h&&o<160||237===h&&o>=160||128!=(192&(a=t[c++]))?(c--,n()):e.push((15&h)<<12|(63&o)<<6|63&a)):h<=244?c>=r-2?n():(o=t[c++],128!=(192&o)||o-144+(h<<28)>>30||128!=(192&(a=t[c++]))||128!=(192&(l=t[c++]))?(c--,n()):(h=(7&h)<<18|(63&o)<<12|(63&a)<<6|63&l,h-=65536,e.push(55296+(h>>10&1023),56320+(1023&h)))):n(),e.length>=8192&&(s=i(s,e),e.length=0)}c=i(s,e)}return c}function _e(t){var r=ie(t.g)>>>0;return ce(t.g,r)}function Se(t,r,e){var n=ie(t.g)>>>0;for(n=t.g.g+n;t.g.g<n;)e.push(r(t.g))}var Ae=class{constructor(t,r,e,n){if(fe.length){let i=fe.pop();i.init(t,r,e,n),t=i}else t=new he(t,r,e,n);this.g=t,this.m=this.g.g,this.i=this.j=-1,this.F(n)}F({P:t=!1}={}){this.P=t}},Ie=[];function Ee(t){return new Ue(4294967295&t,Math.floor(t/4294967296))}function Te(t){return t?/^\d+$/.test(t)?(Nt(t),new Ue(St,At)):null:Be||=new Ue(0,0)}var Be,Ue=class{constructor(t,r){this.i=t>>>0,this.g=r>>>0}};function Pe(t){return new Ce(4294967295&t,Math.floor(t/4294967296))}function Le(t){return t?/^-?\d+$/.test(t)?(Nt(t),new Ce(St,At)):null:xe||=new Ce(0,0)}var xe,Ne,je,Oe,Ve,ke,Fe,Me,Ce=class{constructor(t,r){this.i=t>>>0,this.g=r>>>0}};function De(t,r,e){return"undefined"!=typeof BigInt64Array?(Fe||(Fe=new BigInt64Array(1),Me=new Uint32Array(Fe.buffer),Fe[0]=BigInt(1),ke=1===Me[0]),Fe[0]=t,new r(Me[t=ke?0:1],Me[1-t])):(Ve||(Ne=BigInt(Number.MIN_SAFE_INTEGER),je=BigInt(Number.MAX_SAFE_INTEGER),Oe=BigInt(4294967295),Ve=BigInt(32)),t>=Ne&&t<=je?e(Number(t)):(t=BigInt.asUintN(64,t),new r(Number(t&Oe),Number(t>>Ve))))}function Ge(t,r,e){for(;e>0||r>127;)t.g.push(127&r|128),r=(r>>>7|e<<25)>>>0,e>>>=7;t.g.push(r)}function Re(t,r){for(;r>127;)t.g.push(127&r|128),r>>>=7;t.g.push(r)}function We(t,r){if(r>=0)Re(t,r);else{for(let e=0;e<9;e++)t.g.push(127&r|128),r>>=7;t.g.push(1)}}function He(t,r){Nt(r),function(t){var r=At>>31;t(St<<1^r,(At<<1|St>>>31)^r)}((r,e)=>{Ge(t,r>>>0,e>>>0)})}function $e(t,r){t.g.push(r>>>0&255),t.g.push(r>>>8&255),t.g.push(r>>>16&255),t.g.push(r>>>24&255)}var ze=class{constructor(){this.g=[]}length(){return this.g.length}end(){var t=this.g;return this.g=[],t}};function Ke(t,r){0!==r.length&&(t.j.push(r),t.i+=r.length)}function Je(t,r,e){Re(t.g,8*r+e)}function Xe(t,r){return Je(t,r,2),r=t.g.end(),Ke(t,r),r.push(t.i),r}function Ye(t,r){var e=r.pop();for(e=t.i+t.g.length()-e;e>127;)r.push(127&e|128),e>>>=7,t.i++;r.push(e),t.i++}function Ze(t,r,e){if(null!=e)switch(Je(t,r,0),typeof e){case"number":t=t.g,Et(e),Ge(t,St,At);break;case"bigint":e=De(e,Ce,Pe),Ge(t.g,e.i,e.g);break;default:e=Le(e),Ge(t.g,e.i,e.g)}}function qe(t,r,e){Je(t,r,2),Re(t.g,e.length),Ke(t,t.g.end()),Ke(t,e)}var Qe=class{constructor(){this.j=[],this.i=0,this.g=new ze}};function tn(t){if("string"==typeof t)Le(t)}function rn(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var en=rn(),nn=rn(),on=rn(),an=rn(),sn=rn(),un=rn(),ln=rn(),cn=rn(),hn=rn(),fn=rn(),dn=rn(),gn=rn();var vn=class{constructor(t,r){this.l=pr(t,r,void 0,2048)}toJSON(){return gr(this)}};vn.prototype[K]=tt,vn.prototype.toString=function(){return this.l.toString()};var pn=class{constructor(t,r,e){this.g=t,this.i=r,t=en,this.j=!!t&&e===t||!1}};function mn(t,r){return new pn(t,r,en)}function yn(t,r,e,n,i){null!=(r=Ln(r,n))&&(e=Xe(t,e),i(r,t),Ye(t,e))}var wn,bn,_n=mn(function(t,r,e,n,i){return 2===t.i&&(we(t,Dr(r,n,e),i),!0)},yn),Sn=mn(function(t,r,e,n,i){return 2===t.i&&(we(t,Dr(r,n,e),i),!0)},yn),An=Symbol(),In=Symbol(),En=Symbol(),Tn=Symbol(),Bn=Symbol();function Un(t,r,e,n){var i=n[t];if(i)return i;(i={}).V=n,i.I=function(t){switch(typeof t){case"boolean":return ur||=[0,void 0,!0];case"number":return t>0?void 0:0===t?lr||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var o=n[1],a=1;o&&o.constructor===Object&&(i.L=o,"function"==typeof(o=n[++a])&&(i.R=!0,wn??=o,bn??=n[a+1],o=n[a+=2]));for(var s={};o&&Array.isArray(o)&&o.length&&"number"==typeof o[0]&&o[0]>0;){for(var u=0;u<o.length;u++)s[o[u]]=o;o=n[++a]}for(u=1;void 0!==o;){let t;"number"==typeof o&&(u+=o,o=n[++a]);var l=void 0;if(o instanceof pn?t=o:(t=_n,a--),t?.j){o=n[++a],l=n;var c=a;"function"==typeof o&&(o=o(),l[c]=o),l=o}for(c=u+1,"number"==typeof(o=n[++a])&&o<0&&(c-=o,o=n[++a]);u<c;u++){let n=s[u];l?e(i,u,t,l,n):r(i,u,t,n)}}return n[t]=i}function Pn(t){return Array.isArray(t)?t[0]instanceof pn?t:[Sn,t]:[t,void 0]}function Ln(t,r){return t instanceof vn?t.l:Array.isArray(t)?vr(t,r):void 0}function xn(t,r,e,n){var i=e.g;t[r]=n?(t,r,e)=>i(t,r,e,n):i}function Nn(t,r,e,n,i){var o,a,s=e.g;t[r]=(t,r,e)=>s(t,r,e,a||=Un(In,xn,Nn,n).I,o||=jn(n),i)}function jn(t){var r=t[En];if(null!=r)return r;var e=Un(In,xn,Nn,t);return r=e.R?(t,r)=>wn(t,r,e):(t,r)=>{t:{ye();try{for(;pe(r)&&4!=r.i;){let u=r.j,l=e[u];if(null==l){let t=e.L;if(t){let r=t[u];if(r){let t=Vn(r);null!=t&&(l=e[u]=t)}}}if(null==l||!l(r,t,u)){var n=r;let e=n.m;if(me(n),n.P)var i=void 0;else{let t=n.g.g-e;n.g.g=e,i=ce(n.g,t)}n=void 0;var o=t,a=u,s=i;s&&((n=o[W]??(o[W]=new cr))[a]??(n[a]=[])).push(s)}}let l=or(t);l&&(l.g=e.V[Bn]);var u=!0;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{de>0&&de--}u=void 0}return u},t[En]=r,t[Bn]=On.bind(t),r}function On(t,r,e,n){var i=this[In],o=this[En],a=vr(void 0,i.I),s=or(t);if(s){var u=!1,l=i.L;if(l){if(i=(r,e,i)=>{if(0!==i.length)if(l[e])for(let t of i){r=ge(t);try{u=!0,o(a,r)}finally{ve(r)}}else n?.(t,e,i)},null==r)ar(s,i);else if(null!=s){let t=s[r];t&&i(s,r,t)}if(u){let n=0|t[Y];if(2&n&&2048&n&&!e?.Ma)throw Error();let i=st(n),o=(r,o)=>{if(null!=Br(t,r,i)){if(1===e?.La)return;throw Error()}null!=o&&(n=Pr(t,n,r,o,i)),delete s[r]};null==r?ot(a,0|a[Y],(t,r)=>{o(t,r)}):o(r,Br(a,r,i))}}}}function Vn(t){var r=(t=Pn(t))[0].g;if(t=t[1]){let e=jn(t),n=Un(In,xn,Nn,t).I;return(t,i,o)=>r(t,i,o,n,e)}return r}function kn(t,r,e){t[r]=e.i}function Fn(t,r,e,n){var i,o,a=e.i;t[r]=(t,r,e)=>a(t,r,e,o||=Un(An,kn,Fn,n).I,i||=Mn(n))}function Mn(t){var r=t[Tn];if(!r){let e=Un(An,kn,Fn,t);r=(t,r)=>Cn(t,r,e),t[Tn]=r}return r}function Cn(t,r,e){ot(t,0|t[Y],(t,n)=>{if(null!=n){var i=function(t,r){var e=t[r];if(e)return e;if((e=t.L)&&(e=e[r])){var n=(e=Pn(e))[0].i;if(e=e[1]){let r=Mn(e),i=Un(An,kn,Fn,e).I;e=t.R?bn(i,r):(t,e,o)=>n(t,e,o,i,r)}else e=n;return t[r]=e}}(e,t);i?i(r,n,t):t<500||k($,3)}}),(t=or(t))&&ar(t,(t,e,n)=>{for(Ke(r,r.g.end()),t=0;t<n.length;t++)Ke(r,P(n[t])||new Uint8Array(0))})}var Dn=dt(0);function Gn(t,r,e){if(Array.isArray(r)){var n=0|r[Y];if(4&n)return r;for(var i=0,o=0;i<r.length;i++){let e=t(r[i]);null!=e&&(r[o++]=e)}return o<i&&(r.length=o),t=1|n,e&&(t=-1537&t|4),t!==n&&Q(r,t),e&&2&t&&Object.freeze(r),r}}var Rn=(t,r)=>{var e=new Qe;Cn(t.l,e,Un(An,kn,Fn,r)),Ke(e,e.g.end()),t=new Uint8Array(e.i);var n=(r=e.j).length,i=0;for(let e=0;e<n;e++){let n=r[e];t.set(n,i),i+=n.length}return e.j=[t],t};function Wn(t,r,e){return new pn(t,r,e)}function Hn(t,r,e){return new pn(t,r,e)}function $n(t,r,e){Pr(t,0|t[Y],r,e,st(0|t[Y]))}function zn(t,r,e){null!=(r=qt(r))&&(tn(r),Ze(t,e,r))}function Kn(t,r,e){null!=(r=Wt(r))&&null!=r&&(Je(t,e,0),We(t.g,r))}function Jn(t,r,e){null!=(r=null==r||"boolean"==typeof r?r:"number"==typeof r?!!r:void 0)&&(Je(t,e,0),t.g.g.push(r?1:0))}function Xn(t,r,e){null!=(r=er(r))&&qe(t,e,c(r))}function Yn(t,r,e,n,i){null!=(r=Ln(r,n))&&(e=Xe(t,e),i(r,t),Ye(t,e))}function Zn(t,r,e){null!=(r=Qt(r))&&qe(t,e,re(r,!0).buffer)}function qn(t,r,e){r=function(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Mt(t)?t>>>0:void 0}(r),null!=r&&null!=r&&(Je(t,e,0),Re(t.g,r))}function Qn(t,r,e){null!=(r=Wt(r))&&(r=parseInt(r,10),Je(t,e,0),We(t.g,r))}function ti(t,r,e){return 0===t.i&&($n(r,e,oe(t.g)),!0)}function ri(t,r,e){return(0===t.i||2===t.i)&&(r=kr(r,0|r[Y],e),2==t.i?Se(t,ie,r):r.push(ie(t.g)),!0)}function ei(t,r,e){return 2===t.i&&($n(r,e,(t=_e(t))===U()?void 0:t),!0)}var ni=Wn(function(t,r,e){if(1!==t.i)return!1;var n=t.g;t=ae(n);var i=ae(n);n=2*(i>>31)+1;var o=i>>>20&2047;return t=4294967296*(1048575&i)+t,$n(r,e,2047==o?t?NaN:n*(1/0):0==o?5e-324*n*t:n*Math.pow(2,o-1075)*(t+4503599627370496)),!0},function(t,r,e){null!=(r=Dt(r))&&(Je(t,e,1),t=t.g,(e=bt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+r,!0),St=e.getUint32(0,!0),At=e.getUint32(4,!0),$e(t,St),$e(t,At))},fn),ii=Wn(function(t,r,e){if(5!==t.i)return!1;var n=ae(t.g);t=2*(n>>31)+1;var i=n>>>23&255;return n&=8388607,$n(r,e,255==i?n?NaN:t*(1/0):0==i?1401298464324817e-60*t*n:t*Math.pow(2,i-150)*(n+8388608)),!0},function(t,r,e){null!=(r=Dt(r))&&(Je(t,e,5),t=t.g,(e=bt||=new DataView(new ArrayBuffer(8))).setFloat32(0,+r,!0),At=0,$e(t,St=e.getUint32(0,!0)))},hn),oi=Wn(function(t,r,e){return ti(t,r,e)},zn,un),ai=Wn(function(t,r,e){return ti(t,r,e)},zn,un),si=Hn(function(t,r,e){return 0!==t.i&&2!==t.i?t=!1:(r=kr(r,0|r[Y],e),2==t.i?Se(t,oe,r):r.push(oe(t.g)),t=!0),t},function(t,r,e){if(null!=(r=Gn(qt,r,!1)))for(let n=0;n<r.length;n++)Ze(t,e,r[n])},un),ui=Wn(function(t,r,e){return 0!==t.i?r=!1:($n(r,e,(t=oe(t.g))===Dn?void 0:t),r=!0),r},zn,un),li=Wn(function(t,r,e){return 0!==t.i?t=!1:($n(r,e,ee(t.g,Bt)),t=!0),t},function(t,r,e){if(r=function(t){if(null==t)return t;var r=typeof t;if("bigint"===r)return String(kt(64,t));if(Rt(t)){if("string"===r)return r=Ct(Number(t)),Ft(r)&&r>=0?t=String(r):(-1!==(r=t.indexOf("."))&&(t=t.substring(0,r)),t=$t(t)),t;if("number"===r)return Kt(t)}}(r),null!=r){if("string"==typeof r)Te(r);if(null!=r)switch(Je(t,e,0),typeof r){case"number":t=t.g,Et(r),Ge(t,St,At);break;case"bigint":e=De(r,Ue,Ee),Ge(t.g,e.i,e.g);break;default:e=Te(r),Ge(t.g,e.i,e.g)}}},ln),ci=Wn(function(t,r,e){return 0===t.i&&($n(r,e,ie(t.g)),!0)},Kn,an),hi=Hn(ri,function(t,r,e){if(null!=(r=Gn(Wt,r,!0)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&(Je(n,i,0),We(n.g,o))}},an),fi=Hn(ri,function(t,r,e){if(null!=(r=Gn(Wt,r,!0))&&r.length){e=Xe(t,e);for(let e=0;e<r.length;e++)We(t.g,r[e]);Ye(t,e)}},an),di=Wn(function(t,r,e){return 0===t.i&&($n(r,e,0===(t=ie(t.g))?void 0:t),!0)},Kn,an),gi=Wn(function(t,r,e){return 0===t.i&&($n(r,e,ne(t.g)),!0)},Jn,nn),vi=Wn(function(t,r,e){return 0===t.i&&($n(r,e,!1===(t=ne(t.g))?void 0:t),!0)},Jn,nn),pi=Hn(function(t,r,e){return 2===t.i&&(t=be(t),kr(r,0|r[Y],e).push(t),!0)},function(t,r,e){if(null!=(r=Gn(er,r,!0)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&qe(n,i,c(o))}},on),mi=Wn(function(t,r,e){return 2===t.i&&($n(r,e,""===(t=be(t))?void 0:t),!0)},Xn,on),yi=Wn(function(t,r,e){return 2===t.i&&($n(r,e,be(t)),!0)},Xn,on),wi=function(t,r,e=en){return new pn(t,r,e)}(function(t,r,e,n,i){return 2===t.i&&(n=vr(void 0,n),kr(r,0|r[Y],e).push(n),we(t,n,i),!0)},function(t,r,e,n,i){if(Array.isArray(r)){for(let o=0;o<r.length;o++)Yn(t,r[o],e,n,i);1&(t=0|r[Y])||Q(r,1|t)}}),bi=mn(function(t,r,e,n,i,o){if(2!==t.i)return!1;var a=0|r[Y];return Mr(r,a,o,e,st(a)),we(t,r=Dr(r,n,e),i),!0},Yn),_i=Wn(function(t,r,e){return 2===t.i&&($n(r,e,_e(t)),!0)},Zn,dn),Si=Hn(function(t,r,e){return 2===t.i&&(t=_e(t),kr(r,0|r[Y],e).push(t),!0)},function(t,r,e){if(null!=(r=Gn(Qt,r,!1)))for(let a=0;a<r.length;a++){var n=t,i=e,o=r[a];null!=o&&qe(n,i,re(o,!0).buffer)}},dn),Ai=Wn(function(t,r,e){return 0===t.i&&($n(r,e,ie(t.g)>>>0),!0)},qn,sn),Ii=Wn(function(t,r,e){return 0===t.i&&($n(r,e,0===(t=ie(t.g)>>>0)?void 0:t),!0)},qn,sn),Ei=Wn(function(t,r,e){return 0===t.i&&($n(r,e,ie(t.g)),!0)},Qn,gn),Ti=Wn(function(t,r,e){return 0===t.i&&($n(r,e,0===(t=ie(t.g))?void 0:t),!0)},Qn,gn),Bi=Wn(function(t,r,e){return 0!==t.i?t=!1:($n(r,e,function(t){return ee(t,(t,r)=>{var e=-(1&t);return Ut(t=(t>>>1|r<<31)^e,r>>>1^e)})}(t.g)),t=!0),t},function(t,r,e){if(null!=(r=qt(r))&&(tn(r),null!=r))switch(Je(t,e,0),typeof r){case"number":t=t.g,r=(e=r)<0,It(e=2*Math.abs(e)),e=St;let n=At;r&&(0==e?0==n?n=e=4294967295:(n--,e=4294967295):e--),Ge(t,St=e,At=n);break;case"bigint":t=t.g,r=r<<BigInt(1)^r>>BigInt(63),St=Number(BigInt.asUintN(32,r)),At=Number(BigInt.asUintN(32,r>>BigInt(32))),Ge(t,St,At);break;default:He(t.g,r)}},cn);function Ui(t){return function(){return Rn(this,t)}}var Pi,Li=[0,_i,Si,gi,yi],xi=[0,mi,[0,Ti,[0,ui,di],Ti,-1,[0,Ei],Ti,-1],Wn(ei,Zn,dn)],Ni=[0,mi,Wn(ei,function(t,r,e){if(null!=r){if(r instanceof vn){let n=r.Oa;return void(n?(r=n(r),null!=r&&qe(t,e,re(r,!0).buffer)):k($,3))}if(Array.isArray(r))return void k($,3)}Zn(t,r,e)},dn)],ji=[0,1,[0,12,ci,10,gi],[0,7,[0,ci,-1]]],Oi=globalThis.trustedTypes;var Vi=class{constructor(t){this.g=t}toString(){return this.g+""}};function ki(t){var r;return void 0===Pi&&(Pi=function(){var t=null;if(!Oi)return t;try{let r=t=>t;t=Oi.createPolicy("goog#html",{createHTML:r,createScript:r,createScriptURL:r})}catch(t){}return t}()),t=(r=Pi)?r.createScriptURL(t):t,new Vi(t)}function Fi(t,...r){if(0===r.length)return ki(t[0]);var e=t[0];for(let n=0;n<r.length;n++)e+=encodeURIComponent(r[n])+t[n+1];return ki(e)}var Mi=[0,ci,Ei,gi,-1,fi,Ei,-1,gi,-1],Ci=[0,Ei,-1,gi],Di=class extends vn{constructor(t){super(t)}},Gi=[0,gi,yi,gi,Ei,-1,Hn(function(t,r,e){return(0===t.i||2===t.i)&&(r=kr(r,0|r[Y],e),2==t.i?Se(t,se,r):r.push(ie(t.g)),!0)},function(t,r,e){if(null!=(r=Gn(Wt,r,!0))&&r.length){e=Xe(t,e);for(let e=0;e<r.length;e++)We(t.g,r[e]);Ye(t,e)}},gn),yi,-1,[0,gi,-1],Ei,gi,-1,Ci],Ri=[0,3,gi,-1,2,[0,[2],ci,bi,[0,Ai]],[0,Ei,gi,Ei,gi,Ei,gi,yi,-1],[0,[3,4],yi,-1,bi,[0,ci],bi,[0,Ei,-1]],[0]],Wi=[0,yi,-2],Hi=class extends vn{constructor(t){super(t)}},$i=[0],zi=[0,ci,gi,1,gi,-4],Ki=class extends vn{constructor(t){super(t,2)}},Ji={};Ji[336783863]=[0,yi,gi,-1,ci,[0,[1,2,3,4,5,6,7,8,9],bi,$i,bi,Gi,bi,Wi,bi,zi,bi,Mi,bi,[0,yi,-2],bi,[0,yi,Ei],bi,Ri,bi,Ci],[0,yi],gi,[0,[1,3],[2,4],bi,[0,fi],-1,bi,[0,pi],-1,wi,[0,yi,-1]],yi];var Xi=[0,ui,-1,vi,-3,ui,fi,mi,di,ui,-1,vi,di,vi,-2,mi],Yi=class extends vn{constructor(t){super(t,500)}F(t){return zr(this,0,7,t)}},Zi=[-1,{}],qi=[0,yi,1,Zi],Qi=[0,yi,pi,Zi],to=class extends vn{constructor(t){super(t,500)}F(t){return zr(this,0,1001,t)}};to.prototype.i=Ui([-500,wi,[-500,mi,-1,pi,-3,[-2,Ji,gi],wi,Ni,di,-1,qi,Qi,wi,[0,mi,vi],mi,Xi,di,pi,987,pi],4,wi,[-500,yi,-1,[-1,{}],998,yi],wi,[-500,yi,pi,-1,[-2,{},gi],997,pi,-1],di,wi,[-500,yi,pi,Zi,998,pi],pi,di,qi,Qi,wi,[0,mi,-1,Zi],pi,-2,Xi,mi,-1,vi,[0,vi,Ii],978,Zi,wi,Ni]);var ro,eo=class extends vn{constructor(t){super(t)}},no=class extends vn{constructor(t){super(t)}i(){return Hr(this,eo)}},io=[0,wi,[0,ci,ii,yi,-1]],oo=class extends vn{constructor(t){super(t)}},ao=class extends vn{constructor(t){super(t)}i(){var t=this.l,r=0|t[Y],e=so,n=this.l;return e=2===Cr(Fr(n),n,void 0,e)?2:-1,void 0!==Gr(t,r,Di,e)}},so=[1,2,3,4,5,6],uo=class extends vn{constructor(t){super(t)}i(){return null!=Tr(this,1,void 0,Or)}j(){return null!=er(Tr(this,2))}},lo=class extends vn{constructor(t){super(t)}},co=class extends vn{constructor(t){super(t)}};ro=new class{constructor(){var t=Ki;this.g=co,this.j=zr,this.defaultValue=void 0,this.i=null!=t.Ja?at:void 0}register(){p(this)}},Ji[451755788]=[0,[0,[0,_i,yi,[0,ci,ai,-1],[0,li,ai]],gi,[0,so,bi,zi,bi,Gi,bi,Mi,bi,$i,bi,Wi,bi,Ri],Ei],[0,yi,ci,ii,pi,-1],ni];var ho,fo,go=class extends vn{constructor(t){super(t)}},vo=(ho=class extends vn{constructor(t){super(t)}},fo=[0,wi,[0,1,ci,yi,io],ai],(t,r)=>{t:{let n={N:!0};r&&Object.assign(n,r),t=ge(t,void 0,void 0,n);try{let r=new ho,n=r.l;jn(fo)(n,t);var e=r;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{ve(t)}e=void 0}return e});function po(t){return qr(new mo,1,t)}var mo=class extends vn{constructor(t){super(t)}},yo=class extends vn{constructor(t){super(t)}},wo=[0,Ei,2,li,-2,ai,wi,[0,Ei,ai]],bo=class extends vn{constructor(t){super(t)}},_o=class extends vn{constructor(t){super(t)}};function So(t,r){return qr(t,1,r)}function Ao(t,r){return qr(t,2,r)}var Io=class extends vn{constructor(t){super(t)}},Eo=[3,4,5,6,7],To=class extends vn{constructor(t){super(t)}},Bo=class extends vn{constructor(t){super(t)}};Bo.prototype.i=Ui([0,[0,Ei,yi,-3,Ei],[0,Eo,Ei,-1,bi,[0,Ei,yi,li],bi,wo,bi,[0,1,wo],bi,[0,Ei],bi,[0,Ei,yi,li]]]);var Uo={ia:0,fa:1,ga:2,ha:3,ja:4,ka:5,Da:6,Ea:7,oa:8,pa:9,qa:10,sa:11,ta:12,va:13,Aa:14,la:15,ma:16,na:17,wa:18,xa:25,ua:19,ra:20,za:21,ya:22,Ba:23,Ca:24,Ga:26,Fa:27},Po=class{constructor(){this.g="undefined"!=typeof AbortController}async send(t,r,e){var n=this.g?new AbortController:void 0,i=n&&t.M>0?setTimeout(()=>{n.abort()},t.M):void 0;try{let i=await fetch(t.url,{method:t.da,headers:{...t.ca},...t.body&&{body:t.body},...t.withCredentials&&{credentials:"include"},signal:t.M&&n?n.signal:null});200===i.status?r?.(await i.text()):e?.(i.status)}catch(t){if("AbortError"===t?.name)e?.(408);else e?.(400)}finally{clearTimeout(i)}}},Lo=class extends vn{constructor(t){super(t,37)}},xo=[-4,{},ji,Ei,xi],No=[0,yi,Ei,1,yi,-1,Ei,1,Ei,1,ai],jo=[0,Ei,yi,-2],Oo=[0,yi,Ei],Vo=[0,yi,Ei],ko=[0,gi,-3],Fo=[0,Ei,yi,-1,ai,ci,-1,yi,-5,wi,[0,yi,-4],-1,gi,[0,gi,-3],Ei];var Mo=class extends vn{constructor(t){super(t,19)}},Co=function(t){return r=>Rn(r,t)}([-19,{},[0,Ei,1,[0,yi,-6,ai,ci,yi,-1,ai],1,[0,yi,1,yi,-5],yi,-1,[0,Ei,yi,-8],[0,yi,-3],[0,yi,Ei,yi,-2],[0,yi,-1,Ei,yi,-1,Ei,yi,-1,[0,wi,[0,yi,-1],gi,yi,-5],[0,Ei,gi,ci,-2]],ai,[0,yi,-3,ai,ci,yi,-1],[0,Ei,yi,-1],[0,yi,-9],[0,yi,-6,Ei,yi,1,yi,gi,Ei,-1,gi,yi,-2,Ei,yi,Ei,yi,ci,-1],1,[0,Ei],1,[0,yi,-4],1,No,[0,[1,2,3,4,5,6],bi,No,bi,Oo,bi,Vo,bi,[0,Ei],bi,Fo,bi,jo],Oo,Vo,Fo,[0,[0,Ei,yi,-1,ai,ci,-1,yi,-4,wi,[0,yi,-4],-1,1,ko],[0,Ei,yi,-1,ai,ci,-1,yi,-4,ko]],jo,[0,yi,[0,ci,-3,Ei],Ei,-2,[0,ci,-1],gi],4,[0,yi,Ei,yi,-1,ai,Ei,yi,-1,Ei,ci,-1]],Ei,wi,[-37,{},oi,yi,wi,[0,yi,-1],_i,1,_i,[0,pi,-1,hi,si,-1],yi,[0,ci,yi,-1],gi,ci,ai,yi,-1,Bi,Li,oi,_i,Ei,hi,ai,-1,[0,Ei,-1],yi,gi,yi,fi,yi,-1,ni,1,ni,xo,gi,[0,Ei,[0,ii,ci,-2],[0,ii]],[0,Ei,ai]],oi,Si,yi,-1,oi,Ei,-1,[0,gi,-1,Ei,gi],[0,ai,-1,yi],[0,oi,gi,ai],ai,1,Ai,1,xo]),Do=class{constructor(t){this.i=[],this.m=new Po,this.j=t??"",this.g=setInterval(()=>{this.flush()},6e4)}close(){void 0!==this.g&&(clearInterval(this.g),this.g=void 0),this.flush()}flush(t,r){if(this.error)r?.("net-send-failed");else if(0===this.i.length)t?.();else{var e=this.i;this.i=[],e=function(t){var r=new Mo;{Sr(r=qr(r,2,1786));let l=r.l,c=0|l[Y];if(null==t)Pr(l,c,3);else{var e=t===D?7:0|t[Y],n=e,i=jr(e),o=i||Object.isFrozen(t),a=!0,s=!0;for(let r=0;r<t.length;r++){var u=t[r];i||(u=rt(u),a&&=!u,s&&=u)}i||(e=a?13:5,e=s?-4097&e:4096|e),o&&e===n||(t=Ot(t),n=0,e=Jr(e,c)),e!==n&&Q(t,e),c=Pr(l,c,3,t),2&e||!(4096&e||16&e)||Ar(l,c)}}return r}(e),e=Co(e),this.m.send({url:"https://odml.pa.googleapis.com/v1/log",da:"POST",M:1e4,body:e,Ha:2,ca:{"Content-Type":"application/x-protobuf","x-goog-api-key":this.j},withCredentials:!1},()=>{t?.()},t=>{this.error=Error(`Logging failed with HTTP error: ${t}`),this.i=[],void 0!==this.g&&(clearInterval(this.g),this.g=void 0),r?.("net-send-failed",t)})}}};class Go{constructor(){this.H=this.D=this.B=this.C=this.v=this.A=this.u=0}}function Ro(t,r){var e=new Bo;e=zr(e,0,1,t.U),e=zr(e,0,2,r),r=Ur(r=new Lo,6,nt(e=e.i(),!1)),(t=t.J).error||t.i.push(r)}function Wo(t,r){var e=new yo;return t=Zr(t=Yr(t=qr(e,1,t.S),7,r.C),5,r.D),t=Zr(t,6,r.H),r.v>0&&Zr(t,4,r.B/r.v),0!==r.u&&(e=Yr(e=po(3),2,r.u),Xr(t,8,mo,e)),0!==r.A&&(r=Yr(e=po(4),2,r.A),Xr(t,8,mo,r)),t}var Ho=class{constructor(t,r,e){this.T=performance.now(),this.m=performance.now(),this.i=new Map,this.o=0,this.g=new Go,this.j=new Go,this.J=new Do(e),this.G=Uo["TASKS_"+t.toUpperCase().replace(/_/g,"")]??0,this.S=function(t){switch(t){case"IMAGE":return 11;case"VIDEO":return 12;case"LIVE_STREAM":return 13;case"AUDIO_CLIPS":return 14;case"AUDIO_STREAM":return 15;default:return 10}}(r),t=new To,"undefined"==typeof window?r=0:(r=navigator.userAgent,r=/Android/i.test(r)?1:/iPhone|iPad|iPod/i.test(r)?2:/Windows/i.test(r)?5:/Macintosh/i.test(r)?4:/Linux/i.test(r)?3:0),t=Ur(t=qr(t,1,r),2,rr("")),t=Ur(t,3,rr("")),t=Ur(t,4,rr("1.0.0")),t=Ur(t,5,rr("")),this.U=qr(t,6,4)}aa(){var t=new _o;t=Zr(t=qr(t,1,this.S),3,performance.now()-this.T),Ro(this,t=Kr(Ao(So(new Io,this.G),0),3,Eo,t)),this.m=performance.now()}Z(){var t={u:this.g.u,A:this.g.A,v:this.g.v,C:this.g.C+this.i.size,B:this.g.B,D:this.o,H:performance.now()-this.T},r=new bo;r=zr(r,0,2,t=Wo(this,t)),Ro(this,r=Kr(t=Ao(So(new Io,this.G),2),5,Eo,r))}close(){var t=this.J;"function"==typeof t.close?t.close():t.flush()}};function $o(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function zo(t){if("function"!=typeof importScripts){let r=document.createElement("script");return r.src=t.toString(),r.crossOrigin="anonymous",new Promise((t,e)=>{r.addEventListener("load",()=>{t()},!1),r.addEventListener("error",t=>{e(t)},!1),document.body.appendChild(r)})}try{importScripts(t.toString())}catch(r){if(!(r instanceof TypeError))throw r;{let r=self.import;r?await r(t.toString()):await import(t.toString())}}}function Ko(t,r,e){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),e(r=t.h.stringToNewUTF8(r)),t.h._free(r)}function Jo(t,r,e){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(r.length);for(let e=0;e<r.length;e++)n[e]=t.h.stringToNewUTF8(r[e]);r=t.h._malloc(4*n.length),t.h.HEAPU32.set(n,r>>2),e(r);for(let r of n)t.h._free(r);t.h._free(r)}function Xo(t,r,e){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[r]=e}function Yo(t,r,e){var n=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[r]=(t,r,i)=>{r?(e(n,i),n=[]):n.push(t)}}var Zo=function(t){return class extends t{get O(){return this.h}X(){if("function"==typeof this.O._mediapipeLoggerGetEncodedApiKey){let t=this.O._mediapipeLoggerGetEncodedApiKey();return this.O._decodeBase64(t)}}}}(function(t){return class extends t{ba(){this.h._registerModelResourcesGraphService()}}}(class{constructor(t,r){this.j=!0,this.h=t,this.g=null,this.i=0,this.m="function"==typeof this.h._addIntToInputStream,void 0!==r?this.h.canvas=r:$o()?this.h.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.h.canvas=document.createElement("canvas"))}async initializeGraph(t){var r=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(r),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,r){var e=t.length,n=this.h._malloc(e);this.h.HEAPU8.set(t,n),r?this.h._changeBinaryGraph(e,n):this.h._changeTextGraph(e,n),this.h._free(n)}configureAudio(t,r,e,n,i){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Ko(this,n||"input_audio",n=>{Ko(this,i=i||"audio_header",i=>{this.h._configureAudio(n,i,t,r??0,e)})})}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.h._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.h.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.h.errorListener=t}attachEmptyPacketListener(t,r){this.h.emptyPacketListeners=this.h.emptyPacketListeners||{},this.h.emptyPacketListeners[t]=r}addAudioToStream(t,r,e){this.addAudioToStreamWithShape(t,0,0,r,e)}addAudioToStreamWithShape(t,r,e,n,i){var o=4*t.length;this.i!==o&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(o),this.i=o),this.h.HEAPF32.set(t,this.g/4),Ko(this,n,t=>{this.h._addAudioToInputStream(this.g,r,e,t,i)})}addGpuBufferToStream(t,r,e){Ko(this,r,r=>{if(!this.h.canvas)throw Error("No OpenGL canvas configured.");r?this.h._bindTextureToStream(r):this.h._bindTextureToCanvas();var n=this.h.canvas.getContext("webgl2")||this.h.canvas.getContext("webgl");if(!n)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");this.h.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),this.h.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);var[i,o]=void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height];!this.j||i===this.h.canvas.width&&o===this.h.canvas.height||(this.h.canvas.width=i,this.h.canvas.height=o);var[a,s]=[i,o];this.h._addBoundTextureToStream(r,a,s,e)})}addBoolToStream(t,r,e){Ko(this,r,r=>{this.h._addBoolToInputStream(t,r,e)})}addDoubleToStream(t,r,e){Ko(this,r,r=>{this.h._addDoubleToInputStream(t,r,e)})}addFloatToStream(t,r,e){Ko(this,r,r=>{this.h._addFloatToInputStream(t,r,e)})}addIntToStream(t,r,e){Ko(this,r,r=>{this.h._addIntToInputStream(t,r,e)})}addUintToStream(t,r,e){Ko(this,r,r=>{this.h._addUintToInputStream(t,r,e)})}addStringToStream(t,r,e){Ko(this,r,r=>{Ko(this,t,t=>{this.h._addStringToInputStream(t,r,e)})})}addStringRecordToStream(t,r,e){Ko(this,r,r=>{Jo(this,Object.keys(t),n=>{Jo(this,Object.values(t),i=>{this.h._addFlatHashMapToInputStream(n,i,Object.keys(t).length,r,e)})})})}addProtoToStream(t,r,e,n){Ko(this,e,e=>{Ko(this,r,r=>{var i=this.h._malloc(t.length);this.h.HEAPU8.set(t,i),this.h._addProtoToInputStream(i,t.length,r,e,n),this.h._free(i)})})}addEmptyPacketToStream(t,r){Ko(this,t,t=>{this.h._addEmptyPacketToInputStream(t,r)})}addBoolVectorToStream(t,r,e){Ko(this,r,r=>{var n=this.h._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let r of t)this.h._addBoolVectorEntry(n,r);this.h._addBoolVectorToInputStream(n,r,e)})}addDoubleVectorToStream(t,r,e){Ko(this,r,r=>{var n=this.h._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let r of t)this.h._addDoubleVectorEntry(n,r);this.h._addDoubleVectorToInputStream(n,r,e)})}addFloatVectorToStream(t,r,e){Ko(this,r,r=>{var n=this.h._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let r of t)this.h._addFloatVectorEntry(n,r);this.h._addFloatVectorToInputStream(n,r,e)})}addIntVectorToStream(t,r,e){Ko(this,r,r=>{var n=this.h._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let r of t)this.h._addIntVectorEntry(n,r);this.h._addIntVectorToInputStream(n,r,e)})}addUintVectorToStream(t,r,e){Ko(this,r,r=>{var n=this.h._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let r of t)this.h._addUintVectorEntry(n,r);this.h._addUintVectorToInputStream(n,r,e)})}addStringVectorToStream(t,r,e){Ko(this,r,r=>{var n=this.h._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let r of t)Ko(this,r,t=>{this.h._addStringVectorEntry(n,t)});this.h._addStringVectorToInputStream(n,r,e)})}addBoolToInputSidePacket(t,r){Ko(this,r,r=>{this.h._addBoolToInputSidePacket(t,r)})}addDoubleToInputSidePacket(t,r){Ko(this,r,r=>{this.h._addDoubleToInputSidePacket(t,r)})}addFloatToInputSidePacket(t,r){Ko(this,r,r=>{this.h._addFloatToInputSidePacket(t,r)})}addIntToInputSidePacket(t,r){Ko(this,r,r=>{this.h._addIntToInputSidePacket(t,r)})}addUintToInputSidePacket(t,r){Ko(this,r,r=>{this.h._addUintToInputSidePacket(t,r)})}addStringToInputSidePacket(t,r){Ko(this,r,r=>{Ko(this,t,t=>{this.h._addStringToInputSidePacket(t,r)})})}addProtoToInputSidePacket(t,r,e){Ko(this,e,e=>{Ko(this,r,r=>{var n=this.h._malloc(t.length);this.h.HEAPU8.set(t,n),this.h._addProtoToInputSidePacket(n,t.length,r,e),this.h._free(n)})})}addBoolVectorToInputSidePacket(t,r){Ko(this,r,r=>{var e=this.h._allocateBoolVector(t.length);if(!e)throw Error("Unable to allocate new bool vector on heap.");for(let r of t)this.h._addBoolVectorEntry(e,r);this.h._addBoolVectorToInputSidePacket(e,r)})}addDoubleVectorToInputSidePacket(t,r){Ko(this,r,r=>{var e=this.h._allocateDoubleVector(t.length);if(!e)throw Error("Unable to allocate new double vector on heap.");for(let r of t)this.h._addDoubleVectorEntry(e,r);this.h._addDoubleVectorToInputSidePacket(e,r)})}addFloatVectorToInputSidePacket(t,r){Ko(this,r,r=>{var e=this.h._allocateFloatVector(t.length);if(!e)throw Error("Unable to allocate new float vector on heap.");for(let r of t)this.h._addFloatVectorEntry(e,r);this.h._addFloatVectorToInputSidePacket(e,r)})}addIntVectorToInputSidePacket(t,r){Ko(this,r,r=>{var e=this.h._allocateIntVector(t.length);if(!e)throw Error("Unable to allocate new int vector on heap.");for(let r of t)this.h._addIntVectorEntry(e,r);this.h._addIntVectorToInputSidePacket(e,r)})}addUintVectorToInputSidePacket(t,r){Ko(this,r,r=>{var e=this.h._allocateUintVector(t.length);if(!e)throw Error("Unable to allocate new unsigned int vector on heap.");for(let r of t)this.h._addUintVectorEntry(e,r);this.h._addUintVectorToInputSidePacket(e,r)})}addStringVectorToInputSidePacket(t,r){Ko(this,r,r=>{var e=this.h._allocateStringVector(t.length);if(!e)throw Error("Unable to allocate new string vector on heap.");for(let r of t)Ko(this,r,t=>{this.h._addStringVectorEntry(e,t)});this.h._addStringVectorToInputSidePacket(e,r)})}attachBoolListener(t,r){Xo(this,t,r),Ko(this,t,t=>{this.h._attachBoolListener(t)})}attachBoolVectorListener(t,r){Yo(this,t,r),Ko(this,t,t=>{this.h._attachBoolVectorListener(t)})}attachIntListener(t,r){Xo(this,t,r),Ko(this,t,t=>{this.h._attachIntListener(t)})}attachIntVectorListener(t,r){Yo(this,t,r),Ko(this,t,t=>{this.h._attachIntVectorListener(t)})}attachUintListener(t,r){Xo(this,t,r),Ko(this,t,t=>{this.h._attachUintListener(t)})}attachUintVectorListener(t,r){Yo(this,t,r),Ko(this,t,t=>{this.h._attachUintVectorListener(t)})}attachDoubleListener(t,r){Xo(this,t,r),Ko(this,t,t=>{this.h._attachDoubleListener(t)})}attachDoubleVectorListener(t,r){Yo(this,t,r),Ko(this,t,t=>{this.h._attachDoubleVectorListener(t)})}attachFloatListener(t,r){Xo(this,t,r),Ko(this,t,t=>{this.h._attachFloatListener(t)})}attachFloatVectorListener(t,r){Yo(this,t,r),Ko(this,t,t=>{this.h._attachFloatVectorListener(t)})}attachStringListener(t,r){Xo(this,t,r),Ko(this,t,t=>{this.h._attachStringListener(t)})}attachStringVectorListener(t,r){Yo(this,t,r),Ko(this,t,t=>{this.h._attachStringVectorListener(t)})}attachProtoListener(t,r,e){Xo(this,t,r),Ko(this,t,t=>{this.h._attachProtoListener(t,e||!1)})}attachProtoVectorListener(t,r,e){Yo(this,t,r),Ko(this,t,t=>{this.h._attachProtoVectorListener(t,e||!1)})}attachAudioListener(t,r,e){this.h._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Xo(this,t,(t,e)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),r(t,e)}),Ko(this,t,t=>{this.h._attachAudioListener(t,e||!1)})}finishProcessing(){this.h._waitUntilIdle()}closeGraph(){this.h._closeGraph(),this.h.simpleListeners=void 0,this.h.emptyPacketListeners=void 0}})),qo=class extends Zo{};async function Qo(t,r){var e=la,n=await(async(t,r,e,n)=>{if(r&&await zo(r),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(e&&(await zo(e),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&n&&((r=self.Module).locateFile=n.locateFile,n.mainScriptUrlOrBlob&&(r.mainScriptUrlOrBlob=n.mainScriptUrlOrBlob)),n=await self.ModuleFactory(self.Module||n),self.ModuleFactory=self.Module=void 0,new t(n,null)})(e,t.wasmLoaderPath,t.assetLoaderPath,{locateFile:r=>r.endsWith(".wasm")?t.wasmBinaryPath.toString():t.assetBinaryPath&&r.endsWith(".data")?t.assetBinaryPath.toString():r});return function(t,r,e){e=e.Na??"";var n=t.g.X();t.i=new Ho(r,e,n)}(n,e.name,r),await n.F(r),n}async function ta(t,r){return Qo(t,r)}function ra(t,r){var e=Rr(t.baseOptions,uo,1)||new uo;"string"==typeof r?(Ur(e,2,rr(r)),Ur(e,1)):r instanceof Uint8Array&&(Ur(e,1,nt(r,!1)),Ur(e,2)),zr(t.baseOptions,0,1,e)}function ea(t,r){var e=r.baseOptions||{};if(r.baseOptions?.modelAssetBuffer&&r.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Rr(t.baseOptions,uo,1)?.i()||Rr(t.baseOptions,uo,1)?.j()||r.baseOptions?.modelAssetBuffer||r.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,r){var e=Rr(t.baseOptions,ao,3);if(!e){var n=e=new ao,i=new Hi;Kr(n,4,so,i)}"delegate"in r&&("GPU"===r.delegate?(r=e,n=new Di,Kr(r,2,so,n)):(r=e,n=new Hi,Kr(r,4,so,n))),zr(t.baseOptions,0,3,e)}(t,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then(t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)}).then(r=>{try{t.g.h.FS_unlink("/model.dat")}catch{}t.g.h.FS_createDataFile("/","model.dat",new Uint8Array(r),!0,!1,!1),ra(t,"/model.dat"),ua(t)});if(e.modelAssetBuffer instanceof Uint8Array)ra(t,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){for(var r=[],e=0;;){let{done:n,value:i}=await t.read();if(n)break;r.push(i),e+=i.length}if(0===r.length)return new Uint8Array(0);if(1===r.length)return r[0];t=new Uint8Array(e),e=0;for(let n of r)t.set(n,e),e+=n.length;return t}(e.modelAssetBuffer).then(r=>{ra(t,r),ua(t)});return ua(t),Promise.resolve()}function na(t){try{let r=t.o.length;if(1===r)throw Error(t.o[0].message);if(r>1)throw Error("Encountered multiple errors: "+t.o.map(t=>t.message).join(", "))}finally{t.o=[]}}var ia=class{constructor(t){this.g=t,this.o=[],this.m=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,r){this.g.attachErrorListener((t,r)=>{this.o.push(Error(r))}),this.g.ba(),this.g.setGraph(t,r),this.i?.aa(),na(this)}finishProcessing(t){if(this.g.finishProcessing(),na(this),this.i&&void 0!==t){var r=this.i,e=r.i.get(t);if(void 0!==e&&(r.i.delete(t),t=performance.now()-e,++r.g.v,r.g.B+=t,r.g.D=Math.max(r.g.D,t),r.o=Math.max(r.o,t),performance.now()>r.m+3e4)){for(let[n,i]of r.i.entries())t=n,i<e&&(r.g.C++,r.i.delete(t));e={u:r.g.u,A:r.g.A,v:r.g.v,C:r.g.C,B:r.g.B,D:r.g.D,H:performance.now()-r.m},r.g.D=0,r.m=performance.now();var n={u:e.u-r.j.u,A:e.A-r.j.A,v:e.v-r.j.v,C:e.C-r.j.C,B:e.B-r.j.B,D:e.D,H:e.H};t=Ao(So(new Io,r.G),1),n=Wo(r,n),Ro(r,t=Kr(t,4,Eo,n)),r.j=e}}}close(){this.i?.Z(),this.i?.close(),this.g.closeGraph()}};async function oa(t,r){return ta(t,r)}ia.prototype.close=ia.prototype.close;var aa=class extends ia{constructor(){super(...arguments),this.J=48e3}ea(t){this.J=t}};function sa(t){var r={classifications:Hr(t,go).map(t=>function(t,r=-1,e=""){return{categories:t.map(t=>({index:Wt(Tr(t,1))??0??-1,score:Tr(t,2,void 0,Dt)??0??0,categoryName:er(Tr(t,3))??""??"",displayName:er(Tr(t,4))??""??""})),headIndex:r,headName:e}}(Rr(t,no,4)?.i()??[],Wt(Tr(t,2))??0,er(Tr(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(gt(t)?t=Number(t):(t=Vt(64,t),t=gt(t)?Number(t):String(t)),t):Rt(t)?"number"==typeof t?zt(t):Jt(t):void 0}(Tr(t,2,void 0,Zt))&&(r.timestampMs=function(t){var r=Number(t);return Number.isSafeInteger(r)?r:String(t)}(Tr(t,2,void 0,Zt)??Er)),r}function ua(t){var r=new to;Qr(r,10,"audio_in"),Qr(r,10,"sample_rate"),Qr(r,15,"timestamped_classifications");var e=new Ki;!function(t,r){var e=ro,n=t.l;W&&W in n&&(n=n[W])&&delete n[451755788],e.g?e.j(t,e.g,451755788,r,e.i):e.j(t,451755788,r,e.i)}(e,t.j);var n=new Yi;!function(t){var r=rr("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph");Sr(t),Pr(t=t.l,0|t[Y],2,""===r?void 0:r)}(n),Qr(n,3,"AUDIO:audio_in"),Qr(n,3,"SAMPLE_RATE:sample_rate"),Qr(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.F(e),Xr(r,1,Yi,n),t.g.attachProtoVectorListener("timestamped_classifications",(r,e)=>{!function(t,r){r.forEach(r=>{r=vo(r),t.G.push(sa(r))})}(t,r),t.m=Math.max(t.m,e)}),t.g.attachEmptyPacketListener("timestamped_classifications",r=>{t.m=Math.max(t.m,r)}),r=r.i(),t.setGraph(new Uint8Array(r),!0)}aa.prototype.setDefaultSampleRate=aa.prototype.ea;var la=class extends aa{constructor(t,r){super(new qo(t,r)),this.G=[],zr(t=this.j=new co,0,1,r=new lo)}get baseOptions(){return Rr(this.j,lo,1)}set baseOptions(t){zr(this.j,0,1,t)}F(t){var r=this.j,e=Rr(this.j,oo,2);if(e){var n=e.l;let t=0|n[Y];e=Ir(e,n,t)?yr(e,n,!0):new e.constructor(wr(n,t,!1))}else e=new oo;if(void 0!==t.displayNamesLocale?Ur(e,1,rr(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ur(e,1),void 0!==t.maxResults){if(null!=(n=t.maxResults)){if("number"!=typeof n)throw V("int32");if(!Mt(n))throw V("int32");n|=0}Ur(e,2,n)}else"maxResults"in t&&Ur(e,2);if(void 0!==t.scoreThreshold){if(null!=(n=t.scoreThreshold)&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Ur(e,3,n)}else"scoreThreshold"in t&&Ur(e,3);return void 0!==t.categoryAllowlist?Vr(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ur(e,4),void 0!==t.categoryDenylist?Vr(e,5,t.categoryDenylist):"categoryDenylist"in t&&Ur(e,5),zr(r,0,2,e),ea(this,t)}W(t,r){r=r??this.J;var e=this.m+1;if(this.i&&void 0!==e)if(Rr(this.baseOptions,ao,3)?.i()){var n=this.i;++n.g.A,n.i.set(e,performance.now())}else++(n=this.i).g.u,n.i.set(e,performance.now());return this.g.addDoubleToStream(r,"sample_rate",e),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",e),this.G=[],this.finishProcessing(e),[...this.G]}};la.prototype.classify=la.prototype.W,la.prototype.setOptions=la.prototype.F,la.createFromModelPath=function(t,r){return ta(t,{baseOptions:{modelAssetPath:r}})},la.createFromModelBuffer=function(t,r){return oa(t,{baseOptions:{modelAssetBuffer:r}})},la.createFromOptions=function(t,r){return oa(t,r)};var ca,ha=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 fa(t){if(t)return!0;if(void 0===ca)try{await WebAssembly.instantiate(ha),ca=!0}catch{ca=!1}return ca}async function da(t,r,e){return{wasmLoaderPath:`${r}/${t}_${e=`wasm${e?"_module":""}${await fa(e)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${r}/${t}_${e}.wasm`}}var ga=class{};return ga.forVisionTasks=function(t,r=!1){return da("vision",t??Fi``,r)},ga.forTextTasks=function(t,r=!1){return da("text",t??Fi``,r)},ga.forGenAiTasks=function(t,r=!1){return da("genai",t??Fi``,r)},ga.forAudioTasks=function(t,r=!1){return da("audio",t??Fi``,r)},ga.isSimdSupported=function(t=!1){return fa(t)},t.AudioClassifier=la,t.AudioTaskRunner=aa,t.FilesetResolver=ga,t.TaskRunner=ia,t}({});
1
+ var Audio=function(t){"use strict";var e="undefined"!=typeof self?self:{};function r(t,r){t:{for(var n=["CLOSURE_FLAGS"],i=e,o=0;o<n.length;o++)if(null==(i=i[n[o]])){n=null;break t}n=i}return null!=(t=n&&n[t])?t:r}function n(){throw Error("Invalid UTF8")}function i(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}var o,a,s=void 0,u="undefined"!=typeof TextDecoder,l="undefined"!=typeof TextEncoder;function c(t){if(l)t=(a||=new TextEncoder).encode(t);else{let r=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)n[r++]=e;else{if(e<2048)n[r++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){let o=t.charCodeAt(++i);if(o>=56320&&o<=57343){e=1024*(e-55296)+o-56320+65536,n[r++]=e>>18|240,n[r++]=e>>12&63|128,n[r++]=e>>6&63|128,n[r++]=63&e|128;continue}i--}e=65533}n[r++]=e>>12|224,n[r++]=e>>6&63|128}n[r++]=63&e|128}}t=r===n.length?n:n.subarray(0,r)}return t}var h=r(610401301,!1),f=r(748402147,!0);function d(){var t=e.navigator;return t&&(t=t.userAgent)?t:""}var g,v=e.navigator;function p(t){return p[" "](t),t}g=v&&v.userAgentData||null,p[" "]=function(){};var m={},y=null;function w(t){var e=t.length,r=3*e/4;r%3?r=Math.floor(r):-1!="=.".indexOf(t[e-1])&&(r=-1!="=.".indexOf(t[e-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function(t,e){function r(e){for(;n<t.length;){let e=t.charAt(n++),r=y[e];if(null!=r)return r;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}b();for(var n=0;;){let t=r(-1),n=r(0),i=r(64),o=r(64);if(64===o&&-1===t)break;e(t<<2|n>>4),64!=i&&(e(n<<4&240|i>>2),64!=o&&e(i<<6&192|o))}}(t,function(t){n[i++]=t}),i!==r?n.subarray(0,i):n}function b(){if(!y){y={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let r=0;r<5;r++){let n=t.concat(e[r].split(""));m[r]=n;for(let t=0;t<n.length;t++){let e=n[t];void 0===y[e]&&(y[e]=t)}}}}var _="undefined"!=typeof Uint8Array,S=!(!(h&&g&&g.brands.length>0)&&(-1!=d().indexOf("Trident")||-1!=d().indexOf("MSIE")))&&"function"==typeof btoa,A=/[-_.]/g,I={"-":"+",_:"/",".":"="};function E(t){return I[t]||""}function T(t){if(!S)return w(t);t=A.test(t)?t.replace(A,E):t,t=atob(t);var e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}var B={};function U(){return P||=new x(null,B)}function L(t){N(B);var e=t.g;return null==(e=null==e||_&&null!=e&&e instanceof Uint8Array?e:"string"==typeof e?T(e):null)?e:t.g=e}var P,x=class{constructor(t,e){if(N(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function N(t){if(t!==B)throw Error("illegal external caller")}function j(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}var O=void 0;function k(t){return j(t=Error(t),"warning"),t}function V(t,r){if(null!=t){var n=O??={},i=n[t]||0;i>=r||(n[t]=i+1,j(t=Error(),"incident"),function(t){e.setTimeout(()=>{throw t},0)}(t))}}function F(){return"function"==typeof BigInt}var M="function"==typeof Symbol&&"symbol"==typeof Symbol();function C(t,e,r=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var D,G=C("jas",void 0,!0),R=C(void 0,"1oa"),W=C(void 0,Symbol()),H=C(void 0,"0ubs"),$=C(void 0,"0ubsb"),z=C(void 0,"0actk"),K=C("m_m","ia",!0),J={Y:{value:0,configurable:!0,writable:!0,enumerable:!1}},X=Object.defineProperties,Y=M?G:"Y",Z=[];function q(t,e){M||Y in t||X(t,J),t[Y]|=e}function Q(t,e){M||Y in t||X(t,J),t[Y]=e}Q(Z,7),D=Object.freeze(Z);var tt={};function et(t,e){return void 0===e?t.g!==rt&&!!(2&t.l[Y]):!!(2&e)&&t.g!==rt}var rt={};function nt(t,e){if(null!=t)if("string"==typeof t)t=t?new x(t,B):U();else if(t.constructor!==x)if(_&&null!=t&&t instanceof Uint8Array)t=t.length?new x(new Uint8Array(t),B):U();else{if(!e)throw Error();t=void 0}return t}var it=Object.freeze({});function ot(t,e,r){var n,i=128&e?0:-1,o=t.length;(n=!!o)&&(n=null!=(n=t[o-1])&&"object"==typeof n&&n.constructor===Object);var a=o+(n?-1:0);for(e=128&e?1:0;e<a;e++)r(e-i,t[e]);if(n){t=t[o-1];for(let e in t)!isNaN(e)&&r(+e,t[e])}}var at={};function st(t){return 128&t?at:void 0}function ut(t){return t.ga=!0,t}var lt=ut(t=>"number"==typeof t),ct=ut(t=>"string"==typeof t),ht=ut(t=>"boolean"==typeof t),ft="function"==typeof e.BigInt&&"bigint"==typeof e.BigInt(0);function dt(t){var e=t;if(ct(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(lt(e)&&!Number.isSafeInteger(e))throw Error(String(e));return ft?BigInt(t):t=ht(t)?t?"1":"0":ct(t)?t.trim()||"0":String(t)}var gt=ut(t=>ft?t>=pt&&t<=yt:"-"===t[0]?wt(t,vt):wt(t,mt)),vt=Number.MIN_SAFE_INTEGER.toString(),pt=ft?BigInt(Number.MIN_SAFE_INTEGER):void 0,mt=Number.MAX_SAFE_INTEGER.toString(),yt=ft?BigInt(Number.MAX_SAFE_INTEGER):void 0;function wt(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=e[r];if(n>i)return!1;if(n<i)return!0}}var bt,_t="function"==typeof Uint8Array.prototype.slice,St=0,At=0;function It(t){var e=t>>>0;St=e,At=(t-e)/4294967296>>>0}function Et(t){if(t<0){It(-t);let[e,r]=jt(St,At);St=e>>>0,At=r>>>0}else It(t)}function Tt(t,e){var r=4294967296*e+(t>>>0);return Number.isSafeInteger(r)?r:Lt(t,e)}function Bt(t,e){return dt(F()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):Lt(t,e))}function Ut(t,e){return F()?dt(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):dt(xt(t,e))}function Lt(t,e){if(t>>>=0,(e>>>=0)<=2097151)var r=""+(4294967296*e+t);else F()?r=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(r=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),r+=8147497*e,e*=2,t>=1e7&&(r+=t/1e7>>>0,t%=1e7),r>=1e7&&(e+=r/1e7>>>0,r%=1e7),r=e+Pt(r)+Pt(t));return r}function Pt(t){return t=String(t),"0000000".slice(t.length)+t}function xt(t,e){if(2147483648&e)if(F())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{let[r,n]=jt(t,e);t="-"+Lt(r,n)}else t=Lt(t,e);return t}function Nt(t){if(t.length<16)Et(Number(t));else if(F())t=BigInt(t),St=Number(t&BigInt(4294967295))>>>0,At=Number(t>>BigInt(32)&BigInt(4294967295));else{let e=+("-"===t[0]);At=St=0;let r=t.length;for(let n=e,i=(r-e)%6+e;i<=r;n=i,i+=6){let e=Number(t.slice(n,i));At*=1e6,(St=1e6*St+e)>=4294967296&&(At+=Math.trunc(St/4294967296),At>>>=0,St>>>=0)}if(e){let[t,e]=jt(St,At);St=t,At=e}}}function jt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Ot(t){return Array.prototype.slice.call(t)}var kt="function"==typeof BigInt?BigInt.asIntN:void 0,Vt="function"==typeof BigInt?BigInt.asUintN:void 0,Ft=Number.isSafeInteger,Mt=Number.isFinite,Ct=Math.trunc;function Dt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}var Gt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Rt(t){switch(typeof t){case"bigint":return!0;case"number":return Mt(t);case"string":return Gt.test(t);default:return!1}}function Wt(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Mt(t)?0|t:void 0}function Ht(t){var e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(Nt(t),xt(St,At))}function $t(t){if("-"===t[0])var e=!1;else e=(e=t.length)<20||20===e&&t<="18446744073709551615";return e?t:(Nt(t),Lt(St,At))}function zt(t){if(t=Ct(t),!Ft(t)){Et(t);var e=St,r=At;(t=2147483648&r)&&(r=~r>>>0,0==(e=1+~e>>>0)&&(r=r+1>>>0)),t="number"==typeof(e=Tt(e,r))?t?-e:e:t?"-"+e:e}return t}function Kt(t){return(t=Ct(t))>=0&&Ft(t)||(Et(t),t=Tt(St,At)),t}function Jt(t){var e=Ct(Number(t));return Ft(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),Ht(t))}function Xt(t){var e=Ct(Number(t));return Ft(e)?dt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),F()?dt(kt(64,BigInt(t))):dt(Ht(t)))}function Yt(t){return Ft(t)?t=dt(zt(t)):(t=Ct(t),Ft(t)?t=String(t):(Et(t),t=xt(St,At)),t=dt(t)),t}function Zt(t){var e=typeof t;return null==t?t:"bigint"===e?dt(kt(64,t)):Rt(t)?"string"===e?Xt(t):Yt(t):void 0}function qt(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(kt(64,t));if(Rt(t)){if("string"===e)return Jt(t);if("number"===e)return zt(t)}}function Qt(t){if(null==t||"string"==typeof t||t instanceof x)return t}function te(t){if("string"!=typeof t)throw Error();return t}function ee(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function re(t){return null==t||"string"==typeof t?t:void 0}function ne(t,e,r){if(null!=t&&t[K]===tt)return t;if(Array.isArray(t)){var n=0|t[Y];return(r=n|32&r|2&r)!==n&&Q(t,r),new e(t)}}function ie(t){return t}function oe(t){return W?t[W]:void 0}function ae(t,e){for(let r in t)!isNaN(r)&&e(t,+r,t[r])}var se,ue,le,ce=class{};function he(t,e){e<100||V(H,1)}function fe(t,e,r,n){var i=void 0!==n;n=!!n;var o,a=W;!i&&M&&a&&(o=t[a])&&ae(o,he),a=[];var s=t.length;o=4294967295;var u=!1,l=!!(64&e),c=l?128&e?0:-1:void 0;if(!(1&e)){var h=s&&t[s-1];null!=h&&"object"==typeof h&&h.constructor===Object?o=--s:h=void 0,!l||128&e||i||(u=!0,o=(se??ie)(o-c,c,t,h,void 0)+c)}e=void 0;for(var f=0;f<s;f++){let i=t[f];if(null!=i&&null!=(i=r(i,n)))if(l&&f>=o){let t=f-c;(e??={})[t]=i}else a[f]=i}if(h)for(let t in h){if(null==(s=h[t])||null==(s=r(s,n)))continue;let i;f=+t,l&&!Number.isNaN(f)&&(i=f+c)<o?a[i]=s:(e??={})[t]=s}return e&&(u?a.push(e):a[o]=e),i&&W&&(t=oe(t))&&t instanceof ce&&(a[W]=function(t){var e=new ce;return ae(t,(t,r,n)=>{e[r]=Ot(n)}),e.g=t.g,e}(t)),a}function de(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return gt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[Y];return 0===t.length&&1&e?void 0:fe(t,e,de)}if(null!=t&&t[K]===tt)return ge(t);if(t instanceof x){if(null==(e=t.g))t="";else if("string"==typeof e)t=e;else{if(S){for(var r="",n=0,i=e.length-10240;n<i;)r+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));r+=String.fromCharCode.apply(null,n?e.subarray(n):e),e=btoa(r)}else{void 0===r&&(r=0),b(),r=m[r],n=Array(Math.floor(e.length/3)),i=r[64]||"";let t=0,l=0;for(;t<e.length-2;t+=3){var o=e[t],a=e[t+1],s=e[t+2],u=r[o>>2];o=r[(3&o)<<4|a>>4],a=r[(15&a)<<2|s>>6],s=r[63&s],n[l++]=u+o+a+s}switch(u=0,s=i,e.length-t){case 2:s=r[(15&(u=e[t+1]))<<2]||i;case 1:e=e[t],n[l]=r[e>>2]+r[(3&e)<<4|u>>4]+s+i}e=n.join("")}t=t.g=e}return t}return}return t}function ge(t){return fe(t=t.l,0|t[Y],de)}function ve(t,e){return pe(t,e[0],e[1])}function pe(t,e,r,n=0){if(null==t){var i=32;r?(t=[r],i|=128):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[Y],f&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(f)throw Error("carr");V(z,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&Q(t,i|n),t;if(r&&(i|=128,r!==t[0]))throw Error("mid");t:{i|=64;var o=(r=t).length;if(o){var a=o-1;let t=r[a];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((a-=e=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var s in t)(o=+s)<a&&(r[o+e]=t[s],delete t[s]);i=-16760833&i|(1023&a)<<14;break t}}if(e){if((s=Math.max(e,o-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&s)<<14}}}return Q(t,64|i|n),t}function me(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var r=0|t[Y];return 0===t.length&&1&r?t=void 0:2&r||(!e||4096&r||16&r?t=we(t,r,!1,e&&!(16&r)):(q(t,34),4&r&&Object.freeze(t))),t}return null!=t&&t[K]===tt?et(t,r=0|(e=t.l)[Y])?t:Ie(t,e,r)?ye(t,e):we(e,r):t instanceof x?t:void 0}function ye(t,e,r){return t=new t.constructor(e),r&&(t.g=rt),t.m=rt,t}function we(t,e,r,n){return n??=!!(34&e),t=fe(t,e,me,n),n=32,r&&(n|=2),Q(t,e=16769217&e|n),t}function be(t){var e=t.l,r=0|e[Y];return et(t,r)?Ie(t,e,r)?ye(t,e,!0):new t.constructor(we(e,r,!1)):t}function _e(t){if(t.g!==rt)return!1;var e=t.l;return q(e=we(e,0|e[Y]),2048),t.l=e,t.g=void 0,t.m=void 0,!0}function Se(t){if(!_e(t)&&et(t,0|t.l[Y]))throw Error()}function Ae(t,e){void 0===e&&(e=0|t[Y]),32&e&&!(4096&e)&&Q(t,4096|e)}function Ie(t,e,r){return!!(2&r)||!(!(32&r)||4096&r)&&(Q(e,2|r),t.g=rt,!0)}var Ee=dt(0);function Te(t,e,r,n){if(null!==(t=Be(t.l,e,r,n)))return t}function Be(t,e,r,n){if(-1===e)return null;var i=e+(r?0:-1),o=t.length-1;if(!(o<1+(r?0:-1))){if(i>=o){var a=t[o];if(null!=a&&"object"==typeof a&&a.constructor===Object){r=a[e];var s=!0}else{if(i!==o)return;r=a}}else r=t[i];if(n&&null!=r){if(null==(n=n(r)))return n;if(!Object.is(n,r))return s?a[e]=n:t[i]=n,n}return r}}function Ue(t,e,r,n){Se(t);var i=t.l;return Le(i,0|i[Y],e,r,n),t}function Le(t,e,r,n,i){var o=r+(i?0:-1),a=t.length-1;if(a>=1+(i?0:-1)&&o>=a){let i=t[a];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[r]=n,e}return o<=a?(t[o]=n,e):(void 0!==n&&(r>=(a=(e??=0|t[Y])>>14&1023||536870912)?null!=n&&(t[a+(i?0:-1)]={[r]:n}):t[o]=n),e)}function Pe(t,e,r,n,i,o,a,s){var u=e;return 1===o||4===o&&(2&e||!(16&e)&&32&n)?je(e)||((e|=!t.length||a&&!(4096&e)||32&n&&!(4096&e||16&e)?2:256)!==u&&Q(t,e),Object.freeze(t)):(2===o&&je(e)&&(t=Ot(t),u=0,e=Je(e,n),n=Le(r,n,i,t)),je(e)||(s||(e|=16),e!==u&&Q(t,e))),2&e||!(4096&e||16&e)||Ae(r,n),t}function xe(t,e,r){return t=Be(t,e,r),Array.isArray(t)?t:D}function Ne(t,e){return 2&e&&(t|=2),1|t}function je(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function Oe(t){return nt(t,!0)}function ke(t,e,r){Se(t);var n=0|(t=t.l)[Y];if(null==r)Le(t,n,e);else{var i=r===D?7:0|r[Y],o=i,a=je(i),s=a||Object.isFrozen(r);for(a||(i=0),s||(r=Ot(r),o=0,i=Je(i,n),s=!1),i|=5,i|=(4&i?512&i?512:1024&i?1024:0:void 0)??1024,a=0;a<r.length;a++){let t=r[a],e=te(t);Object.is(t,e)||(s&&(r=Ot(r),o=0,i=Je(i,n),s=!1),r[a]=e)}i!==o&&(s&&(r=Ot(r),i=Je(i,n)),Q(r,i)),Le(t,n,e,r)}}function Ve(t,e,r){if(2&e)throw Error();var n=st(e),i=xe(t,r,n),o=i===D?7:0|i[Y],a=Ne(o,e);return(2&a||je(a)||16&a)&&(a===o||je(a)||Q(i,a),i=Ot(i),o=0,a=Je(a,e),Le(t,e,r,i,n)),(a&=-13)!==o&&Q(i,a),i}function Fe(t){if(M)return t[R]??(t[R]=new Map);if(R in t)return t[R];var e=new Map;return Object.defineProperty(t,R,{value:e}),e}function Me(t,e,r,n,i){var o=Fe(t),a=Ce(o,t,e,r,i);return a!==n&&(a&&(e=Le(t,e,a,void 0,i)),o.set(r,n)),e}function Ce(t,e,r,n,i){var o=t.get(n);if(null!=o)return o;o=0;for(let t=0;t<n.length;t++){let a=n[t];null!=Be(e,a,i)&&(0!==o&&(r=Le(e,r,o,void 0,i)),o=a)}return t.set(n,o),o}function De(t,e,r){var n=0|t[Y],i=st(n),o=Be(t,r,i);if(null!=o&&o[K]===tt){if(!et(o))return _e(o),o.l;var a=o.l}else Array.isArray(o)&&(a=o);if(a){let t=0|a[Y];2&t&&(a=we(a,t))}return(a=ve(a,e))!==o&&Le(t,n,r,a,i),a}function Ge(t,e,r,n){var i=!1;if(null!=(n=Be(t,n,void 0,t=>{var n=ne(t,r,e);return i=n!==t&&null!=n,n})))return i&&!et(n)&&Ae(t,e),n}function Re(t,e,r){var n=t.l,i=0|n[Y];if(null==(e=Ge(n,i,e,r)))return e;if(!et(t,i=0|n[Y])){let o=be(e);o!==e&&(_e(t)&&(i=0|(n=t.l)[Y]),Ae(n,i=Le(n,i,r,e=o)))}return e}function We(t,e,r,n,i,o,a,s){var u=et(t,r);o=u?1:o,a=!!a||3===o,u=s&&!u,(2===o||u)&&_e(t)&&(r=0|(e=t.l)[Y]);var l=(t=xe(e,i))===D?7:0|t[Y],c=Ne(l,r);if(s=!(4&c)){var h=t,f=r;let e=!!(2&c);e&&(f|=2);let i=!e,o=!0,a=0,s=0;for(;a<h.length;a++){let t=ne(h[a],n,f);if(t instanceof n){if(!e){let e=et(t);i&&=!e,o&&=e}h[s++]=t}}s<a&&(h.length=s),c|=4,c=o?-4097&c:4096|c,c=i?8|c:-9&c}if(c!==l&&(Q(t,c),2&c&&Object.freeze(t)),u&&!(8&c||!t.length&&(1===o||4===o&&(2&c||!(16&c)&&32&r)))){for(je(c)&&(t=Ot(t),c=Je(c,r),r=Le(e,r,i,t)),n=t,u=c,l=0;l<n.length;l++)(h=n[l])!==(c=be(h))&&(n[l]=c);u|=8,Q(t,c=u=n.length?4096|u:-4097&u)}return Pe(t,c,e,r,i,o,s,a)}function He(t,e){var r=t.l;return We(t,r,0|r[Y],e,1,void 0===it?2:4,!1,!0)}function $e(t){return null==t&&(t=void 0),t}function ze(t,e,r,n,i){return Ue(t,r,n=$e(n),i),n&&!et(n)&&Ae(t.l),t}function Ke(t,e,r,n){t:{var i=n=$e(n);Se(t);let o=t.l,a=0|o[Y];if(null==i){let t=Fe(o);if(Ce(t,o,a,r)!==e)break t;t.set(r,0)}else a=Me(o,a,r,e);Le(o,a,e,i)}return n&&!et(n)&&Ae(t.l),t}function Je(t,e){return-273&(t=2&e?2|t:-3&t)}function Xe(t,e,r,n){Se(t);var i=t.l;t=We(t,i,0|i[Y],r,e,2,!0),n=null!=n?n:new r,t.push(n),e=r=t===D?7:0|t[Y],(n=et(n))?(r&=-9,1===t.length&&(r&=-4097)):r|=4096,r!==e&&Q(t,r),n||Ae(i)}function Ye(t,e,r){if(null!=r)t:{if(!Rt(r))throw k("int64");switch(typeof r){case"string":r=Xt(r);break t;case"bigint":r=dt(kt(64,r));break t;default:r=Yt(r)}}return Ue(t,e,r)}function Ze(t,e,r){return Ue(t,e,null==r?r:function(t){if(!Rt(t))throw k("uint64");switch(typeof t){case"string":var e=Ct(Number(t));return Ft(e)&&e>=0?t=dt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=F()?dt(Vt(64,BigInt(t))):dt($t(t))),t;case"bigint":return dt(Vt(64,t));default:return Ft(t)?t=dt(Kt(t)):((t=Ct(t))>=0&&Ft(t)?t=String(t):(Et(t),t=Lt(St,At)),t=dt(t)),t}}(r))}function qe(t,e,r){if(null!=r){if(!Mt(r))throw k("enum");r|=0}return Ue(t,e,r)}function Qe(t,e,r){Se(t);var n=t.l,i=0|n[Y],o=et(t,i)?1:2;2===o&&_e(t)&&(i=0|(n=t.l)[Y]);var a=(t=xe(n,e))===D?7:0|t[Y],s=Ne(a,i),u=!(4&s);if(u){4&s&&(t=Ot(t),a=0,s=Je(s,i),i=Le(n,i,e,t));let r=0,o=0;for(;r<t.length;r++){let e=re(t[r]);null!=e&&(t[o++]=e)}o<r&&(t.length=o),s=-513&s|4,s&=-1025,s&=-4097}s!==a&&(Q(t,s),2&s&&Object.freeze(t)),(t=Pe(t,s,n,i,e,o,u,!0)).push(te(r))}var tr=class{constructor(t,e,r){if(this.buffer=t,r&&!e)throw Error();this.g=e}};function er(t,e){if("string"==typeof t)return new tr(T(t),e);if(Array.isArray(t))return new tr(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new tr(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new tr(t,!1);if(t.constructor===x)return e=L(t)||new Uint8Array(0),new tr(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new tr(t,!1);throw Error()}function rr(t,e){var r=0,n=0,i=0,o=t.i,a=t.g;do{var s=o[a++];r|=(127&s)<<i,i+=7}while(i<32&&128&s);if(i>32)for(n|=(127&s)>>4,i=3;i<32&&128&s;i+=7)n|=(127&(s=o[a++]))<<i;if(ur(t,a),!(128&s))return e(r>>>0,n>>>0);throw Error()}function nr(t){for(var e=0,r=t.g,n=r+10,i=t.i;r<n;){let n=i[r++];if(e|=n,!(128&n))return ur(t,r),!!(127&e)}throw Error()}function ir(t){var e=t.i,r=t.g,n=e[r++],i=127&n;if(128&n&&(i|=(127&(n=e[r++]))<<7,128&n&&(i|=(127&(n=e[r++]))<<14,128&n&&(i|=(127&(n=e[r++]))<<21,128&n&&(i|=(n=e[r++])<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw Error();return ur(t,r),i}function or(t){return rr(t,Ut)}function ar(t){var e=t.i,r=t.g,n=e[r],i=e[r+1],o=e[r+2];return e=e[r+3],ur(t,t.g+4),(n|i<<8|o<<16|e<<24)>>>0}function sr(t){return ir(t)}function ur(t,e){if(t.g=e,e>t.j)throw Error()}function lr(t,e){if(e<0)throw Error();var r=t.g;if((e=r+e)>t.j)throw Error();return t.g=e,r}function cr(t,e){if(0==e)return U();var r=lr(t,e);return t.K&&t.o?r=t.i.subarray(r,r+e):(t=t.i,r=r===(e=r+e)?new Uint8Array(0):_t?t.slice(r,e):new Uint8Array(t.subarray(r,e))),0==r.length?U():new x(r,B)}var hr=class{constructor(t,e,r,n){this.i=null,this.o=!1,this.g=this.j=this.m=0,this.init(t,e,r,n)}init(t,e,r,{K:n=!1,N:i=!1}={}){this.K=n,this.N=i,t&&(t=er(t,this.N),this.i=t.buffer,this.o=t.g,this.m=e||0,this.j=void 0!==r?this.m+r:this.i.length,this.g=this.m)}clear(){this.i=null,this.o=!1,this.g=this.j=this.m=0,this.K=!1}},fr=[],dr=0;function gr(t,e,r,n){if(Ir.length){let i=Ir.pop();return i.u(n),i.g.init(t,e,r,n),i}return new Ar(t,e,r,n)}function vr(t){t.g.clear(),t.j=-1,t.i=-1,Ir.length<100&&Ir.push(t)}function pr(t){var e=t.g;if(e.g==e.j)return!1;t.m=t.g.g;var r=ir(t.g)>>>0;if(e=r>>>3,!((r&=7)>=0&&r<=5))throw Error();if(e<1)throw Error();return t.j=e,t.i=r,!0}function mr(t){try{switch(t.i){case 0:0!=t.i?mr(t):nr(t.g);break;case 1:var e=t.g;ur(e,e.g+8);break;case 2:if(2!=t.i)mr(t);else{var r=ir(t.g)>>>0,n=t.g;ur(n,n.g+r)}break;case 5:var i=t.g;ur(i,i.g+4);break;case 3:yr();let o=t.j;try{for(;;){if(!pr(t))throw Error();if(4==t.i){if(t.j!=o)throw Error();break}mr(t)}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{dr>0&&dr--}break;default:throw Error()}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}}function yr(){if(dr>=100)throw new SyntaxError;dr++}function wr(t,e,r){var n=t.g.j,i=ir(t.g)>>>0,o=(i=t.g.g+i)-n;if(o<=0&&(t.g.j=i,r(e,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error();t.g.g=i,t.g.j=n}function br(t){var e=ir(t.g)>>>0,r=lr(t=t.g,e);if(t=t.i,u){var a,l=t;(a=o)||(a=o=new TextDecoder("utf-8",{fatal:!0})),e=r+e,l=0===r&&e===l.length?l:l.subarray(r,e);try{var c=a.decode(l)}catch(t){if(void 0===s){try{a.decode(new Uint8Array([128]))}catch(t){}try{a.decode(new Uint8Array([97])),s=!0}catch(t){s=!1}}throw!s&&(o=void 0),t}}else{e=(c=r)+e,r=[];let o,s=null;for(;c<e;){var h=t[c++];h<128?r.push(h):h<224?c>=e?n():(o=t[c++],h<194||128!=(192&o)?(c--,n()):r.push((31&h)<<6|63&o)):h<240?c>=e-1?n():(o=t[c++],128!=(192&o)||224===h&&o<160||237===h&&o>=160||128!=(192&(a=t[c++]))?(c--,n()):r.push((15&h)<<12|(63&o)<<6|63&a)):h<=244?c>=e-2?n():(o=t[c++],128!=(192&o)||o-144+(h<<28)>>30||128!=(192&(a=t[c++]))||128!=(192&(l=t[c++]))?(c--,n()):(h=(7&h)<<18|(63&o)<<12|(63&a)<<6|63&l,h-=65536,r.push(55296+(h>>10&1023),56320+(1023&h)))):n(),r.length>=8192&&(s=i(s,r),r.length=0)}c=i(s,r)}return c}function _r(t){var e=ir(t.g)>>>0;return cr(t.g,e)}function Sr(t,e,r){var n=ir(t.g)>>>0;for(n=t.g.g+n;t.g.g<n;)r.push(e(t.g))}var Ar=class{constructor(t,e,r,n){if(fr.length){let i=fr.pop();i.init(t,e,r,n),t=i}else t=new hr(t,e,r,n);this.g=t,this.m=this.g.g,this.i=this.j=-1,this.u(n)}u({P:t=!1}={}){this.P=t}},Ir=[];function Er(t){return new Ur(4294967295&t,Math.floor(t/4294967296))}function Tr(t){return t?/^\d+$/.test(t)?(Nt(t),new Ur(St,At)):null:Br||=new Ur(0,0)}var Br,Ur=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};function Lr(t){return new Cr(4294967295&t,Math.floor(t/4294967296))}function Pr(t){return t?/^-?\d+$/.test(t)?(Nt(t),new Cr(St,At)):null:xr||=new Cr(0,0)}var xr,Nr,jr,Or,kr,Vr,Fr,Mr,Cr=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};function Dr(t,e,r){return"undefined"!=typeof BigInt64Array?(Fr||(Fr=new BigInt64Array(1),Mr=new Uint32Array(Fr.buffer),Fr[0]=BigInt(1),Vr=1===Mr[0]),Fr[0]=t,new e(Mr[t=Vr?0:1],Mr[1-t])):(kr||(Nr=BigInt(Number.MIN_SAFE_INTEGER),jr=BigInt(Number.MAX_SAFE_INTEGER),Or=BigInt(4294967295),kr=BigInt(32)),t>=Nr&&t<=jr?r(Number(t)):(t=BigInt.asUintN(64,t),new e(Number(t&Or),Number(t>>kr))))}function Gr(t,e,r){for(;r>0||e>127;)t.g.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.g.push(e)}function Rr(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Wr(t,e){if(e>=0)Rr(t,e);else{for(let r=0;r<9;r++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Hr(t,e){Nt(e),function(t){var e=At>>31;t(St<<1^e,(At<<1|St>>>31)^e)}((e,r)=>{Gr(t,e>>>0,r>>>0)})}function $r(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}var zr=class{constructor(){this.g=[]}length(){return this.g.length}end(){var t=this.g;return this.g=[],t}};function Kr(t,e){0!==e.length&&(t.j.push(e),t.i+=e.length)}function Jr(t,e,r){Rr(t.g,8*e+r)}function Xr(t,e){return Jr(t,e,2),e=t.g.end(),Kr(t,e),e.push(t.i),e}function Yr(t,e){var r=e.pop();for(r=t.i+t.g.length()-r;r>127;)e.push(127&r|128),r>>>=7,t.i++;e.push(r),t.i++}function Zr(t,e,r){if(null!=r)switch(Jr(t,e,0),typeof r){case"number":t=t.g,Et(r),Gr(t,St,At);break;case"bigint":r=Dr(r,Cr,Lr),Gr(t.g,r.i,r.g);break;default:r=Pr(r),Gr(t.g,r.i,r.g)}}function qr(t,e,r){Jr(t,e,2),Rr(t.g,r.length),Kr(t,t.g.end()),Kr(t,r)}var Qr=class{constructor(){this.j=[],this.i=0,this.g=new zr}};function tn(t){if("string"==typeof t)Pr(t)}function en(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var rn=en(),nn=en(),on=en(),an=en(),sn=en(),un=en(),ln=en(),cn=en(),hn=en(),fn=en(),dn=en(),gn=en();var vn=class{constructor(t,e){this.l=pe(t,e,void 0,2048)}toJSON(){return ge(this)}};vn.prototype[K]=tt,vn.prototype.toString=function(){return this.l.toString()};var pn=class{constructor(t,e,r){this.g=t,this.i=e,t=rn,this.j=!!t&&r===t||!1}};function mn(t,e){return new pn(t,e,rn)}function yn(t,e,r,n,i){null!=(e=Pn(e,n))&&(r=Xr(t,r),i(e,t),Yr(t,r))}var wn,bn,_n=mn(function(t,e,r,n,i){return 2===t.i&&(wr(t,De(e,n,r),i),!0)},yn),Sn=mn(function(t,e,r,n,i){return 2===t.i&&(wr(t,De(e,n,r),i),!0)},yn),An=Symbol(),In=Symbol(),En=Symbol(),Tn=Symbol(),Bn=Symbol();function Un(t,e,r,n){var i=n[t];if(i)return i;(i={}).V=n,i.I=function(t){switch(typeof t){case"boolean":return ue||=[0,void 0,!0];case"number":return t>0?void 0:0===t?le||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var o=n[1],a=1;o&&o.constructor===Object&&(i.L=o,"function"==typeof(o=n[++a])&&(i.R=!0,wn??=o,bn??=n[a+1],o=n[a+=2]));for(var s={};o&&Array.isArray(o)&&o.length&&"number"==typeof o[0]&&o[0]>0;){for(var u=0;u<o.length;u++)s[o[u]]=o;o=n[++a]}for(u=1;void 0!==o;){let t;"number"==typeof o&&(u+=o,o=n[++a]);var l=void 0;if(o instanceof pn?t=o:(t=_n,a--),t?.j){o=n[++a],l=n;var c=a;"function"==typeof o&&(o=o(),l[c]=o),l=o}for(c=u+1,"number"==typeof(o=n[++a])&&o<0&&(c-=o,o=n[++a]);u<c;u++){let n=s[u];l?r(i,u,t,l,n):e(i,u,t,n)}}return n[t]=i}function Ln(t){return Array.isArray(t)?t[0]instanceof pn?t:[Sn,t]:[t,void 0]}function Pn(t,e){return t instanceof vn?t.l:Array.isArray(t)?ve(t,e):void 0}function xn(t,e,r,n){var i=r.g;t[e]=n?(t,e,r)=>i(t,e,r,n):i}function Nn(t,e,r,n,i){var o,a,s=r.g;t[e]=(t,e,r)=>s(t,e,r,a||=Un(In,xn,Nn,n).I,o||=jn(n),i)}function jn(t){var e=t[En];if(null!=e)return e;var r=Un(In,xn,Nn,t);return e=r.R?(t,e)=>wn(t,e,r):(t,e)=>{t:{yr();try{for(;pr(e)&&4!=e.i;){let u=e.j,l=r[u];if(null==l){let t=r.L;if(t){let e=t[u];if(e){let t=kn(e);null!=t&&(l=r[u]=t)}}}if(null==l||!l(e,t,u)){var n=e;let r=n.m;if(mr(n),n.P)var i=void 0;else{let t=n.g.g-r;n.g.g=r,i=cr(n.g,t)}n=void 0;var o=t,a=u,s=i;s&&((n=o[W]??(o[W]=new ce))[a]??(n[a]=[])).push(s)}}let l=oe(t);l&&(l.g=r.V[Bn]);var u=!0;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{dr>0&&dr--}u=void 0}return u},t[En]=e,t[Bn]=On.bind(t),e}function On(t,e,r,n){var i=this[In],o=this[En],a=ve(void 0,i.I),s=oe(t);if(s){var u=!1,l=i.L;if(l){if(i=(e,r,i)=>{if(0!==i.length)if(l[r])for(let t of i){e=gr(t);try{u=!0,o(a,e)}finally{vr(e)}}else n?.(t,r,i)},null==e)ae(s,i);else if(null!=s){let t=s[e];t&&i(s,e,t)}if(u){let n=0|t[Y];if(2&n&&2048&n&&!r?.ka)throw Error();let i=st(n),o=(e,o)=>{if(null!=Be(t,e,i)){if(1===r?.ja)return;throw Error()}null!=o&&(n=Le(t,n,e,o,i)),delete s[e]};null==e?ot(a,0|a[Y],(t,e)=>{o(t,e)}):o(e,Be(a,e,i))}}}}function kn(t){var e=(t=Ln(t))[0].g;if(t=t[1]){let r=jn(t),n=Un(In,xn,Nn,t).I;return(t,i,o)=>e(t,i,o,n,r)}return e}function Vn(t,e,r){t[e]=r.i}function Fn(t,e,r,n){var i,o,a=r.i;t[e]=(t,e,r)=>a(t,e,r,o||=Un(An,Vn,Fn,n).I,i||=Mn(n))}function Mn(t){var e=t[Tn];if(!e){let r=Un(An,Vn,Fn,t);e=(t,e)=>Cn(t,e,r),t[Tn]=e}return e}function Cn(t,e,r){ot(t,0|t[Y],(t,n)=>{if(null!=n){var i=function(t,e){var r=t[e];if(r)return r;if((r=t.L)&&(r=r[e])){var n=(r=Ln(r))[0].i;if(r=r[1]){let e=Mn(r),i=Un(An,Vn,Fn,r).I;r=t.R?bn(i,e):(t,r,o)=>n(t,r,o,i,e)}else r=n;return t[e]=r}}(r,t);i?i(e,n,t):t<500||V($,3)}}),(t=oe(t))&&ae(t,(t,r,n)=>{for(Kr(e,e.g.end()),t=0;t<n.length;t++)Kr(e,L(n[t])||new Uint8Array(0))})}var Dn=dt(0);function Gn(t,e,r){if(Array.isArray(e)){var n=0|e[Y];if(4&n)return e;for(var i=0,o=0;i<e.length;i++){let r=t(e[i]);null!=r&&(e[o++]=r)}return o<i&&(e.length=o),t=1|n,r&&(t=-1537&t|4),t!==n&&Q(e,t),r&&2&t&&Object.freeze(e),e}}var Rn=(t,e)=>{var r=new Qr;Cn(t.l,r,Un(An,Vn,Fn,e)),Kr(r,r.g.end()),t=new Uint8Array(r.i);var n=(e=r.j).length,i=0;for(let r=0;r<n;r++){let n=e[r];t.set(n,i),i+=n.length}return r.j=[t],t};function Wn(t,e,r){return new pn(t,e,r)}function Hn(t,e,r){return new pn(t,e,r)}function $n(t,e,r){Le(t,0|t[Y],e,r,st(0|t[Y]))}function zn(t,e,r){null!=(e=qt(e))&&(tn(e),Zr(t,r,e))}function Kn(t,e,r){null!=(e=Wt(e))&&null!=e&&(Jr(t,r,0),Wr(t.g,e))}function Jn(t,e,r){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Jr(t,r,0),t.g.g.push(e?1:0))}function Xn(t,e,r){null!=(e=re(e))&&qr(t,r,c(e))}function Yn(t,e,r,n,i){null!=(e=Pn(e,n))&&(r=Xr(t,r),i(e,t),Yr(t,r))}function Zn(t,e,r){null!=(e=Qt(e))&&qr(t,r,er(e,!0).buffer)}function qn(t,e,r){e=function(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Mt(t)?t>>>0:void 0}(e),null!=e&&null!=e&&(Jr(t,r,0),Rr(t.g,e))}function Qn(t,e,r){null!=(e=Wt(e))&&(e=parseInt(e,10),Jr(t,r,0),Wr(t.g,e))}function ti(t,e,r){return 0===t.i&&($n(e,r,or(t.g)),!0)}function ei(t,e,r){return(0===t.i||2===t.i)&&(e=Ve(e,0|e[Y],r),2==t.i?Sr(t,ir,e):e.push(ir(t.g)),!0)}function ri(t,e,r){return 2===t.i&&($n(e,r,(t=_r(t))===U()?void 0:t),!0)}var ni=Wn(function(t,e,r){if(1!==t.i)return!1;var n=t.g;t=ar(n);var i=ar(n);n=2*(i>>31)+1;var o=i>>>20&2047;return t=4294967296*(1048575&i)+t,$n(e,r,2047==o?t?NaN:n*(1/0):0==o?5e-324*n*t:n*Math.pow(2,o-1075)*(t+4503599627370496)),!0},function(t,e,r){null!=(e=Dt(e))&&(Jr(t,r,1),t=t.g,(r=bt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),St=r.getUint32(0,!0),At=r.getUint32(4,!0),$r(t,St),$r(t,At))},fn),ii=Wn(function(t,e,r){if(5!==t.i)return!1;var n=ar(t.g);t=2*(n>>31)+1;var i=n>>>23&255;return n&=8388607,$n(e,r,255==i?n?NaN:t*(1/0):0==i?1401298464324817e-60*t*n:t*Math.pow(2,i-150)*(n+8388608)),!0},function(t,e,r){null!=(e=Dt(e))&&(Jr(t,r,5),t=t.g,(r=bt||=new DataView(new ArrayBuffer(8))).setFloat32(0,+e,!0),At=0,$r(t,St=r.getUint32(0,!0)))},hn),oi=Wn(function(t,e,r){return ti(t,e,r)},zn,un),ai=Wn(function(t,e,r){return ti(t,e,r)},zn,un),si=Hn(function(t,e,r){return 0!==t.i&&2!==t.i?t=!1:(e=Ve(e,0|e[Y],r),2==t.i?Sr(t,or,e):e.push(or(t.g)),t=!0),t},function(t,e,r){if(null!=(e=Gn(qt,e,!1)))for(let n=0;n<e.length;n++)Zr(t,r,e[n])},un),ui=Wn(function(t,e,r){return 0!==t.i?e=!1:($n(e,r,(t=or(t.g))===Dn?void 0:t),e=!0),e},zn,un),li=Wn(function(t,e,r){return 0!==t.i?t=!1:($n(e,r,rr(t.g,Bt)),t=!0),t},function(t,e,r){if(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Vt(64,t));if(Rt(t)){if("string"===e)return e=Ct(Number(t)),Ft(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=$t(t)),t;if("number"===e)return Kt(t)}}(e),null!=e){if("string"==typeof e)Tr(e);if(null!=e)switch(Jr(t,r,0),typeof e){case"number":t=t.g,Et(e),Gr(t,St,At);break;case"bigint":r=Dr(e,Ur,Er),Gr(t.g,r.i,r.g);break;default:r=Tr(e),Gr(t.g,r.i,r.g)}}},ln),ci=Wn(function(t,e,r){return 0===t.i&&($n(e,r,ir(t.g)),!0)},Kn,an),hi=Hn(ei,function(t,e,r){if(null!=(e=Gn(Wt,e,!0)))for(let a=0;a<e.length;a++){var n=t,i=r,o=e[a];null!=o&&(Jr(n,i,0),Wr(n.g,o))}},an),fi=Hn(ei,function(t,e,r){if(null!=(e=Gn(Wt,e,!0))&&e.length){r=Xr(t,r);for(let r=0;r<e.length;r++)Wr(t.g,e[r]);Yr(t,r)}},an),di=Wn(function(t,e,r){return 0===t.i&&($n(e,r,0===(t=ir(t.g))?void 0:t),!0)},Kn,an),gi=Wn(function(t,e,r){return 0===t.i&&($n(e,r,nr(t.g)),!0)},Jn,nn),vi=Wn(function(t,e,r){return 0===t.i&&($n(e,r,!1===(t=nr(t.g))?void 0:t),!0)},Jn,nn),pi=Hn(function(t,e,r){return 2===t.i&&(t=br(t),Ve(e,0|e[Y],r).push(t),!0)},function(t,e,r){if(null!=(e=Gn(re,e,!0)))for(let a=0;a<e.length;a++){var n=t,i=r,o=e[a];null!=o&&qr(n,i,c(o))}},on),mi=Wn(function(t,e,r){return 2===t.i&&($n(e,r,""===(t=br(t))?void 0:t),!0)},Xn,on),yi=Wn(function(t,e,r){return 2===t.i&&($n(e,r,br(t)),!0)},Xn,on),wi=function(t,e,r=rn){return new pn(t,e,r)}(function(t,e,r,n,i){return 2===t.i&&(n=ve(void 0,n),Ve(e,0|e[Y],r).push(n),wr(t,n,i),!0)},function(t,e,r,n,i){if(Array.isArray(e)){for(let o=0;o<e.length;o++)Yn(t,e[o],r,n,i);1&(t=0|e[Y])||Q(e,1|t)}}),bi=mn(function(t,e,r,n,i,o){if(2!==t.i)return!1;var a=0|e[Y];return Me(e,a,o,r,st(a)),wr(t,e=De(e,n,r),i),!0},Yn),_i=Wn(function(t,e,r){return 2===t.i&&($n(e,r,_r(t)),!0)},Zn,dn),Si=Hn(function(t,e,r){return 2===t.i&&(t=_r(t),Ve(e,0|e[Y],r).push(t),!0)},function(t,e,r){if(null!=(e=Gn(Qt,e,!1)))for(let a=0;a<e.length;a++){var n=t,i=r,o=e[a];null!=o&&qr(n,i,er(o,!0).buffer)}},dn),Ai=Wn(function(t,e,r){return 0===t.i&&($n(e,r,ir(t.g)>>>0),!0)},qn,sn),Ii=Wn(function(t,e,r){return 0===t.i&&($n(e,r,0===(t=ir(t.g)>>>0)?void 0:t),!0)},qn,sn),Ei=Wn(function(t,e,r){return 0===t.i&&($n(e,r,ir(t.g)),!0)},Qn,gn),Ti=Wn(function(t,e,r){return 0===t.i&&($n(e,r,0===(t=ir(t.g))?void 0:t),!0)},Qn,gn),Bi=Wn(function(t,e,r){return 0!==t.i?t=!1:($n(e,r,function(t){return rr(t,(t,e)=>{var r=-(1&t);return Ut(t=(t>>>1|e<<31)^r,e>>>1^r)})}(t.g)),t=!0),t},function(t,e,r){if(null!=(e=qt(e))&&(tn(e),null!=e))switch(Jr(t,r,0),typeof e){case"number":t=t.g,e=(r=e)<0,It(r=2*Math.abs(r)),r=St;let n=At;e&&(0==r?0==n?n=r=4294967295:(n--,r=4294967295):r--),Gr(t,St=r,At=n);break;case"bigint":t=t.g,e=e<<BigInt(1)^e>>BigInt(63),St=Number(BigInt.asUintN(32,e)),At=Number(BigInt.asUintN(32,e>>BigInt(32))),Gr(t,St,At);break;default:Hr(t.g,e)}},cn);function Ui(t){return function(){return Rn(this,t)}}var Li,Pi=[0,_i,Si,gi,yi],xi=[0,mi,[0,Ti,[0,ui,di],Ti,-1,[0,Ei],Ti,-1],Wn(ri,Zn,dn)],Ni=[0,mi,Wn(ri,function(t,e,r){if(null!=e){if(e instanceof vn){let n=e.ma;return void(n?(e=n(e),null!=e&&qr(t,r,er(e,!0).buffer)):V($,3))}if(Array.isArray(e))return void V($,3)}Zn(t,e,r)},dn)],ji=[0,1,[0,12,ci,10,gi],[0,7,[0,ci,-1]]],Oi=globalThis.trustedTypes;var ki=class{constructor(t){this.g=t}toString(){return this.g+""}};function Vi(t){var e;return void 0===Li&&(Li=function(){var t=null;if(!Oi)return t;try{let e=t=>t;t=Oi.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}()),t=(e=Li)?e.createScriptURL(t):t,new ki(t)}function Fi(t,...e){if(0===e.length)return Vi(t[0]);var r=t[0];for(let n=0;n<e.length;n++)r+=encodeURIComponent(e[n])+t[n+1];return Vi(r)}var Mi=[0,ci,Ei,gi,-1,fi,Ei,-1,gi,-1],Ci=[0,Ei,-1,gi],Di=class extends vn{constructor(t){super(t)}},Gi=[0,gi,yi,gi,Ei,-1,Hn(function(t,e,r){return(0===t.i||2===t.i)&&(e=Ve(e,0|e[Y],r),2==t.i?Sr(t,sr,e):e.push(ir(t.g)),!0)},function(t,e,r){if(null!=(e=Gn(Wt,e,!0))&&e.length){r=Xr(t,r);for(let r=0;r<e.length;r++)Wr(t.g,e[r]);Yr(t,r)}},gn),yi,-1,[0,gi,-1],Ei,gi,-1,Ci],Ri=[0,3,gi,-1,2,[0,[2],ci,bi,[0,Ai]],[0,Ei,gi,Ei,gi,Ei,4,[0,gi,yi,-1,gi]],[0,[3,4],yi,-1,bi,[0,ci],bi,[0,Ei,-1]],[0]],Wi=[0,yi,-2],Hi=class extends vn{constructor(t){super(t)}},$i=[0],zi=[0,ci,gi,1,gi,-4],Ki=class extends vn{constructor(t){super(t,2)}},Ji={};Ji[336783863]=[0,yi,gi,-1,ci,[0,[1,2,3,4,5,6,7,8,9],bi,$i,bi,Gi,bi,Wi,bi,zi,bi,Mi,bi,[0,yi,-2],bi,[0,yi,Ei],bi,Ri,bi,Ci],[0,yi],gi,[0,[1,3],[2,4],bi,[0,fi],-1,bi,[0,pi],-1,wi,[0,yi,-1]],yi];var Xi=[0,ui,-1,vi,-3,ui,fi,mi,di,ui,-1,vi,di,vi,-2,mi],Yi=class extends vn{constructor(t){super(t,500)}u(t){return ze(this,0,7,t)}},Zi=[-1,{}],qi=[0,yi,1,Zi],Qi=[0,yi,pi,Zi],to=class extends vn{constructor(t){super(t,500)}u(t){return ze(this,0,1001,t)}};to.prototype.i=Ui([-500,wi,[-500,mi,-1,pi,-3,[-2,Ji,gi],wi,Ni,di,-1,qi,Qi,wi,[0,mi,vi],mi,Xi,di,pi,987,pi],4,wi,[-500,yi,-1,[-1,{}],998,yi],wi,[-500,yi,pi,-1,[-2,{},gi],997,pi,-1],di,wi,[-500,yi,pi,Zi,998,pi],pi,di,qi,Qi,wi,[0,mi,-1,Zi],pi,-2,Xi,mi,-1,vi,[0,vi,Ii],978,Zi,wi,Ni]);var eo,ro=class extends vn{constructor(t){super(t)}},no=class extends vn{constructor(t){super(t)}i(){return He(this,ro)}},io=[0,wi,[0,ci,ii,yi,-1]],oo=class extends vn{constructor(t){super(t)}},ao=class extends vn{constructor(t){super(t)}i(){var t=this.l,e=0|t[Y],r=so,n=this.l;return r=2===Ce(Fe(n),n,void 0,r)?2:-1,void 0!==Ge(t,e,Di,r)}},so=[1,2,3,4,5,6],uo=class extends vn{constructor(t){super(t)}i(){return null!=Te(this,1,void 0,Oe)}j(){return null!=re(Te(this,2))}},lo=class extends vn{constructor(t){super(t)}},co=class extends vn{constructor(t){super(t)}};eo=new class{constructor(){var t=Ki;this.g=co,this.j=ze,this.defaultValue=void 0,this.i=null!=t.ha?at:void 0}register(){p(this)}},Ji[451755788]=[0,[0,[0,_i,yi,[0,ci,ai,-1],[0,li,ai]],gi,[0,so,bi,zi,bi,Gi,bi,Mi,bi,$i,bi,Wi,bi,Ri],Ei],[0,yi,ci,ii,pi,-1],ni];var ho,fo,go=class extends vn{constructor(t){super(t)}},vo=(ho=class extends vn{constructor(t){super(t)}},fo=[0,wi,[0,1,ci,yi,io],ai],(t,e)=>{t:{let n={N:!0};e&&Object.assign(n,e),t=gr(t,void 0,void 0,n);try{let e=new ho,n=e.l;jn(fo)(n,t);var r=e;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{vr(t)}r=void 0}return r});function po(t){return qe(new mo,1,t)}var mo=class extends vn{constructor(t){super(t)}},yo=class extends vn{constructor(t){super(t)}},wo=[0,Ei,2,li,-2,ai,wi,[0,Ei,ai]],bo=class extends vn{constructor(t){super(t)}},_o=class extends vn{constructor(t){super(t)}};function So(t,e){return qe(t,1,e)}function Ao(t,e){return qe(t,2,e)}var Io=class extends vn{constructor(t){super(t)}},Eo=[3,4,5,6,7],To=class extends vn{constructor(t){super(t)}},Bo=class extends vn{constructor(t){super(t)}};Bo.prototype.i=Ui([0,[0,Ei,yi,-3,Ei],[0,Eo,Ei,-1,bi,[0,Ei,yi,li],bi,wo,bi,[0,1,wo],bi,[0,Ei],bi,[0,Ei,yi,li]]]);var Uo=class{constructor(){this.g="undefined"!=typeof AbortController}async send(t,e,r){var n=this.g?new AbortController:void 0,i=n&&t.M>0?setTimeout(()=>{n.abort()},t.M):void 0;try{let i=await fetch(t.url,{method:t.da,headers:{...t.ca},...t.body&&{body:t.body},...t.withCredentials&&{credentials:"include"},signal:t.M&&n?n.signal:null});200===i.status?e?.(await i.text()):r?.(i.status)}catch(t){if("AbortError"===t?.name)r?.(408);else r?.(400)}finally{clearTimeout(i)}}},Lo=class extends vn{constructor(t){super(t,37)}},Po=[-4,{},ji,Ei,xi],xo=[0,yi,Ei,1,yi,-1,Ei,1,Ei,1,ai],No=[0,Ei,yi,-2],jo=[0,yi,Ei],Oo=[0,yi,Ei],ko=[0,gi,-3],Vo=[0,Ei,yi,-1,ai,ci,-1,yi,-5,wi,[0,yi,-4],-1,gi,[0,gi,-3],Ei];var Fo=class extends vn{constructor(t){super(t,19)}},Mo=function(t){return e=>Rn(e,t)}([-19,{},[0,Ei,1,[0,yi,-6,ai,ci,yi,-1,ai],1,[0,yi,1,yi,-5],yi,-1,[0,Ei,yi,-8],[0,yi,-3],[0,yi,Ei,yi,-2],[0,yi,-1,Ei,yi,-1,Ei,yi,-1,[0,wi,[0,yi,-1],gi,yi,-5],[0,Ei,gi,ci,-2]],ai,[0,yi,-3,ai,ci,yi,-1],[0,Ei,yi,-1],[0,yi,-9],[0,yi,-6,Ei,yi,1,yi,gi,Ei,-1,gi,yi,-2,Ei,yi,Ei,yi,ci,-1],1,[0,Ei],1,[0,yi,-4],1,xo,[0,[1,2,3,4,5,6],bi,xo,bi,jo,bi,Oo,bi,[0,Ei],bi,Vo,bi,No],jo,Oo,Vo,[0,[0,Ei,yi,-1,ai,ci,-1,yi,-4,wi,[0,yi,-4],-1,1,ko],[0,Ei,yi,-1,ai,ci,-1,yi,-4,ko]],No,[0,yi,[0,ci,-3,Ei],Ei,-2,[0,ci,-1],gi],4,[0,yi,Ei,yi,-1,ai,Ei,yi,-1,Ei,ci,-1]],Ei,wi,[-37,{},oi,yi,wi,[0,yi,-1],_i,1,_i,[0,pi,-1,hi,si,-1],yi,[0,ci,yi,-1],gi,ci,ai,yi,-1,Bi,Pi,oi,_i,Ei,hi,ai,-1,[0,Ei,-1],yi,gi,yi,fi,yi,-1,ni,1,ni,Po,gi,[0,Ei,[0,ii,ci,-2],[0,ii]],[0,Ei,ai]],oi,Si,yi,-1,oi,Ei,-1,[0,gi,-1,Ei,gi],[0,ai,-1,yi],[0,oi,gi,ai],ai,1,Ai,1,Po]),Co=class{constructor(t){this.i=[],this.m=new Uo,this.j=t??"",this.g=setInterval(()=>{this.flush()},6e4)}close(){void 0!==this.g&&(clearInterval(this.g),this.g=void 0),this.flush()}flush(t,e){if(this.error)e?.("net-send-failed");else if(0===this.i.length)t?.();else{var r=this.i;this.i=[],r=function(t){var e=new Fo;{Se(e=qe(e,2,1786));let l=e.l,c=0|l[Y];if(null==t)Le(l,c,3);else{var r=t===D?7:0|t[Y],n=r,i=je(r),o=i||Object.isFrozen(t),a=!0,s=!0;for(let e=0;e<t.length;e++){var u=t[e];i||(u=et(u),a&&=!u,s&&=u)}i||(r=a?13:5,r=s?-4097&r:4096|r),o&&r===n||(t=Ot(t),n=0,r=Je(r,c)),r!==n&&Q(t,r),c=Le(l,c,3,t),2&r||!(4096&r||16&r)||Ae(l,c)}}return e}(r),r=Mo(r),this.m.send({url:"https://odml.pa.googleapis.com/v1/log",da:"POST",M:1e4,body:r,fa:2,ca:{"Content-Type":"application/x-protobuf","x-goog-api-key":this.j},withCredentials:!1},()=>{t?.()},t=>{this.error=Error(`Logging failed with HTTP error: ${t}`),this.i=[],void 0!==this.g&&(clearInterval(this.g),this.g=void 0),e?.("net-send-failed",t)})}}};class Do{constructor(){this.H=this.B=this.G=this.v=this.D=this.F=this.C=0}}function Go(t,e){var r=new Bo;r=ze(r,0,1,t.U),r=ze(r,0,2,e),e=Ue(e=new Lo,6,nt(r=r.i(),!1)),(t=t.J).error||t.i.push(e)}function Ro(t,e){var r={C:e.C-t.j.C,F:e.F-t.j.F,D:e.D-t.j.D,v:e.v-t.j.v,G:e.G-t.j.G,B:e.B,H:e.H},n=Ao(So(new Io,t.A),1);r=Wo(t,r),Go(t,n=Ke(n,4,Eo,r)),t.j=e}function Wo(t,e){var r=new yo;return t=Ze(t=Ye(t=qe(r,1,t.S),7,e.v),5,e.B),t=Ze(t,6,e.H),e.D>0&&Ze(t,4,e.G/e.D),0!==e.C&&(r=Ye(r=po(3),2,e.C),Xe(t,8,mo,r)),0!==e.F&&(e=Ye(r=po(4),2,e.F),Xe(t,8,mo,e)),t}var Ho=class{constructor(t,e,r){this.T=performance.now(),this.m=performance.now(),this.i=new Map,this.o=0,this.g=new Do,this.j=new Do,this.J=new Co(r),this.A=function(t){switch(t){case"AudioClassifier":return 4;case"AudioEmbedder":return 5;case"TextClassifier":return 6;case"TextEmbedder":return 7;case"GestureRecognizer":return 8;case"HandDetector":return 9;case"HandLandmarker":return 10;case"ImageClassifier":return 11;case"ImageEmbedder":return 12;case"ImageSegmenter":return 13;case"ObjectDetector":return 14;case"FaceDetector":return 15;case"FaceLandmarker":return 16;case"InteractiveSegmenter":case"InteractiveSegmenterLegacy":return 18;case"HolisticLandmarker":return 20;case"LlmInference":return 21;case"LanguageDetector":return 22;case"PoseLandmarker":return 23;default:return 0}}(t),this.S=function(t){switch(t){case"IMAGE":return 11;case"VIDEO":return 12;case"LIVE_STREAM":return 13;case"AUDIO_CLIPS":return 14;case"AUDIO_STREAM":return 15;default:return 10}}(e),t=new To,"undefined"==typeof window?e=0:(e=navigator.userAgent,e=/Android/i.test(e)?1:/iPhone|iPad|iPod/i.test(e)?2:/Windows/i.test(e)?5:/Macintosh/i.test(e)?4:/Linux/i.test(e)?3:0),t=Ue(t=qe(t,1,e),2,ee("")),t=Ue(t,3,ee("")),t=Ue(t,4,ee("1.0.1")),t=Ue(t,5,ee("")),this.U=qe(t,6,4)}aa(){var t=new _o;t=Ze(t=qe(t,1,this.S),3,performance.now()-this.T),Go(this,t=Ke(Ao(So(new Io,this.A),0),3,Eo,t)),this.m=performance.now()}Z(){var t={...this.g,v:this.g.v+this.i.size,B:this.o,H:performance.now()-this.T};Ro(this,t);var e=new bo;e=ze(e,0,2,t=Wo(this,t)),Go(this,e=Ke(t=Ao(So(new Io,this.A),2),5,Eo,e))}close(){var t=this.J;"function"==typeof t.close?t.close():t.flush()}};function $o(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function zo(t){if("function"!=typeof importScripts){let e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((t,r)=>{e.addEventListener("load",()=>{t()},!1),e.addEventListener("error",t=>{r(t)},!1),document.body.appendChild(e)})}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;{let e=self.import;e?await e(t.toString()):await import(t.toString())}}}function Ko(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(e=t.h.stringToNewUTF8(e)),t.h._free(e)}function Jo(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(e.length);for(let r=0;r<e.length;r++)n[r]=t.h.stringToNewUTF8(e[r]);e=t.h._malloc(4*n.length),t.h.HEAPU32.set(n,e>>2),r(e);for(let e of n)t.h._free(e);t.h._free(e)}function Xo(t,e,r){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=r}function Yo(t,e,r){var n=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=(t,e,i)=>{e?(r(n,i),n=[]):n.push(t)}}var Zo=function(t){return class extends t{get O(){return this.h}X(){if("function"==typeof this.O._mediapipeLoggerGetEncodedApiKey){let t=this.O._mediapipeLoggerGetEncodedApiKey();return this.O._decodeBase64(t)}}}}(function(t){return class extends t{ba(){this.h._registerModelResourcesGraphService()}}}(class{constructor(t,e){this.j=!0,this.h=t,this.g=null,this.i=0,this.m="function"==typeof this.h._addIntToInputStream,void 0!==e?this.h.canvas=e:$o()?this.h.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.h.canvas=document.createElement("canvas"))}async initializeGraph(t){var e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){var r=t.length,n=this.h._malloc(r);this.h.HEAPU8.set(t,n),e?this.h._changeBinaryGraph(r,n):this.h._changeTextGraph(r,n),this.h._free(n)}configureAudio(t,e,r,n,i){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Ko(this,n||"input_audio",n=>{Ko(this,i=i||"audio_header",i=>{this.h._configureAudio(n,i,t,e??0,r)})})}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.h._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.h.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.h.errorListener=t}attachEmptyPacketListener(t,e){this.h.emptyPacketListeners=this.h.emptyPacketListeners||{},this.h.emptyPacketListeners[t]=e}addAudioToStream(t,e,r){this.addAudioToStreamWithShape(t,0,0,e,r)}addAudioToStreamWithShape(t,e,r,n,i){var o=4*t.length;this.i!==o&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(o),this.i=o),this.h.HEAPF32.set(t,this.g/4),Ko(this,n,t=>{this.h._addAudioToInputStream(this.g,e,r,t,i)})}addGpuBufferToStream(t,e,r){Ko(this,e,e=>{if(!this.h.canvas)throw Error("No OpenGL canvas configured.");e?this.h._bindTextureToStream(e):this.h._bindTextureToCanvas();var n=this.h.canvas.getContext("webgl2")||this.h.canvas.getContext("webgl");if(!n)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");this.h.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),this.h.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);var[i,o]=void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height];!this.j||i===this.h.canvas.width&&o===this.h.canvas.height||(this.h.canvas.width=i,this.h.canvas.height=o);var[a,s]=[i,o];this.h._addBoundTextureToStream(e,a,s,r)})}addBoolToStream(t,e,r){Ko(this,e,e=>{this.h._addBoolToInputStream(t,e,r)})}addDoubleToStream(t,e,r){Ko(this,e,e=>{this.h._addDoubleToInputStream(t,e,r)})}addFloatToStream(t,e,r){Ko(this,e,e=>{this.h._addFloatToInputStream(t,e,r)})}addIntToStream(t,e,r){Ko(this,e,e=>{this.h._addIntToInputStream(t,e,r)})}addUintToStream(t,e,r){Ko(this,e,e=>{this.h._addUintToInputStream(t,e,r)})}addStringToStream(t,e,r){Ko(this,e,e=>{Ko(this,t,t=>{this.h._addStringToInputStream(t,e,r)})})}addStringRecordToStream(t,e,r){Ko(this,e,e=>{Jo(this,Object.keys(t),n=>{Jo(this,Object.values(t),i=>{this.h._addFlatHashMapToInputStream(n,i,Object.keys(t).length,e,r)})})})}addProtoToStream(t,e,r,n){Ko(this,r,r=>{Ko(this,e,e=>{var i=this.h._malloc(t.length);this.h.HEAPU8.set(t,i),this.h._addProtoToInputStream(i,t.length,e,r,n),this.h._free(i)})})}addEmptyPacketToStream(t,e){Ko(this,t,t=>{this.h._addEmptyPacketToInputStream(t,e)})}addBoolVectorToStream(t,e,r){Ko(this,e,e=>{var n=this.h._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.h._addBoolVectorEntry(n,e);this.h._addBoolVectorToInputStream(n,e,r)})}addDoubleVectorToStream(t,e,r){Ko(this,e,e=>{var n=this.h._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.h._addDoubleVectorEntry(n,e);this.h._addDoubleVectorToInputStream(n,e,r)})}addFloatVectorToStream(t,e,r){Ko(this,e,e=>{var n=this.h._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.h._addFloatVectorEntry(n,e);this.h._addFloatVectorToInputStream(n,e,r)})}addIntVectorToStream(t,e,r){Ko(this,e,e=>{var n=this.h._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.h._addIntVectorEntry(n,e);this.h._addIntVectorToInputStream(n,e,r)})}addUintVectorToStream(t,e,r){Ko(this,e,e=>{var n=this.h._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.h._addUintVectorEntry(n,e);this.h._addUintVectorToInputStream(n,e,r)})}addStringVectorToStream(t,e,r){Ko(this,e,e=>{var n=this.h._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let e of t)Ko(this,e,t=>{this.h._addStringVectorEntry(n,t)});this.h._addStringVectorToInputStream(n,e,r)})}addBoolToInputSidePacket(t,e){Ko(this,e,e=>{this.h._addBoolToInputSidePacket(t,e)})}addDoubleToInputSidePacket(t,e){Ko(this,e,e=>{this.h._addDoubleToInputSidePacket(t,e)})}addFloatToInputSidePacket(t,e){Ko(this,e,e=>{this.h._addFloatToInputSidePacket(t,e)})}addIntToInputSidePacket(t,e){Ko(this,e,e=>{this.h._addIntToInputSidePacket(t,e)})}addUintToInputSidePacket(t,e){Ko(this,e,e=>{this.h._addUintToInputSidePacket(t,e)})}addStringToInputSidePacket(t,e){Ko(this,e,e=>{Ko(this,t,t=>{this.h._addStringToInputSidePacket(t,e)})})}addProtoToInputSidePacket(t,e,r){Ko(this,r,r=>{Ko(this,e,e=>{var n=this.h._malloc(t.length);this.h.HEAPU8.set(t,n),this.h._addProtoToInputSidePacket(n,t.length,e,r),this.h._free(n)})})}addBoolVectorToInputSidePacket(t,e){Ko(this,e,e=>{var r=this.h._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.h._addBoolVectorEntry(r,e);this.h._addBoolVectorToInputSidePacket(r,e)})}addDoubleVectorToInputSidePacket(t,e){Ko(this,e,e=>{var r=this.h._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.h._addDoubleVectorEntry(r,e);this.h._addDoubleVectorToInputSidePacket(r,e)})}addFloatVectorToInputSidePacket(t,e){Ko(this,e,e=>{var r=this.h._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.h._addFloatVectorEntry(r,e);this.h._addFloatVectorToInputSidePacket(r,e)})}addIntVectorToInputSidePacket(t,e){Ko(this,e,e=>{var r=this.h._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.h._addIntVectorEntry(r,e);this.h._addIntVectorToInputSidePacket(r,e)})}addUintVectorToInputSidePacket(t,e){Ko(this,e,e=>{var r=this.h._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.h._addUintVectorEntry(r,e);this.h._addUintVectorToInputSidePacket(r,e)})}addStringVectorToInputSidePacket(t,e){Ko(this,e,e=>{var r=this.h._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(let e of t)Ko(this,e,t=>{this.h._addStringVectorEntry(r,t)});this.h._addStringVectorToInputSidePacket(r,e)})}attachBoolListener(t,e){Xo(this,t,e),Ko(this,t,t=>{this.h._attachBoolListener(t)})}attachBoolVectorListener(t,e){Yo(this,t,e),Ko(this,t,t=>{this.h._attachBoolVectorListener(t)})}attachIntListener(t,e){Xo(this,t,e),Ko(this,t,t=>{this.h._attachIntListener(t)})}attachIntVectorListener(t,e){Yo(this,t,e),Ko(this,t,t=>{this.h._attachIntVectorListener(t)})}attachUintListener(t,e){Xo(this,t,e),Ko(this,t,t=>{this.h._attachUintListener(t)})}attachUintVectorListener(t,e){Yo(this,t,e),Ko(this,t,t=>{this.h._attachUintVectorListener(t)})}attachDoubleListener(t,e){Xo(this,t,e),Ko(this,t,t=>{this.h._attachDoubleListener(t)})}attachDoubleVectorListener(t,e){Yo(this,t,e),Ko(this,t,t=>{this.h._attachDoubleVectorListener(t)})}attachFloatListener(t,e){Xo(this,t,e),Ko(this,t,t=>{this.h._attachFloatListener(t)})}attachFloatVectorListener(t,e){Yo(this,t,e),Ko(this,t,t=>{this.h._attachFloatVectorListener(t)})}attachStringListener(t,e){Xo(this,t,e),Ko(this,t,t=>{this.h._attachStringListener(t)})}attachStringVectorListener(t,e){Yo(this,t,e),Ko(this,t,t=>{this.h._attachStringVectorListener(t)})}attachProtoListener(t,e,r){Xo(this,t,e),Ko(this,t,t=>{this.h._attachProtoListener(t,r||!1)})}attachProtoVectorListener(t,e,r){Yo(this,t,e),Ko(this,t,t=>{this.h._attachProtoVectorListener(t,r||!1)})}attachAudioListener(t,e,r){this.h._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Xo(this,t,(t,r)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,r)}),Ko(this,t,t=>{this.h._attachAudioListener(t,r||!1)})}finishProcessing(){this.h._waitUntilIdle()}closeGraph(){this.h._closeGraph(),this.h.simpleListeners=void 0,this.h.emptyPacketListeners=void 0}})),qo=class extends Zo{};async function Qo(t,e){var r=la,n=await(async(t,e,r,n)=>{if(e&&await zo(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await zo(r),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&n&&((e=self.Module).locateFile=n.locateFile,n.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=n.mainScriptUrlOrBlob)),n=await self.ModuleFactory(self.Module||n),self.ModuleFactory=self.Module=void 0,new t(n,null)})(r,t.wasmLoaderPath,t.assetLoaderPath,{locateFile:e=>e.endsWith(".wasm")?t.wasmBinaryPath.toString():t.assetBinaryPath&&e.endsWith(".data")?t.assetBinaryPath.toString():e});return function(t,e,r){r=r.la??"";var n=t.g.X();t.i=new Ho(e,r,n)}(n,r.name,e),await n.u(e),n}async function ta(t,e){return Qo(t,e)}function ea(t,e){var r=Re(t.baseOptions,uo,1)||new uo;"string"==typeof e?(Ue(r,2,ee(e)),Ue(r,1)):e instanceof Uint8Array&&(Ue(r,1,nt(e,!1)),Ue(r,2)),ze(t.baseOptions,0,1,r)}function ra(t,e){var r=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Re(t.baseOptions,uo,1)?.i()||Re(t.baseOptions,uo,1)?.j()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){var r=Re(t.baseOptions,ao,3);if(!r){var n=r=new ao,i=new Hi;Ke(n,4,so,i)}"delegate"in e&&("GPU"===e.delegate?(e=r,n=new Di,Ke(e,2,so,n)):(e=r,n=new Hi,Ke(e,4,so,n))),ze(t.baseOptions,0,3,r)}(t,r),r.modelAssetPath)return fetch(r.modelAssetPath.toString()).then(t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${r.modelAssetPath} (${t.status})`)}).then(e=>{try{t.g.h.FS_unlink("/model.dat")}catch{}t.g.h.FS_createDataFile("/","model.dat",new Uint8Array(e),!0,!1,!1),ea(t,"/model.dat"),ua(t)});if(r.modelAssetBuffer instanceof Uint8Array)ea(t,r.modelAssetBuffer);else if(r.modelAssetBuffer)return async function(t){for(var e=[],r=0;;){let{done:n,value:i}=await t.read();if(n)break;e.push(i),r+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(r),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(r.modelAssetBuffer).then(e=>{ea(t,e),ua(t)});return ua(t),Promise.resolve()}function na(t){try{let e=t.o.length;if(1===e)throw Error(t.o[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.o.map(t=>t.message).join(", "))}finally{t.o=[]}}var ia=class{constructor(t){this.g=t,this.o=[],this.m=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener((t,e)=>{this.o.push(Error(e))}),this.g.ba(),this.g.setGraph(t,e),this.i?.aa(),na(this)}finishProcessing(t){if(this.g.finishProcessing(),na(this),this.i&&void 0!==t){var e=this.i,r=e.i.get(t);if(void 0!==r&&(e.i.delete(t),t=performance.now()-r,++e.g.D,e.g.G+=t,e.g.B=Math.max(e.g.B,t),e.o=Math.max(e.o,t),performance.now()>e.m+3e4)){for(let[n,i]of e.i.entries())t=n,i<r&&(e.g.v++,e.i.delete(t));r={...e.g,H:performance.now()-e.m},e.g.B=0,e.m=performance.now(),Ro(e,r)}}}close(){this.i?.Z(),this.i?.close(),this.g.closeGraph()}};async function oa(t,e){return ta(t,e)}ia.prototype.close=ia.prototype.close;var aa=class extends ia{constructor(){super(...arguments),this.J=48e3}ea(t){this.J=t}};function sa(t){var e={classifications:He(t,go).map(t=>function(t,e=-1,r=""){return{categories:t.map(t=>({index:Wt(Te(t,1))??0??-1,score:Te(t,2,void 0,Dt)??0??0,categoryName:re(Te(t,3))??""??"",displayName:re(Te(t,4))??""??""})),headIndex:e,headName:r}}(Re(t,no,4)?.i()??[],Wt(Te(t,2))??0,re(Te(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(gt(t)?t=Number(t):(t=kt(64,t),t=gt(t)?Number(t):String(t)),t):Rt(t)?"number"==typeof t?zt(t):Jt(t):void 0}(Te(t,2,void 0,Zt))&&(e.timestampMs=function(t){var e=Number(t);return Number.isSafeInteger(e)?e:String(t)}(Te(t,2,void 0,Zt)??Ee)),e}function ua(t){var e=new to;Qe(e,10,"audio_in"),Qe(e,10,"sample_rate"),Qe(e,15,"timestamped_classifications");var r=new Ki;!function(t,e){var r=eo,n=t.l;W&&W in n&&(n=n[W])&&delete n[451755788],r.g?r.j(t,r.g,451755788,e,r.i):r.j(t,451755788,e,r.i)}(r,t.j);var n=new Yi;!function(t){var e=ee("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph");Se(t),Le(t=t.l,0|t[Y],2,""===e?void 0:e)}(n),Qe(n,3,"AUDIO:audio_in"),Qe(n,3,"SAMPLE_RATE:sample_rate"),Qe(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.u(r),Xe(e,1,Yi,n),t.g.attachProtoVectorListener("timestamped_classifications",(e,r)=>{!function(t,e){e.forEach(e=>{e=vo(e),t.A.push(sa(e))})}(t,e),t.m=Math.max(t.m,r)}),t.g.attachEmptyPacketListener("timestamped_classifications",e=>{t.m=Math.max(t.m,e)}),e=e.i(),t.setGraph(new Uint8Array(e),!0)}aa.prototype.setDefaultSampleRate=aa.prototype.ea;var la=class extends aa{constructor(t,e){super(new qo(t,e)),this.A=[],ze(t=this.j=new co,0,1,e=new lo)}get baseOptions(){return Re(this.j,lo,1)}set baseOptions(t){ze(this.j,0,1,t)}u(t){var e=this.j,r=Re(this.j,oo,2);if(r){var n=r.l;let t=0|n[Y];r=Ie(r,n,t)?ye(r,n,!0):new r.constructor(we(n,t,!1))}else r=new oo;if(void 0!==t.displayNamesLocale?Ue(r,1,ee(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ue(r,1),void 0!==t.maxResults){if(null!=(n=t.maxResults)){if("number"!=typeof n)throw k("int32");if(!Mt(n))throw k("int32");n|=0}Ue(r,2,n)}else"maxResults"in t&&Ue(r,2);if(void 0!==t.scoreThreshold){if(null!=(n=t.scoreThreshold)&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Ue(r,3,n)}else"scoreThreshold"in t&&Ue(r,3);return void 0!==t.categoryAllowlist?ke(r,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ue(r,4),void 0!==t.categoryDenylist?ke(r,5,t.categoryDenylist):"categoryDenylist"in t&&Ue(r,5),ze(e,0,2,r),ra(this,t)}W(t,e){e=e??this.J;var r=this.m+1;if(this.i&&void 0!==r)if(Re(this.baseOptions,ao,3)?.i()){var n=this.i;++n.g.F,n.i.set(r,performance.now())}else++(n=this.i).g.C,n.i.set(r,performance.now());return this.g.addDoubleToStream(e,"sample_rate",r),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",r),this.A=[],this.finishProcessing(r),[...this.A]}};la.prototype.classify=la.prototype.W,la.prototype.setOptions=la.prototype.u,la.createFromModelPath=function(t,e){return ta(t,{baseOptions:{modelAssetPath:e}})},la.createFromModelBuffer=function(t,e){return oa(t,{baseOptions:{modelAssetBuffer:e}})},la.createFromOptions=function(t,e){return oa(t,e)};var ca,ha=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 fa(t){if(t)return!0;if(void 0===ca)try{await WebAssembly.instantiate(ha),ca=!0}catch{ca=!1}return ca}async function da(t,e,r){return{wasmLoaderPath:`${e}/${t}_${r=`wasm${r?"_module":""}${await fa(r)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${e}/${t}_${r}.wasm`}}var ga=class{};return ga.forVisionTasks=function(t,e=!1){return da("vision",t??Fi``,e)},ga.forTextTasks=function(t,e=!1){return da("text",t??Fi``,e)},ga.forGenAiTasks=function(t,e=!1){return da("genai",t??Fi``,e)},ga.forAudioTasks=function(t,e=!1){return da("audio",t??Fi``,e)},ga.isSimdSupported=function(t=!1){return fa(t)},t.AudioClassifier=la,t.AudioTaskRunner=aa,t.FilesetResolver=ga,t.TaskRunner=ia,t}({});
2
2
  //# sourceMappingURL=audio_bundle_iife.js.map