@geotrekce/geotrek-rando-widget 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/geotrek-rando-widget.cjs.js +1 -1
- package/dist/cjs/geotrek-rando-widget.cjs.js.br +0 -0
- package/dist/cjs/geotrek-rando-widget.cjs.js.gz +0 -0
- package/dist/cjs/grw-app.cjs.entry.js +6 -2
- package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-filter_8.cjs.entry.js +21 -44
- package/dist/cjs/grw-filter_8.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-filter_8.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-filter_8.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-trek-card.cjs.entry.js +1 -1
- package/dist/cjs/grw-trek-card.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-trek-card.cjs.entry.js.gz +0 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js.br +0 -0
- package/dist/cjs/loader.cjs.js.gz +0 -0
- package/dist/cjs/{utils-db06d6fd.js → utils-51ed599a.js} +2 -2
- package/dist/cjs/utils-51ed599a.js.br +0 -0
- package/dist/cjs/utils-51ed599a.js.gz +0 -0
- package/dist/cjs/utils-51ed599a.js.map +1 -0
- package/dist/collection/components/grw-app/grw-app.js +24 -2
- package/dist/collection/components/grw-app/grw-app.js.br +0 -0
- package/dist/collection/components/grw-app/grw-app.js.gz +0 -0
- package/dist/collection/components/grw-app/grw-app.js.map +1 -1
- package/dist/collection/components/grw-map/grw-map.css +3 -25
- package/dist/collection/components/grw-map/grw-map.css.br +0 -0
- package/dist/collection/components/grw-map/grw-map.css.gz +0 -0
- package/dist/collection/components/grw-map/grw-map.js +35 -41
- package/dist/collection/components/grw-map/grw-map.js.br +0 -0
- package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
- package/dist/collection/components/grw-map/grw-map.js.map +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +2 -2
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.br +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.gz +0 -0
- package/dist/collection/stories/App.js +2 -0
- package/dist/collection/stories/App.js.br +0 -0
- package/dist/collection/stories/App.js.gz +0 -0
- package/dist/collection/stories/App.stories.js +1 -0
- package/dist/collection/stories/App.stories.js.br +0 -0
- package/dist/collection/stories/App.stories.js.gz +0 -0
- package/dist/collection/stories/TrekMap.js +2 -0
- package/dist/collection/stories/TrekMap.js.br +0 -0
- package/dist/collection/stories/TrekMap.js.gz +0 -0
- package/dist/collection/stories/TrekMap.stories.js +1 -0
- package/dist/collection/stories/TrekMap.stories.js.br +0 -0
- package/dist/collection/stories/TrekMap.stories.js.gz +0 -0
- package/dist/collection/utils/utils.js +1 -1
- package/dist/collection/utils/utils.js.br +0 -0
- package/dist/collection/utils/utils.js.gz +0 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/esm/geotrek-rando-widget.js +1 -1
- package/dist/esm/geotrek-rando-widget.js.br +0 -0
- package/dist/esm/geotrek-rando-widget.js.gz +0 -0
- package/dist/esm/grw-app.entry.js +6 -2
- package/dist/esm/grw-app.entry.js.br +0 -0
- package/dist/esm/grw-app.entry.js.gz +0 -0
- package/dist/esm/grw-app.entry.js.map +1 -1
- package/dist/esm/grw-filter_8.entry.js +21 -44
- package/dist/esm/grw-filter_8.entry.js.br +0 -0
- package/dist/esm/grw-filter_8.entry.js.gz +0 -0
- package/dist/esm/grw-filter_8.entry.js.map +1 -1
- package/dist/esm/grw-trek-card.entry.js +1 -1
- package/dist/esm/grw-trek-card.entry.js.br +0 -0
- package/dist/esm/grw-trek-card.entry.js.gz +0 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loader.js.br +0 -0
- package/dist/esm/loader.js.gz +0 -0
- package/dist/esm/{utils-3e167809.js → utils-85317c68.js} +2 -2
- package/dist/esm/utils-85317c68.js.br +0 -0
- package/dist/esm/utils-85317c68.js.gz +0 -0
- package/dist/esm/utils-85317c68.js.map +1 -0
- package/dist/esm-es5/geotrek-rando-widget.js +1 -1
- package/dist/esm-es5/geotrek-rando-widget.js.br +0 -0
- package/dist/esm-es5/geotrek-rando-widget.js.gz +0 -0
- package/dist/esm-es5/geotrek-rando-widget.js.map +1 -1
- package/dist/esm-es5/grw-app.entry.js +1 -1
- package/dist/esm-es5/grw-app.entry.js.br +0 -0
- package/dist/esm-es5/grw-app.entry.js.gz +0 -0
- package/dist/esm-es5/grw-app.entry.js.map +1 -1
- package/dist/esm-es5/grw-filter_8.entry.js +3 -3
- package/dist/esm-es5/grw-filter_8.entry.js.br +0 -0
- package/dist/esm-es5/grw-filter_8.entry.js.gz +0 -0
- package/dist/esm-es5/grw-filter_8.entry.js.map +1 -1
- package/dist/esm-es5/grw-trek-card.entry.js +1 -1
- package/dist/esm-es5/grw-trek-card.entry.js.br +0 -0
- package/dist/esm-es5/grw-trek-card.entry.js.gz +0 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.br +0 -0
- package/dist/esm-es5/loader.js.gz +0 -0
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/{utils-3e167809.js → utils-85317c68.js} +2 -2
- package/dist/esm-es5/utils-85317c68.js.br +0 -0
- package/dist/esm-es5/utils-85317c68.js.gz +0 -0
- package/dist/esm-es5/utils-85317c68.js.map +1 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.map +1 -1
- package/dist/geotrek-rando-widget/{p-9d132a89.js → p-00f05696.js} +2 -2
- package/dist/geotrek-rando-widget/p-00f05696.js.br +0 -0
- package/dist/geotrek-rando-widget/p-00f05696.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-00f05696.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-f36b2116.entry.js → p-02514aa7.entry.js} +4 -4
- package/dist/geotrek-rando-widget/p-02514aa7.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-02514aa7.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-02514aa7.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-4144f3ba.system.entry.js → p-0ec7146e.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-0ec7146e.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-0ec7146e.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-148f5f1d.system.js +1 -1
- package/dist/geotrek-rando-widget/p-148f5f1d.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-148f5f1d.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-148f5f1d.system.js.map +1 -1
- package/dist/geotrek-rando-widget/{p-3653420b.system.entry.js → p-4aaf071e.system.entry.js} +4 -4
- package/dist/geotrek-rando-widget/p-4aaf071e.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-4aaf071e.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-4aaf071e.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-c837a0f0.entry.js → p-d7444266.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-d7444266.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-d7444266.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-89249159.system.js → p-dae5ab8a.system.js} +2 -2
- package/dist/geotrek-rando-widget/p-dae5ab8a.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-dae5ab8a.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-dae5ab8a.system.js.map +1 -0
- package/dist/geotrek-rando-widget/p-e8ecd0eb.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-e8ecd0eb.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-e8ecd0eb.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-e8ecd0eb.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-fd346455.system.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-fd346455.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-fd346455.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-fd346455.system.entry.js.map +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +1 -0
- package/dist/types/components/grw-map/grw-map.d.ts +2 -1
- package/dist/types/components.d.ts +4 -0
- package/package.json +2 -1
- package/dist/cjs/utils-db06d6fd.js.br +0 -0
- package/dist/cjs/utils-db06d6fd.js.gz +0 -0
- package/dist/cjs/utils-db06d6fd.js.map +0 -1
- package/dist/esm/utils-3e167809.js.br +0 -0
- package/dist/esm/utils-3e167809.js.gz +0 -0
- package/dist/esm/utils-3e167809.js.map +0 -1
- package/dist/esm-es5/utils-3e167809.js.br +0 -0
- package/dist/esm-es5/utils-3e167809.js.gz +0 -0
- package/dist/esm-es5/utils-3e167809.js.map +0 -1
- package/dist/geotrek-rando-widget/p-3653420b.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-3653420b.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-3653420b.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-4144f3ba.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-4144f3ba.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-5b497eb5.system.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-5b497eb5.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-5b497eb5.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-5b497eb5.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-89249159.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-89249159.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-89249159.system.js.map +0 -1
- package/dist/geotrek-rando-widget/p-9d132a89.js.br +0 -0
- package/dist/geotrek-rando-widget/p-9d132a89.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-9d132a89.js.map +0 -1
- package/dist/geotrek-rando-widget/p-c5d67727.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-c5d67727.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-c5d67727.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-c5d67727.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-c837a0f0.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-c837a0f0.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-f36b2116.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-f36b2116.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-f36b2116.entry.js.map +0 -1
- /package/dist/geotrek-rando-widget/{p-4144f3ba.system.entry.js.map → p-0ec7146e.system.entry.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-c837a0f0.entry.js.map → p-d7444266.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as i,h as t,H as r}from"./p-b4e1f9ae.js";import{s as a,o as n,r as o}from"./p-764c52b8.js";import{f as s,a as c,b as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as i,h as t,H as r}from"./p-b4e1f9ae.js";import{s as a,o as n,r as o}from"./p-764c52b8.js";import{f as s,a as c,b as l}from"./p-00f05696.js";const d='.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}.trek-card-container,.trek-card-large-view-container{cursor:pointer;font-family:"Roboto";border-radius:12px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);background-color:var(--color-surface-container-low)}.trek-card-container .image,.trek-card-large-view-container .image{-o-object-fit:cover;object-fit:cover;border-top-left-radius:12px;border-top-right-radius:12px}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:8px 16px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500;margin-bottom:4px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .themes-container .theme,.trek-card-large-view-container .sub-container .themes-container .theme{background-color:var(--color-secondary-container);color:var(--color-on-secondary-container);border-radius:8px;padding:8px 16px;margin:0px 8px 8px 0px;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:1px solid var(--color-outline);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:var(--color-on-surface);font-size:14px;line-height:20px;font-weight:500}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.trek-card-large-view-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:50%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2),.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label span,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label span{font-family:"Material Symbols Outlined";font-size:24px;width:24px;height:auto;margin-right:8px}.trek-card-container .sub-container .icons-labels-container .row .practice img,.trek-card-large-view-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary-app)}.trek-card-container{width:350px}.trek-card-container .image{width:100%;max-height:200px}.trek-card-large-view-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.trek-card-large-view-container .image{width:250px}';const h=class{constructor(t){e(this,t);this.trekCardPress=i(this,"trekCardPress",7);this.currentTrek=undefined;this.difficulty=undefined;this.route=undefined;this.practice=undefined;this.themes=undefined;this.departureCity=undefined;this.trek=undefined;this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorSurfaceContainerLow="#f7f2fa";this.isLargeView=false;this.resetStoreOnDisconnected=true}connectedCallback(){this.currentTrek=this.trek?this.trek:a.currentTrek;if(this.currentTrek){this.difficulty=a.difficulties.find((e=>e.id===this.currentTrek.difficulty));this.route=a.routes.find((e=>e.id===this.currentTrek.route));this.practice=a.practices.find((e=>e.id===this.currentTrek.practice));this.themes=a.themes.filter((e=>this.currentTrek.themes.includes(e.id)));this.departureCity=a.cities.find((e=>e.id===this.currentTrek.departure_city))}n("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:a.currentTrek;if(this.currentTrek){this.difficulty=a.difficulties.find((e=>e.id===this.currentTrek.difficulty));this.route=a.routes.find((e=>e.id===this.currentTrek.route));this.practice=a.practices.find((e=>e.id===this.currentTrek.practice));this.themes=a.themes.filter((e=>this.currentTrek.themes.includes(e.id)));this.departureCity=a.cities.find((e=>e.id===this.currentTrek.departure_city))}}))}disconnectedCallback(){if(this.resetStoreOnDisconnected){o()}}render(){var e,i,a,n,o,d,h;return t(r,{style:{width:this.isLargeView?"100%":"auto","--color-primary-app":this.colorPrimaryApp,"--color-on-surface":this.colorOnSurface,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-surface-container-low":this.colorSurfaceContainerLow}},this.currentTrek&&t("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container",onClick:()=>this.trekCardPress.emit(this.currentTrek.id)},this.currentTrek.attachments.filter((e=>e.type==="image")).length>0&&t("img",{class:"image",src:`${this.currentTrek.attachments.filter((e=>e.type==="image"))[0].thumbnail}`,loading:"lazy"}),t("div",{class:"sub-container"},this.departureCity&&t("div",{class:"departure"},this.departureCity.name),t("div",{class:"name"},(e=this.currentTrek)===null||e===void 0?void 0:e.name),t("div",{class:"themes-container"},this.themes.map((e=>t("div",{class:"theme"},e.label)))),t("div",{class:"icons-labels-container"},t("div",{class:"row"},t("div",{class:"icon-label difficulty"},((i=this.difficulty)===null||i===void 0?void 0:i.pictogram)&&t("img",{src:this.difficulty.pictogram}),(a=this.difficulty)===null||a===void 0?void 0:a.label),t("div",{class:"icon-label duration"},t("span",{class:"material-symbols-outlined"},"timelapse"),s(this.currentTrek.duration))),t("div",{class:"row"},t("div",{class:"icon-label length"},t("span",{class:"material-symbols-outlined"},"open_in_full"),c(this.currentTrek.length_2d)),t("div",{class:"icon-label ascent"},t("span",{class:"material-symbols-outlined"},"moving"),l(this.currentTrek.ascent))),t("div",{class:"row"},t("div",{class:"icon-label route"},((n=this.route)===null||n===void 0?void 0:n.pictogram)&&t("img",{src:this.route.pictogram}),(o=this.route)===null||o===void 0?void 0:o.route),t("div",{class:"icon-label practice"},((d=this.practice)===null||d===void 0?void 0:d.pictogram)&&t("img",{src:this.practice.pictogram}),(h=this.practice)===null||h===void 0?void 0:h.name))))))}};h.style=d;export{h as grw_trek_card};
|
|
2
|
+
//# sourceMappingURL=p-d7444266.entry.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,i;n<a;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return r.concat(i||Array.prototype.slice.call(e))};System.register(["./p-458ec23b.system.js"],(function(r){"use strict";var e;return{setters:[function(r){e=r.s}],execute:function(){r({a:n,b:a,f:t,h:i});function t(r){var e;if(r<24){e="".concat(Math.floor(r),"h");if(r%1>0){e+="".concat(Math.round(60*(r%1)),"min")}}else{e="".concat(r/24,"j")}return e}function n(r){return"".concat(Math.round(r/1e3),"km")}function a(r){return"".concat(r,"m")}function i(){var r=[{property:"practices",trekProperty:"practice",trekPropertyIsArray:false,type:"include"},{property:"difficulties",trekProperty:"difficulty",trekPropertyIsArray:false,type:"include"},{property:"durations",trekProperty:"duration",trekPropertyIsArray:false,type:"interval"},{property:"lengths",trekProperty:"length_2d",trekPropertyIsArray:false,type:"interval"},{property:"elevations",trekProperty:"ascent",trekPropertyIsArray:false,type:"interval"},{property:"themes",trekProperty:"themes",trekPropertyIsArray:true,type:"include"},{property:"routes",trekProperty:"route",trekPropertyIsArray:false,type:"include"},{property:"accessibilities",trekProperty:"accessibilities",trekPropertyIsArray:true,type:"include"},{property:"cities",trekProperty:"cities",trekPropertyIsArray:true,type:"include"},{property:"labels",trekProperty:"labels",trekPropertyIsArray:true,type:"include"}];var t=false;var n=[];var a=function(r){var a=e[r.property].filter((function(r){return r.selected})).map((function(r){return r.id}));if(a.length>0){if(n.length>0){if(r.type==="include"){if(r.trekPropertyIsArray){n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty].some((function(r){return a.includes(r)}))})),true)}else{n=__spreadArray([],n.filter((function(e){return a.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){n=__spreadArray([],n.filter((function(t){var n=function(n){var a=e[r.property].find((function(r){return r.id===n}));if(t[r.trekProperty]>=a.minValue&&t[r.trekProperty]<=a.maxValue){return{value:true}}};for(var i=0,o=a;i<o.length;i++){var u=o[i];var p=n(u);if(typeof p==="object")return p.value}return false})),true)}}else{if(!t){t=true}if(r.type==="include"){if(r.trekPropertyIsArray){n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty].some((function(r){return a.includes(r)}))})),true)}else{n=__spreadArray([],e.treks.filter((function(e){return a.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){var i;var o;var u=function(t){var n=e[r.property].find((function(r){return r.id===t}));if(isNaN(i)||n.minValue<i){i=n.minValue}if(isNaN(o)||n.maxValue>o){o=n.maxValue}};for(var p=0,s=a;p<s.length;p++){var y=s[p];u(y)}n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty]>=i&&e[r.trekProperty]<=o})),true)}}}};for(var i=0,o=r;i<o.length;i++){var u=o[i];a(u)}var p=t?n:e.treks;return Boolean(e.searchValue)?p.filter((function(r){return r.name.
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,i;n<a;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return r.concat(i||Array.prototype.slice.call(e))};System.register(["./p-458ec23b.system.js"],(function(r){"use strict";var e;return{setters:[function(r){e=r.s}],execute:function(){r({a:n,b:a,f:t,h:i});function t(r){var e;if(r<24){e="".concat(Math.floor(r),"h");if(r%1>0){e+="".concat(Math.round(60*(r%1)),"min")}}else{e="".concat(r/24,"j")}return e}function n(r){return"".concat(Math.round(r/1e3),"km")}function a(r){return"".concat(r,"m")}function i(){var r=[{property:"practices",trekProperty:"practice",trekPropertyIsArray:false,type:"include"},{property:"difficulties",trekProperty:"difficulty",trekPropertyIsArray:false,type:"include"},{property:"durations",trekProperty:"duration",trekPropertyIsArray:false,type:"interval"},{property:"lengths",trekProperty:"length_2d",trekPropertyIsArray:false,type:"interval"},{property:"elevations",trekProperty:"ascent",trekPropertyIsArray:false,type:"interval"},{property:"themes",trekProperty:"themes",trekPropertyIsArray:true,type:"include"},{property:"routes",trekProperty:"route",trekPropertyIsArray:false,type:"include"},{property:"accessibilities",trekProperty:"accessibilities",trekPropertyIsArray:true,type:"include"},{property:"cities",trekProperty:"cities",trekPropertyIsArray:true,type:"include"},{property:"labels",trekProperty:"labels",trekPropertyIsArray:true,type:"include"}];var t=false;var n=[];var a=function(r){var a=e[r.property].filter((function(r){return r.selected})).map((function(r){return r.id}));if(a.length>0){if(n.length>0){if(r.type==="include"){if(r.trekPropertyIsArray){n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty].some((function(r){return a.includes(r)}))})),true)}else{n=__spreadArray([],n.filter((function(e){return a.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){n=__spreadArray([],n.filter((function(t){var n=function(n){var a=e[r.property].find((function(r){return r.id===n}));if(t[r.trekProperty]>=a.minValue&&t[r.trekProperty]<=a.maxValue){return{value:true}}};for(var i=0,o=a;i<o.length;i++){var u=o[i];var p=n(u);if(typeof p==="object")return p.value}return false})),true)}}else{if(!t){t=true}if(r.type==="include"){if(r.trekPropertyIsArray){n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty].some((function(r){return a.includes(r)}))})),true)}else{n=__spreadArray([],e.treks.filter((function(e){return a.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){var i;var o;var u=function(t){var n=e[r.property].find((function(r){return r.id===t}));if(isNaN(i)||n.minValue<i){i=n.minValue}if(isNaN(o)||n.maxValue>o){o=n.maxValue}};for(var p=0,s=a;p<s.length;p++){var y=s[p];u(y)}n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty]>=i&&e[r.trekProperty]<=o})),true)}}}};for(var i=0,o=r;i<o.length;i++){var u=o[i];a(u)}var p=t?n:e.treks;return Boolean(e.searchValue)?p.filter((function(r){return r.name.toLowerCase().includes(e.searchValue.toLowerCase())})):p}}}}));
|
|
2
|
+
//# sourceMappingURL=p-dae5ab8a.system.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["formatDuration","duration","formattedDuration","concat","Math","floor","round","formatLength","length","formatAscent","ascent","handleFiltersAndSearch","filters","property","trekProperty","trekPropertyIsArray","type","isUsingFilter","filtersTreks","filter","currentFiltersId","state","currentFilter","selected","map","id","__spreadArray","treks","trek","some","includes","currentFilterId","find","minValue","maxValue","_i","currentFiltersId_2","minValue_1","maxValue_1","isNaN","_a","currentFiltersId_1","filters_1","searchTreks","Boolean","searchValue","currentTrek","name","toLowerCase"],"sources":["src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { Filters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport function handleFiltersAndSearch(): Treks {\n const filters: Filters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include' },\n ];\n\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of filters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLowerCase().includes(state.searchValue.toLowerCase())) : searchTreks;\n}\n"],"mappings":"kZAGgBA,EAAeC,GAC7B,IAAIC,EACJ,GAAID,EAAW,GAAI,CACjBC,EAAoB,GAAAC,OAAGC,KAAKC,MAAMJ,GAAS,KAC3C,GAAIA,EAAW,EAAI,EAAG,CACpBC,GAAqB,GAAAC,OAAGC,KAAKE,MAAM,IAAML,EAAW,IAAG,M,MAEpD,CACLC,EAAoB,GAAAC,OAAGF,EAAW,GAAE,I,CAEtC,OAAOC,CACT,C,SAEgBK,EAAaC,GAC3B,MAAO,GAAAL,OAAGC,KAAKE,MAAME,EAAS,KAAK,KACrC,C,SAEgBC,EAAaC,GAC3B,MAAO,GAAAP,OAAGO,EAAM,IAClB,C,SAEgBC,IACd,IAAMC,EAAmB,CACvB,CAAEC,SAAU,YAAaC,aAAc,WAAYC,oBAAqB,MAAOC,KAAM,WACrF,CAAEH,SAAU,eAAgBC,aAAc,aAAcC,oBAAqB,MAAOC,KAAM,WAC1F,CAAEH,SAAU,YAAaC,aAAc,WAAYC,oBAAqB,MAAOC,KAAM,YACrF,CAAEH,SAAU,UAAWC,aAAc,YAAaC,oBAAqB,MAAOC,KAAM,YACpF,CAAEH,SAAU,aAAcC,aAAc,SAAUC,oBAAqB,MAAOC,KAAM,YACpF,CAAEH,SAAU,SAAUC,aAAc,SAAUC,oBAAqB,KAAMC,KAAM,WAC/E,CAAEH,SAAU,SAAUC,aAAc,QAASC,oBAAqB,MAAOC,KAAM,WAC/E,CAAEH,SAAU,kBAAmBC,aAAc,kBAAmBC,oBAAqB,KAAMC,KAAM,WACjG,CA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,h as t,H as r,g as o}from"./p-b4e1f9ae.js";import{t as a}from"./p-a1530528.js";import{o as n,s,r as l}from"./p-764c52b8.js";const c='.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}grw-app{display:block;position:relative;width:var(--app-width);height:var(--app-height);font-family:"Roboto";color:var(--color-on-surface);overflow:hidden;line-height:initial;max-width:100vw;max-height:100vh}.app-container{position:relative;width:100%;height:100%;overflow:hidden}.header-container,.large-view-header-container{background-color:var(--color-background);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}.header-container .header-top,.large-view-header-container .header-top{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:64px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface);border:none;background-color:var(--color-background);border-radius:50%;height:48px;width:48px;padding:12px}.header-container .arrow-back-icon:hover,.large-view-header-container .arrow-back-icon:hover{-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1)}.header-container .header-left-container,.large-view-header-container .header-left-container{margin-left:8px}.header-container .header-right-container,.large-view-header-container .header-right-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-right:8px}.header-container .header-right-container .margin-right-icon,.large-view-header-container .header-right-container .margin-right-icon{margin-right:8px}.header-container .attribution-container a,.large-view-header-container .attribution-container a{font-size:24px;font-weight:400;line-height:40px;color:var(--color-on-surface);text-decoration:none}.options-container{height:calc(100% - 64px);position:absolute;width:100%;z-index:1100;top:64px}.handle-search-filters-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:0px 16px;height:64px}.handle-search-filters-container .handle-filters-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:var(--color-background);color:var(--color-on-surface);padding:12px 24px;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1000000015px;font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.handle-search-filters-container .handle-filters-button span{font-size:18px;font-family:"Material Symbols Outlined"}.filters-container{background-color:var(--color-background);position:relative;width:100%;height:100%;z-index:1100}.filters-options-container{overflow-y:scroll;padding-bottom:32px;max-height:calc(100% - 48px - 32px)}.back-filters-container{background-color:rgba(0, 0, 0, 0.5);width:100%;height:100%;position:absolute;z-index:1099}.divider{margin:16px;border-top:1px solid var(--color-outline)}.init-loader-container,.loader-container,.large-view-loader-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;background-color:var(--color-background)}.init-loader-container .loader,.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-container);border-bottom-color:var(--color-on-primary-container);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.content-container{position:relative;display:-ms-flexbox;display:flex;height:calc(100% - 64px - 64px);background-color:var(--color-background)}.content-treks{height:calc(100% - 64px - 64px)}.content-trek{height:calc(100% - 64px)}.app-treks-list-container,.app-trek-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;position:absolute;bottom:24px;z-index:4}.map-visibility-button-container .map-visibility-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;text-decoration:none;padding:16px;background-color:var(--color-primary-container);color:var(--color-on-primary-container);-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);border-radius:12px;height:56px;font-size:16px;width:unset}.map-visibility-button-container .map-visibility-button:hover{-webkit-box-shadow:var(--elevation-4);box-shadow:var(--elevation-4)}.map-visibility-button-container .map-visibility-button span{font-family:"Material Symbols Outlined";font-size:24px;margin-right:8px;color:var(--color-on-primary-container)}.init-loader-container,.loader-container{width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}grw-treks-list{max-height:calc(100vh - 64px - 64px)}grw-trek-detail{max-height:calc(100vh - 64px - 48px)}.app-map-container{width:100%;position:absolute}.large-view-loader-container{width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}.filters-options-buttons-container{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;height:48px}.filters-options-buttons-container .filter-option-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;font-weight:500;margin:8px 0px 0px 8px;padding:8px 16px;height:32px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:none;-webkit-tap-highlight-color:transparent;line-height:20px;color:var(--color-primary);background-color:transparent}';const h=class{constructor(t){e(this,t);this.resetFilter=i(this,"resetFilter",7);this.largeViewSize=1024;this.handlePopStateBind=this.handlePopState.bind(this);this.showTrek=false;this.showTreksMap=false;this.showTrekMap=false;this.showFilters=false;this.isLargeView=false;this.currentTrekId=undefined;this.appWidth="100%";this.appHeight="100vh";this.api=undefined;this.languages="fr";this.inBbox=undefined;this.cities=undefined;this.districts=undefined;this.structures=undefined;this.themes=undefined;this.portals=undefined;this.routes=undefined;this.practices=undefined;this.urlLayer=undefined;this.center=undefined;this.zoom=undefined;this.attribution=undefined;this.linkName="GEOTREK";this.linkTarget="https://geotrek.fr";this.weather=false;this.colorPrimaryApp="#6750a4";this.colorOnPrimary="#ffffff";this.colorSurface="#1c1b1f";this.colorOnSurface="#49454e";this.colorSurfaceVariant="#fef7ff";this.colorOnSurfaceVariant="#1c1b1f";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorBackground="#fef7ff";this.colorSurfaceContainerHigh="#ece6f0";this.colorSurfaceContainerLow="#f7f2fa";this.fabBackgroundColor="#eaddff";this.fabColor="#21005d";this.colorTrekLine="#6b0030";this.colorDepartureIcon="#006b3b";this.colorArrivalIcon="#85003b";this.colorSensitiveArea="#4974a5";this.colorPoiIcon="#974c6e";this.useGradient=false}onTrekCardPress(e){this.currentTrekId=e.detail;this.showTrek=!this.showTrek;this.showTrekMap=false;const i=new URL(window.location.toString());i.searchParams.set("trek",this.currentTrekId.toString());window.history.pushState({},"",i)}onWindowResize(){this.handleView()}onCenterOnMap(){if(!this.isLargeView){this.showTrekMap=true}}watchPropHandler(){window.dispatchEvent(new window.Event("resize"))}componentWillLoad(){const e=new URL(window.location.toString());const i=e.searchParams.get("trek");if(i){window.history.replaceState({isInitialHistoryWithTrek:true},"",e);this.currentTrekId=Number(i);this.showTrek=!this.showTrek}}componentDidLoad(){n("trekNetworkError",(()=>{if(s.trekNetworkError){const e=new URL(window.location.toString());e.searchParams.delete("trek");window.history.replaceState({},"",e);this.onTrekDetailsClose()}}));window.addEventListener("popstate",this.handlePopStateBind,false);this.handleView()}onTrekDetailsClose(){s.currentTrek=null;this.currentTrekId=null;this.showTrek=!this.showTrek}handleView(){this.isLargeView=this.appElement.getBoundingClientRect().width>=this.largeViewSize;this.showTreksMap=this.isLargeView;this.showTrekMap=this.isLargeView}handleFilters(){this.showFilters=!this.showFilters}handleBackButton(){if(window.history.state&&window.history.state.isInitialHistoryWithTrek){this.onTrekDetailsClose();const e=new URL(window.location.toString());e.searchParams.delete("trek");window.history.pushState({},"",e)}else{window.history.back()}}handlePopState(){const e=new URL(window.location.toString());const i=Number(e.searchParams.get("trek"));if(i&&this.currentTrekId!==i){this.currentTrekId=i;this.showTrek=true}else if(!i){this.onTrekDetailsClose()}}handleShowMap(){if(this.currentTrekId){this.showTrekMap=!this.showTrekMap}else{this.showTreksMap=!this.showTreksMap}}handleEraseFilters(){this.resetFilter.emit();s.currentTreks=s.treks}handleOkFilters(){this.handleFilters()}disconnectedCallback(){l();window.removeEventListener("popstate",this.handlePopStateBind)}render(){return t(r,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-primary":this.colorOnPrimary,"--color-surface":this.colorSurface,"--color-on-surface":this.colorOnSurface,"--color-surface-variant":this.colorSurfaceVariant,"--color-on-surface-variant":this.colorOnSurfaceVariant,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-background":this.colorBackground,"--color-surface-container-high":this.colorSurfaceContainerHigh,"--color-surface-container-low":this.colorSurfaceContainerLow,"--fab-background-color":this.fabBackgroundColor,"--fab-color":this.fabColor,"--app-width":this.appWidth,"--app-height":this.appHeight}},!s.currentTreks&&!s.currentTrek&&t("div",{class:"init-loader-container"},t("span",{class:"loader"})),!this.showTrek&&!s.treks&&t("grw-treks-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&!s.currentTrek&&t("grw-trek-provider",{api:this.api,languages:this.languages,"trek-id":this.currentTrekId}),(s.currentTreks||s.currentTrek)&&t("div",{class:"app-container"},t("div",{class:this.isLargeView?"large-view-header-container":"header-container"},t("div",{class:"header-top"},t("div",{class:"header-left-container"},this.showTrek?t("button",{onClick:()=>this.handleBackButton(),class:"arrow-back-icon"},t("span",{class:"material-symbols-outlined"},"arrow_back")):t("div",{class:"attribution-container"},t("a",{target:"_blank",href:this.linkTarget},this.linkName))),t("div",{class:"header-right-container"},s.languages.length>1&&t("grw-select-language",null))),!this.showTrek&&t("div",{class:"handle-search-filters-container"},t("div",{class:"handle-search-container"},t("grw-search",null)),t("div",{class:"handle-filters-container"},t("button",{onClick:()=>this.handleFilters(),class:"handle-filters-button"},t("span",{class:"material-symbols-outlined margin-right-icon"},"filter_list"),a[s.language].filter)))),t("div",{class:`content-container ${this.showTrek?"content-trek":"content-treks"}`},t("div",{class:this.isLargeView?"large-view-app-treks-list-container":"app-treks-list-container",style:{display:this.showTrek?"none":"flex",position:this.showTrek?"absolute":"relative"}},t("grw-treks-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow})),this.showTrek&&!s.currentTrek&&t("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},t("span",{class:"loader"})),s.currentTrek&&t("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},t("grw-trek-detail",{style:{visibility:!this.showTrekMap&&this.showTrek||this.isLargeView?"visible":"hidden",zIndex:!this.showTrekMap?"1":"0"},"reset-store-on-disconnected":"false","color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-background":this.colorBackground,weather:this.weather,"is-large-view":this.isLargeView})),t("grw-map",{"reset-store-on-disconnected":"false",class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showTreksMap&&!this.showTrek||this.showTrekMap&&this.showTrek||this.isLargeView?"visible":"hidden",zIndex:this.showTrekMap?"1":"0"},"url-layer":this.urlLayer,center:this.center,zoom:this.zoom,attribution:this.attribution,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-background":this.colorBackground,"color-trek-line":this.colorTrekLine,"color-departure-icon":this.colorDepartureIcon,"color-arrival-icon":this.colorArrivalIcon,"color-sensitive-area":this.colorSensitiveArea,"color-poi-icon":this.colorPoiIcon,"is-large-view":this.isLargeView,"use-gradient":this.useGradient})),(!this.showTrek||this.showTrek&&s.currentTrek)&&t("div",{class:"map-visibility-button-container"},t("button",{onClick:()=>this.handleShowMap(),class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},t("span",{class:"material-symbols-outlined"},this.showTrek?this.showTrekMap?"summarize":"map":this.showTreksMap?"list":"map"),this.showTrek?this.showTrekMap?a[s.language].showDetails:a[s.language].showRoute:this.showTreksMap?a[s.language].showList:a[s.language].showMap))),!this.showTrek&&this.showFilters&&t("div",{class:"options-container"},t("div",{class:"filters-container"},t("div",{class:"filters-options-buttons-container"},t("button",{class:"filter-option-button",onClick:()=>this.handleEraseFilters()},"Effacer"),t("button",{class:"filter-option-button",onClick:()=>this.handleOkFilters()},"Ok")),t("div",{class:"filters-options-container"},t("grw-filter",{filterName:a[s.language].practice,filterType:"practices",filterNameProperty:"name"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].difficulty,filterType:"difficulties",filterNameProperty:"label"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].duration,filterType:"durations",filterNameProperty:"name"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].length,filterType:"lengths",filterNameProperty:"name"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].elevation,filterType:"elevations",filterNameProperty:"name"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].themes,filterType:"themes",filterNameProperty:"label"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].routes,filterType:"routes",filterNameProperty:"route"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].accessibility,filterType:"accessibilities",filterNameProperty:"name"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].others,filterType:"labels",filterNameProperty:"name"}),t("div",{class:"divider"}),t("grw-filter",{filterName:a[s.language].cities,filterType:"cities",filterNameProperty:"name"}))),t("div",{onClick:()=>this.handleFilters(),class:"back-filters-container"})))}get appElement(){return o(this)}static get watchers(){return{isLargeView:["watchPropHandler"]}}};h.style=c;export{h as grw_app};
|
|
2
|
+
//# sourceMappingURL=p-e8ecd0eb.entry.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["grwAppCss","GrwApp","this","largeViewSize","handlePopStateBind","handlePopState","bind","onTrekCardPress","event","currentTrekId","detail","showTrek","showTrekMap","url","URL","window","location","toString","searchParams","set","history","pushState","onWindowResize","handleView","onCenterOnMap","isLargeView","watchPropHandler","dispatchEvent","Event","componentWillLoad","trekParam","get","replaceState","isInitialHistoryWithTrek","Number","componentDidLoad","onChange","state","trekNetworkError","urlRedirect","delete","onTrekDetailsClose","addEventListener","currentTrek","appElement","getBoundingClientRect","width","showTreksMap","handleFilters","showFilters","handleBackButton","back","handleShowMap","handleEraseFilters","resetFilter","emit","currentTreks","treks","handleOkFilters","disconnectedCallback","reset","removeEventListener","render","h","Host","style","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","appWidth","appHeight","class","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","onClick","target","href","linkTarget","linkName","length","translate","language","filter","display","position","visibility","zIndex","weather","urlLayer","center","zoom","attribution","colorTrekLine","colorDepartureIcon","colorArrivalIcon","colorSensitiveArea","colorPoiIcon","useGradient","showDetails","showRoute","showList","showMap","filterName","practice","filterType","filterNameProperty","difficulty","duration","elevation","accessibility","others"],"sources":["./src/components/grw-app/grw-app.scss?tag=grw-app","./src/components/grw-app/grw-app.tsx"],"sourcesContent":[".material-symbols-outlined {\n font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;\n}\n\ngrw-app {\n display: block;\n position: relative;\n width: var(--app-width);\n height: var(--app-height);\n font-family: 'Roboto';\n color: var(--color-on-surface);\n overflow: hidden;\n line-height: initial;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.app-container {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.header-container,\n.large-view-header-container {\n background-color: var(--color-background);\n box-shadow: var(--elevation-2);\n .header-top {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n height: 64px;\n }\n .arrow-back-icon {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface);\n border: none;\n background-color: var(--color-background);\n border-radius: 50%;\n height: 48px;\n width: 48px;\n padding: 12px;\n &:hover {\n box-shadow: var(--elevation-1);\n }\n }\n .header-left-container {\n margin-left: 8px;\n }\n .header-right-container {\n display: flex;\n align-items: center;\n margin-right: 8px;\n .margin-right-icon {\n margin-right: 8px;\n }\n }\n .attribution-container {\n a {\n font-size: 24px;\n font-weight: 400;\n line-height: 40px;\n color: var(--color-on-surface);\n text-decoration: none;\n }\n }\n}\n\n.options-container {\n height: calc(100% - 64px);\n position: absolute;\n width: 100%;\n z-index: 1100;\n top: 64px;\n}\n\n.handle-search-filters-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0px 16px;\n height: 64px;\n .handle-filters-button {\n user-select: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n background-color: var(--color-background);\n color: var(--color-on-surface);\n padding: 12px 24px;\n border-radius: 20px;\n box-sizing: border-box;\n position: relative;\n gap: 8px;\n white-space: nowrap;\n line-height: 20px;\n letter-spacing: 0.10000000149011612px;\n font-size: 14px;\n font-weight: 500;\n box-shadow: var(--elevation-1);\n transition: box-shadow 0.2s ease-in-out 0s;\n span {\n font-size: 18px;\n font-family: 'Material Symbols Outlined';\n }\n }\n}\n\n.filters-container {\n background-color: var(--color-background);\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1100;\n}\n\n.filters-options-container {\n overflow-y: scroll;\n padding-bottom: 32px;\n max-height: calc(100% - 48px - 32px);\n}\n\n.back-filters-container {\n background-color: rgba(0, 0, 0, 0.5);\n width: 100%;\n height: 100%;\n position: absolute;\n z-index: 1099;\n}\n\n.divider {\n margin: 16px;\n border-top: 1px solid var(--color-outline);\n}\n\n.init-loader-container,\n.loader-container,\n.large-view-loader-container {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n background-color: var(--color-background);\n .loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-container);\n border-bottom-color: var(--color-on-primary-container);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n}\n\n.content-container {\n position: relative;\n display: flex;\n height: calc(100% - 64px - 64px);\n background-color: var(--color-background);\n}\n\n.content-treks {\n height: calc(100% - 64px - 64px);\n}\n\n.content-trek {\n height: calc(100% - 64px);\n}\n\n.app-treks-list-container,\n.app-trek-detail-container,\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.app-map-container,\n.large-view-app-map-container {\n width: 100%;\n height: 100%;\n}\n\n.map-visibility-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: absolute;\n bottom: 24px;\n z-index: 4;\n .map-visibility-button {\n cursor: pointer;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n text-decoration: none;\n padding: 16px;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n box-shadow: var(--elevation-1);\n border-radius: 12px;\n height: 56px;\n font-size: 16px;\n width: unset;\n &:hover {\n box-shadow: var(--elevation-4);\n }\n span {\n font-family: 'Material Symbols Outlined';\n font-size: 24px;\n margin-right: 8px;\n color: var(--color-on-primary-container);\n }\n }\n}\n\n.init-loader-container,\n.loader-container {\n width: 100%;\n}\n\n.app-treks-list-container,\n.app-trek-detail-container {\n width: 100%;\n}\n\ngrw-treks-list {\n max-height: calc(100vh - 64px - 64px);\n}\n\ngrw-trek-detail {\n max-height: calc(100vh - 64px - 48px);\n}\n\n.app-map-container {\n width: 100%;\n position: absolute;\n}\n\n.large-view-loader-container {\n width: 50%;\n}\n\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container {\n width: 50%;\n}\n\n.large-view-app-map-container {\n position: relative;\n width: 50%;\n}\n\n.filters-options-buttons-container {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n height: 48px;\n .filter-option-button {\n cursor: pointer;\n user-select: none;\n font-size: 14px;\n font-weight: 500;\n margin: 8px 0px 0px 8px;\n padding: 8px 16px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: var(--elevation-0);\n border: none;\n -webkit-tap-highlight-color: transparent;\n line-height: 20px;\n color: var(--color-primary);\n background-color: transparent;\n }\n}\n","import { Component, Host, h, Listen, State, Prop, Element, Watch, Event, EventEmitter } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange, reset } from 'store/store';\n\n@Component({\n tag: 'grw-app',\n styleUrls: ['grw-app.scss'],\n shadow: false,\n})\nexport class GrwApp {\n @Element() appElement: HTMLElement;\n @Event() resetFilter: EventEmitter;\n @State() showTrek = false;\n @State() showTreksMap = false;\n @State() showTrekMap = false;\n @State() showFilters = false;\n @State() isLargeView = false;\n @State() currentTrekId: number;\n @Prop() appWidth: string = '100%';\n @Prop() appHeight: string = '100vh';\n @Prop() api: string;\n @Prop() languages = 'fr';\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() urlLayer: string;\n @Prop() center: string;\n @Prop() zoom: number;\n @Prop() attribution: string;\n @Prop() linkName = 'GEOTREK';\n @Prop() linkTarget = 'https://geotrek.fr';\n @Prop() weather = false;\n\n @Prop() colorPrimaryApp = '#6750a4';\n @Prop() colorOnPrimary = '#ffffff';\n @Prop() colorSurface = '#1c1b1f';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSurfaceVariant = '#fef7ff';\n @Prop() colorOnSurfaceVariant = '#1c1b1f';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorBackground = '#fef7ff';\n @Prop() colorSurfaceContainerHigh = '#ece6f0';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorDepartureIcon = '#006b3b';\n @Prop() colorArrivalIcon = '#85003b';\n @Prop() colorSensitiveArea = '#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n @Prop() useGradient = false;\n\n largeViewSize = 1024;\n handlePopStateBind: (event: any) => void = this.handlePopState.bind(this);\n\n @Listen('trekCardPress', { target: 'window' })\n onTrekCardPress(event: CustomEvent<number>) {\n this.currentTrekId = event.detail;\n this.showTrek = !this.showTrek;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap() {\n if (!this.isLargeView) {\n this.showTrekMap = true;\n }\n }\n\n @Watch('isLargeView')\n watchPropHandler() {\n window.dispatchEvent(new window.Event('resize'));\n }\n\n componentWillLoad() {\n const url = new URL(window.location.toString());\n const trekParam = url.searchParams.get('trek');\n if (trekParam) {\n window.history.replaceState({ isInitialHistoryWithTrek: true }, '', url);\n this.currentTrekId = Number(trekParam);\n this.showTrek = !this.showTrek;\n }\n }\n\n componentDidLoad() {\n onChange('trekNetworkError', () => {\n if (state.trekNetworkError) {\n const urlRedirect = new URL(window.location.toString());\n urlRedirect.searchParams.delete('trek');\n window.history.replaceState({}, '', urlRedirect);\n this.onTrekDetailsClose();\n }\n });\n window.addEventListener('popstate', this.handlePopStateBind, false);\n this.handleView();\n }\n\n onTrekDetailsClose() {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = !this.showTrek;\n }\n\n handleView() {\n this.isLargeView = this.appElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showTreksMap = this.isLargeView;\n this.showTrekMap = this.isLargeView;\n }\n\n handleFilters() {\n this.showFilters = !this.showFilters;\n }\n\n handleBackButton() {\n if (window.history.state && window.history.state.isInitialHistoryWithTrek) {\n this.onTrekDetailsClose();\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n window.history.pushState({}, '', url);\n } else {\n window.history.back();\n }\n }\n\n handlePopState() {\n const url = new URL(window.location.toString());\n const trekParam = Number(url.searchParams.get('trek'));\n if (trekParam && this.currentTrekId !== trekParam) {\n this.currentTrekId = trekParam;\n this.showTrek = true;\n } else if (!trekParam) {\n this.onTrekDetailsClose();\n }\n }\n\n handleShowMap() {\n if (this.currentTrekId) {\n this.showTrekMap = !this.showTrekMap;\n } else {\n this.showTreksMap = !this.showTreksMap;\n }\n }\n\n handleEraseFilters() {\n this.resetFilter.emit();\n state.currentTreks = state.treks;\n }\n\n handleOkFilters() {\n this.handleFilters();\n }\n\n disconnectedCallback() {\n reset();\n window.removeEventListener('popstate', this.handlePopStateBind);\n }\n\n render() {\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-primary': this.colorOnPrimary,\n '--color-surface': this.colorSurface,\n '--color-on-surface': this.colorOnSurface,\n '--color-surface-variant': this.colorSurfaceVariant,\n '--color-on-surface-variant': this.colorOnSurfaceVariant,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--color-surface-container-high': this.colorSurfaceContainerHigh,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n '--fab-background-color': this.fabBackgroundColor,\n '--fab-color': this.fabColor,\n '--app-width': this.appWidth,\n '--app-height': this.appHeight,\n }}\n >\n {!state.currentTreks && !state.currentTrek && (\n <div class=\"init-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n {!this.showTrek && !state.treks && (\n <grw-treks-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n routes={this.routes}\n practices={this.practices}\n ></grw-treks-provider>\n )}\n {this.showTrek && this.currentTrekId && !state.currentTrek && (\n <grw-trek-provider api={this.api} languages={this.languages} trek-id={this.currentTrekId}></grw-trek-provider>\n )}\n {(state.currentTreks || state.currentTrek) && (\n <div class=\"app-container\">\n <div class={this.isLargeView ? 'large-view-header-container' : 'header-container'}>\n <div class=\"header-top\">\n <div class=\"header-left-container\">\n {this.showTrek ? (\n <button onClick={() => this.handleBackButton()} class=\"arrow-back-icon\">\n <span class=\"material-symbols-outlined\">arrow_back</span>\n </button>\n ) : (\n <div class=\"attribution-container\">\n <a target=\"_blank\" href={this.linkTarget}>\n {this.linkName}\n </a>\n </div>\n )}\n </div>\n <div class=\"header-right-container\">{state.languages.length > 1 && <grw-select-language></grw-select-language>}</div>\n </div>\n {!this.showTrek && (\n <div class=\"handle-search-filters-container\">\n <div class=\"handle-search-container\">\n <grw-search></grw-search>\n </div>\n <div class=\"handle-filters-container\">\n <button onClick={() => this.handleFilters()} class=\"handle-filters-button\">\n <span class=\"material-symbols-outlined margin-right-icon\">filter_list</span>\n {translate[state.language].filter}\n </button>\n </div>\n </div>\n )}\n </div>\n\n <div class={`content-container ${this.showTrek ? 'content-trek' : 'content-treks'}`}>\n <div\n class={this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container'}\n style={{ display: this.showTrek ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' }}\n >\n <grw-treks-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-treks-list>\n </div>\n {this.showTrek && !state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-loader-container' : 'loader-container'}>\n <span class=\"loader\"></span>\n </div>\n )}\n {state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container'}>\n <grw-trek-detail\n style={{\n visibility: (!this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: !this.showTrekMap ? '1' : '0',\n }}\n reset-store-on-disconnected=\"false\"\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-background={this.colorBackground}\n weather={this.weather}\n is-large-view={this.isLargeView}\n ></grw-trek-detail>\n </div>\n )}\n <grw-map\n reset-store-on-disconnected=\"false\"\n class={this.isLargeView ? 'large-view-app-map-container' : 'app-map-container'}\n style={{\n visibility: (this.showTreksMap && !this.showTrek) || (this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: this.showTrekMap ? '1' : '0',\n }}\n url-layer={this.urlLayer}\n center={this.center}\n zoom={this.zoom}\n attribution={this.attribution}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-background={this.colorBackground}\n color-trek-line={this.colorTrekLine}\n color-departure-icon={this.colorDepartureIcon}\n color-arrival-icon={this.colorArrivalIcon}\n color-sensitive-area={this.colorSensitiveArea}\n color-poi-icon={this.colorPoiIcon}\n is-large-view={this.isLargeView}\n use-gradient={this.useGradient}\n ></grw-map>\n </div>\n {(!this.showTrek || (this.showTrek && state.currentTrek)) && (\n <div class=\"map-visibility-button-container\">\n <button onClick={() => this.handleShowMap()} class=\"map-visibility-button\" style={{ display: this.isLargeView ? 'none' : 'flex' }}>\n <span class=\"material-symbols-outlined\">{this.showTrek ? (this.showTrekMap ? 'summarize' : 'map') : this.showTreksMap ? 'list' : 'map'}</span>\n {this.showTrek\n ? this.showTrekMap\n ? translate[state.language].showDetails\n : translate[state.language].showRoute\n : this.showTreksMap\n ? translate[state.language].showList\n : translate[state.language].showMap}\n </button>\n </div>\n )}\n </div>\n )}\n {!this.showTrek && this.showFilters && (\n <div class=\"options-container\">\n <div class=\"filters-container\">\n <div class=\"filters-options-buttons-container\">\n <button class=\"filter-option-button\" onClick={() => this.handleEraseFilters()}>\n Effacer\n </button>\n <button class=\"filter-option-button\" onClick={() => this.handleOkFilters()}>\n Ok\n </button>\n </div>\n <div class=\"filters-options-container\">\n <grw-filter filterName={translate[state.language].practice} filterType=\"practices\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].difficulty} filterType=\"difficulties\" filterNameProperty=\"label\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].duration} filterType=\"durations\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].length} filterType=\"lengths\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].elevation} filterType=\"elevations\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].themes} filterType=\"themes\" filterNameProperty=\"label\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].routes} filterType=\"routes\" filterNameProperty=\"route\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].accessibility} filterType=\"accessibilities\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].others} filterType=\"labels\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].cities} filterType=\"cities\" filterNameProperty=\"name\"></grw-filter>\n </div>\n </div>\n <div onClick={() => this.handleFilters()} class=\"back-filters-container\"></div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"iJAAA,MAAMA,EAAY,ooO,MCSLC,EAAM,M,kEAoDjBC,KAAAC,cAAgB,KAChBD,KAAAE,mBAA2CF,KAAKG,eAAeC,KA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}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./p-266b2cee.system.js","./p-93dc4557.system.js","./p-458ec23b.system.js"],(function(e){"use strict";var r,t,i,o,a,n,s,l,c;return{setters:[function(e){r=e.r;t=e.c;i=e.h;o=e.H;a=e.g},function(e){n=e.t},function(e){s=e.o;l=e.s;c=e.r}],execute:function(){var h='.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}grw-app{display:block;position:relative;width:var(--app-width);height:var(--app-height);font-family:"Roboto";color:var(--color-on-surface);overflow:hidden;line-height:initial;max-width:100vw;max-height:100vh}.app-container{position:relative;width:100%;height:100%;overflow:hidden}.header-container,.large-view-header-container{background-color:var(--color-background);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}.header-container .header-top,.large-view-header-container .header-top{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:64px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface);border:none;background-color:var(--color-background);border-radius:50%;height:48px;width:48px;padding:12px}.header-container .arrow-back-icon:hover,.large-view-header-container .arrow-back-icon:hover{-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1)}.header-container .header-left-container,.large-view-header-container .header-left-container{margin-left:8px}.header-container .header-right-container,.large-view-header-container .header-right-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-right:8px}.header-container .header-right-container .margin-right-icon,.large-view-header-container .header-right-container .margin-right-icon{margin-right:8px}.header-container .attribution-container a,.large-view-header-container .attribution-container a{font-size:24px;font-weight:400;line-height:40px;color:var(--color-on-surface);text-decoration:none}.options-container{height:calc(100% - 64px);position:absolute;width:100%;z-index:1100;top:64px}.handle-search-filters-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:0px 16px;height:64px}.handle-search-filters-container .handle-filters-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:var(--color-background);color:var(--color-on-surface);padding:12px 24px;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1000000015px;font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.handle-search-filters-container .handle-filters-button span{font-size:18px;font-family:"Material Symbols Outlined"}.filters-container{background-color:var(--color-background);position:relative;width:100%;height:100%;z-index:1100}.filters-options-container{overflow-y:scroll;padding-bottom:32px;max-height:calc(100% - 48px - 32px)}.back-filters-container{background-color:rgba(0, 0, 0, 0.5);width:100%;height:100%;position:absolute;z-index:1099}.divider{margin:16px;border-top:1px solid var(--color-outline)}.init-loader-container,.loader-container,.large-view-loader-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;background-color:var(--color-background)}.init-loader-container .loader,.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-container);border-bottom-color:var(--color-on-primary-container);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.content-container{position:relative;display:-ms-flexbox;display:flex;height:calc(100% - 64px - 64px);background-color:var(--color-background)}.content-treks{height:calc(100% - 64px - 64px)}.content-trek{height:calc(100% - 64px)}.app-treks-list-container,.app-trek-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;position:absolute;bottom:24px;z-index:4}.map-visibility-button-container .map-visibility-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;text-decoration:none;padding:16px;background-color:var(--color-primary-container);color:var(--color-on-primary-container);-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);border-radius:12px;height:56px;font-size:16px;width:unset}.map-visibility-button-container .map-visibility-button:hover{-webkit-box-shadow:var(--elevation-4);box-shadow:var(--elevation-4)}.map-visibility-button-container .map-visibility-button span{font-family:"Material Symbols Outlined";font-size:24px;margin-right:8px;color:var(--color-on-primary-container)}.init-loader-container,.loader-container{width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}grw-treks-list{max-height:calc(100vh - 64px - 64px)}grw-trek-detail{max-height:calc(100vh - 64px - 48px)}.app-map-container{width:100%;position:absolute}.large-view-loader-container{width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}.filters-options-buttons-container{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;height:48px}.filters-options-buttons-container .filter-option-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;font-weight:500;margin:8px 0px 0px 8px;padding:8px 16px;height:32px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:none;-webkit-tap-highlight-color:transparent;line-height:20px;color:var(--color-primary);background-color:transparent}';var d=e("grw_app",function(){function e(e){r(this,e);this.resetFilter=t(this,"resetFilter",7);this.largeViewSize=1024;this.handlePopStateBind=this.handlePopState.bind(this);this.showTrek=false;this.showTreksMap=false;this.showTrekMap=false;this.showFilters=false;this.isLargeView=false;this.currentTrekId=undefined;this.appWidth="100%";this.appHeight="100vh";this.api=undefined;this.languages="fr";this.inBbox=undefined;this.cities=undefined;this.districts=undefined;this.structures=undefined;this.themes=undefined;this.portals=undefined;this.routes=undefined;this.practices=undefined;this.urlLayer=undefined;this.center=undefined;this.zoom=undefined;this.attribution=undefined;this.linkName="GEOTREK";this.linkTarget="https://geotrek.fr";this.weather=false;this.colorPrimaryApp="#6750a4";this.colorOnPrimary="#ffffff";this.colorSurface="#1c1b1f";this.colorOnSurface="#49454e";this.colorSurfaceVariant="#fef7ff";this.colorOnSurfaceVariant="#1c1b1f";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorBackground="#fef7ff";this.colorSurfaceContainerHigh="#ece6f0";this.colorSurfaceContainerLow="#f7f2fa";this.fabBackgroundColor="#eaddff";this.fabColor="#21005d";this.colorTrekLine="#6b0030";this.colorDepartureIcon="#006b3b";this.colorArrivalIcon="#85003b";this.colorSensitiveArea="#4974a5";this.colorPoiIcon="#974c6e";this.useGradient=false}e.prototype.onTrekCardPress=function(e){this.currentTrekId=e.detail;this.showTrek=!this.showTrek;this.showTrekMap=false;var r=new URL(window.location.toString());r.searchParams.set("trek",this.currentTrekId.toString());window.history.pushState({},"",r)};e.prototype.onWindowResize=function(){this.handleView()};e.prototype.onCenterOnMap=function(){if(!this.isLargeView){this.showTrekMap=true}};e.prototype.watchPropHandler=function(){window.dispatchEvent(new window.Event("resize"))};e.prototype.componentWillLoad=function(){var e=new URL(window.location.toString());var r=e.searchParams.get("trek");if(r){window.history.replaceState({isInitialHistoryWithTrek:true},"",e);this.currentTrekId=Number(r);this.showTrek=!this.showTrek}};e.prototype.componentDidLoad=function(){var e=this;s("trekNetworkError",(function(){if(l.trekNetworkError){var r=new URL(window.location.toString());r.searchParams.delete("trek");window.history.replaceState({},"",r);e.onTrekDetailsClose()}}));window.addEventListener("popstate",this.handlePopStateBind,false);this.handleView()};e.prototype.onTrekDetailsClose=function(){l.currentTrek=null;this.currentTrekId=null;this.showTrek=!this.showTrek};e.prototype.handleView=function(){this.isLargeView=this.appElement.getBoundingClientRect().width>=this.largeViewSize;this.showTreksMap=this.isLargeView;this.showTrekMap=this.isLargeView};e.prototype.handleFilters=function(){this.showFilters=!this.showFilters};e.prototype.handleBackButton=function(){if(window.history.state&&window.history.state.isInitialHistoryWithTrek){this.onTrekDetailsClose();var e=new URL(window.location.toString());e.searchParams.delete("trek");window.history.pushState({},"",e)}else{window.history.back()}};e.prototype.handlePopState=function(){var e=new URL(window.location.toString());var r=Number(e.searchParams.get("trek"));if(r&&this.currentTrekId!==r){this.currentTrekId=r;this.showTrek=true}else if(!r){this.onTrekDetailsClose()}};e.prototype.handleShowMap=function(){if(this.currentTrekId){this.showTrekMap=!this.showTrekMap}else{this.showTreksMap=!this.showTreksMap}};e.prototype.handleEraseFilters=function(){this.resetFilter.emit();l.currentTreks=l.treks};e.prototype.handleOkFilters=function(){this.handleFilters()};e.prototype.disconnectedCallback=function(){c();window.removeEventListener("popstate",this.handlePopStateBind)};e.prototype.render=function(){var e=this;return i(o,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-primary":this.colorOnPrimary,"--color-surface":this.colorSurface,"--color-on-surface":this.colorOnSurface,"--color-surface-variant":this.colorSurfaceVariant,"--color-on-surface-variant":this.colorOnSurfaceVariant,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-background":this.colorBackground,"--color-surface-container-high":this.colorSurfaceContainerHigh,"--color-surface-container-low":this.colorSurfaceContainerLow,"--fab-background-color":this.fabBackgroundColor,"--fab-color":this.fabColor,"--app-width":this.appWidth,"--app-height":this.appHeight}},!l.currentTreks&&!l.currentTrek&&i("div",{class:"init-loader-container"},i("span",{class:"loader"})),!this.showTrek&&!l.treks&&i("grw-treks-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&!l.currentTrek&&i("grw-trek-provider",{api:this.api,languages:this.languages,"trek-id":this.currentTrekId}),(l.currentTreks||l.currentTrek)&&i("div",{class:"app-container"},i("div",{class:this.isLargeView?"large-view-header-container":"header-container"},i("div",{class:"header-top"},i("div",{class:"header-left-container"},this.showTrek?i("button",{onClick:function(){return e.handleBackButton()},class:"arrow-back-icon"},i("span",{class:"material-symbols-outlined"},"arrow_back")):i("div",{class:"attribution-container"},i("a",{target:"_blank",href:this.linkTarget},this.linkName))),i("div",{class:"header-right-container"},l.languages.length>1&&i("grw-select-language",null))),!this.showTrek&&i("div",{class:"handle-search-filters-container"},i("div",{class:"handle-search-container"},i("grw-search",null)),i("div",{class:"handle-filters-container"},i("button",{onClick:function(){return e.handleFilters()},class:"handle-filters-button"},i("span",{class:"material-symbols-outlined margin-right-icon"},"filter_list"),n[l.language].filter)))),i("div",{class:"content-container ".concat(this.showTrek?"content-trek":"content-treks")},i("div",{class:this.isLargeView?"large-view-app-treks-list-container":"app-treks-list-container",style:{display:this.showTrek?"none":"flex",position:this.showTrek?"absolute":"relative"}},i("grw-treks-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow})),this.showTrek&&!l.currentTrek&&i("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},i("span",{class:"loader"})),l.currentTrek&&i("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},i("grw-trek-detail",{style:{visibility:!this.showTrekMap&&this.showTrek||this.isLargeView?"visible":"hidden",zIndex:!this.showTrekMap?"1":"0"},"reset-store-on-disconnected":"false","color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-background":this.colorBackground,weather:this.weather,"is-large-view":this.isLargeView})),i("grw-map",{"reset-store-on-disconnected":"false",class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showTreksMap&&!this.showTrek||this.showTrekMap&&this.showTrek||this.isLargeView?"visible":"hidden",zIndex:this.showTrekMap?"1":"0"},"url-layer":this.urlLayer,center:this.center,zoom:this.zoom,attribution:this.attribution,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-background":this.colorBackground,"color-trek-line":this.colorTrekLine,"color-departure-icon":this.colorDepartureIcon,"color-arrival-icon":this.colorArrivalIcon,"color-sensitive-area":this.colorSensitiveArea,"color-poi-icon":this.colorPoiIcon,"is-large-view":this.isLargeView,"use-gradient":this.useGradient})),(!this.showTrek||this.showTrek&&l.currentTrek)&&i("div",{class:"map-visibility-button-container"},i("button",{onClick:function(){return e.handleShowMap()},class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},i("span",{class:"material-symbols-outlined"},this.showTrek?this.showTrekMap?"summarize":"map":this.showTreksMap?"list":"map"),this.showTrek?this.showTrekMap?n[l.language].showDetails:n[l.language].showRoute:this.showTreksMap?n[l.language].showList:n[l.language].showMap))),!this.showTrek&&this.showFilters&&i("div",{class:"options-container"},i("div",{class:"filters-container"},i("div",{class:"filters-options-buttons-container"},i("button",{class:"filter-option-button",onClick:function(){return e.handleEraseFilters()}},"Effacer"),i("button",{class:"filter-option-button",onClick:function(){return e.handleOkFilters()}},"Ok")),i("div",{class:"filters-options-container"},i("grw-filter",{filterName:n[l.language].practice,filterType:"practices",filterNameProperty:"name"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].difficulty,filterType:"difficulties",filterNameProperty:"label"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].duration,filterType:"durations",filterNameProperty:"name"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].length,filterType:"lengths",filterNameProperty:"name"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].elevation,filterType:"elevations",filterNameProperty:"name"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].themes,filterType:"themes",filterNameProperty:"label"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].routes,filterType:"routes",filterNameProperty:"route"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].accessibility,filterType:"accessibilities",filterNameProperty:"name"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].others,filterType:"labels",filterNameProperty:"name"}),i("div",{class:"divider"}),i("grw-filter",{filterName:n[l.language].cities,filterType:"cities",filterNameProperty:"name"}))),i("div",{onClick:function(){return e.handleFilters()},class:"back-filters-container"})))};Object.defineProperty(e.prototype,"appElement",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isLargeView:["watchPropHandler"]}},enumerable:false,configurable:true});return e}());d.style=h}}}));
|
|
2
|
+
//# sourceMappingURL=p-fd346455.system.entry.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["grwAppCss","GrwApp","exports","this","largeViewSize","handlePopStateBind","handlePopState","bind","class_1","prototype","onTrekCardPress","event","currentTrekId","detail","showTrek","showTrekMap","url","URL","window","location","toString","searchParams","set","history","pushState","onWindowResize","handleView","onCenterOnMap","isLargeView","watchPropHandler","dispatchEvent","Event","componentWillLoad","trekParam","get","replaceState","isInitialHistoryWithTrek","Number","componentDidLoad","_this","onChange","state","trekNetworkError","urlRedirect","delete","onTrekDetailsClose","addEventListener","currentTrek","appElement","getBoundingClientRect","width","showTreksMap","handleFilters","showFilters","handleBackButton","back","handleShowMap","handleEraseFilters","resetFilter","emit","currentTreks","treks","handleOkFilters","disconnectedCallback","reset","removeEventListener","render","h","Host","style","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","appWidth","appHeight","class","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","onClick","target","href","linkTarget","linkName","length","translate","language","filter","concat","display","position","visibility","zIndex","weather","urlLayer","center","zoom","attribution","colorTrekLine","colorDepartureIcon","colorArrivalIcon","colorSensitiveArea","colorPoiIcon","useGradient","showDetails","showRoute","showList","showMap","filterName","practice","filterType","filterNameProperty","difficulty","duration","elevation","accessibility","others"],"sources":["src/components/grw-app/grw-app.scss?tag=grw-app","src/components/grw-app/grw-app.tsx"],"sourcesContent":[".material-symbols-outlined {\n font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;\n}\n\ngrw-app {\n display: block;\n position: relative;\n width: var(--app-width);\n height: var(--app-height);\n font-family: 'Roboto';\n color: var(--color-on-surface);\n overflow: hidden;\n line-height: initial;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.app-container {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.header-container,\n.large-view-header-container {\n background-color: var(--color-background);\n box-shadow: var(--elevation-2);\n .header-top {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n height: 64px;\n }\n .arrow-back-icon {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface);\n border: none;\n background-color: var(--color-background);\n border-radius: 50%;\n height: 48px;\n width: 48px;\n padding: 12px;\n &:hover {\n box-shadow: var(--elevation-1);\n }\n }\n .header-left-container {\n margin-left: 8px;\n }\n .header-right-container {\n display: flex;\n align-items: center;\n margin-right: 8px;\n .margin-right-icon {\n margin-right: 8px;\n }\n }\n .attribution-container {\n a {\n font-size: 24px;\n font-weight: 400;\n line-height: 40px;\n color: var(--color-on-surface);\n text-decoration: none;\n }\n }\n}\n\n.options-container {\n height: calc(100% - 64px);\n position: absolute;\n width: 100%;\n z-index: 1100;\n top: 64px;\n}\n\n.handle-search-filters-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0px 16px;\n height: 64px;\n .handle-filters-button {\n user-select: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n background-color: var(--color-background);\n color: var(--color-on-surface);\n padding: 12px 24px;\n border-radius: 20px;\n box-sizing: border-box;\n position: relative;\n gap: 8px;\n white-space: nowrap;\n line-height: 20px;\n letter-spacing: 0.10000000149011612px;\n font-size: 14px;\n font-weight: 500;\n box-shadow: var(--elevation-1);\n transition: box-shadow 0.2s ease-in-out 0s;\n span {\n font-size: 18px;\n font-family: 'Material Symbols Outlined';\n }\n }\n}\n\n.filters-container {\n background-color: var(--color-background);\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1100;\n}\n\n.filters-options-container {\n overflow-y: scroll;\n padding-bottom: 32px;\n max-height: calc(100% - 48px - 32px);\n}\n\n.back-filters-container {\n background-color: rgba(0, 0, 0, 0.5);\n width: 100%;\n height: 100%;\n position: absolute;\n z-index: 1099;\n}\n\n.divider {\n margin: 16px;\n border-top: 1px solid var(--color-outline);\n}\n\n.init-loader-container,\n.loader-container,\n.large-view-loader-container {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n background-color: var(--color-background);\n .loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-container);\n border-bottom-color: var(--color-on-primary-container);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n}\n\n.content-container {\n position: relative;\n display: flex;\n height: calc(100% - 64px - 64px);\n background-color: var(--color-background);\n}\n\n.content-treks {\n height: calc(100% - 64px - 64px);\n}\n\n.content-trek {\n height: calc(100% - 64px);\n}\n\n.app-treks-list-container,\n.app-trek-detail-container,\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.app-map-container,\n.large-view-app-map-container {\n width: 100%;\n height: 100%;\n}\n\n.map-visibility-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: absolute;\n bottom: 24px;\n z-index: 4;\n .map-visibility-button {\n cursor: pointer;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n text-decoration: none;\n padding: 16px;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n box-shadow: var(--elevation-1);\n border-radius: 12px;\n height: 56px;\n font-size: 16px;\n width: unset;\n &:hover {\n box-shadow: var(--elevation-4);\n }\n span {\n font-family: 'Material Symbols Outlined';\n font-size: 24px;\n margin-right: 8px;\n color: var(--color-on-primary-container);\n }\n }\n}\n\n.init-loader-container,\n.loader-container {\n width: 100%;\n}\n\n.app-treks-list-container,\n.app-trek-detail-container {\n width: 100%;\n}\n\ngrw-treks-list {\n max-height: calc(100vh - 64px - 64px);\n}\n\ngrw-trek-detail {\n max-height: calc(100vh - 64px - 48px);\n}\n\n.app-map-container {\n width: 100%;\n position: absolute;\n}\n\n.large-view-loader-container {\n width: 50%;\n}\n\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container {\n width: 50%;\n}\n\n.large-view-app-map-container {\n position: relative;\n width: 50%;\n}\n\n.filters-options-buttons-container {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n height: 48px;\n .filter-option-button {\n cursor: pointer;\n user-select: none;\n font-size: 14px;\n font-weight: 500;\n margin: 8px 0px 0px 8px;\n padding: 8px 16px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: var(--elevation-0);\n border: none;\n -webkit-tap-highlight-color: transparent;\n line-height: 20px;\n color: var(--color-primary);\n background-color: transparent;\n }\n}\n","import { Component, Host, h, Listen, State, Prop, Element, Watch, Event, EventEmitter } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange, reset } from 'store/store';\n\n@Component({\n tag: 'grw-app',\n styleUrls: ['grw-app.scss'],\n shadow: false,\n})\nexport class GrwApp {\n @Element() appElement: HTMLElement;\n @Event() resetFilter: EventEmitter;\n @State() showTrek = false;\n @State() showTreksMap = false;\n @State() showTrekMap = false;\n @State() showFilters = false;\n @State() isLargeView = false;\n @State() currentTrekId: number;\n @Prop() appWidth: string = '100%';\n @Prop() appHeight: string = '100vh';\n @Prop() api: string;\n @Prop() languages = 'fr';\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() urlLayer: string;\n @Prop() center: string;\n @Prop() zoom: number;\n @Prop() attribution: string;\n @Prop() linkName = 'GEOTREK';\n @Prop() linkTarget = 'https://geotrek.fr';\n @Prop() weather = false;\n\n @Prop() colorPrimaryApp = '#6750a4';\n @Prop() colorOnPrimary = '#ffffff';\n @Prop() colorSurface = '#1c1b1f';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSurfaceVariant = '#fef7ff';\n @Prop() colorOnSurfaceVariant = '#1c1b1f';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorBackground = '#fef7ff';\n @Prop() colorSurfaceContainerHigh = '#ece6f0';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorDepartureIcon = '#006b3b';\n @Prop() colorArrivalIcon = '#85003b';\n @Prop() colorSensitiveArea = '#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n @Prop() useGradient = false;\n\n largeViewSize = 1024;\n handlePopStateBind: (event: any) => void = this.handlePopState.bind(this);\n\n @Listen('trekCardPress', { target: 'window' })\n onTrekCardPress(event: CustomEvent<number>) {\n this.currentTrekId = event.detail;\n this.showTrek = !this.showTrek;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap() {\n if (!this.isLargeView) {\n this.showTrekMap = true;\n }\n }\n\n @Watch('isLargeView')\n watchPropHandler() {\n window.dispatchEvent(new window.Event('resize'));\n }\n\n componentWillLoad() {\n const url = new URL(window.location.toString());\n const trekParam = url.searchParams.get('trek');\n if (trekParam) {\n window.history.replaceState({ isInitialHistoryWithTrek: true }, '', url);\n this.currentTrekId = Number(trekParam);\n this.showTrek = !this.showTrek;\n }\n }\n\n componentDidLoad() {\n onChange('trekNetworkError', () => {\n if (state.trekNetworkError) {\n const urlRedirect = new URL(window.location.toString());\n urlRedirect.searchParams.delete('trek');\n window.history.replaceState({}, '', urlRedirect);\n this.onTrekDetailsClose();\n }\n });\n window.addEventListener('popstate', this.handlePopStateBind, false);\n this.handleView();\n }\n\n onTrekDetailsClose() {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = !this.showTrek;\n }\n\n handleView() {\n this.isLargeView = this.appElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showTreksMap = this.isLargeView;\n this.showTrekMap = this.isLargeView;\n }\n\n handleFilters() {\n this.showFilters = !this.showFilters;\n }\n\n handleBackButton() {\n if (window.history.state && window.history.state.isInitialHistoryWithTrek) {\n this.onTrekDetailsClose();\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n window.history.pushState({}, '', url);\n } else {\n window.history.back();\n }\n }\n\n handlePopState() {\n const url = new URL(window.location.toString());\n const trekParam = Number(url.searchParams.get('trek'));\n if (trekParam && this.currentTrekId !== trekParam) {\n this.currentTrekId = trekParam;\n this.showTrek = true;\n } else if (!trekParam) {\n this.onTrekDetailsClose();\n }\n }\n\n handleShowMap() {\n if (this.currentTrekId) {\n this.showTrekMap = !this.showTrekMap;\n } else {\n this.showTreksMap = !this.showTreksMap;\n }\n }\n\n handleEraseFilters() {\n this.resetFilter.emit();\n state.currentTreks = state.treks;\n }\n\n handleOkFilters() {\n this.handleFilters();\n }\n\n disconnectedCallback() {\n reset();\n window.removeEventListener('popstate', this.handlePopStateBind);\n }\n\n render() {\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-primary': this.colorOnPrimary,\n '--color-surface': this.colorSurface,\n '--color-on-surface': this.colorOnSurface,\n '--color-surface-variant': this.colorSurfaceVariant,\n '--color-on-surface-variant': this.colorOnSurfaceVariant,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--color-surface-container-high': this.colorSurfaceContainerHigh,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n '--fab-background-color': this.fabBackgroundColor,\n '--fab-color': this.fabColor,\n '--app-width': this.appWidth,\n '--app-height': this.appHeight,\n }}\n >\n {!state.currentTreks && !state.currentTrek && (\n <div class=\"init-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n {!this.showTrek && !state.treks && (\n <grw-treks-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n routes={this.routes}\n practices={this.practices}\n ></grw-treks-provider>\n )}\n {this.showTrek && this.currentTrekId && !state.currentTrek && (\n <grw-trek-provider api={this.api} languages={this.languages} trek-id={this.currentTrekId}></grw-trek-provider>\n )}\n {(state.currentTreks || state.currentTrek) && (\n <div class=\"app-container\">\n <div class={this.isLargeView ? 'large-view-header-container' : 'header-container'}>\n <div class=\"header-top\">\n <div class=\"header-left-container\">\n {this.showTrek ? (\n <button onClick={() => this.handleBackButton()} class=\"arrow-back-icon\">\n <span class=\"material-symbols-outlined\">arrow_back</span>\n </button>\n ) : (\n <div class=\"attribution-container\">\n <a target=\"_blank\" href={this.linkTarget}>\n {this.linkName}\n </a>\n </div>\n )}\n </div>\n <div class=\"header-right-container\">{state.languages.length > 1 && <grw-select-language></grw-select-language>}</div>\n </div>\n {!this.showTrek && (\n <div class=\"handle-search-filters-container\">\n <div class=\"handle-search-container\">\n <grw-search></grw-search>\n </div>\n <div class=\"handle-filters-container\">\n <button onClick={() => this.handleFilters()} class=\"handle-filters-button\">\n <span class=\"material-symbols-outlined margin-right-icon\">filter_list</span>\n {translate[state.language].filter}\n </button>\n </div>\n </div>\n )}\n </div>\n\n <div class={`content-container ${this.showTrek ? 'content-trek' : 'content-treks'}`}>\n <div\n class={this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container'}\n style={{ display: this.showTrek ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' }}\n >\n <grw-treks-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-treks-list>\n </div>\n {this.showTrek && !state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-loader-container' : 'loader-container'}>\n <span class=\"loader\"></span>\n </div>\n )}\n {state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container'}>\n <grw-trek-detail\n style={{\n visibility: (!this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: !this.showTrekMap ? '1' : '0',\n }}\n reset-store-on-disconnected=\"false\"\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-background={this.colorBackground}\n weather={this.weather}\n is-large-view={this.isLargeView}\n ></grw-trek-detail>\n </div>\n )}\n <grw-map\n reset-store-on-disconnected=\"false\"\n class={this.isLargeView ? 'large-view-app-map-container' : 'app-map-container'}\n style={{\n visibility: (this.showTreksMap && !this.showTrek) || (this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: this.showTrekMap ? '1' : '0',\n }}\n url-layer={this.urlLayer}\n center={this.center}\n zoom={this.zoom}\n attribution={this.attribution}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-background={this.colorBackground}\n color-trek-line={this.colorTrekLine}\n color-departure-icon={this.colorDepartureIcon}\n color-arrival-icon={this.colorArrivalIcon}\n color-sensitive-area={this.colorSensitiveArea}\n color-poi-icon={this.colorPoiIcon}\n is-large-view={this.isLargeView}\n use-gradient={this.useGradient}\n ></grw-map>\n </div>\n {(!this.showTrek || (this.showTrek && state.currentTrek)) && (\n <div class=\"map-visibility-button-container\">\n <button onClick={() => this.handleShowMap()} class=\"map-visibility-button\" style={{ display: this.isLargeView ? 'none' : 'flex' }}>\n <span class=\"material-symbols-outlined\">{this.showTrek ? (this.showTrekMap ? 'summarize' : 'map') : this.showTreksMap ? 'list' : 'map'}</span>\n {this.showTrek\n ? this.showTrekMap\n ? translate[state.language].showDetails\n : translate[state.language].showRoute\n : this.showTreksMap\n ? translate[state.language].showList\n : translate[state.language].showMap}\n </button>\n </div>\n )}\n </div>\n )}\n {!this.showTrek && this.showFilters && (\n <div class=\"options-container\">\n <div class=\"filters-container\">\n <div class=\"filters-options-buttons-container\">\n <button class=\"filter-option-button\" onClick={() => this.handleEraseFilters()}>\n Effacer\n </button>\n <button class=\"filter-option-button\" onClick={() => this.handleOkFilters()}>\n Ok\n </button>\n </div>\n <div class=\"filters-options-container\">\n <grw-filter filterName={translate[state.language].practice} filterType=\"practices\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].difficulty} filterType=\"difficulties\" filterNameProperty=\"label\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].duration} filterType=\"durations\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].length} filterType=\"lengths\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].elevation} filterType=\"elevations\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].themes} filterType=\"themes\" filterNameProperty=\"label\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].routes} filterType=\"routes\" filterNameProperty=\"route\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].accessibility} filterType=\"accessibilities\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].others} filterType=\"labels\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].cities} filterType=\"cities\" filterNameProperty=\"name\"></grw-filter>\n </div>\n </div>\n <div onClick={() => this.handleFilters()} class=\"back-filters-container\"></div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"8QAAA,IAAMA,EAAY,ooO,ICSLC,EAAMC,EAAA,qB,iEAoDjBC,KAAAC,cAAgB,KAChBD,KAAAE,mBAA2CF,KAAKG,eAAeC,KAAKJ,M,cAlDhD,M,kBACI,M,iBACD,M,iBACA,M,iBACA,M,2CAEI,O,eACC,Q,kCAER,K,sSAaD,U,gBACE,qB,aACH,M,qBAEQ,U,oBACD,U,kBACF,U,oBACE,U,yBACK,U,2BACE,U,2BACA,U,6BACE,U,6BACA,U,+BACE,U,qBACV,U,+BACU,U,8BACD,U,wBACN,U,cACV,U,mBAEK,U,wBACK,U,sBACF,U,wBACE,U,kBACN,U,iBACD,K,CAMtBK,EAAAC,UAAAC,gBAAA,SAAgBC,GACdR,KAAKS,cAAgBD,EAAME,OAC3BV,KAAKW,UAAYX,KAAKW,SACtBX,KAAKY,YAAc,MACnB,IAAMC,EAAM,IAAIC,IAAIC,OAAOC,SAASC,YACpCJ,EAAIK,aAAaC,IAAI,OAAQnB,KAAKS,cAAcQ,YAChDF,OAAOK,QAAQC,UAAU,GAAI,GAAIR,E,EAInCR,EAAAC,UAAAgB,eAAA,WACEtB,KAAKuB,Y,EAIPlB,EAAAC,UAAAkB,cAAA,WACE,IAAKxB,KAAKyB,YAAa,CACrBzB,KAAKY,YAAc,I,GAKvBP,EAAAC,UAAAoB,iBAAA,WACEX,OAAOY,cAAc,IAAIZ,OAAOa,MAAM,U,EAGxCvB,EAAAC,UAAAuB,kBAAA,WACE,IAAMhB,EAAM,IAAIC,IAAIC,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AAmB,SACtG/D,EAAA,OAAKoB,MAAM,YACXpB,EAAA,cAAY4D,WAAYvB,EAAU/D,EAAMgE,UAAUF,OAAQ0B,WAAW,UAAUC,mBAAmB,SAClG/D,EAAA,OAAKoB,MAAM,YACXpB,EAAA,cAAY4D,WAAYvB,EAAU/D,EAAMgE,UAAU4B,UAAWJ,WAAW,aAAaC,mBAAmB,SACxG/D,EAAA,OAAKoB,MAAM,YACXpB,EAAA,cAAY4D,WAAYvB,EAAU/D,EAAMgE,UAAUX,OAAQmC,WAAW,SAASC,mBAAmB,UACjG/D,EAAA,OAAKoB,MAAM,YACXpB,EAAA,cAAY4D,WAAYvB,EAAU/D,EAAMgE,UAAUT,OAAQiC,WAAW,SAASC,mBAAmB,UACjG/D,EAAA,OAAKoB,MAAM,YACXpB,EAAA,cAAY4D,WAAYvB,EAAU/D,EAAMgE,UAAU6B,cAAeL,WAAW,kBAAkBC,mBAAmB,SACjH/D,EAAA,OAAKoB,MAAM,YACXpB,EAAA,cAAY4D,WAAYvB,EAAU/D,EAAMgE,UAAU8B,OAAQN,WAAW,SAASC,mBAAmB,SACjG/D,EAAA,OAAKoB,MAAM,YACXpB,EAAA,cAAY4D,WAAYvB,EAAU/D,EAAMgE,UAAUd,OAAQsC,WAAW,SAASC,mBAAmB,WAGrG/D,EAAA,OAAK+B,QAAS,WAAM,OAAA3D,EAAKa,eAAL,EAAsBmC,MAAM,4B,iQAtWzC,I"}
|
|
@@ -47,6 +47,7 @@ export declare class GrwApp {
|
|
|
47
47
|
colorArrivalIcon: string;
|
|
48
48
|
colorSensitiveArea: string;
|
|
49
49
|
colorPoiIcon: string;
|
|
50
|
+
useGradient: boolean;
|
|
50
51
|
largeViewSize: number;
|
|
51
52
|
handlePopStateBind: (event: any) => void;
|
|
52
53
|
onTrekCardPress(event: CustomEvent<number>): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import L from 'leaflet';
|
|
3
|
+
import 'leaflet-rotate';
|
|
3
4
|
import 'leaflet.locatecontrol';
|
|
4
5
|
import '@raruto/leaflet-elevation/dist/leaflet-elevation.min.js';
|
|
5
6
|
export declare class GrwMap {
|
|
@@ -21,6 +22,7 @@ export declare class GrwMap {
|
|
|
21
22
|
colorArrivalIcon: string;
|
|
22
23
|
colorSensitiveArea: string;
|
|
23
24
|
colorPoiIcon: string;
|
|
25
|
+
useGradient: boolean;
|
|
24
26
|
resetStoreOnDisconnected: boolean;
|
|
25
27
|
isLargeView: boolean;
|
|
26
28
|
map: L.Map;
|
|
@@ -28,7 +30,6 @@ export declare class GrwMap {
|
|
|
28
30
|
bounds: any;
|
|
29
31
|
treksLayer: L.GeoJSON<any>;
|
|
30
32
|
currentTrekLayer: L.GeoJSON<any>;
|
|
31
|
-
currentDepartureArrivalLayer: L.GeoJSON<any>;
|
|
32
33
|
currentPointsReferenceLayer: L.GeoJSON<any>;
|
|
33
34
|
currentParkingLayer: L.GeoJSON<any>;
|
|
34
35
|
currentSensitiveAreasLayer: L.GeoJSON<any>;
|
|
@@ -46,6 +46,7 @@ export namespace Components {
|
|
|
46
46
|
"structures": string;
|
|
47
47
|
"themes": string;
|
|
48
48
|
"urlLayer": string;
|
|
49
|
+
"useGradient": boolean;
|
|
49
50
|
"weather": boolean;
|
|
50
51
|
"zoom": number;
|
|
51
52
|
}
|
|
@@ -73,6 +74,7 @@ export namespace Components {
|
|
|
73
74
|
"isLargeView": boolean;
|
|
74
75
|
"resetStoreOnDisconnected": boolean;
|
|
75
76
|
"urlLayer": string;
|
|
77
|
+
"useGradient": boolean;
|
|
76
78
|
"zoom": number;
|
|
77
79
|
}
|
|
78
80
|
interface GrwPoiDetail {
|
|
@@ -290,6 +292,7 @@ declare namespace LocalJSX {
|
|
|
290
292
|
"structures"?: string;
|
|
291
293
|
"themes"?: string;
|
|
292
294
|
"urlLayer"?: string;
|
|
295
|
+
"useGradient"?: boolean;
|
|
293
296
|
"weather"?: boolean;
|
|
294
297
|
"zoom"?: number;
|
|
295
298
|
}
|
|
@@ -319,6 +322,7 @@ declare namespace LocalJSX {
|
|
|
319
322
|
"onTrekCardPress"?: (event: GrwMapCustomEvent<number>) => void;
|
|
320
323
|
"resetStoreOnDisconnected"?: boolean;
|
|
321
324
|
"urlLayer"?: string;
|
|
325
|
+
"useGradient"?: boolean;
|
|
322
326
|
"zoom"?: number;
|
|
323
327
|
}
|
|
324
328
|
interface GrwPoiDetail {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geotrekce/geotrek-rando-widget",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "Geotrek rando widget",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@raruto/leaflet-elevation": "^2.4.0",
|
|
31
31
|
"@stencil/core": "^3.4.1",
|
|
32
32
|
"leaflet": "^1.9.4",
|
|
33
|
+
"leaflet-rotate": "^0.2.8",
|
|
33
34
|
"leaflet.locatecontrol": "^0.79.0",
|
|
34
35
|
"swiper": "^9.4.1"
|
|
35
36
|
},
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"utils-db06d6fd.js","mappings":";;;;SAGgB,cAAc,CAAC,QAAgB;EAC7C,IAAI,iBAAiB,CAAC;EACtB,IAAI,QAAQ,GAAG,EAAE,EAAE;IACjB,iBAAiB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;IAC/C,IAAI,QAAQ,GAAG,CAAC,GAAG,CAAC,EAAE;MACpB,iBAAiB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;KAC9D;GACF;OAAM;IACL,iBAAiB,GAAG,GAAG,QAAQ,GAAG,EAA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AK,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,QAAQ,GAAG,QAAQ,EAAE;cACxD,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;aACnC;YACD,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,QAAQ,GAAG,QAAQ,EAAE;cACxD,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;aACnC;WACF;UACD,YAAY,GAAG,CAAC,GAAGA,WAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;SAChI;OACF;KACF;GACF;EAED,MAAM,WAAW,GAAG,aAAa,GAAG,YAAY,GAAGA,WAAK,CAAC,KAAK,CAAC;EAC/D,OAAO,OAAO,CAACA,WAAK,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAACA,WAAK,CAAC,WAAW,CAAC,CAAC,GAAG,WAAW,CAAC;AACxJ;;;;;;;","names":["state"],"sources":["./src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { Filters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport function handleFiltersAndSearch(): Treks {\n const filters: Filters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include' },\n ];\n\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of filters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLocaleLowerCase().includes(state.searchValue)) : searchTreks;\n}\n"],"version":3}
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"utils-3e167809.js","mappings":";;SAGgB,cAAc,CAAC,QAAgB;EAC7C,IAAI,iBAAiB,CAAC;EACtB,IAAI,QAAQ,GAAG,EAAE,EAAE;IACjB,iBAAiB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;IAC/C,IAAI,QAAQ,GAAG,CAAC,GAAG,CAAC,EAAE;MACpB,iBAAiB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;KAC9D;GACF;OAAM;IACL,iBAAiB,GAAG,GAAG,QAAQ,GAAG,EAAE,GAAG,CAAC;GACzC;EACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;SAEe,YAAY,CAAC,MAAc;EACzC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;AAC1C,CAAC;SAEe,YAAY,CAAC,MAAc;EACzC,OAAO,GAAG,MAAM,GAAG,CAAC;AACtB,CAAC;SAEe,sBAAsB;EACpC,MAAM,OAAO,GAAY;IACvB,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAA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AC,MAAM,CAAC,YAAY,CAAC,IAAI,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;SAChI;OACF;KACF;GACF;EAED,MAAM,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC;EAC/D,OAAO,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,WAAW,CAAC;AACxJ;;;;","names":[],"sources":["./src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { Filters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport function handleFiltersAndSearch(): Treks {\n const filters: Filters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include' },\n ];\n\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of filters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLocaleLowerCase().includes(state.searchValue)) : searchTreks;\n}\n"],"version":3}
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["formatDuration","duration","formattedDuration","concat","Math","floor","round","formatLength","length","formatAscent","ascent","handleFiltersAndSearch","filters","property","trekProperty","trekPropertyIsArray","type","isUsingFilter","filtersTreks","filter","currentFiltersId","state","currentFilter","selected","map","id","__spreadArray","treks","trek","some","includes","currentFilterId","find","minValue","maxValue","_i","currentFiltersId_2","minValue_1","maxValue_1","isNaN","_a","currentFiltersId_1","filters_1","searchTreks","Boolean","searchValue","currentTrek","name","toLocaleLowerCase"],"sources":["src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { Filters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport function handleFiltersAndSearch(): Treks {\n const filters: Filters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include' },\n ];\n\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of filters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLocaleLowerCase().includes(state.searchValue)) : searchTreks;\n}\n"],"mappings":"uSAGgBA,eAAeC,GAC7B,IAAIC,EACJ,GAAID,EAAW,GAAI,CACjBC,EAAoB,GAAAC,OAAGC,KAAKC,MAAMJ,GAAS,KAC3C,GAAIA,EAAW,EAAI,EAAG,CACpBC,GAAqB,GAAAC,OAAGC,KAAKE,MAAM,IAAML,EAAW,IAAG,M,MAEpD,CACLC,EAAoB,GAAAC,OAAGF,EAAW,GAAE,I,CAEtC,OAAOC,CACT,C,SAEgBK,aAAaC,GAC3B,MAAO,GAAAL,OAAGC,KAAKE,MAAME,EAAS,KAAK,KACrC,C,SAEgBC,aAAaC,GAC3B,MAAO,GAAAP,OAAGO,EAAM,IAClB,C,SAEgBC,yBACd,IAAMC,EAAmB,CACvB,CAAEC,SAAU,YAAaC,aAAc,WAAYC,oBAAqB,MAAOC,KAAM,WACrF,CAAEH,SAAU,eAAgBC,aAAc,aAAcC,oBAAqB,MAAOC,KAAM,WAC1F,CAAEH,SAAU,YAAaC,aAAc,WAAYC,oBAAqB,MAAOC,KAAM,YACrF,CAAEH,SAAU,UAAWC,aAAc,YAAaC,oBAAqB,MAAOC,KAAM,YACpF,CAAEH,SAAU,aAAcC,aAAc,SAAUC,oBAAqB,MAAOC,KAAM,YACpF,CAAEH,SAAU,SAAUC,aAAc,SAAUC,oBAAqB,KAAMC,KAAM,WAC/E,CAAEH,SAAU,SAAUC,aAAc,QAASC,oBAAqB,MAAOC,KAAM,WAC/E,CAAEH,SAAU,kBAAmBC,aAAc,kBAAmBC,oBAAqB,KAAMC,KAAM,WACjG,CAAEH,SAAU,SAAUC,aAAc,SAAUC,oBAAqB,KAAMC,KAAM,WAC/E,CAAEH,SAAU,SAAUC,aAAc,SAAUC,oBAAqB,KAAMC,KAAM,YAGjF,IAAIC,EAAgB,MACpB,IAAIC,EAAe,G,eACRC,GACT,IAAMC,E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