1"use strict";(self.webpackChunktickets_front_end=self.webpackChunktickets_front_end||[]).push([["src_app_components_self-checkin_self-checkin_module_ts"],{95685(Ye,J,c){c.d(J,{SelfCheckinModule:()=>Qe});var L=c(49769),Z=c(26630),m=c(25136),O=c(9310),A=c(21413),w=c(56977),q=c(75002),ee=c(44981),j=c(13070),te=c(64952);const G=(0,O.UX)("selfCheckIn");var ie=c(38730),M=c(71590),v=c(25869),N=c(25425),R=c(45312),t=c(35547),C=c(85802),U=c(50779),W=c(97669),k=c(10467);const B=(()=>{class a{constructor(e,i,n,s,o){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"),n&&"object"==typeof n?this._onDecode=i:(console.warn(n||s||o?"You're using a deprecated version of the QrScanner constructor which will be removed in the future":"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=i),this._onDecodeError=(i="object"==typeof n?n:{}).onDecodeError||("function"==typeof n?n:this._onDecodeError),this._calculateScanRegion=i.calculateScanRegion||("function"==typeof s?s:this._calculateScanRegion),this._preferredCamera=i.preferredCamera||o||this._preferredCamera,this._legacyCanvasSize="number"==typeof n?n:"number"==typeof s?s:this._legacyCanvasSize,this._maxScansPerSecond=i.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),n=e.parentElement,i.highlightScanRegion||i.highlightCodeOutline){if(s=!!i.overlay,this.$overlay=i.overlay||document.createElement("div"),(o=this.$overlay.style).position="absolute",o.display="none",o.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!s&&i.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-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{}n.insertBefore(this.$overlay,this.$video.nextSibling)}i.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 l=window.getComputedStyle(e);"none"===l.display&&(e.style.setProperty("display","block","important"),r=!0),"visible"!==l.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 hasCamera(){return(0,k.A)(function*(){try{return!!(yield a.listCameras(!1)).length}catch{return!1}})()}static listCameras(){return(0,k.A)(function*(e=!1){if(!navigator.mediaDevices)return[];let n,i=function(){var s=(0,k.A)(function*(){return(yield navigator.mediaDevices.enumerateDevices()).filter(o=>"videoinput"===o.kind)});return function(){return s.apply(this,arguments)}}();try{e&&(yield i()).every(s=>!s.label)&&(n=yield navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(yield i()).map((s,o)=>({id:s.deviceId,label:s.label||(0===o?"Default Camera":`Camera ${o+1}`)}))}finally{n&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),a._stopVideoStream(n))}}).apply(this,arguments)}hasFlash(){var e=this;return(0,k.A)(function*(){let i;try{if(e.$video.srcObject){if(!(e.$video.srcObject instanceof MediaStream))return!1;i=e.$video.srcObject}else i=(yield e._getCameraStream()).stream;
1return"torch"in i.getVideoTracks()[0].getSettings()}catch{return!1}finally{i&&i!==e.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),a._stopVideoStream(i))}})()}isFlashOn(){return this._flashOn}toggleFlash(){var e=this;return(0,k.A)(function*(){e._flashOn?yield e.turnFlashOff():yield e.turnFlashOn()})()}turnFlashOn(){var e=this;return(0,k.A)(function*(){if(!e._flashOn&&!e._destroyed&&(e._flashOn=!0,e._active&&!e._paused))try{if(!(yield e.hasFlash()))throw"No flash available";yield e.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(i){throw e._flashOn=!1,i}})()}turnFlashOff(){var e=this;return(0,k.A)(function*(){e._flashOn&&(e._flashOn=!1,yield e._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")}start(){var e=this;return(0,k.A)(function*(){if(e._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!e._active||e._paused)&&("https:"!==window.location.protocol&&console.warn("The camera stream is only accessible if the page is transferred via https."),e._active=!0,!document.hidden))if(e._paused=!1,e.$video.srcObject)yield e.$video.play();else try{let{stream:i,facingMode:n}=yield e._getCameraStream();!e._active||e._paused?a._stopVideoStream(i):(e._setVideoMirror(n),e.$video.srcObject=i,yield e.$video.play(),e._flashOn&&(e._flashOn=!1,e.turnFlashOn().catch(()=>{})))}catch(i){if(!e._paused)throw e._active=!1,i}})()}stop(){this.pause(),this._active=!1}pause(){var e=this;return(0,k.A)(function*(i=!1){if(e._paused=!0,!e._active)return!0;e.$video.pause(),e.$overlay&&(e.$overlay.style.display="none");let n=()=>{e.$video.srcObject instanceof MediaStream&&(a._stopVideoStream(e.$video.srcObject),e.$video.srcObject=null)};return i?(n(),!0):(yield new Promise(s=>setTimeout(s,300)),!!e._paused&&(n(),!0))}).apply(this,arguments)}setCamera(e){var i=this;return(0,k.A)(function*(){e!==i._preferredCamera&&(i._preferredCamera=e,yield i._restartVideoStream())})()}static scanImage(e,i,n,s){return(0,k.A)(function*(o,r,l,h,f=!1,u=!1){let p,g=!1;r&&("scanRegion"in r||"qrEngine"in r||"canvas"in r||"disallowCanvasResizing"in r||"alsoTryWithoutScanRegion"in r||"returnDetailedScanResult"in r)?(p=r.scanRegion,l=r.qrEngine,h=r.canvas,f=r.disallowCanvasResizing||!1,u=r.alsoTryWithoutScanRegion||!1,g=!0):console.warn(r||l||h||f||u?"You're using a deprecated api for scanImage which will be removed in the future.":"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."),r=!!l;try{let y,b,D;if([l,y]=yield Promise.all([l||a.createQrEngine(),a._loadImage(o)]),[h,b]=a._drawToCanvas(y,p,h,f),l instanceof Worker){let _=l;r||a._postWorkerMessageSync(_,"inversionMode","both"),D=yield new Promise((I,F)=>{let T,$,E,Y=-1;$=x=>{x.data.id===Y&&(_.removeEventListener("message",$),_.removeEventListener("error",E),clearTimeout(T),null!==x.data.data?I({data:x.data.data,cornerPoints:a._convertPoints(x.data.cornerPoints,p)}):F(a.NO_QR_CODE_FOUND))},E=x=>{_.removeEventListener("message",$),_.removeEventListener("error",E),clearTimeout(T),F("Scanner error: "+(x?x.message||x:"Unknown Error"))},_.addEventListener("message",$),_.addEventListener("error",E),T=setTimeout(()=>E("timeout"),1e4);let K=b.getImageData(0,0,h.width,h.height);Y=a._postWorkerMessageSync(_,"decode",K,[K.data.buffer])})}else D=yield Promise.race([new Promise((_,I)=>window.setTimeout(()=>I("Scanner error: timeout"),1e4)),(0,k.A)(function*(){try{var[_]=yield l.detect(h);if(!_)throw a.NO_QR_CODE_FOUND;return{data:_.rawValue,cornerPoints:a._convertPoints(_.cornerPoints,p)}}catch(I){if(/not implemented|service unavailable/.test(_=I.message||I))return a._disableBarcodeDetector=!0,a.scanImage(
1o,{scanRegion:p,canvas:h,disallowCanvasResizing:f,alsoTryWithoutScanRegion:u});throw`Scanner error: ${_}`}})()]);return g?D:D.data}catch(y){if(!p||!u)throw y;let b=yield a.scanImage(o,{qrEngine:l,canvas:h,disallowCanvasResizing:f});return g?b:b.data}finally{r||a._postWorkerMessage(l,"close")}}).apply(this,arguments)}setGrayscaleWeights(e,i,n,s=!0){a._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:i,blue:n,useIntegerApproximation:s})}setInversionMode(e){a._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static createQrEngine(e){return(0,k.A)(function*(){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>c.e("node_modules_qr-scanner_qr-scanner-worker_min_js").then(c.bind(c,86043)).then(n=>n.createWorker()),a._disableBarcodeDetector||!("BarcodeDetector"in window)||!BarcodeDetector.getSupportedFormats||!(yield BarcodeDetector.getSupportedFormats()).includes("qr_code"))return e();let i=navigator.userAgentData;return i&&i.brands.some(({brand:n})=>/Chromium/i.test(n))&&/mac ?OS/i.test(i.platform)&&(yield i.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:n,platformVersion:s})=>/arm/i.test(n||"arm")&&13<=parseInt(s||"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 i=Math.round(.6666666666666666*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-i)/2),y:Math.round((e.videoHeight-i)/2),width:i,height:i,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,i=e.videoWidth,n=e.videoHeight,s=e.offsetWidth,o=e.offsetHeight,r=e.offsetLeft,l=e.offsetTop,h=window.getComputedStyle(e),f=h.objectFit,u=i/n,p=s/o;switch(f){case"none":var g=i,y=n;break;case"fill":g=s,y=o;break;default:("cover"===f?u>p:u<p)?g=(y=o)*u:y=(g=s)/u,"scale-down"===f&&(g=Math.min(g,i),y=Math.min(y,n))}var[b,D]=h.objectPosition.split(" ").map((I,F)=>{const T=parseFloat(I);return I.endsWith("%")?(F?o-y:s-g)*T/100:T});p=this._scanRegion.height||n,f=this._scanRegion.x||0;var _=this._scanRegion.y||0;(u=this.$overlay.style).width=(h=this._scanRegion.width||i)/i*g+"px",u.height=p/n*y+"px",u.top=`${l+D+_/n*y}px`,n=/scaleX\(-1\)/.test(e.style.transform),u.left=`${r+(n?s-b-g:b)+(n?i-f-h:f)/i*g}px`,u.transform=e.style.transform}})}static _convertPoints(e,i){if(!i)return e;let n=i.x||0,s=i.y||0,o=i.width&&i.downScaledWidth?i.width/i.downScaledWidth:1;i=i.height&&i.downScaledHeight?i.height/i.downScaledHeight:1;for(let r of e)r.x=r.x*o+n,r.y=r.y*i+s;return e}_scanFrame(){var e=this;!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)((0,k.A)(function*(){if(!(1>=e.$video.readyState)){var i=Date.now()-e._lastScanTimestamp,n=1e3/e._maxScansPerSecond;i<n&&(yield new Promise(o=>setTimeout(o,n-i))),e._lastScanTimestamp=Date.now();try{var s=yield a.scanImage(e.$video,{scanRegion:e._scanRegion,qrEngine:e._qrEnginePromise,canvas:e.$canvas})}catch(o){if(!e._active)return;e._onDecodeError(o)}!a._disableBarcodeDetector||(yield e._qrEnginePromise)instanceof Worker||(e._qrEnginePromise=a.createQrEngine()),s?(e._onDecode?e._onDecode(s):e._legacyOnDecode&&e._legacyOnDecode(s.data),e.$codeOutlineHighlight&&(clearTimeout(e._codeOutlineHighlightRemovalTimeout),e._codeOutlineHighlightRemovalTimeout=void 0,e.$codeOutlineHighlight.setAttribute("viewBox",`${e._scanRegion.x||0} ${e._scanRegion.y||0} ${e._scanRegion.width||e.$video.videoWidth} ${e._scanRegion.height||e.$video.videoHeight}`),e.$codeOutlineHighlight.firstElementChild.setAttribute("points",s.cornerPoints.map(({x:o,y:r})=>`${o},${r}`).join(" ")),e.$codeOutlineHighlight.style.display="")):e.$codeOutlineHighlight&&!e._codeOutlineHighlightRemovalTimeout&&(e._codeOutlineHighlightRemovalTimeout=setTimeout(()=>e.$codeOutlineHighlight.style.display="none",100))}e._scanFrame()}))}_onDecodeError(e){e!==a.NO_QR_CODE_FOUND&&console.log(e)}_getCameraStream(){var e=this;return(0,k.A)(function*(){if(!navigator.mediaDevices)throw"Camera not found.";let i=/^(environment|user)$/.test(e._preferredCamera)?"facingMode":"deviceId",n=[{width:{min:1024}},{width:{min:768}},{}],s=n.map(o=>Object.assign({},o,{[i]:{exact:e._preferredCamera}}));for(let o of[...s,...n])try{let r=yield navigator.mediaDevices.getUserMedia({video:o,audio:!1});
1return{stream:r,facingMode:e._getFacingMode(r)||(o.facingMode?e._preferredCamera:"environment"===e._preferredCamera?"user":"environment")}}catch{}throw"Camera not found."})()}_restartVideoStream(){var e=this;return(0,k.A)(function*(){let i=e._paused;(yield e.pause(!0))&&!i&&e._active&&(yield e.start())})()}static _stopVideoStream(e){for(let i of e.getTracks())i.stop(),e.removeTrack(i)}_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,i,n,s=!1){n=n||document.createElement("canvas");let o=i&&i.x?i.x:0,r=i&&i.y?i.y:0,l=i&&i.width?i.width:e.videoWidth||e.width,h=i&&i.height?i.height:e.videoHeight||e.height;return s||(s=i&&i.downScaledWidth?i.downScaledWidth:l,i=i&&i.downScaledHeight?i.downScaledHeight:h,n.width!==s&&(n.width=s),n.height!==i&&(n.height=i)),(i=n.getContext("2d",{alpha:!1})).imageSmoothingEnabled=!1,i.drawImage(e,o,r,l,h,0,0,n.width,n.height),[n,i]}static _loadImage(e){return(0,k.A)(function*(){if(e instanceof Image)return yield 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 i=new Image;i.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return yield a._awaitImageLoad(i),i}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(i.src)}}})()}static _awaitImageLoad(e){return(0,k.A)(function*(){e.complete&&0!==e.naturalWidth||(yield new Promise((i,n)=>{let s=o=>{e.removeEventListener("load",s),e.removeEventListener("error",s),o instanceof ErrorEvent?n("Image load error"):i()};e.addEventListener("load",s),e.addEventListener("error",s)}))})()}static _postWorkerMessage(e,i,n,s){return(0,k.A)(function*(){return a._postWorkerMessageSync(yield e,i,n,s)})()}static _postWorkerMessageSync(e,i,n,s){if(!(e instanceof Worker))return-1;let o=a._workerMessageId++;return e.postMessage({id:o,type:i,data:n},s),o}}return a.DEFAULT_CANVAS_SIZE=400,a.NO_QR_CODE_FOUND="No QR code found",a._disableBarcodeDetector=!1,a._workerMessageId=0,a})();var H=c(32266);let X=(()=>{class a{constructor(e){this.deviceDetectorService=e,this.cameraAvail=new A.B,this.cameraAvailObs=this.cameraAvail.asObservable()}mobileTabletWithCamera(){return B.hasCamera().then(e=>!(!e||!this.deviceDetectorService.isMobile()&&!this.deviceDetectorService.isTablet())).catch(e=>!1)}static{this.\u0275fac=function(i){return new(i||a)(C.KVO(H.Kg))}}static{this.\u0275prov=C.jDH({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();const ne=["cameraSection"];let ae=(()=>{class a{constructor(e){this.ngZone=e,this.turnOffCamera=new C.bkB,this.scannedCode="",this.env=R.c}ngOnInit(){this.qrScanner=new B(document.getElementById("video"),e=>{this.ngZone.run(()=>{this.scannedCode=e.data,this.closeCamera()})},{highlightScanRegion:!0}),this.checkForAvailableCameras()}checkForAvailableCameras(){B.listCameras().then(e=>{this.cameraList=e,this.cameraList.length>0&&(this.currentCameraId=this.cameraList[0].id,this.startCamera(),this.cameraList.length>1&&(this.changeCameraAvailable=!0))}).catch(e=>{this.cameraList=[]})}startCamera(){this.qrScanner.setCamera("environment"),this.qrScanner.start(),this.qrScanner.hasFlash().then(e=>{this.flashAvailable=e}).catch(e=>{this.flashAvailable=!1})}closeCamera(){this.qrScanner.stop(),this.turnOffCamera.emit(this.scannedCode)}toggleFlash(){this.flashAvailable&&this.qrScanner.toggleFlash()}toggleCamera(){this.currentCameraId=this.cameraList[0].id===this.currentCameraId?this.cameraList[1].id:this.cameraList[0].id,this.qrScanner.setCamera(this.currentCameraId)}ngOnDestroy(){this.qrScanner.destroy(),this.qrScanner=null}static{this.\u0275fac=function(i){return new(i||a)(t.rXU(C.SKi))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-camera"]],viewQuery:function(i,n){if(1&i&&t.GBs(ne,5),2&i){let s;t.mGM(s=t.lsd())&&(n.videoElm=s.first)}},outputs:{turnOffCamera:"turnOffCamera"},standalone:!1,decls:8,vars:2,consts:[["cameraSection",""],[1,"camera","pr-3","pl-3"],[1,"camera-cancel"],[3,"click"],[1,"iconClass",3,"src"],["id","video",1,"camera-section"]],template:function(i,n){1&i&&(t.j41(0,"div",1)(1,"div",2)(2,"span",3),t.bIt("click",function(){return n.closeCamera()}),t.EFF(3," Cancel "),t.nrm(4,"img",4),t.k0s()(),t.j41(5,"video",5,0),t.EFF(7,"Camera Loading ..."),t.k0s()()),2&i&&(t.R7$(4),t.Y8G("src",t.VkB("",n.env.damAssetPath,"/icons/f-icon_remove-in-circle.svg"),t.B4B))},styles:[".camera[_ngcontent-%COMP%]{padding-top:50px}.camera-cancel[_ngcontent-%COMP%]{padding:25px;text-align:right;font-size:20px}.camera-cancel[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:20px;margin-left:5px}.camera-section[_ngcontent-%COMP%]{padding:0 10px;width:100%}
1.camera-img[_ngcontent-%COMP%]{width:50px;margin:20px}"]})}}return a})();var se=c(60115);const oe=a=>({customFont:a});function re(a,d){if(1&a&&(t.j41(0,"div")(1,"span"),t.EFF(2),t.k0s(),t.nrm(3,"img",2),t.k0s()),2&a){const e=t.XpG();t.R7$(2),t.JRh(null==e.checkedInInfo?null:e.checkedInInfo.regularPaxCheckedCount),t.R7$(),t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/traveler-adult-blue-whitefill.svg"),t.B4B)("alt",(null==e.checkedInInfo?null:e.checkedInInfo.regularPaxCheckedCount)>1?null==e.aemLabels?null:e.aemLabels.travelersText:null==e.aemLabels?null:e.aemLabels.travelerText)}}function le(a,d){if(1&a&&(t.j41(0,"div")(1,"span"),t.EFF(2),t.k0s(),t.nrm(3,"img",2),t.k0s()),2&a){const e=t.XpG();t.R7$(2),t.JRh(null==e.checkedInInfo?null:e.checkedInInfo.pwdPaxCheckedCount),t.R7$(),t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/Weelchair.svg"),t.B4B)("alt",(null==e.checkedInInfo?null:e.checkedInInfo.pwdPaxCheckedCount)>1?null==e.aemLabels?null:e.aemLabels.travelersText:null==e.aemLabels?null:e.aemLabels.travelerText)}}let z=(()=>{class a{constructor(){this.isSummary=!1,this.env=R.c}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-self-checkin-summary-travelers"]],inputs:{aemLabels:"aemLabels",checkedInInfo:"checkedInInfo",isSummary:"isSummary"},standalone:!1,decls:5,vars:7,consts:[[1,"checkin-summary-travelers","align-self-center",3,"ngClass"],[1,"align-self-center","checkedInText",3,"ngClass"],[1,"checkin-summary-travelers-img","mr-2","ml-1",3,"alt","src"]],template:function(i,n){1&i&&(t.j41(0,"div",0),t.nVh(1,re,4,4,"div"),t.nVh(2,le,4,4,"div"),t.j41(3,"div",1),t.EFF(4),t.k0s()()),2&i&&(t.Y8G("ngClass",n.isSummary?"d-none d-md-flex justify-content-md-start justify-content-lg-end mt-3":"d-flex d-md-none justify-content-md-start"),t.R7$(),t.vxM(null!=n.checkedInInfo&&n.checkedInInfo.regularPaxExist?1:-1),t.R7$(),t.vxM(null!=n.checkedInInfo&&n.checkedInInfo.pwdPaxExist?2:-1),t.R7$(),t.Y8G("ngClass",t.eq3(5,oe,!n.isSummary)),t.R7$(),t.SpI(" ",null==n.aemLabels?null:n.aemLabels.checkedInText," "))},dependencies:[L.YU],styles:[".checkin-summary-travelers[_ngcontent-%COMP%]{flex-basis:250px}.checkin-summary-travelers-img[_ngcontent-%COMP%]{width:16px}.checkin-summary-travelers[_ngcontent-%COMP%] .checkedInText[_ngcontent-%COMP%]{font-size:12px}.checkin-summary-travelers[_ngcontent-%COMP%] .customFont[_ngcontent-%COMP%]{font-size:8px}"]})}}return a})();function ce(a,d){1&a&&t.eu8(0)}function he(a,d){1&a&&t.eu8(0)}function de(a,d){1&a&&t.eu8(0)}function me(a,d){if(1&a&&t.nrm(0,"app-self-checkin-summary-travelers",6),2&a){const e=t.XpG();t.Y8G("checkedInInfo",e.checkedInInfo)("isSummary",!0)("aemLabels",e.aemLabels)}}function ue(a,d){if(1&a&&(t.j41(0,"div",7)(1,"div",8)(2,"span",9),t.EFF(3),t.k0s(),t.j41(4,"span",10),t.EFF(5),t.k0s()(),t.j41(6,"div"),t.nrm(7,"img",11),t.k0s(),t.j41(8,"div",8)(9,"span",9),t.EFF(10),t.k0s(),t.j41(11,"span",10),t.EFF(12),t.k0s()()()),2&a){const e=t.XpG();t.R7$(3),t.JRh(null==e.tripSummary||null==e.tripSummary.journeyLegInfo?null:e.tripSummary.journeyLegInfo.fromStation),t.R7$(2),t.JRh(null==e.tripSummary||null==e.tripSummary.journeyLegInfo?null:e.tripSummary.journeyLegInfo.departureDateDisplay),t.R7$(2),t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/f-icon_one-way-arrow.svg"),t.B4B),t.R7$(3),t.JRh(null==e.tripSummary||null==e.tripSummary.journeyLegInfo?null:e.tripSummary.journeyLegInfo.toStation),t.R7$(2),t.JRh(null==e.tripSummary||null==e.tripSummary.journeyLegInfo?null:e.tripSummary.journeyLegInfo.arrivalDateDisplay)}}function fe(a,d){if(1&a&&(t.j41(0,"div",12),t.nrm(1,"img",13),t.j41(2,"span"),t.EFF(3),t.k0s()()),2&a){const e=t.XpG();t.R7$(),t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/train-routes/acela-express.svg"),t.B4B),t.R7$(2),t.Lme("",null==e.tripSummary||null==e.tripSummary.trainInfo?null:e.tripSummary.trainInfo.number," ",null==e.tripSummary||null==e.tripSummary.trainInfo?null:e.tripSummary.trainInfo.name)}}let pe=(()=>{class a{constructor(){this.env=R.c}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-self-checkin-summary"]],inputs:{aemLabels:"aemLabels",tripSummary:"tripSummary",checkedInInfo:"checkedInInfo"},standalone:!1,decls:11,vars:3,consts:[["travelers",""],["stations",""],["trains",""],[1,"checkin-summary"],[1,"container","d-flex","px-md-5","px-lg-3","py-3"],[4,"ngTemplateOutlet"],[3,"checkedInInfo","isSummary","aemLabels"],[1,"checkin-summary-stations","align-items-center","d-flex","justify-content-md-center"],[1,"d-flex","flex-column"],[1,"checkin-summary-stations-fromTo"],[1,"checkin-summary-stations-date","pt-2"],["alt","To",1,"checkin-summary-stations-arrow","mx-5",3,"src"],[1,"checkin-summary-trains","align-self-center","d-md-flex","justify-content-end","align-items-center","d-none"],["alt","acela train",1,"checkin-summary-trains-img",3,"src"]],template:function(i,n){if(1&i&&(t.j41(0,"div",3)(1,"div",4),t.DNE(2,ce,1,0,"ng-container",5)(3,he,1,0,"ng-container",5)(4,de,1,0,"ng-container",5),t.k0s()(),t.DNE(5,me,1,3,"ng-template",null,0,t.C5r)(7,ue,13,6,"ng-template",null,1,t.C5r)(9,fe,4,4,"ng-template",null,2,t.C5r)),2&i){const s=t.sdS(6),o=t.sdS(8),r=t.sdS(10);t.R7$(2),t.Y8G("ngTemplateOutlet",s),t.R7$(),t.Y8G("ngTemplateOutlet",o),t.R7$(),t.Y8G("ngTemplateOutlet",r)}},dependencies:[L.T3,z],styles:[".checkin-summary[_ngcontent-%COMP%]{background:#e1f5fd}.checkin-summary-stations[_ngcontent-%COMP%]{flex-grow:5}.checkin-summary-stations-arrow[_ngcontent-%COMP%]{width:35px;margin-top:-10px}.checkin-summary-stations-fromTo[_ngcontent-%COMP%]{font-weight:600}@media(min-width:768px){.checkin-summary-stations-fromTo[_ngcontent-%COMP%]{font-size:20px}}.checkin-summary-stations-date[_ngcontent-%COMP%]{font-size:10px;font-weight:600}@media(min-width:768px){.checkin-summary-stations-date[_ngcontent-%COMP%]{font-size:14px}}.checkin-summary-trains[_ngcontent-%COMP%]{flex-basis:250px}@media(min-width:768px){.checkin-summary-trains[_ngcontent-%COMP%]{flex-basis:150px;font-size:12px}}.checkin-summary-trains-img[_ngcontent-%COMP%]{width:20px;margin-right:5px}"]})}}return a})();var S=c(89417),P=c(96697),ge=c(79504),V=c(48764),ve=c(80952),Ce=c(33725),Q=c(31902),ke=c(67607),_e=c(6189),Se=c(90760),ye=c(67130);const Ie=["downloadAppDialog"],be=["checkboxAll"],xe=(a,d)=>({"circle-icon--orange":a,"circle-icon--green":d});function we(a,d){if(1&a&&(t.nrm(0,"div",5),t.EFF(1)),2&a){const e=t.XpG();t.Y8G("ngClass",t.l_i(2,xe,"partial"===e.checkedInStatus,"all"===e.checkedInStatus)),t.R7$(),t.SpI(" ",e.checkedInMsg," ")}}function Me(a,d){if(1&a&&(t.j41(0,"label",18),t.EFF(1),t.k0s()),2&a){const e=t.XpG(),i=e.$implicit;t.Y8G("id",t.VkB("traveler-",e.$index)),t.R7$(),t.SpI(" ",i.value.firstName+", "+i.value.lastName," ")}}function De(a,d){if(1&a&&(t.j41(0,"am-error-new"),t.EFF(1),t.k0s()),2&a){const e=t.XpG(3).$implicit,i=t.XpG(2);t.R7$(),t.SpI(" ",i.getErrorMessage(e)," ")}}function Te(a,d){if(1&a){const e=t.RV6();t.j41(0,"img",27),t.bIt("click",function(){C.eBV(e);const n=t.XpG(3).$implicit,s=t.XpG(2);return C.Njj(s.launchCamera(n))}),t.k0s()}if(2&a){const e=t.XpG(5);t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/camera.svg"),t.B4B),t.BMQ("alt",null==e.aemLabels?null:e.aemLabels.cameraImgAltText)}}function Le(a,d){if(1&a){const e=t.RV6();t.j41(0,"img",27),t.bIt("click",function(){C.eBV(e);const n=t.XpG(3).$implicit,s=t.XpG(2);return C.Njj(s.clearSeatInputOfTraveler(n))}),t.k0s()}if(2&a){const e=t.XpG(5);t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/f-icon_remove-in-circle.svg"),t.B4B),t.BMQ("alt",null==e.aemLabels?null:e.aemLabels.crossImgAltText)}}function Re(a,d){if(1&a&&(t.j41(0,"span",22)(1,"am-form-field-new"),t.nrm(2,"input",23,1),t.j41(4,"label",24),t.EFF(5),t.k0s(),t.nVh(6,De,2,1,"am-error-new"),t.k0s(),t.j41(7,"div",25),t.nVh(8,Te,1,3,"img",26),t.nVh(9,Le,1,3,"img",26),t.k0s()()),2&a){const e=t.XpG(2),i=e.$implicit,n=e.$index,s=t.XpG(2);t.R7$(2),t.Y8G("amt-auto-test-id",t.VkB("traveler-seat-code-",n)),t.BMQ("aria-label",null==s.aemInputs||null==s.aemInputs.seatCode?null:s.aemInputs.seatCode.ariaLabel)("disabled",!(!s.apiError&&!s.multiPaxSelected)||null),t.R7$(3),t.JRh(null==s.aemInputs||null==s.aemInputs.seatCode?null:s.aemInputs.seatCode.placeholder),t.R7$(),t.vxM(i.get("inputSeatCode").invalid&&i.get("inputSeatCode").touched?6:-1),t.R7$(2),t.vxM(s.showCameraIcon&&!i.value.inputSeatCode?8:-1),t.R7$(),t.vxM(i.value.inputSeatCode?9:-1)}}function Pe(a,d){if(1&a&&(t.j41(0,"label",20),t.nrm(1,"am-checkbox-new",21),t.EFF(2),t.k0s(),t.nVh(3,Re,10,8,"span",22)),2&a){const e=t.XpG(),i=e.$implicit,n=e.$index,s=t.XpG(2);t.Y8G("id",t.VkB("traveler-check-",n)),t.R7$(),t.Y8G("id",t.VkB("traveler-check-",n))("disabled",s.apiError)("ariaLabel",i.value.firstName+", "+i.value.lastName),t.R7$(),t.SpI(" ",i.value.firstName+", "+i.value.lastName," "),t.R7$(),t.vxM(i.value.checkBoxChecked&&s.initialCheckin?3:-1)}}function Ee(a,d){if(1&a&&t.nrm(0,"img",19),2&a){const e=t.XpG(3);t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/f-icon_confirm.svg"),t.B4B),t.BMQ("alt",null==e.aemLabels?null:e.aemLabels.checkedInText)}}function Oe(a,d){if(1&a&&(t.j41(0,"li",15)(1,"div",17),t.nVh(2,Me,2,3,"label",18),t.nVh(3,Pe,4,8),t.k0s(),t.j41(4,"div",12),t.nVh(5,Ee,1,3,"img",19),t.k0s(),t.j41(6,"div",13),t.EFF(7),t.nI1(8,"amNumberFormat"),t.k0s(),t.j41(9,"div",14),t.EFF(10),t.k0s()()),2&a){const e=d.$implicit;t.Y8G("formGroupName",d.$index),t.R7$(2),t.vxM(e.value.isCheckedIn||e.value.lifted?2:-1),t.R7$(),t.vxM(e.value.isCheckedIn||e.value.lifted?-1:3),t.R7$(2),t.vxM(e.value.isCheckedIn||e.value.lifted?5:-1),t.R7$(2),t.SpI(" ",t.bMT(8,6,e.value.assignedCar)," "),t.R7$(3),t.SpI(" ",e.value.assignedRow+e.value.assignedCol," ")}}function Fe(a,d){if(1&a){const e=t.RV6();t.j41(0,"li",16)(1,"div",17)(2,"label",28)(3,"am-checkbox-new",29),t.bIt("checkedChange",function(n){C.eBV(e);const s=t.XpG(2);return C.Njj(s.oncheckBoxAllChange(n))}),t.k0s(),t.EFF(4),t.k0s()()()}if(2&a){const e=t.XpG(2);t.R7$(3),t.Y8G("checked",e.allChecked)("ariaLabel",null==e.aemLabels?null:e.aemLabels.allText),t.R7$(),t.SpI(" ",null==e.aemLabels?null:e.aemLabels.allText," ")}}function $e(a,d){if(1&a&&(t.j41(0,"form",4)(1,"div",6)(2,"ul",7)(3,"li",8)(4,"div",9)(5,"span",10),t.EFF(6),t.k0s(),t.nrm(7,"app-self-checkin-summary-travelers",11),t.k0s(),t.j41(8,"div",12),t.EFF(9),t.k0s(),t.j41(10,"div",13),t.EFF(11),t.k0s(),t.j41(12,"div",14),t.EFF(13),t.k0s()(),t.Z7z(14,Oe,11,8,"li",15,t.fX1),t.nVh(16,Fe,5,3,"li",16),t.k0s()()()),2&a){const e=t.XpG();t.Y8G("formGroup",e.travelersForm),t.R7$(6),t.JRh(null==e.aemLabels?null:e.aemLabels.travelerText),t.R7$(),t.Y8G("aemLabels",e.aemLabels)("checkedInInfo",e.checkedInInfo),t.R7$(2),t.SpI(" ",null==e.aemLabels?null:e.aemLabels.checkedInText," "),t.R7$(2),t.SpI(" ",null==e.aemLabels?null:e.aemLabels.carText," "),t.R7$(2),t.SpI(" ",null==e.aemLabels?null:e.aemLabels.seatText," "),t.R7$(),t.Dyx(e.travelers.controls),t.R7$(2),t.vxM(e.initialCheckin||!e.multiPaxPNR||e.allPassengerChecked?-1:16)}}function Ae(a,d){if(1&a){const e=t.RV6();t.j41(0,"p",40),t.bIt("click",function(){C.eBV(e);const n=t.XpG(2);return C.Njj(n.navigateToAppStore())}),t.EFF(1),t.k0s()}if(2&a){const e=t.XpG(2);t.R7$(),t.SpI(" ",null==e.aemLabels?null:e.aemLabels.openAppStoreLinkText," ")}}function Ne(a,d){if(1&a){const e=t.RV6();t.j41(0,"div",30)(1,"div",31)(2,"h4",32),t.EFF(3),t.k0s(),t.j41(4,"button",33),t.bIt("click",function(){C.eBV(e);const n=t.XpG();return C.Njj(n.closeDownloadAppDialog())}),t.nrm(5,"img",34),t.k0s()(),t.j41(6,"div",35),t.nrm(7,"img",36),t.j41(8,"div",37)(9,"p",38),t.EFF(10),t.k0s(),t.nVh(11,Ae,2,1,"p",39),t.k0s()()()}if(2&a){const e=t.XpG();t.R7$(3),t.SpI(" ",null==e.aemLabels?null:e.aemLabels.downloadAppDialogHeaderText," "),t.R7$(),t.BMQ("aria-label",e.aemLabels.close),t.R7$(),t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/close-icon-white.svg"),t.B4B)("alt",t.mNQ(e.aemLabels.close)),t.R7$(2),t.Y8G("src",t.VkB("",e.env.damAssetPath,"/logos/mobile-app-logo.png"),t.B4B),t.R7$(3),t.JRh(null==e.aemLabels?null:e.aemLabels.downloadAppDialogMsgText),t.R7$(),t.vxM(null!=e.platformDevice&&e.platformDevice.isMobileTablet&&null!=e.platformDevice&&e.platformDevice.appStoreUrl?11:-1)}}let Be=(()=>{class a{get travelers(){return this.travelersForm.get("travelers")}constructor(e,i,n,s,o,r,l,h){this.fb=e,this.store=i,this.modalService=n,this.deviceDetectorService=s,this.cameraService=o,this.selfCheckinService=r,this.footerService=l,this.analyticsService=h,this.opnSeatPNR=!1,this.cameraIconClicked=new C.bkB,this.doneWithCheckIn=new C.bkB,this.openSeatMap=new C.bkB,this.env=R.c,this.initialCheckin=!0,this.multiPaxPNR=!1,this.allPassengerChecked=!1,this.scanCheckInFlag=!1,this.unsubscribe=new A.B,this.apiError=!1,this.validateMsgShown=!1,this.allChecked=!1}
1ngOnInit(){this.checkForInitialCheckIn(),this.travelerInfo.length>1&&(this.multiPaxPNR=!0),this.initialCheckin?(this.getTrainUnitInfo(),this.checkCameraAvailability()):this.initiateTravelerScreen(),this.checkForMobileTablet(),this.footerService.onContinue().pipe((0,w.Q)(this.unsubscribe)).subscribe(e=>{e&&e.continue&&e.continue.selfCheckIn&&(this.travelerInfo.length===this.checkedInInfo.pwdPaxCheckedCount+this.checkedInInfo.regularPaxCheckedCount?this.continueWithDone():this.validateBeforeCheckIn())}),this.store.select(G).pipe((0,w.Q)(this.unsubscribe)).subscribe(e=>{e.store.state===v.jE.state.selfCheckInSuccess?this.updateAnalyticsData(e.data):e.store.state===v.jE.state.success?(this.carUnitMapping=e.carUnitMapping,this.initiateTravelerScreen()):e.store.state===v.jE.state.fetchError&&(this.apiError=!0,this.initiateTravelerScreen(),this.footerService.validatePage({page:{selfCheckIn:{allowContinue:!1}}}))}),document.addEventListener("seatMapClosed",e=>{e.detail.selfCheckInSeatSelected&&this.showChangeSeatDialog(e.detail.selfCheckInSeatSelected)})}ngOnChanges(e){e.travelerInfo&&!e.travelerInfo.firstChange&&(this.checkForInitialCheckIn(),this.initiateTravelerScreen(),this.checkBoxAll&&(this.checkBoxAll.nativeElement.checked=!1))}initiateTravelerScreen(){this.initialCheckin&&!this.apiError&&(this.multiPaxPNR||(this.travelerInfo[0].checkBoxChecked=!0),this.checkInInitiatedByScan(),this.validateMsgShown||(this.showValidateSeatModal(),this.validateMsgShown=!0)),this.createTravelersForm(),this.checkForContinue(),this.checkForCheckedInMsg()}checkForCheckedInMsg(){const e=this.travelerInfo.length,i=this.checkedInInfo.regularPaxCheckedCount+this.checkedInInfo.pwdPaxCheckedCount;if(i===e?(this.checkedInStatus="all",this.allPassengerChecked=!0,this.checkedInMsg=e>1?this.aemLabels?.checkInSuccessAllPaxText:this.aemLabels?.checkInSuccessSinglePaxText,this.showDoneInFooter()):0!=i&&i<e&&(this.checkedInStatus="partial",this.checkedInMsg=this.aemLabels?.checkInOthersText),this.checkedInStatus){const n=document.getElementById("checkin-travelers-msg1");n&&setTimeout(()=>{n.focus()},0)}}showDoneInFooter(){this.footerService.validatePage({page:{selfCheckIn:{allowDone:!0}}})}createTravelersForm(){const e=this.travelerInfo.map(i=>this.createTraveler(i));this.travelersForm=this.fb.group({travelers:this.fb.array(e)})}createTraveler(e){const i=this.fb.group({rbd:e.rbd,passengerNumber:e.passengerNumber,assignedCar:e.assignedCar,assignedRow:e.assignedRow,assignedCol:e.assignedCol,isCheckedIn:e.isCheckedIn,lifted:e.lifted,firstName:e.firstName,lastName:e.lastName,ticketNumber:e.ticketNumber,carUnitNumber:this.carUnitMapping?this.carUnitMapping[e.assignedCar]:null,isQRScanned:!1,checkBoxChecked:[!!(e.checkBoxChecked||e.isCheckedIn||e.lifted),S.k0.requiredTrue]});return this.initialCheckin&&(i.addControl("inputSeatCode",new S.hs(e.inputSeatCode,[S.k0.required,S.k0.pattern(v.D5.Regx.SeatCode)])),i.get("inputSeatCode").valueChanges.pipe((0,w.Q)(this.unsubscribe)).subscribe(()=>{setTimeout(()=>{this.checkForContinue()})})),i.get("checkBoxChecked").valueChanges.pipe((0,w.Q)(this.unsubscribe)).subscribe(()=>{!1===i.get("checkBoxChecked").value?(this.setInputSeatCodeDefault(i),this.allChecked=!1,this.checkBoxAll&&(this.checkBoxAll.nativeElement.checked=!1)):this.initialCheckin&&this.multiPaxPNR&&this.uncheckedOtherPassengers(i),setTimeout(()=>{this.checkForContinue()})}),i}uncheckedOtherPassengers(e){this.travelersForm.get("travelers").controls.forEach(n=>{n.value.passengerNumber===e.value.passengerNumber||n.value.isCheckedIn||n.value.lifted||!n.value.checkBoxChecked||n.get("checkBoxChecked").setValue(!1)})}setInputSeatCodeDefault(e){e.contains("inputSeatCode")&&(e.get("inputSeatCode").setValue(""),e.get("inputSeatCode").markAsPristine(),e.get("inputSeatCode").markAsUntouched())}getErrorMessage(e){let i="";return e.get("inputSeatCode").invalid&&(i=e.get("inputSeatCode").hasError("required")?this.aemInputs?.seatCode?.enterSeatError:e.get("inputSeatCode").hasError("pattern")?this.aemInputs?.seatCode?.invalidSeatError:""),i}
1checkForInitialCheckIn(){this.travelerInfo.forEach(e=>{(e.isCheckedIn||e.lifted)&&(this.initialCheckin=!1)})}checkInInitiatedByScan(){const e=this.selfCheckinService.getScannedSeatCode();e&&this.travelerInfo.forEach((i,n)=>{i.inputSeatCode=e})}checkCameraAvailability(){this.cameraService.mobileTabletWithCamera().then(e=>{this.showCameraIcon=e})}oncheckBoxAllChange(e){this.allChecked=e,this.travelersForm.get("travelers").controls.forEach(n=>{n.value.isCheckedIn||n.value.lifted||n.get("checkBoxChecked").setValue(e)})}launchCamera(e){this.cameraIconClicked.emit(e)}clearSeatInputOfTraveler(e){e.patchValue({inputSeatCode:"",isQRScanned:!1})}checkForContinue(){let e=!1,i=0,n=0,s=0;const o=this.travelerInfo.length;this.travelersForm.get("travelers").controls.forEach(l=>{if(l.valid)if(l.value.isCheckedIn||l.value.lifted)i++;else{if(this.initialCheckin){const h=l.get("inputSeatCode").value,f=h&&h===h.toUpperCase();h&&!f&&l.get("inputSeatCode").setValue(h.toUpperCase())}s++,n++}else l.get("checkBoxChecked").value&&n++}),(i===o||i>0&&0===n||s>0&&n<=s)&&(e=!0),this.footerService.validatePage({page:{selfCheckIn:{allowContinue:e}}})}validateBeforeCheckIn(){let e,i=!1;if(this.initialCheckin?e=this.validateSeatWithAssignedSeats():this.travelersForm.value.travelers.forEach(n=>{n.checkBoxChecked&&!n.isCheckedIn&&!n.lifted&&(i=!0)}),i||e&&e.isTrainValid&&e.isCarValid&&e.isSeatValid){const n={initialCheckin:this.initialCheckin,url:this.aemData.selfCheckInUrl,travelerList:this.getCheckedInTravelerDetails(),scEligibleInfo:this.scEligibleInfo};this.store.dispatch(new V.Np(n))}else this.initialCheckin?this.showInCorrectDialog(e):this.showUncheckedTravelerDialog()}validateSeatWithAssignedSeats(){let n,s,e=!1,i=!1,o=!1;return this.travelersForm.value.travelers.forEach(r=>{if(r.checkBoxChecked){const l=this.getSeatInfoFromSeatCode(r.inputSeatCode);if(l){o=this.validateTrain(l.unitNumber);const h=l?parseInt(l.seatPosDesignator)+l.seatRowDesignator:"";this.multiPaxPNR?this.travelerInfo.forEach(f=>{h===f.assignedRow+f.assignedCol&&this.carUnitMapping[f.assignedCar]===l.unitNumber&&(e=!0,i=!0)}):(n=r.assignedRow+r.assignedCol,s=r.assignedCar,i=h===n,e=this.carUnitMapping[s]===l.unitNumber)}}}),{isTrainValid:o,isCarValid:e,isSeatValid:i,assignedSeat:n,assignedCar:s}}validateTrain(e){let i=!1;for(const n in this.carUnitMapping)this.carUnitMapping[n]===e&&(i=!0);return i}showChangeSeatDialog(e){this.alertModalDialog=this.modalService.show(m.pS,this.getDialogModalOptions(this.aemLabels.changeSeatAlert)),this.modalService.onHidden.pipe((0,P.s)(1)).subscribe(()=>{this.alertModalDialog.content.dialogResponse===m.yn.Confirmed?this.multiPaxPNR||this.checkInWithChangeSeat(e):this.alertModalDialog.content.dialogResponse===m.yn.Declined&&this.openSeatMap.emit(),this.alertModalDialog=null})}checkInWithChangeSeat(e){const i={initialCheckin:this.initialCheckin,url:this.aemData.selfCheckInUrl,travelerList:this.getCheckedInTravelerDetails(e),scEligibleInfo:this.scEligibleInfo};this.store.dispatch(new V.Np(i))}showInCorrectDialog(e){let i;const n=this.aemLabels.inCorrectSeatAlert?(0,N.g5)(this.aemLabels.inCorrectSeatAlert):"";n&&(e.isTrainValid?this.multiPaxPNR?delete n.buttons.cancel:(e.isTrainValid?e.isCarValid||e.isSeatValid?e.isCarValid?e.isSeatValid||(i=this.aemLabels.wrongSeatMsgText):i=this.aemLabels.wrongCarMsgText:i=this.aemLabels.wrongCarSeatMsgText:i=this.aemLabels.wrongTrainMsgText,i&&(i=i.replace("{{car}}",parseInt(e.assignedCar)+"").replace("{{seat}}",e.assignedSeat),n.message=i)):(i=this.aemLabels.wrongTrainMsgText,i=i.replace("{{train}}",this.scEligibleInfo.trainNumber),n.message=i,delete n.buttons.cancel),this.alertModalDialog=this.modalService.show(m.pS,this.getDialogModalOptions(n)),this.modalService.onHidden.pipe((0,P.s)(1)).subscribe(()=>{this.alertModalDialog.content.dialogResponse===m.yn.Declined?(this.openSeatMap.emit(),this.analyticsService.satelliteCall("selfCheckInSeatChangeYes")):(this.scanCheckInFlag=!1,this.travelersForm.get("travelers.0").get("inputSeatCode").setValue(""),this.checkForContinue(),this.multiPaxPNR||this.analyticsService.satelliteCall("selfCheckInSeatChangeNo")),this.alertModalDialog=null}))}showUncheckedTravelerDialog(){this.aemLabels.unCheckedTravelersAlert?(this.alertModalDialog=this.modalService.show(m.pS,this.getDialogModalOptions(this.aemLabels.unCheckedTravelersAlert)),this.modalService.onHidden.pipe((0,P.s)(1)).subscribe(()=>{this.alertModalDialog.content.dialogResponse===m.yn.Confirmed&&this.doneWithCheckIn.emit({isDone:!0}),this.alertModalDialog=null})):this.doneWithCheckIn.emit({isDone:!0})}showValidateSeatModal(){this.aemLabels.validateSeatAlert&&this.showModalDialog(this.aemLabels.validateSeatAlert)}showModalDialog(e){e&&!this.alertModalDialog&&(this.alertModalDialog=this.modalService.show(m.pS,this.getDialogModalOptions(e)),this.modalService.onHide.pipe((0,P.s)(1)).subscribe(()=>{this.alertModalDialog&&(this.alertModalDialog=null)}))}getSeatInfoFromSeatCode(e){if(e){const i=(e.match(/[a-zA-Z]/)||[]).pop();return i?{seatRowDesignator:i,seatPosDesignator:e.slice(0,e.indexOf(i)),unitNumber:e.slice(e.indexOf(i)+1)}:null}return null}getCheckedInTravelerDetails(e){const i=[];
1return this.travelersForm.value.travelers.forEach(n=>{if(n.checkBoxChecked&&!n.isCheckedIn&&!n.lifted)if(this.initialCheckin){const s=e?null:this.getSeatInfoFromSeatCode(n.inputSeatCode);(s||e)&&(i.push({rbd:n.rbd,assignedCar:e?e.carNumber:n.assignedCar,assignedCol:e?e.seatLabel:n.assignedCol,assignedRow:e?e.rowNumber:n.assignedRow,carUnitNumber:e?e.unitNumber:s.unitNumber,passengerNumber:n.passengerNumber,ticketNumber:n.ticketNumber,isCheckedIn:!1,seatModified:!!e}),e&&(n.seatModified=!0))}else i.push({rbd:n.rbd,assignedCar:n.assignedCar,assignedCol:n.assignedCol,assignedRow:n.assignedRow,passengerNumber:n.passengerNumber,ticketNumber:n.ticketNumber,isCheckedIn:!1,seatModified:!1})}),i}getTrainUnitInfo(){const e={partnerId:this.aemData.partnerID,seatMapRQ:[]};e.seatMapRQ.push({TrainNumber:this.scEligibleInfo.trainNumber,Date:this.scEligibleInfo.travelLegInfo.departureDateOriginal,Destination:this.scEligibleInfo.travelLegInfo.toStation,Origin:this.scEligibleInfo.travelLegInfo.fromStation}),this.store.dispatch(new V.kl({body:e,seatMapApiError:this.aemLabels?.seatMapApiError,url:v.D5.apiEndPtURL.GetSeatMaps}))}updateAnalyticsData(e){let i=0;const n=[];let s=0;const o=this.travelersForm.value;e.forEach(r=>{o.travelers.forEach(l=>{r.success&&l.passengerNumber===r.passengerNum&&(i++,l.seatModified&&s++,n.push(l.isQRScanned?"scan":"mannual"))})}),this.analyticsService.satelliteCall("selfCheckInLoad",{selfCheckInCount:i,selfCheckInMethod:n.join("/"),selfCheckInSeatChangeCount:s})}checkForMobileTablet(){(this.deviceDetectorService.isMobile()||this.deviceDetectorService.isTablet())&&(this.platformDevice={isMobileTablet:!0},"Android"===this.deviceDetectorService.os()?this.platformDevice.appStoreUrl=this.aemLabels.androidAppStoreLink:"iOS"===this.deviceDetectorService.os()&&(this.platformDevice.appStoreUrl=this.aemLabels.iosAppStoreLink))}continueWithDone(){this.platformDevice&&this.platformDevice.isMobileTablet?this.showDownloadAppDialog():this.doneWithCheckIn.emit({isDone:!0})}showDownloadAppDialog(){this.alertModalDialog=this.modalService.show(this.downloadAppDialog,m.KC.getStyleExt(m.Fw.DefaultModal,m.LQ.SM,m.az.RG,m.a$.Centered,"modal-body-top",!0)),this.modalService.onHide.pipe((0,P.s)(1)).subscribe(()=>{this.alertModalDialog&&(this.alertModalDialog=null,this.doneWithCheckIn.emit({isDone:!0}))})}navigateToAppStore(){this.closeDownloadAppDialog(!0),this.platformDevice.appStoreUrl&&window.location.replace(this.platformDevice.appStoreUrl),setTimeout(()=>{window.history.back()},5e3)}closeDownloadAppDialog(e=!1){this.alertModalDialog.hide(),this.alertModalDialog=null,this.doneWithCheckIn.emit({isDone:!0,isDelay:e})}getDialogModalOptions(e){return{...m.KC.getModalConfig(e,m.KC.getStyleExt(m.Fw.DefaultModal,m.LQ.SM,m.az.RG,m.a$.Centered,"seatDialogClass",!1)),keyboard:!1,ignoreBackdropClick:!0}}static{this.\u0275fac=function(i){return new(i||a)(t.rXU(S.ze),t.rXU(O.il),t.rXU(U.I8),t.rXU(H.Kg),t.rXU(X),t.rXU(j.X),t.rXU(W.r),t.rXU(ge.c))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-self-checkin-travelers"]],viewQuery:function(i,n){if(1&i&&t.GBs(Ie,7,t.C4Q)(be,5,t.aKT),2&i){let s;t.mGM(s=t.lsd())&&(n.downloadAppDialog=s.first),t.mGM(s=t.lsd())&&(n.checkBoxAll=s.first)}},inputs:{aemLabels:"aemLabels",aemData:"aemData",aemInputs:"aemInputs",checkedInInfo:"checkedInInfo",travelerInfo:"travelerInfo",scEligibleInfo:"scEligibleInfo",opnSeatPNR:"opnSeatPNR"},outputs:{cameraIconClicked:"cameraIconClicked",doneWithCheckIn:"doneWithCheckIn",openSeatMap:"openSeatMap"},standalone:!1,features:[t.OA$],decls:6,vars:2,consts:[["downloadAppDialog",""],["seatInput",""],[1,"checkin-travelers"],["tabindex","0","id","checkin-travelers-msg1",1,"checkin-travelers-msg","custom-size","pt-4","pb-2"],[3,"formGroup"],[1,"circle-icon",3,"ngClass"],["formArrayName","travelers"],[1,"checkin-travelers-list","custom-size","pt-1","pb-3"],[1,"checkin-travelers-list-item","header","d-flex","mt-3"],[1,"checkin-travelers-list-item-traveler"],[1,"d-md-block","d-none"],[3,"aemLabels","checkedInInfo"],[1,"checkin-travelers-list-item-checkedIn","text-center"],[1,"checkin-travelers-list-item-car","text-center"],[1,"checkin-travelers-list-item-seat","text-center"],[1,"checkin-travelers-list-item","d-flex","align-items-md-center",3,"formGroupName"],[1,"checkin-travelers-list-item","d-flex","align-items-md-center"],[1,"checkin-travelers-list-item-traveler","d-md-flex","align-items-center"],[1,"tw-flex","tw-items-center",3,"id"],[3,"src"],[1,"font-weight-normal","tw-flex","tw-items-center",3,"id"],["formControlName","checkBoxChecked",1,"font-light","mb-0","d-md-flex",3,"id","disabled","ariaLabel"],[1,"checkin-travelers-list-item-traveler-span","d-flex"],["amInputNew","","type","text","formControlName","inputSeatCode","required","","amSpace","",1,"seatCodeInput","pt-sm-2","pt-md-0",3,"amt-auto-test-id"],["amLabelNew",""],[1,"imageSection","d-flex"],[1,"iconClass",3,"src"],[1,"iconClass",3,"click","
1src"],["id","check-all",1,"tw-flex","tw-items-center"],["id","check-all",1,"font-light","mb-0","d-md-flex",3,"checkedChange","checked","ariaLabel"],["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","modalDownloadApp","aria-describedby","modalDownloadAppDesc","aria-hidden","false","cdkTrapFocus","",1,"download-app-dialog"],[1,"modal-header","pt-3","pb-3"],[1,"modal-title","pull-left","w-100","am-subtitle"],["type","button",1,"close",3,"click"],["role","presentation",1,"close-icon",3,"src","alt"],[1,"d-flex","modal-body","py-5"],["alt","app logo",1,"download-app-dialog-logo",3,"src"],[1,"pl-4"],[1,"mb-0"],["role","link",1,"download-app-dialog-link","d-inline-block"],["role","link",1,"download-app-dialog-link","d-inline-block",3,"click"]],template:function(i,n){1&i&&(t.j41(0,"div",2)(1,"div",3),t.nVh(2,we,2,5),t.k0s(),t.nVh(3,$e,17,8,"form",4),t.k0s(),t.DNE(4,Ne,12,10,"ng-template",null,0,t.C5r)),2&i&&(t.R7$(2),t.vxM(n.checkedInStatus?2:-1),t.R7$(),t.vxM(n.travelersForm?3:-1))},dependencies:[L.YU,ve.Xl,Ce.ke,Q.Ir,Q.WB,ke.oF,_e.kB,S.qT,S.me,S.BC,S.cb,S.YS,S.j4,S.JD,S.$R,S.v8,Se.q,z,ye.H],styles:[".checkin-travelers[_ngcontent-%COMP%]{min-height:250px;background:#fff;padding-left:15px;padding-right:15px}.checkin-travelers[_ngcontent-%COMP%] .custom-size[_ngcontent-%COMP%]{max-width:690px;margin-left:auto;margin-right:auto}@media(min-width:992px){.checkin-travelers[_ngcontent-%COMP%] .custom-size[_ngcontent-%COMP%]{max-width:775px}}.checkin-travelers-msg[_ngcontent-%COMP%]{font-size:12px}.checkin-travelers-list[_ngcontent-%COMP%]{padding-left:0}.checkin-travelers-list-item[_ngcontent-%COMP%]{font-size:12px;font-weight:400;min-height:40px}@media(min-width:768px){.checkin-travelers-list-item[_ngcontent-%COMP%]{min-height:55px}}.checkin-travelers-list-item[_ngcontent-%COMP%]:first-child{min-height:40px}.checkin-travelers-list-item.header[_ngcontent-%COMP%]{font-weight:600}@media(min-width:768px){.checkin-travelers-list-item.header[_ngcontent-%COMP%]{font-size:18px}}.checkin-travelers-list-item-traveler[_ngcontent-%COMP%]{flex-grow:4}.checkin-travelers-list-item-traveler-span[_ngcontent-%COMP%]{margin-left:27px}@media(min-width:768px){.checkin-travelers-list-item-traveler-span[_ngcontent-%COMP%]{margin-left:auto}}.checkin-travelers-list-item-traveler-span[_ngcontent-%COMP%] .seatCodeInput[_ngcontent-%COMP%]{opacity:1;color:#737575;font-size:14px;letter-spacing:.3px;line-height:17px;border-top:0;border-left:0;border-right:0;padding-left:0;font-weight:200;padding-top:8px;outline-offset:1px;border-bottom-right-radius:0;border-bottom-left-radius:0}.checkin-travelers-list-item-traveler-span[_ngcontent-%COMP%] .imageSection[_ngcontent-%COMP%]{width:20px}.checkin-travelers-list-item-traveler-span[_ngcontent-%COMP%] .imageSection[_ngcontent-%COMP%] .iconClass[_ngcontent-%COMP%]{width:20px;margin-left:5px}.checkin-travelers-list-item-checkedIn[_ngcontent-%COMP%]{flex-basis:75px}@media(min-width:768px){.checkin-travelers-list-item-checkedIn[_ngcontent-%COMP%]{flex-basis:200px}}.checkin-travelers-list-item-checkedIn[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px}.checkin-travelers-list-item-car[_ngcontent-%COMP%], .checkin-travelers-list-item-seat[_ngcontent-%COMP%]{flex-basis:45px}@media(min-width:768px){.checkin-travelers-list-item-car[_ngcontent-%COMP%], .checkin-travelers-list-item-seat[_ngcontent-%COMP%]{flex-basis:100px}}.download-app-dialog[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{font-weight:600!important}.download-app-dialog[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{width:1.4rem}.download-app-dialog-logo[_ngcontent-%COMP%]{border-radius:13px;width:60px;height:59px}.download-app-dialog-link[_ngcontent-%COMP%]{cursor:pointer;color:#167fa6} .hideCheckbox .am-check-input{visibility:hidden} .hideCheckbox .am-check-label{font-weight:600;cursor:initial} .checkin-travelers-list-item-traveler-span .mat-form-field-infix{width:75px!important}@media(min-width:576px){ .checkin-travelers-list-item-traveler-span .mat-form-field-infix{width:100px!important}} .seatDialogClass .modal-header{padding-top:1rem!important;padding-bottom:1rem!important} .seatDialogClass .dark-close-modal-btn{display:none} .seatDialogClass .light-close-modal-btn{display:inline!important;padding-top:10px;width:1.4rem!important} .seatDialogClass .modal-body{padding-bottom:1.5rem!important}"]})}}return a})();var Ve=c(18545);const je=["seatMapDir"],Ge=a=>({"overlay-opacity":a});function Ue(a,d){1&a&&(t.j41(0,"div",2),t.nrm(1,"am-spinner"),t.k0s())}function We(a,d){if(1&a){const e=t.RV6();t.j41(0,"app-camera",10),t.bIt("turnOffCamera",function(n){C.eBV(e);const s=t.XpG();return C.Njj(s.closeCamera(n))}),t.k0s()}}function He(a,d){if(1&a&&(t.j41(0,"div",8)(1,"div",11)(2,"h3",5),t.EFF(3),t.k0s(),t.j41(4,"div",12),t.nrm(5,"img",13)(6,"div",14),t.nI1(7,"safe"),t.k0s()()()),2&a){const e=t.XpG();t.R7$(3),t.SpI(" ",null==e.aemLabels?null:e.aemLabels.seatCodeLocationText," "),t.R7$(2),t.Y8G("src",t.VkB("",e.env.damAssetPath,"/icons/seat-code.svg"),t.B4B),t.BMQ("alt",null==e.aemLabels?null:e.aemLabels.seatCodeLocationText),t.R7$(),t.Y8G("innerHTML",t.i5U(7,5,e.seatCodeDescription,e.htmlSafeType),t.npT)}}function Xe(a,d){if(1&a&&t.nrm(0,"a",9,0),2&a){const e=t.XpG();t.Y8G("selfCheckInFlow",!0)("checkInTravelLegID",e.checkInTravelLegID)}}let ze=(()=>{class a{constructor(e,i,n,s,o,r,l){this.store=e,this.selfCheckinService=i,this.storageService=n,this.modalService=s,this.footerService=o,this.errorHandlerService=r,this.cameraService=l,this.showCamera=!1,this.unsubscribe=new A.B,this.env=R.c,this.isLoading=!0,this.seatCodeDescription="",this.htmlSafeType=v.D5.SafeTypes.HTML,this.ibsessionStore=e.pipe((0,O.Lt)("ibsession"))}ngOnInit(){this.initAemData(),this.storageService.updateSessionStorage(v.D5.StorageName.CURRENT_PAGE,v.D5.Pages.SELF_CHECKIN),this.footerService.toggleFooter(!0),this.cameraService.mobileTabletWithCamera().then(e=>{this.seatCodeDescription=e?this.aemLabels?.seatCodeLocationDescMobile:this.aemLabels?.seatCodeLocationDesc}),this.ibsessionStore.pipe((0,w.Q)(this.unsubscribe)).subscribe(e=>{this.processForSelfCheckin(e&&e.itinerary&&e.itinerary.trip?e.itinerary.trip:null),this.isLoading=!1,this.footerService.toggleFooter(!1)}),this.store.select(G).pipe((0,w.Q)(this.unsubscribe)).subscribe(e=>{if(this.isLoading=e.loading,e.store.state===v.jE.state.selfCheckInInit)this.footerService.toggleFooter(!0);else if(e.store.state===v.jE.state.selfCheckInSuccess){if(this.isLoading=!1,e.data.length>0){const i=e.data.filter(n=>!n.success);i.length>
10?this.showCheckInErrorByPassengers(i):this.retrieveReservation()}}else e.store.state===v.jE.state.selfCheckInError&&this.footerService.toggleFooter(!1)})}initAemData(){this.aemLabels=(0,M.mH)(this.content,M.rv.LABELS),this.aemData=(0,M.mH)(this.content,M.rv.DATA),this.aemInputs=(0,M.mH)(this.content,M.rv.INPUT)}getOrderRetrievePayload(){return{body:te.k.from(this.scEligibleInfo.pnrNumber,this.scEligibleInfo.primaryPaxLastName),isGlobalError:!1,url:this.aemData&&this.aemData.retriveReservationUrl?this.aemData.retriveReservationUrl:v.D5.apiEndPtURL.RetrieveReservationURL}}processForSelfCheckin(e){if(e){const i=this.getTripSummary(e),n=this.travelerCheckedInfo(e);null!==i&&null!==n?(this.tripSummary=i,this.checkedInInfo=n.checkedInInfo,this.scEligibleInfo=n.scEligibleInfo,this.travelerList=(0,N.g5)(n.travelerInfoList)):window.location.href=v.D5.Routes.Home}else window.location.href=v.D5.Routes.Home}retrieveReservation(){this.isLoading=!0;const e=this.getOrderRetrievePayload();this.store.dispatch(new ie.iH(e))}showCheckInErrorByPassengers(e){if(this.travelerList.length>1){const i=(0,N.g5)(this.aemLabels.checkedInTravelersAlert),n=[];e.forEach(s=>{const o=s.errors?s.errors[0].errorCode:"";(o===v.D5.SelfCheckIn.Code.alreadyCheckedIn||o===v.D5.SelfCheckIn.Code.ticketLifted)&&this.travelerList.forEach(r=>{s.passengerNum===r.passengerNumber&&n.push(r.firstName+", "+r.lastName)})}),i.message=n.length>0?i.message.replace("{{travelers}}",n.join(";")):e[0].errors?e[0].errors[0].businessMessage:"",this.showModalDialog(i),this.retrieveReservation()}else{this.errorHandlerService.setErrorMessage(e[0].errors?e[0].errors[0].businessMessage:"");const i=e[0].errors?e[0].errors[0].errorCode:"";!i||i!==v.D5.SelfCheckIn.Code.alreadyCheckedIn&&i!==v.D5.SelfCheckIn.Code.ticketLifted?this.footerService.toggleFooter(!1):this.retrieveReservation()}}showModalDialog(e){this.alertModalDialog=this.modalService.show(m.pS,m.KC.getModalConfig(e,m.KC.getStyleExt(m.Fw.DefaultModal,m.LQ.SM,m.az.RG,m.a$.Centered,"alertDialogClass",!1)))}getTripSummary(e){try{const i=e.journeys.journeyLegs[0];return{journeyLegInfo:{fromStation:i.fromStation.stationShortName,toStation:i.toStation.stationShortName,departureDateDisplay:this.formatedDate(i.fromStation.scheduleTime),arrivalDateDisplay:this.formatedDate(i.toStation.scheduleTime)},trainInfo:{number:i.travelLegs[0].travelService.trainNo,name:i.travelLegs[0].travelService.trainName}}}catch{return null}}formatedDate(e){const i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];try{const s=new Date(e);return i[s.getDay()]+", "+n[s.getMonth()]+" "+s.getDate()}catch{return""}}travelerCheckedInfo(e){const i=this.selfCheckinService.getSelfCheckInEligibility(e);if(i.checkInEligible){const n=this.selfCheckinService.getSelfCheckInEligibilityInfo(e,i.checkInJLIndex,i.checkInTLIndex);let s=this.selfCheckinService.getTravelersInfo(e,i.checkInJLIndex,i.checkInTLIndex);s=s.sort((o,r)=>parseInt(o.passengerNumber)-parseInt(r.passengerNumber));try{let r=!1,l=!1,h=0,f=0;return e.passengers.forEach(u=>{u.isPWD?r=!0:l=!0;for(let p=0;p<s.length;p++)if(u.passengerNumber===s[p].passengerNumber){s[p].firstName=u.passengerInfo.name.firstName,s[p].lastName=u.passengerInfo.name.lastName;for(let g=0;g<u.tickets.length;g++)if(u.tickets[g].travelService.trainNo===n.trainNumber){s[p].ticketNumber=u.tickets[g].ticketNumber,s[p].lifted=!!u.tickets[g].lifted&&u.tickets[g].lifted;break}(s[p].isCheckedIn||s[p].lifted)&&(u.isPWD?f++:h++);break}}),this.checkInTravelLegID=i.checkInTLId,{checkedInInfo:{pwdPaxExist:r,regularPaxExist:l,pwdPaxCheckedCount:f,regularPaxCheckedCount:h},scEligibleInfo:n,travelerInfoList:s}}catch{return null}}else window.location.href=v.D5.Routes.Home}launchCamera(e){this.cameraRequestedByTraveler=e,this.showCamera=!0,this.footerService.toggleFooter(!0)}closeCamera(e){if(e){const i=this.selfCheckinService.validateQRCode(e);i.isValid?this.cameraRequestedByTraveler.patchValue({inputSeatCode:i.seatCode,isQRScanned:!0}):this.aemLabels.inValidQRCodeAlert&&this.showModalDialog(this.aemLabels.inValidQRCodeAlert)}this.showCamera=!1,this.footerService.toggleFooter(!1)}doneWithCheckIn(e){e.isDone&&(this.isLoading=!0,this.footerService.toggleFooter(!0),this.storageService.updateSessionStorage(v.D5.StorageName.SELF_CHECKIN,!0),e.isDelay||window.history.back())}openSeatMap(){this.seatMapDir.nativeElement.click()}ngOnDestroy(){this.unsubscribe.next(!0),this.unsubscribe.unsubscribe()}static{this.\u0275fac=function(i){return new(i||a)(t.rXU(O.il),t.rXU(j.X),t.rXU(q.x),t.rXU(U.I8),t.rXU(W.r),t.rXU(ee.c),t.rXU(X))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["self-checkin"]],viewQuery:function(i,n){if(1&i&&t.GBs(je,5),2&i){let s;t.mGM(s=t.lsd())&&(n.seatMapDir=s.first)}},inputs:{content:"content"},standalone:!1,decls:12,vars:18,consts:[["seatMapDir",""],[1,"self-checkin-container"],[1,"overlay-loader"],[3,"ngClass"],[1,"container","d-md-none","bg-white","checkin-header"],[1,"pt-4","pb-3","font-weight-normal"],[3,"aemLabels","tripSummary","checkedInInfo"],[3,"cameraIconClicked","doneWithCheckIn","openSeatMap","aemLabels","aemData","aemInputs","checkedInInfo","travelerInfo","scEligibleInfo"],[1,"custom-size","bg-white","pt-4","pb-4"],["app-seat-map","",1,"d-none",3,"selfCheckInFlow","checkInTravelLegID"],[3,"turnOffCamera"],[1,"seat-code-location"],[1,"d-flex"],[3,"src"],[1,"seat-code-location-desc",3,"innerHTML"]],template:function(i,n){1&i&&(t.j41(0,"div",1),t.nVh(1,Ue,2,0,"div",2),t.j41(2,"div",3),t.nVh(3,We,1,0,"app-camera"),t.j41(4,"div",3)(5,"div",4)(6,"h3",5),t.EFF(7),t.k0s()(),t.nrm(8,"app-self-checkin-summary",6),t.j41(9,"app-self-checkin-travelers",7),t.bIt("cameraIconClicked",function(o){return n.launchCamera(o)})("doneWithCheckIn",function(o){return n.doneWithCheckIn(o)})("openSeatMap",function(){return n.openSeatMap()}),t.k0s(),t.nVh(10,He,8,8,"div",8),t.k0s()(),t.nVh(11,Xe,2,2,"a",9),t.k0s()),2&i&&(t.R7$(),t.vxM(n.isLoading?1:-1),t.R7$(),t.Y8G("ngClass",t.eq3(16,Ge,n.isLoading)),t.R7$(),t.vxM(n.showCamera?3:-1),t.R7$(),t.Y8G("ngClass",n.showCamera?"d-none":"d-block"),t.R7$(3),t.JRh(null==n.aemLabels?null:n.aemLabels.checkInText),t.R7$(),t.Y8G("aemLabels",n.aemLabels)("tripSummary",n.tripSummary)("checkedInInfo",n.checkedInInfo),t.R7$(),t.Y8G("aemLabels",n.aemLabels)("aemData",n.aemData)("aemInputs",n.aemInputs)("checkedInInfo",n.checkedInInfo)("travelerInfo",n.travelerList)("scEligibleInfo",n.scEligibleInfo),t.R7$(),t.vxM(n.checkedInInfo&&n.checkedInInfo.regularPaxCheckedCount+n.checkedInInfo.pwdPaxCheckedCount===0?10:-1),t.R7$(),t.vxM(1===n.travelerList.length?11:-1))},dependencies:[L.YU,m.tI,ae,se.x,pe,Be,Ve.m],styles:[".checkin-header[_ngcontent-%COMP%]{background-color:#fff;color:#002648}.checkin-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:22px}.custom-size[_ngcontent-%COMP%]{padding-left:15px;padding-right:15px}.custom-size[_ngcontent-%COMP%] .seat-code-location[_ngcontent-%COMP%]{max-width:690px;margin-left:auto;margin-right:auto}@media(min-width:992px){.custom-size[_ngcontent-%COMP%] .seat-code-location[_ngcontent-%COMP%]{max-width:775px}}.custom-size[_ngcontent-%COMP%] .seat-code-location[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:13px}@media(min-width:768px){.custom-size[_ngcontent-%COMP%] .seat-code-location[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:14px}}.custom-size[_ngcontent-%COMP%] .seat-code-location[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:160px;height:160px;margin-right:10px}.custom-size[_ngcontent-%COMP%] .seat-code-location-desc[_ngcontent-%COMP%]{font-size:10px;line-height:12px}@media(min-width:768px){.custom-size[_ngcontent-%COMP%] .seat-code-location-desc[_ngcontent-%COMP%]{font-size:12px}} .alertDialogClass .modal-header{padding-top:1rem!important;padding-bottom:1rem!important} .alertDialogClass .dark-close-modal-btn{display:none} .alertDialogClass .light-close-modal-btn{display:inline!important;padding-top:10px;width:1.5rem!important} .alertDialogClass .modal-body{padding-bottom:1.5rem!important}"]})}}return a})(),Qe=(()=>{class a{constructor(){this.customElementComponent=ze}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275mod=t.$C({type:a})}static{this.\u0275inj=C.G2t({imports:[L.MD,Z.G]})}}return 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.