1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[807],{71738:function(e,t,i){"use strict";var a=i(85893),n=i(9008),s=i.n(n),r=i(45697),o=i.n(r),c=function(e){var t=e.title,i=e.description,n=e.keywords;return(0,a.jsxs)(s(),{children:[(0,a.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,a.jsx)("meta",{name:"theme-color",content:"#121212"}),(0,a.jsx)("meta",{name:"description",content:i}),(0,a.jsx)("meta",{name:"keywords",content:n}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"}),(0,a.jsx)("link",{rel:"apple-touch-icon",href:"/logo192.png"}),(0,a.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,a.jsx)("title",{children:t})]})};c.propTypes={title:o().string.isRequired,description:o().string.isRequired,keywords:o().string},c.defaultProps={title:"AmPmCx",description:"AmPmCx is an online digital asset exchange that trades BTC, ETH, XRP, BCH, LTC and more.",keywords:"AmPmCx, cryptocurrency, digital asset, exchange, BTC, bitcoin, ETH, ethereum, XRP, USDT, tether, ERC-20, BCH, bitcoin cash, LTC, litecoin, markets, trade, limit order, market order, trading platform, wallet, deposit, withdraw"},t.Z=c},80184:function(e,t,i){"use strict";var a=i(85893),n=i(45697),s=i.n(n),r=i(82508),o=i(92950),c=i.n(o),d=function(e){var t=e.id,i=e.title,n=e.Body,s=e.customStyles,o=null!==s&&void 0!==s?s:c();return(0,a.jsx)("div",{className:o["modal-bg"],id:t,onClick:function(e){e.target.id===t&&(0,r.Mr)(t)},children:(0,a.jsxs)("div",{className:o.modal,children:[(0,a.jsxs)("div",{className:o.header,children:[(0,a.jsx)("h3",{children:i}),(0,a.jsx)("button",{onClick:function(){return(0,r.Mr)(t)},children:(0,a.jsx)("img",{src:"/icons/close.svg",alt:"",className:o["close-icon"],title:"Close"})})]}),(0,a.jsx)("div",{className:o.body,children:n})]})})};d.propTypes={id:s().string.isRequired,title:s().string.isRequired,Body:s().object.isRequired,customStyles:s().object},t.Z=d},38242:function(e,t,i){"use strict";var a=i(85893),n=i(41664),s=i.n(n),r=i(45697),o=i.n(r),c=i(81043),d=i(43238),l=i(74627),h=i.n(l),u=function(e){var t=e.customStyles,i=(0,c.v9)(d.KN),n=null!==t&&void 0!==t?t:h();return(0,a.jsx)("div",{className:n["no-data"],children:(0,a.jsxs)("div",{children:[(0,a.jsx)("img",{src:"/icons/description.svg",alt:""}),(0,a.jsx)("h5",{children:"No Data"}),!i&&(0,a.jsxs)("div",{children:[(0,a.jsx)(s(),{href:"/auth/login",children:(0,a.jsx)("a",{children:"Log In"})})," ","or"," ",(0,a.jsx)(s(),{href:"/auth/signup",children:(0,a.jsx)("a",{children:"Sign Up"})})]})]})})};u.propTypes={customStyles:o().object},t.Z=u},53405:function(e,t,i){"use strict";var a=i(85893),n=i(67294),s=i(81043),r=i(43238),o=i(45697),c=i.n(o),d=i(11163),l=i(47512),h=function(e){var t=e.loginRequired,i=e.children,o=(0,s.v9)(r.KN),c=(0,n.useState)(!1),h=c[0],u=c[1],m=(0,d.useRouter)();return(0,n.useEffect)((function(){void 0!==o&&(o===t?u(!0):m.push("/"))}),[o,t,m]),h?(0,a.jsx)(a.Fragment,{children:i}):(0,a.jsx)(l.Z,{})};h.propTypes={loginRequired:c().bool.isRequired,children:c().node.isRequired},t.Z=h},20394:function(e,t,i){"use strict";i.d(t,{CH:function(){return r},Tg:function(){return u},Vp:function(){return c},fJ:function(){return m},fz:function(){return s},g5:function(){return h},jL:function(){return l},mr:function(){return d},rl:function(){return o},uf:function(){return n}});var a=i(13012),n=function(e){var t=parseFloat(e)||0;return 0===t?0:t<1?t.toLocaleString(void 0,{minimumFractionDigits:4,maximumFractionDigits:4}):t>=1e6?(t/1e6).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})+"M":t.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})},s=function(e){var t=parseFloat(e)||0;return t<0&&(t=0),t.toLocaleString(void 0,{maximumFractionDigits:0})},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=parseFloat(e)||0,n=parseInt(t)||0;return n<0&&(n=0),new a.Z(i).round(n,0).toNumber().toLocaleString(void 0,{minimumFractionDigits:n,maximumFractionDigits:n})},o=function(e){var t=parseFloat(e)||0;return 0===t?0:t.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.positive,a=t.negative,n=t.neutral,s=i||"rgb(2, 192, 118)",r=a||"rgb(248, 73, 96)",o=n||"#fff",c=parseFloat(e)||0;return 0===c?o:c>0?s:r},d=function(e){var t=e;
1"Invalid Date"===new Date(e).toTimeString()&&(t=Date.now());return Date.now()-new Date(t)>864e5?function(e){var t=new Date(e),i=t.getFullYear()+"",a=t.getMonth()+1+"",n=t.getDate()+"";return a.length<2&&(a="0"+a),n.length<2&&(n="0"+n),[i,a,n].join("-")}(t):new Date(t).toTimeString().split(" ")[0]},l=function(e){var t=e;"Invalid Date"===new Date(e).toTimeString()&&(t=Date.now());var i=new a.Z((new Date).getTimezoneOffset()).times(60).times(1e3).round(0,0).valueOf();return new a.Z(t).minus(i).toNumber()},h=function(e,t){var i=parseFloat(e)||0;return i<0&&(i=0),i?new a.Z(i).round(t,0).valueOf():""},u=function(e){var t=String(e)||"";return t.length<=20?t:t.slice(0,10)+"..."+t.slice(-10)},m=function(e){var t=String(e)||"",i=t.split(".").pop();return"".concat(t[0],"***@***.").concat(i)}},82508:function(e,t,i){"use strict";i.d(t,{K4:function(){return a},K9:function(){return r},Mr:function(){return n},XY:function(){return s}});var a=function(e){document.getElementById(e).style.display="grid",s()},n=function(e){document.getElementById(e).style.display="none",r()},s=function(){document.body.style.position="fixed",document.body.style.width="100%",document.body.style.top="-".concat(window.scrollY,"px")},r=function(){var e=document.body.style.top;document.body.style.position="",document.body.style.width="",document.body.style.top="",window.scrollTo(0,-1*parseInt(e||"0"))}},4050:function(e,t,i){"use strict";i.d(t,{As:function(){return r},Jo:function(){return s},rd:function(){return a},tx:function(){return c},uo:function(){return n},v0:function(){return o}});var a=function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},n=function(e){return/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~`!@#$%^&*()_\-+={}[\]\\|:;"'<,>.?/]).{8,20}$/.test(e)},s=function(e){return/^[a-fA-F0-9]{40}\.[a-fA-F0-9]{200}$/.test(e)},r=function(e){return/^[a-fA-F0-9]{40}$/.test(e)},o=function(e){return/^\d{6}$/.test(e)},c=function(e){return/^[a-fA-F0-9]{10}$/.test(e)}},92950:function(e){e.exports={"modal-bg":"Modal_modal-bg__yM_ws",modal:"Modal_modal__qmj7u",header:"Modal_header__p2ob_","close-icon":"Modal_close-icon__D_PSc",body:"Modal_body__FV6y5"}},74627:function(e){e.exports={"no-data":"NoData_no-data__T_kyo"}},3006:function(e,t,i){"use strict";class a{constructor(e,t,i,n,s){this._legacyCanvasSize=a.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),i&&"object"===typeof i?this._onDecode=t:(i||n||s?console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future"):console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=t),t="object"===typeof i?i:{},this._onDecodeError=t.onDecodeError||("function"===typeof i?i:this._onDecodeError),this._calculateScanRegion=t.calculateScanRegion||("function"===typeof n?n:this._calculateScanRegion),this._preferredCamera=t.preferredCamera||s||this._preferredCamera,this._legacyCanvasSize="number"===typeof i?i:"number"===typeof n?n:this._legacyCanvasSize,this._maxScansPerSecond=t.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInline=!0,e.muted=!0;let r=!1;if(e.hidden&&(e.hidden=!1,r=!0),document.body.contains(e)||(document.body.appendChild(e),r=!0),i=e.parentElement,t.highlightScanRegion||t.highlightCodeOutline){if(n=!!t.overlay,this.$overlay=t.overlay||document.createElement("div"),(s=this.$overlay.style).position="absolute",s.display="none",s.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!n&&t.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-
1highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch(o){}i.insertBefore(this.$overlay,this.$video.nextSibling)}t.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame((()=>{let t=window.getComputedStyle(e);"none"===t.display&&(e.style.setProperty("display","block","important"),r=!0),"visible"!==t.visibility&&(e.style.setProperty("visibility","visible","important"),r=!0),r&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()})),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=a.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await a.listCameras(!1)).length}catch(e){return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let t,i=async()=>(await navigator.mediaDevices.enumerateDevices()).filter((e=>"videoinput"===e.kind));try{e&&(await i()).every((e=>!e.label))&&(t=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch(n){}try{return(await i()).map(((e,t)=>({id:e.deviceId,label:e.label||(0===t?"Default Camera":`Camera ${t+1}`)})))}finally{t&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),a._stopVideoStream(t))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch(t){return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),a._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!(await this.hasFlash()))throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),a._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&("https:"!==window.location.protocol&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:t}=await this._getCameraStream();!this._active||this._paused?a._stopVideoStream(e):(this._setVideoMirror(t),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch((()=>{}))))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let t=()=>{this.$video.srcObject instanceof MediaStream&&(a._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(t(),!0):(await new Promise((e=>
1setTimeout(e,300))),!!this._paused&&(t(),!0))}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,t,i,n,s=!1,r=!1){let o,c=!1;t&&("scanRegion"in t||"qrEngine"in t||"canvas"in t||"disallowCanvasResizing"in t||"alsoTryWithoutScanRegion"in t||"returnDetailedScanResult"in t)?(o=t.scanRegion,i=t.qrEngine,n=t.canvas,s=t.disallowCanvasResizing||!1,r=t.alsoTryWithoutScanRegion||!1,c=!0):t||i||n||s||r?console.warn("You're using a deprecated api for scanImage which will be removed in the future."):console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),t=!!i;try{let d,l,h;if([i,d]=await Promise.all([i||a.createQrEngine(),a._loadImage(e)]),[n,l]=a._drawToCanvas(d,o,n,s),i instanceof Worker){let e=i;t||a._postWorkerMessageSync(e,"inversionMode","both"),h=await new Promise(((t,i)=>{let s,r,c,d=-1;r=n=>{n.data.id===d&&(e.removeEventListener("message",r),e.removeEventListener("error",c),clearTimeout(s),null!==n.data.data?t({data:n.data.data,cornerPoints:a._convertPoints(n.data.cornerPoints,o)}):i(a.NO_QR_CODE_FOUND))},c=t=>{e.removeEventListener("message",r),e.removeEventListener("error",c),clearTimeout(s),i("Scanner error: "+(t?t.message||t:"Unknown Error"))},e.addEventListener("message",r),e.addEventListener("error",c),s=setTimeout((()=>c("timeout")),1e4);let h=l.getImageData(0,0,n.width,n.height);d=a._postWorkerMessageSync(e,"decode",h,[h.data.buffer])}))}else h=await Promise.race([new Promise(((e,t)=>window.setTimeout((()=>t("Scanner error: timeout")),1e4))),(async()=>{try{var[t]=await i.detect(n);if(!t)throw a.NO_QR_CODE_FOUND;return{data:t.rawValue,cornerPoints:a._convertPoints(t.cornerPoints,o)}}catch(c){if(t=c.message||c,/not implemented|service unavailable/.test(t))return a._disableBarcodeDetector=!0,a.scanImage(e,{scanRegion:o,canvas:n,disallowCanvasResizing:s,alsoTryWithoutScanRegion:r});throw`Scanner error: ${t}`}})()]);return c?h:h.data}catch(d){if(!o||!r)throw d;let t=await a.scanImage(e,{qrEngine:i,canvas:n,disallowCanvasResizing:s});return c?t:t.data}finally{t||a._postWorkerMessage(i,"close")}}setGrayscaleWeights(e,t,i,n=!0){a._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:t,blue:i,useIntegerApproximation:n})}setInversionMode(e){a._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(e){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>i.e(126).then(i.bind(i,41126)).then((e=>e.createWorker())),a._disableBarcodeDetector||!("BarcodeDetector"in window)||!BarcodeDetector.getSupportedFormats||!(await BarcodeDetector.getSupportedFormats()).includes("qr_code"))return e();let t=navigator.userAgentData;return t&&t.brands.some((({brand:e})=>/Chromium/i.test(e)))&&/mac ?OS/i.test(t.platform)&&await t.getHighEntropyValues(["architecture","platformVersion"]).then((({architecture:e,platformVersion:t})=>/arm/i.test(e||"arm")&&13<=parseInt(t||"13"))).catch((()=>!0))?e():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let t=Math.round(2/3*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-t)/2),y:Math.round((e.videoHeight-t)/2),width:t,height:t,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame((()=>{if(this.$overlay){var e=this.$video,t=e.videoWidth,i=e.videoHeight,a=e.offsetWidth,n=e.offsetHeight,s=e.offsetLeft,r=e.offsetTop,o=window.getComputedStyle(e),c=o.objectFit,d=t/i,l=a/n;switch(c){case"none":var h=t,u=i;break;case"fill":h=a,u=n;break;default:("cover"===c?d>l:d<l)?h=(u=n)*d:u=(h=a)/d,"scale-down"===c&&(h=Math.min(h,t),u=Math.min(u,i))}var[m,g]=o.objectPosition.split(" ").map(((e,t)=>{const i=parseFloat(e);return e.endsWith("%")?(t?n-u:a-h)*i/100:i}));o=this._scanRegion.width||t,l=this._scanRegion.height||i,c=this._scanRegion.x||0;var v=this._scanRegion.y||0;(d=this.$overlay.style).width=o/t*h+"px",d.height=l/i*u+"px",d.top=`${r+g+v/i*u}
1px`,i=/scaleX\(-1\)/.test(e.style.transform),d.left=`${s+(i?a-m-h:m)+(i?t-c-o:c)/t*h}px`,d.transform=e.style.transform}}))}static _convertPoints(e,t){if(!t)return e;let i=t.x||0,a=t.y||0,n=t.width&&t.downScaledWidth?t.width/t.downScaledWidth:1;t=t.height&&t.downScaledHeight?t.height/t.downScaledHeight:1;for(let s of e)s.x=s.x*n+i,s.y=s.y*t+a;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)((async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,t=1e3/this._maxScansPerSecond;e<t&&await new Promise((i=>setTimeout(i,t-e))),this._lastScanTimestamp=Date.now();try{var i=await a.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(n){if(!this._active)return;this._onDecodeError(n)}!a._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=a.createQrEngine()),i?(this._onDecode?this._onDecode(i):this._legacyOnDecode&&this._legacyOnDecode(i.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",i.cornerPoints.map((({x:e,y:t})=>`${e},${t}`)).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout((()=>this.$codeOutlineHighlight.style.display="none"),100))}this._scanFrame()}))}_onDecodeError(e){e!==a.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",t=[{width:{min:1024}},{width:{min:768}},{}],i=t.map((t=>Object.assign({},t,{[e]:{exact:this._preferredCamera}})));for(let n of[...i,...t])try{let e=await navigator.mediaDevices.getUserMedia({video:n,audio:!1});return{stream:e,facingMode:this._getFacingMode(e)||(n.facingMode?this._preferredCamera:"environment"===this._preferredCamera?"user":"environment")}}catch(a){}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let t of e.getTracks())t.stop(),e.removeTrack(t)}_setVideoMirror(e){this.$video.style.transform="scaleX("+("user"===e?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,t,i,a=!1){i=i||document.createElement("canvas");let n=t&&t.x?t.x:0,s=t&&t.y?t.y:0,r=t&&t.width?t.width:e.videoWidth||e.width,o=t&&t.height?t.height:e.videoHeight||e.height;return a||(a=t&&t.downScaledWidth?t.downScaledWidth:r,t=t&&t.downScaledHeight?t.downScaledHeight:o,i.width!==a&&(i.width=a),i.height!==t&&(i.height=t)),(t=i.getContext("2d",{alpha:!1})).imageSmoothingEnabled=!1,t.drawImage(e,n,s,r,o,0,0,i.width,i.height),[i,t]}static async _loadImage(e){if(e instanceof Image)return await a._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(!(e instanceof File||e instanceof Blob||e instanceof URL||"string"===typeof e))throw"Unsupported image type.";{let t=new Image;t.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await a._awaitImageLoad(t),t}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(t.src)}}}static async _awaitImageLoad(e){e.complete&&0!==e.naturalWidth||await new Promise(((t,i)=>{let a=n=>{e.removeEventListener("load",a),e.removeEventListener("error",a),n instanceof ErrorEvent?i("Image load error"):t()};e.addEventListener("load",a),e.addEventListener("error",a)}))}static async _postWorkerMessage(e,t,i,n){return a._postWorkerMessageSync(await e,t,i,n)}static _postWorkerMessageSync(e,t,i,n){if(!(e instanceof Worker))return-1;let s=a._workerMessageId++;return e.postMessage({id:s,type:t,data:i},n),s}}a.DEFAULT_CANVAS_SIZE=400,a.NO_QR_CODE_FOUND="No QR code found",a._disableBarcodeDetector=!1,a._workerMessageId=0,t.Z=a}}]);
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.