@influence-society-web/yuna-frontend 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,7 +19,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19
19
|
<!-- <b style="color: ${sc.accent_color};">${e.availableCount} apartment disponibles</b> -->
|
|
20
20
|
</div>
|
|
21
21
|
</a>
|
|
22
|
-
`;let i=new google.maps.InfoWindow({content:r.outerHTML,maxWidth:sc.info_window_max_width});this.infoWindows.set(e.name,i),t.addListener("click",()=>{this.closeAllInfoWindows(),i.open({map:this.map,anchor:t}),this.currentlyOpenInfoWindows.add(e.name),i.addListener("closeclick",()=>{this.currentlyOpenInfoWindows.delete(e.name)})})}closeAllInfoWindows(){this.currentlyOpenInfoWindows.forEach(t=>{let e=this.infoWindows.get(t);e&&e.close()}),this.currentlyOpenInfoWindows.clear()}async fillMissingCoordinates(){if(await this.initPromise,!this.map||!this.geocoder){console.error("Map or geocoder not initialized");return}for(let t=0;t<this.landmarks.length;t++){let e=this.landmarks[t];if(!(e.lat&&e.lng))if(e.address)try{let r=await this.geocodeAddress(e.address);r?this.landmarks[t]={...e,lat:r.lat,lng:r.lng}:console.error(`Geocoding failed for address: ${e.address}`)}catch(r){console.error(`Error geocoding address: ${e.address}`,r)}else console.error(`No address available for landmark: ${e.name}`)}if(this.landmarks.length>0){let t=this.landmarks.reduce((e,r)=>({lat:e.lat+r.lat,lng:e.lng+r.lng}),{lat:0,lng:0});this.medianLandmark={lat:t.lat/this.landmarks.length,lng:t.lng/this.landmarks.length},this.map.setCenter(this.medianLandmark)}}clearMarkers(){this.markers.forEach(t=>{t.setMap(null)}),this.markers=[],this.markerMap.clear(),this.closeAllInfoWindows(),this.infoWindows.clear()}setView(t,e,r){this.map&&(this.map.setCenter({lat:t,lng:e}),this.map.setZoom(r))}invalidateSize(){this.map&&google.maps.event.trigger(this.map,"resize")}async resetView(t=1e3){if(!this.map||this.landmarks.length===0){console.warn("Cannot reset view: map not initialized or no landmarks");return}let e=this.landmarks.reduce((u,l)=>({lat:u.lat+l.lat,lng:u.lng+l.lng}),{lat:0,lng:0}),r={lat:e.lat/this.landmarks.length,lng:e.lng/this.landmarks.length},i=ke.Now.instant(),o=this.map.getCenter(),a=this.map.getZoom()||0,s=()=>{let u=ke.Now.instant().epochMilliseconds-i.epochMilliseconds,l=Math.min(u/t,1),h=l<.5?4*l*l*l:1-Math.pow(-2*l+2,3)/2;if(o){let f=o.lat()+(r.lat-o.lat())*h,p=o.lng()+(r.lng-o.lng())*h;this.map?.setCenter({lat:f,lng:p})}l<1?requestAnimationFrame(s):(this.map?.setCenter(r),this.map?.setZoom(a))};requestAnimationFrame(s),google.maps.event.trigger(this.map,"resize")}calculateZoomForBounds(t){if(!this.map)return 0;let e=t.getNorthEast(),r=t.getSouthWest(),i=e.lat(),o=e.lng(),a=r.lat(),s=r.lng(),u=Math.abs(i-a),l=Math.abs(o-s),h=this.map.getDiv(),f=h.clientWidth,p=h.clientHeight,E=Math.log2(360/u)-Math.log2(p/256),k=Math.log2(360/l)-Math.log2(f/256);return Math.min(E,k)}toggleAllInfoWindows(t){this.map&&(t?(this.closeAllInfoWindows(),this.landmarks.forEach(e=>{let r=this.markerMap.get(e.name),i=this.infoWindows.get(e.name);r&&i&&(i.open({map:this.map,anchor:r}),this.currentlyOpenInfoWindows.add(e.name))})):this.closeAllInfoWindows())}};async function Dd(n){let e=(await wd()).filter(i=>(i.address.Longitude&&i.address.Latitude||i.address.Line1)&&n.items.value.some(o=>i.id===o.fields["enterprise-id"].value)).map(i=>({enterpriseId:i.id,name:i.name,lat:i.address.Latitude,lng:i.address.Longitude,city:i.address.City,websiteUrl:i.url,address:i.address.Line1||"",availableCount:n.items.value.filter(o=>i.id===o.fields["enterprise-id"].value).length})),r=new Da(e);return e.length>0&&r.addLandmarks(),r}function Am(n){let t=n.find(a=>a.instance==="apparthotels"),e=n.find(a=>a.instance==="related");if(!t)throw new Error("Main List instance not found");if(new wa(t).init().then(a=>{Ke("loading:end",a?.element)}).catch(a=>{throw Gu(!0,void 0),console.error("Error initializing filters component:",a),a}),
|
|
22
|
+
`;let i=new google.maps.InfoWindow({content:r.outerHTML,maxWidth:sc.info_window_max_width});this.infoWindows.set(e.name,i),t.addListener("click",()=>{this.closeAllInfoWindows(),i.open({map:this.map,anchor:t}),this.currentlyOpenInfoWindows.add(e.name),i.addListener("closeclick",()=>{this.currentlyOpenInfoWindows.delete(e.name)})})}closeAllInfoWindows(){this.currentlyOpenInfoWindows.forEach(t=>{let e=this.infoWindows.get(t);e&&e.close()}),this.currentlyOpenInfoWindows.clear()}async fillMissingCoordinates(){if(await this.initPromise,!this.map||!this.geocoder){console.error("Map or geocoder not initialized");return}for(let t=0;t<this.landmarks.length;t++){let e=this.landmarks[t];if(!(e.lat&&e.lng))if(e.address)try{let r=await this.geocodeAddress(e.address);r?this.landmarks[t]={...e,lat:r.lat,lng:r.lng}:console.error(`Geocoding failed for address: ${e.address}`)}catch(r){console.error(`Error geocoding address: ${e.address}`,r)}else console.error(`No address available for landmark: ${e.name}`)}if(this.landmarks.length>0){let t=this.landmarks.reduce((e,r)=>({lat:e.lat+r.lat,lng:e.lng+r.lng}),{lat:0,lng:0});this.medianLandmark={lat:t.lat/this.landmarks.length,lng:t.lng/this.landmarks.length},this.map.setCenter(this.medianLandmark)}}clearMarkers(){this.markers.forEach(t=>{t.setMap(null)}),this.markers=[],this.markerMap.clear(),this.closeAllInfoWindows(),this.infoWindows.clear()}setView(t,e,r){this.map&&(this.map.setCenter({lat:t,lng:e}),this.map.setZoom(r))}invalidateSize(){this.map&&google.maps.event.trigger(this.map,"resize")}async resetView(t=1e3){if(!this.map||this.landmarks.length===0){console.warn("Cannot reset view: map not initialized or no landmarks");return}let e=this.landmarks.reduce((u,l)=>({lat:u.lat+l.lat,lng:u.lng+l.lng}),{lat:0,lng:0}),r={lat:e.lat/this.landmarks.length,lng:e.lng/this.landmarks.length},i=ke.Now.instant(),o=this.map.getCenter(),a=this.map.getZoom()||0,s=()=>{let u=ke.Now.instant().epochMilliseconds-i.epochMilliseconds,l=Math.min(u/t,1),h=l<.5?4*l*l*l:1-Math.pow(-2*l+2,3)/2;if(o){let f=o.lat()+(r.lat-o.lat())*h,p=o.lng()+(r.lng-o.lng())*h;this.map?.setCenter({lat:f,lng:p})}l<1?requestAnimationFrame(s):(this.map?.setCenter(r),this.map?.setZoom(a))};requestAnimationFrame(s),google.maps.event.trigger(this.map,"resize")}calculateZoomForBounds(t){if(!this.map)return 0;let e=t.getNorthEast(),r=t.getSouthWest(),i=e.lat(),o=e.lng(),a=r.lat(),s=r.lng(),u=Math.abs(i-a),l=Math.abs(o-s),h=this.map.getDiv(),f=h.clientWidth,p=h.clientHeight,E=Math.log2(360/u)-Math.log2(p/256),k=Math.log2(360/l)-Math.log2(f/256);return Math.min(E,k)}toggleAllInfoWindows(t){this.map&&(t?(this.closeAllInfoWindows(),this.landmarks.forEach(e=>{let r=this.markerMap.get(e.name),i=this.infoWindows.get(e.name);r&&i&&(i.open({map:this.map,anchor:r}),this.currentlyOpenInfoWindows.add(e.name))})):this.closeAllInfoWindows())}};async function Dd(n){let e=(await wd()).filter(i=>(i.address.Longitude&&i.address.Latitude||i.address.Line1)&&n.items.value.some(o=>i.id===o.fields["enterprise-id"].value)).map(i=>({enterpriseId:i.id,name:i.name,lat:i.address.Latitude,lng:i.address.Longitude,city:i.address.City,websiteUrl:i.url,address:i.address.Line1||"",availableCount:n.items.value.filter(o=>i.id===o.fields["enterprise-id"].value).length})),r=new Da(e);return e.length>0&&r.addLandmarks(),r}function Am(n){let t=n.find(a=>a.instance==="apparthotels"),e=n.find(a=>a.instance==="related");if(!t)throw new Error("Main List instance not found");if(new Qi(t).init(),new wa(t).init().then(a=>{Ke("loading:end",a?.element)}).catch(a=>{throw Gu(!0,void 0),console.error("Error initializing filters component:",a),a}),Dd(t),!e)throw new Error("Related List instance not found");new Qi(e).init()}window.FinsweetAttributes=window.FinsweetAttributes||[];window.FinsweetAttributes.push(["list",async n=>{Am(n)}]);})();
|
|
23
23
|
/*! Bundled license information:
|
|
24
24
|
|
|
25
25
|
@vue/shared/dist/shared.esm-bundler.js:
|