PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.7
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.7
2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 All 107 releases
← All changes | build/google-map/view.js +1 -1 2.1.32.1.7 View file →
@@ -1 +1 @@
1 -(()=>{"use strict";const t=window.ReactDOM,e=t=>!(null==t||""===t||Array.isArray(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length||"string"==typeof t&&""===t.trim()||"number"==typeof t&&0===t),r=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}},n="@media only screen and (max-width: 1024px)",o="@media only screen and (max-width: 640px)",s="linear-gradient(135deg, #0040E3, #18D4FD)",a=window.React,i=t=>{const e=r(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},l=(t,r)=>e(r)?`${t}: ${r};`:"",c=(t,e=!0,r=!0,n=!0)=>{const{type:o="solid",color:a="",gradient:c=s,image:u={},position:d="center center",attachment:p="",repeat:m="no-repeat",size:h="",overlayColor:y=""}=t||{};return"gradient"===o&&r?l("background",c):"image"===o&&n?`background: ${i(u?.url)};\n\t\t\t\t${l("background-color",y)}\n\t\t\t\t${l("background-position",d)}\n\t\t\t\t${l("background-size",h)}\n\t\t\t\t${l("background-repeat",m)}\n\t\t\t\t${l("background-attachment",p)}\n\t\t\t\t${l("background-repeat",m)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&l("background",a)},u=t=>{const{width:e="",style:r="solid",color:n="",side:o="all",radius:s=""}=t||{},a=t=>{const e=o?.toLowerCase();return e?.includes("all")||e?.includes(t)},i=`${e} ${r} ${n}`,c=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>a(t)?`border-${t}: ${i};`:"")).join(""):""}\n\t\t${l("border-radius",s)}\n\t`;return c},d=(t,e="box")=>{let r="";return t?.map(((n,o)=>{const{hOffset:s="0px",vOffset:a="0px",blur:i="0px",spreed:l="0px",color:c="#e7f0fe",isInset:u=!1}=n||{},d=u?"inset":"",p=`${s} ${a} ${i}`,m=o+1>=t.length?"":", ";r+="text"===e?`${p} ${c}${m}`:`${p} ${l} ${c} ${d}${m}`})),r||""},p=(t,e,r=!0)=>{const{fontFamily:s="Default",fontCategory:a="sans-serif",fontVariant:i=400,fontWeight:c,isUploadFont:u=!0,fontSize:d={desktop:null,tablet:null,mobile:null},fontStyle:p,textTransform:m,textDecoration:h,lineHeight:y,letterSpace:g}=e||{},f=!r||!s||"Default"===s,b=d?.desktop||d,M=d?.tablet||b,w=d?.mobile||M,k=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},$=`\n\t\t${f?"":`font-family: '${s}', ${a};`}\n\t\t${l("font-weight",c)}\n\t\t${l("font-size",k(b))}\n\t\t${l("font-style",p)}\n\t\t${l("text-transform",m)}\n\t\t${l("text-decoration",h)}\n\t\t${l("line-height",y)}\n\t\t${l("letter-spacing",g)}\n\t`,x=i&&400!==i?"400i"===i?":ital@1":i?.includes("00i")?`: ital, wght@1, ${i?.replace("00i","00")} `:`: wght@${i} `:"",T=f?"":`https://fonts.googleapis.com/css2?family=${s?.split(" ").join("+")}${x.replace(/ /g,"")}&display=swap`;return{googleFontLink:!u||f?"":`@import url(${T});`,styles:`${t}{\n\t\t\t${$}\n\t\t}\n\t\t${n} {\n\t\t\t${t}{\n\t\t\t\t${l("font-size",k(M))}\n\t\t\t}\n\t\t}\n\t\t${o} {\n\t\t\t${t}{\n\t\t\t\t${l("font-size",k(w))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},m=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const e=["top","right","bottom","left"];return e.map((e=>t[e]||"")).every((t=>!t))?"":e.map((e=>t[e]||"0")).join(" ")}return""},h=t=>{const{position:r="center center",xPosition:n=0,yPosition:o=0,attachment:s="",repeat:a="no-repeat",size:i="cover",customSize:l="0px"}=t||{},c=t=>"initial"!==t||e(t);return`\n\t\t${c(r)?`background-position: ${"custom"===r?`${n} ${o}`:r};`:""}\n\t\t${s&&c(s)?`background-attachment: ${s};`:""}\n\t\t${c(a)?`background-repeat: ${a};`:""}\n\t\t${c(i)?`background-size: ${"custom"===i?`${l} auto`:i};`:""}\n\t`},y=(t={})=>t?{desktop:e(t.url)?`background-image: ${i(t.url)}; ${h(t?.desktop)}`:"",tablet:e(t.url)?h(t?.tablet):"",mobile:e(t.url)?h(t?.mobile):""}:"",g=(t,s,a=!1)=>{const{type:i="color",color:c,gradient:u,img:d,video:p}=t||{},m="color"===i?l("background",c):"gradient"===i?(t=>{const{type:r="linear",radialType:n="ellipse",colors:o=[],centerPositions:s={x:0,y:0},angel:a=0}=t||{};if(e(t)){const t=o?.map((({color:t,position:e})=>`${t} ${e}%`)),e=`linear-gradient(${a}deg, ${t})`;return l("background","radial"===r?`radial-gradient(${n} at ${s?.x}% ${s?.y}%,${t})`:e)}return""})(u):"image"===i?y(d).desktop:"",h="image"===i?y(d).tablet:"",g="image"===i?y(d).mobile:"",f=a?`${s}:hover`:s;return`\n\t\t${"video"===i?((t,e)=>{const{url:n,loop:o}=t||{},s=document.querySelector(e),a=s?.querySelector(".bPlVideo"),i=document.createElement("video");if(i.muted=!0,i.autoplay=!0,i.classList.add("bPlVideo"),!a&&s&&n){const t=r(n);if(t){const e=document.createElement("source");e.src=t,i.appendChild(e),s.appendChild(i)}}return i.loop=o,i.play(),`${e} .bPlVideo{\n\t\tleft: 0;\n\t\tmin-height: 100%;\n\t\tmin-width: 100%;\n\t\tposition: absolute;\n\t\twidth: -webkit-fill-available;\n\t\ttop: 0;\n\t\tz-index: 0;\n\t}`})(p,s):""}\n\n\t\t${m?`${f}{\n\t\t\t${m}\n\t\t}`:""}\n\n\t\t${h?`${n} {\n\t\t\t${f}{\n\t\t\t\t${h}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${g?`${o} {\n\t\t\t${f}{\n\t\t\t\t${g}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},f=(t,r,n=!1)=>{const{isEnabled:o,colors:s,opacity:a=1,blend:i,filter:c="",blur:u=0,brightness:d=100,contrast:p=100,saturation:m=100,hue:h=0,position:y={top:0,right:0,bottom:0,left:0},zIndex:f=-1}=t||{},b=`${100!==d?`brightness(${d}%)`:""} ${100!==p?`contrast(${p}%)`:""} ${100!==m?`saturate(${m}%)`:""} ${0!==u?`blur(${u}px)`:""} ${0!==h?`hue-rotate(${h}deg)`:""}`,M=`${c}: ${c?b:""}; -webkit-${c}: ${c?b:""};`,w=n?`${r}:hover::after`:`${r}::after`;return o?`\n\t\t${r}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${r}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${e(y.top)?y.top:0};\n\t\t\tright:${e(y.right)?y.right:0};\n\t\t\tbottom:${e(y.bottom)?y.bottom:0};\n\t\t\tleft:${e(y.left)?y.left:0};\n\t\t\tz-index:${f};\n\t\t}\n\t\t${g(s,w,!1)}\n\t\t${w}{\n\t\t\t${l("opacity",a)}\n\t\t\t${l("mix-blend-mode",i)}\n\t\t\t${M}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},b=(t,r,s=!1)=>{const a=(t,r="desktop")=>{if(!e(t))return"";const{skew:n,scale:o,rotate:s,offset:a,flipX:i,flipY:c}=t,{threeDRotate:u}=s||{},{isProportion:d}=o||{},p=[];return e(n)&&(e(n?.[r]?.x)&&p.push(`skewX(${n[r].x}deg)`),e(n?.[r]?.y)&&p.push(`skewY(${n[r].y}deg)`)),d?e(o?.[r]?.scale)&&p.push(`scale(${o[r].scale})`):(e(o?.[r]?.x)&&p.push(`scaleX(${o[r].x})`),e(o?.[r]?.y)&&p.push(`scaleY(${o[r].y})`)),e(s)&&(e(s?.[r]?.z)&&p.push(`rotateZ(${s[r].z}deg)`),u&&(e(s?.[r]?.x)&&p.push(`rotateX(${s[r].x}deg)`),e(s?.[r]?.y)&&p.push(`rotateY(${s[r].y}deg)`))),e(a)&&(e(a?.[r]?.x)&&p.push(`translateX(${a[r].x})`),e(a?.[r]?.y)&&p.push(`translateY(${a[r].y})`)),e(i)&&p.push(i?"scaleX(-1)":""),e(c)&&p.push(c?"scaleY(-1)":""),0===p.length?"":l("transform",p.join(" "))},i=s?`${r}:hover`:r;return`\n\t\t${i} {\n\t\t\t${a(t,"desktop")}\n\t\t}\n\t\t${n}{\n\t\t\t${i} {\n\t\t\t\t${a(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${o}{\n\t\t\t${i} {\n\t\t\t\t${a(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},M=t=>{const{padding:e,margin:r,height:n,width:o}=t||{},s=(t,e)=>l(t,e),a=(t,e,r)=>s(t,e?.[t]?.[r])+s(`min-${t}`,e?.min?.[r])+s(`max-${t}`,e?.max?.[r]),i=t=>l("padding",m(t)),c=t=>l("margin",m(t));return{desktop:i(e?.desktop)+c(r?.desktop)+a("height",n,"desktop")+a("width",o,"desktop"),tablet:i(e?.tablet)+c(r?.tablet)+a("height",n,"tablet")+a("width",o,"tablet"),mobile:i(e?.mobile)+c(r?.mobile)+a("height",n,"mobile")+a("width",o,"mobile")}},w=t=>{const{normal:e,hover:r}=t||{},n=t=>{const{border:e,radius:r,shadow:n}=t||{},o=l("border-radius",m(r)),s=l("box-shadow",d(n,"box"));return(t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:r="solid",width:n="0px"}=t;return`${n} ${r} ${e}`};return"object"!=typeof t||Array.isArray(t)?"":t.hasOwnProperty("top")||t.hasOwnProperty("right")||t.hasOwnProperty("bottom")||t.hasOwnProperty("left")?["top","right","bottom","left"].map((r=>t[r]?`border-${r}: ${e(t[r])};`:"")).join(" ").trim():l("border",e(t))})(e)+o+s};return{normal:n(e),hover:n(r)}},k=t=>{const{zIndex:r,overflow:n}=t||{},o=n?`overflow: ${n};`:"",s=t=>`${l("z-index",r?.[t])} ${l("position",e(r?.[t])?"relative":"")}`;return{desktop:s("desktop")+o,tablet:s("tablet"),mobile:s("mobile")}},$=(t,e)=>{const{desktop:r=!1,tablet:n=!1,mobile:o=!1}=t||{},s=e?"opacity: 0.5;":"display: none;",a=t=>t?s:"";return{desktop:a(r),tablet:a(n),mobile:a(o)}},x=(t,r,s=!1,a=!0)=>{const{dimension:c,transform:u,background:d,borderShadow:p,mask:m,animation:h,visibility:y,responsive:x,css:T=""}=r||{},v=s?`#${t}>div>div${a?":first-child":""}`:`#${t}>div`;((t,e,r)=>{const n=r?`#${e} > div`:`#${e}`,o=document.querySelector(n);o&&t&&t.type&&(o.setAttribute("data-aos",t.type),o.setAttribute("data-aos-duration",1e3*t.duration||.4),o.setAttribute("data-aos-delay",1e3*t.delay||0),o.classList.contains("aos-init")||(o.classList.add("aos-init"),window?.AOS?.init()),r)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?o.classList.add("aos-animate"):o.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(o)})(h,t,s);const L=M(c).desktop+k(y).desktop+((t,e,r)=>{const{transition:n=.4}=t||{},{transition:o=.4}=e||{},{transition:s=200}=r||{};return`transition: background ${n}s, border ${o}s, border-radius ${o}s, box-shadow ${o}s, transform ${s}ms ease-in-out;`})(d,p,u)+(t=>{const{isMask:e=!1,shape:r={type:"circle"},size:n={type:"contain",scale:"100%"},position:o={type:"center center",x:50,y:50},repeat:s="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===r.type?i(r.url):`url(${(a=r.type,[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48Y2lyY2xlIGN4PSI0NC41IiBjeT0iNDQuNSIgcj0iNDQuNSIvPjwvc3ZnPg==",type:"circle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48cGF0aCBkPSJNNzYuMTMzMiw0NC40NzUybDYuMzI4OS02LjMyODVBMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDUwLjg1LDYuNTQ3NEw0NC41MzIsMTIuODY1MSwzOC4xNiw2LjU0NzRhMjIuMzUyNCwyMi4zNTI0LDAsMSwwLTMxLjYxMiwzMS42MWw2LjMxODEsNi4zMTc3TDYuNTQ3OCw1MC44NDdhMjIuMzUyNCwyMi4zNTI0LDAsMCwwLDMxLjYxMiwzMS42MWw2LjMxODEtNi4zMTc3TDUwLjg1LDgyLjM5MjJhMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDMxLjYxMi0zMS41OTkzWiIvPjwvc3ZnPg==",type:"flower"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MS4xMTQzIiBoZWlnaHQ9Ijg4Ljk5OTkiIHZpZXdCb3g9IjAgMCA5MS4xMTQzIDg4Ljk5OTkiPjxwYXRoIGQ9Ik04Mi4xNzQ5LDM3LjUyNjZsMS42MTE5LTEuNjExOWMuOTQ4Ni0uOTQ4Ny02LjM3LTUuOTMwOS03LjA0OTItNi4zNzgyYTQ1LjE1MTYsNDUuMTUxNiwwLDAsMC01Ljc3NjYtMy4zMjQxYy0uMjQ2OC0uMTE1Ny0uNjAxNi0uMzAwOC0uOTg3Mi0uNDc4MnExLjc4MTYtMS44OTcyLDMuNTg2My0zLjc3MTNjLjk0ODYtLjk4LTYuMzYyOC01LjkyMzItNy4wNDkyLTYuMzcwNUE0NC4xNTc5LDQ0LjE1NzksMCwwLDAsNjAuNzUsMTIuMjYwNmwtLjI5My0uMTQ2NSwxLjM5NTktMS41NDI1Yy45NDA5LTEuMDQ4OS02LjMzMTktNS45LTcuMDQ5Mi02LjM3QTQ0LjIxMiw0NC4yMTIsMCwwLDAsNDkuMDQyMi44NjE2Yy0uNTQtLjI0NjctMi4zMTM3LTEuMjY0OC0yLjg0NTgtLjY4NjRRMzIuNzM4MSwxNS4xNjgyLDE4LjExNTQsMjkuMDY2Yy03Ljg0MzYsNy40NS0xNi41NjYzLDE1LjU3OTEtMTguMTA4OCwyNi44Ny0uMTE1Ny44MjUzLDEuMzI2NSwxLjk3NDQsMS43NDMsMi4zMTM4YTQwLjc5OSw0MC43OTksMCwwLDAsNS4zMTM5LDQuMDU2Nyw0NC4yMTc0LDQ0LjIxNzQsMCwwLDAsNS43NjExLDMuMzRjLjY0LjI5MzEsMi4xNzUsMS4yMDMxLDIuODQ1OS42ODY0bDIuMDc0Ny0xLjU1NzljMS40NSwxLjg1ODcsNS45Njk0LDQuNzIsNi42NzEyLDUuMTc1bDEuNDg4NS45NTY0QzI0LjQwMSw3Mi43NjQ3LDIyLjkyLDc0LjYzMTEsMjEuNDcsNzYuNTI4M2MtLjkxLDEuMTg3OCw2LjI2MjUsNS44NjE1LDcuMDQ5Miw2LjM3YTQ0LjE2MzMsNDQuMTYzMywwLDAsMCw1Ljc2MTEsMy4zMzE4Yy42MDE2LjI3NzYsMi4yMjg5LDEuMjM0LDIuODQ1OS42OTQxbDkuMjU1LTguMDk4Yy44MjUyLDIuNTY4MiwxNC41Njg3LDExLjYzLDE1LjY3MTYsOS45NzIxTDkxLjA2LDQ1LjM2MjRDOTEuNjkyLDQ0LjQxMzgsODYuNzI1Miw0MC4zMjYyLDgyLjE3NDksMzcuNTI2NloiLz48L3N2Zz4=",type:"sketch"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwb2x5Z29uIHBvaW50cz0iNzcuMjU1IDQ0LjUwNSA1MS41IDAgMjUuNzU1IDQ0LjUwNSAwIDg5IDUxLjUgODkgMTAzIDg5IDc3LjI1NSA0NC41MDUiLz48L3N2Zz4=",type:"triangle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjEuMDAwMiIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDEyMS4wMDAyIDg5Ij48cGF0aCBkPSJNMTAwLjAxNiw3LjM5NzJDOTAuMjQ1MiwxLjIyLDczLjMwODQtMy42NjYzLDY0LjQyNTUsMy43MTI2LDU2Ljk4MzYsOS44OSw2Mi4wNDY5LDE4LjkxNzQsNTUuMDEsMjUuMzAzMmMtMTAuNiw5LjYxMzQtMjguMTU4OS01LjQ0MjMtNDEuODU4NCwyLjYzMThDLjY3NTcsMzUuMjU0My00LjI3OTEsNTkuMTQ4OSw0LjI3ODEsNzMuNzk3NWMxMy4xMzY5LDIyLjUyNCw1My4xMywxMy44NTQxLDYxLjE5MzYsMTIuMTA2MSw0LjUwMDctLjk5MzEsNTMuNDk1My0xMi4yNjUsNTUuNDY5My00Mi43MDQzQzEyMS44OTgsMjguMjUyOCwxMTEuMSwxNC40MTg1LDEwMC4wMTYsNy4zOTcyWiIvPjwvc3ZnPg==",type:"blob"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwYXRoIGQ9Ik03Ny4yMTE0LDBIMjUuNzUyM0wwLDQ0LjUwNDUsMjUuNzUyMyw4OUg3Ny4yMTE0TDEwMyw0NC41MDQ1Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}].find((t=>t.type===a))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===n.type?n.scale:n.type};\n\t\t${"custom"===o.type?`${l("-webkit-mask-position-x",o.x)}\n\t\t\t${l("-webkit-mask-position-y",o.y)}`:`${l("-webkit-mask-position",o.type)}`}\n\t\t${"cover"!==n.type?`-webkit-mask-repeat: ${s};`:""}`:"";var a})(m),j=M(c).tablet+k(y).tablet+$(x,s).tablet,N=M(c).mobile+k(y).mobile+$(x,s).mobile,E=w(p).normal,D=w(p).hover,I=$(x,s).desktop;return`\n\t\t${L||E?`${v} {\n\t\t\t${L}\n\t\t\t${E}\n\t\t}`:""}\n\t\t${D?`${v}:hover {\n\t\t\t${D}\n\t\t}`:""}\n\n\t\t${I?`@media only screen and (min-width: 1025px) {\n\t\t\t${v}{\n\t\t\t\t${I}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${j?`${n} {\n\t\t\t${v}{\n\t\t\t\t${j}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${N?`${o} {\n\t\t\t${v}{\n\t\t\t\t${N}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${g(d?.normal,v)}\n\t\t${g(d?.hover,v,!0)}\n\t\t${f(d?.overlay,v)}\n\t\t${f(d?.hoverOverlay,v,!0)}\n\t\t${e(u?.normal)?b(u?.normal,v):""}\n\t\t${e(u?.hover)?b(u?.hover,v,!0):""}\n\n\t\t${T}\n\t`.replace(/\s+/g," ")},T=window.wp.i18n,v="b-blocks-google-map",L={lat:23.8103,lng:90.4125},j=((0,T.__)("16:9 (Widescreen)","b-blocks"),(0,T.__)("4:3 (Standard)","b-blocks"),(0,T.__)("1:1 (Square)","b-blocks"),(0,T.__)("3:4 (Portrait)","b-blocks"),(0,T.__)("Left","b-blocks"),(0,T.__)("Center","b-blocks"),(0,T.__)("Right","b-blocks"),/^(www\.|maps\.)?google\.(com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2,3})$/i),N=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","GeometryCollection"],E=t=>t&&"Feature"===t.type?t:t&&N.includes(t.type)?{type:"Feature",geometry:t,properties:{}}:null,D=t=>!(!t||"object"!=typeof t||Array.isArray(t)||void 0===t.stylers&&void 0===t.featureType&&void 0===t.elementType),I=t=>Array.isArray(t)?t.length>0&&t.every(D):D(t),A=(t,e=null)=>{const r=parseFloat(t);return Number.isFinite(r)?r:e},C=(t,e,r)=>{if(!t)return;const n=e=>{const n=t?.[e]?.[r];if(void 0!==n&&""!==n)return n;const o=t?.[r]?.[e];return void 0!==o&&""!==o?o:void 0};return"mobile"===e?n("mobile")??n("tablet")??n("desktop"):"tablet"===e?n("tablet")??n("desktop"):n("desktop")},S={default:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]},O=window.ReactJSXRuntime,z=({attributes:t,id:e,isBackend:r=!1})=>{const{map:s={},marker:a={},infoWindow:i={},clustering:h={},categories:y=[],filterBar:g={},caption:f={},advanced:b}=t,M=`#${e}`,w=`${M} .${v}-wrapper`,k=`${M} .${v}-canvas`,$=`${M} .${v}-iframe`,T=`${M} .${v}-caption`,L=`${M} .${v}-pin`,j=`${M} .${v}-cluster`,N=`${M} .${v}-filter-chip`,E=`${M} .${v}-filter-bar`,D=`${M} .gm-style-iw-c`,I=`${M} .gm-style-iw-d`,A=`${M} .${v}-figure, ${M} .${v}-placeholder`,S=(y||[]).filter((t=>t?.id&&t?.color)).map((t=>{const e=String(t.id).replace(/["'\\\]]/g,"");return`\n\t\t\t\t${N}[data-category="${e}"] .${v}-filter-dot{ background: ${t.color}; }\n\t\t\t\t${N}[data-category="${e}"].active{ background: ${t.color}; }\n\t\t\t`})).join(""),z=t=>{return`\n\t\t${M}{ ${l("text-align",C(s,t,"align"))} }\n\n\t\t${A}{\n\t\t\tmargin: ${e=C(s,t,"align"),"left"===e?"0 auto 0 0":"right"===e?"0 0 0 auto":"0 auto"};\n\t\t\t${l("max-width",C(s,t,"maxWidth"))}\n\t\t}\n\n\t\t${w}{\n\t\t\t${((t,e,r)=>l("border-radius",m(e?.[r])))(0,s.borderRadius,t)}\n\t\t\t${s.useAspectRatio?l("aspect-ratio",((t,e)=>"string"==typeof t?t:t?"mobile"===e?t.mobile||t.tablet||t.desktop:"tablet"===e&&t.tablet||t.desktop:void 0)(s.aspectRatio,t)||"16/9"):l("height",C(s,t,"height"))}\n\t\t}\n\n\t\t${L}{\n\t\t\t${l("width",a?.[t]?.size)}\n\t\t\t${l("height",a?.[t]?.size)}\n\t\t}\n\n\t\t${D}{\n\t\t\t${l("max-width",i?.[t]?.maxWidth)}\n\t\t\t${l("border-radius",m(i?.[t]?.radius))}\n\t\t}\n\n\t\t${I}{ ${l("padding",m(i?.[t]?.padding))} }\n\n\t\t${E}{ ${l("gap",g?.[t]?.gap)} }\n\n\t\t${N}{\n\t\t\t${l("padding",m(g?.[t]?.padding))}\n\t\t\t${l("border-radius",m(g?.[t]?.radius))}\n\t\t}\n\t`;var e};return(0,O.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${p("",f.typo).googleFontLink}\n\t\t\t${p("",g.typo).googleFontLink}\n\t\t\t${p("",i.typo).googleFontLink}\n\n\t\t\t${M}{ display: block; }\n\n\t\t\t${A}{ width: 100%; }\n\n\t\t\t${w}{\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n\t\t\t\t${l("box-shadow",d(s.shadow||[]))}\n\t\t\t\t${s.useAspectRatio?"height: auto;":""}\n\t\t\t}\n\n\t\t\t${k}, ${$}{\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\t${s.useAspectRatio?"position: absolute; inset: 0;":""}\n\t\t\t}\n\n\t\t\t${j}{\n\t\t\t\t${h.background?c(h.background):l("background",h.color)}\n\t\t\t\t${l("color",h.textColor)}\n\t\t\t\t${l("width",h.size)}\n\t\t\t\t${l("height",h.size)}\n\t\t\t}\n\n\t\t\t${E}{ ${l("justify-content","right"===g.align?"flex-end":"center"===g.align?"center":"flex-start")} }\n\n\t\t\t${N}{\n\t\t\t\t${l("color",g.color)}\n\t\t\t\t${l("background",g.bgColor)}\n\t\t\t}\n\t\t\t${p(N,g.typo).styles}\n\n\t\t\t${N}.active{\n\t\t\t\t${l("background",g.activeColor)}\n\t\t\t\t${l("color",g.activeTextColor)}\n\t\t\t}\n\n\t\t\t/* After the generic .active rule so a category colour wins. */\n\t\t\t${S}\n\n\t\t\t${D}{\n\t\t\t\t${l("background",i.bgColor)}\n\t\t\t\t${u(i.border)}\n\t\t\t\t${l("box-shadow",d(i.shadow||[]))}\n\t\t\t}\n\n\t\t\t/* The tail is a separate rotated box; without this a recoloured\n\t\t\t info window keeps a white arrow. Both class names are emitted —\n\t\t\t Google renamed it from -t to -tc. */\n\t\t\t${M} .gm-style-iw-t::after,\n\t\t\t${M} .gm-style-iw-tc::after{\n\t\t\t\t${l("background",i.bgColor)}\n\t\t\t}\n\n\t\t\t${I}, ${M} .${v}-info{\n\t\t\t\t${l("color",i.textColor)}\n\t\t\t}\n\t\t\t${p(`${M} .${v}-info`,i.typo).styles}\n\n\t\t\t${T}{\n\t\t\t\t${l("text-align",f.align)}\n\t\t\t\t${l("color",f.color)}\n\t\t\t}\n\t\t\t${p(T,f.typo).styles}\n\n\t\t\t${z("desktop")}\n\t\t\t${n}{ ${z("tablet")} }\n\t\t\t${o}{ ${z("mobile")} }\n\n\t\t\t${x(e,b,r,!1)}\n\t\t\t`}})},{getOwnPropertyNames:_,getOwnPropertySymbols:P}=Object,{hasOwnProperty:U}=Object.prototype;function R(t,e){return function(r,n,o){return t(r,n,o)&&e(r,n,o)}}function Y(t){return function(e,r,n){if(!e||!r||"object"!=typeof e||"object"!=typeof r)return t(e,r,n);const{cache:o}=n,s=o.get(e),a=o.get(r);if(s&&a)return s===r&&a===e;o.set(e,r),o.set(r,e);const i=t(e,r,n);return o.delete(e),o.delete(r),i}}function Z(t){return _(t).concat(P(t))}const q=Object.hasOwn||((t,e)=>U.call(t,e));function Q(t,e){return t===e||!t&&!e&&t!=t&&e!=e}const{getOwnPropertyDescriptor:B,keys:F}=Object;function G(t,e){return t.byteLength===e.byteLength&&at(new Uint8Array(t),new Uint8Array(e))}function H(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function J(t,e){return t.byteLength===e.byteLength&&at(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function W(t,e){return Q(t.getTime(),e.getTime())}function V(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function X(t,e){return t===e}function K(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const o=new Array(n),s=t.entries();let a,i,l=0;for(;(a=s.next())&&!a.done;){const n=e.entries();let s=!1,c=0;for(;(i=n.next())&&!i.done;){if(o[c]){c++;continue}const n=a.value,u=i.value;if(r.equals(n[0],u[0],l,c,t,e,r)&&r.equals(n[1],u[1],n[0],u[0],t,e,r)){s=o[c]=!0;break}c++}if(!s)return!1;l++}return!0}const tt=Q;function et(t,e,r){const n=F(t);let o=n.length;if(F(e).length!==o)return!1;for(;o-- >0;)if(!lt(t,e,r,n[o]))return!1;return!0}function rt(t,e,r){const n=Z(t);let o,s,a,i=n.length;if(Z(e).length!==i)return!1;for(;i-- >0;){if(o=n[i],!lt(t,e,r,o))return!1;if(s=B(t,o),a=B(e,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable))return!1}return!0}function nt(t,e){return Q(t.valueOf(),e.valueOf())}function ot(t,e){return t.source===e.source&&t.flags===e.flags}function st(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const o=new Array(n),s=t.values();let a,i;for(;(a=s.next())&&!a.done;){const n=e.values();let s=!1,l=0;for(;(i=n.next())&&!i.done;){if(!o[l]&&r.equals(a.value,i.value,a.value,i.value,t,e,r)){s=o[l]=!0;break}l++}if(!s)return!1}return!0}function at(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function it(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function lt(t,e,r,n){return!("_owner"!==n&&"__o"!==n&&"__v"!==n||!t.$$typeof&&!e.$$typeof)||q(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}const ct={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},ut=Object.prototype.toString;const dt=pt();function pt(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:o=!1}=t,s=function({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:G,areArraysEqual:r?rt:H,areDataViewsEqual:J,areDatesEqual:W,areErrorsEqual:V,areFunctionsEqual:X,areMapsEqual:r?R(K,rt):K,areNumbersEqual:tt,areObjectsEqual:r?rt:et,arePrimitiveWrappersEqual:nt,areRegExpsEqual:ot,areSetsEqual:r?R(st,rt):st,areTypedArraysEqual:r?R(at,rt):at,areUrlsEqual:it,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const t=Y(n.areArraysEqual),e=Y(n.areMapsEqual),r=Y(n.areObjectsEqual),o=Y(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:t,areMapsEqual:e,areObjectsEqual:r,areSetsEqual:o})}return n}(t),a=function({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:o,areFunctionsEqual:s,areMapsEqual:a,areNumbersEqual:i,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:m,unknownTagComparators:h}){return function(y,g,f){if(y===g)return!0;if(null==y||null==g)return!1;const b=typeof y;if(b!==typeof g)return!1;if("object"!==b)return"number"===b?i(y,g,f):"function"===b&&s(y,g,f);const M=y.constructor;if(M!==g.constructor)return!1;if(M===Object)return l(y,g,f);if(Array.isArray(y))return e(y,g,f);if(M===Date)return n(y,g,f);if(M===RegExp)return u(y,g,f);if(M===Map)return a(y,g,f);if(M===Set)return d(y,g,f);const w=ut.call(y);if("[object Date]"===w)return n(y,g,f);if("[object RegExp]"===w)return u(y,g,f);if("[object Map]"===w)return a(y,g,f);if("[object Set]"===w)return d(y,g,f);if("[object Object]"===w)return"function"!=typeof y.then&&"function"!=typeof g.then&&l(y,g,f);if("[object URL]"===w)return m(y,g,f);if("[object Error]"===w)return o(y,g,f);if("[object Arguments]"===w)return l(y,g,f);if(ct[w])return p(y,g,f);if("[object ArrayBuffer]"===w)return t(y,g,f);if("[object DataView]"===w)return r(y,g,f);if("[object Boolean]"===w||"[object Number]"===w||"[object String]"===w)return c(y,g,f);if(h){let t=h[w];if(!t){const e=null!=(k=y)?k[Symbol.toStringTag]:void 0;e&&(t=h[e])}if(t)return t(y,g,f)}var k;return!1}}(s);var i;return function({circular:t,comparator:e,createState:r,equals:n,strict:o}){if(r)return function(s,a){const{cache:i=(t?new WeakMap:void 0),meta:l}=r();return e(s,a,{cache:i,equals:n,meta:l,strict:o})};if(t)return function(t,r){return e(t,r,{cache:new WeakMap,equals:n,meta:void 0,strict:o})};const s={cache:void 0,equals:n,meta:void 0,strict:o};return function(t,r){return e(t,r,s)}}({circular:e,comparator:a,createState:n,equals:r?r(a):(i=a,function(t,e,r,n,o,s,a){return i(t,e,a)}),strict:o})}pt({strict:!0}),pt({circular:!0}),pt({circular:!0,strict:!0}),pt({createInternalComparator:()=>Q}),pt({strict:!0,createInternalComparator:()=>Q}),pt({circular:!0,createInternalComparator:()=>Q}),pt({circular:!0,createInternalComparator:()=>Q,strict:!0});const mt=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ht=new Uint32Array(96);class yt{static from(t){if(!t||void 0===t.byteLength||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const o=mt[15&r];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new yt(a,s,o,void 0,t)}constructor(t,e=64,r=Float64Array,n=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=mt.indexOf(this.ArrayType),a=2*t*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-i%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,8,t),this.coords=new r(o,8+i+l,2*t),this._pos=2*t,this._finished=!0;else{const o=this.data=new n(8+a+i+l);this.ids=new this.IndexArrayType(o,8,t),this.coords=new r(o,8+i+l,2*t),this._pos=0,this._finished=!1,new Uint8Array(o,0,2).set([219,16+s]),new Uint16Array(o,2,1)[0]=e,new Uint32Array(o,4,1)[0]=t}}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return gt(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this;ht[0]=0,ht[1]=o.length-1,ht[2]=0;let i=3;const l=[];for(;i>0;){const c=ht[--i],u=ht[--i],d=ht[--i];if(u-d<=a){for(let a=d;a<=u;a++){const i=s[2*a],c=s[2*a+1];i>=t&&i<=r&&c>=e&&c<=n&&l.push(o[a])}continue}const p=d+u>>1,m=s[2*p],h=s[2*p+1];m>=t&&m<=r&&h>=e&&h<=n&&l.push(o[p]),(0===c?t<=m:e<=h)&&(ht[i++]=d,ht[i++]=p-1,ht[i++]=1-c),(0===c?r>=m:n>=h)&&(ht[i++]=p+1,ht[i++]=u,ht[i++]=1-c)}return l}within(t,e,r){const n=[];return this.withinInto(t,e,r,n),n}withinInto(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this;ht[0]=0,ht[1]=o.length-1,ht[2]=0;let i=3,l=0;const c=r*r;for(;i>0;){const u=ht[--i],d=ht[--i],p=ht[--i];if(d-p<=a){for(let r=p;r<=d;r++)wt(s[2*r],s[2*r+1],t,e)<=c&&(n[l++]=o[r]);continue}const m=p+d>>1,h=s[2*m],y=s[2*m+1];wt(h,y,t,e)<=c&&(n[l++]=o[m]),(0===u?t-r<=h:e-r<=y)&&(ht[i++]=p,ht[i++]=m-1,ht[i++]=1-u),(0===u?t+r>=h:e+r>=y)&&(ht[i++]=m+1,ht[i++]=d,ht[i++]=1-u)}return l}}function gt(t,e,r,n,o,s){if(o-n<=r)return;const a=n+o>>1;ft(t,e,a,n,o,s),gt(t,e,r,n,a-1,1-s),gt(t,e,r,a+1,o,1-s)}function ft(t,e,r,n,o,s){for(;o>n;){if(o-n>600){const a=o-n+1,i=r-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(i-a/2<0?-1:1);ft(t,e,r,Math.max(n,Math.floor(r-i*c/a+u)),Math.min(o,Math.floor(r+(a-i)*c/a+u)),s)}const a=e[2*r+s];let i=n,l=o;for(bt(t,e,n,r),e[2*o+s]>a&&bt(t,e,n,o);i<l;){for(bt(t,e,i,l),i++,l--;e[2*i+s]<a;)i++;for(;e[2*l+s]>a;)l--}e[2*n+s]===a?bt(t,e,n,l):(l++,bt(t,e,l,o)),l<=r&&(n=l+1),r<=l&&(o=l-1)}}function bt(t,e,r,n){Mt(t,r,n),Mt(e,2*r,2*n),Mt(e,2*r+1,2*n+1)}function Mt(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function wt(t,e,r,n){const o=t-r,s=e-n;return o*o+s*s}const kt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},$t=Math.fround||(xt=new Float32Array(1),t=>(xt[0]=+t,xt[0]));var xt;class Tt{constructor(t){this.options=Object.assign(Object.create(kt),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const s=[];for(let e=0;e<t.length;e++){const r=t[e];if(!r.geometry)continue;const[n,o]=r.geometry.coordinates,a=$t(jt(n)),i=$t(Nt(o));s.push(a,i,1/0,e,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[n+1]=this._createTree(s);e&&console.timeEnd(o);for(let t=n;t>=r;t--){const r=+Date.now();a=this.trees[t]=this._createTree(this._cluster(a,t)),e&&console.log("z%d: %d clusters in %dms",t,a.numItems,+Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,o=180;else if(r>o){const t=this.getClusters([r,n,180,s],e),a=this.getClusters([-180,n,o,s],e);return t.concat(a)}const a=this.trees[this._limitZoom(e)],i=a.range(jt(r),Nt(s),jt(o),Nt(n)),l=a.data,c=[];for(const t of i){const e=this.stride*t;c.push(l[e+5]>1?vt(l,e,this.clusterProps):this.points[l[e+3]])}return c}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const s=o.data;if(e*this.stride>=s.length)throw new Error(n);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),i=s[e*this.stride],l=s[e*this.stride+1],c=o.within(i,l,a),u=[];for(const e of c){const r=e*this.stride;s[r+4]===t&&u.push(s[r+5]>1?vt(s,r,this.clusterProps):this.points[s[r+3]])}if(0===u.length)throw new Error(n);return u}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:s,radius:a}=this.options,i=a/s,l=(r-i)/o,c=(r+1+i)/o,u={features:[]};return this._addTileFeatures(n.range((e-i)/o,l,(e+1+i)/o,c),n.data,e,r,o,u),0===e&&this._addTileFeatures(n.range(1-i/o,l,1,c),n.data,o,r,o,u),e===o-1&&this._addTileFeatures(n.range(0,l,i/o,c),n.data,-1,r,o,u),u.features.length?u:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,o){const s=this.getChildren(e);for(const e of s){const s=e.properties;if(s&&s.cluster?o+s.point_count<=n?o+=s.point_count:o=this._appendLeaves(t,s.cluster_id,r,n,o):o<n?o++:t.push(e),t.length===r)break}return o}_createTree(t){const e=new yt(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,o,s){for(const a of t){const t=a*this.stride,i=e[t+5]>1;let l,c,u;if(i)l=Lt(e,t,this.clusterProps),c=e[t],u=e[t+1];else{const r=this.points[e[t+3]];l=r.properties;const[n,o]=r.geometry.coordinates;c=jt(n),u=Nt(o)}const d={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(u*o-n))]],tags:l};let p;p=i||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==p&&(d.id=p),s.features.push(d)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:o,minPoints:s}=this.options,a=r/(n*Math.pow(2,e)),i=t.data,l=[],c=this.stride;for(let r=0;r<i.length;r+=c){if(i[r+2]<=e)continue;i[r+2]=e;const n=i[r],u=i[r+1],d=t.within(i[r],i[r+1],a),p=i[r+5];let m=p;for(const t of d){const r=t*c;i[r+2]>e&&(m+=i[r+5])}if(m>p&&m>=s){let t,s=n*p,a=u*p,h=-1;const y=(r/c<<5)+(e+1)+this.points.length;for(const n of d){const l=n*c;if(i[l+2]<=e)continue;i[l+2]=e;const u=i[l+5];s+=i[l]*u,a+=i[l+1]*u,i[l+4]=y,o&&(t||(t=this._map(i,r,!0),h=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(i,l)))}i[r+4]=y,l.push(s/m,a/m,1/0,y,-1,m),o&&l.push(h)}else{for(let t=0;t<c;t++)l.push(i[r+t]);if(m>1)for(const t of d){const r=t*c;if(!(i[r+2]<=e)){i[r+2]=e;for(let t=0;t<c;t++)l.push(i[r+t])}}}}return l}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+5]>1){const n=this.clusterProps[t[e+6]];return r?Object.assign({},n):n}const n=this.points[t[e+3]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function vt(t,e,r){return{type:"Feature",id:t[e+3],properties:Lt(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),Et(t[e+1])]}};var n}function Lt(t,e,r){const n=t[e+5],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,s=t[e+6],a=-1===s?{}:Object.assign({},r[s]);return Object.assign(a,{cluster:!0,cluster_id:t[e+3],point_count:n,point_count_abbreviated:o})}function jt(t){return t/360+.5}function Nt(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Et(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}"function"==typeof SuppressedError&&SuppressedError;class Dt{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(Number.isFinite(t.position.lat)&&Number.isFinite(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 It{constructor({markers:t,position:e}){this.markers=[],t&&(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(Dt.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>Dt.getVisible(t))).length}push(t){this.markers.push(t)}delete(){this.marker&&(Dt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function At(t,e="assertion failed"){if(null==t)throw Error(e)}class Ct{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return St(t)}}const St=t=>t.map((t=>new It({position:Dt.getPosition(t),markers:[t]})));class Ot extends Ct{constructor(t){var{maxZoom:e,radius:r=60}=t,n=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["maxZoom","radius"]);super({maxZoom:e}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Tt(Object.assign({maxZoom:this.maxZoom,radius:r},n))}calculate(t){let e=!1,r=t.map.getZoom();At(r),r=Math.round(r);const n={zoom:r};if(!dt(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const r=this.markers.map((t=>{const e=Dt.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(e=!dt(this.state,n)),this.state=n,0===t.markers.length?(this.clusters=[],{clusters:this.clusters,changed:e}):(e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e})}cluster({map:t}){const e=t.getZoom();return At(e),this.superCluster.getClusters([-180,-90,180,90],Math.round(e)).map((t=>this.transformCluster(t)))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new It({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:e,lng:t}});const n=r.marker;return new It({markers:[n],position:Dt.getPosition(n)})}}class zt{constructor(t,e){this.markers={sum:t.length};const r=e.map((t=>t.count)),n=r.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:n/e.length,sum:n,min:Math.min(...r),max:Math.max(...r)}}}}class _t{render({count:t,position:e},r,n){const o=`<svg fill="${t>Math.max(10,r.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>`,s=`Cluster of ${t} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+t;if(Dt.isAdvancedMarkerAvailable(n)){const t=(new DOMParser).parseFromString(o,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const r={map:n,position:e,zIndex:a,title:s,content:t};return new google.maps.marker.AdvancedMarkerElement(r)}const i={position:e,zIndex:a,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(i)}}class Pt{constructor(){!function(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}(Pt,google.maps.OverlayView)}}var Ut;!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"}(Ut||(Ut={}));const Rt=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class Yt extends Pt{constructor({map:t,markers:e=[],algorithmOptions:r={},algorithm:n=new Ot(r),renderer:o=new _t,onClusterClick:s=Rt}){super(),this.map=null,this.idleListener=null,this.markers=[...e],this.clusters=[],this.algorithm=n,this.renderer=o,this.onClusterClick=s,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 r=this.markers.indexOf(t);return-1!==r&&(Dt.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let r=!1;return t.forEach((t=>{r=this.removeMarker(t,!0)||r})),r&&!e&&this.render(),r}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,Ut.CLUSTERING_BEGIN,this);const{clusters:e,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||null==r){const t=new Set;for(const r of e)1==r.markers.length&&t.add(r.markers[0]);const r=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||Dt.setMap(e.marker,null):r.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame((()=>r.forEach((t=>Dt.setMap(t,null)))))}google.maps.event.trigger(this,Ut.CLUSTERING_END,this)}}onAdd(){const t=this.getMap();At(t),this.idleListener=t.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((t=>Dt.setMap(t,null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const t=new zt(this.markers,this.clusters),e=this.getMap();this.clusters.forEach((r=>{if(1===r.markers.length)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,t,e),r.markers.forEach((t=>Dt.setMap(t,null))),this.onClusterClick){const t=Dt.isAdvancedMarker(r.marker)?Ut.GMP_CLICK:Ut.CLUSTER_CLICK;r.marker.addListener(t,(t=>{google.maps.event.trigger(this,Ut.CLUSTER_CLICK,r),this.onClusterClick(t,r,e)}))}Dt.setMap(r.marker,e)}))}}const Zt="b-blocks-google-map-heat",qt=[[0,[0,0,255,0]],[.2,[0,0,255,255]],[.4,[0,255,255,255]],[.6,[0,255,0,255]],[.8,[255,255,0,255]],[1,[255,0,0,255]]],Qt=({OverlayView:t,LatLng:e})=>class extends t{constructor({points:t=[],radius:e=20,opacity:r=.6}={}){super();const n=(t,e)=>Number.isFinite(Number(t))?Number(t):e;this.points=t,this.radius=Math.max(4,n(e,20)),this.opacity=Math.min(1,Math.max(0,n(r,.6))),this.blur=Math.max(4,.65*this.radius),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null,this.idleListener=null}setOptions({points:t,radius:e,opacity:r}={}){const n=(t,e)=>Number.isFinite(Number(t))?Number(t):e;Array.isArray(t)&&(this.points=t),void 0!==e&&(this.radius=Math.max(4,n(e,this.radius)),this.blur=Math.max(4,.65*this.radius)),void 0!==r&&(this.opacity=Math.min(1,Math.max(0,n(r,this.opacity)))),this.draw()}onAdd(){const t=document.createElement("canvas");t.className=Zt,t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.zIndex="1",t.style.pointerEvents="none",this.canvas=t,this.ctx=t.getContext("2d"),this.gradient=(()=>{const t=document.createElement("canvas");t.width=1,t.height=256;const e=t.getContext("2d"),r=e.createLinearGradient(0,0,0,256);return qt.forEach((([t,[e,n,o,s]])=>{r.addColorStop(t,`rgba(${e},${n},${o},${s/255})`)})),e.fillStyle=r,e.fillRect(0,0,1,256),e.getImageData(0,0,1,256).data})();const e=this.getMap()?.getDiv();e?.querySelectorAll(`.${Zt}`).forEach((t=>t.remove())),e?.appendChild(t),this.idleListener=this.getMap()?.addListener("idle",(()=>this.draw()))}draw(){const t=this.getProjection(),r=this.getMap()?.getDiv();if(!(t&&r&&this.canvas&&this.ctx))return;const n=Math.min(r.clientWidth||0,4096),o=Math.min(r.clientHeight||0,4096);if(n<=0||o<=0)return;this.canvas.width!==n&&(this.canvas.width=n),this.canvas.height!==o&&(this.canvas.height=o),this.canvas.style.width=`${n}px`,this.canvas.style.height=`${o}px`,this.canvas.style.opacity=String(this.opacity),this.stamp&&this.stampRadius===this.radius||(this.stamp=((t,e)=>{const r=t+e,n=document.createElement("canvas");n.width=2*r,n.height=2*r;const o=n.getContext("2d");return o.shadowOffsetX=2*r,o.shadowOffsetY=2*r,o.shadowBlur=e,o.shadowColor="#000",o.beginPath(),o.arc(-r,-r,t,0,2*Math.PI,!0),o.closePath(),o.fill(),n})(this.radius,this.blur),this.stampRadius=this.radius);const s=this.ctx,a=this.radius+this.blur;s.clearRect(0,0,n,o),s.globalAlpha=.55;let i=0;if(this.points.forEach((r=>{const l=t.fromLatLngToContainerPixel(new e(r.lat,r.lng));l&&(l.x<-a||l.y<-a||l.x>n+a||l.y>o+a||(s.drawImage(this.stamp,l.x-a,l.y-a),i++))})),s.globalAlpha=1,!i)return;const l=s.getImageData(0,0,n,o),c=l.data;for(let t=3;t<c.length;t+=4){const e=c[t];if(!e)continue;const r=4*e;c[t-3]=this.gradient[r],c[t-2]=this.gradient[r+1],c[t-1]=this.gradient[r+2]}s.putImageData(l,0,0)}onRemove(){this.idleListener?.remove(),this.idleListener=null,this.canvas?.parentNode?.removeChild(this.canvas),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null}},Bt="__bBlocksMapsCb__",Ft=new Map;let Gt=!1,Ht="",Jt=!1,Wt=!1;const Vt=new Set,Xt=t=>(Ft.has(t)||Ft.set(t,window.google.maps.importLibrary(t).catch((e=>{throw Ft.delete(t),e}))),Ft.get(t)),Kt=(t={})=>{const{markers:e=[],shapes:r=[],directions:n={},tools:o={},clustering:s={},source:a={}}=t,i=new Set(["core","maps"]);return a.mapId&&(e.length||s.enabled)&&i.add("marker"),o.searchBox&&i.add("places"),n.enabled&&i.add("routes"),r.length&&i.add("geometry"),[...i]},te=(t,e=["maps"],r={})=>t?(Gt&&Ht&&Ht!==t&&!Jt&&(Jt=!0,console.warn("[b-blocks] The Google Maps API is already loaded with a different API key; the first key wins.")),((t,{version:e="weekly",language:r="",region:n=""}={})=>{const o=window.google=window.google||{},s=o.maps=o.maps||{};if((()=>{const t=window.gm_authFailure;if(t?.bBlocksHooked)return;const e=()=>{Wt=!0,Vt.forEach((t=>t())),"function"==typeof t&&t()};e.bBlocksHooked=!0,window.gm_authFailure=e})(),s.importLibrary)return Gt=!0,void(Ht=Ht||t);const a=new Set;let i=null;s.importLibrary=(o,...l)=>(a.add(o),(i||(i=Promise.resolve().then((()=>new Promise(((o,l)=>{const c=new URLSearchParams;c.set("key",t),c.set("v",e),c.set("loading","async"),c.set("libraries",[...a].join(",")),c.set("callback",`google.maps.${Bt}`),r&&c.set("language",r),n&&c.set("region",n);const u=document.createElement("script");u.src=`https://maps.googleapis.com/maps/api/js?${c.toString()}`,u.async=!0,u.nonce=document.querySelector("script[nonce]")?.nonce||"",u.onerror=()=>{i=null,l(new Error("google-maps-load-failed"))},s[Bt]=o,document.head.append(u)})))))).then((()=>s.importLibrary(o,...l)))),Gt=!0,Ht=t})(t,r),Promise.all(e.map(Xt)).then((t=>Object.assign({},...t)))):Promise.reject(new Error("missing-key")),ee=(t="")=>{if(!t||"string"!=typeof t)return"";const e=(new DOMParser).parseFromString(t,"text/html");return e.body.querySelectorAll("script, style, iframe, object, embed, form, link, meta").forEach((t=>t.remove())),e.body.querySelectorAll("*").forEach((t=>{[...t.attributes].forEach((({name:e,value:r})=>{const n=/^on/i.test(e),o=/^\s*javascript:/i.test(r||"");(n||o&&("href"===e||"src"===e))&&t.removeAttribute(e)}))})),e.body.innerHTML},re=(t={})=>{const e=A(t.lat),r=A(t.lng);return null===e||null===r?null:{lat:e,lng:r}},ne=(t,e=[])=>e.find((e=>e.id===t?.category))||null,oe=({address:t="",message:e="",status:r="info",onActivate:n=null,actionLabel:o=""})=>{return(0,O.jsxs)("div",{className:`${v}-fallback ${v}-fallback-${r}`,role:"note",children:[e?(0,O.jsx)("p",{className:`${v}-fallback-message`,children:e}):null,t?(0,O.jsx)("p",{className:`${v}-fallback-address`,children:t}):null,n?(0,O.jsx)("button",{type:"button",className:`${v}-fallback-button`,onClick:n,children:o||(0,T.__)("Load map","b-blocks")}):(0,O.jsx)("a",{className:`${v}-fallback-link`,href:(s=t,`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(s||"")}`),target:"_blank",rel:"noopener noreferrer",children:(0,T.__)("Open in Google Maps","b-blocks")})]});var s},se=({categories:t=[],filterBar:e={},active:r="",onChange:n=()=>{}})=>{if(!t.length)return null;const{showAll:o=!0,allLabel:s=""}=e,a=o?[{id:"",label:s||(0,T.__)("All","b-blocks")},...t]:t;return(0,O.jsx)("div",{className:`${v}-filter-bar`,role:"group","aria-label":(0,T.__)("Filter map locations by category","b-blocks"),children:a.map((t=>{const e=r===t.id;return(0,O.jsxs)("button",{type:"button",className:`${v}-filter-chip${e?" active":""}`,"data-category":t.id||"","aria-pressed":e,onClick:()=>n(t.id),children:[t.id?(0,O.jsx)("span",{className:`${v}-filter-dot`,"aria-hidden":"true"}):null,t.label]},t.id||"all")}))})},ae=({embedUrl:t,captionText:e})=>{if(!(t=>{if(!t||"string"!=typeof t)return!1;try{const e=new URL(t);return"https:"===e.protocol&&!!j.test(e.hostname)&&!!e.pathname.startsWith("/maps/embed")}catch(t){return!1}})(t))return(0,O.jsx)("div",{className:`${v}-placeholder`,role:"note",children:(0,T.__)("Paste a valid Google Maps embed URL from Google Maps → Share → Embed a map.","b-blocks")});const r=e?(0,T.sprintf)((0,T.__)("Google Map of %s","b-blocks"),e):(0,T.__)("Google Map","b-blocks");return(0,O.jsx)("div",{className:`${v}-wrapper`,children:(0,O.jsx)("iframe",{className:`${v}-iframe`,src:t,title:r,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",allowFullScreen:!0})})},ie=({attributes:t,apiKey:e="",isBackend:r=!1,device:n="desktop",onMarkerDrag:o=null})=>{const s=(0,a.useMemo)((()=>((t={})=>{const e=t.source||{},r=e.type||(e.embedUrl?"embed":"interactive");return{...t,source:{...e,type:r,center:{...L,...e.center||{}}}}})(t)),[t]),{source:i={},map:l={},controls:c={},markers:u=[],marker:d={},infoWindow:p={},clustering:m={},categories:h=[],filterBar:y={},theme:g={},layers:f={},shapes:b=[],directions:M={},tools:w={},performance:k={},caption:$={}}=s,x="embed"===i.type,j=$.text||"",N=(0,a.useRef)(null),D=(0,a.useRef)(null),C=(0,a.useRef)(null),z=(0,a.useRef)(null),_=(0,a.useRef)(null),P=(0,a.useRef)([]),U=(0,a.useRef)(null),R=(0,a.useRef)(null),Y=(0,a.useRef)([]),Z=(0,a.useRef)([]),q=(0,a.useRef)(""),Q=(0,a.useRef)(null),[B,F]=(0,a.useState)(null),[G,H]=(0,a.useState)(""),[J,W]=(0,a.useState)(0),[V,X]=(0,a.useState)(""),[K,tt]=(0,a.useState)(!1),et=k.lazyLoad||"onView",[rt,nt]=(0,a.useState)(r||x||"none"===et),ot=(0,a.useMemo)((()=>((t={})=>{const{preset:e="default",customJson:r="",grayscale:n=0,saturation:o=0,hue:s=""}=t;let a=[];if("custom"===e)try{const t=JSON.parse(r||"[]");Array.isArray(t)&&(a=t)}catch(t){a=[]}else a=S[e]||[];const i=[];return A(n,0)&&i.push({saturation:-Math.abs(A(n,0))}),A(o,0)&&i.push({saturation:A(o,0)}),s&&i.push({hue:s}),i.length?[...a,{elementType:"all",stylers:i}]:a})(g)),[JSON.stringify(g)]),st=i.mapId||"",at=t=>B?.[t]||window.google?.maps?.[t],it=JSON.stringify([i.center,l,c,ot]),lt=JSON.stringify([u,d,p,h,m,V,n]),ct=JSON.stringify(f),ut=!!f.heatmap?.enabled,dt=(0,a.useMemo)((()=>u.map((t=>re(t))).filter(Boolean)),[JSON.stringify(u)]),pt=JSON.stringify(dt),mt=JSON.stringify([f.heatmap?.radius,f.heatmap?.opacity]),ht=JSON.stringify(b),yt=JSON.stringify(M);if((0,a.useEffect)((()=>{if(rt||"onView"!==et||!N.current)return;if(!("IntersectionObserver"in window))return void nt(!0);const t=new IntersectionObserver((e=>{e.some((t=>t.isIntersecting))&&(nt(!0),t.disconnect())}),{rootMargin:"200px"});return t.observe(N.current),()=>t.disconnect()}),[rt,et]),(0,a.useEffect)((()=>{if(x||!rt)return;let t=!1;if(e)return H(""),te(e,Kt(s),{language:i.language,region:i.region}).then((e=>{t||F(e)})).catch((e=>{t||H(e?.message||"google-maps-load-failed")})),()=>{t=!0};H("missing-key")}),[x,rt,e,i.language,i.region,JSON.stringify(Kt(s))]),(0,a.useEffect)((()=>{return t=()=>H("auth"),Wt&&t(),Vt.add(t),()=>Vt.delete(t);var t}),[]),(0,a.useEffect)((()=>{if(!B?.Map||!D.current)return;const t=new B.Map(D.current,{center:{lat:A(i.center?.lat,23.8103),lng:A(i.center?.lng,90.4125)},zoom:A(l.zoom,12),mapTypeId:l.mapType||"roadmap",mapId:st||void 0,styles:st?void 0:ot});_.current=t,W((t=>t+1));const e=new MutationObserver((()=>{const t=D.current;if(!t)return;const e=t.querySelector(".gm-err-container, .gm-err-content"),r=t.querySelector(".gm-style-moc"),n=!!r&&r.textContent.trim().length>0&&"0"!==(window.getComputedStyle(r)?.opacity||"0");(e||n)&&H("auth")}));return e.observe(D.current,{childList:!0,subtree:!0}),()=>{e.disconnect(),Z.current.forEach((t=>t?.remove?.())),Z.current=[],R.current?.close(),R.current=null,U.current?.clearMarkers(),U.current=null,P.current.forEach((t=>{t.map=null})),P.current=[],Y.current.forEach((t=>{t?.setMap?.(null)})),Y.current=[],_.current=null,D.current&&(D.current.innerHTML="")}}),[B,st]),(0,a.useEffect)((()=>{const t=_.current;if(!t)return;const e=(n=c.zoomPosition||"RIGHT_BOTTOM",window.google?.maps?.ControlPosition?.[n]??void 0);var n;const o=A(l.minZoom),s=A(l.maxZoom),a=null!==o&&null!==s,u=a?Math.min(o,s):o,d=a?Math.max(o,s):s;try{t.setOptions({center:{lat:A(i.center?.lat,23.8103),lng:A(i.center?.lng,90.4125)},zoom:A(l.zoom,12),minZoom:u??void 0,maxZoom:d??void 0,mapTypeId:l.mapType||"roadmap",gestureHandling:r?"none":l.gestureHandling||"cooperative",draggable:!1!==l.draggable,scrollwheel:!!l.scrollwheel,keyboardShortcuts:!1!==c.keyboardShortcuts,disableDefaultUI:!!c.disableDefaultUI,zoomControl:!!c.zoom,zoomControlOptions:e?{position:e}:void 0,mapTypeControl:!!c.mapType&&!1!==l.allowTypeSwitch,streetViewControl:!!c.streetView,fullscreenControl:!!c.fullscreen,scaleControl:!!c.scale,rotateControl:!!c.rotate,styles:st?void 0:ot})}catch(t){console.warn("[b-blocks] Google Maps rejected a map option:",t?.message||t)}}),[J,it,st,r]),(0,a.useEffect)((()=>{const t=_.current;if(!t||!st||!B?.AdvancedMarkerElement)return;const{AdvancedMarkerElement:e,PinElement:s,InfoWindow:a}=B,i=[],c=[],y=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,g=parseInt(p.desktop?.maxWidth,10)||280,f=[],b=()=>f.forEach((t=>t?.close()));R.current={close:b},u.forEach(((l,u)=>{if(V&&l.category!==V)return;const m=re(l);if(!m)return;let M=((t={},e={},r="desktop",n=[])=>{const{type:o="default",url:s={}}=t.icon||{},a=e?.[r]?.size||e?.desktop?.size||"40px",i=t.pinColor||ne(t,n)?.color||e.pinColor||"#8a2be2";if("library"===o||"upload"===o){const t="library"===o?s.library:s.upload;if(!t)return;const e=document.createElement("div");return e.className="b-blocks-google-map-pin b-blocks-google-map-pin-svg",e.style.width=a,e.style.height=a,e.style.color=i,e.innerHTML=ee(t),e}if("image"===o){const e=t.image?.url;if(!e)return;const r=document.createElement("div");r.className="b-blocks-google-map-pin b-blocks-google-map-pin-image",r.style.width=a,r.style.height=a;const n=document.createElement("img");return n.src=e,n.alt=t.image?.alt||t.title||"",r.append(n),r}})(l,d,n,h);!M&&s&&(M=new s(((t={},e={},r=[])=>{const n=ne(t,r);return{background:t.pinColor||n?.color||e.pinColor||"#8a2be2",borderColor:e.borderColor||"#ffffff",glyphColor:t.glyphColor||e.glyphColor||"#ffffff",scale:A(e.scale,1)??1}})(l,d,h)).element);const w=l.animation||d.animation||"none";M&&"none"!==w&&!y&&M.classList.add(`${v}-anim-${w}`);const k=new e({map:t,position:m,title:l.title||"",content:M||void 0,gmpClickable:!0,gmpDraggable:r&&!1!==l.draggable,zIndex:u+1}),$=p.trigger||"click",x="always"===$,T=a?new a({maxWidth:g}):null;f.push(T);const L=()=>{T&&(x||!1===p.singleOpen||b(),T.setContent(((t={})=>{const e=document.createElement("div");if(e.className="b-blocks-google-map-info",t.image?.url&&"image"!==t.icon?.type){const r=document.createElement("img");r.className="b-blocks-google-map-info-image",r.src=t.image.url,r.alt=t.image.alt||t.title||"",r.loading="lazy",e.append(r)}if(t.title){const r=document.createElement("h4");r.className="b-blocks-google-map-info-title",r.textContent=t.title,e.append(r)}const r=document.createElement("div");if(r.className="b-blocks-google-map-info-body",r.innerHTML=ee(t.content||""),e.append(r),t.address){const r=document.createElement("p");r.className="b-blocks-google-map-info-address",r.textContent=t.address,e.append(r)}return e})(l)),T.open({map:t,anchor:k}))};"hover"===$&&k.content?(k.content.addEventListener("mouseenter",L),k.content.addEventListener("mouseleave",(()=>T?.close()))):"click"===$&&i.push(k.addListener("gmp-click",L)),r&&o&&!1!==l.draggable&&i.push(k.addListener("dragend",(t=>{const e=t?.latLng;e&&o(u,{lat:e.lat(),lng:e.lng()})}))),(x||l.openByDefault)&&L(),c.push(k)})),P.current=c,Z.current=[...Z.current,...i],m.enabled&&c.length&&(U.current=new Yt({map:t,markers:c,onClusterClick:!1===m.clickToZoom?()=>{}:void 0,renderer:{render:({count:t,position:r})=>{const n=document.createElement("div");return n.className=`${v}-cluster`,n.textContent=String(t),new e({position:r,content:n,zIndex:9999})}}}));const M=at("LatLngBounds");if(l.fitBounds&&c.length>1&&M){const e=new M;c.forEach((t=>e.extend(t.position))),t.fitBounds(e)}return()=>{i.forEach((t=>t?.remove?.())),Z.current=Z.current.filter((t=>!i.includes(t))),b(),R.current=null,U.current?.clearMarkers(),U.current=null,c.forEach((t=>{t.map=null})),P.current=[]}}),[J,lt,st,r]),(0,a.useEffect)((()=>{const t=_.current;if(!t)return;const e=at("TrafficLayer"),r=at("TransitLayer"),n=at("BicyclingLayer"),o=at("KmlLayer"),s=[];f.traffic&&e&&s.push(new e),f.transit&&r&&s.push(new r),f.bicycling&&n&&s.push(new n),f.kmlUrl&&o&&s.push(new o({url:f.kmlUrl,preserveViewport:!0})),s.forEach((e=>e.setMap(t)));const a=[],i=(t=>{if(!t||!String(t).trim())return{data:null,error:""};let e;try{e=JSON.parse(t)}catch(t){return{data:null,error:(0,T.__)("This is not valid JSON, so it will be skipped.","b-blocks")}}if(Array.isArray(e)){const t=e.map(E).filter(Boolean);return t.length?{data:{type:"FeatureCollection",features:t},error:""}:{data:null,error:I(e)?(0,T.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks"):(0,T.__)('This array holds no recognisable GeoJSON features. GeoJSON describes places — each entry needs a "geometry" with coordinates.',"b-blocks")}}if(!e||"object"!=typeof e)return{data:null,error:(0,T.__)("GeoJSON must be an object or an array of features.","b-blocks")};if("FeatureCollection"===e.type||"Feature"===e.type)return{data:e,error:""};const r=E(e);return r?{data:r,error:""}:I(e)?{data:null,error:(0,T.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks")}:{data:null,error:e.type?(0,T.sprintf)((0,T.__)('Unrecognised GeoJSON type "%s". Expected a Feature, a FeatureCollection, or a geometry.',"b-blocks"),String(e.type)):(0,T.__)('This GeoJSON has no "type" property.',"b-blocks")}})(f.geoJson);if(i.data&&t.data)try{a.push(...t.data.addGeoJson(i.data))}catch(t){console.warn("[b-blocks] Google rejected this GeoJSON:",t?.message||t)}const l=at("LatLngBounds");if(!1===f.fitGeoJson&&(q.current=""),a.length&&!1!==f.fitGeoJson&&l&&q.current!==f.geoJson){const e=new l;a.forEach((t=>{const r=t?.getGeometry?.();"function"==typeof r?.forEachLatLng&&r.forEachLatLng((t=>e.extend(t)))})),e.isEmpty()||(t.fitBounds(e),q.current=f.geoJson)}return Y.current=s.filter(Boolean),()=>{s.forEach((t=>t.setMap(null))),a.forEach((e=>t.data.remove(e))),Y.current=[]}}),[J,ct,lt,B]),(0,a.useEffect)((()=>{const t=_.current;if(!t||!ut)return;const e=at("OverlayView"),r=at("LatLng");if(!e||!r)return void console.warn("[b-blocks] Heatmap needs google.maps.OverlayView and LatLng; neither the imported library nor the namespace provided them.");const n=new(Qt({OverlayView:e,LatLng:r}))({points:dt,radius:A(f.heatmap?.radius,20),opacity:A(f.heatmap?.opacity,.6)});return n.setMap(t),Q.current=n,()=>{n.setMap(null),Q.current===n&&(Q.current=null)}}),[J,ut,B]),(0,a.useEffect)((()=>{ut&&(dt.length?Q.current?.setOptions({points:dt,radius:A(f.heatmap?.radius,20),opacity:A(f.heatmap?.opacity,.6)}):console.warn(`[b-blocks] Heatmap is on but none of the ${u.length} marker(s) have coordinates, so there is nothing to draw.`))}),[ut,mt,pt]),(0,a.useEffect)((()=>{const t=_.current;if(!t||!b.length)return;const e=at("Circle"),r=at("Rectangle"),n=at("Polygon"),o=at("Polyline");if(!o)return;const s=b.map((t=>{const s={strokeColor:t.strokeColor||"#2A6DF0",strokeOpacity:A(t.strokeOpacity,.9),strokeWeight:A(t.strokeWeight,3)},a={fillColor:t.fillColor||"#2A6DF0",fillOpacity:A(t.fillOpacity,.25)};if("circle"===t.type){const r=re(t.center||{});return r&&e?new e({...s,...a,center:r,radius:A(t.radius,1e3)}):null}if("rectangle"===t.type){const{north:e,south:n,east:o,west:i}=t.bounds||{},l={north:A(e),south:A(n),east:A(o),west:A(i)};return Object.values(l).some((t=>null===t))?null:r?new r({...s,...a,bounds:l}):null}const i=((t="")=>{if(!t||"string"!=typeof t)return[];const e=t.trim();if(!e)return[];if(e.startsWith("["))try{const t=JSON.parse(e);return Array.isArray(t)?t.map((t=>({lat:A(t?.lat??t?.[0]),lng:A(t?.lng??t?.[1])}))).filter((t=>null!==t.lat&&null!==t.lng)):[]}catch(t){return[]}return e.split(/[\n;|]+/).map((t=>{const[e,r]=t.split(",").map((t=>A(t)));return{lat:e,lng:r}})).filter((t=>null!==t.lat&&null!==t.lng))})(t.path);return i.length<2?null:"polygon"===t.type&&n?new n({...s,...a,paths:i}):new o({...s,path:i})})).filter(Boolean);return s.forEach((e=>e.setMap(t))),()=>s.forEach((t=>t.setMap(null)))}),[J,ht,B]),(0,a.useEffect)((()=>{const t=_.current;if(!(t&&M.enabled&&B?.DirectionsService&&B?.DirectionsRenderer))return;const e=M.origin?.address||re(M.origin||{}),r=M.destination?.address||re(M.destination||{});if(!e||!r)return;const n=new B.DirectionsRenderer({map:t,panel:M.showPanel&&z.current?z.current:null,polylineOptions:{strokeColor:M.routeColor||"#2A6DF0",strokeWeight:5}});let o=!1;return(new B.DirectionsService).route({origin:e,destination:r,travelMode:M.mode||"DRIVING",waypoints:(M.waypoints||[]).map((t=>t?.address||re(t||{}))).filter(Boolean).map((t=>({location:t,stopover:!0})))}).then((t=>{o||n.setDirections(t)})).catch((()=>{})),()=>{o=!0,n.setMap(null),z.current&&(z.current.innerHTML="")}}),[J,yt,B]),(0,a.useEffect)((()=>{const t=_.current;if(!(t&&w.searchBox&&B?.PlaceAutocompleteElement&&C.current))return;let e;try{e=new B.PlaceAutocompleteElement}catch(t){return}e.className=`${v}-search-input`,C.current.append(e);const r=async({placePrediction:e})=>{try{const r=e.toPlace();await r.fetchFields({fields:["location","formattedAddress"]}),r.location&&(t.setCenter(r.location),t.setZoom(Math.max(A(l.zoom,12),14)))}catch(t){}};return e.addEventListener("gmp-select",r),()=>{e.removeEventListener("gmp-select",r),e.remove()}}),[J,w.searchBox,B]),x)return(0,O.jsx)("div",{className:`${v}-container`,ref:N,children:(0,O.jsxs)("figure",{className:`${v}-figure`,children:[(0,O.jsx)(ae,{embedUrl:i.embedUrl,captionText:j}),j?(0,O.jsx)("figcaption",{className:`${v}-caption`,children:j}):null]})});const gt=i.center?.address||u[0]?.address||j,ft=rt||"onClick"!==et?"auth"===G?(0,O.jsx)(oe,{address:gt,status:"warning",message:r?(0,T.__)("Google rejected this API key. Check that billing is enabled on the Google Cloud project, that the Maps JavaScript API is turned on, and that the key’s HTTP referrer restriction allows this site.","b-blocks"):(0,T.__)("This map is temporarily unavailable.","b-blocks")}):"missing-key"===G?(0,O.jsx)(oe,{address:gt,status:"warning",message:(0,T.__)("A Google Maps API key is required to show this map.","b-blocks")}):G?(0,O.jsx)(oe,{address:gt,status:"warning",message:(0,T.__)("The Google Maps API could not be loaded.","b-blocks")}):null:(0,O.jsx)(oe,{address:gt,status:"idle",message:(0,T.__)("Map ready to load.","b-blocks"),onActivate:()=>nt(!0),actionLabel:(0,T.__)("Load map","b-blocks")});return(0,O.jsx)("div",{className:`${v}-container`,ref:N,children:(0,O.jsxs)("figure",{className:`${v}-figure`,children:[!ft&&y.show&&h.length?(0,O.jsx)(se,{categories:h,filterBar:y,active:V,onChange:X}):null,ft||!w.searchBox&&!w.geolocation?null:(0,O.jsxs)("div",{className:`${v}-tools`,children:[w.searchBox?(0,O.jsx)("div",{className:`${v}-search`,ref:C}):null,w.geolocation?(0,O.jsx)("button",{type:"button",className:`${v}-locate`,onClick:()=>{const t=_.current;t&&navigator.geolocation&&(tt(!0),navigator.geolocation.getCurrentPosition((({coords:e})=>{tt(!1);const r={lat:e.latitude,lng:e.longitude};t.panTo(r),t.setZoom(14);const n=A(w.nearbyRadius,0),o=at("Circle");if(n>0&&o){const e=new o({map:t,center:r,radius:n,strokeColor:"#2A6DF0",strokeOpacity:.6,fillColor:"#2A6DF0",fillOpacity:.12});Y.current.push(e)}}),(()=>tt(!1)),{enableHighAccuracy:!0,timeout:1e4}))},disabled:K,children:K?(0,T.__)("Locating…","b-blocks"):(0,T.__)("Find my location","b-blocks")}):null]}),(0,O.jsx)("div",{className:`${v}-wrapper`,children:ft||(0,O.jsx)("div",{className:`${v}-canvas`,ref:D,role:"region","aria-label":j?(0,T.sprintf)((0,T.__)("Interactive map of %s","b-blocks"),j):(0,T.__)("Interactive Google Map","b-blocks")})}),!ft&&M.enabled&&M.showPanel?(0,O.jsx)("div",{className:`${v}-directions-panel`,ref:z}):null,j?(0,O.jsx)("figcaption",{className:`${v}-caption`,children:j}):null]})})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-google-map[data-attributes]").forEach((e=>{let r={};try{const t=e.dataset.attributes;t&&"undefined"!==t&&""!==t&&(r=JSON.parse(t))}catch(t){r={}}const n=e.dataset.mapkey||"";(0,t.createRoot)(e).render((0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(z,{attributes:r,id:e.id}),(0,O.jsx)(ie,{attributes:r,apiKey:n})]})),e.removeAttribute("data-attributes"),e.removeAttribute("data-mapkey")}))}))})();
1 +(()=>{"use strict";const t=window.ReactDOM,e=t=>!(null==t||""===t||Array.isArray(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length||"string"==typeof t&&""===t.trim()||"number"==typeof t&&0===t),r=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}},n="@media only screen and (min-width: 1025px)",o="@media only screen and (max-width: 1024px)",s="@media only screen and (max-width: 640px)",a="linear-gradient(135deg, #0040E3, #18D4FD)",i=window.React,l=t=>{const e=r(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},c=(t,r)=>e(r)?`${t}: ${r};`:"",u=(t,e=!0,r=!0,n=!0)=>{const{type:o="solid",color:s="",gradient:i=a,image:u={},position:p="center center",attachment:d="",repeat:m="no-repeat",size:h="",overlayColor:y=""}=t||{};return"gradient"===o&&r?c("background",i):"image"===o&&n?`background: ${l(u?.url)};\n\t\t\t\t${c("background-color",y)}\n\t\t\t\t${c("background-position",p)}\n\t\t\t\t${c("background-size",h)}\n\t\t\t\t${c("background-repeat",m)}\n\t\t\t\t${c("background-attachment",d)}\n\t\t\t\t${c("background-repeat",m)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&c("background",s)},p=t=>{const{width:e="",style:r="solid",color:n="",side:o="all",radius:s=""}=t||{},a=t=>{const e=o?.toLowerCase();return e?.includes("all")||e?.includes(t)},i=`${e} ${r} ${n}`,l=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>a(t)?`border-${t}: ${i};`:"")).join(""):""}\n\t\t${c("border-radius",s)}\n\t`;return l},d=(t,e="box")=>{let r="";return t?.map(((n,o)=>{const{hOffset:s="0px",vOffset:a="0px",blur:i="0px",spreed:l="0px",color:c="#e7f0fe",isInset:u=!1}=n||{},p=u?"inset":"",d=`${s} ${a} ${i}`,m=o+1>=t.length?"":", ";r+="text"===e?`${d} ${c}${m}`:`${d} ${l} ${c} ${p}${m}`})),r||""},m=(t,e,r=!0)=>{const{fontFamily:n="Default",fontCategory:a="sans-serif",fontVariant:i=400,fontWeight:l,isUploadFont:u=!0,fontSize:p={desktop:null,tablet:null,mobile:null},fontStyle:d,textTransform:m,textDecoration:h,lineHeight:y,letterSpace:g}=e||{},f=!r||!n||"Default"===n,b=p?.desktop||p,$=p?.tablet||b,M=p?.mobile||$,w=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},k=`\n\t\t${f?"":`font-family: '${n}', ${a};`}\n\t\t${c("font-weight",l)}\n\t\t${c("font-size",w(b))}\n\t\t${c("font-style",d)}\n\t\t${c("text-transform",m)}\n\t\t${c("text-decoration",h)}\n\t\t${c("line-height",y)}\n\t\t${c("letter-spacing",g)}\n\t`,x=i&&400!==i?"400i"===i?":ital@1":i?.includes("00i")?`: ital, wght@1, ${i?.replace("00i","00")} `:`: wght@${i} `:"",v=f?"":`https://fonts.googleapis.com/css2?family=${n?.split(" ").join("+")}${x.replace(/ /g,"")}&display=swap`;return{googleFontLink:!u||f?"":`@import url(${v});`,styles:`${t}{\n\t\t\t${k}\n\t\t}\n\t\t${o} {\n\t\t\t${t}{\n\t\t\t\t${c("font-size",w($))}\n\t\t\t}\n\t\t}\n\t\t${s} {\n\t\t\t${t}{\n\t\t\t\t${c("font-size",w(M))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},h=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const e=["top","right","bottom","left"];return e.map((e=>t[e]||"")).every((t=>!t))?"":e.map((e=>t[e]||"0")).join(" ")}return""},y=t=>{const{position:r="center center",xPosition:n=0,yPosition:o=0,attachment:s="",repeat:a="no-repeat",size:i="cover",customSize:l="0px"}=t||{},c=t=>"initial"!==t||e(t);return`\n\t\t${c(r)?`background-position: ${"custom"===r?`${n} ${o}`:r};`:""}\n\t\t${s&&c(s)?`background-attachment: ${s};`:""}\n\t\t${c(a)?`background-repeat: ${a};`:""}\n\t\t${c(i)?`background-size: ${"custom"===i?`${l} auto`:i};`:""}\n\t`},g=(t={})=>t?{desktop:e(t.url)?`background-image: ${l(t.url)}; ${y(t?.desktop)}`:"",tablet:e(t.url)?y(t?.tablet):"",mobile:e(t.url)?y(t?.mobile):""}:"",f=(t,n,a=!1)=>{const{type:i="color",color:l,gradient:u,img:p,video:d}=t||{},m="color"===i?c("background",l):"gradient"===i?(t=>{const{type:r="linear",radialType:n="ellipse",colors:o=[],centerPositions:s={x:0,y:0},angel:a=0}=t||{};if(e(t)){const t=o?.map((({color:t,position:e})=>`${t} ${e}%`)),e=`linear-gradient(${a}deg, ${t})`;return c("background","radial"===r?`radial-gradient(${n} at ${s?.x}% ${s?.y}%,${t})`:e)}return""})(u):"image"===i?g(p).desktop:"",h="image"===i?g(p).tablet:"",y="image"===i?g(p).mobile:"",f=a?`${n}:hover`:n;return`\n\t\t${"video"===i?((t,e)=>{const{url:n,loop:o}=t||{},s=document.querySelector(e),a=s?.querySelector(".bPlVideo"),i=document.createElement("video");if(i.muted=!0,i.autoplay=!0,i.classList.add("bPlVideo"),!a&&s&&n){const t=r(n);if(t){const e=document.createElement("source");e.src=t,i.appendChild(e),s.appendChild(i)}}return i.loop=o,i.play(),`${e} .bPlVideo{\n\t\tleft: 0;\n\t\tmin-height: 100%;\n\t\tmin-width: 100%;\n\t\tposition: absolute;\n\t\twidth: -webkit-fill-available;\n\t\ttop: 0;\n\t\tz-index: 0;\n\t}`})(d,n):""}\n\n\t\t${m?`${f}{\n\t\t\t${m}\n\t\t}`:""}\n\n\t\t${h?`${o} {\n\t\t\t${f}{\n\t\t\t\t${h}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${y?`${s} {\n\t\t\t${f}{\n\t\t\t\t${y}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},b=(t,r,n=!1)=>{const{isEnabled:o,colors:s,opacity:a=1,blend:i,filter:l="",blur:u=0,brightness:p=100,contrast:d=100,saturation:m=100,hue:h=0,position:y={top:0,right:0,bottom:0,left:0},zIndex:g=-1}=t||{},b=`${100!==p?`brightness(${p}%)`:""} ${100!==d?`contrast(${d}%)`:""} ${100!==m?`saturate(${m}%)`:""} ${0!==u?`blur(${u}px)`:""} ${0!==h?`hue-rotate(${h}deg)`:""}`,$=`${l}: ${l?b:""}; -webkit-${l}: ${l?b:""};`,M=n?`${r}:hover::after`:`${r}::after`;return o?`\n\t\t${r}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${r}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${e(y.top)?y.top:0};\n\t\t\tright:${e(y.right)?y.right:0};\n\t\t\tbottom:${e(y.bottom)?y.bottom:0};\n\t\t\tleft:${e(y.left)?y.left:0};\n\t\t\tz-index:${g};\n\t\t}\n\t\t${f(s,M,!1)}\n\t\t${M}{\n\t\t\t${c("opacity",a)}\n\t\t\t${c("mix-blend-mode",i)}\n\t\t\t${$}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},$=(t,r,n=!1)=>{const a=(t,r="desktop")=>{if(!e(t))return"";const{skew:n,scale:o,rotate:s,offset:a,flipX:i,flipY:l}=t,{threeDRotate:u}=s||{},{isProportion:p}=o||{},d=[];return e(n)&&(e(n?.[r]?.x)&&d.push(`skewX(${n[r].x}deg)`),e(n?.[r]?.y)&&d.push(`skewY(${n[r].y}deg)`)),p?e(o?.[r]?.scale)&&d.push(`scale(${o[r].scale})`):(e(o?.[r]?.x)&&d.push(`scaleX(${o[r].x})`),e(o?.[r]?.y)&&d.push(`scaleY(${o[r].y})`)),e(s)&&(e(s?.[r]?.z)&&d.push(`rotateZ(${s[r].z}deg)`),u&&(e(s?.[r]?.x)&&d.push(`rotateX(${s[r].x}deg)`),e(s?.[r]?.y)&&d.push(`rotateY(${s[r].y}deg)`))),e(a)&&(e(a?.[r]?.x)&&d.push(`translateX(${a[r].x})`),e(a?.[r]?.y)&&d.push(`translateY(${a[r].y})`)),e(i)&&d.push(i?"scaleX(-1)":""),e(l)&&d.push(l?"scaleY(-1)":""),0===d.length?"":c("transform",d.join(" "))},i=n?`${r}:hover`:r;return`\n\t\t${i} {\n\t\t\t${a(t,"desktop")}\n\t\t}\n\t\t${o}{\n\t\t\t${i} {\n\t\t\t\t${a(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${s}{\n\t\t\t${i} {\n\t\t\t\t${a(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},M=t=>{const{padding:e,margin:r,height:n,width:o}=t||{},s=(t,e)=>c(t,e),a=(t,e,r)=>s(t,e?.[t]?.[r])+s(`min-${t}`,e?.min?.[r])+s(`max-${t}`,e?.max?.[r]),i=t=>c("padding",h(t)),l=t=>c("margin",h(t));return{desktop:i(e?.desktop)+l(r?.desktop)+a("height",n,"desktop")+a("width",o,"desktop"),tablet:i(e?.tablet)+l(r?.tablet)+a("height",n,"tablet")+a("width",o,"tablet"),mobile:i(e?.mobile)+l(r?.mobile)+a("height",n,"mobile")+a("width",o,"mobile")}},w=t=>{const{normal:e,hover:r}=t||{},n=t=>{const{border:e,radius:r,shadow:n}=t||{},o=c("border-radius",h(r)),s=c("box-shadow",d(n,"box"));return(t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:r="solid",width:n="0px"}=t;return`${n} ${r} ${e}`};return"object"!=typeof t||Array.isArray(t)?"":t.hasOwnProperty("top")||t.hasOwnProperty("right")||t.hasOwnProperty("bottom")||t.hasOwnProperty("left")?["top","right","bottom","left"].map((r=>t[r]?`border-${r}: ${e(t[r])};`:"")).join(" ").trim():c("border",e(t))})(e)+o+s};return{normal:n(e),hover:n(r)}},k=t=>{const{zIndex:r,overflow:n}=t||{},o=n?`overflow: ${n};`:"",s=t=>`${c("z-index",r?.[t])} ${c("position",e(r?.[t])?"relative":"")}`;return{desktop:s("desktop")+o,tablet:s("tablet"),mobile:s("mobile")}},x=(t,e)=>{const{desktop:r=!1,tablet:n=!1,mobile:o=!1}=t||{},s=e?"opacity: 0.5;":"display: none;",a=t=>t?s:"";return{desktop:a(r),tablet:a(n),mobile:a(o)}},v=(t,r,a=!1,i=!0)=>{const{dimension:u,transform:p,background:d,borderShadow:m,mask:h,animation:y,visibility:g,responsive:v,position:T={},floating:j={},motion:L={},css:N=""}=r||{},E=a?`#${t}>div>div${i?":first-child":""}`:`#${t}>div`;((t,e,r)=>{const n=r?`#${e} > div`:`#${e}`,o=document.querySelector(n);o&&t&&t.type&&(o.setAttribute("data-aos",t.type),o.setAttribute("data-aos-duration",1e3*t.duration||.4),o.setAttribute("data-aos-delay",1e3*t.delay||0),o.classList.contains("aos-init")||(o.classList.add("aos-init"),window?.AOS?.init()),r)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?o.classList.add("aos-animate"):o.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(o)})(y,t,a);const D=M(u).desktop+k(g).desktop+((t,e,r)=>{const{transition:n=.4}=t||{},{transition:o=.4}=e||{},{transition:s=200}=r||{};return`transition: background ${n}s, border ${o}s, border-radius ${o}s, box-shadow ${o}s, transform ${s}ms ease-in-out;`})(d,m,p)+(t=>{const{isMask:e=!1,shape:r={type:"circle"},size:n={type:"contain",scale:"100%"},position:o={type:"center center",x:50,y:50},repeat:s="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===r.type?l(r.url):`url(${(a=r.type,[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48Y2lyY2xlIGN4PSI0NC41IiBjeT0iNDQuNSIgcj0iNDQuNSIvPjwvc3ZnPg==",type:"circle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48cGF0aCBkPSJNNzYuMTMzMiw0NC40NzUybDYuMzI4OS02LjMyODVBMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDUwLjg1LDYuNTQ3NEw0NC41MzIsMTIuODY1MSwzOC4xNiw2LjU0NzRhMjIuMzUyNCwyMi4zNTI0LDAsMSwwLTMxLjYxMiwzMS42MWw2LjMxODEsNi4zMTc3TDYuNTQ3OCw1MC44NDdhMjIuMzUyNCwyMi4zNTI0LDAsMCwwLDMxLjYxMiwzMS42MWw2LjMxODEtNi4zMTc3TDUwLjg1LDgyLjM5MjJhMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDMxLjYxMi0zMS41OTkzWiIvPjwvc3ZnPg==",type:"flower"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MS4xMTQzIiBoZWlnaHQ9Ijg4Ljk5OTkiIHZpZXdCb3g9IjAgMCA5MS4xMTQzIDg4Ljk5OTkiPjxwYXRoIGQ9Ik04Mi4xNzQ5LDM3LjUyNjZsMS42MTE5LTEuNjExOWMuOTQ4Ni0uOTQ4Ny02LjM3LTUuOTMwOS03LjA0OTItNi4zNzgyYTQ1LjE1MTYsNDUuMTUxNiwwLDAsMC01Ljc3NjYtMy4zMjQxYy0uMjQ2OC0uMTE1Ny0uNjAxNi0uMzAwOC0uOTg3Mi0uNDc4MnExLjc4MTYtMS44OTcyLDMuNTg2My0zLjc3MTNjLjk0ODYtLjk4LTYuMzYyOC01LjkyMzItNy4wNDkyLTYuMzcwNUE0NC4xNTc5LDQ0LjE1NzksMCwwLDAsNjAuNzUsMTIuMjYwNmwtLjI5My0uMTQ2NSwxLjM5NTktMS41NDI1Yy45NDA5LTEuMDQ4OS02LjMzMTktNS45LTcuMDQ5Mi02LjM3QTQ0LjIxMiw0NC4yMTIsMCwwLDAsNDkuMDQyMi44NjE2Yy0uNTQtLjI0NjctMi4zMTM3LTEuMjY0OC0yLjg0NTgtLjY4NjRRMzIuNzM4MSwxNS4xNjgyLDE4LjExNTQsMjkuMDY2Yy03Ljg0MzYsNy40NS0xNi41NjYzLDE1LjU3OTEtMTguMTA4OCwyNi44Ny0uMTE1Ny44MjUzLDEuMzI2NSwxLjk3NDQsMS43NDMsMi4zMTM4YTQwLjc5OSw0MC43OTksMCwwLDAsNS4zMTM5LDQuMDU2Nyw0NC4yMTc0LDQ0LjIxNzQsMCwwLDAsNS43NjExLDMuMzRjLjY0LjI5MzEsMi4xNzUsMS4yMDMxLDIuODQ1OS42ODY0bDIuMDc0Ny0xLjU1NzljMS40NSwxLjg1ODcsNS45Njk0LDQuNzIsNi42NzEyLDUuMTc1bDEuNDg4NS45NTY0QzI0LjQwMSw3Mi43NjQ3LDIyLjkyLDc0LjYzMTEsMjEuNDcsNzYuNTI4M2MtLjkxLDEuMTg3OCw2LjI2MjUsNS44NjE1LDcuMDQ5Miw2LjM3YTQ0LjE2MzMsNDQuMTYzMywwLDAsMCw1Ljc2MTEsMy4zMzE4Yy42MDE2LjI3NzYsMi4yMjg5LDEuMjM0LDIuODQ1OS42OTQxbDkuMjU1LTguMDk4Yy44MjUyLDIuNTY4MiwxNC41Njg3LDExLjYzLDE1LjY3MTYsOS45NzIxTDkxLjA2LDQ1LjM2MjRDOTEuNjkyLDQ0LjQxMzgsODYuNzI1Miw0MC4zMjYyLDgyLjE3NDksMzcuNTI2NloiLz48L3N2Zz4=",type:"sketch"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwb2x5Z29uIHBvaW50cz0iNzcuMjU1IDQ0LjUwNSA1MS41IDAgMjUuNzU1IDQ0LjUwNSAwIDg5IDUxLjUgODkgMTAzIDg5IDc3LjI1NSA0NC41MDUiLz48L3N2Zz4=",type:"triangle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjEuMDAwMiIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDEyMS4wMDAyIDg5Ij48cGF0aCBkPSJNMTAwLjAxNiw3LjM5NzJDOTAuMjQ1MiwxLjIyLDczLjMwODQtMy42NjYzLDY0LjQyNTUsMy43MTI2LDU2Ljk4MzYsOS44OSw2Mi4wNDY5LDE4LjkxNzQsNTUuMDEsMjUuMzAzMmMtMTAuNiw5LjYxMzQtMjguMTU4OS01LjQ0MjMtNDEuODU4NCwyLjYzMThDLjY3NTcsMzUuMjU0My00LjI3OTEsNTkuMTQ4OSw0LjI3ODEsNzMuNzk3NWMxMy4xMzY5LDIyLjUyNCw1My4xMywxMy44NTQxLDYxLjE5MzYsMTIuMTA2MSw0LjUwMDctLjk5MzEsNTMuNDk1My0xMi4yNjUsNTUuNDY5My00Mi43MDQzQzEyMS44OTgsMjguMjUyOCwxMTEuMSwxNC40MTg1LDEwMC4wMTYsNy4zOTcyWiIvPjwvc3ZnPg==",type:"blob"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwYXRoIGQ9Ik03Ny4yMTE0LDBIMjUuNzUyM0wwLDQ0LjUwNDUsMjUuNzUyMyw4OUg3Ny4yMTE0TDEwMyw0NC41MDQ1Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}].find((t=>t.type===a))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===n.type?n.scale:n.type};\n\t\t${"custom"===o.type?`${c("-webkit-mask-position-x",o.x)}\n\t\t\t${c("-webkit-mask-position-y",o.y)}`:`${c("-webkit-mask-position",o.type)}`}\n\t\t${"cover"!==n.type?`-webkit-mask-repeat: ${s};`:""}`:"";var a})(h),A=M(u).tablet+k(g).tablet+x(v,a).tablet,I=M(u).mobile+k(g).mobile+x(v,a).mobile,C=w(m).normal,S=w(m).hover,O=x(v,a).desktop;return`\n\t\t${D||C?`${E} {\n\t\t\t${D}\n\t\t\t${C}\n\t\t}`:""}\n\t\t${S?`${E}:hover {\n\t\t\t${S}\n\t\t}`:""}\n\n\t\t${O?`${n} {\n\t\t\t${E}{\n\t\t\t\t${O}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${A?`${o} {\n\t\t\t${E}{\n\t\t\t\t${A}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${I?`${s} {\n\t\t\t${E}{\n\t\t\t\t${I}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${f(d?.normal,E)}\n\t\t${f(d?.hover,E,!0)}\n\t\t${b(d?.overlay,E)}\n\t\t${b(d?.hoverOverlay,E,!0)}\n\t\t${e(p?.normal)?$(p?.normal,E):""}\n\t\t${e(p?.hover)?$(p?.hover,E,!0):""}\n\t\t${((t,e)=>{const{desktop:r={},tablet:n={},mobile:a={}}=t,i=(t={})=>`\n\t\t${e}{\n\t\t\t${c("position",t?.type)}\n\t\t\t${c("left",t?.horizontal?.left)}\n\t\t\t${c("right",t?.horizontal?.right)}\n\t\t\t${c("top",t?.vertical?.top)}\n\t\t\t${c("bottom",t?.vertical?.bottom)}\n\t\t}\n\t`;return`\n\t\t\n\t\t${r?.type?i(r):""}\n\t\t\n\t\t${o}{\n\t\t\t${n?.type?i(n):""}\n\t\t}\n\n\t\t${s}{\n\t\t\t${a?.type?i(a):""}\n\t\t}\n\t`})(T,E)}\n\t\t${((t,r,n="")=>{const{translate:o={},rotate:s={},scale:a={},isEnabled:i=!1}=t||{};if(!i)return"";const l=[],c=[];return[{name:"Translate",property:"translate",values:o,value:t=>["x","y"].some((r=>e(o?.[r]?.[t])))?`${o?.x?.[t]||0}px ${o?.y?.[t]||0}px`:""},{name:"Rotate",property:"transform",values:s,value:t=>["x","y","z"].filter((r=>e(s?.[r]?.[t]))).map((e=>`rotate${e.toUpperCase()}(${s[e][t]}deg)`)).join(" ")},{name:"Scale",property:"scale",values:a,value:t=>{const r=a?.y?.[t],n=a?.z?.[t];return e(r)||e(n)?e(n)?`1 ${e(r)?r:1} ${n}`:`1 ${r}`:""}}].forEach((({name:t,property:e,values:r,value:o})=>{const s=o("from"),a=o("to");if(!s||!a)return;const i=Number(r?.duration)>0?Number(r.duration):1e3,u=Number(r?.delay)>0?Number(r.delay):0,p=`advFloat${t}${n?`-${n}`:""}`;l.push(`@keyframes ${p}{ from{ ${e}: ${s}; } to{ ${e}: ${a}; } }`),c.push(`${p} ${i}ms ease-in-out ${u}ms infinite alternate`)})),c.length?`\n\t\t${l.join(" ")}\n\t\t${r}{\n\t\t\tanimation: ${c.join(", ")};\n\t\t}\n\t`:""})(j,E,t)}\n\t\t${((t,r,a)=>{const{isEnable:i=!1,vertical:l={},horizontal:c={},transparency:u={},blur:p={},rotate:d={},scale:m={},effectsRelativeTo:h="viewport",effectOn:y=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:g=!1,mouseTrack:f={},tilt:b={},sticky:$={}}=t||{},M=(t,r)=>e(t)&&!isNaN(t)?Number(t):r,w="viewport"===h,k=w?"view()":"scroll(nearest block)",x=[],v=[],T=[],j=[],L=String(a??"").replace(/[^a-zA-Z0-9]/g,""),N=(t,e,r)=>{x.push(`@keyframes advMe${t}${L}{ ${e} }`),v.push(`advMe${t}${L}`),T.push(k),j.push((t=>{const e=M(t?.top,0),r=M(t?.bottom,100),n=Math.min(e,r),o=Math.max(e,r);return w?`cover ${n}% ${o>=90?"contain 100%":`cover ${o}%`}`:`min(${3*n}vh, ${n}%) min(${3*o}vh, ${o}%)`})(r))};if(i){const t=l?.direction,e=c?.direction,r=t?100*M(l?.speed,4):0,n=e?100*M(c?.speed,4):0;if(r||n){const o="up"===t?-r:r,s="to-left"===e?-n:n,a=[r&&l,n&&c].filter(Boolean);N("Translate",`from{ translate: 0px 0px; } to{ translate: ${s}px ${o}px; }`,{top:Math.min(...a.map((t=>M(t?.top,0)))),bottom:Math.max(...a.map((t=>M(t?.bottom,100))))})}const o=u?.direction;if(o){const t=Math.max(0,1-M(u?.level,5)/10),e={"fade-in":`from{ opacity: ${t}; } to{ opacity: 1; }`,"fade-out":`from{ opacity: 1; } to{ opacity: ${t}; }`,"fade-out-in":`0%{ opacity: 1; } 50%{ opacity: ${t}; } 100%{ opacity: 1; }`,"fade-in-out":`0%{ opacity: ${t}; } 50%{ opacity: 1; } 100%{ opacity: ${t}; }`}[o];e&&N("Opacity",e,u)}const s=p?.direction;if(s){const t=3*M(p?.level,4),e={"fade-in":`from{ filter: blur(${t}px); } to{ filter: blur(0px); }`,"fade-out":`from{ filter: blur(0px); } to{ filter: blur(${t}px); }`,"fade-out-in":`0%{ filter: blur(0px); } 50%{ filter: blur(${t}px); } 100%{ filter: blur(0px); }`,"fade-in-out":`0%{ filter: blur(${t}px); } 50%{ filter: blur(0px); } 100%{ filter: blur(${t}px); }`}[s];e&&N("Blur",e,p)}const a=d?.direction;if(a){const t=20*M(d?.level,4);N("Rotate",`from{ rotate: 0deg; } to{ rotate: ${"to-left"===a?-t:t}deg; }`,d)}if(m?.direction){const t=.15*M(m?.level,4),e=Math.max(0,1-t),r=1+t,n={"scale-up":`from{ scale: 1; } to{ scale: ${r}; }`,"scale-down":`from{ scale: 1; } to{ scale: ${e}; }`,"scale-down-up":`0%{ scale: 1; } 50%{ scale: ${e}; } 100%{ scale: 1; }`,"scale-up-down":`0%{ scale: 1; } 50%{ scale: ${r}; } 100%{ scale: 1; }`}[m.direction];n&&N("Scale",n,m)}}const E=[];if(g){if(f?.direction){const t="direct"===f?.direction?100:-100;E.push(((e,r)=>`translate(${(e*t).toFixed(2)}px, ${(r*t).toFixed(2)}px)`))}if(b?.direction){const t=12*("direct"===b?.direction?1:-1);E.push(((e,r)=>`perspective(1000px) rotateX(${(r*-t).toFixed(2)}deg) rotateY(${(e*t).toFixed(2)}deg)`))}}const D=(t,e,n)=>{if(!t||!t.defaultView)return;const o=t.defaultView,s=t.bPlMouse||(t.bPlMouse={x:0,y:0,items:new Map,frame:0,last:0}),a=s.items.get(r)||{x:0,y:0};if(a.rate=e,a.build=n,s.items.set(r,a),s.bound)return;s.bound=!0;const i=e=>{const r=s.last?Math.min(e-s.last,100):16.7;s.last=e;let n=!1;s.items.forEach(((e,o)=>{const a=e.el&&e.el.isConnected?e.el:t.querySelector(o);if(!a)return;e.el=a;const i=e.rate*r/1e3,l=s.x-e.x,c=s.y-e.y,u=Math.sqrt(l*l+c*c);u<=i?(e.x=s.x,e.y=s.y):(e.x+=l/u*i,e.y+=c/u*i,n=!0),a.style.transform=e.build(e.x,e.y)})),s.frame=n?o.requestAnimationFrame(i):0,s.last=n?e:0};t.addEventListener("pointermove",(t=>{s.x=2*(t.clientX/o.innerWidth-.5),s.y=2*(t.clientY/o.innerHeight-.5),s.frame||(s.frame=o.requestAnimationFrame(i))}))};if(E.length&&"undefined"!=typeof document){const t=Math.max(.25,1.5*M(f?.speed,M(b?.speed,4))),e=(t,e)=>E.map((r=>r(t,e))).join(" ");D(document,t,e),D(document.querySelector('iframe[name="editor-canvas"]')?.contentDocument,t,e)}const A=t=>$?.[t]||("desktop"===t?$?.undefined:""),I=r.split(">")[0],C=t=>{const e=A(t);return e?`position: sticky; ${e}: 0; z-index: 9;`:(t=>"tablet"===t?A("desktop"):"mobile"===t?A("tablet")||A("desktop"):"")(t)?"position: static;":""},S=Array.isArray(y)?y:e(y)?[y]:[],O=t=>!S.length||S.includes(t)?"":`${r}{ animation-name: none; }`;return`\n\t\t${v.length?`\n\t\t${x.join(" ")}\n\t\t@supports (animation-timeline: scroll()){\n\t\t\t${r}{\n\t\t\t\tanimation-name: ${v.join(", ")};\n\t\t\t\tanimation-duration: ${v.map((()=>"auto")).join(", ")};\n\t\t\t\tanimation-timing-function: ${v.map((()=>"linear")).join(", ")};\n\t\t\t\tanimation-fill-mode: ${v.map((()=>"both")).join(", ")};\n\t\t\t\tanimation-direction: ${v.map((()=>w?"normal":"reverse")).join(", ")};\n\t\t\t\tanimation-timeline: ${T.join(", ")};\n\t\t\t\tanimation-range: ${j.join(", ")};\n\t\t\t}\n\t\t\t${O("desktop")?`${n}{ ${O("desktop")} }`:""}\n\t\t\t${O("tablet-portrait")?`@media only screen and (min-width: 641px) and (max-width: 1024px){ ${O("tablet-portrait")} }`:""}\n\t\t\t${O("mobile-portrait")?`${s}{ ${O("mobile-portrait")} }`:""}\n\t\t}\n\t`:""}\n\t\t${E.length?`${r}{ transition-property: background, border, border-radius, box-shadow; }`:""}\n\t\t${C("desktop")?`${I}{ ${C("desktop")} }`:""}\n\t\t${C("tablet")?`${o}{ ${I}{ ${C("tablet")} } }`:""}\n\t\t${C("mobile")?`${s}{ ${I}{ ${C("mobile")} } }`:""}\n\t`})(L,E,t)}\n\t\t${N}\n\t`.replace(/\s+/g," ")},T=window.wp.i18n,j="b-blocks-google-map",L={lat:23.8103,lng:90.4125},N=((0,T.__)("16:9 (Widescreen)","b-blocks"),(0,T.__)("4:3 (Standard)","b-blocks"),(0,T.__)("1:1 (Square)","b-blocks"),(0,T.__)("3:4 (Portrait)","b-blocks"),(0,T.__)("Left","b-blocks"),(0,T.__)("Center","b-blocks"),(0,T.__)("Right","b-blocks"),/^(www\.|maps\.)?google\.(com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2,3})$/i),E=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","GeometryCollection"],D=t=>t&&"Feature"===t.type?t:t&&E.includes(t.type)?{type:"Feature",geometry:t,properties:{}}:null,A=t=>!(!t||"object"!=typeof t||Array.isArray(t)||void 0===t.stylers&&void 0===t.featureType&&void 0===t.elementType),I=t=>Array.isArray(t)?t.length>0&&t.every(A):A(t),C=(t,e=null)=>{const r=parseFloat(t);return Number.isFinite(r)?r:e},S=(t,e,r)=>{if(!t)return;const n=e=>{const n=t?.[e]?.[r];if(void 0!==n&&""!==n)return n;const o=t?.[r]?.[e];return void 0!==o&&""!==o?o:void 0};return"mobile"===e?n("mobile")??n("tablet")??n("desktop"):"tablet"===e?n("tablet")??n("desktop"):n("desktop")},O={default:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]},z=window.ReactJSXRuntime,_=({attributes:t,id:e,isBackend:r=!1})=>{const{map:n={},marker:a={},infoWindow:i={},clustering:l={},categories:y=[],filterBar:g={},caption:f={},advanced:b}=t,$=`#${e}`,M=`${$} .${j}-wrapper`,w=`${$} .${j}-canvas`,k=`${$} .${j}-iframe`,x=`${$} .${j}-caption`,T=`${$} .${j}-pin`,L=`${$} .${j}-cluster`,N=`${$} .${j}-filter-chip`,E=`${$} .${j}-filter-bar`,D=`${$} .gm-style-iw-c`,A=`${$} .gm-style-iw-d`,I=`${$} .${j}-figure, ${$} .${j}-placeholder`,C=(y||[]).filter((t=>t?.id&&t?.color)).map((t=>{const e=String(t.id).replace(/["'\\\]]/g,"");return`\n\t\t\t\t${N}[data-category="${e}"] .${j}-filter-dot{ background: ${t.color}; }\n\t\t\t\t${N}[data-category="${e}"].active{ background: ${t.color}; }\n\t\t\t`})).join(""),O=t=>{return`\n\t\t${$}{ ${c("text-align",S(n,t,"align"))} }\n\n\t\t${I}{\n\t\t\tmargin: ${e=S(n,t,"align"),"left"===e?"0 auto 0 0":"right"===e?"0 0 0 auto":"0 auto"};\n\t\t\t${c("max-width",S(n,t,"maxWidth"))}\n\t\t}\n\n\t\t${M}{\n\t\t\t${((t,e,r)=>c("border-radius",h(e?.[r])))(0,n.borderRadius,t)}\n\t\t\t${n.useAspectRatio?c("aspect-ratio",((t,e)=>"string"==typeof t?t:t?"mobile"===e?t.mobile||t.tablet||t.desktop:"tablet"===e&&t.tablet||t.desktop:void 0)(n.aspectRatio,t)||"16/9"):c("height",S(n,t,"height"))}\n\t\t}\n\n\t\t${T}{\n\t\t\t${c("width",a?.[t]?.size)}\n\t\t\t${c("height",a?.[t]?.size)}\n\t\t}\n\n\t\t${D}{\n\t\t\t${c("max-width",i?.[t]?.maxWidth)}\n\t\t\t${c("border-radius",h(i?.[t]?.radius))}\n\t\t}\n\n\t\t${A}{ ${c("padding",h(i?.[t]?.padding))} }\n\n\t\t${E}{ ${c("gap",g?.[t]?.gap)} }\n\n\t\t${N}{\n\t\t\t${c("padding",h(g?.[t]?.padding))}\n\t\t\t${c("border-radius",h(g?.[t]?.radius))}\n\t\t}\n\t`;var e};return(0,z.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${m("",f.typo).googleFontLink}\n\t\t\t${m("",g.typo).googleFontLink}\n\t\t\t${m("",i.typo).googleFontLink}\n\n\t\t\t${$}{ display: block; }\n\n\t\t\t${I}{ width: 100%; }\n\n\t\t\t${M}{\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n\t\t\t\t${c("box-shadow",d(n.shadow||[]))}\n\t\t\t\t${n.useAspectRatio?"height: auto;":""}\n\t\t\t}\n\n\t\t\t${w}, ${k}{\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\t${n.useAspectRatio?"position: absolute; inset: 0;":""}\n\t\t\t}\n\n\t\t\t${L}{\n\t\t\t\t${l.background?u(l.background):c("background",l.color)}\n\t\t\t\t${c("color",l.textColor)}\n\t\t\t\t${c("width",l.size)}\n\t\t\t\t${c("height",l.size)}\n\t\t\t}\n\n\t\t\t${E}{ ${c("justify-content","right"===g.align?"flex-end":"center"===g.align?"center":"flex-start")} }\n\n\t\t\t${N}{\n\t\t\t\t${c("color",g.color)}\n\t\t\t\t${c("background",g.bgColor)}\n\t\t\t}\n\t\t\t${m(N,g.typo).styles}\n\n\t\t\t${N}.active{\n\t\t\t\t${c("background",g.activeColor)}\n\t\t\t\t${c("color",g.activeTextColor)}\n\t\t\t}\n\n\t\t\t/* After the generic .active rule so a category colour wins. */\n\t\t\t${C}\n\n\t\t\t${D}{\n\t\t\t\t${c("background",i.bgColor)}\n\t\t\t\t${p(i.border)}\n\t\t\t\t${c("box-shadow",d(i.shadow||[]))}\n\t\t\t}\n\n\t\t\t/* The tail is a separate rotated box; without this a recoloured\n\t\t\t info window keeps a white arrow. Both class names are emitted —\n\t\t\t Google renamed it from -t to -tc. */\n\t\t\t${$} .gm-style-iw-t::after,\n\t\t\t${$} .gm-style-iw-tc::after{\n\t\t\t\t${c("background",i.bgColor)}\n\t\t\t}\n\n\t\t\t${A}, ${$} .${j}-info{\n\t\t\t\t${c("color",i.textColor)}\n\t\t\t}\n\t\t\t${m(`${$} .${j}-info`,i.typo).styles}\n\n\t\t\t${x}{\n\t\t\t\t${c("text-align",f.align)}\n\t\t\t\t${c("color",f.color)}\n\t\t\t}\n\t\t\t${m(x,f.typo).styles}\n\n\t\t\t${O("desktop")}\n\t\t\t${o}{ ${O("tablet")} }\n\t\t\t${s}{ ${O("mobile")} }\n\n\t\t\t${v(e,b,r,!1)}\n\t\t\t`}})},{getOwnPropertyNames:P,getOwnPropertySymbols:U}=Object,{hasOwnProperty:R}=Object.prototype;function Y(t,e){return function(r,n,o){return t(r,n,o)&&e(r,n,o)}}function q(t){return function(e,r,n){if(!e||!r||"object"!=typeof e||"object"!=typeof r)return t(e,r,n);const{cache:o}=n,s=o.get(e),a=o.get(r);if(s&&a)return s===r&&a===e;o.set(e,r),o.set(r,e);const i=t(e,r,n);return o.delete(e),o.delete(r),i}}function Z(t){return P(t).concat(U(t))}const B=Object.hasOwn||((t,e)=>R.call(t,e));function F(t,e){return t===e||!t&&!e&&t!=t&&e!=e}const{getOwnPropertyDescriptor:Q,keys:G}=Object;function H(t,e){return t.byteLength===e.byteLength&&it(new Uint8Array(t),new Uint8Array(e))}function J(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function W(t,e){return t.byteLength===e.byteLength&&it(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function V(t,e){return F(t.getTime(),e.getTime())}function X(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function K(t,e){return t===e}function tt(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const o=new Array(n),s=t.entries();let a,i,l=0;for(;(a=s.next())&&!a.done;){const n=e.entries();let s=!1,c=0;for(;(i=n.next())&&!i.done;){if(o[c]){c++;continue}const n=a.value,u=i.value;if(r.equals(n[0],u[0],l,c,t,e,r)&&r.equals(n[1],u[1],n[0],u[0],t,e,r)){s=o[c]=!0;break}c++}if(!s)return!1;l++}return!0}const et=F;function rt(t,e,r){const n=G(t);let o=n.length;if(G(e).length!==o)return!1;for(;o-- >0;)if(!ct(t,e,r,n[o]))return!1;return!0}function nt(t,e,r){const n=Z(t);let o,s,a,i=n.length;if(Z(e).length!==i)return!1;for(;i-- >0;){if(o=n[i],!ct(t,e,r,o))return!1;if(s=Q(t,o),a=Q(e,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable))return!1}return!0}function ot(t,e){return F(t.valueOf(),e.valueOf())}function st(t,e){return t.source===e.source&&t.flags===e.flags}function at(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const o=new Array(n),s=t.values();let a,i;for(;(a=s.next())&&!a.done;){const n=e.values();let s=!1,l=0;for(;(i=n.next())&&!i.done;){if(!o[l]&&r.equals(a.value,i.value,a.value,i.value,t,e,r)){s=o[l]=!0;break}l++}if(!s)return!1}return!0}function it(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function lt(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function ct(t,e,r,n){return!("_owner"!==n&&"__o"!==n&&"__v"!==n||!t.$$typeof&&!e.$$typeof)||B(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}const ut={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},pt=Object.prototype.toString;const dt=mt();function mt(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:o=!1}=t,s=function({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:H,areArraysEqual:r?nt:J,areDataViewsEqual:W,areDatesEqual:V,areErrorsEqual:X,areFunctionsEqual:K,areMapsEqual:r?Y(tt,nt):tt,areNumbersEqual:et,areObjectsEqual:r?nt:rt,arePrimitiveWrappersEqual:ot,areRegExpsEqual:st,areSetsEqual:r?Y(at,nt):at,areTypedArraysEqual:r?Y(it,nt):it,areUrlsEqual:lt,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const t=q(n.areArraysEqual),e=q(n.areMapsEqual),r=q(n.areObjectsEqual),o=q(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:t,areMapsEqual:e,areObjectsEqual:r,areSetsEqual:o})}return n}(t),a=function({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:o,areFunctionsEqual:s,areMapsEqual:a,areNumbersEqual:i,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:p,areTypedArraysEqual:d,areUrlsEqual:m,unknownTagComparators:h}){return function(y,g,f){if(y===g)return!0;if(null==y||null==g)return!1;const b=typeof y;if(b!==typeof g)return!1;if("object"!==b)return"number"===b?i(y,g,f):"function"===b&&s(y,g,f);const $=y.constructor;if($!==g.constructor)return!1;if($===Object)return l(y,g,f);if(Array.isArray(y))return e(y,g,f);if($===Date)return n(y,g,f);if($===RegExp)return u(y,g,f);if($===Map)return a(y,g,f);if($===Set)return p(y,g,f);const M=pt.call(y);if("[object Date]"===M)return n(y,g,f);if("[object RegExp]"===M)return u(y,g,f);if("[object Map]"===M)return a(y,g,f);if("[object Set]"===M)return p(y,g,f);if("[object Object]"===M)return"function"!=typeof y.then&&"function"!=typeof g.then&&l(y,g,f);if("[object URL]"===M)return m(y,g,f);if("[object Error]"===M)return o(y,g,f);if("[object Arguments]"===M)return l(y,g,f);if(ut[M])return d(y,g,f);if("[object ArrayBuffer]"===M)return t(y,g,f);if("[object DataView]"===M)return r(y,g,f);if("[object Boolean]"===M||"[object Number]"===M||"[object String]"===M)return c(y,g,f);if(h){let t=h[M];if(!t){const e=null!=(w=y)?w[Symbol.toStringTag]:void 0;e&&(t=h[e])}if(t)return t(y,g,f)}var w;return!1}}(s);var i;return function({circular:t,comparator:e,createState:r,equals:n,strict:o}){if(r)return function(s,a){const{cache:i=(t?new WeakMap:void 0),meta:l}=r();return e(s,a,{cache:i,equals:n,meta:l,strict:o})};if(t)return function(t,r){return e(t,r,{cache:new WeakMap,equals:n,meta:void 0,strict:o})};const s={cache:void 0,equals:n,meta:void 0,strict:o};return function(t,r){return e(t,r,s)}}({circular:e,comparator:a,createState:n,equals:r?r(a):(i=a,function(t,e,r,n,o,s,a){return i(t,e,a)}),strict:o})}mt({strict:!0}),mt({circular:!0}),mt({circular:!0,strict:!0}),mt({createInternalComparator:()=>F}),mt({strict:!0,createInternalComparator:()=>F}),mt({circular:!0,createInternalComparator:()=>F}),mt({circular:!0,createInternalComparator:()=>F,strict:!0});const ht=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],yt=new Uint32Array(96);class gt{static from(t){if(!t||void 0===t.byteLength||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const o=ht[15&r];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new gt(a,s,o,void 0,t)}constructor(t,e=64,r=Float64Array,n=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=ht.indexOf(this.ArrayType),a=2*t*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-i%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,8,t),this.coords=new r(o,8+i+l,2*t),this._pos=2*t,this._finished=!0;else{const o=this.data=new n(8+a+i+l);this.ids=new this.IndexArrayType(o,8,t),this.coords=new r(o,8+i+l,2*t),this._pos=0,this._finished=!1,new Uint8Array(o,0,2).set([219,16+s]),new Uint16Array(o,2,1)[0]=e,new Uint32Array(o,4,1)[0]=t}}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return ft(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this;yt[0]=0,yt[1]=o.length-1,yt[2]=0;let i=3;const l=[];for(;i>0;){const c=yt[--i],u=yt[--i],p=yt[--i];if(u-p<=a){for(let a=p;a<=u;a++){const i=s[2*a],c=s[2*a+1];i>=t&&i<=r&&c>=e&&c<=n&&l.push(o[a])}continue}const d=p+u>>1,m=s[2*d],h=s[2*d+1];m>=t&&m<=r&&h>=e&&h<=n&&l.push(o[d]),(0===c?t<=m:e<=h)&&(yt[i++]=p,yt[i++]=d-1,yt[i++]=1-c),(0===c?r>=m:n>=h)&&(yt[i++]=d+1,yt[i++]=u,yt[i++]=1-c)}return l}within(t,e,r){const n=[];return this.withinInto(t,e,r,n),n}withinInto(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this;yt[0]=0,yt[1]=o.length-1,yt[2]=0;let i=3,l=0;const c=r*r;for(;i>0;){const u=yt[--i],p=yt[--i],d=yt[--i];if(p-d<=a){for(let r=d;r<=p;r++)wt(s[2*r],s[2*r+1],t,e)<=c&&(n[l++]=o[r]);continue}const m=d+p>>1,h=s[2*m],y=s[2*m+1];wt(h,y,t,e)<=c&&(n[l++]=o[m]),(0===u?t-r<=h:e-r<=y)&&(yt[i++]=d,yt[i++]=m-1,yt[i++]=1-u),(0===u?t+r>=h:e+r>=y)&&(yt[i++]=m+1,yt[i++]=p,yt[i++]=1-u)}return l}}function ft(t,e,r,n,o,s){if(o-n<=r)return;const a=n+o>>1;bt(t,e,a,n,o,s),ft(t,e,r,n,a-1,1-s),ft(t,e,r,a+1,o,1-s)}function bt(t,e,r,n,o,s){for(;o>n;){if(o-n>600){const a=o-n+1,i=r-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(i-a/2<0?-1:1);bt(t,e,r,Math.max(n,Math.floor(r-i*c/a+u)),Math.min(o,Math.floor(r+(a-i)*c/a+u)),s)}const a=e[2*r+s];let i=n,l=o;for($t(t,e,n,r),e[2*o+s]>a&&$t(t,e,n,o);i<l;){for($t(t,e,i,l),i++,l--;e[2*i+s]<a;)i++;for(;e[2*l+s]>a;)l--}e[2*n+s]===a?$t(t,e,n,l):(l++,$t(t,e,l,o)),l<=r&&(n=l+1),r<=l&&(o=l-1)}}function $t(t,e,r,n){Mt(t,r,n),Mt(e,2*r,2*n),Mt(e,2*r+1,2*n+1)}function Mt(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function wt(t,e,r,n){const o=t-r,s=e-n;return o*o+s*s}const kt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},xt=Math.fround||(vt=new Float32Array(1),t=>(vt[0]=+t,vt[0]));var vt;class Tt{constructor(t){this.options=Object.assign(Object.create(kt),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const s=[];for(let e=0;e<t.length;e++){const r=t[e];if(!r.geometry)continue;const[n,o]=r.geometry.coordinates,a=xt(Nt(n)),i=xt(Et(o));s.push(a,i,1/0,e,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[n+1]=this._createTree(s);e&&console.timeEnd(o);for(let t=n;t>=r;t--){const r=+Date.now();a=this.trees[t]=this._createTree(this._cluster(a,t)),e&&console.log("z%d: %d clusters in %dms",t,a.numItems,+Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,o=180;else if(r>o){const t=this.getClusters([r,n,180,s],e),a=this.getClusters([-180,n,o,s],e);return t.concat(a)}const a=this.trees[this._limitZoom(e)],i=a.range(Nt(r),Et(s),Nt(o),Et(n)),l=a.data,c=[];for(const t of i){const e=this.stride*t;c.push(l[e+5]>1?jt(l,e,this.clusterProps):this.points[l[e+3]])}return c}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const s=o.data;if(e*this.stride>=s.length)throw new Error(n);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),i=s[e*this.stride],l=s[e*this.stride+1],c=o.within(i,l,a),u=[];for(const e of c){const r=e*this.stride;s[r+4]===t&&u.push(s[r+5]>1?jt(s,r,this.clusterProps):this.points[s[r+3]])}if(0===u.length)throw new Error(n);return u}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:s,radius:a}=this.options,i=a/s,l=(r-i)/o,c=(r+1+i)/o,u={features:[]};return this._addTileFeatures(n.range((e-i)/o,l,(e+1+i)/o,c),n.data,e,r,o,u),0===e&&this._addTileFeatures(n.range(1-i/o,l,1,c),n.data,o,r,o,u),e===o-1&&this._addTileFeatures(n.range(0,l,i/o,c),n.data,-1,r,o,u),u.features.length?u:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,o){const s=this.getChildren(e);for(const e of s){const s=e.properties;if(s&&s.cluster?o+s.point_count<=n?o+=s.point_count:o=this._appendLeaves(t,s.cluster_id,r,n,o):o<n?o++:t.push(e),t.length===r)break}return o}_createTree(t){const e=new gt(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,o,s){for(const a of t){const t=a*this.stride,i=e[t+5]>1;let l,c,u;if(i)l=Lt(e,t,this.clusterProps),c=e[t],u=e[t+1];else{const r=this.points[e[t+3]];l=r.properties;const[n,o]=r.geometry.coordinates;c=Nt(n),u=Et(o)}const p={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(u*o-n))]],tags:l};let d;d=i||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==d&&(p.id=d),s.features.push(p)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:o,minPoints:s}=this.options,a=r/(n*Math.pow(2,e)),i=t.data,l=[],c=this.stride;for(let r=0;r<i.length;r+=c){if(i[r+2]<=e)continue;i[r+2]=e;const n=i[r],u=i[r+1],p=t.within(i[r],i[r+1],a),d=i[r+5];let m=d;for(const t of p){const r=t*c;i[r+2]>e&&(m+=i[r+5])}if(m>d&&m>=s){let t,s=n*d,a=u*d,h=-1;const y=(r/c<<5)+(e+1)+this.points.length;for(const n of p){const l=n*c;if(i[l+2]<=e)continue;i[l+2]=e;const u=i[l+5];s+=i[l]*u,a+=i[l+1]*u,i[l+4]=y,o&&(t||(t=this._map(i,r,!0),h=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(i,l)))}i[r+4]=y,l.push(s/m,a/m,1/0,y,-1,m),o&&l.push(h)}else{for(let t=0;t<c;t++)l.push(i[r+t]);if(m>1)for(const t of p){const r=t*c;if(!(i[r+2]<=e)){i[r+2]=e;for(let t=0;t<c;t++)l.push(i[r+t])}}}}return l}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+5]>1){const n=this.clusterProps[t[e+6]];return r?Object.assign({},n):n}const n=this.points[t[e+3]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function jt(t,e,r){return{type:"Feature",id:t[e+3],properties:Lt(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),Dt(t[e+1])]}};var n}function Lt(t,e,r){const n=t[e+5],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,s=t[e+6],a=-1===s?{}:Object.assign({},r[s]);return Object.assign(a,{cluster:!0,cluster_id:t[e+3],point_count:n,point_count_abbreviated:o})}function Nt(t){return t/360+.5}function Et(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Dt(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}"function"==typeof SuppressedError&&SuppressedError;class At{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(Number.isFinite(t.position.lat)&&Number.isFinite(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 It{constructor({markers:t,position:e}){this.markers=[],t&&(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(At.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>At.getVisible(t))).length}push(t){this.markers.push(t)}delete(){this.marker&&(At.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function Ct(t,e="assertion failed"){if(null==t)throw Error(e)}class St{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return Ot(t)}}const Ot=t=>t.map((t=>new It({position:At.getPosition(t),markers:[t]})));class zt extends St{constructor(t){var{maxZoom:e,radius:r=60}=t,n=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["maxZoom","radius"]);super({maxZoom:e}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Tt(Object.assign({maxZoom:this.maxZoom,radius:r},n))}calculate(t){let e=!1,r=t.map.getZoom();Ct(r),r=Math.round(r);const n={zoom:r};if(!dt(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const r=this.markers.map((t=>{const e=At.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(e=!dt(this.state,n)),this.state=n,0===t.markers.length?(this.clusters=[],{clusters:this.clusters,changed:e}):(e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e})}cluster({map:t}){const e=t.getZoom();return Ct(e),this.superCluster.getClusters([-180,-90,180,90],Math.round(e)).map((t=>this.transformCluster(t)))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new It({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:e,lng:t}});const n=r.marker;return new It({markers:[n],position:At.getPosition(n)})}}class _t{constructor(t,e){this.markers={sum:t.length};const r=e.map((t=>t.count)),n=r.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:n/e.length,sum:n,min:Math.min(...r),max:Math.max(...r)}}}}class Pt{render({count:t,position:e},r,n){const o=`<svg fill="${t>Math.max(10,r.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>`,s=`Cluster of ${t} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+t;if(At.isAdvancedMarkerAvailable(n)){const t=(new DOMParser).parseFromString(o,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const r={map:n,position:e,zIndex:a,title:s,content:t};return new google.maps.marker.AdvancedMarkerElement(r)}const i={position:e,zIndex:a,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(i)}}class Ut{constructor(){!function(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}(Ut,google.maps.OverlayView)}}var Rt;!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"}(Rt||(Rt={}));const Yt=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class qt extends Ut{constructor({map:t,markers:e=[],algorithmOptions:r={},algorithm:n=new zt(r),renderer:o=new Pt,onClusterClick:s=Yt}){super(),this.map=null,this.idleListener=null,this.markers=[...e],this.clusters=[],this.algorithm=n,this.renderer=o,this.onClusterClick=s,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 r=this.markers.indexOf(t);return-1!==r&&(At.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let r=!1;return t.forEach((t=>{r=this.removeMarker(t,!0)||r})),r&&!e&&this.render(),r}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,Rt.CLUSTERING_BEGIN,this);const{clusters:e,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||null==r){const t=new Set;for(const r of e)1==r.markers.length&&t.add(r.markers[0]);const r=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||At.setMap(e.marker,null):r.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame((()=>r.forEach((t=>At.setMap(t,null)))))}google.maps.event.trigger(this,Rt.CLUSTERING_END,this)}}onAdd(){const t=this.getMap();Ct(t),this.idleListener=t.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((t=>At.setMap(t,null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const t=new _t(this.markers,this.clusters),e=this.getMap();this.clusters.forEach((r=>{if(1===r.markers.length)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,t,e),r.markers.forEach((t=>At.setMap(t,null))),this.onClusterClick){const t=At.isAdvancedMarker(r.marker)?Rt.GMP_CLICK:Rt.CLUSTER_CLICK;r.marker.addListener(t,(t=>{google.maps.event.trigger(this,Rt.CLUSTER_CLICK,r),this.onClusterClick(t,r,e)}))}At.setMap(r.marker,e)}))}}const Zt="b-blocks-google-map-heat",Bt=[[0,[0,0,255,0]],[.2,[0,0,255,255]],[.4,[0,255,255,255]],[.6,[0,255,0,255]],[.8,[255,255,0,255]],[1,[255,0,0,255]]],Ft=({OverlayView:t,LatLng:e})=>class extends t{constructor({points:t=[],radius:e=20,opacity:r=.6}={}){super();const n=(t,e)=>Number.isFinite(Number(t))?Number(t):e;this.points=t,this.radius=Math.max(4,n(e,20)),this.opacity=Math.min(1,Math.max(0,n(r,.6))),this.blur=Math.max(4,.65*this.radius),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null,this.idleListener=null}setOptions({points:t,radius:e,opacity:r}={}){const n=(t,e)=>Number.isFinite(Number(t))?Number(t):e;Array.isArray(t)&&(this.points=t),void 0!==e&&(this.radius=Math.max(4,n(e,this.radius)),this.blur=Math.max(4,.65*this.radius)),void 0!==r&&(this.opacity=Math.min(1,Math.max(0,n(r,this.opacity)))),this.draw()}onAdd(){const t=document.createElement("canvas");t.className=Zt,t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.zIndex="1",t.style.pointerEvents="none",this.canvas=t,this.ctx=t.getContext("2d"),this.gradient=(()=>{const t=document.createElement("canvas");t.width=1,t.height=256;const e=t.getContext("2d"),r=e.createLinearGradient(0,0,0,256);return Bt.forEach((([t,[e,n,o,s]])=>{r.addColorStop(t,`rgba(${e},${n},${o},${s/255})`)})),e.fillStyle=r,e.fillRect(0,0,1,256),e.getImageData(0,0,1,256).data})();const e=this.getMap()?.getDiv();e?.querySelectorAll(`.${Zt}`).forEach((t=>t.remove())),e?.appendChild(t),this.idleListener=this.getMap()?.addListener("idle",(()=>this.draw()))}draw(){const t=this.getProjection(),r=this.getMap()?.getDiv();if(!(t&&r&&this.canvas&&this.ctx))return;const n=Math.min(r.clientWidth||0,4096),o=Math.min(r.clientHeight||0,4096);if(n<=0||o<=0)return;this.canvas.width!==n&&(this.canvas.width=n),this.canvas.height!==o&&(this.canvas.height=o),this.canvas.style.width=`${n}px`,this.canvas.style.height=`${o}px`,this.canvas.style.opacity=String(this.opacity),this.stamp&&this.stampRadius===this.radius||(this.stamp=((t,e)=>{const r=t+e,n=document.createElement("canvas");n.width=2*r,n.height=2*r;const o=n.getContext("2d");return o.shadowOffsetX=2*r,o.shadowOffsetY=2*r,o.shadowBlur=e,o.shadowColor="#000",o.beginPath(),o.arc(-r,-r,t,0,2*Math.PI,!0),o.closePath(),o.fill(),n})(this.radius,this.blur),this.stampRadius=this.radius);const s=this.ctx,a=this.radius+this.blur;s.clearRect(0,0,n,o),s.globalAlpha=.55;let i=0;if(this.points.forEach((r=>{const l=t.fromLatLngToContainerPixel(new e(r.lat,r.lng));l&&(l.x<-a||l.y<-a||l.x>n+a||l.y>o+a||(s.drawImage(this.stamp,l.x-a,l.y-a),i++))})),s.globalAlpha=1,!i)return;const l=s.getImageData(0,0,n,o),c=l.data;for(let t=3;t<c.length;t+=4){const e=c[t];if(!e)continue;const r=4*e;c[t-3]=this.gradient[r],c[t-2]=this.gradient[r+1],c[t-1]=this.gradient[r+2]}s.putImageData(l,0,0)}onRemove(){this.idleListener?.remove(),this.idleListener=null,this.canvas?.parentNode?.removeChild(this.canvas),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null}},Qt="__bBlocksMapsCb__",Gt=new Map;let Ht=!1,Jt="",Wt=!1,Vt=!1;const Xt=new Set,Kt=t=>(Gt.has(t)||Gt.set(t,window.google.maps.importLibrary(t).catch((e=>{throw Gt.delete(t),e}))),Gt.get(t)),te=(t={})=>{const{markers:e=[],shapes:r=[],directions:n={},tools:o={},clustering:s={},source:a={}}=t,i=new Set(["core","maps"]);return a.mapId&&(e.length||s.enabled)&&i.add("marker"),o.searchBox&&i.add("places"),n.enabled&&i.add("routes"),r.length&&i.add("geometry"),[...i]},ee=(t,e=["maps"],r={})=>t?(Ht&&Jt&&Jt!==t&&!Wt&&(Wt=!0,console.warn("[b-blocks] The Google Maps API is already loaded with a different API key; the first key wins.")),((t,{version:e="weekly",language:r="",region:n=""}={})=>{const o=window.google=window.google||{},s=o.maps=o.maps||{};if((()=>{const t=window.gm_authFailure;if(t?.bBlocksHooked)return;const e=()=>{Vt=!0,Xt.forEach((t=>t())),"function"==typeof t&&t()};e.bBlocksHooked=!0,window.gm_authFailure=e})(),s.importLibrary)return Ht=!0,void(Jt=Jt||t);const a=new Set;let i=null;s.importLibrary=(o,...l)=>(a.add(o),(i||(i=Promise.resolve().then((()=>new Promise(((o,l)=>{const c=new URLSearchParams;c.set("key",t),c.set("v",e),c.set("loading","async"),c.set("libraries",[...a].join(",")),c.set("callback",`google.maps.${Qt}`),r&&c.set("language",r),n&&c.set("region",n);const u=document.createElement("script");u.src=`https://maps.googleapis.com/maps/api/js?${c.toString()}`,u.async=!0,u.nonce=document.querySelector("script[nonce]")?.nonce||"",u.onerror=()=>{i=null,l(new Error("google-maps-load-failed"))},s[Qt]=o,document.head.append(u)})))))).then((()=>s.importLibrary(o,...l)))),Ht=!0,Jt=t})(t,r),Promise.all(e.map(Kt)).then((t=>Object.assign({},...t)))):Promise.reject(new Error("missing-key")),re=(t="")=>{if(!t||"string"!=typeof t)return"";const e=(new DOMParser).parseFromString(t,"text/html");return e.body.querySelectorAll("script, style, iframe, object, embed, form, link, meta").forEach((t=>t.remove())),e.body.querySelectorAll("*").forEach((t=>{[...t.attributes].forEach((({name:e,value:r})=>{const n=/^on/i.test(e),o=/^\s*javascript:/i.test(r||"");(n||o&&("href"===e||"src"===e))&&t.removeAttribute(e)}))})),e.body.innerHTML},ne=(t={})=>{const e=C(t.lat),r=C(t.lng);return null===e||null===r?null:{lat:e,lng:r}},oe=(t,e=[])=>e.find((e=>e.id===t?.category))||null,se=({address:t="",message:e="",status:r="info",onActivate:n=null,actionLabel:o=""})=>{return(0,z.jsxs)("div",{className:`${j}-fallback ${j}-fallback-${r}`,role:"note",children:[e?(0,z.jsx)("p",{className:`${j}-fallback-message`,children:e}):null,t?(0,z.jsx)("p",{className:`${j}-fallback-address`,children:t}):null,n?(0,z.jsx)("button",{type:"button",className:`${j}-fallback-button`,onClick:n,children:o||(0,T.__)("Load map","b-blocks")}):(0,z.jsx)("a",{className:`${j}-fallback-link`,href:(s=t,`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(s||"")}`),target:"_blank",rel:"noopener noreferrer",children:(0,T.__)("Open in Google Maps","b-blocks")})]});var s},ae=({categories:t=[],filterBar:e={},active:r="",onChange:n=()=>{}})=>{if(!t.length)return null;const{showAll:o=!0,allLabel:s=""}=e,a=o?[{id:"",label:s||(0,T.__)("All","b-blocks")},...t]:t;return(0,z.jsx)("div",{className:`${j}-filter-bar`,role:"group","aria-label":(0,T.__)("Filter map locations by category","b-blocks"),children:a.map((t=>{const e=r===t.id;return(0,z.jsxs)("button",{type:"button",className:`${j}-filter-chip${e?" active":""}`,"data-category":t.id||"","aria-pressed":e,onClick:()=>n(t.id),children:[t.id?(0,z.jsx)("span",{className:`${j}-filter-dot`,"aria-hidden":"true"}):null,t.label]},t.id||"all")}))})},ie=({embedUrl:t,captionText:e})=>{if(!(t=>{if(!t||"string"!=typeof t)return!1;try{const e=new URL(t);return"https:"===e.protocol&&!!N.test(e.hostname)&&!!e.pathname.startsWith("/maps/embed")}catch(t){return!1}})(t))return(0,z.jsx)("div",{className:`${j}-placeholder`,role:"note",children:(0,T.__)("Paste a valid Google Maps embed URL from Google Maps → Share → Embed a map.","b-blocks")});const r=e?(0,T.sprintf)((0,T.__)("Google Map of %s","b-blocks"),e):(0,T.__)("Google Map","b-blocks");return(0,z.jsx)("div",{className:`${j}-wrapper`,children:(0,z.jsx)("iframe",{className:`${j}-iframe`,src:t,title:r,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",allowFullScreen:!0})})},le=({attributes:t,apiKey:e="",isBackend:r=!1,device:n="desktop",onMarkerDrag:o=null})=>{const s=(0,i.useMemo)((()=>((t={})=>{const e=t.source||{},r=e.type||(e.embedUrl?"embed":"interactive");return{...t,source:{...e,type:r,center:{...L,...e.center||{}}}}})(t)),[t]),{source:a={},map:l={},controls:c={},markers:u=[],marker:p={},infoWindow:d={},clustering:m={},categories:h=[],filterBar:y={},theme:g={},layers:f={},shapes:b=[],directions:$={},tools:M={},performance:w={},caption:k={}}=s,x="embed"===a.type,v=k.text||"",N=(0,i.useRef)(null),E=(0,i.useRef)(null),A=(0,i.useRef)(null),S=(0,i.useRef)(null),_=(0,i.useRef)(null),P=(0,i.useRef)([]),U=(0,i.useRef)(null),R=(0,i.useRef)(null),Y=(0,i.useRef)([]),q=(0,i.useRef)([]),Z=(0,i.useRef)(""),B=(0,i.useRef)(null),[F,Q]=(0,i.useState)(null),[G,H]=(0,i.useState)(""),[J,W]=(0,i.useState)(0),[V,X]=(0,i.useState)(""),[K,tt]=(0,i.useState)(!1),et=w.lazyLoad||"onView",[rt,nt]=(0,i.useState)(r||x||"none"===et),ot=(0,i.useMemo)((()=>((t={})=>{const{preset:e="default",customJson:r="",grayscale:n=0,saturation:o=0,hue:s=""}=t;let a=[];if("custom"===e)try{const t=JSON.parse(r||"[]");Array.isArray(t)&&(a=t)}catch(t){a=[]}else a=O[e]||[];const i=[];return C(n,0)&&i.push({saturation:-Math.abs(C(n,0))}),C(o,0)&&i.push({saturation:C(o,0)}),s&&i.push({hue:s}),i.length?[...a,{elementType:"all",stylers:i}]:a})(g)),[JSON.stringify(g)]),st=a.mapId||"",at=t=>F?.[t]||window.google?.maps?.[t],it=JSON.stringify([a.center,l,c,ot]),lt=JSON.stringify([u,p,d,h,m,V,n]),ct=JSON.stringify(f),ut=!!f.heatmap?.enabled,pt=(0,i.useMemo)((()=>u.map((t=>ne(t))).filter(Boolean)),[JSON.stringify(u)]),dt=JSON.stringify(pt),mt=JSON.stringify([f.heatmap?.radius,f.heatmap?.opacity]),ht=JSON.stringify(b),yt=JSON.stringify($);if((0,i.useEffect)((()=>{if(rt||"onView"!==et||!N.current)return;if(!("IntersectionObserver"in window))return void nt(!0);const t=new IntersectionObserver((e=>{e.some((t=>t.isIntersecting))&&(nt(!0),t.disconnect())}),{rootMargin:"200px"});return t.observe(N.current),()=>t.disconnect()}),[rt,et]),(0,i.useEffect)((()=>{if(x||!rt)return;let t=!1;if(e)return H(""),ee(e,te(s),{language:a.language,region:a.region}).then((e=>{t||Q(e)})).catch((e=>{t||H(e?.message||"google-maps-load-failed")})),()=>{t=!0};H("missing-key")}),[x,rt,e,a.language,a.region,JSON.stringify(te(s))]),(0,i.useEffect)((()=>{return t=()=>H("auth"),Vt&&t(),Xt.add(t),()=>Xt.delete(t);var t}),[]),(0,i.useEffect)((()=>{if(!F?.Map||!E.current)return;const t=new F.Map(E.current,{center:{lat:C(a.center?.lat,23.8103),lng:C(a.center?.lng,90.4125)},zoom:C(l.zoom,12),mapTypeId:l.mapType||"roadmap",mapId:st||void 0,styles:st?void 0:ot});_.current=t,W((t=>t+1));const e=new MutationObserver((()=>{const t=E.current;if(!t)return;const e=t.querySelector(".gm-err-container, .gm-err-content"),r=t.querySelector(".gm-style-moc"),n=!!r&&r.textContent.trim().length>0&&"0"!==(window.getComputedStyle(r)?.opacity||"0");(e||n)&&H("auth")}));return e.observe(E.current,{childList:!0,subtree:!0}),()=>{e.disconnect(),q.current.forEach((t=>t?.remove?.())),q.current=[],R.current?.close(),R.current=null,U.current?.clearMarkers(),U.current=null,P.current.forEach((t=>{t.map=null})),P.current=[],Y.current.forEach((t=>{t?.setMap?.(null)})),Y.current=[],_.current=null,E.current&&(E.current.innerHTML="")}}),[F,st]),(0,i.useEffect)((()=>{const t=_.current;if(!t)return;const e=(n=c.zoomPosition||"RIGHT_BOTTOM",window.google?.maps?.ControlPosition?.[n]??void 0);var n;const o=C(l.minZoom),s=C(l.maxZoom),i=null!==o&&null!==s,u=i?Math.min(o,s):o,p=i?Math.max(o,s):s;try{t.setOptions({center:{lat:C(a.center?.lat,23.8103),lng:C(a.center?.lng,90.4125)},zoom:C(l.zoom,12),minZoom:u??void 0,maxZoom:p??void 0,mapTypeId:l.mapType||"roadmap",gestureHandling:r?"none":l.gestureHandling||"cooperative",draggable:!1!==l.draggable,scrollwheel:!!l.scrollwheel,keyboardShortcuts:!1!==c.keyboardShortcuts,disableDefaultUI:!!c.disableDefaultUI,zoomControl:!!c.zoom,zoomControlOptions:e?{position:e}:void 0,mapTypeControl:!!c.mapType&&!1!==l.allowTypeSwitch,streetViewControl:!!c.streetView,fullscreenControl:!!c.fullscreen,scaleControl:!!c.scale,rotateControl:!!c.rotate,styles:st?void 0:ot})}catch(t){console.warn("[b-blocks] Google Maps rejected a map option:",t?.message||t)}}),[J,it,st,r]),(0,i.useEffect)((()=>{const t=_.current;if(!t||!st||!F?.AdvancedMarkerElement)return;const{AdvancedMarkerElement:e,PinElement:s,InfoWindow:a}=F,i=[],c=[],y=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,g=parseInt(d.desktop?.maxWidth,10)||280,f=[],b=()=>f.forEach((t=>t?.close()));R.current={close:b},u.forEach(((l,u)=>{if(V&&l.category!==V)return;const m=ne(l);if(!m)return;let $=((t={},e={},r="desktop",n=[])=>{const{type:o="default",url:s={}}=t.icon||{},a=e?.[r]?.size||e?.desktop?.size||"40px",i=t.pinColor||oe(t,n)?.color||e.pinColor||"#8a2be2";if("library"===o||"upload"===o){const t="library"===o?s.library:s.upload;if(!t)return;const e=document.createElement("div");return e.className="b-blocks-google-map-pin b-blocks-google-map-pin-svg",e.style.width=a,e.style.height=a,e.style.color=i,e.innerHTML=re(t),e}if("image"===o){const e=t.image?.url;if(!e)return;const r=document.createElement("div");r.className="b-blocks-google-map-pin b-blocks-google-map-pin-image",r.style.width=a,r.style.height=a;const n=document.createElement("img");return n.src=e,n.alt=t.image?.alt||t.title||"",r.append(n),r}})(l,p,n,h);!$&&s&&($=new s(((t={},e={},r=[])=>{const n=oe(t,r);return{background:t.pinColor||n?.color||e.pinColor||"#8a2be2",borderColor:e.borderColor||"#ffffff",glyphColor:t.glyphColor||e.glyphColor||"#ffffff",scale:C(e.scale,1)??1}})(l,p,h)).element);const M=l.animation||p.animation||"none";$&&"none"!==M&&!y&&$.classList.add(`${j}-anim-${M}`);const w=new e({map:t,position:m,title:l.title||"",content:$||void 0,gmpClickable:!0,gmpDraggable:r&&!1!==l.draggable,zIndex:u+1}),k=d.trigger||"click",x="always"===k,v=a?new a({maxWidth:g}):null;f.push(v);const T=()=>{v&&(x||!1===d.singleOpen||b(),v.setContent(((t={})=>{const e=document.createElement("div");if(e.className="b-blocks-google-map-info",t.image?.url&&"image"!==t.icon?.type){const r=document.createElement("img");r.className="b-blocks-google-map-info-image",r.src=t.image.url,r.alt=t.image.alt||t.title||"",r.loading="lazy",e.append(r)}if(t.title){const r=document.createElement("h4");r.className="b-blocks-google-map-info-title",r.textContent=t.title,e.append(r)}const r=document.createElement("div");if(r.className="b-blocks-google-map-info-body",r.innerHTML=re(t.content||""),e.append(r),t.address){const r=document.createElement("p");r.className="b-blocks-google-map-info-address",r.textContent=t.address,e.append(r)}return e})(l)),v.open({map:t,anchor:w}))};"hover"===k&&w.content?(w.content.addEventListener("mouseenter",T),w.content.addEventListener("mouseleave",(()=>v?.close()))):"click"===k&&i.push(w.addListener("gmp-click",T)),r&&o&&!1!==l.draggable&&i.push(w.addListener("dragend",(t=>{const e=t?.latLng;e&&o(u,{lat:e.lat(),lng:e.lng()})}))),(x||l.openByDefault)&&T(),c.push(w)})),P.current=c,q.current=[...q.current,...i],m.enabled&&c.length&&(U.current=new qt({map:t,markers:c,onClusterClick:!1===m.clickToZoom?()=>{}:void 0,renderer:{render:({count:t,position:r})=>{const n=document.createElement("div");return n.className=`${j}-cluster`,n.textContent=String(t),new e({position:r,content:n,zIndex:9999})}}}));const $=at("LatLngBounds");if(l.fitBounds&&c.length>1&&$){const e=new $;c.forEach((t=>e.extend(t.position))),t.fitBounds(e)}return()=>{i.forEach((t=>t?.remove?.())),q.current=q.current.filter((t=>!i.includes(t))),b(),R.current=null,U.current?.clearMarkers(),U.current=null,c.forEach((t=>{t.map=null})),P.current=[]}}),[J,lt,st,r]),(0,i.useEffect)((()=>{const t=_.current;if(!t)return;const e=at("TrafficLayer"),r=at("TransitLayer"),n=at("BicyclingLayer"),o=at("KmlLayer"),s=[];f.traffic&&e&&s.push(new e),f.transit&&r&&s.push(new r),f.bicycling&&n&&s.push(new n),f.kmlUrl&&o&&s.push(new o({url:f.kmlUrl,preserveViewport:!0})),s.forEach((e=>e.setMap(t)));const a=[],i=(t=>{if(!t||!String(t).trim())return{data:null,error:""};let e;try{e=JSON.parse(t)}catch(t){return{data:null,error:(0,T.__)("This is not valid JSON, so it will be skipped.","b-blocks")}}if(Array.isArray(e)){const t=e.map(D).filter(Boolean);return t.length?{data:{type:"FeatureCollection",features:t},error:""}:{data:null,error:I(e)?(0,T.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks"):(0,T.__)('This array holds no recognisable GeoJSON features. GeoJSON describes places — each entry needs a "geometry" with coordinates.',"b-blocks")}}if(!e||"object"!=typeof e)return{data:null,error:(0,T.__)("GeoJSON must be an object or an array of features.","b-blocks")};if("FeatureCollection"===e.type||"Feature"===e.type)return{data:e,error:""};const r=D(e);return r?{data:r,error:""}:I(e)?{data:null,error:(0,T.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks")}:{data:null,error:e.type?(0,T.sprintf)((0,T.__)('Unrecognised GeoJSON type "%s". Expected a Feature, a FeatureCollection, or a geometry.',"b-blocks"),String(e.type)):(0,T.__)('This GeoJSON has no "type" property.',"b-blocks")}})(f.geoJson);if(i.data&&t.data)try{a.push(...t.data.addGeoJson(i.data))}catch(t){console.warn("[b-blocks] Google rejected this GeoJSON:",t?.message||t)}const l=at("LatLngBounds");if(!1===f.fitGeoJson&&(Z.current=""),a.length&&!1!==f.fitGeoJson&&l&&Z.current!==f.geoJson){const e=new l;a.forEach((t=>{const r=t?.getGeometry?.();"function"==typeof r?.forEachLatLng&&r.forEachLatLng((t=>e.extend(t)))})),e.isEmpty()||(t.fitBounds(e),Z.current=f.geoJson)}return Y.current=s.filter(Boolean),()=>{s.forEach((t=>t.setMap(null))),a.forEach((e=>t.data.remove(e))),Y.current=[]}}),[J,ct,lt,F]),(0,i.useEffect)((()=>{const t=_.current;if(!t||!ut)return;const e=at("OverlayView"),r=at("LatLng");if(!e||!r)return void console.warn("[b-blocks] Heatmap needs google.maps.OverlayView and LatLng; neither the imported library nor the namespace provided them.");const n=new(Ft({OverlayView:e,LatLng:r}))({points:pt,radius:C(f.heatmap?.radius,20),opacity:C(f.heatmap?.opacity,.6)});return n.setMap(t),B.current=n,()=>{n.setMap(null),B.current===n&&(B.current=null)}}),[J,ut,F]),(0,i.useEffect)((()=>{ut&&(pt.length?B.current?.setOptions({points:pt,radius:C(f.heatmap?.radius,20),opacity:C(f.heatmap?.opacity,.6)}):console.warn(`[b-blocks] Heatmap is on but none of the ${u.length} marker(s) have coordinates, so there is nothing to draw.`))}),[ut,mt,dt]),(0,i.useEffect)((()=>{const t=_.current;if(!t||!b.length)return;const e=at("Circle"),r=at("Rectangle"),n=at("Polygon"),o=at("Polyline");if(!o)return;const s=b.map((t=>{const s={strokeColor:t.strokeColor||"#2A6DF0",strokeOpacity:C(t.strokeOpacity,.9),strokeWeight:C(t.strokeWeight,3)},a={fillColor:t.fillColor||"#2A6DF0",fillOpacity:C(t.fillOpacity,.25)};if("circle"===t.type){const r=ne(t.center||{});return r&&e?new e({...s,...a,center:r,radius:C(t.radius,1e3)}):null}if("rectangle"===t.type){const{north:e,south:n,east:o,west:i}=t.bounds||{},l={north:C(e),south:C(n),east:C(o),west:C(i)};return Object.values(l).some((t=>null===t))?null:r?new r({...s,...a,bounds:l}):null}const i=((t="")=>{if(!t||"string"!=typeof t)return[];const e=t.trim();if(!e)return[];if(e.startsWith("["))try{const t=JSON.parse(e);return Array.isArray(t)?t.map((t=>({lat:C(t?.lat??t?.[0]),lng:C(t?.lng??t?.[1])}))).filter((t=>null!==t.lat&&null!==t.lng)):[]}catch(t){return[]}return e.split(/[\n;|]+/).map((t=>{const[e,r]=t.split(",").map((t=>C(t)));return{lat:e,lng:r}})).filter((t=>null!==t.lat&&null!==t.lng))})(t.path);return i.length<2?null:"polygon"===t.type&&n?new n({...s,...a,paths:i}):new o({...s,path:i})})).filter(Boolean);return s.forEach((e=>e.setMap(t))),()=>s.forEach((t=>t.setMap(null)))}),[J,ht,F]),(0,i.useEffect)((()=>{const t=_.current;if(!(t&&$.enabled&&F?.DirectionsService&&F?.DirectionsRenderer))return;const e=$.origin?.address||ne($.origin||{}),r=$.destination?.address||ne($.destination||{});if(!e||!r)return;const n=new F.DirectionsRenderer({map:t,panel:$.showPanel&&S.current?S.current:null,polylineOptions:{strokeColor:$.routeColor||"#2A6DF0",strokeWeight:5}});let o=!1;return(new F.DirectionsService).route({origin:e,destination:r,travelMode:$.mode||"DRIVING",waypoints:($.waypoints||[]).map((t=>t?.address||ne(t||{}))).filter(Boolean).map((t=>({location:t,stopover:!0})))}).then((t=>{o||n.setDirections(t)})).catch((()=>{})),()=>{o=!0,n.setMap(null),S.current&&(S.current.innerHTML="")}}),[J,yt,F]),(0,i.useEffect)((()=>{const t=_.current;if(!(t&&M.searchBox&&F?.PlaceAutocompleteElement&&A.current))return;let e;try{e=new F.PlaceAutocompleteElement}catch(t){return}e.className=`${j}-search-input`,A.current.append(e);const r=async({placePrediction:e})=>{try{const r=e.toPlace();await r.fetchFields({fields:["location","formattedAddress"]}),r.location&&(t.setCenter(r.location),t.setZoom(Math.max(C(l.zoom,12),14)))}catch(t){}};return e.addEventListener("gmp-select",r),()=>{e.removeEventListener("gmp-select",r),e.remove()}}),[J,M.searchBox,F]),x)return(0,z.jsx)("div",{className:`${j}-container`,ref:N,children:(0,z.jsxs)("figure",{className:`${j}-figure`,children:[(0,z.jsx)(ie,{embedUrl:a.embedUrl,captionText:v}),v?(0,z.jsx)("figcaption",{className:`${j}-caption`,children:v}):null]})});const gt=a.center?.address||u[0]?.address||v,ft=rt||"onClick"!==et?"auth"===G?(0,z.jsx)(se,{address:gt,status:"warning",message:r?(0,T.__)("Google rejected this API key. Check that billing is enabled on the Google Cloud project, that the Maps JavaScript API is turned on, and that the key’s HTTP referrer restriction allows this site.","b-blocks"):(0,T.__)("This map is temporarily unavailable.","b-blocks")}):"missing-key"===G?(0,z.jsx)(se,{address:gt,status:"warning",message:(0,T.__)("A Google Maps API key is required to show this map.","b-blocks")}):G?(0,z.jsx)(se,{address:gt,status:"warning",message:(0,T.__)("The Google Maps API could not be loaded.","b-blocks")}):null:(0,z.jsx)(se,{address:gt,status:"idle",message:(0,T.__)("Map ready to load.","b-blocks"),onActivate:()=>nt(!0),actionLabel:(0,T.__)("Load map","b-blocks")});return(0,z.jsx)("div",{className:`${j}-container`,ref:N,children:(0,z.jsxs)("figure",{className:`${j}-figure`,children:[!ft&&y.show&&h.length?(0,z.jsx)(ae,{categories:h,filterBar:y,active:V,onChange:X}):null,ft||!M.searchBox&&!M.geolocation?null:(0,z.jsxs)("div",{className:`${j}-tools`,children:[M.searchBox?(0,z.jsx)("div",{className:`${j}-search`,ref:A}):null,M.geolocation?(0,z.jsx)("button",{type:"button",className:`${j}-locate`,onClick:()=>{const t=_.current;t&&navigator.geolocation&&(tt(!0),navigator.geolocation.getCurrentPosition((({coords:e})=>{tt(!1);const r={lat:e.latitude,lng:e.longitude};t.panTo(r),t.setZoom(14);const n=C(M.nearbyRadius,0),o=at("Circle");if(n>0&&o){const e=new o({map:t,center:r,radius:n,strokeColor:"#2A6DF0",strokeOpacity:.6,fillColor:"#2A6DF0",fillOpacity:.12});Y.current.push(e)}}),(()=>tt(!1)),{enableHighAccuracy:!0,timeout:1e4}))},disabled:K,children:K?(0,T.__)("Locating…","b-blocks"):(0,T.__)("Find my location","b-blocks")}):null]}),(0,z.jsx)("div",{className:`${j}-wrapper`,children:ft||(0,z.jsx)("div",{className:`${j}-canvas`,ref:E,role:"region","aria-label":v?(0,T.sprintf)((0,T.__)("Interactive map of %s","b-blocks"),v):(0,T.__)("Interactive Google Map","b-blocks")})}),!ft&&$.enabled&&$.showPanel?(0,z.jsx)("div",{className:`${j}-directions-panel`,ref:S}):null,v?(0,z.jsx)("figcaption",{className:`${j}-caption`,children:v}):null]})})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-google-map[data-attributes]").forEach((e=>{let r={};try{const t=e.dataset.attributes;t&&"undefined"!==t&&""!==t&&(r=JSON.parse(t))}catch(t){r={}}const n=e.dataset.mapkey||"";(0,t.createRoot)(e).render((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(_,{attributes:r,id:e.id}),(0,z.jsx)(le,{attributes:r,apiKey:n})]})),e.removeAttribute("data-attributes"),e.removeAttribute("data-mapkey")}))}))})();