@mediapipe/tasks-audio 0.10.15-rc.20240607 → 0.10.15-rc.20240608

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";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof self?self:{};function e(e){t:{for(var n=["CLOSURE_FLAGS"],r=t,i=0;i<n.length;i++)if(null==(r=r[n[i]])){n=null;break t}n=r}return null!=(e=n&&n[e])&&e}function n(){throw Error("Invalid UTF8")}function r(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let i,o;const s="undefined"!=typeof TextDecoder;let a;const u="undefined"!=typeof TextEncoder;function c(t){if(u)t=(a||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)r[n++]=e;else{if(e<2048)r[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){const o=t.charCodeAt(++i);if(o>=56320&&o<=57343){e=1024*(e-55296)+o-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var l,h=e(610401301),f=e(188588736);const d=t.navigator;function g(t){return!!h&&(!!l&&l.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function p(e){var n;return(n=t.navigator)&&(n=n.userAgent)||(n=""),-1!=n.indexOf(e)}function m(){return!!h&&(!!l&&l.brands.length>0)}function y(){return m()?g("Chromium"):(p("Chrome")||p("CriOS"))&&!(!m()&&p("Edge"))||p("Silk")}l=d&&d.userAgentData||null;var v=!m()&&(p("Trident")||p("MSIE"));!p("Android")||y(),y(),p("Safari")&&(y()||!m()&&p("Coast")||!m()&&p("Opera")||!m()&&p("Edge")||(m()?g("Microsoft Edge"):p("Edg/"))||m()&&g("Opera"));var b={},w=null;function _(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=w[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}A();for(var r=0;;){var i=n(-1),o=n(0),s=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|o>>4),64!=s&&(e(o<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}function A(){if(!w){w={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;n<5;n++){var r=t.concat(e[n].split(""));b[n]=r;for(var i=0;i<r.length;i++){var o=r[i];void 0===w[o]&&(w[o]=i)}}}}var S="undefined"!=typeof Uint8Array,E=!v&&"function"==typeof btoa;function T(t){if(!E){var e;void 0===e&&(e=0),A(),e=b[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let u=0,c=0;for(;u<t.length-2;u+=3){var i=t[u],o=t[u+1],s=t[u+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],n[c++]=a+i+o+s}switch(a=0,s=r,t.length-u){case 2:s=e[(15&(a=t[u+1]))<<2]||r;case 1:t=t[u],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+s+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const I=/[-_.]/g,P={"-":"+",_:"/",".":"="};function U(t){return P[t]||""}function x(t){if(!E)return _(t);I.test(t)&&(t=t.replace(I,U)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function O(t){return S&&null!=t&&t instanceof Uint8Array}let L;function B(){return L||=new Uint8Array(0)}var V={};let k;function j(t){if(t!==V)throw Error("illegal external caller")}function F(){return k||=new M(null,V)}function N(t){j(V);var e=t.g;return null==(e=null==e||O(e)?e:"string"==typeof e?x(e):null)?e:t.g=e}var M=class{constructor(t,e){if(j(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}i(){const t=N(this);return t?new Uint8Array(t):B()}};function D(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function C(){return Error("Failed to read varint, encoding is invalid.")}function G(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function $(t){if("string"==typeof t)return{buffer:x(t),v:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),v:!1};if(t.constructor===Uint8Array)return{buffer:t,v:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),v:!1};if(t.constructor===M)return{buffer:N(t)||B(),v:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),v:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function z(){return"function"==typeof BigInt}const W="function"==typeof Uint8Array.prototype.slice;let R,H=0,q=0;function J(t){const e=t<0;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=et(n,t);t=r,n=e}H=n>>>0,q=t>>>0}function K(t){const e=R||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),q=0,H=e.getUint32(0,!0)}function Y(t,e){return 4294967296*e+(t>>>0)}function X(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=Y(t,e),n?-t:t}function Q(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else z()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=Math.floor(t/1e7),t%=1e7),n>=1e7&&(e+=Math.floor(n/1e7),n%=1e7),n=e+Z(n)+Z(t));return n}function Z(t){return t=String(t),"0000000".slice(t.length)+t}function tt(t){if(t.length<16)J(Number(t));else if(z())t=BigInt(t),H=Number(t&BigInt(4294967295))>>>0,q=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);q=H=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));q*=1e6,H=1e6*H+e,H>=4294967296&&(q+=Math.trunc(H/4294967296),q>>>=0,H>>>=0)}if(e){const[t,e]=et(H,q);H=t,q=e}}}function et(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function nt(t,e){let n,r=0,i=0,o=0;const s=t.i;let a=t.g;do{n=s[a++],r|=(127&n)<<o,o+=7}while(o<32&&128&n);for(o>32&&(i|=(127&n)>>4),o=3;o<32&&128&n;o+=7)n=s[a++],i|=(127&n)<<o;if(ct(t,a),n<128)return e(r>>>0,i>>>0);throw C()}function rt(t){let e=0,n=t.g;const r=n+10,i=t.i;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return ct(t,n),!!(127&e)}throw C()}function it(t){const e=t.i;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw C();return ct(t,n),i}function ot(t){var e=t.i;const n=t.g,r=e[n],i=e[n+1],o=e[n+2];return e=e[n+3],ct(t,t.g+4),(r<<0|i<<8|o<<16|e<<24)>>>0}function st(t){var e=ot(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:t*(1/0):0==n?t*Math.pow(2,-149)*e:t*Math.pow(2,n-150)*(e+Math.pow(2,23))}function at(t){return it(t)}function ut(t,e,{D:n=!1}={}){t.D=n,e&&(e=$(e),t.i=e.buffer,t.m=e.v,t.s=0,t.j=t.i.length,t.g=t.s)}function ct(t,e){if(t.g=e,e>t.j)throw G(t.j,e)}function lt(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.j)throw G(e,t.j-n);return t.g=r,n}function ht(t,e){if(0==e)return F();var n=lt(t,e);return t.D&&t.m?n=t.i.subarray(n,n+e):(t=t.i,n=n===(e=n+e)?B():W?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?F():new M(n,V)}var ft=[];function dt(t){var e=t.g;if(e.g==e.j)return!1;t.j=t.g.g;var n=it(t.g)>>>0;if(e=n>>>3,!((n&=7)>=0&&n<=5))throw D(n,t.j);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.j})`);return t.m=e,t.i=n,!0}function gt(t){switch(t.i){case 0:0!=t.i?gt(t):rt(t.g);break;case 1:ct(t=t.g,t.g+8);break;case 2:if(2!=t.i)gt(t);else{var e=it(t.g)>>>0;ct(t=t.g,t.g+e)}break;case 5:ct(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!dt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.i){if(t.m!=e)throw Error("Unmatched end-group tag");break}gt(t)}break;default:throw D(t.i,t.j)}}function pt(t,e,n){const r=t.g.j,i=it(t.g)>>>0,o=t.g.g+i;let s=o-r;if(s<=0&&(t.g.j=o,n(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);t.g.g=o,t.g.j=r}function mt(t){var e=it(t.g)>>>0,a=lt(t=t.g,e);if(t=t.i,s){var u,c=t;(u=o)||(u=o=new TextDecoder("utf-8",{fatal:!0})),e=a+e,c=0===a&&e===c.length?c:c.subarray(a,e);try{var l=u.decode(c)}catch(t){if(void 0===i){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),i=!0}catch(t){i=!1}}throw!i&&(o=void 0),t}}else{e=(l=a)+e,a=[];let i,o=null;for(;l<e;){var h=t[l++];h<128?a.push(h):h<224?l>=e?n():(i=t[l++],h<194||128!=(192&i)?(l--,n()):a.push((31&h)<<6|63&i)):h<240?l>=e-1?n():(i=t[l++],128!=(192&i)||224===h&&i<160||237===h&&i>=160||128!=(192&(u=t[l++]))?(l--,n()):a.push((15&h)<<12|(63&i)<<6|63&u)):h<=244?l>=e-2?n():(i=t[l++],128!=(192&i)||i-144+(h<<28)>>30!=0||128!=(192&(u=t[l++]))||128!=(192&(c=t[l++]))?(l--,n()):(h=(7&h)<<18|(63&i)<<12|(63&u)<<6|63&c,h-=65536,a.push(55296+(h>>10&1023),56320+(1023&h)))):n(),a.length>=8192&&(o=r(o,a),a.length=0)}l=r(o,a)}return l}function yt(t){const e=it(t.g)>>>0;return ht(t.g,e)}function vt(t,e,n){var r=it(t.g)>>>0;for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var bt=[];function wt(t){return t?/^\d+$/.test(t)?(tt(t),new _t(H,q)):null:At||=new _t(0,0)}var _t=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let At;function St(t){return t?/^-?\d+$/.test(t)?(tt(t),new Et(H,q)):null:Tt||=new Et(0,0)}var Et=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let Tt;function It(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Pt(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Ut(t,e){if(e>=0)Pt(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function xt(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Ot(t,e){0!==e.length&&(t.j.push(e),t.i+=e.length)}function Lt(t,e,n){Pt(t.g,8*e+n)}function Bt(t,e){return Lt(t,e,2),e=t.g.end(),Ot(t,e),e.push(t.i),e}function Vt(t,e){var n=e.pop();for(n=t.i+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.i++;e.push(n),t.i++}function kt(t,e,n){Lt(t,e,2),Pt(t.g,n.length),Ot(t,t.g.end()),Ot(t,n)}class jt{constructor(t,e,n,r){this.g=t,this.i=e,this.j=n,this.J=r}}function Ft(t){return Array.prototype.slice.call(t)}function Nt(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():t}var Mt=Nt(),Dt=Nt("2ex"),Ct=Nt("0dg"),Gt=Mt?(t,e)=>{t[Mt]|=e}:(t,e)=>{void 0!==t.g?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})},$t=Mt?(t,e)=>{t[Mt]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)};function zt(t,e,n){return n?t|e:t&~e}var Wt=Mt?t=>0|t[Mt]:t=>0|t.g,Rt=Mt?t=>t[Mt]:t=>t.g,Ht=Mt?(t,e)=>(t[Mt]=e,t):(t,e)=>(void 0!==t.g?t.g=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}}),t);function qt(t,e){Ht(e,-14591&(0|t))}function Jt(t,e){Ht(e,-14557&(34|t))}function Kt(t){return 0===(t=t>>14&1023)?536870912:t}var Yt,Xt={},Qt={};function Zt(t){return!(!t||"object"!=typeof t||t.g!==Qt)}function te(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function ee(t,e,n){if(null!=t)if("string"==typeof t)t=t?new M(t,V):F();else if(t.constructor!==M)if(O(t))t=t.length?new M(n?t:new Uint8Array(t),V):F();else{if(!e)throw Error();t=void 0}return t}function ne(t,e,n){if(!Array.isArray(t)||t.length)return!1;const r=Wt(t);return!!(1&r)||!(!e||!(Array.isArray(e)?e.includes(n):e.has(n)))&&(Ht(t,1|r),!0)}const re=[];function ie(t){if(2&t)throw Error()}let oe,se;function ae(t,e){(e=oe?e[oe]:void 0)&&(t[oe]=Ft(e))}Ht(re,55),Yt=Object.freeze(re);class ue{}Object.freeze(new class{}),Object.freeze(new ue);var ce=Object.freeze(new ue);function le(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}let he;function fe(){const e=Error();le(e,"incident"),function(e){t.setTimeout((()=>{throw e}),0)}(e)}function de(){const t=Error("int32");return le(t,"warning"),t}function ge(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function pe(t){if(null!=t&&"boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}const me=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ye(t){const e=typeof t;return"number"===e?Number.isFinite(t):"string"===e&&me.test(t)}function ve(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t&&Number.isFinite(t)?0|t:void 0}function be(t){return"-"!==t[0]&&(t.length<20||20===t.length&&Number(t.substring(0,6))<184467)}function we(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(J(t),t=X(H,q)),t}function _e(t){var e=Math.trunc(Number(t));if(Number.isSafeInteger(e))return String(e);if(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),!("-"===t[0]?t.length<20||20===t.length&&Number(t.substring(0,7))>-922337:t.length<19||19===t.length&&Number(t.substring(0,6))<922337))if(tt(t),t=H,2147483648&(e=q))if(z())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=et(t,e);t="-"+Q(n,r)}else t=Q(t,e);return t}function Ae(t){if("string"!=typeof t)throw Error();return t}function Se(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function Ee(t){return null==t||"string"==typeof t?t:void 0}function Te(t,e,n){if(null!=t&&"object"==typeof t&&t.C===Xt)return t;if(Array.isArray(t)){var r=Wt(t),i=r;return 0===i&&(i|=32&n),(i|=2&n)!==r&&Ht(t,i),new e(t)}}let Ie,Pe,Ue;function xe(t){switch(typeof t){case"boolean":return Pe||=[0,void 0,!0];case"number":return t>0?void 0:0===t?Ue||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function Oe(t,e,n){if(null==t&&(t=Ie),Ie=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-16760833&r|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(2048&(r=Wt(t)))throw Error("farr");if(64&r)return t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error("mid");t:{const i=(n=t).length;if(i){const t=i-1;if(te(n[t])){if((e=t-(+!!(512&(r|=256))-1))>=1024)throw Error("pvtlmt");r=-16760833&r|(1023&e)<<14;break t}}if(e){if((e=Math.max(e,i-(+!!(512&r)-1)))>1024)throw Error("spvt");r=-16760833&r|(1023&e)<<14}}}return Ht(t,r),t}function Le(t,e,n,r,i){if(null!=t){if(Array.isArray(t))t=ne(t,void 0,0)?void 0:i&&2&Wt(t)?t:Be(t,e,n,void 0!==r,i);else if(te(t)){const o={};for(let s in t)o[s]=Le(t[s],e,n,r,i);t=o}else t=e(t,r);return t}}function Be(t,e,n,r,i){const o=r||n?Wt(t):0;r=r?!!(32&o):void 0;const s=Ft(t);for(let t=0;t<s.length;t++)s[t]=Le(s[t],e,n,r,i);return n&&(ae(s,t),n(o,s)),s}function Ve(t){return t.C===Xt?t.toJSON():function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t)if(Array.isArray(t)){if(ne(t,void 0,0))return}else{if(O(t))return T(t);if(t instanceof M){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=T(e)}}}return t}(t)}function ke(t,e,n=Jt){if(null!=t){if(S&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=Wt(t);return 2&r||(e&&=0===r||!!(32&r)&&!(64&r||!(16&r)),t=e?Ht(t,-12293&(34|r)):Be(t,ke,4&r?Jt:n,!0,!0)),t}return t.C===Xt&&(n=t.l,t=2&(r=Rt(n))?t:Fe(t,n,r,!0)),t}}function je(t){const e=t.l;return Fe(t,e,Rt(e),!1)}function Fe(t,e,n,r){return t=t.constructor,Ie=e=Ne(e,n,r),e=new t(e),Ie=void 0,e}function Ne(t,e,n){const r=n||2&e?Jt:qt,i=!!(32&e);return t=function(t,e,n){const r=Ft(t);var i=r.length;const o=256&e?r[i-1]:void 0;for(i+=o?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(o){e=r[e]={};for(const t in o)e[t]=n(o[t])}return ae(r,t),r}(t,e,(t=>ke(t,i,r))),Gt(t,32|(n?2:0)),t}function Me(t){const e=t.l,n=Rt(e);return 2&n?Fe(t,e,n,!1):t}function De(t,e,n,r){return!(4&e)||null!=n&&(!r&&0===n&&(4096&e||8192&e)&&(t.constructor[Ct]=1+(0|t.constructor[Ct]))<5&&fe(),0!==n&&!(n&e))}function Ce(t,e){return $e(t=t.l,Rt(t),e)}function Ge(t,e,n,r){if(!((e=r+(+!!(512&e)-1))<0||e>=t.length||e>=n))return t[e]}function $e(t,e,n,r){if(-1===n)return null;const i=Kt(e);if(!(n>=i)){var o=t.length;return r&&256&e&&null!=(r=t[o-1][n])?(Ge(t,e,i,n)&&null!=Dt&&((e=(t=he??={})[Dt]||0)>=4||(t[Dt]=e+1,fe())),r):Ge(t,e,i,n)}return 256&e?t[t.length-1][n]:void 0}function ze(t,e,n,r){const i=t.l;let o=Rt(i);return ie(o),We(i,o,e,n,r),t}function We(t,e,n,r,i){const o=Kt(e);if(n>=o||i){let s=e;if(256&e)i=t[t.length-1];else{if(null==r)return s;i=t[o+(+!!(512&e)-1)]={},s|=256}return i[n]=r,n<o&&(t[n+(+!!(512&e)-1)]=void 0),s!==e&&Ht(t,s),s}return t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n]),e}function Re(t,e,n,r,i){var o=2&e;let s=$e(t,e,n,i);Array.isArray(s)||(s=Yt);const a=!(2&r);r=!(1&r);const u=!!(32&e);let c=Wt(s);return 0!==c||!u||o||a?1&c||(c|=1,Ht(s,c)):(c|=33,Ht(s,c)),o?(t=!1,2&c||(Gt(s,34),t=!!(4&c)),(r||t)&&Object.freeze(s)):(o=!!(2&c)||!!(2048&c),r&&o?(s=Ft(s),r=1,u&&!a&&(r|=32),Ht(s,r),We(t,e,n,s,i)):a&&32&c&&!o&&$t(s,32)),s}function He(t){t=t.l;let e=Rt(t);const n=$e(t,e,1),r=ee(n,!0,!!(34&e));return null!=r&&r!==n&&We(t,e,1,r),r}function qe(t,e){return t=$e(t,e,1),Array.isArray(t)?t:Yt}function Je(t,e){return 0===t&&(t=cn(t,e)),zt(t,1,!0)}function Ke(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function Ye(t,e){t=t.l;let n=Rt(t);ie(n),We(t,n,2,""===e?void 0:e)}function Xe(t,e,n,r){const i=Rt(t);ie(i),t=Re(t,i,e,2),r=n(r,!!(4&(e=Wt(t)))&&!!(4096&e)),t.push(r)}function Qe(t){return t}function Ze(t,e){return tn(t=t.l,Rt(t),vi)===e?e:-1}function tn(t,e,n){let r=0;for(let i=0;i<n.length;i++){const o=n[i];null!=$e(t,e,o)&&(0!==r&&(e=We(t,e,r)),r=o)}return r}function en(t,e,n,r){let i=Rt(t);ie(i);const o=$e(t,i,n,r);let s;if(null!=o&&o.C===Xt)return(e=Me(o))!==o&&We(t,i,n,e,r),e.l;if(Array.isArray(o)){const t=Wt(o);s=2&t?Ne(o,t,!1):o,s=Oe(s,e[0],e[1])}else s=Oe(void 0,e[0],e[1]);return s!==o&&We(t,i,n,s,r),s}function nn(t,e,n,r){t=t.l;let i=Rt(t);const o=$e(t,i,n,r);return(e=Te(o,e,i))!==o&&null!=e&&We(t,i,n,e,r),e}function rn(t,e,n){if(null==(e=nn(t,e,n,!1)))return e;t=t.l;let r=Rt(t);if(!(2&r)){const i=Me(e);i!==e&&We(t,r,n,e=i,!1)}return e}function on(t,e,n,r,i){var o=!!(2&e);const s=o?1:2;r=!!r,i&&=!o,o=qe(t,e);var a=Wt(o);const u=!!(4&a);if(!u){var c=o,l=e;const t=!!(2&(a=Je(a,e)));t&&(l=zt(l,2,!0));let r=!t,i=!0,s=0,u=0;for(;s<c.length;s++){const e=Te(c[s],n,l);if(e instanceof n){if(!t){const t=!!(2&Wt(e.l));r&&=!t,i&&=t}c[u++]=e}}u<s&&(c.length=u),a=zt(a,4,!0),a=zt(a,16,i),a=zt(a,8,r),Ht(c,a),t&&Object.freeze(c)}if(i&&!(8&a||!o.length&&(1===s||4===s&&32&a))){for(Ke(a)&&(o=Ft(o),a=cn(a,e),e=We(t,e,1,o)),n=o,i=a,c=0;c<n.length;c++)(a=n[c])!==(l=Me(a))&&(n[c]=l);i=zt(i,8,!0),i=zt(i,16,!n.length),Ht(n,i),a=i}return Ke(a)||(n=a,(a=(i=1===s||4===s&&!!(32&a))?zt(a,!o.length||16&a&&(!u||32&a)?2:2048,!0):ln(a,e,r))!==n&&Ht(o,a),i&&Object.freeze(o)),2===s&&Ke(a)&&(o=Ft(o),a=ln(a=cn(a,e),e,r),Ht(o,a),We(t,e,1,o)),o}function sn(t,e){t=t.l;const n=Rt(t);return on(t,n,e,!1,!(2&n))}function an(t,e,n,r,i){return null==r&&(r=void 0),ze(t,n,r,i)}function un(t,e,n){var r=ni;null==n&&(n=void 0),t=t.l;let i=Rt(t);ie(i),(r=tn(t,i,r))&&r!==e&&null!=n&&(i=We(t,i,r)),We(t,i,e,n)}function cn(t,e){return t=zt(t,2,!!(2&e)),t=zt(t,32,!0),zt(t,2048,!1)}function ln(t,e,n){return 32&e&&n||(t=zt(t,32,!1)),t}function hn(t,e){var n=$r;t=t.l;const r=Rt(t);ie(r),t=on(t,r,n,!0),e=null!=e?e:new n,t.push(e),2&Wt(e.l)?$t(t,8):$t(t,16)}function fn(t){return null==(t=Ce(t,2))?t:ye(t)?"number"==typeof t?we(t):_e(t):void 0}function dn(t,e){return t??e}function gn(t,e,n){{const a=t.l;let u=Rt(a);if(ie(u),null==n)We(a,u,e);else{var r,i=Wt(n),o=i,s=!!(2&i)||Object.isFrozen(n);if((r=!s)&&(r=void 0===ce||!1),De(t,i))for(i=21,s&&(n=Ft(n),o=0,i=ln(i=cn(i,u),u,!0)),t=0;t<n.length;t++)n[t]=Ae(n[t]);r&&(n=Ft(n),o=0,i=ln(i=cn(i,u),u,!0)),i!==o&&Ht(n,i),We(a,u,e,n)}}}function pn(t,e,n){Xe(t.l,e,Ae,n)}function mn(t,e,n){e.g?e.j(t,e.g,e.i,n,!0):e.j(t,e.i,n,!0)}var yn=class{constructor(t,e){this.l=Oe(t,e)}toJSON(){return vn(this,Be(this.l,Ve,void 0,void 0,!1),!0)}v(){return!!(2&Wt(this.l))}};function vn(t,e,n){var r=f?void 0:t.constructor.u;const i=Rt(n?t.l:e);if(!(t=e.length))return e;let o,s;if(te(n=e[t-1])){t:{var a=n;let t={},e=!1;for(var u in a){let n=a[u];if(Array.isArray(n)){let t=n;(ne(n,r,+u)||Zt(n)&&0===n.size)&&(n=null),n!=t&&(e=!0)}null!=n?t[u]=n:e=!0}if(e){for(var c in t){a=t;break t}a=null}}a!=n&&(o=!0),t--}for(u=+!!(512&i)-1;t>0&&(n=e[c=t-1],c-=u,null==n||ne(n,r,c)||Zt(n)&&0===n.size);t--)s=!0;return o||s?(e=Array.prototype.slice.call(e,0,t),a&&e.push(a),e):e}function bn(t){return Array.isArray(t)?t[0]instanceof jt?t:[mr,t]:[t,void 0]}function wn(t,e){if(Array.isArray(e)){var n=Wt(e);if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),Ht(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}yn.prototype.C=Xt,yn.prototype.toString=function(){return vn(this,this.l,!1).toString()};const _n=Symbol();function An(t){let e=t[_n];if(!e){const n=On(t),r=$n(t),i=r.j;e=i?(t,e)=>i(t,e,r):(t,e)=>{for(;dt(e)&&4!=e.i;){var i=e.m,o=r[i];if(!o){var s=r.F;s&&(s=s[i])&&(o=r[i]=Sn(s))}o&&o(e,t,i)||(i=(o=e).j,gt(o),o.I?o=void 0:(s=o.g.g-i,o.g.g=i,o=ht(o.g,s)),i=t,o&&(oe||=Symbol(),(s=i[oe])?s.push(o):i[oe]=[o]))}n===Tn||n===In||n.s||(t[se||=Symbol()]=n)},t[_n]=e}return e}function Sn(t){const e=(t=bn(t))[0].g;if(t=t[1]){const n=An(t),r=$n(t).A;return(t,i,o)=>e(t,i,o,r,n)}return e}class En{}let Tn,In;const Pn=Symbol();function Un(t,e,n){const r=n[1];let i;if(r){const n=r[Pn];i=n?n.A:xe(r[0]),t[e]=n??r}i&&i===Pe?(t.g||(t.g=new Set)).add(e):n[0]&&(t.i||(t.i=new Set)).add(e)}function xn(t,e){return[t.j,!e||e[0]>0?void 0:e]}function On(t){var e=t[Pn];if(e)return e;if(!(e=Bn(t,t[Pn]=new En,xn,xn,Un)).F&&!e.i&&!e.g){let n=!0;for(let t in e)isNaN(t)||(n=!1);n?(xe(t[0])===Pe?In?e=In:((e=new En).A=xe(!0),e=In=e):e=Tn||=new En,e=t[Pn]=e):e.s=!0}return e}function Ln(t,e,n){t[e]=n}function Bn(t,e,n,r,i=Ln){e.A=xe(t[0]);let o=0;var s=t[++o];s&&s.constructor===Object&&(e.F=s,"function"==typeof(s=t[++o])&&(e.j=s,e.m=t[++o],s=t[++o]));const a={};for(;Array.isArray(s)&&"number"==typeof s[0]&&s[0]>0;){for(var u=0;u<s.length;u++)a[s[u]]=s;s=t[++o]}for(u=1;void 0!==s;){let h;"number"==typeof s&&(u+=s,s=t[++o]);var c=void 0;if(s instanceof jt?h=s:(h=yr,o--),h.J){s=t[++o],c=t;var l=o;"function"==typeof s&&(s=s(),c[l]=s),c=s}for(l=u+1,"number"==typeof(s=t[++o])&&s<0&&(l-=s,s=t[++o]);u<l;u++){const t=a[u];i(e,u,c?r(h,c,t):n(h,t))}}return e}const Vn=Symbol();function kn(t){let e=t[Vn];if(!e){const n=Mn(t);e=(t,e)=>Rn(t,e,n),t[Vn]=e}return e}const jn=Symbol();function Fn(t){return t.i}function Nn(t,e){let n,r;const i=t.i;return(t,o,s)=>i(t,o,s,r||=Mn(e).A,n||=kn(e))}function Mn(t){let e=t[jn];return e||(e=Bn(t,t[jn]={},Fn,Nn),zn(t),e)}const Dn=Symbol();function Cn(t,e){const n=t.g;return e?(t,r,i)=>n(t,r,i,e):n}function Gn(t,e,n){const r=t.g;let i,o;return(t,s,a)=>r(t,s,a,o||=$n(e).A,i||=An(e),n)}function $n(t){let e=t[Dn];return e||(On(t),e=Bn(t,t[Dn]={},Cn,Gn),zn(t),e)}function zn(t){Dn in t&&Pn in t&&jn in t&&(t.length=0)}function Wn(t,e){var n=t[e];if(n)return n;if((n=t.F)&&(n=n[e])){var r=(n=bn(n))[0].i;if(n=n[1]){const e=kn(n),i=Mn(n).A;n=(n=t.m)?n(i,e):(t,n,o)=>r(t,n,o,i,e)}else n=r;return t[e]=n}}function Rn(t,e,n){for(var r=Rt(t),i=+!!(512&r)-1,o=t.length,s=512&r?1:0,a=o+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const o=s-i,a=Wn(n,o);a&&a(e,r,o)}if(256&r){r=t[o-1];for(let t in r)i=+t,Number.isNaN(i)||null!=(o=r[t])&&(a=Wn(n,i))&&a(e,o,i)}if(t=oe?t[oe]:void 0)for(Ot(e,e.g.end()),n=0;n<t.length;n++)Ot(e,N(t[n])||B())}function Hn(t,e){return new jt(t,e,!1,!1)}function qn(t,e){return new jt(t,e,!0,!1)}function Jn(t,e,n){We(t,Rt(t),e,n)}function Kn(t,e,n){t:if(null!=e){if(ye(e)){if("string"==typeof e){e=_e(e);break t}if("number"==typeof e){e=we(e);break t}}e=void 0}null!=e&&("string"==typeof e&&St(e),null!=e&&(Lt(t,n,0),"number"==typeof e?(t=t.g,J(e),It(t,H,q)):(n=St(e),It(t.g,n.i,n.g))))}function Yn(t,e,n){null!=(e=ve(e))&&null!=e&&(Lt(t,n,0),Ut(t.g,e))}function Xn(t,e,n){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Lt(t,n,0),t.g.g.push(e?1:0))}function Qn(t,e,n){null!=(e=Ee(e))&&kt(t,n,c(e))}function Zn(t,e,n,r,i){null!=(e=e instanceof yn?e.l:Array.isArray(e)?Oe(e,r[0],r[1]):void 0)&&(n=Bt(t,n),i(e,t),Vt(t,n))}function tr(t,e,n){null!=(e=null==e||"string"==typeof e||O(e)||e instanceof M?e:void 0)&&kt(t,n,$(e).buffer)}var er,nr=Hn((function(t,e,n){if(1!==t.i)return!1;var r=t.g;t=ot(r);const i=ot(r);r=2*(i>>31)+1;const o=i>>>20&2047;return t=4294967296*(1048575&i)+t,Jn(e,n,2047==o?t?NaN:r*(1/0):0==o?r*Math.pow(2,-1074)*t:r*Math.pow(2,o-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=ge(e))&&(Lt(t,n,1),t=t.g,(n=R||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),H=n.getUint32(0,!0),q=n.getUint32(4,!0),xt(t,H),xt(t,q))})),rr=Hn((function(t,e,n){return 5===t.i&&(Jn(e,n,st(t.g)),!0)}),(function(t,e,n){null!=(e=ge(e))&&(Lt(t,n,5),t=t.g,K(e),xt(t,H))})),ir=qn((function(t,e,n){return(5===t.i||2===t.i)&&(e=Re(e,Rt(e),n,2,!1),2==t.i?vt(t,st,e):e.push(st(t.g)),!0)}),(function(t,e,n){if(null!=(e=wn(ge,e))&&e.length){Lt(t,n,2),Pt(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,K(e[r]),xt(n,H)}})),or=Hn((function(t,e,n){return 0===t.i&&(Jn(e,n,nt(t.g,X)),!0)}),Kn),sr=Hn((function(t,e,n){return 0===t.i&&(Jn(e,n,0===(t=nt(t.g,X))?void 0:t),!0)}),Kn),ar=Hn((function(t,e,n){return 0===t.i&&(Jn(e,n,nt(t.g,Y)),!0)}),(function(t,e,n){t:if(null!=e){if(ye(e)){if("string"==typeof e){var r=Math.trunc(Number(e));Number.isSafeInteger(r)&&r>=0?e=String(r):(-1!==(r=e.indexOf("."))&&(e=e.substring(0,r)),be(e)||(tt(e),e=Q(H,q)));break t}if("number"==typeof e){e=(e=Math.trunc(e))>=0&&Number.isSafeInteger(e)?e:function(t){if(t<0){J(t);const e=Q(H,q);return t=Number(e),Number.isSafeInteger(t)?t:e}return be(String(t))?t:(J(t),Y(H,q))}(e);break t}}e=void 0}null!=e&&("string"==typeof e&&wt(e),null!=e&&(Lt(t,n,0),"number"==typeof e?(t=t.g,J(e),It(t,H,q)):(n=wt(e),It(t.g,n.i,n.g))))})),ur=Hn((function(t,e,n){return 0===t.i&&(Jn(e,n,it(t.g)),!0)}),Yn),cr=qn((function(t,e,n){return(0===t.i||2===t.i)&&(e=Re(e,Rt(e),n,2,!1),2==t.i?vt(t,it,e):e.push(it(t.g)),!0)}),(function(t,e,n){if(null!=(e=wn(ve,e))&&e.length){n=Bt(t,n);for(let n=0;n<e.length;n++)Ut(t.g,e[n]);Vt(t,n)}})),lr=Hn((function(t,e,n){return 0===t.i&&(Jn(e,n,0===(t=it(t.g))?void 0:t),!0)}),Yn),hr=Hn((function(t,e,n){return 0===t.i&&(Jn(e,n,rt(t.g)),!0)}),Xn),fr=Hn((function(t,e,n){return 0===t.i&&(Jn(e,n,!1===(t=rt(t.g))?void 0:t),!0)}),Xn),dr=qn((function(t,e,n){return 2===t.i&&(Xe(e,n,Qe,t=mt(t)),!0)}),(function(t,e,n){if(null!=(e=wn(Ee,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&kt(r,i,c(o))}})),gr=Hn((function(t,e,n){return 2===t.i&&(Jn(e,n,""===(t=mt(t))?void 0:t),!0)}),Qn),pr=Hn((function(t,e,n){return 2===t.i&&(Jn(e,n,mt(t)),!0)}),Qn),mr=new jt((function(t,e,n,r,i){return 2===t.i&&(pt(t,en(e,r,n,!0),i),!0)}),Zn,!1,!0),yr=new jt((function(t,e,n,r,i){return 2===t.i&&(pt(t,en(e,r,n),i),!0)}),Zn,!1,!0);er=new jt((function(t,e,n,r,i){if(2!==t.i)return!1;r=Oe(void 0,r[0],r[1]);let o=Rt(e);ie(o);let s=Re(e,o,n,3);return o=Rt(e),4&Wt(s)&&(s=Ft(s),Ht(s,-2079&(1|Wt(s))),We(e,o,n,s)),s.push(r),pt(t,r,i),!0}),(function(t,e,n,r,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)Zn(t,e[o],n,r,i)}),!0,!0);var vr=new jt((function(t,e,n,r,i,o){if(2!==t.i)return!1;let s=Rt(e);return ie(s),(o=tn(e,s,o))&&n!==o&&We(e,s,o),pt(t,e=en(e,r,n),i),!0}),Zn,!1,!0),br=Hn((function(t,e,n){return 2===t.i&&(Jn(e,n,yt(t)),!0)}),tr),wr=Hn((function(t,e,n){return 0===t.i&&(Jn(e,n,it(t.g)),!0)}),(function(t,e,n){null!=(e=ve(e))&&(e=parseInt(e,10),Lt(t,n,0),Ut(t.g,e))})),_r=qn((function(t,e,n){return(0===t.i||2===t.i)&&(e=Re(e,Rt(e),n,2,!1),2==t.i?vt(t,at,e):e.push(it(t.g)),!0)}),(function(t,e,n){if(null!=(e=wn(ve,e))&&e.length){n=Bt(t,n);for(let n=0;n<e.length;n++)Ut(t.g,e[n]);Vt(t,n)}}));class Ar{constructor(t,e){this.i=t,this.g=e,this.j=an,this.defaultValue=void 0}}function Sr(t,e){return(n,r)=>{if(bt.length){const t=bt.pop();t.o(r),ut(t.g,n,r),n=t}else n=new class{constructor(t,e){if(ft.length){const n=ft.pop();ut(n,t,e),t=n}else t=new class{constructor(t,e){this.i=null,this.m=!1,this.g=this.j=this.s=0,ut(this,t,e)}clear(){this.i=null,this.m=!1,this.g=this.j=this.s=0,this.D=!1}}(t,e);this.g=t,this.j=this.g.g,this.i=this.m=-1,this.o(e)}o({I:t=!1}={}){this.I=t}}(n,r);try{const r=new t,o=r.l;An(e)(o,n);var i=r}finally{n.g.clear(),n.m=-1,n.i=-1,bt.length<100&&bt.push(n)}return i}}var Er=[0,gr,Hn((function(t,e,n){return 2===t.i&&(Jn(e,n,(t=yt(t))===F()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof yn){const r=e.P;return void(r&&(e=r(e),null!=e&&kt(t,n,$(e).buffer)))}if(Array.isArray(e))return}tr(t,e,n)}))],Tr=[0,pr],Ir=[0,ur,wr,hr,-1,cr,wr,-1],Pr=[0,hr,-1],Ur=class extends yn{constructor(){super()}};Ur.u=[6];var xr=[0,hr,pr,hr,wr,-1,_r,pr,-1,Pr,wr],Or=[0,pr,-2],Lr=class extends yn{constructor(){super()}},Br=[0],Vr=[0,ur,hr,1,hr,-3],kr=class extends yn{constructor(t){super(t,2)}},jr={},Fr=[-2,jr,hr];jr[336783863]=[0,pr,hr,-1,ur,[0,[1,2,3,4,5,6],vr,Br,vr,xr,vr,Or,vr,Vr,vr,Ir,vr,[0,pr]],Tr,hr,[0,[1,3],[2,4],vr,[0,cr],-1,vr,[0,dr],-1,er,[0,pr,-1]],pr];var Nr=[0,gr,fr],Mr=[0,sr,-1,fr,-3,sr,cr,gr,lr,sr,-1,fr,lr,fr,-2,gr],Dr=[-1,{}],Cr=[0,pr,1,Dr],Gr=[0,pr,dr,Dr],$r=class extends yn{constructor(t){super(t,500)}o(t){return an(this,0,7,t)}};$r.u=[3,4,5,6,8,13,17,1005];var zr,Wr=[-500,gr,-1,dr,-3,Fr,er,Er,lr,-1,Cr,Gr,er,Nr,gr,Mr,lr,dr,987,dr],Rr=[0,gr,-1,Dr],Hr=[-500,pr,-1,[-1,{}],998,pr],qr=[-500,pr,dr,-1,[-2,{},hr],997,dr,-1],Jr=[-500,pr,dr,Dr,998,dr],Kr=class extends yn{constructor(){super(void 0,500)}o(t){return an(this,0,1001,t)}};Kr.u=[1,6,7,9,10,15,16,17,14,1002],Kr.prototype.g=(zr=[-500,er,Wr,4,er,Hr,er,qr,lr,er,Jr,dr,lr,Cr,Gr,er,Rr,dr,-2,Mr,gr,-1,fr,979,Dr,er,Er],function(){const t=new class{constructor(){this.j=[],this.i=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};Rn(this.l,t,Mn(zr)),Ot(t,t.g.end());const e=new Uint8Array(t.i),n=t.j,r=n.length;let i=0;for(let t=0;t<r;t++){const r=n[t];e.set(r,i),i+=r.length}return t.j=[e],e});var Yr=class extends yn{constructor(t){super(t)}},Xr=[0,ur,rr,pr,-1],Qr=class extends yn{constructor(t){super(t)}g(){return sn(this,Yr)}};Qr.u=[1];var Zr=[0,er,Xr],ti=class extends yn{constructor(t){super(t)}};ti.u=[4,5];var ei=class extends yn{constructor(t){super(t)}},ni=[1,2,3,4,5],ri=class extends yn{constructor(t){super(t)}g(){return null!=He(this)}i(){return null!=Ee(Ce(this,2))}},ii=class extends yn{constructor(t){super(t)}},oi=[0,[0,br,pr,[0,ur,or,-1],[0,ar,or]],hr,[0,ni,vr,Vr,vr,xr,vr,Ir,vr,Br,vr,Or],wr],si=class extends yn{constructor(t){super(t)}},ai=new Ar(451755788,si);jr[451755788]=[0,oi,[0,pr,ur,rr,dr,-1],nr];var ui=class extends yn{constructor(t){super(t)}},ci=class extends yn{constructor(t){super(t)}},li=new Ar(487277289,ci);jr[487277289]=[0,oi,[0,hr,-1]];var hi=class extends yn{constructor(t){super(t)}},fi=[0,1,ur,pr,Zr],di=class extends yn{constructor(t){super(t)}};di.u=[1];var gi=Sr(di,[0,er,fi,or]),pi=class extends yn{constructor(t){super(t)}};pi.u=[1];var mi=class extends yn{constructor(t){super(t)}K(){const t=He(this);return null==t?F():t}},yi=class extends yn{constructor(t){super(t)}},vi=[1,2],bi=[0,vi,vr,[0,ir],vr,[0,br],ur,pr],wi=class extends yn{constructor(t){super(t)}};wi.u=[1];var _i=Sr(wi,[0,er,bi,or]);function Ai(){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 Si(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}function Ei(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.h.stringToNewUTF8(e)),t.h._free(e)}function Ti(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.h.stringToNewUTF8(e[n]);e=t.h._malloc(4*r.length),t.h.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.h._free(e);t.h._free(e)}function Ii(t,e,n){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=n}function Pi(t,e,n){let r=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}const Ui=function(t){return class extends t{N(){this.h._registerModelResourcesGraphService()}}}(class{constructor(t,e){this.j=!0,this.h=t,this.g=null,this.i=0,this.m="function"==typeof this.h._addIntToInputStream,void 0!==e?this.h.canvas=e:Ai()?this.h.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.h.canvas=document.createElement("canvas"))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.h._malloc(n);this.h.HEAPU8.set(t,r),e?this.h._changeBinaryGraph(n,r):this.h._changeTextGraph(n,r),this.h._free(r)}configureAudio(t,e,n,r,i){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Ei(this,r||"input_audio",(r=>{Ei(this,i=i||"audio_header",(i=>{this.h._configureAudio(r,i,t,e,n)}))}))}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.h._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.h.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.h.errorListener=t}attachEmptyPacketListener(t,e){this.h.emptyPacketListeners=this.h.emptyPacketListeners||{},this.h.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const o=4*t.length;this.i!==o&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(o),this.i=o),this.h.HEAPF32.set(t,this.g/4),Ei(this,r,(t=>{this.h._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){Ei(this,e,(e=>{if(!this.h.canvas)throw Error("No OpenGL canvas configured.");e?this.h._bindTextureToStream(e):this.h._bindTextureToCanvas();const r=this.h.canvas.getContext("webgl2")||this.h.canvas.getContext("webgl");if(!r)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");this.h.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),this.h.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);const[i,o]=void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height];!this.j||i===this.h.canvas.width&&o===this.h.canvas.height||(this.h.canvas.width=i,this.h.canvas.height=o);const[s,a]=[i,o];this.h._addBoundTextureToStream(e,s,a,n)}))}addBoolToStream(t,e,n){Ei(this,e,(e=>{this.h._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){Ei(this,e,(e=>{this.h._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){Ei(this,e,(e=>{this.h._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){Ei(this,e,(e=>{this.h._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){Ei(this,e,(e=>{this.h._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){Ei(this,e,(e=>{Ei(this,t,(t=>{this.h._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){Ei(this,e,(e=>{Ti(this,Object.keys(t),(r=>{Ti(this,Object.values(t),(i=>{this.h._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){Ei(this,n,(n=>{Ei(this,e,(e=>{const i=this.h._malloc(t.length);this.h.HEAPU8.set(t,i),this.h._addProtoToInputStream(i,t.length,e,n,r),this.h._free(i)}))}))}addEmptyPacketToStream(t,e){Ei(this,t,(t=>{this.h._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){Ei(this,e,(e=>{const r=this.h._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.h._addBoolVectorEntry(r,e);this.h._addBoolVectorToInputStream(r,e,n)}))}addDoubleVectorToStream(t,e,n){Ei(this,e,(e=>{const r=this.h._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.h._addDoubleVectorEntry(r,e);this.h._addDoubleVectorToInputStream(r,e,n)}))}addFloatVectorToStream(t,e,n){Ei(this,e,(e=>{const r=this.h._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.h._addFloatVectorEntry(r,e);this.h._addFloatVectorToInputStream(r,e,n)}))}addIntVectorToStream(t,e,n){Ei(this,e,(e=>{const r=this.h._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.h._addIntVectorEntry(r,e);this.h._addIntVectorToInputStream(r,e,n)}))}addUintVectorToStream(t,e,n){Ei(this,e,(e=>{const r=this.h._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.h._addUintVectorEntry(r,e);this.h._addUintVectorToInputStream(r,e,n)}))}addStringVectorToStream(t,e,n){Ei(this,e,(e=>{const r=this.h._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const e of t)Ei(this,e,(t=>{this.h._addStringVectorEntry(r,t)}));this.h._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){Ei(this,e,(e=>{this.h._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){Ei(this,e,(e=>{this.h._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){Ei(this,e,(e=>{this.h._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){Ei(this,e,(e=>{this.h._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){Ei(this,e,(e=>{this.h._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){Ei(this,e,(e=>{Ei(this,t,(t=>{this.h._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){Ei(this,n,(n=>{Ei(this,e,(e=>{const r=this.h._malloc(t.length);this.h.HEAPU8.set(t,r),this.h._addProtoToInputSidePacket(r,t.length,e,n),this.h._free(r)}))}))}addBoolVectorToInputSidePacket(t,e){Ei(this,e,(e=>{const n=this.h._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.h._addBoolVectorEntry(n,e);this.h._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){Ei(this,e,(e=>{const n=this.h._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.h._addDoubleVectorEntry(n,e);this.h._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){Ei(this,e,(e=>{const n=this.h._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.h._addFloatVectorEntry(n,e);this.h._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){Ei(this,e,(e=>{const n=this.h._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.h._addIntVectorEntry(n,e);this.h._addIntVectorToInputSidePacket(n,e)}))}addUintVectorToInputSidePacket(t,e){Ei(this,e,(e=>{const n=this.h._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.h._addUintVectorEntry(n,e);this.h._addUintVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){Ei(this,e,(e=>{const n=this.h._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)Ei(this,e,(t=>{this.h._addStringVectorEntry(n,t)}));this.h._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Ii(this,t,e),Ei(this,t,(t=>{this.h._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Pi(this,t,e),Ei(this,t,(t=>{this.h._attachBoolVectorListener(t)}))}attachIntListener(t,e){Ii(this,t,e),Ei(this,t,(t=>{this.h._attachIntListener(t)}))}attachIntVectorListener(t,e){Pi(this,t,e),Ei(this,t,(t=>{this.h._attachIntVectorListener(t)}))}attachUintListener(t,e){Ii(this,t,e),Ei(this,t,(t=>{this.h._attachUintListener(t)}))}attachUintVectorListener(t,e){Pi(this,t,e),Ei(this,t,(t=>{this.h._attachUintVectorListener(t)}))}attachDoubleListener(t,e){Ii(this,t,e),Ei(this,t,(t=>{this.h._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Pi(this,t,e),Ei(this,t,(t=>{this.h._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Ii(this,t,e),Ei(this,t,(t=>{this.h._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Pi(this,t,e),Ei(this,t,(t=>{this.h._attachFloatVectorListener(t)}))}attachStringListener(t,e){Ii(this,t,e),Ei(this,t,(t=>{this.h._attachStringListener(t)}))}attachStringVectorListener(t,e){Pi(this,t,e),Ei(this,t,(t=>{this.h._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Ii(this,t,e),Ei(this,t,(t=>{this.h._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Pi(this,t,e),Ei(this,t,(t=>{this.h._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.h._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Ii(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),Ei(this,t,(t=>{this.h._attachAudioListener(t,n||!1)}))}finishProcessing(){this.h._waitUntilIdle()}closeGraph(){this.h._closeGraph(),this.h.simpleListeners=void 0,this.h.emptyPacketListeners=void 0}});var xi=class extends Ui{};async function Oi(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await Si(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await Si(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&r&&((e=self.Module).locateFile=r.locateFile,r.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=r.mainScriptUrlOrBlob)),r=await self.ModuleFactory(self.Module||r),self.ModuleFactory=self.Module=void 0,new t(r,null)})(t,e.wasmLoaderPath,e.assetLoaderPath,{locateFile:t=>t.endsWith(".wasm")?e.wasmBinaryPath.toString():e.assetBinaryPath&&t.endsWith(".data")?e.assetBinaryPath.toString():t}),await t.o(n),t}async function Li(t,e,n){return Oi(t,e,n)}function Bi(t,e){const n=rn(t.baseOptions,ri,1)||new ri;"string"==typeof e?(ze(n,2,Se(e)),ze(n,1)):e instanceof Uint8Array&&(ze(n,1,ee(e,!1,!1)),ze(n,2)),an(t.baseOptions,0,1,n)}function Vi(t,e){const n=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(rn(t.baseOptions,ri,1)?.g()||rn(t.baseOptions,ri,1)?.i()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=rn(t.baseOptions,ei,3);if(!n){var r=n=new ei;un(r,4,new Lr)}"delegate"in e&&("GPU"===e.delegate?un(e=n,2,r=new Ur):un(e=n,4,r=new Lr)),an(t.baseOptions,0,3,n)}(t,n),n.modelAssetPath)return fetch(n.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${n.modelAssetPath} (${t.status})`)})).then((e=>{try{t.g.h.FS_unlink("/model.dat")}catch{}t.g.h.FS_createDataFile("/","model.dat",new Uint8Array(e),!0,!1,!1),Bi(t,"/model.dat"),t.B()}));if(n.modelAssetBuffer instanceof Uint8Array)Bi(t,n.modelAssetBuffer);else if(n.modelAssetBuffer)return async function(t){const e=[];for(var n=0;;){const{done:r,value:i}=await t.read();if(r)break;e.push(i),n+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(n),n=0;for(const r of e)t.set(r,n),n+=r.length;return t}(n.modelAssetBuffer).then((e=>{Bi(t,e),t.B()}));return t.B(),Promise.resolve()}function ki(t){try{const e=t.j.length;if(1===e)throw Error(t.j[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.j.map((t=>t.message)).join(", "))}finally{t.j=[]}}function ji(t,e){t.s=Math.max(t.s,e)}var Fi=class{constructor(t){this.g=t,this.j=[],this.s=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.j.push(Error(e))})),this.g.N(),this.g.setGraph(t,e),ki(this)}finishProcessing(){this.g.finishProcessing(),ki(this)}close(){this.g.closeGraph()}};async function Ni(t,e,n){return Li(t,e,n)}Fi.prototype.close=Fi.prototype.close,function(e,n){e=e.split(".");var r,i=t;e[0]in i||void 0===i.execScript||i.execScript("var "+e[0]);for(;e.length&&(r=e.shift());)e.length||void 0===n?i=i[r]&&i[r]!==Object.prototype[r]?i[r]:i[r]={}:i[r]=n}("TaskRunner",Fi);var Mi=class extends Fi{constructor(){super(...arguments),this.H=48e3}O(t){this.H=t}};function Di(t){const e={classifications:sn(t,hi).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=ve(Ce(t,1))??0??-1;const n=t.l;let r=Rt(n);const i=$e(n,r,2),o=ge(i);return null!=o&&o!==i&&We(n,r,2,o),{index:e,score:o??0??0,categoryName:dn(Ee(Ce(t,3)),"")??"",displayName:dn(Ee(Ce(t,4)),"")??""}})),headIndex:e,headName:n}}(rn(t,Qr,4)?.g()??[],ve(Ce(t,2))??0,dn(Ee(Ce(t,3)),""))))};return null!=fn(t)&&(e.timestampMs=dn(fn(t),0)),e}Mi.prototype.setDefaultSampleRate=Mi.prototype.O;var Ci=class extends Mi{constructor(t,e){super(new xi(t,e)),this.m=[],an(t=this.i=new si,0,1,e=new ii)}get baseOptions(){return rn(this.i,ii,1)}set baseOptions(t){an(this.i,0,1,t)}o(t){var e=this.i,n=rn(this.i,ti,2);if(n=n?je(n):new ti,void 0!==t.displayNamesLocale?ze(n,1,Se(t.displayNamesLocale)):void 0===t.displayNamesLocale&&ze(n,1),void 0!==t.maxResults){var r=t.maxResults;if(null!=r){if("number"!=typeof r)throw de();if(!Number.isFinite(r))throw de();r|=0}ze(n,2,r)}else"maxResults"in t&&ze(n,2);if(void 0!==t.scoreThreshold){if(null!=(r=t.scoreThreshold)&&"number"!=typeof r)throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);ze(n,3,r)}else"scoreThreshold"in t&&ze(n,3);return void 0!==t.categoryAllowlist?gn(n,4,t.categoryAllowlist):"categoryAllowlist"in t&&ze(n,4),void 0!==t.categoryDenylist?gn(n,5,t.categoryDenylist):"categoryDenylist"in t&&ze(n,5),an(e,0,2,n),Vi(this,t)}L(t,e){return this.G(t,e??this.H,this.s+1)}G(t,e,n){return this.g.addDoubleToStream(e,"sample_rate",n),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",n),this.m=[],this.finishProcessing(),[...this.m]}B(){var t=new Kr;pn(t,10,"audio_in"),pn(t,10,"sample_rate"),pn(t,15,"timestamped_classifications");const e=new kr;mn(e,ai,this.i);const n=new $r;Ye(n,Se("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph")),pn(n,3,"AUDIO:audio_in"),pn(n,3,"SAMPLE_RATE:sample_rate"),pn(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.o(e),hn(t,n),this.g.attachProtoVectorListener("timestamped_classifications",((t,e)=>{!function(t,e){e.forEach((e=>{e=gi(e),t.m.push(Di(e))}))}(this,t),ji(this,e)})),this.g.attachEmptyPacketListener("timestamped_classifications",(t=>{ji(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Gi(t){return{embeddings:sn(t,yi).map((t=>{const e={headIndex:ve(Ce(t,3))??0??-1,headName:dn(Ee(Ce(t,4)),"")??""};if(void 0!==nn(t,pi,Ze(t,1))){var n=rn(t,pi,Ze(t,1));t=n.l;var r=Rt(t);const s=2&r?1:2;let a=qe(t,r);var i=Wt(a);if(De(n,i,void 0,!1)){(4&i||Object.isFrozen(a))&&(a=Ft(a),i=cn(i,r),r=We(t,r,1,a));for(var o=n=0;n<a.length;n++){const t=ge(a[n]);null!=t&&(a[o++]=t)}o<n&&(a.length=o),i=zt(i=Je(i,r),20,!0),i=zt(i,4096,!1),i=zt(i,8192,!1),Ht(a,i),2&i&&Object.freeze(a)}Ke(i)||(n=i,(i=(o=1===s||4===s&&!!(32&i))?zt(i,2,!0):ln(i,r,!1))!==n&&Ht(a,i),o&&Object.freeze(a)),2===s&&Ke(i)&&(a=Ft(a),i=ln(i=cn(i,r),r,!1),Ht(a,i),We(t,r,1,a)),e.floatEmbedding=a.slice()}else r=new Uint8Array(0),e.quantizedEmbedding=rn(t,mi,Ze(t,2))?.K()?.i()??r;return e})),timestampMs:dn(fn(t),0)}}Ci.prototype.classify=Ci.prototype.L,Ci.prototype.setOptions=Ci.prototype.o,Ci.createFromModelPath=function(t,e){return Li(Ci,t,{baseOptions:{modelAssetPath:e}})},Ci.createFromModelBuffer=function(t,e){return Ni(Ci,t,{baseOptions:{modelAssetBuffer:e}})},Ci.createFromOptions=function(t,e){return Ni(Ci,t,e)};var $i=class extends Mi{constructor(t,e){super(new xi(t,e)),this.m=[],an(t=this.i=new ci,0,1,e=new ii)}get baseOptions(){return rn(this.i,ii,1)}set baseOptions(t){an(this.i,0,1,t)}o(t){var e=this.i,n=rn(this.i,ui,2);return n=n?je(n):new ui,void 0!==t.l2Normalize?ze(n,1,pe(t.l2Normalize)):"l2Normalize"in t&&ze(n,1),void 0!==t.quantize?ze(n,2,pe(t.quantize)):"quantize"in t&&ze(n,2),an(e,0,2,n),Vi(this,t)}M(t,e){return this.G(t,e??this.H,this.s+1)}G(t,e,n){return this.g.addDoubleToStream(e,"sample_rate",n),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",n),this.m=[],this.finishProcessing(),this.m}B(){var t=new Kr;pn(t,10,"audio_in"),pn(t,10,"sample_rate"),pn(t,15,"embeddings_out"),pn(t,15,"timestamped_embeddings_out");const e=new kr;mn(e,li,this.i);const n=new $r;Ye(n,Se("mediapipe.tasks.audio.audio_embedder.AudioEmbedderGraph")),pn(n,3,"AUDIO:audio_in"),pn(n,3,"SAMPLE_RATE:sample_rate"),pn(n,4,"EMBEDDINGS:embeddings_out"),pn(n,4,"TIMESTAMPED_EMBEDDINGS:timestamped_embeddings_out"),n.o(e),hn(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=_i(t),this.m.push(Gi(t)),ji(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{ji(this,t)})),this.g.attachProtoVectorListener("timestamped_embeddings_out",((t,e)=>{for(const e of t)t=_i(e),this.m.push(Gi(t));ji(this,e)})),this.g.attachEmptyPacketListener("timestamped_embeddings_out",(t=>{ji(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};let zi;$i.prototype.embed=$i.prototype.M,$i.prototype.setOptions=$i.prototype.o,$i.createFromModelPath=function(t,e){return Ni($i,t,{baseOptions:{modelAssetPath:e}})},$i.createFromModelBuffer=function(t,e){return Ni($i,t,{baseOptions:{modelAssetBuffer:e}})},$i.createFromOptions=function(t,e){return Ni($i,t,e)};const Wi=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 Ri(){if(void 0===zi)try{await WebAssembly.instantiate(Wi),zi=!0}catch{zi=!1}return zi}async function Hi(t,e=""){const n=await Ri()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var qi=class{};qi.forVisionTasks=function(t){return Hi("vision",t)},qi.forTextTasks=function(t){return Hi("text",t)},qi.forGenAiExperimentalTasks=function(t){return Hi("genai_experimental",t)},qi.forGenAiTasks=function(t){return Hi("genai",t)},qi.forAudioTasks=function(t){return Hi("audio",t)},qi.isSimdSupported=function(){return Ri()},exports.AudioClassifier=Ci,exports.AudioEmbedder=$i,exports.AudioTaskRunner=Mi,exports.FilesetResolver=qi;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof self?self:{};function e(e){t:{for(var n=["CLOSURE_FLAGS"],r=t,i=0;i<n.length;i++)if(null==(r=r[n[i]])){n=null;break t}n=r}return null!=(e=n&&n[e])&&e}function n(){throw Error("Invalid UTF8")}function r(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let i,o;const s="undefined"!=typeof TextDecoder;let a;const u="undefined"!=typeof TextEncoder;function c(t){if(u)t=(a||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)r[n++]=e;else{if(e<2048)r[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){const o=t.charCodeAt(++i);if(o>=56320&&o<=57343){e=1024*(e-55296)+o-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var l,h=e(610401301),f=e(188588736);const d=t.navigator;function g(t){return!!h&&(!!l&&l.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function p(e){var n;return(n=t.navigator)&&(n=n.userAgent)||(n=""),-1!=n.indexOf(e)}function m(){return!!h&&(!!l&&l.brands.length>0)}function y(){return m()?g("Chromium"):(p("Chrome")||p("CriOS"))&&!(!m()&&p("Edge"))||p("Silk")}l=d&&d.userAgentData||null;var v=!m()&&(p("Trident")||p("MSIE"));!p("Android")||y(),y(),p("Safari")&&(y()||!m()&&p("Coast")||!m()&&p("Opera")||!m()&&p("Edge")||(m()?g("Microsoft Edge"):p("Edg/"))||m()&&g("Opera"));var b={},w=null;function _(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=w[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}A();for(var r=0;;){var i=n(-1),o=n(0),s=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|o>>4),64!=s&&(e(o<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}function A(){if(!w){w={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;n<5;n++){var r=t.concat(e[n].split(""));b[n]=r;for(var i=0;i<r.length;i++){var o=r[i];void 0===w[o]&&(w[o]=i)}}}}var S="undefined"!=typeof Uint8Array,E=!v&&"function"==typeof btoa;function T(t){if(!E){var e;void 0===e&&(e=0),A(),e=b[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let u=0,c=0;for(;u<t.length-2;u+=3){var i=t[u],o=t[u+1],s=t[u+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],n[c++]=a+i+o+s}switch(a=0,s=r,t.length-u){case 2:s=e[(15&(a=t[u+1]))<<2]||r;case 1:t=t[u],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+s+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const I=/[-_.]/g,P={"-":"+",_:"/",".":"="};function U(t){return P[t]||""}function x(t){if(!E)return _(t);I.test(t)&&(t=t.replace(I,U)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function O(t){return S&&null!=t&&t instanceof Uint8Array}var L={};let B;function V(t){if(t!==L)throw Error("illegal external caller")}function k(){return B||=new F(null,L)}function j(t){V(L);var e=t.g;return null==(e=null==e||O(e)?e:"string"==typeof e?x(e):null)?e:t.g=e}var F=class{constructor(t,e){if(V(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}i(){return new Uint8Array(j(this)||0)}};function N(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function M(){return Error("Failed to read varint, encoding is invalid.")}function D(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function C(t){if("string"==typeof t)return{buffer:x(t),v:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),v:!1};if(t.constructor===Uint8Array)return{buffer:t,v:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),v:!1};if(t.constructor===F)return{buffer:j(t)||new Uint8Array(0),v:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),v:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function G(){return"function"==typeof BigInt}const $="function"==typeof Uint8Array.prototype.slice;let z,W=0,R=0;function H(t){const e=t<0;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=Z(n,t);t=r,n=e}W=n>>>0,R=t>>>0}function q(t){const e=z||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),R=0,W=e.getUint32(0,!0)}function J(t,e){return 4294967296*e+(t>>>0)}function K(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=J(t,e),n?-t:t}function Y(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else G()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=Math.floor(t/1e7),t%=1e7),n>=1e7&&(e+=Math.floor(n/1e7),n%=1e7),n=e+X(n)+X(t));return n}function X(t){return t=String(t),"0000000".slice(t.length)+t}function Q(t){if(t.length<16)H(Number(t));else if(G())t=BigInt(t),W=Number(t&BigInt(4294967295))>>>0,R=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);R=W=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));R*=1e6,W=1e6*W+e,W>=4294967296&&(R+=Math.trunc(W/4294967296),R>>>=0,W>>>=0)}if(e){const[t,e]=Z(W,R);W=t,R=e}}}function Z(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function tt(t,e){let n,r=0,i=0,o=0;const s=t.i;let a=t.g;do{n=s[a++],r|=(127&n)<<o,o+=7}while(o<32&&128&n);for(o>32&&(i|=(127&n)>>4),o=3;o<32&&128&n;o+=7)n=s[a++],i|=(127&n)<<o;if(at(t,a),n<128)return e(r>>>0,i>>>0);throw M()}function et(t){let e=0,n=t.g;const r=n+10,i=t.i;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return at(t,n),!!(127&e)}throw M()}function nt(t){const e=t.i;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw M();return at(t,n),i}function rt(t){var e=t.i;const n=t.g,r=e[n],i=e[n+1],o=e[n+2];return e=e[n+3],at(t,t.g+4),(r<<0|i<<8|o<<16|e<<24)>>>0}function it(t){var e=rt(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:t*(1/0):0==n?t*Math.pow(2,-149)*e:t*Math.pow(2,n-150)*(e+Math.pow(2,23))}function ot(t){return nt(t)}function st(t,e,{D:n=!1}={}){t.D=n,e&&(e=C(e),t.i=e.buffer,t.m=e.v,t.s=0,t.j=t.i.length,t.g=t.s)}function at(t,e){if(t.g=e,e>t.j)throw D(t.j,e)}function ut(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.j)throw D(e,t.j-n);return t.g=r,n}function ct(t,e){if(0==e)return k();var n=ut(t,e);return t.D&&t.m?n=t.i.subarray(n,n+e):(t=t.i,n=n===(e=n+e)?new Uint8Array(0):$?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?k():new F(n,L)}var lt=[];function ht(t){var e=t.g;if(e.g==e.j)return!1;t.j=t.g.g;var n=nt(t.g)>>>0;if(e=n>>>3,!((n&=7)>=0&&n<=5))throw N(n,t.j);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.j})`);return t.m=e,t.i=n,!0}function ft(t){switch(t.i){case 0:0!=t.i?ft(t):et(t.g);break;case 1:at(t=t.g,t.g+8);break;case 2:if(2!=t.i)ft(t);else{var e=nt(t.g)>>>0;at(t=t.g,t.g+e)}break;case 5:at(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!ht(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.i){if(t.m!=e)throw Error("Unmatched end-group tag");break}ft(t)}break;default:throw N(t.i,t.j)}}function dt(t,e,n){const r=t.g.j,i=nt(t.g)>>>0,o=t.g.g+i;let s=o-r;if(s<=0&&(t.g.j=o,n(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);t.g.g=o,t.g.j=r}function gt(t){var e=nt(t.g)>>>0,a=ut(t=t.g,e);if(t=t.i,s){var u,c=t;(u=o)||(u=o=new TextDecoder("utf-8",{fatal:!0})),e=a+e,c=0===a&&e===c.length?c:c.subarray(a,e);try{var l=u.decode(c)}catch(t){if(void 0===i){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),i=!0}catch(t){i=!1}}throw!i&&(o=void 0),t}}else{e=(l=a)+e,a=[];let i,o=null;for(;l<e;){var h=t[l++];h<128?a.push(h):h<224?l>=e?n():(i=t[l++],h<194||128!=(192&i)?(l--,n()):a.push((31&h)<<6|63&i)):h<240?l>=e-1?n():(i=t[l++],128!=(192&i)||224===h&&i<160||237===h&&i>=160||128!=(192&(u=t[l++]))?(l--,n()):a.push((15&h)<<12|(63&i)<<6|63&u)):h<=244?l>=e-2?n():(i=t[l++],128!=(192&i)||i-144+(h<<28)>>30!=0||128!=(192&(u=t[l++]))||128!=(192&(c=t[l++]))?(l--,n()):(h=(7&h)<<18|(63&i)<<12|(63&u)<<6|63&c,h-=65536,a.push(55296+(h>>10&1023),56320+(1023&h)))):n(),a.length>=8192&&(o=r(o,a),a.length=0)}l=r(o,a)}return l}function pt(t){const e=nt(t.g)>>>0;return ct(t.g,e)}function mt(t,e,n){var r=nt(t.g)>>>0;for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var yt=[];function vt(t){return t?/^\d+$/.test(t)?(Q(t),new bt(W,R)):null:wt||=new bt(0,0)}var bt=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let wt;function _t(t){return t?/^-?\d+$/.test(t)?(Q(t),new At(W,R)):null:St||=new At(0,0)}var At=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let St;function Et(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Tt(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function It(t,e){if(e>=0)Tt(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Pt(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Ut(t,e){0!==e.length&&(t.j.push(e),t.i+=e.length)}function xt(t,e,n){Tt(t.g,8*e+n)}function Ot(t,e){return xt(t,e,2),e=t.g.end(),Ut(t,e),e.push(t.i),e}function Lt(t,e){var n=e.pop();for(n=t.i+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.i++;e.push(n),t.i++}function Bt(t,e,n){xt(t,e,2),Tt(t.g,n.length),Ut(t,t.g.end()),Ut(t,n)}class Vt{constructor(t,e,n,r){this.g=t,this.i=e,this.j=n,this.J=r}}function kt(t){return Array.prototype.slice.call(t)}function jt(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():t}var Ft=jt(),Nt=jt("2ex"),Mt=jt("0dg"),Dt=Ft?(t,e)=>{t[Ft]|=e}:(t,e)=>{void 0!==t.g?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})},Ct=Ft?(t,e)=>{t[Ft]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)};function Gt(t,e,n){return n?t|e:t&~e}var $t=Ft?t=>0|t[Ft]:t=>0|t.g,zt=Ft?t=>t[Ft]:t=>t.g,Wt=Ft?(t,e)=>(t[Ft]=e,t):(t,e)=>(void 0!==t.g?t.g=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}}),t);function Rt(t,e){Wt(e,-14591&(0|t))}function Ht(t,e){Wt(e,-14557&(34|t))}function qt(t){return 0===(t=t>>14&1023)?536870912:t}var Jt,Kt={},Yt={};function Xt(t){return!(!t||"object"!=typeof t||t.g!==Yt)}function Qt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function Zt(t,e,n){if(null!=t)if("string"==typeof t)t=t?new F(t,L):k();else if(t.constructor!==F)if(O(t))t=t.length?new F(n?t:new Uint8Array(t),L):k();else{if(!e)throw Error();t=void 0}return t}function te(t,e,n){if(!Array.isArray(t)||t.length)return!1;const r=$t(t);return!!(1&r)||!(!e||!(Array.isArray(e)?e.includes(n):e.has(n)))&&(Wt(t,1|r),!0)}const ee=[];function ne(t){if(2&t)throw Error()}let re,ie;function oe(t,e){(e=re?e[re]:void 0)&&(t[re]=kt(e))}Wt(ee,55),Jt=Object.freeze(ee);class se{}Object.freeze(new class{}),Object.freeze(new se);var ae=Object.freeze(new se);function ue(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}let ce;function le(){const e=Error();ue(e,"incident"),function(e){t.setTimeout((()=>{throw e}),0)}(e)}function he(){const t=Error("int32");return ue(t,"warning"),t}function fe(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function de(t){if(null!=t&&"boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}const ge=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function pe(t){const e=typeof t;return"number"===e?Number.isFinite(t):"string"===e&&ge.test(t)}function me(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t&&Number.isFinite(t)?0|t:void 0}function ye(t){return"-"!==t[0]&&(t.length<20||20===t.length&&Number(t.substring(0,6))<184467)}function ve(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(H(t),t=K(W,R)),t}function be(t){var e=Math.trunc(Number(t));if(Number.isSafeInteger(e))return String(e);if(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),!("-"===t[0]?t.length<20||20===t.length&&Number(t.substring(0,7))>-922337:t.length<19||19===t.length&&Number(t.substring(0,6))<922337))if(Q(t),t=W,2147483648&(e=R))if(G())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=Z(t,e);t="-"+Y(n,r)}else t=Y(t,e);return t}function we(t){if("string"!=typeof t)throw Error();return t}function _e(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function Ae(t){return null==t||"string"==typeof t?t:void 0}function Se(t,e,n){if(null!=t&&"object"==typeof t&&t.C===Kt)return t;if(Array.isArray(t)){var r=$t(t),i=r;return 0===i&&(i|=32&n),(i|=2&n)!==r&&Wt(t,i),new e(t)}}let Ee,Te,Ie;function Pe(t){switch(typeof t){case"boolean":return Te||=[0,void 0,!0];case"number":return t>0?void 0:0===t?Ie||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function Ue(t,e,n){if(null==t&&(t=Ee),Ee=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-16760833&r|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(2048&(r=$t(t)))throw Error("farr");if(64&r)return t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error("mid");t:{const i=(n=t).length;if(i){const t=i-1;if(Qt(n[t])){if((e=t-(+!!(512&(r|=256))-1))>=1024)throw Error("pvtlmt");r=-16760833&r|(1023&e)<<14;break t}}if(e){if((e=Math.max(e,i-(+!!(512&r)-1)))>1024)throw Error("spvt");r=-16760833&r|(1023&e)<<14}}}return Wt(t,r),t}function xe(t,e,n,r,i){if(null!=t){if(Array.isArray(t))t=te(t,void 0,0)?void 0:i&&2&$t(t)?t:Oe(t,e,n,void 0!==r,i);else if(Qt(t)){const o={};for(let s in t)o[s]=xe(t[s],e,n,r,i);t=o}else t=e(t,r);return t}}function Oe(t,e,n,r,i){const o=r||n?$t(t):0;r=r?!!(32&o):void 0;const s=kt(t);for(let t=0;t<s.length;t++)s[t]=xe(s[t],e,n,r,i);return n&&(oe(s,t),n(o,s)),s}function Le(t){return t.C===Kt?t.toJSON():function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t)if(Array.isArray(t)){if(te(t,void 0,0))return}else{if(O(t))return T(t);if(t instanceof F){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=T(e)}}}return t}(t)}function Be(t,e,n=Ht){if(null!=t){if(S&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=$t(t);return 2&r||(e&&=0===r||!!(32&r)&&!(64&r||!(16&r)),t=e?Wt(t,-12293&(34|r)):Oe(t,Be,4&r?Ht:n,!0,!0)),t}return t.C===Kt&&(n=t.l,t=2&(r=zt(n))?t:ke(t,n,r,!0)),t}}function Ve(t){const e=t.l;return ke(t,e,zt(e),!1)}function ke(t,e,n,r){return t=t.constructor,Ee=e=je(e,n,r),e=new t(e),Ee=void 0,e}function je(t,e,n){const r=n||2&e?Ht:Rt,i=!!(32&e);return t=function(t,e,n){const r=kt(t);var i=r.length;const o=256&e?r[i-1]:void 0;for(i+=o?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(o){e=r[e]={};for(const t in o)e[t]=n(o[t])}return oe(r,t),r}(t,e,(t=>Be(t,i,r))),Dt(t,32|(n?2:0)),t}function Fe(t){const e=t.l,n=zt(e);return 2&n?ke(t,e,n,!1):t}function Ne(t,e,n,r){return!(4&e)||null!=n&&(!r&&0===n&&(4096&e||8192&e)&&(t.constructor[Mt]=1+(0|t.constructor[Mt]))<5&&le(),0!==n&&!(n&e))}function Me(t,e){return Ce(t=t.l,zt(t),e)}function De(t,e,n,r){if(!((e=r+(+!!(512&e)-1))<0||e>=t.length||e>=n))return t[e]}function Ce(t,e,n,r){if(-1===n)return null;const i=qt(e);if(!(n>=i)){var o=t.length;return r&&256&e&&null!=(r=t[o-1][n])?(De(t,e,i,n)&&null!=Nt&&((e=(t=ce??={})[Nt]||0)>=4||(t[Nt]=e+1,le())),r):De(t,e,i,n)}return 256&e?t[t.length-1][n]:void 0}function Ge(t,e,n,r){const i=t.l;let o=zt(i);return ne(o),$e(i,o,e,n,r),t}function $e(t,e,n,r,i){const o=qt(e);if(n>=o||i){let s=e;if(256&e)i=t[t.length-1];else{if(null==r)return s;i=t[o+(+!!(512&e)-1)]={},s|=256}return i[n]=r,n<o&&(t[n+(+!!(512&e)-1)]=void 0),s!==e&&Wt(t,s),s}return t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n]),e}function ze(t,e,n,r,i){var o=2&e;let s=Ce(t,e,n,i);Array.isArray(s)||(s=Jt);const a=!(2&r);r=!(1&r);const u=!!(32&e);let c=$t(s);return 0!==c||!u||o||a?1&c||(c|=1,Wt(s,c)):(c|=33,Wt(s,c)),o?(t=!1,2&c||(Dt(s,34),t=!!(4&c)),(r||t)&&Object.freeze(s)):(o=!!(2&c)||!!(2048&c),r&&o?(s=kt(s),r=1,u&&!a&&(r|=32),Wt(s,r),$e(t,e,n,s,i)):a&&32&c&&!o&&Ct(s,32)),s}function We(t){t=t.l;let e=zt(t);const n=Ce(t,e,1),r=Zt(n,!0,!!(34&e));return null!=r&&r!==n&&$e(t,e,1,r),r}function Re(t,e){return t=Ce(t,e,1),Array.isArray(t)?t:Jt}function He(t,e){return 0===t&&(t=an(t,e)),Gt(t,1,!0)}function qe(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function Je(t,e){t=t.l;let n=zt(t);ne(n),$e(t,n,2,""===e?void 0:e)}function Ke(t,e,n,r){const i=zt(t);ne(i),t=ze(t,i,e,2),r=n(r,!!(4&(e=$t(t)))&&!!(4096&e)),t.push(r)}function Ye(t){return t}function Xe(t,e){return Qe(t=t.l,zt(t),mi)===e?e:-1}function Qe(t,e,n){let r=0;for(let i=0;i<n.length;i++){const o=n[i];null!=Ce(t,e,o)&&(0!==r&&(e=$e(t,e,r)),r=o)}return r}function Ze(t,e,n,r){let i=zt(t);ne(i);const o=Ce(t,i,n,r);let s;if(null!=o&&o.C===Kt)return(e=Fe(o))!==o&&$e(t,i,n,e,r),e.l;if(Array.isArray(o)){const t=$t(o);s=2&t?je(o,t,!1):o,s=Ue(s,e[0],e[1])}else s=Ue(void 0,e[0],e[1]);return s!==o&&$e(t,i,n,s,r),s}function tn(t,e,n,r){t=t.l;let i=zt(t);const o=Ce(t,i,n,r);return(e=Se(o,e,i))!==o&&null!=e&&$e(t,i,n,e,r),e}function en(t,e,n){if(null==(e=tn(t,e,n,!1)))return e;t=t.l;let r=zt(t);if(!(2&r)){const i=Fe(e);i!==e&&$e(t,r,n,e=i,!1)}return e}function nn(t,e,n,r,i){var o=!!(2&e);const s=o?1:2;r=!!r,i&&=!o,o=Re(t,e);var a=$t(o);const u=!!(4&a);if(!u){var c=o,l=e;const t=!!(2&(a=He(a,e)));t&&(l=Gt(l,2,!0));let r=!t,i=!0,s=0,u=0;for(;s<c.length;s++){const e=Se(c[s],n,l);if(e instanceof n){if(!t){const t=!!(2&$t(e.l));r&&=!t,i&&=t}c[u++]=e}}u<s&&(c.length=u),a=Gt(a,4,!0),a=Gt(a,16,i),a=Gt(a,8,r),Wt(c,a),t&&Object.freeze(c)}if(i&&!(8&a||!o.length&&(1===s||4===s&&32&a))){for(qe(a)&&(o=kt(o),a=an(a,e),e=$e(t,e,1,o)),n=o,i=a,c=0;c<n.length;c++)(a=n[c])!==(l=Fe(a))&&(n[c]=l);i=Gt(i,8,!0),i=Gt(i,16,!n.length),Wt(n,i),a=i}return qe(a)||(n=a,(a=(i=1===s||4===s&&!!(32&a))?Gt(a,!o.length||16&a&&(!u||32&a)?2:2048,!0):un(a,e,r))!==n&&Wt(o,a),i&&Object.freeze(o)),2===s&&qe(a)&&(o=kt(o),a=un(a=an(a,e),e,r),Wt(o,a),$e(t,e,1,o)),o}function rn(t,e){t=t.l;const n=zt(t);return nn(t,n,e,!1,!(2&n))}function on(t,e,n,r,i){return null==r&&(r=void 0),Ge(t,n,r,i)}function sn(t,e,n){var r=ti;null==n&&(n=void 0),t=t.l;let i=zt(t);ne(i),(r=Qe(t,i,r))&&r!==e&&null!=n&&(i=$e(t,i,r)),$e(t,i,e,n)}function an(t,e){return t=Gt(t,2,!!(2&e)),t=Gt(t,32,!0),Gt(t,2048,!1)}function un(t,e,n){return 32&e&&n||(t=Gt(t,32,!1)),t}function cn(t,e){var n=Cr;t=t.l;const r=zt(t);ne(r),t=nn(t,r,n,!0),e=null!=e?e:new n,t.push(e),2&$t(e.l)?Ct(t,8):Ct(t,16)}function ln(t){return null==(t=Me(t,2))?t:pe(t)?"number"==typeof t?ve(t):be(t):void 0}function hn(t,e){return t??e}function fn(t,e,n){{const a=t.l;let u=zt(a);if(ne(u),null==n)$e(a,u,e);else{var r,i=$t(n),o=i,s=!!(2&i)||Object.isFrozen(n);if((r=!s)&&(r=void 0===ae||!1),Ne(t,i))for(i=21,s&&(n=kt(n),o=0,i=un(i=an(i,u),u,!0)),t=0;t<n.length;t++)n[t]=we(n[t]);r&&(n=kt(n),o=0,i=un(i=an(i,u),u,!0)),i!==o&&Wt(n,i),$e(a,u,e,n)}}}function dn(t,e,n){Ke(t.l,e,we,n)}function gn(t,e,n){e.g?e.j(t,e.g,e.i,n,!0):e.j(t,e.i,n,!0)}var pn=class{constructor(t,e){this.l=Ue(t,e)}toJSON(){return mn(this,Oe(this.l,Le,void 0,void 0,!1),!0)}v(){return!!(2&$t(this.l))}};function mn(t,e,n){var r=f?void 0:t.constructor.u;const i=zt(n?t.l:e);if(!(t=e.length))return e;let o,s;if(Qt(n=e[t-1])){t:{var a=n;let t={},e=!1;for(var u in a){let n=a[u];if(Array.isArray(n)){let t=n;(te(n,r,+u)||Xt(n)&&0===n.size)&&(n=null),n!=t&&(e=!0)}null!=n?t[u]=n:e=!0}if(e){for(var c in t){a=t;break t}a=null}}a!=n&&(o=!0),t--}for(u=+!!(512&i)-1;t>0&&(n=e[c=t-1],c-=u,null==n||te(n,r,c)||Xt(n)&&0===n.size);t--)s=!0;return o||s?(e=Array.prototype.slice.call(e,0,t),a&&e.push(a),e):e}function yn(t){return Array.isArray(t)?t[0]instanceof Vt?t:[gr,t]:[t,void 0]}function vn(t,e){if(Array.isArray(e)){var n=$t(e);if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),Wt(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}pn.prototype.C=Kt,pn.prototype.toString=function(){return mn(this,this.l,!1).toString()};const bn=Symbol();function wn(t){let e=t[bn];if(!e){const n=Un(t),r=Cn(t),i=r.j;e=i?(t,e)=>i(t,e,r):(t,e)=>{for(;ht(e)&&4!=e.i;){var i=e.m,o=r[i];if(!o){var s=r.F;s&&(s=s[i])&&(o=r[i]=_n(s))}o&&o(e,t,i)||(i=(o=e).j,ft(o),o.I?o=void 0:(s=o.g.g-i,o.g.g=i,o=ct(o.g,s)),i=t,o&&(re||=Symbol(),(s=i[re])?s.push(o):i[re]=[o]))}n===Sn||n===En||n.s||(t[ie||=Symbol()]=n)},t[bn]=e}return e}function _n(t){const e=(t=yn(t))[0].g;if(t=t[1]){const n=wn(t),r=Cn(t).A;return(t,i,o)=>e(t,i,o,r,n)}return e}class An{}let Sn,En;const Tn=Symbol();function In(t,e,n){const r=n[1];let i;if(r){const n=r[Tn];i=n?n.A:Pe(r[0]),t[e]=n??r}i&&i===Te?(t.g||(t.g=new Set)).add(e):n[0]&&(t.i||(t.i=new Set)).add(e)}function Pn(t,e){return[t.j,!e||e[0]>0?void 0:e]}function Un(t){var e=t[Tn];if(e)return e;if(!(e=On(t,t[Tn]=new An,Pn,Pn,In)).F&&!e.i&&!e.g){let n=!0;for(let t in e)isNaN(t)||(n=!1);n?(Pe(t[0])===Te?En?e=En:((e=new An).A=Pe(!0),e=En=e):e=Sn||=new An,e=t[Tn]=e):e.s=!0}return e}function xn(t,e,n){t[e]=n}function On(t,e,n,r,i=xn){e.A=Pe(t[0]);let o=0;var s=t[++o];s&&s.constructor===Object&&(e.F=s,"function"==typeof(s=t[++o])&&(e.j=s,e.m=t[++o],s=t[++o]));const a={};for(;Array.isArray(s)&&"number"==typeof s[0]&&s[0]>0;){for(var u=0;u<s.length;u++)a[s[u]]=s;s=t[++o]}for(u=1;void 0!==s;){let h;"number"==typeof s&&(u+=s,s=t[++o]);var c=void 0;if(s instanceof Vt?h=s:(h=pr,o--),h.J){s=t[++o],c=t;var l=o;"function"==typeof s&&(s=s(),c[l]=s),c=s}for(l=u+1,"number"==typeof(s=t[++o])&&s<0&&(l-=s,s=t[++o]);u<l;u++){const t=a[u];i(e,u,c?r(h,c,t):n(h,t))}}return e}const Ln=Symbol();function Bn(t){let e=t[Ln];if(!e){const n=Fn(t);e=(t,e)=>zn(t,e,n),t[Ln]=e}return e}const Vn=Symbol();function kn(t){return t.i}function jn(t,e){let n,r;const i=t.i;return(t,o,s)=>i(t,o,s,r||=Fn(e).A,n||=Bn(e))}function Fn(t){let e=t[Vn];return e||(e=On(t,t[Vn]={},kn,jn),Gn(t),e)}const Nn=Symbol();function Mn(t,e){const n=t.g;return e?(t,r,i)=>n(t,r,i,e):n}function Dn(t,e,n){const r=t.g;let i,o;return(t,s,a)=>r(t,s,a,o||=Cn(e).A,i||=wn(e),n)}function Cn(t){let e=t[Nn];return e||(Un(t),e=On(t,t[Nn]={},Mn,Dn),Gn(t),e)}function Gn(t){Nn in t&&Tn in t&&Vn in t&&(t.length=0)}function $n(t,e){var n=t[e];if(n)return n;if((n=t.F)&&(n=n[e])){var r=(n=yn(n))[0].i;if(n=n[1]){const e=Bn(n),i=Fn(n).A;n=(n=t.m)?n(i,e):(t,n,o)=>r(t,n,o,i,e)}else n=r;return t[e]=n}}function zn(t,e,n){for(var r=zt(t),i=+!!(512&r)-1,o=t.length,s=512&r?1:0,a=o+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const o=s-i,a=$n(n,o);a&&a(e,r,o)}if(256&r){r=t[o-1];for(let t in r)i=+t,Number.isNaN(i)||null!=(o=r[t])&&(a=$n(n,i))&&a(e,o,i)}if(t=re?t[re]:void 0)for(Ut(e,e.g.end()),n=0;n<t.length;n++)Ut(e,j(t[n])||new Uint8Array(0))}function Wn(t,e){return new Vt(t,e,!1,!1)}function Rn(t,e){return new Vt(t,e,!0,!1)}function Hn(t,e,n){$e(t,zt(t),e,n)}function qn(t,e,n){t:if(null!=e){if(pe(e)){if("string"==typeof e){e=be(e);break t}if("number"==typeof e){e=ve(e);break t}}e=void 0}null!=e&&("string"==typeof e&&_t(e),null!=e&&(xt(t,n,0),"number"==typeof e?(t=t.g,H(e),Et(t,W,R)):(n=_t(e),Et(t.g,n.i,n.g))))}function Jn(t,e,n){null!=(e=me(e))&&null!=e&&(xt(t,n,0),It(t.g,e))}function Kn(t,e,n){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(xt(t,n,0),t.g.g.push(e?1:0))}function Yn(t,e,n){null!=(e=Ae(e))&&Bt(t,n,c(e))}function Xn(t,e,n,r,i){null!=(e=e instanceof pn?e.l:Array.isArray(e)?Ue(e,r[0],r[1]):void 0)&&(n=Ot(t,n),i(e,t),Lt(t,n))}function Qn(t,e,n){null!=(e=null==e||"string"==typeof e||O(e)||e instanceof F?e:void 0)&&Bt(t,n,C(e).buffer)}var Zn,tr=Wn((function(t,e,n){if(1!==t.i)return!1;var r=t.g;t=rt(r);const i=rt(r);r=2*(i>>31)+1;const o=i>>>20&2047;return t=4294967296*(1048575&i)+t,Hn(e,n,2047==o?t?NaN:r*(1/0):0==o?r*Math.pow(2,-1074)*t:r*Math.pow(2,o-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=fe(e))&&(xt(t,n,1),t=t.g,(n=z||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),W=n.getUint32(0,!0),R=n.getUint32(4,!0),Pt(t,W),Pt(t,R))})),er=Wn((function(t,e,n){return 5===t.i&&(Hn(e,n,it(t.g)),!0)}),(function(t,e,n){null!=(e=fe(e))&&(xt(t,n,5),t=t.g,q(e),Pt(t,W))})),nr=Rn((function(t,e,n){return(5===t.i||2===t.i)&&(e=ze(e,zt(e),n,2,!1),2==t.i?mt(t,it,e):e.push(it(t.g)),!0)}),(function(t,e,n){if(null!=(e=vn(fe,e))&&e.length){xt(t,n,2),Tt(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,q(e[r]),Pt(n,W)}})),rr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,tt(t.g,K)),!0)}),qn),ir=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,0===(t=tt(t.g,K))?void 0:t),!0)}),qn),or=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,tt(t.g,J)),!0)}),(function(t,e,n){t:if(null!=e){if(pe(e)){if("string"==typeof e){var r=Math.trunc(Number(e));Number.isSafeInteger(r)&&r>=0?e=String(r):(-1!==(r=e.indexOf("."))&&(e=e.substring(0,r)),ye(e)||(Q(e),e=Y(W,R)));break t}if("number"==typeof e){e=(e=Math.trunc(e))>=0&&Number.isSafeInteger(e)?e:function(t){if(t<0){H(t);const e=Y(W,R);return t=Number(e),Number.isSafeInteger(t)?t:e}return ye(String(t))?t:(H(t),J(W,R))}(e);break t}}e=void 0}null!=e&&("string"==typeof e&&vt(e),null!=e&&(xt(t,n,0),"number"==typeof e?(t=t.g,H(e),Et(t,W,R)):(n=vt(e),Et(t.g,n.i,n.g))))})),sr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,nt(t.g)),!0)}),Jn),ar=Rn((function(t,e,n){return(0===t.i||2===t.i)&&(e=ze(e,zt(e),n,2,!1),2==t.i?mt(t,nt,e):e.push(nt(t.g)),!0)}),(function(t,e,n){if(null!=(e=vn(me,e))&&e.length){n=Ot(t,n);for(let n=0;n<e.length;n++)It(t.g,e[n]);Lt(t,n)}})),ur=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,0===(t=nt(t.g))?void 0:t),!0)}),Jn),cr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,et(t.g)),!0)}),Kn),lr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,!1===(t=et(t.g))?void 0:t),!0)}),Kn),hr=Rn((function(t,e,n){return 2===t.i&&(Ke(e,n,Ye,t=gt(t)),!0)}),(function(t,e,n){if(null!=(e=vn(Ae,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&Bt(r,i,c(o))}})),fr=Wn((function(t,e,n){return 2===t.i&&(Hn(e,n,""===(t=gt(t))?void 0:t),!0)}),Yn),dr=Wn((function(t,e,n){return 2===t.i&&(Hn(e,n,gt(t)),!0)}),Yn),gr=new Vt((function(t,e,n,r,i){return 2===t.i&&(dt(t,Ze(e,r,n,!0),i),!0)}),Xn,!1,!0),pr=new Vt((function(t,e,n,r,i){return 2===t.i&&(dt(t,Ze(e,r,n),i),!0)}),Xn,!1,!0);Zn=new Vt((function(t,e,n,r,i){if(2!==t.i)return!1;r=Ue(void 0,r[0],r[1]);let o=zt(e);ne(o);let s=ze(e,o,n,3);return o=zt(e),4&$t(s)&&(s=kt(s),Wt(s,-2079&(1|$t(s))),$e(e,o,n,s)),s.push(r),dt(t,r,i),!0}),(function(t,e,n,r,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)Xn(t,e[o],n,r,i)}),!0,!0);var mr=new Vt((function(t,e,n,r,i,o){if(2!==t.i)return!1;let s=zt(e);return ne(s),(o=Qe(e,s,o))&&n!==o&&$e(e,s,o),dt(t,e=Ze(e,r,n),i),!0}),Xn,!1,!0),yr=Wn((function(t,e,n){return 2===t.i&&(Hn(e,n,pt(t)),!0)}),Qn),vr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,nt(t.g)),!0)}),(function(t,e,n){null!=(e=me(e))&&(e=parseInt(e,10),xt(t,n,0),It(t.g,e))})),br=Rn((function(t,e,n){return(0===t.i||2===t.i)&&(e=ze(e,zt(e),n,2,!1),2==t.i?mt(t,ot,e):e.push(nt(t.g)),!0)}),(function(t,e,n){if(null!=(e=vn(me,e))&&e.length){n=Ot(t,n);for(let n=0;n<e.length;n++)It(t.g,e[n]);Lt(t,n)}}));class wr{constructor(t,e){this.i=t,this.g=e,this.j=on,this.defaultValue=void 0}}function _r(t,e){return(n,r)=>{if(yt.length){const t=yt.pop();t.o(r),st(t.g,n,r),n=t}else n=new class{constructor(t,e){if(lt.length){const n=lt.pop();st(n,t,e),t=n}else t=new class{constructor(t,e){this.i=null,this.m=!1,this.g=this.j=this.s=0,st(this,t,e)}clear(){this.i=null,this.m=!1,this.g=this.j=this.s=0,this.D=!1}}(t,e);this.g=t,this.j=this.g.g,this.i=this.m=-1,this.o(e)}o({I:t=!1}={}){this.I=t}}(n,r);try{const r=new t,o=r.l;wn(e)(o,n);var i=r}finally{n.g.clear(),n.m=-1,n.i=-1,yt.length<100&&yt.push(n)}return i}}var Ar=[0,fr,Wn((function(t,e,n){return 2===t.i&&(Hn(e,n,(t=pt(t))===k()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof pn){const r=e.P;return void(r&&(e=r(e),null!=e&&Bt(t,n,C(e).buffer)))}if(Array.isArray(e))return}Qn(t,e,n)}))],Sr=[0,dr],Er=[0,sr,vr,cr,-1,ar,vr,-1],Tr=[0,cr,-1],Ir=class extends pn{constructor(){super()}};Ir.u=[6];var Pr=[0,cr,dr,cr,vr,-1,br,dr,-1,Tr,vr],Ur=[0,dr,-2],xr=class extends pn{constructor(){super()}},Or=[0],Lr=[0,sr,cr,1,cr,-3],Br=class extends pn{constructor(t){super(t,2)}},Vr={},kr=[-2,Vr,cr];Vr[336783863]=[0,dr,cr,-1,sr,[0,[1,2,3,4,5,6],mr,Or,mr,Pr,mr,Ur,mr,Lr,mr,Er,mr,[0,dr]],Sr,cr,[0,[1,3],[2,4],mr,[0,ar],-1,mr,[0,hr],-1,Zn,[0,dr,-1]],dr];var jr=[0,fr,lr],Fr=[0,ir,-1,lr,-3,ir,ar,fr,ur,ir,-1,lr,ur,lr,-2,fr],Nr=[-1,{}],Mr=[0,dr,1,Nr],Dr=[0,dr,hr,Nr],Cr=class extends pn{constructor(t){super(t,500)}o(t){return on(this,0,7,t)}};Cr.u=[3,4,5,6,8,13,17,1005];var Gr,$r=[-500,fr,-1,hr,-3,kr,Zn,Ar,ur,-1,Mr,Dr,Zn,jr,fr,Fr,ur,hr,987,hr],zr=[0,fr,-1,Nr],Wr=[-500,dr,-1,[-1,{}],998,dr],Rr=[-500,dr,hr,-1,[-2,{},cr],997,hr,-1],Hr=[-500,dr,hr,Nr,998,hr],qr=class extends pn{constructor(){super(void 0,500)}o(t){return on(this,0,1001,t)}};qr.u=[1,6,7,9,10,15,16,17,14,1002],qr.prototype.g=(Gr=[-500,Zn,$r,4,Zn,Wr,Zn,Rr,ur,Zn,Hr,hr,ur,Mr,Dr,Zn,zr,hr,-2,Fr,fr,-1,lr,979,Nr,Zn,Ar],function(){const t=new class{constructor(){this.j=[],this.i=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};zn(this.l,t,Fn(Gr)),Ut(t,t.g.end());const e=new Uint8Array(t.i),n=t.j,r=n.length;let i=0;for(let t=0;t<r;t++){const r=n[t];e.set(r,i),i+=r.length}return t.j=[e],e});var Jr=class extends pn{constructor(t){super(t)}},Kr=[0,sr,er,dr,-1],Yr=class extends pn{constructor(t){super(t)}g(){return rn(this,Jr)}};Yr.u=[1];var Xr=[0,Zn,Kr],Qr=class extends pn{constructor(t){super(t)}};Qr.u=[4,5];var Zr=class extends pn{constructor(t){super(t)}},ti=[1,2,3,4,5],ei=class extends pn{constructor(t){super(t)}g(){return null!=We(this)}i(){return null!=Ae(Me(this,2))}},ni=class extends pn{constructor(t){super(t)}},ri=[0,[0,yr,dr,[0,sr,rr,-1],[0,or,rr]],cr,[0,ti,mr,Lr,mr,Pr,mr,Er,mr,Or,mr,Ur],vr],ii=class extends pn{constructor(t){super(t)}},oi=new wr(451755788,ii);Vr[451755788]=[0,ri,[0,dr,sr,er,hr,-1],tr];var si=class extends pn{constructor(t){super(t)}},ai=class extends pn{constructor(t){super(t)}},ui=new wr(487277289,ai);Vr[487277289]=[0,ri,[0,cr,-1]];var ci=class extends pn{constructor(t){super(t)}},li=[0,1,sr,dr,Xr],hi=class extends pn{constructor(t){super(t)}};hi.u=[1];var fi=_r(hi,[0,Zn,li,rr]),di=class extends pn{constructor(t){super(t)}};di.u=[1];var gi=class extends pn{constructor(t){super(t)}K(){const t=We(this);return null==t?k():t}},pi=class extends pn{constructor(t){super(t)}},mi=[1,2],yi=[0,mi,mr,[0,nr],mr,[0,yr],sr,dr],vi=class extends pn{constructor(t){super(t)}};vi.u=[1];var bi=_r(vi,[0,Zn,yi,rr]);function wi(){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 _i(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}function Ai(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.h.stringToNewUTF8(e)),t.h._free(e)}function Si(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.h.stringToNewUTF8(e[n]);e=t.h._malloc(4*r.length),t.h.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.h._free(e);t.h._free(e)}function Ei(t,e,n){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=n}function Ti(t,e,n){let r=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}const Ii=function(t){return class extends t{N(){this.h._registerModelResourcesGraphService()}}}(class{constructor(t,e){this.j=!0,this.h=t,this.g=null,this.i=0,this.m="function"==typeof this.h._addIntToInputStream,void 0!==e?this.h.canvas=e:wi()?this.h.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.h.canvas=document.createElement("canvas"))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.h._malloc(n);this.h.HEAPU8.set(t,r),e?this.h._changeBinaryGraph(n,r):this.h._changeTextGraph(n,r),this.h._free(r)}configureAudio(t,e,n,r,i){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Ai(this,r||"input_audio",(r=>{Ai(this,i=i||"audio_header",(i=>{this.h._configureAudio(r,i,t,e,n)}))}))}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.h._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.h.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.h.errorListener=t}attachEmptyPacketListener(t,e){this.h.emptyPacketListeners=this.h.emptyPacketListeners||{},this.h.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const o=4*t.length;this.i!==o&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(o),this.i=o),this.h.HEAPF32.set(t,this.g/4),Ai(this,r,(t=>{this.h._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){Ai(this,e,(e=>{if(!this.h.canvas)throw Error("No OpenGL canvas configured.");e?this.h._bindTextureToStream(e):this.h._bindTextureToCanvas();const r=this.h.canvas.getContext("webgl2")||this.h.canvas.getContext("webgl");if(!r)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");this.h.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),this.h.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);const[i,o]=void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height];!this.j||i===this.h.canvas.width&&o===this.h.canvas.height||(this.h.canvas.width=i,this.h.canvas.height=o);const[s,a]=[i,o];this.h._addBoundTextureToStream(e,s,a,n)}))}addBoolToStream(t,e,n){Ai(this,e,(e=>{this.h._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){Ai(this,e,(e=>{this.h._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){Ai(this,e,(e=>{this.h._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){Ai(this,e,(e=>{this.h._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){Ai(this,e,(e=>{this.h._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){Ai(this,e,(e=>{Ai(this,t,(t=>{this.h._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){Ai(this,e,(e=>{Si(this,Object.keys(t),(r=>{Si(this,Object.values(t),(i=>{this.h._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){Ai(this,n,(n=>{Ai(this,e,(e=>{const i=this.h._malloc(t.length);this.h.HEAPU8.set(t,i),this.h._addProtoToInputStream(i,t.length,e,n,r),this.h._free(i)}))}))}addEmptyPacketToStream(t,e){Ai(this,t,(t=>{this.h._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){Ai(this,e,(e=>{const r=this.h._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.h._addBoolVectorEntry(r,e);this.h._addBoolVectorToInputStream(r,e,n)}))}addDoubleVectorToStream(t,e,n){Ai(this,e,(e=>{const r=this.h._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.h._addDoubleVectorEntry(r,e);this.h._addDoubleVectorToInputStream(r,e,n)}))}addFloatVectorToStream(t,e,n){Ai(this,e,(e=>{const r=this.h._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.h._addFloatVectorEntry(r,e);this.h._addFloatVectorToInputStream(r,e,n)}))}addIntVectorToStream(t,e,n){Ai(this,e,(e=>{const r=this.h._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.h._addIntVectorEntry(r,e);this.h._addIntVectorToInputStream(r,e,n)}))}addUintVectorToStream(t,e,n){Ai(this,e,(e=>{const r=this.h._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.h._addUintVectorEntry(r,e);this.h._addUintVectorToInputStream(r,e,n)}))}addStringVectorToStream(t,e,n){Ai(this,e,(e=>{const r=this.h._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const e of t)Ai(this,e,(t=>{this.h._addStringVectorEntry(r,t)}));this.h._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){Ai(this,e,(e=>{this.h._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){Ai(this,e,(e=>{this.h._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){Ai(this,e,(e=>{this.h._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){Ai(this,e,(e=>{this.h._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){Ai(this,e,(e=>{this.h._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){Ai(this,e,(e=>{Ai(this,t,(t=>{this.h._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){Ai(this,n,(n=>{Ai(this,e,(e=>{const r=this.h._malloc(t.length);this.h.HEAPU8.set(t,r),this.h._addProtoToInputSidePacket(r,t.length,e,n),this.h._free(r)}))}))}addBoolVectorToInputSidePacket(t,e){Ai(this,e,(e=>{const n=this.h._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.h._addBoolVectorEntry(n,e);this.h._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){Ai(this,e,(e=>{const n=this.h._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.h._addDoubleVectorEntry(n,e);this.h._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){Ai(this,e,(e=>{const n=this.h._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.h._addFloatVectorEntry(n,e);this.h._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){Ai(this,e,(e=>{const n=this.h._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.h._addIntVectorEntry(n,e);this.h._addIntVectorToInputSidePacket(n,e)}))}addUintVectorToInputSidePacket(t,e){Ai(this,e,(e=>{const n=this.h._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.h._addUintVectorEntry(n,e);this.h._addUintVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){Ai(this,e,(e=>{const n=this.h._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)Ai(this,e,(t=>{this.h._addStringVectorEntry(n,t)}));this.h._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Ei(this,t,e),Ai(this,t,(t=>{this.h._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Ti(this,t,e),Ai(this,t,(t=>{this.h._attachBoolVectorListener(t)}))}attachIntListener(t,e){Ei(this,t,e),Ai(this,t,(t=>{this.h._attachIntListener(t)}))}attachIntVectorListener(t,e){Ti(this,t,e),Ai(this,t,(t=>{this.h._attachIntVectorListener(t)}))}attachUintListener(t,e){Ei(this,t,e),Ai(this,t,(t=>{this.h._attachUintListener(t)}))}attachUintVectorListener(t,e){Ti(this,t,e),Ai(this,t,(t=>{this.h._attachUintVectorListener(t)}))}attachDoubleListener(t,e){Ei(this,t,e),Ai(this,t,(t=>{this.h._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Ti(this,t,e),Ai(this,t,(t=>{this.h._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Ei(this,t,e),Ai(this,t,(t=>{this.h._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Ti(this,t,e),Ai(this,t,(t=>{this.h._attachFloatVectorListener(t)}))}attachStringListener(t,e){Ei(this,t,e),Ai(this,t,(t=>{this.h._attachStringListener(t)}))}attachStringVectorListener(t,e){Ti(this,t,e),Ai(this,t,(t=>{this.h._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Ei(this,t,e),Ai(this,t,(t=>{this.h._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Ti(this,t,e),Ai(this,t,(t=>{this.h._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.h._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Ei(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),Ai(this,t,(t=>{this.h._attachAudioListener(t,n||!1)}))}finishProcessing(){this.h._waitUntilIdle()}closeGraph(){this.h._closeGraph(),this.h.simpleListeners=void 0,this.h.emptyPacketListeners=void 0}});var Pi=class extends Ii{};async function Ui(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await _i(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await _i(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&r&&((e=self.Module).locateFile=r.locateFile,r.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=r.mainScriptUrlOrBlob)),r=await self.ModuleFactory(self.Module||r),self.ModuleFactory=self.Module=void 0,new t(r,null)})(t,e.wasmLoaderPath,e.assetLoaderPath,{locateFile:t=>t.endsWith(".wasm")?e.wasmBinaryPath.toString():e.assetBinaryPath&&t.endsWith(".data")?e.assetBinaryPath.toString():t}),await t.o(n),t}async function xi(t,e,n){return Ui(t,e,n)}function Oi(t,e){const n=en(t.baseOptions,ei,1)||new ei;"string"==typeof e?(Ge(n,2,_e(e)),Ge(n,1)):e instanceof Uint8Array&&(Ge(n,1,Zt(e,!1,!1)),Ge(n,2)),on(t.baseOptions,0,1,n)}function Li(t,e){const n=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(en(t.baseOptions,ei,1)?.g()||en(t.baseOptions,ei,1)?.i()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=en(t.baseOptions,Zr,3);if(!n){var r=n=new Zr;sn(r,4,new xr)}"delegate"in e&&("GPU"===e.delegate?sn(e=n,2,r=new Ir):sn(e=n,4,r=new xr)),on(t.baseOptions,0,3,n)}(t,n),n.modelAssetPath)return fetch(n.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${n.modelAssetPath} (${t.status})`)})).then((e=>{try{t.g.h.FS_unlink("/model.dat")}catch{}t.g.h.FS_createDataFile("/","model.dat",new Uint8Array(e),!0,!1,!1),Oi(t,"/model.dat"),t.B()}));if(n.modelAssetBuffer instanceof Uint8Array)Oi(t,n.modelAssetBuffer);else if(n.modelAssetBuffer)return async function(t){const e=[];for(var n=0;;){const{done:r,value:i}=await t.read();if(r)break;e.push(i),n+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(n),n=0;for(const r of e)t.set(r,n),n+=r.length;return t}(n.modelAssetBuffer).then((e=>{Oi(t,e),t.B()}));return t.B(),Promise.resolve()}function Bi(t){try{const e=t.j.length;if(1===e)throw Error(t.j[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.j.map((t=>t.message)).join(", "))}finally{t.j=[]}}function Vi(t,e){t.s=Math.max(t.s,e)}var ki=class{constructor(t){this.g=t,this.j=[],this.s=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.j.push(Error(e))})),this.g.N(),this.g.setGraph(t,e),Bi(this)}finishProcessing(){this.g.finishProcessing(),Bi(this)}close(){this.g.closeGraph()}};async function ji(t,e,n){return xi(t,e,n)}ki.prototype.close=ki.prototype.close,function(e,n){e=e.split(".");var r,i=t;e[0]in i||void 0===i.execScript||i.execScript("var "+e[0]);for(;e.length&&(r=e.shift());)e.length||void 0===n?i=i[r]&&i[r]!==Object.prototype[r]?i[r]:i[r]={}:i[r]=n}("TaskRunner",ki);var Fi=class extends ki{constructor(){super(...arguments),this.H=48e3}O(t){this.H=t}};function Ni(t){const e={classifications:rn(t,ci).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=me(Me(t,1))??0??-1;const n=t.l;let r=zt(n);const i=Ce(n,r,2),o=fe(i);return null!=o&&o!==i&&$e(n,r,2,o),{index:e,score:o??0??0,categoryName:hn(Ae(Me(t,3)),"")??"",displayName:hn(Ae(Me(t,4)),"")??""}})),headIndex:e,headName:n}}(en(t,Yr,4)?.g()??[],me(Me(t,2))??0,hn(Ae(Me(t,3)),""))))};return null!=ln(t)&&(e.timestampMs=hn(ln(t),0)),e}Fi.prototype.setDefaultSampleRate=Fi.prototype.O;var Mi=class extends Fi{constructor(t,e){super(new Pi(t,e)),this.m=[],on(t=this.i=new ii,0,1,e=new ni)}get baseOptions(){return en(this.i,ni,1)}set baseOptions(t){on(this.i,0,1,t)}o(t){var e=this.i,n=en(this.i,Qr,2);if(n=n?Ve(n):new Qr,void 0!==t.displayNamesLocale?Ge(n,1,_e(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ge(n,1),void 0!==t.maxResults){var r=t.maxResults;if(null!=r){if("number"!=typeof r)throw he();if(!Number.isFinite(r))throw he();r|=0}Ge(n,2,r)}else"maxResults"in t&&Ge(n,2);if(void 0!==t.scoreThreshold){if(null!=(r=t.scoreThreshold)&&"number"!=typeof r)throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);Ge(n,3,r)}else"scoreThreshold"in t&&Ge(n,3);return void 0!==t.categoryAllowlist?fn(n,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ge(n,4),void 0!==t.categoryDenylist?fn(n,5,t.categoryDenylist):"categoryDenylist"in t&&Ge(n,5),on(e,0,2,n),Li(this,t)}L(t,e){return this.G(t,e??this.H,this.s+1)}G(t,e,n){return this.g.addDoubleToStream(e,"sample_rate",n),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",n),this.m=[],this.finishProcessing(),[...this.m]}B(){var t=new qr;dn(t,10,"audio_in"),dn(t,10,"sample_rate"),dn(t,15,"timestamped_classifications");const e=new Br;gn(e,oi,this.i);const n=new Cr;Je(n,_e("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph")),dn(n,3,"AUDIO:audio_in"),dn(n,3,"SAMPLE_RATE:sample_rate"),dn(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.o(e),cn(t,n),this.g.attachProtoVectorListener("timestamped_classifications",((t,e)=>{!function(t,e){e.forEach((e=>{e=fi(e),t.m.push(Ni(e))}))}(this,t),Vi(this,e)})),this.g.attachEmptyPacketListener("timestamped_classifications",(t=>{Vi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Di(t){return{embeddings:rn(t,pi).map((t=>{const e={headIndex:me(Me(t,3))??0??-1,headName:hn(Ae(Me(t,4)),"")??""};if(void 0!==tn(t,di,Xe(t,1))){var n=en(t,di,Xe(t,1));t=n.l;var r=zt(t);const s=2&r?1:2;let a=Re(t,r);var i=$t(a);if(Ne(n,i,void 0,!1)){(4&i||Object.isFrozen(a))&&(a=kt(a),i=an(i,r),r=$e(t,r,1,a));for(var o=n=0;n<a.length;n++){const t=fe(a[n]);null!=t&&(a[o++]=t)}o<n&&(a.length=o),i=Gt(i=He(i,r),20,!0),i=Gt(i,4096,!1),i=Gt(i,8192,!1),Wt(a,i),2&i&&Object.freeze(a)}qe(i)||(n=i,(i=(o=1===s||4===s&&!!(32&i))?Gt(i,2,!0):un(i,r,!1))!==n&&Wt(a,i),o&&Object.freeze(a)),2===s&&qe(i)&&(a=kt(a),i=un(i=an(i,r),r,!1),Wt(a,i),$e(t,r,1,a)),e.floatEmbedding=a.slice()}else r=new Uint8Array(0),e.quantizedEmbedding=en(t,gi,Xe(t,2))?.K()?.i()??r;return e})),timestampMs:hn(ln(t),0)}}Mi.prototype.classify=Mi.prototype.L,Mi.prototype.setOptions=Mi.prototype.o,Mi.createFromModelPath=function(t,e){return xi(Mi,t,{baseOptions:{modelAssetPath:e}})},Mi.createFromModelBuffer=function(t,e){return ji(Mi,t,{baseOptions:{modelAssetBuffer:e}})},Mi.createFromOptions=function(t,e){return ji(Mi,t,e)};var Ci=class extends Fi{constructor(t,e){super(new Pi(t,e)),this.m=[],on(t=this.i=new ai,0,1,e=new ni)}get baseOptions(){return en(this.i,ni,1)}set baseOptions(t){on(this.i,0,1,t)}o(t){var e=this.i,n=en(this.i,si,2);return n=n?Ve(n):new si,void 0!==t.l2Normalize?Ge(n,1,de(t.l2Normalize)):"l2Normalize"in t&&Ge(n,1),void 0!==t.quantize?Ge(n,2,de(t.quantize)):"quantize"in t&&Ge(n,2),on(e,0,2,n),Li(this,t)}M(t,e){return this.G(t,e??this.H,this.s+1)}G(t,e,n){return this.g.addDoubleToStream(e,"sample_rate",n),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",n),this.m=[],this.finishProcessing(),this.m}B(){var t=new qr;dn(t,10,"audio_in"),dn(t,10,"sample_rate"),dn(t,15,"embeddings_out"),dn(t,15,"timestamped_embeddings_out");const e=new Br;gn(e,ui,this.i);const n=new Cr;Je(n,_e("mediapipe.tasks.audio.audio_embedder.AudioEmbedderGraph")),dn(n,3,"AUDIO:audio_in"),dn(n,3,"SAMPLE_RATE:sample_rate"),dn(n,4,"EMBEDDINGS:embeddings_out"),dn(n,4,"TIMESTAMPED_EMBEDDINGS:timestamped_embeddings_out"),n.o(e),cn(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=bi(t),this.m.push(Di(t)),Vi(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Vi(this,t)})),this.g.attachProtoVectorListener("timestamped_embeddings_out",((t,e)=>{for(const e of t)t=bi(e),this.m.push(Di(t));Vi(this,e)})),this.g.attachEmptyPacketListener("timestamped_embeddings_out",(t=>{Vi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};let Gi;Ci.prototype.embed=Ci.prototype.M,Ci.prototype.setOptions=Ci.prototype.o,Ci.createFromModelPath=function(t,e){return ji(Ci,t,{baseOptions:{modelAssetPath:e}})},Ci.createFromModelBuffer=function(t,e){return ji(Ci,t,{baseOptions:{modelAssetBuffer:e}})},Ci.createFromOptions=function(t,e){return ji(Ci,t,e)};const $i=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 zi(){if(void 0===Gi)try{await WebAssembly.instantiate($i),Gi=!0}catch{Gi=!1}return Gi}async function Wi(t,e=""){const n=await zi()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Ri=class{};Ri.forVisionTasks=function(t){return Wi("vision",t)},Ri.forTextTasks=function(t){return Wi("text",t)},Ri.forGenAiExperimentalTasks=function(t){return Wi("genai_experimental",t)},Ri.forGenAiTasks=function(t){return Wi("genai",t)},Ri.forAudioTasks=function(t){return Wi("audio",t)},Ri.isSimdSupported=function(){return zi()},exports.AudioClassifier=Mi,exports.AudioEmbedder=Ci,exports.AudioTaskRunner=Fi,exports.FilesetResolver=Ri;
2
2
  //# sourceMappingURL=audio_bundle_cjs.js.map