var o=class{constructor(r,s,i){this.captureListenerSet=false;this.coreEngine=r,this.Module=s,this.workerFunctions=i,this.setup();}barcodeCaptureDidUpdateSession(r){this.workerFunctions.postMessage({type:"barcodeCaptureDidUpdateSession",payload:JSON.parse(r.toJson())});}barcodeBatchDidUpdateSession(r){this.workerFunctions.postMessage({type:"barcodeBatchDidUpdateSession",payload:JSON.parse(r.toJson())});}getCaptureDeserializer(){return this.barcodeCaptureDeserializer}getTrackingDeserializer(){return this.barcodeBatchDeserializer}setup(){let r=this.Module.BarcodeCaptureListener.extend("BarcodeCaptureListener",{didScan:(a,e,t)=>{this.barcodeCaptureDidScan(e,t),a.delete(),t.delete(),e.delete();},didUpdateSession:(a,e,t)=>{this.barcodeCaptureDidUpdateSession(e),a.delete(),t.delete(),e.delete();}}),s=this.Module.Feedback.extend("Feedback",{emit:()=>{this.successFeedback();}}),i=new r,d=new s,n=this.Module.BarcodeCaptureDeserializerListener.extend("BarcodeCaptureDeserializerListener",{onModeDeserializationFinished:(a,e,t)=>{e.addListener(i,1),e.setSuccessFeedback(d),a.delete(),e.delete(),t.delete();},onModeDeserializationStarted(a,e,t){a.delete(),e.delete(),t.delete();},onSettingsDeserializationStarted(a,e,t){a.delete(),e.delete(),t.delete();},onSettingsDeserializationFinished(a,e,t){a.delete(),e.delete(),t.delete();}});this.barcodeCaptureDeserializer=new this.Module.BarcodeCaptureDeserializer,this.barcodeCaptureDeserializer.setListener(new n);}successFeedback(){this.workerFunctions.postMessage({type:"successFeedback"});}barcodeCaptureDidScan(r,s){let i=this.coreEngine.convertToLoadableFrameData(s);this.workerFunctions.postMessage({type:"barcodeCaptureDidScan",payload:{session:JSON.parse(r.toJson()),frameData:i}});}};export{o as a};