1(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7574],{76196:(e,t,r)=>{e.exports=r(14702).wrapCssModule(e.id,r(85305))},22016:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(65164),a=r(69002),o=r(29907),i=r(43415),c=r(14702),s=r(76196),d=r.n(s),l=r(86332),u=r(83259);const h=1,p=2,g=3,m=4,x=5,f=6,_=7,b=8,C=9,v=10,S=11,B=12,j=13,w=14,y=15,F=16,D=17,E=18,O=19,R=20,X={[0]:u.XG.BF_CODE_11,[h]:u.XG.BF_CODE_39,[p]:u.XG.BF_CODE_39_EXTENDED,[g]:u.XG.BF_CODE_93,[m]:u.XG.BF_CODE_128,[x]:u.XG.BF_CODABAR,[f]:u.XG.BF_EAN_8,[_]:u.XG.BF_EAN_13,[b]:u.XG.BF_INDUSTRIAL_25,[C]:u.XG.BF_ITF,[v]:u.XG.BF_MSI_CODE,[S]:u.XG.BF_UPC_A,[B]:u.XG.BF_UPC_E,[j]:u.XG.BF_AZTEC,[w]:u.XG.BF_DATAMATRIX,[F]:u.XG.BF_MAXICODE,[D]:u.XG.BF_MICRO_QR,[E]:u.XG.BF_MICRO_PDF417,[O]:u.XG.BF_PDF417,[R]:u.XG.BF_QR_CODE},M={[y]:u.Bf.BF2_DOTCODE};var G=r(52604),q=r(70799),T=r(13111);const A=()=>(0,T.jsxs)("svg",{height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"currentColor",children:[(0,T.jsx)("g",{children:(0,T.jsx)("path",{d:"M0,0h24v24H0V0z",fill:"none"})}),(0,T.jsx)("g",{children:(0,T.jsxs)("g",{children:[(0,T.jsx)("path",{d:"M18,2H6v6l2,3v11h8V11l2-3V2z M16,4v1H8V4H16z M14,10.4V20h-4v-9.61l-2-3V7h8v0.39L14,10.4z"}),(0,T.jsx)("circle",{cx:"12",cy:"14",r:"1.5"})]})})]});var N=r(54079),I=r(80660);u.mR.engineResourcePath='https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode/dist/';const k=(0,c.withStyles)(d())((e=>{let{licenseKey:t,options:r,onScan:n,topShift:a}=e;const[o,i]=(0,l.useState)(!1),c=(0,l.useRef)(),s=(0,l.useRef)(null),d=(0,l.useRef)(null),h=(0,l.useRef)(!1),p=(0,I.U)();(0,l.useEffect)((()=>{u.mR.license||(u.mR.license=t);let e=!1;const o=()=>{var t;return e||(null==(t=c.current)?void 0:t.isContextDestroyed())};return(async()=>{try{if(c.current=await u.mR.createInstance(),o())return;if(await c.current.setUIElement(s.current),o())return;c.current.regionMaskStrokeStyle='transparent',c.current.setVideoFit('cover');const t=await c.current.getRuntimeSettings();if(o())return;if(t.barcodeFormatIds=z(r.barCodeTypes,X),t.barcodeFormatIds_2=z(r.barCodeTypes,M),await c.current.updateRuntimeSettings(t),o())return;const i=await c.current.getScanSettings();if(o())return;if(i.duplicateForgetTime=r.duplicateForgetTime??1e3,i.whenToPlaySoundforSuccessfulRead=r.soundOnSuccessfulScanEnabled?'unique':'never',i.whenToVibrateforSuccessfulRead=r.vibrationOnSuccessfulScanEnabled?'unique':'never',await c.current.updateScanSettings(i),o())return;if(c.current.onPlayed=async e=>{const t=await c.current.getRuntimeSettings();o()||(t.region=function(e,t,r,n,a){const o=r/n<e/t?n/t:r/e,i=.9*Math.min(r/o,n/o),c=Math.round(i/e*100),s=Math.round(i/t*100),d=a?Math.round(a/t*100):(100-s)/2,l=a?s+Math.round(a/t*100):(100+s)/2;return{regionTop:d,regionBottom:l,regionLeft:(100-c)/2,regionRight:(100+c)/2,regionMeasuredByPercentage:1}}(e.width,e.height,s.current.clientWidth,s.current.clientHeight,a),await c.current.updateRuntimeSettings(t))},c.current.onUniqueRead=e=>!p&&n(e),await c.current.open(),o())return;var e;
1if(c.current.getCapabilities().torch)null==(e=d.current)||e.classList.add('available')}catch(e){i(!0),N.k.error(e)}})(),()=>{var t;null==(t=c.current)||t.destroyContext(),e=!0}}),[]);const g=(0,l.useCallback)((()=>{h.current?(c.current.turnOffTorch(),h.current=!1):(c.current.turnOnTorch(),h.current=!0)}),[]);return o?(0,T.jsx)(q.Zg,{role:"alert",children:(0,T.jsx)(G.pI,{textKey:"CameraBarCodeScanner_ErrorOccurredOrCameraPermissionDenied"})}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{type:"button",className:"btn-torch",ref:d,onClick:g,children:(0,T.jsx)(A,{})}),(0,T.jsxs)("div",{ref:s,className:"component-barcode-scanner",children:[(0,T.jsx)("svg",{className:"dce-bg-loading",viewBox:"0 0 1792 1792",children:(0,T.jsx)("path",{d:"M1760 896q0 176-68.5 336t-184 275.5-275.5 184-336 68.5-336-68.5-275.5-184-184-275.5-68.5-336q0-213 97-398.5t265-305.5 374-151v228q-221 45-366.5 221t-145.5 406q0 130 51 248.5t136.5 204 204 136.5 248.5 51 248.5-51 204-136.5 136.5-204 51-248.5q0-230-145.5-406t-366.5-221v-228q206 31 374 151t265 305.5 97 398.5z"})}),(0,T.jsx)("svg",{className:"dce-bg-camera",viewBox:"0 0 2048 1792",children:(0,T.jsx)("path",{d:"M1024 672q119 0 203.5 84.5t84.5 203.5-84.5 203.5-203.5 84.5-203.5-84.5-84.5-203.5 84.5-203.5 203.5-84.5zm704-416q106 0 181 75t75 181v896q0 106-75 181t-181 75h-1408q-106 0-181-75t-75-181v-896q0-106 75-181t181-75h224l51-136q19-49 69.5-84.5t103.5-35.5h512q53 0 103.5 35.5t69.5 84.5l51 136h224zm-704 1152q185 0 316.5-131.5t131.5-316.5-131.5-316.5-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5z"})}),(0,T.jsx)("div",{className:"dce-video-container"}),(0,T.jsxs)("div",{className:"dce-scanarea",children:[(0,T.jsx)("div",{className:"dce-scanlight"}),(0,T.jsx)("div",{className:"dce-corner-tl"}),(0,T.jsx)("div",{className:"dce-corner-tr"}),(0,T.jsx)("div",{className:"dce-corner-bl"}),(0,T.jsx)("div",{className:"dce-corner-br"})]})]})]})}));function z(e,t){let r=0;for(const n of e){const e=t[n];e&&(r|=e)}return r}var H=r(43333);const L=['CameraBarCodeScanner_MobileHeader'],P=e=>{let{id:t,model:r,isDesignerMode:c}=e;const s=(0,n.useSelector)((e=>{var t;return e.settings.loaded?null==(t=e.settings.cameraBarCodeScanner)?void 0:t.licenseKey:null})),[d]=(0,o.ZV)(a.q2.OrderProducts);return s&&(d||c)?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(H.pU,{lessThan:"md",children:[(0,T.jsx)(i.Z,{id:t,options:r,type:"camera",title:"CameraBarCodeScanner_MobileHeader",fullscreen:!0,children:e=>{let{onScan:t,topShift:n}=e;return(0,T.jsx)(k,{licenseKey:s,options:r,onScan:t,topShift:n})}}),(0,T.jsx)(G.e5,{options:L})]}),(0,T.jsx)(H.pU,{greaterThanOrEqual:"md",children:(0,T.jsx)(i.Z,{id:t,options:r,type:"camera",title:"CameraBarCodeScanner_Header",description:"CameraBarCodeScanner_Description",children:e=>{let{onScan:t}=e;return(0,T.jsx)(k,{licenseKey:s,options:r,onScan:t})}})})]}):null}},85305:(e,t,r)=>{var n=r(27327),a=r(48441)(n);a.push([e.id,".btn-torch{background:none;border:0;color:#fff;display:none;margin:0;padding:0;position:absolute;right:24px;top:24px;z-index:1}.btn-torch.available{display:block}.component-barcode-scanner{background:#eee;height:100%;margin:1em auto;min-height:350px;position:relative;resize:both;width:100%}.dce-bg-loading{animation:dce-rotate 1s linear infinite;bottom:0;display:none;height:40%;left:0;margin:auto;position:absolute;right:0;top:0;width:40%;fill:#aaa}.dce-bg-camera{bottom:0;display:none;height:40%;left:0;margin:auto;position:absolute;right:0;top:0;width:40%;fill:#aaa}.dce-video-container{height:100%;left:0;position:absolute;top:0;width:100%}.dce-scanarea{height:100%;left:0;position:absolute;top:0;width:100%}.dce-scanlight{animation:dce-scanlight 3s infinite;background:#fff;border-radius:50%;box-shadow:0 0 2vw 1px #00e5ff;display:none;height:4px;position:absolute;width:100%}.dce-corner-bl,.dce-corner-br,.dce-corner-tl,.dce-corner-tr{border-color:#fff;border-style:solid;height:10%;
1opacity:.75;position:absolute;width:10%}.dce-corner-tl{border-width:2px 0 0 2px;left:-4px;top:-4px}.dce-corner-tr{border-width:2px 2px 0 0;right:-4px;top:-4px}.dce-corner-bl{border-width:0 0 2px 2px;bottom:-4px;left:-4px}.dce-corner-br{border-width:0 2px 2px 0;bottom:-4px;right:-4px}@keyframes CameraBarCodeScanner_dce-rotate{0%{transform:rotate(0turn)}to{transform:rotate(1turn)}}@keyframes CameraBarCodeScanner_dce-scanlight{0%{top:0}to{top:97%}}",""]),a.locals={"dce-rotate":"CameraBarCodeScanner_dce-rotate",dceRotate:"CameraBarCodeScanner_dce-rotate","dce-scanlight":"CameraBarCodeScanner_dce-scanlight",dceScanlight:"CameraBarCodeScanner_dce-scanlight"},e.exports=a}}]); 2//# sourceMappingURL=cm-barcode-scanner.3d90d49c.chunk.js.map
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.