1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[96274],{6:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(43615)},12034:(e,r,s)=>{s.d(r,{J:()=>t});let t=e=>{if(!e)return{};let{id:r,createdAt:s,transferType:t,description:a,withdrawnAmount:i,status:n}=e;return{withdrawalRequestId:r,withdrawalRequestDate:s,withdrawalTransferType:t,withdrawalDescription:a,withdrawalAmount:i,withdrawalStatus:n}}},15758:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(445468)},15892:(e,r,s)=>{s.d(r,{A:()=>j});var t=s(695155),a=s(74464),i=s(981980),n=s(268030),o=s(721931),l=s(140253),d=s(436762),c=s(406098),u=s(212115),h=s(422544),m=s(202543),p=s(340335);let b=(0,i.I4)("label",{base:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"3rem",border:"1px solid {colors.sbds-color-black}",borderRadius:"1.5rem",fontWeight:"bold",fontSize:"sbds-font-size-5",lineHeight:"line-height-4",cursor:"pointer",backgroundColor:"sbds-color-white",color:"sbds-color-black","&:hover":{backgroundColor:"sbds-color-white",opacity:"opacity-7"}}}),g=(0,i.I4)("div",{base:{position:"relative",display:"flex",flexDirection:"column",gap:"sbds-dimension-space-size-m",marginTop:"sbds-dimension-space-size-s"}}),A=(0,i.I4)("div",{base:{display:"flex",gap:"sbds-dimension-space-size-m",alignItems:"center",padding:"sbds-dimension-space-size-m",border:"1px solid {colors.sbds-color-gray-40}",borderRadius:"sbds-dimension-border-radius-s"}}),x=(0,i.I4)("img",{base:{objectFit:"cover",width:"60px",height:"60px",cursor:"pointer"}}),f=(0,i.I4)("img",{base:{margin:"sbds-dimension-space-size-m"}}),v=(0,i.I4)("span",{base:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}),S=["image/jpeg","image/png","application/pdf"],I=e=>{let{name:r,title:s,description:I,isMultiple:j=!1}=e,T=(0,m.t)(),[y,R]=(0,u.useState)(!1),[E,_]=(0,u.useState)(!1),[k,C]=(0,u.useState)(void 0),{control:D,setValue:O,watch:w,formState:{errors:N},setError:z,clearErrors:P}=(0,h.xW)(),L=w(r),B=(0,u.useMemo)(()=>(null==L?void 0:L.length)?(null!=L?L:[]).map(e=>({type:e.type,imageUrl:URL.createObjectURL(e),name:e.name})):[],[L]),F={isFileEmpty:e=>{if(e.some(e=>0===e.size))return T("This file appears to be empty. Please upload a different file.")},isFileSizeOverLimit:e=>{if(e.some(e=>e.size/1048576>5))return T("File size too big. Please upload another image under {size} MB.",{size:5})},isFileSupported:e=>{if(e.some(e=>!S.includes(e.type)))return T("File type not supported. Please upload files in JPEG, PNG or PDF format.")},isExceedMaxFiles:e=>{if(e.length>3)return T("Maximum {maxFiles} files allowed",{maxFiles:3})}},M=async e=>{try{if((await Promise.all(e.map(e=>e.arrayBuffer()))).some(e=>0===e.byteLength))return T("This file appears to be empty. Please upload a different file.")}catch(e){return T("We couldn't read this file. Please try uploading it again.")}};return(0,t.jsxs)(i.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(p.pi,{children:s}),B.length>0?(0,t.jsx)(g,{children:B.map((e,s)=>(0,t.jsxs)(A,{children:[(0,t.jsx)(c.A,{variant:"plain",iconOnly:a.FB,onClick:()=>{O(r,Array.from(L).filter((e,r)=>r!==s))}}),"application/pdf"!==e.type&&(0,t.jsx)(x,{src:e.imageUrl,onClick:()=>{C(e.imageUrl),R(!0)}}),(0,t.jsx)(v,{children:e.name})]},s))}):(0,t.jsxs)(b,{children:[(0,t.jsx)(a._O,{size:"sm"}),(0,t.jsx)("span",{children:E?T("Checking file..."):T("choose a file to upload")}),(0,t.jsx)(h.xI,{control:D,name:r,rules:{required:T("This is a required field")},render:e=>{let{field:{onChange:r,name:s,ref:a}}=e,i=async e=>{var t,a;let i=Array.from(null!=(a=null==e||null==(t=e.target)?void 0:t.files)?a:[]);if(!i.length)return;let n=F.isFileEmpty(i)||F.isFileSizeOverLimit(i)||F.isFileSupported(i)||F.isExceedMaxFiles(i);if(n)return void z(s,{message:n});_(!0);let o=await M(i);if(_(!1),o)return void z(s,{message:o});P(s),r(i),O(s,i)};return(0,t.jsx)("input",{type:"file",multiple:j,disabled:E,className:(0,n.AH)({display:"none"}),accept:S.join(","),onChange:i,name:s,ref:a})}})]}),(0,t.jsx)(l.K,{errors:N,name:r,render:e=>{let{message:r}=e;return(0,t.jsx)(o.A,{message:r})}}),I&&(0,t.jsx)(p.JW,{children:I}),(0,t.jsx)(d.A,{open:y,onClose:()=>{C(void 0),R(!1)},"aria-labelledby":"preview-dialog",children:(0,t.jsx)(f,{src:k})})]})};I.displayName="MultiUploadController";let j=I},18392:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(673276)},19471:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(765363)},20239:(e,r,s)=>{s.d(r,{A:()=>T});var t=s(695155),a=s(212115),i=s(460147),n=s(981980),o=s(268030),l=s(223757),d=s(393091),c=s(341590),u=s(312415),h=s(406098),m=s(74464),p=s(920282),b=s(202543),g=s(422544),A=s(340335),x=s(808694),f=s(81725),v=s(398122),S=s(72
11931),I=s(140253);let j=s(234965).V.map(e=>({label:e,value:e})),T=e=>{let r,{onSetStep:s,isSubmitErrorSnackbarOpen:T,setSubmitErrorSnackbarOpen:y,submitErrorSnackbarMessage:R,isSubmittingForm:E}=e,_=(0,b.t)(),{control:k,formState:{errors:C},setValue:D,getFieldState:O}=(0,g.xW)(),{fields:w,append:N,remove:z}=(0,g.jz)({control:k,name:"cashbackItems"}),P=(0,v.T)(),[L,B]=(0,a.useState)(null),[F,M]=(0,a.useState)((r=P.currency,j.find(e=>{let{value:s}=e;return s===(r||"SGD")})));return(0,a.useEffect)(()=>{w.forEach((e,r)=>{D("cashbackItems[".concat(r,"].currency"),F)})},[w,F,D]),(0,t.jsxs)(n.BJ,{gap:"sbds-dimension-space-size-xl",children:[(0,t.jsx)(c.A,{name:"transactionScreenshots",title:_("Transaction screenshots"),description:_("Make sure your order details are clear and fully visible. You can upload up to 3 images (max 5MB each)."),isMultiple:!0}),(0,t.jsxs)(n.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(A.pi,{children:_("Cashback details")}),(0,t.jsx)(n.BJ,{gap:"sbds-dimension-space-size-l",my:"sbds-dimension-space-size-s",children:w.map((e,r)=>(0,t.jsx)(u.A,{title:"".concat(_("Item")," ").concat(r+1),controllerNames:{cashbackTierName:"cashbackItems[".concat(r,"].cashbackTier"),currencyName:"cashbackItems[".concat(r,"].currency"),amountName:"cashbackItems[".concat(r,"].amount")},currencyOptions:j,currency:F,onSelectCurrency:M,isFirstItem:0===r,onClickRemove:()=>B(r)},e.id))}),w.length<10&&(0,t.jsxs)(h.A,{className:(0,o.AH)({border:"1px solid {colors.sbds-color-black}"}),size:"lg",fullWidth:!0,variant:"plain",onClick:()=>{N({cashbackTier:void 0,amount:void 0,currency:void 0})},children:[(0,t.jsx)(m.ZG,{size:"sm"}),(0,t.jsx)(A.R8,{children:_("Add item")})]})]}),(0,t.jsxs)(n.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(A.pi,{children:_("Promo code (optional)")}),(0,t.jsx)(d.A,{name:"voucherCode",control:k,placeholder:_("Enter any Promo code you've used")})]}),(0,t.jsxs)(n.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(A.pi,{children:_("Additional info (optional)")}),(0,t.jsx)(d.A,{name:"additionalInfo",control:k,placeholder:_("Share any extra details that may help speed up the investigation"),minRows:3,multiline:!0})]}),(0,t.jsxs)(n.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsxs)(n.so,{align:"start",gap:"sbds-dimension-size-1",children:[(0,t.jsx)(g.xI,{control:k,name:"userDeclaration",rules:{required:_("You must check this box to continue.")},render:e=>{let{field:{onChange:r,value:s,...a}}=e;return(0,t.jsx)(i.A,{className:(0,o.AH)({padding:0,color:O("userDeclaration").error?"{colors.sbds-color-red-50}":"inherit"}),...a,checked:!!s,onChange:e=>{r(e.target.checked)}})}}),(0,t.jsx)(l.A,{variant:"paragraph-2",children:_("I confirm my details are accurate and understand submitting false details could lead to a permanent ban.")})]}),(0,t.jsx)(n.az,{mt:1,ml:4,children:(0,t.jsx)(I.K,{errors:C,name:"userDeclaration",render:e=>{let{message:r}=e;return(0,t.jsx)(S.A,{message:r})}})})]}),(0,t.jsxs)(n.az,{pb:18,style:{position:"relative"},children:[(0,t.jsx)(x.A,{open:T,handleClose:()=>y(!1),message:R}),(0,t.jsxs)(n.xA,{columns:2,gap:"sbds-dimension-space-size-m",children:[(0,t.jsx)(n.Ei,{colSpan:1,children:(0,t.jsx)(h.A,{className:(0,o.AH)({border:"1px solid {colors.sbds-color-black}"}),size:"lg",fullWidth:!0,variant:"plain",disabled:E,onClick:()=>s(p.Lu.SHOPPING_TRIP_DETAIL),children:_("Back")})}),(0,t.jsx)(n.Ei,{colSpan:1,children:(0,t.jsx)(h.A,{size:"lg",type:"submit",fullWidth:!0,isLoading:E,disabled:E||C&&Object.keys(C).length>0,children:_("Submit")})})]})]}),null!==L&&(0,t.jsx)(f.A,{onConfirm:()=>{z(L),B(null)},onCancel:()=>{B(null)}})]})}},40725:(e,r,s)=>{s.d(r,{A:()=>v,m:()=>f});var t=s(695155),a=s(212115),i=s(422544),n=s(653455),o=s(981980),l=s(202543),d=s(880916),c=s(837143),u=s(804169),h=s(612641),m=s(767248),p=s(340335),b=s(398122),g=s(257849),A=s(851525),x=s(341590);let f={selectStore:0,inputOrderId:1},v=e=>{var r,s,v;let{onSetStep:S,setResult:I,defaultData:j}=e,[T,y]=(0,a.useState)(f.selectStore),R=(0,l.t)(),E=(0,b.T)(),_=null!=(s=null==j||null==(r=j.merchant)?void 0:r.id)?s:null,k=null!=(v=null==j?void 0:j.id)?v:null,C=E.SHOW_GAMING_MERCHANT_MCB_NOT_SUPPORT_HINT,D=(0,i.FH)({name:"purchaseDate"}),{data:O}=(0,n.I)({queryKey:["api/support/tickets/missing-cashback/shipping-rebate-status",{shoppingTripId:null==D?void 0:D.value}],enabled:!!(null==D?void 0:D.value),throwOnError:!1});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.pi,{children:R("Shopping details")}),(0,t.jsx)(d.A,{defaultStoreId:_,setCurrentProgress:y}),C&&(0,t.jsx)(p.JW,{children:R("Reporting of Missing Cashback for ShopBack Play is not supported in this form. Please report directly through ShopBack Play > My game >
1 Support. Thank you for your understanding.")}),T===f.inputOrderId&&(0,t.jsxs)("div",{children:[(0,t.jsx)(c.A,{defaultShoppingTripId:k}),(0,t.jsx)(u.A,{}),(null==O?void 0:O.shippingRebateStatus)===A.YU.APPLIED&&(0,t.jsx)(g.A,{title:R("Shipping rebate applied \uD83D\uDE9A"),description:R("We noticed youâve applied a shipping rebate for this transaction. Once you submit, weâll process it with your missing Cashback request."),style:"primary",type:"info"}),(0,t.jsx)(x.A,{name:"transactionScreenshots",title:R("Transaction screenshots"),description:R("Make sure your order details are clear and fully visible. You can upload up to 3 images (max 5MB each)."),isMultiple:!0}),(0,t.jsx)(h.A,{})]}),(0,t.jsx)(o.az,{my:"sbds-dimension-space-size-l",children:(0,t.jsx)(m.A,{currentProgress:T,setCurrentProgress:y,setResult:I,onSetStep:S})})]})}},41619:(e,r,s)=>{s.d(r,{A:()=>t});let t={src:"/__sbcdn/_next/static/media/mcbFormIllustration.665f1e8d.png",height:320,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAUVBMVEWIiIgFBQaJlLc7P02aoa5ubm6/zfMFBQYBAgKttci3wOUqODq4vMfbcloAAAC9y+wmGBGoLx+Nlp0ADiqZhoEiJiZqaWnkt60AAAC+0f/ce2QpxVodAAAAGHRSTlMBvLL8SVhYoof99szYyc+3SKJwEs53pYdY1GGBAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAMklEQVR4nGNgYGBg4xcVZmBgYGAVYxARBDFYeFh4pQQYODiYJLnEudkZGCWYOTmF+NgBHYQBfGxTR+sAAAAASUVORK5CYII=",blurWidth:8,blurHeight:5}},43615:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(695155),a=s(515239),i=s(223757),n=s(202543),o=s(981980),l=s(598075),d=s(41619),c=s(479824);let u=e=>{let{error:r}=e,s=(0,n.t)();return(0,c.A)(r)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.pi,{children:s("Youâre all set!")}),(0,t.jsx)(o.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(i.A,{variant:"paragraph-3",children:s("We will notify you of the outcome via email as soon as we can.")})}),(0,t.jsx)(o.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(o.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(a.default,{width:260,height:260,src:d.A,alt:"Dispute Rejection Illustration"})})})]}):(()=>{let{message:e}=(null==r?void 0:r.info)||{};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.pi,{children:s("Thank you for reaching out to us.")}),(0,t.jsx)(o.az,{mt:"sbds-dimension-space-size-m",children:e&&(0,t.jsx)(i.A,{variant:"paragraph-3",children:"Submission failed. (Error message: ".concat(e,")")})}),(0,t.jsx)(o.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(o.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(a.default,{width:260,height:260,src:d.A,alt:"Dispute Rejection Illustration"})})})]})})()}},47270:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(118143)},81725:(e,r,s)=>{s.d(r,{A:()=>c});var t=s(695155),a=s(981980),i=s(268030),n=s(436762),o=s(508296),l=s(406098),d=s(202543);let c=e=>{let{onConfirm:r,onCancel:s}=e,c=(0,d.t)();return(0,t.jsx)(n.A,{open:!0,hideCloseButton:!0,children:(0,t.jsxs)(a.BJ,{gap:"sbds-dimension-size-3",alignItems:"center",children:[(0,t.jsx)(o.A,{weight:"bold",children:c("Remove this item?")}),(0,t.jsx)(o.A,{align:"center",children:c("If you remove this item, all the information youâve added will be lost. This canât be undone.")}),(0,t.jsxs)(a.xA,{columns:2,gap:"sbds-dimension-space-size-m",mt:12,children:[(0,t.jsx)(a.Ei,{colSpan:1,children:(0,t.jsx)(l.A,{className:(0,i.AH)({border:"1px solid {colors.sbds-color-black}"}),size:"lg",fullWidth:!0,variant:"plain",onClick:s,children:c("Cancel")})}),(0,t.jsx)(a.Ei,{colSpan:1,children:(0,t.jsx)(l.A,{size:"lg",variant:"dark",fullWidth:!0,onClick:r,children:c("Remove")})})]})]})})}},105878:(e,r,s)=>{s.d(r,{GZ:()=>t});let t={SELECT_ACTION:0,INPUT_REASON:1,RESULT:2}},113919:(e,r,s)=>{s.d(r,{A:()=>f});var t=s(695155),a=s(212115),i=s(422544),n=s(653455),o=s(981980),l=s(202543),d=s(880916),c=s(837143),u=s(804169),h=s(612641),m=s(483236),p=s(340335),b=s(398122),g=s(257849),A=s(851525);let x={selectStore:0,inputOrderId:1},f=e=>{var r,s,f;let{onSetStep:v,setResult:S,defaultData:I}=e,[j,T]=(0,a.useState)(x.selectStore),y=(0,l.t)(),R=(0,b.T)(),E=null!=(s=null==I||null==(r=I.merchant)?void 0:r.id)?s:null,_=null!=(f=null==I?void 0:I.id)?f:null,k=R.SHOW_GAMING_MERCHANT_MCB_NOT_SUPPORT_HINT,C=(0,i.FH)({name:"purchaseDate"}),{data:D}=(0,n.I)({queryKey:["api/support/tickets/missing-cashback/shipping-rebate-status",{shoppingTripId:null==C?void 0:C.value}],enabled:!!(null==C?void 0:C.value),throwOnError:!1});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.pi,{children:y("Shopping details")}),(0,t.jsx)(d.A,{defaultStoreId:E,setCurrentProgress:T}),k&&(0,t.jsx)(p.JW,{children:y("Reporting of Missing Cashback for ShopBack Play is not supported in this form. Please report directly through ShopBack Play > My game >
1 Support. Thank you for your understanding.")}),j===x.inputOrderId&&(0,t.jsxs)("div",{children:[(0,t.jsx)(c.A,{defaultShoppingTripId:_}),(0,t.jsx)(u.A,{}),(null==D?void 0:D.shippingRebateStatus)===A.YU.APPLIED&&(0,t.jsx)(g.A,{title:y("Shipping rebate applied \uD83D\uDE9A"),description:y("We noticed youâve applied a shipping rebate for this transaction. Once you submit, weâll process it with your missing Cashback request."),style:"primary",type:"info"}),(0,t.jsx)(h.A,{})]}),(0,t.jsx)(o.az,{my:"sbds-dimension-space-size-l",children:(0,t.jsx)(m.A,{currentProgress:j,setCurrentProgress:T,setResult:S,onSetStep:v})})]})}},118143:(e,r,s)=>{s.d(r,{A:()=>b});var t=s(695155),a=s(212115),i=s(515239),n=s(406098),o=s(579856),l=s(527826),d=s(202543),c=s(981980),u=s(808220);let h=(0,c.I4)("div",{base:{fontSize:"sbds-font-size-5",fontWeight:"bold",lineHeight:"1.22",letterSpacing:"normal"}}),m=(0,c.I4)("div",{base:{fontSize:"sbds-font-size-4",lineHeight:"1.29",letterSpacing:"normal",textAlign:"center",marginTop:"1rem"}}),p=e=>{let{icbInfo:r,onCloseDrawer:s}=e,p=(0,d.t)("Incorrect Cashback Form");return(0,a.useEffect)(()=>{(0,o.kS)({screen_type:"incorrect_cashback",screen_name:"submission_form_successful",merchant_id:null==r?void 0:r.storeId,merchant_name:null==r?void 0:r.storeName})},[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(i.default,{width:260,height:260,src:u.A,alt:"Submit Success Image"})}),(0,t.jsx)(c.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(h,{children:p("Support request submitted")})}),(0,t.jsxs)(c.BJ,{padding:"sbds-dimension-space-size-l",children:[(0,t.jsx)(m,{children:p("Weâll update you by email, or you can check the status of this support request from âMy Support Requestsâ.")}),r&&(0,t.jsx)(c.so,{justify:"center",mt:"1rem",children:(0,t.jsx)(n.A,{size:"lg",fullWidth:!0,onClick:()=>{(0,o.PN)({screen_type:"incorrect_cashback",screen_name:"submission_form_successful",feature_name:"view_request",merchant_id:null==r?void 0:r.storeId,merchant_name:null==r?void 0:r.storeName}),((e,r)=>{var s,t;let a=JSON.stringify(r),i=(0,l.A)(navigator.userAgent);i.iOS&&(null==(t=window.webkit)||null==(s=t.messageHandlers)?void 0:s[e])?window.webkit.messageHandlers[e].postMessage(a):(i.Android||i.Huawei)&&window[e]&&window[e].onClickViewRequest(a)})("icbFormBridge",{type:"onClickViewRequest",data:{icbTicketId:r.icbTicketId}}),s()},children:p("View Request")})})]})]})};p.displayName="IncorrectCashbackFormResult";let b=p},125650:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(599813)},132440:(e,r,s)=>{s.d(r,{A:()=>i});var t=s(695155),a=s(554448);let i=e=>{var r,s;let i=null==(r=e.data)?void 0:r.label,n=null==(s=e.data)?void 0:s.desc;return(0,t.jsxs)(a.c.Option,{...e,children:[(0,t.jsx)("div",{children:i}),n&&(0,t.jsx)("div",{className:"select-option__desc",children:n})]})}},146147:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(695155),a=s(981980),i=s(202543),n=s(257849),o=s(398122);let l=(0,a.I4)("div",{base:{marginBottom:"sbds-dimension-space-size-m"}}),d=(0,a.I4)("div",{base:{fontWeight:700,fontSize:"sbds-font-size-9",lineHeight:"line-height-5",marginBottom:"sbds-dimension-space-size-xs",letterSpacing:"0.07px"}}),c=(0,a.I4)("div",{base:{fontSize:"sbds-font-size-4",lineHeight:"line-height-3",letterSpacing:"-0.15px"}}),u=()=>{let e=(0,i.t)(),r=(0,o.T)().ENABLE_MCB_WARNING_HEADER,s=e(r?"Cashback tracking for Oct 20-21 purchases may be delayed due to service outage of our service provider. Recovery is in progress, no action needed. Thanks for your patience!":"Is this order affecting your bonus Cashback? Once this support request is completed and your Cashback is tracked, your bonus Cashback will be too.");return(0,t.jsxs)(l,{children:[(0,t.jsx)(d,{children:e("Report missing Cashback")}),(0,t.jsx)(c,{children:e("Fill out this form to report missing Cashback and weâll look into it.")}),(0,t.jsx)(n.A,{description:s,style:"secondary",type:r?"warning":"info"})]})}},154716:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(443569)},160564:(e,r,s)=>{s.d(r,{A:()=>d});var t=s(695155),a=s(981980),i=s(74464);let n=(0,a.I4)("div",{base:{display:"flex",alignItems:"center",gap:"5px",color:"sbds-interaction-color-danger"}}),o=(0,a.I4)("span",{base:{fontSize:"sbds-font-size-4",lineHeight:"line-height-2",letterSpacing:"0.4px"}}),l=e=>{let{message:r}=e;return r?(0,t.jsxs)(n,{children:[(0,t.jsx)(i.BR,{color:"danger",size:"sm"}),(0,t.jsx)(o,{children:r})]}):null};l.displayName="FormErrorMessage";let d=l},160655:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=()=>{let e=(0,i.t)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{children:e("Thank y
1ou for reaching out to us.")}),(0,t.jsx)(a.az,{mt:"1rem",children:e("You have already submitted this request before. Weâre working on it and will get back to you soon via email.")})]})}},163856:(e,r,s)=>{s.d(r,{A:()=>h});var t=s(695155),a=s(981980),i=s(406098),n=s(202543),o=s(398122),l=s(985151);let d="https://support.shopback.sg/hc/en-us",c=(0,a.I4)("div",{base:{display:"flex",flexShrink:"0",alignItems:"center",justifyContent:"center",width:"100%",height:"60px",borderTop:"1px solid {colors.sbds-color-gray-10}"}}),u=(0,a.I4)(i.A,{base:{height:"sbds-dimension-size-13",margin:"0 {sizes.sbds-dimension-size-9}",backgroundColor:"sbds-color-white",border:"1px solid {colors.sbds-color-gray-10}",borderRadius:"4px"}}),h=()=>{var e;let r=(0,n.t)(),s=null==(e=(0,o.T)().userAgent)?void 0:e.source;return(0,t.jsx)(c,{children:(0,t.jsx)(u,{variant:"plain",fullWidth:!0,onClick:()=>{var e,t;let a=(e=>{try{return new URL(e)}catch(e){return null}})(r("mcb support link"));(0,l.A)(s)?window.location.href=null!=(e=null==a?void 0:a.toString())?e:d:window.open(null!=(t=null==a?void 0:a.toString())?t:d,"_blank")},children:r("Visit Help Center")})})}},196015:(e,r,s)=>{s.d(r,{A:()=>p});var t=s(695155),a=s(442444),i=s(653455),n=s(398122),o=s(801972),l=s(985151),d=s(615310),c=s(955398),u=s(347843),h=s(501468),m=s(851525);let p=e=>{var r,s;let{data:p,onCloseDrawer:b}=e,g=(0,n.T)(),A=(0,a.useSearchParams)(),{isMcbSubmissionEnabled:x}=(0,o.w)(),f=A.get("mcbVersion"),v=null==p||null==(r=p.merchant)?void 0:r.id,{data:S,isLoading:I}=(0,i.I)({queryKey:[d._U,v],queryFn:()=>(0,h.A)(v),enabled:null!=v,staleTime:1/0}),j=(0,l.A)(null==(s=g.userAgent)?void 0:s.source),T=f===m.LM.V3&&(!v||S),y=!f&&!j&&x&&(!v||S);return I?null:T||y?(0,t.jsx)(u.A,{data:p,onCloseDrawer:b}):(0,t.jsx)(c.A,{data:p,onCloseDrawer:b})}},232046:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(678573)},234965:(e,r,s)=>{s.d(r,{V:()=>t});let t=["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XCD","YER","ZAR","ZMW"]},237794:(e,r,s)=>{s.d(r,{A:()=>d});var t=s(695155),a=s(680560),i=s(959548),n=s(920282),o=s(672839),l=s(202543);let d=e=>{let{onCloseDrawer:r=o.A,resultType:s,mcbInfo:d,isWebView:c}=e,u=(0,l.t)();switch(s){case n.re.SUBMIT_TICKET_SUCCESS_V2:return(0,t.jsx)(i.A,{onCloseDrawer:r,mcbInfo:d,isWebView:c});case n.re.EXISTED_TICKET_ERROR:return(0,t.jsx)(a.A,{screenName:"support_form_mcb_existing",title:u("We're already on it!"),description:u("We got your missing Cashback report for order. We're investigating it now and will keep you posted"),imageAlt:"exist ticket error",onCloseDrawer:r});case n.re.NOT_ELIGIBLE_FOR_CASHBACK:return(0,t.jsx)(a.A,{screenName:"support_form_mcb_not_eligible",title:u("Store not eligible"),description:u("This store isn't eligible for missing Cashback reports."),imageAlt:"not eligible for cashback error",onCloseDrawer:r});case n.re.OVER_MCB_SUBMISSION_LIMIT:return(0,t.jsx)(a.A,{screenName:"support_form_mcb_over_limit",title:u("Report limit reached"),description:u("You've reached the limit of reports for this shopping trip. If you still have missing Cashback, please contact us."),imageAlt:"over mcb submission limit error",onCloseDrawer:r});case n.re.SHOPPINGTRIP_TRACKED_ERROR:return(0,t.jsx)(a.A,{screenName:"support_form_mcb_trip_tracked",title:u("Your trip is tracked"),description:u("Good news, this trip is already tracked. Your Cashback is on its way, so there's nothing to report."),imageAlt:"shopping trip already tracked",onCloseDrawer:r});case n.re.NOT_EXISTED_STORE_ERROR:return(0,t.jsx)(a.A,{screenName:"support_form_mcb_store_not_found",title:u("We couldn't find this store"),description:u("We couldn't find this store. Please go back and select it again."),imageAlt:"store not found error",onCloseDrawer:r})}return null}},248801:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(326920)},257169:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(895589)},257849:(e,r,s)=>{s.d(r,{A:()=>l});var t=s(695155);
1s(212115);var a=s(74464),i=s(981980),n=s(268030),o=s(340335);let l=e=>{let{title:r,description:s,style:l,type:d="info"}=e,c="info"===d?a.n$:a.eq;return(0,t.jsx)(o.GX,{children:(0,t.jsxs)(i.so,{alignItems:"flex-start",gap:"sbds-dimension-space-size-m",border:"1px solid",borderRadius:"sbds-dimension-border-radius-xs",borderColor:"sbds-border-color-medium",padding:"sbds-dimension-space-size-m",backgroundColor:"info"===d?"sbds-color-white":"sbds-color-yellow-5",className:(0,n.AH)({..."primary"===l&&{paddingLeft:"sbds-dimension-size-3",borderLeftColor:"sbds-status-color-info-dark",borderLeft:"4px solid"}}),children:[(0,t.jsx)("div",{className:(0,n.AH)({paddingTop:"sbds-dimension-space-size-xs"}),children:(0,t.jsx)(c,{className:(0,n.AH)({color:"primary"===l?"sbds-status-color-info-dark":"sbds-status-color-neutral-dark"}),size:"sm"})}),(0,t.jsxs)(i.so,{flexDirection:"column",gap:"sbds-dimension-space-size-xs",children:[r&&(0,t.jsx)(o.pi,{children:r}),(0,t.jsx)(o.JM,{children:s})]})]})})}},259040:(e,r,s)=>{s.d(r,{R8:()=>i,pi:()=>a});var t=s(981980);let a=(0,t.I4)("h1",{base:{fontWeight:"bold",fontSize:"sbds-font-size-6",lineHeight:"line-height-4",letterSpacing:"-0.44px",color:"sbds-color-black"}});(0,t.I4)("div",{base:{marginTop:"sbds-dimension-space-size-m",display:"flex",flexDirection:"column",gap:"4px"}});let i=(0,t.I4)("div",{base:{fontSize:"sbds-font-size-5",lineHeight:"line-height-4",letterSpacing:"0.1px",color:"sbds-color-black"}});(0,t.I4)("div",{base:{fontSize:"sbds-font-size-3",lineHeight:"line-height-2",letterSpacing:"0.4px",color:"sbds-color-gray-30"}})},262223:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(237794)},264160:(e,r,s)=>{s.d(r,{A:()=>l});var t=s(695155),a=s(981980);let i=(0,a.I4)("div",{base:{marginBottom:"sbds-dimension-space-size-m"}}),n=(0,a.I4)("div",{base:{fontWeight:700,fontSize:"sbds-font-size-9",lineHeight:"line-height-5",marginBottom:"sbds-dimension-space-size-xs",letterSpacing:"0.07px"}}),o=(0,a.I4)("div",{base:{fontSize:"sbds-font-size-4",lineHeight:"line-height-3",letterSpacing:"-0.15px"}}),l=e=>{let{title:r,description:s}=e;return(0,t.jsxs)(i,{children:[(0,t.jsx)(n,{children:r}),(0,t.jsx)(o,{children:s})]})}},283802:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=()=>{let e=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("We have received your cancel request.")}),(0,t.jsx)(a.az,{mt:"1rem",children:e("We will reply to you via email as soon as possible")})]})}},288193:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(745568)},296274:(e,r,s)=>{s.d(r,{A:()=>m});var t=s(695155),a=s(493205),i=s(862950),n=s(741134),o=s(154716),l=s(527342),d=s(134596),c=s(547972),u=s(672839);let h={withdraw:e=>(0,t.jsx)(i.A,{...e}),missingCashback:e=>(0,t.jsx)(a.A,{...e}),disputeRejection:e=>(0,t.jsx)(n.A,{...e}),lateValidation:e=>(0,t.jsx)(o.A,{...e}),incorrectCashback:e=>(0,t.jsx)(l.A,{...e})},m=e=>{let{data:r,type:s,onCloseDrawer:a,onComplete:i=u.A}=e;return(0,t.jsx)("div",{children:(0,t.jsx)(d.$J,{dateAdapter:c.h,children:(e=>h[e]?h[e]({data:r,onCloseDrawer:a,onComplete:i}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:"Please enter a correct type"}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:"withdraw"}),(0,t.jsx)("li",{children:"missingCashback"}),(0,t.jsx)("li",{children:"disputeRejection"}),(0,t.jsx)("li",{children:"lateValidation"}),(0,t.jsx)("li",{children:"incorrectCashback"})]})]}))(s)})})}},310532:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(713014)},311285:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(146147)},312415:(e,r,s)=>{s.d(r,{A:()=>x});var t=s(695155),a=s(212115),i=s(981980),n=s(268030),o=s(653455),l=s(508296),d=s(406098),c=s(393091),u=s(741513),h=s(140253),m=s(721931),p=s(422544),b=s(202543),g=s(340335),A=s(543244);let x=e=>{let{controllerNames:{cashbackTierName:r,currencyName:s,amountName:x},title:f,currencyOptions:v,currency:S,onSelectCurrency:I,isFirstItem:j,onClickRemove:T}=e,y=(0,b.t)(),{control:R,setValue:E,getValues:_,getFieldState:k,formState:{errors:C}}=(0,p.xW)(),D=(0,p.FH)({name:"purchaseDate"}),O=(0,p.FH)({name:s}),{data:{cashbackRateTierOptions:w,cashbackRateTierDefaultOption:N,cashbackRateTierDisabled:z,calculationEngine:P}={cashbackRateTierOptions:[],cashbackRateTierDefaultOption:void 0,cashbackRateTierDisabled:!1,calculationEngine:void 0},isLoading:L,isSuccess:B}=(0,o.I)({queryKey:["api/support/tickets/cashback-rate-tiers",{eOutletId:null==D?void 0:D.eOutletId,activeTime:null==D?void 0:D.formattedISODate}],enabled:!!(null==D?void 0:D.formattedISODate),throwOnError:!1,select:e=>{var r;let s=null!=(r=null==e?void 0:e.data.map(e=>({label:"All customers"===e.marketingLabel?y("All customers"):e.marketingLabel,value:e.id.toString()})))?r:[];return{cashbackRateTierOptions:s,cashbackRateTierDefaultOption:1===s.length?s[0]:void 0,cashbackRateTierDisabled:1===s.length,calculationEngine:null==e?void 0:e.calculationEngine}}}),F=B&&0===w.length,M=z||F,H=w.length>10;(0,a.useEffect)(()=>{N&&E(r,N)},[N,E,r]),(0,a.useEffect)(()=>{F&&E(r,void 0,{shouldValidate:!1})},[F,E,r]);let W=(0,a.useRef)(void 0);return(0,a.useEffect)(()=>{let e="".concat(null==D?void 0:D.eOutletId,":").concat(null==D?void 0:D.formattedISODate);W.current!==e&&(W.current=e,E("calculationEngine",void 0,{shouldValidate:!1}))},[null==D?void 0:D.eOutletId,null==D?void 0:D.formattedISODate,E]),(0,a.useEffect)(()=>{P&&!_("calculationEngine")&&E("calculationEngine",P)},[P,_,E]),(0,t.jsxs)(i.BJ,{gap:8,children:[(0,t.jsxs)(i.so,{justifyContent:"space-between",children:[(0,t.jsx)(l.A,{weight:"bold",children:f}),!j&&(0,t.jsx)(d.A,{variant:"plain",size:"sm",className:(0,n.AH)({color:"sbds-font-color-secondary",fontSize:"sbds-font-size-3",fontWeight:"500"}),onClick:T,children:y("Remove")})]}),(0,t.jsxs)(i.BJ,{gap:4,children:[(0,t.jsx)(l.A,{children:y("Eligible purchase amount")}),(0,t.jsxs)(i.xA,{columns:3,gap:0,children:[(0,t.jsx)(i.Ei,{colSpan:1,children:(0,t.jsx)(u.A,{control:R,name:s,options:v,value:S,isSearchable:!0,isClearable:!1,isDisabled:!j,onChange:I})}),(0,t.jsx)(i.Ei,{colSpan:2,children:(0,t.jsx)(c.A,{control:R,name:x,placeholder:y("Enter amount"),preProcessInputValue:e=>(0,A.wv)(e,null==O?void 0:O.value),rules:{required:y("Eligible purchase amount is required."),validate:e=>(0,A.UJ)(e,null==O?void 0:O.value,{errorMessage:y("Eligible purchase amount is wrong format.")})},className:(0,n.AH)({"& .MuiInputBase-root":{borderRadius:"0 {spacing.sbds-dimension-space-size-xs} {spacing.sbds-dimension-space-size-xs} 0",...k(x).error&&{borderColor:"#ff4e4e"}}})})})]}),(0,t.jsx)(i.az,{children:(0,t.jsx)(h.K,{errors:C,name:x,render:e=>{let{message:r}=e;return(0,t.jsx)(m.A,{message:r})}})}),(0,t.jsx)(g.JW,{children:y("The eligible purchase amount should exclude taxes and shipping fees.")})]}),(0,t.jsxs)(i.BJ,{gap:4,children:[(0,t.jsx)("div",{children:y("Cashback tier")}),(0,t.jsx)(u.A,{control:R,name:r,placeholder:y("Select tier"),options:w,rules:{required:y("This is a required field")},isDisabled:M,isLoading:L,isClearable:!1,isSearchable:H,noOptionsMessage:()=>y("No options")}),(0,t.jsx)(i.az,{children:F?(0,t.jsx)(m.A,{message:y("Cashback isn't available for this purchase. This merchant's cashback is for new customers only.")}):(0,t.jsx)(h.K,{errors:C,name:r,render:e=>{let{message:r}=e;return(0,t.jsx)(m.A,{message:r})}})}),(0,t.jsx)(g.JW,{children:y("Select the Cashback tier that best matches your purchase. We're testing this feature, so calculations may change as we fine-tune accuracy.")}
1)]})]})}},326920:(e,r,s)=>{s.d(r,{A:()=>g});var t=s(695155),a=s(212115),i=s(554448),n=s(461543),o=s(422544),l=s(460147),d=s(251435),c=s(981980),u=s(508296),h=s(202543),m=s(268030);let p=e=>{let{isSelected:r,isSelectAll:s,data:a,...n}=e;return(0,t.jsx)(i.c.Option,{...n,className:(0,m.AH)({padding:0}),data:a,isSelected:!1,children:(0,t.jsxs)(c.so,{p:0,alignItems:"center",pl:16*!s,children:[(0,t.jsx)(l.A,{checked:r}),(0,t.jsx)(u.A,{children:a.label})]})})},b=e=>{let r=e.getValue().map(e=>e.seqLabel).join(", ");return(0,t.jsxs)(i.c.ValueContainer,{...e,children:[(0,t.jsx)("div",{style:{height:0,width:0,overflow:"hidden"},children:e.children}),(0,t.jsx)(d.A,{p:"sbds-dimension-space-size-m",className:(0,m.AH)({color:0===r.length?"sbds-color-cool-gray-40":"inherit"}),children:r||e.selectProps.placeholder})]})};function g(e){let{name:r,control:s,options:i,rules:l,isLoading:d=!1,...c}=e,u=(0,h.A)("Incorrect Cashback Form"),[m,g]=(0,a.useState)([]),{setValue:A}=(0,o.xW)(),x=(0,a.useMemo)(()=>[{value:"select-all",label:u("Select all"),seq:0,seqLabel:u("Select all"),cashbackId:"",cashbackRateTierId:"",cashbackRateTierLabel:"",purchaseAmountText:""},...i],[i,u]),f=(0,a.useCallback)((e,r)=>"select-all"===e.value?r.length===i.length?[]:i:r.some(r=>r.value===e.value)?r.filter(r=>r.value!==e.value):[...r,e].sort((e,r)=>e.seq-r.seq),[i]);return(0,t.jsx)(o.xI,{name:r,control:s,rules:l,render:e=>{let{field:s}=e;return(0,t.jsx)(n.Ay,{...s,...c,isLoading:d,isDisabled:d||0===i.length,value:m,options:x,isMulti:!0,isClearable:!1,closeMenuOnSelect:!1,hideSelectedOptions:!1,placeholder:u("Select item(s)"),onChange:(e,s)=>{if("select-option"===s.action||"deselect-option"===s.action){let e=f(s.option,m);g(e),A(r,e)}},components:{Option:e=>(0,t.jsx)(p,{...e,isSelectAll:"select-all"===e.data.value,isSelected:"select-all"===e.data.value?m.length===i.length:m.some(r=>r.value===e.data.value)}),ValueContainer:b}})}})}},340335:(e,r,s)=>{s.d(r,{GX:()=>i,JM:()=>o,JW:()=>l,R8:()=>n,pi:()=>a});var t=s(981980);let a=(0,t.I4)("h1",{base:{fontWeight:"bold",fontSize:"sbds-font-size-6",lineHeight:"line-height-4",letterSpacing:"-0.44px",color:"sbds-color-black"}}),i=(0,t.I4)("div",{base:{marginTop:"sbds-dimension-space-size-m",display:"flex",flexDirection:"column",gap:"4px"}}),n=(0,t.I4)("div",{base:{fontSize:"sbds-font-size-5",lineHeight:"line-height-4",letterSpacing:"0.1px",color:"sbds-color-black"}}),o=(0,t.I4)("div",{base:{fontSize:"sbds-font-size-4",lineHeight:"line-height-3",letterSpacing:"0.1px",color:"sbds-color-black"}}),l=(0,t.I4)("div",{base:{fontSize:"sbds-font-size-3",lineHeight:"line-height-2",letterSpacing:"0.4px",color:"sbds-color-gray-30"}})},341590:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(15892)},345326:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(725778)},347843:(e,r,s)=>{s.d(r,{A:()=>_});var t=s(695155),a=s(288193),i=s(212115),n=s(101818),o=s(311285),l=s(20239),d=s(113919),c=s(262223),u=s(920282),h=s(982897),m=s(235217),p=s(981980),b=s(422544),g=s(672839),A=s(821628),x=s(406368),f=s(579856),v=s(398122),S=s(851525),I=s(985151),j=s(543244),T=s(202543),y=s(439026);let R=[u.re.NOT_ELIGIBLE_FOR_CASHBACK,u.re.OVER_MCB_SUBMISSION_LIMIT,u.re.OVER_SUBMISSION_DATE_ERROR,u.re.TRACKING_SPEED_ERROR,u.re.SHOPPINGTRIP_TRACKED_ERROR,u.re.NOT_EXISTED_STORE_ERROR],E=(0,p.I4)("div",{base:{"& > div":{padding:"1.25rem {spacing.sbds-dimension-space-size-m} {spacing.sbds-dimension-space-size-m}",backgroundColor:"sbds-color-white"}}}),_=e=>{var r;let{data:s,onCloseDrawer:_=g.A}=e,k=(0,v.T)(),C=(0,A.A)(),[D,O]=(0,i.useState)(u.Lu.SHOPPING_TRIP_DETAIL),[w,N]=(0,i.useState)(u.Lu.SHOPPING_TRIP_DETAIL),[z,P]=(0,i.useState)(null),[L,B]=(0,i.useState)(!1),[F,M]=(0,i.useState)(void 0),[H,W]=(0,i.useState)(null),U=(0,T.A)("MCB form support request");(0,i.useEffect)(()=>{(0,f.kS)({screen_type:"missing_cashback",screen_name:"submission_form"})},[]),(0,i.useEffect)(()=>{O(u.Lu.SHOPPING_TRIP_DETAIL),N(u.Lu.SHOPPING_TRIP_DETAIL)},[s]);let q=(0,b.mN)({defaultValues:{cashbackItems:[{cashbackTier:void 0,currency:void 0,amount:void 0}],transactionScreenshots:[]},mode:"onChange"}),G=(0,n.n)({mutationFn:e=>
1(0,x.c)("api/missing-cashback/validate-purchase-amount",{method:"POST",body:e}),throwOnError:!1}),V=(0,n.n)({mutationFn:e=>(0,x.c)("api/missing-cashback/tickets",{method:"POST",body:e}),throwOnError:!1,onSuccess:e=>{W({mcbTicketId:e.id,mcbVersion:S.LM.V3,storeId:e.storeId,storeName:e.storeName,orderNumber:e.orderNumber,purchaseDate:e.purchaseDate}),Z({resultType:u.re.SUBMIT_TICKET_SUCCESS_V2}),q.reset()},onError:e=>{var r;let s=null==e||null==(r=e.body)?void 0:r.code;if("EXISTED_OPEN_TICKET_ERROR"===s)return void Z({resultType:u.re.EXISTED_TICKET_ERROR});if(s&&u.lv[s])return void Z({resultType:u.lv[s]});let t={ORDER_ID_FORMAT_ERROR:"orderNumber",EXISTED_CASHBACK_ERROR:"orderNumber",TRAVEL_DATE_REQUIRED_ERROR:"travelFromDate"};if(s&&t[s]){q.setError(t[s],{type:"server",message:(0,h.G)(U,s)}),X(u.Lu.SHOPPING_TRIP_DETAIL);return}M((0,h.G)(U,s)),B(!0)}}),K=D!==u.Lu.RESULTS,J=(0,I.A)(null==(r=k.userAgent)?void 0:r.source),Y=D===u.Lu.SHOPPING_TRIP_DETAIL||R.includes((null==z?void 0:z.resultType)||""),X=e=>{e>w?N(D):N(u.Lu.SHOPPING_TRIP_DETAIL),O(e)},Z=e=>{P(e),X(u.Lu.RESULTS)},Q=async e=>{var r,s,t,a,i,n,o,l;(0,f.xO)({screen_type:"support",screen_name:"support_form_mcb",ui_element_type:"submit"},"Web.Interact.ClickActivity");try{let r=e.cashbackItems.map(e=>G.mutateAsync({purchaseAmount:Number((0,j.QE)(e.amount,e.currency.value)),purchaseCurrency:e.currency.value})),s=await Promise.all(r);if(s.some(e=>!e.eligible&&!!e.data.purchaseAmountCap))return void e.cashbackItems.forEach((r,t)=>{s[t].eligible||q.setError("cashbackItems.".concat(t,".amount"),{message:U("Please enter an amount no more than {purchaseAmountCap}",{purchaseAmountCap:(0,y.G)(s[t].data.purchaseAmountCap,e.cashbackItems[t].currency.value,k.locale||"en-US")})})})}catch(e){B(!0);return}let d={isTravel:e.selectedStore.isTravel,storeName:e.selectedStore.label,storeId:e.purchaseDate.eOutletId,orderNumber:e.orderNumber,purchaseDate:e.purchaseDate.formattedISODate,shoppingTripUuid:e.purchaseDate.uuid,shoppingTripId:e.purchaseDate.value,accountId:null==(r=k.user)?void 0:r.id,firstName:null==(s=k.user)?void 0:s.first_name,lastName:null==(t=k.user)?void 0:t.last_name,email:null==(a=k.user)?void 0:a.email,phone:null==(n=k.user)||null==(i=n.phone_numbers[
10])?void 0:i.number,cashbackItems:e.cashbackItems.map(e=>({cashbackRateTierId:e.cashbackTier.value,cashbackRateTierLabel:e.cashbackTier.label,purchaseCurrency:e.currency.value,purchaseAmount:(0,j.QE)(e.amount,e.currency.value)})),mcbVersion:S.LM.V3,calculationEngine:null!=(o=e.calculationEngine)?o:"RAT",...e.additionalInfo&&{comment:e.additionalInfo},...e.voucherCode&&{voucherCode:e.voucherCode},...e.travelFromDate&&{travelFromDate:C.formatDate(u.fU,e.travelFromDate)},...e.travelToDate&&{travelToDate:C.formatDate(u.fU,e.travelToDate)}},c=new FormData;(null!=(l=e.transactionScreenshots)?l:[]).forEach((e,r)=>{c.append("uploadFile[".concat(r,"]"),e)}),c.append("createTicketRequestBody",JSON.stringify(d)),V.mutate(c)};return(0,t.jsx)(a.A,{headerProps:J?void 0:{shouldHideBackBtn:Y,onCloseDrawer:()=>{q.reset(),_()},onGoBack:()=>X(w)},data:s,isGrayBackground:K,children:(0,t.jsx)(b.Op,{...q,children:(0,t.jsx)("form",{onSubmit:q.handleSubmit(Q),children:V.isPending?(0,t.jsx)(p.so,{mt:"sbds-dimension-space-size-xl",justifyContent:"center",alignItems:"center",children:(0,t.jsx)(m.A,{color:"inherit",size:30})}):(0,t.jsxs)(E,{children:[K&&(0,t.jsx)(o.A,{}),(0,t.jsx)("div",{children:(()=>{if(!s)return null;switch(D){case u.Lu.SHOPPING_TRIP_DETAIL:return(0,t.jsx)(d.A,{onSetStep:X,defaultData:s,setResult:Z});case u.Lu.PAYMENT_AND_ADDITIONAL_INFO:return(0,t.jsx)(l.A,{onSetStep:X,isSubmitErrorSnackbarOpen:L,setSubmitErrorSnackbarOpen:B,submitErrorSnackbarMessage:F,isSubmittingForm:V.isPending||G.isPending});case u.Lu.RESULTS:return(0,t.jsx)(c.A,{onCloseDrawer:_,resultType:null==z?void 0:z.resultType,mcbInfo:H,isWebView:J})}})()})]})})})})}},366807:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=()=>{let e=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("Weâre checking with our finance team and will get back to you soon via email.")}),(0,t.jsx)(a.az,{mt:"1rem",children:e("Thank you for reaching out to us.")})]})}},388335:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=()=>{let e=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("Thank you for reaching out to us.")}),(0,t.jsx)(a.az,{mt:"1rem",children:e("You have already submitted this request before. Weâre working on it and will get back to you soon via email.")})]})}},389485:(e,r,s)=>{s.d(r,{A:()=>p});var t=s(695155),a=s(212115),i=s(398122),n=s(981980),o=s(235217),l=s(288193),d=s(19471),c=s(6),u=s(538078),h=s(101818),m=s(406368);let p=e=>{var r,s,p,b,g;let{data:A,onCloseDrawer:x,onComplete:f}=e,v=(0,i.T)(),[S,I]=(0,a.useState)(u.r.FILL_IN_REPORT),[j,T]=(0,a.useState)(null),[y,R]=(0,a.useState)(!1);(0,a.useEffect)(()=>{I(u.r.FILL_IN_REPORT)},[A]);let E={accountId:null==(r=v.user)?void 0:r.id,name:null==(s=v.user)?void 0:s.name,phone:null==(b=v.user)||null==(p=b.phone_numbers[
10])?void 0:p.number,email:null==(g=v.user)?void 0:g.email},_=(0,h.n)({mutationFn:e=>(0,m.c)("api/dispute-cashback",{method:"POST",body:e}),throwOnError:!1,onMutate:()=>{R(!0)},onSuccess:()=>{R(!1),I(u.r.RESULT),f(null==A?void 0:A.cashbackId)},onError:e=>{let{body:r}=e;R(!1),T({info:r.body}),I(u.r.RESULT)}}),k=e=>{var r;let s={...E,cashbackId:null==A?void 0:A.cashbackId,comment:e.comment||""};e.voucherCode&&Object.assign(s,{voucherCode:e.voucherCode});let t=new FormData;t.append("uploadFile",(null==(r=e.proofFile)?void 0:r[0])||""),t.append("disputeRejectionInfo",JSON.stringify(s)),_.mutate(t)};return(0,t.jsx)(l.A,{headerProps:{shouldHideBackBtn:!0,onCloseDrawer:x},data:A,children:(0,t.jsx)(n.az,{px:"20px",py:"12px",children:y?(0,t.jsx)(n.so,{mt:"sbds-dimension-space-size-xl",justifyContent:"center",alignItems:"center",children:(0,t.jsx)(o.A,{color:"inherit",size:30})}):(()=>{if(!A)return null;switch(S){case u.r.FILL_IN_REPORT:return(0,t.jsx)(d.A,{onSubmitDisputeRejectionForm:k});case u.r.RESULT:return(0,t.jsx)(c.A,{error:j})}})()})})}},393091:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(907504)},415662:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(429778)},429778:(e,r,s)=>{s.d(r,{A:()=>l});var t=s(695155),a=s(268030),i=s(725635),n=s(310532);let o=e=>{let{label:r,placeholder:s,value:o,type:l,disabled:d,fullWidth:c,multiline:u,rows:h,onChange:m,onKeyUp:p,onFocus:b,onBlur:g,endAdornment:A,minRows:x,className:f}=e,v=(0,a.AH)({"& .MuiInputBase-root":{padding:"{spacing.sbds-dimension-space-size-s} {spacing.sbds-dimension-space-size-m}",borderRadius:"4px",minHeight:"20px",backgroundColor:"sbds-color-white",fontSize:"sbds-font-size-4"}});return(0,t.jsxs)("div",{children:[r&&(0,t.jsx)(i.A,{className:(0,a.AH)({paddingBottom:6,fontSize:"sbds-font-size-4",color:"sbds-color-black"}),children:r}),(0,t.jsx)(n.A,{className:f,customStyle:(0,a.cx)(v,f),placeholder:s,value:o,type:l,disabled:d,multiline:u,rows:h,fullWidth:c,inputProps:{disableUnderline:!0,endAdornment:A},onChange:m,onKeyUp:p,onBlur:g,onFocus:b,minRows:x})]})};o.displayName="TextInput";let l=o},432210:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=e=>{let{formattedDate:r}=e,s=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:s("Thank you for reaching out to us.")}),(0,t.jsx)(a.az,{mt:"1rem",children:s("Weâre sorry that youâve passed the submission deadline ({formattedDate}) for cancelling the withdrawal request. Your request can no longer be processed by our system.",{formattedDate:r})})]})}},436762:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(836019)},443569:(e,r,s)=>{s.d(r,{A:()=>b});var t=s(695155),a=s(212115),i=s(981980),n=s(235217),o=s(288193),l=s(729471),d=s(949635),c=s(686213),u=s(764244),h=s(101818),m=s(406368),p=s(398122);let b=e=>{var r,s,b,g,A;let{data:x,onCloseDrawer:f,onComplete:v}=e,S=(0,p.T)(),[I,j]=(0,a.useState)(l.L.FILL_IN_REPORT),[T,y]=(0,a.useState)(null),[R,E]=(0,a.useState)(!1);(0,a.useEffect)(()=>{j(l.L.FILL_IN_REPORT)},[x]);let _=(0,h.n)({mutationFn:e=>(0,m.c)("api/late-validation/enquiries",{method:"POST",body:e}),throwOnError:!1,onMutate:()=>{E(!0)},onSuccess:()=>{E(!1),v(null==x?void 0:x.cashbackId)},onError:e=>{let{body:r}=e;E(!1),j(l.L.RESULT),y({type:"API error",info:r.body})}}),k={accountId:null==(r=S.user)?void 0:r.id,name:null==(s=S.user)?void 0:s.name,phone:null==(g=S.user)||null==(b=g.phone_numbers[
10])?void 0:b.number,email:null==(A=S.user)?void 0:A.email},C=()=>{let e={cashbackId:null==x?void 0:x.cashbackId,isTravelStore:!1,...k},r=new FormData;r.append("lateValidationInfo",JSON.stringify(e)),_.mutate(r)},D=async e=>{var r;let s={cashbackId:null==x?void 0:x.cashbackId,isTravelStore:!0,dateTo:e.dateTo,dateFrom:e.dateFrom,...k},t=new FormData;t.append("uploadFile",(null==(r=e.proofFile)?void 0:r[0])||""),t.append("lateValidationInfo",JSON.stringify(s)),_.mutate(t)},O=e=>{j(l.L.RESULT),y({type:"validation",info:e})};return(0,t.jsx)(o.A,{headerProps:{shouldHideBackBtn:!0,onCloseDrawer:f},data:x,children:(0,t.jsx)(i.az,{px:"20px",py:"12px",children:R?(0,t.jsx)(i.so,{mt:"sbds-dimension-space-size-xl",justifyContent:"center",alignItems:"center",children:(0,t.jsx)(n.A,{color:"inherit",size:30})}):(()=>{if(!x)return null;switch(I){case l.L.FILL_IN_REPORT:return(null==x?void 0:x.isTravel)?(0,t.jsx)(d.A,{merchantName:x.merchantName,purchasedDate:x.purchaseDate,orderId:x.orderId,cashback:x.cashback,onValidationError:O,onSubmitReport:D}):(0,t.jsx)(c.A,{merchantName:null==x?void 0:x.merchantName,purchasedDate:null==x?void 0:x.purchaseDate,orderId:null==x?void 0:x.orderId,onSubmitReport:C});case l.L.RESULT:return(0,t.jsx)(u.A,{merchantName:null==x?void 0:x.merchantName,status:T?"error":"success",error:T})}})()})})}},445468:(e,r,s)=>{s.d(r,{A:()=>j});var t=s(695155),a=s(74464),i=s(981980),n=s(268030),o=s(721931),l=s(140253),d=s(436762),c=s(406098),u=s(717485),h=s(479824),m=s(212115),p=s(422544),b=s(202543),g=s(340335);let A=(0,i.I4)("label",{base:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"3rem",border:"1px solid {colors.sbds-color-black}",borderRadius:"1.5rem",fontWeight:"bold",fontSize:"sbds-font-size-5",lineHeight:"line-height-4",cursor:"pointer",backgroundColor:"sbds-color-white",color:"sbds-color-black","&:hover":{backgroundColor:"sbds-color-white",opacity:"opacity-7"}}}),x=(0,i.I4)("div",{base:{position:"relative",display:"flex",gap:"sbds-dimension-space-size-m",alignItems:"center",marginTop:"sbds-dimension-space-size-s",padding:"sbds-dimension-space-size-m",border:"1px solid {colors.sbds-color-gray-40}",borderRadius:"sbds-dimension-border-radius-s"}}),f=(0,i.I4)("img",{base:{objectFit:"cover",width:"60px",height:"60px",cursor:"pointer"}}),v=(0,i.I4)("img",{base:{margin:"sbds-dimension-space-size-m"}}),S=(0,i.I4)("span",{base:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}),I=e=>{let{control:r,name:s,rules:i={},errors:I,resetField:j}=e,T=(0,b.t)(),[y,R]=(0,m.useState)(!1),{watch:E,setValue:_}=(0,p.mN)(),k=E(s),C=(0,m.useMemo)(()=>{let e=(0,u.A)(k,"0");return{fileType:e?e.type:null,imageUrl:e?URL.createObjectURL(e):void 0}},[k]),D=e=>{e.target.value="",_(s,null),j(s)};return(0,t.jsxs)(g.GX,{children:[(0,t.jsx)(g.R8,{children:T("help form upload file title")}),(0,t.jsxs)(A,{children:[(0,t.jsx)(a._O,{size:"sm"}),(0,t.jsx)("span",{children:T("choose a file to upload")}),(0,t.jsx)(p.xI,{control:r,name:s,rules:i,render:e=>{let{field:{name:r,ref:s,onChange:a}}=e;return(0,t.jsx)("input",{type:"file",className:(0,n.AH)({display:"none"}),accept:"image/jpeg, image/png, application/pdf",onChange:e=>{var s;let t=null==e||null==(s=e.target)?void 0:s.files;(0,h.A)(null==t?void 0:t.length)&&(a(t),_(r,t))},onClick:D,name:r,ref:s})}})]}),(0,t.jsx)(g.JW,{children:T("help form uploader reminder")}),(0,t.jsx)(l.K,{errors:I,name:s,render:e=>{let{message:r}=e;return(0,t.jsx)(o.A,{message:r})}}),!(0,h.A)(k)&&(0,t.jsxs)(x,{children:[(0,t.jsx)(c.A,{variant:"plain",iconOnly:a.FB,onClick:()=>{_(s,null),j(s)}}),"application/pdf"!==C.fileType&&(0,t.jsx)(f,{src:C.imageUrl,onClick:()=>{R(!0)}}),(0,t.jsx)(S,{children:(0,u.A)(k,"0.name","")})]}),(0,t.jsx)(d.A,{open:y,onClose:()=>{R(!1)},"aria-labelledby":"preview-dialog",children:(0,t.jsx)(v,{src:C.imageUrl})})]})};I.displayName="UploadController";let j=I},449098:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(537565)},449837:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=e=>{let{formattedDate:r}=e,s=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:s("Thank y
1ou for reaching out to us.")}),(0,t.jsx)(a.az,{mt:"1rem",children:s("Weâre sorry that youâve passed the submission deadline ({formattedDate}) for requesting proof of transfer. Your request can no longer be processed by our system.",{formattedDate:r})})]})}},460663:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(726388)},460698:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(695155),a=s(981980),i=s(268030),n=s(44075),o=s(406098),l=s(74464),d=s(202543);let c=e=>{let{open:r,autoHideDuration:s=2e3,handleClose:c,message:u}=e,h=(0,d.t)();return(0,t.jsx)(n.A,{open:r,onClose:c,classes:{root:(0,i.AH)({position:"absolute",bottom:"50px"})},ContentProps:{classes:{root:(0,i.AH)({backgroundColor:"#FFEDED",color:"#232928"})},message:(0,t.jsxs)(a.so,{justify:"space-around",children:[(0,t.jsx)(a.az,{mt:"sbds-dimension-size-1",mr:"1rem",children:(0,t.jsx)(l.BR,{size:"sm",color:"danger"})}),null!=u?u:h("Something went wrong, try resubmitting the form."),(0,t.jsx)(a.az,{ml:"1rem",children:(0,t.jsx)(o.A,{size:"sm",variant:"plain",iconOnly:l.FB,onClick:c})})]})},autoHideDuration:s})};c.displayName="SubmitErrorSnackbar";let u=c},462761:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(695155),a=s(981980),i=s(821628),n=s(202543),o=s(259040),l=s(223757),d=s(41619),c=s(515239);let u=e=>{let{status:r,error:s,merchantName:u}=e,h=(0,n.t)(),m=(0,i.A)();return"success"===r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.pi,{children:h("Thank you for reaching out to us.")}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(l.A,{variant:"paragraph-3",children:h("We're sorry that your transaction is still Pending despite passing the validation period. Thank you for submitting this Enquiry for {merchantName} and we will check and let you know the result via email.",{merchantName:u})})}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(a.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(c.default,{width:260,height:260,src:d.A,alt:"mcbFormIllustration"})})})]}):(()=>{let{invalidMessageKey:e,validDate:r}=(null==s?void 0:s.info)||{},{message:i}=(null==s?void 0:s.info)||{},n=r&&m.formatDate("yyyy-MM-dd",r);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.pi,{children:h("Thank you for reaching out to us.")}),(0,t.jsxs)(a.az,{mt:"sbds-dimension-space-size-m",children:[e&&(0,t.jsx)(l.A,{variant:"paragraph-3",children:h(e,{merchantName:u,validDate:n})}),i&&(0,t.jsx)(l.A,{variant:"paragraph-3",children:"Submission failed. (Error message: ".concat(i,")")})]}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(a.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(c.default,{width:260,height:260,src:d.A,alt:"mcbFormIllustration"})})})]})})()}},483236:(e,r,s)=>{s.d(r,{A:()=>A});var t=s(695155),a=s(406098),i=s(172723),n=s(479824),o=s(717485),l=s(212115),d=s(422544),c=s(101818),u=s(202543),h=s(406368),m=s(920282),p=s(40725),b=s(398122);let g=e=>{let{currentProgress:r,setCurrentProgress:s,onSetStep:g,setResult:A}=e,x=(0,u.t)(),f=(0,b.T)(),{control:v,setError:S,clearErrors:I,trigger:j}=(0,d.xW)(),[T,y,R]=(0,d.FH)({control:v,name:["selectedStore","purchaseDate","orderNumber"]}),E=(0,i.A)([y,R],n.A),_=(0,l.useMemo)(()=>["selectedStore","purchaseDate","orderNumber",...(0,o.A)(T,"isTravel",!1)?["travelFromDate","travelToDate"]:[]],[T]),{mutate:k,isPending:C,isSuccess:D,data:O,error:w}=(0,c.n)({mutationFn:()=>{var e;return(0,h.c)("api/missing-cashback/check-order-id",{method:"POST",body:{eOutletId:null==y?void 0:y.eOutletId,orderId:R,accountId:null==(e=f.user)?void 0:e.id}})},throwOnError:!1});(0,l.useEffect)(()=>{D&&(I(_),g(m.Lu.PAYMENT_AND_ADDITIONAL_INFO))},[O]),(0,l.useEffect)(()=>{if(w){let{body:{code:e,body:r}}=w;"EXISTED_OPEN_TICKET_ERROR"===e?A({resultType:m.re.EXISTED_TICKET_ERROR}):"ORDER_ID_FORMAT_ERROR"===e?S("orderNumber",{type:"custom",message:x("Please make sure you enter the ID or reference exactly as it appears on your store receipt, order history or email confirmation.")}):"ORDER_ID_HAS_CASHBACK_ERROR"===e&&S("orderNumber",{type:"custom",message:x("Order is already tracked in your Cashback history, as {order_ID} with ${cashback_amount} Cashback",{order_ID:null==r?void 0:r.orderNumber,cashback_amount:null==r?void 0:r.cashbackAmount})})}},[w]);let N=async()=>{await j(_)&&k()};switch(r){case p.m.selectStore:return(0,t.jsx)(a.A,{size:"lg",disabled:!T,onClick:()=>s(p.m.inputOrderId),fullWidth:!0,children:x("Next")});case p.m.inputOrderId:return(0,t.jsx)(a.A,{size:"lg",disabled:E,onClick:N,isLoading:C,fullWidth:!0,children:x("Next")})}return null};g.displayName="NextButton";let A=g},493205:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(196015)},501468:(e,r,s)=>{s.d(r,{A:()=>a});var t=s(730926);let a=(0,t.createServerReference)("7f78b48e700d442b57ddc78a01ff602b0261d914b8",t.callServer,void 0,t.findSourceMapURL,"default")},515162:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(40725)},517901:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=e=>{let{formattedDate:r}=e,s=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:s("Thank y
1ou for reaching out to us.")}),(0,t.jsx)(a.az,{mt:"1rem",children:s("Please be informed that the payment of your withdrawal is being processed and the amount should reflect inside your Bank/e-Wallet account within 5 working days.")}),(0,t.jsx)(a.az,{mt:"1rem",children:s("You should come back after {formattedDate} to check again.",{formattedDate:r})})]})}},527342:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(574093)},537565:(e,r,s)=>{s.d(r,{A:()=>c});var t=s(695155),a=s(981980),i=s(202543),n=s(105878),o=s(74464),l=s(223757),d=s(684211);let c=e=>{let{setStep:r}=e,s=(0,i.t)();return(0,t.jsx)(d.E,{onClick:()=>{r(n.GZ.INPUT_REASON)},children:(0,t.jsxs)(a.so,{justify:"space-between",align:"center",overflow:"auto",children:[(0,t.jsx)(l.A,{variant:"paragraph-3",children:s("Cancel Withdrawal Request")}),(0,t.jsx)(o.Qp,{size:"sm"})]})})}},538078:(e,r,s)=>{s.d(r,{r:()=>t});let t={FILL_IN_REPORT:1,RESULT:2}},543244:(e,r,s)=>{s.d(r,{QE:()=>o,UJ:()=>l,wv:()=>d});let t=new RegExp(/^\d+(\.\d{1,2})?$/),a=new RegExp(/^\d+(,\d{1,2})?$/),i=new RegExp(/^([\d.])*\d$/),n=new RegExp(/^([\d,])*\d$/),o=(e,r)=>"VND"===r&&i.test(e)?e.replace(/\./g,""):"KRW"===r&&n.test(e)?e.replace(/,/g,""):"EUR"===r&&a.test(e)?e.replace(/,/g,"."):e,l=(e,r,s)=>{let o,{errorMessage:l}=s;switch(r){case"VND":o=i;break;case"KRW":o=n;break;case"EUR":o=a;break;default:o=t}return o.test(e)?null:l},d=(e,r)=>{let s=e;return"VND"===r&&i.test(e)&&(s=parseInt(e.replace(/\./g,""),10).toLocaleString().replace(/,/g,".")),"KRW"===r&&n.test(e)&&(s=parseInt(e.replace(/,/g,""),10).toLocaleString()),s||""}},553367:(e,r,s)=>{s.d(r,{A:()=>t});let t={src:"/__sbcdn/_next/static/media/mcbFormErrorIllustration.428b3c23.png",height:341,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAMFBMVEX////7+fjk5OSdn6fq6uvizszV1de+xt+tutvFyNH08/BjY2TZ1eF+ialWV1jDw8SMYqusAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAK0lEQVR4nBXGtxGAMBAAMH3AJrP/tj5UCXHml9DzuArb3J93/LlHVSB0JwsPagCfddaXzwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:5}},566420:(e,r,s)=>{s.d(r,{A:()=>g});var t=s(695155),a=s(212115),i=s(422544),n=s(508296),o=s(257169),l=s(741513),d=s(717452),c=s(202543),u=s(140253),h=s(721931),m=s(345326),p=s(981980),b=s(460147);let g=e=>{let{control:r,controllerNames:s,seq:g,shouldDisplaySeqLabel:A,options:x,originalCashbackRateTierLabel:f,originalPurchaseAmountText:v,isNewCustomerTierExcluded:S}=e,I=(0,c.t)("Incorrect Cashback Form"),[j,T]=(0,a.useState)(!1),[y,R]=(0,a.useState)(!1),E=x.length>10,{clearErrors:_,formState:{errors:k}}=(0,i.xW)();return(0,a.useEffect)(()=>{(j||y)&&_(s.atLeastOneCheckBoxSelected)},[_,s.atLeastOneCheckBoxSelected,j,y]),(0,t.jsxs)(t.Fragment,{children:[A&&(0,t.jsx)(n.A,{weight:"bold",children:"".concat(I("Item")," ").concat(g)}),(0,t.jsx)(n.A,{children:"".concat(I("Whatâs incorrect?"))}),(0,t.jsxs)(p.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsxs)(p.so,{align:"start",width:"100%",gap:"sbds-dimension-size-1",children:[(0,t.jsx)(b.A,{sx:{padding:0},checked:j,onChange:e=>{T(e.target.checked)}}),(0,t.jsxs)(p.BJ,{width:"100%",children:[(0,t.jsx)(n.A,{children:"".concat(I("Eligible purchase amount"))}),(0,t.jsx)(d.JM,{children:"".concat(I("Recorded amount"),": ").concat(v)}),j&&(0,t.jsx)(m.A,{controllerNames:{currencyName:s.purchaseCurrencyName,amountName:s.purchaseAmountName}})]})]}),(0,t.jsxs)(p.so,{align:"start",width:"100%",gap:"sbds-dimension-size-1",children:[(0,t.jsx)(b.A,{sx:{padding:0},checked:y,onChange:e=>{R(e.target.checked)}}),(0,t.jsxs)(p.BJ,{width:"100%",children:[(0,t.jsx)(n.A,{children:"".concat(I("Cashback tier"))}),(0,t.jsx)(d.JM,{children:"".concat(I("Recorded tier"),": ").concat(f)}),y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.A,{name:s.cashbackTierName,control:r,options:x,rules:{required:I("This field is required")},placeholder:I("Select your expected tier"),isSearchable:E,noOptionsMessage:()=>I("No options")}),(0,t.jsx)(u.K,{errors:k,name:s.cashbackTierName,render:e=>{let{message:r}=e;return(0,t.jsx)(h.A,{message:r})}}),(0,t.jsx)(d.JW,{children:I("Select the Cashback tier that best matches your purchase. We're testing this feature, so calculations may change as we fine-tune accuracy.")}
1),S&&(0,t.jsx)(o.A,{variant:"info",header:I("New Customer tier isn't available"),description:I("You've shopped with this store before, so the New Customer tier can't be selected for this purchase.")})]})]})]}),(0,t.jsx)(u.K,{errors:k,name:s.atLeastOneCheckBoxSelected,render:e=>{let{message:r}=e;return(0,t.jsx)(h.A,{message:r})}})]})]})}},574093:(e,r,s)=>{s.d(r,{A:()=>x});var t=s(695155),a=s(672839),i=s(212115),n=s(422544),o=s(235217),l=s(101818),d=s(406368),c=s(202543),u=s(579856),h=s(981980),m=s(288193),p=s(589929),b=s(836185),g=s(47270),A=s(543244);let x=e=>{let{data:r,onCloseDrawer:s=a.A}=e,x=(0,c.t)("Incorrect Cashback Form"),[f,v]=(0,i.useState)(p.U.FORM),[S,I]=(0,i.useState)(null),[j,T]=(0,i.useState)(!1),y=(0,n.mN)({mode:"onChange",defaultValues:{transactionScreenshots:[]}}),R=(0,l.n)({mutationFn:e=>(0,d.c)("api/support/tickets/incorrect-cashback/validate-submission",{method:"POST",body:e}),throwOnError:!1}),E=(0,l.n)({mutationFn:e=>(0,d.c)("api/support/tickets/incorrect-cashback/tickets",{method:"POST",body:e}),throwOnError:!1,onSuccess:e=>{I({icbTicketId:e.id,storeId:e.storeId,storeName:e.storeName}),v(p.U.RESULT),y.reset()},onError:()=>{T(!0)}});(0,i.useEffect)(()=>{(0,u.kS)({screen_type:"incorrect_cashback",screen_name:"submission_form"})},[]);let _=async e=>{if(e.aggregatedCashbackTierItems.some(e=>!e.requestedCashbackRateTier&&!e.requestedPurchaseAmount&&!e.requestedPurchaseCurrency))return void e.aggregatedCashbackTierItems.forEach((e,r)=>{e.requestedCashbackRateTier||e.requestedPurchaseAmount||y.setError("aggregatedCashbackTierItems.".concat(r,".atLeastOneCheckBoxSelected"),{message:x("Select at least one option to continue")})});let s=new FormData,t={cashbackActivityId:e.cashbackActivityId,calculationEngine:e.calculationEngine,orderNumber:null==r?void 0:r.orderId,affiliateNetwork:null==r?void 0:r.networkName,cashbackDetails:e.aggregatedCashbackTierItems.map(e=>({originalCashbackId:e.originalCashbackRateTier.cashbackId,originalCashbackRateTierId:Number(e.originalCashbackRateTier.cashbackRateTierId),originalCashbackRateTierLabel:e.originalCashbackRateTier.cashbackRateTierLabel,requestedCashbackRateTierId:e.requestedCashbackRateTier?Number(e.requestedCashbackRateTier.value):Number(e.originalCashbackRateTier.cashbackRateTierId),requestedCashbackRateTierLabel:e.requestedCashbackRateTier?e.requestedCashbackRateTier.label:e.originalCashbackRateTier.cashbackRateTierLabel,...e.requestedPurchaseAmount&&e.requestedPurchaseCurrency&&{requestedPurchaseAmount:Number((0,A.QE)(e.requestedPurchaseAmount,e.requestedPurchaseCurrency.value))},...e.requestedPurchaseCurrency&&{requestedPurchaseCurrency:e.requestedPurchaseCurrency.value}})),promoteCode:e.promoteCode,additionalInfo:e.additionalInfo};try{let r=(await R.mutateAsync({orderNumber:t.orderNumber,affiliateNetwork:t.affiliateNetwork,calculationEngine:t.calculationEngine,cashbackDetails:t.cashbackDetails.map(e=>{var r;return{originalCashbackId:e.originalCashbackId,originalCashbackRateTierId:e.originalCashbackRateTierId,requestedCashbackRateTierId:null!=(r=e.requestedCashbackRateTierId)?r:e.originalCashbackRateTierId}})})).cashbackDetails.filter(e=>!e.eligible);if(r.length>0)return void e.aggregatedCashbackTierItems.forEach((e,s)=>{r.find(r=>r.cashbackId===e.originalCashbackRateTier.cashbackId)&&y.setError("aggregatedCashbackTierItems.".concat(s,".requestedCashbackRateTier"),{message:x("This order was already tracked at this tier. Try another.")})})}catch(e){T(!0);return}e.transactionScreenshots.forEach((e,r)=>{s.append("uploadFile[".concat(r,"]"),e)}),s.append("payload",JSON.stringify(t)),E.mutate(s)};return(0,t.jsx)(m.A,{data:r,isGrayBackground:f!==p.U.RESULT,children:(0,t.jsx)(n.Op,{...y,children:(0,t.jsx)("form",{onSubmit:y.handleSubmit(_),children:E.isPending?(0,t.jsx)(h.so,{mt:"sbds-dimension-space-size-xl",justifyContent:"center",alignItems:"center",children:(0,t.jsx)(o.A,{color:"inherit",size:30})}):(0,t.jsx)(t.Fragment,{children:(()=>{if(!r)return null;switch(f){case p.U.FORM:return(0,t.jsx)(b.A,{data:{source:r.source,orderId:r.orderId,networkName:r.networkName,refId:r.refId},isSubmissionPending:R.isPending,isSubmitErrorSnackbarOpen:j,setSubmitErrorSnackbarOpen:T,onCloseDrawer:s});case p.U.RESULT:return(0,t.jsx)(g.A,{icbInfo:S,onCloseDrawer:s})}})()})})})})}},576290:(e,r,s)=>{s.d(r,{A:()=>c});var t=s(695155),a=s(981980),i=s(406098),n=s(74464),o=s(202543);let l=(0,a.I4)("div",{base:{display:"flex",flexShrink:"0",alignItems:"center",justifyContent:"space-between",height:"60px",paddingX:"12px",borderBottom:"1px solid #ebebeb"}}),d=(0,a.I4)("span",{base:{fontSize:"18px",fontWeight:"bold",color:"sbds-color-black"}}),c=e=>{let{shouldHideBackBtn:r,onCloseDrawer:s,onGoBack:a}=e,c=(0,o.t)();return(0,t.jsxs)(l,{children:[r?(0,t.jsx)(t.Fragment,{children:"\xa0"}):(0,t.jsx)(i.A,{iconOnly:n.Z3,variant:"plain",onClick:a}),(0,t.jsx)(d,{children:c("ShopBack Help")}),s?(0,t.jsx)(i.A,{iconOnly:n.FB,variant:"plain",onClick:s}):(0,t.jsx)(t.Fragment,{children:"\xa0"})]})}},586797:(e,r,s)=>{s.d(r,{A:()=>x});var t=s(695155),a=s(981980),i=s(212115),n=s(202543),o=s(398122),l=s(406368),d=s(717485),c=s(415662),u=s(223757),h=s(406098),m=s(101818),p=s(119456),b=s(32078),g=s(821628),A=s(12034);let x=e=>
1{let{withdrawalData:r,setResultScreen:s,setMessageDate:x,setLoading:f}=e,v=(0,n.t)(),S=(0,g.A)(),[I,j]=(0,i.useState)(""),[T,y]=(0,i.useState)(!1),R=(0,o.T)(),{mutate:E}=(0,m.n)({mutationFn:e=>(0,l.c)("api/withdraw-action/rollback",{method:"POST",body:e}),throwOnError:!1,onMutate:()=>{f(!0)},onSuccess:()=>{f(!1),s({actionType:"REQUEST_RA",resultType:"SUCCESS"})},onError:e=>{let{body:t}=e,a=t.code||"",i=(0,d.A)(t.data,["requestAfter"])||(0,d.A)(t.data,["requestWithin"]),n=(0,d.A)(r,["createdAt"]);f(!1),s({actionType:"CANCEL_REQUEST",resultType:a});let o=(0,p.f)(i)?(0,b.f)(new Date(n),i):new Date(n);x(S.formatDate("LLL, dd yyyy",o))}});return(0,t.jsxs)("div",{children:[(0,t.jsx)(u.A,{variant:"paragraph-1",weight:"bold",children:v("Cancel Withdrawal Request")}),(0,t.jsxs)(a.az,{mt:"sbds-dimension-space-size-m",className:"form-group",children:[(0,t.jsx)(c.A,{label:v("Cancel Reason"),multiline:!0,minRows:3,placeholder:v("Let us know why you want to cancel this withdrawal request"),value:I,onChange:e=>{j(e.target.value)}}),T&&(0,t.jsx)(a.az,{pt:"4px",color:"sbds-interaction-color-danger",children:(0,t.jsx)(u.A,{variant:"paragraph-4",children:v("Cancel Reason is required")})}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(h.A,{size:"lg",onClick:()=>{if(I){var e,s,t,a,i;y(!1),E({...(0,A.J)(r),accountId:null==(e=R.user)?void 0:e.id,name:null==(s=R.user)?void 0:s.name,phone:null==(a=R.user)||null==(t=a.phone_numbers[
10])?void 0:t.number,email:null==(i=R.user)?void 0:i.email,withdrawalCancelReason:I})}else y(!0)},fullWidth:!0,children:v("Cancel Withdrawal Request")})})]})]})}},589929:(e,r,s)=>{s.d(r,{U:()=>t});let t={FORM:0,RESULT:1}},598075:(e,r,s)=>{s.d(r,{pi:()=>a});var t=s(981980);let a=(0,t.I4)("h1",{base:{fontWeight:"bold",fontSize:"sbds-font-size-6",lineHeight:"line-height-4",letterSpacing:"-0.44px",color:"sbds-color-black"}});(0,t.I4)("div",{base:{marginTop:"sbds-dimension-space-size-m",display:"flex",flexDirection:"column",gap:"4px"}}),(0,t.I4)("div",{base:{fontSize:"sbds-font-size-5",lineHeight:"line-height-4",letterSpacing:"0.1px",color:"sbds-color-black"}}),(0,t.I4)("div",{base:{fontSize:"sbds-font-size-3",lineHeight:"line-height-2",letterSpacing:"0.4px",color:"sbds-color-gray-30"}})},599813:(e,r,s)=>{s.d(r,{A:()=>x});var t=s(695155),a=s(981980),i=s(268030),n=s(393091),o=s(345326),l=s(406098),d=s(223757),c=s(920282),u=s(202543),h=s(422544),m=s(140253),p=s(340335),b=s(808694),g=s(721931),A=s(460147);let x=e=>{let{onSetStep:r,isSubmitErrorSnackbarOpen:s,setSubmitErrorSnackbarOpen:x,submitErrorSnackbarMessage:f,isSubmittingForm:v}=e,S=(0,u.t)(),{control:I,formState:{errors:j}}=(0,h.xW)();return(0,t.jsxs)("div",{children:[(0,t.jsx)(p.pi,{children:S("Payment and additional info")}),(0,t.jsxs)(p.GX,{children:[(0,t.jsx)(o.A,{controllerNames:{currencyName:"currency",amountName:"amount"}}),(0,t.jsx)(a.az,{mt:1,children:(0,t.jsx)(n.A,{name:"voucherCode",control:I,placeholder:S("Enter any Promo code you've used"),label:S("Promo code (optional)")})}),(0,t.jsx)(a.az,{mt:1,children:(0,t.jsx)(n.A,{name:"additionalInfo",control:I,placeholder:S("Share any extra details that may help speed up the investigation"),minRows:3,multiline:!0,label:S("Additional info (optional)")})}),(0,t.jsxs)(a.az,{mt:1,children:[(0,t.jsxs)(a.so,{align:"start",gap:"sbds-dimension-size-1",children:[(0,t.jsx)(h.xI,{control:I,name:"userDeclaration",rules:{required:S("You must check this box to continue.")},render:e=>{let{field:{onChange:r,value:s,...a}}=e;return(0,t.jsx)(A.A,{className:(0,i.AH)({padding:0,color:j.userDeclaration?"{colors.sbds-color-red-50}":"inherit"}),...a,checked:!!s,onChange:e=>{r(e.target.checked)}})}}),(0,t.jsx)(d.A,{variant:"paragraph-2",children:S("I confirm my details are accurate and understand submitting false details could lead to a permanent ban.")})]}),(0,t.jsx)(a.az,{mt:1,ml:4,children:(0,t.jsx)(m.K,{errors:j,name:"userDeclaration",render:e=>{let{message:r}=e;return(0,t.jsx)(g.A,{message:r})}})})]}),(0,t.jsxs)(a.az,{my:"sbds-dimension-size-1",style:{position:"relative"},children:[(0,t.jsx)(b.A,{open:s,handleClose:()=>x(!1),message:f}),(0,t.jsxs)(a.xA,{columns:2,gap:"sbds-dimension-space-size-m",mt:"sbds-dimension-space-size-m",children:[(0,t.jsx)(a.Ei,{colSpan:1,children:(0,t.jsx)(l.A,{className:(0,i.AH)({border:"1px solid {colors.sbds-color-black}"}),size:"lg",fullWidth:!0,variant:"plain",disabled:v,onClick:()=>r(c.Lu.SHOPPING_TRIP_DETAIL),children:S("Back")})}),(0,t.jsx)(a.Ei,{colSpan:1,children:(0,t.jsx)(l.A,{size:"lg",type:"submit",fullWidth:!0,disabled:v||j&&Object.keys(j).length>0,isLoading:v,children:S("Submit")})})]})]})]})]})}},607372:(e,r,s)=>{s.d(r,{A:()=>C});var t=s(695155),a=s(212115),i=s(653455),n=s(981980),o=s(821628),l=s(422544),d=s(202543),c=s(140253),u=s(32078),h=s(757368),m=s(619056),p=s(119456),b=s(991094),g=s(367377),A=s(721931),x=s(223757),f=s(406098),v=s(460663),S=s(15758),I=s(77391),j=s(717485),T=s(172723),y=s(479824),R=s(259040);let E=(0,n.I4)(f.A,{base:{borderRadius:"4px"}}),_={dateFrom:"",dateTo:"",proofFile:null},k={validateDate:0,validateProof:1},C=e=>{let{merchantName:r,orderId:s,purchasedDate:f,onSubmitReport:C,onValidationError:D,cashback:O}=e,w=(0,d.t)(),N=(0,o.A)(),[z,P]=(0,a.useState)(k.validateDate),L=(0,j.A)(O,"template.value.eoutletId"),{data:B}=(0,i.I)({queryKey:["api/v1/internal/e-outlets/".concat(L,"/tracking-information")],enabled:!!L,throwOnError:!1}),F=(0,j.A)(B,"displayClaimTime","90 DAYS"),{control:M,formState:{errors:H},setError:W,clearErrors:U,handleSubmit:q,resetField:G}=(0,l.mN)({defaultValues:_,mode:"onChange"}),[V,K,J]=(0,l.FH)({control:M,name:["dateFrom","dateTo","proofFile"]}),Y=(0,T.A)([V,K],y.A)||!(0,y.A)(H.dateFrom)||!(0,y.A)(H.dateTo),X=(0,T.A)([V,K,J],y.A)||!(0,y.A)(H);return(0,t.jsxs)("form",{onSubmit:q(e=>{C(e)}),children:[(0,t.jsx)(R.pi,{children:w("Cashback Pending for too long?")}),(0,t.jsx)(n.az,{mt:"sbds-dimension-space-size-s",children:(0,t.jsx)(x.A,{variant:"paragraph-2",children:w("Weâve noticed that your purchase with {merchantName} (Order ID: {orderId}) made on {validDate} has yet to be confirmed.",{merchantName:r,orderId:s,validDate:N.formatDate("yyyy-MM-dd",f)})})}),(0,t.jsx)(n.az,{mt:"sbds-dimension-space-size-s",children:(0,t.jsx)(x.A,{variant:"paragraph-2",weight:"bold",children:w("Let us know the details below so that we can assist you:")})}),(0,t.jsxs)(n.xA,{mt:"sbds-dimension-space-size-s",columns:2,children:[(0,t.jsxs)(n.Ei,{colSpan:1,children:[(0,t.jsx)(R.R8,{children:w("Travel start date")}),(0,t.jsx)(l.xI,{control:M,name:"dateFrom",rules:{required:w("This is a required field"),validate:{validFormat:e=>{let r=(0,m.H)(e);
1return!!(0,p.f)(r)||w("Travel date from is invalid format.")},validSequence:(e,r)=>{let{dateTo:s}=r;if(!s)return!1;let t=(0,m.H)(e),a=(0,m.H)(s);if((0,p.f)(t)&&(0,p.f)(a))return!!((0,h.d)(a,t)||(0,b.n)(a,t))||w("End date must be the same as or after start date")}}},render:e=>{let{field:{value:r,onChange:s},fieldState:{error:a}}=e;return(0,t.jsx)(v.A,{value:r,onChange:s,disableOriginError:!0,error:!!a})}}),(0,t.jsx)(c.K,{errors:H,name:"dateFrom",render:e=>{let{message:r}=e;return(0,t.jsx)(A.A,{message:r})}})]}),(0,t.jsxs)(n.Ei,{colSpan:1,children:[(0,t.jsx)(R.R8,{children:w("Travel end date")}),(0,t.jsx)(l.xI,{control:M,name:"dateTo",rules:{required:w("This is a required field"),validate:{validFormat:e=>{let r=(0,m.H)(e);return!!(0,p.f)(r)||w("Travel date to is invalid format.")},validSequence:(e,r)=>{let{dateFrom:s}=r;if(!s)return!1;let t=(0,m.H)(s),a=(0,m.H)(e);(0,p.f)(t)&&(0,p.f)(a)&&((0,g.Y)(a,t)?W("dateFrom",{type:"custom",message:w("End date must be the same as or after start date")}):U(["dateFrom"]))}}},render:e=>{let{field:{value:r,onChange:s},fieldState:{error:a}}=e;return(0,t.jsx)(v.A,{value:r,onChange:s,disableOriginError:!0,error:!!a})}})]})]}),z===k.validateDate&&(0,t.jsx)(n.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(E,{onClick:()=>{let e=((e,r)=>{let s=(e=>{if(!e.split(" ").length)return 90;let r=e.split(" ")[0];return"0"===r?90:(0,I.A)(r)?(0,I.A)(r):90})(r);return(0,u.f)(e,s)})(K,F);(0,h.d)(e,new Date)&&D({invalidMessageKey:"It seems that your transaction is still within the validation period for {merchantName}. Please check again after {validDate} for an update on this. You may also refer to {merchantName} page for the updated T&Cs.",validDate:e}),P(k.validateProof)},fullWidth:!0,disabled:Y,children:w("Continue")})}),z===k.validateProof&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.az,{mt:"sbds-dimension-space-size-s",children:(0,t.jsx)(S.A,{control:M,name:"proofFile",errors:H,rules:{required:w("This is a required field")},resetField:G})}),(0,t.jsx)(n.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(E,{type:"submit",fullWidth:!0,disabled:X,children:w("submit")})})]})]})}},612641:(e,r,s)=>{s.d(r,{A:()=>x});var t=s(695155),a=s(460663),i=s(721931),n=s(140253),o=s(717485),l=s(212115),d=s(422544),c=s(202543),u=s(619056),h=s(119456),m=s(391195),p=s(757368),b=s(991094),g=s(367377);let A=()=>{let e=(0,c.t)(),{control:r,formState:{errors:s},getValues:A}=(0,d.xW)();return(0,l.useMemo)(()=>{let e=A("selectedStore");return(0,o.A)(e,"isTravel",!1)},[A])?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"block__form-row",children:[(0,t.jsx)("div",{className:"block__form-field-label",children:e("Travel start date")}),(0,t.jsx)(d.xI,{control:r,name:"travelFromDate",rules:{required:e("This is a required field"),validate:{validFormat:r=>{let s=(0,u.H)(r);return!!(0,h.f)(s)||e("Travel date from is invalid format.")},afterPurchaseDate:(r,s)=>{var t;let a=null==(t=s.purchaseDate)?void 0:t.formattedISODate;if(!a)return!0;let i=(0,u.H)(a),n=(0,u.H)(r);return!((0,h.f)(i)&&(0,h.f)(n))||(0,m.m)(n,i)>=0||e("Travel dates must be on or after your purchase date")},validSequence:(r,s)=>{let{travelToDate:t}=s;if(!t)return!0;let a=(0,u.H)(r),i=(0,u.H)(t);if((0,h.f)(a)&&(0,h.f)(i))return!!((0,p.d)(i,a)||(0,b.n)(i,a))||e("End date must be the same as or after start date")}}},render:e=>{let{field:{value:r,onChange:s},fieldState:{error:i}}=e;return(0,t.jsx)(a.A,{value:r,onChange:s,disableOriginError:!0,error:!!i})}}),(0,t.jsx)(n.K,{errors:s,name:"travelFromDate",render:e=>{let{message:r}=e;return(0,t.jsx)(i.A,{message:r})}})]}),(0,t.jsxs)("div",{className:"block__form-row",children:[(0,t.jsx)("div",{className:"block__form-field-label",children:e("Travel end date")}),(0,t.jsx)(d.xI,{control:r,name:"travelToDate",rules:{required:e("This is a required field"),validate:{validFormat:r=>{let s=(0,u.H)(r);return!!(0,h.f)(s)||e("Travel date to is invalid format.")},afterPurchaseDate:(r,s)=>{var t;let a=null==(t=s.purchaseDate)?void 0:t.formattedISODate;if(!a)return!0;let i=(0,u.H)(a),n=(0,u.H)(r);return!((0,h.f)(i)&&(0,h.f)(n))||(0,m.m)(n,i)>=0||e("Travel dates must be on or after your purchase date")},validSequence:(r,s)=>{let{travelFromDate:t}=s;if(!t)return!0;let a=(0,u.H)(t),i=(0,u.H)(r);return!((0,h.f)(a)&&(0,h.f)(i))||!(0,g.Y)(i,a)||e("End date must be the same as or after start date")}}},render:e=>{let{field:{value:r,onChange:s},fieldState:{error:i}}=e;return(0,t.jsx)(a.A,{value:r,onChange:s,disableOriginError:!0,error:!!i})}}),(0,t.jsx)(n.K,{errors:s,name:"travelToDate",render:e=>{let{message:r}=e;return(0,t.jsx)(i.A,{message:r})}})]})]}):null};A.displayName="TravelDate";let x=A},614894:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(855511)},615310:(e,r,s)=>{s.d(r,{_U:()=>t});let t="flag-mcb-submission-enabled"},616520:(e,r,s)=>{s.d(r,{A:()=>c});var t=s(695155),a=s(981980),i=s(202543),n=s(821628),o=s(406098),l=s(259040),d=s(223757);let c=e=>{let{onSubmitReport:r,merchantName:s,orderId:c,purchasedDate:u}=e,h=(0,i.t)(),m=(0,n.A)().formatDate("yyyy-MM-dd",u);return(0,t.jsxs)("div",{children:[(0,t.jsx)(l.pi,{children:h("Cashback Pending for too long?")}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-s",children:(0,t.jsx)(d.A,{variant:"paragraph-3",children:h("Weâve noticed that your purchase with {merchantName} (Order ID: {orderId}) made on {validDate} has yet to be confirmed.",{merchantName:s,orderId:c,validDate:m})})}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-s"}),(0,t.jsx)(d.A,{variant:"paragraph-3",children:h("Do you want to report this issue?")}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-s",children:(0,t.jsx)(o.A,{fullWidth:!0,onClick:r,children:h("Report")})})]})}},644265:(e,r,s)=>{s.d(r,{A:()=>j});var t=s(695155),a=s(212115),i=s(422544),n=s(406098),o=s(223757),l=s(460147),d=s(393091),c=s(717452),u=s(202543),h=s(981980),m=s(698297),p=s(248801),b=s(566420),g=s(653455),A=s(140253),x=s(721931),f=s(341590),v=s(808694),S=s(268030);let I=(0,h.I4)("div",{base:{"& > div":{padding:"{spacing.sbds-dimension-space-size-l} {spacing.sbds-dimension-space-size-m}",backgroundColor:"sbds-color-white"}}}),j=e=>{let{data:r,isSubmissionPending:s,isSubmitErrorSnackbarOpen:j,setSubmitErrorSnackbarOpen:T}=e,y=(0,u.t)("Incorrect Cashback Form"),{control:R,formState:{errors:E},setValue:_,getFieldState:k}=(0,i.xW)(),C=(0,i.FH)({control:R,name:"cashbackTierItems"}),D=!(null==r?void 0:r.orderId)||!(null==r?void 0:r.networkName),{fields:O,append:w,remove:N}
1=(0,i.jz)({control:R,name:"aggregatedCashbackTierItems"}),{data:{originalTierOptions:z,activeTierOptions:P,cashbackActivityId:L,isGroupedCashback:B,excludedNewCustomerTier:F,calculationEngine:M}={originalTierOptions:[],activeTierOptions:[],cashbackActivityId:null,isGroupedCashback:!1,excludedNewCustomerTier:!1,calculationEngine:"RAT"},isLoading:H,isSuccess:W}=(0,g.I)({queryKey:["api/support/tickets/incorrect-cashback/cashback-rate-tiers",{orderId:null==r?void 0:r.orderId,affiliateNetwork:null==r?void 0:r.networkName}],enabled:!D,throwOnError:!1,select:e=>{let r=e.originalCashbackRateTiers.cashbackRateTiers.map((e,r)=>{let s=r+1,t="".concat(y("Item")," ").concat(s);return{cashbackId:e.cashbackId,seq:s,seqLabel:t,label:"".concat(t," (").concat(e.purchaseAmountText,")"),value:e.cashbackId,cashbackRateTierLabel:e.cashbackRateTierLabel,cashbackRateTierId:e.cashbackRateTierId,purchaseAmountText:e.purchaseAmountText}}),s=e.activeCashbackRateTiers.map(e=>({label:e.cashbackRateTierLabel,value:e.cashbackRateTierId.toString(),cashbackRateTierLabel:"All customers"===e.cashbackRateTierLabel?y("All customers"):e.cashbackRateTierLabel,cashbackRateTierId:e.cashbackRateTierId})),t=e.originalCashbackRateTiers.cashbackActivityId,a=e.originalCashbackRateTiers.isGroupedCashback;return{originalTierOptions:r,activeTierOptions:s,cashbackActivityId:t,isGroupedCashback:a,excludedNewCustomerTier:e.excludedNewCustomerTier,calculationEngine:e.calculationEngine}}});return(0,a.useEffect)(()=>{W&&((null==r?void 0:r.refId)?_("cashbackActivityId",r.refId):_("cashbackActivityId",L),_("calculationEngine",M),B||_("cashbackTierItems",z))},[M,L,null==r?void 0:r.refId,W,B,z,_]),(0,a.useEffect)(()=>{N(),null==C||C.forEach(e=>{w({originalCashbackRateTier:e,requestedCashbackRateTier:null,requestedPurchaseAmount:null,requestedPurchaseCurrency:null})})},[w,C,N]),(0,t.jsxs)(I,{children:[(0,t.jsx)(m.A,{title:y("Request help on incorrect Cashback amount"),description:y("Noticed an issue with your Cashback? Share more details with us, and weâll work to ensure you receive the correct amount.")}),(0,t.jsx)(v.A,{open:j,handleClose:()=>T(!1)}),(0,t.jsxs)(h.BJ,{gap:"sbds-dimension-space-size-xl",children:[(0,t.jsx)(h.BJ,{gap:"sbds-dimension-space-size-s",children:(0,t.jsx)(f.A,{name:"transactionScreenshots",title:y("Transaction screenshots"),description:y("Make sure your order details are clear and fully visible. You can upload up to 3 images (max 5MB each)."),isMultiple:!0})}),B&&(0,t.jsxs)(h.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(c.pi,{children:y("Which items would you like help with?")}),(0,t.jsx)(p.A,{control:R,name:"cashbackTierItems",options:z,rules:{required:y("This field is required")},isLoading:H}),(0,t.jsx)(A.K,{errors:E,name:"cashbackTierItems",render:e=>{let{message:r}=e;return(0,t.jsx)(x.A,{message:r})}})]}),O.length>0&&(0,t.jsxs)(h.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(c.pi,{children:y("Verify your Cashback tier")}),O.map((e,r)=>(0,t.jsx)(b.A,{seq:e.originalCashbackRateTier.seq,shouldDisplaySeqLabel:B,control:R,controllerNames:{cashbackTierName:"aggregatedCashbackTierItems[".concat(r,"].requestedCashbackRateTier"),purchaseAmountName:"aggregatedCashbackTierItems[".concat(r,"].requestedPurchaseAmount"),purchaseCurrencyName:"aggregatedCashbackTierItems[".concat(r,"].requestedPurchaseCurrency"),atLeastOneCheckBoxSelected:"aggregatedCashbackTierItems[".concat(r,"].atLeastOneCheckBoxSelected")},originalCashbackRateTierLabel:e.originalCashbackRateTier.cashbackRateTierLabel,originalPurchaseAmountText:e.originalCashbackRateTier.purchaseAmountText,options:P,isNewCustomerTierExcluded:F},e.id))]}),(0,t.jsxs)(h.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(c.pi,{children:y("Promo code (optional)")}),(0,t.jsx)(d.A,{name:"promoteCode",control:R,placeholder:y("Enter any Promo code you've used")})]}),(0,t.jsxs)(h.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(c.pi,{children:y("Additional info (optional)")}),(0,t.jsx)(d.A,{name:"additionalInfo",control:R,placeholder:y("Share any extra details that may help speed up the investigation"),minRows:3,multiline:!0})]}),(0,t.jsxs)(h.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsxs)(h.so,{align:"start",ga
1p:"sbds-dimension-size-1",children:[(0,t.jsx)(i.xI,{control:R,name:"userDeclaration",rules:{required:y("You must check this box to continue.")},render:e=>{let{field:{onChange:r,value:s,...a}}=e;return(0,t.jsx)(l.A,{className:(0,S.AH)({padding:0,color:k("userDeclaration").error?"{colors.sbds-color-red-50}":"inherit"}),...a,checked:!!s,onChange:e=>{r(e.target.checked)}})}}),(0,t.jsx)(o.A,{variant:"paragraph-2",children:y("I confirm my details are accurate and understand submitting false details could lead to a permanent ban.")})]}),(0,t.jsx)(h.az,{mt:1,ml:4,children:(0,t.jsx)(A.K,{errors:E,name:"userDeclaration",render:e=>{let{message:r}=e;return(0,t.jsx)(x.A,{message:r})}})})]}),(0,t.jsx)(h.az,{pb:18,style:{position:"relative"},children:(0,t.jsxs)(h.BJ,{gap:"sbds-dimension-space-size-s",children:[!H&&!W&&(0,t.jsx)(x.A,{message:y("Something went wrong")}),(0,t.jsx)(n.A,{size:"lg",type:"submit",fullWidth:!0,isLoading:s,disabled:D||!W,children:y("Submit")})]})})]})]})}},651321:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(132440)},672978:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(900015)},673276:(e,r,s)=>{s.d(r,{A:()=>d});var t=s(695155),a=s(717485),i=s(212115),n=s(461543);let o={dropdownIndicator:(e,r)=>{let s=(0,a.A)(r,["selectProps","isLoading"]);return{...e,...s&&{display:"none"}}},indicatorSeparator:(e,r)=>{let s=(0,a.A)(r,["selectProps","displaySeparator"]);return{...e,...!s&&{display:"none"}}},option:(e,r)=>({...e,backgroundColor:"#fff","&:hover":r.isDisabled?{cursor:"not-allowed"}:{color:"#ff4e4e !important",backgroundColor:"#f5f5f5 !important"},color:r.isDisabled?"#6A717F":"#232938",fontWeight:r.isSelected?"bold":"normal",fontSize:"16px",lineHeight:"24px","& .select-option__desc":{fontSize:"14px",lineHeight:"20px"}}),control:(e,r)=>({...e,...(0,a.A)(r,"selectProps.error",!1)&&{borderColor:"#E0311E"}})},l=(0,i.forwardRef)((e,r)=>{let s={...o,...e.styles};return(0,t.jsx)(n.Ay,{...e,ref:r,styles:s})});l.displayName="Customized Select";let d=l},678573:(e,r,s)=>{s.d(r,{A:()=>A});var t=s(695155),a=s(981980),i=s(684211),n=s(223757),o=s(717485),l=s(202543),d=s(74464),c=s(101818),u=s(406368),h=s(119456),m=s(32078),p=s(821628),b=s(398122),g=s(12034);let A=e=>{let{withdrawalData:r,setResultScreen:s,setLoading:A,setMessageDate:x}=e,f=(0,l.t)(),v=(0,p.A)(),S=(0,b.T)(),{mutate:I}=(0,c.n)({mutationFn:e=>(0,u.c)("api/withdraw-action/check-status",{method:"POST",body:e}),throwOnError:!1,onMutate:()=>{A(!0)},onSuccess:()=>{A(!1),s({actionType:"CHECK_STATUS",resultType:"SUCCESS"})},onError:e=>{let{body:t}=e,a=t.code||"",i=(0,o.A)(t.data,["requestAfter"])||(0,o.A)(t.data,["requestWithin"]),n=(0,o.A)(r,["createdAt"]);A(!1),s({actionType:"CHECK_STATUS",resultType:a});let l=(0,h.f)(i)?(0,m.f)(new Date(n),i):new Date(n);x(v.formatDate("LLL, dd yyyy",l))}});return(0,t.jsx)(i.E,{onClick:()=>{var e,s,t,a,i;I({...(0,g.J)(r),accountId:null==(e=S.user)?void 0:e.id,name:null==(s=S.user)?void 0:s.name,phone:null==(a=S.user)||null==(t=a.phone_numbers[
10])?void 0:t.number,email:null==(i=S.user)?void 0:i.email})},children:(0,t.jsxs)(a.so,{justify:"space-between",align:"center",overflow:"auto",children:[(0,t.jsx)(n.A,{variant:"paragraph-3",children:f("Check Payment Status")}),(0,t.jsx)(d.Qp,{size:"sm"})]})})}},680560:(e,r,s)=>{s.d(r,{A:()=>p});var t=s(695155),a=s(981980),i=s(212115),n=s(553367),o=s(406098),l=s(761722),d=s(202543),c=s(579856);let u=(0,a.I4)("div",{base:{fontSize:"sbds-font-size-5",fontWeight:"bold",lineHeight:"1.22",letterSpacing:"normal"}}),h=(0,a.I4)("div",{base:{fontSize:"sbds-font-size-4",lineHeight:"1.29",letterSpacing:"normal",textAlign:"center",marginTop:"1rem"}}),m=e=>{let{screenName:r,title:s,description:m,imageAlt:p,onCloseDrawer:b}=e,g=(0,d.t)();return(0,i.useEffect)(()=>{(0,c.xO)({screen_type:"support",screen_name:r},"Web.View.Screen")},[r]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(l.A,{src:n.A,alt:p,width:260,height:260,noBackground:!0,borderRadius:"sbds-dimension-border-radius-none",unoptimized:!0})}),(0,t.jsx)(a.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(u,{children:s})}),(0,t.jsx)(h,{children:m}),(0,t.jsx)(a.so,{justify:"center",mt:"1rem",children:(0,t.jsx)(o.A,{size:"lg",fullWidth:!0,className:"result-page__button",onClick:()=>{(0,c.qL)({screen_type:"support",screen_name:r,ui_element_type:"done"}),b()},children:g("Done")})})]})};m.displayName="ResultErrorScreen";let p=m},684211:(e,r,s)=>{s.d(r,{E:()=>t});let t=(0,s(981980).I4)("div",{base:{padding:"{spacing.sbds-dimension-space-size-xs} {spacing.sbds-dimension-space-size-s}",width:"100%",border:"1px solid {colors.sbds-color-gray-10}",cursor:"pointer"}})},686213:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(616520)},688183:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=()=>{let e=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("Weâre sorry if you still havenât received the payment. Weâre checking with our finance team and will get back to you soon via email.")}),(0,t.jsx)(a.az,{mt:"1rem",children:e("Thank you for reaching out to us.")})]})}},698297:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(264160)},713014:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(695155),a=s(696895),i=s(297106),n=s(268030),o=s(981980),l=s(74464);let d={sm:"paragraph-4",md:"paragraph-3",lg:"paragraph-2"},c=(0,n.Fj)({base:{display:"flex",flexDirection:"column","& >p":{marginBottom:8},"& .MuiInputBase-root":{borderRadius:12,border:"1px solid token(colors.sbds-border-color-medium)",fontSize:14,padding:"5px 12px"},"& input":{padding:0}},variants:{size:{sm:{"& >p":{marginBottom:4},"& .MuiInputBase-root":{borderRadius:8,fontSize:12,padding:"{spacing.sbds-dimension-space-size-xs} {spacing.sbds-dimension-space-size-s}"},"& input":{padding:0}},md:{"& >p":{marginBottom:8},"& .MuiInputBase-root":{borderRadius:12,fontSize:14}},lg:{"& >p":{marginBottom:12},"& .MuiInputBase-root":{borderRadius:16,fontSize:16,padding:"12px 16px"},"& input":{padding:0}}}},defaultVariants:{size:"md"}}),u=e=>{let{customStyle:r,label:s,hint:u,size:h,className:m,helperText:p,error:b,...g}=e;return(0,t.jsxs)("div",{className:(0,n.cx)(m,r,c({size:h})),children:[s&&(0,t.jsx)(i.A,{variant:d[null!=h?h:"md"],weight:"bold",children:s}),u&&(0,t.jsx)(i.A,{variant:"caption-1",tone:"secondary",children:u}),(0,t.jsx)(a.Ay,{...g}),p&&(0,t.jsx)(o.az,{mt:"sbds-dimension-space-size-xs",children:(0,t.jsxs)(o.so,{align:"center",children:[b&&(0,t.jsx)(o.az,{children:(0,t.jsx)(l.BR,{size:"sm",color:"danger"})}),(0,t.jsx)(i.A,{variant:"caption-1",weight:"medium",tone:b?"critical":"secondary",customStyle:(0,n.AH)({ml:"sbds-dimension-space-size-xs"}),children:p})]})})]})}},717452:(e,r,s)=>{s.d(r,{JM:()=>i,JW:()=>n,pi:()=>a});var t=s(981980);let a=(0,t.I4)("h1",{base:{fontWeight:"bold",fontSize:"sbds-font-size-6",lineHeight:"line-height-4",letterSpacing:"-0.44px",color:"sbds-color-black"}});(0,t.I4)("div",{base:{marginTop:"sbds-dimension-space-size-m",display:"flex",flexDirection:"column",gap:"4px"}}),(0,t.I4)("div",{base:{fontSize:"sbds-font-size-5",lineHeight:"line-height-4",letterSpacing:"0.1px",color:"sbds-color-black"}});let i=(0,t.I4)("div",{base:{fontSize:"sbds-font-size-4",lineHeight:"line-height-3",letterSpacing:"0.1px",color:"sbds-color-black"}}),n=(0,t.I4)("div",{base:{fontSize:"sbds-font-size-3",lineHeight:"line-height-2",letterSpacing:"0.4px",color:"sbds-color-gray-30"}})},721931:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(160564)},722645:(e,r,s)=>{s.d(r,{A:()=>A});var t=s(695155),a=s(981980),i=s(684211),n=s(223757),o=s(74464),l=s(202543),d=s(398122),c=s(101818),u=s(406368),h=s(119456),m=s(32078),p=s(821628),b=s(717485),g=s(12034);let A=e=>{let{withdrawalData:r,setMessageDate:s,setResultScreen:A,setLoading:x}=e,f=(0,l.t)(),v=(0,d.T)(),S=(0,p.A)(),{mutate:I}=(0,c.n)({mutationFn:e=>(0,u.c)("api/withdraw-action/request-ra",{method:"POST",body:e}),throwOnError:!1,onMutate:()=>{x(!0)},onSuccess:()=>{x(!1),A({actionType:"REQUEST_RA",resultType:"SUCCESS"})},onError:e=>{let{body:t}=e,a=t.code||"",i=(0,b.A)(t.data,["requestAfter"])||(0,b.A)(t.data,["requestWithin"]),n=(0,b.A)(r,["createdAt"]);x(!1),A({actionType:"CHECK_STATUS",resultType:a});let o=(0,h.f)(i)?(0,m.f)(new Date(n),i):new Date(n);s(S.formatDate("LLL, dd yyyy",o))}});return(0,t.jsx)(i.E,{onClick:()=>{var e,s,t,a,i;I({...(0,g.J)(r),accountId:null==(e=v.user)?void 0:e.id,name:null==(s=v.user)?void 0:s.name,phone:null==(a=v.user)||null==(t=a.phone_numbers[
10])?void 0:t.number,email:null==(i=v.user)?void 0:i.email})},children:(0,t.jsxs)(a.so,{justify:"space-between",align:"center",children:[(0,t.jsx)(n.A,{variant:"paragraph-3",children:f("Check Payment Status")}),(0,t.jsx)(o.Qp,{size:"sm"})]})})}},725778:(e,r,s)=>{s.d(r,{A:()=>x});var t=s(695155),a=s(212115),i=s(981980),n=s(508296),o=s(393091),l=s(741513),d=s(140253),c=s(721931),u=s(422544),h=s(234965),m=s(202543),p=s(398122),b=s(543244),g=s(268030);let A=h.V.map(e=>({label:e,value:e})),x=e=>{let{controllerNames:{currencyName:r,amountName:s}}=e,h=(0,m.t)(),x=(0,p.T)().currency,{control:f,clearErrors:v,setValue:S,getFieldState:I,formState:{errors:j}}=(0,u.xW)(),T=(0,u.FH)({control:f,name:r});return(0,a.useEffect)(()=>(S(r,A.find(e=>{let{value:r}=e;return r===(x||"SGD")})),()=>{v([s,r])}),[x,r,s,S,v]),(0,t.jsxs)(i.BJ,{gap:"sbds-dimension-space-size-s",children:[(0,t.jsxs)(i.xA,{columns:3,gap:0,children:[(0,t.jsxs)(i.Ei,{colSpan:1,children:[(0,t.jsx)(n.A,{children:h("Currency")}),(0,t.jsx)(l.A,{control:f,name:r,options:A,isSearchable:!0,isClearable:!1})]}),(0,t.jsxs)(i.Ei,{colSpan:2,children:[(0,t.jsx)(n.A,{children:h("Eligible purchase amount")}),(0,t.jsx)(o.A,{control:f,name:s,className:(0,g.AH)({"& .MuiInputBase-root":{...I(s).error&&{borderColor:"#ff4e4e"}}}),placeholder:h("Enter amount"),preProcessInputValue:e=>(0,b.wv)(e,null==T?void 0:T.value),rules:{required:h("Eligible purchase amount is required."),validate:e=>(0,b.UJ)(e,null==T?void 0:T.value,{errorMessage:h("Eligible purchase amount is wrong format.")})}})]})]}),(0,t.jsx)(i.az,{mt:1,children:(0,t.jsx)(d.K,{errors:j,name:s,render:e=>{let{message:r}=e;return(0,t.jsx)(c.A,{message:r})}})})]})}},726388:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(695155),a=s(24756),i=s(885203),n=s.n(i),o=s(119456),l=s(619056),d=s(821628);let c=(0,s(212115).forwardRef)(e=>{let{value:r,onChange:s,disableOriginError:i,dateFormat:c,className:u,error:h,label:m,...p}=e,b=(0,d.A)(),g=n()(u,{"disable-origin-error":i,"MuiOutlinedInput-error":h}),A=(e=>{if(!e)return null;if(e instanceof Date)return(0,o.f)(e)?e:null;if("string"==typeof e){let r=(0,l.H)(e);return(0,o.f)(r)?r:null}return null})(r),x={...p,...i?{error:!1}:{}};return(0,t.jsx)(a.l,{enableAccessibleFieldDOMStructure:!1,format:c,value:A,onChange:e=>{if(!e)return void s(null);s(b.formatDate(c,e))},className:g,label:m,slotProps:{textField:{fullWidth:!0}},...x})});c.displayName="DatePicker";let u=c},729471:(e,r,s)=>{s.d(r,{L:()=>t});let t={FILL_IN_REPORT:1,RESULT:2}},741134:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(389485)},741513:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(847680)},744805:(e,r,s)=>{s.d(r,{A:()=>m});var t=s(695155),a=s(981980),i=s(235217),n=s(288193),o=s(212115),l=s(105878),d=s(717485),c=s(672978),u=s(939397),h=s(614894);let m=e=>{let{data:r,onCloseDrawer:s}=e,[m,p]=(0,o.useState)(l.GZ.SELECT_ACTION),[b,g]=(0,o.useState)({actionType:null,resultType:""}),[A,x]=(0,o.useState)(""),[f,v]=(0,o.useState)(!1);(0,o.useEffect)(()=>{p(l.GZ.SELECT_ACTION)},[r]);let S=e=>{g(e),p(l.GZ.RESULT)};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(n.A,{headerProps:{shouldHideBackBtn:m===l.GZ.SELECT_ACTION,onCloseDrawer:s,onGoBack:()=>{p(l.GZ.SELECT_ACTION)}},data:r,children:(0,t.jsx)(a.az,{px:"20px",py:"12px",children:f?(0,t.jsx)(a.so,{mt:"sbds-dimension-space-size-xl",justifyContent:"center",alignItems:"center",children:(0,t.jsx)(i.A,{color:"inherit",size:30})}):(()=>{if(!r)return null;switch(m){case l.GZ.SELECT_ACTION:return(()=>{let e=["paymentPaid","naverpaypointsPaymentPaid","ecommercePurchaseSuccess","paymentGatewayPurchaseSuccess"].includes((0,d.A)(r,["status"]));return(0,t.jsx)(c.A,{withdrawalData:r,isPaidWithdrawal:e,setResultScreen:S,setStep:p,setMessageDate:x,setLoading:v})})();case l.GZ.INPUT_REASON:return(0,t.jsx)(u.A,{withdrawalData:r,setMessageDate:x,setResultScreen:S,setLoading:v});case l.GZ.RESULT:return(0,t.jsx)(h.A,{resultDetail:b,formattedDate:A})}})()})})})}},745568:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(695155),a=s(981980),i=s(398122),n=s(576290),o=s(163856);let l=(0,a.I4)("div",{base:{position:"fixed",top:"0",left:"0",zIndex:"overlay",width:"100%",height:"100%",backgroundColor:"sbds-color-black-a-40"}}),d=(0,a.I4)("div",{base:{position:"fixed",top:"0",zIndex:"dialog",display:"flex",flexDirection:"column",height:"100%",backgroundColor:"white",transition:"all 0.3s ease-in-out"},variants:{device:{mobile:{right:"-100%",width:"100%"},desktop:{right:"-22rem",width:"22rem"}},open:{true:{right:0}}}}),c=(0,a.I4)("div",{base:{flexGrow:"1",overflowY:"auto",overscrollBehavior:"contain"},variants:{withGrayBg:{true:{backgroundColor:"#f6f6f7"}}}}),u=e=>
1{let{headerProps:r,data:s,children:a,isGrayBackground:u=!1}=e,{isMobile:h}=(0,i.T)();return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(l,{}),(0,t.jsxs)(d,{device:h?"mobile":"desktop",open:!!s,children:[r&&(0,t.jsx)(n.A,{...r}),(0,t.jsx)(c,{withGrayBg:u,children:a}),(0,t.jsx)(o.A,{})]})]})}},764244:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(462761)},765363:(e,r,s)=>{s.d(r,{A:()=>p});var t=s(695155),a=s(981980),i=s(422544),n=s(598075),o=s(202543),l=s(406098),d=s(15758),c=s(393091),u=s(479824);let h=(0,a.I4)(l.A,{base:{borderRadius:"4px"}}),m={proofFile:null,comment:"",voucherCode:""},p=e=>{let{onSubmitDisputeRejectionForm:r}=e,s=(0,o.t)(),{control:l,handleSubmit:p,formState:{errors:b},resetField:g}=(0,i.mN)({defaultValues:m}),[A]=(0,i.FH)({control:l,name:["proofFile"]});return(0,t.jsxs)("form",{onSubmit:p(r),children:[(0,t.jsx)(n.pi,{children:s("Let us know the details below so that we can assist you in checking with our merchant partner.")}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-s",children:(0,t.jsx)(d.A,{control:l,name:"proofFile",errors:b,rules:{required:s("This is a required field")},resetField:g})}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-s",children:(0,t.jsx)(c.A,{name:"voucherCode",control:l,placeholder:s("Enter your Voucher code"),label:s("Voucher (if any)")})}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-s",children:(0,t.jsx)(c.A,{name:"comment",control:l,placeholder:s("Is there any other info that would help us expedite this?"),minRows:3,multiline:!0,label:s("Message (optional)")})}),(0,t.jsx)(a.az,{mt:"sbds-dimension-space-size-m",children:(0,t.jsx)(h,{type:"submit",fullWidth:!0,disabled:(0,u.A)(A),children:s("submit")})})]})}},767248:(e,r,s)=>{s.d(r,{A:()=>A});var t=s(695155),a=s(406098),i=s(172723),n=s(479824),o=s(717485),l=s(212115),d=s(422544),c=s(101818),u=s(202543),h=s(406368),m=s(920282),p=s(40725),b=s(398122);let g=e=>{let{currentProgress:r,setCurrentProgress:s,onSetStep:g,setResult:A}=e,x=(0,u.t)(),f=(0,b.T)(),{control:v,setError:S,clearErrors:I,trigger:j}=(0,d.xW)(),[T,y,R,E]=(0,d.FH)({control:v,name:["selectedStore","purchaseDate","orderNumber","transactionScreenshots"]}),_=(0,i.A)([y,R,E],n.A),k=(0,l.useMemo)(()=>["selectedStore","purchaseDate","orderNumber","transactionScreenshots",...(0,o.A)(T,"isTravel",!1)?["travelFromDate","travelToDate"]:[]],[T]),{mutate:C,isPending:D,isSuccess:O,data:w,error:N}=(0,c.n)({mutationFn:()=>{var e;return(0,h.c)("api/missing-cashback/check-order-id",{method:"POST",body:{eOutletId:null==y?void 0:y.eOutletId,orderId:R,accountId:null==(e=f.user)?void 0:e.id}})},throwOnError:!1});(0,l.useEffect)(()=>{O&&(I(k),g(m.Lu.PAYMENT_AND_ADDITIONAL_INFO))},[w]),(0,l.useEffect)(()=>{if(N){let{body:{code:e,body:r}}=N;"EXISTED_OPEN_TICKET_ERROR"===e?A({resultType:m.re.EXISTED_TICKET_ERROR}):"ORDER_ID_FORMAT_ERROR"===e?S("orderNumber",{type:"custom",message:x("Please make sure you enter the ID or reference exactly as it appears on your store receipt, order history or email confirmation.")}):"ORDER_ID_HAS_CASHBACK_ERROR"===e&&S("orderNumber",{type:"custom",message:x("Order is already tracked in your Cashback history, as {order_ID} with ${cashback_amount} Cashback",{order_ID:null==r?void 0:r.orderNumber,cashback_amount:null==r?void 0:r.cashbackAmount})})}},[N]);let z=async()=>{await j(k)&&C()};switch(r){case p.m.selectStore:return(0,t.jsx)(a.A,{size:"lg",disabled:!T,onClick:()=>s(p.m.inputOrderId),fullWidth:!0,children:x("Next")});case p.m.inputOrderId:return(0,t.jsx)(a.A,{size:"lg",disabled:_,onClick:z,isLoading:D,fullWidth:!0,children:x("Next")})}return null};g.displayName="NextButton";let A=g},801972:(e,r,s)=>{s.d(r,{McbSubmissionProvider:()=>n,w:()=>o});var t=s(695155),a=s(212115);let i=(0,a.createContext)(void 0),n=e=>{let{isMcbSubmissionEnabled:r,children:s}=e;return(0,t.jsx)(i.Provider,{value:{isMcbSubmissionEnabled:r},children:s})},o=()=>{let e=(0,a.useContext)(i);return null!=e?e:{isMcbSubmissionEnabled:!1}}},804169:(e,r,s)=>{s.d(r,{A:()=>m});var t=s(695155),a=s(393091),i=s(721931),n=s(140253),o=s(5490),l=s.n(o),d=s(422544),c=s(202543),u=s(340335);let h=()=>{let e=(0,c.t)(),{control:r,formState:{errors:s}}=(0,d.xW)(),o=l()(s,"orderNumber"),h=(0,d.FH)({name:"selectedStore"});return(0,t.jsxs)(u.GX,{children:[(0,t.jsx)(u.R8,{children:e("Store order ID")}
1),(0,t.jsx)(a.A,{control:r,name:"orderNumber",placeholder:e("Enter your store order ID"),rules:{required:e("Enter your store order ID")}}),!o&&(0,t.jsx)(u.JW,{children:(null==h?void 0:h.orderIdHintMessage)||e("This is the order reference from the store you bought at. Find it in your receipt, order history or email confirmation.")}),(0,t.jsx)(n.K,{errors:s,name:"orderNumber",render:e=>{let{message:r}=e;return(0,t.jsx)(i.A,{message:r})}})]})};h.displayName="OrderId";let m=h},808220:(e,r,s)=>{s.d(r,{A:()=>t});let t={src:"/__sbcdn/_next/static/media/Success.e1c13907.png",height:260,width:260,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAS1BMVEVMaXEHBhUCAA7r4+YDAw8PDx6gl51jk5aenaMGBg0rm34MDBpBUVUpo3yOipAjgV0FEBgBAQWVk5tmZm7v7+/l4+UWFirl5ehsa3V+7eb9AAAAFnRSTlMAtPW9KYX+ErM9V2pO2YM5XpmDtGR40IaF2QAAAAlwSFlzAAALEwAACxMBAJqcGAAAADZJREFUeJxjYEAAFk52CIOPjYcLzORg5ucFMViZBBkEuDkZRMQl2ISYxFgZRJk5OIQZGVngmgErLAFp7t8VcAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},808694:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(460698)},836019:(e,r,s)=>{s.d(r,{A:()=>v});var t=s(695155),a=s(212115),i=s(988723),n=s(981980),o=s(268030),l=s(452363),d=s(760795),c=s(726955),u=s(948833),h=s(74464);let m=(0,o.AH)({"& .MuiDialog-paper":{boxSizing:"border-box",borderWidth:1,borderStyle:"solid",borderColor:"sbds-color-gray-10",borderRadius:"sbds-dimension-border-radius-m"}}),p=(0,n.I4)(l.A,{base:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"1.5rem",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"sbds-color-gray-10",position:"relative"}}),b=(0,n.I4)("div",{base:{fontWeight:"bold",fontSize:"24px",lineHeight:"32px",color:"sbds-color-gray-90",w:"100%"}}),g=(0,n.I4)(d.A,{base:{padding:"1.5rem"}}),A=(0,n.I4)(i.A,{base:{marginLeft:"sbds-dimension-space-size-l"}}),x=(0,n.I4)(c.A,{base:{display:"flex",padding:"1rem 1.5rem",borderTopWidth:1,borderTopStyle:"solid",borderTopColor:"sbds-color-gray-10",justifyContent:"flex-end"}}),f=(0,a.forwardRef)((e,r)=>{let{open:s,title:a,children:i,actions:l,onClose:d,onBackdropClickOrEscapeKeyDown:c,disabled:f,className:v,iconVariant:S,iconClassName:I,iconSize:j,hideCloseButton:T,closeButtonComponent:y,topHandleBar:R,...E}=e;return(0,t.jsxs)(u.A,{ref:r,className:(0,o.cx)(m,v),open:s,onClose:(e,r)=>{r&&c&&!E.disableEscapeKeyDown?c():d&&d()},...E,children:[R,a&&(0,t.jsxs)(p,{children:[a&&(0,t.jsx)(b,{children:a}),!T&&(y||(0,t.jsx)(A,{id:"modal-close-button",className:I,size:j,variant:null!=S?S:"plain",iconOnly:h.FB,onClick:d,disabled:f}))]}),(0,t.jsx)(g,{children:(0,t.jsxs)(t.Fragment,{children:[!a&&!T&&(0,t.jsx)(n.so,{justifyContent:"end",children:y||(0,t.jsx)(A,{id:"modal-close-button",className:I,variant:null!=S?S:"plain",size:j,iconOnly:h.FB,onClick:d,disabled:f})}),i]})}),l&&(0,t.jsx)(x,{children:l})]})});f.displayName="Dialog";let v=f},836185:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(644265)},837143:(e,r,s)=>{s.d(r,{A:()=>I});var t=s(695155),a=s(741513),i=s(721931),n=s(140253),o=s(717485),l=s(270131),d=s(64385),c=s(212115),u=s(422544),h=s(920282),m=s(202543),p=s(398122),b=s(119456),g=s(821628),A=s(651321),x=s(653455),f=s(340335);let v="dd/ MM/ yyyy HH:mm:ss",S=e=>{var r,s;let S,{defaultShoppingTripId:I}=e,j=(0,m.t)(),T=(0,g.A)(),y=(0,p.T)(),{control:R,setValue:E,formState:{errors:_}}=(0,u.xW)(),k=(0,u.FH)({name:"purchaseDate"}),C=(0,u.FH)({name:"selectedStore"}),D=(0,o.A)(C,"value"),{data:O,isLoading:w}=(0,x.I)({queryKey:["api/v2/missing-cashback/shopping-trips",{accountId:null==(r=y.user)?void 0:r.id,storeId:D}],throwOnError:!1}),N=(S=null!=(s=null==O?void 0:O.data)?s:[],(0,l.A)(S,e=>{var r,s;let t=null==(r=e.error)?void 0:r.code,a=(null==(s=e.error)?void 0:s.data)||"",i=(0,b.f)(a)?T.formatDate(v,a):"",n=new Date(e.createdAt);return{value:e.id,uuid:e.uuid,label:T.formatDate(v,e.createdAt),isDisabled:(0,d.A)(e,"error"),desc:t?j(h.CO[t],{date:i}):null,eOutletId:e.eOutletId,formattedISODate:(0,b.f)(n)?n.toISOString():"Invalid Date"}}));return(0,c.useEffect)(()=>{if(!k&&I){let e=N.find(e=>!e.isDisabled&&String(e.value)===String(I));e&&E("purchaseDate",e)}},[N]),(0,t.jsxs)(f.GX,{children:[(0,t.jsx)(f.R8,{children:j("Purchase date time")}
1),(0,t.jsx)(a.A,{control:R,name:"purchaseDate",rules:{required:j("This is a required field"),deps:["travelFromDate","travelToDate"]},components:{Option:A.A},placeholder:j("Select date"),noOptionsMessage:()=>j("No options"),options:N,isSearchable:!0,isLoading:w}),(0,t.jsx)(n.K,{errors:_,name:"purchaseDate",render:e=>{let{message:r}=e;return(0,t.jsx)(i.A,{message:r})}})]})};S.displayName="SelectPurchaseDate";let I=S},847680:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(422544),i=s(18392);function n(e){let{name:r,control:s,defaultValue:n,rules:o={},className:l="",...d}=e;return(0,t.jsx)(a.xI,{name:r,control:s,defaultValue:n,rules:o,render:e=>{let{field:r,fieldState:{error:s}}=e;return(0,t.jsx)(i.A,{className:l,...r,error:!!s,...d})}})}},851525:(e,r,s)=>{s.d(r,{LM:()=>t,YU:()=>a});var t=function(e){return e.V2="v2",e.V3="v3",e}({}),a=function(e){return e.APPLIED="APPLIED",e.NOT_APPLIED="NOT_APPLIED",e}({})},855511:(e,r,s)=>{s.d(r,{A:()=>S});var t=s(695155),a=s(981980),i=s(41619),n=s(515239),o=s(202543),l=s(717485),d=s(223757),c=s(283802),u=s(961396),h=s(432210),m=s(688183),p=s(388335),b=s(517901),g=s(366807),A=s(160655),x=s(449837);let f={CANCEL_REQUEST:{SUCCESS:c.A,EXISTED_OPEN_WITHDRAWAL_ACTION_ERROR:u.A,NOT_IN_SUBMITTABLE_PERIOD_TIME_FOR_WITHDRAWAL_ACTION:h.A},CHECK_STATUS:{SUCCESS:m.A,EXISTED_OPEN_WITHDRAWAL_ACTION_ERROR:p.A,NOT_IN_SUBMITTABLE_PERIOD_TIME_FOR_WITHDRAWAL_ACTION:b.A},REQUEST_RA:{SUCCESS:g.A,EXISTED_OPEN_WITHDRAWAL_ACTION_ERROR:A.A,NOT_IN_SUBMITTABLE_PERIOD_TIME_FOR_WITHDRAWAL_ACTION:x.A}},v={CANCEL_REQUEST:"Cancel Withdrawal Request",CHECK_STATUS:"Check Payment Status",REQUEST_RA:"Check Payment Status",FALLBACK_RESULT:"Thank you for reaching out to us."},S=e=>{let{resultDetail:r,formattedDate:s}=e,c=(0,o.t)(),u=r.actionType||"FALLBACK_RESULT",h=v[u],m=(0,l.A)(f,[u,r.resultType]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.A,{variant:"paragraph-2",weight:"bold",children:c(h)}),(0,t.jsx)(m,{formattedDate:s}),(0,t.jsx)(a.az,{margin:"3rem",children:(0,t.jsx)(n.default,{width:260,height:260,src:i.A,alt:"withdrawalFormIllustration"})})]})}},861843:(e,r,s)=>{s.d(r,{A:()=>t});let t=(0,s(268030).Fj)({base:{borderRadius:"sbds-dimension-border-radius-s",p:"sbds-dimension-size-5",position:"relative"},variants:{variant:{neutral:{bg:"sbds-status-color-neutral-lighter"},info:{bg:"sbds-status-color-info-lighter"},warning:{bg:"sbds-status-color-warning-lighter"},error:{bg:"sbds-status-color-error-lighter"}}}})},862950:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(744805)},880916:(e,r,s)=>{s.d(r,{A:()=>g});var t=s(695155),a=s(212115),i=s(422544),n=s(741513),o=s(202543),l=s(270131),d=s(64385),c=s(920282),u=s(651321),h=s(340335),m=s(40725),p=s(653455),b=s(398122);let g=e=>{var r,s;let g,{defaultStoreId:A,setCurrentProgress:x}=e,f=(0,o.t)(),v=(0,b.T)(),{control:S,reset:I,setValue:j,formState:{defaultValues:T}}=(0,i.xW)(),y=(0,i.FH)({name:"selectedStore"}),{data:R,isLoading:E}=(0,p.I)({queryKey:["api/v2/missing-cashback/visited-stores",{accountId:null==(r=v.user)?void 0:r.id}],throwOnError:!1,placeholderData:{data:[]}}),_=(g=null!=(s=null==R?void 0:R.data)?s:[],(0,l.A)(g,e=>{var r;let s=null==(r=e.error)?void 0:r.code;return{value:e.id,label:e.name,isTravel:e.isTravel,orderIdHintMessage:e.orderIdHintMessage,isDisabled:(0,d.A)(e,"error"),desc:s?f(c.CO[s]):null}}));return(0,a.useEffect)(()=>{if(!y&&A){let e=_.find(e=>e.value===A&&!e.isDisabled);e&&(j("selectedStore",e),x(m.m.inputOrderId))}},[_,A]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.R8,{children:f("Store name")}),(0,t.jsx)(n.A,{control:S,name:"selectedStore",components:{Option:u.A},placeholder:f("Search for the store"),noOptionsMessage:()=>f("No options"),options:_,onChange:e=>{I(),j("selectedStore",e,{shouldDirty:(null==T?void 0:T.selectedStore)!==e,shouldTouch:!0}),x(m.m.selectStore)},isSearchable:!0,isLoading:E})]})}},895589:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(695155);s(212115);var a=s(934515),i=s(981980),n=s(861843),o=s(508296);let l={neutral:a.gB,info:a.gB,warning:a.g0h,error:a.vy},d={neutral:"sbds-status-color-neutral-darker",info:"sbds-status-color-info-darker",warning:"sbds-status-color-warning-darker",error:"sbds-status-color-error-darker"},c=(0,i.I4)(i.so,n.A),u=e=>{let{header:r,description:s,variant:n="neutral",icon:u,onClose:h,moreActions:m,...p}=e,b=l[n],g=h?(0,t.jsx)(i.az,{onClick:h,cursor:"pointer",WebkitTapHighlightColor:"transparent",children:(0,t.jsx)(a.IB6,{size:"sm",tone:"primary"})}):null;return(0,t.jsx)(c,{variant:n,...p,children:(0,t.jsxs)(i.so,{direction:"row",alignItems:"flex-start",w:"100%",gap:"sbds-dimension-space-size-s",children:[(0,t.jsx)(i.so,{flex:"0 0 auto",minWidth:"0",pt:{base:"sbds-dimension-size-1",md:"sbds-dimension-size-2"},children:u||(0,t.jsx)(b,{size:"sm",color:d[n]})}),(0,t.jsxs)(i.so,{flex:"1 1 0",minWidth:"0",gap:"sbds-dimension-size-3",children:[(0,t.jsxs)(i.so,{flexDirection:"column",alignItems:"flex-start",ga
1p:"sbds-dimension-size-4",flex:"1 1 auto",minWidth:"0",children:[(0,t.jsxs)(i.so,{gap:r?"sbds-dimension-size-2":"sbds-dimension-size-0",w:"100%",flexDirection:"column",minWidth:"0",children:[(0,t.jsx)(o.A,{htmlTag:"div",variant:"paragraph-1",weight:"bold",truncate:1,children:r}),(0,t.jsx)(o.A,{htmlTag:"div",children:s})]}),m]}),(0,t.jsx)(i.so,{flex:"0 0 auto",pt:{base:"sbds-dimension-size-1",md:"sbds-dimension-size-2"},minWidth:"0",children:h&&g})]})]})})}},900015:(e,r,s)=>{s.d(r,{A:()=>c});var t=s(695155),a=s(981980),i=s(202543),n=s(508296),o=s(232046),l=s(449098),d=s(722645);let c=e=>{let{withdrawalData:r,isPaidWithdrawal:s,setResultScreen:c,setStep:u,setMessageDate:h,setLoading:m}=e,p=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)(n.A,{variant:"section-heading-1",weight:"bold",children:p("How can we help you?")}),!s&&(0,t.jsx)(a.az,{my:"1rem",children:(0,t.jsx)(o.A,{setResultScreen:c,setMessageDate:h,setLoading:m,withdrawalData:r})}),!s&&(0,t.jsx)(a.az,{my:"1rem",children:(0,t.jsx)(l.A,{setStep:u})}),s&&(0,t.jsx)(a.az,{my:"1rem",children:(0,t.jsx)(d.A,{setResultScreen:c,setMessageDate:h,setLoading:m,withdrawalData:r})})]})}},907504:(e,r,s)=>{s.d(r,{A:()=>l});var t=s(695155),a=s(981980),i=s(415662),n=s(422544);let o=(0,a.I4)(i.A,{base:{},variants:{errorStyle:{true:{borderColor:"sbds-interaction-color-danger",borderStyle:"solid",borderWidth:"1px",borderRadius:"5px"}}}});function l(e){let{name:r,label:s,control:a,defaultValue:i="",rules:l,error:d,preProcessInputValue:c,className:u="",...h}=e;return(0,t.jsx)(n.xI,{name:r,control:a,defaultValue:i,rules:l,render:e=>{let{field:r}=e;return(0,t.jsx)(o,{...r,className:u,label:s,errorStyle:!!d,onChange:e=>{let s=e.target.value;c&&(s=c(e.target.value)),r.onChange(s)},error:d,...h})}})}},920282:(e,r,s)=>{s.d(r,{CO:()=>n,Lu:()=>t,fU:()=>o,lv:()=>i,re:()=>a});let t={SHOPPING_TRIP_DETAIL:0,PAYMENT_AND_ADDITIONAL_INFO:1,RESULTS:2},a={EXISTED_TICKET_ERROR:"EXISTED_TICKET_ERROR",NOT_ELIGIBLE_FOR_CASHBACK:"NOT_ELIGIBLE_FOR_CASHBACK",OVER_MCB_SUBMISSION_LIMIT:"INVALID_MCB_SUBMISSION_LIMIT",OVER_SUBMISSION_DATE_ERROR:"OVER_SUBMISSION_DATE_ERROR",TRACKING_SPEED_ERROR:"TRACKING_SPEED_ERROR",SHOPPINGTRIP_TRACKED_ERROR:"SHOPPINGTRIP_TRACKED_ERROR",NOT_EXISTED_STORE_ERROR:"NOT_EXISTED_STORE_ERROR",SUBMIT_TICKET_SUCCESS_V2:"SUBMIT_TICKET_SUCCESS_V2"},i={NOT_ALLOW_MCB_SUBMISSION_ERROR:a.NOT_ELIGIBLE_FOR_CASHBACK,INVALID_MCB_SUBMISSION_LIMIT:a.OVER_MCB_SUBMISSION_LIMIT,SHOPPINGTRIP_TRACKED_ERROR:a.SHOPPINGTRIP_TRACKED_ERROR,NOT_EXISTED_STORE_ERROR:a.NOT_EXISTED_STORE_ERROR},n={NOT_ALLOW_MCB_SUBMISSION_ERROR:"Not eligible for Cashback",OVER_SUBMISSION_DATE_ERROR:"Expired submission period",TRACKING_SPEED_ERROR:"Check again on {date}"},o="yyyy-MM-dd"},939397:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(586797)},949635:(e,r,s)=>{s.d(r,{A:()=>t.A});var t=s(607372)},955398:(e,r,s)=>{s.d(r,{A:()=>k});var t=s(695155),a=s(288193),i=s(212115),n=s(101818),o=s(311285),l=s(125650),d=s(515162),c=s(262223),u=s(920282),h=s(982897),m=s(235217),p=s(981980),b=s(422544),g=s(672839),A=s(717485),x=s(821628),f=s(406368),v=s(579856),S=s(398122),I=s(851525),j=s(985151),T=s(543244),y=s(202543),R=s(439026);let E=[u.re.NOT_ELIGIBLE_FOR_CASHBACK,u.re.OVER_MCB_SUBMISSION_LIMIT,u.re.OVER_SUBMISSION_DATE_ERROR,u.re.TRACKING_SPEED_ERROR,u.re.SHOPPINGTRIP_TRACKED_ERROR,u.re.NOT_EXISTED_STORE_ERROR],_=(0,p.I4)("div",{base:{"& > div":{padding:"1.25rem {spacing.sbds-dimension-space-size-m} {spacing.sbds-dimension-space-size-m}",backgroundColor:"sbds-color-white"}}}),k=e=>{let{data:r,onCloseDrawer:s=g.A}=e,k=(0,S.T)(),C=(0,x.A)(),D=(0,y.A)("MCB form support request"),[O,w]=(0,i.useState)(u.Lu.SHOPPING_TRIP_DETAIL),[N,z]=(0,i.useState)(u.Lu.SHOPPING_TRIP_DETAIL),[P,L]=(0,i.useState)(null),[B,F]=(0,i.useState)(!1),[M,H]=(0,i.useState)(void 0),[W,U]=(0,i.useState)(null);(0,i.useEffect)(()=>{w(u.Lu.SHOPPING_TRIP_DETAIL),z(u.Lu.SHOPPING_TRIP_DETAIL)},[r]);let q=(0,b.mN)({defaultValues:{selectedStore:null,purchaseDate:null,orderNumber:"",travelFromDate:null,travelToDate:null,amount:null,transactionScreenshots:[]},mode:"onChange"}),G=(0,n.n)({mutationFn:e=>
1(0,f.c)("api/missing-cashback/validate-purchase-amount",{method:"POST",body:e}),throwOnError:!1}),V=(0,n.n)({mutationFn:e=>(0,f.c)("api/missing-cashback/tickets",{method:"POST",body:e}),throwOnError:!1,onSuccess:e=>{U({mcbTicketId:e.id,mcbVersion:I.LM.V2,storeId:e.storeId,storeName:e.storeName,orderNumber:e.orderNumber,purchaseDate:e.purchaseDate}),X({resultType:u.re.SUBMIT_TICKET_SUCCESS_V2}),q.reset()},onError:e=>{var r;let s=null==e||null==(r=e.body)?void 0:r.code;if("EXISTED_OPEN_TICKET_ERROR"===s)return void X({resultType:u.re.EXISTED_TICKET_ERROR});if(s&&u.lv[s])return void X({resultType:u.lv[s]});let t={ORDER_ID_FORMAT_ERROR:"orderNumber",EXISTED_CASHBACK_ERROR:"orderNumber",TRAVEL_DATE_REQUIRED_ERROR:"travelFromDate"};if(s&&t[s]){q.setError(t[s],{type:"server",message:(0,h.G)(D,s)}),Y(u.Lu.SHOPPING_TRIP_DETAIL);return}H((0,h.G)(D,s)),F(!0)}}),K=O===u.Lu.SHOPPING_TRIP_DETAIL||E.includes((null==P?void 0:P.resultType)||""),J=O!==u.Lu.RESULTS,Y=e=>{e>N?z(O):z(u.Lu.SHOPPING_TRIP_DETAIL),w(e)},X=e=>{L(e),Y(u.Lu.RESULTS)},Z=async e=>{var r,s,t,a,i,n,o;(0,v.xO)({screen_type:"support",screen_name:"support_form_mcb",ui_element_type:"submit"},"Web.Interact.ClickActivity");try{let r=await G.mutateAsync({purchaseAmount:Number((0,T.QE)((0,A.A)(e,"amount"),(0,A.A)(e,"currency.value"))),purchaseCurrency:(0,A.A)(e,"currency.value")});if(!r.eligible&&r.data.purchaseAmountCap)return void q.setError("amount",{message:D("Please enter an amount no more than {purchaseAmountCap}",{purchaseAmountCap:(0,R.G)(r.data.purchaseAmountCap,(0,A.A)(e,"currency.value"),k.locale||"en-US")})})}catch(e){F(!0);return}let l=(0,A.A)(e,"additionalInfo"),d=(0,A.A)(e,"voucherCode"),c=(0,A.A)(e,"travelFromDate"),h=(0,A.A)(e,"travelToDate"),m={purchaseCurrency:(0,A.A)(e,"currency.value"),purchaseAmount:(0,T.QE)((0,A.A)(e,"amount"),(0,A.A)(e,"currency.value")),isTravel:(0,A.A)(e,"selectedStore.isTravel"),storeName:(0,A.A)(e,"selectedStore.label"),storeId:(0,A.A)(e,"purchaseDate.eOutletId"),orderNumber:(0,A.A)(e,"orderNumber"),purchaseDate:(0,A.A)(e,"purchaseDate.formattedISODate"),shoppingTripUuid:(0,A.A)(e,"purchaseDate.uuid"),shoppingTripId:(0,A.A)(e,"purchaseDate.value"),accountId:null==(r=k.user)?void 0:r.id,firstName:null==(s=k.user)?void 0:s.first_name,lastName:null==(t=k.user)?void 0:t.last_name,email:null==(a=k.user)?void 0:a.email,phone:null==(n=k.user)||null==(i=n.phone_numbers[
10])?void 0:i.number,mcbVersion:I.LM.V2};l&&(m.comment=l),d&&(m.voucherCode=d),c&&(m.travelFromDate=C.formatDate(u.fU,c)),h&&(m.travelToDate=C.formatDate(u.fU,h));let p=new FormData;(null!=(o=e.transactionScreenshots)?o:[]).forEach((e,r)=>{p.append("uploadFile[".concat(r,"]"),e)}),p.append("createTicketRequestBody",JSON.stringify(m)),V.mutate(p)};return(0,t.jsx)(a.A,{headerProps:{shouldHideBackBtn:K,onCloseDrawer:()=>{q.reset(),s()},onGoBack:()=>Y(N)},data:r,isGrayBackground:J,children:(0,t.jsx)(b.Op,{...q,children:(0,t.jsx)("form",{onSubmit:q.handleSubmit(Z),children:V.isPending?(0,t.jsx)(p.so,{mt:"sbds-dimension-space-size-xl",justifyContent:"center",alignItems:"center",children:(0,t.jsx)(m.A,{color:"inherit",size:30})}):(0,t.jsxs)(_,{children:[J&&(0,t.jsx)(o.A,{}),(0,t.jsx)("div",{children:(()=>{if(!r)return null;switch(O){case u.Lu.SHOPPING_TRIP_DETAIL:return(0,t.jsx)(d.A,{onSetStep:Y,defaultData:r,setResult:X});case u.Lu.PAYMENT_AND_ADDITIONAL_INFO:return(0,t.jsx)(l.A,{onSetStep:Y,isSubmitErrorSnackbarOpen:B,setSubmitErrorSnackbarOpen:F,submitErrorSnackbarMessage:M,isSubmittingForm:V.isPending||G.isPending});case u.Lu.RESULTS:var e;return(0,t.jsx)(c.A,{onCloseDrawer:s,resultType:null==P?void 0:P.resultType,mcbInfo:W,isWebView:(0,j.A)(null==(e=k.userAgent)?void 0:e.source)})}})()})]})})})})}},959548:(e,r,s)=>{s.d(r,{A:()=>g});var t=s(695155),a=s(981980),i=s(212115),n=s(808220),o=s(406098),l=s(579856),d=s(202543),c=s(515239),u=s(527826),h=s(398122);let m=(0,a.I4)("div",{base:{fontSize:"sbds-font-size-5",fontWeight:"bold",lineHeight:"1.22",letterSpacing:"normal"}}),p=(0,a.I4)("div",{base:{fontSize:"sbds-font-size-4",lineHeight:"1.29",letterSpacing:"normal",textAlign:"center",marginTop:"1rem"}}),b=e=>{var r,s;let{onCloseDrawer:b,mcbInfo:g,isWebView:A}=e,x=(0,d.t)(),f=null!=(s=null==(r=(0,h.T)().userAgent)?void 0:r.isDesktop)&&s;(0,i.useEffect)(()=>{(0,l.xO)({screen_type:"support",screen_name:"support_form_mcb_success_v2",source:f?"desktop":"mobile"},"Web.View.Screen")},[]);let v=(e,r)=>{var s,t;let a=JSON.stringify({type:e,data:r}),i=(0,u.A)(navigator.userAgent);if(i.iOS&&(null==(t=window.webkit)||null==(s=t.messageHandlers)?void 0:s.mcbV2Bridge))window.webkit.messageHandlers.mcbV2Bridge.postMessage(a);else if((i.Android||i.Huawei)&&window.mcbV2Bridge)switch(e){case"mcbFormSubmissionInfo":window.mcbV2Bridge.onMcbFormSubmissionInfo(a);break;case"onMcbFormSubmit":window.mcbV2Bridge.onMcbFormSubmit(a)}};return(0,i.useEffect)(()=>{A&&(0,l.kS)({screen_type:"missing_cashback",screen_name:"submission_form_successful",merchant_id:g.storeId,merchant_name:g.storeName})},[]),(0,i.useEffect)(()=>{g&&v("mcbFormSubmissionInfo",{mcbVersion:g.mcbVersion,storeName:g.storeName,orderId:g.orderNumber,shoppingtripDate:g.purchaseDate})},[g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(c.default,{width:260,height:260,src:n.A,alt:"Submit Success Image",unoptimized:!0})}),(0,t.jsx)(a.so,{justify:"center",mt:"3rem",children:(0,t.jsx)(m,{children:x("Support request submitted")})}),A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p,{children:x("Weâll update you by email, or you can check the status of this support request from âMy Support Requestsâ.")}),(0,t.jsx)(a.so,{justify:"center",mt:"1rem",children:(0,t.jsx)(o.A,{size:"lg",fullWidth:!0,onClick:()=>{(0,l.PN)({screen_type:"missing_cashback",screen_name:"submission_form_successful",feature_name:"view_request",merchant_id:g.storeId,merchant_name:g.storeName}),v("onMcbFormSubmit",{mcbVersion:g.mcbVersion,mcbTicketId:g.mcbTicketId}),b()},children:x("View Request")})})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(p,{children:x('Weâll email you updates, or you can check the status under "My Support Requests" in the latest ShopBack app.')})})]})};b.displayName="SubmitReportSuccessV2";let g=b},961396:(e,r,s)=>{s.d(r,{A:()=>n});var t=s(695155),a=s(981980),i=s(202543);let n=()=>{let e=(0,i.t)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:e("Thank you for reaching out to us.")}),(0,t.jsx)(a.az,{mt:"1rem",children:e("You have already submitted this request before. Weâre working on it and will get back to you soon via email.")})]})}},982897:(e,r,s)=>{s.d(r,{G:()=>t});let t=(e,r)=>{switch(r){case"INVALID_SHOPPING_TRIP_ERROR":return e("We couldn't verify this shopping trip. Please go back, reselect the store and date, and try again.");case"ORDER_ID_FORMAT_ERROR":return e("Please enter the order ID exactly as it appears on your receipt, order history or confirmation email.");case"EXISTED_CASHBACK_ERROR":return e("This order is already in your Cashback history, so there's no missing Cashback to report.");case"TRAVEL_DATE_REQUIRED_ERROR":return e("Please enter your travel dates to continue.");case"TICKET_DATABASE_ERROR":case"TICKET_INSERT_FAILED_ERROR":case"CUSTOMER_HELP_SUPPORT_RELAY_ERROR":return e("Something went wrong on our end and your report wasn't submitted. Please try again in a few minutes.");case"INFORM_MCB_FAILED_ERROR":return e("We couldn't finish submitting your report. Nothing was saved, so please try again.");case"CASHBACK_RATE_ERROR":return e("We couldn't load your Cashback details right now. Please try again in a few minutes.");default:return e("Something went wrong, try resubmitting the form.")}}}}]);
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.