1"use strict";(self.webpackChunkila=self.webpackChunkila||[]).push([[9624],{9624(v,E,t){t.d(E,{CapacitorBarcodeScannerWeb:()=>h});var l=t(3308),_=t(2126),w=t(7071),b=t(6068);class h extends _.E_{stopAndHideScanner(){return(0,l.A)(function*(){console.log(window.OSBarcodeWebScanner),window.OSBarcodeWebScanner&&(yield window.OSBarcodeWebScanner.stop(),window.OSBarcodeWebScanner=null),document.getElementById("cap-os-barcode-scanner-container-dialog").style.display="none"})()}buildScannerElement(){if(document.getElementById("cap-os-barcode-scanner-container"))return void(document.getElementById("cap-os-barcode-scanner-container").className="scanner-container-display");const e=document.body.appendChild(document.createElement("div"));e.id="cap-os-barcode-scanner-container";const n=document.createElement("div");n.id="cap-os-barcode-scanner-container-dialog",n.className="scanner-dialog";const a=document.createElement("div");a.className="scanner-dialog-inner";const c=document.createElement("span");c.id="cap-os-barcode-scanner-close-button",c.className="close-button",c.innerHTML="×",a.appendChild(c);const r=document.createElement("p");r.innerHTML=" ",a.appendChild(r);const o=document.createElement("div");o.className="scanner-container-full-width",o.id="cap-os-barcode-scanner-container-scanner",a.appendChild(o),n.appendChild(a),e.appendChild(n)}scanBarcode(e){var n=this;return(0,l.A)(function*(){return n.buildScannerElement(),document.getElementById("cap-os-barcode-scanner-container-dialog").style.display="block",new Promise((a,c)=>{var r,o;const d={facingMode:1===e.cameraDirection?"environment":"user",hasScannerButton:!1,scanButton:void 0!==e.scanButton&&e.scanButton,showScanLine:!1,scanInstructions:e.scanInstructions?e.scanInstructions:"",orientation:e.scanOrientation?e.scanOrientation:b.UO.PORTRAIT,showCameraSelection:!(null===(r=e.web)||void 0===r||!r.showCameraSelection)&&e.web.showCameraSelection,typeHint:17===e.hint?void 0:e.hint,scannerFPS:null!==(o=e.web)&&void 0!==o&&o.scannerFPS?e.web.scannerFPS:50};let p=!1;const f=document.getElementById("cap-os-barcode-scanner-close-button");f&&(f.onclick=(0,l.A)(function*(){p||(p=!0,yield n.stopAndHideScanner(),c(new Error("Couldn\u2019t scan because the process was cancelled.")))}));const u=document.getElementById("cap-os-barcode-scanner-container-scanner");if(!u)throw new Error("Scanner Element is required for web");window.OSBarcodeWebScanner=new w.j9(u.id,{formatsToSupport:void 0!==d.typeHint?[d.typeHint]:void 0,verbose:void 0});const B={fps:d.scannerFPS,qrbox:u.getBoundingClientRect().width*(9/16)-10,aspectRatio:16/9,videoConstraints:{focusMode:"continuous",height:{min:576,ideal:1920},deviceId:void 0,facingMode:d.facingMode}};window.OSBarcodeWebScanner.start({facingMode:d.facingMode},B,(s,S)=>{var i,m;n.stopAndHideScanner(),a({ScanResult:s,format:null!==(m=null===(i=S.result.format)||void 0===i?void 0:i.format)&&void 0!==m?m:b.Gm.ALL})},s=>{["NotFoundException","No barcode or QR code detected","No MultiFormat Readers were able to detect the code"].find(i=>-1!==s.indexOf(i))||(n.stopAndHideScanner(),console.error(`[Scanner Web Error] ${s}`),c(s))})})})()}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.