@geotrekce/geotrek-rando-widget 0.4.6 → 0.4.7

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 (158) hide show
  1. package/dist/cjs/grw-app.cjs.entry.js +1 -1
  2. package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
  3. package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
  4. package/dist/cjs/grw-filter.cjs.entry.js +1 -1
  5. package/dist/cjs/grw-filter.cjs.entry.js.br +0 -0
  6. package/dist/cjs/grw-filter.cjs.entry.js.gz +0 -0
  7. package/dist/cjs/grw-filters_16.cjs.entry.js +8 -4
  8. package/dist/cjs/grw-filters_16.cjs.entry.js.br +0 -0
  9. package/dist/cjs/grw-filters_16.cjs.entry.js.gz +0 -0
  10. package/dist/cjs/grw-filters_16.cjs.entry.js.map +1 -1
  11. package/dist/cjs/grw-information-desk_6.cjs.entry.js +1 -1
  12. package/dist/cjs/grw-information-desk_6.cjs.entry.js.br +0 -0
  13. package/dist/cjs/grw-information-desk_6.cjs.entry.js.gz +0 -0
  14. package/dist/cjs/{utils-aafb9447.js → utils-f0196a2f.js} +2 -1
  15. package/dist/cjs/utils-f0196a2f.js.br +0 -0
  16. package/dist/cjs/utils-f0196a2f.js.gz +0 -0
  17. package/dist/cjs/utils-f0196a2f.js.map +1 -0
  18. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +1 -1
  19. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
  20. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
  21. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
  22. package/dist/collection/store/grw-trek-provider.js +6 -2
  23. package/dist/collection/store/grw-trek-provider.js.br +0 -0
  24. package/dist/collection/store/grw-trek-provider.js.gz +0 -0
  25. package/dist/collection/store/grw-trek-provider.js.map +1 -1
  26. package/dist/collection/store/store.js +1 -0
  27. package/dist/collection/store/store.js.br +0 -0
  28. package/dist/collection/store/store.js.gz +0 -0
  29. package/dist/collection/store/store.js.map +1 -1
  30. package/dist/collection/stories/App.stories.js +2 -2
  31. package/dist/collection/stories/App.stories.js.br +0 -0
  32. package/dist/collection/stories/App.stories.js.gz +0 -0
  33. package/dist/collection/stories/TrekMap.stories.js +2 -2
  34. package/dist/collection/stories/TrekMap.stories.js.br +0 -0
  35. package/dist/collection/stories/TrekMap.stories.js.gz +0 -0
  36. package/dist/collection/stories/TreksMap.stories.js +2 -2
  37. package/dist/collection/stories/TreksMap.stories.js.br +0 -0
  38. package/dist/collection/stories/TreksMap.stories.js.gz +0 -0
  39. package/dist/collection/types/types.js.map +1 -1
  40. package/dist/esm/grw-app.entry.js +1 -1
  41. package/dist/esm/grw-app.entry.js.br +0 -0
  42. package/dist/esm/grw-app.entry.js.gz +0 -0
  43. package/dist/esm/grw-filter.entry.js +1 -1
  44. package/dist/esm/grw-filter.entry.js.br +0 -0
  45. package/dist/esm/grw-filter.entry.js.gz +0 -0
  46. package/dist/esm/grw-filters_16.entry.js +8 -4
  47. package/dist/esm/grw-filters_16.entry.js.br +0 -0
  48. package/dist/esm/grw-filters_16.entry.js.gz +0 -0
  49. package/dist/esm/grw-filters_16.entry.js.map +1 -1
  50. package/dist/esm/grw-information-desk_6.entry.js +1 -1
  51. package/dist/esm/grw-information-desk_6.entry.js.br +0 -0
  52. package/dist/esm/grw-information-desk_6.entry.js.gz +0 -0
  53. package/dist/esm/{utils-6441a08a.js → utils-2e80d729.js} +2 -1
  54. package/dist/esm/utils-2e80d729.js.br +0 -0
  55. package/dist/esm/utils-2e80d729.js.gz +0 -0
  56. package/dist/esm/utils-2e80d729.js.map +1 -0
  57. package/dist/esm-es5/grw-app.entry.js +1 -1
  58. package/dist/esm-es5/grw-app.entry.js.br +0 -0
  59. package/dist/esm-es5/grw-app.entry.js.gz +0 -0
  60. package/dist/esm-es5/grw-filter.entry.js +1 -1
  61. package/dist/esm-es5/grw-filter.entry.js.br +0 -0
  62. package/dist/esm-es5/grw-filter.entry.js.gz +0 -0
  63. package/dist/esm-es5/grw-filters_16.entry.js +2 -2
  64. package/dist/esm-es5/grw-filters_16.entry.js.br +0 -0
  65. package/dist/esm-es5/grw-filters_16.entry.js.gz +0 -0
  66. package/dist/esm-es5/grw-filters_16.entry.js.map +1 -1
  67. package/dist/esm-es5/grw-information-desk_6.entry.js +1 -1
  68. package/dist/esm-es5/grw-information-desk_6.entry.js.br +0 -0
  69. package/dist/esm-es5/grw-information-desk_6.entry.js.gz +0 -0
  70. package/dist/esm-es5/utils-2e80d729.js +2 -0
  71. package/dist/esm-es5/utils-2e80d729.js.br +0 -0
  72. package/dist/esm-es5/utils-2e80d729.js.gz +0 -0
  73. package/dist/esm-es5/utils-2e80d729.js.map +1 -0
  74. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  75. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
  76. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
  77. package/dist/geotrek-rando-widget/{p-ff607e4b.entry.js → p-0eb7003a.entry.js} +2 -2
  78. package/dist/geotrek-rando-widget/p-0eb7003a.entry.js.br +0 -0
  79. package/dist/geotrek-rando-widget/p-0eb7003a.entry.js.gz +0 -0
  80. package/dist/geotrek-rando-widget/p-20f93123.system.js +2 -0
  81. package/dist/geotrek-rando-widget/p-20f93123.system.js.br +0 -0
  82. package/dist/geotrek-rando-widget/p-20f93123.system.js.gz +0 -0
  83. package/dist/geotrek-rando-widget/p-20f93123.system.js.map +1 -0
  84. package/dist/geotrek-rando-widget/{p-06412985.entry.js → p-34b0e7b0.entry.js} +2 -2
  85. package/dist/geotrek-rando-widget/p-34b0e7b0.entry.js.br +0 -0
  86. package/dist/geotrek-rando-widget/p-34b0e7b0.entry.js.gz +0 -0
  87. package/dist/geotrek-rando-widget/{p-ebadf1e2.system.entry.js → p-6f966493.system.entry.js} +2 -2
  88. package/dist/geotrek-rando-widget/p-6f966493.system.entry.js.br +0 -0
  89. package/dist/geotrek-rando-widget/p-6f966493.system.entry.js.gz +0 -0
  90. package/dist/geotrek-rando-widget/{p-0d8a3c86.system.entry.js → p-c7fe0141.system.entry.js} +2 -2
  91. package/dist/geotrek-rando-widget/p-c7fe0141.system.entry.js.br +0 -0
  92. package/dist/geotrek-rando-widget/p-c7fe0141.system.entry.js.gz +0 -0
  93. package/dist/geotrek-rando-widget/p-cc8a7df2.system.js +1 -1
  94. package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.br +0 -0
  95. package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.gz +0 -0
  96. package/dist/geotrek-rando-widget/{p-01f5ed45.system.entry.js → p-cfb59fc0.system.entry.js} +3 -3
  97. package/dist/geotrek-rando-widget/p-cfb59fc0.system.entry.js.br +0 -0
  98. package/dist/geotrek-rando-widget/p-cfb59fc0.system.entry.js.gz +0 -0
  99. package/dist/geotrek-rando-widget/p-cfb59fc0.system.entry.js.map +1 -0
  100. package/dist/geotrek-rando-widget/p-d24cca7d.js +2 -0
  101. package/dist/geotrek-rando-widget/p-d24cca7d.js.br +0 -0
  102. package/dist/geotrek-rando-widget/p-d24cca7d.js.gz +0 -0
  103. package/dist/geotrek-rando-widget/p-d24cca7d.js.map +1 -0
  104. package/dist/geotrek-rando-widget/{p-e9caba62.entry.js → p-ec3f78e6.entry.js} +3 -3
  105. package/dist/geotrek-rando-widget/p-ec3f78e6.entry.js.br +0 -0
  106. package/dist/geotrek-rando-widget/p-ec3f78e6.entry.js.gz +0 -0
  107. package/dist/geotrek-rando-widget/p-ec3f78e6.entry.js.map +1 -0
  108. package/dist/geotrek-rando-widget/{p-1cfb837f.entry.js → p-f6f46632.entry.js} +2 -2
  109. package/dist/geotrek-rando-widget/p-f6f46632.entry.js.br +0 -0
  110. package/dist/geotrek-rando-widget/p-f6f46632.entry.js.gz +0 -0
  111. package/dist/geotrek-rando-widget/{p-73278096.system.entry.js → p-fe94e7fd.system.entry.js} +2 -2
  112. package/dist/geotrek-rando-widget/p-fe94e7fd.system.entry.js.br +0 -0
  113. package/dist/geotrek-rando-widget/p-fe94e7fd.system.entry.js.gz +0 -0
  114. package/dist/types/store/store.d.ts +3 -1
  115. package/dist/types/types/types.d.ts +6 -0
  116. package/package.json +1 -1
  117. package/dist/cjs/utils-aafb9447.js.br +0 -0
  118. package/dist/cjs/utils-aafb9447.js.gz +0 -0
  119. package/dist/cjs/utils-aafb9447.js.map +0 -1
  120. package/dist/esm/utils-6441a08a.js.br +0 -0
  121. package/dist/esm/utils-6441a08a.js.gz +0 -0
  122. package/dist/esm/utils-6441a08a.js.map +0 -1
  123. package/dist/esm-es5/utils-6441a08a.js +0 -2
  124. package/dist/esm-es5/utils-6441a08a.js.br +0 -0
  125. package/dist/esm-es5/utils-6441a08a.js.gz +0 -0
  126. package/dist/esm-es5/utils-6441a08a.js.map +0 -1
  127. package/dist/geotrek-rando-widget/p-01f5ed45.system.entry.js.br +0 -0
  128. package/dist/geotrek-rando-widget/p-01f5ed45.system.entry.js.gz +0 -0
  129. package/dist/geotrek-rando-widget/p-01f5ed45.system.entry.js.map +0 -1
  130. package/dist/geotrek-rando-widget/p-06412985.entry.js.br +0 -0
  131. package/dist/geotrek-rando-widget/p-06412985.entry.js.gz +0 -0
  132. package/dist/geotrek-rando-widget/p-0d8a3c86.system.entry.js.br +0 -0
  133. package/dist/geotrek-rando-widget/p-0d8a3c86.system.entry.js.gz +0 -0
  134. package/dist/geotrek-rando-widget/p-1cfb837f.entry.js.br +0 -0
  135. package/dist/geotrek-rando-widget/p-1cfb837f.entry.js.gz +0 -0
  136. package/dist/geotrek-rando-widget/p-6f7916db.system.js +0 -2
  137. package/dist/geotrek-rando-widget/p-6f7916db.system.js.br +0 -0
  138. package/dist/geotrek-rando-widget/p-6f7916db.system.js.gz +0 -0
  139. package/dist/geotrek-rando-widget/p-6f7916db.system.js.map +0 -1
  140. package/dist/geotrek-rando-widget/p-73278096.system.entry.js.br +0 -0
  141. package/dist/geotrek-rando-widget/p-73278096.system.entry.js.gz +0 -0
  142. package/dist/geotrek-rando-widget/p-bcac98e0.js +0 -2
  143. package/dist/geotrek-rando-widget/p-bcac98e0.js.br +0 -0
  144. package/dist/geotrek-rando-widget/p-bcac98e0.js.gz +0 -0
  145. package/dist/geotrek-rando-widget/p-bcac98e0.js.map +0 -1
  146. package/dist/geotrek-rando-widget/p-e9caba62.entry.js.br +0 -0
  147. package/dist/geotrek-rando-widget/p-e9caba62.entry.js.gz +0 -0
  148. package/dist/geotrek-rando-widget/p-e9caba62.entry.js.map +0 -1
  149. package/dist/geotrek-rando-widget/p-ebadf1e2.system.entry.js.br +0 -0
  150. package/dist/geotrek-rando-widget/p-ebadf1e2.system.entry.js.gz +0 -0
  151. package/dist/geotrek-rando-widget/p-ff607e4b.entry.js.br +0 -0
  152. package/dist/geotrek-rando-widget/p-ff607e4b.entry.js.gz +0 -0
  153. /package/dist/geotrek-rando-widget/{p-ff607e4b.entry.js.map → p-0eb7003a.entry.js.map} +0 -0
  154. /package/dist/geotrek-rando-widget/{p-06412985.entry.js.map → p-34b0e7b0.entry.js.map} +0 -0
  155. /package/dist/geotrek-rando-widget/{p-ebadf1e2.system.entry.js.map → p-6f966493.system.entry.js.map} +0 -0
  156. /package/dist/geotrek-rando-widget/{p-0d8a3c86.system.entry.js.map → p-c7fe0141.system.entry.js.map} +0 -0
  157. /package/dist/geotrek-rando-widget/{p-1cfb837f.entry.js.map → p-f6f46632.entry.js.map} +0 -0
  158. /package/dist/geotrek-rando-widget/{p-73278096.system.entry.js.map → p-fe94e7fd.system.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,u;n<i;n++){if(u||!(n in t)){if(!u)u=Array.prototype.slice.call(t,0,n);u[n]=t[n]}}return e.concat(u||Array.prototype.slice.call(t))};System.register(["./p-d2c035bc.system.js"],(function(e){"use strict";var t,r;return{setters:[function(e){t=e.c;r=e.f}],execute:function(){e({b:_,d:E,e:P,f:g,g:h,h:C});var n=function(e,t,r){var n=e.get(t);if(!n){e.set(t,[r])}else if(!n.includes(r)){n.push(r)}};var i=function(e,t){var r;return function(){var n=[];for(var i=0;i<arguments.length;i++){n[i]=arguments[i]}if(r){clearTimeout(r)}r=setTimeout((function(){r=0;e.apply(void 0,n)}),t)}};var u=function(e){return!("isConnected"in e)||e.isConnected};var s=i((function(e){for(var t=0,r=e.keys();t<r.length;t++){var n=r[t];e.set(n,e.get(n).filter(u))}}),2e3);var o=function(){if(typeof t!=="function"){return{}}var e=new Map;return{dispose:function(){return e.clear()},get:function(r){var i=t();if(i){n(e,r,i)}},set:function(t){var n=e.get(t);if(n){e.set(t,n.filter(r))}s(e)},reset:function(){e.forEach((function(e){return e.forEach(r)}));s(e)}}};var l=function(e){return typeof e==="function"?e():e};var a=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var r=l(e);var n=new Map(Object.entries(r!==null&&r!==void 0?r:{}));var i={dispose:[],get:[],set:[],reset:[]};var u=function(){var t;n=new Map(Object.entries((t=l(e))!==null&&t!==void 0?t:{}));i.reset.forEach((function(e){return e()}))};var s=function(){i.dispose.forEach((function(e){return e()}));u()};var o=function(e){i.get.forEach((function(t){return t(e)}));return n.get(e)};var a=function(e,r){var u=n.get(e);if(t(r,u,e)){n.set(e,r);i.set.forEach((function(t){return t(e,r,u)}))}};var f=typeof Proxy==="undefined"?{}:new Proxy(r,{get:function(e,t){return o(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return n.has(t)},set:function(e,t,r){a(t,r);return true}});var p=function(e,t){i[e].push(t);return function(){c(i[e],t)}};var y=function(t,r){var n=p("set",(function(e,n){if(e===t){r(n)}}));var i=p("reset",(function(){return r(l(e)[t])}));return function(){n();i()}};var v=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r=e.reduce((function(e,t){if(t.set){e.push(p("set",t.set))}if(t.get){e.push(p("get",t.get))}if(t.reset){e.push(p("reset",t.reset))}if(t.dispose){e.push(p("dispose",t.dispose))}return e}),[]);return function(){return r.forEach((function(e){return e()}))}};var d=function(e){var t=n.get(e);i.set.forEach((function(r){return r(e,t,t)}))};return{state:f,get:o,set:a,on:p,onChange:y,use:v,dispose:s,reset:u,forceUpdate:d}};var c=function(e,t){var r=e.indexOf(t);if(r>=0){e[r]=e[e.length-1];e.length--}};var f=function(e,t){var r=a(e,t);r.use(o());return r};var p=f({mode:null,api:null,languages:null,language:null,treks:null,currentTreks:null,treksWithinBounds:null,currentMapBounds:null,difficulties:null,routes:null,practices:null,themes:null,cities:null,durations:null,lengths:null,elevations:null,currentSensitiveAreas:null,labels:null,districts:null,sources:null,ratings:null,accessibilities:null,accessibilitiesLevel:null,poiTypes:null,currentTrek:null,currentPois:null,currentInformationDesks:null,treksNetworkError:false,trekNetworkError:false,searchValue:null,selectedActivitiesFilters:0,selectedThemesFilters:0,selectedLocationFilters:0,selectedTrekId:null,parentTrekId:null,parentTrek:null,currentTrekSteps:null,selectedStepId:null,trekTouristicContents:null,touristicContents:null,currentTouristicContents:null,touristicContentsWithinBounds:null,touristicContentCategories:null,currentTouristicContent:null,touristicEvents:null,currentTouristicEvents:null,touristicEventsWithinBounds:null,touristicEventTypes:null,currentTouristicEvent:null,selectedTouristicContentId:null,selectedTouristicEventId:null}),y=p.state,v=p.onChange,d=p.reset;e({s:y,o:v,r:d});function g(e){var t;if(e<24){t="".concat(Math.floor(e),"h");if(e%1>0){t+="".concat(Math.round(60*(e%1)),"min")}}else{t="".concat(e/24,"j")}return t}function P(e){return"".concat(Math.round(e/1e3),"km")}function h(e){return"".concat(e,"m")}var m=e("t",[{property:"practices",trekProperty:"practice",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"difficulties",trekProperty:"difficulty",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"durations",trekProperty:"duration",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"lengths",trekProperty:"length_2d",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"elevations",trekProperty:"ascent",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"routes",trekProperty:"route",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"accessibilities",trekProperty:"accessibilities",trekPropertyIsArray:true,type:"include",segment:"selectedActivitiesFilters"},{property:"labels",trekProperty:"labels",trekPropertyIsArray:true,type:"include",segment:"selectedActivitiesFilters"},{property:"themes",trekProperty:"themes",trekPropertyIsArray:true,type:"include",segment:"selectedThemesFilters"},{property:"cities",trekProperty:"cities",trekPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",trekProperty:"districts",trekPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}]);var A=e("a",[{property:"touristicContentCategories",touristicContentProperty:"category",touristicContentPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"cities",touristicContentProperty:"cities",touristicContentPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",touristicContentProperty:"districts",touristicContentPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}]);var k=e("c",[{property:"touristicEventTypes",touristicEventProperty:"type",touristicEventPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"cities",touristicEventProperty:"cities",touristicEventPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",touristicEventProperty:"districts",touristicEventPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}]);function C(){var e=false;var t=[];var r=function(r){var n=y[r.property].filter((function(e){return e.selected})).map((function(e){return e.id}));if(n.length>0){if(t.length>0){if(r.type==="include"){if(r.trekPropertyIsArray){t=__spreadArray([],t.filter((function(e){return e[r.trekProperty].some((function(e){return n.includes(e)}))})),true)}else{t=__spreadArray([],t.filter((function(e){return n.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){t=__spreadArray([],t.filter((function(e){var t=function(t){var n=y[r.property].find((function(e){return e.id===t}));if(e[r.trekProperty]>=n.minValue&&e[r.trekProperty]<=n.maxValue){return{value:true}}};for(var i=0,u=n;i<u.length;i++){var s=u[i];var o=t(s);if(typeof o==="object")return o.value}return false})),true)}}else{if(!e){e=true}if(r.type==="include"){if(r.trekPropertyIsArray){t=__spreadArray([],y.treks.filter((function(e){return e[r.trekProperty].some((function(e){return n.includes(e)}))})),true)}else{t=__spreadArray([],y.treks.filter((function(e){return n.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){var i;var u;var s=function(e){var t=y[r.property].find((function(t){return t.id===e}));if(isNaN(i)||t.minValue<i){i=t.minValue}if(isNaN(u)||t.maxValue>u){u=t.maxValue}};for(var o=0,l=n;o<l.length;o++){var a=l[o];s(a)}t=__spreadArray([],y.treks.filter((function(e){return e[r.trekProperty]>=i&&e[r.trekProperty]<=u})),true)}}}};for(var n=0,i=m;n<i.length;n++){var u=i[n];r(u)}var s=e?t:y.treks;return Boolean(y.searchValue)?s.filter((function(e){return e.name.toLowerCase().includes(y.searchValue.toLowerCase())})):s}function _(){var e=false;var t=[];var r=function(r){var n=y[r.property].filter((function(e){return e.selected})).map((function(e){return e.id}));if(n.length>0){if(t.length>0){if(r.type==="include"){if(r.touristicContentPropertyIsArray){t=__spreadArray([],t.filter((function(e){return e[r.touristicContentProperty].some((function(e){return n.includes(e)}))})),true)}else{t=__spreadArray([],t.filter((function(e){return n.includes(e[r.touristicContentProperty])})),true)}}else if(r.type==="interval"){t=__spreadArray([],t.filter((function(e){var t=function(t){var n=y[r.property].find((function(e){return e.id===t}));if(e[r.touristicContentProperty]>=n.minValue&&e[r.touristicContentProperty]<=n.maxValue){return{value:true}}};for(var i=0,u=n;i<u.length;i++){var s=u[i];var o=t(s);if(typeof o==="object")return o.value}return false})),true)}}else{if(!e){e=true}if(r.type==="include"){if(r.touristicContentPropertyIsArray){t=__spreadArray([],y.touristicContents.filter((function(e){return e[r.touristicContentProperty].some((function(e){return n.includes(e)}))})),true)}else{t=__spreadArray([],y.touristicContents.filter((function(e){return n.includes(e[r.touristicContentProperty])})),true)}}else if(r.type==="interval"){var i;var u;var s=function(e){var t=y[r.property].find((function(t){return t.id===e}));if(isNaN(i)||t.minValue<i){i=t.minValue}if(isNaN(u)||t.maxValue>u){u=t.maxValue}};for(var o=0,l=n;o<l.length;o++){var a=l[o];s(a)}t=__spreadArray([],y.touristicContents.filter((function(e){return e[r.touristicContentProperty]>=i&&e[r.touristicContentProperty]<=u})),true)}}}};for(var n=0,i=A;n<i.length;n++){var u=i[n];r(u)}var s=e?t:y.touristicContents;return Boolean(y.searchValue)?s.filter((function(e){return e.name.toLowerCase().includes(y.searchValue.toLowerCase())})):s}function E(){var e=false;var t=[];var r=function(r){var n=y[r.property].filter((function(e){return e.selected})).map((function(e){return e.id}));if(n.length>0){if(t.length>0){if(r.type==="include"){if(r.touristicEventPropertyIsArray){t=__spreadArray([],t.filter((function(e){return e[r.touristicEventProperty].some((function(e){return n.includes(e)}))})),true)}else{t=__spreadArray([],t.filter((function(e){return n.includes(e[r.touristicEventProperty])})),true)}}else if(r.type==="interval"){t=__spreadArray([],t.filter((function(e){var t=function(t){var n=y[r.property].find((function(e){return e.id===t}));if(e[r.touristicEventProperty]>=n.minValue&&e[r.touristicEventProperty]<=n.maxValue){return{value:true}}};for(var i=0,u=n;i<u.length;i++){var s=u[i];var o=t(s);if(typeof o==="object")return o.value}return false})),true)}}else{if(!e){e=true}if(r.type==="include"){if(r.touristicEventPropertyIsArray){t=__spreadArray([],y.touristicContents.filter((function(e){return e[r.touristicEventProperty].some((function(e){return n.includes(e)}))})),true)}else{t=__spreadArray([],y.touristicEvents.filter((function(e){return n.includes(e[r.touristicEventProperty])})),true)}}else if(r.type==="interval"){var i;var u;var s=function(e){var t=y[r.property].find((function(t){return t.id===e}));if(isNaN(i)||t.minValue<i){i=t.minValue}if(isNaN(u)||t.maxValue>u){u=t.maxValue}};for(var o=0,l=n;o<l.length;o++){var a=l[o];s(a)}t=__spreadArray([],y.touristicEvents.filter((function(e){return e[r.touristicEventProperty]>=i&&e[r.touristicEventProperty]<=u})),true)}}}};for(var n=0,i=k;n<i.length;n++){var u=i[n];r(u)}var s=e?t:y.touristicEvents;return Boolean(y.searchValue)?s.filter((function(e){return e.name.toLowerCase().includes(y.searchValue.toLowerCase())})):s}}}}));
2
- //# sourceMappingURL=p-6f7916db.system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","_i","arguments","length","clearTimeout","setTimeout","apply","isConnected","maybeElement","cleanupElements","_b","keys","key","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","createStore","mode","api","languages","language","treks","currentTreks","treksWithinBounds","currentMapBounds","difficulties","routes","practices","themes","cities","durations","lengths","elevations","currentSensitiveAreas","labels","districts","sources","ratings","accessibilities","accessibilitiesLevel","poiTypes","currentTrek","currentPois","currentInformationDesks","treksNetworkError","trekNetworkError","searchValue","selectedActivitiesFilters","selectedThemesFilters","selectedLocationFilters","selectedTrekId","parentTrekId","parentTrek","currentTrekSteps","selectedStepId","trekTouristicContents","touristicContents","currentTouristicContents","touristicContentsWithinBounds","touristicContentCategories","currentTouristicContent","touristicEvents","currentTouristicEvents","touristicEventsWithinBounds","touristicEventTypes","currentTouristicEvent","selectedTouristicContentId","selectedTouristicEventId","exports","s","o","r","formatDuration","duration","formattedDuration","concat","Math","floor","round","formatLength","formatAscent","ascent","treksFilters","property","trekProperty","trekPropertyIsArray","type","segment","touristicContentsFilters","touristicContentProperty","touristicContentPropertyIsArray","touristicEventsFilters","touristicEventProperty","touristicEventPropertyIsArray","handleTreksFiltersAndSearch","isUsingFilter","filtersTreks","currentFiltersId","currentFilter","selected","id","__spreadArray","trek","some","currentFilterId","find","minValue","maxValue","currentFiltersId_2","minValue_1","maxValue_1","isNaN","currentFiltersId_1","treksFilters_1","searchTreks","Boolean","name","toLowerCase","handleTouristicContentsFiltersAndSearch","filtersTouristicContents","touristicContent","currentFiltersId_4","minValue_2","maxValue_2","currentFiltersId_3","touristicContentsFilters_1","searchTouristicContents","handleTouristicEventsFiltersAndSearch","filtersTouristicEvents","currentFiltersId_6","minValue_3","maxValue_3","currentFiltersId_5","touristicEvent","touristicEventsFilters_1","searchTouristicEvents"],"sources":["node_modules/@stencil/store/dist/index.mjs","src/store/store.ts","src/utils/utils.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { LatLngBounds } from 'leaflet';\nimport {\n Accessibilities,\n accessibilitiesLevel,\n Difficulties,\n Durations,\n InformationDesks,\n Labels,\n Pois,\n PoiTypes,\n Practices,\n Routes,\n SensitiveAreas,\n Sources,\n Themes,\n Cities,\n Trek,\n Treks,\n Lengths,\n Elevations,\n Districts,\n TouristicContents,\n TouristicContentCategories,\n TouristicContent,\n TouristicEvents,\n TouristicEventTypes,\n TouristicEvent,\n Ratings,\n} from 'types/types';\n\nconst { state, onChange, reset } = createStore<{\n mode: string;\n api: string;\n languages: string[];\n language: string;\n treks: Treks;\n treksWithinBounds: Treks;\n currentMapBounds: LatLngBounds;\n currentTreks: Treks;\n difficulties: Difficulties;\n routes: Routes;\n practices: Practices;\n themes: Themes;\n cities: Cities;\n durations: Durations;\n lengths: Lengths;\n elevations: Elevations;\n labels: Labels;\n districts: Districts;\n sources: Sources;\n ratings: Ratings;\n accessibilities: Accessibilities;\n accessibilitiesLevel: accessibilitiesLevel;\n poiTypes: PoiTypes;\n currentTrek: Trek;\n currentSensitiveAreas: SensitiveAreas;\n currentPois: Pois;\n currentInformationDesks: InformationDesks;\n treksNetworkError: boolean;\n trekNetworkError: boolean;\n searchValue: string;\n selectedActivitiesFilters: number;\n selectedThemesFilters: number;\n selectedLocationFilters: number;\n selectedTrekId: number;\n parentTrekId: number;\n parentTrek: Trek;\n currentTrekSteps: Treks;\n selectedStepId: number;\n trekTouristicContents: TouristicContents;\n touristicContents: TouristicContents;\n currentTouristicContents: TouristicContents;\n touristicContentsWithinBounds: TouristicContents;\n touristicContentCategories: TouristicContentCategories;\n currentTouristicContent: TouristicContent;\n touristicEvents: TouristicEvents;\n currentTouristicEvents: TouristicEvents;\n touristicEventsWithinBounds: TouristicEvents;\n touristicEventTypes: TouristicEventTypes;\n currentTouristicEvent: TouristicEvent;\n selectedTouristicContentId: number;\n selectedTouristicEventId: number;\n}>({\n mode: null,\n api: null,\n languages: null,\n language: null,\n treks: null,\n currentTreks: null,\n treksWithinBounds: null,\n currentMapBounds: null,\n difficulties: null,\n routes: null,\n practices: null,\n themes: null,\n cities: null,\n durations: null,\n lengths: null,\n elevations: null,\n currentSensitiveAreas: null,\n labels: null,\n districts: null,\n sources: null,\n ratings: null,\n accessibilities: null,\n accessibilitiesLevel: null,\n poiTypes: null,\n currentTrek: null,\n currentPois: null,\n currentInformationDesks: null,\n treksNetworkError: false,\n trekNetworkError: false,\n searchValue: null,\n selectedActivitiesFilters: 0,\n selectedThemesFilters: 0,\n selectedLocationFilters: 0,\n selectedTrekId: null,\n parentTrekId: null,\n parentTrek: null,\n currentTrekSteps: null,\n selectedStepId: null,\n trekTouristicContents: null,\n touristicContents: null,\n currentTouristicContents: null,\n touristicContentsWithinBounds: null,\n touristicContentCategories: null,\n currentTouristicContent: null,\n touristicEvents: null,\n currentTouristicEvents: null,\n touristicEventsWithinBounds: null,\n touristicEventTypes: null,\n currentTouristicEvent: null,\n selectedTouristicContentId: null,\n selectedTouristicEventId: null,\n});\n\nexport { onChange, reset };\n\nexport default state;\n","import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TouristicEvents, TouristicEventsFilters, TrekFilters, 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 const treksFilters: TrekFilters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include', segment: 'selectedThemesFilters' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicContentsFilters: TouristicContentsFilters = [\n { property: 'touristicContentCategories', touristicContentProperty: 'category', touristicContentPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicContentProperty: 'cities', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicContentProperty: 'districts', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicEventsFilters: TouristicEventsFilters = [\n { property: 'touristicEventTypes', touristicEventProperty: 'type', touristicEventPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicEventProperty: 'cities', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicEventProperty: 'districts', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport function handleTreksFiltersAndSearch(): Treks {\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of treksFilters) {\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 = [...filtersTreks.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\nexport function handleTouristicContentsFiltersAndSearch(): TouristicContents {\n let isUsingFilter = false;\n let filtersTouristicContents = [];\n for (const filter of touristicContentsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicContents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...filtersTouristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicContentProperty] >= currentFilter.minValue && touristicContent[filter.touristicContentProperty] <= 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.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...state.touristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\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 filtersTouristicContents = [\n ...state.touristicContents.filter(\n touristicContent => touristicContent[filter.touristicContentProperty] >= minValue && touristicContent[filter.touristicContentProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicContents = isUsingFilter ? filtersTouristicContents : state.touristicContents;\n\n return Boolean(state.searchValue)\n ? searchTouristicContents.filter(currentTouristicContents => currentTouristicContents.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicContents;\n}\n\nexport function handleTouristicEventsFiltersAndSearch(): TouristicEvents {\n let isUsingFilter = false;\n let filtersTouristicEvents = [];\n for (const filter of touristicEventsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicEvents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...filtersTouristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicEventProperty] >= currentFilter.minValue && touristicContent[filter.touristicEventProperty] <= 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.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...state.touristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\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 filtersTouristicEvents = [\n ...state.touristicEvents.filter(\n touristicEvent => touristicEvent[filter.touristicEventProperty] >= minValue && touristicEvent[filter.touristicEventProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicEvents = isUsingFilter ? filtersTouristicEvents : state.touristicEvents;\n return Boolean(state.searchValue)\n ? searchTouristicEvents.filter(currentTouristicEvent => currentTouristicEvent.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicEvents;\n}\n"],"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B,IAAahC,EAAcQ,SAAWwB,EAAU,CACxDA,EAAWhC,EAAcQ,Q,CAE3B,GAAIK,MAAMoB,IAAajC,EAAcS,SAAWwB,EAAU,CACxDA,EAAWjC,EAAcS,Q,GAN7B,IAA8B,IAAAtJ,EAAA,EAAA+K,EAAAnC,EAAA5I,EAAA+K,EAAAtL,OAAAO,IAAgB,CAAzC,IAAMmJ,EAAe4B,EAAA/K,G,EAAfmJ,E,CASXwB,EAAsB3B,cAAA,GACjBjH,EAAMyE,gBAAgBrG,QACvB,SAAA6K,GAAkB,OAAAA,EAAe7K,EAAOoI,yBAA2BsC,GAAYG,EAAe7K,EAAOoI,yBAA2BuC,CAA9G,IACnB,K,KAzDX,IAAqB,IAAAvL,EAAA,EAAA0L,EAAA3C,EAAA/I,EAAA0L,EAAAxL,OAAAF,IAAsB,CAAtC,IAAMY,EAAM8K,EAAA1L,G,EAANY,E,CA+DX,IAAM+K,EAAwBxC,EAAgBiC,EAAyB5I,EAAMyE,gBAC7E,OAAOsD,QAAQ/H,EAAM0D,aACjByF,EAAsB/K,QAAO,SAAAyG,GAAyB,OAAAA,EAAsBmD,KAAKC,cAAchL,SAAS+C,EAAM0D,YAAYuE,cAApE,IACtDkB,CACN,C"}
@@ -1,2 +0,0 @@
1
- import{c as e,f as t}from"./p-0c07a3f0.js";const r=(e,t,r)=>{const s=e.get(t);if(!s){e.set(t,[r])}else if(!s.includes(r)){s.push(r)}};const s=(e,t)=>{let r;return(...s)=>{if(r){clearTimeout(r)}r=setTimeout((()=>{r=0;e(...s)}),t)}};const i=e=>!("isConnected"in e)||e.isConnected;const n=s((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(i))}}),2e3);const o=()=>{if(typeof e!=="function"){return{}}const s=new Map;return{dispose:()=>s.clear(),get:t=>{const i=e();if(i){r(s,t,i)}},set:e=>{const r=s.get(e);if(r){s.set(e,r.filter(t))}n(s)},reset:()=>{s.forEach((e=>e.forEach(t)));n(s)}}};const l=e=>typeof e==="function"?e():e;const c=(e,t=((e,t)=>e!==t))=>{const r=l(e);let s=new Map(Object.entries(r!==null&&r!==void 0?r:{}));const i={dispose:[],get:[],set:[],reset:[]};const n=()=>{var t;s=new Map(Object.entries((t=l(e))!==null&&t!==void 0?t:{}));i.reset.forEach((e=>e()))};const o=()=>{i.dispose.forEach((e=>e()));n()};const c=e=>{i.get.forEach((t=>t(e)));return s.get(e)};const a=(e,r)=>{const n=s.get(e);if(t(r,n,e)){s.set(e,r);i.set.forEach((t=>t(e,r,n)))}};const p=typeof Proxy==="undefined"?{}:new Proxy(r,{get(e,t){return c(t)},ownKeys(e){return Array.from(s.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(e,t){return s.has(t)},set(e,t,r){a(t,r);return true}});const f=(e,t)=>{i[e].push(t);return()=>{u(i[e],t)}};const y=(t,r)=>{const s=f("set",((e,s)=>{if(e===t){r(s)}}));const i=f("reset",(()=>r(l(e)[t])));return()=>{s();i()}};const d=(...e)=>{const t=e.reduce(((e,t)=>{if(t.set){e.push(f("set",t.set))}if(t.get){e.push(f("get",t.get))}if(t.reset){e.push(f("reset",t.reset))}if(t.dispose){e.push(f("dispose",t.dispose))}return e}),[]);return()=>t.forEach((e=>e()))};const v=e=>{const t=s.get(e);i.set.forEach((r=>r(e,t,t)))};return{state:p,get:c,set:a,on:f,onChange:y,use:d,dispose:o,reset:n,forceUpdate:v}};const u=(e,t)=>{const r=e.indexOf(t);if(r>=0){e[r]=e[e.length-1];e.length--}};const a=(e,t)=>{const r=c(e,t);r.use(o());return r};const{state:p,onChange:f,reset:y}=a({mode:null,api:null,languages:null,language:null,treks:null,currentTreks:null,treksWithinBounds:null,currentMapBounds:null,difficulties:null,routes:null,practices:null,themes:null,cities:null,durations:null,lengths:null,elevations:null,currentSensitiveAreas:null,labels:null,districts:null,sources:null,ratings:null,accessibilities:null,accessibilitiesLevel:null,poiTypes:null,currentTrek:null,currentPois:null,currentInformationDesks:null,treksNetworkError:false,trekNetworkError:false,searchValue:null,selectedActivitiesFilters:0,selectedThemesFilters:0,selectedLocationFilters:0,selectedTrekId:null,parentTrekId:null,parentTrek:null,currentTrekSteps:null,selectedStepId:null,trekTouristicContents:null,touristicContents:null,currentTouristicContents:null,touristicContentsWithinBounds:null,touristicContentCategories:null,currentTouristicContent:null,touristicEvents:null,currentTouristicEvents:null,touristicEventsWithinBounds:null,touristicEventTypes:null,currentTouristicEvent:null,selectedTouristicContentId:null,selectedTouristicEventId:null});function d(e){let t;if(e<24){t=`${Math.floor(e)}h`;if(e%1>0){t+=`${Math.round(60*(e%1))}min`}}else{t=`${e/24}j`}return t}function v(e){return`${Math.round(e/1e3)}km`}function g(e){return`${e}m`}const P=[{property:"practices",trekProperty:"practice",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"difficulties",trekProperty:"difficulty",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"durations",trekProperty:"duration",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"lengths",trekProperty:"length_2d",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"elevations",trekProperty:"ascent",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"routes",trekProperty:"route",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"accessibilities",trekProperty:"accessibilities",trekPropertyIsArray:true,type:"include",segment:"selectedActivitiesFilters"},{property:"labels",trekProperty:"labels",trekPropertyIsArray:true,type:"include",segment:"selectedActivitiesFilters"},{property:"themes",trekProperty:"themes",trekPropertyIsArray:true,type:"include",segment:"selectedThemesFilters"},{property:"cities",trekProperty:"cities",trekPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",trekProperty:"districts",trekPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}];const k=[{property:"touristicContentCategories",touristicContentProperty:"category",touristicContentPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"cities",touristicContentProperty:"cities",touristicContentPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",touristicContentProperty:"districts",touristicContentPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}];const m=[{property:"touristicEventTypes",touristicEventProperty:"type",touristicEventPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"cities",touristicEventProperty:"cities",touristicEventPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",touristicEventProperty:"districts",touristicEventPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}];function A(){let e=false;let t=[];for(const s of P){const r=p[s.property].filter((e=>e.selected)).map((e=>e.id));if(r.length>0){if(t.length>0){if(s.type==="include"){if(s.trekPropertyIsArray){t=[...t.filter((e=>e[s.trekProperty].some((e=>r.includes(e)))))]}else{t=[...t.filter((e=>r.includes(e[s.trekProperty])))]}}else if(s.type==="interval"){t=[...t.filter((e=>{for(const t of r){const r=p[s.property].find((e=>e.id===t));if(e[s.trekProperty]>=r.minValue&&e[s.trekProperty]<=r.maxValue){return true}}return false}))]}}else{if(!e){e=true}if(s.type==="include"){if(s.trekPropertyIsArray){t=[...p.treks.filter((e=>e[s.trekProperty].some((e=>r.includes(e)))))]}else{t=[...p.treks.filter((e=>r.includes(e[s.trekProperty])))]}}else if(s.type==="interval"){let e;let i;for(const t of r){const r=p[s.property].find((e=>e.id===t));if(isNaN(e)||r.minValue<e){e=r.minValue}if(isNaN(i)||r.maxValue>i){i=r.maxValue}}t=[...p.treks.filter((t=>t[s.trekProperty]>=e&&t[s.trekProperty]<=i))]}}}}const r=e?t:p.treks;return Boolean(p.searchValue)?r.filter((e=>e.name.toLowerCase().includes(p.searchValue.toLowerCase()))):r}function I(){let e=false;let t=[];for(const s of k){const r=p[s.property].filter((e=>e.selected)).map((e=>e.id));if(r.length>0){if(t.length>0){if(s.type==="include"){if(s.touristicContentPropertyIsArray){t=[...t.filter((e=>e[s.touristicContentProperty].some((e=>r.includes(e)))))]}else{t=[...t.filter((e=>r.includes(e[s.touristicContentProperty])))]}}else if(s.type==="interval"){t=[...t.filter((e=>{for(const t of r){const r=p[s.property].find((e=>e.id===t));if(e[s.touristicContentProperty]>=r.minValue&&e[s.touristicContentProperty]<=r.maxValue){return true}}return false}))]}}else{if(!e){e=true}if(s.type==="include"){if(s.touristicContentPropertyIsArray){t=[...p.touristicContents.filter((e=>e[s.touristicContentProperty].some((e=>r.includes(e)))))]}else{t=[...p.touristicContents.filter((e=>r.includes(e[s.touristicContentProperty])))]}}else if(s.type==="interval"){let e;let i;for(const t of r){const r=p[s.property].find((e=>e.id===t));if(isNaN(e)||r.minValue<e){e=r.minValue}if(isNaN(i)||r.maxValue>i){i=r.maxValue}}t=[...p.touristicContents.filter((t=>t[s.touristicContentProperty]>=e&&t[s.touristicContentProperty]<=i))]}}}}const r=e?t:p.touristicContents;return Boolean(p.searchValue)?r.filter((e=>e.name.toLowerCase().includes(p.searchValue.toLowerCase()))):r}function h(){let e=false;let t=[];for(const s of m){const r=p[s.property].filter((e=>e.selected)).map((e=>e.id));if(r.length>0){if(t.length>0){if(s.type==="include"){if(s.touristicEventPropertyIsArray){t=[...t.filter((e=>e[s.touristicEventProperty].some((e=>r.includes(e)))))]}else{t=[...t.filter((e=>r.includes(e[s.touristicEventProperty])))]}}else if(s.type==="interval"){t=[...t.filter((e=>{for(const t of r){const r=p[s.property].find((e=>e.id===t));if(e[s.touristicEventProperty]>=r.minValue&&e[s.touristicEventProperty]<=r.maxValue){return true}}return false}))]}}else{if(!e){e=true}if(s.type==="include"){if(s.touristicEventPropertyIsArray){t=[...p.touristicContents.filter((e=>e[s.touristicEventProperty].some((e=>r.includes(e)))))]}else{t=[...p.touristicEvents.filter((e=>r.includes(e[s.touristicEventProperty])))]}}else if(s.type==="interval"){let e;let i;for(const t of r){const r=p[s.property].find((e=>e.id===t));if(isNaN(e)||r.minValue<e){e=r.minValue}if(isNaN(i)||r.maxValue>i){i=r.maxValue}}t=[...p.touristicEvents.filter((t=>t[s.touristicEventProperty]>=e&&t[s.touristicEventProperty]<=i))]}}}}const r=e?t:p.touristicEvents;return Boolean(p.searchValue)?r.filter((e=>e.name.toLowerCase().includes(p.searchValue.toLowerCase()))):r}export{k as a,I as b,m as c,h as d,v as e,d as f,g,A as h,f as o,y as r,p as s,P as t};
2
- //# sourceMappingURL=p-bcac98e0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","mode","api","languages","language","treks","currentTreks","treksWithinBounds","currentMapBounds","difficulties","routes","practices","themes","cities","durations","lengths","elevations","currentSensitiveAreas","labels","districts","sources","ratings","accessibilities","accessibilitiesLevel","poiTypes","currentTrek","currentPois","currentInformationDesks","treksNetworkError","trekNetworkError","searchValue","selectedActivitiesFilters","selectedThemesFilters","selectedLocationFilters","selectedTrekId","parentTrekId","parentTrek","currentTrekSteps","selectedStepId","trekTouristicContents","touristicContents","currentTouristicContents","touristicContentsWithinBounds","touristicContentCategories","currentTouristicContent","touristicEvents","currentTouristicEvents","touristicEventsWithinBounds","touristicEventTypes","currentTouristicEvent","selectedTouristicContentId","selectedTouristicEventId","formatDuration","duration","formattedDuration","Math","floor","round","formatLength","formatAscent","ascent","treksFilters","property","trekProperty","trekPropertyIsArray","type","segment","touristicContentsFilters","touristicContentProperty","touristicContentPropertyIsArray","touristicEventsFilters","touristicEventProperty","touristicEventPropertyIsArray","handleTreksFiltersAndSearch","isUsingFilter","filtersTreks","currentFiltersId","currentFilter","selected","id","trek","some","currentFilterId","find","minValue","maxValue","isNaN","searchTreks","Boolean","name","toLowerCase","handleTouristicContentsFiltersAndSearch","filtersTouristicContents","touristicContent","searchTouristicContents","handleTouristicEventsFiltersAndSearch","filtersTouristicEvents","touristicEvent","searchTouristicEvents"],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/store.ts","./src/utils/utils.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { LatLngBounds } from 'leaflet';\nimport {\n Accessibilities,\n accessibilitiesLevel,\n Difficulties,\n Durations,\n InformationDesks,\n Labels,\n Pois,\n PoiTypes,\n Practices,\n Routes,\n SensitiveAreas,\n Sources,\n Themes,\n Cities,\n Trek,\n Treks,\n Lengths,\n Elevations,\n Districts,\n TouristicContents,\n TouristicContentCategories,\n TouristicContent,\n TouristicEvents,\n TouristicEventTypes,\n TouristicEvent,\n Ratings,\n} from 'types/types';\n\nconst { state, onChange, reset } = createStore<{\n mode: string;\n api: string;\n languages: string[];\n language: string;\n treks: Treks;\n treksWithinBounds: Treks;\n currentMapBounds: LatLngBounds;\n currentTreks: Treks;\n difficulties: Difficulties;\n routes: Routes;\n practices: Practices;\n themes: Themes;\n cities: Cities;\n durations: Durations;\n lengths: Lengths;\n elevations: Elevations;\n labels: Labels;\n districts: Districts;\n sources: Sources;\n ratings: Ratings;\n accessibilities: Accessibilities;\n accessibilitiesLevel: accessibilitiesLevel;\n poiTypes: PoiTypes;\n currentTrek: Trek;\n currentSensitiveAreas: SensitiveAreas;\n currentPois: Pois;\n currentInformationDesks: InformationDesks;\n treksNetworkError: boolean;\n trekNetworkError: boolean;\n searchValue: string;\n selectedActivitiesFilters: number;\n selectedThemesFilters: number;\n selectedLocationFilters: number;\n selectedTrekId: number;\n parentTrekId: number;\n parentTrek: Trek;\n currentTrekSteps: Treks;\n selectedStepId: number;\n trekTouristicContents: TouristicContents;\n touristicContents: TouristicContents;\n currentTouristicContents: TouristicContents;\n touristicContentsWithinBounds: TouristicContents;\n touristicContentCategories: TouristicContentCategories;\n currentTouristicContent: TouristicContent;\n touristicEvents: TouristicEvents;\n currentTouristicEvents: TouristicEvents;\n touristicEventsWithinBounds: TouristicEvents;\n touristicEventTypes: TouristicEventTypes;\n currentTouristicEvent: TouristicEvent;\n selectedTouristicContentId: number;\n selectedTouristicEventId: number;\n}>({\n mode: null,\n api: null,\n languages: null,\n language: null,\n treks: null,\n currentTreks: null,\n treksWithinBounds: null,\n currentMapBounds: null,\n difficulties: null,\n routes: null,\n practices: null,\n themes: null,\n cities: null,\n durations: null,\n lengths: null,\n elevations: null,\n currentSensitiveAreas: null,\n labels: null,\n districts: null,\n sources: null,\n ratings: null,\n accessibilities: null,\n accessibilitiesLevel: null,\n poiTypes: null,\n currentTrek: null,\n currentPois: null,\n currentInformationDesks: null,\n treksNetworkError: false,\n trekNetworkError: false,\n searchValue: null,\n selectedActivitiesFilters: 0,\n selectedThemesFilters: 0,\n selectedLocationFilters: 0,\n selectedTrekId: null,\n parentTrekId: null,\n parentTrek: null,\n currentTrekSteps: null,\n selectedStepId: null,\n trekTouristicContents: null,\n touristicContents: null,\n currentTouristicContents: null,\n touristicContentsWithinBounds: null,\n touristicContentCategories: null,\n currentTouristicContent: null,\n touristicEvents: null,\n currentTouristicEvents: null,\n touristicEventsWithinBounds: null,\n touristicEventTypes: null,\n currentTouristicEvent: null,\n selectedTouristicContentId: null,\n selectedTouristicEventId: null,\n});\n\nexport { onChange, reset };\n\nexport default state;\n","import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TouristicEvents, TouristicEventsFilters, TrekFilters, 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 const treksFilters: TrekFilters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include', segment: 'selectedThemesFilters' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicContentsFilters: TouristicContentsFilters = [\n { property: 'touristicContentCategories', touristicContentProperty: 'category', touristicContentPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicContentProperty: 'cities', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicContentProperty: 'districts', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicEventsFilters: TouristicEventsFilters = [\n { property: 'touristicEventTypes', touristicEventProperty: 'type', touristicEventPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicEventProperty: 'cities', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicEventProperty: 'districts', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport function handleTreksFiltersAndSearch(): Treks {\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of treksFilters) {\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 = [...filtersTreks.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\nexport function handleTouristicContentsFiltersAndSearch(): TouristicContents {\n let isUsingFilter = false;\n let filtersTouristicContents = [];\n for (const filter of touristicContentsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicContents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...filtersTouristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicContentProperty] >= currentFilter.minValue && touristicContent[filter.touristicContentProperty] <= 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.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...state.touristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\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 filtersTouristicContents = [\n ...state.touristicContents.filter(\n touristicContent => touristicContent[filter.touristicContentProperty] >= minValue && touristicContent[filter.touristicContentProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicContents = isUsingFilter ? filtersTouristicContents : state.touristicContents;\n\n return Boolean(state.searchValue)\n ? searchTouristicContents.filter(currentTouristicContents => currentTouristicContents.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicContents;\n}\n\nexport function handleTouristicEventsFiltersAndSearch(): TouristicEvents {\n let isUsingFilter = false;\n let filtersTouristicEvents = [];\n for (const filter of touristicEventsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicEvents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...filtersTouristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicEventProperty] >= currentFilter.minValue && touristicContent[filter.touristicEventProperty] <= 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.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...state.touristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\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 filtersTouristicEvents = [\n ...state.touristicEvents.filter(\n touristicEvent => touristicEvent[filter.touristicEventProperty] >= minValue && touristicEvent[filter.touristicEventProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicEvents = isUsingFilter ? filtersTouristicEvents : state.touristicEvents;\n return Boolean(state.searchValue)\n ? searchTouristicEvents.filter(currentTouristicEvent => currentTouristicEvent.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicEvents;\n}\n"],"mappings":"2CAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,GAC3B,MACS,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,EACnB,GAEA,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAA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