PageSourceSearch

https://ehrenamt.mitglieder-benefits.de/assets/OfferRegional-B77K4g3Q.js

js mitglieder-benefits.de collected 2026-10-08 09:22:49 UTC 24,968 bytes, 18 lines download raw bytes

1import{l as N,B as $}from"./BasicTypeahead-ByWUe4K8.js";import{F as G,O as W}from"./FlickityItem-B-20cImx.js";import{f as q,O as K}from"./OfferCard-Cbs5b1nY.js";import{x as S,I as U,C as X,$ as J,c as v,b as f,K as Y,F as A,o as g,_ as Q,g as O,a as x,k as P,r as w,j as b,G as Z,t as L,f as D}from"./index-D3UEpanj.js";class I{constructor(e=null,t={}){if(this.apiKey=e,this.options=t,typeof window>"u")throw new Error("google-maps is supported only in browser environment")}load(){return typeof this.api<"u"?Promise.resolve(this.api):typeof this.loader<"u"?this.loader:(window[I.CALLBACK_NAME]=()=>{if(this.api=window.google,typeof this.resolve>"u")throw new Error("Should not happen");this.resolve(this.api)},window.gm_authFailure=()=>{if(typeof this.reject>"u")throw new Error("Should not happen");this.reject(new Error("google-maps: authentication error"))},this.loader=new Promise((e,t)=>{this.resolve=e,this.reject=t;const s=document.createElement("script");s.src=this.createUrl(),s.async=!0,s.onerror=r=>t(r),document.head.appendChild(s)}))}createUrl(){const e=[`callback=${I.CALLBACK_NAME}`];this.apiKey&&e.push(`key=${this.apiKey}`);for(let t in this.options)if(this.options.hasOwnProperty(t)){let s=this.options[t];t==="version"&&(t="v"),t==="libraries"&&(s=s.join(",")),e.push(`${t}=${s}`)}return`https://maps.googleapis.com/maps/api/js?${e.join("&")}`}}I.CALLBACK_NAME="_dk_google_maps_loader_cb";/*! *****************************************************************************
2Copyright (c) Microsoft Corporation.
3
4Permission to use, copy, modify, and/or distribute this software for any
5purpose with or without fee is hereby granted.
6
7THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13PERFORMANCE OF THIS SOFTWARE.
14***************************************************************************** */var T=function(n,e){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var r in s)s.hasOwnProperty(r)&&(t[r]=s[r])},T(n,e)};function H(n,e){T(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var C=function(){return C=Object.assign||function(e){for(var t,s=1,r=arguments.length;s<r;s++){t=arguments[s];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},C.apply(this,arguments)};function tt(n,e){for(var t in e.prototype)n.prototype[t]=e.prototype[t]}var R=function(){function n(){tt(n,google.maps.OverlayView)}return n}();function B(n){return Object.keys(n).reduce(function(e,t){return n[t]&&e.push(t+":"+n[t]),e},[]).join(";")}function d(n){return n?n+"px":void 0}var et=function(n){H(e,n);function e(t,s){var r=n.call(this)||this;return r.cluster_=t,r.styles_=s,r.center_=null,r.div_=null,r.sums_=null,r.visible_=!1,r.style=null,r.setMap(t.getMap()),r}return e.prototype.onAdd=function(){var t=this,s,r,i=this.cluster_.getMarkerClusterer(),o=google.maps.version.split("."),l=o[0],a=o[1],h=parseInt(l,10)*100+parseInt(a,10);this.div_=document.createElement("div"),this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){r=s}),google.maps.event.addDomListener(this.div_,"mousedown",function(){s=!0,r=!1}),google.maps.event.addDomListener(this.div_,"contextmenu",function(){google.maps.event.trigger(i,"contextmenu",t.cluster_)}),h>=332&&google.maps.event.addDomListener(this.div_,"touchstart",function(p){p.stopPropagation()}),google.maps.event.addDomListener(this.div_,"click",function(p){if(s=!1,!r){if(google.maps.event.trigger(i,"click",t.cluster_),google.maps.event.trigger(i,"clusterclick",t.cluster_),i.getZoomOnClick()){var m=i.getMaxZoom(),c=t.cluster_.getBounds();i.getMap().fitBounds(c),setTimeout(function(){i.getMap().fitBounds(c),m!==null&&i.getMap().getZoom()>m&&i.getMap().setZoom(m+1)},100)}p.cancelBubble=!0,p.stopPropagation&&p.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){google.maps.event.trigger(i,"mouseover",t.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){google.maps.event.trigger(i,"mouseout",t.cluster_)})},e.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},e.prototype.draw=function(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}},e.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},e.prototype.show=function(){this.div_&&(this.div_.className=this.className_,this.div_.style.cssText=this.createCss_(this.getPosFromLatLng_(this.center_)),this.div_.innerHTML=(this.style.url?this.getImageElementHtml():"")+this.getLabelDivHtml(),typeof this.sums_.title>"u"||this.sums_.title===""?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""),this.visible_=!0},e.prototype.getLabelDivHtml=function(){var t=this.cluster_.getMarkerClusterer(),s=t.ariaLabelFn(this.sums_.text),r={position:"absolute",top:d(this.anchorText_[0]),left:d(this.anchorText_[1]),color:this.style.textColor,"font-size":d(this.style.textSize),"font-family":this.style.fontFamily,"font-weight":this.style.fontWeight,"font-style":this.style.fontStyle,"text-decoration":this.style.textDecoration,"text-align":"center",width:d(this.style.width),"line-height":d(this.style.textLineHeight)};return`
15<div aria-label="`.concat(s,'" style="').concat(B(r),`" tabindex="0">
16  <span aria-hidden="true">`).concat(this.sums_.text,`</span>
17</div>
18`)},e.prototype.getImageElementHtml=function(){var t=(this.style.backgroundPosition||"0 0").split(" "),s=parseInt(t[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(t[1].replace(/^\s+|\s+$/g,""),10),i={};if(this.cluster_.getMarkerClusterer().getEnableRetinaIcons())i={width:d(this.style.width),height:d(this.style.height)};else{var o=[-1*r,-1*s+this.style.width,-1*r+this.style.height,-1*s],l=o[0],a=o[1],h=o[2],p=o[3];i={clip:"rect(".concat(l,"px, ").concat(a,"px, ").concat(h,"px, ").concat(p,"px)")}}var m=this.sums_.url?{width:"100%",height:"100%"}:{},c=B(C(C({position:"absolute",top:d(r),left:d(s)},i),m));return'<img alt="'.concat(this.sums_.text,'" aria-hidden="true" src="').concat(this.style.url,'" style="').concat(c,'"/>')},e.prototype.useStyle=function(t){this.sums_=t;var s=Math.max(0,t.index-1);s=Math.min(this.styles_.length-1,s),this.style=this.sums_.url?C(C({},this.styles_[s]),{url:this.sums_.url}):this.styles_[s],this.anchorText_=this.style.anchorText||[0,0],this.anchorIcon_=this.style.anchorIcon||[Math.floor(this.style.height/2),Math.floor(this.style.width/2)],this.className_=this.cluster_.getMarkerClusterer().getClusterClass()+" "+(this.style.className||"cluster-"+s)},e.prototype.setCenter=function(t){this.center_=t},e.prototype.createCss_=function(t){return B({"z-index":"".concat(this.cluster_.getMarkerClusterer().getZIndex()),top:d(t.y),left
18:d(t.x),width:d(this.style.width),height:d(this.style.height),cursor:"pointer",position:"absolute","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-o-user-select":"none","user-select":"none"})},e.prototype.getPosFromLatLng_=function(t){var s=this.getProjection().fromLatLngToDivPixel(t);return s.x=Math.floor(s.x-this.anchorIcon_[1]),s.y=Math.floor(s.y-this.anchorIcon_[0]),s},e}(R),st=function(){function n(e){this.markerClusterer_=e,this.map_=this.markerClusterer_.getMap(),this.minClusterSize_=this.markerClusterer_.getMinimumClusterSize(),this.averageCenter_=this.markerClusterer_.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new et(this,this.markerClusterer_.getStyles())}return n.prototype.getSize=function(){return this.markers_.length},n.prototype.getMarkers=function(){return this.markers_},n.prototype.getCenter=function(){return this.center_},n.prototype.getMap=function(){return this.map_},n.prototype.getMarkerClusterer=function(){return this.markerClusterer_},n.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center_,this.center_),t=this.getMarkers(),s=0;s<t.length;s++)e.extend(t[s].getPosition());return e},n.prototype.remove=function(){this.clusterIcon_.setMap(null),this.markers_=[],delete this.markers_},n.prototype.addMarker=function(e){if(this.isMarkerAlreadyAdded_(e))return!1;if(!this.center_)this.center_=e.getPosition(),this.calculateBounds_();else if(this.averageCenter_){var t=this.markers_.length+1,s=(this.center_.lat()*(t-1)+e.getPosition().lat())/t,r=(this.center_.lng()*(t-1)+e.getPosition().lng())/t;this.center_=new google.maps.LatLng(s,r),this.calculateBounds_()}e.isAdded=!0,this.markers_.push(e);var i=this.markers_.length,o=this.markerClusterer_.getMaxZoom();if(o!==null&&this.map_.getZoom()>o)e.getMap()!==this.map_&&e.setMap(this.map_);else if(i<this.minClusterSize_)e.getMap()!==this.map_&&e.setMap(this.map_);else if(i===this.minClusterSize_)for(var l=0;l<i;l++)this.markers_[l].setMap(null);else e.setMap(null);return!0},n.prototype.isMarkerInClusterBounds=function(e){return this.bounds_.contains(e.getPosition())},n.prototype.calculateBounds_=function(){var e=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(e)},n.prototype.updateIcon=function(){var e=this.markers_.length,t=this.markerClusterer_.getMaxZoom();if(t!==null&&this.map_.getZoom()>t){this.clusterIcon_.hide();return}if(e<this.minClusterSize_){this.clusterIcon_.hide();return}var s=this.markerClusterer_.getStyles().length,r=this.markerClusterer_.getCalculator()(this.markers_,s);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.useStyle(r),this.clusterIcon_.show()},n.prototype.isMarkerAlreadyAdded_=function(e){if(this.markers_.indexOf)return this.markers_.indexOf(e)!==-1;for(var t=0;t<this.markers_.length;t++)if(e===this.markers_[t])return!0;return!1},n}(),z=function(n,e,t){return n[e]!==void 0?n[e]:t},it=function(n){H(e,n);function e(t,s,r){s===void 0&&(s=[]),r===void 0&&(r={});var i=n.call(this)||this;return i.options=r,i.markers_=[],i.clusters_=[],i.listeners_=[],i.activeMap_=null,i.ready_=!1,i.ariaLabelFn=i.options.ariaLabelFn||function(){return""},i.zIndex_=i.options.zIndex||Number(google.maps.Marker.MAX_ZINDEX)+1,i.gridSize_=i.options.gridSize||60,i.minClusterSize_=i.options.minimumClusterSize||2,i.maxZoom_=i.options.maxZoom||null,i.styles_=i.options.styles||[],i.title_=i.options.title||"",i.zoomOnClick_=z(i.options,"zoomOnClick",!0),i.averageCenter_=z(i.options,"averageCenter",!1),i.ignoreHidden_=z(i.options,"ignoreHidden",!1),i.enableRetinaIcons_=z(i.options,"enableRetinaIcons",!1),i.imagePath_=i.options.imagePath||e.IMAGE_PATH,i.imageExtension_=i.options.imageExtension||e.IMAGE_EXTENSION,i.imageSizes_=i.options.imageSizes||e.IMAGE_SIZES,i.calculator_=i.options.calculator||e.CALCULATOR,i.batchSize_=i.options.batchSize||e.BATCH_SIZE,i.batchSizeIE_=i.options.batchSizeIE||e.BATCH_SIZE_IE,i.clusterClass_=i.options.clusterClass||"cluster",navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(i.batchSize_=i.batchSizeIE_),i.setupStyles_(),i.addMarkers(s,!0),i.setMap(t),i}return e.prototype.onAdd=function(){var t=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.prevZoom_=this.getMap().getZoom(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){var s=t.getMap(),r=s.minZoom||0,i=Math.min(s.maxZoom||100,s.mapTypes[s.getMapTypeId()].maxZoom),o=Math.min(Math.max(t.getMap().getZoom(),r),i);t.prevZoom_!=o&&(t.prevZoom_=o,t.resetViewport_(!1))}),google.maps.event.addListener(this.getMap(),"idle",function(){t.redraw_()})]},e.prototype.onRemove=function(){for(var t=0;t<this.markers_.length;t++)this.markers_[t].getMap()!==this.activeMap_&&this.markers_[t].setMap(this.activeMap_);for(var t=0;
18t<this.clusters_.length;t++)this.clusters_[t].remove();this.clusters_=[];for(var t=0;t<this.listeners_.length;t++)google.maps.event.removeListener(this.listeners_[t]);this.listeners_=[],this.activeMap_=null,this.ready_=!1},e.prototype.draw=function(){},e.prototype.setupStyles_=function(){if(!(this.styles_.length>0))for(var t=0;t<this.imageSizes_.length;t++){var s=this.imageSizes_[t];this.styles_.push(e.withDefaultStyle({url:this.imagePath_+(t+1)+"."+this.imageExtension_,height:s,width:s}))}},e.prototype.fitMapToMarkers=function(t){for(var s=this.getMarkers(),r=new google.maps.LatLngBounds,i=0;i<s.length;i++)(s[i].getVisible()||!this.getIgnoreHidden())&&r.extend(s[i].getPosition());this.getMap().fitBounds(r,t)},e.prototype.getGridSize=function(){return this.gridSize_},e.prototype.setGridSize=function(t){this.gridSize_=t},e.prototype.getMinimumClusterSize=function(){return this.minClusterSize_},e.prototype.setMinimumClusterSize=function(t){this.minClusterSize_=t},e.prototype.getMaxZoom=function(){return this.maxZoom_},e.prototype.setMaxZoom=function(t){this.maxZoom_=t},e.prototype.getZIndex=function(){return this.zIndex_},e.prototype.setZIndex=function(t){this.zIndex_=t},e.prototype.getStyles=function(){return this.styles_},e.prototype.setStyles=function(t){this.styles_=t},e.prototype.getTitle=function(){return this.title_},e.prototype.setTitle=function(t){this.title_=t},e.prototype.getZoomOnClick=function(){return this.zoomOnClick_},e.prototype.setZoomOnClick=function(t){this.zoomOnClick_=t},e.prototype.getAverageCenter=function(){return this.averageCenter_},e.prototype.setAverageCenter=function(t){this.averageCenter_=t},e.prototype.getIgnoreHidden=function(){return this.ignoreHidden_},e.prototype.setIgnoreHidden=function(t){this.ignoreHidden_=t},e.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_},e.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons_=t},e.prototype.getImageExtension=function(){return this.imageExtension_},e.prototype.setImageExtension=function(t){this.imageExtension_=t},e.prototype.getImagePath=function(){return this.imagePath_},e.prototype.setImagePath=function(t){this.imagePath_=t},e.prototype.getImageSizes=function(){return this.imageSizes_},e.prototype.setImageSizes=function(t){this.imageSizes_=t},e.prototype.getCalculator=function(){return this.calculator_},e.prototype.setCalculator=function(t){this.calculator_=t},e.prototype.getBatchSizeIE=function(){return this.batchSizeIE_},e.prototype.setBatchSizeIE=function(t){this.batchSizeIE_=t},e.prototype.getClusterClass=function(){return this.clusterClass_},e.prototype.setClusterClass=function(t){this.clusterClass_=t},e.prototype.getMarkers=function(){return this.markers_},e.prototype.getTotalMarkers=function(){return this.markers_.length},e.prototype.getClusters=function(){return this.clusters_},e.prototype.getTotalClusters=function(){return this.clusters_.length},e.prototype.addMarker=function(t,s){this.pushMarkerTo_(t),s||this.redraw_()},e.prototype.addMarkers=function(t,s){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.pushMarkerTo_(t[r]);s||this.redraw_()},e.prototype.pushMarkerTo_=function(t){var s=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",function(){s.ready_&&(t.isAdded=!1,s.repaint())}),t.isAdded=!1,this.markers_.push(t)},e.prototype.removeMarker=function(t,s){var r=this.removeMarker_(t);return!s&&r&&this.repaint(),r},e.prototype.removeMarkers=function(t,s){for(var r=!1,i=0;i<t.length;i++){var o=this.removeMarker_(t[i]);r=r||o}return!s&&r&&this.repaint(),r},e.prototype.removeMarker_=function(t){var s=-1;if(this.markers_.indexOf)s=this.markers_.indexOf(t);else for(var r=0;r<this.markers_.length;r++)if(t===this.markers_[r]){s=r;break}return s===-1?!1:(t.setMap(null),this.markers_.splice(s,1),!0)},e.prototype.clearMarkers=function(){this.resetViewport_(!0),this.markers_=[]}
18,e.prototype.repaint=function(){var t=this.clusters_.slice();this.clusters_=[],this.resetViewport_(!1),this.redraw_(),setTimeout(function(){for(var s=0;s<t.length;s++)t[s].remove()},0)},e.prototype.getExtendedBounds=function(t){var s=this.getProjection(),r=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),i=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),o=s.fromLatLngToDivPixel(r);o.x+=this.gridSize_,o.y-=this.gridSize_;var l=s.fromLatLngToDivPixel(i);l.x-=this.gridSize_,l.y+=this.gridSize_;var a=s.fromDivPixelToLatLng(o),h=s.fromDivPixelToLatLng(l);return t.extend(a),t.extend(h),t},e.prototype.redraw_=function(){this.createClusters_(0)},e.prototype.resetViewport_=function(t){for(var s=0;s<this.clusters_.length;s++)this.clusters_[s].remove();this.clusters_=[];for(var s=0;s<this.markers_.length;s++){var r=this.markers_[s];r.isAdded=!1,t&&r.setMap(null)}},e.prototype.distanceBetweenPoints_=function(t,s){var r=6371,i=(s.lat()-t.lat())*Math.PI/180,o=(s.lng()-t.lng())*Math.PI/180,l=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(s.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2),a=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l));return r*a},e.prototype.isMarkerInBounds_=function(t,s){return s.contains(t.getPosition())},e.prototype.addToClosestCluster_=function(t){for(var s=4e4,r=null,i=0;
18i<this.clusters_.length;i++){var o=this.clusters_[i],l=o.getCenter();if(l){var a=this.distanceBetweenPoints_(l,t.getPosition());a<s&&(s=a,r=o)}}if(r&&r.isMarkerInClusterBounds(t))r.addMarker(t);else{var o=new st(this);o.addMarker(t),this.clusters_.push(o)}},e.prototype.createClusters_=function(t){var s=this;if(this.ready_){t===0&&(google.maps.event.trigger(this,"clusteringbegin",this),typeof this.timerRefStatic<"u"&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()),i=this.getExtendedBounds(r),o=Math.min(t+this.batchSize_,this.markers_.length),l=t;l<o;l++){var a=this.markers_[l];!a.isAdded&&this.isMarkerInBounds_(a,i)&&(!this.ignoreHidden_||this.ignoreHidden_&&a.getVisible())&&this.addToClosestCluster_(a)}if(o<this.markers_.length)this.timerRefStatic=window.setTimeout(function(){s.createClusters_(o)},0);else{delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this);for(var l=0;
18l<this.clusters_.length;l++)this.clusters_[l].updateIcon()}}},e.CALCULATOR=function(t,s){for(var r=0,i=t.length,o=i;o!==0;)o=Math.floor(o/10),r++;return r=Math.min(r,s),{text:i.toString(),index:r,title:""}},e.withDefaultStyle=function(t){return C({textColor:"black",textSize:11,textDecoration:"none",textLineHeight:t.height,fontWeight:"bold",fontStyle:"normal",fontFamily:"Arial,sans-serif",backgroundPosition:"0 0"},t)},e.BATCH_SIZE=2e3,e.BATCH_SIZE_IE=500,e.IMAGE_PATH="../images/m",e.IMAGE_EXTENSION="png",e.IMAGE_SIZES=[53,56,66,78,90],e}(R);const rt={__name:"OfferMap",props:{markers:{type:Array,default:()=>[]},center:{required:!0,type:Object}},emits:["boundsChanged"],setup(n,{emit:e}){const t=S(null),s=S(null),r=S(null),i=S([]),o=n,l=e;return U(async()=>{var u;let a=null;(u=window.google)!=null&&u.maps?a=window.google:a=await new I("AIzaSyDJbCYwOp_hQkBFbCAnCgD8ZV046B_Z8Aw",{}).load();const h=new a.maps.Map(t.value,{animatedZoom:!1,mapTypeControl:!1,center:{lat:-34.397,lng:150.644},zoom:8});h.setZoom(15),h.addListener("bounds_changed",()=>l("boundsChanged",h.getBounds().toJSON()));const p=new it(h,[],{imagePath:"images/cluster-marker/m",zoomOnClick:!1});X(()=>{h.setCenter(o.center)}),J(()=>o.markers,(y,k)=>{const E=y.filter(_=>!k.includes(_));for(const _ of E){const M=new a.maps.Marker({..._});a.maps.event.addListener(M,"click",function(){m(M,_.offers)}),p.addMarker(M),a.maps.event.addListener(p,"clusterclick",c)}});async function m(y,k){i.value=k,r.value&&r.value.close(),r.value=new a.maps.InfoWindow({content:s.value}),r.value.open({anchor:y,map:h,shouldFocus:!1})}const c=N.debounce(y=>{var k=new a.maps.MVCObject;k.set("position",y.center_);var E=y.getMarkers();let _=[];_=_.concat.apply([],E.map(M=>M.offers)),_=_.filter((M,V,j)=>V===j.findIndex(F=>F._id===M._id)),i.value=_,r.value&&r.value.close(),r.value=new a.maps.InfoWindow({content:s.value,disableAutoPan:!1}),r.value.open(h,k)},200);return s.value.parentNode.removeChild(s.value),{infoboxOffers:i}}),(a,h)=>(g(),v(A,null,[f("div",{ref_key:"infoboxElement",ref:s},[Y(a.$slots,"default",{offers:i.value})],512),f("div",{id:"map",ref_key:"mapElement",ref:t},null,512)],64))}},nt={components:{BasicTypeahead:$,OfferRowWrapper:W,OfferCard:K,OfferMap:rt,FlickityItem:G},data(){return{markers:[],offerAddresses:[],zip:null,center:null,highlightOffers:null,VITE_GOOGLE_MAPS_KEY:"AIzaSyDJbCYwOp_hQkBFbCAnCgD8ZV046B_Z8Aw"}},computed:{user(){return this.$store.getters["auth/user"]},knownAdressIds(){return[...new Set(this.offerAddresses.map(n=>n._id))]}},created(){this.user.latLngs?this.center={lat:this.user.latLngs.coordinates[0],lng:this.user.latLngs.coordinates[1]}:this.center={lat:54.781459,lng:9.440002},this.fetchdata()},methods:{async fetchdata(){const n=await this.$store.dispatch("offer-recommendation/find");this.highlightOffers=n.data},formatCurrency:q,async queryZip(n){if(n)return(await this.$store.dispatch("zip/find",{query:{$or:[{zip:{$regex:n}},{town:{$regex:n}}]}})).data.map(t=>({value:t.zip,...t}))},zipFormatter(n){return`${n.zip} ${n.town}`},hitZip(n){this.center={lat:n.location.lat,lng:n.location.lon}},async fetchMapData({north:n,east:e,south:t,west:s}){const r=[t,e],i=[n,s],l=(await this.$store.dispatch("offer-regional/find",{query:{bottomLeft:r,topRight:i,knownAdressIds:this.knownAdressIds.slice(0,200)}})).filter(a=>!this.knownAdressIds.includes(a._id));this.offerAddresses.push(...l);for(const a of l){const h={position:{lat:a.latLng[0],lng:a.latLng[1]},id:`${a.latLng[0]}-${a.latLng[1]}-${a.offer._id}`,icon:{url:a.offer.logoBlob.uri,scaledSize:{height:42,width:42}},offers:[a.offer]};this.markers.some(p=>p.id===h.id)||(this.markers=[...this.markers,h])}},updateBounds:N.debounce(function(n){this.fetchMapData(n)},200)}},ot={class:"container"},at={class:"rounded-xl shadow-md overflow-hidden relative"},lt={class:"absolute inset-x-0 p-4 md:p-6 z-dropdown"},ht={class:"w-16 h-16 bg-white flex-shrink-0"},ut=["src"],ct={class:"text-lg mb-0 flex-grow"},pt={class:"flex-shrink-0 flex items-center space-x-1"},dt={class:"bg-primary rounded text-white px-1.5 py-1"},gt={key:0},ft={key:1},_t={key:1};function mt(n,e,t,s,r,i){const o=w("BasicTypeahead"),l=w("router-link"),a=w("OfferMap"),h=w("OfferCard"),p=w("flickity-item"),m=w("OfferRowWrapper");return g(),v("div",ot,[e[2]||(e[2]=f("h3",{class:"font-bold pt-5"}," Regionale Angebote ",-1)),e[3]||(e[3]=f("p",{class:"mb-6"}," Finde die passenden Angebote in deiner Nähe ",-1)),f("div",at,[f("div",lt,[P(o,{ref:"zipTypeAhead",modelValue:r.zip,"onUpdate:modelValue":e[0]||(e[0]=c=>r.zip=c),class:"md:w-1/2 mx-auto rounded shadow",query:i.queryZip,"input-formatter":i.zipFormatter,"result-formatter":i.zipFormatter,placeholder:"Gib einen Ort ein um Angebote in deiner Nähe zu finden","show-button":"",onHit:i.hitZip},null,8,["modelValue","query","input-formatter","result-formatter","onHit"])]),P(a,{center:r.center,markers:r.markers,onBoundsChanged:i.updateBounds},{default:b(({offers:c})=>[(g(!0),v(A,null,Z(c,u=>(g(),O(l,{key:u._id,to:{name:"OfferDetail",params:{id:u._id}},class:"flex items-center space-x-4 hover:bg-gray-100 transition-colors p-2 rounded-md"},{default:b(()=>[f("div",ht,[u.logoBlob?(g(),v("img",{key:0,src:u.logoBlob.uri,class:"w-full h-full"},null,8,ut)):x("",!0)]),f("p",ct,L(u.dashboardName),1),f("div",pt,[f("div",dt,[u.discountShortAmount?(g(),v(A,{key:0},[u.discountPrefix==="FROM"?(g(),v("span",gt,">")):x("",!0),u.discountPrefix==="UPTO"?(g(),v("span",ft,"<")):x("",!0),D(" "+L(i.formatCurrency(u.discountShortAmount,u.discountShortType)),1)],64)):x("",!0),u.discountShortType?(g(),v("span",_t,L(u.discountShortType),1)):x("",!0),D(" "+L(u.discountShortText),1)]),e[1]||(e[1]=f("i",{class:"fas fa-chevron-right felex-shrink text-primary"},null,-1))])]),_:2},1032,["to"]))),128))]),_:1},8,["center","markers","onBoundsChanged"])]),r.highlightOffers?(g(),O(m,{key:0,headline:"Das könnte Dich interessieren",offset:!0,class:"mt-20"},{default:b(()=>[(g(!0),v(A,null,Z(r.highlightOffers,c=>(g(),O(p,{key:c._id,"is-image-loaded":c.isImageLoaded},{default:b(()=>[P(h,{offer:c,class:"carousel-cell",onImageLoaded:u=>c.isImageLoaded=!0},null,8,["offer","onImageLoaded"])]),_:2},1032,["is-image-loaded"]))),128))]),_:1})):x("",!0)])}const kt=Q(nt,[["render",mt]]);export{kt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.