PageSourceSearch

https://workout.cool/_next/static/chunks/0ttzak7qhyglc.js

js workout.cool collected 2026-10-03 20:26:38 UTC 33,078 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,817204,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(a,s,o){var n=s.prototype;o.utc=function(e){var t={date:e,utc:!0,args:arguments};return new s(t)},n.utc=function(t){var r=o(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},n.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var i=n.parse;n.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),i.call(this,e)};var l=n.init;n.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var d=n.utcOffset;n.utcOffset=function(a,s){var o=this.$utils().u;if(o(a))return this.$u?0:o(this.$offset)?d.call(this):this.$offset;if("string"==typeof a&&null===(a=function(e){void 0===e&&(e="");var a=e.match(t);if(!a)return null;var s=(""+a[0]).match(r)||["-",0,0],o=s[0],n=60*s[1]+ +s[2];return 0===n?0:"+"===o?n:-n}(a)))return this;var n=16>=Math.abs(a)?60*a:a,i=this;if(s)return i.$offset=n,i.$u=0===a,i;if(0!==a){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(i=this.local().add(n+l,e)).$offset=n,i.$x.$localOffset=l}else i=this.utc();return i};var c=n.format;n.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},n.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var u=n.toDate;n.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var m=n.diff;n.diff=function(e,t,r){if(e&&this.$u===e.$u)return m.call(this,e,t,r);var a=this.local(),s=o(e).local();return m.call(a,s,t,r)}}}()},562981,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,a,s){var o,n=function(e,r,a){void 0===a&&(a={});var s,o,n,i,l=new Date(e);return(void 0===(s=a)&&(s={}),(i=t[n=r+"|"+(o=s.timeZoneName||"short")])||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:o}),t[n]=i),i).formatToParts(l)},i=function(t,r){for(var a=n(t,r),o=[],i=0;i<a.length;i+=1){var l=a[i],d=l.type,c=l.value,u=e[d];u>=0&&(o[u]=parseInt(c,10))}var m=o[3],h=o[0]+"-"+o[1]+"-"+o[2]+" "+(24===m?0:m)+":"+o[4]+":"+o[5]+":000",g=+t;return(s.utc(h).valueOf()-(g-=g%1e3))/6e4},l=a.prototype;l.tz=function(e,t){void 0===e&&(e=o);var r,a=this.utcOffset(),n=this.toDate(),i=n.toLocaleString("en-US",{timeZone:e}),l=Math.round((n-new Date(i))/1e3/60),d=-(15*Math.round(n.getTimezoneOffset()/15))-l;if(Number(d)){if(r=s(i,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(d,!0),t){var c=r.utcOffset();r=r.add(a-c,"minute")}}else r=this.utcOffset(0,t);return r.$x.$timezone=e,r},l.offsetName=function(e){var t=this.$x.$timezone||s.tz.guess(),r=n(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var d=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return d.call(this,e,t);var r=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(r,e,t).tz(this.$x.$timezone,!0)},s.tz=function(e,t,r){var a=r&&t,n=r||t||o,l=i(+s(),n);if("string"!=typeof e)return s(e).tz(n);var d=function(e,t,r){var a=e-60*t*1e3,s=i(a,r);if(t===s)return[a,t];var o=i(a-=60*(s-t)*1e3,r);return s===o?[a,s]:[e-60*Math.min(s,o)*1e3,Math.max(s,o)]}(s.utc(e,a).valueOf(),l,n),c=d[0],u=d[1],m=s(c).utcOffset(u);return m.$x.$timezone=n,m},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(e){o=e}}}()},811596,e=>{"use strict";var t=e.i(147932),r=e.i(298866),a=e.i(877277),s=e.i(246561);let o=(0,s.default)("user-plus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);var n=e.i(401019),i=e.i(533928),i=i,l=e.i(685353),d=e.i(836536),c=e.i(291303),u=e.i(744457),m=e.i(486965);let h=(0,s.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var g=e.i(882438);let f={en:"🇬🇧",fr:"🇫🇷",es:"🇪🇸","zh-CN":"🇨🇳",ru:"🇷🇺",pt:"🇵🇹"};function x(){let e=(0,m.useAction)(g.updateUserAction),r=(0,c.useChangeLocale)(),a=(0,c.useI18n)(),s=async t=>{document.cookie=`detected-locale=${t}; max-age=31536000; path=/; samesite=lax`,r(t),e.execute({locale:t})};return(0,t.jsxs)("div",{className:"dropdown dropdown-end",children:[(0,t.jsx)("div",{className:"tooltip tooltip-bottom","data-tip":a("commons.change_language"),children:(0,t.jsx)("div",{className:"btn btn-ghost btn-circle h-8 w-8 p-0 text-xl flex items-center justify-center hover:bg-slate-200 border-none dark:hover:bg-gray-800 rounded-full",role:"button",tabIndex:0,children:(0,t.jsx)(h,{className:"w-5 h-5 text-blue-500 dark:text-blue-400"})})}),(0,t.jsx)("ul",{className:"mt-3 z-[1] p-2 shadow menu menu-sm dropdown-content bg-base-100 dar
1k:bg-black dark:text-gray-200 rounded-box  border border-slate-200 dark:border-gray-800",tabIndex:0,children:c.languages.map(e=>(0,t.jsx)("li",{className:"",children:(0,t.jsxs)("button",{className:"flex items-center gap-2 text-base hover:bg-slate-200 dark:hover:bg-gray-800 rounded-lg px-3 py-2 transition-colors whitespace-nowrap min-w-fit",onClick:()=>s(e),children:[(0,t.jsx)("span",{className:"text-lg",children:f[e]}),(0,t.jsx)("span",{className:"text-base whitespace-nowrap",children:(e=>{switch(e){case"en":return"English";case"fr":return"Français";case"es":return"Español";case"zh-CN":return"中文";case"ru":return"Русский";case"pt":return"Português";default:return e}})(e)})]})},e))})]})}var b=e.i(843988),p=e.i(192245),v=e.i(408430);let y=(0,s.default)("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),k=(0,s.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var j=e.i(519455);function w(){let{setTheme:e,resolvedTheme:r}=(0,v.useTheme)(),[a,s]=(0,p.useState)(!1);return((0,p.useEffect)(()=>s(!0),[]),a)?(0,t.jsx)("div",{className:"tooltip tooltip-bottom","data-tip":"light"===r?"Dark mode":"Light mode",children:(0,t.jsx)(j.Button,{className:"hover:bg-slate-200 rounded-full p-1 pr-1 sm:p-2 sm:pr-2",onClick:()=>e("light"===r?"dark":"light"),variant:"ghost",children:"light"===r?(0,t.jsx)(y,{className:"text-blue-500 dark:text-blue-400 h-6 w-6"}):(0,t.jsx)(k,{className:"text-blue-500 dark:text-blue-400 h-6 w-6"})})}):(0,t.jsx)("div",{className:"tooltip tooltip-bottom","data-tip":"Toggle theme",children:(0,t.jsx)(j.Button,{className:"hover:bg-slate-200 rounded-full p-1 pr-1 sm:p-2 sm:pr-2",variant:"ghost",children:(0,t.jsx)(y,{className:"text-blue-500 dark:text-blue-400 h-6 w-6"})})})}let _=(0,s.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),N=[{date:"2026-03-23",titleKey:"release_notes.notes.note_2026_03_23.title",contentKey:"release_notes.notes.note_2026_03_23.content"},{date:"2025-10-29",titleKey:"release_notes.notes.note_2025_10_29.title",contentKey:"release_notes.notes.note_2025_10_29.content"},{date:"2025-08-18",titleKey:"release_notes.notes.note_2025_08_18.title",contentKey:"release_notes.notes.note_2025_08_18.content"},{date:"2025-07-09",titleKey:"release_notes.notes.note_2025_07_09.title",contentKey:"release_notes.notes.note_2025_07_09.content"},{date:"2025-07-02",titleKey:"release_notes.notes.note_2025_07_02.title",contentKey:"release_notes.notes.note_2025_07_02.content"},{date:"2025-06-23",titleKey:"release_notes.notes.note_2025_06_23.title",contentKey:"release_notes.notes.note_2025_06_23.content"},{date:"2025-06-22",titleKey:"release_notes.notes.note_2025_06_22.title",contentKey:"release_notes.notes.note_2025_06_22.content"},{date:"2025-06-19",titleKey:"release_notes.notes.note_2025_06_19.title",contentKey:"release_notes.notes.note_2025_06_19.content"},{date:"2025-06-18",titleKey:"release_notes.notes.note_2025_06_18.title",contentKey:"release_notes.notes.note_2025_06_18.content"},{date:"2025-06-01",titleKey:"release_notes.notes.note_2025_06_01.title",contentKey:"release_notes.notes.note_2025_06_01.content"},{date:"2025-05-20",titleKey:"release_notes.notes.note_2025_05_20.title",contentKey:"release_notes.notes.note_2025_05_20.content"}],$="lastSeenChangelog",F=0;function D(e){if(!e||"string"!=typeof e)return null;let t=e.replace(/<[^>]*>/g,"").trim();return!function(e){if(!e||"string"!=typeof e)return!1;try{let t=new Date(e);return!isNaN(t.getTime())&&t.toISOString()===e}catch{return!1}}(t)?null:t}function S(e){if(!e||0===e.length)return null;let t=e[0];return t?.date||null}let C=function(){try{let e=localStorage.getItem($);if(!e)return null;return D(e)}catch(e){return console.warn("Failed to get last seen changelog timestamp:",e),null}},L=function(e,t){if(!e||0===e.length)return!1;if(!t)return!0;let r=S(e);if(!r)return!1;try{let e=new Date(t),a=new Date(r);if(isNaN(e.getTime())||isNaN(a.getTime()))return!0;return a.getTime()>e.getTime()}catch(e){return console.warn("Error checking for new release notes:",e),!0}},z=function(){!function(e){if(Date.now()-F<1e3)return console.warn("Rate limit exceeded for localStorage operations");try{let t=D(e);if(!t)return void console.warn("Invalid timestamp provided to setLastSeenTimestamp:",e);localStorage.setItem($,t),F=Date.now()}catch(e){console.error("Failed to save last seen changelog timestamp:",e)}}(new Date().toISOString())};var T=e.i(526683);let A={small:"w-2 h-2 sm:w-3 sm:h-3",medium:"w-3 h-3",large:"w-4 h-4"},M={primary:"bg-blue-500 dark:bg-blue-400",secondary:"bg-gray-500 dark:bg-gray-400",success:"bg-green-500 dark:bg-green-400",warning:"bg-yellow-500 dark:bg-yellow-400",error:"bg-red-500 dark:bg-red-400"};function O({ariaLabel:e="New updates available",className:r,show:a,size:s="medium",variant:o="primary"}){return a?(0,t.jsx)("div",{"aria-label":e,"aria-live":"polite",className:(0,T.cn)("absolute top-0.5 right-1 rounded-full transition-all duration-200 ease-in-out",A[s],M[o],r),role:"status",children:(0,t.jsx)("span",{className:"sr-only",children:e})}):null}
1var E=e.i(37540),I=e.i(776639);function K({onOpen:e,onClose:r,showNotificationBadge:a=!0}={}){let s=(0,c.useI18n)(),o=(0,c.useCurrentLocale)(),{showBadge:n,markAsSeen:i}=function(e={}){let{showBadgeForNewUsers:t=!0,showBadgeOnStorageError:r=!0,autoCheck:a=!0}=e,[s,o]=(0,p.useState)(!1),[n,i]=(0,p.useState)(!1),[l,d]=(0,p.useState)(null),[c,u]=(0,p.useState)(null),[m,h]=(0,p.useState)(null),g=(0,p.useCallback)(async()=>{i(!0),h(null);try{let e=S(N);d(e);let r=C();u(r);let a=!1;a=!!e&&(r?L(N,r):t),o(a)}catch(e){h(e instanceof Error?e.message:"Unknown error occurred"),console.error("Error checking for changelog updates:",e),o(r)}finally{i(!1)}},[t,r]),f=(0,p.useCallback)(()=>{try{z(),o(!1),u(C())}catch(e){h(e instanceof Error?e.message:"Failed to mark as seen"),console.error("Error marking changelog as seen:",e)}},[]),x=(0,p.useCallback)(()=>{g()},[g]);return(0,p.useEffect)(()=>{a&&g()},[g,a]),(0,p.useEffect)(()=>{let e=e=>{e.key===$&&g()};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[g]),{showBadge:s,markAsSeen:f,isChecking:n,latestReleaseDate:l,lastSeenTimestamp:c,error:m,refresh:x}}(),[l,d]=p.useState(!1);return(0,t.jsxs)(I.Dialog,{onOpenChange:t=>{d(t),t?(i(),e?.()):r?.()},open:l,children:[(0,t.jsx)(I.DialogTrigger,{asChild:!0,children:(0,t.jsx)("div",{className:"tooltip tooltip-bottom z-10","data-tip":s("commons.changelog"),children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(j.Button,{"aria-label":s("release_notes.release_notes"),className:"rounded-full hover:bg-slate-200",size:"small",variant:"ghost",children:(0,t.jsx)(_,{className:"text-blue-500 dark:text-blue-400 h-6 w-6"})}),a&&(0,t.jsx)(O,{show:n,size:"small",variant:"primary"})]})})}),(0,t.jsxs)(I.DialogContent,{className:"max-w-md max-h-[60vh] overflow-y-auto",children:[(0,t.jsx)(I.DialogHeader,{children:(0,t.jsx)(I.DialogTitle,{children:s("release_notes.title")})}),(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>(0,t.jsxs)("div",{className:"border-b pb-2 last:border-b-0 last:pb-0 py-2",children:[(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:(0,E.formatDate)(e.date,o)}),(0,t.jsx)("div",{className:"font-semibold mb-1",dangerouslySetInnerHTML:{__html:s(e.titleKey)}}),(0,t.jsx)("div",{className:"text-sm mb-4",dangerouslySetInnerHTML:{__html:s(e.contentKey)}})]},e.date))})]})]})}var U=e.i(817204),W=e.i(562981),B=e.i(586295),P=e.i(659131);function Y({className:e,streakCount:r=5}){let{data:a,isLoading:s,error:o}=(0,P.useWorkoutSessions)(),n=(0,c.useCurrentLocale)(),i=(0,p.useMemo)(()=>{try{return B.default.tz.guess()}catch(e){return console.warn("Failed to detect timezone, falling back to UTC:",e),"UTC"}},[]),l=(0,p.useMemo)(()=>{if(!a)return[];let e=a.filter(e=>{if(!e.endedAt)return!1;try{let t=(0,B.default)(e.endedAt).tz(i),a=(0,B.default)().tz(i).subtract(r,"day").startOf("day");return t.isAfter(a)}catch(t){return console.warn("Error processing session date:",t,e),!1}});return e.sort((e,t)=>(0,B.default)(e.endedAt).diff((0,B.default)(t.endedAt))),e},[a,r,i]),d=(0,p.useMemo)(()=>{let e=[...Array(r)].map((e,t)=>{try{let e=(0,B.default)().tz(i).subtract(r-1-t,"day").startOf("day"),a=l.findLast(t=>{try{return(0,B.default)(t.endedAt).tz(i).isSame(e,"day")}catch(e){return console.warn("Error comparing session date:",e,t),!1}});return{date:(0,E.formatDate)(e.toDate(),n),hasWorkout:!!a,session:a||void 0}}catch(e){return console.warn("Error calculating streak data for day:",e,t),{date:(0,B.default)().subtract(r-1-t,"day").format("YYYY-MM-DD"),hasWorkout:!1,session:void 0}}}),t=0;for(let r=e.length-1;r>=0;r--)if(e[r].hasWorkout)t++;else break;let a=e.filter(e=>e.hasWorkout).length;return{days:e,currentStreak:t,totalWorkouts:a}},[l,r,i]);return s?(0,t.jsx)("div",{"aria-label":"Loading workout streak",className:`flex gap-1 ${e}`,role:"status",children:[...Array(r)].map((e,r)=>(0,t.jsx)("div",{"aria-hidden":"true",className:"w-4 h-4 sm:w-6 sm:h-6 rounded-sm sm:rounded-md bg-base-300 animate-pulse transition-colors duration-200"},r))}):o?(0,t.jsx)("div",{"aria-label":"Error loading workout streak",className:`flex gap-1 ${e}`,role:"alert",children:[...Array(r)].map((e,r)=>(0,t.jsx)("div",{"aria-hidden":"true",className:"w-4 h-4 sm:w-6 sm:h-6 rounded-sm sm:rounded-md bg-error/20 border border-error/30 transition-colors duration-200"},r))}):(0,t.jsx)("div",{"aria-label":`Workout streak: ${d.currentStreak} day${1!==d.currentStreak?"s":""}, ${d.totalWorkouts} workouts in last ${r} days`,className:(0,T.cn)("flex gap-1 sm:mr-2",e),role:"img",children:d.days.map(e=>{let r=`${e.date}: ${e.hasWorkout?"✅️":"❌️"}`;return(0,t.jsx)("div",{"aria-label":`${e.date}: ${e.hasWorkout?"Workout completed":"No workout"}`,className:`w-4 h-4 sm:w-6 sm:h-6 rounded-sm sm:rounded-md transition-all duration-200 ease-in-out tooltip tooltip-bottom hover:scale-110 cursor-pointer focus:ring-2 focus:ring-offset-1 focus:outline-none ${e.hasWorkout?"bg-emerald-400 dark:bg-emerald-500 shadow-sm hover:shadow-md hover:brightness-110 focus:ring-emerald-300":"bg-gray-300 dark:bg-gray-600 border border-gray-400 dark:border-gray-500 hover:bg-gray-400 dark:hover:bg-gray-500 focus:ring-gray-300 dark:focus:ring-gray-400"}`,"data-tip":r,role:"button",tabIndex:0,title:r},e.date)})})}B.default.extend(U.default),B.default.extend(W.default);var H=e.i(727032),R=e.i(304087),Z=e.i(791768),q=e.i(425246),V=e.i(106449),X=e.i(401866);function Q(){let e=(0,V.useRouter)(),r=(0,c.useI18n)();return(0,t.jsxs)("button",{className:"flex items-center gap-0 text-[11px] sm:text-xs md:font-medium text-purple-600 dar
1k:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20 rounded-full transition-all duration-200 hover:scale-105 whitespace-nowrap hover:underline",onClick:()=>{e.push("/premium")},children:[(0,t.jsx)(X.Ban,{className:"w-3 h-3 flex-shrink-0 mr-1"}),(0,t.jsx)("span",{className:"whitespace-nowrap",children:r("commons.remove_ads")})]})}e.s(["Header",0,()=>{let e=(0,R.useSession)(),s=(0,H.useLogout)(),m=(0,c.useI18n)(),{data:h}=(0,b.usePremiumStatus)(),g=e.data?.user?.email?.substring(0,2).toUpperCase()||"",f=h?.isPremium??!1,p=!0===Z.env.NEXT_PUBLIC_SHOW_ADS,v=Z.env.NEXT_PUBLIC_AD_CLIENT||"ezoic"===Z.env.NEXT_PUBLIC_AD_PROVIDER;return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"navbar bg-base-100 dark:bg-black dark:text-gray-200 px-2 sm:px-4 rounded-tl-lg rounded-tr-lg",children:[(0,t.jsx)("div",{className:"navbar-start flex items-center gap-2",children:(0,t.jsxs)(q.Link,{className:"group flex items-center space-x-3 rounded-xl bg-gradient-to-r px-2 sm:px-4 py-2 transition-all duration-200 dark:text-gray-200 dark:bg-gray-800",href:"/",children:[(0,t.jsxs)("div",{className:"relative flex-none",children:[(0,t.jsx)(r.default,{alt:"workout cool logo",className:"h-10 w-10 sm:h-8 sm:w-8 transition-transform duration-200 group-hover:rotate-[20deg] group-hover:scale-110",height:32,priority:!0,src:u.default,width:32}),(0,t.jsx)("div",{className:"absolute -top-1 -right-1 h-3 w-3 rounded-full bg-emerald-400 opacity-0 transition-opacity duration-200 group-hover:opacity-100"})]}),(0,t.jsx)("div",{className:"flex-col hidden sm:flex",children:(0,t.jsx)("span",{className:"font-bold transition-colors duration-200 group-hover:text-blue-400",children:"Workout.cool"})})]})}),(0,t.jsxs)("div",{className:"navbar-end",children:[!f&&p&&v?(0,t.jsx)(Q,{}):(0,t.jsx)(Y,{}),(0,t.jsx)(K,{}),(0,t.jsx)(w,{}),(0,t.jsx)(x,{}),(0,t.jsxs)("div",{className:"dropdown dropdown-end ml-1",children:[(0,t.jsx)("div",{className:"tooltip tooltip-bottom","data-tip":m("commons.profile"),children:(0,t.jsxs)("div",{className:"btn btn-ghost btn-circle avatar relative",role:"button",tabIndex:0,children:[(0,t.jsx)("div",{className:"w-8 rounded-full bg-primary text-primary-content !flex items-center justify-center text-sm font-medium",children:g||(0,t.jsx)(i.default,{className:"w-4 h-4"})}),f&&(0,t.jsx)("div",{className:"absolute -top-1 -right-1 w-4 h-4 bg-amber-400 rounded-full !flex items-center justify-center",children:(0,t.jsx)(l.Crown,{className:"w-2.5 h-2.5 text-amber-900"})})]})}),(0,t.jsxs)("ul",{className:"mt-3 z-[1] p-2 shadow menu menu-sm dropdown-content bg-base-100 dark:bg-black dark:text-gray-200 rounded-box w-52 border border-slate-200 dark:border-gray-800",onClick:()=>{let e=document.activeElement;e&&e.blur()},tabIndex:0,children:[(0,t.jsx)("li",{children:(0,t.jsxs)(q.Link,{className:"!no-underline",href:"/profile",size:"base",variant:"nav",children:[(0,t.jsx)(i.default,{className:"w-4 h-4 text-gray-700 dark:text-gray-300"}),m("commons.profile")]})}),(0,t.jsx)("li",{children:(0,t.jsx)(q.Link,{className:"!no-underline",href:f?"/api/premium/billing-portal":"/premium",size:"base",variant:"nav",...f&&{onClick:async e=>{e.preventDefault();try{let e=await fetch("/api/premium/billing-portal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({returnUrl:window.location.origin+"/profile"})}),t=await e.json();t.success&&t.url&&(window.location.href=t.url)}catch(e){console.error("Error opening billing portal:",e)}}},children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Crown,{className:"w-4 h-4 text-amber-500"}),m("commons.manage_subscription")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Sparkles,{className:"w-4 h-4 text-purple-500"}),m("commons.remove_ads")]})})}),(0,t.jsx)("hr",{className:"my-1 border-slate-200 dark:border-gray-800"}),e.data||e.isPending?(0,t.jsx)("li",{children:(0,t.jsxs)("button",{className:"flex items-center gap-2 text-base text-gray-700 dark:text-gray-300 hover:bg-slate-200 dark:hover:bg-gray-800 rounded-lg px-3 py-2 transition-colors",onClick:()=>{s.mutate()},children:[(0,t.jsx)(n.LogOut,{className:"w-4 h-4"}),m("commons.logout")]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{children:(0,t.jsxs)(q.Link,{className:"!no-underline",href:"/auth/signin",size:"base",variant:"nav",children:[(0,t.jsx)(a.LogIn,{className:"w-4 h-4 text-gray-700 dark:text-gray-300"}),m("commons.login")]})}),(0,t.jsx)("li",{children:(0,t.jsxs)(q.Link,{className:"!no-underline",href:"/auth/signup",size:"base",variant:"nav",children:[(0,t.jsx)(o,{className:"w-4 h-4 text-gray-700 dark:text-gray-300"}),m("commons.register")]})})]})]})]})]})]})})}],811596)},108025,e=>{"use strict";var t=e.i(147932),r=e.i(192245),a=e.i(634967);let s=(0,e.i(246561).default)("pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);var o=e.i(922515),n=e.i(526683);e.i(262050),e.i(368929);var i=e.i(187824);function l({isRunning:e,initialSeconds:a=0,onChange:s}){let o,n,i,[d,c]=(0,r.useState)(a),u=(0,r.useRef)(null);return(0,r.useEffect)(()=>{c(a)},[a]),(0,r.useEffect)(()=>(e?u.current=setInterval(()=>{c(e=>{let t=e+1;return s?.(t),t})},1e3):u.current&&(clearInterval(u.current),u.current=null),()=>{u.current&&clearInterval(u.current)}),[e,s]),(0,t.jsx)("span",{children:(o=Math.floor(d/3600),n=Math.floor(d%3600/60),i=d%60,o>0?`${o.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`:`${n.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`)})}var d=e.i(519455);e.s(["WorkoutSessionTimer",0,function(){let{isWorkoutActive:e,isTimerRunning:c,toggleTimer:u,resetTimer:m}=(0,i.useWorkoutSession)(),[h,g]=(0,r.useState)(0);return e?(0,t.jsx)("div",{className:"fixed bottom-36 sm:bottom-20 left-1/2 transform -translate-x-1/2 mb-3 z-50",children:(0,t.jsx)("div",{className:"bg-white dark:bg-slate-900 rounded-full px-6 py-4 border border-slate-200 dark:border-slate-700 shadow-lg backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)("div",{className:"text-xl font-mono font-bold text-slate-900 dark:text-white tracking-wider",children:(0,t.jsx)(l,{initialSeconds:0,isRunning:c},h)})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(d.Button,{className:(0,n.cn)("w-12 h-12 rounded-full p-0 text-white shadow-md",c?"bg-amber-500 hover:bg-amber-600":"bg-emerald-500 hover:bg-emerald-600"),onClick:u,children:c?(0,t.jsx)(s,{className:"h-5 w-5"}):(0,t.jsx)(a.Play,{className:"h-5 w-5"})}),(0,t.jsx)(d.Button,{className:"w-12 h-12 rounded-full p-0 border-slate-200 text-slate-400 hover:bg-slate-200 dark:border-slate-600 hover:dark:bg-slate-700 shadow-md",onClick:()=>{m(),g(e=>e+1)},variant:"outline",children:(0,t.jsx)(o.RotateCcw,{className:"h-5 w-5"})})]})]})})}):null}],108025)},970932,e=>{"use strict";var t=e.i(147932),r=e.i(488921),a=e.i(106449),s=e.i(906481),o=e.i(705347);let n=(0,o.createServerReference)("7f48d83982fb9a75e65fce5f0e4a3cf81c01db184c",o.callServer,void 0,o.findSourceMapURL,"getUserPositionAction");var i=e.i(304087);e.s(["default",0,function(){let{data:e}=(0,i.useSession)(),o=!!e?.user,l=e?.user?.id,[d]=(0,r.useQueryState)("period",{defaultValue:"all-time",parse:e=>"weekly"===e||"monthly"===e||"all-time"===e?e:"all-time"}),{data:c,isLoading:u}=function({userId:e,period:t,enabled:r=!0}){return(0,s.useQuery)({queryKey:["user-position",e,t],queryFn:async()=>
1{if(!e)return null;let r=await n({userId:e,period:t});return r?.data||null},enabled:r&&!!e,staleTime:3e5,refetchOnWindowFocus:!1})}({userId:l,period:d,enabled:o}),m=(0,a.usePathname)().includes("/leaderboard");if(!o||u||!c||!m)return null;let{position:h,totalWorkouts:g,totalUsers:f}=c;return 0===g?(0,t.jsx)("div",{className:"absolute bottom-32 left-1/2 -translate-x-1/2 w-[calc(100%-2rem)] max-w-md z-40",children:(0,t.jsx)("div",{className:"bg-base-100 dark:bg-[#1A1A1A] border border-base-300 dark:border-gray-700 rounded-2xl shadow-lg px-4 py-3",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-10 h-10 rounded-full bg-base-300 dark:bg-gray-700",children:(0,t.jsx)("span",{className:"text-2xl",children:"🫵"})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-base-content dark:text-gray-100",children:"Pas encore classé"}),(0,t.jsx)("p",{className:"text-xs text-base-content/60 dark:text-gray-400",children:"Commencez votre première séance !"})]})]}),(0,t.jsx)("div",{className:"text-right",children:(0,t.jsx)("p",{className:"text-2xl",children:"🚀"})})]})})}):(0,t.jsx)("div",{className:"absolute bottom-32 left-1/2 -translate-x-1/2 w-[calc(100%-2rem)] max-w-md z-40",children:(0,t.jsx)("div",{className:"bg-base-100 dark:bg-[#1A1A1A] border border-base-300 dark:border-gray-700 rounded-2xl shadow-lg px-4 py-3",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:`flex items-center justify-center w-10 h-10 rounded-full font-bold text-white ${1===h?"bg-yellow-500":2===h?"bg-gray-400":3===h?"bg-amber-600":h<=10?"bg-[#4F8EF7]":"bg-base-300 dark:bg-gray-700 text-base-content dark:text-gray-300"}`,children:(0,t.jsx)("span",{className:"text-2xl",children:"🫵"})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium text-base-content dark:text-gray-100",children:["Position #",h," sur ",f]}),(0,t.jsxs)("p",{className:"text-xs text-base-content/60 dark:text-gray-400",children:[g," séances ","weekly"===d?"cette semaine":"monthly"===d?"ce mois":"au total"]})]})]}),(0,t.jsx)("div",{className:"text-right",children:(0,t.jsx)("p",{className:"text-2xl font-medium text-base-content/70 dark:text-gray-400",children:1===h?"👑":h<=3?"🏆":h<=10?"💪":h<=20?"🎯":"🚀"})})]})})})}],970932)},413547,e=>{"use strict";var t=e.i(147932),r=e.i(106449),a=e.i(170877),s=e.i(903658),o=e.i(246561);let n=(0,o.default)("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),i=(0,o.default)("hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);var l=e.i(685353),d=e.i(255206),d=d,c=e.i(122441),u=e.i(291303),m=e.i(526683),h=e.i(397914);e.s(["BottomNavigation",0,function(){let e=(0,r.usePathname)(),o=(0,u.useI18n)(),g=(0,u.useCurrentLocale)(),f=[{id:"workout-builder",label:o("bottom_navigation.workouts"),shortLabel:o("bottom_navigation.workouts"),mobileLabel:o("bottom_navigation.workouts"),href:h.paths.root,icon:s.Dumbbell,emoji:"WorkoutCoolHappy.png",description:o("bottom_navigation.workouts_tooltip"),isActive:e===h.paths.root||e===`/${g}`},{id:"programs",label:o("bottom_navigation.programs"),shortLabel:o("bottom_navigation.programs"),mobileLabel:o("bottom_navigation.programs"),href:`${h.paths.programs}`,icon:n,emoji:"WorkoutCoolSwag.png",description:o("bottom_navigation.programs_tooltip"),isActive:e.includes(h.paths.programs)},{id:"statistics",label:o("bottom_navigation.statistics"),shortLabel:o("bottom_navigation.statistics"),mobileLabel:o("bottom_navigation.statistics"),href:`/${g}/statistics`,icon:d.default,emoji:"WorkoutCoolBiceps.png",description:o("bottom_navigation.statistics_tooltip"),isActive:e.includes("/statistics")},{id:"tools",label:o("bottom_navigation.tools"),shortLabel:o("bottom_navigation.tools"),mobileLabel:o("bottom_navigation.tools"),href:`/${g}/tools`,icon:i,description:o("bottom_navigation.tools_tooltip"),isActive:e.includes("/tools")},{id:"leaderboard",label:o("bottom_navigation.leaderboard"),shortLabel:o("bottom_navigation.leaderboard"),mobileLabel:o("bottom_navigation.leaderboard"),href:`/${g}${h.paths.leaderboard}`,icon:c.Trophy,description:o("bottom_navigation.leaderboard_tooltip"),isActive:e.includes(h.paths.leaderboard)},{id:"premium",label:o("bottom_navigation.premium"),shortLabel:o("bottom_navigation.premium"),mobileLabel:o("bottom_navigation.premium"),href:`/${g}/premium`,icon:l.Crown,emoji:"WorkoutCoolRich.png",description:o("bottom_navigation.premium_tooltip"),isActive:e.includes("/premium")}];return(0,t.jsxs)("nav",{className:"fixed bottom-0 left-1/2 z-40 w-full max-w-3xl -translate-x-1/2 bg-white/90 dark:bg-[#232324]/90 backdrop-blur-xl border-t border-[#4F8EF7]/15 dark:border-slate-700/50",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-[#4F8EF7]/3 via-trans
1parent to-[#25CB78]/3 pointer-events-none"}),(0,t.jsx)("div",{className:"relative sm:px-3 py-2",children:(0,t.jsx)("div",{className:"flex justify-center items-center sm:gap-2 max-w-full mx-auto",children:f.map(e=>{let r=e.isActive,s="premium"===e.id,o=e.icon;return(0,t.jsxs)(a.default,{className:(0,m.cn)("group relative flex flex-col items-center gap-0.5 sm:gap-1 flex-1 min-w-0 px-1 sm:px-4 py-1 rounded-2xl transition-all duration-300 ease-out","hover:scale-105 active:scale-95",r&&s?"bg-gradient-to-br from-[#FFD93D]/8 to-[#FFA500]/8 border border-[#FFD93D]/20":r?"bg-gradient-to-br from-[#4F8EF7]/8 to-[#25CB78]/8 border border-[#4F8EF7]/20":s?"hover:bg-[#FFD93D]/5 dark:hover:bg-[#FFD93D]/10":"hover:bg-gray-50/80 dark:hover:bg-slate-800/50"),href:e.href,children:[r&&(0,t.jsx)("div",{className:(0,m.cn)("absolute -top-0.5 left-1/2 transform -translate-x-1/2 w-4 sm:w-6 h-0.5 rounded-full",s?"bg-gradient-to-r from-[#FFD93D] to-[#FFA500]":"bg-gradient-to-r from-[#4F8EF7] to-[#25CB78]")}),(0,t.jsxs)("div",{className:"relative flex items-center justify-center",children:[r&&(0,t.jsx)("div",{className:(0,m.cn)("absolute inset-0 rounded-full blur-sm scale-150",s?"bg-gradient-to-br from-[#FFD93D]/15 to-[#FFA500]/15":"bg-gradient-to-br from-[#4F8EF7]/15 to-[#25CB78]/15")}),(0,t.jsxs)("div",{className:(0,m.cn)("relative flex items-center justify-center w-6 h-6 sm:w-7 sm:h-7 rounded-full transition-all duration-300 ease-out",r&&s?"bg-gradient-to-br from-[#FFD93D] to-[#FFA500] text-white scale-110":r?"bg-gradient-to-br from-[#4F8EF7] to-[#25CB78] text-white scale-110":s?"text-[#FFD93D] dark:text-[#FFD93D] group-hover:text-[#FFA500] dark:group-hover:text-[#FFA500]":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"),children:[(0,t.jsx)(o,{size:r?15:13,strokeWidth:r?2.5:2}),s&&!r&&(0,t.jsx)("div",{className:"absolute -top-1 -right-1 w-2 h-2 bg-[#FFD93D] rounded-full opacity-80 animate-pulse"})]})]}),(0,t.jsxs)("span",{className:(0,m.cn)("text-[9px] sm:text-xs font-semibold transition-all duration-300 ease-out leading-tight truncate max-w-full text-center",r&&s?"text-transparent bg-gradient-to-r from-[#FFD93D] to-[#FFA500] bg-clip-text":r?"text-transparent bg-gradient-to-r from-[#4F8EF7] to-[#25CB78] bg-clip-text":s?"text-[#FFD93D] dark:text-[#FFD93D] group-hover:text-[#FFA500] dark:group-hover:text-[#FFA500]":"text-gray-600 dark:text-gray-400 group-hover:text-gray-800 dark:group-hover:text-gray-200"),children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:e.shortLabel}),(0,t.jsx)("span",{className:"inline sm:hidden",children:e.mobileLabel})]}),(0,t.jsx)("div",{className:(0,m.cn)("absolute -top-10 left-1/2 transform -translate-x-1/2 px-2 py-1 bg-gray-900/90 text-white text-xs rounded-lg opacity-0 pointer-events-none transition-all duration-200 whitespace-nowrap z-50","after:content-[''] after:absolute after:top-full after:left-1/2 after:transform after:-translate-x-1/2 after:border-4 after:border-transparent after:border-t-gray-900/90","hidden sm:block sm:group-hover:opacity-100 sm:group-hover:-translate-y-1"),children:e.description})]},e.id)})})})]})}],413547)}]);

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.