var OGVDecoderVideoAV1W = (function() { var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; return ( function(OGVDecoderVideoAV1W) { OGVDecoderVideoAV1W = OGVDecoderVideoAV1W || {}; var a;a||(a=typeof OGVDecoderVideoAV1W !== 'undefined' ? OGVDecoderVideoAV1W : {});var p=a;a.memoryLimit&&(a.TOTAL_MEMORY=p.memoryLimit);var q={},u;for(u in a)a.hasOwnProperty(u)&&(q[u]=a[u]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(b,c){throw c;};a.preRun=[];a.postRun=[];var v=!1,y=!1,z=!1,aa=!1;v="object"===typeof window;y="function"===typeof importScripts;z="object"===typeof process&&"function"===typeof require&&!v&&!y;aa=!v&&!z&&!y;var A=""; if(z){A=__dirname+"/";var B,E;a.read=function(b,c){B||(B=require("fs"));E||(E=require("path"));b=E.normalize(b);b=B.readFileSync(b);return c?b:b.toString()};a.readBinary=function(b){b=a.read(b,!0);b.buffer||(b=new Uint8Array(b));b.buffer||F("Assertion failed: undefined");return b};1R&&I("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+R+"! (TOTAL_STACK=5242880)");a.buffer?buffer=a.buffer:"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(J=new WebAssembly.Memory({initial:R/65536}),buffer=J.buffer):buffer=new ArrayBuffer(R);fa();Q[97380]=5632432; function S(b){for(;0>2]}var wa={};function xa(){return ea.length}function ya(b){b=K(b);var c=buffer.byteLength;try{return-1!==J.grow((b-c)/65536)?(buffer=J.buffer,!0):!1}catch(d){return!1}} var za=a.asm({},{b:F,k:function(b){a.___errno_location&&(Q[a.___errno_location()>>2]=b);return b},q:function(b,c){W=c;try{return wa.G(),X(),X(),X(),X(),0}catch(d){return F(d),-d.F}},h:function(b,c){W=c;try{var d=X(),e=X(),n=X();for(c=b=0;c>2],w=Q[e+(8*c+4)>>2],x=0;x=g);)++t;if(16h)g+=String.fromCharCode(h);else{var N=h-65536;g+=String.fromCharCode(55296|N>>10,56320|N&1023)}}}else g+=String.fromCharCode(h)}L=g}G(L);r.length=0}else r.push(C)}b+=w}return b}catch(O){return F(O),-O.F}},p:function(b,c){W=c;return 0},o:function(b,c){W=c;try{return wa.G(),0}catch(d){return F(d),-d.F}},g:function(){a.abort()},n:xa,m:function(b, c,d){P.set(P.subarray(c,c+d),b)},l:function(b){if(2147418112=c?c=K(2*c):c=Math.min(K((3*c+2147483648)/4),2147418112);if(!ya(c))return!1;fa();return!0},s:function(b,c,d,e,n,f,w,x,C,r,G,l,m,g,t,L){function h(b,c,d,e,h,n,m,l){b=M.subarray(b,b+c*d);var k=b.buffer;"function"===typeof k.slice?(b=k.slice(b.byteOffset,b.byteOffset+b.byteLength),b=new Uint8Array(b)):b=new Uint8Array(b);var g,f;for(g=f=0;g=c||(Y&&a._free(Y),Da=c,Y=a._malloc(Da));var d=Y;a.HEAPU8.set(new Uint8Array(b),d);return a._ogv_video_decoder_process_header(d,c)});c(d)}; a.D=[];a.processFrame=function(b,c){function d(b){a._free(f);c(b)}var e=a._ogv_video_decoder_async(),n=b.byteLength,f=a._malloc(n);e&&a.D.push(d);var w=Z(function(){a.HEAPU8.set(new Uint8Array(b),f);return a._ogv_video_decoder_process_frame(f,n)});e||d(w)};a.close=function(){};a.sync=function(){a._ogv_video_decoder_async()&&(a.D.push(function(){}),Z(function(){a._ogv_video_decoder_process_frame(0,0)}))}; return OGVDecoderVideoAV1W } ); })(); if (typeof exports === 'object' && typeof module === 'object') module.exports = OGVDecoderVideoAV1W; else if (typeof define === 'function' && define['amd']) define([], function() { return OGVDecoderVideoAV1W; }); else if (typeof exports === 'object') exports["OGVDecoderVideoAV1W"] = OGVDecoderVideoAV1W;