"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6446],{32370:function(e,t){t.Z={src:"/_next/static/media/info-icon.bbb8ea2c.svg",height:16,width:16}},16446:function(e,t,l){l.r(t);var a=l(52322),n=l(2784),s=l(70863),i=l(78959),c=l(4215),o=l(96577),r=l.n(o),d=l(32370),x=l(56900),u=l(44976),m=l(19764),f=l(52070),b=l(88853),h=l(94098),p=l(43513);let v=(0,n.memo)(e=>{let t=(0,n.useRef)(null),{productVariants:l,handleAddCart:o,addCartLoading:v,productVariantId:j,productType:N}=e,[g,y]=(0,n.useState)(null),[k,w]=(0,n.useState)(!1),_=(0,n.useCallback)(()=>{w(!k)},[k]),E=(0,n.useCallback)(e=>{let t=g?document.getElementById(g):null;g&&t&&!t.contains(e.target)&&y(null)},[g]);(0,n.useEffect)(()=>(i.Qg&&document.addEventListener("click",E),()=>document.removeEventListener("click",E)),[E]);let S=(0,n.useCallback)(e=>{let t=(0,i.Ut)(e||[]);if(null==e?void 0:e.length){let l=-1;null==e||e.forEach((e,t)=>{e.is_avail||(l=t)});let a=e[l]||null;if(e.length>3&&l>2&&a){let n=e.filter((e,t)=>t!==l),[s,c,...o]=n;t=[s,c,a,...o]}}return t},[]),C=(0,n.useCallback)(e=>e>0?"Buy Now | $".concat(e):"Get Started",[]);return(0,a.jsx)("div",{className:"product_mobile_view -mx-4 grid auto-cols-[minmax(203px,203px)] grid-flow-col gap-2 overflow-x-scroll pb-8",children:l.map((e,l)=>{let n=(0,c.jK)(e),{addCartPayload:w,couponPrice:E,validityData:M,couponData:Z,productPrice:F,features:P}=n,z=k?P:S(P),D=z.length||0,T=Z?(0,i.Mo)(E):(0,i.Mo)(F),I=C(T),U=((0,i.cm)()||(0,i.yv)())&&T&&(N===s.Pm.SURE_PASS||N===s.Pm.INTENSE_PREP);return(0,a.jsx)("div",{className:"product-section-fade-in block h-full w-full flex-none px-1  py-4",children:(0,a.jsxs)("div",{className:"shadow-productMobile relative h-full overflow-hidden rounded bg-white-500 px-3 ".concat(U?"min-h-[400px] pt-6 pb-4":"py-6"),children:[(0,a.jsx)("h2",{className:"text-elephant-500 text-center text-base font-bold",children:e.variant_name}),(0,a.jsx)("div",{className:"flex items-center justify-center space-x-2 pt-2",children:Z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("s",{className:"decoration-neon_carrot-500 text-abbey-500 text-base font-normal",children:"".concat((0,i.Mo)(F,"$",!0))}),(0,a.jsx)("p",{className:"text-neon_carrot-500 text-2xl font-bold",children:"".concat((0,i.Mo)(E,"$",!0))})]}):(0,a.jsx)("p",{className:"text-neon_carrot-500 text-2xl font-bold",children:"".concat((0,i.Mo)(F,"$",!0))})}),(0,a.jsx)("p",{className:"flex justify-center py-2 text-center font-normal text-dark_blue-100 ".concat(0===D?"pb-8":""),children:M.validityText?(0,a.jsx)("span",{className:"bg-black_haze-500 rounded-full py-2 px-6 text-base",dangerouslySetInnerHTML:{__html:M.validityText}}):(0,a.jsxs)("span",{className:"bg-black_haze-500 rounded-full py-2 px-6 text-base",children:["Validity ",(0,a.jsx)("span",{className:"font-bold",children:M.validityDays})]})}),D?(0,a.jsx)("ul",{className:"mt-3 mb-5 space-y-2.5 px-1 lg:px-4 ".concat(D>s.Wf?"":"pb-3"),children:z.slice(0,k?D:s.Wf).map((l,n)=>{var s,i,c,o;let f=l.hint||null,b="mob-info-btn-".concat(e.id,"-").concat(n);return(0,a.jsxs)("li",{className:"flex items-start space-x-2",children:[(0,a.jsx)("div",{className:"pt-1",children:l.is_avail?(0,a.jsx)(h.Z,{}):(0,a.jsx)(u.default,{color:"#FF835B"})}),(0,a.jsxs)("p",{className:"flex flex-1 break-words text-[13px] font-normal leading-4 text-dark_blue-100 lg:text-base",children:[l.text," ",f?(0,a.jsxs)("button",{id:b,className:"relative flex-shrink-0 pl-3",onClick(){y(b)},"aria-label":"info btn",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(r(),{src:d.Z,width:16,height:16,alt:"info-tooltip-icon"}),g===b?(0,a.jsx)("div",{className:"absolute right-1 transform ".concat(n===D-1?"-top-2.5":"-bottom-2.5 rotate-180"),children:(0,a.jsx)(m.Z,{fill:"#636264"})}):null]}),g===b?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{ref:t,className:"bg-storm_dust-500 absolute -right-2 z-50 w-[170px] rounded-10 px-2 py-2 leading-5 text-white-500 ".concat(n===D-1?"bottom-8":"top-8"),"aria-hidden":"true",children:[(0,a.jsx)("p",{className:"text-left text-xs font-medium ".concat((null==f?void 0:null===(s=f.link)||void 0===s?void 0:s.url)?"pb-2":""),children:f.text}),(null==f?void 0:null===(i=f.link)||void 0===i?void 0:i.url)?(0,a.jsx)(x.Z,{href:null==f?void 0:null===(c=f.link)||void 0===c?void 0:c.url,className:"mt-6 text-xs font-medium text-blue-200","aria-label":"btn text",target:"_blank",children:(0,a.jsx)("span",{className:"bg-mustard-500 rounded-full px-2 py-1","aria-hidden":"true",children:null==f?void 0:null===(o=f.link)||void 0===o?void 0:o.text})}):null]})}):null]}):null]})]},"featureIndex-".concat(n))})}):null,D>s.Wf?(0,a.jsx)("div",{className:"relative flex w-full items-center justify-center space-x-3 bg-white-500 before:absolute before:left-0 before:top-1/2 before:w-full  before:border-b before:border-dashed before:border-[#D3D3E7] before:content-[''] ".concat(U?"mb-4":"mb-10"),children:(0,a.jsxs)("div",{className:"group relative z-10 flex cursor-pointer items-center justify-center space-x-3 bg-white-500 px-3","aria-hidden":!0,onClick:()=>_(),children:[(0,a.jsx)("div",{className:"border-b border-[#263238] text-[11px] font-normal italic text-[#263238]",children:"See ".concat(k?"less":"more")}),(0,a.jsx)("div",{className:"transition duration-500 ".concat(k?"-rotate-90":"rotate-90"),children:(0,a.jsx)(b.Z,{fill:"#263238",stroke:"#263238",width:"6",height:"8"})})]})}):null,(0,a.jsxs)("div",{className:"w-full ".concat(U?D<3?"absolute left-0 bottom-4":"":"absolute left-0 bottom-0"," ").concat(D?"":"pt-3"),children:[(0,a.jsx)("button",{onClick(){null==o||o(w)},type:"button",className:"bg-[#0FA8D8] py-2 text-base font-semibold capitalize text-white-500 ".concat(U?"-mx-4 w-[120%]":"w-full"),children:(0,a.jsxs)("span",{className:"relative flex items-center justify-center space-x-2 rounded-full",children:[v&&j===e.id?(0,a.jsx)("span",{className:"pr-2",children:(0,a.jsx)(f.default,{})}):null,I]})}),U?(0,a.jsx)("div",{className:"min-h-[76px] px-3 pt-4",children:(0,a.jsx)(p.Z,{amount:T})}):null]})]})},"productVariant-mobile-".concat(l))})})});t.default=v},43513:function(e,t,l){var a=l(52322),n=l(2784),s=l(49094);let i=(0,n.memo)(e=>{let{amount:t}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(s.PaymentMethodMessagingElement,{options:{amount:100*t,currency:"USD",paymentMethodTypes:["affirm"],countryCode:"US"}})})});t.Z=i}}]);