1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1419],{1419:function(e,o,i){i.r(o);var n=i(52322),l=i(2784),t=i(61166),r=i(8204),d=i(33927),a=i(62197),s=i(35322),v=i(5202),u=i(80743),c=i(9586),p=i(10521),h=i(6923),m=i(29743),f=i(81360),w=i(19920),g=i(5152),x=i.n(g),y=i(77205),b=i(43390),j=i(24700),S=i(11163),O=i(3507),R=i(7777);let L=x()(()=>Promise.all([i.e(70364),i.e(60769),i.e(70715),i.e(41075),i.e(14249),i.e(59875),i.e(23434),i.e(59848)]).then(i.bind(i,59848)),{loadableGenerated:{webpack:()=>[59848]}});o.default=(0,t.Pi)(e=>{var o,t,g,x,C,N,A,E,I,P,T,D,k,_,G,Z,H,M;let{title:F,subtitle:B}=e||{},J=(0,l.useRef)(null),U=(0,S.useRouter)(),q=(0,f.Z)(),V=(0,m.O)(),W=(0,y.P)(),K=(0,l.useContext)(c.z1),Y=(0,l.useContext)(p.v),{guestFormDetails:z}=(null==K?void 0:K.getPageStore(null===v.o||void 0===v.o?void 0:v.o.bookingFlowStore))||{},{cartDetails:Q,orderDetails:X,initiatePaymentSDK:$,terminatePaymentSDK:ee,setInitiatePaymentSDK:eo,setTerminatePaymentSDK:ei,countryCurrencyCode:en,allowToDoPayment:el,hotelAvailabilityPayload:et}=(null==Y?void 0:Y.getGlobalStore(null===v.GLOBAL_STORES||void 0===v.GLOBAL_STORES?void 0:v.GLOBAL_STORES.bookingFlowStore))||{},{items:er}=(null==Q?void 0:Q.cartDetailsResponse)||{},ed=null==X?void 0:null===(o=X.orderDetailsResponse)||void 0===o?void 0:o.orderId,ea=en||(null==er?void 0:null===(N=er[0])||void 0===N?void 0:null===(C=N.hotel)||void 0===C?void 0:null===(x=C[0])||void 0===x?void 0:null===(g=x.room)||void 0===g?void 0:null===(t=g[0])||void 0===t?void 0:t.currency),es="".concat(null===(I=i.g)||void 0===I?void 0:null===(E=I.window)||void 0===E?void 0:null===(A=E.location)||void 0===A?void 0:A.origin).concat(null===b.Z6||void 0===b.Z6?void 0:null===(P=b.Z6.BOOKING)||void 0===P?void 0:P.CONFIRMED_PAGE),ev=(null==ea?void 0:ea.toUpperCase())==="INR",[eu,ec]=(0,l.useState)(),ep=new Headers;ep.append("Content-Type","application/json"),ep.append("tenant","".concat("seleqtions")),ep.append("customerhash",(0,O.fH)()?(0,O.fH)():(0,j.O4)());let eh=(null==X?void 0:null===(G=X.orderDetailsResponse)||void 0===G?void 0:null===(_=G.orderLineItems)||void 0===_?void 0:null===(k=_[0])||void 0===k?void 0:null===(D=k.hotel)||void 0===D?void 0:null===(T=D.voucherRedemption)||void 0===T?void 0:T.type)||"";((null==et?void 0:null===(Z=et.memberTier)||void 0===Z?void 0:Z.toLowerCase())!=="hsbc"||(null==et?void 0:et.isOfferLandingPage)||""!==eh)&&((null==et?void 0:null===(H=et.memberTier)||void 0===H?void 0:H.toLowerCase())!=="hsbc"||(null==eh?void 0:eh.toLowerCase())!=="hsbc")?(null==U?void 0:null===(M=U.query)||void 0===M?void 0:M.isBinLockingRequired)?ep.append("offer-type","2"):ep.append("offer-type","1"):ep.append("offer-type","0");let em=()=>{if(null==J?void 0:J.current){var e;null==J||null===(e=J.current)||void 0===e||e.scrollIntoView({block:"center",inline:"start",behavior:"smooth"})}};function ef(e){try{if(e){let o=("string"==typeof e?JSON.parse(e):e).event;"initiate_result"==o||"process_result"==o||"user_event"==o||console.log("Unhandled event",o," Event data",e)}else console.log("No data received in event",e)}catch(e){console.log("Error in hyperSDK response",e)}}return(0,l.useEffect)(()=>{i.g.window.HyperServices&&ec(new i.g.window.HyperServices)},[]),(0,l.useEffect)(()=>{var e,o,i,n;async function l(){let e={method:"POST",headers:ep,body:JSON.stringify({customerHash:(0,O.fH)()||(0,j.O4)(),mobileNo:null==z?void 0:z.phoneNumber,emailAddress:null==z?void 0:z.email,isLogin:W}),redirect:"follow"},o={method:"POST",headers:ep,body:JSON.stringify({orderId:ed,returnUrl:es,isLogin:W,journeyType:"PAY LATER"}),redirect:"follow"};fetch("".concat("https://api-cug1-825v2.tajhotels.com/paymentService/v1/juspay/","initiate-sdk"),e).then(e=>e.text()).then(async e=>{await (null==eu?void 0:eu.initiate(JSON.parse(e),ef)),await fetch("".concat("https://api-cug1-825v2.tajhotels.com/paymentService/v1/juspay/","fetch-order"),o).then(e=>e.text()).then(e=>{eu.process(JSON.parse(e))}).catch(e=>console.log("error",e))}).catch(e=>{console.log("error",e)})}ev&&$&&(null==eu?void 0:eu.initiateTriggered)===!1&&(null==X?void 0:null===(e=X.orderDetailsResponse)||void 0===e?void 0:e.orderId)&&(null==Q?void 0:null===(o=Q.cartDetailsResponse)||void 0===o?void 0:o.payableAmount)!==0&&l(),$&&(null==X?void 0:null===(i=X.orderDetailsResponse)||void 0===i?void 0:i.orderId)&&(null==Q?void 0:null===(n=Q.cartDetailsResponse)||void 0===n?void 0:n.payableAmount)===0&&(null==U||U.push(es))},[null==eu?void 0:eu.initiateTriggered,null==X?void 0:X.orderDetailsResponse,$]),(0,l.useEffect)(()=>{ee&&(eu&&(null==eu||eu.terminate()),ei(!1))},[ee]),(0,n.jsx)(h.FO,{"aria-label":"PaymentDetailsCCA",children:(0,n.jsxs)(h.Fc,{disableGutters:!0,expanded:$,onChange:()=>{el&&($?(eu&&(null==eu||eu.terminate()),eo(!1)):(eo(!0),em()))},children:[(0,n.jsx)(h.iP,{sx:{"& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"none"}},expandIcon:$?(0,n.jsx)(h.hW,{component:"img",src:q(w.MP),alt:w.MP}):(0,n.jsx)(r.Z,{variant:"dark-contained",children:"PAY LATER"}),children:(0,n.jsxs)(d.Z,{sx:{flexDirection:V?"column":"row",gap:V?"2.5vw":"15vw"},children:[(0,n.jsx)(u.Zt,{gap:V?"2.344vw":"0.781vw",children:(0,n.jsxs)(u.Zt,{children:[(0,n.jsx)(u.QL,{variant:"b-32",children:F}
1),(0,n.jsx)(a.Z,{variant:"b-20",marginTop:"0.521vw",children:B})]})}),(null==ea?void 0:ea.toUpperCase())==="INR"&&(0,n.jsx)(u.Hs,{width:V?"100% !important":"initial",columnGap:"1.667vw",justifyContent:V?"space-between !important":"initial",children:(0,n.jsxs)(u.sN,{sx:{width:V?"auto !important":"initial",columnGap:V?"2vw":"1vw"},children:[(0,n.jsx)(u.Mw,{variant:"b-18",fontWeight:"700",lineHeight:"0.729vw",children:"Order Amount"}),(0,n.jsx)(u.Vl,{variant:"b-20",whiteSpace:"nowrap",children:(0,R.Mc)(1,ea)})]})})]})}),(0,n.jsx)(s.Z,{sx:{p:0},children:(null==ea?void 0:ea.toUpperCase())==="INR"?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{id:"merchantViewId"})}):(0,n.jsx)(L,{})})]})})})}}]);
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.