PageSourceSearch

https://movellefitness.com/_nuxt/CX_xHvZh.js

js movellefitness.com collected 2026-10-02 01:39:30 UTC 12,212 bytes, 1 lines download raw bytes

1import{_ as lt}from"./CHepraVR.js";import{J as ct,u as ut,a as dt,b as mt,z as gt,A as _t,d as pt,c as ht,F as bt,aX as ft,q as m,s as g,o as vt,i as l,l as s,j as V,h as t,aj as yt,v as i,y as u,e as wt,am as S,B as kt,aS as xt,aa as Tt,ab as Pt,al as Ct,f as Nt,X as It,p as jt,m as H,aN as St,g as n,O as $t}from"./CU33Wv7L.js";import{u as Ft}from"./eqIXLjD2.js";import{u as Bt}from"./BAwWGvDA.js";import{a as Dt}from"./DZT7j80w.js";import{u as Et,c as U}from"./0vWQR-tb.js";import{t as N,u as Lt}from"./D1nJZHrb.js";import"./DA5P3-py.js";import"./DPz026HA.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new d.Error().stack;e&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[e]="58525ecc-5cbb-413e-847a-32d71538dc91",d._sentryDebugIdIdentifier="sentry-dbid-58525ecc-5cbb-413e-847a-32d71538dc91")}catch{}})();{var b=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};b._sentryModuleMetadata=b._sentryModuleMetadata||{},b._sentryModuleMetadata[new b.Error().stack]=Object.assign({},b._sentryModuleMetadata[new b.Error().stack],{"_sentryBundlerPluginAppKey:pwa-fitness":!0})}function W(d){const e=d;e.__i18n=e.__i18n||[],e.__i18n.push({locale:"",resource:{en:{title:{t:0,b:{t:2,i:[{t:3}],s:"You did it! 🎉"}},intro:{t:0,b:{t:2,i:[{t:3,v:"That's "},{t:5,i:0},{t:3,v:" finished — every day, start to finish. Take a second to look at what you just did."}]}},intro_generic:{t:0,b:{t:2,i:[{t:3}],s:"That's your program finished — every day, start to finish. Take a second to look at what you just did."}},program_number:{t:0,b:{t:2,i:[{t:3,v:"Program "},{t:5,i:0}]}},metric_workouts:{t:0,b:{t:2,i:[{t:3}],s:"Workouts completed"}},metric_time:{t:0,b:{t:2,i:[{t:3}],s:"Time training"}},metric_calories:{t:0,b:{t:2,i:[{t:3}],s:"Calories burned"}},insights_title:{t:0,b:{t:2,i:[{t:3}],s:"What I noticed"}},ratings_loved:{t:0,b:{t:2,i:[{t:3,v:"You seemed to love: "},{t:5,i:0}]}},ratings_disliked:{t:0,b:{t:2,i:[{t:3,v:"Not your favorites: "},{t:5,i:0}]}},weight_title:{t:0,b:{t:2,i:[{t:3}],s:"Your weight"}},weight_start:{t:0,b:{t:2,i:[{t:3,v:"Started at "},{t:5,i:0},{t:5,i:1}]}},weight_now:{t:0,b:{t:2,i:[{t:3,v:"Now "},{t:5,i:0},{t:5,i:1}]}},weight_change_down:{t:0,b:{t:2,i:[{t:5,i:0},{t:5,i:1},{t:3,v:" down"}]}},weight_change_up:{t:0,b:{t:2,i:[{t:5,i:0},{t:5,i:1},{t:3,v:" up"}]}},weight_change_none:{t:0,b:{t:2,i:[{t:3}],s:"No change"}},observation_prefix:{t:0,b:{t:2,i:[{t:3,v:"Here's what I noticed: "},{t:5,i:0},{t:3,v:"."}]}},observation_liked:{t:0,b:{t:2,i:[{t:3,v:"you clearly thrive on "},{t:5,i:0}]}},observation_disliked:{t:0,b:{t:2,i:[{t:5,i:0},{t:3,v:" isn't really your thing"}]}},observation_weight_down:{t:0,b:{t:2,i:[{t:3,v:"you're "},{t:5,i:0},{t:5,i:1},{t:3,v:" lighter than on day one"}]}},observation_weight_up:{t:0,b:{t:2,i:[{t:3,v:"your weight is up "},{t:5,i:0},{t:5,i:1},{t:3,v:" since day one"}]}},observation_consistency:{t:0,b:{t:2,i:[{t:3,v:"you showed up for all "},{t:5,i:0},{t:3,v:" days of the program"}]}},observation_workouts:{t:0,b:{t:2,i:[{t:3,v:"you completed "},{t:5,i:0},{t:3,v:" workouts"}]}},observation_default:{t:0,b:{t:2,i:[{t:3}],s:"Here's what I noticed: you kept showing up, and that's the whole game."}},feedback_label:{t:0,b:{t:2,i:[{t:3}],s:"What should we work on next?"}},feedback_helper:{t:0,b:{t:2,i:[{t:3}],s:"Optional. Tell me what you'd like more or less of and I'll build it into your next program."}},feedback_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"I'd like more strength and core workouts, and a little less cardio."}},cta_generate:{t:0,b:{t:2,i:[{t:3}],s:"Generate My Next Program"}},cta_generating:{t:0,b:{t:2,i:[{t:3}],s:"Building your program..."}},cta_later:{t:0,b:{t:2,i:[{t:3}],s:"Maybe later"}},error_generate:{t:0,b:{t:2,i:[{t:3}],s:"Something went wrong while creating your program. Your progress is safe — please try again."}},cta_retry:{t:0,b:{t:2,i:[{t:3}],s:"Try Again"}},types:{strength:{t:0,b:{t:2,i:[{t:3}],s:"strength"}},cardio:{t:0,b:{t:2,i:[{t:3}],s:"cardio"}},hiit:{t:0,b:{t:2,i:[{t:3}],s:"HIIT"}},yoga:{t:0,b:{t:2,i:[{t:3}],s:"yoga"}},pilates:{t:0,b:{t:2,i:[{t:3}],s:"pilates"}},mobility:{t:0,b:{t:2,i:[{t:3}],s:"mobility"}},stretching:{t:0,b:{t:2,i:[{t:3}],s:"stretching"}},core:{t:0,b:{t:2,i:[{t:3}],s:"core"}},full_body:{t:0,b:{t:2,i:[{t:3}],s:"full body"}},upper_body:{t:0,b:{t:2,i:[{t:3}],s:"upper body"}},lower_body:{t:0,b:{t:2,i:[{t:3}],s:"lower body"}},recovery:{t:0,b:{t:2,i:[{t:3}],s:"recovery"}}}}}})}const Ot={class:"w-full min-h-full bg-white pb-[calc(6rem+env(safe-area-inset-bottom))] min-[897px]:pb-10"},At={class:"w-full max-w-xl mx-auto px-5 pt-[max(1.5rem,env(safe-area-inset-top))]"},Mt={class:"flex flex-col items-center text-center"},zt={class:"w-24 h-24 rounded-full overflow-hidden bg-gradient-to-r from-[#C5D7F1] to-[#FED9C5] relative"},Rt={key:0,class:"mt-4 text-xs font-medium uppercase tracking-wide text-colorThree/45"},Vt={class:"mt-1 font-serif text-4xl leading-tight"},Ht={class:"mt-3 text-colorThree/70 leading-relaxed"},Ut={class:"text-2xl font-bold tabular-nums leading-none"},Wt={class:"mt-1.5 text-xs font-light text-colorThree/55"},Yt={key:1,class:"mt-6 rounded-2xl border border-colorTwo/60 p-4"},qt={class:"mb-2 font-serif text-xl"},Xt={key:0,class:"text-colorThree/75"},Jt={key:1,class:"text-colorThree/75"},Kt={key:2,class:"mt-4 rounded-2xl bg-[#FFF6EF] p-4"},Qt={class:"mb-1 text-xs font-medium uppercase tracking-wide text-colorThree/45"},Zt={class:"flex items-baseline gap-2"},Gt={class:"text-lg font-medium tabular-nums"},te={class:"text-lg font-medium tabular-nums"},ee={key:0,class:"mt-1 text-sm text-colorOne"},oe={class:"mt-6 font-serif text-lg leading-snug text-colorThree/80"},ae={class:"mt-8"},re={class:"block font-medium",for:"next-program-feedback"},se={class:"mb-2 text-sm text-colorThree/55"},ie=["placeholder"],ne={key:3,class:"mt-6 rounded-xl bg-red-50 p-3 text-sm text-red-700"},le=["disabled"],ce={__name:"program-complete",setup(d){const{t:e,te:$,locale:F}=ct(),Y=ut(),B=dt(),I=mt(),q=Ft(),{$user:D,$modal:X}=gt(),{showPaywall:J}=Bt(),{vertical:K}=_t(),E=pt();jt().locale(F.value),ht({title:`${q} | Program complete`});const Q=Dt("Elle"),_=bt(),{fitnessProfile:L}=ft(_),{programState:Z,latestCompletedProgram:w,loadProgram:G}=Et(L.value?.workout_program),{consumeCompletedProgram:tt}=Lt(),a=m(null),j=m(!0),p=m(""),O=m(!1),k=m(!1),x=m(!1),h=m(Y.query.program_id||null),A=g(()=>a.value?.program?.title||w.value?.currentLocale?.title||w.value?.title||""),M=g(()=>a.value?.program?.program_number||null),et=o=>{if(!o)return null;const r=Math.floor(o/60),c=o%60;return r===0?`${c} min`:c>0?`${r}h ${c}min`:`${r}h`},T=g(()=>{const o=[];if(!a.value)return o;a.value.workouts_completed>0&&o.push({key:"workouts",value:a.value.workouts_completed,label:e("metric_workouts")});const r=et(a.value.total_minutes);return r&&o.push({key:"time",value:r,label:e("metric_time")}),a.value.estimated_calories>0&&o.push({key:"calories",value:`${a.value.estimated_calories.toLocaleStr
1ing(F.value)} kcal`,label:e("metric_calories")}),o}),ot=o=>{const r=`types.${o}`;return $(r)?e(r):String(o).replace(/[_-]+/g," ").toLowerCase()},P=o=>o.map(ot).join(", "),f=g(()=>a.value?.ratings?.liked_types||[]),v=g(()=>a.value?.ratings?.disliked_types||[]),z=g(()=>{const o=a.value?.weight;return!o||o.end===null||o.change===null?null:o.change===0?e("weight_change_none"):o.change<0?e("weight_change_down",[Math.abs(o.change),o.unit]):e("weight_change_up",[o.change,o.unit])}),at=g(()=>{if(!a.value)return e("observation_default");const o=[];f.value.length&&o.push(e("observation_liked",[P(f.value)])),v.value.length&&o.push(e("observation_disliked",[P(v.value)]));const r=a.value.weight;if(o.length<2&&r&&r.change!==null&&r.change!==0&&o.push(r.change<0?e("observation_weight_down",[Math.abs(r.change),r.unit]):e("observation_weight_up",[r.change,r.unit])),o.length===0&&a.value.workouts_completed>0){const c=a.value.program?.days||0;o.push(c>0&&a.value.workouts_completed>=c?e("observation_consistency",[c]):e("observation_workouts",[a.value.workouts_completed]))}return o.length===0?e("observation_default"):e("observation_prefix",[o.join(", and ")])}),C=()=>({program_id:h.value,program_number:a.value?.program?.program_number,workouts_completed:a.value?.workouts_completed,total_workout_minutes:a.value?.total_minutes,estimated_calories:a.value?.estimated_calories,ratings_count:a.value?.ratings?.count??0,feedback_provided:p.value.trim().length>0,weight_data_available:!!a.value?.weight}),rt=async o=>{try{a.value=await $fetch(`${H().public.apiUrl}/api/program-summary`,{query:{program_id:o},headers:{Authorization:`Bearer ${E.jwt}`}})}catch(r){console.error("[program-complete] Failed to load the program summary:",r),a.value=null}};vt(async()=>{if(tt(),Z.value!=="completed"&&await G(),h.value||(h.value=w.value?._id||null),!h.value){j.value=!1,B.replace(I("/my-plan"));return}await rt(h.value),j.value=!1,N("program_completion_summary_viewed",C())});const st=()=>{O.value||p.value.trim().length===0||(O.value=!0,N("next_program_feedback_added",C()))},R=async()=>{k.value=!0,x.value=!1,N("next_program_generation_started",C());const o=L.value?.workout_program;try{const{jobId:r,slug:c}=await $fetch(`${H().public.apiUrl}/api/generate-next-program`,{method:"POST",body:{completed_program_id:h.value,feedback:p.value.trim()||void 0},headers:{Authorization:`Bearer ${E.jwt}`}});_.jobId=r,_.fitnessProfile||(_.fitnessProfile={}),_.fitnessProfile.workout_program=c,await _.saveOnboardingData(D.data()?._id),U(o),U(c),await B.replace(I("/my-plan"))}catch(r){console.error("[program-complete] Next-program generation failed:",r),x.value=!0,N("next_program_generation_failed",C())}finally{k.value=!1}},it=async()=>{const o=w.value||{settings:{is_premium:!0}};if(D.mayAccess(K,o)){await R();return}St.isNativePlatform()?await J()&&await R():X.open({component:"ChoosePlan"})};return(o,r)=>{const c=lt,nt=It;return n(),l("div",Ot,[s("div",At,[s("div",Mt,[s("div",zt,[V(yt,{src:t(Q).image,class:"h-40 -mt-2 object-top object-cover drop-shadow-lg",sizes:"160px"},null,8,["src"])]),t(M)?(n(),l("p",Rt,i(t(e)("program_number",[t(M)])),1)):u("",!0),s("h1",Vt,i(t(e)("title")),1),s("p",Ht,i(t(A)?t(e)("intro",[t(A)]):t(e)("intro_generic")),1)]),t(j)?(n(),wt(c,{key:0,class:"my-16"})):(n(),l(S,{key:1},[t(T).length?(n(),l("div",{key:0,class:kt(["mt-8 grid gap-3",t(T).length===1?"grid-cols-1":t(T).length===2?"grid-cols-2":"grid-cols-3"])},[(n(!0),l(S,null,xt(t(T),y=>(n(),l("div",{key:y.key,class:"rounded-2xl bg-[#FFF6EF] p-4 text-center"},[s("p",Ut,i(y.value),1),s("p",Wt,i(y.label),1)]))),128))],2)):u("",!0),t(a)?.ratings&&(t(f).length||t(v).length)?(n(),l("div",Yt,[s("h2",qt,i(t(e)("insights_title")),1),t(f).length?(n(),l("p",Xt,i(t(e)("ratings_loved",[P(t(f))])),1)):u("",!0),t(v).length?(n(),l("p",Jt,i(t(e)("ratings_disliked",[P(t(v))])),1)):u("",!0)])):u("",!0),t(a)?.weight?(n(),l("div",Kt,[s("h2",Qt,i(t(e)("weight_title")),1),s("div",Zt,[s("p",Gt,i(t(e)("weight_start",[t(a).weight.start,t(a).weight.unit])),1),t(a).weight.end!==null?(n(),l(S,{key:0},[r[1]||(r[1]=s("span",{class:"text-colorThree/35"},"→",-1)),s("p",te,i(t(e)("weight_now",[t(a).weight.end,t(a).weight.unit])),1)],64)):u("",!0)]),t(z)?(n(),l("p",ee,i(t(z)),1)):u("",!0)])):u("",!0),s("p",oe,i(t(at)),1),s("div",ae,[s("label",re,i(t(e)("feedback_label")),1),s("p",se,i(t(e)("feedback_helper")),1),Tt(s("textarea",{id:"next-program-feedback","onUpdate:modelValue":r[0]||(r[0]=y=>Ct(p)?p.value=y:null),class:"w-full h-24 p-3 bg-stone-100 rounded-xl border border-stone-200",rows:"3",maxlength:"1000",placeholder:t(e)("feedback_placeholder"),onBlur:st},null,40,ie),[[Pt,t(p)]])]),t(x)?(n(),l("p",ne,i(t(e)("error_generate")),1)):u("",!0),s("button",{type:"button",class:"mt-4 w-full rounded-full bg-colorOne px-6 py-4 font-medium text-white shadow-lg transition active:scale-[0.98] disabled:opacity-50",disabled:t(k),onClick:it},i(t(k)?t(e)("cta_generating"):t(x)?t(e)("cta_retry"):t(e)("cta_generate")),9,le),V(nt,{to:t(I)("/my-plan"),class:"mt-3 mb-4 block py-2 text-center text-sm font-semibold text-colorOne"},{default:Nt(()=>[$t(i(t(e)("cta_later")),1)]),_:1},8,["to"])],64))])])}}};typeof W=="function"&&W(ce);export{ce 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.