text: var d=d||{};d.scope={};d.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};d.arrayIterator=function(a){return{next:d.arrayIteratorImpl(a)}};d.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):d.arrayIterator(a)};
  d.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};d.global=d.getGlobal(this);d.ASSUME_ES5=!1;d.ASSUME_NO_NATIVE_MAP=!1;d.ASSUME_NO_NATIVE_SET=!1;d.SIMPLE_FROUND_POLYFILL=!1;d.ISOLATE_POLYFILLS=!1;
  d.defineProperty=d.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};d.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");d.TRUST_ES6_POLYFILLS=!d.ISOLATE_POLYFILLS||d.IS_SYMBOL_NATIVE;d.polyfills={};d.propertyToPolyfillSymbol={};d.POLYFILL_PREFIX="$jscp$";
  d.polyfill=function(a,b,c,e){b&&(d.ISOLATE_POLYFILLS?d.polyfillIsolated(a,b,c,e):d.polyfillUnisolated(a,b,c,e))};d.polyfillUnisolated=function(a,b){var c=d.global;a=a.split(".");for(var e=0;e<a.length-1;e++){var f=a[e];f in c||(c[f]={});c=c[f]}a=a[a.length-1];e=c[a];b=b(e);b!=e&&null!=b&&d.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
  d.polyfillIsolated=function(a,b,c){var e=a.split(".");a=1===e.length;var f=e[0];f=!a&&f in d.polyfills?d.polyfills:d.global;for(var g=0;g<e.length-1;g++){var h=e[g];h in f||(f[h]={});f=f[h]}e=e[e.length-1];c=d.IS_SYMBOL_NATIVE&&"es6"===c?f[e]:null;b=b(c);null!=b&&(a?d.defineProperty(d.polyfills,e,{configurable:!0,writable:!0,value:b}):b!==c&&(d.propertyToPolyfillSymbol[e]=d.IS_SYMBOL_NATIVE?d.global.Symbol(e):d.POLYFILL_PREFIX+e,e=d.propertyToPolyfillSymbol[e],d.defineProperty(f,e,{configurable:!0,
  writable:!0,value:b})))};d.FORCE_POLYFILL_PROMISE=!1;
  d.polyfill("Promise",function(a){function b(a){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var b=this.createResolveAndReject_();try{a(b.resolve,b.reject)}catch(m){b.reject(m)}}function c(){this.batch_=null}function e(a){return a instanceof b?a:new b(function(b){b(a)})}if(a&&!d.FORCE_POLYFILL_PROMISE)return a;c.prototype.asyncExecute=function(a){if(null==this.batch_){this.batch_=[];var b=this;this.asyncExecuteFunction(function(){b.executeBatch_()})}this.batch_.push(a)};var f=d.global.setTimeout;
  c.prototype.asyncExecuteFunction=function(a){f(a,0)};c.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var a=this.batch_;this.batch_=[];for(var b=0;b<a.length;++b){var c=a[b];a[b]=null;try{c()}catch(n){this.asyncThrow_(n)}}}this.batch_=null};c.prototype.asyncThrow_=function(a){this.asyncExecuteFunction(function(){throw a;})};b.prototype.createResolveAndReject_=function(){function a(a){return function(e){c||(c=!0,a.call(b,e))}}var b=this,c=!1;return{resolve:a(this.resolveTo_),
  reject:a(this.reject_)}};b.prototype.resolveTo_=function(a){if(a===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof b)this.settleSameAsPromise_(a);else{a:switch(typeof a){case "object":var c=null!=a;break a;case "function":c=!0;break a;default:c=!1}c?this.resolveToNonPromiseObj_(a):this.fulfill_(a)}};b.prototype.resolveToNonPromiseObj_=function(a){var b=void 0;try{b=a.then}catch(m){this.reject_(m);return}"function"==typeof b?this.settleSameAsThenable_(b,
  a):this.fulfill_(a)};b.prototype.reject_=function(a){this.settle_(2,a)};b.prototype.fulfill_=function(a){this.settle_(1,a)};b.prototype.settle_=function(a,b){if(0!=this.state_)throw Error("Cannot settle("+a+", "+b+"): Promise already settled in state"+this.state_);this.state_=a;this.result_=b;this.executeOnSettledCallbacks_()};b.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var a=0;a<this.onSettledCallbacks_.length;++a)g.asyncExecute(this.onSettledCallbacks_[a]);
  this.onSettledCallbacks_=null}};var g=new c;b.prototype.settleSameAsPromise_=function(a){var b=this.createResolveAndReject_();a.callWhenSettled_(b.resolve,b.reject)};b.prototype.settleSameAsThenable_=function(a,b){var c=this.createResolveAndReject_();try{a.call(b,c.resolve,c.reject)}catch(n){c.reject(n)}};b.prototype.then=function(a,c){function e(a,b){return"function"==typeof a?function(b){try{f(a(b))}catch(q){h(q)}}:b}var f,h,g=new b(function(a,b){f=a;h=b});this.callWhenSettled_(e(a,f),e(c,h));return g};
  b.prototype.catch=function(a){return this.then(void 0,a)};b.prototype.callWhenSettled_=function(a,b){function c(){switch(e.state_){case 1:a(e.result_);break;case 2:b(e.result_);break;default:throw Error("Unexpected state: "+e.state_);}}var e=this;null==this.onSettledCallbacks_?g.asyncExecute(c):this.onSettledCallbacks_.push(c)};b.resolve=e;b.reject=function(a){return new b(function(b,c){c(a)})};b.race=function(a){return new b(function(b,c){for(var f=d.makeIterator(a),h=f.next();!h.done;h=f.next())e(h.value).callWhenSettled_(b,
  c)})};b.all=function(a){var c=d.makeIterator(a),f=c.next();return f.done?e([]):new b(function(a,b){function h(b){return function(c){g[b]=c;p--;0==p&&a(g)}}var g=[],p=0;do g.push(void 0),p++,e(f.value).callWhenSettled_(h(g.length-1),b),f=c.next();while(!f.done)})};return b},"es6","es3");d.initSymbol=function(){};
  d.polyfill("Symbol",function(a){function b(a){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c("jscomp_symbol_"+(a||"")+"_"+e++,a)}function c(a,b){this.$jscomp$symbol$id_=a;d.defineProperty(this,"description",{configurable:!0,writable:!0,value:b})}if(a)return a;c.prototype.toString=function(){return this.$jscomp$symbol$id_};var e=0;return b},"es6","es3");d.initSymbolIterator=function(){};
  d.polyfill("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var e=d.global[b[c]];"function"===typeof e&&"function"!=typeof e.prototype[a]&&d.defineProperty(e.prototype,a,{configurable:!0,writable:!0,value:function(){return d.iteratorPrototype(d.arrayIteratorImpl(this))}})}return a},"es6","es3");
  d.initSymbolAsyncIterator=function(){};d.iteratorPrototype=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a};d.underscoreProtoCanBeSet=function(){var a={a:!0},b={};try{return b.__proto__=a,b.a}catch(c){}return!1};d.setPrototypeOf=d.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:d.underscoreProtoCanBeSet()?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null;d.generator={};
  d.generator.ensureIteratorResultIsObject_=function(a){if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");};d.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};d.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};
  d.generator.Context.prototype.stop_=function(){this.isRunning_=!1};d.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};d.generator.Context.prototype.next_=function(a){this.yieldResult=a};d.generator.Context.prototype.throw_=function(a){this.abruptCompletion_={exception:a,isException:!0};this.jumpToErrorHandler_()};d.generator.Context.prototype.return=function(a){this.abruptCompletion_={return:a};this.nextAddress=this.finallyAddress_};
  d.generator.Context.prototype.jumpThroughFinallyBlocks=function(a){this.abruptCompletion_={jumpTo:a};this.nextAddress=this.finallyAddress_};d.generator.Context.prototype.yield=function(a,b){this.nextAddress=b;return{value:a}};d.generator.Context.prototype.yieldAll=function(a,b){a=d.makeIterator(a);var c=a.next();d.generator.ensureIteratorResultIsObject_(c);if(c.done)this.yieldResult=c.value,this.nextAddress=b;else return this.yieldAllIterator_=a,this.yield(c.value,b)};
  d.generator.Context.prototype.jumpTo=function(a){this.nextAddress=a};d.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};d.generator.Context.prototype.setCatchFinallyBlocks=function(a,b){this.catchAddress_=a;void 0!=b&&(this.finallyAddress_=b)};d.generator.Context.prototype.setFinallyBlock=function(a){this.catchAddress_=0;this.finallyAddress_=a||0};d.generator.Context.prototype.leaveTryBlock=function(a,b){this.nextAddress=a;this.catchAddress_=b||0};
  d.generator.Context.prototype.enterCatchBlock=function(a){this.catchAddress_=a||0;a=this.abruptCompletion_.exception;this.abruptCompletion_=null;return a};d.generator.Context.prototype.enterFinallyBlock=function(a,b,c){c?this.finallyContexts_[c]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=a||0;this.finallyAddress_=b||0};
  d.generator.Context.prototype.leaveFinallyBlock=function(a,b){b=this.finallyContexts_.splice(b||0)[0];if(b=this.abruptCompletion_=this.abruptCompletion_||b){if(b.isException)return this.jumpToErrorHandler_();void 0!=b.jumpTo&&this.finallyAddress_<b.jumpTo?(this.nextAddress=b.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=a};d.generator.Context.prototype.forIn=function(a){return new d.generator.Context.PropertyIterator(a)};
  d.generator.Context.PropertyIterator=function(a){this.object_=a;this.properties_=[];for(var b in a)this.properties_.push(b);this.properties_.reverse()};d.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var a=this.properties_.pop();if(a in this.object_)return a}return null};d.generator.Engine_=function(a){this.context_=new d.generator.Context;this.program_=a};
  d.generator.Engine_.prototype.next_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,a,this.context_.next_);this.context_.next_(a);return this.nextStep_()};d.generator.Engine_.prototype.return_=function(a){this.context_.start_();var b=this.context_.yieldAllIterator_;if(b)return this.yieldAllStep_("return"in b?b["return"]:function(a){return{value:a,done:!0}},a,this.context_.return);this.context_.return(a);return this.nextStep_()};
  d.generator.Engine_.prototype.throw_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],a,this.context_.next_);this.context_.throw_(a);return this.nextStep_()};
  d.generator.Engine_.prototype.yieldAllStep_=function(a,b,c){try{var e=a.call(this.context_.yieldAllIterator_,b);d.generator.ensureIteratorResultIsObject_(e);if(!e.done)return this.context_.stop_(),e;var f=e.value}catch(g){return this.context_.yieldAllIterator_=null,this.context_.throw_(g),this.nextStep_()}this.context_.yieldAllIterator_=null;c.call(this.context_,f);return this.nextStep_()};
  d.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var a=this.program_(this.context_);if(a)return this.context_.stop_(),{value:a.value,done:!1}}catch(b){this.context_.yieldResult=void 0,this.context_.throw_(b)}this.context_.stop_();if(this.context_.abruptCompletion_){a=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(a.isException)throw a.exception;return{value:a.return,done:!0}}return{value:void 0,done:!0}};
  d.generator.Generator_=function(a){this.next=function(b){return a.next_(b)};this.throw=function(b){return a.throw_(b)};this.return=function(b){return a.return_(b)};this[Symbol.iterator]=function(){return this}};d.generator.createGenerator=function(a,b){b=new d.generator.Generator_(new d.generator.Engine_(b));d.setPrototypeOf&&d.setPrototypeOf(b,a.prototype);return b};
  d.asyncExecutePromiseGenerator=function(a){function b(b){return a.next(b)}function c(b){return a.throw(b)}return new Promise(function(e,f){function g(a){a.done?e(a.value):Promise.resolve(a.value).then(b,c).then(g,f)}g(a.next())})};d.asyncExecutePromiseGeneratorFunction=function(a){return d.asyncExecutePromiseGenerator(a())};d.asyncExecutePromiseGeneratorProgram=function(a){return d.asyncExecutePromiseGenerator(new d.generator.Generator_(new d.generator.Engine_(a)))};
  function k(){return navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then(a=>a.filter(a=>"videoinput"===a.kind)).then(a=>a.map((a,c)=>{let {deviceId:b,groupId:f,kind:g,label:h}=a;a={deviceId:b,groupId:f,kind:g,label:h};a.label=h||`Camera ${c+1}`;return a})).catch(a=>{console.log(a);return[]}):Promise.resolve([])}
  function r(){let a={permission:!1,cams:[]};return navigator.mediaDevices?navigator.mediaDevices.getUserMedia({video:!0}).then(a=>d.asyncExecutePromiseGeneratorFunction(function*(){let b=yield k();a.getTracks().forEach(a=>{a.stop()});return{permission:!0,cams:b}})).catch(b=>{console.log(b);return a}):Promise.resolve(a)}
  class t{static hasCamera(){return navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then(a=>a.some(a=>"videoinput"===a.kind)).catch(()=>!1):Promise.resolve(!1)}constructor(a,b,c=this._onDecodeError,e=this._calculateScanRegion,f="environment"){this.$video=a;this.$canvas=document.createElement("canvas");this._onDecode=b;this._legacyCanvasSize=t.DEFAULT_CANVAS_SIZE;this._preferredFacingMode=f;this._flashOn=this._paused=this._active=!1;this.cams=[];this.activeDeviceId=null;this.permission=
  !1;"number"===typeof c?(this._legacyCanvasSize=c,console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future")):this._onDecodeError=c;"number"===typeof e?(this._legacyCanvasSize=e,console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future")):this._calculateScanRegion=e;this._scanRegion=this._calculateScanRegion(a);this._onPlay=this._onPlay.bind(this);this._onLoadedMetaData=this._onLoadedMetaData.bind(this);
  this._onVisibilityChange=this._onVisibilityChange.bind(this);this.$video.playsInline=!0;this.$video.muted=!0;this.$video.disablePictureInPicture=!0;this.$video.addEventListener("play",this._onPlay);this.$video.addEventListener("loadedmetadata",this._onLoadedMetaData);document.addEventListener("visibilitychange",this._onVisibilityChange);this._qrEnginePromise=t.createQrEngine()}static create(...a){return d.asyncExecutePromiseGeneratorFunction(function*(){let b=yield r(),c=new t(...a);c.permission=
  b.permission;c.cams=b.cams;return c})}hasFlash(){if(!("ImageCapture"in window))return Promise.resolve(!1);let a=this.$video.srcObject?this.$video.srcObject.getVideoTracks()[0]:null;return a?(new ImageCapture(a)).getPhotoCapabilities().then(a=>a.fillLightMode.includes("flash")).catch(a=>{console.warn(a);return!1}):Promise.reject("Camera not started or not available")}isFlashOn(){return this._flashOn}toggleFlash(){return this._setFlash(!this._flashOn)}turnFlashOff(){return this._setFlash(!1)}turnFlashOn(){return this._setFlash(!0)}destroy(){this.$video.removeEventListener("loadedmetadata",
  this._onLoadedMetaData);this.$video.removeEventListener("play",this._onPlay);document.removeEventListener("visibilitychange",this._onVisibilityChange);this.stop();t._postWorkerMessage(this._qrEnginePromise,"close")}start(a){if(this._active&&!this._paused)return Promise.resolve();"https:"!==window.location.protocol&&console.warn("The camera stream is only accessible if the page is transferred via https.");this._active=!0;this._paused=!1;if(document.hidden)return Promise.resolve();clearTimeout(this._offTimeout);
  this._offTimeout=null;if(this.$video.srcObject)return this.$video.play(),Promise.resolve();if(!a){a=this.cams.filter(a=>/rear|back|environment/i.test(a.label));let b=a.length;a=b?a[b-1].deviceId:this.cams.length&&this.cams[this.cams.length-1].deviceId}return this._getCameraStream(a).then(a=>{this.$video.srcObject=a;this.$video.play()}).catch(a=>{this._active=!1;throw a;})}restart(a){this.stop();setTimeout(()=>{this.start(a)},400)}stop(){this.pause();this._active=!1}pause(){this._paused=!0;this._active&&
  (this.$video.pause(),this._offTimeout||(this._offTimeout=setTimeout(()=>{let a=this.$video.srcObject?this.$video.srcObject.getTracks():[];for(let b of a)b.stop();this._offTimeout=this.$video.srcObject=null},300)))}static scanImage(a,b=null,c=null,e=null,f=!1,g=!1){let h=c instanceof Worker,l=Promise.all([c||t.createQrEngine(),t._loadImage(a)]).then(([a,g])=>{c=a;let l;[e,l]=this._drawToCanvas(g,b,e,f);return c instanceof Worker?(h||c.postMessage({type:"inversionMode",data:"both"}),new Promise((a,
  b)=>{let f,g,h;g=e=>{"qrResult"===e.data.type&&(c.removeEventListener("message",g),c.removeEventListener("error",h),clearTimeout(f),null!==e.data.data?a(e.data.data):b(t.NO_QR_CODE_FOUND))};h=a=>{c.removeEventListener("message",g);c.removeEventListener("error",h);clearTimeout(f);b("Scanner error: "+(a?a.message||a:"Unknown Error"))};c.addEventListener("message",g);c.addEventListener("error",h);f=setTimeout(()=>h("timeout"),1E4);let m=l.getImageData(0,0,e.width,e.height);c.postMessage({type:"decode",
  data:m},[m.data.buffer])})):new Promise((a,b)=>{let f=setTimeout(()=>b("Scanner error: timeout"),1E4);c.detect(e).then(c=>{c.length?a(c[0].rawValue):b(t.NO_QR_CODE_FOUND)}).catch(a=>b("Scanner error: "+(a.message||a))).finally(()=>clearTimeout(f))})});b&&g&&(l=l.catch(()=>t.scanImage(a,null,c,e,f)));return l=l.finally(()=>{h||t._postWorkerMessage(c,"close")})}setGrayscaleWeights(a,b,c,e=!0){t._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:a,green:b,blue:c,useIntegerApproximation:e})}setInversionMode(a){t._postWorkerMessage(this._qrEnginePromise,
  "inversionMode",a)}static createQrEngine(a=t.WORKER_PATH){return("BarcodeDetector"in window?BarcodeDetector.getSupportedFormats():Promise.resolve([])).then(b=>-1!==b.indexOf("qr_code")?new BarcodeDetector({formats:["qr_code"]}):new Worker(a))}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video);this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video)}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(a){let b=
  Math.round(2/3*Math.min(a.videoWidth,a.videoHeight));return{x:(a.videoWidth-b)/2,y:(a.videoHeight-b)/2,width:b,height:b,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_scanFrame(){if(!this._active||this.$video.paused||this.$video.ended)return!1;requestAnimationFrame(()=>{1>=this.$video.readyState?this._scanFrame():this._qrEnginePromise.then(a=>t.scanImage(this.$video,this._scanRegion,a,this.$canvas)).then(this._onDecode,a=>{this._active&&(-1!==(a.message||a).indexOf("service unavailable")&&
  (this._qrEnginePromise=t.createQrEngine()),this._onDecodeError(a))}).then(()=>this._scanFrame())})}_onDecodeError(a){a!==t.NO_QR_CODE_FOUND&&console.log(a)}_getCameraStream(a){this.activeDeviceId=a;return this._getMatchingCameraStream({video:{deviceId:a?{exact:a}:void 0}})}_getMatchingCameraStream(a){return navigator.mediaDevices?navigator.mediaDevices.getUserMedia(a).catch(a=>{console.log(a)}):Promise.reject("Camera not found.")}_setFlash(a){return this.hasFlash().then(b=>b?this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:a}]}):
  Promise.reject("No flash available")).then(()=>this._flashOn=a)}_setVideoMirror(a){this.$video.style.transform="scaleX("+("user"===a?-1:1)+")"}_getFacingMode(a){return(a=a.getVideoTracks()[0])?/rear|back|environment/i.test(a.label)?"environment":/front|user|face/i.test(a.label)?"user":null:null}static _drawToCanvas(a,b=null,c=null,e=!1){c=c||document.createElement("canvas");let f=b&&b.x?b.x:0,g=b&&b.y?b.y:0,h=b&&b.width?b.width:a.width||a.videoWidth,l=b&&b.height?b.height:a.height||a.videoHeight;
  e||(c.width=b&&b.downScaledWidth?b.downScaledWidth:h,c.height=b&&b.downScaledHeight?b.downScaledHeight:l);b=c.getContext("2d",{alpha:!1});b.imageSmoothingEnabled=!1;b.drawImage(a,f,g,h,l,0,0,c.width,c.height);return[c,b]}static _loadImage(a){if(a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement||window.ImageBitmap&&a instanceof window.ImageBitmap||window.OffscreenCanvas&&a instanceof window.OffscreenCanvas)return Promise.resolve(a);if(a instanceof Image)return t._awaitImageLoad(a).then(()=>
  a);if(a instanceof File||a instanceof Blob||a instanceof URL||"string"===typeof a){let b=new Image;b.src=a instanceof File||a instanceof Blob?URL.createObjectURL(a):a;return t._awaitImageLoad(b).then(()=>{(a instanceof File||a instanceof Blob)&&URL.revokeObjectURL(b.src);return b})}return Promise.reject("Unsupported image type.")}static _awaitImageLoad(a){return new Promise((b,c)=>{if(a.complete&&0!==a.naturalWidth)b();else{let e,f;e=()=>{a.removeEventListener("load",e);a.removeEventListener("error",
  f);b()};f=()=>{a.removeEventListener("load",e);a.removeEventListener("error",f);c("Image load error")};a.addEventListener("load",e);a.addEventListener("error",f)}})}static _postWorkerMessage(a,b,c){return Promise.resolve(a).then(a=>{a instanceof Worker&&a.postMessage({type:b,data:c})})}}t.DEFAULT_CANVAS_SIZE=400;t.NO_QR_CODE_FOUND="No QR code found";t.WORKER_PATH="qr-scanner-worker.min.js";export default t
  //# sourceMappingURL=qr-scanner-x.min.js.map
  