2024-02-16 11:03:01 +01:00
|
|
|
(()=>{var t={90055:(t,i,e)=>{"use strict";function o(t,i){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[t][i?"details":"no_details"]}e.d(i,{h:()=>o})},84634:(t,i,e)=>{"use strict";e.d(i,{YB:()=>n,b2:()=>o,k:()=>s,xt:()=>r,zb:()=>a});const o=t=>t.hasOwnProperty("lat")&&t.hasOwnProperty("lng")?t:{lat:t.latitude||0,lng:t.longitude||0};function n(t,i){const e=new t.LngLatBounds;return i.forEach((t=>{e.extend([t.coordinates.longitude,t.coordinates.latitude])})),e}function s(t,i){t.fitBounds(i,{padding:{top:80,bottom:80,left:40,right:40}})}function a(t,i){t.innerHTML=`\n\t\t<?xml version="1.0" encoding="UTF-8"?>\n\t\t<svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t<g fill-rule="evenodd">\n\t\t\t\t<path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="${i}"/>\n\t\t\t</g>\n\t\t</svg>\n\t`}function r(t){return new t.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},96442:(t,i,e)=>{"use strict";e.d(i,{E0:()=>l,ot:()=>a,rZ:()=>r});var o=e(85007);const n=6371e3;function s(t){return Math.abs(n*Math.cos(t*Math.PI/180)*2*Math.PI/256)}function a(t,i){return 512/Math.pow(2,t)*.5*s(i)}function r(t,i){return new Promise((e=>{if(i.mapkitScriptIsLoading)(0,o.Dz)(i,"mapkit").then((t=>{e(t)}));else{i.mapkitScriptIsLoading=!0;const n=t.createElement("script");n.addEventListener("load",(async()=>{const t=await(0,o.Dz)(i,"mapkit");i.mapkitScriptIsLoading=!1,e(t)}),{once:!0}),n.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",n.crossOrigin="anonymous",t.head.appendChild(n)}}))}function l(t,i,e){return new Promise(((i,o)=>{e.mapkitIsInitialized?i():e.mapkitIsInitializing?function(t){return new Promise(((i,e)=>{const o=()=>{void 0===t.mapkitIsInitializing?e():!1===t.mapkitIsInitializing?i():t.requestAnimationFrame(o)};o()}))}(e).then((()=>{i()})):(e.mapkitIsInitializing=!0,e.mapkitIsInitialized=!1,t.init({authorizationCallback:async t=>{try{const n=await fetch("https://public-api.wordpress.com/wpcom/v2/mapkit");if(200===n.status){t((await n.json()).wpcom_mapkit_access_token)}else o();e.mapkitIsInitializing=!1,e.mapkitIsInitialized=!0,i()}catch(t){o()}}}))}))}},51321:(t,i,e)=>{"use strict";e.d(i,{Z:()=>o});const o=(t,i=null)=>{if(i)t.style.height=i+"px";else{const i=t.offsetWidth,e=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,o=Math.min(i*(3/4),e);t.style.height=o+"px"}}},24795:(t,i,e)=>{"use strict";e.d(i,{G:()=>o.Z,k:()=>n.Z});var o=e(49735),n=e(75867)},49735:(t,i,e)=>{"use strict";e.d(i,{Z:()=>c});var o=e(85007),n=e(24393),s=e(45388),a=e(90055),r=e(84634),l=e(51321);const c=class{constructor(t,i=(()=>{})){this.root=t;const{currentDoc:e,currentWindow:n}=(0,o.bL)(this.root);this.document=e,this.window=n,this.onError=i,this.mapStyle=this.root.getAttribute("data-map-style")||"default",this.mapDetails="true"===this.root.getAttribute("data-map-details"),this.apiKey=this.root.getAttribute("data-api-key")||null,this.scrollToZoom="true"===this.root.getAttribute("data-scroll-to-zoom"),this.showFullscreenButton="true"===this.root.getAttribute("data-show-fullscreen-button"),this.points=JSON.parse(this.root.getAttribute("data-points")||"[]"),this.mapCenter=JSON.parse(this.root.getAttribute("data-map-center")||"{}"),this.mapHeight=this.root.getAttribute("data-map-height")||null,this.markerColor=this.root.getAttribute("data-marker-color")||"red";const s=this.root.getAttribute("data-zoom");this.zoom=s&&s.length?parseInt(this.root.getAttribute("data-zoom")
|