diff --git a/public/dx-maps/cities-internet/cities-internet.js b/public/dx-maps/cities-internet/cities-internet.js index b0c3c12f0..00ce1071e 100644 --- a/public/dx-maps/cities-internet/cities-internet.js +++ b/public/dx-maps/cities-internet/cities-internet.js @@ -1274,4 +1274,4 @@ @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=Oe("uiStore");Oe("mapStore");const a=Oe("dataStore"),r=Oe("onSemanticTreeSelect",()=>{}),s=Oe("onLegendExport",null),i=U(()=>typeof s=="function"),l=Oe("legendExportCards",!1),c=_l(o,"legendType"),{items:u,columns:p,title:h,activeFilter:k,setFilter:v,totalCount:g,totalPopulation:d,fmtPop:m,fmtCount:$}=cd(c,yd),y=Oe("normalizedPeopleGroups",null),x=U(()=>{var ie,he;if((ie=y==null?void 0:y.value)!=null&&ie.length)return y.value;const le=[];for(const Ce in(a==null?void 0:a.sources)||{}){const Ke=a.sources[Ce];(he=Ke==null?void 0:Ke.features)!=null&&he.length&&le.push(...Ke.features)}return le}),C={get value(){return x.value}},{langTree:P}=rd(C),{affinityTree:L}=mw(C),{regionsTree:F}=Aw(C),T=[{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."}],M=[{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."}],H=[{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."}],W=U(()=>["prayer","engagement","adoption","religion"].includes(o.legendType));function q(le){const ie=[];for(const he of le){ie.push({id:he.key,label:he.label,color:he.color,count:he.count??0,pop:he.population??0,filter:he.filterKey?["==",["get","_flat_filter"],he.filterKey]:null,children:[]});for(const Ce of he.children||[])ie.push({id:Ce.key,label:Ce.label,color:Ce.color,count:Ce.count??0,pop:Ce.population??0,filter:Ce.filterKey?["==",["get","_flat_filter"],Ce.filterKey]:null,children:[]})}return ie}const ce=U(()=>o.nodes?o.nodes:W.value?q(u.value):o.legendType==="affinity-block"?L.value:o.legendType==="doxa-regions"?F.value:P.value),Z=U(()=>o.nodes?o.tabs:W.value?null:o.legendType==="affinity-block"?M:o.legendType==="doxa-regions"?H:T),V=U(()=>o.title?o.title:W.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")),re=U(()=>o.columnLabel!==null?o.columnLabel:["religion","prayer","engagement","adoption"].includes(o.legendType)?t("legend.colLabel."+o.legendType):W.value?t("legend.colLabel.status"):""),te=ue(null),oe=ue(!1),G={pending:null,active:!1,startY:0,startH:0,startState:"",containerH:0,maxH:0,lastH:0};let se=0;const be=()=>Date.now()-se<400,we=U(()=>n.legendState),Me=U(()=>we.value!=="collapsed"),me=U(()=>n.legendHeight),Se=U(()=>n.caretRotation),Re=U(()=>n.showPullTab),st=U(()=>we.value==="open"&&!n._customLegendHeight);let Qe=!1;He(()=>n.isMobile,le=>{!le||Qe||(Qe=!0,n.selectedPeopleGroup||n.collapseLegend())},{immediate:!0});const at=U(()=>n.legendMode),nt=U(()=>n.selectedPeopleGroup),A=Oe("normalizedPeopleGroups",null),N=U(()=>{var ie,he;if((ie=A==null?void 0:A.value)!=null&&ie.length)return Mi(A.value);const le=[];for(const Ce in(a==null?void 0:a.sources)||{}){const Ke=a.sources[Ce];(he=Ke==null?void 0:Ke.features)!=null&&he.length&&le.push(...Ke.features)}return Mi(le)}),S=U(()=>nt.value?$d(N.value,nt.value):[]),J=U(()=>{var le;return at.value==="detail"&&nt.value?((le=nt.value.properties)==null?void 0:le.name)||t("legend.header.peopleGroupFallback"):we.value==="collapsed"?o.title||t("legend.header.collapsed"):o.title||h.value});function ee(le){n.handleLegendItemClick(),v(le)}function Q(){be()||n.toggleLegend()}function de(){be()||(n.selectPeopleGroup(null),n.openLegend())}const pe=U(()=>{var ie;if(!nt.value)return null;const le=nt.value.properties||{};return le.imageUrl||((ie=le._raw)==null?void 0:ie.ImageURL)||null});function _(le){var Ke;if(we.value==="collapsed"){G.pending="hold",G.active=!1;return}const ie=le.touches[0],he=te.value;!ie||!he||!(ie.clientY-he.getBoundingClientRect().top<=Rw)||(G.pending="grab",G.active=!1,G.startY=ie.clientY,G.startH=he.offsetHeight,G.lastH=G.startH,G.startState=we.value,G.containerH=((Ke=he.parentElement)==null?void 0:Ke.offsetHeight)||window.innerHeight,G.maxH=G.containerH-kd)}function f(le){if(!G.pending&&!G.active)return;if(G.pending==="hold"){le.cancelable&&le.preventDefault();return}const ie=le.touches[0];if(!ie)return;const he=G.startY-ie.clientY;if(!G.active){if(he===0)return;G.pending=null,G.active=!0,oe.value=!0}le.preventDefault();const Ce=Math.round(Math.min(G.maxH,Math.max(xd,G.startH+he)));G.lastH=Ce,n.setLegendHeight(`${Ce}px`)}function B(){if(G.pending=null,!G.active)return;G.active=!1,oe.value=!1,se=Date.now();const le=G.lastH,ie=le-G.startH,he=G.containerH*.3;if(at.value!=="detail"){le0?n.fullyOpenLegend():G.startState==="fullyOpen"?n.openLegend():n.collapseLegend()}function Y(le){le==="fullyOpen"?n.fullyOpenLegend():le==="collapsed"?n.collapseLegend():n.openLegend()}let ae=null;Lt(()=>{const le=te.value,ie=le&&le.getRootNode?le.getRootNode():null;ae=ie&&ie.host?ie.host:typeof document<"u"?document.documentElement:null,ae&&(ae.__lmCount=(ae.__lmCount||0)+1,ae.classList.add(Cd))}),wt(()=>{ae&&(ae.__lmCount=Math.max(0,(ae.__lmCount||1)-1),ae.__lmCount||ae.classList.remove(Cd),ae=null)});let ne=0;function D(le){const ie=te.value;if(!ie||!ie.isConnected)return;const he=le?0:ie.offsetHeight,Ce=he>0?we.value==="collapsed"?"collapsed":"open":"gone";ie.dispatchEvent(new CustomEvent(zw,{bubbles:!0,composed:!0,detail:{height:he,collapsedHeight:xd,state:Ce}}))}function w(){ne||typeof requestAnimationFrame>"u"||(ne=requestAnimationFrame(()=>{ne=0,D(!1)}))}He(we,()=>w()),Lt(()=>{const le=te.value;le&&(le.addEventListener("transitionend",w),window.addEventListener("resize",w),w())}),wt(()=>{ne&&(cancelAnimationFrame(ne),ne=0);const le=te.value;le&&le.removeEventListener("transitionend",w),window.removeEventListener("resize",w),D(!0)});let I=null,X=null,_e=null;Lt(()=>{const le=te.value;if(!le||typeof ResizeObserver>"u")return;const ie=le.getRootNode();X=ie instanceof ShadowRoot?ie.host:ie.documentElement||null,X&&(_e=le,I=new ResizeObserver(()=>{w();const he=le.offsetHeight;he<=0||(X.style.setProperty(Ad,`${he}px`),X.__legendSheetVarOwner=le)}),I.observe(le))}),wt(()=>{I&&(I.disconnect(),I=null),X&&X.__legendSheetVarOwner===_e&&(X.style.removeProperty(Ad),X.__legendSheetVarOwner=null),X=null,_e=null});let $e=0;function Le(le){$e=0;const ie=te.value,he=ie&&ie.getRootNode?ie.getRootNode():null;if(!he||!he.querySelector)return;const Ce=he.querySelector(".maplibregl-ctrl-attrib.maplibregl-compact-show, .mapboxgl-ctrl-attrib.mapboxgl-compact-show");if(Ce){$e=setTimeout(()=>{$e=0,n.isMobile&&Ce.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")},Gw);return}const Ke=he.querySelector(".maplibregl-ctrl-attrib, .mapboxgl-ctrl-attrib");Ke&&!/attrib-empty/.test(Ke.className)||le>0&&($e=setTimeout(()=>Le(le-1),500))}return Lt(()=>Le(60)),wt(()=>{$e&&(clearTimeout($e),$e=0)}),(le,ie)=>{var he;return E(),R("div",Sw,[at.value==="detail"&&nt.value&&we.value==="open"&&pe.value?(E(),R("div",{key:0,class:"floating-mini-image",onClick:ie[0]||(ie[0]=Ce=>j(n).fullyOpenLegend())},[b("img",{src:pe.value,alt:(he=nt.value.properties)==null?void 0:he.name,class:"mini-image"},null,8,Lw)])):ge("",!0),b("div",{ref_key:"sheetRef",ref:te,class:ke(["legend-mobile-sheet",[we.value,{"sheet-dark":e.isDark,dragging:oe.value,fit:st.value}]]),style:We({height:st.value?"auto":me.value,"--legend-sheet-top-reserve":kd+"px"}),onTouchstart:_,onTouchmove:f,onTouchend:B,onTouchcancel:B},[b("div",{class:"sheet-drag-strip",onClick:Q},[Re.value?(E(),R("div",Tw)):ge("",!0)]),at.value==="detail"&&we.value!=="collapsed"?(E(),R("button",{key:0,class:"detail-collapse-btn-mobile",onClick:ct(Q,["stop"]),"aria-expanded":String(Me.value),"aria-label":j(t)("aria.toggleLegend")},null,8,Nw)):ge("",!0),at.value==="detail"&&we.value!=="collapsed"?(E(),R("button",{key:1,class:"detail-close-btn",onClick:ct(de,["stop"]),"aria-label":j(t)("aria.backToLegend")},[...ie[2]||(ie[2]=[b("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[b("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,Ow)):ge("",!0),we.value==="collapsed"&&at.value==="detail"&&nt.value?(E(),R("div",{key:2,class:"collapsed-detail-footer",onClick:Q},[b("button",{class:"mobile-collapse-caret",style:We({transform:`rotate(${Se.value}deg)`}),"aria-expanded":String(Me.value),"aria-label":j(t)("aria.toggleLegend"),tabindex:"-1"},[...ie[3]||(ie[3]=[b("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Ew),b("span",Fw,z(J.value),1)])):ge("",!0),b("div",Mw,[at.value==="detail"&&nt.value?(E(),R(ve,{key:0},[we.value!=="collapsed"?(E(),Je(fd,{key:0,peopleGroup:nt.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):ge("",!0),we.value!=="collapsed"?(E(),Je(Cr,{key:1,shared:S.value,dark:e.isDark},null,8,["shared","dark"])):ge("",!0)],64)):e.legendType!=="default"?(E(),Je(Qv,{key:1,"pin-note":!1,nodes:ce.value,tabs:Z.value,"default-tab":e.defaultTab,title:J.value||V.value,hideTabs:e.nodes?!e.tabs:W.value,columnLabel:re.value,columns:e.columns||["count","pop"],"export-enabled":i.value,"export-cards":i.value&&j(l)===!0,onSelect:j(r),onExport:ie[1]||(ie[1]=Ce=>j(s)&&j(s)(Ce))},{"title-caret":Dt(()=>[b("button",{class:"mobile-collapse-caret",style:We({transform:`rotate(${Se.value}deg)`}),onClick:ct(Q,["stop"]),"aria-expanded":String(Me.value),"aria-label":j(t)("aria.toggleLegend")},[...ie[4]||(ie[4]=[b("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Iw)]),_:1},8,["nodes","tabs","default-tab","title","hideTabs","columnLabel","columns","export-enabled","export-cards","onSelect"])):(E(),Je(pd,{key:2,title:J.value,items:j(u),columns:j(p),activeFilter:j(k),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:j(g),totalPopulation:j(d),fmtPop:j(m),fmtCount:j($),onFilterClick:ee},{"title-caret":Dt(()=>[b("button",{class:"mobile-collapse-caret",style:We({transform:`rotate(${Se.value}deg)`}),onClick:ct(Q,["stop"]),"aria-expanded":String(Me.value),"aria-label":j(t)("aria.toggleLegend")},[...ie[5]||(ie[5]=[b("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Dw)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],38)])}}},[["styles",[Pw]],["__scopeId","data-v-27f25155"]])},Symbol.toStringTag,{value:"Module"}))})(); +`,"legend-mobile-sheet");const o=e,n=Oe("uiStore");Oe("mapStore");const a=Oe("dataStore"),r=Oe("onSemanticTreeSelect",()=>{}),s=Oe("onLegendExport",null),i=U(()=>typeof s=="function"),l=Oe("legendExportCards",!1),c=_l(o,"legendType"),{items:u,columns:p,title:h,activeFilter:k,setFilter:v,totalCount:g,totalPopulation:d,fmtPop:m,fmtCount:$}=cd(c,yd),y=Oe("normalizedPeopleGroups",null),x=U(()=>{var ie,he;if((ie=y==null?void 0:y.value)!=null&&ie.length)return y.value;const le=[];for(const Ce in(a==null?void 0:a.sources)||{}){const Ke=a.sources[Ce];(he=Ke==null?void 0:Ke.features)!=null&&he.length&&le.push(...Ke.features)}return le}),C={get value(){return x.value}},{langTree:P}=rd(C),{affinityTree:L}=mw(C),{regionsTree:F}=Aw(C),T=[{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."}],M=[{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."}],H=[{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."}],W=U(()=>["prayer","engagement","adoption","religion"].includes(o.legendType));function q(le){const ie=[];for(const he of le){ie.push({id:he.key,label:he.label,color:he.color,count:he.count??0,pop:he.population??0,filter:he.filterKey?["==",["get","_flat_filter"],he.filterKey]:null,children:[]});for(const Ce of he.children||[])ie.push({id:Ce.key,label:Ce.label,color:Ce.color,count:Ce.count??0,pop:Ce.population??0,filter:Ce.filterKey?["==",["get","_flat_filter"],Ce.filterKey]:null,children:[]})}return ie}const ce=U(()=>o.nodes?o.nodes:W.value?q(u.value):o.legendType==="affinity-block"?L.value:o.legendType==="doxa-regions"?F.value:P.value),Z=U(()=>o.nodes?o.tabs:W.value?null:o.legendType==="affinity-block"?M:o.legendType==="doxa-regions"?H:T),V=U(()=>o.title?o.title:W.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")),re=U(()=>o.columnLabel!==null?o.columnLabel:["religion","prayer","engagement","adoption"].includes(o.legendType)?t("legend.colLabel."+o.legendType):W.value?t("legend.colLabel.status"):""),te=ue(null),oe=ue(!1),G={pending:null,active:!1,startY:0,startH:0,startState:"",containerH:0,maxH:0,lastH:0};let se=0;const be=()=>Date.now()-se<400,we=U(()=>n.legendState),Me=U(()=>we.value!=="collapsed"),me=U(()=>n.legendHeight),Se=U(()=>n.caretRotation),Re=U(()=>n.showPullTab),st=U(()=>we.value==="open"&&!n._customLegendHeight);let Qe=!1;He(()=>n.isMobile,le=>{!le||Qe||(Qe=!0,n.selectedPeopleGroup||n.collapseLegend())},{immediate:!0});const at=U(()=>n.legendMode),nt=U(()=>n.selectedPeopleGroup),A=Oe("normalizedPeopleGroups",null),N=U(()=>{var ie,he;if((ie=A==null?void 0:A.value)!=null&&ie.length)return Mi(A.value);const le=[];for(const Ce in(a==null?void 0:a.sources)||{}){const Ke=a.sources[Ce];(he=Ke==null?void 0:Ke.features)!=null&&he.length&&le.push(...Ke.features)}return Mi(le)}),S=U(()=>nt.value?$d(N.value,nt.value):[]),J=U(()=>{var le;return at.value==="detail"&&nt.value?((le=nt.value.properties)==null?void 0:le.name)||t("legend.header.peopleGroupFallback"):we.value==="collapsed"?o.title||t("legend.header.collapsed"):o.title||h.value});function ee(le){n.handleLegendItemClick(),v(le)}function Q(){be()||n.toggleLegend()}function de(){be()||(n.selectPeopleGroup(null),n.openLegend())}const pe=U(()=>{var ie;if(!nt.value)return null;const le=nt.value.properties||{};return le.imageUrl||((ie=le._raw)==null?void 0:ie.ImageURL)||null});function _(le){var Ke;if(we.value==="collapsed"){G.pending="hold",G.active=!1;return}const ie=le.touches[0],he=te.value;!ie||!he||!(ie.clientY-he.getBoundingClientRect().top<=Rw)||(G.pending="grab",G.active=!1,G.startY=ie.clientY,G.startH=he.offsetHeight,G.lastH=G.startH,G.startState=we.value,G.containerH=((Ke=he.parentElement)==null?void 0:Ke.offsetHeight)||window.innerHeight,G.maxH=G.containerH-kd)}function f(le){if(!G.pending&&!G.active)return;if(G.pending==="hold"){le.cancelable&&le.preventDefault();return}const ie=le.touches[0];if(!ie)return;const he=G.startY-ie.clientY;if(!G.active){if(he===0)return;G.pending=null,G.active=!0,oe.value=!0}le.preventDefault();const Ce=Math.round(Math.min(G.maxH,Math.max(xd,G.startH+he)));G.lastH=Ce,n.setLegendHeight(`${Ce}px`)}function B(){if(G.pending=null,!G.active)return;G.active=!1,oe.value=!1,se=Date.now();const le=G.lastH,ie=le-G.startH,he=G.containerH*.3;if(at.value!=="detail"){le0?n.fullyOpenLegend():G.startState==="fullyOpen"?n.openLegend():n.collapseLegend()}function Y(le){le==="fullyOpen"?n.fullyOpenLegend():le==="collapsed"?n.collapseLegend():n.openLegend()}let ae=null;Lt(()=>{const le=te.value,ie=le&&le.getRootNode?le.getRootNode():null;ae=ie&&ie.host?ie.host:typeof document<"u"?document.documentElement:null,ae&&(ae.__lmCount=(ae.__lmCount||0)+1,ae.classList.add(Cd))}),wt(()=>{ae&&(ae.__lmCount=Math.max(0,(ae.__lmCount||1)-1),ae.__lmCount||ae.classList.remove(Cd),ae=null)});let ne=0;function D(le){const ie=te.value;if(!ie||!ie.isConnected)return;const he=le?0:ie.offsetHeight,Ce=he>0?we.value==="collapsed"?"collapsed":"open":"gone";ie.dispatchEvent(new CustomEvent(zw,{bubbles:!0,composed:!0,detail:{height:he,collapsedHeight:xd,state:Ce}}))}function w(){ne||typeof requestAnimationFrame>"u"||(ne=requestAnimationFrame(()=>{ne=0,D(!1)}))}He(we,()=>w()),Lt(()=>{const le=te.value;le&&(le.addEventListener("transitionend",w),window.addEventListener("resize",w),w())}),wt(()=>{ne&&(cancelAnimationFrame(ne),ne=0);const le=te.value;le&&le.removeEventListener("transitionend",w),window.removeEventListener("resize",w),D(!0)});let I=null,X=null,_e=null;Lt(()=>{const le=te.value;if(!le||typeof ResizeObserver>"u")return;const ie=le.getRootNode();X=ie instanceof ShadowRoot?ie.host:ie.documentElement||null,X&&(_e=le,I=new ResizeObserver(()=>{w();const he=le.offsetHeight;he<=0||(X.style.setProperty(Ad,`${he}px`),X.__legendSheetVarOwner=le)}),I.observe(le))}),wt(()=>{I&&(I.disconnect(),I=null),X&&X.__legendSheetVarOwner===_e&&(X.style.removeProperty(Ad),X.__legendSheetVarOwner=null),X=null,_e=null});let $e=0;function Le(le){$e=0;const ie=te.value,he=ie&&ie.getRootNode?ie.getRootNode():null;if(!he||!he.querySelector)return;const Ce=he.querySelector(".maplibregl-ctrl-attrib.maplibregl-compact-show, .mapboxgl-ctrl-attrib.mapboxgl-compact-show");if(Ce){$e=setTimeout(()=>{$e=0,n.isMobile&&Ce.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")},Gw);return}const Ke=he.querySelector(".maplibregl-ctrl-attrib, .mapboxgl-ctrl-attrib");Ke&&/(maplibregl|mapboxgl)-compact(\s|$)/.test(Ke.className)||le>0&&($e=setTimeout(()=>Le(le-1),500))}return Lt(()=>Le(60)),wt(()=>{$e&&(clearTimeout($e),$e=0)}),(le,ie)=>{var he;return E(),R("div",Sw,[at.value==="detail"&&nt.value&&we.value==="open"&&pe.value?(E(),R("div",{key:0,class:"floating-mini-image",onClick:ie[0]||(ie[0]=Ce=>j(n).fullyOpenLegend())},[b("img",{src:pe.value,alt:(he=nt.value.properties)==null?void 0:he.name,class:"mini-image"},null,8,Lw)])):ge("",!0),b("div",{ref_key:"sheetRef",ref:te,class:ke(["legend-mobile-sheet",[we.value,{"sheet-dark":e.isDark,dragging:oe.value,fit:st.value}]]),style:We({height:st.value?"auto":me.value,"--legend-sheet-top-reserve":kd+"px"}),onTouchstart:_,onTouchmove:f,onTouchend:B,onTouchcancel:B},[b("div",{class:"sheet-drag-strip",onClick:Q},[Re.value?(E(),R("div",Tw)):ge("",!0)]),at.value==="detail"&&we.value!=="collapsed"?(E(),R("button",{key:0,class:"detail-collapse-btn-mobile",onClick:ct(Q,["stop"]),"aria-expanded":String(Me.value),"aria-label":j(t)("aria.toggleLegend")},null,8,Nw)):ge("",!0),at.value==="detail"&&we.value!=="collapsed"?(E(),R("button",{key:1,class:"detail-close-btn",onClick:ct(de,["stop"]),"aria-label":j(t)("aria.backToLegend")},[...ie[2]||(ie[2]=[b("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[b("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,Ow)):ge("",!0),we.value==="collapsed"&&at.value==="detail"&&nt.value?(E(),R("div",{key:2,class:"collapsed-detail-footer",onClick:Q},[b("button",{class:"mobile-collapse-caret",style:We({transform:`rotate(${Se.value}deg)`}),"aria-expanded":String(Me.value),"aria-label":j(t)("aria.toggleLegend"),tabindex:"-1"},[...ie[3]||(ie[3]=[b("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Ew),b("span",Fw,z(J.value),1)])):ge("",!0),b("div",Mw,[at.value==="detail"&&nt.value?(E(),R(ve,{key:0},[we.value!=="collapsed"?(E(),Je(fd,{key:0,peopleGroup:nt.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):ge("",!0),we.value!=="collapsed"?(E(),Je(Cr,{key:1,shared:S.value,dark:e.isDark},null,8,["shared","dark"])):ge("",!0)],64)):e.legendType!=="default"?(E(),Je(Qv,{key:1,"pin-note":!1,nodes:ce.value,tabs:Z.value,"default-tab":e.defaultTab,title:J.value||V.value,hideTabs:e.nodes?!e.tabs:W.value,columnLabel:re.value,columns:e.columns||["count","pop"],"export-enabled":i.value,"export-cards":i.value&&j(l)===!0,onSelect:j(r),onExport:ie[1]||(ie[1]=Ce=>j(s)&&j(s)(Ce))},{"title-caret":Dt(()=>[b("button",{class:"mobile-collapse-caret",style:We({transform:`rotate(${Se.value}deg)`}),onClick:ct(Q,["stop"]),"aria-expanded":String(Me.value),"aria-label":j(t)("aria.toggleLegend")},[...ie[4]||(ie[4]=[b("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Iw)]),_:1},8,["nodes","tabs","default-tab","title","hideTabs","columnLabel","columns","export-enabled","export-cards","onSelect"])):(E(),Je(pd,{key:2,title:J.value,items:j(u),columns:j(p),activeFilter:j(k),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:j(g),totalPopulation:j(d),fmtPop:j(m),fmtCount:j($),onFilterClick:ee},{"title-caret":Dt(()=>[b("button",{class:"mobile-collapse-caret",style:We({transform:`rotate(${Se.value}deg)`}),onClick:ct(Q,["stop"]),"aria-expanded":String(Me.value),"aria-label":j(t)("aria.toggleLegend")},[...ie[5]||(ie[5]=[b("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[b("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Dw)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],38)])}}},[["styles",[Pw]],["__scopeId","data-v-931392c5"]])},Symbol.toStringTag,{value:"Module"}))})(); diff --git a/public/dx-maps/cities-internet/connectivity-list/index.html b/public/dx-maps/cities-internet/connectivity-list/index.html index 54dd02aab..96e7013be 100644 --- a/public/dx-maps/cities-internet/connectivity-list/index.html +++ b/public/dx-maps/cities-internet/connectivity-list/index.html @@ -67,7 +67,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" } } ] @@ -200,7 +200,7 @@ "bundle": "country-posters", "scriptUrl": "./country-posters/country-posters.js", "output": "dx-maps/country-posters/country-posters.js", - "integrity": "sha384-y6QRHZJrbU5N5EDaCq4egqT+Kz3hhQlj6O0ywW+7dDQnsi2IU/MAaIAeutymWF4X", + "integrity": "sha384-cxtNgvnqEyXxhpAZacJYkOPMFG3iebBoIj/053T17nV/dqSHwWpgmcM3JXNq9yZr", "elements": [ "country-posters-map" ], @@ -223,8 +223,8 @@ "scriptUrl": "./country-posters/country-posters.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" } }, { @@ -240,7 +240,7 @@ "scriptUrl": "./country-posters/country-posters.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -256,8 +256,8 @@ "scriptUrl": "./country-posters/country-posters.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" } } ] @@ -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-v6FhZTlAmsMNoqNzTniKluH5tHLVLC7Q5HW+C8emiVMf2vcXPOh7zq05XOZk5aU2", + "integrity": "sha384-avlkHxsWgCQgiSW/r+mT7d0/Nk87QKTASmKuwQSDS7xUtmoaVX9Y9htJKREELlCn", "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-GzqpF+lfBjJAFnYaHC60PEsBak3wxHCVIIz3jcSxqhJI5lQY7oJpzScxlhOrqq4R", + "integrity": "sha384-CFvpV0+z5UkqIULO4kqU36/z39+M3MgofthE1JlixDcUzDYUofQo08bWe/lIkFmo", "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": [ { @@ -880,7 +880,7 @@ "bundle": "my-upg-100-list", "scriptUrl": "./my-upg-100-list/my-upg-100-list.js", "output": "dx-maps/my-upg-100-list/my-upg-100-list.js", - "integrity": "sha384-m8twdIW8Lu8s/0HVnirPvP3yBE0aKIduqNju1zrHlwBqhI5s8qdZbKEKGJ3zumH9", + "integrity": "sha384-EiOfexZFEHHJmqRKKEGk2IdB6q6SahM1dPfLOhgdWFa9sBCcQuLJBbqsp1ygCYjs", "elements": [ "my-upg-100-list-map" ], @@ -903,7 +903,7 @@ "scriptUrl": "./my-upg-100-list/my-upg-100-list.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -919,8 +919,8 @@ "scriptUrl": "./my-upg-100-list/my-upg-100-list.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" } }, { @@ -936,8 +936,8 @@ "scriptUrl": "./my-upg-100-list/my-upg-100-list.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" } } ] 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 0eb580df3..32318b4e9 100644 --- a/public/dx-maps/doxa-research-map/doxa-research-map.js +++ b/public/dx-maps/doxa-research-map/doxa-research-map.js @@ -1604,7 +1604,7 @@ @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=Ge("uiStore");Ge("mapStore");const a=Ge("dataStore"),r=Ge("onSemanticTreeSelect",()=>{}),s=Ge("onLegendExport",null),i=te(()=>typeof s=="function"),l=Ge("legendExportCards",!1),c=Ms(o,"legendType"),{items:u,columns:g,title:h,activeFilter:x,setFilter:k,totalCount:$,totalPopulation:b,fmtPop:m,fmtCount:d}=os(c,Ni),_=Ge("normalizedPeopleGroups",null),p=te(()=>{var De,ze;if((De=_==null?void 0:_.value)!=null&&De.length)return _.value;const Re=[];for(const Je in(a==null?void 0:a.sources)||{}){const ft=a.sources[Je];(ze=ft==null?void 0:ft.features)!=null&&ze.length&&Re.push(...ft.features)}return Re}),y={get value(){return p.value}},{langTree:f}=eu(y),{affinityTree:w}=Ef(y),{regionsTree:A}=Mf(y),S=[{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."}],q=[{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(Re){const De=[];for(const ze of Re){De.push({id:ze.key,label:ze.label,color:ze.color,count:ze.count??0,pop:ze.population??0,filter:ze.filterKey?["==",["get","_flat_filter"],ze.filterKey]:null,children:[]});for(const Je of ze.children||[])De.push({id:Je.key,label:Je.label,color:Je.color,count:Je.count??0,pop:Je.population??0,filter:Je.filterKey?["==",["get","_flat_filter"],Je.filterKey]:null,children:[]})}return De}const I=te(()=>o.nodes?o.nodes:K.value?v(u.value):o.legendType==="affinity-block"?w.value:o.legendType==="doxa-regions"?A.value:f.value),P=te(()=>o.nodes?o.tabs:K.value?null:o.legendType==="affinity-block"?G:o.legendType==="doxa-regions"?q:S),T=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")),U=te(()=>o.columnLabel!==null?o.columnLabel:["religion","prayer","engagement","adoption"].includes(o.legendType)?t("legend.colLabel."+o.legendType):K.value?t("legend.colLabel.status"):""),C=ke(null),D=ke(!1),N={pending:null,active:!1,startY:0,startH:0,startState:"",containerH:0,maxH:0,lastH:0};let W=0;const O=()=>Date.now()-W<400,ae=te(()=>n.legendState),pe=te(()=>ae.value!=="collapsed"),ye=te(()=>n.legendHeight),Se=te(()=>n.caretRotation),xe=te(()=>n.showPullTab),Q=te(()=>ae.value==="open"&&!n._customLegendHeight);let Z=!1;We(()=>n.isMobile,Re=>{!Re||Z||(Z=!0,n.selectedPeopleGroup||n.collapseLegend())},{immediate:!0});const le=te(()=>n.legendMode),we=te(()=>n.selectedPeopleGroup),R=Ge("normalizedPeopleGroups",null),z=te(()=>{var De,ze;if((De=R==null?void 0:R.value)!=null&&De.length)return su(R.value);const Re=[];for(const Je in(a==null?void 0:a.sources)||{}){const ft=a.sources[Je];(ze=ft==null?void 0:ft.features)!=null&&ze.length&&Re.push(...ft.features)}return su(Re)}),B=te(()=>we.value?xf(z.value,we.value):[]),V=te(()=>{var Re;return le.value==="detail"&&we.value?((Re=we.value.properties)==null?void 0:Re.name)||t("legend.header.peopleGroupFallback"):ae.value==="collapsed"?o.title||t("legend.header.collapsed"):o.title||h.value});function ne(Re){n.handleLegendItemClick(),k(Re)}function H(){O()||n.toggleLegend()}function se(){O()||(n.selectPeopleGroup(null),n.openLegend())}const fe=te(()=>{var De;if(!we.value)return null;const Re=we.value.properties||{};return Re.imageUrl||((De=Re._raw)==null?void 0:De.ImageURL)||null});function M(Re){var ft;if(ae.value==="collapsed"){N.pending="hold",N.active=!1;return}const De=Re.touches[0],ze=C.value;!De||!ze||!(De.clientY-ze.getBoundingClientRect().top<=NP)||(N.pending="grab",N.active=!1,N.startY=De.clientY,N.startH=ze.offsetHeight,N.lastH=N.startH,N.startState=ae.value,N.containerH=((ft=ze.parentElement)==null?void 0:ft.offsetHeight)||window.innerHeight,N.maxH=N.containerH-Of)}function L(Re){if(!N.pending&&!N.active)return;if(N.pending==="hold"){Re.cancelable&&Re.preventDefault();return}const De=Re.touches[0];if(!De)return;const ze=N.startY-De.clientY;if(!N.active){if(ze===0)return;N.pending=null,N.active=!0,D.value=!0}Re.preventDefault();const Je=Math.round(Math.min(N.maxH,Math.max(zf,N.startH+ze)));N.lastH=Je,n.setLegendHeight(`${Je}px`)}function J(){if(N.pending=null,!N.active)return;N.active=!1,D.value=!1,W=Date.now();const Re=N.lastH,De=Re-N.startH,ze=N.containerH*.3;if(le.value!=="detail"){Re0?n.fullyOpenLegend():N.startState==="fullyOpen"?n.openLegend():n.collapseLegend()}function ce(Re){Re==="fullyOpen"?n.fullyOpenLegend():Re==="collapsed"?n.collapseLegend():n.openLegend()}let $e=null;_o(()=>{const Re=C.value,De=Re&&Re.getRootNode?Re.getRootNode():null;$e=De&&De.host?De.host:typeof document<"u"?document.documentElement:null,$e&&($e.__lmCount=($e.__lmCount||0)+1,$e.classList.add(jf))}),ro(()=>{$e&&($e.__lmCount=Math.max(0,($e.__lmCount||1)-1),$e.__lmCount||$e.classList.remove(jf),$e=null)});let ve=0;function X(Re){const De=C.value;if(!De||!De.isConnected)return;const ze=Re?0:De.offsetHeight,Je=ze>0?ae.value==="collapsed"?"collapsed":"open":"gone";De.dispatchEvent(new CustomEvent(DP,{bubbles:!0,composed:!0,detail:{height:ze,collapsedHeight:zf,state:Je}}))}function ie(){ve||typeof requestAnimationFrame>"u"||(ve=requestAnimationFrame(()=>{ve=0,X(!1)}))}We(ae,()=>ie()),_o(()=>{const Re=C.value;Re&&(Re.addEventListener("transitionend",ie),window.addEventListener("resize",ie),ie())}),ro(()=>{ve&&(cancelAnimationFrame(ve),ve=0);const Re=C.value;Re&&Re.removeEventListener("transitionend",ie),window.removeEventListener("resize",ie),X(!0)});let Fe=null,Ie=null,lt=null;_o(()=>{const Re=C.value;if(!Re||typeof ResizeObserver>"u")return;const De=Re.getRootNode();Ie=De instanceof ShadowRoot?De.host:De.documentElement||null,Ie&&(lt=Re,Fe=new ResizeObserver(()=>{ie();const ze=Re.offsetHeight;ze<=0||(Ie.style.setProperty(Bf,`${ze}px`),Ie.__legendSheetVarOwner=Re)}),Fe.observe(Re))}),ro(()=>{Fe&&(Fe.disconnect(),Fe=null),Ie&&Ie.__legendSheetVarOwner===lt&&(Ie.style.removeProperty(Bf),Ie.__legendSheetVarOwner=null),Ie=null,lt=null});let ht=0;function vt(Re){ht=0;const De=C.value,ze=De&&De.getRootNode?De.getRootNode():null;if(!ze||!ze.querySelector)return;const Je=ze.querySelector(".maplibregl-ctrl-attrib.maplibregl-compact-show, .mapboxgl-ctrl-attrib.mapboxgl-compact-show");if(Je){ht=setTimeout(()=>{ht=0,n.isMobile&&Je.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")},OP);return}const ft=ze.querySelector(".maplibregl-ctrl-attrib, .mapboxgl-ctrl-attrib");ft&&!/attrib-empty/.test(ft.className)||Re>0&&(ht=setTimeout(()=>vt(Re-1),500))}return _o(()=>vt(60)),ro(()=>{ht&&(clearTimeout(ht),ht=0)}),(Re,De)=>{var ze;return oe(),ge("div",SP,[le.value==="detail"&&we.value&&ae.value==="open"&&fe.value?(oe(),ge("div",{key:0,class:"floating-mini-image",onClick:De[0]||(De[0]=Je=>de(n).fullyOpenLegend())},[F("img",{src:fe.value,alt:(ze=we.value.properties)==null?void 0:ze.name,class:"mini-image"},null,8,PP)])):Ee("",!0),F("div",{ref_key:"sheetRef",ref:C,class:qe(["legend-mobile-sheet",[ae.value,{"sheet-dark":e.isDark,dragging:D.value,fit:Q.value}]]),style:Dt({height:Q.value?"auto":ye.value,"--legend-sheet-top-reserve":Of+"px"}),onTouchstart:M,onTouchmove:L,onTouchend:J,onTouchcancel:J},[F("div",{class:"sheet-drag-strip",onClick:H},[xe.value?(oe(),ge("div",AP)):Ee("",!0)]),le.value==="detail"&&ae.value!=="collapsed"?(oe(),ge("button",{key:0,class:"detail-collapse-btn-mobile",onClick:Ft(H,["stop"]),"aria-expanded":String(pe.value),"aria-label":de(t)("aria.toggleLegend")},null,8,LP)):Ee("",!0),le.value==="detail"&&ae.value!=="collapsed"?(oe(),ge("button",{key:1,class:"detail-close-btn",onClick:Ft(se,["stop"]),"aria-label":de(t)("aria.backToLegend")},[...De[2]||(De[2]=[F("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[F("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,CP)):Ee("",!0),ae.value==="collapsed"&&le.value==="detail"&&we.value?(oe(),ge("div",{key:2,class:"collapsed-detail-footer",onClick:H},[F("button",{class:"mobile-collapse-caret",style:Dt({transform:`rotate(${Se.value}deg)`}),"aria-expanded":String(pe.value),"aria-label":de(t)("aria.toggleLegend"),tabindex:"-1"},[...De[3]||(De[3]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,TP),F("span",EP,_e(V.value),1)])):Ee("",!0),F("div",MP,[le.value==="detail"&&we.value?(oe(),ge(it,{key:0},[ae.value!=="collapsed"?(oe(),bt(au,{key:0,peopleGroup:we.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):Ee("",!0),ae.value!=="collapsed"?(oe(),bt(Ri,{key:1,shared:B.value,dark:e.isDark},null,8,["shared","dark"])):Ee("",!0)],64)):e.legendType!=="default"?(oe(),bt(Tf,{key:1,"pin-note":!1,nodes:I.value,tabs:P.value,"default-tab":e.defaultTab,title:V.value||T.value,hideTabs:e.nodes?!e.tabs:K.value,columnLabel:U.value,columns:e.columns||["count","pop"],"export-enabled":i.value,"export-cards":i.value&&de(l)===!0,onSelect:de(r),onExport:De[1]||(De[1]=Je=>de(s)&&de(s)(Je))},{"title-caret":$o(()=>[F("button",{class:"mobile-collapse-caret",style:Dt({transform:`rotate(${Se.value}deg)`}),onClick:Ft(H,["stop"]),"aria-expanded":String(pe.value),"aria-label":de(t)("aria.toggleLegend")},[...De[4]||(De[4]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,RP)]),_:1},8,["nodes","tabs","default-tab","title","hideTabs","columnLabel","columns","export-enabled","export-cards","onSelect"])):(oe(),bt($f,{key:2,title:V.value,items:de(u),columns:de(g),activeFilter:de(x),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:de($),totalPopulation:de(b),fmtPop:de(m),fmtCount:de(d),onFilterClick:ne},{"title-caret":$o(()=>[F("button",{class:"mobile-collapse-caret",style:Dt({transform:`rotate(${Se.value}deg)`}),onClick:Ft(H,["stop"]),"aria-expanded":String(pe.value),"aria-label":de(t)("aria.toggleLegend")},[...De[5]||(De[5]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,FP)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],38)])}}},[["styles",[xP]],["__scopeId","data-v-27f25155"]])},Symbol.toStringTag,{value:"Module"})),Hf={regular:"Noto Sans Regular",medium:"Noto Sans Bold",bold:"Noto Sans Bold"};function zP(e){return typeof window<"u"&&!!window.maplibregl&&e instanceof window.maplibregl.Map}function jP(e,{weight:t="regular",mapbox:o}={}){return zP(e)?{"text-font":[Hf[t]||Hf.regular]}:Array.isArray(o)&&o.length?{"text-font":o}:{}}function du(e,t,o,n){const a=parseFloat(t)-parseFloat(n),r=parseFloat(e)-parseFloat(o);return Math.sqrt(a*a+r*r)}function BP(e,t){const o={};for(const n of e){const a=t(n);o[a]||(o[a]=[]),o[a].push(n)}return o}const GP=Object.freeze({cluster:!0,clusterMaxZoom:6,clusterRadius:40}),HP=Object.freeze(["step",["get","point_count"],"#51bbd6",10,"#f1f075",50,"#f28cb1",500,"#e74c3c"]),UP=Object.freeze(["step",["get","point_count"],15,10,20,50,25,500,35]);class Uf{constructor(t={}){this.maxConnectionDistance=t.maxConnectionDistance??1/0}_calculateDistance(t,o){return du(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(b=>{const m=parseFloat(b.latitude),d=parseFloat(b.longitude);return!isNaN(m)&&!isNaN(d)});if(a.length<2)return[];const r=a.length,s=a.map(b=>parseFloat(b.latitude)),i=a.map(b=>parseFloat(b.longitude)),l=new Uint8Array(r),c=new Float64Array(r).fill(1/0),u=new Int32Array(r).fill(-1),g=[];let h=r;for(;h>0;){let b=-1,m=1/0;for(let d=0;dn){b=-1;for(let d=0;d=0){const d=u[b];g.push({from:d,to:b,distance:c[b],fromPoint:a[d],toPoint:a[b]})}for(let d=0;d({type:"Feature",geometry:{type:"LineString",coordinates:[[parseFloat(b.fromPoint.longitude),parseFloat(b.fromPoint.latitude)],[parseFloat(b.toPoint.longitude),parseFloat(b.toPoint.latitude)]]},properties:{distance:b.distance,algorithm:"MST"}}));return g.length${n} deg).`),$}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 g=Math.max(0,u-1),h=u>1?(c.length/g*100).toFixed(1):100;s.push({name:l,points:u,lines:c.length,expected:g,coverage:h+"%",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 Uf;class Wf{constructor(t={}){this.maxDistance=t.maxDistance??15,this.maxNeighbors=t.maxNeighbors??15,this.sortKey=t.sortKey??"longitude"}_calculateDistance(t,o,n,a){return du(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(g=>{const h=parseFloat(g.latitude),x=parseFloat(g.longitude);return!isNaN(h)&&!isNaN(x)});if(i.length<2)return[];const l=[],c=new Set,u=[...i].sort((g,h)=>parseFloat(g[r])-parseFloat(h[r]));for(let g=0;gt[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 Wf({maxDistance:15,maxNeighbors:15,sortKey:"longitude"});const ur="cluster-lines-source",dr="cluster-lines",ra="mapbox-clusters",Do="mapbox-clusters-circle",pr="mapbox-clusters-count",WP=Object.freeze({type:"FeatureCollection",features:[]});function qf(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=Ge("mapStore",null),u=new Uf({maxConnectionDistance:1/0}),g=new Wf({maxDistance:15,maxNeighbors:15,sortKey:"longitude"}),h=ke(!1),x=ke("mapbox"),k=te(()=>c&&"clusteringEnabled"in c?!!c.clusteringEnabled:h.value),$=te(()=>c&&c.clusteringMode?c.clusteringMode:x.value),b=ke([]);let m=null,d=null,_=null;function p(O){const ae=["mapbox","mst","network"];if(!ae.includes(O)){console.warn(`[${o}] useMapClustering.setMode: unknown mode "${O}". Allowed: ${ae.join(", ")}`);return}c&&typeof c.setClusteringMode=="function"?c.setClusteringMode(O):c&&"clusteringMode"in c?c.clusteringMode=O:x.value=O,k.value&&(G(),S())}function y(O){const ae=!!O;c&&typeof c.setClusteringEnabled=="function"?c.setClusteringEnabled(ae):c&&"clusteringEnabled"in c?c.clusteringEnabled=ae:h.value=ae,ae?S():G()}function f(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)),k.value&&(G(),S())}function w(O){if(!_)return O;const{property:ae,value:pe}=_,ye=xe=>String(xe||"").toLowerCase().replace(/[^a-z0-9]+/g,""),Se=ye(pe);return Se?O.filter(xe=>{var Z,le;const Q=(xe==null?void 0:xe[ae])??((Z=xe==null?void 0:xe.properties)==null?void 0:Z[ae])??((le=xe==null?void 0:xe._normalized)==null?void 0:le[ae]);return ye(Q)===Se}):O}function A(O){m=O}function S(){const O=t();if(O){switch(G(),$.value){case"mapbox":I(O);break;case"mst":P(O,"mst");break;case"network":P(O,"network");break;default:console.warn(`[${o}] Unknown clustering mode: ${$.value}`)}W(O,!0)}}function G(){const O=t();O&&(K(O,pr,!1),K(O,Do,!1),v(O,ra),K(O,dr,!1),v(O,ur),b.value=[],U(O),W(O,!1))}function q(){const O=t();O&&(U(O),O.getLayer(pr)&&O.removeLayer(pr),O.getLayer(Do)&&O.removeLayer(Do),O.getSource(ra)&&O.removeSource(ra),O.getLayer(dr)&&O.removeLayer(dr),O.getSource(ur)&&O.removeSource(ur),W(O,!1)),b.value=[],m=null}function K(O,ae,pe){if(O.getLayer(ae))try{O.setLayoutProperty(ae,"visibility",pe?"visible":"none")}catch{}}function v(O,ae){const pe=O.getSource(ae);if(pe&&typeof pe.setData=="function")try{pe.setData(WP)}catch{}}function I(O){const ae=w(n());if(!ae.length)return;const ye={type:"FeatureCollection",features:ae.map(xe=>{const Q=parseFloat(xe.longitude??xe.lng),Z=parseFloat(xe.latitude??xe.lat);return isNaN(Q)||isNaN(Z)?null:{type:"Feature",geometry:{type:"Point",coordinates:[Q,Z]},properties:{...xe.properties||xe}}}).filter(Boolean)},Se=O.getSource(ra);Se&&typeof Se.setData=="function"?Se.setData(ye):O.addSource(ra,{type:"geojson",data:ye,...GP,...l}),O.getLayer(Do)?K(O,Do,!0):O.addLayer({id:Do,type:"circle",source:ra,filter:["has","point_count"],paint:{"circle-color":HP,"circle-radius":UP,"circle-stroke-width":2,"circle-stroke-color":"#ffffff",...gn(O),"circle-opacity":.85}}),O.getLayer(pr)?K(O,pr,!0):O.addLayer({id:pr,type:"symbol",source:ra,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],...jP(O,{weight:"medium",mapbox:["DIN Offc Pro Medium","Arial Unicode MS Bold"]}),"text-size":12},paint:{"text-color":"#000000"}}),T(O)}function P(O,ae){const pe=w(n());if(!pe.length)return;const ye=BP(pe,le=>{var we;return le[s]??((we=le._normalized)==null?void 0:we[s])??"Unknown"}),Se=typeof i=="function"?i:()=>"#666666";let xe=[];if(ae==="mst"?(xe=u.generateAllMSTLines(ye,Se),Object.keys(ye).length):(xe=g.generateAllNetworkLines(ye,Se),g.getClusteringStats(ye)),b.value=xe,xe.length===0)return;const Q={type:"FeatureCollection",features:xe},Z=O.getSource(ur);if(Z&&typeof Z.setData=="function"?Z.setData(Q):O.addSource(ur,{type:"geojson",data:Q}),O.getLayer(dr))K(O,dr,!0);else{const le={id:dr,type:"line",source:ur,paint:{"line-color":["coalesce",["get","color"],"#666666"],"line-width":["interpolate",["linear"],["zoom"],0,.5,4,.75,8,1,12,1.5],...gn(O,"line"),"line-opacity":.5},layout:{"line-cap":"round","line-join":"round"}};O.getLayer(r)?O.addLayer(le,r):O.addLayer(le)}}function T(O){O.getLayer(Do)&&(O.on("click",Do,C),O.on("mouseenter",Do,D),O.on("mouseleave",Do,N),d=Do)}function U(O){if(!d)return;const ae=d;try{O.off("click",ae,C),O.off("mouseenter",ae,D),O.off("mouseleave",ae,N)}catch{}d=null}function C(O){const ae=t();if(!ae)return;const pe=ae.queryRenderedFeatures(O.point,{layers:[Do]});if(!pe.length)return;const ye=pe[0],Se=ye.properties.cluster_id,xe=ye.geometry.coordinates,Q=ye.properties.point_count;if(typeof m=="function"){m({clusterId:Se,coordinates:xe,pointCount:Q,originalEvent:O});return}const Z=ae.getSource(ra);!Z||typeof Z.getClusterExpansionZoom!="function"||Z.getClusterExpansionZoom(Se,(le,we)=>{le||ae.easeTo({center:xe,zoom:we})})}function D(){const O=t();O&&(O.getCanvas().style.cursor="pointer")}function N(){const O=t();O&&(O.getCanvas().style.cursor="")}function W(O,ae){if(O.getLayer(r))try{O.setPaintProperty(r,"circle-opacity",ae?.25:.9)}catch{}}return{enabled:k,mode:$,clusterLines:b,setMode:p,setEnabled:y,setSelectionFilter:f,onClusterClick:A,applyClustering:S,clearClustering:G,cleanup:q,mstUtil:u,networkUtil:g}}const qP=Object.freeze(Object.defineProperty({__proto__:null,default:qf,useMapClustering:qf},Symbol.toStringTag,{value:"Module"})),Kf=e=>Math.log(Math.tan(Math.PI/4+e*Math.PI/180/2)),Vf=e=>Math.atan(Math.sinh(e))*180/Math.PI,Yf=85.051129,Zf=e=>Math.max(-Yf,Math.min(Yf,e));function KP(e,t,o){const n=Math.max(1,Math.floor(o)||1),a=Kf(Zf(Math.max(e,t))),r=Kf(Zf(Math.min(e,t))),s=(a-r)/n,i=[];for(let l=0;l=e.widthIn?"portrait":"landscape"),margins:{...Yt.margins},bleed:Yt.bleed,slots:{title:{text:"Untitled",subtitle:"",heightIn:Yt.title.heightIn},legend:{rows:[],type:"generic",widthIn:Yt.legend.widthIn},scaleBar:!0,north:!0,footer:{left:"",right:"",attribution:Yt.footer.attribution,heightIn:Yt.footer.heightIn}},renderPath:"auto"}}const Jf=Object.freeze(Object.defineProperty({__proto__:null,defaultPosterSpec:VP,posterDefaults:Yt},Symbol.toStringTag,{value:"Module"}));function fo(e,t){return Math.round(e*t)}function Xf(e,t){var y,f,w,A,S,G,q,K;const o=t.dpi,n=e.margins||Yt.margins,a={x:0,y:0,w:t.width,h:t.height},r={x:fo(n.left,o),y:fo(n.top,o),w:t.width-fo(n.left+n.right,o),h:t.height-fo(n.top+n.bottom,o)},s=(y=e.slots)!=null&&y.title?fo(e.slots.title.heightIn||Yt.title.heightIn,o):0,i={x:r.x,y:r.y,w:r.w,h:s},l=fo(((w=(f=e.slots)==null?void 0:f.footer)==null?void 0:w.heightIn)||Yt.footer.heightIn,o),c={x:r.x,y:r.y+r.h-l,w:r.w,h:l},u=(A=e.slots)!=null&&A.legend?fo(e.slots.legend.widthIn||Yt.legend.widthIn,o):0,g=(S=e.slots)!=null&&S.scaleBar||(G=e.slots)!=null&&G.north?fo(Yt.chromeBand.heightIn,o):0,h=r.y+s+(s?fo(Yt.gutter.in,o):0),x=c.y-g-(g?fo(Yt.gutter.in,o):0),k={x:r.x,y:h,w:r.w-(u?u+fo(Yt.gutter.in,o):0),h:x-h},$=u?{x:r.x+r.w-u,y:h,w:u,h:k.h}:{x:0,y:0,w:0,h:0},b=fo(Yt.scaleBar.widthIn,o),m=g,d=(q=e.slots)!=null&&q.scaleBar?{x:r.x,y:x+(g?fo(Yt.gutter.in,o):0),w:b,h:m}:{x:0,y:0,w:0,h:0},_=fo(Yt.north.sizeIn,o),p=(K=e.slots)!=null&&K.north?{x:r.x+r.w-_-(u?u+fo(Yt.gutter.in,o):0),y:x+(g?fo(Yt.gutter.in,o):0),w:_,h:_}:{x:0,y:0,w:0,h:0};return{page:a,content:r,title:i,map:k,legend:$,scaleBar:d,north:p,footer:c}}const YP={"©":"©","&":"&"," ":" ","<":"<",">":">",""":'"',"'":"'"};function ZP(e){return e?String(e).replace(/<[^>]*>/g," ").replace(/&[a-z]+;|&#\d+;/gi,t=>YP[t.toLowerCase()]??" ").replace(/\s+/g," ").trim():""}function JP(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=ZP(r&&r.attribution||o[a].attribution);s&&!n.includes(s)&&n.push(s)}return n.join(" ")}const Sa=4096,bn=2048,Qf=15e3;function XP(e){const t=ke({phase:"idle",completed:0,total:0,message:"",fraction:0,percent:0}),o=ke(!1);let n=null;async function a($,b="png"){var _;if(o.value)throw new Error("useMapPoster: already rendering");const m=e();if(!m)throw new Error("useMapPoster: no source map");n=new AbortController;const d=nA($.signal,n.signal);o.value=!0,l=0,c("init",1,1,"preparing render");try{const p=em($),y=QP($.renderPath||"auto",p);y==="single"&&(p.width>Sa||p.height>Sa)&&console.warn(`[useMapPoster] requested single-canvas ${p.width}×${p.height}px > ${Sa}; auto-switching to tile-stitch.`);const f=y==="single"&&(p.width>Sa||p.height>Sa)?"stitch":y,w=$.layout==="poster",A=w?Xf($,p):null,S=!!A&&A.map.w>0&&A.map.h>0;w&&!S&&console.warn('[useMapPoster] layout:"poster" asked for a map box of '+(A?A.map.w+"×"+A.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=S?{width:A.map.w,height:A.map.h,dpi:p.dpi}:p,q=f==="single"?await u(m,G,d):await g(m,G,d);c("compose",0,1,"compositing overlay");const K=JP(m),v=K?{...$,slots:{...$.slots,footer:{...((_=$.slots)==null?void 0:_.footer)||{},attribution:K}}}:$,I=S?h(q,A,p):q,P=await x(I,v,p);c("encode",0,1,`encoding ${b.toUpperCase()}`);const T=b==="pdf"?await oA(P,$):await tA(P,"image/png");return c("done",1,1,"render complete"),T}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($,b,m,d){const _=i.indexOf($);let p=0;for(let w=0;w<_;w++)p+=s[i[w]]||0;const y=m>0?Math.min(1,b/m):0,f=p+(s[$]||0)*y;l=$==="init"?f:Math.max(l,f),t.value={phase:$,completed:b,total:m,message:d,fraction:Math.min(1,l),percent:Math.round(Math.min(1,l)*100)}}async function u($,b,m){c("hidden-map",0,3,"creating hidden map");const{hiddenMap:d,restoreDpr:_,container:p}=await tm($,b.width,b.height);try{pu(m),c("hidden-map",1,3,"loading map tiles"),await nm(d),c("hidden-map",3,3,"tiles loaded"),pu(m),c("capture",0,1,"capturing canvas");const y=d.getCanvas().toDataURL("image/png"),f=await am(y),w=document.createElement("canvas");return w.width=b.width,w.height=b.height,w.getContext("2d").drawImage(f,0,0,b.width,b.height),w}finally{try{d.remove()}catch{}p!=null&&p.parentNode&&p.parentNode.removeChild(p),_()}}async function g($,b,m){const d=Math.ceil(b.width/bn),_=Math.ceil(b.height/bn),p=d*_;c("hidden-map",0,p,`creating hidden map (${d}×${_} tiles)`);const y=$.getBounds(),f=$.getCenter(),w=$.getZoom(),A=$.getBearing(),S=$.getPitch(),{hiddenMap:G,restoreDpr:q,container:K}=await tm($,bn,bn,{preserveBounds:!0,bounds:y});try{const v=document.createElement("canvas");v.width=b.width,v.height=b.height;const I=v.getContext("2d"),P=y.getNorthEast(),T=y.getSouthWest(),C=(P.lng-T.lng)/d,D=KP(T.lat,P.lat,_);let N=0;for(let W=0;W<_;W++)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 QP(e,t){return e==="single"||e==="stitch"?e:t.width>Sa||t.height>Sa?"stitch":"single"}async function tm(e,t,o,n={}){const a=document.createElement("div");a.style.cssText=` +`,"legend-mobile-sheet");const o=e,n=Ge("uiStore");Ge("mapStore");const a=Ge("dataStore"),r=Ge("onSemanticTreeSelect",()=>{}),s=Ge("onLegendExport",null),i=te(()=>typeof s=="function"),l=Ge("legendExportCards",!1),c=Ms(o,"legendType"),{items:u,columns:g,title:h,activeFilter:x,setFilter:k,totalCount:$,totalPopulation:b,fmtPop:m,fmtCount:d}=os(c,Ni),_=Ge("normalizedPeopleGroups",null),p=te(()=>{var De,ze;if((De=_==null?void 0:_.value)!=null&&De.length)return _.value;const Re=[];for(const Je in(a==null?void 0:a.sources)||{}){const ft=a.sources[Je];(ze=ft==null?void 0:ft.features)!=null&&ze.length&&Re.push(...ft.features)}return Re}),y={get value(){return p.value}},{langTree:f}=eu(y),{affinityTree:w}=Ef(y),{regionsTree:A}=Mf(y),S=[{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."}],q=[{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(Re){const De=[];for(const ze of Re){De.push({id:ze.key,label:ze.label,color:ze.color,count:ze.count??0,pop:ze.population??0,filter:ze.filterKey?["==",["get","_flat_filter"],ze.filterKey]:null,children:[]});for(const Je of ze.children||[])De.push({id:Je.key,label:Je.label,color:Je.color,count:Je.count??0,pop:Je.population??0,filter:Je.filterKey?["==",["get","_flat_filter"],Je.filterKey]:null,children:[]})}return De}const I=te(()=>o.nodes?o.nodes:K.value?v(u.value):o.legendType==="affinity-block"?w.value:o.legendType==="doxa-regions"?A.value:f.value),P=te(()=>o.nodes?o.tabs:K.value?null:o.legendType==="affinity-block"?G:o.legendType==="doxa-regions"?q:S),T=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")),U=te(()=>o.columnLabel!==null?o.columnLabel:["religion","prayer","engagement","adoption"].includes(o.legendType)?t("legend.colLabel."+o.legendType):K.value?t("legend.colLabel.status"):""),C=ke(null),D=ke(!1),N={pending:null,active:!1,startY:0,startH:0,startState:"",containerH:0,maxH:0,lastH:0};let W=0;const O=()=>Date.now()-W<400,ae=te(()=>n.legendState),pe=te(()=>ae.value!=="collapsed"),ye=te(()=>n.legendHeight),Se=te(()=>n.caretRotation),xe=te(()=>n.showPullTab),Q=te(()=>ae.value==="open"&&!n._customLegendHeight);let Z=!1;We(()=>n.isMobile,Re=>{!Re||Z||(Z=!0,n.selectedPeopleGroup||n.collapseLegend())},{immediate:!0});const le=te(()=>n.legendMode),we=te(()=>n.selectedPeopleGroup),R=Ge("normalizedPeopleGroups",null),z=te(()=>{var De,ze;if((De=R==null?void 0:R.value)!=null&&De.length)return su(R.value);const Re=[];for(const Je in(a==null?void 0:a.sources)||{}){const ft=a.sources[Je];(ze=ft==null?void 0:ft.features)!=null&&ze.length&&Re.push(...ft.features)}return su(Re)}),B=te(()=>we.value?xf(z.value,we.value):[]),V=te(()=>{var Re;return le.value==="detail"&&we.value?((Re=we.value.properties)==null?void 0:Re.name)||t("legend.header.peopleGroupFallback"):ae.value==="collapsed"?o.title||t("legend.header.collapsed"):o.title||h.value});function ne(Re){n.handleLegendItemClick(),k(Re)}function H(){O()||n.toggleLegend()}function se(){O()||(n.selectPeopleGroup(null),n.openLegend())}const fe=te(()=>{var De;if(!we.value)return null;const Re=we.value.properties||{};return Re.imageUrl||((De=Re._raw)==null?void 0:De.ImageURL)||null});function M(Re){var ft;if(ae.value==="collapsed"){N.pending="hold",N.active=!1;return}const De=Re.touches[0],ze=C.value;!De||!ze||!(De.clientY-ze.getBoundingClientRect().top<=NP)||(N.pending="grab",N.active=!1,N.startY=De.clientY,N.startH=ze.offsetHeight,N.lastH=N.startH,N.startState=ae.value,N.containerH=((ft=ze.parentElement)==null?void 0:ft.offsetHeight)||window.innerHeight,N.maxH=N.containerH-Of)}function L(Re){if(!N.pending&&!N.active)return;if(N.pending==="hold"){Re.cancelable&&Re.preventDefault();return}const De=Re.touches[0];if(!De)return;const ze=N.startY-De.clientY;if(!N.active){if(ze===0)return;N.pending=null,N.active=!0,D.value=!0}Re.preventDefault();const Je=Math.round(Math.min(N.maxH,Math.max(zf,N.startH+ze)));N.lastH=Je,n.setLegendHeight(`${Je}px`)}function J(){if(N.pending=null,!N.active)return;N.active=!1,D.value=!1,W=Date.now();const Re=N.lastH,De=Re-N.startH,ze=N.containerH*.3;if(le.value!=="detail"){Re0?n.fullyOpenLegend():N.startState==="fullyOpen"?n.openLegend():n.collapseLegend()}function ce(Re){Re==="fullyOpen"?n.fullyOpenLegend():Re==="collapsed"?n.collapseLegend():n.openLegend()}let $e=null;_o(()=>{const Re=C.value,De=Re&&Re.getRootNode?Re.getRootNode():null;$e=De&&De.host?De.host:typeof document<"u"?document.documentElement:null,$e&&($e.__lmCount=($e.__lmCount||0)+1,$e.classList.add(jf))}),ro(()=>{$e&&($e.__lmCount=Math.max(0,($e.__lmCount||1)-1),$e.__lmCount||$e.classList.remove(jf),$e=null)});let ve=0;function X(Re){const De=C.value;if(!De||!De.isConnected)return;const ze=Re?0:De.offsetHeight,Je=ze>0?ae.value==="collapsed"?"collapsed":"open":"gone";De.dispatchEvent(new CustomEvent(DP,{bubbles:!0,composed:!0,detail:{height:ze,collapsedHeight:zf,state:Je}}))}function ie(){ve||typeof requestAnimationFrame>"u"||(ve=requestAnimationFrame(()=>{ve=0,X(!1)}))}We(ae,()=>ie()),_o(()=>{const Re=C.value;Re&&(Re.addEventListener("transitionend",ie),window.addEventListener("resize",ie),ie())}),ro(()=>{ve&&(cancelAnimationFrame(ve),ve=0);const Re=C.value;Re&&Re.removeEventListener("transitionend",ie),window.removeEventListener("resize",ie),X(!0)});let Fe=null,Ie=null,lt=null;_o(()=>{const Re=C.value;if(!Re||typeof ResizeObserver>"u")return;const De=Re.getRootNode();Ie=De instanceof ShadowRoot?De.host:De.documentElement||null,Ie&&(lt=Re,Fe=new ResizeObserver(()=>{ie();const ze=Re.offsetHeight;ze<=0||(Ie.style.setProperty(Bf,`${ze}px`),Ie.__legendSheetVarOwner=Re)}),Fe.observe(Re))}),ro(()=>{Fe&&(Fe.disconnect(),Fe=null),Ie&&Ie.__legendSheetVarOwner===lt&&(Ie.style.removeProperty(Bf),Ie.__legendSheetVarOwner=null),Ie=null,lt=null});let ht=0;function vt(Re){ht=0;const De=C.value,ze=De&&De.getRootNode?De.getRootNode():null;if(!ze||!ze.querySelector)return;const Je=ze.querySelector(".maplibregl-ctrl-attrib.maplibregl-compact-show, .mapboxgl-ctrl-attrib.mapboxgl-compact-show");if(Je){ht=setTimeout(()=>{ht=0,n.isMobile&&Je.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")},OP);return}const ft=ze.querySelector(".maplibregl-ctrl-attrib, .mapboxgl-ctrl-attrib");ft&&/(maplibregl|mapboxgl)-compact(\s|$)/.test(ft.className)||Re>0&&(ht=setTimeout(()=>vt(Re-1),500))}return _o(()=>vt(60)),ro(()=>{ht&&(clearTimeout(ht),ht=0)}),(Re,De)=>{var ze;return oe(),ge("div",SP,[le.value==="detail"&&we.value&&ae.value==="open"&&fe.value?(oe(),ge("div",{key:0,class:"floating-mini-image",onClick:De[0]||(De[0]=Je=>de(n).fullyOpenLegend())},[F("img",{src:fe.value,alt:(ze=we.value.properties)==null?void 0:ze.name,class:"mini-image"},null,8,PP)])):Ee("",!0),F("div",{ref_key:"sheetRef",ref:C,class:qe(["legend-mobile-sheet",[ae.value,{"sheet-dark":e.isDark,dragging:D.value,fit:Q.value}]]),style:Dt({height:Q.value?"auto":ye.value,"--legend-sheet-top-reserve":Of+"px"}),onTouchstart:M,onTouchmove:L,onTouchend:J,onTouchcancel:J},[F("div",{class:"sheet-drag-strip",onClick:H},[xe.value?(oe(),ge("div",AP)):Ee("",!0)]),le.value==="detail"&&ae.value!=="collapsed"?(oe(),ge("button",{key:0,class:"detail-collapse-btn-mobile",onClick:Ft(H,["stop"]),"aria-expanded":String(pe.value),"aria-label":de(t)("aria.toggleLegend")},null,8,LP)):Ee("",!0),le.value==="detail"&&ae.value!=="collapsed"?(oe(),ge("button",{key:1,class:"detail-close-btn",onClick:Ft(se,["stop"]),"aria-label":de(t)("aria.backToLegend")},[...De[2]||(De[2]=[F("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[F("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,CP)):Ee("",!0),ae.value==="collapsed"&&le.value==="detail"&&we.value?(oe(),ge("div",{key:2,class:"collapsed-detail-footer",onClick:H},[F("button",{class:"mobile-collapse-caret",style:Dt({transform:`rotate(${Se.value}deg)`}),"aria-expanded":String(pe.value),"aria-label":de(t)("aria.toggleLegend"),tabindex:"-1"},[...De[3]||(De[3]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,TP),F("span",EP,_e(V.value),1)])):Ee("",!0),F("div",MP,[le.value==="detail"&&we.value?(oe(),ge(it,{key:0},[ae.value!=="collapsed"?(oe(),bt(au,{key:0,peopleGroup:we.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):Ee("",!0),ae.value!=="collapsed"?(oe(),bt(Ri,{key:1,shared:B.value,dark:e.isDark},null,8,["shared","dark"])):Ee("",!0)],64)):e.legendType!=="default"?(oe(),bt(Tf,{key:1,"pin-note":!1,nodes:I.value,tabs:P.value,"default-tab":e.defaultTab,title:V.value||T.value,hideTabs:e.nodes?!e.tabs:K.value,columnLabel:U.value,columns:e.columns||["count","pop"],"export-enabled":i.value,"export-cards":i.value&&de(l)===!0,onSelect:de(r),onExport:De[1]||(De[1]=Je=>de(s)&&de(s)(Je))},{"title-caret":$o(()=>[F("button",{class:"mobile-collapse-caret",style:Dt({transform:`rotate(${Se.value}deg)`}),onClick:Ft(H,["stop"]),"aria-expanded":String(pe.value),"aria-label":de(t)("aria.toggleLegend")},[...De[4]||(De[4]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,RP)]),_:1},8,["nodes","tabs","default-tab","title","hideTabs","columnLabel","columns","export-enabled","export-cards","onSelect"])):(oe(),bt($f,{key:2,title:V.value,items:de(u),columns:de(g),activeFilter:de(x),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:de($),totalPopulation:de(b),fmtPop:de(m),fmtCount:de(d),onFilterClick:ne},{"title-caret":$o(()=>[F("button",{class:"mobile-collapse-caret",style:Dt({transform:`rotate(${Se.value}deg)`}),onClick:Ft(H,["stop"]),"aria-expanded":String(pe.value),"aria-label":de(t)("aria.toggleLegend")},[...De[5]||(De[5]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,FP)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],38)])}}},[["styles",[xP]],["__scopeId","data-v-931392c5"]])},Symbol.toStringTag,{value:"Module"})),Hf={regular:"Noto Sans Regular",medium:"Noto Sans Bold",bold:"Noto Sans Bold"};function zP(e){return typeof window<"u"&&!!window.maplibregl&&e instanceof window.maplibregl.Map}function jP(e,{weight:t="regular",mapbox:o}={}){return zP(e)?{"text-font":[Hf[t]||Hf.regular]}:Array.isArray(o)&&o.length?{"text-font":o}:{}}function du(e,t,o,n){const a=parseFloat(t)-parseFloat(n),r=parseFloat(e)-parseFloat(o);return Math.sqrt(a*a+r*r)}function BP(e,t){const o={};for(const n of e){const a=t(n);o[a]||(o[a]=[]),o[a].push(n)}return o}const GP=Object.freeze({cluster:!0,clusterMaxZoom:6,clusterRadius:40}),HP=Object.freeze(["step",["get","point_count"],"#51bbd6",10,"#f1f075",50,"#f28cb1",500,"#e74c3c"]),UP=Object.freeze(["step",["get","point_count"],15,10,20,50,25,500,35]);class Uf{constructor(t={}){this.maxConnectionDistance=t.maxConnectionDistance??1/0}_calculateDistance(t,o){return du(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(b=>{const m=parseFloat(b.latitude),d=parseFloat(b.longitude);return!isNaN(m)&&!isNaN(d)});if(a.length<2)return[];const r=a.length,s=a.map(b=>parseFloat(b.latitude)),i=a.map(b=>parseFloat(b.longitude)),l=new Uint8Array(r),c=new Float64Array(r).fill(1/0),u=new Int32Array(r).fill(-1),g=[];let h=r;for(;h>0;){let b=-1,m=1/0;for(let d=0;dn){b=-1;for(let d=0;d=0){const d=u[b];g.push({from:d,to:b,distance:c[b],fromPoint:a[d],toPoint:a[b]})}for(let d=0;d({type:"Feature",geometry:{type:"LineString",coordinates:[[parseFloat(b.fromPoint.longitude),parseFloat(b.fromPoint.latitude)],[parseFloat(b.toPoint.longitude),parseFloat(b.toPoint.latitude)]]},properties:{distance:b.distance,algorithm:"MST"}}));return g.length${n} deg).`),$}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 g=Math.max(0,u-1),h=u>1?(c.length/g*100).toFixed(1):100;s.push({name:l,points:u,lines:c.length,expected:g,coverage:h+"%",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 Uf;class Wf{constructor(t={}){this.maxDistance=t.maxDistance??15,this.maxNeighbors=t.maxNeighbors??15,this.sortKey=t.sortKey??"longitude"}_calculateDistance(t,o,n,a){return du(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(g=>{const h=parseFloat(g.latitude),x=parseFloat(g.longitude);return!isNaN(h)&&!isNaN(x)});if(i.length<2)return[];const l=[],c=new Set,u=[...i].sort((g,h)=>parseFloat(g[r])-parseFloat(h[r]));for(let g=0;gt[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 Wf({maxDistance:15,maxNeighbors:15,sortKey:"longitude"});const ur="cluster-lines-source",dr="cluster-lines",ra="mapbox-clusters",Do="mapbox-clusters-circle",pr="mapbox-clusters-count",WP=Object.freeze({type:"FeatureCollection",features:[]});function qf(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=Ge("mapStore",null),u=new Uf({maxConnectionDistance:1/0}),g=new Wf({maxDistance:15,maxNeighbors:15,sortKey:"longitude"}),h=ke(!1),x=ke("mapbox"),k=te(()=>c&&"clusteringEnabled"in c?!!c.clusteringEnabled:h.value),$=te(()=>c&&c.clusteringMode?c.clusteringMode:x.value),b=ke([]);let m=null,d=null,_=null;function p(O){const ae=["mapbox","mst","network"];if(!ae.includes(O)){console.warn(`[${o}] useMapClustering.setMode: unknown mode "${O}". Allowed: ${ae.join(", ")}`);return}c&&typeof c.setClusteringMode=="function"?c.setClusteringMode(O):c&&"clusteringMode"in c?c.clusteringMode=O:x.value=O,k.value&&(G(),S())}function y(O){const ae=!!O;c&&typeof c.setClusteringEnabled=="function"?c.setClusteringEnabled(ae):c&&"clusteringEnabled"in c?c.clusteringEnabled=ae:h.value=ae,ae?S():G()}function f(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)),k.value&&(G(),S())}function w(O){if(!_)return O;const{property:ae,value:pe}=_,ye=xe=>String(xe||"").toLowerCase().replace(/[^a-z0-9]+/g,""),Se=ye(pe);return Se?O.filter(xe=>{var Z,le;const Q=(xe==null?void 0:xe[ae])??((Z=xe==null?void 0:xe.properties)==null?void 0:Z[ae])??((le=xe==null?void 0:xe._normalized)==null?void 0:le[ae]);return ye(Q)===Se}):O}function A(O){m=O}function S(){const O=t();if(O){switch(G(),$.value){case"mapbox":I(O);break;case"mst":P(O,"mst");break;case"network":P(O,"network");break;default:console.warn(`[${o}] Unknown clustering mode: ${$.value}`)}W(O,!0)}}function G(){const O=t();O&&(K(O,pr,!1),K(O,Do,!1),v(O,ra),K(O,dr,!1),v(O,ur),b.value=[],U(O),W(O,!1))}function q(){const O=t();O&&(U(O),O.getLayer(pr)&&O.removeLayer(pr),O.getLayer(Do)&&O.removeLayer(Do),O.getSource(ra)&&O.removeSource(ra),O.getLayer(dr)&&O.removeLayer(dr),O.getSource(ur)&&O.removeSource(ur),W(O,!1)),b.value=[],m=null}function K(O,ae,pe){if(O.getLayer(ae))try{O.setLayoutProperty(ae,"visibility",pe?"visible":"none")}catch{}}function v(O,ae){const pe=O.getSource(ae);if(pe&&typeof pe.setData=="function")try{pe.setData(WP)}catch{}}function I(O){const ae=w(n());if(!ae.length)return;const ye={type:"FeatureCollection",features:ae.map(xe=>{const Q=parseFloat(xe.longitude??xe.lng),Z=parseFloat(xe.latitude??xe.lat);return isNaN(Q)||isNaN(Z)?null:{type:"Feature",geometry:{type:"Point",coordinates:[Q,Z]},properties:{...xe.properties||xe}}}).filter(Boolean)},Se=O.getSource(ra);Se&&typeof Se.setData=="function"?Se.setData(ye):O.addSource(ra,{type:"geojson",data:ye,...GP,...l}),O.getLayer(Do)?K(O,Do,!0):O.addLayer({id:Do,type:"circle",source:ra,filter:["has","point_count"],paint:{"circle-color":HP,"circle-radius":UP,"circle-stroke-width":2,"circle-stroke-color":"#ffffff",...gn(O),"circle-opacity":.85}}),O.getLayer(pr)?K(O,pr,!0):O.addLayer({id:pr,type:"symbol",source:ra,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],...jP(O,{weight:"medium",mapbox:["DIN Offc Pro Medium","Arial Unicode MS Bold"]}),"text-size":12},paint:{"text-color":"#000000"}}),T(O)}function P(O,ae){const pe=w(n());if(!pe.length)return;const ye=BP(pe,le=>{var we;return le[s]??((we=le._normalized)==null?void 0:we[s])??"Unknown"}),Se=typeof i=="function"?i:()=>"#666666";let xe=[];if(ae==="mst"?(xe=u.generateAllMSTLines(ye,Se),Object.keys(ye).length):(xe=g.generateAllNetworkLines(ye,Se),g.getClusteringStats(ye)),b.value=xe,xe.length===0)return;const Q={type:"FeatureCollection",features:xe},Z=O.getSource(ur);if(Z&&typeof Z.setData=="function"?Z.setData(Q):O.addSource(ur,{type:"geojson",data:Q}),O.getLayer(dr))K(O,dr,!0);else{const le={id:dr,type:"line",source:ur,paint:{"line-color":["coalesce",["get","color"],"#666666"],"line-width":["interpolate",["linear"],["zoom"],0,.5,4,.75,8,1,12,1.5],...gn(O,"line"),"line-opacity":.5},layout:{"line-cap":"round","line-join":"round"}};O.getLayer(r)?O.addLayer(le,r):O.addLayer(le)}}function T(O){O.getLayer(Do)&&(O.on("click",Do,C),O.on("mouseenter",Do,D),O.on("mouseleave",Do,N),d=Do)}function U(O){if(!d)return;const ae=d;try{O.off("click",ae,C),O.off("mouseenter",ae,D),O.off("mouseleave",ae,N)}catch{}d=null}function C(O){const ae=t();if(!ae)return;const pe=ae.queryRenderedFeatures(O.point,{layers:[Do]});if(!pe.length)return;const ye=pe[0],Se=ye.properties.cluster_id,xe=ye.geometry.coordinates,Q=ye.properties.point_count;if(typeof m=="function"){m({clusterId:Se,coordinates:xe,pointCount:Q,originalEvent:O});return}const Z=ae.getSource(ra);!Z||typeof Z.getClusterExpansionZoom!="function"||Z.getClusterExpansionZoom(Se,(le,we)=>{le||ae.easeTo({center:xe,zoom:we})})}function D(){const O=t();O&&(O.getCanvas().style.cursor="pointer")}function N(){const O=t();O&&(O.getCanvas().style.cursor="")}function W(O,ae){if(O.getLayer(r))try{O.setPaintProperty(r,"circle-opacity",ae?.25:.9)}catch{}}return{enabled:k,mode:$,clusterLines:b,setMode:p,setEnabled:y,setSelectionFilter:f,onClusterClick:A,applyClustering:S,clearClustering:G,cleanup:q,mstUtil:u,networkUtil:g}}const qP=Object.freeze(Object.defineProperty({__proto__:null,default:qf,useMapClustering:qf},Symbol.toStringTag,{value:"Module"})),Kf=e=>Math.log(Math.tan(Math.PI/4+e*Math.PI/180/2)),Vf=e=>Math.atan(Math.sinh(e))*180/Math.PI,Yf=85.051129,Zf=e=>Math.max(-Yf,Math.min(Yf,e));function KP(e,t,o){const n=Math.max(1,Math.floor(o)||1),a=Kf(Zf(Math.max(e,t))),r=Kf(Zf(Math.min(e,t))),s=(a-r)/n,i=[];for(let l=0;l=e.widthIn?"portrait":"landscape"),margins:{...Yt.margins},bleed:Yt.bleed,slots:{title:{text:"Untitled",subtitle:"",heightIn:Yt.title.heightIn},legend:{rows:[],type:"generic",widthIn:Yt.legend.widthIn},scaleBar:!0,north:!0,footer:{left:"",right:"",attribution:Yt.footer.attribution,heightIn:Yt.footer.heightIn}},renderPath:"auto"}}const Jf=Object.freeze(Object.defineProperty({__proto__:null,defaultPosterSpec:VP,posterDefaults:Yt},Symbol.toStringTag,{value:"Module"}));function fo(e,t){return Math.round(e*t)}function Xf(e,t){var y,f,w,A,S,G,q,K;const o=t.dpi,n=e.margins||Yt.margins,a={x:0,y:0,w:t.width,h:t.height},r={x:fo(n.left,o),y:fo(n.top,o),w:t.width-fo(n.left+n.right,o),h:t.height-fo(n.top+n.bottom,o)},s=(y=e.slots)!=null&&y.title?fo(e.slots.title.heightIn||Yt.title.heightIn,o):0,i={x:r.x,y:r.y,w:r.w,h:s},l=fo(((w=(f=e.slots)==null?void 0:f.footer)==null?void 0:w.heightIn)||Yt.footer.heightIn,o),c={x:r.x,y:r.y+r.h-l,w:r.w,h:l},u=(A=e.slots)!=null&&A.legend?fo(e.slots.legend.widthIn||Yt.legend.widthIn,o):0,g=(S=e.slots)!=null&&S.scaleBar||(G=e.slots)!=null&&G.north?fo(Yt.chromeBand.heightIn,o):0,h=r.y+s+(s?fo(Yt.gutter.in,o):0),x=c.y-g-(g?fo(Yt.gutter.in,o):0),k={x:r.x,y:h,w:r.w-(u?u+fo(Yt.gutter.in,o):0),h:x-h},$=u?{x:r.x+r.w-u,y:h,w:u,h:k.h}:{x:0,y:0,w:0,h:0},b=fo(Yt.scaleBar.widthIn,o),m=g,d=(q=e.slots)!=null&&q.scaleBar?{x:r.x,y:x+(g?fo(Yt.gutter.in,o):0),w:b,h:m}:{x:0,y:0,w:0,h:0},_=fo(Yt.north.sizeIn,o),p=(K=e.slots)!=null&&K.north?{x:r.x+r.w-_-(u?u+fo(Yt.gutter.in,o):0),y:x+(g?fo(Yt.gutter.in,o):0),w:_,h:_}:{x:0,y:0,w:0,h:0};return{page:a,content:r,title:i,map:k,legend:$,scaleBar:d,north:p,footer:c}}const YP={"©":"©","&":"&"," ":" ","<":"<",">":">",""":'"',"'":"'"};function ZP(e){return e?String(e).replace(/<[^>]*>/g," ").replace(/&[a-z]+;|&#\d+;/gi,t=>YP[t.toLowerCase()]??" ").replace(/\s+/g," ").trim():""}function JP(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=ZP(r&&r.attribution||o[a].attribution);s&&!n.includes(s)&&n.push(s)}return n.join(" ")}const Sa=4096,bn=2048,Qf=15e3;function XP(e){const t=ke({phase:"idle",completed:0,total:0,message:"",fraction:0,percent:0}),o=ke(!1);let n=null;async function a($,b="png"){var _;if(o.value)throw new Error("useMapPoster: already rendering");const m=e();if(!m)throw new Error("useMapPoster: no source map");n=new AbortController;const d=nA($.signal,n.signal);o.value=!0,l=0,c("init",1,1,"preparing render");try{const p=em($),y=QP($.renderPath||"auto",p);y==="single"&&(p.width>Sa||p.height>Sa)&&console.warn(`[useMapPoster] requested single-canvas ${p.width}×${p.height}px > ${Sa}; auto-switching to tile-stitch.`);const f=y==="single"&&(p.width>Sa||p.height>Sa)?"stitch":y,w=$.layout==="poster",A=w?Xf($,p):null,S=!!A&&A.map.w>0&&A.map.h>0;w&&!S&&console.warn('[useMapPoster] layout:"poster" asked for a map box of '+(A?A.map.w+"×"+A.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=S?{width:A.map.w,height:A.map.h,dpi:p.dpi}:p,q=f==="single"?await u(m,G,d):await g(m,G,d);c("compose",0,1,"compositing overlay");const K=JP(m),v=K?{...$,slots:{...$.slots,footer:{...((_=$.slots)==null?void 0:_.footer)||{},attribution:K}}}:$,I=S?h(q,A,p):q,P=await x(I,v,p);c("encode",0,1,`encoding ${b.toUpperCase()}`);const T=b==="pdf"?await oA(P,$):await tA(P,"image/png");return c("done",1,1,"render complete"),T}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($,b,m,d){const _=i.indexOf($);let p=0;for(let w=0;w<_;w++)p+=s[i[w]]||0;const y=m>0?Math.min(1,b/m):0,f=p+(s[$]||0)*y;l=$==="init"?f:Math.max(l,f),t.value={phase:$,completed:b,total:m,message:d,fraction:Math.min(1,l),percent:Math.round(Math.min(1,l)*100)}}async function u($,b,m){c("hidden-map",0,3,"creating hidden map");const{hiddenMap:d,restoreDpr:_,container:p}=await tm($,b.width,b.height);try{pu(m),c("hidden-map",1,3,"loading map tiles"),await nm(d),c("hidden-map",3,3,"tiles loaded"),pu(m),c("capture",0,1,"capturing canvas");const y=d.getCanvas().toDataURL("image/png"),f=await am(y),w=document.createElement("canvas");return w.width=b.width,w.height=b.height,w.getContext("2d").drawImage(f,0,0,b.width,b.height),w}finally{try{d.remove()}catch{}p!=null&&p.parentNode&&p.parentNode.removeChild(p),_()}}async function g($,b,m){const d=Math.ceil(b.width/bn),_=Math.ceil(b.height/bn),p=d*_;c("hidden-map",0,p,`creating hidden map (${d}×${_} tiles)`);const y=$.getBounds(),f=$.getCenter(),w=$.getZoom(),A=$.getBearing(),S=$.getPitch(),{hiddenMap:G,restoreDpr:q,container:K}=await tm($,bn,bn,{preserveBounds:!0,bounds:y});try{const v=document.createElement("canvas");v.width=b.width,v.height=b.height;const I=v.getContext("2d"),P=y.getNorthEast(),T=y.getSouthWest(),C=(P.lng-T.lng)/d,D=KP(T.lat,P.lat,_);let N=0;for(let W=0;W<_;W++)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 QP(e,t){return e==="single"||e==="stitch"?e:t.width>Sa||t.height>Sa?"stitch":"single"}async function tm(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=$i(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 g=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 h="";await new Promise((x,k)=>{let $=!1;const b=_=>{$||($=!0,clearTimeout(m),clearInterval(d),_?k(_):x())},m=setTimeout(()=>b(new Error("useMapPoster: hidden map style.load timeout"+(h?" ("+h+")":""))),Qf),d=setInterval(()=>{try{g.isStyleLoaded()&&b()}catch{}},100);g.once("style.load",()=>b()),g.once("load",()=>b()),g.on("error",_=>{var p;h=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 g.setLanguage=="function"&&g.setLanguage(x)}catch{}return n.preserveBounds&&n.bounds&&g.fitBounds(n.bounds,{padding:0,animate:!1,duration:0}),{hiddenMap:g,restoreDpr:s,container:a}}const om=6e4;function nm(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()},Qf)),n.push(setTimeout(()=>a("hidden map not idle after "+om/1e3+"s; capturing what is drawn"),om)),e.loaded()&&!e.isMoving()?a():e.once("idle",()=>a())})}function am(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 eA(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 tA(e,t){return new Promise((o,n)=>{e.toBlob(a=>a?o(a):n(new Error("toBlob failed")),t)})}async function oA(e,t){let o;try{const s=await Bt(()=>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 pu(e){if(e!=null&&e.aborted)throw new DOMException("useMapPoster: aborted","AbortError")}function nA(...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 rm(e){return(e==null?void 0:e.dir)==="rtl"}function gu(e,t,o){return rm(e)?`x="${t.w-o}" text-anchor="start" direction="rtl"`:`x="${o}"`}function aA(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,Pa),n=(((i=(s=e.slots)==null?void 0:s.title)==null?void 0:i.subtitle)||"").replace(/[<>&]/g,Pa);return` diff --git a/public/dx-maps/doxa-research-map/research-map/index.html b/public/dx-maps/doxa-research-map/research-map/index.html index 176defd20..6472fd9bf 100644 --- a/public/dx-maps/doxa-research-map/research-map/index.html +++ b/public/dx-maps/doxa-research-map/research-map/index.html @@ -76,7 +76,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" } } ] @@ -200,7 +200,7 @@ "bundle": "country-posters", "scriptUrl": "./country-posters/country-posters.js", "output": "dx-maps/country-posters/country-posters.js", - "integrity": "sha384-y6QRHZJrbU5N5EDaCq4egqT+Kz3hhQlj6O0ywW+7dDQnsi2IU/MAaIAeutymWF4X", + "integrity": "sha384-cxtNgvnqEyXxhpAZacJYkOPMFG3iebBoIj/053T17nV/dqSHwWpgmcM3JXNq9yZr", "elements": [ "country-posters-map" ], @@ -223,8 +223,8 @@ "scriptUrl": "./country-posters/country-posters.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" } }, { @@ -240,7 +240,7 @@ "scriptUrl": "./country-posters/country-posters.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -256,8 +256,8 @@ "scriptUrl": "./country-posters/country-posters.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" } } ] @@ -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-v6FhZTlAmsMNoqNzTniKluH5tHLVLC7Q5HW+C8emiVMf2vcXPOh7zq05XOZk5aU2", + "integrity": "sha384-avlkHxsWgCQgiSW/r+mT7d0/Nk87QKTASmKuwQSDS7xUtmoaVX9Y9htJKREELlCn", "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-GzqpF+lfBjJAFnYaHC60PEsBak3wxHCVIIz3jcSxqhJI5lQY7oJpzScxlhOrqq4R", + "integrity": "sha384-CFvpV0+z5UkqIULO4kqU36/z39+M3MgofthE1JlixDcUzDYUofQo08bWe/lIkFmo", "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": [ { @@ -880,7 +880,7 @@ "bundle": "my-upg-100-list", "scriptUrl": "./my-upg-100-list/my-upg-100-list.js", "output": "dx-maps/my-upg-100-list/my-upg-100-list.js", - "integrity": "sha384-m8twdIW8Lu8s/0HVnirPvP3yBE0aKIduqNju1zrHlwBqhI5s8qdZbKEKGJ3zumH9", + "integrity": "sha384-EiOfexZFEHHJmqRKKEGk2IdB6q6SahM1dPfLOhgdWFa9sBCcQuLJBbqsp1ygCYjs", "elements": [ "my-upg-100-list-map" ], @@ -903,7 +903,7 @@ "scriptUrl": "./my-upg-100-list/my-upg-100-list.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -919,8 +919,8 @@ "scriptUrl": "./my-upg-100-list/my-upg-100-list.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" } }, { @@ -936,8 +936,8 @@ "scriptUrl": "./my-upg-100-list/my-upg-100-list.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" } } ] diff --git a/public/dx-maps/my-upg-100-list/my-upg-100-list.js b/public/dx-maps/my-upg-100-list/my-upg-100-list.js index 5975f97bd..2b5ddc9c2 100644 --- a/public/dx-maps/my-upg-100-list/my-upg-100-list.js +++ b/public/dx-maps/my-upg-100-list/my-upg-100-list.js @@ -782,7 +782,7 @@ @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,a=nt("uiStore");nt("mapStore");const n=nt("dataStore"),r=nt("onSemanticTreeSelect",()=>{}),i=nt("onLegendExport",null),s=Q(()=>typeof i=="function"),l=nt("legendExportCards",!1),c=R0(o,"legendType"),{items:u,columns:d,title:p,activeFilter:y,setFilter:f,totalCount:h,totalPopulation:$,fmtPop:_,fmtCount:b}=dk(c,pk),w=nt("normalizedPeopleGroups",null),m=Q(()=>{var Ne,Fe;if((Ne=w==null?void 0:w.value)!=null&&Ne.length)return w.value;const Te=[];for(const Ve in(n==null?void 0:n.sources)||{}){const dt=n.sources[Ve];(Fe=dt==null?void 0:dt.features)!=null&&Fe.length&&Te.push(...dt.features)}return Te}),g={get value(){return m.value}},{langTree:v}=Jh(g),{affinityTree:S}=Uk(g),{regionsTree:A}=ox(g),C=[{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."}],W=[{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."}],J=[{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."}],O=Q(()=>["prayer","engagement","adoption","religion"].includes(o.legendType));function T(Te){const Ne=[];for(const Fe of Te){Ne.push({id:Fe.key,label:Fe.label,color:Fe.color,count:Fe.count??0,pop:Fe.population??0,filter:Fe.filterKey?["==",["get","_flat_filter"],Fe.filterKey]:null,children:[]});for(const Ve of Fe.children||[])Ne.push({id:Ve.key,label:Ve.label,color:Ve.color,count:Ve.count??0,pop:Ve.population??0,filter:Ve.filterKey?["==",["get","_flat_filter"],Ve.filterKey]:null,children:[]})}return Ne}const oe=Q(()=>o.nodes?o.nodes:O.value?T(u.value):o.legendType==="affinity-block"?S.value:o.legendType==="doxa-regions"?A.value:v.value),X=Q(()=>o.nodes?o.tabs:O.value?null:o.legendType==="affinity-block"?W:o.legendType==="doxa-regions"?J:C),H=Q(()=>o.title?o.title:O.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")),ge=Q(()=>o.columnLabel!==null?o.columnLabel:["religion","prayer","engagement","adoption"].includes(o.legendType)?t("legend.colLabel."+o.legendType):O.value?t("legend.colLabel.status"):""),k=fe(null),j=fe(!1),z={pending:null,active:!1,startY:0,startH:0,startState:"",containerH:0,maxH:0,lastH:0};let N=0;const re=()=>Date.now()-N<400,he=Q(()=>a.legendState),be=Q(()=>he.value!=="collapsed"),we=Q(()=>a.legendHeight),Me=Q(()=>a.caretRotation),De=Q(()=>a.showPullTab),Pe=Q(()=>he.value==="open"&&!a._customLegendHeight);let ke=!1;pt(()=>a.isMobile,Te=>{!Te||ke||(ke=!0,a.selectedPeopleGroup||a.collapseLegend())},{immediate:!0});const tt=Q(()=>a.legendMode),rt=Q(()=>a.selectedPeopleGroup),E=nt("normalizedPeopleGroups",null),G=Q(()=>{var Ne,Fe;if((Ne=E==null?void 0:E.value)!=null&&Ne.length)return ch(E.value);const Te=[];for(const Ve in(n==null?void 0:n.sources)||{}){const dt=n.sources[Ve];(Fe=dt==null?void 0:dt.features)!=null&&Fe.length&&Te.push(...dt.features)}return ch(Te)}),D=Q(()=>rt.value?xv(G.value,rt.value):[]),ae=Q(()=>{var Te;return tt.value==="detail"&&rt.value?((Te=rt.value.properties)==null?void 0:Te.name)||t("legend.header.peopleGroupFallback"):he.value==="collapsed"?o.title||t("legend.header.collapsed"):o.title||p.value});function pe(Te){a.handleLegendItemClick(),f(Te)}function ie(){re()||a.toggleLegend()}function $e(){re()||(a.selectPeopleGroup(null),a.openLegend())}const me=Q(()=>{var Ne;if(!rt.value)return null;const Te=rt.value.properties||{};return Te.imageUrl||((Ne=Te._raw)==null?void 0:Ne.ImageURL)||null});function P(Te){var dt;if(he.value==="collapsed"){z.pending="hold",z.active=!1;return}const Ne=Te.touches[0],Fe=k.value;!Ne||!Fe||!(Ne.clientY-Fe.getBoundingClientRect().top<=Zx)||(z.pending="grab",z.active=!1,z.startY=Ne.clientY,z.startH=Fe.offsetHeight,z.lastH=z.startH,z.startState=he.value,z.containerH=((dt=Fe.parentElement)==null?void 0:dt.offsetHeight)||window.innerHeight,z.maxH=z.containerH-sf)}function x(Te){if(!z.pending&&!z.active)return;if(z.pending==="hold"){Te.cancelable&&Te.preventDefault();return}const Ne=Te.touches[0];if(!Ne)return;const Fe=z.startY-Ne.clientY;if(!z.active){if(Fe===0)return;z.pending=null,z.active=!0,j.value=!0}Te.preventDefault();const Ve=Math.round(Math.min(z.maxH,Math.max(lf,z.startH+Fe)));z.lastH=Ve,a.setLegendHeight(`${Ve}px`)}function Y(){if(z.pending=null,!z.active)return;z.active=!1,j.value=!1,N=Date.now();const Te=z.lastH,Ne=Te-z.startH,Fe=z.containerH*.3;if(tt.value!=="detail"){Te0?a.fullyOpenLegend():z.startState==="fullyOpen"?a.openLegend():a.collapseLegend()}function L(Te){Te==="fullyOpen"?a.fullyOpenLegend():Te==="collapsed"?a.collapseLegend():a.openLegend()}let U=null;io(()=>{const Te=k.value,Ne=Te&&Te.getRootNode?Te.getRootNode():null;U=Ne&&Ne.host?Ne.host:typeof document<"u"?document.documentElement:null,U&&(U.__lmCount=(U.__lmCount||0)+1,U.classList.add(cf))}),qt(()=>{U&&(U.__lmCount=Math.max(0,(U.__lmCount||1)-1),U.__lmCount||U.classList.remove(cf),U=null)});let V=0;function M(Te){const Ne=k.value;if(!Ne||!Ne.isConnected)return;const Fe=Te?0:Ne.offsetHeight,Ve=Fe>0?he.value==="collapsed"?"collapsed":"open":"gone";Ne.dispatchEvent(new CustomEvent(Xx,{bubbles:!0,composed:!0,detail:{height:Fe,collapsedHeight:lf,state:Ve}}))}function K(){V||typeof requestAnimationFrame>"u"||(V=requestAnimationFrame(()=>{V=0,M(!1)}))}pt(he,()=>K()),io(()=>{const Te=k.value;Te&&(Te.addEventListener("transitionend",K),window.addEventListener("resize",K),K())}),qt(()=>{V&&(cancelAnimationFrame(V),V=0);const Te=k.value;Te&&Te.removeEventListener("transitionend",K),window.removeEventListener("resize",K),M(!0)});let ve=null,Ae=null,Qe=null;io(()=>{const Te=k.value;if(!Te||typeof ResizeObserver>"u")return;const Ne=Te.getRootNode();Ae=Ne instanceof ShadowRoot?Ne.host:Ne.documentElement||null,Ae&&(Qe=Te,ve=new ResizeObserver(()=>{K();const Fe=Te.offsetHeight;Fe<=0||(Ae.style.setProperty(uf,`${Fe}px`),Ae.__legendSheetVarOwner=Te)}),ve.observe(Te))}),qt(()=>{ve&&(ve.disconnect(),ve=null),Ae&&Ae.__legendSheetVarOwner===Qe&&(Ae.style.removeProperty(uf),Ae.__legendSheetVarOwner=null),Ae=null,Qe=null});let ut=0;function _t(Te){ut=0;const Ne=k.value,Fe=Ne&&Ne.getRootNode?Ne.getRootNode():null;if(!Fe||!Fe.querySelector)return;const Ve=Fe.querySelector(".maplibregl-ctrl-attrib.maplibregl-compact-show, .mapboxgl-ctrl-attrib.mapboxgl-compact-show");if(Ve){ut=setTimeout(()=>{ut=0,a.isMobile&&Ve.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")},Qx);return}const dt=Fe.querySelector(".maplibregl-ctrl-attrib, .mapboxgl-ctrl-attrib");dt&&!/attrib-empty/.test(dt.className)||Te>0&&(ut=setTimeout(()=>_t(Te-1),500))}return io(()=>_t(60)),qt(()=>{ut&&(clearTimeout(ut),ut=0)}),(Te,Ne)=>{var Fe;return Z(),te("div",Gx,[tt.value==="detail"&&rt.value&&he.value==="open"&&me.value?(Z(),te("div",{key:0,class:"floating-mini-image",onClick:Ne[0]||(Ne[0]=Ve=>ue(a).fullyOpenLegend())},[F("img",{src:me.value,alt:(Fe=rt.value.properties)==null?void 0:Fe.name,class:"mini-image"},null,8,jx)])):Se("",!0),F("div",{ref_key:"sheetRef",ref:k,class:We(["legend-mobile-sheet",[he.value,{"sheet-dark":e.isDark,dragging:j.value,fit:Pe.value}]]),style:Mt({height:Pe.value?"auto":we.value,"--legend-sheet-top-reserve":sf+"px"}),onTouchstart:P,onTouchmove:x,onTouchend:Y,onTouchcancel:Y},[F("div",{class:"sheet-drag-strip",onClick:ie},[De.value?(Z(),te("div",Bx)):Se("",!0)]),tt.value==="detail"&&he.value!=="collapsed"?(Z(),te("button",{key:0,class:"detail-collapse-btn-mobile",onClick:zt(ie,["stop"]),"aria-expanded":String(be.value),"aria-label":ue(t)("aria.toggleLegend")},null,8,Hx)):Se("",!0),tt.value==="detail"&&he.value!=="collapsed"?(Z(),te("button",{key:1,class:"detail-close-btn",onClick:zt($e,["stop"]),"aria-label":ue(t)("aria.backToLegend")},[...Ne[2]||(Ne[2]=[F("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[F("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,Ux)):Se("",!0),he.value==="collapsed"&&tt.value==="detail"&&rt.value?(Z(),te("div",{key:2,class:"collapsed-detail-footer",onClick:ie},[F("button",{class:"mobile-collapse-caret",style:Mt({transform:`rotate(${Me.value}deg)`}),"aria-expanded":String(be.value),"aria-label":ue(t)("aria.toggleLegend"),tabindex:"-1"},[...Ne[3]||(Ne[3]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Wx),F("span",Kx,ce(ae.value),1)])):Se("",!0),F("div",Vx,[tt.value==="detail"&&rt.value?(Z(),te(Xe,{key:0},[he.value!=="collapsed"?(Z(),Tt(rf,{key:0,peopleGroup:rt.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):Se("",!0),he.value!=="collapsed"?(Z(),Tt(sh,{key:1,shared:D.value,dark:e.isDark},null,8,["shared","dark"])):Se("",!0)],64)):e.legendType!=="default"?(Z(),Tt(uh,{key:1,"pin-note":!1,nodes:oe.value,tabs:X.value,"default-tab":e.defaultTab,title:ae.value||H.value,hideTabs:e.nodes?!e.tabs:O.value,columnLabel:ge.value,columns:e.columns||["count","pop"],"export-enabled":s.value,"export-cards":s.value&&ue(l)===!0,onSelect:ue(r),onExport:Ne[1]||(Ne[1]=Ve=>ue(i)&&ue(i)(Ve))},{"title-caret":ko(()=>[F("button",{class:"mobile-collapse-caret",style:Mt({transform:`rotate(${Me.value}deg)`}),onClick:zt(ie,["stop"]),"aria-expanded":String(be.value),"aria-label":ue(t)("aria.toggleLegend")},[...Ne[4]||(Ne[4]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,qx)]),_:1},8,["nodes","tabs","default-tab","title","hideTabs","columnLabel","columns","export-enabled","export-cards","onSelect"])):(Z(),Tt(Ck,{key:2,title:ae.value,items:ue(u),columns:ue(d),activeFilter:ue(y),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:ue(h),totalPopulation:ue($),fmtPop:ue(_),fmtCount:ue(b),onFilterClick:pe},{"title-caret":ko(()=>[F("button",{class:"mobile-collapse-caret",style:Mt({transform:`rotate(${Me.value}deg)`}),onClick:zt(ie,["stop"]),"aria-expanded":String(be.value),"aria-label":ue(t)("aria.toggleLegend")},[...Ne[5]||(Ne[5]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Yx)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],38)])}}},[["styles",[zx]],["__scopeId","data-v-27f25155"]]),tP={__name:"MapToolbar",props:{hasGeocoder:{type:Boolean,default:!0},controls:{type:String,default:"round"}},setup(e){const t=e,o=fe(null);return oo("mapToolbar",{el:o,shape:Q(()=>t.controls==="square"?"square":"round")}),Zt(` +`,"legend-mobile-sheet");const o=e,a=nt("uiStore");nt("mapStore");const n=nt("dataStore"),r=nt("onSemanticTreeSelect",()=>{}),i=nt("onLegendExport",null),s=Q(()=>typeof i=="function"),l=nt("legendExportCards",!1),c=R0(o,"legendType"),{items:u,columns:d,title:p,activeFilter:y,setFilter:f,totalCount:h,totalPopulation:$,fmtPop:_,fmtCount:b}=dk(c,pk),w=nt("normalizedPeopleGroups",null),m=Q(()=>{var Ne,Fe;if((Ne=w==null?void 0:w.value)!=null&&Ne.length)return w.value;const Te=[];for(const Ve in(n==null?void 0:n.sources)||{}){const dt=n.sources[Ve];(Fe=dt==null?void 0:dt.features)!=null&&Fe.length&&Te.push(...dt.features)}return Te}),g={get value(){return m.value}},{langTree:v}=Jh(g),{affinityTree:S}=Uk(g),{regionsTree:A}=ox(g),C=[{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."}],W=[{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."}],J=[{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."}],O=Q(()=>["prayer","engagement","adoption","religion"].includes(o.legendType));function T(Te){const Ne=[];for(const Fe of Te){Ne.push({id:Fe.key,label:Fe.label,color:Fe.color,count:Fe.count??0,pop:Fe.population??0,filter:Fe.filterKey?["==",["get","_flat_filter"],Fe.filterKey]:null,children:[]});for(const Ve of Fe.children||[])Ne.push({id:Ve.key,label:Ve.label,color:Ve.color,count:Ve.count??0,pop:Ve.population??0,filter:Ve.filterKey?["==",["get","_flat_filter"],Ve.filterKey]:null,children:[]})}return Ne}const oe=Q(()=>o.nodes?o.nodes:O.value?T(u.value):o.legendType==="affinity-block"?S.value:o.legendType==="doxa-regions"?A.value:v.value),X=Q(()=>o.nodes?o.tabs:O.value?null:o.legendType==="affinity-block"?W:o.legendType==="doxa-regions"?J:C),H=Q(()=>o.title?o.title:O.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")),ge=Q(()=>o.columnLabel!==null?o.columnLabel:["religion","prayer","engagement","adoption"].includes(o.legendType)?t("legend.colLabel."+o.legendType):O.value?t("legend.colLabel.status"):""),k=fe(null),j=fe(!1),z={pending:null,active:!1,startY:0,startH:0,startState:"",containerH:0,maxH:0,lastH:0};let N=0;const re=()=>Date.now()-N<400,he=Q(()=>a.legendState),be=Q(()=>he.value!=="collapsed"),we=Q(()=>a.legendHeight),Me=Q(()=>a.caretRotation),De=Q(()=>a.showPullTab),Pe=Q(()=>he.value==="open"&&!a._customLegendHeight);let ke=!1;pt(()=>a.isMobile,Te=>{!Te||ke||(ke=!0,a.selectedPeopleGroup||a.collapseLegend())},{immediate:!0});const tt=Q(()=>a.legendMode),rt=Q(()=>a.selectedPeopleGroup),E=nt("normalizedPeopleGroups",null),G=Q(()=>{var Ne,Fe;if((Ne=E==null?void 0:E.value)!=null&&Ne.length)return ch(E.value);const Te=[];for(const Ve in(n==null?void 0:n.sources)||{}){const dt=n.sources[Ve];(Fe=dt==null?void 0:dt.features)!=null&&Fe.length&&Te.push(...dt.features)}return ch(Te)}),D=Q(()=>rt.value?xv(G.value,rt.value):[]),ae=Q(()=>{var Te;return tt.value==="detail"&&rt.value?((Te=rt.value.properties)==null?void 0:Te.name)||t("legend.header.peopleGroupFallback"):he.value==="collapsed"?o.title||t("legend.header.collapsed"):o.title||p.value});function pe(Te){a.handleLegendItemClick(),f(Te)}function ie(){re()||a.toggleLegend()}function $e(){re()||(a.selectPeopleGroup(null),a.openLegend())}const me=Q(()=>{var Ne;if(!rt.value)return null;const Te=rt.value.properties||{};return Te.imageUrl||((Ne=Te._raw)==null?void 0:Ne.ImageURL)||null});function P(Te){var dt;if(he.value==="collapsed"){z.pending="hold",z.active=!1;return}const Ne=Te.touches[0],Fe=k.value;!Ne||!Fe||!(Ne.clientY-Fe.getBoundingClientRect().top<=Zx)||(z.pending="grab",z.active=!1,z.startY=Ne.clientY,z.startH=Fe.offsetHeight,z.lastH=z.startH,z.startState=he.value,z.containerH=((dt=Fe.parentElement)==null?void 0:dt.offsetHeight)||window.innerHeight,z.maxH=z.containerH-sf)}function x(Te){if(!z.pending&&!z.active)return;if(z.pending==="hold"){Te.cancelable&&Te.preventDefault();return}const Ne=Te.touches[0];if(!Ne)return;const Fe=z.startY-Ne.clientY;if(!z.active){if(Fe===0)return;z.pending=null,z.active=!0,j.value=!0}Te.preventDefault();const Ve=Math.round(Math.min(z.maxH,Math.max(lf,z.startH+Fe)));z.lastH=Ve,a.setLegendHeight(`${Ve}px`)}function Y(){if(z.pending=null,!z.active)return;z.active=!1,j.value=!1,N=Date.now();const Te=z.lastH,Ne=Te-z.startH,Fe=z.containerH*.3;if(tt.value!=="detail"){Te0?a.fullyOpenLegend():z.startState==="fullyOpen"?a.openLegend():a.collapseLegend()}function L(Te){Te==="fullyOpen"?a.fullyOpenLegend():Te==="collapsed"?a.collapseLegend():a.openLegend()}let U=null;io(()=>{const Te=k.value,Ne=Te&&Te.getRootNode?Te.getRootNode():null;U=Ne&&Ne.host?Ne.host:typeof document<"u"?document.documentElement:null,U&&(U.__lmCount=(U.__lmCount||0)+1,U.classList.add(cf))}),qt(()=>{U&&(U.__lmCount=Math.max(0,(U.__lmCount||1)-1),U.__lmCount||U.classList.remove(cf),U=null)});let V=0;function M(Te){const Ne=k.value;if(!Ne||!Ne.isConnected)return;const Fe=Te?0:Ne.offsetHeight,Ve=Fe>0?he.value==="collapsed"?"collapsed":"open":"gone";Ne.dispatchEvent(new CustomEvent(Xx,{bubbles:!0,composed:!0,detail:{height:Fe,collapsedHeight:lf,state:Ve}}))}function K(){V||typeof requestAnimationFrame>"u"||(V=requestAnimationFrame(()=>{V=0,M(!1)}))}pt(he,()=>K()),io(()=>{const Te=k.value;Te&&(Te.addEventListener("transitionend",K),window.addEventListener("resize",K),K())}),qt(()=>{V&&(cancelAnimationFrame(V),V=0);const Te=k.value;Te&&Te.removeEventListener("transitionend",K),window.removeEventListener("resize",K),M(!0)});let ve=null,Ae=null,Qe=null;io(()=>{const Te=k.value;if(!Te||typeof ResizeObserver>"u")return;const Ne=Te.getRootNode();Ae=Ne instanceof ShadowRoot?Ne.host:Ne.documentElement||null,Ae&&(Qe=Te,ve=new ResizeObserver(()=>{K();const Fe=Te.offsetHeight;Fe<=0||(Ae.style.setProperty(uf,`${Fe}px`),Ae.__legendSheetVarOwner=Te)}),ve.observe(Te))}),qt(()=>{ve&&(ve.disconnect(),ve=null),Ae&&Ae.__legendSheetVarOwner===Qe&&(Ae.style.removeProperty(uf),Ae.__legendSheetVarOwner=null),Ae=null,Qe=null});let ut=0;function _t(Te){ut=0;const Ne=k.value,Fe=Ne&&Ne.getRootNode?Ne.getRootNode():null;if(!Fe||!Fe.querySelector)return;const Ve=Fe.querySelector(".maplibregl-ctrl-attrib.maplibregl-compact-show, .mapboxgl-ctrl-attrib.mapboxgl-compact-show");if(Ve){ut=setTimeout(()=>{ut=0,a.isMobile&&Ve.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")},Qx);return}const dt=Fe.querySelector(".maplibregl-ctrl-attrib, .mapboxgl-ctrl-attrib");dt&&/(maplibregl|mapboxgl)-compact(\s|$)/.test(dt.className)||Te>0&&(ut=setTimeout(()=>_t(Te-1),500))}return io(()=>_t(60)),qt(()=>{ut&&(clearTimeout(ut),ut=0)}),(Te,Ne)=>{var Fe;return Z(),te("div",Gx,[tt.value==="detail"&&rt.value&&he.value==="open"&&me.value?(Z(),te("div",{key:0,class:"floating-mini-image",onClick:Ne[0]||(Ne[0]=Ve=>ue(a).fullyOpenLegend())},[F("img",{src:me.value,alt:(Fe=rt.value.properties)==null?void 0:Fe.name,class:"mini-image"},null,8,jx)])):Se("",!0),F("div",{ref_key:"sheetRef",ref:k,class:We(["legend-mobile-sheet",[he.value,{"sheet-dark":e.isDark,dragging:j.value,fit:Pe.value}]]),style:Mt({height:Pe.value?"auto":we.value,"--legend-sheet-top-reserve":sf+"px"}),onTouchstart:P,onTouchmove:x,onTouchend:Y,onTouchcancel:Y},[F("div",{class:"sheet-drag-strip",onClick:ie},[De.value?(Z(),te("div",Bx)):Se("",!0)]),tt.value==="detail"&&he.value!=="collapsed"?(Z(),te("button",{key:0,class:"detail-collapse-btn-mobile",onClick:zt(ie,["stop"]),"aria-expanded":String(be.value),"aria-label":ue(t)("aria.toggleLegend")},null,8,Hx)):Se("",!0),tt.value==="detail"&&he.value!=="collapsed"?(Z(),te("button",{key:1,class:"detail-close-btn",onClick:zt($e,["stop"]),"aria-label":ue(t)("aria.backToLegend")},[...Ne[2]||(Ne[2]=[F("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[F("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,Ux)):Se("",!0),he.value==="collapsed"&&tt.value==="detail"&&rt.value?(Z(),te("div",{key:2,class:"collapsed-detail-footer",onClick:ie},[F("button",{class:"mobile-collapse-caret",style:Mt({transform:`rotate(${Me.value}deg)`}),"aria-expanded":String(be.value),"aria-label":ue(t)("aria.toggleLegend"),tabindex:"-1"},[...Ne[3]||(Ne[3]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Wx),F("span",Kx,ce(ae.value),1)])):Se("",!0),F("div",Vx,[tt.value==="detail"&&rt.value?(Z(),te(Xe,{key:0},[he.value!=="collapsed"?(Z(),Tt(rf,{key:0,peopleGroup:rt.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):Se("",!0),he.value!=="collapsed"?(Z(),Tt(sh,{key:1,shared:D.value,dark:e.isDark},null,8,["shared","dark"])):Se("",!0)],64)):e.legendType!=="default"?(Z(),Tt(uh,{key:1,"pin-note":!1,nodes:oe.value,tabs:X.value,"default-tab":e.defaultTab,title:ae.value||H.value,hideTabs:e.nodes?!e.tabs:O.value,columnLabel:ge.value,columns:e.columns||["count","pop"],"export-enabled":s.value,"export-cards":s.value&&ue(l)===!0,onSelect:ue(r),onExport:Ne[1]||(Ne[1]=Ve=>ue(i)&&ue(i)(Ve))},{"title-caret":ko(()=>[F("button",{class:"mobile-collapse-caret",style:Mt({transform:`rotate(${Me.value}deg)`}),onClick:zt(ie,["stop"]),"aria-expanded":String(be.value),"aria-label":ue(t)("aria.toggleLegend")},[...Ne[4]||(Ne[4]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,qx)]),_:1},8,["nodes","tabs","default-tab","title","hideTabs","columnLabel","columns","export-enabled","export-cards","onSelect"])):(Z(),Tt(Ck,{key:2,title:ae.value,items:ue(u),columns:ue(d),activeFilter:ue(y),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:ue(h),totalPopulation:ue($),fmtPop:ue(_),fmtCount:ue(b),onFilterClick:pe},{"title-caret":ko(()=>[F("button",{class:"mobile-collapse-caret",style:Mt({transform:`rotate(${Me.value}deg)`}),onClick:zt(ie,["stop"]),"aria-expanded":String(be.value),"aria-label":ue(t)("aria.toggleLegend")},[...Ne[5]||(Ne[5]=[F("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[F("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,Yx)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],38)])}}},[["styles",[zx]],["__scopeId","data-v-931392c5"]]),tP={__name:"MapToolbar",props:{hasGeocoder:{type:Boolean,default:!0},controls:{type:String,default:"round"}},setup(e){const t=e,o=fe(null);return oo("mapToolbar",{el:o,shape:Q(()=>t.controls==="square"?"square":"round")}),Zt(` @media print { .map-toolbar, .mapboxgl-ctrl-group, diff --git a/public/dx-maps/my-upg-100-list/poster-wall/index.html b/public/dx-maps/my-upg-100-list/poster-wall/index.html index 642ba92c7..a716eabe3 100644 --- a/public/dx-maps/my-upg-100-list/poster-wall/index.html +++ b/public/dx-maps/my-upg-100-list/poster-wall/index.html @@ -67,7 +67,7 @@ - + - + - +