@mediapipe/tasks-audio 1.2.0-rc.20261016 → 1.2.0-rc.20261017

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