1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="89050899-199d-4d57-9c70-313f98ca85c5",e._sentryDebugIdIdentifier="sentry-dbid-89050899-199d-4d57-9c70-313f98ca85c5")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3882],{80965:(e,l,s)=>{"use strict";s.d(l,{c:()=>i});var a=s(14e3),r=s(89099),t=s(14232);let i=()=>{let e=(0,a.useSearchParams)(),l=(0,r.useRouter)(),s=(0,a.usePathname)(),i=(0,t.useCallback)((l,s)=>{let a=new URLSearchParams(e??{});return a.set(l,s),a.toString()},[e]),n=(0,t.useCallback)((l,s)=>{let a=new URLSearchParams(e??{});return a.append(l,s),a.toString()},[e]),o=(0,t.useCallback)((l,s)=>{let a=new URLSearchParams(e??{});return a.delete(l),s.map(e=>a.append(l,e)),a.toString()},[e]),c=(0,t.useCallback)(l=>{let s=new URLSearchParams(e??{});return s.delete(l),s.toString()},[e]);return{queryParams:e,createQueryString:i,setQueryParam:(e,a)=>{l.push(`${s}?${i(e,a)}`,void 0,{shallow:!0})},getQueryParam:l=>(null==e?void 0:e.get(l))??null,deleteParam:e=>{l.push(`${s}?${c(e)}`,void 0,{shallow:!0})},getAllFromString:l=>new URLSearchParams(e??{}).getAll(l),appendQueryParam:(e,a)=>{l.push(`${s}?${n(e,a)}`,void 0,{shallow:!0})},deleteParamAndAppend:(e,a)=>{l.push(`${s}?${o(e,a)}`,void 0,{shallow:!0})},getAllQueryAsString:()=>new URLSearchParams(e??{}).toString()}}},94812:(e,l,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/birth-plan-template/[id]",function(){return s(97168)}])},97168:(e,l,s)=>{"use strict";s.r(l),s.d(l,{__N_SSP:()=>E,default:()=>U});var a=s(37876),r=s(31311),t=s(77041),i=s(45872);let n=e=>{let{data:l}=e;return(0,a.jsxs)("div",{className:"mx-auto w-full max-w-[1170px] pt-[32px] lg:pt-[32px]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(i.A,{color:"primary",size:"xl",className:"text-[30px]",children:"You may also like"}),(0,a.jsx)("div",{className:"hidden lg:block",children:(0,a.jsx)(t.A,{children:"Browse all templates"})})]}),(0,a.jsx)("div",{className:"hide-scrollbar grid w-full grid-cols-2 gap-5 overflow-x-auto pb-8 pt-6 md:!flex lg:gap-7.5 lg:pb-0 lg:pt-10",children:null==l?void 0:l.map((e,l)=>(0,a.jsx)("div",{className:"flex size-full justify-center",children:(0,a.jsx)(r.A,{data:e,imageOnly:!0})},l))})]})};var o=s(68827),c=s.n(o),d=s(14e3),m=s(89099),x=s(10553),p=s(14232),u=s(87109),h=s(27888),g=s(1038);let v={size:20,edit:!1},j=e=>{let{rating:l,count:s,verbose:r,showRatingDetails:t}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,p.createElement)(g.A,{...v,value:l,isHalf:!0,color:"lightgray",key:`stars_${l}`}),t&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(i.A,{color:"secondary",size:"sm",children:[l," ",r&&"out of"]}),(0,a.jsxs)(i.A,{size:"sm",className:"text-neutral-500",children:["(",s,")"]})]})]})},w=e=>{var l,s;let{children:r,color:t="white",bg:i="carton",className:n=""}=e,o={bg:{primary:"bg-primary",secondary:"bg-secondary",transparent:"bg-transparent",cream:"bg-[#EEE7E9]",carton:"bg-carton"},color:{primary:"text-primary",secondary:"text-secondary",white:"text-white"}};return(0,a.jsx)("div",{className:`flex w-min items-center whitespace-nowrap rounded-9px px-3 py-1 capitalize ${null==o||null==(l=o.bg)?void 0:l[i]} ${null==o||null==(s=o.color)?void 0:s[t]} ${n}`,children:r})};var f=s(80965),b=s(63888),y=s(45254),N=s(2956),A=s(28813);let k=e=>{var l,s,r,n,o,g,v,A,k,z,R,P;let{data:C}=e,{query:T,push:$}=(0,m.useRouter)(),{deleteParam:_}=(0,f.c)(),I=(0,d.useParams)(),{data:D}=(0,x.useSession)(),E=(0,p.useRef)(null),{activeTheme:U,setTheme:O,addOns:L,setAddOns:F}=(0,N.C)(),{isOnboardModalOpen:J,setIsOnboardModalOpen:V}=(0,y.U8)(),[B,M]=(0,p.useState)(!1),[Q,q]=(0,p.useState)(0),[W,X]=(0,p.useState)(null),[Y,G]=(0,p.useState)(0),[H,K]=(0,p.useState)(!1);(0,p.useEffect)(()=>{(null==T?void 0:T.modal)&&_("modal")},[null==T?void 0:T.modal,T]),(0,p.useEffect)(()=>{var e,l;let s=async()=>{let e=await S();(null==e?void 0:e.isComplete)===!1&&V(!0)};(null==D||null==(e=D.user.account)?void 0:e.provider)&&(null==D||null==(l=D.user.account)?void 0:l.provider)!=="guest"&&s()},[]);let Z=(0,p.useMemo)(()=>
1{if(null!==W){var e,l;return null==(l=C.templateThemes)||null==(e=l[W])?void 0:e.themeName}return U},[W,C.templateThemes]),ee=e=>{K(!0),setTimeout(()=>{X(e),K(!1)},100)},el=()=>{K(!0),setTimeout(()=>{X(null),K(!1)},100)},es=async()=>{var e;console.log("handleRedirect");let l=null==D||null==(e=D.user)?void 0:e.jwtToken,s=(null==I?void 0:I.id)?I.id:null;if("string"==typeof s&&localStorage.setItem("slug",s),l){console.log("jwtToken",l);try{if((await b.F.auth.validateJwtTokenApiUserValidateJwtTokenPostRaw({tokenValidationRequest:{jwtToken:l}})).raw.ok){let e=s?`/birth-plan-builder/new/${s}`:"/birth-plan-builder/templates";$(e)}}catch(e){console.log("error",e)}}};return(0,a.jsxs)("div",{className:"mx-auto flex max-w-[1170px] flex-col gap-2 pt-6 lg:flex-row lg:gap-[60px] lg:pb-22",children:[(0,a.jsx)("div",{className:"w-auto lg:w-[510px]",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsx)(h.RC,{spaceBetween:10,modules:[u.U1,u.Vx,u.WO],onSwiper:e=>{E.current=e},onSlideChange:()=>{var e;return G((null==(e=E.current)?void 0:e.activeIndex)||0)},children:null==(r=C.templateThemes)||null==(s=r[Q])||null==(l=s.themeImages)?void 0:l.map((e,l)=>(0,a.jsx)(h.qr,{children:(0,a.jsx)("div",{className:"relative mx-auto w-full max-w-[510px] overflow-hidden rounded-[40px] lg:size-[510px]",children:(0,a.jsx)(c(),{priority:!0,src:e??"",height:550,width:550,alt:`slide-${l}`})})},l))})}),(0,a.jsx)("div",{className:"-mt-5",children:(0,a.jsx)("div",{className:"hide-scrollbar flex gap-3 overflow-x-auto overflow-y-hidden md:justify-center",children:null==(g=C.templateThemes)||null==(o=g[Q])||null==(n=o.themeImages)?void 0:n.map((e,l)=>(0,a.jsx)("div",{onClick:()=>{E.current&&E.current.slideTo(l)},className:"!w-[70px] cursor-pointer",children:(0,a.jsx)("div",{className:`relative size-[66px] overflow-hidden rounded-[12px] ${Y===l?"border-2.4 border-primary":""}`,children:(0,a.jsx)(c(),{src:e??"",layout:"fill",priority:!0,alt:`thumb-${l}`,className:"size-full bg-cover"})})},l))})})]})}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-6 lg:gap-8 lg:pt-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-3 flex gap-3",children:null==C||null==(v=C.templateCategories)?void 0:v.map((e,l)=>(0,a.jsx)(w,{children:e},l))}),(0,a.jsx)("div",{className:"mb-1 lg:mb-3",children:(0,a.jsx)(i.A,{header:!0,color:"primary",size:"3xl",children:C.templateDisplayName})}),(0,a.jsx)("a",{className:"mb-3 cursor-pointer",href:"#review",children:(0,a.jsx)(j,{showRatingDetails:!0,count:(null==(A=C.templateReviews)?void 0:A.numberOfReviews)||0,rating:(null==(k=C.templateReviews)?void 0:k.averageRating)||0})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(i.A,{size:"md",children:function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;return(null==e?void 0:e.length)>l&&!B?(null==e?void 0:e.slice(0,l))+"...":e}(null==C?void 0:C.templateSmallDescription)??""}),(0,a.jsx)(i.A,{size:"sm",color:"primary",onClick:()=>M(!B),weight:"semibold",className:"cursor-pointer underline",children:B?"Read Less":"Read More"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(i.A,{color:"primary",size:"lg",weight:"semibold",children:"Themes"}),Z&&(0,a.jsxs)(i.A,{size:"md",className:"mb-4 mt-2",children:["Theme:"," ",(0,a.jsx)("span",{className:`font-bold text-primary transition-all duration-300 ${H?"translate-y-1 opacity-0":"translate-y-0 opacity-100"} `,children:Z})]}),(0,a.jsx)("div",{className:"mt-[7px] flex flex-wrap gap-4",children:null==C||null==(R=C.templateThemes)||null==(z=R.filter(e=>!L||+e.tempOptionsReference===L.optionId))?void 0:z.map((e,l)=>{var s;return(0,a.jsx)("div",{onClick:()=>{q(l),O(e.themeName)},onMouseEnter:()=>ee(l),onMouseLeave:el,className:`!size-[70px] cursor-pointer ${Q===l?"border-2.4 border-primary":""} relative overflow-hidden rounded-xl`,children:(0,a.jsx)(c(),{src:(null==(s=e.themeImages)?void 0:s[0])??"",priority:!0,layout:"fill",alt:"template",objectFit:"cover"})},l)})})]}),(null==C||null==(P=C.templateOptions)?void 0:P.length)?(0,a.jsxs)("div",{className:"max-w-[487px]",children:[(0,a.jsx)(i.A,{color:"primary",size:"lg",weight:"semibold",children:"Add-ons"}),(0,a.jsx)("div",{className:"flex flex-col gap-[7px]",children:null==C?void 0:C.templateOptions.map((e,l)=>{let s=(null==L?void 0:L.optionId)===e.optionId;return(0,a.jsxs)("div",{onClick:()=>
1{if((null==L?void 0:L.optionId)===e.optionId)return void F(null);F(e)},className:`mt-[7px] flex cursor-pointer items-center justify-between gap-4 rounded-xl border-2.4 px-6 py-4 ${s?"border-primary bg-[#f8f8f8]":"border-border-add-on/20"}`,children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(i.A,{color:"primary",size:"md",weight:"semibold",children:e.optionName}),(0,a.jsx)(i.A,{size:"sm",children:e.optionDescription})]}),s?(0,a.jsx)("div",{className:"size-5 text-primary",children:(0,a.jsx)(c(),{src:"/images/activecheck.svg",alt:"checkmark",width:20,height:20})}):(0,a.jsx)("div",{className:"size-5 text-primary",children:(0,a.jsx)(c(),{src:"/images/check.svg",alt:"checkmark",width:20,height:20})})]},l)})})]}):null,(0,a.jsxs)("section",{className:"flex max-w-[487px] flex-col justify-between lg:flex-row lg:gap-6",children:[(0,a.jsx)("div",{onClick:es,className:"hidden h-full lg:block",children:(0,a.jsx)(t.A,{bg:"primary",className:"h-full w-[270px] justify-center lg:h-[52px]",color:"white",children:(null==C?void 0:C.isActive)?"Use template":"Coming Soon"})}),(0,a.jsx)("div",{style:{background:"linear-gradient(180deg, rgba(252, 247, 243, 0.00) 0%, rgba(252, 247, 243, 0.95) 48.04%)"},className:"fixed bottom-0 left-0 z-40 w-full p-6 lg:hidden",children:(0,a.jsx)(t.A,{bg:"primary",className:"h-[52px] w-full justify-center",color:"white",onClick:()=>{let e=`/birth-plan-template/${null==I?void 0:I.id}`;if(sessionStorage.getItem("redirect")!==e&&sessionStorage.setItem("redirect","/birth-plan-builder/templates"),!J){var l;(null==D||null==(l=D.user)?void 0:l.jwtToken)&&es()}},disabled:!(null==C?void 0:C.isActive),children:(null==C?void 0:C.isActive)?"Use template":"Coming Soon"})}),(0,a.jsxs)("div",{className:"arrow-box relative flex gap-3 rounded-xl bg-main-secondary p-4 lg:max-w-[195px] lg:px-4 lg:py-2",children:[(0,a.jsx)("div",{className:"relative max-h-[18px] w-full max-w-[18px] lg:top-3",children:(0,a.jsx)(c(),{src:"/images/heart.svg",alt:"heart",layout:"fill"})}),(0,a.jsxs)(i.A,{size:"xs",className:"text-[#4C061D94] text-opacity-[0.58]",children:[C.templateLikes," ","","expecting mothers loved this template"]})]})]})]})]})},S=async()=>{try{let l=await (0,x.getSession)(),s=null==l?void 0:l.user.jwtToken;if(void 0!==s){var e;return(null==l||null==(e=l.user)?void 0:e.trackingUuid)&&(0,A.b)(null==l?void 0:l.user.trackingUuid),(await b.F.user.isOnboardingCompleteApiUserIsOnboardingCompleteGetRaw({jwtToken:s})).value()}}catch(e){console.log("Error is",e)}};var z=s(86649);let R=e=>{let{description:l=""}=e;return(0,a.jsxs)("section",{className:"mx-auto flex max-w-[1170px] flex-col justify-between gap-4 border-b border-border py-[32px] lg:flex-row lg:items-start lg:gap-[60px] lg:pb-[64px] lg:pt-0",children:[(0,a.jsx)("div",{className:"w-auto lg:w-[510px]",children:(0,a.jsx)(i.A,{size:"xl",color:"primary",className:"lg:text-[30px]",children:"Description"})}),(0,a.jsx)("div",{className:"prose flex-1",children:(0,z.Ay)(l)})]})},P=e=>{let{data:l}=e;return(0,a.jsxs)("section",{className:"mx-auto flex max-w-[1170px] flex-col justify-between gap-6 border-b border-border py-[32px] lg:flex-row lg:items-start lg:gap-[60px] lg:py-[64px]",children:[(0,a.jsx)("div",{className:"w-auto lg:w-[510px]",children:(0,a.jsx)(i.A,{size:"xl",color:"primary",className:"lg:text-[30px]",children:"Features"})}),(0,a.jsx)("div",{className:"flex flex-1 flex-col gap-8 pb-8 lg:gap-12 lg:pb-0",children:null==l?void 0:l.map((e,l)=>{let{featureName:s,featureDescription:r,featureAsset:t}=e;return(0,a.jsxs)("div",{className:"flex gap-6",children:[(0,a.jsx)("div",{className:"relative max-h-12 w-full max-w-12",children:(0,a.jsx)(c(),{layout:"fill",objectFit:"cover",src:t,alt:t})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(i.A,{color:"primary",className:"text-xl-21",weight:"semibold",children:s}),(0,a.jsx)(i.A,{color:"secondary",size:"md",children:r})]})]},l)})})]})};var C=s(71989),T=s(53221);let $=()=>{let[e,l]=(0,p.useState)(!1);return(0,a.jsxs)("div",{className:"mx-auto my-16 flex max-w-[1170px] flex-col items-center justify-center gap-6 rounded-[40px] bg-primary px-6 py-22 text-center md:px-[80px] lg:mb-[100px] lg:mt-[80px] lg:flex-row lg:gap-10 lg:py-[80]",children:[(0,a.jsxs)("div",{className:"flex max-w-[667px] flex-col justify-start gap-3 md:text-left",children:[(0,a.jsx)("div",{children:(0,a.jsxs)(i.A,{size:"4xl",color:"white",children:["Ready to Create Your",(0,a.jsx)("span",{className:"ml-2 font-novela font-normal italic leading-[105%] tracking-[-1.5px]",children:"Birth Plan?"})," "]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"lg:hidden",children:(0,a.jsx)(i.A,{size:"lg",color:"white",children:"Join countless other mothers who have trusted our tool to create their perfect birth plan. Don't waitâyour perfect birth plan is just a few clicks away. Don't waitâyour perfect birth plan is just a few clicks away."})}),(0,a.jsx)("div",{className:"hidden lg:block",children:(0,a.jsx)(i.A,{size:"lg",color:"white",children:"Join countless other mothers who have trusted our tool to create their perfect birth plan. Don't waitâyour perfect birth plan is just a few clicks away."})})]})]}),(0,a.jsxs)("div",{className:"w-max",children:[(0,a.jsx)(t.A,{bg:"cream",color:"primary",onClick:()=>l(!0),rightSection:(0,a.jsx)(T.A,{}),children:(0,a.jsx)(i.A,{size:"lg",weight:"semibold",color:"primary",className:"whitespace-nowrap",children:"Join Waiting List"})}),(0,a.jsx)(C.A,{isOpen:e,setIsOpen:l})]})]})},_=e=>{var l;let{reviewStats:s}=e,r=null==s?void 0:s.numberOfReviews,[n,o]=(0,p.useState)(!1);return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{id:"review",className:"absolute -top-20"}),(0,a.jsxs)("section",{className:"mx-auto flex max-w-[1170px] flex-col justify-between gap-8 border-b border-border py-[32px] lg:flex-row lg:items-start lg:gap-[60px] lg:py-[64px]",children:[(0,a.jsxs)("div",{className:"w-auto lg:w-[510px]",children:[(0,a.jsx)(i.A,{color:"primary",size:"xl",className:"lg:text-[30px]",children:"Reviews"}),(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)(j,{showRatingDetails:!0,verbose
1:!0,count:r,rating:(null==s?void 0:s.averageRating)||0})}),(0,a.jsx)("div",{className:"",children:["templateReviews5StarPerc","templateReviews4StarPerc","templateReviews3StarPerc","templateReviews2StarPerc","templateReviews1StarPerc"].map((e,l)=>(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex w-auto flex-nowrap items-center gap-1",children:(0,a.jsx)(j,{count:5,rating:I(l)})}),(0,a.jsx)("div",{className:"h-2 w-[181px] flex-1 rounded bg-main-secondary lg:max-w-[212px]",children:(0,a.jsx)("div",{className:"h-full rounded bg-tertiary-500",style:{width:`${s[e]}%`}})}),(0,a.jsxs)(i.A,{size:"sm",children:[s[e],"%"]})]},l))})]})]}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-8 pb-8 lg:gap-12 lg:pb-0",children:[null==s||null==(l=s.topReviews)?void 0:l.slice(0,n?void 0:3).map((e,l)=>(0,a.jsxs)("div",{className:"flex gap-6",children:[e.motherPic?(0,a.jsx)("div",{className:"relative max-h-12 w-full max-w-12",children:(0,a.jsx)(c(),{layout:"fill",objectFit:"cover",className:"rounded-full",src:e.motherPic,alt:e.motherName})}):(0,a.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-border",children:(0,a.jsx)(i.A,{color:"primary",className:"text-[16px] font-medium",size:"lg",children:e.motherName.split(" ").map(e=>e[0]).join("")})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)(i.A,{color:"primary",className:"text-xl-21",weight:"semibold",children:e.motherName}),(0,a.jsx)(i.A,{className:"text-sm-15 text-neutral-500",children:e.timeAgo})]}),(0,a.jsx)(j,{count:e.rating,rating:e.rating}),(0,a.jsx)(i.A,{color:"secondary",size:"md",children:e.reviewText})]})]},l)),(0,a.jsxs)("div",{className:"flex gap-6",children:[(0,a.jsx)("div",{className:"size-12"}),(0,a.jsx)("div",{className:"self-end",children:(0,a.jsx)(t.A,{onClick:()=>o(!n),children:n?"View less":`View all ${r} reviews`})})]})]})]})]})},I=e=>{switch(e){case 0:return 5;case 1:return 4;case 2:return 3;case 3:return 2}return 1};var D=s(7333),E=!0;let U=e=>{let{data:l}=e;return(0,a.jsxs)(D.m,{className:"bg-main-secondary-50 pt-14 max-sm:px-5 max-sm:pt-16",title:l.templateDisplayName,description:l.templateSmallDescription,image:l.templateSmallThumbn
1ail,children:[(0,a.jsx)(k,{data:l}),(0,a.jsx)(R,{description:l.templateDescription}),(0,a.jsx)(P,{data:l.templateFeatures}),(0,a.jsx)(_,{reviewStats:l.templateReviews}),(0,a.jsx)(n,{data:l.recommendedBirthplans}),(0,a.jsx)($,{})]})}}},e=>{var l=l=>e(e.s=l);e.O(0,[8230,3273,7792,7888,7109,8827,6079,4104,7850,3888,7333,6055,2467,636,6593,8792],()=>l(94812)),_N_E=e.O()}]);
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.