9 lines
2.0 KiB
JavaScript
9 lines
2.0 KiB
JavaScript
|
|
/**
|
||
|
|
* Minified by jsDelivr using Terser v5.19.2.
|
||
|
|
* Original file: /npm/lzma@2.3.2/src/lzma.js
|
||
|
|
*
|
||
|
|
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||
|
|
*/
|
||
|
|
//! © 2015 Nathan Rugg <nmrugg@gmail.com> | MIT
|
||
|
|
"undefined"==typeof Worker||"undefined"!=typeof location&&"file:"===location.protocol?"undefined"!=typeof global&&"undefined"!=typeof require?this.LZMA=function(n){return require(n||"./lzma_worker.js").LZMA}:"undefined"!=typeof window&&window.document?function(){var n,e=this;function o(r){var t;return function(n){var r=document.createElement("script");r.type="text/javascript",r.src=n,r.onload=function(){e.LZMA=o},document.getElementsByTagName("head")[0].appendChild(r)}(r),t={compress:function(e,o,r,i){n.LZMA_WORKER?n.LZMA_WORKER.compress(e,o,r,i):setTimeout((function(){t.compress(e,o,r,i)}),50)},decompress:function(e,o,r){n.LZMA_WORKER?n.LZMA_WORKER.decompress(e,o,r):setTimeout((function(){t.decompress(e,o,r)}),50)},worker:function(){return null}}}"undefined"!=typeof window?n=window:global&&(n=global),e.LZMA=o}():console.error("Can't load the worker. Sorry."):this.LZMA=function(n){var e={},o=new Worker(n||"./lzma_worker-min.js");return o.onmessage=function(n){3===n.data.action?e[n.data.cbn]&&"function"==typeof e[n.data.cbn].on_progress&&e[n.data.cbn].on_progress(n.data.result):e[n.data.cbn]&&"function"==typeof e[n.data.cbn].on_finish&&(e[n.data.cbn].on_finish(n.data.result,n.data.error),delete e[n.data.cbn])},o.onerror=function(n){var o=new Error(n.message+" ("+n.filename+":"+n.lineno+")");for(var r in e)e[r].on_finish(null,o);console.error("Uncaught error in lzma_worker",o)},function(){function n(n,r,t,i,a){var c;do{c=Math.floor(1e7*Math.random())}while(void 0!==e[c]);e[c]={on_finish:i,on_progress:a},o.postMessage({action:n,cbn:c,data:r,mode:t})}return{compress:function(e,o,r,t){n(1,e,o,r,t)},decompress:function(e,o,r){n(2,e,!1,o,r)},worker:function(){return o}}}()};
|
||
|
|
//# sourceMappingURL=/sm/9a8373aaafa520c6b52bb32def0da02deb037ef21e4015734a0e533b7aa5bcb9.map
|