From ed1d9838a42d66c2a8926ebb83c8e5eae4ca51cb Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Wed, 30 Sep 2026 08:23:47 +0000 Subject: [PATCH] =?UTF-8?q?Rebuild=20the=20seven=20=E2=93=98=20bundles=20f?= =?UTF-8?q?or=20the=20question-mark=20glyph,=20then=20the=20tree=20and=20S?= =?UTF-8?q?RI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cities-internet/cities-internet.js | 2 +- .../connectivity-list/index.html | 2 +- .../connectivity-map/index.html | 2 +- .../cities-internet/data-tables/index.html | 2 +- .../dashboard-plus-grid.js | 2 +- .../dashboard-plus-grid/default/index.html | 2 +- .../dashboard-plus-grid/index.html | 2 +- public/dx-maps/doxa-maps-spa/doxa-maps-spa.js | 2 +- .../doxa-maps-spa/app/index.html | 2 +- .../doxa-maps-spa/doxa-maps-spa/index.html | 2 +- public/dx-maps/doxa-maps-spa/manifest.json | 54 +++++++++---------- .../doxa-research-map/doxa-research-map.js | 36 ++++++------- .../doxa-research-map/research-map/index.html | 2 +- .../research-map/maplibre/index.html | 2 +- .../doxa-simple-map/doxa-simple-map.js | 4 +- .../doxa-simple-map/adoption/index.html | 2 +- .../doxa-simple-map/engagement/index.html | 2 +- .../doxa-simple-map/index.html | 2 +- .../doxa-simple-map/prayer/index.html | 2 +- .../gospel-resources/charts/index.html | 2 +- .../gospel-resources/data-tables/index.html | 2 +- .../gospel-dashboard/index.html | 2 +- .../gospel-resources/gospel-resources.js | 2 +- .../resources-list/index.html | 2 +- .../gospel-resources/resources-map/index.html | 2 +- public/dx-maps/manifest.json | 54 +++++++++---------- .../research-dashboard/research-dashboard.js | 2 +- .../research-dashboard/index.html | 2 +- 28 files changed, 98 insertions(+), 98 deletions(-) diff --git a/public/dx-maps/cities-internet/cities-internet.js b/public/dx-maps/cities-internet/cities-internet.js index 2d1c06970..8695b9ff3 100644 --- a/public/dx-maps/cities-internet/cities-internet.js +++ b/public/dx-maps/cities-internet/cities-internet.js @@ -165,7 +165,7 @@ @media (prefers-reduced-motion: reduce) { .mcb-btn { transition: none !important; animation: none !important; } } -`,"map-control-button"),(t,o)=>(I(),B("button",{class:$e(["mcb",{dark:e.isDark,active:e.active,"mcb--square":e.shape==="square","mcb--rounded-square":e.shape==="rounded-square"}]),title:e.title,"aria-label":e.title||void 0,disabled:e.disabled,onClick:o[0]||(o[0]=n=>t.$emit("click"))},[Dn(t.$slots,"default")],10,Sb))}},Lb={__name:"MapInfoButton",props:{isDark:{type:Boolean,default:!1},standalone:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["standalone"],setup(e,{emit:t}){const{t:o}=ht(),n=e,a=t,r=Ce("mapToolbar",null),s=jt(),i=ie(!1),l=ie(null),c=()=>l.value&&l.value.$el||null,u=()=>c()||r&&r.el&&r.el.value||s&&s.proxy&&s.proxy.$el&&s.proxy.$el.parentNode||null;function p(y,b){const v={el:b,ack:!1};try{y.dispatchEvent(new CustomEvent("dxmaps:mapinfo-control",{bubbles:!0,composed:!0,detail:v}))}catch{}return v.ack===!0}function g(y){for(let b=y;b;b=b.parentNode||b.host)if(b.nodeType===1&&b.hasAttribute("data-doxa-gallery"))return!0;return!1}let w=!1;function _(){const y=u();if(!y)return;const b=i.value;i.value=p(y,c()),i.value&&!b&&Tt(()=>{const v=c();v&&p(v,v)}),!i.value&&n.standalone&&!w&&!g(y)&&(w=!0,a("standalone",!0))}function m(y){if(w&&!(y&&y.detail&&y.detail.local)){w=!1,i.value=!1,a("standalone",!1),Tt(_);return}_()}function d(){const y=c();if(y)try{y.dispatchEvent(new CustomEvent("dxmaps:mapinfo-open",{bubbles:!0,composed:!0,detail:{el:y}}))}catch{}}return Gt(()=>{Tt(_),window.addEventListener("dxmaps:mapinfo-host",m)}),It(()=>{window.removeEventListener("dxmaps:mapinfo-host",m),w&&a("standalone",!1)}),(y,b)=>i.value?(I(),Ke(bn,{key:0,ref_key:"btn",ref:l,"data-control":"map-info","is-dark":e.isDark,shape:e.shape,title:W(o)("mapInfo.open"),"aria-haspopup":"dialog","aria-expanded":"false",onClick:d},{default:Mt(()=>[...b[0]||(b[0]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[$("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor","stroke-width":"2"}),$("rect",{x:"11",y:"10",width:"2",height:"7",rx:"1",fill:"currentColor"}),$("circle",{cx:"12",cy:"7",r:"1.3",fill:"currentColor"})],-1)])]),_:1},8,["is-dark","shape","title"])):de("",!0)}},Tb="rgba(120, 128, 134, 0.28)",lp="36px",cp=()=>{};function Nb(e,t={}){const{enabled:o=!0}=t;if(!o||!e)return cp;const n=Array.from(e.querySelectorAll(".map-scroll-edge"));if(!n.length)return cp;const a=b=>b.classList.contains("map-scroll-edge--left");for(const b of n)b.style.background=`linear-gradient(${a(b)?"to right":"to left"}, ${Tb} ${lp}, transparent ${lp})`,b.style.opacity="0",b.style.transition="opacity 0.16s ease",b.style.userSelect="none",b.style.webkitUserSelect="none";const r=b=>{b.style.opacity="1"},s=b=>{b.style.opacity="0"},i=()=>n.find(b=>!a(b))||null,l=new Set;let c=!1,u=null;const p=()=>{for(const b of n)l.has(b)||s(b)},g=()=>{const b=i();b&&(r(b),u&&clearTimeout(u),u=setTimeout(p,250))},w=()=>g(),_=b=>{if(!(b.touches&&b.touches.length===1))return;const v=b.target;v&&v.classList&&v.classList.contains("map-scroll-edge")||g()},m=()=>{u&&clearTimeout(u),p()};e.addEventListener("wheel",w,{passive:!0}),e.addEventListener("touchmove",_,{passive:!0}),e.addEventListener("touchend",m,{passive:!0}),e.addEventListener("touchcancel",m,{passive:!0});const d=()=>{c||g()};typeof window<"u"&&window.addEventListener("scroll",d,{passive:!0});const y=[];for(const b of n){const v=()=>{l.add(b),r(b)},k=()=>{l.delete(b),s(b)},x=()=>{c=!0,r(b)},P=()=>{c=!1,s(b)};b.addEventListener("mouseenter",v),b.addEventListener("mouseleave",k),b.addEventListener("touchstart",x,{passive:!0}),b.addEventListener("touchend",P,{passive:!0}),y.push(()=>{b.removeEventListener("mouseenter",v),b.removeEventListener("mouseleave",k),b.removeEventListener("touchstart",x),b.removeEventListener("touchend",P)})}return function(){u&&(clearTimeout(u),u=null),e.removeEventListener("wheel",w),e.removeEventListener("touchmove",_),e.removeEventListener("touchend",m),e.removeEventListener("touchcancel",m),typeof window<"u"&&window.removeEventListener("scroll",d);for(const v of y)v();for(const v of n)s(v)}}const Ob={__name:"ZoomInButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){const{t}=ht(),o=e;function n(){var a;o.disabled||(a=o.map)==null||a.zoomIn()}return(a,r)=>(I(),Ke(bn,{"data-control":"zoom-in","is-dark":e.isDark,disabled:e.disabled,title:W(t)("buttons.zoomIn"),onClick:n},{default:Mt(()=>[...r[0]||(r[0]=[$("span",{style:{"font-size":"20px","line-height":"1","font-weight":"600"}},"+",-1)])]),_:1},8,["is-dark","disabled","title"]))}},Fb={__name:"ZoomOutButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){const{t}=ht(),o=e;function n(){var a;o.disabled||(a=o.map)==null||a.zoomOut()}return(a,r)=>(I(),Ke(bn,{"data-control":"zoom-out","is-dark":e.isDark,disabled:e.disabled,title:W(t)("buttons.zoomOut"),onClick:n},{default:Mt(()=>[...r[0]||(r[0]=[$("span",{style:{"font-size":"22px","line-height":"1","font-weight":"600"}},"−",-1)])]),_:1},8,["is-dark","disabled","title"]))}},Mb={__name:"LocationButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1},center:{type:Array,default:()=>[20,10]},zoom:{type:Number,default:1.8},userZoom:{type:Number,default:10}},setup(e){const{t}=ht(),o=e;function n(){var r;(r=o.map)==null||r.flyTo({center:o.center,zoom:o.zoom,duration:1200})}function a(){if(o.map){if(typeof navigator>"u"||!navigator.geolocation){n();return}navigator.geolocation.getCurrentPosition(r=>{const{longitude:s,latitude:i}=r.coords;Number.isFinite(s)&&Number.isFinite(i)?o.map.flyTo({center:[s,i],zoom:o.userZoom,duration:1500}):n()},()=>n(),{enableHighAccuracy:!1,timeout:5e3,maximumAge:6e4})}}return(r,s)=>(I(),Ke(bn,{"data-control":"location","is-dark":e.isDark,title:W(t)("buttons.resetView"),onClick:a},{default:Mt(()=>[...s[0]||(s[0]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},[$("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z"})],-1)])]),_:1},8,["is-dark","title"]))}},Eb={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 29 29",fill:"currentColor"},Ib={key:1,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 29 29",fill:"currentColor"},Rb={__name:"FullscreenButton",props:{mapContainer:{type:Object,default:null},isDark:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:t}){const{t:o}=ht(),n=e,a=t,r=ie(!1);let s=null,i=null,l=null,c=null,u=null,p=null,g=null,w=null,_=null,m=null,d=null,y=0,b=0,v=null,k=null;function x(){if(typeof document>"u")return!1;const ee=typeof navigator<"u"&&navigator.userAgent||"";return/iPad|iPhone|iPod/.test(ee)||ee.includes("Mac")&&typeof document<"u"&&"ontouchend"in document?!1:!!(document.fullscreenEnabled||document.webkitFullscreenEnabled)}function P(){var ee,V,se;return((se=(V=(ee=n.mapContainer)==null?void 0:ee.getRootNode)==null?void 0:V.call(ee))==null?void 0:se.host)??null}function N(){var V,se;const ee=(se=(V=n.mapContainer)==null?void 0:V.getRootNode)==null?void 0:se.call(V);return document.fullscreenElement||document.webkitFullscreenElement||(ee&&ee instanceof ShadowRoot?ee.fullscreenElement:null)||null}function R(ee){const V=ee.requestFullscreen||ee.webkitRequestFullscreen;if(!V)return Promise.reject(new Error("Fullscreen API unavailable"));const se=V.call(ee);return se&&typeof se.then=="function"?se:Promise.resolve()}function F(){const ee=document.exitFullscreen||document.webkitExitFullscreen;if(!ee)return Promise.reject(new Error("Fullscreen API unavailable"));const V=ee.call(document);return V&&typeof V.then=="function"?V:Promise.resolve()}function D(){const ee=P();if(!ee)return!1;if(l=ee,i=ee.style.cssText,ee.style.position="fixed",ee.style.top="0",ee.style.left="0",ee.style.right="0",ee.style.bottom="0",ee.style.width="100vw",ee.style.height="100vh",ee.style.height="100dvh",ee.style.zIndex="2147483647",ee.style.margin="0",ee.style.borderRadius="0",ee.style.touchAction="pan-x pan-y pinch-zoom",typeof document<"u"){y=window.scrollY||window.pageYOffset||0,b=window.scrollX||window.pageXOffset||0;const V=document.body,se=document.documentElement;c=V?V.style.overflow:null,u=se?se.style.overflow:null,p=V?V.style.position:null,g=V?V.style.top:null,w=V?V.style.left:null,_=V?V.style.width:null,m=V?V.style.touchAction:null,d=se?se.style.touchAction:null,se&&(se.style.overflow="hidden",se.style.touchAction="none"),V&&(V.style.overflow="hidden",V.style.position="fixed",V.style.top=`-${y}px`,V.style.left=`-${b}px`,V.style.width="100%",V.style.touchAction="none"),v=oe=>{if(!l)return;const ne=oe.target;ne&&(ne===l||l.contains&&l.contains(ne))||oe.cancelable&&oe.preventDefault()},k=oe=>{if(!l)return;const ne=oe.target;ne&&(ne===l||l.contains&&l.contains(ne))||oe.cancelable&&oe.preventDefault()},document.addEventListener("touchmove",v,{passive:!1,capture:!0}),document.addEventListener("wheel",k,{passive:!1,capture:!0})}return!0}function H(){if(l){if(l.style.cssText=i||"",l=null,i=null,typeof document<"u"){const ee=document.body,V=document.documentElement;ee&&(ee.style.overflow=c??"",ee.style.position=p??"",ee.style.top=g??"",ee.style.left=w??"",ee.style.width=_??"",ee.style.touchAction=m??""),V&&(V.style.overflow=u??"",V.style.touchAction=d??""),v&&(document.removeEventListener("touchmove",v,{capture:!0}),v=null),k&&(document.removeEventListener("wheel",k,{capture:!0}),k=null),typeof window<"u"&&(y||b)&&window.scrollTo(b,y)}c=null,u=null,p=null,g=null,w=null,_=null,m=null,d=null,y=0,b=0}}function j(){typeof window>"u"||window.requestAnimationFrame(()=>{window.dispatchEvent(new Event("resize"))})}function K(){if(!x()){r.value?(H(),r.value=!1,a("change",!1)):D()&&(r.value=!0,a("change",!0)),j();return}if(N())F().then(()=>{r.value=!1,a("change",!1)}).catch(()=>{});else{const V=P()??document.documentElement;R(V).then(()=>{r.value=!0,a("change",!0)}).catch(()=>{R(document.documentElement).then(()=>{r.value=!0,a("change",!0)}).catch(()=>{})})}}function ue(){r.value=!!N(),a("change",r.value)}return Gt(()=>{var V,se;document.addEventListener("fullscreenchange",ue),document.addEventListener("webkitfullscreenchange",ue);const ee=(se=(V=n.mapContainer)==null?void 0:V.getRootNode)==null?void 0:se.call(V);ee instanceof ShadowRoot&&(s=ee,ee.addEventListener("fullscreenchange",ue),ee.addEventListener("webkitfullscreenchange",ue))}),It(()=>{document.removeEventListener("fullscreenchange",ue),document.removeEventListener("webkitfullscreenchange",ue),s&&(s.removeEventListener("fullscreenchange",ue),s.removeEventListener("webkitfullscreenchange",ue),s=null),l&&H()}),(ee,V)=>(I(),Ke(bn,{"data-control":"fullscreen","is-dark":e.isDark,active:r.value,title:W(o)("buttons.toggleFullscreen"),onClick:K},{default:Mt(()=>[r.value?(I(),B("svg",Ib,[...V[1]||(V[1]=[$("path",{d:"M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z"},null,-1)])])):(I(),B("svg",Eb,[...V[0]||(V[0]=[$("path",{d:"M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z"},null,-1)])]))]),_:1},8,["is-dark","active","title"]))}},Db=Xo&&Xo.tagName.toUpperCase()==="SCRIPT"&&Xo.src||new URL("cities-internet.js",document.baseURI).href,Eo=e=>String(e||"").trim().replace(/\/+$/,"");function up(){try{const t=String(Db||"").split(/[?#]/)[0].match(/^(.*)\/([^/]+)\/([^/]+)\.js$/);return!t||t[2]!==t[3]?null:t[1]||null}catch{return null}}function Bb(e){const t=e==null?void 0:e.embedBaseUrl;if(typeof t=="string"&&t.trim())return Eo(t);if(typeof window<"u"){const o=window.MAP_EMBED_BASE_URL;if(typeof o=="string"&&o.trim())return Eo(o)}return Eo(up()||"")}function Hs(e){const t=e==null?void 0:e.assetsBase;if(typeof t=="string"&&t.trim()){const n=Eo(t);if(/^https?:\/\//i.test(n)||n.startsWith("/"))return n}const o=Eo((e==null?void 0:e.treeBase)||"")||Eo(up()||"");if(o)try{const n=typeof document<"u"?document.baseURI:void 0;return Eo(new URL(o+"/assets",n).href)}catch{return Eo(o+"/assets")}return"./assets"}function zb({shareUrl:e,embedPath:t,profileConfig:o}={}){const n=o||null,a=typeof window<"u",r=e||(n==null?void 0:n.shareUrl);if(typeof r=="string"&&r.trim())return r.trim();const s=String(t||(n==null?void 0:n.shareEmbedPath)||"").trim();if(s){if(/^https?:\/\//i.test(s))return s;if(s.startsWith("/"))return a?window.location.origin+s:s;const i=Bb(n),l=s.replace(/^\.\//,"");if(i)return i+"/"+l;if(typeof document<"u")try{return new URL(l,document.baseURI).href}catch{}return l}return a?window.location.origin+window.location.pathname:""}const Gb=["aria-label"],jb={class:"mcm-header"},Hb={class:"mcm-title"},Ub=["aria-label"],Wb={class:"mcm-body"},qb=".dsm-map-area, .rm-map-area, .dm-map-area, [data-map-area]",Us="doxa-map-menu-open",Kb={__name:"MapControlMenu",props:{open:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:Number,default:340},isDark:{type:Boolean,default:!1},maxHeight:{type:Number,default:null},height:{type:Number,default:null},matchToolbar:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:t}){const o=(_,m)=>xt(_)||m;_t(` +`,"map-control-button"),(t,o)=>(I(),B("button",{class:$e(["mcb",{dark:e.isDark,active:e.active,"mcb--square":e.shape==="square","mcb--rounded-square":e.shape==="rounded-square"}]),title:e.title,"aria-label":e.title||void 0,disabled:e.disabled,onClick:o[0]||(o[0]=n=>t.$emit("click"))},[Dn(t.$slots,"default")],10,Sb))}},Lb={__name:"MapInfoButton",props:{isDark:{type:Boolean,default:!1},standalone:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["standalone"],setup(e,{emit:t}){const{t:o}=ht(),n=e,a=t,r=Ce("mapToolbar",null),s=jt(),i=ie(!1),l=ie(null),c=()=>l.value&&l.value.$el||null,u=()=>c()||r&&r.el&&r.el.value||s&&s.proxy&&s.proxy.$el&&s.proxy.$el.parentNode||null;function p(y,b){const v={el:b,ack:!1};try{y.dispatchEvent(new CustomEvent("dxmaps:mapinfo-control",{bubbles:!0,composed:!0,detail:v}))}catch{}return v.ack===!0}function g(y){for(let b=y;b;b=b.parentNode||b.host)if(b.nodeType===1&&b.hasAttribute("data-doxa-gallery"))return!0;return!1}let w=!1;function _(){const y=u();if(!y)return;const b=i.value;i.value=p(y,c()),i.value&&!b&&Tt(()=>{const v=c();v&&p(v,v)}),!i.value&&n.standalone&&!w&&!g(y)&&(w=!0,a("standalone",!0))}function m(y){if(w&&!(y&&y.detail&&y.detail.local)){w=!1,i.value=!1,a("standalone",!1),Tt(_);return}_()}function d(){const y=c();if(y)try{y.dispatchEvent(new CustomEvent("dxmaps:mapinfo-open",{bubbles:!0,composed:!0,detail:{el:y}}))}catch{}}return Gt(()=>{Tt(_),window.addEventListener("dxmaps:mapinfo-host",m)}),It(()=>{window.removeEventListener("dxmaps:mapinfo-host",m),w&&a("standalone",!1)}),(y,b)=>i.value?(I(),Ke(bn,{key:0,ref_key:"btn",ref:l,"data-control":"map-info","is-dark":e.isDark,shape:e.shape,title:W(o)("mapInfo.open"),"aria-haspopup":"dialog","aria-expanded":"false",onClick:d},{default:Mt(()=>[...b[0]||(b[0]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[$("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor","stroke-width":"2"}),$("path",{d:"M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),$("circle",{cx:"12",cy:"17",r:"1.3",fill:"currentColor"})],-1)])]),_:1},8,["is-dark","shape","title"])):de("",!0)}},Tb="rgba(120, 128, 134, 0.28)",lp="36px",cp=()=>{};function Nb(e,t={}){const{enabled:o=!0}=t;if(!o||!e)return cp;const n=Array.from(e.querySelectorAll(".map-scroll-edge"));if(!n.length)return cp;const a=b=>b.classList.contains("map-scroll-edge--left");for(const b of n)b.style.background=`linear-gradient(${a(b)?"to right":"to left"}, ${Tb} ${lp}, transparent ${lp})`,b.style.opacity="0",b.style.transition="opacity 0.16s ease",b.style.userSelect="none",b.style.webkitUserSelect="none";const r=b=>{b.style.opacity="1"},s=b=>{b.style.opacity="0"},i=()=>n.find(b=>!a(b))||null,l=new Set;let c=!1,u=null;const p=()=>{for(const b of n)l.has(b)||s(b)},g=()=>{const b=i();b&&(r(b),u&&clearTimeout(u),u=setTimeout(p,250))},w=()=>g(),_=b=>{if(!(b.touches&&b.touches.length===1))return;const v=b.target;v&&v.classList&&v.classList.contains("map-scroll-edge")||g()},m=()=>{u&&clearTimeout(u),p()};e.addEventListener("wheel",w,{passive:!0}),e.addEventListener("touchmove",_,{passive:!0}),e.addEventListener("touchend",m,{passive:!0}),e.addEventListener("touchcancel",m,{passive:!0});const d=()=>{c||g()};typeof window<"u"&&window.addEventListener("scroll",d,{passive:!0});const y=[];for(const b of n){const v=()=>{l.add(b),r(b)},k=()=>{l.delete(b),s(b)},x=()=>{c=!0,r(b)},P=()=>{c=!1,s(b)};b.addEventListener("mouseenter",v),b.addEventListener("mouseleave",k),b.addEventListener("touchstart",x,{passive:!0}),b.addEventListener("touchend",P,{passive:!0}),y.push(()=>{b.removeEventListener("mouseenter",v),b.removeEventListener("mouseleave",k),b.removeEventListener("touchstart",x),b.removeEventListener("touchend",P)})}return function(){u&&(clearTimeout(u),u=null),e.removeEventListener("wheel",w),e.removeEventListener("touchmove",_),e.removeEventListener("touchend",m),e.removeEventListener("touchcancel",m),typeof window<"u"&&window.removeEventListener("scroll",d);for(const v of y)v();for(const v of n)s(v)}}const Ob={__name:"ZoomInButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){const{t}=ht(),o=e;function n(){var a;o.disabled||(a=o.map)==null||a.zoomIn()}return(a,r)=>(I(),Ke(bn,{"data-control":"zoom-in","is-dark":e.isDark,disabled:e.disabled,title:W(t)("buttons.zoomIn"),onClick:n},{default:Mt(()=>[...r[0]||(r[0]=[$("span",{style:{"font-size":"20px","line-height":"1","font-weight":"600"}},"+",-1)])]),_:1},8,["is-dark","disabled","title"]))}},Fb={__name:"ZoomOutButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){const{t}=ht(),o=e;function n(){var a;o.disabled||(a=o.map)==null||a.zoomOut()}return(a,r)=>(I(),Ke(bn,{"data-control":"zoom-out","is-dark":e.isDark,disabled:e.disabled,title:W(t)("buttons.zoomOut"),onClick:n},{default:Mt(()=>[...r[0]||(r[0]=[$("span",{style:{"font-size":"22px","line-height":"1","font-weight":"600"}},"−",-1)])]),_:1},8,["is-dark","disabled","title"]))}},Mb={__name:"LocationButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1},center:{type:Array,default:()=>[20,10]},zoom:{type:Number,default:1.8},userZoom:{type:Number,default:10}},setup(e){const{t}=ht(),o=e;function n(){var r;(r=o.map)==null||r.flyTo({center:o.center,zoom:o.zoom,duration:1200})}function a(){if(o.map){if(typeof navigator>"u"||!navigator.geolocation){n();return}navigator.geolocation.getCurrentPosition(r=>{const{longitude:s,latitude:i}=r.coords;Number.isFinite(s)&&Number.isFinite(i)?o.map.flyTo({center:[s,i],zoom:o.userZoom,duration:1500}):n()},()=>n(),{enableHighAccuracy:!1,timeout:5e3,maximumAge:6e4})}}return(r,s)=>(I(),Ke(bn,{"data-control":"location","is-dark":e.isDark,title:W(t)("buttons.resetView"),onClick:a},{default:Mt(()=>[...s[0]||(s[0]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},[$("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z"})],-1)])]),_:1},8,["is-dark","title"]))}},Eb={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 29 29",fill:"currentColor"},Ib={key:1,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 29 29",fill:"currentColor"},Rb={__name:"FullscreenButton",props:{mapContainer:{type:Object,default:null},isDark:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:t}){const{t:o}=ht(),n=e,a=t,r=ie(!1);let s=null,i=null,l=null,c=null,u=null,p=null,g=null,w=null,_=null,m=null,d=null,y=0,b=0,v=null,k=null;function x(){if(typeof document>"u")return!1;const ee=typeof navigator<"u"&&navigator.userAgent||"";return/iPad|iPhone|iPod/.test(ee)||ee.includes("Mac")&&typeof document<"u"&&"ontouchend"in document?!1:!!(document.fullscreenEnabled||document.webkitFullscreenEnabled)}function P(){var ee,V,se;return((se=(V=(ee=n.mapContainer)==null?void 0:ee.getRootNode)==null?void 0:V.call(ee))==null?void 0:se.host)??null}function N(){var V,se;const ee=(se=(V=n.mapContainer)==null?void 0:V.getRootNode)==null?void 0:se.call(V);return document.fullscreenElement||document.webkitFullscreenElement||(ee&&ee instanceof ShadowRoot?ee.fullscreenElement:null)||null}function R(ee){const V=ee.requestFullscreen||ee.webkitRequestFullscreen;if(!V)return Promise.reject(new Error("Fullscreen API unavailable"));const se=V.call(ee);return se&&typeof se.then=="function"?se:Promise.resolve()}function F(){const ee=document.exitFullscreen||document.webkitExitFullscreen;if(!ee)return Promise.reject(new Error("Fullscreen API unavailable"));const V=ee.call(document);return V&&typeof V.then=="function"?V:Promise.resolve()}function D(){const ee=P();if(!ee)return!1;if(l=ee,i=ee.style.cssText,ee.style.position="fixed",ee.style.top="0",ee.style.left="0",ee.style.right="0",ee.style.bottom="0",ee.style.width="100vw",ee.style.height="100vh",ee.style.height="100dvh",ee.style.zIndex="2147483647",ee.style.margin="0",ee.style.borderRadius="0",ee.style.touchAction="pan-x pan-y pinch-zoom",typeof document<"u"){y=window.scrollY||window.pageYOffset||0,b=window.scrollX||window.pageXOffset||0;const V=document.body,se=document.documentElement;c=V?V.style.overflow:null,u=se?se.style.overflow:null,p=V?V.style.position:null,g=V?V.style.top:null,w=V?V.style.left:null,_=V?V.style.width:null,m=V?V.style.touchAction:null,d=se?se.style.touchAction:null,se&&(se.style.overflow="hidden",se.style.touchAction="none"),V&&(V.style.overflow="hidden",V.style.position="fixed",V.style.top=`-${y}px`,V.style.left=`-${b}px`,V.style.width="100%",V.style.touchAction="none"),v=oe=>{if(!l)return;const ne=oe.target;ne&&(ne===l||l.contains&&l.contains(ne))||oe.cancelable&&oe.preventDefault()},k=oe=>{if(!l)return;const ne=oe.target;ne&&(ne===l||l.contains&&l.contains(ne))||oe.cancelable&&oe.preventDefault()},document.addEventListener("touchmove",v,{passive:!1,capture:!0}),document.addEventListener("wheel",k,{passive:!1,capture:!0})}return!0}function H(){if(l){if(l.style.cssText=i||"",l=null,i=null,typeof document<"u"){const ee=document.body,V=document.documentElement;ee&&(ee.style.overflow=c??"",ee.style.position=p??"",ee.style.top=g??"",ee.style.left=w??"",ee.style.width=_??"",ee.style.touchAction=m??""),V&&(V.style.overflow=u??"",V.style.touchAction=d??""),v&&(document.removeEventListener("touchmove",v,{capture:!0}),v=null),k&&(document.removeEventListener("wheel",k,{capture:!0}),k=null),typeof window<"u"&&(y||b)&&window.scrollTo(b,y)}c=null,u=null,p=null,g=null,w=null,_=null,m=null,d=null,y=0,b=0}}function j(){typeof window>"u"||window.requestAnimationFrame(()=>{window.dispatchEvent(new Event("resize"))})}function K(){if(!x()){r.value?(H(),r.value=!1,a("change",!1)):D()&&(r.value=!0,a("change",!0)),j();return}if(N())F().then(()=>{r.value=!1,a("change",!1)}).catch(()=>{});else{const V=P()??document.documentElement;R(V).then(()=>{r.value=!0,a("change",!0)}).catch(()=>{R(document.documentElement).then(()=>{r.value=!0,a("change",!0)}).catch(()=>{})})}}function ue(){r.value=!!N(),a("change",r.value)}return Gt(()=>{var V,se;document.addEventListener("fullscreenchange",ue),document.addEventListener("webkitfullscreenchange",ue);const ee=(se=(V=n.mapContainer)==null?void 0:V.getRootNode)==null?void 0:se.call(V);ee instanceof ShadowRoot&&(s=ee,ee.addEventListener("fullscreenchange",ue),ee.addEventListener("webkitfullscreenchange",ue))}),It(()=>{document.removeEventListener("fullscreenchange",ue),document.removeEventListener("webkitfullscreenchange",ue),s&&(s.removeEventListener("fullscreenchange",ue),s.removeEventListener("webkitfullscreenchange",ue),s=null),l&&H()}),(ee,V)=>(I(),Ke(bn,{"data-control":"fullscreen","is-dark":e.isDark,active:r.value,title:W(o)("buttons.toggleFullscreen"),onClick:K},{default:Mt(()=>[r.value?(I(),B("svg",Ib,[...V[1]||(V[1]=[$("path",{d:"M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z"},null,-1)])])):(I(),B("svg",Eb,[...V[0]||(V[0]=[$("path",{d:"M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z"},null,-1)])]))]),_:1},8,["is-dark","active","title"]))}},Db=Xo&&Xo.tagName.toUpperCase()==="SCRIPT"&&Xo.src||new URL("cities-internet.js",document.baseURI).href,Eo=e=>String(e||"").trim().replace(/\/+$/,"");function up(){try{const t=String(Db||"").split(/[?#]/)[0].match(/^(.*)\/([^/]+)\/([^/]+)\.js$/);return!t||t[2]!==t[3]?null:t[1]||null}catch{return null}}function Bb(e){const t=e==null?void 0:e.embedBaseUrl;if(typeof t=="string"&&t.trim())return Eo(t);if(typeof window<"u"){const o=window.MAP_EMBED_BASE_URL;if(typeof o=="string"&&o.trim())return Eo(o)}return Eo(up()||"")}function Hs(e){const t=e==null?void 0:e.assetsBase;if(typeof t=="string"&&t.trim()){const n=Eo(t);if(/^https?:\/\//i.test(n)||n.startsWith("/"))return n}const o=Eo((e==null?void 0:e.treeBase)||"")||Eo(up()||"");if(o)try{const n=typeof document<"u"?document.baseURI:void 0;return Eo(new URL(o+"/assets",n).href)}catch{return Eo(o+"/assets")}return"./assets"}function zb({shareUrl:e,embedPath:t,profileConfig:o}={}){const n=o||null,a=typeof window<"u",r=e||(n==null?void 0:n.shareUrl);if(typeof r=="string"&&r.trim())return r.trim();const s=String(t||(n==null?void 0:n.shareEmbedPath)||"").trim();if(s){if(/^https?:\/\//i.test(s))return s;if(s.startsWith("/"))return a?window.location.origin+s:s;const i=Bb(n),l=s.replace(/^\.\//,"");if(i)return i+"/"+l;if(typeof document<"u")try{return new URL(l,document.baseURI).href}catch{}return l}return a?window.location.origin+window.location.pathname:""}const Gb=["aria-label"],jb={class:"mcm-header"},Hb={class:"mcm-title"},Ub=["aria-label"],Wb={class:"mcm-body"},qb=".dsm-map-area, .rm-map-area, .dm-map-area, [data-map-area]",Us="doxa-map-menu-open",Kb={__name:"MapControlMenu",props:{open:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:Number,default:340},isDark:{type:Boolean,default:!1},maxHeight:{type:Number,default:null},height:{type:Number,default:null},matchToolbar:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:t}){const o=(_,m)=>xt(_)||m;_t(` .mcm{position:absolute;z-index:var(--z-menu,3000);display:flex;flex-direction:column;box-sizing:border-box; background:#161b22;border:1px solid #30363d;border-radius:12px;box-shadow:0 6px 24px rgba(0,0,0,0.45); color:#e6edf3;font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:13px; diff --git a/public/dx-maps/cities-internet/connectivity-list/index.html b/public/dx-maps/cities-internet/connectivity-list/index.html index 5d27931e5..95c8d2618 100644 --- a/public/dx-maps/cities-internet/connectivity-list/index.html +++ b/public/dx-maps/cities-internet/connectivity-list/index.html @@ -61,7 +61,7 @@ - + - + - + - + - + - + - + \n\n\n" + "script": "\n\n\n" } }, { @@ -145,8 +145,8 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -162,7 +162,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } } ] @@ -266,7 +266,7 @@ "bundle": "dashboard-plus-grid", "scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js", "output": "dx-maps/dashboard-plus-grid/dashboard-plus-grid.js", - "integrity": "sha384-PvIlMdrt01stdoJK45cLsA//xmVsT93PIIoo1nDmSbSFJTCv8to2HCkdTL/YKBso", + "integrity": "sha384-8sk7fY26f+eMLOwBerZdjUH7GNYnEWj2clP3i6dNZt1TMB5fcHHliuaumfO7XBT7", "elements": [ "dashboard-plus-grid" ], @@ -290,8 +290,8 @@ "scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "instances": [ { @@ -361,7 +361,7 @@ "bundle": "doxa-maps-spa", "scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js", "output": "dx-maps/doxa-maps-spa/doxa-maps-spa.js", - "integrity": "sha384-EdyFRzEfPtXgEry6E+h7wl3MdWoQlTxr1I+8LZOQ888LxqzlTbM08XbMZq5qIeKy", + "integrity": "sha384-sW6vaNdZBtWMZXTy4zyVRAij2cYKLTdC3T/Yqnettso/4u4CmAm0uqtzWMlm3etp", "elements": [ "doxa-maps-spa" ], @@ -389,7 +389,7 @@ "scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" }, "instances": [ { @@ -416,7 +416,7 @@ "bundle": "doxa-research-map", "scriptUrl": "./doxa-research-map/doxa-research-map.js", "output": "dx-maps/doxa-research-map/doxa-research-map.js", - "integrity": "sha384-KNPtos3z613NAADL0m0hER7OkYn9KqwXOBJ/DzSwCQv75+btRG2B+oxvq/r3cyPi", + "integrity": "sha384-3Fg88Qriwe4tz75+RVPGlBgIGqXTZ3thT9umW4SrXR1vzyda9ILiCqJRa90AvagQ", "elements": [ "doxa-research-map" ], @@ -435,8 +435,8 @@ "scriptUrl": "./doxa-research-map/doxa-research-map.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "instances": [ { @@ -462,7 +462,7 @@ "bundle": "doxa-simple-map", "scriptUrl": "./doxa-simple-map/doxa-simple-map.js", "output": "dx-maps/doxa-simple-map/doxa-simple-map.js", - "integrity": "sha384-/OEzi7tWKjcOTtbt5TuXpXZNw8pmc3IjiKvTDh6mA/LkavsMPaZ5xODosb9R7SZu", + "integrity": "sha384-7VEwsO7h3yQDHGvwNU+hD8RCLZXDpNpheKty3a1G5RVJxN16iExF4vLCspvJZOx8", "elements": [ "doxa-map", "doxa-simple-map" @@ -482,8 +482,8 @@ "scriptUrl": "./doxa-simple-map/doxa-simple-map.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "instances": [ { @@ -782,7 +782,7 @@ "bundle": "gospel-resources", "scriptUrl": "./gospel-resources/gospel-resources.js", "output": "dx-maps/gospel-resources/gospel-resources.js", - "integrity": "sha384-3UdR/WVqINM0sD+uhnHvDL/7+GYvL8CQBu6liNR9ylLvnvnPzHPwrkcpDuiG7PwY", + "integrity": "sha384-9kJ3gBJ631d7KB1luJ6K4G70DSkHuJOr4gsUuylIPjoo9yAmfMfuuwPq/iNWQTNB", "elements": [ "gospel-resources-map" ], @@ -805,7 +805,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -821,7 +821,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -837,8 +837,8 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -854,7 +854,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -870,8 +870,8 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } } ] @@ -1192,7 +1192,7 @@ "bundle": "research-dashboard", "scriptUrl": "./research-dashboard/research-dashboard.js", "output": "dx-maps/research-dashboard/research-dashboard.js", - "integrity": "sha384-4fRXJ7mIFLaRPObkuHorKSF6/qlevnVqLnzC56xTYU4CrLhGJRzvJhoyl5z4st1Z", + "integrity": "sha384-iZ5r/lnLROwFUySFeiBBYCBNDGmmDHr04Ry4+I8xP1kvDqkRurrYtYzrnseHLUAa", "elements": [ "research-dashboard-map" ], @@ -1211,8 +1211,8 @@ "scriptUrl": "./research-dashboard/research-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "bundle": "research-dashboard" } diff --git a/public/dx-maps/doxa-research-map/doxa-research-map.js b/public/dx-maps/doxa-research-map/doxa-research-map.js index 62b83b87d..616ec2b6a 100644 --- a/public/dx-maps/doxa-research-map/doxa-research-map.js +++ b/public/dx-maps/doxa-research-map/doxa-research-map.js @@ -80,7 +80,7 @@ @media (prefers-reduced-motion: reduce) { .pin-hint, .pin-hint-pill, .pin-hint-dot::after { animation: none !important; } } -`,"pin-hint"),(F,U)=>c.value?Ms((ne(),me("div",{key:0,ref_key:"hintEl",ref:m,class:Ke(["pin-hint",{dark:i.value}]),role:"status"},[R("span",Wy,[U[0]||(U[0]=R("span",{class:"pin-hint-dot","aria-hidden":"true"},null,-1)),Ht(" "+ye(l.value)+" ",1),R("button",{class:"pin-hint-x",type:"button","aria-label":t("aria.dismissHint","Dismiss hint"),onClick:K},"×",8,qy)])],2)),[[ip,u.value&&f.value]]):Re("",!0)}},Vy=".lsn-bar[data-v-9a589f6f]{display:flex;align-items:flex-start;gap:8px;flex:none;margin:0;padding-block:8px;padding-inline:12px 8px;background:#fff8e1;border-block-end:1px solid #f0d68a;color:#4a3b00;font:400 13px/1.4 system-ui,-apple-system,Segoe UI,sans-serif}.lsn-bar__text[data-v-9a589f6f]{flex:1 1 auto;margin:0}.lsn-bar__x[data-v-9a589f6f]{flex:none;min-width:24px;min-height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:inherit;font:600 18px/1 system-ui,sans-serif;cursor:pointer}.lsn-bar__x[data-v-9a589f6f]:focus-visible{outline:2px solid #1a73e8;outline-offset:2px}.lsn-block[data-v-9a589f6f]{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;min-height:200px;padding:24px;background:#f7f7f5;color:#333;text-align:center;font:400 15px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}.lsn-block__text[data-v-9a589f6f]{max-width:28em;margin:0}",ln=(e,t)=>{const o=e.__vccOpts||e;for(const[n,a]of t)o[n]=a;return o},Yy={key:0,class:"lsn-block",role:"status"},Zy={class:"lsn-block__text"},Jy={key:0},Xy={key:1,class:"lsn-bar",role:"note"},Qy={class:"lsn-bar__text"},e1=["aria-label","title"],Zg=ln({__name:"LargerScreenNotice",props:{mode:{type:String,required:!0},label:{type:String,default:""},locale:{type:String,default:""}},emits:["dismiss"],setup(e){const t=e,o=(s,i)=>ao(s,t.locale||void 0)||i,n=te(()=>o("messages.largerScreenNotice","This experimental map is built for larger screens. It opens here, but parts of it may not fit or work well on a phone.")),a=te(()=>o("messages.noticeDismiss","Dismiss")),r=te(()=>o("messages.desktopOnlyNotice","{label} only supports desktop — open this page on a desktop to use it.").split("{label}"));return(s,i)=>e.mode==="desktop-only"?(ne(),me("div",Yy,[R("p",Zy,[Ht(ye(r.value[0]),1),r.value.length>1?(ne(),me("bdi",Jy,ye(e.label),1)):Re("",!0),Ht(ye(r.value[1]||""),1)])])):(ne(),me("div",Xy,[R("p",Qy,ye(n.value),1),R("button",{type:"button",class:"lsn-bar__x","aria-label":a.value,title:a.value,onClick:i[0]||(i[0]=l=>s.$emit("dismiss"))},"×",8,e1)]))}},[["styles",[Vy]],["__scopeId","data-v-9a589f6f"]]),t1="(max-width: 639.98px)";function o1(e){for(let t=e;t;t=t.parentNode||t.host)if(t.nodeType===1&&t.hasAttribute("data-doxa-gallery"))return!0;return!1}function n1(e){var l;const t=te(()=>{var u;const c=(u=e.value)==null?void 0:u.mobile;return c==="desktop-only"||c==="larger-screens"?c:null});let o=null;try{o=i$()}catch{o=null}const n=o?o1(o):!1,a=we(!1);if(typeof window<"u"&&typeof window.matchMedia=="function"){const c=window.matchMedia(t1);a.value=c.matches;const u=d=>{a.value=d.matches};(l=c.addEventListener)==null||l.call(c,"change",u),ho(()=>{var d;return(d=c.removeEventListener)==null?void 0:d.call(c,"change",u)})}const r=te(()=>{var c;return`dx-maps:larger-screens-dismissed:${((c=e.value)==null?void 0:c.profile)||""}`}),s=we(!1);Ue(r,c=>{try{s.value=sessionStorage.getItem(c)==="1"}catch{s.value=!1}},{immediate:!0});function i(){s.value=!0;try{sessionStorage.setItem(r.value,"1")}catch{}}return{flag:t,blocked:te(()=>t.value==="desktop-only"&&a.value&&!n),advise:te(()=>t.value==="larger-screens"&&a.value&&!n&&!s.value),dismiss:i,label:te(()=>{var c,u;return String(((c=e.value)==null?void 0:c.mobileLabel)||((u=e.value)==null?void 0:u.profile)||"")})}}const pi="mapbox://styles/mapbox/standard",a1=pi,r1=pi,s1=!1,Jg={lightPreset:"night",theme:"default"},i1={lightPreset:"day",theme:"monochrome"};function l1(e){return e?/affinity|region|language/i.test(String(e))?"light":"dark":null}function c1(e){let t=!1;const o=new WeakSet;function n(){return!1}function a(){return n()?"night":"day"}let r="dark";function s(b){return l1(b)}function i(b,m){b!=="light"&&b!=="dark"||(r=b,m&&y(m))}function l(){return{...r==="light"?i1:Jg}}function c(){return pi}function u(){return{basemap:l()}}function d(b,m){try{return typeof b.getConfigProperty=="function"?b.getConfigProperty("basemap",m):void 0}catch{return}}function f(b){return!!b&&typeof b.setConfigProperty=="function"&&typeof b.getConfigProperty=="function"}function x(b,m=!1){if(!f(b))return!1;const $=l();let p=!1;try{for(const[_,h]of Object.entries($))!m&&d(b,_)===h||(b.setConfigProperty("basemap",_,h),p=!0)}catch(_){console.warn("[useMapTheme] setConfigProperty failed:",_)}return p}function S(b){if(!o.has(b)&&(o.add(b),!!f(b)))try{b.on("style.load",()=>x(b)),b.on("styledata",()=>x(b))}catch{}}function y(b){if(!b)return;if(S(b),x(b)&&!t){t=!0;try{b.once("idle",()=>{t=!1,x(b,!0)})}catch{t=!1}}}function g(b){e.toggleTheme(),y(b)}return{setLook:i,lookFor:s,STANDARD_STYLE:pi,LIGHT_STYLE:a1,DARK_STYLE:r1,isDarkTheme:n,lightPreset:a,basemapConfig:l,bootStyle:c,bootConfig:u,applyTheme:y,swapTheme:g}}let u1=0;const d1=Rl("ui",{state:()=>({_storeInstanceId:++u1,theme:"light",colorScheme:"default",reducedMotion:!1,highContrast:!1,activeTab:"doxa-regions",sidebarCollapsed:!1,mobileMenuOpen:!1,legendState:"collapsed",_customLegendHeight:null,searchMode:!1,hamburgerMenuOpen:!1,legendMode:"prayer",prayerFilter:null,engagementFilter:null,adoptionFilter:null,religionFilter:null,selectedPeopleGroup:null,breakpoint:"desktop",windowSize:{width:window.innerWidth,height:window.innerHeight},toasts:[],nextToastId:1,toastDuration:5e3,openModals:[],modalData:new Map,isGlobalLoading:!1,globalLoadingMessage:"Loading...",loadingStates:new Map,interactionHistory:[],maxHistoryLength:20,keyboardShortcutsEnabled:!0,screenReaderAnnouncement:"",focusTrapActive:!1,debugMode:!1,showPerformanceOverlay:!1}),getters:{isDarkTheme:e=>!1,isMobile:e=>e.breakpoint==="mobile",isTablet:e=>e.breakpoint==="tablet",isDesktop:e=>e.breakpoint==="desktop"||e.breakpoint==="wide",legendHeight:e=>e._customLegendHeight?e._customLegendHeight:e.legendState==="collapsed"?"48px":e.legendState==="open"?"30%":e.legendState==="fullyOpen"?"calc(100% - 80px)":"48px",caretRotation:e=>e.legendState==="collapsed"?0:90,showPullTab:e=>e.legendState==="open"||e.legendState==="fullyOpen",getToastsByType:e=>t=>e.toasts.filter(o=>o.type===t),hasOpenModal:e=>e.openModals.length>0,topModal:e=>e.openModals.length===0?null:e.openModals[e.openModals.length-1],isModalOpen:e=>t=>e.openModals.includes(t),isAnyLoading:e=>e.isGlobalLoading||e.loadingStates.size>0,isLoading:e=>t=>e.loadingStates.get(t)||!1},actions:{setTheme(e){if(!["light","dark","auto"].includes(e))return;e="light",this.theme=e;const o=this.isDarkTheme;document.documentElement.setAttribute("data-theme",o?"dark":"light");try{localStorage.setItem("theme",e)}catch{}},toggleTheme(){const e=this.theme==="light"?"dark":"light";this.setTheme(e)},setColorScheme(e){this.colorScheme=e,document.documentElement.setAttribute("data-color-scheme",e)},toggleReducedMotion(){this.reducedMotion=!this.reducedMotion,document.documentElement.setAttribute("data-reduced-motion",this.reducedMotion)},toggleHighContrast(){this.highContrast=!this.highContrast,document.documentElement.setAttribute("data-high-contrast",this.highContrast)},setActiveTab(e){this.activeTab=e,this.addToHistory({type:"tab-change",tabId:e,timestamp:Date.now()})},toggleSidebar(){this.sidebarCollapsed=!this.sidebarCollapsed},openMobileMenu(){this.mobileMenuOpen=!0},closeMobileMenu(){this.mobileMenuOpen=!1},setLegendMode(e){["prayer","detail"].includes(e)&&(this.legendMode=e)},setPrayerFilter(e){[null,"noPrayer","hasPrayer","fullPrayer"].includes(e)&&(this.prayerFilter=e)},setEngagementFilter(e){[null,"notEngaged","hasEngagement"].includes(e)&&(this.engagementFilter=e)},setAdoptionFilter(e){[null,"notAdopted","hasAdoption"].includes(e)&&(this.adoptionFilter=e)},setReligionFilter(e){[null,"C","M","H","B","E","J","S","N","O","U"].includes(e)&&(this.religionFilter=e)},selectPeopleGroup(e){const t=e&&!this.selectedPeopleGroup;this.selectedPeopleGroup=e,e?(t&&(this._legendStateBeforeDetail=this.legendState),this.legendState="open",this._customLegendHeight=null,this.setLegendMode("detail")):(this._legendStateBeforeDetail&&(this.legendState=this._legendStateBeforeDetail),this._legendStateBeforeDetail=null,this._customLegendHeight=null,this.setLegendMode("prayer"))},setLegendState(e){["collapsed","open","fullyOpen"].includes(e)&&(this.legendState=e)},toggleSearchMode(){this.searchMode=!this.searchMode},setSearchMode(e){this.searchMode=e},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},updateBreakpoint(e){let t;e<768?t="mobile":e<1024?t="tablet":e<1920?t="desktop":t="wide",t!==this.breakpoint&&(this.breakpoint=t)},updateWindowSize(e,t){this.windowSize.width=e,this.windowSize.height=t,this.updateBreakpoint(e)},showToast(e){const{message:t,type:o="info",duration:n=this.toastDuration,action:a=null,persistent:r=!1}=e,s={id:this.nextToastId++,message:t,type:o,duration:n,action:a,persistent:r,createdAt:Date.now()};return this.toasts.push(s),!r&&n>0&&setTimeout(()=>{this.removeToast(s.id)},n),s.id},showSuccess(e,t={}){return this.showToast({message:e,type:"success",...t})},showError(e,t={}){return this.showToast({message:e,type:"error",duration:7e3,...t})},showWarning(e,t={}){return this.showToast({message:e,type:"warning",...t})},showInfo(e,t={}){return this.showToast({message:e,type:"info",...t})},removeToast(e){const t=this.toasts.findIndex(o=>o.id===e);t!==-1&&this.toasts.splice(t,1)},clearAllToasts(){this.toasts=[]},openModal(e,t={}){this.openModals.includes(e)||(this.openModals.push(e),this.modalData.set(e,t),this.focusTrapActive=!0)},closeModal(e=null){if(e){const t=this.openModals.indexOf(e);t!==-1&&(this.openModals.splice(t,1),this.modalData.delete(e))}else{const t=this.openModals.pop();t&&this.modalData.delete(t)}this.openModals.length===0&&(this.focusTrapActive=!1)},closeAllModals(){this.openModals=[],this.modalData.clear(),this.focusTrapActive=!1},getModalData(e){return this.modalData.get(e)},showGlobalLoading(e="Loading..."){this.isGlobalLoading=!0,this.globalLoadingMessage=e},hideGlobalLoading(){this.isGlobalLoading=!1},setLoading(e,t=!0){t?this.loadingStates.set(e,!0):this.loadingStates.delete(e)},addToHistory(e){this.interactionHistory.push(e),this.interactionHistory.length>this.maxHistoryLength&&this.interactionHistory.shift()},clearHistory(){this.interactionHistory=[]},announce(e,t="polite"){this.screenReaderAnnouncement=e,setTimeout(()=>{this.screenReaderAnnouncement===e&&(this.screenReaderAnnouncement="")},1e3)},toggleKeyboardShortcuts(){this.keyboardShortcutsEnabled=!this.keyboardShortcutsEnabled},toggleDebugMode(){this.debugMode=!this.debugMode},togglePerformanceOverlay(){this.showPerformanceOverlay=!this.showPerformanceOverlay},toggleLegend(){this.legendState==="fullyOpen"?this.legendState="open":this.legendState==="open"?this.legendState="collapsed":this.legendState="open",this._customLegendHeight=null},openLegend(){this.legendState="open",this._customLegendHeight=null},fullyOpenLegend(){this.legendState="fullyOpen",this._customLegendHeight=null},collapseLegend(){this.legendState="collapsed",this._customLegendHeight=null},setLegendHeight(e){this._customLegendHeight=e},handleLegendItemClick(){this.legendState==="fullyOpen"&&(this.legendState="open")},enableSearchMode(){this.searchMode=!0},disableSearchMode(){this.searchMode=!1},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},openHamburgerMenu(){this.hamburgerMenuOpen=!0},closeHamburgerMenu(){this.hamburgerMenuOpen=!1},init(){let e=null;try{e=localStorage.getItem("theme")}catch{}e&&this.setTheme(e),new ResizeObserver(o=>{for(const n of o)this.updateWindowSize(n.contentRect.width,n.contentRect.height)}).observe(document.documentElement),window.matchMedia&&(window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",o=>{this.theme==="auto"&&document.documentElement.setAttribute("data-theme",o.matches?"dark":"light")}),window.matchMedia("(prefers-reduced-motion: reduce)").addEventListener("change",o=>{this.reducedMotion=o.matches,document.documentElement.setAttribute("data-reduced-motion",o.matches)}))}}}),p1=Rl("map",{state:()=>({maps:{},activeMapId:null,selectedRegion:null,selectedFamily:null,selectedAffinityBlock:null,selectedLanguage:null,selectedDialect:null,activeLegendTab:"family",selectedResource:null,selectedPeopleGroup:null,selectedPinIds:[],globalFilters:{},searchQuery:"",autoFly:{isActive:!1,speed:1,interval:5e3,currentIndex:0,items:[],timerId:null},guidedTour:{isActive:!1,currentStep:0,steps:[]},showClusters:!1,clusterMode:"region",clusteringMode:"off",clusterPinOpacity:.6,clusterFilterProperty:null,clusterFilterValue:null,flySpeed:"normal",fullscreenMapId:null,preferences:{theme:"light",defaultMapStyle:"streets",enableAnimations:!0,autoSavePreferences:!0}}),getters:{getMapById:e=>t=>e.maps[t],activeMap:e=>e.activeMapId?e.maps[e.activeMapId]:null,hasMap:e=>t=>t in e.maps,allMapIds:e=>Object.keys(e.maps),hasSelection:e=>!!(e.selectedRegion||e.selectedFamily||e.selectedAffinityBlock||e.selectedPeopleGroup),isAutoFlying:e=>e.autoFly.isActive,isGuidedTourActive:e=>e.guidedTour.isActive,isMapFullscreen:e=>t=>e.fullscreenMapId===t},actions:{registerMap(e,t,o={}){let n=1.5;o.zoom!==void 0?n=o.zoom:t&&typeof t.getZoom=="function"&&(n=t.getZoom());let a=[0,0];if(o.center)a=o.center;else if(t&&typeof t.getCenter=="function"){const r=t.getCenter();r&&(a=[r.lng,r.lat])}this.maps[e]={instance:t,config:o,isReady:!1,zoom:n,center:a,registeredAt:Date.now()},this.activeMapId||(this.activeMapId=e)},setMapReady(e){const t=this.maps[e];t&&(t.isReady=!0)},updateMapState(e,t){const o=this.maps[e];o&&Object.assign(o,t)},unregisterMap(e){if(delete this.maps[e],this.activeMapId===e){const t=this.allMapIds;this.activeMapId=t.length>0?t[0]:null}},setActiveMap(e){e in this.maps&&(this.activeMapId=e)},selectRegion(e){this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedRegion=e},selectFamily(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedFamily=e},setActiveLegendTab(e){this.activeLegendTab=e},selectLanguage(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedFamily=null,this.selectedDialect=null,this.selectedLanguage=e},selectDialect(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedDialect=e},selectAffinityBlock(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedPeopleGroup=null,this.selectedAffinityBlock=e},selectPeopleGroup(e){this.selectedPeopleGroup=e},selectResource(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedResource===e?this.selectedResource=null:this.selectedResource=e},clearSelections(){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedAffinityBlock=null,this.selectedResource=null,this.selectedPeopleGroup=null,this.selectedPinIds=[],this.showClusters=!1,this.clusterMode="region"},setSelectedPinIds(e){this.selectedPinIds=e||[]},setFilter(e,t){this.globalFilters[e]=t},removeFilter(e){delete this.globalFilters[e]},clearFilters(){this.globalFilters={},this.searchQuery=""},setSearchQuery(e){this.searchQuery=e},startAutoFly(e,t=1){this.stopAutoFly(),this.autoFly.isActive=!0,this.autoFly.speed=t,this.autoFly.items=e,this.autoFly.currentIndex=0},stopAutoFly(){this.autoFly.timerId&&(clearInterval(this.autoFly.timerId),this.autoFly.timerId=null),this.autoFly.isActive=!1,this.autoFly.currentIndex=0},setAutoFlySpeed(e){this.autoFly.speed=Math.max(.5,Math.min(2,e))},nextAutoFlyItem(){if(!this.autoFly.isActive||this.autoFly.items.length===0)return;this.autoFly.currentIndex=(this.autoFly.currentIndex+1)%this.autoFly.items.length;const e=this.autoFly.items[this.autoFly.currentIndex];e.type==="region"?this.selectRegion(e):e.type==="family"&&this.selectFamily(e)},toggleClusters(e){typeof e=="boolean"?this.showClusters=e:this.showClusters=!this.showClusters},setClusterMode(e){["region","language-family","affinity-block","mst","resource"].includes(e)&&(this.clusterMode=e)},setClusteringMode(e){["off","mapbox","mst","network"].includes(e)&&(this.clusteringMode=e,this.showClusters=e!=="off")},setClusterFilter(e,t){this.clusterFilterProperty=e||null,this.clusterFilterValue=t||null},clearClusterFilter(){this.clusterFilterProperty=null,this.clusterFilterValue=null},setFlySpeed(e){["slow","normal","fast"].includes(e)&&(this.flySpeed=e)},setSelectedFamily(e){this.selectFamily(e)},clearSelectedFamily(){this.selectFamily(null)},setSelectedRegion(e){this.selectRegion(e)},clearSelectedRegion(){this.selectRegion(null)},clearSelectedResource(){this.selectResource(null)},clearSelectedLanguage(){this.selectLanguage(null)},clearSelectedDialect(){this.selectDialect(null)},toggleFullscreen(e){this.fullscreenMapId===e?this.fullscreenMapId=null:this.fullscreenMapId=e},loadPreferences(){try{const e=localStorage.getItem("mapUserPreferences");if(e){const t=JSON.parse(e);this.preferences={...this.preferences,...t}}}catch(e){console.error("[mapStore] Failed to load preferences:",e)}},savePreferences(){try{localStorage.setItem("mapUserPreferences",JSON.stringify(this.preferences))}catch(e){console.error("[mapStore] Failed to save preferences:",e)}},setPreference(e,t){this.preferences[e]=t,this.preferences.autoSavePreferences&&this.savePreferences()}}}),g1=Rl("data",{state:()=>({sources:{},loadingStates:{}}),actions:{async load(e,t){if(!this.sources[e]){this.loadingStates[e]={isLoading:!0,error:null};try{const o=await t();this.sources[e]=Ra({features:o,timestamp:Date.now()}),this.loadingStates[e]={isLoading:!1,error:null}}catch(o){console.error(`[dataStore] Failed to load source "${e}":`,o),this.loadingStates[e]={isLoading:!1,error:o}}}},clearSource(e){delete this.sources[e],delete this.loadingStates[e]},cacheSourceData(e,t){this.sources[e]=Ra({features:t.normalizedData||[],timestamp:t.timestamp||Date.now()})},hasSourceData(e){return!!this.sources[e]},getSourceData(e){return this.sources[e]?{normalizedData:this.sources[e].features}:null}},getters:{getData:e=>t=>{var o;return((o=e.sources[t])==null?void 0:o.features)??null},isLoading:e=>t=>{var o;return((o=e.loadingStates[t])==null?void 0:o.isLoading)??!1},getError:e=>t=>{var o;return((o=e.loadingStates[t])==null?void 0:o.error)??null}}}),ma={_meta:{_comment:"Single source of truth for data-source connections across all doxa-maps bundles.",_comment_token:"Mapbox access token is fetched at runtime from window.MAP_TOKEN_URL (same modular pattern as window.MAP_APP_API_URL). Not hardcoded to any host — set mapboxTokenUrl below or override window.MAP_TOKEN_URL on the host page.",mapboxTokenUrl:"window.MAP_TOKEN_URL"},activeSource:"pray-tools",sources:{"pray-tools":{id:"pray-tools",name:"Prayer.Tools API",type:"rest-api",description:"pray.doxa.life live API — people-group prayer, engagement, and adoption data. Base URL read from window.MAP_APP_API_URL or VITE_API_BASE_URL at runtime.",endpoints:{bulk:"/api/people-groups/list",detail:"/api/people-groups/detail/{slug}",statistics:"/api/people-groups/statistics"},queryParams:{lang:"en"},defaultFields:["slug","name","latitude","longitude","wagf_region","wagf_block","wagf_member","rop1","imb_reg_of_people_2","imb_reg_of_people_25","imb_reg_of_people_3","country_code","religion","population","has_photo","image_url","people_praying","people_committed","adopted_by_churches","engagement_status","imb_gsec","primary_language","imb_language_family","imb_language_class","imb_language_speakers"],pollFields:["slug","people_praying"],pollInterval:3e5,fallbackSourceId:null,fieldMappings:{uniqueId:"slug",slug:"slug",name:"name",latitude:"latitude",longitude:"longitude",wagfRegion:"wagf_region",doxaRegion:"wagf_region",wagfBlock:"wagf_block",wagfMember:"wagf_member",affinityBlock:"rop1",countryIso:"country_code",religion:"religion",religionCode:"religion",population:"population",hasPhoto:"has_photo",imageUrl:"image_url",photoUrl:"image_url",peoplePraying:"people_praying",peopleCommitted:"people_committed",engagementStatus:"engagement_status",adoptionStatus:"adopted_by_churches",language:"primary_language",cluster:"imb_reg_of_people_2",peopleGroup:"imb_reg_of_people_25",peopleGroupCountry:"imb_reg_of_people_3",languageFamily:"imb_language_family",languageClass:"imb_language_class",languageSpeakers:"imb_language_speakers"},imageConfig:{useField:"imageUrl",fallbackField:null,fallbackUrlTemplate:null,placeholderUrl:"https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg",useSvgPlaceholder:!0}},"doxa-csv":{id:"doxa-csv",name:"DOXA People Groups CSV",type:"csv",path:"assets/data/Joshua-project-ids-Doxa-1439.csv",description:"People groups dataset from DOXA / Joshua Project",fieldMappings:{uniqueId:"ROP3",peopleGroupId:"ROP3",countryCode:"ROG",peopleId3:"PeopleID3",name:"Name",displayName:"NmDisp",alternateName:"NmAlt",description:"PeopleDesc",locationDescription:"LocationDe",country:"Ctry",countryIso:"ISOalpha3",region:"Regn",subRegion:"RegnSub",wagfRegion:"WAGF Region",doxaRegion:"WAGF Region",wagfBlock:"WAGF BLOCK",affinityBloc:"Affbloc",affinityBlock:"ROP1",affinityCode:"AffCd",affinityName:"Aff",peopleCluster:"PplClstr",ethneName:"Ethne",latitude:"Latitude",longitude:"Longitude",population:"Pop",populationClass:"PopCls",status:"Status",engagementStatus:"EngStat",evangelicalLevel:"EvngLvl",gsec:"GSEC",gsecBrief:"GSECbrf",gsecLong:"GSEClng",spiScore:"SPI",spiDescription:"SPIdesc",language:"Lang",languageCode:"ROL",languageFamily:"LangFamily",religion:"Rlgn",religionCode:"ROR",religionDescription:"RORdesc",religionBase:"RlgnBs",religionDiv:"RlgnDiv",bible:"Bible",jesusFilm:"Jesus",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories",resourcesTotal:"ResTot",bibleLevel:"LvlBible",yearPublished:"YrPub",photoCredit:"PicCrdt",photoUrl:"PicURL",hasPhoto:"Photo",isIndigenous:"Indigenous"},imageConfig:{useField:"photoUrl",fallbackField:"peopleId3",fallbackUrlTemplate:"https://joshuaproject.net/assets/media/profiles/photos/p{peopleId3}.jpg",placeholderUrl:"https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg"}}},systemFields:{uniqueId:{description:"Unique identifier per row (slug for API, ROP3+ROG for CSV)",required:!0},peopleGroupId:{description:"People group ID — same group can appear in multiple countries",required:!0},name:{description:"People group display name",required:!0},latitude:{description:"Latitude coordinate for map pin",required:!0},longitude:{description:"Longitude coordinate for map pin",required:!0},engagementStatus:{description:"Boolean — true if engaged_status = 'engaged'",required:!1},adoptionStatus:{description:"Boolean — true if adopted_by_churches > 0",required:!1},peoplePraying:{description:"Number of people currently praying for this group — from pray-tools API",required:!1},peopleCommitted:{description:"Raw count of committed workers for this group — source of engagementStatus",required:!1},languageFamily:{description:"Language family name",required:!1},religion:{description:"Primary religion",required:!1},population:{description:"Population count",required:!1},doxaRegion:{description:"WAGF/DOXA region name",required:!1},photoUrl:{description:"URL to people group photo",required:!1},description:{description:"People group description text",required:!1}}},h1=".profile-loader[data-locale-pending][data-v-ceea9a56] .stl-tabs,.profile-loader[data-locale-pending][data-v-ceea9a56] .stl-title,.profile-loader[data-locale-pending][data-v-ceea9a56] .stl-rows,.profile-loader[data-locale-pending][data-v-ceea9a56] .legend-title,.profile-loader[data-locale-pending][data-v-ceea9a56] .legend-content,.profile-loader[data-locale-pending][data-v-ceea9a56] .legend-reopen-label,.profile-loader[data-locale-pending][data-v-ceea9a56] .lt-btn-text,.profile-loader[data-locale-pending][data-v-ceea9a56] .rd-topbar,.profile-loader[data-locale-pending][data-v-ceea9a56] .rd-exportbar{visibility:hidden}.profile-loader[data-v-ceea9a56]{border-radius:var(--map-radius-corners, var(--map-radius, 0px));width:100%;height:100%;min-height:var(--profile-min-h, 100dvh);position:relative}.profile-loader.has-screen-notice[data-v-ceea9a56]{display:flex;flex-direction:column}.profile-loader.has-screen-notice[data-v-ceea9a56]>:not(.lsn-bar){flex:1 1 auto;min-height:0;position:relative!important;inset:auto!important}.profile-error[data-v-ceea9a56]{padding:1rem;background:#fff3cd;border:1px solid #ffc107;border-radius:4px;font-family:monospace;font-size:13px}",f1=["dir","data-locale-pending"],m1={key:0,class:"profile-error"},b1={key:1,class:"profile-error"},$1=ln({__name:"ProfileLoader",props:{profileConfig:{type:String,default:""}},setup(e){var K;const o=e,n=je("profileConfig",null),a=te(()=>{var N;if(!o.profileConfig)return null;let v;try{v=JSON.parse(o.profileConfig)}catch{return console.error("[ProfileLoader] Invalid profile-config JSON:",o.profileConfig),null}if(v&&v.assetsBase===void 0){const A=(N=n==null?void 0:n.value)==null?void 0:N.assetsBase;typeof A=="string"&&A&&(v.assetsBase=A)}return v}),r=je("profileModules",null);if(!r)throw new Error('[ProfileLoader] No profileModules provided. Bundle entry must `app.provide("profileModules", import.meta.glob("./*.vue"))`');const s=(()=>{const v=Object.keys(r||{});if(v.length!==1)return null;const N=v[0].match(/^\.\/(.+)\.vue$/);return N?N[1]:null})(),i=te(()=>{var v;return((v=a.value)==null?void 0:v.profile)||s||null}),l=k$(),c=te(()=>{var N;const v=(N=a.value)==null?void 0:N.tk;return typeof v=="string"&&v?v:l.value||""});Ue(()=>{var v;return(v=a.value)==null?void 0:v.tk},v=>{typeof v=="string"&&v&&Il(v)},{immediate:!0}),Ue(()=>{var v;return(v=a.value)==null?void 0:v.tokenUrl},v=>{var N;v&&!((N=a.value)!=null&&N.tk)&&!l.value&&x$(v)},{immediate:!0});const u=te(()=>{var v;return((v=a.value)==null?void 0:v.dataSource)||ma.activeSource||"doxa-csv"}),d=te(()=>{var v;return((v=a.value)==null?void 0:v.colorSet)||"default"}),f=te(()=>!1),x=te(()=>{var v;return((v=a.value)==null?void 0:v.pinHint)!==!1}),S=te(()=>{var N,A;const v=(((N=a.value)==null?void 0:N.locale)||((A=a.value)==null?void 0:A.lang)||Hg()||"").split("-")[0].toLowerCase();return Za.includes(v)?v:""}),y=je("appI18n",null);ud(()=>{S.value&&(y&&(y.global.locale.value=S.value),Wg(S.value),nc(y,S.value).catch(()=>{}))});const g=te(()=>{var v,N;return S.value||((N=(v=y==null?void 0:y.global)==null?void 0:v.locale)==null?void 0:N.value)||"en"}),b=te(()=>ci.has(g.value)?"rtl":"ltr"),{blocked:m,advise:$,dismiss:p,label:_}=n1(a),h=we(!1);ud(v=>{const N=g.value;if(!ci.has(N)){h.value=!1;return}let A=!0;v(()=>{A=!1}),h.value=!0,Fy(N).finally(()=>{A&&(h.value=!1)})});const k=te(()=>{var v;return((v=a.value)==null?void 0:v.instanceId)||"doxa-map-"+Math.random().toString(36).slice(2,9)}),L=te(()=>{if(!i.value)return null;const v=`./${i.value}.vue`;return r[v]?di(r[v]):(console.error(`[ProfileLoader] Profile not found: "${i.value}". Available:`,Object.keys(r)),null)});Bt("mapboxToken",c),Bt("dataSource",u),Bt("colorSet",d),Bt("profileConfig",a),Bt("instanceId",k),Bt("lang",g);const P=d1(),G=p1(),W=g1();try{const v=typeof localStorage<"u"?localStorage.getItem("theme"):null;v&&((K=P.setTheme)==null||K.call(P,v))}catch{}return Bt("uiStore",P),Bt("mapStore",G),Bt("dataStore",W),(v,N)=>(ne(),me("div",{class:Ke(["profile-loader",{"has-screen-notice":ge($)}]),dir:b.value,"data-locale-pending":h.value?"":null},[a.value?L.value?ge(m)?(ne(),ut(Zg,{key:2,mode:"desktop-only",label:ge(_),locale:g.value},null,8,["label","locale"])):(ne(),me(ot,{key:3},[ge($)?(ne(),ut(Zg,{key:0,mode:"larger-screens",locale:g.value,onDismiss:ge(p)},null,8,["locale","onDismiss"])):Re("",!0),(ne(),ut(wd(L.value)))],64)):(ne(),me("div",b1,[R("p",null,[N[1]||(N[1]=Ht("⚠️ Profile ",-1)),R("strong",null,'"'+ye(i.value)+'"',1),N[2]||(N[2]=Ht(" not found.",-1))])])):(ne(),me("div",m1,[...N[0]||(N[0]=[R("p",null,[Ht("⚠️ "),R("strong",null,"doxa-map"),Ht(": missing or invalid "),R("code",null,"profile-config"),Ht(" prop.")],-1),R("p",null,[Ht("Example: "),R("code",null,`profile-config='{"profile":"example-map","tk":"pk.eyJ..."}'`)],-1)])])),L.value&&f.value?(ne(),ut(wd(ge(null)),{key:4})):Re("",!0),L.value&&x.value?(ne(),ut(Ky,{key:5})):Re("",!0)],10,f1))}},[["styles",[h1]],["__scopeId","data-v-ceea9a56"]]);function Xg(e,t,o){var a;const n=(a=e==null?void 0:e._context)==null?void 0:a.provides;if(n&&t in n){n[t]=o;return}e.provide(t,o)}function _1(e,t){var a;const o=(a=e==null?void 0:e._context)==null?void 0:a.provides,n=o?Object.getPrototypeOf(o):null;n&&Object.setPrototypeOf(o,null);try{return t()}finally{n&&Object.setPrototypeOf(o,n)}}function y1({profileModules:e={},configureApp:t=null}={}){return r$($1,{configureApp(o){const n=f$();_1(o,()=>o.use(n));const a=Ny();o.use(a),Xg(o,"appI18n",a),Xg(o,"profileModules",e),t&&t(o,{pinia:n,i18n:a})}})}const v1=Object.assign({"./research-map.vue":()=>Ft(()=>Promise.resolve().then(()=>_A),void 0)});function w1(){return y1({profileModules:v1,configureApp:(e,{pinia:t,i18n:o})=>{}})}const k1=w1();typeof customElements<"u"&&(customElements.get("doxa-research-map")||customElements.define("doxa-research-map",k1));const x1="rgba(120, 128, 134, 0.28)",Qg="36px",eh=()=>{};function S1(e,t={}){const{enabled:o=!0}=t;if(!o||!e)return eh;const n=Array.from(e.querySelectorAll(".map-scroll-edge"));if(!n.length)return eh;const a=m=>m.classList.contains("map-scroll-edge--left");for(const m of n)m.style.background=`linear-gradient(${a(m)?"to right":"to left"}, ${x1} ${Qg}, transparent ${Qg})`,m.style.opacity="0",m.style.transition="opacity 0.16s ease",m.style.userSelect="none",m.style.webkitUserSelect="none";const r=m=>{m.style.opacity="1"},s=m=>{m.style.opacity="0"},i=()=>n.find(m=>!a(m))||null,l=new Set;let c=!1,u=null;const d=()=>{for(const m of n)l.has(m)||s(m)},f=()=>{const m=i();m&&(r(m),u&&clearTimeout(u),u=setTimeout(d,250))},x=()=>f(),S=m=>{if(!(m.touches&&m.touches.length===1))return;const $=m.target;$&&$.classList&&$.classList.contains("map-scroll-edge")||f()},y=()=>{u&&clearTimeout(u),d()};e.addEventListener("wheel",x,{passive:!0}),e.addEventListener("touchmove",S,{passive:!0}),e.addEventListener("touchend",y,{passive:!0}),e.addEventListener("touchcancel",y,{passive:!0});const g=()=>{c||f()};typeof window<"u"&&window.addEventListener("scroll",g,{passive:!0});const b=[];for(const m of n){const $=()=>{l.add(m),r(m)},p=()=>{l.delete(m),s(m)},_=()=>{c=!0,r(m)},h=()=>{c=!1,s(m)};m.addEventListener("mouseenter",$),m.addEventListener("mouseleave",p),m.addEventListener("touchstart",_,{passive:!0}),m.addEventListener("touchend",h,{passive:!0}),b.push(()=>{m.removeEventListener("mouseenter",$),m.removeEventListener("mouseleave",p),m.removeEventListener("touchstart",_),m.removeEventListener("touchend",h)})}return function(){u&&(clearTimeout(u),u=null),e.removeEventListener("wheel",x),e.removeEventListener("touchmove",S),e.removeEventListener("touchend",y),e.removeEventListener("touchcancel",y),typeof window<"u"&&window.removeEventListener("scroll",g);for(const $ of b)$();for(const $ of n)s($)}}const P1=Object.fromEntries([{id:"midnight-glow",label:"Midnight Glow",mood:"the prayer-map dark — pins glow like embers",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"night",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["doxa-simple-map","my-upg-100-list"]},{id:"daylight",label:"Daylight",mood:"the same Standard world, lights on",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"day",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["doxa-research-map","gospel-resources"]},{id:"dawn",label:"Dawn",mood:"soft warm horizon — hopeful, quiet",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"dawn",maplibre:"https://tiles.openfreemap.org/styles/positron",bestFor:["doxa-simple-map"]},{id:"dusk",label:"Dusk",mood:"blue hour — calm contrast for bright pins",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"dusk",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["my-upg-100-list"]},{id:"paper",label:"Paper",mood:"near-white minimal — data reads like print",mapbox:"mapbox://styles/mapbox/light-v11",maplibre:"https://tiles.openfreemap.org/styles/positron",bestFor:["research-dashboard","cities-internet"]},{id:"ink",label:"Ink",mood:"near-black minimal — maximum pin contrast",mapbox:"mapbox://styles/mapbox/dark-v11",maplibre:"https://tiles.openfreemap.org/styles/dark",bestFor:["my-upg-100-list","cities-internet"]},{id:"streetlife",label:"Street Life",mood:"full street detail — city-scale work",mapbox:"mapbox://styles/mapbox/streets-v12",maplibre:"https://tiles.openfreemap.org/styles/bright",bestFor:["cities-internet","key-cities"]},{id:"terrain",label:"Terrain",mood:"relief + parks — where people actually live",mapbox:"mapbox://styles/mapbox/outdoors-v12",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["doxa-research-map","country-posters"]},{id:"satellite",label:"Satellite",mood:"imagery — the real ground",mapbox:"mapbox://styles/mapbox/satellite-v9",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["country-posters"]},{id:"hybrid",label:"Hybrid",mood:"imagery + labels — orientation without losing ground truth",mapbox:"mapbox://styles/mapbox/satellite-streets-v12",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["key-cities"]},{id:"wayfinder-day",label:"Wayfinder Day",mood:"high-legibility navigation palette",mapbox:"mapbox://styles/mapbox/navigation-day-v1",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["gospel-resources"]},{id:"wayfinder-night",label:"Wayfinder Night",mood:"dark navigation — dashboards at night",mapbox:"mapbox://styles/mapbox/navigation-night-v1",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["research-dashboard"]},{id:"galaxy",label:"Galaxy",mood:"the day side of Earth floating in space — normal land, blue oceans, black void behind the sphere",mapbox:"mapbox://styles/mapbox/standard",maplibre:"https://tiles.versatiles.org/assets/styles/colorful/style.json",bestFor:["research-dashboard","my-upg-100-list"]}].map(e=>[e.id,e]));function A1(e,t="mapbox"){if(typeof e!="string"||!e)return{style:void 0,lightPreset:void 0,paint:void 0};const o=P1[e];return o?t==="maplibre"?{style:o.maplibre,lightPreset:void 0,paint:o.paint}:{style:o.mapbox,lightPreset:o.lightPreset,paint:o.paint}:/^(mapbox:\/\/|https?:\/\/)/.test(e)?{style:e,lightPreset:void 0,paint:void 0}:{style:void 0,lightPreset:void 0,paint:void 0}}function L1(e,t){if(!e||!Array.isArray(t))return[];const o=[];for(const n of t)if(!(!n||!n.layer||!n.prop))try{if(!e.getLayer(n.layer))continue;e.setPaintProperty(n.layer,n.prop,n.value),o.push(n.layer+"."+n.prop)}catch{}return o}const C1=["mapbox","maplibre"],T1="auto";function th(e){return e&&typeof e=="object"&&"value"in e&&!("provider"in e)&&!("profile"in e)?e.value:e}function oh(e,{token:t}={}){const o=th(e);return nh(o)||"maplibre"}function nh(e){const t=th(e),o=t==null?void 0:t.provider,n=typeof location<"u"?new URLSearchParams(location.search).get("provider"):void 0,a=typeof window<"u"?window.MAP_PROVIDER:void 0,r=String(o||n||a||T1).toLowerCase().trim();return C1.includes(r)?r:""}function E1(e){return e==="maplibre"?"MapLibre":"Mapbox"}function ah(e){return typeof window<"u"&&!!window.mapboxgl&&e instanceof window.mapboxgl.Map}function M1(e){if(typeof window>"u")return;const t=window.maplibregl,o=window.mapboxgl;if(t&&t.Map&&e instanceof t.Map)return"maplibre";if(o&&o.Map&&e instanceof o.Map)return"mapbox"}function gi(e){if(typeof window>"u")return;const t=window.maplibregl,o=window.mapboxgl;return t&&t.Map&&e instanceof t.Map?t:o&&o.Map&&e instanceof o.Map?o:o||t}function R1(e,t){if(!e||!t||typeof e.setProjection!="function")return!1;const o=typeof window<"u"?window.maplibregl:null,n=!!(o&&o.Map&&e instanceof o.Map);try{return e.setProjection(n?{type:t}:t),!0}catch{return!1}}function cn(e,t="circle"){return ah(e)?{[`${t}-emissive-strength`]:1}:{}}const Cn={mapboxGlJs:{url:"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js",integrity:"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ"},mapboxGlCss:{url:"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.css",integrity:"sha384-rp1X/jJ9MpWPef9OimfXhOaOc4Gzs87yQvF+ajwY6X2H4PTeHNycNlLWiWvj7ehV"},maplibreGlJs:{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js",integrity:"sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp"},maplibreGlCss:{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.css",integrity:"sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK"},mapboxGeocoderJs:{url:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js",integrity:"sha384-Lx9WK8XhZk57czwxt6B6nyaDHB5Ayrcrsu4Fw4bCp/Ot/QLOsUZ0xYqLOpOOSXZw"},mapboxGeocoderCss:{url:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.css",integrity:"sha384-1KNhwJNCQTr0DCi/5/OnQcFytgycxTahxNZaqKbAtqmY8bUhu26qxXqvDGXXwplS"},maplibreGeocoderJs:{url:"https://cdn.jsdelivr.net/npm/@maplibre/maplibre-gl-geocoder@1.9.4/dist/maplibre-gl-geocoder.min.js",integrity:"sha384-RGV5vfoJd7alk8HE+71IyVfu19ciH1FKA15+AuXs6OeBM2npXrmTPFqG23yMiHXi"},maplibreGeocoderCss:{url:"https://cdn.jsdelivr.net/npm/@maplibre/maplibre-gl-geocoder@1.9.4/dist/maplibre-gl-geocoder.css",integrity:"sha384-UkDpPApjTpHJHpcJiSNAmbobh30W0/dmt0DoKm4V8CWYRYvQ/Jhd/ijFz0tFdVnH"},d3:{url:"https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js",integrity:"sha384-CjloA8y00+1SDAUkjs099PVfnY2KmDC2BZnws9kh8D/lX1s46w6EPhpXdqMfjK6i"}};function Vr(e,t){const o=Object.values(Cn).find(n=>n.url===t);return o&&(e.integrity=o.integrity,e.crossOrigin="anonymous"),e}const rh={mapbox:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js",maplibre:"https://cdn.jsdelivr.net/npm/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js"};function F1(e){return!!e&&typeof window<"u"&&e===window.maplibregl}function N1(e){if(typeof window>"u")return!1;const t=e?[e]:[window.maplibregl,window.mapboxgl].filter(Boolean);let o=!1;for(const n of t)if(!(!n||!n.setRTLTextPlugin))try{if(F1(n)){if(n.getRTLTextPluginStatus&&n.getRTLTextPluginStatus()!=="unavailable")continue;const a=n.setRTLTextPlugin(rh.maplibre,!0);a&&a.catch&&a.catch(()=>{})}else n.setRTLTextPlugin(rh.mapbox,null,!0);o=!0}catch{}return o}const I1=/\[\s*"get"\s*,\s*"name(?::latin|:nonlatin|:en|_en|_int)?"\s*\]|\{name(?::latin|:nonlatin|:en|_en|_int)?\}/,sh=new WeakMap;function O1(e){return typeof window<"u"&&!!window.maplibregl&&e instanceof window.maplibregl.Map}function ih(e,t){if(!e||!t)return 0;const o=String(t).split("-")[0].toLowerCase();try{if(!O1(e))return typeof e.setLanguage=="function"&&e.setLanguage(o),0;const n=e.getStyle&&e.getStyle();if(!n||!Array.isArray(n.layers))return 0;let a=sh.get(e);a||(a=new Map,sh.set(e,a));let r=0;for(const s of n.layers){if(s.type!=="symbol"||!s.layout||s.layout["text-field"]==null)continue;const i=s.layout["text-field"],l=JSON.stringify(i);if(l.startsWith('["coalesce",["get","name:')){if(!a.has(s.id))continue}else{if(!I1.test(l))continue;a.set(s.id,i)}const c=["coalesce",["get","name:"+o],["get","name_"+o],["get","name:latin"],["get","name_en"],["get","name"]];e.setLayoutProperty(s.id,"text-field",c),r++}return r}catch{return 0}}const Ja={mapbox:{global:"mapboxgl",js:Cn.mapboxGlJs.url,css:Cn.mapboxGlCss.url},maplibre:{global:"maplibregl",js:Cn.maplibreGlJs.url,css:Cn.maplibreGlCss.url}},D1={"Map.Title":"map","Marker.Title":"marker","Popup.Close":"closePopup","NavigationControl.ZoomIn":"zoomIn","NavigationControl.ZoomOut":"zoomOut","NavigationControl.ResetBearing":"resetBearing","AttributionControl.ToggleAttribution":"toggleAttribution","AttributionControl.MapFeedback":"mapFeedback","FullscreenControl.Enter":"enterFullscreen","FullscreenControl.Exit":"exitFullscreen","GeolocateControl.FindMyLocation":"findMyLocation","GeolocateControl.LocationNotAvailable":"locationNotAvailable","GlobeControl.Enable":"enableGlobe","GlobeControl.Disable":"disableGlobe","CooperativeGesturesHandler.WindowsHelpText":"ctrlScroll","CooperativeGesturesHandler.MacHelpText":"cmdScroll","CooperativeGesturesHandler.MobileHelpText":"twoFingers","ScrollZoomBlocker.CtrlMessage":"ctrlScroll","ScrollZoomBlocker.CmdMessage":"cmdScroll","TouchPanBlocker.Message":"twoFingers"};function lh(e,t){const o={};for(const[a,r]of Object.entries(D1)){const s=ao(`mapui.${r}`,e);s&&(o[a]=s)}const n=ao(t==="maplibre"?"mapui.maplibreLogo":"mapui.mapboxHomepage",e);return n&&(o["LogoControl.Title"]=n),o}function ch(e){if(typeof window>"u")return;const t=window,o=()=>{try{const n=e.getContainer().querySelector(".mapboxgl-ctrl-logo, .maplibregl-ctrl-logo");n&&(n.style.display="none")}catch{}};if(t.__doxaLogoOwner&&t.__doxaLogoOwner!==e){e.once("load",o),o();return}t.__doxaLogoOwner=e,e.once("remove",()=>{t.__doxaLogoOwner===e&&(t.__doxaLogoOwner=null)})}const z1=Ja.mapbox.css,j1="https://tiles.openfreemap.org/styles/liberty",B1="https://tiles.openfreemap.org/styles/fiord";function ic(e){var o;const t=((o=Ja[e])==null?void 0:o.global)||Ja.mapbox.global;return typeof window<"u"?window[t]:void 0}async function uh(e){const t=Ja[e]||Ja.mapbox;if(ic(e)||typeof document>"u")return;if(!document.querySelector(`link[href="${t.css}"]`)){const n=document.createElement("link");n.rel="stylesheet",n.href=t.css,Vr(n,t.css),document.head.appendChild(n)}const o=document.querySelector(`script[src="${t.js}"]`);if(o){if(ic(e))return;await new Promise(n=>{o.addEventListener("load",n,{once:!0}),o.addEventListener("error",n,{once:!0})});return}await new Promise((n,a)=>{const r=document.createElement("script");r.src=t.js,Vr(r,t.js),r.async=!1,r.addEventListener("load",n,{once:!0}),r.addEventListener("error",()=>a(new Error(`[useMapInstance] Failed to load ${e} engine script`)),{once:!0}),document.head.appendChild(r)})}async function G1(e,t){if(!e)return;const o=e.getRootNode();if(!(o instanceof ShadowRoot))return;const n=s=>new Promise(i=>setTimeout(i,s)),a=o.querySelector(`link[href="${t}"]`);if(a){if(a.sheet)return;await Promise.race([new Promise(s=>{a.addEventListener("load",s,{once:!0}),a.addEventListener("error",s,{once:!0})}),n(2e3)]);return}const r=document.createElement("link");r.rel="stylesheet",r.href=t,Vr(r,t),await Promise.race([new Promise(s=>{r.addEventListener("load",s,{once:!0}),r.addEventListener("error",s,{once:!0}),o.prepend(r)}),n(2e3)])}function H1(e,t){return typeof e=="string"&&/^https?:\/\//.test(e)?e:t==="night"||t==="dusk"?B1:j1}const U1=85.0511,lc=-2,W1=0,q1=-60;function dh(e){return(1-Math.log(Math.tan(Math.PI/4+e*Math.PI/180/2))/Math.PI)/2}function K1(e,t,o,n){if(!e||e<=0||!t||t<=0)return W1;const a=Math.log2(e/512),r=dh(n)-dh(U1),s=Math.log2(t/(512*r)),i=Math.max(a,s);return Math.max(lc,Math.min(i,(o??18)-1))}function V1({containerRef:e,accessToken:t,style:o,config:n=void 0,provider:a=void 0,center:r=[20,10],zoom:s=2,bounds:i=void 0,fitBoundsOptions:l=void 0,minZoom:c=void 0,skipWorldFloor:u=!1,maxZoom:d=18,pitch:f=0,bearing:x=0,renderWorldCopies:S=!0,showEdgeBorders:y=!0,southCutoff:g=q1,maxBounds:b=void 0}){const m=Na(null),$=we(!1);let p=null,_=null,h=null,k=null;try{k=je("profileConfig",null)}catch{}const L=!a&&!nh(k);a=a||oh(k,{token:t});let P=a==="maplibre";typeof document<"u"&&uh(a).catch(()=>{});let G=null;try{G=je("lang",null)}catch{}const W=()=>{const N=G&&typeof G=="object"&&"value"in G?G.value:G;if(typeof N=="string"&&N)return N;const A=k&&typeof k=="object"&&"value"in k?k.value:k;if(A&&(A.locale||A.lang))return String(A.locale||A.lang);try{const w=new URLSearchParams(location.search);return w.get("lang")||w.get("locale")||document.documentElement.lang||"en"}catch{return"en"}};async function K(){var Q;if(L&&!P&&!t&&typeof window<"u"&&window.__doxaMapTokenPending){if(await window.__doxaMapTokenPending,!e.value)return;typeof window.MAP_TOKEN=="string"&&window.MAP_TOKEN||(a="maplibre",P=!0)}const N=A1(o,a),A=N.style||o;if(!e.value){console.error("containerRef.value is null — call initializeMap() inside onMounted()");return}const w=()=>!e.value;if(await uh(a),w())return;const j=ic(a);if(!j){console.error(`[useMapInstance] ${P?"maplibregl":"mapboxgl"} is not available. Add the ${P?"MapLibre":"Mapbox"} GL JS script to your page.`);return}if(N1(j),!P){if(!t&&typeof window<"u"&&window.__doxaMapTokenPending&&(await window.__doxaMapTokenPending,w()))return;if(!t&&typeof window<"u"&&typeof window.MAP_TOKEN=="string"&&window.MAP_TOKEN&&(t=window.MAP_TOKEN),!t){typeof window<"u"&&!window.__doxaNoTokenWarned&&(window.__doxaNoTokenWarned=!0,console.warn('No Mapbox access token provided. Pass "tk" in profile-config JSON or set window.MAP_TOKEN.'));return}if(!t.startsWith("pk.")){console.error('Mapbox token looks invalid (expected "pk." prefix). Got:',t.slice(0,10)+"...");return}}if(await G1(e.value,P?Ja.maplibre.css:z1),w()||(await new Promise(Z=>requestAnimationFrame(Z)),w()))return;const F=e.value,U=F.clientWidth,I=F.clientHeight;if(U===0||I===0){console.error(`[useMapInstance] Container has ZERO dimensions (${U}×${I}). Map will be invisible. Check that parent elements have CSS sizing.`);let Z=F.parentElement,ue=0;for(;Z&&ue<5;)Z=Z.parentElement,ue++}const q=t;P||(j.accessToken=q);const O=()=>typeof window<"u"&&window.innerWidth>=1024,ie=(Z,ue)=>{if(u)return typeof c=="number"?c:lc;if(!O())return lc;const ke=K1(Z,ue,d,g);return typeof c=="number"?Math.max(c,ke):ke},he=ie(F.clientWidth,F.clientHeight),ve=N.lightPreset||(()=>{var Z;try{const ue=typeof n=="function"?n():n;return(Z=ue==null?void 0:ue.basemap)==null?void 0:Z.lightPreset}catch{return}})();if(P){m.value=new j.Map({container:e.value,style:H1(A,ve),locale:lh(W(),"maplibre"),center:r,zoom:s,minZoom:he,maxZoom:d,pitch:f,bearing:x,dragRotate:!1,renderWorldCopies:S,...i?{bounds:i,...l?{fitBoundsOptions:l}:{}}:{},...b?{maxBounds:b}:{},attributionControl:!0,logoPosition:typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?"bottom-right":"bottom-left"}),ch(m.value);try{e.value.__doxaMap=m.value}catch{}}else{const Z=typeof n=="function"?n():n;m.value=new j.Map({accessToken:q,container:e.value,style:A,locale:lh(W(),"mapbox"),...Z?{config:Z}:{},center:r,zoom:s,minZoom:he,maxZoom:d,pitch:f,bearing:x,dragRotate:!1,touchPitch:!1,renderWorldCopies:S,...i?{bounds:i,...l?{fitBoundsOptions:l}:{}}:{},...b?{maxBounds:b}:{},attributionControl:!0,logoPosition:typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?"bottom-right":"bottom-left"}),ch(m.value);try{e.value.__doxaMap=m.value}catch{}}try{let Z=!1;m.value.on("error",ue=>{var D,B;const ke=((D=ue==null?void 0:ue.error)==null?void 0:D.status)??(ue==null?void 0:ue.status),M=String(((B=ue==null?void 0:ue.error)==null?void 0:B.url)||(ue==null?void 0:ue.sourceId)||"");ke!==401&&ke!==403||Z||(Z=!0,console.error(`[doxa-maps] Mapbox returned ${ke} for a TILE request while the style loaded fine. That is a URL RESTRICTION on the access token, not a bad token and not a bug in this map. Add this page's origin (${typeof location<"u"?location.origin:"this origin"}) to the token's URL restrictions in the Mapbox account. The map will keep its data layer and stay blank underneath until then.`+(M?` First failing request: ${M.slice(0,120)}`:"")))})}catch{}try{m.value.touchZoomRotate.disableRotation()}catch{}h=S1(((Q=e.value)==null?void 0:Q.parentElement)||null,{enabled:y});let Ae=he,Se=null;p=()=>{const Z=m.value;if(!Z)return;const ue=ie(F.clientWidth,F.clientHeight);ue!==Ae&&(Ae=ue,Z.setMinZoom(ue)),Z.getZoom(){Se=null;const ke=m.value;if(!ke)return;const M=ie(F.clientWidth,F.clientHeight);if(ke.getZoom(){Se&&(clearTimeout(Se),Se=null)},m.value.on("resize",p),typeof window<"u"&&(window.addEventListener("resize",p),window.addEventListener("orientationchange",p)),m.value.on("style.load",()=>{if(m.value&&ih(m.value,W()),N.paint&&m.value){const Z=L1(m.value,N.paint);console.info("[useMapInstance] style paint applied ("+a+"):",Z.join(", ")||"NONE MATCHED")}requestAnimationFrame(()=>{var Z;(Z=m.value)==null||Z.resize(),m.value&&m.value.setMinZoom(ie(F.clientWidth,F.clientHeight)),$.value=!0})})}function v(){if(m.value){if(p&&(m.value.off("resize",p),typeof window<"u"&&(window.removeEventListener("resize",p),window.removeEventListener("orientationchange",p)),p=null),_){try{_()}catch{}_=null}h&&(h(),h=null);try{const A=typeof window<"u"?window:null;A&&A.__doxaLogoOwner===m.value&&(A.__doxaLogoOwner=null)}catch{}const N=m.value;m.value.remove();try{e&&e.value&&e.value.__doxaMap===N&&(e.value.__doxaMap=null)}catch{}m.value=null,$.value=!1}}if(G&&typeof G=="object"&&"value"in G)try{Ue(G,()=>{m.value&&$.value&&ih(m.value,W())})}catch{}return{map:m,isMapReady:$,initializeMap:K,destroy:v}}const Y1=Ca&&Ca.tagName.toUpperCase()==="SCRIPT"&&Ca.src||new URL("doxa-research-map.js",document.baseURI).href,Vn=e=>String(e||"").trim().replace(/\/+$/,"");function ph(){try{const t=String(Y1||"").split(/[?#]/)[0].match(/^(.*)\/([^/]+)\/([^/]+)\.js$/);return!t||t[2]!==t[3]?null:t[1]||null}catch{return null}}function Z1(e){const t=e==null?void 0:e.embedBaseUrl;if(typeof t=="string"&&t.trim())return Vn(t);if(typeof window<"u"){const o=window.MAP_EMBED_BASE_URL;if(typeof o=="string"&&o.trim())return Vn(o)}return Vn(ph()||"")}function cc(e){const t=e==null?void 0:e.assetsBase;if(typeof t=="string"&&t.trim()){const n=Vn(t);if(/^https?:\/\//i.test(n)||n.startsWith("/"))return n}const o=Vn((e==null?void 0:e.treeBase)||"")||Vn(ph()||"");if(o)try{const n=typeof document<"u"?document.baseURI:void 0;return Vn(new URL(o+"/assets",n).href)}catch{return Vn(o+"/assets")}return"./assets"}function J1({shareUrl:e,embedPath:t,profileConfig:o}={}){const n=o||null,a=typeof window<"u",r=e||(n==null?void 0:n.shareUrl);if(typeof r=="string"&&r.trim())return r.trim();const s=String(t||(n==null?void 0:n.shareEmbedPath)||"").trim();if(s){if(/^https?:\/\//i.test(s))return s;if(s.startsWith("/"))return a?window.location.origin+s:s;const i=Z1(n),l=s.replace(/^\.\//,"");if(i)return i+"/"+l;if(typeof document<"u")try{return new URL(l,document.baseURI).href}catch{}return l}return a?window.location.origin+window.location.pathname:""}const gh="adoptionStatus",Tn={notAdopted:"#f03b2d",hasAdoption:"#22c55e"},uc=Tn,dc={notAdopted:"Needs Adoption",hasAdopted:"Has Adoption"},X1=dc;function hh(e){var n;const t=e.adoptionStatus??((n=e._raw)==null?void 0:n.adopted_by_churches);return t===!0||t===1||typeof t=="number"&&t>0||typeof t=="object"&&(t==null?void 0:t.value)?Tn.hasAdoption:Tn.notAdopted}function pc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","adoptionStatus"]:["get","adoptionStatus"];return["case",["==",t,!0],Tn.hasAdoption,["==",t,1],Tn.hasAdoption,Tn.notAdopted]}const fh=pc,Q1=Object.freeze(Object.defineProperty({__proto__:null,ADOPTION_COLORS:uc,ADOPTION_LABELS:X1,LABELS:dc,PALETTE:Tn,PROPERTY_KEY:gh,applyColor:pc,buildColorExpression:fh,default:{name:"Adoption Progress",propertyKey:gh,palette:Tn,colors:Tn,labels:dc,getColor:hh,applyColor:pc,buildColorExpression:fh},getColor:hh},Symbol.toStringTag,{value:"Module"})),gc="affinityBlock",Xa="#95a5a6",En={A001:"Arab World",A002:"East Asian Peoples",A003:"Eurasian Peoples",A004:"Horn of Africa Peoples",A005:"Jewish",A006:"Malay Peoples",A007:"Persian-Median Peoples",A008:"South Asian Peoples",A009:"North American Peoples",A010:"Pacific Islanders",A011:"Southeast Asian Peoples",A012:"Sub-Saharan Peoples",A013:"Tibetan-Himalayan Peoples",A014:"Turkic Peoples",A015:"Latin-Caribbean Americans",A017:"Deaf",A018:"Tibetan Peoples",A019:"Himalayan Peoples"},hi={A001:"#E74C3C",A002:"#3498DB",A003:"#2ECC71",A004:"#F39C12",A005:"#9B59B6",A006:"#1ABC9C",A007:"#E67E22",A008:"#34495E",A009:"#95A5A6",A010:"#5DADE2",A011:"#16A085",A012:"#C0392B",A013:"#8E44AD",A014:"#D35400",A015:"#27AE60",A017:"#000000",A018:"#6C3483",A019:"#A569BD"},Yn=hi,mh=Object.entries(En).reduce((e,[t,o])=>(e[o]=t,e),{}),hc=Object.entries(En).reduce((e,[t,o])=>(e[o]=Yn[t],e),{}),bh=En;function fc(e){return En[e]||"Unknown"}function mc(e){return Yn[e]||Xa}function $h(e){return e?typeof e=="string"&&/^A\d{3}$/.test(e)?Yn[e]||Xa:hc[e]||Xa:Xa}function _h(){return Object.entries(En).map(([e,t])=>({code:e,name:t,color:Yn[e]}))}function yh(e){return{code:e,name:En[e]||"Unknown",color:Yn[e]||Xa}}function vh(e){var o;const t=e.affinityBlock||((o=e._raw)==null?void 0:o.ROP1);return mc(t)}function wh(e){var o;const t=e.affinityBlock||((o=e._raw)==null?void 0:o.ROP1);return fc(t)}function bc(){const e=["match",["get",gc]];return Object.entries(Yn).forEach(([t,o])=>{e.push(t,o)}),e.push(Xa),e}const kh=bc,ev=Object.freeze(Object.defineProperty({__proto__:null,AFFINITY_BLOCK_COLORS:Yn,AFFINITY_BLOCK_COLORS_BY_NAME:hc,AFFINITY_BLOCK_NAMES:En,AFFINITY_BLOCK_NAME_TO_CODE:mh,NAMES:bh,PALETTE:hi,PROPERTY_KEY:gc,affinityBlockCodeLookup:En,affinityBlockCodeToColor:Yn,affinityBlockCodeToName:En,affinityBlockColors:hc,affinityBlockNameToCode:mh,applyColor:bc,buildColorExpression:kh,default:{name:"Affinity Block",propertyKey:gc,palette:hi,colors:hi,names:bh,getColor:vh,applyColor:bc,buildColorExpression:kh,getName:wh,getAffinityBlockName:fc,getAffinityBlockColor:$h,getAffinityBlockColorByCode:mc,getAffinityBlocksArray:_h,getAffinityBlockData:yh},getAffinityBlockColor:$h,getAffinityBlockColorByCode:mc,getAffinityBlockData:yh,getAffinityBlockName:fc,getAffinityBlocksArray:_h,getColor:vh,getName:wh},Symbol.toStringTag,{value:"Module"}));function tv(e){if(!e)return"hsl(0, 60%, 50%)";let t=0;for(let n=0;n{e.push(t,o)}),e.push(_c),e}const Ah=wc,nv=Object.freeze(Object.defineProperty({__proto__:null,DOXA_REGION_COLORS:ov,PALETTE:fi,PROPERTY_KEY:$c,REGION_COLOR_ALIASES:vc,SLUG_PALETTE:mi,applyColor:wc,buildColorExpression:Ah,default:{name:"DOXA Region",propertyKey:$c,palette:fi,colors:fi,slugColors:mi,aliases:vc,fallback:_c,getColor:Ph,applyColor:wc,buildColorExpression:Ah,getRegionColor:Sh,getRegionColorBySlug:yc},getColor:Ph,getRegionColor:Sh,getRegionColorBySlug:yc},Symbol.toStringTag,{value:"Module"})),Lh="engagementStatus",Mn={notEngaged:"#f03b2d",hasEngagement:"#22c55e"},kc=Mn,xc={notEngaged:"Unengaged",hasEngagement:"Engaged"},av=xc;function Ch(e){var n;const t=e.engagementStatus??((n=e._raw)==null?void 0:n.people_committed);return t===!0||t===1||typeof t=="number"&&t>0||typeof t=="object"&&(t==null?void 0:t.value)?Mn.hasEngagement:Mn.notEngaged}function Sc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","engagementStatus"]:["get","engagementStatus"];return["case",["==",t,!0],Mn.hasEngagement,["==",t,1],Mn.hasEngagement,Mn.notEngaged]}const Th=Sc,rv=Object.freeze(Object.defineProperty({__proto__:null,ENGAGEMENT_COLORS:kc,ENGAGEMENT_LABELS:av,LABELS:xc,PALETTE:Mn,PROPERTY_KEY:Lh,applyColor:Sc,buildColorExpression:Th,default:{name:"Engagement Progress",propertyKey:Lh,palette:Mn,colors:Mn,labels:xc,getColor:Ch,applyColor:Sc,buildColorExpression:Th},getColor:Ch},Symbol.toStringTag,{value:"Module"})),Pc="languageFamily",sv="#000000",Zn={"Indo-European":"#e74c3c",Dravidian:"#ff9800","Afro-Asiatic":"#27ae60","Sino-Tibetan":"#3498db","Niger-Congo":"#9b59b6",Unclassified:"#95a5a6","Nilo-Saharan":"#e91e63","Khoe-Kwadi":"#00bcd4","Austro-Asiatic":"#00bcd4","Kra-Dai":"#8e44ad",Austronesian:"#ff69b4","Hmong-Mien":"#f44336",Turkic:"#ffc107","Nakh-Daghestanian":"#009688",Mongolic:"#795548",Uralic:"#607d8b",Tungusic:"#4caf50",Japonic:"#ff5722",Cariban:"#673ab7",Tupian:"#03a9f4",Tucanoan:"#8bc34a",Maipurean:"#ffc107",Panoan:"#cddc39",Guajiboan:"#9e9e9e",Chibchan:"#ff7043",Quechuan:"#ab47bc",Jean:"#26a69a",Harákmbut:"#7e57c2",Nambikwara:"#42a5f5",Muran:"#66bb6a",Karajá:"#ffa726",Bororoan:"#ef5350",Arauan:"#5c6bc0",Yanomaman:"#26c6da",Yaguan:"#d4e157",Witotoan:"#78909c",Zamucoan:"#8d6e63",Puinavean:"#aed581",Barbacoan:"#4db6ac","Eyak-Athabaskan":"#7986cb","Trans-New Guinea":"#ba68c8",Andamanese:"#4dd0e1","Atlantic-Congo":"#7D3C98",Mande:"#B9770E","Sign Language":"#212121",Creole:"#9575cd","Mixed language":"#a1887f","Language isolate":"#90a4ae",Unknown:"#000000"},Eh=Zn;function Uo(e){return Zn[e]||sv}const iv=(()=>{const e=o=>String(o||"").toLowerCase().trim(),t={};for(const o of Object.keys(Zn))t[e(o)]=o;return t})(),lv={"tai-kadai":"Kra-Dai",none:"Unknown"};function bi(e){if(!e)return"Unknown";const t=String(e).trim(),o=t.toLowerCase();return lv[o]||iv[o]||t}function Mh(e){var t;return Uo(e.languageFamily||((t=e._normalized)==null?void 0:t.languageFamily))}function Ac(){const e=["match",["get",Pc]];return Object.entries(Zn).forEach(([t,o])=>{e.push(t,o)}),e.push("#95a5a6"),e}const Rh=Ac,cv=Object.freeze(Object.defineProperty({__proto__:null,LANGUAGE_FAMILY_COLORS:Eh,PALETTE:Zn,PROPERTY_KEY:Pc,applyColor:Ac,buildColorExpression:Rh,canonicalFamilyName:bi,default:{name:"Language Family",propertyKey:Pc,palette:Zn,colors:Zn,getColor:Mh,applyColor:Ac,buildColorExpression:Rh,getLanguageFamilyColor:Uo,canonicalFamilyName:bi},defaultFamilyColor:"#95a5a6",getColor:Mh,getLanguageFamilyColor:Uo,languageFamilyColors:Zn},Symbol.toStringTag,{value:"Module"})),Fh="peoplePraying",un=144,Jn={noPrayer:"#f03b2d",hasPrayer:"#f0c64a",fullPrayer:"#22c55e"},ba=Jn,Lc={noPrayer:"Needs Prayer",hasPrayer:"Has Prayer",fullPrayer:"Has Full Prayer Coverage"},uv=Lc;function $i(e){var n;const t=(e==null?void 0:e.peoplePraying)??((n=e==null?void 0:e._raw)==null?void 0:n.people_praying)??null,o=Number(t)||0;return o>=un?"fullPrayer":o>0?"hasPrayer":"noPrayer"}function Cc(e){return Jn[$i(e)]}function Nh(e){var o;const t=(e==null?void 0:e.peoplePraying)??((o=e==null?void 0:e._raw)==null?void 0:o.people_praying)??null;return t!==null&&t>0}function Ih(e){return $i(e)==="fullPrayer"}function Oh(e){return Cc(e)}function Tc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","peoplePraying"]:["get","peoplePraying"];return["case",[">=",t,un],Jn.fullPrayer,[">",t,0],Jn.hasPrayer,Jn.noPrayer]}const Dh=Tc,dv=Object.freeze(Object.defineProperty({__proto__:null,FULL_PRAYER_THRESHOLD:un,LABELS:Lc,PALETTE:Jn,PRAYER_COLORS:ba,PRAYER_LABELS:uv,PROPERTY_KEY:Fh,applyColor:Tc,buildColorExpression:Dh,checkHasFullPrayer:Ih,checkHasPrayer:Nh,default:{name:"Prayer Progress",propertyKey:Fh,palette:Jn,colors:Jn,labels:Lc,threshold:un,getColor:Oh,applyColor:Tc,buildColorExpression:Dh,getPrayerLevel:$i,getPrayerColor:Cc,checkHasPrayer:Nh,checkHasFullPrayer:Ih},getColor:Oh,getPrayerColor:Cc,getPrayerLevel:$i},Symbol.toStringTag,{value:"Module"})),zh="religion",Ec="#94a3b8",Wo={C:"Christianity",M:"Islam",H:"Hinduism",B:"Buddhism",E:"Ethnoreligion",J:"Judaism",S:"Sikhism",N:"Unaffiliated",O:"Other",U:"Unknown"},Lo={C:"#3b82f6",M:"#ef4444",H:"#f59e0b",B:"#facc15",E:"#84cc16",J:"#a855f7",S:"#ec4899",N:"#71717a",O:"#ff6b2b",U:"#94a3b8"};function Yr(e){if(!e||typeof e!="string")return"U";const t=e.charAt(0).toUpperCase();return Wo[t]?t:"U"}function jh(e){var o,n,a;const t=(e==null?void 0:e.religion)||((n=(o=e==null?void 0:e._raw)==null?void 0:o.religion)==null?void 0:n.value)||((a=e==null?void 0:e._raw)==null?void 0:a.religion);return Lo[Yr(t)]||Ec}function Mc(){return["match",["slice",["coalesce",["get","religion"],""],0,1],"C",Lo.C,"M",Lo.M,"H",Lo.H,"B",Lo.B,"E",Lo.E,"J",Lo.J,"S",Lo.S,"N",Lo.N,"O",Lo.O,Ec]}const Bh=Mc,pv={name:"Religion",propertyKey:zh,palette:Lo,families:Wo,getColor:jh,applyColor:Mc,buildColorExpression:Bh,fallback:Ec};function Rc(e){const t=String(e||""),o=Wo[t]||t;return o?ao("religion.family."+o)||o:""}const gv=Object.freeze(Object.defineProperty({__proto__:null,PALETTE:Lo,PROPERTY_KEY:zh,RELIGION_FAMILIES:Wo,applyColor:Mc,buildColorExpression:Bh,default:pv,getColor:jh,getReligionFamily:Yr,religionFamilyLabel:Rc},Symbol.toStringTag,{value:"Module"})),Gh="resourceType",Xn={bible:"#3498db",jesusFilm:"#20c997",radio:"#9b59b6",gospel:"#f39c12",audio:"#1abc9c",stories:"#e74c3c",hasResources:"#27ae60",noResources:"#2c3e50"},hv=Xn,Zr=["bible","jesusFilm","radio","gospel","audio","stories"],Fc={bible:"Bible",jesusFilm:"Jesus Film",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories",hasResources:"Has Resources",noResources:"No Resources"},fv=Fc;function Jr(e){return{bible:"Bible",jesusFilm:"Jesus",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories"}[e]}function Hh(e){var t;for(const o of Zr)if((e[o]||((t=e._raw)==null?void 0:t[Jr(o)]))==="Available")return Xn.hasResources;return Xn.noResources}function Uh(e){var t;for(const o of Zr)if((e[o]||((t=e._raw)==null?void 0:t[Jr(o)]))==="Available")return!0;return!1}function Wh(e){var t;for(const o of Zr)if((e[o]||((t=e._raw)==null?void 0:t[Jr(o)]))==="Available")return o;return"noResources"}function Nc(){return["case",["any",["==",["get","bible"],"Available"],["==",["get","jesusFilm"],"Available"],["==",["get","radio"],"Available"],["==",["get","gospel"],"Available"],["==",["get","audio"],"Available"],["==",["get","stories"],"Available"]],Xn.hasResources,Xn.noResources]}const qh=Nc,mv=Object.freeze(Object.defineProperty({__proto__:null,NAMES:Fc,PALETTE:Xn,PROPERTY_KEY:Gh,RESOURCE_COLORS:hv,RESOURCE_NAMES:fv,RESOURCE_PRIORITY:Zr,applyColor:Nc,buildColorExpression:qh,default:{name:"Gospel Resources",propertyKey:Gh,palette:Xn,colors:Xn,names:Fc,priority:Zr,getColor:Hh,applyColor:Nc,buildColorExpression:qh,hasAnyResource:Uh,getResourceType:Wh,getCSVColumn:Jr},getCSVColumn:Jr,getColor:Hh,getResourceType:Wh,hasAnyResource:Uh},Symbol.toStringTag,{value:"Module"})),Kh="region",Ic="#6d766e",Vh={africa:"Africa",asia:"Asia",europe:"Europe","latin_america_&_caribbean":"Latin America & Caribbean",middle_east:"Middle East","north_america_&_non-spanish_caribbean":"North America & Non-Spanish Caribbean",oceania:"Oceania"},Xr={africa:"#ff2e2e",asia:"#1a8cff",europe:"#1ee05f","latin_america_&_caribbean":"#FFEB3B",middle_east:"#a83dff","north_america_&_non-spanish_caribbean":"#00e0bd",oceania:"#ff7f11"},Oc=Object.keys(Xr);function Yh(e){var o,n,a;const t=(e==null?void 0:e.region)||((n=(o=e==null?void 0:e._raw)==null?void 0:o.wagf_region)==null?void 0:n.value)||((a=e==null?void 0:e._raw)==null?void 0:a.wagf_region);return Xr[t]||Ic}function Dc(){const e=["match",["coalesce",["get","region"],""]];for(const t of Oc)e.push(t,Xr[t]);return e.push(Ic),e}const Zh=Dc,bv=Object.assign({"./adoption.js":Q1,"./affinity-block.js":ev,"./doxa-region.js":nv,"./engagement.js":rv,"./language-family.js":cv,"./prayer-progress.js":dv,"./religion.js":gv,"./resource.js":mv,"./wagf-region.js":Object.freeze(Object.defineProperty({__proto__:null,PALETTE:Xr,PROPERTY_KEY:Kh,REGION_ORDER:Oc,WAGF_REGIONS:Vh,applyColor:Dc,buildColorExpression:Zh,default:{name:"WAGF Region",propertyKey:Kh,palette:Xr,regions:Vh,order:Oc,getColor:Yh,applyColor:Dc,buildColorExpression:Zh,fallback:Ic},getColor:Yh},Symbol.toStringTag,{value:"Module"}))}),$v=e=>e.replace(/-([a-z0-9])/g,(t,o)=>o.toUpperCase()),_v=e=>e.replace(/-/g,"_").toUpperCase(),Qa={...{STATUS:"status",CUSTOM:"custom"}},zc={};function yv(e){for(const t of Object.keys(e).sort()){const o=t.split("/").pop().replace(/\.js$/,"");if(o.startsWith("_")||o.startsWith("."))continue;const n=e[t].default;if(!n)continue;const a=$v(o);Qa[_v(o)]=a,zc[a]=n}}yv(bv);function dn(e){return zc[e]||zc[Qa.LANGUAGE_FAMILY]}function vv(e,t={}){return dn(e).applyColor(t)}const wv={Africa:{zoom:1.3,center:[16.6512,26.3538]},Asia:{zoom:.8,center:[98.2654,49.9282]},Europe:{zoom:1.4,center:[22.7826,70.1026]},"Latin America & Caribbean":{zoom:1.8,center:[-60.4619,10.1428]},"Middle East":{zoom:1.7,center:[22.9056,39.5752]},"No WAGF Region/Bloc":{zoom:.6,center:[-8.2363,44.2392]},"North America & Non-Spanish Caribbean":{zoom:2.1,center:[-68.1935,31.4282]},Oceania:{zoom:1.5,center:[161.6257,-.668]}},Jh={circleRadius:{standard:["interpolate",["linear"],["zoom"],0,3,2,3.5,4,4,5,5,6,6.5,7,8,8,10,10,14,12,18,14,22],highlighted:["interpolate",["linear"],["zoom"],0,4,4,5,8,12,12,20],faded:["interpolate",["linear"],["zoom"],0,2,4,2.5,8,5,12,8],compact:["interpolate",["linear"],["zoom"],0,2,4,3,8,6,12,10],large:["interpolate",["linear"],["zoom"],0,4,4,6,8,14,12,24],touchTarget:["interpolate",["linear"],["zoom"],0,12,2,15,4,19,6,20,8,21,10,22,12,24,14,28]}};function kv(e){return wv[e]||null}function jc(e="standard"){return Jh.circleRadius[e]||Jh.circleRadius.standard}const xv={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};function Nt(e){return e==null?"":String(e).replace(/[&<>"'`]/g,t=>xv[t])}function Sv(e,t=""){try{const o=new URL(String(e),typeof location<"u"?location.href:"https://example.invalid/");if(o.protocol==="http:"||o.protocol==="https:")return Nt(o.href)}catch{}return Nt(t)}function Xh(e={}){const{getMap:t=()=>null,mapId:o="unknown",getLanguageFamilyColor:n=()=>"#999999",getNormalizedPeopleGroups:a=()=>[]}=e,r=je("uiStore"),{t:s,locale:i}=Ot(),l=we([]);function c($){const p=n($.languageFamily),_="https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg";let h=$.imageUrl;(!h||h.includes("NoImageAvailable"))&&(h=_);const k=($.name||"U")[0].toUpperCase(),L=["#e74c3c","#3498db","#2ecc71","#f39c12","#9b59b6","#1abc9c","#e67e22","#34495e"],P=k.charCodeAt(0)%L.length,G=L[P];return` +`,"pin-hint"),(F,U)=>c.value?Ms((ne(),me("div",{key:0,ref_key:"hintEl",ref:m,class:Ke(["pin-hint",{dark:i.value}]),role:"status"},[R("span",Wy,[U[0]||(U[0]=R("span",{class:"pin-hint-dot","aria-hidden":"true"},null,-1)),Ht(" "+ye(l.value)+" ",1),R("button",{class:"pin-hint-x",type:"button","aria-label":t("aria.dismissHint","Dismiss hint"),onClick:K},"×",8,qy)])],2)),[[ip,u.value&&f.value]]):Re("",!0)}},Vy=".lsn-bar[data-v-9a589f6f]{display:flex;align-items:flex-start;gap:8px;flex:none;margin:0;padding-block:8px;padding-inline:12px 8px;background:#fff8e1;border-block-end:1px solid #f0d68a;color:#4a3b00;font:400 13px/1.4 system-ui,-apple-system,Segoe UI,sans-serif}.lsn-bar__text[data-v-9a589f6f]{flex:1 1 auto;margin:0}.lsn-bar__x[data-v-9a589f6f]{flex:none;min-width:24px;min-height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:inherit;font:600 18px/1 system-ui,sans-serif;cursor:pointer}.lsn-bar__x[data-v-9a589f6f]:focus-visible{outline:2px solid #1a73e8;outline-offset:2px}.lsn-block[data-v-9a589f6f]{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;min-height:200px;padding:24px;background:#f7f7f5;color:#333;text-align:center;font:400 15px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}.lsn-block__text[data-v-9a589f6f]{max-width:28em;margin:0}",ln=(e,t)=>{const o=e.__vccOpts||e;for(const[n,a]of t)o[n]=a;return o},Yy={key:0,class:"lsn-block",role:"status"},Zy={class:"lsn-block__text"},Jy={key:0},Xy={key:1,class:"lsn-bar",role:"note"},Qy={class:"lsn-bar__text"},e1=["aria-label","title"],Zg=ln({__name:"LargerScreenNotice",props:{mode:{type:String,required:!0},label:{type:String,default:""},locale:{type:String,default:""}},emits:["dismiss"],setup(e){const t=e,o=(s,i)=>ao(s,t.locale||void 0)||i,n=te(()=>o("messages.largerScreenNotice","This experimental map is built for larger screens. It opens here, but parts of it may not fit or work well on a phone.")),a=te(()=>o("messages.noticeDismiss","Dismiss")),r=te(()=>o("messages.desktopOnlyNotice","{label} only supports desktop — open this page on a desktop to use it.").split("{label}"));return(s,i)=>e.mode==="desktop-only"?(ne(),me("div",Yy,[R("p",Zy,[Ht(ye(r.value[0]),1),r.value.length>1?(ne(),me("bdi",Jy,ye(e.label),1)):Re("",!0),Ht(ye(r.value[1]||""),1)])])):(ne(),me("div",Xy,[R("p",Qy,ye(n.value),1),R("button",{type:"button",class:"lsn-bar__x","aria-label":a.value,title:a.value,onClick:i[0]||(i[0]=l=>s.$emit("dismiss"))},"×",8,e1)]))}},[["styles",[Vy]],["__scopeId","data-v-9a589f6f"]]),t1="(max-width: 639.98px)";function o1(e){for(let t=e;t;t=t.parentNode||t.host)if(t.nodeType===1&&t.hasAttribute("data-doxa-gallery"))return!0;return!1}function n1(e){var l;const t=te(()=>{var u;const c=(u=e.value)==null?void 0:u.mobile;return c==="desktop-only"||c==="larger-screens"?c:null});let o=null;try{o=i$()}catch{o=null}const n=o?o1(o):!1,a=we(!1);if(typeof window<"u"&&typeof window.matchMedia=="function"){const c=window.matchMedia(t1);a.value=c.matches;const u=d=>{a.value=d.matches};(l=c.addEventListener)==null||l.call(c,"change",u),ho(()=>{var d;return(d=c.removeEventListener)==null?void 0:d.call(c,"change",u)})}const r=te(()=>{var c;return`dx-maps:larger-screens-dismissed:${((c=e.value)==null?void 0:c.profile)||""}`}),s=we(!1);Ue(r,c=>{try{s.value=sessionStorage.getItem(c)==="1"}catch{s.value=!1}},{immediate:!0});function i(){s.value=!0;try{sessionStorage.setItem(r.value,"1")}catch{}}return{flag:t,blocked:te(()=>t.value==="desktop-only"&&a.value&&!n),advise:te(()=>t.value==="larger-screens"&&a.value&&!n&&!s.value),dismiss:i,label:te(()=>{var c,u;return String(((c=e.value)==null?void 0:c.mobileLabel)||((u=e.value)==null?void 0:u.profile)||"")})}}const pi="mapbox://styles/mapbox/standard",a1=pi,r1=pi,s1=!1,Jg={lightPreset:"night",theme:"default"},i1={lightPreset:"day",theme:"monochrome"};function l1(e){return e?/affinity|region|language/i.test(String(e))?"light":"dark":null}function c1(e){let t=!1;const o=new WeakSet;function n(){return!1}function a(){return n()?"night":"day"}let r="dark";function s(b){return l1(b)}function i(b,m){b!=="light"&&b!=="dark"||(r=b,m&&y(m))}function l(){return{...r==="light"?i1:Jg}}function c(){return pi}function u(){return{basemap:l()}}function d(b,m){try{return typeof b.getConfigProperty=="function"?b.getConfigProperty("basemap",m):void 0}catch{return}}function f(b){return!!b&&typeof b.setConfigProperty=="function"&&typeof b.getConfigProperty=="function"}function x(b,m=!1){if(!f(b))return!1;const $=l();let p=!1;try{for(const[_,h]of Object.entries($))!m&&d(b,_)===h||(b.setConfigProperty("basemap",_,h),p=!0)}catch(_){console.warn("[useMapTheme] setConfigProperty failed:",_)}return p}function S(b){if(!o.has(b)&&(o.add(b),!!f(b)))try{b.on("style.load",()=>x(b)),b.on("styledata",()=>x(b))}catch{}}function y(b){if(!b)return;if(S(b),x(b)&&!t){t=!0;try{b.once("idle",()=>{t=!1,x(b,!0)})}catch{t=!1}}}function g(b){e.toggleTheme(),y(b)}return{setLook:i,lookFor:s,STANDARD_STYLE:pi,LIGHT_STYLE:a1,DARK_STYLE:r1,isDarkTheme:n,lightPreset:a,basemapConfig:l,bootStyle:c,bootConfig:u,applyTheme:y,swapTheme:g}}let u1=0;const d1=Rl("ui",{state:()=>({_storeInstanceId:++u1,theme:"light",colorScheme:"default",reducedMotion:!1,highContrast:!1,activeTab:"doxa-regions",sidebarCollapsed:!1,mobileMenuOpen:!1,legendState:"collapsed",_customLegendHeight:null,searchMode:!1,hamburgerMenuOpen:!1,legendMode:"prayer",prayerFilter:null,engagementFilter:null,adoptionFilter:null,religionFilter:null,selectedPeopleGroup:null,breakpoint:"desktop",windowSize:{width:window.innerWidth,height:window.innerHeight},toasts:[],nextToastId:1,toastDuration:5e3,openModals:[],modalData:new Map,isGlobalLoading:!1,globalLoadingMessage:"Loading...",loadingStates:new Map,interactionHistory:[],maxHistoryLength:20,keyboardShortcutsEnabled:!0,screenReaderAnnouncement:"",focusTrapActive:!1,debugMode:!1,showPerformanceOverlay:!1}),getters:{isDarkTheme:e=>!1,isMobile:e=>e.breakpoint==="mobile",isTablet:e=>e.breakpoint==="tablet",isDesktop:e=>e.breakpoint==="desktop"||e.breakpoint==="wide",legendHeight:e=>e._customLegendHeight?e._customLegendHeight:e.legendState==="collapsed"?"48px":e.legendState==="open"?"30%":e.legendState==="fullyOpen"?"calc(100% - 80px)":"48px",caretRotation:e=>e.legendState==="collapsed"?0:90,showPullTab:e=>e.legendState==="open"||e.legendState==="fullyOpen",getToastsByType:e=>t=>e.toasts.filter(o=>o.type===t),hasOpenModal:e=>e.openModals.length>0,topModal:e=>e.openModals.length===0?null:e.openModals[e.openModals.length-1],isModalOpen:e=>t=>e.openModals.includes(t),isAnyLoading:e=>e.isGlobalLoading||e.loadingStates.size>0,isLoading:e=>t=>e.loadingStates.get(t)||!1},actions:{setTheme(e){if(!["light","dark","auto"].includes(e))return;e="light",this.theme=e;const o=this.isDarkTheme;document.documentElement.setAttribute("data-theme",o?"dark":"light");try{localStorage.setItem("theme",e)}catch{}},toggleTheme(){const e=this.theme==="light"?"dark":"light";this.setTheme(e)},setColorScheme(e){this.colorScheme=e,document.documentElement.setAttribute("data-color-scheme",e)},toggleReducedMotion(){this.reducedMotion=!this.reducedMotion,document.documentElement.setAttribute("data-reduced-motion",this.reducedMotion)},toggleHighContrast(){this.highContrast=!this.highContrast,document.documentElement.setAttribute("data-high-contrast",this.highContrast)},setActiveTab(e){this.activeTab=e,this.addToHistory({type:"tab-change",tabId:e,timestamp:Date.now()})},toggleSidebar(){this.sidebarCollapsed=!this.sidebarCollapsed},openMobileMenu(){this.mobileMenuOpen=!0},closeMobileMenu(){this.mobileMenuOpen=!1},setLegendMode(e){["prayer","detail"].includes(e)&&(this.legendMode=e)},setPrayerFilter(e){[null,"noPrayer","hasPrayer","fullPrayer"].includes(e)&&(this.prayerFilter=e)},setEngagementFilter(e){[null,"notEngaged","hasEngagement"].includes(e)&&(this.engagementFilter=e)},setAdoptionFilter(e){[null,"notAdopted","hasAdoption"].includes(e)&&(this.adoptionFilter=e)},setReligionFilter(e){[null,"C","M","H","B","E","J","S","N","O","U"].includes(e)&&(this.religionFilter=e)},selectPeopleGroup(e){const t=e&&!this.selectedPeopleGroup;this.selectedPeopleGroup=e,e?(t&&(this._legendStateBeforeDetail=this.legendState),this.legendState="open",this._customLegendHeight=null,this.setLegendMode("detail")):(this._legendStateBeforeDetail&&(this.legendState=this._legendStateBeforeDetail),this._legendStateBeforeDetail=null,this._customLegendHeight=null,this.setLegendMode("prayer"))},setLegendState(e){["collapsed","open","fullyOpen"].includes(e)&&(this.legendState=e)},toggleSearchMode(){this.searchMode=!this.searchMode},setSearchMode(e){this.searchMode=e},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},updateBreakpoint(e){let t;e<768?t="mobile":e<1024?t="tablet":e<1920?t="desktop":t="wide",t!==this.breakpoint&&(this.breakpoint=t)},updateWindowSize(e,t){this.windowSize.width=e,this.windowSize.height=t,this.updateBreakpoint(e)},showToast(e){const{message:t,type:o="info",duration:n=this.toastDuration,action:a=null,persistent:r=!1}=e,s={id:this.nextToastId++,message:t,type:o,duration:n,action:a,persistent:r,createdAt:Date.now()};return this.toasts.push(s),!r&&n>0&&setTimeout(()=>{this.removeToast(s.id)},n),s.id},showSuccess(e,t={}){return this.showToast({message:e,type:"success",...t})},showError(e,t={}){return this.showToast({message:e,type:"error",duration:7e3,...t})},showWarning(e,t={}){return this.showToast({message:e,type:"warning",...t})},showInfo(e,t={}){return this.showToast({message:e,type:"info",...t})},removeToast(e){const t=this.toasts.findIndex(o=>o.id===e);t!==-1&&this.toasts.splice(t,1)},clearAllToasts(){this.toasts=[]},openModal(e,t={}){this.openModals.includes(e)||(this.openModals.push(e),this.modalData.set(e,t),this.focusTrapActive=!0)},closeModal(e=null){if(e){const t=this.openModals.indexOf(e);t!==-1&&(this.openModals.splice(t,1),this.modalData.delete(e))}else{const t=this.openModals.pop();t&&this.modalData.delete(t)}this.openModals.length===0&&(this.focusTrapActive=!1)},closeAllModals(){this.openModals=[],this.modalData.clear(),this.focusTrapActive=!1},getModalData(e){return this.modalData.get(e)},showGlobalLoading(e="Loading..."){this.isGlobalLoading=!0,this.globalLoadingMessage=e},hideGlobalLoading(){this.isGlobalLoading=!1},setLoading(e,t=!0){t?this.loadingStates.set(e,!0):this.loadingStates.delete(e)},addToHistory(e){this.interactionHistory.push(e),this.interactionHistory.length>this.maxHistoryLength&&this.interactionHistory.shift()},clearHistory(){this.interactionHistory=[]},announce(e,t="polite"){this.screenReaderAnnouncement=e,setTimeout(()=>{this.screenReaderAnnouncement===e&&(this.screenReaderAnnouncement="")},1e3)},toggleKeyboardShortcuts(){this.keyboardShortcutsEnabled=!this.keyboardShortcutsEnabled},toggleDebugMode(){this.debugMode=!this.debugMode},togglePerformanceOverlay(){this.showPerformanceOverlay=!this.showPerformanceOverlay},toggleLegend(){this.legendState==="fullyOpen"?this.legendState="open":this.legendState==="open"?this.legendState="collapsed":this.legendState="open",this._customLegendHeight=null},openLegend(){this.legendState="open",this._customLegendHeight=null},fullyOpenLegend(){this.legendState="fullyOpen",this._customLegendHeight=null},collapseLegend(){this.legendState="collapsed",this._customLegendHeight=null},setLegendHeight(e){this._customLegendHeight=e},handleLegendItemClick(){this.legendState==="fullyOpen"&&(this.legendState="open")},enableSearchMode(){this.searchMode=!0},disableSearchMode(){this.searchMode=!1},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},openHamburgerMenu(){this.hamburgerMenuOpen=!0},closeHamburgerMenu(){this.hamburgerMenuOpen=!1},init(){let e=null;try{e=localStorage.getItem("theme")}catch{}e&&this.setTheme(e),new ResizeObserver(o=>{for(const n of o)this.updateWindowSize(n.contentRect.width,n.contentRect.height)}).observe(document.documentElement),window.matchMedia&&(window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",o=>{this.theme==="auto"&&document.documentElement.setAttribute("data-theme",o.matches?"dark":"light")}),window.matchMedia("(prefers-reduced-motion: reduce)").addEventListener("change",o=>{this.reducedMotion=o.matches,document.documentElement.setAttribute("data-reduced-motion",o.matches)}))}}}),p1=Rl("map",{state:()=>({maps:{},activeMapId:null,selectedRegion:null,selectedFamily:null,selectedAffinityBlock:null,selectedLanguage:null,selectedDialect:null,activeLegendTab:"family",selectedResource:null,selectedPeopleGroup:null,selectedPinIds:[],globalFilters:{},searchQuery:"",autoFly:{isActive:!1,speed:1,interval:5e3,currentIndex:0,items:[],timerId:null},guidedTour:{isActive:!1,currentStep:0,steps:[]},showClusters:!1,clusterMode:"region",clusteringMode:"off",clusterPinOpacity:.6,clusterFilterProperty:null,clusterFilterValue:null,flySpeed:"normal",fullscreenMapId:null,preferences:{theme:"light",defaultMapStyle:"streets",enableAnimations:!0,autoSavePreferences:!0}}),getters:{getMapById:e=>t=>e.maps[t],activeMap:e=>e.activeMapId?e.maps[e.activeMapId]:null,hasMap:e=>t=>t in e.maps,allMapIds:e=>Object.keys(e.maps),hasSelection:e=>!!(e.selectedRegion||e.selectedFamily||e.selectedAffinityBlock||e.selectedPeopleGroup),isAutoFlying:e=>e.autoFly.isActive,isGuidedTourActive:e=>e.guidedTour.isActive,isMapFullscreen:e=>t=>e.fullscreenMapId===t},actions:{registerMap(e,t,o={}){let n=1.5;o.zoom!==void 0?n=o.zoom:t&&typeof t.getZoom=="function"&&(n=t.getZoom());let a=[0,0];if(o.center)a=o.center;else if(t&&typeof t.getCenter=="function"){const r=t.getCenter();r&&(a=[r.lng,r.lat])}this.maps[e]={instance:t,config:o,isReady:!1,zoom:n,center:a,registeredAt:Date.now()},this.activeMapId||(this.activeMapId=e)},setMapReady(e){const t=this.maps[e];t&&(t.isReady=!0)},updateMapState(e,t){const o=this.maps[e];o&&Object.assign(o,t)},unregisterMap(e){if(delete this.maps[e],this.activeMapId===e){const t=this.allMapIds;this.activeMapId=t.length>0?t[0]:null}},setActiveMap(e){e in this.maps&&(this.activeMapId=e)},selectRegion(e){this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedRegion=e},selectFamily(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedFamily=e},setActiveLegendTab(e){this.activeLegendTab=e},selectLanguage(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedFamily=null,this.selectedDialect=null,this.selectedLanguage=e},selectDialect(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedDialect=e},selectAffinityBlock(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedPeopleGroup=null,this.selectedAffinityBlock=e},selectPeopleGroup(e){this.selectedPeopleGroup=e},selectResource(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedResource===e?this.selectedResource=null:this.selectedResource=e},clearSelections(){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedAffinityBlock=null,this.selectedResource=null,this.selectedPeopleGroup=null,this.selectedPinIds=[],this.showClusters=!1,this.clusterMode="region"},setSelectedPinIds(e){this.selectedPinIds=e||[]},setFilter(e,t){this.globalFilters[e]=t},removeFilter(e){delete this.globalFilters[e]},clearFilters(){this.globalFilters={},this.searchQuery=""},setSearchQuery(e){this.searchQuery=e},startAutoFly(e,t=1){this.stopAutoFly(),this.autoFly.isActive=!0,this.autoFly.speed=t,this.autoFly.items=e,this.autoFly.currentIndex=0},stopAutoFly(){this.autoFly.timerId&&(clearInterval(this.autoFly.timerId),this.autoFly.timerId=null),this.autoFly.isActive=!1,this.autoFly.currentIndex=0},setAutoFlySpeed(e){this.autoFly.speed=Math.max(.5,Math.min(2,e))},nextAutoFlyItem(){if(!this.autoFly.isActive||this.autoFly.items.length===0)return;this.autoFly.currentIndex=(this.autoFly.currentIndex+1)%this.autoFly.items.length;const e=this.autoFly.items[this.autoFly.currentIndex];e.type==="region"?this.selectRegion(e):e.type==="family"&&this.selectFamily(e)},toggleClusters(e){typeof e=="boolean"?this.showClusters=e:this.showClusters=!this.showClusters},setClusterMode(e){["region","language-family","affinity-block","mst","resource"].includes(e)&&(this.clusterMode=e)},setClusteringMode(e){["off","mapbox","mst","network"].includes(e)&&(this.clusteringMode=e,this.showClusters=e!=="off")},setClusterFilter(e,t){this.clusterFilterProperty=e||null,this.clusterFilterValue=t||null},clearClusterFilter(){this.clusterFilterProperty=null,this.clusterFilterValue=null},setFlySpeed(e){["slow","normal","fast"].includes(e)&&(this.flySpeed=e)},setSelectedFamily(e){this.selectFamily(e)},clearSelectedFamily(){this.selectFamily(null)},setSelectedRegion(e){this.selectRegion(e)},clearSelectedRegion(){this.selectRegion(null)},clearSelectedResource(){this.selectResource(null)},clearSelectedLanguage(){this.selectLanguage(null)},clearSelectedDialect(){this.selectDialect(null)},toggleFullscreen(e){this.fullscreenMapId===e?this.fullscreenMapId=null:this.fullscreenMapId=e},loadPreferences(){try{const e=localStorage.getItem("mapUserPreferences");if(e){const t=JSON.parse(e);this.preferences={...this.preferences,...t}}}catch(e){console.error("[mapStore] Failed to load preferences:",e)}},savePreferences(){try{localStorage.setItem("mapUserPreferences",JSON.stringify(this.preferences))}catch(e){console.error("[mapStore] Failed to save preferences:",e)}},setPreference(e,t){this.preferences[e]=t,this.preferences.autoSavePreferences&&this.savePreferences()}}}),g1=Rl("data",{state:()=>({sources:{},loadingStates:{}}),actions:{async load(e,t){if(!this.sources[e]){this.loadingStates[e]={isLoading:!0,error:null};try{const o=await t();this.sources[e]=Ra({features:o,timestamp:Date.now()}),this.loadingStates[e]={isLoading:!1,error:null}}catch(o){console.error(`[dataStore] Failed to load source "${e}":`,o),this.loadingStates[e]={isLoading:!1,error:o}}}},clearSource(e){delete this.sources[e],delete this.loadingStates[e]},cacheSourceData(e,t){this.sources[e]=Ra({features:t.normalizedData||[],timestamp:t.timestamp||Date.now()})},hasSourceData(e){return!!this.sources[e]},getSourceData(e){return this.sources[e]?{normalizedData:this.sources[e].features}:null}},getters:{getData:e=>t=>{var o;return((o=e.sources[t])==null?void 0:o.features)??null},isLoading:e=>t=>{var o;return((o=e.loadingStates[t])==null?void 0:o.isLoading)??!1},getError:e=>t=>{var o;return((o=e.loadingStates[t])==null?void 0:o.error)??null}}}),ma={_meta:{_comment:"Single source of truth for data-source connections across all doxa-maps bundles.",_comment_token:"Mapbox access token is fetched at runtime from window.MAP_TOKEN_URL (same modular pattern as window.MAP_APP_API_URL). Not hardcoded to any host — set mapboxTokenUrl below or override window.MAP_TOKEN_URL on the host page.",mapboxTokenUrl:"window.MAP_TOKEN_URL"},activeSource:"pray-tools",sources:{"pray-tools":{id:"pray-tools",name:"Prayer.Tools API",type:"rest-api",description:"pray.doxa.life live API — people-group prayer, engagement, and adoption data. Base URL read from window.MAP_APP_API_URL or VITE_API_BASE_URL at runtime.",endpoints:{bulk:"/api/people-groups/list",detail:"/api/people-groups/detail/{slug}",statistics:"/api/people-groups/statistics"},queryParams:{lang:"en"},defaultFields:["slug","name","latitude","longitude","wagf_region","wagf_block","wagf_member","rop1","imb_reg_of_people_2","imb_reg_of_people_25","imb_reg_of_people_3","country_code","religion","population","has_photo","image_url","people_praying","people_committed","adopted_by_churches","engagement_status","imb_gsec","primary_language","imb_language_family","imb_language_class","imb_language_speakers"],pollFields:["slug","people_praying"],pollInterval:3e5,fallbackSourceId:null,fieldMappings:{uniqueId:"slug",slug:"slug",name:"name",latitude:"latitude",longitude:"longitude",wagfRegion:"wagf_region",doxaRegion:"wagf_region",wagfBlock:"wagf_block",wagfMember:"wagf_member",affinityBlock:"rop1",countryIso:"country_code",religion:"religion",religionCode:"religion",population:"population",hasPhoto:"has_photo",imageUrl:"image_url",photoUrl:"image_url",peoplePraying:"people_praying",peopleCommitted:"people_committed",engagementStatus:"engagement_status",adoptionStatus:"adopted_by_churches",language:"primary_language",cluster:"imb_reg_of_people_2",peopleGroup:"imb_reg_of_people_25",peopleGroupCountry:"imb_reg_of_people_3",languageFamily:"imb_language_family",languageClass:"imb_language_class",languageSpeakers:"imb_language_speakers"},imageConfig:{useField:"imageUrl",fallbackField:null,fallbackUrlTemplate:null,placeholderUrl:"https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg",useSvgPlaceholder:!0}},"doxa-csv":{id:"doxa-csv",name:"DOXA People Groups CSV",type:"csv",path:"assets/data/Joshua-project-ids-Doxa-1439.csv",description:"People groups dataset from DOXA / Joshua Project",fieldMappings:{uniqueId:"ROP3",peopleGroupId:"ROP3",countryCode:"ROG",peopleId3:"PeopleID3",name:"Name",displayName:"NmDisp",alternateName:"NmAlt",description:"PeopleDesc",locationDescription:"LocationDe",country:"Ctry",countryIso:"ISOalpha3",region:"Regn",subRegion:"RegnSub",wagfRegion:"WAGF Region",doxaRegion:"WAGF Region",wagfBlock:"WAGF BLOCK",affinityBloc:"Affbloc",affinityBlock:"ROP1",affinityCode:"AffCd",affinityName:"Aff",peopleCluster:"PplClstr",ethneName:"Ethne",latitude:"Latitude",longitude:"Longitude",population:"Pop",populationClass:"PopCls",status:"Status",engagementStatus:"EngStat",evangelicalLevel:"EvngLvl",gsec:"GSEC",gsecBrief:"GSECbrf",gsecLong:"GSEClng",spiScore:"SPI",spiDescription:"SPIdesc",language:"Lang",languageCode:"ROL",languageFamily:"LangFamily",religion:"Rlgn",religionCode:"ROR",religionDescription:"RORdesc",religionBase:"RlgnBs",religionDiv:"RlgnDiv",bible:"Bible",jesusFilm:"Jesus",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories",resourcesTotal:"ResTot",bibleLevel:"LvlBible",yearPublished:"YrPub",photoCredit:"PicCrdt",photoUrl:"PicURL",hasPhoto:"Photo",isIndigenous:"Indigenous"},imageConfig:{useField:"photoUrl",fallbackField:"peopleId3",fallbackUrlTemplate:"https://joshuaproject.net/assets/media/profiles/photos/p{peopleId3}.jpg",placeholderUrl:"https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg"}}},systemFields:{uniqueId:{description:"Unique identifier per row (slug for API, ROP3+ROG for CSV)",required:!0},peopleGroupId:{description:"People group ID — same group can appear in multiple countries",required:!0},name:{description:"People group display name",required:!0},latitude:{description:"Latitude coordinate for map pin",required:!0},longitude:{description:"Longitude coordinate for map pin",required:!0},engagementStatus:{description:"Boolean — true if engaged_status = 'engaged'",required:!1},adoptionStatus:{description:"Boolean — true if adopted_by_churches > 0",required:!1},peoplePraying:{description:"Number of people currently praying for this group — from pray-tools API",required:!1},peopleCommitted:{description:"Raw count of committed workers for this group — source of engagementStatus",required:!1},languageFamily:{description:"Language family name",required:!1},religion:{description:"Primary religion",required:!1},population:{description:"Population count",required:!1},doxaRegion:{description:"WAGF/DOXA region name",required:!1},photoUrl:{description:"URL to people group photo",required:!1},description:{description:"People group description text",required:!1}}},h1=".profile-loader[data-locale-pending][data-v-ceea9a56] .stl-tabs,.profile-loader[data-locale-pending][data-v-ceea9a56] .stl-title,.profile-loader[data-locale-pending][data-v-ceea9a56] .stl-rows,.profile-loader[data-locale-pending][data-v-ceea9a56] .legend-title,.profile-loader[data-locale-pending][data-v-ceea9a56] .legend-content,.profile-loader[data-locale-pending][data-v-ceea9a56] .legend-reopen-label,.profile-loader[data-locale-pending][data-v-ceea9a56] .lt-btn-text,.profile-loader[data-locale-pending][data-v-ceea9a56] .rd-topbar,.profile-loader[data-locale-pending][data-v-ceea9a56] .rd-exportbar{visibility:hidden}.profile-loader[data-v-ceea9a56]{border-radius:var(--map-radius-corners, var(--map-radius, 0px));width:100%;height:100%;min-height:var(--profile-min-h, 100dvh);position:relative}.profile-loader.has-screen-notice[data-v-ceea9a56]{display:flex;flex-direction:column}.profile-loader.has-screen-notice[data-v-ceea9a56]>:not(.lsn-bar){flex:1 1 auto;min-height:0;position:relative!important;inset:auto!important}.profile-error[data-v-ceea9a56]{padding:1rem;background:#fff3cd;border:1px solid #ffc107;border-radius:4px;font-family:monospace;font-size:13px}",f1=["dir","data-locale-pending"],m1={key:0,class:"profile-error"},b1={key:1,class:"profile-error"},$1=ln({__name:"ProfileLoader",props:{profileConfig:{type:String,default:""}},setup(e){var K;const o=e,n=je("profileConfig",null),a=te(()=>{var N;if(!o.profileConfig)return null;let v;try{v=JSON.parse(o.profileConfig)}catch{return console.error("[ProfileLoader] Invalid profile-config JSON:",o.profileConfig),null}if(v&&v.assetsBase===void 0){const A=(N=n==null?void 0:n.value)==null?void 0:N.assetsBase;typeof A=="string"&&A&&(v.assetsBase=A)}return v}),r=je("profileModules",null);if(!r)throw new Error('[ProfileLoader] No profileModules provided. Bundle entry must `app.provide("profileModules", import.meta.glob("./*.vue"))`');const s=(()=>{const v=Object.keys(r||{});if(v.length!==1)return null;const N=v[0].match(/^\.\/(.+)\.vue$/);return N?N[1]:null})(),i=te(()=>{var v;return((v=a.value)==null?void 0:v.profile)||s||null}),l=k$(),c=te(()=>{var N;const v=(N=a.value)==null?void 0:N.tk;return typeof v=="string"&&v?v:l.value||""});Ue(()=>{var v;return(v=a.value)==null?void 0:v.tk},v=>{typeof v=="string"&&v&&Il(v)},{immediate:!0}),Ue(()=>{var v;return(v=a.value)==null?void 0:v.tokenUrl},v=>{var N;v&&!((N=a.value)!=null&&N.tk)&&!l.value&&x$(v)},{immediate:!0});const u=te(()=>{var v;return((v=a.value)==null?void 0:v.dataSource)||ma.activeSource||"doxa-csv"}),d=te(()=>{var v;return((v=a.value)==null?void 0:v.colorSet)||"default"}),f=te(()=>!1),x=te(()=>{var v;return((v=a.value)==null?void 0:v.pinHint)!==!1}),S=te(()=>{var N,A;const v=(((N=a.value)==null?void 0:N.locale)||((A=a.value)==null?void 0:A.lang)||Hg()||"").split("-")[0].toLowerCase();return Za.includes(v)?v:""}),y=je("appI18n",null);ud(()=>{S.value&&(y&&(y.global.locale.value=S.value),Wg(S.value),nc(y,S.value).catch(()=>{}))});const g=te(()=>{var v,N;return S.value||((N=(v=y==null?void 0:y.global)==null?void 0:v.locale)==null?void 0:N.value)||"en"}),b=te(()=>ci.has(g.value)?"rtl":"ltr"),{blocked:m,advise:$,dismiss:p,label:_}=n1(a),h=we(!1);ud(v=>{const N=g.value;if(!ci.has(N)){h.value=!1;return}let A=!0;v(()=>{A=!1}),h.value=!0,Fy(N).finally(()=>{A&&(h.value=!1)})});const k=te(()=>{var v;return((v=a.value)==null?void 0:v.instanceId)||"doxa-map-"+Math.random().toString(36).slice(2,9)}),L=te(()=>{if(!i.value)return null;const v=`./${i.value}.vue`;return r[v]?di(r[v]):(console.error(`[ProfileLoader] Profile not found: "${i.value}". Available:`,Object.keys(r)),null)});Bt("mapboxToken",c),Bt("dataSource",u),Bt("colorSet",d),Bt("profileConfig",a),Bt("instanceId",k),Bt("lang",g);const P=d1(),G=p1(),W=g1();try{const v=typeof localStorage<"u"?localStorage.getItem("theme"):null;v&&((K=P.setTheme)==null||K.call(P,v))}catch{}return Bt("uiStore",P),Bt("mapStore",G),Bt("dataStore",W),(v,N)=>(ne(),me("div",{class:Ke(["profile-loader",{"has-screen-notice":ge($)}]),dir:b.value,"data-locale-pending":h.value?"":null},[a.value?L.value?ge(m)?(ne(),ut(Zg,{key:2,mode:"desktop-only",label:ge(_),locale:g.value},null,8,["label","locale"])):(ne(),me(ot,{key:3},[ge($)?(ne(),ut(Zg,{key:0,mode:"larger-screens",locale:g.value,onDismiss:ge(p)},null,8,["locale","onDismiss"])):Re("",!0),(ne(),ut(wd(L.value)))],64)):(ne(),me("div",b1,[R("p",null,[N[1]||(N[1]=Ht("⚠️ Profile ",-1)),R("strong",null,'"'+ye(i.value)+'"',1),N[2]||(N[2]=Ht(" not found.",-1))])])):(ne(),me("div",m1,[...N[0]||(N[0]=[R("p",null,[Ht("⚠️ "),R("strong",null,"doxa-map"),Ht(": missing or invalid "),R("code",null,"profile-config"),Ht(" prop.")],-1),R("p",null,[Ht("Example: "),R("code",null,`profile-config='{"profile":"example-map","tk":"pk.eyJ..."}'`)],-1)])])),L.value&&f.value?(ne(),ut(wd(ge(null)),{key:4})):Re("",!0),L.value&&x.value?(ne(),ut(Ky,{key:5})):Re("",!0)],10,f1))}},[["styles",[h1]],["__scopeId","data-v-ceea9a56"]]);function Xg(e,t,o){var a;const n=(a=e==null?void 0:e._context)==null?void 0:a.provides;if(n&&t in n){n[t]=o;return}e.provide(t,o)}function _1(e,t){var a;const o=(a=e==null?void 0:e._context)==null?void 0:a.provides,n=o?Object.getPrototypeOf(o):null;n&&Object.setPrototypeOf(o,null);try{return t()}finally{n&&Object.setPrototypeOf(o,n)}}function y1({profileModules:e={},configureApp:t=null}={}){return r$($1,{configureApp(o){const n=f$();_1(o,()=>o.use(n));const a=Ny();o.use(a),Xg(o,"appI18n",a),Xg(o,"profileModules",e),t&&t(o,{pinia:n,i18n:a})}})}const v1=Object.assign({"./research-map.vue":()=>Ft(()=>Promise.resolve().then(()=>_2),void 0)});function w1(){return y1({profileModules:v1,configureApp:(e,{pinia:t,i18n:o})=>{}})}const k1=w1();typeof customElements<"u"&&(customElements.get("doxa-research-map")||customElements.define("doxa-research-map",k1));const x1="rgba(120, 128, 134, 0.28)",Qg="36px",eh=()=>{};function S1(e,t={}){const{enabled:o=!0}=t;if(!o||!e)return eh;const n=Array.from(e.querySelectorAll(".map-scroll-edge"));if(!n.length)return eh;const a=m=>m.classList.contains("map-scroll-edge--left");for(const m of n)m.style.background=`linear-gradient(${a(m)?"to right":"to left"}, ${x1} ${Qg}, transparent ${Qg})`,m.style.opacity="0",m.style.transition="opacity 0.16s ease",m.style.userSelect="none",m.style.webkitUserSelect="none";const r=m=>{m.style.opacity="1"},s=m=>{m.style.opacity="0"},i=()=>n.find(m=>!a(m))||null,l=new Set;let c=!1,u=null;const d=()=>{for(const m of n)l.has(m)||s(m)},f=()=>{const m=i();m&&(r(m),u&&clearTimeout(u),u=setTimeout(d,250))},x=()=>f(),S=m=>{if(!(m.touches&&m.touches.length===1))return;const $=m.target;$&&$.classList&&$.classList.contains("map-scroll-edge")||f()},y=()=>{u&&clearTimeout(u),d()};e.addEventListener("wheel",x,{passive:!0}),e.addEventListener("touchmove",S,{passive:!0}),e.addEventListener("touchend",y,{passive:!0}),e.addEventListener("touchcancel",y,{passive:!0});const g=()=>{c||f()};typeof window<"u"&&window.addEventListener("scroll",g,{passive:!0});const b=[];for(const m of n){const $=()=>{l.add(m),r(m)},p=()=>{l.delete(m),s(m)},_=()=>{c=!0,r(m)},h=()=>{c=!1,s(m)};m.addEventListener("mouseenter",$),m.addEventListener("mouseleave",p),m.addEventListener("touchstart",_,{passive:!0}),m.addEventListener("touchend",h,{passive:!0}),b.push(()=>{m.removeEventListener("mouseenter",$),m.removeEventListener("mouseleave",p),m.removeEventListener("touchstart",_),m.removeEventListener("touchend",h)})}return function(){u&&(clearTimeout(u),u=null),e.removeEventListener("wheel",x),e.removeEventListener("touchmove",S),e.removeEventListener("touchend",y),e.removeEventListener("touchcancel",y),typeof window<"u"&&window.removeEventListener("scroll",g);for(const $ of b)$();for(const $ of n)s($)}}const P1=Object.fromEntries([{id:"midnight-glow",label:"Midnight Glow",mood:"the prayer-map dark — pins glow like embers",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"night",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["doxa-simple-map","my-upg-100-list"]},{id:"daylight",label:"Daylight",mood:"the same Standard world, lights on",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"day",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["doxa-research-map","gospel-resources"]},{id:"dawn",label:"Dawn",mood:"soft warm horizon — hopeful, quiet",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"dawn",maplibre:"https://tiles.openfreemap.org/styles/positron",bestFor:["doxa-simple-map"]},{id:"dusk",label:"Dusk",mood:"blue hour — calm contrast for bright pins",mapbox:"mapbox://styles/mapbox/standard",lightPreset:"dusk",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["my-upg-100-list"]},{id:"paper",label:"Paper",mood:"near-white minimal — data reads like print",mapbox:"mapbox://styles/mapbox/light-v11",maplibre:"https://tiles.openfreemap.org/styles/positron",bestFor:["research-dashboard","cities-internet"]},{id:"ink",label:"Ink",mood:"near-black minimal — maximum pin contrast",mapbox:"mapbox://styles/mapbox/dark-v11",maplibre:"https://tiles.openfreemap.org/styles/dark",bestFor:["my-upg-100-list","cities-internet"]},{id:"streetlife",label:"Street Life",mood:"full street detail — city-scale work",mapbox:"mapbox://styles/mapbox/streets-v12",maplibre:"https://tiles.openfreemap.org/styles/bright",bestFor:["cities-internet","key-cities"]},{id:"terrain",label:"Terrain",mood:"relief + parks — where people actually live",mapbox:"mapbox://styles/mapbox/outdoors-v12",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["doxa-research-map","country-posters"]},{id:"satellite",label:"Satellite",mood:"imagery — the real ground",mapbox:"mapbox://styles/mapbox/satellite-v9",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["country-posters"]},{id:"hybrid",label:"Hybrid",mood:"imagery + labels — orientation without losing ground truth",mapbox:"mapbox://styles/mapbox/satellite-streets-v12",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["key-cities"]},{id:"wayfinder-day",label:"Wayfinder Day",mood:"high-legibility navigation palette",mapbox:"mapbox://styles/mapbox/navigation-day-v1",maplibre:"https://tiles.openfreemap.org/styles/liberty",bestFor:["gospel-resources"]},{id:"wayfinder-night",label:"Wayfinder Night",mood:"dark navigation — dashboards at night",mapbox:"mapbox://styles/mapbox/navigation-night-v1",maplibre:"https://tiles.openfreemap.org/styles/fiord",bestFor:["research-dashboard"]},{id:"galaxy",label:"Galaxy",mood:"the day side of Earth floating in space — normal land, blue oceans, black void behind the sphere",mapbox:"mapbox://styles/mapbox/standard",maplibre:"https://tiles.versatiles.org/assets/styles/colorful/style.json",bestFor:["research-dashboard","my-upg-100-list"]}].map(e=>[e.id,e]));function A1(e,t="mapbox"){if(typeof e!="string"||!e)return{style:void 0,lightPreset:void 0,paint:void 0};const o=P1[e];return o?t==="maplibre"?{style:o.maplibre,lightPreset:void 0,paint:o.paint}:{style:o.mapbox,lightPreset:o.lightPreset,paint:o.paint}:/^(mapbox:\/\/|https?:\/\/)/.test(e)?{style:e,lightPreset:void 0,paint:void 0}:{style:void 0,lightPreset:void 0,paint:void 0}}function L1(e,t){if(!e||!Array.isArray(t))return[];const o=[];for(const n of t)if(!(!n||!n.layer||!n.prop))try{if(!e.getLayer(n.layer))continue;e.setPaintProperty(n.layer,n.prop,n.value),o.push(n.layer+"."+n.prop)}catch{}return o}const C1=["mapbox","maplibre"],T1="auto";function th(e){return e&&typeof e=="object"&&"value"in e&&!("provider"in e)&&!("profile"in e)?e.value:e}function oh(e,{token:t}={}){const o=th(e);return nh(o)||"maplibre"}function nh(e){const t=th(e),o=t==null?void 0:t.provider,n=typeof location<"u"?new URLSearchParams(location.search).get("provider"):void 0,a=typeof window<"u"?window.MAP_PROVIDER:void 0,r=String(o||n||a||T1).toLowerCase().trim();return C1.includes(r)?r:""}function E1(e){return e==="maplibre"?"MapLibre":"Mapbox"}function ah(e){return typeof window<"u"&&!!window.mapboxgl&&e instanceof window.mapboxgl.Map}function M1(e){if(typeof window>"u")return;const t=window.maplibregl,o=window.mapboxgl;if(t&&t.Map&&e instanceof t.Map)return"maplibre";if(o&&o.Map&&e instanceof o.Map)return"mapbox"}function gi(e){if(typeof window>"u")return;const t=window.maplibregl,o=window.mapboxgl;return t&&t.Map&&e instanceof t.Map?t:o&&o.Map&&e instanceof o.Map?o:o||t}function R1(e,t){if(!e||!t||typeof e.setProjection!="function")return!1;const o=typeof window<"u"?window.maplibregl:null,n=!!(o&&o.Map&&e instanceof o.Map);try{return e.setProjection(n?{type:t}:t),!0}catch{return!1}}function cn(e,t="circle"){return ah(e)?{[`${t}-emissive-strength`]:1}:{}}const Cn={mapboxGlJs:{url:"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js",integrity:"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ"},mapboxGlCss:{url:"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.css",integrity:"sha384-rp1X/jJ9MpWPef9OimfXhOaOc4Gzs87yQvF+ajwY6X2H4PTeHNycNlLWiWvj7ehV"},maplibreGlJs:{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js",integrity:"sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp"},maplibreGlCss:{url:"https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.css",integrity:"sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK"},mapboxGeocoderJs:{url:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js",integrity:"sha384-Lx9WK8XhZk57czwxt6B6nyaDHB5Ayrcrsu4Fw4bCp/Ot/QLOsUZ0xYqLOpOOSXZw"},mapboxGeocoderCss:{url:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.css",integrity:"sha384-1KNhwJNCQTr0DCi/5/OnQcFytgycxTahxNZaqKbAtqmY8bUhu26qxXqvDGXXwplS"},maplibreGeocoderJs:{url:"https://cdn.jsdelivr.net/npm/@maplibre/maplibre-gl-geocoder@1.9.4/dist/maplibre-gl-geocoder.min.js",integrity:"sha384-RGV5vfoJd7alk8HE+71IyVfu19ciH1FKA15+AuXs6OeBM2npXrmTPFqG23yMiHXi"},maplibreGeocoderCss:{url:"https://cdn.jsdelivr.net/npm/@maplibre/maplibre-gl-geocoder@1.9.4/dist/maplibre-gl-geocoder.css",integrity:"sha384-UkDpPApjTpHJHpcJiSNAmbobh30W0/dmt0DoKm4V8CWYRYvQ/Jhd/ijFz0tFdVnH"},d3:{url:"https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js",integrity:"sha384-CjloA8y00+1SDAUkjs099PVfnY2KmDC2BZnws9kh8D/lX1s46w6EPhpXdqMfjK6i"}};function Vr(e,t){const o=Object.values(Cn).find(n=>n.url===t);return o&&(e.integrity=o.integrity,e.crossOrigin="anonymous"),e}const rh={mapbox:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js",maplibre:"https://cdn.jsdelivr.net/npm/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js"};function F1(e){return!!e&&typeof window<"u"&&e===window.maplibregl}function N1(e){if(typeof window>"u")return!1;const t=e?[e]:[window.maplibregl,window.mapboxgl].filter(Boolean);let o=!1;for(const n of t)if(!(!n||!n.setRTLTextPlugin))try{if(F1(n)){if(n.getRTLTextPluginStatus&&n.getRTLTextPluginStatus()!=="unavailable")continue;const a=n.setRTLTextPlugin(rh.maplibre,!0);a&&a.catch&&a.catch(()=>{})}else n.setRTLTextPlugin(rh.mapbox,null,!0);o=!0}catch{}return o}const I1=/\[\s*"get"\s*,\s*"name(?::latin|:nonlatin|:en|_en|_int)?"\s*\]|\{name(?::latin|:nonlatin|:en|_en|_int)?\}/,sh=new WeakMap;function O1(e){return typeof window<"u"&&!!window.maplibregl&&e instanceof window.maplibregl.Map}function ih(e,t){if(!e||!t)return 0;const o=String(t).split("-")[0].toLowerCase();try{if(!O1(e))return typeof e.setLanguage=="function"&&e.setLanguage(o),0;const n=e.getStyle&&e.getStyle();if(!n||!Array.isArray(n.layers))return 0;let a=sh.get(e);a||(a=new Map,sh.set(e,a));let r=0;for(const s of n.layers){if(s.type!=="symbol"||!s.layout||s.layout["text-field"]==null)continue;const i=s.layout["text-field"],l=JSON.stringify(i);if(l.startsWith('["coalesce",["get","name:')){if(!a.has(s.id))continue}else{if(!I1.test(l))continue;a.set(s.id,i)}const c=["coalesce",["get","name:"+o],["get","name_"+o],["get","name:latin"],["get","name_en"],["get","name"]];e.setLayoutProperty(s.id,"text-field",c),r++}return r}catch{return 0}}const Ja={mapbox:{global:"mapboxgl",js:Cn.mapboxGlJs.url,css:Cn.mapboxGlCss.url},maplibre:{global:"maplibregl",js:Cn.maplibreGlJs.url,css:Cn.maplibreGlCss.url}},D1={"Map.Title":"map","Marker.Title":"marker","Popup.Close":"closePopup","NavigationControl.ZoomIn":"zoomIn","NavigationControl.ZoomOut":"zoomOut","NavigationControl.ResetBearing":"resetBearing","AttributionControl.ToggleAttribution":"toggleAttribution","AttributionControl.MapFeedback":"mapFeedback","FullscreenControl.Enter":"enterFullscreen","FullscreenControl.Exit":"exitFullscreen","GeolocateControl.FindMyLocation":"findMyLocation","GeolocateControl.LocationNotAvailable":"locationNotAvailable","GlobeControl.Enable":"enableGlobe","GlobeControl.Disable":"disableGlobe","CooperativeGesturesHandler.WindowsHelpText":"ctrlScroll","CooperativeGesturesHandler.MacHelpText":"cmdScroll","CooperativeGesturesHandler.MobileHelpText":"twoFingers","ScrollZoomBlocker.CtrlMessage":"ctrlScroll","ScrollZoomBlocker.CmdMessage":"cmdScroll","TouchPanBlocker.Message":"twoFingers"};function lh(e,t){const o={};for(const[a,r]of Object.entries(D1)){const s=ao(`mapui.${r}`,e);s&&(o[a]=s)}const n=ao(t==="maplibre"?"mapui.maplibreLogo":"mapui.mapboxHomepage",e);return n&&(o["LogoControl.Title"]=n),o}function ch(e){if(typeof window>"u")return;const t=window,o=()=>{try{const n=e.getContainer().querySelector(".mapboxgl-ctrl-logo, .maplibregl-ctrl-logo");n&&(n.style.display="none")}catch{}};if(t.__doxaLogoOwner&&t.__doxaLogoOwner!==e){e.once("load",o),o();return}t.__doxaLogoOwner=e,e.once("remove",()=>{t.__doxaLogoOwner===e&&(t.__doxaLogoOwner=null)})}const z1=Ja.mapbox.css,j1="https://tiles.openfreemap.org/styles/liberty",B1="https://tiles.openfreemap.org/styles/fiord";function ic(e){var o;const t=((o=Ja[e])==null?void 0:o.global)||Ja.mapbox.global;return typeof window<"u"?window[t]:void 0}async function uh(e){const t=Ja[e]||Ja.mapbox;if(ic(e)||typeof document>"u")return;if(!document.querySelector(`link[href="${t.css}"]`)){const n=document.createElement("link");n.rel="stylesheet",n.href=t.css,Vr(n,t.css),document.head.appendChild(n)}const o=document.querySelector(`script[src="${t.js}"]`);if(o){if(ic(e))return;await new Promise(n=>{o.addEventListener("load",n,{once:!0}),o.addEventListener("error",n,{once:!0})});return}await new Promise((n,a)=>{const r=document.createElement("script");r.src=t.js,Vr(r,t.js),r.async=!1,r.addEventListener("load",n,{once:!0}),r.addEventListener("error",()=>a(new Error(`[useMapInstance] Failed to load ${e} engine script`)),{once:!0}),document.head.appendChild(r)})}async function G1(e,t){if(!e)return;const o=e.getRootNode();if(!(o instanceof ShadowRoot))return;const n=s=>new Promise(i=>setTimeout(i,s)),a=o.querySelector(`link[href="${t}"]`);if(a){if(a.sheet)return;await Promise.race([new Promise(s=>{a.addEventListener("load",s,{once:!0}),a.addEventListener("error",s,{once:!0})}),n(2e3)]);return}const r=document.createElement("link");r.rel="stylesheet",r.href=t,Vr(r,t),await Promise.race([new Promise(s=>{r.addEventListener("load",s,{once:!0}),r.addEventListener("error",s,{once:!0}),o.prepend(r)}),n(2e3)])}function H1(e,t){return typeof e=="string"&&/^https?:\/\//.test(e)?e:t==="night"||t==="dusk"?B1:j1}const U1=85.0511,lc=-2,W1=0,q1=-60;function dh(e){return(1-Math.log(Math.tan(Math.PI/4+e*Math.PI/180/2))/Math.PI)/2}function K1(e,t,o,n){if(!e||e<=0||!t||t<=0)return W1;const a=Math.log2(e/512),r=dh(n)-dh(U1),s=Math.log2(t/(512*r)),i=Math.max(a,s);return Math.max(lc,Math.min(i,(o??18)-1))}function V1({containerRef:e,accessToken:t,style:o,config:n=void 0,provider:a=void 0,center:r=[20,10],zoom:s=2,bounds:i=void 0,fitBoundsOptions:l=void 0,minZoom:c=void 0,skipWorldFloor:u=!1,maxZoom:d=18,pitch:f=0,bearing:x=0,renderWorldCopies:S=!0,showEdgeBorders:y=!0,southCutoff:g=q1,maxBounds:b=void 0}){const m=Na(null),$=we(!1);let p=null,_=null,h=null,k=null;try{k=je("profileConfig",null)}catch{}const L=!a&&!nh(k);a=a||oh(k,{token:t});let P=a==="maplibre";typeof document<"u"&&uh(a).catch(()=>{});let G=null;try{G=je("lang",null)}catch{}const W=()=>{const N=G&&typeof G=="object"&&"value"in G?G.value:G;if(typeof N=="string"&&N)return N;const A=k&&typeof k=="object"&&"value"in k?k.value:k;if(A&&(A.locale||A.lang))return String(A.locale||A.lang);try{const w=new URLSearchParams(location.search);return w.get("lang")||w.get("locale")||document.documentElement.lang||"en"}catch{return"en"}};async function K(){var Q;if(L&&!P&&!t&&typeof window<"u"&&window.__doxaMapTokenPending){if(await window.__doxaMapTokenPending,!e.value)return;typeof window.MAP_TOKEN=="string"&&window.MAP_TOKEN||(a="maplibre",P=!0)}const N=A1(o,a),A=N.style||o;if(!e.value){console.error("containerRef.value is null — call initializeMap() inside onMounted()");return}const w=()=>!e.value;if(await uh(a),w())return;const j=ic(a);if(!j){console.error(`[useMapInstance] ${P?"maplibregl":"mapboxgl"} is not available. Add the ${P?"MapLibre":"Mapbox"} GL JS script to your page.`);return}if(N1(j),!P){if(!t&&typeof window<"u"&&window.__doxaMapTokenPending&&(await window.__doxaMapTokenPending,w()))return;if(!t&&typeof window<"u"&&typeof window.MAP_TOKEN=="string"&&window.MAP_TOKEN&&(t=window.MAP_TOKEN),!t){typeof window<"u"&&!window.__doxaNoTokenWarned&&(window.__doxaNoTokenWarned=!0,console.warn('No Mapbox access token provided. Pass "tk" in profile-config JSON or set window.MAP_TOKEN.'));return}if(!t.startsWith("pk.")){console.error('Mapbox token looks invalid (expected "pk." prefix). Got:',t.slice(0,10)+"...");return}}if(await G1(e.value,P?Ja.maplibre.css:z1),w()||(await new Promise(Z=>requestAnimationFrame(Z)),w()))return;const F=e.value,U=F.clientWidth,I=F.clientHeight;if(U===0||I===0){console.error(`[useMapInstance] Container has ZERO dimensions (${U}×${I}). Map will be invisible. Check that parent elements have CSS sizing.`);let Z=F.parentElement,ue=0;for(;Z&&ue<5;)Z=Z.parentElement,ue++}const q=t;P||(j.accessToken=q);const O=()=>typeof window<"u"&&window.innerWidth>=1024,ie=(Z,ue)=>{if(u)return typeof c=="number"?c:lc;if(!O())return lc;const ke=K1(Z,ue,d,g);return typeof c=="number"?Math.max(c,ke):ke},he=ie(F.clientWidth,F.clientHeight),ve=N.lightPreset||(()=>{var Z;try{const ue=typeof n=="function"?n():n;return(Z=ue==null?void 0:ue.basemap)==null?void 0:Z.lightPreset}catch{return}})();if(P){m.value=new j.Map({container:e.value,style:H1(A,ve),locale:lh(W(),"maplibre"),center:r,zoom:s,minZoom:he,maxZoom:d,pitch:f,bearing:x,dragRotate:!1,renderWorldCopies:S,...i?{bounds:i,...l?{fitBoundsOptions:l}:{}}:{},...b?{maxBounds:b}:{},attributionControl:!0,logoPosition:typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?"bottom-right":"bottom-left"}),ch(m.value);try{e.value.__doxaMap=m.value}catch{}}else{const Z=typeof n=="function"?n():n;m.value=new j.Map({accessToken:q,container:e.value,style:A,locale:lh(W(),"mapbox"),...Z?{config:Z}:{},center:r,zoom:s,minZoom:he,maxZoom:d,pitch:f,bearing:x,dragRotate:!1,touchPitch:!1,renderWorldCopies:S,...i?{bounds:i,...l?{fitBoundsOptions:l}:{}}:{},...b?{maxBounds:b}:{},attributionControl:!0,logoPosition:typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767px)").matches?"bottom-right":"bottom-left"}),ch(m.value);try{e.value.__doxaMap=m.value}catch{}}try{let Z=!1;m.value.on("error",ue=>{var D,B;const ke=((D=ue==null?void 0:ue.error)==null?void 0:D.status)??(ue==null?void 0:ue.status),M=String(((B=ue==null?void 0:ue.error)==null?void 0:B.url)||(ue==null?void 0:ue.sourceId)||"");ke!==401&&ke!==403||Z||(Z=!0,console.error(`[doxa-maps] Mapbox returned ${ke} for a TILE request while the style loaded fine. That is a URL RESTRICTION on the access token, not a bad token and not a bug in this map. Add this page's origin (${typeof location<"u"?location.origin:"this origin"}) to the token's URL restrictions in the Mapbox account. The map will keep its data layer and stay blank underneath until then.`+(M?` First failing request: ${M.slice(0,120)}`:"")))})}catch{}try{m.value.touchZoomRotate.disableRotation()}catch{}h=S1(((Q=e.value)==null?void 0:Q.parentElement)||null,{enabled:y});let Ae=he,Se=null;p=()=>{const Z=m.value;if(!Z)return;const ue=ie(F.clientWidth,F.clientHeight);ue!==Ae&&(Ae=ue,Z.setMinZoom(ue)),Z.getZoom(){Se=null;const ke=m.value;if(!ke)return;const M=ie(F.clientWidth,F.clientHeight);if(ke.getZoom(){Se&&(clearTimeout(Se),Se=null)},m.value.on("resize",p),typeof window<"u"&&(window.addEventListener("resize",p),window.addEventListener("orientationchange",p)),m.value.on("style.load",()=>{if(m.value&&ih(m.value,W()),N.paint&&m.value){const Z=L1(m.value,N.paint);console.info("[useMapInstance] style paint applied ("+a+"):",Z.join(", ")||"NONE MATCHED")}requestAnimationFrame(()=>{var Z;(Z=m.value)==null||Z.resize(),m.value&&m.value.setMinZoom(ie(F.clientWidth,F.clientHeight)),$.value=!0})})}function v(){if(m.value){if(p&&(m.value.off("resize",p),typeof window<"u"&&(window.removeEventListener("resize",p),window.removeEventListener("orientationchange",p)),p=null),_){try{_()}catch{}_=null}h&&(h(),h=null);try{const A=typeof window<"u"?window:null;A&&A.__doxaLogoOwner===m.value&&(A.__doxaLogoOwner=null)}catch{}const N=m.value;m.value.remove();try{e&&e.value&&e.value.__doxaMap===N&&(e.value.__doxaMap=null)}catch{}m.value=null,$.value=!1}}if(G&&typeof G=="object"&&"value"in G)try{Ue(G,()=>{m.value&&$.value&&ih(m.value,W())})}catch{}return{map:m,isMapReady:$,initializeMap:K,destroy:v}}const Y1=Ca&&Ca.tagName.toUpperCase()==="SCRIPT"&&Ca.src||new URL("doxa-research-map.js",document.baseURI).href,Vn=e=>String(e||"").trim().replace(/\/+$/,"");function ph(){try{const t=String(Y1||"").split(/[?#]/)[0].match(/^(.*)\/([^/]+)\/([^/]+)\.js$/);return!t||t[2]!==t[3]?null:t[1]||null}catch{return null}}function Z1(e){const t=e==null?void 0:e.embedBaseUrl;if(typeof t=="string"&&t.trim())return Vn(t);if(typeof window<"u"){const o=window.MAP_EMBED_BASE_URL;if(typeof o=="string"&&o.trim())return Vn(o)}return Vn(ph()||"")}function cc(e){const t=e==null?void 0:e.assetsBase;if(typeof t=="string"&&t.trim()){const n=Vn(t);if(/^https?:\/\//i.test(n)||n.startsWith("/"))return n}const o=Vn((e==null?void 0:e.treeBase)||"")||Vn(ph()||"");if(o)try{const n=typeof document<"u"?document.baseURI:void 0;return Vn(new URL(o+"/assets",n).href)}catch{return Vn(o+"/assets")}return"./assets"}function J1({shareUrl:e,embedPath:t,profileConfig:o}={}){const n=o||null,a=typeof window<"u",r=e||(n==null?void 0:n.shareUrl);if(typeof r=="string"&&r.trim())return r.trim();const s=String(t||(n==null?void 0:n.shareEmbedPath)||"").trim();if(s){if(/^https?:\/\//i.test(s))return s;if(s.startsWith("/"))return a?window.location.origin+s:s;const i=Z1(n),l=s.replace(/^\.\//,"");if(i)return i+"/"+l;if(typeof document<"u")try{return new URL(l,document.baseURI).href}catch{}return l}return a?window.location.origin+window.location.pathname:""}const gh="adoptionStatus",Tn={notAdopted:"#f03b2d",hasAdoption:"#22c55e"},uc=Tn,dc={notAdopted:"Needs Adoption",hasAdopted:"Has Adoption"},X1=dc;function hh(e){var n;const t=e.adoptionStatus??((n=e._raw)==null?void 0:n.adopted_by_churches);return t===!0||t===1||typeof t=="number"&&t>0||typeof t=="object"&&(t==null?void 0:t.value)?Tn.hasAdoption:Tn.notAdopted}function pc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","adoptionStatus"]:["get","adoptionStatus"];return["case",["==",t,!0],Tn.hasAdoption,["==",t,1],Tn.hasAdoption,Tn.notAdopted]}const fh=pc,Q1=Object.freeze(Object.defineProperty({__proto__:null,ADOPTION_COLORS:uc,ADOPTION_LABELS:X1,LABELS:dc,PALETTE:Tn,PROPERTY_KEY:gh,applyColor:pc,buildColorExpression:fh,default:{name:"Adoption Progress",propertyKey:gh,palette:Tn,colors:Tn,labels:dc,getColor:hh,applyColor:pc,buildColorExpression:fh},getColor:hh},Symbol.toStringTag,{value:"Module"})),gc="affinityBlock",Xa="#95a5a6",En={A001:"Arab World",A002:"East Asian Peoples",A003:"Eurasian Peoples",A004:"Horn of Africa Peoples",A005:"Jewish",A006:"Malay Peoples",A007:"Persian-Median Peoples",A008:"South Asian Peoples",A009:"North American Peoples",A010:"Pacific Islanders",A011:"Southeast Asian Peoples",A012:"Sub-Saharan Peoples",A013:"Tibetan-Himalayan Peoples",A014:"Turkic Peoples",A015:"Latin-Caribbean Americans",A017:"Deaf",A018:"Tibetan Peoples",A019:"Himalayan Peoples"},hi={A001:"#E74C3C",A002:"#3498DB",A003:"#2ECC71",A004:"#F39C12",A005:"#9B59B6",A006:"#1ABC9C",A007:"#E67E22",A008:"#34495E",A009:"#95A5A6",A010:"#5DADE2",A011:"#16A085",A012:"#C0392B",A013:"#8E44AD",A014:"#D35400",A015:"#27AE60",A017:"#000000",A018:"#6C3483",A019:"#A569BD"},Yn=hi,mh=Object.entries(En).reduce((e,[t,o])=>(e[o]=t,e),{}),hc=Object.entries(En).reduce((e,[t,o])=>(e[o]=Yn[t],e),{}),bh=En;function fc(e){return En[e]||"Unknown"}function mc(e){return Yn[e]||Xa}function $h(e){return e?typeof e=="string"&&/^A\d{3}$/.test(e)?Yn[e]||Xa:hc[e]||Xa:Xa}function _h(){return Object.entries(En).map(([e,t])=>({code:e,name:t,color:Yn[e]}))}function yh(e){return{code:e,name:En[e]||"Unknown",color:Yn[e]||Xa}}function vh(e){var o;const t=e.affinityBlock||((o=e._raw)==null?void 0:o.ROP1);return mc(t)}function wh(e){var o;const t=e.affinityBlock||((o=e._raw)==null?void 0:o.ROP1);return fc(t)}function bc(){const e=["match",["get",gc]];return Object.entries(Yn).forEach(([t,o])=>{e.push(t,o)}),e.push(Xa),e}const kh=bc,ev=Object.freeze(Object.defineProperty({__proto__:null,AFFINITY_BLOCK_COLORS:Yn,AFFINITY_BLOCK_COLORS_BY_NAME:hc,AFFINITY_BLOCK_NAMES:En,AFFINITY_BLOCK_NAME_TO_CODE:mh,NAMES:bh,PALETTE:hi,PROPERTY_KEY:gc,affinityBlockCodeLookup:En,affinityBlockCodeToColor:Yn,affinityBlockCodeToName:En,affinityBlockColors:hc,affinityBlockNameToCode:mh,applyColor:bc,buildColorExpression:kh,default:{name:"Affinity Block",propertyKey:gc,palette:hi,colors:hi,names:bh,getColor:vh,applyColor:bc,buildColorExpression:kh,getName:wh,getAffinityBlockName:fc,getAffinityBlockColor:$h,getAffinityBlockColorByCode:mc,getAffinityBlocksArray:_h,getAffinityBlockData:yh},getAffinityBlockColor:$h,getAffinityBlockColorByCode:mc,getAffinityBlockData:yh,getAffinityBlockName:fc,getAffinityBlocksArray:_h,getColor:vh,getName:wh},Symbol.toStringTag,{value:"Module"}));function tv(e){if(!e)return"hsl(0, 60%, 50%)";let t=0;for(let n=0;n{e.push(t,o)}),e.push(_c),e}const Ah=wc,nv=Object.freeze(Object.defineProperty({__proto__:null,DOXA_REGION_COLORS:ov,PALETTE:fi,PROPERTY_KEY:$c,REGION_COLOR_ALIASES:vc,SLUG_PALETTE:mi,applyColor:wc,buildColorExpression:Ah,default:{name:"DOXA Region",propertyKey:$c,palette:fi,colors:fi,slugColors:mi,aliases:vc,fallback:_c,getColor:Ph,applyColor:wc,buildColorExpression:Ah,getRegionColor:Sh,getRegionColorBySlug:yc},getColor:Ph,getRegionColor:Sh,getRegionColorBySlug:yc},Symbol.toStringTag,{value:"Module"})),Lh="engagementStatus",Mn={notEngaged:"#f03b2d",hasEngagement:"#22c55e"},kc=Mn,xc={notEngaged:"Unengaged",hasEngagement:"Engaged"},av=xc;function Ch(e){var n;const t=e.engagementStatus??((n=e._raw)==null?void 0:n.people_committed);return t===!0||t===1||typeof t=="number"&&t>0||typeof t=="object"&&(t==null?void 0:t.value)?Mn.hasEngagement:Mn.notEngaged}function Sc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","engagementStatus"]:["get","engagementStatus"];return["case",["==",t,!0],Mn.hasEngagement,["==",t,1],Mn.hasEngagement,Mn.notEngaged]}const Th=Sc,rv=Object.freeze(Object.defineProperty({__proto__:null,ENGAGEMENT_COLORS:kc,ENGAGEMENT_LABELS:av,LABELS:xc,PALETTE:Mn,PROPERTY_KEY:Lh,applyColor:Sc,buildColorExpression:Th,default:{name:"Engagement Progress",propertyKey:Lh,palette:Mn,colors:Mn,labels:xc,getColor:Ch,applyColor:Sc,buildColorExpression:Th},getColor:Ch},Symbol.toStringTag,{value:"Module"})),Pc="languageFamily",sv="#000000",Zn={"Indo-European":"#e74c3c",Dravidian:"#ff9800","Afro-Asiatic":"#27ae60","Sino-Tibetan":"#3498db","Niger-Congo":"#9b59b6",Unclassified:"#95a5a6","Nilo-Saharan":"#e91e63","Khoe-Kwadi":"#00bcd4","Austro-Asiatic":"#00bcd4","Kra-Dai":"#8e44ad",Austronesian:"#ff69b4","Hmong-Mien":"#f44336",Turkic:"#ffc107","Nakh-Daghestanian":"#009688",Mongolic:"#795548",Uralic:"#607d8b",Tungusic:"#4caf50",Japonic:"#ff5722",Cariban:"#673ab7",Tupian:"#03a9f4",Tucanoan:"#8bc34a",Maipurean:"#ffc107",Panoan:"#cddc39",Guajiboan:"#9e9e9e",Chibchan:"#ff7043",Quechuan:"#ab47bc",Jean:"#26a69a",Harákmbut:"#7e57c2",Nambikwara:"#42a5f5",Muran:"#66bb6a",Karajá:"#ffa726",Bororoan:"#ef5350",Arauan:"#5c6bc0",Yanomaman:"#26c6da",Yaguan:"#d4e157",Witotoan:"#78909c",Zamucoan:"#8d6e63",Puinavean:"#aed581",Barbacoan:"#4db6ac","Eyak-Athabaskan":"#7986cb","Trans-New Guinea":"#ba68c8",Andamanese:"#4dd0e1","Atlantic-Congo":"#7D3C98",Mande:"#B9770E","Sign Language":"#212121",Creole:"#9575cd","Mixed language":"#a1887f","Language isolate":"#90a4ae",Unknown:"#000000"},Eh=Zn;function Uo(e){return Zn[e]||sv}const iv=(()=>{const e=o=>String(o||"").toLowerCase().trim(),t={};for(const o of Object.keys(Zn))t[e(o)]=o;return t})(),lv={"tai-kadai":"Kra-Dai",none:"Unknown"};function bi(e){if(!e)return"Unknown";const t=String(e).trim(),o=t.toLowerCase();return lv[o]||iv[o]||t}function Mh(e){var t;return Uo(e.languageFamily||((t=e._normalized)==null?void 0:t.languageFamily))}function Ac(){const e=["match",["get",Pc]];return Object.entries(Zn).forEach(([t,o])=>{e.push(t,o)}),e.push("#95a5a6"),e}const Rh=Ac,cv=Object.freeze(Object.defineProperty({__proto__:null,LANGUAGE_FAMILY_COLORS:Eh,PALETTE:Zn,PROPERTY_KEY:Pc,applyColor:Ac,buildColorExpression:Rh,canonicalFamilyName:bi,default:{name:"Language Family",propertyKey:Pc,palette:Zn,colors:Zn,getColor:Mh,applyColor:Ac,buildColorExpression:Rh,getLanguageFamilyColor:Uo,canonicalFamilyName:bi},defaultFamilyColor:"#95a5a6",getColor:Mh,getLanguageFamilyColor:Uo,languageFamilyColors:Zn},Symbol.toStringTag,{value:"Module"})),Fh="peoplePraying",un=144,Jn={noPrayer:"#f03b2d",hasPrayer:"#f0c64a",fullPrayer:"#22c55e"},ba=Jn,Lc={noPrayer:"Needs Prayer",hasPrayer:"Has Prayer",fullPrayer:"Has Full Prayer Coverage"},uv=Lc;function $i(e){var n;const t=(e==null?void 0:e.peoplePraying)??((n=e==null?void 0:e._raw)==null?void 0:n.people_praying)??null,o=Number(t)||0;return o>=un?"fullPrayer":o>0?"hasPrayer":"noPrayer"}function Cc(e){return Jn[$i(e)]}function Nh(e){var o;const t=(e==null?void 0:e.peoplePraying)??((o=e==null?void 0:e._raw)==null?void 0:o.people_praying)??null;return t!==null&&t>0}function Ih(e){return $i(e)==="fullPrayer"}function Oh(e){return Cc(e)}function Tc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","peoplePraying"]:["get","peoplePraying"];return["case",[">=",t,un],Jn.fullPrayer,[">",t,0],Jn.hasPrayer,Jn.noPrayer]}const Dh=Tc,dv=Object.freeze(Object.defineProperty({__proto__:null,FULL_PRAYER_THRESHOLD:un,LABELS:Lc,PALETTE:Jn,PRAYER_COLORS:ba,PRAYER_LABELS:uv,PROPERTY_KEY:Fh,applyColor:Tc,buildColorExpression:Dh,checkHasFullPrayer:Ih,checkHasPrayer:Nh,default:{name:"Prayer Progress",propertyKey:Fh,palette:Jn,colors:Jn,labels:Lc,threshold:un,getColor:Oh,applyColor:Tc,buildColorExpression:Dh,getPrayerLevel:$i,getPrayerColor:Cc,checkHasPrayer:Nh,checkHasFullPrayer:Ih},getColor:Oh,getPrayerColor:Cc,getPrayerLevel:$i},Symbol.toStringTag,{value:"Module"})),zh="religion",Ec="#94a3b8",Wo={C:"Christianity",M:"Islam",H:"Hinduism",B:"Buddhism",E:"Ethnoreligion",J:"Judaism",S:"Sikhism",N:"Unaffiliated",O:"Other",U:"Unknown"},Lo={C:"#3b82f6",M:"#ef4444",H:"#f59e0b",B:"#facc15",E:"#84cc16",J:"#a855f7",S:"#ec4899",N:"#71717a",O:"#ff6b2b",U:"#94a3b8"};function Yr(e){if(!e||typeof e!="string")return"U";const t=e.charAt(0).toUpperCase();return Wo[t]?t:"U"}function jh(e){var o,n,a;const t=(e==null?void 0:e.religion)||((n=(o=e==null?void 0:e._raw)==null?void 0:o.religion)==null?void 0:n.value)||((a=e==null?void 0:e._raw)==null?void 0:a.religion);return Lo[Yr(t)]||Ec}function Mc(){return["match",["slice",["coalesce",["get","religion"],""],0,1],"C",Lo.C,"M",Lo.M,"H",Lo.H,"B",Lo.B,"E",Lo.E,"J",Lo.J,"S",Lo.S,"N",Lo.N,"O",Lo.O,Ec]}const Bh=Mc,pv={name:"Religion",propertyKey:zh,palette:Lo,families:Wo,getColor:jh,applyColor:Mc,buildColorExpression:Bh,fallback:Ec};function Rc(e){const t=String(e||""),o=Wo[t]||t;return o?ao("religion.family."+o)||o:""}const gv=Object.freeze(Object.defineProperty({__proto__:null,PALETTE:Lo,PROPERTY_KEY:zh,RELIGION_FAMILIES:Wo,applyColor:Mc,buildColorExpression:Bh,default:pv,getColor:jh,getReligionFamily:Yr,religionFamilyLabel:Rc},Symbol.toStringTag,{value:"Module"})),Gh="resourceType",Xn={bible:"#3498db",jesusFilm:"#20c997",radio:"#9b59b6",gospel:"#f39c12",audio:"#1abc9c",stories:"#e74c3c",hasResources:"#27ae60",noResources:"#2c3e50"},hv=Xn,Zr=["bible","jesusFilm","radio","gospel","audio","stories"],Fc={bible:"Bible",jesusFilm:"Jesus Film",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories",hasResources:"Has Resources",noResources:"No Resources"},fv=Fc;function Jr(e){return{bible:"Bible",jesusFilm:"Jesus",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories"}[e]}function Hh(e){var t;for(const o of Zr)if((e[o]||((t=e._raw)==null?void 0:t[Jr(o)]))==="Available")return Xn.hasResources;return Xn.noResources}function Uh(e){var t;for(const o of Zr)if((e[o]||((t=e._raw)==null?void 0:t[Jr(o)]))==="Available")return!0;return!1}function Wh(e){var t;for(const o of Zr)if((e[o]||((t=e._raw)==null?void 0:t[Jr(o)]))==="Available")return o;return"noResources"}function Nc(){return["case",["any",["==",["get","bible"],"Available"],["==",["get","jesusFilm"],"Available"],["==",["get","radio"],"Available"],["==",["get","gospel"],"Available"],["==",["get","audio"],"Available"],["==",["get","stories"],"Available"]],Xn.hasResources,Xn.noResources]}const qh=Nc,mv=Object.freeze(Object.defineProperty({__proto__:null,NAMES:Fc,PALETTE:Xn,PROPERTY_KEY:Gh,RESOURCE_COLORS:hv,RESOURCE_NAMES:fv,RESOURCE_PRIORITY:Zr,applyColor:Nc,buildColorExpression:qh,default:{name:"Gospel Resources",propertyKey:Gh,palette:Xn,colors:Xn,names:Fc,priority:Zr,getColor:Hh,applyColor:Nc,buildColorExpression:qh,hasAnyResource:Uh,getResourceType:Wh,getCSVColumn:Jr},getCSVColumn:Jr,getColor:Hh,getResourceType:Wh,hasAnyResource:Uh},Symbol.toStringTag,{value:"Module"})),Kh="region",Ic="#6d766e",Vh={africa:"Africa",asia:"Asia",europe:"Europe","latin_america_&_caribbean":"Latin America & Caribbean",middle_east:"Middle East","north_america_&_non-spanish_caribbean":"North America & Non-Spanish Caribbean",oceania:"Oceania"},Xr={africa:"#ff2e2e",asia:"#1a8cff",europe:"#1ee05f","latin_america_&_caribbean":"#FFEB3B",middle_east:"#a83dff","north_america_&_non-spanish_caribbean":"#00e0bd",oceania:"#ff7f11"},Oc=Object.keys(Xr);function Yh(e){var o,n,a;const t=(e==null?void 0:e.region)||((n=(o=e==null?void 0:e._raw)==null?void 0:o.wagf_region)==null?void 0:n.value)||((a=e==null?void 0:e._raw)==null?void 0:a.wagf_region);return Xr[t]||Ic}function Dc(){const e=["match",["coalesce",["get","region"],""]];for(const t of Oc)e.push(t,Xr[t]);return e.push(Ic),e}const Zh=Dc,bv=Object.assign({"./adoption.js":Q1,"./affinity-block.js":ev,"./doxa-region.js":nv,"./engagement.js":rv,"./language-family.js":cv,"./prayer-progress.js":dv,"./religion.js":gv,"./resource.js":mv,"./wagf-region.js":Object.freeze(Object.defineProperty({__proto__:null,PALETTE:Xr,PROPERTY_KEY:Kh,REGION_ORDER:Oc,WAGF_REGIONS:Vh,applyColor:Dc,buildColorExpression:Zh,default:{name:"WAGF Region",propertyKey:Kh,palette:Xr,regions:Vh,order:Oc,getColor:Yh,applyColor:Dc,buildColorExpression:Zh,fallback:Ic},getColor:Yh},Symbol.toStringTag,{value:"Module"}))}),$v=e=>e.replace(/-([a-z0-9])/g,(t,o)=>o.toUpperCase()),_v=e=>e.replace(/-/g,"_").toUpperCase(),Qa={...{STATUS:"status",CUSTOM:"custom"}},zc={};function yv(e){for(const t of Object.keys(e).sort()){const o=t.split("/").pop().replace(/\.js$/,"");if(o.startsWith("_")||o.startsWith("."))continue;const n=e[t].default;if(!n)continue;const a=$v(o);Qa[_v(o)]=a,zc[a]=n}}yv(bv);function dn(e){return zc[e]||zc[Qa.LANGUAGE_FAMILY]}function vv(e,t={}){return dn(e).applyColor(t)}const wv={Africa:{zoom:1.3,center:[16.6512,26.3538]},Asia:{zoom:.8,center:[98.2654,49.9282]},Europe:{zoom:1.4,center:[22.7826,70.1026]},"Latin America & Caribbean":{zoom:1.8,center:[-60.4619,10.1428]},"Middle East":{zoom:1.7,center:[22.9056,39.5752]},"No WAGF Region/Bloc":{zoom:.6,center:[-8.2363,44.2392]},"North America & Non-Spanish Caribbean":{zoom:2.1,center:[-68.1935,31.4282]},Oceania:{zoom:1.5,center:[161.6257,-.668]}},Jh={circleRadius:{standard:["interpolate",["linear"],["zoom"],0,3,2,3.5,4,4,5,5,6,6.5,7,8,8,10,10,14,12,18,14,22],highlighted:["interpolate",["linear"],["zoom"],0,4,4,5,8,12,12,20],faded:["interpolate",["linear"],["zoom"],0,2,4,2.5,8,5,12,8],compact:["interpolate",["linear"],["zoom"],0,2,4,3,8,6,12,10],large:["interpolate",["linear"],["zoom"],0,4,4,6,8,14,12,24],touchTarget:["interpolate",["linear"],["zoom"],0,12,2,15,4,19,6,20,8,21,10,22,12,24,14,28]}};function kv(e){return wv[e]||null}function jc(e="standard"){return Jh.circleRadius[e]||Jh.circleRadius.standard}const xv={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};function Nt(e){return e==null?"":String(e).replace(/[&<>"'`]/g,t=>xv[t])}function Sv(e,t=""){try{const o=new URL(String(e),typeof location<"u"?location.href:"https://example.invalid/");if(o.protocol==="http:"||o.protocol==="https:")return Nt(o.href)}catch{}return Nt(t)}function Xh(e={}){const{getMap:t=()=>null,mapId:o="unknown",getLanguageFamilyColor:n=()=>"#999999",getNormalizedPeopleGroups:a=()=>[]}=e,r=je("uiStore"),{t:s,locale:i}=Ot(),l=we([]);function c($){const p=n($.languageFamily),_="https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg";let h=$.imageUrl;(!h||h.includes("NoImageAvailable"))&&(h=_);const k=($.name||"U")[0].toUpperCase(),L=["#e74c3c","#3498db","#2ecc71","#f39c12","#9b59b6","#1abc9c","#e67e22","#34495e"],P=k.charCodeAt(0)%L.length,G=L[P];return`
J1({embedPath:r.embedPath,profileConfig:ge(y)||null})),b=te(()=>{const W=S[x.value].height;return''});function m(){i.value=!i.value,i.value&&(u.value="link",d.value=!1,f.value=!1)}function $(){i.value=!1}async function p(W){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(W),!0}catch{}try{const K=document.createElement("textarea");K.value=W,K.setAttribute("readonly",""),K.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.appendChild(K),K.select();const v=document.execCommand("copy");return document.body.removeChild(K),v}catch{return!1}}async function _(){await p(g.value)&&(d.value=!0,setTimeout(()=>{d.value=!1},2e3))}async function h(){await p(b.value)&&(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}const k=je("mapToolbar",null),L=we(null);Bt("mapToolbar",k||{el:L});const P=!k;function G(W){if(s.value=W||null,!P||!W){W||(L.value=null);return}const K=W.offsetParent||W.parentElement;K&&!K.closest(".dsm-map-area, .rm-map-area, .dm-map-area, [data-map-area]")&&K.setAttribute("data-map-area","share-fallback"),L.value=W}return(W,K)=>(ne(),me("div",{ref:G,class:Ke(["share-wrap",{"share-wrap--rounded-square":e.shape==="rounded-square"}]),"data-share-root":""},[dt(Qn,{ref_key:"btnEl",ref:c,"data-control":"share","is-dark":e.isDark,active:i.value,shape:e.shape,title:ge(o)("buttons.share"),onClick:m},{default:go(()=>[...K[2]||(K[2]=[R("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[R("path",{d:"M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),R("polyline",{points:"16 6 12 2 8 6"}),R("line",{x1:"12",y1:"2",x2:"12",y2:"15"})],-1)])]),_:1},8,["is-dark","active","shape","title"]),dt(Ax,{open:i.value,title:ge(o)("buttons.share"),"is-dark":e.isDark,onClose:$},{default:go(()=>[R("div",{ref_key:"popoverEl",ref:l,class:Ke(["share-pop",{light:!e.isDark}])},[R("ul",Lx,[(ne(!0),me(ot,null,io(ge(n)("buttons.shareSteps"),(v,N)=>(ne(),me("li",{key:N},ye(ge(a)(v)),1))),128))]),R("div",Cx,[R("button",{class:Ke(["share-tab",{active:u.value==="link"}]),onClick:K[0]||(K[0]=v=>u.value="link")},ye(t("share.embed_link","Embed link")),3),R("button",{class:Ke(["share-tab",{active:u.value==="embed"}]),onClick:K[1]||(K[1]=v=>u.value="embed")},ye(t("share.add_to_website","Add to Your Website")),3)]),u.value==="link"?(ne(),me("div",Tx,[R("div",Ex,[R("div",Mx,ye(g.value),1)]),R("button",{class:Ke(["share-primary-btn",{copied:d.value}]),onClick:_},[d.value?(ne(),me("svg",Fx,[...K[4]||(K[4]=[R("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(ne(),me("svg",Rx,[...K[3]||(K[3]=[R("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),R("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),Ht(" "+ye(d.value?"Copied!":"Copy Link"),1)],2)])):Re("",!0),u.value==="embed"?(ne(),me("div",Nx,[R("div",Ix,ye(t("share.embed_paste_hint","Paste this code into your website builder (WordPress, Squarespace, Wix, or any site that accepts HTML widgets).")),1),R("div",Ox,[(ne(),me(ot,null,io(S,(v,N)=>R("button",{key:N,class:Ke(["share-size-pill",{active:x.value===N}]),onClick:A=>x.value=N},ye(v.label),11,Dx)),64))]),R("div",zx,ye(b.value),1),R("button",{class:Ke(["share-secondary-btn",{copied:f.value}]),onClick:h},[f.value?(ne(),me("svg",Bx,[...K[6]||(K[6]=[R("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(ne(),me("svg",jx,[...K[5]||(K[5]=[R("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),R("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),Ht(" "+ye(f.value?"Copied!":"Copy Code"),1)],2)])):Re("",!0)],2)]),_:1},8,["open","title","is-dark"])],2))}},Hx={__name:"MapInfoButton",props:{isDark:{type:Boolean,default:!1},standalone:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["standalone"],setup(e,{emit:t}){const{t:o}=Ot(),n=e,a=t,r=je("mapToolbar",null),s=Ao(),i=we(!1),l=we(null),c=()=>l.value&&l.value.$el||null,u=()=>c()||r&&r.el&&r.el.value||s&&s.proxy&&s.proxy.$el&&s.proxy.$el.parentNode||null;function d(b,m){const $={el:m,ack:!1};try{b.dispatchEvent(new CustomEvent("dxmaps:mapinfo-control",{bubbles:!0,composed:!0,detail:$}))}catch{}return $.ack===!0}function f(b){for(let m=b;m;m=m.parentNode||m.host)if(m.nodeType===1&&m.hasAttribute("data-doxa-gallery"))return!0;return!1}let x=!1;function S(){const b=u();if(!b)return;const m=i.value;i.value=d(b,c()),i.value&&!m&&Kt(()=>{const $=c();$&&d($,$)}),!i.value&&n.standalone&&!x&&!f(b)&&(x=!0,a("standalone",!0))}function y(b){if(x&&!(b&&b.detail&&b.detail.local)){x=!1,i.value=!1,a("standalone",!1),Kt(S);return}S()}function g(){const b=c();if(b)try{b.dispatchEvent(new CustomEvent("dxmaps:mapinfo-open",{bubbles:!0,composed:!0,detail:{el:b}}))}catch{}}return Ro(()=>{Kt(S),window.addEventListener("dxmaps:mapinfo-host",y)}),ho(()=>{window.removeEventListener("dxmaps:mapinfo-host",y),x&&a("standalone",!1)}),(b,m)=>i.value?(ne(),ut(Qn,{key:0,ref_key:"btn",ref:l,"data-control":"map-info","is-dark":e.isDark,shape:e.shape,title:ge(o)("mapInfo.open"),"aria-haspopup":"dialog","aria-expanded":"false",onClick:g},{default:go(()=>[...m[0]||(m[0]=[R("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[R("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor","stroke-width":"2"}),R("rect",{x:"11",y:"10",width:"2",height:"7",rx:"1",fill:"currentColor"}),R("circle",{cx:"12",cy:"7",r:"1.3",fill:"currentColor"})],-1)])]),_:1},8,["is-dark","shape","title"])):Re("",!0)}},Ux=["aria-label"],Wx={class:"rm-side-header"},qx={class:"rm-side-title"},Kx=["aria-label"],Vx={class:"rm-side-body"},Yx={class:"rm-section"},Zx={class:"rm-cluster-grid"},Jx=["onClick"],Xx={class:"label"},Qx={class:"desc"},eS={key:0,class:"rm-slider-row"},tS={for:"rm-pin-op"},oS=["value"],nS={class:"val"},aS={class:"rm-section"},rS={class:"rm-side-footer"},sS={__name:"ResearchMapSideMenu",props:{isOpen:{type:Boolean,default:!1}},emits:["close","open-poster","reload-map"],setup(e,{emit:t}){const o=t,n=(l,c)=>ao("controls."+l)||ao("dashboard."+l)||c,a=je("mapStore");je("uiStore");const r=[{id:"off",label:n("off","Off"),desc:n("off_desc","Show every pin individually")},{id:"mapbox",label:n("native","Native"),desc:n("native_desc","Mapbox circle clusters (fastest)")},{id:"mst",label:n("mst","MST"),desc:n("mst_desc","Minimum-spanning-tree affinity webs")},{id:"network",label:n("network","Network"),desc:n("network_desc","Nearest-neighbor connection lines")}],s=te({get:()=>(a==null?void 0:a.clusteringMode)??"off",set:l=>{a&&(a.clusteringMode=l)}}),i=te({get:()=>(a==null?void 0:a.clusterPinOpacity)??.6,set:l=>{a&&(a.clusterPinOpacity=Number(l))}});return Vt(` +`,"share-button");const{t:o,tm:n,rt:a}=Ot(),r=e,s=we(null),i=we(!1),l=we(null),c=we(null),u=we("link"),d=we(!1),f=we(!1),x=we("medium"),S={small:{label:"Small",height:400},medium:{label:"Medium",height:600},large:{label:"Large",height:800}},y=je("profileConfig",null),g=te(()=>J1({embedPath:r.embedPath,profileConfig:ge(y)||null})),b=te(()=>{const W=S[x.value].height;return''});function m(){i.value=!i.value,i.value&&(u.value="link",d.value=!1,f.value=!1)}function $(){i.value=!1}async function p(W){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(W),!0}catch{}try{const K=document.createElement("textarea");K.value=W,K.setAttribute("readonly",""),K.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.appendChild(K),K.select();const v=document.execCommand("copy");return document.body.removeChild(K),v}catch{return!1}}async function _(){await p(g.value)&&(d.value=!0,setTimeout(()=>{d.value=!1},2e3))}async function h(){await p(b.value)&&(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}const k=je("mapToolbar",null),L=we(null);Bt("mapToolbar",k||{el:L});const P=!k;function G(W){if(s.value=W||null,!P||!W){W||(L.value=null);return}const K=W.offsetParent||W.parentElement;K&&!K.closest(".dsm-map-area, .rm-map-area, .dm-map-area, [data-map-area]")&&K.setAttribute("data-map-area","share-fallback"),L.value=W}return(W,K)=>(ne(),me("div",{ref:G,class:Ke(["share-wrap",{"share-wrap--rounded-square":e.shape==="rounded-square"}]),"data-share-root":""},[dt(Qn,{ref_key:"btnEl",ref:c,"data-control":"share","is-dark":e.isDark,active:i.value,shape:e.shape,title:ge(o)("buttons.share"),onClick:m},{default:go(()=>[...K[2]||(K[2]=[R("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[R("path",{d:"M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),R("polyline",{points:"16 6 12 2 8 6"}),R("line",{x1:"12",y1:"2",x2:"12",y2:"15"})],-1)])]),_:1},8,["is-dark","active","shape","title"]),dt(Ax,{open:i.value,title:ge(o)("buttons.share"),"is-dark":e.isDark,onClose:$},{default:go(()=>[R("div",{ref_key:"popoverEl",ref:l,class:Ke(["share-pop",{light:!e.isDark}])},[R("ul",Lx,[(ne(!0),me(ot,null,io(ge(n)("buttons.shareSteps"),(v,N)=>(ne(),me("li",{key:N},ye(ge(a)(v)),1))),128))]),R("div",Cx,[R("button",{class:Ke(["share-tab",{active:u.value==="link"}]),onClick:K[0]||(K[0]=v=>u.value="link")},ye(t("share.embed_link","Embed link")),3),R("button",{class:Ke(["share-tab",{active:u.value==="embed"}]),onClick:K[1]||(K[1]=v=>u.value="embed")},ye(t("share.add_to_website","Add to Your Website")),3)]),u.value==="link"?(ne(),me("div",Tx,[R("div",Ex,[R("div",Mx,ye(g.value),1)]),R("button",{class:Ke(["share-primary-btn",{copied:d.value}]),onClick:_},[d.value?(ne(),me("svg",Fx,[...K[4]||(K[4]=[R("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(ne(),me("svg",Rx,[...K[3]||(K[3]=[R("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),R("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),Ht(" "+ye(d.value?"Copied!":"Copy Link"),1)],2)])):Re("",!0),u.value==="embed"?(ne(),me("div",Nx,[R("div",Ix,ye(t("share.embed_paste_hint","Paste this code into your website builder (WordPress, Squarespace, Wix, or any site that accepts HTML widgets).")),1),R("div",Ox,[(ne(),me(ot,null,io(S,(v,N)=>R("button",{key:N,class:Ke(["share-size-pill",{active:x.value===N}]),onClick:A=>x.value=N},ye(v.label),11,Dx)),64))]),R("div",zx,ye(b.value),1),R("button",{class:Ke(["share-secondary-btn",{copied:f.value}]),onClick:h},[f.value?(ne(),me("svg",Bx,[...K[6]||(K[6]=[R("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(ne(),me("svg",jx,[...K[5]||(K[5]=[R("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),R("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),Ht(" "+ye(f.value?"Copied!":"Copy Code"),1)],2)])):Re("",!0)],2)]),_:1},8,["open","title","is-dark"])],2))}},Hx={__name:"MapInfoButton",props:{isDark:{type:Boolean,default:!1},standalone:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["standalone"],setup(e,{emit:t}){const{t:o}=Ot(),n=e,a=t,r=je("mapToolbar",null),s=Ao(),i=we(!1),l=we(null),c=()=>l.value&&l.value.$el||null,u=()=>c()||r&&r.el&&r.el.value||s&&s.proxy&&s.proxy.$el&&s.proxy.$el.parentNode||null;function d(b,m){const $={el:m,ack:!1};try{b.dispatchEvent(new CustomEvent("dxmaps:mapinfo-control",{bubbles:!0,composed:!0,detail:$}))}catch{}return $.ack===!0}function f(b){for(let m=b;m;m=m.parentNode||m.host)if(m.nodeType===1&&m.hasAttribute("data-doxa-gallery"))return!0;return!1}let x=!1;function S(){const b=u();if(!b)return;const m=i.value;i.value=d(b,c()),i.value&&!m&&Kt(()=>{const $=c();$&&d($,$)}),!i.value&&n.standalone&&!x&&!f(b)&&(x=!0,a("standalone",!0))}function y(b){if(x&&!(b&&b.detail&&b.detail.local)){x=!1,i.value=!1,a("standalone",!1),Kt(S);return}S()}function g(){const b=c();if(b)try{b.dispatchEvent(new CustomEvent("dxmaps:mapinfo-open",{bubbles:!0,composed:!0,detail:{el:b}}))}catch{}}return Ro(()=>{Kt(S),window.addEventListener("dxmaps:mapinfo-host",y)}),ho(()=>{window.removeEventListener("dxmaps:mapinfo-host",y),x&&a("standalone",!1)}),(b,m)=>i.value?(ne(),ut(Qn,{key:0,ref_key:"btn",ref:l,"data-control":"map-info","is-dark":e.isDark,shape:e.shape,title:ge(o)("mapInfo.open"),"aria-haspopup":"dialog","aria-expanded":"false",onClick:g},{default:go(()=>[...m[0]||(m[0]=[R("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[R("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor","stroke-width":"2"}),R("path",{d:"M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),R("circle",{cx:"12",cy:"17",r:"1.3",fill:"currentColor"})],-1)])]),_:1},8,["is-dark","shape","title"])):Re("",!0)}},Ux=["aria-label"],Wx={class:"rm-side-header"},qx={class:"rm-side-title"},Kx=["aria-label"],Vx={class:"rm-side-body"},Yx={class:"rm-section"},Zx={class:"rm-cluster-grid"},Jx=["onClick"],Xx={class:"label"},Qx={class:"desc"},eS={key:0,class:"rm-slider-row"},tS={for:"rm-pin-op"},oS=["value"],nS={class:"val"},aS={class:"rm-section"},rS={class:"rm-side-footer"},sS={__name:"ResearchMapSideMenu",props:{isOpen:{type:Boolean,default:!1}},emits:["close","open-poster","reload-map"],setup(e,{emit:t}){const o=t,n=(l,c)=>ao("controls."+l)||ao("dashboard."+l)||c,a=je("mapStore");je("uiStore");const r=[{id:"off",label:n("off","Off"),desc:n("off_desc","Show every pin individually")},{id:"mapbox",label:n("native","Native"),desc:n("native_desc","Mapbox circle clusters (fastest)")},{id:"mst",label:n("mst","MST"),desc:n("mst_desc","Minimum-spanning-tree affinity webs")},{id:"network",label:n("network","Network"),desc:n("network_desc","Nearest-neighbor connection lines")}],s=te({get:()=>(a==null?void 0:a.clusteringMode)??"off",set:l=>{a&&(a.clusteringMode=l)}}),i=te({get:()=>(a==null?void 0:a.clusterPinOpacity)??.6,set:l=>{a&&(a.clusterPinOpacity=Number(l))}});return Vt(` .rm-side-backdrop { position:absolute;inset:0;background:rgba(0,0,0,0.45);z-index:1500;opacity:0;pointer-events:none;transition:opacity .18s; } .rm-side-backdrop.open { opacity:1;pointer-events:auto; } .rm-side-drawer { position:absolute;top:0;right:0;bottom:0;width:340px;max-width:100vw;background:#171c23;color:#e7ebf0;border-left:1px solid #232a33;z-index:1600;transform:translateX(100%);transition:transform .22s ease;display:flex;flex-direction:column;font:13px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; } @@ -1369,7 +1369,7 @@ .stl-panel, .stl-collapse-btn svg, .stl-row, .stl-reopen, .stl-chip { transition: none !important; animation: none !important; } .stl-spinner { animation: stl-spin 2.4s steps(8, end) infinite !important; } } -`,"semantic-tree-legend"),(Y,le)=>{var Ie,ze,re,pe;return ne(),me(ot,null,[R("div",{class:Ke(["stl-panel",{closed:!j.value,"fit-content":e.hideTabs}]),"data-theme":((Ie=ge(d))==null?void 0:Ie.theme.value)||"dark"},[R("div",jS,[R("div",{class:Ke(["stl-titlebar",{"has-progress":!!x.value}])},[R("span",BS,[ua(Y.$slots,"title-caret",{},void 0,!0)]),Y.$slots["title-caret"]?Re("",!0):(ne(),me("button",{key:0,class:Ke(["stl-collapse-btn",{closed:!j.value}]),title:j.value?ge(a)("aria.collapseLegend"):ge(a)("aria.expandLegend"),"aria-label":j.value?ge(a)("aria.collapseLegend"):ge(a)("aria.expandLegend"),"aria-expanded":String(j.value),onClick:le[0]||(le[0]=se=>{j.value=!j.value,u("update:open",j.value)})},[...le[11]||(le[11]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,GS)),X.value&&Ae.value?(ne(),me(ot,{key:1},[R("span",HS,ye(X.value.tabName),1),R("button",{type:"button",class:"stl-tb-up",title:ge(a)("legend.a11y.goUp",{label:X.value.node.label}),"aria-label":ge(a)("legend.a11y.goUp",{label:X.value.tabName+" "+X.value.node.label}),onClick:Lt(Te,["stop"])},[le[12]||(le[12]=R("svg",{class:"stl-tb-up-icon",width:"9",height:"9",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},[R("path",{d:"M3 7.5L6 4.5L9 7.5",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),X.value.node.color?(ne(),me("span",{key:0,class:"stl-tb-dot",style:Tt({background:X.value.node.color})},null,4)):Re("",!0),R("span",{class:"stl-tb-text",title:X.value.node.label},ye(X.value.node.label),9,WS)],8,US)],64)):(ne(),me("span",qS,ye(S.value),1)),e.exportEnabled&&Ae.value?(ne(),me("div",KS,[R("button",{type:"button",class:Ke(["stl-export-btn",{open:U.value}]),"aria-expanded":U.value?"true":"false","aria-haspopup":"menu",title:ge(a)("legend.exportSelection"),"aria-label":ge(a)("legend.exportSelection"),onClick:Lt(Gt,["stop"])},[le[13]||(le[13]=R("svg",{width:"11",height:"11",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},[R("path",{d:"M7 1.5V9M7 1.5L4.2 4.3M7 1.5L9.8 4.3",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),R("path",{d:"M2 9.5V11.5C2 12.05 2.45 12.5 3 12.5H11C11.55 12.5 12 12.05 12 11.5V9.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)),R("span",YS,ye(ge(a)("legend.exportButton")),1)],10,VS),U.value?(ne(),me(ot,{key:0},[R("div",{ref_key:"scrimRef",ref:q,style:Tt(ge(O)),class:"stl-export-backdrop",onClick:le[1]||(le[1]=Lt(se=>U.value=!1,["stop"]))},null,4),R("div",ZS,[R("button",{type:"button",class:"stl-export-item",role:"menuitem",onClick:le[2]||(le[2]=Lt(se=>Jt("poster"),["stop"]))},[le[14]||(le[14]=R("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},[R("rect",{x:"2",y:"1.5",width:"8",height:"9",rx:"1",stroke:"currentColor","stroke-width":"1.3"}),R("path",{d:"M4 4.5H8M4 6.5H8M4 8.5H6.5",stroke:"currentColor","stroke-width":"1.1","stroke-linecap":"round"})],-1)),R("span",JS,ye(ge(a)("legend.export.poster")),1)]),e.exportCards?(ne(),me("button",{key:0,type:"button",class:"stl-export-item",role:"menuitem",onClick:le[3]||(le[3]=Lt(se=>Jt("cards"),["stop"]))},[le[15]||(le[15]=R("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},[R("rect",{x:"1.5",y:"2.5",width:"6",height:"8",rx:"1",stroke:"currentColor","stroke-width":"1.2"}),R("rect",{x:"4.5",y:"1.5",width:"6",height:"8",rx:"1",stroke:"currentColor","stroke-width":"1.2"})],-1)),R("span",XS,ye(ge(a)("buttons.cardDeck")),1)])):Re("",!0),R("button",{type:"button",class:"stl-export-item",role:"menuitem","aria-expanded":String(I.value),onClick:le[4]||(le[4]=Lt(se=>I.value=!I.value,["stop"]))},[le[16]||(le[16]=R("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},[R("path",{d:"M3 1.5H7.5L9.5 3.5V10.5H3V1.5Z",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"}),R("path",{d:"M7.5 1.5V3.5H9.5",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"}),R("path",{d:"M4.5 6H8M4.5 8H7",stroke:"currentColor","stroke-width":"1.1","stroke-linecap":"round"})],-1)),R("span",eP,ye(ge(a)("legend.export.packet")),1),R("span",{class:Ke(["stl-export-caret",{"is-open":I.value}]),"aria-hidden":"true"},"▾",2)],8,QS),I.value?(ne(),me("div",{key:1,class:"stl-export-sub",role:"group","aria-label":ge(a)("legend.export.packetAria")},[R("p",oP,ye(ge(a)("legend.export.packetExplain")),1),R("button",{type:"button",class:"stl-export-item stl-export-subitem",role:"menuitem",onClick:le[5]||(le[5]=Lt(se=>Jt("packet:full"),["stop"]))},[R("span",nP,ye(ge(a)("legend.export.packetFull")),1)]),R("button",{type:"button",class:"stl-export-item stl-export-subitem",role:"menuitem",onClick:le[6]||(le[6]=Lt(se=>Jt("packet:lightweight"),["stop"]))},[R("span",aP,ye(ge(a)("legend.export.packetLightweight")),1)])],8,tP)):Re("",!0)])],64)):Re("",!0)])):Re("",!0),x.value?(ne(),ut(hf,{key:4,class:"stl-progress","show-text":!1,covered:x.value.covered,total:x.value.total,segments:x.value.segments,"is-dark":y.value,"fmt-count":ur,onSelectSegment:_},null,8,["covered","total","segments","is-dark"])):Re("",!0)],2),e.hideTabs?Re("",!0):(ne(),me("div",rP,[R("div",sP,[(ne(!0),me(ot,null,io(v.value,(se,Ee)=>(ne(),me("div",{key:se.id,class:Ke(["stl-tab-chip",{active:ve.value===Ee}])},[R("button",{class:"stl-tab",onClick:Pe=>We(Ee)},ye(i(se)),9,iP),se.info?(ne(),me("button",{key:0,class:"stl-tab-info",title:l(se),onClick:Pe=>yt(Ee,Pe)},"i",8,lP)):Re("",!0)],2))),128))]),F.value!==null&&((ze=v.value[F.value])!=null&&ze.info)?(ne(),me("div",cP,ye(l(v.value[F.value])),1)):Re("",!0)])),R("div",uP,[le[17]||(le[17]=R("span",{class:"stl-caret-sp"},null,-1)),le[18]||(le[18]=R("span",{class:"stl-dot-sp"},null,-1)),R("span",dP,ye(e.columnLabel||(e.hideTabs?e.title:i(v.value[ve.value])||ge(a)("legend.columns.name"))),1),de.value?(ne(),me("button",{key:0,class:Ke(["stl-hdr-num",{active:ie.value==="count"}]),title:ge(a)("legend.sortByUpgs"),onClick:le[7]||(le[7]=se=>M("count"))},[Ht(ye(ge(a)("legend.columns.upgs"))+" ",1),ie.value==="count"?(ne(),me("span",gP,ye(he.value==="desc"?"▼":"▲"),1)):Re("",!0)],10,pP)):Re("",!0),_e.value?(ne(),me("button",{key:1,class:Ke(["stl-hdr-num",{active:ie.value==="pop"}]),title:ge(a)("legend.sortByPop"),onClick:le[8]||(le[8]=se=>M("pop"))},[Ht(ye(ge(a)("legend.columns.population"))+" ",1),ie.value==="pop"?(ne(),me("span",fP,ye(he.value==="desc"?"▼":"▲"),1)):Re("",!0)],10,hP)):Re("",!0),le[19]||(le[19]=R("span",{class:"stl-x-slot"},null,-1))]),R("div",{class:Ke(["stl-rows",{"has-sel":J.value}]),ref_key:"rowsContainer",ref:Q},[(ne(!0),me(ot,null,io(C.value,se=>{var Ee,Pe;return ne(),me("div",{key:se.node.id,class:Ke(["stl-row",Fn(se)]),"data-stl-node-id":se.node.id,style:Tt({"--trunk-color":((Ee=se.parent)==null?void 0:Ee.color)||"#6e7681","--row-color":se.node.color||"#73A17F"}),onClick:qe=>oe(se.node)},[(ne(!0),me(ot,null,io(se.trunks,(qe,Ce)=>(ne(),me("span",{key:`tr${Ce}`,class:Ke(["stl-trunk",`stl-trunk-${qe}`])},null,2))),128)),(Pe=se.node.children)!=null&&Pe.length?(ne(),me("button",{key:0,class:Ke(["stl-caret",{open:A.value.has(se.node.id)}]),"aria-expanded":A.value.has(se.node.id)?"true":"false","aria-label":ge(a)(A.value.has(se.node.id)?"legend.a11y.collapseRow":"legend.a11y.expandRow",{label:se.node.label}),onClick:Lt(qe=>xe(se.node.id,qe),["stop"])},[...le[20]||(le[20]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,bP)):(ne(),me("span",$P)),se.node.color?(ne(),me("span",{key:2,class:"stl-dot",style:Tt({background:se.node.color})},null,4)):(ne(),me("span",_P)),R("span",yP,ye(se.node.label),1),de.value?(ne(),me("span",vP,ye(ur(se.node.count)),1)):Re("",!0),_e.value?(ne(),me("span",wP,ye(Ko(se.node.pop)),1)):Re("",!0),R("span",kP,[Se.value===se.node.id?(ne(),me("button",{key:0,class:"stl-x-chip",title:ge(a)("legend.a11y.clearSelection"),"aria-label":ge(a)("legend.a11y.clearSelection"),onClick:le[9]||(le[9]=Lt(qe=>nt(qe),["stop"]))},[...le[21]||(le[21]=[R("svg",{width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M2 2L10 10M10 2L2 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,xP)):Re("",!0)])],14,mP)}),128)),B.value&&!C.value.length?(ne(),me("div",SP,[le[22]||(le[22]=R("span",{class:"stl-spinner"},null,-1)),R("span",null,ye(o("legend.loadingRows","Loading {label}…").replace("{label}",((re=v.value[ve.value])==null?void 0:re.label)||"rows")),1)])):!C.value.length&&e.nodes.length===0?(ne(),me("div",PP,ye(o("legend.loadingData","Loading data…")),1)):C.value.length?Re("",!0):(ne(),me("div",AP,ye(ge(a)("legend.noDataAtThisLevel")),1)),be.value>0?(ne(),me("div",LP,[Ht(ye(o("legend.showingTop","Showing top {n} of {m}").replace("{n}",v.value[ve.value].topLimit.toLocaleString()).replace("{m}",H.value.length.toLocaleString()))+" — ",1),R("span",CP,ye(o("legend.useGeocoderHint","use the geocoder above to find the rest")),1)])):Re("",!0)],2),$.value?(ne(),ut(Li,{key:1,dark:y.value},null,8,["dark"])):Re("",!0)])],10,zS),j.value?Re("",!0):(ne(),me("button",{key:0,class:"stl-reopen","data-theme":((pe=ge(d))==null?void 0:pe.theme.value)||"dark",title:ge(a)("aria.expandLegend"),"aria-label":ge(a)("aria.expandLegend"),onClick:le[10]||(le[10]=se=>{j.value=!0,u("update:open",!0)})},[le[23]||(le[23]=R("svg",{class:"stl-reopen-icon",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M2 4h8M2 6h8M2 8h5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),R("span",EP,[Ae.value?(ne(),me(ot,{key:0},[Ae.value.color?(ne(),me("span",{key:0,class:"stl-reopen-dot",style:Tt({background:Ae.value.color})},null,4)):Re("",!0),Ht(" "+ye(Ae.value.label),1)],64)):(ne(),me(ot,{key:1},[Ht(ye(S.value),1)],64))]),le[24]||(le[24]=R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none",class:"stl-reopen-caret"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],8,TP))],64)}}},[["styles",[DS]],["__scopeId","data-v-49026e50"]]),MP="#6b7280";function RP(){const e=dn(Qa.AFFINITY_BLOCK);return e&&e.propertyKey==="affinityBlock"&&e.palette?e.palette:{}}function FP(e,t){const o=RP();return e&&o[e]?o[e]:MP}function NP(e){return(e==null?void 0:e.properties)||e||{}}function su(e){return e&&typeof e=="object"&&"label"in e?e.label||e.value||"":e}function IP(e){var t;return String(e.affinityBlock||su((t=e._raw)==null?void 0:t.rop1)||"").trim()}function OP(e){var t;return String(e.affinityBlockLabel||((t=e._raw)!=null&&t.rop1&&typeof e._raw.rop1=="object"?e._raw.rop1.label:"")||"").trim()}function DP(e){var t;return String(e.cluster||su((t=e._raw)==null?void 0:t.imb_reg_of_people_2)||"").trim()}function zP(e){var t;return String(e.clusterLabel||((t=e._raw)!=null&&t.imb_reg_of_people_2&&typeof e._raw.imb_reg_of_people_2=="object"?e._raw.imb_reg_of_people_2.label:"")||"").trim()}function jP(e){var t;return String(e.peopleGroup||su((t=e._raw)==null?void 0:t.imb_reg_of_people_25)||"").trim()}function BP(e){var t;return String(e.peopleGroupLabel||((t=e._raw)!=null&&t.imb_reg_of_people_25&&typeof e._raw.imb_reg_of_people_25=="object"?e._raw.imb_reg_of_people_25.label:"")||e.name||"").trim()}function GP(e){var t;return String(e.uniqueId||e.slug||((t=e._raw)==null?void 0:t.slug)||"").trim()}function HP(e){var t;return String(e.name||e.displayName||((t=e._raw)==null?void 0:t.name)||"").trim()}function UP(e){var o;const t=Number(e.population??e.populationNum??((o=e._raw)==null?void 0:o.population)??0);return Number.isFinite(t)?t:0}function WP(e){return String(e.countryName||e.country||e.countryIsoLabel||e.countryIso||"").trim()}function Lf(e){const t=te(()=>{const r=e&&e.value||[],s=new Map;for(const i of r){const l=NP(i),c=IP(l),u=OP(l)||c||"— Unknown —",d=DP(l),f=zP(l)||d||"— Unknown —",x=jP(l),S=BP(l)||x||"— Unknown —",y=GP(l),g=HP(l)||y,b=UP(l),m=WP(l);if(!y)continue;let $=s.get(c||"__unknown__");$||($={code:c,label:u,count:0,pop:0,memberIds:[],clusters:new Map},s.set(c||"__unknown__",$)),$.count+=1,$.pop+=b,$.memberIds.push(y);let p=$.clusters.get(d||"__unknown__");p||(p={code:d,label:f,count:0,pop:0,memberIds:[],peopleGroups:new Map},$.clusters.set(d||"__unknown__",p)),p.count+=1,p.pop+=b,p.memberIds.push(y);let _=p.peopleGroups.get(x||"__unknown__");_||(_={code:x,label:S,count:0,pop:0,memberIds:[],instances:[]},p.peopleGroups.set(x||"__unknown__",_)),_.count+=1,_.pop+=b,_.memberIds.push(y),_.instances.push({id:y,name:g,country:m,pop:b})}return s}),o=r=>r&&r.length?["in",["get","uniqueId"],["literal",r]]:["==",["get","uniqueId"],"__none__"],n=te(()=>{const r=t.value,s=[];for(const i of r.values()){const l=FP(i.code,i.label),c={id:`bloc:${i.code||i.label}`,label:i.label,color:l,count:i.count,pop:i.pop,filter:o(i.memberIds),children:[]};for(const u of i.clusters.values()){const d={id:`cluster:${i.code}__${u.code||u.label}`,label:`${u.label} (Cluster)`,color:l,count:u.count,pop:u.pop,filter:o(u.memberIds),children:[]};for(const f of u.peopleGroups.values()){const x={id:`pg:${i.code}__${u.code}__${f.code||f.label}`,label:`${f.label} (PG)`,color:l,count:f.count,pop:f.pop,filter:o(f.memberIds),children:[]};f.instances.sort((S,y)=>y.pop-S.pop||S.country.localeCompare(y.country));for(const S of f.instances)x.children.push({id:`pgic:${S.id}`,label:`${S.country?`${S.name}, ${S.country}`:S.name} (PGIC)`,color:l,count:1,pop:S.pop,filter:["==",["get","uniqueId"],S.id],children:[]});d.children.push(x)}d.children.sort((f,x)=>x.count-f.count||x.pop-f.pop),c.children.push(d)}c.children.sort((u,d)=>d.count-u.count||d.pop-u.pop),s.push(c)}return s.sort((i,l)=>l.count-i.count||l.pop-i.pop),s});function a(r){if(typeof window>"u"||typeof window.CustomEvent!="function")return;if(!r){window.dispatchEvent(new CustomEvent("legend:highlight",{detail:{kind:null}}));return}const s=String(r.id||""),i={kind:null,label:r.label,filterExpr:r.filter};s.startsWith("bloc:")?i.kind="bloc":s.startsWith("cluster:")?i.kind="cluster":s.startsWith("pg:")?i.kind="people-group":s.startsWith("pgic:")&&(i.kind="people-group-in-country"),window.dispatchEvent(new CustomEvent("legend:highlight",{detail:i}))}return{aggregated:t,affinityTree:n,highlight:a}}const qP={africa:"#ff2e2e",asia:"#1a8cff",europe:"#1ee05f","latin_america_&_caribbean":"#FFEB3B",middle_east:"#a83dff","north_america_&_non-spanish_caribbean":"#00e0bd",oceania:"#ff7f11"},KP="#95a5a6";function VP(e){return qP[String(e||"").toLowerCase()]||KP}function YP(e){return(e==null?void 0:e.properties)||e||{}}function ZP(e){var o;const t=Number(e.population??e.populationNum??((o=e._raw)==null?void 0:o.population)??0);return Number.isFinite(t)?t:0}function JP(e){var t,o;return String(e.doxaRegion||e.wagfRegion||((o=(t=e._raw)==null?void 0:t.wagf_region)==null?void 0:o.value)||"").trim()}function XP(e){var o;const t=(o=e._raw)==null?void 0:o.wagf_region;return String(e.wagfRegionLabel||e.doxaRegionLabel||(t&&typeof t=="object"?t.label:"")||e.doxaRegion||"").trim()}function QP(e){var t,o;return String(e.wagfBlock||((o=(t=e._raw)==null?void 0:t.wagf_block)==null?void 0:o.value)||"").trim()}function eA(e){var o;const t=(o=e._raw)==null?void 0:o.wagf_block;return String(e.wagfBlockLabel||(t&&typeof t=="object"?t.label:"")||e.wagfBlock||"").trim()}function tA(e){var t,o;return String(e.countryIso||((o=(t=e._raw)==null?void 0:t.country_code)==null?void 0:o.value)||"").trim().toUpperCase()}function oA(e){var o;const t=(o=e._raw)==null?void 0:o.country_code;return String(e.countryIsoLabel||(t&&typeof t=="object"?t.label:"")||e.countryIso||"").trim()}function Cf(e){const t=te(()=>{const a=e&&e.value||[],r=new Map;for(const s of a){const i=YP(s),l=JP(i),c=XP(i)||l||"— Unknown —",u=QP(i),d=eA(i)||u||"— Unknown —",f=tA(i),x=oA(i)||f||"— Unknown —",S=ZP(i);if(!l||l==="na"||l==="none")continue;let y=r.get(l);if(y||(y={slug:l,label:c,count:0,pop:0,blocks:new Map},r.set(l,y)),y.count+=1,y.pop+=S,!u||u==="na")continue;let g=y.blocks.get(u);if(g||(g={slug:u,label:d,count:0,pop:0,countries:new Map},y.blocks.set(u,g)),g.count+=1,g.pop+=S,!f)continue;let b=g.countries.get(f);b||(b={iso:f,name:x,count:0,pop:0},g.countries.set(f,b)),b.count+=1,b.pop+=S}return r}),o=te(()=>{const a=t.value,r=[];for(const s of a.values()){const i=VP(s.slug),l=[],c=[],u=[...s.blocks.values()].sort((d,f)=>f.pop-d.pop||d.label.localeCompare(f.label));for(const d of u){const f=[],x=[],S=[...d.countries.values()].sort((y,g)=>g.pop-y.pop||y.name.localeCompare(g.name));for(const y of S)f.push(y.iso),l.push(y.iso),x.push({id:`country:${s.slug}__${d.slug}__${y.iso}`,label:y.name,color:i,count:y.count,pop:y.pop,filter:["==",["get","countryIso"],y.iso],isoCodes:[y.iso],children:[]});c.push({id:`block:${s.slug}__${d.slug}`,label:`${d.label} (Bloc)`,color:i,count:d.count,pop:d.pop,filter:["==",["get","wagfBlock"],d.slug],isoCodes:f,children:x})}r.push({id:`region:${s.slug}`,label:`${s.label} (Region)`,color:i,count:s.count,pop:s.pop,filter:["==",["get","doxaRegion"],s.slug],isoCodes:[...new Set(l)],children:c})}return r.sort((s,i)=>i.pop-s.pop||s.label.localeCompare(i.label)),r});function n(a){if(typeof window>"u"||typeof window.CustomEvent!="function")return;if(!a){window.dispatchEvent(new CustomEvent("legend:highlight",{detail:{kind:null}}));return}const r=String(a.id||""),s={kind:null,label:a.label,filterExpr:a.filter};r.startsWith("region:")?s.kind="region":r.startsWith("block:")?s.kind="block":r.startsWith("country:")&&(s.kind="country"),window.dispatchEvent(new CustomEvent("legend:highlight",{detail:s}))}return{aggregated:t,regionsTree:o,highlight:n}}function _a(e,t){var o;for(const n of e){if(t(n))return n;if((o=n.children)!=null&&o.length){const a=_a(n.children,t);if(a)return a}}return null}function nA(e,t){if(!e||!t)return null;const o=e.id;if(t==="prayer"){const n=["to-number",["get","peoplePraying"]];if(o==="noPrayer")return["==",n,0];if(o==="fullPrayer")return[">=",n,un];if(o==="hasPrayer")return["all",[">",n,0],["<",n,un]]}else if(t==="engagement"){if(o==="hasEngagement")return["==",["get","engagementStatus"],!0];if(o==="notEngaged")return["==",["get","engagementStatus"],!1]}else if(t==="adoption"){if(o==="hasAdoption")return["==",["get","adoptionStatus"],!0];if(o==="notAdopted")return["==",["get","adoptionStatus"],!1]}else if(t==="religion")return["==",["slice",["coalesce",["get","religion"],""],0,1],o];return null}function ea(e){return["case",["has","iso_3166_1_alpha_3"],e,e]}function aA({map:e,activeTab:t,countryOutline:o,regionIdle:n,mapFly:a,pplrInstance:r,mapId:s}){function i(){var f;o.clearCountry();const d=e.value;!d||!d.getLayer("regions-fill")||(d.setPaintProperty("regions-fill","fill-opacity",n(.2)),d.setPaintProperty("regions-fill","fill-outline-color",null),d.setPaintProperty("regions-border","line-color",n("rgba(60,60,80,0.35)")),d.setPaintProperty("regions-border","line-width",n(.6)),((f=t.value)==null?void 0:f.id)!=="doxa-regions"&&(d.setLayoutProperty("regions-fill","visibility","none"),d.setLayoutProperty("regions-border","visibility","none")))}function l(d){const f=[];for(const x of d){f.push({id:x.key,label:x.label,color:x.color,count:x.count??0,pop:x.population??0,filter:x.filterKey?["==",["get","_flat_filter"],x.filterKey]:null,children:[]});for(const S of x.children||[])f.push({id:S.key,label:S.label,color:S.color,count:S.count??0,pop:S.population??0,filter:S.filterKey?["==",["get","_flat_filter"],S.filterKey]:null,children:[]})}return f}function c(d){var x,S;const f=d==null?void 0:d.detail;!f||f.mapId!==s||(f.center&&Array.isArray(f.center)?(x=a.flyToCoords)==null||x.call(a,{longitude:f.center[0],latitude:f.center[1]},f.zoom??4):f.bounds&&((S=a.fitBounds)==null||S.call(a,f.bounds,60)))}function u(d,f){var S,y;if(!f){const g=r.selection.value;g&&((S=g.id)!=null&&S.startsWith(d+":"))&&(r.selection.value=null);return}const x=r.selection.value;x&&((y=x.id)!=null&&y.startsWith(d+":"))&&x.label===f.label||(r.selection.value=f)}return{clearCountryHighlight:i,flatItemsToStlNodes:l,onLegendRowClick:c,bridgeSelection:u}}function Tf(e){var o;let t=e&&e.parentNode;for(;t;){if(t.nodeType===1){const n=getComputedStyle(t);if(/auto|scroll/.test(n.overflowY)&&t.scrollHeight>t.clientHeight+4)return t}if(t=t.parentElement||((o=t.parentNode)==null?void 0:o.host)||(t.parentNode!==t?t.parentNode:null),t&&t.nodeType===9)break}return null}const rA=["onClick"],sA={key:0,class:"rm-tab-sep","aria-hidden":"true"},iA={class:"rm-map-area"},lA={key:0,class:"rm-loading"},cA={key:1,class:"rm-error"},uA=["data-provider"],dA={class:"rm-legend-mobile-slot"},pA=!0,gA=22,Ef=70,Mf=5.5,hA=6,Rf=.01,fA=110,mA=1.45,bA=900,Ff=60,$A=900,_A=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"research-map",setup(e){var Cm,Tm,Em,Mm,Rm,Fm,Nm,Im,Om;function t(T,z){if(T!=null&&T.getLayer("language-family-pins-hitbox"))try{T.setFilter("language-family-pins-hitbox",z)}catch{}}function o(T){if(!(!T||!T.scrollZoom))try{const ee=document.documentElement.scrollHeight>window.innerHeight+4,fe=T.getContainer&&T.getContainer()||null,Le=fe?!!Tf(fe):!1;T.scrollZoom.enable()}catch{}}const n=(T,z)=>ao(T)||z,a=di(()=>Ft(()=>Promise.resolve().then(()=>Of),void 0)),r=di(()=>Ft(()=>Promise.resolve().then(()=>xk),void 0));Vt(` +`,"semantic-tree-legend"),(Y,le)=>{var Ie,ze,re,pe;return ne(),me(ot,null,[R("div",{class:Ke(["stl-panel",{closed:!j.value,"fit-content":e.hideTabs}]),"data-theme":((Ie=ge(d))==null?void 0:Ie.theme.value)||"dark"},[R("div",jS,[R("div",{class:Ke(["stl-titlebar",{"has-progress":!!x.value}])},[R("span",BS,[ua(Y.$slots,"title-caret",{},void 0,!0)]),Y.$slots["title-caret"]?Re("",!0):(ne(),me("button",{key:0,class:Ke(["stl-collapse-btn",{closed:!j.value}]),title:j.value?ge(a)("aria.collapseLegend"):ge(a)("aria.expandLegend"),"aria-label":j.value?ge(a)("aria.collapseLegend"):ge(a)("aria.expandLegend"),"aria-expanded":String(j.value),onClick:le[0]||(le[0]=se=>{j.value=!j.value,u("update:open",j.value)})},[...le[11]||(le[11]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,GS)),X.value&&Ae.value?(ne(),me(ot,{key:1},[R("span",HS,ye(X.value.tabName),1),R("button",{type:"button",class:"stl-tb-up",title:ge(a)("legend.a11y.goUp",{label:X.value.node.label}),"aria-label":ge(a)("legend.a11y.goUp",{label:X.value.tabName+" "+X.value.node.label}),onClick:Lt(Te,["stop"])},[le[12]||(le[12]=R("svg",{class:"stl-tb-up-icon",width:"9",height:"9",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},[R("path",{d:"M3 7.5L6 4.5L9 7.5",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),X.value.node.color?(ne(),me("span",{key:0,class:"stl-tb-dot",style:Tt({background:X.value.node.color})},null,4)):Re("",!0),R("span",{class:"stl-tb-text",title:X.value.node.label},ye(X.value.node.label),9,WS)],8,US)],64)):(ne(),me("span",qS,ye(S.value),1)),e.exportEnabled&&Ae.value?(ne(),me("div",KS,[R("button",{type:"button",class:Ke(["stl-export-btn",{open:U.value}]),"aria-expanded":U.value?"true":"false","aria-haspopup":"menu",title:ge(a)("legend.exportSelection"),"aria-label":ge(a)("legend.exportSelection"),onClick:Lt(Gt,["stop"])},[le[13]||(le[13]=R("svg",{width:"11",height:"11",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},[R("path",{d:"M7 1.5V9M7 1.5L4.2 4.3M7 1.5L9.8 4.3",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),R("path",{d:"M2 9.5V11.5C2 12.05 2.45 12.5 3 12.5H11C11.55 12.5 12 12.05 12 11.5V9.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)),R("span",YS,ye(ge(a)("legend.exportButton")),1)],10,VS),U.value?(ne(),me(ot,{key:0},[R("div",{ref_key:"scrimRef",ref:q,style:Tt(ge(O)),class:"stl-export-backdrop",onClick:le[1]||(le[1]=Lt(se=>U.value=!1,["stop"]))},null,4),R("div",ZS,[R("button",{type:"button",class:"stl-export-item",role:"menuitem",onClick:le[2]||(le[2]=Lt(se=>Jt("poster"),["stop"]))},[le[14]||(le[14]=R("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},[R("rect",{x:"2",y:"1.5",width:"8",height:"9",rx:"1",stroke:"currentColor","stroke-width":"1.3"}),R("path",{d:"M4 4.5H8M4 6.5H8M4 8.5H6.5",stroke:"currentColor","stroke-width":"1.1","stroke-linecap":"round"})],-1)),R("span",JS,ye(ge(a)("legend.export.poster")),1)]),e.exportCards?(ne(),me("button",{key:0,type:"button",class:"stl-export-item",role:"menuitem",onClick:le[3]||(le[3]=Lt(se=>Jt("cards"),["stop"]))},[le[15]||(le[15]=R("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},[R("rect",{x:"1.5",y:"2.5",width:"6",height:"8",rx:"1",stroke:"currentColor","stroke-width":"1.2"}),R("rect",{x:"4.5",y:"1.5",width:"6",height:"8",rx:"1",stroke:"currentColor","stroke-width":"1.2"})],-1)),R("span",XS,ye(ge(a)("buttons.cardDeck")),1)])):Re("",!0),R("button",{type:"button",class:"stl-export-item",role:"menuitem","aria-expanded":String(I.value),onClick:le[4]||(le[4]=Lt(se=>I.value=!I.value,["stop"]))},[le[16]||(le[16]=R("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},[R("path",{d:"M3 1.5H7.5L9.5 3.5V10.5H3V1.5Z",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"}),R("path",{d:"M7.5 1.5V3.5H9.5",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"}),R("path",{d:"M4.5 6H8M4.5 8H7",stroke:"currentColor","stroke-width":"1.1","stroke-linecap":"round"})],-1)),R("span",eP,ye(ge(a)("legend.export.packet")),1),R("span",{class:Ke(["stl-export-caret",{"is-open":I.value}]),"aria-hidden":"true"},"▾",2)],8,QS),I.value?(ne(),me("div",{key:1,class:"stl-export-sub",role:"group","aria-label":ge(a)("legend.export.packetAria")},[R("p",oP,ye(ge(a)("legend.export.packetExplain")),1),R("button",{type:"button",class:"stl-export-item stl-export-subitem",role:"menuitem",onClick:le[5]||(le[5]=Lt(se=>Jt("packet:full"),["stop"]))},[R("span",nP,ye(ge(a)("legend.export.packetFull")),1)]),R("button",{type:"button",class:"stl-export-item stl-export-subitem",role:"menuitem",onClick:le[6]||(le[6]=Lt(se=>Jt("packet:lightweight"),["stop"]))},[R("span",aP,ye(ge(a)("legend.export.packetLightweight")),1)])],8,tP)):Re("",!0)])],64)):Re("",!0)])):Re("",!0),x.value?(ne(),ut(hf,{key:4,class:"stl-progress","show-text":!1,covered:x.value.covered,total:x.value.total,segments:x.value.segments,"is-dark":y.value,"fmt-count":ur,onSelectSegment:_},null,8,["covered","total","segments","is-dark"])):Re("",!0)],2),e.hideTabs?Re("",!0):(ne(),me("div",rP,[R("div",sP,[(ne(!0),me(ot,null,io(v.value,(se,Ee)=>(ne(),me("div",{key:se.id,class:Ke(["stl-tab-chip",{active:ve.value===Ee}])},[R("button",{class:"stl-tab",onClick:Pe=>We(Ee)},ye(i(se)),9,iP),se.info?(ne(),me("button",{key:0,class:"stl-tab-info",title:l(se),onClick:Pe=>yt(Ee,Pe)},"i",8,lP)):Re("",!0)],2))),128))]),F.value!==null&&((ze=v.value[F.value])!=null&&ze.info)?(ne(),me("div",cP,ye(l(v.value[F.value])),1)):Re("",!0)])),R("div",uP,[le[17]||(le[17]=R("span",{class:"stl-caret-sp"},null,-1)),le[18]||(le[18]=R("span",{class:"stl-dot-sp"},null,-1)),R("span",dP,ye(e.columnLabel||(e.hideTabs?e.title:i(v.value[ve.value])||ge(a)("legend.columns.name"))),1),de.value?(ne(),me("button",{key:0,class:Ke(["stl-hdr-num",{active:ie.value==="count"}]),title:ge(a)("legend.sortByUpgs"),onClick:le[7]||(le[7]=se=>M("count"))},[Ht(ye(ge(a)("legend.columns.upgs"))+" ",1),ie.value==="count"?(ne(),me("span",gP,ye(he.value==="desc"?"▼":"▲"),1)):Re("",!0)],10,pP)):Re("",!0),_e.value?(ne(),me("button",{key:1,class:Ke(["stl-hdr-num",{active:ie.value==="pop"}]),title:ge(a)("legend.sortByPop"),onClick:le[8]||(le[8]=se=>M("pop"))},[Ht(ye(ge(a)("legend.columns.population"))+" ",1),ie.value==="pop"?(ne(),me("span",fP,ye(he.value==="desc"?"▼":"▲"),1)):Re("",!0)],10,hP)):Re("",!0),le[19]||(le[19]=R("span",{class:"stl-x-slot"},null,-1))]),R("div",{class:Ke(["stl-rows",{"has-sel":J.value}]),ref_key:"rowsContainer",ref:Q},[(ne(!0),me(ot,null,io(C.value,se=>{var Ee,Pe;return ne(),me("div",{key:se.node.id,class:Ke(["stl-row",Fn(se)]),"data-stl-node-id":se.node.id,style:Tt({"--trunk-color":((Ee=se.parent)==null?void 0:Ee.color)||"#6e7681","--row-color":se.node.color||"#73A17F"}),onClick:qe=>oe(se.node)},[(ne(!0),me(ot,null,io(se.trunks,(qe,Ce)=>(ne(),me("span",{key:`tr${Ce}`,class:Ke(["stl-trunk",`stl-trunk-${qe}`])},null,2))),128)),(Pe=se.node.children)!=null&&Pe.length?(ne(),me("button",{key:0,class:Ke(["stl-caret",{open:A.value.has(se.node.id)}]),"aria-expanded":A.value.has(se.node.id)?"true":"false","aria-label":ge(a)(A.value.has(se.node.id)?"legend.a11y.collapseRow":"legend.a11y.expandRow",{label:se.node.label}),onClick:Lt(qe=>xe(se.node.id,qe),["stop"])},[...le[20]||(le[20]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,bP)):(ne(),me("span",$P)),se.node.color?(ne(),me("span",{key:2,class:"stl-dot",style:Tt({background:se.node.color})},null,4)):(ne(),me("span",_P)),R("span",yP,ye(se.node.label),1),de.value?(ne(),me("span",vP,ye(ur(se.node.count)),1)):Re("",!0),_e.value?(ne(),me("span",wP,ye(Ko(se.node.pop)),1)):Re("",!0),R("span",kP,[Se.value===se.node.id?(ne(),me("button",{key:0,class:"stl-x-chip",title:ge(a)("legend.a11y.clearSelection"),"aria-label":ge(a)("legend.a11y.clearSelection"),onClick:le[9]||(le[9]=Lt(qe=>nt(qe),["stop"]))},[...le[21]||(le[21]=[R("svg",{width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M2 2L10 10M10 2L2 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,xP)):Re("",!0)])],14,mP)}),128)),B.value&&!C.value.length?(ne(),me("div",SP,[le[22]||(le[22]=R("span",{class:"stl-spinner"},null,-1)),R("span",null,ye(o("legend.loadingRows","Loading {label}…").replace("{label}",((re=v.value[ve.value])==null?void 0:re.label)||"rows")),1)])):!C.value.length&&e.nodes.length===0?(ne(),me("div",PP,ye(o("legend.loadingData","Loading data…")),1)):C.value.length?Re("",!0):(ne(),me("div",AP,ye(ge(a)("legend.noDataAtThisLevel")),1)),be.value>0?(ne(),me("div",LP,[Ht(ye(o("legend.showingTop","Showing top {n} of {m}").replace("{n}",v.value[ve.value].topLimit.toLocaleString()).replace("{m}",H.value.length.toLocaleString()))+" — ",1),R("span",CP,ye(o("legend.useGeocoderHint","use the geocoder above to find the rest")),1)])):Re("",!0)],2),$.value?(ne(),ut(Li,{key:1,dark:y.value},null,8,["dark"])):Re("",!0)])],10,zS),j.value?Re("",!0):(ne(),me("button",{key:0,class:"stl-reopen","data-theme":((pe=ge(d))==null?void 0:pe.theme.value)||"dark",title:ge(a)("aria.expandLegend"),"aria-label":ge(a)("aria.expandLegend"),onClick:le[10]||(le[10]=se=>{j.value=!0,u("update:open",!0)})},[le[23]||(le[23]=R("svg",{class:"stl-reopen-icon",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M2 4h8M2 6h8M2 8h5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),R("span",EP,[Ae.value?(ne(),me(ot,{key:0},[Ae.value.color?(ne(),me("span",{key:0,class:"stl-reopen-dot",style:Tt({background:Ae.value.color})},null,4)):Re("",!0),Ht(" "+ye(Ae.value.label),1)],64)):(ne(),me(ot,{key:1},[Ht(ye(S.value),1)],64))]),le[24]||(le[24]=R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none",class:"stl-reopen-caret"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],8,TP))],64)}}},[["styles",[DS]],["__scopeId","data-v-49026e50"]]),MP="#6b7280";function RP(){const e=dn(Qa.AFFINITY_BLOCK);return e&&e.propertyKey==="affinityBlock"&&e.palette?e.palette:{}}function FP(e,t){const o=RP();return e&&o[e]?o[e]:MP}function NP(e){return(e==null?void 0:e.properties)||e||{}}function su(e){return e&&typeof e=="object"&&"label"in e?e.label||e.value||"":e}function IP(e){var t;return String(e.affinityBlock||su((t=e._raw)==null?void 0:t.rop1)||"").trim()}function OP(e){var t;return String(e.affinityBlockLabel||((t=e._raw)!=null&&t.rop1&&typeof e._raw.rop1=="object"?e._raw.rop1.label:"")||"").trim()}function DP(e){var t;return String(e.cluster||su((t=e._raw)==null?void 0:t.imb_reg_of_people_2)||"").trim()}function zP(e){var t;return String(e.clusterLabel||((t=e._raw)!=null&&t.imb_reg_of_people_2&&typeof e._raw.imb_reg_of_people_2=="object"?e._raw.imb_reg_of_people_2.label:"")||"").trim()}function jP(e){var t;return String(e.peopleGroup||su((t=e._raw)==null?void 0:t.imb_reg_of_people_25)||"").trim()}function BP(e){var t;return String(e.peopleGroupLabel||((t=e._raw)!=null&&t.imb_reg_of_people_25&&typeof e._raw.imb_reg_of_people_25=="object"?e._raw.imb_reg_of_people_25.label:"")||e.name||"").trim()}function GP(e){var t;return String(e.uniqueId||e.slug||((t=e._raw)==null?void 0:t.slug)||"").trim()}function HP(e){var t;return String(e.name||e.displayName||((t=e._raw)==null?void 0:t.name)||"").trim()}function UP(e){var o;const t=Number(e.population??e.populationNum??((o=e._raw)==null?void 0:o.population)??0);return Number.isFinite(t)?t:0}function WP(e){return String(e.countryName||e.country||e.countryIsoLabel||e.countryIso||"").trim()}function Lf(e){const t=te(()=>{const r=e&&e.value||[],s=new Map;for(const i of r){const l=NP(i),c=IP(l),u=OP(l)||c||"— Unknown —",d=DP(l),f=zP(l)||d||"— Unknown —",x=jP(l),S=BP(l)||x||"— Unknown —",y=GP(l),g=HP(l)||y,b=UP(l),m=WP(l);if(!y)continue;let $=s.get(c||"__unknown__");$||($={code:c,label:u,count:0,pop:0,memberIds:[],clusters:new Map},s.set(c||"__unknown__",$)),$.count+=1,$.pop+=b,$.memberIds.push(y);let p=$.clusters.get(d||"__unknown__");p||(p={code:d,label:f,count:0,pop:0,memberIds:[],peopleGroups:new Map},$.clusters.set(d||"__unknown__",p)),p.count+=1,p.pop+=b,p.memberIds.push(y);let _=p.peopleGroups.get(x||"__unknown__");_||(_={code:x,label:S,count:0,pop:0,memberIds:[],instances:[]},p.peopleGroups.set(x||"__unknown__",_)),_.count+=1,_.pop+=b,_.memberIds.push(y),_.instances.push({id:y,name:g,country:m,pop:b})}return s}),o=r=>r&&r.length?["in",["get","uniqueId"],["literal",r]]:["==",["get","uniqueId"],"__none__"],n=te(()=>{const r=t.value,s=[];for(const i of r.values()){const l=FP(i.code,i.label),c={id:`bloc:${i.code||i.label}`,label:i.label,color:l,count:i.count,pop:i.pop,filter:o(i.memberIds),children:[]};for(const u of i.clusters.values()){const d={id:`cluster:${i.code}__${u.code||u.label}`,label:`${u.label} (Cluster)`,color:l,count:u.count,pop:u.pop,filter:o(u.memberIds),children:[]};for(const f of u.peopleGroups.values()){const x={id:`pg:${i.code}__${u.code}__${f.code||f.label}`,label:`${f.label} (PG)`,color:l,count:f.count,pop:f.pop,filter:o(f.memberIds),children:[]};f.instances.sort((S,y)=>y.pop-S.pop||S.country.localeCompare(y.country));for(const S of f.instances)x.children.push({id:`pgic:${S.id}`,label:`${S.country?`${S.name}, ${S.country}`:S.name} (PGIC)`,color:l,count:1,pop:S.pop,filter:["==",["get","uniqueId"],S.id],children:[]});d.children.push(x)}d.children.sort((f,x)=>x.count-f.count||x.pop-f.pop),c.children.push(d)}c.children.sort((u,d)=>d.count-u.count||d.pop-u.pop),s.push(c)}return s.sort((i,l)=>l.count-i.count||l.pop-i.pop),s});function a(r){if(typeof window>"u"||typeof window.CustomEvent!="function")return;if(!r){window.dispatchEvent(new CustomEvent("legend:highlight",{detail:{kind:null}}));return}const s=String(r.id||""),i={kind:null,label:r.label,filterExpr:r.filter};s.startsWith("bloc:")?i.kind="bloc":s.startsWith("cluster:")?i.kind="cluster":s.startsWith("pg:")?i.kind="people-group":s.startsWith("pgic:")&&(i.kind="people-group-in-country"),window.dispatchEvent(new CustomEvent("legend:highlight",{detail:i}))}return{aggregated:t,affinityTree:n,highlight:a}}const qP={africa:"#ff2e2e",asia:"#1a8cff",europe:"#1ee05f","latin_america_&_caribbean":"#FFEB3B",middle_east:"#a83dff","north_america_&_non-spanish_caribbean":"#00e0bd",oceania:"#ff7f11"},KP="#95a5a6";function VP(e){return qP[String(e||"").toLowerCase()]||KP}function YP(e){return(e==null?void 0:e.properties)||e||{}}function ZP(e){var o;const t=Number(e.population??e.populationNum??((o=e._raw)==null?void 0:o.population)??0);return Number.isFinite(t)?t:0}function JP(e){var t,o;return String(e.doxaRegion||e.wagfRegion||((o=(t=e._raw)==null?void 0:t.wagf_region)==null?void 0:o.value)||"").trim()}function XP(e){var o;const t=(o=e._raw)==null?void 0:o.wagf_region;return String(e.wagfRegionLabel||e.doxaRegionLabel||(t&&typeof t=="object"?t.label:"")||e.doxaRegion||"").trim()}function QP(e){var t,o;return String(e.wagfBlock||((o=(t=e._raw)==null?void 0:t.wagf_block)==null?void 0:o.value)||"").trim()}function e2(e){var o;const t=(o=e._raw)==null?void 0:o.wagf_block;return String(e.wagfBlockLabel||(t&&typeof t=="object"?t.label:"")||e.wagfBlock||"").trim()}function t2(e){var t,o;return String(e.countryIso||((o=(t=e._raw)==null?void 0:t.country_code)==null?void 0:o.value)||"").trim().toUpperCase()}function o2(e){var o;const t=(o=e._raw)==null?void 0:o.country_code;return String(e.countryIsoLabel||(t&&typeof t=="object"?t.label:"")||e.countryIso||"").trim()}function Cf(e){const t=te(()=>{const a=e&&e.value||[],r=new Map;for(const s of a){const i=YP(s),l=JP(i),c=XP(i)||l||"— Unknown —",u=QP(i),d=e2(i)||u||"— Unknown —",f=t2(i),x=o2(i)||f||"— Unknown —",S=ZP(i);if(!l||l==="na"||l==="none")continue;let y=r.get(l);if(y||(y={slug:l,label:c,count:0,pop:0,blocks:new Map},r.set(l,y)),y.count+=1,y.pop+=S,!u||u==="na")continue;let g=y.blocks.get(u);if(g||(g={slug:u,label:d,count:0,pop:0,countries:new Map},y.blocks.set(u,g)),g.count+=1,g.pop+=S,!f)continue;let b=g.countries.get(f);b||(b={iso:f,name:x,count:0,pop:0},g.countries.set(f,b)),b.count+=1,b.pop+=S}return r}),o=te(()=>{const a=t.value,r=[];for(const s of a.values()){const i=VP(s.slug),l=[],c=[],u=[...s.blocks.values()].sort((d,f)=>f.pop-d.pop||d.label.localeCompare(f.label));for(const d of u){const f=[],x=[],S=[...d.countries.values()].sort((y,g)=>g.pop-y.pop||y.name.localeCompare(g.name));for(const y of S)f.push(y.iso),l.push(y.iso),x.push({id:`country:${s.slug}__${d.slug}__${y.iso}`,label:y.name,color:i,count:y.count,pop:y.pop,filter:["==",["get","countryIso"],y.iso],isoCodes:[y.iso],children:[]});c.push({id:`block:${s.slug}__${d.slug}`,label:`${d.label} (Bloc)`,color:i,count:d.count,pop:d.pop,filter:["==",["get","wagfBlock"],d.slug],isoCodes:f,children:x})}r.push({id:`region:${s.slug}`,label:`${s.label} (Region)`,color:i,count:s.count,pop:s.pop,filter:["==",["get","doxaRegion"],s.slug],isoCodes:[...new Set(l)],children:c})}return r.sort((s,i)=>i.pop-s.pop||s.label.localeCompare(i.label)),r});function n(a){if(typeof window>"u"||typeof window.CustomEvent!="function")return;if(!a){window.dispatchEvent(new CustomEvent("legend:highlight",{detail:{kind:null}}));return}const r=String(a.id||""),s={kind:null,label:a.label,filterExpr:a.filter};r.startsWith("region:")?s.kind="region":r.startsWith("block:")?s.kind="block":r.startsWith("country:")&&(s.kind="country"),window.dispatchEvent(new CustomEvent("legend:highlight",{detail:s}))}return{aggregated:t,regionsTree:o,highlight:n}}function _a(e,t){var o;for(const n of e){if(t(n))return n;if((o=n.children)!=null&&o.length){const a=_a(n.children,t);if(a)return a}}return null}function n2(e,t){if(!e||!t)return null;const o=e.id;if(t==="prayer"){const n=["to-number",["get","peoplePraying"]];if(o==="noPrayer")return["==",n,0];if(o==="fullPrayer")return[">=",n,un];if(o==="hasPrayer")return["all",[">",n,0],["<",n,un]]}else if(t==="engagement"){if(o==="hasEngagement")return["==",["get","engagementStatus"],!0];if(o==="notEngaged")return["==",["get","engagementStatus"],!1]}else if(t==="adoption"){if(o==="hasAdoption")return["==",["get","adoptionStatus"],!0];if(o==="notAdopted")return["==",["get","adoptionStatus"],!1]}else if(t==="religion")return["==",["slice",["coalesce",["get","religion"],""],0,1],o];return null}function ea(e){return["case",["has","iso_3166_1_alpha_3"],e,e]}function a2({map:e,activeTab:t,countryOutline:o,regionIdle:n,mapFly:a,pplrInstance:r,mapId:s}){function i(){var f;o.clearCountry();const d=e.value;!d||!d.getLayer("regions-fill")||(d.setPaintProperty("regions-fill","fill-opacity",n(.2)),d.setPaintProperty("regions-fill","fill-outline-color",null),d.setPaintProperty("regions-border","line-color",n("rgba(60,60,80,0.35)")),d.setPaintProperty("regions-border","line-width",n(.6)),((f=t.value)==null?void 0:f.id)!=="doxa-regions"&&(d.setLayoutProperty("regions-fill","visibility","none"),d.setLayoutProperty("regions-border","visibility","none")))}function l(d){const f=[];for(const x of d){f.push({id:x.key,label:x.label,color:x.color,count:x.count??0,pop:x.population??0,filter:x.filterKey?["==",["get","_flat_filter"],x.filterKey]:null,children:[]});for(const S of x.children||[])f.push({id:S.key,label:S.label,color:S.color,count:S.count??0,pop:S.population??0,filter:S.filterKey?["==",["get","_flat_filter"],S.filterKey]:null,children:[]})}return f}function c(d){var x,S;const f=d==null?void 0:d.detail;!f||f.mapId!==s||(f.center&&Array.isArray(f.center)?(x=a.flyToCoords)==null||x.call(a,{longitude:f.center[0],latitude:f.center[1]},f.zoom??4):f.bounds&&((S=a.fitBounds)==null||S.call(a,f.bounds,60)))}function u(d,f){var S,y;if(!f){const g=r.selection.value;g&&((S=g.id)!=null&&S.startsWith(d+":"))&&(r.selection.value=null);return}const x=r.selection.value;x&&((y=x.id)!=null&&y.startsWith(d+":"))&&x.label===f.label||(r.selection.value=f)}return{clearCountryHighlight:i,flatItemsToStlNodes:l,onLegendRowClick:c,bridgeSelection:u}}function Tf(e){var o;let t=e&&e.parentNode;for(;t;){if(t.nodeType===1){const n=getComputedStyle(t);if(/auto|scroll/.test(n.overflowY)&&t.scrollHeight>t.clientHeight+4)return t}if(t=t.parentElement||((o=t.parentNode)==null?void 0:o.host)||(t.parentNode!==t?t.parentNode:null),t&&t.nodeType===9)break}return null}const r2=["onClick"],s2={key:0,class:"rm-tab-sep","aria-hidden":"true"},i2={class:"rm-map-area"},l2={key:0,class:"rm-loading"},c2={key:1,class:"rm-error"},u2=["data-provider"],d2={class:"rm-legend-mobile-slot"},p2=!0,g2=22,Ef=70,Mf=5.5,h2=6,Rf=.01,f2=110,m2=1.45,b2=900,Ff=60,$2=900,_2=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"research-map",setup(e){var Cm,Tm,Em,Mm,Rm,Fm,Nm,Im,Om;function t(T,z){if(T!=null&&T.getLayer("language-family-pins-hitbox"))try{T.setFilter("language-family-pins-hitbox",z)}catch{}}function o(T){if(!(!T||!T.scrollZoom))try{const ee=document.documentElement.scrollHeight>window.innerHeight+4,fe=T.getContainer&&T.getContainer()||null,Le=fe?!!Tf(fe):!1;T.scrollZoom.enable()}catch{}}const n=(T,z)=>ao(T)||z,a=di(()=>Ft(()=>Promise.resolve().then(()=>Of),void 0)),r=di(()=>Ft(()=>Promise.resolve().then(()=>xk),void 0));Vt(` .mapboxgl-ctrl-top-left { top:12px!important;inset-inline-start:8px!important;inset-inline-end:auto!important;width:var(--map-legend-width,380px)!important;max-width:var(--map-legend-width,380px)!important;z-index:1200!important; } .mapboxgl-ctrl-top-left .mapboxgl-ctrl { margin:0!important;float:none!important; } .mapboxgl-ctrl-geocoder { width:100%!important;max-width:100%!important;min-width:0!important;border-radius:999px!important;box-shadow:0 2px 8px rgba(0,0,0,0.15)!important;background:#fff;transition:box-shadow 0.12s,border-color 0.12s; } @@ -1498,7 +1498,7 @@ .map-scroll-edge { position:absolute;top:0;bottom:0;width:calc(var(--map-btn-size,32px) + 6px);z-index:2;touch-action:pan-y;pointer-events:auto;background:transparent; } .map-scroll-edge--left { left:0; } .map-scroll-edge--right { right:0; } -`,"research-map");const s=je("profileConfig"),i=je("mapboxToken"),l=oh(s),c=te(()=>{var T;return((T=s==null?void 0:s.value)==null?void 0:T.search)===!1?!1:l==="mapbox"}),u=te(()=>{var T;return((T=s==null?void 0:s.value)==null?void 0:T.legendTools)!==!1}),d=te(()=>c.value?null:u.value&&kf((A==null?void 0:A.value)??A)?"56px":"14px"),f=E1(l),x=je("dataSource");je("colorSet");const S=je("instanceId",null),y=(()=>{var z;const T=(z=s==null?void 0:s.value)==null?void 0:z.locale;return T&&Za.includes(T)?T:null})(),{locale:g,t:b,te:m}=Ot();y&&(g.value=y);function $(T){const z="tabs."+((T==null?void 0:T.i18nKey)||(T==null?void 0:T.id));return T&&m(z)?b(z):(T==null?void 0:T.label)??""}const p=je("mapStore"),_=je("dataStore"),h=je("uiStore"),k=c1(h),L={doxaRegions:!0,adoption:!1,share:!0,hamburgerMenu:!1,geocoderPersistAcrossTabs:!1},G=[{id:"prayer",colorStrategy:"prayerProgress",legend:"prayer",popup:"pray",feature:null},{id:"adoption",colorStrategy:"adoption",legend:"adoption",popup:"adopt",feature:"adoption"},{id:"engagement",colorStrategy:"engagement",legend:"engagement",popup:"pray",feature:null,sepAfter:!0},{id:"affinity-blocks",colorStrategy:"affinityBlock",legend:"affinity-block",popup:"pray",feature:null},{id:"doxa-regions",colorStrategy:"doxaRegion",legend:"doxa-regions",popup:"pray",feature:"doxaRegions",i18nKey:"regions"},{id:"language-families",colorStrategy:"languageFamily",legend:"language-family",popup:"pray",feature:null},{id:"religion",colorStrategy:"religion",legend:"religion",popup:"pray",feature:null}].filter(T=>!T.feature||L[T.feature]),W=te(()=>G),K=te(()=>!0),v=we(null),N=te(()=>W.value.find(T=>T.id===v.value)??W.value[0]);k.setLook(k.lookFor((Cm=N.value)==null?void 0:Cm.colorStrategy)),Ue(()=>{var T;return(T=N.value)==null?void 0:T.colorStrategy},T=>k.setLook(k.lookFor(T),Z.value));const A=te(()=>{var T;return((T=N.value)==null?void 0:T.legend)??"default"}),w=te(()=>{var T;return((T=N.value)==null?void 0:T.popup)??"pray"}),j={"language-families":"search.tabPlaceholder.languageFamilies","affinity-blocks":"search.tabPlaceholder.affinityBlocks","doxa-regions":"search.tabPlaceholder.regions",religion:"search.tabPlaceholder.religion"},F=te(()=>{var z;const T=j[(z=N.value)==null?void 0:z.id];return T&&m(T)?b(T):""}),U={"affinity-blocks":"people-groups",prayer:"people-groups",adoption:"people-groups",engagement:"people-groups","language-families":"language","doxa-regions":"regions",religion:"religion"},I=te(()=>{var T;return U[(T=N.value)==null?void 0:T.id]||""}),q=(S==null?void 0:S.value)||S||"research-map-"+Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,8);Bt("mapId",q);const O=we(null),ie=we(null),he=we(null),ve=new Map;Ue(()=>v==null?void 0:v.value,async(T,z)=>{var Le,Fe,Me;if(z!==void 0&&T!==z){z&&ve.set(z,h.legendState);const Ve=ve.get(T)||(h.isMobile?"collapsed":"open");Ve==="fullyOpen"?(Le=h.fullyOpenLegend)==null||Le.call(h):Ve==="open"?(Fe=h.openLegend)==null||Fe.call(h):(Me=h.collapseLegend)==null||Me.call(h)}await Kt();const ee=ie.value,fe=ee==null?void 0:ee.querySelector(".rm-tab.active");if(ee&&fe&&ee.scrollWidth>ee.clientWidth+1){const Ve=ee.getBoundingClientRect(),Be=fe.getBoundingClientRect(),ct=ee.scrollLeft+(Be.left-Ve.left)-(Ve.width-Be.width)/2,zt=ee.scrollWidth-ee.clientWidth,Qe=Math.max(0,Math.min(zt,ct));typeof ee.scrollTo=="function"?ee.scrollTo({left:Qe,behavior:"smooth"}):ee.scrollLeft=Qe}});const Ae=we(null),Se=we(!1),Q=we(null),{map:Z,initializeMap:ue,destroy:ke}=V1({containerRef:Ae,accessToken:i.value,provider:l,style:((Tm=s==null?void 0:s.value)==null?void 0:Tm.style)??k.bootStyle(),config:k.bootConfig,center:((Em=s==null?void 0:s.value)==null?void 0:Em.center)??qo.center??[20,10],zoom:((Mm=s==null?void 0:s.value)==null?void 0:Mm.zoom)??qo.zoom??1.8,pitch:((Rm=s==null?void 0:s.value)==null?void 0:Rm.pitch)??qo.pitch??0,bearing:((Fm=s==null?void 0:s.value)==null?void 0:Fm.bearing)??qo.bearing??0,minZoom:((Nm=s==null?void 0:s.value)==null?void 0:Nm.minZoom)??qo.minZoom??.5,maxZoom:gA}),M=new gf({sourcesConfig:ma,locale:y,profileConfig:s}),D=Yv({mapId:q,dataSourceId:x.value,dataSourceManager:M,dataStore:_,markRaw:T=>T});async function B(T){const z=String(T||"").trim().toUpperCase();if(z.length!==3)return;await hn();const ee=Z.value;if(!ee||!ee.getLayer("regions-fill"))return;ee.setLayoutProperty("regions-fill","visibility","visible"),ee.setLayoutProperty("regions-border","visibility","visible");const fe=["literal",[z]];ee.setPaintProperty("regions-fill","fill-opacity",["case",["in",["get","iso_3166_1_alpha_3"],fe],.3,.02]),ee.setPaintProperty("regions-border","line-color",["case",["in",["get","iso_3166_1_alpha_3"],fe],"#111827","rgba(60,60,80,0.15)"]),ee.setPaintProperty("regions-border","line-width",["case",["in",["get","iso_3166_1_alpha_3"],fe],2.5,.3]),ee.getLayer("language-family-pins")&&ee.moveLayer("language-family-pins")}const V=Ev({getMap:()=>Z.value,mapId:q,getLanguageFamilyColor:T=>{var ee,fe;const z=dn((ee=N.value)==null?void 0:ee.colorStrategy);return((fe=z==null?void 0:z.colors)==null?void 0:fe[T])??(z==null?void 0:z.fallback)??"#7c8cf8"},getNormalizedPeopleGroups:()=>D.normalizedPeopleGroups.value||[]});Xh({getMap:()=>Z.value,mapId:q,getLanguageFamilyColor:()=>"#7c8cf8",getNormalizedPeopleGroups:()=>D.normalizedPeopleGroups.value||[]});const ae=Fv({getMap:()=>Z.value,mapId:q,mapStore:p,defaultCenter:((Im=s==null?void 0:s.value)==null?void 0:Im.center)??[20,10],defaultZoom:((Om=s==null?void 0:s.value)==null?void 0:Om.zoom)??1.8}),H=Iv({getMap:()=>Z.value,getActivePinColor:T=>{var ee,fe;const z=dn(((ee=N.value)==null?void 0:ee.colorStrategy)??"languageFamily");return((fe=z==null?void 0:z.getColor)==null?void 0:fe.call(z,T))??"#1a1a1a"}});let ce=null,be=null;function E(){return ce?Promise.resolve(ce):(be||(be=Ft(()=>Promise.resolve().then(()=>BA),void 0).then(T=>(ce=T.useMapClustering({getMap:()=>Z.value,mapId:q,mapStore:p,getPeopleGroups:()=>D.normalizedPeopleGroups.value||[],getClusterColor:()=>{var z,ee;return((ee=dn((z=N.value)==null?void 0:z.colorStrategy))==null?void 0:ee.fallback)??"#7c8cf8"}}),ce))),be)}const C={setData(T){var z;(z=ce==null?void 0:ce.setData)==null||z.call(ce,T)},applyFilters(T){var z;(z=ce==null?void 0:ce.applyFilters)==null||z.call(ce,T)},refreshColors(){var T;(T=ce==null?void 0:ce.refreshColors)==null||T.call(ce)},cleanup(){var T;(T=ce==null?void 0:ce.cleanup)==null||T.call(ce)},async setEnabled(T){var z,ee;(ee=(z=await E()).setEnabled)==null||ee.call(z,T)},async setMode(T){var z,ee;(ee=(z=await E()).setMode)==null||ee.call(z,T)},_pendingSelectionFilter:null,setSelectionFilter(T){this._pendingSelectionFilter=T||null,ce!=null&&ce.setSelectionFilter&&ce.setSelectionFilter(T)},flushSelectionFilter(){ce!=null&&ce.setSelectionFilter&&ce.setSelectionFilter(this._pendingSelectionFilter)}},J=ts({});Bt("normalizedPeopleGroups",D.normalizedPeopleGroups);const de=Gv(()=>Z.value),_e=NS(q);IS(_e);const $e=aA({map:Z,activeTab:N,countryOutline:de,regionIdle:ea,mapFly:ae,pplrInstance:_e,mapId:q}),X=$e.clearCountryHighlight,oe=$e.flatItemsToStlNodes,xe=$e.onLegendRowClick,Te=$e.bridgeSelection,{onPeopleGroupResult:We,onAggregateResult:nt,onClear:yt,clearGeocoderProgrammatic:Gt}=Zv({map:Z,geocoderRef:he,clustering:C,mapStore:p,uiStore:h,mapLayers:V,pplrInstance:_e,onSemanticTreeSelect:pt,switchTab:In,activeTabId:v,clearAllHighlights:gr,clearCountryHighlight:X,mapId:q,legendRouters:{country:On,region:ko,religion:eo}});_e.activeTab.value=1;function Jt(T){return T==="affinity-block"?0:T==="language-family"?1:0}Ue(A,T=>{_e.activeTab.value=Jt(T)});const kt={get value(){return D.normalizedPeopleGroups.value||[]}},{langTree:St}=Zc(kt),Co=[{id:"family",info:!0},{id:"language",info:!0},{id:"dialect",info:!0}],{affinityTree:Ko}=Lf(kt),ur=[{id:"bloc",info:!0},{id:"cluster",info:!0},{id:"group",info:!0},{id:"pgic",info:!0}],{regionsTree:Fn}=Cf(kt),Y=[{id:"region",info:!0},{id:"block",info:!0},{id:"country",info:!0}],le=ts(As(()=>A.value),Ti),Ie=le.progress;Bt("legendProgress",Ie);const ze=te(()=>["prayer","engagement","adoption","religion"].includes(A.value)),re=te(()=>ze.value?oe(le.items.value):A.value==="affinity-block"?Ko.value:A.value==="doxa-regions"?Fn.value:St.value),pe=te(()=>ze.value?null:A.value==="affinity-block"?ur:A.value==="doxa-regions"?Y:Co),se=te(()=>ze.value),Ee=te(()=>A.value==="religion"?b("legend.colLabel.religion"):A.value==="prayer"?b("legend.colLabel.prayer"):A.value==="engagement"?b("legend.colLabel.engagement"):A.value==="adoption"?b("legend.colLabel.adoption"):ze.value?b("legend.colLabel.status"):""),Pe=te(()=>h.legendState!=="collapsed");function qe(T){T?h.openLegend():h.collapseLegend()}const Ce=te(()=>ze.value?b("legend.titleBar.legend"):A.value==="affinity-block"?b("legend.titleBar.peopleGroups"):A.value==="doxa-regions"?b("legend.titleBar.wagfRegions"):b("legend.titleBar.languages"));Bt("onSemanticTreeSelect",T=>pt(T)),Bt("getActivePinColor",T=>{var ee,fe;const z=dn(((ee=N.value)==null?void 0:ee.colorStrategy)??"languageFamily");return((fe=z==null?void 0:z.getColor)==null?void 0:fe.call(z,T))??"#1a1a1a"});const Ge=["case",["has","iso_3166_1_alpha_3"],.7,.7],Je=["case",["has","iso_3166_1_alpha_3"],"rgba(60,60,80,0.35)","rgba(60,60,80,0.35)"],De=["case",["has","iso_3166_1_alpha_3"],.6,.6];function He(T){if(!T||!T.getLayer("regions-fill"))return;const z=ea,ee=Fe=>Array.isArray(Fe)&&(Fe[0]==="get"||Fe[0]==="has"||Fe[0]==="feature-state"||Fe.some(ee)),fe=Fe=>Array.isArray(Fe)&&(Fe[0]==="zoom"||Fe.some(fe)),Le=(Fe,Me)=>{if(!T.getLayer(Fe))return;const Ve=T.getPaintProperty(Fe,Me);Ve!=null&&(ee(Ve)||fe(Ve)||T.setPaintProperty(Fe,Me,z(Ve)))};try{Le("regions-fill","fill-opacity"),Le("regions-border","line-color"),Le("regions-border","line-width")}catch{}}function st(T,z){if(!T||!T.getLayer("regions-fill"))return;const ee=Array.isArray(z)?[...new Set(z.filter(Boolean).map(Be=>String(Be).toUpperCase()))].sort():[],fe=["literal",ee],Le=ee.length?["case",["in",["get","iso_3166_1_alpha_3"],fe],.85,.15]:Ge,Fe=ee.length?["case",["in",["get","iso_3166_1_alpha_3"],fe],"#111827","rgba(60,60,80,0.15)"]:Je,Me=ee.length?["case",["in",["get","iso_3166_1_alpha_3"],fe],2.5,.3]:De,Ve=(Be,ct,zt)=>{T.getLayer(Be)&&JSON.stringify(T.getPaintProperty(Be,ct))!==JSON.stringify(zt)&&T.setPaintProperty(Be,ct,zt)};try{Ve("regions-fill","fill-opacity",Le),Ve("regions-border","line-color",Fe),Ve("regions-border","line-width",Me)}catch{}}function pt(T){var fe,Le,Fe,Me,Ve,Be,ct,zt;const z=Z.value;if(T){const Qe=ze.value?nA(T,A.value):null,at=((fe=N.value)==null?void 0:fe.id)==="doxa-regions",ft=Qe?{matchExpr:Qe}:{};at&&(ft.regionPolygonSource="regions"),(Le=ae.zoomToLegendRow)==null||Le.call(ae,T,Object.keys(ft).length?ft:void 0)}if(!T){if(ze.value){const Qe=A.value;Qe==="prayer"?h.setPrayerFilter(null):Qe==="engagement"?h.setEngagementFilter(null):Qe==="adoption"?h.setAdoptionFilter(null):Qe==="religion"&&h.setReligionFilter(null)}if(z&&z.getLayer("language-family-pins")){try{z.setFilter("language-family-pins",null)}catch{}t(z,null),wo(z,null),V.syncGlowFilter(null)}z&&z.getLayer("regions-fill")&&(z.setPaintProperty("regions-fill","fill-opacity",ea(.7)),z.setPaintProperty("regions-border","line-color",ea("rgba(60,60,80,0.35)")),z.setPaintProperty("regions-border","line-width",ea(.6))),p.selectedFamily&&p.selectFamily(null),p.selectedLanguage&&p.selectLanguage(null),p.selectedDialect&&((Fe=p.selectDialect)==null||Fe.call(p,null)),p.selectedRegion&&((Me=p.selectRegion)==null||Me.call(p,null)),Gt();return}if(ze.value){const Qe=A.value;Qe==="prayer"?h.setPrayerFilter(T.id):Qe==="engagement"?h.setEngagementFilter(T.id):Qe==="adoption"?h.setAdoptionFilter(T.id):Qe==="religion"&&h.setReligionFilter(T.id);return}if(z&&z.getLayer("language-family-pins")&&T.filter){try{z.setFilter("language-family-pins",T.filter)}catch{}t(z,T.filter),wo(z,null),V.syncGlowFilter(T.filter)}const ee=String(T.id||"");if(ee.startsWith("fam:"))(Ve=p.selectFamily)==null||Ve.call(p,T.label);else if(ee.startsWith("lang:"))(Be=p.selectLanguage)==null||Be.call(p,T.label);else if(ee.startsWith("dial:"))(ct=p.selectDialect)==null||ct.call(p,{key:ee.slice(5),originalLabels:T.originalLabels||[]});else if(ee.startsWith("bloc:")||ee.startsWith("cluster:")||ee.startsWith("pg:")||ee.startsWith("pgic:")){if(z&&z.getLayer("language-family-pins")&&T.filter){try{z.setFilter("language-family-pins",null)}catch{}t(z,T.filter),wo(z,T.filter),V.syncGlowFilter(T.filter)}}else if(ee.startsWith("region:")||ee.startsWith("block:")||ee.startsWith("country:")){if(z&&z.getLayer("language-family-pins")&&T.filter){try{z.setFilter("language-family-pins",T.filter)}catch{}t(z,T.filter),wo(z,null)}ee.startsWith("region:")&&((zt=p.selectRegion)==null||zt.call(p,ee.slice(7))),ee.startsWith("region:")||st(z,T.isoCodes||[])}}Ue(()=>h.theme,T=>{_e.theme.value=T==="dark"?"dark":"light"},{immediate:!0}),Ue(()=>p.selectedFamily,T=>{if(!T)return Te("fam",null);const z=_a(St.value,ee=>ee.id.startsWith("fam:")&&ee.label===T);z&&Te("fam",{...z,depth:0})}),Ue(()=>p.selectedLanguage,T=>{if(!T)return Te("lang",null);const z=_a(St.value,ee=>ee.id.startsWith("lang:")&&ee.label===T);z&&Te("lang",{...z,depth:1})}),Ue(()=>p.selectedDialect,T=>{if(!(T!=null&&T.key))return Te("dial",null);const z=`dial:${T.key}`,ee=_a(St.value,fe=>fe.id===z);ee&&Te("dial",{...ee,depth:2})}),Ue(()=>p.selectedRegion,T=>{if(!T)return Te("region",null);const z=_a(Fn.value,ee=>ee.id===`region:${T}`);z&&Te("region",{...z,depth:0})});function vt(T){var fe;const z=le.items.value||[];return(z.length?z:((fe=J==null?void 0:J.items)==null?void 0:fe.value)||[]).flatMap(Le=>[Le,...Le.children||[]]).map(Le=>({label:Le.label,color:Le.color})).filter(Le=>Le.label)}const $t=we(!1);async function _o(){var T,z;if(!$t.value){$t.value=!0;try{const[{useMapPoster:ee},{defaultPosterSpec:fe},{printImageBlob:Le}]=await Promise.all([Ft(()=>Promise.resolve().then(()=>tm),void 0),Ft(()=>Promise.resolve().then(()=>qf),void 0),Ft(()=>Promise.resolve().then(()=>i2),void 0)]),Fe=ee(()=>Z.value),Me=((z=(T=Z.value)==null?void 0:T.getContainer)==null?void 0:z.call(T))||null,Ve=!!Me&&Me.clientWidth>Me.clientHeight,Be=fe({widthIn:Ve?11:8.5,heightIn:Ve?8.5:11,dpi:200,orientation:Ve?"landscape":"portrait"}),ct=$(N.value)||Ce.value||"Doxa Map";Be.dir=["ar","fa","he","ur"].includes(String(g.value||"").split("-")[0])?"rtl":"ltr",Be.layout="poster",Be.slots.title={...Be.slots.title,text:ct};const zt=vt(!0);Be.slots.legend={...Be.slots.legend,rows:zt,title:Ce.value},Be.slots.scaleBar=!1,Be.slots.north=!1;const Qe=M1(Z.value)==="maplibre";Be.slots.footer={...Be.slots.footer,left:"pray.doxa.life",right:new Date().toISOString().slice(0,10),attribution:Qe?"© OpenFreeMap © OpenMapTiles © OpenStreetMap":"© Mapbox © OpenStreetMap"};const at=await Fe.render(Be,"png");Le(at,{widthIn:Be.widthIn??8.5,heightIn:Be.heightIn??11,title:ct,alt:ct})||console.error("[research-map] poster print: the host blocked the print frame")}catch(ee){console.error("[research-map] poster export failed:",ee)}finally{$t.value=!1}}}const Io=te(()=>String(b("controls.export_poster")||"Export poster…"));function co(T){const[z,ee]=String(T).split(":");if(z==="poster")return _o();if(z==="packet")return To(ee||"full")}Bt("onLegendExport",co),Bt("onLegendExport",co);const Oo=we(!1),vo=te(()=>$t.value||Oo.value);Bt("legendExportBusy",vo);async function To(T="full"){var z,ee,fe,Le;if(!Oo.value){Oo.value=!0;try{const[{usePosterPrints:Fe},{defaultPosterSpec:Me},{useMapPoster:Ve},{selectedPinIds:Be}]=await Promise.all([Ft(()=>Promise.resolve().then(()=>_2),void 0),Ft(()=>Promise.resolve().then(()=>qf),void 0),Ft(()=>Promise.resolve().then(()=>tm),void 0),Ft(()=>Promise.resolve().then(()=>Rv),void 0)]),ct=D.normalizedPeopleGroups.value||[],zt=[((ee=(z=Z.value)==null?void 0:z.getFilter)==null?void 0:ee.call(z,"language-family-pins"))||null,pr].filter(Boolean);let Qe=ct;if(zt.length){const _t=Be(Z.value,{expressions:zt}),mn=ct.filter(Hi=>_t.has(String(Hi.uniqueId??Hi.id??"")));mn.length?Qe=mn:console.warn(`[research-map] packet: ${_t.size} pin(s) selected but no rows matched; printing the full list`)}const at=Qe.length;Qe.length>50&&(console.warn(`[research-map] packet truncated ${Qe.length} → 50 people groups`),Qe=Qe.slice(0,50));const ft=Qe.map(_t=>({slug:String(_t.slug||_t.uniqueId||_t.id||""),name:_t.name,population:_t.population,religion:_t.religionName||_t.religionLabel||_t.religion||"",country_code:_t.countryName||_t.countryIsoLabel||_t.country||_t.countryIso||"",image_url:_t.imageUrl||_t.image_url||""})),it=Me({widthIn:8.27,heightIn:11.69,dpi:150,orientation:"portrait"});it.slots.title={...it.slots.title,text:Ce.value||"Doxa Map"},it.slots.legend={...it.slots.legend,rows:vt(!0),title:Ce.value};let qt="";if(T!=="cards")try{const _t=await Ve(()=>Z.value).render(it,"png");qt=await new Promise((mn,Hi)=>{const Ui=new FileReader;Ui.onload=()=>mn(String(Ui.result)),Ui.onerror=Hi,Ui.readAsDataURL(_t)})}catch(_t){console.warn("[research-map] packet map page skipped:",(_t==null?void 0:_t.message)||_t)}const Do=Ce.value||$(N.value)||"Doxa Map",La={id:String(((fe=N.value)==null?void 0:fe.id)||"research-map"),label:at>Qe.length?`${Do} — ⁦${Qe.length} / ${at}⁩`:Do,zoneKey:String(((Le=N.value)==null?void 0:Le.id)||"research-map")};await Fe({records:()=>ft,lang:()=>String(g.value||"en").split("-")[0],label:()=>La.label,mapImage:()=>qt||null}).printPacket(La,{variant:T})}catch(Fe){console.error("[research-map] packet export failed:",Fe)}finally{Oo.value=!1}}}const Dt=we(!1),It=te(()=>p.selectedFeature),Rt=te(()=>h.isDarkTheme),xa=te(()=>Jg.lightPreset==="night");function dr(){var ee;const T=Z.value;if(!T||!T.getLayer("language-family-pins"))return;const z=xa.value?"#ffffff":["case",[">",["to-number",["get","peoplePraying"],0],0],"#ffffff","#1f2937"];T.setPaintProperty("language-family-pins","circle-stroke-color",z),T.setPaintProperty("language-family-pins","circle-stroke-width",xa.value?Lv((ee=N.value)==null?void 0:ee.colorStrategy):Qh)}Ue(xa,dr,{immediate:!1}),Ue(()=>{var T;return(T=N.value)==null?void 0:T.id},dr),Ue(()=>h.theme,()=>k.applyTheme(Z.value));function $u(){k.swapTheme(Z.value)}const Nn=we(!1);let oa=null;async function hn(){if(!Nn.value)return oa||(oa=(async()=>{var T,z,ee;try{const fe=await((T=D.loadRegionsData)==null?void 0:T.call(D));fe&&Z.value&&((z=V.addRegionsLayer)==null||z.call(V,fe,"doxa-regions"),He(Z.value),Z.value.getLayer("regions-fill")&&((ee=N.value)==null?void 0:ee.id)!=="doxa-regions"&&(Z.value.setLayoutProperty("regions-fill","visibility","none"),Z.value.setLayoutProperty("regions-border","visibility","none")),Z.value.getLayer("language-family-pins")&&Z.value.moveLayer("language-family-pins")),Nn.value=!0,D.regionsData.value=null}catch(fe){console.warn("[research-map] regions layer failed:",fe)}finally{oa=null}})(),oa)}function In(T){var fe,Le;if(T===v.value)return;v.value=T,(fe=h.setActiveTab)==null||fe.call(h,T),Gt();const z=W.value.find(Fe=>Fe.id===T);if(!z||!Z.value)return;k.setLook(k.lookFor(z.colorStrategy),Z.value),z.id==="doxa-regions"&&hn();const ee=dn(z.colorStrategy);if(Z.value.getLayer("language-family-pins")&&(ee!=null&&ee.buildColorExpression)){const Fe=z.id==="doxa-regions"?"#a30000":ee.buildColorExpression();Z.value.setPaintProperty("language-family-pins","circle-color",Fe),gr(Z.value),z.id==="prayer"?V.startPrayerGlow():V.stopPrayerGlow();const Me=z.id==="doxa-regions";Z.value.getLayer("regions-fill")&&(Z.value.setLayoutProperty("regions-fill","visibility",Me?"visible":"none"),Z.value.setLayoutProperty("regions-border","visibility",Me?"visible":"none")),Z.value.getLayer("language-family-pins")&&Z.value.moveLayer("language-family-pins")}(Le=C.refreshColors)==null||Le.call(C)}function Sa(T){var Be,ct,zt;const z=T==null?void 0:T.detail;if(!z||(Oe(z),!((Be=z.coords)!=null&&Be.length)))return;const ee=z.coords;if(ee.length===1){(ct=ae.flyToCoords)==null||ct.call(ae,{longitude:ee[0][0],latitude:ee[0][1]},3);return}let fe=1/0,Le=-1/0,Fe=1/0,Me=-1/0;for(const[Qe,at]of ee)QeLe&&(Le=Qe),atMe&&(Me=at);const Ve=z.kind==="region"?2.2:3;(zt=ae.fitBounds)==null||zt.call(ae,[[fe,Fe],[Le,Me]],60,{maxZoom:Ve})}let pr=null;function _u(){const T=(p==null?void 0:p.showClusters)&&((p==null?void 0:p.clusteringMode)||"off")!=="off",z=Number(p==null?void 0:p.clusterPinOpacity);return T&&Number.isFinite(z)?Math.min(1,Math.max(0,z)):1}function wo(T,z){var Le;if(z!==void 0&&(pr=z||null),!T||!((Le=T.getLayer)!=null&&Le.call(T,"language-family-pins")))return;const ee=_u(),fe=pr?["case",pr,ee,0]:["case",["has","uniqueId"],ee,ee];try{if(JSON.stringify(T.getPaintProperty("language-family-pins","circle-opacity"))===JSON.stringify(fe))return;T.setPaintProperty("language-family-pins","circle-opacity",fe),T.setPaintProperty("language-family-pins","circle-stroke-opacity",fe),T.getLayer("language-family-pins-shadow")&&T.setPaintProperty("language-family-pins-shadow","circle-opacity",fe)}catch{}}Ue(()=>[p==null?void 0:p.clusterPinOpacity,p==null?void 0:p.clusteringMode,p==null?void 0:p.showClusters],()=>wo(Z.value));const uo={family:null,language:null,dialect:null,region:null,prayer:null,engagement:null,adoption:null};function gr(T){wo(T,null),T.setFilter("language-family-pins",null),t(T,null),V.syncGlowFilter(null),st(T,[]),T.getLayer("regions-fill")&&T.setPaintProperty("regions-fill","fill-outline-color",null),uo.family=uo.language=uo.dialect=uo.region=null,uo.prayer=uo.engagement=uo.adoption=null,h.prayerFilter&&h.setPrayerFilter(null),h.engagementFilter&&h.setEngagementFilter(null),h.adoptionFilter&&h.setAdoptionFilter(null),h.religionFilter&&h.setReligionFilter(null),C.setSelectionFilter(null),p.selectedFamily&&p.selectFamily(null),p.selectedLanguage&&p.selectLanguage(null),p.selectedDialect&&p.selectDialect(null);try{_e&&_e.selection&&_e.selection.value&&(_e.selection.value=null)}catch{}}let na=null,Pa=0;function Oe(T){var Ve,Be,ct,zt,Qe;const z=Z.value;if(!z||!z.getLayer("language-family-pins"))return;let ee,fe,Le;if(T.kind==="family")Le="family",ee="languageFamily",fe=T.familyKey;else if(T.kind==="language")Le="language",ee="language",fe=T.languageKey;else if(T.kind==="region")Le="region",ee="doxaRegion",fe=T.regionKey;else if(T.kind==="prayer")Le="prayer",ee=T.property||"peoplePraying",fe=T.expectedValue;else if(T.kind==="engagement")Le="engagement",ee=T.property||"engagementStatus",fe=T.expectedValue;else if(T.kind==="adoption")Le="adoption",ee=T.property||"adoptionStatus",fe=T.expectedValue;else if(T.kind==="religion")Le="religion",ee=T.property||"religion",fe=T.expectedValue;else if(T.kind==="dialect")Le="dialect",ee="language",fe=T.dialectKey||"";else{gr(z),Gt();for(const at of Object.keys(uo))uo[at]=null;na=null,Pa=0;return}const Fe=Date.now(),Me=`${Le}|${fe}`;if(!(na===Me&&Fe-Pa<80)){if(na=Me,Pa=Fe,uo[Le]===fe){gr(z),Gt(),na=null,Pa=0;return}for(const at of Object.keys(uo))uo[at]=null;if(uo[Le]=fe,Le==="family"?(Ve=p.selectFamily)==null||Ve.call(p,fe):Le==="region"?(Be=p.selectRegion)==null||Be.call(p,fe):Le==="language"?(ct=p.selectLanguage)==null||ct.call(p,fe):Le==="dialect"&&((zt=p.selectDialect)==null||zt.call(p,{key:fe,originalLabels:T.originalLabels||[]})),C.setSelectionFilter({property:ee,value:fe}),Le==="region"){if(z.setFilter("language-family-pins",["==",["get","doxaRegion"],fe]),t(z,["==",["get","doxaRegion"],fe]),wo(z,null),z.getLayer("regions-fill")){const at=((Qe=V.regionIsoMap)==null?void 0:Qe.value)||{},ft=Do=>String(Do).toLowerCase().replace(/[^a-z]/g,""),it=ft(fe);let qt=at[fe]||[];if(!qt.length){for(const[Do,La]of Object.entries(at))if(ft(Do)===it){qt=La;break}}st(z,qt)}}else{z.setFilter("language-family-pins",null);let at;if(Le==="prayer"){const ft=["to-number",["get",ee]];fe==="noPrayer"?at=["==",ft,0]:fe==="fullPrayer"?at=[">=",ft,un]:fe==="hasPrayer"?at=["all",[">",ft,0],["<",ft,un]]:at=["==",["get",ee],fe]}else if(Le==="engagement")at=["==",["get",ee],fe==="hasEngagement"];else if(Le==="adoption")at=["==",["get",ee],fe==="hasAdoption"];else if(Le==="religion")at=["==",["slice",["coalesce",["get",ee],""],0,1],fe];else if(T.filterExpr)at=T.filterExpr;else if(Le==="language")at=["any",["==",["get",ee],fe],["==",["slice",["get",ee],0,fe.length+1],fe+","],["in"," "+fe,["get",ee]]];else if(Le==="dialect"){const ft=T.originalLabels||[];ft.length===1?at=["==",["get",ee],ft[0]]:ft.length>1?at=["in",["get",ee],["literal",ft]]:at=["==",["get",ee],fe]}else at=["==",["get",ee],fe];wo(z,at),t(z,at),V.syncGlowFilter(at),z.getLayer("regions-fill")&&(z.setPaintProperty("regions-fill","fill-opacity",ea(.2)),z.setPaintProperty("regions-border","line-color",ea("rgba(60,60,80,0.35)")),z.setPaintProperty("regions-border","line-width",ea(.6)))}}}function eo(T,{map:z,filterLayerId:ee}){const fe=T.label;try{z.setFilter(ee,null)}catch{}const Le=Object.keys(Wo).find(Fe=>Wo[Fe]===fe);if(Le){const Fe={id:Le,label:fe,depth:0},Me=()=>{try{z.setFilter(ee,null)}catch{}pt(Fe),_e&&_e.selection&&(_e.selection.value=Fe)};v.value!=="religion"&&In("religion"),Kt(Me)}}function ko(T,{map:z,filterLayerId:ee}){const fe=T.label,Le=Be=>String(Be).toLowerCase().replace(/[^a-z0-9]/g,""),Fe=Be=>String(Be||"").replace(/\s*\((?:Region|Bloc)\)\s*$/i,""),Me=Le(fe),Ve=()=>{try{z.setFilter(ee,null)}catch{}const Be=_a(Fn.value,ct=>(ct.id.startsWith("region:")||ct.id.startsWith("block:"))&&Le(Fe(ct.label))===Me);Be&&(pt(Be),_e&&_e.selection&&(_e.selection.value=Be))};v.value!=="doxa-regions"?(In("doxa-regions"),Promise.resolve(hn()).finally(()=>Kt(Ve))):Ve()}function On(T){var ee,fe,Le,Fe;if(Array.isArray(T.bounds)&&T.bounds.length===4){const[Me,Ve,Be,ct]=T.bounds;(ee=ae.fitBounds)==null||ee.call(ae,[[Me,Ve],[Be,ct]],60)}else Array.isArray(T.center)&&T.center.length===2&&((fe=ae.flyTo)==null||fe.call(ae,T.center));const z=zv(T,D.normalizedPeopleGroups.value||[]);if(z&&B(z),z&&((Le=N.value)==null?void 0:Le.id)!=="doxa-regions"&&de.showCountry(z),z&&((Fe=N.value)==null?void 0:Fe.id)==="doxa-regions"){const Me=()=>{const Ve=_a(Fn.value,Be=>Be.id.startsWith("country:")&&(Be.isoCodes||[]).includes(z));Ve&&(pt(Ve),_e&&_e.selection&&(_e.selection.value=Ve))};Promise.resolve(hn()).finally(()=>Kt(Me))}}Ue(()=>p.filters,()=>{var T,z;(T=V.applyFilters)==null||T.call(V,p.filters),(z=C.applyFilters)==null||z.call(C,p.filters)},{deep:!0});let Eo=!1,Vo="";Ue(()=>{var T;return(T=s==null?void 0:s.value)==null?void 0:T.externalFilters},T=>{var z,ee;if(!(!T||typeof T!="object"||!p)){Eo=!0;try{if("region"in T){const fe=T.region||null;(fe||p.selectedRegion)&&((z=p.selectRegion)==null||z.call(p,fe))}if("religion"in T){const fe=String(T.religion||"").trim(),Le=fe?Object.keys(Wo).find(Fe=>String(Wo[Fe]).toLowerCase()===fe.toLowerCase()):"";fe?Le&&(v.value!=="religion"&&In("religion"),Kt(()=>h.setReligionFilter(Le))):h.religionFilter&&h.setReligionFilter(null)}if("fitSlugs"in T&&vu(T.fitSlugs),"language"in T){const fe=T.language||null;(fe||p.selectedLanguage)&&((ee=p.selectLanguage)==null||ee.call(p,fe))}}finally{Kt(()=>{Eo=!1})}}},{deep:!0,immediate:!0});let rs=null,Di=null,hr=null,ss=null;typeof window<"u"&&(window.__researchMapFilterState=rs=()=>{var T,z;return{selectedRegion:(p==null?void 0:p.selectedRegion)||"",externalRegion:((z=(T=s==null?void 0:s.value)==null?void 0:T.externalFilters)==null?void 0:z.region)||"",religionFamily:Wo[h==null?void 0:h.religionFilter]||"",selectedLanguage:(p==null?void 0:p.selectedLanguage)||""}},window.__researchMapPinOpacity=Di=()=>{var T,z;try{return((z=(T=Z.value)==null?void 0:T.getPaintProperty)==null?void 0:z.call(T,"language-family-pins","circle-opacity"))??null}catch{return null}},window.__researchMapClusterDraw=hr=()=>{var ee,fe;const T=Z.value,z={};try{for(const Le of((fe=(ee=T==null?void 0:T.getStyle)==null?void 0:ee.call(T))==null?void 0:fe.layers)||[]){if(!/^(mapbox-clusters|cluster-lines)/.test(Le.id))continue;let Fe=0;try{Fe=T.queryRenderedFeatures({layers:[Le.id]}).length}catch{Fe=-1}z[Le.id]={visibility:Le.layout&&Le.layout.visibility||"visible",rendered:Fe}}}catch{}return z},window.__researchMapVocabulary=ss=T=>{var fe;const z=((fe=D==null?void 0:D.normalizedPeopleGroups)==null?void 0:fe.value)||[],ee=new Set;for(const Le of z){if(T==="religionFamily"){const Me=Wo[String((Le==null?void 0:Le.religion)||"").charAt(0)];Me&&ee.add(Me);continue}const Fe=Le&&Le[T];typeof Fe=="string"&&Fe&&ee.add(Fe)}return[...ee].sort()});const is=Ao();function zi(){var T,z,ee,fe;try{return((fe=(ee=(z=(T=is==null?void 0:is.proxy)==null?void 0:T.$el)==null?void 0:z.getRootNode)==null?void 0:ee.call(z))==null?void 0:fe.host)||null}catch{return null}}function fr(){var ft;if(Eo||typeof window>"u")return;const T=zi();if(!T)return;const z=Wo[h==null?void 0:h.religionFilter]||"",ee=(p==null?void 0:p.selectedLanguage)||"",fe=(p==null?void 0:p.selectedDialect)||null,Le=Array.isArray(fe==null?void 0:fe.originalLabels)?fe.originalLabels.map(it=>String(it).trim()).filter(Boolean):[],Fe=((ft=D==null?void 0:D.normalizedPeopleGroups)==null?void 0:ft.value)||[],Me=it=>{const qt=it&&(it.language??it.primary_language);return String((qt&&typeof qt=="object"?qt.label:qt)||"").trim()},Ve=(it,qt)=>it===qt||it.startsWith(qt+",")||it.includes(" "+qt),Be=Le.length?Fe.filter(it=>Le.includes(Me(it))):ee?Fe.filter(it=>Ve(Me(it),ee.trim())):[],ct=[...new Set(Be.map(it=>{var qt,Do;return String(((Do=(qt=it==null?void 0:it._raw)==null?void 0:qt.primary_language)==null?void 0:Do.value)||(it!=null&&it.language&&typeof it.language=="object"?it.language.value:"")||"").trim()}).filter(Boolean))],zt=ct.length===1?ct[0]:"",Qe={region:(p==null?void 0:p.selectedRegion)||"",religion:z,language:Le.length?Le.join(" · "):ee,languageCode:zt,languageCodes:ct},at=!Qe.region&&!Qe.religion&&!Qe.language&&!Qe.languageCode;if(at&&ji){const it=typeof performance<"u"?performance.now():Date.now();if(fn||(fn=it),it-fn<$A){clearTimeout(aa),aa=setTimeout(fr,Ff);return}}fn=0,ji=!at,T.dispatchEvent(new CustomEvent("map-filtered",{detail:Qe,bubbles:!0,composed:!0}))}let aa=null,fn=0,ji=!1;function mr(){Eo||(fn=0,clearTimeout(aa),aa=setTimeout(fr,Ff))}ho(()=>clearTimeout(aa)),Ue(()=>{var T;return[p==null?void 0:p.selectedRegion,p==null?void 0:p.selectedLanguage,(T=p==null?void 0:p.selectedDialect)==null?void 0:T.key,h==null?void 0:h.religionFilter]},()=>mr()),Ue(()=>p.selectedRegion,T=>{Oe(T?{kind:"region",regionKey:T}:{kind:null})}),Ue(()=>p.selectedFamily,T=>{T?Oe({kind:"family",familyKey:T}):!p.selectedLanguage&&!p.selectedDialect&&Oe({kind:null})}),Ue(()=>p.selectedLanguage,T=>{T?Oe({kind:"language",languageKey:T}):!p.selectedFamily&&!p.selectedDialect&&Oe({kind:null})}),Ue(()=>p.selectedDialect,T=>{T!=null&&T.key?Oe({kind:"dialect",dialectKey:T.key,originalLabels:T.originalLabels||[]}):!p.selectedFamily&&!p.selectedLanguage&&Oe({kind:null})}),Ue(()=>h.prayerFilter,T=>{Oe(T?{kind:"prayer",property:"peoplePraying",expectedValue:T}:{kind:null})}),Ue(()=>h.engagementFilter,T=>{Oe(T?{kind:"engagement",property:"engagementStatus",expectedValue:T}:{kind:null})}),Ue(()=>h.adoptionFilter,T=>{Oe(T?{kind:"adoption",property:"adoptionStatus",expectedValue:T}:{kind:null})}),Ue(()=>h.religionFilter,T=>{Oe(T?{kind:"religion",property:"religion",expectedValue:T}:{kind:null})});function yu(){try{return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function vu(T){var qt,Do,La;const z=Array.isArray(T)?T.filter(Yo=>typeof Yo=="string"&&Yo):[],ee=z.length?`${z.length}:${z[0]}:${z[z.length-1]}`:"";if(ee===Vo||(Vo=ee,!z.length))return;const fe=new Set(z),Le=((qt=D==null?void 0:D.normalizedPeopleGroups)==null?void 0:qt.value)||[];let Fe=1/0,Me=1/0,Ve=-1/0,Be=-1/0,ct=0;for(const Yo of Le){if(!Yo||!fe.has(Yo.slug))continue;const _t=Number(Yo.longitude??Yo.lng),mn=Number(Yo.latitude??Yo.lat);!Number.isFinite(_t)||!Number.isFinite(mn)||(_tVe&&(Ve=_t),mn>Be&&(Be=mn),ct++)}if(!ct)return;const zt=Ve-Fe,Qe=Be-Me,at={longitude:(Fe+Ve)/2,latitude:(Me+Be)/2},ft=zt>fA?{c:at,z:mA}:ct===1||ztp.showClusters,async T=>{ra||(T&&(!p.clusteringMode||p.clusteringMode==="off")?p.clusteringMode="mst":!T&&p.clusteringMode!=="off"&&(p.clusteringMode="off"),await Bi())}),Ue(()=>p.clusteringMode,async()=>{ra||await Bi()});async function wu(T){var z,ee,fe,Le,Fe,Me;p.registerMap(q,Z.value),R1(Z.value,"mercator"),k.applyTheme(Z.value),T!=null&&T.length&&(V.addLanguageFamilyLayer(T,((z=N.value)==null?void 0:z.colorStrategy)??"languageFamily"),((ee=N.value)==null?void 0:ee.id)==="doxa-regions"&&((fe=Z.value)!=null&&fe.getLayer("language-family-pins"))&&Z.value.setPaintProperty("language-family-pins","circle-color","#4b5563"),wo(Z.value),((Le=N.value)==null?void 0:Le.id)==="prayer"&&V.startPrayerGlow(),(Fe=C.setData)==null||Fe.call(C,T),H.initialize()),((Me=N.value)==null?void 0:Me.id)==="doxa-regions"&&(typeof window<"u"&&window.requestIdleCallback?Be=>window.requestIdleCallback(Be,{timeout:2e3}):Be=>setTimeout(Be,800))(()=>{hn()}),dr(),p.setMapReady(q),Se.value=!0}let ls=null,Aa=null,br=null;function Am(T){const z=O.value;z&&(getComputedStyle(z).getPropertyValue("--map-radius").trim()||(z.style.setProperty("--map-radius","16px"),z.style.setProperty("--map-radius-sm","8px")),T>=700?(z.style.setProperty("--map-btn-size","40px"),z.style.setProperty("--map-toolbar-gap","8px"),z.style.setProperty("--map-font-md","13px"),z.style.setProperty("--map-font-sm","11px"),z.style.setProperty("--map-legend-width","380px")):T>=500?(z.style.setProperty("--map-btn-size","36px"),z.style.setProperty("--map-toolbar-gap","6px"),z.style.setProperty("--map-font-md","12px"),z.style.setProperty("--map-font-sm","10px"),z.style.setProperty("--map-legend-width","360px")):(z.style.setProperty("--map-btn-size","32px"),z.style.setProperty("--map-toolbar-gap","5px"),z.style.setProperty("--map-font-md","11px"),z.style.setProperty("--map-font-sm","10px"),z.style.setProperty("--map-legend-width","280px")))}function Gi(T){const z=O.value;if(z)try{z.dispatchEvent(new CustomEvent("dxmaps:mapinfo-pending",{bubbles:!0,composed:!0,detail:{pending:T}}))}catch{}}const Lm=()=>{!Se.value&&!Q.value&&Gi(!0)};return Ue(Q,T=>{T&&Gi(!1)}),Ro(()=>{Gi(!0),window.addEventListener("dxmaps:mapinfo-host",Lm)}),ho(()=>{window.removeEventListener("dxmaps:mapinfo-host",Lm),Se.value||Gi(!1)}),Ro(async()=>{var ee,fe,Le,Fe;(ee=h.init)==null||ee.call(h),v.value=((fe=W.value[0])==null?void 0:fe.id)??"doxa-regions",h.isMobile?(Le=h.collapseLegend)==null||Le.call(h):(Fe=h.openLegend)==null||Fe.call(h),O.value&&(Am(O.value.getBoundingClientRect().width),typeof ResizeObserver<"u"&&(ls=new ResizeObserver(Me=>{for(const Ve of Me)Am(Ve.contentRect.width)}),ls.observe(O.value))),window.addEventListener("doxa:legend-row-click",xe),window.addEventListener("legend:highlight",Sa);const T=D.loadData().catch(Me=>(console.error("[research-map] data load failed:",Me),{normalizedPeopleGroups:[]})),z=()=>!Ae.value||!Ae.value.isConnected;try{await ue()}catch(Me){if(z())return;console.error("[research-map] Map failed to initialize —",Me),Q.value=String((Me==null?void 0:Me.message)||Me);return}if(!z()){{const Me=Z.value?lt(Z.value):null;Me&&Me!==Z.value&&(Z.value=null,Z.value=Ra(Me))}if(!Z.value){console.error("[research-map] Map failed to initialize — check token and container"),Q.value=b("dashboard.map_init_failed");return}Z.value.once("style.load",async()=>{try{const{normalizedPeopleGroups:Me}=await T;await wu(Me)}catch(Me){console.error("[research-map] onMapReady failed:",Me),Q.value=String((Me==null?void 0:Me.message)||Me)}}),o(Z.value),br=()=>o(Z.value);try{Aa=new ResizeObserver(br);const Me=Z.value.getContainer&&Z.value.getContainer()||null;Me&&Aa.observe(Me);const Ve=Me?Tf(Me):null;Ve&&Aa.observe(Ve),document.body&&Aa.observe(document.body)}catch{}window.addEventListener("resize",br)}}),ho(()=>{const T=z=>{try{z()}catch(ee){console.warn("[research-map] teardown step failed",ee)}};try{T(()=>window.removeEventListener("doxa:legend-row-click",xe)),T(()=>window.removeEventListener("legend:highlight",Sa)),T(()=>{ls&&(ls.disconnect(),ls=null)}),T(()=>{Aa&&(Aa.disconnect(),Aa=null)}),T(()=>{br&&(window.removeEventListener("resize",br),br=null)}),T(()=>{var z;return(z=V.stopPrayerGlow)==null?void 0:z.call(V)}),T(()=>{var z;return(z=V.cleanup)==null?void 0:z.call(V)}),T(()=>{var z;return(z=C.cleanup)==null?void 0:z.call(C)}),T(()=>{var z;return(z=H.cleanup)==null?void 0:z.call(H)}),T(()=>{var z;return(z=p.unregisterMap)==null?void 0:z.call(p,q)}),T(()=>{typeof window>"u"||(window.__researchMapFilterState===rs&&delete window.__researchMapFilterState,window.__researchMapPinOpacity===Di&&delete window.__researchMapPinOpacity,window.__researchMapClusterDraw===hr&&delete window.__researchMapClusterDraw,window.__researchMapVocabulary===ss&&delete window.__researchMapVocabulary)})}finally{ke()}}),(T,z)=>(ne(),me("div",{ref_key:"rmRoot",ref:O,class:Ke(["rm-root",{"rm-dark":Rt.value,"dsm-dark":Rt.value}])},[K.value?(ne(),me("div",{key:0,ref_key:"tabBar",ref:ie,class:"rm-tab-bar"},[(ne(!0),me(ot,null,io(W.value,ee=>(ne(),me(ot,{key:ee.id},[R("button",{class:Ke(["rm-tab",{active:v.value===ee.id}]),onClick:fe=>In(ee.id)},ye($(ee)),11,rA),ee.sepAfter?(ne(),me("div",sA)):Re("",!0)],64))),128))],512)):Re("",!0),R("div",iA,[!Se.value&&!Q.value?(ne(),me("div",lA,ye(n("dashboard.map_loading","Research map loading…")),1)):Re("",!0),Q.value?(ne(),me("div",cA,ye(n("allPeopleGroups.loadError","The map could not be loaded."))+" "+ye(Q.value),1)):Re("",!0),R("div",{ref_key:"mapContainer",ref:Ae,class:"rm-map-canvas"},null,512),z[4]||(z[4]=R("div",{class:"map-scroll-edge map-scroll-edge--left"},null,-1)),z[5]||(z[5]=R("div",{class:"map-scroll-edge map-scroll-edge--right"},null,-1)),ge(l)!=="mapbox"?(ne(),me("div",{key:2,class:"rm-provider-badge","data-provider":ge(l)},ye(ge(f)),9,uA)):Re("",!0),Se.value&&ge(Z)&&c.value?(ne(),ut(yx,{key:3,ref_key:"geocoderRef",ref:he,"map-instance":ge(Z),"access-token":ge(i),provider:ge(l),"data-source-id":ge(x),"is-dark":Rt.value,placeholder:F.value,"active-context":I.value,onPeopleGroupResult:ge(We),onAggregateResult:ge(nt),onClear:ge(yt)},null,8,["map-instance","access-token","provider","data-source-id","is-dark","placeholder","active-context","onPeopleGroupResult","onAggregateResult","onClear"])):Re("",!0),Re("",!0),Se.value&&ge(Z)?(ne(),ut(Kk,{key:5,"has-geocoder":c.value},{default:go(()=>[dt(Hx,{"is-dark":Rt.value},null,8,["is-dark"]),dt(Yk,{map:ge(Z),"is-dark":Rt.value},null,8,["map","is-dark"]),dt(Zk,{map:ge(Z),"is-dark":Rt.value},null,8,["map","is-dark"]),dt(Jk,{map:ge(Z),"is-dark":Rt.value},null,8,["map","is-dark"]),dt(ex,{"map-container":Ae.value,"is-dark":Rt.value},null,8,["map-container","is-dark"]),dt(ox,{"is-dark":Rt.value,onToggle:$u},null,8,["is-dark"]),dt(Qn,{"is-dark":Rt.value,active:$t.value,disabled:$t.value,title:Io.value,class:"export-poster-btn","aria-busy":$t.value?"true":"false",onClick:_o},{default:go(()=>[...z[3]||(z[3]=[R("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[R("path",{d:"M12 3v12M7 10l5 5 5-5M5 21h14"})],-1)])]),_:1},8,["is-dark","active","disabled","title","aria-busy"]),L.share?(ne(),ut(Gx,{key:0,"is-dark":Rt.value,"embed-path":"doxa-research-map/research-map/index.html"},null,8,["is-dark"])):Re("",!0)]),_:1},8,["has-geocoder"])):Re("",!0),Se.value&&u.value?(ne(),ut(qk,{key:6,"legend-type":A.value,"is-dark":Rt.value},null,8,["legend-type","is-dark"])):Re("",!0),Se.value?(ne(),ut(sS,{key:7,"is-open":Dt.value,onClose:z[1]||(z[1]=ee=>Dt.value=!1),onOpenPoster:_o},{default:go(()=>[dt(FS)]),_:1},8,["is-open"])):Re("",!0),R("div",{class:"rm-legend-desktop-slot",style:Tt(d.value?{"--stl-top":d.value}:null)},[Se.value&&ge(h).legendMode==="detail"&&ge(h).selectedPeopleGroup?(ne(),ut(Rk,{key:0,"legend-type":A.value,"popup-action":w.value,"initially-collapsed":!1,"is-dark":Rt.value},null,8,["legend-type","popup-action","is-dark"])):Re("",!0),Ms(R("div",null,[Se.value?(ne(),ut(Af,{key:0,nodes:re.value,tabs:pe.value,title:Ce.value,hideTabs:se.value,columnLabel:Ee.value,progress:ge(Ie),open:Pe.value,"export-enabled":pA,onSelect:pt,onExport:co,"onUpdate:open":qe},null,8,["nodes","tabs","title","hideTabs","columnLabel","progress","open"])):Re("",!0)],512),[[ip,!(ge(h).legendMode==="detail"&&ge(h).selectedPeopleGroup)]])],4),R("div",dA,[Se.value?(ne(),ut(ge(a),{key:0,"legend-type":A.value,"popup-action":w.value,"is-dark":Rt.value},null,8,["legend-type","popup-action","is-dark"])):Re("",!0)]),Se.value&&It.value?(ne(),ut(ge(r),{key:8,feature:It.value,action:w.value,dark:Rt.value,onClose:z[2]||(z[2]=ee=>ge(p).selectFeature(null))},null,8,["feature","action","dark"])):Re("",!0)])],2))}}},Symbol.toStringTag,{value:"Module"})),yA="",vA={class:"legend-sheet-root"},wA=["src","alt"],kA={key:0,class:"pull-tab-handle"},xA=["aria-expanded","aria-label"],SA=["aria-label"],PA=["aria-expanded","aria-label"],AA={class:"collapsed-detail-title"},LA={class:"legend-content"},CA=["aria-expanded","aria-label"],TA=["aria-expanded","aria-label"],Nf=80,EA=48,MA=44,RA=24,If="--legend-sheet-h",Of=Object.freeze(Object.defineProperty({__proto__:null,default:ln({__name:"LegendMobile",props:{legendType:{type:String,required:!0},nodes:{type:Array,default:null},tabs:{type:Array,default:null},defaultTab:{type:Number,default:0},columnLabel:{type:String,default:null},title:{type:String,default:null},columns:{type:Array,default:null},isDark:{type:Boolean,default:!1},popupAction:{type:String,default:"pray",validator:e=>["pray","adopt","none"].includes(e)},disableCollapse:{type:Boolean,default:!1}},setup(e){const{t}=Ot();Vt(` +`,"research-map");const s=je("profileConfig"),i=je("mapboxToken"),l=oh(s),c=te(()=>{var T;return((T=s==null?void 0:s.value)==null?void 0:T.search)===!1?!1:l==="mapbox"}),u=te(()=>{var T;return((T=s==null?void 0:s.value)==null?void 0:T.legendTools)!==!1}),d=te(()=>c.value?null:u.value&&kf((A==null?void 0:A.value)??A)?"56px":"14px"),f=E1(l),x=je("dataSource");je("colorSet");const S=je("instanceId",null),y=(()=>{var z;const T=(z=s==null?void 0:s.value)==null?void 0:z.locale;return T&&Za.includes(T)?T:null})(),{locale:g,t:b,te:m}=Ot();y&&(g.value=y);function $(T){const z="tabs."+((T==null?void 0:T.i18nKey)||(T==null?void 0:T.id));return T&&m(z)?b(z):(T==null?void 0:T.label)??""}const p=je("mapStore"),_=je("dataStore"),h=je("uiStore"),k=c1(h),L={doxaRegions:!0,adoption:!1,share:!0,hamburgerMenu:!1,geocoderPersistAcrossTabs:!1},G=[{id:"prayer",colorStrategy:"prayerProgress",legend:"prayer",popup:"pray",feature:null},{id:"adoption",colorStrategy:"adoption",legend:"adoption",popup:"adopt",feature:"adoption"},{id:"engagement",colorStrategy:"engagement",legend:"engagement",popup:"pray",feature:null,sepAfter:!0},{id:"affinity-blocks",colorStrategy:"affinityBlock",legend:"affinity-block",popup:"pray",feature:null},{id:"doxa-regions",colorStrategy:"doxaRegion",legend:"doxa-regions",popup:"pray",feature:"doxaRegions",i18nKey:"regions"},{id:"language-families",colorStrategy:"languageFamily",legend:"language-family",popup:"pray",feature:null},{id:"religion",colorStrategy:"religion",legend:"religion",popup:"pray",feature:null}].filter(T=>!T.feature||L[T.feature]),W=te(()=>G),K=te(()=>!0),v=we(null),N=te(()=>W.value.find(T=>T.id===v.value)??W.value[0]);k.setLook(k.lookFor((Cm=N.value)==null?void 0:Cm.colorStrategy)),Ue(()=>{var T;return(T=N.value)==null?void 0:T.colorStrategy},T=>k.setLook(k.lookFor(T),Z.value));const A=te(()=>{var T;return((T=N.value)==null?void 0:T.legend)??"default"}),w=te(()=>{var T;return((T=N.value)==null?void 0:T.popup)??"pray"}),j={"language-families":"search.tabPlaceholder.languageFamilies","affinity-blocks":"search.tabPlaceholder.affinityBlocks","doxa-regions":"search.tabPlaceholder.regions",religion:"search.tabPlaceholder.religion"},F=te(()=>{var z;const T=j[(z=N.value)==null?void 0:z.id];return T&&m(T)?b(T):""}),U={"affinity-blocks":"people-groups",prayer:"people-groups",adoption:"people-groups",engagement:"people-groups","language-families":"language","doxa-regions":"regions",religion:"religion"},I=te(()=>{var T;return U[(T=N.value)==null?void 0:T.id]||""}),q=(S==null?void 0:S.value)||S||"research-map-"+Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,8);Bt("mapId",q);const O=we(null),ie=we(null),he=we(null),ve=new Map;Ue(()=>v==null?void 0:v.value,async(T,z)=>{var Le,Fe,Me;if(z!==void 0&&T!==z){z&&ve.set(z,h.legendState);const Ve=ve.get(T)||(h.isMobile?"collapsed":"open");Ve==="fullyOpen"?(Le=h.fullyOpenLegend)==null||Le.call(h):Ve==="open"?(Fe=h.openLegend)==null||Fe.call(h):(Me=h.collapseLegend)==null||Me.call(h)}await Kt();const ee=ie.value,fe=ee==null?void 0:ee.querySelector(".rm-tab.active");if(ee&&fe&&ee.scrollWidth>ee.clientWidth+1){const Ve=ee.getBoundingClientRect(),Be=fe.getBoundingClientRect(),ct=ee.scrollLeft+(Be.left-Ve.left)-(Ve.width-Be.width)/2,zt=ee.scrollWidth-ee.clientWidth,Qe=Math.max(0,Math.min(zt,ct));typeof ee.scrollTo=="function"?ee.scrollTo({left:Qe,behavior:"smooth"}):ee.scrollLeft=Qe}});const Ae=we(null),Se=we(!1),Q=we(null),{map:Z,initializeMap:ue,destroy:ke}=V1({containerRef:Ae,accessToken:i.value,provider:l,style:((Tm=s==null?void 0:s.value)==null?void 0:Tm.style)??k.bootStyle(),config:k.bootConfig,center:((Em=s==null?void 0:s.value)==null?void 0:Em.center)??qo.center??[20,10],zoom:((Mm=s==null?void 0:s.value)==null?void 0:Mm.zoom)??qo.zoom??1.8,pitch:((Rm=s==null?void 0:s.value)==null?void 0:Rm.pitch)??qo.pitch??0,bearing:((Fm=s==null?void 0:s.value)==null?void 0:Fm.bearing)??qo.bearing??0,minZoom:((Nm=s==null?void 0:s.value)==null?void 0:Nm.minZoom)??qo.minZoom??.5,maxZoom:g2}),M=new gf({sourcesConfig:ma,locale:y,profileConfig:s}),D=Yv({mapId:q,dataSourceId:x.value,dataSourceManager:M,dataStore:_,markRaw:T=>T});async function B(T){const z=String(T||"").trim().toUpperCase();if(z.length!==3)return;await hn();const ee=Z.value;if(!ee||!ee.getLayer("regions-fill"))return;ee.setLayoutProperty("regions-fill","visibility","visible"),ee.setLayoutProperty("regions-border","visibility","visible");const fe=["literal",[z]];ee.setPaintProperty("regions-fill","fill-opacity",["case",["in",["get","iso_3166_1_alpha_3"],fe],.3,.02]),ee.setPaintProperty("regions-border","line-color",["case",["in",["get","iso_3166_1_alpha_3"],fe],"#111827","rgba(60,60,80,0.15)"]),ee.setPaintProperty("regions-border","line-width",["case",["in",["get","iso_3166_1_alpha_3"],fe],2.5,.3]),ee.getLayer("language-family-pins")&&ee.moveLayer("language-family-pins")}const V=Ev({getMap:()=>Z.value,mapId:q,getLanguageFamilyColor:T=>{var ee,fe;const z=dn((ee=N.value)==null?void 0:ee.colorStrategy);return((fe=z==null?void 0:z.colors)==null?void 0:fe[T])??(z==null?void 0:z.fallback)??"#7c8cf8"},getNormalizedPeopleGroups:()=>D.normalizedPeopleGroups.value||[]});Xh({getMap:()=>Z.value,mapId:q,getLanguageFamilyColor:()=>"#7c8cf8",getNormalizedPeopleGroups:()=>D.normalizedPeopleGroups.value||[]});const ae=Fv({getMap:()=>Z.value,mapId:q,mapStore:p,defaultCenter:((Im=s==null?void 0:s.value)==null?void 0:Im.center)??[20,10],defaultZoom:((Om=s==null?void 0:s.value)==null?void 0:Om.zoom)??1.8}),H=Iv({getMap:()=>Z.value,getActivePinColor:T=>{var ee,fe;const z=dn(((ee=N.value)==null?void 0:ee.colorStrategy)??"languageFamily");return((fe=z==null?void 0:z.getColor)==null?void 0:fe.call(z,T))??"#1a1a1a"}});let ce=null,be=null;function E(){return ce?Promise.resolve(ce):(be||(be=Ft(()=>Promise.resolve().then(()=>B2),void 0).then(T=>(ce=T.useMapClustering({getMap:()=>Z.value,mapId:q,mapStore:p,getPeopleGroups:()=>D.normalizedPeopleGroups.value||[],getClusterColor:()=>{var z,ee;return((ee=dn((z=N.value)==null?void 0:z.colorStrategy))==null?void 0:ee.fallback)??"#7c8cf8"}}),ce))),be)}const C={setData(T){var z;(z=ce==null?void 0:ce.setData)==null||z.call(ce,T)},applyFilters(T){var z;(z=ce==null?void 0:ce.applyFilters)==null||z.call(ce,T)},refreshColors(){var T;(T=ce==null?void 0:ce.refreshColors)==null||T.call(ce)},cleanup(){var T;(T=ce==null?void 0:ce.cleanup)==null||T.call(ce)},async setEnabled(T){var z,ee;(ee=(z=await E()).setEnabled)==null||ee.call(z,T)},async setMode(T){var z,ee;(ee=(z=await E()).setMode)==null||ee.call(z,T)},_pendingSelectionFilter:null,setSelectionFilter(T){this._pendingSelectionFilter=T||null,ce!=null&&ce.setSelectionFilter&&ce.setSelectionFilter(T)},flushSelectionFilter(){ce!=null&&ce.setSelectionFilter&&ce.setSelectionFilter(this._pendingSelectionFilter)}},J=ts({});Bt("normalizedPeopleGroups",D.normalizedPeopleGroups);const de=Gv(()=>Z.value),_e=NS(q);IS(_e);const $e=a2({map:Z,activeTab:N,countryOutline:de,regionIdle:ea,mapFly:ae,pplrInstance:_e,mapId:q}),X=$e.clearCountryHighlight,oe=$e.flatItemsToStlNodes,xe=$e.onLegendRowClick,Te=$e.bridgeSelection,{onPeopleGroupResult:We,onAggregateResult:nt,onClear:yt,clearGeocoderProgrammatic:Gt}=Zv({map:Z,geocoderRef:he,clustering:C,mapStore:p,uiStore:h,mapLayers:V,pplrInstance:_e,onSemanticTreeSelect:pt,switchTab:In,activeTabId:v,clearAllHighlights:gr,clearCountryHighlight:X,mapId:q,legendRouters:{country:On,region:ko,religion:eo}});_e.activeTab.value=1;function Jt(T){return T==="affinity-block"?0:T==="language-family"?1:0}Ue(A,T=>{_e.activeTab.value=Jt(T)});const kt={get value(){return D.normalizedPeopleGroups.value||[]}},{langTree:St}=Zc(kt),Co=[{id:"family",info:!0},{id:"language",info:!0},{id:"dialect",info:!0}],{affinityTree:Ko}=Lf(kt),ur=[{id:"bloc",info:!0},{id:"cluster",info:!0},{id:"group",info:!0},{id:"pgic",info:!0}],{regionsTree:Fn}=Cf(kt),Y=[{id:"region",info:!0},{id:"block",info:!0},{id:"country",info:!0}],le=ts(As(()=>A.value),Ti),Ie=le.progress;Bt("legendProgress",Ie);const ze=te(()=>["prayer","engagement","adoption","religion"].includes(A.value)),re=te(()=>ze.value?oe(le.items.value):A.value==="affinity-block"?Ko.value:A.value==="doxa-regions"?Fn.value:St.value),pe=te(()=>ze.value?null:A.value==="affinity-block"?ur:A.value==="doxa-regions"?Y:Co),se=te(()=>ze.value),Ee=te(()=>A.value==="religion"?b("legend.colLabel.religion"):A.value==="prayer"?b("legend.colLabel.prayer"):A.value==="engagement"?b("legend.colLabel.engagement"):A.value==="adoption"?b("legend.colLabel.adoption"):ze.value?b("legend.colLabel.status"):""),Pe=te(()=>h.legendState!=="collapsed");function qe(T){T?h.openLegend():h.collapseLegend()}const Ce=te(()=>ze.value?b("legend.titleBar.legend"):A.value==="affinity-block"?b("legend.titleBar.peopleGroups"):A.value==="doxa-regions"?b("legend.titleBar.wagfRegions"):b("legend.titleBar.languages"));Bt("onSemanticTreeSelect",T=>pt(T)),Bt("getActivePinColor",T=>{var ee,fe;const z=dn(((ee=N.value)==null?void 0:ee.colorStrategy)??"languageFamily");return((fe=z==null?void 0:z.getColor)==null?void 0:fe.call(z,T))??"#1a1a1a"});const Ge=["case",["has","iso_3166_1_alpha_3"],.7,.7],Je=["case",["has","iso_3166_1_alpha_3"],"rgba(60,60,80,0.35)","rgba(60,60,80,0.35)"],De=["case",["has","iso_3166_1_alpha_3"],.6,.6];function He(T){if(!T||!T.getLayer("regions-fill"))return;const z=ea,ee=Fe=>Array.isArray(Fe)&&(Fe[0]==="get"||Fe[0]==="has"||Fe[0]==="feature-state"||Fe.some(ee)),fe=Fe=>Array.isArray(Fe)&&(Fe[0]==="zoom"||Fe.some(fe)),Le=(Fe,Me)=>{if(!T.getLayer(Fe))return;const Ve=T.getPaintProperty(Fe,Me);Ve!=null&&(ee(Ve)||fe(Ve)||T.setPaintProperty(Fe,Me,z(Ve)))};try{Le("regions-fill","fill-opacity"),Le("regions-border","line-color"),Le("regions-border","line-width")}catch{}}function st(T,z){if(!T||!T.getLayer("regions-fill"))return;const ee=Array.isArray(z)?[...new Set(z.filter(Boolean).map(Be=>String(Be).toUpperCase()))].sort():[],fe=["literal",ee],Le=ee.length?["case",["in",["get","iso_3166_1_alpha_3"],fe],.85,.15]:Ge,Fe=ee.length?["case",["in",["get","iso_3166_1_alpha_3"],fe],"#111827","rgba(60,60,80,0.15)"]:Je,Me=ee.length?["case",["in",["get","iso_3166_1_alpha_3"],fe],2.5,.3]:De,Ve=(Be,ct,zt)=>{T.getLayer(Be)&&JSON.stringify(T.getPaintProperty(Be,ct))!==JSON.stringify(zt)&&T.setPaintProperty(Be,ct,zt)};try{Ve("regions-fill","fill-opacity",Le),Ve("regions-border","line-color",Fe),Ve("regions-border","line-width",Me)}catch{}}function pt(T){var fe,Le,Fe,Me,Ve,Be,ct,zt;const z=Z.value;if(T){const Qe=ze.value?n2(T,A.value):null,at=((fe=N.value)==null?void 0:fe.id)==="doxa-regions",ft=Qe?{matchExpr:Qe}:{};at&&(ft.regionPolygonSource="regions"),(Le=ae.zoomToLegendRow)==null||Le.call(ae,T,Object.keys(ft).length?ft:void 0)}if(!T){if(ze.value){const Qe=A.value;Qe==="prayer"?h.setPrayerFilter(null):Qe==="engagement"?h.setEngagementFilter(null):Qe==="adoption"?h.setAdoptionFilter(null):Qe==="religion"&&h.setReligionFilter(null)}if(z&&z.getLayer("language-family-pins")){try{z.setFilter("language-family-pins",null)}catch{}t(z,null),wo(z,null),V.syncGlowFilter(null)}z&&z.getLayer("regions-fill")&&(z.setPaintProperty("regions-fill","fill-opacity",ea(.7)),z.setPaintProperty("regions-border","line-color",ea("rgba(60,60,80,0.35)")),z.setPaintProperty("regions-border","line-width",ea(.6))),p.selectedFamily&&p.selectFamily(null),p.selectedLanguage&&p.selectLanguage(null),p.selectedDialect&&((Fe=p.selectDialect)==null||Fe.call(p,null)),p.selectedRegion&&((Me=p.selectRegion)==null||Me.call(p,null)),Gt();return}if(ze.value){const Qe=A.value;Qe==="prayer"?h.setPrayerFilter(T.id):Qe==="engagement"?h.setEngagementFilter(T.id):Qe==="adoption"?h.setAdoptionFilter(T.id):Qe==="religion"&&h.setReligionFilter(T.id);return}if(z&&z.getLayer("language-family-pins")&&T.filter){try{z.setFilter("language-family-pins",T.filter)}catch{}t(z,T.filter),wo(z,null),V.syncGlowFilter(T.filter)}const ee=String(T.id||"");if(ee.startsWith("fam:"))(Ve=p.selectFamily)==null||Ve.call(p,T.label);else if(ee.startsWith("lang:"))(Be=p.selectLanguage)==null||Be.call(p,T.label);else if(ee.startsWith("dial:"))(ct=p.selectDialect)==null||ct.call(p,{key:ee.slice(5),originalLabels:T.originalLabels||[]});else if(ee.startsWith("bloc:")||ee.startsWith("cluster:")||ee.startsWith("pg:")||ee.startsWith("pgic:")){if(z&&z.getLayer("language-family-pins")&&T.filter){try{z.setFilter("language-family-pins",null)}catch{}t(z,T.filter),wo(z,T.filter),V.syncGlowFilter(T.filter)}}else if(ee.startsWith("region:")||ee.startsWith("block:")||ee.startsWith("country:")){if(z&&z.getLayer("language-family-pins")&&T.filter){try{z.setFilter("language-family-pins",T.filter)}catch{}t(z,T.filter),wo(z,null)}ee.startsWith("region:")&&((zt=p.selectRegion)==null||zt.call(p,ee.slice(7))),ee.startsWith("region:")||st(z,T.isoCodes||[])}}Ue(()=>h.theme,T=>{_e.theme.value=T==="dark"?"dark":"light"},{immediate:!0}),Ue(()=>p.selectedFamily,T=>{if(!T)return Te("fam",null);const z=_a(St.value,ee=>ee.id.startsWith("fam:")&&ee.label===T);z&&Te("fam",{...z,depth:0})}),Ue(()=>p.selectedLanguage,T=>{if(!T)return Te("lang",null);const z=_a(St.value,ee=>ee.id.startsWith("lang:")&&ee.label===T);z&&Te("lang",{...z,depth:1})}),Ue(()=>p.selectedDialect,T=>{if(!(T!=null&&T.key))return Te("dial",null);const z=`dial:${T.key}`,ee=_a(St.value,fe=>fe.id===z);ee&&Te("dial",{...ee,depth:2})}),Ue(()=>p.selectedRegion,T=>{if(!T)return Te("region",null);const z=_a(Fn.value,ee=>ee.id===`region:${T}`);z&&Te("region",{...z,depth:0})});function vt(T){var fe;const z=le.items.value||[];return(z.length?z:((fe=J==null?void 0:J.items)==null?void 0:fe.value)||[]).flatMap(Le=>[Le,...Le.children||[]]).map(Le=>({label:Le.label,color:Le.color})).filter(Le=>Le.label)}const $t=we(!1);async function _o(){var T,z;if(!$t.value){$t.value=!0;try{const[{useMapPoster:ee},{defaultPosterSpec:fe},{printImageBlob:Le}]=await Promise.all([Ft(()=>Promise.resolve().then(()=>tm),void 0),Ft(()=>Promise.resolve().then(()=>qf),void 0),Ft(()=>Promise.resolve().then(()=>iA),void 0)]),Fe=ee(()=>Z.value),Me=((z=(T=Z.value)==null?void 0:T.getContainer)==null?void 0:z.call(T))||null,Ve=!!Me&&Me.clientWidth>Me.clientHeight,Be=fe({widthIn:Ve?11:8.5,heightIn:Ve?8.5:11,dpi:200,orientation:Ve?"landscape":"portrait"}),ct=$(N.value)||Ce.value||"Doxa Map";Be.dir=["ar","fa","he","ur"].includes(String(g.value||"").split("-")[0])?"rtl":"ltr",Be.layout="poster",Be.slots.title={...Be.slots.title,text:ct};const zt=vt(!0);Be.slots.legend={...Be.slots.legend,rows:zt,title:Ce.value},Be.slots.scaleBar=!1,Be.slots.north=!1;const Qe=M1(Z.value)==="maplibre";Be.slots.footer={...Be.slots.footer,left:"pray.doxa.life",right:new Date().toISOString().slice(0,10),attribution:Qe?"© OpenFreeMap © OpenMapTiles © OpenStreetMap":"© Mapbox © OpenStreetMap"};const at=await Fe.render(Be,"png");Le(at,{widthIn:Be.widthIn??8.5,heightIn:Be.heightIn??11,title:ct,alt:ct})||console.error("[research-map] poster print: the host blocked the print frame")}catch(ee){console.error("[research-map] poster export failed:",ee)}finally{$t.value=!1}}}const Io=te(()=>String(b("controls.export_poster")||"Export poster…"));function co(T){const[z,ee]=String(T).split(":");if(z==="poster")return _o();if(z==="packet")return To(ee||"full")}Bt("onLegendExport",co),Bt("onLegendExport",co);const Oo=we(!1),vo=te(()=>$t.value||Oo.value);Bt("legendExportBusy",vo);async function To(T="full"){var z,ee,fe,Le;if(!Oo.value){Oo.value=!0;try{const[{usePosterPrints:Fe},{defaultPosterSpec:Me},{useMapPoster:Ve},{selectedPinIds:Be}]=await Promise.all([Ft(()=>Promise.resolve().then(()=>_A),void 0),Ft(()=>Promise.resolve().then(()=>qf),void 0),Ft(()=>Promise.resolve().then(()=>tm),void 0),Ft(()=>Promise.resolve().then(()=>Rv),void 0)]),ct=D.normalizedPeopleGroups.value||[],zt=[((ee=(z=Z.value)==null?void 0:z.getFilter)==null?void 0:ee.call(z,"language-family-pins"))||null,pr].filter(Boolean);let Qe=ct;if(zt.length){const _t=Be(Z.value,{expressions:zt}),mn=ct.filter(Hi=>_t.has(String(Hi.uniqueId??Hi.id??"")));mn.length?Qe=mn:console.warn(`[research-map] packet: ${_t.size} pin(s) selected but no rows matched; printing the full list`)}const at=Qe.length;Qe.length>50&&(console.warn(`[research-map] packet truncated ${Qe.length} → 50 people groups`),Qe=Qe.slice(0,50));const ft=Qe.map(_t=>({slug:String(_t.slug||_t.uniqueId||_t.id||""),name:_t.name,population:_t.population,religion:_t.religionName||_t.religionLabel||_t.religion||"",country_code:_t.countryName||_t.countryIsoLabel||_t.country||_t.countryIso||"",image_url:_t.imageUrl||_t.image_url||""})),it=Me({widthIn:8.27,heightIn:11.69,dpi:150,orientation:"portrait"});it.slots.title={...it.slots.title,text:Ce.value||"Doxa Map"},it.slots.legend={...it.slots.legend,rows:vt(!0),title:Ce.value};let qt="";if(T!=="cards")try{const _t=await Ve(()=>Z.value).render(it,"png");qt=await new Promise((mn,Hi)=>{const Ui=new FileReader;Ui.onload=()=>mn(String(Ui.result)),Ui.onerror=Hi,Ui.readAsDataURL(_t)})}catch(_t){console.warn("[research-map] packet map page skipped:",(_t==null?void 0:_t.message)||_t)}const Do=Ce.value||$(N.value)||"Doxa Map",La={id:String(((fe=N.value)==null?void 0:fe.id)||"research-map"),label:at>Qe.length?`${Do} — ⁦${Qe.length} / ${at}⁩`:Do,zoneKey:String(((Le=N.value)==null?void 0:Le.id)||"research-map")};await Fe({records:()=>ft,lang:()=>String(g.value||"en").split("-")[0],label:()=>La.label,mapImage:()=>qt||null}).printPacket(La,{variant:T})}catch(Fe){console.error("[research-map] packet export failed:",Fe)}finally{Oo.value=!1}}}const Dt=we(!1),It=te(()=>p.selectedFeature),Rt=te(()=>h.isDarkTheme),xa=te(()=>Jg.lightPreset==="night");function dr(){var ee;const T=Z.value;if(!T||!T.getLayer("language-family-pins"))return;const z=xa.value?"#ffffff":["case",[">",["to-number",["get","peoplePraying"],0],0],"#ffffff","#1f2937"];T.setPaintProperty("language-family-pins","circle-stroke-color",z),T.setPaintProperty("language-family-pins","circle-stroke-width",xa.value?Lv((ee=N.value)==null?void 0:ee.colorStrategy):Qh)}Ue(xa,dr,{immediate:!1}),Ue(()=>{var T;return(T=N.value)==null?void 0:T.id},dr),Ue(()=>h.theme,()=>k.applyTheme(Z.value));function $u(){k.swapTheme(Z.value)}const Nn=we(!1);let oa=null;async function hn(){if(!Nn.value)return oa||(oa=(async()=>{var T,z,ee;try{const fe=await((T=D.loadRegionsData)==null?void 0:T.call(D));fe&&Z.value&&((z=V.addRegionsLayer)==null||z.call(V,fe,"doxa-regions"),He(Z.value),Z.value.getLayer("regions-fill")&&((ee=N.value)==null?void 0:ee.id)!=="doxa-regions"&&(Z.value.setLayoutProperty("regions-fill","visibility","none"),Z.value.setLayoutProperty("regions-border","visibility","none")),Z.value.getLayer("language-family-pins")&&Z.value.moveLayer("language-family-pins")),Nn.value=!0,D.regionsData.value=null}catch(fe){console.warn("[research-map] regions layer failed:",fe)}finally{oa=null}})(),oa)}function In(T){var fe,Le;if(T===v.value)return;v.value=T,(fe=h.setActiveTab)==null||fe.call(h,T),Gt();const z=W.value.find(Fe=>Fe.id===T);if(!z||!Z.value)return;k.setLook(k.lookFor(z.colorStrategy),Z.value),z.id==="doxa-regions"&&hn();const ee=dn(z.colorStrategy);if(Z.value.getLayer("language-family-pins")&&(ee!=null&&ee.buildColorExpression)){const Fe=z.id==="doxa-regions"?"#a30000":ee.buildColorExpression();Z.value.setPaintProperty("language-family-pins","circle-color",Fe),gr(Z.value),z.id==="prayer"?V.startPrayerGlow():V.stopPrayerGlow();const Me=z.id==="doxa-regions";Z.value.getLayer("regions-fill")&&(Z.value.setLayoutProperty("regions-fill","visibility",Me?"visible":"none"),Z.value.setLayoutProperty("regions-border","visibility",Me?"visible":"none")),Z.value.getLayer("language-family-pins")&&Z.value.moveLayer("language-family-pins")}(Le=C.refreshColors)==null||Le.call(C)}function Sa(T){var Be,ct,zt;const z=T==null?void 0:T.detail;if(!z||(Oe(z),!((Be=z.coords)!=null&&Be.length)))return;const ee=z.coords;if(ee.length===1){(ct=ae.flyToCoords)==null||ct.call(ae,{longitude:ee[0][0],latitude:ee[0][1]},3);return}let fe=1/0,Le=-1/0,Fe=1/0,Me=-1/0;for(const[Qe,at]of ee)QeLe&&(Le=Qe),atMe&&(Me=at);const Ve=z.kind==="region"?2.2:3;(zt=ae.fitBounds)==null||zt.call(ae,[[fe,Fe],[Le,Me]],60,{maxZoom:Ve})}let pr=null;function _u(){const T=(p==null?void 0:p.showClusters)&&((p==null?void 0:p.clusteringMode)||"off")!=="off",z=Number(p==null?void 0:p.clusterPinOpacity);return T&&Number.isFinite(z)?Math.min(1,Math.max(0,z)):1}function wo(T,z){var Le;if(z!==void 0&&(pr=z||null),!T||!((Le=T.getLayer)!=null&&Le.call(T,"language-family-pins")))return;const ee=_u(),fe=pr?["case",pr,ee,0]:["case",["has","uniqueId"],ee,ee];try{if(JSON.stringify(T.getPaintProperty("language-family-pins","circle-opacity"))===JSON.stringify(fe))return;T.setPaintProperty("language-family-pins","circle-opacity",fe),T.setPaintProperty("language-family-pins","circle-stroke-opacity",fe),T.getLayer("language-family-pins-shadow")&&T.setPaintProperty("language-family-pins-shadow","circle-opacity",fe)}catch{}}Ue(()=>[p==null?void 0:p.clusterPinOpacity,p==null?void 0:p.clusteringMode,p==null?void 0:p.showClusters],()=>wo(Z.value));const uo={family:null,language:null,dialect:null,region:null,prayer:null,engagement:null,adoption:null};function gr(T){wo(T,null),T.setFilter("language-family-pins",null),t(T,null),V.syncGlowFilter(null),st(T,[]),T.getLayer("regions-fill")&&T.setPaintProperty("regions-fill","fill-outline-color",null),uo.family=uo.language=uo.dialect=uo.region=null,uo.prayer=uo.engagement=uo.adoption=null,h.prayerFilter&&h.setPrayerFilter(null),h.engagementFilter&&h.setEngagementFilter(null),h.adoptionFilter&&h.setAdoptionFilter(null),h.religionFilter&&h.setReligionFilter(null),C.setSelectionFilter(null),p.selectedFamily&&p.selectFamily(null),p.selectedLanguage&&p.selectLanguage(null),p.selectedDialect&&p.selectDialect(null);try{_e&&_e.selection&&_e.selection.value&&(_e.selection.value=null)}catch{}}let na=null,Pa=0;function Oe(T){var Ve,Be,ct,zt,Qe;const z=Z.value;if(!z||!z.getLayer("language-family-pins"))return;let ee,fe,Le;if(T.kind==="family")Le="family",ee="languageFamily",fe=T.familyKey;else if(T.kind==="language")Le="language",ee="language",fe=T.languageKey;else if(T.kind==="region")Le="region",ee="doxaRegion",fe=T.regionKey;else if(T.kind==="prayer")Le="prayer",ee=T.property||"peoplePraying",fe=T.expectedValue;else if(T.kind==="engagement")Le="engagement",ee=T.property||"engagementStatus",fe=T.expectedValue;else if(T.kind==="adoption")Le="adoption",ee=T.property||"adoptionStatus",fe=T.expectedValue;else if(T.kind==="religion")Le="religion",ee=T.property||"religion",fe=T.expectedValue;else if(T.kind==="dialect")Le="dialect",ee="language",fe=T.dialectKey||"";else{gr(z),Gt();for(const at of Object.keys(uo))uo[at]=null;na=null,Pa=0;return}const Fe=Date.now(),Me=`${Le}|${fe}`;if(!(na===Me&&Fe-Pa<80)){if(na=Me,Pa=Fe,uo[Le]===fe){gr(z),Gt(),na=null,Pa=0;return}for(const at of Object.keys(uo))uo[at]=null;if(uo[Le]=fe,Le==="family"?(Ve=p.selectFamily)==null||Ve.call(p,fe):Le==="region"?(Be=p.selectRegion)==null||Be.call(p,fe):Le==="language"?(ct=p.selectLanguage)==null||ct.call(p,fe):Le==="dialect"&&((zt=p.selectDialect)==null||zt.call(p,{key:fe,originalLabels:T.originalLabels||[]})),C.setSelectionFilter({property:ee,value:fe}),Le==="region"){if(z.setFilter("language-family-pins",["==",["get","doxaRegion"],fe]),t(z,["==",["get","doxaRegion"],fe]),wo(z,null),z.getLayer("regions-fill")){const at=((Qe=V.regionIsoMap)==null?void 0:Qe.value)||{},ft=Do=>String(Do).toLowerCase().replace(/[^a-z]/g,""),it=ft(fe);let qt=at[fe]||[];if(!qt.length){for(const[Do,La]of Object.entries(at))if(ft(Do)===it){qt=La;break}}st(z,qt)}}else{z.setFilter("language-family-pins",null);let at;if(Le==="prayer"){const ft=["to-number",["get",ee]];fe==="noPrayer"?at=["==",ft,0]:fe==="fullPrayer"?at=[">=",ft,un]:fe==="hasPrayer"?at=["all",[">",ft,0],["<",ft,un]]:at=["==",["get",ee],fe]}else if(Le==="engagement")at=["==",["get",ee],fe==="hasEngagement"];else if(Le==="adoption")at=["==",["get",ee],fe==="hasAdoption"];else if(Le==="religion")at=["==",["slice",["coalesce",["get",ee],""],0,1],fe];else if(T.filterExpr)at=T.filterExpr;else if(Le==="language")at=["any",["==",["get",ee],fe],["==",["slice",["get",ee],0,fe.length+1],fe+","],["in"," "+fe,["get",ee]]];else if(Le==="dialect"){const ft=T.originalLabels||[];ft.length===1?at=["==",["get",ee],ft[0]]:ft.length>1?at=["in",["get",ee],["literal",ft]]:at=["==",["get",ee],fe]}else at=["==",["get",ee],fe];wo(z,at),t(z,at),V.syncGlowFilter(at),z.getLayer("regions-fill")&&(z.setPaintProperty("regions-fill","fill-opacity",ea(.2)),z.setPaintProperty("regions-border","line-color",ea("rgba(60,60,80,0.35)")),z.setPaintProperty("regions-border","line-width",ea(.6)))}}}function eo(T,{map:z,filterLayerId:ee}){const fe=T.label;try{z.setFilter(ee,null)}catch{}const Le=Object.keys(Wo).find(Fe=>Wo[Fe]===fe);if(Le){const Fe={id:Le,label:fe,depth:0},Me=()=>{try{z.setFilter(ee,null)}catch{}pt(Fe),_e&&_e.selection&&(_e.selection.value=Fe)};v.value!=="religion"&&In("religion"),Kt(Me)}}function ko(T,{map:z,filterLayerId:ee}){const fe=T.label,Le=Be=>String(Be).toLowerCase().replace(/[^a-z0-9]/g,""),Fe=Be=>String(Be||"").replace(/\s*\((?:Region|Bloc)\)\s*$/i,""),Me=Le(fe),Ve=()=>{try{z.setFilter(ee,null)}catch{}const Be=_a(Fn.value,ct=>(ct.id.startsWith("region:")||ct.id.startsWith("block:"))&&Le(Fe(ct.label))===Me);Be&&(pt(Be),_e&&_e.selection&&(_e.selection.value=Be))};v.value!=="doxa-regions"?(In("doxa-regions"),Promise.resolve(hn()).finally(()=>Kt(Ve))):Ve()}function On(T){var ee,fe,Le,Fe;if(Array.isArray(T.bounds)&&T.bounds.length===4){const[Me,Ve,Be,ct]=T.bounds;(ee=ae.fitBounds)==null||ee.call(ae,[[Me,Ve],[Be,ct]],60)}else Array.isArray(T.center)&&T.center.length===2&&((fe=ae.flyTo)==null||fe.call(ae,T.center));const z=zv(T,D.normalizedPeopleGroups.value||[]);if(z&&B(z),z&&((Le=N.value)==null?void 0:Le.id)!=="doxa-regions"&&de.showCountry(z),z&&((Fe=N.value)==null?void 0:Fe.id)==="doxa-regions"){const Me=()=>{const Ve=_a(Fn.value,Be=>Be.id.startsWith("country:")&&(Be.isoCodes||[]).includes(z));Ve&&(pt(Ve),_e&&_e.selection&&(_e.selection.value=Ve))};Promise.resolve(hn()).finally(()=>Kt(Me))}}Ue(()=>p.filters,()=>{var T,z;(T=V.applyFilters)==null||T.call(V,p.filters),(z=C.applyFilters)==null||z.call(C,p.filters)},{deep:!0});let Eo=!1,Vo="";Ue(()=>{var T;return(T=s==null?void 0:s.value)==null?void 0:T.externalFilters},T=>{var z,ee;if(!(!T||typeof T!="object"||!p)){Eo=!0;try{if("region"in T){const fe=T.region||null;(fe||p.selectedRegion)&&((z=p.selectRegion)==null||z.call(p,fe))}if("religion"in T){const fe=String(T.religion||"").trim(),Le=fe?Object.keys(Wo).find(Fe=>String(Wo[Fe]).toLowerCase()===fe.toLowerCase()):"";fe?Le&&(v.value!=="religion"&&In("religion"),Kt(()=>h.setReligionFilter(Le))):h.religionFilter&&h.setReligionFilter(null)}if("fitSlugs"in T&&vu(T.fitSlugs),"language"in T){const fe=T.language||null;(fe||p.selectedLanguage)&&((ee=p.selectLanguage)==null||ee.call(p,fe))}}finally{Kt(()=>{Eo=!1})}}},{deep:!0,immediate:!0});let rs=null,Di=null,hr=null,ss=null;typeof window<"u"&&(window.__researchMapFilterState=rs=()=>{var T,z;return{selectedRegion:(p==null?void 0:p.selectedRegion)||"",externalRegion:((z=(T=s==null?void 0:s.value)==null?void 0:T.externalFilters)==null?void 0:z.region)||"",religionFamily:Wo[h==null?void 0:h.religionFilter]||"",selectedLanguage:(p==null?void 0:p.selectedLanguage)||""}},window.__researchMapPinOpacity=Di=()=>{var T,z;try{return((z=(T=Z.value)==null?void 0:T.getPaintProperty)==null?void 0:z.call(T,"language-family-pins","circle-opacity"))??null}catch{return null}},window.__researchMapClusterDraw=hr=()=>{var ee,fe;const T=Z.value,z={};try{for(const Le of((fe=(ee=T==null?void 0:T.getStyle)==null?void 0:ee.call(T))==null?void 0:fe.layers)||[]){if(!/^(mapbox-clusters|cluster-lines)/.test(Le.id))continue;let Fe=0;try{Fe=T.queryRenderedFeatures({layers:[Le.id]}).length}catch{Fe=-1}z[Le.id]={visibility:Le.layout&&Le.layout.visibility||"visible",rendered:Fe}}}catch{}return z},window.__researchMapVocabulary=ss=T=>{var fe;const z=((fe=D==null?void 0:D.normalizedPeopleGroups)==null?void 0:fe.value)||[],ee=new Set;for(const Le of z){if(T==="religionFamily"){const Me=Wo[String((Le==null?void 0:Le.religion)||"").charAt(0)];Me&&ee.add(Me);continue}const Fe=Le&&Le[T];typeof Fe=="string"&&Fe&&ee.add(Fe)}return[...ee].sort()});const is=Ao();function zi(){var T,z,ee,fe;try{return((fe=(ee=(z=(T=is==null?void 0:is.proxy)==null?void 0:T.$el)==null?void 0:z.getRootNode)==null?void 0:ee.call(z))==null?void 0:fe.host)||null}catch{return null}}function fr(){var ft;if(Eo||typeof window>"u")return;const T=zi();if(!T)return;const z=Wo[h==null?void 0:h.religionFilter]||"",ee=(p==null?void 0:p.selectedLanguage)||"",fe=(p==null?void 0:p.selectedDialect)||null,Le=Array.isArray(fe==null?void 0:fe.originalLabels)?fe.originalLabels.map(it=>String(it).trim()).filter(Boolean):[],Fe=((ft=D==null?void 0:D.normalizedPeopleGroups)==null?void 0:ft.value)||[],Me=it=>{const qt=it&&(it.language??it.primary_language);return String((qt&&typeof qt=="object"?qt.label:qt)||"").trim()},Ve=(it,qt)=>it===qt||it.startsWith(qt+",")||it.includes(" "+qt),Be=Le.length?Fe.filter(it=>Le.includes(Me(it))):ee?Fe.filter(it=>Ve(Me(it),ee.trim())):[],ct=[...new Set(Be.map(it=>{var qt,Do;return String(((Do=(qt=it==null?void 0:it._raw)==null?void 0:qt.primary_language)==null?void 0:Do.value)||(it!=null&&it.language&&typeof it.language=="object"?it.language.value:"")||"").trim()}).filter(Boolean))],zt=ct.length===1?ct[0]:"",Qe={region:(p==null?void 0:p.selectedRegion)||"",religion:z,language:Le.length?Le.join(" · "):ee,languageCode:zt,languageCodes:ct},at=!Qe.region&&!Qe.religion&&!Qe.language&&!Qe.languageCode;if(at&&ji){const it=typeof performance<"u"?performance.now():Date.now();if(fn||(fn=it),it-fn<$2){clearTimeout(aa),aa=setTimeout(fr,Ff);return}}fn=0,ji=!at,T.dispatchEvent(new CustomEvent("map-filtered",{detail:Qe,bubbles:!0,composed:!0}))}let aa=null,fn=0,ji=!1;function mr(){Eo||(fn=0,clearTimeout(aa),aa=setTimeout(fr,Ff))}ho(()=>clearTimeout(aa)),Ue(()=>{var T;return[p==null?void 0:p.selectedRegion,p==null?void 0:p.selectedLanguage,(T=p==null?void 0:p.selectedDialect)==null?void 0:T.key,h==null?void 0:h.religionFilter]},()=>mr()),Ue(()=>p.selectedRegion,T=>{Oe(T?{kind:"region",regionKey:T}:{kind:null})}),Ue(()=>p.selectedFamily,T=>{T?Oe({kind:"family",familyKey:T}):!p.selectedLanguage&&!p.selectedDialect&&Oe({kind:null})}),Ue(()=>p.selectedLanguage,T=>{T?Oe({kind:"language",languageKey:T}):!p.selectedFamily&&!p.selectedDialect&&Oe({kind:null})}),Ue(()=>p.selectedDialect,T=>{T!=null&&T.key?Oe({kind:"dialect",dialectKey:T.key,originalLabels:T.originalLabels||[]}):!p.selectedFamily&&!p.selectedLanguage&&Oe({kind:null})}),Ue(()=>h.prayerFilter,T=>{Oe(T?{kind:"prayer",property:"peoplePraying",expectedValue:T}:{kind:null})}),Ue(()=>h.engagementFilter,T=>{Oe(T?{kind:"engagement",property:"engagementStatus",expectedValue:T}:{kind:null})}),Ue(()=>h.adoptionFilter,T=>{Oe(T?{kind:"adoption",property:"adoptionStatus",expectedValue:T}:{kind:null})}),Ue(()=>h.religionFilter,T=>{Oe(T?{kind:"religion",property:"religion",expectedValue:T}:{kind:null})});function yu(){try{return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function vu(T){var qt,Do,La;const z=Array.isArray(T)?T.filter(Yo=>typeof Yo=="string"&&Yo):[],ee=z.length?`${z.length}:${z[0]}:${z[z.length-1]}`:"";if(ee===Vo||(Vo=ee,!z.length))return;const fe=new Set(z),Le=((qt=D==null?void 0:D.normalizedPeopleGroups)==null?void 0:qt.value)||[];let Fe=1/0,Me=1/0,Ve=-1/0,Be=-1/0,ct=0;for(const Yo of Le){if(!Yo||!fe.has(Yo.slug))continue;const _t=Number(Yo.longitude??Yo.lng),mn=Number(Yo.latitude??Yo.lat);!Number.isFinite(_t)||!Number.isFinite(mn)||(_tVe&&(Ve=_t),mn>Be&&(Be=mn),ct++)}if(!ct)return;const zt=Ve-Fe,Qe=Be-Me,at={longitude:(Fe+Ve)/2,latitude:(Me+Be)/2},ft=zt>f2?{c:at,z:m2}:ct===1||ztp.showClusters,async T=>{ra||(T&&(!p.clusteringMode||p.clusteringMode==="off")?p.clusteringMode="mst":!T&&p.clusteringMode!=="off"&&(p.clusteringMode="off"),await Bi())}),Ue(()=>p.clusteringMode,async()=>{ra||await Bi()});async function wu(T){var z,ee,fe,Le,Fe,Me;p.registerMap(q,Z.value),R1(Z.value,"mercator"),k.applyTheme(Z.value),T!=null&&T.length&&(V.addLanguageFamilyLayer(T,((z=N.value)==null?void 0:z.colorStrategy)??"languageFamily"),((ee=N.value)==null?void 0:ee.id)==="doxa-regions"&&((fe=Z.value)!=null&&fe.getLayer("language-family-pins"))&&Z.value.setPaintProperty("language-family-pins","circle-color","#4b5563"),wo(Z.value),((Le=N.value)==null?void 0:Le.id)==="prayer"&&V.startPrayerGlow(),(Fe=C.setData)==null||Fe.call(C,T),H.initialize()),((Me=N.value)==null?void 0:Me.id)==="doxa-regions"&&(typeof window<"u"&&window.requestIdleCallback?Be=>window.requestIdleCallback(Be,{timeout:2e3}):Be=>setTimeout(Be,800))(()=>{hn()}),dr(),p.setMapReady(q),Se.value=!0}let ls=null,Aa=null,br=null;function Am(T){const z=O.value;z&&(getComputedStyle(z).getPropertyValue("--map-radius").trim()||(z.style.setProperty("--map-radius","16px"),z.style.setProperty("--map-radius-sm","8px")),T>=700?(z.style.setProperty("--map-btn-size","40px"),z.style.setProperty("--map-toolbar-gap","8px"),z.style.setProperty("--map-font-md","13px"),z.style.setProperty("--map-font-sm","11px"),z.style.setProperty("--map-legend-width","380px")):T>=500?(z.style.setProperty("--map-btn-size","36px"),z.style.setProperty("--map-toolbar-gap","6px"),z.style.setProperty("--map-font-md","12px"),z.style.setProperty("--map-font-sm","10px"),z.style.setProperty("--map-legend-width","360px")):(z.style.setProperty("--map-btn-size","32px"),z.style.setProperty("--map-toolbar-gap","5px"),z.style.setProperty("--map-font-md","11px"),z.style.setProperty("--map-font-sm","10px"),z.style.setProperty("--map-legend-width","280px")))}function Gi(T){const z=O.value;if(z)try{z.dispatchEvent(new CustomEvent("dxmaps:mapinfo-pending",{bubbles:!0,composed:!0,detail:{pending:T}}))}catch{}}const Lm=()=>{!Se.value&&!Q.value&&Gi(!0)};return Ue(Q,T=>{T&&Gi(!1)}),Ro(()=>{Gi(!0),window.addEventListener("dxmaps:mapinfo-host",Lm)}),ho(()=>{window.removeEventListener("dxmaps:mapinfo-host",Lm),Se.value||Gi(!1)}),Ro(async()=>{var ee,fe,Le,Fe;(ee=h.init)==null||ee.call(h),v.value=((fe=W.value[0])==null?void 0:fe.id)??"doxa-regions",h.isMobile?(Le=h.collapseLegend)==null||Le.call(h):(Fe=h.openLegend)==null||Fe.call(h),O.value&&(Am(O.value.getBoundingClientRect().width),typeof ResizeObserver<"u"&&(ls=new ResizeObserver(Me=>{for(const Ve of Me)Am(Ve.contentRect.width)}),ls.observe(O.value))),window.addEventListener("doxa:legend-row-click",xe),window.addEventListener("legend:highlight",Sa);const T=D.loadData().catch(Me=>(console.error("[research-map] data load failed:",Me),{normalizedPeopleGroups:[]})),z=()=>!Ae.value||!Ae.value.isConnected;try{await ue()}catch(Me){if(z())return;console.error("[research-map] Map failed to initialize —",Me),Q.value=String((Me==null?void 0:Me.message)||Me);return}if(!z()){{const Me=Z.value?lt(Z.value):null;Me&&Me!==Z.value&&(Z.value=null,Z.value=Ra(Me))}if(!Z.value){console.error("[research-map] Map failed to initialize — check token and container"),Q.value=b("dashboard.map_init_failed");return}Z.value.once("style.load",async()=>{try{const{normalizedPeopleGroups:Me}=await T;await wu(Me)}catch(Me){console.error("[research-map] onMapReady failed:",Me),Q.value=String((Me==null?void 0:Me.message)||Me)}}),o(Z.value),br=()=>o(Z.value);try{Aa=new ResizeObserver(br);const Me=Z.value.getContainer&&Z.value.getContainer()||null;Me&&Aa.observe(Me);const Ve=Me?Tf(Me):null;Ve&&Aa.observe(Ve),document.body&&Aa.observe(document.body)}catch{}window.addEventListener("resize",br)}}),ho(()=>{const T=z=>{try{z()}catch(ee){console.warn("[research-map] teardown step failed",ee)}};try{T(()=>window.removeEventListener("doxa:legend-row-click",xe)),T(()=>window.removeEventListener("legend:highlight",Sa)),T(()=>{ls&&(ls.disconnect(),ls=null)}),T(()=>{Aa&&(Aa.disconnect(),Aa=null)}),T(()=>{br&&(window.removeEventListener("resize",br),br=null)}),T(()=>{var z;return(z=V.stopPrayerGlow)==null?void 0:z.call(V)}),T(()=>{var z;return(z=V.cleanup)==null?void 0:z.call(V)}),T(()=>{var z;return(z=C.cleanup)==null?void 0:z.call(C)}),T(()=>{var z;return(z=H.cleanup)==null?void 0:z.call(H)}),T(()=>{var z;return(z=p.unregisterMap)==null?void 0:z.call(p,q)}),T(()=>{typeof window>"u"||(window.__researchMapFilterState===rs&&delete window.__researchMapFilterState,window.__researchMapPinOpacity===Di&&delete window.__researchMapPinOpacity,window.__researchMapClusterDraw===hr&&delete window.__researchMapClusterDraw,window.__researchMapVocabulary===ss&&delete window.__researchMapVocabulary)})}finally{ke()}}),(T,z)=>(ne(),me("div",{ref_key:"rmRoot",ref:O,class:Ke(["rm-root",{"rm-dark":Rt.value,"dsm-dark":Rt.value}])},[K.value?(ne(),me("div",{key:0,ref_key:"tabBar",ref:ie,class:"rm-tab-bar"},[(ne(!0),me(ot,null,io(W.value,ee=>(ne(),me(ot,{key:ee.id},[R("button",{class:Ke(["rm-tab",{active:v.value===ee.id}]),onClick:fe=>In(ee.id)},ye($(ee)),11,r2),ee.sepAfter?(ne(),me("div",s2)):Re("",!0)],64))),128))],512)):Re("",!0),R("div",i2,[!Se.value&&!Q.value?(ne(),me("div",l2,ye(n("dashboard.map_loading","Research map loading…")),1)):Re("",!0),Q.value?(ne(),me("div",c2,ye(n("allPeopleGroups.loadError","The map could not be loaded."))+" "+ye(Q.value),1)):Re("",!0),R("div",{ref_key:"mapContainer",ref:Ae,class:"rm-map-canvas"},null,512),z[4]||(z[4]=R("div",{class:"map-scroll-edge map-scroll-edge--left"},null,-1)),z[5]||(z[5]=R("div",{class:"map-scroll-edge map-scroll-edge--right"},null,-1)),ge(l)!=="mapbox"?(ne(),me("div",{key:2,class:"rm-provider-badge","data-provider":ge(l)},ye(ge(f)),9,u2)):Re("",!0),Se.value&&ge(Z)&&c.value?(ne(),ut(yx,{key:3,ref_key:"geocoderRef",ref:he,"map-instance":ge(Z),"access-token":ge(i),provider:ge(l),"data-source-id":ge(x),"is-dark":Rt.value,placeholder:F.value,"active-context":I.value,onPeopleGroupResult:ge(We),onAggregateResult:ge(nt),onClear:ge(yt)},null,8,["map-instance","access-token","provider","data-source-id","is-dark","placeholder","active-context","onPeopleGroupResult","onAggregateResult","onClear"])):Re("",!0),Re("",!0),Se.value&&ge(Z)?(ne(),ut(Kk,{key:5,"has-geocoder":c.value},{default:go(()=>[dt(Hx,{"is-dark":Rt.value},null,8,["is-dark"]),dt(Yk,{map:ge(Z),"is-dark":Rt.value},null,8,["map","is-dark"]),dt(Zk,{map:ge(Z),"is-dark":Rt.value},null,8,["map","is-dark"]),dt(Jk,{map:ge(Z),"is-dark":Rt.value},null,8,["map","is-dark"]),dt(ex,{"map-container":Ae.value,"is-dark":Rt.value},null,8,["map-container","is-dark"]),dt(ox,{"is-dark":Rt.value,onToggle:$u},null,8,["is-dark"]),dt(Qn,{"is-dark":Rt.value,active:$t.value,disabled:$t.value,title:Io.value,class:"export-poster-btn","aria-busy":$t.value?"true":"false",onClick:_o},{default:go(()=>[...z[3]||(z[3]=[R("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[R("path",{d:"M12 3v12M7 10l5 5 5-5M5 21h14"})],-1)])]),_:1},8,["is-dark","active","disabled","title","aria-busy"]),L.share?(ne(),ut(Gx,{key:0,"is-dark":Rt.value,"embed-path":"doxa-research-map/research-map/index.html"},null,8,["is-dark"])):Re("",!0)]),_:1},8,["has-geocoder"])):Re("",!0),Se.value&&u.value?(ne(),ut(qk,{key:6,"legend-type":A.value,"is-dark":Rt.value},null,8,["legend-type","is-dark"])):Re("",!0),Se.value?(ne(),ut(sS,{key:7,"is-open":Dt.value,onClose:z[1]||(z[1]=ee=>Dt.value=!1),onOpenPoster:_o},{default:go(()=>[dt(FS)]),_:1},8,["is-open"])):Re("",!0),R("div",{class:"rm-legend-desktop-slot",style:Tt(d.value?{"--stl-top":d.value}:null)},[Se.value&&ge(h).legendMode==="detail"&&ge(h).selectedPeopleGroup?(ne(),ut(Rk,{key:0,"legend-type":A.value,"popup-action":w.value,"initially-collapsed":!1,"is-dark":Rt.value},null,8,["legend-type","popup-action","is-dark"])):Re("",!0),Ms(R("div",null,[Se.value?(ne(),ut(Af,{key:0,nodes:re.value,tabs:pe.value,title:Ce.value,hideTabs:se.value,columnLabel:Ee.value,progress:ge(Ie),open:Pe.value,"export-enabled":p2,onSelect:pt,onExport:co,"onUpdate:open":qe},null,8,["nodes","tabs","title","hideTabs","columnLabel","progress","open"])):Re("",!0)],512),[[ip,!(ge(h).legendMode==="detail"&&ge(h).selectedPeopleGroup)]])],4),R("div",d2,[Se.value?(ne(),ut(ge(a),{key:0,"legend-type":A.value,"popup-action":w.value,"is-dark":Rt.value},null,8,["legend-type","popup-action","is-dark"])):Re("",!0)]),Se.value&&It.value?(ne(),ut(ge(r),{key:8,feature:It.value,action:w.value,dark:Rt.value,onClose:z[2]||(z[2]=ee=>ge(p).selectFeature(null))},null,8,["feature","action","dark"])):Re("",!0)])],2))}}},Symbol.toStringTag,{value:"Module"})),y2="",v2={class:"legend-sheet-root"},w2=["src","alt"],k2={key:0,class:"pull-tab-handle"},x2=["aria-expanded","aria-label"],S2=["aria-label"],P2=["aria-expanded","aria-label"],A2={class:"collapsed-detail-title"},L2={class:"legend-content"},C2=["aria-expanded","aria-label"],T2=["aria-expanded","aria-label"],Nf=80,E2=48,M2=44,R2=24,If="--legend-sheet-h",Of=Object.freeze(Object.defineProperty({__proto__:null,default:ln({__name:"LegendMobile",props:{legendType:{type:String,required:!0},nodes:{type:Array,default:null},tabs:{type:Array,default:null},defaultTab:{type:Number,default:0},columnLabel:{type:String,default:null},title:{type:String,default:null},columns:{type:Array,default:null},isDark:{type:Boolean,default:!1},popupAction:{type:String,default:"pray",validator:e=>["pray","adopt","none"].includes(e)},disableCollapse:{type:Boolean,default:!1}},setup(e){const{t}=Ot();Vt(` .floating-mini-image{position:absolute;inset-inline-start:16px;bottom:calc(var(--legend-sheet-h,30%) + 16px);z-index:999;pointer-events:auto;cursor:pointer;} .mini-image{width:120px;height:150px;object-fit:cover;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.25);display:block;} .legend-sheet-root{position:absolute;inset:0;pointer-events:none;overflow:hidden;} @@ -1599,37 +1599,37 @@ @media (prefers-reduced-motion: reduce) { .legend-sheet, .legend-content, .legend-handle, .legend-toggle { transition: none !important; animation: none !important; } } -`,"legend-mobile-sheet");const o=e,n=je("uiStore");je("mapStore");const a=je("dataStore"),r=je("onSemanticTreeSelect",()=>{}),s=je("onLegendExport",null),i=te(()=>typeof s=="function"),l=je("legendExportCards",!1),c=As(o,"legendType"),{items:u,columns:d,title:f,activeFilter:x,setFilter:S,totalCount:y,totalPopulation:g,fmtPop:b,fmtCount:m}=ts(c,Ti),$=je("normalizedPeopleGroups",null),p=te(()=>{var xe,Te;if((xe=$==null?void 0:$.value)!=null&&xe.length)return $.value;const oe=[];for(const We in(a==null?void 0:a.sources)||{}){const nt=a.sources[We];(Te=nt==null?void 0:nt.features)!=null&&Te.length&&oe.push(...nt.features)}return oe}),_={get value(){return p.value}},{langTree:h}=Zc(_),{affinityTree:k}=Lf(_),{regionsTree:L}=Cf(_),P=[{id:"family",label:"Lang Family",info:"A language family is a group of languages descended from a common ancestor."},{id:"language",label:"Language",info:"A language is a system of communication used by a people."},{id:"dialect",label:"Dialect",info:"A dialect/variety is a regional or social form of a language."}],G=[{id:"bloc",label:"Block",info:"Affinity Block (rop1) — broadest grouping. 16 blocks total."},{id:"cluster",label:"Cluster",info:"Cluster (imb_reg_of_people_2, ROP 2) — finer grouping inside a block. 194 total."},{id:"group",label:"PG",info:"People Group (imb_reg_of_people_25, ROP 2.5) — abstract identity. 1,736 PGs."},{id:"pgic",label:"PGIC",info:"PG in Country (imb_reg_of_people_3 + country_code) — one row per PG-country pair. 2,106 rows."}],W=[{id:"region",label:"Region",info:'WAGF macro-region (e.g. "Asia", "Africa"). Color-coded on the map.'},{id:"block",label:"Bloc",info:'WAGF bloc — organizational sub-grouping within each region (e.g. "South East Asia").'},{id:"country",label:"Country",info:"Individual countries, listed by unreached-population size within their bloc."}],K=te(()=>["prayer","engagement","adoption","religion"].includes(o.legendType));function v(oe){const xe=[];for(const Te of oe){xe.push({id:Te.key,label:Te.label,color:Te.color,count:Te.count??0,pop:Te.population??0,filter:Te.filterKey?["==",["get","_flat_filter"],Te.filterKey]:null,children:[]});for(const We of Te.children||[])xe.push({id:We.key,label:We.label,color:We.color,count:We.count??0,pop:We.population??0,filter:We.filterKey?["==",["get","_flat_filter"],We.filterKey]:null,children:[]})}return xe}const N=te(()=>o.nodes?o.nodes:K.value?v(u.value):o.legendType==="affinity-block"?k.value:o.legendType==="doxa-regions"?L.value:h.value),A=te(()=>o.nodes?o.tabs:K.value?null:o.legendType==="affinity-block"?G:o.legendType==="doxa-regions"?W:P),w=te(()=>o.title?o.title:K.value?t("legend.titleBar.legend"):o.legendType==="affinity-block"?t("legend.titleBar.peopleGroups"):o.legendType==="doxa-regions"?t("legend.titleBar.wagfRegions"):t("legend.titleBar.languages")),j=te(()=>o.columnLabel!==null?o.columnLabel:["religion","prayer","engagement","adoption"].includes(o.legendType)?t("legend.colLabel."+o.legendType):K.value?t("legend.colLabel.status"):""),F=we(null),U=we(!1),I={pending:null,active:!1,startY:0,startH:0,startState:"",containerH:0,maxH:0,lastH:0};let q=0;const O=()=>Date.now()-q<400,ie=te(()=>n.legendState),he=te(()=>ie.value!=="collapsed"),ve=te(()=>n.legendHeight),Ae=te(()=>n.caretRotation),Se=te(()=>n.showPullTab),Q=te(()=>ie.value==="open"&&!n._customLegendHeight);let Z=!1;Ue(()=>n.isMobile,oe=>{!oe||Z||(Z=!0,n.selectedPeopleGroup||n.collapseLegend())},{immediate:!0});const ue=te(()=>n.legendMode),ke=te(()=>n.selectedPeopleGroup),M=je("normalizedPeopleGroups",null),D=te(()=>{var xe,Te;if((xe=M==null?void 0:M.value)!=null&&xe.length)return ou(M.value);const oe=[];for(const We in(a==null?void 0:a.sources)||{}){const nt=a.sources[We];(Te=nt==null?void 0:nt.features)!=null&&Te.length&&oe.push(...nt.features)}return ou(oe)}),B=te(()=>ke.value?vf(D.value,ke.value):[]),V=te(()=>{var oe;return ue.value==="detail"&&ke.value?((oe=ke.value.properties)==null?void 0:oe.name)||t("legend.header.peopleGroupFallback"):ie.value==="collapsed"?o.title||t("legend.header.collapsed"):o.title||f.value});function ae(oe){n.handleLegendItemClick(),S(oe)}function H(){O()||n.toggleLegend()}function ce(){O()||(n.selectPeopleGroup(null),n.openLegend())}const be=te(()=>{var xe;if(!ke.value)return null;const oe=ke.value.properties||{};return oe.imageUrl||((xe=oe._raw)==null?void 0:xe.ImageURL)||null});function E(oe){var nt;if(ie.value==="collapsed")return;const xe=oe.touches[0],Te=F.value;!xe||!Te||!(xe.clientY-Te.getBoundingClientRect().top<=MA)||(I.pending="grab",I.active=!1,I.startY=xe.clientY,I.startH=Te.offsetHeight,I.lastH=I.startH,I.startState=ie.value,I.containerH=((nt=Te.parentElement)==null?void 0:nt.offsetHeight)||window.innerHeight,I.maxH=I.containerH-Nf)}function C(oe){if(!I.pending&&!I.active)return;const xe=oe.touches[0];if(!xe)return;const Te=I.startY-xe.clientY;if(!I.active){if(Te===0)return;I.pending=null,I.active=!0,U.value=!0}oe.preventDefault();const We=Math.round(Math.min(I.maxH,Math.max(EA,I.startH+Te)));I.lastH=We,n.setLegendHeight(`${We}px`)}function J(){if(I.pending=null,!I.active)return;I.active=!1,U.value=!1,q=Date.now();const oe=I.lastH,xe=oe-I.startH,Te=I.containerH*.3;if(ue.value!=="detail"){oe0?n.fullyOpenLegend():I.startState==="fullyOpen"?n.openLegend():n.collapseLegend()}function de(oe){oe==="fullyOpen"?n.fullyOpenLegend():oe==="collapsed"?n.collapseLegend():n.openLegend()}let _e=null,$e=null,X=null;return Ro(()=>{const oe=F.value;if(!oe||typeof ResizeObserver>"u")return;const xe=oe.getRootNode();$e=xe instanceof ShadowRoot?xe.host:xe.documentElement||null,$e&&(X=oe,_e=new ResizeObserver(()=>{const Te=oe.offsetHeight;Te<=0||($e.style.setProperty(If,`${Te}px`),$e.__legendSheetVarOwner=oe)}),_e.observe(oe))}),ho(()=>{_e&&(_e.disconnect(),_e=null),$e&&$e.__legendSheetVarOwner===X&&($e.style.removeProperty(If),$e.__legendSheetVarOwner=null),$e=null,X=null}),(oe,xe)=>{var Te;return ne(),me("div",vA,[ue.value==="detail"&&ke.value&&ie.value==="open"&&be.value?(ne(),me("div",{key:0,class:"floating-mini-image",onClick:xe[0]||(xe[0]=We=>ge(n).fullyOpenLegend())},[R("img",{src:be.value,alt:(Te=ke.value.properties)==null?void 0:Te.name,class:"mini-image"},null,8,wA)])):Re("",!0),R("div",{ref_key:"sheetRef",ref:F,class:Ke(["legend-mobile-sheet",[ie.value,{"sheet-dark":e.isDark,dragging:U.value,fit:Q.value}]]),style:Tt({height:Q.value?"auto":ve.value,"--legend-sheet-top-reserve":Nf+"px"}),onTouchstart:E,onTouchmove:C,onTouchend:J,onTouchcancel:J},[R("div",{class:"sheet-drag-strip",onClick:H},[Se.value?(ne(),me("div",kA)):Re("",!0)]),ue.value==="detail"&&ie.value!=="collapsed"?(ne(),me("button",{key:0,class:"detail-collapse-btn-mobile",onClick:Lt(H,["stop"]),"aria-expanded":String(he.value),"aria-label":ge(t)("aria.toggleLegend")},null,8,xA)):Re("",!0),ue.value==="detail"&&ie.value!=="collapsed"?(ne(),me("button",{key:1,class:"detail-close-btn",onClick:Lt(ce,["stop"]),"aria-label":ge(t)("aria.backToLegend")},[...xe[2]||(xe[2]=[R("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[R("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,SA)):Re("",!0),ie.value==="collapsed"&&ue.value==="detail"&&ke.value?(ne(),me("div",{key:2,class:"collapsed-detail-footer",onClick:H},[R("button",{class:"mobile-collapse-caret",style:Tt({transform:`rotate(${Ae.value}deg)`}),"aria-expanded":String(he.value),"aria-label":ge(t)("aria.toggleLegend"),tabindex:"-1"},[...xe[3]||(xe[3]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,PA),R("span",AA,ye(V.value),1)])):Re("",!0),R("div",LA,[ue.value==="detail"&&ke.value?(ne(),me(ot,{key:0},[ie.value!=="collapsed"?(ne(),ut(eu,{key:0,peopleGroup:ke.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):Re("",!0),ie.value!=="collapsed"?(ne(),ut(Li,{key:1,shared:B.value,dark:e.isDark},null,8,["shared","dark"])):Re("",!0)],64)):e.legendType!=="default"?(ne(),ut(Af,{key:1,"pin-note":!1,nodes:N.value,tabs:A.value,"default-tab":e.defaultTab,title:V.value||w.value,hideTabs:e.nodes?!e.tabs:K.value,columnLabel:j.value,columns:e.columns||["count","pop"],"export-enabled":i.value,"export-cards":i.value&&ge(l)===!0,onSelect:ge(r),onExport:xe[1]||(xe[1]=We=>ge(s)&&ge(s)(We))},{"title-caret":go(()=>[R("button",{class:"mobile-collapse-caret",style:Tt({transform:`rotate(${Ae.value}deg)`}),onClick:Lt(H,["stop"]),"aria-expanded":String(he.value),"aria-label":ge(t)("aria.toggleLegend")},[...xe[4]||(xe[4]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,CA)]),_:1},8,["nodes","tabs","default-tab","title","hideTabs","columnLabel","columns","export-enabled","export-cards","onSelect"])):(ne(),ut(ff,{key:2,title:V.value,items:ge(u),columns:ge(d),activeFilter:ge(x),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:ge(y),totalPopulation:ge(g),fmtPop:ge(b),fmtCount:ge(m),onFilterClick:ae},{"title-caret":go(()=>[R("button",{class:"mobile-collapse-caret",style:Tt({transform:`rotate(${Ae.value}deg)`}),onClick:Lt(H,["stop"]),"aria-expanded":String(he.value),"aria-label":ge(t)("aria.toggleLegend")},[...xe[5]||(xe[5]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,TA)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],38)])}}},[["styles",[yA]],["__scopeId","data-v-f40a514c"]])},Symbol.toStringTag,{value:"Module"})),Df={regular:"Noto Sans Regular",medium:"Noto Sans Bold",bold:"Noto Sans Bold"};function FA(e){return typeof window<"u"&&!!window.maplibregl&&e instanceof window.maplibregl.Map}function NA(e,{weight:t="regular",mapbox:o}={}){return FA(e)?{"text-font":[Df[t]||Df.regular]}:Array.isArray(o)&&o.length?{"text-font":o}:{}}function iu(e,t,o,n){const a=parseFloat(t)-parseFloat(n),r=parseFloat(e)-parseFloat(o);return Math.sqrt(a*a+r*r)}function IA(e,t){const o={};for(const n of e){const a=t(n);o[a]||(o[a]=[]),o[a].push(n)}return o}const OA=Object.freeze({cluster:!0,clusterMaxZoom:6,clusterRadius:40}),DA=Object.freeze(["step",["get","point_count"],"#51bbd6",10,"#f1f075",50,"#f28cb1",500,"#e74c3c"]),zA=Object.freeze(["step",["get","point_count"],15,10,20,50,25,500,35]);class zf{constructor(t={}){this.maxConnectionDistance=t.maxConnectionDistance??1/0}_calculateDistance(t,o){return iu(parseFloat(t.latitude),parseFloat(t.longitude),parseFloat(o.latitude),parseFloat(o.longitude))}_createUnionFind(t){const o=Array.from({length:t},(s,i)=>i),n=new Array(t).fill(0),a=s=>(o[s]!==s&&(o[s]=a(o[s])),o[s]);return{find:a,union:(s,i)=>{const l=a(s),c=a(i);return l===c?!1:(n[l]n[c]?o[c]=l:(o[c]=l,n[l]++),!0)}}}generateMSTLines(t,o={}){const n=o.maxConnectionDistance??this.maxConnectionDistance;if(!t||t.length<2)return[];const a=t.filter(g=>{const b=parseFloat(g.latitude),m=parseFloat(g.longitude);return!isNaN(b)&&!isNaN(m)});if(a.length<2)return[];const r=a.length,s=a.map(g=>parseFloat(g.latitude)),i=a.map(g=>parseFloat(g.longitude)),l=new Uint8Array(r),c=new Float64Array(r).fill(1/0),u=new Int32Array(r).fill(-1),d=[];let f=r;for(;f>0;){let g=-1,b=1/0;for(let m=0;mn){g=-1;for(let m=0;m=0){const m=u[g];d.push({from:m,to:g,distance:c[g],fromPoint:a[m],toPoint:a[g]})}for(let m=0;m({type:"Feature",geometry:{type:"LineString",coordinates:[[parseFloat(g.fromPoint.longitude),parseFloat(g.fromPoint.latitude)],[parseFloat(g.toPoint.longitude),parseFloat(g.toPoint.latitude)]]},properties:{distance:g.distance,algorithm:"MST"}}));return d.length${n} deg).`),y}generateMultiGroupMSTLines(t,o=null,n={}){const a={},r=Object.keys(t).sort((s,i)=>t[i].length-t[s].length);for(const s of r){const i=t[s];if(!i||i.length<2){a[s]={lines:[],count:0,pointCount:(i==null?void 0:i.length)||0};continue}const l=this.generateMSTLines(i,n);if(typeof o=="function"){const c=o(s);l.forEach(u=>{u.properties={...u.properties,group:s,color:c}})}else l.forEach(c=>{c.properties={...c.properties,group:s}});a[s]={lines:l,count:l.length,pointCount:i.length}}return a}generateAllMSTLines(t,o=null,n={}){const a=this.generateMultiGroupMSTLines(t,o,n),r=[];for(const s in a)r.push(...a[s].lines);return r}getMSTStats(t,o={}){const n=this.generateMultiGroupMSTLines(t,null,o);let a=0,r=0;const s=[];for(const l in n){const{lines:c,pointCount:u}=n[l];a+=c.length,r+=u;const d=Math.max(0,u-1),f=u>1?(c.length/d*100).toFixed(1):100;s.push({name:l,points:u,lines:c.length,expected:d,coverage:f+"%",hasOrphans:c.lengthc.points-l.points);const i=s.filter(l=>l.hasOrphans).length;return{algorithm:"MST (Minimum Spanning Tree)",totalGroups:Object.keys(t).length,totalPoints:r,totalLines:a,expectedLines:Math.max(0,r-Object.keys(t).length),groupsWithOrphans:i,allPointsConnected:i===0,groups:s}}}new zf;class jf{constructor(t={}){this.maxDistance=t.maxDistance??15,this.maxNeighbors=t.maxNeighbors??15,this.sortKey=t.sortKey??"longitude"}_calculateDistance(t,o,n,a){return iu(t,o,n,a)}generateNetworkLines(t,o={}){const n=o.maxDistance??this.maxDistance,a=o.maxNeighbors??this.maxNeighbors,r=o.sortKey??this.sortKey,s=o.connectOrphans??!0;if(!t||t.length<2)return[];const i=t.filter(d=>{const f=parseFloat(d.latitude),x=parseFloat(d.longitude);return!isNaN(f)&&!isNaN(x)});if(i.length<2)return[];const l=[],c=new Set,u=[...i].sort((d,f)=>parseFloat(d[r])-parseFloat(f[r]));for(let d=0;dt[i].length-t[s].length);for(const s of r){const i=t[s];if(!i||i.length<2){a[s]={lines:[],count:0,pointCount:(i==null?void 0:i.length)||0};continue}const l=this.generateNetworkLines(i,n);if(typeof o=="function"){const c=o(s);l.forEach(u=>{u.properties={...u.properties,group:s,color:c}})}else l.forEach(c=>{c.properties={...c.properties,group:s}});a[s]={lines:l,count:l.length,pointCount:i.length}}return a}generateAllNetworkLines(t,o=null,n={}){const a=this.generateMultiGroupNetworkLines(t,o,n),r=[];for(const s in a)r.push(...a[s].lines);return r}getClusteringStats(t,o={}){const n=this.generateMultiGroupNetworkLines(t,null,o);let a=0,r=0;const s=[];for(const i in n){const{lines:l,pointCount:c}=n[i];a+=l.length,r+=c,s.push({name:i,points:c,lines:l.length,ratio:c>0?(l.length/c).toFixed(2):0})}return s.sort((i,l)=>l.points-i.points),{algorithm:"Network (nearest-neighbor)",totalGroups:Object.keys(t).length,totalPoints:r,totalLines:a,avgLinesPerPoint:r>0?(a/r).toFixed(2):0,groups:s}}}new jf({maxDistance:15,maxNeighbors:15,sortKey:"longitude"});const rr="cluster-lines-source",sr="cluster-lines",ta="mapbox-clusters",No="mapbox-clusters-circle",ir="mapbox-clusters-count",jA=Object.freeze({type:"FeatureCollection",features:[]});function Bf(e={}){const{getMap:t=()=>null,mapId:o="unknown",getPeopleGroups:n=()=>[],pinSourceId:a="language-families",pinLayerId:r="language-family-pins",groupKey:s="languageFamily",getGroupColor:i=null,mapboxClusterOptions:l={}}=e,c=je("mapStore",null),u=new zf({maxConnectionDistance:1/0}),d=new jf({maxDistance:15,maxNeighbors:15,sortKey:"longitude"}),f=we(!1),x=we("mapbox"),S=te(()=>c&&"clusteringEnabled"in c?!!c.clusteringEnabled:f.value),y=te(()=>c&&c.clusteringMode?c.clusteringMode:x.value),g=we([]);let b=null,m=null,$=null;function p(O){const ie=["mapbox","mst","network"];if(!ie.includes(O)){console.warn(`[${o}] useMapClustering.setMode: unknown mode "${O}". Allowed: ${ie.join(", ")}`);return}c&&typeof c.setClusteringMode=="function"?c.setClusteringMode(O):c&&"clusteringMode"in c?c.clusteringMode=O:x.value=O,S.value&&(G(),P())}function _(O){const ie=!!O;c&&typeof c.setClusteringEnabled=="function"?c.setClusteringEnabled(ie):c&&"clusteringEnabled"in c?c.clusteringEnabled=ie:f.value=ie,ie?P():G()}function h(O){!O||!O.property||O.value==null?$=null:$={property:O.property,value:O.value},c&&("clusterFilterProperty"in c&&(c.clusterFilterProperty=($==null?void 0:$.property)??null),"clusterFilterValue"in c&&(c.clusterFilterValue=($==null?void 0:$.value)??null)),S.value&&(G(),P())}function k(O){if(!$)return O;const{property:ie,value:he}=$,ve=Se=>String(Se||"").toLowerCase().replace(/[^a-z0-9]+/g,""),Ae=ve(he);return Ae?O.filter(Se=>{var Z,ue;const Q=(Se==null?void 0:Se[ie])??((Z=Se==null?void 0:Se.properties)==null?void 0:Z[ie])??((ue=Se==null?void 0:Se._normalized)==null?void 0:ue[ie]);return ve(Q)===Ae}):O}function L(O){b=O}function P(){const O=t();if(O){switch(G(),y.value){case"mapbox":N(O);break;case"mst":A(O,"mst");break;case"network":A(O,"network");break;default:console.warn(`[${o}] Unknown clustering mode: ${y.value}`)}q(O,!0)}}function G(){const O=t();O&&(K(O,ir,!1),K(O,No,!1),v(O,ta),K(O,sr,!1),v(O,rr),g.value=[],j(O),q(O,!1))}function W(){const O=t();O&&(j(O),O.getLayer(ir)&&O.removeLayer(ir),O.getLayer(No)&&O.removeLayer(No),O.getSource(ta)&&O.removeSource(ta),O.getLayer(sr)&&O.removeLayer(sr),O.getSource(rr)&&O.removeSource(rr),q(O,!1)),g.value=[],b=null}function K(O,ie,he){if(O.getLayer(ie))try{O.setLayoutProperty(ie,"visibility",he?"visible":"none")}catch{}}function v(O,ie){const he=O.getSource(ie);if(he&&typeof he.setData=="function")try{he.setData(jA)}catch{}}function N(O){const ie=k(n());if(!ie.length)return;const ve={type:"FeatureCollection",features:ie.map(Se=>{const Q=parseFloat(Se.longitude??Se.lng),Z=parseFloat(Se.latitude??Se.lat);return isNaN(Q)||isNaN(Z)?null:{type:"Feature",geometry:{type:"Point",coordinates:[Q,Z]},properties:{...Se.properties||Se}}}).filter(Boolean)},Ae=O.getSource(ta);Ae&&typeof Ae.setData=="function"?Ae.setData(ve):O.addSource(ta,{type:"geojson",data:ve,...OA,...l}),O.getLayer(No)?K(O,No,!0):O.addLayer({id:No,type:"circle",source:ta,filter:["has","point_count"],paint:{"circle-color":DA,"circle-radius":zA,"circle-stroke-width":2,"circle-stroke-color":"#ffffff",...cn(O),"circle-opacity":.85}}),O.getLayer(ir)?K(O,ir,!0):O.addLayer({id:ir,type:"symbol",source:ta,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],...NA(O,{weight:"medium",mapbox:["DIN Offc Pro Medium","Arial Unicode MS Bold"]}),"text-size":12},paint:{"text-color":"#000000"}}),w(O)}function A(O,ie){const he=k(n());if(!he.length)return;const ve=IA(he,ue=>{var ke;return ue[s]??((ke=ue._normalized)==null?void 0:ke[s])??"Unknown"}),Ae=typeof i=="function"?i:()=>"#666666";let Se=[];if(ie==="mst"?(Se=u.generateAllMSTLines(ve,Ae),Object.keys(ve).length):(Se=d.generateAllNetworkLines(ve,Ae),d.getClusteringStats(ve)),g.value=Se,Se.length===0)return;const Q={type:"FeatureCollection",features:Se},Z=O.getSource(rr);if(Z&&typeof Z.setData=="function"?Z.setData(Q):O.addSource(rr,{type:"geojson",data:Q}),O.getLayer(sr))K(O,sr,!0);else{const ue={id:sr,type:"line",source:rr,paint:{"line-color":["coalesce",["get","color"],"#666666"],"line-width":["interpolate",["linear"],["zoom"],0,.5,4,.75,8,1,12,1.5],...cn(O,"line"),"line-opacity":.5},layout:{"line-cap":"round","line-join":"round"}};O.getLayer(r)?O.addLayer(ue,r):O.addLayer(ue)}}function w(O){O.getLayer(No)&&(O.on("click",No,F),O.on("mouseenter",No,U),O.on("mouseleave",No,I),m=No)}function j(O){if(!m)return;const ie=m;try{O.off("click",ie,F),O.off("mouseenter",ie,U),O.off("mouseleave",ie,I)}catch{}m=null}function F(O){const ie=t();if(!ie)return;const he=ie.queryRenderedFeatures(O.point,{layers:[No]});if(!he.length)return;const ve=he[0],Ae=ve.properties.cluster_id,Se=ve.geometry.coordinates,Q=ve.properties.point_count;if(typeof b=="function"){b({clusterId:Ae,coordinates:Se,pointCount:Q,originalEvent:O});return}const Z=ie.getSource(ta);!Z||typeof Z.getClusterExpansionZoom!="function"||Z.getClusterExpansionZoom(Ae,(ue,ke)=>{ue||ie.easeTo({center:Se,zoom:ke})})}function U(){const O=t();O&&(O.getCanvas().style.cursor="pointer")}function I(){const O=t();O&&(O.getCanvas().style.cursor="")}function q(O,ie){if(O.getLayer(r))try{O.setPaintProperty(r,"circle-opacity",ie?.25:.9)}catch{}}return{enabled:S,mode:y,clusterLines:g,setMode:p,setEnabled:_,setSelectionFilter:h,onClusterClick:L,applyClustering:P,clearClustering:G,cleanup:W,mstUtil:u,networkUtil:d}}const BA=Object.freeze(Object.defineProperty({__proto__:null,default:Bf,useMapClustering:Bf},Symbol.toStringTag,{value:"Module"})),Gf=e=>Math.log(Math.tan(Math.PI/4+e*Math.PI/180/2)),Hf=e=>Math.atan(Math.sinh(e))*180/Math.PI,Uf=85.051129,Wf=e=>Math.max(-Uf,Math.min(Uf,e));function GA(e,t,o){const n=Math.max(1,Math.floor(o)||1),a=Gf(Wf(Math.max(e,t))),r=Gf(Wf(Math.min(e,t))),s=(a-r)/n,i=[];for(let l=0;l=e.widthIn?"portrait":"landscape"),margins:{...Wt.margins},bleed:Wt.bleed,slots:{title:{text:"Untitled",subtitle:"",heightIn:Wt.title.heightIn},legend:{rows:[],type:"generic",widthIn:Wt.legend.widthIn},scaleBar:!0,north:!0,footer:{left:"",right:"",attribution:Wt.footer.attribution,heightIn:Wt.footer.heightIn}},renderPath:"auto"}}const qf=Object.freeze(Object.defineProperty({__proto__:null,defaultPosterSpec:HA,posterDefaults:Wt},Symbol.toStringTag,{value:"Module"}));function lo(e,t){return Math.round(e*t)}function Kf(e,t){var _,h,k,L,P,G,W,K;const o=t.dpi,n=e.margins||Wt.margins,a={x:0,y:0,w:t.width,h:t.height},r={x:lo(n.left,o),y:lo(n.top,o),w:t.width-lo(n.left+n.right,o),h:t.height-lo(n.top+n.bottom,o)},s=(_=e.slots)!=null&&_.title?lo(e.slots.title.heightIn||Wt.title.heightIn,o):0,i={x:r.x,y:r.y,w:r.w,h:s},l=lo(((k=(h=e.slots)==null?void 0:h.footer)==null?void 0:k.heightIn)||Wt.footer.heightIn,o),c={x:r.x,y:r.y+r.h-l,w:r.w,h:l},u=(L=e.slots)!=null&&L.legend?lo(e.slots.legend.widthIn||Wt.legend.widthIn,o):0,d=(P=e.slots)!=null&&P.scaleBar||(G=e.slots)!=null&&G.north?lo(Wt.chromeBand.heightIn,o):0,f=r.y+s+(s?lo(Wt.gutter.in,o):0),x=c.y-d-(d?lo(Wt.gutter.in,o):0),S={x:r.x,y:f,w:r.w-(u?u+lo(Wt.gutter.in,o):0),h:x-f},y=u?{x:r.x+r.w-u,y:f,w:u,h:S.h}:{x:0,y:0,w:0,h:0},g=lo(Wt.scaleBar.widthIn,o),b=d,m=(W=e.slots)!=null&&W.scaleBar?{x:r.x,y:x+(d?lo(Wt.gutter.in,o):0),w:g,h:b}:{x:0,y:0,w:0,h:0},$=lo(Wt.north.sizeIn,o),p=(K=e.slots)!=null&&K.north?{x:r.x+r.w-$-(u?u+lo(Wt.gutter.in,o):0),y:x+(d?lo(Wt.gutter.in,o):0),w:$,h:$}:{x:0,y:0,w:0,h:0};return{page:a,content:r,title:i,map:S,legend:y,scaleBar:m,north:p,footer:c}}const UA={"©":"©","&":"&"," ":" ","<":"<",">":">",""":'"',"'":"'"};function WA(e){return e?String(e).replace(/<[^>]*>/g," ").replace(/&[a-z]+;|&#\d+;/gi,t=>UA[t.toLowerCase()]??" ").replace(/\s+/g," ").trim():""}function qA(e){if(!e||typeof e.getStyle!="function")return"";let t;try{t=e.getStyle()}catch{return""}const o=t&&t.sources||{},n=[];for(const a of Object.keys(o)){let r=null;try{r=typeof e.getSource=="function"?e.getSource(a):null}catch{r=null}const s=WA(r&&r.attribution||o[a].attribution);s&&!n.includes(s)&&n.push(s)}return n.join(" ")}const ya=4096,gn=2048,Vf=15e3;function KA(e){const t=we({phase:"idle",completed:0,total:0,message:"",fraction:0,percent:0}),o=we(!1);let n=null;async function a(y,g="png"){var $;if(o.value)throw new Error("useMapPoster: already rendering");const b=e();if(!b)throw new Error("useMapPoster: no source map");n=new AbortController;const m=XA(y.signal,n.signal);o.value=!0,l=0,c("init",1,1,"preparing render");try{const p=Yf(y),_=VA(y.renderPath||"auto",p);_==="single"&&(p.width>ya||p.height>ya)&&console.warn(`[useMapPoster] requested single-canvas ${p.width}×${p.height}px > ${ya}; auto-switching to tile-stitch.`);const h=_==="single"&&(p.width>ya||p.height>ya)?"stitch":_,k=y.layout==="poster",L=k?Kf(y,p):null,P=!!L&&L.map.w>0&&L.map.h>0;k&&!P&&console.warn('[useMapPoster] layout:"poster" asked for a map box of '+(L?L.map.w+"×"+L.map.h:"0×0")+"px; the margins, title, footer and legend column leave no room on this sheet. Falling back to a full-bleed map.");const G=P?{width:L.map.w,height:L.map.h,dpi:p.dpi}:p,W=h==="single"?await u(b,G,m):await d(b,G,m);c("compose",0,1,"compositing overlay");const K=qA(b),v=K?{...y,slots:{...y.slots,footer:{...(($=y.slots)==null?void 0:$.footer)||{},attribution:K}}}:y,N=P?f(W,L,p):W,A=await x(N,v,p);c("encode",0,1,`encoding ${g.toUpperCase()}`);const w=g==="pdf"?await JA(A,y):await ZA(A,"image/png");return c("done",1,1,"render complete"),w}finally{o.value=!1,n=null}}function r(){n&&n.abort()}const s={init:.02,"hidden-map":.3,stitch:.42,capture:.14,compose:.06,encode:.05,done:.01},i=["init","hidden-map","stitch","capture","compose","encode","done"];let l=0;function c(y,g,b,m){const $=i.indexOf(y);let p=0;for(let k=0;k<$;k++)p+=s[i[k]]||0;const _=b>0?Math.min(1,g/b):0,h=p+(s[y]||0)*_;l=y==="init"?h:Math.max(l,h),t.value={phase:y,completed:g,total:b,message:m,fraction:Math.min(1,l),percent:Math.round(Math.min(1,l)*100)}}async function u(y,g,b){c("hidden-map",0,3,"creating hidden map");const{hiddenMap:m,restoreDpr:$,container:p}=await Zf(y,g.width,g.height);try{lu(b),c("hidden-map",1,3,"loading map tiles"),await Xf(m),c("hidden-map",3,3,"tiles loaded"),lu(b),c("capture",0,1,"capturing canvas");const _=m.getCanvas().toDataURL("image/png"),h=await Qf(_),k=document.createElement("canvas");return k.width=g.width,k.height=g.height,k.getContext("2d").drawImage(h,0,0,g.width,g.height),k}finally{try{m.remove()}catch{}p!=null&&p.parentNode&&p.parentNode.removeChild(p),$()}}async function d(y,g,b){const m=Math.ceil(g.width/gn),$=Math.ceil(g.height/gn),p=m*$;c("hidden-map",0,p,`creating hidden map (${m}×${$} tiles)`);const _=y.getBounds(),h=y.getCenter(),k=y.getZoom(),L=y.getBearing(),P=y.getPitch(),{hiddenMap:G,restoreDpr:W,container:K}=await Zf(y,gn,gn,{preserveBounds:!0,bounds:_});try{const v=document.createElement("canvas");v.width=g.width,v.height=g.height;const N=v.getContext("2d"),A=_.getNorthEast(),w=_.getSouthWest(),F=(A.lng-w.lng)/m,U=GA(w.lat,A.lat,$);let I=0;for(let q=0;q<$;q++)for(let O=0;Ot&&([t,o]=[o,t]),e.orientation==="portrait"&&t>o&&([t,o]=[o,t]);const n=e.dpi||300;return{width:Math.round(t*n),height:Math.round(o*n),dpi:n}}function VA(e,t){return e==="single"||e==="stitch"?e:t.width>ya||t.height>ya?"stitch":"single"}async function Zf(e,t,o,n={}){const a=document.createElement("div");a.style.cssText=` +`,"legend-mobile-sheet");const o=e,n=je("uiStore");je("mapStore");const a=je("dataStore"),r=je("onSemanticTreeSelect",()=>{}),s=je("onLegendExport",null),i=te(()=>typeof s=="function"),l=je("legendExportCards",!1),c=As(o,"legendType"),{items:u,columns:d,title:f,activeFilter:x,setFilter:S,totalCount:y,totalPopulation:g,fmtPop:b,fmtCount:m}=ts(c,Ti),$=je("normalizedPeopleGroups",null),p=te(()=>{var xe,Te;if((xe=$==null?void 0:$.value)!=null&&xe.length)return $.value;const oe=[];for(const We in(a==null?void 0:a.sources)||{}){const nt=a.sources[We];(Te=nt==null?void 0:nt.features)!=null&&Te.length&&oe.push(...nt.features)}return oe}),_={get value(){return p.value}},{langTree:h}=Zc(_),{affinityTree:k}=Lf(_),{regionsTree:L}=Cf(_),P=[{id:"family",label:"Lang Family",info:"A language family is a group of languages descended from a common ancestor."},{id:"language",label:"Language",info:"A language is a system of communication used by a people."},{id:"dialect",label:"Dialect",info:"A dialect/variety is a regional or social form of a language."}],G=[{id:"bloc",label:"Block",info:"Affinity Block (rop1) — broadest grouping. 16 blocks total."},{id:"cluster",label:"Cluster",info:"Cluster (imb_reg_of_people_2, ROP 2) — finer grouping inside a block. 194 total."},{id:"group",label:"PG",info:"People Group (imb_reg_of_people_25, ROP 2.5) — abstract identity. 1,736 PGs."},{id:"pgic",label:"PGIC",info:"PG in Country (imb_reg_of_people_3 + country_code) — one row per PG-country pair. 2,106 rows."}],W=[{id:"region",label:"Region",info:'WAGF macro-region (e.g. "Asia", "Africa"). Color-coded on the map.'},{id:"block",label:"Bloc",info:'WAGF bloc — organizational sub-grouping within each region (e.g. "South East Asia").'},{id:"country",label:"Country",info:"Individual countries, listed by unreached-population size within their bloc."}],K=te(()=>["prayer","engagement","adoption","religion"].includes(o.legendType));function v(oe){const xe=[];for(const Te of oe){xe.push({id:Te.key,label:Te.label,color:Te.color,count:Te.count??0,pop:Te.population??0,filter:Te.filterKey?["==",["get","_flat_filter"],Te.filterKey]:null,children:[]});for(const We of Te.children||[])xe.push({id:We.key,label:We.label,color:We.color,count:We.count??0,pop:We.population??0,filter:We.filterKey?["==",["get","_flat_filter"],We.filterKey]:null,children:[]})}return xe}const N=te(()=>o.nodes?o.nodes:K.value?v(u.value):o.legendType==="affinity-block"?k.value:o.legendType==="doxa-regions"?L.value:h.value),A=te(()=>o.nodes?o.tabs:K.value?null:o.legendType==="affinity-block"?G:o.legendType==="doxa-regions"?W:P),w=te(()=>o.title?o.title:K.value?t("legend.titleBar.legend"):o.legendType==="affinity-block"?t("legend.titleBar.peopleGroups"):o.legendType==="doxa-regions"?t("legend.titleBar.wagfRegions"):t("legend.titleBar.languages")),j=te(()=>o.columnLabel!==null?o.columnLabel:["religion","prayer","engagement","adoption"].includes(o.legendType)?t("legend.colLabel."+o.legendType):K.value?t("legend.colLabel.status"):""),F=we(null),U=we(!1),I={pending:null,active:!1,startY:0,startH:0,startState:"",containerH:0,maxH:0,lastH:0};let q=0;const O=()=>Date.now()-q<400,ie=te(()=>n.legendState),he=te(()=>ie.value!=="collapsed"),ve=te(()=>n.legendHeight),Ae=te(()=>n.caretRotation),Se=te(()=>n.showPullTab),Q=te(()=>ie.value==="open"&&!n._customLegendHeight);let Z=!1;Ue(()=>n.isMobile,oe=>{!oe||Z||(Z=!0,n.selectedPeopleGroup||n.collapseLegend())},{immediate:!0});const ue=te(()=>n.legendMode),ke=te(()=>n.selectedPeopleGroup),M=je("normalizedPeopleGroups",null),D=te(()=>{var xe,Te;if((xe=M==null?void 0:M.value)!=null&&xe.length)return ou(M.value);const oe=[];for(const We in(a==null?void 0:a.sources)||{}){const nt=a.sources[We];(Te=nt==null?void 0:nt.features)!=null&&Te.length&&oe.push(...nt.features)}return ou(oe)}),B=te(()=>ke.value?vf(D.value,ke.value):[]),V=te(()=>{var oe;return ue.value==="detail"&&ke.value?((oe=ke.value.properties)==null?void 0:oe.name)||t("legend.header.peopleGroupFallback"):ie.value==="collapsed"?o.title||t("legend.header.collapsed"):o.title||f.value});function ae(oe){n.handleLegendItemClick(),S(oe)}function H(){O()||n.toggleLegend()}function ce(){O()||(n.selectPeopleGroup(null),n.openLegend())}const be=te(()=>{var xe;if(!ke.value)return null;const oe=ke.value.properties||{};return oe.imageUrl||((xe=oe._raw)==null?void 0:xe.ImageURL)||null});function E(oe){var nt;if(ie.value==="collapsed")return;const xe=oe.touches[0],Te=F.value;!xe||!Te||!(xe.clientY-Te.getBoundingClientRect().top<=M2)||(I.pending="grab",I.active=!1,I.startY=xe.clientY,I.startH=Te.offsetHeight,I.lastH=I.startH,I.startState=ie.value,I.containerH=((nt=Te.parentElement)==null?void 0:nt.offsetHeight)||window.innerHeight,I.maxH=I.containerH-Nf)}function C(oe){if(!I.pending&&!I.active)return;const xe=oe.touches[0];if(!xe)return;const Te=I.startY-xe.clientY;if(!I.active){if(Te===0)return;I.pending=null,I.active=!0,U.value=!0}oe.preventDefault();const We=Math.round(Math.min(I.maxH,Math.max(E2,I.startH+Te)));I.lastH=We,n.setLegendHeight(`${We}px`)}function J(){if(I.pending=null,!I.active)return;I.active=!1,U.value=!1,q=Date.now();const oe=I.lastH,xe=oe-I.startH,Te=I.containerH*.3;if(ue.value!=="detail"){oe0?n.fullyOpenLegend():I.startState==="fullyOpen"?n.openLegend():n.collapseLegend()}function de(oe){oe==="fullyOpen"?n.fullyOpenLegend():oe==="collapsed"?n.collapseLegend():n.openLegend()}let _e=null,$e=null,X=null;return Ro(()=>{const oe=F.value;if(!oe||typeof ResizeObserver>"u")return;const xe=oe.getRootNode();$e=xe instanceof ShadowRoot?xe.host:xe.documentElement||null,$e&&(X=oe,_e=new ResizeObserver(()=>{const Te=oe.offsetHeight;Te<=0||($e.style.setProperty(If,`${Te}px`),$e.__legendSheetVarOwner=oe)}),_e.observe(oe))}),ho(()=>{_e&&(_e.disconnect(),_e=null),$e&&$e.__legendSheetVarOwner===X&&($e.style.removeProperty(If),$e.__legendSheetVarOwner=null),$e=null,X=null}),(oe,xe)=>{var Te;return ne(),me("div",v2,[ue.value==="detail"&&ke.value&&ie.value==="open"&&be.value?(ne(),me("div",{key:0,class:"floating-mini-image",onClick:xe[0]||(xe[0]=We=>ge(n).fullyOpenLegend())},[R("img",{src:be.value,alt:(Te=ke.value.properties)==null?void 0:Te.name,class:"mini-image"},null,8,w2)])):Re("",!0),R("div",{ref_key:"sheetRef",ref:F,class:Ke(["legend-mobile-sheet",[ie.value,{"sheet-dark":e.isDark,dragging:U.value,fit:Q.value}]]),style:Tt({height:Q.value?"auto":ve.value,"--legend-sheet-top-reserve":Nf+"px"}),onTouchstart:E,onTouchmove:C,onTouchend:J,onTouchcancel:J},[R("div",{class:"sheet-drag-strip",onClick:H},[Se.value?(ne(),me("div",k2)):Re("",!0)]),ue.value==="detail"&&ie.value!=="collapsed"?(ne(),me("button",{key:0,class:"detail-collapse-btn-mobile",onClick:Lt(H,["stop"]),"aria-expanded":String(he.value),"aria-label":ge(t)("aria.toggleLegend")},null,8,x2)):Re("",!0),ue.value==="detail"&&ie.value!=="collapsed"?(ne(),me("button",{key:1,class:"detail-close-btn",onClick:Lt(ce,["stop"]),"aria-label":ge(t)("aria.backToLegend")},[...xe[2]||(xe[2]=[R("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[R("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,S2)):Re("",!0),ie.value==="collapsed"&&ue.value==="detail"&&ke.value?(ne(),me("div",{key:2,class:"collapsed-detail-footer",onClick:H},[R("button",{class:"mobile-collapse-caret",style:Tt({transform:`rotate(${Ae.value}deg)`}),"aria-expanded":String(he.value),"aria-label":ge(t)("aria.toggleLegend"),tabindex:"-1"},[...xe[3]||(xe[3]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,P2),R("span",A2,ye(V.value),1)])):Re("",!0),R("div",L2,[ue.value==="detail"&&ke.value?(ne(),me(ot,{key:0},[ie.value!=="collapsed"?(ne(),ut(eu,{key:0,peopleGroup:ke.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):Re("",!0),ie.value!=="collapsed"?(ne(),ut(Li,{key:1,shared:B.value,dark:e.isDark},null,8,["shared","dark"])):Re("",!0)],64)):e.legendType!=="default"?(ne(),ut(Af,{key:1,"pin-note":!1,nodes:N.value,tabs:A.value,"default-tab":e.defaultTab,title:V.value||w.value,hideTabs:e.nodes?!e.tabs:K.value,columnLabel:j.value,columns:e.columns||["count","pop"],"export-enabled":i.value,"export-cards":i.value&&ge(l)===!0,onSelect:ge(r),onExport:xe[1]||(xe[1]=We=>ge(s)&&ge(s)(We))},{"title-caret":go(()=>[R("button",{class:"mobile-collapse-caret",style:Tt({transform:`rotate(${Ae.value}deg)`}),onClick:Lt(H,["stop"]),"aria-expanded":String(he.value),"aria-label":ge(t)("aria.toggleLegend")},[...xe[4]||(xe[4]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,C2)]),_:1},8,["nodes","tabs","default-tab","title","hideTabs","columnLabel","columns","export-enabled","export-cards","onSelect"])):(ne(),ut(ff,{key:2,title:V.value,items:ge(u),columns:ge(d),activeFilter:ge(x),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:ge(y),totalPopulation:ge(g),fmtPop:ge(b),fmtCount:ge(m),onFilterClick:ae},{"title-caret":go(()=>[R("button",{class:"mobile-collapse-caret",style:Tt({transform:`rotate(${Ae.value}deg)`}),onClick:Lt(H,["stop"]),"aria-expanded":String(he.value),"aria-label":ge(t)("aria.toggleLegend")},[...xe[5]||(xe[5]=[R("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[R("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,T2)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],38)])}}},[["styles",[y2]],["__scopeId","data-v-f40a514c"]])},Symbol.toStringTag,{value:"Module"})),Df={regular:"Noto Sans Regular",medium:"Noto Sans Bold",bold:"Noto Sans Bold"};function F2(e){return typeof window<"u"&&!!window.maplibregl&&e instanceof window.maplibregl.Map}function N2(e,{weight:t="regular",mapbox:o}={}){return F2(e)?{"text-font":[Df[t]||Df.regular]}:Array.isArray(o)&&o.length?{"text-font":o}:{}}function iu(e,t,o,n){const a=parseFloat(t)-parseFloat(n),r=parseFloat(e)-parseFloat(o);return Math.sqrt(a*a+r*r)}function I2(e,t){const o={};for(const n of e){const a=t(n);o[a]||(o[a]=[]),o[a].push(n)}return o}const O2=Object.freeze({cluster:!0,clusterMaxZoom:6,clusterRadius:40}),D2=Object.freeze(["step",["get","point_count"],"#51bbd6",10,"#f1f075",50,"#f28cb1",500,"#e74c3c"]),z2=Object.freeze(["step",["get","point_count"],15,10,20,50,25,500,35]);class zf{constructor(t={}){this.maxConnectionDistance=t.maxConnectionDistance??1/0}_calculateDistance(t,o){return iu(parseFloat(t.latitude),parseFloat(t.longitude),parseFloat(o.latitude),parseFloat(o.longitude))}_createUnionFind(t){const o=Array.from({length:t},(s,i)=>i),n=new Array(t).fill(0),a=s=>(o[s]!==s&&(o[s]=a(o[s])),o[s]);return{find:a,union:(s,i)=>{const l=a(s),c=a(i);return l===c?!1:(n[l]n[c]?o[c]=l:(o[c]=l,n[l]++),!0)}}}generateMSTLines(t,o={}){const n=o.maxConnectionDistance??this.maxConnectionDistance;if(!t||t.length<2)return[];const a=t.filter(g=>{const b=parseFloat(g.latitude),m=parseFloat(g.longitude);return!isNaN(b)&&!isNaN(m)});if(a.length<2)return[];const r=a.length,s=a.map(g=>parseFloat(g.latitude)),i=a.map(g=>parseFloat(g.longitude)),l=new Uint8Array(r),c=new Float64Array(r).fill(1/0),u=new Int32Array(r).fill(-1),d=[];let f=r;for(;f>0;){let g=-1,b=1/0;for(let m=0;mn){g=-1;for(let m=0;m=0){const m=u[g];d.push({from:m,to:g,distance:c[g],fromPoint:a[m],toPoint:a[g]})}for(let m=0;m({type:"Feature",geometry:{type:"LineString",coordinates:[[parseFloat(g.fromPoint.longitude),parseFloat(g.fromPoint.latitude)],[parseFloat(g.toPoint.longitude),parseFloat(g.toPoint.latitude)]]},properties:{distance:g.distance,algorithm:"MST"}}));return d.length${n} deg).`),y}generateMultiGroupMSTLines(t,o=null,n={}){const a={},r=Object.keys(t).sort((s,i)=>t[i].length-t[s].length);for(const s of r){const i=t[s];if(!i||i.length<2){a[s]={lines:[],count:0,pointCount:(i==null?void 0:i.length)||0};continue}const l=this.generateMSTLines(i,n);if(typeof o=="function"){const c=o(s);l.forEach(u=>{u.properties={...u.properties,group:s,color:c}})}else l.forEach(c=>{c.properties={...c.properties,group:s}});a[s]={lines:l,count:l.length,pointCount:i.length}}return a}generateAllMSTLines(t,o=null,n={}){const a=this.generateMultiGroupMSTLines(t,o,n),r=[];for(const s in a)r.push(...a[s].lines);return r}getMSTStats(t,o={}){const n=this.generateMultiGroupMSTLines(t,null,o);let a=0,r=0;const s=[];for(const l in n){const{lines:c,pointCount:u}=n[l];a+=c.length,r+=u;const d=Math.max(0,u-1),f=u>1?(c.length/d*100).toFixed(1):100;s.push({name:l,points:u,lines:c.length,expected:d,coverage:f+"%",hasOrphans:c.lengthc.points-l.points);const i=s.filter(l=>l.hasOrphans).length;return{algorithm:"MST (Minimum Spanning Tree)",totalGroups:Object.keys(t).length,totalPoints:r,totalLines:a,expectedLines:Math.max(0,r-Object.keys(t).length),groupsWithOrphans:i,allPointsConnected:i===0,groups:s}}}new zf;class jf{constructor(t={}){this.maxDistance=t.maxDistance??15,this.maxNeighbors=t.maxNeighbors??15,this.sortKey=t.sortKey??"longitude"}_calculateDistance(t,o,n,a){return iu(t,o,n,a)}generateNetworkLines(t,o={}){const n=o.maxDistance??this.maxDistance,a=o.maxNeighbors??this.maxNeighbors,r=o.sortKey??this.sortKey,s=o.connectOrphans??!0;if(!t||t.length<2)return[];const i=t.filter(d=>{const f=parseFloat(d.latitude),x=parseFloat(d.longitude);return!isNaN(f)&&!isNaN(x)});if(i.length<2)return[];const l=[],c=new Set,u=[...i].sort((d,f)=>parseFloat(d[r])-parseFloat(f[r]));for(let d=0;dt[i].length-t[s].length);for(const s of r){const i=t[s];if(!i||i.length<2){a[s]={lines:[],count:0,pointCount:(i==null?void 0:i.length)||0};continue}const l=this.generateNetworkLines(i,n);if(typeof o=="function"){const c=o(s);l.forEach(u=>{u.properties={...u.properties,group:s,color:c}})}else l.forEach(c=>{c.properties={...c.properties,group:s}});a[s]={lines:l,count:l.length,pointCount:i.length}}return a}generateAllNetworkLines(t,o=null,n={}){const a=this.generateMultiGroupNetworkLines(t,o,n),r=[];for(const s in a)r.push(...a[s].lines);return r}getClusteringStats(t,o={}){const n=this.generateMultiGroupNetworkLines(t,null,o);let a=0,r=0;const s=[];for(const i in n){const{lines:l,pointCount:c}=n[i];a+=l.length,r+=c,s.push({name:i,points:c,lines:l.length,ratio:c>0?(l.length/c).toFixed(2):0})}return s.sort((i,l)=>l.points-i.points),{algorithm:"Network (nearest-neighbor)",totalGroups:Object.keys(t).length,totalPoints:r,totalLines:a,avgLinesPerPoint:r>0?(a/r).toFixed(2):0,groups:s}}}new jf({maxDistance:15,maxNeighbors:15,sortKey:"longitude"});const rr="cluster-lines-source",sr="cluster-lines",ta="mapbox-clusters",No="mapbox-clusters-circle",ir="mapbox-clusters-count",j2=Object.freeze({type:"FeatureCollection",features:[]});function Bf(e={}){const{getMap:t=()=>null,mapId:o="unknown",getPeopleGroups:n=()=>[],pinSourceId:a="language-families",pinLayerId:r="language-family-pins",groupKey:s="languageFamily",getGroupColor:i=null,mapboxClusterOptions:l={}}=e,c=je("mapStore",null),u=new zf({maxConnectionDistance:1/0}),d=new jf({maxDistance:15,maxNeighbors:15,sortKey:"longitude"}),f=we(!1),x=we("mapbox"),S=te(()=>c&&"clusteringEnabled"in c?!!c.clusteringEnabled:f.value),y=te(()=>c&&c.clusteringMode?c.clusteringMode:x.value),g=we([]);let b=null,m=null,$=null;function p(O){const ie=["mapbox","mst","network"];if(!ie.includes(O)){console.warn(`[${o}] useMapClustering.setMode: unknown mode "${O}". Allowed: ${ie.join(", ")}`);return}c&&typeof c.setClusteringMode=="function"?c.setClusteringMode(O):c&&"clusteringMode"in c?c.clusteringMode=O:x.value=O,S.value&&(G(),P())}function _(O){const ie=!!O;c&&typeof c.setClusteringEnabled=="function"?c.setClusteringEnabled(ie):c&&"clusteringEnabled"in c?c.clusteringEnabled=ie:f.value=ie,ie?P():G()}function h(O){!O||!O.property||O.value==null?$=null:$={property:O.property,value:O.value},c&&("clusterFilterProperty"in c&&(c.clusterFilterProperty=($==null?void 0:$.property)??null),"clusterFilterValue"in c&&(c.clusterFilterValue=($==null?void 0:$.value)??null)),S.value&&(G(),P())}function k(O){if(!$)return O;const{property:ie,value:he}=$,ve=Se=>String(Se||"").toLowerCase().replace(/[^a-z0-9]+/g,""),Ae=ve(he);return Ae?O.filter(Se=>{var Z,ue;const Q=(Se==null?void 0:Se[ie])??((Z=Se==null?void 0:Se.properties)==null?void 0:Z[ie])??((ue=Se==null?void 0:Se._normalized)==null?void 0:ue[ie]);return ve(Q)===Ae}):O}function L(O){b=O}function P(){const O=t();if(O){switch(G(),y.value){case"mapbox":N(O);break;case"mst":A(O,"mst");break;case"network":A(O,"network");break;default:console.warn(`[${o}] Unknown clustering mode: ${y.value}`)}q(O,!0)}}function G(){const O=t();O&&(K(O,ir,!1),K(O,No,!1),v(O,ta),K(O,sr,!1),v(O,rr),g.value=[],j(O),q(O,!1))}function W(){const O=t();O&&(j(O),O.getLayer(ir)&&O.removeLayer(ir),O.getLayer(No)&&O.removeLayer(No),O.getSource(ta)&&O.removeSource(ta),O.getLayer(sr)&&O.removeLayer(sr),O.getSource(rr)&&O.removeSource(rr),q(O,!1)),g.value=[],b=null}function K(O,ie,he){if(O.getLayer(ie))try{O.setLayoutProperty(ie,"visibility",he?"visible":"none")}catch{}}function v(O,ie){const he=O.getSource(ie);if(he&&typeof he.setData=="function")try{he.setData(j2)}catch{}}function N(O){const ie=k(n());if(!ie.length)return;const ve={type:"FeatureCollection",features:ie.map(Se=>{const Q=parseFloat(Se.longitude??Se.lng),Z=parseFloat(Se.latitude??Se.lat);return isNaN(Q)||isNaN(Z)?null:{type:"Feature",geometry:{type:"Point",coordinates:[Q,Z]},properties:{...Se.properties||Se}}}).filter(Boolean)},Ae=O.getSource(ta);Ae&&typeof Ae.setData=="function"?Ae.setData(ve):O.addSource(ta,{type:"geojson",data:ve,...O2,...l}),O.getLayer(No)?K(O,No,!0):O.addLayer({id:No,type:"circle",source:ta,filter:["has","point_count"],paint:{"circle-color":D2,"circle-radius":z2,"circle-stroke-width":2,"circle-stroke-color":"#ffffff",...cn(O),"circle-opacity":.85}}),O.getLayer(ir)?K(O,ir,!0):O.addLayer({id:ir,type:"symbol",source:ta,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],...N2(O,{weight:"medium",mapbox:["DIN Offc Pro Medium","Arial Unicode MS Bold"]}),"text-size":12},paint:{"text-color":"#000000"}}),w(O)}function A(O,ie){const he=k(n());if(!he.length)return;const ve=I2(he,ue=>{var ke;return ue[s]??((ke=ue._normalized)==null?void 0:ke[s])??"Unknown"}),Ae=typeof i=="function"?i:()=>"#666666";let Se=[];if(ie==="mst"?(Se=u.generateAllMSTLines(ve,Ae),Object.keys(ve).length):(Se=d.generateAllNetworkLines(ve,Ae),d.getClusteringStats(ve)),g.value=Se,Se.length===0)return;const Q={type:"FeatureCollection",features:Se},Z=O.getSource(rr);if(Z&&typeof Z.setData=="function"?Z.setData(Q):O.addSource(rr,{type:"geojson",data:Q}),O.getLayer(sr))K(O,sr,!0);else{const ue={id:sr,type:"line",source:rr,paint:{"line-color":["coalesce",["get","color"],"#666666"],"line-width":["interpolate",["linear"],["zoom"],0,.5,4,.75,8,1,12,1.5],...cn(O,"line"),"line-opacity":.5},layout:{"line-cap":"round","line-join":"round"}};O.getLayer(r)?O.addLayer(ue,r):O.addLayer(ue)}}function w(O){O.getLayer(No)&&(O.on("click",No,F),O.on("mouseenter",No,U),O.on("mouseleave",No,I),m=No)}function j(O){if(!m)return;const ie=m;try{O.off("click",ie,F),O.off("mouseenter",ie,U),O.off("mouseleave",ie,I)}catch{}m=null}function F(O){const ie=t();if(!ie)return;const he=ie.queryRenderedFeatures(O.point,{layers:[No]});if(!he.length)return;const ve=he[0],Ae=ve.properties.cluster_id,Se=ve.geometry.coordinates,Q=ve.properties.point_count;if(typeof b=="function"){b({clusterId:Ae,coordinates:Se,pointCount:Q,originalEvent:O});return}const Z=ie.getSource(ta);!Z||typeof Z.getClusterExpansionZoom!="function"||Z.getClusterExpansionZoom(Ae,(ue,ke)=>{ue||ie.easeTo({center:Se,zoom:ke})})}function U(){const O=t();O&&(O.getCanvas().style.cursor="pointer")}function I(){const O=t();O&&(O.getCanvas().style.cursor="")}function q(O,ie){if(O.getLayer(r))try{O.setPaintProperty(r,"circle-opacity",ie?.25:.9)}catch{}}return{enabled:S,mode:y,clusterLines:g,setMode:p,setEnabled:_,setSelectionFilter:h,onClusterClick:L,applyClustering:P,clearClustering:G,cleanup:W,mstUtil:u,networkUtil:d}}const B2=Object.freeze(Object.defineProperty({__proto__:null,default:Bf,useMapClustering:Bf},Symbol.toStringTag,{value:"Module"})),Gf=e=>Math.log(Math.tan(Math.PI/4+e*Math.PI/180/2)),Hf=e=>Math.atan(Math.sinh(e))*180/Math.PI,Uf=85.051129,Wf=e=>Math.max(-Uf,Math.min(Uf,e));function G2(e,t,o){const n=Math.max(1,Math.floor(o)||1),a=Gf(Wf(Math.max(e,t))),r=Gf(Wf(Math.min(e,t))),s=(a-r)/n,i=[];for(let l=0;l=e.widthIn?"portrait":"landscape"),margins:{...Wt.margins},bleed:Wt.bleed,slots:{title:{text:"Untitled",subtitle:"",heightIn:Wt.title.heightIn},legend:{rows:[],type:"generic",widthIn:Wt.legend.widthIn},scaleBar:!0,north:!0,footer:{left:"",right:"",attribution:Wt.footer.attribution,heightIn:Wt.footer.heightIn}},renderPath:"auto"}}const qf=Object.freeze(Object.defineProperty({__proto__:null,defaultPosterSpec:H2,posterDefaults:Wt},Symbol.toStringTag,{value:"Module"}));function lo(e,t){return Math.round(e*t)}function Kf(e,t){var _,h,k,L,P,G,W,K;const o=t.dpi,n=e.margins||Wt.margins,a={x:0,y:0,w:t.width,h:t.height},r={x:lo(n.left,o),y:lo(n.top,o),w:t.width-lo(n.left+n.right,o),h:t.height-lo(n.top+n.bottom,o)},s=(_=e.slots)!=null&&_.title?lo(e.slots.title.heightIn||Wt.title.heightIn,o):0,i={x:r.x,y:r.y,w:r.w,h:s},l=lo(((k=(h=e.slots)==null?void 0:h.footer)==null?void 0:k.heightIn)||Wt.footer.heightIn,o),c={x:r.x,y:r.y+r.h-l,w:r.w,h:l},u=(L=e.slots)!=null&&L.legend?lo(e.slots.legend.widthIn||Wt.legend.widthIn,o):0,d=(P=e.slots)!=null&&P.scaleBar||(G=e.slots)!=null&&G.north?lo(Wt.chromeBand.heightIn,o):0,f=r.y+s+(s?lo(Wt.gutter.in,o):0),x=c.y-d-(d?lo(Wt.gutter.in,o):0),S={x:r.x,y:f,w:r.w-(u?u+lo(Wt.gutter.in,o):0),h:x-f},y=u?{x:r.x+r.w-u,y:f,w:u,h:S.h}:{x:0,y:0,w:0,h:0},g=lo(Wt.scaleBar.widthIn,o),b=d,m=(W=e.slots)!=null&&W.scaleBar?{x:r.x,y:x+(d?lo(Wt.gutter.in,o):0),w:g,h:b}:{x:0,y:0,w:0,h:0},$=lo(Wt.north.sizeIn,o),p=(K=e.slots)!=null&&K.north?{x:r.x+r.w-$-(u?u+lo(Wt.gutter.in,o):0),y:x+(d?lo(Wt.gutter.in,o):0),w:$,h:$}:{x:0,y:0,w:0,h:0};return{page:a,content:r,title:i,map:S,legend:y,scaleBar:m,north:p,footer:c}}const U2={"©":"©","&":"&"," ":" ","<":"<",">":">",""":'"',"'":"'"};function W2(e){return e?String(e).replace(/<[^>]*>/g," ").replace(/&[a-z]+;|&#\d+;/gi,t=>U2[t.toLowerCase()]??" ").replace(/\s+/g," ").trim():""}function q2(e){if(!e||typeof e.getStyle!="function")return"";let t;try{t=e.getStyle()}catch{return""}const o=t&&t.sources||{},n=[];for(const a of Object.keys(o)){let r=null;try{r=typeof e.getSource=="function"?e.getSource(a):null}catch{r=null}const s=W2(r&&r.attribution||o[a].attribution);s&&!n.includes(s)&&n.push(s)}return n.join(" ")}const ya=4096,gn=2048,Vf=15e3;function K2(e){const t=we({phase:"idle",completed:0,total:0,message:"",fraction:0,percent:0}),o=we(!1);let n=null;async function a(y,g="png"){var $;if(o.value)throw new Error("useMapPoster: already rendering");const b=e();if(!b)throw new Error("useMapPoster: no source map");n=new AbortController;const m=X2(y.signal,n.signal);o.value=!0,l=0,c("init",1,1,"preparing render");try{const p=Yf(y),_=V2(y.renderPath||"auto",p);_==="single"&&(p.width>ya||p.height>ya)&&console.warn(`[useMapPoster] requested single-canvas ${p.width}×${p.height}px > ${ya}; auto-switching to tile-stitch.`);const h=_==="single"&&(p.width>ya||p.height>ya)?"stitch":_,k=y.layout==="poster",L=k?Kf(y,p):null,P=!!L&&L.map.w>0&&L.map.h>0;k&&!P&&console.warn('[useMapPoster] layout:"poster" asked for a map box of '+(L?L.map.w+"×"+L.map.h:"0×0")+"px; the margins, title, footer and legend column leave no room on this sheet. Falling back to a full-bleed map.");const G=P?{width:L.map.w,height:L.map.h,dpi:p.dpi}:p,W=h==="single"?await u(b,G,m):await d(b,G,m);c("compose",0,1,"compositing overlay");const K=q2(b),v=K?{...y,slots:{...y.slots,footer:{...(($=y.slots)==null?void 0:$.footer)||{},attribution:K}}}:y,N=P?f(W,L,p):W,A=await x(N,v,p);c("encode",0,1,`encoding ${g.toUpperCase()}`);const w=g==="pdf"?await J2(A,y):await Z2(A,"image/png");return c("done",1,1,"render complete"),w}finally{o.value=!1,n=null}}function r(){n&&n.abort()}const s={init:.02,"hidden-map":.3,stitch:.42,capture:.14,compose:.06,encode:.05,done:.01},i=["init","hidden-map","stitch","capture","compose","encode","done"];let l=0;function c(y,g,b,m){const $=i.indexOf(y);let p=0;for(let k=0;k<$;k++)p+=s[i[k]]||0;const _=b>0?Math.min(1,g/b):0,h=p+(s[y]||0)*_;l=y==="init"?h:Math.max(l,h),t.value={phase:y,completed:g,total:b,message:m,fraction:Math.min(1,l),percent:Math.round(Math.min(1,l)*100)}}async function u(y,g,b){c("hidden-map",0,3,"creating hidden map");const{hiddenMap:m,restoreDpr:$,container:p}=await Zf(y,g.width,g.height);try{lu(b),c("hidden-map",1,3,"loading map tiles"),await Xf(m),c("hidden-map",3,3,"tiles loaded"),lu(b),c("capture",0,1,"capturing canvas");const _=m.getCanvas().toDataURL("image/png"),h=await Qf(_),k=document.createElement("canvas");return k.width=g.width,k.height=g.height,k.getContext("2d").drawImage(h,0,0,g.width,g.height),k}finally{try{m.remove()}catch{}p!=null&&p.parentNode&&p.parentNode.removeChild(p),$()}}async function d(y,g,b){const m=Math.ceil(g.width/gn),$=Math.ceil(g.height/gn),p=m*$;c("hidden-map",0,p,`creating hidden map (${m}×${$} tiles)`);const _=y.getBounds(),h=y.getCenter(),k=y.getZoom(),L=y.getBearing(),P=y.getPitch(),{hiddenMap:G,restoreDpr:W,container:K}=await Zf(y,gn,gn,{preserveBounds:!0,bounds:_});try{const v=document.createElement("canvas");v.width=g.width,v.height=g.height;const N=v.getContext("2d"),A=_.getNorthEast(),w=_.getSouthWest(),F=(A.lng-w.lng)/m,U=G2(w.lat,A.lat,$);let I=0;for(let q=0;q<$;q++)for(let O=0;Ot&&([t,o]=[o,t]),e.orientation==="portrait"&&t>o&&([t,o]=[o,t]);const n=e.dpi||300;return{width:Math.round(t*n),height:Math.round(o*n),dpi:n}}function V2(e,t){return e==="single"||e==="stitch"?e:t.width>ya||t.height>ya?"stitch":"single"}async function Zf(e,t,o,n={}){const a=document.createElement("div");a.style.cssText=` position: fixed; top: -100000px; left: -100000px; width: ${t}px; height: ${o}px; pointer-events: none; visibility: hidden; - `,document.body.appendChild(a);const r=window.devicePixelRatio,s=()=>{try{Object.defineProperty(window,"devicePixelRatio",{value:r,configurable:!0})}catch{}};try{Object.defineProperty(window,"devicePixelRatio",{value:1,configurable:!0})}catch{}const i=typeof window<"u"?window:{},l=!!i.maplibregl&&e instanceof i.maplibregl.Map,c=gi(e);if(!c)throw new Error("useMapPoster: "+(l?"maplibregl":"mapboxgl")+" global not found");const u=e.getStyle();l&&u&&typeof u.projection=="string"&&(u.projection={type:u.projection});const d=new c.Map({container:a,style:u,center:e.getCenter(),zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),interactive:!1,attributionControl:!1,preserveDrawingBuffer:!0,canvasContextAttributes:{preserveDrawingBuffer:!0},fadeDuration:0});let f="";await new Promise((x,S)=>{let y=!1;const g=$=>{y||(y=!0,clearTimeout(b),clearInterval(m),$?S($):x())},b=setTimeout(()=>g(new Error("useMapPoster: hidden map style.load timeout"+(f?" ("+f+")":""))),Vf),m=setInterval(()=>{try{d.isStyleLoaded()&&g()}catch{}},100);d.once("style.load",()=>g()),d.once("load",()=>g()),d.on("error",$=>{var p;f=String(((p=$==null?void 0:$.error)==null?void 0:p.message)||($==null?void 0:$.message)||$).slice(0,160)})});try{const x=typeof e.getLanguage=="function"?e.getLanguage():null;x&&typeof d.setLanguage=="function"&&d.setLanguage(x)}catch{}return n.preserveBounds&&n.bounds&&d.fitBounds(n.bounds,{padding:0,animate:!1,duration:0}),{hiddenMap:d,restoreDpr:s,container:a}}const Jf=6e4;function Xf(e){return new Promise(t=>{let o=!1;const n=[],a=s=>{o||(o=!0,n.forEach(clearTimeout),s&&console.warn("[useMapPoster] "+s),requestAnimationFrame(()=>t()))},r=()=>{try{return typeof e.areTilesLoaded=="function"&&e.areTilesLoaded()}catch{return!1}};n.push(setTimeout(()=>{r()&&a()},Vf)),n.push(setTimeout(()=>a("hidden map not idle after "+Jf/1e3+"s; capturing what is drawn"),Jf)),e.loaded()&&!e.isMoving()?a():e.once("idle",()=>a())})}function Qf(e){return new Promise((t,o)=>{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>t(n),n.onerror=a=>o(new Error("image load failed: "+((a==null?void 0:a.message)||"unknown"))),n.src=typeof e=="string"?e:URL.createObjectURL(e)})}function YA(e,t,o){const n=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),a=URL.createObjectURL(n);return new Promise((r,s)=>{const i=new Image;i.onload=()=>{URL.revokeObjectURL(a),r(i)},i.onerror=l=>{URL.revokeObjectURL(a),s(new Error("svg load failed: "+((l==null?void 0:l.message)||"unknown")))},i.width=t,i.height=o,i.src=a})}function ZA(e,t){return new Promise((o,n)=>{e.toBlob(a=>a?o(a):n(new Error("toBlob failed")),t)})}async function JA(e,t){let o;try{const s=await Ft(()=>import("https://esm.sh/jspdf@4.2.1"),void 0);o=s.jsPDF||s.default}catch{throw new Error("useMapPoster.toPdf: jspdf not installed (npm i jspdf svg2pdf.js)")}const n=e.toDataURL("image/png"),a=e.width>e.height?"l":"p",r=new o({orientation:a,unit:"in",format:[t.widthIn,t.heightIn]});return r.addImage(n,"PNG",0,0,t.widthIn,t.heightIn),r.output("blob")}function lu(e){if(e!=null&&e.aborted)throw new DOMException("useMapPoster: aborted","AbortError")}function XA(...e){const t=new AbortController;for(const o of e)if(o){if(o.aborted){t.abort();break}o.addEventListener("abort",()=>t.abort(),{once:!0})}return t.signal}function em(e){return(e==null?void 0:e.dir)==="rtl"}function cu(e,t,o){return em(e)?`x="${t.w-o}" text-anchor="start" direction="rtl"`:`x="${o}"`}function QA(e,t){var a,r,s,i;const o=(((r=(a=e.slots)==null?void 0:a.title)==null?void 0:r.text)||"").replace(/[<>&]/g,va),n=(((i=(s=e.slots)==null?void 0:s.title)==null?void 0:i.subtitle)||"").replace(/[<>&]/g,va);return` + `,document.body.appendChild(a);const r=window.devicePixelRatio,s=()=>{try{Object.defineProperty(window,"devicePixelRatio",{value:r,configurable:!0})}catch{}};try{Object.defineProperty(window,"devicePixelRatio",{value:1,configurable:!0})}catch{}const i=typeof window<"u"?window:{},l=!!i.maplibregl&&e instanceof i.maplibregl.Map,c=gi(e);if(!c)throw new Error("useMapPoster: "+(l?"maplibregl":"mapboxgl")+" global not found");const u=e.getStyle();l&&u&&typeof u.projection=="string"&&(u.projection={type:u.projection});const d=new c.Map({container:a,style:u,center:e.getCenter(),zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),interactive:!1,attributionControl:!1,preserveDrawingBuffer:!0,canvasContextAttributes:{preserveDrawingBuffer:!0},fadeDuration:0});let f="";await new Promise((x,S)=>{let y=!1;const g=$=>{y||(y=!0,clearTimeout(b),clearInterval(m),$?S($):x())},b=setTimeout(()=>g(new Error("useMapPoster: hidden map style.load timeout"+(f?" ("+f+")":""))),Vf),m=setInterval(()=>{try{d.isStyleLoaded()&&g()}catch{}},100);d.once("style.load",()=>g()),d.once("load",()=>g()),d.on("error",$=>{var p;f=String(((p=$==null?void 0:$.error)==null?void 0:p.message)||($==null?void 0:$.message)||$).slice(0,160)})});try{const x=typeof e.getLanguage=="function"?e.getLanguage():null;x&&typeof d.setLanguage=="function"&&d.setLanguage(x)}catch{}return n.preserveBounds&&n.bounds&&d.fitBounds(n.bounds,{padding:0,animate:!1,duration:0}),{hiddenMap:d,restoreDpr:s,container:a}}const Jf=6e4;function Xf(e){return new Promise(t=>{let o=!1;const n=[],a=s=>{o||(o=!0,n.forEach(clearTimeout),s&&console.warn("[useMapPoster] "+s),requestAnimationFrame(()=>t()))},r=()=>{try{return typeof e.areTilesLoaded=="function"&&e.areTilesLoaded()}catch{return!1}};n.push(setTimeout(()=>{r()&&a()},Vf)),n.push(setTimeout(()=>a("hidden map not idle after "+Jf/1e3+"s; capturing what is drawn"),Jf)),e.loaded()&&!e.isMoving()?a():e.once("idle",()=>a())})}function Qf(e){return new Promise((t,o)=>{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>t(n),n.onerror=a=>o(new Error("image load failed: "+((a==null?void 0:a.message)||"unknown"))),n.src=typeof e=="string"?e:URL.createObjectURL(e)})}function Y2(e,t,o){const n=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),a=URL.createObjectURL(n);return new Promise((r,s)=>{const i=new Image;i.onload=()=>{URL.revokeObjectURL(a),r(i)},i.onerror=l=>{URL.revokeObjectURL(a),s(new Error("svg load failed: "+((l==null?void 0:l.message)||"unknown")))},i.width=t,i.height=o,i.src=a})}function Z2(e,t){return new Promise((o,n)=>{e.toBlob(a=>a?o(a):n(new Error("toBlob failed")),t)})}async function J2(e,t){let o;try{const s=await Ft(()=>import("https://esm.sh/jspdf@4.2.1"),void 0);o=s.jsPDF||s.default}catch{throw new Error("useMapPoster.toPdf: jspdf not installed (npm i jspdf svg2pdf.js)")}const n=e.toDataURL("image/png"),a=e.width>e.height?"l":"p",r=new o({orientation:a,unit:"in",format:[t.widthIn,t.heightIn]});return r.addImage(n,"PNG",0,0,t.widthIn,t.heightIn),r.output("blob")}function lu(e){if(e!=null&&e.aborted)throw new DOMException("useMapPoster: aborted","AbortError")}function X2(...e){const t=new AbortController;for(const o of e)if(o){if(o.aborted){t.abort();break}o.addEventListener("abort",()=>t.abort(),{once:!0})}return t.signal}function em(e){return(e==null?void 0:e.dir)==="rtl"}function cu(e,t,o){return em(e)?`x="${t.w-o}" text-anchor="start" direction="rtl"`:`x="${o}"`}function Q2(e,t){var a,r,s,i;const o=(((r=(a=e.slots)==null?void 0:a.title)==null?void 0:r.text)||"").replace(/[<>&]/g,va),n=(((i=(s=e.slots)==null?void 0:s.title)==null?void 0:i.subtitle)||"").replace(/[<>&]/g,va);return` ${o} ${n?`${n}`:""} - `}function e2(e,t){var x,S,y,g;const o=(((S=(x=e.slots)==null?void 0:x.legend)==null?void 0:S.rows)||[]).slice(0,24),n=(((g=(y=e.slots)==null?void 0:y.legend)==null?void 0:g.title)||"Legend").replace(/[<>&]/g,va),a=em(e),r=Math.max(14,Math.round(t.w/26)),s=Math.round(r*1.9),i=Math.round(r*1.2),l=Math.round(r*1.1),c=Math.min(t.h,l*2+s*(o.length+1)),u=a?t.w-l-i:l,d=a?`x="${t.w-l-i-Math.round(r*.7)}" text-anchor="start" direction="rtl"`:`x="${l+i+Math.round(r*.7)}"`,f=o.map((b,m)=>{const $=l+s*(m+1.5),p=(b.color||"#999").replace(/[<>&]/g,va),_=(b.label||"").replace(/[<>&]/g,va);return`${_}`}).join("");return` + `}function eA(e,t){var x,S,y,g;const o=(((S=(x=e.slots)==null?void 0:x.legend)==null?void 0:S.rows)||[]).slice(0,24),n=(((g=(y=e.slots)==null?void 0:y.legend)==null?void 0:g.title)||"Legend").replace(/[<>&]/g,va),a=em(e),r=Math.max(14,Math.round(t.w/26)),s=Math.round(r*1.9),i=Math.round(r*1.2),l=Math.round(r*1.1),c=Math.min(t.h,l*2+s*(o.length+1)),u=a?t.w-l-i:l,d=a?`x="${t.w-l-i-Math.round(r*.7)}" text-anchor="start" direction="rtl"`:`x="${l+i+Math.round(r*.7)}"`,f=o.map((b,m)=>{const $=l+s*(m+1.5),p=(b.color||"#999").replace(/[<>&]/g,va),_=(b.label||"").replace(/[<>&]/g,va);return`${_}`}).join("");return` ${n} ${f} - `}function t2(e,t){return` + `}function tA(e,t){return` scale - `}function o2(e,t){const o=Math.min(t.w,t.h);return` + `}function oA(e,t){const o=Math.min(t.w,t.h);return` N - `}function n2(e,t){var r,s,i,l,c,u;const o=(((s=(r=e.slots)==null?void 0:r.footer)==null?void 0:s.left)||"").replace(/[<>&]/g,va),n=(((l=(i=e.slots)==null?void 0:i.footer)==null?void 0:l.right)||"").replace(/[<>&]/g,va),a=((u=(c=e.slots)==null?void 0:c.footer)==null?void 0:u.attribution)||"© Mapbox © OpenStreetMap";return` + `}function nA(e,t){var r,s,i,l,c,u;const o=(((s=(r=e.slots)==null?void 0:r.footer)==null?void 0:s.left)||"").replace(/[<>&]/g,va),n=(((l=(i=e.slots)==null?void 0:i.footer)==null?void 0:l.right)||"").replace(/[<>&]/g,va),a=((u=(c=e.slots)==null?void 0:c.footer)==null?void 0:u.attribution)||"© Mapbox © OpenStreetMap";return` ${o} ${a} ${n} - `}function va(e){return e==="<"?"<":e===">"?">":"&"}const tm=Object.freeze(Object.defineProperty({__proto__:null,posterPixels:Yf,useMapPoster:KA},Symbol.toStringTag,{value:"Module"}));function uu(e,{autoprint:t=!1}={}){const o=document.createElement("iframe");o.setAttribute("aria-hidden","true"),o.style.cssText="position:fixed;right:0;bottom:0;width:1px;height:1px;opacity:0;border:0",document.body.appendChild(o);const n=o.contentDocument;if(!n)return o.remove(),null;n.open(),n.write(e),t&&n.write(' - + - + - + - + - + - + - + - + - + - + - + \n\n\n" + "script": "\n\n\n" } }, { @@ -145,8 +145,8 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -162,7 +162,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } } ] @@ -266,7 +266,7 @@ "bundle": "dashboard-plus-grid", "scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js", "output": "dx-maps/dashboard-plus-grid/dashboard-plus-grid.js", - "integrity": "sha384-PvIlMdrt01stdoJK45cLsA//xmVsT93PIIoo1nDmSbSFJTCv8to2HCkdTL/YKBso", + "integrity": "sha384-8sk7fY26f+eMLOwBerZdjUH7GNYnEWj2clP3i6dNZt1TMB5fcHHliuaumfO7XBT7", "elements": [ "dashboard-plus-grid" ], @@ -290,8 +290,8 @@ "scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "instances": [ { @@ -361,7 +361,7 @@ "bundle": "doxa-maps-spa", "scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js", "output": "dx-maps/doxa-maps-spa/doxa-maps-spa.js", - "integrity": "sha384-EdyFRzEfPtXgEry6E+h7wl3MdWoQlTxr1I+8LZOQ888LxqzlTbM08XbMZq5qIeKy", + "integrity": "sha384-sW6vaNdZBtWMZXTy4zyVRAij2cYKLTdC3T/Yqnettso/4u4CmAm0uqtzWMlm3etp", "elements": [ "doxa-maps-spa" ], @@ -389,7 +389,7 @@ "scriptUrl": "./doxa-maps-spa/doxa-maps-spa.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" }, "instances": [ { @@ -416,7 +416,7 @@ "bundle": "doxa-research-map", "scriptUrl": "./doxa-research-map/doxa-research-map.js", "output": "dx-maps/doxa-research-map/doxa-research-map.js", - "integrity": "sha384-KNPtos3z613NAADL0m0hER7OkYn9KqwXOBJ/DzSwCQv75+btRG2B+oxvq/r3cyPi", + "integrity": "sha384-3Fg88Qriwe4tz75+RVPGlBgIGqXTZ3thT9umW4SrXR1vzyda9ILiCqJRa90AvagQ", "elements": [ "doxa-research-map" ], @@ -435,8 +435,8 @@ "scriptUrl": "./doxa-research-map/doxa-research-map.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "instances": [ { @@ -462,7 +462,7 @@ "bundle": "doxa-simple-map", "scriptUrl": "./doxa-simple-map/doxa-simple-map.js", "output": "dx-maps/doxa-simple-map/doxa-simple-map.js", - "integrity": "sha384-/OEzi7tWKjcOTtbt5TuXpXZNw8pmc3IjiKvTDh6mA/LkavsMPaZ5xODosb9R7SZu", + "integrity": "sha384-7VEwsO7h3yQDHGvwNU+hD8RCLZXDpNpheKty3a1G5RVJxN16iExF4vLCspvJZOx8", "elements": [ "doxa-map", "doxa-simple-map" @@ -482,8 +482,8 @@ "scriptUrl": "./doxa-simple-map/doxa-simple-map.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "instances": [ { @@ -782,7 +782,7 @@ "bundle": "gospel-resources", "scriptUrl": "./gospel-resources/gospel-resources.js", "output": "dx-maps/gospel-resources/gospel-resources.js", - "integrity": "sha384-3UdR/WVqINM0sD+uhnHvDL/7+GYvL8CQBu6liNR9ylLvnvnPzHPwrkcpDuiG7PwY", + "integrity": "sha384-9kJ3gBJ631d7KB1luJ6K4G70DSkHuJOr4gsUuylIPjoo9yAmfMfuuwPq/iNWQTNB", "elements": [ "gospel-resources-map" ], @@ -805,7 +805,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -821,7 +821,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -837,8 +837,8 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -854,7 +854,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -870,8 +870,8 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } } ] @@ -1192,7 +1192,7 @@ "bundle": "research-dashboard", "scriptUrl": "./research-dashboard/research-dashboard.js", "output": "dx-maps/research-dashboard/research-dashboard.js", - "integrity": "sha384-4fRXJ7mIFLaRPObkuHorKSF6/qlevnVqLnzC56xTYU4CrLhGJRzvJhoyl5z4st1Z", + "integrity": "sha384-iZ5r/lnLROwFUySFeiBBYCBNDGmmDHr04Ry4+I8xP1kvDqkRurrYtYzrnseHLUAa", "elements": [ "research-dashboard-map" ], @@ -1211,8 +1211,8 @@ "scriptUrl": "./research-dashboard/research-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "bundle": "research-dashboard" } diff --git a/public/dx-maps/research-dashboard/research-dashboard.js b/public/dx-maps/research-dashboard/research-dashboard.js index 6a47cb486..9f3480631 100644 --- a/public/dx-maps/research-dashboard/research-dashboard.js +++ b/public/dx-maps/research-dashboard/research-dashboard.js @@ -463,7 +463,7 @@ border-color:rgba(46,164,79,0.30); color:#2ea44f; } -`,"share-button");const{t:o,tm:n,rt:a}=ho(),s=e,r=ue(null),i=ue(!1),l=ue(null),c=ue(null),u=ue("link"),d=ue(!1),f=ue(!1),v=ue("medium"),S={small:{label:"Small",height:400},medium:{label:"Medium",height:600},large:{label:"Large",height:800}},x=Pe("profileConfig",null),L=ne(()=>L$({embedPath:s.embedPath,profileConfig:ie(x)||null})),F=ne(()=>{const U=S[v.value].height;return''});function k(){i.value=!i.value,i.value&&(u.value="link",d.value=!1,f.value=!1)}function y(){i.value=!1}async function p(U){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(U),!0}catch{}try{const j=document.createElement("textarea");j.value=U,j.setAttribute("readonly",""),j.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.appendChild(j),j.select();const R=document.execCommand("copy");return document.body.removeChild(j),R}catch{return!1}}async function h(){await p(L.value)&&(d.value=!0,setTimeout(()=>{d.value=!1},2e3))}async function b(){await p(F.value)&&(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}const A=Pe("mapToolbar",null),m=ue(null);$t("mapToolbar",A||{el:m});const $=!A;function V(U){if(r.value=U||null,!$||!U){U||(m.value=null);return}const j=U.offsetParent||U.parentElement;j&&!j.closest(".dsm-map-area, .rm-map-area, .dm-map-area, [data-map-area]")&&j.setAttribute("data-map-area","share-fallback"),m.value=U}return(U,j)=>(oe(),ae("div",{ref:V,class:De(["share-wrap",{"share-wrap--rounded-square":e.shape==="rounded-square"}]),"data-share-root":""},[He(Bs,{ref_key:"btnEl",ref:c,"data-control":"share","is-dark":e.isDark,active:i.value,shape:e.shape,title:ie(o)("buttons.share"),onClick:k},{default:on(()=>[...j[2]||(j[2]=[I("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[I("path",{d:"M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),I("polyline",{points:"16 6 12 2 8 6"}),I("line",{x1:"12",y1:"2",x2:"12",y2:"15"})],-1)])]),_:1},8,["is-dark","active","shape","title"]),He(zy,{open:i.value,title:ie(o)("buttons.share"),"is-dark":e.isDark,onClose:y},{default:on(()=>[I("div",{ref_key:"popoverEl",ref:l,class:De(["share-pop",{light:!e.isDark}])},[I("ul",Dy,[(oe(!0),ae(Fe,null,lt(ie(n)("buttons.shareSteps"),(R,X)=>(oe(),ae("li",{key:X},se(ie(a)(R)),1))),128))]),I("div",By,[I("button",{class:De(["share-tab",{active:u.value==="link"}]),onClick:j[0]||(j[0]=R=>u.value="link")},se(t("share.embed_link","Embed link")),3),I("button",{class:De(["share-tab",{active:u.value==="embed"}]),onClick:j[1]||(j[1]=R=>u.value="embed")},se(t("share.add_to_website","Add to Your Website")),3)]),u.value==="link"?(oe(),ae("div",jy,[I("div",Hy,[I("div",Uy,se(L.value),1)]),I("button",{class:De(["share-primary-btn",{copied:d.value}]),onClick:h},[d.value?(oe(),ae("svg",Wy,[...j[4]||(j[4]=[I("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(oe(),ae("svg",Gy,[...j[3]||(j[3]=[I("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),I("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),rt(" "+se(d.value?"Copied!":"Copy Link"),1)],2)])):Ge("",!0),u.value==="embed"?(oe(),ae("div",qy,[I("div",Vy,se(t("share.embed_paste_hint","Paste this code into your website builder (WordPress, Squarespace, Wix, or any site that accepts HTML widgets).")),1),I("div",Ky,[(oe(),ae(Fe,null,lt(S,(R,X)=>I("button",{key:X,class:De(["share-size-pill",{active:v.value===X}]),onClick:D=>v.value=X},se(R.label),11,Yy)),64))]),I("div",Zy,se(F.value),1),I("button",{class:De(["share-secondary-btn",{copied:f.value}]),onClick:b},[f.value?(oe(),ae("svg",Jy,[...j[6]||(j[6]=[I("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(oe(),ae("svg",Xy,[...j[5]||(j[5]=[I("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),I("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),rt(" "+se(f.value?"Copied!":"Copy Code"),1)],2)])):Ge("",!0)],2)]),_:1},8,["open","title","is-dark"])],2))}},ev={__name:"MapInfoButton",props:{isDark:{type:Boolean,default:!1},standalone:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["standalone"],setup(e,{emit:t}){const{t:o}=ho(),n=e,a=t,s=Pe("mapToolbar",null),r=Xt(),i=ue(!1),l=ue(null),c=()=>l.value&&l.value.$el||null,u=()=>c()||s&&s.el&&s.el.value||r&&r.proxy&&r.proxy.$el&&r.proxy.$el.parentNode||null;function d(F,k){const y={el:k,ack:!1};try{F.dispatchEvent(new CustomEvent("dxmaps:mapinfo-control",{bubbles:!0,composed:!0,detail:y}))}catch{}return y.ack===!0}function f(F){for(let k=F;k;k=k.parentNode||k.host)if(k.nodeType===1&&k.hasAttribute("data-doxa-gallery"))return!0;return!1}let v=!1;function S(){const F=u();if(!F)return;const k=i.value;i.value=d(F,c()),i.value&&!k&&Gt(()=>{const y=c();y&&d(y,y)}),!i.value&&n.standalone&&!v&&!f(F)&&(v=!0,a("standalone",!0))}function x(F){if(v&&!(F&&F.detail&&F.detail.local)){v=!1,i.value=!1,a("standalone",!1),Gt(S);return}S()}function L(){const F=c();if(F)try{F.dispatchEvent(new CustomEvent("dxmaps:mapinfo-open",{bubbles:!0,composed:!0,detail:{el:F}}))}catch{}}return yt(()=>{Gt(S),window.addEventListener("dxmaps:mapinfo-host",x)}),Pt(()=>{window.removeEventListener("dxmaps:mapinfo-host",x),v&&a("standalone",!1)}),(F,k)=>i.value?(oe(),jt(Bs,{key:0,ref_key:"btn",ref:l,"data-control":"map-info","is-dark":e.isDark,shape:e.shape,title:ie(o)("mapInfo.open"),"aria-haspopup":"dialog","aria-expanded":"false",onClick:L},{default:on(()=>[...k[0]||(k[0]=[I("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[I("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor","stroke-width":"2"}),I("rect",{x:"11",y:"10",width:"2",height:"7",rx:"1",fill:"currentColor"}),I("circle",{cx:"12",cy:"7",r:"1.3",fill:"currentColor"})],-1)])]),_:1},8,["is-dark","shape","title"])):Ge("",!0)}},tv={class:"rd-left"},ov={class:"rd-brand"},nv={class:"rd-ttl"},av={class:"rd-filter-search","data-filter-search":""},sv={key:0,class:"rd-search","data-search":""},rv=["placeholder","aria-label"],iv=["data-slug"],lv={class:"nm"},cv={class:"sub"},uv={key:1,class:"rd-empty"},dv=["title","onKeydown"],pv={class:"rd-header-btns","data-header-btns":""},gv="research-dashboard/research-dashboard/index.html",fv={__name:"DashboardTopBar",setup(e){const t=(p,h)=>be("dashboard."+p)||h,o=Pe("dashboardData",null),n=Pe("selectionBus",null),a=Pe("dashboardConfig",{}),s=ne(()=>a.showTopBarSearch===!0);function r(){n&&n.emit("resetLayout")}const i=ne(()=>{var p;return((p=n==null?void 0:n.searchTerm)==null?void 0:p.value)||""}),l=ne(()=>{var p;return((p=a.researchFilters)==null?void 0:p.searchPlaceholder)||t("search_placeholder","Search people groups, place, language, religion…")});function c(p){n==null||n.setSearch((p==null?void 0:p.value)??"")}const u=ue(""),d=ue(!1),f=ue(0),v=ne(()=>{var A;const p=u.value.trim().toLowerCase();if(p.length<2)return[];const h=((A=o==null?void 0:o.rows)==null?void 0:A.value)||[],b=[];for(const m of h)if((m.name||"").toLowerCase().includes(p)&&(b.push(m),b.length>=8))break;return b});function S(p){!p||!n||(p.slug&&(n.toggleSelect(p.slug),n.emit("focusRow",{slug:p.slug,name:p.name})),u.value="",d.value=!1,f.value=0)}function x(){d.value=!0,f.value=0}function L(p){if(!v.value.length){p.key==="Escape"&&(u.value="",d.value=!1);return}p.key==="ArrowDown"?(p.preventDefault(),f.value=(f.value+1)%v.value.length):p.key==="ArrowUp"?(p.preventDefault(),f.value=(f.value-1+v.value.length)%v.value.length):p.key==="Enter"?(p.preventDefault(),S(v.value[f.value])):p.key==="Escape"&&(u.value="",d.value=!1,f.value=0)}function F(p){var m;const h=p.target&&p.target.closest&&p.target.closest("[data-slug]");if(!h)return;const b=h.getAttribute("data-slug"),A=(((m=o==null?void 0:o.rows)==null?void 0:m.value)||[]).find($=>$.slug===b);A&&S(A)}const k=ue(null);function y(p){k.value&&!k.value.contains(p.target)&&(d.value=!1)}return yt(()=>{var p,h;try{(h=(p=k.value)==null?void 0:p.getRootNode())==null||h.addEventListener("click",y)}catch{}}),Pt(()=>{var p,h;try{(h=(p=k.value)==null?void 0:p.getRootNode())==null||h.removeEventListener("click",y)}catch{}}),Ht(` +`,"share-button");const{t:o,tm:n,rt:a}=ho(),s=e,r=ue(null),i=ue(!1),l=ue(null),c=ue(null),u=ue("link"),d=ue(!1),f=ue(!1),v=ue("medium"),S={small:{label:"Small",height:400},medium:{label:"Medium",height:600},large:{label:"Large",height:800}},x=Pe("profileConfig",null),L=ne(()=>L$({embedPath:s.embedPath,profileConfig:ie(x)||null})),F=ne(()=>{const U=S[v.value].height;return''});function k(){i.value=!i.value,i.value&&(u.value="link",d.value=!1,f.value=!1)}function y(){i.value=!1}async function p(U){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(U),!0}catch{}try{const j=document.createElement("textarea");j.value=U,j.setAttribute("readonly",""),j.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.appendChild(j),j.select();const R=document.execCommand("copy");return document.body.removeChild(j),R}catch{return!1}}async function h(){await p(L.value)&&(d.value=!0,setTimeout(()=>{d.value=!1},2e3))}async function b(){await p(F.value)&&(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}const A=Pe("mapToolbar",null),m=ue(null);$t("mapToolbar",A||{el:m});const $=!A;function V(U){if(r.value=U||null,!$||!U){U||(m.value=null);return}const j=U.offsetParent||U.parentElement;j&&!j.closest(".dsm-map-area, .rm-map-area, .dm-map-area, [data-map-area]")&&j.setAttribute("data-map-area","share-fallback"),m.value=U}return(U,j)=>(oe(),ae("div",{ref:V,class:De(["share-wrap",{"share-wrap--rounded-square":e.shape==="rounded-square"}]),"data-share-root":""},[He(Bs,{ref_key:"btnEl",ref:c,"data-control":"share","is-dark":e.isDark,active:i.value,shape:e.shape,title:ie(o)("buttons.share"),onClick:k},{default:on(()=>[...j[2]||(j[2]=[I("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[I("path",{d:"M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),I("polyline",{points:"16 6 12 2 8 6"}),I("line",{x1:"12",y1:"2",x2:"12",y2:"15"})],-1)])]),_:1},8,["is-dark","active","shape","title"]),He(zy,{open:i.value,title:ie(o)("buttons.share"),"is-dark":e.isDark,onClose:y},{default:on(()=>[I("div",{ref_key:"popoverEl",ref:l,class:De(["share-pop",{light:!e.isDark}])},[I("ul",Dy,[(oe(!0),ae(Fe,null,lt(ie(n)("buttons.shareSteps"),(R,X)=>(oe(),ae("li",{key:X},se(ie(a)(R)),1))),128))]),I("div",By,[I("button",{class:De(["share-tab",{active:u.value==="link"}]),onClick:j[0]||(j[0]=R=>u.value="link")},se(t("share.embed_link","Embed link")),3),I("button",{class:De(["share-tab",{active:u.value==="embed"}]),onClick:j[1]||(j[1]=R=>u.value="embed")},se(t("share.add_to_website","Add to Your Website")),3)]),u.value==="link"?(oe(),ae("div",jy,[I("div",Hy,[I("div",Uy,se(L.value),1)]),I("button",{class:De(["share-primary-btn",{copied:d.value}]),onClick:h},[d.value?(oe(),ae("svg",Wy,[...j[4]||(j[4]=[I("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(oe(),ae("svg",Gy,[...j[3]||(j[3]=[I("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),I("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),rt(" "+se(d.value?"Copied!":"Copy Link"),1)],2)])):Ge("",!0),u.value==="embed"?(oe(),ae("div",qy,[I("div",Vy,se(t("share.embed_paste_hint","Paste this code into your website builder (WordPress, Squarespace, Wix, or any site that accepts HTML widgets).")),1),I("div",Ky,[(oe(),ae(Fe,null,lt(S,(R,X)=>I("button",{key:X,class:De(["share-size-pill",{active:v.value===X}]),onClick:D=>v.value=X},se(R.label),11,Yy)),64))]),I("div",Zy,se(F.value),1),I("button",{class:De(["share-secondary-btn",{copied:f.value}]),onClick:b},[f.value?(oe(),ae("svg",Jy,[...j[6]||(j[6]=[I("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(oe(),ae("svg",Xy,[...j[5]||(j[5]=[I("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),I("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),rt(" "+se(f.value?"Copied!":"Copy Code"),1)],2)])):Ge("",!0)],2)]),_:1},8,["open","title","is-dark"])],2))}},ev={__name:"MapInfoButton",props:{isDark:{type:Boolean,default:!1},standalone:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["standalone"],setup(e,{emit:t}){const{t:o}=ho(),n=e,a=t,s=Pe("mapToolbar",null),r=Xt(),i=ue(!1),l=ue(null),c=()=>l.value&&l.value.$el||null,u=()=>c()||s&&s.el&&s.el.value||r&&r.proxy&&r.proxy.$el&&r.proxy.$el.parentNode||null;function d(F,k){const y={el:k,ack:!1};try{F.dispatchEvent(new CustomEvent("dxmaps:mapinfo-control",{bubbles:!0,composed:!0,detail:y}))}catch{}return y.ack===!0}function f(F){for(let k=F;k;k=k.parentNode||k.host)if(k.nodeType===1&&k.hasAttribute("data-doxa-gallery"))return!0;return!1}let v=!1;function S(){const F=u();if(!F)return;const k=i.value;i.value=d(F,c()),i.value&&!k&&Gt(()=>{const y=c();y&&d(y,y)}),!i.value&&n.standalone&&!v&&!f(F)&&(v=!0,a("standalone",!0))}function x(F){if(v&&!(F&&F.detail&&F.detail.local)){v=!1,i.value=!1,a("standalone",!1),Gt(S);return}S()}function L(){const F=c();if(F)try{F.dispatchEvent(new CustomEvent("dxmaps:mapinfo-open",{bubbles:!0,composed:!0,detail:{el:F}}))}catch{}}return yt(()=>{Gt(S),window.addEventListener("dxmaps:mapinfo-host",x)}),Pt(()=>{window.removeEventListener("dxmaps:mapinfo-host",x),v&&a("standalone",!1)}),(F,k)=>i.value?(oe(),jt(Bs,{key:0,ref_key:"btn",ref:l,"data-control":"map-info","is-dark":e.isDark,shape:e.shape,title:ie(o)("mapInfo.open"),"aria-haspopup":"dialog","aria-expanded":"false",onClick:L},{default:on(()=>[...k[0]||(k[0]=[I("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},[I("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor","stroke-width":"2"}),I("path",{d:"M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),I("circle",{cx:"12",cy:"17",r:"1.3",fill:"currentColor"})],-1)])]),_:1},8,["is-dark","shape","title"])):Ge("",!0)}},tv={class:"rd-left"},ov={class:"rd-brand"},nv={class:"rd-ttl"},av={class:"rd-filter-search","data-filter-search":""},sv={key:0,class:"rd-search","data-search":""},rv=["placeholder","aria-label"],iv=["data-slug"],lv={class:"nm"},cv={class:"sub"},uv={key:1,class:"rd-empty"},dv=["title","onKeydown"],pv={class:"rd-header-btns","data-header-btns":""},gv="research-dashboard/research-dashboard/index.html",fv={__name:"DashboardTopBar",setup(e){const t=(p,h)=>be("dashboard."+p)||h,o=Pe("dashboardData",null),n=Pe("selectionBus",null),a=Pe("dashboardConfig",{}),s=ne(()=>a.showTopBarSearch===!0);function r(){n&&n.emit("resetLayout")}const i=ne(()=>{var p;return((p=n==null?void 0:n.searchTerm)==null?void 0:p.value)||""}),l=ne(()=>{var p;return((p=a.researchFilters)==null?void 0:p.searchPlaceholder)||t("search_placeholder","Search people groups, place, language, religion…")});function c(p){n==null||n.setSearch((p==null?void 0:p.value)??"")}const u=ue(""),d=ue(!1),f=ue(0),v=ne(()=>{var A;const p=u.value.trim().toLowerCase();if(p.length<2)return[];const h=((A=o==null?void 0:o.rows)==null?void 0:A.value)||[],b=[];for(const m of h)if((m.name||"").toLowerCase().includes(p)&&(b.push(m),b.length>=8))break;return b});function S(p){!p||!n||(p.slug&&(n.toggleSelect(p.slug),n.emit("focusRow",{slug:p.slug,name:p.name})),u.value="",d.value=!1,f.value=0)}function x(){d.value=!0,f.value=0}function L(p){if(!v.value.length){p.key==="Escape"&&(u.value="",d.value=!1);return}p.key==="ArrowDown"?(p.preventDefault(),f.value=(f.value+1)%v.value.length):p.key==="ArrowUp"?(p.preventDefault(),f.value=(f.value-1+v.value.length)%v.value.length):p.key==="Enter"?(p.preventDefault(),S(v.value[f.value])):p.key==="Escape"&&(u.value="",d.value=!1,f.value=0)}function F(p){var m;const h=p.target&&p.target.closest&&p.target.closest("[data-slug]");if(!h)return;const b=h.getAttribute("data-slug"),A=(((m=o==null?void 0:o.rows)==null?void 0:m.value)||[]).find($=>$.slug===b);A&&S(A)}const k=ue(null);function y(p){k.value&&!k.value.contains(p.target)&&(d.value=!1)}return yt(()=>{var p,h;try{(h=(p=k.value)==null?void 0:p.getRootNode())==null||h.addEventListener("click",y)}catch{}}),Pt(()=>{var p,h;try{(h=(p=k.value)==null?void 0:p.getRootNode())==null||h.removeEventListener("click",y)}catch{}}),Ht(` .rd-topbar{ position:relative; display:flex; align-items:center; gap:12px; height:100%; padding:0 var(--rd-edge,14px); --rd-search-w:min(360px,34%); background:var(--rd-header,#4e594f); color:var(--rd-header-ink,#f3f3f1); border-bottom:1px solid var(--rd-header-line,#3c453d); diff --git a/public/dx-maps/research-dashboard/research-dashboard/index.html b/public/dx-maps/research-dashboard/research-dashboard/index.html index 5c6ea0fc7..68ec14c8f 100644 --- a/public/dx-maps/research-dashboard/research-dashboard/index.html +++ b/public/dx-maps/research-dashboard/research-dashboard/index.html @@ -70,7 +70,7 @@ - +