@geotrekce/geotrek-rando-widget 0.2.15 → 0.3.0

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 (354) hide show
  1. package/dist/cjs/geotrek-rando-widget.cjs.js +1 -1
  2. package/dist/cjs/geotrek-rando-widget.cjs.js.br +0 -0
  3. package/dist/cjs/geotrek-rando-widget.cjs.js.gz +0 -0
  4. package/dist/cjs/grw-app.cjs.entry.js +24 -11
  5. package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
  6. package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
  7. package/dist/cjs/grw-app.cjs.entry.js.map +1 -1
  8. package/dist/cjs/{grw-filter_8.cjs.entry.js → grw-filter_7.cjs.entry.js} +236 -46
  9. package/dist/cjs/grw-filter_7.cjs.entry.js.br +0 -0
  10. package/dist/cjs/grw-filter_7.cjs.entry.js.gz +0 -0
  11. package/dist/cjs/grw-filter_7.cjs.entry.js.map +1 -0
  12. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +1 -1
  13. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js.br +0 -0
  14. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js.gz +0 -0
  15. package/dist/cjs/grw-select-language.cjs.entry.js +28 -0
  16. package/dist/cjs/grw-select-language.cjs.entry.js.br +0 -0
  17. package/dist/cjs/grw-select-language.cjs.entry.js.gz +0 -0
  18. package/dist/cjs/grw-select-language.cjs.entry.js.map +1 -0
  19. package/dist/cjs/grw-trek-card.cjs.entry.js +14 -4
  20. package/dist/cjs/grw-trek-card.cjs.entry.js.br +0 -0
  21. package/dist/cjs/grw-trek-card.cjs.entry.js.gz +0 -0
  22. package/dist/cjs/grw-trek-card.cjs.entry.js.map +1 -1
  23. package/dist/cjs/{i18n-210f453b.js → i18n-69f2bef1.js} +7 -3
  24. package/dist/cjs/i18n-69f2bef1.js.br +0 -0
  25. package/dist/cjs/i18n-69f2bef1.js.gz +0 -0
  26. package/dist/cjs/i18n-69f2bef1.js.map +1 -0
  27. package/dist/cjs/loader.cjs.js +1 -1
  28. package/dist/cjs/loader.cjs.js.br +0 -0
  29. package/dist/cjs/loader.cjs.js.gz +0 -0
  30. package/dist/cjs/{store-b6d5fcad.js → store-a37c979e.js} +5 -1
  31. package/dist/cjs/store-a37c979e.js.br +0 -0
  32. package/dist/cjs/store-a37c979e.js.gz +0 -0
  33. package/dist/cjs/store-a37c979e.js.map +1 -0
  34. package/dist/cjs/{utils-1dd4bcbd.js → utils-fb618f73.js} +17 -16
  35. package/dist/cjs/utils-fb618f73.js.br +0 -0
  36. package/dist/cjs/utils-fb618f73.js.gz +0 -0
  37. package/dist/cjs/utils-fb618f73.js.map +1 -0
  38. package/dist/collection/assets/contract.svg +1 -0
  39. package/dist/collection/assets/contract.svg.br +2 -0
  40. package/dist/collection/assets/contract.svg.gz +0 -0
  41. package/dist/collection/components/grw-app/grw-app.css +82 -46
  42. package/dist/collection/components/grw-app/grw-app.css.br +0 -0
  43. package/dist/collection/components/grw-app/grw-app.css.gz +0 -0
  44. package/dist/collection/components/grw-app/grw-app.js +30 -35
  45. package/dist/collection/components/grw-app/grw-app.js.br +0 -0
  46. package/dist/collection/components/grw-app/grw-app.js.gz +0 -0
  47. package/dist/collection/components/grw-app/grw-app.js.map +1 -1
  48. package/dist/collection/components/grw-filter/grw-filter.js +25 -2
  49. package/dist/collection/components/grw-filter/grw-filter.js.br +0 -0
  50. package/dist/collection/components/grw-filter/grw-filter.js.gz +0 -0
  51. package/dist/collection/components/grw-filter/grw-filter.js.map +1 -1
  52. package/dist/collection/components/grw-map/grw-map.css +79 -10
  53. package/dist/collection/components/grw-map/grw-map.css.br +0 -0
  54. package/dist/collection/components/grw-map/grw-map.css.gz +0 -0
  55. package/dist/collection/components/grw-map/grw-map.js +247 -22
  56. package/dist/collection/components/grw-map/grw-map.js.br +0 -0
  57. package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
  58. package/dist/collection/components/grw-map/grw-map.js.map +1 -1
  59. package/dist/collection/components/grw-trek-card/grw-trek-card.css +4 -0
  60. package/dist/collection/components/grw-trek-card/grw-trek-card.css.br +0 -0
  61. package/dist/collection/components/grw-trek-card/grw-trek-card.css.gz +0 -0
  62. package/dist/collection/components/grw-trek-card/grw-trek-card.js +54 -1
  63. package/dist/collection/components/grw-trek-card/grw-trek-card.js.br +0 -0
  64. package/dist/collection/components/grw-trek-card/grw-trek-card.js.gz +0 -0
  65. package/dist/collection/components/grw-trek-card/grw-trek-card.js.map +1 -1
  66. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +1 -1
  67. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
  68. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
  69. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
  70. package/dist/collection/i18n/i18n.js +6 -2
  71. package/dist/collection/i18n/i18n.js.br +0 -0
  72. package/dist/collection/i18n/i18n.js.gz +0 -0
  73. package/dist/collection/i18n/i18n.js.map +1 -1
  74. package/dist/collection/services/treks.service.js +6 -0
  75. package/dist/collection/services/treks.service.js.br +0 -0
  76. package/dist/collection/services/treks.service.js.gz +0 -0
  77. package/dist/collection/services/treks.service.js.map +1 -0
  78. package/dist/collection/store/store.js +4 -0
  79. package/dist/collection/store/store.js.br +0 -0
  80. package/dist/collection/store/store.js.gz +0 -0
  81. package/dist/collection/store/store.js.map +1 -1
  82. package/dist/collection/stories/App.js +4 -6
  83. package/dist/collection/stories/App.js.br +0 -0
  84. package/dist/collection/stories/App.js.gz +0 -0
  85. package/dist/collection/stories/App.stories.js +6 -5
  86. package/dist/collection/stories/App.stories.js.br +0 -0
  87. package/dist/collection/stories/App.stories.js.gz +0 -0
  88. package/dist/collection/stories/TrekMap.js +6 -3
  89. package/dist/collection/stories/TrekMap.js.br +0 -0
  90. package/dist/collection/stories/TrekMap.js.gz +0 -0
  91. package/dist/collection/stories/TrekMap.stories.js +6 -3
  92. package/dist/collection/stories/TrekMap.stories.js.br +0 -0
  93. package/dist/collection/stories/TrekMap.stories.js.gz +0 -0
  94. package/dist/collection/stories/TreksMap.js +16 -3
  95. package/dist/collection/stories/TreksMap.js.br +0 -0
  96. package/dist/collection/stories/TreksMap.js.gz +0 -0
  97. package/dist/collection/stories/TreksMap.stories.js +6 -3
  98. package/dist/collection/stories/TreksMap.stories.js.br +0 -0
  99. package/dist/collection/stories/TreksMap.stories.js.gz +0 -0
  100. package/dist/collection/types/types.js.map +1 -1
  101. package/dist/collection/utils/utils.js +14 -14
  102. package/dist/collection/utils/utils.js.br +0 -0
  103. package/dist/collection/utils/utils.js.gz +0 -0
  104. package/dist/collection/utils/utils.js.map +1 -1
  105. package/dist/esm/geotrek-rando-widget.js +1 -1
  106. package/dist/esm/geotrek-rando-widget.js.br +0 -0
  107. package/dist/esm/geotrek-rando-widget.js.gz +0 -0
  108. package/dist/esm/grw-app.entry.js +24 -11
  109. package/dist/esm/grw-app.entry.js.br +0 -0
  110. package/dist/esm/grw-app.entry.js.gz +0 -0
  111. package/dist/esm/grw-app.entry.js.map +1 -1
  112. package/dist/esm/{grw-filter_8.entry.js → grw-filter_7.entry.js} +237 -46
  113. package/dist/esm/grw-filter_7.entry.js.br +0 -0
  114. package/dist/esm/grw-filter_7.entry.js.gz +0 -0
  115. package/dist/esm/grw-filter_7.entry.js.map +1 -0
  116. package/dist/esm/grw-information-desk-detail_3.entry.js +1 -1
  117. package/dist/esm/grw-information-desk-detail_3.entry.js.br +0 -0
  118. package/dist/esm/grw-information-desk-detail_3.entry.js.gz +0 -0
  119. package/dist/esm/grw-select-language.entry.js +24 -0
  120. package/dist/esm/grw-select-language.entry.js.br +0 -0
  121. package/dist/esm/grw-select-language.entry.js.gz +0 -0
  122. package/dist/esm/grw-select-language.entry.js.map +1 -0
  123. package/dist/esm/grw-trek-card.entry.js +14 -4
  124. package/dist/esm/grw-trek-card.entry.js.br +0 -0
  125. package/dist/esm/grw-trek-card.entry.js.gz +0 -0
  126. package/dist/esm/grw-trek-card.entry.js.map +1 -1
  127. package/dist/esm/{i18n-301409fd.js → i18n-3554af6e.js} +7 -3
  128. package/dist/esm/i18n-3554af6e.js.br +0 -0
  129. package/dist/esm/i18n-3554af6e.js.gz +0 -0
  130. package/dist/esm/i18n-3554af6e.js.map +1 -0
  131. package/dist/esm/loader.js +1 -1
  132. package/dist/esm/loader.js.br +0 -0
  133. package/dist/esm/loader.js.gz +0 -0
  134. package/dist/esm/{store-2a612007.js → store-d82e965e.js} +5 -1
  135. package/dist/esm/store-d82e965e.js.br +0 -0
  136. package/dist/esm/store-d82e965e.js.gz +0 -0
  137. package/dist/esm/store-d82e965e.js.map +1 -0
  138. package/dist/esm/{utils-4b2144e3.js → utils-f5faa5c9.js} +17 -17
  139. package/dist/esm/utils-f5faa5c9.js.br +0 -0
  140. package/dist/esm/utils-f5faa5c9.js.gz +0 -0
  141. package/dist/esm/utils-f5faa5c9.js.map +1 -0
  142. package/dist/esm-es5/geotrek-rando-widget.js +1 -1
  143. package/dist/esm-es5/geotrek-rando-widget.js.br +0 -0
  144. package/dist/esm-es5/geotrek-rando-widget.js.gz +0 -0
  145. package/dist/esm-es5/geotrek-rando-widget.js.map +1 -1
  146. package/dist/esm-es5/grw-app.entry.js +1 -1
  147. package/dist/esm-es5/grw-app.entry.js.br +0 -0
  148. package/dist/esm-es5/grw-app.entry.js.gz +0 -0
  149. package/dist/esm-es5/grw-app.entry.js.map +1 -1
  150. package/dist/esm-es5/{grw-filter_8.entry.js → grw-filter_7.entry.js} +4 -4
  151. package/dist/esm-es5/grw-filter_7.entry.js.br +0 -0
  152. package/dist/esm-es5/grw-filter_7.entry.js.gz +0 -0
  153. package/dist/{esm/grw-filter_8.entry.js.map → esm-es5/grw-filter_7.entry.js.map} +1 -1
  154. package/dist/esm-es5/grw-information-desk-detail_3.entry.js +1 -1
  155. package/dist/esm-es5/grw-information-desk-detail_3.entry.js.br +0 -0
  156. package/dist/esm-es5/grw-information-desk-detail_3.entry.js.gz +0 -0
  157. package/dist/esm-es5/grw-select-language.entry.js +2 -0
  158. package/dist/esm-es5/grw-select-language.entry.js.br +0 -0
  159. package/dist/esm-es5/grw-select-language.entry.js.gz +0 -0
  160. package/dist/esm-es5/grw-select-language.entry.js.map +1 -0
  161. package/dist/esm-es5/grw-trek-card.entry.js +1 -1
  162. package/dist/esm-es5/grw-trek-card.entry.js.br +0 -0
  163. package/dist/esm-es5/grw-trek-card.entry.js.gz +0 -0
  164. package/dist/esm-es5/grw-trek-card.entry.js.map +1 -1
  165. package/dist/esm-es5/i18n-3554af6e.js +2 -0
  166. package/dist/esm-es5/i18n-3554af6e.js.br +0 -0
  167. package/dist/esm-es5/i18n-3554af6e.js.gz +0 -0
  168. package/dist/esm-es5/i18n-3554af6e.js.map +1 -0
  169. package/dist/esm-es5/loader.js +1 -1
  170. package/dist/esm-es5/loader.js.br +0 -0
  171. package/dist/esm-es5/loader.js.gz +0 -0
  172. package/dist/esm-es5/loader.js.map +1 -1
  173. package/dist/esm-es5/{store-2a612007.js → store-d82e965e.js} +2 -2
  174. package/dist/esm-es5/store-d82e965e.js.br +0 -0
  175. package/dist/esm-es5/store-d82e965e.js.gz +0 -0
  176. package/dist/esm-es5/store-d82e965e.js.map +1 -0
  177. package/dist/esm-es5/utils-f5faa5c9.js +2 -0
  178. package/dist/esm-es5/utils-f5faa5c9.js.br +0 -0
  179. package/dist/esm-es5/utils-f5faa5c9.js.gz +0 -0
  180. package/dist/esm-es5/utils-f5faa5c9.js.map +1 -0
  181. package/dist/geotrek-rando-widget/assets/contract.svg +1 -0
  182. package/dist/geotrek-rando-widget/assets/contract.svg.br +2 -0
  183. package/dist/geotrek-rando-widget/assets/contract.svg.gz +0 -0
  184. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  185. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
  186. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
  187. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.map +1 -1
  188. package/dist/geotrek-rando-widget/p-148f5f1d.system.js +1 -1
  189. package/dist/geotrek-rando-widget/p-148f5f1d.system.js.br +0 -0
  190. package/dist/geotrek-rando-widget/p-148f5f1d.system.js.gz +0 -0
  191. package/dist/geotrek-rando-widget/p-148f5f1d.system.js.map +1 -1
  192. package/dist/geotrek-rando-widget/p-28e64e05.system.entry.js +2 -0
  193. package/dist/geotrek-rando-widget/p-28e64e05.system.entry.js.br +0 -0
  194. package/dist/geotrek-rando-widget/p-28e64e05.system.entry.js.gz +0 -0
  195. package/dist/geotrek-rando-widget/p-28e64e05.system.entry.js.map +1 -0
  196. package/dist/geotrek-rando-widget/p-29f7ed0b.system.entry.js +2 -0
  197. package/dist/geotrek-rando-widget/p-29f7ed0b.system.entry.js.br +0 -0
  198. package/dist/geotrek-rando-widget/p-29f7ed0b.system.entry.js.gz +0 -0
  199. package/dist/geotrek-rando-widget/p-29f7ed0b.system.entry.js.map +1 -0
  200. package/dist/geotrek-rando-widget/p-2f1cdad9.system.js +2 -0
  201. package/dist/geotrek-rando-widget/p-2f1cdad9.system.js.br +0 -0
  202. package/dist/geotrek-rando-widget/p-2f1cdad9.system.js.gz +0 -0
  203. package/dist/geotrek-rando-widget/p-2f1cdad9.system.js.map +1 -0
  204. package/dist/geotrek-rando-widget/{p-165684be.entry.js → p-39bfe711.entry.js} +2 -2
  205. package/dist/geotrek-rando-widget/p-39bfe711.entry.js.br +0 -0
  206. package/dist/geotrek-rando-widget/p-39bfe711.entry.js.gz +0 -0
  207. package/dist/geotrek-rando-widget/p-466996c5.entry.js +14 -0
  208. package/dist/geotrek-rando-widget/p-466996c5.entry.js.br +0 -0
  209. package/dist/geotrek-rando-widget/p-466996c5.entry.js.gz +0 -0
  210. package/dist/geotrek-rando-widget/p-466996c5.entry.js.map +1 -0
  211. package/dist/geotrek-rando-widget/p-501ad139.system.js +2 -0
  212. package/dist/geotrek-rando-widget/p-501ad139.system.js.br +0 -0
  213. package/dist/geotrek-rando-widget/p-501ad139.system.js.gz +0 -0
  214. package/dist/geotrek-rando-widget/p-501ad139.system.js.map +1 -0
  215. package/dist/geotrek-rando-widget/p-61ec76a2.entry.js +2 -0
  216. package/dist/geotrek-rando-widget/p-61ec76a2.entry.js.br +0 -0
  217. package/dist/geotrek-rando-widget/p-61ec76a2.entry.js.gz +0 -0
  218. package/dist/geotrek-rando-widget/p-61ec76a2.entry.js.map +1 -0
  219. package/dist/geotrek-rando-widget/p-75dd3023.entry.js +2 -0
  220. package/dist/geotrek-rando-widget/p-75dd3023.entry.js.br +0 -0
  221. package/dist/geotrek-rando-widget/p-75dd3023.entry.js.gz +0 -0
  222. package/dist/geotrek-rando-widget/p-75dd3023.entry.js.map +1 -0
  223. package/dist/geotrek-rando-widget/p-79b7f905.system.js +2 -0
  224. package/dist/geotrek-rando-widget/p-79b7f905.system.js.br +0 -0
  225. package/dist/geotrek-rando-widget/p-79b7f905.system.js.gz +0 -0
  226. package/dist/geotrek-rando-widget/p-79b7f905.system.js.map +1 -0
  227. package/dist/geotrek-rando-widget/p-84df84a9.system.entry.js +14 -0
  228. package/dist/geotrek-rando-widget/p-84df84a9.system.entry.js.br +0 -0
  229. package/dist/geotrek-rando-widget/p-84df84a9.system.entry.js.gz +0 -0
  230. package/dist/geotrek-rando-widget/p-84df84a9.system.entry.js.map +1 -0
  231. package/dist/geotrek-rando-widget/p-90bdf63f.entry.js +2 -0
  232. package/dist/geotrek-rando-widget/p-90bdf63f.entry.js.br +0 -0
  233. package/dist/geotrek-rando-widget/p-90bdf63f.entry.js.gz +0 -0
  234. package/dist/geotrek-rando-widget/p-90bdf63f.entry.js.map +1 -0
  235. package/dist/geotrek-rando-widget/p-98765517.js +2 -0
  236. package/dist/geotrek-rando-widget/p-98765517.js.br +0 -0
  237. package/dist/geotrek-rando-widget/p-98765517.js.gz +0 -0
  238. package/dist/geotrek-rando-widget/p-98765517.js.map +1 -0
  239. package/dist/geotrek-rando-widget/{p-e4dba310.system.entry.js → p-bbe147a7.system.entry.js} +2 -2
  240. package/dist/geotrek-rando-widget/p-bbe147a7.system.entry.js.br +0 -0
  241. package/dist/geotrek-rando-widget/p-bbe147a7.system.entry.js.gz +0 -0
  242. package/dist/geotrek-rando-widget/{p-06df20f8.js → p-beebe2d4.js} +2 -2
  243. package/dist/geotrek-rando-widget/p-beebe2d4.js.br +0 -0
  244. package/dist/geotrek-rando-widget/p-beebe2d4.js.gz +0 -0
  245. package/dist/geotrek-rando-widget/p-beebe2d4.js.map +1 -0
  246. package/dist/geotrek-rando-widget/p-dc700e75.system.entry.js +2 -0
  247. package/dist/geotrek-rando-widget/p-dc700e75.system.entry.js.br +0 -0
  248. package/dist/geotrek-rando-widget/p-dc700e75.system.entry.js.gz +0 -0
  249. package/dist/geotrek-rando-widget/p-dc700e75.system.entry.js.map +1 -0
  250. package/dist/geotrek-rando-widget/p-f0117cb8.js +2 -0
  251. package/dist/geotrek-rando-widget/p-f0117cb8.js.br +0 -0
  252. package/dist/geotrek-rando-widget/p-f0117cb8.js.gz +0 -0
  253. package/dist/geotrek-rando-widget/p-f0117cb8.js.map +1 -0
  254. package/dist/types/components/grw-app/grw-app.d.ts +6 -4
  255. package/dist/types/components/grw-filter/grw-filter.d.ts +1 -0
  256. package/dist/types/components/grw-map/grw-map.d.ts +18 -2
  257. package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +4 -0
  258. package/dist/types/components.d.ts +12 -8
  259. package/dist/types/i18n/i18n.d.ts +3 -1
  260. package/dist/types/services/treks.service.d.ts +1 -0
  261. package/dist/types/store/store.d.ts +8 -0
  262. package/dist/types/types/types.d.ts +1 -0
  263. package/dist/types/utils/utils.d.ts +2 -1
  264. package/package.json +3 -1
  265. package/dist/cjs/grw-filter_8.cjs.entry.js.br +0 -0
  266. package/dist/cjs/grw-filter_8.cjs.entry.js.gz +0 -0
  267. package/dist/cjs/grw-filter_8.cjs.entry.js.map +0 -1
  268. package/dist/cjs/i18n-210f453b.js.br +0 -0
  269. package/dist/cjs/i18n-210f453b.js.gz +0 -0
  270. package/dist/cjs/i18n-210f453b.js.map +0 -1
  271. package/dist/cjs/store-b6d5fcad.js.br +0 -0
  272. package/dist/cjs/store-b6d5fcad.js.gz +0 -0
  273. package/dist/cjs/store-b6d5fcad.js.map +0 -1
  274. package/dist/cjs/utils-1dd4bcbd.js.br +0 -0
  275. package/dist/cjs/utils-1dd4bcbd.js.gz +0 -0
  276. package/dist/cjs/utils-1dd4bcbd.js.map +0 -1
  277. package/dist/esm/grw-filter_8.entry.js.br +0 -0
  278. package/dist/esm/grw-filter_8.entry.js.gz +0 -0
  279. package/dist/esm/i18n-301409fd.js.br +0 -0
  280. package/dist/esm/i18n-301409fd.js.gz +0 -0
  281. package/dist/esm/i18n-301409fd.js.map +0 -1
  282. package/dist/esm/store-2a612007.js.br +0 -0
  283. package/dist/esm/store-2a612007.js.gz +0 -0
  284. package/dist/esm/store-2a612007.js.map +0 -1
  285. package/dist/esm/utils-4b2144e3.js.br +0 -0
  286. package/dist/esm/utils-4b2144e3.js.gz +0 -0
  287. package/dist/esm/utils-4b2144e3.js.map +0 -1
  288. package/dist/esm-es5/grw-filter_8.entry.js.br +0 -0
  289. package/dist/esm-es5/grw-filter_8.entry.js.gz +0 -0
  290. package/dist/esm-es5/grw-filter_8.entry.js.map +0 -1
  291. package/dist/esm-es5/i18n-301409fd.js +0 -2
  292. package/dist/esm-es5/i18n-301409fd.js.br +0 -0
  293. package/dist/esm-es5/i18n-301409fd.js.gz +0 -0
  294. package/dist/esm-es5/i18n-301409fd.js.map +0 -1
  295. package/dist/esm-es5/store-2a612007.js.br +0 -0
  296. package/dist/esm-es5/store-2a612007.js.gz +0 -0
  297. package/dist/esm-es5/store-2a612007.js.map +0 -1
  298. package/dist/esm-es5/utils-4b2144e3.js +0 -2
  299. package/dist/esm-es5/utils-4b2144e3.js.br +0 -0
  300. package/dist/esm-es5/utils-4b2144e3.js.gz +0 -0
  301. package/dist/esm-es5/utils-4b2144e3.js.map +0 -1
  302. package/dist/geotrek-rando-widget/p-0218dbae.js +0 -2
  303. package/dist/geotrek-rando-widget/p-0218dbae.js.br +0 -0
  304. package/dist/geotrek-rando-widget/p-0218dbae.js.gz +0 -0
  305. package/dist/geotrek-rando-widget/p-0218dbae.js.map +0 -1
  306. package/dist/geotrek-rando-widget/p-06df20f8.js.br +0 -0
  307. package/dist/geotrek-rando-widget/p-06df20f8.js.gz +0 -0
  308. package/dist/geotrek-rando-widget/p-06df20f8.js.map +0 -1
  309. package/dist/geotrek-rando-widget/p-165684be.entry.js.br +0 -0
  310. package/dist/geotrek-rando-widget/p-165684be.entry.js.gz +0 -0
  311. package/dist/geotrek-rando-widget/p-4d95a8f3.entry.js +0 -2
  312. package/dist/geotrek-rando-widget/p-4d95a8f3.entry.js.br +0 -0
  313. package/dist/geotrek-rando-widget/p-4d95a8f3.entry.js.gz +0 -0
  314. package/dist/geotrek-rando-widget/p-4d95a8f3.entry.js.map +0 -1
  315. package/dist/geotrek-rando-widget/p-5194053a.system.entry.js +0 -2
  316. package/dist/geotrek-rando-widget/p-5194053a.system.entry.js.br +0 -0
  317. package/dist/geotrek-rando-widget/p-5194053a.system.entry.js.gz +0 -0
  318. package/dist/geotrek-rando-widget/p-5194053a.system.entry.js.map +0 -1
  319. package/dist/geotrek-rando-widget/p-55569971.system.js +0 -2
  320. package/dist/geotrek-rando-widget/p-55569971.system.js.br +0 -0
  321. package/dist/geotrek-rando-widget/p-55569971.system.js.gz +0 -0
  322. package/dist/geotrek-rando-widget/p-55569971.system.js.map +0 -1
  323. package/dist/geotrek-rando-widget/p-896227f5.system.entry.js +0 -14
  324. package/dist/geotrek-rando-widget/p-896227f5.system.entry.js.br +0 -0
  325. package/dist/geotrek-rando-widget/p-896227f5.system.entry.js.gz +0 -0
  326. package/dist/geotrek-rando-widget/p-896227f5.system.entry.js.map +0 -1
  327. package/dist/geotrek-rando-widget/p-a1c76660.system.js +0 -2
  328. package/dist/geotrek-rando-widget/p-a1c76660.system.js.br +0 -0
  329. package/dist/geotrek-rando-widget/p-a1c76660.system.js.gz +0 -0
  330. package/dist/geotrek-rando-widget/p-a1c76660.system.js.map +0 -1
  331. package/dist/geotrek-rando-widget/p-a2575e40.js +0 -2
  332. package/dist/geotrek-rando-widget/p-a2575e40.js.br +0 -0
  333. package/dist/geotrek-rando-widget/p-a2575e40.js.gz +0 -0
  334. package/dist/geotrek-rando-widget/p-a2575e40.js.map +0 -1
  335. package/dist/geotrek-rando-widget/p-a9b9dd2a.system.js +0 -2
  336. package/dist/geotrek-rando-widget/p-a9b9dd2a.system.js.br +0 -0
  337. package/dist/geotrek-rando-widget/p-a9b9dd2a.system.js.gz +0 -0
  338. package/dist/geotrek-rando-widget/p-a9b9dd2a.system.js.map +0 -1
  339. package/dist/geotrek-rando-widget/p-c7bb2715.system.entry.js +0 -2
  340. package/dist/geotrek-rando-widget/p-c7bb2715.system.entry.js.br +0 -0
  341. package/dist/geotrek-rando-widget/p-c7bb2715.system.entry.js.gz +0 -0
  342. package/dist/geotrek-rando-widget/p-c7bb2715.system.entry.js.map +0 -1
  343. package/dist/geotrek-rando-widget/p-d92c9342.entry.js +0 -14
  344. package/dist/geotrek-rando-widget/p-d92c9342.entry.js.br +0 -0
  345. package/dist/geotrek-rando-widget/p-d92c9342.entry.js.gz +0 -0
  346. package/dist/geotrek-rando-widget/p-d92c9342.entry.js.map +0 -1
  347. package/dist/geotrek-rando-widget/p-e4dba310.system.entry.js.br +0 -0
  348. package/dist/geotrek-rando-widget/p-e4dba310.system.entry.js.gz +0 -0
  349. package/dist/geotrek-rando-widget/p-fa9a840a.entry.js +0 -2
  350. package/dist/geotrek-rando-widget/p-fa9a840a.entry.js.br +0 -0
  351. package/dist/geotrek-rando-widget/p-fa9a840a.entry.js.gz +0 -0
  352. package/dist/geotrek-rando-widget/p-fa9a840a.entry.js.map +0 -1
  353. /package/dist/geotrek-rando-widget/{p-165684be.entry.js.map → p-39bfe711.entry.js.map} +0 -0
  354. /package/dist/geotrek-rando-widget/{p-e4dba310.system.entry.js.map → p-bbe147a7.system.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- var translate={fr:{filter:"Filtrer",practice:"Pratique",difficulty:"Difficulté",duration:"Durée",length:"Longueur",treks:"randonnées",trek:"randonnée",showList:"Voir la liste",showMap:"Voir la carte",showRoute:"Voir l'itinéraire",showDetails:"Voir la fiche",downloads:"Téléchargements",description:"Description",departure:"Départ",arrival:"Arrivée",elevationProfile:"Profil altimétrique",roadAccess:"Accès routier",transport:"Transport",recommendations:"Recommandations",recommendedParking:"Parking conseillé",equipments:"Équipements",environmentalSensitiveAreas:"Zones de sensibilité environnementale",informationPlaces:"Lieux de renseignement",accessibility:"Accessibilité",accessibilityLevel:"Niveau d'accessibilité",accessibilitySlope:"Pente",accessibilityWidth:"Largeur",accessibilitySignage:"Signalisation",accessibilityCovering:"Revêtement",accessibilityExposure:"Exposition",accessibilityAdvices:"Conseils",pois:function(e){return"Les ".concat(e," patrimoines à découvrir")},sources:"Sources",cities:"Communes traversées",options:{presentation:"Présentation",description:"Description",recommendations:"Recommandations",environmentalSensitiveAreas:"Zones sensibles",informationPlaces:"Lieux d'informations",pois:"Patrimoines"},layers:{pointsReference:"Points de référence",parking:"Parking conseillé",sensitiveArea:"Zones de sensibilité environnementale",informationPlaces:"Lieux de renseignement",pois:"Patrimoines"},themes:"Thèmes",routes:"Type de parcours",elevation:"Denivelé positif",others:"Autres",districts:"Secteurs"},en:{filter:"Filter",practice:"Practice",difficulty:"Difficulty",duration:"Duration",length:"Length",treks:"Hikes",trek:"Hike",showList:"Show the list",showMap:"Show the map",showRoute:"Show the route",showDetails:"Show the details",downloads:"Downloads",description:"Description",departure:"Departure",arrival:"Arrival",elevationProfile:"Elevation profile",roadAccess:"Road acess",transport:"Transport",recommendations:"Recommendations",recommendedParking:"Parking recommended",equipments:"Equipements",environmentalSensitiveAreas:"Areas of environmental sensitivity",informationPlaces:"Information places",accessibility:"Accessibility",accessibilityLevel:"Accessibility level",accessibilitySlope:"Slope",accessibilityWidth:"Width",accessibilitySignage:"Signage",accessibilityCovering:"Covering",accessibilityExposure:"Exposure",accessibilityAdvices:"Advices",pois:function(e){return"".concat(e," points of interest")},sources:"Sources",cities:"Cities crossed",options:{presentation:"Presentation",description:"Description",recommendations:"Recommendations",environmentalSensitiveAreas:"Sensitive areas",informationPlaces:"Information places",pois:"Points of interest"},layers:{pointsReference:"Reference points",parking:"Parking",sensitiveArea:"Sensitive areas",informationPlaces:"Information places",pois:"Points of interest"},themes:"Themes",routes:"Type of course",elevation:"Positive elevation",others:"Others",districts:"Districts"}};export{translate as t};
2
- //# sourceMappingURL=i18n-301409fd.js.map
Binary file
Binary file
@@ -1 +0,0 @@
1
- {"version":3,"names":["translate","fr","filter","practice","difficulty","duration","length","treks","trek","showList","showMap","showRoute","showDetails","downloads","description","departure","arrival","elevationProfile","roadAccess","transport","recommendations","recommendedParking","equipments","environmentalSensitiveAreas","informationPlaces","accessibility","accessibilityLevel","accessibilitySlope","accessibilityWidth","accessibilitySignage","accessibilityCovering","accessibilityExposure","accessibilityAdvices","pois","poisLength","concat","sources","cities","options","presentation","layers","pointsReference","parking","sensitiveArea","themes","routes","elevation","others","districts","en"],"sources":["src/i18n/i18n.ts"],"sourcesContent":["interface Translation {\n filter: string;\n practice: string;\n difficulty: string;\n duration: string;\n length: string;\n treks: string;\n trek: string;\n showList: string;\n showMap: string;\n showRoute: string;\n showDetails: string;\n downloads: string;\n description: string;\n departure: string;\n arrival: string;\n elevationProfile: string;\n roadAccess: string;\n transport: string;\n recommendations: string;\n recommendedParking: string;\n equipments: string;\n environmentalSensitiveAreas: string;\n informationPlaces: string;\n accessibility: string;\n accessibilityLevel: string;\n accessibilitySlope: string;\n accessibilityWidth: string;\n accessibilitySignage: string;\n accessibilityCovering: string;\n accessibilityExposure: string;\n accessibilityAdvices: string;\n pois: Function;\n sources: string;\n cities: string;\n options: {\n presentation: string;\n description: string;\n recommendations: string;\n environmentalSensitiveAreas: string;\n informationPlaces: string;\n pois: string;\n };\n layers: {\n pointsReference: string;\n parking: string;\n sensitiveArea: string;\n informationPlaces: string;\n pois: string;\n };\n themes: string;\n routes: string;\n elevation: string;\n others: string;\n districts: string;\n}\n\ninterface AvailableTranslations {\n fr: Translation;\n en: Translation;\n}\n\nexport const translate: AvailableTranslations = {\n fr: {\n filter: 'Filtrer',\n practice: 'Pratique',\n difficulty: 'Difficulté',\n duration: 'Durée',\n length: 'Longueur',\n treks: 'randonnées',\n trek: 'randonnée',\n showList: 'Voir la liste',\n showMap: 'Voir la carte',\n showRoute: \"Voir l'itinéraire\",\n showDetails: 'Voir la fiche',\n downloads: 'Téléchargements',\n description: 'Description',\n departure: 'Départ',\n arrival: 'Arrivée',\n elevationProfile: 'Profil altimétrique',\n roadAccess: 'Accès routier',\n transport: 'Transport',\n recommendations: 'Recommandations',\n recommendedParking: 'Parking conseillé',\n equipments: 'Équipements',\n environmentalSensitiveAreas: 'Zones de sensibilité environnementale',\n informationPlaces: 'Lieux de renseignement',\n accessibility: 'Accessibilité',\n accessibilityLevel: \"Niveau d'accessibilité\",\n accessibilitySlope: 'Pente',\n accessibilityWidth: 'Largeur',\n accessibilitySignage: 'Signalisation',\n accessibilityCovering: 'Revêtement',\n accessibilityExposure: 'Exposition',\n accessibilityAdvices: 'Conseils',\n pois: (poisLength: number) => `Les ${poisLength} patrimoines à découvrir`,\n sources: 'Sources',\n cities: 'Communes traversées',\n options: {\n presentation: 'Présentation',\n description: 'Description',\n recommendations: 'Recommandations',\n environmentalSensitiveAreas: 'Zones sensibles',\n informationPlaces: \"Lieux d'informations\",\n pois: 'Patrimoines',\n },\n layers: {\n pointsReference: 'Points de référence',\n parking: 'Parking conseillé',\n sensitiveArea: 'Zones de sensibilité environnementale',\n informationPlaces: 'Lieux de renseignement',\n pois: 'Patrimoines',\n },\n themes: 'Thèmes',\n routes: 'Type de parcours',\n elevation: 'Denivelé positif',\n others: 'Autres',\n districts: 'Secteurs',\n },\n en: {\n filter: 'Filter',\n practice: 'Practice',\n difficulty: 'Difficulty',\n duration: 'Duration',\n length: 'Length',\n treks: 'Hikes',\n trek: 'Hike',\n showList: 'Show the list',\n showMap: 'Show the map',\n showRoute: 'Show the route',\n showDetails: 'Show the details',\n downloads: 'Downloads',\n description: 'Description',\n departure: 'Departure',\n arrival: 'Arrival',\n elevationProfile: 'Elevation profile',\n roadAccess: 'Road acess',\n transport: 'Transport',\n recommendations: 'Recommendations',\n recommendedParking: 'Parking recommended',\n equipments: 'Equipements',\n environmentalSensitiveAreas: 'Areas of environmental sensitivity',\n informationPlaces: 'Information places',\n accessibility: 'Accessibility',\n accessibilityLevel: 'Accessibility level',\n accessibilitySlope: 'Slope',\n accessibilityWidth: 'Width',\n accessibilitySignage: 'Signage',\n accessibilityCovering: 'Covering',\n accessibilityExposure: 'Exposure',\n accessibilityAdvices: 'Advices',\n pois: (poisLength: number) => `${poisLength} points of interest`,\n sources: 'Sources',\n cities: 'Cities crossed',\n options: {\n presentation: 'Presentation',\n description: 'Description',\n recommendations: 'Recommendations',\n environmentalSensitiveAreas: 'Sensitive areas',\n informationPlaces: 'Information places',\n pois: 'Points of interest',\n },\n layers: {\n pointsReference: 'Reference points',\n parking: 'Parking',\n sensitiveArea: 'Sensitive areas',\n informationPlaces: 'Information places',\n pois: 'Points of interest',\n },\n themes: 'Themes',\n routes: 'Type of course',\n elevation: 'Positive elevation',\n others: 'Others',\n districts: 'Districts',\n },\n};\n"],"mappings":"IA8DaA,UAAmC,CAC9CC,GAAI,CACFC,OAAQ,UACRC,SAAU,WACVC,WAAY,aACZC,SAAU,QACVC,OAAQ,WACRC,MAAO,aACPC,KAAM,YACNC,SAAU,gBACVC,QAAS,gBACTC,UAAW,oBACXC,YAAa,gBACbC,UAAW,kBACXC,YAAa,cACbC,UAAW,SACXC,QAAS,UACTC,iBAAkB,sBAClBC,WAAY,gBACZC,UAAW,YACXC,gBAAiB,kBACjBC,mBAAoB,oBACpBC,WAAY,cACZC,4BAA6B,w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UAAW,qBACXC,OAAQ,SACRC,UAAW,qB"}
Binary file
Binary file
@@ -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","api","languages","language","treks","currentTreks","treksWithinBounds","currentMapTreksBounds","difficulties","routes","practices","themes","cities","durations","lengths","elevations","currentSensitiveAreas","labels","districts","sources","accessibilities","accessibilitiesLevel","poiTypes","currentTrek","currentPois","currentInformationDesks","treksNetworkError","trekNetworkError","searchValue"],"sources":["node_modules/@stencil/store/dist/index.mjs","src/store/store.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} from 'types/types';\n\nconst { state, onChange, reset } = createStore<{\n api: string;\n languages: string[];\n language: string;\n treks: Treks;\n treksWithinBounds: Treks;\n currentMapTreksBounds: 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 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}>({\n api: null,\n languages: null,\n language: null,\n treks: null,\n currentTreks: null,\n treksWithinBounds: null,\n currentMapTreksBounds: 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 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});\n\nexport { onChange, reset };\n\nexport default state;\n"],"mappings":"uEAEA,IAAMA,YAAc,SAACC,EAAKC,EAAUC,GAChC,IAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,G,MAElB,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,E,CAEnB,EACA,IAAMM,SAAW,SAACC,EAAIC,GAClB,IAAIC,EACJ,OAAO,WAAC,IAAAC,EAAA,G,IAAA,IAAAC,EAAA,EAAAA,EAAAC,UAAAC,OAAAF,IAAO,CAAPD,EAAAC,GAAAC,UAAAD,E,CACJ,GAAIF,EAAW,CACXK,aAAaL,E,CAEjBA,EAAYM,YAAW,WACnBN,EAAY,EACZF,EAAES,WAAA,EAAIN,EAClB,GAAWF,EACX,CACA,EAWA,IAAMS,YAAc,SAACC,GAAiB,QAAE,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B,GAA6B2D,YA6BhC,CACDC,IAAK,KACLC,UAAW,KACXC,SAAU,KACVC,MAAO,KACPC,aAAc,KACdC,kBAAmB,KACnBC,sBAAuB,KACvBC,aAAc,KACdC,OAAQ,KACRC,UAAW,KACXC,OAAQ,KACRC,OAAQ,KACRC,UAAW,KACXC,QAAS,KACTC,WAAY,KACZC,sBAAuB,KACvBC,OAAQ,KACRC,UAAW,KACXC,QAAS,KACTC,gBAAiB,KACjBC,qBAAsB,KACtBC,SAAU,KACVC,YAAa,KACbC,YAAa,KACbC,wBAAyB,KACzBC,kBAAmB,MACnBC,iBAAkB,MAClBC,YAAa,OAzDPxD,MAAK/B,GAAA+B,MAAEc,SAAQ7C,GAAA6C,SAAEhC,MAAKb,GAAAa,a"}
@@ -1,2 +0,0 @@
1
- var __spreadArray=this&&this.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var a=0,n=e.length,i;a<n;a++){if(i||!(a in e)){if(!i)i=Array.prototype.slice.call(e,0,a);i[a]=e[a]}}return r.concat(i||Array.prototype.slice.call(e))};import{s as state}from"./store-2a612007.js";function formatDuration(r){var e;if(r<24){e="".concat(Math.floor(r),"h");if(r%1>0){e+="".concat(Math.round(60*(r%1)),"min")}}else{e="".concat(r/24,"j")}return e}function formatLength(r){return"".concat(Math.round(r/1e3),"km")}function formatAscent(r){return"".concat(r,"m")}function handleFiltersAndSearch(){var r=[{property:"practices",trekProperty:"practice",trekPropertyIsArray:false,type:"include"},{property:"difficulties",trekProperty:"difficulty",trekPropertyIsArray:false,type:"include"},{property:"durations",trekProperty:"duration",trekPropertyIsArray:false,type:"interval"},{property:"lengths",trekProperty:"length_2d",trekPropertyIsArray:false,type:"interval"},{property:"elevations",trekProperty:"ascent",trekPropertyIsArray:false,type:"interval"},{property:"themes",trekProperty:"themes",trekPropertyIsArray:true,type:"include"},{property:"routes",trekProperty:"route",trekPropertyIsArray:false,type:"include"},{property:"accessibilities",trekProperty:"accessibilities",trekPropertyIsArray:true,type:"include"},{property:"cities",trekProperty:"cities",trekPropertyIsArray:true,type:"include"},{property:"labels",trekProperty:"labels",trekPropertyIsArray:true,type:"include"},{property:"districts",trekProperty:"districts",trekPropertyIsArray:true,type:"include"}];var e=false;var t=[];var a=function(r){var a=state[r.property].filter((function(r){return r.selected})).map((function(r){return r.id}));if(a.length>0){if(t.length>0){if(r.type==="include"){if(r.trekPropertyIsArray){t=__spreadArray([],state.treks.filter((function(e){return e[r.trekProperty].some((function(r){return a.includes(r)}))})),true)}else{t=__spreadArray([],t.filter((function(e){return a.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){t=__spreadArray([],t.filter((function(e){var t=function(t){var a=state[r.property].find((function(r){return r.id===t}));if(e[r.trekProperty]>=a.minValue&&e[r.trekProperty]<=a.maxValue){return{value:true}}};for(var n=0,i=a;n<i.length;n++){var o=i[n];var s=t(o);if(typeof s==="object")return s.value}return false})),true)}}else{if(!e){e=true}if(r.type==="include"){if(r.trekPropertyIsArray){t=__spreadArray([],state.treks.filter((function(e){return e[r.trekProperty].some((function(r){return a.includes(r)}))})),true)}else{t=__spreadArray([],state.treks.filter((function(e){return a.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){var n;var i;var o=function(e){var t=state[r.property].find((function(r){return r.id===e}));if(isNaN(n)||t.minValue<n){n=t.minValue}if(isNaN(i)||t.maxValue>i){i=t.maxValue}};for(var s=0,p=a;s<p.length;s++){var u=p[s];o(u)}t=__spreadArray([],state.treks.filter((function(e){return e[r.trekProperty]>=n&&e[r.trekProperty]<=i})),true)}}}};for(var n=0,i=r;n<i.length;n++){var o=i[n];a(o)}var s=e?t:state.treks;return Boolean(state.searchValue)?s.filter((function(r){return r.name.toLowerCase().includes(state.searchValue.toLowerCase())})):s}export{formatLength as a,formatAscent as b,formatDuration as f,handleFiltersAndSearch as h};
2
- //# sourceMappingURL=utils-4b2144e3.js.map
Binary file
Binary file
@@ -1 +0,0 @@
1
- {"version":3,"names":["formatDuration","duration","formattedDuration","concat","Math","floor","round","formatLength","length","formatAscent","ascent","handleFiltersAndSearch","filters","property","trekProperty","trekPropertyIsArray","type","isUsingFilter","filtersTreks","filter","currentFiltersId","state","currentFilter","selected","map","id","__spreadArray","treks","trek","some","includes","currentFilterId","find","minValue","maxValue","_i","currentFiltersId_2","minValue_1","maxValue_1","isNaN","_a","currentFiltersId_1","filters_1","searchTreks","Boolean","searchValue","currentTrek","name","toLowerCase"],"sources":["src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { Filters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport function handleFiltersAndSearch(): Treks {\n const filters: Filters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include' },\n ];\n\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of filters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLowerCase().includes(state.searchValue.toLowerCase())) : searchTreks;\n}\n"],"mappings":"uSAGgBA,eAAeC,GAC7B,IAAIC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EAAKT,EAAOL,cAAtC,IAAqD,K,OAEhG,GAAIK,EAAOH,OAAS,WAAY,CACrC,IAAIqB,EACJ,IAAIC,E,eACOP,GACT,IAAMT,EAAgBD,MAAMF,EAAON,UAAUmB,MAAK,SAAAnB,GAAY,OAAAA,EAASY,KAAOM,CAAhB,IAC9D,GAAIQ,MAAMF,IAAaf,EAAcW,SAAWI,EAAU,CACxDA,EAAWf,EAAcW,Q,CAE3B,GAAIM,MAAMD,IAAahB,EAAcY,SAAWI,EAAU,CACxDA,EAAWhB,EAAcY,Q,GAN7B,IAA8B,IAAAM,EAAA,EAAAC,EAAArB,EAAAoB,EAAAC,EAAAjC,OAAAgC,IAAgB,CAAzC,IAAMT,EAAeU,EAAAD,G,EAAfT,E,CASXb,EAAYQ,cAAA,GAAOL,MAAMM,MAAMR,QAAO,SAAAS,GAAQ,OAAAA,EAAKT,EAAOL,eAAiBuB,GAAYT,EAAKT,EAAOL,eAAiBwB,CAAtE,IAA+E,K,KA7CrI,IAAqB,IAAAH,EAAA,EAAAO,EAAA9B,EAAAuB,EAAAO,EAAAlC,OAAA2B,IAAO,CAAvB,IAAMhB,EAAMuB,EAAAP,G,EAANhB,E,CAmDX,IAAMwB,EAAc1B,EAAgBC,EAAeG,MAAMM,MACzD,OAAOiB,QAAQvB,MAAMwB,aAAeF,EAAYxB,QAAO,SAAA2B,GAAe,OAAAA,EAAYC,KAAKC,cAAclB,SAAST,MAAMwB,YAAYG,cAA1D,IAA4EL,CACpJ,Q"}
@@ -1,2 +0,0 @@
1
- const e={fr:{filter:"Filtrer",practice:"Pratique",difficulty:"Difficulté",duration:"Durée",length:"Longueur",treks:"randonnées",trek:"randonnée",showList:"Voir la liste",showMap:"Voir la carte",showRoute:"Voir l'itinéraire",showDetails:"Voir la fiche",downloads:"Téléchargements",description:"Description",departure:"Départ",arrival:"Arrivée",elevationProfile:"Profil altimétrique",roadAccess:"Accès routier",transport:"Transport",recommendations:"Recommandations",recommendedParking:"Parking conseillé",equipments:"Équipements",environmentalSensitiveAreas:"Zones de sensibilité environnementale",informationPlaces:"Lieux de renseignement",accessibility:"Accessibilité",accessibilityLevel:"Niveau d'accessibilité",accessibilitySlope:"Pente",accessibilityWidth:"Largeur",accessibilitySignage:"Signalisation",accessibilityCovering:"Revêtement",accessibilityExposure:"Exposition",accessibilityAdvices:"Conseils",pois:e=>`Les ${e} patrimoines à découvrir`,sources:"Sources",cities:"Communes traversées",options:{presentation:"Présentation",description:"Description",recommendations:"Recommandations",environmentalSensitiveAreas:"Zones sensibles",informationPlaces:"Lieux d'informations",pois:"Patrimoines"},layers:{pointsReference:"Points de référence",parking:"Parking conseillé",sensitiveArea:"Zones de sensibilité environnementale",informationPlaces:"Lieux de renseignement",pois:"Patrimoines"},themes:"Thèmes",routes:"Type de parcours",elevation:"Denivelé positif",others:"Autres",districts:"Secteurs"},en:{filter:"Filter",practice:"Practice",difficulty:"Difficulty",duration:"Duration",length:"Length",treks:"Hikes",trek:"Hike",showList:"Show the list",showMap:"Show the map",showRoute:"Show the route",showDetails:"Show the details",downloads:"Downloads",description:"Description",departure:"Departure",arrival:"Arrival",elevationProfile:"Elevation profile",roadAccess:"Road acess",transport:"Transport",recommendations:"Recommendations",recommendedParking:"Parking recommended",equipments:"Equipements",environmentalSensitiveAreas:"Areas of environmental sensitivity",informationPlaces:"Information places",accessibility:"Accessibility",accessibilityLevel:"Accessibility level",accessibilitySlope:"Slope",accessibilityWidth:"Width",accessibilitySignage:"Signage",accessibilityCovering:"Covering",accessibilityExposure:"Exposure",accessibilityAdvices:"Advices",pois:e=>`${e} points of interest`,sources:"Sources",cities:"Cities crossed",options:{presentation:"Presentation",description:"Description",recommendations:"Recommendations",environmentalSensitiveAreas:"Sensitive areas",informationPlaces:"Information places",pois:"Points of interest"},layers:{pointsReference:"Reference points",parking:"Parking",sensitiveArea:"Sensitive areas",informationPlaces:"Information places",pois:"Points of interest"},themes:"Themes",routes:"Type of course",elevation:"Positive elevation",others:"Others",districts:"Districts"}};export{e as t};
2
- //# sourceMappingURL=p-0218dbae.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["translate","fr","filter","practice","difficulty","duration","length","treks","trek","showList","showMap","showRoute","showDetails","downloads","description","departure","arrival","elevationProfile","roadAccess","transport","recommendations","recommendedParking","equipments","environmentalSensitiveAreas","informationPlaces","accessibility","accessibilityLevel","accessibilitySlope","accessibilityWidth","accessibilitySignage","accessibilityCovering","accessibilityExposure","accessibilityAdvices","pois","poisLength","sources","cities","options","presentation","layers","pointsReference","parking","sensitiveArea","themes","routes","elevation","others","districts","en"],"sources":["./src/i18n/i18n.ts"],"sourcesContent":["interface Translation {\n filter: string;\n practice: string;\n difficulty: string;\n duration: string;\n length: string;\n treks: string;\n trek: string;\n showList: string;\n showMap: string;\n showRoute: string;\n showDetails: string;\n downloads: string;\n description: string;\n departure: string;\n arrival: string;\n elevationProfile: string;\n roadAccess: string;\n transport: string;\n recommendations: string;\n recommendedParking: string;\n equipments: string;\n environmentalSensitiveAreas: string;\n informationPlaces: string;\n accessibility: string;\n accessibilityLevel: string;\n accessibilitySlope: string;\n accessibilityWidth: string;\n accessibilitySignage: string;\n accessibilityCovering: string;\n accessibilityExposure: string;\n accessibilityAdvices: string;\n pois: Function;\n sources: string;\n cities: string;\n options: {\n presentation: string;\n description: string;\n recommendations: string;\n environmentalSensitiveAreas: string;\n informationPlaces: string;\n pois: string;\n };\n layers: {\n pointsReference: string;\n parking: string;\n sensitiveArea: string;\n informationPlaces: string;\n pois: string;\n };\n themes: string;\n routes: string;\n elevation: string;\n others: string;\n districts: string;\n}\n\ninterface AvailableTranslations {\n fr: Translation;\n en: Translation;\n}\n\nexport const translate: AvailableTranslations = {\n fr: {\n filter: 'Filtrer',\n practice: 'Pratique',\n difficulty: 'Difficulté',\n duration: 'Durée',\n length: 'Longueur',\n treks: 'randonnées',\n trek: 'randonnée',\n showList: 'Voir la liste',\n showMap: 'Voir la carte',\n showRoute: \"Voir l'itinéraire\",\n showDetails: 'Voir la fiche',\n downloads: 'Téléchargements',\n description: 'Description',\n departure: 'Départ',\n arrival: 'Arrivée',\n elevationProfile: 'Profil altimétrique',\n roadAccess: 'Accès routier',\n transport: 'Transport',\n recommendations: 'Recommandations',\n recommendedParking: 'Parking conseillé',\n equipments: 'Équipements',\n environmentalSensitiveAreas: 'Zones de sensibilité environnementale',\n informationPlaces: 'Lieux de renseignement',\n accessibility: 'Accessibilité',\n accessibilityLevel: \"Niveau d'accessibilité\",\n accessibilitySlope: 'Pente',\n accessibilityWidth: 'Largeur',\n accessibilitySignage: 'Signalisation',\n accessibilityCovering: 'Revêtement',\n accessibilityExposure: 'Exposition',\n accessibilityAdvices: 'Conseils',\n pois: (poisLength: number) => `Les ${poisLength} patrimoines à découvrir`,\n sources: 'Sources',\n cities: 'Communes traversées',\n options: {\n presentation: 'Présentation',\n description: 'Description',\n recommendations: 'Recommandations',\n environmentalSensitiveAreas: 'Zones sensibles',\n informationPlaces: \"Lieux d'informations\",\n pois: 'Patrimoines',\n },\n layers: {\n pointsReference: 'Points de référence',\n parking: 'Parking conseillé',\n sensitiveArea: 'Zones de sensibilité environnementale',\n informationPlaces: 'Lieux de renseignement',\n pois: 'Patrimoines',\n },\n themes: 'Thèmes',\n routes: 'Type de parcours',\n elevation: 'Denivelé positif',\n others: 'Autres',\n districts: 'Secteurs',\n },\n en: {\n filter: 'Filter',\n practice: 'Practice',\n difficulty: 'Difficulty',\n duration: 'Duration',\n length: 'Length',\n treks: 'Hikes',\n trek: 'Hike',\n showList: 'Show the list',\n showMap: 'Show the map',\n showRoute: 'Show the route',\n showDetails: 'Show the details',\n downloads: 'Downloads',\n description: 'Description',\n departure: 'Departure',\n arrival: 'Arrival',\n elevationProfile: 'Elevation profile',\n roadAccess: 'Road acess',\n transport: 'Transport',\n recommendations: 'Recommendations',\n recommendedParking: 'Parking recommended',\n equipments: 'Equipements',\n environmentalSensitiveAreas: 'Areas of environmental sensitivity',\n informationPlaces: 'Information places',\n accessibility: 'Accessibility',\n accessibilityLevel: 'Accessibility level',\n accessibilitySlope: 'Slope',\n accessibilityWidth: 'Width',\n accessibilitySignage: 'Signage',\n accessibilityCovering: 'Covering',\n accessibilityExposure: 'Exposure',\n accessibilityAdvices: 'Advices',\n pois: (poisLength: number) => `${poisLength} points of interest`,\n sources: 'Sources',\n cities: 'Cities crossed',\n options: {\n presentation: 'Presentation',\n description: 'Description',\n recommendations: 'Recommendations',\n environmentalSensitiveAreas: 'Sensitive areas',\n informationPlaces: 'Information places',\n pois: 'Points of interest',\n },\n layers: {\n pointsReference: 'Reference points',\n parking: 'Parking',\n sensitiveArea: 'Sensitive areas',\n informationPlaces: 'Information places',\n pois: 'Points of interest',\n },\n themes: 'Themes',\n routes: 'Type of course',\n elevation: 'Positive elevation',\n others: 'Others',\n districts: 'Districts',\n },\n};\n"],"mappings":"MA8DaA,EAAmC,CAC9CC,GAAI,CACFC,OAAQ,UACRC,SAAU,WACVC,WAAY,aACZC,SAAU,QACVC,OAAQ,WACRC,MAAO,aACPC,KAAM,YACNC,SAAU,gBACVC,QAAS,gBACTC,UAAW,oBACXC,YAAa,gBACbC,UAAW,kBACXC,YAAa,cACbC,UAAW,SACXC,QAAS,UACTC,iBAAkB,sBAClBC,WAAY,gBACZC,UAAW,YACXC,gBAAiB,kBACjBC,mBAAoB,oBACpBC,WAAY,cACZC,4BAA6B,wCAC7BC,kBAAmB,yBACnBC,cAAe,gBACfC,mBAAoB,yBACpBC,mBAAoB,QACpBC,mBAAoB,UACpBC,qBAAsB,gBACtBC,sBAAuB,aACvBC,sBAAuB,aACvBC,qBAAsB,WACtBC,KAAOC,GAAuB,OAAOA,4BACrCC,QAAS,UACTC,OAAQ,sBACRC,QAAS,CACPC,aAAc,eACdxB,YAAa,cACbM,gBAAiB,kBACjBG,4BAA6B,kBAC7BC,kBAAmB,uBACnBS,KAAM,eAERM,OAAQ,CACNC,gBAAiB,sBACjBC,QAAS,oBACTC,cAAe,wCACflB,kBAAmB,yBACnBS,KAAM,eAERU,OAAQ,SACRC,OAAQ,mBACRC,UAAW,mBACXC,OAAQ,SACRC,UAAW,YAEbC,GAAI,CACF9C,OAAQ,SACRC,SAAU,WACVC,WAAY,aACZC,SAAU,WACVC,OAAQ,SACRC,MAAO,QACPC,KAAM,OACNC,SAAU,gBACVC,QAAS,eACTC,UAAW,iBACXC,YAAa,mBACbC,UAAW,YACXC,YAAa,cACbC,UAAW,YACXC,QAAS,UACTC,iBAAkB,oBAClBC,WAAY,aACZC,UAAW,YACXC,gBAAiB,kBACjBC,mBAAoB,sBACpBC,WAAY,cACZC,4BAA6B,qCAC7BC,kBAAmB,qBACnBC,cAAe,gBACfC,mBAAoB,sBACpBC,mBAAoB,QACpBC,mBAAoB,QACpBC,qBAAsB,UACtBC,sBAAuB,WACvBC,sBAAuB,WACvBC,qBAAsB,UACtBC,KAAOC,GAAuB,GAAGA,uBACjCC,QAAS,UACTC,OAAQ,iBACRC,QAAS,CACPC,aAAc,eACdxB,YAAa,cACbM,gBAAiB,kBACjBG,4BAA6B,kBAC7BC,kBAAmB,qBACnBS,KAAM,sBAERM,OAAQ,CACNC,gBAAiB,mBACjBC,QAAS,UACTC,cAAe,kBACflB,kBAAmB,qBACnBS,KAAM,sBAERU,OAAQ,SACRC,OAAQ,iBACRC,UAAW,qBACXC,OAAQ,SACRC,UAAW,qB"}
@@ -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","api","languages","language","treks","currentTreks","treksWithinBounds","currentMapTreksBounds","difficulties","routes","practices","themes","cities","durations","lengths","elevations","currentSensitiveAreas","labels","districts","sources","accessibilities","accessibilitiesLevel","poiTypes","currentTrek","currentPois","currentInformationDesks","treksNetworkError","trekNetworkError","searchValue"],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/store.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} from 'types/types';\n\nconst { state, onChange, reset } = createStore<{\n api: string;\n languages: string[];\n language: string;\n treks: Treks;\n treksWithinBounds: Treks;\n currentMapTreksBounds: 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 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}>({\n api: null,\n languages: null,\n language: null,\n treks: null,\n currentTreks: null,\n treksWithinBounds: null,\n currentMapTreksBounds: 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 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});\n\nexport { onChange, reset };\n\nexport default state;\n"],"mappings":"sCAEA,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,IAAIC,KACP,GAAID,EAAW,CACXE,aAAaF,EACzB,CACQA,EAAYG,YAAW,KACnBH,EAAY,EACZF,KAAMG,EAAK,GACZF,EAAG,CACT,EAYL,MAAMK,EAAeC,KAAmB,gBAAiBA,IAAiBA,EAAaD,YACvF,MAAME,EAAkBT,GAAUR,IAC9B,IAAK,IAAIkB,KAAOlB,EAAImB,OAAQ,CACxBnB,EAAIK,IAAIa,EAAKlB,EAAII,IAAIc,GAAKE,OAAOL,GACzC,IACG,KACH,MAAMM,EAAsB,KACxB,UAAWC,IAAoB,WAAY,CAGvC,MAAO,EACf,CACI,MAAMC,EAAe,IAAIC,IACzB,MAAO,CACHC,QAAS,IAAMF,EAAaG,QAC5BtB,IAAMH,IACF,MAAM0B,EAAML,IACZ,GAAIK,EAAK,CACL5B,EAAYwB,EAActB,EAAU0B,EACpD,GAEQtB,IAAMJ,IACF,MAAM2B,EAAWL,EAAanB,IAAIH,GAClC,GAAI2B,EAAU,CACVL,EAAalB,IAAIJ,EAAU2B,EAASR,OAAOS,GAC3D,CACYZ,EAAgBM,EAAa,EAEjCO,MAAO,KACHP,EAAaQ,SAASC,GAASA,EAAKD,QAAQF,KAC5CZ,EAAgBM,E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AAoBC,EAAcC,GAC9CrC,EAAIkE,IAAI7C,KACR,OAAOrB,CAAG,E,MCtKRgD,MAAEA,EAAKc,SAAEA,EAAQhC,MAAEA,GAAU+C,EA6BhC,CACDC,IAAK,KACLC,UAAW,KACXC,SAAU,KACVC,MAAO,KACPC,aAAc,KACdC,kBAAmB,KACnBC,sBAAuB,KACvBC,aAAc,KACdC,OAAQ,KACRC,UAAW,KACXC,OAAQ,KACRC,OAAQ,KACRC,UAAW,KACXC,QAAS,KACTC,WAAY,KACZC,sBAAuB,KACvBC,OAAQ,KACRC,UAAW,KACXC,QAAS,KACTC,gBAAiB,KACjBC,qBAAsB,KACtBC,SAAU,KACVC,YAAa,KACbC,YAAa,KACbC,wBAAyB,KACzBC,kBAAmB,MACnBC,iBAAkB,MAClBC,YAAa,c"}
@@ -1,2 +0,0 @@
1
- import{r as e,c as i,h as t,H as a}from"./p-b4e1f9ae.js";import{s as r,o as n,r as o}from"./p-06df20f8.js";import{f as s,a as c,b as l}from"./p-a2575e40.js";const d='.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}.trek-card-container,.trek-card-large-view-container{cursor:pointer;font-family:"Roboto";border-radius:12px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);background-color:var(--color-surface-container-low)}.trek-card-container .image,.trek-card-large-view-container .image{-o-object-fit:cover;object-fit:cover;border-top-left-radius:12px;border-top-right-radius:12px}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:8px 16px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500;margin-bottom:4px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .themes-container .theme,.trek-card-large-view-container .sub-container .themes-container .theme{background-color:var(--color-secondary-container);color:var(--color-on-secondary-container);border-radius:8px;padding:8px 16px;margin:0px 8px 8px 0px;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:1px solid var(--color-outline);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:var(--color-on-surface);font-size:14px;line-height:20px;font-weight:500}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.trek-card-large-view-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:50%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2),.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label span,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label span{font-size:24px;width:24px;height:auto;margin-right:8px}.trek-card-container .sub-container .icons-labels-container .row .practice img,.trek-card-large-view-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary-app)}.trek-card-container{width:350px}.trek-card-container .image{width:100%;max-height:200px}.trek-card-large-view-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.trek-card-large-view-container .image{width:250px}';const h=class{constructor(t){e(this,t);this.trekCardPress=i(this,"trekCardPress",7);this.currentTrek=undefined;this.difficulty=undefined;this.route=undefined;this.practice=undefined;this.themes=undefined;this.departureCity=undefined;this.trek=undefined;this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorSurfaceContainerLow="#f7f2fa";this.isLargeView=false;this.resetStoreOnDisconnected=true}connectedCallback(){this.currentTrek=this.trek?this.trek:r.currentTrek;if(this.currentTrek){this.difficulty=r.difficulties.find((e=>e.id===this.currentTrek.difficulty));this.route=r.routes.find((e=>e.id===this.currentTrek.route));this.practice=r.practices.find((e=>e.id===this.currentTrek.practice));this.themes=r.themes.filter((e=>this.currentTrek.themes.includes(e.id)));this.departureCity=r.cities.find((e=>e.id===this.currentTrek.departure_city))}n("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:r.currentTrek;if(this.currentTrek){this.difficulty=r.difficulties.find((e=>e.id===this.currentTrek.difficulty));this.route=r.routes.find((e=>e.id===this.currentTrek.route));this.practice=r.practices.find((e=>e.id===this.currentTrek.practice));this.themes=r.themes.filter((e=>this.currentTrek.themes.includes(e.id)));this.departureCity=r.cities.find((e=>e.id===this.currentTrek.departure_city))}}))}disconnectedCallback(){if(this.resetStoreOnDisconnected){o()}}render(){var e,i,r,n,o,d,h;return t(a,{style:{width:this.isLargeView?"100%":"auto","--color-primary-app":this.colorPrimaryApp,"--color-on-surface":this.colorOnSurface,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-surface-container-low":this.colorSurfaceContainerLow}},this.currentTrek&&t("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container",onClick:()=>this.trekCardPress.emit(this.currentTrek.id)},this.currentTrek.attachments.filter((e=>e.type==="image")).length>0&&t("img",{class:"image",src:`${this.currentTrek.attachments.filter((e=>e.type==="image"))[0].thumbnail}`,loading:"lazy"}),t("div",{class:"sub-container"},this.departureCity&&t("div",{class:"departure"},this.departureCity.name),t("div",{class:"name"},(e=this.currentTrek)===null||e===void 0?void 0:e.name),t("div",{class:"themes-container"},this.themes.map((e=>t("div",{class:"theme"},e.label)))),t("div",{class:"icons-labels-container"},t("div",{class:"row"},t("div",{class:"icon-label difficulty"},((i=this.difficulty)===null||i===void 0?void 0:i.pictogram)&&t("img",{src:this.difficulty.pictogram}),(r=this.difficulty)===null||r===void 0?void 0:r.label),t("div",{class:"icon-label duration"},t("span",{class:"material-symbols material-symbols-outlined"},"timelapse"),s(this.currentTrek.duration))),t("div",{class:"row"},t("div",{class:"icon-label length"},t("span",{class:"material-symbols material-symbols-outlined"},"open_in_full"),c(this.currentTrek.length_2d)),t("div",{class:"icon-label ascent"},t("span",{class:"material-symbols material-symbols-outlined"},"moving"),l(this.currentTrek.ascent))),t("div",{class:"row"},t("div",{class:"icon-label route"},((n=this.route)===null||n===void 0?void 0:n.pictogram)&&t("img",{src:this.route.pictogram}),(o=this.route)===null||o===void 0?void 0:o.route),t("div",{class:"icon-label practice"},((d=this.practice)===null||d===void 0?void 0:d.pictogram)&&t("img",{src:this.practice.pictogram}),(h=this.practice)===null||h===void 0?void 0:h.name))))))}};h.style=d;export{h as grw_trek_card};
2
- //# sourceMappingURL=p-4d95a8f3.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["grwTrekCardCss","GrwTrekCard","connectedCallback","this","currentTrek","trek","state","difficulty","difficulties","find","id","route","routes","practice","practices","themes","filter","theme","includes","departureCity","cities","city","departure_city","onChange","disconnectedCallback","resetStoreOnDisconnected","reset","render","h","Host","style","width","isLargeView","colorPrimaryApp","colorOnSurface","colorSecondaryContainer","colorOnSecondaryContainer","colorSurfaceContainerLow","class","onClick","trekCardPress","emit","attachments","attachment","type","length","src","thumbnail","loading","name","_a","map","label","_b","pictogram","_c","formatDuration","duration","formatLength","length_2d","formatAscent","ascent","_d","_e","_f","_g"],"sources":["./src/components/grw-trek-card/grw-trek-card.scss?tag=grw-trek-card&encapsulation=shadow","./src/components/grw-trek-card/grw-trek-card.tsx"],"sourcesContent":[".material-symbols {\n font-family: 'Material Symbols Outlined';\n}\n\n.material-symbols-outlined {\n font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;\n}\n\n.trek-card-container,\n.trek-card-large-view-container {\n cursor: pointer;\n font-family: 'Roboto';\n border-radius: 12px;\n box-shadow: var(--elevation-1);\n background-color: var(--color-surface-container-low);\n .image {\n object-fit: cover;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n }\n .sub-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 8px 16px;\n .name {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n margin-bottom: 8px;\n }\n .departure {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n margin-bottom: 4px;\n }\n .themes-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n .theme {\n background-color: var(--color-secondary-container);\n color: var(--color-on-secondary-container);\n border-radius: 8px;\n padding: 8px 16px;\n margin: 0px 8px 8px 0px;\n box-shadow: var(--elevation-0);\n border: 1px solid var(--color-outline);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n }\n }\n .icons-labels-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n color: var(--color-on-surface);\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n .row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n &:not(:last-child) {\n margin-bottom: 12px;\n }\n .icon-label {\n &:nth-child(2) {\n margin: 0px 4px;\n }\n display: flex;\n align-items: center;\n width: 50%;\n img,\n span {\n font-size: 24px;\n width: 24px;\n height: auto;\n margin-right: 8px;\n }\n }\n .practice {\n img {\n background-color: var(--color-primary-app);\n }\n }\n }\n }\n }\n}\n\n.trek-card-container {\n width: 350px;\n .image {\n width: 100%;\n max-height: 200px;\n }\n}\n\n.trek-card-large-view-container {\n display: flex;\n flex-direction: row;\n .image {\n width: 250px;\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, State } from '@stencil/core';\nimport state, { onChange, reset } from 'store/store';\nimport { City, Difficulty, Practice, Route, Themes, Trek } from 'types/types';\nimport { formatDuration, formatLength, formatAscent } from 'utils/utils';\n\n@Component({\n tag: 'grw-trek-card',\n styleUrl: 'grw-trek-card.scss',\n shadow: true,\n})\nexport class GrwTrekCard {\n @Event() trekCardPress: EventEmitter<number>;\n @State() currentTrek: Trek;\n @State() difficulty: Difficulty;\n @State() route: Route;\n @State() practice: Practice;\n @State() themes: Themes;\n @State() departureCity: City;\n @Prop() trek: Trek;\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() isLargeView = false;\n @Prop() resetStoreOnDisconnected = true;\n\n connectedCallback() {\n this.currentTrek = this.trek ? this.trek : state.currentTrek;\n if (this.currentTrek) {\n this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);\n this.route = state.routes.find(route => route.id === this.currentTrek.route);\n this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);\n this.themes = state.themes.filter(theme => this.currentTrek.themes.includes(theme.id));\n this.departureCity = state.cities.find(city => city.id === this.currentTrek.departure_city);\n }\n onChange('currentTrek', () => {\n this.currentTrek = this.trek ? this.trek : state.currentTrek;\n if (this.currentTrek) {\n this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);\n this.route = state.routes.find(route => route.id === this.currentTrek.route);\n this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);\n this.themes = state.themes.filter(theme => this.currentTrek.themes.includes(theme.id));\n this.departureCity = state.cities.find(city => city.id === this.currentTrek.departure_city);\n }\n });\n }\n\n disconnectedCallback() {\n if (this.resetStoreOnDisconnected) {\n reset();\n }\n }\n\n render() {\n return (\n <Host\n style={{\n 'width': this.isLargeView ? '100%' : 'auto',\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n }}\n >\n {this.currentTrek && (\n <div class={this.isLargeView ? 'trek-card-large-view-container' : 'trek-card-container'} onClick={() => this.trekCardPress.emit(this.currentTrek.id)}>\n {this.currentTrek.attachments.filter(attachment => attachment.type === 'image').length > 0 && (\n <img class=\"image\" src={`${this.currentTrek.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`} loading=\"lazy\" />\n )}\n <div class=\"sub-container\">\n {this.departureCity && <div class=\"departure\">{this.departureCity.name}</div>}\n <div class=\"name\">{this.currentTrek?.name}</div>\n <div class=\"themes-container\">\n {this.themes.map(theme => (\n <div class=\"theme\">{theme.label}</div>\n ))}\n </div>\n <div class=\"icons-labels-container\">\n <div class=\"row\">\n <div class=\"icon-label difficulty\">\n {this.difficulty?.pictogram && <img src={this.difficulty.pictogram} />}\n {this.difficulty?.label}\n </div>\n <div class=\"icon-label duration\">\n <span class=\"material-symbols material-symbols-outlined\">timelapse</span>\n {formatDuration(this.currentTrek.duration)}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"icon-label length\">\n <span class=\"material-symbols material-symbols-outlined\">open_in_full</span>\n {formatLength(this.currentTrek.length_2d)}\n </div>\n <div class=\"icon-label ascent\">\n <span class=\"material-symbols material-symbols-outlined\">moving</span>\n {formatAscent(this.currentTrek.ascent)}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"icon-label route\">\n {this.route?.pictogram && <img src={this.route.pictogram} />}\n {this.route?.route}\n </div>\n <div class=\"icon-label practice\">\n {this.practice?.pictogram && <img src={this.practice.pictogram} />}\n {this.practice?.name}\n </div>\n </div>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"6JAAA,MAAMA,EAAiB,wqI,MCUVC,EAAW,M,oQASI,U,oBACD,U,6BACS,U,+BACE,U,8BACD,U,iBACb,M,8BACa,I,CAEnCC,oBACEC,KAAKC,YAAcD,KAAKE,KAAOF,KAAKE,KAAOC,EAAMF,YACjD,GAAID,KAAKC,YAAa,CACpBD,KAAKI,WAAaD,EAAME,aAAaC,MAAKF,GAAcA,EAAWG,KAAOP,KAAKC,YAAYG,aAC3FJ,KAAKQ,MAAQL,EAAMM,OAAOH,MAAKE,GAASA,EAAMD,KAAOP,KAAKC,YAAYO,QACtER,KAAKU,SAAWP,EAAMQ,UAAUL,MAAKI,GAAYA,EAASH,KAAOP,KAAKC,YAAYS,WAClFV,KAAKY,OAAST,EAAMS,OAAOC,QAAOC,GAASd,KAAKC,YAAYW,OAAOG,SAASD,EAAMP,MAClFP,KAAKgB,cAAgBb,EAAMc,OAAOX,MAAKY,GAAQA,EAAKX,KAAOP,KAAKC,YAAYkB,gB,CAE9EC,EAAS,eAAe,KACtBpB,KAAKC,YAAcD,KAAKE,KAAOF,KAAKE,KAAOC,EAAMF,YACjD,GAAID,KAAKC,YAAa,CACpBD,KAAKI,WAAaD,EAAME,aAAaC,MAAKF,GAAcA,EAAWG,KAAOP,KAAKC,YAAYG,aAC3FJ,KAAKQ,MAAQL,EAAMM,OAAOH,MAAKE,GAASA,EAAMD,KAAOP,KAAKC,YAA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,cAAU,MAAA8C,SAAA,SAAAA,EAAEC,YAAa1B,EAAA,OAAKkB,IAAK3C,KAAKI,WAAW+C,aACxDC,EAAApD,KAAKI,cAAU,MAAAgD,SAAA,S,EAAEH,OAEpBxB,EAAA,OAAKU,MAAM,uBACTV,EAAA,QAAMU,MAAM,8CAA4C,aACvDkB,EAAerD,KAAKC,YAAYqD,YAGrC7B,EAAA,OAAKU,MAAM,OACTV,EAAA,OAAKU,MAAM,qBACTV,EAAA,QAAMU,MAAM,8CAA4C,gBACvDoB,EAAavD,KAAKC,YAAYuD,YAEjC/B,EAAA,OAAKU,MAAM,qBACTV,EAAA,QAAMU,MAAM,8CAA4C,UACvDsB,EAAazD,KAAKC,YAAYyD,UAGnCjC,EAAA,OAAKU,MAAM,OACTV,EAAA,OAAKU,MAAM,sBACRwB,EAAA3D,KAAKQ,SAAK,MAAAmD,SAAA,SAAAA,EAAER,YAAa1B,EAAA,OAAKkB,IAAK3C,KAAKQ,MAAM2C,aAC9CS,EAAA5D,KAAKQ,SAAK,MAAAoD,SAAA,S,EAAEpD,OAEfiB,EAAA,OAAKU,MAAM,yBACR0B,EAAA7D,KAAKU,YAAQ,MAAAmD,SAAA,SAAAA,EAAEV,YAAa1B,EAAA,OAAKkB,IAAK3C,KAAKU,SAASyC,aACpDW,EAAA9D,KAAKU,YAAQ,MAAAoD,SAAA,S,EAAEhB,U"}
@@ -1,2 +0,0 @@
1
- System.register(["./p-266b2cee.system.js","./p-a9b9dd2a.system.js","./p-55569971.system.js"],(function(e){"use strict";var r,t,i,n,a,o,c,s,l,d;return{setters:[function(e){r=e.r;t=e.c;i=e.h;n=e.H},function(e){a=e.s;o=e.o;c=e.r},function(e){s=e.f;l=e.a;d=e.b}],execute:function(){var u='.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}.trek-card-container,.trek-card-large-view-container{cursor:pointer;font-family:"Roboto";border-radius:12px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);background-color:var(--color-surface-container-low)}.trek-card-container .image,.trek-card-large-view-container .image{-o-object-fit:cover;object-fit:cover;border-top-left-radius:12px;border-top-right-radius:12px}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:8px 16px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500;margin-bottom:4px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .themes-container .theme,.trek-card-large-view-container .sub-container .themes-container .theme{background-color:var(--color-secondary-container);color:var(--color-on-secondary-container);border-radius:8px;padding:8px 16px;margin:0px 8px 8px 0px;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:1px solid var(--color-outline);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:var(--color-on-surface);font-size:14px;line-height:20px;font-weight:500}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.trek-card-large-view-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:50%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2),.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label span,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label span{font-size:24px;width:24px;height:auto;margin-right:8px}.trek-card-container .sub-container .icons-labels-container .row .practice img,.trek-card-large-view-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary-app)}.trek-card-container{width:350px}.trek-card-container .image{width:100%;max-height:200px}.trek-card-large-view-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.trek-card-large-view-container .image{width:250px}';var f=e("grw_trek_card",function(){function e(e){r(this,e);this.trekCardPress=t(this,"trekCardPress",7);this.currentTrek=undefined;this.difficulty=undefined;this.route=undefined;this.practice=undefined;this.themes=undefined;this.departureCity=undefined;this.trek=undefined;this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorSurfaceContainerLow="#f7f2fa";this.isLargeView=false;this.resetStoreOnDisconnected=true}e.prototype.connectedCallback=function(){var e=this;this.currentTrek=this.trek?this.trek:a.currentTrek;if(this.currentTrek){this.difficulty=a.difficulties.find((function(r){return r.id===e.currentTrek.difficulty}));this.route=a.routes.find((function(r){return r.id===e.currentTrek.route}));this.practice=a.practices.find((function(r){return r.id===e.currentTrek.practice}));this.themes=a.themes.filter((function(r){return e.currentTrek.themes.includes(r.id)}));this.departureCity=a.cities.find((function(r){return r.id===e.currentTrek.departure_city}))}o("currentTrek",(function(){e.currentTrek=e.trek?e.trek:a.currentTrek;if(e.currentTrek){e.difficulty=a.difficulties.find((function(r){return r.id===e.currentTrek.difficulty}));e.route=a.routes.find((function(r){return r.id===e.currentTrek.route}));e.practice=a.practices.find((function(r){return r.id===e.currentTrek.practice}));e.themes=a.themes.filter((function(r){return e.currentTrek.themes.includes(r.id)}));e.departureCity=a.cities.find((function(r){return r.id===e.currentTrek.departure_city}))}}))};e.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){c()}};e.prototype.render=function(){var e=this;var r,t,a,o,c,u,f;return i(n,{style:{width:this.isLargeView?"100%":"auto","--color-primary-app":this.colorPrimaryApp,"--color-on-surface":this.colorOnSurface,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-surface-container-low":this.colorSurfaceContainerLow}},this.currentTrek&&i("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container",onClick:function(){return e.trekCardPress.emit(e.currentTrek.id)}},this.currentTrek.attachments.filter((function(e){return e.type==="image"})).length>0&&i("img",{class:"image",src:"".concat(this.currentTrek.attachments.filter((function(e){return e.type==="image"}))[0].thumbnail),loading:"lazy"}),i("div",{class:"sub-container"},this.departureCity&&i("div",{class:"departure"},this.departureCity.name),i("div",{class:"name"},(r=this.currentTrek)===null||r===void 0?void 0:r.name),i("div",{class:"themes-container"},this.themes.map((function(e){return i("div",{class:"theme"},e.label)}))),i("div",{class:"icons-labels-container"},i("div",{class:"row"},i("div",{class:"icon-label difficulty"},((t=this.difficulty)===null||t===void 0?void 0:t.pictogram)&&i("img",{src:this.difficulty.pictogram}),(a=this.difficulty)===null||a===void 0?void 0:a.label),i("div",{class:"icon-label duration"},i("span",{class:"material-symbols material-symbols-outlined"},"timelapse"),s(this.currentTrek.duration))),i("div",{class:"row"},i("div",{class:"icon-label length"},i("span",{class:"material-symbols material-symbols-outlined"},"open_in_full"),l(this.currentTrek.length_2d)),i("div",{class:"icon-label ascent"},i("span",{class:"material-symbols material-symbols-outlined"},"moving"),d(this.currentTrek.ascent))),i("div",{class:"row"},i("div",{class:"icon-label route"},((o=this.route)===null||o===void 0?void 0:o.pictogram)&&i("img",{src:this.route.pictogram}),(c=this.route)===null||c===void 0?void 0:c.route),i("div",{class:"icon-label practice"},((u=this.practice)===null||u===void 0?void 0:u.pictogram)&&i("img",{src:this.practice.pictogram}),(f=this.practice)===null||f===void 0?void 0:f.name))))))};return e}());f.style=u}}}));
2
- //# sourceMappingURL=p-5194053a.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["grwTrekCardCss","GrwTrekCard","exports","class_1","prototype","connectedCallback","_this","this","currentTrek","trek","state","difficulty","difficulties","find","id","route","routes","practice","practices","themes","filter","theme","includes","departureCity","cities","city","departure_city","onChange","disconnectedCallback","resetStoreOnDisconnected","reset","render","h","Host","style","width","isLargeView","colorPrimaryApp","colorOnSurface","colorSecondaryContainer","colorOnSecondaryContainer","colorSurfaceContainerLow","class","onClick","trekCardPress","emit","attachments","attachment","type","length","src","concat","thumbnail","loading","name","_a","map","label","_b","pictogram","_c","formatDuration","duration","formatLength","length_2d","formatAscent","ascent","_d","_e","_f","_g"],"sources":["src/components/grw-trek-card/grw-trek-card.scss?tag=grw-trek-card&encapsulation=shadow","src/components/grw-trek-card/grw-trek-card.tsx"],"sourcesContent":[".material-symbols {\n font-family: 'Material Symbols Outlined';\n}\n\n.material-symbols-outlined {\n font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;\n}\n\n.trek-card-container,\n.trek-card-large-view-container {\n cursor: pointer;\n font-family: 'Roboto';\n border-radius: 12px;\n box-shadow: var(--elevation-1);\n background-color: var(--color-surface-container-low);\n .image {\n object-fit: cover;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n }\n .sub-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 8px 16px;\n .name {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n margin-bottom: 8px;\n }\n .departure {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n margin-bottom: 4px;\n }\n .themes-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n .theme {\n background-color: var(--color-secondary-container);\n color: var(--color-on-secondary-container);\n border-radius: 8px;\n padding: 8px 16px;\n margin: 0px 8px 8px 0px;\n box-shadow: var(--elevation-0);\n border: 1px solid var(--color-outline);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n }\n }\n .icons-labels-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n color: var(--color-on-surface);\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n .row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n &:not(:last-child) {\n margin-bottom: 12px;\n }\n .icon-label {\n &:nth-child(2) {\n margin: 0px 4px;\n }\n display: flex;\n align-items: center;\n width: 50%;\n img,\n span {\n font-size: 24px;\n width: 24px;\n height: auto;\n margin-right: 8px;\n }\n }\n .practice {\n img {\n background-color: var(--color-primary-app);\n }\n }\n }\n }\n }\n}\n\n.trek-card-container {\n width: 350px;\n .image {\n width: 100%;\n max-height: 200px;\n }\n}\n\n.trek-card-large-view-container {\n display: flex;\n flex-direction: row;\n .image {\n width: 250px;\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, State } from '@stencil/core';\nimport state, { onChange, reset } from 'store/store';\nimport { City, Difficulty, Practice, Route, Themes, Trek } from 'types/types';\nimport { formatDuration, formatLength, formatAscent } from 'utils/utils';\n\n@Component({\n tag: 'grw-trek-card',\n styleUrl: 'grw-trek-card.scss',\n shadow: true,\n})\nexport class GrwTrekCard {\n @Event() trekCardPress: EventEmitter<number>;\n @State() currentTrek: Trek;\n @State() difficulty: Difficulty;\n @State() route: Route;\n @State() practice: Practice;\n @State() themes: Themes;\n @State() departureCity: City;\n @Prop() trek: Trek;\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() isLargeView = false;\n @Prop() resetStoreOnDisconnected = true;\n\n connectedCallback() {\n this.currentTrek = this.trek ? this.trek : state.currentTrek;\n if (this.currentTrek) {\n this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);\n this.route = state.routes.find(route => route.id === this.currentTrek.route);\n this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);\n this.themes = state.themes.filter(theme => this.currentTrek.themes.includes(theme.id));\n this.departureCity = state.cities.find(city => city.id === this.currentTrek.departure_city);\n }\n onChange('currentTrek', () => {\n this.currentTrek = this.trek ? this.trek : state.currentTrek;\n if (this.currentTrek) {\n this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);\n this.route = state.routes.find(route => route.id === this.currentTrek.route);\n this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);\n this.themes = state.themes.filter(theme => this.currentTrek.themes.includes(theme.id));\n this.departureCity = state.cities.find(city => city.id === this.currentTrek.departure_city);\n }\n });\n }\n\n disconnectedCallback() {\n if (this.resetStoreOnDisconnected) {\n reset();\n }\n }\n\n render() {\n return (\n <Host\n style={{\n 'width': this.isLargeView ? '100%' : 'auto',\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n }}\n >\n {this.currentTrek && (\n <div class={this.isLargeView ? 'trek-card-large-view-container' : 'trek-card-container'} onClick={() => this.trekCardPress.emit(this.currentTrek.id)}>\n {this.currentTrek.attachments.filter(attachment => attachment.type === 'image').length > 0 && (\n <img class=\"image\" src={`${this.currentTrek.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`} loading=\"lazy\" />\n )}\n <div class=\"sub-container\">\n {this.departureCity && <div class=\"departure\">{this.departureCity.name}</div>}\n <div class=\"name\">{this.currentTrek?.name}</div>\n <div class=\"themes-container\">\n {this.themes.map(theme => (\n <div class=\"theme\">{theme.label}</div>\n ))}\n </div>\n <div class=\"icons-labels-container\">\n <div class=\"row\">\n <div class=\"icon-label difficulty\">\n {this.difficulty?.pictogram && <img src={this.difficulty.pictogram} />}\n {this.difficulty?.label}\n </div>\n <div class=\"icon-label duration\">\n <span class=\"material-symbols material-symbols-outlined\">timelapse</span>\n {formatDuration(this.currentTrek.duration)}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"icon-label length\">\n <span class=\"material-symbols material-symbols-outlined\">open_in_full</span>\n {formatLength(this.currentTrek.length_2d)}\n </div>\n <div class=\"icon-label ascent\">\n <span class=\"material-symbols material-symbols-outlined\">moving</span>\n {formatAscent(this.currentTrek.ascent)}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"icon-label route\">\n {this.route?.pictogram && <img src={this.route.pictogram} />}\n {this.route?.route}\n </div>\n <div class=\"icon-label practice\">\n {this.practice?.pictogram && <img src={this.practice.pictogram} />}\n {this.practice?.name}\n </div>\n </div>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"sRAAA,IAAMA,EAAiB,wqI,ICUVC,EAAWC,EAAA,2B,mQASI,U,oBACD,U,6BACS,U,+BACE,U,8BACD,U,iBACb,M,8BACa,I,CAEnCC,EAAAC,UAAAC,kBAAA,eAAAC,EAAAC,KACEA,KAAKC,YAAcD,KAAKE,KAAOF,KAAKE,KAAOC,EAAMF,YACjD,GAAID,KAAKC,YAAa,CACpBD,KAAKI,WAAaD,EAAME,aAAaC,MAAK,SAAAF,GAAc,OAAAA,EAAWG,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EAAA,QAAMU,MAAM,8CAA4C,gBACvDqB,EAAaxD,KAAKC,YAAYwD,YAEjChC,EAAA,OAAKU,MAAM,qBACTV,EAAA,QAAMU,MAAM,8CAA4C,UACvDuB,EAAa1D,KAAKC,YAAY0D,UAGnClC,EAAA,OAAKU,MAAM,OACTV,EAAA,OAAKU,MAAM,sBACRyB,EAAA5D,KAAKQ,SAAK,MAAAoD,SAAA,SAAAA,EAAER,YAAa3B,EAAA,OAAKkB,IAAK3C,KAAKQ,MAAM4C,aAC9CS,EAAA7D,KAAKQ,SAAK,MAAAqD,SAAA,S,EAAErD,OAEfiB,EAAA,OAAKU,MAAM,yBACR2B,EAAA9D,KAAKU,YAAQ,MAAAoD,SAAA,SAAAA,EAAEV,YAAa3B,EAAA,OAAKkB,IAAK3C,KAAKU,SAAS0C,aACpDW,EAAA/D,KAAKU,YAAQ,MAAAqD,SAAA,S,EAAEhB,U,WAjGZ,I"}
@@ -1,2 +0,0 @@
1
- var __spreadArray=this&&this.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++){if(a||!(n in e)){if(!a)a=Array.prototype.slice.call(e,0,n);a[n]=e[n]}}return r.concat(a||Array.prototype.slice.call(e))};System.register(["./p-a9b9dd2a.system.js"],(function(r){"use strict";var e;return{setters:[function(r){e=r.s}],execute:function(){r({a:n,b:i,f:t,h:a});function t(r){var e;if(r<24){e="".concat(Math.floor(r),"h");if(r%1>0){e+="".concat(Math.round(60*(r%1)),"min")}}else{e="".concat(r/24,"j")}return e}function n(r){return"".concat(Math.round(r/1e3),"km")}function i(r){return"".concat(r,"m")}function a(){var r=[{property:"practices",trekProperty:"practice",trekPropertyIsArray:false,type:"include"},{property:"difficulties",trekProperty:"difficulty",trekPropertyIsArray:false,type:"include"},{property:"durations",trekProperty:"duration",trekPropertyIsArray:false,type:"interval"},{property:"lengths",trekProperty:"length_2d",trekPropertyIsArray:false,type:"interval"},{property:"elevations",trekProperty:"ascent",trekPropertyIsArray:false,type:"interval"},{property:"themes",trekProperty:"themes",trekPropertyIsArray:true,type:"include"},{property:"routes",trekProperty:"route",trekPropertyIsArray:false,type:"include"},{property:"accessibilities",trekProperty:"accessibilities",trekPropertyIsArray:true,type:"include"},{property:"cities",trekProperty:"cities",trekPropertyIsArray:true,type:"include"},{property:"labels",trekProperty:"labels",trekPropertyIsArray:true,type:"include"},{property:"districts",trekProperty:"districts",trekPropertyIsArray:true,type:"include"}];var t=false;var n=[];var i=function(r){var i=e[r.property].filter((function(r){return r.selected})).map((function(r){return r.id}));if(i.length>0){if(n.length>0){if(r.type==="include"){if(r.trekPropertyIsArray){n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty].some((function(r){return i.includes(r)}))})),true)}else{n=__spreadArray([],n.filter((function(e){return i.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){n=__spreadArray([],n.filter((function(t){var n=function(n){var i=e[r.property].find((function(r){return r.id===n}));if(t[r.trekProperty]>=i.minValue&&t[r.trekProperty]<=i.maxValue){return{value:true}}};for(var a=0,o=i;a<o.length;a++){var u=o[a];var p=n(u);if(typeof p==="object")return p.value}return false})),true)}}else{if(!t){t=true}if(r.type==="include"){if(r.trekPropertyIsArray){n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty].some((function(r){return i.includes(r)}))})),true)}else{n=__spreadArray([],e.treks.filter((function(e){return i.includes(e[r.trekProperty])})),true)}}else if(r.type==="interval"){var a;var o;var u=function(t){var n=e[r.property].find((function(r){return r.id===t}));if(isNaN(a)||n.minValue<a){a=n.minValue}if(isNaN(o)||n.maxValue>o){o=n.maxValue}};for(var p=0,s=i;p<s.length;p++){var y=s[p];u(y)}n=__spreadArray([],e.treks.filter((function(e){return e[r.trekProperty]>=a&&e[r.trekProperty]<=o})),true)}}}};for(var a=0,o=r;a<o.length;a++){var u=o[a];i(u)}var p=t?n:e.treks;return Boolean(e.searchValue)?p.filter((function(r){return r.name.toLowerCase().includes(e.searchValue.toLowerCase())})):p}}}}));
2
- //# sourceMappingURL=p-55569971.system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["formatDuration","duration","formattedDuration","concat","Math","floor","round","formatLength","length","formatAscent","ascent","handleFiltersAndSearch","filters","property","trekProperty","trekPropertyIsArray","type","isUsingFilter","filtersTreks","filter","currentFiltersId","state","currentFilter","selected","map","id","__spreadArray","treks","trek","some","includes","currentFilterId","find","minValue","maxValue","_i","currentFiltersId_2","minValue_1","maxValue_1","isNaN","_a","currentFiltersId_1","filters_1","searchTreks","Boolean","searchValue","currentTrek","name","toLowerCase"],"sources":["src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { Filters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport function handleFiltersAndSearch(): Treks {\n const filters: Filters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include' },\n ];\n\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of filters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek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