1import{_ as ce}from"./7d6gfDXL.js";import{_ as ue}from"./C12TUwKm.js";import de from"./BCpaYShN.js";import me from"./B1j-MASZ.js";import pe from"./CiCLuUJQ.js";import ve from"./i_QiERDu.js";import{u as ke}from"./BPV7eu8K.js";import{u as be}from"./D8nlBy8-.js";import{u as ge,r as _e}from"./C4NJUCqF.js";import{u as fe}from"./CHudUinb.js";import{r as ye}from"./DOghimL-.js";import{r as he,a as xe}from"./BlI-FQnq.js";import{s as C}from"./DDOY1lLW.js";import{c as we}from"./wzWXuswT.js";import{M as Ce}from"#entry";import{y as Be,k as Se,ai as Te,A as a,a1 as R,a0 as W,ag as c,D as r,aq as Le,_ as t,ak as q,F as o,a4 as i,X as B,al as _,$ as k,ar as Pe,a5 as d,j as De,M as Fe}from"./D0rPpKiU.js";import"./CCbPzmU6.js";import"./UWToDBcR.js";import"./DSqrqKx1.js";import"./D_gTWDL9.js";import"./C5R8YNXo.js";import"./SCyiZwk1.js";import"./dpV1vEQk.js";import"./Bg7opIwV.js";import"./BCTa1yj3.js";import"./BHe9BvlE.js";const Ue={key:0,class:"w-full","aria-label":"Pricing plan"},$e={class:"px-8 pt-5"},ze={key:0,role:"status","aria-label":"Loading pricing information"},Ae={key:1,class:"flex flex-col items-start w-full"},Ie={key:0,class:"w-full mb-2"},Ne={class:"flex flex-col items-start gap-2 pt-2 pb-3"},Oe={class:"flex items-baseline gap-2"},Ve={key:0,class:"title-bold-4 text-cool-grey-450 line-through"},Me={class:"title-bold-4 text-cool-grey-700"},je={key:1,class:"title-bold-6 text-cool-grey-700"},Ee={key:0,class:"title-8 text-cool-grey-500"},Re={key:2,class:"flex flex-col items-start pb-3 w-full"},We={class:"flex items-baseline gap-2"},qe={key:0,class:"title-bold-4 text-cool-grey-500 line-through"},Qe={class:"title-bold-4 text-cool-grey-700"},Ge={key:1,class:"title-bold-6 text-cool-grey-700"},He={key:1,class:"title-8 text-cool-grey-500 mt-1"},Xe={class:"w-full"},Je={key:3,class:"w-full mt-3"},Ke={key:4,class:"caption-disclaimer text-cool-grey-400 text-center mt-1"},Ye=Be({__name:"OrdermenuFlex",props:{blok:{}},setup(b){const f=De(!1),n=b,S=r(()=>(n.blok.checkout_links?.length??0)>0),{checkoutLinks:y,activeTab:h,activeCardData:Q,formattedPrice:T,activeBadge:x,activeBadgeColor:L,activeBadgeTextColor:P,activeBadgeSize:G,activeBadgeStyle:D,activeSlashedPrice:H,activePeriod:F,activeDescription:X,descriptionTier:U,slashedPriceTier:$,activeTarget:J,checkoutLinkUrl:K,handleCheckoutClick:Y}=ke(r(()=>n.blok.checkout_links??[])),{trackProductView:Z,trackCheckoutClick:ee}=be(),{getFbCapiData:te}=ge(),z=fe(),A=Ce(),m=r(()=>n.blok.checkout_links?.find(e=>e.name===h.value)||n.blok.checkout_links?.[0]),u=r(()=>!!m.value?.static_url),I=r(()=>!u.value&&!Q.value),N=async()=>{const e=m.value;if(!e)return null;const s=await te(),p=he(e),v=A.query.otag,l=Array.isArray(v)?v.filter(w=>typeof w=="string"&&w.trim()!=="").join(","):typeof v=="string"&&v.trim()!==""?v.trim():"";return{productId:_e(z.pageProductId,e.static_url),productName:ye(A.path),price:Number.parseFloat(e.static_price||"0")||0,currency:"USD",billingCycle:e.period||"",offerName:e.name||"Mindvalley Membership",checkoutUrl:e.static_url||"",checkoutLinkLabel:e.button_label||"",tags:p.join(","),otag:l,discountApplied:"",...s}},oe=r(()=>u.value?m.value?.static_price||"":T.value),O=r(()=>u.value?m.value?.static_slashed_price||"":H.value),V=r(()=>u.value?m.value?.static_description||"":X.value),le=r(()=>{if(u.value){const e=xe(m.value?.static_url||"",z.funnelQuestId),s=m.value?.next_url;if(!s||!e)return e;try{const p=new URL(e);return p.searchParams.append("next",s),p.toString()}catch{return e}}return K.value}),ae=r(()=>m.value?.button_label||"Get access");Se(async()=>{if(u.value){const e=await N();e&&Z(e)}});const re=async()=>{if(u.value){const e=await N();e&&ee(e)}else Y()},M=r(()=>C(n.blok?.title).map(e=>e.component!=="Editor"?e:{...e,font_size:e.font_size||"title-5",text_color:e.text_color||"cool-grey-700"})),j=r(()=>C(n.blok?.content_after_button)),g=r(()=>C(n.blok?.timer).map(e=>e.component!=="TimerWrapper"?e:{...e,size:e.size||"sm"})),se=r(()=>({time:n.blok.timer_time,label:n.blok.timer_label,storage_key:n.blok.timer_storage_key,hide_hours:!0})),ie=r(()=>g.value.length>0||!!n.blok.timer_time),E=r(()=>g.value.some(e=>e.component==="TimerWrapper"&&!!e.background_color_class)),ne=r(()=>E.value?"-mt-2":n.blok.timer_highlight?"-mt-2 py-3 px-4 bg-yellow-500 border-b border-yellow-500":"border-b border-cool-grey-200 pb-2 px-4");
1return(e,s)=>{const p=Fe("StoryblokComponent"),v=Le("editable");return S.value?Te((t(),a("section",Ue,[R(ce,{padding:"pt-2 pb-4",rounded:"rounded-2xl",customStyle:{boxShadow:"0 5px 20px rgba(0,0,0,.1)",overflow:"hidden"}},{default:W(()=>[!f.value&&ie.value&&S.value?(t(),a("div",{key:0,class:q(ne.value)},[I.value?(t(),a("div",{key:0,class:q(o(we)("flex gap-2 mb-2",E.value&&"px-4 pt-2"))},[...s[3]||(s[3]=[i("div",{class:"h-4 w-full bg-cool-grey-300 rounded animate-pulse"},null,-1)])],2)):g.value.length>0?(t(!0),a(B,{key:1},_(g.value,l=>(t(),k(ve,{key:l._uid,blok:l,onComplete:s[0]||(s[0]=w=>f.value=!0)},null,8,["blok"]))),128)):(t(),k(pe,{key:2,blok:se.value,onComplete:s[1]||(s[1]=l=>f.value=!0),hideUnitLabels:!0},null,8,["blok"]))],2)):c("",!0),i("div",$e,[I.value?(t(),a("div",ze,[...s[4]||(s[4]=[i("div",{class:"flex gap-2 mb-4"},[i("div",{class:"h-8 w-30 bg-cool-grey-300 rounded animate-pulse"}),i("div",{class:"h-8 w-24 bg-cool-grey-300 rounded animate-pulse"})],-1),i("div",{class:"flex flex-col items-center gap-2 py-6"},[i("div",{class:"h-12 w-full bg-cool-grey-300 rounded animate-pulse"}),i("div",{class:"h-4 w-48 bg-cool-grey-300 rounded animate-pulse mt-2"})],-1),i("div",{class:"h-11 w-full bg-cool-grey-300 rounded animate-pulse"},null,-1)])])):(t(),a("div",Ae,[M.value.length>0?(t(),a("div",Ie,[(t(!0),a(B,null,_(M.value,l=>(t(),k(p,{key:l._uid,blok:l},null,8,["blok"]))),128))])):c("",!0),!u.value&&o(y)?.length>1?(t(),k(ue,{key:1,items:o(y),badge:o(x),"badge-color":o(L),"badge-text-color":o(P),"badge-style":o(D),"default-value":o(h),"onUpdate:modelValue":s[2]||(s[2]=l=>h.value=l)},Pe({_:2},[_(o(y),l=>({name:`content-${l.value}`,fn:W(()=>[i("div",Ne,[i("div",Oe,[o($)(l)?(t(),a("span",Ve,"$"+d(o($)(l)),1)):c("",!0),i("span",Me,"$"+d(o(T)),1),l.period?(t(),a("span",je,"/"+d(l.period?.toLowerCase()),1)):c("",!0)]),o(U)(l)?(t(),a("div",Ee,d(o(U)(l)),1)):c("",!0)])])}))]),1032,["items","badge","badge-color","badge-text-color","badge-style","default-value"])):(t(),a("div",Re,[!u.value&&o(x)?(t(),k(de,{key:0,class:"mb-2",blok:{label:o(x),size:o(G),color:o(L),style:o(D),textColor:o(P)}},null,8,["blok"])):c("",!0),i("div",We,[O.value?(t(),a("span",qe,"$"+d(O.value),1)):c("",!0),i("span",Qe,"$"+d(oe.value),1),!u.value&&o(F)?(t(),a("span",Ge,"/"+d(o(F)),1)):c("",!0)]),V.value?(t(),a("div",He,d(V.value),1)):c("",!0)])),i("div",Xe,[R(me,{blok:{checkout_url:le.value,variant:"primary",color:"ordermenu",full_width:!0,label:ae.value,size:"xl",target:o(J)},onCheckoutClick:re},null,8,["blok"])]),j.value.length>0?(t(),a("div",Je,[(t(!0),a(B,null,_(j.value,l=>(t(),k(p,{key:l._uid,blok:l},null,8,["blok"]))),128))])):c("",!0),b.blok.credit_card_disclaimer?(t(),a("p",Ke,d(b.blok.credit_card_disclaimer),1)):c("",!0)]))])]),_:1})])),[[v,b.blok]]):c("",!0)}}}),Bt=Object.assign(Ye,{__name:"OrdermenuFlex"});export{Bt as default};
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.