Files
EasyPlayerJs/html-demo/js/decoder-pro-mt.js

2 lines
438 KiB
JavaScript
Raw Normal View History

2024-08-01 16:32:01 +08:00
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href,function(t){var r,i;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(e,t){r=e,i=t})),(t=void 0!==t?t:{}).locateFile=function(e){return"decoder-pro-mt-worker.wasm"==e&&"undefined"!=typeof EASYPLAYER_PRO_MT_WORKER_WASM_URL&&""!=EASYPLAYER_PRO_MT_WORKER_WASM_URL?EASYPLAYER_PRO_MT_WORKER_WASM_URL:e};var n,s,o,a,d,l,u=Object.assign({},t),c="./this.program",f=(e,t)=>{throw t},h="object"==typeof window,p="function"==typeof importScripts,m="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,_=t.ENVIRONMENT_IS_PTHREAD||!1,y="";function g(e){return t.locateFile?t.locateFile(e,y):y+e}if(m){let e;y=p?require("path").dirname(y)+"/":__dirname+"/",l=()=>{d||(a=require("fs"),d=require("path"))},n=function(e,t){return l(),e=d.normalize(e),a.readFileSync(e,t?void 0:"utf8")},o=e=>{var t=n(e,!0);return t.buffer||(t=new Uint8Array(t)),t},s=(e,t,r)=>{l(),e=d.normalize(e),a.readFile(e,(function(e,i){e?r(e):t(i.buffer)}))},process.argv.length>1&&(c=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof fe))throw e})),process.on("unhandledRejection",(function(e){throw e})),f=(e,t)=>{if(Z())throw process.exitCode=e,t;var r;(r=t)instanceof fe||E("exiting due to exception: "+r),process.exit(e)},t.inspect=function(){return"[Emscripten Module object]"};try{e=require("worker_threads")}catch(e){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),e}global.Worker=e.Worker}else(h||p)&&(p?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),e&&(y=e),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"",m||(n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},p&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),s=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)}));m&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var v=console.log.bind(console),b=console.warn.bind(console);m&&(l(),v=e=>a.writeSync(1,e+"\n"),b=e=>a.writeSync(2,e+"\n"));var w=t.print||v,E=t.printErr||b;Object.assign(t,u),u=null,t.arguments&&t.arguments,t.thisProgram&&(c=t.thisProgram),t.quit&&(f=t.quit);var S,x=4;t.wasmBinary&&(S=t.wasmBinary);var U,A,k=t.noExitRuntime||!0;"object"!=typeof WebAssembly&&ie("no native wasm support detected");var T,B=!1;function C(e,t){e||ie(t)}var D,P,F,I,L,R,M,z,N,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function $(e,t,r){for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&O)return O.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,n):e.subarray(t,n));for(var s="";t<n;){var o=e[t++];if(128&o){var a=63&e[t++];if(192!=(224&o)){var d=63&e[t++];if((o=224==(240&o)?(15&o)<<12|a<<6|d:(7&o)<<18|a<<12|d<<6|63&e[t++])<65536)s+=String.fromCharCode(o);else{var l=o-65536;s+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s}function G(e,t){return e?$(F,e,t):""}function H(e,t,r,i){if(!(i>0))return 0;for(var n=r,s=r+i-1,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&6