E.indexOf(b)?m===i?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:m===o?r.PRECEDING|r.CONTAINS:r.PRECEDING}e.compareDocumentPosition=a;function s(o){return o=o.filter(function(i,u,l){return!l.includes(i,u+1)}),o.sort(function(i,u){var l=a(i,u);return l&r.PRECEDING?-1:l&r.FOLLOWING?1:0}),o}e.uniqueSort=s})(yg);var Oc={};Object.defineProperty(Oc,"__esModule",{value:!0});Oc.getFeed=void 0;var Q_e=hn,Wo=_n;function J_e(e){var t=ku(a1e,e);return t?t.name==="feed"?e1e(t):t1e(t):null}Oc.getFeed=J_e;function e1e(e){var t,n=e.children,r={type:"atom",items:(0,Wo.getElementsByTagName)("entry",n).map(function(o){var i,u=o.children,l={media:Dg(u)};an(l,"id","id",u),an(l,"title","title",u);var c=(i=ku("link",u))===null||i===void 0?void 0:i.attribs.href;c&&(l.link=c);var f=Wr("summary",u)||Wr("content",u);f&&(l.description=f);var d=Wr("updated",u);return d&&(l.pubDate=new Date(d)),l})};an(r,"id","id",n),an(r,"title","title",n);var a=(t=ku("link",n))===null||t===void 0?void 0:t.attribs.href;a&&(r.link=a),an(r,"description","subtitle",n);var s=Wr("updated",n);return s&&(r.updated=new Date(s)),an(r,"author","email",n,!0),r}function t1e(e){var t,n,r=(n=(t=ku("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],a={type:e.name.substr(0,3),id:"",items:(0,Wo.getElementsByTagName)("item",e.children).map(function(o){var i=o.children,u={media:Dg(i)};an(u,"id","guid",i),an(u,"title","title",i),an(u,"link","link",i),an(u,"description","description",i);var l=Wr("pubDate",i)||Wr("dc:date",i);return l&&(u.pubDate=new Date(l)),u})};an(a,"title","title",r),an(a,"link","link",r),an(a,"description","description",r);var s=Wr("lastBuildDate",r);return s&&(a.updated=new Date(s)),an(a,"author","managingEditor",r,!0),a}var n1e=["url","type","lang"],r1e=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Dg(e){return(0,Wo.getElementsByTagName)("media:content",e).map(function(t){for(var n=t.attribs,r={medium:n.medium,isDefault:!!n.isDefault},a=0,s=n1e;a{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},s0={};Object.defineProperty(s0,"__esModule",{value:!0});/*!
+ c-17.796,4.581-28.535,22.711-23.964,40.535C290.439,120.476,308.599,131.205,326.395,126.625z`})])],-1),qEe=[KEe,YEe];function XEe(e,t,n,r,a,s){return T(),N("svg",VEe,qEe)}const ZEe=ae(jEe,[["render",XEe]]),QEe={name:"Walking"},JEe={version:"1.1",id:"Capa_1",x:"0px",y:"0px",viewBox:"0 0 494.49 494.49",style:{"enable-background":"new 0 0 494.49 494.49"},"xml:space":"preserve",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg"},ehe=tr('silhouette of a walking person ',3),the=[ehe];function nhe(e,t,n,r,a,s){return T(),N("svg",JEe,the)}const rhe=ae(QEe,[["render",nhe]]),ahe=["title"],she=Q({__name:"index",props:{sportLabel:{},color:{},title:{default:""}},setup(e){const t=e,{color:n,sportLabel:r,title:a}=_e(t),s=ht("sportColors");return(o,i)=>(T(),N("div",{class:"sport-img",style:Yr({fill:h(n)?h(n):h(s)[h(r)]}),title:h(a)?h(a):o.$t(`sports.${h(r)}.LABEL`)},[h(r)==="Cycling (Sport)"?(T(),te(ime,{key:0})):F("",!0),h(r)==="Cycling (Trekking)"?(T(),te(Ame,{key:1})):F("",!0),h(r)==="Cycling (Transport)"?(T(),te(mme,{key:2})):F("",!0),h(r)==="Cycling (Virtual)"?(T(),te(bme,{key:3})):F("",!0),h(r)==="Hiking"?(T(),te(Lme,{key:4})):F("",!0),h(r)==="Mountain Biking"?(T(),te(Wme,{key:5})):F("",!0),h(r)==="Mountain Biking (Electric)"?(T(),te(Vme,{key:6})):F("",!0),h(r)==="Mountaineering"?(T(),te(Qme,{key:7})):F("",!0),h(r)==="Paragliding"?(T(),te(lEe,{key:8})):F("",!0),h(r)==="Open Water Swimming"?(T(),te(aEe,{key:9})):F("",!0),h(r)==="Rowing"?(T(),te(_Ee,{key:10})):F("",!0),h(r)==="Running"?(T(),te(vEe,{key:11})):F("",!0),h(r)==="Skiing (Alpine)"?(T(),te(PEe,{key:12})):F("",!0),h(r)==="Skiing (Cross Country)"?(T(),te(xEe,{key:13})):F("",!0),h(r)==="Snowshoes"?(T(),te(HEe,{key:14})):F("",!0),h(r)==="Trail"?(T(),te(ZEe,{key:15})):F("",!0),h(r)==="Walking"?(T(),te(rhe,{key:16})):F("",!0)],12,ahe))}}),ohe={},ihe={class:"loader"};function uhe(e,t){return T(),N("div",ihe)}const che=ae(ohe,[["render",uhe],["__scopeId","data-v-8b613881"]]),lhe={class:"custom-modal"},dhe={key:0,class:"modal-message"},fhe={key:1,class:"modal-message"},phe={class:"modal-buttons"},mhe=Q({__name:"Modal",props:{title:{},message:{},strongMessage:{default:()=>""}},emits:["cancelAction","confirmAction"],setup(e,{emit:t}){const n=e,r=t,a=$e(),{title:s,message:o,strongMessage:i}=_e(n),u=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]);let l=null,c=null,f=null;function d(m){var E;(m.key==="Tab"||m.keyCode===9)&&(m.preventDefault(),((E=document.activeElement)==null?void 0:E.id)==="cancel-button"?l==null||l.focus():c==null||c.focus())}return gt(()=>{f=document.activeElement,c=document.getElementById("cancel-button"),l=document.getElementById("confirm-button"),c&&c.focus(),document.addEventListener("keydown",d)}),Rt(()=>{a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),document.removeEventListener("keydown",d),f==null||f.focus()}),(m,E)=>{const g=ue("i18n-t"),b=ue("ErrorMessage"),v=ue("Card");return T(),N("div",{id:"modal",role:"dialog",onClick:E[2]||(E[2]=Xe(R=>r("cancelAction"),["self"]))},[p("div",lhe,[M(v,null,{title:fe(()=>[K(_(h(s)),1)]),content:fe(()=>[h(i)?(T(),N("div",dhe,[M(g,{keypath:h(o)},{default:fe(()=>[p("span",null,_(h(i)),1)]),_:1},8,["keypath"])])):(T(),N("div",fhe,_(h(o)),1)),u.value?(T(),te(b,{key:2,message:u.value},null,8,["message"])):F("",!0),p("div",phe,[u.value?F("",!0):(T(),N("button",{key:0,class:"confirm",id:"confirm-button",onClick:E[0]||(E[0]=R=>r("confirmAction"))},_(m.$t("buttons.YES")),1)),p("button",{tabindex:"0",id:"cancel-button",class:"cancel",onClick:E[1]||(E[1]=R=>r("cancelAction"))},_(m.$t(`buttons.${u.value?"CANCEL":"NO"}`)),1)])]),_:1})])])}}}),Ehe=ae(mhe,[["__scopeId","data-v-e277942a"]]),hhe=[{target:b0e,name:"AlertMessage"},{target:xT,name:"Card"},{target:U0e,name:"CustomTextArea"},{target:W0e,name:"Distance"},{target:qpe,name:"Dropdown"},{target:eme,name:"ErrorMessage"},{target:che,name:"Loader"},{target:Ehe,name:"Modal"},{target:she,name:"SportImage"}],_he={mounted:(e,t)=>{e.clickOutsideEvent=function(n){e===n.target||e.contains(n.target)||t.value(n)},document.body.addEventListener("click",e.clickOutsideEvent),document.body.addEventListener("touchstart",e.clickOutsideEvent)},unmounted:function(e){e.clickOutsideEvent&&(document.body.removeEventListener("click",e.clickOutsideEvent),document.body.removeEventListener("touchstart",e.clickOutsideEvent),e.clickOutsideEvent=void 0)}};var The={"":[""," "],_:[""," "],"*":[""," "],"~":[""," "],"\n":[" "]," ":[" "],"-":[" "]};function sE(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function Ls(e){return(e+"").replace(/"/g,""").replace(//g,">")}function ma(e,t){var n,r,a,s,o,i=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,u=[],l="",c=t||{},f=0;function d(E){var g=The[E[1]||""],b=u[u.length-1]==E;return g?g[1]?(b?u.pop():u.push(E),g[0|b]):g[0]:E}function m(){for(var E="";u.length;)E+=d(u[u.length-1]);return E}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(E,g,b){return c[g.toLowerCase()]=b,""}).replace(/^\n+|\n+$/g,"");a=i.exec(e);)r=e.substring(f,a.index),f=i.lastIndex,n=a[0],r.match(/[^\\](\\\\)*\\$/)||((o=a[3]||a[4])?n='"+sE(Ls(o).replace(/^\n+|\n+$/g,""))+"
":(o=a[6])?(o.match(/\./)&&(a[5]=a[5].replace(/^\d+/gm,"")),s=ma(sE(a[5].replace(/^\s*[>*+.-]/gm,""))),o==">"?o="blockquote":(o=o.match(/\./)?"ol":"ul",s=s.replace(/^(.*)(\n|$)/gm,"$1 ")),n="<"+o+">"+s+""+o+">"):a[8]?n=' ':a[10]?(l=l.replace("",' '),n=m()+" "):a[9]?n="":a[12]||a[14]?n="<"+(o="h"+(a[14]?a[14].length:a[13]>"="?1:2))+">"+ma(a[12]||a[15],c)+""+o+">":a[16]?n=""+Ls(a[16])+"
":(a[17]||a[1])&&(n=d(a[17]||"--"))),l+=r,l+=n;return(l+e.substring(f)+m()).replace(/^\n+|\n+$/g,"")}const ghe=["bytes","KB","MB","GB","TB"],qT=e=>{if(!e)return{size:"0",suffix:"bytes"};const t=Math.floor(Math.log(e)/Math.log(1024)),n=(e/Math.pow(1024,t)).toFixed(1),r=ghe[t];return{size:n,suffix:r}},tu=e=>{if(!e)return"0 bytes";const t=qT(e);return`${t.size}${t.suffix}`},Ahe=e=>{const t=e/1048576;return!e&&0||+t.toFixed(2)},She="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Ohe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",os=(e,t)=>{for(const n in t)e[n]=t[n];return e},fd="numeric",pd="ascii",md="alpha",Li="asciinumeric",ni="alphanumeric",Ed="domain",XT="emoji",Ihe="scheme",vhe="slashscheme",oE="whitespace";function Rhe(e,t){return e in t||(t[e]=[]),t[e]}function la(e,t,n){t[fd]&&(t[Li]=!0,t[ni]=!0),t[pd]&&(t[Li]=!0,t[md]=!0),t[Li]&&(t[ni]=!0),t[md]&&(t[ni]=!0),t[ni]&&(t[Ed]=!0),t[XT]&&(t[Ed]=!0);for(const r in t){const a=Rhe(r,n);a.indexOf(e)<0&&a.push(e)}}function bhe(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function mn(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}mn.groups={};mn.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,a),Sn=(e,t,n,r,a)=>e.tr(t,n,r,a),iE=(e,t,n,r,a)=>e.ts(t,n,r,a),me=(e,t,n,r,a)=>e.tt(t,n,r,a),ur="WORD",hd="UWORD",mo="LOCALHOST",_d="TLD",Td="UTLD",$i="SCHEME",Ma="SLASH_SCHEME",jf="NUM",ZT="WS",Vf="NL",qs="OPENBRACE",Xs="CLOSEBRACE",nu="OPENBRACKET",ru="CLOSEBRACKET",au="OPENPAREN",su="CLOSEPAREN",ou="OPENANGLEBRACKET",iu="CLOSEANGLEBRACKET",uu="FULLWIDTHLEFTPAREN",cu="FULLWIDTHRIGHTPAREN",lu="LEFTCORNERBRACKET",du="RIGHTCORNERBRACKET",fu="LEFTWHITECORNERBRACKET",pu="RIGHTWHITECORNERBRACKET",mu="FULLWIDTHLESSTHAN",Eu="FULLWIDTHGREATERTHAN",hu="AMPERSAND",_u="APOSTROPHE",Tu="ASTERISK",kr="AT",gu="BACKSLASH",Au="BACKTICK",Su="CARET",xr="COLON",Kf="COMMA",Ou="DOLLAR",Hn="DOT",Iu="EQUALS",Yf="EXCLAMATION",jn="HYPHEN",vu="PERCENT",Ru="PIPE",bu="PLUS",Nu="POUND",Cu="QUERY",qf="QUOTE",Xf="SEMI",Vn="SLASH",Zs="TILDE",yu="UNDERSCORE",QT="EMOJI",Du="SYM";var JT=Object.freeze({__proto__:null,WORD:ur,UWORD:hd,LOCALHOST:mo,TLD:_d,UTLD:Td,SCHEME:$i,SLASH_SCHEME:Ma,NUM:jf,WS:ZT,NL:Vf,OPENBRACE:qs,CLOSEBRACE:Xs,OPENBRACKET:nu,CLOSEBRACKET:ru,OPENPAREN:au,CLOSEPAREN:su,OPENANGLEBRACKET:ou,CLOSEANGLEBRACKET:iu,FULLWIDTHLEFTPAREN:uu,FULLWIDTHRIGHTPAREN:cu,LEFTCORNERBRACKET:lu,RIGHTCORNERBRACKET:du,LEFTWHITECORNERBRACKET:fu,RIGHTWHITECORNERBRACKET:pu,FULLWIDTHLESSTHAN:mu,FULLWIDTHGREATERTHAN:Eu,AMPERSAND:hu,APOSTROPHE:_u,ASTERISK:Tu,AT:kr,BACKSLASH:gu,BACKTICK:Au,CARET:Su,COLON:xr,COMMA:Kf,DOLLAR:Ou,DOT:Hn,EQUALS:Iu,EXCLAMATION:Yf,HYPHEN:jn,PERCENT:vu,PIPE:Ru,PLUS:bu,POUND:Nu,QUERY:Cu,QUOTE:qf,SEMI:Xf,SLASH:Vn,TILDE:Zs,UNDERSCORE:yu,EMOJI:QT,SYM:Du});const ya=/[a-z]/,al=new RegExp("\\p{L}","u"),sl=new RegExp("\\p{Emoji}","u"),ol=/\d/,uE=/\s/,cE=`
+`,Nhe="️",Che="";let ri=null,ai=null;function yhe(e){e===void 0&&(e=[]);const t={};mn.groups=t;const n=new mn;ri==null&&(ri=lE(She)),ai==null&&(ai=lE(Ohe)),me(n,"'",_u),me(n,"{",qs),me(n,"}",Xs),me(n,"[",nu),me(n,"]",ru),me(n,"(",au),me(n,")",su),me(n,"<",ou),me(n,">",iu),me(n,"(",uu),me(n,")",cu),me(n,"「",lu),me(n,"」",du),me(n,"『",fu),me(n,"』",pu),me(n,"<",mu),me(n,">",Eu),me(n,"&",hu),me(n,"*",Tu),me(n,"@",kr),me(n,"`",Au),me(n,"^",Su),me(n,":",xr),me(n,",",Kf),me(n,"$",Ou),me(n,".",Hn),me(n,"=",Iu),me(n,"!",Yf),me(n,"-",jn),me(n,"%",vu),me(n,"|",Ru),me(n,"+",bu),me(n,"#",Nu),me(n,"?",Cu),me(n,'"',qf),me(n,"/",Vn),me(n,";",Xf),me(n,"~",Zs),me(n,"_",yu),me(n,"\\",gu);const r=Sn(n,ol,jf,{[fd]:!0});Sn(r,ol,r);const a=Sn(n,ya,ur,{[pd]:!0});Sn(a,ya,a);const s=Sn(n,al,hd,{[md]:!0});Sn(s,ya),Sn(s,al,s);const o=Sn(n,uE,ZT,{[oE]:!0});me(n,cE,Vf,{[oE]:!0}),me(o,cE),Sn(o,uE,o);const i=Sn(n,sl,QT,{[XT]:!0});Sn(i,sl,i),me(i,Nhe,i);const u=me(i,Che);Sn(u,sl,i);const l=[[ya,a]],c=[[ya,null],[al,s]];for(let f=0;ff[0]>d[0]?1:-1);for(let f=0;f=0?E[Ed]=!0:ya.test(d)?ol.test(d)?E[Li]=!0:E[pd]=!0:E[fd]=!0,iE(n,d,d,E)}return iE(n,"localhost",mo,{ascii:!0}),n.jd=new mn(Du),{start:n,tokens:os({groups:t},JT)}}function Dhe(e,t){const n=Phe(t.replace(/[A-Z]/g,i=>i.toLowerCase())),r=n.length,a=[];let s=0,o=0;for(;o=0&&(f+=n[o].length,d++),l+=n[o].length,s+=n[o].length,o++;s-=f,o-=d,l-=f,a.push({t:c.t,v:t.slice(s-l,s),s:s-l,e:s})}return a}function Phe(e){const t=[],n=e.length;let r=0;for(;r56319||r+1===n||(s=e.charCodeAt(r+1))<56320||s>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function wr(e,t,n,r,a){let s;const o=t.length;for(let i=0;i=0;)s++;if(s>0){t.push(n.join(""));for(let o=parseInt(e.substring(r,r+s),10);o>0;o--)n.pop();r+=s}else n.push(e[r]),r++}return t}const Eo={defaultProtocol:"http",events:null,format:dE,formatHref:dE,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Zf(e,t){t===void 0&&(t=null);let n=os({},Eo);e&&(n=os(n,e instanceof Zf?e.o:e));const r=n.ignoreTags,a=[];for(let s=0;sn?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=Eo.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),a=e.get("tagName",n,t),s=this.toFormattedString(e),o={},i=e.get("className",n,t),u=e.get("target",n,t),l=e.get("rel",n,t),c=e.getObj("attributes",n,t),f=e.getObj("events",n,t);return o.href=r,i&&(o.class=i),u&&(o.target=u),l&&(o.rel=l),c&&os(o,c),{tagName:a,attributes:o,content:s,eventListeners:f}}};function hc(e,t){class n extends eg{constructor(a,s){super(a,s),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const fE=hc("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),pE=hc("text"),whe=hc("nl"),si=hc("url",{isLink:!0,toHref(e){return e===void 0&&(e=Eo.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==mo&&e[1].t===xr}}),On=e=>new mn(e);function Lhe(e){let{groups:t}=e;const n=t.domain.concat([hu,Tu,kr,gu,Au,Su,Ou,Iu,jn,jf,vu,Ru,bu,Nu,Vn,Du,Zs,yu]),r=[_u,xr,Kf,Hn,Yf,Cu,qf,Xf,ou,iu,qs,Xs,ru,nu,au,su,uu,cu,lu,du,fu,pu,mu,Eu],a=[hu,_u,Tu,gu,Au,Su,Ou,Iu,jn,qs,Xs,vu,Ru,bu,Nu,Cu,Vn,Du,Zs,yu],s=On(),o=me(s,Zs);Ge(o,a,o),Ge(o,t.domain,o);const i=On(),u=On(),l=On();Ge(s,t.domain,i),Ge(s,t.scheme,u),Ge(s,t.slashscheme,l),Ge(i,a,o),Ge(i,t.domain,i);const c=me(i,kr);me(o,kr,c),me(u,kr,c),me(l,kr,c);const f=me(o,Hn);Ge(f,a,o),Ge(f,t.domain,o);const d=On();Ge(c,t.domain,d),Ge(d,t.domain,d);const m=me(d,Hn);Ge(m,t.domain,d);const E=On(fE);Ge(m,t.tld,E),Ge(m,t.utld,E),me(c,mo,E);const g=me(d,jn);Ge(g,t.domain,d),Ge(E,t.domain,d),me(E,Hn,m),me(E,jn,g);const b=me(E,xr);Ge(b,t.numeric,fE);const v=me(i,jn),R=me(i,Hn);Ge(v,t.domain,i),Ge(R,a,o),Ge(R,t.domain,i);const A=On(si);Ge(R,t.tld,A),Ge(R,t.utld,A),Ge(A,t.domain,i),Ge(A,a,o),me(A,Hn,R),me(A,jn,v),me(A,kr,c);const S=me(A,xr),C=On(si);Ge(S,t.numeric,C);const L=On(si),$=On();Ge(L,n,L),Ge(L,r,$),Ge($,n,L),Ge($,r,$),me(A,Vn,L),me(C,Vn,L);const U=me(u,xr),G=me(l,xr),B=me(G,Vn),w=me(B,Vn);Ge(u,t.domain,i),me(u,Hn,R),me(u,jn,v),Ge(l,t.domain,i),me(l,Hn,R),me(l,jn,v),Ge(U,t.domain,L),me(U,Vn,L),Ge(w,t.domain,L),Ge(w,n,L),me(w,Vn,L);const Z=[[qs,Xs],[nu,ru],[au,su],[ou,iu],[uu,cu],[lu,du],[fu,pu],[mu,Eu]];for(let J=0;J=0&&d++,a++,c++;if(d<0)a-=c,a0&&(s.push(il(pE,t,o)),o=[]),a-=d,c-=d;const m=f.t,E=n.slice(a-c,a);s.push(il(m,t,E))}}return o.length>0&&s.push(il(pE,t,o)),s}function il(e,t,n){const r=n[0].s,a=n[n.length-1].e,s=t.slice(r,a);return new e(s,n)}const qt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function khe(){qt.scanner=yhe(qt.customSchemes);for(let e=0;e",lt:"<",nbsp:" ",quot:'"'},xhe=/^#[xX]([A-Fa-f0-9]+)$/,Fhe=/^#([0-9]+)$/,Whe=/^([A-Za-z0-9]+)$/,Ghe=function(){function e(t){this.named=t}return e.prototype.parse=function(t){if(t){var n=t.match(xhe);if(n)return String.fromCharCode(parseInt(n[1],16));if(n=t.match(Fhe),n)return String.fromCharCode(parseInt(n[1],10));if(n=t.match(Whe),n)return this.named[n[1]]||"&"+n[1]+";"}},e}(),zhe=/[\t\n\f ]/,Bhe=/[A-Za-z]/,Hhe=/\r\n?/g;function Gt(e){return zhe.test(e)}function mE(e){return Bhe.test(e)}function jhe(e){return e.replace(Hhe,`
+`)}var Vhe=function(){function e(t,n,r){r===void 0&&(r="precompile"),this.delegate=t,this.entityParser=n,this.mode=r,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var a=this.peek();if(a==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&a===`
+`){var s=this.tagNameBuffer.toLowerCase();(s==="pre"||s==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var a=this.peek(),s=this.tagNameBuffer;a==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):a==="&"&&s!=="script"&&s!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(a))},tagOpen:function(){var a=this.consume();a==="!"?this.transitionTo("markupDeclarationOpen"):a==="/"?this.transitionTo("endTagOpen"):(a==="@"||a===":"||mE(a))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(a))},markupDeclarationOpen:function(){var a=this.consume();if(a==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var s=a.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();s==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var a=this.consume();Gt(a)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var a=this.consume();Gt(a)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(a.toLowerCase()))},doctypeName:function(){var a=this.consume();Gt(a)?this.transitionTo("afterDoctypeName"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(a.toLowerCase())},afterDoctypeName:function(){var a=this.consume();if(!Gt(a))if(a===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var s=a.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),o=s.toUpperCase()==="PUBLIC",i=s.toUpperCase()==="SYSTEM";(o||i)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),o?this.transitionTo("afterDoctypePublicKeyword"):i&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var a=this.peek();Gt(a)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):a==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):a==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):a===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var a=this.consume();a==='"'?this.transitionTo("afterDoctypePublicIdentifier"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(a)},doctypePublicIdentifierSingleQuoted:function(){var a=this.consume();a==="'"?this.transitionTo("afterDoctypePublicIdentifier"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(a)},afterDoctypePublicIdentifier:function(){var a=this.consume();Gt(a)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):a==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):a==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var a=this.consume();Gt(a)||(a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):a==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):a==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var a=this.consume();a==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(a)},doctypeSystemIdentifierSingleQuoted:function(){var a=this.consume();a==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):a===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(a)},afterDoctypeSystemIdentifier:function(){var a=this.consume();Gt(a)||a===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var a=this.consume();a==="-"?this.transitionTo("commentStartDash"):a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(a),this.transitionTo("comment"))},commentStartDash:function(){var a=this.consume();a==="-"?this.transitionTo("commentEnd"):a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var a=this.consume();a==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(a)},commentEndDash:function(){var a=this.consume();a==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+a),this.transitionTo("comment"))},commentEnd:function(){var a=this.consume();a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+a),this.transitionTo("comment"))},tagName:function(){var a=this.consume();Gt(a)?this.transitionTo("beforeAttributeName"):a==="/"?this.transitionTo("selfClosingStartTag"):a===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(a)},endTagName:function(){var a=this.consume();Gt(a)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):a==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):a===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(a)},beforeAttributeName:function(){var a=this.peek();if(Gt(a)){this.consume();return}else a==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):a===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):a==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(a)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var a=this.peek();Gt(a)?(this.transitionTo("afterAttributeName"),this.consume()):a==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):a==='"'||a==="'"||a==="<"?(this.delegate.reportSyntaxError(a+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(a)):(this.consume(),this.delegate.appendToAttributeName(a))},afterAttributeName:function(){var a=this.peek();if(Gt(a)){this.consume();return}else a==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(a))},beforeAttributeValue:function(){var a=this.peek();Gt(a)?this.consume():a==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):a==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(a))},attributeValueDoubleQuoted:function(){var a=this.consume();a==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):a==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(a)},attributeValueSingleQuoted:function(){var a=this.consume();a==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):a==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(a)},attributeValueUnquoted:function(){var a=this.peek();Gt(a)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):a==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):a===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(a))},afterAttributeValueQuoted:function(){var a=this.peek();Gt(a)?(this.consume(),this.transitionTo("beforeAttributeName")):a==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):a===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var a=this.peek();a===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var a=this.consume();(a==="@"||a===":"||mE(a))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(a))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=jhe(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),Khe=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Vhe(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;n=0))continue;let c=r.length;Jhe(u,n,++o,r),o+=r.length-c-1}else if(i.type!==gd)r.push(i);else{const u=Qhe(i.chars,s);r.push.apply(r,u)}}for(let o=0;o0&&(u+=" "+n_e(i.attributes).join(" ")),i.selfClosing&&(u+=" /"),u+=">",a.push(u);break}case ng:a.push(`${i.tagName}>`);break;case gd:a.push(Ad(i.chars));break;case qhe:a.push(``);break;case Xhe:{let u=`",a.push(u);break}}}return a.join("")}function Qhe(e,t){const n=Uhe(e),r=[];for(let a=0;a0;){let s=t[n];s.type===Pu&&s.tagName.toUpperCase()===e?a++:s.type===ng&&s.tagName.toUpperCase()===e&&a--,r.push(s),n++}return r}function e_e(e){let{tagName:t,attributes:n,content:r}=e;return`<${t} ${t_e(n)}>${Ad(r)}${t}>`}function Ad(e){return e.replace(//g,">")}function rg(e){return e.replace(/"/g,""")}function t_e(e){const t=[];for(const n in e){const r=e[n]+"";t.push(`${n}="${rg(r)}"`)}return t.join(" ")}function n_e(e){const t=[];for(let n=0;n䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}));var e0={};Object.defineProperty(e0,"__esModule",{value:!0});e0.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}));var Sd={};(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:function(s){var o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function r(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=n.get(s))!==null&&o!==void 0?o:s}e.replaceCodePoint=r;function a(s){return(0,e.fromCodePoint)(r(s))}e.default=a})(Sd);(function(e){var t=De&&De.__createBinding||(Object.create?function(w,Z,J,re){re===void 0&&(re=J);var P=Object.getOwnPropertyDescriptor(Z,J);(!P||("get"in P?!Z.__esModule:P.writable||P.configurable))&&(P={enumerable:!0,get:function(){return Z[J]}}),Object.defineProperty(w,re,P)}:function(w,Z,J,re){re===void 0&&(re=J),w[re]=Z[J]}),n=De&&De.__setModuleDefault||(Object.create?function(w,Z){Object.defineProperty(w,"default",{enumerable:!0,value:Z})}:function(w,Z){w.default=Z}),r=De&&De.__importStar||function(w){if(w&&w.__esModule)return w;var Z={};if(w!=null)for(var J in w)J!=="default"&&Object.prototype.hasOwnProperty.call(w,J)&&t(Z,w,J);return n(Z,w),Z},a=De&&De.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var s=a(Jf);e.htmlDecodeTree=s.default;var o=a(e0);e.xmlDecodeTree=o.default;var i=r(Sd);e.decodeCodePoint=i.default;var u=Sd;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return u.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return u.fromCodePoint}});var l;(function(w){w[w.NUM=35]="NUM",w[w.SEMI=59]="SEMI",w[w.EQUALS=61]="EQUALS",w[w.ZERO=48]="ZERO",w[w.NINE=57]="NINE",w[w.LOWER_A=97]="LOWER_A",w[w.LOWER_F=102]="LOWER_F",w[w.LOWER_X=120]="LOWER_X",w[w.LOWER_Z=122]="LOWER_Z",w[w.UPPER_A=65]="UPPER_A",w[w.UPPER_F=70]="UPPER_F",w[w.UPPER_Z=90]="UPPER_Z"})(l||(l={}));var c=32,f;(function(w){w[w.VALUE_LENGTH=49152]="VALUE_LENGTH",w[w.BRANCH_LENGTH=16256]="BRANCH_LENGTH",w[w.JUMP_TABLE=127]="JUMP_TABLE"})(f=e.BinTrieFlags||(e.BinTrieFlags={}));function d(w){return w>=l.ZERO&&w<=l.NINE}function m(w){return w>=l.UPPER_A&&w<=l.UPPER_F||w>=l.LOWER_A&&w<=l.LOWER_F}function E(w){return w>=l.UPPER_A&&w<=l.UPPER_Z||w>=l.LOWER_A&&w<=l.LOWER_Z||d(w)}function g(w){return w===l.EQUALS||E(w)}var b;(function(w){w[w.EntityStart=0]="EntityStart",w[w.NumericStart=1]="NumericStart",w[w.NumericDecimal=2]="NumericDecimal",w[w.NumericHex=3]="NumericHex",w[w.NamedEntity=4]="NamedEntity"})(b||(b={}));var v;(function(w){w[w.Legacy=0]="Legacy",w[w.Strict=1]="Strict",w[w.Attribute=2]="Attribute"})(v=e.DecodingMode||(e.DecodingMode={}));var R=function(){function w(Z,J,re){this.decodeTree=Z,this.emitCodePoint=J,this.errors=re,this.state=b.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=v.Strict}return w.prototype.startEntity=function(Z){this.decodeMode=Z,this.state=b.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},w.prototype.write=function(Z,J){switch(this.state){case b.EntityStart:return Z.charCodeAt(J)===l.NUM?(this.state=b.NumericStart,this.consumed+=1,this.stateNumericStart(Z,J+1)):(this.state=b.NamedEntity,this.stateNamedEntity(Z,J));case b.NumericStart:return this.stateNumericStart(Z,J);case b.NumericDecimal:return this.stateNumericDecimal(Z,J);case b.NumericHex:return this.stateNumericHex(Z,J);case b.NamedEntity:return this.stateNamedEntity(Z,J)}},w.prototype.stateNumericStart=function(Z,J){return J>=Z.length?-1:(Z.charCodeAt(J)|c)===l.LOWER_X?(this.state=b.NumericHex,this.consumed+=1,this.stateNumericHex(Z,J+1)):(this.state=b.NumericDecimal,this.stateNumericDecimal(Z,J))},w.prototype.addToNumericResult=function(Z,J,re,P){if(J!==re){var z=re-J;this.result=this.result*Math.pow(P,z)+parseInt(Z.substr(J,z),P),this.consumed+=z}},w.prototype.stateNumericHex=function(Z,J){for(var re=J;J>14;J>14,z!==0){if(V===l.SEMI)return this.emitNamedEntityData(this.treeIndex,z,this.consumed+this.excess);this.decodeMode!==v.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},w.prototype.emitNotTerminatedNamedEntity=function(){var Z,J=this,re=J.result,P=J.decodeTree,z=(P[re]&f.VALUE_LENGTH)>>14;return this.emitNamedEntityData(re,z,this.consumed),(Z=this.errors)===null||Z===void 0||Z.missingSemicolonAfterCharacterReference(),this.consumed},w.prototype.emitNamedEntityData=function(Z,J,re){var P=this.decodeTree;return this.emitCodePoint(J===1?P[Z]&~f.VALUE_LENGTH:P[Z+1],re),J===3&&this.emitCodePoint(P[Z+2],re),re},w.prototype.end=function(){var Z;switch(this.state){case b.NamedEntity:return this.result!==0&&(this.decodeMode!==v.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b.NumericDecimal:return this.emitNumericEntity(0,2);case b.NumericHex:return this.emitNumericEntity(0,3);case b.NumericStart:return(Z=this.errors)===null||Z===void 0||Z.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b.EntityStart:return 0}},w}();e.EntityDecoder=R;function A(w){var Z="",J=new R(w,function(re){return Z+=(0,i.fromCodePoint)(re)});return function(P,z){for(var V=0,se=0;(se=P.indexOf("&",se))>=0;){Z+=P.slice(V,se),J.startEntity(z);var Pe=J.write(P,se+1);if(Pe<0){V=se+J.end();break}V=se+Pe,se=Pe===0?V+1:V}var We=Z+P.slice(V);return Z="",We}}function S(w,Z,J,re){var P=(Z&f.BRANCH_LENGTH)>>7,z=Z&f.JUMP_TABLE;if(P===0)return z!==0&&re===z?J:-1;if(z){var V=re-z;return V<0||V>=P?-1:w[J+V]-1}for(var se=J,Pe=se+P-1;se<=Pe;){var We=se+Pe>>>1,Ae=w[We];if(Aere)Pe=We-1;else return w[We+P]}return-1}e.determineBranch=S;var C=A(s.default),L=A(o.default);function $(w,Z){return Z===void 0&&(Z=v.Legacy),C(w,Z)}e.decodeHTML=$;function U(w){return C(w,v.Attribute)}e.decodeHTMLAttribute=U;function G(w){return C(w,v.Strict)}e.decodeHTMLStrict=G;function B(w){return L(w,v.Strict)}e.decodeXML=B})(_o);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var t=_o,n;(function(d){d[d.Tab=9]="Tab",d[d.NewLine=10]="NewLine",d[d.FormFeed=12]="FormFeed",d[d.CarriageReturn=13]="CarriageReturn",d[d.Space=32]="Space",d[d.ExclamationMark=33]="ExclamationMark",d[d.Number=35]="Number",d[d.Amp=38]="Amp",d[d.SingleQuote=39]="SingleQuote",d[d.DoubleQuote=34]="DoubleQuote",d[d.Dash=45]="Dash",d[d.Slash=47]="Slash",d[d.Zero=48]="Zero",d[d.Nine=57]="Nine",d[d.Semi=59]="Semi",d[d.Lt=60]="Lt",d[d.Eq=61]="Eq",d[d.Gt=62]="Gt",d[d.Questionmark=63]="Questionmark",d[d.UpperA=65]="UpperA",d[d.LowerA=97]="LowerA",d[d.UpperF=70]="UpperF",d[d.LowerF=102]="LowerF",d[d.UpperZ=90]="UpperZ",d[d.LowerZ=122]="LowerZ",d[d.LowerX=120]="LowerX",d[d.OpeningSquareBracket=91]="OpeningSquareBracket"})(n||(n={}));var r;(function(d){d[d.Text=1]="Text",d[d.BeforeTagName=2]="BeforeTagName",d[d.InTagName=3]="InTagName",d[d.InSelfClosingTag=4]="InSelfClosingTag",d[d.BeforeClosingTagName=5]="BeforeClosingTagName",d[d.InClosingTagName=6]="InClosingTagName",d[d.AfterClosingTagName=7]="AfterClosingTagName",d[d.BeforeAttributeName=8]="BeforeAttributeName",d[d.InAttributeName=9]="InAttributeName",d[d.AfterAttributeName=10]="AfterAttributeName",d[d.BeforeAttributeValue=11]="BeforeAttributeValue",d[d.InAttributeValueDq=12]="InAttributeValueDq",d[d.InAttributeValueSq=13]="InAttributeValueSq",d[d.InAttributeValueNq=14]="InAttributeValueNq",d[d.BeforeDeclaration=15]="BeforeDeclaration",d[d.InDeclaration=16]="InDeclaration",d[d.InProcessingInstruction=17]="InProcessingInstruction",d[d.BeforeComment=18]="BeforeComment",d[d.CDATASequence=19]="CDATASequence",d[d.InSpecialComment=20]="InSpecialComment",d[d.InCommentLike=21]="InCommentLike",d[d.BeforeSpecialS=22]="BeforeSpecialS",d[d.SpecialStartSequence=23]="SpecialStartSequence",d[d.InSpecialTag=24]="InSpecialTag",d[d.BeforeEntity=25]="BeforeEntity",d[d.BeforeNumericEntity=26]="BeforeNumericEntity",d[d.InNamedEntity=27]="InNamedEntity",d[d.InNumericEntity=28]="InNumericEntity",d[d.InHexEntity=29]="InHexEntity"})(r||(r={}));function a(d){return d===n.Space||d===n.NewLine||d===n.Tab||d===n.FormFeed||d===n.CarriageReturn}function s(d){return d===n.Slash||d===n.Gt||a(d)}function o(d){return d>=n.Zero&&d<=n.Nine}function i(d){return d>=n.LowerA&&d<=n.LowerZ||d>=n.UpperA&&d<=n.UpperZ}function u(d){return d>=n.UpperA&&d<=n.UpperF||d>=n.LowerA&&d<=n.LowerF}var l;(function(d){d[d.NoValue=0]="NoValue",d[d.Unquoted=1]="Unquoted",d[d.Single=2]="Single",d[d.Double=3]="Double"})(l=e.QuoteType||(e.QuoteType={}));var c={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},f=function(){function d(m,E){var g=m.xmlMode,b=g===void 0?!1:g,v=m.decodeEntities,R=v===void 0?!0:v;this.cbs=E,this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=b,this.decodeEntities=R,this.entityTrie=b?t.xmlDecodeTree:t.htmlDecodeTree}return d.prototype.reset=function(){this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},d.prototype.write=function(m){this.offset+=this.buffer.length,this.buffer=m,this.parse()},d.prototype.end=function(){this.running&&this.finish()},d.prototype.pause=function(){this.running=!1},d.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=r.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&m===n.Amp&&(this.state=r.BeforeEntity)},d.prototype.stateSpecialStartSequence=function(m){var E=this.sequenceIndex===this.currentSequence.length,g=E?s(m):(m|32)===this.currentSequence[this.sequenceIndex];if(!g)this.isSpecial=!1;else if(!E){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=r.InTagName,this.stateInTagName(m)},d.prototype.stateInSpecialTag=function(m){if(this.sequenceIndex===this.currentSequence.length){if(m===n.Gt||a(m)){var E=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&m!==n.Semi)this.trieIndex+=g;else{var b=this.index-this.entityExcess+1;b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.entityResult=this.trieIndex,this.trieIndex+=g,this.entityExcess=0,this.sectionStart=this.index+1,g===0&&this.emitNamedEntity()}}},d.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var m=(this.entityTrie[this.entityResult]&t.BinTrieFlags.VALUE_LENGTH)>>14;switch(m){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~t.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},d.prototype.stateBeforeNumericEntity=function(m){(m|32)===n.LowerX?(this.entityExcess++,this.state=r.InHexEntity):(this.state=r.InNumericEntity,this.stateInNumericEntity(m))},d.prototype.emitNumericEntity=function(m){var E=this.index-this.entityExcess-1,g=E+2+ +(this.state===r.InHexEntity);g!==this.index&&(E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.sectionStart=this.index+Number(m),this.emitCodePoint((0,t.replaceCodePoint)(this.entityResult))),this.state=this.baseState},d.prototype.stateInNumericEntity=function(m){m===n.Semi?this.emitNumericEntity(!0):o(m)?(this.entityResult=this.entityResult*10+(m-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.stateInHexEntity=function(m){m===n.Semi?this.emitNumericEntity(!0):o(m)?(this.entityResult=this.entityResult*16+(m-n.Zero),this.entityExcess++):u(m)?(this.entityResult=this.entityResult*16+((m|32)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===r.Text||this.baseState===r.InSpecialTag)},d.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===r.Text||this.state===r.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===r.InAttributeValueDq||this.state===r.InAttributeValueSq||this.state===r.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},d.prototype.shouldContinue=function(){return this.index0&&o.has(this.stack[this.stack.length-1]);){var i=this.stack.pop();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,i,!0)}this.isVoidElement(t)||(this.stack.push(t),gE.has(t)?this.foreignContext.push(!0):AE.has(t)&&this.foreignContext.push(!1)),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,t),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1},e.prototype.onclosetag=function(t,n){var r,a,s,o,i,u;this.endIndex=n;var l=this.getSlice(t,n);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(gE.has(l)||AE.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))!this.options.xmlMode&&l==="br"&&((a=(r=this.cbs).onopentagname)===null||a===void 0||a.call(r,"br"),(o=(s=this.cbs).onopentag)===null||o===void 0||o.call(s,"br",{},!0),(u=(i=this.cbs).onclosetag)===null||u===void 0||u.call(i,"br",!1));else{var c=this.stack.lastIndexOf(l);if(c!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-c;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=c;else!this.options.xmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1},e.prototype.onselfclosingtag=function(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)},e.prototype.closeCurrentTag=function(t){var n,r,a=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===a&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,a,!t),this.stack.pop())},e.prototype.onattribname=function(t,n){this.startIndex=t;var r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(t,n){this.attribvalue+=this.getSlice(t,n)},e.prototype.onattribentity=function(t){this.attribvalue+=(0,EE.fromCodePoint)(t)},e.prototype.onattribend=function(t,n){var r,a;this.endIndex=n,(a=(r=this.cbs).onattribute)===null||a===void 0||a.call(r,this.attribname,this.attribvalue,t===oi.QuoteType.Double?'"':t===oi.QuoteType.Single?"'":t===oi.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(t){var n=t.search(u_e),r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(t,n){this.endIndex=n;var r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(r))}this.startIndex=n+1},e.prototype.onprocessinginstruction=function(t,n){this.endIndex=n;var r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(r))}this.startIndex=n+1},e.prototype.oncomment=function(t,n,r){var a,s,o,i;this.endIndex=n,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(t,n-r)),(i=(o=this.cbs).oncommentend)===null||i===void 0||i.call(o),this.startIndex=n+1},e.prototype.oncdata=function(t,n,r){var a,s,o,i,u,l,c,f,d,m;this.endIndex=n;var E=this.getSlice(t,n-r);this.options.xmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(i=(o=this.cbs).ontext)===null||i===void 0||i.call(o,E),(l=(u=this.cbs).oncdataend)===null||l===void 0||l.call(u)):((f=(c=this.cbs).oncomment)===null||f===void 0||f.call(c,"[CDATA[".concat(E,"]]")),(m=(d=this.cbs).oncommentend)===null||m===void 0||m.call(d)),this.startIndex=n+1},e.prototype.onend=function(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)},e.prototype.reset=function(){var t,n,r,a;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(r=this.cbs).onparserinit)===null||a===void 0||a.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(t){this.reset(),this.end(t)},e.prototype.getSlice=function(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)},e.prototype.end=function(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(t0);qe.NodeWithChildren=Tc;var ug=function(e){Qr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=un.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Tc);qe.CDATA=ug;var cg=function(e){Qr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=un.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Tc);qe.Document=cg;var lg=function(e){Qr(t,e);function t(n,r,a,s){a===void 0&&(a=[]),s===void 0&&(s=n==="script"?un.ElementType.Script:n==="style"?un.ElementType.Style:un.ElementType.Tag);var o=e.call(this,a)||this;return o.name=n,o.attribs=r,o.type=s,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var a,s;return{name:r,value:n.attribs[r],namespace:(a=n["x-attribsNamespace"])===null||a===void 0?void 0:a[r],prefix:(s=n["x-attribsPrefix"])===null||s===void 0?void 0:s[r]}})},enumerable:!1,configurable:!0}),t}(Tc);qe.Element=lg;function dg(e){return(0,un.isTag)(e)}qe.isTag=dg;function fg(e){return e.type===un.ElementType.CDATA}qe.isCDATA=fg;function pg(e){return e.type===un.ElementType.Text}qe.isText=pg;function mg(e){return e.type===un.ElementType.Comment}qe.isComment=mg;function Eg(e){return e.type===un.ElementType.Directive}qe.isDirective=Eg;function hg(e){return e.type===un.ElementType.Root}qe.isDocument=hg;function l_e(e){return Object.prototype.hasOwnProperty.call(e,"children")}qe.hasChildren=l_e;function n0(e,t){t===void 0&&(t=!1);var n;if(pg(e))n=new sg(e.data);else if(mg(e))n=new og(e.data);else if(dg(e)){var r=t?ul(e.children):[],a=new lg(e.name,Qs({},e.attribs),r);r.forEach(function(u){return u.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=Qs({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=Qs({},e["x-attribsPrefix"])),n=a}else if(fg(e)){var r=t?ul(e.children):[],s=new ug(r);r.forEach(function(l){return l.parent=s}),n=s}else if(hg(e)){var r=t?ul(e.children):[],o=new cg(r);r.forEach(function(l){return l.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),n=o}else if(Eg(e)){var i=new ig(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),n=i}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}qe.cloneNode=n0;function ul(e){for(var t=e.map(function(r){return n0(r,!0)}),n=1;n$\x80-\uFFFF]/g;var t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(a,s){return a.codePointAt(s)}:function(a,s){return(a.charCodeAt(s)&64512)===55296?(a.charCodeAt(s)-55296)*1024+a.charCodeAt(s+1)-56320+65536:a.charCodeAt(s)};function n(a){for(var s="",o=0,i;(i=e.xmlReplacer.exec(a))!==null;){var u=i.index,l=a.charCodeAt(u),c=t.get(l);c!==void 0?(s+=a.substring(o,u)+c,o=u+1):(s+="".concat(a.substring(o,u),"").concat((0,e.getCodePoint)(a,u).toString(16),";"),o=e.xmlReplacer.lastIndex+=+((l&64512)===55296))}return s+a.substr(o)}e.encodeXML=n,e.escape=n;function r(a,s){return function(i){for(var u,l=0,c="";u=a.exec(i);)l!==u.index&&(c+=i.substring(l,u.index)),c+=s.get(u[0].charCodeAt(0)),l=u.index+1;return c+i.substring(l)}}e.escapeUTF8=r(/[&<>'"]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(wu);var d_e=De&&De.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.encodeNonAsciiHTML=Ea.encodeHTML=void 0;var f_e=d_e(r0),Tg=wu,p_e=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function m_e(e){return gg(p_e,e)}Ea.encodeHTML=m_e;function E_e(e){return gg(Tg.xmlReplacer,e)}Ea.encodeNonAsciiHTML=E_e;function gg(e,t){for(var n="",r=0,a;(a=e.exec(t))!==null;){var s=a.index;n+=t.substring(r,s);var o=t.charCodeAt(s),i=f_e.default.get(o);if(typeof i=="object"){if(s+1 "):(r+=">",e.children.length>0&&(r+=gc(e.children,t)),(t.xmlMode||!SE.has(e.name))&&(r+="".concat(e.name,">"))),r}function b_e(e){return"<".concat(e.data,">")}function N_e(e,t){var n,r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&g_e.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?(0,Lu.encodeXML)(r):(0,Lu.escapeText)(r)),r}function C_e(e){return"")}function y_e(e){return"")}var D_e=De&&De.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hn,"__esModule",{value:!0});hn.innerText=hn.textContent=hn.getText=hn.getInnerHTML=hn.getOuterHTML=void 0;var Qn=gr,P_e=D_e(xo),w_e=Ss;function Sg(e,t){return(0,P_e.default)(e,t)}hn.getOuterHTML=Sg;function L_e(e,t){return(0,Qn.hasChildren)(e)?e.children.map(function(n){return Sg(n,t)}).join(""):""}hn.getInnerHTML=L_e;function Ui(e){return Array.isArray(e)?e.map(Ui).join(""):(0,Qn.isTag)(e)?e.name==="br"?`
+`:Ui(e.children):(0,Qn.isCDATA)(e)?Ui(e.children):(0,Qn.isText)(e)?e.data:""}hn.getText=Ui;function Od(e){return Array.isArray(e)?e.map(Od).join(""):(0,Qn.hasChildren)(e)&&!(0,Qn.isComment)(e)?Od(e.children):(0,Qn.isText)(e)?e.data:""}hn.textContent=Od;function Id(e){return Array.isArray(e)?e.map(Id).join(""):(0,Qn.hasChildren)(e)&&(e.type===w_e.ElementType.Tag||(0,Qn.isCDATA)(e))?Id(e.children):(0,Qn.isText)(e)?e.data:""}hn.innerText=Id;var wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.prevElementSibling=wt.nextElementSibling=wt.getName=wt.hasAttrib=wt.getAttributeValue=wt.getSiblings=wt.getParent=wt.getChildren=void 0;var a0=gr;function Og(e){return(0,a0.hasChildren)(e)?e.children:[]}wt.getChildren=Og;function Ig(e){return e.parent||null}wt.getParent=Ig;function $_e(e){var t,n,r=Ig(e);if(r!=null)return Og(r);for(var a=[e],s=e.prev,o=e.next;s!=null;)a.unshift(s),t=s,s=t.prev;for(;o!=null;)a.push(o),n=o,o=n.next;return a}wt.getSiblings=$_e;function k_e(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}wt.getAttributeValue=k_e;function U_e(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}wt.hasAttrib=U_e;function M_e(e){return e.name}wt.getName=M_e;function x_e(e){for(var t,n=e.next;n!==null&&!(0,a0.isTag)(n);)t=n,n=t.next;return n}wt.nextElementSibling=x_e;function F_e(e){for(var t,n=e.prev;n!==null&&!(0,a0.isTag)(n);)t=n,n=t.prev;return n}wt.prevElementSibling=F_e;var on={};Object.defineProperty(on,"__esModule",{value:!0});on.prepend=on.prependChild=on.append=on.appendChild=on.replaceElement=on.removeElement=void 0;function Fo(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}on.removeElement=Fo;function W_e(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var a=t.parent=e.parent;if(a){var s=a.children;s[s.lastIndexOf(e)]=t,e.parent=null}}on.replaceElement=W_e;function G_e(e,t){if(Fo(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}on.appendChild=G_e;function z_e(e,t){Fo(t);var n=e.parent,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}on.append=z_e;function B_e(e,t){if(Fo(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){var n=e.children[1];n.prev=t,t.next=n}else t.next=null}on.prependChild=B_e;function H_e(e,t){Fo(t);var n=e.parent;if(n){var r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}on.prepend=H_e;var Xt={};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.findAll=Xt.existsOne=Xt.findOne=Xt.findOneChild=Xt.find=Xt.filter=void 0;var Ac=gr;function j_e(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),vg(e,Array.isArray(t)?t:[t],n,r)}Xt.filter=j_e;function vg(e,t,n,r){for(var a=[],s=[t],o=[0];;){if(o[0]>=s[0].length){if(o.length===1)return a;s.shift(),o.shift();continue}var i=s[0][o[0]++];if(e(i)&&(a.push(i),--r<=0))return a;n&&(0,Ac.hasChildren)(i)&&i.children.length>0&&(o.unshift(0),s.unshift(i.children))}}Xt.find=vg;function V_e(e,t){return t.find(e)}Xt.findOneChild=V_e;function Rg(e,t,n){n===void 0&&(n=!0);for(var r=null,a=0;a0&&(r=Rg(e,s.children,!0));else continue}return r}Xt.findOne=Rg;function bg(e,t){return t.some(function(n){return(0,Ac.isTag)(n)&&(e(n)||bg(e,n.children))})}Xt.existsOne=bg;function K_e(e,t){for(var n=[],r=[t],a=[0];;){if(a[0]>=r[0].length){if(r.length===1)return n;r.shift(),a.shift();continue}var s=r[0][a[0]++];(0,Ac.isTag)(s)&&(e(s)&&n.push(s),s.children.length>0&&(a.unshift(0),r.unshift(s.children)))}}Xt.findAll=K_e;var _n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.getElementsByTagType=_n.getElementsByTagName=_n.getElementById=_n.getElements=_n.testElement=void 0;var ia=gr,Sc=Xt,$u={tag_name:function(e){return typeof e=="function"?function(t){return(0,ia.isTag)(t)&&e(t.name)}:e==="*"?ia.isTag:function(t){return(0,ia.isTag)(t)&&t.name===e}},tag_type:function(e){return typeof e=="function"?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return typeof e=="function"?function(t){return(0,ia.isText)(t)&&e(t.data)}:function(t){return(0,ia.isText)(t)&&t.data===e}}};function Ng(e,t){return typeof t=="function"?function(n){return(0,ia.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,ia.isTag)(n)&&n.attribs[e]===t}}function Y_e(e,t){return function(n){return e(n)||t(n)}}function Cg(e){var t=Object.keys(e).map(function(n){var r=e[n];return Object.prototype.hasOwnProperty.call($u,n)?$u[n](r):Ng(n,r)});return t.length===0?null:t.reduce(Y_e)}function q_e(e,t){var n=Cg(e);return n?n(t):!0}_n.testElement=q_e;function X_e(e,t,n,r){r===void 0&&(r=1/0);var a=Cg(e);return a?(0,Sc.filter)(a,t,n,r):[]}_n.getElements=X_e;function Z_e(e,t,n){return n===void 0&&(n=!0),Array.isArray(t)||(t=[t]),(0,Sc.findOne)(Ng("id",e),t,n)}_n.getElementById=Z_e;function Q_e(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),(0,Sc.filter)($u.tag_name(e),t,n,r)}_n.getElementsByTagName=Q_e;function J_e(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),(0,Sc.filter)($u.tag_type(e),t,n,r)}_n.getElementsByTagType=J_e;var yg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var t=gr;function n(o){for(var i=o.length;--i>=0;){var u=o[i];if(i>0&&o.lastIndexOf(u,i-1)>=0){o.splice(i,1);continue}for(var l=u.parent;l;l=l.parent)if(o.includes(l)){o.splice(i,1);break}}return o}e.removeSubsets=n;var r;(function(o){o[o.DISCONNECTED=1]="DISCONNECTED",o[o.PRECEDING=2]="PRECEDING",o[o.FOLLOWING=4]="FOLLOWING",o[o.CONTAINS=8]="CONTAINS",o[o.CONTAINED_BY=16]="CONTAINED_BY"})(r=e.DocumentPosition||(e.DocumentPosition={}));function a(o,i){var u=[],l=[];if(o===i)return 0;for(var c=(0,t.hasChildren)(o)?o:o.parent;c;)u.unshift(c),c=c.parent;for(c=(0,t.hasChildren)(i)?i:i.parent;c;)l.unshift(c),c=c.parent;for(var f=Math.min(u.length,l.length),d=0;dE.indexOf(b)?m===i?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:m===o?r.PRECEDING|r.CONTAINS:r.PRECEDING}e.compareDocumentPosition=a;function s(o){return o=o.filter(function(i,u,l){return!l.includes(i,u+1)}),o.sort(function(i,u){var l=a(i,u);return l&r.PRECEDING?-1:l&r.FOLLOWING?1:0}),o}e.uniqueSort=s})(yg);var Oc={};Object.defineProperty(Oc,"__esModule",{value:!0});Oc.getFeed=void 0;var e1e=hn,Wo=_n;function t1e(e){var t=ku(o1e,e);return t?t.name==="feed"?n1e(t):r1e(t):null}Oc.getFeed=t1e;function n1e(e){var t,n=e.children,r={type:"atom",items:(0,Wo.getElementsByTagName)("entry",n).map(function(o){var i,u=o.children,l={media:Dg(u)};an(l,"id","id",u),an(l,"title","title",u);var c=(i=ku("link",u))===null||i===void 0?void 0:i.attribs.href;c&&(l.link=c);var f=Wr("summary",u)||Wr("content",u);f&&(l.description=f);var d=Wr("updated",u);return d&&(l.pubDate=new Date(d)),l})};an(r,"id","id",n),an(r,"title","title",n);var a=(t=ku("link",n))===null||t===void 0?void 0:t.attribs.href;a&&(r.link=a),an(r,"description","subtitle",n);var s=Wr("updated",n);return s&&(r.updated=new Date(s)),an(r,"author","email",n,!0),r}function r1e(e){var t,n,r=(n=(t=ku("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],a={type:e.name.substr(0,3),id:"",items:(0,Wo.getElementsByTagName)("item",e.children).map(function(o){var i=o.children,u={media:Dg(i)};an(u,"id","guid",i),an(u,"title","title",i),an(u,"link","link",i),an(u,"description","description",i);var l=Wr("pubDate",i)||Wr("dc:date",i);return l&&(u.pubDate=new Date(l)),u})};an(a,"title","title",r),an(a,"link","link",r),an(a,"description","description",r);var s=Wr("lastBuildDate",r);return s&&(a.updated=new Date(s)),an(a,"author","managingEditor",r,!0),a}var a1e=["url","type","lang"],s1e=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Dg(e){return(0,Wo.getElementsByTagName)("media:content",e).map(function(t){for(var n=t.attribs,r={medium:n.medium,isDefault:!!n.isDefault},a=0,s=a1e;a{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},s0={};Object.defineProperty(s0,"__esModule",{value:!0});/*!
* is-plain-object
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
- */function OE(e){return Object.prototype.toString.call(e)==="[object Object]"}function o1e(e){var t,n;return OE(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(OE(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}s0.isPlainObject=o1e;var i1e=function(t){return u1e(t)&&!c1e(t)};function u1e(e){return!!e&&typeof e=="object"}function c1e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||f1e(e)}var l1e=typeof Symbol=="function"&&Symbol.for,d1e=l1e?Symbol.for("react.element"):60103;function f1e(e){return e.$$typeof===d1e}function p1e(e){return Array.isArray(e)?[]:{}}function To(e,t){return t.clone!==!1&&t.isMergeableObject(e)?us(p1e(e),e,t):e}function m1e(e,t,n){return e.concat(t).map(function(r){return To(r,n)})}function E1e(e,t){if(!t.customMerge)return us;var n=t.customMerge(e);return typeof n=="function"?n:us}function h1e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function IE(e){return Object.keys(e).concat(h1e(e))}function Pg(e,t){try{return t in e}catch{return!1}}function _1e(e,t){return Pg(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function T1e(e,t,n){var r={};return n.isMergeableObject(e)&&IE(e).forEach(function(a){r[a]=To(e[a],n)}),IE(t).forEach(function(a){_1e(e,a)||(Pg(e,a)&&n.isMergeableObject(t[a])?r[a]=E1e(a,n)(e[a],t[a],n):r[a]=To(t[a],n))}),r}function us(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||m1e,n.isMergeableObject=n.isMergeableObject||i1e,n.cloneUnlessOtherwiseSpecified=To;var r=Array.isArray(t),a=Array.isArray(e),s=r===a;return s?r?n.arrayMerge(e,t,n):T1e(e,t,n):To(t,n)}us.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,a){return us(r,a,n)},{})};var g1e=us,A1e=g1e,wg={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.parseSrcset=n()})(De,function(){return function(t){function n(S){return S===" "||S===" "||S===`
-`||S==="\f"||S==="\r"}function r(S){var C,L=S.exec(t.substring(b));if(L)return C=L[0],b+=C.length,C}for(var a=t.length,s=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,i=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,f,d,m,E,g,b=0,v=[];;){if(r(o),b>=a)return v;f=r(i),d=[],f.slice(-1)===","?(f=f.replace(u,""),A()):R()}function R(){for(r(s),m="",E="in descriptor";;){if(g=t.charAt(b),E==="in descriptor")if(n(g))m&&(d.push(m),m="",E="after descriptor");else if(g===","){b+=1,m&&d.push(m),A();return}else if(g==="(")m=m+g,E="in parens";else if(g===""){m&&d.push(m),A();return}else m=m+g;else if(E==="in parens")if(g===")")m=m+g,E="in descriptor";else if(g===""){d.push(m),A();return}else m=m+g;else if(E==="after descriptor"&&!n(g))if(g===""){A();return}else E="in descriptor",b-=1;b+=1}}function A(){var S=!1,C,L,$,U,G={},B,w,Z,J,re;for(U=0;U",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=vE.isColorSupported),RE&&t&&(n=RE(n));let r=n.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),o=String(s).length,i,u;if(t){let{bold:l,gray:c,red:f}=vE.createColors(!0);i=d=>l(f(d)),u=d=>c(d)}else i=u=l=>l;return r.slice(a,s).map((l,c)=>{let f=a+1+c,d=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let m=u(d.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+u(d)+l+`
+ */function OE(e){return Object.prototype.toString.call(e)==="[object Object]"}function u1e(e){var t,n;return OE(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(OE(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}s0.isPlainObject=u1e;var c1e=function(t){return l1e(t)&&!d1e(t)};function l1e(e){return!!e&&typeof e=="object"}function d1e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||m1e(e)}var f1e=typeof Symbol=="function"&&Symbol.for,p1e=f1e?Symbol.for("react.element"):60103;function m1e(e){return e.$$typeof===p1e}function E1e(e){return Array.isArray(e)?[]:{}}function To(e,t){return t.clone!==!1&&t.isMergeableObject(e)?us(E1e(e),e,t):e}function h1e(e,t,n){return e.concat(t).map(function(r){return To(r,n)})}function _1e(e,t){if(!t.customMerge)return us;var n=t.customMerge(e);return typeof n=="function"?n:us}function T1e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function IE(e){return Object.keys(e).concat(T1e(e))}function Pg(e,t){try{return t in e}catch{return!1}}function g1e(e,t){return Pg(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function A1e(e,t,n){var r={};return n.isMergeableObject(e)&&IE(e).forEach(function(a){r[a]=To(e[a],n)}),IE(t).forEach(function(a){g1e(e,a)||(Pg(e,a)&&n.isMergeableObject(t[a])?r[a]=_1e(a,n)(e[a],t[a],n):r[a]=To(t[a],n))}),r}function us(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||h1e,n.isMergeableObject=n.isMergeableObject||c1e,n.cloneUnlessOtherwiseSpecified=To;var r=Array.isArray(t),a=Array.isArray(e),s=r===a;return s?r?n.arrayMerge(e,t,n):A1e(e,t,n):To(t,n)}us.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,a){return us(r,a,n)},{})};var S1e=us,O1e=S1e,wg={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.parseSrcset=n()})(De,function(){return function(t){function n(S){return S===" "||S===" "||S===`
+`||S==="\f"||S==="\r"}function r(S){var C,L=S.exec(t.substring(b));if(L)return C=L[0],b+=C.length,C}for(var a=t.length,s=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,i=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,f,d,m,E,g,b=0,v=[];;){if(r(o),b>=a)return v;f=r(i),d=[],f.slice(-1)===","?(f=f.replace(u,""),A()):R()}function R(){for(r(s),m="",E="in descriptor";;){if(g=t.charAt(b),E==="in descriptor")if(n(g))m&&(d.push(m),m="",E="after descriptor");else if(g===","){b+=1,m&&d.push(m),A();return}else if(g==="(")m=m+g,E="in parens";else if(g===""){m&&d.push(m),A();return}else m=m+g;else if(E==="in parens")if(g===")")m=m+g,E="in descriptor";else if(g===""){d.push(m),A();return}else m=m+g;else if(E==="after descriptor"&&!n(g))if(g===""){A();return}else E="in descriptor",b-=1;b+=1}}function A(){var S=!1,C,L,$,U,G={},B,w,Z,J,re;for(U=0;U",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=vE.isColorSupported),RE&&t&&(n=RE(n));let r=n.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),o=String(s).length,i,u;if(t){let{bold:l,gray:c,red:f}=vE.createColors(!0);i=d=>l(f(d)),u=d=>c(d)}else i=u=l=>l;return r.slice(a,s).map((l,c)=>{let f=a+1+c,d=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let m=u(d.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+u(d)+l+`
`+m+i("^")}return" "+u(d)+l}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`
@@ -371,30 +371,30 @@ Wymagania prawne mogę być inne, jeśli ten serwer znajduje się w innej jurysd
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
-`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function R1e(e){return e[0].toUpperCase()+e.slice(1)}let Rd=class{constructor(t){this.builder=t}atrule(t,n){let r="@"+t.name,a=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:a&&(r+=" "),t.nodes)this.block(t,r+a);else{let s=(t.raws.between||"")+(n?";":"");this.builder(r+a+s,t)}}beforeAfter(t,n){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):n==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let a=t.parent,s=0;for(;a&&a.type!=="root";)s+=1,a=a.parent;if(r.includes(`
-`)){let o=this.raw(t,null,"indent");if(o.length)for(let i=0;i0&&t.nodes[n].type==="comment";)n-=1;let r=this.raw(t,"semicolon");for(let a=0;a{if(a=u.raws[n],typeof a<"u")return!1})}return typeof a>"u"&&(a=bE[r]),o.rawCache[r]=a,a}rawBeforeClose(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
+`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function N1e(e){return e[0].toUpperCase()+e.slice(1)}let Rd=class{constructor(t){this.builder=t}atrule(t,n){let r="@"+t.name,a=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:a&&(r+=" "),t.nodes)this.block(t,r+a);else{let s=(t.raws.between||"")+(n?";":"");this.builder(r+a+s,t)}}beforeAfter(t,n){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):n==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let a=t.parent,s=0;for(;a&&a.type!=="root";)s+=1,a=a.parent;if(r.includes(`
+`)){let o=this.raw(t,null,"indent");if(o.length)for(let i=0;i0&&t.nodes[n].type==="comment";)n-=1;let r=this.raw(t,"semicolon");for(let a=0;a{if(a=u.raws[n],typeof a<"u")return!1})}return typeof a>"u"&&(a=bE[r]),o.rawCache[r]=a,a}rawBeforeClose(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let r;return t.walkComments(a=>{if(typeof a.raws.before<"u")return r=a.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,n){let r;return t.walkDecls(a=>{if(typeof a.raws.before<"u")return r=a.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let n;return t.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(r=>{let a=r.parent;if(a&&a!==t&&a.parent&&a.parent===t&&typeof r.raws.before<"u"){let s=r.raws.before.split(`
-`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],a=t.raws[n];return a&&a.value===r?a.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};var kg=Rd;Rd.default=Rd;let b1e=kg;function bd(e,t){new b1e(t).stringify(e)}var Ic=bd;bd.default=bd;let{isClean:ui,my:N1e}=Go,C1e=i0,y1e=kg,D1e=Ic;function Nd(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let a=e[r],s=typeof a;r==="parent"&&s==="object"?t&&(n[r]=t):r==="source"?n[r]=a:Array.isArray(a)?n[r]=a.map(o=>Nd(o,n)):(s==="object"&&a!==null&&(a=Nd(a)),n[r]=a)}return n}let Cd=class{constructor(t={}){this.raws={},this[ui]=!1,this[N1e]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=Nd(this);for(let r in t)n[r]=t[r];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:r,start:a}=this.rangeBy(n);return this.source.input.error(t,{column:a.column,line:a.line},{column:r.column,line:r.line},n)}return new C1e(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markDirty(){if(this[ui]){this[ui]=!1;let t=this;for(;t=t.parent;)t[ui]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,n){let r=this.source.start;if(t.index)r=this.positionInside(t.index,n);else if(t.word){n=this.toString();let a=n.indexOf(t.word);a!==-1&&(r=this.positionInside(a,n))}return r}positionInside(t,n){let r=n||this.toString(),a=this.source.start.column,s=this.source.start.line;for(let o=0;otypeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof i=="object"&&i.toJSON)r[o]=i.toJSON(null,n);else if(o==="source"){let u=n.get(i.input);u==null&&(u=s,n.set(i.input,s),s++),r[o]={end:i.end,inputId:u,start:i.start}}else r[o]=i}return a&&(r.inputs=[...n.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=D1e){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r){let a={node:this};for(let s in r)a[s]=r[s];return t.warn(n,a)}get proxyOf(){return this}};var vc=Cd;Cd.default=Cd;let P1e=vc,yd=class extends P1e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Rc=yd;yd.default=yd;let w1e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",L1e=(e,t=21)=>(n=t)=>{let r="",a=n;for(;a--;)r+=e[Math.random()*e.length|0];return r},$1e=(e=21)=>{let t="",n=e;for(;n--;)t+=w1e[Math.random()*64|0];return t};var k1e={nanoid:$1e,customAlphabet:L1e};let{SourceMapConsumer:NE,SourceMapGenerator:CE}=Mn,{existsSync:U1e,readFileSync:M1e}=Mn,{dirname:cl,join:x1e}=Mn;function F1e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let Dd=class{constructor(t,n){if(n.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,a=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=cl(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new NE(this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(a.test(t)||s.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||r.test(t))return F1e(t.substr(RegExp.lastMatch.length));let o=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=t.lastIndexOf(n.pop()),a=t.indexOf("*/",r);r>-1&&a>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,a)))}loadFile(t){if(this.root=cl(t),U1e(t))return this.mapFile=t,M1e(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(t);if(r){let a=this.loadFile(r);if(!a)throw new Error("Unable to load previous source map: "+r.toString());return a}}else{if(n instanceof NE)return CE.fromSourceMap(n).toString();if(n instanceof CE)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=x1e(cl(t),r)),this.loadFile(r)}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ug=Dd;Dd.default=Dd;let{SourceMapConsumer:W1e,SourceMapGenerator:G1e}=Mn,{fileURLToPath:yE,pathToFileURL:ci}=Mn,{isAbsolute:Pd,resolve:wd}=Mn,{nanoid:z1e}=k1e,ll=Mn,DE=i0,B1e=Ug,dl=Symbol("fromOffsetCache"),H1e=!!(W1e&&G1e),PE=!!(wd&&Pd),Uu=class{constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!PE||/^\w+:\/\//.test(n.from)||Pd(n.from)?this.file=n.from:this.file=wd(n.from)),PE&&H1e){let r=new B1e(this.css,n);if(r.text){this.map=r;let a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id=" "),this.map&&(this.map.file=this.from)}error(t,n,r,a={}){let s,o,i;if(n&&typeof n=="object"){let l=n,c=r;if(typeof l.offset=="number"){let f=this.fromOffset(l.offset);n=f.line,r=f.col}else n=l.line,r=l.column;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);o=f.line,i=f.col}else o=c.line,i=c.column}else if(!r){let l=this.fromOffset(n);n=l.line,r=l.col}let u=this.origin(n,r,o,i);return u?s=new DE(t,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,a.plugin):s=new DE(t,o===void 0?n:{column:r,line:n},o===void 0?r:{column:i,line:o},this.css,this.file,a.plugin),s.input={column:r,endColumn:i,endLine:o,line:n,source:this.css},this.file&&(ci&&(s.input.url=ci(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,r;if(this[dl])r=this[dl];else{let s=this.css.split(`
-`);r=new Array(s.length);let o=0;for(let i=0,u=s.length;i=n)a=r.length-1;else{let s=r.length-2,o;for(;a>1),t=r[o+1])a=o+1;else{a=o;break}}return{col:t-r[a]+1,line:a+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:wd(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,a){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:n,line:t});if(!o.source)return!1;let i;typeof r=="number"&&(i=s.originalPositionFor({column:a,line:r}));let u;Pd(o.source)?u=ci(o.source):u=new URL(o.source,this.map.consumer().sourceRoot||ci(this.map.mapFile));let l={column:o.column,endColumn:i&&i.column,endLine:i&&i.line,line:o.line,url:u.toString()};if(u.protocol==="file:")if(yE)l.file=yE(u);else throw new Error("file: protocol is not available in this PostCSS build");let c=s.sourceContentFor(o.source);return c&&(l.source=c),l}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var bc=Uu;Uu.default=Uu;ll&&ll.registerInput&&ll.registerInput(Uu);let{SourceMapConsumer:Mg,SourceMapGenerator:Mi}=Mn,{dirname:xi,relative:xg,resolve:Fg,sep:Wg}=Mn,{pathToFileURL:wE}=Mn,j1e=bc,V1e=!!(Mg&&Mi),K1e=!!(xi&&Fg&&xg&&Wg),Y1e=class{constructor(t,n,r,a){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
+`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],a=t.raws[n];return a&&a.value===r?a.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};var kg=Rd;Rd.default=Rd;let C1e=kg;function bd(e,t){new C1e(t).stringify(e)}var Ic=bd;bd.default=bd;let{isClean:ui,my:y1e}=Go,D1e=i0,P1e=kg,w1e=Ic;function Nd(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let a=e[r],s=typeof a;r==="parent"&&s==="object"?t&&(n[r]=t):r==="source"?n[r]=a:Array.isArray(a)?n[r]=a.map(o=>Nd(o,n)):(s==="object"&&a!==null&&(a=Nd(a)),n[r]=a)}return n}let Cd=class{constructor(t={}){this.raws={},this[ui]=!1,this[y1e]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=Nd(this);for(let r in t)n[r]=t[r];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:r,start:a}=this.rangeBy(n);return this.source.input.error(t,{column:a.column,line:a.line},{column:r.column,line:r.line},n)}return new D1e(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markDirty(){if(this[ui]){this[ui]=!1;let t=this;for(;t=t.parent;)t[ui]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,n){let r=this.source.start;if(t.index)r=this.positionInside(t.index,n);else if(t.word){n=this.toString();let a=n.indexOf(t.word);a!==-1&&(r=this.positionInside(a,n))}return r}positionInside(t,n){let r=n||this.toString(),a=this.source.start.column,s=this.source.start.line;for(let o=0;otypeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof i=="object"&&i.toJSON)r[o]=i.toJSON(null,n);else if(o==="source"){let u=n.get(i.input);u==null&&(u=s,n.set(i.input,s),s++),r[o]={end:i.end,inputId:u,start:i.start}}else r[o]=i}return a&&(r.inputs=[...n.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=w1e){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r){let a={node:this};for(let s in r)a[s]=r[s];return t.warn(n,a)}get proxyOf(){return this}};var vc=Cd;Cd.default=Cd;let L1e=vc,yd=class extends L1e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Rc=yd;yd.default=yd;let $1e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",k1e=(e,t=21)=>(n=t)=>{let r="",a=n;for(;a--;)r+=e[Math.random()*e.length|0];return r},U1e=(e=21)=>{let t="",n=e;for(;n--;)t+=$1e[Math.random()*64|0];return t};var M1e={nanoid:U1e,customAlphabet:k1e};let{SourceMapConsumer:NE,SourceMapGenerator:CE}=Mn,{existsSync:x1e,readFileSync:F1e}=Mn,{dirname:cl,join:W1e}=Mn;function G1e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let Dd=class{constructor(t,n){if(n.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,a=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=cl(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new NE(this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(a.test(t)||s.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||r.test(t))return G1e(t.substr(RegExp.lastMatch.length));let o=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=t.lastIndexOf(n.pop()),a=t.indexOf("*/",r);r>-1&&a>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,a)))}loadFile(t){if(this.root=cl(t),x1e(t))return this.mapFile=t,F1e(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(t);if(r){let a=this.loadFile(r);if(!a)throw new Error("Unable to load previous source map: "+r.toString());return a}}else{if(n instanceof NE)return CE.fromSourceMap(n).toString();if(n instanceof CE)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=W1e(cl(t),r)),this.loadFile(r)}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ug=Dd;Dd.default=Dd;let{SourceMapConsumer:z1e,SourceMapGenerator:B1e}=Mn,{fileURLToPath:yE,pathToFileURL:ci}=Mn,{isAbsolute:Pd,resolve:wd}=Mn,{nanoid:H1e}=M1e,ll=Mn,DE=i0,j1e=Ug,dl=Symbol("fromOffsetCache"),V1e=!!(z1e&&B1e),PE=!!(wd&&Pd),Uu=class{constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!PE||/^\w+:\/\//.test(n.from)||Pd(n.from)?this.file=n.from:this.file=wd(n.from)),PE&&V1e){let r=new j1e(this.css,n);if(r.text){this.map=r;let a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id=" "),this.map&&(this.map.file=this.from)}error(t,n,r,a={}){let s,o,i;if(n&&typeof n=="object"){let l=n,c=r;if(typeof l.offset=="number"){let f=this.fromOffset(l.offset);n=f.line,r=f.col}else n=l.line,r=l.column;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);o=f.line,i=f.col}else o=c.line,i=c.column}else if(!r){let l=this.fromOffset(n);n=l.line,r=l.col}let u=this.origin(n,r,o,i);return u?s=new DE(t,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,a.plugin):s=new DE(t,o===void 0?n:{column:r,line:n},o===void 0?r:{column:i,line:o},this.css,this.file,a.plugin),s.input={column:r,endColumn:i,endLine:o,line:n,source:this.css},this.file&&(ci&&(s.input.url=ci(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,r;if(this[dl])r=this[dl];else{let s=this.css.split(`
+`);r=new Array(s.length);let o=0;for(let i=0,u=s.length;i=n)a=r.length-1;else{let s=r.length-2,o;for(;a>1),t=r[o+1])a=o+1;else{a=o;break}}return{col:t-r[a]+1,line:a+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:wd(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,a){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:n,line:t});if(!o.source)return!1;let i;typeof r=="number"&&(i=s.originalPositionFor({column:a,line:r}));let u;Pd(o.source)?u=ci(o.source):u=new URL(o.source,this.map.consumer().sourceRoot||ci(this.map.mapFile));let l={column:o.column,endColumn:i&&i.column,endLine:i&&i.line,line:o.line,url:u.toString()};if(u.protocol==="file:")if(yE)l.file=yE(u);else throw new Error("file: protocol is not available in this PostCSS build");let c=s.sourceContentFor(o.source);return c&&(l.source=c),l}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var bc=Uu;Uu.default=Uu;ll&&ll.registerInput&&ll.registerInput(Uu);let{SourceMapConsumer:Mg,SourceMapGenerator:Mi}=Mn,{dirname:xi,relative:xg,resolve:Fg,sep:Wg}=Mn,{pathToFileURL:wE}=Mn,K1e=bc,Y1e=!!(Mg&&Mi),q1e=!!(xi&&Fg&&xg&&Wg),X1e=class{constructor(t,n,r,a){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
`;this.css.includes(`\r
`)&&(n=`\r
-`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||xi(t.file),a;this.mapOpts.sourcesContent===!1?(a=new Mg(t.text),a.sourcesContent&&(a.sourcesContent=a.sourcesContent.map(()=>null))):a=t.consumer(),this.map.applySourceMap(a,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),K1e&&V1e&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Mi.fromSourceMap(t)}else this.map=new Mi({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Mi({file:this.outputFile()});let t=1,n=1,r="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(i,u,l)=>{if(this.css+=i,u&&l!=="end"&&(a.generated.line=t,a.generated.column=n-1,u.source&&u.source.start?(a.source=this.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,this.map.addMapping(a)):(a.source=r,a.original.line=1,a.original.column=0,this.map.addMapping(a))),s=i.match(/\n/g),s?(t+=s.length,o=i.lastIndexOf(`
-`),n=i.length-o):n+=i.length,u&&l!=="start"){let c=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==c.last||c.raws.semicolon)&&(u.source&&u.source.end?(a.source=this.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=t,a.generated.column=n-2,this.map.addMapping(a)):(a.source=r,a.original.line=1,a.original.column=0,a.generated.line=t,a.generated.column=n-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?xi(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=xi(Fg(r,this.mapOpts.annotation)));let a=xg(r,t);return this.memoizedPaths.set(t,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new j1e(this.css,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let a=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(a,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(wE){let r=wE(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;Wg==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var Gg=Y1e;let q1e=vc,Ld=class extends q1e{constructor(t){super(t),this.type="comment"}};var Nc=Ld;Ld.default=Ld;let{isClean:zg,my:Bg}=Go,Hg=Rc,jg=Nc,X1e=vc,Vg,u0,c0,Kg;function Yg(e){return e.map(t=>(t.nodes&&(t.nodes=Yg(t.nodes)),delete t.source,t))}function qg(e){if(e[zg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)qg(t)}let Ar=class Xg extends X1e{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let a of r)this.proxyOf.nodes.push(a)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,a;for(;this.indexes[n]t[n](...r.map(a=>typeof a=="function"?(s,o)=>a(s.toProxy(),o):a)):n==="every"||n==="some"?r=>t[n]((a,...s)=>r(a.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),a=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let o of a)this.proxyOf.nodes.splice(r+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],r"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Hg(t)]}else if(t.selector)t=[new u0(t)];else if(t.name)t=[new c0(t)];else if(t.text)t=[new jg(t)];else throw new Error("Unknown node type in node creation");return t.map(a=>(a[Bg]||Xg.rebuild(a),a=a.proxyOf,a.parent&&a.parent.removeChild(a),a[zg]&&qg(a),typeof a.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(a.raws.before=n.raws.before.replace(/\S/g,"")),a.parent=this.proxyOf,a))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let a of r)this.proxyOf.nodes.unshift(a);for(let a in this.indexes)this.indexes[a]=this.indexes[a]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(a=>{n.props&&!n.props.includes(a.prop)||n.fast&&!a.value.includes(n.fast)||(a.value=a.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let a;try{a=t(n,r)}catch(s){throw n.addToError(s)}return a!==!1&&n.walk&&(a=n.walk(t)),a})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,a)}):this.walk((r,a)=>{if(r.type==="atrule"&&r.name===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="atrule")return n(r,a)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,a)}):this.walk((r,a)=>{if(r.type==="decl"&&r.prop===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="decl")return n(r,a)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,a)}):this.walk((r,a)=>{if(r.type==="rule"&&r.selector===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="rule")return n(r,a)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ar.registerParse=e=>{Vg=e};Ar.registerRule=e=>{u0=e};Ar.registerAtRule=e=>{c0=e};Ar.registerRoot=e=>{Kg=e};var Aa=Ar;Ar.default=Ar;Ar.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,c0.prototype):e.type==="rule"?Object.setPrototypeOf(e,u0.prototype):e.type==="decl"?Object.setPrototypeOf(e,Hg.prototype):e.type==="comment"?Object.setPrototypeOf(e,jg.prototype):e.type==="root"&&Object.setPrototypeOf(e,Kg.prototype),e[Bg]=!0,e.nodes&&e.nodes.forEach(t=>{Ar.rebuild(t)})};let Z1e=Aa,Zg,Qg,go=class extends Z1e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Zg(new Qg,this,t).stringify()}};go.registerLazyResult=e=>{Zg=e};go.registerProcessor=e=>{Qg=e};var l0=go;go.default=go;let $d=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Jg=$d;$d.default=$d;let Q1e=Jg,kd=class{constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new Q1e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var d0=kd;kd.default=kd;const fl=39,LE=34,li=92,$E=47,di=10,$s=32,fi=12,pi=9,mi=13,J1e=91,eTe=93,tTe=40,nTe=41,rTe=123,aTe=125,sTe=59,oTe=42,iTe=58,uTe=64,Ei=/[\t\n\f\r "#'()/;[\\\]{}]/g,hi=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cTe=/.[\r\n"'(/\\]/,kE=/[\da-f]/i;var lTe=function(t,n={}){let r=t.css.valueOf(),a=n.ignoreErrors,s,o,i,u,l,c,f,d,m,E,g=r.length,b=0,v=[],R=[];function A(){return b}function S(U){throw t.error("Unclosed "+U,b)}function C(){return R.length===0&&b>=g}function L(U){if(R.length)return R.pop();if(b>=g)return;let G=U?U.ignoreUnclosed:!1;switch(s=r.charCodeAt(b),s){case di:case $s:case pi:case mi:case fi:{o=b;do o+=1,s=r.charCodeAt(o);while(s===$s||s===di||s===pi||s===mi||s===fi);E=["space",r.slice(b,o)],b=o-1;break}case J1e:case eTe:case rTe:case aTe:case iTe:case sTe:case nTe:{let B=String.fromCharCode(s);E=[B,B,b];break}case tTe:{if(d=v.length?v.pop()[1]:"",m=r.charCodeAt(b+1),d==="url"&&m!==fl&&m!==LE&&m!==$s&&m!==di&&m!==pi&&m!==fi&&m!==mi){o=b;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(a||G){o=b;break}else S("bracket");for(f=o;r.charCodeAt(f-1)===li;)f-=1,c=!c}while(c);E=["brackets",r.slice(b,o+1),b,o],b=o}else o=r.indexOf(")",b+1),u=r.slice(b,o+1),o===-1||cTe.test(u)?E=["(","(",b]:(E=["brackets",u,b,o],b=o);break}case fl:case LE:{i=s===fl?"'":'"',o=b;do{if(c=!1,o=r.indexOf(i,o+1),o===-1)if(a||G){o=b+1;break}else S("string");for(f=o;r.charCodeAt(f-1)===li;)f-=1,c=!c}while(c);E=["string",r.slice(b,o+1),b,o],b=o;break}case uTe:{Ei.lastIndex=b+1,Ei.test(r),Ei.lastIndex===0?o=r.length-1:o=Ei.lastIndex-2,E=["at-word",r.slice(b,o+1),b,o],b=o;break}case li:{for(o=b,l=!0;r.charCodeAt(o+1)===li;)o+=1,l=!l;if(s=r.charCodeAt(o+1),l&&s!==$E&&s!==$s&&s!==di&&s!==pi&&s!==mi&&s!==fi&&(o+=1,kE.test(r.charAt(o)))){for(;kE.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===$s&&(o+=1)}E=["word",r.slice(b,o+1),b,o],b=o;break}default:{s===$E&&r.charCodeAt(b+1)===oTe?(o=r.indexOf("*/",b+2)+1,o===0&&(a||G?o=r.length:S("comment")),E=["comment",r.slice(b,o+1),b,o],b=o):(hi.lastIndex=b+1,hi.test(r),hi.lastIndex===0?o=r.length-1:o=hi.lastIndex-2,E=["word",r.slice(b,o+1),b,o],v.push(E),b=o);break}}return b++,E}function $(U){R.push(U)}return{back:$,endOfFile:C,nextToken:L,position:A}};let eA=Aa,Mu=class extends eA{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var f0=Mu;Mu.default=Mu;eA.registerAtRule(Mu);let tA=Aa,nA,rA,cs=class extends tA{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let a=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of a)s.raws.before=n.raws.before}return a}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new nA(new rA,this,t).stringify()}};cs.registerLazyResult=e=>{nA=e};cs.registerProcessor=e=>{rA=e};var zo=cs;cs.default=cs;tA.registerRoot(cs);let Ao={comma(e){return Ao.split(e,[","],!0)},space(e){let t=[" ",`
-`," "];return Ao.split(e,t)},split(e,t,n){let r=[],a="",s=!1,o=0,i=!1,u="",l=!1;for(let c of e)l?l=!1:c==="\\"?l=!0:i?c===u&&(i=!1):c==='"'||c==="'"?(i=!0,u=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&t.includes(c)&&(s=!0),s?(a!==""&&r.push(a.trim()),a="",s=!1):a+=c;return(n||a!=="")&&r.push(a.trim()),r}};var aA=Ao;Ao.default=Ao;let sA=Aa,dTe=aA,xu=class extends sA{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return dTe.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};var p0=xu;xu.default=xu;sA.registerRule(xu);let fTe=Rc,pTe=lTe,mTe=Nc,ETe=f0,hTe=zo,UE=p0;const ME={empty:!0,space:!0};function _Te(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let TTe=class{constructor(t){this.input=t,this.root=new hTe,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new ETe;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,a,s,o=!1,i=!1,u=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?l.push(r==="("?")":"]"):r==="{"&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),l.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){i=!0;break}else if(r==="}"){if(u.length>0){for(s=u.length-1,a=u[s];a&&a[0]==="space";)a=u[--s];a&&(n.source.end=this.getPosition(a[3]||a[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),o&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,a;for(let s=n-1;s>=0&&(a=t[s],!(a[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",a[0]==="word"?a[3]+1:a[2])}colon(t){let n=0,r,a,s;for(let[o,i]of t.entries()){if(r=i,a=r[0],a==="("&&(n+=1),a===")"&&(n-=1),n===0&&a===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(t){let n=new mTe;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let a=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=a[2],n.raws.left=a[1],n.raws.right=a[3]}}createTokenizer(){this.tokenizer=pTe(this.input)}decl(t,n){let r=new fTe;this.init(r,t[0][2]);let a=t[t.length-1];for(a[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(a[3]||a[2]||_Te(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let l=t[0][0];if(l===":"||l==="space"||l==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],i;for(;t.length&&(i=t[0][0],!(i!=="space"&&i!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let l=t.length-1;l>=0;l--){if(s=t[l],s[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(t,l);c=this.spacesFromEnd(t)+c,c!==" !important"&&(r.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=t.slice(0),f="";for(let d=l;d>0;d--){let m=c[d][0];if(f.trim().indexOf("!")===0&&m!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=c)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(r.raws.between+=o.map(l=>l[1]).join(""),o=[]),this.raw(r,"value",o.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new UE;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,a=!1,s=null,o=[],i=t[1].startsWith("--"),u=[],l=t;for(;l;){if(r=l[0],u.push(l),r==="("||r==="[")s||(s=l),o.push(r==="("?")":"]");else if(i&&a&&r==="{")s||(s=l),o.push("}");else if(o.length===0)if(r===";")if(a){this.decl(u,i);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(a=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),o.length>0&&this.unclosedBracket(s),n&&a){if(!i)for(;u.length&&(l=u[u.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,i)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,a){let s,o,i=r.length,u="",l=!0,c,f;for(let d=0;dm+E[1],"");t.raws[n]={raw:d,value:u}}t[n]=u}rule(t){t.pop();let n=new UE;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let a=n;aUd(t)),e}let Md={},ds=class iA{constructor(t,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))a=Ud(n);else if(n instanceof iA||n instanceof xE)a=Ud(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=CTe;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{a=s(n,r)}catch(o){this.processed=!0,this.error=o}a&&!a[ITe]&&bTe.rebuild(a)}this.result=new xE(t,a,r),this.helpers={...Md,postcss:Md,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(a){console&&console.error&&console.error(a)}return t}prepareVisitors(){this.listeners={};let t=(n,r,a)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,a])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!PTe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wTe[r])if(typeof n[r]=="object")for(let a in n[r])a==="*"?t(n,r,n[r][a]):t(n,r+"-"+a.toLowerCase(),n[r][a]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t0;){let r=this.visitTick(n);if(ks(r))try{await r}catch(a){let s=n[n.length-1].node;throw this.handleError(a,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let a=t.nodes.map(s=>r(s,this.helpers));await Promise.all(a)}else await r(t,this.helpers)}catch(a){throw this.handleError(a)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return ks(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=RTe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let a=new vTe(n,this.result.root,this.result.opts).generate();return this.result.css=a[0],this.result.map=a[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(ks(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Bn];)t[Bn]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,a]of t){this.result.lastPlugin=r;let s;try{s=a(n,this.helpers)}catch(o){throw this.handleError(o,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ks(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:a}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(a.length>0&&n.visitorIndex{a[Bn]||this.walkSync(a)});else{let a=this.listeners[r];if(a&&this.visitSync(a,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ds.registerPostcss=e=>{Md=e};var uA=ds;ds.default=ds;yTe.registerLazyResult(ds);NTe.registerLazyResult(ds);let LTe=Gg,$Te=Ic,kTe=m0;const UTe=d0;let xd=class{constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let a,s=$Te;this.result=new UTe(this._processor,a,this._opts),this.result.css=n;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let i=new LTe(s,a,this._opts,n);if(i.isMap()){let[u,l]=i.generate();u&&(this.result.css=u),l&&(this.result.map=l)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=kTe;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var MTe=xd;xd.default=xd;let xTe=MTe,FTe=uA,WTe=l0,GTe=zo,So=class{constructor(t=[]){this.version="8.4.31",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return this.plugins.length===0&&typeof n.parser>"u"&&typeof n.stringifier>"u"&&typeof n.syntax>"u"?new xTe(this,t,n):new FTe(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var zTe=So;So.default=So;GTe.registerProcessor(So);WTe.registerProcessor(So);let BTe=Rc,HTe=Ug,jTe=Nc,VTe=f0,KTe=bc,YTe=zo,qTe=p0;function Oo(e,t){if(Array.isArray(e))return e.map(a=>Oo(a));let{inputs:n,...r}=e;if(n){t=[];for(let a of n){let s={...a,__proto__:KTe.prototype};s.map&&(s.map={...s.map,__proto__:HTe.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(a=>Oo(a,t))),r.source){let{inputId:a,...s}=r.source;r.source=s,a!=null&&(r.source.input=t[a])}if(r.type==="root")return new YTe(r);if(r.type==="decl")return new BTe(r);if(r.type==="rule")return new qTe(r);if(r.type==="comment")return new jTe(r);if(r.type==="atrule")return new VTe(r);throw new Error("Unknown node type: "+e.type)}var XTe=Oo;Oo.default=Oo;var WE={};let ZTe=i0,cA=Rc,QTe=uA,JTe=Aa,E0=zTe,ege=Ic,tge=XTe,lA=l0,nge=Jg,dA=Nc,fA=f0,rge=d0,age=bc,sge=m0,oge=aA,pA=p0,mA=zo,ige=vc;function it(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new E0(e)}it.plugin=function(t,n){let r=!1;function a(...o){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
+`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||xi(t.file),a;this.mapOpts.sourcesContent===!1?(a=new Mg(t.text),a.sourcesContent&&(a.sourcesContent=a.sourcesContent.map(()=>null))):a=t.consumer(),this.map.applySourceMap(a,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),q1e&&Y1e&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Mi.fromSourceMap(t)}else this.map=new Mi({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Mi({file:this.outputFile()});let t=1,n=1,r="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(i,u,l)=>{if(this.css+=i,u&&l!=="end"&&(a.generated.line=t,a.generated.column=n-1,u.source&&u.source.start?(a.source=this.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,this.map.addMapping(a)):(a.source=r,a.original.line=1,a.original.column=0,this.map.addMapping(a))),s=i.match(/\n/g),s?(t+=s.length,o=i.lastIndexOf(`
+`),n=i.length-o):n+=i.length,u&&l!=="start"){let c=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==c.last||c.raws.semicolon)&&(u.source&&u.source.end?(a.source=this.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=t,a.generated.column=n-2,this.map.addMapping(a)):(a.source=r,a.original.line=1,a.original.column=0,a.generated.line=t,a.generated.column=n-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?xi(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=xi(Fg(r,this.mapOpts.annotation)));let a=xg(r,t);return this.memoizedPaths.set(t,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new K1e(this.css,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let a=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(a,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(wE){let r=wE(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;Wg==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var Gg=X1e;let Z1e=vc,Ld=class extends Z1e{constructor(t){super(t),this.type="comment"}};var Nc=Ld;Ld.default=Ld;let{isClean:zg,my:Bg}=Go,Hg=Rc,jg=Nc,Q1e=vc,Vg,u0,c0,Kg;function Yg(e){return e.map(t=>(t.nodes&&(t.nodes=Yg(t.nodes)),delete t.source,t))}function qg(e){if(e[zg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)qg(t)}let Ar=class Xg extends Q1e{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let a of r)this.proxyOf.nodes.push(a)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,a;for(;this.indexes[n]t[n](...r.map(a=>typeof a=="function"?(s,o)=>a(s.toProxy(),o):a)):n==="every"||n==="some"?r=>t[n]((a,...s)=>r(a.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),a=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let o of a)this.proxyOf.nodes.splice(r+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],r"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Hg(t)]}else if(t.selector)t=[new u0(t)];else if(t.name)t=[new c0(t)];else if(t.text)t=[new jg(t)];else throw new Error("Unknown node type in node creation");return t.map(a=>(a[Bg]||Xg.rebuild(a),a=a.proxyOf,a.parent&&a.parent.removeChild(a),a[zg]&&qg(a),typeof a.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(a.raws.before=n.raws.before.replace(/\S/g,"")),a.parent=this.proxyOf,a))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let a of r)this.proxyOf.nodes.unshift(a);for(let a in this.indexes)this.indexes[a]=this.indexes[a]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(a=>{n.props&&!n.props.includes(a.prop)||n.fast&&!a.value.includes(n.fast)||(a.value=a.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let a;try{a=t(n,r)}catch(s){throw n.addToError(s)}return a!==!1&&n.walk&&(a=n.walk(t)),a})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,a)}):this.walk((r,a)=>{if(r.type==="atrule"&&r.name===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="atrule")return n(r,a)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,a)}):this.walk((r,a)=>{if(r.type==="decl"&&r.prop===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="decl")return n(r,a)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,a)}):this.walk((r,a)=>{if(r.type==="rule"&&r.selector===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="rule")return n(r,a)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ar.registerParse=e=>{Vg=e};Ar.registerRule=e=>{u0=e};Ar.registerAtRule=e=>{c0=e};Ar.registerRoot=e=>{Kg=e};var Aa=Ar;Ar.default=Ar;Ar.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,c0.prototype):e.type==="rule"?Object.setPrototypeOf(e,u0.prototype):e.type==="decl"?Object.setPrototypeOf(e,Hg.prototype):e.type==="comment"?Object.setPrototypeOf(e,jg.prototype):e.type==="root"&&Object.setPrototypeOf(e,Kg.prototype),e[Bg]=!0,e.nodes&&e.nodes.forEach(t=>{Ar.rebuild(t)})};let J1e=Aa,Zg,Qg,go=class extends J1e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Zg(new Qg,this,t).stringify()}};go.registerLazyResult=e=>{Zg=e};go.registerProcessor=e=>{Qg=e};var l0=go;go.default=go;let $d=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Jg=$d;$d.default=$d;let eTe=Jg,kd=class{constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new eTe(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var d0=kd;kd.default=kd;const fl=39,LE=34,li=92,$E=47,di=10,$s=32,fi=12,pi=9,mi=13,tTe=91,nTe=93,rTe=40,aTe=41,sTe=123,oTe=125,iTe=59,uTe=42,cTe=58,lTe=64,Ei=/[\t\n\f\r "#'()/;[\\\]{}]/g,hi=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,dTe=/.[\r\n"'(/\\]/,kE=/[\da-f]/i;var fTe=function(t,n={}){let r=t.css.valueOf(),a=n.ignoreErrors,s,o,i,u,l,c,f,d,m,E,g=r.length,b=0,v=[],R=[];function A(){return b}function S(U){throw t.error("Unclosed "+U,b)}function C(){return R.length===0&&b>=g}function L(U){if(R.length)return R.pop();if(b>=g)return;let G=U?U.ignoreUnclosed:!1;switch(s=r.charCodeAt(b),s){case di:case $s:case pi:case mi:case fi:{o=b;do o+=1,s=r.charCodeAt(o);while(s===$s||s===di||s===pi||s===mi||s===fi);E=["space",r.slice(b,o)],b=o-1;break}case tTe:case nTe:case sTe:case oTe:case cTe:case iTe:case aTe:{let B=String.fromCharCode(s);E=[B,B,b];break}case rTe:{if(d=v.length?v.pop()[1]:"",m=r.charCodeAt(b+1),d==="url"&&m!==fl&&m!==LE&&m!==$s&&m!==di&&m!==pi&&m!==fi&&m!==mi){o=b;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(a||G){o=b;break}else S("bracket");for(f=o;r.charCodeAt(f-1)===li;)f-=1,c=!c}while(c);E=["brackets",r.slice(b,o+1),b,o],b=o}else o=r.indexOf(")",b+1),u=r.slice(b,o+1),o===-1||dTe.test(u)?E=["(","(",b]:(E=["brackets",u,b,o],b=o);break}case fl:case LE:{i=s===fl?"'":'"',o=b;do{if(c=!1,o=r.indexOf(i,o+1),o===-1)if(a||G){o=b+1;break}else S("string");for(f=o;r.charCodeAt(f-1)===li;)f-=1,c=!c}while(c);E=["string",r.slice(b,o+1),b,o],b=o;break}case lTe:{Ei.lastIndex=b+1,Ei.test(r),Ei.lastIndex===0?o=r.length-1:o=Ei.lastIndex-2,E=["at-word",r.slice(b,o+1),b,o],b=o;break}case li:{for(o=b,l=!0;r.charCodeAt(o+1)===li;)o+=1,l=!l;if(s=r.charCodeAt(o+1),l&&s!==$E&&s!==$s&&s!==di&&s!==pi&&s!==mi&&s!==fi&&(o+=1,kE.test(r.charAt(o)))){for(;kE.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===$s&&(o+=1)}E=["word",r.slice(b,o+1),b,o],b=o;break}default:{s===$E&&r.charCodeAt(b+1)===uTe?(o=r.indexOf("*/",b+2)+1,o===0&&(a||G?o=r.length:S("comment")),E=["comment",r.slice(b,o+1),b,o],b=o):(hi.lastIndex=b+1,hi.test(r),hi.lastIndex===0?o=r.length-1:o=hi.lastIndex-2,E=["word",r.slice(b,o+1),b,o],v.push(E),b=o);break}}return b++,E}function $(U){R.push(U)}return{back:$,endOfFile:C,nextToken:L,position:A}};let eA=Aa,Mu=class extends eA{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var f0=Mu;Mu.default=Mu;eA.registerAtRule(Mu);let tA=Aa,nA,rA,cs=class extends tA{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let a=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of a)s.raws.before=n.raws.before}return a}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new nA(new rA,this,t).stringify()}};cs.registerLazyResult=e=>{nA=e};cs.registerProcessor=e=>{rA=e};var zo=cs;cs.default=cs;tA.registerRoot(cs);let Ao={comma(e){return Ao.split(e,[","],!0)},space(e){let t=[" ",`
+`," "];return Ao.split(e,t)},split(e,t,n){let r=[],a="",s=!1,o=0,i=!1,u="",l=!1;for(let c of e)l?l=!1:c==="\\"?l=!0:i?c===u&&(i=!1):c==='"'||c==="'"?(i=!0,u=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&t.includes(c)&&(s=!0),s?(a!==""&&r.push(a.trim()),a="",s=!1):a+=c;return(n||a!=="")&&r.push(a.trim()),r}};var aA=Ao;Ao.default=Ao;let sA=Aa,pTe=aA,xu=class extends sA{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return pTe.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};var p0=xu;xu.default=xu;sA.registerRule(xu);let mTe=Rc,ETe=fTe,hTe=Nc,_Te=f0,TTe=zo,UE=p0;const ME={empty:!0,space:!0};function gTe(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let ATe=class{constructor(t){this.input=t,this.root=new TTe,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new _Te;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,a,s,o=!1,i=!1,u=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?l.push(r==="("?")":"]"):r==="{"&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),l.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){i=!0;break}else if(r==="}"){if(u.length>0){for(s=u.length-1,a=u[s];a&&a[0]==="space";)a=u[--s];a&&(n.source.end=this.getPosition(a[3]||a[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),o&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,a;for(let s=n-1;s>=0&&(a=t[s],!(a[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",a[0]==="word"?a[3]+1:a[2])}colon(t){let n=0,r,a,s;for(let[o,i]of t.entries()){if(r=i,a=r[0],a==="("&&(n+=1),a===")"&&(n-=1),n===0&&a===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(t){let n=new hTe;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let a=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=a[2],n.raws.left=a[1],n.raws.right=a[3]}}createTokenizer(){this.tokenizer=ETe(this.input)}decl(t,n){let r=new mTe;this.init(r,t[0][2]);let a=t[t.length-1];for(a[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(a[3]||a[2]||gTe(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let l=t[0][0];if(l===":"||l==="space"||l==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],i;for(;t.length&&(i=t[0][0],!(i!=="space"&&i!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let l=t.length-1;l>=0;l--){if(s=t[l],s[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(t,l);c=this.spacesFromEnd(t)+c,c!==" !important"&&(r.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=t.slice(0),f="";for(let d=l;d>0;d--){let m=c[d][0];if(f.trim().indexOf("!")===0&&m!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=c)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(r.raws.between+=o.map(l=>l[1]).join(""),o=[]),this.raw(r,"value",o.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new UE;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,a=!1,s=null,o=[],i=t[1].startsWith("--"),u=[],l=t;for(;l;){if(r=l[0],u.push(l),r==="("||r==="[")s||(s=l),o.push(r==="("?")":"]");else if(i&&a&&r==="{")s||(s=l),o.push("}");else if(o.length===0)if(r===";")if(a){this.decl(u,i);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(a=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),o.length>0&&this.unclosedBracket(s),n&&a){if(!i)for(;u.length&&(l=u[u.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,i)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,a){let s,o,i=r.length,u="",l=!0,c,f;for(let d=0;dm+E[1],"");t.raws[n]={raw:d,value:u}}t[n]=u}rule(t){t.pop();let n=new UE;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let a=n;aUd(t)),e}let Md={},ds=class iA{constructor(t,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))a=Ud(n);else if(n instanceof iA||n instanceof xE)a=Ud(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=DTe;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{a=s(n,r)}catch(o){this.processed=!0,this.error=o}a&&!a[RTe]&&CTe.rebuild(a)}this.result=new xE(t,a,r),this.helpers={...Md,postcss:Md,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(a){console&&console.error&&console.error(a)}return t}prepareVisitors(){this.listeners={};let t=(n,r,a)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,a])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!LTe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!$Te[r])if(typeof n[r]=="object")for(let a in n[r])a==="*"?t(n,r,n[r][a]):t(n,r+"-"+a.toLowerCase(),n[r][a]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t0;){let r=this.visitTick(n);if(ks(r))try{await r}catch(a){let s=n[n.length-1].node;throw this.handleError(a,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let a=t.nodes.map(s=>r(s,this.helpers));await Promise.all(a)}else await r(t,this.helpers)}catch(a){throw this.handleError(a)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return ks(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=NTe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let a=new bTe(n,this.result.root,this.result.opts).generate();return this.result.css=a[0],this.result.map=a[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(ks(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Bn];)t[Bn]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,a]of t){this.result.lastPlugin=r;let s;try{s=a(n,this.helpers)}catch(o){throw this.handleError(o,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ks(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:a}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(a.length>0&&n.visitorIndex{a[Bn]||this.walkSync(a)});else{let a=this.listeners[r];if(a&&this.visitSync(a,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ds.registerPostcss=e=>{Md=e};var uA=ds;ds.default=ds;PTe.registerLazyResult(ds);yTe.registerLazyResult(ds);let kTe=Gg,UTe=Ic,MTe=m0;const xTe=d0;let xd=class{constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let a,s=UTe;this.result=new xTe(this._processor,a,this._opts),this.result.css=n;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let i=new kTe(s,a,this._opts,n);if(i.isMap()){let[u,l]=i.generate();u&&(this.result.css=u),l&&(this.result.map=l)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=MTe;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var FTe=xd;xd.default=xd;let WTe=FTe,GTe=uA,zTe=l0,BTe=zo,So=class{constructor(t=[]){this.version="8.4.31",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return this.plugins.length===0&&typeof n.parser>"u"&&typeof n.stringifier>"u"&&typeof n.syntax>"u"?new WTe(this,t,n):new GTe(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var HTe=So;So.default=So;BTe.registerProcessor(So);zTe.registerProcessor(So);let jTe=Rc,VTe=Ug,KTe=Nc,YTe=f0,qTe=bc,XTe=zo,ZTe=p0;function Oo(e,t){if(Array.isArray(e))return e.map(a=>Oo(a));let{inputs:n,...r}=e;if(n){t=[];for(let a of n){let s={...a,__proto__:qTe.prototype};s.map&&(s.map={...s.map,__proto__:VTe.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(a=>Oo(a,t))),r.source){let{inputId:a,...s}=r.source;r.source=s,a!=null&&(r.source.input=t[a])}if(r.type==="root")return new XTe(r);if(r.type==="decl")return new jTe(r);if(r.type==="rule")return new ZTe(r);if(r.type==="comment")return new KTe(r);if(r.type==="atrule")return new YTe(r);throw new Error("Unknown node type: "+e.type)}var QTe=Oo;Oo.default=Oo;var WE={};let JTe=i0,cA=Rc,ege=uA,tge=Aa,E0=HTe,nge=Ic,rge=QTe,lA=l0,age=Jg,dA=Nc,fA=f0,sge=d0,oge=bc,ige=m0,uge=aA,pA=p0,mA=zo,cge=vc;function it(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new E0(e)}it.plugin=function(t,n){let r=!1;function a(...o){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),WE.LANG&&WE.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
-https://www.w3ctech.com/topic/2226`));let i=n(...o);return i.postcssPlugin=t,i.postcssVersion=new E0().version,i}let s;return Object.defineProperty(a,"postcss",{get(){return s||(s=a()),s}}),a.process=function(o,i,u){return it([a(u)]).process(o,i)},a};it.stringify=ege;it.parse=sge;it.fromJSON=tge;it.list=oge;it.comment=e=>new dA(e);it.atRule=e=>new fA(e);it.decl=e=>new cA(e);it.rule=e=>new pA(e);it.root=e=>new mA(e);it.document=e=>new lA(e);it.CssSyntaxError=ZTe;it.Declaration=cA;it.Container=JTe;it.Processor=E0;it.Document=lA;it.Comment=dA;it.Warning=nge;it.AtRule=fA;it.Result=rge;it.Input=age;it.Rule=pA;it.Root=mA;it.Node=ige;QTe.registerPostcss(it);var uge=it;it.default=it;const cge=ag,GE=s1e,{isPlainObject:lge}=s0,zE=A1e,dge=S1e,{parse:fge}=uge,pge=["img","audio","video","picture","svg","object","map","iframe","embed"],mge=["script","style"];function Ws(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function cr(e,t){return{}.hasOwnProperty.call(e,t)}function BE(e,t){const n=[];return Ws(e,function(r){t(r)&&n.push(r)}),n}function Ege(e){for(const t in e)if(cr(e,t))return!1;return!0}function hge(e){return e.map(function(t){if(!t.url)throw new Error("URL missing");return t.url+(t.w?` ${t.w}w`:"")+(t.h?` ${t.h}h`:"")+(t.d?` ${t.d}x`:"")}).join(", ")}var _ge=Io;const Tge=/^[^\0\t\n\f\r /<=>]+$/;function Io(e,t,n){if(e==null)return"";typeof e=="number"&&(e=e.toString());let r="",a="";function s(P,z){const V=this;this.tag=P,this.attribs=z||{},this.tagPosition=r.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(b.length){const se=b[b.length-1];se.text+=V.text}},this.updateParentNodeMediaChildren=function(){b.length&&pge.includes(this.tag)&&b[b.length-1].mediaChildren.push(this.tag)}}t=Object.assign({},Io.defaults,t),t.parser=Object.assign({},gge,t.parser);const o=function(P){return t.allowedTags===!1||(t.allowedTags||[]).indexOf(P)>-1};mge.forEach(function(P){o(P)&&!t.allowVulnerableTags&&console.warn(`
+https://www.w3ctech.com/topic/2226`));let i=n(...o);return i.postcssPlugin=t,i.postcssVersion=new E0().version,i}let s;return Object.defineProperty(a,"postcss",{get(){return s||(s=a()),s}}),a.process=function(o,i,u){return it([a(u)]).process(o,i)},a};it.stringify=nge;it.parse=ige;it.fromJSON=rge;it.list=uge;it.comment=e=>new dA(e);it.atRule=e=>new fA(e);it.decl=e=>new cA(e);it.rule=e=>new pA(e);it.root=e=>new mA(e);it.document=e=>new lA(e);it.CssSyntaxError=JTe;it.Declaration=cA;it.Container=tge;it.Processor=E0;it.Document=lA;it.Comment=dA;it.Warning=age;it.AtRule=fA;it.Result=sge;it.Input=oge;it.Rule=pA;it.Root=mA;it.Node=cge;ege.registerPostcss(it);var lge=it;it.default=it;const dge=ag,GE=i1e,{isPlainObject:fge}=s0,zE=O1e,pge=I1e,{parse:mge}=lge,Ege=["img","audio","video","picture","svg","object","map","iframe","embed"],hge=["script","style"];function Ws(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function cr(e,t){return{}.hasOwnProperty.call(e,t)}function BE(e,t){const n=[];return Ws(e,function(r){t(r)&&n.push(r)}),n}function _ge(e){for(const t in e)if(cr(e,t))return!1;return!0}function Tge(e){return e.map(function(t){if(!t.url)throw new Error("URL missing");return t.url+(t.w?` ${t.w}w`:"")+(t.h?` ${t.h}h`:"")+(t.d?` ${t.d}x`:"")}).join(", ")}var gge=Io;const Age=/^[^\0\t\n\f\r /<=>]+$/;function Io(e,t,n){if(e==null)return"";typeof e=="number"&&(e=e.toString());let r="",a="";function s(P,z){const V=this;this.tag=P,this.attribs=z||{},this.tagPosition=r.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(b.length){const se=b[b.length-1];se.text+=V.text}},this.updateParentNodeMediaChildren=function(){b.length&&Ege.includes(this.tag)&&b[b.length-1].mediaChildren.push(this.tag)}}t=Object.assign({},Io.defaults,t),t.parser=Object.assign({},Sge,t.parser);const o=function(P){return t.allowedTags===!1||(t.allowedTags||[]).indexOf(P)>-1};hge.forEach(function(P){o(P)&&!t.allowVulnerableTags&&console.warn(`
⚠️ Your \`allowedTags\` option includes, \`${P}\`, which is inherently
vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
Or, to disable this warning, add the \`allowVulnerableTags\` option
and ensure you are accounting for this risk.
-`)});const i=t.nonTextTags||["script","style","textarea","option"];let u,l;t.allowedAttributes&&(u={},l={},Ws(t.allowedAttributes,function(P,z){u[z]=[];const V=[];P.forEach(function(se){typeof se=="string"&&se.indexOf("*")>=0?V.push(GE(se).replace(/\\\*/g,".*")):u[z].push(se)}),V.length&&(l[z]=new RegExp("^("+V.join("|")+")$"))}));const c={},f={},d={};Ws(t.allowedClasses,function(P,z){if(u&&(cr(u,z)||(u[z]=[]),u[z].push("class")),c[z]=P,Array.isArray(P)){const V=[];c[z]=[],d[z]=[],P.forEach(function(se){typeof se=="string"&&se.indexOf("*")>=0?V.push(GE(se).replace(/\\\*/g,".*")):se instanceof RegExp?d[z].push(se):c[z].push(se)}),V.length&&(f[z]=new RegExp("^("+V.join("|")+")$"))}});const m={};let E;Ws(t.transformTags,function(P,z){let V;typeof P=="function"?V=P:typeof P=="string"&&(V=Io.simpleTransform(P)),z==="*"?E=V:m[z]=V});let g,b,v,R,A,S,C=!1;$();const L=new cge.Parser({onopentag:function(P,z){if(t.enforceHtmlBoundary&&P==="html"&&$(),A){S++;return}const V=new s(P,z);b.push(V);let se=!1;const Pe=!!V.text;let We;if(cr(m,P)&&(We=m[P](P,z),V.attribs=z=We.attribs,We.text!==void 0&&(V.innerText=We.text),P!==We.tagName&&(V.name=P=We.tagName,R[g]=We.tagName)),E&&(We=E(P,z),V.attribs=z=We.attribs,P!==We.tagName&&(V.name=P=We.tagName,R[g]=We.tagName)),(!o(P)||t.disallowedTagsMode==="recursiveEscape"&&!Ege(v)||t.nestingLimit!=null&&g>=t.nestingLimit)&&(se=!0,v[g]=!0,t.disallowedTagsMode==="discard"&&i.indexOf(P)!==-1&&(A=!0,S=1),v[g]=!0),g++,se){if(t.disallowedTagsMode==="discard")return;a=r,r=""}r+="<"+P,P==="script"&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(V.innerText=""),(!u||cr(u,P)||u["*"])&&Ws(z,function(Ae,ye){if(!Tge.test(ye)){delete V.attribs[ye];return}if(Ae===""&&(t.nonBooleanAttributes.includes(ye)||t.nonBooleanAttributes.includes("*"))){delete V.attribs[ye];return}let Wt=!1;if(!u||cr(u,P)&&u[P].indexOf(ye)!==-1||u["*"]&&u["*"].indexOf(ye)!==-1||cr(l,P)&&l[P].test(ye)||l["*"]&&l["*"].test(ye))Wt=!0;else if(u&&u[P]){for(const ke of u[P])if(lge(ke)&&ke.name&&ke.name===ye){Wt=!0;let ze="";if(ke.multiple===!0){const rt=Ae.split(" ");for(const X of rt)ke.values.indexOf(X)!==-1&&(ze===""?ze=X:ze+=" "+X)}else ke.values.indexOf(Ae)>=0&&(ze=Ae);Ae=ze}}if(Wt){if(t.allowedSchemesAppliedToAttributes.indexOf(ye)!==-1&&G(P,Ae)){delete V.attribs[ye];return}if(P==="script"&&ye==="src"){let ke=!0;try{const ze=B(Ae);if(t.allowedScriptHostnames||t.allowedScriptDomains){const rt=(t.allowedScriptHostnames||[]).find(function(pe){return pe===ze.url.hostname}),X=(t.allowedScriptDomains||[]).find(function(pe){return ze.url.hostname===pe||ze.url.hostname.endsWith(`.${pe}`)});ke=rt||X}}catch{ke=!1}if(!ke){delete V.attribs[ye];return}}if(P==="iframe"&&ye==="src"){let ke=!0;try{const ze=B(Ae);if(ze.isRelativeUrl)ke=cr(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const rt=(t.allowedIframeHostnames||[]).find(function(pe){return pe===ze.url.hostname}),X=(t.allowedIframeDomains||[]).find(function(pe){return ze.url.hostname===pe||ze.url.hostname.endsWith(`.${pe}`)});ke=rt||X}}catch{ke=!1}if(!ke){delete V.attribs[ye];return}}if(ye==="srcset")try{let ke=dge(Ae);if(ke.forEach(function(ze){G("srcset",ze.url)&&(ze.evil=!0)}),ke=BE(ke,function(ze){return!ze.evil}),ke.length)Ae=hge(BE(ke,function(ze){return!ze.evil})),V.attribs[ye]=Ae;else{delete V.attribs[ye];return}}catch{delete V.attribs[ye];return}if(ye==="class"){const ke=c[P],ze=c["*"],rt=f[P],X=d[P],pe=f["*"],le=[rt,pe].concat(X).filter(function(Se){return Se});if(ke&&ze?Ae=re(Ae,zE(ke,ze),le):Ae=re(Ae,ke||ze,le),!Ae.length){delete V.attribs[ye];return}}if(ye==="style"){if(t.parseStyleAttributes)try{const ke=fge(P+" {"+Ae+"}"),ze=w(ke,t.allowedStyles);if(Ae=Z(ze),Ae.length===0){delete V.attribs[ye];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+P+" {"+Ae+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete V.attribs[ye];return}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}r+=" "+ye,Ae&&Ae.length&&(r+='="'+U(Ae,!0)+'"')}else delete V.attribs[ye]}),t.selfClosing.indexOf(P)!==-1?r+=" />":(r+=">",V.innerText&&!Pe&&!t.textFilter&&(r+=U(V.innerText),C=!0)),se&&(r=a+U(r),a="")},ontext:function(P){if(A)return;const z=b[b.length-1];let V;if(z&&(V=z.tag,P=z.innerText!==void 0?z.innerText:P),t.disallowedTagsMode==="discard"&&(V==="script"||V==="style"))r+=P;else{const se=U(P,!1);t.textFilter&&!C?r+=t.textFilter(se,V):C||(r+=se)}if(b.length){const se=b[b.length-1];se.text+=P}},onclosetag:function(P,z){if(A)if(S--,!S)A=!1;else return;const V=b.pop();if(!V)return;if(V.tag!==P){b.push(V);return}A=t.enforceHtmlBoundary?P==="html":!1,g--;const se=v[g];if(se){if(delete v[g],t.disallowedTagsMode==="discard"){V.updateParentNodeText();return}a=r,r=""}if(R[g]&&(P=R[g],delete R[g]),t.exclusiveFilter&&t.exclusiveFilter(V)){r=r.substr(0,V.tagPosition);return}if(V.updateParentNodeMediaChildren(),V.updateParentNodeText(),t.selfClosing.indexOf(P)!==-1||z&&!o(P)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0){se&&(r=a,a="");return}r+=""+P+">",se&&(r=a+U(r),a=""),C=!1}},t.parser);return L.write(e),L.end(),r;function $(){r="",g=0,b=[],v={},R={},A=!1,S=0}function U(P,z){return typeof P!="string"&&(P=P+""),t.parser.decodeEntities&&(P=P.replace(/&/g,"&").replace(//g,">"),z&&(P=P.replace(/"/g,"""))),P=P.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),z&&(P=P.replace(/"/g,""")),P}function G(P,z){for(z=z.replace(/[\x00-\x20]+/g,"");;){const Pe=z.indexOf("",Pe+4);if(We===-1)break;z=z.substring(0,Pe)+z.substring(We+3)}const V=z.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!V)return z.match(/^[/\\]{2}/)?!t.allowProtocolRelative:!1;const se=V[1].toLowerCase();return cr(t.allowedSchemesByTag,P)?t.allowedSchemesByTag[P].indexOf(se)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(se)===-1}function B(P){if(P=P.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),P.startsWith("relative:"))throw new Error("relative: exploit attempt");let z="relative://relative-site";for(let Pe=0;Pe<100;Pe++)z+=`/${Pe}`;const V=new URL(P,z);return{isRelativeUrl:V&&V.hostname==="relative-site"&&V.protocol==="relative:",url:V}}function w(P,z){if(!z)return P;const V=P.nodes[0];let se;return z[V.selector]&&z["*"]?se=zE(z[V.selector],z["*"]):se=z[V.selector]||z["*"],se&&(P.nodes[0].nodes=V.nodes.reduce(J(se),[])),P}function Z(P){return P.nodes[0].nodes.reduce(function(z,V){return z.push(`${V.prop}:${V.value}${V.important?" !important":""}`),z},[]).join(";")}function J(P){return function(z,V){return cr(P,V.prop)&&P[V.prop].some(function(Pe){return Pe.test(V.value)})&&z.push(V),z}}function re(P,z,V){return z?(P=P.split(/\s+/),P.filter(function(se){return z.indexOf(se)!==-1||V.some(function(Pe){return Pe.test(se)})}).join(" ")):P}}const gge={decodeEntities:!0};Io.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0};Io.simpleTransform=function(e,t,n){return n=n===void 0?!0:n,t=t||{},function(r,a){let s;if(n)for(s in t)a[s]=t[s];else a=t;return{tagName:e,attribs:a}}};const Age=qd(_ge),vo=e=>Age(qhe(e,{target:"_blank"}),{allowedTags:["a"],disallowedTagsMode:"escape"}),Sge=e=>(ut("data-v-a720b26e"),e=e(),ct(),e),Oge={id:"admin-app",class:"admin-card"},Ige={for:"admin_contact"},vge=["value"],Rge=["disabled"],bge={for:"max_users"},Nge=["disabled"],Cge={class:"user-limit-help"},yge={class:"info-box"},Dge=Sge(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),Pge={for:"max_single_file_size"},wge=["disabled"],Lge={for:"max_zip_file_size"},$ge=["disabled"],kge={for:"gpx_limit_import"},Uge=["disabled"],Mge={class:"about-label",for:"about"},xge={class:"textarea-description"},Fge=["innerHTML"],Wge={class:"privacy-policy-label",for:"privacy_policy"},Gge={class:"textarea-description"},zge=["innerHTML"],Bge={key:5,class:"form-buttons"},Hge={class:"confirm",type:"submit"},jge={key:6,class:"form-buttons"},Vge=Q({__name:"AdminApplication",props:{appConfig:{},edition:{type:Boolean,default:!1}},setup(e){const t=e,{edition:n}=_e(t),r=$e(),a=Zr(),s=xt({admin_contact:"",max_users:0,max_single_file_size:0,max_zip_file_size:0,gpx_limit_import:0,about:"",privacy_policy:""}),o=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]);It(()=>{t.appConfig&&i(t.appConfig)});function i(c){Object.keys(s).map(f=>{["max_single_file_size","max_zip_file_size"].includes(f)?s[f]=The(c[f]):["about","privacy_policy"].includes(f)?s[f]=c[f]!==null?c[f]:"":s[f]=c[f]})}function u(){i(t.appConfig),r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),a.push("/admin/application")}function l(){const c=Object.assign({},s);c.max_single_file_size*=1048576,c.max_zip_file_size*=1048576,r.dispatch(H.ACTIONS.UPDATE_APPLICATION_CONFIG,c)}return(c,f)=>{const d=ue("ErrorMessage"),m=ue("Card");return T(),N("div",Oge,[M(m,null,{title:fe(()=>[K(_(c.$t("admin.APP_CONFIG.TITLE")),1)]),content:fe(()=>[p("form",{class:"admin-form",onSubmit:Xe(l,["prevent"])},[p("label",Ige,[K(_(c.$t("admin.APP_CONFIG.ADMIN_CONTACT"))+": ",1),!h(n)&&!s.admin_contact?(T(),N("input",{key:0,class:"no-contact",value:c.$t("admin.APP_CONFIG.NO_CONTACT_EMAIL"),disabled:""},null,8,vge)):Ke((T(),N("input",{key:1,id:"admin_contact",name:"admin_contact",type:"email","onUpdate:modelValue":f[0]||(f[0]=E=>s.admin_contact=E),disabled:!h(n)},null,8,Rge)),[[tt,s.admin_contact]])]),p("label",bge,[K(_(c.$t("admin.APP_CONFIG.MAX_USERS_LABEL"))+": ",1),Ke(p("input",{id:"max_users",name:"max_users",type:"number",min:"0","onUpdate:modelValue":f[1]||(f[1]=E=>s.max_users=E),disabled:!h(n)},null,8,Nge),[[tt,s.max_users]])]),p("div",Cge,[p("span",yge,[Dge,K(" "+_(c.$t("admin.APP_CONFIG.MAX_USERS_HELP")),1)])]),p("label",Pge,[K(_(c.$t("admin.APP_CONFIG.SINGLE_UPLOAD_MAX_SIZE_LABEL"))+": ",1),Ke(p("input",{id:"max_single_file_size",name:"max_single_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[2]||(f[2]=E=>s.max_single_file_size=E),disabled:!h(n)},null,8,wge),[[tt,s.max_single_file_size]])]),p("label",Lge,[K(_(c.$t("admin.APP_CONFIG.ZIP_UPLOAD_MAX_SIZE_LABEL"))+": ",1),Ke(p("input",{id:"max_zip_file_size",name:"max_zip_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[3]||(f[3]=E=>s.max_zip_file_size=E),disabled:!h(n)},null,8,$ge),[[tt,s.max_zip_file_size]])]),p("label",kge,[K(_(c.$t("admin.APP_CONFIG.MAX_FILES_IN_ZIP_LABEL"))+": ",1),Ke(p("input",{id:"gpx_limit_import",name:"gpx_limit_import",type:"number",min:"0","onUpdate:modelValue":f[4]||(f[4]=E=>s.gpx_limit_import=E),disabled:!h(n)},null,8,Uge),[[tt,s.gpx_limit_import]])]),p("label",Mge,_(c.$t("admin.ABOUT.TEXT"))+": ",1),p("span",xge,_(c.$t("admin.ABOUT.DESCRIPTION")),1),h(n)?Ke((T(),N("textarea",{key:0,id:"about",name:"about",rows:"10","onUpdate:modelValue":f[5]||(f[5]=E=>s.about=E)},null,512)),[[tt,s.about]]):(T(),N("div",{key:1,innerHTML:h(ma)(h(vo)(s.about?s.about:c.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,Fge)),p("label",Wge,_(St(c.$t("privacy_policy.TITLE")))+": ",1),p("span",Gge,_(c.$t("admin.PRIVACY_POLICY_DESCRIPTION")),1),h(n)?Ke((T(),N("textarea",{key:2,id:"privacy_policy",name:"privacy_policy",rows:"20","onUpdate:modelValue":f[6]||(f[6]=E=>s.privacy_policy=E)},null,512)),[[tt,s.privacy_policy]]):(T(),N("div",{key:3,innerHTML:h(ma)(h(vo)(s.privacy_policy?s.privacy_policy:c.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,zge)),o.value?(T(),te(d,{key:4,message:o.value},null,8,["message"])):F("",!0),h(n)?(T(),N("div",Bge,[p("button",Hge,_(c.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:Xe(u,["prevent"])},_(c.$t("buttons.CANCEL")),1)])):(T(),N("div",jge,[p("button",{class:"confirm",onClick:f[7]||(f[7]=Xe(E=>c.$router.push("/admin/application/edit"),["prevent"]))},_(c.$t("buttons.EDIT")),1),p("button",{class:"cancel",onClick:f[8]||(f[8]=Xe(E=>c.$router.push("/admin"),["prevent"]))},_(c.$t("admin.BACK_TO_ADMIN")),1)]))],32)]),_:1})])}}}),HE=ae(Vge,[["__scopeId","data-v-a720b26e"]]),Kge={class:"stat-card"},Yge={class:"stat-content box"},qge={class:"stat-icon"},Xge={class:"stat-details"},Zge={class:"stat-huge"},Qge={class:"stat"},pr=Q({__name:"StatCard",props:{icon:{},text:{},value:{}},setup(e){const t=e,{icon:n,text:r,value:a}=_e(t);return(s,o)=>(T(),N("div",Kge,[p("div",Yge,[p("div",qge,[p("i",{class:ge(["fa",`fa-${h(n)}`])},null,2)]),p("div",Xge,[p("div",Zge,_(h(a)),1),p("div",Qge,_(h(r)),1)])])]))}}),Jge={id:"user-stats"},eAe=Q({__name:"AppStatsCards",props:{appStatistics:{}},setup(e){const t=e,{appStatistics:n}=_e(t),r=k(()=>qT(n.value.uploads_dir_size));return(a,s)=>(T(),N("div",Jge,[M(pr,{icon:"users",value:h(n).users,text:a.$t("admin.USER",h(n).users)},null,8,["value","text"]),M(pr,{icon:"tags",value:h(n).sports,text:a.$t("workouts.SPORT",h(n).sports)},null,8,["value","text"]),M(pr,{icon:"calendar",value:h(n).workouts,text:a.$t("workouts.WORKOUT",h(n).workouts)},null,8,["value","text"]),M(pr,{icon:"folder-open",value:r.value.size,text:r.value.suffix},null,8,["value","text"])]))}}),EA=e=>(ut("data-v-efcd2677"),e=e(),ct(),e),tAe={id:"admin-menu",class:"center-card"},nAe={class:"admin-menu description-list"},rAe={class:"application-config-details"},aAe=EA(()=>p("br",null,null,-1)),sAe={class:"registration-status"},oAe={key:0,class:"email-sending-status"},iAe=EA(()=>p("i",{class:"fa fa-exclamation-triangle","aria-hidden":"true"},null,-1)),uAe=Q({__name:"AdminMenu",props:{appConfig:{},appStatistics:{default:()=>({})}},setup(e){const t=e,{appConfig:n,appStatistics:r}=_e(t);return gt(()=>{const a=document.getElementById("adminLink");a&&a.focus()}),(a,s)=>{const o=ue("router-link");return T(),N("div",tAe,[M(xT,null,{title:fe(()=>[K(_(a.$t("admin.ADMINISTRATION")),1)]),content:fe(()=>[M(eAe,{appStatistics:h(r)},null,8,["appStatistics"]),p("div",nAe,[p("dl",null,[p("dt",null,[M(o,{id:"adminLink",to:"/admin/application"},{default:fe(()=>[K(_(a.$t("admin.APPLICATION")),1)]),_:1})]),p("dd",rAe,[K(_(a.$t("admin.UPDATE_APPLICATION_DESCRIPTION")),1),aAe,p("span",sAe,_(a.$t(`admin.REGISTRATION_${h(n).is_registration_enabled?"ENABLED":"DISABLED"}`)),1),h(n).is_email_sending_enabled?F("",!0):(T(),N("span",oAe,[iAe,K(" "+_(a.$t("admin.EMAIL_SENDING_DISABLED")),1)]))]),p("dt",null,[M(o,{to:"/admin/sports"},{default:fe(()=>[K(_(St(a.$t("workouts.SPORT",0))),1)]),_:1})]),p("dd",null,_(a.$t("admin.ENABLE_DISABLE_SPORTS")),1),p("dt",null,[M(o,{to:"/admin/users"},{default:fe(()=>[K(_(St(a.$t("admin.USER",0))),1)]),_:1})]),p("dd",null,_(a.$t("admin.ADMIN_RIGHTS_DELETE_USER_ACCOUNT")),1)])])]),_:1})])}}}),cAe=ae(uAe,[["__scopeId","data-v-efcd2677"]]),h0={"Cycling (Sport)":"#4c9792","Cycling (Trekking)":"#a8af88","Cycling (Transport)":"#88af98","Cycling (Virtual)":"#64a360",Hiking:"#bb757c","Mountain Biking":"#d4b371","Mountain Biking (Electric)":"#fc9d6f",Mountaineering:"#48b3b7","Open Water Swimming":"#4058a4",Paragliding:"#c23c50",Rowing:"#fcce72",Running:"#835b83","Skiing (Alpine)":"#67a4bd","Skiing (Cross Country)":"#9498d0",Snowshoes:"#5780a8",Trail:"#09a98a",Walking:"#838383"},lAe=e=>{const t={};return e.map(n=>t[n.id]=n.color?n.color:h0[n.label]),t},dAe=(e,t)=>{const n=e.translatedLabel.toLowerCase(),r=t.translatedLabel.toLowerCase();return n>r?1:ne.filter(a=>n==="all"?!0:r.includes(a.id)||a[n]).map(a=>({...a,translatedLabel:t(`sports.${a.label}.LABEL`)})).sort(dAe),_0=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.label)[0],T0=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.color)[0],Cc=e=>(ut("data-v-203d96b8"),e=e(),ct(),e),fAe={id:"admin-sports",class:"admin-card"},pAe={class:"responsive-table"},mAe=Cc(()=>p("th",null,"#",-1)),EAe={class:"text-left"},hAe={class:"text-left sport-action"},_Ae=Cc(()=>p("th",null,null,-1)),TAe={class:"text-center"},gAe=Cc(()=>p("span",{class:"cell-heading"},"id",-1)),AAe={class:"cell-heading"},SAe={class:"sport-label"},OAe={class:"cell-heading"},IAe={class:"text-center"},vAe={class:"cell-heading"},RAe={class:"sport-action"},bAe={class:"cell-heading"},NAe={class:"action-button"},CAe=["onClick"],yAe={key:0,class:"has-workouts"},DAe=Cc(()=>p("i",{class:"fa fa-warning","aria-hidden":"true"},null,-1)),PAe=Q({__name:"AdminSports",setup(e){const{t}=jt(),n=$e(),r=k(()=>Jr(n.getters[$t.GETTERS.SPORTS],t)),a=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);function s(o,i){n.dispatch($t.ACTIONS.UPDATE_SPORTS,{id:o,isActive:i})}return(o,i)=>{const u=ue("SportImage"),l=ue("ErrorMessage"),c=ue("Card");return T(),N("div",fAe,[M(c,null,{title:fe(()=>[K(_(o.$t("admin.SPORTS.TITLE")),1)]),content:fe(()=>[p("button",{class:"top-button",onClick:i[0]||(i[0]=Xe(f=>o.$router.push("/admin"),["prevent"]))},_(o.$t("admin.BACK_TO_ADMIN")),1),p("div",pAe,[p("table",null,[p("thead",null,[p("tr",null,[mAe,p("th",null,_(o.$t("admin.SPORTS.TABLE.IMAGE")),1),p("th",EAe,_(o.$t("admin.SPORTS.TABLE.LABEL")),1),p("th",null,_(o.$t("admin.SPORTS.TABLE.ACTIVE")),1),p("th",hAe,_(o.$t("admin.ACTION")),1),_Ae])]),p("tbody",null,[(T(!0),N(Ie,null,xe(r.value,f=>(T(),N("tr",{key:f.id},[p("td",TAe,[gAe,K(" "+_(f.id),1)]),p("td",null,[p("span",AAe,_(o.$t("admin.SPORTS.TABLE.IMAGE")),1),M(u,{title:f.translatedLabel,"sport-label":f.label,color:f.color},null,8,["title","sport-label","color"])]),p("td",SAe,[p("span",OAe,_(o.$t("admin.SPORTS.TABLE.LABEL")),1),K(" "+_(f.translatedLabel),1)]),p("td",IAe,[p("span",vAe,_(o.$t("admin.SPORTS.TABLE.ACTIVE")),1),p("i",{class:ge(`fa fa${f.is_active?"-check":""}`),"aria-hidden":"true"},null,2)]),p("td",RAe,[p("span",bAe,_(o.$t("admin.ACTION")),1),p("div",NAe,[p("button",{class:ge({danger:f.is_active}),onClick:d=>s(f.id,!f.is_active)},_(o.$t(`buttons.${f.is_active?"DIS":"EN"}ABLE`)),11,CAe),f.has_workouts?(T(),N("span",yAe,[DAe,K(" "+_(o.$t("admin.SPORTS.TABLE.HAS_WORKOUTS")),1)])):F("",!0)])])]))),128))])]),a.value?(T(),te(l,{key:0,message:a.value},null,8,["message"])):F("",!0),p("button",{onClick:i[1]||(i[1]=Xe(f=>o.$router.push("/admin"),["prevent"]))},_(o.$t("admin.BACK_TO_ADMIN")),1)])]),_:1})])}}}),wAe=ae(PAe,[["__scopeId","data-v-203d96b8"]]),LAe={class:"table-selects"},$Ae=["value"],kAe=["value"],UAe=["value"],MAe=["value"],xAe=["value"],FAe=["value"],WAe=Q({__name:"FilterSelects",props:{order_by:{},query:{},sort:{},message:{}},emits:["updateSelect"],setup(e,{emit:t}){const n=e,r=t,{order_by:a,query:s,sort:o,message:i}=_e(n),u=[10,25,50,100];function l(c){r("updateSelect",c.target.id,c.target.value)}return(c,f)=>(T(),N("div",LAe,[p("label",null,[K(_(c.$t("common.SELECTS.ORDER_BY.LABEL"))+": ",1),p("select",{name:"order_by",id:"order_by",value:h(s).order_by,onChange:l},[(T(!0),N(Ie,null,xe(h(a),d=>(T(),N("option",{value:d,key:d},_(c.$t(`${h(i)}.${d.toUpperCase()}`)),9,kAe))),128))],40,$Ae)]),p("label",null,[K(_(c.$t("common.SELECTS.ORDER.LABEL"))+": ",1),p("select",{name:"order",id:"order",value:h(s).order,onChange:l},[(T(!0),N(Ie,null,xe(h(o),d=>(T(),N("option",{value:d,key:d},_(c.$t(`common.SELECTS.ORDER.${d.toUpperCase()}`)),9,MAe))),128))],40,UAe)]),p("label",null,[K(_(c.$t("common.SELECTS.PER_PAGE.LABEL"))+": ",1),p("select",{name:"per_page",id:"per_page",value:h(s).per_page,onChange:l},[(T(),N(Ie,null,xe(u,d=>p("option",{value:d,key:d},_(d),9,FAe)),64))],40,xAe)])]))}}),hA=ae(WAe,[["__scopeId","data-v-fc86ab3c"]]),g0=["asc","desc"],_A=1,GAe=10,Fd=(e,t)=>e&&typeof e=="string"&&+e>0?+e:t,jE=(e,t,n)=>e&&typeof e=="string"&&t.includes(e)?e:n,Wd=(e,t,n,r)=>{const s=(r||{}).defaultSort||"asc",o={};return o.page=Fd(e.page,_A),o.per_page=Fd(e.per_page,GAe),o.order=jE(e.order,g0,s),o.order_by=jE(e.order_by,t,n),typeof e.q=="string"?o.q=e.q:delete o.q,o},zAe=["from","to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","distance_from","distance_to","duration_from","duration_to","sport_id","title"],Pa=(e,t=1)=>Array.from({length:e-t+1},(n,r)=>t+r),BAe=(e,t)=>{if(e<0)return[];if(e<9)return Pa(e);let n=[1,2];return t<4?n=n.concat([3,4,5]):t<6?n=n.concat(Pa(t+2,3)):(n=n.concat(["..."]),t=e-2&&+n[n.length-1](ut("data-v-69dd9739"),e=e(),ct(),e),HAe={class:"pagination-center","aria-label":"navigation"},jAe={class:"pagination"},VAe=TA(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),KAe={key:0},YAe=TA(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),qAe=Q({__name:"Pagination",props:{pagination:{},path:{},query:{}},setup(e){const t=e,{pagination:n,path:r,query:a}=_e(t);function s(o,i){const u=Object.assign({},a.value);return u.page=i?o+i:o,u}return(o,i)=>{const u=ue("router-link");return T(),N("nav",HAe,[p("ul",jAe,[p("li",{class:ge(["page-prev",{disabled:!h(n).has_prev}])},[M(u,{class:"page-link",to:{path:h(r),query:s(h(n).page,-1)},disabled:!h(n).has_prev,tabindex:h(n).has_prev?0:-1},{default:fe(({navigate:l})=>[Va(o.$slots,"default",{onClick:c=>h(n).has_next?l:null},()=>[K(_(o.$t("api.PAGINATION.PREVIOUS"))+" ",1),VAe],!0)]),_:3},8,["to","disabled","tabindex"])],2),(T(!0),N(Ie,null,xe(h(BAe)(h(n).pages,h(n).page),l=>(T(),N("li",{key:l,class:ge(["page",{active:l===h(n).page}])},[l==="..."?(T(),N("span",KAe," ... ")):(T(),te(u,{key:1,class:"page-link",to:{path:h(r),query:s(+l)}},{default:fe(()=>[K(_(l),1)]),_:2},1032,["to"]))],2))),128)),p("li",{class:ge(["page-next",{disabled:!h(n).has_next}])},[M(u,{class:"page-link",to:{path:h(r),query:s(h(n).page,1)},disabled:!h(n).has_next,tabindex:h(n).has_next?0:-1},{default:fe(({navigate:l})=>[Va(o.$slots,"default",{onClick:c=>h(n).has_next?l:null},()=>[K(_(o.$t("api.PAGINATION.NEXT"))+" ",1),YAe],!0)]),_:3},8,["to","disabled","tabindex"])],2)])])}}}),Wu=ae(qAe,[["__scopeId","data-v-69dd9739"]]),XAe={class:"users-filters"},ZAe={class:"search-username"},QAe=["placeholder"],JAe=Q({__name:"UsersNameFilter",emits:["filterOnUsername"],setup(e,{emit:t}){const n=Vt(),r=ce(n.query.q?n.query.q:""),a=t;function s(){r.value!==""&&a("filterOnUsername",r)}function o(){r.value="",a("filterOnUsername",r.value)}return(i,u)=>(T(),N("div",XAe,[p("div",ZAe,[Ke(p("input",{id:"username",name:"username","onUpdate:modelValue":u[0]||(u[0]=l=>r.value=l),onKeyup:At(s,["enter"]),placeholder:i.$t("user.FILTER_ON_USERNAME")},null,40,QAe),[[tt,r.value,void 0,{trim:!0}]]),r.value!==""?(T(),N("i",{key:0,class:"fa fa-times","aria-hidden":"true",onClick:o})):F("",!0)]),p("i",{class:ge(["fa fa-search",{"fa-disabled":r.value===""}]),"aria-hidden":"true",onClick:s},null,2)]))}}),eSe=ae(JAe,[["__scopeId","data-v-553040c7"]]);var Gd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){if(r===null||r===!0||r===!1)return NaN;var a=Number(r);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}e.exports=t.default})(Gd,Gd.exports);var tSe=Gd.exports;const nSe=qd(tSe);var zd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){var a=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return a.setUTCFullYear(r.getFullYear()),r.getTime()-a.getTime()}e.exports=t.default})(zd,zd.exports);var rSe=zd.exports;const VE=qd(rSe);function aSe(e,t){var n=uSe(t);return n.formatToParts?oSe(n,e):iSe(n,e)}var sSe={year:0,month:1,day:2,hour:3,minute:4,second:5};function oSe(e,t){try{for(var n=e.formatToParts(t),r=[],a=0;a=0&&(r[s]=parseInt(n[a].value,10))}return r}catch(o){if(o instanceof RangeError)return[NaN];throw o}}function iSe(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var pl={};function uSe(e){if(!pl[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";pl[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return pl[e]}function gA(e,t,n,r,a,s,o){var i=new Date(0);return i.setUTCFullYear(e,t,n),i.setUTCHours(r,a,s,o),i}var KE=36e5,cSe=6e4,ml={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function AA(e,t,n){var r,a;if(!e||(r=ml.timezoneZ.exec(e),r))return 0;var s;if(r=ml.timezoneHH.exec(e),r)return s=parseInt(r[1],10),YE(s)?-(s*KE):NaN;if(r=ml.timezoneHHMM.exec(e),r){s=parseInt(r[1],10);var o=parseInt(r[2],10);return YE(s,o)?(a=Math.abs(s)*KE+o*cSe,s>0?-a:a):NaN}if(fSe(e)){t=new Date(t||Date.now());var i=n?t:lSe(t),u=Bd(i,e),l=n?u:dSe(t,u,e);return-l}return NaN}function lSe(e){return gA(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Bd(e,t){var n=aSe(e,t),r=gA(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),a=e.getTime(),s=a%1e3;return a-=s>=0?s:1e3+s,r-a}function dSe(e,t,n){var r=e.getTime(),a=r-t,s=Bd(new Date(a),n);if(t===s)return t;a-=s-t;var o=Bd(new Date(a),n);return s===o?s:Math.max(s,o)}function YE(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var qE={};function fSe(e){if(qE[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),qE[e]=!0,!0}catch{return!1}}var pSe=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,El=36e5,XE=6e4,mSe=2,Qt={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:pSe};function ESe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},r=n.additionalDigits==null?mSe:nSe(n.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=hSe(e),s=_Se(a.date,r),o=s.year,i=s.restDateString,u=TSe(i,o);if(isNaN(u))return new Date(NaN);if(u){var l=u.getTime(),c=0,f;if(a.time&&(c=gSe(a.time),isNaN(c)))return new Date(NaN);if(a.timeZone||n.timeZone){if(f=AA(a.timeZone||n.timeZone,new Date(l+c)),isNaN(f))return new Date(NaN)}else f=VE(new Date(l+c)),f=VE(new Date(l+c+f));return new Date(l+c+f)}else return new Date(NaN)}function hSe(e){var t={},n=Qt.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=Qt.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){var a=Qt.timeZone.exec(r);a?(t.time=r.replace(a[1],""),t.timeZone=a[1].trim()):t.time=r}return t}function _Se(e,t){var n=Qt.YYY[t],r=Qt.YYYYY[t],a;if(a=Qt.YYYY.exec(e)||r.exec(e),a){var s=a[1];return{year:parseInt(s,10),restDateString:e.slice(s.length)}}if(a=Qt.YY.exec(e)||n.exec(e),a){var o=a[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}return{year:null}}function TSe(e,t){if(t===null)return null;var n,r,a,s;if(e.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(n=Qt.MM.exec(e),n)return r=new Date(0),a=parseInt(n[1],10)-1,QE(t,a)?(r.setUTCFullYear(t,a),r):new Date(NaN);if(n=Qt.DDD.exec(e),n){r=new Date(0);var o=parseInt(n[1],10);return OSe(t,o)?(r.setUTCFullYear(t,0,o),r):new Date(NaN)}if(n=Qt.MMDD.exec(e),n){r=new Date(0),a=parseInt(n[1],10)-1;var i=parseInt(n[2],10);return QE(t,a,i)?(r.setUTCFullYear(t,a,i),r):new Date(NaN)}if(n=Qt.Www.exec(e),n)return s=parseInt(n[1],10)-1,JE(t,s)?ZE(t,s):new Date(NaN);if(n=Qt.WwwD.exec(e),n){s=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return JE(t,s,u)?ZE(t,s,u):new Date(NaN)}return null}function gSe(e){var t,n,r;if(t=Qt.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),hl(n)?n%24*El:NaN;if(t=Qt.HHMM.exec(e),t)return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),hl(n,r)?n%24*El+r*XE:NaN;if(t=Qt.HHMMSS.exec(e),t){n=parseInt(t[1],10),r=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return hl(n,r,a)?n%24*El+r*XE+a*1e3:NaN}return null}function ZE(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var a=r.getUTCDay()||7,s=t*7+n+1-a;return r.setUTCDate(r.getUTCDate()+s),r}var ASe=[31,28,31,30,31,30,31,31,30,31,30,31],SSe=[31,29,31,30,31,30,31,31,30,31,30,31];function SA(e){return e%400===0||e%4===0&&e%100!==0}function QE(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var r=SA(e);if(r&&n>SSe[t]||!r&&n>ASe[t])return!1}return!0}function OSe(e,t){if(t<1)return!1;var n=SA(e);return!(n&&t>366||!n&&t>365)}function JE(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function hl(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function ISe(e,t,n){var r=ESe(e,n),a=AA(t,r,!0),s=new Date(r.getTime()-a),o=new Date(0);return o.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),o.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),o}const{locale:Gu}=ga.global,vSe=(e,t,n)=>{switch(e){case"week":return lc(t,{weekStartsOn:n?1:0});case"year":return Lf(t);case"month":return Uo(t);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},RSe=(e,t)=>{switch(e){case"week":return $o(t,7);case"year":return Qi(t,1);case"month":return Za(t,1);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},yc=(e,t)=>ISe(new Date(e),t),eh=(e,t)=>{const n=Uo(e),r=ko(e),a=t?1:0;return{start:lc(n,{weekStartsOn:a}),end:$f(r,{weekStartsOn:a})}},OA=(e,t=null,n=null)=>(t||(t="yyyy/MM/dd"),t=Sa(t,Gu.value),n||(n="HH:mm"),{workout_date:ln(e,t,{locale:Mo[Gu.value]}),workout_time:ln(e,n)}),bSe=["MM/dd/yyyy","dd/MM/yyyy","yyyy-MM-dd","date_string"],IA={de:"do MMM yyyy",en:"MMM. do, yyyy",es:"d MMM yyyy",fr:"d MMM yyyy",gl:"d MMM yyyy",it:"d MMM yyyy",pl:"d MMM yyyy",nb:"do MMM yyyy",nl:"d MMM yyyy"},Sa=(e,t)=>e==="date_string"?IA[t]:e,xn=(e,t,n,r=!0,a=null,s=!1)=>{a||(a=Gu.value);const o=r?s?" HH:mm:ss":" HH:mm":"";return ln(yc(e,t),`${Sa(n,a)}${o}`,{locale:Mo[a]})},NSe=(e,t,n=null)=>{const r=n||Gu.value,a=[];return bSe.map(s=>{const o=Sa(s,r);a.push({label:`${o} - ${xn(e,t,o,!1,r)}`,value:s})}),a},CSe=e=>(ut("data-v-4beb3bfa"),e=e(),ct(),e),ySe={id:"admin-users",class:"admin-card"},DSe={key:0,class:"no-users"},PSe={key:1,class:"responsive-table"},wSe=CSe(()=>p("th",null,"#",-1)),LSe={class:"left-text"},$Se={class:"left-text"},kSe={class:"left-text"},USe={class:"cell-heading"},MSe={class:"cell-heading"},xSe={class:"cell-heading"},FSe={class:"cell-heading"},WSe={class:"text-center"},GSe={class:"cell-heading"},zSe={class:"text-center"},BSe={class:"cell-heading"},HSe={class:"text-center"},jSe={class:"cell-heading"},VSe={class:"text-center"},KSe={class:"cell-heading"},YSe=["disabled","onClick"],th="created_at",qSe=Q({__name:"AdminUsers",setup(e){const t=$e(),n=Vt(),r=Zr(),a=["is_active","admin","created_at","username","workouts_count"];let s=xt(Wd(n.query,a,th));const o=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),i=k(()=>t.getters[Ce.GETTERS.USERS]),u=k(()=>t.getters[Ce.GETTERS.USERS_PAGINATION]),l=k(()=>t.getters[H.GETTERS.ERROR_MESSAGES]);It(()=>c(s));function c(E){t.dispatch(Ce.ACTIONS.GET_USERS,E)}function f(E){m("q",E.value)}function d(E,g){t.dispatch(Ce.ACTIONS.UPDATE_USER,{username:E,admin:g})}function m(E,g){s[E]=g,E==="per_page"&&(s.page=1),r.push({path:"/admin/users",query:s})}return Rt(()=>{t.dispatch(Ce.ACTIONS.EMPTY_USERS)}),Fe(()=>n.query,E=>{s=Wd(E,a,th,{query:s}),c(s)}),(E,g)=>{const b=ue("router-link"),v=ue("ErrorMessage"),R=ue("Card");return T(),N("div",ySe,[M(R,null,{title:fe(()=>[K(_(St(E.$t("admin.USER",0))),1)]),content:fe(()=>[p("button",{class:"top-button",onClick:g[0]||(g[0]=Xe(A=>E.$router.push("/admin"),["prevent"]))},_(E.$t("admin.BACK_TO_ADMIN")),1),M(eSe,{onFilterOnUsername:f}),M(hA,{sort:h(g0),order_by:a,query:h(s),message:"admin.USERS.SELECTS.ORDER_BY",onUpdateSelect:m},null,8,["sort","query"]),i.value.length===0?(T(),N("div",DSe,_(E.$t("user.NO_USERS_FOUND")),1)):(T(),N("div",PSe,[p("table",null,[p("thead",null,[p("tr",null,[wSe,p("th",LSe,_(E.$t("user.USERNAME")),1),p("th",$Se,_(E.$t("user.EMAIL")),1),p("th",kSe,_(E.$t("user.PROFILE.REGISTRATION_DATE")),1),p("th",null,_(St(E.$t("workouts.WORKOUT",0))),1),p("th",null,_(E.$t("admin.ACTIVE")),1),p("th",null,_(E.$t("user.ADMIN")),1),p("th",null,_(E.$t("admin.ACTION")),1)])]),p("tbody",null,[(T(!0),N(Ie,null,xe(i.value,A=>(T(),N("tr",{key:A.username},[p("td",null,[p("span",USe,_(E.$t("user.PROFILE.PICTURE")),1),M(Lo,{user:A},null,8,["user"])]),p("td",null,[p("span",MSe,_(E.$t("user.USERNAME")),1),M(b,{to:`/admin/users/${A.username}`},{default:fe(()=>[K(_(A.username),1)]),_:2},1032,["to"])]),p("td",null,[p("span",xSe,_(E.$t("user.EMAIL")),1),K(" "+_(A.email),1)]),p("td",null,[p("span",FSe,_(E.$t("user.PROFILE.REGISTRATION_DATE")),1),p("time",null,_(h(xn)(A.created_at,o.value.timezone,o.value.date_format)),1)]),p("td",WSe,[p("span",GSe,_(St(E.$t("workouts.WORKOUT",0))),1),K(" "+_(A.nb_workouts),1)]),p("td",zSe,[p("span",BSe,_(E.$t("admin.ACTIVE")),1),p("i",{class:ge(`fa fa${A.is_active?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),p("td",HSe,[p("span",jSe,_(E.$t("user.ADMIN")),1),p("i",{class:ge(`fa fa${A.admin?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),p("td",VSe,[p("span",KSe,_(E.$t("admin.ACTION")),1),p("button",{class:ge({danger:A.admin}),disabled:A.username===o.value.username,onClick:S=>d(A.username,!A.admin)},_(E.$t(`admin.USERS.TABLE.${A.admin?"REMOVE":"ADD"}_ADMIN_RIGHTS`)),11,YSe)])]))),128))])]),u.value.page?(T(),te(Wu,{key:0,path:"/admin/users",pagination:u.value,query:h(s)},null,8,["pagination","query"])):F("",!0),l.value?(T(),te(v,{key:1,message:l.value},null,8,["message"])):F("",!0),p("button",{onClick:g[1]||(g[1]=Xe(A=>E.$router.push("/admin"),["prevent"]))},_(E.$t("admin.BACK_TO_ADMIN")),1)]))]),_:1})])}}}),XSe=ae(qSe,[["__scopeId","data-v-4beb3bfa"]]),ZSe={class:"box user-header"},QSe={class:"user-details"},JSe={class:"user-name"},eOe={class:"user-stats"},tOe={class:"user-stat"},nOe={class:"stat-number"},rOe={class:"stat-label"},aOe={class:"user-stat"},sOe={class:"stat-label"},oOe={class:"user-stat hide-small"},iOe={class:"stat-number"},uOe={class:"stat-label"},cOe=Q({__name:"UserHeader",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=$e(),a=k(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]);return(s,o)=>{const i=ue("Distance");return T(),N("div",ZSe,[M(Lo,{user:h(n)},null,8,["user"]),p("div",QSe,[p("div",JSe,_(h(n).username),1),p("div",eOe,[p("div",tOe,[p("span",nOe,_(h(n).nb_workouts),1),p("span",rOe,_(s.$t("workouts.WORKOUT",h(n).nb_workouts)),1)]),p("div",aOe,[M(i,{distance:h(n).total_distance,unitFrom:"km",digits:0,displayUnit:!1,useImperialUnits:a.value.imperial_units},null,8,["distance","useImperialUnits"]),p("span",sOe,_(a.value.imperial_units?"miles":"km"),1)]),p("div",oOe,[p("span",iOe,_(h(n).nb_sports),1),p("span",uOe,_(s.$t("workouts.SPORT",h(n).nb_sports)),1)])])])])}}}),vA=ae(cOe,[["__scopeId","data-v-3abb1646"]]),lOe={class:"profile-tabs custom-checkboxes-group"},dOe={class:"profile-tabs-checkboxes custom-checkboxes"},fOe=["id","name","checked","disabled","onInput"],pOe=["id","onKeydown"],RA=Q({__name:"UserProfileTabs",props:{tabs:{},selectedTab:{},edition:{type:Boolean},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{tabs:n,selectedTab:r,disabled:a}=_e(t);gt(()=>{const o=document.getElementById(`tab-${n.value[0]}`);o&&o.focus()});function s(o){switch(o){case"ACCOUNT":case"PICTURE":case"PRIVACY-POLICY":return`/profile/edit/${o.toLocaleLowerCase()}`;case"APPS":case"PREFERENCES":case"SPORTS":return`/profile${t.edition?"/edit":""}/${o.toLocaleLowerCase()}`;default:case"PROFILE":return`/profile${t.edition?"/edit":""}`}}return(o,i)=>(T(),N("div",lOe,[p("div",dOe,[(T(!0),N(Ie,null,xe(h(n),u=>(T(),N("div",{class:"profile-tab custom-checkbox",key:u},[p("label",null,[p("input",{type:"radio",id:u,name:u,checked:h(r).split("/")[0]===u,disabled:h(a),onInput:l=>o.$router.push(s(u))},null,40,fOe),p("span",{id:`tab-${u}`,tabindex:0,role:"button",onKeydown:At(l=>o.$router.push(s(u)),["enter"])},_(o.$t(`user.PROFILE.TABS.${u}`)),41,pOe)])]))),128))])]))}}),mOe={id:"user-profile"},EOe={class:"box"},hOe=Q({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,{user:n,tab:r}=_e(t),a=["PROFILE","PREFERENCES","SPORTS","APPS"];return(s,o)=>{const i=ue("router-view");return T(),N("div",mOe,[M(vA,{user:h(n)},null,8,["user"]),p("div",EOe,[M(RA,{tabs:a,selectedTab:h(r),edition:!1},null,8,["selectedTab"]),M(i,{user:h(n)},null,8,["user"])])])}}}),_Oe=ae(hOe,[["__scopeId","data-v-8a058d49"]]),TOe={id:"user-infos",class:"description-list"},gOe={key:1,class:"info-box success-message"},AOe={key:4,class:"email-form form-box"},SOe={class:"form-items",for:"email"},OOe={class:"form-items",for:"email"},IOe={class:"form-buttons"},vOe={class:"confirm",type:"submit"},ROe={key:5},bOe={key:0},NOe={class:"user-bio"},COe={key:0,class:"profile-buttons"},yOe={key:1,class:"profile-buttons"},DOe=Q({__name:"UserInfos",props:{user:{},fromAdmin:{type:Boolean,default:!1}},setup(e){const t=e,n=$e(),{user:r,fromAdmin:a}=_e(t),s=k(()=>n.getters[H.GETTERS.LANGUAGE]),o=k(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),i=k(()=>t.user.created_at?xn(t.user.created_at,o.value.timezone,o.value.date_format):""),u=k(()=>t.user.birth_date?ln(new Date(t.user.birth_date),`${Sa(o.value.date_format,s.value)}`,{locale:Mo[s.value]}):""),l=k(()=>n.getters[Ce.GETTERS.USERS_IS_SUCCESS]),c=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=k(()=>n.getters[H.GETTERS.APP_CONFIG]),d=ce(""),m=ce(!1),E=ce(!1),g=ce(""),b=ce("");function v(G){d.value=G,G!==""&&n.commit(Ce.MUTATIONS.UPDATE_IS_SUCCESS,!1)}function R(G){n.dispatch(Ce.ACTIONS.DELETE_USER_ACCOUNT,{username:G})}function A(G){b.value="password-reset",n.dispatch(Ce.ACTIONS.UPDATE_USER,{username:G,resetPassword:!0})}function S(G){n.dispatch(Ce.ACTIONS.UPDATE_USER,{username:G,activate:!0})}function C(){U(),g.value=r.value.email_to_confirm?r.value.email_to_confirm:"",E.value=!0,b.value="email-update"}function L(){g.value="",E.value=!1}function $(G){n.dispatch(Ce.ACTIONS.UPDATE_USER,{username:G,new_email:g.value})}function U(){n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Ce.MUTATIONS.UPDATE_IS_SUCCESS,!1),b.value=""}return Rt(()=>U()),Fe(()=>l.value,G=>{G&&(v(""),L())}),(G,B)=>{const w=ue("Modal"),Z=ue("AlertMessage"),J=ue("ErrorMessage");return T(),N("div",TOe,[d.value?(T(),te(w,{key:0,title:G.$t("common.CONFIRMATION"),message:d.value==="delete"?"admin.CONFIRM_USER_ACCOUNT_DELETION":"admin.CONFIRM_USER_PASSWORD_RESET",strongMessage:h(r).username,onConfirmAction:B[0]||(B[0]=re=>d.value==="delete"?R(h(r).username):A(h(r).username)),onCancelAction:B[1]||(B[1]=re=>v("")),onKeydown:B[2]||(B[2]=At(re=>v(""),["esc"]))},null,8,["title","message","strongMessage"])):F("",!0),l.value?(T(),N("div",gOe,_(G.$t(`admin.${b.value==="password-reset"?"PASSWORD_RESET":"USER_EMAIL_UPDATE"}_SUCCESSFUL`)),1)):F("",!0),h(r).is_active?F("",!0):(T(),te(Z,{key:2,message:"user.THIS_USER_ACCOUNT_IS_INACTIVE"})),c.value?(T(),te(J,{key:3,message:c.value},null,8,["message"])):F("",!0),E.value?(T(),N("div",AOe,[p("form",{class:ge({errors:m.value}),onSubmit:B[5]||(B[5]=Xe(re=>$(h(r).username),["prevent"]))},[p("label",SOe,[K(_(G.$t("admin.CURRENT_EMAIL"))+" ",1),Ke(p("input",{id:"email",type:"email","onUpdate:modelValue":B[3]||(B[3]=re=>h(r).email=re),disabled:""},null,512),[[tt,h(r).email]])]),p("label",OOe,[K(_(G.$t("admin.NEW_EMAIL"))+"* ",1),Ke(p("input",{id:"new-email",type:"email",required:"","onUpdate:modelValue":B[4]||(B[4]=re=>g.value=re)},null,512),[[tt,g.value]])]),p("div",IOe,[p("button",vOe,_(G.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:Xe(L,["prevent"])},_(G.$t("buttons.CANCEL")),1)])],34)])):(T(),N("div",ROe,[p("dl",null,[p("dt",null,_(G.$t("user.PROFILE.REGISTRATION_DATE"))+":",1),p("dd",null,[p("time",null,_(i.value),1)]),p("dt",null,_(G.$t("user.PROFILE.FIRST_NAME"))+":",1),p("dd",null,_(h(r).first_name),1),p("dt",null,_(G.$t("user.PROFILE.LAST_NAME"))+":",1),p("dd",null,_(h(r).last_name),1),p("dt",null,_(G.$t("user.PROFILE.BIRTH_DATE"))+":",1),p("dd",null,[u.value?(T(),N("time",bOe,_(u.value),1)):F("",!0)]),p("dt",null,_(G.$t("user.PROFILE.LOCATION"))+":",1),p("dd",null,_(h(r).location),1),p("dt",null,_(G.$t("user.PROFILE.BIO"))+":",1),p("dd",NOe,_(h(r).bio),1)]),h(a)?(T(),N("div",COe,[o.value.username!==h(r).username?(T(),N("button",{key:0,class:"danger",onClick:B[6]||(B[6]=Xe(re=>v("delete"),["prevent"]))},_(G.$t("admin.DELETE_USER")),1)):F("",!0),h(r).is_active?F("",!0):(T(),N("button",{key:1,onClick:B[7]||(B[7]=Xe(re=>S(h(r).username),["prevent"]))},_(G.$t("admin.ACTIVATE_USER_ACCOUNT")),1)),o.value.username!==h(r).username?(T(),N("button",{key:2,onClick:Xe(C,["prevent"])},_(G.$t("admin.UPDATE_USER_EMAIL")),1)):F("",!0),o.value.username!==h(r).username&&f.value.is_email_sending_enabled?(T(),N("button",{key:3,onClick:B[8]||(B[8]=Xe(re=>v("reset"),["prevent"]))},_(G.$t("admin.RESET_USER_PASSWORD")),1)):F("",!0),p("button",{onClick:B[9]||(B[9]=re=>G.$router.go(-1))},_(G.$t("buttons.BACK")),1)])):(T(),N("div",yOe,[p("button",{onClick:B[10]||(B[10]=re=>G.$router.push("/profile/edit"))},_(G.$t("user.PROFILE.EDIT")),1),p("button",{onClick:B[11]||(B[11]=re=>G.$router.push("/"))},_(G.$t("common.HOME")),1)]))]))])}}}),bA=ae(DOe,[["__scopeId","data-v-98220281"]]),POe=e=>(ut("data-v-b0528e22"),e=e(),ct(),e),wOe={id:"user-preferences",class:"description-list"},LOe={class:"preferences-section"},$Oe={class:"preferences-section"},kOe={class:"info-box raw-speed-help"},UOe=POe(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),MOe={class:"profile-buttons"},xOe=Q({__name:"UserPreferences",props:{user:{}},setup(e){const t=e,n=$e(),r=k(()=>n.getters[H.GETTERS.LANGUAGE]),a=k(()=>t.user.language?id[t.user.language]:id.en),s=k(()=>t.user.weekm?"MONDAY":"SUNDAY"),o=k(()=>t.user.timezone?t.user.timezone:"Europe/Paris"),i=k(()=>t.user.date_format?t.user.date_format:"MM/dd/yyyy"),u=k(()=>t.user.display_ascent?"DISPLAYED":"HIDDEN"),l=k(()=>t.user.use_dark_mode===!0?"DARK":t.user.use_dark_mode===!1?"LIGHT":"DEFAULT");return(c,f)=>(T(),N("div",wOe,[p("div",LOe,_(c.$t("user.PROFILE.INTERFACE")),1),p("dl",null,[p("dt",null,_(c.$t("user.PROFILE.LANGUAGE"))+":",1),p("dd",null,_(a.value),1),p("dt",null,_(c.$t("user.PROFILE.THEME_MODE.LABEL"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.THEME_MODE.VALUES.${l.value}`)),1),p("dt",null,_(c.$t("user.PROFILE.TIMEZONE"))+":",1),p("dd",null,_(o.value),1),p("dt",null,_(c.$t("user.PROFILE.DATE_FORMAT"))+":",1),p("dd",null,_(h(Sa)(i.value,r.value)),1),p("dt",null,_(c.$t("user.PROFILE.FIRST_DAY_OF_WEEK"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.${s.value}`)),1)]),p("div",$Oe,_(c.$t("workouts.WORKOUT",0)),1),p("dl",null,[p("dt",null,_(c.$t("user.PROFILE.UNITS.LABEL"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.UNITS.${c.user.imperial_units?"IMPERIAL":"METRIC"}`)),1),p("dt",null,_(c.$t("user.PROFILE.ASCENT_DATA"))+":",1),p("dd",null,_(c.$t(`common.${u.value}`)),1),p("dt",null,_(c.$t("user.PROFILE.ELEVATION_CHART_START.LABEL"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.ELEVATION_CHART_START.${c.user.start_elevation_at_zero?"ZERO":"MIN_ALT"}`)),1),p("dt",null,_(c.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${c.user.use_raw_gpx_speed?"RAW_SPEED":"FILTERED_SPEED"}`)),1),p("div",kOe,[p("span",null,[UOe,K(" "+_(c.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),p("div",MOe,[p("button",{onClick:f[0]||(f[0]=d=>c.$router.push("/profile/edit/preferences"))},_(c.$t("user.PROFILE.EDIT_PREFERENCES")),1),p("button",{onClick:f[1]||(f[1]=d=>c.$router.push("/"))},_(c.$t("common.HOME")),1)])]))}}),FOe=ae(xOe,[["__scopeId","data-v-b0528e22"]]),WOe={id:"user-profile-edition",class:"center-card"},GOe=Q({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,n=$e(),{user:r,tab:a}=_e(t),s=["PROFILE","ACCOUNT","PICTURE","PREFERENCES","SPORTS","PRIVACY-POLICY"],o=k(()=>n.getters[Y.GETTERS.USER_LOADING]);return(i,u)=>{const l=ue("router-view"),c=ue("Card");return T(),N("div",WOe,[M(c,null,{title:fe(()=>[K(_(i.$t(`user.PROFILE.${h(a)}_EDITION`)),1)]),content:fe(()=>[M(RA,{tabs:s,selectedTab:h(a),edition:!0,disabled:o.value},null,8,["selectedTab","disabled"]),M(l,{user:h(r)},null,8,["user"])]),_:1})])}}}),Js=new Map,zOe=e=>{const{method:t,url:n,params:r={},data:a={}}=e;return[t,n,JSON.stringify(r),JSON.stringify(a)].join("")},fs=e=>{const t=zOe(e);if(Js.has(t)){const n=Js.get(t)||{};n==null||n.abort(),Js.delete(t)}return t},Ur=C1.create({baseURL:wo()});Ur.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=fs(e);return Js.set(n,t),e},e=>Promise.reject(e));Ur.interceptors.response.use(e=>(fs(e.config),e),e=>(e.message!=="canceled"&&e.response&&fs(e.response.config),Promise.reject(e)));const NA=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.delete(`users/${t.username}`).then(n=>{n.status===204?t.fromAdmin?_t.push("/admin/users"):e.dispatch(Y.ACTIONS.LOGOUT).then(()=>_t.push("/")):he(e,null)}).catch(n=>he(e,n))},BOe={[Ce.ACTIONS.EMPTY_USER](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_USER,{})},[Ce.ACTIONS.EMPTY_USERS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_USERS,[]),e.commit(Ce.MUTATIONS.UPDATE_USERS_PAGINATION,{})},[Ce.ACTIONS.GET_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!0),Be.get(`users/${t}`).then(n=>{n.data.status==="success"?e.commit(Ce.MUTATIONS.UPDATE_USER,n.data.data.users[0]):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Ce.ACTIONS.GET_USERS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!0),Be.get("users",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Ce.MUTATIONS.UPDATE_USERS,n.data.data.users),e.commit(Ce.MUTATIONS.UPDATE_USERS_PAGINATION,n.data.pagination)):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Ce.ACTIONS.UPDATE_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_IS_SUCCESS,!1);const n={};t.admin!==void 0&&(n.admin=t.admin),t.resetPassword&&(n.reset_password=t.resetPassword),t.activate&&(n.activate=t.activate),t.new_email!==void 0&&(n.new_email=t.new_email),Be.patch(`users/${t.username}`,n).then(r=>{r.data.status==="success"?(e.commit(Ce.MUTATIONS.UPDATE_USER_IN_USERS,r.data.data.users[0]),(t.resetPassword||t.new_email)&&e.commit(Ce.MUTATIONS.UPDATE_IS_SUCCESS,!0),(t.activate||t.new_email)&&e.commit(Ce.MUTATIONS.UPDATE_USER,r.data.data.users[0])):he(e,null)}).catch(r=>he(e,r)).finally(()=>e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Ce.ACTIONS.DELETE_USER_ACCOUNT](e,t){NA(e,{username:t.username,fromAdmin:!0})}},_i=e=>{localStorage.removeItem("authToken"),e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Kr.MUTATIONS.EMPTY_USER_STATS),e.commit(Y.MUTATIONS.CLEAR_AUTH_USER_TOKEN),e.commit(Ce.MUTATIONS.UPDATE_USERS,[]),e.commit(Te.MUTATIONS.EMPTY_WORKOUTS),e.commit(Te.MUTATIONS.EMPTY_WORKOUT),_t.push("/login")},HOe={[Y.ACTIONS.CHECK_AUTH_USER](e){window.localStorage.authToken&&!e.getters[Y.GETTERS.IS_AUTHENTICATED]&&(e.commit(Y.MUTATIONS.UPDATE_AUTH_TOKEN,window.localStorage.authToken),e.dispatch(Y.ACTIONS.GET_USER_PROFILE,!0)),!window.localStorage.authToken&&e.getters[Y.GETTERS.IS_AUTHENTICATED]&&_i(e)},[Y.ACTIONS.CONFIRM_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Ur.post("auth/account/confirm",{token:t.token}).then(n=>{if(n.data.status==="success"){const r=n.data.auth_token;window.localStorage.setItem("authToken",r),e.commit(Y.MUTATIONS.UPDATE_AUTH_TOKEN,r),e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/"))}else he(e,null)}).catch(n=>{he(e,n)})},[Y.ACTIONS.CONFIRM_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!1),Ur.post("/auth/email/update",{token:t.token}).then(n=>{n.data.status==="success"?(e.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!0),t.refreshUser&&e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/profile/edit/account")),_t.push("/profile/edit/account")):he(e,null)}).catch(n=>{he(e,n)})},[Y.ACTIONS.GET_USER_PROFILE](e,t=!1){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("auth/profile").then(n=>{if(n.data.status==="success"){const r=e.getters[Y.GETTERS.IS_PROFILE_NOT_LOADED];e.commit(Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),n.data.data.accepted_privacy_policy||e.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY),(r||t)&&(n.data.data.language&&e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode)),e.dispatch($t.ACTIONS.GET_SPORTS)}else he(e,null),_i(e)}).catch(n=>{n.message!=="canceled"&&(he(e,n),_i(e))})},[Y.ACTIONS.LOGIN_OR_REGISTER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),Ur.post(`/auth/${t.actionType}`,t.formData).then(n=>{if(n.data.status==="success")if(t.actionType==="login"){const r=n.data.auth_token;window.localStorage.setItem("authToken",r),e.commit(Y.MUTATIONS.UPDATE_AUTH_TOKEN,r),e.dispatch(Y.ACTIONS.GET_USER_PROFILE,!0).then(()=>_t.push(typeof t.redirectUrl=="string"?t.redirectUrl:"/"))}else _t.push("/login").then(()=>e.commit(Y.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!0));else he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.LOGOUT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.post("auth/logout").then(t=>{t.data.status==="success"?_i(e):he(e,null)}).catch(t=>he(e,t))},[Y.ACTIONS.UPDATE_USER_PROFILE](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.post("auth/profile/edit",t).then(n=>{n.data.status==="success"?(e.commit(Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),_t.push("/profile")):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.UPDATE_USER_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),e.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!1),Be.patch("auth/profile/edit/account",t).then(n=>{n.data.status==="success"?(e.commit(Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!0)):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.UPDATE_USER_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.post("auth/profile/edit/preferences",t).then(n=>{n.data.status==="success"?(e.commit(Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode),e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language).then(()=>_t.push("/profile/preferences"))):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.RESET_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.delete(`auth/profile/reset/sports/${t}`).then(n=>{n.status===204?e.dispatch($t.ACTIONS.GET_SPORTS):he(e,null)}).catch(n=>{he(e,n),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1)})},[Y.ACTIONS.UPDATE_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.post("auth/profile/edit/sports",t).then(n=>{n.data.status==="success"?e.dispatch($t.ACTIONS.GET_SPORTS):he(e,null)}).catch(n=>{he(e,n),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1)})},[Y.ACTIONS.UPDATE_USER_PICTURE](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),!t.picture)throw new Error("No file part");const n=new FormData;n.append("file",t.picture),Be.post("auth/picture",n,{headers:{"content-type":"multipart/form-data"}}).then(r=>{r.data.status==="success"?e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/profile")):he(e,null)}).catch(r=>he(e,r)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.DELETE_ACCOUNT](e,t){NA(e,t)},[Y.ACTIONS.DELETE_PICTURE](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.delete("auth/picture").then(t=>{t.status===204?e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/profile")):he(e,null)}).catch(t=>he(e,t)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.SEND_PASSWORD_RESET_REQUEST](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Ur.post("auth/password/reset-request",t).then(n=>{n.data.status==="success"?_t.push("/password-reset/sent"):he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Ur.post("auth/account/resend-confirmation",t).then(n=>{n.data.status==="success"?_t.push("/account-confirmation/email-sent"):he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.RESET_USER_PASSWORD](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Ur.post("auth/password/update",t).then(n=>{n.data.status==="success"?_t.push("/password-reset/password-updated"):he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.ACCEPT_PRIVACY_POLICY](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.post("auth/account/privacy-policy",{accepted_policy:t}).then(n=>{n.data.status==="success"?e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/profile")):he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.post("auth/account/export/request").then(t=>{t.data.status==="success"?e.commit(Y.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):he(e,null)}).catch(t=>he(e,t))},[Y.ACTIONS.GET_REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("auth/account/export").then(t=>{t.data.status==="success"?e.commit(Y.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):he(e,null)}).catch(t=>he(e,t))}},jOe={[Y.GETTERS.AUTH_TOKEN]:e=>e.authToken,[Y.GETTERS.AUTH_USER_PROFILE]:e=>e.authUserProfile,[Y.GETTERS.EXPORT_REQUEST]:e=>e.exportRequest,[Y.GETTERS.IS_AUTHENTICATED]:e=>e.authToken!==null,[Y.GETTERS.IS_ADMIN]:e=>e.authUserProfile&&e.authUserProfile.admin,[Y.GETTERS.IS_REGISTRATION_SUCCESS]:e=>e.isRegistrationSuccess,[Y.GETTERS.IS_SUCCESS]:e=>e.isSuccess,[Y.GETTERS.USER_LOADING]:e=>e.loading,[Y.GETTERS.IS_PROFILE_NOT_LOADED]:e=>e.authUserProfile.username===void 0},VOe={[Y.MUTATIONS.CLEAR_AUTH_USER_TOKEN](e){e.authToken=null,e.authUserProfile={}},[Y.MUTATIONS.UPDATE_AUTH_TOKEN](e,t){e.authToken=t},[Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE](e,t){e.authUserProfile=t},[Y.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS](e,t){e.isRegistrationSuccess=t},[Y.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t},[Y.MUTATIONS.UPDATE_USER_LOADING](e,t){e.loading=t},[Y.MUTATIONS.SET_EXPORT_REQUEST](e,t){e.exportRequest=t}},KOe={authToken:null,authUserProfile:{},isSuccess:!1,isRegistrationSuccess:!1,loading:!1,exportRequest:null},YOe={state:KOe,actions:HOe,getters:jOe,mutations:VOe},nh=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get(t).then(n=>{n.data.status==="success"?e.commit(Ve.MUTATIONS.SET_CLIENT,n.data.data.client):he(e,null)}).catch(n=>he(e,n))},qOe={[Ve.ACTIONS.AUTHORIZE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES);const n=new FormData;n.set("client_id",t.client_id),n.set("response_type",t.response_type),n.set("scope",t.scope),n.set("confirm","true"),t.state&&n.set("state",t.state),t.code_challenge&&n.set("code_challenge",t.code_challenge),t.code_challenge_method&&n.set("code_challenge_method",t.code_challenge_method),Be.post("oauth/authorize",n,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>{r.status==200&&r.data.redirect_url?window.location.href=r.data.redirect_url:he(e,null)}).catch(r=>he(e,r))},[Ve.ACTIONS.CREATE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.post("oauth/apps",t).then(n=>{n.data.status==="created"?(e.commit(Ve.MUTATIONS.SET_CLIENT,n.data.data.client),_t.push(`/profile/apps/${n.data.data.client.id}/created`)):he(e,null)}).catch(n=>he(e,n))},[Ve.ACTIONS.DELETE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.delete(`oauth/apps/${t}`).then(n=>{n.status===204?e.dispatch(Ve.ACTIONS.GET_CLIENTS).then(()=>_t.push("/profile/apps")):he(e,null)}).catch(n=>he(e,n))},[Ve.ACTIONS.GET_CLIENT_BY_CLIENT_ID](e,t){nh(e,`oauth/apps/${t}`)},[Ve.ACTIONS.GET_CLIENT_BY_ID](e,t){nh(e,`oauth/apps/${t}/by_id`)},[Ve.ACTIONS.GET_CLIENTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("oauth/apps",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Ve.MUTATIONS.SET_CLIENTS,n.data.data.clients),e.commit(Ve.MUTATIONS.SET_CLIENTS_PAGINATION,n.data.pagination)):he(e,null)}).catch(n=>he(e,n))},[Ve.ACTIONS.REVOKE_ALL_TOKENS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ve.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1),Be.post(`oauth/apps/${t}/revoke`).then(n=>{n.data.status==="success"?e.commit(Ve.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!0):he(e,null)}).catch(n=>he(e,n))}},XOe={[Ve.GETTERS.CLIENT]:e=>e.client,[Ve.GETTERS.CLIENTS]:e=>e.clients,[Ve.GETTERS.CLIENTS_PAGINATION]:e=>e.pagination,[Ve.GETTERS.REVOCATION_SUCCESSFUL]:e=>e.revocationSuccessful},ZOe={[Ve.MUTATIONS.SET_CLIENT](e,t){e.client=t},[Ve.MUTATIONS.EMPTY_CLIENT](e){e.client={}},[Ve.MUTATIONS.SET_CLIENTS](e,t){e.clients=t},[Ve.MUTATIONS.SET_CLIENTS_PAGINATION](e,t){e.pagination=t},[Ve.MUTATIONS.SET_REVOCATION_SUCCESSFUL](e,t){e.revocationSuccessful=t}},QOe={client:{},clients:[],pagination:{},revocationSuccessful:!1},JOe={state:QOe,actions:qOe,getters:XOe,mutations:ZOe},{locale:eIe}=ga.global,tIe={[H.ACTIONS.GET_APPLICATION_CONFIG](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!0),Be.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,t.data.data):he(e,null)}).catch(t=>he(e,t)).finally(()=>e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!1))},[H.ACTIONS.GET_APPLICATION_STATS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("stats/all").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_STATS,t.data.data):he(e,null)}).catch(t=>he(e,t))},[H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY,t.data.data):he(e,null)}).catch(t=>he(e,t))},[H.ACTIONS.UPDATE_APPLICATION_CONFIG](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.patch("config",t).then(n=>{n.data.status==="success"?(e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,n.data.data),_t.push("/admin/application")):he(e,null)}).catch(n=>he(e,n))},[H.ACTIONS.UPDATE_APPLICATION_LANGUAGE](e,t){var n;(n=document.querySelector("html"))==null||n.setAttribute("lang",t),e.commit(H.MUTATIONS.UPDATE_LANG,t),eIe.value=t}},nIe={[H.GETTERS.APP_CONFIG]:e=>e.application.config,[H.GETTERS.APP_LOADING]:e=>e.appLoading,[H.GETTERS.APP_STATS]:e=>e.application.statistics,[H.GETTERS.DARK_MODE]:e=>e.darkMode,[H.GETTERS.ERROR_MESSAGES]:e=>e.errorMessages,[H.GETTERS.LANGUAGE]:e=>e.language,[H.GETTERS.LOCALE]:e=>e.locale},rIe={[H.MUTATIONS.EMPTY_ERROR_MESSAGES](e){e.errorMessages=null},[H.MUTATIONS.SET_ERROR_MESSAGES](e,t){e.errorMessages=t},[H.MUTATIONS.UPDATE_APPLICATION_CONFIG](e,t){e.application.config=t},[H.MUTATIONS.UPDATE_APPLICATION_LOADING](e,t){e.appLoading=t},[H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY](e,t){e.application.config.privacy_policy=t.privacy_policy,e.application.config.privacy_policy_date=t.privacy_policy_date},[H.MUTATIONS.UPDATE_APPLICATION_STATS](e,t){e.application.statistics=t},[H.MUTATIONS.UPDATE_LANG](e,t){e.language=t,e.locale=Mo[t]},[H.MUTATIONS.UPDATE_DARK_MODE](e,t){e.darkMode=t}},aIe={root:!0,language:"en",locale:dc,errorMessages:null,application:{statistics:{sports:0,uploads_dir_size:0,users:0,workouts:0}},appLoading:!1,darkMode:null},sIe={[$t.ACTIONS.GET_SPORTS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("sports").then(t=>{t.data.status==="success"?(e.commit($t.MUTATIONS.SET_SPORTS,t.data.data.sports),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1)):he(e,null)}).catch(t=>he(e,t))},[$t.ACTIONS.UPDATE_SPORTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.patch(`sports/${t.id}`,{is_active:t.isActive}).then(n=>{n.data.status==="success"?e.dispatch($t.ACTIONS.GET_SPORTS):he(e,null)}).catch(n=>he(e,n))}},oIe={[$t.GETTERS.SPORTS]:e=>e.sports},iIe={[$t.MUTATIONS.SET_SPORTS](e,t){e.sports=t}},uIe={sports:[]},cIe={state:uIe,actions:sIe,getters:oIe,mutations:iIe},lIe={[Kr.ACTIONS.GET_USER_STATS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get(`stats/${t.username}/${t.filterType}`,{params:t.params}).then(n=>{n.data.status==="success"?e.commit(Kr.MUTATIONS.UPDATE_USER_STATS,n.data.data.statistics):he(e,null)}).catch(n=>he(e,n))}},dIe={[Kr.GETTERS.USER_STATS]:e=>e.statistics},fIe={[Kr.MUTATIONS.UPDATE_USER_STATS](e,t){e.statistics=t},[Kr.MUTATIONS.EMPTY_USER_STATS](e){e.statistics={}}},pIe={statistics:{}},mIe={state:pIe,actions:lIe,getters:dIe,mutations:fIe},EIe={[Ce.GETTERS.USER]:e=>e.user,[Ce.GETTERS.USERS]:e=>e.users,[Ce.GETTERS.USERS_IS_SUCCESS]:e=>e.isSuccess,[Ce.GETTERS.USERS_LOADING]:e=>e.loading,[Ce.GETTERS.USERS_PAGINATION]:e=>e.pagination},hIe={[Ce.MUTATIONS.UPDATE_USER](e,t){e.user=t},[Ce.MUTATIONS.UPDATE_USER_IN_USERS](e,t){e.users=e.users.map(n=>n.username===t.username?t:n)},[Ce.MUTATIONS.UPDATE_USERS](e,t){e.users=t},[Ce.MUTATIONS.UPDATE_USERS_LOADING](e,t){e.loading=t},[Ce.MUTATIONS.UPDATE_USERS_PAGINATION](e,t){e.pagination=t},[Ce.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t}},_Ie={user:{},users:[],loading:!1,isSuccess:!1,pagination:{}},TIe={state:_Ie,actions:BOe,getters:EIe,mutations:hIe},Ti=(e,t,n)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("workouts",{params:t}).then(r=>{r.data.status==="success"?(e.commit(Te.MUTATIONS[n],r.data.data.workouts),n===ca.SET_USER_WORKOUTS&&e.commit(Te.MUTATIONS.SET_WORKOUTS_PAGINATION,r.data.pagination)):he(e,null)}).catch(r=>he(e,r))},gIe={[Te.ACTIONS.GET_CALENDAR_WORKOUTS](e,t){e.commit(Te.MUTATIONS.EMPTY_CALENDAR_WORKOUTS),Ti(e,t,ca.SET_CALENDAR_WORKOUTS)},[Te.ACTIONS.GET_USER_WORKOUTS](e,t){Ti(e,t,ca.SET_USER_WORKOUTS)},[Te.ACTIONS.GET_TIMELINE_WORKOUTS](e,t){Ti(e,t,ca.SET_TIMELINE_WORKOUTS)},[Te.ACTIONS.GET_MORE_TIMELINE_WORKOUTS](e,t){Ti(e,t,ca.ADD_TIMELINE_WORKOUTS)},[Te.ACTIONS.GET_WORKOUT_DATA](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0);const n=t.segmentId?`/segment/${t.segmentId}`:"";Be.get(`workouts/${t.workoutId}`).then(r=>{const a=r.data.data.workouts[0];if(r.data.status==="success"){if(t.segmentId&&(a.segments.length===0||!a.segments[+t.segmentId-1]))throw new Error("WORKOUT_NOT_FOUND");e.commit(Te.MUTATIONS.SET_WORKOUT,r.data.data.workouts[0]),r.data.data.workouts[0].with_gpx&&(Be.get(`workouts/${t.workoutId}/chart_data${n}`).then(s=>{s.data.status==="success"&&e.commit(Te.MUTATIONS.SET_WORKOUT_CHART_DATA,s.data.data.chart_data)}),Be.get(`workouts/${t.workoutId}/gpx${n}`).then(s=>{s.data.status==="success"&&e.commit(Te.MUTATIONS.SET_WORKOUT_GPX,s.data.data.gpx)}))}else e.commit(Te.MUTATIONS.EMPTY_WORKOUT),he(e,null)}).catch(r=>{e.commit(Te.MUTATIONS.EMPTY_WORKOUT),he(e,r)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Te.ACTIONS.DELETE_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0),Be.delete(`workouts/${t.workoutId}`).then(()=>{e.commit(Te.MUTATIONS.EMPTY_WORKOUT),e.dispatch(Y.ACTIONS.GET_USER_PROFILE),_t.push("/")}).catch(n=>{he(e,n)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Te.ACTIONS.EDIT_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0),Be.patch(`workouts/${t.workoutId}`,t.data).then(()=>{e.dispatch(Y.ACTIONS.GET_USER_PROFILE),e.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.workoutId}).then(()=>{_t.push({name:"Workout",params:{workoutId:t.workoutId}})})}).catch(n=>{he(e,n)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Te.ACTIONS.ADD_WORKOUT](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0),!t.file)throw new Error("No file part");const n=t.notes.replace(/"/g,'\\"'),r=new FormData;r.append("file",t.file),r.append("data",`{"sport_id": ${t.sport_id}, "notes": "${n}"}`),Be.post("workouts",r,{headers:{"content-type":"multipart/form-data"}}).then(a=>{if(a.data.status==="created"){e.dispatch(Y.ACTIONS.GET_USER_PROFILE);const s=a.data.data.workouts[0];_t.push(a.data.data.workouts.length===1?`/workouts/${s.id}`:"/")}}).catch(a=>{he(e,a)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Te.ACTIONS.ADD_WORKOUT_WITHOUT_GPX](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0),Be.post("workouts/no_gpx",t).then(n=>{if(n.data.status==="created"){e.dispatch(Y.ACTIONS.GET_USER_PROFILE);const r=n.data.data.workouts[0];_t.push(`/workouts/${r.id}`)}}).catch(n=>{he(e,n)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))}},AIe={[Te.GETTERS.CALENDAR_WORKOUTS]:e=>e.calendar_workouts,[Te.GETTERS.TIMELINE_WORKOUTS]:e=>e.timeline_workouts,[Te.GETTERS.USER_WORKOUTS]:e=>e.user_workouts,[Te.GETTERS.WORKOUT_DATA]:e=>e.workoutData,[Te.GETTERS.WORKOUTS_PAGINATION]:e=>e.pagination},SIe={[Te.MUTATIONS.ADD_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=e.timeline_workouts.concat(t)},[Te.MUTATIONS.SET_CALENDAR_WORKOUTS](e,t){e.calendar_workouts=t},[Te.MUTATIONS.SET_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=t},[Te.MUTATIONS.SET_USER_WORKOUTS](e,t){e.user_workouts=t},[Te.MUTATIONS.SET_WORKOUTS_PAGINATION](e,t){e.pagination=t},[Te.MUTATIONS.SET_WORKOUT](e,t){e.workoutData.workout=t},[Te.MUTATIONS.SET_WORKOUT_CHART_DATA](e,t){e.workoutData.chartData=t},[Te.MUTATIONS.SET_WORKOUT_GPX](e,t){e.workoutData.gpx=t},[Te.MUTATIONS.SET_WORKOUT_LOADING](e,t){e.workoutData.loading=t},[Te.MUTATIONS.EMPTY_CALENDAR_WORKOUTS](e){e.calendar_workouts=[]},[Te.MUTATIONS.EMPTY_WORKOUTS](e){e.calendar_workouts=[],e.user_workouts=[],e.timeline_workouts=[]},[Te.MUTATIONS.EMPTY_WORKOUT](e){e.workoutData={gpx:"",loading:!1,workout:{},chartData:[]}}},OIe={calendar_workouts:[],timeline_workouts:[],pagination:{},user_workouts:[],workoutData:{gpx:"",loading:!1,workout:{},chartData:[]}},IIe={state:OIe,actions:gIe,getters:AIe,mutations:SIe},vIe={authUserModule:YOe,oAuthModule:JOe,sportsModule:cIe,statsModule:mIe,usersModule:TIe,workoutsModule:IIe},RIe={state:aIe,actions:tIe,getters:nIe,mutations:rIe,modules:vIe},eo=fN(RIe),A0=C1.create({baseURL:wo()});A0.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=fs(e);Js.set(n,t);const r=eo.getters[Y.GETTERS.AUTH_TOKEN];if(r){const a=`Bearer ${r}`;e.headers&&e.headers.Authorization!==a&&(e.headers.Authorization=`Bearer ${r}`)}return e},e=>Promise.reject(e));A0.interceptors.response.use(e=>(fs(e.config),e),e=>(e.message!=="canceled"&&e.response&&fs(e.response.config),Promise.reject(e)));const Be=A0,Hd=(e,t)=>e.push.apply(e,t),ps=e=>e.sort((t,n)=>t.i-n.i||t.j-n.j),rh=e=>{const t={};let n=1;return e.forEach(r=>{t[r]=n,n+=1}),t};var bIe={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]};const ah=2050,sh=1e3,NIe=bIe,CIe=10,yIe=1e4,CA=10,yA=50,DA=20,PA=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,DIe=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,PIe=/^[A-Z\xbf-\xdf]+$/,wA=/^[^a-z\xdf-\xff]+$/,wIe=/^[a-z\xdf-\xff]+$/,LIe=/^[^A-Z\xbf-\xdf]+$/,$Ie=/[a-z\xdf-\xff]/,kIe=/[A-Z\xbf-\xdf]/,UIe=/[^A-Za-z\xbf-\xdf]/gi,MIe=/^\d+$/,S0=new Date().getFullYear(),xIe={recentYear:/19\d\d|200\d|201\d|202\d/g},LA=[" ",",",";",":","|","/","\\","_",".","-"],FIe=LA.length;class WIe{match({password:t}){const n=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],r=this.filterNoise(n);return ps(r)}getMatchesWithSeparator(t){const n=[],r=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let a=0;a<=Math.abs(t.length-6);a+=1)for(let s=a+5;s<=a+9&&!(s>=t.length);s+=1){const o=t.slice(a,+s+1||9e9),i=r.exec(o);if(i!=null){const u=this.mapIntegersToDayMonthYear([parseInt(i[1],10),parseInt(i[3],10),parseInt(i[4],10)]);u!=null&&n.push({pattern:"date",token:o,i:a,j:s,separator:i[2],year:u.year,month:u.month,day:u.day})}}return n}getMatchesWithoutSeparator(t){const n=[],r=/^\d{4,8}$/,a=s=>Math.abs(s.year-S0);for(let s=0;s<=Math.abs(t.length-4);s+=1)for(let o=s+3;o<=s+7&&!(o>=t.length);o+=1){const i=t.slice(s,+o+1||9e9);if(r.exec(i)){const u=[],l=i.length;if(NIe[l].forEach(([f,d])=>{const m=this.mapIntegersToDayMonthYear([parseInt(i.slice(0,f),10),parseInt(i.slice(f,d),10),parseInt(i.slice(d),10)]);m!=null&&u.push(m)}),u.length>0){let f=u[0],d=a(u[0]);u.slice(1).forEach(m=>{const E=a(m);E{let r=!1;const a=t.length;for(let s=0;s=n.j){r=!0;break}}return!r})}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let n=0,r=0,a=0;for(let s=0,o=t.length;s99&&iah)return null;i>31&&(r+=1),i>12&&(n+=1),i<=0&&(a+=1)}return r>=2||n===3||a>=2?null:this.getDayMonth(t)}getDayMonth(t){const n=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],r=n.length;for(let a=0;a=1&&s<=31&&o>=1&&o<=12)return{day:s,month:o}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const dr=new Uint32Array(65536),GIe=(e,t)=>{const n=e.length,r=t.length,a=1<{const n=t.length,r=e.length,a=[],s=[],o=Math.ceil(n/32),i=Math.ceil(r/32);for(let E=0;E>>R&1,C=a[R/32|0]>>>R&1,L=A|E,$=((A|C)&g)+g^g|A|C;let U=E|~($|g),G=g&$;U>>>31^S&&(s[R/32|0]^=1<>>31^C&&(a[R/32|0]^=1<>>E&1,v=a[E/32|0]>>>E&1,R=g|l,A=((g|v)&c)+c^c|g|v;let S=l|~(A|c),C=c&A;m+=S>>>r-1&1,m-=C>>>r-1&1,S>>>31^b&&(s[E/32|0]^=1<>>31^v&&(a[E/32|0]^=1<{if(e.length{const r=e.length<=t.length,a=e.length<=n;return r||a?Math.ceil(e.length/4):n},jIe=(e,t,n)=>{let r=0;const a=Object.keys(t).find(s=>{const o=HIe(e,s,n);if(Math.abs(e.length-s.length)>o)return!1;const i=BIe(e,s),u=i<=o;return u&&(r=i),u});return a?{levenshteinDistance:r,levenshteinDistanceEntry:a}:{}};var oh={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},_l={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class Ro{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...n){const r=t.charAt(0);this.children.has(r)||this.children.set(r,new Ro([...this.parents,r]));let a=this.children.get(r);for(let s=1;s(Object.entries(e).forEach(([n,r])=>{r.forEach(a=>{t.addSub(a,n)})}),t);class VIe{constructor(){this.matchers={},this.l33tTable=oh,this.trieNodeRoot=ih(oh,new Ro),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=_l,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=ih(t.l33tTable,new Ro)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),t.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=t.useLevenshteinDistance),t.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=t.levenshteinThreshold),t.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),t.maxLength!==void 0&&(this.maxLength=t.maxLength)}setTranslations(t){if(this.checkCustomTranslations(t))this.translations=t;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(t){let n=!0;return Object.keys(_l).forEach(r=>{if(r in t){const a=r;Object.keys(_l[a]).forEach(s=>{s in t[a]||(n=!1)})}else n=!1}),n}setRankedDictionaries(){const t={},n={};Object.keys(this.dictionary).forEach(r=>{t[r]=rh(this.dictionary[r]),n[r]=this.getRankedDictionariesMaxWordSize(this.dictionary[r])}),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=n}getRankedDictionariesMaxWordSize(t){const n=t.map(r=>typeof r!="string"?r.toString().length:r.length);return n.length===0?0:n.reduce((r,a)=>Math.max(r,a),-1/0)}buildSanitizedRankedDictionary(t){const n=[];return t.forEach(r=>{const a=typeof r;(a==="string"||a==="number"||a==="boolean")&&n.push(r.toString().toLowerCase())}),rh(n)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const n=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(n),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(n)}addMatcher(t,n){this.matchers[t]?console.info(`Matcher ${t} already exists`):this.matchers[t]=n}}const Re=new VIe;class KIe{constructor(t){this.defaultMatch=t}match({password:t}){const n=t.split("").reverse().join("");return this.defaultMatch({password:n}).map(r=>({...r,token:r.token.split("").reverse().join(""),reversed:!0,i:t.length-1-r.j,j:t.length-1-r.i}))}}class YIe{constructor({substr:t,limit:n,trieRoot:r}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=n,this.trieRoot=r}getAllPossibleSubsAtIndex(t){const n=[];let r=this.trieRoot;for(let a=t;a=this.limit)return;if(r===this.substr.length){t===n&&this.finalPasswords.push({password:this.buffer.join(""),changes:s});return}const u=[...this.getAllPossibleSubsAtIndex(r)];let l=!1;for(let c=r+u.length-1;c>=r;c-=1){const f=u[c-r];if(f.isTerminal()){if(o===f.parents.join("")&&i>=3)continue;l=!0;const d=f.subs;for(const m of d){this.buffer.push(m);const E=s.concat({i:a,letter:m,substitution:f.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:n,index:c+1,subIndex:a+m.length,changes:E,lastSubLetter:f.parents.join(""),consecutiveSubCount:o===f.parents.join("")?i+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!l){const c=this.substr.charAt(r);this.buffer.push(c),this.helper({onlyFullSub:t,isFullSub:n&&!l,index:r+1,subIndex:a+1,changes:s,lastSubLetter:o,consecutiveSubCount:i}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}}const qIe=(e,t,n)=>new YIe({substr:e,limit:t,trieRoot:n}).getAll(),XIe=(e,t,n)=>{const a=e.changes.filter(l=>l.il-c.letter.length+c.substitution.length,t),s=e.changes.filter(l=>l.i>=t&&l.i<=n),o=s.reduce((l,c)=>l-c.letter.length+c.substitution.length,n-t+a),i=[],u=[];return s.forEach(l=>{i.findIndex(f=>f.letter===l.letter&&f.substitution===l.substitution)<0&&(i.push({letter:l.letter,substitution:l.substitution}),u.push(`${l.substitution} -> ${l.letter}`))}),{i:a,j:o,subs:i,subDisplay:u.join(", ")}};class ZIe{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,n){return t.some(r=>Object.entries(r).every(([a,s])=>a==="subs"||s===n[a]))}match({password:t}){const n=[],r=qIe(t,Re.l33tMaxSubstitutions,Re.trieNodeRoot);let a=!1,s=!0;return r.forEach(o=>{if(a)return;const i=this.defaultMatch({password:o.password,useLevenshtein:s});s=!1,i.forEach(u=>{a||(a=u.i===0&&u.j===t.length-1);const l=XIe(o,u.i,u.j),c=t.slice(l.i,+l.j+1||9e9),f={...u,l33t:!0,token:c,...l},d=this.isAlreadyIncluded(n,f);c.toLowerCase()!==u.matchedWord&&!d&&n.push(f)})}),n.filter(o=>o.token.length>1)}}class QIe{constructor(){this.l33t=new ZIe(this.defaultMatch),this.reverse=new KIe(this.defaultMatch)}match({password:t}){const n=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return ps(n)}defaultMatch({password:t,useLevenshtein:n=!0}){const r=[],a=t.length,s=t.toLowerCase();return Object.keys(Re.rankedDictionaries).forEach(o=>{const i=Re.rankedDictionaries[o],u=Re.rankedDictionariesMaxWordSize[o],l=Math.min(u,a);for(let c=0;c{const s=n[a];s.lastIndex=0;let o;for(;o=s.exec(t);)if(o){const i=o[0];r.push({pattern:"regex",token:i,i:o.index,j:o.index+o[0].length-1,regexName:a,regexMatch:o})}}),ps(r)}}var Oa={nCk(e,t){let n=e;if(t>n)return 0;if(t===0)return 1;let r=1;for(let a=1;a<=t;a+=1)r*=n,r/=a,n-=1;return r},log10(e){return e===0?0:Math.log(e)/Math.log(10)},log2(e){return Math.log(e)/Math.log(2)},factorial(e){let t=1;for(let n=2;n<=e;n+=1)t*=n;return t}},e2e=({token:e})=>{let t=CIe**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let n;return e.length===1?n=CA+1:n=yA+1,Math.max(t,n)},t2e=({year:e,separator:t})=>{let r=Math.max(Math.abs(e-S0),DA)*365;return t&&(r*=4),r};const n2e=e=>{const t=e.split(""),n=t.filter(o=>o.match(kIe)).length,r=t.filter(o=>o.match($Ie)).length;let a=0;const s=Math.min(n,r);for(let o=1;o<=s;o+=1)a+=Oa.nCk(n+r,o);return a};var r2e=e=>{const t=e.replace(UIe,"");if(t.match(LIe)||t.toLowerCase()===t)return 1;const n=[PA,DIe,wA],r=n.length;for(let a=0;a{let n=0,r=e.indexOf(t);for(;r>=0;)n+=1,r=e.indexOf(t,r+t.length);return n},a2e=({sub:e,token:t})=>{const n=t.toLowerCase(),r=uh(n,e.substitution),a=uh(n,e.letter);return{subbedCount:r,unsubbedCount:a}};var s2e=({l33t:e,subs:t,token:n})=>{if(!e)return 1;let r=1;return t.forEach(a=>{const{subbedCount:s,unsubbedCount:o}=a2e({sub:a,token:n});if(s===0||o===0)r*=2;else{const i=Math.min(o,s);let u=0;for(let l=1;l<=i;l+=1)u+=Oa.nCk(o+s,l);r*=u}}),r},o2e=({rank:e,reversed:t,l33t:n,subs:r,token:a,dictionaryName:s})=>{const o=e,i=r2e(a),u=s2e({l33t:n,subs:r,token:a}),l=t&&2||1;let c;return s==="diceware"?c=6**5/2:c=o*i*u*l,{baseGuesses:o,uppercaseVariations:i,l33tVariations:u,calculation:c}},i2e=({regexName:e,regexMatch:t,token:n})=>{const r={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};if(e in r)return r[e]**n.length;switch(e){case"recentYear":return Math.max(Math.abs(parseInt(t[0],10)-S0),DA)}return 0},u2e=({baseGuesses:e,repeatCount:t})=>e*t,c2e=({token:e,ascending:t})=>{const n=e.charAt(0);let r=0;return["a","A","z","Z","0","1","9"].includes(n)?r=4:n.match(/\d/)?r=10:r=26,t||(r*=2),r*e.length};const l2e=e=>{let t=0;return Object.keys(e).forEach(n=>{const r=e[n];t+=r.filter(a=>!!a).length}),t/=Object.entries(e).length,t},d2e=({token:e,graph:t,turns:n})=>{const r=Object.keys(Re.graphs[t]).length,a=l2e(Re.graphs[t]);let s=0;const o=e.length;for(let i=2;i<=o;i+=1){const u=Math.min(n,i-1);for(let l=1;l<=u;l+=1)s+=Oa.nCk(i-1,l-1)*r*a**l}return s};var f2e=({graph:e,token:t,shiftedCount:n,turns:r})=>{let a=d2e({token:t,graph:e,turns:r});if(n){const s=t.length-n;if(n===0||s===0)a*=2;else{let o=0;for(let i=1;i<=Math.min(n,s);i+=1)o+=Oa.nCk(n+s,i);a*=o}}return Math.round(a)},p2e=()=>FIe;const m2e=(e,t)=>{let n=1;return e.token.lengthch[e]?ch[e](t):Re.matchers[e]&&"scoring"in Re.matchers[e]?Re.matchers[e].scoring(t):0;var h2e=(e,t)=>{const n={};if("guesses"in e&&e.guesses!=null)return e;const r=m2e(e,t),a=E2e(e.pattern,e);let s=0;typeof a=="number"?s=a:e.pattern==="dictionary"&&(s=a.calculation,n.baseGuesses=a.baseGuesses,n.uppercaseVariations=a.uppercaseVariations,n.l33tVariations=a.l33tVariations);const o=Math.max(s,r);return{...e,...n,guesses:o,guessesLog10:Oa.log10(o)}};const pn={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const n=[];for(let r=0;r1&&(a*=this.optimal.pi[r.i-1][t-1]);let s=Oa.factorial(t)*a;this.excludeAdditive||(s+=yIe**(t-1));let o=!1;Object.keys(this.optimal.g[n]).forEach(i=>{const u=this.optimal.g[n][i];parseInt(i,10)<=t&&u<=s&&(o=!0)}),o||(this.optimal.g[n][t]=s,this.optimal.m[n][t]=r,this.optimal.pi[n][t]=a)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let n=1;n<=e;n+=1){t=this.makeBruteforceMatch(n,e);const r=this.optimal.m[n-1];Object.keys(r).forEach(a=>{r[a].pattern!=="bruteforce"&&this.update(t,parseInt(a,10)+1)})}},unwind(e){const t=[];let n=e-1,r=0,a=1/0;const s=this.optimal.g[n];for(s&&Object.keys(s).forEach(o=>{const i=s[o];i=0;){const o=this.optimal.m[n][r];t.unshift(o),n=o.i-1,r-=1}return t}};var jd={mostGuessableMatchSequence(e,t,n=!1){pn.password=e,pn.excludeAdditive=n;const r=e.length;let a=pn.fillArray(r,"array");t.forEach(u=>{a[u.j].push(u)}),a=a.map(u=>u.sort((l,c)=>l.i-c.i)),pn.optimal={m:pn.fillArray(r,"object"),pi:pn.fillArray(r,"object"),g:pn.fillArray(r,"object")};for(let u=0;u{l.i>0?Object.keys(pn.optimal.m[l.i-1]).forEach(c=>{pn.update(l,parseInt(c,10)+1)}):pn.update(l,1)}),pn.bruteforceUpdate(u);const s=pn.unwind(r),o=s.length,i=this.getGuesses(e,o);return{password:e,guesses:i,guessesLog10:Oa.log10(i),sequence:s}},getGuesses(e,t){const n=e.length;let r=0;return e.length===0?r=1:r=pn.optimal.g[n-1][t],r}};class _2e{match({password:t,omniMatch:n}){const r=[];let a=0;for(;ao instanceof Promise)?Promise.all(r):r}normalizeMatch(t,n,r,a){const s={pattern:"repeat",i:r.index,j:n,token:r[0],baseToken:t,baseGuesses:0,repeatCount:r[0].length/t.length};return a instanceof Promise?a.then(o=>({...s,baseGuesses:o})):{...s,baseGuesses:a}}getGreedyMatch(t,n){const r=/(.+)\1+/g;return r.lastIndex=n,r.exec(t)}getLazyMatch(t,n){const r=/(.+?)\1+/g;return r.lastIndex=n,r.exec(t)}setMatchToken(t,n){const r=/^(.+?)\1+$/;let a,s="";if(n&&t[0].length>n[0].length){a=t;const o=r.exec(a[0]);o&&(s=o[1])}else a=n,a&&(s=a[1]);return{match:a,baseToken:s}}getBaseGuesses(t,n){const r=n.match(t);return r instanceof Promise?r.then(s=>jd.mostGuessableMatchSequence(t,s).guesses):jd.mostGuessableMatchSequence(t,r).guesses}}class T2e{constructor(){this.MAX_DELTA=5}match({password:t}){const n=[];if(t.length===1)return[];let r=0,a=null;const s=t.length;for(let o=1;o1||Math.abs(r)===1){const o=Math.abs(r);if(o>0&&o<=this.MAX_DELTA){const i=a.slice(t,+n+1||9e9),{sequenceName:u,sequenceSpace:l}=this.getSequence(i);return s.push({pattern:"sequence",i:t,j:n,token:a.slice(t,+n+1||9e9),sequenceName:u,sequenceSpace:l,ascending:r>0})}}return null}getSequence(t){let n="unicode",r=26;return wIe.test(t)?(n="lower",r=26):PIe.test(t)?(n="upper",r=26):MIe.test(t)&&(n="digits",r=10),{sequenceName:n,sequenceSpace:r}}}class g2e{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const n=[];return Object.keys(Re.graphs).forEach(r=>{const a=Re.graphs[r];Hd(n,this.helper(t,a,r))}),ps(n)}checkIfShifted(t,n,r){return!t.includes("keypad")&&this.SHIFTED_RX.test(n.charAt(r))?1:0}helper(t,n,r){let a;const s=[];let o=0;const i=t.length;for(;o2&&s.push({pattern:"spatial",i:o,j:u-1,token:t.slice(o,u),graph:r,turns:c,shiftedCount:a}),o=u;break}}}return s}}const A2e=new RegExp(`[${LA.join("")}]`);class zu{static getMostUsedSeparatorChar(t){const n=[...t.split("").filter(a=>A2e.test(a)).reduce((a,s)=>{const o=a.get(s);return o?a.set(s,o+1):a.set(s,1),a},new Map).entries()].sort(([a,s],[o,i])=>i-s);if(!n.length)return;const r=n[0];if(!(r[1]<2))return r[0]}static getSeparatorRegex(t){return new RegExp(`([^${t}
-])(${t})(?!${t})`,"g")}match({password:t}){const n=[];if(t.length===0)return n;const r=zu.getMostUsedSeparatorChar(t);if(r===void 0)return n;const a=zu.getSeparatorRegex(r);for(const s of t.matchAll(a)){if(s.index===void 0)continue;const o=s.index+1;n.push({pattern:"separator",token:r,i:o,j:o})}return n}}class S2e{constructor(){this.matchers={date:WIe,dictionary:QIe,regex:JIe,repeat:_2e,sequence:T2e,spatial:g2e,separator:zu}}match(t){const n=[],r=[];return[...Object.keys(this.matchers),...Object.keys(Re.matchers)].forEach(s=>{if(!this.matchers[s]&&!Re.matchers[s])return;const o=this.matchers[s]?this.matchers[s]:Re.matchers[s].Matching,u=new o().match({password:t,omniMatch:this});u instanceof Promise?(u.then(l=>{Hd(n,l)}),r.push(u)):Hd(n,u)}),r.length>0?new Promise((s,o)=>{Promise.all(r).then(()=>{s(ps(n))}).catch(i=>{o(i)})}):ps(n)}}const $A=1,kA=$A*60,UA=kA*60,MA=UA*24,xA=MA*31,FA=xA*12,O2e=FA*100,Tl={second:$A,minute:kA,hour:UA,day:MA,month:xA,year:FA,century:O2e};class I2e{translate(t,n){let r=t;n!==void 0&&n!==1&&(r+="s");const{timeEstimation:a}=Re.translations;return a[r].replace("{base}",`${n}`)}estimateAttackTimes(t){const n={onlineThrottling100PerHour:t/.027777777777777776,onlineNoThrottling10PerSecond:t/10,offlineSlowHashing1e4PerSecond:t/1e4,offlineFastHashing1e10PerSecond:t/1e10},r={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(n).forEach(a=>{const s=n[a];r[a]=this.displayTime(s)}),{crackTimesSeconds:n,crackTimesDisplay:r,score:this.guessesToScore(t)}}guessesToScore(t){return t<1005?0:t<1000005?1:t<100000005?2:t<1e10+5?3:4}displayTime(t){let n="centuries",r;const a=Object.keys(Tl),s=a.findIndex(o=>t-1&&(n=a[s-1],s!==0?r=Math.round(t/Tl[n]):n="ltSecond"),this.translate(n,r)}}var v2e=()=>null,R2e=()=>({warning:Re.translations.warnings.dates,suggestions:[Re.translations.suggestions.dates]});const b2e=(e,t)=>{let n=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?n=Re.translations.warnings.topTen:e.rank<=100?n=Re.translations.warnings.topHundred:n=Re.translations.warnings.common:e.guessesLog10<=4&&(n=Re.translations.warnings.similarToCommon),n},N2e=(e,t)=>{let n=null;return t&&(n=Re.translations.warnings.wordByItself),n},C2e=(e,t)=>t?Re.translations.warnings.namesByThemselves:Re.translations.warnings.commonNames,y2e=(e,t)=>{let n=null;const r=e.dictionaryName,a=r==="lastnames"||r.toLowerCase().includes("firstnames");return r==="passwords"?n=b2e(e,t):r.includes("wikipedia")?n=N2e(e,t):a?n=C2e(e,t):r==="userInputs"&&(n=Re.translations.warnings.userInputs),n};var D2e=(e,t)=>{const n=y2e(e,t),r=[],a=e.token;return a.match(PA)?r.push(Re.translations.suggestions.capitalization):a.match(wA)&&a.toLowerCase()!==a&&r.push(Re.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&r.push(Re.translations.suggestions.reverseWords),e.l33t&&r.push(Re.translations.suggestions.l33t),{warning:n,suggestions:r}},P2e=e=>e.regexName==="recentYear"?{warning:Re.translations.warnings.recentYears,suggestions:[Re.translations.suggestions.recentYears,Re.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},w2e=e=>{let t=Re.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=Re.translations.warnings.simpleRepeat),{warning:t,suggestions:[Re.translations.suggestions.repeated]}},L2e=()=>({warning:Re.translations.warnings.sequences,suggestions:[Re.translations.suggestions.sequences]}),$2e=e=>{let t=Re.translations.warnings.keyPattern;return e.turns===1&&(t=Re.translations.warnings.straightRow),{warning:t,suggestions:[Re.translations.suggestions.longerKeyboardPattern]}},k2e=()=>null;const lh={warning:null,suggestions:[]};class U2e{constructor(){this.matchers={bruteforce:v2e,date:R2e,dictionary:D2e,regex:P2e,repeat:w2e,sequence:L2e,spatial:$2e,separator:k2e},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(Re.translations.suggestions.useWords,Re.translations.suggestions.noNeed)}getFeedback(t,n){if(n.length===0)return this.defaultFeedback;if(t>2)return lh;const r=Re.translations.suggestions.anotherWord,a=this.getLongestMatch(n);let s=this.getMatchFeedback(a,n.length===1);return s!=null?s.suggestions.unshift(r):s={warning:null,suggestions:[r]},s}getLongestMatch(t){let n=t[0];return t.slice(1).forEach(a=>{a.token.length>n.token.length&&(n=a)}),n}getMatchFeedback(t,n){return this.matchers[t.pattern]?this.matchers[t.pattern](t,n):Re.matchers[t.pattern]&&"feedback"in Re.matchers[t.pattern]?Re.matchers[t.pattern].feedback(t,n):lh}}const WA=()=>new Date().getTime(),M2e=(e,t,n)=>{const r=new U2e,a=new I2e,s=jd.mostGuessableMatchSequence(t,e),o=WA()-n,i=a.estimateAttackTimes(s.guesses);return{calcTime:o,...s,...i,feedback:r.getFeedback(i.score,s.sequence)}},x2e=(e,t)=>(t&&Re.extendUserInputsDictionary(t),new S2e().match(e)),F2e=(e,t)=>{const n=WA(),r=x2e(e,t);if(r instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return M2e(r,e,n)},W2e="modulepreload",G2e=function(e){return"/"+e},dh={},bt=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");a=Promise.all(n.map(o=>{if(o=G2e(o),o in dh)return;dh[o]=!0;const i=o.endsWith(".css"),u=i?'[rel="stylesheet"]':"";if(!!r)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===o&&(!i||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${u}`))return;const c=document.createElement("link");if(c.rel=i?"stylesheet":W2e,i||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),i)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})}))}return a.then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},z2e=async e=>{switch(e){case"fr":return await bt(()=>import("./password.fr-1uJe1-pR.js"),__vite__mapDeps([]));case"de":return await bt(()=>import("./password.de-qoep7B_f.js"),__vite__mapDeps([]));case"it":return await bt(()=>import("./password.it-ImDc22WR.js"),__vite__mapDeps([]));case"es":return await bt(()=>import("./password.es-es--6AdGpRj.js"),__vite__mapDeps([]));case"pl":return await bt(()=>import("./password.pl-Ipz4x2MM.js"),__vite__mapDeps([]));default:return await bt(()=>import("./password.en-lIq_N4yZ.js"),__vite__mapDeps([]))}},fh=async e=>{const t=await bt(()=>import("./password.common-7m77ow97.js"),__vite__mapDeps([])),n=await z2e(e),r={graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary}};Re.setOptions(r)},B2e=e=>{switch(e){case 2:return"AVERAGE";case 3:return"GOOD";case 4:return"STRONG";default:return"WEAK"}},H2e={class:"password-strength"},j2e=["value"],V2e={key:0,class:"password-strength-details"},K2e={class:"password-strength-value"},Y2e={key:0,class:"info-box"},q2e={class:"password-feedback"},X2e=Q({__name:"PasswordStength",props:{password:{}},setup(e){const t=e,{password:n}=_e(t),r=$e(),a=k(()=>r.getters[H.GETTERS.LANGUAGE]),s=k(()=>r.getters[Y.GETTERS.IS_SUCCESS]),o=ce(0),i=ce(""),u=ce([]),l=ce("0% 100%");It(async()=>await fh(a.value));function c(f){const d=F2e(f);o.value=d.score,i.value=B2e(o.value),u.value=d.feedback.suggestions,l.value=o.value*100/4+"% 100%"}return Fe(()=>a.value,async f=>{await fh(f)}),Fe(()=>n.value,async f=>{s.value?i.value="":c(f)}),(f,d)=>(T(),N("div",H2e,[p("input",{class:ge(["password-slider",`strength-${o.value}`]),style:Yr({backgroundSize:l.value}),type:"range",value:o.value,min:"0",max:"4",step:"1",tabindex:-1},null,14,j2e),i.value?(T(),N("div",V2e,[p("span",K2e,_(f.$t("user.PASSWORD_STRENGTH.LABEL"))+": "+_(f.$t(`user.PASSWORD_STRENGTH.${i.value}`)),1),u.value.length>0?(T(),N("div",Y2e,[p("ul",q2e,[(T(!0),N(Ie,null,xe(u.value,m=>(T(),N("li",{key:m},_(f.$t(`user.PASSWORD_STRENGTH.SUGGESTIONS.${m}`)),1))),128))])])):F("",!0)])):F("",!0)]))}}),Z2e=ae(X2e,[["__scopeId","data-v-1affb508"]]),Q2e=e=>(ut("data-v-ac528612"),e=e(),ct(),e),J2e={class:"password-input"},eve=["id","disabled","placeholder","required","type"],tve={class:"show-password"},nve={key:0,class:"form-info"},rve=Q2e(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),ave=Q({__name:"PasswordInput",props:{checkStrength:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{default:"password"},password:{default:""},placeholder:{},required:{type:Boolean,default:!1}},emits:["updatePassword","passwordError"],setup(e,{emit:t}){const n=e,{checkStrength:r,disabled:a,id:s,password:o,placeholder:i,required:u}=_e(n),l=ce(!1),c=ce(""),f=t;function d(){l.value=!l.value}function m(g){f("updatePassword",g.target.value)}function E(){f("passwordError")}return Fe(()=>o.value,g=>{g===""&&(c.value="",l.value=!1)}),(g,b)=>(T(),N("div",J2e,[Ke(p("input",{id:h(s),disabled:h(a),placeholder:h(i),required:h(u),type:l.value?"text":"password","onUpdate:modelValue":b[0]||(b[0]=v=>c.value=v),minlength:"8",onInput:m,onInvalid:E},null,40,eve),[[p2,c.value]]),p("div",tve,[p("button",{class:"transparent",onClick:Xe(d,["prevent"]),type:"button"},[K(_(g.$t(`user.${l.value?"HIDE":"SHOW"}_PASSWORD`))+" ",1),p("i",{class:ge(["fa",`fa-eye${l.value?"-slash":""}`]),"aria-hidden":"true"},null,2)])]),h(r)?(T(),N("div",nve,[rve,K(" "+_(g.$t("user.PASSWORD_INFO")),1)])):F("",!0),h(r)?(T(),te(Z2e,{key:1,password:c.value},null,8,["password"])):F("",!0)]))}}),Vd=ae(ave,[["__scopeId","data-v-ac528612"]]),O0=e=>(ut("data-v-8ebb5cd3"),e=e(),ct(),e),sve={id:"user-infos-edition"},ove={class:"profile-form form-box"},ive={key:1,class:"info-box success-message"},uve={class:"form-items",for:"email"},cve=["disabled"],lve={class:"form-items",for:"password-field"},dve={class:"form-items",for:"new-password-field"},fve={class:"form-buttons"},pve={class:"confirm",type:"submit"},mve={class:"data-export"},Eve={class:"info-box"},hve=O0(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),_ve={key:0,class:"data-export-archive"},Tve=O0(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),gve={key:1},Ave={key:2},Sve=O0(()=>p("i",{class:"fa fa-spinner fa-pulse","aria-hidden":"true"},null,-1)),Ove=Q({__name:"UserAccountEdition",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=$e(),a=xt({email:"",password:"",new_password:""}),s=k(()=>r.getters[Y.GETTERS.USER_LOADING]),o=k(()=>r.getters[H.GETTERS.APP_CONFIG]),i=k(()=>r.getters[Y.GETTERS.IS_SUCCESS]),u=ce(!1),l=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),c=ce(!1),f=ce(!1),d=k(()=>r.getters[Y.GETTERS.EXPORT_REQUEST]),m=k(()=>A()),E=ce(!1);gt(()=>{t.user&&(r.dispatch(Y.ACTIONS.GET_REQUEST_DATA_EXPORT),b(t.user))});function g(){c.value=!0}function b(B){a.email=B.email}function v(B){a.password=B}function R(B){a.new_password=B}function A(){return d.value?xn(d.value.created_at,n.value.timezone,n.value.date_format,!0,null,!0):null}function S(){return m.value?M3(new Date(m.value),W3(new Date,1)):!0}function C(){const B={email:a.email,password:a.password};a.new_password&&(B.new_password=a.new_password),u.value=a.email!==n.value.email,r.dispatch(Y.ACTIONS.UPDATE_USER_ACCOUNT,B)}function L(B){f.value=B}function $(B){r.dispatch(Y.ACTIONS.DELETE_ACCOUNT,{username:B})}function U(){r.dispatch(Y.ACTIONS.REQUEST_DATA_EXPORT)}async function G(B){E.value=!0,await Be.get(`/auth/account/export/${B}`,{responseType:"blob"}).then(w=>{const Z=window.URL.createObjectURL(new Blob([w.data],{type:"application/zip"})),J=document.createElement("a");J.href=Z,J.setAttribute("download",B),document.body.appendChild(J),J.click()}).finally(()=>E.value=!1)}return Rt(()=>{r.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!1),r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),Fe(()=>i.value,async B=>{B&&(v(""),R(""),b(n.value),c.value=!1)}),Fe(()=>n.value.email,async()=>{b(n.value)}),(B,w)=>{const Z=ue("Modal"),J=ue("ErrorMessage");return T(),N("div",sve,[f.value?(T(),te(Z,{key:0,title:B.$t("common.CONFIRMATION"),message:B.$t("user.CONFIRM_ACCOUNT_DELETION"),onConfirmAction:w[0]||(w[0]=re=>$(h(n).username)),onCancelAction:w[1]||(w[1]=re=>L(!1)),onKeydown:w[2]||(w[2]=At(re=>L(!1),["esc"]))},null,8,["title","message"])):F("",!0),p("div",ove,[l.value?(T(),te(J,{key:0,message:l.value},null,8,["message"])):F("",!0),i.value?(T(),N("div",ive,_(B.$t(`user.PROFILE.SUCCESSFUL_${u.value&&o.value.is_email_sending_enabled?"EMAIL_":""}UPDATE`)),1)):F("",!0),p("form",{class:ge({errors:c.value}),onSubmit:Xe(C,["prevent"])},[p("label",uve,[K(_(B.$t("user.EMAIL"))+"* ",1),Ke(p("input",{id:"email","onUpdate:modelValue":w[3]||(w[3]=re=>a.email=re),disabled:s.value,required:!0,onInvalid:g},null,40,cve),[[tt,a.email]])]),p("label",lve,[K(_(B.$t("user.CURRENT_PASSWORD"))+"* ",1),M(Vd,{id:"password-field",disabled:s.value,password:a.password,required:!0,onUpdatePassword:v,onPasswordError:g},null,8,["disabled","password"])]),p("label",dve,[K(_(B.$t("user.NEW_PASSWORD"))+" ",1),M(Vd,{id:"new-password-field",disabled:s.value,checkStrength:!0,password:a.new_password,isSuccess:!1,onUpdatePassword:R,onPasswordError:g},null,8,["disabled","password"])]),p("div",fve,[p("button",pve,_(B.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:w[4]||(w[4]=Xe(re=>B.$router.push("/profile"),["prevent"]))},_(B.$t("buttons.CANCEL")),1),p("button",{class:"danger",onClick:w[5]||(w[5]=Xe(re=>L(!0),["prevent"]))},_(B.$t("buttons.DELETE_MY_ACCOUNT")),1),S()?(T(),N("button",{key:0,class:"confirm",onClick:Xe(U,["prevent"])},_(B.$t("buttons.REQUEST_DATA_EXPORT")),1)):F("",!0)])],34),p("div",mve,[p("span",Eve,[hve,K(" "+_(B.$t("user.EXPORT_REQUEST.ONLY_ONE_EXPORT_PER_DAY")),1)]),d.value?(T(),N("div",_ve,[K(_(B.$t("user.EXPORT_REQUEST.DATA_EXPORT"))+" ("+_(m.value)+"): ",1),d.value.status==="successful"?(T(),N("span",{key:0,class:"archive-link",onClick:w[6]||(w[6]=Xe(re=>G(d.value.file_name),["prevent"]))},[Tve,K(" "+_(B.$t("user.EXPORT_REQUEST.DOWNLOAD_ARCHIVE"))+" ("+_(h(tu)(d.value.file_size))+") ",1)])):(T(),N("span",gve,_(B.$t(`user.EXPORT_REQUEST.STATUS.${d.value.status}`)),1)),E.value?(T(),N("span",Ave,[K(_(B.$t("user.EXPORT_REQUEST.GENERATING_LINK"))+" ",1),Sve])):F("",!0)])):F("",!0)])])])}}}),Ive=ae(Ove,[["__scopeId","data-v-8ebb5cd3"]]),vve={id:"user-infos-edition"},Rve={class:"profile-form form-box"},bve={class:"form-items",for:"registrationDate"},Nve=["value"],Cve={class:"form-items",for:"first_name"},yve=["disabled"],Dve={class:"form-items",for:"last_name"},Pve={class:"form-items",for:"birth_date"},wve=["disabled"],Lve={class:"form-items",for:"location"},$ve=["disabled"],kve={class:"form-items"},Uve={class:"form-buttons"},Mve={class:"confirm",type:"submit"},xve=Q({__name:"UserInfosEdition",props:{user:{}},setup(e){const t=e,n=$e(),r=xt({first_name:"",last_name:"",birth_date:"",location:"",bio:""}),a=k(()=>t.user.created_at?xn(t.user.created_at,t.user.timezone,t.user.date_format):""),s=k(()=>n.getters[Y.GETTERS.USER_LOADING]),o=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);gt(()=>{t.user&&i(t.user)});function i(c){r.first_name=c.first_name?c.first_name:"",r.last_name=c.last_name?c.last_name:"",r.birth_date=c.birth_date?ln(new Date(c.birth_date),"yyyy-MM-dd"):"",r.location=c.location?c.location:"",r.bio=c.bio?c.bio:""}function u(c){r.bio=c}function l(){n.dispatch(Y.ACTIONS.UPDATE_USER_PROFILE,r)}return Rt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(c,f)=>{const d=ue("ErrorMessage"),m=ue("CustomTextArea");return T(),N("div",vve,[p("div",Rve,[o.value?(T(),te(d,{key:0,message:o.value},null,8,["message"])):F("",!0),p("form",{onSubmit:Xe(l,["prevent"])},[p("label",bve,[K(_(c.$t("user.PROFILE.REGISTRATION_DATE"))+" ",1),p("input",{id:"registrationDate",value:a.value,disabled:""},null,8,Nve)]),p("label",Cve,[K(_(c.$t("user.PROFILE.FIRST_NAME"))+" ",1),Ke(p("input",{id:"first_name","onUpdate:modelValue":f[0]||(f[0]=E=>r.first_name=E),disabled:s.value},null,8,yve),[[tt,r.first_name]])]),p("label",Dve,[K(_(c.$t("user.PROFILE.LAST_NAME"))+" ",1),Ke(p("input",{id:"last_name","onUpdate:modelValue":f[1]||(f[1]=E=>r.last_name=E)},null,512),[[tt,r.last_name]])]),p("label",Pve,[K(_(c.$t("user.PROFILE.BIRTH_DATE"))+" ",1),Ke(p("input",{id:"birth_date",type:"date",class:"birth-date","onUpdate:modelValue":f[2]||(f[2]=E=>r.birth_date=E),disabled:s.value},null,8,wve),[[tt,r.birth_date]])]),p("label",Lve,[K(_(c.$t("user.PROFILE.LOCATION"))+" ",1),Ke(p("input",{id:"location","onUpdate:modelValue":f[3]||(f[3]=E=>r.location=E),disabled:s.value},null,8,$ve),[[tt,r.location]])]),p("label",kve,[K(_(c.$t("user.PROFILE.BIO"))+" ",1),M(m,{name:"bio",charLimit:200,input:r.bio,disabled:s.value,onUpdateValue:u},null,8,["input","disabled"])]),p("div",Uve,[p("button",Mve,_(c.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:f[4]||(f[4]=Xe(E=>c.$router.push("/profile"),["prevent"]))},_(c.$t("buttons.CANCEL")),1)])],32)])])}}}),Fve=ae(xve,[["__scopeId","data-v-5f5c8fca"]]),Wve=e=>(ut("data-v-8f62d42f"),e=e(),ct(),e),Gve={id:"user-picture-edition"},zve={class:"user-picture-form"},Bve={class:"picture-help"},Hve={class:"info-box"},jve=Wve(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),Vve={class:"picture-buttons"},Kve=["disabled"],Yve=Q({__name:"UserPictureEdition",props:{user:{}},setup(e){const t=e,n=$e(),{user:r}=_e(t),a=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),s=k(()=>n.getters[H.GETTERS.APP_CONFIG]),o=s.value.max_single_file_size?tu(s.value.max_single_file_size):"",i=ce(null);function u(){n.dispatch(Y.ACTIONS.DELETE_PICTURE)}function l(f){f.target.files!==null&&(i.value=f.target.files[0])}function c(){i.value&&n.dispatch(Y.ACTIONS.UPDATE_USER_PICTURE,{picture:i.value})}return Rt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(f,d)=>{const m=ue("ErrorMessage");return T(),N("div",Gve,[p("div",zve,[a.value?(T(),te(m,{key:0,message:a.value},null,8,["message"])):F("",!0),M(Lo,{user:h(r)},null,8,["user"]),p("form",{onSubmit:Xe(c,["prevent"])},[p("input",{type:"file",name:"picture",accept:".png,.jpg,.gif",onInput:l},null,32),p("div",Bve,[p("span",Hve,[jve,K(" "+_(f.$t("workouts.MAX_SIZE"))+": "+_(h(o)),1)])]),p("div",Vve,[p("button",{type:"submit",disabled:!i.value},_(f.$t("user.PROFILE.PICTURE_UPDATE")),9,Kve),h(r).picture?(T(),N("button",{key:0,class:"danger",onClick:u},_(f.$t("user.PROFILE.PICTURE_REMOVE")),1)):F("",!0),p("button",{class:"cancel",onClick:d[0]||(d[0]=E=>f.$router.push("/profile"))},_(f.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],32)])])}}}),qve=ae(Yve,[["__scopeId","data-v-8f62d42f"]]),Xve=["Africa/Abidjan","Africa/Accra","Africa/Algiers","Africa/Bissau","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/El_Aaiun","Africa/Johannesburg","Africa/Juba","Africa/Khartoum","Africa/Lagos","Africa/Maputo","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fortaleza","America/Fort_Nelson","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/La_Paz","America/Lima","America/Los_Angeles","America/Maceio","America/Managua","America/Manaus","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Johns","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Helsinki","Europe/Istanbul","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zaporozhye","Europe/Zurich","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],Zve={id:"tz-dropdown"},Qve=["value","disabled"],Jve=["onClick","onMouseover","autofocus"],eRe=Q({__name:"TimezoneDropdown",props:{input:{},disabled:{type:Boolean,default:!1}},emits:["updateTimezone"],setup(e,{emit:t}){const n=e,r=t,{input:a,disabled:s}=_e(n),o=ce(a.value),i=ce(!1),u=ce(null),l=ce(0);function c(g){return g.toLowerCase().match(o.value.toLowerCase())}function f(g){l.value=g}function d(g){o.value=g,i.value=!1,r("updateTimezone",g)}function m(g){var b,v,R,A;g.preventDefault(),(v=(b=u.value)==null?void 0:b.firstElementChild)!=null&&v.innerHTML&&d((A=(R=u.value)==null?void 0:R.firstElementChild)==null?void 0:A.innerHTML)}function E(g){g.preventDefault(),i.value=!0,o.value=g.target.value.trim()}return Fe(()=>n.input,g=>{o.value=g}),(g,b)=>(T(),N("div",Zve,[p("input",{class:"tz-dropdown-input",id:"timezone",name:"timezone",value:o.value,disabled:h(s),required:"",onKeydown:[b[0]||(b[0]=At(v=>d(h(a)),["esc"])),At(m,["enter"])],onInput:E},null,40,Qve),i.value?(T(),N("ul",{key:0,class:"tz-dropdown-list",ref_key:"tzList",ref:u},[(T(!0),N(Ie,null,xe(h(Xve).filter(v=>c(v)),(v,R)=>(T(),N("li",{key:v,class:ge(["tz-dropdown-item",{focus:R===l.value}]),onClick:A=>d(v),onMouseover:A=>f(R),autofocus:R===l.value},_(v),43,Jve))),128))],512)):F("",!0)]))}}),tRe=ae(eRe,[["__scopeId","data-v-0ed9f402"]]),nRe=e=>(ut("data-v-e38a969e"),e=e(),ct(),e),rRe={id:"user-preferences-edition"},aRe={class:"profile-form form-box"},sRe={class:"preferences-section"},oRe={class:"form-items"},iRe=["disabled"],uRe=["value"],cRe={class:"form-items"},lRe=["disabled"],dRe=["value"],fRe={class:"form-items"},pRe={class:"form-items"},mRe=["disabled"],ERe=["value"],hRe={class:"form-items form-checkboxes"},_Re={class:"checkboxes-label"},TRe={class:"checkboxes"},gRe=["id","name","checked","disabled","onInput"],ARe={class:"checkbox-label"},SRe={class:"preferences-section"},ORe={class:"form-items form-checkboxes"},IRe={class:"checkboxes-label"},vRe={class:"checkboxes"},RRe=["id","name","checked","disabled","onInput"],bRe={class:"checkbox-label"},NRe={class:"form-items form-checkboxes"},CRe={class:"checkboxes-label"},yRe={class:"checkboxes"},DRe=["id","name","checked","disabled","onInput"],PRe={class:"checkbox-label"},wRe={class:"form-items form-checkboxes"},LRe={class:"checkboxes-label"},$Re={class:"checkboxes"},kRe=["id","name","checked","disabled","onInput"],URe={class:"checkbox-label"},MRe={class:"form-items form-checkboxes"},xRe={class:"checkboxes-label"},FRe={class:"checkboxes"},WRe=["id","name","checked","disabled","onInput"],GRe={class:"checkbox-label"},zRe={class:"info-box raw-speed-help"},BRe=nRe(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),HRe={class:"form-buttons"},jRe={class:"confirm",type:"submit"},VRe=Q({__name:"UserPreferencesEdition",props:{user:{}},setup(e){const t=e,n=$e(),r=xt({display_ascent:!0,imperial_units:!1,language:"en",timezone:"Europe/Paris",date_format:"dd/MM/yyyy",weekm:!1,start_elevation_at_zero:!1,use_raw_gpx_speed:!1,use_dark_mode:!1}),a=[{label:"SUNDAY",value:!1},{label:"MONDAY",value:!0}],s=[{label:"METRIC",value:!1},{label:"IMPERIAL",value:!0}],o=[{label:"DISPLAYED",value:!0},{label:"HIDDEN",value:!1}],i=[{label:"ZERO",value:!0},{label:"MIN_ALT",value:!1}],u=[{label:"FILTERED_SPEED",value:!1},{label:"RAW_SPEED",value:!0}],l=[{label:"DARK",value:!0},{label:"DEFAULT",value:null},{label:"LIGHT",value:!1}],c=k(()=>n.getters[Y.GETTERS.USER_LOADING]),f=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),d=k(()=>NSe(new Date().toUTCString(),t.user.timezone,r.language));gt(()=>{t.user&&m(t.user)});function m(C){r.display_ascent=C.display_ascent,r.start_elevation_at_zero=C.start_elevation_at_zero?C.start_elevation_at_zero:!1,r.use_raw_gpx_speed=C.use_raw_gpx_speed?C.use_raw_gpx_speed:!1,r.imperial_units=C.imperial_units?C.imperial_units:!1,r.language=C.language?C.language:"en",r.timezone=C.timezone?C.timezone:"Europe/Paris",r.date_format=C.date_format?C.date_format:"dd/MM/yyyy",r.weekm=C.weekm?C.weekm:!1,r.use_dark_mode=C.use_dark_mode}function E(){n.dispatch(Y.ACTIONS.UPDATE_USER_PREFERENCES,r)}function g(C){r.timezone=C}function b(C){r.start_elevation_at_zero=C}function v(C){r.use_raw_gpx_speed=C}function R(C){r.display_ascent=C}function A(C){r.imperial_units=C}function S(C){r.weekm=C}return Rt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(C,L)=>{const $=ue("ErrorMessage");return T(),N("div",rRe,[p("div",aRe,[f.value?(T(),te($,{key:0,message:f.value},null,8,["message"])):F("",!0),p("form",{onSubmit:Xe(E,["prevent"])},[p("div",sRe,_(C.$t("user.PROFILE.INTERFACE")),1),p("label",oRe,[K(_(C.$t("user.PROFILE.LANGUAGE"))+" ",1),Ke(p("select",{id:"language","onUpdate:modelValue":L[0]||(L[0]=U=>r.language=U),disabled:c.value},[(T(!0),N(Ie,null,xe(h(ud),U=>(T(),N("option",{value:U.value,key:U.value},_(U.label),9,uRe))),128))],8,iRe),[[js,r.language]])]),p("label",cRe,[K(_(C.$t("user.PROFILE.THEME_MODE.LABEL"))+" ",1),Ke(p("select",{id:"use_dark_mode","onUpdate:modelValue":L[1]||(L[1]=U=>r.use_dark_mode=U),disabled:c.value},[(T(),N(Ie,null,xe(l,U=>p("option",{value:U.value,key:U.label},_(C.$t(`user.PROFILE.THEME_MODE.VALUES.${U.label}`)),9,dRe)),64))],8,lRe),[[js,r.use_dark_mode]])]),p("label",fRe,[K(_(C.$t("user.PROFILE.TIMEZONE"))+" ",1),M(tRe,{input:r.timezone,disabled:c.value,onUpdateTimezone:g},null,8,["input","disabled"])]),p("label",pRe,[K(_(C.$t("user.PROFILE.DATE_FORMAT"))+" ",1),Ke(p("select",{id:"date_format","onUpdate:modelValue":L[2]||(L[2]=U=>r.date_format=U),disabled:c.value},[(T(!0),N(Ie,null,xe(d.value,U=>(T(),N("option",{value:U.value,key:U.value},_(U.label),9,ERe))),128))],8,mRe),[[js,r.date_format]])]),p("div",hRe,[p("span",_Re,_(C.$t("user.PROFILE.FIRST_DAY_OF_WEEK")),1),p("div",TRe,[(T(),N(Ie,null,xe(a,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.weekm,disabled:c.value,onInput:G=>S(U.value)},null,40,gRe),p("span",ARe,_(C.$t(`user.PROFILE.${U.label}`)),1)])),64))])]),p("div",SRe,_(C.$t("workouts.WORKOUT",0)),1),p("div",ORe,[p("span",IRe,_(C.$t("user.PROFILE.UNITS.LABEL")),1),p("div",vRe,[(T(),N(Ie,null,xe(s,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.imperial_units,disabled:c.value,onInput:G=>A(U.value)},null,40,RRe),p("span",bRe,_(C.$t(`user.PROFILE.UNITS.${U.label}`)),1)])),64))])]),p("div",NRe,[p("span",CRe,_(C.$t("user.PROFILE.ASCENT_DATA")),1),p("div",yRe,[(T(),N(Ie,null,xe(o,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.display_ascent,disabled:c.value,onInput:G=>R(U.value)},null,40,DRe),p("span",PRe,_(C.$t(`common.${U.label}`)),1)])),64))])]),p("div",wRe,[p("span",LRe,_(C.$t("user.PROFILE.ELEVATION_CHART_START.LABEL")),1),p("div",$Re,[(T(),N(Ie,null,xe(i,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.start_elevation_at_zero,disabled:c.value,onInput:G=>b(U.value)},null,40,kRe),p("span",URe,_(C.$t(`user.PROFILE.ELEVATION_CHART_START.${U.label}`)),1)])),64))])]),p("div",MRe,[p("span",xRe,_(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL")),1),p("div",FRe,[(T(),N(Ie,null,xe(u,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.use_raw_gpx_speed,disabled:c.value,onInput:G=>v(U.value)},null,40,WRe),p("span",GRe,_(C.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${U.label}`)),1)])),64))]),p("div",zRe,[p("span",null,[BRe,K(" "+_(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),p("div",HRe,[p("button",jRe,_(C.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:L[3]||(L[3]=Xe(U=>C.$router.push("/profile/preferences"),["prevent"]))},_(C.$t("buttons.CANCEL")),1)])],32)])])}}}),KRe=ae(VRe,[["__scopeId","data-v-e38a969e"]]),YRe={class:"privacy-policy-text"},qRe={class:"last-update"},XRe=["innerHTML"],ZRe=["innerHTML"],QRe="Sun, 26 Feb 2023 17:00:00 GMT",JRe=Q({__name:"PrivacyPolicy",setup(e){const t=$e(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),r=k(()=>t.getters[H.GETTERS.LANGUAGE]),a=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),s=k(()=>c()),o=k(()=>l()),i=k(()=>f()),u=["DATA_COLLECTED","INFORMATION_USAGE","INFORMATION_PROTECTION","INFORMATION_DISCLOSURE","SITE_USAGE_BY_CHILDREN","YOUR_CONSENT","ACCOUNT_DELETION","CHANGES_TO_OUR_PRIVACY_POLICY"];function l(){return a.value.timezone?a.value.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone?Intl.DateTimeFormat().resolvedOptions().timeZone:"Europe/Paris"}function c(){return IA[r.value]}function f(){return xn(n.value.privacy_policy&&n.value.privacy_policy_date?`${n.value.privacy_policy_date}`:QRe,o.value,s.value,!1)}return(d,m)=>(T(),N("div",YRe,[p("h1",null,_(St(d.$t("privacy_policy.TITLE"))),1),p("p",qRe,[K(_(d.$t("privacy_policy.LAST_UPDATE"))+": ",1),p("time",null,_(i.value),1)]),n.value.privacy_policy?(T(),N("div",{key:0,innerHTML:h(ma)(h(vo)(n.value.privacy_policy))},null,8,XRe)):(T(),N(Ie,{key:1},xe(u,E=>(T(),N(Ie,{key:E},[p("h2",null,_(d.$t(`privacy_policy.CONTENT.${E}.TITLE`)),1),p("p",{innerHTML:h(ma)(d.$t(`privacy_policy.CONTENT.${E}.CONTENT`))},null,8,ZRe)],64))),64))]))}}),GA=ae(JRe,[["__scopeId","data-v-31d5cd27"]]),ebe={id:"user-privacy-policy"},tbe={key:1},nbe={class:"policy-content"},rbe={for:"accepted_policy",class:"accepted_policy"},abe={class:"form-buttons"},sbe={class:"confirm",type:"submit"},obe=Q({__name:"UserPrivacyPolicyValidation",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=$e(),a=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),s=ce(!1);function o(){r.dispatch(Y.ACTIONS.ACCEPT_PRIVACY_POLICY,s.value)}return Rt(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(i,u)=>{const l=ue("ErrorMessage"),c=ue("router-link"),f=ue("i18n-t");return T(),N("div",ebe,[a.value?(T(),te(l,{key:0,message:a.value},null,8,["message"])):F("",!0),h(n).accepted_privacy_policy?(T(),N("div",tbe,[p("p",null,[M(f,{keypath:"user.YOU_HAVE_ACCEPTED_PRIVACY_POLICY"},{default:fe(()=>[M(c,{to:"/privacy-policy"},{default:fe(()=>[K(_(i.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})]),p("button",{class:"cancel",onClick:u[0]||(u[0]=d=>i.$router.push("/profile"))},_(i.$t("user.PROFILE.BACK_TO_PROFILE")),1)])):(T(),N("form",{key:2,onSubmit:u[3]||(u[3]=Xe(d=>o(),["prevent"]))},[p("div",nbe,[M(GA)]),p("label",rbe,[Ke(p("input",{type:"checkbox",id:"accepted_policy",required:"","onUpdate:modelValue":u[1]||(u[1]=d=>s.value=d)},null,512),[[hf,s.value]]),p("span",null,[M(f,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:fe(()=>[K(_(i.$t("privacy_policy.TITLE")),1)]),_:1})])]),M(c,{to:"/profile/edit/account"},{default:fe(()=>[K(_(i.$t("user.I_WANT_TO_DELETE_MY_ACCOUNT")),1)]),_:1}),p("div",abe,[p("button",sbe,_(i.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:u[2]||(u[2]=d=>i.$router.push("/profile"))},_(i.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],32))])}}}),ibe=ae(obe,[["__scopeId","data-v-a70349ce"]]),ube=["profile:read","profile:write","users:read","users:write","workouts:read","workouts:write"],cbe=["application:write"],lbe={id:"new-oauth2-app"},dbe={id:"new-oauth2-title"},fbe={id:"apps-form"},pbe={class:"form-items"},mbe={class:"form-item"},Ebe={for:"app-name"},hbe={class:"form-item"},_be={for:"app-description"},Tbe={class:"form-item"},gbe={for:"app-url"},Abe={class:"form-item"},Sbe={for:"app-redirect-uri"},Obe={class:"form-item-scope"},Ibe={class:"form-item-scope-label"},vbe={class:"scope-label"},Rbe=["name","checked","onChange"],bbe=["innerHTML"],Nbe={class:"form-buttons"},Cbe=["disabled"],ybe=Q({__name:"AddUserApp",props:{authUser:{}},setup(e){const t=e,n=$e(),r=xt({client_name:"",client_uri:"",client_description:"",description:"",redirect_uri:""}),a=xt([]),s=k(()=>l(t.authUser,cbe,ube));function o(){const c={client_name:r.client_name,client_description:r.client_description,client_uri:r.client_uri,redirect_uris:[r.redirect_uri],scope:a.sort().join(" ")};n.dispatch(Ve.ACTIONS.CREATE_CLIENT,c)}function i(c){r.client_description=c}function u(c){const f=a.indexOf(c);f>-1?a.splice(f,1):a.push(c)}function l(c,f,d){const m=[...d];return c.admin&&m.push(...f),m.sort()}return(c,f)=>{const d=ue("CustomTextArea");return T(),N("div",lbe,[p("h1",dbe,_(c.$t("oauth2.ADD_A_NEW_APP")),1),p("div",fbe,[p("form",{onSubmit:Xe(o,["prevent"])},[p("div",pbe,[p("div",mbe,[p("label",Ebe,_(c.$t("oauth2.APP.NAME"))+"*",1),Ke(p("input",{id:"app-name",type:"text",required:"","onUpdate:modelValue":f[0]||(f[0]=m=>r.client_name=m)},null,512),[[tt,r.client_name]])]),p("div",hbe,[p("label",_be,_(c.$t("oauth2.APP.DESCRIPTION")),1),M(d,{name:"app-description",charLimit:200,input:r.description,onUpdateValue:i},null,8,["input"])]),p("div",Tbe,[p("label",gbe,_(c.$t("oauth2.APP.URL"))+"*",1),Ke(p("input",{id:"app-url",type:"text",required:"","onUpdate:modelValue":f[1]||(f[1]=m=>r.client_uri=m)},null,512),[[tt,r.client_uri]])]),p("div",Abe,[p("label",Sbe,_(c.$t("oauth2.APP.REDIRECT_URL"))+"* ",1),Ke(p("input",{id:"app-redirect-uri",type:"text",required:"","onUpdate:modelValue":f[2]||(f[2]=m=>r.redirect_uri=m)},null,512),[[tt,r.redirect_uri]])]),p("div",Obe,[p("div",Ibe,_(c.$t("oauth2.APP.SCOPE.LABEL"))+"* ",1),(T(!0),N(Ie,null,xe(s.value,m=>(T(),N("div",{class:"form-item-scope-checkboxes",key:m},[p("label",vbe,[p("input",{type:"checkbox",name:m,checked:a.includes(m),onChange:E=>u(m)},null,40,Rbe),p("code",null,_(m),1)]),p("p",{class:"scope-description",innerHTML:c.$t(`oauth2.APP.SCOPE.${m}_DESCRIPTION`)},null,8,bbe)]))),128))])]),p("div",Nbe,[p("button",{class:"confirm",type:"submit",disabled:a.length===0},_(c.$t("buttons.SUBMIT")),9,Cbe),p("button",{class:"cancel",onClick:f[3]||(f[3]=Xe(()=>c.$router.push("/profile/apps"),["prevent"]))},_(c.$t("buttons.CANCEL")),1)])],32)])])}}}),Dbe=ae(ybe,[["__scopeId","data-v-e2284e06"]]),Pbe={id:"authorize-oauth2-app"},wbe={key:0},Lbe={id:"authorize-oauth2-title"},$be={class:"oauth2-access description-list"},kbe={class:"client-scope"},Ube=["innerHTML"],Mbe={class:"authorize-oauth2-buttons"},xbe={key:1},Fbe={class:"no-app"},Wbe=Q({__name:"AuthorizeUserApp",setup(e){const t=Vt(),n=$e(),r=k(()=>n.getters[Ve.GETTERS.CLIENT]),a=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);It(()=>s());function s(){t.query.client_id&&typeof t.query.client_id=="string"&&n.dispatch(Ve.ACTIONS.GET_CLIENT_BY_CLIENT_ID,t.query.client_id)}function o(){n.dispatch(Ve.ACTIONS.AUTHORIZE_CLIENT,{client_id:`${t.query.client_id}`,redirect_uri:`${t.query.redirect_uri}`,response_type:`${t.query.response_type}`,scope:`${t.query.scope}`,state:`${t.query.state?t.query.state:""}`,code_challenge:`${t.query.code_challenge?t.query.code_challenge:""}`,code_challenge_method:`${t.query.code_challenge_method?t.query.code_challenge_method:""}`})}return(i,u)=>{const l=ue("router-link"),c=ue("i18n-t"),f=ue("ErrorMessage");return T(),N("div",Pbe,[r.value.client_id?(T(),N("div",wbe,[p("h1",Lbe,[M(c,{keypath:"oauth2.AUTHORIZE_APP"},{default:fe(()=>[M(l,{to:{name:"UserApp",params:{id:r.value.id}}},{default:fe(()=>[K(_(r.value.name),1)]),_:1},8,["to"])]),_:1})]),a.value?(T(),te(f,{key:0,message:a.value},null,8,["message"])):F("",!0),p("div",$be,[p("p",null,_(i.$t("oauth2.APP_REQUESTING_ACCESS")),1),p("dl",null,[(T(!0),N(Ie,null,xe(r.value.scope.split(" "),d=>(T(),N(Ie,{key:d},[p("dt",kbe,[p("code",null,_(d),1)]),p("dd",{innerHTML:i.$t(`oauth2.APP.SCOPE.${d}_DESCRIPTION`)},null,8,Ube)],64))),128))]),p("div",Mbe,[p("button",{class:"danger",onClick:o},_(i.$t("buttons.AUTHORIZE")),1),p("button",{class:"cancel",onClick:u[0]||(u[0]=d=>i.$router.push("/profile/apps"))},_(i.$t("buttons.CANCEL")),1)])])])):(T(),N("div",xbe,[p("p",Fbe,_(i.$t("oauth2.NO_APP")),1),p("button",{onClick:u[1]||(u[1]=d=>i.$router.push("/profile/apps"))},_(i.$t("buttons.BACK")),1)]))])}}}),Gbe=ae(Wbe,[["__scopeId","data-v-a8ed6bf8"]]),zbe={id:"oauth2-apps"},Bbe=Q({__name:"index",props:{user:{}},setup(e){const t=e,n=$e(),{user:r}=_e(t);return Rt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Ve.MUTATIONS.SET_CLIENTS,[])}),(a,s)=>{const o=ue("router-view");return T(),N("div",zbe,[M(o,{authUser:h(r)},null,8,["authUser"])])}}}),Hbe={id:"oauth2-app",class:"description-list"},jbe={key:1},Vbe={key:0,class:"info-box success-message"},Kbe=["title"],Ybe={key:0},qbe={key:1,class:"app-secret"},Xbe=["title"],Zbe={class:"client-scopes"},Qbe={class:"app-buttons"},Jbe={key:2},eNe={class:"no-app"},tNe=Q({__name:"UserApp",props:{authUser:{},afterCreation:{type:Boolean,default:!1}},setup(e){const t=e,n=Vt(),r=$e(),{afterCreation:a,authUser:s}=_e(t),o=k(()=>r.getters[Ve.GETTERS.CLIENT]),i=k(()=>r.getters[Ve.GETTERS.REVOCATION_SUCCESSFUL]),u=ce(!1),l=ce(""),c=ce(!1),f=ce(!1),d=ce(!1);It(()=>{m(),navigator.clipboard&&(d.value=!0)});function m(){!a.value&&n.params.id&&typeof n.params.id=="string"&&r.dispatch(Ve.ACTIONS.GET_CLIENT_BY_ID,+n.params.id)}function E(A){l.value=A?"oauth2.APP_DELETION_CONFIRMATION":"oauth2.TOKENS_REVOCATION_CONFIRMATION",g(!0)}function g(A){u.value=A,A||(l.value="")}function b(A){l.value==="oauth2.APP_DELETION_CONFIRMATION"?r.dispatch(Ve.ACTIONS.DELETE_CLIENT,A):r.dispatch(Ve.ACTIONS.REVOKE_ALL_TOKENS,A)}function v(){navigator.clipboard.writeText(o.value.client_id),c.value=!0,f.value=!1,setTimeout(()=>{c.value=!1},3e3)}function R(){o.value.client_secret&&(navigator.clipboard.writeText(o.value.client_secret),f.value=!0,c.value=!1,setTimeout(()=>{f.value=!1},3e3))}return Rt(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.commit(Ve.MUTATIONS.EMPTY_CLIENT),r.commit(Ve.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1)}),Fe(()=>i.value,A=>{A&&g(!1)}),(A,S)=>{const C=ue("Modal");return T(),N("div",Hbe,[u.value?(T(),te(C,{key:0,title:A.$t("common.CONFIRMATION"),message:A.$t(l.value),onConfirmAction:S[0]||(S[0]=L=>b(o.value.id)),onCancelAction:S[1]||(S[1]=L=>g(!1)),onKeydown:S[2]||(S[2]=At(L=>g(!1),["esc"]))},null,8,["title","message"])):F("",!0),o.value&&o.value.client_id?(T(),N("div",jbe,[h(a)||i.value?(T(),N("div",Vbe,_(A.$t(h(a)?"oauth2.APP_CREATED_SUCCESSFULLY":"oauth2.TOKENS_REVOKED")),1)):F("",!0),p("dl",null,[p("dt",null,_(A.$t("oauth2.APP.CLIENT_ID"))+":",1),p("dd",null,[K(_(o.value.client_id)+" ",1),h(a)&&d.value?(T(),N("i",{key:0,class:ge(`fa fa-${c.value?"check":"copy"}`),"aria-hidden":"true",title:A.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:v},null,10,Kbe)):F("",!0)]),h(a)&&o.value.client_secret?(T(),N("dt",Ybe,_(A.$t("oauth2.APP.CLIENT_SECRET"))+": ",1)):F("",!0),h(a)&&o.value.client_secret?(T(),N("dd",qbe,[K(_(o.value.client_secret)+" ",1),d.value?(T(),N("i",{key:0,class:ge(`fa fa-${f.value?"check":"copy"}`),"aria-hidden":"true",title:A.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:R},null,10,Xbe)):F("",!0)])):F("",!0),p("dt",null,_(St(A.$t("oauth2.APP.ISSUE_AT")))+":",1),p("dd",null,[p("time",null,_(h(xn)(o.value.issued_at,h(s).timezone,h(s).date_format)),1)]),p("dt",null,_(A.$t("oauth2.APP.NAME"))+":",1),p("dd",null,_(o.value.name),1),p("dt",null,_(A.$t("oauth2.APP.DESCRIPTION"))+":",1),p("dd",{class:ge({"no-description":!o.value.client_description})},_(o.value.client_description?o.value.client_description:A.$t("oauth2.NO_DESCRIPTION")),3),p("dt",null,_(A.$t("oauth2.APP.URL"))+":",1),p("dd",null,_(o.value.website),1),p("dt",null,_(A.$t("oauth2.APP.REDIRECT_URL"))+":",1),p("dd",null,_(o.value.redirect_uris.length>0?o.value.redirect_uris[0]:""),1),p("dt",null,_(A.$t("oauth2.APP.SCOPE.LABEL"))+":",1),p("dd",Zbe,[(T(!0),N(Ie,null,xe(o.value.scope.split(" "),L=>(T(),N("span",{class:"client-scope",key:L},[p("code",null,_(L),1)]))),128))])]),p("div",Qbe,[p("button",{class:"danger",onClick:S[3]||(S[3]=L=>E(!1))},_(A.$t("oauth2.REVOKE_ALL_TOKENS")),1),p("button",{class:"danger",onClick:S[4]||(S[4]=L=>E(!0))},_(A.$t("oauth2.DELETE_APP")),1),p("button",{onClick:S[5]||(S[5]=L=>A.$router.push("/profile/apps"))},_(A.$t("buttons.BACK")),1)])])):(T(),N("div",Jbe,[p("p",eNe,_(A.$t("oauth2.NO_APP")),1),p("button",{onClick:S[6]||(S[6]=L=>A.$router.push("/profile/apps"))},_(A.$t("buttons.BACK")),1)]))])}}}),ph=ae(tNe,[["__scopeId","data-v-3a7d0f4a"]]),nNe={id:"oauth2-apps-list"},rNe={class:"apps-list"},aNe={key:0},sNe={class:"app-issued-at"},oNe={key:1,class:"no-apps"},iNe={class:"app-list-buttons"},uNe=Q({__name:"UserAppsList",props:{authUser:{}},setup(e){const t=e,n=$e(),r=Vt(),{authUser:a}=_e(t),s=k(()=>n.getters[Ve.GETTERS.CLIENTS]),o=k(()=>n.getters[Ve.GETTERS.CLIENTS_PAGINATION]);let i=u(r.query);It(()=>{l(i)});function u(c){const f={};return c.page&&(f.page=Fd(c.page,_A)),f}function l(c){n.dispatch(Ve.ACTIONS.GET_CLIENTS,c)}return Fe(()=>r.query,async c=>{i=u(c),l(i)}),(c,f)=>{const d=ue("router-link");return T(),N("div",nNe,[p("p",rNe,_(c.$t("oauth2.APPS_LIST")),1),s.value.length>0?(T(),N("ul",aNe,[(T(!0),N(Ie,null,xe(s.value,m=>(T(),N("li",{key:m.client_id},[M(d,{to:{name:"UserApp",params:{id:m.id}}},{default:fe(()=>[K(_(m.name),1)]),_:2},1032,["to"]),p("span",sNe,[K(_(c.$t("oauth2.APP.ISSUE_AT"))+" ",1),p("time",null,_(h(xn)(m.issued_at,h(a).timezone,h(a).date_format)),1)])]))),128))])):(T(),N("div",oNe,_(c.$t("oauth2.NO_APPS")),1)),s.value.length>0?(T(),te(Wu,{key:2,pagination:o.value,path:"/profile/apps",query:h(i)},null,8,["pagination","query"])):F("",!0),p("div",iNe,[p("button",{onClick:f[0]||(f[0]=m=>c.$router.push("/profile/apps/new"))},_(c.$t("oauth2.NEW_APP")),1),p("button",{onClick:f[1]||(f[1]=m=>c.$router.push("/"))},_(c.$t("common.HOME")),1)])])}}}),cNe=ae(uNe,[["__scopeId","data-v-064a87b7"]]),lNe={id:"user-sport-preferences"},dNe={key:0,class:"responsive-table"},fNe={class:"mobile-display"},pNe={key:0,class:"profile-buttons mobile-display"},mNe={key:1,class:"profile-buttons"},ENe={class:"text-left"},hNe={key:0},_Ne={class:"cell-heading"},TNe=["value"],gNe={class:"cell-heading"},ANe={key:0,class:"disabled-message"},SNe={key:1,class:"fa fa-refresh fa-spin fa-fw"},ONe={class:"cell-heading"},INe={class:"cell-heading"},vNe=["checked"],RNe={class:"cell-heading"},bNe=["value"],NNe={key:1},CNe={key:0,class:"action-buttons"},yNe={class:"cell-heading"},DNe=["onClick"],PNe={key:1,class:"edition-buttons"},wNe=["disabled"],LNe=["disabled","onClick"],$Ne=["disabled"],kNe={key:0,class:"profile-buttons"},UNe={key:1,class:"profile-buttons"},MNe="#838383",xNe=Q({__name:"UserSportPreferences",props:{user:{},isEdition:{type:Boolean}},setup(e){const t=e,n=$e(),{t:r}=jt(),{isEdition:a,user:s}=_e(t),o=ht("sportColors"),i=k(()=>n.getters[$t.GETTERS.SPORTS]),u=k(()=>Jr(i.value,r,"is_active",s.value.sports_list)),l=k(()=>n.getters[Y.GETTERS.USER_LOADING]),c=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=xt({sport_id:0,color:null,is_active:!0,stopped_speed_threshold:1});function d(S){S!==null?(f.sport_id=S.id,f.color=S.color?S.color:o?o[S.label]:MNe,f.is_active=S.is_active_for_user,f.stopped_speed_threshold=S.stopped_speed_threshold):v()}function m(S){return f.sport_id===S}function E(S){f.color=S.target.value}function g(S){f.stopped_speed_threshold=parseFloat(S.target.value)}function b(S){f.is_active=S.target.checked}function v(){f.sport_id=0,f.color=null,f.is_active=!0,f.stopped_speed_threshold=1,n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}function R(S){S.preventDefault(),n.dispatch(Y.ACTIONS.UPDATE_USER_SPORT_PREFERENCES,f)}function A(S,C){S.preventDefault(),n.dispatch(Y.ACTIONS.RESET_USER_SPORT_PREFERENCES,C)}return Fe(()=>l.value,S=>{!S&&!c.value&&v()}),(S,C)=>{const L=ue("SportImage"),$=ue("ErrorMessage");return T(),N("div",lNe,[i.value.length>0?(T(),N("div",dNe,[p("div",fNe,[h(a)?(T(),N("div",pNe,[p("button",{class:"cancel",onClick:C[0]||(C[0]=Xe(U=>S.$router.push("/profile/sports"),["prevent"]))},_(S.$t("buttons.BACK")),1)])):(T(),N("div",mNe,[p("button",{onClick:C[1]||(C[1]=U=>S.$router.push("/profile/edit/sports"))},_(S.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),p("button",{onClick:C[2]||(C[2]=U=>S.$router.push("/"))},_(S.$t("common.HOME")),1)]))]),p("table",null,[p("thead",null,[p("tr",null,[p("th",null,_(S.$t("user.PROFILE.SPORT.COLOR")),1),p("th",ENe,_(S.$t("workouts.SPORT",0)),1),p("th",null,_(S.$t("workouts.WORKOUT",0)),1),p("th",null,_(S.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),p("th",null,_(S.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),h(a)?(T(),N("th",hNe,_(S.$t("user.PROFILE.SPORT.ACTION")),1)):F("",!0)])]),p("tbody",null,[(T(!0),N(Ie,null,xe(u.value,U=>(T(),N("tr",{key:U.id},[p("td",null,[p("span",_Ne,_(S.$t("user.PROFILE.SPORT.COLOR")),1),m(U.id)?(T(),N("input",{key:0,class:"sport-color",type:"color",value:f.color,onInput:E},null,40,TNe)):(T(),te(L,{key:1,title:U.translatedLabel,"sport-label":U.label,color:U.color?U.color:h(o)[U.label]},null,8,["title","sport-label","color"]))]),p("td",{class:ge(["sport-label",{"disabled-sport":!U.is_active}])},[p("span",gNe,_(S.$t("user.PROFILE.SPORT.LABEL")),1),K(" "+_(U.translatedLabel)+" ",1),U.is_active?F("",!0):(T(),N("span",ANe," ("+_(S.$t("user.PROFILE.SPORT.DISABLED_BY_ADMIN"))+") ",1)),l.value&&m(U.id)?(T(),N("i",SNe)):F("",!0),c.value&&f.sport_id===U.id?(T(),te($,{key:2,message:c.value},null,8,["message"])):F("",!0)],2),p("td",{class:ge(["text-center",{"disabled-sport":!U.is_active}])},[p("span",ONe,_(S.$t("workouts.WORKOUT",0)),1),p("i",{class:ge(`fa fa${h(s).sports_list.includes(U.id)?"-check":""}`),"aria-hidden":"true"},null,2)],2),p("td",{class:ge(["text-center",{"disabled-sport":!U.is_active}])},[p("span",INe,_(S.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),m(U.id)&&U.is_active?(T(),N("input",{key:0,type:"checkbox",checked:U.is_active_for_user,onChange:b},null,40,vNe)):(T(),N("i",{key:1,class:ge(`fa fa${U.is_active_for_user?"-check":""}`),"aria-hidden":"true"},null,2))],2),p("td",{class:ge(["text-center",{"disabled-sport":!U.is_active}])},[p("span",RNe,_(S.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),m(U.id)&&U.is_active?(T(),N("input",{key:0,class:"threshold-input",type:"number",min:"0",step:"0.1",value:f.stopped_speed_threshold,onInput:g},null,40,bNe)):(T(),N("span",NNe,_(U.stopped_speed_threshold),1))],2),h(a)?(T(),N("td",CNe,[p("span",yNe,_(S.$t("user.PROFILE.SPORT.ACTION")),1),f.sport_id===0?(T(),N("button",{key:0,onClick:G=>d(U)},_(S.$t("buttons.EDIT")),9,DNe)):F("",!0),m(U.id)?(T(),N("div",PNe,[p("button",{disabled:l.value,onClick:R},_(S.$t("buttons.SUBMIT")),9,wNe),p("button",{disabled:l.value,onClick:G=>A(G,U.id)},_(S.$t("buttons.RESET")),9,LNe),p("button",{disabled:l.value,onClick:C[3]||(C[3]=G=>d(null))},_(S.$t("buttons.CANCEL")),9,$Ne)])):F("",!0)])):F("",!0)]))),128))])]),h(a)?(T(),N("div",kNe,[p("button",{class:"cancel",onClick:C[4]||(C[4]=Xe(U=>S.$router.push("/profile/sports"),["prevent"]))},_(S.$t("buttons.BACK")),1)])):(T(),N("div",UNe,[p("button",{onClick:C[5]||(C[5]=U=>S.$router.push("/profile/edit/sports"))},_(S.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),p("button",{onClick:C[6]||(C[6]=U=>S.$router.push("/"))},_(S.$t("common.HOME")),1)]))])):F("",!0)])}}}),mh=ae(xNe,[["__scopeId","data-v-aa4857fe"]]),Bo=e=>(ut("data-v-34b1686b"),e=e(),ct(),e),FNe={class:"about-text"},WNe=["innerHTML"],GNe=Bo(()=>p("i",{class:"fa fa-book fa-padding","aria-hidden":"true"},null,-1)),zNe=["href"],BNe=Bo(()=>p("i",{class:"fa fa-github fa-padding","aria-hidden":"true"},null,-1)),HNe={href:"https://github.com/SamR1/FitTrackee",target:"_blank",rel:"noopener noreferrer"},jNe=Bo(()=>p("i",{class:"fa fa-balance-scale fa-padding","aria-hidden":"true"},null,-1)),VNe=Bo(()=>p("a",{href:"https://choosealicense.com/licenses/agpl-3.0/",target:"_blank",rel:"noopener noreferrer"},"AGPLv3",-1)),KNe={key:0},YNe=Bo(()=>p("i",{class:"fa fa-envelope-o fa-padding","aria-hidden":"true"},null,-1)),qNe=["href"],XNe={key:1},ZNe=["href"],QNe={class:"about-instance"},JNe=["innerHTML"],e3e=Q({__name:"About",setup(e){const t=$e(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),r=k(()=>o()),a=k(()=>t.getters[H.GETTERS.LANGUAGE]),s=k(()=>i());function o(){const u={};return n.value.weather_provider==="visualcrossing"&&(u.name="Visual Crossing",u.url="https://www.visualcrossing.com"),u}function i(){let u="https://samr1.github.io/FitTrackee/";return a.value==="fr"&&(u+="fr/"),u}return(u,l)=>{const c=ue("i18n-t");return T(),N("div",FNe,[p("div",null,[p("p",{class:"error-message",innerHTML:u.$t("about.FITTRACKEE_DESCRIPTION")},null,8,WNe),p("p",null,[GNe,p("a",{class:"documentation-link",href:s.value,target:"_blank",rel:"noopener noreferrer"},_(St(u.$t("common.DOCUMENTATION"))),9,zNe)]),p("p",null,[BNe,p("a",HNe,_(u.$t("about.SOURCE_CODE")),1)]),p("p",null,[jNe,M(c,{keypath:"about.FITTRACKEE_LICENSE"},{default:fe(()=>[VNe]),_:1})]),n.value.admin_contact?(T(),N("div",KNe,[YNe,p("a",{href:`mailto:${n.value.admin_contact}`},_(u.$t("about.CONTACT_ADMIN")),9,qNe)])):F("",!0),r.value&&r.value.name?(T(),N("div",XNe,[K(_(u.$t("about.WEATHER_DATA_FROM"))+" ",1),p("a",{href:r.value.url,target:"_blank",rel:"nofollow noopener"},_(r.value.name),9,ZNe)])):F("",!0),n.value.about?(T(),N(Ie,{key:2},[p("p",QNe,_(u.$t("about.ABOUT_THIS_INSTANCE")),1),p("div",{innerHTML:h(ma)(h(vo)(n.value.about))},null,8,JNe)],64)):F("",!0)])])}}}),t3e=ae(e3e,[["__scopeId","data-v-34b1686b"]]),n3e={},r3e={id:"bike"},a3e=["src"];function s3e(e,t){return T(),N("div",r3e,[p("img",{class:"bike-img",src:"/img/bike.svg",alt:"mountain bike"},null,8,a3e)])}const zA=ae(n3e,[["render",s3e],["__scopeId","data-v-dc181e30"]]),o3e={id:"about",class:"view"},i3e={class:"container"},u3e={class:"container-sub"},c3e={class:"container-sub about-details"},l3e=Q({__name:"AboutView",setup(e){return(t,n)=>(T(),N("div",o3e,[p("div",i3e,[p("div",u3e,[M(zA)]),p("div",c3e,[M(t3e)])])]))}}),d3e=ae(l3e,[["__scopeId","data-v-ef9c7198"]]),f3e={id:"error"},p3e={class:"error-content"},m3e=Q({__name:"Error",props:{title:{},message:{},buttonText:{},path:{default:"/"}},setup(e){const t=e,{buttonText:n,title:r,message:a,path:s}=_e(t);return(o,i)=>(T(),N("div",f3e,[p("div",p3e,[p("h1",null,_(h(r)),1),p("p",null,_(h(a)),1),h(n)?(T(),N("button",{key:0,onClick:i[0]||(i[0]=u=>o.$router.push(h(s))),class:"upper"},_(h(n)),1)):F("",!0)])]))}}),E3e=ae(m3e,[["__scopeId","data-v-48ec856d"]]),I0=Q({__name:"NotFound",props:{target:{default:"PAGE"}},setup(e){const t=e,{target:n}=_e(t),r=ce(),a=ce(!1);gt(()=>s());function s(){r.value=setTimeout(()=>{a.value=!0},500)}return Rt(()=>{r.value&&clearTimeout(r.value)}),(o,i)=>a.value?(T(),te(E3e,{key:0,title:"404",message:o.$t(`error.NOT_FOUND.${h(n)}`),"button-text":o.$t("common.HOME")},null,8,["message","button-text"])):F("",!0)}}),h3e=e=>(ut("data-v-5eee0876"),e=e(),ct(),e),_3e={id:"admin",class:"view"},T3e={key:0,class:"container"},g3e=h3e(()=>p("div",{id:"bottom"},null,-1)),A3e=Q({__name:"AdminView",setup(e){const t=$e(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),r=k(()=>t.getters[H.GETTERS.APP_STATS]),a=k(()=>t.getters[Y.GETTERS.IS_ADMIN]),s=k(()=>t.getters[Y.GETTERS.USER_LOADING]);return It(()=>t.dispatch(H.ACTIONS.GET_APPLICATION_STATS)),(o,i)=>{const u=ue("router-view");return T(),N("div",_3e,[s.value?F("",!0):(T(),N("div",T3e,[a.value?(T(),te(u,{key:0,appConfig:n.value,appStatistics:r.value},null,8,["appConfig","appStatistics"])):(T(),te(I0,{key:1})),g3e]))])}}}),S3e=ae(A3e,[["__scopeId","data-v-5eee0876"]]),BA="/img/workouts/mountains.svg",O3e=p("div",{class:"map-attribution"},[p("span",{class:"map-attribution-text"},"©"),p("a",{class:"map-attribution-text",href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer"}," OpenStreetMap ")],-1),HA=Q({__name:"StaticMap",props:{workout:{},displayHover:{type:Boolean,default:!1}},setup(e){const t=e,{displayHover:n}=_e(t),r=`${wo()}workouts/map/${t.workout.map}`;return(a,s)=>(T(),N("div",{class:ge(["static-map",{"display-hover":h(n)}])},[h(n)?(T(),N("img",{key:0,src:r,alt:""})):(T(),N("div",{key:1,class:"bg-map-image",style:Yr({backgroundImage:`url(${r})`})},null,4)),O3e],2))}}),v0=e=>(ut("data-v-0bcae633"),e=e(),ct(),e),I3e={class:"timeline-workout"},v3e={class:"box"},R3e={class:"workout-user-date"},b3e={class:"workout-user"},N3e=["title"],C3e={key:0},y3e={key:1,class:"no-map"},D3e={class:"img"},P3e={class:"data"},w3e=v0(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),L3e={key:0},$3e={class:"data"},k3e=v0(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),U3e={key:0,class:"data elevation"},M3e=["alt"],x3e={class:"data-values"},F3e={key:1,class:"data altitude"},W3e=v0(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),G3e={class:"data-values"},z3e=Q({__name:"WorkoutCard",props:{user:{},useImperialUnits:{type:Boolean},workout:{default:()=>({})},sport:{default:()=>({})}},setup(e){const t=e,n=$e(),{user:r,workout:a,sport:s,useImperialUnits:o}=_e(t),i=k(()=>n.getters[H.GETTERS.LOCALE]);function u(c){return c.with_gpx&&c.min_alt!==null&&c.max_alt!==null}function l(c){return u(c)&&c.ascent!==null&&c.descent!==null}return(c,f)=>{var g;const d=ue("router-link"),m=ue("SportImage"),E=ue("Distance");return T(),N("div",I3e,[p("div",v3e,[p("div",R3e,[p("div",b3e,[M(Lo,{user:h(r)},null,8,["user"]),h(r).username?(T(),te(d,{key:0,class:"workout-user-name",to:{name:"User",params:{username:h(r).username}}},{default:fe(()=>[K(_(h(r).username),1)]),_:1},8,["to"])):F("",!0)]),h(a).id?(T(),te(d,{key:0,class:"workout-title",to:{name:"Workout",params:{workoutId:h(a).id}}},{default:fe(()=>[K(_(h(a).title),1)]),_:1},8,["to"])):F("",!0),h(a).workout_date&&h(r)?(T(),N("div",{key:1,class:"workout-date",title:h(xn)(h(a).workout_date,h(r).timezone,h(r).date_format)},_(h(U3)(new Date(h(a).workout_date),new Date,{addSuffix:!0,locale:i.value})),9,N3e)):F("",!0)]),p("div",{class:ge(["workout-map",{"no-cursor":!h(a)}]),onClick:f[0]||(f[0]=b=>h(a).id?c.$router.push({name:"Workout",params:{workoutId:h(a).id}}):null)},[h(a)?(T(),N("div",C3e,[h(a).with_gpx?(T(),te(HA,{key:0,workout:h(a)},null,8,["workout"])):(T(),N("div",y3e,_(c.$t("workouts.NO_MAP")),1))])):F("",!0)],2),p("div",{class:ge(["workout-data",{"without-elevation":!u(h(a))}]),onClick:f[1]||(f[1]=b=>h(a).id?c.$router.push({name:"Workout",params:{workoutId:h(a).id}}):null)},[p("div",D3e,[(g=h(s))!=null&&g.label?(T(),te(m,{key:0,"sport-label":h(s).label,color:h(s).color},null,8,["sport-label","color"])):F("",!0)]),p("div",P3e,[w3e,h(a)?(T(),N("span",L3e,_(h(a).moving),1)):F("",!0)]),p("div",$3e,[k3e,h(a).id?(T(),te(E,{key:0,distance:h(a).distance,digits:3,unitFrom:"km",useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0)]),u(h(a))?(T(),N("div",U3e,[p("img",{class:"mountains",src:BA,alt:c.$t("workouts.ELEVATION")},null,8,M3e),p("div",x3e,[h(a).id?(T(),te(E,{key:0,distance:h(a).min_alt,unitFrom:"m",displayUnit:!1,useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0),K("/ "),h(a).id?(T(),te(E,{key:1,distance:h(a).max_alt,unitFrom:"m",useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0)])])):F("",!0),l(h(a))?(T(),N("div",F3e,[W3e,p("div",G3e,[K(" +"),h(a).id?(T(),te(E,{key:0,distance:h(a).ascent,unitFrom:"m",displayUnit:!1,useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0),K("/- "),h(a).id?(T(),te(E,{key:1,distance:h(a).descent,unitFrom:"m",useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0)])])):F("",!0)],2)])])}}}),Eh=ae(z3e,[["__scopeId","data-v-0bcae633"]]),B3e={},H3e={class:"no-workouts box"};function j3e(e,t){const n=ue("router-link");return T(),N("div",H3e,[p("div",null,[K(_(e.$t("workouts.NO_WORKOUTS"))+" ",1),M(n,{to:"/workouts/add"},{default:fe(()=>[K(_(e.$t("workouts.UPLOAD_FIRST_WORKOUT")),1)]),_:1})])])}const R0=ae(B3e,[["render",j3e],["__scopeId","data-v-b0c91cc6"]]),Gr={ligthMode:{text:"#666",line:"rgba(0, 0, 0, 0.1)"},darkMode:{text:"#a1a1a1",line:"#3f3f3f"}},V3e=(e,t,n,r=!1)=>{const a={speed:{label:t("workouts.SPEED"),backgroundColor:["transparent"],borderColor:[r?"#5f5c97":"#8884d8"],borderWidth:2,data:[],yAxisID:"ySpeed"},elevation:{label:t("workouts.ELEVATION"),backgroundColor:[r?"#303030":"#e5e5e5"],borderColor:[r?"#222222":"#cccccc"],borderWidth:1,fill:!0,data:[],yAxisID:"yElevation"}},s=[],o=[],i=[];return e.map(u=>{s.push(wi("km",u.distance,n)),o.push(u.duration),a.speed.data.push(wi("km",u.speed,n)),u.elevation!==void 0&&a.elevation.data.push(wi("m",u.elevation,n)),i.push({latitude:u.latitude,longitude:u.longitude})}),{distance_labels:s,duration_labels:o,datasets:a,coordinates:i}},K3e=e=>{const t=e.length;if(t===0)return{};const n={};return e.map(r=>{n[r.sport_id]||(n[r.sport_id]={count:0,percentage:0}),n[r.sport_id].count+=1,n[r.sport_id].percentage=n[r.sport_id].count/t}),n},bo={order:"desc",order_by:"workout_date"},Y3e={id:"timeline"},q3e={class:"section-title"},X3e={key:0},Z3e={key:1},Q3e={key:1,class:"more-workouts"},gi=5,J3e=Q({__name:"Timeline",props:{sports:{},user:{}},setup(e){const t=e,n=$e(),{sports:r,user:a}=_e(t),s=ce(1),o=t.user.nb_workouts>=gi?gi:t.user.nb_workouts;It(()=>l());const i=k(()=>n.getters[Te.GETTERS.TIMELINE_WORKOUTS]),u=k(()=>i.value.length>0?i.value[i.value.length-1].previous_workout!==null:!1);function l(){n.dispatch(Te.ACTIONS.GET_TIMELINE_WORKOUTS,{page:s.value,per_page:gi,...bo})}function c(){s.value+=1,n.dispatch(Te.ACTIONS.GET_MORE_TIMELINE_WORKOUTS,{page:s.value,per_page:gi,...bo})}return(f,d)=>(T(),N("div",Y3e,[p("div",q3e,_(f.$t("workouts.LATEST_WORKOUTS")),1),h(a).nb_workouts>0&&i.value.length===0?(T(),N("div",X3e,[(T(!0),N(Ie,null,xe([...Array(h(o)).keys()],m=>(T(),te(Eh,{user:h(a),useImperialUnits:h(a).imperial_units,key:m},null,8,["user","useImperialUnits"]))),128))])):(T(),N("div",Z3e,[(T(!0),N(Ie,null,xe(i.value,m=>(T(),te(Eh,{workout:m,sport:i.value.length>0?h(r).filter(E=>E.id===m.sport_id)[0]:null,user:h(a),useImperialUnits:h(a).imperial_units,key:m.id},null,8,["workout","sport","user","useImperialUnits"]))),128)),i.value.length===0?(T(),te(R0,{key:0})):F("",!0),u.value?(T(),N("div",Q3e,[p("button",{onClick:c},_(f.$t("workouts.LOAD_MORE_WORKOUT")),1)])):F("",!0)]))]))}}),eCe=ae(J3e,[["__scopeId","data-v-e0964959"]]),tCe=["title"],jA=Q({__name:"CalendarWorkout",props:{displayHARecord:{type:Boolean},workout:{},sportLabel:{},sportColor:{}},setup(e){const t=e,{displayHARecord:n,workout:r,sportLabel:a,sportColor:s}=_e(t);return(o,i)=>{const u=ue("SportImage");return T(),N("div",{class:"calendar-workout",onClick:i[0]||(i[0]=l=>o.$router.push({name:"Workout",params:{workoutId:h(r).id}}))},[M(u,{"sport-label":h(a),title:h(r).title,color:h(s)},null,8,["sport-label","title","color"]),p("sup",null,[h(r).records.length>0?(T(),N("i",{key:0,class:"fa fa-trophy custom-fa-small","aria-hidden":"true",title:h(r).records.filter(l=>h(n)?!0:l.record_type!=="HA").map(l=>` ${o.$t(`workouts.RECORD_${l.record_type}`)}`)[0]},null,8,tCe)):F("",!0)])])}}}),nCe={class:"donut-chart"},rCe={height:"34",width:"34",viewBox:"0 0 34 34"},aCe=["stroke","stroke-dashoffset","transform"],hh=16,_h=16,Th=14,sCe=Q({__name:"DonutChart",props:{colors:{},datasets:{}},setup(e){const t=e,{colors:n,datasets:r}=_e(t);let a=-90;const s=2*Math.PI*Th;function o(u,l){return l-u*l}function i(u,l){const c=`rotate(${a}, ${hh}, ${_h})`;return a=l*360+a,c}return(u,l)=>(T(),N("div",nCe,[(T(),N("svg",rCe,[(T(!0),N(Ie,null,xe(Object.entries(h(r)),(c,f)=>(T(),N("g",{key:f},[p("circle",{cx:hh,cy:_h,r:Th,fill:"transparent",stroke:h(n)[+c[0]],"stroke-dashoffset":o(c[1].percentage,s),"stroke-dasharray":s,"stroke-width":"3","stroke-opacity":"0.8",transform:i(f,c[1].percentage)},null,8,aCe)]))),128))]))]))}}),oCe={class:"calendar-workouts-chart"},iCe={class:"workouts-count"},uCe={key:0,class:"workouts-pane"},cCe={class:"more-workouts"},lCe=Q({__name:"CalendarWorkoutsChart",props:{colors:{},datasets:{},sports:{},workouts:{},displayHARecord:{type:Boolean}},setup(e){const t=e,{colors:n,datasets:r,sports:a,workouts:s}=_e(t),o=ce(!0);function i(u){u.stopPropagation(),o.value=!o.value}return(u,l)=>{const c=GO("click-outside");return T(),N("div",oCe,[p("div",{class:"workouts-chart",onClick:i},[p("div",iCe,_(h(s).length),1),M(sCe,{datasets:h(r),colors:h(n)},null,8,["datasets","colors"])]),o.value?F("",!0):(T(),N("div",uCe,[Ke((T(),N("div",cCe,[p("i",{class:"fa fa-times calendar-more","aria-hidden":"true",onClick:i}),(T(!0),N(Ie,null,xe(h(s),(f,d)=>(T(),te(jA,{key:d,displayHARecord:u.displayHARecord,workout:f,sportLabel:h(_0)(f,h(a)),sportColor:h(T0)(f,h(a))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])),[[c,i]])]))])}}}),gh=ae(lCe,[["__scopeId","data-v-bf05bb20"]]),dCe={class:"calendar-workouts"},fCe={class:"desktop-display"},pCe={key:0,class:"workouts-display"},mCe={key:1,class:"donut-display"},ECe={class:"mobile-display"},hCe={key:0,class:"donut-display"},Ah=6,_Ce=Q({__name:"CalendarWorkouts",props:{displayHARecord:{type:Boolean},workouts:{},sports:{}},setup(e){const t=e,{displayHARecord:n,workouts:r,sports:a}=_e(t),s=k(()=>K3e(t.workouts)),o=k(()=>lAe(t.sports));return(i,u)=>(T(),N("div",dCe,[p("div",fCe,[h(r).length<=Ah?(T(),N("div",pCe,[(T(!0),N(Ie,null,xe(h(r).slice(0,Ah),(l,c)=>(T(),te(jA,{key:c,displayHARecord:h(n),workout:l,sportLabel:h(_0)(l,h(a)),sportColor:h(T0)(l,h(a))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])):(T(),N("div",mCe,[M(gh,{workouts:h(r),sports:h(a),datasets:s.value,colors:o.value,displayHARecord:h(n)},null,8,["workouts","sports","datasets","colors","displayHARecord"])]))]),p("div",ECe,[h(r).length>0?(T(),N("div",hCe,[M(gh,{workouts:h(r),sports:h(a),datasets:s.value,colors:o.value,displayHARecord:h(n)},null,8,["workouts","sports","datasets","colors","displayHARecord"])])):F("",!0)])]))}}),TCe={class:"calendar-cells"},gCe={class:"calendar-cell-day"},ACe=Q({__name:"CalendarCells",props:{currentDay:{},displayHARecord:{type:Boolean},endDate:{},sports:{},startDate:{},timezone:{},weekStartingMonday:{type:Boolean},workouts:{}},setup(e){const t=e,{currentDay:n,displayHARecord:r,endDate:a,sports:s,startDate:o,timezone:i,weekStartingMonday:u,workouts:l}=_e(t),c=ce([]);gt(()=>f());function f(){c.value=[];let E=o.value;for(;E<=a.value;){const g=[];for(let b=0;b<7;b++)g.push(E),E=$o(E,1);c.value.push(g)}}function d(E){return u.value?[5,6].includes(E):[0,6].includes(E)}function m(E,g){return g?g.filter(b=>oT(yc(b.workout_date,i.value),E)).reverse():[]}return Fe(()=>t.currentDay,()=>f()),(E,g)=>(T(),N("div",TCe,[(T(!0),N(Ie,null,xe(c.value,(b,v)=>(T(),N("div",{class:"calendar-row",key:v},[(T(!0),N(Ie,null,xe(b,(R,A)=>(T(),N("div",{class:ge(["calendar-cell",{"disabled-cell":!h(x3)(R,h(n)),"week-end":d(A),today:h(F3)(R)}]),key:A},[M(_Ce,{workouts:m(R,h(l)),sports:h(s),displayHARecord:h(r)},null,8,["workouts","sports","displayHARecord"]),p("div",gCe,_(h(ln)(R,"d")),1)],2))),128))]))),128))]))}}),SCe={class:"calendar-days"},OCe=Q({__name:"CalendarDays",props:{startDate:{},localeOptions:{}},setup(e){const t=e,n=[];for(let r=0;r<7;r++)n.push($o(t.startDate,r));return(r,a)=>(T(),N("div",SCe,[(T(),N(Ie,null,xe(n,(s,o)=>p("div",{class:"calendar-day",key:o},_(h(ln)(s,"EEE",{locale:r.localeOptions})),1)),64))]))}}),ICe={class:"calendar-header"},vCe=p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1),RCe=[vCe],bCe={class:"calendar-month"},NCe=p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1),CCe=[NCe],yCe=Q({__name:"CalendarHeader",props:{day:{},localeOptions:{}},emits:["displayNextMonth","displayPreviousMonth"],setup(e,{emit:t}){const n=e,r=t,{day:a,localeOptions:s}=_e(n);return(o,i)=>(T(),N("div",ICe,[p("div",{class:"calendar-arrow calendar-arrow-left",onClick:i[0]||(i[0]=u=>r("displayPreviousMonth"))},RCe),p("div",bCe,[p("span",null,_(h(ln)(h(a),"MMM yyyy",{locale:h(s)})),1)]),p("div",{class:"calendar-arrow calendar-arrow-right",onClick:i[1]||(i[1]=u=>r("displayNextMonth"))},CCe)]))}}),DCe={id:"user-calendar"},PCe={class:"calendar-card box"},Sh="yyyy-MM-dd",wCe=Q({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,n=$e(),{sports:r,user:a}=_e(t),s=ce(new Date),o=ce(eh(s.value,a.value.weekm)),i=k(()=>n.getters[Te.GETTERS.CALENDAR_WORKOUTS]),u=k(()=>n.getters[H.GETTERS.LOCALE]);It(()=>l());function l(){o.value=eh(s.value,t.user.weekm);const d={from:ln(o.value.start,Sh),to:ln(o.value.end,Sh),page:1,per_page:100,...bo};n.dispatch(Te.ACTIONS.GET_CALENDAR_WORKOUTS,d)}function c(){s.value=Za(s.value,1),l()}function f(){s.value=uo(s.value,1),l()}return(d,m)=>(T(),N("div",DCe,[p("div",PCe,[M(yCe,{day:s.value,"locale-options":u.value,onDisplayNextMonth:c,onDisplayPreviousMonth:f},null,8,["day","locale-options"]),M(OCe,{"start-date":o.value.start,"locale-options":u.value},null,8,["start-date","locale-options"]),M(ACe,{currentDay:s.value,displayHARecord:h(a).display_ascent,"end-date":o.value.end,sports:h(r),"start-date":o.value.start,timezone:h(a).timezone,workouts:i.value,weekStartingMonday:h(a).weekm},null,8,["currentDay","displayHARecord","end-date","sports","start-date","timezone","workouts","weekStartingMonday"])])]))}}),VA={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},LCe={ariaLabel:{type:String},ariaDescribedby:{type:String}},$Ce={type:{type:String,required:!0},...VA,...LCe},kCe=M_[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function wa(e){return Vu(e)?Je(e):e}function UCe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return Vu(t)?new Proxy(e,{}):e}function MCe(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function KA(e,t){e.labels=t}function YA(e,t,n){const r=[];e.datasets=t.map(a=>{const s=e.datasets.find(o=>o[n]===a[n]);return!s||!a.data||r.includes(s)?{...a}:(r.push(s),Object.assign(s,a),s)})}function xCe(e,t){const n={labels:[],datasets:[]};return KA(n,e.labels),YA(n,e.datasets,t),n}const FCe=Q({props:$Ce,setup(e,t){let{expose:n,slots:r}=t;const a=ce(null),s=Ku(null);n({chart:s});const o=()=>{if(!a.value)return;const{type:l,data:c,options:f,plugins:d,datasetIdKey:m}=e,E=xCe(c,m),g=UCe(E,c);s.value=new Yd(a.value,{type:l,data:g,options:{...f},plugins:d})},i=()=>{const l=Je(s.value);l&&(l.destroy(),s.value=null)},u=l=>{l.update(e.updateMode)};return gt(o),Co(i),Fe([()=>e.options,()=>e.data],(l,c)=>{let[f,d]=l,[m,E]=c;const g=Je(s.value);if(!g)return;let b=!1;if(f){const v=wa(f),R=wa(m);v&&v!==R&&(MCe(g,v),b=!0)}if(d){const v=wa(d.labels),R=wa(E.labels),A=wa(d.datasets),S=wa(E.datasets);v!==R&&(KA(g.config.data,v),b=!0),A&&A!==S&&(YA(g.config.data,A,e.datasetIdKey),b=!0)}b&&gn(()=>{u(g)})},{deep:!0}),()=>An("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:a},[An("p",{},[r.default?r.default():""])])}});function qA(e,t){return Yd.register(t),Q({props:VA,setup(n,r){let{expose:a}=r;const s=Ku(null),o=i=>{s.value=i==null?void 0:i.chart};return a({chart:s}),()=>An(FCe,kCe({ref:o},{type:e,...n}))}})}const WCe=qA("bar",Mh),GCe=qA("line",xh),zCe=(e,t=!1)=>{let n="0";t&&(n=String(Math.floor(e/86400)),e%=86400);const r=String(Math.floor(e/3600)).padStart(2,"0");e%=3600;const a=String(Math.floor(e/60)).padStart(2,"0"),s=String(e%60).padStart(2,"0");return t?`${n==="0"?"":`${n}d `}${r==="00"?"":`${r}h `}${a}m ${s}s`:`${r==="00"?"":`${r}:`}${a}:${s}`},Us=(e,t,n,r=!0,a="km")=>{const s=n?$n[a].defaultTarget:a;switch(e){case"average_speed":return`${t.toFixed(2)} ${s}/h`;case"total_duration":return zCe(t,r);case"total_distance":case"total_ascent":case"total_descent":return`${t.toFixed(2)} ${s}`;default:return t.toString()}},BCe=Q({__name:"Chart",props:{datasets:{},labels:{},displayedData:{},displayedSportIds:{},fullStats:{type:Boolean},useImperialUnits:{type:Boolean}},setup(e){const t=e,{datasets:n,labels:r,displayedData:a,displayedSportIds:s,fullStats:o,useImperialUnits:i}=_e(t),u=yf(),{t:l}=jt(),c=k(()=>u.getters[H.GETTERS.DARK_MODE]),f=k(()=>Cf(c.value)),d=k(()=>({color:f.value?Gr.darkMode.line:Gr.ligthMode.line})),m=k(()=>({color:f.value?Gr.darkMode.text:Gr.ligthMode.text})),E=k(()=>({labels:r.value,datasets:JSON.parse(JSON.stringify(n.value))})),g=k(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:o.value?40:22}},scales:{x:{stacked:!0,grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{...m.value}},y:{stacked:a.value!=="average_speed",grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{maxTicksLimit:6,callback:function(A){return Us(a.value,+A,i.value,!1,R(a.value))},...m.value},afterFit:function(A){A.width=o.value?90:60}}},plugins:{datalabels:{anchor:"end",align:"end",color:function(A){return a.value==="average_speed"&&A.dataset.backgroundColor?A.dataset.backgroundColor[0]:m.value.color},rotation:function(A){return o.value&&A.chart.chartArea.width<580?310:0},display:function(A){return o.value&&A.chart.chartArea.width<300?!1:a.value==="average_speed"?s.value.length==1?"auto":!1:!0},formatter:function(A,S){if(a.value==="average_speed")return Us(a.value,A,i.value,!1);{const C=S.chart.data.datasets.map(L=>L.data[S.dataIndex]).reduce((L,$)=>v(L,$),0);return S.datasetIndex===s.value.length-1&&C>0?Us(a.value,C,i.value,!1,R(a.value)):null}}},legend:{display:!1},tooltip:{interaction:{intersect:!0,mode:"index",position:a.value==="average_speed"?"nearest":"average"},filter:function(A){return A.formattedValue!=="0"},callbacks:{label:function(A){let S=l(`sports.${A.dataset.label}.LABEL`)||"";return S&&(S+=": "),A.parsed.y!==null&&(S+=Us(a.value,A.parsed.y,i.value,!0,R(a.value))),S},footer:function(A){if(a.value==="average_speed")return"";let S=0;return A.map(C=>{S+=C.parsed.y}),`${l("common.TOTAL")}: `+Us(a.value,S,i.value,!0,R(a.value))}}}}}));function b(A){return isNaN(A)?0:+A}function v(A,S){return b(A)+b(S)}function R(A){return["total_ascent","total_descent"].includes(A)?"m":"km"}return(A,S)=>(T(),N("div",{class:ge(["bar-chart",{minimal:!h(o)}])},[M(h(WCe),{data:E.value,options:g.value},null,8,["data","options"])],2))}}),HCe=ae(BCe,[["__scopeId","data-v-d506f845"]]),{locale:Oh}=ga.global,jCe={week:{api:"yyyy-MM-dd",chart:"MM/dd/yyyy"},month:{api:"yyyy-MM",chart:"MM/yyyy"},year:{api:"yyyy",chart:"yyyy"}},VCe=["average_speed","nb_workouts","total_duration","total_distance","total_ascent","total_descent"],KCe=(e,t)=>{const n=[];for(let r=vSe(e.duration,e.start,t);r<=e.end;r=RSe(e.duration,r))n.push(r);return n},La=(e,t,n=!1)=>{const r={label:e,backgroundColor:[t],data:[]};return n?(r.type="line",r.borderColor=[t],r.spanGaps=!0):r.type="bar",r},YCe=e=>{const t={average_speed:[],nb_workouts:[],total_distance:[],total_duration:[],total_ascent:[],total_descent:[]};return e.map(n=>{const r=n.color?n.color:h0[n.label];t.average_speed.push(La(n.label,r,!0)),t.nb_workouts.push(La(n.label,r)),t.total_distance.push(La(n.label,r)),t.total_duration.push(La(n.label,r)),t.total_ascent.push(La(n.label,r)),t.total_descent.push(La(n.label,r))}),t},qCe=(e,t,n)=>{switch(e){case"average_speed":case"total_distance":case"total_ascent":case"total_descent":return wi(["average_speed","total_distance"].includes(e)?"km":"m",t,n);default:case"nb_workouts":case"total_duration":return t}},XCe=(e,t,n,r,a,s,o)=>{const i=KCe(e,t),u=jCe[e.duration],l=n.filter(m=>r.includes(m.id)),c=[],f=YCe(l),d={};return l.map(m=>d[m.label]=m.id),i.map(m=>{const E=ln(m,u.api),g=ln(m,e.duration==="week"?Sa(o,Oh.value):u.chart,{locale:Mo[Oh.value]});c.push(g),VCe.map(b=>{f[b].map(v=>{v.data.push(E in a&&d[v.label]in a[E]?qCe(b,a[E][d[v.label]][b],s):b==="average_speed"?null:0)})})}),{labels:c,datasets:f}},ZCe=(e,t,n)=>{const r=n?1:0,a=t==="year"?Lf(Kl(e,9)):t==="week"?lc(uo(e,2),{weekStartsOn:r}):Uo(uo(e,11)),s=t==="year"?iT(e):t==="week"?$f(e,{weekStartsOn:r}):ko(e);return{duration:t,end:s,start:a}},QCe=(e,t,n)=>{const{duration:r,start:a,end:s}=e,o=n?1:0;return{duration:r,end:r==="year"?iT(t?Kl(s,1):Qi(s,1)):r==="week"?$f(t?nm(s,1):Vl(s,1),{weekStartsOn:o}):ko(t?uo(s,1):Za(s,1)),start:r==="year"?Lf(t?Kl(a,1):Qi(a,1)):r==="week"?lc(t?nm(a,1):Vl(a,1),{weekStartsOn:o}):Uo(t?uo(a,1):Za(a,1))}},JCe={class:"stats-chart"},eye={key:0},tye={key:1},nye={class:"chart-radio"},rye=["checked","disabled"],aye=["checked","disabled"],sye=["checked","disabled"],oye={key:0},iye=["checked","disabled"],uye={key:1},cye=["checked","disabled"],lye={key:2},dye=["checked","disabled"],fye=Q({__name:"index",props:{sports:{},user:{},chartParams:{},displayedSportIds:{default:()=>[]},fullStats:{type:Boolean,default:!1},hideChartIfNoData:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},setup(e){const t=e,{sports:n,user:r,chartParams:a,displayedSportIds:s,fullStats:o,hideChartIfNoData:i,isDisabled:u}=_e(t),l=$e(),c=ce("total_distance"),f=k(()=>l.getters[Kr.GETTERS.USER_STATS]),d=k(()=>XCe(a.value,r.value.weekm,n.value,s.value,f.value,r.value.imperial_units,r.value.date_format)),m=k(()=>d.value.datasets[c.value]),E=k(()=>d.value.labels),g=k(()=>Object.keys(f.value).length===0);It(()=>b(R(a.value,r.value)));function b(A){l.dispatch(Kr.ACTIONS.GET_USER_STATS,{username:r.value.username,filterType:"by_time",params:A})}function v(A){c.value=A.target.name}function R(A,S){return{from:ln(A.start,"yyyy-MM-dd"),to:ln(A.end,"yyyy-MM-dd"),time:A.duration==="week"?`week${S.weekm?"m":""}`:A.duration}}return Fe(()=>a.value,async A=>{b(R(A,r.value))}),(A,S)=>(T(),N("div",JCe,[h(i)&&g.value?(T(),N("div",eye,_(A.$t("workouts.NO_WORKOUTS")),1)):(T(),N("div",tye,[p("div",nye,[p("label",null,[p("input",{type:"radio",name:"total_distance",checked:c.value==="total_distance",disabled:h(u),onClick:v},null,8,rye),K(" "+_(A.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"total_duration",checked:c.value==="total_duration",disabled:h(u),onClick:v},null,8,aye),K(" "+_(A.$t("workouts.DURATION")),1)]),p("label",null,[p("input",{type:"radio",name:"nb_workouts",checked:c.value==="nb_workouts",disabled:h(u),onClick:v},null,8,sye),K(" "+_(A.$t("workouts.WORKOUT",2)),1)]),h(o)?(T(),N("label",oye,[p("input",{type:"radio",name:"average_speed",checked:c.value==="average_speed",disabled:h(u),onClick:v},null,8,iye),K(" "+_(A.$t("workouts.AVERAGE_SPEED")),1)])):F("",!0),h(o)?(T(),N("label",uye,[p("input",{type:"radio",name:"total_ascent",checked:c.value==="total_ascent",disabled:h(u),onClick:v},null,8,cye),K(" "+_(A.$t("workouts.ASCENT")),1)])):F("",!0),h(o)?(T(),N("label",lye,[p("input",{type:"radio",name:"total_descent",checked:c.value==="total_descent",disabled:h(u),onClick:v},null,8,dye),K(" "+_(A.$t("workouts.DESCENT")),1)])):F("",!0)]),E.value.length>0?(T(),te(HCe,{key:0,datasets:m.value,labels:E.value,displayedData:c.value,displayedSportIds:h(s),fullStats:h(o),useImperialUnits:h(r).imperial_units},null,8,["datasets","labels","displayedData","displayedSportIds","fullStats","useImperialUnits"])):F("",!0)]))]))}}),XA=ae(fye,[["__scopeId","data-v-b8d7f5c9"]]),pye={class:"user-month-stats"},mye=Q({__name:"UserMonthStats",props:{sports:{},user:{}},setup(e){const t=e,{sports:n,user:r}=_e(t),a=new Date,s={duration:"week",start:Uo(a),end:ko(a)},o=n.value.map(i=>i.id);return(i,u)=>{const l=ue("Card");return T(),N("div",pye,[M(l,null,{title:fe(()=>[K(_(i.$t("dashboard.THIS_MONTH")),1)]),content:fe(()=>[M(XA,{sports:h(n),user:h(r),"chart-params":s,"displayed-sport-ids":h(o),"hide-chart-if-no-data":!0},null,8,["sports","user","displayed-sport-ids"])]),_:1})])}}}),Eye=ae(mye,[["__scopeId","data-v-8f59a282"]]),{locale:hye}=ga.global,_ye=(e,t,n,r)=>{const a="km",s=n?$n[a].defaultTarget:a,o="m",i=n?$n[o].defaultTarget:o;let u;switch(e.record_type){case"AS":case"MS":u=`${sn(+e.value,a,s,2)} ${s}/h`;break;case"FD":u=`${sn(+e.value,a,s,3)} ${s}`;break;case"HA":u=`${sn(+e.value,o,i,2)} ${i}`;break;case"LD":u=e.value;break;default:throw new Error(`Invalid record type, expected: "AS", "FD", "HA", "LD", "MD", got: "${e.record_type}"`)}return{id:e.id,record_type:e.record_type,sport_id:e.sport_id,value:u,user:e.user,workout_date:xn(e.workout_date,t,r,!1),workout_id:e.workout_id}},Tye=(e,t)=>{const n=e.label.toLowerCase(),r=t.label.toLowerCase();return n>r?1:n(s=Sa(s,hye.value),e.filter(o=>a?!0:o.record_type!=="HA").reduce((o,i)=>{const u=t.find(l=>l.id===i.sport_id);return u&&u.label&&(o[u.translatedLabel]===void 0&&(o[u.translatedLabel]={label:u.label,color:u.color,records:[]}),o[u.translatedLabel].records.push(_ye(i,n,r,s))),o},{})),Aye={class:"records-card"},Sye={class:"record-type"},Oye={class:"record-value"},Iye={class:"record-date"},vye=Q({__name:"RecordsCard",props:{records:{},sportTranslatedLabel:{}},setup(e){const t=e,{records:n,sportTranslatedLabel:r}=_e(t),{t:a}=jt();function s(o){const i=[];return o.map(u=>{i.push({...u,label:a(`workouts.RECORD_${u.record_type}`)})}),i.sort(Tye)}return(o,i)=>{const u=ue("SportImage"),l=ue("router-link"),c=ue("Card");return T(),N("div",Aye,[M(c,null,{title:fe(()=>[M(u,{"sport-label":h(n).label,color:h(n).color},null,8,["sport-label","color"]),K(" "+_(h(r)),1)]),content:fe(()=>[(T(!0),N(Ie,null,xe(s(h(n).records),f=>(T(),N("div",{class:"record",key:f.id},[p("span",Sye,_(f.label),1),p("span",Oye,_(f.value),1),p("span",Iye,[M(l,{to:{name:"Workout",params:{workoutId:f.workout_id}}},{default:fe(()=>[p("time",null,_(f.workout_date),1)]),_:2},1032,["to"])])]))),128))]),_:1})])}}}),Rye=ae(vye,[["__scopeId","data-v-64523a87"]]),bye=e=>(ut("data-v-fff33919"),e=e(),ct(),e),Nye={class:"user-records-section"},Cye={class:"section-title"},yye=bye(()=>p("i",{class:"fa fa-trophy custom-fa-small","aria-hidden":"true"},null,-1)),Dye={class:"user-records"},Pye={key:0,class:"no-records"},wye=Q({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,{t:n}=jt(),r=k(()=>gye(t.user.records,Jr(t.sports,n),t.user.timezone,t.user.imperial_units,t.user.display_ascent,t.user.date_format));return(a,s)=>(T(),N("div",Nye,[p("div",Cye,[yye,K(" "+_(a.$t("workouts.RECORD",2)),1)]),p("div",Dye,[Object.keys(r.value).length===0?(T(),N("div",Pye,_(a.$t("workouts.NO_RECORDS")),1)):F("",!0),(T(!0),N(Ie,null,xe(Object.keys(r.value).sort(),o=>(T(),te(Rye,{sportTranslatedLabel:o,records:r.value[o],key:o,useImperialUnits:a.user.imperial_units},null,8,["sportTranslatedLabel","records","useImperialUnits"]))),128))])]))}}),Lye=ae(wye,[["__scopeId","data-v-fff33919"]]),$ye={id:"user-stats"},gl="km",Al="m",kye=Q({__name:"index",props:{user:{}},setup(e){const t=e,{t:n}=jt(),{user:r}=_e(t),a=k(()=>t.user.total_duration),s=k(()=>c(a)),o=r.value.imperial_units?$n[gl].defaultTarget:gl,i=k(()=>r.value.imperial_units?sn(r.value.total_distance,gl,o,2):parseFloat(r.value.total_distance.toFixed(2))),u=r.value.imperial_units?$n[Al].defaultTarget:Al,l=k(()=>r.value.imperial_units?sn(r.value.total_ascent,Al,u,2):parseFloat(r.value.total_ascent.toFixed(2)));function c(f){const d=f.value.match(/day/g)?f.value.split(", ")[1]:f.value;return{days:f.value.match(/day/g)?`${f.value.split(" ")[0]} ${f.value.match(/days/g)?n("common.DAY",2):n("common.DAY",1)}`:`0 ${n("common.DAY",2)},`,duration:`${d.split(":")[0]}h ${d.split(":")[1]}min`}}return(f,d)=>(T(),N("div",$ye,[M(pr,{icon:"calendar",value:h(r).nb_workouts,text:f.$t("workouts.WORKOUT",h(r).nb_workouts)},null,8,["value","text"]),M(pr,{icon:"road",value:i.value,text:h(o)==="mi"?"miles":h(o)},null,8,["value","text"]),h(r).display_ascent?(T(),te(pr,{key:0,icon:"location-arrow",value:l.value,text:h(u)==="ft"?"feet":h(u)},null,8,["value","text"])):F("",!0),M(pr,{icon:"clock-o",value:s.value.days,text:s.value.duration},null,8,["value","text"]),h(r).display_ascent?F("",!0):(T(),te(pr,{key:1,icon:"tags",value:h(r).nb_sports,text:f.$t("workouts.SPORT",h(r).nb_sports)},null,8,["value","text"]))]))}}),Uye={},Mye={class:"privacy-policy-message"};function xye(e,t){const n=ue("router-link"),r=ue("i18n-t");return T(),N("div",Mye,[p("span",null,[M(r,{keypath:"user.LAST_PRIVACY_POLICY_TO_VALIDATE"},{default:fe(()=>[M(n,{to:"/profile/edit/privacy-policy",class:"policy-link"},{default:fe(()=>[K(_(e.$t("user.REVIEW")),1)]),_:1})]),_:1})])])}const Fye=ae(Uye,[["render",xye],["__scopeId","data-v-1b250692"]]),Ho=e=>(ut("data-v-8f5da609"),e=e(),ct(),e),Wye={key:0,id:"dashboard",class:"view"},Gye={class:"container mobile-menu"},zye={class:"box"},Bye=Ho(()=>p("i",{class:"fa fa-calendar","aria-hidden":"true"},null,-1)),Hye=[Bye],jye=Ho(()=>p("i",{class:"fa fa-bar-chart","aria-hidden":"true"},null,-1)),Vye=[jye],Kye=Ho(()=>p("i",{class:"fa fa-map-o","aria-hidden":"true"},null,-1)),Yye=[Kye],qye=Ho(()=>p("i",{class:"fa fa-trophy","aria-hidden":"true"},null,-1)),Xye=[qye],Zye={key:0,class:"container privacy-policy-message"},Qye={class:"container"},Jye={class:"container dashboard-container"},e4e={class:"left-container dashboard-sub-container"},t4e={class:"right-container dashboard-sub-container"},n4e=Ho(()=>p("div",{id:"bottom"},null,-1)),r4e={key:1,class:"app-loading"},a4e=Q({__name:"Dashboard",setup(e){const t=$e(),n=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),r=k(()=>t.getters[$t.GETTERS.SPORTS]),a=ce("calendar");It(()=>t.dispatch(Y.ACTIONS.GET_USER_PROFILE));function s(o){a.value=o}return(o,i)=>{const u=ue("Loader");return n.value.username&&r.value.length>0?(T(),N("div",Wye,[p("div",Gye,[p("div",zye,[p("div",{class:ge(["mobile-menu-item",{"is-selected":a.value==="calendar"}]),onClick:i[0]||(i[0]=l=>s("calendar"))},Hye,2),p("div",{class:ge(["mobile-menu-item",{"is-selected":a.value==="chart"}]),onClick:i[1]||(i[1]=l=>s("chart"))},Vye,2),p("div",{class:ge(["mobile-menu-item",{"is-selected":a.value==="timeline"}]),onClick:i[2]||(i[2]=l=>s("timeline"))},Yye,2),p("div",{class:ge(["mobile-menu-item",{"is-selected":a.value==="records"}]),onClick:i[3]||(i[3]=l=>s("records"))},Xye,2)])]),n.value.accepted_privacy_policy?F("",!0):(T(),N("div",Zye,[M(Fye)])),p("div",Qye,[M(kye,{user:n.value},null,8,["user"])]),p("div",Jye,[p("div",e4e,[M(Eye,{sports:r.value,user:n.value,class:ge({"is-hidden":a.value!=="chart"})},null,8,["sports","user","class"]),M(Lye,{sports:r.value,user:n.value,class:ge({"is-hidden":a.value!=="records"})},null,8,["sports","user","class"])]),p("div",t4e,[M(wCe,{sports:r.value,user:n.value,class:ge({"is-hidden":a.value!=="calendar"})},null,8,["sports","user","class"]),M(eCe,{sports:r.value,user:n.value,class:ge({"is-hidden":a.value!=="timeline"})},null,8,["sports","user","class"])])]),n4e])):(T(),N("div",r4e,[M(u)]))}}}),s4e=ae(a4e,[["__scopeId","data-v-8f5da609"]]),o4e={class:"not-found view"},i4e=Q({__name:"NotFoundView",setup(e){return(t,n)=>(T(),N("div",o4e,[M(I0)]))}}),u4e={id:"privacy-policy",class:"view"},c4e={class:"container"},l4e=p("div",{id:"bottom"},null,-1),d4e=Q({__name:"PrivacyPolicyView",setup(e){const t=$e();return It(()=>{t.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY)}),(n,r)=>(T(),N("div",u4e,[p("div",c4e,[M(GA)]),l4e]))}}),ZA=e=>(ut("data-v-174c91c4"),e=e(),ct(),e),f4e={class:"chart-menu"},p4e=["disabled"],m4e=ZA(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),E4e=[m4e],h4e={class:"time-frames custom-checkboxes-group"},_4e={class:"time-frames-checkboxes custom-checkboxes"},T4e=["id","name","checked","onInput","disabled"],g4e=["id","tabindex","onKeydown"],A4e=["disabled"],S4e=ZA(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),O4e=[S4e],I4e=Q({__name:"StatsMenu",props:{isDisabled:{type:Boolean}},emits:["arrowClick","timeFrameUpdate"],setup(e,{emit:t}){const n=e,{isDisabled:r}=_e(n),a=t,s=ce("month"),o=["week","month","year"];function i(u){s.value=u,a("timeFrameUpdate",u)}return gt(()=>{if(!r.value){const u=document.getElementById("frame-month");u&&u.focus()}}),(u,l)=>(T(),N("div",f4e,[p("button",{class:"chart-arrow transparent",onClick:l[0]||(l[0]=c=>a("arrowClick",!0)),onKeydown:l[1]||(l[1]=At(c=>a("arrowClick",!0),["enter"])),disabled:h(r)},E4e,40,p4e),p("div",h4e,[p("div",_4e,[(T(),N(Ie,null,xe(o,c=>p("div",{class:"time-frame custom-checkbox",key:c},[p("label",null,[p("input",{type:"radio",id:c,name:c,checked:s.value===c,onInput:f=>i(c),disabled:h(r)},null,40,T4e),p("span",{id:`frame-${c}`,tabindex:h(r)?-1:0,role:"button",onKeydown:At(f=>i(c),["enter"])},_(u.$t(`statistics.TIME_FRAMES.${c}`)),41,g4e)])])),64))])]),p("button",{class:"chart-arrow transparent",onClick:l[2]||(l[2]=c=>a("arrowClick",!1)),onKeydown:l[3]||(l[3]=At(c=>a("arrowClick",!1),["enter"])),disabled:h(r)},O4e,40,A4e)]))}}),v4e=ae(I4e,[["__scopeId","data-v-174c91c4"]]),R4e={class:"sports-menu"},b4e=["id","name","checked","onInput"],N4e={class:"sport-label"},C4e=Q({__name:"StatsSportsMenu",props:{userSports:{},selectedSportIds:{default:()=>[]}},emits:["selectedSportIdsUpdate"],setup(e,{emit:t}){const n=e,r=t,{t:a}=jt(),s=ht("sportColors"),{selectedSportIds:o}=_e(n),i=k(()=>Jr(n.userSports,a));function u(l){r("selectedSportIdsUpdate",l)}return(l,c)=>{const f=ue("SportImage");return T(),N("div",R4e,[(T(!0),N(Ie,null,xe(i.value,d=>(T(),N("label",{type:"checkbox",key:d.id,style:Yr({color:d.color?d.color:h(s)[d.label]})},[p("input",{type:"checkbox",id:`${d.id}`,name:d.label,checked:h(o).includes(d.id),onInput:m=>u(d.id)},null,40,b4e),M(f,{"sport-label":d.label,color:d.color},null,8,["sport-label","color"]),p("span",N4e,_(d.translatedLabel),1)],4))),128))])}}}),y4e={key:0,id:"user-statistics"},D4e=Q({__name:"index",props:{sports:{},user:{},isDisabled:{type:Boolean}},setup(e){const t=e,{t:n}=jt(),{sports:r,user:a}=_e(t),s=ce("month"),o=ce(c(s.value)),i=k(()=>Jr(t.sports,n)),u=ce(d(r.value));function l(E){s.value=E,o.value=c(s.value)}function c(E){return ZCe(new Date,E,t.user.weekm)}function f(E){o.value=QCe(o.value,E,t.user.weekm)}function d(E){return E.map(g=>g.id)}function m(E){u.value.includes(E)?u.value=u.value.filter(g=>g!==E):u.value.push(E)}return Fe(()=>t.sports,E=>{u.value=d(E)}),(E,g)=>i.value?(T(),N("div",y4e,[M(v4e,{onTimeFrameUpdate:l,onArrowClick:f,isDisabled:E.isDisabled},null,8,["isDisabled"]),M(XA,{sports:h(r),user:h(a),chartParams:o.value,"displayed-sport-ids":u.value,fullStats:!0,isDisabled:E.isDisabled},null,8,["sports","user","chartParams","displayed-sport-ids","isDisabled"]),M(C4e,{"selected-sport-ids":u.value,"user-sports":h(r),onSelectedSportIdsUpdate:m},null,8,["selected-sport-ids","user-sports"])])):F("",!0)}}),P4e=ae(D4e,[["__scopeId","data-v-b145e4ac"]]),w4e={id:"statistics",class:"view"},L4e={key:0,class:"container"},$4e=Q({__name:"StatisticsView",setup(e){const t=$e(),n=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),r=k(()=>t.getters[$t.GETTERS.SPORTS].filter(s=>n.value.sports_list.includes(s.id))),a=k(()=>n.value.nb_workouts===0);return(s,o)=>{const i=ue("Card");return T(),N("div",w4e,[n.value.username?(T(),N("div",L4e,[M(i,null,{title:fe(()=>[K(_(s.$t("statistics.STATISTICS")),1)]),content:fe(()=>[M(P4e,{class:ge({"stats-disabled":a.value}),user:n.value,sports:r.value,isDisabled:a.value},null,8,["class","user","sports","isDisabled"])]),_:1}),n.value.nb_workouts===0?(T(),te(R0,{key:0})):F("",!0)])):F("",!0)])}}}),k4e=ae($4e,[["__scopeId","data-v-0aa997fa"]]),U4e={name:"EmailSent"},M4e={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 345.834 345.834",style:{"enable-background":"new 0 0 345.834 345.834"},"xml:space":"preserve"},x4e=p("g",null,[p("path",{d:`M339.798,260.429c0.13-0.026,0.257-0.061,0.385-0.094c0.109-0.028,0.219-0.051,0.326-0.084
+`)});const i=t.nonTextTags||["script","style","textarea","option"];let u,l;t.allowedAttributes&&(u={},l={},Ws(t.allowedAttributes,function(P,z){u[z]=[];const V=[];P.forEach(function(se){typeof se=="string"&&se.indexOf("*")>=0?V.push(GE(se).replace(/\\\*/g,".*")):u[z].push(se)}),V.length&&(l[z]=new RegExp("^("+V.join("|")+")$"))}));const c={},f={},d={};Ws(t.allowedClasses,function(P,z){if(u&&(cr(u,z)||(u[z]=[]),u[z].push("class")),c[z]=P,Array.isArray(P)){const V=[];c[z]=[],d[z]=[],P.forEach(function(se){typeof se=="string"&&se.indexOf("*")>=0?V.push(GE(se).replace(/\\\*/g,".*")):se instanceof RegExp?d[z].push(se):c[z].push(se)}),V.length&&(f[z]=new RegExp("^("+V.join("|")+")$"))}});const m={};let E;Ws(t.transformTags,function(P,z){let V;typeof P=="function"?V=P:typeof P=="string"&&(V=Io.simpleTransform(P)),z==="*"?E=V:m[z]=V});let g,b,v,R,A,S,C=!1;$();const L=new dge.Parser({onopentag:function(P,z){if(t.enforceHtmlBoundary&&P==="html"&&$(),A){S++;return}const V=new s(P,z);b.push(V);let se=!1;const Pe=!!V.text;let We;if(cr(m,P)&&(We=m[P](P,z),V.attribs=z=We.attribs,We.text!==void 0&&(V.innerText=We.text),P!==We.tagName&&(V.name=P=We.tagName,R[g]=We.tagName)),E&&(We=E(P,z),V.attribs=z=We.attribs,P!==We.tagName&&(V.name=P=We.tagName,R[g]=We.tagName)),(!o(P)||t.disallowedTagsMode==="recursiveEscape"&&!_ge(v)||t.nestingLimit!=null&&g>=t.nestingLimit)&&(se=!0,v[g]=!0,t.disallowedTagsMode==="discard"&&i.indexOf(P)!==-1&&(A=!0,S=1),v[g]=!0),g++,se){if(t.disallowedTagsMode==="discard")return;a=r,r=""}r+="<"+P,P==="script"&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(V.innerText=""),(!u||cr(u,P)||u["*"])&&Ws(z,function(Ae,ye){if(!Age.test(ye)){delete V.attribs[ye];return}if(Ae===""&&(t.nonBooleanAttributes.includes(ye)||t.nonBooleanAttributes.includes("*"))){delete V.attribs[ye];return}let Wt=!1;if(!u||cr(u,P)&&u[P].indexOf(ye)!==-1||u["*"]&&u["*"].indexOf(ye)!==-1||cr(l,P)&&l[P].test(ye)||l["*"]&&l["*"].test(ye))Wt=!0;else if(u&&u[P]){for(const ke of u[P])if(fge(ke)&&ke.name&&ke.name===ye){Wt=!0;let ze="";if(ke.multiple===!0){const rt=Ae.split(" ");for(const X of rt)ke.values.indexOf(X)!==-1&&(ze===""?ze=X:ze+=" "+X)}else ke.values.indexOf(Ae)>=0&&(ze=Ae);Ae=ze}}if(Wt){if(t.allowedSchemesAppliedToAttributes.indexOf(ye)!==-1&&G(P,Ae)){delete V.attribs[ye];return}if(P==="script"&&ye==="src"){let ke=!0;try{const ze=B(Ae);if(t.allowedScriptHostnames||t.allowedScriptDomains){const rt=(t.allowedScriptHostnames||[]).find(function(pe){return pe===ze.url.hostname}),X=(t.allowedScriptDomains||[]).find(function(pe){return ze.url.hostname===pe||ze.url.hostname.endsWith(`.${pe}`)});ke=rt||X}}catch{ke=!1}if(!ke){delete V.attribs[ye];return}}if(P==="iframe"&&ye==="src"){let ke=!0;try{const ze=B(Ae);if(ze.isRelativeUrl)ke=cr(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const rt=(t.allowedIframeHostnames||[]).find(function(pe){return pe===ze.url.hostname}),X=(t.allowedIframeDomains||[]).find(function(pe){return ze.url.hostname===pe||ze.url.hostname.endsWith(`.${pe}`)});ke=rt||X}}catch{ke=!1}if(!ke){delete V.attribs[ye];return}}if(ye==="srcset")try{let ke=pge(Ae);if(ke.forEach(function(ze){G("srcset",ze.url)&&(ze.evil=!0)}),ke=BE(ke,function(ze){return!ze.evil}),ke.length)Ae=Tge(BE(ke,function(ze){return!ze.evil})),V.attribs[ye]=Ae;else{delete V.attribs[ye];return}}catch{delete V.attribs[ye];return}if(ye==="class"){const ke=c[P],ze=c["*"],rt=f[P],X=d[P],pe=f["*"],le=[rt,pe].concat(X).filter(function(Se){return Se});if(ke&&ze?Ae=re(Ae,zE(ke,ze),le):Ae=re(Ae,ke||ze,le),!Ae.length){delete V.attribs[ye];return}}if(ye==="style"){if(t.parseStyleAttributes)try{const ke=mge(P+" {"+Ae+"}"),ze=w(ke,t.allowedStyles);if(Ae=Z(ze),Ae.length===0){delete V.attribs[ye];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+P+" {"+Ae+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete V.attribs[ye];return}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}r+=" "+ye,Ae&&Ae.length&&(r+='="'+U(Ae,!0)+'"')}else delete V.attribs[ye]}),t.selfClosing.indexOf(P)!==-1?r+=" />":(r+=">",V.innerText&&!Pe&&!t.textFilter&&(r+=U(V.innerText),C=!0)),se&&(r=a+U(r),a="")},ontext:function(P){if(A)return;const z=b[b.length-1];let V;if(z&&(V=z.tag,P=z.innerText!==void 0?z.innerText:P),t.disallowedTagsMode==="discard"&&(V==="script"||V==="style"))r+=P;else{const se=U(P,!1);t.textFilter&&!C?r+=t.textFilter(se,V):C||(r+=se)}if(b.length){const se=b[b.length-1];se.text+=P}},onclosetag:function(P,z){if(A)if(S--,!S)A=!1;else return;const V=b.pop();if(!V)return;if(V.tag!==P){b.push(V);return}A=t.enforceHtmlBoundary?P==="html":!1,g--;const se=v[g];if(se){if(delete v[g],t.disallowedTagsMode==="discard"){V.updateParentNodeText();return}a=r,r=""}if(R[g]&&(P=R[g],delete R[g]),t.exclusiveFilter&&t.exclusiveFilter(V)){r=r.substr(0,V.tagPosition);return}if(V.updateParentNodeMediaChildren(),V.updateParentNodeText(),t.selfClosing.indexOf(P)!==-1||z&&!o(P)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0){se&&(r=a,a="");return}r+=""+P+">",se&&(r=a+U(r),a=""),C=!1}},t.parser);return L.write(e),L.end(),r;function $(){r="",g=0,b=[],v={},R={},A=!1,S=0}function U(P,z){return typeof P!="string"&&(P=P+""),t.parser.decodeEntities&&(P=P.replace(/&/g,"&").replace(//g,">"),z&&(P=P.replace(/"/g,"""))),P=P.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),z&&(P=P.replace(/"/g,""")),P}function G(P,z){for(z=z.replace(/[\x00-\x20]+/g,"");;){const Pe=z.indexOf("",Pe+4);if(We===-1)break;z=z.substring(0,Pe)+z.substring(We+3)}const V=z.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!V)return z.match(/^[/\\]{2}/)?!t.allowProtocolRelative:!1;const se=V[1].toLowerCase();return cr(t.allowedSchemesByTag,P)?t.allowedSchemesByTag[P].indexOf(se)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(se)===-1}function B(P){if(P=P.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),P.startsWith("relative:"))throw new Error("relative: exploit attempt");let z="relative://relative-site";for(let Pe=0;Pe<100;Pe++)z+=`/${Pe}`;const V=new URL(P,z);return{isRelativeUrl:V&&V.hostname==="relative-site"&&V.protocol==="relative:",url:V}}function w(P,z){if(!z)return P;const V=P.nodes[0];let se;return z[V.selector]&&z["*"]?se=zE(z[V.selector],z["*"]):se=z[V.selector]||z["*"],se&&(P.nodes[0].nodes=V.nodes.reduce(J(se),[])),P}function Z(P){return P.nodes[0].nodes.reduce(function(z,V){return z.push(`${V.prop}:${V.value}${V.important?" !important":""}`),z},[]).join(";")}function J(P){return function(z,V){return cr(P,V.prop)&&P[V.prop].some(function(Pe){return Pe.test(V.value)})&&z.push(V),z}}function re(P,z,V){return z?(P=P.split(/\s+/),P.filter(function(se){return z.indexOf(se)!==-1||V.some(function(Pe){return Pe.test(se)})}).join(" ")):P}}const Sge={decodeEntities:!0};Io.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0};Io.simpleTransform=function(e,t,n){return n=n===void 0?!0:n,t=t||{},function(r,a){let s;if(n)for(s in t)a[s]=t[s];else a=t;return{tagName:e,attribs:a}}};const Oge=qd(gge),vo=e=>Oge(Zhe(e,{target:"_blank"}),{allowedTags:["a"],disallowedTagsMode:"escape"}),Ige=e=>(ut("data-v-a720b26e"),e=e(),ct(),e),vge={id:"admin-app",class:"admin-card"},Rge={for:"admin_contact"},bge=["value"],Nge=["disabled"],Cge={for:"max_users"},yge=["disabled"],Dge={class:"user-limit-help"},Pge={class:"info-box"},wge=Ige(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),Lge={for:"max_single_file_size"},$ge=["disabled"],kge={for:"max_zip_file_size"},Uge=["disabled"],Mge={for:"gpx_limit_import"},xge=["disabled"],Fge={class:"about-label",for:"about"},Wge={class:"textarea-description"},Gge=["innerHTML"],zge={class:"privacy-policy-label",for:"privacy_policy"},Bge={class:"textarea-description"},Hge=["innerHTML"],jge={key:5,class:"form-buttons"},Vge={class:"confirm",type:"submit"},Kge={key:6,class:"form-buttons"},Yge=Q({__name:"AdminApplication",props:{appConfig:{},edition:{type:Boolean,default:!1}},setup(e){const t=e,{edition:n}=_e(t),r=$e(),a=Zr(),s=xt({admin_contact:"",max_users:0,max_single_file_size:0,max_zip_file_size:0,gpx_limit_import:0,about:"",privacy_policy:""}),o=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]);It(()=>{t.appConfig&&i(t.appConfig)});function i(c){Object.keys(s).map(f=>{["max_single_file_size","max_zip_file_size"].includes(f)?s[f]=Ahe(c[f]):["about","privacy_policy"].includes(f)?s[f]=c[f]!==null?c[f]:"":s[f]=c[f]})}function u(){i(t.appConfig),r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),a.push("/admin/application")}function l(){const c=Object.assign({},s);c.max_single_file_size*=1048576,c.max_zip_file_size*=1048576,r.dispatch(H.ACTIONS.UPDATE_APPLICATION_CONFIG,c)}return(c,f)=>{const d=ue("ErrorMessage"),m=ue("Card");return T(),N("div",vge,[M(m,null,{title:fe(()=>[K(_(c.$t("admin.APP_CONFIG.TITLE")),1)]),content:fe(()=>[p("form",{class:"admin-form",onSubmit:Xe(l,["prevent"])},[p("label",Rge,[K(_(c.$t("admin.APP_CONFIG.ADMIN_CONTACT"))+": ",1),!h(n)&&!s.admin_contact?(T(),N("input",{key:0,class:"no-contact",value:c.$t("admin.APP_CONFIG.NO_CONTACT_EMAIL"),disabled:""},null,8,bge)):Ke((T(),N("input",{key:1,id:"admin_contact",name:"admin_contact",type:"email","onUpdate:modelValue":f[0]||(f[0]=E=>s.admin_contact=E),disabled:!h(n)},null,8,Nge)),[[tt,s.admin_contact]])]),p("label",Cge,[K(_(c.$t("admin.APP_CONFIG.MAX_USERS_LABEL"))+": ",1),Ke(p("input",{id:"max_users",name:"max_users",type:"number",min:"0","onUpdate:modelValue":f[1]||(f[1]=E=>s.max_users=E),disabled:!h(n)},null,8,yge),[[tt,s.max_users]])]),p("div",Dge,[p("span",Pge,[wge,K(" "+_(c.$t("admin.APP_CONFIG.MAX_USERS_HELP")),1)])]),p("label",Lge,[K(_(c.$t("admin.APP_CONFIG.SINGLE_UPLOAD_MAX_SIZE_LABEL"))+": ",1),Ke(p("input",{id:"max_single_file_size",name:"max_single_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[2]||(f[2]=E=>s.max_single_file_size=E),disabled:!h(n)},null,8,$ge),[[tt,s.max_single_file_size]])]),p("label",kge,[K(_(c.$t("admin.APP_CONFIG.ZIP_UPLOAD_MAX_SIZE_LABEL"))+": ",1),Ke(p("input",{id:"max_zip_file_size",name:"max_zip_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[3]||(f[3]=E=>s.max_zip_file_size=E),disabled:!h(n)},null,8,Uge),[[tt,s.max_zip_file_size]])]),p("label",Mge,[K(_(c.$t("admin.APP_CONFIG.MAX_FILES_IN_ZIP_LABEL"))+": ",1),Ke(p("input",{id:"gpx_limit_import",name:"gpx_limit_import",type:"number",min:"0","onUpdate:modelValue":f[4]||(f[4]=E=>s.gpx_limit_import=E),disabled:!h(n)},null,8,xge),[[tt,s.gpx_limit_import]])]),p("label",Fge,_(c.$t("admin.ABOUT.TEXT"))+": ",1),p("span",Wge,_(c.$t("admin.ABOUT.DESCRIPTION")),1),h(n)?Ke((T(),N("textarea",{key:0,id:"about",name:"about",rows:"10","onUpdate:modelValue":f[5]||(f[5]=E=>s.about=E)},null,512)),[[tt,s.about]]):(T(),N("div",{key:1,innerHTML:h(ma)(h(vo)(s.about?s.about:c.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,Gge)),p("label",zge,_(St(c.$t("privacy_policy.TITLE")))+": ",1),p("span",Bge,_(c.$t("admin.PRIVACY_POLICY_DESCRIPTION")),1),h(n)?Ke((T(),N("textarea",{key:2,id:"privacy_policy",name:"privacy_policy",rows:"20","onUpdate:modelValue":f[6]||(f[6]=E=>s.privacy_policy=E)},null,512)),[[tt,s.privacy_policy]]):(T(),N("div",{key:3,innerHTML:h(ma)(h(vo)(s.privacy_policy?s.privacy_policy:c.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,Hge)),o.value?(T(),te(d,{key:4,message:o.value},null,8,["message"])):F("",!0),h(n)?(T(),N("div",jge,[p("button",Vge,_(c.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:Xe(u,["prevent"])},_(c.$t("buttons.CANCEL")),1)])):(T(),N("div",Kge,[p("button",{class:"confirm",onClick:f[7]||(f[7]=Xe(E=>c.$router.push("/admin/application/edit"),["prevent"]))},_(c.$t("buttons.EDIT")),1),p("button",{class:"cancel",onClick:f[8]||(f[8]=Xe(E=>c.$router.push("/admin"),["prevent"]))},_(c.$t("admin.BACK_TO_ADMIN")),1)]))],32)]),_:1})])}}}),HE=ae(Yge,[["__scopeId","data-v-a720b26e"]]),qge={class:"stat-card"},Xge={class:"stat-content box"},Zge={class:"stat-icon"},Qge={class:"stat-details"},Jge={class:"stat-huge"},eAe={class:"stat"},pr=Q({__name:"StatCard",props:{icon:{},text:{},value:{}},setup(e){const t=e,{icon:n,text:r,value:a}=_e(t);return(s,o)=>(T(),N("div",qge,[p("div",Xge,[p("div",Zge,[p("i",{class:ge(["fa",`fa-${h(n)}`])},null,2)]),p("div",Qge,[p("div",Jge,_(h(a)),1),p("div",eAe,_(h(r)),1)])])]))}}),tAe={id:"user-stats"},nAe=Q({__name:"AppStatsCards",props:{appStatistics:{}},setup(e){const t=e,{appStatistics:n}=_e(t),r=k(()=>qT(n.value.uploads_dir_size));return(a,s)=>(T(),N("div",tAe,[M(pr,{icon:"users",value:h(n).users,text:a.$t("admin.USER",h(n).users)},null,8,["value","text"]),M(pr,{icon:"tags",value:h(n).sports,text:a.$t("workouts.SPORT",h(n).sports)},null,8,["value","text"]),M(pr,{icon:"calendar",value:h(n).workouts,text:a.$t("workouts.WORKOUT",h(n).workouts)},null,8,["value","text"]),M(pr,{icon:"folder-open",value:r.value.size,text:r.value.suffix},null,8,["value","text"])]))}}),EA=e=>(ut("data-v-efcd2677"),e=e(),ct(),e),rAe={id:"admin-menu",class:"center-card"},aAe={class:"admin-menu description-list"},sAe={class:"application-config-details"},oAe=EA(()=>p("br",null,null,-1)),iAe={class:"registration-status"},uAe={key:0,class:"email-sending-status"},cAe=EA(()=>p("i",{class:"fa fa-exclamation-triangle","aria-hidden":"true"},null,-1)),lAe=Q({__name:"AdminMenu",props:{appConfig:{},appStatistics:{default:()=>({})}},setup(e){const t=e,{appConfig:n,appStatistics:r}=_e(t);return gt(()=>{const a=document.getElementById("adminLink");a&&a.focus()}),(a,s)=>{const o=ue("router-link");return T(),N("div",rAe,[M(xT,null,{title:fe(()=>[K(_(a.$t("admin.ADMINISTRATION")),1)]),content:fe(()=>[M(nAe,{appStatistics:h(r)},null,8,["appStatistics"]),p("div",aAe,[p("dl",null,[p("dt",null,[M(o,{id:"adminLink",to:"/admin/application"},{default:fe(()=>[K(_(a.$t("admin.APPLICATION")),1)]),_:1})]),p("dd",sAe,[K(_(a.$t("admin.UPDATE_APPLICATION_DESCRIPTION")),1),oAe,p("span",iAe,_(a.$t(`admin.REGISTRATION_${h(n).is_registration_enabled?"ENABLED":"DISABLED"}`)),1),h(n).is_email_sending_enabled?F("",!0):(T(),N("span",uAe,[cAe,K(" "+_(a.$t("admin.EMAIL_SENDING_DISABLED")),1)]))]),p("dt",null,[M(o,{to:"/admin/sports"},{default:fe(()=>[K(_(St(a.$t("workouts.SPORT",0))),1)]),_:1})]),p("dd",null,_(a.$t("admin.ENABLE_DISABLE_SPORTS")),1),p("dt",null,[M(o,{to:"/admin/users"},{default:fe(()=>[K(_(St(a.$t("admin.USER",0))),1)]),_:1})]),p("dd",null,_(a.$t("admin.ADMIN_RIGHTS_DELETE_USER_ACCOUNT")),1)])])]),_:1})])}}}),dAe=ae(lAe,[["__scopeId","data-v-efcd2677"]]),h0={"Cycling (Sport)":"#4c9792","Cycling (Trekking)":"#a8af88","Cycling (Transport)":"#88af98","Cycling (Virtual)":"#64a360",Hiking:"#bb757c","Mountain Biking":"#d4b371","Mountain Biking (Electric)":"#fc9d6f",Mountaineering:"#48b3b7","Open Water Swimming":"#4058a4",Paragliding:"#c23c50",Rowing:"#fcce72",Running:"#835b83","Skiing (Alpine)":"#67a4bd","Skiing (Cross Country)":"#9498d0",Snowshoes:"#5780a8",Trail:"#09a98a",Walking:"#838383"},fAe=e=>{const t={};return e.map(n=>t[n.id]=n.color?n.color:h0[n.label]),t},pAe=(e,t)=>{const n=e.translatedLabel.toLowerCase(),r=t.translatedLabel.toLowerCase();return n>r?1:ne.filter(a=>n==="all"?!0:r.includes(a.id)||a[n]).map(a=>({...a,translatedLabel:t(`sports.${a.label}.LABEL`)})).sort(pAe),_0=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.label)[0],T0=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.color)[0],Cc=e=>(ut("data-v-203d96b8"),e=e(),ct(),e),mAe={id:"admin-sports",class:"admin-card"},EAe={class:"responsive-table"},hAe=Cc(()=>p("th",null,"#",-1)),_Ae={class:"text-left"},TAe={class:"text-left sport-action"},gAe=Cc(()=>p("th",null,null,-1)),AAe={class:"text-center"},SAe=Cc(()=>p("span",{class:"cell-heading"},"id",-1)),OAe={class:"cell-heading"},IAe={class:"sport-label"},vAe={class:"cell-heading"},RAe={class:"text-center"},bAe={class:"cell-heading"},NAe={class:"sport-action"},CAe={class:"cell-heading"},yAe={class:"action-button"},DAe=["onClick"],PAe={key:0,class:"has-workouts"},wAe=Cc(()=>p("i",{class:"fa fa-warning","aria-hidden":"true"},null,-1)),LAe=Q({__name:"AdminSports",setup(e){const{t}=jt(),n=$e(),r=k(()=>Jr(n.getters[$t.GETTERS.SPORTS],t)),a=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);function s(o,i){n.dispatch($t.ACTIONS.UPDATE_SPORTS,{id:o,isActive:i})}return(o,i)=>{const u=ue("SportImage"),l=ue("ErrorMessage"),c=ue("Card");return T(),N("div",mAe,[M(c,null,{title:fe(()=>[K(_(o.$t("admin.SPORTS.TITLE")),1)]),content:fe(()=>[p("button",{class:"top-button",onClick:i[0]||(i[0]=Xe(f=>o.$router.push("/admin"),["prevent"]))},_(o.$t("admin.BACK_TO_ADMIN")),1),p("div",EAe,[p("table",null,[p("thead",null,[p("tr",null,[hAe,p("th",null,_(o.$t("admin.SPORTS.TABLE.IMAGE")),1),p("th",_Ae,_(o.$t("admin.SPORTS.TABLE.LABEL")),1),p("th",null,_(o.$t("admin.SPORTS.TABLE.ACTIVE")),1),p("th",TAe,_(o.$t("admin.ACTION")),1),gAe])]),p("tbody",null,[(T(!0),N(Ie,null,xe(r.value,f=>(T(),N("tr",{key:f.id},[p("td",AAe,[SAe,K(" "+_(f.id),1)]),p("td",null,[p("span",OAe,_(o.$t("admin.SPORTS.TABLE.IMAGE")),1),M(u,{title:f.translatedLabel,"sport-label":f.label,color:f.color},null,8,["title","sport-label","color"])]),p("td",IAe,[p("span",vAe,_(o.$t("admin.SPORTS.TABLE.LABEL")),1),K(" "+_(f.translatedLabel),1)]),p("td",RAe,[p("span",bAe,_(o.$t("admin.SPORTS.TABLE.ACTIVE")),1),p("i",{class:ge(`fa fa${f.is_active?"-check":""}`),"aria-hidden":"true"},null,2)]),p("td",NAe,[p("span",CAe,_(o.$t("admin.ACTION")),1),p("div",yAe,[p("button",{class:ge({danger:f.is_active}),onClick:d=>s(f.id,!f.is_active)},_(o.$t(`buttons.${f.is_active?"DIS":"EN"}ABLE`)),11,DAe),f.has_workouts?(T(),N("span",PAe,[wAe,K(" "+_(o.$t("admin.SPORTS.TABLE.HAS_WORKOUTS")),1)])):F("",!0)])])]))),128))])]),a.value?(T(),te(l,{key:0,message:a.value},null,8,["message"])):F("",!0),p("button",{onClick:i[1]||(i[1]=Xe(f=>o.$router.push("/admin"),["prevent"]))},_(o.$t("admin.BACK_TO_ADMIN")),1)])]),_:1})])}}}),$Ae=ae(LAe,[["__scopeId","data-v-203d96b8"]]),kAe={class:"table-selects"},UAe=["value"],MAe=["value"],xAe=["value"],FAe=["value"],WAe=["value"],GAe=["value"],zAe=Q({__name:"FilterSelects",props:{order_by:{},query:{},sort:{},message:{}},emits:["updateSelect"],setup(e,{emit:t}){const n=e,r=t,{order_by:a,query:s,sort:o,message:i}=_e(n),u=[10,25,50,100];function l(c){r("updateSelect",c.target.id,c.target.value)}return(c,f)=>(T(),N("div",kAe,[p("label",null,[K(_(c.$t("common.SELECTS.ORDER_BY.LABEL"))+": ",1),p("select",{name:"order_by",id:"order_by",value:h(s).order_by,onChange:l},[(T(!0),N(Ie,null,xe(h(a),d=>(T(),N("option",{value:d,key:d},_(c.$t(`${h(i)}.${d.toUpperCase()}`)),9,MAe))),128))],40,UAe)]),p("label",null,[K(_(c.$t("common.SELECTS.ORDER.LABEL"))+": ",1),p("select",{name:"order",id:"order",value:h(s).order,onChange:l},[(T(!0),N(Ie,null,xe(h(o),d=>(T(),N("option",{value:d,key:d},_(c.$t(`common.SELECTS.ORDER.${d.toUpperCase()}`)),9,FAe))),128))],40,xAe)]),p("label",null,[K(_(c.$t("common.SELECTS.PER_PAGE.LABEL"))+": ",1),p("select",{name:"per_page",id:"per_page",value:h(s).per_page,onChange:l},[(T(),N(Ie,null,xe(u,d=>p("option",{value:d,key:d},_(d),9,GAe)),64))],40,WAe)])]))}}),hA=ae(zAe,[["__scopeId","data-v-fc86ab3c"]]),g0=["asc","desc"],_A=1,BAe=10,Fd=(e,t)=>e&&typeof e=="string"&&+e>0?+e:t,jE=(e,t,n)=>e&&typeof e=="string"&&t.includes(e)?e:n,Wd=(e,t,n,r)=>{const s=(r||{}).defaultSort||"asc",o={};return o.page=Fd(e.page,_A),o.per_page=Fd(e.per_page,BAe),o.order=jE(e.order,g0,s),o.order_by=jE(e.order_by,t,n),typeof e.q=="string"?o.q=e.q:delete o.q,o},HAe=["from","to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","distance_from","distance_to","duration_from","duration_to","sport_id","title"],Pa=(e,t=1)=>Array.from({length:e-t+1},(n,r)=>t+r),jAe=(e,t)=>{if(e<0)return[];if(e<9)return Pa(e);let n=[1,2];return t<4?n=n.concat([3,4,5]):t<6?n=n.concat(Pa(t+2,3)):(n=n.concat(["..."]),t=e-2&&+n[n.length-1](ut("data-v-69dd9739"),e=e(),ct(),e),VAe={class:"pagination-center","aria-label":"navigation"},KAe={class:"pagination"},YAe=TA(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),qAe={key:0},XAe=TA(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),ZAe=Q({__name:"Pagination",props:{pagination:{},path:{},query:{}},setup(e){const t=e,{pagination:n,path:r,query:a}=_e(t);function s(o,i){const u=Object.assign({},a.value);return u.page=i?o+i:o,u}return(o,i)=>{const u=ue("router-link");return T(),N("nav",VAe,[p("ul",KAe,[p("li",{class:ge(["page-prev",{disabled:!h(n).has_prev}])},[M(u,{class:"page-link",to:{path:h(r),query:s(h(n).page,-1)},disabled:!h(n).has_prev,tabindex:h(n).has_prev?0:-1},{default:fe(({navigate:l})=>[Va(o.$slots,"default",{onClick:c=>h(n).has_next?l:null},()=>[K(_(o.$t("api.PAGINATION.PREVIOUS"))+" ",1),YAe],!0)]),_:3},8,["to","disabled","tabindex"])],2),(T(!0),N(Ie,null,xe(h(jAe)(h(n).pages,h(n).page),l=>(T(),N("li",{key:l,class:ge(["page",{active:l===h(n).page}])},[l==="..."?(T(),N("span",qAe," ... ")):(T(),te(u,{key:1,class:"page-link",to:{path:h(r),query:s(+l)}},{default:fe(()=>[K(_(l),1)]),_:2},1032,["to"]))],2))),128)),p("li",{class:ge(["page-next",{disabled:!h(n).has_next}])},[M(u,{class:"page-link",to:{path:h(r),query:s(h(n).page,1)},disabled:!h(n).has_next,tabindex:h(n).has_next?0:-1},{default:fe(({navigate:l})=>[Va(o.$slots,"default",{onClick:c=>h(n).has_next?l:null},()=>[K(_(o.$t("api.PAGINATION.NEXT"))+" ",1),XAe],!0)]),_:3},8,["to","disabled","tabindex"])],2)])])}}}),Wu=ae(ZAe,[["__scopeId","data-v-69dd9739"]]),QAe={class:"users-filters"},JAe={class:"search-username"},eSe=["placeholder"],tSe=Q({__name:"UsersNameFilter",emits:["filterOnUsername"],setup(e,{emit:t}){const n=Vt(),r=ce(n.query.q?n.query.q:""),a=t;function s(){r.value!==""&&a("filterOnUsername",r)}function o(){r.value="",a("filterOnUsername",r.value)}return(i,u)=>(T(),N("div",QAe,[p("div",JAe,[Ke(p("input",{id:"username",name:"username","onUpdate:modelValue":u[0]||(u[0]=l=>r.value=l),onKeyup:At(s,["enter"]),placeholder:i.$t("user.FILTER_ON_USERNAME")},null,40,eSe),[[tt,r.value,void 0,{trim:!0}]]),r.value!==""?(T(),N("i",{key:0,class:"fa fa-times","aria-hidden":"true",onClick:o})):F("",!0)]),p("i",{class:ge(["fa fa-search",{"fa-disabled":r.value===""}]),"aria-hidden":"true",onClick:s},null,2)]))}}),nSe=ae(tSe,[["__scopeId","data-v-553040c7"]]);var Gd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){if(r===null||r===!0||r===!1)return NaN;var a=Number(r);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}e.exports=t.default})(Gd,Gd.exports);var rSe=Gd.exports;const aSe=qd(rSe);var zd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){var a=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return a.setUTCFullYear(r.getFullYear()),r.getTime()-a.getTime()}e.exports=t.default})(zd,zd.exports);var sSe=zd.exports;const VE=qd(sSe);function oSe(e,t){var n=lSe(t);return n.formatToParts?uSe(n,e):cSe(n,e)}var iSe={year:0,month:1,day:2,hour:3,minute:4,second:5};function uSe(e,t){try{for(var n=e.formatToParts(t),r=[],a=0;a=0&&(r[s]=parseInt(n[a].value,10))}return r}catch(o){if(o instanceof RangeError)return[NaN];throw o}}function cSe(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var pl={};function lSe(e){if(!pl[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";pl[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return pl[e]}function gA(e,t,n,r,a,s,o){var i=new Date(0);return i.setUTCFullYear(e,t,n),i.setUTCHours(r,a,s,o),i}var KE=36e5,dSe=6e4,ml={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function AA(e,t,n){var r,a;if(!e||(r=ml.timezoneZ.exec(e),r))return 0;var s;if(r=ml.timezoneHH.exec(e),r)return s=parseInt(r[1],10),YE(s)?-(s*KE):NaN;if(r=ml.timezoneHHMM.exec(e),r){s=parseInt(r[1],10);var o=parseInt(r[2],10);return YE(s,o)?(a=Math.abs(s)*KE+o*dSe,s>0?-a:a):NaN}if(mSe(e)){t=new Date(t||Date.now());var i=n?t:fSe(t),u=Bd(i,e),l=n?u:pSe(t,u,e);return-l}return NaN}function fSe(e){return gA(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Bd(e,t){var n=oSe(e,t),r=gA(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),a=e.getTime(),s=a%1e3;return a-=s>=0?s:1e3+s,r-a}function pSe(e,t,n){var r=e.getTime(),a=r-t,s=Bd(new Date(a),n);if(t===s)return t;a-=s-t;var o=Bd(new Date(a),n);return s===o?s:Math.max(s,o)}function YE(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var qE={};function mSe(e){if(qE[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),qE[e]=!0,!0}catch{return!1}}var ESe=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,El=36e5,XE=6e4,hSe=2,Qt={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:ESe};function _Se(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},r=n.additionalDigits==null?hSe:aSe(n.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=TSe(e),s=gSe(a.date,r),o=s.year,i=s.restDateString,u=ASe(i,o);if(isNaN(u))return new Date(NaN);if(u){var l=u.getTime(),c=0,f;if(a.time&&(c=SSe(a.time),isNaN(c)))return new Date(NaN);if(a.timeZone||n.timeZone){if(f=AA(a.timeZone||n.timeZone,new Date(l+c)),isNaN(f))return new Date(NaN)}else f=VE(new Date(l+c)),f=VE(new Date(l+c+f));return new Date(l+c+f)}else return new Date(NaN)}function TSe(e){var t={},n=Qt.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=Qt.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){var a=Qt.timeZone.exec(r);a?(t.time=r.replace(a[1],""),t.timeZone=a[1].trim()):t.time=r}return t}function gSe(e,t){var n=Qt.YYY[t],r=Qt.YYYYY[t],a;if(a=Qt.YYYY.exec(e)||r.exec(e),a){var s=a[1];return{year:parseInt(s,10),restDateString:e.slice(s.length)}}if(a=Qt.YY.exec(e)||n.exec(e),a){var o=a[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}return{year:null}}function ASe(e,t){if(t===null)return null;var n,r,a,s;if(e.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(n=Qt.MM.exec(e),n)return r=new Date(0),a=parseInt(n[1],10)-1,QE(t,a)?(r.setUTCFullYear(t,a),r):new Date(NaN);if(n=Qt.DDD.exec(e),n){r=new Date(0);var o=parseInt(n[1],10);return vSe(t,o)?(r.setUTCFullYear(t,0,o),r):new Date(NaN)}if(n=Qt.MMDD.exec(e),n){r=new Date(0),a=parseInt(n[1],10)-1;var i=parseInt(n[2],10);return QE(t,a,i)?(r.setUTCFullYear(t,a,i),r):new Date(NaN)}if(n=Qt.Www.exec(e),n)return s=parseInt(n[1],10)-1,JE(t,s)?ZE(t,s):new Date(NaN);if(n=Qt.WwwD.exec(e),n){s=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return JE(t,s,u)?ZE(t,s,u):new Date(NaN)}return null}function SSe(e){var t,n,r;if(t=Qt.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),hl(n)?n%24*El:NaN;if(t=Qt.HHMM.exec(e),t)return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),hl(n,r)?n%24*El+r*XE:NaN;if(t=Qt.HHMMSS.exec(e),t){n=parseInt(t[1],10),r=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return hl(n,r,a)?n%24*El+r*XE+a*1e3:NaN}return null}function ZE(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var a=r.getUTCDay()||7,s=t*7+n+1-a;return r.setUTCDate(r.getUTCDate()+s),r}var OSe=[31,28,31,30,31,30,31,31,30,31,30,31],ISe=[31,29,31,30,31,30,31,31,30,31,30,31];function SA(e){return e%400===0||e%4===0&&e%100!==0}function QE(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var r=SA(e);if(r&&n>ISe[t]||!r&&n>OSe[t])return!1}return!0}function vSe(e,t){if(t<1)return!1;var n=SA(e);return!(n&&t>366||!n&&t>365)}function JE(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function hl(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function RSe(e,t,n){var r=_Se(e,n),a=AA(t,r,!0),s=new Date(r.getTime()-a),o=new Date(0);return o.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),o.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),o}const{locale:Gu}=ga.global,bSe=(e,t,n)=>{switch(e){case"week":return lc(t,{weekStartsOn:n?1:0});case"year":return Lf(t);case"month":return Uo(t);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},NSe=(e,t)=>{switch(e){case"week":return $o(t,7);case"year":return Qi(t,1);case"month":return Za(t,1);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},yc=(e,t)=>RSe(new Date(e),t),eh=(e,t)=>{const n=Uo(e),r=ko(e),a=t?1:0;return{start:lc(n,{weekStartsOn:a}),end:$f(r,{weekStartsOn:a})}},OA=(e,t=null,n=null)=>(t||(t="yyyy/MM/dd"),t=Sa(t,Gu.value),n||(n="HH:mm"),{workout_date:ln(e,t,{locale:Mo[Gu.value]}),workout_time:ln(e,n)}),CSe=["MM/dd/yyyy","dd/MM/yyyy","yyyy-MM-dd","date_string"],IA={de:"do MMM yyyy",en:"MMM. do, yyyy",es:"d MMM yyyy",fr:"d MMM yyyy",gl:"d MMM yyyy",it:"d MMM yyyy",pl:"d MMM yyyy",nb:"do MMM yyyy",nl:"d MMM yyyy"},Sa=(e,t)=>e==="date_string"?IA[t]:e,xn=(e,t,n,r=!0,a=null,s=!1)=>{a||(a=Gu.value);const o=r?s?" HH:mm:ss":" HH:mm":"";return ln(yc(e,t),`${Sa(n,a)}${o}`,{locale:Mo[a]})},ySe=(e,t,n=null)=>{const r=n||Gu.value,a=[];return CSe.map(s=>{const o=Sa(s,r);a.push({label:`${o} - ${xn(e,t,o,!1,r)}`,value:s})}),a},DSe=e=>(ut("data-v-4beb3bfa"),e=e(),ct(),e),PSe={id:"admin-users",class:"admin-card"},wSe={key:0,class:"no-users"},LSe={key:1,class:"responsive-table"},$Se=DSe(()=>p("th",null,"#",-1)),kSe={class:"left-text"},USe={class:"left-text"},MSe={class:"left-text"},xSe={class:"cell-heading"},FSe={class:"cell-heading"},WSe={class:"cell-heading"},GSe={class:"cell-heading"},zSe={class:"text-center"},BSe={class:"cell-heading"},HSe={class:"text-center"},jSe={class:"cell-heading"},VSe={class:"text-center"},KSe={class:"cell-heading"},YSe={class:"text-center"},qSe={class:"cell-heading"},XSe=["disabled","onClick"],th="created_at",ZSe=Q({__name:"AdminUsers",setup(e){const t=$e(),n=Vt(),r=Zr(),a=["is_active","admin","created_at","username","workouts_count"];let s=xt(Wd(n.query,a,th));const o=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),i=k(()=>t.getters[Ce.GETTERS.USERS]),u=k(()=>t.getters[Ce.GETTERS.USERS_PAGINATION]),l=k(()=>t.getters[H.GETTERS.ERROR_MESSAGES]);It(()=>c(s));function c(E){t.dispatch(Ce.ACTIONS.GET_USERS,E)}function f(E){m("q",E.value)}function d(E,g){t.dispatch(Ce.ACTIONS.UPDATE_USER,{username:E,admin:g})}function m(E,g){s[E]=g,E==="per_page"&&(s.page=1),r.push({path:"/admin/users",query:s})}return Rt(()=>{t.dispatch(Ce.ACTIONS.EMPTY_USERS)}),Fe(()=>n.query,E=>{s=Wd(E,a,th,{query:s}),c(s)}),(E,g)=>{const b=ue("router-link"),v=ue("ErrorMessage"),R=ue("Card");return T(),N("div",PSe,[M(R,null,{title:fe(()=>[K(_(St(E.$t("admin.USER",0))),1)]),content:fe(()=>[p("button",{class:"top-button",onClick:g[0]||(g[0]=Xe(A=>E.$router.push("/admin"),["prevent"]))},_(E.$t("admin.BACK_TO_ADMIN")),1),M(nSe,{onFilterOnUsername:f}),M(hA,{sort:h(g0),order_by:a,query:h(s),message:"admin.USERS.SELECTS.ORDER_BY",onUpdateSelect:m},null,8,["sort","query"]),i.value.length===0?(T(),N("div",wSe,_(E.$t("user.NO_USERS_FOUND")),1)):(T(),N("div",LSe,[p("table",null,[p("thead",null,[p("tr",null,[$Se,p("th",kSe,_(E.$t("user.USERNAME")),1),p("th",USe,_(E.$t("user.EMAIL")),1),p("th",MSe,_(E.$t("user.PROFILE.REGISTRATION_DATE")),1),p("th",null,_(St(E.$t("workouts.WORKOUT",0))),1),p("th",null,_(E.$t("admin.ACTIVE")),1),p("th",null,_(E.$t("user.ADMIN")),1),p("th",null,_(E.$t("admin.ACTION")),1)])]),p("tbody",null,[(T(!0),N(Ie,null,xe(i.value,A=>(T(),N("tr",{key:A.username},[p("td",null,[p("span",xSe,_(E.$t("user.PROFILE.PICTURE")),1),M(Lo,{user:A},null,8,["user"])]),p("td",null,[p("span",FSe,_(E.$t("user.USERNAME")),1),M(b,{to:`/admin/users/${A.username}`},{default:fe(()=>[K(_(A.username),1)]),_:2},1032,["to"])]),p("td",null,[p("span",WSe,_(E.$t("user.EMAIL")),1),K(" "+_(A.email),1)]),p("td",null,[p("span",GSe,_(E.$t("user.PROFILE.REGISTRATION_DATE")),1),p("time",null,_(h(xn)(A.created_at,o.value.timezone,o.value.date_format)),1)]),p("td",zSe,[p("span",BSe,_(St(E.$t("workouts.WORKOUT",0))),1),K(" "+_(A.nb_workouts),1)]),p("td",HSe,[p("span",jSe,_(E.$t("admin.ACTIVE")),1),p("i",{class:ge(`fa fa${A.is_active?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),p("td",VSe,[p("span",KSe,_(E.$t("user.ADMIN")),1),p("i",{class:ge(`fa fa${A.admin?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),p("td",YSe,[p("span",qSe,_(E.$t("admin.ACTION")),1),p("button",{class:ge({danger:A.admin}),disabled:A.username===o.value.username,onClick:S=>d(A.username,!A.admin)},_(E.$t(`admin.USERS.TABLE.${A.admin?"REMOVE":"ADD"}_ADMIN_RIGHTS`)),11,XSe)])]))),128))])]),u.value.page?(T(),te(Wu,{key:0,path:"/admin/users",pagination:u.value,query:h(s)},null,8,["pagination","query"])):F("",!0),l.value?(T(),te(v,{key:1,message:l.value},null,8,["message"])):F("",!0),p("button",{onClick:g[1]||(g[1]=Xe(A=>E.$router.push("/admin"),["prevent"]))},_(E.$t("admin.BACK_TO_ADMIN")),1)]))]),_:1})])}}}),QSe=ae(ZSe,[["__scopeId","data-v-4beb3bfa"]]),JSe={class:"box user-header"},eOe={class:"user-details"},tOe={class:"user-name"},nOe={class:"user-stats"},rOe={class:"user-stat"},aOe={class:"stat-number"},sOe={class:"stat-label"},oOe={class:"user-stat"},iOe={class:"stat-label"},uOe={class:"user-stat hide-small"},cOe={class:"stat-number"},lOe={class:"stat-label"},dOe=Q({__name:"UserHeader",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=$e(),a=k(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]);return(s,o)=>{const i=ue("Distance");return T(),N("div",JSe,[M(Lo,{user:h(n)},null,8,["user"]),p("div",eOe,[p("div",tOe,_(h(n).username),1),p("div",nOe,[p("div",rOe,[p("span",aOe,_(h(n).nb_workouts),1),p("span",sOe,_(s.$t("workouts.WORKOUT",h(n).nb_workouts)),1)]),p("div",oOe,[M(i,{distance:h(n).total_distance,unitFrom:"km",digits:0,displayUnit:!1,useImperialUnits:a.value.imperial_units},null,8,["distance","useImperialUnits"]),p("span",iOe,_(a.value.imperial_units?"miles":"km"),1)]),p("div",uOe,[p("span",cOe,_(h(n).nb_sports),1),p("span",lOe,_(s.$t("workouts.SPORT",h(n).nb_sports)),1)])])])])}}}),vA=ae(dOe,[["__scopeId","data-v-3abb1646"]]),fOe={class:"profile-tabs custom-checkboxes-group"},pOe={class:"profile-tabs-checkboxes custom-checkboxes"},mOe=["id","name","checked","disabled","onInput"],EOe=["id","onKeydown"],RA=Q({__name:"UserProfileTabs",props:{tabs:{},selectedTab:{},edition:{type:Boolean},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{tabs:n,selectedTab:r,disabled:a}=_e(t);gt(()=>{const o=document.getElementById(`tab-${n.value[0]}`);o&&o.focus()});function s(o){switch(o){case"ACCOUNT":case"PICTURE":case"PRIVACY-POLICY":return`/profile/edit/${o.toLocaleLowerCase()}`;case"APPS":case"PREFERENCES":case"SPORTS":return`/profile${t.edition?"/edit":""}/${o.toLocaleLowerCase()}`;default:case"PROFILE":return`/profile${t.edition?"/edit":""}`}}return(o,i)=>(T(),N("div",fOe,[p("div",pOe,[(T(!0),N(Ie,null,xe(h(n),u=>(T(),N("div",{class:"profile-tab custom-checkbox",key:u},[p("label",null,[p("input",{type:"radio",id:u,name:u,checked:h(r).split("/")[0]===u,disabled:h(a),onInput:l=>o.$router.push(s(u))},null,40,mOe),p("span",{id:`tab-${u}`,tabindex:0,role:"button",onKeydown:At(l=>o.$router.push(s(u)),["enter"])},_(o.$t(`user.PROFILE.TABS.${u}`)),41,EOe)])]))),128))])]))}}),hOe={id:"user-profile"},_Oe={class:"box"},TOe=Q({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,{user:n,tab:r}=_e(t),a=["PROFILE","PREFERENCES","SPORTS","APPS"];return(s,o)=>{const i=ue("router-view");return T(),N("div",hOe,[M(vA,{user:h(n)},null,8,["user"]),p("div",_Oe,[M(RA,{tabs:a,selectedTab:h(r),edition:!1},null,8,["selectedTab"]),M(i,{user:h(n)},null,8,["user"])])])}}}),gOe=ae(TOe,[["__scopeId","data-v-8a058d49"]]),AOe={id:"user-infos",class:"description-list"},SOe={key:1,class:"info-box success-message"},OOe={key:4,class:"email-form form-box"},IOe={class:"form-items",for:"email"},vOe={class:"form-items",for:"email"},ROe={class:"form-buttons"},bOe={class:"confirm",type:"submit"},NOe={key:5},COe={key:0},yOe={class:"user-bio"},DOe={key:0,class:"profile-buttons"},POe={key:1,class:"profile-buttons"},wOe=Q({__name:"UserInfos",props:{user:{},fromAdmin:{type:Boolean,default:!1}},setup(e){const t=e,n=$e(),{user:r,fromAdmin:a}=_e(t),s=k(()=>n.getters[H.GETTERS.LANGUAGE]),o=k(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),i=k(()=>t.user.created_at?xn(t.user.created_at,o.value.timezone,o.value.date_format):""),u=k(()=>t.user.birth_date?ln(new Date(t.user.birth_date),`${Sa(o.value.date_format,s.value)}`,{locale:Mo[s.value]}):""),l=k(()=>n.getters[Ce.GETTERS.USERS_IS_SUCCESS]),c=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=k(()=>n.getters[H.GETTERS.APP_CONFIG]),d=ce(""),m=ce(!1),E=ce(!1),g=ce(""),b=ce("");function v(G){d.value=G,G!==""&&n.commit(Ce.MUTATIONS.UPDATE_IS_SUCCESS,!1)}function R(G){n.dispatch(Ce.ACTIONS.DELETE_USER_ACCOUNT,{username:G})}function A(G){b.value="password-reset",n.dispatch(Ce.ACTIONS.UPDATE_USER,{username:G,resetPassword:!0})}function S(G){n.dispatch(Ce.ACTIONS.UPDATE_USER,{username:G,activate:!0})}function C(){U(),g.value=r.value.email_to_confirm?r.value.email_to_confirm:"",E.value=!0,b.value="email-update"}function L(){g.value="",E.value=!1}function $(G){n.dispatch(Ce.ACTIONS.UPDATE_USER,{username:G,new_email:g.value})}function U(){n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Ce.MUTATIONS.UPDATE_IS_SUCCESS,!1),b.value=""}return Rt(()=>U()),Fe(()=>l.value,G=>{G&&(v(""),L())}),(G,B)=>{const w=ue("Modal"),Z=ue("AlertMessage"),J=ue("ErrorMessage");return T(),N("div",AOe,[d.value?(T(),te(w,{key:0,title:G.$t("common.CONFIRMATION"),message:d.value==="delete"?"admin.CONFIRM_USER_ACCOUNT_DELETION":"admin.CONFIRM_USER_PASSWORD_RESET",strongMessage:h(r).username,onConfirmAction:B[0]||(B[0]=re=>d.value==="delete"?R(h(r).username):A(h(r).username)),onCancelAction:B[1]||(B[1]=re=>v("")),onKeydown:B[2]||(B[2]=At(re=>v(""),["esc"]))},null,8,["title","message","strongMessage"])):F("",!0),l.value?(T(),N("div",SOe,_(G.$t(`admin.${b.value==="password-reset"?"PASSWORD_RESET":"USER_EMAIL_UPDATE"}_SUCCESSFUL`)),1)):F("",!0),h(r).is_active?F("",!0):(T(),te(Z,{key:2,message:"user.THIS_USER_ACCOUNT_IS_INACTIVE"})),c.value?(T(),te(J,{key:3,message:c.value},null,8,["message"])):F("",!0),E.value?(T(),N("div",OOe,[p("form",{class:ge({errors:m.value}),onSubmit:B[5]||(B[5]=Xe(re=>$(h(r).username),["prevent"]))},[p("label",IOe,[K(_(G.$t("admin.CURRENT_EMAIL"))+" ",1),Ke(p("input",{id:"email",type:"email","onUpdate:modelValue":B[3]||(B[3]=re=>h(r).email=re),disabled:""},null,512),[[tt,h(r).email]])]),p("label",vOe,[K(_(G.$t("admin.NEW_EMAIL"))+"* ",1),Ke(p("input",{id:"new-email",type:"email",required:"","onUpdate:modelValue":B[4]||(B[4]=re=>g.value=re)},null,512),[[tt,g.value]])]),p("div",ROe,[p("button",bOe,_(G.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:Xe(L,["prevent"])},_(G.$t("buttons.CANCEL")),1)])],34)])):(T(),N("div",NOe,[p("dl",null,[p("dt",null,_(G.$t("user.PROFILE.REGISTRATION_DATE"))+":",1),p("dd",null,[p("time",null,_(i.value),1)]),p("dt",null,_(G.$t("user.PROFILE.FIRST_NAME"))+":",1),p("dd",null,_(h(r).first_name),1),p("dt",null,_(G.$t("user.PROFILE.LAST_NAME"))+":",1),p("dd",null,_(h(r).last_name),1),p("dt",null,_(G.$t("user.PROFILE.BIRTH_DATE"))+":",1),p("dd",null,[u.value?(T(),N("time",COe,_(u.value),1)):F("",!0)]),p("dt",null,_(G.$t("user.PROFILE.LOCATION"))+":",1),p("dd",null,_(h(r).location),1),p("dt",null,_(G.$t("user.PROFILE.BIO"))+":",1),p("dd",yOe,_(h(r).bio),1)]),h(a)?(T(),N("div",DOe,[o.value.username!==h(r).username?(T(),N("button",{key:0,class:"danger",onClick:B[6]||(B[6]=Xe(re=>v("delete"),["prevent"]))},_(G.$t("admin.DELETE_USER")),1)):F("",!0),h(r).is_active?F("",!0):(T(),N("button",{key:1,onClick:B[7]||(B[7]=Xe(re=>S(h(r).username),["prevent"]))},_(G.$t("admin.ACTIVATE_USER_ACCOUNT")),1)),o.value.username!==h(r).username?(T(),N("button",{key:2,onClick:Xe(C,["prevent"])},_(G.$t("admin.UPDATE_USER_EMAIL")),1)):F("",!0),o.value.username!==h(r).username&&f.value.is_email_sending_enabled?(T(),N("button",{key:3,onClick:B[8]||(B[8]=Xe(re=>v("reset"),["prevent"]))},_(G.$t("admin.RESET_USER_PASSWORD")),1)):F("",!0),p("button",{onClick:B[9]||(B[9]=re=>G.$router.go(-1))},_(G.$t("buttons.BACK")),1)])):(T(),N("div",POe,[p("button",{onClick:B[10]||(B[10]=re=>G.$router.push("/profile/edit"))},_(G.$t("user.PROFILE.EDIT")),1),p("button",{onClick:B[11]||(B[11]=re=>G.$router.push("/"))},_(G.$t("common.HOME")),1)]))]))])}}}),bA=ae(wOe,[["__scopeId","data-v-98220281"]]),LOe=e=>(ut("data-v-b0528e22"),e=e(),ct(),e),$Oe={id:"user-preferences",class:"description-list"},kOe={class:"preferences-section"},UOe={class:"preferences-section"},MOe={class:"info-box raw-speed-help"},xOe=LOe(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),FOe={class:"profile-buttons"},WOe=Q({__name:"UserPreferences",props:{user:{}},setup(e){const t=e,n=$e(),r=k(()=>n.getters[H.GETTERS.LANGUAGE]),a=k(()=>t.user.language?id[t.user.language]:id.en),s=k(()=>t.user.weekm?"MONDAY":"SUNDAY"),o=k(()=>t.user.timezone?t.user.timezone:"Europe/Paris"),i=k(()=>t.user.date_format?t.user.date_format:"MM/dd/yyyy"),u=k(()=>t.user.display_ascent?"DISPLAYED":"HIDDEN"),l=k(()=>t.user.use_dark_mode===!0?"DARK":t.user.use_dark_mode===!1?"LIGHT":"DEFAULT");return(c,f)=>(T(),N("div",$Oe,[p("div",kOe,_(c.$t("user.PROFILE.INTERFACE")),1),p("dl",null,[p("dt",null,_(c.$t("user.PROFILE.LANGUAGE"))+":",1),p("dd",null,_(a.value),1),p("dt",null,_(c.$t("user.PROFILE.THEME_MODE.LABEL"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.THEME_MODE.VALUES.${l.value}`)),1),p("dt",null,_(c.$t("user.PROFILE.TIMEZONE"))+":",1),p("dd",null,_(o.value),1),p("dt",null,_(c.$t("user.PROFILE.DATE_FORMAT"))+":",1),p("dd",null,_(h(Sa)(i.value,r.value)),1),p("dt",null,_(c.$t("user.PROFILE.FIRST_DAY_OF_WEEK"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.${s.value}`)),1)]),p("div",UOe,_(c.$t("workouts.WORKOUT",0)),1),p("dl",null,[p("dt",null,_(c.$t("user.PROFILE.UNITS.LABEL"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.UNITS.${c.user.imperial_units?"IMPERIAL":"METRIC"}`)),1),p("dt",null,_(c.$t("user.PROFILE.ASCENT_DATA"))+":",1),p("dd",null,_(c.$t(`common.${u.value}`)),1),p("dt",null,_(c.$t("user.PROFILE.ELEVATION_CHART_START.LABEL"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.ELEVATION_CHART_START.${c.user.start_elevation_at_zero?"ZERO":"MIN_ALT"}`)),1),p("dt",null,_(c.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL"))+":",1),p("dd",null,_(c.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${c.user.use_raw_gpx_speed?"RAW_SPEED":"FILTERED_SPEED"}`)),1),p("div",MOe,[p("span",null,[xOe,K(" "+_(c.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),p("div",FOe,[p("button",{onClick:f[0]||(f[0]=d=>c.$router.push("/profile/edit/preferences"))},_(c.$t("user.PROFILE.EDIT_PREFERENCES")),1),p("button",{onClick:f[1]||(f[1]=d=>c.$router.push("/"))},_(c.$t("common.HOME")),1)])]))}}),GOe=ae(WOe,[["__scopeId","data-v-b0528e22"]]),zOe={id:"user-profile-edition",class:"center-card"},BOe=Q({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,n=$e(),{user:r,tab:a}=_e(t),s=["PROFILE","ACCOUNT","PICTURE","PREFERENCES","SPORTS","PRIVACY-POLICY"],o=k(()=>n.getters[Y.GETTERS.USER_LOADING]);return(i,u)=>{const l=ue("router-view"),c=ue("Card");return T(),N("div",zOe,[M(c,null,{title:fe(()=>[K(_(i.$t(`user.PROFILE.${h(a)}_EDITION`)),1)]),content:fe(()=>[M(RA,{tabs:s,selectedTab:h(a),edition:!0,disabled:o.value},null,8,["selectedTab","disabled"]),M(l,{user:h(r)},null,8,["user"])]),_:1})])}}}),Js=new Map,HOe=e=>{const{method:t,url:n,params:r={},data:a={}}=e;return[t,n,JSON.stringify(r),JSON.stringify(a)].join("")},fs=e=>{const t=HOe(e);if(Js.has(t)){const n=Js.get(t)||{};n==null||n.abort(),Js.delete(t)}return t},Ur=C1.create({baseURL:wo()});Ur.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=fs(e);return Js.set(n,t),e},e=>Promise.reject(e));Ur.interceptors.response.use(e=>(fs(e.config),e),e=>(e.message!=="canceled"&&e.response&&fs(e.response.config),Promise.reject(e)));const NA=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.delete(`users/${t.username}`).then(n=>{n.status===204?t.fromAdmin?_t.push("/admin/users"):e.dispatch(Y.ACTIONS.LOGOUT).then(()=>_t.push("/")):he(e,null)}).catch(n=>he(e,n))},jOe={[Ce.ACTIONS.EMPTY_USER](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_USER,{})},[Ce.ACTIONS.EMPTY_USERS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_USERS,[]),e.commit(Ce.MUTATIONS.UPDATE_USERS_PAGINATION,{})},[Ce.ACTIONS.GET_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!0),Be.get(`users/${t}`).then(n=>{n.data.status==="success"?e.commit(Ce.MUTATIONS.UPDATE_USER,n.data.data.users[0]):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Ce.ACTIONS.GET_USERS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!0),Be.get("users",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Ce.MUTATIONS.UPDATE_USERS,n.data.data.users),e.commit(Ce.MUTATIONS.UPDATE_USERS_PAGINATION,n.data.pagination)):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Ce.ACTIONS.UPDATE_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ce.MUTATIONS.UPDATE_IS_SUCCESS,!1);const n={};t.admin!==void 0&&(n.admin=t.admin),t.resetPassword&&(n.reset_password=t.resetPassword),t.activate&&(n.activate=t.activate),t.new_email!==void 0&&(n.new_email=t.new_email),Be.patch(`users/${t.username}`,n).then(r=>{r.data.status==="success"?(e.commit(Ce.MUTATIONS.UPDATE_USER_IN_USERS,r.data.data.users[0]),(t.resetPassword||t.new_email)&&e.commit(Ce.MUTATIONS.UPDATE_IS_SUCCESS,!0),(t.activate||t.new_email)&&e.commit(Ce.MUTATIONS.UPDATE_USER,r.data.data.users[0])):he(e,null)}).catch(r=>he(e,r)).finally(()=>e.commit(Ce.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Ce.ACTIONS.DELETE_USER_ACCOUNT](e,t){NA(e,{username:t.username,fromAdmin:!0})}},_i=e=>{localStorage.removeItem("authToken"),e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Kr.MUTATIONS.EMPTY_USER_STATS),e.commit(Y.MUTATIONS.CLEAR_AUTH_USER_TOKEN),e.commit(Ce.MUTATIONS.UPDATE_USERS,[]),e.commit(Te.MUTATIONS.EMPTY_WORKOUTS),e.commit(Te.MUTATIONS.EMPTY_WORKOUT),_t.push("/login")},VOe={[Y.ACTIONS.CHECK_AUTH_USER](e){window.localStorage.authToken&&!e.getters[Y.GETTERS.IS_AUTHENTICATED]&&(e.commit(Y.MUTATIONS.UPDATE_AUTH_TOKEN,window.localStorage.authToken),e.dispatch(Y.ACTIONS.GET_USER_PROFILE,!0)),!window.localStorage.authToken&&e.getters[Y.GETTERS.IS_AUTHENTICATED]&&_i(e)},[Y.ACTIONS.CONFIRM_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Ur.post("auth/account/confirm",{token:t.token}).then(n=>{if(n.data.status==="success"){const r=n.data.auth_token;window.localStorage.setItem("authToken",r),e.commit(Y.MUTATIONS.UPDATE_AUTH_TOKEN,r),e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/"))}else he(e,null)}).catch(n=>{he(e,n)})},[Y.ACTIONS.CONFIRM_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!1),Ur.post("/auth/email/update",{token:t.token}).then(n=>{n.data.status==="success"?(e.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!0),t.refreshUser&&e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/profile/edit/account")),_t.push("/profile/edit/account")):he(e,null)}).catch(n=>{he(e,n)})},[Y.ACTIONS.GET_USER_PROFILE](e,t=!1){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("auth/profile").then(n=>{if(n.data.status==="success"){const r=e.getters[Y.GETTERS.IS_PROFILE_NOT_LOADED];e.commit(Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),n.data.data.accepted_privacy_policy||e.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY),(r||t)&&(n.data.data.language&&e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode)),e.dispatch($t.ACTIONS.GET_SPORTS)}else he(e,null),_i(e)}).catch(n=>{n.message!=="canceled"&&(he(e,n),_i(e))})},[Y.ACTIONS.LOGIN_OR_REGISTER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),Ur.post(`/auth/${t.actionType}`,t.formData).then(n=>{if(n.data.status==="success")if(t.actionType==="login"){const r=n.data.auth_token;window.localStorage.setItem("authToken",r),e.commit(Y.MUTATIONS.UPDATE_AUTH_TOKEN,r),e.dispatch(Y.ACTIONS.GET_USER_PROFILE,!0).then(()=>_t.push(typeof t.redirectUrl=="string"?t.redirectUrl:"/"))}else _t.push("/login").then(()=>e.commit(Y.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!0));else he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.LOGOUT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.post("auth/logout").then(t=>{t.data.status==="success"?_i(e):he(e,null)}).catch(t=>he(e,t))},[Y.ACTIONS.UPDATE_USER_PROFILE](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.post("auth/profile/edit",t).then(n=>{n.data.status==="success"?(e.commit(Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),_t.push("/profile")):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.UPDATE_USER_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),e.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!1),Be.patch("auth/profile/edit/account",t).then(n=>{n.data.status==="success"?(e.commit(Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!0)):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.UPDATE_USER_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.post("auth/profile/edit/preferences",t).then(n=>{n.data.status==="success"?(e.commit(Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode),e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language).then(()=>_t.push("/profile/preferences"))):he(e,null)}).catch(n=>he(e,n)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.RESET_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.delete(`auth/profile/reset/sports/${t}`).then(n=>{n.status===204?e.dispatch($t.ACTIONS.GET_SPORTS):he(e,null)}).catch(n=>{he(e,n),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1)})},[Y.ACTIONS.UPDATE_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.post("auth/profile/edit/sports",t).then(n=>{n.data.status==="success"?e.dispatch($t.ACTIONS.GET_SPORTS):he(e,null)}).catch(n=>{he(e,n),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1)})},[Y.ACTIONS.UPDATE_USER_PICTURE](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),!t.picture)throw new Error("No file part");const n=new FormData;n.append("file",t.picture),Be.post("auth/picture",n,{headers:{"content-type":"multipart/form-data"}}).then(r=>{r.data.status==="success"?e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/profile")):he(e,null)}).catch(r=>he(e,r)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.DELETE_ACCOUNT](e,t){NA(e,t)},[Y.ACTIONS.DELETE_PICTURE](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!0),Be.delete("auth/picture").then(t=>{t.status===204?e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/profile")):he(e,null)}).catch(t=>he(e,t)).finally(()=>e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1))},[Y.ACTIONS.SEND_PASSWORD_RESET_REQUEST](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Ur.post("auth/password/reset-request",t).then(n=>{n.data.status==="success"?_t.push("/password-reset/sent"):he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Ur.post("auth/account/resend-confirmation",t).then(n=>{n.data.status==="success"?_t.push("/account-confirmation/email-sent"):he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.RESET_USER_PASSWORD](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Ur.post("auth/password/update",t).then(n=>{n.data.status==="success"?_t.push("/password-reset/password-updated"):he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.ACCEPT_PRIVACY_POLICY](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.post("auth/account/privacy-policy",{accepted_policy:t}).then(n=>{n.data.status==="success"?e.dispatch(Y.ACTIONS.GET_USER_PROFILE).then(()=>_t.push("/profile")):he(e,null)}).catch(n=>he(e,n))},[Y.ACTIONS.REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.post("auth/account/export/request").then(t=>{t.data.status==="success"?e.commit(Y.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):he(e,null)}).catch(t=>he(e,t))},[Y.ACTIONS.GET_REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("auth/account/export").then(t=>{t.data.status==="success"?e.commit(Y.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):he(e,null)}).catch(t=>he(e,t))}},KOe={[Y.GETTERS.AUTH_TOKEN]:e=>e.authToken,[Y.GETTERS.AUTH_USER_PROFILE]:e=>e.authUserProfile,[Y.GETTERS.EXPORT_REQUEST]:e=>e.exportRequest,[Y.GETTERS.IS_AUTHENTICATED]:e=>e.authToken!==null,[Y.GETTERS.IS_ADMIN]:e=>e.authUserProfile&&e.authUserProfile.admin,[Y.GETTERS.IS_REGISTRATION_SUCCESS]:e=>e.isRegistrationSuccess,[Y.GETTERS.IS_SUCCESS]:e=>e.isSuccess,[Y.GETTERS.USER_LOADING]:e=>e.loading,[Y.GETTERS.IS_PROFILE_NOT_LOADED]:e=>e.authUserProfile.username===void 0},YOe={[Y.MUTATIONS.CLEAR_AUTH_USER_TOKEN](e){e.authToken=null,e.authUserProfile={}},[Y.MUTATIONS.UPDATE_AUTH_TOKEN](e,t){e.authToken=t},[Y.MUTATIONS.UPDATE_AUTH_USER_PROFILE](e,t){e.authUserProfile=t},[Y.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS](e,t){e.isRegistrationSuccess=t},[Y.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t},[Y.MUTATIONS.UPDATE_USER_LOADING](e,t){e.loading=t},[Y.MUTATIONS.SET_EXPORT_REQUEST](e,t){e.exportRequest=t}},qOe={authToken:null,authUserProfile:{},isSuccess:!1,isRegistrationSuccess:!1,loading:!1,exportRequest:null},XOe={state:qOe,actions:VOe,getters:KOe,mutations:YOe},nh=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get(t).then(n=>{n.data.status==="success"?e.commit(Ve.MUTATIONS.SET_CLIENT,n.data.data.client):he(e,null)}).catch(n=>he(e,n))},ZOe={[Ve.ACTIONS.AUTHORIZE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES);const n=new FormData;n.set("client_id",t.client_id),n.set("response_type",t.response_type),n.set("scope",t.scope),n.set("confirm","true"),t.state&&n.set("state",t.state),t.code_challenge&&n.set("code_challenge",t.code_challenge),t.code_challenge_method&&n.set("code_challenge_method",t.code_challenge_method),Be.post("oauth/authorize",n,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>{r.status==200&&r.data.redirect_url?window.location.href=r.data.redirect_url:he(e,null)}).catch(r=>he(e,r))},[Ve.ACTIONS.CREATE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.post("oauth/apps",t).then(n=>{n.data.status==="created"?(e.commit(Ve.MUTATIONS.SET_CLIENT,n.data.data.client),_t.push(`/profile/apps/${n.data.data.client.id}/created`)):he(e,null)}).catch(n=>he(e,n))},[Ve.ACTIONS.DELETE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.delete(`oauth/apps/${t}`).then(n=>{n.status===204?e.dispatch(Ve.ACTIONS.GET_CLIENTS).then(()=>_t.push("/profile/apps")):he(e,null)}).catch(n=>he(e,n))},[Ve.ACTIONS.GET_CLIENT_BY_CLIENT_ID](e,t){nh(e,`oauth/apps/${t}`)},[Ve.ACTIONS.GET_CLIENT_BY_ID](e,t){nh(e,`oauth/apps/${t}/by_id`)},[Ve.ACTIONS.GET_CLIENTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("oauth/apps",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Ve.MUTATIONS.SET_CLIENTS,n.data.data.clients),e.commit(Ve.MUTATIONS.SET_CLIENTS_PAGINATION,n.data.pagination)):he(e,null)}).catch(n=>he(e,n))},[Ve.ACTIONS.REVOKE_ALL_TOKENS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ve.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1),Be.post(`oauth/apps/${t}/revoke`).then(n=>{n.data.status==="success"?e.commit(Ve.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!0):he(e,null)}).catch(n=>he(e,n))}},QOe={[Ve.GETTERS.CLIENT]:e=>e.client,[Ve.GETTERS.CLIENTS]:e=>e.clients,[Ve.GETTERS.CLIENTS_PAGINATION]:e=>e.pagination,[Ve.GETTERS.REVOCATION_SUCCESSFUL]:e=>e.revocationSuccessful},JOe={[Ve.MUTATIONS.SET_CLIENT](e,t){e.client=t},[Ve.MUTATIONS.EMPTY_CLIENT](e){e.client={}},[Ve.MUTATIONS.SET_CLIENTS](e,t){e.clients=t},[Ve.MUTATIONS.SET_CLIENTS_PAGINATION](e,t){e.pagination=t},[Ve.MUTATIONS.SET_REVOCATION_SUCCESSFUL](e,t){e.revocationSuccessful=t}},eIe={client:{},clients:[],pagination:{},revocationSuccessful:!1},tIe={state:eIe,actions:ZOe,getters:QOe,mutations:JOe},{locale:nIe}=ga.global,rIe={[H.ACTIONS.GET_APPLICATION_CONFIG](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!0),Be.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,t.data.data):he(e,null)}).catch(t=>he(e,t)).finally(()=>e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!1))},[H.ACTIONS.GET_APPLICATION_STATS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("stats/all").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_STATS,t.data.data):he(e,null)}).catch(t=>he(e,t))},[H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY,t.data.data):he(e,null)}).catch(t=>he(e,t))},[H.ACTIONS.UPDATE_APPLICATION_CONFIG](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.patch("config",t).then(n=>{n.data.status==="success"?(e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,n.data.data),_t.push("/admin/application")):he(e,null)}).catch(n=>he(e,n))},[H.ACTIONS.UPDATE_APPLICATION_LANGUAGE](e,t){var n;(n=document.querySelector("html"))==null||n.setAttribute("lang",t),e.commit(H.MUTATIONS.UPDATE_LANG,t),nIe.value=t}},aIe={[H.GETTERS.APP_CONFIG]:e=>e.application.config,[H.GETTERS.APP_LOADING]:e=>e.appLoading,[H.GETTERS.APP_STATS]:e=>e.application.statistics,[H.GETTERS.DARK_MODE]:e=>e.darkMode,[H.GETTERS.ERROR_MESSAGES]:e=>e.errorMessages,[H.GETTERS.LANGUAGE]:e=>e.language,[H.GETTERS.LOCALE]:e=>e.locale},sIe={[H.MUTATIONS.EMPTY_ERROR_MESSAGES](e){e.errorMessages=null},[H.MUTATIONS.SET_ERROR_MESSAGES](e,t){e.errorMessages=t},[H.MUTATIONS.UPDATE_APPLICATION_CONFIG](e,t){e.application.config=t},[H.MUTATIONS.UPDATE_APPLICATION_LOADING](e,t){e.appLoading=t},[H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY](e,t){e.application.config.privacy_policy=t.privacy_policy,e.application.config.privacy_policy_date=t.privacy_policy_date},[H.MUTATIONS.UPDATE_APPLICATION_STATS](e,t){e.application.statistics=t},[H.MUTATIONS.UPDATE_LANG](e,t){e.language=t,e.locale=Mo[t]},[H.MUTATIONS.UPDATE_DARK_MODE](e,t){e.darkMode=t}},oIe={root:!0,language:"en",locale:dc,errorMessages:null,application:{statistics:{sports:0,uploads_dir_size:0,users:0,workouts:0}},appLoading:!1,darkMode:null},iIe={[$t.ACTIONS.GET_SPORTS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("sports").then(t=>{t.data.status==="success"?(e.commit($t.MUTATIONS.SET_SPORTS,t.data.data.sports),e.commit(Y.MUTATIONS.UPDATE_USER_LOADING,!1)):he(e,null)}).catch(t=>he(e,t))},[$t.ACTIONS.UPDATE_SPORTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.patch(`sports/${t.id}`,{is_active:t.isActive}).then(n=>{n.data.status==="success"?e.dispatch($t.ACTIONS.GET_SPORTS):he(e,null)}).catch(n=>he(e,n))}},uIe={[$t.GETTERS.SPORTS]:e=>e.sports},cIe={[$t.MUTATIONS.SET_SPORTS](e,t){e.sports=t}},lIe={sports:[]},dIe={state:lIe,actions:iIe,getters:uIe,mutations:cIe},fIe={[Kr.ACTIONS.GET_USER_STATS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get(`stats/${t.username}/${t.filterType}`,{params:t.params}).then(n=>{n.data.status==="success"?e.commit(Kr.MUTATIONS.UPDATE_USER_STATS,n.data.data.statistics):he(e,null)}).catch(n=>he(e,n))}},pIe={[Kr.GETTERS.USER_STATS]:e=>e.statistics},mIe={[Kr.MUTATIONS.UPDATE_USER_STATS](e,t){e.statistics=t},[Kr.MUTATIONS.EMPTY_USER_STATS](e){e.statistics={}}},EIe={statistics:{}},hIe={state:EIe,actions:fIe,getters:pIe,mutations:mIe},_Ie={[Ce.GETTERS.USER]:e=>e.user,[Ce.GETTERS.USERS]:e=>e.users,[Ce.GETTERS.USERS_IS_SUCCESS]:e=>e.isSuccess,[Ce.GETTERS.USERS_LOADING]:e=>e.loading,[Ce.GETTERS.USERS_PAGINATION]:e=>e.pagination},TIe={[Ce.MUTATIONS.UPDATE_USER](e,t){e.user=t},[Ce.MUTATIONS.UPDATE_USER_IN_USERS](e,t){e.users=e.users.map(n=>n.username===t.username?t:n)},[Ce.MUTATIONS.UPDATE_USERS](e,t){e.users=t},[Ce.MUTATIONS.UPDATE_USERS_LOADING](e,t){e.loading=t},[Ce.MUTATIONS.UPDATE_USERS_PAGINATION](e,t){e.pagination=t},[Ce.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t}},gIe={user:{},users:[],loading:!1,isSuccess:!1,pagination:{}},AIe={state:gIe,actions:jOe,getters:_Ie,mutations:TIe},Ti=(e,t,n)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Be.get("workouts",{params:t}).then(r=>{r.data.status==="success"?(e.commit(Te.MUTATIONS[n],r.data.data.workouts),n===ca.SET_USER_WORKOUTS&&e.commit(Te.MUTATIONS.SET_WORKOUTS_PAGINATION,r.data.pagination)):he(e,null)}).catch(r=>he(e,r))},SIe={[Te.ACTIONS.GET_CALENDAR_WORKOUTS](e,t){e.commit(Te.MUTATIONS.EMPTY_CALENDAR_WORKOUTS),Ti(e,t,ca.SET_CALENDAR_WORKOUTS)},[Te.ACTIONS.GET_USER_WORKOUTS](e,t){Ti(e,t,ca.SET_USER_WORKOUTS)},[Te.ACTIONS.GET_TIMELINE_WORKOUTS](e,t){Ti(e,t,ca.SET_TIMELINE_WORKOUTS)},[Te.ACTIONS.GET_MORE_TIMELINE_WORKOUTS](e,t){Ti(e,t,ca.ADD_TIMELINE_WORKOUTS)},[Te.ACTIONS.GET_WORKOUT_DATA](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0);const n=t.segmentId?`/segment/${t.segmentId}`:"";Be.get(`workouts/${t.workoutId}`).then(r=>{const a=r.data.data.workouts[0];if(r.data.status==="success"){if(t.segmentId&&(a.segments.length===0||!a.segments[+t.segmentId-1]))throw new Error("WORKOUT_NOT_FOUND");e.commit(Te.MUTATIONS.SET_WORKOUT,r.data.data.workouts[0]),r.data.data.workouts[0].with_gpx&&(Be.get(`workouts/${t.workoutId}/chart_data${n}`).then(s=>{s.data.status==="success"&&e.commit(Te.MUTATIONS.SET_WORKOUT_CHART_DATA,s.data.data.chart_data)}),Be.get(`workouts/${t.workoutId}/gpx${n}`).then(s=>{s.data.status==="success"&&e.commit(Te.MUTATIONS.SET_WORKOUT_GPX,s.data.data.gpx)}))}else e.commit(Te.MUTATIONS.EMPTY_WORKOUT),he(e,null)}).catch(r=>{e.commit(Te.MUTATIONS.EMPTY_WORKOUT),he(e,r)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Te.ACTIONS.DELETE_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0),Be.delete(`workouts/${t.workoutId}`).then(()=>{e.commit(Te.MUTATIONS.EMPTY_WORKOUT),e.dispatch(Y.ACTIONS.GET_USER_PROFILE),_t.push("/")}).catch(n=>{he(e,n)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Te.ACTIONS.EDIT_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0),Be.patch(`workouts/${t.workoutId}`,t.data).then(()=>{e.dispatch(Y.ACTIONS.GET_USER_PROFILE),e.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.workoutId}).then(()=>{_t.push({name:"Workout",params:{workoutId:t.workoutId}})})}).catch(n=>{he(e,n)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Te.ACTIONS.ADD_WORKOUT](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0),!t.file)throw new Error("No file part");const n=t.notes.replace(/"/g,'\\"'),r=new FormData;r.append("file",t.file),r.append("data",`{"sport_id": ${t.sport_id}, "notes": "${n}"}`),Be.post("workouts",r,{headers:{"content-type":"multipart/form-data"}}).then(a=>{if(a.data.status==="created"){e.dispatch(Y.ACTIONS.GET_USER_PROFILE);const s=a.data.data.workouts[0];_t.push(a.data.data.workouts.length===1?`/workouts/${s.id}`:"/")}}).catch(a=>{he(e,a)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Te.ACTIONS.ADD_WORKOUT_WITHOUT_GPX](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!0),Be.post("workouts/no_gpx",t).then(n=>{if(n.data.status==="created"){e.dispatch(Y.ACTIONS.GET_USER_PROFILE);const r=n.data.data.workouts[0];_t.push(`/workouts/${r.id}`)}}).catch(n=>{he(e,n)}).finally(()=>e.commit(Te.MUTATIONS.SET_WORKOUT_LOADING,!1))}},OIe={[Te.GETTERS.CALENDAR_WORKOUTS]:e=>e.calendar_workouts,[Te.GETTERS.TIMELINE_WORKOUTS]:e=>e.timeline_workouts,[Te.GETTERS.USER_WORKOUTS]:e=>e.user_workouts,[Te.GETTERS.WORKOUT_DATA]:e=>e.workoutData,[Te.GETTERS.WORKOUTS_PAGINATION]:e=>e.pagination},IIe={[Te.MUTATIONS.ADD_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=e.timeline_workouts.concat(t)},[Te.MUTATIONS.SET_CALENDAR_WORKOUTS](e,t){e.calendar_workouts=t},[Te.MUTATIONS.SET_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=t},[Te.MUTATIONS.SET_USER_WORKOUTS](e,t){e.user_workouts=t},[Te.MUTATIONS.SET_WORKOUTS_PAGINATION](e,t){e.pagination=t},[Te.MUTATIONS.SET_WORKOUT](e,t){e.workoutData.workout=t},[Te.MUTATIONS.SET_WORKOUT_CHART_DATA](e,t){e.workoutData.chartData=t},[Te.MUTATIONS.SET_WORKOUT_GPX](e,t){e.workoutData.gpx=t},[Te.MUTATIONS.SET_WORKOUT_LOADING](e,t){e.workoutData.loading=t},[Te.MUTATIONS.EMPTY_CALENDAR_WORKOUTS](e){e.calendar_workouts=[]},[Te.MUTATIONS.EMPTY_WORKOUTS](e){e.calendar_workouts=[],e.user_workouts=[],e.timeline_workouts=[]},[Te.MUTATIONS.EMPTY_WORKOUT](e){e.workoutData={gpx:"",loading:!1,workout:{},chartData:[]}}},vIe={calendar_workouts:[],timeline_workouts:[],pagination:{},user_workouts:[],workoutData:{gpx:"",loading:!1,workout:{},chartData:[]}},RIe={state:vIe,actions:SIe,getters:OIe,mutations:IIe},bIe={authUserModule:XOe,oAuthModule:tIe,sportsModule:dIe,statsModule:hIe,usersModule:AIe,workoutsModule:RIe},NIe={state:oIe,actions:rIe,getters:aIe,mutations:sIe,modules:bIe},eo=fN(NIe),A0=C1.create({baseURL:wo()});A0.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=fs(e);Js.set(n,t);const r=eo.getters[Y.GETTERS.AUTH_TOKEN];if(r){const a=`Bearer ${r}`;e.headers&&e.headers.Authorization!==a&&(e.headers.Authorization=`Bearer ${r}`)}return e},e=>Promise.reject(e));A0.interceptors.response.use(e=>(fs(e.config),e),e=>(e.message!=="canceled"&&e.response&&fs(e.response.config),Promise.reject(e)));const Be=A0,Hd=(e,t)=>e.push.apply(e,t),ps=e=>e.sort((t,n)=>t.i-n.i||t.j-n.j),rh=e=>{const t={};let n=1;return e.forEach(r=>{t[r]=n,n+=1}),t};var CIe={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]};const ah=2050,sh=1e3,yIe=CIe,DIe=10,PIe=1e4,CA=10,yA=50,DA=20,PA=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,wIe=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,LIe=/^[A-Z\xbf-\xdf]+$/,wA=/^[^a-z\xdf-\xff]+$/,$Ie=/^[a-z\xdf-\xff]+$/,kIe=/^[^A-Z\xbf-\xdf]+$/,UIe=/[a-z\xdf-\xff]/,MIe=/[A-Z\xbf-\xdf]/,xIe=/[^A-Za-z\xbf-\xdf]/gi,FIe=/^\d+$/,S0=new Date().getFullYear(),WIe={recentYear:/19\d\d|200\d|201\d|202\d/g},LA=[" ",",",";",":","|","/","\\","_",".","-"],GIe=LA.length;class zIe{match({password:t}){const n=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],r=this.filterNoise(n);return ps(r)}getMatchesWithSeparator(t){const n=[],r=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let a=0;a<=Math.abs(t.length-6);a+=1)for(let s=a+5;s<=a+9&&!(s>=t.length);s+=1){const o=t.slice(a,+s+1||9e9),i=r.exec(o);if(i!=null){const u=this.mapIntegersToDayMonthYear([parseInt(i[1],10),parseInt(i[3],10),parseInt(i[4],10)]);u!=null&&n.push({pattern:"date",token:o,i:a,j:s,separator:i[2],year:u.year,month:u.month,day:u.day})}}return n}getMatchesWithoutSeparator(t){const n=[],r=/^\d{4,8}$/,a=s=>Math.abs(s.year-S0);for(let s=0;s<=Math.abs(t.length-4);s+=1)for(let o=s+3;o<=s+7&&!(o>=t.length);o+=1){const i=t.slice(s,+o+1||9e9);if(r.exec(i)){const u=[],l=i.length;if(yIe[l].forEach(([f,d])=>{const m=this.mapIntegersToDayMonthYear([parseInt(i.slice(0,f),10),parseInt(i.slice(f,d),10),parseInt(i.slice(d),10)]);m!=null&&u.push(m)}),u.length>0){let f=u[0],d=a(u[0]);u.slice(1).forEach(m=>{const E=a(m);E{let r=!1;const a=t.length;for(let s=0;s=n.j){r=!0;break}}return!r})}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let n=0,r=0,a=0;for(let s=0,o=t.length;s99&&iah)return null;i>31&&(r+=1),i>12&&(n+=1),i<=0&&(a+=1)}return r>=2||n===3||a>=2?null:this.getDayMonth(t)}getDayMonth(t){const n=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],r=n.length;for(let a=0;a=1&&s<=31&&o>=1&&o<=12)return{day:s,month:o}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const dr=new Uint32Array(65536),BIe=(e,t)=>{const n=e.length,r=t.length,a=1<{const n=t.length,r=e.length,a=[],s=[],o=Math.ceil(n/32),i=Math.ceil(r/32);for(let E=0;E>>R&1,C=a[R/32|0]>>>R&1,L=A|E,$=((A|C)&g)+g^g|A|C;let U=E|~($|g),G=g&$;U>>>31^S&&(s[R/32|0]^=1<>>31^C&&(a[R/32|0]^=1<>>E&1,v=a[E/32|0]>>>E&1,R=g|l,A=((g|v)&c)+c^c|g|v;let S=l|~(A|c),C=c&A;m+=S>>>r-1&1,m-=C>>>r-1&1,S>>>31^b&&(s[E/32|0]^=1<>>31^v&&(a[E/32|0]^=1<{if(e.length{const r=e.length<=t.length,a=e.length<=n;return r||a?Math.ceil(e.length/4):n},KIe=(e,t,n)=>{let r=0;const a=Object.keys(t).find(s=>{const o=VIe(e,s,n);if(Math.abs(e.length-s.length)>o)return!1;const i=jIe(e,s),u=i<=o;return u&&(r=i),u});return a?{levenshteinDistance:r,levenshteinDistanceEntry:a}:{}};var oh={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},_l={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class Ro{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...n){const r=t.charAt(0);this.children.has(r)||this.children.set(r,new Ro([...this.parents,r]));let a=this.children.get(r);for(let s=1;s(Object.entries(e).forEach(([n,r])=>{r.forEach(a=>{t.addSub(a,n)})}),t);class YIe{constructor(){this.matchers={},this.l33tTable=oh,this.trieNodeRoot=ih(oh,new Ro),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=_l,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=ih(t.l33tTable,new Ro)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),t.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=t.useLevenshteinDistance),t.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=t.levenshteinThreshold),t.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),t.maxLength!==void 0&&(this.maxLength=t.maxLength)}setTranslations(t){if(this.checkCustomTranslations(t))this.translations=t;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(t){let n=!0;return Object.keys(_l).forEach(r=>{if(r in t){const a=r;Object.keys(_l[a]).forEach(s=>{s in t[a]||(n=!1)})}else n=!1}),n}setRankedDictionaries(){const t={},n={};Object.keys(this.dictionary).forEach(r=>{t[r]=rh(this.dictionary[r]),n[r]=this.getRankedDictionariesMaxWordSize(this.dictionary[r])}),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=n}getRankedDictionariesMaxWordSize(t){const n=t.map(r=>typeof r!="string"?r.toString().length:r.length);return n.length===0?0:n.reduce((r,a)=>Math.max(r,a),-1/0)}buildSanitizedRankedDictionary(t){const n=[];return t.forEach(r=>{const a=typeof r;(a==="string"||a==="number"||a==="boolean")&&n.push(r.toString().toLowerCase())}),rh(n)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const n=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(n),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(n)}addMatcher(t,n){this.matchers[t]?console.info(`Matcher ${t} already exists`):this.matchers[t]=n}}const Re=new YIe;class qIe{constructor(t){this.defaultMatch=t}match({password:t}){const n=t.split("").reverse().join("");return this.defaultMatch({password:n}).map(r=>({...r,token:r.token.split("").reverse().join(""),reversed:!0,i:t.length-1-r.j,j:t.length-1-r.i}))}}class XIe{constructor({substr:t,limit:n,trieRoot:r}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=n,this.trieRoot=r}getAllPossibleSubsAtIndex(t){const n=[];let r=this.trieRoot;for(let a=t;a=this.limit)return;if(r===this.substr.length){t===n&&this.finalPasswords.push({password:this.buffer.join(""),changes:s});return}const u=[...this.getAllPossibleSubsAtIndex(r)];let l=!1;for(let c=r+u.length-1;c>=r;c-=1){const f=u[c-r];if(f.isTerminal()){if(o===f.parents.join("")&&i>=3)continue;l=!0;const d=f.subs;for(const m of d){this.buffer.push(m);const E=s.concat({i:a,letter:m,substitution:f.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:n,index:c+1,subIndex:a+m.length,changes:E,lastSubLetter:f.parents.join(""),consecutiveSubCount:o===f.parents.join("")?i+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!l){const c=this.substr.charAt(r);this.buffer.push(c),this.helper({onlyFullSub:t,isFullSub:n&&!l,index:r+1,subIndex:a+1,changes:s,lastSubLetter:o,consecutiveSubCount:i}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}}const ZIe=(e,t,n)=>new XIe({substr:e,limit:t,trieRoot:n}).getAll(),QIe=(e,t,n)=>{const a=e.changes.filter(l=>l.il-c.letter.length+c.substitution.length,t),s=e.changes.filter(l=>l.i>=t&&l.i<=n),o=s.reduce((l,c)=>l-c.letter.length+c.substitution.length,n-t+a),i=[],u=[];return s.forEach(l=>{i.findIndex(f=>f.letter===l.letter&&f.substitution===l.substitution)<0&&(i.push({letter:l.letter,substitution:l.substitution}),u.push(`${l.substitution} -> ${l.letter}`))}),{i:a,j:o,subs:i,subDisplay:u.join(", ")}};class JIe{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,n){return t.some(r=>Object.entries(r).every(([a,s])=>a==="subs"||s===n[a]))}match({password:t}){const n=[],r=ZIe(t,Re.l33tMaxSubstitutions,Re.trieNodeRoot);let a=!1,s=!0;return r.forEach(o=>{if(a)return;const i=this.defaultMatch({password:o.password,useLevenshtein:s});s=!1,i.forEach(u=>{a||(a=u.i===0&&u.j===t.length-1);const l=QIe(o,u.i,u.j),c=t.slice(l.i,+l.j+1||9e9),f={...u,l33t:!0,token:c,...l},d=this.isAlreadyIncluded(n,f);c.toLowerCase()!==u.matchedWord&&!d&&n.push(f)})}),n.filter(o=>o.token.length>1)}}class e2e{constructor(){this.l33t=new JIe(this.defaultMatch),this.reverse=new qIe(this.defaultMatch)}match({password:t}){const n=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return ps(n)}defaultMatch({password:t,useLevenshtein:n=!0}){const r=[],a=t.length,s=t.toLowerCase();return Object.keys(Re.rankedDictionaries).forEach(o=>{const i=Re.rankedDictionaries[o],u=Re.rankedDictionariesMaxWordSize[o],l=Math.min(u,a);for(let c=0;c{const s=n[a];s.lastIndex=0;let o;for(;o=s.exec(t);)if(o){const i=o[0];r.push({pattern:"regex",token:i,i:o.index,j:o.index+o[0].length-1,regexName:a,regexMatch:o})}}),ps(r)}}var Oa={nCk(e,t){let n=e;if(t>n)return 0;if(t===0)return 1;let r=1;for(let a=1;a<=t;a+=1)r*=n,r/=a,n-=1;return r},log10(e){return e===0?0:Math.log(e)/Math.log(10)},log2(e){return Math.log(e)/Math.log(2)},factorial(e){let t=1;for(let n=2;n<=e;n+=1)t*=n;return t}},n2e=({token:e})=>{let t=DIe**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let n;return e.length===1?n=CA+1:n=yA+1,Math.max(t,n)},r2e=({year:e,separator:t})=>{let r=Math.max(Math.abs(e-S0),DA)*365;return t&&(r*=4),r};const a2e=e=>{const t=e.split(""),n=t.filter(o=>o.match(MIe)).length,r=t.filter(o=>o.match(UIe)).length;let a=0;const s=Math.min(n,r);for(let o=1;o<=s;o+=1)a+=Oa.nCk(n+r,o);return a};var s2e=e=>{const t=e.replace(xIe,"");if(t.match(kIe)||t.toLowerCase()===t)return 1;const n=[PA,wIe,wA],r=n.length;for(let a=0;a{let n=0,r=e.indexOf(t);for(;r>=0;)n+=1,r=e.indexOf(t,r+t.length);return n},o2e=({sub:e,token:t})=>{const n=t.toLowerCase(),r=uh(n,e.substitution),a=uh(n,e.letter);return{subbedCount:r,unsubbedCount:a}};var i2e=({l33t:e,subs:t,token:n})=>{if(!e)return 1;let r=1;return t.forEach(a=>{const{subbedCount:s,unsubbedCount:o}=o2e({sub:a,token:n});if(s===0||o===0)r*=2;else{const i=Math.min(o,s);let u=0;for(let l=1;l<=i;l+=1)u+=Oa.nCk(o+s,l);r*=u}}),r},u2e=({rank:e,reversed:t,l33t:n,subs:r,token:a,dictionaryName:s})=>{const o=e,i=s2e(a),u=i2e({l33t:n,subs:r,token:a}),l=t&&2||1;let c;return s==="diceware"?c=6**5/2:c=o*i*u*l,{baseGuesses:o,uppercaseVariations:i,l33tVariations:u,calculation:c}},c2e=({regexName:e,regexMatch:t,token:n})=>{const r={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};if(e in r)return r[e]**n.length;switch(e){case"recentYear":return Math.max(Math.abs(parseInt(t[0],10)-S0),DA)}return 0},l2e=({baseGuesses:e,repeatCount:t})=>e*t,d2e=({token:e,ascending:t})=>{const n=e.charAt(0);let r=0;return["a","A","z","Z","0","1","9"].includes(n)?r=4:n.match(/\d/)?r=10:r=26,t||(r*=2),r*e.length};const f2e=e=>{let t=0;return Object.keys(e).forEach(n=>{const r=e[n];t+=r.filter(a=>!!a).length}),t/=Object.entries(e).length,t},p2e=({token:e,graph:t,turns:n})=>{const r=Object.keys(Re.graphs[t]).length,a=f2e(Re.graphs[t]);let s=0;const o=e.length;for(let i=2;i<=o;i+=1){const u=Math.min(n,i-1);for(let l=1;l<=u;l+=1)s+=Oa.nCk(i-1,l-1)*r*a**l}return s};var m2e=({graph:e,token:t,shiftedCount:n,turns:r})=>{let a=p2e({token:t,graph:e,turns:r});if(n){const s=t.length-n;if(n===0||s===0)a*=2;else{let o=0;for(let i=1;i<=Math.min(n,s);i+=1)o+=Oa.nCk(n+s,i);a*=o}}return Math.round(a)},E2e=()=>GIe;const h2e=(e,t)=>{let n=1;return e.token.lengthch[e]?ch[e](t):Re.matchers[e]&&"scoring"in Re.matchers[e]?Re.matchers[e].scoring(t):0;var T2e=(e,t)=>{const n={};if("guesses"in e&&e.guesses!=null)return e;const r=h2e(e,t),a=_2e(e.pattern,e);let s=0;typeof a=="number"?s=a:e.pattern==="dictionary"&&(s=a.calculation,n.baseGuesses=a.baseGuesses,n.uppercaseVariations=a.uppercaseVariations,n.l33tVariations=a.l33tVariations);const o=Math.max(s,r);return{...e,...n,guesses:o,guessesLog10:Oa.log10(o)}};const pn={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const n=[];for(let r=0;r1&&(a*=this.optimal.pi[r.i-1][t-1]);let s=Oa.factorial(t)*a;this.excludeAdditive||(s+=PIe**(t-1));let o=!1;Object.keys(this.optimal.g[n]).forEach(i=>{const u=this.optimal.g[n][i];parseInt(i,10)<=t&&u<=s&&(o=!0)}),o||(this.optimal.g[n][t]=s,this.optimal.m[n][t]=r,this.optimal.pi[n][t]=a)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let n=1;n<=e;n+=1){t=this.makeBruteforceMatch(n,e);const r=this.optimal.m[n-1];Object.keys(r).forEach(a=>{r[a].pattern!=="bruteforce"&&this.update(t,parseInt(a,10)+1)})}},unwind(e){const t=[];let n=e-1,r=0,a=1/0;const s=this.optimal.g[n];for(s&&Object.keys(s).forEach(o=>{const i=s[o];i=0;){const o=this.optimal.m[n][r];t.unshift(o),n=o.i-1,r-=1}return t}};var jd={mostGuessableMatchSequence(e,t,n=!1){pn.password=e,pn.excludeAdditive=n;const r=e.length;let a=pn.fillArray(r,"array");t.forEach(u=>{a[u.j].push(u)}),a=a.map(u=>u.sort((l,c)=>l.i-c.i)),pn.optimal={m:pn.fillArray(r,"object"),pi:pn.fillArray(r,"object"),g:pn.fillArray(r,"object")};for(let u=0;u{l.i>0?Object.keys(pn.optimal.m[l.i-1]).forEach(c=>{pn.update(l,parseInt(c,10)+1)}):pn.update(l,1)}),pn.bruteforceUpdate(u);const s=pn.unwind(r),o=s.length,i=this.getGuesses(e,o);return{password:e,guesses:i,guessesLog10:Oa.log10(i),sequence:s}},getGuesses(e,t){const n=e.length;let r=0;return e.length===0?r=1:r=pn.optimal.g[n-1][t],r}};class g2e{match({password:t,omniMatch:n}){const r=[];let a=0;for(;ao instanceof Promise)?Promise.all(r):r}normalizeMatch(t,n,r,a){const s={pattern:"repeat",i:r.index,j:n,token:r[0],baseToken:t,baseGuesses:0,repeatCount:r[0].length/t.length};return a instanceof Promise?a.then(o=>({...s,baseGuesses:o})):{...s,baseGuesses:a}}getGreedyMatch(t,n){const r=/(.+)\1+/g;return r.lastIndex=n,r.exec(t)}getLazyMatch(t,n){const r=/(.+?)\1+/g;return r.lastIndex=n,r.exec(t)}setMatchToken(t,n){const r=/^(.+?)\1+$/;let a,s="";if(n&&t[0].length>n[0].length){a=t;const o=r.exec(a[0]);o&&(s=o[1])}else a=n,a&&(s=a[1]);return{match:a,baseToken:s}}getBaseGuesses(t,n){const r=n.match(t);return r instanceof Promise?r.then(s=>jd.mostGuessableMatchSequence(t,s).guesses):jd.mostGuessableMatchSequence(t,r).guesses}}class A2e{constructor(){this.MAX_DELTA=5}match({password:t}){const n=[];if(t.length===1)return[];let r=0,a=null;const s=t.length;for(let o=1;o1||Math.abs(r)===1){const o=Math.abs(r);if(o>0&&o<=this.MAX_DELTA){const i=a.slice(t,+n+1||9e9),{sequenceName:u,sequenceSpace:l}=this.getSequence(i);return s.push({pattern:"sequence",i:t,j:n,token:a.slice(t,+n+1||9e9),sequenceName:u,sequenceSpace:l,ascending:r>0})}}return null}getSequence(t){let n="unicode",r=26;return $Ie.test(t)?(n="lower",r=26):LIe.test(t)?(n="upper",r=26):FIe.test(t)&&(n="digits",r=10),{sequenceName:n,sequenceSpace:r}}}class S2e{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const n=[];return Object.keys(Re.graphs).forEach(r=>{const a=Re.graphs[r];Hd(n,this.helper(t,a,r))}),ps(n)}checkIfShifted(t,n,r){return!t.includes("keypad")&&this.SHIFTED_RX.test(n.charAt(r))?1:0}helper(t,n,r){let a;const s=[];let o=0;const i=t.length;for(;o2&&s.push({pattern:"spatial",i:o,j:u-1,token:t.slice(o,u),graph:r,turns:c,shiftedCount:a}),o=u;break}}}return s}}const O2e=new RegExp(`[${LA.join("")}]`);class zu{static getMostUsedSeparatorChar(t){const n=[...t.split("").filter(a=>O2e.test(a)).reduce((a,s)=>{const o=a.get(s);return o?a.set(s,o+1):a.set(s,1),a},new Map).entries()].sort(([a,s],[o,i])=>i-s);if(!n.length)return;const r=n[0];if(!(r[1]<2))return r[0]}static getSeparatorRegex(t){return new RegExp(`([^${t}
+])(${t})(?!${t})`,"g")}match({password:t}){const n=[];if(t.length===0)return n;const r=zu.getMostUsedSeparatorChar(t);if(r===void 0)return n;const a=zu.getSeparatorRegex(r);for(const s of t.matchAll(a)){if(s.index===void 0)continue;const o=s.index+1;n.push({pattern:"separator",token:r,i:o,j:o})}return n}}class I2e{constructor(){this.matchers={date:zIe,dictionary:e2e,regex:t2e,repeat:g2e,sequence:A2e,spatial:S2e,separator:zu}}match(t){const n=[],r=[];return[...Object.keys(this.matchers),...Object.keys(Re.matchers)].forEach(s=>{if(!this.matchers[s]&&!Re.matchers[s])return;const o=this.matchers[s]?this.matchers[s]:Re.matchers[s].Matching,u=new o().match({password:t,omniMatch:this});u instanceof Promise?(u.then(l=>{Hd(n,l)}),r.push(u)):Hd(n,u)}),r.length>0?new Promise((s,o)=>{Promise.all(r).then(()=>{s(ps(n))}).catch(i=>{o(i)})}):ps(n)}}const $A=1,kA=$A*60,UA=kA*60,MA=UA*24,xA=MA*31,FA=xA*12,v2e=FA*100,Tl={second:$A,minute:kA,hour:UA,day:MA,month:xA,year:FA,century:v2e};class R2e{translate(t,n){let r=t;n!==void 0&&n!==1&&(r+="s");const{timeEstimation:a}=Re.translations;return a[r].replace("{base}",`${n}`)}estimateAttackTimes(t){const n={onlineThrottling100PerHour:t/.027777777777777776,onlineNoThrottling10PerSecond:t/10,offlineSlowHashing1e4PerSecond:t/1e4,offlineFastHashing1e10PerSecond:t/1e10},r={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(n).forEach(a=>{const s=n[a];r[a]=this.displayTime(s)}),{crackTimesSeconds:n,crackTimesDisplay:r,score:this.guessesToScore(t)}}guessesToScore(t){return t<1005?0:t<1000005?1:t<100000005?2:t<1e10+5?3:4}displayTime(t){let n="centuries",r;const a=Object.keys(Tl),s=a.findIndex(o=>t-1&&(n=a[s-1],s!==0?r=Math.round(t/Tl[n]):n="ltSecond"),this.translate(n,r)}}var b2e=()=>null,N2e=()=>({warning:Re.translations.warnings.dates,suggestions:[Re.translations.suggestions.dates]});const C2e=(e,t)=>{let n=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?n=Re.translations.warnings.topTen:e.rank<=100?n=Re.translations.warnings.topHundred:n=Re.translations.warnings.common:e.guessesLog10<=4&&(n=Re.translations.warnings.similarToCommon),n},y2e=(e,t)=>{let n=null;return t&&(n=Re.translations.warnings.wordByItself),n},D2e=(e,t)=>t?Re.translations.warnings.namesByThemselves:Re.translations.warnings.commonNames,P2e=(e,t)=>{let n=null;const r=e.dictionaryName,a=r==="lastnames"||r.toLowerCase().includes("firstnames");return r==="passwords"?n=C2e(e,t):r.includes("wikipedia")?n=y2e(e,t):a?n=D2e(e,t):r==="userInputs"&&(n=Re.translations.warnings.userInputs),n};var w2e=(e,t)=>{const n=P2e(e,t),r=[],a=e.token;return a.match(PA)?r.push(Re.translations.suggestions.capitalization):a.match(wA)&&a.toLowerCase()!==a&&r.push(Re.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&r.push(Re.translations.suggestions.reverseWords),e.l33t&&r.push(Re.translations.suggestions.l33t),{warning:n,suggestions:r}},L2e=e=>e.regexName==="recentYear"?{warning:Re.translations.warnings.recentYears,suggestions:[Re.translations.suggestions.recentYears,Re.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},$2e=e=>{let t=Re.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=Re.translations.warnings.simpleRepeat),{warning:t,suggestions:[Re.translations.suggestions.repeated]}},k2e=()=>({warning:Re.translations.warnings.sequences,suggestions:[Re.translations.suggestions.sequences]}),U2e=e=>{let t=Re.translations.warnings.keyPattern;return e.turns===1&&(t=Re.translations.warnings.straightRow),{warning:t,suggestions:[Re.translations.suggestions.longerKeyboardPattern]}},M2e=()=>null;const lh={warning:null,suggestions:[]};class x2e{constructor(){this.matchers={bruteforce:b2e,date:N2e,dictionary:w2e,regex:L2e,repeat:$2e,sequence:k2e,spatial:U2e,separator:M2e},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(Re.translations.suggestions.useWords,Re.translations.suggestions.noNeed)}getFeedback(t,n){if(n.length===0)return this.defaultFeedback;if(t>2)return lh;const r=Re.translations.suggestions.anotherWord,a=this.getLongestMatch(n);let s=this.getMatchFeedback(a,n.length===1);return s!=null?s.suggestions.unshift(r):s={warning:null,suggestions:[r]},s}getLongestMatch(t){let n=t[0];return t.slice(1).forEach(a=>{a.token.length>n.token.length&&(n=a)}),n}getMatchFeedback(t,n){return this.matchers[t.pattern]?this.matchers[t.pattern](t,n):Re.matchers[t.pattern]&&"feedback"in Re.matchers[t.pattern]?Re.matchers[t.pattern].feedback(t,n):lh}}const WA=()=>new Date().getTime(),F2e=(e,t,n)=>{const r=new x2e,a=new R2e,s=jd.mostGuessableMatchSequence(t,e),o=WA()-n,i=a.estimateAttackTimes(s.guesses);return{calcTime:o,...s,...i,feedback:r.getFeedback(i.score,s.sequence)}},W2e=(e,t)=>(t&&Re.extendUserInputsDictionary(t),new I2e().match(e)),G2e=(e,t)=>{const n=WA(),r=W2e(e,t);if(r instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return F2e(r,e,n)},z2e="modulepreload",B2e=function(e){return"/"+e},dh={},bt=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");a=Promise.all(n.map(o=>{if(o=B2e(o),o in dh)return;dh[o]=!0;const i=o.endsWith(".css"),u=i?'[rel="stylesheet"]':"";if(!!r)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===o&&(!i||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${u}`))return;const c=document.createElement("link");if(c.rel=i?"stylesheet":z2e,i||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),i)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})}))}return a.then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},H2e=async e=>{switch(e){case"fr":return await bt(()=>import("./password.fr-1uJe1-pR.js"),__vite__mapDeps([]));case"de":return await bt(()=>import("./password.de-qoep7B_f.js"),__vite__mapDeps([]));case"it":return await bt(()=>import("./password.it-ImDc22WR.js"),__vite__mapDeps([]));case"es":return await bt(()=>import("./password.es-es--6AdGpRj.js"),__vite__mapDeps([]));case"pl":return await bt(()=>import("./password.pl-Ipz4x2MM.js"),__vite__mapDeps([]));default:return await bt(()=>import("./password.en-lIq_N4yZ.js"),__vite__mapDeps([]))}},fh=async e=>{const t=await bt(()=>import("./password.common-7m77ow97.js"),__vite__mapDeps([])),n=await H2e(e),r={graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary}};Re.setOptions(r)},j2e=e=>{switch(e){case 2:return"AVERAGE";case 3:return"GOOD";case 4:return"STRONG";default:return"WEAK"}},V2e={class:"password-strength"},K2e=["value"],Y2e={key:0,class:"password-strength-details"},q2e={class:"password-strength-value"},X2e={key:0,class:"info-box"},Z2e={class:"password-feedback"},Q2e=Q({__name:"PasswordStength",props:{password:{}},setup(e){const t=e,{password:n}=_e(t),r=$e(),a=k(()=>r.getters[H.GETTERS.LANGUAGE]),s=k(()=>r.getters[Y.GETTERS.IS_SUCCESS]),o=ce(0),i=ce(""),u=ce([]),l=ce("0% 100%");It(async()=>await fh(a.value));function c(f){const d=G2e(f);o.value=d.score,i.value=j2e(o.value),u.value=d.feedback.suggestions,l.value=o.value*100/4+"% 100%"}return Fe(()=>a.value,async f=>{await fh(f)}),Fe(()=>n.value,async f=>{s.value?i.value="":c(f)}),(f,d)=>(T(),N("div",V2e,[p("input",{class:ge(["password-slider",`strength-${o.value}`]),style:Yr({backgroundSize:l.value}),type:"range",value:o.value,min:"0",max:"4",step:"1",tabindex:-1},null,14,K2e),i.value?(T(),N("div",Y2e,[p("span",q2e,_(f.$t("user.PASSWORD_STRENGTH.LABEL"))+": "+_(f.$t(`user.PASSWORD_STRENGTH.${i.value}`)),1),u.value.length>0?(T(),N("div",X2e,[p("ul",Z2e,[(T(!0),N(Ie,null,xe(u.value,m=>(T(),N("li",{key:m},_(f.$t(`user.PASSWORD_STRENGTH.SUGGESTIONS.${m}`)),1))),128))])])):F("",!0)])):F("",!0)]))}}),J2e=ae(Q2e,[["__scopeId","data-v-1affb508"]]),eve=e=>(ut("data-v-ac528612"),e=e(),ct(),e),tve={class:"password-input"},nve=["id","disabled","placeholder","required","type"],rve={class:"show-password"},ave={key:0,class:"form-info"},sve=eve(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),ove=Q({__name:"PasswordInput",props:{checkStrength:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{default:"password"},password:{default:""},placeholder:{},required:{type:Boolean,default:!1}},emits:["updatePassword","passwordError"],setup(e,{emit:t}){const n=e,{checkStrength:r,disabled:a,id:s,password:o,placeholder:i,required:u}=_e(n),l=ce(!1),c=ce(""),f=t;function d(){l.value=!l.value}function m(g){f("updatePassword",g.target.value)}function E(){f("passwordError")}return Fe(()=>o.value,g=>{g===""&&(c.value="",l.value=!1)}),(g,b)=>(T(),N("div",tve,[Ke(p("input",{id:h(s),disabled:h(a),placeholder:h(i),required:h(u),type:l.value?"text":"password","onUpdate:modelValue":b[0]||(b[0]=v=>c.value=v),minlength:"8",onInput:m,onInvalid:E},null,40,nve),[[p2,c.value]]),p("div",rve,[p("button",{class:"transparent",onClick:Xe(d,["prevent"]),type:"button"},[K(_(g.$t(`user.${l.value?"HIDE":"SHOW"}_PASSWORD`))+" ",1),p("i",{class:ge(["fa",`fa-eye${l.value?"-slash":""}`]),"aria-hidden":"true"},null,2)])]),h(r)?(T(),N("div",ave,[sve,K(" "+_(g.$t("user.PASSWORD_INFO")),1)])):F("",!0),h(r)?(T(),te(J2e,{key:1,password:c.value},null,8,["password"])):F("",!0)]))}}),Vd=ae(ove,[["__scopeId","data-v-ac528612"]]),O0=e=>(ut("data-v-8ebb5cd3"),e=e(),ct(),e),ive={id:"user-infos-edition"},uve={class:"profile-form form-box"},cve={key:1,class:"info-box success-message"},lve={class:"form-items",for:"email"},dve=["disabled"],fve={class:"form-items",for:"password-field"},pve={class:"form-items",for:"new-password-field"},mve={class:"form-buttons"},Eve={class:"confirm",type:"submit"},hve={class:"data-export"},_ve={class:"info-box"},Tve=O0(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),gve={key:0,class:"data-export-archive"},Ave=O0(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),Sve={key:1},Ove={key:2},Ive=O0(()=>p("i",{class:"fa fa-spinner fa-pulse","aria-hidden":"true"},null,-1)),vve=Q({__name:"UserAccountEdition",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=$e(),a=xt({email:"",password:"",new_password:""}),s=k(()=>r.getters[Y.GETTERS.USER_LOADING]),o=k(()=>r.getters[H.GETTERS.APP_CONFIG]),i=k(()=>r.getters[Y.GETTERS.IS_SUCCESS]),u=ce(!1),l=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),c=ce(!1),f=ce(!1),d=k(()=>r.getters[Y.GETTERS.EXPORT_REQUEST]),m=k(()=>A()),E=ce(!1);gt(()=>{t.user&&(r.dispatch(Y.ACTIONS.GET_REQUEST_DATA_EXPORT),b(t.user))});function g(){c.value=!0}function b(B){a.email=B.email}function v(B){a.password=B}function R(B){a.new_password=B}function A(){return d.value?xn(d.value.created_at,n.value.timezone,n.value.date_format,!0,null,!0):null}function S(){return m.value?M3(new Date(m.value),W3(new Date,1)):!0}function C(){const B={email:a.email,password:a.password};a.new_password&&(B.new_password=a.new_password),u.value=a.email!==n.value.email,r.dispatch(Y.ACTIONS.UPDATE_USER_ACCOUNT,B)}function L(B){f.value=B}function $(B){r.dispatch(Y.ACTIONS.DELETE_ACCOUNT,{username:B})}function U(){r.dispatch(Y.ACTIONS.REQUEST_DATA_EXPORT)}async function G(B){E.value=!0,await Be.get(`/auth/account/export/${B}`,{responseType:"blob"}).then(w=>{const Z=window.URL.createObjectURL(new Blob([w.data],{type:"application/zip"})),J=document.createElement("a");J.href=Z,J.setAttribute("download",B),document.body.appendChild(J),J.click()}).finally(()=>E.value=!1)}return Rt(()=>{r.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!1),r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),Fe(()=>i.value,async B=>{B&&(v(""),R(""),b(n.value),c.value=!1)}),Fe(()=>n.value.email,async()=>{b(n.value)}),(B,w)=>{const Z=ue("Modal"),J=ue("ErrorMessage");return T(),N("div",ive,[f.value?(T(),te(Z,{key:0,title:B.$t("common.CONFIRMATION"),message:B.$t("user.CONFIRM_ACCOUNT_DELETION"),onConfirmAction:w[0]||(w[0]=re=>$(h(n).username)),onCancelAction:w[1]||(w[1]=re=>L(!1)),onKeydown:w[2]||(w[2]=At(re=>L(!1),["esc"]))},null,8,["title","message"])):F("",!0),p("div",uve,[l.value?(T(),te(J,{key:0,message:l.value},null,8,["message"])):F("",!0),i.value?(T(),N("div",cve,_(B.$t(`user.PROFILE.SUCCESSFUL_${u.value&&o.value.is_email_sending_enabled?"EMAIL_":""}UPDATE`)),1)):F("",!0),p("form",{class:ge({errors:c.value}),onSubmit:Xe(C,["prevent"])},[p("label",lve,[K(_(B.$t("user.EMAIL"))+"* ",1),Ke(p("input",{id:"email","onUpdate:modelValue":w[3]||(w[3]=re=>a.email=re),disabled:s.value,required:!0,onInvalid:g},null,40,dve),[[tt,a.email]])]),p("label",fve,[K(_(B.$t("user.CURRENT_PASSWORD"))+"* ",1),M(Vd,{id:"password-field",disabled:s.value,password:a.password,required:!0,onUpdatePassword:v,onPasswordError:g},null,8,["disabled","password"])]),p("label",pve,[K(_(B.$t("user.NEW_PASSWORD"))+" ",1),M(Vd,{id:"new-password-field",disabled:s.value,checkStrength:!0,password:a.new_password,isSuccess:!1,onUpdatePassword:R,onPasswordError:g},null,8,["disabled","password"])]),p("div",mve,[p("button",Eve,_(B.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:w[4]||(w[4]=Xe(re=>B.$router.push("/profile"),["prevent"]))},_(B.$t("buttons.CANCEL")),1),p("button",{class:"danger",onClick:w[5]||(w[5]=Xe(re=>L(!0),["prevent"]))},_(B.$t("buttons.DELETE_MY_ACCOUNT")),1),S()?(T(),N("button",{key:0,class:"confirm",onClick:Xe(U,["prevent"])},_(B.$t("buttons.REQUEST_DATA_EXPORT")),1)):F("",!0)])],34),p("div",hve,[p("span",_ve,[Tve,K(" "+_(B.$t("user.EXPORT_REQUEST.ONLY_ONE_EXPORT_PER_DAY")),1)]),d.value?(T(),N("div",gve,[K(_(B.$t("user.EXPORT_REQUEST.DATA_EXPORT"))+" ("+_(m.value)+"): ",1),d.value.status==="successful"?(T(),N("span",{key:0,class:"archive-link",onClick:w[6]||(w[6]=Xe(re=>G(d.value.file_name),["prevent"]))},[Ave,K(" "+_(B.$t("user.EXPORT_REQUEST.DOWNLOAD_ARCHIVE"))+" ("+_(h(tu)(d.value.file_size))+") ",1)])):(T(),N("span",Sve,_(B.$t(`user.EXPORT_REQUEST.STATUS.${d.value.status}`)),1)),E.value?(T(),N("span",Ove,[K(_(B.$t("user.EXPORT_REQUEST.GENERATING_LINK"))+" ",1),Ive])):F("",!0)])):F("",!0)])])])}}}),Rve=ae(vve,[["__scopeId","data-v-8ebb5cd3"]]),bve={id:"user-infos-edition"},Nve={class:"profile-form form-box"},Cve={class:"form-items",for:"registrationDate"},yve=["value"],Dve={class:"form-items",for:"first_name"},Pve=["disabled"],wve={class:"form-items",for:"last_name"},Lve={class:"form-items",for:"birth_date"},$ve=["disabled"],kve={class:"form-items",for:"location"},Uve=["disabled"],Mve={class:"form-items"},xve={class:"form-buttons"},Fve={class:"confirm",type:"submit"},Wve=Q({__name:"UserInfosEdition",props:{user:{}},setup(e){const t=e,n=$e(),r=xt({first_name:"",last_name:"",birth_date:"",location:"",bio:""}),a=k(()=>t.user.created_at?xn(t.user.created_at,t.user.timezone,t.user.date_format):""),s=k(()=>n.getters[Y.GETTERS.USER_LOADING]),o=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);gt(()=>{t.user&&i(t.user)});function i(c){r.first_name=c.first_name?c.first_name:"",r.last_name=c.last_name?c.last_name:"",r.birth_date=c.birth_date?ln(new Date(c.birth_date),"yyyy-MM-dd"):"",r.location=c.location?c.location:"",r.bio=c.bio?c.bio:""}function u(c){r.bio=c}function l(){n.dispatch(Y.ACTIONS.UPDATE_USER_PROFILE,r)}return Rt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(c,f)=>{const d=ue("ErrorMessage"),m=ue("CustomTextArea");return T(),N("div",bve,[p("div",Nve,[o.value?(T(),te(d,{key:0,message:o.value},null,8,["message"])):F("",!0),p("form",{onSubmit:Xe(l,["prevent"])},[p("label",Cve,[K(_(c.$t("user.PROFILE.REGISTRATION_DATE"))+" ",1),p("input",{id:"registrationDate",value:a.value,disabled:""},null,8,yve)]),p("label",Dve,[K(_(c.$t("user.PROFILE.FIRST_NAME"))+" ",1),Ke(p("input",{id:"first_name","onUpdate:modelValue":f[0]||(f[0]=E=>r.first_name=E),disabled:s.value},null,8,Pve),[[tt,r.first_name]])]),p("label",wve,[K(_(c.$t("user.PROFILE.LAST_NAME"))+" ",1),Ke(p("input",{id:"last_name","onUpdate:modelValue":f[1]||(f[1]=E=>r.last_name=E)},null,512),[[tt,r.last_name]])]),p("label",Lve,[K(_(c.$t("user.PROFILE.BIRTH_DATE"))+" ",1),Ke(p("input",{id:"birth_date",type:"date",class:"birth-date","onUpdate:modelValue":f[2]||(f[2]=E=>r.birth_date=E),disabled:s.value},null,8,$ve),[[tt,r.birth_date]])]),p("label",kve,[K(_(c.$t("user.PROFILE.LOCATION"))+" ",1),Ke(p("input",{id:"location","onUpdate:modelValue":f[3]||(f[3]=E=>r.location=E),disabled:s.value},null,8,Uve),[[tt,r.location]])]),p("label",Mve,[K(_(c.$t("user.PROFILE.BIO"))+" ",1),M(m,{name:"bio",charLimit:200,input:r.bio,disabled:s.value,onUpdateValue:u},null,8,["input","disabled"])]),p("div",xve,[p("button",Fve,_(c.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:f[4]||(f[4]=Xe(E=>c.$router.push("/profile"),["prevent"]))},_(c.$t("buttons.CANCEL")),1)])],32)])])}}}),Gve=ae(Wve,[["__scopeId","data-v-5f5c8fca"]]),zve=e=>(ut("data-v-8f62d42f"),e=e(),ct(),e),Bve={id:"user-picture-edition"},Hve={class:"user-picture-form"},jve={class:"picture-help"},Vve={class:"info-box"},Kve=zve(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),Yve={class:"picture-buttons"},qve=["disabled"],Xve=Q({__name:"UserPictureEdition",props:{user:{}},setup(e){const t=e,n=$e(),{user:r}=_e(t),a=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),s=k(()=>n.getters[H.GETTERS.APP_CONFIG]),o=s.value.max_single_file_size?tu(s.value.max_single_file_size):"",i=ce(null);function u(){n.dispatch(Y.ACTIONS.DELETE_PICTURE)}function l(f){f.target.files!==null&&(i.value=f.target.files[0])}function c(){i.value&&n.dispatch(Y.ACTIONS.UPDATE_USER_PICTURE,{picture:i.value})}return Rt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(f,d)=>{const m=ue("ErrorMessage");return T(),N("div",Bve,[p("div",Hve,[a.value?(T(),te(m,{key:0,message:a.value},null,8,["message"])):F("",!0),M(Lo,{user:h(r)},null,8,["user"]),p("form",{onSubmit:Xe(c,["prevent"])},[p("input",{type:"file",name:"picture",accept:".png,.jpg,.gif",onInput:l},null,32),p("div",jve,[p("span",Vve,[Kve,K(" "+_(f.$t("workouts.MAX_SIZE"))+": "+_(h(o)),1)])]),p("div",Yve,[p("button",{type:"submit",disabled:!i.value},_(f.$t("user.PROFILE.PICTURE_UPDATE")),9,qve),h(r).picture?(T(),N("button",{key:0,class:"danger",onClick:u},_(f.$t("user.PROFILE.PICTURE_REMOVE")),1)):F("",!0),p("button",{class:"cancel",onClick:d[0]||(d[0]=E=>f.$router.push("/profile"))},_(f.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],32)])])}}}),Zve=ae(Xve,[["__scopeId","data-v-8f62d42f"]]),Qve=["Africa/Abidjan","Africa/Accra","Africa/Algiers","Africa/Bissau","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/El_Aaiun","Africa/Johannesburg","Africa/Juba","Africa/Khartoum","Africa/Lagos","Africa/Maputo","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fortaleza","America/Fort_Nelson","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/La_Paz","America/Lima","America/Los_Angeles","America/Maceio","America/Managua","America/Manaus","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Johns","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Helsinki","Europe/Istanbul","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zaporozhye","Europe/Zurich","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],Jve={id:"tz-dropdown"},eRe=["value","disabled"],tRe=["onClick","onMouseover","autofocus"],nRe=Q({__name:"TimezoneDropdown",props:{input:{},disabled:{type:Boolean,default:!1}},emits:["updateTimezone"],setup(e,{emit:t}){const n=e,r=t,{input:a,disabled:s}=_e(n),o=ce(a.value),i=ce(!1),u=ce(null),l=ce(0);function c(g){return g.toLowerCase().match(o.value.toLowerCase())}function f(g){l.value=g}function d(g){o.value=g,i.value=!1,r("updateTimezone",g)}function m(g){var b,v,R,A;g.preventDefault(),(v=(b=u.value)==null?void 0:b.firstElementChild)!=null&&v.innerHTML&&d((A=(R=u.value)==null?void 0:R.firstElementChild)==null?void 0:A.innerHTML)}function E(g){g.preventDefault(),i.value=!0,o.value=g.target.value.trim()}return Fe(()=>n.input,g=>{o.value=g}),(g,b)=>(T(),N("div",Jve,[p("input",{class:"tz-dropdown-input",id:"timezone",name:"timezone",value:o.value,disabled:h(s),required:"",onKeydown:[b[0]||(b[0]=At(v=>d(h(a)),["esc"])),At(m,["enter"])],onInput:E},null,40,eRe),i.value?(T(),N("ul",{key:0,class:"tz-dropdown-list",ref_key:"tzList",ref:u},[(T(!0),N(Ie,null,xe(h(Qve).filter(v=>c(v)),(v,R)=>(T(),N("li",{key:v,class:ge(["tz-dropdown-item",{focus:R===l.value}]),onClick:A=>d(v),onMouseover:A=>f(R),autofocus:R===l.value},_(v),43,tRe))),128))],512)):F("",!0)]))}}),rRe=ae(nRe,[["__scopeId","data-v-0ed9f402"]]),aRe=e=>(ut("data-v-e38a969e"),e=e(),ct(),e),sRe={id:"user-preferences-edition"},oRe={class:"profile-form form-box"},iRe={class:"preferences-section"},uRe={class:"form-items"},cRe=["disabled"],lRe=["value"],dRe={class:"form-items"},fRe=["disabled"],pRe=["value"],mRe={class:"form-items"},ERe={class:"form-items"},hRe=["disabled"],_Re=["value"],TRe={class:"form-items form-checkboxes"},gRe={class:"checkboxes-label"},ARe={class:"checkboxes"},SRe=["id","name","checked","disabled","onInput"],ORe={class:"checkbox-label"},IRe={class:"preferences-section"},vRe={class:"form-items form-checkboxes"},RRe={class:"checkboxes-label"},bRe={class:"checkboxes"},NRe=["id","name","checked","disabled","onInput"],CRe={class:"checkbox-label"},yRe={class:"form-items form-checkboxes"},DRe={class:"checkboxes-label"},PRe={class:"checkboxes"},wRe=["id","name","checked","disabled","onInput"],LRe={class:"checkbox-label"},$Re={class:"form-items form-checkboxes"},kRe={class:"checkboxes-label"},URe={class:"checkboxes"},MRe=["id","name","checked","disabled","onInput"],xRe={class:"checkbox-label"},FRe={class:"form-items form-checkboxes"},WRe={class:"checkboxes-label"},GRe={class:"checkboxes"},zRe=["id","name","checked","disabled","onInput"],BRe={class:"checkbox-label"},HRe={class:"info-box raw-speed-help"},jRe=aRe(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),VRe={class:"form-buttons"},KRe={class:"confirm",type:"submit"},YRe=Q({__name:"UserPreferencesEdition",props:{user:{}},setup(e){const t=e,n=$e(),r=xt({display_ascent:!0,imperial_units:!1,language:"en",timezone:"Europe/Paris",date_format:"dd/MM/yyyy",weekm:!1,start_elevation_at_zero:!1,use_raw_gpx_speed:!1,use_dark_mode:!1}),a=[{label:"SUNDAY",value:!1},{label:"MONDAY",value:!0}],s=[{label:"METRIC",value:!1},{label:"IMPERIAL",value:!0}],o=[{label:"DISPLAYED",value:!0},{label:"HIDDEN",value:!1}],i=[{label:"ZERO",value:!0},{label:"MIN_ALT",value:!1}],u=[{label:"FILTERED_SPEED",value:!1},{label:"RAW_SPEED",value:!0}],l=[{label:"DARK",value:!0},{label:"DEFAULT",value:null},{label:"LIGHT",value:!1}],c=k(()=>n.getters[Y.GETTERS.USER_LOADING]),f=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),d=k(()=>ySe(new Date().toUTCString(),t.user.timezone,r.language));gt(()=>{t.user&&m(t.user)});function m(C){r.display_ascent=C.display_ascent,r.start_elevation_at_zero=C.start_elevation_at_zero?C.start_elevation_at_zero:!1,r.use_raw_gpx_speed=C.use_raw_gpx_speed?C.use_raw_gpx_speed:!1,r.imperial_units=C.imperial_units?C.imperial_units:!1,r.language=C.language?C.language:"en",r.timezone=C.timezone?C.timezone:"Europe/Paris",r.date_format=C.date_format?C.date_format:"dd/MM/yyyy",r.weekm=C.weekm?C.weekm:!1,r.use_dark_mode=C.use_dark_mode}function E(){n.dispatch(Y.ACTIONS.UPDATE_USER_PREFERENCES,r)}function g(C){r.timezone=C}function b(C){r.start_elevation_at_zero=C}function v(C){r.use_raw_gpx_speed=C}function R(C){r.display_ascent=C}function A(C){r.imperial_units=C}function S(C){r.weekm=C}return Rt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(C,L)=>{const $=ue("ErrorMessage");return T(),N("div",sRe,[p("div",oRe,[f.value?(T(),te($,{key:0,message:f.value},null,8,["message"])):F("",!0),p("form",{onSubmit:Xe(E,["prevent"])},[p("div",iRe,_(C.$t("user.PROFILE.INTERFACE")),1),p("label",uRe,[K(_(C.$t("user.PROFILE.LANGUAGE"))+" ",1),Ke(p("select",{id:"language","onUpdate:modelValue":L[0]||(L[0]=U=>r.language=U),disabled:c.value},[(T(!0),N(Ie,null,xe(h(ud),U=>(T(),N("option",{value:U.value,key:U.value},_(U.label),9,lRe))),128))],8,cRe),[[js,r.language]])]),p("label",dRe,[K(_(C.$t("user.PROFILE.THEME_MODE.LABEL"))+" ",1),Ke(p("select",{id:"use_dark_mode","onUpdate:modelValue":L[1]||(L[1]=U=>r.use_dark_mode=U),disabled:c.value},[(T(),N(Ie,null,xe(l,U=>p("option",{value:U.value,key:U.label},_(C.$t(`user.PROFILE.THEME_MODE.VALUES.${U.label}`)),9,pRe)),64))],8,fRe),[[js,r.use_dark_mode]])]),p("label",mRe,[K(_(C.$t("user.PROFILE.TIMEZONE"))+" ",1),M(rRe,{input:r.timezone,disabled:c.value,onUpdateTimezone:g},null,8,["input","disabled"])]),p("label",ERe,[K(_(C.$t("user.PROFILE.DATE_FORMAT"))+" ",1),Ke(p("select",{id:"date_format","onUpdate:modelValue":L[2]||(L[2]=U=>r.date_format=U),disabled:c.value},[(T(!0),N(Ie,null,xe(d.value,U=>(T(),N("option",{value:U.value,key:U.value},_(U.label),9,_Re))),128))],8,hRe),[[js,r.date_format]])]),p("div",TRe,[p("span",gRe,_(C.$t("user.PROFILE.FIRST_DAY_OF_WEEK")),1),p("div",ARe,[(T(),N(Ie,null,xe(a,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.weekm,disabled:c.value,onInput:G=>S(U.value)},null,40,SRe),p("span",ORe,_(C.$t(`user.PROFILE.${U.label}`)),1)])),64))])]),p("div",IRe,_(C.$t("workouts.WORKOUT",0)),1),p("div",vRe,[p("span",RRe,_(C.$t("user.PROFILE.UNITS.LABEL")),1),p("div",bRe,[(T(),N(Ie,null,xe(s,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.imperial_units,disabled:c.value,onInput:G=>A(U.value)},null,40,NRe),p("span",CRe,_(C.$t(`user.PROFILE.UNITS.${U.label}`)),1)])),64))])]),p("div",yRe,[p("span",DRe,_(C.$t("user.PROFILE.ASCENT_DATA")),1),p("div",PRe,[(T(),N(Ie,null,xe(o,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.display_ascent,disabled:c.value,onInput:G=>R(U.value)},null,40,wRe),p("span",LRe,_(C.$t(`common.${U.label}`)),1)])),64))])]),p("div",$Re,[p("span",kRe,_(C.$t("user.PROFILE.ELEVATION_CHART_START.LABEL")),1),p("div",URe,[(T(),N(Ie,null,xe(i,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.start_elevation_at_zero,disabled:c.value,onInput:G=>b(U.value)},null,40,MRe),p("span",xRe,_(C.$t(`user.PROFILE.ELEVATION_CHART_START.${U.label}`)),1)])),64))])]),p("div",FRe,[p("span",WRe,_(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL")),1),p("div",GRe,[(T(),N(Ie,null,xe(u,U=>p("label",{key:U.label},[p("input",{type:"radio",id:U.label,name:U.label,checked:U.value===r.use_raw_gpx_speed,disabled:c.value,onInput:G=>v(U.value)},null,40,zRe),p("span",BRe,_(C.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${U.label}`)),1)])),64))]),p("div",HRe,[p("span",null,[jRe,K(" "+_(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),p("div",VRe,[p("button",KRe,_(C.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:L[3]||(L[3]=Xe(U=>C.$router.push("/profile/preferences"),["prevent"]))},_(C.$t("buttons.CANCEL")),1)])],32)])])}}}),qRe=ae(YRe,[["__scopeId","data-v-e38a969e"]]),XRe={class:"privacy-policy-text"},ZRe={class:"last-update"},QRe=["innerHTML"],JRe=["innerHTML"],ebe="Sun, 26 Feb 2023 17:00:00 GMT",tbe=Q({__name:"PrivacyPolicy",setup(e){const t=$e(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),r=k(()=>t.getters[H.GETTERS.LANGUAGE]),a=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),s=k(()=>c()),o=k(()=>l()),i=k(()=>f()),u=["DATA_COLLECTED","INFORMATION_USAGE","INFORMATION_PROTECTION","INFORMATION_DISCLOSURE","SITE_USAGE_BY_CHILDREN","YOUR_CONSENT","ACCOUNT_DELETION","CHANGES_TO_OUR_PRIVACY_POLICY"];function l(){return a.value.timezone?a.value.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone?Intl.DateTimeFormat().resolvedOptions().timeZone:"Europe/Paris"}function c(){return IA[r.value]}function f(){return xn(n.value.privacy_policy&&n.value.privacy_policy_date?`${n.value.privacy_policy_date}`:ebe,o.value,s.value,!1)}return(d,m)=>(T(),N("div",XRe,[p("h1",null,_(St(d.$t("privacy_policy.TITLE"))),1),p("p",ZRe,[K(_(d.$t("privacy_policy.LAST_UPDATE"))+": ",1),p("time",null,_(i.value),1)]),n.value.privacy_policy?(T(),N("div",{key:0,innerHTML:h(ma)(h(vo)(n.value.privacy_policy))},null,8,QRe)):(T(),N(Ie,{key:1},xe(u,E=>(T(),N(Ie,{key:E},[p("h2",null,_(d.$t(`privacy_policy.CONTENT.${E}.TITLE`)),1),p("p",{innerHTML:h(ma)(d.$t(`privacy_policy.CONTENT.${E}.CONTENT`))},null,8,JRe)],64))),64))]))}}),GA=ae(tbe,[["__scopeId","data-v-31d5cd27"]]),nbe={id:"user-privacy-policy"},rbe={key:1},abe={class:"policy-content"},sbe={for:"accepted_policy",class:"accepted_policy"},obe={class:"form-buttons"},ibe={class:"confirm",type:"submit"},ube=Q({__name:"UserPrivacyPolicyValidation",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=$e(),a=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),s=ce(!1);function o(){r.dispatch(Y.ACTIONS.ACCEPT_PRIVACY_POLICY,s.value)}return Rt(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(i,u)=>{const l=ue("ErrorMessage"),c=ue("router-link"),f=ue("i18n-t");return T(),N("div",nbe,[a.value?(T(),te(l,{key:0,message:a.value},null,8,["message"])):F("",!0),h(n).accepted_privacy_policy?(T(),N("div",rbe,[p("p",null,[M(f,{keypath:"user.YOU_HAVE_ACCEPTED_PRIVACY_POLICY"},{default:fe(()=>[M(c,{to:"/privacy-policy"},{default:fe(()=>[K(_(i.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})]),p("button",{class:"cancel",onClick:u[0]||(u[0]=d=>i.$router.push("/profile"))},_(i.$t("user.PROFILE.BACK_TO_PROFILE")),1)])):(T(),N("form",{key:2,onSubmit:u[3]||(u[3]=Xe(d=>o(),["prevent"]))},[p("div",abe,[M(GA)]),p("label",sbe,[Ke(p("input",{type:"checkbox",id:"accepted_policy",required:"","onUpdate:modelValue":u[1]||(u[1]=d=>s.value=d)},null,512),[[hf,s.value]]),p("span",null,[M(f,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:fe(()=>[K(_(i.$t("privacy_policy.TITLE")),1)]),_:1})])]),M(c,{to:"/profile/edit/account"},{default:fe(()=>[K(_(i.$t("user.I_WANT_TO_DELETE_MY_ACCOUNT")),1)]),_:1}),p("div",obe,[p("button",ibe,_(i.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:u[2]||(u[2]=d=>i.$router.push("/profile"))},_(i.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],32))])}}}),cbe=ae(ube,[["__scopeId","data-v-a70349ce"]]),lbe=["profile:read","profile:write","users:read","users:write","workouts:read","workouts:write"],dbe=["application:write"],fbe={id:"new-oauth2-app"},pbe={id:"new-oauth2-title"},mbe={id:"apps-form"},Ebe={class:"form-items"},hbe={class:"form-item"},_be={for:"app-name"},Tbe={class:"form-item"},gbe={for:"app-description"},Abe={class:"form-item"},Sbe={for:"app-url"},Obe={class:"form-item"},Ibe={for:"app-redirect-uri"},vbe={class:"form-item-scope"},Rbe={class:"form-item-scope-label"},bbe={class:"scope-label"},Nbe=["name","checked","onChange"],Cbe=["innerHTML"],ybe={class:"form-buttons"},Dbe=["disabled"],Pbe=Q({__name:"AddUserApp",props:{authUser:{}},setup(e){const t=e,n=$e(),r=xt({client_name:"",client_uri:"",client_description:"",description:"",redirect_uri:""}),a=xt([]),s=k(()=>l(t.authUser,dbe,lbe));function o(){const c={client_name:r.client_name,client_description:r.client_description,client_uri:r.client_uri,redirect_uris:[r.redirect_uri],scope:a.sort().join(" ")};n.dispatch(Ve.ACTIONS.CREATE_CLIENT,c)}function i(c){r.client_description=c}function u(c){const f=a.indexOf(c);f>-1?a.splice(f,1):a.push(c)}function l(c,f,d){const m=[...d];return c.admin&&m.push(...f),m.sort()}return(c,f)=>{const d=ue("CustomTextArea");return T(),N("div",fbe,[p("h1",pbe,_(c.$t("oauth2.ADD_A_NEW_APP")),1),p("div",mbe,[p("form",{onSubmit:Xe(o,["prevent"])},[p("div",Ebe,[p("div",hbe,[p("label",_be,_(c.$t("oauth2.APP.NAME"))+"*",1),Ke(p("input",{id:"app-name",type:"text",required:"","onUpdate:modelValue":f[0]||(f[0]=m=>r.client_name=m)},null,512),[[tt,r.client_name]])]),p("div",Tbe,[p("label",gbe,_(c.$t("oauth2.APP.DESCRIPTION")),1),M(d,{name:"app-description",charLimit:200,input:r.description,onUpdateValue:i},null,8,["input"])]),p("div",Abe,[p("label",Sbe,_(c.$t("oauth2.APP.URL"))+"*",1),Ke(p("input",{id:"app-url",type:"text",required:"","onUpdate:modelValue":f[1]||(f[1]=m=>r.client_uri=m)},null,512),[[tt,r.client_uri]])]),p("div",Obe,[p("label",Ibe,_(c.$t("oauth2.APP.REDIRECT_URL"))+"* ",1),Ke(p("input",{id:"app-redirect-uri",type:"text",required:"","onUpdate:modelValue":f[2]||(f[2]=m=>r.redirect_uri=m)},null,512),[[tt,r.redirect_uri]])]),p("div",vbe,[p("div",Rbe,_(c.$t("oauth2.APP.SCOPE.LABEL"))+"* ",1),(T(!0),N(Ie,null,xe(s.value,m=>(T(),N("div",{class:"form-item-scope-checkboxes",key:m},[p("label",bbe,[p("input",{type:"checkbox",name:m,checked:a.includes(m),onChange:E=>u(m)},null,40,Nbe),p("code",null,_(m),1)]),p("p",{class:"scope-description",innerHTML:c.$t(`oauth2.APP.SCOPE.${m}_DESCRIPTION`)},null,8,Cbe)]))),128))])]),p("div",ybe,[p("button",{class:"confirm",type:"submit",disabled:a.length===0},_(c.$t("buttons.SUBMIT")),9,Dbe),p("button",{class:"cancel",onClick:f[3]||(f[3]=Xe(()=>c.$router.push("/profile/apps"),["prevent"]))},_(c.$t("buttons.CANCEL")),1)])],32)])])}}}),wbe=ae(Pbe,[["__scopeId","data-v-e2284e06"]]),Lbe={id:"authorize-oauth2-app"},$be={key:0},kbe={id:"authorize-oauth2-title"},Ube={class:"oauth2-access description-list"},Mbe={class:"client-scope"},xbe=["innerHTML"],Fbe={class:"authorize-oauth2-buttons"},Wbe={key:1},Gbe={class:"no-app"},zbe=Q({__name:"AuthorizeUserApp",setup(e){const t=Vt(),n=$e(),r=k(()=>n.getters[Ve.GETTERS.CLIENT]),a=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);It(()=>s());function s(){t.query.client_id&&typeof t.query.client_id=="string"&&n.dispatch(Ve.ACTIONS.GET_CLIENT_BY_CLIENT_ID,t.query.client_id)}function o(){n.dispatch(Ve.ACTIONS.AUTHORIZE_CLIENT,{client_id:`${t.query.client_id}`,redirect_uri:`${t.query.redirect_uri}`,response_type:`${t.query.response_type}`,scope:`${t.query.scope}`,state:`${t.query.state?t.query.state:""}`,code_challenge:`${t.query.code_challenge?t.query.code_challenge:""}`,code_challenge_method:`${t.query.code_challenge_method?t.query.code_challenge_method:""}`})}return(i,u)=>{const l=ue("router-link"),c=ue("i18n-t"),f=ue("ErrorMessage");return T(),N("div",Lbe,[r.value.client_id?(T(),N("div",$be,[p("h1",kbe,[M(c,{keypath:"oauth2.AUTHORIZE_APP"},{default:fe(()=>[M(l,{to:{name:"UserApp",params:{id:r.value.id}}},{default:fe(()=>[K(_(r.value.name),1)]),_:1},8,["to"])]),_:1})]),a.value?(T(),te(f,{key:0,message:a.value},null,8,["message"])):F("",!0),p("div",Ube,[p("p",null,_(i.$t("oauth2.APP_REQUESTING_ACCESS")),1),p("dl",null,[(T(!0),N(Ie,null,xe(r.value.scope.split(" "),d=>(T(),N(Ie,{key:d},[p("dt",Mbe,[p("code",null,_(d),1)]),p("dd",{innerHTML:i.$t(`oauth2.APP.SCOPE.${d}_DESCRIPTION`)},null,8,xbe)],64))),128))]),p("div",Fbe,[p("button",{class:"danger",onClick:o},_(i.$t("buttons.AUTHORIZE")),1),p("button",{class:"cancel",onClick:u[0]||(u[0]=d=>i.$router.push("/profile/apps"))},_(i.$t("buttons.CANCEL")),1)])])])):(T(),N("div",Wbe,[p("p",Gbe,_(i.$t("oauth2.NO_APP")),1),p("button",{onClick:u[1]||(u[1]=d=>i.$router.push("/profile/apps"))},_(i.$t("buttons.BACK")),1)]))])}}}),Bbe=ae(zbe,[["__scopeId","data-v-a8ed6bf8"]]),Hbe={id:"oauth2-apps"},jbe=Q({__name:"index",props:{user:{}},setup(e){const t=e,n=$e(),{user:r}=_e(t);return Rt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Ve.MUTATIONS.SET_CLIENTS,[])}),(a,s)=>{const o=ue("router-view");return T(),N("div",Hbe,[M(o,{authUser:h(r)},null,8,["authUser"])])}}}),Vbe={id:"oauth2-app",class:"description-list"},Kbe={key:1},Ybe={key:0,class:"info-box success-message"},qbe=["title"],Xbe={key:0},Zbe={key:1,class:"app-secret"},Qbe=["title"],Jbe={class:"client-scopes"},eNe={class:"app-buttons"},tNe={key:2},nNe={class:"no-app"},rNe=Q({__name:"UserApp",props:{authUser:{},afterCreation:{type:Boolean,default:!1}},setup(e){const t=e,n=Vt(),r=$e(),{afterCreation:a,authUser:s}=_e(t),o=k(()=>r.getters[Ve.GETTERS.CLIENT]),i=k(()=>r.getters[Ve.GETTERS.REVOCATION_SUCCESSFUL]),u=ce(!1),l=ce(""),c=ce(!1),f=ce(!1),d=ce(!1);It(()=>{m(),navigator.clipboard&&(d.value=!0)});function m(){!a.value&&n.params.id&&typeof n.params.id=="string"&&r.dispatch(Ve.ACTIONS.GET_CLIENT_BY_ID,+n.params.id)}function E(A){l.value=A?"oauth2.APP_DELETION_CONFIRMATION":"oauth2.TOKENS_REVOCATION_CONFIRMATION",g(!0)}function g(A){u.value=A,A||(l.value="")}function b(A){l.value==="oauth2.APP_DELETION_CONFIRMATION"?r.dispatch(Ve.ACTIONS.DELETE_CLIENT,A):r.dispatch(Ve.ACTIONS.REVOKE_ALL_TOKENS,A)}function v(){navigator.clipboard.writeText(o.value.client_id),c.value=!0,f.value=!1,setTimeout(()=>{c.value=!1},3e3)}function R(){o.value.client_secret&&(navigator.clipboard.writeText(o.value.client_secret),f.value=!0,c.value=!1,setTimeout(()=>{f.value=!1},3e3))}return Rt(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.commit(Ve.MUTATIONS.EMPTY_CLIENT),r.commit(Ve.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1)}),Fe(()=>i.value,A=>{A&&g(!1)}),(A,S)=>{const C=ue("Modal");return T(),N("div",Vbe,[u.value?(T(),te(C,{key:0,title:A.$t("common.CONFIRMATION"),message:A.$t(l.value),onConfirmAction:S[0]||(S[0]=L=>b(o.value.id)),onCancelAction:S[1]||(S[1]=L=>g(!1)),onKeydown:S[2]||(S[2]=At(L=>g(!1),["esc"]))},null,8,["title","message"])):F("",!0),o.value&&o.value.client_id?(T(),N("div",Kbe,[h(a)||i.value?(T(),N("div",Ybe,_(A.$t(h(a)?"oauth2.APP_CREATED_SUCCESSFULLY":"oauth2.TOKENS_REVOKED")),1)):F("",!0),p("dl",null,[p("dt",null,_(A.$t("oauth2.APP.CLIENT_ID"))+":",1),p("dd",null,[K(_(o.value.client_id)+" ",1),h(a)&&d.value?(T(),N("i",{key:0,class:ge(`fa fa-${c.value?"check":"copy"}`),"aria-hidden":"true",title:A.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:v},null,10,qbe)):F("",!0)]),h(a)&&o.value.client_secret?(T(),N("dt",Xbe,_(A.$t("oauth2.APP.CLIENT_SECRET"))+": ",1)):F("",!0),h(a)&&o.value.client_secret?(T(),N("dd",Zbe,[K(_(o.value.client_secret)+" ",1),d.value?(T(),N("i",{key:0,class:ge(`fa fa-${f.value?"check":"copy"}`),"aria-hidden":"true",title:A.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:R},null,10,Qbe)):F("",!0)])):F("",!0),p("dt",null,_(St(A.$t("oauth2.APP.ISSUE_AT")))+":",1),p("dd",null,[p("time",null,_(h(xn)(o.value.issued_at,h(s).timezone,h(s).date_format)),1)]),p("dt",null,_(A.$t("oauth2.APP.NAME"))+":",1),p("dd",null,_(o.value.name),1),p("dt",null,_(A.$t("oauth2.APP.DESCRIPTION"))+":",1),p("dd",{class:ge({"no-description":!o.value.client_description})},_(o.value.client_description?o.value.client_description:A.$t("oauth2.NO_DESCRIPTION")),3),p("dt",null,_(A.$t("oauth2.APP.URL"))+":",1),p("dd",null,_(o.value.website),1),p("dt",null,_(A.$t("oauth2.APP.REDIRECT_URL"))+":",1),p("dd",null,_(o.value.redirect_uris.length>0?o.value.redirect_uris[0]:""),1),p("dt",null,_(A.$t("oauth2.APP.SCOPE.LABEL"))+":",1),p("dd",Jbe,[(T(!0),N(Ie,null,xe(o.value.scope.split(" "),L=>(T(),N("span",{class:"client-scope",key:L},[p("code",null,_(L),1)]))),128))])]),p("div",eNe,[p("button",{class:"danger",onClick:S[3]||(S[3]=L=>E(!1))},_(A.$t("oauth2.REVOKE_ALL_TOKENS")),1),p("button",{class:"danger",onClick:S[4]||(S[4]=L=>E(!0))},_(A.$t("oauth2.DELETE_APP")),1),p("button",{onClick:S[5]||(S[5]=L=>A.$router.push("/profile/apps"))},_(A.$t("buttons.BACK")),1)])])):(T(),N("div",tNe,[p("p",nNe,_(A.$t("oauth2.NO_APP")),1),p("button",{onClick:S[6]||(S[6]=L=>A.$router.push("/profile/apps"))},_(A.$t("buttons.BACK")),1)]))])}}}),ph=ae(rNe,[["__scopeId","data-v-3a7d0f4a"]]),aNe={id:"oauth2-apps-list"},sNe={class:"apps-list"},oNe={key:0},iNe={class:"app-issued-at"},uNe={key:1,class:"no-apps"},cNe={class:"app-list-buttons"},lNe=Q({__name:"UserAppsList",props:{authUser:{}},setup(e){const t=e,n=$e(),r=Vt(),{authUser:a}=_e(t),s=k(()=>n.getters[Ve.GETTERS.CLIENTS]),o=k(()=>n.getters[Ve.GETTERS.CLIENTS_PAGINATION]);let i=u(r.query);It(()=>{l(i)});function u(c){const f={};return c.page&&(f.page=Fd(c.page,_A)),f}function l(c){n.dispatch(Ve.ACTIONS.GET_CLIENTS,c)}return Fe(()=>r.query,async c=>{i=u(c),l(i)}),(c,f)=>{const d=ue("router-link");return T(),N("div",aNe,[p("p",sNe,_(c.$t("oauth2.APPS_LIST")),1),s.value.length>0?(T(),N("ul",oNe,[(T(!0),N(Ie,null,xe(s.value,m=>(T(),N("li",{key:m.client_id},[M(d,{to:{name:"UserApp",params:{id:m.id}}},{default:fe(()=>[K(_(m.name),1)]),_:2},1032,["to"]),p("span",iNe,[K(_(c.$t("oauth2.APP.ISSUE_AT"))+" ",1),p("time",null,_(h(xn)(m.issued_at,h(a).timezone,h(a).date_format)),1)])]))),128))])):(T(),N("div",uNe,_(c.$t("oauth2.NO_APPS")),1)),s.value.length>0?(T(),te(Wu,{key:2,pagination:o.value,path:"/profile/apps",query:h(i)},null,8,["pagination","query"])):F("",!0),p("div",cNe,[p("button",{onClick:f[0]||(f[0]=m=>c.$router.push("/profile/apps/new"))},_(c.$t("oauth2.NEW_APP")),1),p("button",{onClick:f[1]||(f[1]=m=>c.$router.push("/"))},_(c.$t("common.HOME")),1)])])}}}),dNe=ae(lNe,[["__scopeId","data-v-064a87b7"]]),fNe={id:"user-sport-preferences"},pNe={key:0,class:"responsive-table"},mNe={class:"mobile-display"},ENe={key:0,class:"profile-buttons mobile-display"},hNe={key:1,class:"profile-buttons"},_Ne={class:"text-left"},TNe={key:0},gNe={class:"cell-heading"},ANe=["value"],SNe={class:"cell-heading"},ONe={key:0,class:"disabled-message"},INe={key:1,class:"fa fa-refresh fa-spin fa-fw"},vNe={class:"cell-heading"},RNe={class:"cell-heading"},bNe=["checked"],NNe={class:"cell-heading"},CNe=["value"],yNe={key:1},DNe={key:0,class:"action-buttons"},PNe={class:"cell-heading"},wNe=["onClick"],LNe={key:1,class:"edition-buttons"},$Ne=["disabled"],kNe=["disabled","onClick"],UNe=["disabled"],MNe={key:0,class:"profile-buttons"},xNe={key:1,class:"profile-buttons"},FNe="#838383",WNe=Q({__name:"UserSportPreferences",props:{user:{},isEdition:{type:Boolean}},setup(e){const t=e,n=$e(),{t:r}=jt(),{isEdition:a,user:s}=_e(t),o=ht("sportColors"),i=k(()=>n.getters[$t.GETTERS.SPORTS]),u=k(()=>Jr(i.value,r,"is_active",s.value.sports_list)),l=k(()=>n.getters[Y.GETTERS.USER_LOADING]),c=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=xt({sport_id:0,color:null,is_active:!0,stopped_speed_threshold:1});function d(S){S!==null?(f.sport_id=S.id,f.color=S.color?S.color:o?o[S.label]:FNe,f.is_active=S.is_active_for_user,f.stopped_speed_threshold=S.stopped_speed_threshold):v()}function m(S){return f.sport_id===S}function E(S){f.color=S.target.value}function g(S){f.stopped_speed_threshold=parseFloat(S.target.value)}function b(S){f.is_active=S.target.checked}function v(){f.sport_id=0,f.color=null,f.is_active=!0,f.stopped_speed_threshold=1,n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}function R(S){S.preventDefault(),n.dispatch(Y.ACTIONS.UPDATE_USER_SPORT_PREFERENCES,f)}function A(S,C){S.preventDefault(),n.dispatch(Y.ACTIONS.RESET_USER_SPORT_PREFERENCES,C)}return Fe(()=>l.value,S=>{!S&&!c.value&&v()}),(S,C)=>{const L=ue("SportImage"),$=ue("ErrorMessage");return T(),N("div",fNe,[i.value.length>0?(T(),N("div",pNe,[p("div",mNe,[h(a)?(T(),N("div",ENe,[p("button",{class:"cancel",onClick:C[0]||(C[0]=Xe(U=>S.$router.push("/profile/sports"),["prevent"]))},_(S.$t("buttons.BACK")),1)])):(T(),N("div",hNe,[p("button",{onClick:C[1]||(C[1]=U=>S.$router.push("/profile/edit/sports"))},_(S.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),p("button",{onClick:C[2]||(C[2]=U=>S.$router.push("/"))},_(S.$t("common.HOME")),1)]))]),p("table",null,[p("thead",null,[p("tr",null,[p("th",null,_(S.$t("user.PROFILE.SPORT.COLOR")),1),p("th",_Ne,_(S.$t("workouts.SPORT",0)),1),p("th",null,_(S.$t("workouts.WORKOUT",0)),1),p("th",null,_(S.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),p("th",null,_(S.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),h(a)?(T(),N("th",TNe,_(S.$t("user.PROFILE.SPORT.ACTION")),1)):F("",!0)])]),p("tbody",null,[(T(!0),N(Ie,null,xe(u.value,U=>(T(),N("tr",{key:U.id},[p("td",null,[p("span",gNe,_(S.$t("user.PROFILE.SPORT.COLOR")),1),m(U.id)?(T(),N("input",{key:0,class:"sport-color",type:"color",value:f.color,onInput:E},null,40,ANe)):(T(),te(L,{key:1,title:U.translatedLabel,"sport-label":U.label,color:U.color?U.color:h(o)[U.label]},null,8,["title","sport-label","color"]))]),p("td",{class:ge(["sport-label",{"disabled-sport":!U.is_active}])},[p("span",SNe,_(S.$t("user.PROFILE.SPORT.LABEL")),1),K(" "+_(U.translatedLabel)+" ",1),U.is_active?F("",!0):(T(),N("span",ONe," ("+_(S.$t("user.PROFILE.SPORT.DISABLED_BY_ADMIN"))+") ",1)),l.value&&m(U.id)?(T(),N("i",INe)):F("",!0),c.value&&f.sport_id===U.id?(T(),te($,{key:2,message:c.value},null,8,["message"])):F("",!0)],2),p("td",{class:ge(["text-center",{"disabled-sport":!U.is_active}])},[p("span",vNe,_(S.$t("workouts.WORKOUT",0)),1),p("i",{class:ge(`fa fa${h(s).sports_list.includes(U.id)?"-check":""}`),"aria-hidden":"true"},null,2)],2),p("td",{class:ge(["text-center",{"disabled-sport":!U.is_active}])},[p("span",RNe,_(S.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),m(U.id)&&U.is_active?(T(),N("input",{key:0,type:"checkbox",checked:U.is_active_for_user,onChange:b},null,40,bNe)):(T(),N("i",{key:1,class:ge(`fa fa${U.is_active_for_user?"-check":""}`),"aria-hidden":"true"},null,2))],2),p("td",{class:ge(["text-center",{"disabled-sport":!U.is_active}])},[p("span",NNe,_(S.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),m(U.id)&&U.is_active?(T(),N("input",{key:0,class:"threshold-input",type:"number",min:"0",step:"0.1",value:f.stopped_speed_threshold,onInput:g},null,40,CNe)):(T(),N("span",yNe,_(U.stopped_speed_threshold),1))],2),h(a)?(T(),N("td",DNe,[p("span",PNe,_(S.$t("user.PROFILE.SPORT.ACTION")),1),f.sport_id===0?(T(),N("button",{key:0,onClick:G=>d(U)},_(S.$t("buttons.EDIT")),9,wNe)):F("",!0),m(U.id)?(T(),N("div",LNe,[p("button",{disabled:l.value,onClick:R},_(S.$t("buttons.SUBMIT")),9,$Ne),p("button",{disabled:l.value,onClick:G=>A(G,U.id)},_(S.$t("buttons.RESET")),9,kNe),p("button",{disabled:l.value,onClick:C[3]||(C[3]=G=>d(null))},_(S.$t("buttons.CANCEL")),9,UNe)])):F("",!0)])):F("",!0)]))),128))])]),h(a)?(T(),N("div",MNe,[p("button",{class:"cancel",onClick:C[4]||(C[4]=Xe(U=>S.$router.push("/profile/sports"),["prevent"]))},_(S.$t("buttons.BACK")),1)])):(T(),N("div",xNe,[p("button",{onClick:C[5]||(C[5]=U=>S.$router.push("/profile/edit/sports"))},_(S.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),p("button",{onClick:C[6]||(C[6]=U=>S.$router.push("/"))},_(S.$t("common.HOME")),1)]))])):F("",!0)])}}}),mh=ae(WNe,[["__scopeId","data-v-aa4857fe"]]),Bo=e=>(ut("data-v-34b1686b"),e=e(),ct(),e),GNe={class:"about-text"},zNe=["innerHTML"],BNe=Bo(()=>p("i",{class:"fa fa-book fa-padding","aria-hidden":"true"},null,-1)),HNe=["href"],jNe=Bo(()=>p("i",{class:"fa fa-github fa-padding","aria-hidden":"true"},null,-1)),VNe={href:"https://github.com/SamR1/FitTrackee",target:"_blank",rel:"noopener noreferrer"},KNe=Bo(()=>p("i",{class:"fa fa-balance-scale fa-padding","aria-hidden":"true"},null,-1)),YNe=Bo(()=>p("a",{href:"https://choosealicense.com/licenses/agpl-3.0/",target:"_blank",rel:"noopener noreferrer"},"AGPLv3",-1)),qNe={key:0},XNe=Bo(()=>p("i",{class:"fa fa-envelope-o fa-padding","aria-hidden":"true"},null,-1)),ZNe=["href"],QNe={key:1},JNe=["href"],e3e={class:"about-instance"},t3e=["innerHTML"],n3e=Q({__name:"About",setup(e){const t=$e(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),r=k(()=>o()),a=k(()=>t.getters[H.GETTERS.LANGUAGE]),s=k(()=>i());function o(){const u={};return n.value.weather_provider==="visualcrossing"&&(u.name="Visual Crossing",u.url="https://www.visualcrossing.com"),u}function i(){let u="https://samr1.github.io/FitTrackee/";return a.value==="fr"&&(u+="fr/"),u}return(u,l)=>{const c=ue("i18n-t");return T(),N("div",GNe,[p("div",null,[p("p",{class:"error-message",innerHTML:u.$t("about.FITTRACKEE_DESCRIPTION")},null,8,zNe),p("p",null,[BNe,p("a",{class:"documentation-link",href:s.value,target:"_blank",rel:"noopener noreferrer"},_(St(u.$t("common.DOCUMENTATION"))),9,HNe)]),p("p",null,[jNe,p("a",VNe,_(u.$t("about.SOURCE_CODE")),1)]),p("p",null,[KNe,M(c,{keypath:"about.FITTRACKEE_LICENSE"},{default:fe(()=>[YNe]),_:1})]),n.value.admin_contact?(T(),N("div",qNe,[XNe,p("a",{href:`mailto:${n.value.admin_contact}`},_(u.$t("about.CONTACT_ADMIN")),9,ZNe)])):F("",!0),r.value&&r.value.name?(T(),N("div",QNe,[K(_(u.$t("about.WEATHER_DATA_FROM"))+" ",1),p("a",{href:r.value.url,target:"_blank",rel:"nofollow noopener"},_(r.value.name),9,JNe)])):F("",!0),n.value.about?(T(),N(Ie,{key:2},[p("p",e3e,_(u.$t("about.ABOUT_THIS_INSTANCE")),1),p("div",{innerHTML:h(ma)(h(vo)(n.value.about))},null,8,t3e)],64)):F("",!0)])])}}}),r3e=ae(n3e,[["__scopeId","data-v-34b1686b"]]),a3e={},s3e={id:"bike"},o3e=["src"];function i3e(e,t){return T(),N("div",s3e,[p("img",{class:"bike-img",src:"/img/bike.svg",alt:"mountain bike"},null,8,o3e)])}const zA=ae(a3e,[["render",i3e],["__scopeId","data-v-dc181e30"]]),u3e={id:"about",class:"view"},c3e={class:"container"},l3e={class:"container-sub"},d3e={class:"container-sub about-details"},f3e=Q({__name:"AboutView",setup(e){return(t,n)=>(T(),N("div",u3e,[p("div",c3e,[p("div",l3e,[M(zA)]),p("div",d3e,[M(r3e)])])]))}}),p3e=ae(f3e,[["__scopeId","data-v-ef9c7198"]]),m3e={id:"error"},E3e={class:"error-content"},h3e=Q({__name:"Error",props:{title:{},message:{},buttonText:{},path:{default:"/"}},setup(e){const t=e,{buttonText:n,title:r,message:a,path:s}=_e(t);return(o,i)=>(T(),N("div",m3e,[p("div",E3e,[p("h1",null,_(h(r)),1),p("p",null,_(h(a)),1),h(n)?(T(),N("button",{key:0,onClick:i[0]||(i[0]=u=>o.$router.push(h(s))),class:"upper"},_(h(n)),1)):F("",!0)])]))}}),_3e=ae(h3e,[["__scopeId","data-v-48ec856d"]]),I0=Q({__name:"NotFound",props:{target:{default:"PAGE"}},setup(e){const t=e,{target:n}=_e(t),r=ce(),a=ce(!1);gt(()=>s());function s(){r.value=setTimeout(()=>{a.value=!0},500)}return Rt(()=>{r.value&&clearTimeout(r.value)}),(o,i)=>a.value?(T(),te(_3e,{key:0,title:"404",message:o.$t(`error.NOT_FOUND.${h(n)}`),"button-text":o.$t("common.HOME")},null,8,["message","button-text"])):F("",!0)}}),T3e=e=>(ut("data-v-5eee0876"),e=e(),ct(),e),g3e={id:"admin",class:"view"},A3e={key:0,class:"container"},S3e=T3e(()=>p("div",{id:"bottom"},null,-1)),O3e=Q({__name:"AdminView",setup(e){const t=$e(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),r=k(()=>t.getters[H.GETTERS.APP_STATS]),a=k(()=>t.getters[Y.GETTERS.IS_ADMIN]),s=k(()=>t.getters[Y.GETTERS.USER_LOADING]);return It(()=>t.dispatch(H.ACTIONS.GET_APPLICATION_STATS)),(o,i)=>{const u=ue("router-view");return T(),N("div",g3e,[s.value?F("",!0):(T(),N("div",A3e,[a.value?(T(),te(u,{key:0,appConfig:n.value,appStatistics:r.value},null,8,["appConfig","appStatistics"])):(T(),te(I0,{key:1})),S3e]))])}}}),I3e=ae(O3e,[["__scopeId","data-v-5eee0876"]]),BA="/img/workouts/mountains.svg",v3e=p("div",{class:"map-attribution"},[p("span",{class:"map-attribution-text"},"©"),p("a",{class:"map-attribution-text",href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer"}," OpenStreetMap ")],-1),HA=Q({__name:"StaticMap",props:{workout:{},displayHover:{type:Boolean,default:!1}},setup(e){const t=e,{displayHover:n}=_e(t),r=`${wo()}workouts/map/${t.workout.map}`;return(a,s)=>(T(),N("div",{class:ge(["static-map",{"display-hover":h(n)}])},[h(n)?(T(),N("img",{key:0,src:r,alt:""})):(T(),N("div",{key:1,class:"bg-map-image",style:Yr({backgroundImage:`url(${r})`})},null,4)),v3e],2))}}),v0=e=>(ut("data-v-0bcae633"),e=e(),ct(),e),R3e={class:"timeline-workout"},b3e={class:"box"},N3e={class:"workout-user-date"},C3e={class:"workout-user"},y3e=["title"],D3e={key:0},P3e={key:1,class:"no-map"},w3e={class:"img"},L3e={class:"data"},$3e=v0(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),k3e={key:0},U3e={class:"data"},M3e=v0(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),x3e={key:0,class:"data elevation"},F3e=["alt"],W3e={class:"data-values"},G3e={key:1,class:"data altitude"},z3e=v0(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),B3e={class:"data-values"},H3e=Q({__name:"WorkoutCard",props:{user:{},useImperialUnits:{type:Boolean},workout:{default:()=>({})},sport:{default:()=>({})}},setup(e){const t=e,n=$e(),{user:r,workout:a,sport:s,useImperialUnits:o}=_e(t),i=k(()=>n.getters[H.GETTERS.LOCALE]);function u(c){return c.with_gpx&&c.min_alt!==null&&c.max_alt!==null}function l(c){return u(c)&&c.ascent!==null&&c.descent!==null}return(c,f)=>{var g;const d=ue("router-link"),m=ue("SportImage"),E=ue("Distance");return T(),N("div",R3e,[p("div",b3e,[p("div",N3e,[p("div",C3e,[M(Lo,{user:h(r)},null,8,["user"]),h(r).username?(T(),te(d,{key:0,class:"workout-user-name",to:{name:"User",params:{username:h(r).username}}},{default:fe(()=>[K(_(h(r).username),1)]),_:1},8,["to"])):F("",!0)]),h(a).id?(T(),te(d,{key:0,class:"workout-title",to:{name:"Workout",params:{workoutId:h(a).id}}},{default:fe(()=>[K(_(h(a).title),1)]),_:1},8,["to"])):F("",!0),h(a).workout_date&&h(r)?(T(),N("div",{key:1,class:"workout-date",title:h(xn)(h(a).workout_date,h(r).timezone,h(r).date_format)},_(h(U3)(new Date(h(a).workout_date),new Date,{addSuffix:!0,locale:i.value})),9,y3e)):F("",!0)]),p("div",{class:ge(["workout-map",{"no-cursor":!h(a)}]),onClick:f[0]||(f[0]=b=>h(a).id?c.$router.push({name:"Workout",params:{workoutId:h(a).id}}):null)},[h(a)?(T(),N("div",D3e,[h(a).with_gpx?(T(),te(HA,{key:0,workout:h(a)},null,8,["workout"])):(T(),N("div",P3e,_(c.$t("workouts.NO_MAP")),1))])):F("",!0)],2),p("div",{class:ge(["workout-data",{"without-elevation":!u(h(a))}]),onClick:f[1]||(f[1]=b=>h(a).id?c.$router.push({name:"Workout",params:{workoutId:h(a).id}}):null)},[p("div",w3e,[(g=h(s))!=null&&g.label?(T(),te(m,{key:0,"sport-label":h(s).label,color:h(s).color},null,8,["sport-label","color"])):F("",!0)]),p("div",L3e,[$3e,h(a)?(T(),N("span",k3e,_(h(a).moving),1)):F("",!0)]),p("div",U3e,[M3e,h(a).id?(T(),te(E,{key:0,distance:h(a).distance,digits:3,unitFrom:"km",useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0)]),u(h(a))?(T(),N("div",x3e,[p("img",{class:"mountains",src:BA,alt:c.$t("workouts.ELEVATION")},null,8,F3e),p("div",W3e,[h(a).id?(T(),te(E,{key:0,distance:h(a).min_alt,unitFrom:"m",displayUnit:!1,useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0),K("/ "),h(a).id?(T(),te(E,{key:1,distance:h(a).max_alt,unitFrom:"m",useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0)])])):F("",!0),l(h(a))?(T(),N("div",G3e,[z3e,p("div",B3e,[K(" +"),h(a).id?(T(),te(E,{key:0,distance:h(a).ascent,unitFrom:"m",displayUnit:!1,useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0),K("/- "),h(a).id?(T(),te(E,{key:1,distance:h(a).descent,unitFrom:"m",useImperialUnits:h(o)},null,8,["distance","useImperialUnits"])):F("",!0)])])):F("",!0)],2)])])}}}),Eh=ae(H3e,[["__scopeId","data-v-0bcae633"]]),j3e={},V3e={class:"no-workouts box"};function K3e(e,t){const n=ue("router-link");return T(),N("div",V3e,[p("div",null,[K(_(e.$t("workouts.NO_WORKOUTS"))+" ",1),M(n,{to:"/workouts/add"},{default:fe(()=>[K(_(e.$t("workouts.UPLOAD_FIRST_WORKOUT")),1)]),_:1})])])}const R0=ae(j3e,[["render",K3e],["__scopeId","data-v-b0c91cc6"]]),Gr={ligthMode:{text:"#666",line:"rgba(0, 0, 0, 0.1)"},darkMode:{text:"#a1a1a1",line:"#3f3f3f"}},Y3e=(e,t,n,r=!1)=>{const a={speed:{label:t("workouts.SPEED"),backgroundColor:["transparent"],borderColor:[r?"#5f5c97":"#8884d8"],borderWidth:2,data:[],yAxisID:"ySpeed"},elevation:{label:t("workouts.ELEVATION"),backgroundColor:[r?"#303030":"#e5e5e5"],borderColor:[r?"#222222":"#cccccc"],borderWidth:1,fill:!0,data:[],yAxisID:"yElevation"}},s=[],o=[],i=[];return e.map(u=>{s.push(wi("km",u.distance,n)),o.push(u.duration),a.speed.data.push(wi("km",u.speed,n)),u.elevation!==void 0&&a.elevation.data.push(wi("m",u.elevation,n)),i.push({latitude:u.latitude,longitude:u.longitude})}),{distance_labels:s,duration_labels:o,datasets:a,coordinates:i}},q3e=e=>{const t=e.length;if(t===0)return{};const n={};return e.map(r=>{n[r.sport_id]||(n[r.sport_id]={count:0,percentage:0}),n[r.sport_id].count+=1,n[r.sport_id].percentage=n[r.sport_id].count/t}),n},bo={order:"desc",order_by:"workout_date"},X3e={id:"timeline"},Z3e={class:"section-title"},Q3e={key:0},J3e={key:1},eCe={key:1,class:"more-workouts"},gi=5,tCe=Q({__name:"Timeline",props:{sports:{},user:{}},setup(e){const t=e,n=$e(),{sports:r,user:a}=_e(t),s=ce(1),o=t.user.nb_workouts>=gi?gi:t.user.nb_workouts;It(()=>l());const i=k(()=>n.getters[Te.GETTERS.TIMELINE_WORKOUTS]),u=k(()=>i.value.length>0?i.value[i.value.length-1].previous_workout!==null:!1);function l(){n.dispatch(Te.ACTIONS.GET_TIMELINE_WORKOUTS,{page:s.value,per_page:gi,...bo})}function c(){s.value+=1,n.dispatch(Te.ACTIONS.GET_MORE_TIMELINE_WORKOUTS,{page:s.value,per_page:gi,...bo})}return(f,d)=>(T(),N("div",X3e,[p("div",Z3e,_(f.$t("workouts.LATEST_WORKOUTS")),1),h(a).nb_workouts>0&&i.value.length===0?(T(),N("div",Q3e,[(T(!0),N(Ie,null,xe([...Array(h(o)).keys()],m=>(T(),te(Eh,{user:h(a),useImperialUnits:h(a).imperial_units,key:m},null,8,["user","useImperialUnits"]))),128))])):(T(),N("div",J3e,[(T(!0),N(Ie,null,xe(i.value,m=>(T(),te(Eh,{workout:m,sport:i.value.length>0?h(r).filter(E=>E.id===m.sport_id)[0]:null,user:h(a),useImperialUnits:h(a).imperial_units,key:m.id},null,8,["workout","sport","user","useImperialUnits"]))),128)),i.value.length===0?(T(),te(R0,{key:0})):F("",!0),u.value?(T(),N("div",eCe,[p("button",{onClick:c},_(f.$t("workouts.LOAD_MORE_WORKOUT")),1)])):F("",!0)]))]))}}),nCe=ae(tCe,[["__scopeId","data-v-e0964959"]]),rCe=["title"],jA=Q({__name:"CalendarWorkout",props:{displayHARecord:{type:Boolean},workout:{},sportLabel:{},sportColor:{}},setup(e){const t=e,{displayHARecord:n,workout:r,sportLabel:a,sportColor:s}=_e(t);return(o,i)=>{const u=ue("SportImage");return T(),N("div",{class:"calendar-workout",onClick:i[0]||(i[0]=l=>o.$router.push({name:"Workout",params:{workoutId:h(r).id}}))},[M(u,{"sport-label":h(a),title:h(r).title,color:h(s)},null,8,["sport-label","title","color"]),p("sup",null,[h(r).records.length>0?(T(),N("i",{key:0,class:"fa fa-trophy custom-fa-small","aria-hidden":"true",title:h(r).records.filter(l=>h(n)?!0:l.record_type!=="HA").map(l=>` ${o.$t(`workouts.RECORD_${l.record_type}`)}`)[0]},null,8,rCe)):F("",!0)])])}}}),aCe={class:"donut-chart"},sCe={height:"34",width:"34",viewBox:"0 0 34 34"},oCe=["stroke","stroke-dashoffset","transform"],hh=16,_h=16,Th=14,iCe=Q({__name:"DonutChart",props:{colors:{},datasets:{}},setup(e){const t=e,{colors:n,datasets:r}=_e(t);let a=-90;const s=2*Math.PI*Th;function o(u,l){return l-u*l}function i(u,l){const c=`rotate(${a}, ${hh}, ${_h})`;return a=l*360+a,c}return(u,l)=>(T(),N("div",aCe,[(T(),N("svg",sCe,[(T(!0),N(Ie,null,xe(Object.entries(h(r)),(c,f)=>(T(),N("g",{key:f},[p("circle",{cx:hh,cy:_h,r:Th,fill:"transparent",stroke:h(n)[+c[0]],"stroke-dashoffset":o(c[1].percentage,s),"stroke-dasharray":s,"stroke-width":"3","stroke-opacity":"0.8",transform:i(f,c[1].percentage)},null,8,oCe)]))),128))]))]))}}),uCe={class:"calendar-workouts-chart"},cCe={class:"workouts-count"},lCe={key:0,class:"workouts-pane"},dCe={class:"more-workouts"},fCe=Q({__name:"CalendarWorkoutsChart",props:{colors:{},datasets:{},sports:{},workouts:{},displayHARecord:{type:Boolean}},setup(e){const t=e,{colors:n,datasets:r,sports:a,workouts:s}=_e(t),o=ce(!0);function i(u){u.stopPropagation(),o.value=!o.value}return(u,l)=>{const c=GO("click-outside");return T(),N("div",uCe,[p("div",{class:"workouts-chart",onClick:i},[p("div",cCe,_(h(s).length),1),M(iCe,{datasets:h(r),colors:h(n)},null,8,["datasets","colors"])]),o.value?F("",!0):(T(),N("div",lCe,[Ke((T(),N("div",dCe,[p("i",{class:"fa fa-times calendar-more","aria-hidden":"true",onClick:i}),(T(!0),N(Ie,null,xe(h(s),(f,d)=>(T(),te(jA,{key:d,displayHARecord:u.displayHARecord,workout:f,sportLabel:h(_0)(f,h(a)),sportColor:h(T0)(f,h(a))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])),[[c,i]])]))])}}}),gh=ae(fCe,[["__scopeId","data-v-bf05bb20"]]),pCe={class:"calendar-workouts"},mCe={class:"desktop-display"},ECe={key:0,class:"workouts-display"},hCe={key:1,class:"donut-display"},_Ce={class:"mobile-display"},TCe={key:0,class:"donut-display"},Ah=6,gCe=Q({__name:"CalendarWorkouts",props:{displayHARecord:{type:Boolean},workouts:{},sports:{}},setup(e){const t=e,{displayHARecord:n,workouts:r,sports:a}=_e(t),s=k(()=>q3e(t.workouts)),o=k(()=>fAe(t.sports));return(i,u)=>(T(),N("div",pCe,[p("div",mCe,[h(r).length<=Ah?(T(),N("div",ECe,[(T(!0),N(Ie,null,xe(h(r).slice(0,Ah),(l,c)=>(T(),te(jA,{key:c,displayHARecord:h(n),workout:l,sportLabel:h(_0)(l,h(a)),sportColor:h(T0)(l,h(a))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])):(T(),N("div",hCe,[M(gh,{workouts:h(r),sports:h(a),datasets:s.value,colors:o.value,displayHARecord:h(n)},null,8,["workouts","sports","datasets","colors","displayHARecord"])]))]),p("div",_Ce,[h(r).length>0?(T(),N("div",TCe,[M(gh,{workouts:h(r),sports:h(a),datasets:s.value,colors:o.value,displayHARecord:h(n)},null,8,["workouts","sports","datasets","colors","displayHARecord"])])):F("",!0)])]))}}),ACe={class:"calendar-cells"},SCe={class:"calendar-cell-day"},OCe=Q({__name:"CalendarCells",props:{currentDay:{},displayHARecord:{type:Boolean},endDate:{},sports:{},startDate:{},timezone:{},weekStartingMonday:{type:Boolean},workouts:{}},setup(e){const t=e,{currentDay:n,displayHARecord:r,endDate:a,sports:s,startDate:o,timezone:i,weekStartingMonday:u,workouts:l}=_e(t),c=ce([]);gt(()=>f());function f(){c.value=[];let E=o.value;for(;E<=a.value;){const g=[];for(let b=0;b<7;b++)g.push(E),E=$o(E,1);c.value.push(g)}}function d(E){return u.value?[5,6].includes(E):[0,6].includes(E)}function m(E,g){return g?g.filter(b=>oT(yc(b.workout_date,i.value),E)).reverse():[]}return Fe(()=>t.currentDay,()=>f()),(E,g)=>(T(),N("div",ACe,[(T(!0),N(Ie,null,xe(c.value,(b,v)=>(T(),N("div",{class:"calendar-row",key:v},[(T(!0),N(Ie,null,xe(b,(R,A)=>(T(),N("div",{class:ge(["calendar-cell",{"disabled-cell":!h(x3)(R,h(n)),"week-end":d(A),today:h(F3)(R)}]),key:A},[M(gCe,{workouts:m(R,h(l)),sports:h(s),displayHARecord:h(r)},null,8,["workouts","sports","displayHARecord"]),p("div",SCe,_(h(ln)(R,"d")),1)],2))),128))]))),128))]))}}),ICe={class:"calendar-days"},vCe=Q({__name:"CalendarDays",props:{startDate:{},localeOptions:{}},setup(e){const t=e,n=[];for(let r=0;r<7;r++)n.push($o(t.startDate,r));return(r,a)=>(T(),N("div",ICe,[(T(),N(Ie,null,xe(n,(s,o)=>p("div",{class:"calendar-day",key:o},_(h(ln)(s,"EEE",{locale:r.localeOptions})),1)),64))]))}}),RCe={class:"calendar-header"},bCe=p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1),NCe=[bCe],CCe={class:"calendar-month"},yCe=p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1),DCe=[yCe],PCe=Q({__name:"CalendarHeader",props:{day:{},localeOptions:{}},emits:["displayNextMonth","displayPreviousMonth"],setup(e,{emit:t}){const n=e,r=t,{day:a,localeOptions:s}=_e(n);return(o,i)=>(T(),N("div",RCe,[p("div",{class:"calendar-arrow calendar-arrow-left",onClick:i[0]||(i[0]=u=>r("displayPreviousMonth"))},NCe),p("div",CCe,[p("span",null,_(h(ln)(h(a),"MMM yyyy",{locale:h(s)})),1)]),p("div",{class:"calendar-arrow calendar-arrow-right",onClick:i[1]||(i[1]=u=>r("displayNextMonth"))},DCe)]))}}),wCe={id:"user-calendar"},LCe={class:"calendar-card box"},Sh="yyyy-MM-dd",$Ce=Q({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,n=$e(),{sports:r,user:a}=_e(t),s=ce(new Date),o=ce(eh(s.value,a.value.weekm)),i=k(()=>n.getters[Te.GETTERS.CALENDAR_WORKOUTS]),u=k(()=>n.getters[H.GETTERS.LOCALE]);It(()=>l());function l(){o.value=eh(s.value,t.user.weekm);const d={from:ln(o.value.start,Sh),to:ln(o.value.end,Sh),page:1,per_page:100,...bo};n.dispatch(Te.ACTIONS.GET_CALENDAR_WORKOUTS,d)}function c(){s.value=Za(s.value,1),l()}function f(){s.value=uo(s.value,1),l()}return(d,m)=>(T(),N("div",wCe,[p("div",LCe,[M(PCe,{day:s.value,"locale-options":u.value,onDisplayNextMonth:c,onDisplayPreviousMonth:f},null,8,["day","locale-options"]),M(vCe,{"start-date":o.value.start,"locale-options":u.value},null,8,["start-date","locale-options"]),M(OCe,{currentDay:s.value,displayHARecord:h(a).display_ascent,"end-date":o.value.end,sports:h(r),"start-date":o.value.start,timezone:h(a).timezone,workouts:i.value,weekStartingMonday:h(a).weekm},null,8,["currentDay","displayHARecord","end-date","sports","start-date","timezone","workouts","weekStartingMonday"])])]))}}),VA={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},kCe={ariaLabel:{type:String},ariaDescribedby:{type:String}},UCe={type:{type:String,required:!0},...VA,...kCe},MCe=M_[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function wa(e){return Vu(e)?Je(e):e}function xCe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return Vu(t)?new Proxy(e,{}):e}function FCe(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function KA(e,t){e.labels=t}function YA(e,t,n){const r=[];e.datasets=t.map(a=>{const s=e.datasets.find(o=>o[n]===a[n]);return!s||!a.data||r.includes(s)?{...a}:(r.push(s),Object.assign(s,a),s)})}function WCe(e,t){const n={labels:[],datasets:[]};return KA(n,e.labels),YA(n,e.datasets,t),n}const GCe=Q({props:UCe,setup(e,t){let{expose:n,slots:r}=t;const a=ce(null),s=Ku(null);n({chart:s});const o=()=>{if(!a.value)return;const{type:l,data:c,options:f,plugins:d,datasetIdKey:m}=e,E=WCe(c,m),g=xCe(E,c);s.value=new Yd(a.value,{type:l,data:g,options:{...f},plugins:d})},i=()=>{const l=Je(s.value);l&&(l.destroy(),s.value=null)},u=l=>{l.update(e.updateMode)};return gt(o),Co(i),Fe([()=>e.options,()=>e.data],(l,c)=>{let[f,d]=l,[m,E]=c;const g=Je(s.value);if(!g)return;let b=!1;if(f){const v=wa(f),R=wa(m);v&&v!==R&&(FCe(g,v),b=!0)}if(d){const v=wa(d.labels),R=wa(E.labels),A=wa(d.datasets),S=wa(E.datasets);v!==R&&(KA(g.config.data,v),b=!0),A&&A!==S&&(YA(g.config.data,A,e.datasetIdKey),b=!0)}b&&gn(()=>{u(g)})},{deep:!0}),()=>An("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:a},[An("p",{},[r.default?r.default():""])])}});function qA(e,t){return Yd.register(t),Q({props:VA,setup(n,r){let{expose:a}=r;const s=Ku(null),o=i=>{s.value=i==null?void 0:i.chart};return a({chart:s}),()=>An(GCe,MCe({ref:o},{type:e,...n}))}})}const zCe=qA("bar",Mh),BCe=qA("line",xh),HCe=(e,t=!1)=>{let n="0";t&&(n=String(Math.floor(e/86400)),e%=86400);const r=String(Math.floor(e/3600)).padStart(2,"0");e%=3600;const a=String(Math.floor(e/60)).padStart(2,"0"),s=String(e%60).padStart(2,"0");return t?`${n==="0"?"":`${n}d `}${r==="00"?"":`${r}h `}${a}m ${s}s`:`${r==="00"?"":`${r}:`}${a}:${s}`},Us=(e,t,n,r=!0,a="km")=>{const s=n?$n[a].defaultTarget:a;switch(e){case"average_speed":return`${t.toFixed(2)} ${s}/h`;case"total_duration":return HCe(t,r);case"total_distance":case"total_ascent":case"total_descent":return`${t.toFixed(2)} ${s}`;default:return t.toString()}},jCe=Q({__name:"Chart",props:{datasets:{},labels:{},displayedData:{},displayedSportIds:{},fullStats:{type:Boolean},useImperialUnits:{type:Boolean}},setup(e){const t=e,{datasets:n,labels:r,displayedData:a,displayedSportIds:s,fullStats:o,useImperialUnits:i}=_e(t),u=yf(),{t:l}=jt(),c=k(()=>u.getters[H.GETTERS.DARK_MODE]),f=k(()=>Cf(c.value)),d=k(()=>({color:f.value?Gr.darkMode.line:Gr.ligthMode.line})),m=k(()=>({color:f.value?Gr.darkMode.text:Gr.ligthMode.text})),E=k(()=>({labels:r.value,datasets:JSON.parse(JSON.stringify(n.value))})),g=k(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:o.value?40:22}},scales:{x:{stacked:!0,grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{...m.value}},y:{stacked:a.value!=="average_speed",grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{maxTicksLimit:6,callback:function(A){return Us(a.value,+A,i.value,!1,R(a.value))},...m.value},afterFit:function(A){A.width=o.value?90:60}}},plugins:{datalabels:{anchor:"end",align:"end",color:function(A){return a.value==="average_speed"&&A.dataset.backgroundColor?A.dataset.backgroundColor[0]:m.value.color},rotation:function(A){return o.value&&A.chart.chartArea.width<580?310:0},display:function(A){return o.value&&A.chart.chartArea.width<300?!1:a.value==="average_speed"?s.value.length==1?"auto":!1:!0},formatter:function(A,S){if(a.value==="average_speed")return Us(a.value,A,i.value,!1);{const C=S.chart.data.datasets.map(L=>L.data[S.dataIndex]).reduce((L,$)=>v(L,$),0);return S.datasetIndex===s.value.length-1&&C>0?Us(a.value,C,i.value,!1,R(a.value)):null}}},legend:{display:!1},tooltip:{interaction:{intersect:!0,mode:"index",position:a.value==="average_speed"?"nearest":"average"},filter:function(A){return A.formattedValue!=="0"},callbacks:{label:function(A){let S=l(`sports.${A.dataset.label}.LABEL`)||"";return S&&(S+=": "),A.parsed.y!==null&&(S+=Us(a.value,A.parsed.y,i.value,!0,R(a.value))),S},footer:function(A){if(a.value==="average_speed")return"";let S=0;return A.map(C=>{S+=C.parsed.y}),`${l("common.TOTAL")}: `+Us(a.value,S,i.value,!0,R(a.value))}}}}}));function b(A){return isNaN(A)?0:+A}function v(A,S){return b(A)+b(S)}function R(A){return["total_ascent","total_descent"].includes(A)?"m":"km"}return(A,S)=>(T(),N("div",{class:ge(["bar-chart",{minimal:!h(o)}])},[M(h(zCe),{data:E.value,options:g.value},null,8,["data","options"])],2))}}),VCe=ae(jCe,[["__scopeId","data-v-d506f845"]]),{locale:Oh}=ga.global,KCe={week:{api:"yyyy-MM-dd",chart:"MM/dd/yyyy"},month:{api:"yyyy-MM",chart:"MM/yyyy"},year:{api:"yyyy",chart:"yyyy"}},YCe=["average_speed","nb_workouts","total_duration","total_distance","total_ascent","total_descent"],qCe=(e,t)=>{const n=[];for(let r=bSe(e.duration,e.start,t);r<=e.end;r=NSe(e.duration,r))n.push(r);return n},La=(e,t,n=!1)=>{const r={label:e,backgroundColor:[t],data:[]};return n?(r.type="line",r.borderColor=[t],r.spanGaps=!0):r.type="bar",r},XCe=e=>{const t={average_speed:[],nb_workouts:[],total_distance:[],total_duration:[],total_ascent:[],total_descent:[]};return e.map(n=>{const r=n.color?n.color:h0[n.label];t.average_speed.push(La(n.label,r,!0)),t.nb_workouts.push(La(n.label,r)),t.total_distance.push(La(n.label,r)),t.total_duration.push(La(n.label,r)),t.total_ascent.push(La(n.label,r)),t.total_descent.push(La(n.label,r))}),t},ZCe=(e,t,n)=>{switch(e){case"average_speed":case"total_distance":case"total_ascent":case"total_descent":return wi(["average_speed","total_distance"].includes(e)?"km":"m",t,n);default:case"nb_workouts":case"total_duration":return t}},QCe=(e,t,n,r,a,s,o)=>{const i=qCe(e,t),u=KCe[e.duration],l=n.filter(m=>r.includes(m.id)),c=[],f=XCe(l),d={};return l.map(m=>d[m.label]=m.id),i.map(m=>{const E=ln(m,u.api),g=ln(m,e.duration==="week"?Sa(o,Oh.value):u.chart,{locale:Mo[Oh.value]});c.push(g),YCe.map(b=>{f[b].map(v=>{v.data.push(E in a&&d[v.label]in a[E]?ZCe(b,a[E][d[v.label]][b],s):b==="average_speed"?null:0)})})}),{labels:c,datasets:f}},JCe=(e,t,n)=>{const r=n?1:0,a=t==="year"?Lf(Kl(e,9)):t==="week"?lc(uo(e,2),{weekStartsOn:r}):Uo(uo(e,11)),s=t==="year"?iT(e):t==="week"?$f(e,{weekStartsOn:r}):ko(e);return{duration:t,end:s,start:a}},eye=(e,t,n)=>{const{duration:r,start:a,end:s}=e,o=n?1:0;return{duration:r,end:r==="year"?iT(t?Kl(s,1):Qi(s,1)):r==="week"?$f(t?nm(s,1):Vl(s,1),{weekStartsOn:o}):ko(t?uo(s,1):Za(s,1)),start:r==="year"?Lf(t?Kl(a,1):Qi(a,1)):r==="week"?lc(t?nm(a,1):Vl(a,1),{weekStartsOn:o}):Uo(t?uo(a,1):Za(a,1))}},tye={class:"stats-chart"},nye={key:0},rye={key:1},aye={class:"chart-radio"},sye=["checked","disabled"],oye=["checked","disabled"],iye=["checked","disabled"],uye={key:0},cye=["checked","disabled"],lye={key:1},dye=["checked","disabled"],fye={key:2},pye=["checked","disabled"],mye=Q({__name:"index",props:{sports:{},user:{},chartParams:{},displayedSportIds:{default:()=>[]},fullStats:{type:Boolean,default:!1},hideChartIfNoData:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},setup(e){const t=e,{sports:n,user:r,chartParams:a,displayedSportIds:s,fullStats:o,hideChartIfNoData:i,isDisabled:u}=_e(t),l=$e(),c=ce("total_distance"),f=k(()=>l.getters[Kr.GETTERS.USER_STATS]),d=k(()=>QCe(a.value,r.value.weekm,n.value,s.value,f.value,r.value.imperial_units,r.value.date_format)),m=k(()=>d.value.datasets[c.value]),E=k(()=>d.value.labels),g=k(()=>Object.keys(f.value).length===0);It(()=>b(R(a.value,r.value)));function b(A){l.dispatch(Kr.ACTIONS.GET_USER_STATS,{username:r.value.username,filterType:"by_time",params:A})}function v(A){c.value=A.target.name}function R(A,S){return{from:ln(A.start,"yyyy-MM-dd"),to:ln(A.end,"yyyy-MM-dd"),time:A.duration==="week"?`week${S.weekm?"m":""}`:A.duration}}return Fe(()=>a.value,async A=>{b(R(A,r.value))}),(A,S)=>(T(),N("div",tye,[h(i)&&g.value?(T(),N("div",nye,_(A.$t("workouts.NO_WORKOUTS")),1)):(T(),N("div",rye,[p("div",aye,[p("label",null,[p("input",{type:"radio",name:"total_distance",checked:c.value==="total_distance",disabled:h(u),onClick:v},null,8,sye),K(" "+_(A.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"total_duration",checked:c.value==="total_duration",disabled:h(u),onClick:v},null,8,oye),K(" "+_(A.$t("workouts.DURATION")),1)]),p("label",null,[p("input",{type:"radio",name:"nb_workouts",checked:c.value==="nb_workouts",disabled:h(u),onClick:v},null,8,iye),K(" "+_(A.$t("workouts.WORKOUT",2)),1)]),h(o)?(T(),N("label",uye,[p("input",{type:"radio",name:"average_speed",checked:c.value==="average_speed",disabled:h(u),onClick:v},null,8,cye),K(" "+_(A.$t("workouts.AVERAGE_SPEED")),1)])):F("",!0),h(o)?(T(),N("label",lye,[p("input",{type:"radio",name:"total_ascent",checked:c.value==="total_ascent",disabled:h(u),onClick:v},null,8,dye),K(" "+_(A.$t("workouts.ASCENT")),1)])):F("",!0),h(o)?(T(),N("label",fye,[p("input",{type:"radio",name:"total_descent",checked:c.value==="total_descent",disabled:h(u),onClick:v},null,8,pye),K(" "+_(A.$t("workouts.DESCENT")),1)])):F("",!0)]),E.value.length>0?(T(),te(VCe,{key:0,datasets:m.value,labels:E.value,displayedData:c.value,displayedSportIds:h(s),fullStats:h(o),useImperialUnits:h(r).imperial_units},null,8,["datasets","labels","displayedData","displayedSportIds","fullStats","useImperialUnits"])):F("",!0)]))]))}}),XA=ae(mye,[["__scopeId","data-v-b8d7f5c9"]]),Eye={class:"user-month-stats"},hye=Q({__name:"UserMonthStats",props:{sports:{},user:{}},setup(e){const t=e,{sports:n,user:r}=_e(t),a=new Date,s={duration:"week",start:Uo(a),end:ko(a)},o=n.value.map(i=>i.id);return(i,u)=>{const l=ue("Card");return T(),N("div",Eye,[M(l,null,{title:fe(()=>[K(_(i.$t("dashboard.THIS_MONTH")),1)]),content:fe(()=>[M(XA,{sports:h(n),user:h(r),"chart-params":s,"displayed-sport-ids":h(o),"hide-chart-if-no-data":!0},null,8,["sports","user","displayed-sport-ids"])]),_:1})])}}}),_ye=ae(hye,[["__scopeId","data-v-8f59a282"]]),{locale:Tye}=ga.global,gye=(e,t,n,r)=>{const a="km",s=n?$n[a].defaultTarget:a,o="m",i=n?$n[o].defaultTarget:o;let u;switch(e.record_type){case"AS":case"MS":u=`${sn(+e.value,a,s,2)} ${s}/h`;break;case"FD":u=`${sn(+e.value,a,s,3)} ${s}`;break;case"HA":u=`${sn(+e.value,o,i,2)} ${i}`;break;case"LD":u=e.value;break;default:throw new Error(`Invalid record type, expected: "AS", "FD", "HA", "LD", "MD", got: "${e.record_type}"`)}return{id:e.id,record_type:e.record_type,sport_id:e.sport_id,value:u,user:e.user,workout_date:xn(e.workout_date,t,r,!1),workout_id:e.workout_id}},Aye=(e,t)=>{const n=e.label.toLowerCase(),r=t.label.toLowerCase();return n>r?1:n(s=Sa(s,Tye.value),e.filter(o=>a?!0:o.record_type!=="HA").reduce((o,i)=>{const u=t.find(l=>l.id===i.sport_id);return u&&u.label&&(o[u.translatedLabel]===void 0&&(o[u.translatedLabel]={label:u.label,color:u.color,records:[]}),o[u.translatedLabel].records.push(gye(i,n,r,s))),o},{})),Oye={class:"records-card"},Iye={class:"record-type"},vye={class:"record-value"},Rye={class:"record-date"},bye=Q({__name:"RecordsCard",props:{records:{},sportTranslatedLabel:{}},setup(e){const t=e,{records:n,sportTranslatedLabel:r}=_e(t),{t:a}=jt();function s(o){const i=[];return o.map(u=>{i.push({...u,label:a(`workouts.RECORD_${u.record_type}`)})}),i.sort(Aye)}return(o,i)=>{const u=ue("SportImage"),l=ue("router-link"),c=ue("Card");return T(),N("div",Oye,[M(c,null,{title:fe(()=>[M(u,{"sport-label":h(n).label,color:h(n).color},null,8,["sport-label","color"]),K(" "+_(h(r)),1)]),content:fe(()=>[(T(!0),N(Ie,null,xe(s(h(n).records),f=>(T(),N("div",{class:"record",key:f.id},[p("span",Iye,_(f.label),1),p("span",vye,_(f.value),1),p("span",Rye,[M(l,{to:{name:"Workout",params:{workoutId:f.workout_id}}},{default:fe(()=>[p("time",null,_(f.workout_date),1)]),_:2},1032,["to"])])]))),128))]),_:1})])}}}),Nye=ae(bye,[["__scopeId","data-v-64523a87"]]),Cye=e=>(ut("data-v-fff33919"),e=e(),ct(),e),yye={class:"user-records-section"},Dye={class:"section-title"},Pye=Cye(()=>p("i",{class:"fa fa-trophy custom-fa-small","aria-hidden":"true"},null,-1)),wye={class:"user-records"},Lye={key:0,class:"no-records"},$ye=Q({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,{t:n}=jt(),r=k(()=>Sye(t.user.records,Jr(t.sports,n),t.user.timezone,t.user.imperial_units,t.user.display_ascent,t.user.date_format));return(a,s)=>(T(),N("div",yye,[p("div",Dye,[Pye,K(" "+_(a.$t("workouts.RECORD",2)),1)]),p("div",wye,[Object.keys(r.value).length===0?(T(),N("div",Lye,_(a.$t("workouts.NO_RECORDS")),1)):F("",!0),(T(!0),N(Ie,null,xe(Object.keys(r.value).sort(),o=>(T(),te(Nye,{sportTranslatedLabel:o,records:r.value[o],key:o,useImperialUnits:a.user.imperial_units},null,8,["sportTranslatedLabel","records","useImperialUnits"]))),128))])]))}}),kye=ae($ye,[["__scopeId","data-v-fff33919"]]),Uye={id:"user-stats"},gl="km",Al="m",Mye=Q({__name:"index",props:{user:{}},setup(e){const t=e,{t:n}=jt(),{user:r}=_e(t),a=k(()=>t.user.total_duration),s=k(()=>c(a)),o=r.value.imperial_units?$n[gl].defaultTarget:gl,i=k(()=>r.value.imperial_units?sn(r.value.total_distance,gl,o,2):parseFloat(r.value.total_distance.toFixed(2))),u=r.value.imperial_units?$n[Al].defaultTarget:Al,l=k(()=>r.value.imperial_units?sn(r.value.total_ascent,Al,u,2):parseFloat(r.value.total_ascent.toFixed(2)));function c(f){const d=f.value.match(/day/g)?f.value.split(", ")[1]:f.value;return{days:f.value.match(/day/g)?`${f.value.split(" ")[0]} ${f.value.match(/days/g)?n("common.DAY",2):n("common.DAY",1)}`:`0 ${n("common.DAY",2)},`,duration:`${d.split(":")[0]}h ${d.split(":")[1]}min`}}return(f,d)=>(T(),N("div",Uye,[M(pr,{icon:"calendar",value:h(r).nb_workouts,text:f.$t("workouts.WORKOUT",h(r).nb_workouts)},null,8,["value","text"]),M(pr,{icon:"road",value:i.value,text:h(o)==="mi"?"miles":h(o)},null,8,["value","text"]),h(r).display_ascent?(T(),te(pr,{key:0,icon:"location-arrow",value:l.value,text:h(u)==="ft"?"feet":h(u)},null,8,["value","text"])):F("",!0),M(pr,{icon:"clock-o",value:s.value.days,text:s.value.duration},null,8,["value","text"]),h(r).display_ascent?F("",!0):(T(),te(pr,{key:1,icon:"tags",value:h(r).nb_sports,text:f.$t("workouts.SPORT",h(r).nb_sports)},null,8,["value","text"]))]))}}),xye={},Fye={class:"privacy-policy-message"};function Wye(e,t){const n=ue("router-link"),r=ue("i18n-t");return T(),N("div",Fye,[p("span",null,[M(r,{keypath:"user.LAST_PRIVACY_POLICY_TO_VALIDATE"},{default:fe(()=>[M(n,{to:"/profile/edit/privacy-policy",class:"policy-link"},{default:fe(()=>[K(_(e.$t("user.REVIEW")),1)]),_:1})]),_:1})])])}const Gye=ae(xye,[["render",Wye],["__scopeId","data-v-1b250692"]]),Ho=e=>(ut("data-v-8f5da609"),e=e(),ct(),e),zye={key:0,id:"dashboard",class:"view"},Bye={class:"container mobile-menu"},Hye={class:"box"},jye=Ho(()=>p("i",{class:"fa fa-calendar","aria-hidden":"true"},null,-1)),Vye=[jye],Kye=Ho(()=>p("i",{class:"fa fa-bar-chart","aria-hidden":"true"},null,-1)),Yye=[Kye],qye=Ho(()=>p("i",{class:"fa fa-map-o","aria-hidden":"true"},null,-1)),Xye=[qye],Zye=Ho(()=>p("i",{class:"fa fa-trophy","aria-hidden":"true"},null,-1)),Qye=[Zye],Jye={key:0,class:"container privacy-policy-message"},e4e={class:"container"},t4e={class:"container dashboard-container"},n4e={class:"left-container dashboard-sub-container"},r4e={class:"right-container dashboard-sub-container"},a4e=Ho(()=>p("div",{id:"bottom"},null,-1)),s4e={key:1,class:"app-loading"},o4e=Q({__name:"Dashboard",setup(e){const t=$e(),n=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),r=k(()=>t.getters[$t.GETTERS.SPORTS]),a=ce("calendar");It(()=>t.dispatch(Y.ACTIONS.GET_USER_PROFILE));function s(o){a.value=o}return(o,i)=>{const u=ue("Loader");return n.value.username&&r.value.length>0?(T(),N("div",zye,[p("div",Bye,[p("div",Hye,[p("div",{class:ge(["mobile-menu-item",{"is-selected":a.value==="calendar"}]),onClick:i[0]||(i[0]=l=>s("calendar"))},Vye,2),p("div",{class:ge(["mobile-menu-item",{"is-selected":a.value==="chart"}]),onClick:i[1]||(i[1]=l=>s("chart"))},Yye,2),p("div",{class:ge(["mobile-menu-item",{"is-selected":a.value==="timeline"}]),onClick:i[2]||(i[2]=l=>s("timeline"))},Xye,2),p("div",{class:ge(["mobile-menu-item",{"is-selected":a.value==="records"}]),onClick:i[3]||(i[3]=l=>s("records"))},Qye,2)])]),n.value.accepted_privacy_policy?F("",!0):(T(),N("div",Jye,[M(Gye)])),p("div",e4e,[M(Mye,{user:n.value},null,8,["user"])]),p("div",t4e,[p("div",n4e,[M(_ye,{sports:r.value,user:n.value,class:ge({"is-hidden":a.value!=="chart"})},null,8,["sports","user","class"]),M(kye,{sports:r.value,user:n.value,class:ge({"is-hidden":a.value!=="records"})},null,8,["sports","user","class"])]),p("div",r4e,[M($Ce,{sports:r.value,user:n.value,class:ge({"is-hidden":a.value!=="calendar"})},null,8,["sports","user","class"]),M(nCe,{sports:r.value,user:n.value,class:ge({"is-hidden":a.value!=="timeline"})},null,8,["sports","user","class"])])]),a4e])):(T(),N("div",s4e,[M(u)]))}}}),i4e=ae(o4e,[["__scopeId","data-v-8f5da609"]]),u4e={class:"not-found view"},c4e=Q({__name:"NotFoundView",setup(e){return(t,n)=>(T(),N("div",u4e,[M(I0)]))}}),l4e={id:"privacy-policy",class:"view"},d4e={class:"container"},f4e=p("div",{id:"bottom"},null,-1),p4e=Q({__name:"PrivacyPolicyView",setup(e){const t=$e();return It(()=>{t.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY)}),(n,r)=>(T(),N("div",l4e,[p("div",d4e,[M(GA)]),f4e]))}}),ZA=e=>(ut("data-v-174c91c4"),e=e(),ct(),e),m4e={class:"chart-menu"},E4e=["disabled"],h4e=ZA(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),_4e=[h4e],T4e={class:"time-frames custom-checkboxes-group"},g4e={class:"time-frames-checkboxes custom-checkboxes"},A4e=["id","name","checked","onInput","disabled"],S4e=["id","tabindex","onKeydown"],O4e=["disabled"],I4e=ZA(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),v4e=[I4e],R4e=Q({__name:"StatsMenu",props:{isDisabled:{type:Boolean}},emits:["arrowClick","timeFrameUpdate"],setup(e,{emit:t}){const n=e,{isDisabled:r}=_e(n),a=t,s=ce("month"),o=["week","month","year"];function i(u){s.value=u,a("timeFrameUpdate",u)}return gt(()=>{if(!r.value){const u=document.getElementById("frame-month");u&&u.focus()}}),(u,l)=>(T(),N("div",m4e,[p("button",{class:"chart-arrow transparent",onClick:l[0]||(l[0]=c=>a("arrowClick",!0)),onKeydown:l[1]||(l[1]=At(c=>a("arrowClick",!0),["enter"])),disabled:h(r)},_4e,40,E4e),p("div",T4e,[p("div",g4e,[(T(),N(Ie,null,xe(o,c=>p("div",{class:"time-frame custom-checkbox",key:c},[p("label",null,[p("input",{type:"radio",id:c,name:c,checked:s.value===c,onInput:f=>i(c),disabled:h(r)},null,40,A4e),p("span",{id:`frame-${c}`,tabindex:h(r)?-1:0,role:"button",onKeydown:At(f=>i(c),["enter"])},_(u.$t(`statistics.TIME_FRAMES.${c}`)),41,S4e)])])),64))])]),p("button",{class:"chart-arrow transparent",onClick:l[2]||(l[2]=c=>a("arrowClick",!1)),onKeydown:l[3]||(l[3]=At(c=>a("arrowClick",!1),["enter"])),disabled:h(r)},v4e,40,O4e)]))}}),b4e=ae(R4e,[["__scopeId","data-v-174c91c4"]]),N4e={class:"sports-menu"},C4e=["id","name","checked","onInput"],y4e={class:"sport-label"},D4e=Q({__name:"StatsSportsMenu",props:{userSports:{},selectedSportIds:{default:()=>[]}},emits:["selectedSportIdsUpdate"],setup(e,{emit:t}){const n=e,r=t,{t:a}=jt(),s=ht("sportColors"),{selectedSportIds:o}=_e(n),i=k(()=>Jr(n.userSports,a));function u(l){r("selectedSportIdsUpdate",l)}return(l,c)=>{const f=ue("SportImage");return T(),N("div",N4e,[(T(!0),N(Ie,null,xe(i.value,d=>(T(),N("label",{type:"checkbox",key:d.id,style:Yr({color:d.color?d.color:h(s)[d.label]})},[p("input",{type:"checkbox",id:`${d.id}`,name:d.label,checked:h(o).includes(d.id),onInput:m=>u(d.id)},null,40,C4e),M(f,{"sport-label":d.label,color:d.color},null,8,["sport-label","color"]),p("span",y4e,_(d.translatedLabel),1)],4))),128))])}}}),P4e={key:0,id:"user-statistics"},w4e=Q({__name:"index",props:{sports:{},user:{},isDisabled:{type:Boolean}},setup(e){const t=e,{t:n}=jt(),{sports:r,user:a}=_e(t),s=ce("month"),o=ce(c(s.value)),i=k(()=>Jr(t.sports,n)),u=ce(d(r.value));function l(E){s.value=E,o.value=c(s.value)}function c(E){return JCe(new Date,E,t.user.weekm)}function f(E){o.value=eye(o.value,E,t.user.weekm)}function d(E){return E.map(g=>g.id)}function m(E){u.value.includes(E)?u.value=u.value.filter(g=>g!==E):u.value.push(E)}return Fe(()=>t.sports,E=>{u.value=d(E)}),(E,g)=>i.value?(T(),N("div",P4e,[M(b4e,{onTimeFrameUpdate:l,onArrowClick:f,isDisabled:E.isDisabled},null,8,["isDisabled"]),M(XA,{sports:h(r),user:h(a),chartParams:o.value,"displayed-sport-ids":u.value,fullStats:!0,isDisabled:E.isDisabled},null,8,["sports","user","chartParams","displayed-sport-ids","isDisabled"]),M(D4e,{"selected-sport-ids":u.value,"user-sports":h(r),onSelectedSportIdsUpdate:m},null,8,["selected-sport-ids","user-sports"])])):F("",!0)}}),L4e=ae(w4e,[["__scopeId","data-v-b145e4ac"]]),$4e={id:"statistics",class:"view"},k4e={key:0,class:"container"},U4e=Q({__name:"StatisticsView",setup(e){const t=$e(),n=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),r=k(()=>t.getters[$t.GETTERS.SPORTS].filter(s=>n.value.sports_list.includes(s.id))),a=k(()=>n.value.nb_workouts===0);return(s,o)=>{const i=ue("Card");return T(),N("div",$4e,[n.value.username?(T(),N("div",k4e,[M(i,null,{title:fe(()=>[K(_(s.$t("statistics.STATISTICS")),1)]),content:fe(()=>[M(L4e,{class:ge({"stats-disabled":a.value}),user:n.value,sports:r.value,isDisabled:a.value},null,8,["class","user","sports","isDisabled"])]),_:1}),n.value.nb_workouts===0?(T(),te(R0,{key:0})):F("",!0)])):F("",!0)])}}}),M4e=ae(U4e,[["__scopeId","data-v-0aa997fa"]]),x4e={name:"EmailSent"},F4e={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 345.834 345.834",style:{"enable-background":"new 0 0 345.834 345.834"},"xml:space":"preserve"},W4e=p("g",null,[p("path",{d:`M339.798,260.429c0.13-0.026,0.257-0.061,0.385-0.094c0.109-0.028,0.219-0.051,0.326-0.084
c0.125-0.038,0.247-0.085,0.369-0.129c0.108-0.039,0.217-0.074,0.324-0.119c0.115-0.048,0.226-0.104,0.338-0.157
c0.109-0.052,0.22-0.1,0.327-0.158c0.107-0.057,0.208-0.122,0.312-0.184c0.107-0.064,0.215-0.124,0.319-0.194
c0.111-0.074,0.214-0.156,0.321-0.236c0.09-0.067,0.182-0.13,0.27-0.202c0.162-0.133,0.316-0.275,0.466-0.421
@@ -423,7 +423,7 @@ and ensure you are accounting for this risk.
V234.967z M185.878,179.888c0.535-0.535,0.969-1.131,1.308-1.765l28.051,24.835c1.418,1.255,3.194,1.885,4.972,1.885
c1.726,0,3.451-0.593,4.853-1.781l28.587-24.254c0.26,0.38,0.553,0.743,0.89,1.08l65.687,65.687H120.191L185.878,179.888z`}),p("path",{d:`M7.5,170.676h126.667c4.143,0,7.5-3.357,7.5-7.5s-3.357-7.5-7.5-7.5H7.5c-4.143,0-7.5,3.357-7.5,7.5
S3.357,170.676,7.5,170.676z`}),p("path",{d:`M20.625,129.345H77.5c4.143,0,7.5-3.357,7.5-7.5s-3.357-7.5-7.5-7.5H20.625c-4.143,0-7.5,3.357-7.5,7.5
- S16.482,129.345,20.625,129.345z`}),p("path",{d:"M62.5,226.51h-55c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5,7.5,7.5h55c4.143,0,7.5-3.357,7.5-7.5S66.643,226.51,62.5,226.51z"})],-1),F4e=[x4e];function W4e(e,t,n,r,a,s){return T(),N("svg",M4e,F4e)}const QA=ae(U4e,[["render",W4e]]),JA=e=>(ut("data-v-13388f00"),e=e(),ct(),e),G4e={id:"user-form"},z4e={key:2,class:"info-box success-message"},B4e={class:"form-items"},H4e=["disabled","placeholder"],j4e={key:1,class:"form-info"},V4e=JA(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),K4e=["disabled","placeholder"],Y4e={key:3,class:"form-info"},q4e=JA(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),X4e={key:5,for:"accepted_policy",class:"accepted_policy"},Z4e=["disabled"],Q4e=["disabled"],J4e={key:3},eDe={key:0},tDe={key:4},nDe={class:"account"},rDe={key:5},aDe=Q({__name:"UserAuthForm",props:{action:{},token:{default:""}},setup(e){const t=e,n=Vt(),r=$e(),{action:a}=_e(t),s=xt({username:"",email:"",password:"",accepted_policy:!1}),o=k(()=>g(t.action)),i=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),u=k(()=>r.getters[Y.GETTERS.IS_REGISTRATION_SUCCESS]),l=k(()=>r.getters[Y.GETTERS.IS_SUCCESS]),c=k(()=>r.getters[H.GETTERS.APP_CONFIG]),f=k(()=>r.getters[H.GETTERS.LANGUAGE]),d=k(()=>t.action==="register"&&!c.value.is_registration_enabled),m=k(()=>["reset-request","account-confirmation-resend"].includes(t.action)&&!c.value.is_email_sending_enabled),E=ce(!1);function g(S){switch(S){case"reset-request":case"reset":return"buttons.SUBMIT";default:return`buttons.${t.action.toUpperCase()}`}}function b(){E.value=!0}function v(S){s.password=S}function R(S){switch(S){case"reset":return t.token?r.dispatch(Y.ACTIONS.RESET_USER_PASSWORD,{password:s.password,token:t.token}):r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"user.INVALID_TOKEN");case"reset-request":return r.dispatch(Y.ACTIONS.SEND_PASSWORD_RESET_REQUEST,{email:s.email});case"account-confirmation-resend":return r.dispatch(Y.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL,{email:s.email});default:s.language=f.value,r.dispatch(Y.ACTIONS.LOGIN_OR_REGISTER,{actionType:S,formData:s,redirectUrl:n.query.from})}}function A(){s.username="",s.email="",s.password="",s.accepted_policy=!1}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Fe(()=>n.path,async()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!1),r.commit(Y.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),E.value=!1,A()}),(S,C)=>{const L=ue("AlertMessage"),$=ue("router-link"),U=ue("i18n-t"),G=ue("ErrorMessage");return T(),N("div",{id:"user-auth-form",class:ge(`${["reset","reset-request"].includes(h(a))?h(a):"user-form"}`)},[p("div",G4e,[p("div",{class:ge(["form-box",{disabled:d.value}])},[d.value?(T(),te(L,{key:0,message:"user.REGISTER_DISABLED"})):F("",!0),m.value?(T(),te(L,{key:1,message:"admin.EMAIL_SENDING_DISABLED"})):F("",!0),l.value||u.value?(T(),N("div",z4e,_(S.$t(`user.PROFILE.SUCCESSFUL_${u.value?`REGISTRATION${c.value.is_email_sending_enabled?"_WITH_EMAIL":""}`:"UPDATE"}`)),1)):F("",!0),p("form",{class:ge({errors:E.value}),onSubmit:C[3]||(C[3]=Xe(B=>R(h(a)),["prevent"]))},[p("div",B4e,[h(a)==="register"?Ke((T(),N("input",{key:0,id:"username",disabled:d.value,required:"",pattern:"[a-zA-Z0-9_]+",minlength:"3",maxlength:"30",onInvalid:b,"onUpdate:modelValue":C[0]||(C[0]=B=>s.username=B),placeholder:S.$t("user.USERNAME")},null,40,H4e)),[[tt,s.username]]):F("",!0),h(a)==="register"?(T(),N("div",j4e,[V4e,K(" "+_(S.$t("user.USERNAME_INFO")),1)])):F("",!0),h(a)!=="reset"?Ke((T(),N("input",{key:2,id:"email",disabled:d.value||m.value,required:"",onInvalid:b,type:"email","onUpdate:modelValue":C[1]||(C[1]=B=>s.email=B),placeholder:S.$t("user.EMAIL")},null,40,K4e)),[[tt,s.email]]):F("",!0),["reset-request","register","account-confirmation-resend"].includes(h(a))?(T(),N("div",Y4e,[q4e,K(" "+_(S.$t("user.EMAIL_INFO")),1)])):F("",!0),["account-confirmation-resend","reset-request"].includes(h(a))?F("",!0):(T(),te(Vd,{key:4,disabled:d.value,required:!0,placeholder:h(a)==="reset"?S.$t("user.ENTER_PASSWORD"):S.$t("user.PASSWORD"),password:s.password,checkStrength:["reset","register"].includes(h(a)),onUpdatePassword:v,onPasswordError:b},null,8,["disabled","placeholder","password","checkStrength"])),h(a)==="register"?(T(),N("label",X4e,[Ke(p("input",{type:"checkbox",id:"accepted_policy",disabled:d.value,required:"",onInvalid:b,"onUpdate:modelValue":C[2]||(C[2]=B=>s.accepted_policy=B)},null,40,Z4e),[[hf,s.accepted_policy]]),p("span",null,[M(U,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:fe(()=>[M($,{to:"/privacy-policy",target:"_blank"},{default:fe(()=>[K(_(S.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})])])):F("",!0)]),p("button",{type:"submit",disabled:d.value||m.value},_(S.$t(o.value)),9,Q4e)],34),h(a)==="login"?(T(),N("div",J4e,[M($,{class:"links",to:"/register"},{default:fe(()=>[K(_(S.$t("user.REGISTER")),1)]),_:1}),c.value.is_email_sending_enabled?(T(),N("span",eDe,"-")):F("",!0),c.value.is_email_sending_enabled?(T(),te($,{key:1,class:"links",to:"/password-reset/request"},{default:fe(()=>[K(_(S.$t("user.PASSWORD_FORGOTTEN")),1)]),_:1})):F("",!0)])):F("",!0),h(a)==="register"?(T(),N("div",tDe,[p("span",nDe,_(S.$t("user.ALREADY_HAVE_ACCOUNT")),1),M($,{class:"links",to:"/login"},{default:fe(()=>[K(_(S.$t("user.LOGIN")),1)]),_:1})])):F("",!0),["login","register"].includes(h(a))&&c.value.is_email_sending_enabled?(T(),N("div",rDe,[M($,{class:"links",to:"/account-confirmation/resend"},{default:fe(()=>[K(_(S.$t("user.ACCOUNT_CONFIRMATION_NOT_RECEIVED")),1)]),_:1})])):F("",!0),i.value?(T(),te(G,{key:6,message:i.value},null,8,["message"])):F("",!0)],2)])],2)}}}),b0=ae(aDe,[["__scopeId","data-v-13388f00"]]),sDe={id:"account-confirmation-email",class:"center-card with-margin"},oDe={key:0,class:"email-sent"},iDe={class:"email-sent-message"},uDe={key:1},cDe=Q({__name:"AccountConfirmationEmail",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=ue("Card");return T(),N("div",sDe,[h(n)==="email-sent"?(T(),N("div",oDe,[M(QA),p("div",iDe,_(r.$t("user.ACCOUNT_CONFIRMATION_SENT")),1)])):(T(),N("div",uDe,[M(s,null,{title:fe(()=>[K(_(r.$t("user.RESENT_ACCOUNT_CONFIRMATION")),1)]),content:fe(()=>[M(b0,{action:h(n)},null,8,["action"])]),_:1})]))])}}}),lDe=ae(cDe,[["__scopeId","data-v-b0299010"]]),dDe={id:"account-confirmation",class:"view"},fDe={class:"container"},pDe=Q({__name:"AccountConfirmationResendView",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>(T(),N("div",dDe,[p("div",fDe,[M(lDe,{action:h(n)},null,8,["action"])])]))}}),Ih=ae(pDe,[["__scopeId","data-v-9a9c1644"]]),mDe={key:0,id:"account-confirmation",class:"center-card with-margin"},EDe={class:"error-message"},hDe=Q({__name:"AccountConfirmationView",setup(e){const t=Vt(),n=Zr(),r=$e(),a=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),s=k(()=>t.query.token);It(()=>o());function o(){s.value?r.dispatch(Y.ACTIONS.CONFIRM_ACCOUNT,{token:s.value}):n.push("/")}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),(i,u)=>{const l=ue("router-link");return a.value?(T(),N("div",mDe,[M(zf),p("p",EDe,[p("span",null,_(i.$t("error.SOMETHING_WRONG"))+".",1),M(l,{class:"links",to:"/account-confirmation/resend"},{default:fe(()=>[K(_(i.$t("buttons.ACCOUNT-CONFIRMATION-RESEND"))+"? ",1)]),_:1})])])):F("",!0)}}}),_De=ae(hDe,[["__scopeId","data-v-a0fa0b62"]]),TDe={key:0,id:"email-update",class:"center-card with-margin"},gDe={class:"error-message"},ADe=Q({__name:"EmailUpdateView",setup(e){const t=Vt(),n=Zr(),r=$e(),a=k(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]),s=k(()=>r.getters[Y.GETTERS.IS_AUTHENTICATED]),o=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),i=k(()=>t.query.token);It(()=>u());function u(){i.value?r.dispatch(Y.ACTIONS.CONFIRM_EMAIL,{token:i.value,refreshUser:s.value}):n.push("/")}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Fe(()=>o.value,l=>{a.value.username&&l&&n.push("/")}),(l,c)=>{const f=ue("router-link"),d=ue("i18n-t");return o.value&&!a.value.username?(T(),N("div",TDe,[M(zf),p("p",gDe,[p("span",null,_(l.$t("error.SOMETHING_WRONG"))+".",1),p("span",null,[M(d,{keypath:"user.PROFILE.ERRORED_EMAIL_UPDATE"},{default:fe(()=>[M(f,{to:"/login"},{default:fe(()=>[K(_(l.$t("user.LOG_IN")),1)]),_:1})]),_:1})])])])):F("",!0)}}}),SDe=ae(ADe,[["__scopeId","data-v-b8fbd32f"]]),ODe={id:"loginOrRegister",class:"view"},IDe={class:"container"},vDe={class:"container-sub"},RDe={class:"container-sub"},bDe=Q({__name:"LoginOrRegister",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>(T(),N("div",ODe,[p("div",IDe,[p("div",vDe,[M(zA)]),p("div",RDe,[M(b0,{action:h(n)},null,8,["action"])])])]))}}),vh=ae(bDe,[["__scopeId","data-v-84d61340"]]),NDe={name:"Password"},CDe={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512.001 512.001",style:{"enable-background":"new 0 0 512.001 512.001"},"xml:space":"preserve"},yDe=tr(`(ut("data-v-13388f00"),e=e(),ct(),e),B4e={id:"user-form"},H4e={key:2,class:"info-box success-message"},j4e={class:"form-items"},V4e=["disabled","placeholder"],K4e={key:1,class:"form-info"},Y4e=JA(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),q4e=["disabled","placeholder"],X4e={key:3,class:"form-info"},Z4e=JA(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),Q4e={key:5,for:"accepted_policy",class:"accepted_policy"},J4e=["disabled"],eDe=["disabled"],tDe={key:3},nDe={key:0},rDe={key:4},aDe={class:"account"},sDe={key:5},oDe=Q({__name:"UserAuthForm",props:{action:{},token:{default:""}},setup(e){const t=e,n=Vt(),r=$e(),{action:a}=_e(t),s=xt({username:"",email:"",password:"",accepted_policy:!1}),o=k(()=>g(t.action)),i=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),u=k(()=>r.getters[Y.GETTERS.IS_REGISTRATION_SUCCESS]),l=k(()=>r.getters[Y.GETTERS.IS_SUCCESS]),c=k(()=>r.getters[H.GETTERS.APP_CONFIG]),f=k(()=>r.getters[H.GETTERS.LANGUAGE]),d=k(()=>t.action==="register"&&!c.value.is_registration_enabled),m=k(()=>["reset-request","account-confirmation-resend"].includes(t.action)&&!c.value.is_email_sending_enabled),E=ce(!1);function g(S){switch(S){case"reset-request":case"reset":return"buttons.SUBMIT";default:return`buttons.${t.action.toUpperCase()}`}}function b(){E.value=!0}function v(S){s.password=S}function R(S){switch(S){case"reset":return t.token?r.dispatch(Y.ACTIONS.RESET_USER_PASSWORD,{password:s.password,token:t.token}):r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"user.INVALID_TOKEN");case"reset-request":return r.dispatch(Y.ACTIONS.SEND_PASSWORD_RESET_REQUEST,{email:s.email});case"account-confirmation-resend":return r.dispatch(Y.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL,{email:s.email});default:s.language=f.value,r.dispatch(Y.ACTIONS.LOGIN_OR_REGISTER,{actionType:S,formData:s,redirectUrl:n.query.from})}}function A(){s.username="",s.email="",s.password="",s.accepted_policy=!1}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Fe(()=>n.path,async()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.commit(Y.MUTATIONS.UPDATE_IS_SUCCESS,!1),r.commit(Y.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),E.value=!1,A()}),(S,C)=>{const L=ue("AlertMessage"),$=ue("router-link"),U=ue("i18n-t"),G=ue("ErrorMessage");return T(),N("div",{id:"user-auth-form",class:ge(`${["reset","reset-request"].includes(h(a))?h(a):"user-form"}`)},[p("div",B4e,[p("div",{class:ge(["form-box",{disabled:d.value}])},[d.value?(T(),te(L,{key:0,message:"user.REGISTER_DISABLED"})):F("",!0),m.value?(T(),te(L,{key:1,message:"admin.EMAIL_SENDING_DISABLED"})):F("",!0),l.value||u.value?(T(),N("div",H4e,_(S.$t(`user.PROFILE.SUCCESSFUL_${u.value?`REGISTRATION${c.value.is_email_sending_enabled?"_WITH_EMAIL":""}`:"UPDATE"}`)),1)):F("",!0),p("form",{class:ge({errors:E.value}),onSubmit:C[3]||(C[3]=Xe(B=>R(h(a)),["prevent"]))},[p("div",j4e,[h(a)==="register"?Ke((T(),N("input",{key:0,id:"username",disabled:d.value,required:"",pattern:"[a-zA-Z0-9_]+",minlength:"3",maxlength:"30",onInvalid:b,"onUpdate:modelValue":C[0]||(C[0]=B=>s.username=B),placeholder:S.$t("user.USERNAME")},null,40,V4e)),[[tt,s.username]]):F("",!0),h(a)==="register"?(T(),N("div",K4e,[Y4e,K(" "+_(S.$t("user.USERNAME_INFO")),1)])):F("",!0),h(a)!=="reset"?Ke((T(),N("input",{key:2,id:"email",disabled:d.value||m.value,required:"",onInvalid:b,type:"email","onUpdate:modelValue":C[1]||(C[1]=B=>s.email=B),placeholder:S.$t("user.EMAIL")},null,40,q4e)),[[tt,s.email]]):F("",!0),["reset-request","register","account-confirmation-resend"].includes(h(a))?(T(),N("div",X4e,[Z4e,K(" "+_(S.$t("user.EMAIL_INFO")),1)])):F("",!0),["account-confirmation-resend","reset-request"].includes(h(a))?F("",!0):(T(),te(Vd,{key:4,disabled:d.value,required:!0,placeholder:h(a)==="reset"?S.$t("user.ENTER_PASSWORD"):S.$t("user.PASSWORD"),password:s.password,checkStrength:["reset","register"].includes(h(a)),onUpdatePassword:v,onPasswordError:b},null,8,["disabled","placeholder","password","checkStrength"])),h(a)==="register"?(T(),N("label",Q4e,[Ke(p("input",{type:"checkbox",id:"accepted_policy",disabled:d.value,required:"",onInvalid:b,"onUpdate:modelValue":C[2]||(C[2]=B=>s.accepted_policy=B)},null,40,J4e),[[hf,s.accepted_policy]]),p("span",null,[M(U,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:fe(()=>[M($,{to:"/privacy-policy",target:"_blank"},{default:fe(()=>[K(_(S.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})])])):F("",!0)]),p("button",{type:"submit",disabled:d.value||m.value},_(S.$t(o.value)),9,eDe)],34),h(a)==="login"?(T(),N("div",tDe,[M($,{class:"links",to:"/register"},{default:fe(()=>[K(_(S.$t("user.REGISTER")),1)]),_:1}),c.value.is_email_sending_enabled?(T(),N("span",nDe,"-")):F("",!0),c.value.is_email_sending_enabled?(T(),te($,{key:1,class:"links",to:"/password-reset/request"},{default:fe(()=>[K(_(S.$t("user.PASSWORD_FORGOTTEN")),1)]),_:1})):F("",!0)])):F("",!0),h(a)==="register"?(T(),N("div",rDe,[p("span",aDe,_(S.$t("user.ALREADY_HAVE_ACCOUNT")),1),M($,{class:"links",to:"/login"},{default:fe(()=>[K(_(S.$t("user.LOGIN")),1)]),_:1})])):F("",!0),["login","register"].includes(h(a))&&c.value.is_email_sending_enabled?(T(),N("div",sDe,[M($,{class:"links",to:"/account-confirmation/resend"},{default:fe(()=>[K(_(S.$t("user.ACCOUNT_CONFIRMATION_NOT_RECEIVED")),1)]),_:1})])):F("",!0),i.value?(T(),te(G,{key:6,message:i.value},null,8,["message"])):F("",!0)],2)])],2)}}}),b0=ae(oDe,[["__scopeId","data-v-13388f00"]]),iDe={id:"account-confirmation-email",class:"center-card with-margin"},uDe={key:0,class:"email-sent"},cDe={class:"email-sent-message"},lDe={key:1},dDe=Q({__name:"AccountConfirmationEmail",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=ue("Card");return T(),N("div",iDe,[h(n)==="email-sent"?(T(),N("div",uDe,[M(QA),p("div",cDe,_(r.$t("user.ACCOUNT_CONFIRMATION_SENT")),1)])):(T(),N("div",lDe,[M(s,null,{title:fe(()=>[K(_(r.$t("user.RESENT_ACCOUNT_CONFIRMATION")),1)]),content:fe(()=>[M(b0,{action:h(n)},null,8,["action"])]),_:1})]))])}}}),fDe=ae(dDe,[["__scopeId","data-v-b0299010"]]),pDe={id:"account-confirmation",class:"view"},mDe={class:"container"},EDe=Q({__name:"AccountConfirmationResendView",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>(T(),N("div",pDe,[p("div",mDe,[M(fDe,{action:h(n)},null,8,["action"])])]))}}),Ih=ae(EDe,[["__scopeId","data-v-9a9c1644"]]),hDe={key:0,id:"account-confirmation",class:"center-card with-margin"},_De={class:"error-message"},TDe=Q({__name:"AccountConfirmationView",setup(e){const t=Vt(),n=Zr(),r=$e(),a=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),s=k(()=>t.query.token);It(()=>o());function o(){s.value?r.dispatch(Y.ACTIONS.CONFIRM_ACCOUNT,{token:s.value}):n.push("/")}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),(i,u)=>{const l=ue("router-link");return a.value?(T(),N("div",hDe,[M(zf),p("p",_De,[p("span",null,_(i.$t("error.SOMETHING_WRONG"))+".",1),M(l,{class:"links",to:"/account-confirmation/resend"},{default:fe(()=>[K(_(i.$t("buttons.ACCOUNT-CONFIRMATION-RESEND"))+"? ",1)]),_:1})])])):F("",!0)}}}),gDe=ae(TDe,[["__scopeId","data-v-a0fa0b62"]]),ADe={key:0,id:"email-update",class:"center-card with-margin"},SDe={class:"error-message"},ODe=Q({__name:"EmailUpdateView",setup(e){const t=Vt(),n=Zr(),r=$e(),a=k(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]),s=k(()=>r.getters[Y.GETTERS.IS_AUTHENTICATED]),o=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),i=k(()=>t.query.token);It(()=>u());function u(){i.value?r.dispatch(Y.ACTIONS.CONFIRM_EMAIL,{token:i.value,refreshUser:s.value}):n.push("/")}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Fe(()=>o.value,l=>{a.value.username&&l&&n.push("/")}),(l,c)=>{const f=ue("router-link"),d=ue("i18n-t");return o.value&&!a.value.username?(T(),N("div",ADe,[M(zf),p("p",SDe,[p("span",null,_(l.$t("error.SOMETHING_WRONG"))+".",1),p("span",null,[M(d,{keypath:"user.PROFILE.ERRORED_EMAIL_UPDATE"},{default:fe(()=>[M(f,{to:"/login"},{default:fe(()=>[K(_(l.$t("user.LOG_IN")),1)]),_:1})]),_:1})])])])):F("",!0)}}}),IDe=ae(ODe,[["__scopeId","data-v-b8fbd32f"]]),vDe={id:"loginOrRegister",class:"view"},RDe={class:"container"},bDe={class:"container-sub"},NDe={class:"container-sub"},CDe=Q({__name:"LoginOrRegister",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>(T(),N("div",vDe,[p("div",RDe,[p("div",bDe,[M(zA)]),p("div",NDe,[M(b0,{action:h(n)},null,8,["action"])])])]))}}),vh=ae(CDe,[["__scopeId","data-v-84d61340"]]),yDe={name:"Password"},DDe={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512.001 512.001",style:{"enable-background":"new 0 0 512.001 512.001"},"xml:space":"preserve"},PDe=tr(` `,7),DDe=[yDe];function PDe(e,t,n,r,a,s){return T(),N("svg",CDe,DDe)}const wDe=ae(NDe,[["render",PDe]]),LDe={id:"password-action-done",class:"center-card with-margin"},$De={class:"password-message"},kDe={key:0},UDe=Q({__name:"PasswordActionDone",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=ue("router-link"),o=ue("i18n-t");return T(),N("div",LDe,[h(n)==="request-sent"?(T(),te(QA,{key:0})):(T(),te(wDe,{key:1})),p("div",$De,[h(n)==="request-sent"?(T(),N("span",kDe,_(r.$t("user.PASSWORD_SENT_EMAIL_TEXT")),1)):(T(),te(o,{key:1,keypath:"user.PASSWORD_UPDATED"},{default:fe(()=>[M(s,{to:"/login"},{default:fe(()=>[K(_(r.$t("common.HERE")),1)]),_:1})]),_:1}))])])}}}),MDe=ae(UDe,[["__scopeId","data-v-ee1004fc"]]),xDe={id:"password-reset-request",class:"center-card with-margin"},FDe=Q({__name:"PasswordResetForm",props:{action:{},token:{default:""}},setup(e){const t=e,{action:n,token:r}=_e(t);return(a,s)=>{const o=ue("Card");return T(),N("div",xDe,[M(o,null,{title:fe(()=>[K(_(a.$t("user.RESET_PASSWORD")),1)]),content:fe(()=>[M(b0,{action:h(n),token:h(r)},null,8,["action","token"])]),_:1})])}}}),WDe=ae(FDe,[["__scopeId","data-v-97f01ba1"]]),GDe={id:"password-reset",class:"view"},zDe={class:"container"},BDe=Q({__name:"PasswordResetView",props:{action:{}},setup(e){const t=e,n=Vt(),r=Zr(),{action:a}=_e(t),s=k(()=>n.query.token);return It(()=>{t.action==="reset"&&!s.value&&r.push("/")}),(o,i)=>(T(),N("div",GDe,[p("div",zDe,[h(a).startsWith("reset")?(T(),te(WDe,{key:0,action:h(a),token:s.value},null,8,["action","token"])):(T(),te(MDe,{key:1,action:h(a)},null,8,["action"]))])]))}}),Ai=ae(BDe,[["__scopeId","data-v-5cbe9029"]]),HDe=e=>(ut("data-v-af92ad3a"),e=e(),ct(),e),jDe={key:0,id:"profile",class:"view"},VDe=HDe(()=>p("div",{id:"bottom"},null,-1)),KDe=Q({__name:"ProfileView",setup(e){const t=$e(),n=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]);return(r,a)=>{const s=ue("router-view");return n.value.username?(T(),N("div",jDe,[M(s,{user:n.value},null,8,["user"]),VDe])):F("",!0)}}}),YDe=ae(KDe,[["__scopeId","data-v-af92ad3a"]]),qDe={key:0,id:"user",class:"view"},XDe={class:"box"},ZDe=Q({__name:"UserView",props:{fromAdmin:{type:Boolean}},setup(e){const t=e,{fromAdmin:n}=_e(t),r=Vt(),a=$e(),s=k(()=>a.getters[Ce.GETTERS.USER]);return It(()=>{r.params.username&&typeof r.params.username=="string"&&a.dispatch(Ce.ACTIONS.GET_USER,r.params.username)}),Co(()=>{a.dispatch(Ce.ACTIONS.EMPTY_USER)}),(o,i)=>s.value.username?(T(),N("div",qDe,[M(vA,{user:s.value},null,8,["user"]),p("div",XDe,[M(bA,{user:s.value,"from-admin":h(n)},null,8,["user","from-admin"])])])):F("",!0)}}),Rh=ae(ZDe,[["__scopeId","data-v-1b7a0b4f"]]),QDe={id:"workout-form"},JDe={class:"form-items"},ePe={key:0,class:"form-item-radio"},tPe=["checked","disabled"],nPe={for:"withGpx"},rPe=["checked","disabled"],aPe={for:"withoutGpx"},sPe={class:"form-item"},oPe=["disabled"],iPe=["value"],uPe={key:1,class:"form-item"},cPe={for:"gpxFile"},lPe=["disabled"],dPe={class:"files-help info-box"},fPe={key:2,class:"form-item"},pPe={for:"title"},mPe=["required","disabled"],EPe={key:3},hPe={class:"workout-date-duration"},_Pe={class:"form-item"},TPe={class:"workout-date-time"},gPe=["disabled"],APe=["disabled"],SPe={class:"form-item"},OPe=["disabled"],IPe=["disabled"],vPe=["disabled"],RPe={class:"workout-data"},bPe={class:"form-item"},NPe=["disabled"],CPe={class:"form-item"},yPe=["disabled"],DPe={class:"form-item"},PPe=["disabled"],wPe={class:"form-item"},LPe={key:1},$Pe={key:2,class:"form-buttons"},kPe=["disabled"],UPe=Q({__name:"WorkoutEdition",props:{authUser:{},sports:{},isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:()=>({})}},setup(e){const t=e,{t:n}=jt(),r=$e(),a=Zr(),{authUser:s,workout:o,isCreation:i,loading:u}=_e(t),l=k(()=>Jr(t.sports,n,"is_active_for_user",o.value.id?[o.value.sport_id]:[])),c=k(()=>r.getters[H.GETTERS.APP_CONFIG]),f=c.value.max_single_file_size?tu(c.value.max_single_file_size):"",d=c.value.gpx_limit_import,m=c.value.max_zip_file_size?tu(c.value.max_zip_file_size):"",E=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),g=xt({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:"",workoutAscent:"",workoutDescent:""}),b=ce(o.value.id?o.value.with_gpx:i.value);let v=null;const R=ce(!1),A=ce([]);gt(()=>{let P;t.workout.id?($(t.workout),P=document.getElementById("sport")):P=document.getElementById("withGpx"),P&&P.focus()});function S(P){g.notes=P}function C(){b.value=!b.value,R.value=!1}function L(P){P.target.files&&(v=P.target.files[0])}function $(P){if(g.sport_id=`${P.sport_id}`,g.title=P.title,g.notes=P.notes,!P.with_gpx){const z=OA(yc(P.workout_date,t.authUser.timezone),"yyyy-MM-dd"),V=P.duration.split(":");g.workoutDistance=`${s.value.imperial_units?sn(P.distance,"km","mi",3):parseFloat(P.distance.toFixed(3))}`,g.workoutDate=z.workout_date,g.workoutTime=z.workout_time,g.workoutDurationHour=V[0],g.workoutDurationMinutes=V[1],g.workoutDurationSeconds=V[2],g.workoutAscent=P.ascent===null?"":`${s.value.imperial_units?sn(P.ascent,"m","ft",2):parseFloat(P.ascent.toFixed(2))}`,g.workoutDescent=P.descent===null?"":`${s.value.imperial_units?sn(P.descent,"m","ft",2):parseFloat(P.descent.toFixed(2))}`}}function U(){return A.value.includes("workouts.INVALID_DISTANCE")}function G(){return A.value.includes("workouts.INVALID_DURATION")}function B(){return A.value.includes("workouts.INVALID_ASCENT_OR_DESCENT")}function w(P){A.value=[],P.title=g.title,P.duration=+g.workoutDurationHour*3600+ +g.workoutDurationMinutes*60+ +g.workoutDurationSeconds,P.duration<=0&&A.value.push("workouts.INVALID_DURATION"),P.distance=s.value.imperial_units?sn(+g.workoutDistance,"mi","km",3):+g.workoutDistance,P.distance<=0&&A.value.push("workouts.INVALID_DISTANCE"),P.workout_date=`${g.workoutDate} ${g.workoutTime}`,P.ascent=g.workoutAscent===""?null:s.value.imperial_units?sn(+g.workoutAscent,"ft","m",3):+g.workoutAscent,P.descent=g.workoutDescent===""?null:s.value.imperial_units?sn(+g.workoutDescent,"ft","m",3):+g.workoutDescent,(P.ascent!==null&&P.descent===null||P.ascent===null&&P.descent!==null)&&A.value.push("workouts.INVALID_ASCENT_OR_DESCENT")}function Z(){const P={sport_id:+g.sport_id,notes:g.notes};if(t.workout.id)t.workout.with_gpx?P.title=g.title:w(P),A.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,A.value):r.dispatch(Te.ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:P});else if(b.value){if(!v){const z="workouts.NO_FILE_PROVIDED";r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,z);return}P.file=v,r.dispatch(Te.ACTIONS.ADD_WORKOUT,P)}else w(P),A.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,A.value):r.dispatch(Te.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,P)}function J(){t.workout.id?a.push({name:"Workout",params:{workoutId:t.workout.id}}):a.go(-1)}function re(){R.value=!0}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Fe(()=>t.workout,async(P,z)=>{P!==z&&P&&P.id&&$(P)}),(P,z)=>{const V=ue("CustomTextArea"),se=ue("ErrorMessage"),Pe=ue("Loader"),We=ue("Card");return T(),N("div",{id:"workout-edition",class:ge(["center-card with-margin",{"center-form":h(o)&&h(o).with_gpx}])},[M(We,null,{title:fe(()=>[K(_(P.$t(`workouts.${h(i)?"ADD":"EDIT"}_WORKOUT`)),1)]),content:fe(()=>[p("div",QDe,[p("form",{class:ge({errors:R.value}),onSubmit:Xe(Z,["prevent"])},[p("div",JDe,[h(i)?(T(),N("div",ePe,[p("div",null,[p("input",{id:"withGpx",type:"radio",checked:b.value,disabled:h(u),onClick:C},null,8,tPe),p("label",nPe,_(P.$t("workouts.WITH_GPX")),1)]),p("div",null,[p("input",{id:"withoutGpx",type:"radio",checked:!b.value,disabled:h(u),onClick:C},null,8,rPe),p("label",aPe,_(P.$t("workouts.WITHOUT_GPX")),1)])])):F("",!0),p("div",sPe,[p("label",null,_(P.$t("workouts.SPORT",1))+"*: ",1),Ke(p("select",{id:"sport",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[0]||(z[0]=Ae=>g.sport_id=Ae)},[(T(!0),N(Ie,null,xe(l.value,Ae=>(T(),N("option",{value:Ae.id,key:Ae.id},_(Ae.translatedLabel),9,iPe))),128))],40,oPe),[[js,g.sport_id]])]),h(i)&&b.value?(T(),N("div",uPe,[p("label",cPe,_(P.$t("workouts.GPX_FILE"))+" "+_(P.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+"*: ",1),p("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:h(u),required:"",onInvalid:re,onInput:L},null,40,lPe),p("div",dPe,[p("div",null,[p("strong",null,_(P.$t("workouts.GPX_FILE"))+":",1),p("ul",null,[p("li",null,_(P.$t("workouts.MAX_SIZE"))+": "+_(h(f)),1)])]),p("div",null,[p("strong",null,_(P.$t("workouts.ZIP_ARCHIVE"))+":",1),p("ul",null,[p("li",null,_(P.$t("workouts.NO_FOLDER")),1),p("li",null,_(P.$t("workouts.MAX_FILES"))+": "+_(h(d)),1),p("li",null,_(P.$t("workouts.MAX_SIZE"))+": "+_(h(m)),1)])])])])):(T(),N("div",fPe,[p("label",pPe,_(P.$t("workouts.TITLE"))+": ",1),Ke(p("input",{id:"title",name:"title",type:"text",required:!h(i),onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[1]||(z[1]=Ae=>g.title=Ae)},null,40,mPe),[[tt,g.title]])])),b.value?F("",!0):(T(),N("div",EPe,[p("div",hPe,[p("div",_Pe,[p("label",null,_(P.$t("workouts.WORKOUT_DATE"))+"*:",1),p("div",TPe,[Ke(p("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[2]||(z[2]=Ae=>g.workoutDate=Ae)},null,40,gPe),[[tt,g.workoutDate]]),Ke(p("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[3]||(z[3]=Ae=>g.workoutTime=Ae)},null,40,APe),[[tt,g.workoutTime]])])]),p("div",SPe,[p("label",null,_(P.$t("workouts.DURATION"))+"*:",1),p("div",null,[Ke(p("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:ge(["workout-duration",{errored:G()}]),type:"text",placeholder:"HH",minlength:"1",maxlength:"2",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[4]||(z[4]=Ae=>g.workoutDurationHour=Ae)},null,42,OPe),[[tt,g.workoutDurationHour]]),K(" : "),Ke(p("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:ge(["workout-duration",{errored:G()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"MM",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[5]||(z[5]=Ae=>g.workoutDurationMinutes=Ae)},null,42,IPe),[[tt,g.workoutDurationMinutes]]),K(" : "),Ke(p("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:ge(["workout-duration",{errored:G()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"SS",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[6]||(z[6]=Ae=>g.workoutDurationSeconds=Ae)},null,42,vPe),[[tt,g.workoutDurationSeconds]])])])]),p("div",RPe,[p("div",bPe,[p("label",null,_(P.$t("workouts.DISTANCE"))+" ("+_(h(s).imperial_units?"mi":"km")+")*: ",1),Ke(p("input",{class:ge({errored:U()}),name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[7]||(z[7]=Ae=>g.workoutDistance=Ae)},null,42,NPe),[[tt,g.workoutDistance]])]),p("div",CPe,[p("label",null,_(P.$t("workouts.ASCENT"))+" ("+_(h(s).imperial_units?"ft":"m")+"): ",1),Ke(p("input",{class:ge({errored:B()}),name:"workout-ascent",type:"number",min:"0",step:"0.01",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[8]||(z[8]=Ae=>g.workoutAscent=Ae)},null,42,yPe),[[tt,g.workoutAscent]])]),p("div",DPe,[p("label",null,_(P.$t("workouts.DESCENT"))+" ("+_(h(s).imperial_units?"ft":"m")+"): ",1),Ke(p("input",{class:ge({errored:B()}),name:"workout-descent",type:"number",min:"0",step:"0.01",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[9]||(z[9]=Ae=>g.workoutDescent=Ae)},null,42,PPe),[[tt,g.workoutDescent]])])])])),p("div",wPe,[p("label",null,_(P.$t("workouts.NOTES"))+": ",1),M(V,{name:"notes",input:g.notes,disabled:h(u),onUpdateValue:S},null,8,["input","disabled"])])]),E.value?(T(),te(se,{key:0,message:E.value},null,8,["message"])):F("",!0),h(u)?(T(),N("div",LPe,[M(Pe)])):(T(),N("div",$Pe,[p("button",{class:"confirm",type:"submit",disabled:h(u)},_(P.$t("buttons.SUBMIT")),9,kPe),p("button",{class:"cancel",onClick:Xe(J,["prevent"])},_(P.$t("buttons.CANCEL")),1)]))],34)])]),_:1})],2)}}}),eS=ae(UPe,[["__scopeId","data-v-4c5a9cd1"]]),MPe={id:"add-workout",class:"view"},xPe={class:"container"},FPe=Q({__name:"AddWorkout",setup(e){const t=$e(),n=k(()=>t.getters[$t.GETTERS.SPORTS]),r=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=k(()=>t.getters[Te.GETTERS.WORKOUT_DATA]);return(s,o)=>(T(),N("div",MPe,[p("div",xPe,[M(eS,{authUser:r.value,sports:n.value,isCreation:!0,loading:a.value.loading},null,8,["authUser","sports","loading"])])]))}}),WPe={id:"edit-workout",class:"view"},GPe={class:"container"},zPe=Q({__name:"EditWorkout",setup(e){const t=Vt(),n=$e(),r=k(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=k(()=>n.getters[$t.GETTERS.SPORTS]),s=k(()=>n.getters[Te.GETTERS.WORKOUT_DATA]);return It(()=>{n.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})}),Fe(()=>t.params.workoutId,async o=>{o||n.commit(Te.MUTATIONS.EMPTY_WORKOUT)}),(o,i)=>(T(),N("div",WPe,[p("div",GPe,[s.value.workout.id?(T(),te(eS,{key:0,authUser:r.value,sports:a.value,workout:s.value.workout,loading:s.value.loading},null,8,["authUser","sports","workout","loading"])):F("",!0)])]))}}),Os=e=>(ut("data-v-e1628a52"),e=e(),ct(),e),BPe={id:"workout-card-title"},HPe=["disabled","title"],jPe=Os(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),VPe=[jPe],KPe={class:"workout-card-title"},YPe={class:"workout-title-date"},qPe={key:0,class:"workout-title"},XPe=["aria-label"],ZPe=Os(()=>p("i",{class:"fa fa-edit","aria-hidden":"true"},null,-1)),QPe=[ZPe],JPe=["aria-label"],e6e=Os(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),t6e=[e6e],n6e=["aria-label"],r6e=Os(()=>p("i",{class:"fa fa-trash","aria-hidden":"true"},null,-1)),a6e=[r6e],s6e={key:1,class:"workout-title"},o6e={class:"workout-segment"},i6e=Os(()=>p("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)),u6e={class:"workout-date"},c6e={class:"workout-link"},l6e=["disabled","title"],d6e=Os(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),f6e=[d6e],p6e=Q({__name:"WorkoutCardTitle",props:{sport:{},workoutObject:{}},emits:["displayModal"],setup(e,{emit:t}){const n=e,r=t,{sport:a,workoutObject:s}=_e(n);async function o(u){await Be.get(`workouts/${u}/gpx/download`,{responseType:"blob"}).then(l=>{const c=window.URL.createObjectURL(new Blob([l.data],{type:"application/gpx+xml"})),f=document.createElement("a");f.href=c,f.setAttribute("download",`${u}.gpx`),document.body.appendChild(f),f.click()})}function i(){r("displayModal",!0)}return(u,l)=>{const c=ue("SportImage"),f=ue("router-link");return T(),N("div",BPe,[p("button",{class:ge(["workout-previous workout-arrow transparent",{inactive:!h(s).previousUrl}]),disabled:!h(s).previousUrl,title:h(s).previousUrl?u.$t(`workouts.PREVIOUS_${h(s).type}`):u.$t(`workouts.NO_PREVIOUS_${h(s).type}`),onClick:l[0]||(l[0]=d=>h(s).previousUrl?u.$router.push(h(s).previousUrl):null)},VPe,10,HPe),p("div",KPe,[M(c,{"sport-label":h(a).label,color:h(a).color},null,8,["sport-label","color"]),p("div",YPe,[h(s).type==="WORKOUT"?(T(),N("div",qPe,[p("span",null,_(h(s).title),1),p("button",{class:"transparent icon-button",onClick:l[1]||(l[1]=d=>u.$router.push({name:"EditWorkout",params:{workoutId:h(s).workoutId}})),"aria-label":u.$t("workouts.EDIT_WORKOUT")},QPe,8,XPe),h(s).with_gpx?(T(),N("button",{key:0,class:"transparent icon-button",onClick:l[2]||(l[2]=Xe(d=>o(h(s).workoutId),["prevent"])),"aria-label":u.$t("workouts.DOWNLOAD_WORKOUT")},t6e,8,JPe)):F("",!0),p("button",{id:"delete-workout-button",class:"transparent icon-button",onClick:Xe(i,["prevent"]),"aria-label":u.$t("workouts.DELETE_WORKOUT")},a6e,8,n6e)])):h(s).segmentId!==null?(T(),N("div",s6e,[K(_(h(s).title)+" ",1),p("span",o6e,[K(" — "),i6e,K(" "+_(u.$t("workouts.SEGMENT"))+" "+_(h(s).segmentId+1),1)])])):F("",!0),p("div",u6e,[p("time",null,_(h(s).workoutDate)+" - "+_(h(s).workoutTime),1),p("span",c6e,[h(s).type==="SEGMENT"?(T(),te(f,{key:0,to:{name:"Workout",params:{workoutId:h(s).workoutId}}},{default:fe(()=>[K(" > "+_(u.$t("workouts.BACK_TO_WORKOUT")),1)]),_:1},8,["to"])):F("",!0)])])])]),p("button",{class:ge(["workout-next workout-arrow transparent",{inactive:!h(s).nextUrl}]),disabled:!h(s).nextUrl,title:h(s).nextUrl?u.$t(`workouts.NEXT_${h(s).type}`):u.$t(`workouts.NO_NEXT_${h(s).type}`),onClick:l[3]||(l[3]=d=>h(s).nextUrl?u.$router.push(h(s).nextUrl):null)},f6e,10,l6e)])}}}),m6e=ae(p6e,[["__scopeId","data-v-e1628a52"]]),E6e=e=>(ut("data-v-1b247cbe"),e=e(),ct(),e),h6e={key:0,class:"workout-record"},_6e=E6e(()=>p("sup",null,[p("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)),T6e=[_6e],g6e=Q({__name:"WorkoutRecord",props:{recordType:{},workoutObject:{}},setup(e){const t=e,{recordType:n,workoutObject:r}=_e(t);return(a,s)=>h(r).records&&h(r).records.find(o=>o.record_type===h(n))?(T(),N("span",h6e,T6e)):F("",!0)}}),Ms=ae(g6e,[["__scopeId","data-v-1b247cbe"]]),A6e="/img/weather/temperature.svg",S6e="/img/weather/pour-rain.svg",O6e="/img/weather/breeze.svg",I6e=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],v6e=e=>{const t=Math.floor(e/22.5+.5);return I6e[t%16]},R6e={class:"wind"},b6e={class:"wind-bearing"},N6e=["title"],C6e=Q({__name:"WeatherWind",props:{weather:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,weather:r}=_e(t),{t:a}=jt();function s(o){return a(`workouts.WEATHER.WIND_DIRECTIONS.${v6e(o)}`)}return(o,i)=>(T(),N("div",R6e,[K(_(h(U0e)(h(r).wind,h(n)))+" ",1),p("div",b6e,[h(r).windBearing?(T(),N("i",{key:0,class:"fa fa-long-arrow-down",style:Yr({transform:`rotate(${h(r).windBearing}deg)`}),"aria-hidden":"true",title:s(h(r).windBearing)},null,12,N6e)):F("",!0)])]))}}),bh=ae(C6e,[["__scopeId","data-v-e1f7f9cc"]]),y6e=e=>(ut("data-v-be2fffb0"),e=e(),ct(),e),D6e={key:0,id:"workout-weather"},P6e={class:"weather-table"},w6e=y6e(()=>p("th",null,null,-1)),L6e={class:"weather-th"},$6e=["src","alt","title"],k6e={class:"weather-th"},U6e=["src","alt","title"],M6e=["alt","title"],x6e=["alt","title"],F6e=["alt","title"],W6e=Q({__name:"WorkoutWeather",props:{workoutObject:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,workoutObject:r}=_e(t);return(a,s)=>h(r).weatherStart&&h(r).weatherEnd?(T(),N("div",D6e,[p("table",P6e,[p("thead",null,[p("tr",null,[w6e,p("th",null,[p("div",L6e,[K(_(a.$t("workouts.START"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherStart.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`)},null,8,$6e)])]),p("th",null,[p("div",k6e,[K(_(a.$t("workouts.END"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherEnd.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`)},null,8,U6e)])])])]),p("tbody",null,[p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:A6e,alt:a.$t("workouts.WEATHER.TEMPERATURE"),title:a.$t("workouts.WEATHER.TEMPERATURE")},null,8,M6e)]),p("td",null,_(h(zm)(h(r).weatherStart.temperature,h(n))),1),p("td",null,_(h(zm)(h(r).weatherEnd.temperature,h(n))),1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:S6e,alt:a.$t("workouts.WEATHER.HUMIDITY"),title:a.$t("workouts.WEATHER.HUMIDITY")},null,8,x6e)]),p("td",null,_(Number(h(r).weatherStart.humidity*100).toFixed(1))+"% ",1),p("td",null,_(Number(h(r).weatherEnd.humidity*100).toFixed(1))+"% ",1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:O6e,alt:a.$t("workouts.WEATHER.WIND"),title:a.$t("workouts.WEATHER.WIND")},null,8,F6e)]),p("td",null,[M(bh,{weather:h(r).weatherStart,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])]),p("td",null,[M(bh,{weather:h(r).weatherEnd,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])])])])])])):F("",!0)}}),G6e=ae(W6e,[["__scopeId","data-v-be2fffb0"]]),Ia=e=>(ut("data-v-9341b3e8"),e=e(),ct(),e),z6e={id:"workout-info"},B6e={class:"workout-data"},H6e=Ia(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),j6e={class:"label"},V6e={class:"value"},K6e={key:0},Y6e={class:"value"},q6e={class:"value"},X6e={key:0,class:"workout-data"},Z6e=Ia(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),Q6e={class:"label"},J6e={key:1,class:"workout-data"},ewe=Ia(()=>p("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)),twe={class:"label"},nwe=Ia(()=>p("br",null,null,-1)),rwe={class:"label"},awe={key:2,class:"workout-data"},swe=["alt"],owe={class:"label"},iwe=Ia(()=>p("br",null,null,-1)),uwe={class:"label"},cwe={key:3,class:"workout-data"},lwe=Ia(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),dwe={class:"label"},fwe=Ia(()=>p("br",null,null,-1)),pwe={class:"label"},mwe=Q({__name:"WorkoutData",props:{workoutObject:{},useImperialUnits:{type:Boolean},displayHARecord:{type:Boolean}},setup(e){const t=e,{displayHARecord:n,workoutObject:r,useImperialUnits:a}=_e(t),s=k(()=>t.workoutObject.pauses!=="0:00:00"&&t.workoutObject.pauses!==null);return(o,i)=>{const u=ue("Distance");return T(),N("div",z6e,[p("div",B6e,[H6e,p("span",j6e,_(o.$t("workouts.DURATION")),1),K(": "),p("span",V6e,_(h(r).moving),1),M(Ms,{workoutObject:h(r),recordType:"LD"},null,8,["workoutObject"]),s.value?(T(),N("div",K6e,[K(" ("+_(o.$t("workouts.PAUSES"))+": ",1),p("span",Y6e,_(h(r).pauses),1),K(" - "+_(o.$t("workouts.TOTAL_DURATION"))+": ",1),p("span",q6e,_(h(r).duration)+")",1)])):F("",!0)]),h(r).distance!==null?(T(),N("div",X6e,[Z6e,p("span",Q6e,_(o.$t("workouts.DISTANCE")),1),K(": "),M(u,{distance:h(r).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"FD"},null,8,["workoutObject"])])):F("",!0),h(r).aveSpeed!==null&&h(r).maxSpeed!==null?(T(),N("div",J6e,[ewe,p("span",twe,_(o.$t("workouts.AVERAGE_SPEED")),1),K(": "),M(u,{distance:h(r).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"AS"},null,8,["workoutObject"]),nwe,p("span",rwe,_(o.$t("workouts.MAX_SPEED")),1),K(": "),M(u,{distance:h(r).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"MS"},null,8,["workoutObject"])])):F("",!0),h(r).maxAlt!==null&&h(r).minAlt!==null?(T(),N("div",awe,[p("img",{class:"mountains",src:BA,alt:o.$t("workouts.ELEVATION")},null,8,swe),p("span",owe,_(o.$t("workouts.MIN_ALTITUDE")),1),K(": "),M(u,{distance:h(r).minAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),iwe,p("span",uwe,_(o.$t("workouts.MAX_ALTITUDE")),1),K(": "),M(u,{distance:h(r).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):F("",!0),h(r).ascent!==null&&h(r).descent!==null?(T(),N("div",cwe,[lwe,p("span",dwe,_(o.$t("workouts.ASCENT")),1),K(": "),M(u,{distance:h(r).ascent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),h(n)?(T(),te(Ms,{key:0,workoutObject:h(r),recordType:"HA"},null,8,["workoutObject"])):F("",!0),fwe,p("span",pwe,_(o.$t("workouts.DESCENT")),1),K(": "),M(u,{distance:h(r).descent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):F("",!0),M(G6e,{workoutObject:h(r),useImperialUnits:h(a)},null,8,["workoutObject","useImperialUnits"])])}}}),Ewe=ae(mwe,[["__scopeId","data-v-9341b3e8"]]);function Ha(e,t){return Array.from(e.getElementsByTagName(t))}function Is(e){return e==null||e.normalize(),e&&e.textContent||""}function ha(e,t,n){const r=e.getElementsByTagName(t),a=r.length?r[0]:null;return a&&n&&n(a),a}function hwe(e,t,n){const r={};if(!e)return r;const a=e.getElementsByTagName(t),s=a.length?a[0]:null;return s&&n?n(s,r):r}function tS(e,t,n){const r=Is(ha(e,t));return r&&n?n(r)||{}:{}}function Nh(e,t,n){const r=parseFloat(Is(ha(e,t)));if(!isNaN(r))return r&&n?n(r)||{}:{}}function _we(e,t,n){const r=parseFloat(Is(ha(e,t)));if(!isNaN(r))return n&&n(r),r}function Kd(e,t){const n={};for(const r of t)tS(e,r,a=>{n[r]=a});return n}function Twe(e){return(e==null?void 0:e.nodeType)===1}function nS(e){return hwe(e,"line",t=>Object.assign({},tS(t,"color",r=>({stroke:`#${r}`})),Nh(t,"opacity",r=>({"stroke-opacity":r})),Nh(t,"width",r=>({"stroke-width":r*96/25.4}))))}function rS(e){let t=[];if(e===null)return t;for(const n of Array.from(e.childNodes)){if(!Twe(n))continue;const r=gwe(n.nodeName);if(r==="gpxtpx:TrackPointExtension")t=t.concat(rS(n));else{const a=Is(n);t.push([r,Awe(a)])}}return t}function gwe(e){return["heart","gpxtpx:hr","hr"].includes(e)?"heart":e}function Awe(e){const t=parseFloat(e);return isNaN(t)?e:t}function aS(e){const t=[parseFloat(e.getAttribute("lon")||""),parseFloat(e.getAttribute("lat")||"")];if(isNaN(t[0])||isNaN(t[1]))return null;_we(e,"ele",r=>{t.push(r)});const n=ha(e,"time");return{coordinates:t,time:n?Is(n):null,extendedValues:rS(ha(e,"extensions"))}}function N0(e){var a;const t=Kd(e,["name","cmt","desc","type","time","keywords"]),n=Array.from(e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const s of n)((a=s.parentNode)==null?void 0:a.parentNode)===e&&(t[s.tagName.replace(":","_")]=Is(s));const r=Ha(e,"link");return r.length&&(t.links=r.map(s=>Object.assign({href:s.getAttribute("href")},Kd(s,["text","type"])))),t}function sS(e,t){const n=Ha(e,t),r=[],a=[],s={};for(let o=0;o1,o=Object.assign({_gpxType:"trk"},N0(e),nS(ha(e,"extensions")),r.length?{coordinateProperties:{times:s?r:r[0]}}:{});for(const i of a){n.push(i.line),o.coordinateProperties||(o.coordinateProperties={});const u=o.coordinateProperties,l=Object.entries(i.extendedValues);for(let c=0;cnew Array(m.line.length).fill(null))),u[f][c]=d):u[f]=d}}return{type:"Feature",properties:o,geometry:s?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}function Iwe(e){const t=Object.assign(N0(e),Kd(e,["sym"])),n=aS(e);return n?{type:"Feature",properties:t,geometry:{type:"Point",coordinates:n.coordinates}}:null}function*vwe(e){for(const t of Ha(e,"trk")){const n=Owe(t);n&&(yield n)}for(const t of Ha(e,"rte")){const n=Swe(t);n&&(yield n)}for(const t of Ha(e,"wpt")){const n=Iwe(t);n&&(yield n)}}function Rwe(e){return{type:"FeatureCollection",features:Array.from(vwe(e))}}const Ch=(e,t)=>{for(const n of Object.keys(t))e.on(n,t[n])},oS=e=>{for(const t of Object.keys(e)){const n=e[t];n&&Mr(n.cancel)&&n.cancel()}},bwe=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),Mr=e=>typeof e=="function",Ir=(e,t,n)=>{for(const r in n){const a="set"+bwe(r);e[a]?Fe(()=>n[r],(s,o)=>{e[a](s,o)}):t[a]&&Fe(()=>n[r],s=>{t[a](s)})}},rr=(e,t,n={})=>{const r={...n};for(const a in e){const s=t[a],o=e[a];s&&(s&&s.custom===!0||o!==void 0&&(r[a]=o))}return r},va=e=>{const t={},n={};for(const r in e)if(r.startsWith("on")&&!r.startsWith("onUpdate")&&r!=="onReady"){const a=r.slice(2).toLocaleLowerCase();t[a]=e[r]}else n[r]=e[r];return{listeners:t,attrs:n}},Nwe=async e=>{const t=await Promise.all([bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.m),__vite__mapDeps([0,1])),bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.b),__vite__mapDeps([0,1])),bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.d),__vite__mapDeps([0,1]))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},Si=e=>{const t=ce((...r)=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...r)=>t.value(...r);return n.wrapped=t,Jt(e,n),n},Oi=(e,t)=>e.wrapped.value=t,Ln=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,bn=e=>{const t=ht(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},vr=Symbol("useGlobalLeaflet"),ea=Symbol("addLayer"),C0=Symbol("removeLayer"),iS=Symbol("registerControl"),uS=Symbol("registerLayerControl"),cS=Symbol("canSetParentHtml"),lS=Symbol("setParentHtml"),dS=Symbol("setIcon"),Cwe=Symbol("bindPopup"),ywe=Symbol("bindTooltip"),Dwe=Symbol("unbindPopup"),Pwe=Symbol("unbindTooltip"),jo={options:{type:Object,default:()=>({}),custom:!0}},Dc=e=>({options:e.options,methods:{}}),vs={...jo,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},y0=(e,t,n)=>{const r=bn(ea),a=bn(C0),{options:s,methods:o}=Dc(e),i=rr(e,vs,s),u=()=>r({leafletObject:t.value}),l=()=>a({leafletObject:t.value}),c={...o,setAttribution(f){l(),t.value.options.attribution=f,e.visible&&u()},setName(){l(),e.visible&&u()},setLayerType(){l(),e.visible&&u()},setVisible(f){t.value&&(f?u():l())},bindPopup(f){if(!t.value||!Mr(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(f)},bindTooltip(f){if(!t.value||!Mr(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(f)},unbindTooltip(){t.value&&(Mr(t.value.closeTooltip)&&t.value.closeTooltip(),Mr(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(Mr(t.value.closePopup)&&t.value.closePopup(),Mr(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(f){n.emit("update:visible",f)}};return Jt(Cwe,c.bindPopup),Jt(ywe,c.bindTooltip),Jt(Dwe,c.unbindPopup),Jt(Pwe,c.unbindTooltip),Rt(()=>{c.unbindPopup(),c.unbindTooltip(),l()}),{options:i,methods:c}},D0=(e,t)=>{if(e&&t.default)return An("div",{style:{display:"none"}},t.default())},wwe={...vs,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},fS={...wwe,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},Lwe={...fS,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...Lwe});const Rs={...jo,position:{type:String}},pS=(e,t)=>{const{options:n,methods:r}=Dc(e),a=rr(e,Rs,n),s={...r,setPosition(o){t.value&&t.value.setPosition(o)}};return Rt(()=>{t.value&&t.value.remove()}),{options:a,methods:s}},$we=e=>e.default?An("div",{ref:"root"},e.default()):null,yh=Q({name:"LControl",props:{...Rs,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const n=ce(),r=ce(),a=ht(vr),s=bn(iS),{options:o,methods:i}=pS(e,n);return gt(async()=>{const{Control:u,DomEvent:l}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(f=>f.e),__vite__mapDeps([0,1])),c=u.extend({onAdd(){return r.value}});n.value=er(new c(o)),Ir(i,n.value,e),s({leafletObject:n.value}),e.disableClickPropagation&&r.value&&l.disableClickPropagation(r.value),e.disableScrollPropagation&&r.value&&l.disableScrollPropagation(r.value),gn(()=>t.emit("ready",n.value))}),{root:r,leafletObject:n}},render(){return $we(this.$slots)}});({...Rs});const mS={...Rs,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},kwe=(e,t)=>{const{options:n}=pS(e,t);return{options:rr(e,mS,n),methods:{addLayer(r){r.layerType==="base"?t.value.addBaseLayer(r.leafletObject,r.name):r.layerType==="overlay"&&t.value.addOverlay(r.leafletObject,r.name)},removeLayer(r){t.value.removeLayer(r.leafletObject)}}}},Uwe=Q({name:"LControlLayers",props:mS,setup(e,t){const n=ce(),r=ht(vr),a=bn(uS),{options:s,methods:o}=kwe(e,n);return gt(async()=>{const{control:i}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(u=>u.e),__vite__mapDeps([0,1]));n.value=er(i.layers(void 0,void 0,s)),Ir(o,n.value,e),a({...e,...o,leafletObject:n.value}),gn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...Rs});({...Rs});const Pc={...vs},ES=(e,t,n)=>{const{options:r,methods:a}=y0(e,t,n),s=rr(e,Pc,r),o={...a,addLayer(i){t.value.addLayer(i.leafletObject)},removeLayer(i){t.value.removeLayer(i.leafletObject)}};return Jt(ea,o.addLayer),Jt(C0,o.removeLayer),{options:s,methods:o}};({...Pc});const hS={...Pc,geojson:{type:[Object,Array],custom:!0},optionsStyle:{type:Function,custom:!0}},Mwe=(e,t,n)=>{const{options:r,methods:a}=ES(e,t,n),s=rr(e,hS,r);Object.prototype.hasOwnProperty.call(e,"optionsStyle")&&(s.style=e.optionsStyle);const o={...a,setGeojson(i){t.value.clearLayers(),t.value.addData(i)},setOptionsStyle(i){t.value.setStyle(i)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:s,methods:o}},xwe=Q({props:hS,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea),{methods:o,options:i}=Mwe(e,n,t);return gt(async()=>{const{geoJSON:u}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=er(u(e.geojson,i));const{listeners:l}=va(t.attrs);n.value.on(l),Ir(o,n.value,e),s({...e,...o,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return D0(this.ready,this.$slots)}}),P0={...vs,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},_S=(e,t,n)=>{const{options:r,methods:a}=y0(e,t,n),s=rr(e,P0,r),o={...a,setTileComponent(){var i;(i=t.value)==null||i.redraw()}};return Rt(()=>{t.value.off()}),{options:s,methods:o}},Fwe=(e,t,n,r)=>e.extend({initialize(a){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,a)},createTile(a){const s=this._tileCoordsToKey(a);this.tileComponents[s]=t.create("div");const o=An({setup:r,props:["coords"]},{coords:a});return g2(o,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(a){const s=this._tileCoordsToKey(a.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});({...P0});const Dh={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},Wwe=Q({name:"LIcon",props:{...Dh,...jo},setup(e,t){const n=ce(),r=ht(vr),a=bn(cS),s=bn(lS),o=bn(dS);let i,u,l,c,f;const d=(b,v,R)=>{const A=b&&b.innerHTML;if(!v){R&&f&&a()&&s(A);return}const{listeners:S}=va(t.attrs);f&&u(f,S);const{options:C}=Dc(e),L=rr(e,Dh,C);A&&(L.html=A),f=L.html?l(L):c(L),i(f,S),o(f)},m=()=>{gn(()=>d(n.value,!0,!1))},E=()=>{gn(()=>d(n.value,!1,!0))},g={setIconUrl:m,setIconRetinaUrl:m,setIconSize:m,setIconAnchor:m,setPopupAnchor:m,setTooltipAnchor:m,setShadowUrl:m,setShadowRetinaUrl:m,setShadowAnchor:m,setBgPos:m,setClassName:m,setHtml:m};return gt(async()=>{const{DomEvent:b,divIcon:v,icon:R}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(A=>A.e),__vite__mapDeps([0,1]));i=b.on,u=b.off,l=v,c=R,Ir(g,{},e),new MutationObserver(E).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),m()}),{root:n}},render(){const e=this.$slots.default?this.$slots.default():void 0;return An("div",{ref:"root"},e)}});({...vs});const Gwe=Q({props:Pc,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea),{methods:o}=ES(e,n,t);return gt(async()=>{const{layerGroup:i}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=er(i(void 0,e.options));const{listeners:u}=va(t.attrs);n.value.on(u),Ir(o,n.value,e),s({...e,...o,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return D0(this.ready,this.$slots)}});function TS(e,t,n){var r,a,s;t===void 0&&(t=50),n===void 0&&(n={});var o=(r=n.isImmediate)!=null&&r,i=(a=n.callback)!=null&&a,u=n.maxWait,l=Date.now(),c=[];function f(){if(u!==void 0){var m=Date.now()-l;if(m+t>=u)return u-m}return t}var d=function(){var m=[].slice.call(arguments),E=this;return new Promise(function(g,b){var v=o&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,l=Date.now(),!o){var A=e.apply(E,m);i&&i(A),c.forEach(function(S){return(0,S.resolve)(A)}),c=[]}},f()),v){var R=e.apply(E,m);return i&&i(R),g(R)}c.push({resolve:g,reject:b})})};return d.cancel=function(m){s!==void 0&&clearTimeout(s),c.forEach(function(E){return(0,E.reject)(m)}),c=[]},d}const Ph={...jo,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},zwe=Q({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:Ph,setup(e,t){const n=ce(),r=xt({ready:!1,layersToAdd:[],layersInControl:[]}),{options:a}=Dc(e),s=rr(e,Ph,a),{listeners:o,attrs:i}=va(t.attrs),u=Si(ea),l=Si(C0),c=Si(iS),f=Si(uS);Jt(vr,e.useGlobalLeaflet);const d=k(()=>{const v={};return e.noBlockingAnimations&&(v.animate=!1),v}),m=k(()=>{const v=d.value;return e.padding&&(v.padding=e.padding),e.paddingTopLeft&&(v.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(v.paddingBottomRight=e.paddingBottomRight),v}),E={moveend:TS(v=>{r.leafletRef&&(t.emit("update:zoom",r.leafletRef.getZoom()),t.emit("update:center",r.leafletRef.getCenter()),t.emit("update:bounds",r.leafletRef.getBounds()))}),overlayadd(v){const R=r.layersInControl.find(A=>A.name===v.name);R&&R.updateVisibleProp(!0)},overlayremove(v){const R=r.layersInControl.find(A=>A.name===v.name);R&&R.updateVisibleProp(!1)}};gt(async()=>{e.useGlobalLeaflet&&(Ln.L=Ln.L||await bt(()=>import("./maps-ZyuCPqes.js").then(G=>G.l),__vite__mapDeps([0,1])));const{map:v,CRS:R,Icon:A,latLngBounds:S,latLng:C,stamp:L}=e.useGlobalLeaflet?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(G=>G.e),__vite__mapDeps([0,1]));try{s.beforeMapMount&&await s.beforeMapMount()}catch(G){console.error(`The following error occurred running the provided beforeMapMount hook ${G.message}`)}await Nwe(A);const $=typeof s.crs=="string"?R[s.crs]:s.crs;s.crs=$||R.EPSG3857;const U={addLayer(G){G.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd.push(G):r.layersInControl.find(B=>L(B.leafletObject)===L(G.leafletObject))||(r.layerControl.addLayer(G),r.layersInControl.push(G))),G.visible!==!1&&r.leafletRef.addLayer(G.leafletObject)},removeLayer(G){G.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd=r.layersToAdd.filter(B=>B.name!==G.name):(r.layerControl.removeLayer(G.leafletObject),r.layersInControl=r.layersInControl.filter(B=>L(B.leafletObject)!==L(G.leafletObject)))),r.leafletRef.removeLayer(G.leafletObject)},registerLayerControl(G){r.layerControl=G,r.layersToAdd.forEach(B=>{r.layerControl.addLayer(B)}),r.layersToAdd=[],c(G)},registerControl(G){r.leafletRef.addControl(G.leafletObject)},setZoom(G){const B=r.leafletRef.getZoom();G!==B&&r.leafletRef.setZoom(G,d.value)},setCrs(G){const B=r.leafletRef.getBounds();r.leafletRef.options.crs=G,r.leafletRef.fitBounds(B,{animate:!1,padding:[0,0]})},fitBounds(G){r.leafletRef.fitBounds(G,m.value)},setBounds(G){if(!G)return;const B=S(G);B.isValid()&&!(r.lastSetBounds||r.leafletRef.getBounds()).equals(B,0)&&(r.lastSetBounds=B,r.leafletRef.fitBounds(B))},setCenter(G){if(G==null)return;const B=C(G),w=r.lastSetCenter||r.leafletRef.getCenter();(w.lat!==B.lat||w.lng!==B.lng)&&(r.lastSetCenter=B,r.leafletRef.panTo(B,d.value))}};Oi(u,U.addLayer),Oi(l,U.removeLayer),Oi(c,U.registerControl),Oi(f,U.registerLayerControl),r.leafletRef=er(v(n.value,s)),Ir(U,r.leafletRef,e),Ch(r.leafletRef,E),Ch(r.leafletRef,o),r.ready=!0,gn(()=>t.emit("ready",r.leafletRef))}),Co(()=>{oS(E),r.leafletRef&&(r.leafletRef.off(),r.leafletRef.remove())});const g=k(()=>r.leafletRef),b=k(()=>r.ready);return{root:n,ready:b,leafletObject:g,attrs:i}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),An("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),Bwe=["Symbol(Comment)","Symbol(Text)"],Hwe=["LTooltip","LPopup"],gS={...vs,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},jwe=(e,t,n)=>{const{options:r,methods:a}=y0(e,t,n),s=rr(e,gS,r),o={...a,setDraggable(i){t.value.dragging&&(i?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(i){n.emit("update:latLng",i.latlng),n.emit("update:lat-lng",i.latlng)},setLatLng(i){if(i!=null&&t.value){const u=t.value.getLatLng();(!u||!u.equals(i))&&t.value.setLatLng(i)}}};return{options:s,methods:o}},Vwe=(e,t)=>{const n=t.slots.default&&t.slots.default();return n&&n.length&&n.some(Kwe)};function Kwe(e){return!(Bwe.includes(e.type.toString())||Hwe.includes(e.type.name))}const AS=Q({name:"LMarker",props:gS,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea);Jt(cS,()=>{var l;return!!((l=n.value)!=null&&l.getElement())}),Jt(lS,l=>{var c,f;const d=Mr((c=n.value)==null?void 0:c.getElement)&&((f=n.value)==null?void 0:f.getElement());d&&(d.innerHTML=l)}),Jt(dS,l=>{var c;return((c=n.value)==null?void 0:c.setIcon)&&n.value.setIcon(l)});const{options:o,methods:i}=jwe(e,n,t),u={moveHandler:TS(i.latLngSync)};return gt(async()=>{const{marker:l,divIcon:c}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(d=>d.e),__vite__mapDeps([0,1]));Vwe(o,t)&&(o.icon=c({className:""})),n.value=er(l(e.latLng,o));const{listeners:f}=va(t.attrs);n.value.on(f),n.value.on("move",u.moveHandler),Ir(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),Co(()=>oS(u)),{ready:r,leafletObject:n}},render(){return D0(this.ready,this.$slots)}}),Ywe={...fS,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},wh={...Ywe},SS={...jo,content:{type:String,default:null}};({...SS});({...wh,latLngs:{...wh.latLngs}});const w0={...P0,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},qwe=(e,t,n)=>{const{options:r,methods:a}=_S(e,t,n),s=rr(e,w0,r),o={...a};return{options:s,methods:o}},Xwe=Q({props:w0,setup(e,t){const n=ce(),r=ht(vr),a=bn(ea),{options:s,methods:o}=qwe(e,n,t);return gt(async()=>{const{tileLayer:i}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=er(i(e.url,s));const{listeners:u}=va(t.attrs);n.value.on(u),Ir(o,n.value,e),a({...e,...o,leafletObject:n.value}),gn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...SS});({...w0});const Lh=Q({__name:"CustomMarker",props:{markerCoordinates:{},isStart:{type:Boolean}},setup(e){const t=e,{isStart:n,markerCoordinates:r}=_e(t);return(a,s)=>h(r).latitude?(T(),te(h(AS),{key:0,"lat-lng":[h(r).latitude,h(r).longitude]},{default:fe(()=>[M(h(Wwe),{"icon-url":`/img/workouts/${h(n)?"start":"finish"}.svg`,iconSize:[15,15]},null,8,["icon-url"])]),_:1},8,["lat-lng"])):F("",!0)}}),Zwe=e=>(ut("data-v-dac2dfa0"),e=e(),ct(),e),Qwe={id:"workout-map"},Jwe={key:0,class:"leaflet-container"},eLe={key:1},tLe=Zwe(()=>p("i",{class:"fa fa-refresh","aria-hidden":"true"},null,-1)),nLe={key:1,class:"no-map"},rLe=Q({__name:"index",props:{workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=$e(),{workoutData:r,markerCoordinates:a}=_e(t),s=ce(null),o=k(()=>b()),i=k(()=>n.getters[H.GETTERS.APP_CONFIG]),u=k(()=>E(o)),l=k(()=>t.workoutData&&t.workoutData.gpx?m(t.workoutData.gpx):{}),c=k(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[0].latitude,longitude:t.workoutData.chartData[0].longitude}:{}),f=k(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[t.workoutData.chartData.length-1].latitude,longitude:t.workoutData.chartData[t.workoutData.chartData.length-1].longitude}:{}),d=ce(!1);function m(A){if(!A||A!=="")try{return{jsonData:Rwe(new DOMParser().parseFromString(A,"text/xml"))}}catch{return console.error("Invalid gpx content"),{}}return{}}function E(A){return[(A.value[0][0]+A.value[1][0])/2,(A.value[0][1]+A.value[1][1])/2]}function g(A){var S,C;(S=s.value)!=null&&S.leafletObject&&((C=s.value)==null||C.leafletObject.fitBounds(A))}function b(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]}function v(){var A;(A=s.value)==null||A.leafletObject.fitBounds(b())}function R(){d.value=!d.value,d.value||setTimeout(()=>{v()},100)}return(A,S)=>{const C=ue("VFullscreen");return T(),N("div",Qwe,[h(r).loading?(T(),N("div",Jwe)):(T(),N("div",eLe,[h(r).workout.with_gpx?(T(),te(C,{key:0,modelValue:d.value,"onUpdate:modelValue":S[1]||(S[1]=L=>d.value=L)},{default:fe(()=>[p("div",{class:ge(["leaflet-container",{"fullscreen-map":d.value}])},[l.value.jsonData&&u.value&&o.value.length===2?(T(),te(h(zwe),{key:0,zoom:13,maxZoom:19,center:u.value,bounds:o.value,zoomAnimation:!1,ref_key:"workoutMap",ref:s,onReady:S[0]||(S[0]=L=>g(o.value)),"use-global-leaflet":!1,class:"map"},{default:fe(()=>[M(h(Uwe)),M(h(yh),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":A.$t("workouts.RESET_ZOOM"),onClick:v},{default:fe(()=>[tLe]),_:1},8,["aria-label"]),M(h(yh),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":A.$t(`workouts.${d.value?"EXIT":"VIEW"}_FULLSCREEN`),onClick:R},{default:fe(()=>[p("i",{class:ge(`fa fa-${d.value?"compress":"arrows-alt"}`),"aria-hidden":"true"},null,2)]),_:1},8,["aria-label"]),M(h(Xwe),{url:`${h(wo)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,attribution:i.value.map_attribution,bounds:o.value},null,8,["url","attribution","bounds"]),M(h(xwe),{geojson:l.value.jsonData},null,8,["geojson"]),h(a).latitude?(T(),te(h(AS),{key:0,"lat-lng":[h(a).latitude,h(a).longitude]},null,8,["lat-lng"])):F("",!0),M(h(Gwe),{name:A.$t("workouts.START_AND_FINISH"),"layer-type":"overlay"},{default:fe(()=>[c.value.latitude?(T(),te(Lh,{key:0,markerCoordinates:c.value,isStart:!0},null,8,["markerCoordinates"])):F("",!0),f.value.latitude?(T(),te(Lh,{key:1,markerCoordinates:f.value,isStart:!1},null,8,["markerCoordinates"])):F("",!0)]),_:1},8,["name"])]),_:1},8,["center","bounds"])):F("",!0)],2)]),_:1},8,["modelValue"])):(T(),N("div",nLe,_(A.$t("workouts.NO_MAP")),1))]))])}}}),aLe=ae(rLe,[["__scopeId","data-v-dac2dfa0"]]),sLe={class:"workout-detail"},oLe=Q({__name:"index",props:{authUser:{},displaySegment:{type:Boolean},sports:{},workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=Vt(),r=$e(),{authUser:a,markerCoordinates:s,workoutData:o}=_e(t),i=k(()=>t.workoutData.workout),u=ce(n.params.workoutId?+n.params.segmentId:null),l=k(()=>i.value.segments.length>0&&u.value?i.value.segments[+u.value-1]:null),c=ce(!1),f=k(()=>t.sports?t.sports.find(A=>A.id===t.workoutData.workout.sport_id):{}),d=k(()=>E(i.value,l.value));function m(A,S,C){const L=S&&C&&C!==1?`/workouts/${A.id}/segment/${C-1}`:!S&&A.previous_workout?`/workouts/${A.previous_workout}`:null,$=S&&C&&Cn.params.segmentId,async A=>{A&&(u.value=+A,R())}),Fe(()=>n.params.workoutId,async A=>{A&&(c.value=!1,R())}),(A,S)=>{const C=ue("Modal"),L=ue("Card");return T(),N("div",sLe,[c.value?(T(),te(C,{key:0,title:A.$t("common.CONFIRMATION"),message:A.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:S[0]||(S[0]=$=>v(d.value.workoutId)),onCancelAction:b,onKeydown:At(b,["esc"])},null,8,["title","message"])):F("",!0),M(L,null,{title:fe(()=>[f.value?(T(),te(m6e,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:S[1]||(S[1]=$=>g(!0))},null,8,["sport","workoutObject"])):F("",!0)]),content:fe(()=>[M(aLe,{workoutData:h(o),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),M(Ewe,{workoutObject:d.value,useImperialUnits:h(a).imperial_units,displayHARecord:h(a).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),iLe=ae(oLe,[["__scopeId","data-v-f8b05eca"]]),uLe=e=>{const t=document.getElementById(e);if(t){let n=t.querySelector("ul");return n||(n=document.createElement("ul"),t.appendChild(n)),n}throw new Error("No legend container")},cLe={id:"htmlLegend",afterUpdate(e,t,n){var s,o,i,u,l,c;const r=uLe(n.containerID);for(;r.firstChild;)r.firstChild.remove();((i=(o=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:o.labels)!=null&&i.generateLabels?(c=(l=(u=e.options.plugins)==null?void 0:u.legend)==null?void 0:l.labels)==null?void 0:c.generateLabels(e):[]).forEach(f=>{var b,v,R;if(!((R=(v=(b=e.config.options)==null?void 0:b.scales)==null?void 0:v.yElevation)!=null&&R.display)&&f.datasetIndex===1)return;const d=document.createElement("li");d.onclick=()=>{f.datasetIndex!==void 0&&(e.setDatasetVisibility(f.datasetIndex,!e.isDatasetVisible(f.datasetIndex)),e.update())};const m=document.createElement("input");m&&(m.type="checkbox",m.id=f.text,m.checked=!f.hidden);const E=document.createTextNode(f.text),g=document.createElement("span");g&&(g.style.background=String(f.fillStyle),g.style.borderColor=String(f.strokeStyle)),d.appendChild(m),d.appendChild(E),d.appendChild(g),r.appendChild(d)})}},lLe=e=>(ut("data-v-b15bb69d"),e=e(),ct(),e),dLe={id:"workout-chart"},fLe={class:"chart-radio"},pLe=["checked"],mLe=["checked"],ELe=lLe(()=>p("div",{id:"chart-legend"},null,-1)),hLe={class:"line-chart"},_Le={class:"chart-info"},TLe={class:"no-data-cleaning"},gLe={key:0,class:"elevation-start"},ALe=["checked"],SLe=Q({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,r=t,a=yf(),{t:s}=jt(),{authUser:o,workoutData:i}=_e(n),u=k(()=>a.getters[H.GETTERS.DARK_MODE]),l=k(()=>Cf(u.value)),c=ce(!0),f=ce(o.value.start_elevation_at_zero),d=k(()=>V3e(i.value.chartData,s,o.value.imperial_units,l.value)),m=k(()=>d.value&&d.value.datasets.elevation.data.length>0),E=B("km"),g=B("m"),b=k(()=>({labels:c.value?d.value.distance_labels:d.value.duration_labels,datasets:JSON.parse(JSON.stringify([d.value.datasets.speed,d.value.datasets.elevation]))})),v=k(()=>d.value.coordinates),R=k(()=>({color:l.value?Gr.darkMode.line:Gr.ligthMode.line})),A=k(()=>({color:l.value?Gr.darkMode.text:Gr.ligthMode.text})),S=k(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:22}},scales:{x:{grid:{drawOnChartArea:!1,...R.value},border:{...R.value},ticks:{count:10,callback:function(w){return c.value?Number(w).toFixed(2):$(w)},...A.value},type:"linear",bounds:"data",title:{display:!0,text:c.value?s("workouts.DISTANCE")+` (${E})`:s("workouts.DURATION"),...A.value}},ySpeed:{grid:{drawOnChartArea:!1,...R.value},border:{...R.value},position:"left",title:{display:!0,text:s("workouts.SPEED")+` (${E}/h)`,...A.value},ticks:{...A.value}},yElevation:{beginAtZero:f.value,display:m.value,grid:{drawOnChartArea:!1,...R.value},border:{...R.value},position:"right",title:{display:!0,text:s("workouts.ELEVATION")+` (${g})`,...A.value},ticks:{...A.value}}},elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(w){const Z=` ${w.dataset.label}: ${w.formattedValue}`;return w.dataset.yAxisID==="yElevation"?Z+` ${g}`:Z+` ${E}/h`},title:function(w){return w.length>0&&U(v.value[w[0].dataIndex]),w.length===0?"":c.value?`${s("workouts.DISTANCE")}: ${w[0].label} ${E}`:`${s("workouts.DURATION")}: ${$(w[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:m.value}}})),C=[cLe];function L(){c.value=!c.value}function $(w){return new Date(+w*1e3).toISOString().substr(11,8)}function U(w){r("getCoordinates",w)}function G(){U({latitude:null,longitude:null})}function B(w){return n.authUser.imperial_units?$n[w].defaultTarget:w}return(w,Z)=>{const J=ue("Card");return T(),N("div",dLe,[M(J,null,{title:fe(()=>[K(_(w.$t("workouts.ANALYSIS")),1)]),content:fe(()=>[p("div",fLe,[p("label",null,[p("input",{type:"radio",name:"distance",checked:c.value,onClick:L},null,8,pLe),K(" "+_(w.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"duration",checked:!c.value,onClick:L},null,8,mLe),K(" "+_(w.$t("workouts.DURATION")),1)])]),ELe,p("div",hLe,[M(h(GCe),{data:b.value,options:S.value,plugins:C,onMouseleave:G},null,8,["data","options"])]),p("div",_Le,[p("div",TLe,_(w.$t("workouts.NO_DATA_CLEANING")),1),m.value?(T(),N("div",gLe,[p("label",null,[p("input",{type:"checkbox",checked:f.value,onClick:Z[0]||(Z[0]=re=>f.value=!f.value)},null,8,ALe),K(" "+_(w.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):F("",!0)])]),_:1})])}}}),OLe=ae(SLe,[["__scopeId","data-v-b15bb69d"]]),ILe={id:"workout-note"},vLe=["innerHTML"],RLe=Q({__name:"WorkoutNotes",props:{notes:{default:()=>""}},setup(e){const t=e,{notes:n}=_e(t);return(r,a)=>{const s=ue("Card");return T(),N("div",ILe,[M(s,null,{title:fe(()=>[K(_(r.$t("workouts.NOTES")),1)]),content:fe(()=>[p("span",{innerHTML:h(n)&&h(n)!==""?h(vo)(h(n)):r.$t("workouts.NO_NOTES")},null,8,vLe)]),_:1})])}}}),bLe=ae(RLe,[["__scopeId","data-v-f3e81eff"]]),NLe={id:"workout-segments"},CLe=Q({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:r}=_e(t);return(a,s)=>{const o=ue("router-link"),i=ue("Distance"),u=ue("Card");return T(),N("div",NLe,[M(u,null,{title:fe(()=>[K(_(a.$t("workouts.SEGMENT",2)),1)]),content:fe(()=>[p("ul",null,[(T(!0),N(Ie,null,xe(h(n),(l,c)=>(T(),N("li",{key:l.segment_id},[M(o,{to:{name:"WorkoutSegment",params:{workoutId:l.workout_id,segmentId:c+1}}},{default:fe(()=>[K(_(a.$t("workouts.SEGMENT",1))+" "+_(c+1),1)]),_:2},1032,["to"]),K(" ("+_(a.$t("workouts.DISTANCE"))+": ",1),M(i,{distance:l.distance,unitFrom:"km",useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),K(", "+_(a.$t("workouts.DURATION"))+": "+_(l.duration)+") ",1)]))),128))])]),_:1})])}}}),yLe=ae(CLe,[["__scopeId","data-v-15725c61"]]),DLe=e=>(ut("data-v-eac6aa4b"),e=e(),ct(),e),PLe={id:"workout",class:"view"},wLe={class:"container"},LLe={key:0,class:"workout-container"},$Le={key:0},kLe=DLe(()=>p("div",{id:"bottom"},null,-1)),ULe={key:1},MLe=Q({__name:"Workout",props:{displaySegment:{type:Boolean}},setup(e){const t=e,n=Vt(),r=$e(),{displaySegment:a}=_e(t),s=k(()=>r.getters[Te.GETTERS.WORKOUT_DATA]),o=k(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]),i=k(()=>r.getters[$t.GETTERS.SPORTS]),u=ce({latitude:null,longitude:null});It(()=>{const c={workoutId:n.params.workoutId};t.displaySegment&&(c.segmentId=n.params.segmentId),r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,c)}),Rt(()=>{r.commit(Te.MUTATIONS.EMPTY_WORKOUT)});function l(c){u.value={latitude:c.latitude,longitude:c.longitude}}return Fe(()=>n.params.workoutId,async c=>{c&&r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:c})}),Fe(()=>n.params.segmentId,async c=>{if(n.params.workoutId){const f={workoutId:n.params.workoutId};c&&(f.segmentId=c),r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,f)}}),(c,f)=>(T(),N("div",PLe,[p("div",wLe,[i.value.length>0?(T(),N("div",LLe,[s.value.workout.id?(T(),N("div",$Le,[M(iLe,{workoutData:s.value,sports:i.value,authUser:o.value,markerCoordinates:u.value,displaySegment:h(a)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),s.value.workout.with_gpx&&s.value.chartData.length>0?(T(),te(OLe,{key:0,workoutData:s.value,authUser:o.value,displaySegment:h(a),onGetCoordinates:l},null,8,["workoutData","authUser","displaySegment"])):F("",!0),!h(a)&&s.value.workout.segments.length>1?(T(),te(yLe,{key:1,segments:s.value.workout.segments,useImperialUnits:o.value.imperial_units},null,8,["segments","useImperialUnits"])):F("",!0),h(a)?F("",!0):(T(),te(bLe,{key:2,notes:s.value.workout.notes},null,8,["notes"])),kLe])):(T(),N("div",ULe,[s.value.loading?F("",!0):(T(),te(I0,{key:0,target:"WORKOUT"}))]))])):F("",!0)])]))}}),$h=ae(MLe,[["__scopeId","data-v-eac6aa4b"]]),xLe=e=>(ut("data-v-29caaf8f"),e=e(),ct(),e),FLe={class:"workouts-filters"},WLe={class:"box"},GLe={class:"form-all-items"},zLe={class:"form-items-group"},BLe={class:"form-item"},HLe=["value"],jLe={class:"form-item"},VLe=["value"],KLe={class:"form-items-group"},YLe={class:"form-item"},qLe=["value"],XLe=xLe(()=>p("option",{value:""},null,-1)),ZLe=["value"],QLe={class:"form-item form-item-title"},JLe={class:"form-inputs-group"},e8e=["value"],t8e={class:"form-items-group"},n8e={class:"form-item"},r8e={class:"form-inputs-group"},a8e=["value"],s8e=["value"],o8e={class:"form-items-group"},i8e={class:"form-item"},u8e={class:"form-inputs-group"},c8e=["value"],l8e=["value"],d8e={class:"form-items-group"},f8e={class:"form-item"},p8e={class:"form-inputs-group"},m8e=["value"],E8e=["value"],h8e={class:"form-items-group"},_8e={class:"form-item"},T8e={class:"form-inputs-group"},g8e=["value"],A8e=["value"],S8e={class:"form-button"},O8e=Q({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,r=t,{t:a}=jt(),s=Vt(),o=Zr(),{authUser:i}=_e(n),u=i.value.imperial_units?$n.km.defaultTarget:"km",l=k(()=>Jr(n.sports,a));let c=Object.assign({},s.query);gt(()=>{const E=document.getElementById("from");E&&E.focus()});function f(E){const g=E.target.name,b=E.target.value;b===""?delete c[g]:c[g]=b}function d(){r("filter"),"page"in c&&(c.page="1"),o.push({path:"/workouts",query:c})}function m(){r("filter"),o.push({path:"/workouts",query:{}})}return Fe(()=>s.query,E=>{c=Object.assign({},E)}),(E,g)=>(T(),N("div",FLe,[p("div",WLe,[p("form",{onSubmit:Xe(d,["prevent"]),class:"form"},[p("div",GLe,[p("div",zLe,[p("div",BLe,[p("label",null,_(E.$t("workouts.FROM"))+": ",1),p("input",{id:"from",name:"from",type:"date",value:E.$route.query.from,onChange:f},null,40,HLe)]),p("div",jLe,[p("label",null,_(E.$t("workouts.TO"))+": ",1),p("input",{name:"to",type:"date",value:E.$route.query.to,onChange:f},null,40,VLe)])]),p("div",KLe,[p("div",YLe,[p("label",null,_(E.$t("workouts.SPORT",1))+":",1),p("select",{name:"sport_id",value:E.$route.query.sport_id,onChange:f,onKeyup:At(d,["enter"])},[XLe,(T(!0),N(Ie,null,xe(l.value.filter(b=>h(i).sports_list.includes(b.id)),b=>(T(),N("option",{value:b.id,key:b.id},_(b.translatedLabel),9,ZLe))),128))],40,qLe)]),p("div",QLe,[p("label",null,_(E.$t("workouts.TITLE",1))+":",1),p("div",JLe,[p("input",{class:"title",name:"title",value:E.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:At(d,["enter"])},null,40,e8e)])])]),p("div",t8e,[p("div",n8e,[p("label",null,_(E.$t("workouts.DISTANCE"))+" ("+_(h(u))+"): ",1),p("div",r8e,[p("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_from,onChange:f,onKeyup:At(d,["enter"])},null,40,a8e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_to,onChange:f,onKeyup:At(d,["enter"])},null,40,s8e)])])]),p("div",o8e,[p("div",i8e,[p("label",null,_(E.$t("workouts.DURATION"))+": ",1),p("div",u8e,[p("input",{name:"duration_from",value:E.$route.query.duration_from,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,c8e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{name:"duration_to",value:E.$route.query.duration_to,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,l8e)])])]),p("div",d8e,[p("div",f8e,[p("label",null,_(E.$t("workouts.AVE_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",p8e,[p("input",{min:"0",name:"ave_speed_from",value:E.$route.query.ave_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,m8e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{min:"0",name:"ave_speed_to",value:E.$route.query.ave_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,E8e)])])]),p("div",h8e,[p("div",_8e,[p("label",null,_(E.$t("workouts.MAX_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",T8e,[p("input",{min:"0",name:"max_speed_from",value:E.$route.query.max_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,g8e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{min:"0",name:"max_speed_to",value:E.$route.query.max_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,A8e)])])])]),p("div",S8e,[p("button",{type:"submit",class:"confirm",onClick:d},_(E.$t("buttons.FILTER")),1),p("button",{class:"confirm",onClick:m},_(E.$t("buttons.CLEAR_FILTER")),1)])],32)])]))}}),I8e=ae(O8e,[["__scopeId","data-v-29caaf8f"]]),OS=e=>(ut("data-v-bb980a00"),e=e(),ct(),e),v8e={class:"workouts-list"},R8e={class:"total"},b8e={class:"total-label"},N8e={key:0},C8e={key:0,class:"workouts-table responsive-table"},y8e=OS(()=>p("th",{class:"sport-col"},null,-1)),D8e={class:"sport-col"},P8e={class:"cell-heading"},w8e=["onMouseover"],L8e={class:"cell-heading"},$8e={key:0,class:"fa fa-map-o","aria-hidden":"true"},k8e={class:"title"},U8e={class:"workout-date"},M8e={class:"cell-heading"},x8e={class:"text-right"},F8e={class:"cell-heading"},W8e={class:"text-right"},G8e={class:"cell-heading"},z8e={class:"text-right"},B8e={class:"cell-heading"},H8e={class:"text-right"},j8e={class:"cell-heading"},V8e={class:"text-right"},K8e={class:"cell-heading"},Y8e={class:"text-right"},q8e={class:"cell-heading"},X8e=OS(()=>p("div",{id:"bottom"},null,-1)),Z8e=Q({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=$e(),r=Vt(),a=Zr(),{user:s,sports:o}=_e(t),i=["ave_speed","distance","duration","workout_date"],u=k(()=>n.getters[Te.GETTERS.USER_WORKOUTS]),l=k(()=>n.getters[Te.GETTERS.WORKOUTS_PAGINATION]),c=k(()=>n.getters[H.GETTERS.LANGUAGE]);let f=g(r.query);const d=ce(null);It(()=>{m(f)});function m(R){n.dispatch(Te.ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?b(R):R)}function E(R,A){const S=Object.assign({},r.query);S[R]=A,R==="per_page"&&(S.page="1"),f=g(S),a.push({path:"/workouts",query:f})}function g(R){const A=Wd(R,i,bo.order_by,{defaultSort:bo.order});return Object.keys(R).filter(S=>zAe.includes(S)).map(S=>{typeof R[S]=="string"&&(A[S]=R[S])}),A}function b(R){const A={...R};return Object.entries(A).map(S=>{S[0].match("speed|distance")&&S[1]&&(A[S[0]]=sn(+S[1],"mi","km"))}),A}function v(R){d.value=R}return Fe(()=>r.query,async R=>{f=g(R),m(f)}),(R,A)=>{const S=ue("SportImage"),C=ue("router-link"),L=ue("Distance");return T(),N("div",v8e,[p("div",{class:ge(["box",{"empty-table":u.value.length===0}])},[p("div",R8e,[p("span",b8e,_(R.$t("common.TOTAL").toLowerCase())+": ",1),l.value.total?(T(),N("span",N8e,_(l.value.total)+" "+_(R.$t("workouts.WORKOUT",l.value.total)),1)):F("",!0)]),M(hA,{sort:h(g0),order_by:i,query:h(f),message:"workouts",onUpdateSelect:E},null,8,["sort","query"]),u.value.length>0?(T(),N("div",C8e,[M(Wu,{class:"top-pagination",pagination:l.value,path:"/workouts",query:h(f)},null,8,["pagination","query"]),p("table",null,[p("thead",{class:ge({smaller:c.value==="de"})},[p("tr",null,[y8e,p("th",null,_(St(R.$t("workouts.WORKOUT",1))),1),p("th",null,_(St(R.$t("workouts.DATE"))),1),p("th",null,_(St(R.$t("workouts.DISTANCE"))),1),p("th",null,_(St(R.$t("workouts.DURATION"))),1),p("th",null,_(St(R.$t("workouts.AVE_SPEED"))),1),p("th",null,_(St(R.$t("workouts.MAX_SPEED"))),1),p("th",null,_(St(R.$t("workouts.ASCENT"))),1),p("th",null,_(St(R.$t("workouts.DESCENT"))),1)])],2),p("tbody",null,[(T(!0),N(Ie,null,xe(u.value,$=>(T(),N("tr",{key:$.id},[p("td",D8e,[p("span",P8e,_(R.$t("workouts.SPORT",1)),1),h(o).length>0?(T(),te(S,{key:0,title:h(o).filter(U=>U.id===$.sport_id)[0].translatedLabel,"sport-label":h(_0)($,h(o)),color:h(T0)($,h(o))},null,8,["title","sport-label","color"])):F("",!0)]),p("td",{class:"workout-title",onMouseover:U=>v($.id),onMouseleave:A[0]||(A[0]=U=>v(null))},[p("span",L8e,_(St(R.$t("workouts.WORKOUT",1))),1),M(C,{class:"nav-item",to:{name:"Workout",params:{workoutId:$.id}}},{default:fe(()=>[$.with_gpx?(T(),N("i",$8e)):F("",!0),p("span",k8e,_($.title),1)]),_:2},1032,["to"]),$.with_gpx&&d.value===$.id?(T(),te(HA,{key:0,workout:$,"display-hover":!0},null,8,["workout"])):F("",!0)],40,w8e),p("td",U8e,[p("span",M8e,_(R.$t("workouts.DATE")),1),p("time",null,_(h(xn)($.workout_date,h(s).timezone,h(s).date_format)),1)]),p("td",x8e,[p("span",F8e,_(R.$t("workouts.DISTANCE")),1),$.distance!==null?(T(),te(L,{key:0,distance:$.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",W8e,[p("span",G8e,_(R.$t("workouts.DURATION")),1),K(" "+_($.moving),1)]),p("td",z8e,[p("span",B8e,_(R.$t("workouts.AVE_SPEED")),1),$.ave_speed!==null?(T(),te(L,{key:0,distance:$.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",H8e,[p("span",j8e,_(R.$t("workouts.MAX_SPEED")),1),$.max_speed!==null?(T(),te(L,{key:0,distance:$.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",V8e,[p("span",K8e,_(R.$t("workouts.ASCENT")),1),$.ascent!==null?(T(),te(L,{key:0,distance:$.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",Y8e,[p("span",q8e,_(R.$t("workouts.DESCENT")),1),$.descent!==null?(T(),te(L,{key:0,distance:$.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)])]))),128))])]),M(Wu,{pagination:l.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):F("",!0)],2),u.value.length===0?(T(),te(R0,{key:0})):F("",!0),X8e])}}}),Q8e=ae(Z8e,[["__scopeId","data-v-bb980a00"]]),J8e={key:0,id:"workouts",class:"view"},e$e={class:"container workouts-container"},t$e={class:"display-filters"},n$e={class:"list-container"},r$e=Q({__name:"WorkoutsView",setup(e){const{t}=jt(),n=$e(),r=k(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=k(()=>n.getters[$t.GETTERS.SPORTS]),s=k(()=>Jr(a.value,t)),o=ce(!0);function i(){o.value=!o.value}return(u,l)=>r.value.username?(T(),N("div",J8e,[p("div",e$e,[p("div",{class:ge(["filters-container",{hidden:o.value}])},[M(I8e,{sports:s.value,authUser:r.value,onFilter:i},null,8,["sports","authUser"])],2),p("div",t$e,[p("div",{onClick:i},[p("i",{class:ge(`fa fa-caret-${o.value?"down":"up"}`),"aria-hidden":"true"},null,2),p("span",null,_(u.$t(`workouts.${o.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),p("div",n$e,[M(Q8e,{user:r.value,sports:s.value},null,8,["user","sports"])])])])):F("",!0)}}),a$e=ae(r$e,[["__scopeId","data-v-3fa59b88"]]),{t:kh}=ga.global,Uh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},s$e=[{path:"/",name:"Dashboard",component:s4e,meta:{title:"dashboard.DASHBOARD"}},{path:"/login",name:"Login",component:vh,props:{action:"login"},meta:{title:"user.LOGIN",withoutAuth:!0}},{path:"/register",name:"Register",component:vh,props:{action:"register"},meta:{title:"user.REGISTER",withoutAuth:!0}},{path:"/account-confirmation",name:"AccountConfirmation",component:_De,meta:{title:"user.ACCOUNT_CONFIRMATION",withoutAuth:!0}},{path:"/account-confirmation/resend",name:"AccountConfirmationResend",component:Ih,props:{action:"account-confirmation-resend"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/account-confirmation/email-sent",name:"AccountConfirmationEmailSend",component:Ih,props:{action:"email-sent"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/password-reset/sent",name:"PasswordEmailSent",component:Ai,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:Ai,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:Ai,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:Ai,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:SDe,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:YDe,children:[{path:"",name:"UserProfile",component:_Oe,props:e=>({tab:Uh(e.path)}),children:[{path:"",name:"UserInfos",component:bA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:FOe,meta:{title:"user.PROFILE.TABS.PREFERENCES"}},{path:"sports",name:"UserSportPreferences",component:mh,props:{isEdition:!1},meta:{title:"user.PROFILE.TABS.SPORTS"}},{path:"apps",name:"UserApps",component:Bbe,children:[{path:"",name:"UserAppsList",component:cNe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id",name:"UserApp",component:ph,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id/created",name:"CreatedUserApp",component:ph,props:{afterCreation:!0},meta:{title:"user.PROFILE.TABS.APPS"}},{path:"new",name:"AddUserApp",component:Dbe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:Gbe,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:GOe,props:e=>({tab:Uh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:Fve,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:Ive,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:qve,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:KRe,meta:{title:"user.PROFILE.EDIT_PREFERENCES"}},{path:"sports",name:"UserSportPreferencesEdition",component:mh,props:{isEdition:!0},meta:{title:"user.PROFILE.EDIT_SPORTS_PREFERENCES"}},{path:"privacy-policy",name:"UserPrivacyPolicy",component:ibe,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:k4e,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:Rh,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:a$e,meta:{title:"workouts.WORKOUT",count:0}},{path:"/workouts/:workoutId",name:"Workout",component:$h,props:{displaySegment:!1},meta:{title:"workouts.WORKOUT"}},{path:"/workouts/:workoutId/edit",name:"EditWorkout",component:zPe,meta:{title:"workouts.EDIT_WORKOUT"}},{path:"/workouts/:workoutId/segment/:segmentId",name:"WorkoutSegment",component:$h,props:{displaySegment:!0},meta:{title:"workouts.SEGMENT",count:0}},{path:"/workouts/add",name:"AddWorkout",component:FPe,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:S3e,children:[{path:"",name:"AdministrationMenu",component:cAe,meta:{title:"admin.ADMINISTRATION"}},{path:"application",name:"ApplicationAdministration",component:HE,meta:{title:"admin.APP_CONFIG.TITLE"}},{path:"application/edit",name:"ApplicationAdministrationEdition",component:HE,props:{edition:!0},meta:{title:"admin.APPLICATION"}},{path:"sports",name:"SportsAdministration",component:wAe,meta:{title:"admin.SPORTS.TITLE"}},{path:"users/:username",name:"UserFromAdmin",component:Rh,props:{fromAdmin:!0},meta:{title:"admin.USER",count:1}},{path:"users",name:"UsersAdministration",component:XSe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:d3e,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:d4e,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:i4e,meta:{title:"error.NOT_FOUND.PAGE"}}],IS=Wpe({history:npe("/"),routes:s$e});IS.beforeEach((e,t,n)=>{if("title"in e.meta){const r=typeof e.meta.title=="string"?e.meta.title:"",a=r?typeof e.meta.count=="number"?kh(r,+e.meta.count):kh(r):"";window.document.title=`FitTrackee${r?` - ${St(a)}`:""}`}eo.dispatch(Y.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(eo.getters[Y.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!eo.getters[Y.GETTERS.IS_AUTHENTICATED]&&!e.meta.withoutAuth){const r=e.path==="/"?{path:"/login"}:{path:"/login",query:{from:e.fullPath}};n(r)}else n()}).catch(r=>{console.error(r),n()})});const _t=IS;Yd.register(RS,bS,NS,CS,yS,DS,PS,Mh,wS,xh,LS,$S);const vS=A2(A0e).provide("sportColors",h0).use(ga).use(eo).use(_t).use(sR,{name:"VFullscreen"}).directive("click-outside",Ehe);mhe.forEach(e=>{vS.component(e.name,e.target)});vS.mount("#app");
+ C512.001,172.24,506.387,166.626,499.487,166.626z"> `,7),wDe=[PDe];function LDe(e,t,n,r,a,s){return T(),N("svg",DDe,wDe)}const $De=ae(yDe,[["render",LDe]]),kDe={id:"password-action-done",class:"center-card with-margin"},UDe={class:"password-message"},MDe={key:0},xDe=Q({__name:"PasswordActionDone",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=ue("router-link"),o=ue("i18n-t");return T(),N("div",kDe,[h(n)==="request-sent"?(T(),te(QA,{key:0})):(T(),te($De,{key:1})),p("div",UDe,[h(n)==="request-sent"?(T(),N("span",MDe,_(r.$t("user.PASSWORD_SENT_EMAIL_TEXT")),1)):(T(),te(o,{key:1,keypath:"user.PASSWORD_UPDATED"},{default:fe(()=>[M(s,{to:"/login"},{default:fe(()=>[K(_(r.$t("common.HERE")),1)]),_:1})]),_:1}))])])}}}),FDe=ae(xDe,[["__scopeId","data-v-ee1004fc"]]),WDe={id:"password-reset-request",class:"center-card with-margin"},GDe=Q({__name:"PasswordResetForm",props:{action:{},token:{default:""}},setup(e){const t=e,{action:n,token:r}=_e(t);return(a,s)=>{const o=ue("Card");return T(),N("div",WDe,[M(o,null,{title:fe(()=>[K(_(a.$t("user.RESET_PASSWORD")),1)]),content:fe(()=>[M(b0,{action:h(n),token:h(r)},null,8,["action","token"])]),_:1})])}}}),zDe=ae(GDe,[["__scopeId","data-v-97f01ba1"]]),BDe={id:"password-reset",class:"view"},HDe={class:"container"},jDe=Q({__name:"PasswordResetView",props:{action:{}},setup(e){const t=e,n=Vt(),r=Zr(),{action:a}=_e(t),s=k(()=>n.query.token);return It(()=>{t.action==="reset"&&!s.value&&r.push("/")}),(o,i)=>(T(),N("div",BDe,[p("div",HDe,[h(a).startsWith("reset")?(T(),te(zDe,{key:0,action:h(a),token:s.value},null,8,["action","token"])):(T(),te(FDe,{key:1,action:h(a)},null,8,["action"]))])]))}}),Ai=ae(jDe,[["__scopeId","data-v-5cbe9029"]]),VDe=e=>(ut("data-v-af92ad3a"),e=e(),ct(),e),KDe={key:0,id:"profile",class:"view"},YDe=VDe(()=>p("div",{id:"bottom"},null,-1)),qDe=Q({__name:"ProfileView",setup(e){const t=$e(),n=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]);return(r,a)=>{const s=ue("router-view");return n.value.username?(T(),N("div",KDe,[M(s,{user:n.value},null,8,["user"]),YDe])):F("",!0)}}}),XDe=ae(qDe,[["__scopeId","data-v-af92ad3a"]]),ZDe={key:0,id:"user",class:"view"},QDe={class:"box"},JDe=Q({__name:"UserView",props:{fromAdmin:{type:Boolean}},setup(e){const t=e,{fromAdmin:n}=_e(t),r=Vt(),a=$e(),s=k(()=>a.getters[Ce.GETTERS.USER]);return It(()=>{r.params.username&&typeof r.params.username=="string"&&a.dispatch(Ce.ACTIONS.GET_USER,r.params.username)}),Co(()=>{a.dispatch(Ce.ACTIONS.EMPTY_USER)}),(o,i)=>s.value.username?(T(),N("div",ZDe,[M(vA,{user:s.value},null,8,["user"]),p("div",QDe,[M(bA,{user:s.value,"from-admin":h(n)},null,8,["user","from-admin"])])])):F("",!0)}}),Rh=ae(JDe,[["__scopeId","data-v-1b7a0b4f"]]),ePe={id:"workout-form"},tPe={class:"form-items"},nPe={key:0,class:"form-item-radio"},rPe=["checked","disabled"],aPe={for:"withGpx"},sPe=["checked","disabled"],oPe={for:"withoutGpx"},iPe={class:"form-item"},uPe=["disabled"],cPe=["value"],lPe={key:1,class:"form-item"},dPe={for:"gpxFile"},fPe=["disabled"],pPe={class:"files-help info-box"},mPe={key:2,class:"form-item"},EPe={for:"title"},hPe=["required","disabled"],_Pe={key:3},TPe={class:"workout-date-duration"},gPe={class:"form-item"},APe={class:"workout-date-time"},SPe=["disabled"],OPe=["disabled"],IPe={class:"form-item"},vPe=["disabled"],RPe=["disabled"],bPe=["disabled"],NPe={class:"workout-data"},CPe={class:"form-item"},yPe=["disabled"],DPe={class:"form-item"},PPe=["disabled"],wPe={class:"form-item"},LPe=["disabled"],$Pe={class:"form-item"},kPe={key:1},UPe={key:2,class:"form-buttons"},MPe=["disabled"],xPe=Q({__name:"WorkoutEdition",props:{authUser:{},sports:{},isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:()=>({})}},setup(e){const t=e,{t:n}=jt(),r=$e(),a=Zr(),{authUser:s,workout:o,isCreation:i,loading:u}=_e(t),l=k(()=>Jr(t.sports,n,"is_active_for_user",o.value.id?[o.value.sport_id]:[])),c=k(()=>r.getters[H.GETTERS.APP_CONFIG]),f=c.value.max_single_file_size?tu(c.value.max_single_file_size):"",d=c.value.gpx_limit_import,m=c.value.max_zip_file_size?tu(c.value.max_zip_file_size):"",E=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),g=xt({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:"",workoutAscent:"",workoutDescent:""}),b=ce(o.value.id?o.value.with_gpx:i.value);let v=null;const R=ce(!1),A=ce([]);gt(()=>{let P;t.workout.id?($(t.workout),P=document.getElementById("sport")):P=document.getElementById("withGpx"),P&&P.focus()});function S(P){g.notes=P}function C(){b.value=!b.value,R.value=!1}function L(P){P.target.files&&(v=P.target.files[0])}function $(P){if(g.sport_id=`${P.sport_id}`,g.title=P.title,g.notes=P.notes,!P.with_gpx){const z=OA(yc(P.workout_date,t.authUser.timezone),"yyyy-MM-dd"),V=P.duration.split(":");g.workoutDistance=`${s.value.imperial_units?sn(P.distance,"km","mi",3):parseFloat(P.distance.toFixed(3))}`,g.workoutDate=z.workout_date,g.workoutTime=z.workout_time,g.workoutDurationHour=V[0],g.workoutDurationMinutes=V[1],g.workoutDurationSeconds=V[2],g.workoutAscent=P.ascent===null?"":`${s.value.imperial_units?sn(P.ascent,"m","ft",2):parseFloat(P.ascent.toFixed(2))}`,g.workoutDescent=P.descent===null?"":`${s.value.imperial_units?sn(P.descent,"m","ft",2):parseFloat(P.descent.toFixed(2))}`}}function U(){return A.value.includes("workouts.INVALID_DISTANCE")}function G(){return A.value.includes("workouts.INVALID_DURATION")}function B(){return A.value.includes("workouts.INVALID_ASCENT_OR_DESCENT")}function w(P){A.value=[],P.title=g.title,P.duration=+g.workoutDurationHour*3600+ +g.workoutDurationMinutes*60+ +g.workoutDurationSeconds,P.duration<=0&&A.value.push("workouts.INVALID_DURATION"),P.distance=s.value.imperial_units?sn(+g.workoutDistance,"mi","km",3):+g.workoutDistance,P.distance<=0&&A.value.push("workouts.INVALID_DISTANCE"),P.workout_date=`${g.workoutDate} ${g.workoutTime}`,P.ascent=g.workoutAscent===""?null:s.value.imperial_units?sn(+g.workoutAscent,"ft","m",3):+g.workoutAscent,P.descent=g.workoutDescent===""?null:s.value.imperial_units?sn(+g.workoutDescent,"ft","m",3):+g.workoutDescent,(P.ascent!==null&&P.descent===null||P.ascent===null&&P.descent!==null)&&A.value.push("workouts.INVALID_ASCENT_OR_DESCENT")}function Z(){const P={sport_id:+g.sport_id,notes:g.notes};if(t.workout.id)t.workout.with_gpx?P.title=g.title:w(P),A.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,A.value):r.dispatch(Te.ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:P});else if(b.value){if(!v){const z="workouts.NO_FILE_PROVIDED";r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,z);return}P.file=v,r.dispatch(Te.ACTIONS.ADD_WORKOUT,P)}else w(P),A.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,A.value):r.dispatch(Te.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,P)}function J(){t.workout.id?a.push({name:"Workout",params:{workoutId:t.workout.id}}):a.go(-1)}function re(){R.value=!0}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Fe(()=>t.workout,async(P,z)=>{P!==z&&P&&P.id&&$(P)}),(P,z)=>{const V=ue("CustomTextArea"),se=ue("ErrorMessage"),Pe=ue("Loader"),We=ue("Card");return T(),N("div",{id:"workout-edition",class:ge(["center-card with-margin",{"center-form":h(o)&&h(o).with_gpx}])},[M(We,null,{title:fe(()=>[K(_(P.$t(`workouts.${h(i)?"ADD":"EDIT"}_WORKOUT`)),1)]),content:fe(()=>[p("div",ePe,[p("form",{class:ge({errors:R.value}),onSubmit:Xe(Z,["prevent"])},[p("div",tPe,[h(i)?(T(),N("div",nPe,[p("div",null,[p("input",{id:"withGpx",type:"radio",checked:b.value,disabled:h(u),onClick:C},null,8,rPe),p("label",aPe,_(P.$t("workouts.WITH_GPX")),1)]),p("div",null,[p("input",{id:"withoutGpx",type:"radio",checked:!b.value,disabled:h(u),onClick:C},null,8,sPe),p("label",oPe,_(P.$t("workouts.WITHOUT_GPX")),1)])])):F("",!0),p("div",iPe,[p("label",null,_(P.$t("workouts.SPORT",1))+"*: ",1),Ke(p("select",{id:"sport",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[0]||(z[0]=Ae=>g.sport_id=Ae)},[(T(!0),N(Ie,null,xe(l.value,Ae=>(T(),N("option",{value:Ae.id,key:Ae.id},_(Ae.translatedLabel),9,cPe))),128))],40,uPe),[[js,g.sport_id]])]),h(i)&&b.value?(T(),N("div",lPe,[p("label",dPe,_(P.$t("workouts.GPX_FILE"))+" "+_(P.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+"*: ",1),p("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:h(u),required:"",onInvalid:re,onInput:L},null,40,fPe),p("div",pPe,[p("div",null,[p("strong",null,_(P.$t("workouts.GPX_FILE"))+":",1),p("ul",null,[p("li",null,_(P.$t("workouts.MAX_SIZE"))+": "+_(h(f)),1)])]),p("div",null,[p("strong",null,_(P.$t("workouts.ZIP_ARCHIVE"))+":",1),p("ul",null,[p("li",null,_(P.$t("workouts.NO_FOLDER")),1),p("li",null,_(P.$t("workouts.MAX_FILES"))+": "+_(h(d)),1),p("li",null,_(P.$t("workouts.MAX_SIZE"))+": "+_(h(m)),1)])])])])):(T(),N("div",mPe,[p("label",EPe,_(P.$t("workouts.TITLE"))+": ",1),Ke(p("input",{id:"title",name:"title",type:"text",required:!h(i),onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[1]||(z[1]=Ae=>g.title=Ae)},null,40,hPe),[[tt,g.title]])])),b.value?F("",!0):(T(),N("div",_Pe,[p("div",TPe,[p("div",gPe,[p("label",null,_(P.$t("workouts.WORKOUT_DATE"))+"*:",1),p("div",APe,[Ke(p("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[2]||(z[2]=Ae=>g.workoutDate=Ae)},null,40,SPe),[[tt,g.workoutDate]]),Ke(p("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[3]||(z[3]=Ae=>g.workoutTime=Ae)},null,40,OPe),[[tt,g.workoutTime]])])]),p("div",IPe,[p("label",null,_(P.$t("workouts.DURATION"))+"*:",1),p("div",null,[Ke(p("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:ge(["workout-duration",{errored:G()}]),type:"text",placeholder:"HH",minlength:"1",maxlength:"2",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[4]||(z[4]=Ae=>g.workoutDurationHour=Ae)},null,42,vPe),[[tt,g.workoutDurationHour]]),K(" : "),Ke(p("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:ge(["workout-duration",{errored:G()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"MM",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[5]||(z[5]=Ae=>g.workoutDurationMinutes=Ae)},null,42,RPe),[[tt,g.workoutDurationMinutes]]),K(" : "),Ke(p("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:ge(["workout-duration",{errored:G()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"SS",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[6]||(z[6]=Ae=>g.workoutDurationSeconds=Ae)},null,42,bPe),[[tt,g.workoutDurationSeconds]])])])]),p("div",NPe,[p("div",CPe,[p("label",null,_(P.$t("workouts.DISTANCE"))+" ("+_(h(s).imperial_units?"mi":"km")+")*: ",1),Ke(p("input",{class:ge({errored:U()}),name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[7]||(z[7]=Ae=>g.workoutDistance=Ae)},null,42,yPe),[[tt,g.workoutDistance]])]),p("div",DPe,[p("label",null,_(P.$t("workouts.ASCENT"))+" ("+_(h(s).imperial_units?"ft":"m")+"): ",1),Ke(p("input",{class:ge({errored:B()}),name:"workout-ascent",type:"number",min:"0",step:"0.01",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[8]||(z[8]=Ae=>g.workoutAscent=Ae)},null,42,PPe),[[tt,g.workoutAscent]])]),p("div",wPe,[p("label",null,_(P.$t("workouts.DESCENT"))+" ("+_(h(s).imperial_units?"ft":"m")+"): ",1),Ke(p("input",{class:ge({errored:B()}),name:"workout-descent",type:"number",min:"0",step:"0.01",onInvalid:re,disabled:h(u),"onUpdate:modelValue":z[9]||(z[9]=Ae=>g.workoutDescent=Ae)},null,42,LPe),[[tt,g.workoutDescent]])])])])),p("div",$Pe,[p("label",null,_(P.$t("workouts.NOTES"))+": ",1),M(V,{name:"notes",input:g.notes,disabled:h(u),onUpdateValue:S},null,8,["input","disabled"])])]),E.value?(T(),te(se,{key:0,message:E.value},null,8,["message"])):F("",!0),h(u)?(T(),N("div",kPe,[M(Pe)])):(T(),N("div",UPe,[p("button",{class:"confirm",type:"submit",disabled:h(u)},_(P.$t("buttons.SUBMIT")),9,MPe),p("button",{class:"cancel",onClick:Xe(J,["prevent"])},_(P.$t("buttons.CANCEL")),1)]))],34)])]),_:1})],2)}}}),eS=ae(xPe,[["__scopeId","data-v-4c5a9cd1"]]),FPe={id:"add-workout",class:"view"},WPe={class:"container"},GPe=Q({__name:"AddWorkout",setup(e){const t=$e(),n=k(()=>t.getters[$t.GETTERS.SPORTS]),r=k(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=k(()=>t.getters[Te.GETTERS.WORKOUT_DATA]);return(s,o)=>(T(),N("div",FPe,[p("div",WPe,[M(eS,{authUser:r.value,sports:n.value,isCreation:!0,loading:a.value.loading},null,8,["authUser","sports","loading"])])]))}}),zPe={id:"edit-workout",class:"view"},BPe={class:"container"},HPe=Q({__name:"EditWorkout",setup(e){const t=Vt(),n=$e(),r=k(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=k(()=>n.getters[$t.GETTERS.SPORTS]),s=k(()=>n.getters[Te.GETTERS.WORKOUT_DATA]);return It(()=>{n.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})}),Fe(()=>t.params.workoutId,async o=>{o||n.commit(Te.MUTATIONS.EMPTY_WORKOUT)}),(o,i)=>(T(),N("div",zPe,[p("div",BPe,[s.value.workout.id?(T(),te(eS,{key:0,authUser:r.value,sports:a.value,workout:s.value.workout,loading:s.value.loading},null,8,["authUser","sports","workout","loading"])):F("",!0)])]))}}),Os=e=>(ut("data-v-e1628a52"),e=e(),ct(),e),jPe={id:"workout-card-title"},VPe=["disabled","title"],KPe=Os(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),YPe=[KPe],qPe={class:"workout-card-title"},XPe={class:"workout-title-date"},ZPe={key:0,class:"workout-title"},QPe=["aria-label"],JPe=Os(()=>p("i",{class:"fa fa-edit","aria-hidden":"true"},null,-1)),e6e=[JPe],t6e=["aria-label"],n6e=Os(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),r6e=[n6e],a6e=["aria-label"],s6e=Os(()=>p("i",{class:"fa fa-trash","aria-hidden":"true"},null,-1)),o6e=[s6e],i6e={key:1,class:"workout-title"},u6e={class:"workout-segment"},c6e=Os(()=>p("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)),l6e={class:"workout-date"},d6e={class:"workout-link"},f6e=["disabled","title"],p6e=Os(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),m6e=[p6e],E6e=Q({__name:"WorkoutCardTitle",props:{sport:{},workoutObject:{}},emits:["displayModal"],setup(e,{emit:t}){const n=e,r=t,{sport:a,workoutObject:s}=_e(n);async function o(u){await Be.get(`workouts/${u}/gpx/download`,{responseType:"blob"}).then(l=>{const c=window.URL.createObjectURL(new Blob([l.data],{type:"application/gpx+xml"})),f=document.createElement("a");f.href=c,f.setAttribute("download",`${u}.gpx`),document.body.appendChild(f),f.click()})}function i(){r("displayModal",!0)}return(u,l)=>{const c=ue("SportImage"),f=ue("router-link");return T(),N("div",jPe,[p("button",{class:ge(["workout-previous workout-arrow transparent",{inactive:!h(s).previousUrl}]),disabled:!h(s).previousUrl,title:h(s).previousUrl?u.$t(`workouts.PREVIOUS_${h(s).type}`):u.$t(`workouts.NO_PREVIOUS_${h(s).type}`),onClick:l[0]||(l[0]=d=>h(s).previousUrl?u.$router.push(h(s).previousUrl):null)},YPe,10,VPe),p("div",qPe,[M(c,{"sport-label":h(a).label,color:h(a).color},null,8,["sport-label","color"]),p("div",XPe,[h(s).type==="WORKOUT"?(T(),N("div",ZPe,[p("span",null,_(h(s).title),1),p("button",{class:"transparent icon-button",onClick:l[1]||(l[1]=d=>u.$router.push({name:"EditWorkout",params:{workoutId:h(s).workoutId}})),"aria-label":u.$t("workouts.EDIT_WORKOUT")},e6e,8,QPe),h(s).with_gpx?(T(),N("button",{key:0,class:"transparent icon-button",onClick:l[2]||(l[2]=Xe(d=>o(h(s).workoutId),["prevent"])),"aria-label":u.$t("workouts.DOWNLOAD_WORKOUT")},r6e,8,t6e)):F("",!0),p("button",{id:"delete-workout-button",class:"transparent icon-button",onClick:Xe(i,["prevent"]),"aria-label":u.$t("workouts.DELETE_WORKOUT")},o6e,8,a6e)])):h(s).segmentId!==null?(T(),N("div",i6e,[K(_(h(s).title)+" ",1),p("span",u6e,[K(" — "),c6e,K(" "+_(u.$t("workouts.SEGMENT"))+" "+_(h(s).segmentId+1),1)])])):F("",!0),p("div",l6e,[p("time",null,_(h(s).workoutDate)+" - "+_(h(s).workoutTime),1),p("span",d6e,[h(s).type==="SEGMENT"?(T(),te(f,{key:0,to:{name:"Workout",params:{workoutId:h(s).workoutId}}},{default:fe(()=>[K(" > "+_(u.$t("workouts.BACK_TO_WORKOUT")),1)]),_:1},8,["to"])):F("",!0)])])])]),p("button",{class:ge(["workout-next workout-arrow transparent",{inactive:!h(s).nextUrl}]),disabled:!h(s).nextUrl,title:h(s).nextUrl?u.$t(`workouts.NEXT_${h(s).type}`):u.$t(`workouts.NO_NEXT_${h(s).type}`),onClick:l[3]||(l[3]=d=>h(s).nextUrl?u.$router.push(h(s).nextUrl):null)},m6e,10,f6e)])}}}),h6e=ae(E6e,[["__scopeId","data-v-e1628a52"]]),_6e=e=>(ut("data-v-1b247cbe"),e=e(),ct(),e),T6e={key:0,class:"workout-record"},g6e=_6e(()=>p("sup",null,[p("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)),A6e=[g6e],S6e=Q({__name:"WorkoutRecord",props:{recordType:{},workoutObject:{}},setup(e){const t=e,{recordType:n,workoutObject:r}=_e(t);return(a,s)=>h(r).records&&h(r).records.find(o=>o.record_type===h(n))?(T(),N("span",T6e,A6e)):F("",!0)}}),Ms=ae(S6e,[["__scopeId","data-v-1b247cbe"]]),O6e="/img/weather/temperature.svg",I6e="/img/weather/pour-rain.svg",v6e="/img/weather/breeze.svg",R6e=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],b6e=e=>{const t=Math.floor(e/22.5+.5);return R6e[t%16]},N6e={class:"wind"},C6e={class:"wind-bearing"},y6e=["title"],D6e=Q({__name:"WeatherWind",props:{weather:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,weather:r}=_e(t),{t:a}=jt();function s(o){return a(`workouts.WEATHER.WIND_DIRECTIONS.${b6e(o)}`)}return(o,i)=>(T(),N("div",N6e,[K(_(h(x0e)(h(r).wind,h(n)))+" ",1),p("div",C6e,[h(r).windBearing?(T(),N("i",{key:0,class:"fa fa-long-arrow-down",style:Yr({transform:`rotate(${h(r).windBearing}deg)`}),"aria-hidden":"true",title:s(h(r).windBearing)},null,12,y6e)):F("",!0)])]))}}),bh=ae(D6e,[["__scopeId","data-v-e1f7f9cc"]]),P6e=e=>(ut("data-v-be2fffb0"),e=e(),ct(),e),w6e={key:0,id:"workout-weather"},L6e={class:"weather-table"},$6e=P6e(()=>p("th",null,null,-1)),k6e={class:"weather-th"},U6e=["src","alt","title"],M6e={class:"weather-th"},x6e=["src","alt","title"],F6e=["alt","title"],W6e=["alt","title"],G6e=["alt","title"],z6e=Q({__name:"WorkoutWeather",props:{workoutObject:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,workoutObject:r}=_e(t);return(a,s)=>h(r).weatherStart&&h(r).weatherEnd?(T(),N("div",w6e,[p("table",L6e,[p("thead",null,[p("tr",null,[$6e,p("th",null,[p("div",k6e,[K(_(a.$t("workouts.START"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherStart.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`)},null,8,U6e)])]),p("th",null,[p("div",M6e,[K(_(a.$t("workouts.END"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherEnd.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`)},null,8,x6e)])])])]),p("tbody",null,[p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:O6e,alt:a.$t("workouts.WEATHER.TEMPERATURE"),title:a.$t("workouts.WEATHER.TEMPERATURE")},null,8,F6e)]),p("td",null,_(h(zm)(h(r).weatherStart.temperature,h(n))),1),p("td",null,_(h(zm)(h(r).weatherEnd.temperature,h(n))),1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:I6e,alt:a.$t("workouts.WEATHER.HUMIDITY"),title:a.$t("workouts.WEATHER.HUMIDITY")},null,8,W6e)]),p("td",null,_(Number(h(r).weatherStart.humidity*100).toFixed(1))+"% ",1),p("td",null,_(Number(h(r).weatherEnd.humidity*100).toFixed(1))+"% ",1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:v6e,alt:a.$t("workouts.WEATHER.WIND"),title:a.$t("workouts.WEATHER.WIND")},null,8,G6e)]),p("td",null,[M(bh,{weather:h(r).weatherStart,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])]),p("td",null,[M(bh,{weather:h(r).weatherEnd,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])])])])])])):F("",!0)}}),B6e=ae(z6e,[["__scopeId","data-v-be2fffb0"]]),Ia=e=>(ut("data-v-9341b3e8"),e=e(),ct(),e),H6e={id:"workout-info"},j6e={class:"workout-data"},V6e=Ia(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),K6e={class:"label"},Y6e={class:"value"},q6e={key:0},X6e={class:"value"},Z6e={class:"value"},Q6e={key:0,class:"workout-data"},J6e=Ia(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),ewe={class:"label"},twe={key:1,class:"workout-data"},nwe=Ia(()=>p("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)),rwe={class:"label"},awe=Ia(()=>p("br",null,null,-1)),swe={class:"label"},owe={key:2,class:"workout-data"},iwe=["alt"],uwe={class:"label"},cwe=Ia(()=>p("br",null,null,-1)),lwe={class:"label"},dwe={key:3,class:"workout-data"},fwe=Ia(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),pwe={class:"label"},mwe=Ia(()=>p("br",null,null,-1)),Ewe={class:"label"},hwe=Q({__name:"WorkoutData",props:{workoutObject:{},useImperialUnits:{type:Boolean},displayHARecord:{type:Boolean}},setup(e){const t=e,{displayHARecord:n,workoutObject:r,useImperialUnits:a}=_e(t),s=k(()=>t.workoutObject.pauses!=="0:00:00"&&t.workoutObject.pauses!==null);return(o,i)=>{const u=ue("Distance");return T(),N("div",H6e,[p("div",j6e,[V6e,p("span",K6e,_(o.$t("workouts.DURATION")),1),K(": "),p("span",Y6e,_(h(r).moving),1),M(Ms,{workoutObject:h(r),recordType:"LD"},null,8,["workoutObject"]),s.value?(T(),N("div",q6e,[K(" ("+_(o.$t("workouts.PAUSES"))+": ",1),p("span",X6e,_(h(r).pauses),1),K(" - "+_(o.$t("workouts.TOTAL_DURATION"))+": ",1),p("span",Z6e,_(h(r).duration)+")",1)])):F("",!0)]),h(r).distance!==null?(T(),N("div",Q6e,[J6e,p("span",ewe,_(o.$t("workouts.DISTANCE")),1),K(": "),M(u,{distance:h(r).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"FD"},null,8,["workoutObject"])])):F("",!0),h(r).aveSpeed!==null&&h(r).maxSpeed!==null?(T(),N("div",twe,[nwe,p("span",rwe,_(o.$t("workouts.AVERAGE_SPEED")),1),K(": "),M(u,{distance:h(r).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"AS"},null,8,["workoutObject"]),awe,p("span",swe,_(o.$t("workouts.MAX_SPEED")),1),K(": "),M(u,{distance:h(r).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"MS"},null,8,["workoutObject"])])):F("",!0),h(r).maxAlt!==null&&h(r).minAlt!==null?(T(),N("div",owe,[p("img",{class:"mountains",src:BA,alt:o.$t("workouts.ELEVATION")},null,8,iwe),p("span",uwe,_(o.$t("workouts.MIN_ALTITUDE")),1),K(": "),M(u,{distance:h(r).minAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),cwe,p("span",lwe,_(o.$t("workouts.MAX_ALTITUDE")),1),K(": "),M(u,{distance:h(r).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):F("",!0),h(r).ascent!==null&&h(r).descent!==null?(T(),N("div",dwe,[fwe,p("span",pwe,_(o.$t("workouts.ASCENT")),1),K(": "),M(u,{distance:h(r).ascent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),h(n)?(T(),te(Ms,{key:0,workoutObject:h(r),recordType:"HA"},null,8,["workoutObject"])):F("",!0),mwe,p("span",Ewe,_(o.$t("workouts.DESCENT")),1),K(": "),M(u,{distance:h(r).descent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):F("",!0),M(B6e,{workoutObject:h(r),useImperialUnits:h(a)},null,8,["workoutObject","useImperialUnits"])])}}}),_we=ae(hwe,[["__scopeId","data-v-9341b3e8"]]);function Ha(e,t){return Array.from(e.getElementsByTagName(t))}function Is(e){return e==null||e.normalize(),e&&e.textContent||""}function ha(e,t,n){const r=e.getElementsByTagName(t),a=r.length?r[0]:null;return a&&n&&n(a),a}function Twe(e,t,n){const r={};if(!e)return r;const a=e.getElementsByTagName(t),s=a.length?a[0]:null;return s&&n?n(s,r):r}function tS(e,t,n){const r=Is(ha(e,t));return r&&n?n(r)||{}:{}}function Nh(e,t,n){const r=parseFloat(Is(ha(e,t)));if(!isNaN(r))return r&&n?n(r)||{}:{}}function gwe(e,t,n){const r=parseFloat(Is(ha(e,t)));if(!isNaN(r))return n&&n(r),r}function Kd(e,t){const n={};for(const r of t)tS(e,r,a=>{n[r]=a});return n}function Awe(e){return(e==null?void 0:e.nodeType)===1}function nS(e){return Twe(e,"line",t=>Object.assign({},tS(t,"color",r=>({stroke:`#${r}`})),Nh(t,"opacity",r=>({"stroke-opacity":r})),Nh(t,"width",r=>({"stroke-width":r*96/25.4}))))}function rS(e){let t=[];if(e===null)return t;for(const n of Array.from(e.childNodes)){if(!Awe(n))continue;const r=Swe(n.nodeName);if(r==="gpxtpx:TrackPointExtension")t=t.concat(rS(n));else{const a=Is(n);t.push([r,Owe(a)])}}return t}function Swe(e){return["heart","gpxtpx:hr","hr"].includes(e)?"heart":e}function Owe(e){const t=parseFloat(e);return isNaN(t)?e:t}function aS(e){const t=[parseFloat(e.getAttribute("lon")||""),parseFloat(e.getAttribute("lat")||"")];if(isNaN(t[0])||isNaN(t[1]))return null;gwe(e,"ele",r=>{t.push(r)});const n=ha(e,"time");return{coordinates:t,time:n?Is(n):null,extendedValues:rS(ha(e,"extensions"))}}function N0(e){var a;const t=Kd(e,["name","cmt","desc","type","time","keywords"]),n=Array.from(e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const s of n)((a=s.parentNode)==null?void 0:a.parentNode)===e&&(t[s.tagName.replace(":","_")]=Is(s));const r=Ha(e,"link");return r.length&&(t.links=r.map(s=>Object.assign({href:s.getAttribute("href")},Kd(s,["text","type"])))),t}function sS(e,t){const n=Ha(e,t),r=[],a=[],s={};for(let o=0;o1,o=Object.assign({_gpxType:"trk"},N0(e),nS(ha(e,"extensions")),r.length?{coordinateProperties:{times:s?r:r[0]}}:{});for(const i of a){n.push(i.line),o.coordinateProperties||(o.coordinateProperties={});const u=o.coordinateProperties,l=Object.entries(i.extendedValues);for(let c=0;cnew Array(m.line.length).fill(null))),u[f][c]=d):u[f]=d}}return{type:"Feature",properties:o,geometry:s?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}function Rwe(e){const t=Object.assign(N0(e),Kd(e,["sym"])),n=aS(e);return n?{type:"Feature",properties:t,geometry:{type:"Point",coordinates:n.coordinates}}:null}function*bwe(e){for(const t of Ha(e,"trk")){const n=vwe(t);n&&(yield n)}for(const t of Ha(e,"rte")){const n=Iwe(t);n&&(yield n)}for(const t of Ha(e,"wpt")){const n=Rwe(t);n&&(yield n)}}function Nwe(e){return{type:"FeatureCollection",features:Array.from(bwe(e))}}const Ch=(e,t)=>{for(const n of Object.keys(t))e.on(n,t[n])},oS=e=>{for(const t of Object.keys(e)){const n=e[t];n&&Mr(n.cancel)&&n.cancel()}},Cwe=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),Mr=e=>typeof e=="function",Ir=(e,t,n)=>{for(const r in n){const a="set"+Cwe(r);e[a]?Fe(()=>n[r],(s,o)=>{e[a](s,o)}):t[a]&&Fe(()=>n[r],s=>{t[a](s)})}},rr=(e,t,n={})=>{const r={...n};for(const a in e){const s=t[a],o=e[a];s&&(s&&s.custom===!0||o!==void 0&&(r[a]=o))}return r},va=e=>{const t={},n={};for(const r in e)if(r.startsWith("on")&&!r.startsWith("onUpdate")&&r!=="onReady"){const a=r.slice(2).toLocaleLowerCase();t[a]=e[r]}else n[r]=e[r];return{listeners:t,attrs:n}},ywe=async e=>{const t=await Promise.all([bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.m),__vite__mapDeps([0,1])),bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.b),__vite__mapDeps([0,1])),bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.d),__vite__mapDeps([0,1]))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},Si=e=>{const t=ce((...r)=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...r)=>t.value(...r);return n.wrapped=t,Jt(e,n),n},Oi=(e,t)=>e.wrapped.value=t,Ln=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,bn=e=>{const t=ht(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},vr=Symbol("useGlobalLeaflet"),ea=Symbol("addLayer"),C0=Symbol("removeLayer"),iS=Symbol("registerControl"),uS=Symbol("registerLayerControl"),cS=Symbol("canSetParentHtml"),lS=Symbol("setParentHtml"),dS=Symbol("setIcon"),Dwe=Symbol("bindPopup"),Pwe=Symbol("bindTooltip"),wwe=Symbol("unbindPopup"),Lwe=Symbol("unbindTooltip"),jo={options:{type:Object,default:()=>({}),custom:!0}},Dc=e=>({options:e.options,methods:{}}),vs={...jo,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},y0=(e,t,n)=>{const r=bn(ea),a=bn(C0),{options:s,methods:o}=Dc(e),i=rr(e,vs,s),u=()=>r({leafletObject:t.value}),l=()=>a({leafletObject:t.value}),c={...o,setAttribution(f){l(),t.value.options.attribution=f,e.visible&&u()},setName(){l(),e.visible&&u()},setLayerType(){l(),e.visible&&u()},setVisible(f){t.value&&(f?u():l())},bindPopup(f){if(!t.value||!Mr(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(f)},bindTooltip(f){if(!t.value||!Mr(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(f)},unbindTooltip(){t.value&&(Mr(t.value.closeTooltip)&&t.value.closeTooltip(),Mr(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(Mr(t.value.closePopup)&&t.value.closePopup(),Mr(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(f){n.emit("update:visible",f)}};return Jt(Dwe,c.bindPopup),Jt(Pwe,c.bindTooltip),Jt(wwe,c.unbindPopup),Jt(Lwe,c.unbindTooltip),Rt(()=>{c.unbindPopup(),c.unbindTooltip(),l()}),{options:i,methods:c}},D0=(e,t)=>{if(e&&t.default)return An("div",{style:{display:"none"}},t.default())},$we={...vs,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},fS={...$we,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},kwe={...fS,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...kwe});const Rs={...jo,position:{type:String}},pS=(e,t)=>{const{options:n,methods:r}=Dc(e),a=rr(e,Rs,n),s={...r,setPosition(o){t.value&&t.value.setPosition(o)}};return Rt(()=>{t.value&&t.value.remove()}),{options:a,methods:s}},Uwe=e=>e.default?An("div",{ref:"root"},e.default()):null,yh=Q({name:"LControl",props:{...Rs,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const n=ce(),r=ce(),a=ht(vr),s=bn(iS),{options:o,methods:i}=pS(e,n);return gt(async()=>{const{Control:u,DomEvent:l}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(f=>f.e),__vite__mapDeps([0,1])),c=u.extend({onAdd(){return r.value}});n.value=er(new c(o)),Ir(i,n.value,e),s({leafletObject:n.value}),e.disableClickPropagation&&r.value&&l.disableClickPropagation(r.value),e.disableScrollPropagation&&r.value&&l.disableScrollPropagation(r.value),gn(()=>t.emit("ready",n.value))}),{root:r,leafletObject:n}},render(){return Uwe(this.$slots)}});({...Rs});const mS={...Rs,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},Mwe=(e,t)=>{const{options:n}=pS(e,t);return{options:rr(e,mS,n),methods:{addLayer(r){r.layerType==="base"?t.value.addBaseLayer(r.leafletObject,r.name):r.layerType==="overlay"&&t.value.addOverlay(r.leafletObject,r.name)},removeLayer(r){t.value.removeLayer(r.leafletObject)}}}},xwe=Q({name:"LControlLayers",props:mS,setup(e,t){const n=ce(),r=ht(vr),a=bn(uS),{options:s,methods:o}=Mwe(e,n);return gt(async()=>{const{control:i}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(u=>u.e),__vite__mapDeps([0,1]));n.value=er(i.layers(void 0,void 0,s)),Ir(o,n.value,e),a({...e,...o,leafletObject:n.value}),gn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...Rs});({...Rs});const Pc={...vs},ES=(e,t,n)=>{const{options:r,methods:a}=y0(e,t,n),s=rr(e,Pc,r),o={...a,addLayer(i){t.value.addLayer(i.leafletObject)},removeLayer(i){t.value.removeLayer(i.leafletObject)}};return Jt(ea,o.addLayer),Jt(C0,o.removeLayer),{options:s,methods:o}};({...Pc});const hS={...Pc,geojson:{type:[Object,Array],custom:!0},optionsStyle:{type:Function,custom:!0}},Fwe=(e,t,n)=>{const{options:r,methods:a}=ES(e,t,n),s=rr(e,hS,r);Object.prototype.hasOwnProperty.call(e,"optionsStyle")&&(s.style=e.optionsStyle);const o={...a,setGeojson(i){t.value.clearLayers(),t.value.addData(i)},setOptionsStyle(i){t.value.setStyle(i)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:s,methods:o}},Wwe=Q({props:hS,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea),{methods:o,options:i}=Fwe(e,n,t);return gt(async()=>{const{geoJSON:u}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=er(u(e.geojson,i));const{listeners:l}=va(t.attrs);n.value.on(l),Ir(o,n.value,e),s({...e,...o,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return D0(this.ready,this.$slots)}}),P0={...vs,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},_S=(e,t,n)=>{const{options:r,methods:a}=y0(e,t,n),s=rr(e,P0,r),o={...a,setTileComponent(){var i;(i=t.value)==null||i.redraw()}};return Rt(()=>{t.value.off()}),{options:s,methods:o}},Gwe=(e,t,n,r)=>e.extend({initialize(a){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,a)},createTile(a){const s=this._tileCoordsToKey(a);this.tileComponents[s]=t.create("div");const o=An({setup:r,props:["coords"]},{coords:a});return g2(o,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(a){const s=this._tileCoordsToKey(a.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});({...P0});const Dh={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},zwe=Q({name:"LIcon",props:{...Dh,...jo},setup(e,t){const n=ce(),r=ht(vr),a=bn(cS),s=bn(lS),o=bn(dS);let i,u,l,c,f;const d=(b,v,R)=>{const A=b&&b.innerHTML;if(!v){R&&f&&a()&&s(A);return}const{listeners:S}=va(t.attrs);f&&u(f,S);const{options:C}=Dc(e),L=rr(e,Dh,C);A&&(L.html=A),f=L.html?l(L):c(L),i(f,S),o(f)},m=()=>{gn(()=>d(n.value,!0,!1))},E=()=>{gn(()=>d(n.value,!1,!0))},g={setIconUrl:m,setIconRetinaUrl:m,setIconSize:m,setIconAnchor:m,setPopupAnchor:m,setTooltipAnchor:m,setShadowUrl:m,setShadowRetinaUrl:m,setShadowAnchor:m,setBgPos:m,setClassName:m,setHtml:m};return gt(async()=>{const{DomEvent:b,divIcon:v,icon:R}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(A=>A.e),__vite__mapDeps([0,1]));i=b.on,u=b.off,l=v,c=R,Ir(g,{},e),new MutationObserver(E).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),m()}),{root:n}},render(){const e=this.$slots.default?this.$slots.default():void 0;return An("div",{ref:"root"},e)}});({...vs});const Bwe=Q({props:Pc,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea),{methods:o}=ES(e,n,t);return gt(async()=>{const{layerGroup:i}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=er(i(void 0,e.options));const{listeners:u}=va(t.attrs);n.value.on(u),Ir(o,n.value,e),s({...e,...o,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return D0(this.ready,this.$slots)}});function TS(e,t,n){var r,a,s;t===void 0&&(t=50),n===void 0&&(n={});var o=(r=n.isImmediate)!=null&&r,i=(a=n.callback)!=null&&a,u=n.maxWait,l=Date.now(),c=[];function f(){if(u!==void 0){var m=Date.now()-l;if(m+t>=u)return u-m}return t}var d=function(){var m=[].slice.call(arguments),E=this;return new Promise(function(g,b){var v=o&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,l=Date.now(),!o){var A=e.apply(E,m);i&&i(A),c.forEach(function(S){return(0,S.resolve)(A)}),c=[]}},f()),v){var R=e.apply(E,m);return i&&i(R),g(R)}c.push({resolve:g,reject:b})})};return d.cancel=function(m){s!==void 0&&clearTimeout(s),c.forEach(function(E){return(0,E.reject)(m)}),c=[]},d}const Ph={...jo,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},Hwe=Q({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:Ph,setup(e,t){const n=ce(),r=xt({ready:!1,layersToAdd:[],layersInControl:[]}),{options:a}=Dc(e),s=rr(e,Ph,a),{listeners:o,attrs:i}=va(t.attrs),u=Si(ea),l=Si(C0),c=Si(iS),f=Si(uS);Jt(vr,e.useGlobalLeaflet);const d=k(()=>{const v={};return e.noBlockingAnimations&&(v.animate=!1),v}),m=k(()=>{const v=d.value;return e.padding&&(v.padding=e.padding),e.paddingTopLeft&&(v.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(v.paddingBottomRight=e.paddingBottomRight),v}),E={moveend:TS(v=>{r.leafletRef&&(t.emit("update:zoom",r.leafletRef.getZoom()),t.emit("update:center",r.leafletRef.getCenter()),t.emit("update:bounds",r.leafletRef.getBounds()))}),overlayadd(v){const R=r.layersInControl.find(A=>A.name===v.name);R&&R.updateVisibleProp(!0)},overlayremove(v){const R=r.layersInControl.find(A=>A.name===v.name);R&&R.updateVisibleProp(!1)}};gt(async()=>{e.useGlobalLeaflet&&(Ln.L=Ln.L||await bt(()=>import("./maps-ZyuCPqes.js").then(G=>G.l),__vite__mapDeps([0,1])));const{map:v,CRS:R,Icon:A,latLngBounds:S,latLng:C,stamp:L}=e.useGlobalLeaflet?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(G=>G.e),__vite__mapDeps([0,1]));try{s.beforeMapMount&&await s.beforeMapMount()}catch(G){console.error(`The following error occurred running the provided beforeMapMount hook ${G.message}`)}await ywe(A);const $=typeof s.crs=="string"?R[s.crs]:s.crs;s.crs=$||R.EPSG3857;const U={addLayer(G){G.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd.push(G):r.layersInControl.find(B=>L(B.leafletObject)===L(G.leafletObject))||(r.layerControl.addLayer(G),r.layersInControl.push(G))),G.visible!==!1&&r.leafletRef.addLayer(G.leafletObject)},removeLayer(G){G.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd=r.layersToAdd.filter(B=>B.name!==G.name):(r.layerControl.removeLayer(G.leafletObject),r.layersInControl=r.layersInControl.filter(B=>L(B.leafletObject)!==L(G.leafletObject)))),r.leafletRef.removeLayer(G.leafletObject)},registerLayerControl(G){r.layerControl=G,r.layersToAdd.forEach(B=>{r.layerControl.addLayer(B)}),r.layersToAdd=[],c(G)},registerControl(G){r.leafletRef.addControl(G.leafletObject)},setZoom(G){const B=r.leafletRef.getZoom();G!==B&&r.leafletRef.setZoom(G,d.value)},setCrs(G){const B=r.leafletRef.getBounds();r.leafletRef.options.crs=G,r.leafletRef.fitBounds(B,{animate:!1,padding:[0,0]})},fitBounds(G){r.leafletRef.fitBounds(G,m.value)},setBounds(G){if(!G)return;const B=S(G);B.isValid()&&!(r.lastSetBounds||r.leafletRef.getBounds()).equals(B,0)&&(r.lastSetBounds=B,r.leafletRef.fitBounds(B))},setCenter(G){if(G==null)return;const B=C(G),w=r.lastSetCenter||r.leafletRef.getCenter();(w.lat!==B.lat||w.lng!==B.lng)&&(r.lastSetCenter=B,r.leafletRef.panTo(B,d.value))}};Oi(u,U.addLayer),Oi(l,U.removeLayer),Oi(c,U.registerControl),Oi(f,U.registerLayerControl),r.leafletRef=er(v(n.value,s)),Ir(U,r.leafletRef,e),Ch(r.leafletRef,E),Ch(r.leafletRef,o),r.ready=!0,gn(()=>t.emit("ready",r.leafletRef))}),Co(()=>{oS(E),r.leafletRef&&(r.leafletRef.off(),r.leafletRef.remove())});const g=k(()=>r.leafletRef),b=k(()=>r.ready);return{root:n,ready:b,leafletObject:g,attrs:i}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),An("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),jwe=["Symbol(Comment)","Symbol(Text)"],Vwe=["LTooltip","LPopup"],gS={...vs,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},Kwe=(e,t,n)=>{const{options:r,methods:a}=y0(e,t,n),s=rr(e,gS,r),o={...a,setDraggable(i){t.value.dragging&&(i?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(i){n.emit("update:latLng",i.latlng),n.emit("update:lat-lng",i.latlng)},setLatLng(i){if(i!=null&&t.value){const u=t.value.getLatLng();(!u||!u.equals(i))&&t.value.setLatLng(i)}}};return{options:s,methods:o}},Ywe=(e,t)=>{const n=t.slots.default&&t.slots.default();return n&&n.length&&n.some(qwe)};function qwe(e){return!(jwe.includes(e.type.toString())||Vwe.includes(e.type.name))}const AS=Q({name:"LMarker",props:gS,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea);Jt(cS,()=>{var l;return!!((l=n.value)!=null&&l.getElement())}),Jt(lS,l=>{var c,f;const d=Mr((c=n.value)==null?void 0:c.getElement)&&((f=n.value)==null?void 0:f.getElement());d&&(d.innerHTML=l)}),Jt(dS,l=>{var c;return((c=n.value)==null?void 0:c.setIcon)&&n.value.setIcon(l)});const{options:o,methods:i}=Kwe(e,n,t),u={moveHandler:TS(i.latLngSync)};return gt(async()=>{const{marker:l,divIcon:c}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(d=>d.e),__vite__mapDeps([0,1]));Ywe(o,t)&&(o.icon=c({className:""})),n.value=er(l(e.latLng,o));const{listeners:f}=va(t.attrs);n.value.on(f),n.value.on("move",u.moveHandler),Ir(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),Co(()=>oS(u)),{ready:r,leafletObject:n}},render(){return D0(this.ready,this.$slots)}}),Xwe={...fS,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},wh={...Xwe},SS={...jo,content:{type:String,default:null}};({...SS});({...wh,latLngs:{...wh.latLngs}});const w0={...P0,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},Zwe=(e,t,n)=>{const{options:r,methods:a}=_S(e,t,n),s=rr(e,w0,r),o={...a};return{options:s,methods:o}},Qwe=Q({props:w0,setup(e,t){const n=ce(),r=ht(vr),a=bn(ea),{options:s,methods:o}=Zwe(e,n,t);return gt(async()=>{const{tileLayer:i}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=er(i(e.url,s));const{listeners:u}=va(t.attrs);n.value.on(u),Ir(o,n.value,e),a({...e,...o,leafletObject:n.value}),gn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...SS});({...w0});const Lh=Q({__name:"CustomMarker",props:{markerCoordinates:{},isStart:{type:Boolean}},setup(e){const t=e,{isStart:n,markerCoordinates:r}=_e(t);return(a,s)=>h(r).latitude?(T(),te(h(AS),{key:0,"lat-lng":[h(r).latitude,h(r).longitude]},{default:fe(()=>[M(h(zwe),{"icon-url":`/img/workouts/${h(n)?"start":"finish"}.svg`,iconSize:[15,15]},null,8,["icon-url"])]),_:1},8,["lat-lng"])):F("",!0)}}),Jwe=e=>(ut("data-v-dac2dfa0"),e=e(),ct(),e),eLe={id:"workout-map"},tLe={key:0,class:"leaflet-container"},nLe={key:1},rLe=Jwe(()=>p("i",{class:"fa fa-refresh","aria-hidden":"true"},null,-1)),aLe={key:1,class:"no-map"},sLe=Q({__name:"index",props:{workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=$e(),{workoutData:r,markerCoordinates:a}=_e(t),s=ce(null),o=k(()=>b()),i=k(()=>n.getters[H.GETTERS.APP_CONFIG]),u=k(()=>E(o)),l=k(()=>t.workoutData&&t.workoutData.gpx?m(t.workoutData.gpx):{}),c=k(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[0].latitude,longitude:t.workoutData.chartData[0].longitude}:{}),f=k(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[t.workoutData.chartData.length-1].latitude,longitude:t.workoutData.chartData[t.workoutData.chartData.length-1].longitude}:{}),d=ce(!1);function m(A){if(!A||A!=="")try{return{jsonData:Nwe(new DOMParser().parseFromString(A,"text/xml"))}}catch{return console.error("Invalid gpx content"),{}}return{}}function E(A){return[(A.value[0][0]+A.value[1][0])/2,(A.value[0][1]+A.value[1][1])/2]}function g(A){var S,C;(S=s.value)!=null&&S.leafletObject&&((C=s.value)==null||C.leafletObject.fitBounds(A))}function b(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]}function v(){var A;(A=s.value)==null||A.leafletObject.fitBounds(b())}function R(){d.value=!d.value,d.value||setTimeout(()=>{v()},100)}return(A,S)=>{const C=ue("VFullscreen");return T(),N("div",eLe,[h(r).loading?(T(),N("div",tLe)):(T(),N("div",nLe,[h(r).workout.with_gpx?(T(),te(C,{key:0,modelValue:d.value,"onUpdate:modelValue":S[1]||(S[1]=L=>d.value=L)},{default:fe(()=>[p("div",{class:ge(["leaflet-container",{"fullscreen-map":d.value}])},[l.value.jsonData&&u.value&&o.value.length===2?(T(),te(h(Hwe),{key:0,zoom:13,maxZoom:19,center:u.value,bounds:o.value,zoomAnimation:!1,ref_key:"workoutMap",ref:s,onReady:S[0]||(S[0]=L=>g(o.value)),"use-global-leaflet":!1,class:"map"},{default:fe(()=>[M(h(xwe)),M(h(yh),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":A.$t("workouts.RESET_ZOOM"),onClick:v},{default:fe(()=>[rLe]),_:1},8,["aria-label"]),M(h(yh),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":A.$t(`workouts.${d.value?"EXIT":"VIEW"}_FULLSCREEN`),onClick:R},{default:fe(()=>[p("i",{class:ge(`fa fa-${d.value?"compress":"arrows-alt"}`),"aria-hidden":"true"},null,2)]),_:1},8,["aria-label"]),M(h(Qwe),{url:`${h(wo)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,attribution:i.value.map_attribution,bounds:o.value},null,8,["url","attribution","bounds"]),M(h(Wwe),{geojson:l.value.jsonData},null,8,["geojson"]),h(a).latitude?(T(),te(h(AS),{key:0,"lat-lng":[h(a).latitude,h(a).longitude]},null,8,["lat-lng"])):F("",!0),M(h(Bwe),{name:A.$t("workouts.START_AND_FINISH"),"layer-type":"overlay"},{default:fe(()=>[c.value.latitude?(T(),te(Lh,{key:0,markerCoordinates:c.value,isStart:!0},null,8,["markerCoordinates"])):F("",!0),f.value.latitude?(T(),te(Lh,{key:1,markerCoordinates:f.value,isStart:!1},null,8,["markerCoordinates"])):F("",!0)]),_:1},8,["name"])]),_:1},8,["center","bounds"])):F("",!0)],2)]),_:1},8,["modelValue"])):(T(),N("div",aLe,_(A.$t("workouts.NO_MAP")),1))]))])}}}),oLe=ae(sLe,[["__scopeId","data-v-dac2dfa0"]]),iLe={class:"workout-detail"},uLe=Q({__name:"index",props:{authUser:{},displaySegment:{type:Boolean},sports:{},workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=Vt(),r=$e(),{authUser:a,markerCoordinates:s,workoutData:o}=_e(t),i=k(()=>t.workoutData.workout),u=ce(n.params.workoutId?+n.params.segmentId:null),l=k(()=>i.value.segments.length>0&&u.value?i.value.segments[+u.value-1]:null),c=ce(!1),f=k(()=>t.sports?t.sports.find(A=>A.id===t.workoutData.workout.sport_id):{}),d=k(()=>E(i.value,l.value));function m(A,S,C){const L=S&&C&&C!==1?`/workouts/${A.id}/segment/${C-1}`:!S&&A.previous_workout?`/workouts/${A.previous_workout}`:null,$=S&&C&&Cn.params.segmentId,async A=>{A&&(u.value=+A,R())}),Fe(()=>n.params.workoutId,async A=>{A&&(c.value=!1,R())}),(A,S)=>{const C=ue("Modal"),L=ue("Card");return T(),N("div",iLe,[c.value?(T(),te(C,{key:0,title:A.$t("common.CONFIRMATION"),message:A.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:S[0]||(S[0]=$=>v(d.value.workoutId)),onCancelAction:b,onKeydown:At(b,["esc"])},null,8,["title","message"])):F("",!0),M(L,null,{title:fe(()=>[f.value?(T(),te(h6e,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:S[1]||(S[1]=$=>g(!0))},null,8,["sport","workoutObject"])):F("",!0)]),content:fe(()=>[M(oLe,{workoutData:h(o),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),M(_we,{workoutObject:d.value,useImperialUnits:h(a).imperial_units,displayHARecord:h(a).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),cLe=ae(uLe,[["__scopeId","data-v-f8b05eca"]]),lLe=e=>{const t=document.getElementById(e);if(t){let n=t.querySelector("ul");return n||(n=document.createElement("ul"),t.appendChild(n)),n}throw new Error("No legend container")},dLe={id:"htmlLegend",afterUpdate(e,t,n){var s,o,i,u,l,c;const r=lLe(n.containerID);for(;r.firstChild;)r.firstChild.remove();((i=(o=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:o.labels)!=null&&i.generateLabels?(c=(l=(u=e.options.plugins)==null?void 0:u.legend)==null?void 0:l.labels)==null?void 0:c.generateLabels(e):[]).forEach(f=>{var b,v,R;if(!((R=(v=(b=e.config.options)==null?void 0:b.scales)==null?void 0:v.yElevation)!=null&&R.display)&&f.datasetIndex===1)return;const d=document.createElement("li");d.onclick=()=>{f.datasetIndex!==void 0&&(e.setDatasetVisibility(f.datasetIndex,!e.isDatasetVisible(f.datasetIndex)),e.update())};const m=document.createElement("input");m&&(m.type="checkbox",m.id=f.text,m.checked=!f.hidden);const E=document.createTextNode(f.text),g=document.createElement("span");g&&(g.style.background=String(f.fillStyle),g.style.borderColor=String(f.strokeStyle)),d.appendChild(m),d.appendChild(E),d.appendChild(g),r.appendChild(d)})}},fLe=e=>(ut("data-v-b15bb69d"),e=e(),ct(),e),pLe={id:"workout-chart"},mLe={class:"chart-radio"},ELe=["checked"],hLe=["checked"],_Le=fLe(()=>p("div",{id:"chart-legend"},null,-1)),TLe={class:"line-chart"},gLe={class:"chart-info"},ALe={class:"no-data-cleaning"},SLe={key:0,class:"elevation-start"},OLe=["checked"],ILe=Q({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,r=t,a=yf(),{t:s}=jt(),{authUser:o,workoutData:i}=_e(n),u=k(()=>a.getters[H.GETTERS.DARK_MODE]),l=k(()=>Cf(u.value)),c=ce(!0),f=ce(o.value.start_elevation_at_zero),d=k(()=>Y3e(i.value.chartData,s,o.value.imperial_units,l.value)),m=k(()=>d.value&&d.value.datasets.elevation.data.length>0),E=B("km"),g=B("m"),b=k(()=>({labels:c.value?d.value.distance_labels:d.value.duration_labels,datasets:JSON.parse(JSON.stringify([d.value.datasets.speed,d.value.datasets.elevation]))})),v=k(()=>d.value.coordinates),R=k(()=>({color:l.value?Gr.darkMode.line:Gr.ligthMode.line})),A=k(()=>({color:l.value?Gr.darkMode.text:Gr.ligthMode.text})),S=k(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:22}},scales:{x:{grid:{drawOnChartArea:!1,...R.value},border:{...R.value},ticks:{count:10,callback:function(w){return c.value?Number(w).toFixed(2):$(w)},...A.value},type:"linear",bounds:"data",title:{display:!0,text:c.value?s("workouts.DISTANCE")+` (${E})`:s("workouts.DURATION"),...A.value}},ySpeed:{grid:{drawOnChartArea:!1,...R.value},border:{...R.value},position:"left",title:{display:!0,text:s("workouts.SPEED")+` (${E}/h)`,...A.value},ticks:{...A.value}},yElevation:{beginAtZero:f.value,display:m.value,grid:{drawOnChartArea:!1,...R.value},border:{...R.value},position:"right",title:{display:!0,text:s("workouts.ELEVATION")+` (${g})`,...A.value},ticks:{...A.value}}},elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(w){const Z=` ${w.dataset.label}: ${w.formattedValue}`;return w.dataset.yAxisID==="yElevation"?Z+` ${g}`:Z+` ${E}/h`},title:function(w){return w.length>0&&U(v.value[w[0].dataIndex]),w.length===0?"":c.value?`${s("workouts.DISTANCE")}: ${w[0].label} ${E}`:`${s("workouts.DURATION")}: ${$(w[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:m.value}}})),C=[dLe];function L(){c.value=!c.value}function $(w){return new Date(+w*1e3).toISOString().substr(11,8)}function U(w){r("getCoordinates",w)}function G(){U({latitude:null,longitude:null})}function B(w){return n.authUser.imperial_units?$n[w].defaultTarget:w}return(w,Z)=>{const J=ue("Card");return T(),N("div",pLe,[M(J,null,{title:fe(()=>[K(_(w.$t("workouts.ANALYSIS")),1)]),content:fe(()=>[p("div",mLe,[p("label",null,[p("input",{type:"radio",name:"distance",checked:c.value,onClick:L},null,8,ELe),K(" "+_(w.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"duration",checked:!c.value,onClick:L},null,8,hLe),K(" "+_(w.$t("workouts.DURATION")),1)])]),_Le,p("div",TLe,[M(h(BCe),{data:b.value,options:S.value,plugins:C,onMouseleave:G},null,8,["data","options"])]),p("div",gLe,[p("div",ALe,_(w.$t("workouts.NO_DATA_CLEANING")),1),m.value?(T(),N("div",SLe,[p("label",null,[p("input",{type:"checkbox",checked:f.value,onClick:Z[0]||(Z[0]=re=>f.value=!f.value)},null,8,OLe),K(" "+_(w.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):F("",!0)])]),_:1})])}}}),vLe=ae(ILe,[["__scopeId","data-v-b15bb69d"]]),RLe={id:"workout-note"},bLe=["innerHTML"],NLe=Q({__name:"WorkoutNotes",props:{notes:{default:()=>""}},setup(e){const t=e,{notes:n}=_e(t);return(r,a)=>{const s=ue("Card");return T(),N("div",RLe,[M(s,null,{title:fe(()=>[K(_(r.$t("workouts.NOTES")),1)]),content:fe(()=>[p("span",{innerHTML:h(n)&&h(n)!==""?h(vo)(h(n)):r.$t("workouts.NO_NOTES")},null,8,bLe)]),_:1})])}}}),CLe=ae(NLe,[["__scopeId","data-v-f3e81eff"]]),yLe={id:"workout-segments"},DLe=Q({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:r}=_e(t);return(a,s)=>{const o=ue("router-link"),i=ue("Distance"),u=ue("Card");return T(),N("div",yLe,[M(u,null,{title:fe(()=>[K(_(a.$t("workouts.SEGMENT",2)),1)]),content:fe(()=>[p("ul",null,[(T(!0),N(Ie,null,xe(h(n),(l,c)=>(T(),N("li",{key:l.segment_id},[M(o,{to:{name:"WorkoutSegment",params:{workoutId:l.workout_id,segmentId:c+1}}},{default:fe(()=>[K(_(a.$t("workouts.SEGMENT",1))+" "+_(c+1),1)]),_:2},1032,["to"]),K(" ("+_(a.$t("workouts.DISTANCE"))+": ",1),M(i,{distance:l.distance,unitFrom:"km",useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),K(", "+_(a.$t("workouts.DURATION"))+": "+_(l.duration)+") ",1)]))),128))])]),_:1})])}}}),PLe=ae(DLe,[["__scopeId","data-v-15725c61"]]),wLe=e=>(ut("data-v-eac6aa4b"),e=e(),ct(),e),LLe={id:"workout",class:"view"},$Le={class:"container"},kLe={key:0,class:"workout-container"},ULe={key:0},MLe=wLe(()=>p("div",{id:"bottom"},null,-1)),xLe={key:1},FLe=Q({__name:"Workout",props:{displaySegment:{type:Boolean}},setup(e){const t=e,n=Vt(),r=$e(),{displaySegment:a}=_e(t),s=k(()=>r.getters[Te.GETTERS.WORKOUT_DATA]),o=k(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]),i=k(()=>r.getters[$t.GETTERS.SPORTS]),u=ce({latitude:null,longitude:null});It(()=>{const c={workoutId:n.params.workoutId};t.displaySegment&&(c.segmentId=n.params.segmentId),r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,c)}),Rt(()=>{r.commit(Te.MUTATIONS.EMPTY_WORKOUT)});function l(c){u.value={latitude:c.latitude,longitude:c.longitude}}return Fe(()=>n.params.workoutId,async c=>{c&&r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:c})}),Fe(()=>n.params.segmentId,async c=>{if(n.params.workoutId){const f={workoutId:n.params.workoutId};c&&(f.segmentId=c),r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,f)}}),(c,f)=>(T(),N("div",LLe,[p("div",$Le,[i.value.length>0?(T(),N("div",kLe,[s.value.workout.id?(T(),N("div",ULe,[M(cLe,{workoutData:s.value,sports:i.value,authUser:o.value,markerCoordinates:u.value,displaySegment:h(a)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),s.value.workout.with_gpx&&s.value.chartData.length>0?(T(),te(vLe,{key:0,workoutData:s.value,authUser:o.value,displaySegment:h(a),onGetCoordinates:l},null,8,["workoutData","authUser","displaySegment"])):F("",!0),!h(a)&&s.value.workout.segments.length>1?(T(),te(PLe,{key:1,segments:s.value.workout.segments,useImperialUnits:o.value.imperial_units},null,8,["segments","useImperialUnits"])):F("",!0),h(a)?F("",!0):(T(),te(CLe,{key:2,notes:s.value.workout.notes},null,8,["notes"])),MLe])):(T(),N("div",xLe,[s.value.loading?F("",!0):(T(),te(I0,{key:0,target:"WORKOUT"}))]))])):F("",!0)])]))}}),$h=ae(FLe,[["__scopeId","data-v-eac6aa4b"]]),WLe=e=>(ut("data-v-29caaf8f"),e=e(),ct(),e),GLe={class:"workouts-filters"},zLe={class:"box"},BLe={class:"form-all-items"},HLe={class:"form-items-group"},jLe={class:"form-item"},VLe=["value"],KLe={class:"form-item"},YLe=["value"],qLe={class:"form-items-group"},XLe={class:"form-item"},ZLe=["value"],QLe=WLe(()=>p("option",{value:""},null,-1)),JLe=["value"],e8e={class:"form-item form-item-title"},t8e={class:"form-inputs-group"},n8e=["value"],r8e={class:"form-items-group"},a8e={class:"form-item"},s8e={class:"form-inputs-group"},o8e=["value"],i8e=["value"],u8e={class:"form-items-group"},c8e={class:"form-item"},l8e={class:"form-inputs-group"},d8e=["value"],f8e=["value"],p8e={class:"form-items-group"},m8e={class:"form-item"},E8e={class:"form-inputs-group"},h8e=["value"],_8e=["value"],T8e={class:"form-items-group"},g8e={class:"form-item"},A8e={class:"form-inputs-group"},S8e=["value"],O8e=["value"],I8e={class:"form-button"},v8e=Q({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,r=t,{t:a}=jt(),s=Vt(),o=Zr(),{authUser:i}=_e(n),u=i.value.imperial_units?$n.km.defaultTarget:"km",l=k(()=>Jr(n.sports,a));let c=Object.assign({},s.query);gt(()=>{const E=document.getElementById("from");E&&E.focus()});function f(E){const g=E.target.name,b=E.target.value;b===""?delete c[g]:c[g]=b}function d(){r("filter"),"page"in c&&(c.page="1"),o.push({path:"/workouts",query:c})}function m(){r("filter"),o.push({path:"/workouts",query:{}})}return Fe(()=>s.query,E=>{c=Object.assign({},E)}),(E,g)=>(T(),N("div",GLe,[p("div",zLe,[p("form",{onSubmit:Xe(d,["prevent"]),class:"form"},[p("div",BLe,[p("div",HLe,[p("div",jLe,[p("label",null,_(E.$t("workouts.FROM"))+": ",1),p("input",{id:"from",name:"from",type:"date",value:E.$route.query.from,onChange:f},null,40,VLe)]),p("div",KLe,[p("label",null,_(E.$t("workouts.TO"))+": ",1),p("input",{name:"to",type:"date",value:E.$route.query.to,onChange:f},null,40,YLe)])]),p("div",qLe,[p("div",XLe,[p("label",null,_(E.$t("workouts.SPORT",1))+":",1),p("select",{name:"sport_id",value:E.$route.query.sport_id,onChange:f,onKeyup:At(d,["enter"])},[QLe,(T(!0),N(Ie,null,xe(l.value.filter(b=>h(i).sports_list.includes(b.id)),b=>(T(),N("option",{value:b.id,key:b.id},_(b.translatedLabel),9,JLe))),128))],40,ZLe)]),p("div",e8e,[p("label",null,_(E.$t("workouts.TITLE",1))+":",1),p("div",t8e,[p("input",{class:"title",name:"title",value:E.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:At(d,["enter"])},null,40,n8e)])])]),p("div",r8e,[p("div",a8e,[p("label",null,_(E.$t("workouts.DISTANCE"))+" ("+_(h(u))+"): ",1),p("div",s8e,[p("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_from,onChange:f,onKeyup:At(d,["enter"])},null,40,o8e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_to,onChange:f,onKeyup:At(d,["enter"])},null,40,i8e)])])]),p("div",u8e,[p("div",c8e,[p("label",null,_(E.$t("workouts.DURATION"))+": ",1),p("div",l8e,[p("input",{name:"duration_from",value:E.$route.query.duration_from,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,d8e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{name:"duration_to",value:E.$route.query.duration_to,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,f8e)])])]),p("div",p8e,[p("div",m8e,[p("label",null,_(E.$t("workouts.AVE_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",E8e,[p("input",{min:"0",name:"ave_speed_from",value:E.$route.query.ave_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,h8e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{min:"0",name:"ave_speed_to",value:E.$route.query.ave_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,_8e)])])]),p("div",T8e,[p("div",g8e,[p("label",null,_(E.$t("workouts.MAX_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",A8e,[p("input",{min:"0",name:"max_speed_from",value:E.$route.query.max_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,S8e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{min:"0",name:"max_speed_to",value:E.$route.query.max_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,O8e)])])])]),p("div",I8e,[p("button",{type:"submit",class:"confirm",onClick:d},_(E.$t("buttons.FILTER")),1),p("button",{class:"confirm",onClick:m},_(E.$t("buttons.CLEAR_FILTER")),1)])],32)])]))}}),R8e=ae(v8e,[["__scopeId","data-v-29caaf8f"]]),OS=e=>(ut("data-v-bb980a00"),e=e(),ct(),e),b8e={class:"workouts-list"},N8e={class:"total"},C8e={class:"total-label"},y8e={key:0},D8e={key:0,class:"workouts-table responsive-table"},P8e=OS(()=>p("th",{class:"sport-col"},null,-1)),w8e={class:"sport-col"},L8e={class:"cell-heading"},$8e=["onMouseover"],k8e={class:"cell-heading"},U8e={key:0,class:"fa fa-map-o","aria-hidden":"true"},M8e={class:"title"},x8e={class:"workout-date"},F8e={class:"cell-heading"},W8e={class:"text-right"},G8e={class:"cell-heading"},z8e={class:"text-right"},B8e={class:"cell-heading"},H8e={class:"text-right"},j8e={class:"cell-heading"},V8e={class:"text-right"},K8e={class:"cell-heading"},Y8e={class:"text-right"},q8e={class:"cell-heading"},X8e={class:"text-right"},Z8e={class:"cell-heading"},Q8e=OS(()=>p("div",{id:"bottom"},null,-1)),J8e=Q({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=$e(),r=Vt(),a=Zr(),{user:s,sports:o}=_e(t),i=["ave_speed","distance","duration","workout_date"],u=k(()=>n.getters[Te.GETTERS.USER_WORKOUTS]),l=k(()=>n.getters[Te.GETTERS.WORKOUTS_PAGINATION]),c=k(()=>n.getters[H.GETTERS.LANGUAGE]);let f=g(r.query);const d=ce(null);It(()=>{m(f)});function m(R){n.dispatch(Te.ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?b(R):R)}function E(R,A){const S=Object.assign({},r.query);S[R]=A,R==="per_page"&&(S.page="1"),f=g(S),a.push({path:"/workouts",query:f})}function g(R){const A=Wd(R,i,bo.order_by,{defaultSort:bo.order});return Object.keys(R).filter(S=>HAe.includes(S)).map(S=>{typeof R[S]=="string"&&(A[S]=R[S])}),A}function b(R){const A={...R};return Object.entries(A).map(S=>{S[0].match("speed|distance")&&S[1]&&(A[S[0]]=sn(+S[1],"mi","km"))}),A}function v(R){d.value=R}return Fe(()=>r.query,async R=>{f=g(R),m(f)}),(R,A)=>{const S=ue("SportImage"),C=ue("router-link"),L=ue("Distance");return T(),N("div",b8e,[p("div",{class:ge(["box",{"empty-table":u.value.length===0}])},[p("div",N8e,[p("span",C8e,_(R.$t("common.TOTAL").toLowerCase())+": ",1),l.value.total?(T(),N("span",y8e,_(l.value.total)+" "+_(R.$t("workouts.WORKOUT",l.value.total)),1)):F("",!0)]),M(hA,{sort:h(g0),order_by:i,query:h(f),message:"workouts",onUpdateSelect:E},null,8,["sort","query"]),u.value.length>0?(T(),N("div",D8e,[M(Wu,{class:"top-pagination",pagination:l.value,path:"/workouts",query:h(f)},null,8,["pagination","query"]),p("table",null,[p("thead",{class:ge({smaller:c.value==="de"})},[p("tr",null,[P8e,p("th",null,_(St(R.$t("workouts.WORKOUT",1))),1),p("th",null,_(St(R.$t("workouts.DATE"))),1),p("th",null,_(St(R.$t("workouts.DISTANCE"))),1),p("th",null,_(St(R.$t("workouts.DURATION"))),1),p("th",null,_(St(R.$t("workouts.AVE_SPEED"))),1),p("th",null,_(St(R.$t("workouts.MAX_SPEED"))),1),p("th",null,_(St(R.$t("workouts.ASCENT"))),1),p("th",null,_(St(R.$t("workouts.DESCENT"))),1)])],2),p("tbody",null,[(T(!0),N(Ie,null,xe(u.value,$=>(T(),N("tr",{key:$.id},[p("td",w8e,[p("span",L8e,_(R.$t("workouts.SPORT",1)),1),h(o).length>0?(T(),te(S,{key:0,title:h(o).filter(U=>U.id===$.sport_id)[0].translatedLabel,"sport-label":h(_0)($,h(o)),color:h(T0)($,h(o))},null,8,["title","sport-label","color"])):F("",!0)]),p("td",{class:"workout-title",onMouseover:U=>v($.id),onMouseleave:A[0]||(A[0]=U=>v(null))},[p("span",k8e,_(St(R.$t("workouts.WORKOUT",1))),1),M(C,{class:"nav-item",to:{name:"Workout",params:{workoutId:$.id}}},{default:fe(()=>[$.with_gpx?(T(),N("i",U8e)):F("",!0),p("span",M8e,_($.title),1)]),_:2},1032,["to"]),$.with_gpx&&d.value===$.id?(T(),te(HA,{key:0,workout:$,"display-hover":!0},null,8,["workout"])):F("",!0)],40,$8e),p("td",x8e,[p("span",F8e,_(R.$t("workouts.DATE")),1),p("time",null,_(h(xn)($.workout_date,h(s).timezone,h(s).date_format)),1)]),p("td",W8e,[p("span",G8e,_(R.$t("workouts.DISTANCE")),1),$.distance!==null?(T(),te(L,{key:0,distance:$.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",z8e,[p("span",B8e,_(R.$t("workouts.DURATION")),1),K(" "+_($.moving),1)]),p("td",H8e,[p("span",j8e,_(R.$t("workouts.AVE_SPEED")),1),$.ave_speed!==null?(T(),te(L,{key:0,distance:$.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",V8e,[p("span",K8e,_(R.$t("workouts.MAX_SPEED")),1),$.max_speed!==null?(T(),te(L,{key:0,distance:$.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",Y8e,[p("span",q8e,_(R.$t("workouts.ASCENT")),1),$.ascent!==null?(T(),te(L,{key:0,distance:$.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",X8e,[p("span",Z8e,_(R.$t("workouts.DESCENT")),1),$.descent!==null?(T(),te(L,{key:0,distance:$.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)])]))),128))])]),M(Wu,{pagination:l.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):F("",!0)],2),u.value.length===0?(T(),te(R0,{key:0})):F("",!0),Q8e])}}}),e$e=ae(J8e,[["__scopeId","data-v-bb980a00"]]),t$e={key:0,id:"workouts",class:"view"},n$e={class:"container workouts-container"},r$e={class:"display-filters"},a$e={class:"list-container"},s$e=Q({__name:"WorkoutsView",setup(e){const{t}=jt(),n=$e(),r=k(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=k(()=>n.getters[$t.GETTERS.SPORTS]),s=k(()=>Jr(a.value,t)),o=ce(!0);function i(){o.value=!o.value}return(u,l)=>r.value.username?(T(),N("div",t$e,[p("div",n$e,[p("div",{class:ge(["filters-container",{hidden:o.value}])},[M(R8e,{sports:s.value,authUser:r.value,onFilter:i},null,8,["sports","authUser"])],2),p("div",r$e,[p("div",{onClick:i},[p("i",{class:ge(`fa fa-caret-${o.value?"down":"up"}`),"aria-hidden":"true"},null,2),p("span",null,_(u.$t(`workouts.${o.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),p("div",a$e,[M(e$e,{user:r.value,sports:s.value},null,8,["user","sports"])])])])):F("",!0)}}),o$e=ae(s$e,[["__scopeId","data-v-3fa59b88"]]),{t:kh}=ga.global,Uh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},i$e=[{path:"/",name:"Dashboard",component:i4e,meta:{title:"dashboard.DASHBOARD"}},{path:"/login",name:"Login",component:vh,props:{action:"login"},meta:{title:"user.LOGIN",withoutAuth:!0}},{path:"/register",name:"Register",component:vh,props:{action:"register"},meta:{title:"user.REGISTER",withoutAuth:!0}},{path:"/account-confirmation",name:"AccountConfirmation",component:gDe,meta:{title:"user.ACCOUNT_CONFIRMATION",withoutAuth:!0}},{path:"/account-confirmation/resend",name:"AccountConfirmationResend",component:Ih,props:{action:"account-confirmation-resend"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/account-confirmation/email-sent",name:"AccountConfirmationEmailSend",component:Ih,props:{action:"email-sent"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/password-reset/sent",name:"PasswordEmailSent",component:Ai,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:Ai,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:Ai,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:Ai,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:IDe,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:XDe,children:[{path:"",name:"UserProfile",component:gOe,props:e=>({tab:Uh(e.path)}),children:[{path:"",name:"UserInfos",component:bA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:GOe,meta:{title:"user.PROFILE.TABS.PREFERENCES"}},{path:"sports",name:"UserSportPreferences",component:mh,props:{isEdition:!1},meta:{title:"user.PROFILE.TABS.SPORTS"}},{path:"apps",name:"UserApps",component:jbe,children:[{path:"",name:"UserAppsList",component:dNe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id",name:"UserApp",component:ph,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id/created",name:"CreatedUserApp",component:ph,props:{afterCreation:!0},meta:{title:"user.PROFILE.TABS.APPS"}},{path:"new",name:"AddUserApp",component:wbe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:Bbe,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:BOe,props:e=>({tab:Uh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:Gve,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:Rve,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:Zve,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:qRe,meta:{title:"user.PROFILE.EDIT_PREFERENCES"}},{path:"sports",name:"UserSportPreferencesEdition",component:mh,props:{isEdition:!0},meta:{title:"user.PROFILE.EDIT_SPORTS_PREFERENCES"}},{path:"privacy-policy",name:"UserPrivacyPolicy",component:cbe,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:M4e,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:Rh,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:o$e,meta:{title:"workouts.WORKOUT",count:0}},{path:"/workouts/:workoutId",name:"Workout",component:$h,props:{displaySegment:!1},meta:{title:"workouts.WORKOUT"}},{path:"/workouts/:workoutId/edit",name:"EditWorkout",component:HPe,meta:{title:"workouts.EDIT_WORKOUT"}},{path:"/workouts/:workoutId/segment/:segmentId",name:"WorkoutSegment",component:$h,props:{displaySegment:!0},meta:{title:"workouts.SEGMENT",count:0}},{path:"/workouts/add",name:"AddWorkout",component:GPe,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:I3e,children:[{path:"",name:"AdministrationMenu",component:dAe,meta:{title:"admin.ADMINISTRATION"}},{path:"application",name:"ApplicationAdministration",component:HE,meta:{title:"admin.APP_CONFIG.TITLE"}},{path:"application/edit",name:"ApplicationAdministrationEdition",component:HE,props:{edition:!0},meta:{title:"admin.APPLICATION"}},{path:"sports",name:"SportsAdministration",component:$Ae,meta:{title:"admin.SPORTS.TITLE"}},{path:"users/:username",name:"UserFromAdmin",component:Rh,props:{fromAdmin:!0},meta:{title:"admin.USER",count:1}},{path:"users",name:"UsersAdministration",component:QSe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:p3e,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:p4e,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:c4e,meta:{title:"error.NOT_FOUND.PAGE"}}],IS=zpe({history:ape("/"),routes:i$e});IS.beforeEach((e,t,n)=>{if("title"in e.meta){const r=typeof e.meta.title=="string"?e.meta.title:"",a=r?typeof e.meta.count=="number"?kh(r,+e.meta.count):kh(r):"";window.document.title=`FitTrackee${r?` - ${St(a)}`:""}`}eo.dispatch(Y.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(eo.getters[Y.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!eo.getters[Y.GETTERS.IS_AUTHENTICATED]&&!e.meta.withoutAuth){const r=e.path==="/"?{path:"/login"}:{path:"/login",query:{from:e.fullPath}};n(r)}else n()}).catch(r=>{console.error(r),n()})});const _t=IS;Yd.register(RS,bS,NS,CS,yS,DS,PS,Mh,wS,xh,LS,$S);const vS=A2(O0e).provide("sportColors",h0).use(ga).use(eo).use(_t).use(sR,{name:"VFullscreen"}).directive("click-outside",_he);hhe.forEach(e=>{vS.component(e.name,e.target)});vS.mount("#app");
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = ["static/maps-ZyuCPqes.js","static/css/maps-B7qTrBCW.css"]