FitTrackee/fittrackee/dist/static/js/workouts.808a94ee.js
2021-11-14 17:52:39 +01:00

2 lines
88 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["workouts"],{"0385":function(e,t,n){"use strict";n.r(t);var o=n("7a23"),r=n("47e2"),c=(n("b0c0"),n("4de4"),n("d3b7"),n("caad"),n("2532"),n("6c02")),a=n("1119"),l=n("6284"),i=function(e){return Object(o["pushScopeId"])("data-v-06d30f25"),e=e(),Object(o["popScopeId"])(),e},u={class:"workouts-filters"},s={class:"box"},d={class:"form"},b={class:"form-items-group"},O={class:"form-item"},m=["value"],p={class:"form-item"},j=["value"],f={class:"form-items-group"},g={class:"form-item"},k=["value"],y=i((function(){return Object(o["createElementVNode"])("option",{value:""},null,-1)})),v=["value"],h={class:"form-items-group"},E={class:"form-item"},N={class:"form-inputs-group"},w=["value"],S=["value"],V={class:"form-items-group"},T={class:"form-item"},D={class:"form-inputs-group"},_=["value"],I=["value"],x={class:"form-items-group"},A={class:"form-item"},C={class:"form-inputs-group"},B=["value"],R=["value"],U={class:"form-items-group"},L={class:"form-item"},$={class:"form-inputs-group"},M=["value"],P=["value"],F={class:"form-button"},G=Object(o["defineComponent"])({props:{authUser:null,sports:null},emits:["filter"],setup:function(e,t){var n=t.emit,i=e,G=Object(r["b"])(),W=G.t,z=Object(c["c"])(),H=Object(c["d"])(),q=Object(o["toRefs"])(i),K=q.authUser,Z=K.value.imperial_units?l["c"]["km"].defaultTarget:"km",X=Object(o["computed"])((function(){return Object(a["e"])(i.sports,W)})),Y=Object.assign({},z.query);function J(e){""===e.target.value?delete Y[e.target.name]:Y[e.target.name]=e.target.value}function Q(){n("filter"),"page"in Y&&(Y["page"]="1"),H.push({path:"/workouts",query:Y})}function ee(){n("filter"),H.push({path:"/workouts",query:{}})}return Object(o["watch"])((function(){return z.query}),(function(e){Y=Object.assign({},e)})),function(e,t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",u,[Object(o["createElementVNode"])("div",s,[Object(o["createElementVNode"])("div",d,[Object(o["createElementVNode"])("div",b,[Object(o["createElementVNode"])("div",O,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.FROM"))+": ",1),Object(o["createElementVNode"])("input",{name:"from",type:"date",value:e.$route.query.from,onChange:J},null,40,m)]),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.TO"))+": ",1),Object(o["createElementVNode"])("input",{name:"to",type:"date",value:e.$route.query.to,onChange:J},null,40,j)])]),Object(o["createElementVNode"])("div",f,[Object(o["createElementVNode"])("div",g,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.SPORT",1))+":",1),Object(o["createElementVNode"])("select",{name:"sport_id",value:e.$route.query.sport_id,onChange:J},[y,(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(Object(o["unref"])(X).filter((function(e){return Object(o["unref"])(K).sports_list.includes(e.id)})),(function(e){return Object(o["openBlock"])(),Object(o["createElementBlock"])("option",{value:e.id,key:e.id},Object(o["toDisplayString"])(e.translatedLabel),9,v)})),128))],40,k)])]),Object(o["createElementVNode"])("div",h,[Object(o["createElementVNode"])("div",E,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.DISTANCE"))+" ("+Object(o["toDisplayString"])(Object(o["unref"])(Z))+"): ",1),Object(o["createElementVNode"])("div",N,[Object(o["createElementVNode"])("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:e.$route.query.distance_from,onChange:J},null,40,w),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.TO")),1),Object(o["createElementVNode"])("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:e.$route.query.distance_to,onChange:J},null,40,S)])])]),Object(o["createElementVNode"])("div",V,[Object(o["createElementVNode"])("div",T,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.DURATION"))+" ("+Object(o["toDisplayString"])(Object(o["unref"])(Z))+"): ",1),Object(o["createElementVNode"])("div",D,[Object(o["createElementVNode"])("input",{name:"duration_from",value:e.$route.query.duration_from,onChange:J,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text"},null,40,_),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.TO")),1),Object(o["createElementVNode"])("input",{name:"duration_to",value:e.$route.query.duration_to,onChange:J,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text"},null,40,I)])])]),Object(o["createElementVNode"])("div",x,[Object(o["createElementVNode"])("div",A,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.AVE_SPEED"))+" ("+Object(o["toDisplayString"])(Object(o["unref"])(Z))+"): ",1),Object(o["createElementVNode"])("div",C,[Object(o["createElementVNode"])("input",{min:"0",name:"ave_speed_from",value:e.$route.query.ave_speed_from,onChange:J,step:"0.1",type:"number"},null,40,B),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.TO")),1),Object(o["createElementVNode"])("input",{min:"0",name:"ave_speed_to",value:e.$route.query.ave_speed_to,onChange:J,step:"0.1",type:"number"},null,40,R)])])]),Object(o["createElementVNode"])("div",U,[Object(o["createElementVNode"])("div",L,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.MAX_SPEED"))+" ("+Object(o["toDisplayString"])(Object(o["unref"])(Z))+"): ",1),Object(o["createElementVNode"])("div",$,[Object(o["createElementVNode"])("input",{min:"0",name:"max_speed_from",value:e.$route.query.max_speed_from,onChange:J,step:"0.1",type:"number"},null,40,M),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.TO")),1),Object(o["createElementVNode"])("input",{min:"0",name:"max_speed_to",value:e.$route.query.max_speed_to,onChange:J,step:"0.1",type:"number"},null,40,P)])])])]),Object(o["createElementVNode"])("div",F,[Object(o["createElementVNode"])("button",{class:"confirm",onClick:Q},Object(o["toDisplayString"])(e.$t("buttons.FILTER")),1),Object(o["createElementVNode"])("button",{class:"confirm",onClick:ee},Object(o["toDisplayString"])(e.$t("buttons.CLEAR_FILTER")),1)])])])}}}),W=(n("95b0"),n("6b0d")),z=n.n(W);const H=z()(G,[["__scopeId","data-v-06d30f25"]]);var q=H,K=n("1da1"),Z=n("5530"),X=(n("96cf"),n("d81d"),n("b64b"),n("4fad"),n("ac1f"),n("466d"),n("7db0"),n("b166")),Y=n("9176"),J=n("6d7d"),Q=n("68c6"),ee=n("1724"),te=n("dad5"),ne=n("2906"),oe=n("97e5"),re=n("5e65"),ce=n("9230"),ae=function(e){return Object(o["pushScopeId"])("data-v-1ba1a972"),e=e(),Object(o["popScopeId"])(),e},le={class:"workouts-list"},ie={class:"total"},ue={class:"total-label"},se={key:0},de={key:0,class:"workouts-table responsive-table"},be=ae((function(){return Object(o["createElementVNode"])("th",{class:"sport-col"},null,-1)})),Oe={class:"sport-col"},me={class:"cell-heading"},pe=["onMouseover"],je={class:"cell-heading"},fe={key:0,class:"fa fa-map-o","aria-hidden":"true"},ge={class:"cell-heading"},ke={class:"text-right"},ye={class:"cell-heading"},ve={class:"text-right"},he={class:"cell-heading"},Ee={class:"text-right"},Ne={class:"cell-heading"},we={class:"text-right"},Se={class:"cell-heading"},Ve={class:"text-right"},Te={class:"cell-heading"},De={class:"text-right"},_e={class:"cell-heading"},Ie=ae((function(){return Object(o["createElementVNode"])("div",{id:"bottom"},null,-1)})),xe=Object(o["defineComponent"])({props:{user:null,sports:null},setup:function(e){var t=e,n=Object(ne["a"])(),r=Object(c["c"])(),i=Object(c["d"])(),u=Object(o["toRefs"])(t),s=u.user,d=u.sports,b=["ave_speed","distance","duration","workout_date"],O=Object(o["computed"])((function(){return n.getters[te["f"].GETTERS.USER_WORKOUTS]})),m=Object(o["computed"])((function(){return n.getters[te["f"].GETTERS.WORKOUTS_PAGINATION]})),p=k(r.query),j=Object(o["ref"])(null);function f(e){n.dispatch(te["f"].ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?y(e):e)}function g(e,t){var n=Object.assign({},r.query);n[e]=t,"per_page"===e&&(n["page"]="1"),p=k(n),i.push({path:"/workouts",query:p})}function k(e){return p=Object(oe["a"])(e,b,ce["a"].order_by,{defaultSort:ce["a"].order}),Object.keys(e).filter((function(e){return oe["d"].includes(e)})).map((function(t){"string"===typeof e[t]&&(p[t]=e[t])})),p}function y(e){var t=Object(Z["a"])({},e);return Object.entries(t).map((function(e){e[0].match("speed|distance")&&(t[e[0]]=Object(l["a"])(+e[1],"mi","km"))})),t}function v(e){j.value=e}return Object(o["onBeforeMount"])((function(){f(p)})),Object(o["watch"])((function(){return r.query}),function(){var e=Object(K["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:p=k(t),f(p);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(e,t){var n=Object(o["resolveComponent"])("SportImage"),r=Object(o["resolveComponent"])("router-link"),c=Object(o["resolveComponent"])("Distance");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",le,[Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["box",{"empty-table":0===Object(o["unref"])(O).length}])},[Object(o["createElementVNode"])("div",ie,[Object(o["createElementVNode"])("span",ue,Object(o["toDisplayString"])(e.$t("common.TOTAL").toLowerCase())+": ",1),null!==Object(o["unref"])(m).total?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",se,Object(o["toDisplayString"])(Object(o["unref"])(m).total)+" "+Object(o["toDisplayString"])(e.$t("workouts.WORKOUT",Object(o["unref"])(m).total)),1)):Object(o["createCommentVNode"])("",!0)]),Object(o["createVNode"])(Y["a"],{sort:Object(o["unref"])(oe["c"]),order_by:b,query:Object(o["unref"])(p),message:"workouts",onUpdateSelect:g},null,8,["sort","query"]),Object(o["unref"])(O).length>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",de,[Object(o["createVNode"])(J["a"],{class:"top-pagination",pagination:Object(o["unref"])(m),path:"/workouts",query:Object(o["unref"])(p)},null,8,["pagination","query"]),Object(o["createElementVNode"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[be,Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.WORKOUT",1))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.DATE"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.DISTANCE"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.DURATION"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.AVE_SPEED"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.MAX_SPEED"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.ASCENT"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.DESCENT"))),1)])]),Object(o["createElementVNode"])("tbody",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(Object(o["unref"])(O),(function(l){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:l.id},[Object(o["createElementVNode"])("td",Oe,[Object(o["createElementVNode"])("span",me,Object(o["toDisplayString"])(e.$t("workouts.SPORT",1)),1),Object(o["unref"])(d).length>0?(Object(o["openBlock"])(),Object(o["createBlock"])(n,{key:0,title:Object(o["unref"])(d).find((function(e){return e.id===l.sport_id})).translatedLabel,"sport-label":Object(o["unref"])(a["b"])(l,Object(o["unref"])(d)),color:Object(o["unref"])(a["a"])(l,Object(o["unref"])(d))},null,8,["title","sport-label","color"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("td",{class:"workout-title",onMouseover:function(e){return v(l.id)},onMouseleave:t[0]||(t[0]=function(e){return v(null)})},[Object(o["createElementVNode"])("span",je,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.WORKOUT",1))),1),Object(o["createVNode"])(r,{class:"nav-item",to:{name:"Workout",params:{workoutId:l.id}}},{default:Object(o["withCtx"])((function(){return[l.with_gpx?(Object(o["openBlock"])(),Object(o["createElementBlock"])("i",fe)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(l.title),1)]})),_:2},1032,["to"]),l.with_gpx&&j.value===l.id?(Object(o["openBlock"])(),Object(o["createBlock"])(Q["a"],{key:0,workout:l,"display-hover":!0},null,8,["workout"])):Object(o["createCommentVNode"])("",!0)],40,pe),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",ge,Object(o["toDisplayString"])(e.$t("workouts.DATE")),1),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(Object(o["unref"])(X["a"])(Object(o["unref"])(re["c"])(l.workout_date,Object(o["unref"])(s).timezone),"dd/MM/yyyy HH:mm")),1)]),Object(o["createElementVNode"])("td",ke,[Object(o["createElementVNode"])("span",ye,Object(o["toDisplayString"])(e.$t("workouts.DISTANCE")),1),Object(o["createVNode"])(c,{distance:l.distance,unitFrom:"km",useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])]),Object(o["createElementVNode"])("td",ve,[Object(o["createElementVNode"])("span",he,Object(o["toDisplayString"])(e.$t("workouts.DURATION")),1),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(l.moving),1)]),Object(o["createElementVNode"])("td",Ee,[Object(o["createElementVNode"])("span",Ne,Object(o["toDisplayString"])(e.$t("workouts.AVE_SPEED")),1),Object(o["createVNode"])(c,{distance:l.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])]),Object(o["createElementVNode"])("td",we,[Object(o["createElementVNode"])("span",Se,Object(o["toDisplayString"])(e.$t("workouts.MAX_SPEED")),1),Object(o["createVNode"])(c,{distance:l.max_speed,unitFrom:"km",speed:!0,useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])]),Object(o["createElementVNode"])("td",Ve,[Object(o["createElementVNode"])("span",Te,Object(o["toDisplayString"])(e.$t("workouts.ASCENT")),1),l.with_gpx?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:0,distance:l.ascent,unitFrom:"m",useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("td",De,[Object(o["createElementVNode"])("span",_e,Object(o["toDisplayString"])(e.$t("workouts.DESCENT")),1),l.with_gpx?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:0,distance:l.descent,unitFrom:"m",useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])):Object(o["createCommentVNode"])("",!0)])])})),128))])]),Object(o["createVNode"])(J["a"],{pagination:Object(o["unref"])(m),path:"/workouts",query:Object(o["unref"])(p)},null,8,["pagination","query"])])):Object(o["createCommentVNode"])("",!0)],2),0===Object(o["unref"])(O).length?(Object(o["openBlock"])(),Object(o["createBlock"])(ee["a"],{key:0})):Object(o["createCommentVNode"])("",!0),Ie])}}});n("e358");const Ae=z()(xe,[["__scopeId","data-v-1ba1a972"]]);var Ce=Ae,Be={key:0,id:"workouts",class:"view"},Re={class:"container workouts-container"},Ue={class:"display-filters"},Le={class:"list-container"},$e=Object(o["defineComponent"])({setup:function(e){var t=Object(r["b"])(),n=t.t,c=Object(ne["a"])(),l=Object(o["computed"])((function(){return c.getters[te["a"].GETTERS.AUTH_USER_PROFILE]})),i=Object(o["computed"])((function(){return c.getters[te["c"].GETTERS.SPORTS]})),u=Object(o["computed"])((function(){return Object(a["e"])(i.value,n)})),s=Object(o["ref"])(!0);function d(){s.value=!s.value}return function(e,t){return Object(o["unref"])(l).username?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Be,[Object(o["createElementVNode"])("div",Re,[Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["filters-container",{hidden:s.value}])},[Object(o["createVNode"])(q,{sports:Object(o["unref"])(u),authUser:Object(o["unref"])(l),onFilter:d},null,8,["sports","authUser"])],2),Object(o["createElementVNode"])("div",Ue,[Object(o["createElementVNode"])("div",{onClick:d},[Object(o["createElementVNode"])("i",{class:Object(o["normalizeClass"])("fa fa-caret-".concat(s.value?"down":"up")),"aria-hidden":"true"},null,2),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.".concat(s.value?"DISPLAY":"HIDE","_FILTERS"))),1)])]),Object(o["createElementVNode"])("div",Le,[Object(o["createVNode"])(Ce,{user:Object(o["unref"])(l),sports:Object(o["unref"])(u)},null,8,["user","sports"])])])])):Object(o["createCommentVNode"])("",!0)}}});n("0d8e");const Me=z()($e,[["__scopeId","data-v-ed6df5ba"]]);t["default"]=Me},"07ae":function(e,t,n){},"0d8e":function(e,t,n){"use strict";n("8f45")},1998:function(e,t,n){},"1bff":function(e,t,n){},"304a":function(e,t,n){"use strict";n.r(t);var o=n("1da1"),r=(n("96cf"),n("7a23")),c=n("6c02"),a=n("f7f9"),l=n("ade3"),i=(n("e9c4"),n("b680"),n("a9e3"),n("99af"),n("ac1f"),n("5319"),n("b48c")),u=n("47e2"),s=n("6284"),d=n("9230"),b={id:"workout-chart"},O={class:"chart-radio"},m=["checked"],p=["checked"],j={class:"chart-info"},f={class:"no-data-cleaning"},g={class:"elevation-start"},k=["checked"],y=Object(r["defineComponent"])({props:{authUser:null,workoutData:null},emits:["getCoordinates"],setup:function(e,t){var n=t.emit,o=e,c=Object(u["b"])(),a=c.t,y=Object(r["ref"])(!0),v=Object(r["ref"])(!0),h=Object(r["computed"])((function(){return Object(d["b"])(o.workoutData.chartData,a,o.authUser.imperial_units)})),E=C("km"),N=C("m"),w=Object(r["computed"])((function(){return{labels:y.value?h.value.distance_labels:h.value.duration_labels,datasets:JSON.parse(JSON.stringify([h.value.datasets.speed,h.value.datasets.elevation]))}})),S=Object(r["computed"])((function(){return h.value.coordinates})),V=Object(r["computed"])((function(){var e;return{responsive:!0,maintainAspectRatio:!0,animation:!1,layout:{padding:{top:22}},scales:(e={},Object(l["a"])(e,y.value?"xDistance":"xDuration",{grid:{drawOnChartArea:!1},ticks:{count:10,callback:function(e){return y.value?Number(e).toFixed(2):I(e)}},type:"linear",bounds:"data",title:{display:!0,text:y.value?a("workouts.DISTANCE")+" (".concat(E,")"):a("workouts.DURATION")}}),Object(l["a"])(e,"ySpeed",{grid:{drawOnChartArea:!1},position:"left",title:{display:!0,text:a("workouts.SPEED")+" (".concat(E,"/h)")}}),Object(l["a"])(e,"yElevation",{beginAtZero:v.value,grid:{drawOnChartArea:!1},position:"right",title:{display:!0,text:a("workouts.ELEVATION")+" (".concat(N,")")}}),e),elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(e){var t=" ".concat(e.dataset.label,": ").concat(e.formattedValue);return"yElevation"===e.dataset.yAxisID?t+" ".concat(N):t+" ".concat(E,"/h")},title:function(e){return e.length>0&&x(S.value[e[0].dataIndex]),0===e.length?"":y.value?"".concat(a("workouts.DISTANCE"),": ").concat(e[0].label," ").concat(E):"".concat(a("workouts.DURATION"),": ").concat(I(e[0].label.replace(",","")))}}}}}})),T=Object(i["useLineChart"])({chartData:w,options:V}),D=T.lineChartProps;function _(){y.value=!y.value}function I(e){return new Date(1e3*+e).toISOString().substr(11,8)}function x(e){n("getCoordinates",e)}function A(){x({latitude:null,longitude:null})}function C(e){return o.authUser.imperial_units?s["c"][e].defaultTarget:e}return function(e,t){var n=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",b,[Object(r["createVNode"])(n,null,{title:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.ANALYSIS")),1)]})),content:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",O,[Object(r["createElementVNode"])("label",null,[Object(r["createElementVNode"])("input",{type:"radio",name:"distance",checked:Object(r["unref"])(y),onClick:_},null,8,m),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.DISTANCE")),1)]),Object(r["createElementVNode"])("label",null,[Object(r["createElementVNode"])("input",{type:"radio",name:"duration",checked:!Object(r["unref"])(y),onClick:_},null,8,p),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.DURATION")),1)])]),Object(r["createVNode"])(Object(r["unref"])(i["LineChart"]),Object(r["mergeProps"])(Object(r["unref"])(D),{class:"line-chart",onMouseleave:A}),null,16),Object(r["createElementVNode"])("div",j,[Object(r["createElementVNode"])("div",f,Object(r["toDisplayString"])(e.$t("workouts.NO_DATA_CLEANING")),1),Object(r["createElementVNode"])("div",g,[Object(r["createElementVNode"])("label",null,[Object(r["createElementVNode"])("input",{type:"checkbox",checked:Object(r["unref"])(v),onClick:t[0]||(t[0]=function(e){return Object(r["isRef"])(v)?v.value=!Object(r["unref"])(v):v=!Object(r["unref"])(v)})},null,8,k),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])])]})),_:1})])}}}),v=(n("c6be"),n("6b0d")),h=n.n(v);const E=h()(y,[["__scopeId","data-v-4819bfdb"]]);var N=E,w=(n("7db0"),n("d3b7"),function(e){return Object(r["pushScopeId"])("data-v-21fe0e9a"),e=e(),Object(r["popScopeId"])(),e}),S={id:"workout-card-title"},V=["title"],T=w((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)})),D=[T],_={class:"workout-card-title"},I={class:"workout-title-date"},x={key:0,class:"workout-title"},A={key:1,class:"workout-title"},C={class:"workout-segment"},B=Object(r["createTextVNode"])(" — "),R=w((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)})),U={class:"workout-date"},L={class:"workout-link"},$=["title"],M=w((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)})),P=[M],F=Object(r["defineComponent"])({props:{sport:null,workoutObject:null},emits:["displayModal"],setup:function(e,t){var n=t.emit,o=e,c=Object(r["toRefs"])(o),a=c.sport,l=c.workoutObject;return function(e,t){var o=Object(r["resolveComponent"])("SportImage"),c=Object(r["resolveComponent"])("router-link");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",S,[Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["workout-previous workout-arrow",{inactive:!Object(r["unref"])(l).previousUrl}]),title:Object(r["unref"])(l).previousUrl?e.$t("workouts.PREVIOUS_".concat(Object(r["unref"])(l).type)):e.$t("workouts.NO_PREVIOUS_".concat(Object(r["unref"])(l).type)),onClick:t[0]||(t[0]=function(t){return Object(r["unref"])(l).previousUrl?e.$router.push(Object(r["unref"])(l).previousUrl):null})},D,10,V),Object(r["createElementVNode"])("div",_,[Object(r["createVNode"])(o,{"sport-label":Object(r["unref"])(a).label,color:Object(r["unref"])(a).color},null,8,["sport-label","color"]),Object(r["createElementVNode"])("div",I,["WORKOUT"===Object(r["unref"])(l).type?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",x,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(Object(r["unref"])(l).title)+" ",1),Object(r["createElementVNode"])("i",{class:"fa fa-edit","aria-hidden":"true",onClick:t[1]||(t[1]=function(t){return e.$router.push({name:"EditWorkout",params:{workoutId:Object(r["unref"])(l).workoutId}})})}),Object(r["createElementVNode"])("i",{class:"fa fa-trash","aria-hidden":"true",onClick:t[2]||(t[2]=function(e){return n("displayModal",!0)})})])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",A,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(Object(r["unref"])(l).title)+" ",1),Object(r["createElementVNode"])("span",C,[B,R,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.SEGMENT"))+" "+Object(r["toDisplayString"])(Object(r["unref"])(l).segmentId+1),1)])])),Object(r["createElementVNode"])("div",U,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(Object(r["unref"])(l).workoutDate)+" - "+Object(r["toDisplayString"])(Object(r["unref"])(l).workoutTime)+" ",1),Object(r["createElementVNode"])("span",L,["SEGMENT"===Object(r["unref"])(l).type?(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,to:{name:"Workout",params:{workoutId:Object(r["unref"])(l).workoutId}}},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(" > "+Object(r["toDisplayString"])(e.$t("workouts.BACK_TO_WORKOUT")),1)]})),_:1},8,["to"])):Object(r["createCommentVNode"])("",!0)])])])]),Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["workout-next workout-arrow",{inactive:!Object(r["unref"])(l).nextUrl}]),title:Object(r["unref"])(l).nextUrl?e.$t("workouts.NEXT_".concat(Object(r["unref"])(l).type)):e.$t("workouts.NO_NEXT_".concat(Object(r["unref"])(l).type)),onClick:t[3]||(t[3]=function(t){return Object(r["unref"])(l).nextUrl?e.$router.push(Object(r["unref"])(l).nextUrl):null})},P,10,$)])}}});n("cdd7");const G=h()(F,[["__scopeId","data-v-21fe0e9a"]]);var W=G,z=function(e){return Object(r["pushScopeId"])("data-v-2e8c6844"),e=e(),Object(r["popScopeId"])(),e},H={key:0,class:"workout-record"},q=z((function(){return Object(r["createElementVNode"])("sup",null,[Object(r["createElementVNode"])("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)})),K=[q],Z=Object(r["defineComponent"])({props:{recordType:null,workoutObject:null},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.recordType,c=n.workoutObject;return function(e,t){return Object(r["unref"])(c).records&&Object(r["unref"])(c).records.find((function(e){return e.record_type===Object(r["unref"])(o)}))?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",H,K)):Object(r["createCommentVNode"])("",!0)}}});n("4168");const X=h()(Z,[["__scopeId","data-v-2e8c6844"]]);var Y=X,J=function(e){return Object(r["pushScopeId"])("data-v-07781815"),e=e(),Object(r["popScopeId"])(),e},Q={key:0,id:"workout-weather"},ee={class:"weather-table"},te=J((function(){return Object(r["createElementVNode"])("th",null,null,-1)})),ne={class:"weather-th"},oe=["src","alt","title"],re={class:"weather-th"},ce=["src","alt","title"],ae=["alt","title"],le=["alt","title"],ie=["alt","title"],ue=Object(r["defineComponent"])({props:{workoutObject:null,useImperialUnits:null},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.useImperialUnits,c=n.workoutObject;return function(e,t){var n=Object(r["resolveComponent"])("Distance");return Object(r["unref"])(c).weatherStart&&Object(r["unref"])(c).weatherEnd?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Q,[Object(r["createElementVNode"])("table",ee,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[te,Object(r["createElementVNode"])("th",null,[Object(r["createElementVNode"])("div",ne,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.START"))+" ",1),Object(r["createElementVNode"])("img",{class:"weather-img",src:"/img/weather/".concat(Object(r["unref"])(c).weatherStart.icon,".svg"),alt:e.$t("workouts.WEATHER.DARK_SKY.".concat(Object(r["unref"])(c).weatherStart.icon)),title:e.$t("workouts.WEATHER.DARK_SKY.".concat(Object(r["unref"])(c).weatherStart.icon))},null,8,oe)])]),Object(r["createElementVNode"])("th",null,[Object(r["createElementVNode"])("div",re,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.END"))+" ",1),Object(r["createElementVNode"])("img",{class:"weather-img",src:"/img/weather/".concat(Object(r["unref"])(c).weatherEnd.icon,".svg"),alt:e.$t("workouts.WEATHER.DARK_SKY.".concat(Object(r["unref"])(c).weatherEnd.icon)),title:e.$t("workouts.WEATHER.DARK_SKY.".concat(Object(r["unref"])(c).weatherEnd.icon))},null,8,ce)])])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("img",{class:"weather-img weather-img-small",src:"/img/weather/temperature.svg",alt:e.$t("workouts.WEATHER.TEMPERATURE"),title:e.$t("workouts.WEATHER.TEMPERATURE")},null,8,ae)]),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(Number(Object(r["unref"])(c).weatherStart.temperature).toFixed(1))+"°C ",1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(Number(Object(r["unref"])(c).weatherEnd.temperature).toFixed(1))+"°C ",1)]),Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("img",{class:"weather-img weather-img-small",src:"/img/weather/pour-rain.svg",alt:e.$t("workouts.WEATHER.HUMIDITY"),title:e.$t("workouts.WEATHER.HUMIDITY")},null,8,le)]),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(Number(100*Object(r["unref"])(c).weatherStart.humidity).toFixed(1))+"% ",1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(Number(100*Object(r["unref"])(c).weatherEnd.humidity).toFixed(1))+"% ",1)]),Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("img",{class:"weather-img weather-img-small",src:"/img/weather/breeze.svg",alt:e.$t("workouts.WEATHER.WIND"),title:e.$t("workouts.WEATHER.WIND")},null,8,ie)]),Object(r["createElementVNode"])("td",null,[Object(r["createVNode"])(n,{distance:Object(r["unref"])(c).weatherStart.wind,unitFrom:"m",digits:1,displayUnit:!1,useImperialUnits:Object(r["unref"])(o)},null,8,["distance","useImperialUnits"]),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(Object(r["unref"])(o)?"ft":"m")+"/s ",1)]),Object(r["createElementVNode"])("td",null,[Object(r["createVNode"])(n,{distance:Object(r["unref"])(c).weatherEnd.wind,unitFrom:"m",digits:1,displayUnit:!1,useImperialUnits:Object(r["unref"])(o)},null,8,["distance","useImperialUnits"]),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(Object(r["unref"])(o)?"ft":"m")+"/s ",1)])])])])])):Object(r["createCommentVNode"])("",!0)}}});n("f54d");const se=h()(ue,[["__scopeId","data-v-07781815"]]);var de=se,be=function(e){return Object(r["pushScopeId"])("data-v-b24d7c6e"),e=e(),Object(r["popScopeId"])(),e},Oe={id:"workout-info"},me={class:"workout-data"},pe=be((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)})),je={key:0},fe={class:"workout-data"},ge=be((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)})),ke={class:"workout-data"},ye=be((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)})),ve=be((function(){return Object(r["createElementVNode"])("br",null,null,-1)})),he={key:0,class:"workout-data"},Ee=["alt"],Ne=be((function(){return Object(r["createElementVNode"])("br",null,null,-1)})),we={key:1,class:"workout-data"},Se=be((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)})),Ve=be((function(){return Object(r["createElementVNode"])("br",null,null,-1)})),Te=Object(r["defineComponent"])({props:{workoutObject:null,useImperialUnits:null},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.workoutObject,c=n.useImperialUnits,a=Object(r["computed"])((function(){return"0:00:00"!==t.workoutObject.pauses&&null!==t.workoutObject.pauses}));return function(e,t){var n=Object(r["resolveComponent"])("Distance");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Oe,[Object(r["createElementVNode"])("div",me,[pe,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.DURATION"))+": ",1),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(Object(r["unref"])(o).moving),1),Object(r["createVNode"])(Y,{workoutObject:Object(r["unref"])(o),recordType:"LD"},null,8,["workoutObject"]),Object(r["unref"])(a)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",je,[Object(r["createTextVNode"])(" ("+Object(r["toDisplayString"])(e.$t("workouts.PAUSES"))+": ",1),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(Object(r["unref"])(o).pauses),1),Object(r["createTextVNode"])(" - "+Object(r["toDisplayString"])(e.$t("workouts.TOTAL_DURATION"))+": ",1),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(Object(r["unref"])(o).duration)+")",1)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",fe,[ge,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.DISTANCE"))+": ",1),Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:Object(r["unref"])(c)},null,8,["distance","useImperialUnits"]),Object(r["createVNode"])(Y,{workoutObject:Object(r["unref"])(o),recordType:"FD"},null,8,["workoutObject"])]),Object(r["createElementVNode"])("div",ke,[ye,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.AVERAGE_SPEED"))+": ",1),Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:Object(r["unref"])(c)},null,8,["distance","useImperialUnits"]),Object(r["createVNode"])(Y,{workoutObject:Object(r["unref"])(o),recordType:"AS"},null,8,["workoutObject"]),ve,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.MAX_SPEED"))+": ",1),Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:Object(r["unref"])(c)},null,8,["distance","useImperialUnits"]),Object(r["createVNode"])(Y,{workoutObject:Object(r["unref"])(o),recordType:"MS"},null,8,["workoutObject"])]),null!==Object(r["unref"])(o).maxAlt&&null!==Object(r["unref"])(o).minAlt?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",he,[Object(r["createElementVNode"])("img",{class:"mountains",src:"/img/workouts/mountains.svg",alt:e.$t("workouts.ELEVATION")},null,8,Ee),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.MIN_ALTITUDE"))+": ",1),Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).minAlt,unitFrom:"m",strong:!0,useImperialUnits:Object(r["unref"])(c)},null,8,["distance","useImperialUnits"]),Ne,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.MAX_ALTITUDE"))+": ",1),Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:Object(r["unref"])(c)},null,8,["distance","useImperialUnits"])])):Object(r["createCommentVNode"])("",!0),null!==Object(r["unref"])(o).ascent&&null!==Object(r["unref"])(o).descent?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",we,[Se,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.ASCENT"))+": ",1),Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).ascent,unitFrom:"m",strong:!0,useImperialUnits:Object(r["unref"])(c)},null,8,["distance","useImperialUnits"]),Ve,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.DESCENT"))+": ",1),Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).descent,unitFrom:"m",strong:!0,useImperialUnits:Object(r["unref"])(c)},null,8,["distance","useImperialUnits"])])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(de,{workoutObject:Object(r["unref"])(o),useImperialUnits:Object(r["unref"])(c)},null,8,["workoutObject","useImperialUnits"])])}}});n("f737");const De=h()(Te,[["__scopeId","data-v-b24d7c6e"]]);var _e=De,Ie=n("e94f"),xe=n("5afd"),Ae=n("dad5"),Ce=n("2906"),Be=n("d257"),Re={id:"workout-map"},Ue={key:0,class:"leaflet-container"},Le={key:1},$e={key:0,class:"leaflet-container"},Me={key:1,class:"no-map"},Pe=Object(r["defineComponent"])({props:{workoutData:null,markerCoordinates:{default:function(){return{}}}},setup:function(e){var t=e,n=Object(Ce["a"])(),o=Object(r["toRefs"])(t),c=o.workoutData,a=o.markerCoordinates,l=Object(r["ref"])(null),i=Object(r["computed"])((function(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]})),u=Object(r["computed"])((function(){return n.getters[Ae["b"].GETTERS.APP_CONFIG]})),s=Object(r["computed"])((function(){return O(i)})),d=Object(r["computed"])((function(){return t.workoutData&&t.workoutData.gpx?b(t.workoutData.gpx):{}}));function b(e){if(!e||""!==e)try{var t=Object(Ie["gpx"])((new DOMParser).parseFromString(e,"text/xml"));return{jsonData:t}}catch(n){return console.error("Invalid gpx content"),{}}return{}}function O(e){return[(e.value[0][0]+e.value[1][0])/2,(e.value[0][1]+e.value[1][1])/2]}function m(e){var t,n;null!==(t=l.value)&&void 0!==t&&t.leafletObject&&(null===(n=l.value)||void 0===n||n.leafletObject.fitBounds(e))}return function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Re,[Object(r["unref"])(c).loading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ue)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Le,[Object(r["unref"])(c).workout.with_gpx?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",$e,[Object(r["unref"])(d).jsonData&&Object(r["unref"])(s)&&2===Object(r["unref"])(i).length?(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["unref"])(xe["b"]),{key:0,zoom:13,center:Object(r["unref"])(s),bounds:Object(r["unref"])(i),ref:function(e,t){t["workoutMap"]=e,l.value=e},onReady:t[0]||(t[0]=function(e){return m(Object(r["unref"])(i))})},{default:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(Object(r["unref"])(xe["d"]),{url:"".concat(Object(r["unref"])(Be["a"])(),"workouts/map_tile/{s}/{z}/{x}/{y}.png"),attribution:Object(r["unref"])(u).map_attribution,bounds:Object(r["unref"])(i)},null,8,["url","attribution","bounds"]),Object(r["createVNode"])(Object(r["unref"])(xe["a"]),{geojson:Object(r["unref"])(d).jsonData},null,8,["geojson"]),Object(r["unref"])(a).latitude?(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["unref"])(xe["c"]),{key:0,"lat-lng":[Object(r["unref"])(a).latitude,Object(r["unref"])(a).longitude]},null,8,["lat-lng"])):Object(r["createCommentVNode"])("",!0)]})),_:1},8,["center","bounds"])):Object(r["createCommentVNode"])("",!0)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Me,Object(r["toDisplayString"])(e.$t("workouts.NO_MAP")),1))]))])}}});n("ac79");const Fe=h()(Pe,[["__scopeId","data-v-b4b3006a"]]);var Ge=Fe,We=n("5e65"),ze={class:"workout-detail"},He=Object(r["defineComponent"])({props:{authUser:null,displaySegment:null,sports:null,workoutData:null,markerCoordinates:{default:function(){return{}}}},setup:function(e){var t=e,n=Object(c["c"])(),a=Object(Ce["a"])(),l=Object(r["toRefs"])(t),i=l.authUser,u=l.markerCoordinates,s=l.workoutData,d=Object(r["computed"])((function(){return t.workoutData.workout})),b=Object(r["ref"])(n.params.workoutId?+n.params.segmentId:null),O=Object(r["computed"])((function(){return d.value.segments.length>0&&b.value?d.value.segments[+b.value-1]:null})),m=Object(r["ref"])(!1),p=Object(r["computed"])((function(){return t.sports?t.sports.find((function(e){return e.id===t.workoutData.workout.sport_id})):{}})),j=Object(r["computed"])((function(){return g(d.value,O.value)}));function f(e,t,n){var o=t&&n&&1!==n?"/workouts/".concat(e.id,"/segment/").concat(n-1):!t&&e.previous_workout?"/workouts/".concat(e.previous_workout):null,r=t&&n&&n<e.segments.length?"/workouts/".concat(e.id,"/segment/").concat(n+1):!t&&e.next_workout?"/workouts/".concat(e.next_workout):null;return{previousUrl:o,nextUrl:r}}function g(e,n){var o=f(e,t.displaySegment,b.value?+b.value:null),r=Object(We["a"])(Object(We["c"])(t.workoutData.workout.workout_date,t.authUser.timezone));return{ascent:n?n.ascent:e.ascent,aveSpeed:n?n.ave_speed:e.ave_speed,distance:n?n.distance:e.distance,descent:n?n.descent:e.descent,duration:n?n.duration:e.duration,maxAlt:n?n.max_alt:e.max_alt,maxSpeed:n?n.max_speed:e.max_speed,minAlt:n?n.min_alt:e.min_alt,moving:n?n.moving:e.moving,nextUrl:o.nextUrl,pauses:n?n.pauses:e.pauses,previousUrl:o.previousUrl,records:n?[]:e.records,segmentId:n?n.segment_id:null,title:e.title,type:t.displaySegment?"SEGMENT":"WORKOUT",workoutDate:r.workout_date,weatherEnd:n?null:e.weather_end,workoutId:e.id,weatherStart:n?null:e.weather_start,workoutTime:r.workout_time}}function k(e){m.value=e}function y(e){a.dispatch(Ae["f"].ACTIONS.DELETE_WORKOUT,{workoutId:e})}return Object(r["watch"])((function(){return n.params.segmentId}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t&&(b.value=+t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(e,t){var n=Object(r["resolveComponent"])("Modal"),o=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ze,[Object(r["unref"])(m)?(Object(r["openBlock"])(),Object(r["createBlock"])(n,{key:0,title:e.$t("common.CONFIRMATION"),message:e.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:t[0]||(t[0]=function(e){return y(Object(r["unref"])(j).workoutId)}),onCancelAction:t[1]||(t[1]=function(e){return k(!1)})},null,8,["title","message"])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(o,null,{title:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(W,{sport:Object(r["unref"])(p),workoutObject:Object(r["unref"])(j),onDisplayModal:t[2]||(t[2]=function(e){return k(!0)})},null,8,["sport","workoutObject"])]})),content:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(Ge,{workoutData:Object(r["unref"])(s),markerCoordinates:Object(r["unref"])(u)},null,8,["workoutData","markerCoordinates"]),Object(r["createVNode"])(_e,{workoutObject:Object(r["unref"])(j),useImperialUnits:Object(r["unref"])(i).imperial_units},null,8,["workoutObject","useImperialUnits"])]})),_:1})])}}});n("d917");const qe=h()(He,[["__scopeId","data-v-2655acaa"]]);var Ke=qe,Ze={id:"workout-note"},Xe=Object(r["defineComponent"])({props:{notes:{default:function(){return null}}},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.notes;return function(e,t){var n=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ze,[Object(r["createVNode"])(n,null,{title:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.NOTES")),1)]})),content:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(Object(r["unref"])(o)&&""!==Object(r["unref"])(o)?Object(r["unref"])(o):e.$t("workouts.NO_NOTES")),1)]})),_:1})])}}});n("c66b");const Ye=h()(Xe,[["__scopeId","data-v-64197f7a"]]);var Je=Ye,Qe={id:"workout-segments"},et=Object(r["defineComponent"])({props:{segments:null,useImperialUnits:null},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.segments,c=n.useImperialUnits;return function(e,t){var n=Object(r["resolveComponent"])("router-link"),a=Object(r["resolveComponent"])("Distance"),l=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Qe,[Object(r["createVNode"])(l,null,{title:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.SEGMENT",2)),1)]})),content:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("ul",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(Object(r["unref"])(o),(function(t,o){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:t.segment_id},[Object(r["createVNode"])(n,{to:{name:"WorkoutSegment",params:{workoutId:t.workout_id,segmentId:o+1}}},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.SEGMENT",1))+" "+Object(r["toDisplayString"])(o+1),1)]})),_:2},1032,["to"]),Object(r["createTextVNode"])(" ("+Object(r["toDisplayString"])(e.$t("workouts.DISTANCE"))+": ",1),Object(r["createVNode"])(a,{distance:t.distance,unitFrom:"km",useImperialUnits:Object(r["unref"])(c)},null,8,["distance","useImperialUnits"]),Object(r["createTextVNode"])(", "+Object(r["toDisplayString"])(e.$t("workouts.DURATION"))+": "+Object(r["toDisplayString"])(t.duration)+") ",1)])})),128))])]})),_:1})])}}});n("4b65");const tt=h()(et,[["__scopeId","data-v-01f43375"]]);var nt=tt,ot=function(e){return Object(r["pushScopeId"])("data-v-05ad7fd0"),e=e(),Object(r["popScopeId"])(),e},rt={id:"workout",class:"view"},ct={class:"container"},at={key:0,class:"workout-container"},lt={key:0},it=ot((function(){return Object(r["createElementVNode"])("div",{id:"bottom"},null,-1)})),ut={key:1},st=Object(r["defineComponent"])({props:{displaySegment:null},setup:function(e){var t=e,n=Object(c["c"])(),l=Object(Ce["a"])(),i=Object(r["toRefs"])(t),u=i.displaySegment,s=Object(r["computed"])((function(){return l.getters[Ae["f"].GETTERS.WORKOUT_DATA]})),d=Object(r["computed"])((function(){return l.getters[Ae["a"].GETTERS.AUTH_USER_PROFILE]})),b=Object(r["computed"])((function(){return l.getters[Ae["c"].GETTERS.SPORTS]})),O=Object(r["ref"])({latitude:null,longitude:null});function m(e){O.value={latitude:e.latitude,longitude:e.longitude}}return Object(r["onBeforeMount"])((function(){var e={workoutId:n.params.workoutId};t.displaySegment&&(e.segmentId=n.params.segmentId),l.dispatch(Ae["f"].ACTIONS.GET_WORKOUT_DATA,e)})),Object(r["onUnmounted"])((function(){l.commit(Ae["f"].MUTATIONS.EMPTY_WORKOUT)})),Object(r["watch"])((function(){return n.params.workoutId}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t&&l.dispatch(Ae["f"].ACTIONS.GET_WORKOUT_DATA,{workoutId:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Object(r["watch"])((function(){return n.params.segmentId}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){var o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n.params.workoutId&&(o={workoutId:n.params.workoutId},t&&(o.segmentId=t),l.dispatch(Ae["f"].ACTIONS.GET_WORKOUT_DATA,o));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",rt,[Object(r["createElementVNode"])("div",ct,[Object(r["unref"])(b).length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",at,[Object(r["unref"])(s).workout.id?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",lt,[Object(r["createVNode"])(Ke,{workoutData:Object(r["unref"])(s),sports:Object(r["unref"])(b),authUser:Object(r["unref"])(d),markerCoordinates:Object(r["unref"])(O),displaySegment:Object(r["unref"])(u)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),Object(r["unref"])(s).workout.with_gpx&&Object(r["unref"])(s).chartData.length>0?(Object(r["openBlock"])(),Object(r["createBlock"])(N,{key:0,workoutData:Object(r["unref"])(s),authUser:Object(r["unref"])(d),displaySegment:Object(r["unref"])(u),onGetCoordinates:m},null,8,["workoutData","authUser","displaySegment"])):Object(r["createCommentVNode"])("",!0),!Object(r["unref"])(u)&&Object(r["unref"])(s).workout.segments.length>1?(Object(r["openBlock"])(),Object(r["createBlock"])(nt,{key:1,segments:Object(r["unref"])(s).workout.segments,useImperialUnits:Object(r["unref"])(d).imperial_units},null,8,["segments","useImperialUnits"])):Object(r["createCommentVNode"])("",!0),Object(r["unref"])(u)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(Je,{key:2,notes:Object(r["unref"])(s).workout.notes},null,8,["notes"])),it])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ut,[Object(r["unref"])(s).loading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(a["a"],{key:0,target:"WORKOUT"}))]))])):Object(r["createCommentVNode"])("",!0)])])}}});n("e679");const dt=h()(st,[["__scopeId","data-v-05ad7fd0"]]);t["default"]=dt},4168:function(e,t,n){"use strict";n("696e")},"423d":function(e,t,n){},"4b65":function(e,t,n){"use strict";n("a74c")},"5afd":function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return x})),n.d(t,"c",(function(){return B})),n.d(t,"d",(function(){return P}));var o=n("7a23");const r=(e,t)=>{let n;return function(...o){const r=this;n&&clearTimeout(n),n=setTimeout(()=>{e.apply(r,o),n=null},t)}},c=e=>e&&"function"===typeof e.charAt?e.charAt(0).toUpperCase()+e.slice(1):e,a=(e,t,n)=>{for(const r in n){const a="set"+c(r);e[a]?Object(o["watch"])(()=>n[r],(t,n)=>{e[a](t,n)}):t[a]&&Object(o["watch"])(()=>n[r],e=>{t[a](e)})}},l=e=>{const t={};for(const n in e)if(n.startsWith("on")&&!n.startsWith("onUpdate")&&"onReady"!==n){const o=n.slice(2).toLocaleLowerCase();t[o]=e[n]}return t},i=async e=>{const t=await Promise.all([n.e("chunk-2d0c9189").then(n.t.bind(null,"584d",7)),n.e("chunk-2d0cf391").then(n.t.bind(null,"6397",7)),n.e("chunk-2d22523a").then(n.t.bind(null,"e2b9",7))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},u=e=>{const t=Object(o["ref"])(()=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...e)=>t.value(...e);return n.wrapped=t,Object(o["provide"])(e,n),n},s=(e,t)=>e.wrapped.value=t,d="object"===typeof self&&self.self===self&&self||"object"===typeof e&&e.global===e&&e||void 0,b="useGlobalLeaflet",O={options:{type:Object,default:()=>({})}},m=e=>({options:e.options,methods:{}}),p={...O,pane:{type:String,default:"overlayPane"},attribution:{type:String,default:null},name:{type:String,custom:!0,default:void 0},layerType:{type:String,custom:!0,default:void 0},visible:{type:Boolean,custom:!0,default:!0}},j=(e,t,n)=>{const r=Object(o["inject"])("addLayer"),c=Object(o["inject"])("removeLayer"),{options:a,methods:l}=m(e),i={...a,attribution:e.attribution,pane:e.pane},u=()=>r({leafletObject:t.value}),s=()=>c({leafletObject:t.value}),d={...l,setAttribution(e,t){const n=this.$parent.leafletObject.attributionControl;n.removeAttribution(t).addAttribution(e)},setName(){s(),e.visible&&u()},setLayerType(){s(),e.visible&&u()},setVisible(e){t.value&&(e?u():s())},bindPopup({leafletObject:e}){t.value.bindPopup(e)},bindTooltip({leafletObject:e}){t.value.bindTooltip(e)},unbindTooltip(){const e=t.value?t.value.getTooltip():null;e&&e.unbindTooltip()},unbindPopup(){const e=t.value?t.value.getPopup():null;e&&e.unbindPopup()},updateVisibleProp(e){n.emit("update:visible",e)}};return Object(o["provide"])("bindPopup",d.bindPopup),Object(o["provide"])("bindTooltip",d.bindTooltip),Object(o["provide"])("unbindTooltip",d.unbindTooltip),Object(o["provide"])("unbindPopup",d.unbindPopup),Object(o["onUnmounted"])(()=>{d.unbindPopup(),d.unbindTooltip(),s()}),{options:i,methods:d}},f=(e,t)=>{if(e&&t.default)return Object(o["h"])("div",{style:{display:"none"}},t.default())},g={...O,interactive:{type:Boolean,default:!0},bubblingMouseEvents:{type:Boolean,default:!0}},k={...p,...g,stroke:{type:Boolean,custom:!0,default:!0},color:{type:String,custom:!0,default:"#3388ff"},weight:{type:Number,custom:!0,default:3},opacity:{type:Number,custom:!0,default:1},lineCap:{type:String,custom:!0,default:"round"},lineJoin:{type:String,custom:!0,default:"round"},dashArray:{type:String,custom:!0,default:null},dashOffset:{type:String,custom:!0,default:null},fill:{type:Boolean,custom:!0,default:!1},fillColor:{type:String,custom:!0,default:"#3388ff"},fillOpacity:{type:Number,custom:!0,default:.2},fillRule:{type:String,custom:!0,default:"evenodd"},className:{type:String,custom:!0,default:null}},y={...k,latLng:{type:[Object,Array],custom:!0,default:null},radius:{type:Number,default:null}};const v={...O,position:{type:String,default:"topright"}},h=(e,t)=>{const{options:n,methods:r}=m(e),c={...n,position:e.position},a={...r,setPosition(e){t.value&&t.value.setPosition(e)}};return Object(o["onUnmounted"])(()=>{t.value&&t.value.remove()}),{options:c,methods:a}},E=e=>e.default?Object(o["h"])("div",{ref:"root"},e.default()):null;Boolean,Boolean;Boolean,Boolean,Boolean,Boolean;Boolean,Boolean,Boolean;const N={...p},w=(e,t,n)=>{const{options:r,methods:c}=j(e,t,n),a={...r},l={...c,addLayer(e){t.value.addLayer(e.leafletObject)},removeLayer(e){t.value.removeLayer(e.leafletObject)}};return Object(o["provide"])("addLayer",l.addLayer),Object(o["provide"])("removeLayer",l.removeLayer),{options:a,methods:l}};const S={...N,geojson:{type:[Object,Array],default:()=>({})}},V=(e,t)=>{const{options:n,methods:o}=w(e,t),r={...n,...e},c={...o,setGeojson(e){t.value.clearLayers(),t.value.addData(e)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:r,methods:c}};var T={props:S,setup(e,t){const r=Object(o["ref"])({}),c=Object(o["ref"])(!1),i=Object(o["inject"])(b),u=Object(o["inject"])("addLayer"),{methods:s,options:O}=V(e,r);return Object(o["onMounted"])(async()=>{const{geoJSON:b,DomEvent:m}=i?d.L:await n.e("chunk-2d0da8f3").then(n.bind(null,"6bb3"));r.value=b(e.geojson,O);const p=l(t.attrs);m.on(r.value,p),a(s,r.value,e),u({...e,...s,leafletObject:r.value}),c.value=!0,Object(o["nextTick"])(()=>t.emit("ready",r.value))}),{ready:c,leafletObject:r}},render(){return f(this.ready,this.$slots)},__file:"src/components/LGeoJson.vue"};const D={...p,pane:{type:String,default:"tilePane"},opacity:{type:Number,custom:!1,default:1},zIndex:{type:Number,default:1},tileSize:{type:Number,default:256},noWrap:{type:Boolean,default:!1},minZoom:{type:Number,default:0},maxZoom:{type:Number,default:void 0}},_=(e,t,n)=>{const{options:o,methods:r}=j(e,t,n),c={...o,pane:e.pane,opacity:e.opacity,zIndex:e.zIndex,tileSize:e.tileSize,noWrap:e.noWrap,minZoom:e.minZoom,maxZoom:e.maxZoom};return{options:c,methods:{...r}}};const I={iconUrl:{type:String,custom:!0,default:null},iconRetinaUrl:{type:String,custom:!0,default:null},iconSize:{type:[Object,Array],custom:!0,default:null},iconAnchor:{type:[Object,Array],custom:!0,default:null},popupAnchor:{type:[Object,Array],custom:!0,default:()=>[0,0]},tooltipAnchor:{type:[Object,Array],custom:!0,default:()=>[0,0]},shadowUrl:{type:String,custom:!0,default:null},shadowRetinaUrl:{type:String,custom:!0,default:null},shadowSize:{type:[Object,Array],custom:!0,default:null},shadowAnchor:{type:[Object,Array],custom:!0,default:null},bgPos:{type:[Object,Array],custom:!0,default:()=>[0,0]},className:{type:String,custom:!0,default:""},options:{type:Object,custom:!0,default:()=>({})}};Boolean,Boolean;var x={emits:["ready","update:zoom","update:center","update:bounds"],props:{...O,center:{type:[Object,Array],default:()=>[0,0]},bounds:{type:[Array,Object],default:void 0},maxBounds:{type:[Array,Object],default:void 0},zoom:{type:Number,default:0},minZoom:{type:Number,default:void 0},maxZoom:{type:Number,default:void 0},paddingBottomRight:{type:Array,default:void 0},paddingTopLeft:{type:Array,default:void 0},padding:{type:Array,default:void 0},worldCopyJump:{type:Boolean,default:!1},crs:{type:[String,Object],default:"EPSG3857"},maxBoundsViscosity:{type:Number,default:void 0},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number,default:void 0},inertiaMaxSpeed:{type:Number,default:void 0},easeLinearity:{type:Number,default:void 0},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number,default:void 0},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:!1},useGlobalLeaflet:{type:Boolean,default:!1}},setup(e,t){const c=Object(o["ref"])(null),O=Object(o["reactive"])({ready:!1,leafletRef:{},layersToAdd:[],layersInControl:[]}),{options:p}=m(e),j={...p,minZoom:e.minZoom,maxZoom:e.maxZoom,maxBounds:e.maxBounds,maxBoundsViscosity:e.maxBoundsViscosity,worldCopyJump:e.worldCopyJump,crs:e.crs,center:e.center,zoom:e.zoom,inertia:e.inertia,inertiaDeceleration:e.inertiaDeceleration,inertiaMaxSpeed:e.inertiaMaxSpeed,easeLinearity:e.easeLinearity,zoomAnimation:e.zoomAnimation,zoomAnimationThreshold:e.zoomAnimationThreshold,fadeAnimation:e.fadeAnimation,markerZoomAnimation:e.markerZoomAnimation},f=u("addLayer"),g=u("removeLayer"),k=u("registerControl"),y=u("registerLayerControl");Object(o["provide"])(b,e.useGlobalLeaflet);const v={moveEndHandler(){t.emit("update:zoom",O.leafletRef.getZoom()),t.emit("update:center",O.leafletRef.getCenter()),t.emit("update:bounds",O.leafletRef.getBounds())},overlayAddHandler(e){const t=O.layersInControl.find(t=>t.name===e.name);t&&t.updateVisibleProp(!0)},overlayRemoveHandler(e){const t=O.layersInControl.find(t=>t.name===e.name);t&&t.updateVisibleProp(!1)}};Object(o["onMounted"])(async()=>{e.useGlobalLeaflet&&(d.L=d.L||await n.e("chunk-2d2248b6").then(n.t.bind(null,"e11e",7)));const{map:u,CRS:b,Icon:m,latLngBounds:p,latLng:h,DomEvent:E}=e.useGlobalLeaflet?d.L:await n.e("chunk-2d0da8f3").then(n.bind(null,"6bb3"));try{j.beforeMapMount&&await j.beforeMapMount()}catch(V){console.error("The following error occurred running the provided beforeMapMount hook "+V.message)}await i(m);const N="string"==typeof j.crs?b[j.crs]:j.crs;j.crs=N||b.EPSG3857;const w={addLayer(e){if(void 0!==e.layerType)if(void 0===O.layerControl)O.layersToAdd.push(e);else{const t=O.layersInControl.find(t=>t.leafletObject._leaflet_id===e.leafletObject._leaflet_id);t||(O.layerControl.addLayer(e),O.layersInControl.push(e))}!1!==e.visible&&O.leafletRef.addLayer(e.leafletObject)},removeLayer(e){void 0!==e.layerType&&(void 0===O.layerControl?O.layersToAdd=O.layersToAdd.filter(t=>t.name!==e.name):(O.layerControl.removeLayer(e.leafletObject),O.layersInControl=O.layersInControl.filter(t=>t.leafletObject._leaflet_id!==e.leafletObject._leaflet_id))),O.leafletRef.removeLayer(e.leafletObject)},registerLayerControl(e){O.layerControl=e,O.layersToAdd.forEach(e=>{O.layerControl.addLayer(e)}),O.layersToAdd=[],k(e)},registerControl(e){O.leafletRef.addControl(e.leafletObject)},setZoom(t){const n=O.leafletRef.getZoom();t!==n&&O.leafletRef.setZoom(t,{animate:!e.noBlockingAnimations&&null})},setPaddingBottomRight(e){O.paddingBottomRight=e},setPaddingTopLeft(e){O.paddingTopLeft=e},setPadding(e){O.padding=e},setCrs(e){const t=O.leafletRef.getBounds();O.leafletRef.options.crs=e,O.leafletRef.fitBounds(t,{animate:!1,padding:[0,0]})},fitBounds(e){O.leafletRef.fitBounds(e,{animate:!this.noBlockingAnimations&&null})},setBounds(e){if(!e)return;const t=p(e);if(!t.isValid())return;const n=O.lastSetBounds||O.leafletRef.getBounds(),o=!n.equals(t,0);o&&(O.lastSetBounds=t,O.leafletRef.fitBounds(t,this.fitBoundsOptions))},setCenter(e){if(null==e)return;const t=h(e),n=O.lastSetCenter||O.leafletRef.getCenter();n.lat===t.lat&&n.lng===t.lng||(O.lastSetCenter=t,O.leafletRef.panTo(t,{animate:!this.noBlockingAnimations&&null}))}};s(f,w.addLayer),s(g,w.removeLayer),s(k,w.registerControl),s(y,w.registerLayerControl),O.leafletRef=u(c.value,j),a(w,O.leafletRef,e);const S=l(t.attrs);O.leafletRef.on("moveend",r(v.moveEndHandler,100)),O.leafletRef.on("overlayadd",v.overlayAddHandler),O.leafletRef.on("overlayremove",v.overlayRemoveHandler),E.on(O.leafletRef,S),O.ready=!0,Object(o["nextTick"])(()=>t.emit("ready",O.leafletRef))}),Object(o["onBeforeUnmount"])(()=>{O.leafletRef&&O.leafletRef.remove()});const h=Object(o["computed"])(()=>O.leafletRef),E=Object(o["computed"])(()=>O.ready);return{root:c,ready:E,leafletObject:h}},render(){return Object(o["h"])("div",{style:{width:"100%",height:"100%"},ref:"root"},this.ready?this.$slots.default():{})},__file:"src/components/LMap.vue"};const A={...p,pane:{type:String,default:"markerPane"},draggable:{type:Boolean,custom:!0,default:!1},latLng:{type:[Object,Array],custom:!0,default:null},icon:{type:[Object],default:()=>{},custom:!1},zIndexOffset:{type:Number,custom:!1,default:null}},C=(e,t,n)=>{const{options:o,methods:r}=j(e,t,n),c={...o,...e},a={...r,setDraggable(e){t.value.dragging&&(e?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(e){n.emit("update:latLng",e.latlng),n.emit("update:lat-lng",e.latlng)},setLatLng(e){if(null!=e&&t.value){const n=t.value.getLatLng();n&&n.equals(e)||t.value.setLatLng(e)}}};return{options:c,methods:a}};var B={name:"LMarker",props:A,setup(e,t){const c=Object(o["ref"])({}),i=Object(o["ref"])(!1),u=Object(o["inject"])(b),s=Object(o["inject"])("addLayer");Object(o["provide"])("canSetParentHtml",()=>!!c.value.getElement()),Object(o["provide"])("setParentHtml",e=>c.value.getElement().innerHTML=e),Object(o["provide"])("setIcon",e=>c.value.setIcon&&c.value.setIcon(e));const{options:O,methods:m}=C(e,c,t);return void 0===O.icon&&delete O.icon,Object(o["onMounted"])(async()=>{const{marker:b,DomEvent:p}=u?d.L:await n.e("chunk-2d0da8f3").then(n.bind(null,"6bb3"));c.value=b(e.latLng,O);const j=l(t.attrs);p.on(c.value,j),c.value.on("move",r(m.latLngSync,100)),a(m,c.value,e),s({...e,...m,leafletObject:c.value}),i.value=!0,Object(o["nextTick"])(()=>t.emit("ready",c.value))}),{ready:i,leafletObject:c}},render(){return f(this.ready,this.$slots)},__file:"src/components/LMarker.vue"};const R={...k,latLngs:{type:Array,default:()=>[]},smoothFactor:{type:Number,custom:!0,default:1},noClip:{type:Boolean,custom:!0,default:!1}},U={...R};const L={...O,content:{type:String,default:null}};const $={...D,tms:{type:Boolean,default:!1},subdomains:{type:String,default:"abc"},detectRetina:{type:Boolean,default:!1},url:{type:String,default:null}},M=(e,t)=>{const{options:n,methods:o}=_(e,t),r={...n,tms:e.tms,subdomains:e.subdomains,detectRetina:e.detectRetina};return{options:r,methods:{...o}}};var P={props:$,setup(e,t){const r=Object(o["ref"])({}),c=Object(o["inject"])(b),i=Object(o["inject"])("addLayer"),{options:u,methods:s}=M(e,r);return Object(o["onMounted"])(async()=>{const{tileLayer:b,DomEvent:O}=c?d.L:await n.e("chunk-2d0da8f3").then(n.bind(null,"6bb3"));r.value=b(e.url,u);const m=l(t.attrs);O.on(r.value,m),a(s,r.value,e),i({...e,...s,leafletObject:r.value}),Object(o["nextTick"])(()=>t.emit("ready",r.value))}),{leafletObject:r}},render(){return null},__file:"src/components/LTileLayer.vue"};Boolean,Boolean}).call(this,n("c8ba"))},"5c76":function(e,t,n){"use strict";var o=n("1da1"),r=(n("96cf"),n("ac1f"),n("1276"),n("b680"),n("99af"),n("7a23")),c=n("47e2"),a=n("6c02"),l=n("dad5"),i=n("2906"),u=n("5e65"),s=n("c364"),d=n("1119"),b=n("6284"),O={id:"workout-form"},m=["onSubmit"],p={class:"form-items"},j={key:0,class:"form-item-radio"},f=["checked","disabled"],g={for:"withGpx"},k=["checked","disabled"],y={for:"withoutGpx"},v={class:"form-item"},h=["disabled"],E=["value"],N={key:1,class:"form-item"},w={for:"gpxFile"},S=["disabled"],V={class:"files-help info-box"},T={key:2,class:"form-item"},D={for:"title"},_=["required","disabled"],I={key:3},x={class:"workout-date-duration"},A={class:"form-item"},C={class:"workout-date-time"},B=["disabled"],R=["disabled"],U={class:"form-item"},L=["disabled"],$=Object(r["createTextVNode"])(" : "),M=["disabled"],P=Object(r["createTextVNode"])(" : "),F=["disabled"],G={class:"form-item"},W=["disabled"],z={class:"form-item"},H={key:1},q={key:2,class:"form-buttons"},K=["disabled"],Z=["onClick"],X=Object(r["defineComponent"])({props:{authUser:null,sports:null,isCreation:{default:!1},loading:{default:!1},workout:{default:function(){return{}}}},setup:function(e){var t=e,n=Object(c["b"])(),X=n.t,Y=Object(i["a"])(),J=Object(a["d"])(),Q=Object(r["toRefs"])(t),ee=Q.authUser,te=Q.workout,ne=Q.isCreation,oe=Q.loading,re=Object(r["computed"])((function(){return Object(d["e"])(t.sports,X,!0,te.value.id?[te.value.sport_id]:null)})),ce=Object(r["computed"])((function(){return Y.getters[l["b"].GETTERS.APP_CONFIG]})),ae=ce.value.max_single_file_size?Object(s["b"])(ce.value.max_single_file_size):"",le=ce.value.gpx_limit_import,ie=ce.value.max_zip_file_size?Object(s["b"])(ce.value.max_zip_file_size):"",ue=Object(r["computed"])((function(){return Y.getters[l["b"].GETTERS.ERROR_MESSAGES]})),se=Object(r["reactive"])({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:""}),de=Object(r["ref"])(t.workout.id?t.workout.with_gpx:t.isCreation),be=null,Oe=Object(r["ref"])(!1);function me(e){se.notes=e}function pe(){de.value=!de.value,Oe.value=!1}function je(e){e.target.files&&(be=e.target.files[0])}function fe(e){if(se.sport_id="".concat(e.sport_id),se.title=e.title,se.notes=e.notes,!e.with_gpx){var n=Object(u["a"])(Object(u["c"])(e.workout_date,t.authUser.timezone),"yyyy-MM-dd"),o=e.duration.split(":");se.workoutDistance="".concat(ee.value.imperial_units?Object(b["a"])(e.distance,"km","mi",2):parseFloat(e.distance.toFixed(2))),se.workoutDate=n.workout_date,se.workoutTime=n.workout_time,se.workoutDurationHour=o[0],se.workoutDurationMinutes=o[1],se.workoutDurationSeconds=o[2]}}function ge(e){e.title=se.title,e.distance=ee.value.imperial_units?Object(b["a"])(+se.workoutDistance,"mi","km",3):+se.workoutDistance,e.duration=3600*+se.workoutDurationHour+60*+se.workoutDurationMinutes+ +se.workoutDurationSeconds,e.workout_date="".concat(se.workoutDate," ").concat(se.workoutTime)}function ke(){var e={sport_id:+se.sport_id,notes:se.notes};if(t.workout.id)t.workout.with_gpx?e.title=se.title:ge(e),Y.dispatch(l["f"].ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:e});else if(de.value){if(!be){var n="workouts.NO_FILE_PROVIDED";return void Y.commit(l["b"].MUTATIONS.SET_ERROR_MESSAGES,n)}e.file=be,Y.dispatch(l["f"].ACTIONS.ADD_WORKOUT,e)}else ge(e),Y.dispatch(l["f"].ACTIONS.ADD_WORKOUT_WITHOUT_GPX,e)}function ye(){t.workout.id?J.push({name:"Workout",params:{workoutId:t.workout.id}}):J.go(-1)}function ve(){Oe.value=!0}return Object(r["onMounted"])((function(){t.workout.id&&fe(t.workout)})),Object(r["onUnmounted"])((function(){return Y.commit(l["b"].MUTATIONS.EMPTY_ERROR_MESSAGES)})),Object(r["watch"])((function(){return t.workout}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t!==n&&t&&t.id&&fe(t);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),function(e,t){var n=Object(r["resolveComponent"])("CustomTextArea"),o=Object(r["resolveComponent"])("ErrorMessage"),c=Object(r["resolveComponent"])("Loader"),a=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{id:"workout-edition",class:Object(r["normalizeClass"])(["center-card center-card with-margin",{"center-form":Object(r["unref"])(te)&&Object(r["unref"])(te).with_gpx}])},[Object(r["createVNode"])(a,null,{title:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.".concat(Object(r["unref"])(ne)?"ADD":"EDIT","_WORKOUT"))),1)]})),content:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",O,[Object(r["createElementVNode"])("form",{class:Object(r["normalizeClass"])({errors:Oe.value}),onSubmit:Object(r["withModifiers"])(ke,["prevent"])},[Object(r["createElementVNode"])("div",p,[Object(r["unref"])(ne)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",j,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("input",{id:"withGpx",type:"radio",checked:Object(r["unref"])(de),disabled:Object(r["unref"])(oe),onClick:pe},null,8,f),Object(r["createElementVNode"])("label",g,Object(r["toDisplayString"])(e.$t("workouts.WITH_GPX")),1)]),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("input",{id:"withoutGpx",type:"radio",checked:!Object(r["unref"])(de),disabled:Object(r["unref"])(oe),onClick:pe},null,8,k),Object(r["createElementVNode"])("label",y,Object(r["toDisplayString"])(e.$t("workouts.WITHOUT_GPX")),1)])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",v,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.SPORT",1))+": ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("select",{id:"sport",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[0]||(t[0]=function(e){return Object(r["unref"])(se).sport_id=e})},[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(Object(r["unref"])(re),(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("option",{value:e.id,key:e.id},Object(r["toDisplayString"])(e.translatedLabel),9,E)})),128))],40,h),[[r["vModelSelect"],Object(r["unref"])(se).sport_id]])]),Object(r["unref"])(ne)&&Object(r["unref"])(de)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",N,[Object(r["createElementVNode"])("label",w,Object(r["toDisplayString"])(e.$t("workouts.GPX_FILE"))+" "+Object(r["toDisplayString"])(e.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+": ",1),Object(r["createElementVNode"])("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:Object(r["unref"])(oe),required:"",onInvalid:ve,onInput:je},null,40,S),Object(r["createElementVNode"])("div",V,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.$t("workouts.GPX_FILE"))+":",1),Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.$t("workouts.MAX_SIZE"))+": "+Object(r["toDisplayString"])(Object(r["unref"])(ae)),1)])]),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.$t("workouts.ZIP_ARCHIVE"))+":",1),Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.$t("workouts.NO_FOLDER")),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.$t("workouts.MAX_FILES"))+": "+Object(r["toDisplayString"])(Object(r["unref"])(le)),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.$t("workouts.MAX_SIZE"))+": "+Object(r["toDisplayString"])(Object(r["unref"])(ie)),1)])])])])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",T,[Object(r["createElementVNode"])("label",D,Object(r["toDisplayString"])(e.$t("workouts.TITLE"))+": ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"title",name:"title",type:"text",required:!Object(r["unref"])(ne),onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[1]||(t[1]=function(e){return Object(r["unref"])(se).title=e})},null,40,_),[[r["vModelText"],Object(r["unref"])(se).title]])])),Object(r["unref"])(de)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",I,[Object(r["createElementVNode"])("div",x,[Object(r["createElementVNode"])("div",A,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.WORKOUT_DATE"))+":",1),Object(r["createElementVNode"])("div",C,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[2]||(t[2]=function(e){return Object(r["unref"])(se).workoutDate=e})},null,40,B),[[r["vModelText"],Object(r["unref"])(se).workoutDate]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[3]||(t[3]=function(e){return Object(r["unref"])(se).workoutTime=e})},null,40,R),[[r["vModelText"],Object(r["unref"])(se).workoutTime]])])]),Object(r["createElementVNode"])("div",U,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.DURATION"))+":",1),Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:"workout-duration",type:"text",placeholder:"HH",pattern:"^([0-9]*[0-9])$",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[4]||(t[4]=function(e){return Object(r["unref"])(se).workoutDurationHour=e})},null,40,L),[[r["vModelText"],Object(r["unref"])(se).workoutDurationHour]]),$,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:"workout-duration",type:"text",pattern:"^([0-5][0-9])$",placeholder:"MM",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[5]||(t[5]=function(e){return Object(r["unref"])(se).workoutDurationMinutes=e})},null,40,M),[[r["vModelText"],Object(r["unref"])(se).workoutDurationMinutes]]),P,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:"workout-duration",type:"text",pattern:"^([0-5][0-9])$",placeholder:"SS",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[6]||(t[6]=function(e){return Object(r["unref"])(se).workoutDurationSeconds=e})},null,40,F),[[r["vModelText"],Object(r["unref"])(se).workoutDurationSeconds]])])])]),Object(r["createElementVNode"])("div",G,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.DISTANCE"))+" ("+Object(r["toDisplayString"])(Object(r["unref"])(ee).imperial_units?"mi":"km")+"): ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[7]||(t[7]=function(e){return Object(r["unref"])(se).workoutDistance=e})},null,40,W),[[r["vModelText"],Object(r["unref"])(se).workoutDistance]])])])),Object(r["createElementVNode"])("div",z,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.NOTES"))+": ",1),Object(r["createVNode"])(n,{name:"notes",input:Object(r["unref"])(se).notes,disabled:Object(r["unref"])(oe),onUpdateValue:me},null,8,["input","disabled"])])]),Object(r["unref"])(ue)?(Object(r["openBlock"])(),Object(r["createBlock"])(o,{key:0,message:Object(r["unref"])(ue)},null,8,["message"])):Object(r["createCommentVNode"])("",!0),Object(r["unref"])(oe)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",H,[Object(r["createVNode"])(c)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",q,[Object(r["createElementVNode"])("button",{class:"confirm",type:"submit",disabled:Object(r["unref"])(oe)},Object(r["toDisplayString"])(e.$t("buttons.SUBMIT")),9,K),Object(r["createElementVNode"])("button",{class:"cancel",onClick:Object(r["withModifiers"])(ye,["prevent"])},Object(r["toDisplayString"])(e.$t("buttons.CANCEL")),9,Z)]))],42,m)])]})),_:1})],2)}}}),Y=(n("e84e"),n("6b0d")),J=n.n(Y);const Q=J()(X,[["__scopeId","data-v-5206efae"]]);t["a"]=Q},"692d":function(e,t,n){"use strict";n.r(t);var o=n("7a23"),r=n("5c76"),c=n("dad5"),a=n("2906"),l={id:"add-workout",class:"view"},i={class:"container"},u=Object(o["defineComponent"])({setup:function(e){var t=Object(a["a"])(),n=Object(o["computed"])((function(){return t.getters[c["c"].GETTERS.SPORTS]})),u=Object(o["computed"])((function(){return t.getters[c["a"].GETTERS.AUTH_USER_PROFILE]})),s=Object(o["computed"])((function(){return t.getters[c["f"].GETTERS.WORKOUT_DATA]}));return function(e,t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",l,[Object(o["createElementVNode"])("div",i,[Object(o["createVNode"])(r["a"],{authUser:Object(o["unref"])(u),sports:Object(o["unref"])(n),isCreation:!0,loading:Object(o["unref"])(s).loading},null,8,["authUser","sports","loading"])])])}}});const s=u;t["default"]=s},"696e":function(e,t,n){},7156:function(e,t,n){var o=n("1626"),r=n("861d"),c=n("d2bb");e.exports=function(e,t,n){var a,l;return c&&o(a=t.constructor)&&a!==n&&r(l=a.prototype)&&l!==n.prototype&&c(e,l),e}},7253:function(e,t,n){},"8ce4":function(e,t,n){},"8dbb":function(e,t,n){},"8ee9":function(e,t,n){"use strict";n.r(t);var o=n("1da1"),r=(n("96cf"),n("7a23")),c=n("6c02"),a=n("5c76"),l=n("dad5"),i=n("2906"),u={id:"edit-workout",class:"view"},s={class:"container"},d=Object(r["defineComponent"])({setup:function(e){var t=Object(c["c"])(),n=Object(i["a"])(),d=Object(r["computed"])((function(){return n.getters[l["a"].GETTERS.AUTH_USER_PROFILE]})),b=Object(r["computed"])((function(){return n.getters[l["c"].GETTERS.SPORTS]})),O=Object(r["computed"])((function(){return n.getters[l["f"].GETTERS.WORKOUT_DATA]}));return Object(r["onBeforeMount"])((function(){n.dispatch(l["f"].ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})})),Object(r["watch"])((function(){return t.params.workoutId}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t||n.commit(l["f"].MUTATIONS.EMPTY_WORKOUT);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",u,[Object(r["createElementVNode"])("div",s,[Object(r["createVNode"])(a["a"],{authUser:Object(r["unref"])(d),sports:Object(r["unref"])(b),workout:Object(r["unref"])(O).workout,loading:Object(r["unref"])(O).loading},null,8,["authUser","sports","workout","loading"])])])}}});const b=d;t["default"]=b},"8f45":function(e,t,n){},"95b0":function(e,t,n){"use strict";n("1998")},"97f1":function(e,t,n){},9886:function(e,t,n){},a74c:function(e,t,n){},a9e3:function(e,t,n){"use strict";var o=n("83ab"),r=n("da84"),c=n("e330"),a=n("94ca"),l=n("6eeb"),i=n("1a2d"),u=n("7156"),s=n("3a9b"),d=n("d9b5"),b=n("c04e"),O=n("d039"),m=n("241c").f,p=n("06cf").f,j=n("9bf2").f,f=n("408a"),g=n("58a8").trim,k="Number",y=r[k],v=y.prototype,h=r.TypeError,E=c("".slice),N=c("".charCodeAt),w=function(e){var t=b(e,"number");return"bigint"==typeof t?t:S(t)},S=function(e){var t,n,o,r,c,a,l,i,u=b(e,"number");if(d(u))throw h("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=g(u),t=N(u,0),43===t||45===t){if(n=N(u,2),88===n||120===n)return NaN}else if(48===t){switch(N(u,1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+u}for(c=E(u,2),a=c.length,l=0;l<a;l++)if(i=N(c,l),i<48||i>r)return NaN;return parseInt(c,o)}return+u};if(a(k,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var V,T=function(e){var t=arguments.length<1?0:y(w(e)),n=this;return s(v,n)&&O((function(){f(n)}))?u(Object(t),n,T):t},D=o?m(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),_=0;D.length>_;_++)i(y,V=D[_])&&!i(T,V)&&j(T,V,p(y,V));T.prototype=v,v.constructor=T,l(r,k,T)}},ac79:function(e,t,n){"use strict";n("8ce4")},c23a:function(e,t,n){},c66b:function(e,t,n){"use strict";n("7253")},c6be:function(e,t,n){"use strict";n("07ae")},cdd7:function(e,t,n){"use strict";n("423d")},d636:function(e,t,n){},d917:function(e,t,n){"use strict";n("c23a")},e358:function(e,t,n){"use strict";n("97f1")},e679:function(e,t,n){"use strict";n("8dbb")},e84e:function(e,t,n){"use strict";n("1bff")},e94f:function(e,t,n){!function(e,n){n(t)}(0,(function(e){"use strict";function t(e){return e&&e.normalize&&e.normalize(),e&&e.textContent||""}function n(e,t){const n=e.getElementsByTagName(t);return n.length?n[0]:null}function o(e){const o={};if(e){const r=n(e,"line");if(r){const e=t(n(r,"color")),c=parseFloat(t(n(r,"opacity"))),a=parseFloat(t(n(r,"width")));e&&(o.stroke=e),isNaN(c)||(o["stroke-opacity"]=c),isNaN(a)||(o["stroke-width"]=96*a/25.4)}}return o}function r(e,o){const r={};let c,a;for(a=0;a<o.length;a++)c=n(e,o[a]),c&&(r[o[a]]=t(c));return r}function c(e){const n=r(e,["name","cmt","desc","type","time","keywords"]),o=e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*");for(let r=0;r<o.length;r++){const c=o[r];c.parentNode.parentNode===e&&(n[c.tagName.replace(":","_")]=t(c))}const c=e.getElementsByTagName("link");c.length&&(n.links=[]);for(let t=0;t<c.length;t++)n.links.push(Object.assign({href:c[t].getAttribute("href")},r(c[t],["text","type"])));return n}function a(e){const o=[parseFloat(e.getAttribute("lon")),parseFloat(e.getAttribute("lat"))],r=n(e,"ele"),c=n(e,"gpxtpx:hr")||n(e,"hr"),a=n(e,"time");let l;r&&(l=parseFloat(t(r)),isNaN(l)||o.push(l));const i={coordinates:o,time:a?t(a):null,extendedValues:[]};c&&i.extendedValues.push(["heart",parseFloat(t(c))]);const u=n(e,"extensions");if(null!==u)for(const s of["speed","course","hAcc","vAcc"]){const e=parseFloat(t(n(u,s)));isNaN(e)||i.extendedValues.push([s,e])}return i}function l(e){const t=i(e,"rtept");if(t)return{type:"Feature",properties:Object.assign(c(e),o(n(e,"extensions")),{_gpxType:"rte"}),geometry:{type:"LineString",coordinates:t.line}}}function i(e,t){const n=e.getElementsByTagName(t);if(n.length<2)return;const o=[],r=[],c={};for(let l=0;l<n.length;l++){const e=a(n[l]);o.push(e.coordinates),e.time&&r.push(e.time);for(let t=0;t<e.extendedValues.length;t++){const[o,r]=e.extendedValues[t],a="heart"===o?o:o+"s";c[a]||(c[a]=Array(n.length).fill(null)),c[a][l]=r}}return{line:o,times:r,extendedValues:c}}function u(e){const t=e.getElementsByTagName("trkseg"),r=[],a=[],l=[];for(let n=0;n<t.length;n++){const e=i(t[n],"trkpt");e&&(l.push(e),e.times&&e.times.length&&a.push(e.times))}if(0===l.length)return;const u=l.length>1,s=Object.assign(c(e),o(n(e,"extensions")),{_gpxType:"trk"},a.length?{coordinateProperties:{times:u?a:a[0]}}:{});for(let n=0;n<l.length;n++){const e=l[n];r.push(e.line);for(const[t,o]of Object.entries(e.extendedValues)){let e=s;"heart"===t&&(s.coordinateProperties||(s.coordinateProperties={}),e=s.coordinateProperties),u?(e[t]||(e[t]=l.map(e=>new Array(e.line.length).fill(null))),e[t][n]=o):e[t]=o}}return{type:"Feature",properties:s,geometry:u?{type:"MultiLineString",coordinates:r}:{type:"LineString",coordinates:r[0]}}}function*s(e){const t=e.getElementsByTagName("trk"),n=e.getElementsByTagName("rte"),o=e.getElementsByTagName("wpt");for(let r=0;r<t.length;r++){const e=u(t[r]);e&&(yield e)}for(let r=0;r<n.length;r++){const e=l(n[r]);e&&(yield e)}for(let l=0;l<o.length;l++)yield(i=o[l],{type:"Feature",properties:Object.assign(c(i),r(i,["sym"])),geometry:{type:"Point",coordinates:a(i).coordinates}});var i}const d=[["heartRate","heartRates"],["Cadence","cadences"],["Speed","speeds"],["Watts","watts"]],b=[["TotalTimeSeconds","totalTimeSeconds"],["DistanceMeters","distanceMeters"],["MaximumSpeed","maxSpeed"],["AverageHeartRateBpm","avgHeartRate"],["MaximumHeartRateBpm","maxHeartRate"],["AvgSpeed","avgSpeed"],["AvgWatts","avgWatts"],["MaxWatts","maxWatts"]];function O(e,o){const r=[];for(const[c,a]of o){let o=n(e,c);if(!o){const t=e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/ActivityExtension/v2",c);t.length&&(o=t[0])}const l=parseFloat(t(o));isNaN(l)||r.push([a,l])}return r}function m(e){const o=t(n(e,"LongitudeDegrees")),r=t(n(e,"LatitudeDegrees"));if(!o.length||!r.length)return null;const c=[parseFloat(o),parseFloat(r)],a=n(e,"AltitudeMeters"),l=n(e,"HeartRateBpm"),i=n(e,"Time");let u;return a&&(u=parseFloat(t(a)),isNaN(u)||c.push(u)),{coordinates:c,time:i?t(i):null,heartRate:l?parseFloat(t(l)):null,extensions:O(e,d)}}function p(e,t){const n=e.getElementsByTagName(t),o=[],r=[],c=[];if(n.length<2)return null;const a={extendedProperties:{}};for(let l=0;l<n.length;l++){const e=m(n[l]);if(null!==e){o.push(e.coordinates),e.time&&r.push(e.time),e.heartRate&&c.push(e.heartRate);for(const[t,o]of e.extensions)a.extendedProperties[t]||(a.extendedProperties[t]=Array(n.length).fill(null)),a.extendedProperties[t][l]=o}}return Object.assign(a,{line:o,times:r,heartRates:c})}function j(e){const o=e.getElementsByTagName("Track"),r=[],c=[],a=[],l=[];let i;const u=function(e){const t={};for(const[n,o]of e)t[n]=o;return t}(O(e,b)),s=n(e,"Name");s&&(u.name=t(s));for(let t=0;t<o.length;t++)i=p(o[t],"Trackpoint"),i&&(r.push(i.line),i.times.length&&c.push(i.times),i.heartRates.length&&a.push(i.heartRates),l.push(i.extendedProperties));for(let t=0;t<l.length;t++){const e=l[t];for(const n in e)1===o.length?u[n]=i.extendedProperties[n]:(u[n]||(u[n]=r.map(e=>Array(e.length).fill(null))),u[n][t]=e[n])}if(0!==r.length)return(c.length||a.length)&&(u.coordinateProperties=Object.assign(c.length?{times:1===r.length?c[0]:c}:{},a.length?{heart:1===r.length?a[0]:a}:{})),{type:"Feature",properties:u,geometry:{type:1===r.length?"LineString":"MultiLineString",coordinates:1===r.length?r[0]:r}}}function*f(e){const t=e.getElementsByTagName("Lap");for(let o=0;o<t.length;o++){const e=j(t[o]);e&&(yield e)}const n=e.getElementsByTagName("Courses");for(let o=0;o<n.length;o++){const e=j(n[o]);e&&(yield e)}}const g=/\s*/g,k=/^\s*|\s*$/g,y=/\s+/;function v(e){if(!e||!e.length)return 0;let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function h(e){return e.replace(g,"").split(",").map(parseFloat)}function E(e){return e.replace(k,"").split(y).map(h)}function N(e){if(void 0!==e.xml)return e.xml;if(e.tagName){let t=e.tagName;for(let n=0;n<e.attributes.length;n++)t+=e.attributes[n].name+e.attributes[n].value;for(let n=0;n<e.childNodes.length;n++)t+=N(e.childNodes[n]);return t}return"#text"===e.nodeName?(e.nodeValue||e.value||"").trim():"#cdata-section"===e.nodeName?e.nodeValue:""}const w=["Polygon","LineString","Point","Track","gx:Track"];function S(e,o,r){let c=t(n(o,"color"))||"";const a="stroke"==r||"fill"===r?r:r+"-color";"#"===c.substr(0,1)&&(c=c.substr(1)),6===c.length||3===c.length?e[a]=c:8===c.length&&(e[r+"-opacity"]=parseInt(c.substr(0,2),16)/255,e[a]="#"+c.substr(6,2)+c.substr(4,2)+c.substr(2,2))}function V(e,o,r,c){const a=parseFloat(t(n(o,r)));isNaN(a)||(e[c]=a)}function T(e){let n=e.getElementsByTagName("coord");const o=[],r=[];0===n.length&&(n=e.getElementsByTagName("gx:coord"));for(let a=0;a<n.length;a++)o.push(t(n[a]).split(" ").map(parseFloat));const c=e.getElementsByTagName("when");for(let a=0;a<c.length;a++)r.push(t(c[a]));return{coords:o,times:r}}function D(e){let o,r,c,a,l;const i=[],u=[];if(n(e,"MultiGeometry"))return D(n(e,"MultiGeometry"));if(n(e,"MultiTrack"))return D(n(e,"MultiTrack"));if(n(e,"gx:MultiTrack"))return D(n(e,"gx:MultiTrack"));for(c=0;c<w.length;c++)if(r=e.getElementsByTagName(w[c]),r)for(a=0;a<r.length;a++)if(o=r[a],"Point"===w[c])i.push({type:"Point",coordinates:h(t(n(o,"coordinates")))});else if("LineString"===w[c])i.push({type:"LineString",coordinates:E(t(n(o,"coordinates")))});else if("Polygon"===w[c]){const e=o.getElementsByTagName("LinearRing"),r=[];for(l=0;l<e.length;l++)r.push(E(t(n(e[l],"coordinates"))));i.push({type:"Polygon",coordinates:r})}else if("Track"===w[c]||"gx:Track"===w[c]){const e=T(o);i.push({type:"LineString",coordinates:e.coords}),e.times.length&&u.push(e.times)}return{geoms:i,coordTimes:u}}function _(e,o,r,c){const a=D(e);let l;const i={},u=t(n(e,"name")),s=t(n(e,"address"));let d=t(n(e,"styleUrl"));const b=t(n(e,"description")),O=n(e,"TimeSpan"),m=n(e,"TimeStamp"),p=n(e,"ExtendedData");let j=n(e,"IconStyle"),f=n(e,"LabelStyle"),g=n(e,"LineStyle"),k=n(e,"PolyStyle");const y=n(e,"visibility");if(u&&(i.name=u),s&&(i.address=s),d){"#"!==d[0]&&(d="#"+d),i.styleUrl=d,o[d]&&(i.styleHash=o[d]),r[d]&&(i.styleMapHash=r[d],i.styleHash=o[r[d].normal]);const e=c[i.styleHash];e&&(j||(j=n(e,"IconStyle")),f||(f=n(e,"LabelStyle")),g||(g=n(e,"LineStyle")),k||(k=n(e,"PolyStyle")))}if(b&&(i.description=b),O){const e=t(n(O,"begin")),o=t(n(O,"end"));i.timespan={begin:e,end:o}}if(m&&(i.timestamp=t(n(m,"when"))),j){S(i,j,"icon"),V(i,j,"scale","icon-scale"),V(i,j,"heading","icon-heading");const e=n(j,"hotSpot");if(e){const t=parseFloat(e.getAttribute("x")),n=parseFloat(e.getAttribute("y"));isNaN(t)||isNaN(n)||(i["icon-offset"]=[t,n])}const o=n(j,"Icon");if(o){const e=t(n(o,"href"));e&&(i.icon=e)}}if(f&&(S(i,f,"label"),V(i,f,"scale","label-scale")),g&&(S(i,g,"stroke"),V(i,g,"width","stroke-width")),k){S(i,k,"fill");const e=t(n(k,"fill")),o=t(n(k,"outline"));e&&(i["fill-opacity"]="1"===e?i["fill-opacity"]||1:0),o&&(i["stroke-opacity"]="1"===o?i["stroke-opacity"]||1:0)}if(p){const e=p.getElementsByTagName("Data"),o=p.getElementsByTagName("SimpleData");for(l=0;l<e.length;l++)i[e[l].getAttribute("name")]=t(n(e[l],"value"));for(l=0;l<o.length;l++)i[o[l].getAttribute("name")]=t(o[l])}y&&(i.visibility=t(y)),a.coordTimes.length&&(i.coordinateProperties={times:1===a.coordTimes.length?a.coordTimes[0]:a.coordTimes});const v={type:"Feature",geometry:0===a.geoms.length?null:1===a.geoms.length?a.geoms[0]:{type:"GeometryCollection",geometries:a.geoms},properties:i};return e.getAttribute("id")&&(v.id=e.getAttribute("id")),v}function*I(e){const o={},r={},c={},a=e.getElementsByTagName("Placemark"),l=e.getElementsByTagName("Style"),i=e.getElementsByTagName("StyleMap");for(let t=0;t<l.length;t++){const e=v(N(l[t])).toString(16);o["#"+l[t].getAttribute("id")]=e,r[e]=l[t]}for(let u=0;u<i.length;u++){o["#"+i[u].getAttribute("id")]=v(N(i[u])).toString(16);const e=i[u].getElementsByTagName("Pair"),r={};for(let o=0;o<e.length;o++)r[t(n(e[o],"key"))]=t(n(e[o],"styleUrl"));c["#"+i[u].getAttribute("id")]=r}for(let t=0;t<a.length;t++){const e=_(a[t],o,c,r);e&&(yield e)}}e.gpx=function(e){return{type:"FeatureCollection",features:Array.from(s(e))}},e.gpxGen=s,e.kml=function(e){return{type:"FeatureCollection",features:Array.from(I(e))}},e.kmlGen=I,e.tcx=function(e){return{type:"FeatureCollection",features:Array.from(f(e))}},e.tcxGen=f,Object.defineProperty(e,"__esModule",{value:!0})}))},f54d:function(e,t,n){"use strict";n("d636")},f737:function(e,t,n){"use strict";n("9886")}}]);
//# sourceMappingURL=workouts.808a94ee.js.map