1import{a as E}from"./chunk-s0wiiGIr.js";import"./chunk-B7GYYPiL.js";import{At as WT,Cn as fh,Ct as V0,D as Gl,Dt as Vr,E as Gh,F as Hh,G as Lu,Gt as Z$1,Hn as ku,Kt as ZI,M as HT,On as go,Or as sl,Qr as zD,Qt as aT,Vr as uw,Y as Ne$1,_r as qf,at as QD,bt as Ue$1,ei as zT,g as EE,gn as eT,hr as qT,kt as WD,lt as Re$1,m as Dh,nn as aw,or as ot$1,u as Cg,ur as ph,ut as Ri,vt as UD,x as Fg,yt as UT,zr as ul}from"./chunk-hDFLhPjY.js";import"./chunk-FC6QOr9W.js";import"./chunk-CliYzLcJ.js";import"./chunk-CcZ3toaq.js";import"./chunk-rZVfv4j_.js";import"./chunk-zDu33c0T.js";import"./chunk-CvaPAsOr.js";import"./chunk-BVtY32wR.js";import"./chunk-CABSGZFi.js";import"./chunk-DD_7l2Gm.js";import{Jt as et$1,Zt as fE,ln as ks,m as CE,p as C4,ut as R5,vn as pa}from"./chunk-DvgwK5vQ.js";import"./chunk-OfVixYYr.js";import"./chunk-CCKOTdxL.js";import{b as Ue$2,h as Pi,o as Bt,x as Vi}from"./main-N5A2UYE4.js";import{n as u,s as g}from"./chunk-CUE-5jAO.js";import{D as qe$1,T as me,g as Xe$1,h as X,l as M,z as H}from"./chunk-C5uwmGBb.js";import"./chunk-DANXAhNr.js";import{r as g$1}from"./chunk-ApEGa6EG.js";import{a as u$1}from"./chunk-CJbVWNpS.js";import"./chunk-Cf0m4eJf.js";import{t as ar}from"./chunk-LQyRHBHi.js";import{t as Zt}from"./chunk-Dpyf7UlJ.js";var De=(n,d)=>d.collection.uuid;var we=(n,d)=>d.share;function Ne(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(){ku(e);return Lu(aT().createLiveGroup())}),ph(1,`ion-icon`,43),Ri(2,`div`,9)(3,`div`,10),HT(4),sl()()()}if(n&2){let e=aT();EE(4),Hh(e.i18n.texts.menu.create_live_group)}}function Re(n,d){if(n&1&&HT(0),n&2)ul(` `,aT(2).i18n.texts.menu.one_live_group,` `)}function Ae(n,d){if(n&1&&(HT(0),aw(1,`i18nString`)),n&2)ul(` `,uw(1,1,`menu.several_live_groups`,aT(2).liveGroups.length),` `)}function Le(n,d){if(n&1&&(Ri(0,`div`,47),HT(1),sl()),n&2){let e=aT(2);EE(),Hh(e.i18n.texts.pages.live_group.paused)}}function Ge(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(t){ku(e);return Lu(aT().liveGroupMenu(t))}),ph(1,`ion-icon`,44),Ri(2,`div`,9)(3,`div`,45)(4,`span`),UD(5,Re,1,1)(6,Ae,2,4),sl(),ph(7,`ion-icon`,46),sl(),UD(8,Le,2,1,`div`,47),sl()()}if(n&2){let e=aT();EE(5),WD(e.liveGroups.length===1?5:6),EE(3),WD(e.liveGroupsPaused?8:-1)}}function We(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT().$implicit;EE(),Hh(e.nbTrails)}}function ze(n,d){n&1&&(Ri(0,`div`,55),ph(1,`ion-icon`,56),sl())}function Fe(n,d){if(n&1){let e=eT();Gh(0),Ri(1,`div`,51),Dh(`click`,function(){ku(e);let t=WT(0),a=aT(2);return a.goTo(t),Lu(a.close())}),Ri(2,`div`,9)(3,`div`,45)(4,`div`,16)(5,`a`,52),Dh(`click`,function(t){return t.button===1||t.ctrlKey?t.stopPropagation():t.preventDefault()}),HT(6),sl(),UD(7,We,2,1,`div`,19),sl(),Ri(8,`ion-button`,53),Dh(`click`,function(t){let a=ku(e).$implicit;return Lu(aT(2).openCollectionMenu(t,a.collection))}),ph(9,`ion-icon`,54),sl()()(),UD(10,ze,2,0,`div`,55),sl()}if(n&2){let e=d.$implicit,l=aT(2),t=UT(`/trails/collection/`+e.collection.uuid+(e.collection.owner!==l.email?`/`+e.collection.owner:``));EE(5),fh(`href`,qT(t),qf),EE(),ul(` `,e.collection.name.length===0&&e.collection.type===`MY_TRAILS`?l.i18n.texts.my_trails:e.collection.name,` `),EE(),WD(e.nbTrails!==void 0?7:-1),EE(3),WD(e.collection.type===`SHARED`?10:-1)}}function Be(n,d){if(n&1){let e=eT();zD(0,Fe,11,6,`div`,48,De),Ri(2,`div`,49),Dh(`click`,function(){ku(e);let t=aT();return t.goTo(`/trails/all-collections`),Lu(t.close())}),Ri(3,`div`,9)(4,`div`,10)(5,`div`,16)(6,`a`,50),Dh(`click`,function(t){return t.button===1||t.ctrlKey?t.stopPropagation():t.preventDefault()}),HT(7),sl(),Ri(8,`div`,19),HT(9),sl()()()()()}if(n&2){let e=aT();QD(e.collections),EE(7),ul(` `,e.i18n.texts.all_collections,` `),EE(2),Hh(e.allCollectionsTrails)}}function Ue(n,d){if(n&1&&(Ri(0,`div`,57),HT(1),sl()),n&2){let e=aT(2);EE(),Hh(e.i18n.texts.menu.nothing_shared_with_me)}}function Ke(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT().$implicit;EE(),Hh(e.nbTrails)}}function He(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(){let t=ku(e).$implicit,a=aT(3);return a.goTo(`/trails/share/`+t.share.uuid+`/`+t.share.owner),Lu(a.close())}),Ri(1,`div`,9)(2,`div`,45)(3,`div`,16)(4,`a`,52),Dh(`click`,function(t){return t.button===1||t.ctrlKey?t.stopPropagation():t.preventDefault()}),HT(5),sl(),UD(6,Ke,2,1,`div`,19),sl(),Ri(7,`ion-button`,53),Dh(`click`,function(t){let a=ku(e).$implicit;return Lu(aT(3).openShareMenu(t,a.share))}),ph(8,`ion-icon`,54),sl()(),Ri(9,`div`,47),HT(10),sl()()()}if(n&2){let e=d.$implicit;EE(4),fh(`href`,zT(`/trails/share/`,e.share.uuid,`/`,e.share.owner),qf),EE(),ul(` `,e.share.name,` `),EE(),WD(e.nbTrails!==void 0?6:-1),EE(4),Hh(e.share.owner)}}function qe(n,d){if(n&1&&zD(0,He,11,6,`div`,13,we),n&2)QD(aT(2).sharedWithMe)}function Ye(n,d){if(n&1&&UD(0,Ue,2,1,`div`,57)(1,qe,2,0),n&2)WD(aT().sharedWithMe.isEmpty()?0:1)}function Je(n,d){if(n&1&&(Ri(0,`div`,57),HT(1),sl()),n&2){let e=aT(2);EE(),Hh(e.i18n.texts.menu.nothing_shared_by_me)}}function Ze(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT().$implicit;EE(),Hh(e.nbTrails)}}function Qe(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(){let t=ku(e).$implicit,a=aT(3);
1return a.goTo(`/trails/share/`+t.share.uuid+`/`+t.share.owner),Lu(a.close())}),Ri(1,`div`,9)(2,`div`,45)(3,`div`,16)(4,`a`,52),Dh(`click`,function(t){return t.button===1||t.ctrlKey?t.stopPropagation():t.preventDefault()}),HT(5),sl(),UD(6,Ze,2,1,`div`,19),sl(),Ri(7,`ion-button`,53),Dh(`click`,function(t){let a=ku(e).$implicit;return Lu(aT(3).openShareMenu(t,a.share))}),ph(8,`ion-icon`,54),sl()(),Ri(9,`div`,47),HT(10),sl()()()}if(n&2){let e=d.$implicit,l=aT(3);EE(4),fh(`href`,zT(`/trails/share/`,e.share.uuid,`/`,e.share.owner),qf),EE(),ul(` `,e.share.name,` `),EE(),WD(e.nbTrails!==void 0?6:-1),EE(4),Hh(l.emailsSplit(e.share.recipients))}}function Xe(n,d){if(n&1&&zD(0,Qe,11,6,`div`,13,we),n&2)QD(aT(2).sharedByMe)}function $e(n,d){if(n&1&&UD(0,Je,2,1,`div`,57)(1,Xe,2,0),n&2)WD(aT().sharedByMe.isEmpty()?0:1)}function et(n,d){if(n&1&&(Ri(0,`div`,33),ph(1,`ion-icon`,58),Ri(2,`span`),HT(3),sl()()),n&2){let e=aT();EE(3),Hh(e.i18n.texts.menu.no_share_for_anonymous)}}function tt(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT(4);EE(),Hh(e.pubDraft.nbTrails)}}function nt(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(){ku(e);let t=aT(3);return t.goTo(`/trails/collection/`+t.pubDraft.collection.uuid+`/`+t.pubDraft.collection.owner),Lu(t.close())}),Ri(1,`div`,9)(2,`div`,10)(3,`div`,16)(4,`a`,61),Dh(`click`,function(t){return t.button===1||t.ctrlKey?t.stopPropagation():t.preventDefault()}),HT(5),sl(),UD(6,tt,2,1,`div`,19),sl()()()()}if(n&2){let e=aT(3);EE(4),fh(`href`,zT(`/trails/collection/`,e.pubDraft.collection.uuid,`/`,e.pubDraft.collection.owner),qf),EE(),ul(` `,e.i18n.texts.publications.draft_name,` `),EE(),WD(e.pubDraft.nbTrails!==void 0?6:-1)}}function it(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT(4);EE(),Hh(e.pubSubmit.nbTrails)}}function ot(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(){ku(e);let t=aT(3);return t.goTo(`/trails/collection/`+t.pubSubmit.collection.uuid+`/`+t.pubSubmit.collection.owner),Lu(t.close())}),Ri(1,`div`,9)(2,`div`,10)(3,`div`,16)(4,`a`,62),Dh(`click`,function(t){return t.button===1||t.ctrlKey?t.stopPropagation():t.preventDefault()}),HT(5),sl(),UD(6,it,2,1,`div`,19),sl()()()()}if(n&2){let e=aT(3);EE(4),fh(`href`,zT(`/trails/collection/`,e.pubSubmit.collection.uuid,`/`,e.pubSubmit.collection.owner),qf),EE(),ul(` `,e.i18n.texts.publications.submit_name,` `),EE(),WD(e.pubSubmit.nbTrails!==void 0?6:-1)}}function lt(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT(4);EE(),Hh(e.pubReject.nbTrails)}}function rt(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(){ku(e);let t=aT(3);return t.goTo(`/trails/collection/`+t.pubReject.collection.uuid+`/`+t.pubReject.collection.owner),Lu(t.close())}),Ri(1,`div`,9)(2,`div`,10)(3,`div`,16)(4,`a`,63),Dh(`click`,function(t){return t.button===1||t.ctrlKey?t.stopPropagation():t.preventDefault()}),HT(5),sl(),UD(6,lt,2,1,`div`,19),sl()()()()}if(n&2){let e=aT(3);EE(4),fh(`href`,zT(`/trails/collection/`,e.pubReject.collection.uuid,`/`,e.pubReject.collection.owner),qf),EE(),ul(` `,e.i18n.texts.publications.reject_name,` `),EE(),WD(e.pubReject.nbTrails!==void 0?6:-1)}}function at(n,d){if(n&1){let e=eT();UD(0,nt,7,5,`div`,13),UD(1,ot,7,5,`div`,13),UD(2,rt,7,5,`div`,13),Ri(3,`div`,7),Dh(`click`,function(){ku(e);let t=aT(2);return t.goTo(`/trails/my-publications`),Lu(t.close())}),Ri(4,`div`,9)(5,`div`,10)(6,`div`,16)(7,`a`,60),Dh(`click`,function(t){return t.button===1||t.ctrlKey?t.stopPropagation():t.preventDefault()}),HT(8),sl(),Ri(9,`div`,19),HT(10),sl()()()()()}if(n&2){let e=aT(2);WD(e.pubDraft?0:-1),EE(),WD(e.pubSubmit?1:-1),EE(),WD(e.pubReject?2:-1),EE(6),ul(` `,e.i18n.texts.publications.my_public_trails_name,` `),EE(2),Hh(e.myPublicTrails.length)}}function ct(n,d){if(n&1){let e=eT();Ri(0,`div`,34)(1,`div`,29),Dh(`click`,function(){ku(e);let t=aT();return Lu(t.publicationsOpen=!t.publicationsOpen)}),ph(2,`ion-icon`,59),Ri(3,`div`,23),HT(4),sl(),Ri(5,`ion-button`,26),ph(6,`ion-icon`,27),sl()(),UD(7,at,11,5),sl()}if(n&2){let e=aT();EE(4),Hh(e.i18n.texts.menu.my_publications),EE(2),fh(`name`,e.publicationsOpen?`chevron-down`:`chevron-right`),EE(),WD(e.publicationsOpen?7:-1)}}function st(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT(2);EE(),Hh(e.moderationCounters.trails+e.moderationCounters.comments+e.moderationCounters.commentReplies+e.moderationCounters.removeRequests+e.moderationCounters.avatars)}}function dt(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT(3);EE(),Hh(e.moderationCounters.trails)}}function mt(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT(3);EE(),Hh(e.moderationCounters.comments+e.moderationCounters.commentReplies)}}function _t(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT(3);EE(),Hh(e.moderationCounters.removeRequests)}}function pt(n,d){if(n&1&&(Ri(0,`div`,19),HT(1),sl()),n&2){let e=aT(3);EE(),Hh(e.moderationCounters.avatars)}}function ut(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(){ku(e);let t=aT(2);
1return t.goTo(`/trails/moderation`),Lu(t.close())}),Ri(1,`div`,9)(2,`div`,66)(3,`div`,16)(4,`div`,65),HT(5),sl(),UD(6,dt,2,1,`div`,19),sl()()()(),Ri(7,`div`,7),Dh(`click`,function(){ku(e);let t=aT(2);return t.goTo(`/moderation/comments`),Lu(t.close())}),Ri(8,`div`,9)(9,`div`,67)(10,`div`,16)(11,`div`,65),HT(12),sl(),UD(13,mt,2,1,`div`,19),sl()()()(),Ri(14,`div`,7),Dh(`click`,function(){ku(e);let t=aT(2);return t.goTo(`/moderation/removals`),Lu(t.close())}),Ri(15,`div`,9)(16,`div`,68)(17,`div`,16)(18,`div`,65),HT(19),sl(),UD(20,_t,2,1,`div`,19),sl()()()(),Ri(21,`div`,7),Dh(`click`,function(){ku(e);let t=aT(2);return t.goTo(`/moderation/avatars`),Lu(t.close())}),Ri(22,`div`,9)(23,`div`,69)(24,`div`,16)(25,`div`,65),HT(26),sl(),UD(27,pt,2,1,`div`,19),sl()()()()}if(n&2){let e=aT(2);EE(5),Hh(e.i18n.texts.publications.moderation.menu_trails),EE(),WD(e.moderationCounters?6:-1),EE(6),Hh(e.i18n.texts.publications.moderation.menu_comments),EE(),WD(e.moderationCounters?13:-1),EE(6),Hh(e.i18n.texts.publications.moderation.menu_remove),EE(),WD(e.moderationCounters?20:-1),EE(6),Hh(e.i18n.texts.pages.avatar_moderation.menu_title),EE(),WD(e.moderationCounters?27:-1)}}function Ct(n,d){if(n&1){let e=eT();ph(0,`div`,14),Ri(1,`div`,7),Dh(`click`,function(){ku(e);let t=aT(2);return t.goTo(`/admin`),Lu(t.close())}),ph(2,`ion-icon`,70),Ri(3,`div`,9)(4,`div`,10),HT(5),sl()()()}if(n&2){let e=aT(2);EE(5),Hh(e.i18n.texts.administration)}}function vt(n,d){if(n&1){let e=eT();Ri(0,`div`,64)(1,`div`,29),Dh(`click`,function(){ku(e);let t=aT();return Lu(t.moderationOpen=!t.moderationOpen)}),ph(2,`ion-icon`,59),Ri(3,`div`,23)(4,`div`,16)(5,`div`,65),HT(6),sl(),UD(7,st,2,1,`div`,19),sl()(),Ri(8,`ion-button`,26),ph(9,`ion-icon`,27),sl()(),UD(10,ut,28,8),sl(),UD(11,Ct,6,1)}if(n&2){let e=aT();EE(6),Hh(e.i18n.texts.publications.moderation.menu_title),EE(),WD(e.moderationCounters?7:-1),EE(2),fh(`name`,e.moderationOpen?`chevron-down`:`chevron-right`),EE(),WD(e.moderationOpen?10:-1),EE(),WD(e.isAdmin&&!e.isNative?11:-1)}}function xt(n,d){if(n&1&&(Ri(0,`div`,71),ph(1,`ion-icon`,72),Ri(2,`ion-badge`),HT(3),sl()()),n&2){let e=aT(2);EE(),fh(`name`,e.update.icon),EE(2),Hh(e.update.badge)}}function ft(n,d){if(n&1&&ph(0,`ion-icon`,72),n&2)fh(`name`,aT(2).update.icon)}function gt(n,d){if(n&1){let e=eT();Ri(0,`div`,7),Dh(`click`,function(){ku(e);let t=aT();return t.update.launch(),Lu(t.close())}),UD(1,xt,4,2,`div`,71)(2,ft,1,1,`ion-icon`,72),Ri(3,`div`,9)(4,`div`,10),HT(5),sl()()()}if(n&2){let e=aT();EE(),WD(e.update.badge?1:2),EE(4),Hh(e.i18n.texts.update[e.update.i18nText])}}var zt=(()=>{class n{constructor(e,l,t,a,v,ke,Pe,F,Oe,ye,Ie,Ee){this.injector=e,this.i18n=l,this.collectionService=t,this.shareService=a,this.router=ke,this.menuController=Pe,this.authService=F,this.versionName=Pi,this.collections=ar(),this.sharedWithMe=ar(),this.sharedByMe=ar(),this.allCollectionsTrails=0,this.mySelectionCount=0,this.myPublicTrails=[],this.liveGroups=[],this.liveGroupsPaused=!1,this.moderationCounters=void 0,this.recording=!1,this.collectionsOpen=!0,this.sharedWithMeOpen=!0,this.sharedByMeOpen=!1,this.publicationsOpen=!1,this.moderationOpen=!1,this.isAdmin=!1,this.isAnonymous=!1,this.isModerator=!1,this.isInit=!1,this.debugLastClick=0,this.debugClickCount=0;let Ve=new u$1(Ee,Ie),B=()=>{this.isInit&&Ve.detectChanges()};this.isNative=Oe.is(`capacitor`),Fg([F.userChanged$,t.getAllCollectionsReady$().pipe(ot$1(g=>t.sort(g)))]).pipe(Gl(([g,h])=>{this.email=g?.email;let b=h.map(P=>new J(P));return h.length===0?Cg([]):go(Cg(b),v.getAllWhenLoaded$().pipe(H(),ot$1(P=>{for(let k of b)k.nbTrails=0;let je=h.filter(k=>!Xe$1(k.type));this.allCollectionsTrails=P.filter(k=>je.some(N=>N.uuid===k.collectionUuid&&N.getContentOwner()==k.owner)).length;for(let k of P){let N=b.find(Q=>Q.collection.uuid===k.collectionUuid&&k.owner===Q.collection.getContentOwner());N&&N.nbTrails++}return b})))}),g(0,10)).subscribe(g=>{this.collections=ar(g.filter(h=>!Xe$1(h.collection.type))),this.pubDraft=g.find(h=>h.collection.type===M.PUB_DRAFT),this.pubSubmit=g.find(h=>h.collection.type===M.PUB_SUBMIT),this.pubReject=g.find(h=>
1h.collection.type===M.PUB_REJECT),B()}),Fg([F.permissionsChanged$,a.getAll$().pipe(H(),ot$1(g=>(g.sort((h,b)=>h.name.localeCompare(b.name,ye.preferences.lang)),g)),Gl(g=>{let h=g.map(b=>new Z(b));return g.length===0?Cg([]):go(Cg(h),a.getTrailsByShare(g).pipe(ot$1(b=>{for(let P of h)P.nbTrails=(b.get(P.share)??[]).length;return h})))}),g(0,10))]).subscribe(([g,h])=>{this.sharedByMe=ar(h.filter(b=>b.share.owner===g?.email)),this.sharedWithMe=ar(h.filter(b=>b.share.owner!==g?.email)),this.isAdmin=!!g?.admin,this.isAnonymous=!!g?.isAnonymous,this.isModerator=!!g?.roles?.find(b=>b===`moderator`),B()}),setTimeout(()=>this.deferedInit(B),1e3)}deferedInit(e){import(`./chunk-BMcW_DTK2.js`).then(l=>this.injector.get(l.MyPublicTrailsService).myPublicTrails$.subscribe(t=>{this.myPublicTrails=t,e()})),import(`./chunk-CJB0VJ0o2.js`).then(l=>this.injector.get(l.MySelectionService).getMySelection().subscribe(t=>{this.mySelectionCount=t.length,e()})),import(`./chunk-Cd4UyIP12.js`).then(l=>{let t=this.injector.get(l.LiveGroupService);t.groups$.pipe(Gl(a=>a?.length?t.paused$.pipe(ot$1(v=>({groups:a,paused:v}))):Cg({groups:[],paused:!1}))).subscribe(a=>{this.liveGroups=a.groups,this.liveGroupsPaused=a.paused,e()})}),this.authService.permissionsChanged$.pipe(Gl(l=>!l||!l.admin&&!l.roles?.includes(`moderator`)?Ue$1:Ne$1(import(`./chunk-BmJdLTU-2.js`))),Gl(l=>this.injector.get(l.ModerationService).counters$)).subscribe(l=>{this.moderationCounters=l,e()}),import(`./chunk-BiidEoZo.js`).then(l=>this.injector.get(l.UpdateService).availableDownload$.subscribe(t=>{this.update=t,e()})),import(`./chunk-rXQ4vwnT2.js`).then(l=>this.injector.get(l.TraceRecorderService).current$.subscribe(t=>{let a=!!t;this.recording!==a&&(this.recording=a,e())}))}ngOnInit(){this.isInit=!0}goTo(e){this.router.navigateByUrl(e)}goToPublicPage(e){this.goTo(`/`+this.injector.get(Vi).preferences.lang+e)}goToRecordTrace(){import(`./chunk-rXQ4vwnT2.js`).then(e=>{let l=this.injector.get(e.TraceRecorderService),t=l.current;t?t.followingTrailUuid?this.goTo(`/trail/`+t.followingTrailOwner+`/`+t.followingTrailUuid):this.goTo(`/trail`):l.start().then(()=>this.goTo(`/trail`))})}createLiveGroup(){import(`./chunk-CGCjIiIM.js`).then(e=>e.openCreateLiveGroupPopup(this.injector)).then(e=>{e&&import(`./chunk-Cd4UyIP12.js`).then(l=>this.injector.get(l.LiveGroupService).openLiveGroup(e))}),this.close()}liveGroupMenu(e){e.stopPropagation(),import(`./chunk-Cd4UyIP12.js`).then(l=>{let t=this.injector.get(l.LiveGroupService),a=[new u().setIcon(`pause`).setI18nLabel(`pages.live_group.pause`).setVisible(()=>!t.paused).setAction(()=>t.pause()),new u().setIcon(`play`).setI18nLabel(`pages.live_group.resume`).setVisible(()=>t.paused).setAction(()=>t.resume()),new u,...this.liveGroups.map(v=>new u().setFixedLabel(v.name).setSubLabel([this.i18n.texts.pages.live_group.date_from+` `+this.i18n.timestampToDateString(v.startedAt)+` `+this.i18n.texts.pages.live_group.date_to+` `+this.i18n.timestampToDateString(v.expiresAt)]).setAction(()=>{t.openLiveGroup(v),this.close()})),new u().setIcon(`add`).setI18nLabel(`menu.create_live_group`).setTextColor(`success`).setVisible(()=>!this.isAnonymous&&this.liveGroups.length<10).setAction(()=>this.createLiveGroup())];this.injector.get(pa).create({component:Zt,componentProps:{menu:a},event:e,side:`right`,dismissOnSelect:!0,arrow:!0}).then(v=>v.present())})}openHelp(){window.open(`https://help.trailence.org/`+this.injector.get(Vi).preferences.lang+`/home.html`,`_blank`)}close(e=1){return E(this,null,function*(){(yield this.menuController.close())||(console.log(`App Menu not closed ! trial `,e),e<=5&&setTimeout(()=>this.close(e+1),200))})}emailsSplit(e){let l=e.join(`, `);if(l.length<=30)return l;l=``;for(let t=0;t<e.length;++t){let a=this.emailSplit(e[t]);if(t===0)l=a;else{if(l.length+2+a.length>30){let v=e.slice(0,t).join(`, `);return(v.length<=l.length||v.length<28)&&(l=v),l+=` +`+(e.length-t),l}l+=`, `+a}}return l}emailSplit(e){let l=e.indexOf(`@`),t=l>=0?e.substring(0,l):e,a=l>=0?e.substring(l+1):``;return t.length>12&&(t=t.substring(0,9)+`...`),a.length>12&&(a=a.substring(0,9)+`...`),t+`@`+a}openCollectionMenu(e,l){e.stopPropagation();let t=this.collectionService.getCollectionMenu(l);this.injector.get(pa).create({component:Zt,componentProps:{menu:t},event:e,side:`right`,dismissOnSelect:!0,arrow:!0}).then(a=>a.present())}openShareMenu(e,l){e.stopPropagation();let t=this.shareService.getShareMenu(l);this.injector.get(pa).create({component:Zt,componentProps:{menu:t},event:e,side:`right`,dismissOnSelect:!0,arrow:!0}).then(a=>a.present())}debug(){let e=Date.now();e-this.debugLastClick<2e3&&++this.debugClickCount>=10&&(this.debugClickCount=0,import(`./chunk-Cu5qd9J7.js`).then(l=>this.injector.get(l.DebugService).openPopup())),this.debugLastClick=e}static{this.ɵfac=function(l){return new(l||n)(Vr(Re$1),Vr(Bt),Vr(me),Vr(qe$1),Vr(X),Vr(et$1),Vr(R5),Vr(Ue$2),Vr(ks),Vr(Vi),Vr(V0),Vr(Z$1))}}static{this.ɵcmp=ZI({type:n,selectors:[[`app-menu`]],decls:94,vars:25,consts:[[1,`menu-header`],[1,`menu-title`],[`name`,`logo`],[1,`menu-close`],[`fill`,`clear`,`color`,`dark`,3,`click`],[`name`,`cross`,`slot`,`icon-only`,2,`color`,`var(--ion-color-primary-contrast)`],[`data-nosnippet`,``,1,`menu-content`],[1,`menu-item`,3,`click`],[`name`,`search-map`,1,`left-icon`],[1,`item-title-container`],[1,`item-title`],[`name`,`planner`,1,`left-icon`],[`name`,`play`,1,`left-icon`],[1,`menu-item`],[1,`menu-separator`],[1,`menu-item`,`user-selection`,2,`color`,`var(--ion-color-my-selection)`,3,`click`],[1,`name-and-count`],[`name`,`star-filled`,1,`left-icon`],[`href`,`/trails/my-selection`,`target`,`_blank`,1,`inherit`,`name`,3,`click`],[1,`count`],[`id`,`section-collections`,1,`menu-section`],[1,`menu-section-header`,`no-separator-before`,3,`click`],[`name`,`collection`,1,`left-icon`],[1,`section-title`],[`size`,`small`,`shape`,`round`,`fill`,`clear`,`color`,`dark`,1,`new-collection`,3,`click`],[`slot`,`icon-only`,`name`,`add`],[`size`,`small`,`shape`,`round`,`fill`,`clear`,`color`,`secondary`],[`slot`,`icon-only`,3,`name`],[`id`,`section-shared-with-me`,1,`menu-section`],[1,`menu-section-header`,3,`click`],[`name`,`share`,1,`left-icon`],[`id`,`section-shared-by-me`,1,`menu-section`],[`name`,`share-outline`,1,`left-icon`],[1,`info`],[`id`,`section-publications`,1,`menu-section`],[`name`,`stats`,1,`left-icon`],[`name`,`mail`,1,`left-icon`],[`name`,`heart-outline`,1,`donation-color`,`left-icon`],[`name`,`help-circle`,1,`left-icon`],[1,`menu-footer`],[1,`menu-bottom`],[1,`version`,3,`click`],[`href`,`/privacy-policy`,3,`click`],[`name`,`live-group`,1,`left-icon`],[`name`,`live-group-on`,1,`left-icon`],[1,`item-title`,`with-actions`],[`name`,`chevron-right`],[1,`item-sub-title`],[1,`menu-item`,`item-collection`],[1,`menu-item`,`all-collections`,3,`click`],[`href`,`/trails/all-collections`,`target`,`_blank`,1,`inherit`,`name`,3,`click`],[1,`menu-item`,`item-collection`,3,`click`],[`target`,`_blank`,1,`inherit`,`name`,3,`click`,`href`],[`fill`,`clear`,`size`,`small`,3,`click`],[`slot`,`icon-only`,`name`,`item-menu`],[1,`shared-collection-icon`],[`name`,`share`],[1,`menu-item`,`no-item`],[`name`,`info`],[`name`,`web`,1,`left-icon`],[`href`,`/trails/my-publications`,`target`,`_blank`,1,`inherit`,`name`,`published`,3,`click`],[`target`,`_blank`,1,`inherit`,`name`,`pub-draft`,3,`click`,`href`],[`target`,`_blank`,1,`inherit`,`name`,`pub-submit`,3,`click`,`href`],[`target`,`_blank`,1,`inherit`,`name`,`pub-reject`,3,`click`,`href`],[`id`,`section-moderation`,1,`menu-section`],[1,`name`],[1,`item-title`,`trails-moderation`],[1,`item-title`,`comments-moderation`],[1,`item-title`,`removals-moderation`],[1,`item-title`,`avatars-moderation`],[`name`,`tool`,1,`left-icon`],[1,`icon-badge`],[1,`left-icon`,3,`name`]],template:function(l,t){l&1&&(Ri(0,`div`,0)(1,`div`,1),ph(2,`ion-icon`,2),Ri(3,`span`),HT(4,`Trailence`),sl()(),Ri(5,`div`,3)(6,`ion-button`,4),Dh(`click`,function(){return t.close()}),ph(7,`ion-icon`,5),sl()()(),Ri(8,`div`,6)(9,`div`,7),Dh(`click`,function(){return t.goTo(`/trail
1s/search`),t.close()}),ph(10,`ion-icon`,8),Ri(11,`div`,9)(12,`div`,10),HT(13),sl()()(),Ri(14,`div`,7),Dh(`click`,function(){return t.goTo(`/trail-planner`),t.close()}),ph(15,`ion-icon`,11),Ri(16,`div`,9)(17,`div`,10),HT(18),sl()()(),Ri(19,`div`,7),Dh(`click`,function(){return t.goToRecordTrace(),t.close()}),ph(20,`ion-icon`,12),Ri(21,`div`,9)(22,`div`,10),HT(23),sl()()(),UD(24,Ne,5,1,`div`,13)(25,Ge,9,2,`div`,13),ph(26,`div`,14),Ri(27,`div`,15),Dh(`click`,function(){return t.goTo(`/trails/my-selection`),t.close()}),Ri(28,`div`,9)(29,`div`,10)(30,`div`,16),ph(31,`ion-icon`,17),Ri(32,`a`,18),Dh(`click`,function(v){return v.button===1||v.ctrlKey?v.stopPropagation():v.preventDefault()}),HT(33),sl(),Ri(34,`div`,19),HT(35),sl()()()()(),Ri(36,`div`,20)(37,`div`,21),Dh(`click`,function(){return t.collectionsOpen=!t.collectionsOpen}),ph(38,`ion-icon`,22),Ri(39,`div`,23),HT(40),sl(),Ri(41,`ion-button`,24),Dh(`click`,function(v){return v.stopPropagation(),t.collectionService.collectionPopup(),t.close()}),ph(42,`ion-icon`,25),sl(),Ri(43,`ion-button`,26),ph(44,`ion-icon`,27),sl()(),UD(45,Be,10,2),sl(),Ri(46,`div`,28)(47,`div`,29),Dh(`click`,function(){return t.sharedWithMeOpen=!t.sharedWithMeOpen}),ph(48,`ion-icon`,30),Ri(49,`div`,23),HT(50),sl(),Ri(51,`ion-button`,26),ph(52,`ion-icon`,27),sl()(),UD(53,Ye,2,1),sl(),Ri(54,`div`,31)(55,`div`,29),Dh(`click`,function(){return t.sharedByMeOpen=!t.sharedByMeOpen}),ph(56,`ion-icon`,32),Ri(57,`div`,23),HT(58),sl(),Ri(59,`ion-button`,26),ph(60,`ion-icon`,27),sl()(),UD(61,$e,2,1),sl(),UD(62,et,4,1,`div`,33),UD(63,ct,8,3,`div`,34),ph(64,`div`,14),Ri(65,`div`,7),Dh(`click`,function(){return t.goTo(`/stats`),t.close()}),ph(66,`ion-icon`,35),Ri(67,`div`,9)(68,`div`,10),HT(69),sl()()(),UD(70,vt,12,5),ph(71,`div`,14),Ri(72,`div`,7),Dh(`click`,function(){return t.goToPublicPage(`/contact`),t.close()}),ph(73,`ion-icon`,36),Ri(74,`div`,9)(75,`div`,10),HT(76),sl()()(),Ri(77,`div`,7),Dh(`click`,function(){return t.goToPublicPage(`/donation`),t.close()}),ph(78,`ion-icon`,37),Ri(79,`div`,9)(80,`div`,10),HT(81),sl()()(),Ri(82,`div`,7),Dh(`click`,function(){return t.openHelp(),t.close()}),ph(83,`ion-icon`,38),Ri(84,`div`,9)(85,`div`,10),HT(86),sl()()()(),Ri(87,`div`,39),UD(88,gt,6,2,`div`,13),Ri(89,`div`,40)(90,`div`,41),Dh(`click`,function(){return t.debug()}),HT(91),sl(),Ri(92,`a`,42),Dh(`click`,function(v){return v.preventDefault(),t.goToPublicPage(`/privacy-policy`),t.close()}),HT(93),sl()()()),l&2&&(EE(13),Hh(t.i18n.texts.menu.search_trail),EE(5),Hh(t.i18n.texts.menu.planner),EE(5),Hh(t.i18n.texts.menu[t.recording?`current_trace`:`start_trace`]),EE(),WD(t.liveGroups.length===0&&!t.isAnonymous?24:t.liveGroups.length>0?25:-1),EE(9),ul(` `,t.i18n.texts.my_selection,` `),EE(2),Hh(t.mySelectionCount),EE(5),Hh(t.i18n.texts.menu.collections),EE(4),fh(`name`,t.collectionsOpen?`chevron-down`:`chevron-right`),EE(),WD(t.collectionsOpen?45:-1),EE(5),Hh(t.i18n.texts.menu.shared_with_me),EE(2),fh(`name`,t.sharedWithMeOpen?`chevron-down`:`chevron-right`),EE(),WD(t.sharedWithMeOpen?53:-1),EE(5),Hh(t.i18n.texts.menu.shared_by_me),EE(2),fh(`name`,t.sharedByMeOpen?`chevron-down`:`chevron-right`),EE(),WD(t.sharedByMeOpen?61:-1),EE(),WD(t.isAnonymous?62:-1),EE(),WD(t.pubDraft&&t.pubDraft.nbTrails||t.pubSubmit&&t.pubSubmit.nbTrails||t.pubReject&&t.pubReject.nbTrails||t.myPublicTrails.length>0?63:-1),EE(6),Hh(t.i18n.texts.pages.stats.title),EE(),WD(t.isAdmin||t.isModerator?70:-1),EE(6),Hh(t.i18n.texts.pages.contact.title),EE(5),Hh(t.i18n.texts.pages.donation.title),EE(5),Hh(t.i18n.texts.menu.help),EE(2),WD(t.update?88:-1),EE(3),ul(`Trailence `,t.versionName),EE(2),ul(` `,t.i18n.texts.pages.privacy_policy.title,` `))},dependencies:[fE,CE,C4,g$1],styles:[`[_nghost-%COMP%]{max-height:100%;height:100%;overflow:hidden;display:flex;flex-direction:column;align-items:stretch}.menu-header[_ngcontent-%COMP%]{height:var(--%NS%header-height);flex:none;display:flex;flex-direction:row;align-items:center;background-color:var(--%NS%ion-color-primary);color:var(--%NS%ion-color-primary-contrast)}.menu-header[_ngcontent-%COMP%] .menu-title[_ngcontent-%COMP%]{font-size:24px;padding:0 8px 0 5px;display:flex;flex-direction:row;align-items:center;flex:1 1 100%}.menu-header[_ngcontent-%COMP%] .menu-title[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{margin-right:8px}.menu-footer[_ngcontent-%COMP%]{flex:none;margin-top:5px;border-top:1px solid rgba(var(--%NS%ion-color-medium-rgb),.5)}.menu-footer[_ngcontent-%COMP%] .menu-bottom[_ngcontent-%COMP%]{display:flex;flex-direction:row;font-size:12px;align-items:center;justify-content:center}.menu-footer[_ngcontent-%COMP%] .menu-bottom[_ngcontent-%COMP%] .version[_ngcontent-%COMP%]{color:var(--%NS%ion-color-tertiary)}.menu-footer[_ngcontent-%COMP%] .menu-bottom[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .menu-footer[_ngcontent-%COMP%] .menu-bottom[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active{color:var(--%NS%ion-color-secondary);margin-left:10px}.menu-content[_ngcontent-%COMP%]{flex:1 1 100%;overflow-x:hidden;overflow-y:auto}.menu-section[_ngcontent-%COMP%] .menu-section-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:0 1px 0 8px;color:rgba(var(--%NS%ion-color-dark-rgb),.75)}.menu-section[_ngcontent-%COMP%] .menu-section-header[_ngcontent-%COMP%]:not(.no-separator-before){margin-top:3px;border-top:1px solid rgba(var(--%NS%ion-color-medium-rgb),.25)}.menu-section[_ngcontent-%COMP%] .menu-section-header[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{flex:1 1 100%;padding:0 8px 0 0}.menu-section[_ngcontent-%COMP%] .menu-section-header[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:24px;height:24px}.menu-section[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{padding-left:37px;padding-top:1px;padding-bottom:1px;min-height:34px}.menu-section[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] .item-title-container[_ngcontent-%COMP%] .item-title[_ngcontent-%COMP%]{font-size:14px}.menu-item[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;align-items:center;padding:5px 1px 5px 8px;cursor:pointer;min-height:36px;min-width:100%;max-width:100%;overflow:hidden}.menu-item[_ngcontent-%COMP%]:hover{background-color:var(--%NS%ion-color-light)}.menu-item.no-item[_ngcontent-%COMP%]{font-style:italic;font-size:12px}.menu-item[_ngcontent-%COMP%] .icon-badge[_ngcontent-%COMP%]{position:relative}.menu-item[_ngcontent-%COMP%] .icon-badge[_ngcontent-%COMP%] ion-badge[_ngcontent-%COMP%]{position:absolute;
1left:16px;font-size:13px;--%NS%background: rgba(var(--%NS%ion-color-success-rgb), .85);--%NS%color: var(--%NS%ion-color-success-contrast);--%NS%padding-start: 1px;--%NS%padding-end: 1px;--%NS%padding-top: 1px;--%NS%padding-bottom: 1px}.menu-item[_ngcontent-%COMP%] .item-title-container[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;max-width:100%}.menu-item[_ngcontent-%COMP%] .item-title-container[_ngcontent-%COMP%] .item-title[_ngcontent-%COMP%]{font-size:16px;text-overflow:ellipsis;overflow:hidden;text-wrap:nowrap}.menu-item[_ngcontent-%COMP%] .item-title-container[_ngcontent-%COMP%] .item-title.with-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;max-width:100%;overflow:hidden}.menu-item[_ngcontent-%COMP%] .item-title-container[_ngcontent-%COMP%] .item-title.with-actions[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{flex:1 1 100%;text-overflow:ellipsis;overflow:hidden}.menu-item[_ngcontent-%COMP%] .item-title-container[_ngcontent-%COMP%] .item-title.with-actions[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{flex:none;color:var(--%NS%ion-text-color);font-size:8px;margin:-3px 0 0;padding-top:3px}.menu-item[_ngcontent-%COMP%] .item-title-container[_ngcontent-%COMP%] .item-title.with-actions[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:16px;height:16px;margin:0}.menu-item[_ngcontent-%COMP%] .item-title-container[_ngcontent-%COMP%] .item-sub-title[_ngcontent-%COMP%]{font-size:12px;font-style:italic;color:rgba(var(--%NS%ion-text-color-rgb),.7);text-overflow:ellipsis;overflow:hidden;text-wrap:nowrap;padding:2px 0}.menu-item[_ngcontent-%COMP%] div.shared-collection-icon[_ngcontent-%COMP%]{position:absolute;left:18px;top:9px;opacity:.4}ion-icon.left-icon[_ngcontent-%COMP%]{flex:none;width:20px;height:20px;margin-right:10px;margin-bottom:2px}
1.menu-separator[_ngcontent-%COMP%]{margin:3px;border-bottom:1px solid rgba(var(--%NS%ion-color-medium-rgb),.25);height:0}.name-and-count[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.name-and-count[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow:hidden}.name-and-count[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{margin-left:8px;font-size:11px;border-radius:10px;padding:2px 5px 2px 4px;background-color:rgba(var(--%NS%ion-color-dark-rgb),.1);color:rgba(var(--%NS%ion-text-color-rgb),.8);border:1px solid rgba(var(--%NS%ion-color-dark-rgb),.2)}.name-and-count[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:20px;height:20px;margin-top:-3px}.info[_ngcontent-%COMP%]{background-color:#a0a0ff;color:#000;border-radius:5px;padding:2px;margin:2px;display:flex;flex-direction:row;align-items:flex-start}.info[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{flex:none}.info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1 1 100%;margin-left:5px;font-size:11px;font-style:italic}div.menu-item.all-collections[_ngcontent-%COMP%]{color:var(--%NS%ion-color-tertiary)}div.menu-item.new-collection[_ngcontent-%COMP%]{color:var(--%NS%ion-color-secondary)}`],changeDetection:1})}}return n})();var J=class{constructor(d,e=void 0){this.collection=d,this.nbTrails=e}};var Z=class{constructor(d,e=void 0){this.share=d,this.nbTrails=e}};export{zt as MenuComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.