@geotrekce/geotrek-rando-widget 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/grw-app.cjs.entry.js +2 -2
- package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-filter.cjs.entry.js +1 -1
- package/dist/cjs/grw-filter.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-filter.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-filters_16.cjs.entry.js +8 -4
- package/dist/cjs/grw-filters_16.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-filters_16.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-filters_16.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-information-desk_6.cjs.entry.js +1 -1
- package/dist/cjs/grw-information-desk_6.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-information-desk_6.cjs.entry.js.gz +0 -0
- package/dist/cjs/{utils-aafb9447.js → utils-f0196a2f.js} +2 -1
- package/dist/cjs/utils-f0196a2f.js.br +0 -0
- package/dist/cjs/utils-f0196a2f.js.gz +0 -0
- package/dist/cjs/utils-f0196a2f.js.map +1 -0
- package/dist/collection/components/grw-app/grw-app.js +1 -1
- package/dist/collection/components/grw-app/grw-app.js.br +0 -0
- package/dist/collection/components/grw-app/grw-app.js.gz +0 -0
- package/dist/collection/components/grw-app/grw-app.js.map +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
- package/dist/collection/store/grw-trek-provider.js +6 -2
- package/dist/collection/store/grw-trek-provider.js.br +0 -0
- package/dist/collection/store/grw-trek-provider.js.gz +0 -0
- package/dist/collection/store/grw-trek-provider.js.map +1 -1
- package/dist/collection/store/store.js +1 -0
- package/dist/collection/store/store.js.br +0 -0
- package/dist/collection/store/store.js.gz +0 -0
- package/dist/collection/store/store.js.map +1 -1
- package/dist/collection/stories/App.stories.js +2 -2
- package/dist/collection/stories/App.stories.js.br +0 -0
- package/dist/collection/stories/App.stories.js.gz +0 -0
- package/dist/collection/stories/TrekMap.stories.js +2 -2
- package/dist/collection/stories/TrekMap.stories.js.br +0 -0
- package/dist/collection/stories/TrekMap.stories.js.gz +0 -0
- package/dist/collection/stories/TreksMap.stories.js +2 -2
- package/dist/collection/stories/TreksMap.stories.js.br +0 -0
- package/dist/collection/stories/TreksMap.stories.js.gz +0 -0
- package/dist/collection/types/types.js.map +1 -1
- package/dist/esm/grw-app.entry.js +2 -2
- package/dist/esm/grw-app.entry.js.br +0 -0
- package/dist/esm/grw-app.entry.js.gz +0 -0
- package/dist/esm/grw-app.entry.js.map +1 -1
- package/dist/esm/grw-filter.entry.js +1 -1
- package/dist/esm/grw-filter.entry.js.br +0 -0
- package/dist/esm/grw-filter.entry.js.gz +0 -0
- package/dist/esm/grw-filters_16.entry.js +8 -4
- package/dist/esm/grw-filters_16.entry.js.br +0 -0
- package/dist/esm/grw-filters_16.entry.js.gz +0 -0
- package/dist/esm/grw-filters_16.entry.js.map +1 -1
- package/dist/esm/grw-information-desk_6.entry.js +1 -1
- package/dist/esm/grw-information-desk_6.entry.js.br +0 -0
- package/dist/esm/grw-information-desk_6.entry.js.gz +0 -0
- package/dist/esm/{utils-6441a08a.js → utils-2e80d729.js} +2 -1
- package/dist/esm/utils-2e80d729.js.br +0 -0
- package/dist/esm/utils-2e80d729.js.gz +0 -0
- package/dist/esm/utils-2e80d729.js.map +1 -0
- package/dist/esm-es5/grw-app.entry.js +1 -1
- package/dist/esm-es5/grw-app.entry.js.br +0 -0
- package/dist/esm-es5/grw-app.entry.js.gz +0 -0
- package/dist/esm-es5/grw-app.entry.js.map +1 -1
- package/dist/esm-es5/grw-filter.entry.js +1 -1
- package/dist/esm-es5/grw-filter.entry.js.br +0 -0
- package/dist/esm-es5/grw-filter.entry.js.gz +0 -0
- package/dist/esm-es5/grw-filters_16.entry.js +2 -2
- package/dist/esm-es5/grw-filters_16.entry.js.br +0 -0
- package/dist/esm-es5/grw-filters_16.entry.js.gz +0 -0
- package/dist/esm-es5/grw-filters_16.entry.js.map +1 -1
- package/dist/esm-es5/grw-information-desk_6.entry.js +1 -1
- package/dist/esm-es5/grw-information-desk_6.entry.js.br +0 -0
- package/dist/esm-es5/grw-information-desk_6.entry.js.gz +0 -0
- package/dist/esm-es5/utils-2e80d729.js +2 -0
- package/dist/esm-es5/utils-2e80d729.js.br +0 -0
- package/dist/esm-es5/utils-2e80d729.js.gz +0 -0
- package/dist/esm-es5/utils-2e80d729.js.map +1 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-ff607e4b.entry.js → p-0eb7003a.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-0eb7003a.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-0eb7003a.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-20f93123.system.js +2 -0
- package/dist/geotrek-rando-widget/p-20f93123.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-20f93123.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-20f93123.system.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-06412985.entry.js → p-34b0e7b0.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-34b0e7b0.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-34b0e7b0.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-ebadf1e2.system.entry.js → p-6f966493.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-6f966493.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-6f966493.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-2a67434e.system.entry.js → p-c7fe0141.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-c7fe0141.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-c7fe0141.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-2a67434e.system.entry.js.map → p-c7fe0141.system.entry.js.map} +1 -1
- package/dist/geotrek-rando-widget/p-cc8a7df2.system.js +1 -1
- package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-01f5ed45.system.entry.js → p-cfb59fc0.system.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-cfb59fc0.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-cfb59fc0.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-cfb59fc0.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-d24cca7d.js +2 -0
- package/dist/geotrek-rando-widget/p-d24cca7d.js.br +0 -0
- package/dist/geotrek-rando-widget/p-d24cca7d.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-d24cca7d.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-e9caba62.entry.js → p-ec3f78e6.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-ec3f78e6.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ec3f78e6.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-ec3f78e6.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-8e1be176.entry.js → p-f6f46632.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-f6f46632.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-f6f46632.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-8e1be176.entry.js.map → p-f6f46632.entry.js.map} +1 -1
- package/dist/geotrek-rando-widget/{p-73278096.system.entry.js → p-fe94e7fd.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-fe94e7fd.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-fe94e7fd.system.entry.js.gz +0 -0
- package/dist/types/store/store.d.ts +3 -1
- package/dist/types/types/types.d.ts +6 -0
- package/package.json +1 -1
- package/dist/cjs/utils-aafb9447.js.br +0 -0
- package/dist/cjs/utils-aafb9447.js.gz +0 -0
- package/dist/cjs/utils-aafb9447.js.map +0 -1
- package/dist/esm/utils-6441a08a.js.br +0 -0
- package/dist/esm/utils-6441a08a.js.gz +0 -0
- package/dist/esm/utils-6441a08a.js.map +0 -1
- package/dist/esm-es5/utils-6441a08a.js +0 -2
- package/dist/esm-es5/utils-6441a08a.js.br +0 -0
- package/dist/esm-es5/utils-6441a08a.js.gz +0 -0
- package/dist/esm-es5/utils-6441a08a.js.map +0 -1
- package/dist/geotrek-rando-widget/p-01f5ed45.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-01f5ed45.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-01f5ed45.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-06412985.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-06412985.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-2a67434e.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-2a67434e.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-6f7916db.system.js +0 -2
- package/dist/geotrek-rando-widget/p-6f7916db.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-6f7916db.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-6f7916db.system.js.map +0 -1
- package/dist/geotrek-rando-widget/p-73278096.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-73278096.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-8e1be176.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-8e1be176.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-bcac98e0.js +0 -2
- package/dist/geotrek-rando-widget/p-bcac98e0.js.br +0 -0
- package/dist/geotrek-rando-widget/p-bcac98e0.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-bcac98e0.js.map +0 -1
- package/dist/geotrek-rando-widget/p-e9caba62.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-e9caba62.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-e9caba62.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-ebadf1e2.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ebadf1e2.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-ff607e4b.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ff607e4b.entry.js.gz +0 -0
- /package/dist/geotrek-rando-widget/{p-ff607e4b.entry.js.map → p-0eb7003a.entry.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-06412985.entry.js.map → p-34b0e7b0.entry.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-ebadf1e2.system.entry.js.map → p-6f966493.system.entry.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-73278096.system.entry.js.map → p-fe94e7fd.system.entry.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as e,f as t}from"./p-0c07a3f0.js";const r=(e,t,r)=>{const s=e.get(t);if(!s){e.set(t,[r])}else if(!s.includes(r)){s.push(r)}};const s=(e,t)=>{let r;return(...s)=>{if(r){clearTimeout(r)}r=setTimeout((()=>{r=0;e(...s)}),t)}};const n=e=>!("isConnected"in e)||e.isConnected;const i=s((e=>{for(let t of e.keys()){e.set(t,e.get(t).filter(n))}}),2e3);const l=()=>{if(typeof e!=="function"){return{}}const s=new Map;return{dispose:()=>s.clear(),get:t=>{const n=e();if(n){r(s,t,n)}},set:e=>{const r=s.get(e);if(r){s.set(e,r.filter(t))}i(s)},reset:()=>{s.forEach((e=>e.forEach(t)));i(s)}}};const o=e=>typeof e==="function"?e():e;const c=(e,t=((e,t)=>e!==t))=>{const r=o(e);let s=new Map(Object.entries(r!==null&&r!==void 0?r:{}));const n={dispose:[],get:[],set:[],reset:[]};const i=()=>{var t;s=new Map(Object.entries((t=o(e))!==null&&t!==void 0?t:{}));n.reset.forEach((e=>e()))};const l=()=>{n.dispose.forEach((e=>e()));i()};const c=e=>{n.get.forEach((t=>t(e)));return s.get(e)};const a=(e,r)=>{const i=s.get(e);if(t(r,i,e)){s.set(e,r);n.set.forEach((t=>t(e,r,i)))}};const p=typeof Proxy==="undefined"?{}:new Proxy(r,{get(e,t){return c(t)},ownKeys(e){return Array.from(s.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(e,t){return s.has(t)},set(e,t,r){a(t,r);return true}});const f=(e,t)=>{n[e].push(t);return()=>{u(n[e],t)}};const y=(t,r)=>{const s=f("set",((e,s)=>{if(e===t){r(s)}}));const n=f("reset",(()=>r(o(e)[t])));return()=>{s();n()}};const d=(...e)=>{const t=e.reduce(((e,t)=>{if(t.set){e.push(f("set",t.set))}if(t.get){e.push(f("get",t.get))}if(t.reset){e.push(f("reset",t.reset))}if(t.dispose){e.push(f("dispose",t.dispose))}return e}),[]);return()=>t.forEach((e=>e()))};const v=e=>{const t=s.get(e);n.set.forEach((r=>r(e,t,t)))};return{state:p,get:c,set:a,on:f,onChange:y,use:d,dispose:l,reset:i,forceUpdate:v}};const u=(e,t)=>{const r=e.indexOf(t);if(r>=0){e[r]=e[e.length-1];e.length--}};const a=(e,t)=>{const r=c(e,t);r.use(l());return r};const{state:p,onChange:f,reset:y}=a({mode:null,api:null,languages:null,language:null,treks:null,currentTreks:null,treksWithinBounds:null,currentMapBounds:null,difficulties:null,routes:null,practices:null,themes:null,cities:null,durations:null,lengths:null,elevations:null,currentSensitiveAreas:null,labels:null,districts:null,sources:null,ratings:null,ratingsScale:null,accessibilities:null,accessibilitiesLevel:null,poiTypes:null,currentTrek:null,currentPois:null,currentInformationDesks:null,treksNetworkError:false,trekNetworkError:false,searchValue:null,selectedActivitiesFilters:0,selectedThemesFilters:0,selectedLocationFilters:0,selectedTrekId:null,parentTrekId:null,parentTrek:null,currentTrekSteps:null,selectedStepId:null,trekTouristicContents:null,touristicContents:null,currentTouristicContents:null,touristicContentsWithinBounds:null,touristicContentCategories:null,currentTouristicContent:null,touristicEvents:null,currentTouristicEvents:null,touristicEventsWithinBounds:null,touristicEventTypes:null,currentTouristicEvent:null,selectedTouristicContentId:null,selectedTouristicEventId:null});function d(e){let t;if(e<24){t=`${Math.floor(e)}h`;if(e%1>0){t+=`${Math.round(60*(e%1))}min`}}else{t=`${e/24}j`}return t}function v(e){return`${Math.round(e/1e3)}km`}function g(e){return`${e}m`}const P=[{property:"practices",trekProperty:"practice",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"difficulties",trekProperty:"difficulty",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"durations",trekProperty:"duration",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"lengths",trekProperty:"length_2d",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"elevations",trekProperty:"ascent",trekPropertyIsArray:false,type:"interval",segment:"selectedActivitiesFilters"},{property:"routes",trekProperty:"route",trekPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"accessibilities",trekProperty:"accessibilities",trekPropertyIsArray:true,type:"include",segment:"selectedActivitiesFilters"},{property:"labels",trekProperty:"labels",trekPropertyIsArray:true,type:"include",segment:"selectedActivitiesFilters"},{property:"themes",trekProperty:"themes",trekPropertyIsArray:true,type:"include",segment:"selectedThemesFilters"},{property:"cities",trekProperty:"cities",trekPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",trekProperty:"districts",trekPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}];const k=[{property:"touristicContentCategories",touristicContentProperty:"category",touristicContentPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"cities",touristicContentProperty:"cities",touristicContentPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",touristicContentProperty:"districts",touristicContentPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}];const m=[{property:"touristicEventTypes",touristicEventProperty:"type",touristicEventPropertyIsArray:false,type:"include",segment:"selectedActivitiesFilters"},{property:"cities",touristicEventProperty:"cities",touristicEventPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"},{property:"districts",touristicEventProperty:"districts",touristicEventPropertyIsArray:true,type:"include",segment:"selectedLocationFilters"}];function A(){let e=false;let t=[];for(const s of P){const r=p[s.property].filter((e=>e.selected)).map((e=>e.id));if(r.length>0){if(t.length>0){if(s.type==="include"){if(s.trekPropertyIsArray){t=[...t.filter((e=>e[s.trekProperty].some((e=>r.includes(e)))))]}else{t=[...t.filter((e=>r.includes(e[s.trekProperty])))]}}else if(s.type==="interval"){t=[...t.filter((e=>{for(const t of r){const r=p[s.property].find((e=>e.id===t));if(e[s.trekProperty]>=r.minValue&&e[s.trekProperty]<=r.maxValue){return true}}return false}))]}}else{if(!e){e=true}if(s.type==="include"){if(s.trekPropertyIsArray){t=[...p.treks.filter((e=>e[s.trekProperty].some((e=>r.includes(e)))))]}else{t=[...p.treks.filter((e=>r.includes(e[s.trekProperty])))]}}else if(s.type==="interval"){let e;let n;for(const t of r){const r=p[s.property].find((e=>e.id===t));if(isNaN(e)||r.minValue<e){e=r.minValue}if(isNaN(n)||r.maxValue>n){n=r.maxValue}}t=[...p.treks.filter((t=>t[s.trekProperty]>=e&&t[s.trekProperty]<=n))]}}}}const r=e?t:p.treks;return Boolean(p.searchValue)?r.filter((e=>e.name.toLowerCase().includes(p.searchValue.toLowerCase()))):r}function I(){let e=false;let t=[];for(const s of k){const r=p[s.property].filter((e=>e.selected)).map((e=>e.id));if(r.length>0){if(t.length>0){if(s.type==="include"){if(s.touristicContentPropertyIsArray){t=[...t.filter((e=>e[s.touristicContentProperty].some((e=>r.includes(e)))))]}else{t=[...t.filter((e=>r.includes(e[s.touristicContentProperty])))]}}else if(s.type==="interval"){t=[...t.filter((e=>{for(const t of r){const r=p[s.property].find((e=>e.id===t));if(e[s.touristicContentProperty]>=r.minValue&&e[s.touristicContentProperty]<=r.maxValue){return true}}return false}))]}}else{if(!e){e=true}if(s.type==="include"){if(s.touristicContentPropertyIsArray){t=[...p.touristicContents.filter((e=>e[s.touristicContentProperty].some((e=>r.includes(e)))))]}else{t=[...p.touristicContents.filter((e=>r.includes(e[s.touristicContentProperty])))]}}else if(s.type==="interval"){let e;let n;for(const t of r){const r=p[s.property].find((e=>e.id===t));if(isNaN(e)||r.minValue<e){e=r.minValue}if(isNaN(n)||r.maxValue>n){n=r.maxValue}}t=[...p.touristicContents.filter((t=>t[s.touristicContentProperty]>=e&&t[s.touristicContentProperty]<=n))]}}}}const r=e?t:p.touristicContents;return Boolean(p.searchValue)?r.filter((e=>e.name.toLowerCase().includes(p.searchValue.toLowerCase()))):r}function h(){let e=false;let t=[];for(const s of m){const r=p[s.property].filter((e=>e.selected)).map((e=>e.id));if(r.length>0){if(t.length>0){if(s.type==="include"){if(s.touristicEventPropertyIsArray){t=[...t.filter((e=>e[s.touristicEventProperty].some((e=>r.includes(e)))))]}else{t=[...t.filter((e=>r.includes(e[s.touristicEventProperty])))]}}else if(s.type==="interval"){t=[...t.filter((e=>{for(const t of r){const r=p[s.property].find((e=>e.id===t));if(e[s.touristicEventProperty]>=r.minValue&&e[s.touristicEventProperty]<=r.maxValue){return true}}return false}))]}}else{if(!e){e=true}if(s.type==="include"){if(s.touristicEventPropertyIsArray){t=[...p.touristicContents.filter((e=>e[s.touristicEventProperty].some((e=>r.includes(e)))))]}else{t=[...p.touristicEvents.filter((e=>r.includes(e[s.touristicEventProperty])))]}}else if(s.type==="interval"){let e;let n;for(const t of r){const r=p[s.property].find((e=>e.id===t));if(isNaN(e)||r.minValue<e){e=r.minValue}if(isNaN(n)||r.maxValue>n){n=r.maxValue}}t=[...p.touristicEvents.filter((t=>t[s.touristicEventProperty]>=e&&t[s.touristicEventProperty]<=n))]}}}}const r=e?t:p.touristicEvents;return Boolean(p.searchValue)?r.filter((e=>e.name.toLowerCase().includes(p.searchValue.toLowerCase()))):r}export{k as a,I as b,m as c,h as d,v as e,d as f,g,A as h,f as o,y as r,p as s,P as t};
|
|
2
|
+
//# sourceMappingURL=p-d24cca7d.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","mode","api","languages","language","treks","currentTreks","treksWithinBounds","currentMapBounds","difficulties","routes","practices","themes","cities","durations","lengths","elevations","currentSensitiveAreas","labels","districts","sources","ratings","ratingsScale","accessibilities","accessibilitiesLevel","poiTypes","currentTrek","currentPois","currentInformationDesks","treksNetworkError","trekNetworkError","searchValue","selectedActivitiesFilters","selectedThemesFilters","selectedLocationFilters","selectedTrekId","parentTrekId","parentTrek","currentTrekSteps","selectedStepId","trekTouristicContents","touristicContents","currentTouristicContents","touristicContentsWithinBounds","touristicContentCategories","currentTouristicContent","touristicEvents","currentTouristicEvents","touristicEventsWithinBounds","touristicEventTypes","currentTouristicEvent","selectedTouristicContentId","selectedTouristicEventId","formatDuration","duration","formattedDuration","Math","floor","round","formatLength","formatAscent","ascent","treksFilters","property","trekProperty","trekPropertyIsArray","type","segment","touristicContentsFilters","touristicContentProperty","touristicContentPropertyIsArray","touristicEventsFilters","touristicEventProperty","touristicEventPropertyIsArray","handleTreksFiltersAndSearch","isUsingFilter","filtersTreks","currentFiltersId","currentFilter","selected","id","trek","some","currentFilterId","find","minValue","maxValue","isNaN","searchTreks","Boolean","name","toLowerCase","handleTouristicContentsFiltersAndSearch","filtersTouristicContents","touristicContent","searchTouristicContents","handleTouristicEventsFiltersAndSearch","filtersTouristicEvents","touristicEvent","searchTouristicEvents"],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/store.ts","./src/utils/utils.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { LatLngBounds } from 'leaflet';\nimport {\n Accessibilities,\n accessibilitiesLevel,\n Difficulties,\n Durations,\n InformationDesks,\n Labels,\n Pois,\n PoiTypes,\n Practices,\n Routes,\n SensitiveAreas,\n Sources,\n Themes,\n Cities,\n Trek,\n Treks,\n Lengths,\n Elevations,\n Districts,\n TouristicContents,\n TouristicContentCategories,\n TouristicContent,\n TouristicEvents,\n TouristicEventTypes,\n TouristicEvent,\n Ratings,\n RatingsScale,\n} from 'types/types';\n\nconst { state, onChange, reset } = createStore<{\n mode: string;\n api: string;\n languages: string[];\n language: string;\n treks: Treks;\n treksWithinBounds: Treks;\n currentMapBounds: LatLngBounds;\n currentTreks: Treks;\n difficulties: Difficulties;\n routes: Routes;\n practices: Practices;\n themes: Themes;\n cities: Cities;\n durations: Durations;\n lengths: Lengths;\n elevations: Elevations;\n labels: Labels;\n districts: Districts;\n sources: Sources;\n ratings: Ratings;\n ratingsScale: RatingsScale;\n accessibilities: Accessibilities;\n accessibilitiesLevel: accessibilitiesLevel;\n poiTypes: PoiTypes;\n currentTrek: Trek;\n currentSensitiveAreas: SensitiveAreas;\n currentPois: Pois;\n currentInformationDesks: InformationDesks;\n treksNetworkError: boolean;\n trekNetworkError: boolean;\n searchValue: string;\n selectedActivitiesFilters: number;\n selectedThemesFilters: number;\n selectedLocationFilters: number;\n selectedTrekId: number;\n parentTrekId: number;\n parentTrek: Trek;\n currentTrekSteps: Treks;\n selectedStepId: number;\n trekTouristicContents: TouristicContents;\n touristicContents: TouristicContents;\n currentTouristicContents: TouristicContents;\n touristicContentsWithinBounds: TouristicContents;\n touristicContentCategories: TouristicContentCategories;\n currentTouristicContent: TouristicContent;\n touristicEvents: TouristicEvents;\n currentTouristicEvents: TouristicEvents;\n touristicEventsWithinBounds: TouristicEvents;\n touristicEventTypes: TouristicEventTypes;\n currentTouristicEvent: TouristicEvent;\n selectedTouristicContentId: number;\n selectedTouristicEventId: number;\n}>({\n mode: null,\n api: null,\n languages: null,\n language: null,\n treks: null,\n currentTreks: null,\n treksWithinBounds: null,\n currentMapBounds: null,\n difficulties: null,\n routes: null,\n practices: null,\n themes: null,\n cities: null,\n durations: null,\n lengths: null,\n elevations: null,\n currentSensitiveAreas: null,\n labels: null,\n districts: null,\n sources: null,\n ratings: null,\n ratingsScale: null,\n accessibilities: null,\n accessibilitiesLevel: null,\n poiTypes: null,\n currentTrek: null,\n currentPois: null,\n currentInformationDesks: null,\n treksNetworkError: false,\n trekNetworkError: false,\n searchValue: null,\n selectedActivitiesFilters: 0,\n selectedThemesFilters: 0,\n selectedLocationFilters: 0,\n selectedTrekId: null,\n parentTrekId: null,\n parentTrek: null,\n currentTrekSteps: null,\n selectedStepId: null,\n trekTouristicContents: null,\n touristicContents: null,\n currentTouristicContents: null,\n touristicContentsWithinBounds: null,\n touristicContentCategories: null,\n currentTouristicContent: null,\n touristicEvents: null,\n currentTouristicEvents: null,\n touristicEventsWithinBounds: null,\n touristicEventTypes: null,\n currentTouristicEvent: null,\n selectedTouristicContentId: null,\n selectedTouristicEventId: null,\n});\n\nexport { onChange, reset };\n\nexport default state;\n","import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TouristicEvents, TouristicEventsFilters, TrekFilters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport const treksFilters: TrekFilters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include', segment: 'selectedThemesFilters' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicContentsFilters: TouristicContentsFilters = [\n { property: 'touristicContentCategories', touristicContentProperty: 'category', touristicContentPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicContentProperty: 'cities', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicContentProperty: 'districts', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicEventsFilters: TouristicEventsFilters = [\n { property: 'touristicEventTypes', touristicEventProperty: 'type', touristicEventPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicEventProperty: 'cities', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicEventProperty: 'districts', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport function handleTreksFiltersAndSearch(): Treks {\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of treksFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...filtersTreks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLowerCase().includes(state.searchValue.toLowerCase())) : searchTreks;\n}\n\nexport function handleTouristicContentsFiltersAndSearch(): TouristicContents {\n let isUsingFilter = false;\n let filtersTouristicContents = [];\n for (const filter of touristicContentsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicContents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...filtersTouristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicContentProperty] >= currentFilter.minValue && touristicContent[filter.touristicContentProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...state.touristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTouristicContents = [\n ...state.touristicContents.filter(\n touristicContent => touristicContent[filter.touristicContentProperty] >= minValue && touristicContent[filter.touristicContentProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicContents = isUsingFilter ? filtersTouristicContents : state.touristicContents;\n\n return Boolean(state.searchValue)\n ? searchTouristicContents.filter(currentTouristicContents => currentTouristicContents.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicContents;\n}\n\nexport function handleTouristicEventsFiltersAndSearch(): TouristicEvents {\n let isUsingFilter = false;\n let filtersTouristicEvents = [];\n for (const filter of touristicEventsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicEvents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...filtersTouristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicEventProperty] >= currentFilter.minValue && touristicContent[filter.touristicEventProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...state.touristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTouristicEvents = [\n ...state.touristicEvents.filter(\n touristicEvent => touristicEvent[filter.touristicEventProperty] >= minValue && touristicEvent[filter.touristicEventProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicEvents = isUsingFilter ? filtersTouristicEvents : state.touristicEvents;\n return Boolean(state.searchValue)\n ? searchTouristicEvents.filter(currentTouristicEvent => currentTouristicEvent.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicEvents;\n}\n"],"mappings":"2CAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH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