(()=>{var__webpack_modules__={516:function(e){vart;"undefined"!=typeofself&&self,t=()=>(()=>{vare={642:function(e){vart;"undefined"!=typeofself&&self,t=()=>(()=>{"use strict";vare={477:e=>{e.exports=function(e,t,n,i){varr=self||window;try{try{vara;try{a=newr.Blob([e])}catch(t){(a=new(r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder)).append(e),a=a.getBlob()}varc=r.URL||r.webkitURL,s=c.createObjectURL(a),o=newr[t](s,n);returnc.revokeObjectURL(s),o}catch(i){returnnewr[t]("data:application/javascript,".concat(encodeURIComponent(e)),n)}}catch(e){if(!i)throwError("Inline worker is not supported");returnnewr[t](i,n)}}}},t={};functionn(i){varr=t[i];if(void0!==r)returnr.exports;vara=t[i]={exports:{}};returne[i](a,a.exports,n),a.exports}n.n=e=>{vart=e&&e.__esModule?()=>e.default:()=>e;returnn.d(t,{a:t}),t},n.d=(e,t)=>{for(variint)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeofglobalThis)returnglobalThis;try{returnthis||newFunction("return this")()}catch(e){if("object"==typeofwindow)returnwindow}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};vari={};return(()=>{n.r(i),n.d(i,{BrowserTypes:()=>u,Processor:()=>l,WorkerCommand:()=>e,WorkerManager:()=>o,WorkerResponse:()=>t,getBrowserType:()=>d});conste={INITIALIZE:"initialize",EXECUTE:"execute"},t={INITIALIZED:"initialized",EXECUTED:"EXECUTED"};classr{constructor(){this._resolvers=[],this._promises=[]}_add(){this._promises.push(newPromise((e=>{this._resolvers.push(e)})))}enqueue(e){0==this._resolvers.length&&this._add(),this._resolvers.shift()(e)}dequeue(){return0==this._promises.length&&this._add(),this._promises.shift()}isEmpty(){return0==this._promises.length}isBlocked(){return0!=this._resolvers.length}getlength(){returnthis._promises.length-this._resolvers.length}}vara=n(477),c=n.n(a);consts=e=>{constt=e.transfer.map((t=>{if(tinstanceofHTMLCanvasElement){constn=t.transferControlToOffscreen();for(constiine)e[i]==t&&(e[i]=n);returnn}returnt}));e.transfer=t};classo{constructor(){this.worker=null,this.processor=null,this.config=null,this.sem=newr,this.lock=async()=>awaitthis.sem.dequeue(),this.unlock=e=>{this.sem.enqueue(e+1)},this.init=asynci=>{constr=awaitthis.lock();if(this.config=i,this.worker&&this.worker.terminate(),this.worker=null,"SAFARI"==i.browserType||1==i.onLocal)await(a=i.processorURL,newPromise(((e,t)=>{constn=document.createElement("script");n.src=a,n.async=!0,n.onload=()=>e(window.external_global_component),n.onerror=t,document.body.appendChild(n)}))),this.processor=newn.g[i.processorName](i),console.log("[WorkerManager] Processor work on local");else{constn=c()('(()=>{"use strict";const e="EXECUTED",s=self;let a=null,o=null;onmessage=async t=>{if("initialize"===t.data.message)a=t.data.config,importScripts(a.processorURL),o=new self[a.processorName](a),s.postMessage({message:"initialized"});else if("execute"===t.data.message){if(!a||!o)return i=`${a?.processorName||"Config or Processor"} is not initialized.`,void s.postMessage({message:e,data:["error",i]});const r=t.data.params,n=o.process(r);s.postMessage({message:e,data:n},n.transfer)}else console.log("not implemented");var i}})();',"Worker",void0,void0),r=newPromise(((r,a)=>{n.onmessage=e=>{e.data.message===t.INITIALIZED?(this.worker=n,r()):(console.warn("Initialization something wrong.."),a())},s(i),n.postMessage({message:e.INITIALIZE,config:i},i.transfer)}));awaitr,console.log("[WorkerManager] Processor work on Worker")}vara;awaitthis.unlock(r)},this.execute=asyncn=>{if(this.sem.length>100)thrownewError(`queue is fulled: ${this.sem.length}`);if(!this.config)thrownewError("no config.");consti=awaitthis.lock();try{if("SAFARI"==this.config.browserType||1==this.config.onLocal){if(!this.processor)thrownewError("processor is not activated.");returnthis.processor.process(n)}{consti=ne