FitTrackee/fittrackee/dist/static/js/main.01a39e9c.js.map

1 line
225 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/components/User/UserAuthForm.vue","webpack:///./src/components/User/UserAuthForm.vue?719c","webpack:///./src/components/User/UserAuthForm.vue?a581","webpack:///./node_modules/core-js/internals/string-pad.js","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue?312e","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkouts.vue?a956","webpack:///./src/components/Dashboard/UserMonthStats.vue?4cf2","webpack:///./src/components/Dashboard/UserCalendar/CalendarCells.vue?de83","webpack:///./src/components/Dashboard/UserRecords/RecordsCard.vue?adca","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkout.vue?4cd6","webpack:///./node_modules/core-js/modules/es.string.pad-start.js","webpack:///./node_modules/core-js/modules/es.object.entries.js","webpack:///./src/components/Dashboard/UserCalendar/index.vue?22a0","webpack:///./src/views/Dashboard.vue?7df1","webpack:///./src/components/Dashboard/UserCalendar/CalendarDays.vue?301b","webpack:///./src/components/Workout/WorkoutCard.vue?8257","webpack:///./src/components/BikePic.vue?bad3","webpack:///./node_modules/core-js/internals/object-to-array.js","webpack:///./src/views/Dashboard.vue","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./src/components/Dashboard/Timeline.vue","webpack:///./src/components/Workout/WorkoutCard.vue","webpack:///./node_modules/date-fns/esm/compareAsc/index.js","webpack:///./node_modules/date-fns/esm/differenceInCalendarMonths/index.js","webpack:///./node_modules/date-fns/esm/endOfDay/index.js","webpack:///./node_modules/date-fns/esm/isLastDayOfMonth/index.js","webpack:///./node_modules/date-fns/esm/differenceInMonths/index.js","webpack:///./node_modules/date-fns/esm/differenceInMilliseconds/index.js","webpack:///./node_modules/date-fns/esm/differenceInSeconds/index.js","webpack:///./node_modules/date-fns/esm/_lib/assign/index.js","webpack:///./node_modules/date-fns/esm/_lib/cloneObject/index.js","webpack:///./node_modules/date-fns/esm/formatDistance/index.js","webpack:///./src/components/Workout/WorkoutCard.vue?b099","webpack:///./src/components/Workout/WorkoutCard.vue?313a","webpack:///./src/components/Dashboard/Timeline.vue?427a","webpack:///./src/components/Dashboard/Timeline.vue?4efd","webpack:///./src/components/Dashboard/UserCalendar/index.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarCells.vue","webpack:///./node_modules/date-fns/esm/startOfDay/index.js","webpack:///./node_modules/date-fns/esm/isSameDay/index.js","webpack:///./node_modules/date-fns/esm/isSameMonth/index.js","webpack:///./node_modules/date-fns/esm/isToday/index.js","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkouts.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkout.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkout.vue?dbdf","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkout.vue?d46b","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue","webpack:///./src/components/Dashboard/UserCalendar/DonutChart.vue","webpack:///./src/components/Dashboard/UserCalendar/DonutChart.vue?4d49","webpack:///./src/components/Dashboard/UserCalendar/DonutChart.vue?7394","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue?4c41","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue?2788","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkouts.vue?cd5f","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkouts.vue?fbae","webpack:///./src/components/Dashboard/UserCalendar/CalendarCells.vue?6eda","webpack:///./src/components/Dashboard/UserCalendar/CalendarCells.vue?88a4","webpack:///./src/components/Dashboard/UserCalendar/CalendarDays.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarDays.vue?a950","webpack:///./src/components/Dashboard/UserCalendar/CalendarDays.vue?50af","webpack:///./src/components/Dashboard/UserCalendar/CalendarHeader.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarHeader.vue?dc81","webpack:///./src/components/Dashboard/UserCalendar/CalendarHeader.vue?1bf2","webpack:///./src/components/Dashboard/UserCalendar/index.vue?3519","webpack:///./src/components/Dashboard/UserCalendar/index.vue?b135","webpack:///./src/components/Dashboard/UserMonthStats.vue","webpack:///./src/components/Dashboard/UserMonthStats.vue?deb8","webpack:///./src/components/Dashboard/UserMonthStats.vue?2111","webpack:///./src/components/Dashboard/UserRecords/index.vue","webpack:///./src/components/Dashboard/UserRecords/RecordsCard.vue","webpack:///./src/components/Dashboard/UserRecords/RecordsCard.vue?67f3","webpack:///./src/components/Dashboard/UserRecords/RecordsCard.vue?ca60","webpack:///./src/utils/records.ts","webpack:///./src/components/Dashboard/UserRecords/index.vue?995a","webpack:///./src/components/Dashboard/UserRecords/index.vue?5ce7","webpack:///./src/components/Dashboard/UserStatsCards/index.vue","webpack:///./src/components/Dashboard/UserStatsCards/index.vue?5f4d","webpack:///./src/components/Dashboard/UserStatsCards/index.vue?24f5","webpack:///./src/views/Dashboard.vue?6662","webpack:///./src/views/Dashboard.vue?8dc4","webpack:///./node_modules/date-fns/esm/subYears/index.js","webpack:///./node_modules/date-fns/esm/endOfYear/index.js","webpack:///./node_modules/date-fns/esm/addWeeks/index.js","webpack:///./node_modules/date-fns/esm/subWeeks/index.js","webpack:///./src/utils/statistics.ts","webpack:///./src/components/Statistics/index.vue?27b1","webpack:///./src/components/User/UserAuthForm.vue?3628","webpack:///./src/views/user/LoginOrRegister.vue?4f89","webpack:///./src/components/Common/StatsChart/index.vue?f8fc","webpack:///./src/components/Statistics/StatsSportsMenu.vue?4263","webpack:///./node_modules/core-js/internals/string-pad-webkit-bug.js","webpack:///./node_modules/date-fns/esm/subMonths/index.js","webpack:///./src/components/Statistics/StatsMenu.vue?a690","webpack:///./src/components/Dashboard/UserRecords/index.vue?5fd1","webpack:///./src/views/StatisticsView.vue","webpack:///./src/components/Statistics/index.vue","webpack:///./src/components/Statistics/StatsMenu.vue","webpack:///./src/components/Statistics/StatsMenu.vue?3e92","webpack:///./src/components/Statistics/StatsMenu.vue?e2ad","webpack:///./src/components/Statistics/StatsSportsMenu.vue","webpack:///./src/components/Statistics/StatsSportsMenu.vue?793d","webpack:///./src/components/Statistics/StatsSportsMenu.vue?bb1a","webpack:///./src/components/Statistics/index.vue?3134","webpack:///./src/components/Statistics/index.vue?fcc1","webpack:///./src/views/StatisticsView.vue?db9f","webpack:///./src/views/StatisticsView.vue?7475","webpack:///./src/components/Dashboard/UserStatsCards/index.vue?a172","webpack:///./src/views/user/LoginOrRegister.vue","webpack:///./src/components/BikePic.vue","webpack:///./src/components/BikePic.vue?f93b","webpack:///./src/views/user/LoginOrRegister.vue?491b","webpack:///./src/views/user/LoginOrRegister.vue?c664","webpack:///./node_modules/core-js/modules/es.symbol.iterator.js","webpack:///./src/views/StatisticsView.vue?0e0c","webpack:///./node_modules/core-js/modules/es.symbol.description.js","webpack:///./src/components/Dashboard/Timeline.vue?5bd7","webpack:///./src/views/NotFoundView.vue","webpack:///./src/views/NotFoundView.vue?efa2","webpack:///./src/views/NotFoundView.vue?d15d","webpack:///./src/components/Dashboard/UserCalendar/CalendarHeader.vue?7fc5","webpack:///./src/components/Common/StatsChart/index.vue","webpack:///./src/components/Common/StatsChart/Chart.vue","webpack:///./src/utils/duration.ts","webpack:///./src/utils/tooltip.ts","webpack:///./src/components/Common/StatsChart/Chart.vue?bf85","webpack:///./src/components/Common/StatsChart/Chart.vue?979a","webpack:///./src/components/Common/StatsChart/index.vue?d5f7","webpack:///./src/components/Common/StatsChart/index.vue?e269","webpack:///./node_modules/core-js/modules/es.array.slice.js"],"names":["id","class","registration_disabled","message","onSubmit","action","disabled","required","formData","username","placeholder","$t","type","email","password","includes","password_conf","buttonText","to","errorMessages","name","props","String","token","default","setup","route","store","useStore","getButtonText","getters","GETTERS","ERROR_MESSAGES","appConfig","APP_CONFIG","value","is_registration_enabled","toUpperCase","actionType","dispatch","ACTIONS","RESET_USER_PASSWORD","commit","MUTATIONS","SET_ERROR_MESSAGES","SEND_PASSWORD_RESET_REQUEST","LOGIN_OR_REGISTER","redirectUrl","query","from","resetFormData","path","EMPTY_ERROR_MESSAGES","render","__scopeId","toLength","repeat","requireObjectCoercible","ceil","Math","createMethod","IS_END","$this","maxLength","fillString","fillLen","stringFiller","S","stringLength","length","fillStr","undefined","intMaxLength","call","slice","module","exports","start","end","$","$padStart","WEBKIT_BUG","target","proto","forced","padStart","this","arguments","$entries","entries","stat","O","DESCRIPTORS","objectKeys","toIndexedObject","propertyIsEnumerable","f","TO_ENTRIES","it","key","keys","i","result","push","values","aria-hidden","authUser","sports","isSelected","updateDisplayColumn","user","_arrayLikeToArray","arr","len","arr2","Array","_arrayWithoutHoles","isArray","arrayLikeToArray","_iterableToArray","iter","Symbol","iterator","_unsupportedIterableToArray","o","minLen","n","Object","prototype","toString","constructor","test","_nonIterableSpread","TypeError","_toConsumableArray","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","nb_workouts","workouts","initWorkoutsCount","index","workout","sport","moreWorkoutsExist","loadMoreWorkouts","title","formatDistance","Date","workout_date","with_gpx","sport-label","label","moving","distance","compareAsc","dirtyDateLeft","dirtyDateRight","requiredArgs","dateLeft","toDate","dateRight","diff","getTime","differenceInCalendarMonths","yearDiff","getFullYear","monthDiff","getMonth","endOfDay","dirtyDate","date","setHours","isLastDayOfMonth","endOfMonth","differenceInMonths","sign","difference","abs","getDate","setDate","setMonth","isLastMonthNotFull","Number","differenceInMilliseconds","differenceInSeconds","floor","dirtyObject","property","hasOwnProperty","cloneObject","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","dirtyBaseDate","options","locale","RangeError","comparison","isNaN","localizeOptions","addSuffix","Boolean","months","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","round","includeSeconds","hours","days","nearestMonth","monthsSinceStartOfYear","years","components","StaticMap","UserPicture","LOCALE","format","getDateWithTZ","NoWorkouts","WorkoutCard","page","per_page","loadWorkouts","TIMELINE_WORKOUTS","previous_workout","GET_TIMELINE_WORKOUTS","GET_MORE_TIMELINE_WORKOUTS","day","locale-options","displayNextMonth","displayPreviousMonth","start-date","calendarDates","currentDay","end-date","timezone","calendarWorkouts","weekStartingMonday","weekm","rows","row","filterWorkouts","startOfDay","isSameDay","dateLeftStartOfDay","dateRightStartOfDay","isSameMonth","isToday","now","displayedWorkoutCount","sportLabel","getSportLabel","datasets","chartDatasets","colors","records","t","togglePane","isHidden","height","width","viewBox","data","cx","cy","r","radius","fill","stroke","stroke-dashoffset","stroke-dasharray","circumference","stroke-width","stroke-opacity","transform","returnCircleTransformValue","percentage","angleOffset","PI","calculateStrokeDashOffset","rotation","CalendarWorkout","DonutChart","event","stopPropagation","CalendarWorkoutsChart","CalendarWorkouts","endDate","startDate","getDays","addDays","isWeekEnd","filter","reverse","localeOptions","emit","emits","CalendarCells","CalendarDays","CalendarHeader","getCalendarWorkouts","dateFormat","CALENDAR_WORKOUTS","apiParams","GET_CALENDAR_WORKOUTS","addMonths","subMonths","content","chart-params","chartParams","displayed-sport-ids","selectedSportIds","hide-chart-if-no-data","StatChart","duration","startOfMonth","map","recordsBySport","sort","sportTranslatedLabel","record","record_type","tz","Error","workout_id","getRecordsBySports","translatedSports","reduce","sportList","find","s","sport_id","translatedLabel","RecordsCard","icon","text","total_distance","toFixed","total_duration","nb_sports","StatCard","get_duration","match","split","Timeline","UserCalendar","UserMonthStats","UserRecords","UserStatsCards","AUTH_USER_PROFILE","SPORTS","subYears","dirtyAmount","amount","toInteger","addYears","endOfYear","year","setFullYear","addWeeks","subWeeks","dateFormats","week","api","chart","month","datasetKeys","params","getStatisticsChartDataset","color","backgroundColor","displayedSports","displayedSportsId","apiStats","dayKeys","labels","sportsId","displayedSport","datasetKey","dataset","timeFrame","weekStartsOn","startOfYear","startOfWeek","endOfWeek","backward","userAgent","updateTimeFrame","handleOnClickArrows","fullStats","selected-sport-ids","user-sports","updateSelectedSportIds","timeFrames","frame","checked","selectedTimeFrame","onUpdateTimeFrame","style","sportColors","userSports","sportId","SportsMenu","StatsMenu","getChartParams","getSports","newSports","Statistics","sports_list","src","alt","BikePic","LoginOrRegisterForm","defineWellKnownSymbol","global","has","isObject","defineProperty","copyConstructorProperties","NativeSymbol","description","EmptyStringDescriptionStore","SymbolWrapper","symbolPrototype","symbolToString","native","regexp","configurable","get","symbol","valueOf","string","desc","replace","NotFound","hideChartIfNoData","emptyStats","displayedData","updateDisplayData","displayedSportIds","formatDuration","totalSeconds","formatWithUnits","BarChart","getNumber","getSum","total","chartData","JSON","parse","stringify","responsive","maintainAspectRatio","animation","layout","padding","top","scales","x","stacked","grid","drawOnChartArea","y","ticks","maxTicksLimit","callback","afterFit","scale","plugins","datalabels","anchor","align","context","chartArea","display","formatter","d","dataIndex","datasetIndex","legend","tooltip","interaction","intersect","mode","tooltipItem","formattedValue","callbacks","parsed","footer","tooltipItems","sum","barChartProps","Chart","statistics","USER_STATS","formattedStats","getStatistics","GET_USER_STATS","filterType","getApiParams","time","newParams","toAbsoluteIndex","createProperty","wellKnownSymbol","arrayMethodHasSpeciesSupport","HAS_SPECIES_SUPPORT","SPECIES","nativeSlice","max","Constructor","k","fin"],"mappings":"mOACOA,GAAG,kB,GACDA,GAAG,a,GAYGC,MAAM,c,sPAbnB,yBA0EM,MA1EN,EA0EM,CAzEJ,yBAwEM,MAxEN,EAwEM,CAvEJ,yBAsEM,OArEJA,MAAK,CAAC,WAAU,C,SACc,2B,CAMtB,EAAAC,uB,yBAFR,yBAGE,G,MAFAC,QAAQ,4B,uCAGV,yBAqDO,QArDA,SAAM,2DAAU,EAAAC,SAAS,EAAAC,UAAM,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AQ,QAClBsY,EAAkB,EAAQ,QAC1Bpc,EAAW,EAAQ,QACnBuC,EAAkB,EAAQ,QAC1B8Z,EAAiB,EAAQ,QACzBC,EAAkB,EAAQ,QAC1BC,EAA+B,EAAQ,QAEvCC,EAAsBD,EAA6B,SAEnDE,EAAUH,EAAgB,WAC1BI,EAAc,GAAGvb,MACjBwb,EAAMvc,KAAKuc,IAKfnb,EAAE,CAAEG,OAAQ,QAASC,OAAO,EAAMC,QAAS2a,GAAuB,CAChErb,MAAO,SAAeG,EAAOC,GAC3B,IAKIqb,EAAa7Z,EAAQwB,EALrBnC,EAAIG,EAAgBR,MACpBjB,EAASd,EAASoC,EAAEtB,QACpB+b,EAAIT,EAAgB9a,EAAOR,GAC3Bgc,EAAMV,OAAwBpb,IAARO,EAAoBT,EAASS,EAAKT,GAG5D,GAAIgD,EAAQ1B,KACVwa,EAAcxa,EAAEuC,YAEU,mBAAfiY,GAA8BA,IAAgBhZ,QAASE,EAAQ8Y,EAAYnY,WAE3EqS,EAAS8F,KAClBA,EAAcA,EAAYH,GACN,OAAhBG,IAAsBA,OAAc5b,IAHxC4b,OAAc5b,EAKZ4b,IAAgBhZ,YAAyB5C,IAAhB4b,GAC3B,OAAOF,EAAYxb,KAAKkB,EAAGya,EAAGC,GAIlC,IADA/Z,EAAS,SAAqB/B,IAAhB4b,EAA4BhZ,MAAQgZ,GAAaD,EAAIG,EAAMD,EAAG,IACvEtY,EAAI,EAAGsY,EAAIC,EAAKD,IAAKtY,IAASsY,KAAKza,GAAGia,EAAetZ,EAAQwB,EAAGnC,EAAEya,IAEvE,OADA9Z,EAAOjC,OAASyD,EACTxB,M","file":"static/js/main.01a39e9c.js","sourcesContent":["<template>\n <div id=\"user-auth-form\">\n <div id=\"user-form\">\n <div\n class=\"form-box\"\n :class=\"{\n disabled: registration_disabled,\n }\"\n >\n <AlertMessage\n message=\"user.REGISTER_DISABLED\"\n v-if=\"registration_disabled\"\n />\n <form @submit.prevent=\"onSubmit(action)\">\n <div class=\"form-items\">\n <input\n v-if=\"action === 'register'\"\n id=\"username\"\n :disabled=\"registration_disabled\"\n required\n v-model=\"formData.username\"\n :placeholder=\"$t('user.USERNAME')\"\n />\n <input\n v-if=\"action !== 'reset'\"\n id=\"email\"\n :disabled=\"registration_disabled\"\n required\n type=\"email\"\n v-model=\"formData.email\"\n :placeholder=\"\n action === 'reset-request'\n ? $t('user.ENTER_EMAIL')\n : $t('user.EMAIL')\n \"\n />\n <input\n v-if=\"action !== 'reset-request'\"\n id=\"password\"\n :disabled=\"registration_disabled\"\n required\n type=\"password\"\n v-model=\"formData.password\"\n :placeholder=\"\n action === 'reset'\n ? $t('user.ENTER_PASSWORD')\n : $t('user.PASSWORD')\n \"\n />\n <input\n v-if=\"['register', 'reset'].includes(action)\"\n id=\"confirm-password\"\n :disabled=\"registration_disabled\"\n type=\"password\"\n required\n v-model=\"formData.password_conf\"\n :placeholder=\"\n action === 'reset'\n ? $t('user.ENTER_PASSWORD_CONFIRMATION')\n : $t('user.PASSWORD_CONFIRM')\n \"\n />\n </div>\n <button type=\"submit\" :disabled=\"registration_disabled\">\n {{ $t(buttonText) }}\n </button>\n </form>\n <div v-if=\"action === 'login'\">\n <router-link class=\"password-forgotten\" to=\"/password-reset/request\">\n {{ $t('user.PASSWORD_FORGOTTEN') }}\n </router-link>\n </div>\n <ErrorMessage :message=\"errorMessages\" v-if=\"errorMessages\" />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, computed, defineComponent, reactive, watch } from 'vue'\n import { useRoute } from 'vue-router'\n\n import { AUTH_USER_STORE, ROOT_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { ILoginRegisterFormData } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'UserAuthForm',\n props: {\n action: {\n type: String,\n required: true,\n },\n token: {\n type: String,\n default: '',\n },\n },\n setup(props) {\n const formData: ILoginRegisterFormData = reactive({\n username: '',\n email: '',\n password: '',\n password_conf: '',\n })\n const route = useRoute()\n const store = useStore()\n\n const buttonText: ComputedRef<string> = computed(() =>\n getButtonText(props.action)\n )\n const errorMessages: ComputedRef<string | string[] | null> = computed(\n () => store.getters[ROOT_STORE.GETTERS.ERROR_MESSAGES]\n )\n const appConfig: ComputedRef<TAppConfig> = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const registration_disabled: ComputedRef<boolean> = computed(\n () =>\n props.action === 'register' &&\n !appConfig.value.is_registration_enabled\n )\n\n function getButtonText(action: string): string {\n switch (action) {\n case 'reset-request':\n case 'reset':\n return 'buttons.SUBMIT'\n default:\n return `buttons.${props.action.toUpperCase()}`\n }\n }\n function onSubmit(actionType: string) {\n switch (actionType) {\n case 'reset':\n if (!props.token) {\n return store.commit(\n ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,\n 'user.INVALID_TOKEN'\n )\n }\n return store.dispatch(AUTH_USER_STORE.ACTIONS.RESET_USER_PASSWORD, {\n password: formData.password,\n password_conf: formData.password_conf,\n token: props.token,\n })\n case 'reset-request':\n return store.dispatch(\n AUTH_USER_STORE.ACTIONS.SEND_PASSWORD_RESET_REQUEST,\n {\n email: formData.email,\n }\n )\n default:\n store.dispatch(AUTH_USER_STORE.ACTIONS.LOGIN_OR_REGISTER, {\n actionType,\n formData,\n redirectUrl: route.query.from,\n })\n }\n }\n function resetFormData() {\n formData.username = ''\n formData.email = ''\n formData.password = ''\n formData.password_conf = ''\n }\n watch(\n () => route.path,\n async () => {\n store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES)\n resetFormData()\n }\n )\n return {\n appConfig,\n buttonText,\n errorMessages,\n formData,\n registration_disabled,\n onSubmit,\n }\n },\n })\n</script>\n\n<style scoped lang=\"scss\">\n @import '~@/scss/base';\n\n #user-auth-form {\n display: flex;\n align-items: center;\n\n margin: $default-margin 0;\n height: 100%;\n\n #user-form {\n width: 60%;\n\n .password-forgotten {\n font-size: 0.9em;\n font-style: italic;\n padding-left: $default-padding;\n }\n\n button {\n margin: $default-margin;\n border: solid 1px var(--app-color);\n\n &:disabled {\n border-color: var(--disabled-color);\n }\n }\n }\n\n @media screen and (max-width: $medium-limit) {\n height: auto;\n margin-bottom: 50px;\n\n #user-form {\n margin-top: $default-margin;\n width: 100%;\n }\n }\n }\n</style>\n","\n import { ComputedRef, computed, defineComponent, reactive, watch } from 'vue'\n import { useRoute } from 'vue-router'\n\n import { AUTH_USER_STORE, ROOT_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { ILoginRegisterFormData } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'UserAuthForm',\n props: {\n action: {\n type: String,\n required: true,\n },\n token: {\n type: String,\n default: '',\n },\n },\n setup(props) {\n const formData: ILoginRegisterFormData = reactive({\n username: '',\n email: '',\n password: '',\n password_conf: '',\n })\n const route = useRoute()\n const store = useStore()\n\n const buttonText: ComputedRef<string> = computed(() =>\n getButtonText(props.action)\n )\n const errorMessages: ComputedRef<string | string[] | null> = computed(\n () => store.getters[ROOT_STORE.GETTERS.ERROR_MESSAGES]\n )\n const appConfig: ComputedRef<TAppConfig> = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const registration_disabled: ComputedRef<boolean> = computed(\n () =>\n props.action === 'register' &&\n !appConfig.value.is_registration_enabled\n )\n\n function getButtonText(action: string): string {\n switch (action) {\n case 'reset-request':\n case 'reset':\n return 'buttons.SUBMIT'\n default:\n return `buttons.${props.action.toUpperCase()}`\n }\n }\n function onSubmit(actionType: string) {\n switch (actionType) {\n case 'reset':\n if (!props.token) {\n return store.commit(\n ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,\n 'user.INVALID_TOKEN'\n )\n }\n return store.dispatch(AUTH_USER_STORE.ACTIONS.RESET_USER_PASSWORD, {\n password: formData.password,\n password_conf: formData.password_conf,\n token: props.token,\n })\n case 'reset-request':\n return store.dispatch(\n AUTH_USER_STORE.ACTIONS.SEND_PASSWORD_RESET_REQUEST,\n {\n email: formData.email,\n }\n )\n default:\n store.dispatch(AUTH_USER_STORE.ACTIONS.LOGIN_OR_REGISTER, {\n actionType,\n formData,\n redirectUrl: route.query.from,\n })\n }\n }\n function resetFormData() {\n formData.username = ''\n formData.email = ''\n formData.password = ''\n formData.password_conf = ''\n }\n watch(\n () => route.path,\n async () => {\n store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES)\n resetFormData()\n }\n )\n return {\n appConfig,\n buttonText,\n errorMessages,\n formData,\n registration_disabled,\n onSubmit,\n }\n },\n })\n","import { render } from \"./UserAuthForm.vue?vue&type=template&id=36baa80f&scoped=true\"\nimport script from \"./UserAuthForm.vue?vue&type=script&lang=ts\"\nexport * from \"./UserAuthForm.vue?vue&type=script&lang=ts\"\n\nimport \"./UserAuthForm.vue?vue&type=style&index=0&id=36baa80f&scoped=true&lang=scss\"\nscript.render = render\nscript.__scopeId = \"data-v-36baa80f\"\n\nexport default script","// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('../internals/to-length');\nvar repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = String(requireObjectCoercible($this));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.es/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.es/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarWorkoutsChart.vue?vue&type=style&index=0&id=b30dea28&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarWorkouts.vue?vue&type=style&index=0&id=3822f77d&lang=scss\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./UserMonthStats.vue?vue&type=style&index=0&id=7958b39f&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarCells.vue?vue&type=style&index=0&id=17e3f666&lang=scss\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./RecordsCard.vue?vue&type=style&index=0&id=db29ce96&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarWorkout.vue?vue&type=style&index=0&id=cf219d62&lang=scss\"","'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.es/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=702a8534&lang=scss\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Dashboard.vue?vue&type=style&index=0&id=ad6483fc&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarDays.vue?vue&type=style&index=0&id=8c842a34&lang=scss\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./WorkoutCard.vue?vue&type=style&index=0&id=35dd7f95&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./BikePic.vue?vue&type=style&index=0&id=645e8c6f&scoped=true&lang=scss\"","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","<template>\n <div\n id=\"dashboard\"\n class=\"view\"\n v-if=\"authUser.username && sports.length > 0\"\n >\n <div class=\"container mobile-menu\">\n <div class=\"box\">\n <div\n class=\"mobile-menu-item\"\n :class=\"{ 'is-selected': isSelected === 'chart' }\"\n @click=\"updateDisplayColumn('chart')\"\n >\n <i class=\"fa fa-bar-chart\" aria-hidden=\"true\" />\n </div>\n <div\n class=\"mobile-menu-item\"\n :class=\"{ 'is-selected': isSelected === 'calendar' }\"\n @click=\"updateDisplayColumn('calendar')\"\n >\n <i class=\"fa fa-calendar\" aria-hidden=\"true\" />\n </div>\n <div\n class=\"mobile-menu-item\"\n :class=\"{ 'is-selected': isSelected === 'timeline' }\"\n @click=\"updateDisplayColumn('timeline')\"\n >\n <i class=\"fa fa-map-o\" aria-hidden=\"true\" />\n </div>\n <div\n class=\"mobile-menu-item\"\n :class=\"{ 'is-selected': isSelected === 'records' }\"\n @click=\"updateDisplayColumn('records')\"\n >\n <i class=\"fa fa-trophy\" aria-hidden=\"true\" />\n </div>\n </div>\n </div>\n <div class=\"container\">\n <UserStatsCards :user=\"authUser\" />\n </div>\n <div class=\"container dashboard-container\">\n <div class=\"left-container dashboard-sub-container\">\n <UserMonthStats\n :sports=\"sports\"\n :user=\"authUser\"\n :class=\"{ 'is-hidden': !(isSelected === 'chart') }\"\n />\n <UserRecords\n :sports=\"sports\"\n :user=\"authUser\"\n :class=\"{ 'is-hidden': !(isSelected === 'records') }\"\n />\n </div>\n <div class=\"right-container dashboard-sub-container\">\n <UserCalendar\n :sports=\"sports\"\n :user=\"authUser\"\n :class=\"{ 'is-hidden': !(isSelected === 'calendar') }\"\n />\n <Timeline\n :sports=\"sports\"\n :user=\"authUser\"\n :class=\"{ 'is-hidden': !(isSelected === 'timeline') }\"\n />\n </div>\n </div>\n <div id=\"bottom\" />\n </div>\n <div v-else class=\"app-loading\">\n <Loader />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, Ref, computed, defineComponent, ref } from 'vue'\n\n import Timeline from '@/components/Dashboard/Timeline.vue'\n import UserCalendar from '@/components/Dashboard/UserCalendar/index.vue'\n import UserMonthStats from '@/components/Dashboard/UserMonthStats.vue'\n import UserRecords from '@/components/Dashboard/UserRecords/index.vue'\n import UserStatsCards from '@/components/Dashboard/UserStatsCards/index.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'Dashboard',\n components: {\n Timeline,\n UserCalendar,\n UserMonthStats,\n UserRecords,\n UserStatsCards,\n },\n setup() {\n const store = useStore()\n const authUser: ComputedRef<IUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const isSelected: Ref<string> = ref('chart')\n\n function updateDisplayColumn(target: string) {\n isSelected.value = target\n }\n\n return { authUser, sports, isSelected, updateDisplayColumn }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n #dashboard {\n .dashboard-container {\n display: flex;\n flex-direction: row;\n\n .dashboard-sub-container {\n display: flex;\n flex-direction: column;\n }\n\n .left-container {\n width: 32%;\n }\n\n .right-container {\n width: 68%;\n }\n }\n .mobile-menu {\n display: none;\n }\n\n @media screen and (max-width: $medium-limit) {\n padding-bottom: 60px;\n .dashboard-container {\n display: flex;\n flex-direction: column;\n\n .left-container {\n width: 100%;\n }\n\n .right-container {\n width: 100%;\n }\n }\n .mobile-menu {\n display: flex;\n .box {\n display: flex;\n justify-content: space-between;\n padding: 0;\n width: 100%;\n\n .mobile-menu-item {\n display: flex;\n justify-content: space-around;\n border: none;\n border-radius: $border-radius;\n box-shadow: none;\n font-size: 0.95em;\n padding: $default-padding;\n width: 25%;\n\n .fa-trophy {\n color: var(--app-color);\n }\n &.is-selected {\n .fa-trophy {\n color: var(--mobile-menu-selected-color);\n }\n color: var(--mobile-menu-selected-color);\n background-color: var(--mobile-menu-selected-bgcolor);\n }\n }\n }\n }\n .is-hidden {\n display: none;\n }\n }\n }\n</style>\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","<template>\n <div id=\"timeline\">\n <div class=\"section-title\">{{ $t('workouts.LATEST_WORKOUTS') }}</div>\n <div v-if=\"user.nb_workouts > 0 && workouts.length === 0\">\n <WorkoutCard\n v-for=\"index in [...Array(initWorkoutsCount).keys()]\"\n :user=\"user\"\n :key=\"index\"\n />\n </div>\n <div v-else>\n <WorkoutCard\n v-for=\"workout in workouts\"\n :workout=\"workout\"\n :sport=\"\n workouts.length > 0\n ? sports.filter((s) => s.id === workout.sport_id)[0]\n : null\n \"\n :user=\"user\"\n :key=\"workout.id\"\n />\n <NoWorkouts v-if=\"workouts.length === 0\" />\n <div v-if=\"moreWorkoutsExist\" class=\"more-workouts\">\n <button @click=\"loadMoreWorkouts\">\n {{ $t('workouts.LOAD_MORE_WORKOUT') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n ComputedRef,\n PropType,\n computed,\n defineComponent,\n ref,\n onBeforeMount,\n } from 'vue'\n\n import WorkoutCard from '@/components/Workout/WorkoutCard.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { defaultOrder } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'Timeline',\n components: {\n NoWorkouts,\n WorkoutCard,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const store = useStore()\n\n let page = ref(1)\n const per_page = 5\n const initWorkoutsCount =\n props.user.nb_workouts >= per_page ? per_page : props.user.nb_workouts\n onBeforeMount(() => loadWorkouts())\n\n const workouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.TIMELINE_WORKOUTS]\n )\n const moreWorkoutsExist: ComputedRef<boolean> = computed(() =>\n workouts.value.length > 0\n ? workouts.value[workouts.value.length - 1].previous_workout !== null\n : false\n )\n\n function loadWorkouts() {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_TIMELINE_WORKOUTS, {\n page: page.value,\n per_page,\n ...defaultOrder,\n })\n }\n function loadMoreWorkouts() {\n page.value += 1\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_MORE_TIMELINE_WORKOUTS, {\n page: page.value,\n per_page,\n ...defaultOrder,\n })\n }\n\n return {\n initWorkoutsCount,\n moreWorkoutsExist,\n per_page,\n workouts,\n loadMoreWorkouts,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n #timeline {\n margin-bottom: 20px;\n\n .more-workouts {\n display: flex;\n justify-content: center;\n }\n }\n</style>\n","<template>\n <div class=\"timeline-workout\">\n <div class=\"box\">\n <div class=\"workout-user-date\">\n <div class=\"workout-user\">\n <UserPicture :user=\"user\" />\n <router-link\n v-if=\"user.username\"\n class=\"workout-user-name\"\n :to=\"{\n name: 'User',\n params: { username: user.username },\n }\"\n >\n {{ user.username }}\n </router-link>\n </div>\n <router-link\n class=\"workout-title\"\n v-if=\"workout\"\n :to=\"{\n name: 'Workout',\n params: { workoutId: workout.id },\n }\"\n >\n {{ workout.title }}\n </router-link>\n <div\n class=\"workout-date\"\n v-if=\"workout && user\"\n :title=\"\n format(\n getDateWithTZ(workout.workout_date, user.timezone),\n 'dd/MM/yyyy HH:mm'\n )\n \"\n >\n {{\n formatDistance(new Date(workout.workout_date), new Date(), {\n addSuffix: true,\n locale,\n })\n }}\n </div>\n </div>\n <div\n class=\"workout-map\"\n :class=\"{ 'no-cursor': !workout }\"\n @click=\"\n workout\n ? $router.push({\n name: 'Workout',\n params: { workoutId: workout.id },\n })\n : null\n \"\n >\n <div v-if=\"workout\">\n <StaticMap v-if=\"workout.with_gpx\" :workout=\"workout\" />\n <div v-else class=\"no-map\">\n {{ $t('workouts.NO_MAP') }}\n </div>\n </div>\n </div>\n <div\n class=\"workout-data\"\n @click=\"\n $router.push({ name: 'Workout', params: { workoutId: workout.id } })\n \"\n >\n <div>\n <SportImage v-if=\"sport\" :sport-label=\"sport.label\" />\n </div>\n <div>\n <i class=\"fa fa-clock-o\" aria-hidden=\"true\" />\n <span v-if=\"workout\">{{ workout.moving }}</span>\n </div>\n <div>\n <i class=\"fa fa-road\" aria-hidden=\"true\" />\n <span v-if=\"workout\">{{ workout.distance }} km</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Locale, format, formatDistance } from 'date-fns'\n import { PropType, defineComponent, ComputedRef, computed } from 'vue'\n\n import StaticMap from '@/components/Common/StaticMap.vue'\n import UserPicture from '@/components/User/UserPicture.vue'\n import { ROOT_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getDateWithTZ } from '@/utils/dates'\n\n export default defineComponent({\n name: 'WorkoutCard',\n components: {\n StaticMap,\n UserPicture,\n },\n props: {\n workout: {\n type: Object as PropType<IWorkout>,\n required: false,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n sport: {\n type: Object as PropType<ISport>,\n required: false,\n },\n },\n setup() {\n const store = useStore()\n const locale: ComputedRef<Locale> = computed(\n () => store.getters[ROOT_STORE.GETTERS.LOCALE]\n )\n return {\n format,\n formatDistance,\n getDateWithTZ,\n locale,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .timeline-workout {\n margin-bottom: $default-margin * 2;\n\n .box {\n flex-direction: column;\n padding: 0;\n .workout-user-date {\n display: flex;\n justify-content: space-between;\n padding: $default-padding * 0.5 $default-padding;\n .workout-user {\n display: flex;\n ::v-deep(.user-picture) {\n img {\n height: 25px;\n width: 25px;\n }\n .no-picture {\n font-size: 1.5em;\n }\n }\n .workout-user-name {\n padding-left: 5px;\n }\n }\n .workout-date {\n font-size: 0.85em;\n font-style: italic;\n }\n .workout-title {\n display: block;\n padding: 0 $default-padding;\n @media screen and (max-width: $x-small-limit) {\n display: none;\n }\n }\n }\n\n .workout-map {\n background-color: var(--workout-no-map-bg-color);\n height: 150px;\n .no-map {\n line-height: 150px;\n }\n ::v-deep(.bg-map-image) {\n height: 150px;\n }\n }\n\n .workout-data {\n display: flex;\n padding: $default-padding * 0.5;\n font-size: 0.9em;\n .sport-img {\n height: 25px;\n width: 25px;\n }\n div {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 33%;\n }\n }\n\n .workout-map,\n .workout-data {\n cursor: pointer;\n }\n .no-cursor {\n cursor: default;\n }\n .fa {\n padding-right: $default-padding;\n }\n }\n }\n</style>\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\n\nexport default function compareAsc(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport endOfDay from \"../endOfDay/index.js\";\nimport endOfMonth from \"../endOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * var result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\n\nexport default function isLastDayOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarMonths from \"../differenceInCalendarMonths/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport isLastDayOfMonth from \"../isLastDayOfMonth/index.js\";\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\n\nexport default function differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n var result; // Check for the difference of less than month\n\n if (difference < 1) {\n result = 0;\n } else {\n if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n dateLeft.setDate(30);\n }\n\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month\n\n if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n } // Prevent negative zero\n\n\n return result === 0 ? 0 : result;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getTime() - dateRight.getTime();\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000;\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff);\n}","export default function assign(target, dirtyObject) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n dirtyObject = dirtyObject || {};\n\n for (var property in dirtyObject) {\n if (Object.prototype.hasOwnProperty.call(dirtyObject, property)) {\n target[property] = dirtyObject[property];\n }\n }\n\n return target;\n}","import assign from \"../assign/index.js\";\nexport default function cloneObject(dirtyObject) {\n return assign({}, dirtyObject);\n}","import compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWords ` to `formatDistance`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWords(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 11, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n *\n * // v2.0.0 onward\n *\n * formatDistance(\n * new Date(1986, 3, 4, 11, 32, 0),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', null, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","\n import { Locale, format, formatDistance } from 'date-fns'\n import { PropType, defineComponent, ComputedRef, computed } from 'vue'\n\n import StaticMap from '@/components/Common/StaticMap.vue'\n import UserPicture from '@/components/User/UserPicture.vue'\n import { ROOT_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getDateWithTZ } from '@/utils/dates'\n\n export default defineComponent({\n name: 'WorkoutCard',\n components: {\n StaticMap,\n UserPicture,\n },\n props: {\n workout: {\n type: Object as PropType<IWorkout>,\n required: false,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n sport: {\n type: Object as PropType<ISport>,\n required: false,\n },\n },\n setup() {\n const store = useStore()\n const locale: ComputedRef<Locale> = computed(\n () => store.getters[ROOT_STORE.GETTERS.LOCALE]\n )\n return {\n format,\n formatDistance,\n getDateWithTZ,\n locale,\n }\n },\n })\n","import { render } from \"./WorkoutCard.vue?vue&type=template&id=35dd7f95&scoped=true\"\nimport script from \"./WorkoutCard.vue?vue&type=script&lang=ts\"\nexport * from \"./WorkoutCard.vue?vue&type=script&lang=ts\"\n\nimport \"./WorkoutCard.vue?vue&type=style&index=0&id=35dd7f95&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-35dd7f95\"\n\nexport default script","\n import {\n ComputedRef,\n PropType,\n computed,\n defineComponent,\n ref,\n onBeforeMount,\n } from 'vue'\n\n import WorkoutCard from '@/components/Workout/WorkoutCard.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { defaultOrder } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'Timeline',\n components: {\n NoWorkouts,\n WorkoutCard,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const store = useStore()\n\n let page = ref(1)\n const per_page = 5\n const initWorkoutsCount =\n props.user.nb_workouts >= per_page ? per_page : props.user.nb_workouts\n onBeforeMount(() => loadWorkouts())\n\n const workouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.TIMELINE_WORKOUTS]\n )\n const moreWorkoutsExist: ComputedRef<boolean> = computed(() =>\n workouts.value.length > 0\n ? workouts.value[workouts.value.length - 1].previous_workout !== null\n : false\n )\n\n function loadWorkouts() {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_TIMELINE_WORKOUTS, {\n page: page.value,\n per_page,\n ...defaultOrder,\n })\n }\n function loadMoreWorkouts() {\n page.value += 1\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_MORE_TIMELINE_WORKOUTS, {\n page: page.value,\n per_page,\n ...defaultOrder,\n })\n }\n\n return {\n initWorkoutsCount,\n moreWorkoutsExist,\n per_page,\n workouts,\n loadMoreWorkouts,\n }\n },\n })\n","import { render } from \"./Timeline.vue?vue&type=template&id=e324c07c&scoped=true\"\nimport script from \"./Timeline.vue?vue&type=script&lang=ts\"\nexport * from \"./Timeline.vue?vue&type=script&lang=ts\"\n\nimport \"./Timeline.vue?vue&type=style&index=0&id=e324c07c&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-e324c07c\"\n\nexport default script","<template>\n <div id=\"user-calendar\">\n <div class=\"calendar-card box\">\n <CalendarHeader\n :day=\"day\"\n locale-options=\"enGB\"\n @displayNextMonth=\"displayNextMonth\"\n @displayPreviousMonth=\"displayPreviousMonth\"\n />\n <CalendarDays :start-date=\"calendarDates.start\" locale-options=\"enGB\" />\n <CalendarCells\n :currentDay=\"day\"\n :end-date=\"calendarDates.end\"\n :sports=\"sports\"\n :start-date=\"calendarDates.start\"\n :timezone=\"user.timezone\"\n :workouts=\"calendarWorkouts\"\n :weekStartingMonday=\"user.weekm\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { addMonths, format, subMonths } from 'date-fns'\n import {\n ComputedRef,\n PropType,\n computed,\n defineComponent,\n ref,\n onBeforeMount,\n } from 'vue'\n\n import CalendarCells from '@/components/Dashboard/UserCalendar/CalendarCells.vue'\n import CalendarDays from '@/components/Dashboard/UserCalendar/CalendarDays.vue'\n import CalendarHeader from '@/components/Dashboard/UserCalendar/CalendarHeader.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout, TWorkoutsPayload } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getCalendarStartAndEnd } from '@/utils/dates'\n import { defaultOrder } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'UserCalendar',\n components: {\n CalendarCells,\n CalendarDays,\n CalendarHeader,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const store = useStore()\n\n onBeforeMount(() => getCalendarWorkouts())\n\n const dateFormat = 'yyyy-MM-dd'\n let day = ref(new Date())\n let calendarDates = ref(\n getCalendarStartAndEnd(day.value, props.user.weekm)\n )\n const calendarWorkouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.CALENDAR_WORKOUTS]\n )\n\n function getCalendarWorkouts() {\n calendarDates.value = getCalendarStartAndEnd(\n day.value,\n props.user.weekm\n )\n const apiParams: TWorkoutsPayload = {\n from: format(calendarDates.value.start, dateFormat),\n to: format(calendarDates.value.end, dateFormat),\n page: 1,\n per_page: 100,\n ...defaultOrder,\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_CALENDAR_WORKOUTS, apiParams)\n }\n\n function displayNextMonth() {\n day.value = addMonths(day.value, 1)\n getCalendarWorkouts()\n }\n function displayPreviousMonth() {\n day.value = subMonths(day.value, 1)\n getCalendarWorkouts()\n }\n\n return {\n day,\n calendarDates,\n calendarWorkouts,\n displayNextMonth,\n displayPreviousMonth,\n }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n #user-calendar {\n .calendar-card {\n padding: 0;\n\n .card-content {\n padding: 0;\n }\n }\n }\n</style>\n","<template>\n <div class=\"calendar-cells\">\n <div class=\"calendar-row\" v-for=\"(row, index) in rows\" :key=\"index\">\n <div\n class=\"calendar-cell\"\n :class=\"{\n 'disabled-cell': !isSameMonth(day, currentDay),\n 'week-end': isWeekEnd(i),\n today: isToday(day),\n }\"\n v-for=\"(day, i) in row\"\n :key=\"i\"\n >\n <CalendarWorkouts\n :workouts=\"filterWorkouts(day, workouts)\"\n :sports=\"sports\"\n />\n <div class=\"calendar-cell-day\">\n {{ format(day, 'd') }}\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { addDays, format, isSameDay, isSameMonth, isToday } from 'date-fns'\n import {\n PropType,\n Ref,\n defineComponent,\n ref,\n toRefs,\n watch,\n onMounted,\n } from 'vue'\n\n import CalendarWorkouts from '@/components/Dashboard/UserCalendar/CalendarWorkouts.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getDateWithTZ } from '@/utils/dates'\n\n export default defineComponent({\n name: 'CalendarCells',\n components: {\n CalendarWorkouts,\n },\n props: {\n currentDay: {\n type: Date,\n required: true,\n },\n endDate: {\n type: Date,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n startDate: {\n type: Date,\n required: true,\n },\n timezone: {\n type: String,\n required: true,\n },\n weekStartingMonday: {\n type: Boolean,\n required: true,\n },\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n },\n setup(props) {\n const rows: Ref<Date[][]> = ref([])\n let { startDate, endDate, weekStartingMonday } = toRefs(props)\n\n onMounted(() => getDays())\n\n function getDays() {\n rows.value = []\n let day = startDate.value\n while (day <= endDate.value) {\n const days: Date[] = []\n for (let i = 0; i < 7; i++) {\n days.push(day)\n day = addDays(day, 1)\n }\n rows.value.push(days)\n }\n }\n\n function isWeekEnd(day: number): boolean {\n return weekStartingMonday.value\n ? [5, 6].includes(day)\n : [0, 6].includes(day)\n }\n\n function filterWorkouts(day: Date, workouts: IWorkout[]) {\n if (workouts) {\n return workouts\n .filter((workout) =>\n isSameDay(\n getDateWithTZ(workout.workout_date, props.timezone),\n day\n )\n )\n .reverse()\n }\n return []\n }\n\n watch(\n () => props.currentDay,\n () => getDays()\n )\n\n return { rows, format, isSameMonth, isToday, isWeekEnd, filterWorkouts }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n .calendar-cells {\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .calendar-row {\n display: flex;\n flex-wrap: wrap;\n border-top: solid 1px var(--calendar-border-color);\n\n .calendar-cell {\n border-right: solid 1px var(--calendar-border-color);\n height: 40px;\n flex-grow: 1;\n flex-basis: 8%;\n padding: $default-padding * 0.5 $default-padding $default-padding * 0.5\n $default-padding * 0.5;\n width: 8%;\n position: relative;\n\n .calendar-cell-day {\n position: absolute;\n font-size: 0.8em;\n line-height: 1;\n top: 0.5em;\n right: 0.5em;\n font-weight: bold;\n }\n }\n .calendar-cell:last-child {\n border-right: 0;\n @media screen and (max-width: $small-limit) {\n .calendar-workouts {\n .more-workouts {\n left: -45px;\n }\n }\n }\n }\n .disabled-cell {\n color: var(--app-color-light);\n }\n .week-end {\n background: var(--calendar-week-end-color);\n }\n .today {\n background: var(--calendar-today-color);\n }\n }\n @media screen and (max-width: $small-limit) {\n .calendar-row:last-child {\n .calendar-workouts {\n .more-workouts {\n top: inherit;\n bottom: 20px;\n }\n }\n }\n }\n }\n</style>\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day?\n *\n * @description\n * Are the given dates in the same day?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n */\n\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month?\n *\n * @description\n * Are the given dates in the same month?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import isSameDay from \"../isSameDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isToday\n * @category Day Helpers\n * @summary Is the given date today?\n * @pure false\n *\n * @description\n * Is the given date today?\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is today\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * var result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\n\nexport default function isToday(dirtyDate) {\n requiredArgs(1, arguments);\n return isSameDay(dirtyDate, Date.now());\n}","<template>\n <div class=\"calendar-workouts\">\n <div class=\"desktop-display\">\n <div\n class=\"workouts-display\"\n v-if=\"workouts.length <= displayedWorkoutCount\"\n >\n <CalendarWorkout\n v-for=\"(workout, index) in workouts.slice(0, displayedWorkoutCount)\"\n :key=\"index\"\n :workout=\"workout\"\n :sportLabel=\"getSportLabel(workout, sports)\"\n />\n </div>\n <div v-else class=\"donut-display\">\n <CalendarWorkoutsChart\n :workouts=\"workouts\"\n :sports=\"sports\"\n :datasets=\"chartDatasets\"\n :colors=\"colors\"\n />\n </div>\n </div>\n <div class=\"mobile-display\">\n <div class=\"donut-display\" v-if=\"workouts.length > 0\">\n <CalendarWorkoutsChart\n :workouts=\"workouts\"\n :sports=\"sports\"\n :datasets=\"chartDatasets\"\n :colors=\"colors\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, computed, defineComponent } from 'vue'\n\n import CalendarWorkout from '@/components/Dashboard/UserCalendar/CalendarWorkout.vue'\n import CalendarWorkoutsChart from '@/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getSportLabel, sportIdColors } from '@/utils/sports'\n import { getDonutDatasets } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'CalendarWorkouts',\n components: {\n CalendarWorkout,\n CalendarWorkoutsChart,\n },\n props: {\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n },\n setup(props) {\n return {\n chartDatasets: computed(() => getDonutDatasets(props.workouts)),\n colors: computed(() => sportIdColors(props.sports)),\n displayedWorkoutCount: 6,\n getSportLabel,\n }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n .calendar-workouts {\n .desktop-display {\n display: flex;\n }\n .mobile-display {\n display: none;\n }\n\n .workouts-display {\n display: flex;\n flex-wrap: wrap;\n position: relative;\n margin: 0 $default-padding 0 0;\n }\n .donut-display {\n display: flex;\n height: 34px;\n width: 34px;\n }\n\n @media screen and (max-width: $small-limit) {\n .desktop-display {\n display: none;\n }\n .mobile-display {\n display: flex;\n }\n }\n }\n</style>\n","<template>\n <div\n class=\"calendar-workout\"\n @click=\"\n $router.push({ name: 'Workout', params: { workoutId: workout.id } })\n \"\n >\n <SportImage :sport-label=\"sportLabel\" :title=\"workout.title\" />\n <sup>\n <i\n v-if=\"workout.records.length > 0\"\n class=\"fa fa-trophy custom-fa-small\"\n aria-hidden=\"true\"\n :title=\"\n workout.records.map(\n (record) => ` ${t(`workouts.RECORD_${record.record_type}`)}`\n )\n \"\n />\n </sup>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IWorkout } from '@/types/workouts'\n\n export default defineComponent({\n name: 'CalendarWorkout',\n props: {\n workout: {\n type: Object as PropType<IWorkout>,\n required: true,\n },\n sportLabel: {\n type: String,\n required: true,\n },\n },\n setup() {\n const { t } = useI18n()\n return { t }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n\n .calendar-workout {\n display: flex;\n padding: 1px;\n cursor: pointer;\n .sport-img {\n width: 18px;\n height: 18px;\n }\n sup {\n position: relative;\n top: -8px;\n left: -3px;\n width: 2px;\n .custom-fa-small {\n font-size: 0.7em;\n }\n }\n\n @media screen and (max-width: $small-limit) {\n .sport-img {\n padding: 3px;\n width: 20px;\n height: 20px;\n }\n sup {\n .custom-fa-small {\n font-size: 0.6em;\n }\n }\n }\n }\n</style>\n","\n import { defineComponent, PropType } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IWorkout } from '@/types/workouts'\n\n export default defineComponent({\n name: 'CalendarWorkout',\n props: {\n workout: {\n type: Object as PropType<IWorkout>,\n required: true,\n },\n sportLabel: {\n type: String,\n required: true,\n },\n },\n setup() {\n const { t } = useI18n()\n return { t }\n },\n })\n","import { render } from \"./CalendarWorkout.vue?vue&type=template&id=cf219d62\"\nimport script from \"./CalendarWorkout.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarWorkout.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarWorkout.vue?vue&type=style&index=0&id=cf219d62&lang=scss\"\nscript.render = render\n\nexport default script","<template>\n <div class=\"calendar-workouts-chart\">\n <div class=\"workouts-chart\" @click=\"togglePane\">\n <div class=\"workouts-count\">{{ workouts.length }}</div>\n <DonutChart :datasets=\"datasets\" :colors=\"colors\" />\n </div>\n <div class=\"workouts-pane\" v-if=\"!isHidden\">\n <div class=\"more-workouts\" v-click-outside=\"togglePane\">\n <i\n class=\"fa fa-times calendar-more\"\n aria-hidden=\"true\"\n @click=\"togglePane\"\n />\n <CalendarWorkout\n v-for=\"(workout, index) in workouts\"\n :key=\"index\"\n :workout=\"workout\"\n :sportLabel=\"getSportLabel(workout, sports)\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, defineComponent, ref } from 'vue'\n\n import CalendarWorkout from '@/components/Dashboard/UserCalendar/CalendarWorkout.vue'\n import DonutChart from '@/components/Dashboard/UserCalendar/DonutChart.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getSportLabel } from '@/utils/sports'\n\n export default defineComponent({\n name: 'CalendarWorkoutsChart',\n components: {\n CalendarWorkout,\n DonutChart,\n },\n props: {\n colors: {\n type: Object as PropType<Record<number, string>>,\n required: true,\n },\n datasets: {\n type: Object as PropType<Record<number, Record<string, number>>>,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n },\n setup() {\n const isHidden = ref(true)\n function togglePane(event: Event & { target: HTMLElement }) {\n event.stopPropagation()\n isHidden.value = !isHidden.value\n }\n return { isHidden, getSportLabel, togglePane }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n .calendar-workouts-chart {\n display: flex;\n\n .workouts-chart {\n position: relative;\n .workouts-count {\n display: flex;\n justify-content: center;\n position: absolute;\n top: 4px;\n left: 6px;\n width: 20px;\n font-size: 1.1em;\n font-weight: bold;\n }\n @media screen and (max-width: $small-limit) {\n .workouts-count {\n top: 16px;\n left: 6px;\n }\n ::v-deep(.donut-chart) {\n padding-top: 12px;\n svg g circle {\n stroke-width: 2;\n stroke-opacity: 0.8;\n }\n }\n }\n }\n\n .workouts-pane {\n display: flex;\n padding-left: 40px;\n\n .more-workouts {\n background: whitesmoke;\n border-radius: 4px;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2),\n 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n position: absolute;\n top: 52px;\n left: 0;\n min-width: 60px;\n @media screen and (max-width: $small-limit) {\n min-width: 70px;\n }\n\n margin-bottom: 20px;\n padding: 10px 10px;\n\n display: flex;\n flex-wrap: wrap;\n z-index: 1000;\n\n .calendar-more {\n position: absolute;\n font-size: 0.9em;\n top: 5px;\n right: 5px;\n }\n }\n }\n }\n</style>\n","// adapted from: https://css-tricks.com/building-a-donut-chart-with-vue-and-svg/\n<template>\n <div class=\"donut-chart\">\n <svg height=\"34\" width=\"34\" viewBox=\"0 0 34 34\">\n <g v-for=\"(data, index) of Object.entries(datasets)\" :key=\"index\">\n <circle\n :cx=\"cx\"\n :cy=\"cy\"\n :r=\"radius\"\n fill=\"transparent\"\n :stroke=\"colors[+data[0]]\"\n :stroke-dashoffset=\"\n calculateStrokeDashOffset(data[1].percentage, circumference)\n \"\n :stroke-dasharray=\"circumference\"\n stroke-width=\"3\"\n stroke-opacity=\"0.8\"\n :transform=\"returnCircleTransformValue(index, data[1].percentage)\"\n />\n </g>\n </svg>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'DonutChart',\n props: {\n colors: {\n type: Object as PropType<Record<number, string>>,\n required: true,\n },\n datasets: {\n type: Object as PropType<Record<number, Record<string, number>>>,\n required: true,\n },\n },\n setup() {\n let angleOffset = -90\n const cx = 16\n const cy = 16\n const radius = 14\n const circumference = 2 * Math.PI * radius\n\n function calculateStrokeDashOffset(\n percentage: number,\n circumference: number\n ): number {\n return circumference - percentage * circumference\n }\n function returnCircleTransformValue(\n index: number,\n percentage: number\n ): string {\n const rotation = `rotate(${angleOffset}, ${cx}, ${cy})`\n angleOffset = percentage * 360 + angleOffset\n return rotation\n }\n\n return {\n angleOffset,\n circumference,\n cx,\n cy,\n radius,\n calculateStrokeDashOffset,\n returnCircleTransformValue,\n }\n },\n })\n</script>\n","\n import { PropType, defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'DonutChart',\n props: {\n colors: {\n type: Object as PropType<Record<number, string>>,\n required: true,\n },\n datasets: {\n type: Object as PropType<Record<number, Record<string, number>>>,\n required: true,\n },\n },\n setup() {\n let angleOffset = -90\n const cx = 16\n const cy = 16\n const radius = 14\n const circumference = 2 * Math.PI * radius\n\n function calculateStrokeDashOffset(\n percentage: number,\n circumference: number\n ): number {\n return circumference - percentage * circumference\n }\n function returnCircleTransformValue(\n index: number,\n percentage: number\n ): string {\n const rotation = `rotate(${angleOffset}, ${cx}, ${cy})`\n angleOffset = percentage * 360 + angleOffset\n return rotation\n }\n\n return {\n angleOffset,\n circumference,\n cx,\n cy,\n radius,\n calculateStrokeDashOffset,\n returnCircleTransformValue,\n }\n },\n })\n","import { render } from \"./DonutChart.vue?vue&type=template&id=76d4f86b\"\nimport script from \"./DonutChart.vue?vue&type=script&lang=ts\"\nexport * from \"./DonutChart.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","\n import { PropType, defineComponent, ref } from 'vue'\n\n import CalendarWorkout from '@/components/Dashboard/UserCalendar/CalendarWorkout.vue'\n import DonutChart from '@/components/Dashboard/UserCalendar/DonutChart.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getSportLabel } from '@/utils/sports'\n\n export default defineComponent({\n name: 'CalendarWorkoutsChart',\n components: {\n CalendarWorkout,\n DonutChart,\n },\n props: {\n colors: {\n type: Object as PropType<Record<number, string>>,\n required: true,\n },\n datasets: {\n type: Object as PropType<Record<number, Record<string, number>>>,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n },\n setup() {\n const isHidden = ref(true)\n function togglePane(event: Event & { target: HTMLElement }) {\n event.stopPropagation()\n isHidden.value = !isHidden.value\n }\n return { isHidden, getSportLabel, togglePane }\n },\n })\n","import { render } from \"./CalendarWorkoutsChart.vue?vue&type=template&id=b30dea28&scoped=true\"\nimport script from \"./CalendarWorkoutsChart.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarWorkoutsChart.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarWorkoutsChart.vue?vue&type=style&index=0&id=b30dea28&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-b30dea28\"\n\nexport default script","\n import { PropType, computed, defineComponent } from 'vue'\n\n import CalendarWorkout from '@/components/Dashboard/UserCalendar/CalendarWorkout.vue'\n import CalendarWorkoutsChart from '@/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getSportLabel, sportIdColors } from '@/utils/sports'\n import { getDonutDatasets } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'CalendarWorkouts',\n components: {\n CalendarWorkout,\n CalendarWorkoutsChart,\n },\n props: {\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n },\n setup(props) {\n return {\n chartDatasets: computed(() => getDonutDatasets(props.workouts)),\n colors: computed(() => sportIdColors(props.sports)),\n displayedWorkoutCount: 6,\n getSportLabel,\n }\n },\n })\n","import { render } from \"./CalendarWorkouts.vue?vue&type=template&id=3822f77d\"\nimport script from \"./CalendarWorkouts.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarWorkouts.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarWorkouts.vue?vue&type=style&index=0&id=3822f77d&lang=scss\"\nscript.render = render\n\nexport default script","\n import { addDays, format, isSameDay, isSameMonth, isToday } from 'date-fns'\n import {\n PropType,\n Ref,\n defineComponent,\n ref,\n toRefs,\n watch,\n onMounted,\n } from 'vue'\n\n import CalendarWorkouts from '@/components/Dashboard/UserCalendar/CalendarWorkouts.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getDateWithTZ } from '@/utils/dates'\n\n export default defineComponent({\n name: 'CalendarCells',\n components: {\n CalendarWorkouts,\n },\n props: {\n currentDay: {\n type: Date,\n required: true,\n },\n endDate: {\n type: Date,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n startDate: {\n type: Date,\n required: true,\n },\n timezone: {\n type: String,\n required: true,\n },\n weekStartingMonday: {\n type: Boolean,\n required: true,\n },\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n },\n setup(props) {\n const rows: Ref<Date[][]> = ref([])\n let { startDate, endDate, weekStartingMonday } = toRefs(props)\n\n onMounted(() => getDays())\n\n function getDays() {\n rows.value = []\n let day = startDate.value\n while (day <= endDate.value) {\n const days: Date[] = []\n for (let i = 0; i < 7; i++) {\n days.push(day)\n day = addDays(day, 1)\n }\n rows.value.push(days)\n }\n }\n\n function isWeekEnd(day: number): boolean {\n return weekStartingMonday.value\n ? [5, 6].includes(day)\n : [0, 6].includes(day)\n }\n\n function filterWorkouts(day: Date, workouts: IWorkout[]) {\n if (workouts) {\n return workouts\n .filter((workout) =>\n isSameDay(\n getDateWithTZ(workout.workout_date, props.timezone),\n day\n )\n )\n .reverse()\n }\n return []\n }\n\n watch(\n () => props.currentDay,\n () => getDays()\n )\n\n return { rows, format, isSameMonth, isToday, isWeekEnd, filterWorkouts }\n },\n })\n","import { render } from \"./CalendarCells.vue?vue&type=template&id=17e3f666\"\nimport script from \"./CalendarCells.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarCells.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarCells.vue?vue&type=style&index=0&id=17e3f666&lang=scss\"\nscript.render = render\n\nexport default script","<template>\n <div class=\"calendar-days\">\n <div class=\"calendar-day\" v-for=\"(day, index) in days\" :key=\"index\">\n {{ format(day, 'EEE', localeOptions) }}\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { format, addDays } from 'date-fns'\n import { defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'CalendarDays',\n props: {\n startDate: {\n type: Date,\n required: true,\n },\n localeOptions: {\n type: String,\n required: true,\n },\n },\n setup(props) {\n const days = []\n for (let i = 0; i < 7; i++) {\n days.push(addDays(props.startDate, i))\n }\n return { days, addDays, format }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n .calendar-days {\n display: flex;\n flex-direction: row;\n border-top: solid 1px var(--calendar-border-color);\n\n .calendar-day {\n flex-grow: 1;\n padding: $default-padding * 0.5;\n text-align: center;\n text-transform: uppercase;\n color: var(--app-color-light);\n }\n }\n</style>\n","\n import { format, addDays } from 'date-fns'\n import { defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'CalendarDays',\n props: {\n startDate: {\n type: Date,\n required: true,\n },\n localeOptions: {\n type: String,\n required: true,\n },\n },\n setup(props) {\n const days = []\n for (let i = 0; i < 7; i++) {\n days.push(addDays(props.startDate, i))\n }\n return { days, addDays, format }\n },\n })\n","import { render } from \"./CalendarDays.vue?vue&type=template&id=8c842a34\"\nimport script from \"./CalendarDays.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarDays.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarDays.vue?vue&type=style&index=0&id=8c842a34&lang=scss\"\nscript.render = render\n\nexport default script","<template>\n <div class=\"calendar-header\">\n <div\n class=\"calendar-arrow calendar-arrow-left\"\n @click=\"emit('displayPreviousMonth')\"\n >\n <i class=\"fa fa-chevron-left\" aria-hidden=\"true\" />\n </div>\n <div class=\"calendar-month\">\n <span>\n {{ format(day, 'MMM yyyy', localeOptions) }}\n </span>\n </div>\n <div\n class=\"calendar-arrow calendar-arrow-right\"\n @click=\"emit('displayNextMonth')\"\n >\n <i class=\"fa fa-chevron-right\" aria-hidden=\"true\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { format } from 'date-fns'\n import { defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'CalendarHeader',\n props: {\n day: {\n type: Date,\n required: true,\n },\n localeOptions: {\n type: String,\n required: true,\n },\n },\n emits: ['displayNextMonth', 'displayPreviousMonth'],\n setup(props, { emit }) {\n return { emit, format }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n .calendar-header {\n display: flex;\n flex-direction: row;\n\n .calendar-arrow,\n .calendar-month {\n flex-grow: 1;\n padding: $default-padding;\n }\n .calendar-arrow-left {\n text-align: left;\n cursor: pointer;\n }\n .calendar-arrow-right {\n text-align: right;\n cursor: pointer;\n }\n .calendar-month {\n font-weight: bold;\n text-align: center;\n text-transform: uppercase;\n }\n }\n</style>\n","\n import { format } from 'date-fns'\n import { defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'CalendarHeader',\n props: {\n day: {\n type: Date,\n required: true,\n },\n localeOptions: {\n type: String,\n required: true,\n },\n },\n emits: ['displayNextMonth', 'displayPreviousMonth'],\n setup(props, { emit }) {\n return { emit, format }\n },\n })\n","import { render } from \"./CalendarHeader.vue?vue&type=template&id=4eabec52\"\nimport script from \"./CalendarHeader.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarHeader.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarHeader.vue?vue&type=style&index=0&id=4eabec52&lang=scss\"\nscript.render = render\n\nexport default script","\n import { addMonths, format, subMonths } from 'date-fns'\n import {\n ComputedRef,\n PropType,\n computed,\n defineComponent,\n ref,\n onBeforeMount,\n } from 'vue'\n\n import CalendarCells from '@/components/Dashboard/UserCalendar/CalendarCells.vue'\n import CalendarDays from '@/components/Dashboard/UserCalendar/CalendarDays.vue'\n import CalendarHeader from '@/components/Dashboard/UserCalendar/CalendarHeader.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout, TWorkoutsPayload } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getCalendarStartAndEnd } from '@/utils/dates'\n import { defaultOrder } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'UserCalendar',\n components: {\n CalendarCells,\n CalendarDays,\n CalendarHeader,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const store = useStore()\n\n onBeforeMount(() => getCalendarWorkouts())\n\n const dateFormat = 'yyyy-MM-dd'\n let day = ref(new Date())\n let calendarDates = ref(\n getCalendarStartAndEnd(day.value, props.user.weekm)\n )\n const calendarWorkouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.CALENDAR_WORKOUTS]\n )\n\n function getCalendarWorkouts() {\n calendarDates.value = getCalendarStartAndEnd(\n day.value,\n props.user.weekm\n )\n const apiParams: TWorkoutsPayload = {\n from: format(calendarDates.value.start, dateFormat),\n to: format(calendarDates.value.end, dateFormat),\n page: 1,\n per_page: 100,\n ...defaultOrder,\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_CALENDAR_WORKOUTS, apiParams)\n }\n\n function displayNextMonth() {\n day.value = addMonths(day.value, 1)\n getCalendarWorkouts()\n }\n function displayPreviousMonth() {\n day.value = subMonths(day.value, 1)\n getCalendarWorkouts()\n }\n\n return {\n day,\n calendarDates,\n calendarWorkouts,\n displayNextMonth,\n displayPreviousMonth,\n }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=702a8534\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=702a8534&lang=scss\"\nscript.render = render\n\nexport default script","<template>\n <div class=\"user-month-stats\">\n <Card>\n <template #title>{{ $t('dashboard.THIS_MONTH') }}</template>\n <template #content>\n <StatChart\n :sports=\"sports\"\n :user=\"user\"\n :chart-params=\"chartParams\"\n :displayed-sport-ids=\"selectedSportIds\"\n :hide-chart-if-no-data=\"true\"\n />\n </template>\n </Card>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { endOfMonth, startOfMonth } from 'date-fns'\n import { PropType, defineComponent } from 'vue'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n\n export default defineComponent({\n name: 'UserMonthStats',\n components: {\n StatChart,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const date = new Date()\n return {\n chartParams: {\n duration: 'week',\n start: startOfMonth(date),\n end: endOfMonth(date),\n },\n selectedSportIds: props.sports.map((sport) => sport.id),\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .user-month-stats {\n ::v-deep(.card-content) {\n padding: $default-padding;\n }\n }\n</style>\n","\n import { endOfMonth, startOfMonth } from 'date-fns'\n import { PropType, defineComponent } from 'vue'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n\n export default defineComponent({\n name: 'UserMonthStats',\n components: {\n StatChart,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const date = new Date()\n return {\n chartParams: {\n duration: 'week',\n start: startOfMonth(date),\n end: endOfMonth(date),\n },\n selectedSportIds: props.sports.map((sport) => sport.id),\n }\n },\n })\n","import { render } from \"./UserMonthStats.vue?vue&type=template&id=7958b39f&scoped=true\"\nimport script from \"./UserMonthStats.vue?vue&type=script&lang=ts\"\nexport * from \"./UserMonthStats.vue?vue&type=script&lang=ts\"\n\nimport \"./UserMonthStats.vue?vue&type=style&index=0&id=7958b39f&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-7958b39f\"\n\nexport default script","<template>\n <div class=\"user-records-section\">\n <div class=\"section-title\">\n <i class=\"fa fa-trophy custom-fa-small\" aria-hidden=\"true\" />\n {{ $t('workouts.RECORD', 2) }}\n </div>\n <div class=\"user-records\">\n <div v-if=\"Object.keys(recordsBySport).length === 0\" class=\"no-records\">\n {{ $t('workouts.NO_RECORDS') }}\n </div>\n <RecordsCard\n v-for=\"sportTranslatedLabel in Object.keys(recordsBySport).sort()\"\n :sportTranslatedLabel=\"sportTranslatedLabel\"\n :records=\"recordsBySport[sportTranslatedLabel]\"\n :key=\"sportTranslatedLabel\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import RecordsCard from '@/components/Dashboard/UserRecords/RecordsCard.vue'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { getRecordsBySports } from '@/utils/records'\n import { translateSports } from '@/utils/sports'\n\n export default defineComponent({\n name: 'UserRecords',\n components: {\n RecordsCard,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n const recordsBySport = computed(() =>\n getRecordsBySports(\n props.user.records,\n translateSports(props.sports, t),\n props.user.timezone\n )\n )\n return { recordsBySport }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .user-records {\n .no-records {\n border: solid 1px var(--card-border-color);\n border-radius: $border-radius;\n padding: $default-padding;\n margin: $default-margin;\n }\n }\n</style>\n","<template>\n <div class=\"records-card\">\n <Card>\n <template #title>\n <SportImage :sport-label=\"records.label\" />\n {{ sportTranslatedLabel }}\n </template>\n <template #content>\n <div class=\"record\" v-for=\"record in records.records\" :key=\"record.id\">\n <span class=\"record-type\">{{\n t(`workouts.RECORD_${record.record_type}`)\n }}</span>\n <span class=\"record-value\">{{ record.value }}</span>\n <span class=\"record-date\">\n <router-link\n :to=\"{\n name: 'Workout',\n params: { workoutId: record.workout_id },\n }\"\n >{{ record.workout_date }}</router-link\n >\n </span>\n </div>\n </template>\n </Card>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, defineComponent } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IRecord } from '@/types/workouts'\n\n export default defineComponent({\n name: 'RecordsCard',\n props: {\n records: {\n type: Object as PropType<IRecord[]>,\n required: true,\n },\n sportTranslatedLabel: {\n type: String,\n required: true,\n },\n },\n setup() {\n const { t } = useI18n()\n return { t }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .records-card {\n width: 100%;\n padding-bottom: $default-padding * 0.3;\n\n ::v-deep(.card) {\n font-size: 0.9em;\n .card-title {\n display: flex;\n font-size: 0.9em;\n .sport-img {\n padding-right: $default-padding;\n height: 20px;\n width: 20px;\n }\n }\n .card-content {\n font-size: 0.9em;\n padding: $default-padding;\n .record {\n display: flex;\n justify-content: space-between;\n span {\n padding: 2px 5px;\n }\n .record-type {\n flex-grow: 1;\n }\n .record-value {\n font-weight: bold;\n padding-right: $default-padding * 2;\n }\n }\n }\n @media screen and (max-width: $medium-limit) {\n font-size: 1em;\n .card-title {\n font-size: 1em;\n .sport-img {\n height: 22px;\n width: 22px;\n }\n }\n }\n }\n }\n</style>\n","\n import { PropType, defineComponent } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IRecord } from '@/types/workouts'\n\n export default defineComponent({\n name: 'RecordsCard',\n props: {\n records: {\n type: Object as PropType<IRecord[]>,\n required: true,\n },\n sportTranslatedLabel: {\n type: String,\n required: true,\n },\n },\n setup() {\n const { t } = useI18n()\n return { t }\n },\n })\n","import { render } from \"./RecordsCard.vue?vue&type=template&id=db29ce96&scoped=true\"\nimport script from \"./RecordsCard.vue?vue&type=script&lang=ts\"\nexport * from \"./RecordsCard.vue?vue&type=script&lang=ts\"\n\nimport \"./RecordsCard.vue?vue&type=style&index=0&id=db29ce96&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-db29ce96\"\n\nexport default script","import { ITranslatedSport } from '@/types/sports'\nimport { IRecord, IRecordsBySports } from '@/types/workouts'\nimport { formatWorkoutDate, getDateWithTZ } from '@/utils/dates'\n\nexport const formatRecord = (\n record: IRecord,\n tz: string\n): Record<string, string | number> => {\n let value\n switch (record.record_type) {\n case 'AS':\n case 'MS':\n value = `${record.value} km/h`\n break\n case 'FD':\n value = `${record.value} km`\n break\n case 'LD':\n value = record.value\n break\n default:\n throw new Error(\n `Invalid record type, expected: \"AS\", \"FD\", \"LD\", \"MD\", got: \"${record.record_type}\"`\n )\n }\n return {\n workout_date: formatWorkoutDate(getDateWithTZ(record.workout_date, tz))\n .workout_date,\n workout_id: record.workout_id,\n id: record.id,\n record_type: record.record_type,\n value: value,\n }\n}\n\nexport const getRecordsBySports = (\n records: IRecord[],\n translatedSports: ITranslatedSport[],\n tz: string\n): IRecordsBySports =>\n records.reduce((sportList: IRecordsBySports, record) => {\n const sport = translatedSports.find((s) => s.id === record.sport_id)\n if (sport && sport.label) {\n if (sportList[sport.translatedLabel] === void 0) {\n sportList[sport.translatedLabel] = {\n label: sport.label,\n records: [],\n }\n }\n sportList[sport.translatedLabel].records.push(formatRecord(record, tz))\n }\n return sportList\n }, {})\n","\n import { computed, defineComponent, PropType } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import RecordsCard from '@/components/Dashboard/UserRecords/RecordsCard.vue'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { getRecordsBySports } from '@/utils/records'\n import { translateSports } from '@/utils/sports'\n\n export default defineComponent({\n name: 'UserRecords',\n components: {\n RecordsCard,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n const recordsBySport = computed(() =>\n getRecordsBySports(\n props.user.records,\n translateSports(props.sports, t),\n props.user.timezone\n )\n )\n return { recordsBySport }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=080b37ac&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=080b37ac&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-080b37ac\"\n\nexport default script","<template>\n <div id=\"user-stats\">\n <StatCard\n icon=\"calendar\"\n :value=\"user.nb_workouts\"\n :text=\"$t('workouts.WORKOUT', user.nb_workouts)\"\n />\n <StatCard\n icon=\"road\"\n :value=\"Number(user.total_distance).toFixed(2)\"\n :text=\"$t('workouts.KM')\"\n />\n <StatCard\n icon=\"clock-o\"\n :value=\"total_duration.days\"\n :text=\"total_duration.duration\"\n />\n <StatCard\n icon=\"tags\"\n :value=\"user.nb_sports\"\n :text=\"$t('workouts.SPORT', user.nb_sports)\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, PropType, defineComponent, computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatCard from '@/components/Common/StatCard.vue'\n import { IUserProfile } from '@/types/user'\n\n export default defineComponent({\n name: 'UserStatsCards',\n components: {\n StatCard,\n },\n props: {\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n const total_duration: ComputedRef<string> = computed(\n () => props.user.total_duration\n )\n\n function get_duration(total_duration: ComputedRef<string>) {\n const duration = total_duration.value.match(/day/g)\n ? total_duration.value.split(', ')[1]\n : total_duration.value\n return {\n days: total_duration.value.match(/day/g)\n ? `${total_duration.value.split(' ')[0]} ${\n total_duration.value.match(/days/g)\n ? t('common.DAY', 2)\n : t('common.DAY', 1)\n }`\n : `0 ${t('common.DAY', 2)},`,\n duration: `${duration.split(':')[0]}h ${duration.split(':')[1]}min`,\n }\n }\n\n return { total_duration: computed(() => get_duration(total_duration)) }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n #user-stats {\n display: flex;\n flex: 1 0 25%;\n justify-content: space-around;\n flex-wrap: wrap;\n }\n</style>\n","\n import { ComputedRef, PropType, defineComponent, computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatCard from '@/components/Common/StatCard.vue'\n import { IUserProfile } from '@/types/user'\n\n export default defineComponent({\n name: 'UserStatsCards',\n components: {\n StatCard,\n },\n props: {\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n const total_duration: ComputedRef<string> = computed(\n () => props.user.total_duration\n )\n\n function get_duration(total_duration: ComputedRef<string>) {\n const duration = total_duration.value.match(/day/g)\n ? total_duration.value.split(', ')[1]\n : total_duration.value\n return {\n days: total_duration.value.match(/day/g)\n ? `${total_duration.value.split(' ')[0]} ${\n total_duration.value.match(/days/g)\n ? t('common.DAY', 2)\n : t('common.DAY', 1)\n }`\n : `0 ${t('common.DAY', 2)},`,\n duration: `${duration.split(':')[0]}h ${duration.split(':')[1]}min`,\n }\n }\n\n return { total_duration: computed(() => get_duration(total_duration)) }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=082d819e\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=082d819e&lang=scss\"\nscript.render = render\n\nexport default script","\n import { ComputedRef, Ref, computed, defineComponent, ref } from 'vue'\n\n import Timeline from '@/components/Dashboard/Timeline.vue'\n import UserCalendar from '@/components/Dashboard/UserCalendar/index.vue'\n import UserMonthStats from '@/components/Dashboard/UserMonthStats.vue'\n import UserRecords from '@/components/Dashboard/UserRecords/index.vue'\n import UserStatsCards from '@/components/Dashboard/UserStatsCards/index.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'Dashboard',\n components: {\n Timeline,\n UserCalendar,\n UserMonthStats,\n UserRecords,\n UserStatsCards,\n },\n setup() {\n const store = useStore()\n const authUser: ComputedRef<IUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const isSelected: Ref<string> = ref('chart')\n\n function updateDisplayColumn(target: string) {\n isSelected.value = target\n }\n\n return { authUser, sports, isSelected, updateDisplayColumn }\n },\n })\n","import { render } from \"./Dashboard.vue?vue&type=template&id=ad6483fc&scoped=true\"\nimport script from \"./Dashboard.vue?vue&type=script&lang=ts\"\nexport * from \"./Dashboard.vue?vue&type=script&lang=ts\"\n\nimport \"./Dashboard.vue?vue&type=style&index=0&id=ad6483fc&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-ad6483fc\"\n\nexport default script","import toInteger from \"../_lib/toInteger/index.js\";\nimport addYears from \"../addYears/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\n\nexport default function subYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addYears(dirtyDate, -amount);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * var result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\n\nexport default function endOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n date.setFullYear(year + 1, 0, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\nexport default function addWeeks(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n var days = amount * 7;\n return addDays(dirtyDate, days);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addWeeks from \"../addWeeks/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subWeeks\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * const result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\n\nexport default function subWeeks(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addWeeks(dirtyDate, -amount);\n}","import {\n addMonths,\n addWeeks,\n addYears,\n endOfMonth,\n endOfWeek,\n endOfYear,\n format,\n startOfMonth,\n startOfWeek,\n startOfYear,\n subMonths,\n subWeeks,\n subYears,\n} from 'date-fns'\n\nimport { IChartDataset } from '@/types/chart'\nimport { ISport } from '@/types/sports'\nimport {\n IStatisticsChartData,\n IStatisticsDateParams,\n TStatisticsDatasetKeys,\n TStatisticsDatasets,\n TStatisticsFromApi,\n} from '@/types/statistics'\nimport { incrementDate, getStartDate } from '@/utils/dates'\nimport { sportColors } from '@/utils/sports'\n\nconst dateFormats: Record<string, Record<string, string>> = {\n week: {\n api: 'yyyy-MM-dd',\n chart: 'dd/MM/yyyy',\n },\n month: {\n api: 'yyyy-MM',\n chart: 'MM/yyyy',\n },\n year: {\n api: 'yyyy',\n chart: 'yyyy',\n },\n}\n\nexport const datasetKeys: TStatisticsDatasetKeys[] = [\n 'nb_workouts',\n 'total_duration',\n 'total_distance',\n]\n\nexport const getDateKeys = (\n params: IStatisticsDateParams,\n weekStartingMonday: boolean\n): Date[] => {\n const days = []\n for (\n let day = getStartDate(params.duration, params.start, weekStartingMonday);\n day <= params.end;\n day = incrementDate(params.duration, day)\n ) {\n days.push(day)\n }\n return days\n}\n\nconst getStatisticsChartDataset = (\n sportLabel: string,\n color: string\n): IChartDataset => {\n return {\n label: sportLabel,\n backgroundColor: [color],\n data: [],\n }\n}\n\nexport const getDatasets = (displayedSports: ISport[]): TStatisticsDatasets => {\n const datasets: TStatisticsDatasets = {\n nb_workouts: [],\n total_distance: [],\n total_duration: [],\n }\n displayedSports.map((sport) => {\n const color = sportColors[sport.label]\n datasets.nb_workouts.push(getStatisticsChartDataset(sport.label, color))\n datasets.total_distance.push(getStatisticsChartDataset(sport.label, color))\n datasets.total_duration.push(getStatisticsChartDataset(sport.label, color))\n })\n return datasets\n}\n\nexport const formatStats = (\n params: IStatisticsDateParams,\n weekStartingMonday: boolean,\n sports: ISport[],\n displayedSportsId: number[],\n apiStats: TStatisticsFromApi\n): IStatisticsChartData => {\n const dayKeys = getDateKeys(params, weekStartingMonday)\n const dateFormat = dateFormats[params.duration]\n const displayedSports = sports.filter((sport) =>\n displayedSportsId.includes(sport.id)\n )\n const labels: string[] = []\n const datasets = getDatasets(displayedSports)\n const sportsId: Record<string, number> = {}\n displayedSports.map(\n (displayedSport) => (sportsId[displayedSport.label] = displayedSport.id)\n )\n\n dayKeys.map((key) => {\n const date: string = format(key, dateFormat.api)\n const label: string = format(key, dateFormat.chart)\n labels.push(label)\n datasetKeys.map((datasetKey) => {\n datasets[datasetKey].map((dataset) => {\n dataset.data.push(\n apiStats !== {} &&\n date in apiStats &&\n sportsId[dataset.label] in apiStats[date]\n ? apiStats[date][sportsId[dataset.label]][datasetKey]\n : 0\n )\n })\n })\n })\n return {\n labels,\n datasets,\n }\n}\n\nexport const getStatsDateParams = (\n date: Date,\n timeFrame: string,\n weekStartingMonday: boolean\n): IStatisticsDateParams => {\n const weekStartsOn = weekStartingMonday ? 1 : 0\n const start =\n timeFrame === 'year'\n ? startOfYear(subYears(date, 9))\n : timeFrame === 'week'\n ? startOfWeek(subMonths(date, 2), { weekStartsOn })\n : startOfMonth(subMonths(date, 11)) // month\n const end =\n timeFrame === 'year'\n ? endOfYear(date)\n : timeFrame === 'week'\n ? endOfWeek(date, { weekStartsOn })\n : endOfMonth(date) // month\n return {\n duration: timeFrame,\n end,\n start,\n }\n}\n\nexport const updateChartParams = (\n chartParams: IStatisticsDateParams,\n backward: boolean,\n weekStartingMonday: boolean\n): IStatisticsDateParams => {\n const { duration, start, end } = chartParams\n const weekStartsOn = weekStartingMonday ? 1 : 0\n return {\n duration,\n end:\n duration === 'year'\n ? endOfYear(backward ? subYears(end, 1) : addYears(end, 1))\n : duration === 'week'\n ? endOfWeek(backward ? subWeeks(end, 1) : addWeeks(end, 1), {\n weekStartsOn,\n })\n : endOfMonth(backward ? subMonths(end, 1) : addMonths(end, 1)),\n start:\n duration === 'year'\n ? startOfYear(backward ? subYears(start, 1) : addYears(start, 1))\n : duration === 'week'\n ? startOfWeek(backward ? subWeeks(start, 1) : addWeeks(start, 1), {\n weekStartsOn,\n })\n : startOfMonth(backward ? subMonths(start, 1) : addMonths(start, 1)),\n }\n}\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=dad311d4&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./UserAuthForm.vue?vue&type=style&index=0&id=36baa80f&scoped=true&lang=scss\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./LoginOrRegister.vue?vue&type=style&index=0&id=66631e9e&lang=scss\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=6eb9bb83&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./StatsSportsMenu.vue?vue&type=style&index=0&id=f34b0c5e&lang=scss\"","// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/engine-user-agent');\n\n// eslint-disable-next-line unicorn/no-unsafe-regex -- safe\nmodule.exports = /Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(userAgent);\n","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./StatsMenu.vue?vue&type=style&index=0&id=56f0f302&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=080b37ac&lang=scss&scoped=true\"","<template>\n <div id=\"statistics\" class=\"view\">\n <div class=\"container\" v-if=\"authUser.username\">\n <Card>\n <template #title>{{ $t('statistics.STATISTICS') }}</template>\n <template #content>\n <Statistics\n :class=\"{ 'stats-disabled': authUser.nb_workouts === 0 }\"\n :user=\"authUser\"\n :sports=\"sports\"\n />\n </template>\n </Card>\n <NoWorkouts v-if=\"authUser.nb_workouts === 0\"></NoWorkouts>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, computed, defineComponent } from 'vue'\n\n import Statistics from '@/components/Statistics/index.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'StatisticsView',\n components: {\n NoWorkouts,\n Statistics,\n },\n setup() {\n const store = useStore()\n const authUser: ComputedRef<IUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(() =>\n store.getters[SPORTS_STORE.GETTERS.SPORTS].filter((sport) =>\n authUser.value.sports_list.includes(sport.id)\n )\n )\n return { authUser, sports }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n #statistics {\n display: flex;\n width: 100%;\n .container {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n }\n</style>\n","<template>\n <div id=\"user-statistics\" v-if=\"translatedSports\">\n <StatsMenu\n @timeFrameUpdate=\"updateTimeFrame\"\n @arrowClick=\"handleOnClickArrows\"\n />\n <StatChart\n :sports=\"sports\"\n :user=\"user\"\n :chartParams=\"chartParams\"\n :displayed-sport-ids=\"selectedSportIds\"\n :fullStats=\"true\"\n />\n <SportsMenu\n :selected-sport-ids=\"selectedSportIds\"\n :user-sports=\"sports\"\n @selectedSportIdsUpdate=\"updateSelectedSportIds\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n ComputedRef,\n PropType,\n Ref,\n computed,\n defineComponent,\n ref,\n watch,\n } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import StatsMenu from '@/components/Statistics/StatsMenu.vue'\n import SportsMenu from '@/components/Statistics/StatsSportsMenu.vue'\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { IStatisticsDateParams } from '@/types/statistics'\n import { IUserProfile } from '@/types/user'\n import { translateSports } from '@/utils/sports'\n import { getStatsDateParams, updateChartParams } from '@/utils/statistics'\n\n export default defineComponent({\n name: 'Statistics',\n components: {\n SportsMenu,\n StatChart,\n StatsMenu,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n let selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n const chartParams: Ref<IStatisticsDateParams> = ref(\n getChartParams(selectedTimeFrame.value)\n )\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.sports, t)\n )\n const selectedSportIds: Ref<number[]> = ref(getSports(props.sports))\n\n function updateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n chartParams.value = getChartParams(selectedTimeFrame.value)\n }\n function getChartParams(timeFrame: string): IStatisticsDateParams {\n return getStatsDateParams(new Date(), timeFrame, props.user.weekm)\n }\n function handleOnClickArrows(backward: boolean) {\n chartParams.value = updateChartParams(\n chartParams.value,\n backward,\n props.user.weekm\n )\n }\n function getSports(sports: ISport[]) {\n return sports.map((sport) => sport.id)\n }\n function updateSelectedSportIds(sportId: number) {\n if (selectedSportIds.value.includes(sportId)) {\n selectedSportIds.value = selectedSportIds.value.filter(\n (id) => id !== sportId\n )\n } else {\n selectedSportIds.value.push(sportId)\n }\n }\n\n watch(\n () => props.sports,\n (newSports) => {\n selectedSportIds.value = getSports(newSports)\n }\n )\n\n return {\n chartParams,\n selectedTimeFrame,\n timeFrames,\n translatedSports,\n selectedSportIds,\n handleOnClickArrows,\n updateSelectedSportIds,\n updateTimeFrame,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n #user-statistics {\n &.stats-disabled {\n opacity: 0.3;\n pointer-events: none;\n }\n\n ::v-deep(.chart-radio) {\n justify-content: space-around;\n padding: $default-padding * 3 $default-padding\n $default-padding$default-padding;\n }\n }\n</style>\n","<template>\n <div class=\"chart-menu\">\n <div class=\"chart-arrow\">\n <i\n class=\"fa fa-chevron-left\"\n aria-hidden=\"true\"\n @click=\"emit('arrowClick', true)\"\n />\n </div>\n <div class=\"time-frames custom-checkboxes-group\">\n <div class=\"time-frames-checkboxes custom-checkboxes\">\n <div\n v-for=\"frame in timeFrames\"\n class=\"time-frame custom-checkbox\"\n :key=\"frame\"\n >\n <label>\n <input\n type=\"radio\"\n :id=\"frame\"\n :name=\"frame\"\n :checked=\"selectedTimeFrame === frame\"\n @input=\"onUpdateTimeFrame(frame)\"\n />\n <span>{{ $t(`statistics.TIME_FRAMES.${frame}`) }}</span>\n </label>\n </div>\n </div>\n </div>\n <div class=\"chart-arrow\">\n <i\n class=\"fa fa-chevron-right\"\n aria-hidden=\"true\"\n @click=\"emit('arrowClick', false)\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, ref } from 'vue'\n\n export default defineComponent({\n name: 'StatsMenu',\n emits: ['arrowClick', 'timeFrameUpdate'],\n setup(props, { emit }) {\n let selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n\n function onUpdateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n emit('timeFrameUpdate', timeFrame)\n }\n\n return {\n selectedTimeFrame,\n timeFrames,\n onUpdateTimeFrame,\n emit,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .chart-menu {\n display: flex;\n\n .chart-arrow,\n .time-frames {\n flex-grow: 1;\n text-align: center;\n }\n\n .chart-arrow {\n cursor: pointer;\n }\n }\n</style>\n","\n import { defineComponent, ref } from 'vue'\n\n export default defineComponent({\n name: 'StatsMenu',\n emits: ['arrowClick', 'timeFrameUpdate'],\n setup(props, { emit }) {\n let selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n\n function onUpdateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n emit('timeFrameUpdate', timeFrame)\n }\n\n return {\n selectedTimeFrame,\n timeFrames,\n onUpdateTimeFrame,\n emit,\n }\n },\n })\n","import { render } from \"./StatsMenu.vue?vue&type=template&id=56f0f302&scoped=true\"\nimport script from \"./StatsMenu.vue?vue&type=script&lang=ts\"\nexport * from \"./StatsMenu.vue?vue&type=script&lang=ts\"\n\nimport \"./StatsMenu.vue?vue&type=style&index=0&id=56f0f302&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-56f0f302\"\n\nexport default script","<template>\n <div class=\"sports-menu\">\n <label\n v-for=\"sport in translatedSports\"\n type=\"checkbox\"\n :key=\"sport.id\"\n :style=\"{ color: sportColors[sport.label] }\"\n >\n <input\n type=\"checkbox\"\n :id=\"sport.id\"\n :name=\"sport.label\"\n :checked=\"selectedSportIds.includes(sport.id)\"\n @input=\"updateSelectedSportIds(sport.id)\"\n />\n <SportImage :sport-label=\"sport.label\" />\n <span class=\"sport-label\">{{ sport.translatedLabel }}</span>\n </label>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, PropType, computed, defineComponent, inject } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { translateSports } from '@/utils/sports'\n\n export default defineComponent({\n name: 'SportsMenu',\n props: {\n selectedSportIds: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n userSports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n },\n emits: ['selectedSportIdsUpdate'],\n setup(props, { emit }) {\n const { t } = useI18n()\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.userSports, t)\n )\n\n function updateSelectedSportIds(sportId: number) {\n emit('selectedSportIdsUpdate', sportId)\n }\n\n return {\n sportColors: inject('sportColors'),\n translatedSports,\n updateSelectedSportIds,\n }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base.scss';\n .sports-menu {\n display: flex;\n justify-content: space-between;\n padding: $default-padding;\n @media screen and (max-width: $medium-limit) {\n justify-content: normal;\n flex-wrap: wrap;\n }\n\n label {\n display: flex;\n align-items: center;\n font-size: 0.9em;\n font-weight: normal;\n min-width: 120px;\n padding: $default-padding;\n @media screen and (max-width: $medium-limit) {\n min-width: 100px;\n }\n @media screen and (max-width: $x-small-limit) {\n min-width: 20px;\n .sport-label {\n display: none;\n }\n }\n }\n\n .sport-img {\n padding: 3px;\n width: 20px;\n height: 20px;\n }\n }\n</style>\n","\n import { ComputedRef, PropType, computed, defineComponent, inject } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { translateSports } from '@/utils/sports'\n\n export default defineComponent({\n name: 'SportsMenu',\n props: {\n selectedSportIds: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n userSports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n },\n emits: ['selectedSportIdsUpdate'],\n setup(props, { emit }) {\n const { t } = useI18n()\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.userSports, t)\n )\n\n function updateSelectedSportIds(sportId: number) {\n emit('selectedSportIdsUpdate', sportId)\n }\n\n return {\n sportColors: inject('sportColors'),\n translatedSports,\n updateSelectedSportIds,\n }\n },\n })\n","import { render } from \"./StatsSportsMenu.vue?vue&type=template&id=f34b0c5e\"\nimport script from \"./StatsSportsMenu.vue?vue&type=script&lang=ts\"\nexport * from \"./StatsSportsMenu.vue?vue&type=script&lang=ts\"\n\nimport \"./StatsSportsMenu.vue?vue&type=style&index=0&id=f34b0c5e&lang=scss\"\nscript.render = render\n\nexport default script","\n import {\n ComputedRef,\n PropType,\n Ref,\n computed,\n defineComponent,\n ref,\n watch,\n } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import StatsMenu from '@/components/Statistics/StatsMenu.vue'\n import SportsMenu from '@/components/Statistics/StatsSportsMenu.vue'\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { IStatisticsDateParams } from '@/types/statistics'\n import { IUserProfile } from '@/types/user'\n import { translateSports } from '@/utils/sports'\n import { getStatsDateParams, updateChartParams } from '@/utils/statistics'\n\n export default defineComponent({\n name: 'Statistics',\n components: {\n SportsMenu,\n StatChart,\n StatsMenu,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n let selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n const chartParams: Ref<IStatisticsDateParams> = ref(\n getChartParams(selectedTimeFrame.value)\n )\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.sports, t)\n )\n const selectedSportIds: Ref<number[]> = ref(getSports(props.sports))\n\n function updateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n chartParams.value = getChartParams(selectedTimeFrame.value)\n }\n function getChartParams(timeFrame: string): IStatisticsDateParams {\n return getStatsDateParams(new Date(), timeFrame, props.user.weekm)\n }\n function handleOnClickArrows(backward: boolean) {\n chartParams.value = updateChartParams(\n chartParams.value,\n backward,\n props.user.weekm\n )\n }\n function getSports(sports: ISport[]) {\n return sports.map((sport) => sport.id)\n }\n function updateSelectedSportIds(sportId: number) {\n if (selectedSportIds.value.includes(sportId)) {\n selectedSportIds.value = selectedSportIds.value.filter(\n (id) => id !== sportId\n )\n } else {\n selectedSportIds.value.push(sportId)\n }\n }\n\n watch(\n () => props.sports,\n (newSports) => {\n selectedSportIds.value = getSports(newSports)\n }\n )\n\n return {\n chartParams,\n selectedTimeFrame,\n timeFrames,\n translatedSports,\n selectedSportIds,\n handleOnClickArrows,\n updateSelectedSportIds,\n updateTimeFrame,\n }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=dad311d4&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=dad311d4&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-dad311d4\"\n\nexport default script","\n import { ComputedRef, computed, defineComponent } from 'vue'\n\n import Statistics from '@/components/Statistics/index.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'StatisticsView',\n components: {\n NoWorkouts,\n Statistics,\n },\n setup() {\n const store = useStore()\n const authUser: ComputedRef<IUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(() =>\n store.getters[SPORTS_STORE.GETTERS.SPORTS].filter((sport) =>\n authUser.value.sports_list.includes(sport.id)\n )\n )\n return { authUser, sports }\n },\n })\n","import { render } from \"./StatisticsView.vue?vue&type=template&id=cdc23a7c&scoped=true\"\nimport script from \"./StatisticsView.vue?vue&type=script&lang=ts\"\nexport * from \"./StatisticsView.vue?vue&type=script&lang=ts\"\n\nimport \"./StatisticsView.vue?vue&type=style&index=0&id=cdc23a7c&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-cdc23a7c\"\n\nexport default script","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=082d819e&lang=scss\"","<template>\n <div id=\"loginOrRegister\" class=\"view\">\n <div class=\"container\">\n <div class=\"container-sub\">\n <BikePic />\n </div>\n <div class=\"container-sub\">\n <LoginOrRegisterForm :action=\"action\" />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue'\n\n import BikePic from '@/components/BikePic.vue'\n import LoginOrRegisterForm from '@/components/User/UserAuthForm.vue'\n\n export default defineComponent({\n name: 'NavBar',\n components: {\n BikePic,\n LoginOrRegisterForm,\n },\n props: {\n action: {\n type: String,\n required: true,\n },\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n\n #loginOrRegister {\n display: flex;\n height: 100%;\n\n .container {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n margin-bottom: $default-margin * 2;\n width: 100%;\n\n .container-sub {\n min-width: 50%;\n height: 100%;\n }\n }\n @media screen and (max-width: $medium-limit) {\n height: auto;\n .container {\n .container-sub {\n align-items: center;\n .bike-img {\n max-width: 60%;\n }\n }\n }\n }\n @media screen and (max-width: $small-limit) {\n .container {\n flex-direction: column;\n }\n }\n }\n</style>\n","<template>\n <div id=\"about\">\n <img class=\"bike-img\" :src=\"'/img/bike.svg'\" alt=\"mountain bike\" />\n </div>\n</template>\n\n<script>\n export default {\n name: 'About',\n }\n</script>\n\n<style scoped lang=\"scss\">\n @import '~@/scss/base';\n\n #about {\n display: flex;\n justify-content: center;\n\n padding: $default-padding;\n height: 100%;\n\n .bike-img {\n max-width: 40%;\n }\n }\n</style>\n","import { render } from \"./BikePic.vue?vue&type=template&id=645e8c6f&scoped=true\"\nimport script from \"./BikePic.vue?vue&type=script&lang=js\"\nexport * from \"./BikePic.vue?vue&type=script&lang=js\"\n\nimport \"./BikePic.vue?vue&type=style&index=0&id=645e8c6f&scoped=true&lang=scss\"\nscript.render = render\nscript.__scopeId = \"data-v-645e8c6f\"\n\nexport default script","\n import { defineComponent } from 'vue'\n\n import BikePic from '@/components/BikePic.vue'\n import LoginOrRegisterForm from '@/components/User/UserAuthForm.vue'\n\n export default defineComponent({\n name: 'NavBar',\n components: {\n BikePic,\n LoginOrRegisterForm,\n },\n props: {\n action: {\n type: String,\n required: true,\n },\n },\n })\n","import { render } from \"./LoginOrRegister.vue?vue&type=template&id=66631e9e\"\nimport script from \"./LoginOrRegister.vue?vue&type=script&lang=ts\"\nexport * from \"./LoginOrRegister.vue?vue&type=script&lang=ts\"\n\nimport \"./LoginOrRegister.vue?vue&type=style&index=0&id=66631e9e&lang=scss\"\nscript.render = render\n\nexport default script","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./StatisticsView.vue?vue&type=style&index=0&id=cdc23a7c&lang=scss&scoped=true\"","// `Symbol.prototype.description` getter\n// https://tc39.es/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Timeline.vue?vue&type=style&index=0&id=e324c07c&lang=scss&scoped=true\"","<template>\n <div class=\"not-found view\">\n <NotFound />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue'\n\n import NotFound from '@/components/Common/NotFound.vue'\n\n export default defineComponent({\n name: 'NotFoundView',\n components: {\n NotFound,\n },\n })\n</script>\n","\n import { defineComponent } from 'vue'\n\n import NotFound from '@/components/Common/NotFound.vue'\n\n export default defineComponent({\n name: 'NotFoundView',\n components: {\n NotFound,\n },\n })\n","import { render } from \"./NotFoundView.vue?vue&type=template&id=2944cbc5\"\nimport script from \"./NotFoundView.vue?vue&type=script&lang=ts\"\nexport * from \"./NotFoundView.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarHeader.vue?vue&type=style&index=0&id=4eabec52&lang=scss\"","<template>\n <div class=\"start-chart\">\n <div v-if=\"hideChartIfNoData && emptyStats\">\n {{ $t('workouts.NO_WORKOUTS') }}\n </div>\n <div v-else>\n <div class=\"chart-radio\">\n <label>\n <input\n type=\"radio\"\n name=\"total_distance\"\n :checked=\"displayedData === 'total_distance'\"\n @click=\"updateDisplayData\"\n />\n {{ $t('workouts.DISTANCE') }}\n </label>\n <label>\n <input\n type=\"radio\"\n name=\"total_duration\"\n :checked=\"displayedData === 'total_duration'\"\n @click=\"updateDisplayData\"\n />\n {{ $t('workouts.DURATION') }}\n </label>\n <label>\n <input\n type=\"radio\"\n name=\"nb_workouts\"\n :checked=\"displayedData === 'nb_workouts'\"\n @click=\"updateDisplayData\"\n />\n {{ $t('workouts.WORKOUT', 2) }}\n </label>\n </div>\n <Chart\n v-if=\"labels.length > 0\"\n :datasets=\"datasets\"\n :labels=\"labels\"\n :displayedData=\"displayedData\"\n :displayedSportIds=\"displayedSportIds\"\n :fullStats=\"fullStats\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { format } from 'date-fns'\n import {\n ComputedRef,\n PropType,\n Ref,\n computed,\n defineComponent,\n ref,\n watch,\n onBeforeMount,\n } from 'vue'\n\n import Chart from '@/components/Common/StatsChart/Chart.vue'\n import { STATS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import {\n IStatisticsChartData,\n TStatisticsDatasetKeys,\n IStatisticsDateParams,\n TStatisticsFromApi,\n IStatisticsParams,\n } from '@/types/statistics'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n import { formatStats } from '@/utils/statistics'\n\n export default defineComponent({\n name: 'UserMonthStats',\n components: {\n Chart,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n chartParams: {\n type: Object as PropType<IStatisticsDateParams>,\n required: true,\n },\n displayedSportIds: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n fullStats: {\n type: Boolean,\n default: false,\n },\n hideChartIfNoData: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const store = useStore()\n\n let displayedData: Ref<TStatisticsDatasetKeys> = ref('total_distance')\n const statistics: ComputedRef<TStatisticsFromApi> = computed(\n () => store.getters[STATS_STORE.GETTERS.USER_STATS]\n )\n const formattedStats: ComputedRef<IStatisticsChartData> = computed(() =>\n formatStats(\n props.chartParams,\n props.user.weekm,\n props.sports,\n props.displayedSportIds,\n statistics.value\n )\n )\n\n onBeforeMount(() =>\n getStatistics(getApiParams(props.chartParams, props.user))\n )\n\n function getStatistics(apiParams: IStatisticsParams) {\n store.dispatch(STATS_STORE.ACTIONS.GET_USER_STATS, {\n username: props.user.username,\n filterType: 'by_time',\n params: apiParams,\n })\n }\n function updateDisplayData(\n event: Event & {\n target: HTMLInputElement & { name: TStatisticsDatasetKeys }\n }\n ) {\n displayedData.value = event.target.name\n }\n function getApiParams(\n chartParams: IStatisticsDateParams,\n user: IUserProfile\n ): IStatisticsParams {\n return {\n from: format(chartParams.start, 'yyyy-MM-dd'),\n to: format(chartParams.end, 'yyyy-MM-dd'),\n time:\n chartParams.duration === 'week'\n ? `week${user.weekm ? 'm' : ''}`\n : chartParams.duration,\n }\n }\n\n watch(\n () => props.chartParams,\n async (newParams) => {\n getStatistics(getApiParams(newParams, props.user))\n }\n )\n\n return {\n datasets: computed(\n () => formattedStats.value.datasets[displayedData.value]\n ),\n labels: computed(() => formattedStats.value.labels),\n emptyStats: computed(() => Object.keys(statistics.value).length === 0),\n displayedData,\n updateDisplayData,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n .start-chart {\n .chart-radio {\n display: flex;\n justify-content: space-between;\n padding: $default-padding;\n\n label {\n font-size: 0.85em;\n font-weight: normal;\n }\n }\n }\n</style>\n","<template>\n <div class=\"chart\">\n <BarChart v-bind=\"barChartProps\" class=\"bar-chart\" />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ChartData, ChartOptions, LayoutItem } from 'chart.js'\n import { ComputedRef, PropType, computed, defineComponent } from 'vue'\n import { BarChart, useBarChart } from 'vue-chart-3'\n import { useI18n } from 'vue-i18n'\n\n import { IChartDataset } from '@/types/chart'\n import { TStatisticsDatasetKeys } from '@/types/statistics'\n import { formatTooltipValue } from '@/utils/tooltip'\n\n export default defineComponent({\n name: 'Chart',\n components: {\n BarChart,\n },\n props: {\n datasets: {\n type: Object as PropType<IChartDataset[]>,\n required: true,\n },\n labels: {\n type: Object as PropType<unknown[]>,\n required: true,\n },\n displayedData: {\n type: String as PropType<TStatisticsDatasetKeys>,\n required: true,\n },\n displayedSportIds: {\n type: Array as PropType<number[]>,\n required: true,\n },\n fullStats: {\n type: Boolean,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function getNumber(value: any): number {\n return isNaN(value) ? 0 : +value\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function getSum(total: any, value: any): number {\n return getNumber(total) + getNumber(value)\n }\n let chartData: ComputedRef<ChartData<'bar'>> = computed(() => ({\n labels: props.labels,\n // workaround to avoid dataset modification\n datasets: JSON.parse(JSON.stringify(props.datasets)),\n }))\n const options = computed<ChartOptions<'bar'>>(() => ({\n responsive: true,\n maintainAspectRatio: true,\n animation: false,\n layout: {\n padding: {\n top: props.fullStats ? 40 : 22,\n },\n },\n scales: {\n x: {\n stacked: true,\n grid: {\n drawOnChartArea: false,\n },\n },\n y: {\n stacked: true,\n grid: {\n drawOnChartArea: false,\n },\n ticks: {\n maxTicksLimit: 6,\n callback: function (value) {\n return formatTooltipValue(props.displayedData, +value, false)\n },\n },\n afterFit: function (scale: LayoutItem) {\n scale.width = props.fullStats ? 75 : 60\n },\n },\n },\n plugins: {\n datalabels: {\n anchor: 'end',\n align: 'end',\n rotation: function (context) {\n return props.fullStats && context.chart.chartArea.width < 580\n ? 310\n : 0\n },\n display: function (context) {\n return !(props.fullStats && context.chart.chartArea.width < 300)\n },\n formatter: function (value, context) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const total: number = context.chart.data.datasets\n .map((d) => d.data[context.dataIndex])\n .reduce((total, value) => getSum(total, value), 0)\n return context.datasetIndex ===\n props.displayedSportIds.length - 1 && total > 0\n ? formatTooltipValue(props.displayedData, total, false)\n : null\n },\n },\n legend: {\n display: false,\n },\n tooltip: {\n interaction: {\n intersect: true,\n mode: 'index',\n },\n filter: function (tooltipItem) {\n return tooltipItem.formattedValue !== '0'\n },\n callbacks: {\n label: function (context) {\n let label = t(`sports.${context.dataset.label}.LABEL`) || ''\n if (label) {\n label += ': '\n }\n if (context.parsed.y !== null) {\n label += formatTooltipValue(\n props.displayedData,\n context.parsed.y\n )\n }\n return label\n },\n footer: function (tooltipItems) {\n let sum = 0\n tooltipItems.map((tooltipItem) => {\n sum += tooltipItem.parsed.y\n })\n return (\n `${t('common.TOTAL')}: ` +\n formatTooltipValue(props.displayedData, sum)\n )\n },\n },\n },\n },\n }))\n const { barChartProps } = useBarChart({\n chartData,\n options,\n })\n return { barChartProps }\n },\n })\n</script>\n","export const formatDuration = (\n totalSeconds: number,\n formatWithUnits = false\n): string => {\n let days = '0'\n if (formatWithUnits) {\n days = String(Math.floor(totalSeconds / 86400))\n totalSeconds %= 86400\n }\n const hours = String(Math.floor(totalSeconds / 3600)).padStart(2, '0')\n totalSeconds %= 3600\n const minutes = String(Math.floor(totalSeconds / 60)).padStart(2, '0')\n const seconds = String(totalSeconds % 60).padStart(2, '0')\n if (formatWithUnits) {\n return `${days === '0' ? '' : `${days}d `}${\n hours === '00' ? '' : `${hours}h `\n }${minutes}m ${seconds}s`\n }\n return `${hours === '00' ? '' : `${hours}:`}${minutes}:${seconds}`\n}\n","import { TStatisticsDatasetKeys } from '@/types/statistics'\nimport { formatDuration } from '@/utils/duration'\n\nexport const formatTooltipValue = (\n displayedData: TStatisticsDatasetKeys,\n value: number,\n formatWithUnits = true\n): string => {\n return displayedData === 'total_duration'\n ? formatDuration(value, formatWithUnits)\n : displayedData === 'total_distance'\n ? value.toFixed(2) + ' km'\n : value.toString()\n}\n","\n import { ChartData, ChartOptions, LayoutItem } from 'chart.js'\n import { ComputedRef, PropType, computed, defineComponent } from 'vue'\n import { BarChart, useBarChart } from 'vue-chart-3'\n import { useI18n } from 'vue-i18n'\n\n import { IChartDataset } from '@/types/chart'\n import { TStatisticsDatasetKeys } from '@/types/statistics'\n import { formatTooltipValue } from '@/utils/tooltip'\n\n export default defineComponent({\n name: 'Chart',\n components: {\n BarChart,\n },\n props: {\n datasets: {\n type: Object as PropType<IChartDataset[]>,\n required: true,\n },\n labels: {\n type: Object as PropType<unknown[]>,\n required: true,\n },\n displayedData: {\n type: String as PropType<TStatisticsDatasetKeys>,\n required: true,\n },\n displayedSportIds: {\n type: Array as PropType<number[]>,\n required: true,\n },\n fullStats: {\n type: Boolean,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function getNumber(value: any): number {\n return isNaN(value) ? 0 : +value\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function getSum(total: any, value: any): number {\n return getNumber(total) + getNumber(value)\n }\n let chartData: ComputedRef<ChartData<'bar'>> = computed(() => ({\n labels: props.labels,\n // workaround to avoid dataset modification\n datasets: JSON.parse(JSON.stringify(props.datasets)),\n }))\n const options = computed<ChartOptions<'bar'>>(() => ({\n responsive: true,\n maintainAspectRatio: true,\n animation: false,\n layout: {\n padding: {\n top: props.fullStats ? 40 : 22,\n },\n },\n scales: {\n x: {\n stacked: true,\n grid: {\n drawOnChartArea: false,\n },\n },\n y: {\n stacked: true,\n grid: {\n drawOnChartArea: false,\n },\n ticks: {\n maxTicksLimit: 6,\n callback: function (value) {\n return formatTooltipValue(props.displayedData, +value, false)\n },\n },\n afterFit: function (scale: LayoutItem) {\n scale.width = props.fullStats ? 75 : 60\n },\n },\n },\n plugins: {\n datalabels: {\n anchor: 'end',\n align: 'end',\n rotation: function (context) {\n return props.fullStats && context.chart.chartArea.width < 580\n ? 310\n : 0\n },\n display: function (context) {\n return !(props.fullStats && context.chart.chartArea.width < 300)\n },\n formatter: function (value, context) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const total: number = context.chart.data.datasets\n .map((d) => d.data[context.dataIndex])\n .reduce((total, value) => getSum(total, value), 0)\n return context.datasetIndex ===\n props.displayedSportIds.length - 1 && total > 0\n ? formatTooltipValue(props.displayedData, total, false)\n : null\n },\n },\n legend: {\n display: false,\n },\n tooltip: {\n interaction: {\n intersect: true,\n mode: 'index',\n },\n filter: function (tooltipItem) {\n return tooltipItem.formattedValue !== '0'\n },\n callbacks: {\n label: function (context) {\n let label = t(`sports.${context.dataset.label}.LABEL`) || ''\n if (label) {\n label += ': '\n }\n if (context.parsed.y !== null) {\n label += formatTooltipValue(\n props.displayedData,\n context.parsed.y\n )\n }\n return label\n },\n footer: function (tooltipItems) {\n let sum = 0\n tooltipItems.map((tooltipItem) => {\n sum += tooltipItem.parsed.y\n })\n return (\n `${t('common.TOTAL')}: ` +\n formatTooltipValue(props.displayedData, sum)\n )\n },\n },\n },\n },\n }))\n const { barChartProps } = useBarChart({\n chartData,\n options,\n })\n return { barChartProps }\n },\n })\n","import { render } from \"./Chart.vue?vue&type=template&id=1e15ee41\"\nimport script from \"./Chart.vue?vue&type=script&lang=ts\"\nexport * from \"./Chart.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","\n import { format } from 'date-fns'\n import {\n ComputedRef,\n PropType,\n Ref,\n computed,\n defineComponent,\n ref,\n watch,\n onBeforeMount,\n } from 'vue'\n\n import Chart from '@/components/Common/StatsChart/Chart.vue'\n import { STATS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import {\n IStatisticsChartData,\n TStatisticsDatasetKeys,\n IStatisticsDateParams,\n TStatisticsFromApi,\n IStatisticsParams,\n } from '@/types/statistics'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n import { formatStats } from '@/utils/statistics'\n\n export default defineComponent({\n name: 'UserMonthStats',\n components: {\n Chart,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n chartParams: {\n type: Object as PropType<IStatisticsDateParams>,\n required: true,\n },\n displayedSportIds: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n fullStats: {\n type: Boolean,\n default: false,\n },\n hideChartIfNoData: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const store = useStore()\n\n let displayedData: Ref<TStatisticsDatasetKeys> = ref('total_distance')\n const statistics: ComputedRef<TStatisticsFromApi> = computed(\n () => store.getters[STATS_STORE.GETTERS.USER_STATS]\n )\n const formattedStats: ComputedRef<IStatisticsChartData> = computed(() =>\n formatStats(\n props.chartParams,\n props.user.weekm,\n props.sports,\n props.displayedSportIds,\n statistics.value\n )\n )\n\n onBeforeMount(() =>\n getStatistics(getApiParams(props.chartParams, props.user))\n )\n\n function getStatistics(apiParams: IStatisticsParams) {\n store.dispatch(STATS_STORE.ACTIONS.GET_USER_STATS, {\n username: props.user.username,\n filterType: 'by_time',\n params: apiParams,\n })\n }\n function updateDisplayData(\n event: Event & {\n target: HTMLInputElement & { name: TStatisticsDatasetKeys }\n }\n ) {\n displayedData.value = event.target.name\n }\n function getApiParams(\n chartParams: IStatisticsDateParams,\n user: IUserProfile\n ): IStatisticsParams {\n return {\n from: format(chartParams.start, 'yyyy-MM-dd'),\n to: format(chartParams.end, 'yyyy-MM-dd'),\n time:\n chartParams.duration === 'week'\n ? `week${user.weekm ? 'm' : ''}`\n : chartParams.duration,\n }\n }\n\n watch(\n () => props.chartParams,\n async (newParams) => {\n getStatistics(getApiParams(newParams, props.user))\n }\n )\n\n return {\n datasets: computed(\n () => formattedStats.value.datasets[displayedData.value]\n ),\n labels: computed(() => formattedStats.value.labels),\n emptyStats: computed(() => Object.keys(statistics.value).length === 0),\n displayedData,\n updateDisplayData,\n }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=6eb9bb83&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=6eb9bb83&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-6eb9bb83\"\n\nexport default script","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n"],"sourceRoot":""}