@geotrekce/geotrek-rando-widget 0.0.7 → 0.0.8

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.
Files changed (59) hide show
  1. package/dist/cjs/geotrek-rando-widget.cjs.js +2 -2
  2. package/dist/cjs/grw-app.cjs.entry.js +14 -5
  3. package/dist/cjs/grw-filter_6.cjs.entry.js +70 -44
  4. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +2 -2
  5. package/dist/cjs/grw-trek-card.cjs.entry.js +3 -3
  6. package/dist/cjs/{index-c2c4531d.js → index-4c76daa3.js} +8 -3
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{store-fd04a216.js → store-b4c3c507.js} +6 -4
  9. package/dist/collection/components/grw-app/grw-app.css +17 -11
  10. package/dist/collection/components/grw-app/grw-app.js +21 -9
  11. package/dist/collection/components/grw-filter/grw-filter.js +11 -12
  12. package/dist/collection/components/grw-map/grw-map.js +22 -15
  13. package/dist/collection/components/grw-trek-card/grw-trek-card.js +1 -1
  14. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +4 -2
  15. package/dist/collection/components/grw-treks-list/grw-treks-list.css +0 -12
  16. package/dist/collection/components/grw-treks-list/grw-treks-list.js +16 -9
  17. package/dist/collection/store/grw-trek-provider.js +8 -2
  18. package/dist/collection/store/grw-treks-provider.js +6 -3
  19. package/dist/collection/store/store.js +5 -3
  20. package/dist/components/grw-app.js +14 -5
  21. package/dist/components/grw-filter2.js +11 -12
  22. package/dist/components/grw-map2.js +22 -15
  23. package/dist/components/grw-trek-card2.js +1 -1
  24. package/dist/components/grw-trek-detail2.js +4 -2
  25. package/dist/components/grw-trek-provider2.js +8 -2
  26. package/dist/components/grw-treks-list2.js +18 -9
  27. package/dist/components/grw-treks-provider2.js +6 -3
  28. package/dist/components/store.js +5 -3
  29. package/dist/esm/geotrek-rando-widget.js +2 -2
  30. package/dist/esm/grw-app.entry.js +14 -5
  31. package/dist/esm/grw-filter_6.entry.js +70 -44
  32. package/dist/esm/grw-information-desk-detail_3.entry.js +2 -2
  33. package/dist/esm/grw-trek-card.entry.js +3 -3
  34. package/dist/esm/{index-192d910f.js → index-ee473772.js} +8 -3
  35. package/dist/esm/loader.js +2 -2
  36. package/dist/esm/{store-b2c76c0c.js → store-a5f523fd.js} +6 -4
  37. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  38. package/dist/geotrek-rando-widget/{p-7715153d.entry.js → p-0510e16b.entry.js} +1 -1
  39. package/dist/geotrek-rando-widget/p-22562f4d.js +1 -0
  40. package/dist/geotrek-rando-widget/{p-1b2ba86d.entry.js → p-500436f1.entry.js} +1 -1
  41. package/dist/geotrek-rando-widget/p-94f0db4d.entry.js +1 -0
  42. package/dist/geotrek-rando-widget/p-9a25f817.entry.js +1 -0
  43. package/dist/geotrek-rando-widget/p-b62909db.js +2 -0
  44. package/dist/types/components/grw-app/grw-app.d.ts +2 -2
  45. package/dist/types/components/grw-filter/grw-filter.d.ts +1 -1
  46. package/dist/types/components/grw-map/grw-map.d.ts +1 -1
  47. package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +1 -1
  48. package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +1 -1
  49. package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +3 -2
  50. package/dist/types/components.d.ts +2 -2
  51. package/dist/types/store/grw-trek-provider.d.ts +2 -1
  52. package/dist/types/store/grw-treks-provider.d.ts +1 -1
  53. package/dist/types/store/store.d.ts +4 -0
  54. package/package.json +1 -1
  55. package/readme.md +4 -0
  56. package/dist/geotrek-rando-widget/p-4361afd2.entry.js +0 -1
  57. package/dist/geotrek-rando-widget/p-5f17d340.entry.js +0 -1
  58. package/dist/geotrek-rando-widget/p-6dce5e6c.js +0 -2
  59. package/dist/geotrek-rando-widget/p-e6710c64.js +0 -1
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-192d910f.js';
2
- import { s as state, o as onChange } from './store-b2c76c0c.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-ee473772.js';
2
+ import { s as state, o as onChange } from './store-a5f523fd.js';
3
3
  import { d as durationImage, f as formatDuration, l as lengthImage, a as formatLength, b as ascentImage, c as formatAscent } from './length-d82189db.js';
4
4
 
5
5
  const grwTrekCardCss = ".trek-card-container,.trek-card-large-view-container{font-family:\"Roboto\";border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image,.trek-card-large-view-container .image{object-fit:cover}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:flex;flex-direction:column;justify-content:center;padding:12px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:rgba(0, 0, 0, 0.7);font-size:16px;margin:4px 0px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:flex;justify-content:flex-start;align-items:center;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-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;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:flex;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 .svg-icon svg,.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 .svg-icon svg{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)}.trek-card-container{width:350px;height:auto}.trek-card-container .image{width:100%}.trek-card-large-view-container{height:auto;display:flex;flex-direction:row}.trek-card-large-view-container .image{width:250px}";
@@ -12,7 +12,7 @@ const GrwTrekCard = class {
12
12
  this.colorPrimaryTint = '#974c6e';
13
13
  this.isLargeView = false;
14
14
  }
15
- componentWillLoad() {
15
+ connectedCallback() {
16
16
  this.currentTrek = this.trek ? this.trek : state.currentTrek;
17
17
  if (this.currentTrek) {
18
18
  this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);
@@ -659,9 +659,6 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
659
659
  hostRef.$queuedListeners$ = null;
660
660
  }
661
661
  }
662
- {
663
- promise = safeCall(instance, 'componentWillLoad');
664
- }
665
662
  }
666
663
  endSchedule();
667
664
  return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
@@ -1039,6 +1036,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1039
1036
  hostRef.$flags$ |= 128 /* isWatchReady */;
1040
1037
  }
1041
1038
  endNewInstance();
1039
+ fireConnectedCallback(hostRef.$lazyInstance$);
1042
1040
  }
1043
1041
  if (Cstr.style) {
1044
1042
  // this component has styles but we haven't registered them yet
@@ -1067,6 +1065,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1067
1065
  schedule();
1068
1066
  }
1069
1067
  };
1068
+ const fireConnectedCallback = (instance) => {
1069
+ {
1070
+ safeCall(instance, 'connectedCallback');
1071
+ }
1072
+ };
1070
1073
  const connectedCallback = (elm) => {
1071
1074
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1072
1075
  const hostRef = getHostRef(elm);
@@ -1110,6 +1113,8 @@ const connectedCallback = (elm) => {
1110
1113
  // reattach any event listeners to the host
1111
1114
  // since they would have been removed when disconnected
1112
1115
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1116
+ // fire off connectedCallback() on component instance
1117
+ fireConnectedCallback(hostRef.$lazyInstance$);
1113
1118
  }
1114
1119
  endConnected();
1115
1120
  }
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-192d910f.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-ee473772.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.16.1 | MIT Licensed | https://stenciljs.com
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["grw-trek-card",[[1,"grw-trek-card",{"trek":[16],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"isLargeView":[4,"is-large-view"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32],"themes":[32]}]]],["grw-information-desk-detail_3",[[1,"grw-information-desk-detail",{"informationDesk":[16]}],[1,"grw-poi-detail",{"poi":[16]}],[1,"grw-sensitive-area-detail",{"sensitiveArea":[16]}]]],["grw-filter_6",[[1,"grw-trek-detail",{"trek":[16],"colorPrimary":[1,"color-primary"],"colorPrimaryShade":[1,"color-primary-shade"],"colorPrimaryTint":[1,"color-primary-tint"],"difficulty":[32],"route":[32],"practice":[32],"themes":[32],"labels":[32],"sources":[32],"accessibilities":[32],"accessibilityLevel":[32],"currentTrek":[32]}],[1,"grw-treks-list",{"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"isLargeView":[4,"is-large-view"],"treksToDisplay":[32]}],[1,"grw-filter",{"filterType":[1,"filter-type"],"filterName":[1,"filter-name"],"filterNameProperty":[1,"filter-name-property"]}],[0,"grw-map",{"urlLayer":[1,"url-layer"],"attribution":[1],"center":[1],"zoom":[2],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"mapIsReady":[32]}],[1,"grw-trek-provider",{"language":[1],"api":[1],"trekId":[1,"trek-id"]}],[1,"grw-treks-provider",{"language":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1]}]]],["grw-app",[[1,"grw-app",{"api":[1],"language":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1],"urlLayer":[1,"url-layer"],"center":[1],"zoom":[8],"attribution":[1],"colorPrimary":[1,"color-primary"],"colorPrimaryShade":[1,"color-primary-shade"],"colorPrimaryTint":[1,"color-primary-tint"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"showTrek":[32],"showTreksMap":[32],"showTrekMap":[32],"showFilters":[32],"isLargeView":[32],"currentTrekId":[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]]]]], options);
13
+ return bootstrapLazy([["grw-trek-card",[[1,"grw-trek-card",{"trek":[16],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"isLargeView":[4,"is-large-view"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32],"themes":[32]}]]],["grw-information-desk-detail_3",[[1,"grw-information-desk-detail",{"informationDesk":[16]}],[1,"grw-poi-detail",{"poi":[16]}],[1,"grw-sensitive-area-detail",{"sensitiveArea":[16]}]]],["grw-filter_6",[[1,"grw-trek-detail",{"trek":[16],"colorPrimary":[1,"color-primary"],"colorPrimaryShade":[1,"color-primary-shade"],"colorPrimaryTint":[1,"color-primary-tint"],"difficulty":[32],"route":[32],"practice":[32],"themes":[32],"labels":[32],"sources":[32],"accessibilities":[32],"accessibilityLevel":[32],"currentTrek":[32]}],[1,"grw-treks-list",{"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"isLargeView":[4,"is-large-view"],"treksToDisplay":[32]}],[1,"grw-filter",{"filterType":[1,"filter-type"],"filterName":[1,"filter-name"],"filterNameProperty":[1,"filter-name-property"]}],[0,"grw-map",{"urlLayer":[1,"url-layer"],"attribution":[1],"center":[1],"zoom":[2],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"mapIsReady":[32]}],[1,"grw-trek-provider",{"language":[1],"api":[1],"trekId":[1,"trek-id"]}],[1,"grw-treks-provider",{"language":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1]}]]],["grw-app",[[1,"grw-app",{"api":[1],"language":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1],"urlLayer":[1,"url-layer"],"center":[1],"zoom":[2],"attribution":[1],"colorPrimary":[1,"color-primary"],"colorPrimaryShade":[1,"color-primary-shade"],"colorPrimaryTint":[1,"color-primary-tint"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"showTrek":[32],"showTreksMap":[32],"showTrekMap":[32],"showFilters":[32],"isLargeView":[32],"currentTrekId":[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1,4 +1,4 @@
1
- import { a as getRenderingRef, f as forceUpdate } from './index-192d910f.js';
1
+ import { a as getRenderingRef, f as forceUpdate } from './index-ee473772.js';
2
2
 
3
3
  const appendToMap = (map, propName, value) => {
4
4
  const items = map.get(propName);
@@ -186,9 +186,9 @@ const createStore = (defaultState, shouldUpdate) => {
186
186
 
187
187
  const { state, onChange } = createStore({
188
188
  api: '',
189
- treks: [],
190
- currentTreks: [],
191
- treksWithinBounds: [],
189
+ treks: null,
190
+ currentTreks: null,
191
+ treksWithinBounds: null,
192
192
  currentMapTreksBounds: null,
193
193
  difficulties: [],
194
194
  routes: [],
@@ -203,6 +203,8 @@ const { state, onChange } = createStore({
203
203
  currentTrek: null,
204
204
  currentPois: null,
205
205
  currentInformationDesks: null,
206
+ treksNetworkError: false,
207
+ trekNetworkError: false,
206
208
  });
207
209
 
208
210
  export { onChange as o, state as s };
@@ -1 +1 @@
1
- import{p as r,b as o}from"./p-6dce5e6c.js";(()=>{const o=import.meta.url,e={};return""!==o&&(e.resourcesUrl=new URL(".",o).href),r(e)})().then((r=>o([["p-1b2ba86d",[[1,"grw-trek-card",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],currentTrek:[32],difficulty:[32],route:[32],practice:[32],themes:[32]}]]],["p-7715153d",[[1,"grw-information-desk-detail",{informationDesk:[16]}],[1,"grw-poi-detail",{poi:[16]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}]]],["p-4361afd2",[[1,"grw-trek-detail",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],difficulty:[32],route:[32],practice:[32],themes:[32],labels:[32],sources:[32],accessibilities:[32],accessibilityLevel:[32],currentTrek:[32]}],[1,"grw-treks-list",{colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],treksToDisplay:[32]}],[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterNameProperty:[1,"filter-name-property"]}],[0,"grw-map",{urlLayer:[1,"url-layer"],attribution:[1],center:[1],zoom:[2],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],mapIsReady:[32]}],[1,"grw-trek-provider",{language:[1],api:[1],trekId:[1,"trek-id"]}],[1,"grw-treks-provider",{language:[1],api:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1]}]]],["p-5f17d340",[[1,"grw-app",{api:[1],language:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1],urlLayer:[1,"url-layer"],center:[1],zoom:[8],attribution:[1],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],showTrek:[32],showTreksMap:[32],showTrekMap:[32],showFilters:[32],isLargeView:[32],currentTrekId:[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]]]]],r)));
1
+ import{p as r,b as o}from"./p-b62909db.js";(()=>{const o=import.meta.url,e={};return""!==o&&(e.resourcesUrl=new URL(".",o).href),r(e)})().then((r=>o([["p-500436f1",[[1,"grw-trek-card",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],currentTrek:[32],difficulty:[32],route:[32],practice:[32],themes:[32]}]]],["p-0510e16b",[[1,"grw-information-desk-detail",{informationDesk:[16]}],[1,"grw-poi-detail",{poi:[16]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}]]],["p-9a25f817",[[1,"grw-trek-detail",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],difficulty:[32],route:[32],practice:[32],themes:[32],labels:[32],sources:[32],accessibilities:[32],accessibilityLevel:[32],currentTrek:[32]}],[1,"grw-treks-list",{colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],treksToDisplay:[32]}],[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterNameProperty:[1,"filter-name-property"]}],[0,"grw-map",{urlLayer:[1,"url-layer"],attribution:[1],center:[1],zoom:[2],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],mapIsReady:[32]}],[1,"grw-trek-provider",{language:[1],api:[1],trekId:[1,"trek-id"]}],[1,"grw-treks-provider",{language:[1],api:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1]}]]],["p-94f0db4d",[[1,"grw-app",{api:[1],language:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1],urlLayer:[1,"url-layer"],center:[1],zoom:[2],attribution:[1],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],showTrek:[32],showTreksMap:[32],showTrekMap:[32],showFilters:[32],isLargeView:[32],currentTrekId:[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]]]]],r)));
@@ -1 +1 @@
1
- import{r as i,h as e,H as s}from"./p-6dce5e6c.js";import{s as t}from"./p-e6710c64.js";const a=class{constructor(e){i(this,e)}render(){return e(s,null,this.informationDesk.photo_url&&e("div",{class:"information-desk-img"},e("img",{src:this.informationDesk.photo_url,loading:"lazy"})),e("div",{class:"information-desk-sub-container"},this.informationDesk.name&&e("div",{class:"information-desk-name"},this.informationDesk.name),this.informationDesk.description&&e("div",{class:"information-desk-description",innerHTML:this.informationDesk.description}),this.informationDesk.postal_code||this.informationDesk.municipality||this.informationDesk.street&&e("div",null,this.informationDesk.postal_code,` ${this.informationDesk.municipality}`,` ${this.informationDesk.street}`),this.informationDesk.phone&&e("div",null,e("a",{href:`tel:${this.informationDesk.phone}`},this.informationDesk.phone)),this.informationDesk.email&&e("div",null,e("a",{href:`mailto:${this.informationDesk.email}`},this.informationDesk.email)),this.informationDesk.website&&e("div",null,e("a",{href:`${this.informationDesk.website}`},this.informationDesk.website))))}};a.style=":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.information-desk-img{width:180px}.information-desk-img img{width:180px;border-radius:8px}.information-desk-sub-container{display:flex;flex-direction:column}.information-desk-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.information-desk-description{font-size:16px}";const r=class{constructor(e){i(this,e)}render(){return e(s,null,this.poi.attachments&&this.poi.attachments[0]&&this.poi.attachments[0].thumbnail&&e("div",{class:"poi-img"},e("img",{src:this.poi.attachments[0].thumbnail,loading:"lazy"})),e("div",{class:"poi-sub-container"},e("div",{class:"poi-name"},this.poi.name),e("div",{class:"poi-description",innerHTML:this.poi.description})))}};r.style=":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.poi-img{width:180px}.poi-img img{width:180px;border-radius:8px}.poi-sub-container{display:flex;flex-direction:column}.poi-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.poi-description{font-size:16px}";const n=class{constructor(e){i(this,e)}render(){return e(s,null,e("div",{class:"sensitive-area-title"},this.sensitiveArea.name),e("div",{class:"sensitive-area-description",innerHTML:this.sensitiveArea.description}),this.sensitiveArea.practices&&this.sensitiveArea.practices.length>0&&e("div",{class:"sensitive-area-practice-container"},e("div",{class:"sensitive-area-practice-title"},"Domaines d'activités concernés :"),e("div",{class:"sensitive-area-practice-values"},this.sensitiveArea.practices.map(((i,s)=>e("div",{innerHTML:`${t.practices.find((e=>e.id===i)).name.toUpperCase()}${s+1!==this.sensitiveArea.practices.length?" - ":""}`}))))),this.sensitiveArea.period&&this.sensitiveArea.period.length>0&&e("div",{class:"sensitive-area-period-container"},e("div",{class:"sensitive-area-period-title"},"Périodes de sensibilité"),e("div",{class:"sensitive-area-period-values"},this.sensitiveArea.period.map(((i,s)=>{if(i)return e("div",{innerHTML:`${new Date(0,s+1,0).toLocaleDateString("fr",{month:"long"}).toUpperCase()}${this.sensitiveArea.period.slice(s+1).find((i=>i))?" - ":""}`})})))),e("div",{class:"sensitive-area-contact-container"},e("div",{class:"sensitive-area-contact-title"},"Contact"),e("div",{innerHTML:this.sensitiveArea.contact,class:"sensitive-area-contact-value"})))}};n.style=":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.sensitive-area-title{color:var(--color-primary);font-size:24px;padding:12px 0px;font-weight:bold}.sensitive-area-description{font-size:16px}.sensitive-area-period-container .sensitive-area-period-title,.sensitive-area-period-container .sensitive-area-practice-title,.sensitive-area-period-container .sensitive-area-contact-title,.sensitive-area-practice-container .sensitive-area-period-title,.sensitive-area-practice-container .sensitive-area-practice-title,.sensitive-area-practice-container .sensitive-area-contact-title,.sensitive-area-contact-container .sensitive-area-period-title,.sensitive-area-contact-container .sensitive-area-practice-title,.sensitive-area-contact-container .sensitive-area-contact-title{color:var(--color-primary);font-size:24px;padding:12px 0px}.sensitive-area-period-container .sensitive-area-period-values,.sensitive-area-period-container .sensitive-area-practice-values,.sensitive-area-practice-container .sensitive-area-period-values,.sensitive-area-practice-container .sensitive-area-practice-values,.sensitive-area-contact-container .sensitive-area-period-values,.sensitive-area-contact-container .sensitive-area-practice-values{display:flex}";export{a as grw_information_desk_detail,r as grw_poi_detail,n as grw_sensitive_area_detail}
1
+ import{r as i,h as e,H as s}from"./p-b62909db.js";import{s as t}from"./p-22562f4d.js";const a=class{constructor(e){i(this,e)}render(){return e(s,null,this.informationDesk.photo_url&&e("div",{class:"information-desk-img"},e("img",{src:this.informationDesk.photo_url,loading:"lazy"})),e("div",{class:"information-desk-sub-container"},this.informationDesk.name&&e("div",{class:"information-desk-name"},this.informationDesk.name),this.informationDesk.description&&e("div",{class:"information-desk-description",innerHTML:this.informationDesk.description}),this.informationDesk.postal_code||this.informationDesk.municipality||this.informationDesk.street&&e("div",null,this.informationDesk.postal_code,` ${this.informationDesk.municipality}`,` ${this.informationDesk.street}`),this.informationDesk.phone&&e("div",null,e("a",{href:`tel:${this.informationDesk.phone}`},this.informationDesk.phone)),this.informationDesk.email&&e("div",null,e("a",{href:`mailto:${this.informationDesk.email}`},this.informationDesk.email)),this.informationDesk.website&&e("div",null,e("a",{href:`${this.informationDesk.website}`},this.informationDesk.website))))}};a.style=":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.information-desk-img{width:180px}.information-desk-img img{width:180px;border-radius:8px}.information-desk-sub-container{display:flex;flex-direction:column}.information-desk-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.information-desk-description{font-size:16px}";const r=class{constructor(e){i(this,e)}render(){return e(s,null,this.poi.attachments&&this.poi.attachments[0]&&this.poi.attachments[0].thumbnail&&e("div",{class:"poi-img"},e("img",{src:this.poi.attachments[0].thumbnail,loading:"lazy"})),e("div",{class:"poi-sub-container"},e("div",{class:"poi-name"},this.poi.name),e("div",{class:"poi-description",innerHTML:this.poi.description})))}};r.style=":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.poi-img{width:180px}.poi-img img{width:180px;border-radius:8px}.poi-sub-container{display:flex;flex-direction:column}.poi-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.poi-description{font-size:16px}";const n=class{constructor(e){i(this,e)}render(){return e(s,null,e("div",{class:"sensitive-area-title"},this.sensitiveArea.name),e("div",{class:"sensitive-area-description",innerHTML:this.sensitiveArea.description}),this.sensitiveArea.practices&&this.sensitiveArea.practices.length>0&&e("div",{class:"sensitive-area-practice-container"},e("div",{class:"sensitive-area-practice-title"},"Domaines d'activités concernés :"),e("div",{class:"sensitive-area-practice-values"},this.sensitiveArea.practices.map(((i,s)=>e("div",{innerHTML:`${t.practices.find((e=>e.id===i)).name.toUpperCase()}${s+1!==this.sensitiveArea.practices.length?" - ":""}`}))))),this.sensitiveArea.period&&this.sensitiveArea.period.length>0&&e("div",{class:"sensitive-area-period-container"},e("div",{class:"sensitive-area-period-title"},"Périodes de sensibilité"),e("div",{class:"sensitive-area-period-values"},this.sensitiveArea.period.map(((i,s)=>{if(i)return e("div",{innerHTML:`${new Date(0,s+1,0).toLocaleDateString("fr",{month:"long"}).toUpperCase()}${this.sensitiveArea.period.slice(s+1).find((i=>i))?" - ":""}`})})))),e("div",{class:"sensitive-area-contact-container"},e("div",{class:"sensitive-area-contact-title"},"Contact"),e("div",{innerHTML:this.sensitiveArea.contact,class:"sensitive-area-contact-value"})))}};n.style=":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.sensitive-area-title{color:var(--color-primary);font-size:24px;padding:12px 0px;font-weight:bold}.sensitive-area-description{font-size:16px}.sensitive-area-period-container .sensitive-area-period-title,.sensitive-area-period-container .sensitive-area-practice-title,.sensitive-area-period-container .sensitive-area-contact-title,.sensitive-area-practice-container .sensitive-area-period-title,.sensitive-area-practice-container .sensitive-area-practice-title,.sensitive-area-practice-container .sensitive-area-contact-title,.sensitive-area-contact-container .sensitive-area-period-title,.sensitive-area-contact-container .sensitive-area-practice-title,.sensitive-area-contact-container .sensitive-area-contact-title{color:var(--color-primary);font-size:24px;padding:12px 0px}.sensitive-area-period-container .sensitive-area-period-values,.sensitive-area-period-container .sensitive-area-practice-values,.sensitive-area-practice-container .sensitive-area-period-values,.sensitive-area-practice-container .sensitive-area-practice-values,.sensitive-area-contact-container .sensitive-area-period-values,.sensitive-area-contact-container .sensitive-area-practice-values{display:flex}";export{a as grw_information_desk_detail,r as grw_poi_detail,n as grw_sensitive_area_detail}
@@ -0,0 +1 @@
1
+ import{a as e,f as t}from"./p-b62909db.js";const s=e=>!("isConnected"in e)||e.isConnected,r=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),{state:n,onChange:o}=(()=>{const s=((e,t=((e,t)=>e!==t))=>{let s=new Map(Object.entries(null!=e?e:{}));const r={dispose:[],get:[],set:[],reset:[]},n=()=>{s=new Map(Object.entries(null!=e?e:{})),r.reset.forEach((e=>e()))},o=e=>(r.get.forEach((t=>t(e))),s.get(e)),l=(e,n)=>{const o=s.get(e);t(n,o,e)&&(s.set(e,n),r.set.forEach((t=>t(e,n,o))))},u="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>o(t),ownKeys:()=>Array.from(s.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>s.has(t),set:(e,t,s)=>(l(t,s),!0)}),i=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(r[e],t)});return{state:u,get:o,set:l,on:i,onChange:(t,s)=>{const r=i("set",((e,r)=>{e===t&&s(r)})),n=i("reset",(()=>s(e[t])));return()=>{r(),n()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(i("set",t.set)),t.get&&e.push(i("get",t.get)),t.reset&&e.push(i("reset",t.reset)),t.dispose&&e.push(i("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{r.dispose.forEach((e=>e())),n()},reset:n,forceUpdate:e=>{const t=s.get(e);r.set.forEach((s=>s(e,t,t)))}}})({api:"",treks:null,currentTreks:null,treksWithinBounds:null,currentMapTreksBounds:null,difficulties:[],routes:[],practices:[],themes:[],durations:[],currentSensitiveAreas:null,labels:null,sources:null,accessibilities:null,accessibilitiesLevel:null,currentTrek:null,currentPois:null,currentInformationDesks:null,treksNetworkError:!1,trekNetworkError:!1},void 0);return s.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const r=e();r&&((e,t,s)=>{const r=e.get(t);r?r.includes(s)||r.push(s):e.set(t,[s])})(s,t,r)},set:e=>{const n=s.get(e);n&&s.set(e,n.filter(t)),r(s)},reset:()=>{s.forEach((e=>e.forEach(t))),r(s)}}})()),s})();export{o,n as s}
@@ -1 +1 @@
1
- import{r as i,c as r,h as e,H as n}from"./p-6dce5e6c.js";import{s as t,o as a}from"./p-e6710c64.js";import{d as c,f as o,l as s,a as l,b as d,c as h}from"./p-f3f7d6be.js";const b=class{constructor(e){i(this,e),this.trekCardPress=r(this,"trekCardPress",7),this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.isLargeView=!1}componentWillLoad(){this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id)))),a("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id))))}))}render(){var i,r,t,a,b,v,g,u;return e(n,{onClick:()=>this.trekCardPress.emit(this.currentTrek.id),style:{width:this.isLargeView?"100%":"auto","--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&e("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container"},this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].thumbnail&&e("img",{class:"image",src:`${this.currentTrek.attachments[0].thumbnail}`,loading:"lazy"}),e("div",{class:"sub-container"},e("div",{class:"departure"},null===(i=this.currentTrek)||void 0===i?void 0:i.departure),e("div",{class:"name"},null===(r=this.currentTrek)||void 0===r?void 0:r.name),e("div",{class:"themes-container"},this.themes.map((i=>e("div",{class:"theme"},i.label)))),e("div",{class:"icons-labels-container"},e("div",{class:"row"},e("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&e("img",{src:this.difficulty.pictogram}),null===(a=this.difficulty)||void 0===a?void 0:a.label),e("div",{class:"icon-label duration"},e("div",{class:"svg-icon",innerHTML:c}),o(this.currentTrek.duration))),e("div",{class:"row"},e("div",{class:"icon-label length"},e("div",{class:"svg-icon",innerHTML:s}),l(this.currentTrek.length_2d)),e("div",{class:"icon-label ascent"},e("div",{class:"svg-icon",innerHTML:d}),h(this.currentTrek.ascent))),e("div",{class:"row"},e("div",{class:"icon-label route"},(null===(b=this.route)||void 0===b?void 0:b.pictogram)&&e("img",{src:this.route.pictogram}),null===(v=this.route)||void 0===v?void 0:v.route),e("div",{class:"icon-label practice"},(null===(g=this.practice)||void 0===g?void 0:g.pictogram)&&e("img",{src:this.practice.pictogram}),null===(u=this.practice)||void 0===u?void 0:u.name))))))}};b.style='.trek-card-container,.trek-card-large-view-container{font-family:"Roboto";border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image,.trek-card-large-view-container .image{object-fit:cover}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:flex;flex-direction:column;justify-content:center;padding:12px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:rgba(0, 0, 0, 0.7);font-size:16px;margin:4px 0px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:flex;justify-content:flex-start;align-items:center;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-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;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:flex;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 .svg-icon svg,.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 .svg-icon svg{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)}.trek-card-container{width:350px;height:auto}.trek-card-container .image{width:100%}.trek-card-large-view-container{height:auto;display:flex;flex-direction:row}.trek-card-large-view-container .image{width:250px}';export{b as grw_trek_card}
1
+ import{r as i,c as r,h as e,H as n}from"./p-b62909db.js";import{s as t,o as a}from"./p-22562f4d.js";import{d as c,f as o,l as s,a as l,b as d,c as h}from"./p-f3f7d6be.js";const b=class{constructor(e){i(this,e),this.trekCardPress=r(this,"trekCardPress",7),this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.isLargeView=!1}connectedCallback(){this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id)))),a("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id))))}))}render(){var i,r,t,a,b,v,g,u;return e(n,{onClick:()=>this.trekCardPress.emit(this.currentTrek.id),style:{width:this.isLargeView?"100%":"auto","--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&e("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container"},this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].thumbnail&&e("img",{class:"image",src:`${this.currentTrek.attachments[0].thumbnail}`,loading:"lazy"}),e("div",{class:"sub-container"},e("div",{class:"departure"},null===(i=this.currentTrek)||void 0===i?void 0:i.departure),e("div",{class:"name"},null===(r=this.currentTrek)||void 0===r?void 0:r.name),e("div",{class:"themes-container"},this.themes.map((i=>e("div",{class:"theme"},i.label)))),e("div",{class:"icons-labels-container"},e("div",{class:"row"},e("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&e("img",{src:this.difficulty.pictogram}),null===(a=this.difficulty)||void 0===a?void 0:a.label),e("div",{class:"icon-label duration"},e("div",{class:"svg-icon",innerHTML:c}),o(this.currentTrek.duration))),e("div",{class:"row"},e("div",{class:"icon-label length"},e("div",{class:"svg-icon",innerHTML:s}),l(this.currentTrek.length_2d)),e("div",{class:"icon-label ascent"},e("div",{class:"svg-icon",innerHTML:d}),h(this.currentTrek.ascent))),e("div",{class:"row"},e("div",{class:"icon-label route"},(null===(b=this.route)||void 0===b?void 0:b.pictogram)&&e("img",{src:this.route.pictogram}),null===(v=this.route)||void 0===v?void 0:v.route),e("div",{class:"icon-label practice"},(null===(g=this.practice)||void 0===g?void 0:g.pictogram)&&e("img",{src:this.practice.pictogram}),null===(u=this.practice)||void 0===u?void 0:u.name))))))}};b.style='.trek-card-container,.trek-card-large-view-container{font-family:"Roboto";border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image,.trek-card-large-view-container .image{object-fit:cover}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:flex;flex-direction:column;justify-content:center;padding:12px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:rgba(0, 0, 0, 0.7);font-size:16px;margin:4px 0px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:flex;justify-content:flex-start;align-items:center;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-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;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:flex;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 .svg-icon svg,.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 .svg-icon svg{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)}.trek-card-container{width:350px;height:auto}.trek-card-container .image{width:100%}.trek-card-large-view-container{height:auto;display:flex;flex-direction:row}.trek-card-large-view-container .image{width:250px}';export{b as grw_trek_card}
@@ -0,0 +1 @@
1
+ import{r as i,h as t,H as e,g as r}from"./p-b62909db.js";import{o,s as a}from"./p-22562f4d.js";const n=class{constructor(t){i(this,t),this.showTrek=!1,this.showTreksMap=!1,this.showTrekMap=!1,this.showFilters=!1,this.isLargeView=!1,this.language="fr",this.colorPrimary="#6b0030",this.colorPrimaryShade="#4a0021",this.colorPrimaryTint="#974c6e",this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b",this.colorSensitiveArea="#4974a5",this.colorPoiIcon="#974c6e",this.largeViewSize=1024,this.handlePopStateBind=this.handlePopState.bind(this)}onTrekCardPress(i){this.currentTrekId=i.detail,this.showTrek=!this.showTrek;const t=new URL(window.location.toString());t.searchParams.set("trek",this.currentTrekId.toString()),window.history.pushState({},"",t)}onWindowResize(){this.handleView()}watchPropHandler(){window.dispatchEvent(new window.Event("resize"))}componentDidLoad(){o("trekNetworkError",(()=>{if(a.trekNetworkError){const i=new URL(window.location.toString());i.searchParams.delete("trek"),window.history.replaceState({},"",i),this.onTrekDetailsClose()}})),this.handleView(),window.addEventListener("popstate",this.handlePopStateBind,!1);const i=new URL(window.location.toString()),t=i.searchParams.get("trek");t&&(window.history.replaceState({isInitialHistoryWithTrek:!0},"",i),this.currentTrekId=Number(t),this.showTrek=!this.showTrek)}onTrekDetailsClose(){a.currentTrek=null,this.currentTrekId=null,this.showTrek=!this.showTrek}handleView(){this.isLargeView=this.element.getBoundingClientRect().width>=this.largeViewSize,this.showTreksMap=this.isLargeView,this.showTrekMap=this.isLargeView}handleFilters(){this.showFilters=!this.showFilters}handleBackButton(){if(window.history.state.isInitialHistoryWithTrek){this.onTrekDetailsClose();const i=new URL(window.location.toString());i.searchParams.delete("trek"),window.history.pushState({},"",i)}else window.history.back()}handlePopState(){const i=new URL(window.location.toString()).searchParams.get("trek");i?(this.currentTrekId=Number(i),this.showTrek=!this.showTrek):this.onTrekDetailsClose()}handleShowMap(){this.currentTrekId?this.showTrekMap=!this.showTrekMap:this.showTreksMap=!this.showTreksMap}disconnectedCallback(){window.removeEventListener("popstate",this.handlePopStateBind)}render(){return t(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint,"--color-primary-shade":this.colorPrimaryShade}},t("grw-treks-provider",{api:this.api,language:this.language,"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}),!a.currentTreks&&!a.currentTrek&&t("div",{class:"init-loader-container"},t("span",{class:"loader"})),this.showTrek&&this.currentTrekId&&t("grw-trek-provider",{api:a.api,language:this.language,"trek-id":this.currentTrekId}),(a.currentTreks||a.currentTrek)&&t("div",{class:"app-container"},t("div",{class:this.isLargeView?"large-view-header-container":"header-container"},this.showTrek?t("div",{onClick:()=>this.handleBackButton(),class:"arrow-back-icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="244 400 100 256 244 112" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/><line x1="120" y1="256" x2="412" y2="256" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/></svg>'}):t("div",{class:"handle-filters-container"},t("div",{onClick:()=>this.handleFilters(),class:"handle-filters-button"},"FILTRER"),a.treksWithinBounds&&t("div",{class:"current-treks-within-bounds-length"},`${a.treksWithinBounds.length} randonnée${a.treksWithinBounds.length>1?"s":""}`)),!this.showTrek&&this.showFilters&&t("div",{class:"options-container"},t("div",{class:"filters-container"},t("div",{onClick:()=>this.handleFilters(),class:"close-filters-button"},"X"),t("div",null,t("grw-filter",{filterName:"Pratique",filterType:"practices",filterNameProperty:"name"})),t("div",{class:"filter-margin-top"},t("grw-filter",{filterName:"Difficulté",filterType:"difficulties",filterNameProperty:"label"})),t("div",{class:"filter-margin-top"},t("grw-filter",{filterName:"Durée",filterType:"durations",filterNameProperty:"name"}))),t("div",{onClick:()=>this.handleFilters(),class:"back-filters-container"})),t("div",{class:"attribution-container"},t("a",{target:"_blank",href:"https://geotrek.fr"},"GEOTREK"))),t("div",{class:"content-container"},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",{"is-large-view":this.isLargeView,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint})),this.showTrek&&!a.currentTrek&&t("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},t("span",{class:"loader"})),a.currentTrek&&t("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},t("grw-trek-detail",{"color-primary":this.colorPrimary,"color-primary-shade":this.colorPrimaryShade,"color-primary-tint":this.colorPrimaryTint})),t("grw-map",{class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showTreksMap&&!this.showTrek||this.showTrekMap&&this.showTrek?"visible":"hidden"},"url-layer":this.urlLayer,center:this.center,zoom:this.zoom,attribution:this.attribution,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint,"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})),t("div",{class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},t("div",{onClick:()=>this.handleShowMap()},this.showTrek?this.showTrekMap?"Voir la fiche":"Voir la carte":this.showTreksMap?"Voir la liste":"Voir la carte"))))}get element(){return r(this)}static get watchers(){return{isLargeView:["watchPropHandler"]}}};n.style='.app-container{position:relative;height:100%;max-height:100vh;font-family:"Roboto"}.header-container,.large-view-header-container{display:flex;flex-direction:row;align-items:center;background-color:var(--color-primary);height:64px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{width:48px;height:auto;margin-left:24px}.header-container .arrow-back-icon svg,.large-view-header-container .arrow-back-icon svg{cursor:pointer;width:48px;height:auto}.header-container .handle-filters-container,.large-view-header-container .handle-filters-container{display:flex;align-items:center}.header-container .handle-filters-container .handle-filters-button,.large-view-header-container .handle-filters-container .handle-filters-button{user-select:none;cursor:pointer;color:var(--color-primary);background-color:#ffffff;margin-left:12px;border-radius:8px;padding:8px}.header-container .handle-filters-container .current-treks-within-bounds-length,.large-view-header-container .handle-filters-container .current-treks-within-bounds-length{margin-left:12px;color:#ffffff}.header-container .attribution-container,.large-view-header-container .attribution-container{position:absolute;right:24px}.header-container .attribution-container a,.large-view-header-container .attribution-container a{color:#ffffff;text-decoration:none}.options-container{height:calc(100% - 64px);position:absolute;width:100%;z-index:1100;top:64px}.filters-container{position:absolute;width:100%;background-color:#ffffff;padding:36px 0px;z-index:1100}.filters-container .close-filters-button{cursor:pointer;font-weight:bold;position:absolute;top:12px;right:12px;padding:12px;border-radius:12px;color:var(--color-primary);border:1px var(--color-primary) solid}.filters-container .close-filters-button:hover{background-color:var(--color-primary);color:#ffffff}.filters-container .filter-margin-top{margin-top:24px}.back-filters-container{background-color:rgba(0, 0, 0, 0.5);width:100%;height:calc(100% - 64px);position:absolute;z-index:1099;top:64px}.init-loader-container,.loader-container,.large-view-loader-container{display:flex;justify-content:center;align-items:center;height:100%}.init-loader-container .loader,.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.content-container{position:relative;display:flex;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%}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:absolute;bottom:24px;width:100%;z-index:400;user-select:none}.map-visibility-button div{background-color:var(--color-primary);color:#ffffff;padding:12px;border-radius:24px;width:120px;text-align:center}.header-container .title{font-size:24px}.init-loader-container,.loader-container{width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}.app-map-container{position:relative;width:100%;position:absolute}.large-view-header-container .title{font-size:32px}.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%}';export{n as grw_app}