vendor: 9,477 bytes, lines 1-2
1/*! For license information please see app.js.LICENSE.txt */ 2!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.wbusl=e():t.wbusl=e()}(self,(()=>(()=>{var t={748:function(t){var e;e=function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=Array(e);s<e;s++)i[s]=t[s];return i}function e(t,e,s){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function s(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function i(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?s(Object(n),!0).forEach((function(s){e(t,s,n[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function n(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(e,s){if(e){if("string"==typeof e)return t(e,s);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,s):void 0}}var a=function(t){return"string"==typeof t?document.querySelector(t):t()},l=function(t,e){var s="string"==typeof t?document.createElement(t):t;for(var i in e){var n=e[i];if("inside"===i)n.append(s);else if("dest"===i)a(n[0]).insertAdjacentElement(n[1],s);else if("around"===i){var r=n;r.parentNode.insertBefore(s,r),s.append(r),null!=r.getAttribute("autofocus")&&r.focus()}else i in s?s[i]=n:s.setAttribute(i,n)}return s},c=function(t,e){return t=String(t).toLowerCase(),e?t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").normalize("NFC"):t},d=function(t,e){return l("mark",i({innerHTML:t},"string"==typeof e&&{class:e})).outerHTML},u=function(t,e){e.input.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e.feedback,cancelable:!0}))},h=function(t,e,s){var i=s||{},n=i.mode,r=i.diacritics,o=i.highlight,a=c(e,r);if(e=String(e),t=c(t,r),"loose"===n){var l=(t=t.replace(/ /g,"")).length,u=0,h=Array.from(e).map((function(e,s){return u<l&&a[s]===t[u]&&(e=o?d(e,o):e,u++),e})).join("");if(u===l)return h}else{var p=a.indexOf(t);if(~p)return t=e.substring(p,p+t.length),o?e.replace(t,d(t,o)):e}},p=function(t,e){return new Promise((function(s,i){var n;return(n=t.data).cache&&n.store?s():new Promise((function(t,s){return"function"==typeof n.src?new Promise((function(t,s){return"AsyncFunction"===n.src.constructor.name?n.src(e).then(t,s):t(n.src(e))})).then(t,s):t(n.src)})).then((function(e){try{return t.feedback=n.store=e,u("response",t),s()}catch(t){return i(t)}}),i)}))},g=function(t,e){var s=e.data,i=e.searchEngine,n=[];s.store.forEach((function(r,a){var l=function(s){var o=s?r[s]:r,a="function"==typeof i?i(t,o):h(t,o,{mode:i,diacritics:e.diacritics,highlight:e.resultItem.highlight});if(a){var l={match:a,value:r};s&&(l.key=s),n.push(l)}};if(s.keys){var c,d=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=o(t))){e&&(t=e);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,r=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return r=t.done,t},e:function(t){a=!0,n=t},f:function(){try{r||null==e.return||e.return()}finally{if(a)throw n}}}}(s.keys);try{for(d.s();!(c=d.n()).done;)l(c.value)}catch(t){d.e(t)}finally{d.f()}}else l()})),s.filter&&(n=s.filter(n));var r=n.slice(0,e.resultsList.maxResults);e.feedback={query:t,matches:n,results:r},u("results",e)},m="aria-expanded",f="aria-activedescendant",v="aria-selected",b=function(t,e){t.feedback.selection=i({index:e},t.feedback.results[e])},y=function(t){t.isOpen||((t.wrapper||t.input).setAttribute(m,!0),t.list.removeAttribute("hidden"),t.isOpen=!0,u("open",t))},_=function(t){t.isOpen&&((t.wrapper||t.input).setAttribute(m,!1),t.input.setAttribute(f,""),t.list.setAttribute("hidden",""),t.isOpen=!1,u("close",t))},w=function(t,e){var s=e.resultItem,i=e.list.getElementsByTagName(s.tag),r=!!s.selected&&s.selected.split(" ");if(e.isOpen&&i.length){var o,a,l=e.cursor;t>=i.length&&(t=0),t<0&&(t=i.length-1),e.cursor=t,l>-1&&(i[l].removeAttribute(v),r&&(a=i[l].classList).remove.apply(a,n(r))),i[t].setAttribute(v,!0),r&&(o=i[t].classList).add.apply(o,n(r)),e.input.setAttribute(f,i[e.cursor].id),e.list.scrollTop=i[t].offsetTop-e.list.clientHeight+i[t].clientHeight+5,e.feedback.cursor=e.cursor,b(e,t),u("navigate",e)}},E=function(t){w(t.cursor+1,t)},x=function(t){w(t.cursor-1,t)},A=function(t,e,s){(s=s>=0?s:t.cursor)<0||(t.feedback.event=e,b(t,s),u("selection",t),_(t))};function L(t,e){var s=this;return new Promise((function(n,r){var o,a;return o=e||((a=t.input)instanceof HTMLInputElement||a instanceof HTMLTextAreaElement?a.value:a.innerHTML),function(t,e,s){return e?e(t):t.length>=s}(o=t.query?t.query(o):o,t.trigger,t.threshold)?p(t,o).then((function(e){try{return t.feedback instanceof Error?n():(g(o,t),t.resultsList&&function(t){var e=t.resultsList,s=t.list,n=t.resultItem,r=t.feedback,o=r.matches,a=r.results;if(t.cursor=-1,s.innerHTML="",o.length||e.noResults){var c=new DocumentFragment;a.forEach((function(t,e){var s=l(n.tag,i({id:"".concat(n.id,"_").concat(e),role:"option",innerHTML:t.match,inside:c},n.class&&{class:n.class}));n.element&&n.element(s,t)})),s.append(c),e.element&&e.element(s,r),y(t)}else _(t)}(t),c.call(s))}catch(t){return r(t)}}),r):(_(t),c.call(s));function c(){return n()}}))}var C=function(t,e){for(var s in t)for(var i in t[s])e(s,i)},$=function(t){var e,s,n,r=t.events,o=(e=function(){return L(t)},s=t.debounce,function(){clearTimeout(n),n=setTimeout((function(){return e()}),s)}),a=t.events=i({input:i({},r&&r.input)},t.resultsList&&{list:r?i({},r.list):{}}),l={input:{input:function(){o()},keydown:function(e){!function(t,e){switch(t.keyCode){case 40:case 38:t.preventDefault(),40===t.keyCode?E(e):x(e);break;case 13:e.submit||t.preventDefault(),e.cursor>=0&&A(e,t);break;case 9:e.resultsList.tabSelect&&e.cursor>=0&&A(e,t);break;case 27:e.input.value="",u("clear",e),_(e)}}(e,t)},blur:function(){_(t)}},list:{mousedown:function(t){t.preventDefault()},click:function(e){!function(t,e){var s=e.resultItem.tag.toUpperCase(),i=Array.from(e.list.querySelectorAll(s)),n=t.target.closest(s);n&&n.nodeName===s&&A(e,t,i.indexOf(n))}(e,t)}}};C(l,(function(e,s){(t.resultsList||"input"===s)&&(a[e][s]||(a[e][s]=l[e][s]))})),C(a,(function(e,s){t[e].addEventListener(s,a[e][s])}))};function P(t){var e=this;return new Promise((function(s,n){var r,o,a;if(r=t.placeHolder,a={role:"combobox","aria-owns":(o=t.resultsList).id,"aria-haspopup":!0,"aria-expanded":!1},l(t.input,i(i({"aria-controls":o.id,"aria-autocomplete":"both"},r&&{placeholder:r}),!t.wrapper&&i({},a))),t.wrapper&&(t.wrapper=l("div",i({around:t.input,class:t.name+"_wrapper"},a))),o&&(t.list=l(o.tag,i({dest:[o.destination,o.position],id:o.id,role:"listbox",hidden:"hidden"},o.class&&{class:o.class}))),$(t),t.data.cache)return p(t).then((function(t){try{return c.call(e)}catch(t){return n(t)}}),n);function c(){return u("init",t),s()}return c.call(e)}))}function O(t){var e=t.prototype;e.init=function(){P(this)},e.start=function(t){L(this,t)},e.unInit=function(){if(this.wrapper){var t=this.wrapper.parentNode;t.insertBefore(this.input,this.wrapper),t.removeChild(this.wrapper)}var e;C((e=this).events,(function(t,s){e[t].removeEventListener(s,e.events[t][s])}))},e.open=function(){y(this)},e.close=function(){_(this)},e.goTo=function(t){w(t,this)},e.next=function(){E(this)},e.previous=function(){x(this)},e.select=function(t){A(this,null,t)},e.search=function(t,e,s){return h(t,e,s)}}return function t(e){this.options=e,this.id=t.instances=(t.instances||0)+1,this.name="autoComplete",this.wrapper=1,this.threshold=1,this.debounce=0,this.resultsList={position:"afterend",tag:"ul",maxResults:5},this.resultItem={tag:"li"},function(t){var e=t.name,s=t.options,i=t.resultsList,n=t.resultItem;for(var o in s)if("object"===r(s[o]))for(var l in t[o]||(t[o]={}),s[o])t[o][l]=s[o][l];else t[o]=s[o];t.selector=t.selector||"#"+e,i.destination=i.destination||t.selector,i.id=i.id||e+"_list_"+t.id,n.id=n.id||e+"_result",t.input
2=a(t.selector)}(this),O.call(this,t),P(this)}},t.exports=e()},17:t=>{"use strict";t.exports=function t(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var i,n,r;if(Array.isArray(e)){if((i=e.length)!=s.length)return!1;for(n=i;0!=n--;)if(!t(e[n],s[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((i=(r=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(s,r[n]))return!1;for(n=i;0!=n--;){var o=r[n];if(!t(e[o],s[o]))return!1}return!0}return e!=e&&s!=s}}},e={};function s(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,s),r.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i={};return(()=>{"use strict";s.d(i,{default:()=>on,l4:()=>tn,pW:()=>Qi});class t{cards={};constructor(t,e){this.elementName=t,this.map=e,this._setElement()}_setElement(){this.element=document.getElementById(this.elementName)}_zoomTo(t){this.map.setZoom(16),this.map.setCenter({lat:t.lat,lng:t.lng})}createCard(t,s,i=!1){const n=new e(t,s);return i&&this._zoomTo(s),n}add(t,e,s=!1){if(this.cards[t])return;const i=this.createCard(t,e,!1);this.cards[t]=i,this.element.insertBefore(i.element,s?this.element.firstChild:null),this.element.scrollTo({top:0})}updateStores(t){for(const t of this.element.children)t.classList.contains("wbusl-store-card")||t.remove();for(const e of Object.keys(this.cards))t.some((t=>t.id==e))||this._remove(e);t.forEach(((t,e)=>{this.cards[t.id]?this.element.insertBefore(this.cards[t.id].element,this.element.children[e]):this.add(t.id,t.store)}))}moveToTop(t){this.cards[t]&&this.element.insertBefore(this.cards[t].element,this.element.firstChild)}ids(){return new Set(Object.keys(this.cards))}exists(t){return!!this.cards[t]}_remove(t){this.cards[t]&&(this.cards[t].remove(),delete this.cards[t])}_removeAll(){for(const t in this.cards)this._remove(t);this.cards={},[...this.element.children].forEach((t=>t.remove()))}tooManyResults(){this._removeAll();const t=document.createElement("div");t.classList.add("wbusl-too-many-results"),t.innerHTML="<p>Too many results in current map view.<br>Search for a location or zoom in to see store details.</p>",this.element.appendChild(t)}noResults(){this._removeAll();const t=document.createElement("div");t.classList.add("wbusl-no-results"),t.innerHTML="<p>No results in current map view.<br>Search for a location or zoom out to see more stores.</p>",this.element.appendChild(t)}cloneCardElement(t){return this.cards[t]?this.cards[t].element.cloneNode(!0):null}}class e{constructor(t,e){this.id=t,this.storeInfo=e,this._createElement()}_createElement(){this.element=document.createElement("div"),this.element.classList.add("wbusl-store-card"),this.element.id=`wbusl-store-card-${this.id}`;const t=document.createElement("div");t.classList.add("wbusl-store-main-content"),this.element.appendChild(t);const e=document.createElement("div");e.classList.add("wbusl-store-card-basic-info"),t.appendChild(e);const s=document.createElement("div");s.classList.add("wbusl-store-card-left"),e.appendChild(s);const i=document.createElement("div");i.classList.add("wbusl-store-card-right"),e.appendChild(i);const n=document.createElement("img");n.classList.add("wbusl-store-card-thumbnail"),n.setAttribute("src",this.storeInfo.thumbNail||"https://storedata.wbu.com/v2025.05.28/assets/default-wbu-store-image.png"),i.appendChild(n);const r=document.createElement("div");r.classList.add("wbusl-store-card-title"),r.innerText=this.storeInfo.city+", "+this.storeInfo.state,r.addEventListener("click",(()=>Qi(this.id))),s.appendChild(r);const o=document.createElement("div");o.classList.add("wbusl-store-card-address");const a=this.storeInfo.street.replaceAll(", ","<br>");if(o.innerHTML=`<p>${a}<br>${this.storeInfo.city}, ${this.storeInfo.state} ${this.storeInfo.zip}</p>`,s.appendChild(o),this.storeInfo.landmark){const t=document.createElement("div");t.classList.add("wbusl-store-card-landmark"),t.textContent=this.storeInfo.landmark,s.appendChild(t)}const l=document.createElement("div");l.classList.add("wbusl-store-card-reviews");const c=document.createElement("span"),d=document.createElement("span");d.textContent="âââââ";const u=document.createElement("span");0!=this.storeInfo.numReviews&&l.addEventListener("click",(()=>tn(this.storeInfo.googlePlaceID))),l.appendChild(c),l.appendChild(d),l.appendChild(u),async function(t,e,s,i,n){if(t.googlePlaceID&&null===t.numReviews)try{const e=new google.maps.places.Place({id:t.googlePlaceID}
2),s=await e.fetchFields({fields:["rating","userRatingCount"]});s.place.rating?(t.rating=s.place.rating,t.numReviews=s.place.userRatingCount):(t.rating=0,t.numReviews=0)}catch(e){console.error("Failed to load ratings and reviews for Place ID",t.googlePlaceID,e)}!function(t,e,s,i,n){if(!n.numReviews)return void(t.style.visibility="hidden");e.textContent=`${n.rating} `;const r="stars-"+10*Math.ceil(2*n.rating);s.classList.add(r),s.classList.add("stars-container"),i.textContent=` (${n.numReviews})`}(e,s,i,n,t)}(this.storeInfo,l,c,d,u),s.appendChild(l);let h=[{day:"Monday",hoursText:C(this.storeInfo.mondayHours),hoursRange:this.storeInfo.mondayHours},{day:"Tuesday",hoursText:C(this.storeInfo.tuesdayHours),hoursRange:this.storeInfo.tuesdayHours},{day:"Wednesday",hoursText:C(this.storeInfo.wednesdayHours),hoursRange:this.storeInfo.wednesdayHours},{day:"Thursday",hoursText:C(this.storeInfo.thursdayHours),hoursRange:this.storeInfo.thursdayHours},{day:"Friday",hoursText:C(this.storeInfo.fridayHours),hoursRange:this.storeInfo.fridayHours},{day:"Saturday",hoursText:C(this.storeInfo.saturdayHours),hoursRange:this.storeInfo.saturdayHours},{day:"Sunday",hoursText:C(this.storeInfo.sundayHours),hoursRange:this.storeInfo.sundayHours}];const p=document.createElement("div");p.classList.add("hours-accordion");const g=`hours-accordion-checkbox-${this.id}`,m=document.createElement("input");m.setAttribute("type","checkbox"),m.setAttribute("id",g),m.classList.add("hours-accordion-checkbox");const f=document.createElement("label");f.setAttribute("for",g);const v=(new Date).getDay()-1;f.textContent="Coming Soon"==this.storeInfo.status?this.storeInfo.status:function(t,e){const s=e[t];if(A(s.hoursRange)){const[i,n]=s.hoursRange.split("-");return function(t,e){let s=new Date,i=`${s.getHours().toString().padStart(2,"0")}:${s.getMinutes().toString().padStart(2,"0")}`;return i>=t&&i<=e}(i,n)?"Open today from "+C(s.hoursRange):E(t,e,1)}return E(t,e,1)}(v,h),f.classList.add("hours-label"),"Closed"==this.storeInfo.status||"Coming Soon"==this.storeInfo.status?f.classList.add("closed"):f.classList.add("open"),p.appendChild(m),p.appendChild(f);const b=document.createElement("div");b.classList.add("hours-accordion-content");const y=document.createElement("table");b.appendChild(y);for(let t=0;t<h.length;t++){let e=document.createElement("tr"),s=document.createElement("td");s.textContent=h[t].day,e.appendChild(s);let i=document.createElement("td");i.classList.add("hours-open"),i.textContent=h[t].hoursText,e.appendChild(i),y.appendChild(e)}p.appendChild(b),t.appendChild(p);const _=document.createElement("div");_.classList.add("wbusl-store-card-nav-list"),this.element.appendChild(_);const w=[{name:"phone",imgSrc:"https://storedata.wbu.com/v2025.05.28/assets/icons/icon_phone.svg",linkClassList:"wbusl-store-card-phone",linkHref:`tel:${this.storeInfo.phone||"(317) 571-7100"}`,linkContent:this.storeInfo.phone||"(317) 571-7100",linkTarget:"_self",linkLabel:"Call store"},{name:"website",imgSrc:"https://storedata.wbu.com/v2025.05.28/assets/icons/icon_website.svg",linkClassList:"wbusl-store-card-website",linkHref:this.storeInfo.displayURL||"https://wbu.com",linkTarget:"_blank",linkLabel:"Open our website"},{name:"cart",imgSrc:"https://storedata.wbu.com/v2025.05.28/assets/icons/icon_cart.svg",linkClassList:"wbusl-store-card-cart",linkHref:this.storeInfo.eComUrl,linkTarget:"_blank",linkLabel:"Open your shopping cart"},{name:"directions",imgSrc:"https://storedata.wbu.com/v2025.05.28/assets/icons/icon_directions.svg",linkClassList:"wbusl-store-card-directions",linkHref:`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(`${this.storeInfo.lat},${this.storeInfo.lng}`)}`,linkTarget:"_blank",linkLabel:"Open directions to store in Google Maps"},{name:"zoomToStore",imgSrc:"https://storedata.wbu.com/v2025.05.28/assets/icons/icon_zoom_to_store.svg",linkClassList:"wbusl-store-card-zoom-to",linkLabel:`Zoom to store located at ${this.storeInfo.street} ${this.storeInfo.city}, ${this.storeInfo.state} ${this.storeInfo.zip}`}];for(const t of w){if("cart"==t.name&&!t.linkHref)continue;let e=document.createElement("a");if(e.classList.add("wbusl-card-nav-item"),e.classList.add(t.linkClassList),e.target=t.linkTarget,e.rel="noreferrer",e.setAttribute("aria-label",t.linkLabel),t.linkHref&&(e.href=t.linkHref),t.linkCl
2ick&&(e.onclick=()=>this.callback(this.storeInfo)),t.imgSrc){const s=document.createElement("img");s.classList.add("wbusl-card-nav-item-icon"),s.src=t.imgSrc,e.appendChild(s)}if(t.linkContent){const s=document.createElement("span");s.classList.add("wbusl-card-nav-item-content"),s.textContent=t.linkContent,e.appendChild(s)}"zoomToStore"==t.name&&e.addEventListener("click",(()=>Qi(this.id))),_.appendChild(e)}function E(t,e,s){if((new Date).getHours()<=12){let s=e[t];if(A(s.hoursRange)){let t=x(L(s.hoursRange).from[0]);return`Opening Soon · at ${t[0]} ${t[1]} today`}}let i=t+1;i>=7&&(i=0);let n=e[i];if(A(n.hoursRange)){let t=x(L(n.hoursRange).from[0]);return"Closed · Opens "+t[0]+" "+t[1]+" "+n.day}return s>1?"Closed":E(i,e,s+1)}function x(t){let e=parseInt(t);return e>=12?[12==e?12:e-12,"pm"]:[0===e?12:e,"am"]}function A(t){return t&&0!==t.length}function L(t){let e=t.split("-");return{from:e[0].split(":"),to:e[1].split(":")}}function C(t){if(!t?.length)return"Closed";const e=t.split("-"),s=e[0].split(":"),i=e[1].split(":");let n=x(s[0]),r=x(i[0]);return`${n[0]}:${s[1]} ${n[1]} to ${r[0]}:${i[1]} ${r[1]}`}}remove(){this.element.remove()}}var n=s(748),r=s.n(n);function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}"function"==typeof SuppressedError&&SuppressedError;var a=function t(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var i,n,r;if(Array.isArray(e)){if((i=e.length)!=s.length)return!1;for(n=i;0!=n--;
2)if(!t(e[n],s[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((i=(r=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(s,r[n]))return!1;for(n=i;0!=n--;){var o=r[n];if(!t(e[o],s[o]))return!1}return!0}return e!=e&&s!=s},l=o(a);const c="__googleMapsScriptId";var d;!function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"}(d||(d={}));class u{constructor({apiKey:t,authReferrerPolicy:e,channel:s,client:i,id:n=c,language:r,libraries:o=[],mapIds:a,nonce:d,region:h,retries:p=3,url:g="https://maps.googleapis.com/maps/api/js",version:m}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=e,this.channel=s,this.client=i,this.id=n||c,this.language=r,this.libraries=o,this.mapIds=a,this.nonce=d,this.region=h,this.retries=p,this.url=g,this.version=m,u.instance){if(!l(this.options,u.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(u.instance.options)}`);return u.instance}u.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?d.FAILURE:this.done?d.SUCCESS:this.loading?d.LOADING:d.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let t=this.url;return t+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`®ion=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){const t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((t,e)=>{this.loadCallback((s=>{s?e(s.error):t(window.google)}))}))}importLibrary(t){return this.execute(),google.maps.importLibrary(t)}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){var t,e;if(document.getElementById(this.id))return void this.callback();const s={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(s).forEach((t=>!s[t]&&delete s[t])),(null===(e=null===(t=null===window||void 0===window?void 0:window.google)||void 0===t?void 0:t.maps)||void 0===e?void 0:e.importLibrary)||(t=>{let e,s,i,n="The Google Maps JavaScript API",r="google",o="importLibrary",a="__ib__",l=document,c=window;c=c[r]||(c[r]={});const d=c.maps||(c.maps={}),u=new Set,h=new URLSearchParams,p=()=>e||(e=new Promise(((o,c)=>function(t,e,s,i){return new(s||(s=Promise))((function(n,r){function o(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){var p;for(i in yield s=l.createElement("script"),s.id=this.id,h.set("libraries",[...u]+""),t)h.set(i.replace(/[A-Z]/g,(t=>"_"+t[0].toLowerCase())),t[i]);h.set("callback",r+".maps."+a),s.src=this.url+"?"+h,d[a]=o,s.onerror=()=>e=c(Error(n+" could not load.")),s.nonce=this.nonce||(null===(p=l.querySelector("script[nonce]"))||void 0===p?void 0:p.nonce)||"",l.head.append(s)})))));d[o]?console.warn(n+" only loads once. Ignoring:",t):d[o]=(t,...e)=>u.add(t)&&p().then((()=>d[o](t,...e)))})(s);const i=this.libraries.map((t=>this.importLibrary(t)));i.length||i.push(this.importLibrary("core")),Promise.all(i).then((()=>this.callback()),(t=>{const e=new ErrorEvent("error",{error:t});this.loadErrorCallback(e)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=t,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((t=>{t(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}var h=s(17),p=s.n(h);const g=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array
vendor: 8,230 bytes, line 2
2];class m{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,s]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const i=s>>4;if(1!==i)throw new Error(`Got v${i} data when expected v1.`);const n=g[15&s];if(!n)throw new Error("Unrecognized array type.");const[r]=new Uint16Array(t,2,1),[o]=new Uint32Array(t,4,1);return new m(o,r,n,t)}constructor(t,e=64,s=Float64Array,i){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=s,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const n=g.indexOf(this.ArrayType),r=2*t*this.ArrayType.BYTES_PER_ELEMENT,o=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-o%8)%8;if(n<0)throw new Error(`Unexpected typed array class: ${s}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+o+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+r+o+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+o+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+n]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=t,this.coords[this._pos++]=e,s}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return f(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,s,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:r,nodeSize:o}=this,a=[0,n.length-1,0],l=[];for(;a.length;){const c=a.pop()||0,d=a.pop()||0,u=a.pop()||0;if(d-u<=o){for(let o=u;o<=d;o++){const a=r[2*o],c=r[2*o+1];a>=t&&a<=s&&c>=e&&c<=i&&l.push(n[o])}continue}const h=u+d>>1,p=r[2*h],g=r[2*h+1];p>=t&&p<=s&&g>=e&&g<=i&&l.push(n[h]),(0===c?t<=p:e<=g)&&(a.push(u),a.push(h-1),a.push(1-c)),(0===c?s>=p:i>=g)&&(a.push(h+1),a.push(d),a.push(1-c))}return l}within(t,e,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:n,nodeSize:r}=this,o=[0,i.length-1,0],a=[],l=s*s;for(;o.length;){const c=o.pop()||0,d=o.pop()||0,u=o.pop()||0;if(d-u<=r){for(let s=u;s<=d;s++)_(n[2*s],n[2*s+1],t,e)<=l&&a.push(i[s]);continue}const h=u+d>>1,p=n[2*h],g=n[2*h+1];_(p,g,t,e)<=l&&a.push(i[h]),(0===c?t-s<=p:e-s<=g)&&(o.push(u),o.push(h-1),o.push(1-c)),(0===c?t+s>=p:e+s>=g)&&(o.push(h+1),o.push(d),o.push(1-c))}return a}}function f(t,e,s,i,n,r){if(n-i<=s)return;const o=i+n>>1;v(t,e,o,i,n,r),f(t,e,s,i,o-1,1-r),f(t,e,s,o+1,n,1-r)}function v(t,e,s,i,n,r){for(;n>i;){if(n-i>600){const o=n-i+1,a=s-i+1,l=Math.log(o),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(o-c)/o)*(a-o/2<0?-1:1);v(t,e,s,Math.max(i,Math.floor(s-a*c/o+d)),Math.min(n,Math.floor(s+(o-a)*c/o+d)),r)}const o=e[2*s+r];let a=i,l=n;for(b(t,e,i,s),e[2*n+r]>o&&b(t,e,i,n);a<l;){for(b(t,e,a,l),a++,l--;e[2*a+r]<o;)a++;for(;e[2*l+r]>o;)l--}e[2*i+r]===o?b(t,e,i,l):(l++,b(t,e,l,n)),l<=s&&(i=l+1),s<=l&&(n=l-1)}}function b(t,e,s,i){y(t,s,i),y(e,2*s,2*i),y(e,2*s+1,2*i+1)}function y(t,e,s){const i=t[e];t[e]=t[s],t[s]=i}function _(t,e,s,i){const n=t-s,r=e-i;return n*n+r*r}const w={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},E=Math.fround||(x=new Float32Array(1),t=>(x[0]=+t,x[0]));var x;const A=3,L=5,C=6;class ${constructor(t){this.options=Object.assign(Object.create(w),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:s,maxZoom:i}=this.options;e&&console.time("total time");const n=`prepare ${t.length} points`;e&&console.time(n),this.points=t;const r=[];for(let e=0;e<t.length;e++){const s=t[e];if(!s.geometry)continue;const[i,n]=s.geometry.coordinates,o=E(k(i)),a=E(S(n));r.push(o,a,1/0,e,-1,1),this.options.reduce&&r.push(0)}let o=this.trees[i+1]=this._createTree(r);e&&console.timeEnd(n);for(let t=i;t>=s;t--){const s=+Date.now();o=this.trees[t]=this._createTree(this._cluster(o,t)),e&&console.log("z%d: %d clusters in %dms",t,o.numItems,+Date.now()-s)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let s=((t[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[1]));let n=180===t[2]?180:((t[2]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)s=-180,n=180;else if(s>n){const t=this.getClusters([s,i,180,r],e),o=this.getClusters([-180,i,n,r],e);return t.concat(o)}const o=this.trees[this._limitZoom(e)],a=o.range(k(s),S(r),k(n),S(i)),l=o.data,c=[];for(const t of a){const e=this.stride*t;c.push(l[e+L]>1?P(l,e,this.clusterProps):this.points[l[e+A]])}return c}getChildren(t){const e=this._getOriginId(t),s=this._getOriginZoom(t),i="No cluster with the specified id.",n=this.trees[s];if(!n)throw new Error(i);const r=n.data;if(e*this.stride>=r.length)throw new Error(i);const o=this.options.radius/(this.options.extent*Math.pow(2,s-1)),a=r[e*this.stride],l=r[e*this.stride+1],c=n.within(a,l,o),d=[];for(const e of c){const s=e*this.stride;r[s+4]===t&&d.push(r[s+L]>1?P(r,s,this.clusterProps):this.points[r[s+A]])}if(0===d.length)throw new Error(i);return d}getLeaves(t,e,s){e=e||10,s=s||0;const i=[];return this._appendLeaves(i,t,e,s,0),i}getTile(t,e,s){const i=this.trees[this._limitZoom(t)],n=Math.pow(2,t),{extent:r,radius:o}=this.options,a=o/r,l=(s-a)/n,c=(s+1+a)/n,d={features:[]};return this._addTileFeatures(i.range((e-a)/n,l,(e+1+a)/n,c),i.data,e,s,n,d),0===e&&this._addTileFeatures(i.range(1-a/n,l,1,c),i.data,n,s,n,d),e===n-1&&this._addTileFeatures(i.range(0,l,a/n,c),i.data,-1,s,n,d),d.features.length?d:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const s=this.getChildren(t);if(e++,1!==s.length)break;t=s[0].properties.cluster_id}return e}_appendLeaves(t,e,s,i,n){const r=this.getChildren(e);for(const e of r){const r=e.properties;if(r&&r.cluster?n+r.point_count<=i?n+=r.point_count:n=this._appendLeaves(t,r.cluster_id,s,i,n):n<i?n++:t.push(e),t.length===s)break}return n}_createTree(t){const e=new m(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let s=0;s<t.length;s+=this.stride)e.add(t[s],t[s+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,s,i,n,r){for(const o of t){const t=o*this.stride,a=e[t+L]>1;let l,c,d;if(a)l=O(e,t,this.clusterProps),c=e[t],d=e[t+1];else{const s=this.points[e[t+A]];l=s.properties;const[i,n]=s.geometry.coordinates;c=k(i),d=S(n)}const u={type:1,geometry:[[Math.round(this.options.extent*(c*n-s)),Math.round(this.options.extent*(d*n-i))]],tags:l};let h;h=a||this.options.generateId?e[t+A]:this.points[e[t+A]].id,void 0!==h&&(u.id=h),r.features.push(u)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:s,extent:i,reduce:n,minPoints:r}=this.options,o=s/(i*Math.pow(2,e)),a=t.data,l=[],c=this.stride;for(let s=0;s<a.length;s+=c){if(a[s+2]<=e)continue;a[s+2]=e;const i=a[s],d=a[s+1],u=t.within(a[s],a[s+1],o),h=a[s+L];let p=h;for(const t of u){const s=t*c;a[s+2]>e&&(p+=a[s+L])}if(p>h&&p>=r){let t,r=i*h,o=d*h,g=-1;const m=(s/c<<5)+(e+1)+this.points.length;for(const i of u){const l=i*c;if(a[l+2]<=e)continue;a[l+2]=e;const d=a[l+L];r+=a[l]*d,o+=a[l+1]*d,a[l+4]=m,n&&(t||(t=this._map(a,s,!0),g=this.clusterProps.length,this.clusterProps.push(t)),n(t,this._map(a,l)))}a[s+4]=m,l.push(r/p,o/p,1/0,m,-1,p),n&&l.push(g)}else{for(let t=0;t<c;t++)l.push(a[s+t]);if(p>1)for(const t of u){const s=t*c;if(!(a[s+2]<=e)){a[s+2]=e;for(let t=0;t<c;t++)l.push(a[s+t])}}}}return l}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,s){if(t[e+L]>1){const i=this.clusterProps[t[e+C]];return s?Object.assign({},i):i}const i=this.points[t[e+A]].properties,n=this.options.map(i);return s&&n===i?Object.assign({},n):n}}function P(t,e,s){return{type:"Feature",id:t[e+A],properties:O(t,e,s),geometry:{type:"Point",coordinates:[I(t[e]),R(t[e+1])]}}}function O(t,e,s){const i=t[e+L],n=i>=1e4?`${Math.round(i/1e3)}
2k`:i>=1e3?Math.round(i/100)/10+"k":i,r=t[e+C],o=-1===r?{}:Object.assign({},s[r]);return Object.assign(o,{cluster:!0,cluster_id:t[e+A],point_count:i,point_count_abbreviated:n})}function k(t){return t/360+.5}function S(t){const e=Math.sin(t*Math.PI/180),s=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return s<0?0:s>1?1:s}function I(t){return 360*(t-.5)}function R(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function T(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(s[i[n]]=t[i[n]])}return s}class M{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}class N{constructor({markers:t,position:e}){this.markers=t,e&&(e instanceof google.maps.LatLng?this._position=e:this._position=new google.maps.LatLng(e))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(M.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>M.getVisible(t))).length}push(t){this.markers.push(t)}delete(){this.marker&&(M.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const D=(t,e,s,i)=>{const n=U(t.getBounds(),e,i);return s.filter((t=>n.contains(M.getPosition(t))))},U=(t,e,s)=>{const{northEast:i,southWest:n}=j(t,e),r=z({northEast:i,southWest:n},s);return F(r,e)},H=(t,e)=>{const s=(e.lat-t.lat)*Math.PI/180,i=(e.lng-t.lng)*Math.PI/180,n=Math.sin(s/2),r=Math.sin(i/2),o=n*n+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*r*r;return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371},j=(t,e)=>({northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest
2())}),z=({northEast:t,southWest:e},s)=>(t.x+=s,t.y-=s,e.x-=s,e.y+=s,{northEast:t,southWest:e}),F=({northEast:t,southWest:e},s)=>{const i=s.fromDivPixelToLatLng(e),n=s.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(i,n)};class B{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return W(t)}}class q extends B{constructor(t){var{viewportPadding:e=60}=t;super(T(t,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=e}calculate({markers:t,map:e,mapCanvasProjection:s}){return e.getZoom()>=this.maxZoom?{clusters:this.noop({markers:t}),changed:!1}:{clusters:this.cluster({markers:D(e,s,t,this.viewportPadding),map:e,mapCanvasProjection:s})}}}const W=t=>t.map((t=>new N({position:M.getPosition(t),markers:[t]})));class V extends q{constructor(t){var{maxDistance:e=4e4,gridSize:s=40}=t;super(T(t,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=e,this.gridSize=s}calculate({markers:t,map:e,mapCanvasProjection:s}){const i={zoom:e.getZoom()};let n=!1;return this.state.zoom>=this.maxZoom&&i.zoom>=this.maxZoom||(n=!p()(this.state,i)),this.state=i,e.getZoom()>=this.maxZoom?{clusters:this.noop({markers:t}),changed:n}:{clusters:this.cluster({markers:D(e,s,t,this.viewportPadding),map:e,mapCanvasProjection:s})}}cluster({markers:t,map:e,mapCanvasProjection:s}){return this.clusters=[],t.forEach((t=>{this.addToClosestCluster(t,e,s)})),this.clusters}addToClosestCluster(t,e,s){let i=this.maxDistance,n=null;for(let e=0;
2e<this.clusters.length;e++){const s=this.clusters[e],r=H(s.bounds.getCenter().toJSON(),M.getPosition(t).toJSON());r<i&&(i=r,n=s)}if(n&&U(n.bounds,s,this.gridSize).contains(M.getPosition(t)))n.push(t);else{const e=new N({markers:[t]});this.clusters.push(e)}}}class G extends B{constructor(t){var{maxZoom:e,radius:s=60}=t,i=T(t,["maxZoom","radius"]);super({maxZoom:e}),this.state={zoom:-1},this.superCluster=new $(Object.assign({maxZoom:this.maxZoom,radius:s},i))}calculate(t){let e=!1;const s={zoom:t.map.getZoom()};if(!p()(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const s=this.markers.map((t=>{const e=M.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(s)}return e||(this.state.zoom<=this.maxZoom||s.zoom<=this.maxZoom)&&(e=!p()(this.state,s)),this.state=s,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster({map:t}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map((t=>this.transformCluster(t)))}transformCluster({geometry:{coordinates:[t,e]},properties:s}){if(s.cluster)return new N({markers:this.superCluster.getLeaves(s.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:e,lng:t}});const i=s.marker;return new N({markers:[i],position:M.getPosition(i)})}}class Y{constructor(t,e){this.markers={sum:t.length};const s=e.map((t=>t.count)),i=s.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:i/e.length,sum:i,min:Math.min(...s),max:Math.max(...s)}}}}class Z{render({count:t,position:e},s,i){const n=`<svg fill="${t>Math.max(10,s.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>\n</svg>`,r=`Cluster of ${t} markers`,o=Number(google.maps.Marker.MAX_ZINDEX)+t;if(M.isAdvancedMarkerAvailable(i)){const t=(new DOMParser).parseFromString(n,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const s={map:i,position:e,zIndex:o,title:r,content:t};return new google.maps.marker.AdvancedMarkerElement(s)}const a={position:e,zIndex:o,title:r,icon:{url:`data:image/svg+xml;base64,${btoa(n)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}}class K{constructor(){!function(t,e){for(let s in e.prototype)t.prototype[s]=e.prototype[s]}(K,google.maps.OverlayView)}}var J;!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(J||(J={}));const X=(t,e,s)=>{s.fitBounds(e.bounds)};class Q extends K{constructor({map:t,markers:e=[],algorithmOptions:s={},algorithm:i=new G(s),renderer:n=new Z,onClusterClick:r=X}){super(),this.markers=[...e],this.clusters=[],this.algorithm=i,this.renderer=n,this.onClusterClick=r,t&&this.setMap(t)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach((t=>{this.addMarker(t,!0)})),e||this.render()}removeMarker(t,e){const s=this.markers.indexOf(t);return-1!==s&&(M.setMap(t,null),this.markers.splice(s,1),e||this.render(),!0)}removeMarkers(t,e){let s=!1;return t.forEach((t=>{s=this.removeMarker(t,!0)||s})),s&&!e&&this.render(),s}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,J.CLUSTERING_BEGIN,this);const{clusters:e,changed:s}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(s||null==s){const t=new Set;for(const s of e)1==s.markers.length&&t.add(s.markers[0]);const s=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||M.setMap(e.marker,null):s.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame((()=>s.forEach((t=>M.setMap(t,null)))))}google.maps.event.trigger(this,J.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}
2reset(){this.markers.forEach((t=>M.setMap(t,null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const t=new Y(this.markers,this.clusters),e=this.getMap();this.clusters.forEach((s=>{1===s.markers.length?s.marker=s.markers[0]:(s.marker=this.renderer.render(s,t,e),s.markers.forEach((t=>M.setMap(t,null))),this.onClusterClick&&s.marker.addListener("click",(t=>{google.maps.event.trigger(this,J.CLUSTER_CLICK,s),this.onClusterClick(t,s,e)}))),M.setMap(s.marker,e)}))}}function tt(t,e,s,i){var n,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(e,s,o):n(e,s))||o);return r>3&&o&&Object.defineProperty(e,s,o),o}function et(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const st=globalThis,it=st.ShadowRoot&&(void 0===st.ShadyCSS||st.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),rt=new WeakMap;class ot{constructor(t,e,s){if(this._$cssResult$=!0,s!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(it&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=rt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&rt.set(e,t))}return t}toString(){return this.cssText}}const at=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new ot(s,t,nt)},lt=(t,e)=>{if(it)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),i=st.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=s.cssText,t.appendChild(e)}},ct=it?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new ot("string"==typeof t?t:t+"",void 0,nt))(e)})(t):t,{is:dt,defineProperty:ut,getOwnPropertyDescriptor:ht,getOwnPropertyNames:pt,getOwnPropertySymbols:gt,getPrototypeOf:mt}=Object,ft=globalThis,vt=ft.trustedTypes,bt=vt?vt.emptyScript:"",yt=ft.reactiveElementPolyfillSupport,_t=(t,e)=>t,wt={toAttribute(t,e){switch(e){case Boolean:t=t?bt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},Et=(t,e)=>!dt(t,e),xt={attribute:!0,type:String,converter:wt,reflect:!1,hasChanged:Et};Symbol.metadata??=Symbol("metadata"),ft.litPropertyMetadata??=new WeakMap;class At extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=xt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&ut(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=ht(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);n.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??xt}static _$Ei(){if(this.hasOwnProperty(_t("elementProperties")))return;const t=mt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_t("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_t("properties"))){const t=this.properties,e=[...pt(t),...gt(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];
vendor: 6,092 bytes, line 2
2if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(ct(t))}else void 0!==t&&e.push(ct(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const n=(void 0!==s.converter?.toAttribute?s.converter:wt).toAttribute(e,s.type);this._$Em=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:wt;this._$Em=i,this[i]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??Et)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}At.elementStyles=[],At.shadowRootOptions={mode:"open"},At[_t("elementProperties")]=new Map,At[_t("finalized")]=new Map,yt?.({ReactiveElement:At}),(ft.reactiveElementVersions??=[]).push("2.0.4");const Lt=globalThis,Ct=Lt.trustedTypes,$t=Ct?Ct.createPolicy("lit-html",{createHTML:t=>t}):void 0,Pt="$lit$",Ot=`lit$${Math.random().toFixed(9).slice(2)}$`,kt="?"+Ot,St=`<${kt}>`,It=document,Rt=()=>It.createComment(""),Tt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Mt=Array.isArray,Nt="[ \t\n\f\r]",Dt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ut=/-->/g,Ht=/>/g,jt=RegExp(`>|${Nt}(?:([^\\s"'>=/]+)(${Nt}*=${Nt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),zt=/'/g,Ft=/"/g,Bt=/^(?:script|style|textarea|title)$/i,qt=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),Wt=qt(1),Vt=(qt(2),qt(3),Symbol.for("lit-noChange")),Gt=Symbol.for("lit-nothing"),Yt=new WeakMap,Zt=It.createTreeWalker(It,129);function Kt(t,e){if(!Mt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==$t?$t.createHTML(e):e}class Jt{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const o=t.length-1,a=this.parts,[l,c]=((t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=Dt;for(let e=0;e<s;e++){const s=t[e];let a,l,c=-1,d=0;for(;d<s.length&&(o.lastIndex=d,l=o.exec(s),null!==l);)d=o.lastIndex,o===Dt?"!--"===l[1]?o=Ut:void 0!==l[1]?o=Ht:void 0!==l[2]?(Bt.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=jt):void 0!==l[3]&&(o=jt):o===jt?">"===l[0]?(o=n??Dt,c=-1):void 0===l[1]?c=-2:(c=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?jt:'"'===l[3]?Ft:zt):o===Ft||o===zt?o=jt:o===Ut||o===Ht?o=Dt:(o=jt,n=void 0);const u=o===jt&&t[e+1].startsWith("/>")?" ":"";r+=o===Dt?s+St:c>=0?(i.push(a),s.slice(0,c)+Pt+s.slice(c)+Ot+u):s+Ot+(-2===c?e:u)}return[Kt(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=Jt.createElement(l,s),Zt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=Zt.nextNode())&&a.length<o;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Pt)){const e=c[r++],s=i.getAttribute(t).split(Ot),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:s,ctor:"."===o[1]?se:"?"===o[1]?ie:"@"===o[1]?ne:ee}),i.removeAttribute(t)}else t.startsWith(Ot)&&(a.push({type:6,index:n}),i.removeAttribute(t));if(Bt.test(i.tagName)){const t=i.textContent.split(Ot),e=t.length-1;if(e>0){i.textContent=Ct?Ct.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],Rt()),Zt.nextNode(),a.push({type:2,index:++n});i.append(t[e],Rt())}}}else if(8===i.nodeType)if(i.data===kt)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(Ot,t+1));)a.push({type:7,index:n}),t+=Ot.length-1}n++}}static createElement(t,e){const s=It.createElement("template");
vendor: 5,917 bytes, line 2
2return s.innerHTML=t,s}}function Xt(t,e,s=t,i){if(e===Vt)return e;let n=void 0!==i?s.o?.[i]:s.l;const r=Tt(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(t),n._$AT(t,s,i)),void 0!==i?(s.o??=[])[i]=n:s.l=n),void 0!==n&&(e=Xt(t,n._$AS(t,e.values),n,i)),e}class Qt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??It).importNode(e,!0);Zt.currentNode=i;let n=Zt.nextNode(),r=0,o=0,a=s[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new te(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new re(n,this,t)),this._$AV.push(e),a=s[++o]}r!==a?.index&&(n=Zt.nextNode(),r++)}return Zt.currentNode=It,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class te{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=Gt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Xt(this,t,e),Tt(t)?t===Gt||null==t||""===t?(this._$AH!==Gt&&this._$AR(),this._$AH=Gt):t!==this._$AH&&t!==Vt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>Mt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Gt&&Tt(this._$AH)?this._$AA.nextSibling.data=t:this.T(It.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Jt.createElement(Kt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Qt(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=Yt.get(t.strings);return void 0===e&&Yt.set(t.strings,e=new Jt(t)),e}k(t){Mt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new te(this.O(Rt()),this.O(Rt()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this.v=t,this._$AP?.(t))}}class ee{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=Gt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Gt}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(void 0===n)t=Xt(this,t,e,0),r=!Tt(t)||t!==this._$AH&&t!==Vt,r&&(this._$AH=t);else{const i=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=Xt(this,i[s+o],e,o),a===Vt&&(a=this._$AH[o]),r||=!Tt(a)||a!==this._$AH[o],a===Gt?t=Gt:t!==Gt&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}r&&!i&&this.j(t)}j(t){t===Gt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class se extends ee{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Gt?void 0:t}}class ie extends ee{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Gt)}}class ne extends ee{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=Xt(this,t,e,0)??Gt)===Vt)return;const s=this._$AH,i=t===Gt&&s!==Gt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==Gt&&(s===Gt||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class re{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Xt(this,t)}}const oe=Lt.litHtmlPolyfillSupport;oe?.(Jt,te),(Lt.litHtmlVersions??=[]).push("3.2.0");class ae extends At{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=((t,e,s)=>{const i=s?.renderBefore??e;let n=i._$litPart$;if(void 0===n){const t=s?.renderBefore??null;i._$litPart$=n=new te(e.insertBefore(Rt(),t),t,void 0,s??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return Vt}}ae._$litElement$=!0,ae.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ae});const le=globalThis.litElementPolyfillSupport;le?.({LitElement:ae}),(globalThis.litElementVersions??=[]).push("4.1.0");const ce=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},de={attribute:!0,type:String,converter:wt,reflect:!1,hasChanged:Et},ue=(t=de,e,s)=>{const{kind:i,metadata:n}=s;let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const n=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const n=this[i];e.call(this,s),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)};
2function he(t){return(e,s)=>"object"==typeof s?ue(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function pe(t){return he({...t,state:!0,attribute:!1})}const ge=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,s),s);function me(t,e){return(s,i,n)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?s:n??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return ge(s,i,{get(){let s=t.call(this);return void 0===s&&(s=r(this),(null!==s||this.hasUpdated)&&e.call(this,s)),s}})}return ge(s,i,{get(){return r(this)}})}}class fe{constructor(t){this.host=t,this.host.addController(this)}hostUpdate(){}info(t,...e){console.info(this.formatMessage(t),...e)}warn(t,...e){console.warn(this.formatMessage(t),...e)}error(t,...e){console.error(this.formatMessage(t),...e)}formatMessage(t){return this.prependTagName(t)}prependTagName(t){return`<${this.host.tagName.toLowerCase()}>: ${t}`}}class ve extends ae{constructor(){super(...arguments),this.logger=new fe(this)}}let be=class extends ve{connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver((()=>{this.hidden=!!this.querySelector("[no-data]")})),this.observer.observe(this,{subtree:!0,attributeFilter:["no-data"]})}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}render(){return Wt`<slot></slot>`}};function*ye(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}be=tt([ce("gmpx-optional-data-container-internal")],be);class _e{constructor(){this.promise=new Promise(((t,e)=>{this.resolveCallback=t,this.rejectCallback=e}))}resolve(t){this.value=t,this.resolveCallback(t)}reject(t){this.rejectCallback(t)}}const we=function(t){return(t=>{var e,s,i,n="The Google Maps JavaScript API",r="google",o="importLibrary",a="__ib__",l=document,c=window,d=(c=c[r]||(c[r]={})).maps||(c.maps={}),u=new Set,h=new URLSearchParams;d[o]?console.warn(n+" only loads once. Ignoring:",t):d[o]=(c,...p)=>u.add(c)&&(e||(e=new Promise((async(o,c)=>{for(i in await(s=l.createElement("script")),h.set("libraries",[...u]+""),t)h.set(i.replace(/[A-Z]/g,(t=>"_"+t[0].toLowerCase())),t[i]);h.set("callback",r+".maps."+a),s.src=`https://maps.${r}apis.com/maps/api/js?`+h,d[a]=o,s.onerror=()=>e=c(Error(n+" could not load.")),s.nonce=l.querySelector("script[nonce]")?.nonce||"",l.head.append(s)})))).then((()=>d[o](c,...p)))})(t),google.maps};var Ee;function xe(t){t.importLibrary("maps"),t.importLibrary("marker")}let Ae=Ee=class extends ve{constructor(){super(...arguments),this.version="beta"}set apiKey(t){this.key=t}get apiKey(){return this.key}async connectedCallback(){super.connectedCallback(),Ee.instance?this.logger.warn("Found multiple instances of this element on the same page. The Google Maps JavaScript API can only be configured once; please ensure you only have a single instance.",this):Ee.instance=this}willUpdate(t){Ee.instance===this&&this.tryLoadGoogleMapsAPI(t)}render(){return Wt`<slot></slot>`}getSolutionChannel(){if(""!==this.solutionChannel)return this.solutionChannel?this.solutionChannel:"GMP_NPM_extended_v0.6.13"}tryLoadGoogleMapsAPI(t){if(Ee.googleMapsDeferred.value)if(Ee.inlineScriptLoaded){const e=t.keys().next().value;this.logger.warn(`Property '${e}' cannot be updated once the Google Maps JavaScript API is already loaded.`)}else this.logger.warn("Please remove the <gmpx-api-loader> element if you are using the Google Maps JavaScript API inline bootstrap loader. Duplicate configuration may cause unexpected behavior.");else if(void 0!==this.key){const{key:t,version:e,language:s,region:i,authReferrerPolicy:n}=this,r=this.getSolutionChannel(),o=we({key:t,...e&&{v:e},...s&&{language:s},...i&&{region:i},...r&&{solutionChannel:r},...n&&{authReferrerPolicy:n}});Ee.inlineScriptLoaded=!0,Ee.googleMapsDeferred.resolve(o),xe(o)}}static async importLibrary(t,e){let s=Ee.googleMapsDeferred.value;return s||(Ee.pollForGoogleMaps(5,1e3,e&&function(t){const e=t.logger;return e instanceof fe?e:void 0}(e)),s=await Ee.googleMapsDeferred.promise),s.importLibrary(t)}static reset(){delete window.google,delete Ee.instance,Ee.inlineScriptLoaded=!1,Ee.googleMapsDeferred=new _e}static pollForGoogleMaps(t,e,s,i=0){const n=function(){try{return google?.maps}catch(t){return}}();if(n)!Ee.inlineScriptLoaded&&i>0&&(s??console).warn("Using the legacy Google Maps JavaScript API script loader may result in suboptimal performance. For best results, please include a <gmpx-api-loader> (https://github.com/googlemaps/extended-component-library) or use the inline bootstrap loader (https://goo.gle/js-api-loading) instead."),Ee.googleMapsDeferred.resolve(n),xe(n);else{if(!(t>0)){let t=s?s.formatMessage("The Google Maps JavaScript API is required for this element to function correctly. "):"APILoader.importLibrary(): Unable to initialize the Google Maps JavaScript API. ";throw t+="Please ensure you have a <gmpx-api-loader> on the page with a valid API key. https://github.com/googlemaps/extended-component-library",new Error(t)}window.setTimeout((()=>
2{Ee.pollForGoogleMaps(t-1,e,s,i+1)}),e)}}};function Le(t){const e=document.createElement("div");e.innerHTML=t;const s=e.querySelector("a");return{text:e.textContent||void 0,url:s&&s.href||void 0}}Ae.googleMapsDeferred=new _e,Ae.inlineScriptLoaded=!1,tt([he({attribute:"auth-referrer-policy",reflect:!0,type:String}),et("design:type",String)],Ae.prototype,"authReferrerPolicy",void 0),tt([he({reflect:!0,type:String}),et("design:type",String)],Ae.prototype,"key",void 0),tt([he({reflect:!0,type:String}),et("design:type",String)],Ae.prototype,"language",void 0),tt([he({reflect:!0,type:String}),et("design:type",String)],Ae.prototype,"region",void 0),tt([he({attribute:"solution-channel",reflect:!0,type:String}),et("design:type",String)],Ae.prototype,"solutionChannel",void 0),tt([he({reflect:!0,type:String}),et("design:type",Object)],Ae.prototype,"version",void 0),Ae=Ee=tt([ce("gmpx-api-loader")],Ae);const Ce=864e5,$e=7*Ce;function Pe(t,e,s=new Date){return function(t,e=!1){const s=new Date;return s.setDate(s.getDate()-s.getDay()+t.day),s.setHours(t.hour),s.setMinutes(t.minute),s.setSeconds(0),s.toLocaleString(void 0,{hour:"numeric",minute:"numeric",weekday:e?"short":void 0})}(t,!Oe(e,s))}function Oe(t,e=new Date,s=Ce){return t>=e&&t.valueOf()-e.valueOf()<s}function ke(t){return 1===t.periods?.length&&!t.periods[0].close&&0===t.periods[0].open.day&&0===t.periods[0].open.hour&&0===t.periods[0].open.minute}function Se(t,e){const{year:s,month:i,day:n}=function(t){const e=new Date(t);return e.setUTCDate(e.getUTCDate()-e.getUTCDay()),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate()}}(t);let r=Date.UTC(s,i,n,0,-e);const o=t.valueOf()-r;return o<0?r-=$e:o>=$e&&(r+=$e),new Date(r)}function Ie(t,e){const s=new Date(e);return s.setDate(s.getDate()+t.day),s.setHours(s.getHours()+t.hour),s.setMinutes(s.getMinutes()+t.minute),s}function Re(t,e,s=new Date){const i=Se(s,e);for(const e of t.periods){const t={period:e,openDate:Ie(e.open,i),closeDate:e.close?Ie(e.close,i):void 0};if(!t.closeDate)return t;if(t.closeDate<t.openDate&&(t.openDate>s?t.openDate.setDate(t.openDate.getDate()-7):t.closeDate.setDate(t.closeDate.getDate()+7)),s>=t.openDate&&s<t.closeDate)return t}return{}}var Te,Me;function Ne(t){return!t.hasOwnProperty("id")}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.ALWAYS_OPEN=1]="ALWAYS_OPEN",t[t.NOT_OPEN_NOW=2]="NOT_OPEN_NOW",t[t.WILL_CLOSE=3]="WILL_CLOSE"}(Te||(Te={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.NEVER_OPEN=1]="NEVER_OPEN",t[t.ALREADY_OPEN=2]="ALREADY_OPEN",t[t.WILL_OPEN=3]="WILL_OPEN"}(Me||(Me={}));const De=Object.freeze({FREE:0,INEXPENSIVE:1,MODERATE:2,EXPENSIVE:3,VERY_EXPENSIVE:4}),Ue=Object.freeze(Object.fromEntries(Object.entries(De).map((t=>t.reverse()))));function He(t,e){return e?Wt`<a href=${e} target="_blank">${t}</a>`:Wt`<span>${t}</span>`}async function je(t,e){const s=await Ae.importLibrary("places",e),i=new s.Place({id:t.place_id??"PLACE_ID_MISSING"});let n=Fe(t);return new Proxy(i,{get(t,e,r){if("fetchFields"===e)return async e=>{const r=e.fields.filter((t=>void 0===n[t]));try{return await t.fetchFields({...e,fields:r})}catch(t){if(We(t,"fetchFields()")){const t=function(t){const e=[];for(const s of t){const t=qe[s];t&&e.push(t)}return e}(r);if(!t.length)return{place:i};const e=await async function(t,e,s){const i=new t.PlacesService(document.createElement("div"));return new Promise(((t,n)=>{i.getDetails({placeId:e,fields:s},((e,s)=>{e&&"OK"===s?t(e):n(s)}))}))}(s,i.id,t);return n={...Fe(e),...n},{place:i}}throw t}};if("isOpen"===e)return async s=>{try{return await Reflect.get(t,e,r).apply(r,[s])}catch(t){if(We(t,"isOpen()"))return function(t,e=new Date){if(!t.regularOpeningHours||null==t.utcOffsetMinutes)return;if(ke(t.regularOpeningHours))return!0;const{period:s}=Re(t.regularOpeningHours,t.utcOffsetMinutes,e);return!!s}(r,s);throw t}};const o=n[e];return void 0===o?Reflect.get(t,e,r):o}})}function ze(t){return!(!t.businessStatus||!t.regularOpeningHours||null==t.utcOffsetMinutes)}function Fe(t){const e={};if(void 0!==t.address_components&&(e.addressComponents=t.address_components.map((t=>({longText:t.long_name,shortText:t.short_name,types:t.types})))),void 0!==t.adr_address&&(e.adrFormatAddress=t.adr_address),void 0!==t.business_status&&(e.businessStatus=t.business_status),void 0!==t.formatted_address&&(e.formattedAddress=t.formatted_address),void 0!==t.formatted_phone_number&&(e.nationalPhoneNumber=t.formatted_phone_number),void 0!==t.geometry){const s=t.geometry;s.location&&(e.location=s.location),s.viewport&&(e.viewport=s.viewport)}if(void 0!==t.html_attributions&&(e.attributions=t.html_attributions.map((t=>{const{text:e,url:s}=Le(t);return{provider:e??"",providerURI:s??null}}
2))),void 0!==t.icon_background_color&&(e.iconBackgroundColor=t.icon_background_color),void 0!==t.icon_mask_base_uri&&(e.svgIconMaskURI=t.icon_mask_base_uri),void 0!==t.international_phone_number&&(e.internationalPhoneNumber=t.international_phone_number),void 0!==t.name&&(e.displayName=t.name),void 0!==t.opening_hours){const s=t.opening_hours.periods?.map((t=>({open:Be(t.open),close:t.close?Be(t.close):null})));e.regularOpeningHours={periods:s??[],weekdayDescriptions:t.opening_hours.weekday_text??[]}}var s;return void 0!==t.photos&&(e.photos=t.photos.map((t=>({authorAttributions:t.html_attributions.map((t=>{const{text:e,url:s}=Le(t);return{displayName:e??"",photoURI:"",uri:s||""}})),getURI:t.getUrl,heightPx:t.height,widthPx:t.width})))),void 0!==t.place_id&&(e.id=t.place_id),void 0!==t.plus_code&&(e.plusCode={compoundCode:t.plus_code.compound_code??null,globalCode:t.plus_code.global_code}),void 0!==t.price_level&&(e.priceLevel="number"!=typeof(s=t.price_level)?s:Ue[s]??null),void 0!==t.rating&&(e.rating=t.rating),void 0!==t.reviews&&(e.reviews=t.reviews.map((t=>({authorAttribution:{displayName:t.author_name,photoURI:t.profile_photo_url,uri:t.author_url||""},publishTime:new Date(t.time),rating:t.rating??null,relativePublishTimeDescription:t.relative_time_description,text:t.text,textLanguageCode:t.language})))),void 0!==t.types&&(e.types=t.types),void 0!==t.url&&(e.googleMapsURI=t.url),void 0!==t.user_ratings_total&&(e.userRatingCount=t.user_ratings_total),void 0!==t.utc_offset_minutes&&(e.utcOffsetMinutes=t.utc_offset_minutes),void 0!==t.website&&(e.websiteURI=t.website),e}function Be({day:t,hours:e,minutes:s}){return{day:t,hour:e,minute:s}}const qe={addressComponents:"address_components",adrFormatAddress:"adr_address",businessStatus:"business_status",formattedAddress:"formatted_address",nationalPhoneNumber:"formatted_phone_number",location:"geometry",viewport:"geometry",iconBackgroundColor:"icon_background_color",svgIconMaskURI:"icon_mask_base_uri",internationalPhoneNumber:"international_phone_number",displayName:"name",regularOpeningHours:"opening_hours",photos:"photos",plusCode:"plus_code",priceLevel:"price_level",rating:"rating",reviews:"reviews",types:"types",googleMapsURI:"url",userRatingCount:"user_ratings_total",utcOffsetMinutes:"utc_offset_minutes",websiteURI:"website",id:"place_id"};function We(t,e){return t instanceof Error&&(t.message.startsWith(`Place.prototype.${e} is not available`)||t.message.startsWith(`google.maps.places.Place.${e} is not available`))}class Ve extends Event{constructor(t,e,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=s??!1}}class Ge{constructor(t,e,s,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e},this.host=t,void 0!==e.context){const t=e;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=e,this.callback=s,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Ve(this.context,this.t,this.subscribe))}}class Ye{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){const s=e||!Object.is(t,this.o);this.o=t,s&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[t,{disposer:e}]of this.subscriptions)t(this.o,e)},void 0!==t&&(this.value=t)}addCallback(t,e,s){if(!s)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});const{disposer:i}=this.subscriptions.get(t);t(this.value,i)}clearCallbacks(){this.subscriptions.clear()}}class Ze extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}}class Ke extends Ye{constructor(t,e,s){super(void 0!==e.context?e.initialValue:s),this.onContextRequest=t=>{const e=t.composedPath()[0];t.context===this.context&&e!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,e,t.subscribe))},this.onProviderRequest=t=>{const e=t.composedPath()[0];if(t.context!==this.context||e===this.host)return;const s=new Set;for(const[t,{consumerHost:e}]of this.subscriptions)s.has(t)||(s.add(t),e.dispatchEvent(new Ve(this.context,t,!0)));t.stopPropagation()},this.host=t,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Ze(this.context))}}class Je{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{const e=this.pendingContextRequests.get(t.context);if(void 0===e)return;this.pendingContextRequests.delete(t.context);const{requests:s}=e;for(const{elementRef:e,callbackRef:i}of s){const s=e.deref(),n=i.deref();void 0===s||void 0===n||s.dispatchEvent(new Ve(t.context,n,!0))}},this.onContextRequest=t=>{if(!0!==t.subscribe)return;const e=t.composedPath()[0],s=t.callback;let i=this.pendingContextRequests.get(t.context);void 0===i&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let n=i.callbacks.get(e);void 0===n&&i.callbacks.set(e,n=new WeakSet),n.has(s)||(n.add(s),i.requests.push({elementRef:new WeakRef(e),callbackRef:new WeakRef(s)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}}function Xe({context:t,subscribe:e}){return(s,i)=>{"object"==typeof i?i.addInitializer((function(){new Ge(this,{context:t,callback:t=>{s.set.call(this,t)},subscribe:e})})):s.constructor.addInitializer((s=>{new Ge(s,{context:t,callback:t=>{s[i]=t},subscribe:e})}))}}let Qe=!1;Qe||((new Je).attach(document.body),Qe=!0);const ts=Symbol("place"),es=Symbol("place-consumer-registration");class ss extends ve{constructor(){super(...arguments),this.noData=!0}get place(){return this.placeInternal}set place(t){this.placeInternal=t,this.updatePlaceV2(t)}willUpdate(t){t.has("contextPlace")&&!this.placeV2&&this.placeChangedCallback(this.contextPlace,t.get("
2contextPlace"));const e=this.getPlace();this.noData=!(e&&this.placeHasData(e)),t.has("contextRegistration")&&this.contextRegistration?.registerPlaceConsumer(this)}disconnectedCallback(){super.disconnectedCallback(),this.contextRegistration?.unregisterPlaceConsumer(this)}placeChangedCallback(t,e){}placeHasData(t){return!0}getPlace(){return this.placeV2??this.contextPlace}async updatePlaceV2(t){const e=this.getPlace();t&&Ne(t)?this.placeV2=await je(t,this):this.placeV2=t,this.placeChangedCallback(this.placeV2,e)}}tt([Xe({context:es,subscribe:!0}),he({attribute:!1}),et("design:type",Object)],ss.prototype,"contextRegistration",void 0),tt([Xe({context:ts,subscribe:!0}),he({attribute:!1}),et("design:type",Object)],ss.prototype,"contextPlace",void 0),tt([he({type:Boolean,attribute:"no-data",reflect:!0}),et("design:type",Object)],ss.prototype,"noData",void 0),tt([pe(),et("design:type",Object)],ss.prototype,"placeV2",void 0);let is=class extends ss{render(){const t=this.getPlace();if(!t||!this.placeHasData(t))return Wt``;const e=t.attributions||[];return Wt`${function*(t,e){const s="function"==typeof e;if(void 0!==t){let i=-1;for(const n of t)i>-1&&(yield s?e(i):e),i++,yield n}}(ye(e,this.makeAttributionHTML),Wt`<span class="sep">, </span>`)}`}getRequiredFields(){return["attributions"]}placeHasData(t){return!!(t.attributions&&t.attributions.length>0)}makeAttributionHTML(t){return He(t.provider,t.providerURI)}};is.styles=at` 3 a { 4 color: inherit; 5 text-decoration: inherit; 6 } 7 8 a:hover { 9 text-decoration: underline; 10 } 11 `,is=tt([ce("gmpx-place-attribution")],is);const ns=(t,e,s)=>{for(const s of e)if(s[0]===t)return(0,s[1])();return s?.()};class rs extends Event{constructor(t){super("gmpx-requesterror",{bubbles:!1,composed:!1}),this.error=t}}function os(t){return t?`"${t}"`:"default"}class as{constructor(t,e,s){this.host=t,this.logger=e,this.supportedSlotNames=s,t.addController(this)}hostConnected(){for(const t of this.host.children)this.checkChildSlotValidity(t)}checkChildSlotValidity(t){const e=t.getAttribute("slot")??"";this.supportedSlotNames.includes(e)||this.logger.warn(`Detected child element in unsupported ${os(e)} slot. This component supports the following slots: ${this.supportedSlotNames.map(os).join(", ")}.`,t)}}class ls{constructor(t){this.capacity=t,this.map=new Map}has(t){return this.reinsertIfPresent(t),this.map.has(t)}get(t){return this.reinsertIfPresent(t),this.map.get(t)}set(t,e){if(this.delete(t),this.map.set(t,e),this.map.size>this.capacity){const[t]=this.map.keys();this.map.delete(t)}}delete(t){this.map.has(t)&&this.map.delete(t)}reinsertIfPresent(t){if(this.map.has(t)){const e=this.map.get(t);this.map.delete(t),this.map.set(t,e)}}}var cs,ds;!function(t){t.EMPTY="EMPTY",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR"}(ds||(ds={}));let us=cs=class extends ve{constructor(){super(...arguments),this.autoFetchDisabled=!1,this.contextRegistration={registerPlaceConsumer:t=>{this.registerPlaceConsumer(t)},unregisterPlaceConsumer:t=>{this.unregisterPlaceConsumer(t)}},this.loadingState=ds.EMPTY,this.slotValidator=new as(this,this.logger,["","initial-loading","error"]),this.placeConsumers=new Set,this.placeAttributions=new Set,this.placeContextProvider=new Ke(this,{context:ts})}get contextPlace(){return this.placeContextProvider.value}set contextPlace(t){this.placeContextProvider.setValue(t,!0)}render(){return ns(this.loadingState,[[ds.EMPTY,()=>Wt``],[ds.LOADING,()=>Wt`<slot name="initial-loading"></slot>`],[ds.LOADED,()=>Wt`<slot></slot>`],[ds.ERROR,()=>Wt`<slot name="error"></slot>`]])}async updated(t){if(t.has("place"))try{await this.updatePlace()}catch(t){this.handleError(t)}}async updatePlace(){if(this.loadingState=ds.LOADING,!this.place)return this.contextPlace=void 0,void(this.loadingState=ds.EMPTY);if("string"==typeof this.place?this.contextPlace=await cs.placeLookup.getPlace(this.place):Ne(this.place)?(this.contextPlace=await je(this.place,this),cs.placeLookup.updatePlace(this.contextPlace)):(this.contextPlace=this.place,cs.placeLookup.updatePlace(this.contextPlace)),"string"==typeof this.place||!this.autoFetchDisabled){let t;this.fields?.length?t=this.fields:(await 0,t=this.getConsumerFields());try{await this.contextPlace.fetchFields({fields:t})}catch(e){if(!We(e,"fetchFields()"))throw e;this.contextPlace=await je({place_id:this.contextPlace.id}),cs.placeLookup.updatePlace(this.contextPlace),await this.contextPlace.fetchFields({fields:t})}for(const t of this.placeConsumers)t.requestUpdate("contextPlace",t.contextPlace,{hasChanged:()=>!0})}this.appendAttributionIfAbsent(),this.loadingState=ds.LOADED}registerPlaceConsumer(t){this.placeConsumers.add(t),t instanceof is&&this.placeAttributions.add(t)}unregisterPlaceConsumer(t){this.placeConsumers.delete(t),t instanceof is&&this.placeAttributions.delete(t)}getConsumerFields(){const t=new Set;for(const e of this.placeConsumers)for(const s of e.getRequiredFields())t.add(s);return Array.from(t.values())}appendAttributionIfAbsent(){0===this.placeAttributions.size&&this.appendChild(new is)}handleError(t){this.loadingState=ds.ERROR;const e=new rs(t);this.dispatchEvent(e)}};var hs;us.placeLookup=new class{constructor(t,e){this.consumer=e,this.cache=new ls(t)}getPlace(t){const e=this.cache.get(t);if(e)return e;const s=async function(t,e){const{Place:s}
11=await Ae.importLibrary("places",e);return new s({id:t})}(t,this.consumer);return this.cache.set(t,s),s}updatePlace(t){this.cache.set(t.id,Promise.resolve(t))}}(100),tt([he({type:Boolean,attribute:"auto-fetch-disabled",reflect:!0}),et("design:type",Object)],us.prototype,"autoFetchDisabled",void 0),tt([he({converter:{fromAttribute:t=>t?.split(/\s+/).filter((t=>""!==t))??void 0,toAttribute:t=>t?.join(" ")??null},reflect:!0}),et("design:type",Array)],us.prototype,"fields",void 0),tt([he({type:String,hasChanged:()=>!0}),et("design:type",Object)],us.prototype,"place",void 0),tt([function({context:t}){return(e,s)=>{const i=new WeakMap;if("object"==typeof s)return s.addInitializer((function(){i.set(this,new Ke(this,{context:t}))})),{get(){return e.get.call(this)},set(t){return i.get(this)?.setValue(t),e.set.call(this,t)},init(t){return i.get(this)?.setValue(t),t}};{e.constructor.addInitializer((e=>{i.set(e,new Ke(e,{context:t}))}));const n=Object.getOwnPropertyDescriptor(e,s);let r;if(void 0===n){const t=new WeakMap;r={get(){return t.get(this)},set(e){i.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=n.set;r={...n,set(e){i.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(e,s,r)}}}({context:es}),he({attribute:!1}),et("design:type",Object)],us.prototype,"contextRegistration",void 0),tt([pe(),et("design:type",Object)],us.prototype,"loadingState",void 0),us=cs=tt([ce("gmpx-place-data-provider")],us),function(t){t.GOOGLE_SANS_TEXT="Google Sans Text",t.MATERIAL_SYMBOLS_OUTLINED="Material Symbols Outlined"}(hs||(hs={}));const ps=Object.freeze({[hs.GOOGLE_SANS_TEXT]:{loadInDocumentHead:!0,loadInShadowRoot:!1,weights:[400,500]},[hs.MATERIAL_SYMBOLS_OUTLINED]:{loadInDocumentHead:!0,loadInShadowRoot:!0,weights:[400]}});class gs{constructor(t,e){this.host=t,this.fonts=e,t.addController(this);for(const t of e)ps[t].loadInDocumentHead&&this.injectWebFontAsset(document.head,t)}hostConnected(){for(const t of this.fonts)ps[t].loadInShadowRoot&&this.injectWebFontAsset(this.host.renderRoot,t)}injectWebFontAsset(t,e){t.querySelector(`link[href*="${encodeURIComponent(e)}"]`)||t.appendChild(function(t,e){const s=document.createElement("link");return s.rel="stylesheet",s.href=`https://fonts.googleapis.com/css2?family=${encodeURIComponent(t)}:wght@${encodeURIComponent(e.join(";"))}`,s}(e,ps[e].weights))}}class ms{constructor(t,e){this.shouldRetry=e,this.requestCacheMap=new ls(t)}get(t){return this.requestCacheMap.get(this.serialize(t))??null}set(t,e){const s=this.serialize(t);this.requestCacheMap.set(s,e),e.catch((t=>{this.shouldRetry(t)&&this.requestCacheMap.delete(s)}))}serialize(t){return JSON.stringify(t,((t,e)=>{if(e instanceof Object&&!(e instanceof Array)){const t=e,s={};for(const e of Object.keys(t).sort())s[e]=t[e];return s}return e}))}}function fs(){return new ms(100,(t=>"OVER_QUERY_LIMIT"===t.code||"UNKNOWN_ERROR"===t.code))}class vs{constructor(t){this.host=t,this.host.addController(this)}hostUpdate(){}async route(t){let e=vs.cache.get(t);null===e&&(e=this.getService().then((e=>e.route(t))),vs.cache.set(t,e));try{return await e}catch(t){const e=new rs(t);return this.host.dispatchEvent(e),null}}async getService(){if(!vs.service){const{DirectionsService:t}=await Ae.importLibrary("routes",this.host);vs.service=new t}return vs.service}static reset(){vs.cache=fs(),vs.service=void 0}}function bs(t){if(!t)return null;const{placeId:e,location:s,query:i}=function(t){return function(t){return t.hasOwnProperty("id")}(t)?{location:t.location?.toJSON()??void 0,placeId:t.id,query:t.formattedAddress??t.displayName??void 0}:function(t){return"function"==typeof t.lat}(t)?{location:t.toJSON()}:{location:t}}(t);return e?{placeId:e}:s?{location:s}:i?{query:i}:null}vs.cache=fs();let ys=class extends ss{constructor(){super(...arguments),this.fontLoader=new gs(this,[hs.MATERIAL_SYMBOLS_OUTLINED]),this.directionsController=new vs(this),this.isFetchingDirectionsData=!1}willUpdate(t){super.willUpdate(t),(t.has("origin")||t.has("travelMode"))&&this.updateDirectionsData()}
11placeChangedCallback(t,e){t?.id!==e?.id&&this.updateDirectionsData()}render(){const{distance:t,duration:e}=this.directionsData??{};return this.isFetchingDirectionsData||!t?Wt``:this.travelMode&&e?Wt` 12 <span class="icon material-symbols-outlined"> 13 ${function(t){switch(t){case"bicycling":return"directions_bike";case"transit":return"directions_subway";case"walking":return"directions_walk";default:return"directions_car"}}(this.travelMode)} 14 </span> 15 <span>${e.text}</span> 16 `:Wt`<span>${t.text}</span>`}getRequiredFields(){return[]}placeHasData(){return null!=this.directionsData}async updateDirectionsData(){if(this.isFetchingDirectionsData)return;const t=this.getPlace(),e=bs(this.origin),s=bs(t);if(e&&s){this.isFetchingDirectionsData=!0;const t=await this.directionsController.route({origin:e,destination:s,travelMode:this.travelMode?.toUpperCase()??"DRIVING"});this.directionsData=t?.routes[0]?.legs[0],this.requestUpdate()}else this.directionsData=void 0;this.isFetchingDirectionsData=!1}};ys.styles=at` 17 .icon { 18 font-size: inherit; 19 line-height: inherit; 20 vertical-align: bottom; 21 } 22 `,tt([he({attribute:"travel-mode",reflect:!0,type:String}),et("design:type",String)],ys.prototype,"travelMode",void 0),tt([he({attribute:!1}),et("design:type",Object)],ys.prototype,"origin",void 0),tt([pe(),et("design:type",Object)],ys.prototype,"directionsData",void 0),ys=tt([ce("gmpx-place-distance-label-internal")],ys);class _s{start(t,e){this.stop(),this.updateTimeout(t,e)}stop(){null!=this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0)}updateTimeout(t,e){this.timeoutId=setTimeout((()=>{t(),this.updateTimeout(t,e)}),e)}}const ws={"isOpen()":6e4};function Es(t){return"opening_hours.isOpen()"===t?"isOpen()":t}function xs(t,e){switch(e){case"hasCurbsidePickup":return t.hasCurbsidePickup;case"hasDelivery":return t.hasDelivery;case"hasDineIn":return t.hasDineIn;case"hasTakeout":return t.hasTakeout;case"hasWheelchairAccessibleEntrance":return t.accessibilityOptions?.hasWheelchairAccessibleEntrance;case"isReservable":return t.isReservable;case"servesBeer":return t.servesBeer;case"servesBreakfast":return t.servesBreakfast;case"servesBrunch":return t.servesBrunch;case"servesDinner":return t.servesDinner;case"servesLunch":return t.servesLunch;case"servesVegetarianFood":return t.servesVegetarianFood;case"servesWine":return t.servesWine;default:return}}let As=class extends ss{constructor(){super(...arguments),this.poll=new _s}render(){return Wt`${ns(this.valueToRender,[[!0,()=>Wt`<slot name="true"></slot>`],[!1,()=>Wt`<slot name="false"></slot>`]],(()=>Wt``))}`}getRequiredFields(){if(!this.field)return[];const t=Es(this.field);switch(t){case"isOpen()":return["businessStatus","regularOpeningHours","utcOffsetMinutes"];case"hasWheelchairAccessibleEntrance":return["accessibilityOptions"];default:return[t]}}placeHasData(t){if(!this.field)return!1;const e=Es(this.field);return"isOpen()"===e?ze(t):null!=xs(t,e)}async getUpdateComplete(){const t=await super.getUpdateComplete();return this.asyncRenderComplete&&await this.asyncRenderComplete.promise,t}willUpdate(t){if(super.willUpdate(t),this.updateValueToRender(),t.has("field")&&(this.poll.stop(),this.field)){const t=ws[Es(this.field)];t&&this.poll.start((()=>{this.requestUpdate()}),t)}}disconnectedCallback(){super.disconnectedCallback(),this.poll.stop(),this.resetAsyncRenderPromise()}updateValueToRender(){const t=this.getPlace();if(this.resetAsyncRenderPromise(),!t||!this.field)return void(this.valueToRender=void 0);const e=Es(this.field);"isOpen()"===e?(this.asyncRenderComplete=new _e,async function(t,e){return"isOpen()"===e?async function(t){return t&&ze(t)?await t.isOpen():void 0}(t):null}(t,e).then((t=>{this.valueToRender=t,this.asyncRenderComplete?.resolve()}))):this.valueToRender=function(t,e){return xs(t,e)??null}(t,e)}resetAsyncRenderPromise(){this.asyncRenderComplete?.resolve(),this.asyncRenderComplete=void 0}};function Ls(t,e,s){return t?e(t):s?.(t)}function Cs(t){switch(t){case"url":return"googleMapsURI";case"website":return"websiteURI";default:return t}}function $s(t,e){switch(Cs(e)){case"googleMapsURI":return t.googleMapsURI;case"websiteURI":return t.websiteURI;default:return}}tt([he({type:String,reflect:!0}),et("design:type",String)],As.prototype,"field",void 0),tt([pe(),et("design:type",Object)],As.prototype,"valueToRender",void 0),As=tt([ce("gmpx-place-field-boolean")],As);let Ps=class extends ss{constructor(){super(...arguments),this.hrefField="websiteURI",this.ariaLabel=null}render(){const t=this.getHref();return Wt`${Ls(t,(()=>Wt` 23 <a target="_blank" rel="noopener noreferrer" href=${t} 24 aria-label=${this.ariaLabel??Gt}> 25 ${Ls(this.hasContentForSlot(),(()=>Wt`<slot></slot>`),(()=>Wt`${this.getDefaultLinkText(t)}`))} 26 </a> 27 `))}`}updated(){this.role=null!=this.ariaLabel?"none":null}getRequiredFields(){return[Cs(this.hrefField)]}placeHasData(t){return null!=$s(t,this.hrefField)}getHref(){const t=this.getPlace();return t?$s(t,this.hrefField)??null:null}hasContentForSlot(){return!!(this.textContent?.trim()||this.children.length>0)}getDefaultLinkText(t){return"googleMapsURI"===Cs(this.hrefField)?"View on Google Maps":function(t){const e=t.match(/^(https?:\/\/)?(www\.)?([^\/\?]+)/);return e&&e.length>3?e[3]:t}(t)}};Ps.styles=at` 28 :host(:hover) { 29 text-decoration: underline; 30 } 31 32 a { 33 color: inherit; 34 text-decoration: inherit; 35 } 36 `,tt([he({type:String,reflect:!0,attribute:"href-field"}),et("design:type",String)],Ps.prototype,"hrefField",void 0),tt([he({attribute:"aria-label",reflect:!0,type:String}),et("design:type",Object)],Ps.prototype,"ariaLabel",void 0),Ps=tt([ce("gmpx-place-field-link")],Ps);const Os=Object.freeze({LOCATOR_BACK_BUTTON_CTA:"Back",LOCATOR_DIRECTIONS_BUTTON_LABEL:t=>`Directions to ${t}`,LOCATOR_LIST_HEADER:"Find a location near you",LOCATOR_LIST_SUBHEADING:"All locations",LOCATOR_LIST_SUBHEADING_WITH_SEARCH:"Nearest locations",LOCATOR_SEARCH_LO
36CATION_MARKER_TITLE:"My location",LOCATOR_SEARCH_PROMPT:"Enter your address or zip code",LOCATOR_VIEW_DETAILS_CTA:"View details",PLACE_CLEAR_ARIA_LABEL:"Clear",PLACE_CLOSED:"Closed",PLACE_CLOSED_PERMANENTLY:"Permanently closed",PLACE_CLOSED_TEMPORARILY:"Temporarily closed",PLACE_CLOSES:t=>`Closes ${t}`,PLACE_HAS_DELIVERY:"Delivery",PLACE_HAS_DINE_IN:"Dine-in",PLACE_HAS_TAKEOUT:"Takeout",PLACE_NO_DELIVERY:"No Delivery",PLACE_NO_DINE_IN:"No Dine-in",PLACE_NO_TAKEOUT:"No Takeout",PLACE_OPEN_ALWAYS:"Open 24 hours",PLACE_OPEN_NOW:"Open now",PLACE_OPENING_HOURS_DEFAULT_SUMMARY:"See opening hours",PLACE_OPENING_HOURS_ARIA_LABEL:"Weekly opening hours",PLACE_OPENS:t=>`Opens ${t}`,PLACE_OPERATIONAL:"Operational",PLACE_PHOTO_ALT:t=>`Photo of ${t||"place"}`,PLACE_PHOTO_ATTRIBUTION_PREFIX:"Photo by",PLACE_PHOTO_BACK_ARIA_LABEL:"Back",PLACE_PHOTO_NEXT_ARIA_LABEL:"Next",PLACE_PHOTO_PREV_ARIA_LABEL:"Previous",PLACE_PHOTO_TILE_ARIA_LABEL:t=>`Open photo ${t}`,PLACE_RATING_ARIA_LABEL:t=>1===t?"1 star":`${t} stars`,PLACE_REVIEWS_AUTHOR_PHOTO_ALT:t=>`Photo of ${t||"reviewer"}`,PLACE_REVIEWS_MORE:"More reviews",PLACE_REVIEWS_SECTION_CAPTION:"Most relevant",PLACE_REVIEWS_SECTION_HEADING:"Reviews by Google users",PLACE_SEARCH_ARIA_LABEL:"Search",PLACE_TYPE:t=>""===t?"":(t[0].toUpperCase()+t.slice(1)).replace(/_/g," ")});class ks{constructor(t){this.host=t,t.addController(this)}hostConnected(){ks.connectedComponents.add(this.host)}hostDisconnected(){ks.connectedComponents.delete(this.host)}getStringLiteral(t,...e){const s=ks.translatedStringLiterals[t]??Os[t];return"string"==typeof s?s:s(...e)}static setStringLiterals(t){for(const e of Object.keys(t))ks.translatedStringLiterals[e]=t[e];for(const t of ks.connectedComponents)t.requestUpdate()}static buildLocalizer(t){const e=new ks(t);return e.getStringLiteral.bind(e)}static reset(){ks.connectedComponents.clear(),ks.translatedStringLiterals={}}}ks.connectedComponents=new Set,ks.translatedStringLiterals={};const Ss=new Set(["accounting","airport","amusement_park","aquarium","art_gallery","atm","bakery","bank","bar","beauty_salon","bicycle_store","book_store","bowling_alley","bus_station","cafe","campground","car_dealer","car_rental","car_repair","car_wash","casino","cemetery","church","city_hall","clothing_store","convenience_store","courthouse","dentist","department_store","doctor","drugstore","electrician","electronics_store","embassy","fire_station","florist","funeral_home","furniture_store","gas_station","gym","hair_care","hardware_store","hindu_temple","home_goods_store","hospital","insurance_agency","jewelry_store","laundry","lawyer","library","light_rail_station","liquor_store","local_government_office","locksmith","lodging","meal_delivery","meal_takeaway","mosque","movie_rental","movie_theater","moving_company","museum","night_club","painter","park","parking","pet_store","pharmacy","physiotherapist","plumber","police","post_office","primary_school","real_estate_agency","restaurant","roofing_contractor","rv_park","school","secondary_school","shoe_store","shopping_mall","spa","stadium","storage","store","subway_station","supermarket","synagogue","taxi_stand","tourist_attraction","train_station","transit_station","travel_agency","university","veterinary_care","zoo"]);function Is(t){switch(t){case"business_status":return"businessStatus";case"name":return"displayName";case"formatted_address":return"formattedAddress";case"place_id":return"id";case"international_phone_number":return"internationalPhoneNumber";case"geometry.location":return"location";case"geometry.location.lat":return"location.lat";case"geometry.location.lng":return"location.lng";case"formatted_phone_number":return"nationalPhoneNumber";case"plus_code.compound_code":return"plusCode.compoundCode";case"plus_code.global_code":return"plusCode.globalCode";case"rating":return"rating";case"user_ratings_total":return"userRatingCount";default:return t}}let Rs=class extends ss{constructor(){super(...arguments),this.getMsg=ks.buildLocalizer(this)}render(){return Wt`<span>${this.getDisplayText()}</span>`}getRequiredFields(){return this.field?[(t=this.field,Is(t).split(".")[0])]:[];var t}placeHasData(t){return!(!this.field||null==this.getFieldValue(t,this.field))}getDisplayText(){const t=this.getPlace();return t&&this.field?this.getFieldValue(t,this.field)??"":""}getFieldValue(t,e){switch(Is(e)){case"businessStatus":return this.renderBusinessStatus(t.businessStatus);case"displayName":return t.displayName;case"formattedAddress":return t.formattedAddress;case"id":return t.id;case"internationalPhoneNumber":return t.internationalPhoneNumber;case"location":return t.location?.toString();case"location.lat":return t.location?.lat().toString();case"location.lng":return t.location?.lng().toString();case"nationalPhoneNumber":return t.nationalPhoneNumber;case"plusCode.compoundCode":return t.plusCode?.compoundCode;case"plusCode.globalCode":return t.plusCode?.globalCode;case"rating":return t.rating?.toString();case"types":return t.types&&this.getDisplayType(t.types);
36case"userRatingCount":return t.userRatingCount?.toString();default:return}}renderBusinessStatus(t){if(!t)return t;switch(t){case"CLOSED_PERMANENTLY":return this.getMsg("PLACE_CLOSED_PERMANENTLY");case"CLOSED_TEMPORARILY":return this.getMsg("PLACE_CLOSED_TEMPORARILY");case"OPERATIONAL":return this.getMsg("PLACE_OPERATIONAL");default:return}}getDisplayType(t){for(const e of t)if(Ss.has(e))return this.getMsg("PLACE_TYPE",e);return null}};tt([he({type:String,reflect:!0}),et("design:type",String)],Rs.prototype,"field",void 0),Rs=tt([ce("gmpx-place-field-text")],Rs);let Ts=class extends ss{constructor(){super(...arguments),this.summaryOnly=!1,this.expanded=!1,this.poll=new _s,this.fontLoader=new gs(this,[hs.MATERIAL_SYMBOLS_OUTLINED]),this.getMsg=ks.buildLocalizer(this)}disconnectedCallback(){super.disconnectedCallback(),this.poll.stop()}willUpdate(t){super.willUpdate(t),this.poll.stop(),this.getPlace()&&this.poll.start((()=>{this.requestUpdate()}),6e4)}render(){const t=this.getPlace();if(!t)return Gt;if(!t.regularOpeningHours)return"OPERATIONAL"===t.businessStatus?Gt:Wt` 37 <div class="closed"> 38 <gmpx-place-field-text field="businessStatus" .place=${t}> 39 </gmpx-place-field-text> 40 </div> 41 `;const{weekdayDescriptions:e}=t.regularOpeningHours;let s;return s=null==t.utcOffsetMinutes?this.summaryOnly?Wt``:Wt`${this.getMsg("PLACE_OPENING_HOURS_DEFAULT_SUMMARY")}`:Wt` 42 <gmpx-place-field-boolean field="isOpen()" .place=${t}> 43 <div slot="true">${this.getOpenSummaryContent(t)}</div> 44 <div slot="false">${this.getClosedSummaryContent(t)}</div> 45 </gmpx-place-field-boolean> 46 `,this.summaryOnly?s:Wt` 47 <button 48 aria-controls="details" 49 aria-expanded=${this.expanded} 50 @click=${()=>this.expanded=!this.expanded} 51 type="button" 52 > 53 ${s} 54 <span aria-hidden="true" class="icon material-symbols-outlined"> 55 ${this.expanded?"expand_less":"expand_more"} 56 </span> 57 </button> 58 <div 59 aria-label=${this.getMsg("PLACE_OPENING_HOURS_ARIA_LABEL")} 60 .hidden=${!this.expanded} 61 id="details" 62 role="region" 63 > 64 <ul> 65 ${ye(e,(t=>Wt` 66 <li>${t}</li> 67 `))} 68 </ul> 69 </div> 70 `}getRequiredFields(){return["businessStatus","regularOpeningHours","utcOffsetMinutes"]}placeHasData(t){return!("OPERATIONAL"===t.businessStatus&&!t.regularOpeningHours||!t.businessStatus&&!t.regularOpeningHours)}getOpenSummaryContent(t){const{status:e,closePoint:s,closeDate:i}=function(t,e=new Date){if(!t.regularOpeningHours||null==t.utcOffsetMinutes)return{status:Te.UNKNOWN};if(ke(t.regularOpeningHours))return{status:Te.ALWAYS_OPEN};const s=Re(t.regularOpeningHours,t.utcOffsetMinutes,e);return s.period?s.closeDate?{status:Te.WILL_CLOSE,closeDate:s.closeDate,closePoint:s.period.close}:{status:Te.ALWAYS_OPEN}:{status:Te.NOT_OPEN_NOW}}(t),n=Wt`<span class="open">${this.getMsg("PLACE_OPEN_NOW")}</span>`;return e===Te.ALWAYS_OPEN?Wt`<span class="open">${this.getMsg("PLACE_OPEN_ALWAYS")}</span>`:e===Te.WILL_CLOSE&&Oe(i)?Wt` 71 ${n} 72 · 73 <span>${this.getMsg("PLACE_CLOSES",Pe(s,i))}</span> 74 `:(Te.NOT_OPEN_NOW,n)}getClosedSummaryContent(t){const{status:e,openPoint:s,openDate:i}=function(t,e=new Date){if(!t.regularOpeningHours||null==t.utcOffsetMinutes)return{status:Me.UNKNOWN};if(ke(t.regularOpeningHours))return{status:Me.ALREADY_OPEN};const s=Se(e,t.utcOffsetMinutes),i={status:Me.NEVER_OPEN};let n=1/0;for(const r of t.regularOpeningHours.periods){const t=Ie(r.open,s);if(!r.close)return{status:Me.ALREADY_OPEN};const o=Ie(r.close,s);if(o>=t&&e>=t&&e<o)return{status:Me.ALREADY_OPEN};if(o<t&&!(e>=o&&e<t))return{status:Me.ALREADY_OPEN};t<e&&t.setDate(t.getDate()+7);const a=t.valueOf()-e.valueOf();a<n&&(n=a,i.status=Me.WILL_OPEN,i.openPoint=r.open,i.openDate=t)}return i}(t);let n=Wt``;return e===Me.WILL_OPEN?n=Wt` · <span>${this.getMsg("PLACE_OPENS",Pe(s,i))}</span>`:Me.ALREADY_OPEN,Wt` 75 <span class="closed">${this.getMsg("PLACE_CLOSED")}</span> 76 ${n} 77 `}};Ts.styles=at` 78 button { 79 align-items: center; 80 background: none; 81 border: none; 82 color: inherit; 83 cursor: pointer; 84 display: flex; 85 font: inherit; 86 padding: 0; 87 } 88 89 span { 90 display: inline-block; 91 } 92 93 ul { 94 list-style-type: none; 95 padding: 0; 96 } 97 98 .closed { 99 color: var(--gmpx-hours-color-closed, #d50000); 100 } 101 102 .open { 103 color: var(--gmpx-hours-color-open, #188038); 104 } 105 106 .icon { 107 direction: inherit; 108 font-size: inherit; 109 margin-inline-start: 1rem; 110 } 111 `,tt([he({attribute:"summary-only",reflect:!0,type:Boolean}),et("design:type",Object)],Ts.prototype,"summaryOnly",void 0),tt([pe(),et("design:type",Object)],Ts.prototype,"expanded",void 0),Ts=tt([ce("gmpx-place-opening-hours")],Ts);class Ms{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this.t=t,this._$AM=e,this.i=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Ns="important",Ds=" !"+Ns,Us=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends Ms{constructor(t){if(super(t),1!==t.type||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith(Ds);t.includes("-")||e?s.setProperty(t,e?i.slice(0,-11):i,e?Ns:""):s[t]=i}}return Vt}}),Hs=at`var(--gmpx-color-primary, #1976d2)`,js=at`var(--gmpx-color-surface, #fff)`,zs=(at`var(--gmpx-color-on-primary, #fff)`,at`var(--gmpx-color-on-surface, #212121)`),Fs=at`var(--gmpx-color-on-surface-variant, #757575)`,Bs=at`var(--gmpx-color-outline, #e0e0e0)`,qs=at`var(--gmpx-rating-color, #ffb300)`,Ws=at`var(--gmpx-rating-color-empty, #e0e0e0)`,Vs=at`var(--gmpx-font-family-base, 'Google Sans Text', sans-serif)`,Gs=at`var(--gmpx-font-family-headings, ${Vs})`,Ys=at`var(--gmpx-font-size-base, 0.875rem)`;function Zs(t){return at`calc(${Ys} * (${t}/14))`}const Ks=at`400 ${Zs(18)}/${Zs(24)} ${Gs}`,Js=at`500 ${Zs(16)}/${Zs(24)} ${Gs}`,Xs=at`500 ${Zs(14)}/${Zs(20)} ${Gs}`,Qs=at`400 ${Zs(14)}/${Zs(20)} ${Vs}`,ti=at`400 ${Zs(12)}/${Zs(16)} ${Vs}`,ei=at`1px solid ${Bs}`;class si{get isKeyboardNavigating(){return this.isKeyboardNavigatingInternal??!1}constructor(t,e){this.host=t,this.changeCallback=e,this.mousedownEventListener=()=>{!1!==this.isKeyboardNavigatingInternal&&(this.isKeyboardNavigatingInternal=!1,this.changeCallback&&this.changeCallback(!1))},this.keydownEventListener=({key:t})=>{"Tab"!==t&&"Enter"!==t||!0!==this.isKeyboardNavigatingInternal&&(this.isKeyboardNavigatingInternal=!0,this.changeCallback&&this.changeCallback(!0))},this.host.addController(this)}hostConnected(){document.addEventListener("keydown",this.keydownEventListener),document.addEventListener("mousedown",this.mousedownEventListener)}hostDisconnected(){document.removeEventListener("keydown",this.keydownEventListener),document.removeEventListener("mousedown",this.mousedownEventListener)}}const ii=1200,ni=at`calc(${Ys} * 0.5)`;function ri(t,e){const s=Math.ceil(t*window.devicePixelRatio);return Math.min(s,e)}function oi(t){"Escape"===t.key&&t.stopPropagation()}let ai=class extends ss{constructor(){super(...arguments),this.selectedIndex=0,this.focusController=new si(this,(t=>{t?this.containerElement?.classList.remove("hide-focus-ring"):this.containerElement?.classList.add("hide-focus-ring")})),this.fontLoader=new gs(this,[hs.GOOGLE_SANS_TEXT,hs.MATERIAL_SYMBOLS_OUTLINED]),this.keydownEventListener=({key:t})=>{if(this.lightboxElement?.open)switch(t){case"ArrowLeft":this.isRTL()?this.navigateToNext():this.navigateToPrevious();break;case"ArrowRight":this.isRTL()?this.navigateToPrevious():this.navigateToNext()}},this.getMsg=ks.buildLocalizer(this)}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.keydownEventListener)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.keydownEventListener)}render(){const t=this.getFormattedPhotos(),e=t[this.selectedIndex],s=this.getPlace()?.dis
111playName,i=Wt` 112 <div class="info-card"> 113 <button 114 aria-label=${this.getMsg("PLACE_PHOTO_BACK_ARIA_LABEL")} 115 autofocus 116 @click=${this.closeLightbox} 117 > 118 <span aria-hidden="true" class="icon material-symbols-outlined"> 119 ${this.isRTL()?"arrow_forward":"arrow_back"} 120 </span> 121 </button> 122 <div class="text-container"> 123 ${Ls(s,(()=>Wt`<div class="title">${s}</div>`))} 124 ${Ls(e?.attributions.length,(()=>Wt` 125 <div class="caption"> 126 <span>${this.getMsg("PLACE_PHOTO_ATTRIBUTION_PREFIX")}</span> 127 ${ye(e.attributions,(({displayName:t,uri:e})=>Wt`${He(t,e??null)} `))} 128 </div> 129 `))} 130 </div> 131 </div> 132 `,n=Wt` 133 <div class="nav-controls"> 134 <button 135 aria-label=${this.getMsg("PLACE_PHOTO_PREV_ARIA_LABEL")} 136 @click=${this.navigateToPrevious} 137 .disabled=${0===this.selectedIndex} 138 > 139 <span aria-hidden="true" class="icon material-symbols-outlined"> 140 ${this.isRTL()?"chevron_right":"chevron_left"} 141 </span> 142 </button> 143 <button 144 aria-label=${this.getMsg("PLACE_PHOTO_NEXT_ARIA_LABEL")} 145 @click=${this.navigateToNext} 146 .disabled=${this.selectedIndex===t.length-1} 147 > 148 <span aria-hidden="true" class="icon material-symbols-outlined"> 149 ${this.isRTL()?"chevron_left":"chevron_right"} 150 </span> 151 </button> 152 </div> 153 `;return Wt` 154 <div class="container"> 155 <div>${ye(t.slice(0,this.maxTiles),((t,e)=>Wt` 156 <button 157 aria-label=${this.getMsg("PLACE_PHOTO_TILE_ARIA_LABEL",e+1)} 158 @click=${()=>{this.openLightbox(e)}} 159 .disabled=${!t} 160 part="tile" 161 style=${Us({"background-image":t&&`url(${t.tileUri})`})} 162 ></button> 163 `))}</div> 164 <dialog class="lightbox" @keydown=${oi}> 165 <div class="backdrop" @click=${this.closeLightbox}></div> 166 <img 167 alt=${this.getMsg("PLACE_PHOTO_ALT",s??"")} 168 class="photo" 169 src=${(t=>t??Gt)(e?.uri)} 170 /> 171 ${i} 172 ${n} 173 </dialog> 174 </div> 175 `}updated(){!this.tileSize&&this.firstTileElement&&(this.tileSize={widthPx:this.firstTileElement.clientWidth||ii,heightPx:this.firstTileElement.clientHeight||ii})}getRequiredFields(){return["displayName","photos"]}placeHasData(t){return!!(t.photos&&t.photos.length>0)}getFormattedPhotos(){const t=this.getPlace();return void 0!==t&&this.tileSize?t?.photos?t.photos.map((t=>function(t,e){const s=t.widthPx/t.heightPx,i=window.innerWidth/window.innerHeight,n=e.widthPx/e.heightPx,r=s>i?{maxHeight:ri(window.innerHeight,4800)}:{maxWidth:ri(window.innerWidth,4800)},o=s>n?{maxHeight:ri(e.heightPx,ii)}:{maxWidth:ri(e.widthPx,ii)};return{uri:t.getURI(r),tileUri:t.getURI(o),attributions:t.authorAttributions}}(t,this.tileSize))):[]:new Array(10).fill(null)}isRTL(){return"rtl"===getComputedStyle(this).direction.toLowerCase()}async openLightbox(t){this.selectedIndex=t,await this.updateComplete,this.lightboxElement?.showModal()}closeLightbox(){this.lightboxElement?.close()}navigateToPrevious(){this.selectedIndex>0&&this.selectedIndex--}navigateToNext(){const t=this.getPlace()?.photos?.length;t&&this.selectedIndex<t-1&&this.selectedIndex++}};ai.styles=at` 176 :host(:not([hidden])) { 177 display: block; 178 } 179 180 .container.hide-focus-ring button:focus { 181 outline: none; 182 } 183 184 a { 185 color: inherit; 186 } 187 188 button { 189 background: none; 190 border: none; 191 color: inherit; 192 cursor: pointer; 193 padding: 0; 194 } 195 196 button[disabled] { 197 cursor: default; 198 } 199 200 [part="tile"] { 201 background-color: #f5f5f5; 202 background-position: center; 203 background-size: cover; 204 border-radius: 8px; 205 display: inline-block; 206 height: 134px; 207 width: 142px; 208 } 209 210 /* The dialog element has a default border-width: initial (3px), 211 padding: 1em, and max-height/width: calc((100% - 6px) - 2em). We remove 212 the border and take the corresponding 6px out of the height/width 213 calculation so it still fills the screen. */ 214 .lightbox { 215 border-width: 0; 216 color: white; 217 height: 100%; 218 max-height: calc(100% - 2em); 219 max-width: calc(100% - 2em); 220 width: 100%; 221 } 222 223 .backdrop { 224 background: black; 225 inset: 0; 226 position: absolute; 227 } 228 229 .photo { 230 inset: 0; 231 margin: auto; 232 max-height: 100%; 233 max-width: 100%; 234 position: absolute; 235 } 236 237 .icon { 238 font-size: calc(${Ys} * 2); 239 vertical-align: middle; 240 } 241 242 .info-card { 243 background: rgba(32, 33, 36, 0.7); 244 border-radius: 8px; 245 display: flex; 246 padding: ${Ys}; 247 position: absolute; 248 } 249 250 .info-card .text-container { 251 flex-direction: column; 252 padding: 0 ${ni}; 253 } 254 255 .info-card .title { 256 font: ${Xs}; 257 } 258 259 .info-card .caption { 260 font : ${ti}; 261 } 262
263 .nav-controls { 264 bottom: ${Ys}; 265 left: 0; 266 margin: 0 auto; 267 position: absolute; 268 right: 0; 269 width: fit-content; 270 } 271 272 .nav-controls button { 273 background-color: rgba(32, 33, 36, 0.7); 274 border-radius: calc(${Ys} * 2); 275 padding: ${ni}; 276 margin: ${ni}; 277 } 278 279 .nav-controls button[disabled] { 280 opacity: 0.5; 281 } 282 `,tt([he({attribute:"max-tiles",reflect:!0,type:Number}),et("design:type",Number)],ai.prototype,"maxTiles",void 0),tt([pe(),et("design:type",Object)],ai.prototype,"selectedIndex",void 0),tt([pe(),et("design:type",Object)],ai.prototype,"tileSize",void 0),tt([me(".container"),et("design:type",HTMLDivElement)],ai.prototype,"containerElement",void 0),tt([me(".lightbox"),et("design:type",HTMLDialogElement)],ai.prototype,"lightboxElement",void 0),tt([me('[part="tile"]'),et("design:type",HTMLButtonElement)],ai.prototype,"firstTileElement",void 0),ai=tt([ce("gmpx-place-photo-gallery")],ai);let li=class extends ss{constructor(){super(...arguments),this.symbol="$"}render(){return Wt`<span>${this.getDisplayPriceLevel()}</span>`}getRequiredFields(){return["priceLevel"]}placeHasData(t){return null!=t.priceLevel}getDisplayPriceLevel(){const t=this.getPlace();return null==t?.priceLevel?"":(e="number"==typeof(i=t.priceLevel)?i:De[i]??null,s=this.symbol,null==e||e<0||0===s.length?"":Array.from(s)[0].repeat(e));var e,s,i}};var ci;tt([he({type:String,reflect:!0}),et("design:type",Object)],li.prototype,"symbol",void 0),li=tt([ce("gmpx-place-price-level")],li),function(t){t.FULL="full",t.HALF="half",t.EMPTY="empty"}(ci||(ci={}));let di=class extends ss{constructor(){super(...arguments),this.condensed=!1,this.getMsg=ks.buildLocalizer(this)}render(){const t=this.getRating();return Ls(null!==t,(()=>{const e=this.condensed?[ci.FULL]:function(t){let e=Math.round(2*t);const s=[];for(;e>1;)s.push(ci.FULL),e-=2;for(e>0&&s.push(ci.HALF);s.length<5;)s.push(ci.EMPTY);return s}(t);return Wt` 283 <span role="img" aria-label=${this.getMsg("PLACE_RATING_ARIA_LABEL",t.toFixed(1))}> 284 <span aria-hidden="true"> 285 <span>${t.toFixed(1)}</span> 286 ${ye(e,(t=>Wt`<span class="star-icon ${t}">★</span>`))} 287 </span> 288 </span> 289 `}))}getRequiredFields(){return["rating"]}placeHasData(t){return null!=t.rating}getRating(){const t=this.getPlace()?.rating;return!t||t<1||t>5?null:t}};var ui;di.styles=at` 290 .star-icon.full { 291 color: ${qs}; 292 } 293 .star-icon.empty { 294 color: ${Ws}; 295 } 296 .star-icon.half { 297 color: ${Ws}; 298 position: relative; 299 } 300 .star-icon.half::before { 301 color: ${qs}; 302 content: '\\2605'; 303 overflow: hidden; 304 position: absolute; 305 width: 50%; 306 } 307 `,tt([he({type:Boolean,reflect:!0}),et("design:type",Object)],di.prototype,"condensed",void 0),di=tt([ce("gmpx-place-rating")],di),function(t){t.FULL="full",t.EMPTY="empty"}(ui||(ui={}));let hi=class extends ss{constructor(){super(...arguments),this.fontLoader=new gs(this,[hs.GOOGLE_SANS_TEXT]),this.getMsg=ks.buildLocalizer(this)}render(){const t=this.getReviews();return Ls(t&&t.length,(()=>Wt` 308 <div class="container"> 309 ${ye(t,this.renderOneReview.bind(this))} 310 </div> 311 `))}getRequiredFields(){return["reviews"]}placeHasData(t){return!!(t.reviews&&t.reviews.length>0)}renderOneReview(t){const e=t.authorAttribution,s=Wt` 312 <div class="header"> 313 ${Ls(e?.photoURI,(()=>Wt` 314 <a target="_blank" href="${e?.uri??""}"> 315 <img class="author-photo" 316 alt=${this.getMsg("PLACE_REVIEWS_AUTHOR_PHOTO_ALT",e?.displayName??"")} 317 src=${e.photoURI}> 318 </a> 319 `))} 320 <a class="author-name" 321 target="_blank" 322 href="${e?.uri??""}"> 323 ${e?.displayName??""} 324 </a> 325 </div> 326 `,i=Wt` 327 <div class="subheader"> 328 ${Ls(t.rating,(()=>{return Wt` 329 <span role="img" aria-label=${this.getMsg("PLACE_RATING_ARIA_LABEL",t.rating)}> 330 <span aria-hidden="true"> 331 ${ye((e=t.rating,Array.from({length:5}).fill(ui.FULL,0,e).fill(ui.EMPTY,e)),(t=>Wt`<span class="star-icon ${t}">★</span>`))} 332 </span> 333 </span> 334 `;var e}))}
335 <span class="relative-time"> 336 ${t.relativePublishTimeDescription??""} 337 </span> 338 </div> 339 `;return Wt` 340 <div class="review"> 341 ${s} 342 ${i} 343 ${Ls(t.text,(()=>Wt` 344 <div class="body"> 345 ${t.text} 346 </div> 347 `))} 348 </div> 349 `}getReviews(){const t=this.getPlace()?.reviews;return t?void 0===this.maxReviews?t:this.maxReviews<1?null:t.slice(0,Math.floor(this.maxReviews)):null}};hi.styles=at` 350 .container { 351 color: ${zs}; 352 font: ${Qs}; 353 } 354 .review { 355 padding: ${Zs(20)}; 356 padding-bottom: ${Zs(16)}; 357 } 358 .review:not(:last-child) { 359 border-bottom: ${ei}; 360 } 361 .header, .subheader { 362 align-items: center; 363 display: flex; 364 } 365 .subheader { 366 margin-top: ${Zs(16)}; 367 } 368 .body { 369 margin-top: ${Zs(8)}; 370 } 371 .author-photo { 372 display: block; 373 height: ${Zs(32)}; 374 } 375 .author-name { 376 color: inherit; 377 font: ${Xs}; 378 margin-inline-start: ${Zs(8)}; 379 text-decoration: none; 380 } 381 .author-name:hover { 382 text-decoration: underline; 383 } 384 .star-icon.full { 385 color: ${qs}; 386 } 387 .star-icon.empty { 388 color: ${Ws}; 389 } 390 .relative-time { 391 color: ${Fs}; 392 font: ${ti}; 393 margin-inline-start: ${Zs(12)}; 394 } 395 `,tt([he({type:Number,reflect:!0,attribute:"max-reviews"}),et("design:type",Number)],hi.prototype,"maxReviews",void 0),hi=tt([ce("gmpx-place-reviews")],hi);const pi=Object.freeze(["x-small","small","medium","large","x-large"]),gi=Wt` 396 <svg width="56" height="20" fill="none" viewBox="0 0 56 20" xmlns="http://www.w3.org/2000/svg"> 397 <path d="m6.76 14.26c-3.62 0-6.66-2.94-6.66-6.56 0-3.62 3.04-6.56 6.66-6.56 2 0 3.43 0.78 4.5 1.81l-1.27 1.25c-0.77-0.72-1.81-1.28-3.23-1.28-2.64 0-4.71 2.13-4.71 4.77 0 2.64 2.07 4.77 4.71 4.77 1.71 0 2.69-0.69 3.31-1.31 0.51-0.51 0.85-1.25 0.98-2.26h-4.05v-1.79h5.79c0.06 0.32 0.1 0.7 0.1 1.12 0 1.34-0.37 3.01-1.55 4.19-1.16 1.21-2.63 1.85-4.58 1.85z" fill="#4285F4"/> 398 <path d="m22.24 10.03c0 2.43-1.91 4.23-4.24 4.23s-4.24-1.79-4.24-4.23c0-2.45 1.9-4.23 4.24-4.23s4.24 1.78 4.24 4.23zm-1.86 0c0-1.52-1.1-2.56-2.38-2.56s-2.38 1.04-2.38 2.56c0 1.5 1.1 2.56 2.38 2.56s2.38-1.05 2.38-2.56z" fill="#EA4335"/> 399 <path d="m31.74 10.03c0 2.43-1.91 4.23-4.24 4.23s-4.24-1.79-4.24-4.23c0-2.45 1.9-4.23 4.24-4.23s4.24 1.78 4.24 4.23zm-1.86 0c0-1.52-1.1-2.56-2.38-2.56s-2.38 1.04-2.38 2.56c0 1.5 1.1 2.56 2.38 2.56s2.38-1.05 2.38-2.56z" fill="#FBBC05"/> 400 <path d="m40.82 6.0601v7.59c0 3.12-1.84 4.4-4.02 4.4-2.05 0-3.28-1.38-3.75-2.5l1.62-0.67c0.29 0.69 0.99 1.5 2.13 1.5 1.39 0 2.26-0.86 2.26-2.48v-0.6h-0.06c-0.42 0.51-1.22 0.96-2.22 0.96-2.11 0-4.05-1.84-4.05-4.21 0-2.38 1.94-4.24 4.05-4.24 1.01 0 1.81 0.45 2.22 0.94h0.06v-0.69h1.76zm-1.63 3.99c0-1.49-0.99-2.58-2.26-2.58-1.28 0-2.35 1.09-2.35 2.58 0 1.47 1.07 2.54 2.35 2.54 1.27 0 2.26-1.07 2.26-2.54z" fill="#4285F4"/> 401 <path d="M44.4 2V14H42.54V2H44.4Z" fill="#34A853"/> 402 <path d="m52.1 11.42 1.44 0.96c-0.46 0.69-1.58 1.87-3.52 1.87-2.4 0-4.19-1.86-4.19-4.23 0-2.51 1.81-4.23 3.99-4.23 2.19 0 3.26 1.74 3.62 2.69l0.19 0.48-5.65 2.34c0.43 0.85 1.1 1.28 2.05 1.28s1.59-0.45 2.07-1.16zm-4.44-1.52 3.78-1.57c-0.21-0.53-0.83-0.9-1.57-0.9-0.94 0.01-2.25 0.84-2.21 2.47z" fill="#EA4335"/> 403 </svg> 404`;let mi=class extends ve{constructor(){super(...arguments),this.autoFetchDisabled=!1,this.googleLogoAlreadyDisplayed=!1,this.size="x-large",this.travelMode="driving",this.fontLoader=new gs(this,[hs.GOOGLE_SANS_TEXT,hs.MATERIAL_SYMBOLS_OUTLINED]),this.slotValidator=new as(this,this.logger,["action"]),this.getMsg=ks.buildLocalizer(this),this.renderHeaderSuffixContent=()=>ns(this.size,[["small",()=>Wt`<slot name="action"></slot>`],["medium",()=>Wt` 405 <gmpx-place-photo-gallery class="gallery" max-tiles="1"> 406 </gmpx-place-photo-gallery> 407 `]]),this.renderCondensedSummary=()=>Wt` 408 <div class="summary body"> 409 <div class="line"> 410 <gmpx-place-rating condensed></gmpx-place-rating> 411 <gmpx-optional-data-container-internal>
412 <span class="delimiter">·</span> 413 <gmpx-place-field-text field="types"></gmpx-place-field-text> 414 </gmpx-optional-data-container-internal> 415 <gmpx-optional-data-container-internal> 416 <span class="delimiter">·</span> 417 <gmpx-place-distance-label-internal 418 .origin=${this.travelOrigin} 419 @gmpx-requesterror=${this.forwardRequestError} 420 ></gmpx-place-distance-label-internal> 421 </gmpx-optional-data-container-internal> 422 </div> 423 </div> 424 `,this.renderSummary=()=>Wt` 425 <div class="summary body"> 426 <div class="line"> 427 <gmpx-place-rating></gmpx-place-rating> 428 <gmpx-optional-data-container-internal> 429 (<gmpx-place-field-text field="userRatingCount"> 430 </gmpx-place-field-text>) 431 </gmpx-optional-data-container-internal> 432 </div> 433 <div class="line"> 434 <gmpx-place-field-text field="types"></gmpx-place-field-text> 435 <gmpx-optional-data-container-internal> 436 <span class="delimiter">·</span> 437 <gmpx-place-price-level></gmpx-place-price-level> 438 </gmpx-optional-data-container-internal> 439 <gmpx-optional-data-container-internal> 440 <span class="delimiter">·</span> 441 <gmpx-place-distance-label-internal 442 .origin=${this.travelOrigin} 443 .travelMode=${this.travelMode} 444 @gmpx-requesterror=${this.forwardRequestError} 445 ></gmpx-place-distance-label-internal> 446 </gmpx-optional-data-container-internal> 447 </div> 448 <div class="line"> 449 <gmpx-place-opening-hours summary-only></gmpx-place-opening-hours> 450 </div> 451 <div class="line"> 452 <gmpx-optional-data-container-internal> 453 <gmpx-place-field-boolean field="hasDineIn"> 454 <span slot="true">${this.getMsg("PLACE_HAS_DINE_IN")}</span> 455 <span slot="false">${this.getMsg("PLACE_NO_DINE_IN")}</span> 456 </gmpx-place-field-boolean> 457 </gmpx-optional-data-container-internal> 458 <gmpx-optional-data-container-internal> 459 <span class="delimiter">·</span> 460 <gmpx-place-field-boolean field="hasTakeout"> 461 <span slot="true">${this.getMsg("PLACE_HAS_TAKEOUT")}</span> 462 <span slot="false">${this.getMsg("PLACE_NO_TAKEOUT")}</span> 463 </gmpx-place-field-boolean> 464 </gmpx-optional-data-container-internal> 465 <gmpx-optional-data-container-internal> 466 <span class="delimiter">·</span> 467 <gmpx-place-field-boolean field="hasDelivery"> 468 <span slot="true">${this.getMsg("PLACE_HAS_DELIVERY")}</span> 469 <span slot="false">${this.getMsg("PLACE_NO_DELIVERY")}</span> 470 </gmpx-place-field-boolean> 471 </gmpx-optional-data-container-internal> 472 </div> 473 </div> 474 `,this.renderContacts=()=>Wt` 475 <div class="section body"> 476 <gmpx-optional-data-container-internal> 477 <div class="block row"> 478 <span aria-hidden="true" class="icon material-symbols-outlined"> 479 location_on 480 </span> 481 <gmpx-place-field-text field="formattedAddress"> 482 </gmpx-place-field-text> 483 </div> 484 </gmpx-optional-data-container-internal> 485 <gmpx-optional-data-container-internal> 486 <div class="block row"> 487 <span aria-hidden="true" class="icon material-symbols-outlined"> 488 public 489 </span> 490 <gmpx-place-field-link href-field="websiteURI"> 491 </gmpx-place-field-link> 492 </div> 493 </gmpx-optional-data-container-internal> 494 <gmpx-optional-data-container-internal> 495 <div class="block row"> 496 <span aria-hidden="true" class="icon material-symbols-outlined"> 497 call 498 </span> 499 <gmpx-place-field-text field="nationalPhoneNumber"> 500 </gmpx-place-field-text> 501 </div> 502 </gmpx-optional-data-container-internal> 503 <gmpx-optional-data-container-internal> 504 <div class="block row"> 505 <span aria-hidden="true" class="icon material-symbols-outlined"> 506 schedule 507 </span> 508 <gmpx-place-opening-hours></gmpx-place-opening-hours> 509 </div> 510 </gmpx-optional-data-container-internal> 511 </div> 512 `,this.renderReviews=()=>Wt` 513 <gmpx-optional-data-container-internal> 514 <div class="section"> 515 <div class="block">
516 <span class="title-large"> 517 ${this.getMsg("PLACE_REVIEWS_SECTION_HEADING")} 518 </span><br> 519 <span class="caption"> 520 ${this.getMsg("PLACE_REVIEWS_SECTION_CAPTION")} 521 </span><br> 522 </div> 523 <gmpx-place-reviews></gmpx-place-reviews> 524 <gmpx-place-field-link class="button" href-field="googleMapsURI"> 525 <div class="label"> 526 <span>${this.getMsg("PLACE_REVIEWS_MORE")}</span> 527 <span aria-hidden="true" class="icon material-symbols-outlined"> 528 open_in_new 529 </span> 530 </div> 531 </gmpx-place-field-link> 532 </div> 533 </gmpx-optional-data-container-internal> 534 `}willUpdate(t){t.has("size")&&!pi.includes(this.size)&&(this.logger.error(`Value "${this.size}" for attribute "size" is invalid. Acceptable choices are ${pi.map((t=>`"${t}"`)).join(", ")}.`),this.size="x-large")}render(){return Wt` 535 <gmpx-place-data-provider 536 .autoFetchDisabled=${this.autoFetchDisabled} 537 .place=${this.place??this.contextPlace} 538 @gmpx-requesterror=${this.forwardRequestError} 539 > 540 <div class="container"> 541 <div class="section block first"> 542 <div class="header"> 543 <div> 544 <div class=${this.getDisplayNameClass()}> 545 <gmpx-place-field-text field="displayName"> 546 </gmpx-place-field-text> 547 </div> 548 ${"x-small"===this.size?this.renderCondensedSummary():this.renderSummary()} 549 </div> 550 <div>${this.renderHeaderSuffixContent()}</div> 551 </div> 552 553 ${Ls("small"!==this.size&&"x-small"!==this.size,(()=>Wt` 554 <div><slot name="action"></slot></div> 555 `))} 556 557 ${Ls("large"===this.size||"x-large"===this.size,(()=>Wt` 558 <gmpx-place-photo-gallery class="carousel gallery"> 559 </gmpx-place-photo-gallery> 560 `))} 561 </div> 562 563 ${Ls("x-large"===this.size,(()=>Wt` 564 ${this.renderContacts()} 565 ${this.renderReviews()} 566 `))} 567 568 <gmpx-place-attribution class="section caption attribution"> 569 </gmpx-place-attribution> 570 571 ${Ls(!this.googleLogoAlreadyDisplayed,(()=>Wt` 572 <div class=${"x-large"===this.size?"section":""}> 573 <div class="logo">${gi}</div> 574 </div> 575 `))} 576 </div> 577 <div slot="error"> 578 <div class="title-large">Oops! Something went wrong.</div> 579 <div class="caption"> 580 Failed to load data about the specified Place. 581 See the JavaScript console for technical details. 582 </div> 583 </div> 584 </gmpx-place-data-provider> 585 `}getDisplayNameClass(){return"x-small"===this.size?"title-medium":"small"===this.size?"title-large":"headline"}forwardRequestError(t){t.target&&t.target===this.dataProviderElement&&console.error(t.error);const e=new rs(t.error);this.dispatchEvent(e)}};mi.styles=at` 586 .headline { 587 color: ${zs}; 588 font: ${Ks}; 589 } 590 591 .title-large { 592 color: ${zs}; 593 font: ${Js}; 594 } 595 596 .title-medium { 597 color: ${zs}; 598 font: ${Xs}; 599 } 600 601 .body { 602 color: ${zs}; 603 font: ${Qs}; 604 } 605 606 .caption { 607 color: ${Fs}; 608 font: ${ti}; 609 } 610 611 [no-data] { 612 display: none; 613 } 614 615 .container { 616 background-color: ${js}; 617 overflow: auto; 618 } 619 620 .section:not(.first) { 621 border-top: ${ei}; 622 } 623 624 .section.first > * { 625 margin-bottom: ${Zs(12)}; 626 } 627 628 .block { 629 margin: ${Zs(18)} ${Zs(20)}; 630 } 631 632 .header { 633 display: flex; 634 } 635 636 .header > :first-child { 637 flex-grow: 1; 638 margin-inline-end: ${Zs(20)}; 639 } 640 641 .header .gallery::part(tile) { 642 height: ${Zs(80)}; 643 width: ${Zs(80)}; 644 } 645 646 .summary { 647 color: ${Fs}; 648 display: flex; 649 flex-direction: column; 650 margin-top: ${Zs(4)}; 651 } 652 653 .delimiter { 654 display: none; 655 } 656 657 .line > * > :not(.delimiter), 658 .line > :not([hidden]):not([no-data]) ~ * > .delimiter { 659 display: inline-block; 660 } 661 662 slot[name="action"] { 663 display: flex; 664 flex-wrap: wrap; 665 gap: ${Zs(8)}; 666 } 667 668 .carousel { 669 display: flex; 670 line-height: normal; 671 margin-inline: ${Zs(-20)}; 672 overflow-x: auto;
673 padding-inline: ${Zs(20)}; 674 white-space: nowrap; 675 } 676 677 .carousel[no-data] { 678 margin-bottom: ${Zs(-12)}; 679 } 680 681 .carousel::-webkit-scrollbar { 682 background-color: ${js}; 683 width: 16px; 684 } 685 .carousel::-webkit-scrollbar-corner { 686 background-color: ${js}; 687 } 688 .carousel::-webkit-scrollbar-track { 689 background-color: ${js}; 690 } 691 .carousel::-webkit-scrollbar-thumb { 692 background-color: #c1c1c1; 693 border-radius: 16px; 694 border: 4px solid ${js}; 695 } 696 .carousel::-webkit-scrollbar-button { 697 display: none; 698 } 699 .carousel::-webkit-scrollbar-thumb:hover { 700 background-color: #7d7d7d; 701 } 702 703 .carousel.gallery::part(tile) { 704 height: ${Zs(134)}; 705 width: ${Zs(142)}; 706 } 707 708 .row { 709 display: flex; 710 } 711 712 .row > .icon { 713 color: ${Hs}; 714 direction: inherit; 715 font-size: ${Zs(20)}; 716 margin-inline-end: ${Zs(20)}; 717 } 718 719 .button { 720 display: flex; 721 justify-content: center; 722 text-decoration: none; 723 } 724 725 .label { 726 align-items: center; 727 color: ${Hs}; 728 display: flex; 729 font: ${Xs}; 730 margin: ${Zs(14)} 0; 731 } 732 733 .label > .icon { 734 direction: inherit; 735 font-size: ${Zs(20)}; 736 margin-inline-start: ${Zs(4)}; 737 } 738 739 .attribution:not([no-data]) { 740 display: block; 741 padding: ${Zs(12)} ${Zs(20)}; 742 } 743 744 .logo {
745 margin: 15px ${Zs(20)} 10px; 746 } 747 748 [slot="error"] { 749 text-align: center; 750 width: 100%; 751 } 752 `,tt([he({attribute:"auto-fetch-disabled",reflect:!0,type:Boolean}),et("design:type",Object)],mi.prototype,"autoFetchDisabled",void 0),tt([Xe({context:ts,subscribe:!0}),he({attribute:!1}),et("design:type",Object)],mi.prototype,"contextPlace",void 0),tt([he({attribute:"google-logo-already-displayed",reflect:!0,type:Boolean}),et("design:type",Object)],mi.prototype,"googleLogoAlreadyDisplayed",void 0),tt([he({type:String,hasChanged:()=>!0}),et("design:type",Object)],mi.prototype,"place",void 0),tt([he({reflect:!0,type:String}),et("design:type",String)],mi.prototype,"size",void 0),tt([he({attribute:"travel-mode",reflect:!0,type:String}),et("design:type",Object)],mi.prototype,"travelMode",void 0),tt([he({attribute:!1}),et("design:type",Object)],mi.prototype,"travelOrigin",void 0),tt([me("gmpx-place-data-provider"),et("design:type",us)],mi.prototype,"dataProviderElement",void 0),mi=tt([ce("gmpx-place-overview")],mi);const fi='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></svg>',vi=1609.34,bi=621371e-9,yi=100,_i={lat:39.8283,lng:-98.5795};let wi;const Ei=20;let xi,Ai,Li,Ci,$i,Pi,Oi,ki,Si,Ii=null,Ri=!1,Ti={},Mi=[],Ni={};const Di={render:function({count:t,position:e}){return new google.maps.Marker({position:e,icon:{url:"https://storedata.wbu.com/v2025.05.28/assets/icons/cluster.svg",scaledSize:new google.maps.Size(60,60),labelOrigin:{x:30,y:40}},label:{text:String(t),color:"rgba(255,255,255,0.9)"}})}};function Ui(t,e){return google.maps.geometry.spherical.computeDistanceBetween(t,e)*bi}async function Hi(){const e=new u({apiKey:"AIzaSyB1TMDp5YSPzpgK_HFQA94TWDWGs3UCcew",version:"quarterly"});await e.importLibrary("maps"),await e.importLibrary("marker"),await e.importLibrary("geometry"),await e.importLibrary("places"),await e.importLibrary("geocoding");const s=new google.maps.LatLng(_i);wi=s,Oi=new google.maps.Map(document.getElementById("wbusl-map"),{center:s,zoom:4,maxZoom:19,mapId:"f77082af1b7ca95",cameraControl:!0,zoomControl:!0}),Si=new t("wbusl-store-cards",Oi),function(){let t=new google.maps.places.AutocompleteSessionToken;xi=new(r())({selector:"#wbusl-store-search-input",debounce:200,events:{input:{selection:async e=>{const{selection:s}=e.detail;xi.input.value=s.value.text,async function(t){await t.fetchFields({fields:["location","viewport","addressComponents","primaryType","types"]});let e=t.location,s=t.viewport,i=t.addressComponents;if(Ii=null,wi=e,function(t,e){return t.includes("administrative_area_level_1")&&e.some((t=>"US"===t.shortText||"CA"===t.shortText))}(t.types,t.addressComponents))!function(t,e,s){if(Ri=!0,Mi=Object.values(Ti).filter((e=>e.store.state===t)),Wi(),0===Mi.length)return Oi.fitBounds(s),Oi.getBounds();const i=Mi.map((t=>t.marker.position));i.push(e),Vi(i)}(i[0].shortText,e,s);else{let t=Yi(e);t.store.storeLocatorMetro?function(t,e){Ri=!0,Mi=Object.values(Ti).filter((t=>t.store.storeLocatorMetro===e)),Wi();const s=Mi.map((t=>t.marker.position));s.push(t),Vi(s)}(e,t.store.storeLocatorMetro):(Gi(e,t.distance),Bi())}var n;n=e,Ai||(Ai=new google.maps.Marker({clickable:!1,icon:{scaledSize:new google.maps.Size(36,36),url:"https://storedata.wbu.com/v2025.05.28/assets/icons/marker_green.svg"}})),Ai.setMap(Oi),Ai.setPosition(n),rn()}(await new google.maps.places.Place({id:s.value.placeId})),t=new google.maps.places.AutocompleteSessionToken}}},data:{keys:["text"],src:async e=>(await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({includedPrimaryTypes:["(regions)"],includedRegionCodes:["US","CA"],input:e,locationBias:Oi.getBounds(),sessionToken:t})).suggestions.map((t=>({text:t.placePrediction.text,placeId:t.placePrediction.placeId})))}}),xi.input.addEventListener("clear",Bi()),xi.input.addEventListener("input",(function(t){""===t.target.value&&Bi()}))}(),ki=new Q({map:Oi,renderer:Di,algorithm:new V({maxZoom:16,gridSize:40})}),Li=document.createElement("button"),Li.type="button",Li.title="Show stores around current location",Li.classList.add("wbusl-custom-map-control"),Li.innerHTML=fi,Oi.controls[google.maps.ControlPosition.TOP_RIGHT].push(Li),Li.onclick=ji,await async function(){Ti={};const t=await fetch("https://storedata.wbu.com/stores.json");if(!t.ok)return void console.error("Failed to fetch store data:",t);const e=await t.json();for(const t of e){const e=t.id;t.lat=parseFloat(t.lat),t.lng=parseFloat(t.lon),delete t.lon,t.rating=null,t.numReviews=null;const s=new google.maps.marker.AdvancedMarkerElement({id:e,content:Ji(),position:{lat:t.lat,lng:t.lng},title:t.city+", "+t.state});s.addListener("click",(()=>{en(e),Ki(e)})),Ti[e]={id:e,marker:s,store:t},Ni[t.googlePlaceID]=t}}(),Mi=Object.values(Ti),google.maps.event.addListenerOnce(Oi,"tilesloaded",(()=>{Xi(),ji()}));const i=function(t){let e;return(...s)=>{clearTimeout(e),e=setTimeout((()=>t.apply(this,s)),500)}}((()=>{qi(Oi.getBounds()),rn()}));Oi.addListener("bounds_changed",i)}function ji(){navigator.geolocation?navigator.geolocation.getCurrentPosition(zi,Fi):Fi({code:null})}async function zi(t){const e=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);if(wi=e,Ai?.setMap(null),!$i){const t=(new DOMParser).parseFromString(fi,"image/svg+xml").documentElement;$i=new google.maps.marker.AdvancedMarkerElement({position:e,content:t,map:Oi,title:" Your current location"})}Gi(e,Yi(e).distance),Bi()}function Fi(t){console.warn("Error getting location:",t);let e="Please provide geolocation permissions to show current location.";t.code!=t.PERMISSION_DENIED&&(e="Error getting location. Geolocation may not be available on this device.");const s=document.getElementById("wbusl-geolocation-error-bar");s.textContent=e,s.classList.add("show"),clearTimeout(Ci),Ci=setTimeout((()=>{s.classList.remove("show")}),5e3)}function Bi(){Ri=!1,Xi(),qi(Oi.getBounds()),rn()}function qi(t){Ri||(Mi=Object.values(Ti).filter((e=>t.contains(e.marker.position))))}function Wi(){Mi.forEach((t=>{ki.addMarker(t.marker)}
752)),Object.values(Ti).forEach((t=>{Mi.includes(t)||ki.removeMarker(t.marker)}))}function Vi(t){const e=t.map((t=>"function"==typeof t.lat?t.lat():t.lat)),s=t.map((t=>"function"==typeof t.lng?t.lng():t.lng));return Oi.fitBounds({west:Math.min(...s),south:Math.min(...e),east:Math.max(...s),north:Math.max(...e)},yi),Oi.getBounds()}function Gi(t,e){if(-1==e)return;const s=e*vi,{computeOffset:i}=google.maps.geometry.spherical;return Oi.fitBounds({west:i(t,s,270).lng(),south:i(t,s,180).lat(),east:i(t,s,90).lng(),north:i(t,s,0).lat()},yi),Oi.getBounds()}function Yi(t){const e=Object.values(Ti).map((e=>{const s=Ui(t,e.marker.position);return{...e,distance:s}}));return e.sort(((t,e)=>e.distance<t.distance?1:-1)),e.length?e[0]:null}function Zi(){Pi&&(Pi.close(),Pi.map=null)}function Ki(t){let e=Si.cloneCardElement(t);if(window.innerWidth<800||window.innerHeight<800)return void Oi.panTo(Ti[t].marker.position);if(e){const s=`hours-accordion-checkbox-${t}`,i=`hours-accordion-checkbox-${t}-popup`;e.querySelector(`#${s}`).setAttribute("id",i),e.querySelector(`label[for="${s}"]`).setAttribute("for",`${i}`)}else e=Si.createCard(t,Ti[t].store).element;e.setAttribute("id",e.getAttribute("id")+"-popup");const s=e.querySelector(".wbusl-store-card-reviews");s&&s.addEventListener("click",(()=>tn(Ti[t].store.googlePlaceID)));const i=e.querySelector(".wbusl-store-card-zoom-to");i&&i.addEventListener("click",(()=>Qi(t))),e.classList.add("wbusl-popup"),e.classList.remove("highlight"),Pi||(Pi=new google.maps.InfoWindow);const n=e.querySelector(".wbusl-store-card-title");n.classList.add("highlight"),Pi.setContent(e),Pi.setHeaderContent(n),Pi.addListener("closeclick",(()=>{sn(t),Ii=null})),Pi.open({anchor:Ti[t].marker,headerDisabled:!0,map:Oi})}function Ji(){const t=document.createElement("img");return t.src="https://storedata.wbu.com/v2025.05.28/assets/icons/marker_red.svg",t.width=36,t.height=36,t}function Xi(){try{Object.values(Ti).forEach((t=>{ki.addMarker(t.marker)}))}catch(t){console.error("Failed to add marker(s) to clusterer:",t)}}function Qi(t){Ti[t]?(Oi.setZoom(16),Oi.setCenter({lat:Ti[t].store.lat,lng:Ti[t].store.lng}),en(t)):console.error(`Store with id ${t} not found`)}function tn(t){document.getElementById("wbusl-reviews").style.visibility="visible";const e=document.getElementById("goog-review-container");let s=document.getElementById("place-overview");s?.getAttribute("place")!==t&&(s?.remove(),s=document.createElement("gmpx-place-overview"),s.setAttribute("id","place-overview"),s.setAttribute("place",t),e.appendChild(s))}function en(t){t!==Ii&&(Ii&&Si.exists(Ii)&&sn(Ii),Ii=t,Si.exists(Ii)?Si.moveToTop(Ii):Si.add(Ii,Ti[Ii].store,!0),nn(Ii),Ti[Ii].marker,Ki(Ii))}function sn(t){console.trace();let e=document.getElementById("wbusl-store-card-"+t);e&&e.classList.remove("highlight")}function nn(t){const e=document.getElementById("wbusl-store-card-"+t);e&&e.classList.add("highlight")}function rn(){if(!Mi&&!Ii)return Zi(),void Si.noResults();if(!Ri&&Mi.length>Ei)return Zi(),void Si.tooManyResults();const t=Si.ids(),e=new Set(Mi.map((t=>t.id)));if(e.size>0&&e.size==t.size&&[...e].every((e=>t.has(e))))return;const s=Mi.map((t=>({...t,distance:Ui(wi,t.marker.position)}))).filter((t=>t.id!==Ii));if(s.sort(((t,e)=>t.distance-e.distance)),Ii){const t=Ti[Ii];s.unshift({...t,distance:Ui(wi,t.marker.position)})}0!==s.length?(Si.updateStores(s),Ii&&nn(Ii)):Si.noResults()}const on={zoomToMarker:Qi,showReviews:tn,hideReviews:function(){document.getElementById("wbusl-reviews").style.visibility="hidden"},initMap:Hi};Hi()})(),i.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.