learning_cesium/XbsjCesium/ThirdParty/Workers/basis_transcoder.js

1 line
32 KiB
JavaScript
Raw Permalink Normal View History

2024-03-19 18:06:25 +08:00
var BASIS=function(){var Pt="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(Pt=Pt||__filename),function(e){var r,i,a=void 0!==(e=e||{})?e:{};a.ready=new Promise(function(e,t){r=e,readyPromiseRejectza=t});var t,n={};for(t in a)a.hasOwnProperty(t)&&(n[t]=a[t]);var o,u,s,c,f,l=!1,p=!1,l="object"==typeof window,p="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!l&&!d&&!p,y="";d?(y=p?require("path").dirname(y)+"/":__dirname+"/",o=function(e,t){return c=c||require("fs"),e=(f=f||require("path")).normalize(e),c.readFileSync(e,t?null:"utf8")},s=function(e){e=o(e,!0);return T((e=!e.buffer?new Uint8Array(e):e).buffer),e},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}))throw e}),process.on("unhandledRejection",Z),a.inspect=function(){return"[Emscripten Module object]"}):h?("undefined"!=typeof read&&(o=function(e){return read(e)}),s=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(T("object"==typeof(e=read(e,"binary"))),e)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(l||p)&&(p?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),y=0!==(y=Pt?Pt:y).indexOf("blob:")?y.substr(0,y.lastIndexOf("/")+1):"",o=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},p&&(s=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),u=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var v=a.print||console.log.bind(console),m=a.printErr||console.warn.bind(console);for(t in n)n.hasOwnProperty(t)&&(a[t]=n[t]);n=null,a.arguments&&a.arguments,a.thisProgram&&a.thisProgram,a.quit&&a.quit;var g;a.wasmBinary&&(g=a.wasmBinary);var w;a.noExitRuntime;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var b=!1;function T(e,t){e||Z("Assertion failed: "+t)}var C="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function $(e,t,r){for(var n=t+r,o=t;e[o]&&!(n<=o);)++o;if(16<o-t&&e.subarray&&C)return C.decode(e.subarray(t,o));for(var i="";t<o;){var a,u,s=e[t++];128&s?(a=63&e[t++],192!=(224&s)?(u=63&e[t++],(s=224==(240&s)?(15&s)<<12|a<<6|u:(7&s)<<18|a<<12|u<<6|63&e[t++])<65536?i+=String.fromCharCode(s):(u=s-65536,i+=String.fromCharCode(55296|u>>10,56320|1023&u))):i+=String.fromCharCode((31&s)<<6|a)):i+=String.fromCharCode(s)}return i}function P(e,t){return e?$(W,e,t):""}function A(e,t,r){return function(e,t,r,n){if(!(0<n))return;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var u=e.charCodeAt(a);if((u=55296<=u&&u<=57343?65536+((1023&u)<<10)|1023&e.charCodeAt(++a):u)<=127){if(i<=r)break;t[r++]=u}else if(u<=2047){if(i<=r+1)break;t[r++]=192|u>>6,t[r++]=128|63&u}else if(u<=65535){if(i<=r+2)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|63&u}else{if(i<=r+3)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|63&u}}return t[r]=0,r-o}(e,W,t,r)}var _,S,W,E,F,k,O,j,R,I="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function x(e,t){for(var r,n=e>>1,o=n+t/2;!(o<=n)&&F[n];)++n;if(32<(r=n<<1)-e&&I)return I.decode(W.subarray(e,r));for(var i="",a=0;!(t/2<=a);++a){var u=E[e+2*a>>1];if(0==u)break;i+=String.fromCharCode(u)}return i}function D(e,t,r){if((r=void 0===r?2147483647:r)<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);E[t>>1]=a,t+=2}return E[t>>1]=0,t-n}function U(e){return 2*e.length}function B(e,t){for(var r=0,n="";!(t/4<=r);){var o,i=k[e+4*r>>2];if(0==i)break