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AAM,IACToG,EAAAA,EAAAA,GAAoB,OAAQ,MAAMH,EAAAA,EAAAA,IAAiBd,EAAKe,GAAG,YAAYs0B,EAAcx6B,MAAQ,UAAY,mBAAoB,QAGjIoG,EAAAA,EAAAA,GAAoB,MAAOlK,GAAY,EACrC4J,EAAAA,EAAAA,IAAa80B,GAAc,CACzBzC,MAAMtyB,EAAAA,EAAAA,IAAOjH,GACbC,QAAQgH,EAAAA,EAAAA,IAAOhG,IACd,KAAM,EAAG,CAAC,OAAQ,mBAI3B8G,EAAAA,EAAAA,IAAoB,IAAI,EAE9B,ICzEA,MAAM,IAA2B,OAAgB,GAAQ,CAAC,CAAC,YAAY,qBAEvE,S","sources":["webpack://fittrackee_client/./src/components/Workout/WorkoutEdition.vue?1df7","webpack://fittrackee_client/./src/components/Workout/WorkoutEdition.vue","webpack://fittrackee_client/./src/views/workouts/AddWorkout.vue?212d","webpack://fittrackee_client/./src/views/workouts/AddWorkout.vue","webpack://fittrackee_client/./src/views/workouts/EditWorkout.vue?ba9e","webpack://fittrackee_client/./src/views/workouts/EditWorkout.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutCardTitle.vue?4e0b","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutCardTitle.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutRecord.vue?0a89","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutRecord.vue","webpack://fittrackee_client/./src/utils/weather.ts","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WeatherWind.vue?bd35","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WeatherWind.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutWeather.vue?84e1","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutWeather.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutData.vue?ef29","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutData.vue","webpack://fittrackee_client/./node_modules/@tmcw/togeojson/dist/togeojson.es.mjs","webpack://fittrackee_client/./node_modules/@vue-leaflet/vue-leaflet/dist/vue-leaflet.es.js","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue?3193","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/index.vue?a62d","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/index.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/index.vue?8ebb","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/index.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/legend.ts","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/index.vue?65aa","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/index.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutNotes.vue?a827","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutNotes.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutSegments.vue?037e","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutSegments.vue","webpack://fittrackee_client/./src/views/workouts/Workout.vue?3305","webpack://fittrackee_client/./src/views/workouts/Workout.vue","webpack://fittrackee_client/./src/components/Workouts/WorkoutsFilters.vue?c3bc","webpack://fittrackee_client/./src/components/Workouts/WorkoutsFilters.vue","webpack://fittrackee_client/./src/components/Workouts/WorkoutsList.vue?72e6","webpack://fittrackee_client/./src/components/Workouts/WorkoutsList.vue","webpack://fittrackee_client/./src/views/workouts/WorkoutsView.vue?ee31","webpack://fittrackee_client/./src/views/workouts/WorkoutsView.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, vModelSelect as _vModelSelect, withDirectives as _withDirectives, vModelText as _vModelText, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, createVNode as _createVNode, createBlock as _createBlock, withModifiers as _withModifiers, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-402915dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-form\" }\nconst _hoisted_2 = [\"onSubmit\"]\nconst _hoisted_3 = { class: \"form-items\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"form-item-radio\"\n}\nconst _hoisted_5 = [\"checked\", \"disabled\"]\nconst _hoisted_6 = { for: \"withGpx\" }\nconst _hoisted_7 = [\"checked\", \"disabled\"]\nconst _hoisted_8 = { for: \"withoutGpx\" }\nconst _hoisted_9 = { class: \"form-item\" }\nconst _hoisted_10 = [\"disabled\"]\nconst _hoisted_11 = [\"value\"]\nconst _hoisted_12 = {\n key: 1,\n class: \"form-item\"\n}\nconst _hoisted_13 = { for: \"gpxFile\" }\nconst _hoisted_14 = [\"disabled\"]\nconst _hoisted_15 = { class: \"files-help info-box\" }\nconst _hoisted_16 = {\n key: 2,\n class: \"form-item\"\n}\nconst _hoisted_17 = { for: \"title\" }\nconst _hoisted_18 = [\"required\", \"disabled\"]\nconst _hoisted_19 = { key: 3 }\nconst _hoisted_20 = { class: \"workout-date-duration\" }\nconst _hoisted_21 = { class: \"form-item\" }\nconst _hoisted_22 = { class: \"workout-date-time\" }\nconst _hoisted_23 = [\"disabled\"]\nconst _hoisted_24 = [\"disabled\"]\nconst _hoisted_25 = { class: \"form-item\" }\nconst _hoisted_26 = [\"disabled\"]\nconst _hoisted_27 = [\"disabled\"]\nconst _hoisted_28 = [\"disabled\"]\nconst _hoisted_29 = { class: \"workout-data\" }\nconst _hoisted_30 = { class: \"form-item\" }\nconst _hoisted_31 = [\"disabled\"]\nconst _hoisted_32 = { class: \"form-item\" }\nconst _hoisted_33 = [\"disabled\"]\nconst _hoisted_34 = { class: \"form-item\" }\nconst _hoisted_35 = [\"disabled\"]\nconst _hoisted_36 = { class: \"form-item\" }\nconst _hoisted_37 = { key: 1 }\nconst _hoisted_38 = {\n key: 2,\n class: \"form-buttons\"\n}\nconst _hoisted_39 = [\"disabled\"]\nconst _hoisted_40 = [\"onClick\"]\n\nimport {\n ComputedRef,\n Ref,\n computed,\n reactive,\n ref,\n toRefs,\n watch,\n onMounted,\n onUnmounted,\n withDefaults,\n } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useRouter } from 'vue-router'\n\n import { ROOT_STORE, WORKOUTS_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkout, IWorkoutForm } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { formatWorkoutDate, getDateWithTZ } from '@/utils/dates'\n import { getReadableFileSize } from '@/utils/files'\n import { translateSports } from '@/utils/sports'\n import { convertDistance } from '@/utils/units'\n\n interface Props {\n authUser: IAuthUserProfile\n sports: ISport[]\n isCreation?: boolean\n loading?: boolean\n workout?: IWorkout\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutEdition',\n props: {\n authUser: null,\n sports: null,\n isCreation: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n workout: { default: () => ({} as IWorkout) }\n },\n setup(__props: any) {\n\nconst props = __props as { authUser: IAuthUserProfile, sports: ISport[], isCreation: boolean, loading: boolean, workout: IWorkout };\n\n \n\n const { t } = useI18n()\n const store = useStore()\n const router = useRouter()\n\n const { authUser, workout, isCreation, loading } = toRefs(props)\n const translatedSports: ComputedRef = computed(() =>\n translateSports(\n props.sports,\n t,\n 'is_active_for_user',\n workout.value.id ? [workout.value.sport_id] : []\n )\n )\n const appConfig: ComputedRef = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const fileSizeLimit = appConfig.value.max_single_file_size\n ? getReadableFileSize(appConfig.value.max_single_file_size)\n : ''\n const gpx_limit_import = appConfig.value.gpx_limit_import\n const zipSizeLimit = appConfig.value.max_zip_file_size\n ? getReadableFileSize(appConfig.value.max_zip_file_size)\n : ''\n const errorMessages: ComputedRef = computed(\n () => store.getters[ROOT_STORE.GETTERS.ERROR_MESSAGES]\n )\n const workoutForm = reactive({\n sport_id: '',\n title: '',\n notes: '',\n workoutDate: '',\n workoutTime: '',\n workoutDurationHour: '',\n workoutDurationMinutes: '',\n workoutDurationSeconds: '',\n workoutDistance: '',\n workoutAscent: '',\n workoutDescent: '',\n })\n const withGpx = ref(\n workout.value.id ? workout.value.with_gpx : isCreation.value\n )\n let gpxFile: File | null = null\n const formErrors = ref(false)\n const payloadErrorMessages: Ref = ref([])\n\n onMounted(() => {\n let element\n if (props.workout.id) {\n formatWorkoutForm(props.workout)\n element = document.getElementById('sport')\n } else {\n element = document.getElementById('withGpx')\n }\n if (element) {\n element.focus()\n }\n })\n\n function updateNotes(value: string) {\n workoutForm.notes = value\n }\n function updateWithGpx() {\n withGpx.value = !withGpx.value\n formErrors.value = false\n }\n function updateFile(event: Event & { target: HTMLInputElement }) {\n if (event.target.files) {\n gpxFile = event.target.files[0]\n }\n }\n function formatWorkoutForm(workout: IWorkout) {\n workoutForm.sport_id = `${workout.sport_id}`\n workoutForm.title = workout.title\n workoutForm.notes = workout.notes\n if (!workout.with_gpx) {\n const workoutDateTime = formatWorkoutDate(\n getDateWithTZ(workout.workout_date, props.authUser.timezone),\n 'yyyy-MM-dd'\n )\n const duration = workout.duration.split(':')\n workoutForm.workoutDistance = `${\n authUser.value.imperial_units\n ? convertDistance(workout.distance, 'km', 'mi', 3)\n : parseFloat(workout.distance.toFixed(3))\n }`\n workoutForm.workoutDate = workoutDateTime.workout_date\n workoutForm.workoutTime = workoutDateTime.workout_time\n workoutForm.workoutDurationHour = duration[0]\n workoutForm.workoutDurationMinutes = duration[1]\n workoutForm.workoutDurationSeconds = duration[2]\n workoutForm.workoutAscent =\n workout.ascent === null\n ? ''\n : `${\n authUser.value.imperial_units\n ? convertDistance(workout.ascent, 'm', 'ft', 2)\n : parseFloat(workout.ascent.toFixed(2))\n }`\n workoutForm.workoutDescent =\n workout.descent === null\n ? ''\n : `${\n authUser.value.imperial_units\n ? convertDistance(workout.descent, 'm', 'ft', 2)\n : parseFloat(workout.descent.toFixed(2))\n }`\n }\n }\n function isDistanceInvalid() {\n return payloadErrorMessages.value.includes('workouts.INVALID_DISTANCE')\n }\n function isDurationInvalid() {\n return payloadErrorMessages.value.includes('workouts.INVALID_DURATION')\n }\n function isElevationInvalid() {\n return payloadErrorMessages.value.includes(\n 'workouts.INVALID_ASCENT_OR_DESCENT'\n )\n }\n function formatPayload(payload: IWorkoutForm) {\n payloadErrorMessages.value = []\n payload.title = workoutForm.title\n payload.duration =\n +workoutForm.workoutDurationHour * 3600 +\n +workoutForm.workoutDurationMinutes * 60 +\n +workoutForm.workoutDurationSeconds\n if (payload.duration <= 0) {\n payloadErrorMessages.value.push('workouts.INVALID_DURATION')\n }\n payload.distance = authUser.value.imperial_units\n ? convertDistance(+workoutForm.workoutDistance, 'mi', 'km', 3)\n : +workoutForm.workoutDistance\n if (payload.distance <= 0) {\n payloadErrorMessages.value.push('workouts.INVALID_DISTANCE')\n }\n payload.workout_date = `${workoutForm.workoutDate} ${workoutForm.workoutTime}`\n payload.ascent =\n workoutForm.workoutAscent === ''\n ? null\n : authUser.value.imperial_units\n ? convertDistance(+workoutForm.workoutAscent, 'ft', 'm', 3)\n : +workoutForm.workoutAscent\n payload.descent =\n workoutForm.workoutDescent === ''\n ? null\n : authUser.value.imperial_units\n ? convertDistance(+workoutForm.workoutDescent, 'ft', 'm', 3)\n : +workoutForm.workoutDescent\n if (\n (payload.ascent !== null && payload.descent === null) ||\n (payload.ascent === null && payload.descent !== null)\n ) {\n payloadErrorMessages.value.push('workouts.INVALID_ASCENT_OR_DESCENT')\n }\n }\n function updateWorkout() {\n const payload: IWorkoutForm = {\n sport_id: +workoutForm.sport_id,\n notes: workoutForm.notes,\n }\n if (props.workout.id) {\n if (props.workout.with_gpx) {\n payload.title = workoutForm.title\n } else {\n formatPayload(payload)\n }\n if (payloadErrorMessages.value.length > 0) {\n store.commit(\n ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,\n payloadErrorMessages.value\n )\n } else {\n store.dispatch(WORKOUTS_STORE.ACTIONS.EDIT_WORKOUT, {\n workoutId: props.workout.id,\n data: payload,\n })\n }\n } else {\n if (withGpx.value) {\n if (!gpxFile) {\n const errorMessage = 'workouts.NO_FILE_PROVIDED'\n store.commit(ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES, errorMessage)\n return\n }\n payload.file = gpxFile\n store.dispatch(WORKOUTS_STORE.ACTIONS.ADD_WORKOUT, payload)\n } else {\n formatPayload(payload)\n if (payloadErrorMessages.value.length > 0) {\n store.commit(\n ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,\n payloadErrorMessages.value\n )\n } else {\n store.dispatch(\n WORKOUTS_STORE.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,\n payload\n )\n }\n }\n }\n }\n function onCancel() {\n if (props.workout.id) {\n router.push({\n name: 'Workout',\n params: { workoutId: props.workout.id },\n })\n } else {\n router.go(-1)\n }\n }\n function invalidateForm() {\n formErrors.value = true\n }\n\n onUnmounted(() => store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES))\n\n watch(\n () => props.workout,\n async (\n newWorkout: IWorkout | undefined,\n previousWorkout: IWorkout | undefined\n ) => {\n if (newWorkout !== previousWorkout && newWorkout && newWorkout.id) {\n formatWorkoutForm(newWorkout)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_CustomTextArea = _resolveComponent(\"CustomTextArea\")!\n const _component_ErrorMessage = _resolveComponent(\"ErrorMessage\")!\n const _component_Loader = _resolveComponent(\"Loader\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n id: \"workout-edition\",\n class: _normalizeClass([\"center-card with-margin\", { 'center-form': _unref(workout) && _unref(workout).with_gpx }])\n }, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t(`workouts.${_unref(isCreation) ? 'ADD' : 'EDIT'}_WORKOUT`)), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"form\", {\n class: _normalizeClass({ errors: formErrors.value }),\n onSubmit: _withModifiers(updateWorkout, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_3, [\n (_unref(isCreation))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"input\", {\n id: \"withGpx\",\n type: \"radio\",\n checked: withGpx.value,\n disabled: _unref(loading),\n onClick: updateWithGpx\n }, null, 8, _hoisted_5),\n _createElementVNode(\"label\", _hoisted_6, _toDisplayString(_ctx.$t('workouts.WITH_GPX')), 1)\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"input\", {\n id: \"withoutGpx\",\n type: \"radio\",\n checked: !withGpx.value,\n disabled: _unref(loading),\n onClick: updateWithGpx\n }, null, 8, _hoisted_7),\n _createElementVNode(\"label\", _hoisted_8, _toDisplayString(_ctx.$t('workouts.WITHOUT_GPX')), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.SPORT', 1)) + \"*: \", 1),\n _withDirectives(_createElementVNode(\"select\", {\n id: \"sport\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((workoutForm.sport_id) = $event))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(translatedSports), (sport) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n value: sport.id,\n key: sport.id\n }, _toDisplayString(sport.translatedLabel), 9, _hoisted_11))\n }), 128))\n ], 40, _hoisted_10), [\n [_vModelSelect, workoutForm.sport_id]\n ])\n ]),\n (_unref(isCreation) && withGpx.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createElementVNode(\"label\", _hoisted_13, _toDisplayString(_ctx.$t('workouts.GPX_FILE')) + \" \" + _toDisplayString(_ctx.$t('workouts.ZIP_ARCHIVE_DESCRIPTION')) + \"*: \", 1),\n _createElementVNode(\"input\", {\n id: \"gpxFile\",\n name: \"gpxFile\",\n type: \"file\",\n accept: \".gpx, .zip\",\n disabled: _unref(loading),\n required: \"\",\n onInvalid: invalidateForm,\n onInput: updateFile\n }, null, 40, _hoisted_14),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('workouts.GPX_FILE')) + \":\", 1),\n _createElementVNode(\"ul\", null, [\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_SIZE')) + \": \" + _toDisplayString(_unref(fileSizeLimit)), 1)\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('workouts.ZIP_ARCHIVE')) + \":\", 1),\n _createElementVNode(\"ul\", null, [\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.NO_FOLDER')), 1),\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_FILES')) + \": \" + _toDisplayString(_unref(gpx_limit_import)), 1),\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_SIZE')) + \": \" + _toDisplayString(_unref(zipSizeLimit)), 1)\n ])\n ])\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_16, [\n _createElementVNode(\"label\", _hoisted_17, _toDisplayString(_ctx.$t('workouts.TITLE')) + \": \", 1),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"title\",\n name: \"title\",\n type: \"text\",\n required: !_unref(isCreation),\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((workoutForm.title) = $event))\n }, null, 40, _hoisted_18), [\n [_vModelText, workoutForm.title]\n ])\n ])),\n (!withGpx.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"div\", _hoisted_21, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.WORKOUT_DATE')) + \"*:\", 1),\n _createElementVNode(\"div\", _hoisted_22, [\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-date\",\n name: \"workout-date\",\n type: \"date\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => ((workoutForm.workoutDate) = $event))\n }, null, 40, _hoisted_23), [\n [_vModelText, workoutForm.workoutDate]\n ]),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-time\",\n name: \"workout-time\",\n class: \"workout-time\",\n type: \"time\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => ((workoutForm.workoutTime) = $event))\n }, null, 40, _hoisted_24), [\n [_vModelText, workoutForm.workoutTime]\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DURATION')) + \"*:\", 1),\n _createElementVNode(\"div\", null, [\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-hour\",\n name: \"workout-duration-hour\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n placeholder: \"HH\",\n minlength: \"1\",\n maxlength: \"2\",\n pattern: \"^([0-1]?[0-9]|2[0-3])$\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((workoutForm.workoutDurationHour) = $event))\n }, null, 42, _hoisted_26), [\n [_vModelText, workoutForm.workoutDurationHour]\n ]),\n _createTextVNode(\" : \"),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-minutes\",\n name: \"workout-duration-minutes\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n pattern: \"^([0-5][0-9])$\",\n minlength: \"2\",\n maxlength: \"2\",\n placeholder: \"MM\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => ((workoutForm.workoutDurationMinutes) = $event))\n }, null, 42, _hoisted_27), [\n [_vModelText, workoutForm.workoutDurationMinutes]\n ]),\n _createTextVNode(\" : \"),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-seconds\",\n name: \"workout-duration-seconds\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n pattern: \"^([0-5][0-9])$\",\n minlength: \"2\",\n maxlength: \"2\",\n placeholder: \"SS\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((workoutForm.workoutDurationSeconds) = $event))\n }, null, 42, _hoisted_28), [\n [_vModelText, workoutForm.workoutDurationSeconds]\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_29, [\n _createElementVNode(\"div\", _hoisted_30, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \" (\" + _toDisplayString(_unref(authUser).imperial_units ? 'mi' : 'km') + \")*: \", 1),\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass({ errored: isDistanceInvalid() }),\n name: \"workout-distance\",\n type: \"number\",\n min: \"0\",\n step: \"0.001\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((workoutForm.workoutDistance) = $event))\n }, null, 42, _hoisted_31), [\n [_vModelText, workoutForm.workoutDistance]\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_32, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.ASCENT')) + \" (\" + _toDisplayString(_unref(authUser).imperial_units ? 'ft' : 'm') + \"): \", 1),\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass({ errored: isElevationInvalid() }),\n name: \"workout-ascent\",\n type: \"number\",\n min: \"0\",\n step: \"0.01\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[8] || (_cache[8] = ($event: any) => ((workoutForm.workoutAscent) = $event))\n }, null, 42, _hoisted_33), [\n [_vModelText, workoutForm.workoutAscent]\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_34, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DESCENT')) + \" (\" + _toDisplayString(_unref(authUser).imperial_units ? 'ft' : 'm') + \"): \", 1),\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass({ errored: isElevationInvalid() }),\n name: \"workout-descent\",\n type: \"number\",\n min: \"0\",\n step: \"0.01\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[9] || (_cache[9] = ($event: any) => ((workoutForm.workoutDescent) = $event))\n }, null, 42, _hoisted_35), [\n [_vModelText, workoutForm.workoutDescent]\n ])\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_36, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.NOTES')) + \": \", 1),\n _createVNode(_component_CustomTextArea, {\n name: \"notes\",\n input: workoutForm.notes,\n disabled: _unref(loading),\n onUpdateValue: updateNotes\n }, null, 8, [\"input\", \"disabled\"])\n ])\n ]),\n (_unref(errorMessages))\n ? (_openBlock(), _createBlock(_component_ErrorMessage, {\n key: 0,\n message: _unref(errorMessages)\n }, null, 8, [\"message\"]))\n : _createCommentVNode(\"\", true),\n (_unref(loading))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_37, [\n _createVNode(_component_Loader)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_38, [\n _createElementVNode(\"button\", {\n class: \"confirm\",\n type: \"submit\",\n disabled: _unref(loading)\n }, _toDisplayString(_ctx.$t('buttons.SUBMIT')), 9, _hoisted_39),\n _createElementVNode(\"button\", {\n class: \"cancel\",\n onClick: _withModifiers(onCancel, [\"prevent\"])\n }, _toDisplayString(_ctx.$t('buttons.CANCEL')), 9, _hoisted_40)\n ]))\n ], 42, _hoisted_2)\n ])\n ]),\n _: 1\n })\n ], 2))\n}\n}\n\n})","import script from \"./WorkoutEdition.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutEdition.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutEdition.vue?vue&type=style&index=0&id=402915dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-402915dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n id: \"add-workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\n\nimport { ComputedRef, computed } from 'vue'\n\n import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'AddWorkout',\n setup(__props) {\n\n const store = useStore()\n\n const sports: ComputedRef = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const authUser: ComputedRef = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const workoutData: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(WorkoutEdition, {\n authUser: _unref(authUser),\n sports: _unref(sports),\n isCreation: true,\n loading: _unref(workoutData).loading\n }, null, 8, [\"authUser\", \"sports\", \"loading\"])\n ])\n ]))\n}\n}\n\n})","import script from \"./AddWorkout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./AddWorkout.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n id: \"edit-workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\n\nimport { computed, watch, onBeforeMount, ComputedRef } from 'vue'\n import { useRoute } from 'vue-router'\n\n import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditWorkout',\n setup(__props) {\n\n const route = useRoute()\n const store = useStore()\n\n const authUser: ComputedRef = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const workoutData: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n\n onBeforeMount(() => {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, {\n workoutId: route.params.workoutId,\n })\n })\n\n watch(\n () => route.params.workoutId,\n async (newWorkoutId) => {\n if (!newWorkoutId) {\n store.commit(WORKOUTS_STORE.MUTATIONS.EMPTY_WORKOUT)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(workoutData).workout.id)\n ? (_openBlock(), _createBlock(WorkoutEdition, {\n key: 0,\n authUser: _unref(authUser),\n sports: _unref(sports),\n workout: _unref(workoutData).workout,\n loading: _unref(workoutData).loading\n }, null, 8, [\"authUser\", \"sports\", \"workout\", \"loading\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./EditWorkout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./EditWorkout.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, withModifiers as _withModifiers, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-40df61be\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-card-title\" }\nconst _hoisted_2 = [\"disabled\", \"title\"]\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-chevron-left\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_4 = [\n _hoisted_3\n]\nconst _hoisted_5 = { class: \"workout-card-title\" }\nconst _hoisted_6 = { class: \"workout-title-date\" }\nconst _hoisted_7 = {\n key: 0,\n class: \"workout-title\"\n}\nconst _hoisted_8 = [\"aria-label\"]\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-edit\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_10 = [\n _hoisted_9\n]\nconst _hoisted_11 = [\"aria-label\"]\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-download\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_13 = [\n _hoisted_12\n]\nconst _hoisted_14 = [\"onClick\", \"aria-label\"]\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-trash\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_16 = [\n _hoisted_15\n]\nconst _hoisted_17 = {\n key: 1,\n class: \"workout-title\"\n}\nconst _hoisted_18 = { class: \"workout-segment\" }\nconst _hoisted_19 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-map-marker\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_20 = { class: \"workout-date\" }\nconst _hoisted_21 = { class: \"workout-link\" }\nconst _hoisted_22 = [\"disabled\", \"title\"]\nconst _hoisted_23 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-chevron-right\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_24 = [\n _hoisted_23\n]\n\nimport { toRefs } from 'vue'\n\n import authApi from '@/api/authApi'\n import { ISport } from '@/types/sports'\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n sport: ISport\n workoutObject: IWorkoutObject\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutCardTitle',\n props: {\n sport: null,\n workoutObject: null\n },\n emits: ['displayModal'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n sport: ISport\n workoutObject: IWorkoutObject\n };\n\n \n\n \n\n const { sport, workoutObject } = toRefs(props)\n\n async function downloadGpx(workoutId: string) {\n await authApi\n .get(`workouts/${workoutId}/gpx/download`, {\n responseType: 'blob',\n })\n .then((response) => {\n const gpxFileUrl = window.URL.createObjectURL(\n new Blob([response.data], { type: 'application/gpx+xml' })\n )\n const gpxLink = document.createElement('a')\n gpxLink.href = gpxFileUrl\n gpxLink.setAttribute('download', `${workoutId}.gpx`)\n document.body.appendChild(gpxLink)\n gpxLink.click()\n })\n }\n function displayDeleteModal() {\n emit('displayModal', true)\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_SportImage = _resolveComponent(\"SportImage\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"button\", {\n class: _normalizeClass([\"workout-previous workout-arrow transparent\", { inactive: !_unref(workoutObject).previousUrl }]),\n disabled: !_unref(workoutObject).previousUrl,\n title: \n _unref(workoutObject).previousUrl\n ? _ctx.$t(`workouts.PREVIOUS_${_unref(workoutObject).type}`)\n : _ctx.$t(`workouts.NO_PREVIOUS_${_unref(workoutObject).type}`)\n ,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (\n _unref(workoutObject).previousUrl\n ? _ctx.$router.push(_unref(workoutObject).previousUrl)\n : null\n ))\n }, _hoisted_4, 10, _hoisted_2),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(_component_SportImage, {\n \"sport-label\": _unref(sport).label,\n color: _unref(sport).color\n }, null, 8, [\"sport-label\", \"color\"]),\n _createElementVNode(\"div\", _hoisted_6, [\n (_unref(workoutObject).type === 'WORKOUT')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createElementVNode(\"span\", null, _toDisplayString(_unref(workoutObject).title), 1),\n _createElementVNode(\"button\", {\n class: \"transparent icon-button\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (\n _ctx.$router.push({\n name: 'EditWorkout',\n params: { workoutId: _unref(workoutObject).workoutId },\n })\n )),\n \"aria-label\": _ctx.$t(`workouts.EDIT_WORKOUT`)\n }, _hoisted_10, 8, _hoisted_8),\n (_unref(workoutObject).with_gpx)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"transparent icon-button\",\n onClick: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (downloadGpx(_unref(workoutObject).workoutId)), [\"prevent\"])),\n \"aria-label\": _ctx.$t(`workouts.DOWNLOAD_WORKOUT`)\n }, _hoisted_13, 8, _hoisted_11))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n id: \"delete-workout-button\",\n class: \"transparent icon-button\",\n onClick: _withModifiers(displayDeleteModal, [\"prevent\"]),\n \"aria-label\": _ctx.$t(`workouts.DELETE_WORKOUT`)\n }, _hoisted_16, 8, _hoisted_14)\n ]))\n : (_unref(workoutObject).segmentId !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, [\n _createTextVNode(_toDisplayString(_unref(workoutObject).title) + \" \", 1),\n _createElementVNode(\"span\", _hoisted_18, [\n _createTextVNode(\" — \"),\n _hoisted_19,\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.SEGMENT')) + \" \" + _toDisplayString(_unref(workoutObject).segmentId + 1), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"time\", null, _toDisplayString(_unref(workoutObject).workoutDate) + \" - \" + _toDisplayString(_unref(workoutObject).workoutTime), 1),\n _createElementVNode(\"span\", _hoisted_21, [\n (_unref(workoutObject).type === 'SEGMENT')\n ? (_openBlock(), _createBlock(_component_router_link, {\n key: 0,\n to: {\n name: 'Workout',\n params: { workoutId: _unref(workoutObject).workoutId },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" > \" + _toDisplayString(_ctx.$t('workouts.BACK_TO_WORKOUT')), 1)\n ]),\n _: 1\n }, 8, [\"to\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"button\", {\n class: _normalizeClass([\"workout-next workout-arrow transparent\", { inactive: !_unref(workoutObject).nextUrl }]),\n disabled: !_unref(workoutObject).nextUrl,\n title: \n _unref(workoutObject).nextUrl\n ? _ctx.$t(`workouts.NEXT_${_unref(workoutObject).type}`)\n : _ctx.$t(`workouts.NO_NEXT_${_unref(workoutObject).type}`)\n ,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (\n _unref(workoutObject).nextUrl ? _ctx.$router.push(_unref(workoutObject).nextUrl) : null\n ))\n }, _hoisted_24, 10, _hoisted_22)\n ]))\n}\n}\n\n})","import script from \"./WorkoutCardTitle.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutCardTitle.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutCardTitle.vue?vue&type=style&index=0&id=40df61be&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-40df61be\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1a5282f6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"workout-record\"\n}\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"sup\", null, [\n /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-trophy\",\n \"aria-hidden\": \"true\"\n })\n], -1))\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nimport { toRefs } from 'vue'\n\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n recordType: string\n workoutObject: IWorkoutObject\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutRecord',\n props: {\n recordType: null,\n workoutObject: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n recordType: string\n workoutObject: IWorkoutObject\n };\n\n \n\n const { recordType, workoutObject } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (\n _unref(workoutObject).records &&\n _unref(workoutObject).records.find((record) => record.record_type === _unref(recordType))\n )\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, _hoisted_3))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutRecord.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutRecord.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutRecord.vue?vue&type=style&index=0&id=1a5282f6&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1a5282f6\"]])\n\nexport default __exports__","const directions = [\n 'N',\n 'NNE',\n 'NE',\n 'ENE',\n 'E',\n 'ESE',\n 'SE',\n 'SSE',\n 'S',\n 'SSW',\n 'SW',\n 'WSW',\n 'W',\n 'WNW',\n 'NW',\n 'NNW',\n]\n\nexport const convertDegreeToDirection = (angle: number): string => {\n const value = Math.floor(angle / 22.5 + 0.5)\n return directions[value % 16]\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-40697ed1\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"wind\" }\nconst _hoisted_2 = { class: \"wind-bearing\" }\nconst _hoisted_3 = [\"title\"]\n\nimport { toRefs } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IWeather } from '@/types/workouts'\n import { getWindSpeed } from '@/utils/units'\n import { convertDegreeToDirection } from '@/utils/weather'\n\n interface Props {\n weather: IWeather\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WeatherWind',\n props: {\n weather: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n weather: IWeather\n useImperialUnits: boolean\n };\n\n \n\n const { useImperialUnits, weather } = toRefs(props)\n const { t } = useI18n()\n\n function getWindDirectionTitle(windBearing: number): string {\n return t(\n `workouts.WEATHER.WIND_DIRECTIONS.${convertDegreeToDirection(\n windBearing\n )}`\n )\n }\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createTextVNode(_toDisplayString(_unref(getWindSpeed)(_unref(weather).wind, _unref(useImperialUnits))) + \" \", 1),\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(weather).windBearing)\n ? (_openBlock(), _createElementBlock(\"i\", {\n key: 0,\n class: \"fa fa-long-arrow-down\",\n style: _normalizeStyle({\n transform: `rotate(${_unref(weather).windBearing}deg)`,\n }),\n \"aria-hidden\": \"true\",\n title: getWindDirectionTitle(_unref(weather).windBearing)\n }, null, 12, _hoisted_3))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./WeatherWind.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WeatherWind.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WeatherWind.vue?vue&type=style&index=0&id=40697ed1&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-40697ed1\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-807b431a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n id: \"workout-weather\"\n}\nconst _hoisted_2 = { class: \"weather-table\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, null, -1))\nconst _hoisted_4 = { class: \"weather-th\" }\nconst _hoisted_5 = [\"src\", \"alt\", \"title\"]\nconst _hoisted_6 = { class: \"weather-th\" }\nconst _hoisted_7 = [\"src\", \"alt\", \"title\"]\nconst _hoisted_8 = [\"alt\", \"title\"]\nconst _hoisted_9 = [\"alt\", \"title\"]\nconst _hoisted_10 = [\"alt\", \"title\"]\n\nimport { toRefs } from 'vue'\n\n import WeatherWind from '@/components/Workout/WorkoutDetail/WeatherWind.vue'\n import { IWorkoutObject } from '@/types/workouts'\n import { getTemperature } from '@/utils/units'\n\n interface Props {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutWeather',\n props: {\n workoutObject: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n };\n\n \n\n const { useImperialUnits, workoutObject } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(workoutObject).weatherStart && _unref(workoutObject).weatherEnd)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"table\", _hoisted_2, [\n _createElementVNode(\"thead\", null, [\n _createElementVNode(\"tr\", null, [\n _hoisted_3,\n _createElementVNode(\"th\", null, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.START')) + \" \", 1),\n _createElementVNode(\"img\", {\n class: \"weather-img\",\n src: `/img/weather/${_unref(workoutObject).weatherStart.icon}.svg`,\n alt: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherStart.icon}`\n )\n ,\n title: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherStart.icon}`\n )\n \n }, null, 8, _hoisted_5)\n ])\n ]),\n _createElementVNode(\"th\", null, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.END')) + \" \", 1),\n _createElementVNode(\"img\", {\n class: \"weather-img\",\n src: `/img/weather/${_unref(workoutObject).weatherEnd.icon}.svg`,\n alt: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherEnd.icon}`\n )\n ,\n title: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherEnd.icon}`\n )\n \n }, null, 8, _hoisted_7)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"tbody\", null, [\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/temperature.svg\",\n alt: _ctx.$t(`workouts.WEATHER.TEMPERATURE`),\n title: _ctx.$t(`workouts.WEATHER.TEMPERATURE`)\n }, null, 8, _hoisted_8)\n ]),\n _createElementVNode(\"td\", null, _toDisplayString(_unref(getTemperature)(\n _unref(workoutObject).weatherStart.temperature,\n _unref(useImperialUnits)\n )), 1),\n _createElementVNode(\"td\", null, _toDisplayString(_unref(getTemperature)(\n _unref(workoutObject).weatherEnd.temperature,\n _unref(useImperialUnits)\n )), 1)\n ]),\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/pour-rain.svg\",\n alt: _ctx.$t(`workouts.WEATHER.HUMIDITY`),\n title: _ctx.$t(`workouts.WEATHER.HUMIDITY`)\n }, null, 8, _hoisted_9)\n ]),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherStart.humidity * 100).toFixed(1)) + \"% \", 1),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherEnd.humidity * 100).toFixed(1)) + \"% \", 1)\n ]),\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/breeze.svg\",\n alt: _ctx.$t(`workouts.WEATHER.WIND`),\n title: _ctx.$t(`workouts.WEATHER.WIND`)\n }, null, 8, _hoisted_10)\n ]),\n _createElementVNode(\"td\", null, [\n _createVNode(WeatherWind, {\n weather: _unref(workoutObject).weatherStart,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"weather\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", null, [\n _createVNode(WeatherWind, {\n weather: _unref(workoutObject).weatherEnd,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"weather\", \"useImperialUnits\"])\n ])\n ])\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutWeather.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutWeather.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutWeather.vue?vue&type=style&index=0&id=807b431a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-807b431a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, unref as _unref, createVNode as _createVNode, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2c41cfc8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-info\" }\nconst _hoisted_2 = { class: \"workout-data\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-clock-o\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_4 = { class: \"label\" }\nconst _hoisted_5 = { class: \"value\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = { class: \"value\" }\nconst _hoisted_8 = { class: \"value\" }\nconst _hoisted_9 = {\n key: 0,\n class: \"workout-data\"\n}\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-road\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_11 = { class: \"label\" }\nconst _hoisted_12 = {\n key: 1,\n class: \"workout-data\"\n}\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-tachometer\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_14 = { class: \"label\" }\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_16 = { class: \"label\" }\nconst _hoisted_17 = {\n key: 2,\n class: \"workout-data\"\n}\nconst _hoisted_18 = [\"alt\"]\nconst _hoisted_19 = { class: \"label\" }\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_21 = { class: \"label\" }\nconst _hoisted_22 = {\n key: 3,\n class: \"workout-data\"\n}\nconst _hoisted_23 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-location-arrow\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_24 = { class: \"label\" }\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_26 = { class: \"label\" }\n\nimport { computed, toRefs } from 'vue'\n\n import WorkoutRecord from '@/components/Workout/WorkoutDetail/WorkoutRecord.vue'\n import WorkoutWeather from '@/components/Workout/WorkoutDetail/WorkoutWeather.vue'\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n displayHARecord: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutData',\n props: {\n workoutObject: null,\n useImperialUnits: { type: Boolean },\n displayHARecord: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n displayHARecord: boolean\n };\n\n \n\n const { displayHARecord, workoutObject, useImperialUnits } = toRefs(props)\n const withPause = computed(\n () =>\n props.workoutObject.pauses !== '0:00:00' &&\n props.workoutObject.pauses !== null\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Distance = _resolveComponent(\"Distance\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"span\", _hoisted_4, _toDisplayString(_ctx.$t('workouts.DURATION')), 1),\n _createTextVNode(\": \"),\n _createElementVNode(\"span\", _hoisted_5, _toDisplayString(_unref(workoutObject).moving), 1),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"LD\"\n }, null, 8, [\"workoutObject\"]),\n (_unref(withPause))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createTextVNode(\" (\" + _toDisplayString(_ctx.$t('workouts.PAUSES')) + \": \", 1),\n _createElementVNode(\"span\", _hoisted_7, _toDisplayString(_unref(workoutObject).pauses), 1),\n _createTextVNode(\" - \" + _toDisplayString(_ctx.$t('workouts.TOTAL_DURATION')) + \": \", 1),\n _createElementVNode(\"span\", _hoisted_8, _toDisplayString(_unref(workoutObject).duration) + \")\", 1)\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n (_unref(workoutObject).distance !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n _hoisted_10,\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).distance,\n digits: 3,\n unitFrom: \"km\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"FD\"\n }, null, 8, [\"workoutObject\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_unref(workoutObject).aveSpeed !== null && _unref(workoutObject).maxSpeed !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _hoisted_13,\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(_ctx.$t('workouts.AVERAGE_SPEED')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).aveSpeed,\n unitFrom: \"km\",\n speed: true,\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"AS\"\n }, null, 8, [\"workoutObject\"]),\n _hoisted_15,\n _createElementVNode(\"span\", _hoisted_16, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).maxSpeed,\n unitFrom: \"km\",\n speed: true,\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"MS\"\n }, null, 8, [\"workoutObject\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_unref(workoutObject).maxAlt !== null && _unref(workoutObject).minAlt !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, [\n _createElementVNode(\"img\", {\n class: \"mountains\",\n src: \"/img/workouts/mountains.svg\",\n alt: _ctx.$t('workouts.ELEVATION')\n }, null, 8, _hoisted_18),\n _createElementVNode(\"span\", _hoisted_19, _toDisplayString(_ctx.$t('workouts.MIN_ALTITUDE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).minAlt,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _hoisted_20,\n _createElementVNode(\"span\", _hoisted_21, _toDisplayString(_ctx.$t('workouts.MAX_ALTITUDE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).maxAlt,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_unref(workoutObject).ascent !== null && _unref(workoutObject).descent !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, [\n _hoisted_23,\n _createElementVNode(\"span\", _hoisted_24, _toDisplayString(_ctx.$t('workouts.ASCENT')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).ascent,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n (_unref(displayHARecord))\n ? (_openBlock(), _createBlock(WorkoutRecord, {\n key: 0,\n workoutObject: _unref(workoutObject),\n recordType: \"HA\"\n }, null, 8, [\"workoutObject\"]))\n : _createCommentVNode(\"\", true),\n _hoisted_25,\n _createElementVNode(\"span\", _hoisted_26, _toDisplayString(_ctx.$t('workouts.DESCENT')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).descent,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(WorkoutWeather, {\n workoutObject: _unref(workoutObject),\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"workoutObject\", \"useImperialUnits\"])\n ]))\n}\n}\n\n})","import script from \"./WorkoutData.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutData.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutData.vue?vue&type=style&index=0&id=2c41cfc8&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2c41cfc8\"]])\n\nexport default __exports__","function $(element, tagName) {\n return Array.from(element.getElementsByTagName(tagName));\n}\nfunction normalizeId(id) {\n return id[0] === \"#\" ? id : `#${id}`;\n}\nfunction $ns(element, tagName, ns) {\n return Array.from(element.getElementsByTagNameNS(ns, tagName));\n}\n/**\n * get the content of a text node, if any\n */\nfunction nodeVal(node) {\n node?.normalize();\n return (node && node.textContent) || \"\";\n}\n/**\n * Get one Y child of X, if any, otherwise null\n */\nfunction get1(node, tagName, callback) {\n const n = node.getElementsByTagName(tagName);\n const result = n.length ? n[0] : null;\n if (result && callback)\n callback(result);\n return result;\n}\nfunction get(node, tagName, callback) {\n const properties = {};\n if (!node)\n return properties;\n const n = node.getElementsByTagName(tagName);\n const result = n.length ? n[0] : null;\n if (result && callback) {\n return callback(result, properties);\n }\n return properties;\n}\nfunction val1(node, tagName, callback) {\n const val = nodeVal(get1(node, tagName));\n if (val && callback)\n return callback(val) || {};\n return {};\n}\nfunction $num(node, tagName, callback) {\n const val = parseFloat(nodeVal(get1(node, tagName)));\n if (isNaN(val))\n return undefined;\n if (val && callback)\n return callback(val) || {};\n return {};\n}\nfunction num1(node, tagName, callback) {\n const val = parseFloat(nodeVal(get1(node, tagName)));\n if (isNaN(val))\n return undefined;\n if (callback)\n callback(val);\n return val;\n}\nfunction getMulti(node, propertyNames) {\n const properties = {};\n for (const property of propertyNames) {\n val1(node, property, (val) => {\n properties[property] = val;\n });\n }\n return properties;\n}\nfunction isElement(node) {\n return node?.nodeType === 1;\n}\n\nfunction getLineStyle(node) {\n return get(node, \"line\", (lineStyle) => {\n const val = Object.assign({}, val1(lineStyle, \"color\", (color) => {\n return { stroke: `#${color}` };\n }), $num(lineStyle, \"opacity\", (opacity) => {\n return { \"stroke-opacity\": opacity };\n }), $num(lineStyle, \"width\", (width) => {\n // GPX width is in mm, convert to px with 96 px per inch\n return { \"stroke-width\": (width * 96) / 25.4 };\n }));\n return val;\n });\n}\n\nfunction getExtensions(node) {\n let values = [];\n if (node === null)\n return values;\n for (const child of Array.from(node.childNodes)) {\n if (!isElement(child))\n continue;\n const name = abbreviateName(child.nodeName);\n if (name === \"gpxtpx:TrackPointExtension\") {\n // loop again for nested garmin extensions (eg. \"gpxtpx:hr\")\n values = values.concat(getExtensions(child));\n }\n else {\n // push custom extension (eg. \"power\")\n const val = nodeVal(child);\n values.push([name, parseNumeric(val)]);\n }\n }\n return values;\n}\nfunction abbreviateName(name) {\n return [\"heart\", \"gpxtpx:hr\", \"hr\"].includes(name) ? \"heart\" : name;\n}\nfunction parseNumeric(val) {\n const num = parseFloat(val);\n return isNaN(num) ? val : num;\n}\n\nfunction coordPair$1(node) {\n const ll = [\n parseFloat(node.getAttribute(\"lon\") || \"\"),\n parseFloat(node.getAttribute(\"lat\") || \"\"),\n ];\n if (isNaN(ll[0]) || isNaN(ll[1])) {\n return null;\n }\n num1(node, \"ele\", (val) => {\n ll.push(val);\n });\n const time = get1(node, \"time\");\n return {\n coordinates: ll,\n time: time ? nodeVal(time) : null,\n extendedValues: getExtensions(get1(node, \"extensions\")),\n };\n}\n\nfunction extractProperties(node) {\n const properties = getMulti(node, [\n \"name\",\n \"cmt\",\n \"desc\",\n \"type\",\n \"time\",\n \"keywords\",\n ]);\n const extensions = Array.from(node.getElementsByTagNameNS(\"http://www.garmin.com/xmlschemas/GpxExtensions/v3\", \"*\"));\n for (const child of extensions) {\n if (child.parentNode?.parentNode === node) {\n properties[child.tagName.replace(\":\", \"_\")] = nodeVal(child);\n }\n }\n const links = $(node, \"link\");\n if (links.length) {\n properties.links = links.map((link) => Object.assign({ href: link.getAttribute(\"href\") }, getMulti(link, [\"text\", \"type\"])));\n }\n return properties;\n}\n\n/**\n * Extract points from a trkseg or rte element.\n */\nfunction getPoints$1(node, pointname) {\n const pts = $(node, pointname);\n const line = [];\n const times = [];\n const extendedValues = {};\n for (let i = 0; i < pts.length; i++) {\n const c = coordPair$1(pts[i]);\n if (!c) {\n continue;\n }\n line.push(c.coordinates);\n if (c.time)\n times.push(c.time);\n for (const [name, val] of c.extendedValues) {\n const plural = name === \"heart\" ? name : name.replace(\"gpxtpx:\", \"\") + \"s\";\n if (!extendedValues[plural]) {\n extendedValues[plural] = Array(pts.length).fill(null);\n }\n extendedValues[plural][i] = val;\n }\n }\n if (line.length < 2)\n return; // Invalid line in GeoJSON\n return {\n line: line,\n times: times,\n extendedValues: extendedValues,\n };\n}\n/**\n * Extract a LineString geometry from a rte\n * element.\n */\nfunction getRoute(node) {\n const line = getPoints$1(node, \"rtept\");\n if (!line)\n return;\n return {\n type: \"Feature\",\n properties: Object.assign({ _gpxType: \"rte\" }, extractProperties(node), getLineStyle(get1(node, \"extensions\"))),\n geometry: {\n type: \"LineString\",\n coordinates: line.line,\n },\n };\n}\nfunction getTrack(node) {\n const segments = $(node, \"trkseg\");\n const track = [];\n const times = [];\n const extractedLines = [];\n for (const segment of segments) {\n const line = getPoints$1(segment, \"trkpt\");\n if (line) {\n extractedLines.push(line);\n if (line.times && line.times.length)\n times.push(line.times);\n }\n }\n if (extractedLines.length === 0)\n return null;\n const multi = extractedLines.length > 1;\n const properties = Object.assign({ _gpxType: \"trk\" }, extractProperties(node), getLineStyle(get1(node, \"extensions\")), times.length\n ? {\n coordinateProperties: {\n times: multi ? times : times[0],\n },\n }\n : {});\n for (const line of extractedLines) {\n track.push(line.line);\n if (!properties.coordinateProperties) {\n properties.coordinateProperties = {};\n }\n const props = properties.coordinateProperties;\n const entries = Object.entries(line.extendedValues);\n for (let i = 0; i < entries.length; i++) {\n const [name, val] = entries[i];\n if (multi) {\n if (!props[name]) {\n props[name] = extractedLines.map((line) => new Array(line.line.length).fill(null));\n }\n props[name][i] = val;\n }\n else {\n props[name] = val;\n }\n }\n }\n return {\n type: \"Feature\",\n properties: properties,\n geometry: multi\n ? {\n type: \"MultiLineString\",\n coordinates: track,\n }\n : {\n type: \"LineString\",\n coordinates: track[0],\n },\n };\n}\n/**\n * Extract a point, if possible, from a given node,\n * which is usually a wpt or trkpt\n */\nfunction getPoint(node) {\n const properties = Object.assign(extractProperties(node), getMulti(node, [\"sym\"]));\n const pair = coordPair$1(node);\n if (!pair)\n return null;\n return {\n type: \"Feature\",\n properties,\n geometry: {\n type: \"Point\",\n coordinates: pair.coordinates,\n },\n };\n}\n/**\n * Convert GPX to GeoJSON incrementally, returning\n * a [Generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators)\n * that yields output feature by feature.\n */\nfunction* gpxGen(node) {\n for (const track of $(node, \"trk\")) {\n const feature = getTrack(track);\n if (feature)\n yield feature;\n }\n for (const route of $(node, \"rte\")) {\n const feature = getRoute(route);\n if (feature)\n yield feature;\n }\n for (const waypoint of $(node, \"wpt\")) {\n const point = getPoint(waypoint);\n if (point)\n yield point;\n }\n}\n/**\n *\n * Convert a GPX document to GeoJSON. The first argument, `doc`, must be a GPX\n * document as an XML DOM - not as a string. You can get this using jQuery's default\n * `.ajax` function or using a bare XMLHttpRequest with the `.response` property\n * holding an XML DOM.\n *\n * The output is a JavaScript object of GeoJSON data, same as `.kml` outputs, with the\n * addition of a `_gpxType` property on each `LineString` feature that indicates whether\n * the feature was encoded as a route (`rte`) or track (`trk`) in the GPX document.\n */\nfunction gpx(node) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(gpxGen(node)),\n };\n}\n\nconst EXTENSIONS_NS = \"http://www.garmin.com/xmlschemas/ActivityExtension/v2\";\nconst TRACKPOINT_ATTRIBUTES = [\n [\"heartRate\", \"heartRates\"],\n [\"Cadence\", \"cadences\"],\n // Extended Trackpoint attributes\n [\"Speed\", \"speeds\"],\n [\"Watts\", \"watts\"],\n];\nconst LAP_ATTRIBUTES = [\n [\"TotalTimeSeconds\", \"totalTimeSeconds\"],\n [\"DistanceMeters\", \"distanceMeters\"],\n [\"MaximumSpeed\", \"maxSpeed\"],\n [\"AverageHeartRateBpm\", \"avgHeartRate\"],\n [\"MaximumHeartRateBpm\", \"maxHeartRate\"],\n // Extended Lap attributes\n [\"AvgSpeed\", \"avgSpeed\"],\n [\"AvgWatts\", \"avgWatts\"],\n [\"MaxWatts\", \"maxWatts\"],\n];\nfunction getProperties(node, attributeNames) {\n const properties = [];\n for (const [tag, alias] of attributeNames) {\n let elem = get1(node, tag);\n if (!elem) {\n const elements = node.getElementsByTagNameNS(EXTENSIONS_NS, tag);\n if (elements.length) {\n elem = elements[0];\n }\n }\n const val = parseFloat(nodeVal(elem));\n if (!isNaN(val)) {\n properties.push([alias, val]);\n }\n }\n return properties;\n}\nfunction coordPair(node) {\n const ll = [num1(node, \"LongitudeDegrees\"), num1(node, \"LatitudeDegrees\")];\n if (ll[0] === undefined ||\n isNaN(ll[0]) ||\n ll[1] === undefined ||\n isNaN(ll[1])) {\n return null;\n }\n const heartRate = get1(node, \"HeartRateBpm\");\n const time = nodeVal(get1(node, \"Time\"));\n get1(node, \"AltitudeMeters\", (alt) => {\n const a = parseFloat(nodeVal(alt));\n if (!isNaN(a)) {\n ll.push(a);\n }\n });\n return {\n coordinates: ll,\n time: time || null,\n heartRate: heartRate ? parseFloat(nodeVal(heartRate)) : null,\n extensions: getProperties(node, TRACKPOINT_ATTRIBUTES),\n };\n}\nfunction getPoints(node) {\n const pts = $(node, \"Trackpoint\");\n const line = [];\n const times = [];\n const heartRates = [];\n if (pts.length < 2)\n return null; // Invalid line in GeoJSON\n const extendedProperties = {};\n const result = { extendedProperties };\n for (let i = 0; i < pts.length; i++) {\n const c = coordPair(pts[i]);\n if (c === null)\n continue;\n line.push(c.coordinates);\n const { time, heartRate, extensions } = c;\n if (time)\n times.push(time);\n if (heartRate)\n heartRates.push(heartRate);\n for (const [alias, value] of extensions) {\n if (!extendedProperties[alias]) {\n extendedProperties[alias] = Array(pts.length).fill(null);\n }\n extendedProperties[alias][i] = value;\n }\n }\n if (line.length < 2)\n return null;\n return Object.assign(result, {\n line: line,\n times: times,\n heartRates: heartRates,\n });\n}\nfunction getLap(node) {\n const segments = $(node, \"Track\");\n const track = [];\n const times = [];\n const heartRates = [];\n const allExtendedProperties = [];\n let line;\n const properties = Object.assign(Object.fromEntries(getProperties(node, LAP_ATTRIBUTES)), get(node, \"Name\", (nameElement) => {\n return { name: nodeVal(nameElement) };\n }));\n for (const segment of segments) {\n line = getPoints(segment);\n if (line) {\n track.push(line.line);\n if (line.times.length)\n times.push(line.times);\n if (line.heartRates.length)\n heartRates.push(line.heartRates);\n allExtendedProperties.push(line.extendedProperties);\n }\n }\n for (let i = 0; i < allExtendedProperties.length; i++) {\n const extendedProperties = allExtendedProperties[i];\n for (const property in extendedProperties) {\n if (segments.length === 1) {\n if (line) {\n properties[property] = line.extendedProperties[property];\n }\n }\n else {\n if (!properties[property]) {\n properties[property] = track.map((track) => Array(track.length).fill(null));\n }\n properties[property][i] = extendedProperties[property];\n }\n }\n }\n if (track.length === 0)\n return null;\n if (times.length || heartRates.length) {\n properties.coordinateProperties = Object.assign(times.length\n ? {\n times: track.length === 1 ? times[0] : times,\n }\n : {}, heartRates.length\n ? {\n heart: track.length === 1 ? heartRates[0] : heartRates,\n }\n : {});\n }\n return {\n type: \"Feature\",\n properties: properties,\n geometry: track.length === 1\n ? {\n type: \"LineString\",\n coordinates: track[0],\n }\n : {\n type: \"MultiLineString\",\n coordinates: track,\n },\n };\n}\n/**\n * Incrementally convert a TCX document to GeoJSON. The\n * first argument, `doc`, must be a TCX\n * document as an XML DOM - not as a string.\n */\nfunction* tcxGen(node) {\n for (const lap of $(node, \"Lap\")) {\n const feature = getLap(lap);\n if (feature)\n yield feature;\n }\n for (const course of $(node, \"Courses\")) {\n const feature = getLap(course);\n if (feature)\n yield feature;\n }\n}\n/**\n * Convert a TCX document to GeoJSON. The first argument, `doc`, must be a TCX\n * document as an XML DOM - not as a string.\n */\nfunction tcx(node) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(tcxGen(node)),\n };\n}\n\nfunction fixColor(v, prefix) {\n const properties = {};\n const colorProp = prefix == \"stroke\" || prefix === \"fill\" ? prefix : prefix + \"-color\";\n if (v[0] === \"#\") {\n v = v.substring(1);\n }\n if (v.length === 6 || v.length === 3) {\n properties[colorProp] = \"#\" + v;\n }\n else if (v.length === 8) {\n properties[prefix + \"-opacity\"] = parseInt(v.substring(0, 2), 16) / 255;\n properties[colorProp] =\n \"#\" + v.substring(6, 8) + v.substring(4, 6) + v.substring(2, 4);\n }\n return properties;\n}\n\nfunction numericProperty(node, source, target) {\n const properties = {};\n num1(node, source, (val) => {\n properties[target] = val;\n });\n return properties;\n}\nfunction getColor(node, output) {\n return get(node, \"color\", (elem) => fixColor(nodeVal(elem), output));\n}\nfunction extractIconHref(node) {\n return get(node, \"Icon\", (icon, properties) => {\n val1(icon, \"href\", (href) => {\n properties.icon = href;\n });\n return properties;\n });\n}\nfunction extractIcon(node) {\n return get(node, \"IconStyle\", (iconStyle) => {\n return Object.assign(getColor(iconStyle, \"icon\"), numericProperty(iconStyle, \"scale\", \"icon-scale\"), numericProperty(iconStyle, \"heading\", \"icon-heading\"), get(iconStyle, \"hotSpot\", (hotspot) => {\n const left = parseFloat(hotspot.getAttribute(\"x\") || \"\");\n const top = parseFloat(hotspot.getAttribute(\"y\") || \"\");\n const xunits = hotspot.getAttribute(\"xunits\") || \"\";\n const yunits = hotspot.getAttribute(\"yunits\") || \"\";\n if (!isNaN(left) && !isNaN(top))\n return {\n \"icon-offset\": [left, top],\n \"icon-offset-units\": [xunits, yunits],\n };\n return {};\n }), extractIconHref(iconStyle));\n });\n}\nfunction extractLabel(node) {\n return get(node, \"LabelStyle\", (labelStyle) => {\n return Object.assign(getColor(labelStyle, \"label\"), numericProperty(labelStyle, \"scale\", \"label-scale\"));\n });\n}\nfunction extractLine(node) {\n return get(node, \"LineStyle\", (lineStyle) => {\n return Object.assign(getColor(lineStyle, \"stroke\"), numericProperty(lineStyle, \"width\", \"stroke-width\"));\n });\n}\nfunction extractPoly(node) {\n return get(node, \"PolyStyle\", (polyStyle, properties) => {\n return Object.assign(properties, get(polyStyle, \"color\", (elem) => fixColor(nodeVal(elem), \"fill\")), val1(polyStyle, \"fill\", (fill) => {\n if (fill === \"0\")\n return { \"fill-opacity\": 0 };\n }), val1(polyStyle, \"outline\", (outline) => {\n if (outline === \"0\")\n return { \"stroke-opacity\": 0 };\n }));\n });\n}\nfunction extractStyle(node) {\n return Object.assign({}, extractPoly(node), extractLine(node), extractLabel(node), extractIcon(node));\n}\n\nconst toNumber = (x) => Number(x);\nconst typeConverters = {\n string: (x) => x,\n int: toNumber,\n uint: toNumber,\n short: toNumber,\n ushort: toNumber,\n float: toNumber,\n double: toNumber,\n bool: (x) => Boolean(x),\n};\nfunction extractExtendedData(node, schema) {\n return get(node, \"ExtendedData\", (extendedData, properties) => {\n for (const data of $(extendedData, \"Data\")) {\n properties[data.getAttribute(\"name\") || \"\"] = nodeVal(get1(data, \"value\"));\n }\n for (const simpleData of $(extendedData, \"SimpleData\")) {\n const name = simpleData.getAttribute(\"name\") || \"\";\n const typeConverter = schema[name] || typeConverters.string;\n properties[name] = typeConverter(nodeVal(simpleData));\n }\n return properties;\n });\n}\nfunction getMaybeHTMLDescription(node) {\n const descriptionNode = get1(node, \"description\");\n for (const c of Array.from(descriptionNode?.childNodes || [])) {\n if (c.nodeType === 4) {\n return {\n description: {\n \"@type\": \"html\",\n value: nodeVal(c),\n },\n };\n }\n }\n return {};\n}\nfunction extractTimeSpan(node) {\n return get(node, \"TimeSpan\", (timeSpan) => {\n return {\n timespan: {\n begin: nodeVal(get1(timeSpan, \"begin\")),\n end: nodeVal(get1(timeSpan, \"end\")),\n },\n };\n });\n}\nfunction extractTimeStamp(node) {\n return get(node, \"TimeStamp\", (timeStamp) => {\n return { timestamp: nodeVal(get1(timeStamp, \"when\")) };\n });\n}\nfunction extractCascadedStyle(node, styleMap) {\n return val1(node, \"styleUrl\", (styleUrl) => {\n styleUrl = normalizeId(styleUrl);\n if (styleMap[styleUrl]) {\n return Object.assign({ styleUrl }, styleMap[styleUrl]);\n }\n // For backward-compatibility. Should we still include\n // styleUrl even if it's not resolved?\n return { styleUrl };\n });\n}\n\nconst removeSpace = /\\s*/g;\nconst trimSpace = /^\\s*|\\s*$/g;\nconst splitSpace = /\\s+/;\n/**\n * Get one coordinate from a coordinate array, if any\n */\nfunction coord1(value) {\n return value\n .replace(removeSpace, \"\")\n .split(\",\")\n .map(parseFloat)\n .filter((num) => !isNaN(num))\n .slice(0, 3);\n}\n/**\n * Get all coordinates from a coordinate array as [[],[]]\n */\nfunction coord(value) {\n return value\n .replace(trimSpace, \"\")\n .split(splitSpace)\n .map(coord1)\n .filter((coord) => {\n return coord.length >= 2;\n });\n}\nfunction gxCoords(node) {\n let elems = $(node, \"coord\");\n if (elems.length === 0) {\n elems = $ns(node, \"coord\", \"*\");\n }\n const coordinates = elems.map((elem) => {\n return nodeVal(elem).split(\" \").map(parseFloat);\n });\n if (coordinates.length === 0) {\n return null;\n }\n return {\n geometry: coordinates.length > 2\n ? {\n type: \"LineString\",\n coordinates,\n }\n : {\n type: \"Point\",\n coordinates: coordinates[0],\n },\n times: $(node, \"when\").map((elem) => nodeVal(elem)),\n };\n}\nfunction fixRing(ring) {\n if (ring.length === 0)\n return ring;\n const first = ring[0];\n const last = ring[ring.length - 1];\n let equal = true;\n for (let i = 0; i < Math.max(first.length, last.length); i++) {\n if (first[i] !== last[i]) {\n equal = false;\n break;\n }\n }\n if (!equal) {\n return ring.concat([ring[0]]);\n }\n return ring;\n}\nfunction getCoordinates(node) {\n return nodeVal(get1(node, \"coordinates\"));\n}\nfunction getGeometry(node) {\n let geometries = [];\n let coordTimes = [];\n for (let i = 0; i < node.childNodes.length; i++) {\n const child = node.childNodes.item(i);\n if (isElement(child)) {\n switch (child.tagName) {\n case \"MultiGeometry\":\n case \"MultiTrack\":\n case \"gx:MultiTrack\": {\n const childGeometries = getGeometry(child);\n geometries = geometries.concat(childGeometries.geometries);\n coordTimes = coordTimes.concat(childGeometries.coordTimes);\n break;\n }\n case \"Point\": {\n const coordinates = coord1(getCoordinates(child));\n if (coordinates.length >= 2) {\n geometries.push({\n type: \"Point\",\n coordinates,\n });\n }\n break;\n }\n case \"LinearRing\":\n case \"LineString\": {\n const coordinates = coord(getCoordinates(child));\n if (coordinates.length >= 2) {\n geometries.push({\n type: \"LineString\",\n coordinates,\n });\n }\n break;\n }\n case \"Polygon\": {\n const coords = [];\n for (const linearRing of $(child, \"LinearRing\")) {\n const ring = fixRing(coord(getCoordinates(linearRing)));\n if (ring.length >= 4) {\n coords.push(ring);\n }\n }\n if (coords.length) {\n geometries.push({\n type: \"Polygon\",\n coordinates: coords,\n });\n }\n break;\n }\n case \"Track\":\n case \"gx:Track\": {\n const gx = gxCoords(child);\n if (!gx)\n break;\n const { times, geometry } = gx;\n geometries.push(geometry);\n if (times.length)\n coordTimes.push(times);\n break;\n }\n }\n }\n }\n return {\n geometries,\n coordTimes,\n };\n}\n\nfunction geometryListToGeometry(geometries) {\n return geometries.length === 0\n ? null\n : geometries.length === 1\n ? geometries[0]\n : {\n type: \"GeometryCollection\",\n geometries,\n };\n}\nfunction getPlacemark(node, styleMap, schema, options) {\n const { coordTimes, geometries } = getGeometry(node);\n const geometry = geometryListToGeometry(geometries);\n if (!geometry && options.skipNullGeometry) {\n return null;\n }\n const feature = {\n type: \"Feature\",\n geometry,\n properties: Object.assign(getMulti(node, [\n \"name\",\n \"address\",\n \"visibility\",\n \"open\",\n \"phoneNumber\",\n \"description\",\n ]), getMaybeHTMLDescription(node), extractCascadedStyle(node, styleMap), extractStyle(node), extractExtendedData(node, schema), extractTimeSpan(node), extractTimeStamp(node), coordTimes.length\n ? {\n coordinateProperties: {\n times: coordTimes.length === 1 ? coordTimes[0] : coordTimes,\n },\n }\n : {}),\n };\n if (feature.properties?.visibility !== undefined) {\n feature.properties.visibility = feature.properties.visibility !== \"0\";\n }\n const id = node.getAttribute(\"id\");\n if (id !== null && id !== \"\")\n feature.id = id;\n return feature;\n}\n\nfunction getGroundOverlayBox(node) {\n const latLonQuad = get1(node, \"gx:LatLonQuad\");\n if (latLonQuad) {\n const ring = fixRing(coord(getCoordinates(node)));\n return {\n geometry: {\n type: \"Polygon\",\n coordinates: [ring],\n },\n };\n }\n return getLatLonBox(node);\n}\nconst DEGREES_TO_RADIANS = Math.PI / 180;\nfunction rotateBox(bbox, coordinates, rotation) {\n const center = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2];\n return [\n coordinates[0].map((coordinate) => {\n const dy = coordinate[1] - center[1];\n const dx = coordinate[0] - center[0];\n const distance = Math.sqrt(Math.pow(dy, 2) + Math.pow(dx, 2));\n const angle = Math.atan2(dy, dx) + rotation * DEGREES_TO_RADIANS;\n return [\n center[0] + Math.cos(angle) * distance,\n center[1] + Math.sin(angle) * distance,\n ];\n }),\n ];\n}\nfunction getLatLonBox(node) {\n const latLonBox = get1(node, \"LatLonBox\");\n if (latLonBox) {\n const north = num1(latLonBox, \"north\");\n const west = num1(latLonBox, \"west\");\n const east = num1(latLonBox, \"east\");\n const south = num1(latLonBox, \"south\");\n const rotation = num1(latLonBox, \"rotation\");\n if (typeof north === \"number\" &&\n typeof south === \"number\" &&\n typeof west === \"number\" &&\n typeof east === \"number\") {\n const bbox = [west, south, east, north];\n let coordinates = [\n [\n [west, north],\n [east, north],\n [east, south],\n [west, south],\n [west, north], // top left (again)\n ],\n ];\n if (typeof rotation === \"number\") {\n coordinates = rotateBox(bbox, coordinates, rotation);\n }\n return {\n bbox,\n geometry: {\n type: \"Polygon\",\n coordinates,\n },\n };\n }\n }\n return null;\n}\nfunction getGroundOverlay(node, styleMap, schema, options) {\n const box = getGroundOverlayBox(node);\n const geometry = box?.geometry || null;\n if (!geometry && options.skipNullGeometry) {\n return null;\n }\n const feature = {\n type: \"Feature\",\n geometry,\n properties: Object.assign(\n /**\n * Related to\n * https://gist.github.com/tmcw/037a1cb6660d74a392e9da7446540f46\n */\n { \"@geometry-type\": \"groundoverlay\" }, getMulti(node, [\n \"name\",\n \"address\",\n \"visibility\",\n \"open\",\n \"phoneNumber\",\n \"description\",\n ]), getMaybeHTMLDescription(node), extractCascadedStyle(node, styleMap), extractStyle(node), extractIconHref(node), extractExtendedData(node, schema), extractTimeSpan(node), extractTimeStamp(node)),\n };\n if (box?.bbox) {\n feature.bbox = box.bbox;\n }\n if (feature.properties?.visibility !== undefined) {\n feature.properties.visibility = feature.properties.visibility !== \"0\";\n }\n const id = node.getAttribute(\"id\");\n if (id !== null && id !== \"\")\n feature.id = id;\n return feature;\n}\n\nfunction getStyleId(style) {\n let id = style.getAttribute(\"id\");\n const parentNode = style.parentNode;\n if (!id &&\n isElement(parentNode) &&\n parentNode.localName === \"CascadingStyle\") {\n id = parentNode.getAttribute(\"kml:id\") || parentNode.getAttribute(\"id\");\n }\n return normalizeId(id || \"\");\n}\nfunction buildStyleMap(node) {\n const styleMap = {};\n for (const style of $(node, \"Style\")) {\n styleMap[getStyleId(style)] = extractStyle(style);\n }\n for (const map of $(node, \"StyleMap\")) {\n const id = normalizeId(map.getAttribute(\"id\") || \"\");\n val1(map, \"styleUrl\", (styleUrl) => {\n styleUrl = normalizeId(styleUrl);\n if (styleMap[styleUrl]) {\n styleMap[id] = styleMap[styleUrl];\n }\n });\n }\n return styleMap;\n}\nfunction buildSchema(node) {\n const schema = {};\n for (const field of $(node, \"SimpleField\")) {\n schema[field.getAttribute(\"name\") || \"\"] =\n typeConverters[field.getAttribute(\"type\") || \"\"] ||\n typeConverters[\"string\"];\n }\n return schema;\n}\nconst FOLDER_PROPS = [\n \"name\",\n \"visibility\",\n \"open\",\n \"address\",\n \"description\",\n \"phoneNumber\",\n \"visibility\",\n];\nfunction getFolder(node) {\n const meta = {};\n for (const child of Array.from(node.childNodes)) {\n if (isElement(child) && FOLDER_PROPS.includes(child.tagName)) {\n meta[child.tagName] = nodeVal(child);\n }\n }\n return {\n type: \"folder\",\n meta,\n children: [],\n };\n}\n/**\n * Yield a nested tree with KML folder structure\n *\n * This generates a tree with the given structure:\n *\n * ```js\n * {\n * \"type\": \"root\",\n * \"children\": [\n * {\n * \"type\": \"folder\",\n * \"meta\": {\n * \"name\": \"Test\"\n * },\n * \"children\": [\n * // ...features and folders\n * ]\n * }\n * // ...features\n * ]\n * }\n * ```\n *\n * ### GroundOverlay\n *\n * GroundOverlay elements are converted into\n * `Feature` objects with `Polygon` geometries,\n * a property like:\n *\n * ```json\n * {\n * \"@geometry-type\": \"groundoverlay\"\n * }\n * ```\n *\n * And the ground overlay's image URL in the `href`\n * property. Ground overlays will need to be displayed\n * with a separate method to other features, depending\n * on which map framework you're using.\n */\nfunction kmlWithFolders(node, options = {\n skipNullGeometry: false,\n}) {\n const styleMap = buildStyleMap(node);\n const schema = buildSchema(node);\n const tree = { type: \"root\", children: [] };\n function traverse(node, pointer, options) {\n if (isElement(node)) {\n switch (node.tagName) {\n case \"GroundOverlay\": {\n const placemark = getGroundOverlay(node, styleMap, schema, options);\n if (placemark) {\n pointer.children.push(placemark);\n }\n break;\n }\n case \"Placemark\": {\n const placemark = getPlacemark(node, styleMap, schema, options);\n if (placemark) {\n pointer.children.push(placemark);\n }\n break;\n }\n case \"Folder\": {\n const folder = getFolder(node);\n pointer.children.push(folder);\n pointer = folder;\n break;\n }\n }\n }\n if (node.childNodes) {\n for (let i = 0; i < node.childNodes.length; i++) {\n traverse(node.childNodes[i], pointer, options);\n }\n }\n }\n traverse(node, tree, options);\n return tree;\n}\n/**\n * Convert KML to GeoJSON incrementally, returning\n * a [Generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators)\n * that yields output feature by feature.\n */\nfunction* kmlGen(node, options = {\n skipNullGeometry: false,\n}) {\n const styleMap = buildStyleMap(node);\n const schema = buildSchema(node);\n for (const placemark of $(node, \"Placemark\")) {\n const feature = getPlacemark(placemark, styleMap, schema, options);\n if (feature)\n yield feature;\n }\n for (const groundOverlay of $(node, \"GroundOverlay\")) {\n const feature = getGroundOverlay(groundOverlay, styleMap, schema, options);\n if (feature)\n yield feature;\n }\n}\n/**\n * Convert a KML document to GeoJSON. The first argument, `doc`, must be a KML\n * document as an XML DOM - not as a string. You can get this using jQuery's default\n * `.ajax` function or using a bare XMLHttpRequest with the `.response` property\n * holding an XML DOM.\n *\n * The output is a JavaScript object of GeoJSON data. You can convert it to a string\n * with [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n * or use it directly in libraries.\n */\nfunction kml(node, options = {\n skipNullGeometry: false,\n}) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(kmlGen(node, options)),\n };\n}\n\nexport { gpx, gpxGen, kml, kmlGen, kmlWithFolders, tcx, tcxGen };\n//# sourceMappingURL=togeojson.es.mjs.map\n","import { watch as de, ref as c, provide as G, inject as h, h as z, onUnmounted as se, onBeforeUnmount as J, defineComponent as g, onMounted as O, markRaw as C, nextTick as f, render as Je, reactive as Ke, computed as x } from \"vue\";\nconst Qe = (t, o) => {\n for (const e of Object.keys(o))\n t.on(e, o[e]);\n}, me = (t) => {\n for (const o of Object.keys(t)) {\n const e = t[o];\n e && U(e.cancel) && e.cancel();\n }\n}, Xe = (t) => !t || typeof t.charAt != \"function\" ? t : t.charAt(0).toUpperCase() + t.slice(1), U = (t) => typeof t == \"function\", S = (t, o, e) => {\n for (const n in e) {\n const a = \"set\" + Xe(n);\n t[a] ? de(\n () => e[n],\n (s, l) => {\n t[a](s, l);\n }\n ) : o[a] && de(\n () => e[n],\n (s) => {\n o[a](s);\n }\n );\n }\n}, L = (t, o, e = {}) => {\n const n = { ...e };\n for (const a in t) {\n const s = o[a], l = t[a];\n s && (s && s.custom === !0 || l !== void 0 && (n[a] = l));\n }\n return n;\n}, T = (t) => {\n const o = {};\n for (const e in t)\n if (e.startsWith(\"on\") && !e.startsWith(\"onUpdate\") && e !== \"onReady\") {\n const n = e.slice(2).toLocaleLowerCase();\n o[n] = t[e];\n }\n return o;\n}, Ye = async (t) => {\n const o = await Promise.all([\n import(\"leaflet/dist/images/marker-icon-2x.png\"),\n import(\"leaflet/dist/images/marker-icon.png\"),\n import(\"leaflet/dist/images/marker-shadow.png\")\n ]);\n delete t.Default.prototype._getIconUrl, t.Default.mergeOptions({\n iconRetinaUrl: o[0].default,\n iconUrl: o[1].default,\n shadowUrl: o[2].default\n });\n}, R = (t) => {\n const o = c(\n (...n) => console.warn(`Method ${t} has been invoked without being replaced`)\n ), e = (...n) => o.value(...n);\n return e.wrapped = o, G(t, e), e;\n}, ee = (t, o) => t.wrapped.value = o, b = typeof self == \"object\" && self.self === self && self || typeof global == \"object\" && global.global === global && global || globalThis, m = (t) => {\n const o = h(t);\n if (!o)\n throw new Error(`Attempt to inject ${t} before it was provided.`);\n return o;\n}, j = Symbol(), I = Symbol(), oe = Symbol(), K = Symbol(), ve = Symbol(), be = Symbol(), fe = Symbol(), Le = Symbol(), he = Symbol(), ge = Symbol(), Oe = Symbol(), Se = Symbol(), Q = {\n options: {\n type: Object,\n default: () => ({}),\n custom: !0\n }\n}, X = (t) => ({ options: t.options, methods: {} }), Z = {\n ...Q,\n pane: {\n type: String\n },\n attribution: {\n type: String\n },\n name: {\n type: String,\n custom: !0\n },\n layerType: {\n type: String,\n custom: !0\n },\n visible: {\n type: Boolean,\n custom: !0,\n default: !0\n }\n}, Y = (t, o, e) => {\n const n = m(I), a = m(oe), { options: s, methods: l } = X(t), r = L(\n t,\n Z,\n s\n ), i = () => n({ leafletObject: o.value }), u = () => a({ leafletObject: o.value }), d = {\n ...l,\n setAttribution(y) {\n u(), o.value.options.attribution = y, t.visible && i();\n },\n setName() {\n u(), t.visible && i();\n },\n setLayerType() {\n u(), t.visible && i();\n },\n setVisible(y) {\n o.value && (y ? i() : u());\n },\n bindPopup(y) {\n if (!o.value || !U(o.value.bindPopup)) {\n console.warn(\n \"Attempt to bind popup before bindPopup method available on layer.\"\n );\n return;\n }\n o.value.bindPopup(y);\n },\n bindTooltip(y) {\n if (!o.value || !U(o.value.bindTooltip)) {\n console.warn(\n \"Attempt to bind tooltip before bindTooltip method available on layer.\"\n );\n return;\n }\n o.value.bindTooltip(y);\n },\n unbindTooltip() {\n o.value && (U(o.value.closeTooltip) && o.value.closeTooltip(), U(o.value.unbindTooltip) && o.value.unbindTooltip());\n },\n unbindPopup() {\n o.value && (U(o.value.closePopup) && o.value.closePopup(), U(o.value.unbindPopup) && o.value.unbindPopup());\n },\n updateVisibleProp(y) {\n e.emit(\"update:visible\", y);\n }\n };\n return G(he, d.bindPopup), G(ge, d.bindTooltip), G(Oe, d.unbindPopup), G(Se, d.unbindTooltip), se(() => {\n d.unbindPopup(), d.unbindTooltip(), u();\n }), { options: r, methods: d };\n}, M = (t, o) => {\n if (t && o.default)\n return z(\"div\", { style: { display: \"none\" } }, o.default());\n}, je = {\n ...Z,\n interactive: {\n type: Boolean,\n default: void 0\n },\n bubblingMouseEvents: {\n type: Boolean,\n default: void 0\n }\n}, Ve = (t, o, e) => {\n const { options: n, methods: a } = Y(\n t,\n o,\n e\n );\n return { options: L(\n t,\n je,\n n\n ), methods: a };\n}, ae = {\n ...je,\n stroke: {\n type: Boolean,\n default: void 0\n },\n color: {\n type: String\n },\n weight: {\n type: Number\n },\n opacity: {\n type: Number\n },\n lineCap: {\n type: String\n },\n lineJoin: {\n type: String\n },\n dashArray: {\n type: String\n },\n dashOffset: {\n type: String\n },\n fill: {\n type: Boolean,\n default: void 0\n },\n fillColor: {\n type: String\n },\n fillOpacity: {\n type: Number\n },\n fillRule: {\n type: String\n },\n className: {\n type: String\n }\n}, Ce = (t, o, e) => {\n const { options: n, methods: a } = Ve(t, o, e), s = L(\n t,\n ae,\n n\n ), l = m(oe), r = {\n ...a,\n setStroke(i) {\n o.value.setStyle({ stroke: i });\n },\n setColor(i) {\n o.value.setStyle({ color: i });\n },\n setWeight(i) {\n o.value.setStyle({ weight: i });\n },\n setOpacity(i) {\n o.value.setStyle({ opacity: i });\n },\n setLineCap(i) {\n o.value.setStyle({ lineCap: i });\n },\n setLineJoin(i) {\n o.value.setStyle({ lineJoin: i });\n },\n setDashArray(i) {\n o.value.setStyle({ dashArray: i });\n },\n setDashOffset(i) {\n o.value.setStyle({ dashOffset: i });\n },\n setFill(i) {\n o.value.setStyle({ fill: i });\n },\n setFillColor(i) {\n o.value.setStyle({ fillColor: i });\n },\n setFillOpacity(i) {\n o.value.setStyle({ fillOpacity: i });\n },\n setFillRule(i) {\n o.value.setStyle({ fillRule: i });\n },\n setClassName(i) {\n o.value.setStyle({ className: i });\n }\n };\n return J(() => {\n l({ leafletObject: o.value });\n }), { options: s, methods: r };\n}, re = {\n ...ae,\n /**\n * Radius of the marker in pixels.\n */\n radius: {\n type: Number\n },\n latLng: {\n type: [Object, Array],\n required: !0,\n custom: !0\n }\n}, Pe = (t, o, e) => {\n const { options: n, methods: a } = Ce(\n t,\n o,\n e\n ), s = L(\n t,\n re,\n n\n ), l = {\n ...a,\n setRadius(r) {\n o.value.setRadius(r);\n },\n setLatLng(r) {\n o.value.setLatLng(r);\n }\n };\n return { options: s, methods: l };\n}, Be = {\n ...re,\n /**\n * Radius of the circle in meters.\n */\n radius: {\n type: Number\n }\n}, xe = (t, o, e) => {\n const { options: n, methods: a } = Pe(t, o, e), s = L(\n t,\n Be,\n n\n ), l = {\n ...a\n };\n return { options: s, methods: l };\n}, Ot = g({\n name: \"LCircle\",\n props: Be,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { options: l, methods: r } = xe(t, e, o);\n return O(async () => {\n const { circle: i } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(i(t.latLng, l));\n const u = T(o.attrs);\n e.value.on(u), S(r, e.value, t), s({\n ...t,\n ...r,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), St = g({\n name: \"LCircleMarker\",\n props: re,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { options: l, methods: r } = Pe(\n t,\n e,\n o\n );\n return O(async () => {\n const { circleMarker: i } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(\n i(t.latLng, l)\n );\n const u = T(o.attrs);\n e.value.on(u), S(r, e.value, t), s({\n ...t,\n ...r,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), H = {\n ...Q,\n position: {\n type: String\n }\n}, V = (t, o) => {\n const { options: e, methods: n } = X(t), a = L(\n t,\n H,\n e\n ), s = {\n ...n,\n setPosition(l) {\n o.value && o.value.setPosition(l);\n }\n };\n return se(() => {\n o.value && o.value.remove();\n }), { options: a, methods: s };\n}, Re = (t) => t.default ? z(\"div\", { ref: \"root\" }, t.default()) : null, jt = g({\n name: \"LControl\",\n props: {\n ...H,\n disableClickPropagation: {\n type: Boolean,\n custom: !0,\n default: !0\n },\n disableScrollPropagation: {\n type: Boolean,\n custom: !0,\n default: !1\n }\n },\n setup(t, o) {\n const e = c(), n = c(), a = h(j), s = m(K), { options: l, methods: r } = V(t, e);\n return O(async () => {\n const { Control: i, DomEvent: u } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\"), d = i.extend({\n onAdd() {\n return n.value;\n }\n });\n e.value = C(new d(l)), S(r, e.value, t), s({ leafletObject: e.value }), t.disableClickPropagation && n.value && u.disableClickPropagation(n.value), t.disableScrollPropagation && n.value && u.disableScrollPropagation(n.value), f(() => o.emit(\"ready\", e.value));\n }), { root: n, leafletObject: e };\n },\n render() {\n return Re(this.$slots);\n }\n}), Te = {\n ...H,\n prefix: {\n type: String\n }\n}, et = (t, o) => {\n const { options: e, methods: n } = V(\n t,\n o\n ), a = L(\n t,\n Te,\n e\n ), s = {\n ...n,\n setPrefix(l) {\n o.value.setPrefix(l);\n }\n };\n return { options: a, methods: s };\n}, Ct = g({\n name: \"LControlAttribution\",\n props: Te,\n setup(t, o) {\n const e = c(), n = h(j), a = m(K), { options: s, methods: l } = et(t, e);\n return O(async () => {\n const { control: r } = n ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(\n r.attribution(s)\n ), S(l, e.value, t), a({ leafletObject: e.value }), f(() => o.emit(\"ready\", e.value));\n }), { leafletObject: e };\n },\n render() {\n return null;\n }\n}), we = {\n ...H,\n collapsed: {\n type: Boolean,\n default: void 0\n },\n autoZIndex: {\n type: Boolean,\n default: void 0\n },\n hideSingleBase: {\n type: Boolean,\n default: void 0\n },\n sortLayers: {\n type: Boolean,\n default: void 0\n },\n sortFunction: {\n type: Function\n }\n}, tt = (t, o) => {\n const { options: e } = V(t, o);\n return { options: L(\n t,\n we,\n e\n ), methods: {\n addLayer(s) {\n s.layerType === \"base\" ? o.value.addBaseLayer(s.leafletObject, s.name) : s.layerType === \"overlay\" && o.value.addOverlay(s.leafletObject, s.name);\n },\n removeLayer(s) {\n o.value.removeLayer(s.leafletObject);\n }\n } };\n}, Pt = g({\n name: \"LControlLayers\",\n props: we,\n setup(t, o) {\n const e = c(), n = h(j), a = m(ve), { options: s, methods: l } = tt(t, e);\n return O(async () => {\n const { control: r } = n ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(\n r.layers(void 0, void 0, s)\n ), S(l, e.value, t), a({\n ...t,\n ...l,\n leafletObject: e.value\n }), f(() => o.emit(\"ready\", e.value));\n }), { leafletObject: e };\n },\n render() {\n return null;\n }\n}), Ie = {\n ...H,\n maxWidth: {\n type: Number\n },\n metric: {\n type: Boolean,\n default: void 0\n },\n imperial: {\n type: Boolean,\n default: void 0\n },\n updateWhenIdle: {\n type: Boolean,\n default: void 0\n }\n}, ot = (t, o) => {\n const { options: e, methods: n } = V(\n t,\n o\n );\n return { options: L(\n t,\n Ie,\n e\n ), methods: n };\n}, Bt = g({\n name: \"LControlScale\",\n props: Ie,\n setup(t, o) {\n const e = c(), n = h(j), a = m(K), { options: s, methods: l } = ot(t, e);\n return O(async () => {\n const { control: r } = n ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(r.scale(s)), S(l, e.value, t), a({ leafletObject: e.value }), f(() => o.emit(\"ready\", e.value));\n }), { leafletObject: e };\n },\n render() {\n return null;\n }\n}), Ae = {\n ...H,\n zoomInText: {\n type: String\n },\n zoomInTitle: {\n type: String\n },\n zoomOutText: {\n type: String\n },\n zoomOutTitle: {\n type: String\n }\n}, nt = (t, o) => {\n const { options: e, methods: n } = V(\n t,\n o\n );\n return { options: L(\n t,\n Ae,\n e\n ), methods: n };\n}, Tt = g({\n name: \"LControlZoom\",\n props: Ae,\n setup(t, o) {\n const e = c(), n = h(j), a = m(K), { options: s, methods: l } = nt(t, e);\n return O(async () => {\n const { control: r } = n ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(r.zoom(s)), S(l, e.value, t), a({ leafletObject: e.value }), f(() => o.emit(\"ready\", e.value));\n }), { leafletObject: e };\n },\n render() {\n return null;\n }\n}), ne = {\n ...Z\n}, le = (t, o, e) => {\n const { options: n, methods: a } = Y(\n t,\n o,\n e\n ), s = L(\n t,\n ne,\n n\n ), l = {\n ...a,\n addLayer(r) {\n o.value.addLayer(r.leafletObject);\n },\n removeLayer(r) {\n o.value.removeLayer(r.leafletObject);\n }\n };\n return G(I, l.addLayer), G(oe, l.removeLayer), { options: s, methods: l };\n}, _e = {\n ...ne\n}, st = (t, o, e) => {\n const { options: n, methods: a } = le(\n t,\n o,\n e\n ), s = L(\n t,\n _e,\n n\n ), l = {\n ...a\n };\n return { options: s, methods: l };\n}, wt = g({\n props: _e,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { methods: l, options: r } = st(\n t,\n e,\n o\n );\n return O(async () => {\n const { featureGroup: i } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(\n i(void 0, r)\n );\n const u = T(o.attrs);\n e.value.on(u), S(l, e.value, t), s({\n ...t,\n ...l,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), Ge = {\n ...ne,\n geojson: {\n type: [Object, Array],\n custom: !0\n },\n optionsStyle: {\n type: Function,\n custom: !0\n }\n}, at = (t, o, e) => {\n const { options: n, methods: a } = le(\n t,\n o,\n e\n ), s = L(\n t,\n Ge,\n n\n );\n Object.prototype.hasOwnProperty.call(t, \"optionsStyle\") && (s.style = t.optionsStyle);\n const l = {\n ...a,\n setGeojson(r) {\n o.value.clearLayers(), o.value.addData(r);\n },\n setOptionsStyle(r) {\n o.value.setStyle(r);\n },\n getGeoJSONData() {\n return o.value.toGeoJSON();\n },\n getBounds() {\n return o.value.getBounds();\n }\n };\n return { options: s, methods: l };\n}, It = g({\n props: Ge,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { methods: l, options: r } = at(t, e, o);\n return O(async () => {\n const { geoJSON: i } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(i(t.geojson, r));\n const u = T(o.attrs);\n e.value.on(u), S(l, e.value, t), s({\n ...t,\n ...l,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), ie = {\n ...Z,\n opacity: {\n type: Number\n },\n zIndex: {\n type: Number\n },\n tileSize: {\n type: [Number, Array, Object]\n },\n noWrap: {\n type: Boolean,\n default: void 0\n },\n minZoom: {\n type: Number\n },\n maxZoom: {\n type: Number\n }\n}, Me = (t, o, e) => {\n const { options: n, methods: a } = Y(\n t,\n o,\n e\n ), s = L(\n t,\n ie,\n n\n ), l = {\n ...a,\n setTileComponent() {\n var r;\n (r = o.value) == null || r.redraw();\n }\n };\n return se(() => {\n o.value.off();\n }), { options: s, methods: l };\n}, rt = (t, o, e, n) => t.extend({\n initialize(a) {\n this.tileComponents = {}, this.on(\"tileunload\", this._unloadTile), e.setOptions(this, a);\n },\n createTile(a) {\n const s = this._tileCoordsToKey(a);\n this.tileComponents[s] = o.create(\"div\");\n const l = z({ setup: n, props: [\"coords\"] }, { coords: a });\n return Je(l, this.tileComponents[s]), this.tileComponents[s];\n },\n _unloadTile(a) {\n const s = this._tileCoordsToKey(a.coords);\n this.tileComponents[s] && (this.tileComponents[s].innerHTML = \"\", this.tileComponents[s] = void 0);\n }\n}), At = g({\n props: {\n ...ie,\n childRender: {\n type: Function,\n required: !0\n }\n },\n setup(t, o) {\n const e = c(), n = c(null), a = c(!1), s = h(j), l = m(I), { options: r, methods: i } = Me(t, e, o);\n return O(async () => {\n const { GridLayer: u, DomUtil: d, Util: y } = s ? b.L : await import(\"leaflet/dist/leaflet-src.esm\"), A = rt(\n u,\n d,\n y,\n t.childRender\n );\n e.value = C(new A(r));\n const v = T(o.attrs);\n e.value.on(v), S(i, e.value, t), l({\n ...t,\n ...i,\n leafletObject: e.value\n }), a.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { root: n, ready: a, leafletObject: e };\n },\n render() {\n return this.ready ? z(\"div\", { style: { display: \"none\" }, ref: \"root\" }) : null;\n }\n}), pe = {\n iconUrl: {\n type: String\n },\n iconRetinaUrl: {\n type: String\n },\n iconSize: {\n type: [Object, Array]\n },\n iconAnchor: {\n type: [Object, Array]\n },\n popupAnchor: {\n type: [Object, Array]\n },\n tooltipAnchor: {\n type: [Object, Array]\n },\n shadowUrl: {\n type: String\n },\n shadowRetinaUrl: {\n type: String\n },\n shadowSize: {\n type: [Object, Array]\n },\n shadowAnchor: {\n type: [Object, Array]\n },\n bgPos: {\n type: [Object, Array]\n },\n className: {\n type: String\n }\n}, _t = g({\n name: \"LIcon\",\n props: {\n ...pe,\n ...Q\n },\n setup(t, o) {\n const e = c(), n = h(j), a = m(be), s = m(fe), l = m(Le);\n let r, i, u, d, y;\n const A = (w, _, k) => {\n const N = w && w.innerHTML;\n if (!_) {\n k && y && a() && s(N);\n return;\n }\n const D = T(o.attrs);\n y && i(y, D);\n const { options: E } = X(t), F = L(\n t,\n pe,\n E\n );\n N && (F.html = N), y = F.html ? u(F) : d(F), r(y, D), l(y);\n }, v = () => {\n f(() => A(e.value, !0, !1));\n }, $ = () => {\n f(() => A(e.value, !1, !0));\n }, B = {\n setIconUrl: v,\n setIconRetinaUrl: v,\n setIconSize: v,\n setIconAnchor: v,\n setPopupAnchor: v,\n setTooltipAnchor: v,\n setShadowUrl: v,\n setShadowRetinaUrl: v,\n setShadowAnchor: v,\n setBgPos: v,\n setClassName: v,\n setHtml: v\n };\n return O(async () => {\n const {\n DomEvent: w,\n divIcon: _,\n icon: k\n } = n ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n r = w.on, i = w.off, u = _, d = k, S(B, {}, t), new MutationObserver($).observe(e.value, {\n attributes: !0,\n childList: !0,\n characterData: !0,\n subtree: !0\n }), v();\n }), { root: e };\n },\n render() {\n const t = this.$slots.default ? this.$slots.default() : void 0;\n return z(\"div\", { ref: \"root\" }, t);\n }\n}), Ne = {\n ...Z,\n opacity: {\n type: Number\n },\n alt: {\n type: String\n },\n interactive: {\n type: Boolean,\n default: void 0\n },\n crossOrigin: {\n type: Boolean,\n default: void 0\n },\n errorOverlayUrl: {\n type: String\n },\n zIndex: {\n type: Number\n },\n className: {\n type: String\n },\n url: {\n type: String,\n required: !0,\n custom: !0\n },\n bounds: {\n type: [Array, Object],\n required: !0,\n custom: !0\n }\n}, lt = (t, o, e) => {\n const { options: n, methods: a } = Y(\n t,\n o,\n e\n ), s = L(\n t,\n Ne,\n n\n ), l = {\n ...a,\n /**\n * Sets the opacity of the overlay.\n * @param {number} opacity\n */\n setOpacity(r) {\n return o.value.setOpacity(r);\n },\n /**\n * Changes the URL of the image.\n * @param {string} url\n */\n setUrl(r) {\n return o.value.setUrl(r);\n },\n /**\n * Update the bounds that this ImageOverlay covers\n * @param {LatLngBounds | Array>} bounds\n */\n setBounds(r) {\n return o.value.setBounds(r);\n },\n /**\n * Get the bounds that this ImageOverlay covers\n * @returns {LatLngBounds}\n */\n getBounds() {\n return o.value.getBounds();\n },\n /**\n * Returns the instance of HTMLImageElement used by this overlay.\n * @returns {HTMLElement}\n */\n getElement() {\n return o.value.getElement();\n },\n /**\n * Brings the layer to the top of all overlays.\n */\n bringToFront() {\n return o.value.bringToFront();\n },\n /**\n * Brings the layer to the bottom of all overlays.\n */\n bringToBack() {\n return o.value.bringToBack();\n },\n /**\n * Changes the zIndex of the image overlay.\n * @param {number} zIndex\n */\n setZIndex(r) {\n return o.value.setZIndex(r);\n }\n };\n return { options: s, methods: l };\n}, Gt = g({\n name: \"LImageOverlay\",\n props: Ne,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { options: l, methods: r } = lt(\n t,\n e,\n o\n );\n return O(async () => {\n const { imageOverlay: i } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(\n i(t.url, t.bounds, l)\n );\n const u = T(o.attrs);\n e.value.on(u), S(r, e.value, t), s({\n ...t,\n ...r,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), Mt = g({\n props: ne,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { methods: l } = le(t, e, o);\n return O(async () => {\n const { layerGroup: r } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(\n r(void 0, t.options)\n );\n const i = T(o.attrs);\n e.value.on(i), S(l, e.value, t), s({\n ...t,\n ...l,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n});\nfunction $e(t, o, e) {\n var n, a, s;\n o === void 0 && (o = 50), e === void 0 && (e = {});\n var l = (n = e.isImmediate) != null && n, r = (a = e.callback) != null && a, i = e.maxWait, u = Date.now(), d = [];\n function y() {\n if (i !== void 0) {\n var v = Date.now() - u;\n if (v + o >= i)\n return i - v;\n }\n return o;\n }\n var A = function() {\n var v = [].slice.call(arguments), $ = this;\n return new Promise(function(B, w) {\n var _ = l && s === void 0;\n if (s !== void 0 && clearTimeout(s), s = setTimeout(function() {\n if (s = void 0, u = Date.now(), !l) {\n var N = t.apply($, v);\n r && r(N), d.forEach(function(D) {\n return (0, D.resolve)(N);\n }), d = [];\n }\n }, y()), _) {\n var k = t.apply($, v);\n return r && r(k), B(k);\n }\n d.push({ resolve: B, reject: w });\n });\n };\n return A.cancel = function(v) {\n s !== void 0 && clearTimeout(s), d.forEach(function($) {\n return (0, $.reject)(v);\n }), d = [];\n }, A;\n}\nconst ye = {\n ...Q,\n /**\n * The center of the map, supports .sync modifier\n */\n center: {\n type: [Object, Array]\n },\n /**\n * The bounds of the map, supports .sync modifier\n */\n bounds: {\n type: [Array, Object]\n },\n /**\n * The max bounds of the map\n */\n maxBounds: {\n type: [Array, Object]\n },\n /**\n * The zoom of the map, supports .sync modifier\n */\n zoom: {\n type: Number\n },\n /**\n * The minZoom of the map\n */\n minZoom: {\n type: Number\n },\n /**\n * The maxZoom of the map\n */\n maxZoom: {\n type: Number\n },\n /**\n * The paddingBottomRight of the map\n */\n paddingBottomRight: {\n type: [Object, Array]\n },\n /**\n * The paddingTopLeft of the map\n */\n paddingTopLeft: {\n type: Object\n },\n /**\n * The padding of the map\n */\n padding: {\n type: Object\n },\n /**\n * The worldCopyJump option for the map\n */\n worldCopyJump: {\n type: Boolean,\n default: void 0\n },\n /**\n * The CRS to use for the map. Can be an object that defines a coordinate reference\n * system for projecting geographical points into screen coordinates and back\n * (see https://leafletjs.com/reference-1.7.1.html#crs-l-crs-base), or a string\n * name identifying one of Leaflet's defined CRSs, such as \"EPSG4326\".\n */\n crs: {\n type: [String, Object]\n },\n maxBoundsViscosity: {\n type: Number\n },\n inertia: {\n type: Boolean,\n default: void 0\n },\n inertiaDeceleration: {\n type: Number\n },\n inertiaMaxSpeed: {\n type: Number\n },\n easeLinearity: {\n type: Number\n },\n zoomAnimation: {\n type: Boolean,\n default: void 0\n },\n zoomAnimationThreshold: {\n type: Number\n },\n fadeAnimation: {\n type: Boolean,\n default: void 0\n },\n markerZoomAnimation: {\n type: Boolean,\n default: void 0\n },\n noBlockingAnimations: {\n type: Boolean,\n default: void 0\n },\n useGlobalLeaflet: {\n type: Boolean,\n default: !0,\n custom: !0\n }\n}, Nt = g({\n emits: [\"ready\", \"update:zoom\", \"update:center\", \"update:bounds\"],\n props: ye,\n setup(t, o) {\n const e = c(), n = Ke({\n ready: !1,\n layersToAdd: [],\n layersInControl: []\n }), { options: a } = X(t), s = L(\n t,\n ye,\n a\n ), l = R(I), r = R(oe), i = R(K), u = R(\n ve\n );\n G(j, t.useGlobalLeaflet);\n const d = x(() => {\n const B = {};\n return t.noBlockingAnimations && (B.animate = !1), B;\n }), y = x(() => {\n const B = d.value;\n return t.padding && (B.padding = t.padding), t.paddingTopLeft && (B.paddingTopLeft = t.paddingTopLeft), t.paddingBottomRight && (B.paddingBottomRight = t.paddingBottomRight), B;\n }), A = {\n moveend: $e((B) => {\n n.leafletRef && (o.emit(\"update:zoom\", n.leafletRef.getZoom()), o.emit(\"update:center\", n.leafletRef.getCenter()), o.emit(\"update:bounds\", n.leafletRef.getBounds()));\n }),\n overlayadd(B) {\n const w = n.layersInControl.find((_) => _.name === B.name);\n w && w.updateVisibleProp(!0);\n },\n overlayremove(B) {\n const w = n.layersInControl.find((_) => _.name === B.name);\n w && w.updateVisibleProp(!1);\n }\n };\n O(async () => {\n t.useGlobalLeaflet && (b.L = b.L || await import(\"leaflet\"));\n const {\n map: B,\n CRS: w,\n Icon: _,\n latLngBounds: k,\n latLng: N,\n DomEvent: D,\n stamp: E\n } = t.useGlobalLeaflet ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n try {\n s.beforeMapMount && await s.beforeMapMount();\n } catch (p) {\n console.error(\n `The following error occurred running the provided beforeMapMount hook ${p.message}`\n );\n }\n await Ye(_);\n const F = typeof s.crs == \"string\" ? w[s.crs] : s.crs;\n s.crs = F || w.EPSG3857;\n const W = {\n addLayer(p) {\n p.layerType !== void 0 && (n.layerControl === void 0 ? n.layersToAdd.push(p) : n.layersInControl.find(\n (q) => E(q.leafletObject) === E(p.leafletObject)\n ) || (n.layerControl.addLayer(p), n.layersInControl.push(p))), p.visible !== !1 && n.leafletRef.addLayer(p.leafletObject);\n },\n removeLayer(p) {\n p.layerType !== void 0 && (n.layerControl === void 0 ? n.layersToAdd = n.layersToAdd.filter(\n (P) => P.name !== p.name\n ) : (n.layerControl.removeLayer(p.leafletObject), n.layersInControl = n.layersInControl.filter(\n (P) => E(P.leafletObject) !== E(p.leafletObject)\n ))), n.leafletRef.removeLayer(p.leafletObject);\n },\n registerLayerControl(p) {\n n.layerControl = p, n.layersToAdd.forEach((P) => {\n n.layerControl.addLayer(P);\n }), n.layersToAdd = [], i(p);\n },\n registerControl(p) {\n n.leafletRef.addControl(p.leafletObject);\n },\n setZoom(p) {\n const P = n.leafletRef.getZoom();\n p !== P && n.leafletRef.setZoom(p, d.value);\n },\n setCrs(p) {\n const P = n.leafletRef.getBounds();\n n.leafletRef.options.crs = p, n.leafletRef.fitBounds(P, {\n animate: !1,\n padding: [0, 0]\n });\n },\n fitBounds(p) {\n n.leafletRef.fitBounds(p, y.value);\n },\n setBounds(p) {\n if (!p)\n return;\n const P = k(p);\n if (!P.isValid())\n return;\n !(n.lastSetBounds || n.leafletRef.getBounds()).equals(P, 0) && (n.lastSetBounds = P, n.leafletRef.fitBounds(P));\n },\n setCenter(p) {\n if (p == null)\n return;\n const P = N(p), q = n.lastSetCenter || n.leafletRef.getCenter();\n (q.lat !== P.lat || q.lng !== P.lng) && (n.lastSetCenter = P, n.leafletRef.panTo(P, d.value));\n }\n };\n ee(l, W.addLayer), ee(r, W.removeLayer), ee(i, W.registerControl), ee(u, W.registerLayerControl), n.leafletRef = C(B(e.value, s)), S(W, n.leafletRef, t);\n const qe = T(o.attrs);\n Qe(n.leafletRef, A), D.on(n.leafletRef.getContainer(), qe), n.ready = !0, f(() => o.emit(\"ready\", n.leafletRef));\n }), J(() => {\n me(A), n.leafletRef && (n.leafletRef.off(), n.leafletRef.remove());\n });\n const v = x(() => n.leafletRef), $ = x(() => n.ready);\n return { root: e, ready: $, leafletObject: v };\n },\n render() {\n return z(\n \"div\",\n { style: { width: \"100%\", height: \"100%\" }, ref: \"root\" },\n this.ready && this.$slots.default ? this.$slots.default() : {}\n );\n }\n}), it = [\"Symbol(Comment)\", \"Symbol(Text)\"], ut = [\"LTooltip\", \"LPopup\"], ke = {\n ...Z,\n draggable: {\n type: Boolean,\n default: void 0\n },\n icon: {\n type: [Object]\n },\n zIndexOffset: {\n type: Number\n },\n latLng: {\n type: [Object, Array],\n custom: !0,\n required: !0\n }\n}, ct = (t, o, e) => {\n const { options: n, methods: a } = Y(\n t,\n o,\n e\n ), s = L(\n t,\n ke,\n n\n ), l = {\n ...a,\n setDraggable(r) {\n o.value.dragging && (r ? o.value.dragging.enable() : o.value.dragging.disable());\n },\n latLngSync(r) {\n e.emit(\"update:latLng\", r.latlng), e.emit(\"update:lat-lng\", r.latlng);\n },\n setLatLng(r) {\n if (r != null && o.value) {\n const i = o.value.getLatLng();\n (!i || !i.equals(r)) && o.value.setLatLng(r);\n }\n }\n };\n return { options: s, methods: l };\n}, dt = (t, o) => {\n const e = o.slots.default && o.slots.default();\n return e && e.length && e.some(pt);\n};\nfunction pt(t) {\n return !(it.includes(t.type.toString()) || ut.includes(t.type.name));\n}\nconst $t = g({\n name: \"LMarker\",\n props: ke,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I);\n G(\n be,\n () => {\n var u;\n return !!((u = e.value) != null && u.getElement());\n }\n ), G(fe, (u) => {\n var y, A;\n const d = U((y = e.value) == null ? void 0 : y.getElement) && ((A = e.value) == null ? void 0 : A.getElement());\n d && (d.innerHTML = u);\n }), G(\n Le,\n (u) => {\n var d;\n return ((d = e.value) == null ? void 0 : d.setIcon) && e.value.setIcon(u);\n }\n );\n const { options: l, methods: r } = ct(t, e, o), i = {\n moveHandler: $e(r.latLngSync)\n };\n return O(async () => {\n const { marker: u, divIcon: d } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n dt(l, o) && (l.icon = d({ className: \"\" })), e.value = C(u(t.latLng, l));\n const y = T(o.attrs);\n e.value.on(y), e.value.on(\"move\", i.moveHandler), S(r, e.value, t), s({\n ...t,\n ...r,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), J(() => me(i)), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), ue = {\n ...ae,\n smoothFactor: {\n type: Number\n },\n noClip: {\n type: Boolean,\n default: void 0\n },\n latLngs: {\n type: Array,\n required: !0,\n custom: !0\n }\n}, Ue = (t, o, e) => {\n const { options: n, methods: a } = Ce(\n t,\n o,\n e\n ), s = L(\n t,\n ue,\n n\n ), l = {\n ...a,\n setSmoothFactor(r) {\n o.value.setStyle({ smoothFactor: r });\n },\n setNoClip(r) {\n o.value.setStyle({ noClip: r });\n },\n addLatLng(r) {\n o.value.addLatLng(r);\n }\n };\n return { options: s, methods: l };\n}, te = {\n ...ue\n}, ze = (t, o, e) => {\n const { options: n, methods: a } = Ue(\n t,\n o,\n e\n ), s = L(\n t,\n te,\n n\n ), l = {\n ...a,\n toGeoJSON(r) {\n return o.value.toGeoJSON(r);\n }\n };\n return { options: s, methods: l };\n}, kt = g({\n name: \"LPolygon\",\n props: te,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { options: l, methods: r } = ze(t, e, o);\n return O(async () => {\n const { polygon: i } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(i(t.latLngs, l));\n const u = T(o.attrs);\n e.value.on(u), S(r, e.value, t), s({\n ...t,\n ...r,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), Ut = g({\n name: \"LPolyline\",\n props: ue,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { options: l, methods: r } = Ue(t, e, o);\n return O(async () => {\n const { polyline: i } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(\n i(t.latLngs, l)\n );\n const u = T(o.attrs);\n e.value.on(u), S(r, e.value, t), s({\n ...t,\n ...r,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), De = {\n ...Q,\n content: {\n type: String,\n default: null\n }\n}, Ee = (t, o) => {\n const { options: e, methods: n } = X(t), a = {\n ...n,\n setContent(s) {\n o.value && s !== null && s !== void 0 && o.value.setContent(s);\n }\n };\n return { options: e, methods: a };\n}, Fe = (t) => t.default ? z(\"div\", { ref: \"root\" }, t.default()) : null, yt = {\n ...De,\n latLng: {\n type: [Object, Array],\n default: () => []\n }\n}, mt = (t, o) => {\n const { options: e, methods: n } = Ee(t, o);\n return { options: e, methods: n };\n}, zt = g({\n name: \"LPopup\",\n props: yt,\n setup(t, o) {\n const e = c(), n = c(null), a = h(j), s = m(he), l = m(Oe), { options: r, methods: i } = mt(t, e);\n return O(async () => {\n const { popup: u } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(u(r)), t.latLng !== void 0 && e.value.setLatLng(t.latLng), S(i, e.value, t);\n const d = T(o.attrs);\n e.value.on(d), e.value.setContent(t.content || n.value || \"\"), s(e.value), f(() => o.emit(\"ready\", e.value));\n }), J(() => {\n l();\n }), { root: n, leafletObject: e };\n },\n render() {\n return Fe(this.$slots);\n }\n}), Ze = {\n ...te,\n latLngs: {\n ...te.latLngs,\n required: !1\n },\n bounds: {\n type: Object,\n custom: !0\n }\n}, vt = (t, o, e) => {\n const { options: n, methods: a } = ze(\n t,\n o,\n e\n ), s = L(\n t,\n Ze,\n n\n ), l = {\n ...a,\n setBounds(r) {\n o.value.setBounds(r);\n },\n setLatLngs(r) {\n o.value.setBounds(r);\n }\n };\n return { options: s, methods: l };\n}, Dt = g({\n name: \"LRectangle\",\n props: Ze,\n setup(t, o) {\n const e = c(), n = c(!1), a = h(j), s = m(I), { options: l, methods: r } = vt(t, e, o);\n return O(async () => {\n const { rectangle: i, latLngBounds: u } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\"), d = t.bounds ? u(t.bounds) : u(t.latLngs || []);\n e.value = C(i(d, l));\n const y = T(o.attrs);\n e.value.on(y), S(r, e.value, t), s({\n ...t,\n ...r,\n leafletObject: e.value\n }), n.value = !0, f(() => o.emit(\"ready\", e.value));\n }), { ready: n, leafletObject: e };\n },\n render() {\n return M(this.ready, this.$slots);\n }\n}), ce = {\n ...ie,\n tms: {\n type: Boolean,\n default: void 0\n },\n subdomains: {\n type: [String, Array],\n validator: (t) => typeof t == \"string\" ? !0 : Array.isArray(t) ? t.every((o) => typeof o == \"string\") : !1\n },\n detectRetina: {\n type: Boolean,\n default: void 0\n },\n url: {\n type: String,\n required: !0,\n custom: !0\n }\n}, He = (t, o, e) => {\n const { options: n, methods: a } = Me(t, o, e), s = L(\n t,\n ce,\n n\n ), l = {\n ...a\n };\n return { options: s, methods: l };\n}, Et = g({\n props: ce,\n setup(t, o) {\n const e = c(), n = h(j), a = m(I), { options: s, methods: l } = He(t, e, o);\n return O(async () => {\n const { tileLayer: r } = n ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(r(t.url, s));\n const i = T(o.attrs);\n e.value.on(i), S(l, e.value, t), a({\n ...t,\n ...l,\n leafletObject: e.value\n }), f(() => o.emit(\"ready\", e.value));\n }), { leafletObject: e };\n },\n render() {\n return null;\n }\n}), bt = {\n ...De\n}, ft = (t, o) => {\n const { options: e, methods: n } = Ee(t, o), a = m(Se);\n return J(() => {\n a();\n }), { options: e, methods: n };\n}, Ft = g({\n name: \"LTooltip\",\n props: bt,\n setup(t, o) {\n const e = c(), n = c(null), a = h(j), s = m(ge), { options: l, methods: r } = ft(t, e);\n return O(async () => {\n const { tooltip: i } = a ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(i(l)), S(r, e.value, t);\n const u = T(o.attrs);\n e.value.on(u), e.value.setContent(t.content || n.value || \"\"), s(e.value), f(() => o.emit(\"ready\", e.value));\n }), { root: n, leafletObject: e };\n },\n render() {\n return Fe(this.$slots);\n }\n}), We = {\n ...ce,\n layers: {\n type: String,\n required: !0\n },\n styles: {\n type: String\n },\n format: {\n type: String\n },\n transparent: {\n type: Boolean,\n default: void 0\n },\n version: {\n type: String\n },\n crs: {\n type: Object\n },\n uppercase: {\n type: Boolean,\n default: void 0\n }\n}, Lt = (t, o, e) => {\n const { options: n, methods: a } = He(t, o, e);\n return {\n options: L(\n t,\n We,\n n\n ),\n methods: {\n ...a\n }\n };\n}, Zt = g({\n props: We,\n setup(t, o) {\n const e = c(), n = h(j), a = m(I), { options: s, methods: l } = Lt(\n t,\n e,\n o\n );\n return O(async () => {\n const { tileLayer: r } = n ? b.L : await import(\"leaflet/dist/leaflet-src.esm\");\n e.value = C(\n r.wms(t.url, s)\n );\n const i = T(o.attrs);\n e.value.on(i), S(l, e.value, t), a({\n ...t,\n ...l,\n leafletObject: e.value\n }), f(() => o.emit(\"ready\", e.value));\n }), { leafletObject: e };\n },\n render() {\n return null;\n }\n});\nexport {\n Ot as LCircle,\n St as LCircleMarker,\n jt as LControl,\n Ct as LControlAttribution,\n Pt as LControlLayers,\n Bt as LControlScale,\n Tt as LControlZoom,\n wt as LFeatureGroup,\n It as LGeoJson,\n At as LGridLayer,\n _t as LIcon,\n Gt as LImageOverlay,\n Mt as LLayerGroup,\n Nt as LMap,\n $t as LMarker,\n kt as LPolygon,\n Ut as LPolyline,\n zt as LPopup,\n Dt as LRectangle,\n Et as LTileLayer,\n Ft as LTooltip,\n Zt as LWmsTileLayer\n};\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { LIcon, LMarker } from '@vue-leaflet/vue-leaflet'\n import { toRefs } from 'vue'\n\n import { TCoordinates } from '@/types/workouts'\n\n interface Props {\n markerCoordinates: TCoordinates\n isStart: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'CustomMarker',\n props: {\n markerCoordinates: null,\n isStart: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n markerCoordinates: TCoordinates\n isStart: boolean\n };\n\n \n\n const { isStart, markerCoordinates } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(markerCoordinates).latitude)\n ? (_openBlock(), _createBlock(_unref(LMarker), {\n key: 0,\n \"lat-lng\": [_unref(markerCoordinates).latitude, _unref(markerCoordinates).longitude]\n }, {\n default: _withCtx(() => [\n _createVNode(_unref(LIcon), {\n \"icon-url\": `/img/workouts/${_unref(isStart) ? 'start' : 'finish'}.svg`,\n iconSize: [15, 15]\n }, null, 8, [\"icon-url\"])\n ]),\n _: 1\n }, 8, [\"lat-lng\"]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./CustomMarker.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CustomMarker.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, normalizeClass as _normalizeClass, createBlock as _createBlock, resolveComponent as _resolveComponent, toDisplayString as _toDisplayString, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4582e1d0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-map\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"leaflet-container\"\n}\nconst _hoisted_3 = { key: 1 }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-refresh\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_5 = {\n key: 1,\n class: \"no-map\"\n}\n\nimport { gpx } from '@tmcw/togeojson'\n import {\n LControl,\n LControlLayers,\n LGeoJson,\n LLayerGroup,\n LMap,\n LMarker,\n LTileLayer,\n } from '@vue-leaflet/vue-leaflet'\n import { ComputedRef, computed, ref, toRefs, withDefaults } from 'vue'\n import 'leaflet/dist/leaflet.css'\n\n import CustomMarker from '@/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue'\n import { ROOT_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { GeoJSONData } from '@/types/geojson'\n import { IWorkoutData, TCoordinates } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getApiUrl } from '@/utils'\n\n interface Props {\n workoutData: IWorkoutData\n markerCoordinates?: TCoordinates\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n workoutData: null,\n markerCoordinates: { default: () => ({} as TCoordinates) }\n },\n setup(__props: any) {\n\nconst props = __props as { workoutData: IWorkoutData, markerCoordinates: TCoordinates };\n\n \n\n const store = useStore()\n\n const { workoutData, markerCoordinates } = toRefs(props)\n const workoutMap = ref null }\n }>(null)\n const bounds = computed(() => getBounds())\n const appConfig: ComputedRef = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const center = computed(() => getCenter(bounds))\n const geoJson = computed(() =>\n props.workoutData && props.workoutData.gpx\n ? getGeoJson(props.workoutData.gpx)\n : {}\n )\n const startMarkerCoordinates = computed(() =>\n props.workoutData && props.workoutData.chartData.length > 0\n ? {\n latitude: props.workoutData.chartData[0].latitude,\n longitude: props.workoutData.chartData[0].longitude,\n }\n : {}\n )\n const endMarkerCoordinates = computed(() =>\n props.workoutData && props.workoutData.chartData.length > 0\n ? {\n latitude:\n props.workoutData.chartData[props.workoutData.chartData.length - 1]\n .latitude,\n longitude:\n props.workoutData.chartData[props.workoutData.chartData.length - 1]\n .longitude,\n }\n : {}\n )\n const isFullscreen = ref(false)\n\n function getGeoJson(gpxContent: string): GeoJSONData {\n if (!gpxContent || gpxContent !== '') {\n try {\n const jsonData = gpx(\n new DOMParser().parseFromString(gpxContent, 'text/xml')\n )\n return { jsonData }\n } catch (e) {\n console.error('Invalid gpx content')\n return {}\n }\n }\n return {}\n }\n function getCenter(bounds: ComputedRef): number[] {\n return [\n (bounds.value[0][0] + bounds.value[1][0]) / 2,\n (bounds.value[0][1] + bounds.value[1][1]) / 2,\n ]\n }\n function fitBounds(bounds: number[][]) {\n if (workoutMap.value?.leafletObject) {\n workoutMap.value?.leafletObject.fitBounds(bounds)\n }\n }\n function getBounds() {\n return props.workoutData\n ? [\n [\n props.workoutData.workout.bounds[0],\n props.workoutData.workout.bounds[1],\n ],\n [\n props.workoutData.workout.bounds[2],\n props.workoutData.workout.bounds[3],\n ],\n ]\n : []\n }\n function resetZoom() {\n workoutMap.value?.leafletObject.fitBounds(getBounds())\n }\n function toggleFullscreen() {\n isFullscreen.value = !isFullscreen.value\n if (!isFullscreen.value) {\n setTimeout(() => {\n resetZoom()\n }, 100)\n }\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_VFullscreen = _resolveComponent(\"VFullscreen\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(workoutData).loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n (_unref(workoutData).workout.with_gpx)\n ? (_openBlock(), _createBlock(_component_VFullscreen, {\n key: 0,\n modelValue: isFullscreen.value,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((isFullscreen).value = $event))\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"leaflet-container\", { 'fullscreen-map': isFullscreen.value }])\n }, [\n (_unref(geoJson).jsonData && _unref(center) && _unref(bounds).length === 2)\n ? (_openBlock(), _createBlock(_unref(LMap), {\n key: 0,\n zoom: 13,\n maxZoom: 19,\n center: _unref(center),\n bounds: _unref(bounds),\n zoomAnimation: false,\n ref_key: \"workoutMap\",\n ref: workoutMap,\n onReady: _cache[0] || (_cache[0] = ($event: any) => (fitBounds(_unref(bounds))))\n }, {\n default: _withCtx(() => [\n _createVNode(_unref(LControlLayers)),\n _createVNode(_unref(LControl), {\n position: \"topleft\",\n class: \"map-control\",\n tabindex: \"0\",\n role: \"button\",\n \"aria-label\": _ctx.$t('workouts.RESET_ZOOM'),\n onClick: resetZoom\n }, {\n default: _withCtx(() => [\n _hoisted_4\n ]),\n _: 1\n }, 8, [\"aria-label\"]),\n _createVNode(_unref(LControl), {\n position: \"topleft\",\n class: \"map-control\",\n tabindex: \"0\",\n role: \"button\",\n \"aria-label\": \n _ctx.$t(`workouts.${isFullscreen.value ? 'EXIT' : 'VIEW'}_FULLSCREEN`)\n ,\n onClick: toggleFullscreen\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"i\", {\n class: _normalizeClass(`fa fa-${isFullscreen.value ? 'compress' : 'arrows-alt'}`),\n \"aria-hidden\": \"true\"\n }, null, 2)\n ]),\n _: 1\n }, 8, [\"aria-label\"]),\n _createVNode(_unref(LTileLayer), {\n url: `${_unref(getApiUrl)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,\n attribution: _unref(appConfig).map_attribution,\n bounds: _unref(bounds)\n }, null, 8, [\"url\", \"attribution\", \"bounds\"]),\n _createVNode(_unref(LGeoJson), {\n geojson: _unref(geoJson).jsonData\n }, null, 8, [\"geojson\"]),\n (_unref(markerCoordinates).latitude)\n ? (_openBlock(), _createBlock(_unref(LMarker), {\n key: 0,\n \"lat-lng\": [\n _unref(markerCoordinates).latitude,\n _unref(markerCoordinates).longitude,\n ]\n }, null, 8, [\"lat-lng\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(_unref(LLayerGroup), {\n name: _ctx.$t('workouts.START_AND_FINISH'),\n \"layer-type\": \"overlay\"\n }, {\n default: _withCtx(() => [\n (_unref(startMarkerCoordinates).latitude)\n ? (_openBlock(), _createBlock(CustomMarker, {\n key: 0,\n markerCoordinates: _unref(startMarkerCoordinates),\n isStart: true\n }, null, 8, [\"markerCoordinates\"]))\n : _createCommentVNode(\"\", true),\n (_unref(endMarkerCoordinates).latitude)\n ? (_openBlock(), _createBlock(CustomMarker, {\n key: 1,\n markerCoordinates: _unref(endMarkerCoordinates),\n isStart: false\n }, null, 8, [\"markerCoordinates\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"name\"])\n ]),\n _: 1\n }, 8, [\"center\", \"bounds\"]))\n : _createCommentVNode(\"\", true)\n ], 2)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_5, _toDisplayString(_ctx.$t('workouts.NO_MAP')), 1))\n ]))\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=4582e1d0&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4582e1d0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref, withKeys as _withKeys, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, withCtx as _withCtx, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-118e2382\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workout-detail\" }\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n withDefaults,\n } from 'vue'\n import { useRoute } from 'vue-router'\n\n import WorkoutCardTitle from '@/components/Workout/WorkoutDetail/WorkoutCardTitle.vue'\n import WorkoutData from '@/components/Workout/WorkoutDetail/WorkoutData.vue'\n import WorkoutMap from '@/components/Workout/WorkoutDetail/WorkoutMap/index.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import {\n IWorkout,\n IWorkoutData,\n IWorkoutObject,\n IWorkoutSegment,\n TCoordinates,\n } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { formatWorkoutDate, getDateWithTZ } from '@/utils/dates'\n\n interface Props {\n authUser: IAuthUserProfile\n displaySegment: boolean\n sports: ISport[]\n workoutData: IWorkoutData\n markerCoordinates?: TCoordinates\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n authUser: null,\n displaySegment: { type: Boolean },\n sports: null,\n workoutData: null,\n markerCoordinates: { default: () => ({} as TCoordinates) }\n },\n setup(__props: any) {\n\nconst props = __props as { authUser: IAuthUserProfile, displaySegment: boolean, sports: ISport[], workoutData: IWorkoutData, markerCoordinates: TCoordinates };\n\n \n\n const route = useRoute()\n const store = useStore()\n\n const { authUser, markerCoordinates, workoutData } = toRefs(props)\n const workout: ComputedRef = computed(\n () => props.workoutData.workout\n )\n const segmentId: Ref = ref(\n route.params.workoutId ? +route.params.segmentId : null\n )\n const segment: ComputedRef = computed(() =>\n workout.value.segments.length > 0 && segmentId.value\n ? workout.value.segments[+segmentId.value - 1]\n : null\n )\n const displayModal: Ref = ref(false)\n const sport = computed(() =>\n props.sports\n ? props.sports.find(\n (sport) => sport.id === props.workoutData.workout.sport_id\n )\n : {}\n )\n const workoutObject = computed(() =>\n getWorkoutObject(workout.value, segment.value)\n )\n\n function getWorkoutObjectUrl(\n workout: IWorkout,\n displaySegment: boolean,\n segmentId: number | null\n ): Record {\n const previousUrl =\n displaySegment && segmentId && segmentId !== 1\n ? `/workouts/${workout.id}/segment/${segmentId - 1}`\n : !displaySegment && workout.previous_workout\n ? `/workouts/${workout.previous_workout}`\n : null\n const nextUrl =\n displaySegment && segmentId && segmentId < workout.segments.length\n ? `/workouts/${workout.id}/segment/${segmentId + 1}`\n : !displaySegment && workout.next_workout\n ? `/workouts/${workout.next_workout}`\n : null\n return {\n previousUrl,\n nextUrl,\n }\n }\n function getWorkoutObject(\n workout: IWorkout,\n segment: IWorkoutSegment | null\n ): IWorkoutObject {\n const urls = getWorkoutObjectUrl(\n workout,\n props.displaySegment,\n segmentId.value ? +segmentId.value : null\n )\n const workoutDate = formatWorkoutDate(\n getDateWithTZ(\n props.workoutData.workout.workout_date,\n props.authUser.timezone\n ),\n props.authUser.date_format\n )\n return {\n ascent: segment ? segment.ascent : workout.ascent,\n aveSpeed: segment ? segment.ave_speed : workout.ave_speed,\n distance: segment ? segment.distance : workout.distance,\n descent: segment ? segment.descent : workout.descent,\n duration: segment ? segment.duration : workout.duration,\n maxAlt: segment ? segment.max_alt : workout.max_alt,\n maxSpeed: segment ? segment.max_speed : workout.max_speed,\n minAlt: segment ? segment.min_alt : workout.min_alt,\n moving: segment ? segment.moving : workout.moving,\n nextUrl: urls.nextUrl,\n pauses: segment ? segment.pauses : workout.pauses,\n previousUrl: urls.previousUrl,\n records: segment ? [] : workout.records,\n segmentId: segment ? segment.segment_id : null,\n title: workout.title,\n type: props.displaySegment ? 'SEGMENT' : 'WORKOUT',\n workoutDate: workoutDate.workout_date,\n weatherEnd: segment ? null : workout.weather_end,\n weatherStart: segment ? null : workout.weather_start,\n with_gpx: workout.with_gpx,\n workoutId: workout.id,\n workoutTime: workoutDate.workout_time,\n }\n }\n function updateDisplayModal(value: boolean) {\n displayModal.value = value\n }\n function cancelDelete() {\n updateDisplayModal(false)\n }\n function deleteWorkout(workoutId: string) {\n updateDisplayModal(false)\n store.dispatch(WORKOUTS_STORE.ACTIONS.DELETE_WORKOUT, {\n workoutId: workoutId,\n })\n }\n function scrollToTop() {\n window.scrollTo({\n top: 0,\n behavior: 'smooth',\n })\n }\n\n watch(\n () => route.params.segmentId,\n async (newSegmentId) => {\n if (newSegmentId) {\n segmentId.value = +newSegmentId\n scrollToTop()\n }\n }\n )\n watch(\n () => route.params.workoutId,\n async (workoutId) => {\n if (workoutId) {\n displayModal.value = false\n scrollToTop()\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Modal = _resolveComponent(\"Modal\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (displayModal.value)\n ? (_openBlock(), _createBlock(_component_Modal, {\n key: 0,\n title: _ctx.$t('common.CONFIRMATION'),\n message: _ctx.$t('workouts.WORKOUT_DELETION_CONFIRMATION'),\n onConfirmAction: _cache[0] || (_cache[0] = ($event: any) => (deleteWorkout(_unref(workoutObject).workoutId))),\n onCancelAction: cancelDelete,\n onKeydown: _withKeys(cancelDelete, [\"esc\"])\n }, null, 8, [\"title\", \"message\", \"onKeydown\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createVNode(WorkoutCardTitle, {\n sport: _unref(sport),\n workoutObject: _unref(workoutObject),\n onDisplayModal: _cache[1] || (_cache[1] = ($event: any) => (updateDisplayModal(true)))\n }, null, 8, [\"sport\", \"workoutObject\"])\n ]),\n content: _withCtx(() => [\n _createVNode(WorkoutMap, {\n workoutData: _unref(workoutData),\n markerCoordinates: _unref(markerCoordinates)\n }, null, 8, [\"workoutData\", \"markerCoordinates\"]),\n _createVNode(WorkoutData, {\n workoutObject: _unref(workoutObject),\n useImperialUnits: _unref(authUser).imperial_units,\n displayHARecord: _unref(authUser).display_ascent\n }, null, 8, [\"workoutObject\", \"useImperialUnits\", \"displayHARecord\"])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=118e2382&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-118e2382\"]])\n\nexport default __exports__","import { Chart, LegendItem } from 'chart.js'\n\nconst getOrCreateLegendList = (id: string): HTMLUListElement => {\n const legendContainer = document.getElementById(id)\n if (legendContainer) {\n let listContainer = legendContainer.querySelector('ul')\n if (!listContainer) {\n listContainer = document.createElement('ul')\n legendContainer.appendChild(listContainer)\n }\n return listContainer\n }\n throw new Error('No legend container')\n}\n\nexport const htmlLegendPlugin = {\n id: 'htmlLegend',\n afterUpdate(\n chart: Chart,\n args: Record,\n options: Record\n ): void {\n const ul = getOrCreateLegendList(options.containerID)\n while (ul.firstChild) {\n ul.firstChild.remove()\n }\n\n const legendItems = chart.options.plugins?.legend?.labels?.generateLabels\n ? chart.options.plugins?.legend?.labels?.generateLabels(chart)\n : []\n\n legendItems.forEach((item: LegendItem) => {\n if (\n !chart.config.options?.scales?.yElevation?.display &&\n item.datasetIndex === 1 // elevation\n ) {\n return\n }\n const li = document.createElement('li')\n li.onclick = () => {\n if (item.datasetIndex !== undefined) {\n chart.setDatasetVisibility(\n item.datasetIndex,\n !chart.isDatasetVisible(item.datasetIndex)\n )\n chart.update()\n }\n }\n\n const checkBox = document.createElement('input')\n if (checkBox) {\n checkBox.type = 'checkbox'\n checkBox.id = item.text\n checkBox.checked = !item.hidden\n }\n\n const text = document.createTextNode(item.text)\n\n const boxSpan = document.createElement('span')\n if (boxSpan) {\n boxSpan.style.background = String(item.fillStyle)\n boxSpan.style.borderColor = String(item.strokeStyle)\n }\n\n li.appendChild(checkBox)\n li.appendChild(text)\n li.appendChild(boxSpan)\n ul.appendChild(li)\n })\n },\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, unref as _unref, mergeProps as _mergeProps, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-68415552\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-chart\" }\nconst _hoisted_2 = { class: \"chart-radio\" }\nconst _hoisted_3 = [\"checked\"]\nconst _hoisted_4 = [\"checked\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"chart-legend\" }, null, -1))\nconst _hoisted_6 = { class: \"chart-info\" }\nconst _hoisted_7 = { class: \"no-data-cleaning\" }\nconst _hoisted_8 = {\n key: 0,\n class: \"elevation-start\"\n}\nconst _hoisted_9 = [\"checked\"]\n\nimport { ChartData, ChartOptions } from 'chart.js'\n import { ComputedRef, computed, ref, toRefs } from 'vue'\n import { LineChart, useLineChart } from 'vue-chart-3'\n import { useI18n } from 'vue-i18n'\n\n import { htmlLegendPlugin } from '@/components/Workout/WorkoutDetail/WorkoutChart/legend'\n import { TUnit } from '@/types/units'\n import { IAuthUserProfile } from '@/types/user'\n import {\n IWorkoutChartData,\n IWorkoutData,\n TCoordinates,\n } from '@/types/workouts'\n import { units } from '@/utils/units'\n import { getDatasets } from '@/utils/workouts'\n\n interface Props {\n authUser: IAuthUserProfile\n workoutData: IWorkoutData\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n authUser: null,\n workoutData: null\n },\n emits: ['getCoordinates'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n authUser: IAuthUserProfile\n workoutData: IWorkoutData\n };\n\n \n\n \n\n const { t } = useI18n()\n\n const { authUser, workoutData } = toRefs(props)\n const displayDistance = ref(true)\n const beginElevationAtZero = ref(authUser.value.start_elevation_at_zero)\n const datasets: ComputedRef = computed(() =>\n getDatasets(workoutData.value.chartData, t, authUser.value.imperial_units)\n )\n const hasElevation = computed(\n () => datasets.value && datasets.value.datasets.elevation.data.length > 0\n )\n const fromKmUnit = getUnitTo('km')\n const fromMUnit = getUnitTo('m')\n const chartData: ComputedRef> = computed(() => ({\n labels: displayDistance.value\n ? datasets.value.distance_labels\n : datasets.value.duration_labels,\n datasets: JSON.parse(\n JSON.stringify([\n datasets.value.datasets.speed,\n datasets.value.datasets.elevation,\n ])\n ),\n }))\n const coordinates: ComputedRef = computed(\n () => datasets.value.coordinates\n )\n const options = computed>(() => ({\n responsive: true,\n maintainAspectRatio: true,\n animation: false,\n layout: {\n padding: {\n top: 22,\n },\n },\n scales: {\n x: {\n grid: {\n drawOnChartArea: false,\n },\n ticks: {\n count: 10,\n callback: function (value) {\n return displayDistance.value\n ? Number(value).toFixed(2)\n : formatDuration(value)\n },\n },\n type: 'linear',\n bounds: 'data',\n title: {\n display: true,\n text: displayDistance.value\n ? t('workouts.DISTANCE') + ` (${fromKmUnit})`\n : t('workouts.DURATION'),\n },\n },\n ySpeed: {\n grid: {\n drawOnChartArea: false,\n },\n position: 'left',\n title: {\n display: true,\n text: t('workouts.SPEED') + ` (${fromKmUnit}/h)`,\n },\n },\n yElevation: {\n beginAtZero: beginElevationAtZero.value,\n display: hasElevation.value,\n grid: {\n drawOnChartArea: false,\n },\n position: 'right',\n title: {\n display: true,\n text: t('workouts.ELEVATION') + ` (${fromMUnit})`,\n },\n },\n },\n elements: {\n point: {\n pointStyle: 'circle',\n pointRadius: 0,\n },\n },\n plugins: {\n datalabels: {\n display: false,\n },\n tooltip: {\n interaction: {\n intersect: false,\n mode: 'index',\n },\n callbacks: {\n label: function (context) {\n const label = ` ${context.dataset.label}: ${context.formattedValue}`\n return context.dataset.yAxisID === 'yElevation'\n ? label + ` ${fromMUnit}`\n : label + ` ${fromKmUnit}/h`\n },\n title: function (tooltipItems) {\n if (tooltipItems.length > 0) {\n emitCoordinates(coordinates.value[tooltipItems[0].dataIndex])\n }\n return tooltipItems.length === 0\n ? ''\n : displayDistance.value\n ? `${t('workouts.DISTANCE')}: ${\n tooltipItems[0].label\n } ${fromKmUnit}`\n : `${t('workouts.DURATION')}: ${formatDuration(\n tooltipItems[0].label.replace(',', '')\n )}`\n },\n },\n },\n legend: {\n display: false,\n },\n htmlLegend: {\n containerID: 'chart-legend',\n displayElevation: hasElevation.value,\n },\n },\n }))\n const { lineChartProps } = useLineChart({\n chartData,\n options,\n plugins: [htmlLegendPlugin],\n })\n\n function updateDisplayDistance() {\n displayDistance.value = !displayDistance.value\n }\n function formatDuration(duration: string | number): string {\n return new Date(+duration * 1000).toISOString().substr(11, 8)\n }\n function emitCoordinates(coordinates: TCoordinates) {\n emit('getCoordinates', coordinates)\n }\n function emitEmptyCoordinates() {\n emitCoordinates({ latitude: null, longitude: null })\n }\n function getUnitTo(unitFrom: TUnit): TUnit {\n return props.authUser.imperial_units\n ? units[unitFrom].defaultTarget\n : unitFrom\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.ANALYSIS')), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"radio\",\n name: \"distance\",\n checked: displayDistance.value,\n onClick: updateDisplayDistance\n }, null, 8, _hoisted_3),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1)\n ]),\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"radio\",\n name: \"duration\",\n checked: !displayDistance.value,\n onClick: updateDisplayDistance\n }, null, 8, _hoisted_4),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.DURATION')), 1)\n ])\n ]),\n _hoisted_5,\n _createVNode(_unref(LineChart), _mergeProps(_unref(lineChartProps), {\n class: \"line-chart\",\n onMouseleave: emitEmptyCoordinates\n }), null, 16),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, _toDisplayString(_ctx.$t('workouts.NO_DATA_CLEANING')), 1),\n (_unref(hasElevation))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"checkbox\",\n checked: beginElevationAtZero.value,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (beginElevationAtZero.value = !beginElevationAtZero.value))\n }, null, 8, _hoisted_9),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.START_ELEVATION_AT_ZERO')), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=68415552&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-68415552\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-f6b59442\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-note\" }\nconst _hoisted_2 = [\"innerHTML\"]\n\nimport { toRefs, withDefaults } from 'vue'\n\n import { linkifyAndClean } from '@/utils/inputs'\n\n interface Props {\n notes?: string | null\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutNotes',\n props: {\n notes: { default: () => null }\n },\n setup(__props: any) {\n\nconst props = __props as { notes: string | null };\n\n \n\n const { notes } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.NOTES')), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"span\", {\n innerHTML: \n _unref(notes) && _unref(notes) !== ''\n ? _unref(linkifyAndClean)(_unref(notes))\n : _ctx.$t('workouts.NO_NOTES')\n \n }, null, 8, _hoisted_2)\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./WorkoutNotes.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutNotes.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutNotes.vue?vue&type=style&index=0&id=f6b59442&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f6b59442\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6b8a27cd\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-segments\" }\n\nimport { toRefs } from 'vue'\n\n import { IWorkoutSegment } from '@/types/workouts'\n\n interface Props {\n segments: IWorkoutSegment[]\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutSegments',\n props: {\n segments: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n segments: IWorkoutSegment[]\n useImperialUnits: boolean\n };\n\n \n\n const { segments, useImperialUnits } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Distance = _resolveComponent(\"Distance\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.SEGMENT', 2)), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"ul\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(segments), (segment, index) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: segment.segment_id\n }, [\n _createVNode(_component_router_link, {\n to: {\n name: 'WorkoutSegment',\n params: {\n workoutId: segment.workout_id,\n segmentId: index + 1,\n },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.SEGMENT', 1)) + \" \" + _toDisplayString(index + 1), 1)\n ]),\n _: 2\n }, 1032, [\"to\"]),\n _createTextVNode(\" (\" + _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \": \", 1),\n _createVNode(_component_Distance, {\n distance: segment.distance,\n unitFrom: \"km\",\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createTextVNode(\", \" + _toDisplayString(_ctx.$t('workouts.DURATION')) + \": \" + _toDisplayString(segment.duration) + \") \", 1)\n ]))\n }), 128))\n ])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./WorkoutSegments.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutSegments.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutSegments.vue?vue&type=style&index=0&id=6b8a27cd&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b8a27cd\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-53c4e53a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n id: \"workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"workout-container\"\n}\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"bottom\" }, null, -1))\nconst _hoisted_6 = { key: 1 }\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n onBeforeMount,\n onUnmounted,\n } from 'vue'\n import { useRoute } from 'vue-router'\n\n import NotFound from '@/components/Common/NotFound.vue'\n import WorkoutDetail from '@/components/Workout/WorkoutDetail/index.vue'\n import WorkoutChart from '@/components/Workout/WorkoutDetail/WorkoutChart/index.vue'\n import WorkoutNotes from '@/components/Workout/WorkoutDetail/WorkoutNotes.vue'\n import WorkoutSegments from '@/components/Workout/WorkoutDetail/WorkoutSegments.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData, IWorkoutPayload, TCoordinates } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n interface Props {\n displaySegment: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'Workout',\n props: {\n displaySegment: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n displaySegment: boolean\n };\n\n \n\n const route = useRoute()\n const store = useStore()\n\n const { displaySegment } = toRefs(props)\n const workoutData: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n const authUser: ComputedRef = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const markerCoordinates: Ref = ref({\n latitude: null,\n longitude: null,\n })\n\n onBeforeMount(() => {\n const payload: IWorkoutPayload = { workoutId: route.params.workoutId }\n if (props.displaySegment) {\n payload.segmentId = route.params.segmentId\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, payload)\n })\n\n onUnmounted(() => {\n store.commit(WORKOUTS_STORE.MUTATIONS.EMPTY_WORKOUT)\n })\n\n function updateCoordinates(coordinates: TCoordinates) {\n markerCoordinates.value = {\n latitude: coordinates.latitude,\n longitude: coordinates.longitude,\n }\n }\n\n watch(\n () => route.params.workoutId,\n async (newWorkoutId) => {\n if (newWorkoutId) {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, {\n workoutId: newWorkoutId,\n })\n }\n }\n )\n watch(\n () => route.params.segmentId,\n async (newSegmentId) => {\n if (route.params.workoutId) {\n const payload: IWorkoutPayload = {\n workoutId: route.params.workoutId,\n }\n if (newSegmentId) {\n payload.segmentId = newSegmentId\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, payload)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(sports).length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n (_unref(workoutData).workout.id)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createVNode(WorkoutDetail, {\n workoutData: _unref(workoutData),\n sports: _unref(sports),\n authUser: _unref(authUser),\n markerCoordinates: markerCoordinates.value,\n displaySegment: _unref(displaySegment)\n }, null, 8, [\"workoutData\", \"sports\", \"authUser\", \"markerCoordinates\", \"displaySegment\"]),\n (\n _unref(workoutData).workout.with_gpx && _unref(workoutData).chartData.length > 0\n )\n ? (_openBlock(), _createBlock(WorkoutChart, {\n key: 0,\n workoutData: _unref(workoutData),\n authUser: _unref(authUser),\n displaySegment: _unref(displaySegment),\n onGetCoordinates: updateCoordinates\n }, null, 8, [\"workoutData\", \"authUser\", \"displaySegment\"]))\n : _createCommentVNode(\"\", true),\n (!_unref(displaySegment) && _unref(workoutData).workout.segments.length > 1)\n ? (_openBlock(), _createBlock(WorkoutSegments, {\n key: 1,\n segments: _unref(workoutData).workout.segments,\n useImperialUnits: _unref(authUser).imperial_units\n }, null, 8, [\"segments\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true),\n (!_unref(displaySegment))\n ? (_openBlock(), _createBlock(WorkoutNotes, {\n key: 2,\n notes: _unref(workoutData).workout.notes\n }, null, 8, [\"notes\"]))\n : _createCommentVNode(\"\", true),\n _hoisted_5\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n (!_unref(workoutData).loading)\n ? (_openBlock(), _createBlock(NotFound, {\n key: 0,\n target: \"WORKOUT\"\n }))\n : _createCommentVNode(\"\", true)\n ]))\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./Workout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Workout.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Workout.vue?vue&type=style&index=0&id=53c4e53a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53c4e53a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withKeys as _withKeys, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-28429a13\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workouts-filters\" }\nconst _hoisted_2 = { class: \"box\" }\nconst _hoisted_3 = [\"onSubmit\"]\nconst _hoisted_4 = { class: \"form-all-items\" }\nconst _hoisted_5 = { class: \"form-items-group\" }\nconst _hoisted_6 = { class: \"form-item\" }\nconst _hoisted_7 = [\"value\"]\nconst _hoisted_8 = { class: \"form-item\" }\nconst _hoisted_9 = [\"value\"]\nconst _hoisted_10 = { class: \"form-items-group\" }\nconst _hoisted_11 = { class: \"form-item\" }\nconst _hoisted_12 = [\"value\", \"onKeyup\"]\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"option\", { value: \"\" }, null, -1))\nconst _hoisted_14 = [\"value\"]\nconst _hoisted_15 = { class: \"form-item form-item-title\" }\nconst _hoisted_16 = { class: \"form-inputs-group\" }\nconst _hoisted_17 = [\"value\", \"onKeyup\"]\nconst _hoisted_18 = { class: \"form-items-group\" }\nconst _hoisted_19 = { class: \"form-item\" }\nconst _hoisted_20 = { class: \"form-inputs-group\" }\nconst _hoisted_21 = [\"value\", \"onKeyup\"]\nconst _hoisted_22 = [\"value\", \"onKeyup\"]\nconst _hoisted_23 = { class: \"form-items-group\" }\nconst _hoisted_24 = { class: \"form-item\" }\nconst _hoisted_25 = { class: \"form-inputs-group\" }\nconst _hoisted_26 = [\"value\", \"onKeyup\"]\nconst _hoisted_27 = [\"value\", \"onKeyup\"]\nconst _hoisted_28 = { class: \"form-items-group\" }\nconst _hoisted_29 = { class: \"form-item\" }\nconst _hoisted_30 = { class: \"form-inputs-group\" }\nconst _hoisted_31 = [\"value\", \"onKeyup\"]\nconst _hoisted_32 = [\"value\", \"onKeyup\"]\nconst _hoisted_33 = { class: \"form-items-group\" }\nconst _hoisted_34 = { class: \"form-item\" }\nconst _hoisted_35 = { class: \"form-inputs-group\" }\nconst _hoisted_36 = [\"value\", \"onKeyup\"]\nconst _hoisted_37 = [\"value\", \"onKeyup\"]\nconst _hoisted_38 = { class: \"form-button\" }\n\nimport { ComputedRef, computed, toRefs, watch, onMounted } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { LocationQuery, useRoute, useRouter } from 'vue-router'\n\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { translateSports } from '@/utils/sports'\n import { units } from '@/utils/units'\n\n interface Props {\n authUser: IAuthUserProfile\n sports: ISport[]\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsFilters',\n props: {\n authUser: null,\n sports: null\n },\n emits: ['filter'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n authUser: IAuthUserProfile\n sports: ISport[]\n };\n\n \n\n \n\n const { t } = useI18n()\n const route = useRoute()\n const router = useRouter()\n\n const { authUser } = toRefs(props)\n\n const toUnit = authUser.value.imperial_units\n ? units['km'].defaultTarget\n : 'km'\n const translatedSports: ComputedRef = computed(() =>\n translateSports(props.sports, t)\n )\n let params: LocationQuery = Object.assign({}, route.query)\n\n onMounted(() => {\n const filter = document.getElementById('from')\n if (filter) {\n filter.focus()\n }\n })\n\n function handleFilterChange(event: Event & { target: HTMLInputElement }) {\n if (event.target.value === '') {\n delete params[event.target.name]\n } else {\n params[event.target.name] = event.target.value\n }\n }\n function onFilter() {\n emit('filter')\n if ('page' in params) {\n params['page'] = '1'\n }\n router.push({ path: '/workouts', query: params })\n }\n function onClearFilter() {\n emit('filter')\n router.push({ path: '/workouts', query: {} })\n }\n\n watch(\n () => route.query,\n (newQuery) => {\n params = Object.assign({}, newQuery)\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"form\", {\n onSubmit: _withModifiers(onFilter, [\"prevent\"]),\n class: \"form\"\n }, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.FROM')) + \": \", 1),\n _createElementVNode(\"input\", {\n id: \"from\",\n name: \"from\",\n type: \"date\",\n value: _ctx.$route.query.from,\n onChange: handleFilterChange\n }, null, 40, _hoisted_7)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.TO')) + \": \", 1),\n _createElementVNode(\"input\", {\n name: \"to\",\n type: \"date\",\n value: _ctx.$route.query.to,\n onChange: handleFilterChange\n }, null, 40, _hoisted_9)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"div\", _hoisted_11, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.SPORT', 1)) + \":\", 1),\n _createElementVNode(\"select\", {\n name: \"sport_id\",\n value: _ctx.$route.query.sport_id,\n onChange: handleFilterChange,\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, [\n _hoisted_13,\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(translatedSports).filter((s) =>\n _unref(authUser).sports_list.includes(s.id)\n ), (sport) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n value: sport.id,\n key: sport.id\n }, _toDisplayString(sport.translatedLabel), 9, _hoisted_14))\n }), 128))\n ], 40, _hoisted_12)\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.TITLE', 1)) + \":\", 1),\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"input\", {\n class: \"title\",\n name: \"title\",\n value: _ctx.$route.query.title,\n onChange: handleFilterChange,\n placeholder: \"\",\n type: \"text\",\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_17)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_18, [\n _createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"): \", 1),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"input\", {\n name: \"distance_from\",\n type: \"number\",\n min: \"0\",\n step: \"0.1\",\n value: _ctx.$route.query.distance_from,\n onChange: handleFilterChange,\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_21),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n name: \"distance_to\",\n type: \"number\",\n min: \"0\",\n step: \"0.1\",\n value: _ctx.$route.query.distance_to,\n onChange: handleFilterChange,\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_22)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_23, [\n _createElementVNode(\"div\", _hoisted_24, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DURATION')) + \": \", 1),\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"input\", {\n name: \"duration_from\",\n value: _ctx.$route.query.duration_from,\n onChange: handleFilterChange,\n pattern: \"^([0-9]*[0-9]):([0-5][0-9])$\",\n placeholder: \"hh:mm\",\n type: \"text\",\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_26),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n name: \"duration_to\",\n value: _ctx.$route.query.duration_to,\n onChange: handleFilterChange,\n pattern: \"^([0-9]*[0-9]):([0-5][0-9])$\",\n placeholder: \"hh:mm\",\n type: \"text\",\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_27)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_28, [\n _createElementVNode(\"div\", _hoisted_29, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.AVE_SPEED')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"/h): \", 1),\n _createElementVNode(\"div\", _hoisted_30, [\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"ave_speed_from\",\n value: _ctx.$route.query.ave_speed_from,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\",\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_31),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"ave_speed_to\",\n value: _ctx.$route.query.ave_speed_to,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\",\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_32)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_33, [\n _createElementVNode(\"div\", _hoisted_34, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"/h): \", 1),\n _createElementVNode(\"div\", _hoisted_35, [\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"max_speed_from\",\n value: _ctx.$route.query.max_speed_from,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\",\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_36),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"max_speed_to\",\n value: _ctx.$route.query.max_speed_to,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\",\n onKeyup: _withKeys(onFilter, [\"enter\"])\n }, null, 40, _hoisted_37)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_38, [\n _createElementVNode(\"button\", {\n type: \"submit\",\n class: \"confirm\",\n onClick: onFilter\n }, _toDisplayString(_ctx.$t('buttons.FILTER')), 1),\n _createElementVNode(\"button\", {\n class: \"confirm\",\n onClick: onClearFilter\n }, _toDisplayString(_ctx.$t('buttons.CLEAR_FILTER')), 1)\n ])\n ], 40, _hoisted_3)\n ])\n ]))\n}\n}\n\n})","import script from \"./WorkoutsFilters.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsFilters.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsFilters.vue?vue&type=style&index=0&id=28429a13&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-28429a13\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, normalizeClass as _normalizeClass, renderList as _renderList, Fragment as _Fragment, resolveComponent as _resolveComponent, createBlock as _createBlock, withCtx as _withCtx, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5b391214\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workouts-list\" }\nconst _hoisted_2 = { class: \"total\" }\nconst _hoisted_3 = { class: \"total-label\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = {\n key: 0,\n class: \"workouts-table responsive-table\"\n}\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", { class: \"sport-col\" }, null, -1))\nconst _hoisted_7 = { class: \"sport-col\" }\nconst _hoisted_8 = { class: \"cell-heading\" }\nconst _hoisted_9 = [\"onMouseover\"]\nconst _hoisted_10 = { class: \"cell-heading\" }\nconst _hoisted_11 = {\n key: 0,\n class: \"fa fa-map-o\",\n \"aria-hidden\": \"true\"\n}\nconst _hoisted_12 = { class: \"title\" }\nconst _hoisted_13 = { class: \"workout-date\" }\nconst _hoisted_14 = { class: \"cell-heading\" }\nconst _hoisted_15 = { class: \"text-right\" }\nconst _hoisted_16 = { class: \"cell-heading\" }\nconst _hoisted_17 = { class: \"text-right\" }\nconst _hoisted_18 = { class: \"cell-heading\" }\nconst _hoisted_19 = { class: \"text-right\" }\nconst _hoisted_20 = { class: \"cell-heading\" }\nconst _hoisted_21 = { class: \"text-right\" }\nconst _hoisted_22 = { class: \"cell-heading\" }\nconst _hoisted_23 = { class: \"text-right\" }\nconst _hoisted_24 = { class: \"cell-heading\" }\nconst _hoisted_25 = { class: \"text-right\" }\nconst _hoisted_26 = { class: \"cell-heading\" }\nconst _hoisted_27 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"bottom\" }, null, -1))\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n capitalize,\n onBeforeMount,\n } from 'vue'\n import { LocationQuery, useRoute, useRouter } from 'vue-router'\n\n import FilterSelects from '@/components/Common/FilterSelects.vue'\n import Pagination from '@/components/Common/Pagination.vue'\n import StaticMap from '@/components/Common/StaticMap.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { ROOT_STORE, WORKOUTS_STORE } from '@/store/constants'\n import { IPagination } from '@/types/api'\n import { ITranslatedSport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkout, TWorkoutsPayload } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getQuery, sortList, workoutsPayloadKeys } from '@/utils/api'\n import { formatDate } from '@/utils/dates'\n import { getSportColor, getSportLabel } from '@/utils/sports'\n import { convertDistance } from '@/utils/units'\n import { defaultOrder } from '@/utils/workouts'\n\n interface Props {\n user: IAuthUserProfile\n sports: ITranslatedSport[]\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsList',\n props: {\n user: null,\n sports: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n user: IAuthUserProfile\n sports: ITranslatedSport[]\n };\n\n \n\n const store = useStore()\n const route = useRoute()\n const router = useRouter()\n\n const { user, sports } = toRefs(props)\n const orderByList: string[] = [\n 'ave_speed',\n 'distance',\n 'duration',\n 'workout_date',\n ]\n const workouts: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.USER_WORKOUTS]\n )\n const pagination: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUTS_PAGINATION]\n )\n const currentLanguage: ComputedRef = computed(\n () => store.getters[ROOT_STORE.GETTERS.LANGUAGE]\n )\n let query: TWorkoutsPayload = getWorkoutsQuery(route.query)\n const hoverWorkoutId: Ref = ref(null)\n\n onBeforeMount(() => {\n loadWorkouts(query)\n })\n\n function loadWorkouts(payload: TWorkoutsPayload) {\n store.dispatch(\n WORKOUTS_STORE.ACTIONS.GET_USER_WORKOUTS,\n user.value.imperial_units ? getConvertedPayload(payload) : payload\n )\n }\n function reloadWorkouts(queryParam: string, queryValue: string) {\n const newQuery: LocationQuery = Object.assign({}, route.query)\n newQuery[queryParam] = queryValue\n if (queryParam === 'per_page') {\n newQuery['page'] = '1'\n }\n query = getWorkoutsQuery(newQuery)\n router.push({ path: '/workouts', query })\n }\n\n function getWorkoutsQuery(newQuery: LocationQuery): TWorkoutsPayload {\n const workoutQuery = getQuery(\n newQuery,\n orderByList,\n defaultOrder.order_by,\n {\n defaultSort: defaultOrder.order,\n }\n )\n Object.keys(newQuery)\n .filter((k) => workoutsPayloadKeys.includes(k))\n .map((k) => {\n if (typeof newQuery[k] === 'string') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n workoutQuery[k] = newQuery[k]\n }\n })\n return workoutQuery\n }\n\n function getConvertedPayload(payload: TWorkoutsPayload): TWorkoutsPayload {\n const convertedPayload: TWorkoutsPayload = {\n ...payload,\n }\n Object.entries(convertedPayload).map((entry) => {\n if (entry[0].match('speed|distance') && entry[1]) {\n convertedPayload[entry[0]] = convertDistance(+entry[1], 'mi', 'km')\n }\n })\n return convertedPayload\n }\n\n function onHover(workoutId: string | null) {\n hoverWorkoutId.value = workoutId\n }\n\n watch(\n () => route.query,\n async (newQuery) => {\n query = getWorkoutsQuery(newQuery)\n loadWorkouts(query)\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_SportImage = _resolveComponent(\"SportImage\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Distance = _resolveComponent(\"Distance\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"box\", { 'empty-table': _unref(workouts).length === 0 }])\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(_ctx.$t('common.TOTAL').toLowerCase()) + \": \", 1),\n (_unref(pagination).total !== null)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(_unref(pagination).total) + \" \" + _toDisplayString(_ctx.$t('workouts.WORKOUT', _unref(pagination).total)), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createVNode(FilterSelects, {\n sort: _unref(sortList),\n order_by: orderByList,\n query: _unref(query),\n message: \"workouts\",\n onUpdateSelect: reloadWorkouts\n }, null, 8, [\"sort\", \"query\"]),\n (_unref(workouts).length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createVNode(Pagination, {\n class: \"top-pagination\",\n pagination: _unref(pagination),\n path: \"/workouts\",\n query: _unref(query)\n }, null, 8, [\"pagination\", \"query\"]),\n _createElementVNode(\"table\", null, [\n _createElementVNode(\"thead\", {\n class: _normalizeClass({ smaller: 'de' === _unref(currentLanguage) })\n }, [\n _createElementVNode(\"tr\", null, [\n _hoisted_6,\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.WORKOUT', 1))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DATE'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DISTANCE'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DURATION'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.AVE_SPEED'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.MAX_SPEED'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.ASCENT'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DESCENT'))), 1)\n ])\n ], 2),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(workouts), (workout) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: workout.id\n }, [\n _createElementVNode(\"td\", _hoisted_7, [\n _createElementVNode(\"span\", _hoisted_8, _toDisplayString(_ctx.$t('workouts.SPORT', 1)), 1),\n (_unref(sports).length > 0)\n ? (_openBlock(), _createBlock(_component_SportImage, {\n key: 0,\n title: \n _unref(sports).find((s) => s.id === workout.sport_id)\n .translatedLabel\n ,\n \"sport-label\": _unref(getSportLabel)(workout, _unref(sports)),\n color: _unref(getSportColor)(workout, _unref(sports))\n }, null, 8, [\"title\", \"sport-label\", \"color\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", {\n class: \"workout-title\",\n onMouseover: ($event: any) => (onHover(workout.id)),\n onMouseleave: _cache[0] || (_cache[0] = ($event: any) => (onHover(null)))\n }, [\n _createElementVNode(\"span\", _hoisted_10, _toDisplayString(capitalize(_ctx.$t('workouts.WORKOUT', 1))), 1),\n _createVNode(_component_router_link, {\n class: \"nav-item\",\n to: { name: 'Workout', params: { workoutId: workout.id } }\n }, {\n default: _withCtx(() => [\n (workout.with_gpx)\n ? (_openBlock(), _createElementBlock(\"i\", _hoisted_11))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"span\", _hoisted_12, _toDisplayString(workout.title), 1)\n ]),\n _: 2\n }, 1032, [\"to\"]),\n (workout.with_gpx && hoverWorkoutId.value === workout.id)\n ? (_openBlock(), _createBlock(StaticMap, {\n key: 0,\n workout: workout,\n \"display-hover\": true\n }, null, 8, [\"workout\"]))\n : _createCommentVNode(\"\", true)\n ], 40, _hoisted_9),\n _createElementVNode(\"td\", _hoisted_13, [\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(_ctx.$t('workouts.DATE')), 1),\n _createElementVNode(\"time\", null, _toDisplayString(_unref(formatDate)(\n workout.workout_date,\n _unref(user).timezone,\n _unref(user).date_format\n )), 1)\n ]),\n _createElementVNode(\"td\", _hoisted_15, [\n _createElementVNode(\"span\", _hoisted_16, _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1),\n (workout.distance !== null)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.distance,\n unitFrom: \"km\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", _hoisted_17, [\n _createElementVNode(\"span\", _hoisted_18, _toDisplayString(_ctx.$t('workouts.DURATION')), 1),\n _createTextVNode(\" \" + _toDisplayString(workout.moving), 1)\n ]),\n _createElementVNode(\"td\", _hoisted_19, [\n _createElementVNode(\"span\", _hoisted_20, _toDisplayString(_ctx.$t('workouts.AVE_SPEED')), 1),\n (workout.ave_speed !== null)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.ave_speed,\n unitFrom: \"km\",\n speed: true,\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", _hoisted_21, [\n _createElementVNode(\"span\", _hoisted_22, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')), 1),\n (workout.max_speed !== null)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.max_speed,\n unitFrom: \"km\",\n speed: true,\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", _hoisted_23, [\n _createElementVNode(\"span\", _hoisted_24, _toDisplayString(_ctx.$t('workouts.ASCENT')), 1),\n (workout.ascent !== null)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.ascent,\n unitFrom: \"m\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", _hoisted_25, [\n _createElementVNode(\"span\", _hoisted_26, _toDisplayString(_ctx.$t('workouts.DESCENT')), 1),\n (workout.descent !== null)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.descent,\n unitFrom: \"m\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n }), 128))\n ])\n ]),\n _createVNode(Pagination, {\n pagination: _unref(pagination),\n path: \"/workouts\",\n query: _unref(query)\n }, null, 8, [\"pagination\", \"query\"])\n ]))\n : _createCommentVNode(\"\", true)\n ], 2),\n (_unref(workouts).length === 0)\n ? (_openBlock(), _createBlock(NoWorkouts, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _hoisted_27\n ]))\n}\n}\n\n})","import script from \"./WorkoutsList.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsList.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsList.vue?vue&type=style&index=0&id=5b391214&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5b391214\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-57ec0168\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n id: \"workouts\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container workouts-container\" }\nconst _hoisted_3 = { class: \"display-filters\" }\nconst _hoisted_4 = { class: \"list-container\" }\n\nimport { ComputedRef, computed, ref } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import WorkoutsFilters from '@/components/Workouts/WorkoutsFilters.vue'\n import WorkoutsList from '@/components/Workouts/WorkoutsList.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n import { translateSports } from '@/utils/sports'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsView',\n setup(__props) {\n\n const { t } = useI18n()\n const store = useStore()\n\n const authUser: ComputedRef = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const translatedSports: ComputedRef = computed(() =>\n translateSports(sports.value, t)\n )\n const hiddenFilters = ref(true)\n\n function toggleFilters() {\n hiddenFilters.value = !hiddenFilters.value\n }\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(authUser).username)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"filters-container\", { hidden: hiddenFilters.value }])\n }, [\n _createVNode(WorkoutsFilters, {\n sports: _unref(translatedSports),\n authUser: _unref(authUser),\n onFilter: toggleFilters\n }, null, 8, [\"sports\", \"authUser\"])\n ], 2),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", { onClick: toggleFilters }, [\n _createElementVNode(\"i\", {\n class: _normalizeClass(`fa fa-caret-${hiddenFilters.value ? 'down' : 'up'}`),\n \"aria-hidden\": \"true\"\n }, null, 2),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t(`workouts.${hiddenFilters.value ? 'DISPLAY' : 'HIDE'}_FILTERS`)), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(WorkoutsList, {\n user: _unref(authUser),\n sports: _unref(translatedSports)\n }, null, 8, [\"user\", \"sports\"])\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutsView.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsView.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsView.vue?vue&type=style&index=0&id=57ec0168&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-57ec0168\"]])\n\nexport default __exports__"],"names":["_hoisted_1","id","_hoisted_2","_hoisted_3","class","_hoisted_4","key","_hoisted_5","_hoisted_6","for","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_defineComponent","__name","props","authUser","sports","isCreation","type","Boolean","default","loading","workout","setup","__props","t","useI18n","store","useStore","router","useRouter","toRefs","translatedSports","computed","translateSports","value","sport_id","appConfig","getters","ROOT_STORE","fileSizeLimit","max_single_file_size","getReadableFileSize","gpx_limit_import","zipSizeLimit","max_zip_file_size","errorMessages","workoutForm","reactive","title","notes","workoutDate","workoutTime","workoutDurationHour","workoutDurationMinutes","workoutDurationSeconds","workoutDistance","workoutAscent","workoutDescent","withGpx","ref","with_gpx","gpxFile","formErrors","payloadErrorMessages","updateNotes","updateWithGpx","updateFile","event","target","files","formatWorkoutForm","workoutDateTime","formatWorkoutDate","getDateWithTZ","workout_date","timezone","duration","split","imperial_units","convertDistance","distance","parseFloat","toFixed","workout_time","ascent","descent","isDistanceInvalid","includes","isDurationInvalid","isElevationInvalid","formatPayload","payload","push","updateWorkout","length","commit","dispatch","WORKOUTS_STORE","workoutId","data","errorMessage","file","onCancel","name","params","go","invalidateForm","onMounted","element","document","getElementById","focus","onUnmounted","watch","async","newWorkout","previousWorkout","_ctx","_cache","_component_CustomTextArea","_resolveComponent","_component_ErrorMessage","_component_Loader","_component_Card","_openBlock","_createElementBlock","_normalizeClass","_unref","_createVNode","_withCtx","_createTextVNode","_toDisplayString","$t","content","_createElementVNode","errors","onSubmit","_withModifiers","checked","disabled","onClick","_createCommentVNode","_withDirectives","required","onInvalid","$event","_Fragment","_renderList","sport","translatedLabel","_vModelSelect","accept","onInput","_vModelText","errored","placeholder","minlength","maxlength","pattern","min","step","input","onUpdateValue","_createBlock","message","_","__exports__","SPORTS_STORE","AUTH_USER_STORE","workoutData","WorkoutEdition","route","useRoute","onBeforeMount","newWorkoutId","_withScopeId","n","_pushScopeId","_popScopeId","workoutObject","emits","emit","downloadGpx","authApi","responseType","then","response","gpxFileUrl","window","URL","createObjectURL","Blob","gpxLink","createElement","href","setAttribute","body","appendChild","click","displayDeleteModal","_component_SportImage","_component_router_link","inactive","previousUrl","$router","label","color","segmentId","to","nextUrl","recordType","records","find","record","record_type","directions","convertDegreeToDirection","angle","Math","floor","weather","useImperialUnits","getWindDirectionTitle","windBearing","getWindSpeed","wind","style","_normalizeStyle","transform","weatherStart","weatherEnd","src","icon","alt","getTemperature","temperature","Number","humidity","WeatherWind","displayHARecord","withPause","pauses","_component_Distance","moving","WorkoutRecord","digits","unitFrom","strong","aveSpeed","maxSpeed","speed","maxAlt","minAlt","WorkoutWeather","$","tagName","Array","from","getElementsByTagName","nodeVal","node","normalize","textContent","get1","callback","result","get","properties","val1","val","$num","isNaN","num1","getMulti","propertyNames","property","isElement","nodeType","getLineStyle","lineStyle","Object","assign","stroke","opacity","width","getExtensions","values","child","childNodes","abbreviateName","nodeName","concat","parseNumeric","num","coordPair$1","ll","getAttribute","time","coordinates","extendedValues","extractProperties","extensions","getElementsByTagNameNS","parentNode","replace","links","map","link","getPoints$1","pointname","pts","line","times","i","c","plural","fill","getRoute","_gpxType","geometry","getTrack","segments","track","extractedLines","segment","multi","coordinateProperties","entries","getPoint","pair","gpxGen","feature","waypoint","point","gpx","features","PI","Qe","o","e","keys","on","me","U","cancel","Xe","charAt","toUpperCase","slice","S","a","s","l","L","custom","T","startsWith","toLocaleLowerCase","Ye","Promise","all","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl","R","console","warn","wrapped","ee","b","self","g","global","globalThis","m","Error","j","Symbol","I","oe","K","ve","be","fe","Le","he","ge","Oe","Se","Q","options","X","methods","Z","pane","String","attribution","layerType","visible","Y","r","leafletObject","u","d","setAttribution","y","setName","setLayerType","setVisible","bindPopup","bindTooltip","unbindTooltip","closeTooltip","unbindPopup","closePopup","updateVisibleProp","M","display","je","interactive","bubblingMouseEvents","Ve","ae","weight","lineCap","lineJoin","dashArray","dashOffset","fillColor","fillOpacity","fillRule","className","Ce","setStroke","setStyle","setColor","setWeight","setOpacity","setLineCap","setLineJoin","setDashArray","setDashOffset","setFill","setFillColor","setFillOpacity","setFillRule","setClassName","re","radius","latLng","Pe","setRadius","setLatLng","Be","xe","H","circle","attrs","ready","render","this","$slots","circleMarker","position","V","setPosition","remove","Re","jt","disableClickPropagation","disableScrollPropagation","Control","DomEvent","extend","onAdd","root","Te","prefix","et","setPrefix","we","control","collapsed","autoZIndex","hideSingleBase","sortLayers","sortFunction","Function","tt","addLayer","addBaseLayer","addOverlay","removeLayer","Pt","layers","Ie","maxWidth","metric","imperial","updateWhenIdle","ot","Ae","scale","zoomInText","zoomInTitle","zoomOutText","zoomOutTitle","nt","ne","zoom","le","_e","st","Ge","featureGroup","geojson","optionsStyle","at","hasOwnProperty","call","setGeojson","clearLayers","addData","setOptionsStyle","getGeoJSONData","toGeoJSON","getBounds","It","geoJSON","ie","zIndex","tileSize","noWrap","minZoom","maxZoom","Me","setTileComponent","redraw","off","rt","initialize","tileComponents","_unloadTile","setOptions","createTile","_tileCoordsToKey","create","coords","innerHTML","pe","childRender","GridLayer","DomUtil","Util","A","v","iconSize","iconAnchor","popupAnchor","tooltipAnchor","shadowRetinaUrl","shadowSize","shadowAnchor","bgPos","_t","w","k","N","D","E","F","html","B","setIconUrl","setIconRetinaUrl","setIconSize","setIconAnchor","setPopupAnchor","setTooltipAnchor","setShadowUrl","setShadowRetinaUrl","setShadowAnchor","setBgPos","setHtml","divIcon","MutationObserver","observe","attributes","childList","characterData","subtree","Ne","crossOrigin","errorOverlayUrl","url","bounds","lt","setUrl","setBounds","getElement","bringToFront","bringToBack","setZIndex","Mt","imageOverlay","layerGroup","$e","isImmediate","maxWait","Date","now","arguments","clearTimeout","setTimeout","apply","forEach","resolve","reject","ye","center","maxBounds","paddingBottomRight","paddingTopLeft","padding","worldCopyJump","crs","maxBoundsViscosity","inertia","inertiaDeceleration","inertiaMaxSpeed","easeLinearity","zoomAnimation","zoomAnimationThreshold","fadeAnimation","markerZoomAnimation","noBlockingAnimations","useGlobalLeaflet","Nt","layersToAdd","layersInControl","animate","moveend","leafletRef","getZoom","getCenter","overlayadd","overlayremove","CRS","Icon","latLngBounds","stamp","beforeMapMount","p","error","EPSG3857","W","layerControl","q","filter","P","registerLayerControl","registerControl","addControl","setZoom","setCrs","fitBounds","isValid","lastSetBounds","equals","setCenter","lastSetCenter","lat","lng","panTo","qe","getContainer","height","it","ut","ke","draggable","zIndexOffset","ct","setDraggable","dragging","enable","disable","latLngSync","latlng","getLatLng","dt","slots","some","pt","toString","setIcon","moveHandler","marker","ue","smoothFactor","noClip","latLngs","Ue","setSmoothFactor","setNoClip","addLatLng","te","ze","De","polygon","polyline","Ee","setContent","Fe","yt","mt","Ze","popup","vt","setLatLngs","ce","rectangle","tms","subdomains","validator","isArray","every","detectRetina","He","Et","tileLayer","bt","ft","We","tooltip","styles","format","transparent","version","uppercase","Lt","wms","markerCoordinates","isStart","latitude","LMarker","longitude","LIcon","workoutMap","geoJson","getGeoJson","startMarkerCoordinates","chartData","endMarkerCoordinates","isFullscreen","gpxContent","jsonData","DOMParser","parseFromString","resetZoom","toggleFullscreen","_component_VFullscreen","modelValue","LMap","ref_key","onReady","LControlLayers","LControl","tabindex","role","LTileLayer","getApiUrl","map_attribution","LGeoJson","LLayerGroup","CustomMarker","displaySegment","displayModal","getWorkoutObject","getWorkoutObjectUrl","previous_workout","next_workout","urls","date_format","ave_speed","max_alt","max_speed","min_alt","segment_id","weather_end","weather_start","updateDisplayModal","cancelDelete","deleteWorkout","scrollToTop","scrollTo","top","behavior","newSegmentId","_component_Modal","onConfirmAction","onCancelAction","onKeydown","_withKeys","WorkoutCardTitle","onDisplayModal","WorkoutMap","WorkoutData","display_ascent","getOrCreateLegendList","legendContainer","listContainer","querySelector","htmlLegendPlugin","afterUpdate","chart","args","ul","containerID","firstChild","legendItems","plugins","legend","labels","generateLabels","item","config","scales","yElevation","datasetIndex","li","onclick","undefined","setDatasetVisibility","isDatasetVisible","update","checkBox","text","hidden","createTextNode","boxSpan","background","fillStyle","borderColor","strokeStyle","displayDistance","beginElevationAtZero","start_elevation_at_zero","datasets","getDatasets","hasElevation","elevation","fromKmUnit","getUnitTo","fromMUnit","distance_labels","duration_labels","JSON","parse","stringify","responsive","maintainAspectRatio","animation","layout","x","grid","drawOnChartArea","ticks","count","formatDuration","ySpeed","beginAtZero","elements","pointStyle","pointRadius","datalabels","interaction","intersect","mode","callbacks","context","dataset","formattedValue","yAxisID","tooltipItems","emitCoordinates","dataIndex","htmlLegend","displayElevation","lineChartProps","useLineChart","updateDisplayDistance","toISOString","substr","emitEmptyCoordinates","units","defaultTarget","LineChart","_mergeProps","onMouseleave","linkifyAndClean","index","workout_id","updateCoordinates","WorkoutDetail","WorkoutChart","onGetCoordinates","WorkoutSegments","WorkoutNotes","NotFound","toUnit","query","handleFilterChange","onFilter","path","onClearFilter","newQuery","$route","onChange","onKeyup","sports_list","distance_from","distance_to","duration_from","duration_to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","user","orderByList","workouts","pagination","currentLanguage","getWorkoutsQuery","hoverWorkoutId","loadWorkouts","getConvertedPayload","reloadWorkouts","queryParam","queryValue","workoutQuery","getQuery","defaultOrder","defaultSort","workoutsPayloadKeys","convertedPayload","entry","match","onHover","toLowerCase","total","FilterSelects","sort","sortList","order_by","onUpdateSelect","Pagination","smaller","capitalize","getSportLabel","getSportColor","onMouseover","StaticMap","formatDate","NoWorkouts","hiddenFilters","toggleFilters","username","WorkoutsFilters","WorkoutsList"],"sourceRoot":""}