PageSourceSearch

https://farmersfreshkitchen.com/_next/static/chunks/pages/catering/checkout-2fed302d2b076c70.js

js farmersfreshkitchen.com collected 2026-10-02 00:49:36 UTC 30,490 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[438],{97809:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/catering/checkout",function(){return a(23014)}])},23014:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return V}});var t=a(4111),r=a(51438),i=a(52951),n=a(88029),c=a(26042),d=a(5950),l=a(85893),o=a(67294),u=a(2664),m=a(11163),h=a(41664),p=a.n(h),v=a(49377),x=a(69345),f=a(60627),b=a(71312),j=a(85518),g=a(45282),N=a(80687),_=a(52034),y=a.n(_),k=a(67814),w=a(51436),C=a(23105),S=a(9198),I=a.n(S);a(18698);function R(e){if(null===e||!0===e||!1===e)return NaN;var s=Number(e);return isNaN(s)?s:s<0?Math.ceil(s):Math.floor(s)}function E(e,s){if(s.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+s.length+" present")}function D(e){E(1,arguments);var s=Object.prototype.toString.call(e);return e instanceof Date||"object"===typeof e&&"[object Date]"===s?new Date(e.getTime()):"number"===typeof e||"[object Number]"===s?new Date(e):("string"!==typeof e&&"[object String]"!==s||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function T(e,s){E(2,arguments);var a=D(e),t=R(s);return isNaN(t)?new Date(NaN):t?(a.setDate(a.getDate()+t),a):a}function M(e,s){E(2,arguments);var a=R(s);return T(e,-a)}var P=a(704);a(49634);var A=new b.Z,O=new f.Z,q=function(e){var s=e.value,a=e.onClick;return(0,l.jsx)("input",{type:"text",name:"date_of_birth",className:"form-control",autoComplete:"off",placeholder:"Pickup Date",value:s,onClick:a})},Z=function(e){(0,n.Z)(a,e);var s=(0,d.Z)(a);function a(e){var i;return(0,r.Z)(this,a),(i=s.call(this,e)).state={cards:[],timing:{from:0,to:0},pickup_time:0,slotTiming:[],selected_card:"",guestInfo:{name:"",expiry_month:"",expiry_year:"",card_number:"",cvc:"",user_first_name:"",user_last_name:"",user_email:"",user_number:"",cart_id:"",restaurant_id:0,pickup_time:0},selected_bonus:{},preferredRestaurant:{},birthday_coupons:[],admin_reward_coupon:[],order_rewards_coupons:[],errors:{},menu_id:e.cart_details.menu_id,orderData:O.getValue("catering",!0),pickup_date_iso:"",pickup_date:"",sqLoad:!1,paymentForm:"",offerItemModal:!1,rewardsItemModal:!1},i.getCards=i.getCards.bind((0,t.Z)(i)),i.getTiming=i.getTiming.bind((0,t.Z)(i)),i.selectCard=i.selectCard.bind((0,t.Z)(i)),i.applyReward=i.applyReward.bind((0,t.Z)(i)),i.selectBonus=i.selectBonus.bind((0,t.Z)(i)),i.removeCoupon=i.removeCoupon.bind((0,t.Z)(i)),i.removeBonus=i.removeBonus.bind((0,t.Z)(i)),i.handleChange=i.handleChange.bind((0,t.Z)(i)),i.handleSubmit=i.handleSubmit.bind((0,t.Z)(i)),i.selectPickupTime=i.selectPickupTime.bind((0,t.Z)(i)),i.placeOrderSubmit=i.placeOrderSubmit.bind((0,t.Z)(i)),i.getRewardCoupons=i.getRewardCoupons.bind((0,t.Z)(i)),i.renderPaymentView=i.renderPaymentView.bind((0,t.Z)(i)),i.accScroll=i.accScroll.bind((0,t.Z)(i)),i.onError=i.onError.bind((0,t.Z)(i)),i.onAuthorizationSuccess=i.onAuthorizationSuccess.bind((0,t.Z)(i)),i.onDataCollectorInstanceReady=i.onDataCollectorInstanceReady.bind((0,t.Z)(i)),i.requestCardNonce=i.requestCardNonce.bind((0,t.Z)(i)),i}return(0,i.Z)(a,[{key:"componentDidMount",value:function(){if(O.hasValue("preferred_restaurant")){var e=O.getValue("preferred_restaurant",!0),s=O.getValue("catering",!0);this.setState({preferredRestaurant:e,orderData:s})}this.props.refreshUserInfo(),this.renderSquarePayment()}},{key:"getSelectedRestaurantId",value:function(){var e,s,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,P.vp)({fallbackRestaurantId:a||(null===(e=this.state.preferredRestaurant)||void 0===e?void 0:e.id)||(null===(s=this.props.cart_details)||void 0===s?void 0:s.restaurant_id)})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(this.setState({menu_id:e.cart_details.menu_id}),O.hasValue("auth_token")){var s=this.state.guestInfo;s.user_first_name=this.props.info.first_name,s.user_last_name=this.props.info.last_name,s.user_email=this.props.info.email,s.user_number=this.props.info.mobile,this.setState({guestInfo:s})}this.getCards()}},{key:"renderSquarePayment",value:function(){var e=this,s=document.createElement("script");s.src="https://js.squareupsandbox.com/v2/paymentform",s.type="text/javascript",s.async=!1,s.onload=function(){e.setState({sqLoa
1d:!0});var s=e,a={applicationId:"sandbox-sq0idb-_ce09Ka5ei3BNUZ-09lizA",inputClass:"sq-input",autoBuild:!1,inputStyles:[{fontSize:"16px",lineHeight:"24px",padding:"16px",placeholderColor:"#a0a0a0",backgroundColor:"transparent"}],cardNumber:{elementId:"sq-card-number",placeholder:"Card Number"},cvv:{elementId:"sq-cvv",placeholder:"CVV"},expirationDate:{elementId:"sq-expiration-date",placeholder:"MM/YY"},postalCode:{elementId:"sq-postal-code",placeholder:"Postal"},callbacks:{cardNonceResponseReceived:function(e,a,t){if(e)return e.forEach((function(e){s.props.enqueueSnackbar(e.message,{anchorOrigin:{vertical:"bottom",horizontal:"center"},variant:"error",className:"customised-snackbar"})})),s.btn.removeAttribute("disabled"),void s.btn1.removeAttribute("disabled");s.placeOrderSubmit(a)}}},t=new window.SqPaymentForm(a);t.build(),e.setState({paymentForm:t})},document.getElementsByTagName("head")[0].appendChild(s)}},{key:"selectPickupTime",value:function(e){this.setState({pickup_time:e.target.value})}},{key:"getCards",value:function(){var e=this,s=this;A.getCard().then((function(a){s.setState({cards:a.data.response});for(var t=0;t<=a.data.response.length;t++)if(1===a.data.response[t].is_default)return e.selectCard(t),!1})).catch((function(e){}))}},{key:"selectCard",value:function(e){var s=this.state.cards,a=!0,t=!1,r=void 0;try{for(var i,n=s[Symbol.iterator]();!(a=(i=n.next()).done);a=!0){var c=i.value;c.selected=!1,c.is_default=!1}}catch(d){t=!0,r=d}finally{try{a||null==n.return||n.return()}finally{if(t)throw r}}s[e].selected=!0,s[e].is_default=!0,this.setState({cards:s,selected_card:s[e].id}),this.closeAddCard()}},{key:"placeOrderSubmit",value:function(e){var s=this;s.btn.setAttribute("disabled","disabled"),s.btn1.setAttribute("disabled","disabled");var a=O.getValue("catering",!0),t={name:this.state.guestInfo.name,first_name:this.state.guestInfo.user_first_name,last_name:this.state.guestInfo.user_last_name,email:this.state.guestInfo.user_email,contact_number:this.state.guestInfo.user_number,restaurant_id:this.getSelectedRestaurantId(),pickup_time:s.state.pickup_time,select_card:s.state.selectCard,nonce:e,pickup_date:s.state.pickup_date,data:O.getValue("catering",!0),isGuest:O.hasValue("auth_token")?0:1,variable_id:a.variable_id,cooking_option:a.cooking_option,item_id:a.item_id};A.placeOrderCatering(t).then((function(e){s.btn.removeAttribute("disabled"),s.btn1.removeAttribute("disabled"),s.props.enqueueSnackbar("Order Placed Successfully",{anchorOrigin:{vertical:"bottom",horizontal:"center"},variant:"success",className:"customised-snackbar"}),s.props.getUpdatedCart(),s.props.router.push("/orders/guest/"+e.data.response.order_id)})).catch((function(e){s.btn.removeAttribute("disabled"),s.btn1.removeAttribute("disabled"),s.props.enqueueSnackbar(e.response.data.message,{anchorOrigin:{vertical:"bottom",horizontal:"center"},variant:"error",className:"customised-snackbar"})}))}},{key:"placeOrderSubmitUser",value:function(){var e=this;e.btn.setAttribute("disabled","disabled"),e.btn1.setAttribute("disabled","disabled");var s=O.getValue("catering",!0),a={name:this.state.guestInfo.name,first_name:this.state.guestInfo.user_first_name,last_name:this.state.guestInfo.user_last_name,email:this.state.guestInfo.user_email,contact_number:this.state.guestInfo.user_number,restaurant_id:this.getSelectedRestaurantId(),pickup_time:e.state.pickup_time,selected_card:e.state.selected_card,nonce:"",pickup_date:e.state.pickup_date,variable_id:s.variable_id,cooking_option:s.cooking_option,item_id:s.item_id,isGuest:O.hasValue("auth_token")?0:1};A.placeOrderCateringUser(a).then((function(s){e.btn.removeAttribute("disabled"),e.btn1.removeAttribute("disabled"),e.props.enqueueSnackbar("Order Placed Successfully",{anchorOrigin:{vertical:"bottom",horizontal:"center"},variant:"success",className:"customised-snackbar"}),e.props.getUpdatedCart(),e.props.router.push("/orders/user/"+s.data.response.order_id)})).catch((function(s){e.btn.removeAttribute("disabled"),e.btn1.removeAttribute("disabled"),e.props.enqueueSnackbar(s.response.data.message,{anchorOrigin:{vertical:"bottom",horizontal:"center"},variant:"error",className:"customised-snackbar"})}))}},{key:"requestCardNonce",value:function(e){e.preventDefault();var s={};""===this.state.guestInfo.user_first_name&&(s.user_first_name="ENTER FIRST NAME",this.setState({errors:s})),""===this.state.guestInfo.user_last_name&&(s.user_last_name="ENTER LAST NAME",this.setState({errors:s})),""===this.state.guestInfo.user_email&&(s.user_email="ENTER EMAIL",this.setState({errors:s})),""===this.state.guestInfo.user_number&&(s.user_number="ENTER NUMBER",this.setState({errors:s}));var a=this;if(!this.state.pickup_time)return a.props.enqueueSnackbar("Please select pick up time",{anchorOrigin:{vertical:"bottom",horizontal:"center"},variant:"error",className:"customised-snackbar"}),!1;a.btn.setAttribute("disabled","disabled"),a.btn1.setAttribute("disabled","disabled"),O.hasValue("auth_token")?this.placeOrderSubmitUser():this.state.paymentForm.requestCardNonce()}},{key:"accScroll",value:function(){document.getElementById("collapseOne").scrollIntoView()}},{key:"handleDateChange",value:function(e){var s=this.state;s.pickup_date_iso=e,s.pickup_date=new Date(e).getTime()/1e3,this.setState(s),this.getTiming()}},{key:"renderCartDetailsMobile",value:function(){var e,s;return(0,l.jsxs)("div",{className:"checkout d-none",children:[(0,l.jsxs)("h6",{children:[(0,l.jsx)("i",{className:"fas fa-clipboard-list"})," Order Summary"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"row",children:(0,l.jsx)("div",{className:"col-md-7 col
1-7",children:(0,l.jsx)("h6",{children:null===(e=this.state.orderData)||void 0===e?void 0:e.item_name})})}),null===(s=this.state.orderData)||void 0===s?void 0:s.menu.map((function(e,s){return(0,l.jsx)("div",{className:"row",children:(0,l.jsx)("div",{className:"col-md-8 col-8",children:(0,l.jsx)("h4",{children:e.modifier_name})})},s)})),(0,l.jsx)("hr",{})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-md-8 col-8",children:(0,l.jsx)("h4",{children:" Order Total"})}),(0,l.jsx)("div",{className:"col-md-4 col-4",children:(0,l.jsxs)("h4",{children:[" $",this.props.cart_details.order_total]})}),(0,l.jsx)("div",{className:"col-md-8 col-8",children:(0,l.jsx)("h4",{children:" Tax"})}),(0,l.jsx)("div",{className:"col-md-4 col-4",children:(0,l.jsxs)("h4",{children:[" $",this.props.cart_details.total_tax]})})]}),(0,l.jsx)("hr",{}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-md-8 col-8",children:(0,l.jsx)("h5",{children:"Total"})}),(0,l.jsx)("div",{className:"col-md-4 col-4",children:(0,l.jsxs)("h5",{children:["$",(0,g.Uo)(this.props.cart_details.total_amount)]})})]})]})}},{key:"removeCoupon",value:function(){var e=this;A.removeReward().then((function(){e.props.getUpdatedCart(),e.getRewardCoupons()})).catch((function(e){}))}},{key:"removeBonus",value:function(){var e=this,s=this;A.removeBonus().then((function(){e.setState({selected_bonus:{}}),s.props.getUpdatedCart(),s.props.getBonus()})).catch((function(e){}))}},{key:"renderCartDetailsWeb",value:function(){var e,s,a,t,r,i,n,c,d=this.props.cart_details;return d.coupon_id||this.state.selected_bonus.bonus_id||((d.is_reward_coupon||d.is_birthday||d.is_admin_reward)&&!0,d.is_bonus&&!this.state.selected_bonus.bonus_id&&!0),(0,l.jsx)("div",{className:"col-md-5 col-lg-4",children:(0,l.jsx)("div",{className:"content clearfix",children:(0,l.jsx)("aside",{children:(0,l.jsx)("div",{id:"box",children:(0,l.jsxs)("div",{className:"side-bar",children:[(0,l.jsxs)("h6",{className:"mb-2",children:[(0,l.jsx)("i",{className:"fas fa-clipboard-list"})," Order Summary"]}),(0,l.jsxs)("div",{className:"bg-white p-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"row",children:(0,l.jsx)("div",{className:"col-8",children:(0,l.jsx)("h3",{children:null===(e=this.state.orderData)||void 0===e?void 0:e.item_name})})}),(null===(s=this.state.orderData)||void 0===s?void 0:s.serving)&&(0,l.jsx)("div",{className:"row",children:(0,l.jsx)("div",{className:"col-md-8 col-8",children:(0,l.jsx)("h4",{children:null===(a=this.state.orderData)||void 0===a?void 0:a.serving})})}),(null===(t=this.state.orderData)||void 0===t?void 0:t.eventSize)&&(0,l.jsx)("div",{className:"row",children:(0,l.jsx)("div",{className:"col-md-8 col-8",children:(0,l.jsx)("h4",{children:null===(r=this.state.orderData)||void 0===r?void 0:r.eventSize})})}),(0,l.jsx)("hr",{className:""})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-8",children:(0,l.jsx)("h4",{children:"Order Total"})}),(0,l.jsx)("div",{className:"col-4",children:(0,l.jsxs)("h4",{className:"text-right",children:["$",null===(i=this.state.orderData)||void 0===i?void 0:i.order_amount]})})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-8",children:(0,l.jsx)("h4",{children:"Tax"})}),(0,l.jsx)("div",{className:"col-4",children:(0,l.jsxs)("h4",{className:"text-right",children:[" $",null===(n=this.state.orderData)||void 0===n?void 0:n.tax]})})]}),(0,l.jsx)("hr",{}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-8",children:(0,l.jsx)("h3",{className:"total-menu m-0 mt-2",children:"Total"})}),(0,l.jsx)("div",{className:"col-4",children:(0,l.jsx)("h3",{className:"text-right menu-price price-bold mt-2 float-right",children:(0,g.zF)((0,g.Uo)(null===(c=this.state.orderData)||void 0===c?void 0:c.total_amount))})})]})]})]})})})})})}},{key:"renderOrderTiming",value:function(){var e=this;return j.tq?(0,l.jsxs)("select",{className:"form-control w-100",id:"checkout-timing",onChange:function(){return e.selectPickupTime()},children:[(0,l.jsx)("option",{value:"0",children:"Please Select Pickup Time"}),!!this.state.slotTiming.length&&this.state.slotTiming.map((function(e,s){return(0,l.jsx)("option",{value:e,children:(0,g.s)(e)},s)})),!this.state.slotTiming.length&&(0,l.jsx)("option",{children:"No Pickup Time Found"})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-md-6",children:(0,l.jsx)(I(),{selected:this.state.pickup_date_iso,onChange:function(s){return e.handleDateChange(s)},customInput:(0,l.jsx)(q,{}),minDate:M(new Date,-1),dropdownMode:"select"})}),(0,l.jsx)("div",{className:"col-md-6",children:(0,l.jsxs)("select",{className:"form-control",onChange:function(s){return e.selectPickupTime(s)},children:[(0,l.jsx)("option",{value:"",children:"Please select time"}),(0,l.jsx)("option",{value:"8AM-12PM",children:"Morning(8AM-12PM)"}),(0,l.jsx)("option",{value:"12PM-4PM",children:"Noon(12PM-4PM)"}),(0,l.jsx)("option",{value:"4PM-6:45PM",children:"Evening(4PM-6:45PM)"})]})})]})})}},{key:"getTiming",value:function(){var e=this,s=this.getSelectedRestaurantId();
1A.getTimingGuest(this.state.menu_id,s).then((function(s){e.setState({timing:{to:s.data.response.to,from:s.data.response.from}});var a=[];if(s.data.response.to&&s.data.response.from)for(var t=s.data.response.from,r=s.data.response.to,i=s.data.response.time_now,n=t;n<=r;)n>i&&i+900<=n&&a.push(n),n+=900;e.setState({slotTiming:a})})).catch((function(e){}))}},{key:"selectBonus",value:function(e){this.setState({selected_bonus:(0,c.Z)({},e)}),this.setState({offerItemModal:!1})}},{key:"handleSubmit",value:function(e){var s=this;e.preventDefault();var a=this;A.addCard(this.state.cardInputData).then((function(){a.setState({cardInputData:{name:"",expiry_month:"",expiry_year:"",card_number:"",cvc:"",is_default:1}}),s.state.cards.length>0&&a.closeAddCard(),a.getCards()})).catch((function(e){}))}},{key:"handleChange",value:function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",a=this.state.guestInfo,t=e.target.value;"number"===s&&(t=t.replace(/[^0-9]/g,"")),a[e.target.name]=t,this.setState({guestInfo:a})}},{key:"handleChangeCard",value:function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",a=this.state.guestInfo,t=e.target.rawValue;"number"===s&&(t=t.replace(/[^0-9]/g,"")),a[e.target.name]=t,this.setState({guestInfo:a})}},{key:"getRewardCoupons",value:function(){var e=this;A.getRewardCoupons().then((function(s){e.setState({birthday_coupons:s.data.response.birthday_coupons?s.data.response.birthday_coupons:[],admin_reward_coupon:s.data.response.admin_reward_coupon?s.data.response.admin_reward_coupon:[],order_rewards_coupons:s.data.response.order_rewards_coupons?s.data.response.order_rewards_coupons:[]})})).catch((function(){}))}},{key:"applyReward",value:function(e){var s=this;A.applyReward(e).then((function(e){s.props.getUpdatedCart(),s.getRewardCoupons(),document.getElementById("rewardItemModalClose").click()})).catch((function(e){}))}},{key:"closeAddCard",value:function(){}},{key:"onError",value:function(e){this.props.enqueueSnackbar(e.message,{anchorOrigin:{vertical:"bottom",horizontal:"center"},variant:"error",className:"customised-snackbar"})}},{key:"onAuthorizationSuccess",value:function(){this.setState({isBraintreeReady:!0})}},{key:"onDataCollectorInstanceReady",value:function(e,s){e||(this.device_data=s.deviceData)}},{key:"renderPaymentView",value:function(){var e,s=this;this.props.cart_details;if(null===(e=this.state.orderData)||void 0===e?void 0:e.total_amount)return(0,l.jsxs)("div",{children:[(0,l.jsxs)("h1",{id:"checkout-payment",className:"mb-2",children:[(0,l.jsx)("i",{className:"fas fa-user-alt"})," Your Information"]}),(0,l.jsx)("div",{className:"",children:(0,l.jsxs)("div",{className:"card-body",children:[(0,l.jsxs)("div",{className:"form-group",children:[(0,l.jsx)("label",{children:"First Name"}),(0,l.jsx)("input",{type:"text",name:"user_first_name",className:"form-control",placeholder:"Enter First Name",value:this.state.guestInfo.user_first_name,onChange:function(e){return s.handleChange(e,"text")}}),(0,l.jsx)("span",{className:"error-text",children:this.state.errors.user_first_name})]}),(0,l.jsxs)("div",{className:"form-group",children:[(0,l.jsx)("label",{children:"Last Name"}),(0,l.jsx)("input",{type:"text",name:"user_last_name",className:"form-control",placeholder:"Enter Last Name",value:this.state.guestInfo.user_last_name,onChange:function(e){return s.handleChange(e,"text")}}),(0,l.jsx)("span",{className:"error-text",children:this.state.errors.user_last_name})]}),(0,l.jsxs)("div",{className:"form-group",children:[(0,l.jsx)("label",{children:"Email"}),(0,l.jsx)("input",{type:"email",name:"user_email",className:"form-control",placeholder:"Enter Email",value:this.state.guestInfo.user_email,onChange:function(e){return s.handleChange(e,"text")}}),(0,l.jsx)("span",{className:"error-text",children:this.state.errors.user_email})]}),(0,l.jsxs)("div",{className:"form-group",children:[(0,l.jsx)("label",{children:"Mobile Number"}),(0,l.jsx)(y(),{placeholder:"Mobile Number",className:"form-control",options:{phone:!0,phoneRegionCode:"US",delimiter:"-"},name:"user_number",value:this.state.guestInfo.user_number,onChange:function(e){return s.handleChange(e,"number")}}),(0,l.jsx)("span",{className:"error-text",children:this.state.errors.user_number})]})]})}),(0,l.jsxs)("h1",{id:"checkout-payment",className:"mb-2",children:[(0,l.jsx)("i",{className:"far fa-credit-card"})," Payment"]}),!!this.state.cards.length&&(0,l.jsx)(l.Fragment,{children:this.state.cards.map((function(e,a){return(0,l.jsxs)("div",{className:"card-div",onClick:function(){return s.selectCard(a)},children:[(0,l.jsxs)("div",{className:"row pt-3 pb-3",children:[(0,l.jsxs)("div",{className:"col-1",children:[(0,l.jsx)("input",{type:"radio",name:"card_selection",checked:!!e.is_default,id:"radio-".concat(e.id),onClick:function(){return s.selectCard(a)}}),(0,l.jsx)("label",{htmlFor:"radio-".concat(e.id)})]}),(0,l.jsxs)("div",{className:"col-2",children:["Visa"===e.card_type&&(0,l.jsx)("img",{src:"/images/visa.png",className:"img-fluid",width:"80px"}),"visa"===e.card_type&&(0,l.jsx)("img",{src:"/images/visa.png",className:"img-fluid",width:"80px"}),"mastercard"===e.card_type&&(0,l.jsx)("img",{src:"/images/master.png",className:"img-fluid",width:"80px"}),"MASTERCARD_CREDIT"===e.card_type&&(0,l.jsx)("img",{src:"/images/master.png",className:"img-fluid",width:"80px"}),"discover"===e.card_type&&(0,l.jsx)("img",{src:"/images/discover.png",className:"img-fluid",width:"80px"}),"american_express"===e.card_type&&(0,l.jsx)("img",{src:"/images/amex.png",className:"img-fluid",width:"80px"}),"jcb"===e.card_type&&(0,l.jsx)("img",{src:"/images/jcb.png",className:"img-fluid",width:"80px"}),"UNKNOWN"===e.card_type&&(0,l.jsx)("img",{src:"/images/credit-card.png",className:"img-fluid",width:"80px"})]}),(0,l.jsxs)("div",{className:"col-5",children:[(0,l.jsx)("p",{style:{"font-weight":"600"},children:e.name}),(0,l.jsxs)("p",{style:{color:"gray"},children:["Ending in ",(0,g.Ay)(e.masked_card_number)]})]}),(0,l.jsxs)("div",{className:"col-3",children:[(0,l.jsx)("p",{children:"Expiry"}),(0,l.jsxs)("p",{style:{color:"gray"},children:[e.expiry_month,"/",e.expiry_year]})]})]}),(0,l.jsx)("hr",{className:"m-0"})]},a)}))}),O.hasValue("auth_token")&&!this.state.cards.length&&(0,l.jsx)(p(),{href:"/profile/payment-methods?ref=catering_checkout",children:(0,l.jsx)("a",{href:"/profile/payment-methods?ref=catering_checkout",children:(0,l.jsx)("div",{className:"credit-card collapsed pt-2 pb-2 pl-0 pr-0",children:(0,l.jsx)("div",{className:"row",children:(0,l.jsx)("div",{className:"col-md-12 col-12",children:(0,l.jsx)("h3",{className:"add-cc text-center",children:"Add Credit or Debit Card"})})})})})}),this.state.sqLoad&&!this.state.cards.length&&!O.hasValue("auth_token")&&(0,l.jsx)("div",{id:"accordion",children:(0,l.jsx)("div",{className:"",children:(0,l.jsxs)("div",{className:"card-body",children:[(0,l.jsxs)("div",{className:"form-group",children:[(0,l.jsx)("label",{children:"Card Number"}),(0,l.jsx)("div",{id:"sq-card-number"})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-4",children:(0,l.jsxs)("div",{className:"form-group",children:[(0,l.jsx)("label",{children:"Expiry"}),(0,l.jsx)("div",{className:"third",id:"sq-expiration-date"})]})}),(0,l.jsx)("div",{className:"col-4",children:(0,l.jsxs)("div",{className:"form-group",children:[(0,l.jsx)("label",{children:"CVV"}),(0,l.jsx)("div",{className:"third",id:"sq-cvv"})]})}),(0,l.jsx)("div",{className:"col-4",children:(0,l.jsxs)("div",{className:"form-group",children:[(0,l.jsx)("label",{children:"Postcode"}),(0,l.jsx)("div",{className:"third",id:"sq-postal-code"})]})})]})]})})})]})}},{key:"render",value:function(){var e=this;return(0,l.jsxs)("div",{className:"container mt-3",children:[(0,l.jsx)("h1",{className:"heading",children:"CHECKOUT"}),(0,l.jsxs)("div",{className:"row mt-5",children:[(0,l.jsxs)("div",{className:"col-md-7 col
1-lg-8",children:[(0,l.jsxs)("div",{className:"checkout",children:[(0,l.jsxs)("h1",{className:"mb-2",children:[(0,l.jsx)("i",{className:"fas fa-map-marker-alt"})," Pickup Location"]}),(0,l.jsx)("h6",{children:this.state.preferredRestaurant.name}),(0,l.jsx)("h5",{children:this.state.preferredRestaurant.address}),(0,l.jsx)("h5",{children:this.state.preferredRestaurant.contact_number})]}),(0,l.jsxs)("div",{className:"checkout",children:[(0,l.jsxs)("h1",{className:"mb-2",children:[(0,l.jsx)("i",{className:"fas fa-clock"})," Pickup Date & Time"]}),this.renderOrderTiming()]}),this.renderCartDetailsMobile(),(0,l.jsxs)("form",{className:"signin-form mb-2",onSubmit:function(s){return e.requestCardNonce(s)},children:[(0,l.jsx)("div",{className:"checkout",children:this.renderPaymentView()}),(0,l.jsx)("button",{ref:function(s){e.btn=s},className:"btn btn-add-bag mb-4 d-none d-md-block",children:"Confirm & Place Order"})]})]}),this.renderCartDetailsWeb(),(0,l.jsx)("button",{ref:function(s){e.btn1=s},className:"btn btn-add-bag d-block d-md-none btn-mobile",onClick:function(s){return e.requestCardNonce(s)},children:"Confirm & Place Order"})]}),(0,l.jsxs)(C.Z,{show:this.state.offerItemModal,centered:!0,children:[(0,l.jsx)(C.Z.Header,{children:(0,l.jsx)("button",{type:"button",onClick:function(){e.setState({offerItemModal:!1})},className:"close close-gift-modal",children:(0,l.jsx)("span",{"aria-hidden":"true",children:(0,l.jsx)(k.G,{className:"far",icon:w.nYk})})})}),(0,l.jsxs)(C.Z.Body,{className:"cart-popup",children:[(0,l.jsx)("h1",{className:"heading mt-3",children:"Offers"}),(0,l.jsx)("div",{className:"row",children:this.props.bonus_offers.map((function(s,a){return(0,l.jsx)("div",{className:"col-md-12 mt-4",children:(0,l.jsx)("div",{className:"card-scene mr-3",children:(0,l.jsx)("div",{className:"card-visa",children:(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-2",children:(0,l.jsx)("img",{src:"/images/trophy.png",className:"img-fluid",alt:""})}),(0,l.jsx)("div",{className:"col-10",children:(0,l.jsx)("div",{className:"symo-card-email",children:s.bonus_name})}),(0,l.jsxs)("div",{className:"col-12",children:[(0,l.jsx)("div",{className:"card-number",children:s.description}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("div",{className:"card-name card-id mt-3",children:["Expires ",(0,l.jsxs)("span",{children:[" ",s.bonus_expiry]})]})}),(0,l.jsx)("div",{className:"col-6 text-right",children:(0,l.jsx)("button",{className:"btn btn-add-bag",onClick:function(){return e.selectBonus(s)},children:"Apply"})})]})]})]})})})},a)}))})]})]}),(0,l.jsxs)(C.Z,{show:this.state.rewardsItemModal,centered:!0,children:[(0,l.jsx)(C.Z.Header,{children:(0,l.jsx)("button",{type:"button",onClick:function(){e.setState({rewardsItemModal:!1})},className:"close close-gift-modal",children:(0,l.jsx)("span",{"aria-hidden":"true",children:(0,l.jsx)(k.G,{className:"far",icon:w.nYk})})})}),(0,l.jsxs)(C.Z.Body,{className:"cart-popup bg-white",children:[(0,l.jsx)("h1",{className:"heading mt-3",children:"Rewards"}),(0,l.jsxs)("div",{className:"row",children:[this.state.order_rewards_coupons.map((function(s,a){return(0,l.jsx)("div",{className:"col-md-12 mt-4",children:(0,l.jsx)("div",{className:"card-scene mr-3",children:(0,l.jsx)("div",{className:"card-visa",children:(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-2",children:(0,l.jsx)("img",{src:"/images/award(2).png",className:"img-fluid",alt:""})}),(0,l.jsx)("div",{className:"col-10",children:(0,l.jsx)("div",{className:"symo-card-email",children:"Free Entree"})}),(0,l.jsxs)("div",{className:"col-12",children:[(0,l.jsx)("div",{className:"card-number",children:"Enjoy a FREE regular breakfast or lunch entree! Extras may be added at an additional"}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("div",{className:"card-name card-id mt-3",children:["Expires ",(0,l.jsxs)("span",{children:[" ",(0,g._A)(s.expiry,"D/M/YY")]})]})}),(0,l.jsxs)("div",{className:"col-6 text-right",children:[1===s.status&&(0,l.jsx)("button",{className:"btn btn-add-bag",onClick:function(){return e.applyReward(s.coupon_id)},children:"Redeem"}),2===s.status&&(0,l.jsx)("button",{className:"btn btn-secondary",children:"Redeemed"}),3===s.status&&(0,l.jsx)("button",{className:"btn btn-secondary",children:"Applied"})]})]})]})]})})})},a)})),this.state.birthday_coupons.map((function(s,a){return(0,l.jsx)("div",{className:"col-md-12 mt-4",children:(0,l.jsx)("div",{className:"card-scene",children:(0,l.jsx)("div",{className:"card-visa",children:(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-2",children:(0,l.jsx)("img",{src:"/images/award(2).png",className:"img-fluid",alt:""})}),(0,l.jsx)("div",{className:"col-10",children:(0,l.jsx)("div",{className:"symo-card-email",children:"Dessert"})}),(0,l.jsxs)("div",{className:"col-12",children:[(0,l.jsx)("div",{className:"card-number",children:"Select a FREE dessert item. Happy birthday from Farmer's Fresh Kitchen!"}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-7",children:(0,l.jsxs)("div",{className:"card-name card-id mt-3",children:["Expires ",(0,l.jsxs)("span",{children:[" ",(0,g._A)(s.expiry,"D/M/YY")]})]})}),(0,l.jsxs)("div",{className:"col-5 text-right",children:[1===s.status&&(0,l.jsx)("button",{className:"btn btn-add-bag",onClick:function(){return e.applyReward(s.coupon_id)},children:"Redeem"}),2===s.status&&(0,l.jsx)("button",{className:"btn btn-secondary",children:"Redeemed"}),3===s.status&&(0,l.jsx)("button",{className:"btn btn-secondary",children:"Applied"})]})]})]})]})})})},a)})),this.state.admin_reward_coupon.map((function(s,a){return(0,l.jsx)("div",{className:"col-md-12 mt-4",children:(0,l.jsx)("div",{className:"card-scene",children:(0,l.jsx)("div",{className:"card-visa",children:(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-2",children:(0,l.jsx)("img",{src:"/images/award(2).png",className:"img-fluid",alt:""})}),(0,l.jsxs)("div",{className:"col-10",children:[(0,l.jsx)("div",{className:"symo-card-email",children:s.name}),(0,l.jsx)("div",{className:"card-number",children:s.description}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("div",{className:"card-name card-id mt-3",children:["Expires ",(0,l.jsxs)("span",{children:[" ",(0,g._A)(s.expiry,"D/M/YY")]})]})}),(0,l.jsxs)("div",{className:"col-6 text-right",children:[1===s.status&&(0,l.jsx)("button",{className:"btn btn-add-bag",onClick:function(){return e.applyReward(s.coupon_id)},children:"Redeem"}),2===s.status&&(0,l.jsx)("button",{className:"btn btn-secondary",children:"Redeemed"})]})]})]})]})})})},a)}))]})]})]})]})}}]),a}(o.Component),V=(0,m.withRouter)((0,v.RM)((0,u.$j)((function(e){var s=e.menu,a=s.cart,t=s.cart_details,r=e.user;return{cart:a,cart_details:t,bonus_offers:r.bonus_offers,info:r.info}}),(function(e){return{getUpdatedCart:function(){e((0,x.W2)())},getMyReward:function(){e((0,N.TR)())},getBonus:function(){e((0,N.p8)())},refreshUserInfo:function(){e((0,N.bG)())}}}))(Z)))}},function(e){e.O(0,[544,565,774,888,179],(function(){return s=97809,e(e.s=s);var s}));var s=e.O();_N_E=s}]);

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.