diff --git a/package.json b/package.json index 2c2c1c70..c105e750 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@radix-ui/react-toggle": "1.0.3", "@radix-ui/react-tooltip": "1.0.6", "@react-hook/media-query": "1.1.1", + "@ricky0123/vad-react": "^0.0.24", "@sentry/nextjs": "7.61.0", "@t3-oss/env-core": "0.3.1", "@t3-oss/env-nextjs": "0.3.1", diff --git a/public/vad/ort-training-wasm-simd-threaded.mjs b/public/vad/ort-training-wasm-simd-threaded.mjs new file mode 100644 index 00000000..f8928d89 --- /dev/null +++ b/public/vad/ort-training-wasm-simd-threaded.mjs @@ -0,0 +1,82 @@ + +var ortWasmThreaded = (() => { + var _scriptName = import.meta.url; + + return ( +async function(moduleArg = {}) { + var moduleRtn; + +function aa(){e.buffer!=l.buffer&&m();return l}function n(){e.buffer!=l.buffer&&m();return ba}function r(){e.buffer!=l.buffer&&m();return ca}function u(){e.buffer!=l.buffer&&m();return da}function ea(){e.buffer!=l.buffer&&m();return fa}var w=Object.assign({},moduleArg),ha,x,ia=new Promise((a,b)=>{ha=a;x=b}),ja="object"==typeof window,A="function"==typeof importScripts,B="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,C=A&&"em-pthread"==self.name; +if(B){const {createRequire:a}=await import("module");var require=a(import.meta.url),D=require("worker_threads");global.Worker=D.Worker;C=(A=!D.xb)&&"em-pthread"==D.workerData}"use strict";w.mountExternalData=(a,b)=>{(w.gb||(w.gb=new Map)).set(a,b)};w.unmountExternalData=()=>{delete w.gb}; +var SharedArrayBuffer=globalThis.SharedArrayBuffer??(new WebAssembly.Memory({initial:0,maximum:0,shared:!0})).buffer.constructor,ka=Object.assign({},w),la="./this.program",E=(a,b)=>{throw b;},F="",ma,G,H; +if(B){var fs=require("fs"),na=require("path");F=require("url").fileURLToPath(new URL("./",import.meta.url));ma=(a,b)=>{a=oa(a)?new URL(a):na.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};H=a=>{a=ma(a,!0);a.buffer||(a=new Uint8Array(a));return a};G=(a,b,c,d=!0)=>{a=oa(a)?new URL(a):na.normalize(a);fs.readFile(a,d?void 0:"utf8",(g,h)=>{g?c(g):b(d?h.buffer:h)})};!w.thisProgram&&1{process.exitCode= +a;throw b;}}else if(ja||A)A?F=self.location.href:"undefined"!=typeof document&&document.currentScript&&(F=document.currentScript.src),_scriptName&&(F=_scriptName),F.startsWith("blob:")?F="":F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1),B||(ma=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},A&&(H=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),G=(a,b,c)=>{var d=new XMLHttpRequest; +d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)});B&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var pa=console.log.bind(console),qa=console.error.bind(console);B&&(pa=(...a)=>fs.writeSync(1,a.join(" ")+"\n"),qa=(...a)=>fs.writeSync(2,a.join(" ")+"\n"));var ra=pa,I=qa;Object.assign(w,ka);ka=null; +if(C){var sa;if(B){var ta=D.parentPort;ta.on("message",b=>onmessage({data:b}));Object.assign(globalThis,{self:global,importScripts:()=>{},postMessage:b=>ta.postMessage(b),performance:global.performance||{now:Date.now}})}var ua=!1;I=function(...b){b=b.join(" ");B?fs.writeSync(2,b+"\n"):console.error(b)};self.alert=function(...b){postMessage({lb:"alert",text:b.join(" "),yb:K()})};w.instantiateWasm=(b,c)=>new Promise(d=>{sa=g=>{g=new WebAssembly.Instance(g,va());c(g);d()}});self.onunhandledrejection= +b=>{throw b.reason||b;};function a(b){try{var c=b.data,d=c.cmd;if("load"===d){let g=[];self.onmessage=h=>g.push(h);self.startWorker=()=>{postMessage({cmd:"loaded"});for(let h of g)a(h);self.onmessage=a};for(const h of c.handlers)if(!w[h]||w[h].proxy)w[h]=(...k)=>{postMessage({lb:"callHandler",wb:h,args:k})},"print"==h&&(ra=w[h]),"printErr"==h&&(I=w[h]);e=c.wasmMemory;m();sa(c.wasmModule)}else if("run"===d){wa(c.pthread_ptr,0,0,1,0,0);xa(c.pthread_ptr);ya();za();ua||=!0;try{Aa(c.start_routine,c.arg)}catch(g){if("unwind"!= +g)throw g;}}else"cancel"===d?K()&&Ba(-1):"setimmediate"!==c.target&&("checkMailbox"===d?ua&&Ca():d&&(I(`worker: received unknown command ${d}`),I(c)))}catch(g){throw Da(),g;}}self.onmessage=a}var L;w.wasmBinary&&(L=w.wasmBinary);var e,Ea,Fa=!1,M,l,ba,ca,da,N,fa; +function m(){var a=e.buffer;w.HEAP8=l=new Int8Array(a);w.HEAP16=new Int16Array(a);w.HEAPU8=ba=new Uint8Array(a);w.HEAPU16=new Uint16Array(a);w.HEAP32=ca=new Int32Array(a);w.HEAPU32=da=new Uint32Array(a);w.HEAPF32=new Float32Array(a);w.HEAPF64=fa=new Float64Array(a);w.HEAP64=N=new BigInt64Array(a);w.HEAPU64=new BigUint64Array(a)} +if(!C){e=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0});if(!(e.buffer instanceof SharedArrayBuffer))throw I("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),B&&I("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");m()} +var Ga=[],Ha=[],Ia=[],O=0,Ja=null,P=null;function Ka(){O--;if(0==O&&(null!==Ja&&(clearInterval(Ja),Ja=null),P)){var a=P;P=null;a()}}function La(a){a="Aborted("+a+")";I(a);Fa=!0;M=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");x(a);throw a;}var Ma=a=>a.startsWith("data:application/octet-stream;base64,"),oa=a=>a.startsWith("file://"),Na;function Oa(a){if(a==Na&&L)return new Uint8Array(L);if(H)return H(a);throw"both async and sync fetching of the wasm failed";} +function Pa(a){if(!L&&(ja||A)){if("function"==typeof fetch&&!oa(a))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Oa(a));if(G)return new Promise((b,c)=>{G(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>Oa(a))}function Qa(a,b,c){return Pa(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{I(`failed to asynchronously prepare wasm: ${d}`);La(d)})} +function Ra(a,b){var c=Na;return L||"function"!=typeof WebAssembly.instantiateStreaming||Ma(c)||oa(c)||B||"function"!=typeof fetch?Qa(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(g){I(`wasm streaming compile failed: ${g}`);I("falling back to ArrayBuffer instantiation");return Qa(c,a,b)}))} +function va(){Sa={j:Ta,b:Ua,E:Va,g:Wa,V:Xa,A:Ya,C:Za,W:$a,T:ab,L:bb,S:cb,o:db,B:eb,y:fb,U:gb,z:hb,_:ib,Z:jb,P:kb,w:lb,F:mb,k:nb,O:xa,Y:ob,I:pb,J:qb,K:rb,G:sb,H:tb,v:ub,q:vb,l:wb,p:xb,e:yb,X:zb,x:Ab,d:Bb,f:Cb,i:Db,u:Eb,t:Fb,s:Gb,Q:Hb,R:Ib,D:Jb,h:Kb,n:Lb,M:Mb,m:Nb,a:e,r:Ob,N:Pb,c:Qb};return{a:Sa}} +var Rb={892996:(a,b,c,d)=>{if("undefined"==typeof w||!w.gb)return 1;a=Q(a>>>0);a.startsWith("./")&&(a=a.substring(2));a=w.gb.get(a);if(!a)return 2;b>>>=0;c>>>=0;d>>>=0;if(b+c>a.byteLength)return 3;try{return n().set(a.subarray(b,b+c),d>>>0),0}catch{return 4}},893497:()=>"undefined"!==typeof wasmOffsetConverter};function Ta(){return"undefined"!==typeof wasmOffsetConverter}function Sb(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} +var Tb=a=>{a.terminate();a.onmessage=()=>{}},Wb=a=>{0==R.length&&(Ub(),Vb(R[0]));var b=R.pop();if(!b)return 6;S.push(b);T[a.cb]=b;b.cb=a.cb;var c={cmd:"run",start_routine:a.pb,arg:a.nb,pthread_ptr:a.cb};B&&b.unref();b.postMessage(c,a.ub);return 0},U=0,V=(a,b,...c)=>{for(var d=2*c.length,g=$b(),h=ac(8*d),k=h>>>3,p=0;p>>0]=y)}a=bc(a,0,d,h,b);cc(g);return a}; +function Ob(a){if(C)return V(0,1,a);M=a;if(!(0{M=a;if(C)throw dc(a),"unwind";Ob(a)},R=[],S=[],ec=[],T={};function fc(){for(var a=w.numThreads-1;a--;)Ub();Ga.unshift(()=>{O++;gc(()=>Ka())})}var ic=a=>{var b=a.cb;delete T[b];R.push(a);S.splice(S.indexOf(a),1);a.cb=0;hc(b)};function za(){ec.forEach(a=>a())} +var Vb=a=>new Promise(b=>{a.onmessage=h=>{h=h.data;var k=h.cmd;if(h.targetThread&&h.targetThread!=K()){var p=T[h.targetThread];p?p.postMessage(h,h.transferList):I(`Internal error! Worker sent a message "${k}" to target pthread ${h.targetThread}, but that thread no longer exists!`)}else if("checkMailbox"===k)Ca();else if("spawnThread"===k)Wb(h);else if("cleanupThread"===k)ic(T[h.thread]);else if("killThread"===k)h=h.thread,k=T[h],delete T[h],Tb(k),hc(h),S.splice(S.indexOf(k),1),k.cb=0;else if("cancelThread"=== +k)T[h.thread].postMessage({cmd:"cancel"});else if("loaded"===k)a.loaded=!0,B&&!a.cb&&a.unref(),b(a);else if("alert"===k)alert(`Thread ${h.threadId}: ${h.text}`);else if("setimmediate"===h.target)a.postMessage(h);else if("callHandler"===k)w[h.handler](...h.args);else k&&I(`worker sent an unknown command ${k}`)};a.onerror=h=>{I(`${"worker sent an error!"} ${h.filename}:${h.lineno}: ${h.message}`);throw h;};B&&(a.on("message",h=>a.onmessage({data:h})),a.on("error",h=>a.onerror(h)));var c=[],d=[],g;for(g of d)w.hasOwnProperty(g)&& +c.push(g);a.postMessage({cmd:"load",handlers:c,wasmMemory:e,wasmModule:Ea})});function gc(a){C?a():Promise.all(R.map(Vb)).then(a)}function Ub(){var a=new Worker(new URL(import.meta.url),{type:"module",workerData:"em-pthread",name:"em-pthread"});R.push(a)}var jc=a=>{for(;0{var a=K(),b=u()[a+52>>>2>>>0];a=u()[a+56>>>2>>>0];kc(b,b-a);cc(b)},lc=[],mc,Aa=(a,b)=>{U=0;var c=lc[a];c||(a>=lc.length&&(lc.length=a+1),lc[a]=c=mc.get(a));a=c(b);0>>=0;var d=new nc(a);b>>>=0;c>>>=0;u()[d.jb+16>>>2>>>0]=0;u()[d.jb+4>>>2>>>0]=b;u()[d.jb+8>>>2>>>0]=c;oc=a;pc++;throw oc;}function qc(a,b,c,d){return C?V(2,1,a,b,c,d):Va(a,b,c,d)} +function Va(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;if("undefined"==typeof SharedArrayBuffer)return I("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var g=[];if(C&&0===g.length)return qc(a,b,c,d);a={pb:c,cb:a,nb:d,ub:g};return C?(a.lb="spawnThread",postMessage(a,g),0):Wb(a)} +var rc="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,sc=(a,b,c)=>{b>>>=0;var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>> +10,56320|g&1023))}}else d+=String.fromCharCode(g)}return d},Q=(a,b)=>(a>>>=0)?sc(n(),a,b):"";function Wa(a,b,c){return C?V(3,1,a,b,c):0}function Xa(a,b){if(C)return V(4,1,a,b)} +var tc=a=>{for(var b=0,c=0;c=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},uc=(a,b,c,d)=>{c>>>=0;if(!(0=k){var p=a.charCodeAt(++h);k=65536+((k&1023)<<10)|p&1023}if(127>=k){if(c>=d)break;b[c++>>>0]=k}else{if(2047>=k){if(c+1>=d)break;b[c++>>>0]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++>>>0]=224|k>>12}else{if(c+3>=d)break;b[c++>>>0]=240|k>> +18;b[c++>>>0]=128|k>>12&63}b[c++>>>0]=128|k>>6&63}b[c++>>>0]=128|k&63}}b[c>>>0]=0;return c-g},W=(a,b,c)=>uc(a,n(),b,c);function Ya(a,b){if(C)return V(5,1,a,b)}function Za(a,b,c){if(C)return V(6,1,a,b,c)}function $a(a,b,c){return C?V(7,1,a,b,c):0}function ab(a,b){if(C)return V(8,1,a,b)}function bb(a,b,c){if(C)return V(9,1,a,b,c)}function cb(a,b,c,d){if(C)return V(10,1,a,b,c,d)}function db(a,b,c,d){if(C)return V(11,1,a,b,c,d)}function eb(a,b,c,d){if(C)return V(12,1,a,b,c,d)} +function fb(a){if(C)return V(13,1,a)}function gb(a,b){if(C)return V(14,1,a,b)}function hb(a,b,c){if(C)return V(15,1,a,b,c)}var ib=()=>{La("")},jb=()=>1;function kb(a){wa(a>>>0,!A,1,!ja,131072,!1);za()}function xa(a){a>>>=0;"function"===typeof Atomics.vb&&(Atomics.vb(r(),a>>>2,a).value.then(Ca),a+=128,Atomics.store(r(),a>>>2,1))} +var Ca=()=>{var a=K();if(a&&(xa(a),a=vc,!Fa))try{if(a(),!(0>>=0;a==b>>>0?setTimeout(Ca):C?postMessage({targetThread:a,cmd:"checkMailbox"}):(a=T[a])&&a.postMessage({cmd:"checkMailbox"})}var wc=[];function mb(a,b,c,d,g){b>>>=0;d/=2;wc.length=d;c=g>>>0>>>3;for(g=0;g>>0];return(b?Rb[b]:xc[a])(...wc)} +function nb(a){a>>>=0;C?postMessage({cmd:"cleanupThread",thread:a}):ic(T[a])}function ob(a){B&&T[a>>>0].ref()} +function pb(a,b){a=-9007199254740992>a||9007199254740992>>=0;a=new Date(1E3*a);r()[b>>>2>>>0]=a.getUTCSeconds();r()[b+4>>>2>>>0]=a.getUTCMinutes();r()[b+8>>>2>>>0]=a.getUTCHours();r()[b+12>>>2>>>0]=a.getUTCDate();r()[b+16>>>2>>>0]=a.getUTCMonth();r()[b+20>>>2>>>0]=a.getUTCFullYear()-1900;r()[b+24>>>2>>>0]=a.getUTCDay();a=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;r()[b+28>>>2>>>0]=a} +var X=a=>0===a%4&&(0!==a%100||0===a%400),yc=[0,31,60,91,121,152,182,213,244,274,305,335],zc=[0,31,59,90,120,151,181,212,243,273,304,334]; +function qb(a,b){a=-9007199254740992>a||9007199254740992>>=0;a=new Date(1E3*a);r()[b>>>2>>>0]=a.getSeconds();r()[b+4>>>2>>>0]=a.getMinutes();r()[b+8>>>2>>>0]=a.getHours();r()[b+12>>>2>>>0]=a.getDate();r()[b+16>>>2>>>0]=a.getMonth();r()[b+20>>>2>>>0]=a.getFullYear()-1900;r()[b+24>>>2>>>0]=a.getDay();var c=(X(a.getFullYear())?yc:zc)[a.getMonth()]+a.getDate()-1|0;r()[b+28>>>2>>>0]=c;r()[b+36>>>2>>>0]=-(60*a.getTimezoneOffset());c=(new Date(a.getFullYear(),6,1)).getTimezoneOffset(); +var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();a=(c!=d&&a.getTimezoneOffset()==Math.min(d,c))|0;r()[b+32>>>2>>>0]=a} +function rb(a){a>>>=0;var b=new Date(r()[a+20>>>2>>>0]+1900,r()[a+16>>>2>>>0],r()[a+12>>>2>>>0],r()[a+8>>>2>>>0],r()[a+4>>>2>>>0],r()[a>>>2>>>0],0),c=r()[a+32>>>2>>>0],d=b.getTimezoneOffset(),g=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),h=(new Date(b.getFullYear(),0,1)).getTimezoneOffset(),k=Math.min(h,g);0>c?r()[a+32>>>2>>>0]=Number(g!=h&&k==d):0>>2>>>0]=b.getDay();c=(X(b.getFullYear())?yc:zc)[b.getMonth()]+ +b.getDate()-1|0;r()[a+28>>>2>>>0]=c;r()[a>>>2>>>0]=b.getSeconds();r()[a+4>>>2>>>0]=b.getMinutes();r()[a+8>>>2>>>0]=b.getHours();r()[a+12>>>2>>>0]=b.getDate();r()[a+16>>>2>>>0]=b.getMonth();r()[a+20>>>2>>>0]=b.getYear();a=b.getTime();return BigInt(isNaN(a)?-1:a/1E3)}function sb(a,b,c,d,g,h,k){return C?V(16,1,a,b,c,d,g,h,k):-52}function tb(a,b,c,d,g,h){if(C)return V(17,1,a,b,c,d,g,h)} +function ub(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;var g=(new Date).getFullYear(),h=new Date(g,0,1),k=new Date(g,6,1);g=h.getTimezoneOffset();var p=k.getTimezoneOffset(),y=Math.max(g,p);u()[a>>>2>>>0]=60*y;r()[b>>>2>>>0]=Number(g!=p);a=v=>v.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1];h=a(h);k=a(k);p>>=0;b>>>=0;c>>>=0;Ac.length=0;for(var d;d=n()[b++>>>0];){var g=105!=d;g&=112!=d;c+=g&&c%8?4:0;Ac.push(112==d?u()[c>>>2>>>0]:106==d?N[c>>>3]:105==d?r()[c>>>2>>>0]:ea()[c>>>3>>>0]);c+=g?8:4}return Rb[a](...Ac)}var wb=()=>{},xb=()=>Date.now();function yb(a,b){return I(Q(a>>>0,b>>>0))}var zb=()=>{U+=1;throw"unwind";};function Ab(){return 4294901760}var Bb;Bb=()=>performance.timeOrigin+performance.now();var Cb=()=>B?require("os").cpus().length:navigator.hardwareConcurrency; +function Db(){La("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER");return 0}function Eb(a){a>>>=0;var b=n().length;if(a<=b||4294901760=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var g=Math;d=Math.max(a,d);a:{g=(g.min.call(g,4294901760,d+(65536-d%65536)%65536)-e.buffer.byteLength+65535)/65536;try{e.grow(g);m();var h=1;break a}catch(k){}h=void 0}if(h)return!0}return!1} +var Bc=()=>{La("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER");return 0},Y={},Cc=a=>{a.forEach(b=>{var c=Bc();c&&(Y[c]=b)})};function Fb(){var a=Error().stack.toString().split("\n");"Error"==a[0]&&a.shift();Cc(a);Y.mb=Bc();Y.ob=a;return Y.mb} +function Gb(a,b,c){a>>>=0;b>>>=0;if(Y.mb==a)var d=Y.ob;else d=Error().stack.toString().split("\n"),"Error"==d[0]&&d.shift(),Cc(d);for(var g=3;d[g]&&Bc()!=a;)++g;for(a=0;a>>2>>>0]=Bc();return a} +var Dc={},Fc=()=>{if(!Ec){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:la||"./this.program"},b;for(b in Dc)void 0===Dc[b]?delete a[b]:a[b]=Dc[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Ec=c}return Ec},Ec; +function Hb(a,b){if(C)return V(18,1,a,b);a>>>=0;b>>>=0;var c=0;Fc().forEach((d,g)=>{var h=b+c;g=u()[a+4*g>>>2>>>0]=h;for(h=0;h>>0]=d.charCodeAt(h);aa()[g>>>0]=0;c+=d.length+1});return 0}function Ib(a,b){if(C)return V(19,1,a,b);a>>>=0;b>>>=0;var c=Fc();u()[a>>>2>>>0]=c.length;var d=0;c.forEach(g=>d+=g.length+1);u()[b>>>2>>>0]=d;return 0}function Kb(a){return C?V(20,1,a):52}function Lb(a,b,c,d){return C?V(21,1,a,b,c,d):52}function Mb(a,b,c,d){return C?V(22,1,a,b,c,d):70} +var Gc=[null,[],[]];function Nb(a,b,c,d){if(C)return V(23,1,a,b,c,d);b>>>=0;c>>>=0;d>>>=0;for(var g=0,h=0;h>>2>>>0],p=u()[b+4>>>2>>>0];b+=8;for(var y=0;y>>0],z=Gc[a];0===v||10===v?((1===a?ra:I)(sc(z,0)),z.length=0):z.push(v)}g+=p}u()[d>>>2>>>0]=g;return 0}var Hc=[31,29,31,30,31,30,31,31,30,31,30,31],Ic=[31,28,31,30,31,30,31,31,30,31,30,31];function Jc(a){var b=Array(tc(a)+1);uc(a,b,0,b.length);return b}var Kc=(a,b)=>{aa().set(a,b>>>0)}; +function Pb(a,b,c,d){function g(f,q,t){for(f="number"==typeof f?f.toString():f||"";f.lengthXb?-1:0J-f.getDate())q-=J-f.getDate()+1,f.setDate(1),11>t?f.setMonth(t+1):(f.setMonth(0),f.setFullYear(f.getFullYear()+1));else{f.setDate(f.getDate()+q);break}}t=new Date(f.getFullYear()+1,0,4);q=p(new Date(f.getFullYear(), +0,4));t=p(t);return 0>=k(q,f)?0>=k(t,f)?f.getFullYear()+1:f.getFullYear():f.getFullYear()-1}a>>>=0;b>>>=0;c>>>=0;d>>>=0;var v=u()[d+40>>>2>>>0];d={sb:r()[d>>>2>>>0],rb:r()[d+4>>>2>>>0],hb:r()[d+8>>>2>>>0],kb:r()[d+12>>>2>>>0],ib:r()[d+16>>>2>>>0],fb:r()[d+20>>>2>>>0],bb:r()[d+24>>>2>>>0],eb:r()[d+28>>>2>>>0],zb:r()[d+32>>>2>>>0],qb:r()[d+36>>>2>>>0],tb:v?Q(v):""};c=Q(c);v={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y", +"%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var z in v)c=c.replace(new RegExp(z,"g"),v[z]);var Yb="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Zb="January February March April May June July August September October November December".split(" ");v={"%a":f=>Yb[f.bb].substring(0,3), +"%A":f=>Yb[f.bb],"%b":f=>Zb[f.ib].substring(0,3),"%B":f=>Zb[f.ib],"%C":f=>h((f.fb+1900)/100|0,2),"%d":f=>h(f.kb,2),"%e":f=>g(f.kb,2," "),"%g":f=>y(f).toString().substring(2),"%G":y,"%H":f=>h(f.hb,2),"%I":f=>{f=f.hb;0==f?f=12:12{for(var q=0,t=0;t<=f.ib-1;q+=(X(f.fb+1900)?Hc:Ic)[t++]);return h(f.kb+q,3)},"%m":f=>h(f.ib+1,2),"%M":f=>h(f.rb,2),"%n":()=>"\n","%p":f=>0<=f.hb&&12>f.hb?"AM":"PM","%S":f=>h(f.sb,2),"%t":()=>"\t","%u":f=>f.bb||7,"%U":f=>h(Math.floor((f.eb+ +7-f.bb)/7),2),"%V":f=>{var q=Math.floor((f.eb+7-(f.bb+6)%7)/7);2>=(f.bb+371-f.eb-2)%7&&q++;if(q)53==q&&(t=(f.bb+371-f.eb)%7,4==t||3==t&&X(f.fb)||(q=1));else{q=52;var t=(f.bb+7-f.eb-1)%7;(4==t||5==t&&X(f.fb%400-1))&&q++}return h(q,2)},"%w":f=>f.bb,"%W":f=>h(Math.floor((f.eb+7-(f.bb+6)%7)/7),2),"%y":f=>(f.fb+1900).toString().substring(2),"%Y":f=>f.fb+1900,"%z":f=>{f=f.qb;var q=0<=f;f=Math.abs(f)/60;return(q?"+":"-")+String("0000"+(f/60*100+f%60)).slice(-4)},"%Z":f=>f.tb,"%%":()=>"%"};c=c.replace(/%%/g, +"\x00\x00");for(z in v)c.includes(z)&&(c=c.replace(new RegExp(z,"g"),v[z](d)));c=c.replace(/\0\0/g,"%");z=Jc(c);if(z.length>b)return 0;Kc(z,a);return z.length-1}function Qb(a,b,c,d){return Pb(a>>>0,b>>>0,c>>>0,d>>>0)}C||fc(); +var xc=[Ob,dc,qc,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,sb,tb,Hb,Ib,Kb,Lb,Mb,Nb],Sa,Z=function(){function a(c,d){Z=c.exports;Z=Lc();ec.push(Z.Ra);mc=Z.Sa;Ha.unshift(Z.$);Ea=d;Ka();return Z}var b=va();O++;if(w.instantiateWasm)try{return w.instantiateWasm(b,a)}catch(c){I(`Module.instantiateWasm callback failed with error: ${c}`),x(c)}Na||=w.locateFile?Ma("ort-training-wasm-simd-threaded.wasm")?"ort-training-wasm-simd-threaded.wasm":w.locateFile?w.locateFile("ort-training-wasm-simd-threaded.wasm",F): +F+"ort-training-wasm-simd-threaded.wasm":(new URL("ort-training-wasm-simd-threaded.wasm",import.meta.url)).href;Ra(b,function(c){a(c.instance,c.module)}).catch(x);return{}}();w._OrtInit=(a,b)=>(w._OrtInit=Z.aa)(a,b);w._OrtGetLastError=(a,b)=>(w._OrtGetLastError=Z.ba)(a,b);w._OrtCreateSessionOptions=(a,b,c,d,g,h,k,p,y,v)=>(w._OrtCreateSessionOptions=Z.ca)(a,b,c,d,g,h,k,p,y,v);w._OrtAppendExecutionProvider=(a,b)=>(w._OrtAppendExecutionProvider=Z.da)(a,b); +w._OrtAddFreeDimensionOverride=(a,b,c)=>(w._OrtAddFreeDimensionOverride=Z.ea)(a,b,c);w._OrtAddSessionConfigEntry=(a,b,c)=>(w._OrtAddSessionConfigEntry=Z.fa)(a,b,c);w._OrtReleaseSessionOptions=a=>(w._OrtReleaseSessionOptions=Z.ga)(a);w._OrtCreateSession=(a,b,c)=>(w._OrtCreateSession=Z.ha)(a,b,c);w._OrtReleaseSession=a=>(w._OrtReleaseSession=Z.ia)(a);w._OrtGetInputOutputCount=(a,b,c)=>(w._OrtGetInputOutputCount=Z.ja)(a,b,c);w._OrtGetInputName=(a,b)=>(w._OrtGetInputName=Z.ka)(a,b); +w._OrtGetOutputName=(a,b)=>(w._OrtGetOutputName=Z.la)(a,b);w._OrtFree=a=>(w._OrtFree=Z.ma)(a);w._OrtCreateTensor=(a,b,c,d,g,h)=>(w._OrtCreateTensor=Z.na)(a,b,c,d,g,h);w._OrtGetTensorData=(a,b,c,d,g)=>(w._OrtGetTensorData=Z.oa)(a,b,c,d,g);w._OrtReleaseTensor=a=>(w._OrtReleaseTensor=Z.pa)(a);w._OrtCreateRunOptions=(a,b,c,d)=>(w._OrtCreateRunOptions=Z.qa)(a,b,c,d);w._OrtAddRunConfigEntry=(a,b,c)=>(w._OrtAddRunConfigEntry=Z.ra)(a,b,c);w._OrtReleaseRunOptions=a=>(w._OrtReleaseRunOptions=Z.sa)(a); +w._OrtCreateBinding=a=>(w._OrtCreateBinding=Z.ta)(a);w._OrtBindInput=(a,b,c)=>(w._OrtBindInput=Z.ua)(a,b,c);w._OrtBindOutput=(a,b,c,d)=>(w._OrtBindOutput=Z.va)(a,b,c,d);w._OrtClearBoundOutputs=a=>(w._OrtClearBoundOutputs=Z.wa)(a);w._OrtReleaseBinding=a=>(w._OrtReleaseBinding=Z.xa)(a);w._OrtRunWithBinding=(a,b,c,d,g)=>(w._OrtRunWithBinding=Z.ya)(a,b,c,d,g);w._OrtRun=(a,b,c,d,g,h,k,p)=>(w._OrtRun=Z.za)(a,b,c,d,g,h,k,p);w._OrtEndProfiling=a=>(w._OrtEndProfiling=Z.Aa)(a); +w._OrtTrainingLoadCheckpoint=(a,b)=>(w._OrtTrainingLoadCheckpoint=Z.Ba)(a,b);w._OrtTrainingReleaseCheckpoint=a=>(w._OrtTrainingReleaseCheckpoint=Z.Ca)(a);w._OrtTrainingCreateSession=(a,b,c,d,g,h,k,p)=>(w._OrtTrainingCreateSession=Z.Da)(a,b,c,d,g,h,k,p);w._OrtTrainingLazyResetGrad=a=>(w._OrtTrainingLazyResetGrad=Z.Ea)(a);w._OrtTrainingRunTrainStep=(a,b,c,d,g,h)=>(w._OrtTrainingRunTrainStep=Z.Fa)(a,b,c,d,g,h);w._OrtTrainingOptimizerStep=(a,b)=>(w._OrtTrainingOptimizerStep=Z.Ga)(a,b); +w._OrtTrainingEvalStep=(a,b,c,d,g,h)=>(w._OrtTrainingEvalStep=Z.Ha)(a,b,c,d,g,h);w._OrtTrainingGetParametersSize=(a,b,c)=>(w._OrtTrainingGetParametersSize=Z.Ia)(a,b,c);w._OrtTrainingCopyParametersToBuffer=(a,b,c,d)=>(w._OrtTrainingCopyParametersToBuffer=Z.Ja)(a,b,c,d);w._OrtTrainingCopyParametersFromBuffer=(a,b,c,d)=>(w._OrtTrainingCopyParametersFromBuffer=Z.Ka)(a,b,c,d);w._OrtTrainingGetModelInputOutputCount=(a,b,c,d)=>(w._OrtTrainingGetModelInputOutputCount=Z.La)(a,b,c,d); +w._OrtTrainingGetModelInputOutputName=(a,b,c,d)=>(w._OrtTrainingGetModelInputOutputName=Z.Ma)(a,b,c,d);w._OrtTrainingReleaseSession=a=>(w._OrtTrainingReleaseSession=Z.Na)(a);var K=()=>(K=Z.Oa)();w._malloc=a=>(w._malloc=Z.Pa)(a);w._free=a=>(w._free=Z.Qa)(a);var wa=(a,b,c,d,g,h)=>(wa=Z.Ta)(a,b,c,d,g,h),Da=()=>(Da=Z.Ua)(),bc=(a,b,c,d,g)=>(bc=Z.Va)(a,b,c,d,g),hc=a=>(hc=Z.Wa)(a),Ba=a=>(Ba=Z.Xa)(a),vc=()=>(vc=Z.Ya)(),kc=(a,b)=>(kc=Z.Za)(a,b),cc=a=>(cc=Z._a)(a),ac=a=>(ac=Z.$a)(a),$b=()=>($b=Z.ab)(); +w.___start_em_js=893554;w.___stop_em_js=893615;function Lc(){var a=Z;a=Object.assign({},a);var b=d=>()=>d()>>>0,c=d=>g=>d(g)>>>0;a.Oa=b(a.Oa);a.Pa=c(a.Pa);a.emscripten_main_runtime_thread_id=b(a.emscripten_main_runtime_thread_id);a.$a=c(a.$a);a.ab=b(a.ab);return a}w.stackSave=()=>$b();w.stackRestore=a=>cc(a);w.stackAlloc=a=>ac(a);w.UTF8ToString=Q;w.stringToUTF8=W;w.lengthBytesUTF8=tc;var Mc;P=function Nc(){Mc||Oc();Mc||(P=Nc)}; +function Oc(){0 { + var _scriptName = import.meta.url; + + return ( +async function(moduleArg = {}) { + var moduleRtn; + +function e(){m.buffer!=q.buffer&&u();return q}function w(){m.buffer!=q.buffer&&u();return ba}function ca(){m.buffer!=q.buffer&&u();return da}function ea(){m.buffer!=q.buffer&&u();return fa}function z(){m.buffer!=q.buffer&&u();return ha}function A(){m.buffer!=q.buffer&&u();return ia}function ja(){m.buffer!=q.buffer&&u();return ka}function la(){m.buffer!=q.buffer&&u();return ma} +var B=Object.assign({},moduleArg),na,oa,pa=new Promise((a,b)=>{na=a;oa=b}),qa="object"==typeof window,C="function"==typeof importScripts,D="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,E=C&&"em-pthread"==self.name;if(D){const {createRequire:a}=await import("module");var require=a(import.meta.url),ra=require("worker_threads");global.Worker=ra.Worker;E=(C=!ra.lc)&&"em-pthread"==ra.workerData}"use strict"; +B.mountExternalData=(a,b)=>{(B.Fb||(B.Fb=new Map)).set(a,b)};B.unmountExternalData=()=>{delete B.Fb};var SharedArrayBuffer=globalThis.SharedArrayBuffer??(new WebAssembly.Memory({initial:0,maximum:0,shared:!0})).buffer.constructor;"use strict"; +let ta=()=>{const a=(c,d,f)=>(...g)=>{const k=F,l=d?.();g=c(...g);const p=d?.();l!==p&&(c=p,f(l),d=f=null);return F!=k?sa():g},b=c=>async(...d)=>{try{if(B.Eb)throw Error("Session already started");const f=B.Eb={bc:d[0],errors:[]},g=await c(...d);if(B.Eb!==f)throw Error("Session mismatch");B.Mb?.flush();const k=f.errors;if(0p);if(0B._OrtCreateSession, +c=>B._OrtCreateSession=c);B._OrtRun=b(a(B._OrtRun,()=>B._OrtRun,c=>B._OrtRun=c));B._OrtRunWithBinding=b(a(B._OrtRunWithBinding,()=>B._OrtRunWithBinding,c=>B._OrtRunWithBinding=c));B._OrtBindInput=a(B._OrtBindInput,()=>B._OrtBindInput,c=>B._OrtBindInput=c);ta=void 0}; +B.jsepInit=(a,b)=>{ta?.();if("webgpu"===a){[B.Mb,B.Tb,B.Xb,B.Nb,B.Wb,B.jb,B.Yb,B.$b,B.Ub,B.Vb,B.Zb]=b;const c=B.Mb;B.jsepRegisterBuffer=(d,f,g,k)=>c.registerBuffer(d,f,g,k);B.jsepGetBuffer=d=>c.getBuffer(d);B.jsepCreateDownloader=(d,f,g)=>c.createDownloader(d,f,g);B.jsepOnReleaseSession=d=>{c.onReleaseSession(d)};B.jsepOnRunStart=d=>c.onRunStart(d)}};var ua=Object.assign({},B),va="./this.program",wa=(a,b)=>{throw b;},G="",xa,ya,za; +if(D){var fs=require("fs"),Aa=require("path");G=require("url").fileURLToPath(new URL("./",import.meta.url));xa=(a,b)=>{a=Ba(a)?new URL(a):Aa.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};za=a=>{a=xa(a,!0);a.buffer||(a=new Uint8Array(a));return a};ya=(a,b,c,d=!0)=>{a=Ba(a)?new URL(a):Aa.normalize(a);fs.readFile(a,d?void 0:"utf8",(f,g)=>{f?c(f):b(d?g.buffer:g)})};!B.thisProgram&&1{process.exitCode= +a;throw b;}}else if(qa||C)C?G=self.location.href:"undefined"!=typeof document&&document.currentScript&&(G=document.currentScript.src),_scriptName&&(G=_scriptName),G.startsWith("blob:")?G="":G=G.substr(0,G.replace(/[?#].*/,"").lastIndexOf("/")+1),D||(xa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},C&&(za=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ya=(a,b,c)=>{var d=new XMLHttpRequest; +d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)});D&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var Ca=console.log.bind(console),Da=console.error.bind(console);D&&(Ca=(...a)=>fs.writeSync(1,a.join(" ")+"\n"),Da=(...a)=>fs.writeSync(2,a.join(" ")+"\n"));var Ea=Ca,H=Da;Object.assign(B,ua);ua=null; +if(E){var Fa;if(D){var Ga=ra.parentPort;Ga.on("message",b=>onmessage({data:b}));Object.assign(globalThis,{self:global,importScripts:()=>{},postMessage:b=>Ga.postMessage(b),performance:global.performance||{now:Date.now}})}var Ha=!1;H=function(...b){b=b.join(" ");D?fs.writeSync(2,b+"\n"):console.error(b)};self.alert=function(...b){postMessage({Lb:"alert",text:b.join(" "),mc:Ia()})};B.instantiateWasm=(b,c)=>new Promise(d=>{Fa=f=>{f=new WebAssembly.Instance(f,Ja());c(f);d()}});self.onunhandledrejection= +b=>{throw b.reason||b;};function a(b){try{var c=b.data,d=c.cmd;if("load"===d){let f=[];self.onmessage=g=>f.push(g);self.startWorker=()=>{postMessage({cmd:"loaded"});for(let g of f)a(g);self.onmessage=a};for(const g of c.handlers)if(!B[g]||B[g].proxy)B[g]=(...k)=>{postMessage({Lb:"callHandler",kc:g,args:k})},"print"==g&&(Ea=B[g]),"printErr"==g&&(H=B[g]);m=c.wasmMemory;u();Fa(c.wasmModule)}else if("run"===d){Ka(c.pthread_ptr,0,0,1,0,0);La(c.pthread_ptr);Ma();Na();Ha||(Oa(),Ha=!0);try{Pa(c.start_routine, +c.arg)}catch(f){if("unwind"!=f)throw f;}}else"cancel"===d?Ia()&&Qa(-1):"setimmediate"!==c.target&&("checkMailbox"===d?Ha&&Ra():d&&(H(`worker: received unknown command ${d}`),H(c)))}catch(f){throw Sa(),f;}}self.onmessage=a}var Ta;B.wasmBinary&&(Ta=B.wasmBinary);var m,Ua,I=!1,Va,q,ba,da,fa,ha,ia,ka,J,Wa,ma; +function u(){var a=m.buffer;B.HEAP8=q=new Int8Array(a);B.HEAP16=da=new Int16Array(a);B.HEAPU8=ba=new Uint8Array(a);B.HEAPU16=fa=new Uint16Array(a);B.HEAP32=ha=new Int32Array(a);B.HEAPU32=ia=new Uint32Array(a);B.HEAPF32=ka=new Float32Array(a);B.HEAPF64=ma=new Float64Array(a);B.HEAP64=J=new BigInt64Array(a);B.HEAPU64=Wa=new BigUint64Array(a)} +if(!E){m=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0});if(!(m.buffer instanceof SharedArrayBuffer))throw H("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),D&&H("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");u()} +var Xa=[],Ya=[],Za=[],$a=0,ab=null,bb=null;function cb(){$a--;if(0==$a&&(null!==ab&&(clearInterval(ab),ab=null),bb)){var a=bb;bb=null;a()}}function db(a){a="Aborted("+a+")";H(a);I=!0;Va=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");oa(a);throw a;}var eb=a=>a.startsWith("data:application/octet-stream;base64,"),Ba=a=>a.startsWith("file://"),fb; +function gb(a){if(a==fb&&Ta)return new Uint8Array(Ta);if(za)return za(a);throw"both async and sync fetching of the wasm failed";}function hb(a){if(!Ta&&(qa||C)){if("function"==typeof fetch&&!Ba(a))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>gb(a));if(ya)return new Promise((b,c)=>{ya(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>gb(a))} +function ib(a,b,c){return hb(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{H(`failed to asynchronously prepare wasm: ${d}`);db(d)})}function jb(a,b){var c=fb;return Ta||"function"!=typeof WebAssembly.instantiateStreaming||eb(c)||Ba(c)||D||"function"!=typeof fetch?ib(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(f){H(`wasm streaming compile failed: ${f}`);H("falling back to ArrayBuffer instantiation");return ib(c,a,b)}))} +function Ja(){kb={M:lb,za:mb,b:nb,$:ob,z:pb,pa:qb,X:rb,Z:sb,qa:tb,na:ub,ga:vb,ma:wb,J:xb,Y:yb,V:zb,oa:Ab,W:Bb,va:Cb,D:Db,P:Eb,O:Fb,C:Gb,s:Hb,p:Ib,E:Jb,y:Kb,Q:Lb,ta:Mb,ja:Nb,T:Ob,aa:Pb,F:Qb,ia:La,sa:Rb,u:Sb,B:Tb,o:Ub,m:Vb,c:Wb,n:Xb,k:Yb,Aa:Zb,r:$b,f:ac,v:bc,l:cc,g:dc,i:ec,j:fc,h:gc,e:hc,da:ic,ea:jc,fa:kc,ba:lc,ca:mc,S:nc,d:oc,N:pc,G:qc,K:rc,w:sc,ra:tc,U:uc,t:vc,x:wc,L:xc,R:yc,ya:zc,xa:Ac,ka:Bc,la:Cc,_:Dc,A:Ec,I:Fc,ha:Gc,H:Hc,a:m,wa:Ic,ua:Jc,q:Kc};return{a:kb}} +var Lc={849620:(a,b,c,d)=>{if("undefined"==typeof B||!B.Fb)return 1;a=K(a>>>0);a.startsWith("./")&&(a=a.substring(2));a=B.Fb.get(a);if(!a)return 2;b>>>=0;c>>>=0;d>>>=0;if(b+c>a.byteLength)return 3;try{return w().set(a.subarray(b,b+c),d>>>0),0}catch{return 4}},850121:()=>{B.Ub()},850152:()=>{B.Vb()},850181:()=>{B.Zb()},850206:a=>B.Tb(a),850239:a=>B.Xb(a),850271:(a,b,c)=>{B.Nb(a,b,c,!0)},850310:(a,b,c)=>{B.Nb(a,b,c)},850343:()=>"undefined"!==typeof wasmOffsetConverter,850400:a=>{B.jb("Abs",a,void 0)}, +850451:a=>{B.jb("Neg",a,void 0)},850502:a=>{B.jb("Floor",a,void 0)},850555:a=>{B.jb("Ceil",a,void 0)},850607:a=>{B.jb("Reciprocal",a,void 0)},850665:a=>{B.jb("Sqrt",a,void 0)},850717:a=>{B.jb("Exp",a,void 0)},850768:a=>{B.jb("Erf",a,void 0)},850819:a=>{B.jb("Sigmoid",a,void 0)},850874:(a,b,c)=>{B.jb("HardSigmoid",a,{alpha:b,beta:c})},850953:a=>{B.jb("Log",a,void 0)},851004:a=>{B.jb("Sin",a,void 0)},851055:a=>{B.jb("Cos",a,void 0)},851106:a=>{B.jb("Tan",a,void 0)},851157:a=>{B.jb("Asin",a,void 0)}, +851209:a=>{B.jb("Acos",a,void 0)},851261:a=>{B.jb("Atan",a,void 0)},851313:a=>{B.jb("Sinh",a,void 0)},851365:a=>{B.jb("Cosh",a,void 0)},851417:a=>{B.jb("Asinh",a,void 0)},851470:a=>{B.jb("Acosh",a,void 0)},851523:a=>{B.jb("Atanh",a,void 0)},851576:a=>{B.jb("Tanh",a,void 0)},851628:a=>{B.jb("Not",a,void 0)},851679:(a,b,c)=>{B.jb("Clip",a,{min:b,max:c})},851748:a=>{B.jb("Clip",a,void 0)},851800:(a,b)=>{B.jb("Elu",a,{alpha:b})},851858:a=>{B.jb("Relu",a,void 0)},851910:(a,b)=>{B.jb("LeakyRelu",a,{alpha:b})}, +851974:(a,b)=>{B.jb("ThresholdedRelu",a,{alpha:b})},852044:(a,b)=>{B.jb("Cast",a,{to:b})},852102:a=>{B.jb("Add",a,void 0)},852153:a=>{B.jb("Sub",a,void 0)},852204:a=>{B.jb("Mul",a,void 0)},852255:a=>{B.jb("Div",a,void 0)},852306:a=>{B.jb("Pow",a,void 0)},852357:a=>{B.jb("Equal",a,void 0)},852410:a=>{B.jb("Greater",a,void 0)},852465:a=>{B.jb("GreaterOrEqual",a,void 0)},852527:a=>{B.jb("Less",a,void 0)},852579:a=>{B.jb("LessOrEqual",a,void 0)},852638:(a,b,c,d,f)=>{B.jb("ReduceMean",a,{keepDims:!!b, +noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},852797:(a,b,c,d,f)=>{B.jb("ReduceMax",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},852955:(a,b,c,d,f)=>{B.jb("ReduceMin",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},853113:(a,b,c,d,f)=>{B.jb("ReduceProd",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},853272:(a,b,c,d,f)=>{B.jb("ReduceSum",a,{keepDims:!!b, +noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},853430:(a,b,c,d,f)=>{B.jb("ReduceL1",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},853587:(a,b,c,d,f)=>{B.jb("ReduceL2",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},853744:(a,b,c,d,f)=>{B.jb("ReduceLogSum",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},853905:(a,b,c,d,f)=>{B.jb("ReduceSumSquare",a, +{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},854069:(a,b,c,d,f)=>{B.jb("ReduceLogSumExp",a,{keepDims:!!b,noopWithEmptyAxes:!!c,axes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},854233:a=>{B.jb("Where",a,void 0)},854286:(a,b,c)=>{B.jb("Transpose",a,{perm:b?Array.from(z().subarray(b>>>0,c>>>0)):[]})},854394:(a,b,c,d)=>{B.jb("DepthToSpace",a,{blocksize:b,mode:K(c),format:d?"NHWC":"NCHW"})},854527:(a,b,c,d)=>{B.jb("DepthToSpace",a,{blocksize:b,mode:K(c),format:d? +"NHWC":"NCHW"})},854660:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t)=>{B.jb("ConvTranspose",a,{format:p?"NHWC":"NCHW",autoPad:b,dilations:[c],group:d,kernelShape:[f],pads:[g,k],strides:[l],wIsConst:()=>!!e()[n>>>0],outputPadding:r?Array.from(z().subarray(r>>>0,x>>>0)):[],outputShape:y?Array.from(z().subarray(y>>>0,h>>>0)):[],activation:K(t)})},855061:(a,b,c,d,f,g,k,l,p,n,r,x,y,h)=>{B.jb("ConvTranspose",a,{format:l?"NHWC":"NCHW",autoPad:b,dilations:Array.from(z().subarray(c>>>0,(c>>>0)+2>>>0)),group:d,kernelShape:Array.from(z().subarray(f>>> +0,(f>>>0)+2>>>0)),pads:Array.from(z().subarray(g>>>0,(g>>>0)+4>>>0)),strides:Array.from(z().subarray(k>>>0,(k>>>0)+2>>>0)),wIsConst:()=>!!e()[p>>>0],outputPadding:n?Array.from(z().subarray(n>>>0,r>>>0)):[],outputShape:x?Array.from(z().subarray(x>>>0,y>>>0)):[],activation:K(h)})},855626:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t)=>{B.jb("ConvTranspose",a,{format:p?"NHWC":"NCHW",autoPad:b,dilations:[c],group:d,kernelShape:[f],pads:[g,k],strides:[l],wIsConst:()=>!!e()[n>>>0],outputPadding:r?Array.from(z().subarray(r>>> +0,x>>>0)):[],outputShape:y?Array.from(z().subarray(y>>>0,h>>>0)):[],activation:K(t)})},856027:(a,b,c,d,f,g,k,l,p,n,r,x,y,h)=>{B.jb("ConvTranspose",a,{format:l?"NHWC":"NCHW",autoPad:b,dilations:Array.from(z().subarray(c>>>0,(c>>>0)+2>>>0)),group:d,kernelShape:Array.from(z().subarray(f>>>0,(f>>>0)+2>>>0)),pads:Array.from(z().subarray(g>>>0,(g>>>0)+4>>>0)),strides:Array.from(z().subarray(k>>>0,(k>>>0)+2>>>0)),wIsConst:()=>!!e()[p>>>0],outputPadding:n?Array.from(z().subarray(n>>>0,r>>>0)):[],outputShape:x? +Array.from(z().subarray(x>>>0,y>>>0)):[],activation:K(h)})},856592:(a,b)=>{B.jb("GlobalAveragePool",a,{format:b?"NHWC":"NCHW"})},856683:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.jb("AveragePool",a,{format:v?"NHWC":"NCHW",auto_pad:b,ceil_mode:c,count_include_pad:d,storage_order:f,dilations:[g,k],kernel_shape:[l,p],pads:[n,r,x,y],strides:[h,t]})},856967:(a,b)=>{B.jb("GlobalAveragePool",a,{format:b?"NHWC":"NCHW"})},857058:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.jb("AveragePool",a,{format:v?"NHWC":"NCHW",auto_pad:b, +ceil_mode:c,count_include_pad:d,storage_order:f,dilations:[g,k],kernel_shape:[l,p],pads:[n,r,x,y],strides:[h,t]})},857342:(a,b)=>{B.jb("GlobalMaxPool",a,{format:b?"NHWC":"NCHW"})},857429:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.jb("MaxPool",a,{format:v?"NHWC":"NCHW",auto_pad:b,ceil_mode:c,count_include_pad:d,storage_order:f,dilations:[g,k],kernel_shape:[l,p],pads:[n,r,x,y],strides:[h,t]})},857709:(a,b)=>{B.jb("GlobalMaxPool",a,{format:b?"NHWC":"NCHW"})},857796:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.jb("MaxPool", +a,{format:v?"NHWC":"NCHW",auto_pad:b,ceil_mode:c,count_include_pad:d,storage_order:f,dilations:[g,k],kernel_shape:[l,p],pads:[n,r,x,y],strides:[h,t]})},858076:(a,b,c,d,f)=>{B.jb("Gemm",a,{alpha:b,beta:c,transA:d,transB:f})},858180:a=>{B.jb("MatMul",a,void 0)},858234:(a,b,c,d)=>{B.jb("ArgMax",a,{keepDims:!!b,selectLastIndex:!!c,axis:d})},858342:(a,b,c,d)=>{B.jb("ArgMin",a,{keepDims:!!b,selectLastIndex:!!c,axis:d})},858450:(a,b)=>{B.jb("Softmax",a,{axis:b})},858513:(a,b)=>{B.jb("Concat",a,{axis:b})}, +858573:(a,b,c,d,f)=>{B.jb("Split",a,{axis:b,numOutputs:c,splitSizes:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},858713:a=>{B.jb("Expand",a,void 0)},858767:(a,b)=>{B.jb("Gather",a,{axis:Number(b)})},858838:(a,b)=>{B.jb("GatherElements",a,{axis:Number(b)})},858917:(a,b,c,d,f,g,k,l,p,n,r)=>{B.jb("Resize",a,{antialias:b,axes:c?Array.from(z().subarray(c>>>0,d>>>0)):[],coordinateTransformMode:K(f),cubicCoeffA:g,excludeOutside:k,extrapolationValue:l,keepAspectRatioPolicy:K(p),mode:K(n),nearestMode:K(r)})}, +859263:(a,b,c,d,f,g,k)=>{B.jb("Slice",a,{starts:b?Array.from(z().subarray(b>>>0,c>>>0)):[],ends:d?Array.from(z().subarray(d>>>0,f>>>0)):[],axes:g?Array.from(z().subarray(g>>>0,k>>>0)):[]})},859479:a=>{B.jb("Tile",a,void 0)},859531:(a,b,c)=>{B.jb("InstanceNormalization",a,{epsilon:b,format:c?"NHWC":"NCHW"})},859645:(a,b,c)=>{B.jb("InstanceNormalization",a,{epsilon:b,format:c?"NHWC":"NCHW"})},859759:a=>{B.jb("Range",a,void 0)},859812:(a,b)=>{B.jb("Einsum",a,{equation:K(b)})},859893:(a,b,c,d,f)=>{B.jb("Pad", +a,{mode:b,value:c,pads:d?Array.from(z().subarray(d>>>0,f>>>0)):[]})},860020:(a,b,c,d,f,g)=>{B.jb("BatchNormalization",a,{epsilon:b,momentum:c,spatial:!!f,trainingMode:!!d,format:g?"NHWC":"NCHW"})},860189:(a,b,c,d,f,g)=>{B.jb("BatchNormalization",a,{epsilon:b,momentum:c,spatial:!!f,trainingMode:!!d,format:g?"NHWC":"NCHW"})},860358:(a,b,c)=>{B.jb("CumSum",a,{exclusive:Number(b),reverse:Number(c)})},860455:(a,b,c,d,f,g,k,l,p)=>{B.jb("Attention",a,{numHeads:b,isUnidirectional:c,maskFilterValue:d,scale:f, +doRotary:g,qkvHiddenSizes:k?Array.from(z().subarray(Number(l)>>>0,Number(l)+k>>>0)):[],pastPresentShareBuffer:!!p})},860727:a=>{B.jb("BiasAdd",a,void 0)},860782:a=>{B.jb("BiasSplitGelu",a,void 0)},860843:a=>{B.jb("FastGelu",a,void 0)},860899:(a,b,c,d,f,g,k,l,p,n,r,x,y,h,t,v)=>{B.jb("Conv",a,{format:x?"NHWC":"NCHW",auto_pad:b,dilations:c?Array.from(z().subarray(c>>>0,d>>>0)):[],group:f,kernel_shape:g?Array.from(z().subarray(g>>>0,k>>>0)):[],pads:l?Array.from(z().subarray(l>>>0,p>>>0)):[],strides:n? +Array.from(z().subarray(n>>>0,r>>>0)):[],w_is_const:()=>!!e()[y>>>0],activation:K(h),activation_params:t?Array.from(ja().subarray(t>>>0,v>>>0)):[]})},861395:a=>{B.jb("Gelu",a,void 0)},861447:(a,b,c,d)=>{B.jb("GroupQueryAttention",a,{numHeads:b,kvNumHeads:c,scale:d})},861560:(a,b,c,d)=>{B.jb("LayerNormalization",a,{axis:b,epsilon:c,simplified:!!d})},861671:(a,b,c,d)=>{B.jb("LayerNormalization",a,{axis:b,epsilon:c,simplified:!!d})},861782:(a,b,c,d,f,g)=>{B.jb("MatMulNBits",a,{k:b,n:c,accuracyLevel:d, +bits:f,blockSize:g})},861909:(a,b,c,d,f,g)=>{B.jb("MultiHeadAttention",a,{numHeads:b,isUnidirectional:c,maskFilterValue:d,scale:f,doRotary:g})},862068:(a,b)=>{B.jb("QuickGelu",a,{alpha:b})},862132:(a,b,c,d,f)=>{B.jb("RotaryEmbedding",a,{interleaved:!!b,numHeads:c,rotaryEmbeddingDim:d,scale:f})},862271:(a,b,c)=>{B.jb("SkipLayerNormalization",a,{epsilon:b,simplified:!!c})},862373:a=>{B.Yb(a)},862407:(a,b)=>B.$b(a,b,B.Eb.bc,B.Eb.errors),862519:(a,b,c)=>{B.jb("SkipLayerNormalization",a,{epsilon:b,simplified:!!c})}}; +function mb(a,b,c){return Mc(async()=>{await B.Wb(a,b,c)})}function lb(){return"undefined"!==typeof wasmOffsetConverter}function Nc(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} +var Oc=a=>{a.terminate();a.onmessage=()=>{}},Rc=a=>{0==L.length&&(Pc(),Qc(L[0]));var b=L.pop();if(!b)return 6;M.push(b);N[a.Ab]=b;b.Ab=a.Ab;var c={cmd:"run",start_routine:a.cc,arg:a.Pb,pthread_ptr:a.Ab};D&&b.unref();b.postMessage(c,a.ic);return 0},O=0,P=(a,b,...c)=>{for(var d=2*c.length,f=Sc(),g=Tc(8*d),k=g>>>3,l=0;l>>0]=p)}a=Vc(a,0,d,g,b);Wc(f);return a}; +function Ic(a){if(E)return P(0,1,a);Va=a;if(!(0{Va=a;if(E)throw Xc(a),"unwind";Ic(a)},L=[],M=[],Yc=[],N={};function Zc(){for(var a=B.numThreads-1;a--;)Pc();Xa.unshift(()=>{$a++;$c(()=>cb())})}var bd=a=>{var b=a.Ab;delete N[b];L.push(a);M.splice(M.indexOf(a),1);a.Ab=0;ad(b)};function Na(){Yc.forEach(a=>a())} +var Qc=a=>new Promise(b=>{a.onmessage=g=>{g=g.data;var k=g.cmd;if(g.targetThread&&g.targetThread!=Ia()){var l=N[g.targetThread];l?l.postMessage(g,g.transferList):H(`Internal error! Worker sent a message "${k}" to target pthread ${g.targetThread}, but that thread no longer exists!`)}else if("checkMailbox"===k)Ra();else if("spawnThread"===k)Rc(g);else if("cleanupThread"===k)bd(N[g.thread]);else if("killThread"===k)g=g.thread,k=N[g],delete N[g],Oc(k),ad(g),M.splice(M.indexOf(k),1),k.Ab=0;else if("cancelThread"=== +k)N[g.thread].postMessage({cmd:"cancel"});else if("loaded"===k)a.loaded=!0,D&&!a.Ab&&a.unref(),b(a);else if("alert"===k)alert(`Thread ${g.threadId}: ${g.text}`);else if("setimmediate"===g.target)a.postMessage(g);else if("callHandler"===k)B[g.handler](...g.args);else k&&H(`worker sent an unknown command ${k}`)};a.onerror=g=>{H(`${"worker sent an error!"} ${g.filename}:${g.lineno}: ${g.message}`);throw g;};D&&(a.on("message",g=>a.onmessage({data:g})),a.on("error",g=>a.onerror(g)));var c=[],d=[],f;for(f of d)B.hasOwnProperty(f)&& +c.push(f);a.postMessage({cmd:"load",handlers:c,wasmMemory:m,wasmModule:Ua})});function $c(a){E?a():Promise.all(L.map(Qc)).then(a)}function Pc(){var a=new Worker(new URL(import.meta.url),{type:"module",workerData:"em-pthread",name:"em-pthread"});L.push(a)}var cd=a=>{for(;0{var a=Ia(),b=A()[a+52>>>2>>>0];a=A()[a+56>>>2>>>0];dd(b,b-a);Wc(b)},Pa=(a,b)=>{O=0;a=ed(a,b);0>>=0;var d=new fd(a);b>>>=0;c>>>=0;A()[d.Ib+16>>>2>>>0]=0;A()[d.Ib+4>>>2>>>0]=b;A()[d.Ib+8>>>2>>>0]=c;gd=a;hd++;throw gd;}function jd(a,b,c,d){return E?P(2,1,a,b,c,d):ob(a,b,c,d)} +function ob(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;if("undefined"==typeof SharedArrayBuffer)return H("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var f=[];if(E&&0===f.length)return jd(a,b,c,d);a={cc:c,Ab:a,Pb:d,ic:f};return E?(a.Lb="spawnThread",postMessage(a,f),0):Rc(a)} +var kd="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ld=(a,b,c)=>{b>>>=0;var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>> +10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d},K=(a,b)=>(a>>>=0)?ld(w(),a,b):"";function pb(a,b,c){return E?P(3,1,a,b,c):0}function qb(a,b){if(E)return P(4,1,a,b)} +var md=a=>{for(var b=0,c=0;c=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},nd=(a,b,c,d)=>{c>>>=0;if(!(0=k){var l=a.charCodeAt(++g);k=65536+((k&1023)<<10)|l&1023}if(127>=k){if(c>=d)break;b[c++>>>0]=k}else{if(2047>=k){if(c+1>=d)break;b[c++>>>0]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++>>>0]=224|k>>12}else{if(c+3>=d)break;b[c++>>>0]=240|k>> +18;b[c++>>>0]=128|k>>12&63}b[c++>>>0]=128|k>>6&63}b[c++>>>0]=128|k&63}}b[c>>>0]=0;return c-f},od=(a,b,c)=>nd(a,w(),b,c);function rb(a,b){if(E)return P(5,1,a,b)}function sb(a,b,c){if(E)return P(6,1,a,b,c)}function tb(a,b,c){return E?P(7,1,a,b,c):0}function ub(a,b){if(E)return P(8,1,a,b)}function vb(a,b,c){if(E)return P(9,1,a,b,c)}function wb(a,b,c,d){if(E)return P(10,1,a,b,c,d)}function xb(a,b,c,d){if(E)return P(11,1,a,b,c,d)}function yb(a,b,c,d){if(E)return P(12,1,a,b,c,d)} +function zb(a){if(E)return P(13,1,a)}function Ab(a,b){if(E)return P(14,1,a,b)}function Bb(a,b,c){if(E)return P(15,1,a,b,c)}var Cb=()=>{db("")},pd,Q=a=>{for(var b="";w()[a>>>0];)b+=pd[w()[a++>>>0]];return b},qd={},rd={},sd={},R; +function td(a,b,c={}){var d=b.name;if(!a)throw new R(`type "${d}" must have a positive integer typeid pointer`);if(rd.hasOwnProperty(a)){if(c.Rb)return;throw new R(`Cannot register type '${d}' twice`);}rd[a]=b;delete sd[a];qd.hasOwnProperty(a)&&(b=qd[a],delete qd[a],b.forEach(f=>f()))}function S(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");return td(a,b,c)} +var ud=(a,b,c)=>{switch(b){case 1:return c?d=>e()[d>>>0]:d=>w()[d>>>0];case 2:return c?d=>ca()[d>>>1>>>0]:d=>ea()[d>>>1>>>0];case 4:return c?d=>z()[d>>>2>>>0]:d=>A()[d>>>2>>>0];case 8:return c?d=>J[d>>>3]:d=>Wa[d>>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}}; +function Db(a,b,c){a>>>=0;c>>>=0;b=Q(b>>>0);S(a,{name:b,fromWireType:d=>d,toWireType:function(d,f){if("bigint"!=typeof f&&"number"!=typeof f)throw null===f?f="null":(d=typeof f,f="object"===d||"array"===d||"function"===d?f.toString():""+f),new TypeError(`Cannot convert "${f}" to ${this.name}`);"number"==typeof f&&(f=BigInt(f));return f},argPackAdvance:T,readValueFromPointer:ud(b,c,-1==b.indexOf("u")),Db:null})}var T=8; +function Eb(a,b,c,d){a>>>=0;b=Q(b>>>0);S(a,{name:b,fromWireType:function(f){return!!f},toWireType:function(f,g){return g?c:d},argPackAdvance:T,readValueFromPointer:function(f){return this.fromWireType(w()[f>>>0])},Db:null})}var vd=[],U=[];function Wb(a){a>>>=0;9{if(!a)throw new R("Cannot use deleted val. handle = "+a);return U[a]},W=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=vd.pop()||U.length;U[b]=a;U[b+1]=1;return b}};function wd(a){return this.fromWireType(A()[a>>>2>>>0])}var xd={name:"emscripten::val",fromWireType:a=>{var b=V(a);Wb(a);return b},toWireType:(a,b)=>W(b),argPackAdvance:T,readValueFromPointer:wd,Db:null};function Fb(a){return S(a>>>0,xd)} +var yd=(a,b)=>{switch(b){case 4:return function(c){return this.fromWireType(ja()[c>>>2>>>0])};case 8:return function(c){return this.fromWireType(la()[c>>>3>>>0])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}};function Gb(a,b,c){a>>>=0;c>>>=0;b=Q(b>>>0);S(a,{name:b,fromWireType:d=>d,toWireType:(d,f)=>f,argPackAdvance:T,readValueFromPointer:yd(b,c),Db:null})} +function Hb(a,b,c,d,f){a>>>=0;c>>>=0;b=Q(b>>>0);-1===f&&(f=4294967295);f=l=>l;if(0===d){var g=32-8*c;f=l=>l<>>g}var k=b.includes("unsigned")?function(l,p){return p>>>0}:function(l,p){return p};S(a,{name:b,fromWireType:f,toWireType:k,argPackAdvance:T,readValueFromPointer:ud(b,c,0!==d),Db:null})} +function Ib(a,b,c){function d(g){var k=A()[g>>>2>>>0];g=A()[g+4>>>2>>>0];return new f(e().buffer,g,k)}a>>>=0;var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=Q(c>>>0);S(a,{name:c,fromWireType:d,argPackAdvance:T,readValueFromPointer:d},{Rb:!0})} +function Jb(a,b){a>>>=0;b=Q(b>>>0);var c="std::string"===b;S(a,{name:b,fromWireType:function(d){var f=A()[d>>>2>>>0],g=d+4;if(c)for(var k=g,l=0;l<=f;++l){var p=g+l;if(l==f||0==w()[p>>>0]){k=K(k,p-k);if(void 0===n)var n=k;else n+=String.fromCharCode(0),n+=k;k=p+1}}else{n=Array(f);for(l=0;l>>0]);n=n.join("")}X(d);return n},toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"==typeof f;if(!(g||f instanceof Uint8Array||f instanceof +Uint8ClampedArray||f instanceof Int8Array))throw new R("Cannot pass non-string to std::string");var k=c&&g?md(f):f.length;var l=zd(4+k+1),p=l+4;A()[l>>>2>>>0]=k;if(c&&g)od(f,p,k+1);else if(g)for(g=0;g>>0]=n}else for(g=0;g>>0]=f[g];null!==d&&d.push(X,l);return l},argPackAdvance:T,readValueFromPointer:wd,Db(d){X(d)}})} +var Ad="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Bd=(a,b)=>{var c=a>>1;for(var d=c+b/2;!(c>=d)&&ea()[c>>>0];)++c;c<<=1;if(32=b/2);++d){var f=ca()[a+2*d>>>1>>>0];if(0==f)break;c+=String.fromCharCode(f)}return c},Cd=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f>>1>>>0]=g;b+=2}ca()[b>>>1>>>0]=0;return b-d},Dd=a=>2*a.length,Ed=(a,b)=> +{for(var c=0,d="";!(c>=b/4);){var f=z()[a+4*c>>>2>>>0];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d},Fd=(a,b,c)=>{b>>>=0;c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}z()[b>>>2>>>0]=g;b+=4;if(b+4>c)break}z()[b>>>2>>>0]=0;return b-d},Gd=a=>{for(var b=0,c=0;c=d&&++c;b+=4}return b}; +function Kb(a,b,c){a>>>=0;b>>>=0;c>>>=0;c=Q(c);if(2===b){var d=Bd;var f=Cd;var g=Dd;var k=l=>ea()[l>>>1>>>0]}else 4===b&&(d=Ed,f=Fd,g=Gd,k=l=>A()[l>>>2>>>0]);S(a,{name:c,fromWireType:l=>{for(var p=A()[l>>>2>>>0],n,r=l+4,x=0;x<=p;++x){var y=l+4+x*b;if(x==p||0==k(y))r=d(r,y-r),void 0===n?n=r:(n+=String.fromCharCode(0),n+=r),r=y+b}X(l);return n},toWireType:(l,p)=>{if("string"!=typeof p)throw new R(`Cannot pass non-string to C++ string type ${c}`);var n=g(p),r=zd(4+n+b);A()[r>>>2>>>0]=n/b;f(p,r+4,n+b); +null!==l&&l.push(X,r);return r},argPackAdvance:T,readValueFromPointer:wd,Db(l){X(l)}})}function Lb(a,b){a>>>=0;b=Q(b>>>0);S(a,{Sb:!0,name:b,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})}var Mb=()=>1;function Nb(a){Ka(a>>>0,!C,1,!qa,131072,!1);Na()}var Hd=a=>{if(!I)try{if(a(),!(0>>=0;"function"===typeof Atomics.jc&&(Atomics.jc(z(),a>>>2,a).value.then(Ra),a+=128,Atomics.store(z(),a>>>2,1))}var Ra=()=>{var a=Ia();a&&(La(a),Hd(Id))};function Ob(a,b){a>>>=0;a==b>>>0?setTimeout(Ra):E?postMessage({targetThread:a,cmd:"checkMailbox"}):(a=N[a])&&a.postMessage({cmd:"checkMailbox"})}var Jd=[];function Pb(a,b,c,d,f){b>>>=0;d/=2;Jd.length=d;c=f>>>0>>>3;for(f=0;f>>0];return(b?Lc[b]:Kd[a])(...Jd)} +function Qb(a){a>>>=0;E?postMessage({cmd:"cleanupThread",thread:a}):bd(N[a])}function Rb(a){D&&N[a>>>0].ref()}var Md=(a,b)=>{var c=rd[a];if(void 0===c)throw a=Ld(a),c=Q(a),X(a),new R(`${b} has unknown type ${c}`);return c},Nd=(a,b,c)=>{var d=[];a=a.toWireType(d,c);d.length&&(A()[b>>>2>>>0]=W(d));return a};function Sb(a,b,c){b>>>=0;c>>>=0;a=V(a>>>0);b=Md(b,"emval::as");return Nd(b,c,a)}var Od=a=>{try{a()}catch(b){db(b)}}; +function Pd(){var a=Y,b={};for(let [c,d]of Object.entries(a))b[c]="function"==typeof d?(...f)=>{Qd.push(c);try{return d(...f)}finally{I||(Qd.pop(),F&&1===Z&&0===Qd.length&&(Z=0,O+=1,Od(Rd),"undefined"!=typeof Fibers&&Fibers.oc()))}}:d;return b}var Z=0,F=null,Sd=0,Qd=[],Td={},Ud={},Vd=0,Wd=null,Xd=[];function sa(){return new Promise((a,b)=>{Wd={resolve:a,reject:b}})} +function Yd(){var a=zd(65548),b=a+12;A()[a>>>2>>>0]=b;A()[a+4>>>2>>>0]=b+65536;b=Qd[0];var c=Td[b];void 0===c&&(c=Vd++,Td[b]=c,Ud[c]=b);b=c;z()[a+8>>>2>>>0]=b;return a}function Zd(){var a=z()[F+8>>>2>>>0];a=Y[Ud[a]];--O;return a()} +function $d(a){if(!I){if(0===Z){var b=!1,c=!1;a((d=0)=>{if(!I&&(Sd=d,b=!0,c)){Z=2;Od(()=>ae(F));"undefined"!=typeof Browser&&Browser.Jb.Qb&&Browser.Jb.resume();d=!1;try{var f=Zd()}catch(l){f=l,d=!0}var g=!1;if(!F){var k=Wd;k&&(Wd=null,(d?k.reject:k.resolve)(f),g=!0)}if(d&&!g)throw f;}});c=!0;b||(Z=1,F=Yd(),"undefined"!=typeof Browser&&Browser.Jb.Qb&&Browser.Jb.pause(),Od(()=>be(F)))}else 2===Z?(Z=0,Od(ce),X(F),F=null,Xd.forEach(Hd)):db(`invalid state: ${Z}`);return Sd}} +function Mc(a){return $d(b=>{a().then(b)})}function Tb(a){a>>>=0;return Mc(()=>{a=V(a);return a.then(W)})}var de=[];function Ub(a,b,c,d){c>>>=0;d>>>=0;a=de[a>>>0];b=V(b>>>0);return a(null,b,c,d)}var ee={},fe=a=>{var b=ee[a];return void 0===b?Q(a):b};function Vb(a,b,c,d,f){c>>>=0;d>>>=0;f>>>=0;a=de[a>>>0];b=V(b>>>0);c=fe(c);return a(b,b[c],d,f)}var ge=()=>"object"==typeof globalThis?globalThis:Function("return this")();function Xb(a){a>>>=0;if(0===a)return W(ge());a=fe(a);return W(ge()[a])} +var he=a=>{var b=de.length;de.push(a);return b},ie=(a,b)=>{for(var c=Array(a),d=0;d>>2>>>0],"parameter "+d);return c},je=(a,b)=>Object.defineProperty(b,"name",{value:a});function ke(a){var b=Function;if(!(b instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof b} which is not a function`);var c=je(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c} +function Yb(a,b,c){b=ie(a,b>>>0);var d=b.shift();a--;var f="return function (obj, func, destructorsRef, args) {\n",g=0,k=[];0===c&&k.push("obj");for(var l=["retType"],p=[d],n=0;nr.name).join(", ")}) => ${d.name}>`;return he(je(c,a))}function Zb(a){a=fe(a>>>0);return W(B[a])}function $b(a,b){b>>>=0;a=V(a>>>0);b=V(b);return W(a[b])}function ac(a){a>>>=0;9>>0);for(var b=Array(a.length),c=0;c>>0))}function ec(){return W({})} +function fc(a){a>>>=0;for(var b=V(a);b.length;){var c=b.pop();b.pop()(c)}Wb(a)}function gc(a,b,c){b>>>=0;c>>>=0;a=V(a>>>0);b=V(b);c=V(c);a[b]=c}function hc(a,b){b>>>=0;a=Md(a>>>0,"_emval_take_value");a=a.readValueFromPointer(b);return W(a)} +function ic(a,b){a=-9007199254740992>a||9007199254740992>>=0;a=new Date(1E3*a);z()[b>>>2>>>0]=a.getUTCSeconds();z()[b+4>>>2>>>0]=a.getUTCMinutes();z()[b+8>>>2>>>0]=a.getUTCHours();z()[b+12>>>2>>>0]=a.getUTCDate();z()[b+16>>>2>>>0]=a.getUTCMonth();z()[b+20>>>2>>>0]=a.getUTCFullYear()-1900;z()[b+24>>>2>>>0]=a.getUTCDay();a=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;z()[b+28>>>2>>>0]=a} +var le=a=>0===a%4&&(0!==a%100||0===a%400),me=[0,31,60,91,121,152,182,213,244,274,305,335],ne=[0,31,59,90,120,151,181,212,243,273,304,334]; +function jc(a,b){a=-9007199254740992>a||9007199254740992>>=0;a=new Date(1E3*a);z()[b>>>2>>>0]=a.getSeconds();z()[b+4>>>2>>>0]=a.getMinutes();z()[b+8>>>2>>>0]=a.getHours();z()[b+12>>>2>>>0]=a.getDate();z()[b+16>>>2>>>0]=a.getMonth();z()[b+20>>>2>>>0]=a.getFullYear()-1900;z()[b+24>>>2>>>0]=a.getDay();var c=(le(a.getFullYear())?me:ne)[a.getMonth()]+a.getDate()-1|0;z()[b+28>>>2>>>0]=c;z()[b+36>>>2>>>0]=-(60*a.getTimezoneOffset());c=(new Date(a.getFullYear(),6,1)).getTimezoneOffset(); +var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();a=(c!=d&&a.getTimezoneOffset()==Math.min(d,c))|0;z()[b+32>>>2>>>0]=a} +function kc(a){a>>>=0;var b=new Date(z()[a+20>>>2>>>0]+1900,z()[a+16>>>2>>>0],z()[a+12>>>2>>>0],z()[a+8>>>2>>>0],z()[a+4>>>2>>>0],z()[a>>>2>>>0],0),c=z()[a+32>>>2>>>0],d=b.getTimezoneOffset(),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),g=(new Date(b.getFullYear(),0,1)).getTimezoneOffset(),k=Math.min(g,f);0>c?z()[a+32>>>2>>>0]=Number(f!=g&&k==d):0>>2>>>0]=b.getDay();c=(le(b.getFullYear())?me:ne)[b.getMonth()]+ +b.getDate()-1|0;z()[a+28>>>2>>>0]=c;z()[a>>>2>>>0]=b.getSeconds();z()[a+4>>>2>>>0]=b.getMinutes();z()[a+8>>>2>>>0]=b.getHours();z()[a+12>>>2>>>0]=b.getDate();z()[a+16>>>2>>>0]=b.getMonth();z()[a+20>>>2>>>0]=b.getYear();a=b.getTime();return BigInt(isNaN(a)?-1:a/1E3)}function lc(a,b,c,d,f,g,k){return E?P(16,1,a,b,c,d,f,g,k):-52}function mc(a,b,c,d,f,g){if(E)return P(17,1,a,b,c,d,f,g)} +function nc(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;var f=(new Date).getFullYear(),g=new Date(f,0,1),k=new Date(f,6,1);f=g.getTimezoneOffset();var l=k.getTimezoneOffset(),p=Math.max(f,l);A()[a>>>2>>>0]=60*p;z()[b>>>2>>>0]=Number(f!=l);a=n=>n.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1];g=a(g);k=a(k);l{oe.length=0;for(var c;c=w()[a++>>>0];){var d=105!=c;d&=112!=c;b+=d&&b%8?4:0;oe.push(112==c?A()[b>>>2>>>0]:106==c?J[b>>>3]:105==c?z()[b>>>2>>>0]:la()[b>>>3>>>0]);b+=d?8:4}return oe};function oc(a,b,c){a>>>=0;b=pe(b>>>0,c>>>0);return Lc[a](...b)}function pc(a,b,c){a>>>=0;b=pe(b>>>0,c>>>0);return Lc[a](...b)}var qc=()=>{},rc=()=>Date.now();function sc(a,b){return H(K(a>>>0,b>>>0))}var tc=()=>{O+=1;throw"unwind";};function uc(){return 4294901760}var vc; +vc=()=>performance.timeOrigin+performance.now();var wc=()=>D?require("os").cpus().length:navigator.hardwareConcurrency;function xc(){db("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER");return 0} +function yc(a){a>>>=0;var b=w().length;if(a<=b||4294901760=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var f=Math;d=Math.max(a,d);a:{f=(f.min.call(f,4294901760,d+(65536-d%65536)%65536)-m.buffer.byteLength+65535)/65536;try{m.grow(f);u();var g=1;break a}catch(k){}g=void 0}if(g)return!0}return!1}var qe=()=>{db("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER");return 0},re={},se=a=>{a.forEach(b=>{var c=qe();c&&(re[c]=b)})}; +function zc(){var a=Error().stack.toString().split("\n");"Error"==a[0]&&a.shift();se(a);re.Ob=qe();re.ac=a;return re.Ob}function Ac(a,b,c){a>>>=0;b>>>=0;if(re.Ob==a)var d=re.ac;else d=Error().stack.toString().split("\n"),"Error"==d[0]&&d.shift(),se(d);for(var f=3;d[f]&&qe()!=a;)++f;for(a=0;a>>2>>>0]=qe();return a} +var te={},ve=()=>{if(!ue){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:va||"./this.program"},b;for(b in te)void 0===te[b]?delete a[b]:a[b]=te[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);ue=c}return ue},ue; +function Bc(a,b){if(E)return P(18,1,a,b);a>>>=0;b>>>=0;var c=0;ve().forEach((d,f)=>{var g=b+c;f=A()[a+4*f>>>2>>>0]=g;for(g=0;g>>0]=d.charCodeAt(g);e()[f>>>0]=0;c+=d.length+1});return 0}function Cc(a,b){if(E)return P(19,1,a,b);a>>>=0;b>>>=0;var c=ve();A()[a>>>2>>>0]=c.length;var d=0;c.forEach(f=>d+=f.length+1);A()[b>>>2>>>0]=d;return 0}function Ec(a){return E?P(20,1,a):52}function Fc(a,b,c,d){return E?P(21,1,a,b,c,d):52}function Gc(a,b,c,d){return E?P(22,1,a,b,c,d):70} +var we=[null,[],[]];function Hc(a,b,c,d){if(E)return P(23,1,a,b,c,d);b>>>=0;c>>>=0;d>>>=0;for(var f=0,g=0;g>>2>>>0],l=A()[b+4>>>2>>>0];b+=8;for(var p=0;p>>0],r=we[a];0===n||10===n?((1===a?Ea:H)(ld(r,0)),r.length=0):r.push(n)}f+=l}A()[d>>>2>>>0]=f;return 0}var xe=[31,29,31,30,31,30,31,31,30,31,30,31],ye=[31,28,31,30,31,30,31,31,30,31,30,31];function ze(a){var b=Array(md(a)+1);nd(a,b,0,b.length);return b}var Ae=(a,b)=>{e().set(a,b>>>0)}; +function Jc(a,b,c,d){function f(h,t,v){for(h="number"==typeof h?h.toString():h||"";h.lengthUc?-1:0aa-h.getDate())t-=aa-h.getDate()+1,h.setDate(1),11>v?h.setMonth(v+1):(h.setMonth(0),h.setFullYear(h.getFullYear()+1));else{h.setDate(h.getDate()+t);break}}v=new Date(h.getFullYear()+1,0,4);t=l(new Date(h.getFullYear(), +0,4));v=l(v);return 0>=k(t,h)?0>=k(v,h)?h.getFullYear()+1:h.getFullYear():h.getFullYear()-1}a>>>=0;b>>>=0;c>>>=0;d>>>=0;var n=A()[d+40>>>2>>>0];d={fc:z()[d>>>2>>>0],ec:z()[d+4>>>2>>>0],Gb:z()[d+8>>>2>>>0],Kb:z()[d+12>>>2>>>0],Hb:z()[d+16>>>2>>>0],Cb:z()[d+20>>>2>>>0],ub:z()[d+24>>>2>>>0],Bb:z()[d+28>>>2>>>0],nc:z()[d+32>>>2>>>0],dc:z()[d+36>>>2>>>0],hc:n?K(n):""};c=K(c);n={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y", +"%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var r in n)c=c.replace(new RegExp(r,"g"),n[r]);var x="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),y="January February March April May June July August September October November December".split(" ");n={"%a":h=>x[h.ub].substring(0,3),"%A":h=> +x[h.ub],"%b":h=>y[h.Hb].substring(0,3),"%B":h=>y[h.Hb],"%C":h=>g((h.Cb+1900)/100|0,2),"%d":h=>g(h.Kb,2),"%e":h=>f(h.Kb,2," "),"%g":h=>p(h).toString().substring(2),"%G":p,"%H":h=>g(h.Gb,2),"%I":h=>{h=h.Gb;0==h?h=12:12{for(var t=0,v=0;v<=h.Hb-1;t+=(le(h.Cb+1900)?xe:ye)[v++]);return g(h.Kb+t,3)},"%m":h=>g(h.Hb+1,2),"%M":h=>g(h.ec,2),"%n":()=>"\n","%p":h=>0<=h.Gb&&12>h.Gb?"AM":"PM","%S":h=>g(h.fc,2),"%t":()=>"\t","%u":h=>h.ub||7,"%U":h=>g(Math.floor((h.Bb+7-h.ub)/7), +2),"%V":h=>{var t=Math.floor((h.Bb+7-(h.ub+6)%7)/7);2>=(h.ub+371-h.Bb-2)%7&&t++;if(t)53==t&&(v=(h.ub+371-h.Bb)%7,4==v||3==v&&le(h.Cb)||(t=1));else{t=52;var v=(h.ub+7-h.Bb-1)%7;(4==v||5==v&&le(h.Cb%400-1))&&t++}return g(t,2)},"%w":h=>h.ub,"%W":h=>g(Math.floor((h.Bb+7-(h.ub+6)%7)/7),2),"%y":h=>(h.Cb+1900).toString().substring(2),"%Y":h=>h.Cb+1900,"%z":h=>{h=h.dc;var t=0<=h;h=Math.abs(h)/60;return(t?"+":"-")+String("0000"+(h/60*100+h%60)).slice(-4)},"%Z":h=>h.hc,"%%":()=>"%"};c=c.replace(/%%/g,"\x00\x00"); +for(r in n)c.includes(r)&&(c=c.replace(new RegExp(r,"g"),n[r](d)));c=c.replace(/\0\0/g,"%");r=ze(c);if(r.length>b)return 0;Ae(r,a);return r.length-1}function Kc(a,b,c,d){return Jc(a>>>0,b>>>0,c>>>0,d>>>0)}E||Zc();for(var Be=Array(256),Ce=0;256>Ce;++Ce)Be[Ce]=String.fromCharCode(Ce);pd=Be;R=B.BindingError=class extends Error{constructor(a){super(a);this.name="BindingError"}};B.InternalError=class extends Error{constructor(a){super(a);this.name="InternalError"}};U.push(0,1,void 0,1,null,1,!0,1,!1,1); +B.count_emval_handles=()=>U.length/2-5-vd.length; +var Kd=[Ic,Xc,jd,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,lc,mc,Bc,Cc,Ec,Fc,Gc,Hc],kb,Y=function(){function a(c,d){Y=c.exports;Y=Pd();Y=De();Yc.push(Y.ib);Ya.unshift(Y.Ba);Ua=d;cb();return Y}var b=Ja();$a++;if(B.instantiateWasm)try{return B.instantiateWasm(b,a)}catch(c){H(`Module.instantiateWasm callback failed with error: ${c}`),oa(c)}fb||=B.locateFile?eb("ort-wasm-simd-threaded.jsep.wasm")?"ort-wasm-simd-threaded.jsep.wasm":B.locateFile?B.locateFile("ort-wasm-simd-threaded.jsep.wasm",G):G+"ort-wasm-simd-threaded.jsep.wasm": +(new URL("ort-wasm-simd-threaded.jsep.wasm",import.meta.url)).href;jb(b,function(c){a(c.instance,c.module)}).catch(oa);return{}}(),Ld=a=>(Ld=Y.Ca)(a),Oa=()=>(Oa=Y.Da)();B._OrtInit=(a,b)=>(B._OrtInit=Y.Ea)(a,b);B._OrtGetLastError=(a,b)=>(B._OrtGetLastError=Y.Fa)(a,b);B._OrtCreateSessionOptions=(a,b,c,d,f,g,k,l,p,n)=>(B._OrtCreateSessionOptions=Y.Ga)(a,b,c,d,f,g,k,l,p,n);B._OrtAppendExecutionProvider=(a,b)=>(B._OrtAppendExecutionProvider=Y.Ha)(a,b); +B._OrtAddFreeDimensionOverride=(a,b,c)=>(B._OrtAddFreeDimensionOverride=Y.Ia)(a,b,c);B._OrtAddSessionConfigEntry=(a,b,c)=>(B._OrtAddSessionConfigEntry=Y.Ja)(a,b,c);B._OrtReleaseSessionOptions=a=>(B._OrtReleaseSessionOptions=Y.Ka)(a);B._OrtCreateSession=(a,b,c)=>(B._OrtCreateSession=Y.La)(a,b,c);B._OrtReleaseSession=a=>(B._OrtReleaseSession=Y.Ma)(a);B._OrtGetInputOutputCount=(a,b,c)=>(B._OrtGetInputOutputCount=Y.Na)(a,b,c);B._OrtGetInputName=(a,b)=>(B._OrtGetInputName=Y.Oa)(a,b); +B._OrtGetOutputName=(a,b)=>(B._OrtGetOutputName=Y.Pa)(a,b);B._OrtFree=a=>(B._OrtFree=Y.Qa)(a);B._OrtCreateTensor=(a,b,c,d,f,g)=>(B._OrtCreateTensor=Y.Ra)(a,b,c,d,f,g);B._OrtGetTensorData=(a,b,c,d,f)=>(B._OrtGetTensorData=Y.Sa)(a,b,c,d,f);B._OrtReleaseTensor=a=>(B._OrtReleaseTensor=Y.Ta)(a);B._OrtCreateRunOptions=(a,b,c,d)=>(B._OrtCreateRunOptions=Y.Ua)(a,b,c,d);B._OrtAddRunConfigEntry=(a,b,c)=>(B._OrtAddRunConfigEntry=Y.Va)(a,b,c);B._OrtReleaseRunOptions=a=>(B._OrtReleaseRunOptions=Y.Wa)(a); +B._OrtCreateBinding=a=>(B._OrtCreateBinding=Y.Xa)(a);B._OrtBindInput=(a,b,c)=>(B._OrtBindInput=Y.Ya)(a,b,c);B._OrtBindOutput=(a,b,c,d)=>(B._OrtBindOutput=Y.Za)(a,b,c,d);B._OrtClearBoundOutputs=a=>(B._OrtClearBoundOutputs=Y._a)(a);B._OrtReleaseBinding=a=>(B._OrtReleaseBinding=Y.$a)(a);B._OrtRunWithBinding=(a,b,c,d,f)=>(B._OrtRunWithBinding=Y.ab)(a,b,c,d,f);B._OrtRun=(a,b,c,d,f,g,k,l)=>(B._OrtRun=Y.bb)(a,b,c,d,f,g,k,l);B._OrtEndProfiling=a=>(B._OrtEndProfiling=Y.cb)(a); +B._JsepOutput=(a,b,c)=>(B._JsepOutput=Y.db)(a,b,c);B._JsepGetNodeName=a=>(B._JsepGetNodeName=Y.eb)(a); +var Ia=()=>(Ia=Y.fb)(),zd=B._malloc=a=>(zd=B._malloc=Y.gb)(a),X=B._free=a=>(X=B._free=Y.hb)(a),Ka=(a,b,c,d,f,g)=>(Ka=Y.kb)(a,b,c,d,f,g),Sa=()=>(Sa=Y.lb)(),Vc=(a,b,c,d,f)=>(Vc=Y.mb)(a,b,c,d,f),ad=a=>(ad=Y.nb)(a),Qa=a=>(Qa=Y.ob)(a),Id=()=>(Id=Y.pb)(),dd=(a,b)=>(dd=Y.qb)(a,b),Wc=a=>(Wc=Y.rb)(a),Tc=a=>(Tc=Y.sb)(a),Sc=()=>(Sc=Y.tb)(),ed=B.dynCall_ii=(a,b)=>(ed=B.dynCall_ii=Y.vb)(a,b),be=a=>(be=Y.wb)(a),Rd=()=>(Rd=Y.xb)(),ae=a=>(ae=Y.yb)(a),ce=()=>(ce=Y.zb)();B.___start_em_js=862621;B.___stop_em_js=862843; +function De(){var a=Y;a=Object.assign({},a);var b=d=>f=>d(f)>>>0,c=d=>()=>d()>>>0;a.Ca=b(a.Ca);a.fb=c(a.fb);a.gb=b(a.gb);a.emscripten_main_runtime_thread_id=c(a.emscripten_main_runtime_thread_id);a.sb=b(a.sb);a.tb=c(a.tb);return a}B.stackSave=()=>Sc();B.stackRestore=a=>Wc(a);B.stackAlloc=a=>Tc(a);B.UTF8ToString=K;B.stringToUTF8=od;B.lengthBytesUTF8=md;var Ee;bb=function Fe(){Ee||Ge();Ee||(bb=Fe)}; +function Ge(){0<$a||(E?(na(B),E||cd(Ya),startWorker(B)):(cd(Xa),0<$a||Ee||(Ee=!0,B.calledRun=!0,I||(E||cd(Ya),na(B),E||cd(Za)))))}Ge();moduleRtn=pa; + + + return moduleRtn; +} +); +})(); +export default ortWasmThreaded; +var isPthread = globalThis.self?.name === 'em-pthread'; +var isNode = typeof globalThis.process?.versions?.node == 'string'; +if (isNode) isPthread = (await import('worker_threads')).workerData === 'em-pthread'; + +// When running as a pthread, construct a new instance on startup +isPthread && ortWasmThreaded(); diff --git a/public/vad/ort-wasm-simd-threaded.jsep.wasm b/public/vad/ort-wasm-simd-threaded.jsep.wasm new file mode 100644 index 00000000..ac10fb37 Binary files /dev/null and b/public/vad/ort-wasm-simd-threaded.jsep.wasm differ diff --git a/public/vad/ort-wasm-simd-threaded.mjs b/public/vad/ort-wasm-simd-threaded.mjs new file mode 100644 index 00000000..89675a7f --- /dev/null +++ b/public/vad/ort-wasm-simd-threaded.mjs @@ -0,0 +1,80 @@ + +var ortWasmThreaded = (() => { + var _scriptName = import.meta.url; + + return ( +async function(moduleArg = {}) { + var moduleRtn; + +function aa(){g.buffer!=l.buffer&&m();return l}function n(){g.buffer!=l.buffer&&m();return ba}function r(){g.buffer!=l.buffer&&m();return ca}function u(){g.buffer!=l.buffer&&m();return da}function ea(){g.buffer!=l.buffer&&m();return fa}var w=Object.assign({},moduleArg),ha,x,ia=new Promise((a,b)=>{ha=a;x=b}),ja="object"==typeof window,A="function"==typeof importScripts,B="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,C=A&&"em-pthread"==self.name; +if(B){const {createRequire:a}=await import("module");var require=a(import.meta.url),D=require("worker_threads");global.Worker=D.Worker;C=(A=!D.lb)&&"em-pthread"==D.workerData}"use strict";w.mountExternalData=(a,b)=>{(w.Ua||(w.Ua=new Map)).set(a,b)};w.unmountExternalData=()=>{delete w.Ua}; +var SharedArrayBuffer=globalThis.SharedArrayBuffer??(new WebAssembly.Memory({initial:0,maximum:0,shared:!0})).buffer.constructor,ka=Object.assign({},w),la="./this.program",E=(a,b)=>{throw b;},F="",ma,G,H; +if(B){var fs=require("fs"),na=require("path");F=require("url").fileURLToPath(new URL("./",import.meta.url));ma=(a,b)=>{a=oa(a)?new URL(a):na.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};H=a=>{a=ma(a,!0);a.buffer||(a=new Uint8Array(a));return a};G=(a,b,c,d=!0)=>{a=oa(a)?new URL(a):na.normalize(a);fs.readFile(a,d?void 0:"utf8",(f,h)=>{f?c(f):b(d?h.buffer:h)})};!w.thisProgram&&1{process.exitCode= +a;throw b;}}else if(ja||A)A?F=self.location.href:"undefined"!=typeof document&&document.currentScript&&(F=document.currentScript.src),_scriptName&&(F=_scriptName),F.startsWith("blob:")?F="":F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1),B||(ma=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},A&&(H=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),G=(a,b,c)=>{var d=new XMLHttpRequest; +d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)});B&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var pa=console.log.bind(console),qa=console.error.bind(console);B&&(pa=(...a)=>fs.writeSync(1,a.join(" ")+"\n"),qa=(...a)=>fs.writeSync(2,a.join(" ")+"\n"));var ra=pa,I=qa;Object.assign(w,ka);ka=null; +if(C){var sa;if(B){var ta=D.parentPort;ta.on("message",b=>onmessage({data:b}));Object.assign(globalThis,{self:global,importScripts:()=>{},postMessage:b=>ta.postMessage(b),performance:global.performance||{now:Date.now}})}var ua=!1;I=function(...b){b=b.join(" ");B?fs.writeSync(2,b+"\n"):console.error(b)};self.alert=function(...b){postMessage({Za:"alert",text:b.join(" "),mb:K()})};w.instantiateWasm=(b,c)=>new Promise(d=>{sa=f=>{f=new WebAssembly.Instance(f,va());c(f);d()}});self.onunhandledrejection= +b=>{throw b.reason||b;};function a(b){try{var c=b.data,d=c.cmd;if("load"===d){let f=[];self.onmessage=h=>f.push(h);self.startWorker=()=>{postMessage({cmd:"loaded"});for(let h of f)a(h);self.onmessage=a};for(const h of c.handlers)if(!w[h]||w[h].proxy)w[h]=(...k)=>{postMessage({Za:"callHandler",kb:h,args:k})},"print"==h&&(ra=w[h]),"printErr"==h&&(I=w[h]);g=c.wasmMemory;m();sa(c.wasmModule)}else if("run"===d){wa(c.pthread_ptr,0,0,1,0,0);xa(c.pthread_ptr);ya();za();ua||=!0;try{Aa(c.start_routine,c.arg)}catch(f){if("unwind"!= +f)throw f;}}else"cancel"===d?K()&&Ba(-1):"setimmediate"!==c.target&&("checkMailbox"===d?ua&&Ca():d&&(I(`worker: received unknown command ${d}`),I(c)))}catch(f){throw Da(),f;}}self.onmessage=a}var L;w.wasmBinary&&(L=w.wasmBinary);var g,Ea,Fa=!1,M,l,ba,ca,da,N,fa; +function m(){var a=g.buffer;w.HEAP8=l=new Int8Array(a);w.HEAP16=new Int16Array(a);w.HEAPU8=ba=new Uint8Array(a);w.HEAPU16=new Uint16Array(a);w.HEAP32=ca=new Int32Array(a);w.HEAPU32=da=new Uint32Array(a);w.HEAPF32=new Float32Array(a);w.HEAPF64=fa=new Float64Array(a);w.HEAP64=N=new BigInt64Array(a);w.HEAPU64=new BigUint64Array(a)} +if(!C){g=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0});if(!(g.buffer instanceof SharedArrayBuffer))throw I("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),B&&I("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");m()} +var Ga=[],Ha=[],Ia=[],O=0,Ja=null,P=null;function Ka(){O--;if(0==O&&(null!==Ja&&(clearInterval(Ja),Ja=null),P)){var a=P;P=null;a()}}function La(a){a="Aborted("+a+")";I(a);Fa=!0;M=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");x(a);throw a;}var Ma=a=>a.startsWith("data:application/octet-stream;base64,"),oa=a=>a.startsWith("file://"),Na;function Oa(a){if(a==Na&&L)return new Uint8Array(L);if(H)return H(a);throw"both async and sync fetching of the wasm failed";} +function Pa(a){if(!L&&(ja||A)){if("function"==typeof fetch&&!oa(a))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Oa(a));if(G)return new Promise((b,c)=>{G(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>Oa(a))}function Qa(a,b,c){return Pa(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{I(`failed to asynchronously prepare wasm: ${d}`);La(d)})} +function Ra(a,b){var c=Na;return L||"function"!=typeof WebAssembly.instantiateStreaming||Ma(c)||oa(c)||B||"function"!=typeof fetch?Qa(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(f){I(`wasm streaming compile failed: ${f}`);I("falling back to ArrayBuffer instantiation");return Qa(c,a,b)}))} +function va(){Sa={j:Ta,b:Ua,E:Va,g:Wa,V:Xa,A:Ya,C:Za,W:$a,T:ab,L:bb,S:cb,o:db,B:eb,y:fb,U:gb,z:hb,_:ib,Z:jb,P:kb,w:lb,F:mb,k:nb,O:xa,Y:ob,I:pb,J:qb,K:rb,G:sb,H:tb,v:ub,q:vb,l:wb,p:xb,e:yb,X:zb,x:Ab,d:Bb,f:Cb,i:Db,u:Eb,t:Fb,s:Gb,Q:Hb,R:Ib,D:Jb,h:Kb,n:Lb,M:Mb,m:Nb,a:g,r:Ob,N:Pb,c:Qb};return{a:Sa}} +var Rb={822132:(a,b,c,d)=>{if("undefined"==typeof w||!w.Ua)return 1;a=Q(a>>>0);a.startsWith("./")&&(a=a.substring(2));a=w.Ua.get(a);if(!a)return 2;b>>>=0;c>>>=0;d>>>=0;if(b+c>a.byteLength)return 3;try{return n().set(a.subarray(b,b+c),d>>>0),0}catch{return 4}},822633:()=>"undefined"!==typeof wasmOffsetConverter};function Ta(){return"undefined"!==typeof wasmOffsetConverter}function Sb(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} +var Tb=a=>{a.terminate();a.onmessage=()=>{}},Wb=a=>{0==R.length&&(Ub(),Vb(R[0]));var b=R.pop();if(!b)return 6;S.push(b);T[a.Ra]=b;b.Ra=a.Ra;var c={cmd:"run",start_routine:a.cb,arg:a.ab,pthread_ptr:a.Ra};B&&b.unref();b.postMessage(c,a.ib);return 0},U=0,V=(a,b,...c)=>{for(var d=2*c.length,f=$b(),h=ac(8*d),k=h>>>3,q=0;q>>0]=y)}a=bc(a,0,d,h,b);cc(f);return a}; +function Ob(a){if(C)return V(0,1,a);M=a;if(!(0{M=a;if(C)throw dc(a),"unwind";Ob(a)},R=[],S=[],ec=[],T={};function fc(){for(var a=w.numThreads-1;a--;)Ub();Ga.unshift(()=>{O++;gc(()=>Ka())})}var ic=a=>{var b=a.Ra;delete T[b];R.push(a);S.splice(S.indexOf(a),1);a.Ra=0;hc(b)};function za(){ec.forEach(a=>a())} +var Vb=a=>new Promise(b=>{a.onmessage=h=>{h=h.data;var k=h.cmd;if(h.targetThread&&h.targetThread!=K()){var q=T[h.targetThread];q?q.postMessage(h,h.transferList):I(`Internal error! Worker sent a message "${k}" to target pthread ${h.targetThread}, but that thread no longer exists!`)}else if("checkMailbox"===k)Ca();else if("spawnThread"===k)Wb(h);else if("cleanupThread"===k)ic(T[h.thread]);else if("killThread"===k)h=h.thread,k=T[h],delete T[h],Tb(k),hc(h),S.splice(S.indexOf(k),1),k.Ra=0;else if("cancelThread"=== +k)T[h.thread].postMessage({cmd:"cancel"});else if("loaded"===k)a.loaded=!0,B&&!a.Ra&&a.unref(),b(a);else if("alert"===k)alert(`Thread ${h.threadId}: ${h.text}`);else if("setimmediate"===h.target)a.postMessage(h);else if("callHandler"===k)w[h.handler](...h.args);else k&&I(`worker sent an unknown command ${k}`)};a.onerror=h=>{I(`${"worker sent an error!"} ${h.filename}:${h.lineno}: ${h.message}`);throw h;};B&&(a.on("message",h=>a.onmessage({data:h})),a.on("error",h=>a.onerror(h)));var c=[],d=[],f;for(f of d)w.hasOwnProperty(f)&& +c.push(f);a.postMessage({cmd:"load",handlers:c,wasmMemory:g,wasmModule:Ea})});function gc(a){C?a():Promise.all(R.map(Vb)).then(a)}function Ub(){var a=new Worker(new URL(import.meta.url),{type:"module",workerData:"em-pthread",name:"em-pthread"});R.push(a)}var jc=a=>{for(;0{var a=K(),b=u()[a+52>>>2>>>0];a=u()[a+56>>>2>>>0];kc(b,b-a);cc(b)},lc=[],mc,Aa=(a,b)=>{U=0;var c=lc[a];c||(a>=lc.length&&(lc.length=a+1),lc[a]=c=mc.get(a));a=c(b);0>>=0;var d=new nc(a);b>>>=0;c>>>=0;u()[d.Xa+16>>>2>>>0]=0;u()[d.Xa+4>>>2>>>0]=b;u()[d.Xa+8>>>2>>>0]=c;oc=a;pc++;throw oc;}function qc(a,b,c,d){return C?V(2,1,a,b,c,d):Va(a,b,c,d)} +function Va(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;if("undefined"==typeof SharedArrayBuffer)return I("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var f=[];if(C&&0===f.length)return qc(a,b,c,d);a={cb:c,Ra:a,ab:d,ib:f};return C?(a.Za="spawnThread",postMessage(a,f),0):Wb(a)} +var rc="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,sc=(a,b,c)=>{b>>>=0;var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>> +10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d},Q=(a,b)=>(a>>>=0)?sc(n(),a,b):"";function Wa(a,b,c){return C?V(3,1,a,b,c):0}function Xa(a,b){if(C)return V(4,1,a,b)} +var tc=a=>{for(var b=0,c=0;c=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},uc=(a,b,c,d)=>{c>>>=0;if(!(0=k){var q=a.charCodeAt(++h);k=65536+((k&1023)<<10)|q&1023}if(127>=k){if(c>=d)break;b[c++>>>0]=k}else{if(2047>=k){if(c+1>=d)break;b[c++>>>0]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++>>>0]=224|k>>12}else{if(c+3>=d)break;b[c++>>>0]=240|k>> +18;b[c++>>>0]=128|k>>12&63}b[c++>>>0]=128|k>>6&63}b[c++>>>0]=128|k&63}}b[c>>>0]=0;return c-f},W=(a,b,c)=>uc(a,n(),b,c);function Ya(a,b){if(C)return V(5,1,a,b)}function Za(a,b,c){if(C)return V(6,1,a,b,c)}function $a(a,b,c){return C?V(7,1,a,b,c):0}function ab(a,b){if(C)return V(8,1,a,b)}function bb(a,b,c){if(C)return V(9,1,a,b,c)}function cb(a,b,c,d){if(C)return V(10,1,a,b,c,d)}function db(a,b,c,d){if(C)return V(11,1,a,b,c,d)}function eb(a,b,c,d){if(C)return V(12,1,a,b,c,d)} +function fb(a){if(C)return V(13,1,a)}function gb(a,b){if(C)return V(14,1,a,b)}function hb(a,b,c){if(C)return V(15,1,a,b,c)}var ib=()=>{La("")},jb=()=>1;function kb(a){wa(a>>>0,!A,1,!ja,131072,!1);za()}function xa(a){a>>>=0;"function"===typeof Atomics.jb&&(Atomics.jb(r(),a>>>2,a).value.then(Ca),a+=128,Atomics.store(r(),a>>>2,1))} +var Ca=()=>{var a=K();if(a&&(xa(a),a=vc,!Fa))try{if(a(),!(0>>=0;a==b>>>0?setTimeout(Ca):C?postMessage({targetThread:a,cmd:"checkMailbox"}):(a=T[a])&&a.postMessage({cmd:"checkMailbox"})}var wc=[];function mb(a,b,c,d,f){b>>>=0;d/=2;wc.length=d;c=f>>>0>>>3;for(f=0;f>>0];return(b?Rb[b]:xc[a])(...wc)} +function nb(a){a>>>=0;C?postMessage({cmd:"cleanupThread",thread:a}):ic(T[a])}function ob(a){B&&T[a>>>0].ref()} +function pb(a,b){a=-9007199254740992>a||9007199254740992>>=0;a=new Date(1E3*a);r()[b>>>2>>>0]=a.getUTCSeconds();r()[b+4>>>2>>>0]=a.getUTCMinutes();r()[b+8>>>2>>>0]=a.getUTCHours();r()[b+12>>>2>>>0]=a.getUTCDate();r()[b+16>>>2>>>0]=a.getUTCMonth();r()[b+20>>>2>>>0]=a.getUTCFullYear()-1900;r()[b+24>>>2>>>0]=a.getUTCDay();a=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;r()[b+28>>>2>>>0]=a} +var X=a=>0===a%4&&(0!==a%100||0===a%400),yc=[0,31,60,91,121,152,182,213,244,274,305,335],zc=[0,31,59,90,120,151,181,212,243,273,304,334]; +function qb(a,b){a=-9007199254740992>a||9007199254740992>>=0;a=new Date(1E3*a);r()[b>>>2>>>0]=a.getSeconds();r()[b+4>>>2>>>0]=a.getMinutes();r()[b+8>>>2>>>0]=a.getHours();r()[b+12>>>2>>>0]=a.getDate();r()[b+16>>>2>>>0]=a.getMonth();r()[b+20>>>2>>>0]=a.getFullYear()-1900;r()[b+24>>>2>>>0]=a.getDay();var c=(X(a.getFullYear())?yc:zc)[a.getMonth()]+a.getDate()-1|0;r()[b+28>>>2>>>0]=c;r()[b+36>>>2>>>0]=-(60*a.getTimezoneOffset());c=(new Date(a.getFullYear(),6,1)).getTimezoneOffset(); +var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();a=(c!=d&&a.getTimezoneOffset()==Math.min(d,c))|0;r()[b+32>>>2>>>0]=a} +function rb(a){a>>>=0;var b=new Date(r()[a+20>>>2>>>0]+1900,r()[a+16>>>2>>>0],r()[a+12>>>2>>>0],r()[a+8>>>2>>>0],r()[a+4>>>2>>>0],r()[a>>>2>>>0],0),c=r()[a+32>>>2>>>0],d=b.getTimezoneOffset(),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),h=(new Date(b.getFullYear(),0,1)).getTimezoneOffset(),k=Math.min(h,f);0>c?r()[a+32>>>2>>>0]=Number(f!=h&&k==d):0>>2>>>0]=b.getDay();c=(X(b.getFullYear())?yc:zc)[b.getMonth()]+ +b.getDate()-1|0;r()[a+28>>>2>>>0]=c;r()[a>>>2>>>0]=b.getSeconds();r()[a+4>>>2>>>0]=b.getMinutes();r()[a+8>>>2>>>0]=b.getHours();r()[a+12>>>2>>>0]=b.getDate();r()[a+16>>>2>>>0]=b.getMonth();r()[a+20>>>2>>>0]=b.getYear();a=b.getTime();return BigInt(isNaN(a)?-1:a/1E3)}function sb(a,b,c,d,f,h,k){return C?V(16,1,a,b,c,d,f,h,k):-52}function tb(a,b,c,d,f,h){if(C)return V(17,1,a,b,c,d,f,h)} +function ub(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;var f=(new Date).getFullYear(),h=new Date(f,0,1),k=new Date(f,6,1);f=h.getTimezoneOffset();var q=k.getTimezoneOffset(),y=Math.max(f,q);u()[a>>>2>>>0]=60*y;r()[b>>>2>>>0]=Number(f!=q);a=v=>v.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1];h=a(h);k=a(k);q>>=0;b>>>=0;c>>>=0;Ac.length=0;for(var d;d=n()[b++>>>0];){var f=105!=d;f&=112!=d;c+=f&&c%8?4:0;Ac.push(112==d?u()[c>>>2>>>0]:106==d?N[c>>>3]:105==d?r()[c>>>2>>>0]:ea()[c>>>3>>>0]);c+=f?8:4}return Rb[a](...Ac)}var wb=()=>{},xb=()=>Date.now();function yb(a,b){return I(Q(a>>>0,b>>>0))}var zb=()=>{U+=1;throw"unwind";};function Ab(){return 4294901760}var Bb;Bb=()=>performance.timeOrigin+performance.now();var Cb=()=>B?require("os").cpus().length:navigator.hardwareConcurrency; +function Db(){La("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER");return 0}function Eb(a){a>>>=0;var b=n().length;if(a<=b||4294901760=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var f=Math;d=Math.max(a,d);a:{f=(f.min.call(f,4294901760,d+(65536-d%65536)%65536)-g.buffer.byteLength+65535)/65536;try{g.grow(f);m();var h=1;break a}catch(k){}h=void 0}if(h)return!0}return!1} +var Bc=()=>{La("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER");return 0},Y={},Cc=a=>{a.forEach(b=>{var c=Bc();c&&(Y[c]=b)})};function Fb(){var a=Error().stack.toString().split("\n");"Error"==a[0]&&a.shift();Cc(a);Y.$a=Bc();Y.bb=a;return Y.$a} +function Gb(a,b,c){a>>>=0;b>>>=0;if(Y.$a==a)var d=Y.bb;else d=Error().stack.toString().split("\n"),"Error"==d[0]&&d.shift(),Cc(d);for(var f=3;d[f]&&Bc()!=a;)++f;for(a=0;a>>2>>>0]=Bc();return a} +var Dc={},Fc=()=>{if(!Ec){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:la||"./this.program"},b;for(b in Dc)void 0===Dc[b]?delete a[b]:a[b]=Dc[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Ec=c}return Ec},Ec; +function Hb(a,b){if(C)return V(18,1,a,b);a>>>=0;b>>>=0;var c=0;Fc().forEach((d,f)=>{var h=b+c;f=u()[a+4*f>>>2>>>0]=h;for(h=0;h>>0]=d.charCodeAt(h);aa()[f>>>0]=0;c+=d.length+1});return 0}function Ib(a,b){if(C)return V(19,1,a,b);a>>>=0;b>>>=0;var c=Fc();u()[a>>>2>>>0]=c.length;var d=0;c.forEach(f=>d+=f.length+1);u()[b>>>2>>>0]=d;return 0}function Kb(a){return C?V(20,1,a):52}function Lb(a,b,c,d){return C?V(21,1,a,b,c,d):52}function Mb(a,b,c,d){return C?V(22,1,a,b,c,d):70} +var Gc=[null,[],[]];function Nb(a,b,c,d){if(C)return V(23,1,a,b,c,d);b>>>=0;c>>>=0;d>>>=0;for(var f=0,h=0;h>>2>>>0],q=u()[b+4>>>2>>>0];b+=8;for(var y=0;y>>0],z=Gc[a];0===v||10===v?((1===a?ra:I)(sc(z,0)),z.length=0):z.push(v)}f+=q}u()[d>>>2>>>0]=f;return 0}var Hc=[31,29,31,30,31,30,31,31,30,31,30,31],Ic=[31,28,31,30,31,30,31,31,30,31,30,31];function Jc(a){var b=Array(tc(a)+1);uc(a,b,0,b.length);return b}var Kc=(a,b)=>{aa().set(a,b>>>0)}; +function Pb(a,b,c,d){function f(e,p,t){for(e="number"==typeof e?e.toString():e||"";e.lengthXb?-1:0J-e.getDate())p-=J-e.getDate()+1,e.setDate(1),11>t?e.setMonth(t+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else{e.setDate(e.getDate()+p);break}}t=new Date(e.getFullYear()+1,0,4);p=q(new Date(e.getFullYear(), +0,4));t=q(t);return 0>=k(p,e)?0>=k(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}a>>>=0;b>>>=0;c>>>=0;d>>>=0;var v=u()[d+40>>>2>>>0];d={gb:r()[d>>>2>>>0],fb:r()[d+4>>>2>>>0],Va:r()[d+8>>>2>>>0],Ya:r()[d+12>>>2>>>0],Wa:r()[d+16>>>2>>>0],Ta:r()[d+20>>>2>>>0],Qa:r()[d+24>>>2>>>0],Sa:r()[d+28>>>2>>>0],nb:r()[d+32>>>2>>>0],eb:r()[d+36>>>2>>>0],hb:v?Q(v):""};c=Q(c);v={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y", +"%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var z in v)c=c.replace(new RegExp(z,"g"),v[z]);var Yb="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Zb="January February March April May June July August September October November December".split(" ");v={"%a":e=>Yb[e.Qa].substring(0,3), +"%A":e=>Yb[e.Qa],"%b":e=>Zb[e.Wa].substring(0,3),"%B":e=>Zb[e.Wa],"%C":e=>h((e.Ta+1900)/100|0,2),"%d":e=>h(e.Ya,2),"%e":e=>f(e.Ya,2," "),"%g":e=>y(e).toString().substring(2),"%G":y,"%H":e=>h(e.Va,2),"%I":e=>{e=e.Va;0==e?e=12:12{for(var p=0,t=0;t<=e.Wa-1;p+=(X(e.Ta+1900)?Hc:Ic)[t++]);return h(e.Ya+p,3)},"%m":e=>h(e.Wa+1,2),"%M":e=>h(e.fb,2),"%n":()=>"\n","%p":e=>0<=e.Va&&12>e.Va?"AM":"PM","%S":e=>h(e.gb,2),"%t":()=>"\t","%u":e=>e.Qa||7,"%U":e=>h(Math.floor((e.Sa+ +7-e.Qa)/7),2),"%V":e=>{var p=Math.floor((e.Sa+7-(e.Qa+6)%7)/7);2>=(e.Qa+371-e.Sa-2)%7&&p++;if(p)53==p&&(t=(e.Qa+371-e.Sa)%7,4==t||3==t&&X(e.Ta)||(p=1));else{p=52;var t=(e.Qa+7-e.Sa-1)%7;(4==t||5==t&&X(e.Ta%400-1))&&p++}return h(p,2)},"%w":e=>e.Qa,"%W":e=>h(Math.floor((e.Sa+7-(e.Qa+6)%7)/7),2),"%y":e=>(e.Ta+1900).toString().substring(2),"%Y":e=>e.Ta+1900,"%z":e=>{e=e.eb;var p=0<=e;e=Math.abs(e)/60;return(p?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.hb,"%%":()=>"%"};c=c.replace(/%%/g, +"\x00\x00");for(z in v)c.includes(z)&&(c=c.replace(new RegExp(z,"g"),v[z](d)));c=c.replace(/\0\0/g,"%");z=Jc(c);if(z.length>b)return 0;Kc(z,a);return z.length-1}function Qb(a,b,c,d){return Pb(a>>>0,b>>>0,c>>>0,d>>>0)}C||fc(); +var xc=[Ob,dc,qc,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,sb,tb,Hb,Ib,Kb,Lb,Mb,Nb],Sa,Z=function(){function a(c,d){Z=c.exports;Z=Lc();ec.push(Z.Ea);mc=Z.Fa;Ha.unshift(Z.$);Ea=d;Ka();return Z}var b=va();O++;if(w.instantiateWasm)try{return w.instantiateWasm(b,a)}catch(c){I(`Module.instantiateWasm callback failed with error: ${c}`),x(c)}Na||=w.locateFile?Ma("ort-wasm-simd-threaded.wasm")?"ort-wasm-simd-threaded.wasm":w.locateFile?w.locateFile("ort-wasm-simd-threaded.wasm",F):F+"ort-wasm-simd-threaded.wasm": +(new URL("ort-wasm-simd-threaded.wasm",import.meta.url)).href;Ra(b,function(c){a(c.instance,c.module)}).catch(x);return{}}();w._OrtInit=(a,b)=>(w._OrtInit=Z.aa)(a,b);w._OrtGetLastError=(a,b)=>(w._OrtGetLastError=Z.ba)(a,b);w._OrtCreateSessionOptions=(a,b,c,d,f,h,k,q,y,v)=>(w._OrtCreateSessionOptions=Z.ca)(a,b,c,d,f,h,k,q,y,v);w._OrtAppendExecutionProvider=(a,b)=>(w._OrtAppendExecutionProvider=Z.da)(a,b);w._OrtAddFreeDimensionOverride=(a,b,c)=>(w._OrtAddFreeDimensionOverride=Z.ea)(a,b,c); +w._OrtAddSessionConfigEntry=(a,b,c)=>(w._OrtAddSessionConfigEntry=Z.fa)(a,b,c);w._OrtReleaseSessionOptions=a=>(w._OrtReleaseSessionOptions=Z.ga)(a);w._OrtCreateSession=(a,b,c)=>(w._OrtCreateSession=Z.ha)(a,b,c);w._OrtReleaseSession=a=>(w._OrtReleaseSession=Z.ia)(a);w._OrtGetInputOutputCount=(a,b,c)=>(w._OrtGetInputOutputCount=Z.ja)(a,b,c);w._OrtGetInputName=(a,b)=>(w._OrtGetInputName=Z.ka)(a,b);w._OrtGetOutputName=(a,b)=>(w._OrtGetOutputName=Z.la)(a,b);w._OrtFree=a=>(w._OrtFree=Z.ma)(a); +w._OrtCreateTensor=(a,b,c,d,f,h)=>(w._OrtCreateTensor=Z.na)(a,b,c,d,f,h);w._OrtGetTensorData=(a,b,c,d,f)=>(w._OrtGetTensorData=Z.oa)(a,b,c,d,f);w._OrtReleaseTensor=a=>(w._OrtReleaseTensor=Z.pa)(a);w._OrtCreateRunOptions=(a,b,c,d)=>(w._OrtCreateRunOptions=Z.qa)(a,b,c,d);w._OrtAddRunConfigEntry=(a,b,c)=>(w._OrtAddRunConfigEntry=Z.ra)(a,b,c);w._OrtReleaseRunOptions=a=>(w._OrtReleaseRunOptions=Z.sa)(a);w._OrtCreateBinding=a=>(w._OrtCreateBinding=Z.ta)(a); +w._OrtBindInput=(a,b,c)=>(w._OrtBindInput=Z.ua)(a,b,c);w._OrtBindOutput=(a,b,c,d)=>(w._OrtBindOutput=Z.va)(a,b,c,d);w._OrtClearBoundOutputs=a=>(w._OrtClearBoundOutputs=Z.wa)(a);w._OrtReleaseBinding=a=>(w._OrtReleaseBinding=Z.xa)(a);w._OrtRunWithBinding=(a,b,c,d,f)=>(w._OrtRunWithBinding=Z.ya)(a,b,c,d,f);w._OrtRun=(a,b,c,d,f,h,k,q)=>(w._OrtRun=Z.za)(a,b,c,d,f,h,k,q);w._OrtEndProfiling=a=>(w._OrtEndProfiling=Z.Aa)(a);var K=()=>(K=Z.Ba)();w._malloc=a=>(w._malloc=Z.Ca)(a);w._free=a=>(w._free=Z.Da)(a); +var wa=(a,b,c,d,f,h)=>(wa=Z.Ga)(a,b,c,d,f,h),Da=()=>(Da=Z.Ha)(),bc=(a,b,c,d,f)=>(bc=Z.Ia)(a,b,c,d,f),hc=a=>(hc=Z.Ja)(a),Ba=a=>(Ba=Z.Ka)(a),vc=()=>(vc=Z.La)(),kc=(a,b)=>(kc=Z.Ma)(a,b),cc=a=>(cc=Z.Na)(a),ac=a=>(ac=Z.Oa)(a),$b=()=>($b=Z.Pa)();w.___start_em_js=822690;w.___stop_em_js=822751; +function Lc(){var a=Z;a=Object.assign({},a);var b=d=>()=>d()>>>0,c=d=>f=>d(f)>>>0;a.Ba=b(a.Ba);a.Ca=c(a.Ca);a.emscripten_main_runtime_thread_id=b(a.emscripten_main_runtime_thread_id);a.Oa=c(a.Oa);a.Pa=b(a.Pa);return a}w.stackSave=()=>$b();w.stackRestore=a=>cc(a);w.stackAlloc=a=>ac(a);w.UTF8ToString=Q;w.stringToUTF8=W;w.lengthBytesUTF8=tc;var Mc;P=function Nc(){Mc||Oc();Mc||(P=Nc)}; +function Oc(){00&&r[0]<4?1:+(r[0]+r[1])),!n&&_&&(!(r=_.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=_.match(/Chrome\/(\d+)/))&&(n=+r[1]);var W=n,q=i.String,H=!!Object.getOwnPropertySymbols&&!a(function(){var t=Symbol("symbol detection");return!q(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&W&&W<41}),$=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,K=Object,G=$?function(t){return"symbol"==typeof t}:function(t){var e=L("Symbol");return T(e)&&U(e.prototype,K(t))},V=String,Y=function(t){try{return V(t)}catch(t){return"Object"}},X=TypeError,J=function(t){if(T(t))return t;throw new X(Y(t)+" is not a function")},Q=function(t,e){var r=t[e];return P(r)?void 0:J(r)},Z=TypeError,tt=Object.defineProperty,et=function(t,e){try{tt(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e},rt=e(function(t){var e="__core-js_shared__",r=t.exports=i[e]||et(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})}),nt=function(t,e){return rt[t]||(rt[t]=e||{})},ot=Object,it=function(t){return ot(j(t))},at=b({}.hasOwnProperty),ut=Object.hasOwn||function(t,e){return at(it(t),e)},st=0,ct=Math.random(),ft=b(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++st+ct,36)},ht=i.Symbol,pt=nt("wks"),vt=$?ht.for||ht:ht&&ht.withoutSetter||lt,dt=function(t){return ut(pt,t)||(pt[t]=H&&ut(ht,t)?ht[t]:vt("Symbol."+t)),pt[t]},gt=TypeError,yt=dt("toPrimitive"),mt=function(t,e){if(!M(t)||G(t))return t;var r,n=Q(t,yt);if(n){if(void 0===e&&(e="default"),r=f(n,t,e),!M(r)||G(r))return r;throw new gt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&T(r=t.toString)&&!M(n=f(r,t)))return n;if(T(r=t.valueOf)&&!M(n=f(r,t)))return n;if("string"!==e&&T(r=t.toString)&&!M(n=f(r,t)))return n;throw new Z("Can't convert object to primitive value")}(t,e)},bt=function(t){var e=mt(t,"string");return G(e)?e:e+""},wt=i.document,St=M(wt)&&M(wt.createElement),Et=function(t){return St?wt.createElement(t):{}},Ot=!u&&!a(function(){return 7!==Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a}),xt=Object.getOwnPropertyDescriptor,Rt={f:u?xt:function(t,e){if(t=k(t),e=bt(e),Ot)try{return xt(t,e)}catch(t){}if(ut(t,e))return d(!f(v.f,t,e),t[e])}},Pt=u&&a(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),At=String,jt=TypeError,kt=function(t){if(M(t))return t;throw new jt(At(t)+" is not an object")},It=TypeError,Tt=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Lt="enumerable",Ut="configurable",Nt="writable",Ct={f:u?Pt?function(t,e,r){if(kt(t),e=bt(e),kt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Nt in r&&!r[Nt]){var n=Mt(t,e);n&&n[Nt]&&(t[e]=r.value,r={configurable:Ut in r?r[Ut]:n[Ut],enumerable:Lt in r?r[Lt]:n[Lt],writable:!1})}return Tt(t,e,r)}:Tt:function(t,e,r){if(kt(t),e=bt(e),kt(r),Ot)try{return Tt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new It("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},_t=u?function(t,e,r){return Ct.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},Ft=Function.prototype,Bt=u&&Object.getOwnPropertyDescriptor,Dt=ut(Ft,"name"),zt={EXISTS:Dt,PROPER:Dt&&"something"===function(){}.name,CONFIGURABLE:Dt&&(!u||u&&Bt(Ft,"name").configurable)},Wt=b(Function.toString);T(rt.inspectSource)||(rt.inspectSource=function(t){return Wt(t)});var qt,Ht,$t,Kt=rt.inspectSource,Gt=i.WeakMap,Vt=T(Gt)&&/native code/.test(String(Gt)),Yt=nt("keys"),Xt=function(t){return Yt[t]||(Yt[t]=lt(t))},Jt={},Qt="Object already initialized",Zt=i.TypeError;if(Vt||rt.state){var te=rt.state||(rt.state=new(0,i.WeakMap));te.get=te.get,te.has=te.has,te.set=te.set,qt=function(t,e){if(te.has(t))throw new Zt(Qt);return e.facade=t,te.set(t,e),e},Ht=function(t){return te.get(t)||{}},$t=function(t){return te.has(t)}}else{var ee=Xt("state");Jt[ee]=!0,qt=function(t,e){if(ut(t,ee))throw new Zt(Qt);return e.facade=t,_t(t,ee,e),e},Ht=function(t){return ut(t,ee)?t[ee]:{}},$t=function(t){return ut(t,ee)}}var re,ne={set:qt,get:Ht,has:$t,enforce:function(t){return $t(t)?Ht(t):qt(t,{})},getterFor:function(t){return function(e){var r;if(!M(e)||(r=Ht(e)).type!==t)throw new Zt("Incompatible receiver, "+t+" required");return r}}},oe=e(function(t){var e=zt.CONFIGURABLE,r=ne.enforce,n=ne.get,o=String,i=Object.defineProperty,s=b("".slice),c=b("".replace),f=b([].join),l=u&&!a(function(){return 8!==i(function(){},"length",{value:8}).length}),h=String(String).split("String"),p=t.exports=function(t,n,a){"Symbol("===s(o(n),0,7)&&(n="["+c(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),a&&a.getter&&(n="get "+n),a&&a.setter&&(n="set "+n),(!ut(t,"name")||e&&t.name!==n)&&(u?i(t,"name",{value:n,configurable:!0}):t.name=n),l&&a&&ut(a,"arity")&&t.length!==a.arity&&i(t,"length",{value:a.arity});try{a&&ut(a,"constructor")&&a.constructor?u&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var p=r(t);return ut(p,"source")||(p.source=f(h,"string"==typeof n?n:"")),t};Function.prototype.toString=p(function(){return T(this)&&n(this).source||Kt(this)},"toString")}),ie=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(T(r)&&oe(r,i,n),n.global)o?t[e]=r:et(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Ct.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ae=Math.ceil,ue=Math.floor,se=Math.trunc||function(t){var e=+t;return(e>0?ue:ae)(e)},ce=function(t){var e=+t;return e!=e||0===e?0:se(e)},fe=Math.max,le=Math.min,he=function(t,e){var r=ce(t);return r<0?fe(r+e,0):le(r,e)},pe=Math.min,ve=function(t){var e=ce(t);return e>0?pe(e,9007199254740991):0},de=function(t){return ve(t.length)},ge=function(t){return function(e,r,n){var o=k(e),i=de(o);if(0===i)return!t&&-1;var a,u=he(n,i);if(t&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},ye={includes:ge(!0),indexOf:ge(!1)},me=ye.indexOf,be=b([].push),we=function(t,e){var r,n=k(t),o=0,i=[];for(r in n)!ut(Jt,r)&&ut(n,r)&&be(i,r);for(;e.length>o;)ut(n,r=e[o++])&&(~me(i,r)||be(i,r));return i},Se=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ee=Se.concat("length","prototype"),Oe={f:Object.getOwnPropertyNames||function(t){return we(t,Ee)}},xe={f:Object.getOwnPropertySymbols},Re=b([].concat),Pe=L("Reflect","ownKeys")||function(t){var e=Oe.f(kt(t)),r=xe.f;return r?Re(e,r(t)):e},Ae=function(t,e,r){for(var n=Pe(e),o=Ct.f,i=Rt.f,a=0;aa;)Ct.f(t,r=o[a++],n[r]);return t},Be={f:Fe},De=L("document","documentElement"),ze="prototype",We="script",qe=Xt("IE_PROTO"),He=function(){},$e=function(t){return"<"+We+">"+t+""},Ke=function(t){t.write($e("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ge=function(){try{re=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Ge="undefined"!=typeof document?document.domain&&re?Ke(re):(e=Et("iframe"),r="java"+We+":",e.style.display="none",De.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write($e("document.F=Object")),t.close(),t.F):Ke(re);for(var n=Se.length;n--;)delete Ge[ze][Se[n]];return Ge()};Jt[qe]=!0;var Ve=Object.create||function(t,e){var r;return null!==t?(He[ze]=kt(t),r=new He,He[ze]=null,r[qe]=t):r=Ge(),void 0===e?r:Be.f(r,e)},Ye=Ct.f,Xe=dt("unscopables"),Je=Array.prototype;void 0===Je[Xe]&&Ye(Je,Xe,{configurable:!0,value:Ve(null)});var Qe=function(t){Je[Xe][t]=!0};Ce({target:"Array",proto:!0},{at:function(t){var e=it(this),r=de(e),n=ce(t),o=n>=0?n:r+n;return o<0||o>=r?void 0:e[o]}}),Qe("at");var Ze=function(t,e){return b(i[t].prototype[e])},tr=(Ze("Array","at"),TypeError),er=function(t,e){if(!delete t[e])throw new tr("Cannot delete property "+Y(e)+" of "+Y(t))},rr=Math.min,nr=[].copyWithin||function(t,e){var r=it(this),n=de(r),o=he(t,n),i=he(e,n),a=arguments.length>2?arguments[2]:void 0,u=rr((void 0===a?n:he(a,n))-i,n-o),s=1;for(i0;)i in r?r[o]=r[i]:er(r,o),o+=s,i+=s;return r};Ce({target:"Array",proto:!0},{copyWithin:nr}),Qe("copyWithin"),Ze("Array","copyWithin"),Ce({target:"Array",proto:!0},{fill:function(t){for(var e=it(this),r=de(e),n=arguments.length,o=he(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:he(i,r);a>o;)e[o++]=t;return e}}),Qe("fill"),Ze("Array","fill");var or=function(t){if("Function"===E(t))return b(t)},ir=or(or.bind),ar=function(t,e){return J(t),void 0===e?t:s?ir(t,e):function(){return t.apply(e,arguments)}},ur=Array.isArray||function(t){return"Array"===E(t)},sr={};sr[dt("toStringTag")]="z";var cr="[object z]"===String(sr),fr=dt("toStringTag"),lr=Object,hr="Arguments"===E(function(){return arguments}()),pr=cr?E:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=lr(t),fr))?r:hr?E(e):"Object"===(n=E(e))&&T(e.callee)?"Arguments":n},vr=function(){},dr=L("Reflect","construct"),gr=/^\s*(?:class|function)\b/,yr=b(gr.exec),mr=!gr.test(vr),br=function(t){if(!T(t))return!1;try{return dr(vr,[],t),!0}catch(t){return!1}},wr=function(t){if(!T(t))return!1;switch(pr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mr||!!yr(gr,Kt(t))}catch(t){return!0}};wr.sham=!0;var Sr=!dr||a(function(){var t;return br(br.call)||!br(Object)||!br(function(){t=!0})||t})?wr:br,Er=dt("species"),Or=Array,xr=function(t,e){return new(function(t){var e;return ur(t)&&(Sr(e=t.constructor)&&(e===Or||ur(e.prototype))||M(e)&&null===(e=e[Er]))&&(e=void 0),void 0===e?Or:e}(t))(0===e?0:e)},Rr=b([].push),Pr=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(s,c,f,l){for(var h,p,v=it(s),d=R(v),g=de(d),y=ar(c,f),m=0,b=l||xr,w=e?b(s,g):r||a?b(s,0):void 0;g>m;m++)if((u||m in d)&&(p=y(h=d[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:Rr(w,h)}else switch(t){case 4:return!1;case 7:Rr(w,h)}return i?-1:n||o?o:w}},Ar={forEach:Pr(0),map:Pr(1),filter:Pr(2),some:Pr(3),every:Pr(4),find:Pr(5),findIndex:Pr(6),filterReject:Pr(7)},jr=Ar.find,kr="find",Ir=!0;kr in[]&&Array(1)[kr](function(){Ir=!1}),Ce({target:"Array",proto:!0,forced:Ir},{find:function(t){return jr(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe(kr),Ze("Array","find");var Tr=Ar.findIndex,Mr="findIndex",Lr=!0;Mr in[]&&Array(1)[Mr](function(){Lr=!1}),Ce({target:"Array",proto:!0,forced:Lr},{findIndex:function(t){return Tr(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe(Mr),Ze("Array","findIndex");var Ur=TypeError,Nr=function(t){if(t>9007199254740991)throw Ur("Maximum allowed index exceeded");return t},Cr=function(t,e,r,n,o,i,a,u){for(var s,c,f=o,l=0,h=!!a&&ar(a,u);l0&&ur(s)?(c=de(s),f=Cr(t,e,s,c,f,i-1)-1):(Nr(f+1),t[f]=s),f++),l++;return f},_r=Cr;Ce({target:"Array",proto:!0},{flatMap:function(t){var e,r=it(this),n=de(r);return J(t),(e=xr(r,0)).length=_r(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}}),Qe("flatMap"),Ze("Array","flatMap"),Ce({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=it(this),r=de(e),n=xr(e,0);return n.length=_r(n,e,e,r,0,void 0===t?1:ce(t)),n}}),Qe("flat"),Ze("Array","flat");var Fr,Br,Dr,zr=String,Wr=function(t){if("Symbol"===pr(t))throw new TypeError("Cannot convert a Symbol value to a string");return zr(t)},qr=b("".charAt),Hr=b("".charCodeAt),$r=b("".slice),Kr=function(t){return function(e,r){var n,o,i=Wr(j(e)),a=ce(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Hr(i,a))<55296||n>56319||a+1===u||(o=Hr(i,a+1))<56320||o>57343?t?qr(i,a):n:t?$r(i,a,a+2):o-56320+(n-55296<<10)+65536}},Gr={codeAt:Kr(!1),charAt:Kr(!0)},Vr=!a(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Yr=Xt("IE_PROTO"),Xr=Object,Jr=Xr.prototype,Qr=Vr?Xr.getPrototypeOf:function(t){var e=it(t);if(ut(e,Yr))return e[Yr];var r=e.constructor;return T(r)&&e instanceof r?r.prototype:e instanceof Xr?Jr:null},Zr=dt("iterator"),tn=!1;[].keys&&("next"in(Dr=[].keys())?(Br=Qr(Qr(Dr)))!==Object.prototype&&(Fr=Br):tn=!0);var en=!M(Fr)||a(function(){var t={};return Fr[Zr].call(t)!==t});en&&(Fr={}),T(Fr[Zr])||ie(Fr,Zr,function(){return this});var rn={IteratorPrototype:Fr,BUGGY_SAFARI_ITERATORS:tn},nn=Ct.f,on=dt("toStringTag"),an=function(t,e,r){t&&!r&&(t=t.prototype),t&&!ut(t,on)&&nn(t,on,{configurable:!0,value:e})},un={},sn=rn.IteratorPrototype,cn=function(){return this},fn=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Ve(sn,{next:d(+!n,r)}),an(t,o,!1),un[o]=cn,t},ln=function(t,e,r){try{return b(J(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},hn=String,pn=TypeError,vn=function(t){if(function(t){return M(t)||null===t}(t))return t;throw new pn("Can't set "+hn(t)+" as a prototype")},dn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=ln(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return j(r),vn(n),M(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),gn=zt.PROPER,yn=zt.CONFIGURABLE,mn=rn.IteratorPrototype,bn=rn.BUGGY_SAFARI_ITERATORS,wn=dt("iterator"),Sn="keys",En="values",On="entries",xn=function(){return this},Rn=function(t,e,r,n,o,i,a){fn(r,e,n);var u,s,c,l=function(t){if(t===o&&g)return g;if(!bn&&t&&t in v)return v[t];switch(t){case Sn:case En:case On:return function(){return new r(this,t)}}return function(){return new r(this)}},h=e+" Iterator",p=!1,v=t.prototype,d=v[wn]||v["@@iterator"]||o&&v[o],g=!bn&&d||l(o),y="Array"===e&&v.entries||d;if(y&&(u=Qr(y.call(new t)))!==Object.prototype&&u.next&&(Qr(u)!==mn&&(dn?dn(u,mn):T(u[wn])||ie(u,wn,xn)),an(u,h,!0)),gn&&o===En&&d&&d.name!==En&&(yn?_t(v,"name",En):(p=!0,g=function(){return f(d,this)})),o)if(s={values:l(En),keys:i?g:l(Sn),entries:l(On)},a)for(c in s)(bn||p||!(c in v))&&ie(v,c,s[c]);else Ce({target:e,proto:!0,forced:bn||p},s);return v[wn]!==g&&ie(v,wn,g,{name:o}),un[e]=g,s},Pn=function(t,e){return{value:t,done:e}},An=Gr.charAt,jn="String Iterator",kn=ne.set,In=ne.getterFor(jn);Rn(String,"String",function(t){kn(this,{type:jn,string:Wr(t),index:0})},function(){var t,e=In(this),r=e.string,n=e.index;return n>=r.length?Pn(void 0,!0):(t=An(r,n),e.index+=t.length,Pn(t,!1))});var Tn=function(t,e,r){var n,o;kt(t);try{if(!(n=Q(t,"return"))){if("throw"===e)throw r;return r}n=f(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return kt(n),r},Mn=function(t,e,r,n){try{return n?e(kt(r)[0],r[1]):e(r)}catch(e){Tn(t,"throw",e)}},Ln=dt("iterator"),Un=Array.prototype,Nn=function(t){return void 0!==t&&(un.Array===t||Un[Ln]===t)},Cn=function(t,e,r){u?Ct.f(t,e,d(0,r)):t[e]=r},_n=dt("iterator"),Fn=function(t){if(!P(t))return Q(t,_n)||Q(t,"@@iterator")||un[pr(t)]},Bn=TypeError,Dn=function(t,e){var r=arguments.length<2?Fn(t):e;if(J(r))return kt(f(r,t));throw new Bn(Y(t)+" is not iterable")},zn=Array,Wn=function(t){var e=it(t),r=Sr(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=ar(o,n>2?arguments[2]:void 0));var a,u,s,c,l,h,p=Fn(e),v=0;if(!p||this===zn&&Nn(p))for(a=de(e),u=r?new this(a):zn(a);a>v;v++)h=i?o(e[v],v):e[v],Cn(u,v,h);else for(u=r?new this:[],l=(c=Dn(e,p)).next;!(s=f(l,c)).done;v++)h=i?Mn(c,o,[s.value,v],!0):s.value,Cn(u,v,h);return u.length=v,u},qn=dt("iterator"),Hn=!1;try{var $n=0,Kn={next:function(){return{done:!!$n++}},return:function(){Hn=!0}};Kn[qn]=function(){return this},Array.from(Kn,function(){throw 2})}catch(t){}var Gn=function(t,e){try{if(!e&&!Hn)return!1}catch(t){return!1}var r=!1;try{var n={};n[qn]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Vn=!Gn(function(t){Array.from(t)});Ce({target:"Array",stat:!0,forced:Vn},{from:Wn});var Yn=i,Xn=ye.includes,Jn=a(function(){return!Array(1).includes()});Ce({target:"Array",proto:!0,forced:Jn},{includes:function(t){return Xn(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe("includes"),Ze("Array","includes");var Qn=Ct.f,Zn="Array Iterator",to=ne.set,eo=ne.getterFor(Zn),ro=Rn(Array,"Array",function(t,e){to(this,{type:Zn,target:k(t),index:0,kind:e})},function(){var t=eo(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Pn(void 0,!0);switch(t.kind){case"keys":return Pn(r,!1);case"values":return Pn(e[r],!1)}return Pn([r,e[r]],!1)},"values"),no=un.Arguments=un.Array;if(Qe("keys"),Qe("values"),Qe("entries"),u&&"values"!==no.name)try{Qn(no,"name",{value:"values"})}catch(t){}cr||ie(Object.prototype,"toString",cr?{}.toString:function(){return"[object "+pr(this)+"]"},{unsafe:!0}),Ze("Array","values");var oo=Array,io=a(function(){function t(){}return!(oo.of.call(t)instanceof t)});Ce({target:"Array",stat:!0,forced:io},{of:function(){for(var t=0,e=arguments.length,r=new(Sr(this)?this:oo)(e);e>t;)Cn(r,t,arguments[t++]);return r.length=e,r}});var ao=dt("hasInstance"),uo=Function.prototype;ao in uo||Ct.f(uo,ao,{value:oe(function(t){if(!T(this)||!M(t))return!1;var e=this.prototype;return M(e)?U(e,t):t instanceof this},ao)}),dt("hasInstance");var so=function(t,e,r){return r.get&&oe(r.get,e,{getter:!0}),r.set&&oe(r.set,e,{setter:!0}),Ct.f(t,e,r)},co=zt.EXISTS,fo=Function.prototype,lo=b(fo.toString),ho=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,po=b(ho.exec);u&&!co&&so(fo,"name",{configurable:!0,get:function(){try{return po(ho,lo(this))[1]}catch(t){return""}}});var vo=b([].slice),go=Oe.f,yo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],mo={f:function(t){return yo&&"Window"===E(t)?function(t){try{return go(t)}catch(t){return vo(yo)}}(t):go(k(t))}},bo=a(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),wo=Object.isExtensible,So=a(function(){wo(1)})||bo?function(t){return!!M(t)&&(!bo||"ArrayBuffer"!==E(t))&&(!wo||wo(t))}:wo,Eo=!a(function(){return Object.isExtensible(Object.preventExtensions({}))}),Oo=e(function(t){var e=Ct.f,r=!1,n=lt("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},a=t.exports={enable:function(){a.enable=function(){},r=!0;var t=Oe.f,e=b([].splice),o={};o[n]=1,t(o).length&&(Oe.f=function(r){for(var o=t(r),i=0,a=o.length;ii;i++)if((u=y(t[i]))&&U(Po,u))return u;return new Ro(!1)}n=Dn(t,o)}for(s=h?t.next:n.next;!(c=f(s,n)).done;){try{u=y(c.value)}catch(t){Tn(n,"throw",t)}if("object"==typeof u&&u&&U(Po,u))return u}return new Ro(!1)},jo=TypeError,ko=function(t,e){if(U(e,t))return t;throw new jo("Incorrect invocation")},Io=function(t,e,r){var n,o;return dn&&T(n=e.constructor)&&n!==r&&M(o=n.prototype)&&o!==r.prototype&&dn(t,o),t},To=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),u=n?"set":"add",s=i[t],c=s&&s.prototype,f=s,l={},h=function(t){var e=b(c[t]);ie(c,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!M(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!M(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!M(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(Ue(t,!T(s)||!(o||c.forEach&&!a(function(){(new s).entries().next()}))))f=r.getConstructor(e,t,n,u),Oo.enable();else if(Ue(t,!0)){var p=new f,v=p[u](o?{}:-0,1)!==p,d=a(function(){p.has(1)}),g=Gn(function(t){new s(t)}),y=!o&&a(function(){for(var t=new s,e=5;e--;)t[u](e,e);return!t.has(-0)});g||((f=e(function(t,e){ko(t,c);var r=Io(new s,t,f);return P(e)||Ao(e,r[u],{that:r,AS_ENTRIES:n}),r})).prototype=c,c.constructor=f),(d||y)&&(h("delete"),h("has"),n&&h("get")),(y||v)&&h(u),o&&c.clear&&delete c.clear}return l[t]=f,Ce({global:!0,constructor:!0,forced:f!==s},l),an(f,t),o||r.setStrong(f,t,n),f},Mo=function(t,e,r){for(var n in e)ie(t,n,e[n],r);return t},Lo=dt("species"),Uo=function(t){var e=L(t);u&&e&&!e[Lo]&&so(e,Lo,{configurable:!0,get:function(){return this}})},No=Oo.fastKey,Co=ne.set,_o=ne.getterFor,Fo={getConstructor:function(t,e,r,n){var o=t(function(t,o){ko(t,i),Co(t,{type:e,index:Ve(null),first:null,last:null,size:0}),u||(t.size=0),P(o)||Ao(o,t[n],{that:t,AS_ENTRIES:r})}),i=o.prototype,a=_o(e),s=function(t,e,r){var n,o,i=a(t),s=c(t,e);return s?s.value=r:(i.last=s={index:o=No(e,!0),key:e,value:r,previous:n=i.last,next:null,removed:!1},i.first||(i.first=s),n&&(n.next=s),u?i.size++:t.size++,"F"!==o&&(i.index[o]=s)),t},c=function(t,e){var r,n=a(t),o=No(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===e)return r};return Mo(i,{clear:function(){for(var t=a(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=Ve(null),u?t.size=0:this.size=0},delete:function(t){var e=this,r=a(e),n=c(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first===n&&(r.first=o),r.last===n&&(r.last=i),u?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=a(this),n=ar(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!c(this,t)}}),Mo(i,r?{get:function(t){var e=c(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),u&&so(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=_o(e),i=_o(n);Rn(t,e,function(t,e){Co(this,{type:n,target:t,state:o(t),kind:e,last:null})},function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?Pn("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=null,Pn(void 0,!0))},r?"entries":"values",!r,!0),Uo(e)}};To("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Fo);var Bo=Map.prototype,Do={Map:Map,set:b(Bo.set),get:b(Bo.get),has:b(Bo.has),remove:b(Bo.delete),proto:Bo},zo=Do.Map,Wo=Do.has,qo=Do.get,Ho=Do.set,$o=b([].push),Ko=a(function(){return 1!==zo.groupBy("ab",function(t){return t}).get("a").length});Ce({target:"Map",stat:!0,forced:Ko},{groupBy:function(t,e){j(t),J(e);var r=new zo,n=0;return Ao(t,function(t){var o=e(t,n++);Wo(r,o)?$o(qo(r,o),t):Ho(r,o,[t])}),r}});var Go={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vo=Et("span").classList,Yo=Vo&&Vo.constructor&&Vo.constructor.prototype,Xo=Yo===Object.prototype?void 0:Yo,Jo=dt("iterator"),Qo=ro.values,Zo=function(t,e){if(t){if(t[Jo]!==Qo)try{_t(t,Jo,Qo)}catch(e){t[Jo]=Qo}if(an(t,e,!0),Go[e])for(var r in ro)if(t[r]!==ro[r])try{_t(t,r,ro[r])}catch(e){t[r]=ro[r]}}};for(var ti in Go)Zo(i[ti]&&i[ti].prototype,ti);Zo(Xo,"DOMTokenList");var ei=function(t,e,r){return function(n){var o=it(n),i=arguments.length,a=i>1?arguments[1]:void 0,u=void 0!==a,s=u?ar(a,i>2?arguments[2]:void 0):void 0,c=new t,f=0;return Ao(o,function(t){var n=u?s(t,f++):t;r?e(c,kt(n)[0],n[1]):e(c,n)}),c}};Ce({target:"Map",stat:!0,forced:!0},{from:ei(Do.Map,Do.set,!0)});var ri=function(t,e,r){return function(){for(var n=new t,o=arguments.length,i=0;i1?arguments[1]:void 0);return!1!==di(e,function(t,n){if(!r(t,n,e))return!1},!0)}});var gi=Do.Map,yi=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new gi;return di(e,function(t,o){r(t,o,e)&&yi(n,o,t)}),n}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=di(e,function(t,n){if(r(t,n,e))return{value:t}},!0);return n&&n.value}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=di(e,function(t,n){if(r(t,n,e))return{key:n}},!0);return n&&n.key}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===di(oi(this),function(e){if((r=e)===(n=t)||r!=r&&n!=n)return!0;var r,n},!0)}});var mi=Do.Map;Ce({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var r=new(T(this)?this:mi);J(e);var n=J(r.set);return Ao(t,function(t){f(n,r,e(t),t)}),r}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=di(oi(this),function(e,r){if(e===t)return{key:r}},!0);return e&&e.key}});var bi=Do.Map,wi=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new bi;return di(e,function(t,o){wi(n,r(t,o,e),t)}),n}});var Si=Do.Map,Ei=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new Si;return di(e,function(t,o){Ei(n,o,r(t,o,e))}),n}});var Oi=Do.set;Ce({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=oi(this),r=arguments.length,n=0;n1?arguments[1]:void 0);return!0===di(e,function(t,n){if(r(t,n,e))return!0},!0)}});var Ri=TypeError,Pi=Do.get,Ai=Do.has,ji=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var r=oi(this),n=arguments.length;J(e);var o=Ai(r,t);if(!o&&n<3)throw new Ri("Updating absent value");var i=o?Pi(r,t):J(n>2?arguments[2]:void 0)(t,r);return ji(r,t,e(i,t,r)),r}});var ki=TypeError,Ii=function(t,e){var r,n=kt(this),o=J(n.get),i=J(n.has),a=J(n.set),u=arguments.length>2?arguments[2]:void 0;if(!T(e)&&!T(u))throw new ki("At least one callback required");return f(i,n,t)?(r=f(o,n,t),T(e)&&(r=e(r),f(a,n,t,r))):T(u)&&(r=u(),f(a,n,t,r)),r};Ce({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Ii}),Ce({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Ii});var Ti=b(1..valueOf),Mi="\t\n\v\f\r                 \u2028\u2029\ufeff",Li=b("".replace),Ui=RegExp("^["+Mi+"]+"),Ni=RegExp("(^|[^"+Mi+"])["+Mi+"]+$"),Ci=function(t){return function(e){var r=Wr(j(e));return 1&t&&(r=Li(r,Ui,"")),2&t&&(r=Li(r,Ni,"$1")),r}},_i={start:Ci(1),end:Ci(2),trim:Ci(3)},Fi=Oe.f,Bi=Rt.f,Di=Ct.f,zi=_i.trim,Wi="Number",qi=i[Wi],Hi=qi.prototype,$i=i.TypeError,Ki=b("".slice),Gi=b("".charCodeAt),Vi=Ue(Wi,!qi(" 0o1")||!qi("0b1")||qi("+0x1")),Yi=function(t){var e,r=arguments.length<1?0:qi(function(t){var e=mt(t,"number");return"bigint"==typeof e?e:function(t){var e,r,n,o,i,a,u,s,c=mt(t,"number");if(G(c))throw new $i("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=zi(c),43===(e=Gi(c,0))||45===e){if(88===(r=Gi(c,2))||120===r)return NaN}else if(48===e){switch(Gi(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=Ki(c,2)).length,u=0;uo)return NaN;return parseInt(i,n)}return+c}(e)}(t));return U(Hi,e=this)&&a(function(){Ti(e)})?Io(Object(r),this,Yi):r};Yi.prototype=Hi,Vi&&(Hi.constructor=Yi),Ce({global:!0,constructor:!0,wrap:!0,forced:Vi},{Number:Yi}),Vi&&function(t,e){for(var r,n=u?Fi(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)ut(e,r=n[o])&&!ut(t,r)&&Di(t,r,Bi(e,r))}(Yn[Wi],qi),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)});var Xi=i.isFinite;Ce({target:"Number",stat:!0},{isFinite:Number.isFinite||function(t){return"number"==typeof t&&Xi(t)}});var Ji=Math.floor,Qi=Number.isInteger||function(t){return!M(t)&&isFinite(t)&&Ji(t)===t};Ce({target:"Number",stat:!0},{isInteger:Qi}),Ce({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var Zi=Math.abs;Ce({target:"Number",stat:!0},{isSafeInteger:function(t){return Qi(t)&&Zi(t)<=9007199254740991}}),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991}),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991});var ta=_i.trim,ea=b("".charAt),ra=i.parseFloat,na=i.Symbol,oa=na&&na.iterator,ia=1/ra(Mi+"-0")!=-Infinity||oa&&!a(function(){ra(Object(oa))})?function(t){var e=ta(Wr(t)),r=ra(e);return 0===r&&"-"===ea(e,0)?-0:r}:ra;Ce({target:"Number",stat:!0,forced:Number.parseFloat!==ia},{parseFloat:ia});var aa=_i.trim,ua=i.parseInt,sa=i.Symbol,ca=sa&&sa.iterator,fa=/^[+-]?0x/i,la=b(fa.exec),ha=8!==ua(Mi+"08")||22!==ua(Mi+"0x16")||ca&&!a(function(){ua(Object(ca))})?function(t,e){var r=aa(Wr(t));return ua(r,e>>>0||(la(fa,r)?16:10))}:ua;Ce({target:"Number",stat:!0,forced:Number.parseInt!==ha},{parseInt:ha});var pa=b(v.f),va=b([].push),da=u&&a(function(){var t=Object.create(null);return t[2]=2,!pa(t,2)}),ga=function(t){return function(e){for(var r,n=k(e),o=_e(n),i=da&&null===Qr(n),a=o.length,s=0,c=[];a>s;)r=o[s++],u&&!(i?r in n:pa(n,r))||va(c,t?[r,n[r]]:n[r]);return c}},ya={entries:ga(!0),values:ga(!1)},ma=ya.entries;Ce({target:"Object",stat:!0},{entries:function(t){return ma(t)}}),Ce({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(t){for(var e,r,n=k(t),o=Rt.f,i=Pe(n),a={},u=0;i.length>u;)void 0!==(r=o(n,e=i[u++]))&&Cn(a,e,r);return a}});var ba=a(function(){_e(1)});Ce({target:"Object",stat:!0,forced:ba},{keys:function(t){return _e(it(t))}});var wa=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};Ce({target:"Object",stat:!0},{is:wa});var Sa=ya.values;Ce({target:"Object",stat:!0},{values:function(t){return Sa(t)}}),Ce({target:"Object",stat:!0},{hasOwn:ut});var Ea=Function.prototype,Oa=Ea.apply,xa=Ea.call,Ra="object"==typeof Reflect&&Reflect.apply||(s?xa.bind(Oa):function(){return xa.apply(Oa,arguments)}),Pa=!a(function(){Reflect.apply(function(){})});Ce({target:"Reflect",stat:!0,forced:Pa},{apply:function(t,e,r){return Ra(J(t),e,kt(r))}});var Aa=Function,ja=b([].concat),ka=b([].join),Ia={},Ta=s?Aa.bind:function(t){var e=J(this),r=e.prototype,n=vo(arguments,1),o=function(){var r=ja(n,vo(arguments));return this instanceof o?function(t,e,r){if(!ut(Ia,e)){for(var n=[],o=0;ob)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}),gs=Oe.f,ys=ne.enforce,ms=dt("match"),bs=i.RegExp,ws=bs.prototype,Ss=i.SyntaxError,Es=b(ws.exec),Os=b("".charAt),xs=b("".replace),Rs=b("".indexOf),Ps=b("".slice),As=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,js=/a/g,ks=/a/g,Is=new bs(js)!==js,Ts=cs.MISSED_STICKY,Ms=cs.UNSUPPORTED_Y,Ls=u&&(!Is||Ts||ps||ds||a(function(){return ks[ms]=!1,bs(js)!==js||bs(ks)===ks||"/a/i"!==String(bs(js,"i"))}));if(Ue("RegExp",Ls)){for(var Us=function(t,e){var r,n,o,i,a,u,s=U(ws,this),c=es(t),f=void 0===e,l=[],h=t;if(!s&&c&&f&&t.constructor===Us)return t;if((c||U(ws,t))&&(t=t.source,f&&(e=os(h))),t=void 0===t?"":Wr(t),e=void 0===e?"":Wr(e),h=t,ps&&"dotAll"in js&&(n=!!e&&Rs(e,"s")>-1)&&(e=xs(e,/s/g,"")),r=e,Ts&&"sticky"in js&&(o=!!e&&Rs(e,"y")>-1)&&Ms&&(e=xs(e,/y/g,"")),ds&&(i=function(t){for(var e,r=t.length,n=0,o="",i=[],a=Ve(null),u=!1,s=!1,c=0,f="";n<=r;n++){if("\\"===(e=Os(t,n)))e+=Os(t,++n);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:if(o+=e,"?:"===Ps(t,n+1,n+3))continue;Es(As,Ps(t,n+1))&&(n+=2,s=!0),c++;continue;case">"===e&&s:if(""===f||ut(a,f))throw new Ss("Invalid capture group name");a[f]=!0,i[i.length]=[f,c],s=!1,f="";continue}s?f+=e:o+=e}return[o,i]}(t),t=i[0],l=i[1]),a=Io(bs(t,e),s?this:ws,Us),(n||o||l.length)&&(u=ys(a),n&&(u.dotAll=!0,u.raw=Us(function(t){for(var e,r=t.length,n=0,o="",i=!1;n<=r;n++)"\\"!==(e=Os(t,n))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+Os(t,++n);return o}(t),r)),o&&(u.sticky=!0),l.length&&(u.groups=l)),t!==h)try{_t(a,"source",""===h?"(?:)":h)}catch(t){}return a},Ns=gs(bs),Cs=0;Ns.length>Cs;)ls(Us,bs,Ns[Cs++]);ws.constructor=Us,Us.prototype=ws,ie(i,"RegExp",Us,{constructor:!0})}Uo("RegExp");var _s=zt.PROPER,Fs="toString",Bs=RegExp.prototype,Ds=Bs[Fs];(a(function(){return"/a/b"!==Ds.call({source:"a",flags:"b"})})||_s&&Ds.name!==Fs)&&ie(Bs,Fs,function(){var t=kt(this);return"/"+Wr(t.source)+"/"+Wr(os(t))},{unsafe:!0});var zs=ne.get,Ws=RegExp.prototype,qs=TypeError;u&&ps&&so(Ws,"dotAll",{configurable:!0,get:function(){if(this!==Ws){if("RegExp"===E(this))return!!zs(this).dotAll;throw new qs("Incompatible receiver, RegExp required")}}});var Hs=ne.get,$s=nt("native-string-replace",String.prototype.replace),Ks=RegExp.prototype.exec,Gs=Ks,Vs=b("".charAt),Ys=b("".indexOf),Xs=b("".replace),Js=b("".slice),Qs=function(){var t=/a/,e=/b*/g;return f(Ks,t,"a"),f(Ks,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),Zs=cs.BROKEN_CARET,tc=void 0!==/()??/.exec("")[1];(Qs||tc||Zs||ps||ds)&&(Gs=function(t){var e,r,n,o,i,a,u,s=this,c=Hs(s),l=Wr(t),h=c.raw;if(h)return h.lastIndex=s.lastIndex,e=f(Gs,h,l),s.lastIndex=h.lastIndex,e;var p=c.groups,v=Zs&&s.sticky,d=f(rs,s),g=s.source,y=0,m=l;if(v&&(d=Xs(d,"y",""),-1===Ys(d,"g")&&(d+="g"),m=Js(l,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==Vs(l,s.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,y++),r=new RegExp("^(?:"+g+")",d)),tc&&(r=new RegExp("^"+g+"$(?!\\s)",d)),Qs&&(n=s.lastIndex),o=f(Ks,v?r:s,m),v?o?(o.input=Js(o.input,y),o[0]=Js(o[0],y),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:Qs&&o&&(s.lastIndex=s.global?o.index+o[0].length:n),tc&&o&&o.length>1&&f($s,o[0],r,function(){for(i=1;i]*>)/g,Oc=/\$([$&'`]|\d{1,2})/g,xc=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,s=Oc;return void 0!==o&&(o=it(o),s=Ec),wc(i,s,function(i,s){var c;switch(bc(s,0)){case"$":return"$";case"&":return t;case"`":return Sc(e,0,r);case"'":return Sc(e,a);case"<":c=o[Sc(s,1,-1)];break;default:var f=+s;if(0===f)return i;if(f>u){var l=mc(f/10);return 0===l?i:l<=u?void 0===n[l-1]?bc(s,1):n[l-1]+bc(s,1):i}c=n[f-1]}return void 0===c?"":c})},Rc=dt("replace"),Pc=Math.max,Ac=Math.min,jc=b([].concat),kc=b([].push),Ic=b("".indexOf),Tc=b("".slice),Mc="$0"==="a".replace(/./,"$0"),Lc=!!/./[Rc]&&""===/./[Rc]("a","$0"),Uc=!a(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")});pc("replace",function(t,e,r){var n=Lc?"$":"$0";return[function(t,r){var n=j(this),o=P(t)?void 0:Q(t,Rc);return o?f(o,t,n,r):f(e,Wr(n),t,r)},function(t,o){var i=kt(this),a=Wr(t);if("string"==typeof o&&-1===Ic(o,n)&&-1===Ic(o,"$<")){var u=r(e,i,a,o);if(u.done)return u.value}var s=T(o);s||(o=Wr(o));var c,f=i.global;f&&(c=i.unicode,i.lastIndex=0);for(var l,h=[];null!==(l=yc(i,a))&&(kc(h,l),f);)""===Wr(l[0])&&(i.lastIndex=dc(a,ve(i.lastIndex),c));for(var p,v="",d=0,g=0;g=d&&(v+=Tc(a,d,b)+y,d=b+m.length)}return v+Tc(a,d)}]},!Uc||!Mc||Lc),pc("search",function(t,e,r){return[function(e){var r=j(this),n=P(e)?void 0:Q(e,t);return n?f(n,e,r):new RegExp(e)[t](Wr(r))},function(t){var n=kt(this),o=Wr(t),i=r(e,n,o);if(i.done)return i.value;var a=n.lastIndex;wa(a,0)||(n.lastIndex=0);var u=yc(n,o);return wa(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]});var Nc=dt("species"),Cc=function(t,e){var r,n=kt(t).constructor;return void 0===n||P(r=kt(n)[Nc])?e:La(r)},_c=cs.UNSUPPORTED_Y,Fc=Math.min,Bc=b([].push),Dc=b("".slice),zc=!a(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}),Wc="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;pc("split",function(t,e,r){var n="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:f(e,this,t,r)}:e;return[function(e,r){var o=j(this),i=P(e)?void 0:Q(e,t);return i?f(i,e,o,r):f(n,Wr(o),e,r)},function(t,o){var i=kt(this),a=Wr(t);if(!Wc){var u=r(n,i,a,o,n!==e);if(u.done)return u.value}var s=Cc(i,RegExp),c=i.unicode,f=new s(_c?"^(?:"+i.source+")":i,(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(_c?"g":"y")),l=void 0===o?4294967295:o>>>0;if(0===l)return[];if(0===a.length)return null===yc(f,a)?[a]:[];for(var h=0,p=0,v=[];p0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r},Kc=b($c),Gc=b("".slice),Vc=Math.ceil,Yc=function(t){return function(e,r,n){var o,i,a=Wr(j(e)),u=ve(r),s=a.length,c=void 0===n?" ":Wr(n);return u<=s||""===c?a:((i=Kc(c,Vc((o=u-s)/c.length))).length>o&&(i=Gc(i,0,o)),t?a+i:i+a)}},Xc={start:Yc(!1),end:Yc(!0)},Jc=Xc.start,Qc=Array,Zc=RegExp.escape,tf=b("".charAt),ef=b("".charCodeAt),rf=b(1.1.toString),nf=b([].join),of=/^[0-9a-z]/i,af=/^[$()*+./?[\\\]^{|}]/,uf=RegExp("^[!\"#%&',\\-:;<=>@`~"+Mi+"]"),sf=b(of.exec),cf={"\t":"t","\n":"n","\v":"v","\f":"f","\r":"r"},ff=function(t){var e=rf(ef(t,0),16);return e.length<3?"\\x"+Jc(e,2,"0"):"\\u"+Jc(e,4,"0")},lf=!Zc||"\\x61b"!==Zc("ab");Ce({target:"RegExp",stat:!0,forced:lf},{escape:function(t){!function(t){if("string"==typeof t)return t;throw new qc("Argument is not a string")}(t);for(var e=t.length,r=Qc(e),n=0;n=56320||n+1>=e||56320!=(64512&ef(t,n+1))?r[n]=ff(o):(r[n]=o,r[++n]=tf(t,n))}}return nf(r,"")}}),To("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Fo);var hf=Set.prototype,pf={Set:Set,add:b(hf.add),has:b(hf.has),remove:b(hf.delete),proto:hf},vf=pf.has,df=function(t){return vf(t),t},gf=pf.Set,yf=pf.proto,mf=b(yf.forEach),bf=b(yf.keys),wf=bf(new gf).next,Sf=function(t,e,r){return r?ci({iterator:bf(t),next:wf},e):mf(t,e)},Ef=pf.Set,Of=pf.add,xf=function(t){var e=new Ef;return Sf(t,function(t){Of(e,t)}),e},Rf=ln(pf.proto,"size","get")||function(t){return t.size},Pf="Invalid size",Af=RangeError,jf=TypeError,kf=Math.max,If=function(t,e){this.set=t,this.size=kf(e,0),this.has=J(t.has),this.keys=J(t.keys)};If.prototype={getIterator:function(){return{iterator:t=kt(f(this.keys,this.set)),next:t.next,done:!1};var t},includes:function(t){return f(this.has,this.set,t)}};var Tf=function(t){kt(t);var e=+t.size;if(e!=e)throw new jf(Pf);var r=ce(e);if(r<0)throw new Af(Pf);return new If(t,r)},Mf=pf.has,Lf=pf.remove,Uf=function(t){var e=df(this),r=Tf(t),n=xf(e);return Rf(e)<=r.size?Sf(e,function(t){r.includes(t)&&Lf(n,t)}):ci(r.getIterator(),function(t){Mf(e,t)&&Lf(n,t)}),n},Nf=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Cf=function(t){var e=L("Set");try{(new e)[t](Nf(0));try{return(new e)[t](Nf(-1)),!1}catch(t){return!0}}catch(t){return!1}};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("difference")},{difference:Uf});var _f=pf.Set,Ff=pf.add,Bf=pf.has,Df=function(t){var e=df(this),r=Tf(t),n=new _f;return Rf(e)>r.size?ci(r.getIterator(),function(t){Bf(e,t)&&Ff(n,t)}):Sf(e,function(t){r.includes(t)&&Ff(n,t)}),n},zf=!Cf("intersection")||a(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))});Ce({target:"Set",proto:!0,real:!0,forced:zf},{intersection:Df});var Wf=pf.has,qf=function(t){var e=df(this),r=Tf(t);if(Rf(e)<=r.size)return!1!==Sf(e,function(t){if(r.includes(t))return!1},!0);var n=r.getIterator();return!1!==ci(n,function(t){if(Wf(e,t))return Tn(n,"normal",!1)})};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("isDisjointFrom")},{isDisjointFrom:qf});var Hf=function(t){var e=df(this),r=Tf(t);return!(Rf(e)>r.size)&&!1!==Sf(e,function(t){if(!r.includes(t))return!1},!0)};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("isSubsetOf")},{isSubsetOf:Hf});var $f=pf.has,Kf=function(t){var e=df(this),r=Tf(t);if(Rf(e)1?arguments[1]:void 0);return!1!==Sf(e,function(t){if(!r(t,t,e))return!1},!0)}});var el=dt("iterator"),rl=Object,nl=L("Set"),ol=function(t){return function(t){return M(t)&&"number"==typeof t.size&&T(t.has)&&T(t.keys)}(t)?t:function(t){if(P(t))return!1;var e=rl(t);return void 0!==e[el]||"@@iterator"in e||ut(un,pr(e))}(t)?new nl(t):t};Ce({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return f(Uf,this,ol(t))}});var il=pf.Set,al=pf.add;Ce({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new il;return Sf(e,function(t){r(t,t,e)&&al(n,t)}),n}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=Sf(e,function(t){if(r(t,t,e))return{value:t}},!0);return n&&n.value}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return f(Df,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return f(qf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return f(Hf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return f(Kf,this,ol(t))}});var ul=b([].join),sl=b([].push);Ce({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=df(this),r=void 0===t?",":Wr(t),n=[];return Sf(e,function(t){sl(n,t)}),ul(n,r)}});var cl=pf.Set,fl=pf.add;Ce({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new cl;return Sf(e,function(t){fl(n,r(t,t,e))}),n}});var ll=TypeError;Ce({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=df(this),r=arguments.length<2,n=r?void 0:arguments[1];if(J(t),Sf(e,function(o){r?(r=!1,n=o):n=t(n,o,o,e)}),r)throw new ll("Reduce of empty set with no initial value");return n}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0);return!0===Sf(e,function(t){if(r(t,t,e))return!0},!0)}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return f(Xf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return f(Qf,this,ol(t))}});var hl=dt("species"),pl=dt("isConcatSpreadable"),vl=W>=51||!a(function(){var t=[];return t[pl]=!1,t.concat()[0]!==t}),dl=function(t){if(!M(t))return!1;var e=t[pl];return void 0!==e?!!e:ur(t)},gl=!(vl&&(W>=51||!a(function(){var t=[];return(t.constructor={})[hl]=function(){return{foo:1}},1!==t.concat(Boolean).foo})));Ce({target:"Array",proto:!0,arity:1,forced:gl},{concat:function(t){var e,r,n,o,i,a=it(this),u=xr(a,0),s=0;for(e=-1,n=arguments.length;e1?arguments[1]:void 0,n=e.length,o=void 0===r?n:ip(ve(r),n),i=Wr(t);return op(e,o-i.length,o)===i}}),Ze("String","endsWith");var sp=RangeError,cp=String.fromCharCode,fp=String.fromCodePoint,lp=b([].join);Ce({target:"String",stat:!0,arity:1,forced:!!fp&&1!==fp.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,o=0;n>o;){if(e=+arguments[o++],he(e,1114111)!==e)throw new sp(e+" is not a valid code point");r[o]=e<65536?cp(e):cp(55296+((e-=65536)>>10),e%1024+56320)}return lp(r,"")}});var hp=b("".indexOf);Ce({target:"String",proto:!0,forced:!rp("includes")},{includes:function(t){return!!~hp(Wr(j(this)),Wr(tp(t)),arguments.length>1?arguments[1]:void 0)}}),Ze("String","includes"),b(un.String);var pp=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(_),vp=Xc.start;Ce({target:"String",proto:!0,forced:pp},{padStart:function(t){return vp(this,t,arguments.length>1?arguments[1]:void 0)}}),Ze("String","padStart");var dp=Xc.end;Ce({target:"String",proto:!0,forced:pp},{padEnd:function(t){return dp(this,t,arguments.length>1?arguments[1]:void 0)}}),Ze("String","padEnd");var gp=b([].push),yp=b([].join);Ce({target:"String",stat:!0},{raw:function(t){var e=k(it(t).raw),r=de(e);if(!r)return"";for(var n=arguments.length,o=[],i=0;;){if(gp(o,Wr(e[i++])),i===r)return yp(o,"");i1?arguments[1]:void 0,e.length)),n=Wr(t);return bp(e,r,r+n.length)===n}}),Ze("String","startsWith");var Op=zt.PROPER,xp=function(t){return a(function(){return!!Mi[t]()||"​…᠎"!=="​…᠎"[t]()||Op&&Mi[t].name!==t})},Rp=_i.start,Pp=xp("trimStart")?function(){return Rp(this)}:"".trimStart;Ce({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==Pp},{trimLeft:Pp}),Ce({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==Pp},{trimStart:Pp}),Ze("String","trimLeft");var Ap=_i.end,jp=xp("trimEnd")?function(){return Ap(this)}:"".trimEnd;Ce({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==jp},{trimRight:jp}),Ce({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==jp},{trimEnd:jp}),Ze("String","trimRight");var kp=Object.getOwnPropertyDescriptor,Ip=function(t){if(!u)return i[t];var e=kp(i,t);return e&&e.value},Tp=dt("iterator"),Mp=!a(function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach(function(t,r){e.delete("b"),n+=r+t}),r.delete("a",2),r.delete("b",void 0),!e.size&&!u||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Tp]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host}),Lp=TypeError,Up=function(t,e){if(t0;)t[o]=t[--o];o!==i++&&(t[o]=n)}else for(var a=Np(r/2),u=Cp(vo(t,0,a),e),s=Cp(vo(t,a),e),c=u.length,f=s.length,l=0,h=0;l0&&0!=(t&r);r>>=1)e++;return e},pv=function(t){var e=null;switch(t.length){case 1:e=t[0];break;case 2:e=(31&t[0])<<6|63&t[1];break;case 3:e=(15&t[0])<<12|(63&t[1])<<6|63&t[2];break;case 4:e=(7&t[0])<<18|(63&t[1])<<12|(63&t[2])<<6|63&t[3]}return e>1114111?null:e},vv=function(t){for(var e=(t=nv(t,cv," ")).length,r="",n=0;ne){r+="%",n++;continue}var i=lv(t,n+1);if(i!=i){r+=o,n++;continue}n+=2;var a=hv(i);if(0===a)o=Jp(i);else{if(1===a||a>4){r+="�",n++;continue}for(var u=[i],s=1;se||"%"!==tv(t,n));){var c=lv(t,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;rv(u,c),n+=2,s++}if(u.length!==a){r+="�";continue}var f=pv(u);null===f?r+="�":o=Qp(f)}}r+=o,n++}return r},dv=/[!'()~]|%20/g,gv={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},yv=function(t){return gv[t]},mv=function(t){return nv(Xp(t),dv,yv)},bv=fn(function(t,e){zp(this,{type:Dp,target:Wp(t).entries,index:0,kind:e})},Bp,function(){var t=qp(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Pn(void 0,!0);var n=e[r];switch(t.kind){case"keys":return Pn(n.key,!1);case"values":return Pn(n.value,!1)}return Pn([n.key,n.value],!1)},!0),wv=function(t){this.entries=[],this.url=null,void 0!==t&&(M(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===tv(t,0)?uv(t,1):t:Wr(t)))};wv.prototype={type:Bp,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,a,u,s=this.entries,c=Fn(t);if(c)for(r=(e=Dn(t,c)).next;!(n=f(r,e)).done;){if(o=Dn(kt(n.value)),(a=f(i=o.next,o)).done||(u=f(i,o)).done||!f(i,o).done)throw new Yp("Expected sequence with length 2");rv(s,{key:Wr(a.value),value:Wr(u.value)})}else for(var l in t)ut(t,l)&&rv(s,{key:l,value:Wr(t[l])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,o=av(t,"&"),i=0;i0?arguments[0]:void 0));u||(this.size=t.entries.length)},Ev=Sv.prototype;if(Mo(Ev,{append:function(t,e){var r=Wp(this);Up(arguments.length,2),rv(r.entries,{key:Wr(t),value:Wr(e)}),u||this.length++,r.updateURL()},delete:function(t){for(var e=Wp(this),r=Up(arguments.length,1),n=e.entries,o=Wr(t),i=r<2?void 0:arguments[1],a=void 0===i?i:Wr(i),s=0;se.key?1:-1}),t.updateURL()},forEach:function(t){for(var e,r=Wp(this).entries,n=ar(t,arguments.length>1?arguments[1]:void 0),o=0;o1?Rv(arguments[1]):{})}}),T($p)){var Pv=function(t){return ko(this,Gp),new $p(t,arguments.length>1?Rv(arguments[1]):{})};Gp.constructor=Pv,Pv.prototype=Gp,Ce({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Pv})}}var Av={URLSearchParams:Sv,getState:Wp},jv=URLSearchParams,kv=jv.prototype,Iv=b(kv.append),Tv=b(kv.delete),Mv=b(kv.forEach),Lv=b([].push),Uv=new jv("a=1&a=2&b=3");Uv.delete("a",1),Uv.delete("b",void 0),Uv+""!="a=2"&&ie(kv,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return Tv(this,t);var n=[];Mv(this,function(t,e){Lv(n,{key:e,value:t})}),Up(e,1);for(var o,i=Wr(t),a=Wr(r),u=0,s=0,c=!1,f=n.length;uo;)for(var s,c=R(arguments[o++]),l=i?$v(_e(c),i(c)):_e(c),h=l.length,p=0;h>p;)s=l[p++],u&&!f(a,c,s)||(r[s]=c[s]);return r}:qv,Gv=2147483647,Vv=/[^\0-\u007E]/,Yv=/[.\u3002\uFF0E\uFF61]/g,Xv="Overflow: input needs wider integers to process",Jv=RangeError,Qv=b(Yv.exec),Zv=Math.floor,td=String.fromCharCode,ed=b("".charCodeAt),rd=b([].join),nd=b([].push),od=b("".replace),id=b("".split),ad=b("".toLowerCase),ud=function(t){return t+22+75*(t<26)},sd=function(t,e,r){var n=0;for(t=r?Zv(t/700):t>>1,t+=Zv(t/e);t>455;)t=Zv(t/35),n+=36;return Zv(n+36*t/(t+38))},cd=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r=55296&&o<=56319&&r=i&&nZv((Gv-a)/l))throw new Jv(Xv);for(a+=(f-i)*l,i=f,r=0;rGv)throw new Jv(Xv);if(n===i){for(var h=a,p=36;;){var v=p<=u?1:p>=u+26?26:p-u;if(h?@[\\\]^|]/,qd=/[\0\t\n\r #/:<>?@[\\\]^|]/,Hd=/^[\u0000-\u0020]+/,$d=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Kd=/[\t\n\r]/g,Gd=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)Td(e,t%256),t=md(t/256);return Ed(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r?n:e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=Od(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},Vd={},Yd=Kv({},Vd,{" ":1,'"':1,"<":1,">":1,"`":1}),Xd=Kv({},Yd,{"#":1,"?":1,"{":1,"}":1}),Jd=Kv({},Xd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Qd=function(t,e){var r=fd(t,0);return r>32&&r<127&&!ut(e,t)?t:encodeURIComponent(t)},Zd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},tg=function(t,e){var r;return 2===t.length&&Sd(Nd,wd(t,0))&&(":"===(r=wd(t,1))||!e&&"|"===r)},eg=function(t){var e;return t.length>1&&tg(kd(t,0,2))&&(2===t.length||"/"===(e=wd(t,2))||"\\"===e||"?"===e||"#"===e)},rg=function(t){return"."===t||"%2e"===Id(t)},ng={},og={},ig={},ag={},ug={},sg={},cg={},fg={},lg={},hg={},pg={},vg={},dg={},gg={},yg={},mg={},bg={},wg={},Sg={},Eg={},Og={},xg=function(t,e,r){var n,o,i,a=Wr(t);if(e){if(o=this.parse(a))throw new gd(o);this.searchParams=null}else{if(void 0!==r&&(n=new xg(r,!0)),o=this.parse(a,null,n))throw new gd(o);(i=vd(new pd)).bindURL(this),this.searchParams=i}};xg.prototype={type:"URL",parse:function(t,e,r){var n,o,i,a,u,s=this,c=e||ng,f=0,l="",h=!1,p=!1,v=!1;for(t=Wr(t),e||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,t=Pd(t,Hd,""),t=Pd(t,$d,"$1")),t=Pd(t,Kd,""),n=Wn(t);f<=n.length;){switch(o=n[f],c){case ng:if(!o||!Sd(Nd,o)){if(e)return Md;c=ig;continue}l+=Id(o),c=og;break;case og:if(o&&(Sd(Cd,o)||"+"===o||"-"===o||"."===o))l+=Id(o);else{if(":"!==o){if(e)return Md;l="",c=ig,f=0;continue}if(e&&(s.isSpecial()!==ut(Zd,l)||"file"===l&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&!s.host))return;if(s.scheme=l,e)return void(s.isSpecial()&&Zd[s.scheme]===s.port&&(s.port=null));l="","file"===s.scheme?c=gg:s.isSpecial()&&r&&r.scheme===s.scheme?c=ag:s.isSpecial()?c=fg:"/"===n[f+1]?(c=ug,f++):(s.cannotBeABaseURL=!0,Rd(s.path,""),c=Sg)}break;case ig:if(!r||r.cannotBeABaseURL&&"#"!==o)return Md;if(r.cannotBeABaseURL&&"#"===o){s.scheme=r.scheme,s.path=vo(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=Og;break}c="file"===r.scheme?gg:sg;continue;case ag:if("/"!==o||"/"!==n[f+1]){c=sg;continue}c=lg,f++;break;case ug:if("/"===o){c=hg;break}c=wg;continue;case sg:if(s.scheme=r.scheme,o===Wv)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query=r.query;else if("/"===o||"\\"===o&&s.isSpecial())c=cg;else if("?"===o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query="",c=Eg;else{if("#"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.path.length--,c=wg;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query=r.query,s.fragment="",c=Og}break;case cg:if(!s.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=wg;continue}c=hg}else c=lg;break;case fg:if(c=lg,"/"!==o||"/"!==wd(l,f+1))continue;f++;break;case lg:if("/"!==o&&"\\"!==o){c=hg;continue}break;case hg:if("@"===o){h&&(l="%40"+l),h=!0,i=Wn(l);for(var d=0;d65535)return Ud;s.port=s.isSpecial()&&m===Zd[s.scheme]?null:m,l=""}if(e)return;c=bg;continue}return Ud}l+=o;break;case gg:if(s.scheme="file","/"===o||"\\"===o)c=yg;else{if(!r||"file"!==r.scheme){c=wg;continue}switch(o){case Wv:s.host=r.host,s.path=vo(r.path),s.query=r.query;break;case"?":s.host=r.host,s.path=vo(r.path),s.query="",c=Eg;break;case"#":s.host=r.host,s.path=vo(r.path),s.query=r.query,s.fragment="",c=Og;break;default:eg(Ed(vo(n,f),""))||(s.host=r.host,s.path=vo(r.path),s.shortenPath()),c=wg;continue}}break;case yg:if("/"===o||"\\"===o){c=mg;break}r&&"file"===r.scheme&&!eg(Ed(vo(n,f),""))&&(tg(r.path[0],!0)?Rd(s.path,r.path[0]):s.host=r.host),c=wg;continue;case mg:if(o===Wv||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&tg(l))c=wg;else if(""===l){if(s.host="",e)return;c=bg}else{if(a=s.parseHost(l))return a;if("localhost"===s.host&&(s.host=""),e)return;l="",c=bg}continue}l+=o;break;case bg:if(s.isSpecial()){if(c=wg,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==Wv&&(c=wg,"/"!==o))continue}else s.fragment="",c=Og;else s.query="",c=Eg;break;case wg:if(o===Wv||"/"===o||"\\"===o&&s.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(u=Id(u=l))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(s.shortenPath(),"/"===o||"\\"===o&&s.isSpecial()||Rd(s.path,"")):rg(l)?"/"===o||"\\"===o&&s.isSpecial()||Rd(s.path,""):("file"===s.scheme&&!s.path.length&&tg(l)&&(s.host&&(s.host=""),l=wd(l,0)+":"),Rd(s.path,l)),l="","file"===s.scheme&&(o===Wv||"?"===o||"#"===o))for(;s.path.length>1&&""===s.path[0];)Ad(s.path);"?"===o?(s.query="",c=Eg):"#"===o&&(s.fragment="",c=Og)}else l+=Qd(o,Xd);break;case Sg:"?"===o?(s.query="",c=Eg):"#"===o?(s.fragment="",c=Og):o!==Wv&&(s.path[0]+=Qd(o,Vd));break;case Eg:e||"#"!==o?o!==Wv&&("'"===o&&s.isSpecial()?s.query+="%27":s.query+="#"===o?"%23":Qd(o,Vd)):(s.fragment="",c=Og);break;case Og:o!==Wv&&(s.fragment+=Qd(o,Yd))}f++}},parseHost:function(t){var e,r,n;if("["===wd(t,0)){if("]"!==wd(t,t.length-1))return Ld;if(e=function(t){var e,r,n,o,i,a,u,s=[0,0,0,0,0,0,0,0],c=0,f=null,l=0,h=function(){return wd(t,l)};if(":"===h()){if(":"!==wd(t,1))return;l+=2,f=++c}for(;h();){if(8===c)return;if(":"!==h()){for(e=r=0;r<4&&Sd(zd,h());)e=16*e+yd(h(),16),l++,r++;if("."===h()){if(0===r)return;if(l-=r,c>6)return;for(n=0;h();){if(o=null,n>0){if(!("."===h()&&n<4))return;l++}if(!Sd(_d,h()))return;for(;Sd(_d,h());){if(i=yd(h(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;l++}s[c]=256*s[c]+o,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;s[c++]=e}else{if(null!==f)return;l++,f=++c}}if(null!==f)for(a=c-f,c=7;0!==c&&a>0;)u=s[c],s[c--]=s[f+a-1],s[f+--a]=u;else if(8!==c)return;return s}(kd(t,1,-1)),!e)return Ld;this.host=e}else if(this.isSpecial()){if(t=function(t){var e,r,n=[],o=id(od(ad(t),Yv,"."),".");for(e=0;e4)return t;for(r=[],n=0;n1&&"0"===wd(o,0)&&(i=Sd(Fd,o)?16:8,o=kd(o,8===i?1:2)),""===o)a=0;else{if(!Sd(10===i?Dd:8===i?Bd:zd,o))return t;a=yd(o,i)}Rd(r,a)}for(n=0;n=bd(256,5-e))return null}else if(a>255)return null;for(u=xd(r),n=0;n1?arguments[1]:void 0,n=ld(e,new xg(t,!1,r));u||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Pg=Rg.prototype,Ag=function(t,e){return{get:function(){return hd(this)[t]()},set:e&&function(t){return hd(this)[e](t)},configurable:!0,enumerable:!0}};if(u&&(so(Pg,"href",Ag("serialize","setHref")),so(Pg,"origin",Ag("getOrigin")),so(Pg,"protocol",Ag("getProtocol","setProtocol")),so(Pg,"username",Ag("getUsername","setUsername")),so(Pg,"password",Ag("getPassword","setPassword")),so(Pg,"host",Ag("getHost","setHost")),so(Pg,"hostname",Ag("getHostname","setHostname")),so(Pg,"port",Ag("getPort","setPort")),so(Pg,"pathname",Ag("getPathname","setPathname")),so(Pg,"search",Ag("getSearch","setSearch")),so(Pg,"searchParams",Ag("getSearchParams")),so(Pg,"hash",Ag("getHash","setHash"))),ie(Pg,"toJSON",function(){return hd(this).serialize()},{enumerable:!0}),ie(Pg,"toString",function(){return hd(this).serialize()},{enumerable:!0}),dd){var jg=dd.createObjectURL,kg=dd.revokeObjectURL;jg&&ie(Rg,"createObjectURL",ar(jg,dd)),kg&&ie(Rg,"revokeObjectURL",ar(kg,dd))}an(Rg,"URL"),Ce({global:!0,constructor:!0,forced:!Mp,sham:!u},{URL:Rg});var Ig=L("URL"),Tg=Mp&&a(function(){Ig.canParse()}),Mg=a(function(){return 1!==Ig.canParse.length});Ce({target:"URL",stat:!0,forced:!Tg||Mg},{canParse:function(t){var e=Up(arguments.length,1),r=Wr(t),n=e<2||void 0===arguments[1]?void 0:Wr(arguments[1]);try{return!!new Ig(r,n)}catch(t){return!1}}});var Lg=L("URL");Ce({target:"URL",stat:!0,forced:!Mp},{parse:function(t){var e=Up(arguments.length,1),r=Wr(t),n=e<2||void 0===arguments[1]?void 0:Wr(arguments[1]);try{return new Lg(r,n)}catch(t){return null}}}),Ce({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return f(URL.prototype.toString,this)}});var Ug=WeakMap.prototype,Ng={WeakMap:WeakMap,set:b(Ug.set),get:b(Ug.get),has:b(Ug.has),remove:b(Ug.delete)},Cg=Ng.has,_g=function(t){return Cg(t),t},Fg=Ng.get,Bg=Ng.has,Dg=Ng.set;Ce({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var r,n,o=_g(this);return Bg(o,t)?(r=Fg(o,t),"update"in e&&(r=e.update(r,t,o),Dg(o,t,r)),r):(n=e.insert(t,o),Dg(o,t,n),n)}}),Ce({target:"WeakMap",stat:!0,forced:!0},{from:ei(Ng.WeakMap,Ng.set,!0)}),Ce({target:"WeakMap",stat:!0,forced:!0},{of:ri(Ng.WeakMap,Ng.set,!0)});var zg=Ng.remove;Ce({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=_g(this),r=!0,n=0,o=arguments.length;n2&&(n=r,M(o=arguments[2])&&"cause"in o&&_t(n,"cause",o.cause));var s=[];return Ao(t,ny,{that:s}),_t(r,"errors",s),r};dn?dn(oy,ry):Ae(oy,ry,{name:!0});var iy=oy.prototype=Ve(ry.prototype,{constructor:d(1,oy),message:d(1,""),name:d(1,"AggregateError")});Ce({global:!0,constructor:!0,arity:2},{AggregateError:oy});var ay,uy,sy,cy,fy=function(t){return _.slice(0,t.length)===t},ly=fy("Bun/")?"BUN":fy("Cloudflare-Workers")?"CLOUDFLARE":fy("Deno/")?"DENO":fy("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===E(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST",hy="NODE"===ly,py=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),vy=i.setImmediate,dy=i.clearImmediate,gy=i.process,yy=i.Dispatch,my=i.Function,by=i.MessageChannel,wy=i.String,Sy=0,Ey={},Oy="onreadystatechange";a(function(){ay=i.location});var xy=function(t){if(ut(Ey,t)){var e=Ey[t];delete Ey[t],e()}},Ry=function(t){return function(){xy(t)}},Py=function(t){xy(t.data)},Ay=function(t){i.postMessage(wy(t),ay.protocol+"//"+ay.host)};vy&&dy||(vy=function(t){Up(arguments.length,1);var e=T(t)?t:my(t),r=vo(arguments,1);return Ey[++Sy]=function(){Ra(e,void 0,r)},uy(Sy),Sy},dy=function(t){delete Ey[t]},hy?uy=function(t){gy.nextTick(Ry(t))}:yy&&yy.now?uy=function(t){yy.now(Ry(t))}:by&&!py?(cy=(sy=new by).port2,sy.port1.onmessage=Py,uy=ar(cy.postMessage,cy)):i.addEventListener&&T(i.postMessage)&&!i.importScripts&&ay&&"file:"!==ay.protocol&&!a(Ay)?(uy=Ay,i.addEventListener("message",Py,!1)):uy=Oy in Et("script")?function(t){De.appendChild(Et("script"))[Oy]=function(){De.removeChild(this),xy(t)}}:function(t){setTimeout(Ry(t),0)});var jy={set:vy,clear:dy},ky=function(){this.head=null,this.tail=null};ky.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Iy,Ty,My,Ly,Uy,Ny=ky,Cy=/ipad|iphone|ipod/i.test(_)&&"undefined"!=typeof Pebble,_y=/web0s(?!.*chrome)/i.test(_),Fy=jy.set,By=i.MutationObserver||i.WebKitMutationObserver,Dy=i.document,zy=i.process,Wy=i.Promise,qy=Ip("queueMicrotask");if(!qy){var Hy=new Ny,$y=function(){var t,e;for(hy&&(t=zy.domain)&&t.exit();e=Hy.get();)try{e()}catch(t){throw Hy.head&&Iy(),t}t&&t.enter()};py||hy||_y||!By||!Dy?!Cy&&Wy&&Wy.resolve?((Ly=Wy.resolve(void 0)).constructor=Wy,Uy=ar(Ly.then,Ly),Iy=function(){Uy($y)}):hy?Iy=function(){zy.nextTick($y)}:(Fy=ar(Fy,i),Iy=function(){Fy($y)}):(Ty=!0,My=Dy.createTextNode(""),new By($y).observe(My,{characterData:!0}),Iy=function(){My.data=Ty=!Ty}),qy=function(t){Hy.head||Iy(),Hy.add(t)}}var Ky,Gy,Vy,Yy=qy,Xy=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Jy=i.Promise,Qy=dt("species"),Zy=!1,tm=T(i.PromiseRejectionEvent),em=Ue("Promise",function(){var t=Kt(Jy),e=t!==String(Jy);if(!e&&66===W)return!0;if(!W||W<51||!/native code/.test(t)){var r=new Jy(function(t){t(1)}),n=function(t){t(function(){},function(){})};if((r.constructor={})[Qy]=n,!(Zy=r.then(function(){})instanceof n))return!0}return!(e||"BROWSER"!==ly&&"DENO"!==ly||tm)}),rm={CONSTRUCTOR:em,REJECTION_EVENT:tm,SUBCLASSING:Zy},nm=TypeError,om=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new nm("Bad Promise constructor");e=t,r=n}),this.resolve=J(e),this.reject=J(r)},im={f:function(t){return new om(t)}},am=jy.set,um="Promise",sm=rm.CONSTRUCTOR,cm=rm.REJECTION_EVENT,fm=rm.SUBCLASSING,lm=ne.getterFor(um),hm=ne.set,pm=Jy&&Jy.prototype,vm=Jy,dm=pm,gm=i.TypeError,ym=i.document,mm=i.process,bm=im.f,wm=bm,Sm=!!(ym&&ym.createEvent&&i.dispatchEvent),Em="unhandledrejection",Om=function(t){var e;return!(!M(t)||!T(e=t.then))&&e},xm=function(t,e){var r,n,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,s=t.resolve,c=t.reject,l=t.domain;try{u?(a||(2===e.rejection&&km(e),e.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===t.promise?c(new gm("Promise-chain cycle")):(n=Om(r))?f(n,r,s,c):s(r)):c(i)}catch(t){l&&!o&&l.exit(),c(t)}},Rm=function(t,e){t.notified||(t.notified=!0,Yy(function(){for(var r,n=t.reactions;r=n.get();)xm(r,t);t.notified=!1,e&&!t.rejection&&Am(t)}))},Pm=function(t,e,r){var n,o;Sm?((n=ym.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),i.dispatchEvent(n)):n={promise:e,reason:r},!cm&&(o=i["on"+t])?o(n):t===Em&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",r)},Am=function(t){f(am,i,function(){var e,r=t.facade,n=t.value;if(jm(t)&&(e=Xy(function(){hy?mm.emit("unhandledRejection",n,r):Pm(Em,r,n)}),t.rejection=hy||jm(t)?2:1,e.error))throw e.value})},jm=function(t){return 1!==t.rejection&&!t.parent},km=function(t){f(am,i,function(){var e=t.facade;hy?mm.emit("rejectionHandled",e):Pm("rejectionhandled",e,t.value)})},Im=function(t,e,r){return function(n){t(e,n,r)}},Tm=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Rm(t,!0))},Mm=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new gm("Promise can't be resolved itself");var n=Om(e);n?Yy(function(){var r={done:!1};try{f(n,e,Im(Mm,r,t),Im(Tm,r,t))}catch(e){Tm(r,e,t)}}):(t.value=e,t.state=1,Rm(t,!1))}catch(e){Tm({done:!1},e,t)}}};if(sm&&(vm=function(t){ko(this,dm),J(t),f(Ky,this);var e=lm(this);try{t(Im(Mm,e),Im(Tm,e))}catch(t){Tm(e,t)}},(Ky=function(t){hm(this,{type:um,done:!1,notified:!1,parent:!1,reactions:new Ny,rejection:!1,state:0,value:null})}).prototype=ie(dm=vm.prototype,"then",function(t,e){var r=lm(this),n=bm(Cc(this,vm));return r.parent=!0,n.ok=!T(t)||t,n.fail=T(e)&&e,n.domain=hy?mm.domain:void 0,0===r.state?r.reactions.add(n):Yy(function(){xm(n,r)}),n.promise}),Gy=function(){var t=new Ky,e=lm(t);this.promise=t,this.resolve=Im(Mm,e),this.reject=Im(Tm,e)},im.f=bm=function(t){return t===vm||void 0===t?new Gy(t):wm(t)},T(Jy)&&pm!==Object.prototype)){Vy=pm.then,fm||ie(pm,"then",function(t,e){var r=this;return new vm(function(t,e){f(Vy,r,t,e)}).then(t,e)},{unsafe:!0});try{delete pm.constructor}catch(t){}dn&&dn(pm,dm)}Ce({global:!0,constructor:!0,wrap:!0,forced:sm},{Promise:vm}),an(vm,um,!1),Uo(um);var Lm=rm.CONSTRUCTOR||!Gn(function(t){Jy.all(t).then(void 0,function(){})});Ce({target:"Promise",stat:!0,forced:Lm},{all:function(t){var e=this,r=im.f(e),n=r.resolve,o=r.reject,i=Xy(function(){var r=J(e.resolve),i=[],a=0,u=1;Ao(t,function(t){var s=a++,c=!1;u++,f(r,e,t).then(function(t){c||(c=!0,i[s]=t,--u||n(i))},o)}),--u||n(i)});return i.error&&o(i.value),r.promise}});var Um=Jy&&Jy.prototype;if(Ce({target:"Promise",proto:!0,forced:rm.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),T(Jy)){var Nm=L("Promise").prototype.catch;Um.catch!==Nm&&ie(Um,"catch",Nm,{unsafe:!0})}Ce({target:"Promise",stat:!0,forced:Lm},{race:function(t){var e=this,r=im.f(e),n=r.reject,o=Xy(function(){var o=J(e.resolve);Ao(t,function(t){f(o,e,t).then(r.resolve,n)})});return o.error&&n(o.value),r.promise}}),Ce({target:"Promise",stat:!0,forced:rm.CONSTRUCTOR},{reject:function(t){var e=im.f(this);return(0,e.reject)(t),e.promise}});var Cm=function(t,e){if(kt(t),M(e)&&e.constructor===t)return e;var r=im.f(t);return(0,r.resolve)(e),r.promise};Ce({target:"Promise",stat:!0,forced:rm.CONSTRUCTOR},{resolve:function(t){return Cm(this,t)}}),Ce({target:"Promise",stat:!0,forced:Lm},{allSettled:function(t){var e=this,r=im.f(e),n=r.resolve,o=r.reject,i=Xy(function(){var r=J(e.resolve),o=[],i=0,a=1;Ao(t,function(t){var u=i++,s=!1;a++,f(r,e,t).then(function(t){s||(s=!0,o[u]={status:"fulfilled",value:t},--a||n(o))},function(t){s||(s=!0,o[u]={status:"rejected",reason:t},--a||n(o))})}),--a||n(o)});return i.error&&o(i.value),r.promise}});var _m="No one promise resolved";Ce({target:"Promise",stat:!0,forced:Lm},{any:function(t){var e=this,r=L("AggregateError"),n=im.f(e),o=n.resolve,i=n.reject,a=Xy(function(){var n=J(e.resolve),a=[],u=0,s=1,c=!1;Ao(t,function(t){var l=u++,h=!1;s++,f(n,e,t).then(function(t){h||c||(c=!0,o(t))},function(t){h||c||(h=!0,a[l]=t,--s||i(new r(a,_m)))})}),--s||i(new r(a,_m))});return a.error&&i(a.value),n.promise}}),Ce({target:"Promise",stat:!0},{withResolvers:function(){var t=im.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var Fm=Jy&&Jy.prototype,Bm=!!Jy&&a(function(){Fm.finally.call({then:function(){}},function(){})});if(Ce({target:"Promise",proto:!0,real:!0,forced:Bm},{finally:function(t){var e=Cc(this,L("Promise")),r=T(t);return this.then(r?function(r){return Cm(e,t()).then(function(){return r})}:t,r?function(r){return Cm(e,t()).then(function(){throw r})}:t)}}),T(Jy)){var Dm=L("Promise").prototype.finally;Fm.finally!==Dm&&ie(Fm,"finally",Dm,{unsafe:!0})}var zm=i.Promise,Wm=!1,qm=!zm||!zm.try||Xy(function(){zm.try(function(t){Wm=8===t},8)}).error||!Wm;Ce({target:"Promise",stat:!0,forced:qm},{try:function(t){var e=arguments.length>1?vo(arguments,1):[],r=im.f(this),n=Xy(function(){return Ra(J(t),void 0,e)});return(n.error?r.reject:r.resolve)(n.value),r.promise}}),Ze("Promise","finally");var Hm="URLSearchParams"in self,$m="Symbol"in self&&"iterator"in Symbol,Km="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),Gm="FormData"in self,Vm="ArrayBuffer"in self;if(Vm)var Ym=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Xm=ArrayBuffer.isView||function(t){return t&&Ym.indexOf(Object.prototype.toString.call(t))>-1};function Jm(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function Qm(t){return"string"!=typeof t&&(t=String(t)),t}function Zm(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return $m&&(e[Symbol.iterator]=function(){return e}),e}function tb(t){this.map={},t instanceof tb?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function eb(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function rb(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function nb(t){var e=new FileReader,r=rb(e);return e.readAsArrayBuffer(t),r}function ob(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function ib(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:Km&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Gm&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:Hm&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():Vm&&Km&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=ob(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Vm&&(ArrayBuffer.prototype.isPrototypeOf(t)||Xm(t))?this._bodyArrayBuffer=ob(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Hm&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Km&&(this.blob=function(){var t=eb(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?eb(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(nb)}),this.text=function(){var t=eb(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=rb(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function sb(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function cb(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new tb(e.headers),this.url=e.url||"",this._initBody(t)}ub.prototype.clone=function(){return new ub(this,{body:this._bodyInit})},ib.call(ub.prototype),ib.call(cb.prototype),cb.prototype.clone=function(){return new cb(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new tb(this.headers),url:this.url})},cb.error=function(){var t=new cb(null,{status:0,statusText:""});return t.type="error",t};var fb=[301,302,303,307,308];cb.redirect=function(t,e){if(-1===fb.indexOf(e))throw new RangeError("Invalid status code");return new cb(null,{status:e,headers:{location:t}})};var lb=self.DOMException;try{new lb}catch(t){(lb=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),lb.prototype.constructor=lb}function hb(t,e){return new Promise(function(r,n){var o=new ub(t,e);if(o.signal&&o.signal.aborted)return n(new lb("Aborted","AbortError"));var i=new XMLHttpRequest;function a(){i.abort()}i.onload=function(){var t,e,n={status:i.status,statusText:i.statusText,headers:(t=i.getAllResponseHeaders()||"",e=new tb,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL"),r(new cb("response"in i?i.response:i.responseText,n))},i.onerror=function(){n(new TypeError("Network request failed"))},i.ontimeout=function(){n(new TypeError("Network request failed"))},i.onabort=function(){n(new lb("Aborted","AbortError"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&Km&&(i.responseType="blob"),o.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),o.signal&&(o.signal.addEventListener("abort",a),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",a)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})}hb.polyfill=!0,self.fetch||(self.fetch=hb,self.Headers=tb,self.Request=ub,self.Response=cb);var pb=Object.getOwnPropertySymbols,vb=Object.prototype.hasOwnProperty,db=Object.prototype.propertyIsEnumerable,gb=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,n,o=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),i=1;i{"use strict";var e={428:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FrameProcessor=t.validateOptions=t.defaultFrameProcessorOptions=void 0;const i=s(294),r=s(842),o=[512,1024,1536];t.defaultFrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,preSpeechPadFrames:1,redemptionFrames:8,frameSamples:1536,minSpeechFrames:3,submitUserSpeechOnPause:!1},t.validateOptions=function(e){o.includes(e.frameSamples)||r.log.warn("You are using an unusual frame size"),(e.positiveSpeechThreshold<0||e.negativeSpeechThreshold>1)&&r.log.error("postiveSpeechThreshold should be a number between 0 and 1"),(e.negativeSpeechThreshold<0||e.negativeSpeechThreshold>e.positiveSpeechThreshold)&&r.log.error("negativeSpeechThreshold should be between 0 and postiveSpeechThreshold"),e.preSpeechPadFrames<0&&r.log.error("preSpeechPadFrames should be positive"),e.redemptionFrames<0&&r.log.error("preSpeechPadFrames should be positive")};const n=e=>{const t=e.reduce(((e,t)=>(e.push(e.at(-1)+t.length),e)),[0]),s=new Float32Array(t.at(-1));return e.forEach(((e,i)=>{const r=t[i];s.set(e,r)})),s};t.FrameProcessor=class{constructor(e,t,s){this.modelProcessFunc=e,this.modelResetFunc=t,this.options=s,this.speaking=!1,this.redemptionCounter=0,this.active=!1,this.reset=()=>{this.speaking=!1,this.audioBuffer=[],this.modelResetFunc(),this.redemptionCounter=0},this.pause=()=>(this.active=!1,this.options.submitUserSpeechOnPause?this.endSegment():(this.reset(),{})),this.resume=()=>{this.active=!0},this.endSegment=()=>{const e=this.audioBuffer;this.audioBuffer=[];const t=this.speaking;this.reset();const s=e.reduce(((e,t)=>e+ +t.isSpeech),0);if(t){if(s>=this.options.minSpeechFrames){const t=n(e.map((e=>e.frame)));return{msg:i.Message.SpeechEnd,audio:t}}return{msg:i.Message.VADMisfire}}return{}},this.process=async e=>{if(!this.active)return{};const t=await this.modelProcessFunc(e);if(this.audioBuffer.push({frame:e,isSpeech:t.isSpeech>=this.options.positiveSpeechThreshold}),t.isSpeech>=this.options.positiveSpeechThreshold&&this.redemptionCounter&&(this.redemptionCounter=0),t.isSpeech>=this.options.positiveSpeechThreshold&&!this.speaking)return this.speaking=!0,{probs:t,msg:i.Message.SpeechStart};if(t.isSpeech=this.options.redemptionFrames){this.redemptionCounter=0,this.speaking=!1;const e=this.audioBuffer;if(this.audioBuffer=[],e.reduce(((e,t)=>e+ +t.isSpeech),0)>=this.options.minSpeechFrames){const s=n(e.map((e=>e.frame)));return{probs:t,msg:i.Message.SpeechEnd,audio:s}}return{probs:t,msg:i.Message.VADMisfire}}if(!this.speaking)for(;this.audioBuffer.length>this.options.preSpeechPadFrames;)this.audioBuffer.shift();return{probs:t}},this.audioBuffer=[],this.reset()}}},14:function(e,t,s){var i=this&&this.__createBinding||(Object.create?function(e,t,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(t,s);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,r)}:function(e,t,s,i){void 0===i&&(i=s),e[i]=t[s]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&i(t,e,s);return r(t,e),t},n=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||i(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.utils=void 0;const a=o(s(26));t.utils={minFramesForTargetMS:a.minFramesForTargetMS,arrayBufferToBase64:a.arrayBufferToBase64,encodeWAV:a.encodeWAV},n(s(405),t),n(s(428),t),n(s(294),t),n(s(842),t),n(s(260),t),n(s(724),t)},842:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.log=t.LOG_PREFIX=void 0,t.LOG_PREFIX="[VAD]";const s=["error","debug","warn"].reduce(((e,s)=>(e[s]=function(e){return(...s)=>{console[e](t.LOG_PREFIX,...s)}}(s),e)),{});t.log=s},294:(e,t)=>{var s;Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0,function(e){e.AudioFrame="AUDIO_FRAME",e.SpeechStart="SPEECH_START",e.VADMisfire="VAD_MISFIRE",e.SpeechEnd="SPEECH_END",e.SpeechStop="SPEECH_STOP"}(s||(t.Message=s={}))},260:(e,t,s)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Silero=void 0;const r=s(842);class o{constructor(e,t){this.ort=e,this.modelFetcher=t,this.init=async()=>{r.log.debug("initializing vad");const e=await this.modelFetcher();this._session=await this.ort.InferenceSession.create(e),this._sr=new this.ort.Tensor("int64",[16000n]),this.reset_state(),r.log.debug("vad is initialized")},this.reset_state=()=>{const e=Array(128).fill(0);this._h=new this.ort.Tensor("float32",e,[2,1,64]),this._c=new this.ort.Tensor("float32",e,[2,1,64])},this.process=async e=>{const t={input:new this.ort.Tensor("float32",e,[1,e.length]),h:this._h,c:this._c,sr:this._sr},s=await this._session.run(t);this._h=s.hn,this._c=s.cn;const[i]=s.output.data;return{notSpeech:1-i,isSpeech:i}}}}t.Silero=o,i=o,o.new=async(e,t)=>{const s=new i(e,t);return await s.init(),s}},405:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformAgnosticNonRealTimeVAD=t.defaultNonRealTimeVADOptions=void 0;const i=s(428),r=s(294),o=s(260),n=s(724);t.defaultNonRealTimeVADOptions={...i.defaultFrameProcessorOptions,ortConfig:void 0},t.PlatformAgnosticNonRealTimeVAD=class{static async _new(e,s,i={}){const r={...t.defaultNonRealTimeVADOptions,...i};void 0!==r.ortConfig&&r.ortConfig(s);const o=new this(e,s,r);return await o.init(),o}constructor(e,t,s){this.modelFetcher=e,this.ort=t,this.options=s,this.init=async()=>{const e=await o.Silero.new(this.ort,this.modelFetcher);this.frameProcessor=new i.FrameProcessor(e.process,e.reset_state,{frameSamples:this.options.frameSamples,positiveSpeechThreshold:this.options.positiveSpeechThreshold,negativeSpeechThreshold:this.options.negativeSpeechThreshold,redemptionFrames:this.options.redemptionFrames,preSpeechPadFrames:this.options.preSpeechPadFrames,minSpeechFrames:this.options.minSpeechFrames,submitUserSpeechOnPause:this.options.submitUserSpeechOnPause}),this.frameProcessor.resume()},this.run=async function*(e,t){const s={nativeSampleRate:t,targetSampleRate:16e3,targetFrameSize:this.options.frameSamples},i=new n.Resampler(s);let o=0,a=0,h=0;for await(const t of i.stream(e)){const{msg:e,audio:s}=await this.frameProcessor.process(t);switch(e){case r.Message.SpeechStart:o=h*this.options.frameSamples/16;break;case r.Message.SpeechEnd:a=(h+1)*this.options.frameSamples/16,yield{audio:s,start:o,end:a}}h++}const{msg:p,audio:c}=this.frameProcessor.endSegment();p==r.Message.SpeechEnd&&(yield{audio:c,start:o,end:h*this.options.frameSamples/16})},(0,i.validateOptions)(s)}}},724:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Resampler=void 0;const i=s(842);t.Resampler=class{constructor(e){this.options=e,this.process=e=>{const t=[];for(this.fillInputBuffer(e);this.hasEnoughDataForFrame();){const e=this.generateOutputFrame();t.push(e)}return t},this.stream=async function*(e){for(this.fillInputBuffer(e);this.hasEnoughDataForFrame();){const e=this.generateOutputFrame();yield e}},e.nativeSampleRate<16e3&&i.log.error("nativeSampleRate is too low. Should have 16000 = targetSampleRate <= nativeSampleRate"),this.inputBuffer=[]}fillInputBuffer(e){for(const t of e)this.inputBuffer.push(t)}hasEnoughDataForFrame(){return this.inputBuffer.length*this.options.targetSampleRate/this.options.nativeSampleRate>=this.options.targetFrameSize}generateOutputFrame(){const e=new Float32Array(this.options.targetFrameSize);let t=0,s=0;for(;t{function s(e,t,s){for(var i=0;i{const e=s(14);class t extends AudioWorkletProcessor{constructor(t){super(),this._initialized=!1,this._stopProcessing=!1,this.init=async()=>{e.log.debug("initializing worklet"),this.resampler=new e.Resampler({nativeSampleRate:sampleRate,targetSampleRate:16e3,targetFrameSize:this.options.frameSamples}),this._initialized=!0,e.log.debug("initialized worklet")},this.options=t.processorOptions,this.port.onmessage=t=>{t.data.message===e.Message.SpeechStop&&(this._stopProcessing=!0)},this.init()}process(t,s,i){if(this._stopProcessing)return!1;const r=t[0][0];if(this._initialized&&r instanceof Float32Array){const t=this.resampler.process(r);for(const s of t)this.port.postMessage({message:e.Message.AudioFrame,data:s.buffer},[s.buffer])}return!0}}registerProcessor("vad-helper-worklet",t)})()})(); \ No newline at end of file diff --git a/src/components/VadAudio.tsx b/src/components/VadAudio.tsx new file mode 100644 index 00000000..d8290636 --- /dev/null +++ b/src/components/VadAudio.tsx @@ -0,0 +1,135 @@ +"use client"; + +import { useState, useRef, useCallback, useEffect } from "react"; +import { useMicVAD, utils } from "@ricky0123/vad-react"; +import { Microphone, StopCircle } from "@phosphor-icons/react"; +import { Button } from "@/components/button"; +import { cn } from "@/lib/utils"; + +interface VadAudioProps { + onAudioCapture: (audioFile: File) => void; + onStartListening: () => void; + onStopListening: () => void; + isHome?: boolean; +} + +export default function VadAudio({ + onAudioCapture, + onStartListening, + onStopListening, + isHome = false, +}: VadAudioProps) { + const [isListening, setIsListening] = useState(false); + const [duration, setDuration] = useState("00:00"); + const audioChunks = useRef([]); + const timerRef = useRef(null); + const startTimeRef = useRef(null); + + const vad = useMicVAD({ + onSpeechEnd: (audio: Float32Array) => { + const wavBuffer = utils.encodeWAV(audio); + const audioBlob = new Blob([wavBuffer], { type: "audio/wav" }); + const audioFile = new File([audioBlob], "audio.wav", { + type: "audio/wav", + }); + console.log("audioFile", audioFile); + + onAudioCapture(audioFile); + }, + onSpeechStart: () => { + console.log("onSpeechStart"); + }, + workletURL: "/vad/vad.worklet.bundle.min.js", + modelURL: "/vad/silero_vad.onnx", + ortConfig: (ort) => { + ort.env.wasm.wasmPaths = "/vad/"; + }, + startOnLoad: false, + submitUserSpeechOnPause: true, + }); + + const handleStartListening = useCallback(() => { + vad.start(); + startTimer(); + onStartListening(); + setIsListening(true); + audioChunks.current = []; + }, [vad]); + + const handleStopListening = useCallback(() => { + setIsListening(false); + onStopListening(); + vad.pause(); + resetDuration(); + clearTimer(); + }, [vad]); + + const startTimer = () => { + startTimeRef.current = Date.now(); + timerRef.current = setInterval(() => { + if (startTimeRef.current) { + const elapsed = Date.now() - startTimeRef.current; + console.log("elapsed", elapsed); + const minutes = Math.floor(elapsed / 60000); + const seconds = Math.floor((elapsed % 60000) / 1000); + setDuration( + `${String(minutes).padStart(2, "0")}:${String(seconds).padStart( + 2, + "0", + )}`, + ); + } + }, 1000); + }; + + const resetDuration = () => { + setDuration("00:00"); + clearTimer(); + }; + + const clearTimer = () => { + if (timerRef.current) { + clearInterval(timerRef.current); + timerRef.current = null; + } + startTimeRef.current = null; + }; + + useEffect(() => { + return () => { + clearTimer(); + }; + }, []); + + return ( +
+ + {isListening ? {duration} : null} +
+ ); +} diff --git a/src/components/inputBar.tsx b/src/components/inputBar.tsx index 3f3af648..fef3904a 100644 --- a/src/components/inputBar.tsx +++ b/src/components/inputBar.tsx @@ -10,12 +10,10 @@ import { useState, } from "react"; import { ChatRequestOptions, CreateMessage, Message, nanoid } from "ai"; -import { Microphone, PaperPlaneTilt } from "@phosphor-icons/react"; +import { PaperPlaneTilt } from "@phosphor-icons/react"; import { Button } from "@/components/button"; import { ChatType, chattype } from "@/lib/types"; import { motion } from "framer-motion"; -import { Loader2 } from "lucide-react"; -import { cn } from "@/lib/utils"; import { usePresence } from "ably/react"; import { useQueryClient } from "@tanstack/react-query"; import { fetchEventSource } from "@microsoft/fetch-event-source"; @@ -25,7 +23,7 @@ import usePreferences from "@/store/userPreferences"; import { useImageState } from "@/store/tlDrawImage"; import ModelSwitcher from "./modelswitcher"; // import VadAudio from "./vadAudio"; -import AudioWaveForm from "./audiowaveform"; +import VadAudio from "./VadAudio"; const isValidImageType = (value: string) => /^image\/(jpeg|png|jpg|webp)$/.test(value); @@ -314,74 +312,8 @@ const InputBar = (props: InputBarProps) => { return; } } - // if (props.choosenAI === "universal") { props.append(message as Message); props.setInput(""); - // } - // if (props.choosenAI === "agent") { - // setDisableInputs(true); - // props.setMessages([...props.messages, message]); - // props.setInput(""); - // const res = await fetch(`/api/chatagent/${props.chatId}`, { - // method: "POST", - // body: JSON.stringify({ - // messages: [...props.messages, message], - // isFast: true, - // orgId: props.orgId, - // }), - // }); - // let content = ""; - // const id = nanoid(); - // const assistantMessage: Message = { - // id, - // role: "assistant", - // content: "", - // }; - // let functionMessages: Message[] = []; - // if (res.body) { - // const reader = res?.body.getReader(); - // while (true) { - // const { done, value } = await reader.read(); - // if (done) { - // console.log("controller closed"); - // setDisableInputs(false); - // break; - // } - // const text = new TextDecoder().decode(value); - // if (text.startsWith(`$__JSON_START__`)) { - // const jsonStr = text - // .replace("$__JSON_START__", "") - // .replace("__JSON_END__", ""); - // if (isJSON(jsonStr)) { - // console.log("this is json", jsonStr); - // const functionMessage: Message = { - // id: nanoid(), - // role: "function", - // content: jsonStr, - // }; - // functionMessages.push(functionMessage); - // props.setMessages([ - // ...props.messages, - // message, - // ...functionMessages, - // ]); - // } - // } else { - // console.log("non-json", text); - // content += text; - // props.setMessages([ - // ...props.messages, - // message, - // ...functionMessages, - // { - // ...assistantMessage, - // content: content, - // }, - // ]); - // } - // } - // } - // } }; const handleAudio = async (audioFile: File) => { @@ -407,27 +339,42 @@ const InputBar = (props: InputBarProps) => { setIsTranscribing(false); } }; - // const handleAudioChunk = async (audioChunk: File) => { - // setIsTranscribing(true); - // const f = new FormData(); - // f.append("file", audioChunk); - // console.log(audioChunk); - // try { - // const res = await fetch("/api/transcript", { - // method: "POST", - // body: f, - // }); - // const data = await res.json(); - // console.log("got the data", data); - // props.setInput((prev) => prev + data.text); - // setIsTranscribing(false); - // } catch (err) { - // console.error("got in error", err); - // setIsTranscribing(false); - // } - // }; + const [audioId, setAudioId] = useState(0); + const [transcriptHashTable, setTranscriptHashTable] = useState<{ + [key: number]: string; + }>({}); + const handleAudioChunk = async (audioChunk: File) => { + const newAudioId = audioId + 1; + setAudioId(newAudioId); + setIsTranscribing(true); + const f = new FormData(); + f.append("file", audioChunk); + try { + const res = await fetch("/api/transcript", { + method: "POST", + body: f, + }); + + const data = await res.json(); + setTranscriptHashTable((prev) => ({ + ...prev, + [newAudioId]: data.text, + })); + // props?.setInput?.((prev) => prev + data.text); + setIsTranscribing(false); + } catch (err) { + console.error("got in error", err); + setIsTranscribing(false); + } + }; + + useEffect(() => { + if (Object.keys(transcriptHashTable).length > 0) { + props?.setInput?.(Object.values(transcriptHashTable).join(" ")); + } + }, [transcriptHashTable]); useEffect(() => { if ( presenceData @@ -518,6 +465,19 @@ const InputBar = (props: InputBarProps) => { // setDisableInputs(true) }; + const [isBlinking, setIsBlinking] = useState(false); // Control blinking state + const [displayNumber, setDisplayNumber] = useState(1); + + useEffect(() => { + let interval: any; + if (isBlinking) { + interval = setInterval(() => { + setDisplayNumber((prev) => (prev === 5 ? 1 : prev + 1)); + }, 100); // Change every 500ms + } + + return () => clearInterval(interval); + }, [isBlinking]); return (
{ layout className="flex flex-grow bg-linear-900 p-2 pt-2 rounded-sm gap-2 " > - {/* */} - {isAudioWaveVisible ? ( - - ) : ( - - - - {/* */} - - - {presenceData.some((p) => p.data.isTyping) && ( -
-
-
-

- - {presenceData.map((p) => p.data.username).join(", ")} - {" "} -

-
+ + + {presenceData.some((p) => p.data.isTyping) && ( +
+
+
+

+ + {presenceData.map((p) => p.data.username).join(", ")} + {" "} +

- )} - + )} + { + if (e.key === "Enter" && !e.shiftKey) { + e.preventDefault(); + handleSubmit(e as unknown as FormEvent); } - autoFocus - value={props.value} - onChange={handleInputChange} - onKeyDown={(e) => { - if (e.key === "Enter" && !e.shiftKey) { - e.preventDefault(); - handleSubmit(e as unknown as FormEvent); - } - }} - className="flex-none resize-none rounded-sm grow w-full bg-background border border-secondary text-primary p-2 text-sm disabled:text-muted" - /> - - - - - {/* */} + { + setIsBlinking(true); setIsAudioWaveVisible(true); + const newAudioId = audioId + 1; + setAudioId(newAudioId); + setTranscriptHashTable((prev) => ({ + ...prev, + [newAudioId]: props.value, + })); }} onStopListening={() => { + setIsBlinking(false); + setTranscriptHashTable({}); setIsAudioWaveVisible(false); }} - disabled={isRecording || isTranscribing || disableInputs} + // disabled={isRecording || isTranscribing || disableInputs} onAudioCapture={(file: File) => { // trigger a call to the backend to transcribe the audio handleAudioChunk(file); }} - /> */} - - + + + - + + - )} + + {/* )} */} {/* */} diff --git a/src/components/inputBar2.tsx b/src/components/inputBar2.tsx index da8a8739..4cc56ac1 100644 --- a/src/components/inputBar2.tsx +++ b/src/components/inputBar2.tsx @@ -6,14 +6,13 @@ import { Dispatch, FormEvent, SetStateAction, + useEffect, useState, } from "react"; import { ChatRequestOptions, CreateMessage, Message, nanoid } from "ai"; -import { Microphone, PaperPlaneTilt } from "@phosphor-icons/react"; +import { PaperPlaneTilt } from "@phosphor-icons/react"; import { Button } from "@/components/button"; import { ChatType, chattype } from "@/lib/types"; -import { Loader2 } from "lucide-react"; -import { cn } from "@/lib/utils"; import { useQueryClient } from "@tanstack/react-query"; import { fetchEventSource } from "@microsoft/fetch-event-source"; import z from "zod"; @@ -21,7 +20,7 @@ import { toast } from "./ui/use-toast"; import { useImageState } from "@/store/tlDrawImage"; import ModelSwitcher from "./modelswitcher"; // import VadAudio from "./vadAudio"; -import AudioWaveForm from "./audiowaveform"; +import VadAudio from "./VadAudio"; const isValidImageType = (value: string) => /^image\/(jpeg|png|jpg|webp)$/.test(value); @@ -331,6 +330,41 @@ const InputBar = (props: InputBarProps) => { } }; + const [audioId, setAudioId] = useState(0); + const [transcriptHashTable, setTranscriptHashTable] = useState<{ + [key: number]: string; + }>({}); + + const handleAudioChunk = async (audioChunk: File) => { + const newAudioId = audioId + 1; + setAudioId(newAudioId); + setIsTranscribing(true); + const f = new FormData(); + f.append("file", audioChunk); + try { + const res = await fetch("/api/transcript", { + method: "POST", + body: f, + }); + + const data = await res.json(); + setTranscriptHashTable((prev) => ({ + ...prev, + [newAudioId]: data.text, + })); + setIsTranscribing(false); + } catch (err) { + console.error("got in error", err); + setIsTranscribing(false); + } + }; + + useEffect(() => { + if (Object.keys(transcriptHashTable).length > 0) { + props?.setInput?.(Object.values(transcriptHashTable).join(" ")); + } + }, [transcriptHashTable]); + //TODO: const handleInputChange = (e: ChangeEvent) => { if (props.dropZoneActive) { @@ -349,6 +383,20 @@ const InputBar = (props: InputBarProps) => { } }; + const [isBlinking, setIsBlinking] = useState(false); // Control blinking state + const [displayNumber, setDisplayNumber] = useState(1); + + useEffect(() => { + let interval: any; + if (isBlinking) { + interval = setInterval(() => { + setDisplayNumber((prev) => (prev === 5 ? 1 : prev + 1)); + }, 100); // Change every 500ms + } + + return () => clearInterval(interval); + }, [isBlinking]); + return (
{ >
{/* */} - {isAudioWaveVisible && ( - - )} -
{ : "Type your message here..." } autoFocus - value={props.value} + value={ + props.value + (isBlinking ? ".".repeat(displayNumber) : "") + } onChange={handleInputChange} onKeyDown={(e) => { if (e.key === "Enter" && !e.shiftKey) { @@ -399,12 +435,6 @@ const InputBar = (props: InputBarProps) => { }} className="flex-none resize-none rounded-sm grow w-full bg-background border border-secondary text-primary p-2 text-sm disabled:text-muted" /> -
@@ -425,20 +455,30 @@ const InputBar = (props: InputBarProps) => {
- + { + setIsBlinking(true); + setIsAudioWaveVisible(true); + const newAudioId = audioId + 1; + setAudioId(newAudioId); + setTranscriptHashTable((prev) => ({ + ...prev, + [newAudioId]: props?.value || "", + })); + setIsAudioWaveVisible(true); + }} + onStopListening={() => { + setIsBlinking(false); + setTranscriptHashTable({}); + setIsAudioWaveVisible(false); + }} + // disabled={isRecording || isTranscribing || disableInputs} + onAudioCapture={(file: File) => { + // trigger a call to the backend to transcribe the audio + handleAudioChunk(file); + }} + isHome={props.isHome} + />