diff --git a/plugin-designs/cities-internet/connectivity-map.vue b/plugin-designs/cities-internet/connectivity-map.vue index d206886c8..523cc9b5b 100644 --- a/plugin-designs/cities-internet/connectivity-map.vue +++ b/plugin-designs/cities-internet/connectivity-map.vue @@ -568,6 +568,11 @@ useShadowStyles( ':host{display:block;position:relative;width:100%;height:100%;min-height:420px}' + '.gm{position:absolute;inset:0;overflow:hidden}' + '.gm-map{position:absolute;inset:0}' + + // THE GALLERY'S ROUND ☰ sits at a phone's bottom corner (bottom-left; bottom-right in Arabic) and publishes + // --map-fab-clearance while it shows. The engine's bottom corners, where this map's licence credit (and a + // Mapbox wordmark) live, lift by it: the rule every LegendMobile map already has. Unset anywhere else, so + // desktop and a map without the button are unchanged. It covered the credit's first/last ~30-40px before. + '.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{transform:translateY(calc(-1 * var(--map-fab-clearance,0px)))}' + // LEGEND: a BOUNDED, left-anchored panel — NOT a full-width strip. // It used to be `left:8px;right:8px`, which is a strip spanning the whole map // (MEASURED 1264px of a 1280px map, 98.75%). That collided with the floating diff --git a/plugin-designs/gospel-resources/resources-map.vue b/plugin-designs/gospel-resources/resources-map.vue index 0f54737ec..a8f2d0cbc 100644 --- a/plugin-designs/gospel-resources/resources-map.vue +++ b/plugin-designs/gospel-resources/resources-map.vue @@ -1991,6 +1991,11 @@ useShadowStyles( // 2,107 pins to queryRenderedFeatures, because that API does not care whether anything // is visible. The size is stated outright now so no engine stylesheet can take it. '.gm-map{position:absolute;inset:0;width:100%;height:100%}' + + // THE GALLERY'S ROUND ☰ sits at a phone's bottom corner (bottom-left; bottom-right in Arabic) and publishes + // --map-fab-clearance while it shows. The engine's bottom corners, where this map's licence credit (and a + // Mapbox wordmark) live, lift by it: the rule every LegendMobile map already has. Unset anywhere else, so + // desktop and a map without the button are unchanged. It covered the credit's first/last ~30-40px before. + '.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{transform:translateY(calc(-1 * var(--map-fab-clearance,0px)))}' + // LEGEND: a BOUNDED, left-anchored panel — NOT a full-width strip. // It used to be `left:8px;right:8px`, which is a strip spanning the whole map // (MEASURED 1264px of a 1280px map, 98.75%). That collided with the floating diff --git a/public/dx-maps/cities-internet/cities-internet.js b/public/dx-maps/cities-internet/cities-internet.js index 72f7a991f..56871eca7 100644 --- a/public/dx-maps/cities-internet/cities-internet.js +++ b/public/dx-maps/cities-internet/cities-internet.js @@ -693,7 +693,7 @@ @media (prefers-reduced-motion: reduce) { .legend-container, .legend-reopen, .legend-collapse-caret, .legend-collapse-caret svg { transition: none !important; animation: none !important; } } -`,"legend-component");const a=e;Se("mapStore");const r=Se("dataStore"),s=Se("uiStore"),i=_l(a,"legendType"),{items:l,columns:c,title:u,activeFilter:p,setFilter:d,totalCount:w,totalPopulation:b,progress:m,fmtPop:g,fmtCount:$}=id(i,bd),C=Se("normalizedPeopleGroups",null),v=U(()=>{var Y,ae;if((Y=C==null?void 0:C.value)!=null&&Y.length)return C.value;const Q=[];for(const te in r.sources){const oe=r.sources[te];(ae=oe==null?void 0:oe.features)!=null&&ae.length&&Q.push(...oe.features)}return Q}),k=Se("mapId",null),x=U(()=>s.isMobile),S=U(()=>s.legendMode),N=U(()=>s.selectedPeopleGroup),I=U(()=>Ei(v.value)),O=U(()=>N.value?_d(I.value,N.value):[]),F=ie(a.initiallyCollapsed);let j=null;const V=U(()=>{var Q;return S.value==="detail"&&N.value?((Q=N.value.properties)==null?void 0:Q.name)||n("legend.header.peopleGroupFallback"):F.value?n("legend.header.collapsed"):u.value});function q(){F.value=!F.value}He(S,(Q,Y)=>{Q==="detail"&&Y!=="detail"&&F.value&&(F.value=!1)});function le(Q){d(Q)}return Bt(()=>{window.innerWidth<768&&(F.value=!0),j=Q=>{var Y;k&&((Y=Q.detail)!=null&&Y.mapId)&&Q.detail.mapId!==k||(F.value=!1)},window.addEventListener("dxm:openDesktopLegend",j)}),Mt(()=>{j&&window.removeEventListener("dxm:openDesktopLegend",j)}),(Q,Y)=>x.value?(R(),Ye(H(o),{key:0,legendType:e.legendType,popupAction:e.popupAction,isDark:e.isDark,disableCollapse:e.disableCollapse},null,8,["legendType","popupAction","isDark","disableCollapse"])):F.value?(R(),B("button",{key:1,class:ye(["legend-reopen",{"legend-reopen-light":!e.isDark}]),title:t("aria.expandLegend","Expand legend"),onClick:Y[0]||(Y[0]=ae=>F.value=!1)},[Y[2]||(Y[2]=_("svg",{class:"legend-reopen-icon",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none"},[_("path",{d:"M2 4h8M2 6h8M2 8h5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),_("span",O0,G(H(u)),1),Y[3]||(Y[3]=_("svg",{class:"legend-reopen-caret",width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[_("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,N0)):(R(),B("div",{key:2,class:ye(["legend-container",{"legend-dark":e.isDark}])},[S.value==="detail"?(R(),B("span",M0,[De(hd,{open:!F.value,t:H(n),onToggle:q},null,8,["open","t"])])):ue("",!0),S.value==="detail"?(R(),B("button",{key:1,class:"detail-close-btn",onClick:Y[1]||(Y[1]=ct(ae=>H(s).selectPeopleGroup(null),["stop"])),"aria-label":H(n)("aria.backToLegend")},[...Y[4]||(Y[4]=[_("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[_("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,F0)):ue("",!0),_("div",{class:ye(["legend-content",{"no-padding":H(c).length>0}])},[S.value==="detail"&&N.value?(R(),B(fe,{key:0},[De(md,{peopleGroup:N.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"]),De(ua,{shared:O.value,dark:e.isDark},null,8,["shared","dark"])],64)):e.legendType==="language-family"?(R(),B(fe,{key:1},[],64)):(R(),Ye(cd,{key:2,title:V.value,items:H(l),columns:H(c),activeFilter:H(p),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:H(w),totalPopulation:H(b),fmtPop:H(g),fmtCount:H($),progress:H(m),onFilterClick:le},{"title-caret":Rt(()=>[De(hd,{open:!F.value,t:H(n),onToggle:q},null,8,["open","t"])]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount","progress"])),S.value!=="detail"?(R(),Ye(ua,{key:3,dark:e.isDark},null,8,["dark"])):ue("",!0)],2)],2))}},[["styles",[T0]],["__scopeId","data-v-37990088"]]),I0={class:"gm-title"},R0=["aria-expanded"],D0={class:"gm-body"},B0={class:"gm-keys"},z0={key:0,class:"gm-key"},G0={class:"gm-caveat"},j0={key:0,class:"gm-adm1"},H0={class:"gm-adm1-h"},U0=["aria-label"],W0=["aria-pressed"],K0=["aria-pressed"],q0={class:"gm-keys"},V0={class:"gm-caveat"},Y0={key:0,class:"gm-caveat"},Z0={key:1,class:"gm-err"},J0={key:2,class:"gm-wait",role:"status"},X0={key:3,class:"gm-pg-desktop"},Q0={key:4,class:"gm-pg-mobile"},e1={key:5,class:"gm-sheet"},t1={class:"gm-sh-head"},o1={class:"gm-sh-name"},n1={class:"gm-list-h"},a1={class:"gm-adm1-t"},r1={class:"gm-note"},s1={key:6,class:"gm-sheet"},i1={class:"gm-sh-head"},l1={class:"gm-sh-name"},c1={key:0,class:"gm-ai"},u1=["aria-label"],p1={class:"gm-stat"},d1={class:"gm-stat"},g1={class:"gm-stat"},m1={class:"gm-stat"},h1={class:"gm-stat"},f1={key:1,class:"gm-list"},_1={class:"gm-list-h"},b1={key:2,class:"gm-list"},$1={class:"gm-list-h"},y1={class:"gm-note"},Ii="#1e293b",$d="ci.legendOpen",v1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"connectivity-map",setup(e){const t=Object.create(null);function o(y,P){try{window[y]=P,t[y]=P}catch{}}const n=Hs(()=>An(()=>Promise.resolve().then(()=>Cd),void 0)),a=Se("profileConfig",ie(null)),r=U(()=>{var y;return((y=a.value)==null?void 0:y.isDark)===!0}),s=Se("mapboxToken",null),i=U(()=>{var y;return((y=a.value)==null?void 0:y.tk)||(s==null?void 0:s.value)||typeof window<"u"&&window.MAP_TOKEN||""}),l=U(()=>Us(a.value)),c=ie(null),u=Ao(null),p=ie([]),d=ie(null),w=ie(!0),b=ie(null),m=ie(!0);function g(y){const P=c.value;if(P)try{P.dispatchEvent(new CustomEvent("dxmaps:mapinfo-pending",{bubbles:!0,composed:!0,detail:{pending:y}}))}catch{}}const $=()=>{!u.value&&!b.value&&g(!0)};He(b,y=>{y&&g(!1)});const C=ie(null),v=ie(0);let k=null;function x(){const y=C.value;if(!y||!re.value||pe.value)return;const P=y.offsetTop+y.offsetHeight;P>0&&(v.value=P+8)}function S(){try{k=new ResizeObserver(x),C.value&&k.observe(C.value)}catch{k=null}x()}const N=Ao(null),I=ie("women"),O=ie(null),F=Se("uiStore",null),j=(()=>{var P;const y=(P=Se("lang",null))==null?void 0:P.value;return y&&y!=="en"?y:null})(),V=()=>{if(j)return j;const y=a.value;if(y&&(y.locale||y.lang))return String(y.locale||y.lang);try{const P=new URLSearchParams(location.search);return P.get("lang")||P.get("locale")||document.documentElement.lang||"en"}catch{return"en"}},q=new _p({locale:j,profileConfig:a}),le=Ao([]),Q=ie(0),Y=T$({getMap:()=>u.value,getActivePinColor:()=>Ii});async function ae(){await q.init();const y=await q.setActiveSource("pray-tools");le.value=Co(y||[])}function te(){const y=[];for(const P of le.value){const W=parseFloat(P.longitude??P.lng),J=parseFloat(P.latitude??P.lat);if(!isFinite(W)||!isFinite(J))continue;const T=P._normalized||{};y.push({type:"Feature",properties:{uniqueId:P.uniqueId,slug:P.slug||"",name:P.name,language:P.language,languageFamily:P.languageFamily||T.languageFamily||"",country:P.country,countryIso:P.countryIso,countryIsoLabel:P.countryIsoLabel,countryName:P.countryName,religion:P.religion,religionLabel:P.religionLabel,religionName:P.religionName,population:P.population,status:P.status,description:P.description||"",imageUrl:P.imageUrl||"",peoplePraying:Number(P.peoplePraying??T.peoplePraying??0)},geometry:{type:"Point",coordinates:[W,J]}})}return{type:"FeatureCollection",features:y}}function oe(y){if(!le.value.length||y.getSource("language-families"))return;const P=te();if(Q.value=P.features.length,y.addSource("language-families",{type:"geojson",data:P,promoteId:"uniqueId"}),P.features.length){let W=180,J=90,T=-180,z=-90;for(const ge of P.features){const[ve,Ee]=ge.geometry.coordinates;veT&&(T=ve),Eez&&(z=Ee)}const ne=Math.round(Math.min(y.getContainer().clientWidth,y.getContainer().clientHeight)*.06)+8;try{const ge=y.cameraForBounds([[W,J],[T,z]],{padding:ne});if(y.fitBounds([[W,J],[T,z]],{padding:ne,duration:0}),ge&&y.getZoom()>ge.zoom+.05){const ve=y.getBounds(),Ee=Math.min(360,ve.getEast()-ve.getWest());let Ne=y.getCenter().lng,bt=-1;for(let _e=-180;_e<180;_e+=5){let he=0;for(const we of P.features){let Ge=we.geometry.coordinates[0]-_e;Ge=(Ge+540)%360-180,Math.abs(Ge)<=Ee/2&&he++}he>bt&&(bt=he,Ne=_e)}y.jumpTo({center:[Ne,(J+z)/2]})}}catch{}}y.addLayer({id:"ci-pg-dots",type:"circle",source:"language-families",paint:{"circle-color":Ii,"circle-radius":["interpolate",["linear"],["zoom"],0,2.6,4,3.6,8,6,12,8.5],"circle-stroke-color":"#ffffff","circle-stroke-width":["interpolate",["linear"],["zoom"],0,1,6,1.4,12,1.8],"circle-opacity":.95}}),y.on("click","ci-pg-dots",W=>{var T;const J=(T=W.features)==null?void 0:T[0];!J||!F||(d.value=null,F.selectPeopleGroup(J))}),y.on("mouseenter","ci-pg-dots",()=>{y.getCanvas().style.cursor="pointer"}),y.on("mouseleave","ci-pg-dots",()=>{y.getCanvas().style.cursor=""}),typeof window<"u"&&(o("__ciState",()=>{var W,J;return{groups:le.value.length,dots:Q.value,hasLayer:!!y.getLayer("ci-pg-dots"),rendered:y.queryRenderedFeatures({layers:["ci-pg-dots"]}).length,selected:((J=(W=F==null?void 0:F.selectedPeopleGroup)==null?void 0:W.properties)==null?void 0:J.slug)||null}}),o("__ciMap",y))}const D=aa("connectivity"),re=ie(!1),pe=ie(!0);function $e(y){var P;try{(P=window.sessionStorage)==null||P.setItem($d,y?"1":"0")}catch{}}function Ie(){var y;try{const P=(y=window.sessionStorage)==null?void 0:y.getItem($d);return P==null?null:P==="1"}catch{return null}}function Fe(){pe.value=!pe.value,$e(pe.value)}function Te(){const y=typeof window<"u"&&window.innerWidth<700;if(y===re.value)return;re.value=y;const P=Ie();pe.value=P??!y}typeof window<"u"&&(Te(),window.addEventListener("resize",Te));const Ue=[{id:"yes",color:"#10b981"},{id:"partial",color:"#e8c15a"},{id:"no",color:"#b42318"},{id:"unknown",color:"#9aa2ad"}],rt=y=>(Ue.find(P=>P.id===y)||{}).color||"#9aa2ad",qe=U(()=>{const y={};for(const P of p.value)y[P.iso3]=P;return y});async function Qe(){const[y,P]=await Promise.all([fetch(`${l.value}/tables/internet-by-country.json`).then(W=>W.json()),fetch(`${l.value}/boundaries/world-adm0-web.geojson`).then(W=>W.json())]);return p.value=y.countries||[],P}function nt(y,P){const W=qe.value,T={type:"FeatureCollection",features:(P.features||[]).map(z=>{var ve;const ne=(ve=z.properties)==null?void 0:ve.iso3,ge=W[ne];return{type:"Feature",properties:{iso3:ne,band:(ge==null?void 0:ge.band)||"none",color:ge?rt(ge.band):"rgba(0,0,0,0)",hasData:!!ge},geometry:z.geometry}})};if(y.getSource("ci-src")){y.getSource("ci-src").setData(T);return}y.addSource("ci-src",{type:"geojson",data:T}),y.addLayer({id:"ci-fill",type:"fill",source:"ci-src",paint:{"fill-color":["get","color"],"fill-opacity":["case",["get","hasData"],.72,0]}}),y.addLayer({id:"ci-line",type:"line",source:"ci-src",paint:{"line-color":"rgba(255,255,255,0.5)","line-width":.5}}),y.on("click","ci-fill",z=>{var ge,ve,Ee;if(y.getLayer("ci-pg-dots")&&y.queryRenderedFeatures(z.point,{layers:["ci-pg-dots"]}).length)return;const ne=(Ee=(ve=(ge=z.features)==null?void 0:ge[0])==null?void 0:ve.properties)==null?void 0:Ee.iso3;ne&&qe.value[ne]&&(F==null||F.selectPeopleGroup(null),O.value=null,d.value=qe.value[ne])}),y.on("mouseenter","ci-fill",()=>{y.getCanvas().style.cursor="pointer"}),y.on("mouseleave","ci-fill",()=>{y.getCanvas().style.cursor=""})}const A=[{from:0,color:"#deebf7"},{from:25,color:"#9ecae1"},{from:40,color:"#6baed6"},{from:55,color:"#3182bd"},{from:70,color:"#08519c"}],M=y=>["case",["==",["typeof",["get",y]],"number"],["step",["get",y],...A.flatMap((P,W)=>W===0?[P.color]:[P.from,P.color])],"rgba(0,0,0,0)"];async function L(){var J;const[y,P]=await Promise.all([fetch(`${l.value}/tables/internet-by-adm1.json`).then(T=>{if(!T.ok)throw new Error("internet-by-adm1 "+T.status);return T.json()}),fetch(`${l.value}/boundaries/gb-IND-ADM1-full-web.geojson`).then(T=>{if(!T.ok)throw new Error("gb-IND-ADM1-full "+T.status);return T.json()})]),W={};for(const T of y.rows||[]){if(T.iso3!=="IND"||T.measure!=="ever_used_internet"||!T.adm1)continue;const z=W[J=T.adm1]??(W[J]={name:T.adm1_name||T.adm1,women:{},men:{}});z[T.sex][T.area]=T.value}return N.value=Co({meta:y.meta||{},byArea:W}),P}function Z(y,P){const W=N.value.byArea,J={type:"FeatureCollection",features:(P.features||[]).map(z=>{var ge,ve;const ne=W[(ge=z.properties)==null?void 0:ge.shapeName];return{type:"Feature",geometry:z.geometry,properties:{adm1:(ve=z.properties)==null?void 0:ve.shapeName,women:(ne==null?void 0:ne.women.total)??null,men:(ne==null?void 0:ne.men.total)??null}}})},T=y.getLayer("ci-pg-dots")?"ci-pg-dots":void 0;y.addSource("ci-adm1-src",{type:"geojson",data:J}),y.addLayer({id:"ci-adm1-fill",type:"fill",source:"ci-adm1-src",paint:{"fill-color":M(I.value),"fill-opacity":.85}},T),y.addLayer({id:"ci-adm1-line",type:"line",source:"ci-adm1-src",paint:{"line-color":"rgba(255,255,255,0.8)","line-width":.6}},T),y.getLayer("ci-fill")&&y.setFilter("ci-fill",["!=",["get","iso3"],"IND"]),y.on("click","ci-adm1-fill",z=>{var ve,Ee,Ne;if(y.getLayer("ci-pg-dots")&&y.queryRenderedFeatures(z.point,{layers:["ci-pg-dots"]}).length)return;const ne=(Ne=(Ee=(ve=z.features)==null?void 0:ve[0])==null?void 0:Ee.properties)==null?void 0:Ne.adm1,ge=ne&&W[ne];ge&&(F==null||F.selectPeopleGroup(null),d.value=null,O.value={key:ne,...ge})}),y.on("mouseenter","ci-adm1-fill",()=>{y.getCanvas().style.cursor="pointer"}),y.on("mouseleave","ci-adm1-fill",()=>{y.getCanvas().style.cursor=""})}function ee(y){I.value=y;const P=u.value;P!=null&&P.getLayer("ci-adm1-fill")&&P.setPaintProperty("ci-adm1-fill","fill-color",M(y))}const X=U(()=>{var y,P,W,J;return rp(((J=(W=(P=(y=N.value)==null?void 0:y.meta)==null?void 0:P.boundaries)==null?void 0:W.IND)==null?void 0:J.missing)||[],{type:"conjunction"})}),ce=u$(Se("profileConfig",null));let se=!1;Bt(async()=>{g(!0),window.addEventListener("dxmaps:mapinfo-host",$),S();try{await x$(ce)}catch{}const y=qs(ce);if(!se){if(!y){const P=ce==="maplibre"?"MapLibre":"Mapbox";console.warn(`[connectivity-map] the ${P} engine did not load; refusing to substitute another engine.`),b.value=ur(Pt("messages.engineMissing"),{engine:P});return}if(!c.value){b.value=Pt("messages.engineNotLoaded");return}_$(y);try{const P=ae().catch(ne=>{console.warn("[connectivity-map] people groups:",(ne==null?void 0:ne.message)||ne)}),W=L().catch(ne=>(console.warn("[connectivity-map] India by state:",(ne==null?void 0:ne.message)||ne),null)),J=await Qe();if(se||!c.value)return;const T=k$(ce);if(T&&await C$(c.value,T),se||!c.value)return;const z=new y.Map({container:c.value,style:h$(r.value?"ink":"paper",ce).style||(r.value?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11"),accessToken:i.value,locale:w$(V(),ce),center:[42,18],zoom:1.3,projection:"mercator",attributionControl:!1});u.value=Co(z),Pb(z,{boundaries:!0}),z.once("load",async()=>{try{y$(z,V())}catch{}nt(z,J),Y.initialize(),await P,oe(z);const ne=await W;ne&&!se&&Z(z,ne),m.value=!1})}catch(P){b.value=String(P.message||P),m.value=!1}}}),Mt(()=>{var y;typeof window<"u"&&window.removeEventListener("dxmaps:mapinfo-host",$);try{k==null||k.disconnect()}catch{}u.value||g(!1),typeof window<"u"&&window.removeEventListener("resize",Te);try{window.__ciState===t.__ciState&&delete window.__ciState}catch{}try{window.__ciMap===t.__ciMap&&delete window.__ciMap}catch{}se=!0,Y.cleanup(),F==null||F.selectPeopleGroup(null);try{(y=u.value)==null||y.remove()}catch{}});const f=y=>(Number(y)||0).toLocaleString(),h=U(()=>!!(F!=null&&F.selectedPeopleGroup));return yt(":host{display:block;position:relative;width:100%;height:100%;min-height:420px}.gm{position:absolute;inset:0;overflow:hidden}.gm-map{position:absolute;inset:0}@media(max-width:699px){.gm .map-toolbar.map-toolbar{top:var(--gm-toolbar-top,72px)}}.gm-legend{position:absolute;top:8px;inset-inline-start:8px;width:var(--map-legend-width,380px);max-width:calc(100% - 16px);box-sizing:border-box;z-index:4;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.94);color:#0f1419;font:12px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 2px 10px rgba(0,0,0,.16)}@media(max-width:480px){.gm-legend{width:auto;inset-inline-end:46px}}.is-dark .gm-legend{background:rgba(19,32,25,.95);color:#e5e7eb}.gm-title{font-weight:700;font-size:12.5px;margin-bottom:5px}.gm-fold{width:100%;margin:0 0 6px;border:1px solid #d1d4cd;background:#f3f3f1;color:#3b463d;font:600 11px inherit;padding:6px 10px;border-radius:8px;cursor:pointer;min-height:32px}.gm-fold:hover{background:#e9ebe6}@media(max-width:699px){.gm-fold{min-height:44px;font-size:12px}}.gm-keys{display:flex;flex-wrap:wrap;gap:5px 12px}.gm-key{display:flex;align-items:center;gap:5px;font-size:11px;white-space:nowrap}.gm-sw{width:12px;height:12px;border-radius:3px;flex:none}.gm-caveat{margin-top:5px;font-size:10.5px;opacity:.72;line-height:1.4}.gm-adm1{margin-top:8px;padding-top:7px;border-top:1px solid rgba(0,0,0,.12)}.gm-adm1-h{font-weight:600;font-size:12px;margin-bottom:5px}.gm-seg{display:inline-flex;border:1px solid rgba(0,0,0,.2);border-radius:6px;overflow:hidden;margin-bottom:6px}.gm-seg button{font:inherit;font-size:11px;padding:3px 10px;min-height:24px;border:0;background:transparent;color:inherit;cursor:pointer}.gm-seg button.on{background:#08519c;color:#fff}.gm-adm1-t{width:100%;border-collapse:collapse;font-size:12px;margin:4px 0 6px}.gm-adm1-t th,.gm-adm1-t td{padding:3px 4px;text-align:end}.gm-adm1-t th:first-child{text-align:start}.is-dark .gm-adm1{border-top-color:rgba(255,255,255,.15)}.is-dark .gm-seg{border-color:rgba(255,255,255,.3)}.gm-sheet{position:absolute;left:0;right:0;bottom:0;z-index:6;max-height:62%;overflow-y:auto;background:#fff;color:#0f1419;border-radius:14px 14px 0 0;padding:14px 16px 22px;font:13px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 -6px 26px rgba(0,0,0,.28)}@media(min-width:700px){.gm-sheet{inset-inline-start:auto;inset-inline-end:14px;bottom:14px;width:330px;border-radius:12px}}.is-dark .gm-sheet{background:#132019;color:#e5e7eb}.gm-sh-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.gm-sh-name{font-weight:800;font-size:15px}.gm-ai{display:flex;align-items:flex-start;gap:8px;margin:0 0 10px;padding:7px 9px;border-radius:8px;font-size:11px;line-height:1.35;background:rgba(180,120,0,.12);color:#7a4f00;border:1px solid rgba(180,120,0,.25)}.is-dark .gm-ai{background:rgba(255,200,80,.10);color:#f0cf88;border-color:rgba(255,200,80,.22)}.gm-ai-x{margin-left:auto;flex:none;border:0;background:none;cursor:pointer;font-size:15px;line-height:1;color:inherit;opacity:.7;padding:0 2px;min-width:24px;min-height:24px}.gm-ai-x:hover{opacity:1}.gm-x{margin-left:auto;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit;font:600 12px inherit;padding:6px 12px;border-radius:8px;cursor:pointer;min-height:34px}.gm-stat{display:flex;justify-content:space-between;gap:12px;padding:4px 0;border-bottom:1px solid rgba(0,0,0,.07);font-variant-numeric:tabular-nums}.is-dark .gm-stat{border-bottom-color:rgba(255,255,255,.09)}.gm-stat b{font-weight:700}.gm-list{margin-top:9px}.gm-list-h{font-weight:700;font-size:12px;margin-bottom:3px}.gm-list ul{margin:0;padding-left:17px;font-size:12px;line-height:1.5}.gm-note{margin-top:9px;font-size:11px;line-height:1.5;opacity:.75}.gm-err{position:absolute;top:50%;left:0;right:0;text-align:center;font-size:13px;opacity:.7}.gm-wait{position:absolute;top:50%;inset-inline:0;text-align:center;font-size:13px;opacity:.7}.gm-dot{width:10px;height:10px;border-radius:50%;flex:none;box-sizing:border-box;border:1.5px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.25)}.gm-pg-mobile{display:none}@media(max-width:767px){.gm-pg-mobile{display:block}.gm-pg-desktop{display:none}}","doxa-connectivity-map"),(y,P)=>(R(),B("div",{class:ye(["gm",{"is-dark":r.value}]),style:We(re.value&&v.value?{"--gm-toolbar-top":v.value+"px"}:null)},[_("div",{ref_key:"mapEl",ref:c,class:"gm-map"},null,512),u.value?(R(),Ye(Sb,{key:0},{default:Rt(()=>[De(Tb,{"is-dark":r.value},null,8,["is-dark"]),De(Nb,{map:u.value,"is-dark":r.value},null,8,["map","is-dark"]),De(Ob,{map:u.value,"is-dark":r.value},null,8,["map","is-dark"]),De(Mb,{map:u.value,"is-dark":r.value},null,8,["map","is-dark"]),De(Ib,{"map-container":c.value,"is-dark":r.value},null,8,["map-container","is-dark"]),De(i$,{"is-dark":r.value,"embed-path":"cities-internet/connectivity-map/index.html"},null,8,["is-dark"])]),_:1})):ue("",!0),Oa(_("div",{ref_key:"legendEl",ref:C,class:"gm-legend"},[_("div",I0,G(H(D)("connectivity.title")),1),re.value?(R(),B("button",{key:0,type:"button",class:"gm-fold",onClick:Fe,"aria-expanded":pe.value?"true":"false"},G(pe.value?H(D)("connectivity.ui.hideKey"):H(D)("connectivity.ui.showKey")),9,R0)):ue("",!0),Oa(_("div",D0,[_("div",B0,[(R(),B(fe,null,ot(Ue,W=>_("span",{key:W.id,class:"gm-key"},[_("i",{class:"gm-sw",style:We({background:W.color})},null,4),Oe(G(H(D)("connectivity.bands."+W.id)),1)])),64)),le.value.length?(R(),B("span",z0,[_("i",{class:"gm-dot",style:We({background:Ii})},null,4),Oe(G(H(D)("connectivity.peopleGroup"))+" ("+G(f(le.value.length))+") ",1)])):ue("",!0)]),_("div",G0,G(H(D)("connectivity.caveat")),1),N.value?(R(),B("div",j0,[_("div",H0,G(H(D)("connectivity.adm1.title")),1),_("div",{class:"gm-seg",role:"group","aria-label":H(D)("connectivity.adm1.title")},[_("button",{type:"button",class:ye({on:I.value==="women"}),"aria-pressed":I.value==="women",onClick:P[0]||(P[0]=W=>ee("women"))},G(H(D)("connectivity.adm1.women")),11,W0),_("button",{type:"button",class:ye({on:I.value==="men"}),"aria-pressed":I.value==="men",onClick:P[1]||(P[1]=W=>ee("men"))},G(H(D)("connectivity.adm1.men")),11,K0)],8,U0),_("div",q0,[(R(),B(fe,null,ot(A,(W,J)=>_("span",{key:W.from,class:"gm-key"},[_("i",{class:"gm-sw",style:We({background:W.color})},null,4),Oe(G(J+1O.value=null)},G(H(D)("connectivity.sheet.close")),1)]),_("div",n1,G(H(D)("connectivity.adm1.title")),1),_("table",a1,[_("thead",null,[_("tr",null,[P[5]||(P[5]=_("th",null,null,-1)),_("th",null,G(H(D)("connectivity.adm1.total")),1),_("th",null,G(H(D)("connectivity.adm1.urban")),1),_("th",null,G(H(D)("connectivity.adm1.rural")),1)])]),_("tbody",null,[(R(),B(fe,null,ot(["women","men"],W=>_("tr",{key:W},[_("th",null,G(H(D)("connectivity.adm1."+W)),1),(R(),B(fe,null,ot(["total","urban","rural"],J=>_("td",{key:J},G(O.value[W][J]!=null?O.value[W][J]+"%":"—"),1)),64))])),64))])]),_("p",r1,G(H(D)("connectivity.adm1.source")),1)])):ue("",!0),d.value?(R(),B("div",s1,[_("div",i1,[_("span",l1,G(d.value.country),1),_("button",{type:"button",class:"gm-x",onClick:P[3]||(P[3]=W=>d.value=null)},G(H(D)("connectivity.sheet.close")),1)]),w.value?(R(),B("div",c1,[_("span",null,G(H(D)("connectivity.sheet.ai")),1),_("button",{type:"button",class:"gm-ai-x",onClick:P[4]||(P[4]=W=>w.value=!1),"aria-label":H(D)("connectivity.sheet.dismiss")},"×",8,u1)])):ue("",!0),_("div",p1,[_("span",null,G(H(D)("connectivity.sheet.internetUsers")),1),_("b",null,G(d.value.internet_pct!=null?d.value.internet_pct+"%":H(D)("connectivity.sheet.unknown")),1)]),_("div",d1,[_("span",null,G(H(D)("connectivity.sheet.measured")),1),_("b",null,G(d.value.internet_year||"—"),1)]),_("div",g1,[_("span",null,G(H(D)("connectivity.sheet.mobilePer100")),1),_("b",null,G(d.value.mobile_per_100??"—"),1)]),_("div",m1,[_("span",null,G(H(D)("connectivity.sheet.peopleGroups")),1),_("b",null,G(f(d.value.people_groups)),1)]),_("div",h1,[_("span",null,G(H(D)("connectivity.sheet.topPlatform")),1),_("b",null,[Oe(G(d.value.top_platform||H(D)("connectivity.sheet.unknown")),1),d.value.top_platform_pct?(R(),B(fe,{key:0},[Oe(" · "+G(d.value.top_platform_pct)+"%",1)],64)):ue("",!0)])]),d.value.carriers&&d.value.carriers.length?(R(),B("div",f1,[_("div",_1,G(H(D)("connectivity.sheet.carriers",{n:d.value.carrier_count})),1),_("ul",null,[(R(!0),B(fe,null,ot(d.value.carriers,(W,J)=>(R(),B("li",{key:J},G(W),1))),128))])])):ue("",!0),d.value.platforms&&d.value.platforms.length?(R(),B("div",b1,[_("div",$1,G(H(D)("connectivity.sheet.socialPlatforms")),1),_("ul",null,[(R(!0),B(fe,null,ot(d.value.platforms,(W,J)=>(R(),B("li",{key:J},G(W.name)+" · "+G(W.pct)+"%",1))),128))])])):ue("",!0),_("p",y1,G(H(D)("connectivity.sheet.note")),1)])):ue("",!0)],6))}}},Symbol.toStringTag,{value:"Module"}));function w1(e){const t=(e==null?void 0:e.parentElement)||e;if(!t||!t.ownerDocument)return{x:0,y:0};const o=t.ownerDocument.createElement("div");o.style.cssText="position:fixed;top:0;left:0;width:0;height:0;pointer-events:none;opacity:0",t.appendChild(o);const n=o.getBoundingClientRect();return o.remove(),{x:n.left,y:n.top}}function yd(e){const t=ie(null),o=Ao({position:"fixed",inset:"0"}),n=()=>{var u,p;const r=t.value;if(!r)return;const s=w1(r),i=r.ownerDocument||(typeof document<"u"?document:null),l=((u=i==null?void 0:i.documentElement)==null?void 0:u.clientWidth)||0,c=((p=i==null?void 0:i.documentElement)==null?void 0:p.clientHeight)||0;o.value={position:"fixed",top:`${-s.y}px`,left:`${-s.x}px`,right:"auto",bottom:"auto",width:`${l}px`,height:`${c}px`,boxSizing:"border-box"}};He(e,r=>{r&&requestAnimationFrame(()=>{n(),requestAnimationFrame(n)})},{flush:"post"});const a=()=>{e.value&&n()};return typeof window<"u"&&window.addEventListener("resize",a),Mt(()=>{typeof window<"u"&&window.removeEventListener("resize",a)}),{scrimRef:t,scrimStyle:o}}const k1={class:"dt-head"},x1={class:"dt-title"},C1={class:"dt-count"},A1={key:0,class:"dt-grain"},P1={class:"dt-actions"},S1={key:0,class:"dt-err"},L1={class:"dt-wrap"},T1={class:"dt-hint"},N1={key:0,dir:"ltr"},O1=["aria-label"],M1={class:"dt-sheet-head"},F1={class:"dt-dl"},E1=["href"],I1={key:1},R1={key:2},D1={key:2,class:"dt-caveats"},B1={dir:"ltr"},z1={class:"dt-cav-k"},G1={__name:"DataTable",props:{table:{type:Object,required:!0},assetsBase:{type:String,default:"./assets"},isDark:{type:Boolean,default:!1},height:{type:String,default:"560px"},frozen:{type:Number,default:1},pageSize:{type:Number,default:50}},emits:["row-click"],setup(e,{emit:t}){const o=(F,j)=>Pt(F)||j,n=e,a=t,r=ie(!1),s=ie(null),{scrimRef:i,scrimStyle:l}=yd(s),c=ie(null),u=Ao(null),p=ie(null),d=ie(!1),w=U(()=>String(n.assetsBase||"./assets").replace(/\/+$/,"")),b=U(()=>{var F;return((F=n.table)==null?void 0:F.meta)||{}}),m=U(()=>{var F;return(((F=n.table)==null?void 0:F.rows)||[]).length}),g=U(()=>Object.entries(b.value).filter(([F,j])=>typeof j=="string"&&/caveat|meaning|note|boundary|measures|does_not/i.test(F)).map(([F,j])=>({key:F.replace(/_/g," "),text:j})));let $=null;function C(){return window.Tabulator?Promise.resolve(window.Tabulator):$||($=new Promise((F,j)=>{const V=document.createElement("script");V.src=`${w.value}/vendor/tabulator/tabulator.min.js`,V.onload=()=>F(window.Tabulator),V.onerror=()=>j(new Error("Tabulator failed to load — is public/assets/vendor/tabulator/ present?")),document.head.appendChild(V)}),$)}async function v(F){if(!(!F||F.querySelector("style[data-tabulator]")))try{const j=await fetch(`${w.value}/vendor/tabulator/tabulator.min.css`);if(!j.ok)return;const V=document.createElement("style");V.setAttribute("data-tabulator",""),V.textContent=await j.text(),F.appendChild(V)}catch{}}function k(F){var le,Q;if(!c.value)return;r.value=typeof window<"u"&&window.innerWidth<700;const j=((le=n.table)==null?void 0:le.columns)||[],q=(r.value?j.slice(0,3):j).map((Y,ae)=>({title:Y.title,field:Y.field,headerFilter:Y.type==="boolean"?"tickCross":"input",headerFilterPlaceholder:"filter…",sorter:Y.type==="number"?"number":Y.type==="boolean"?"boolean":"string",formatter:Y.type==="boolean"?"tickCross":void 0,.../_url$/.test(Y.field)?{formatter:"link",formatterParams:{target:"_blank",label:()=>"open"}}:{},frozen:!r.value&&ae{s.value=ae.getData(),a("row-click",ae.getData())}),u.value.on("tableBuilt",()=>{d.value=!0})}const x=F=>{var j,V;return((V=(((j=n.table)==null?void 0:j.columns)||[]).find(q=>q.field===F))==null?void 0:V.title)||F.replace(/_/g," ")},S=F=>typeof F=="string"&&F.includes(", ")&&F.length>40?F.split(", "):null,N=F=>typeof F=="string"&&/^https?:\/\//.test(F),I=U(()=>s.value?Object.entries(s.value).filter(([,F])=>F!==""&&F!==null&&F!==void 0):[]);function O(F){var j;try{(j=u.value)==null||j.download(F,`${(b.value.title||"table").replace(/\W+/g,"-").toLowerCase()}.${F}`)}catch(V){p.value=String(V.message||V)}}return Bt(async()=>{var F,j;try{await v((j=(F=c.value)==null?void 0:F.getRootNode)==null?void 0:j.call(F)),k(await C())}catch(V){p.value=String(V.message||V)}}),Mt(()=>{var F;try{(F=u.value)==null||F.destroy()}catch{}}),He(()=>n.table,()=>{var F,j;try{(j=u.value)==null||j.replaceData(((F=n.table)==null?void 0:F.rows)||[])}catch{}}),yt(".dt .tabulator{border:1px solid #d1d4cd;background:#fff;font-size:14px}.dt .tabulator .tabulator-header{background:#f3f3f1;border-bottom:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-header .tabulator-col{background:#f3f3f1;border-right:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{background:#e9ebe6}.dt .tabulator .tabulator-col-title{color:#3b463d;font-weight:700}.dt .tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,.dt .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select{background:#fff;border:1px solid #d1d4cd;border-radius:5px;color:#3b463d;padding:3px 6px}.dt .tabulator .tabulator-row{background:#fff;color:#3b463d;border-bottom:1px solid #e6e8e3}.dt .tabulator .tabulator-row.tabulator-row-even{background:#faf9f7}.dt .tabulator .tabulator-row:hover{background:#e9ebe6}.dt .tabulator .tabulator-row .tabulator-cell{border-inline-end:1px solid #e6e8e3;color:#3b463d;unicode-bidi:plaintext}.dt:dir(rtl) .tabulator .tabulator-row .tabulator-cell{text-align:right}.dt .tabulator .tabulator-row .tabulator-cell a{color:#4a7a52;font-weight:600}.dt .tabulator .tabulator-footer{background:#f3f3f1;border-top:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator{color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator label{color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator select{background:#fff;border:1px solid #d1d4cd;border-radius:5px;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-page{border:1px solid #d1d4cd;background:#fff;color:#3b463d;border-radius:5px}.dt .tabulator .tabulator-footer .tabulator-page.active{background:#92b195;border-color:#92b195;color:#fff}.dt .tabulator .tabulator-footer .tabulator-page:not(disabled):hover{background:#e9ebe6;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-page:disabled{opacity:.45}.dt,.dt *{box-sizing:border-box}.dt{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.dt-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}.dt-title{font-size:15px;font-weight:700;margin:0}.dt-count{font-size:11.5px;opacity:.6;font-variant-numeric:tabular-nums}.dt-grain{font-size:11px;opacity:.55}.dt-actions{margin-inline-start:auto;display:flex;gap:6px}.dt-btn{font:600 11.5px inherit;padding:5px 11px;border-radius:6px;cursor:pointer;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit}.dt-btn:hover{background:rgba(0,0,0,.05)}.dt-err{padding:10px 12px;border-radius:8px;background:rgba(220,38,38,.10);color:#a12020;font-size:12.5px}.dt-caveats{margin-top:10px;padding:10px 12px;border-radius:8px;background:rgba(0,0,0,.04);font-size:11.5px;line-height:1.6;opacity:.85}.is-dark .dt-caveats{background:rgba(255,255,255,.06)}.dt-cav-k{font-weight:700;text-transform:capitalize}.dt-scrim{position:fixed;inset:0;z-index:1200;background:rgba(8,12,16,.55);display:flex;align-items:flex-end;justify-content:center}@media(min-width:700px){.dt-scrim{align-items:center}}.dt-sheet{width:100%;max-width:560px;max-height:82vh;overflow-y:auto;background:#fff;color:#0f1419;border-radius:14px 14px 0 0;padding:16px 18px 26px;box-shadow:0 -6px 30px rgba(0,0,0,.3)}@media(min-width:700px){.dt-sheet{border-radius:14px}}.is-dark .dt-sheet{background:#132019;color:#e5e7eb}.dt-sheet-head{display:flex;align-items:center;gap:12px;margin-bottom:10px;padding-bottom:9px;border-bottom:1px solid rgba(0,0,0,.10);font-size:15px}.dt-close{margin-inline-start:auto;font:600 12px inherit;padding:7px 14px;border-radius:8px;cursor:pointer;min-height:36px;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit}.dt-dl{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:7px 12px;margin:0;font-size:12.5px}.dt-dl dt{font-weight:700;opacity:.72;text-transform:capitalize}.dt-dl dd{margin:0;word-break:break-word}.dt-dl ul{margin:0;padding-inline-start:16px}.dt-dl a{color:#0b7a5b;font-weight:600}.dt-hint{font-size:11px;opacity:.6;margin:6px 0 0}.dt-wrap{width:100%;overflow:hidden;border:1px solid rgba(0,0,0,.10);border-radius:8px}.is-dark .dt-wrap{border-color:rgba(255,255,255,.12)}","doxa-data-table"),(F,j)=>{var V,q;return R(),B("div",{class:ye(["dt",{"is-dark":e.isDark}])},[_("div",k1,[_("h3",x1,G(b.value.title||"Data"),1),_("span",C1,G(m.value.toLocaleString())+" rows",1),b.value.grain?(R(),B("span",A1,"· "+G(b.value.grain),1)):ue("",!0),_("span",P1,[_("button",{type:"button",class:"dt-btn",onClick:j[0]||(j[0]=le=>O("csv"))},G(o("tables.csv","CSV")),1),_("button",{type:"button",class:"dt-btn",onClick:j[1]||(j[1]=le=>O("json"))},G(o("tables.json","JSON")),1)])]),p.value?(R(),B("div",S1,G(p.value),1)):ue("",!0),_("div",L1,[_("div",{ref_key:"host",ref:c},null,512)]),_("p",T1,[Oe(G(o("tables.tap_row_hint","Tap any row for its full detail")),1),r.value?(R(),B(fe,{key:1},[Oe(".")],64)):(R(),B("bdi",N1," — every field, including the lists the table flattens."))]),s.value?(R(),B("div",{key:1,ref_key:"scrimRef",ref:i,style:We(H(l)),class:"dt-scrim",onClick:j[3]||(j[3]=ct(le=>s.value=null,["self"]))},[_("div",{class:"dt-sheet",role:"dialog","aria-label":o("aria.rowDetail","Row detail")},[_("div",M1,[_("strong",null,G(s.value[(q=(((V=e.table)==null?void 0:V.columns)||[])[0])==null?void 0:q.field]||o("aria.rowDetail","Row detail")),1),_("button",{type:"button",class:"dt-close",onClick:j[2]||(j[2]=le=>s.value=null)},G(o("buttons.close","Close")),1)]),_("dl",F1,[(R(!0),B(fe,null,ot(I.value,([le,Q])=>(R(),B(fe,{key:le},[_("dt",null,G(x(le)),1),_("dd",null,[N(Q)?(R(),B("a",{key:0,href:Q,target:"_blank",rel:"noopener"},G(Q),9,E1)):S(Q)?(R(),B("ul",I1,[(R(!0),B(fe,null,ot(S(Q),(Y,ae)=>(R(),B("li",{key:ae},G(Y),1))),128))])):(R(),B("span",R1,G(Q===!0?"yes":Q===!1?"no":Q),1))])],64))),128))])],8,O1)],4)):ue("",!0),g.value.length?(R(),B("div",D1,[(R(!0),B(fe,null,ot(g.value,le=>(R(),B("div",{key:le.key},[_("bdi",B1,[_("span",z1,G(le.key)+":",1),Oe(" "+G(le.text),1)])]))),128))])):ue("",!0)],2)}}},j1={class:"ct-h"},H1={class:"ct-sub"},U1={class:"ct-tabs"},W1=["onClick"],K1={key:0,class:"ct-n"},q1={key:0,class:"ct-err"},V1={key:1,class:"ct-load"},Y1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"data-tables",setup(e){const t=Se("profileConfig",ie(null)),o=U(()=>{var b;return((b=t.value)==null?void 0:b.isDark)===!0}),n=U(()=>Us(t.value)),a=aa("connectivity"),r=b=>(Number(b)||0).toLocaleString(),s=[{id:"cities",file:"key-cities"},{id:"internet",file:"country-connectivity"},{id:"operators",file:"network-operators"},{id:"social",file:"social-platforms"},{id:"messaging",file:"messaging-channels"}],i=ie("cities"),l=U(()=>s.find(b=>b.id===i.value)||s[0]),c=ie({}),u=ie(!1),p=ie(null);async function d(b){if(!c.value[b]){u.value=!0,p.value=null;try{const m=await fetch(`${n.value}/tables/${b}.json`);if(!m.ok)throw new Error(String(m.status));c.value={...c.value,[b]:await m.json()}}catch{const g=s.find($=>$.file===b);p.value=ur(Pt("messages.couldNotLoadNamed"),{name:g?a("tables.tabs."+g.id):b})}finally{u.value=!1}}}He(l,b=>b&&d(b.file),{immediate:!0});const w=U(()=>{var b;return c.value[(b=l.value)==null?void 0:b.file]||null});return yt(":host{display:block;position:relative;width:100%;height:100%;min-height:320px}.ct{position:absolute;inset:0;overflow-y:auto;padding:18px;background:#f6f7f9;color:#0f1419;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.ct.is-dark{background:#0a1410;color:#e5e7eb}.ct-h{margin:0 0 4px;font-size:18px;font-weight:700}.ct-sub{margin:0 0 14px;font-size:12.5px;opacity:.72;line-height:1.5}.ct-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.ct-tab{font:600 12px inherit;padding:7px 14px;border-radius:999px;cursor:pointer;border:1px solid rgba(0,0,0,.14);background:transparent;color:inherit}.ct-tab.on{background:#10b981;border-color:#10b981;color:#04241a}.ct-load{padding:22px;text-align:center;font-size:12.5px;opacity:.6}.ct-err{padding:11px 13px;border-radius:8px;background:rgba(220,38,38,.10);color:#a12020;font-size:12.5px}.ct-n{font-size:10.5px;opacity:.6;margin-left:5px;font-variant-numeric:tabular-nums}","doxa-cities-tables"),(b,m)=>(R(),B("div",{class:ye(["ct",{"is-dark":o.value}])},[_("h2",j1,G(H(a)("connectivity.tables.title")),1),_("p",H1,G(H(a)("connectivity.tables.intro")),1),_("div",U1,[(R(),B(fe,null,ot(s,g=>_("button",{key:g.id,type:"button",class:ye(["ct-tab",{on:i.value===g.id}]),onClick:$=>i.value=g.id},[Oe(G(H(a)("connectivity.tables.tabs."+g.id)),1),c.value[g.file]?(R(),B("span",K1,G(r((c.value[g.file].rows||[]).length)),1)):ue("",!0)],10,W1)),64))]),p.value?(R(),B("div",q1,G(p.value),1)):w.value?(R(),Ye(G1,{key:l.value.id,table:w.value,"assets-base":n.value,"is-dark":o.value,height:"600px"},null,8,["table","assets-base","is-dark"])):(R(),B("div",V1,G(H(a)("connectivity.tables.loading",{name:H(a)("connectivity.tables.tabs."+l.value.id)})),1))],2))}}},Symbol.toStringTag,{value:"Module"})),Z1="pplrInstance";function J1(){return Se(Z1,null)}const X1="",Q1=["data-theme"],ev={class:"stl-inner"},tv={class:"stl-tb-caret-slot"},ov=["title","aria-label","aria-expanded"],nv={class:"stl-tb-eyebrow"},av=["title","aria-label"],rv=["title"],sv={key:2,class:"stl-tb-title"},iv={key:3,class:"stl-export"},lv=["aria-expanded","title","aria-label"],cv={class:"stl-export-label"},uv={class:"stl-export-menu",role:"menu"},pv={class:"stl-export-item-label"},dv={class:"stl-export-item-label"},gv=["aria-expanded"],mv={class:"stl-export-item-label"},hv=["aria-label"],fv={class:"stl-export-note"},_v={class:"stl-export-item-label"},bv={class:"stl-export-item-label"},$v={key:0,class:"stl-tabs-wrap"},yv={class:"stl-tabs"},vv=["onClick"],wv=["title","onClick"],kv={key:0,class:"stl-info-pop"},xv={class:"stl-col-hdr"},Cv={class:"stl-hdr-name"},Av=["title"],Pv={key:0,class:"stl-sort-arrow"},Sv=["title"],Lv={key:0,class:"stl-sort-arrow"},Tv=["data-stl-node-id","onClick"],Nv=["aria-expanded","aria-label","onClick"],Ov={key:1,class:"stl-caret-sp"},Mv={key:3,class:"stl-dot-sp"},Fv={class:"stl-name"},Ev={key:4,class:"stl-num"},Iv={key:5,class:"stl-num"},Rv={class:"stl-x-slot"},Dv=["title","aria-label"],Bv={key:0,class:"stl-empty stl-loading"},zv={key:1,class:"stl-empty"},Gv={key:2,class:"stl-empty"},jv={key:3,class:"stl-overflow"},Hv={class:"stl-overflow-hint"},Uv=["data-theme","title","aria-label"],Wv={class:"stl-reopen-label"},Kv=$o({__name:"SemanticTreeLegend",props:{nodes:{type:Array,default:()=>[]},pinNote:{type:Boolean,default:null},tabs:{type:Array,default:null},defaultTab:{type:Number,default:0},columns:{type:Array,default:()=>["count","pop"]},title:{type:String,default:"Legend"},hideTabs:{type:Boolean,default:!1},columnLabel:{type:String,default:""},open:{type:Boolean,default:null},exportEnabled:{type:Boolean,default:!1},exportCards:{type:Boolean,default:!1},progress:{type:Object,default:null}},emits:["select","update:open","export"],setup(e,{emit:t}){const o=(E,K)=>Pt(E)||K,n=E=>String(E).split(".").pop().replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^./,K=>K.toUpperCase()),{t:a,te:r,locale:s}=js("",{fallback:E=>n(E)});function i(E){const K="tabs."+((E==null?void 0:E.i18nKey)||(E==null?void 0:E.id));return E&&r(K)?a(K):(E==null?void 0:E.label)??""}function l(E){const K="legend.tabInfo."+((E==null?void 0:E.i18nKey)||(E==null?void 0:E.id));return E&&r(K)?a(K):typeof(E==null?void 0:E.info)=="string"?E.info:""}const c=e,u=t,p=J1(),d=Se("legendProgress",null),w=U(()=>c.progress??H(d)??null),b=U(()=>w.value?a("legend.progress.title"):c.title),m=U(()=>((p==null?void 0:p.theme.value)||"dark")==="dark"),g=Se("dataStore",null),$=Se("normalizedPeopleGroups",null),C=E=>!!(E&&Ar(E)&&Fi(E)),v=U(()=>{var K,me;if(c.pinNote!==null)return c.pinNote;if((K=$==null?void 0:$.value)!=null&&K.length)return $.value.slice(0,20).some(C);const E=(g==null?void 0:g.sources)||{};for(const be in E)if((((me=E[be])==null?void 0:me.features)||[]).slice(0,20).some(C))return!0;return!1});function k(E,K){var me;for(const be of E||[]){if((be==null?void 0:be.id)===K)return be;const Ce=(me=be==null?void 0:be.children)!=null&&me.length?k(be.children,K):null;if(Ce)return Ce}return null}function x(E){const K=k(j.value,E);K&&z(K)}function S(E,K=0){return E!=null&&E.length?Math.max(...E.map(me=>S(me.children??[],K+1))):K}function N(E,K,me=0){return me===K?E.slice():E.flatMap(be=>N(be.children??[],K,me+1))}function I(E,K,me=[]){var be;for(const Ce of E){if(Ce.id===K)return me;if((be=Ce.children)!=null&&be.length){const at=I(Ce.children,K,[...me,Ce]);if(at)return at}}return null}function O(E,K=new Set){var me;if(!((me=E==null?void 0:E.children)!=null&&me.length))return K;for(const be of E.children)K.add(be.id),O(be,K);return K}function F(E,K="root"){var be;if(!Array.isArray(E))return[];const me=[];for(const Ce of E){if(!Ce||typeof Ce!="object"){try{console.warn("[SemanticTreeLegend] dropped null node under",K)}catch{}continue}me.push((be=Ce.children)!=null&&be.length?{...Ce,children:F(Ce.children,Ce.label||Ce.id||K)}:Ce)}return me}const j=U(()=>F(c.nodes)),V=U(()=>S(j.value)),q=U(()=>{const E=c.tabs??[],K=E.length||V.value+1;return Array.from({length:K},(me,be)=>E[be]??{id:`gen${be+1}`,label:`Generation ${be+1}`})}),le=ie(Math.max(0,c.defaultTab|0)),Q=ie(new Set),Y=ie(null),ae=ie(c.open!==null?c.open:!0),te=ie(null),oe=ie(!1),D=ie(!1),{scrimRef:re,scrimStyle:pe}=yd(oe),$e=ie(null),Ie=ie("desc"),Fe=U({get:()=>{var E;return c.hideTabs?0:p&&!((E=p.activeTabTouched)!=null&&E.value)?Math.min(Math.max(0,c.defaultTab|0),Math.max(0,q.value.length-1)):p?p.activeTab.value:le.value},set:E=>{c.hideTabs||(p?(p.activeTab.value=E,p.activeTabTouched&&(p.activeTabTouched.value=!0)):le.value=E)}}),Te=U({get:()=>p?p.selection.value:Y.value,set:E=>{p?p.selection.value=E:Y.value=E}}),Ue=U(()=>{var E;return((E=Te.value)==null?void 0:E.id)||null}),rt=ie(null);He(()=>c.open,E=>{E!==null&&(ae.value=E)}),He(()=>j.value,()=>{var at,Ae;const E=((at=Te.value)==null?void 0:at.id)||null;if(E){const vt=k(j.value,E);if(vt){Te.value=vt;return}}const K=p?(Ae=p.activeTabTouched)==null?void 0:Ae.value:!1,me=K?p==null?void 0:p.activeTab.value:void 0,be=Math.min(Math.max(0,c.defaultTab|0),Math.max(0,q.value.length-1)),Ce=typeof me=="number"&&me>=0?me:be;p?(p.activeTab.value=Ce,!K&&p.activeTabTouched&&(p.activeTabTouched.value=!1)):le.value=Ce,Q.value=new Set,Te.value=null,u("select",null)},{deep:!1});let qe=null;p&&He(()=>p.selection.value,E=>{if((E==null?void 0:E.id)===qe)return;if(!E){qe=null;return}qe=E.id;const K=I(j.value,E.id)||[];typeof E.depth=="number"&&(Fe.value=Math.min(E.depth,q.value.length-1));const me=new Set;K.forEach(be=>me.add(be.id)),Q.value=me,u("select",E)});function Qe(E,K){const me=(K.pop??0)-(E.pop??0);return me!==0?me:(K.count??0)-(E.count??0)}const nt=U(()=>{if(!$e.value)return Qe;const E=$e.value,K=Ie.value==="asc"?1:-1;return(me,be)=>((me[E]??0)-(be[E]??0))*K});function A(E){$e.value===E?Ie.value==="desc"?Ie.value="asc":($e.value=null,Ie.value="desc"):($e.value=E,Ie.value="desc")}const M=ie([]),L=ie(!1);let Z=-1;function ee(E){if(M.value[E]){L.value=!1;return}L.value=!0,Z=E,setTimeout(()=>{if(Z!==E)return;const K=[...N(j.value,E)].sort(nt.value),me=[...M.value];me[E]=K,M.value=me,L.value=!1},0)}He(Fe,E=>ee(E),{immediate:!0}),He(()=>[j.value,$e.value,Ie.value],()=>{M.value=[],ee(Fe.value)},{deep:!1});const X=U(()=>M.value[Fe.value]||[]),ce=U(()=>{var K;const E=(K=q.value[Fe.value])==null?void 0:K.topLimit;return E?X.value.slice(0,E):X.value}),se=U(()=>{var K;const E=(K=q.value[Fe.value])==null?void 0:K.topLimit;return E?Math.max(0,X.value.length-E):0});function f(E,K,me,be,Ce){var at;for(const Ae of K)Ae&&(E.push({node:Ae,relDepth:me,parent:be,ancestors:Ce}),Q.value.has(Ae.id)&&((at=Ae.children)!=null&&at.length)&&f(E,[...Ae.children].sort(nt.value),me+1,Ae,[...Ce,Ae]))}const h=U(()=>{const E=[];f(E,ce.value,0,null,[]);for(let K=0;KCe+1&&St.ancestors[Ce]}if(Ce===me.relDepth-1){let vt=!1;for(let St=K+1;StUe.value!==null),P=U(()=>c.columns.includes("count")),W=U(()=>c.columns.includes("pop")),J=U(()=>Te.value?O(Te.value):new Set),T=U(()=>{var at;const E=Te.value;if(!E)return null;const K=I(j.value,E.id);if(!K||!K.length)return null;const me=K[K.length-1],be=K.length-1,Ce=((at=q.value[be])==null?void 0:at.label)||"Parent";return{node:me,tabName:Ce,depth:be}});function z(E){Ue.value===E.id?(qe=null,Te.value=null,u("select",null)):(qe=E.id,Te.value=E,u("select",E))}function ne(E,K){K==null||K.stopPropagation();const me=new Set(Q.value),be=me.has(E);if(be?me.delete(E):me.add(E),Q.value=me,be&&Te.value){const Ce=I(j.value,Te.value.id);Ce&&Ce.some(at=>at.id===E)&&(qe=null,Te.value=null,u("select",null))}}function ge(){const E=T.value;E!=null&&E.node&&(!c.hideTabs&&typeof E.depth=="number"&&(Fe.value=E.depth),Q.value=new Set,z(E.node))}function ve(E){if(Fe.value===E){te.value=te.value===E?null:E;return}Fe.value=E,Q.value=new Set,qe=null,Te.value=null,te.value=null,u("select",null)}function Ee(E){E==null||E.stopPropagation(),qe=null,Te.value=null,u("select",null)}function Ne(E,K){K==null||K.stopPropagation(),te.value=te.value===E?null:E}function bt(E){E==null||E.stopPropagation(),oe.value=!oe.value}function _e(E){oe.value=!1,D.value=!1,u("export",E)}He(Ue,E=>{E||(oe.value=!1,D.value=!1)}),He(oe,E=>{E||(D.value=!1)});function he(E){let K=E.parentElement;for(;K;){const me=getComputedStyle(K).overflowY;if((me==="auto"||me==="scroll")&&K.scrollHeight>K.clientHeight+1){const be=E.getBoundingClientRect(),Ce=K.getBoundingClientRect();K.scrollTop+=be.top-Ce.top-8}K=K.parentElement}}let we=0;He(Ue,async E=>{if(!E)return;const K=++we,me=rt.value;if(!me)return;await Ot();const be=(Ce=0)=>{if(K!==we)return;const at=me.querySelector(`[data-stl-node-id="${CSS.escape(String(E))}"]`);at&&he(at),Ce<6&&setTimeout(()=>be(Ce+1),70)};be(0)});function Ge(){const E=s&&(s.value??s);return typeof E=="string"&&E?E:void 0}function st(E){return E?E>=1e3?new Intl.NumberFormat(Ge(),{notation:"compact",maximumFractionDigits:E>=1e6&&E<1e7?1:0}).format(E):E.toLocaleString(Ge()):"—"}function en(E){return E!=null?E.toLocaleString(Ge()):"—"}function jo(E){var K;return{selected:Ue.value===E.node.id,descendant:y.value&&J.value.has(E.node.id),child:E.relDepth>0,leaf:!((K=E.node.children)!=null&&K.length)}}return yt(` +`,"legend-component");const a=e;Se("mapStore");const r=Se("dataStore"),s=Se("uiStore"),i=_l(a,"legendType"),{items:l,columns:c,title:u,activeFilter:p,setFilter:d,totalCount:w,totalPopulation:b,progress:m,fmtPop:g,fmtCount:$}=id(i,bd),C=Se("normalizedPeopleGroups",null),v=U(()=>{var Y,ae;if((Y=C==null?void 0:C.value)!=null&&Y.length)return C.value;const Q=[];for(const te in r.sources){const oe=r.sources[te];(ae=oe==null?void 0:oe.features)!=null&&ae.length&&Q.push(...oe.features)}return Q}),k=Se("mapId",null),x=U(()=>s.isMobile),S=U(()=>s.legendMode),N=U(()=>s.selectedPeopleGroup),I=U(()=>Ei(v.value)),O=U(()=>N.value?_d(I.value,N.value):[]),F=ie(a.initiallyCollapsed);let j=null;const V=U(()=>{var Q;return S.value==="detail"&&N.value?((Q=N.value.properties)==null?void 0:Q.name)||n("legend.header.peopleGroupFallback"):F.value?n("legend.header.collapsed"):u.value});function q(){F.value=!F.value}He(S,(Q,Y)=>{Q==="detail"&&Y!=="detail"&&F.value&&(F.value=!1)});function le(Q){d(Q)}return Bt(()=>{window.innerWidth<768&&(F.value=!0),j=Q=>{var Y;k&&((Y=Q.detail)!=null&&Y.mapId)&&Q.detail.mapId!==k||(F.value=!1)},window.addEventListener("dxm:openDesktopLegend",j)}),Mt(()=>{j&&window.removeEventListener("dxm:openDesktopLegend",j)}),(Q,Y)=>x.value?(R(),Ye(H(o),{key:0,legendType:e.legendType,popupAction:e.popupAction,isDark:e.isDark,disableCollapse:e.disableCollapse},null,8,["legendType","popupAction","isDark","disableCollapse"])):F.value?(R(),B("button",{key:1,class:ye(["legend-reopen",{"legend-reopen-light":!e.isDark}]),title:t("aria.expandLegend","Expand legend"),onClick:Y[0]||(Y[0]=ae=>F.value=!1)},[Y[2]||(Y[2]=_("svg",{class:"legend-reopen-icon",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none"},[_("path",{d:"M2 4h8M2 6h8M2 8h5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),_("span",O0,G(H(u)),1),Y[3]||(Y[3]=_("svg",{class:"legend-reopen-caret",width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[_("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,N0)):(R(),B("div",{key:2,class:ye(["legend-container",{"legend-dark":e.isDark}])},[S.value==="detail"?(R(),B("span",M0,[De(hd,{open:!F.value,t:H(n),onToggle:q},null,8,["open","t"])])):ue("",!0),S.value==="detail"?(R(),B("button",{key:1,class:"detail-close-btn",onClick:Y[1]||(Y[1]=ct(ae=>H(s).selectPeopleGroup(null),["stop"])),"aria-label":H(n)("aria.backToLegend")},[...Y[4]||(Y[4]=[_("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[_("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,F0)):ue("",!0),_("div",{class:ye(["legend-content",{"no-padding":H(c).length>0}])},[S.value==="detail"&&N.value?(R(),B(fe,{key:0},[De(md,{peopleGroup:N.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"]),De(ua,{shared:O.value,dark:e.isDark},null,8,["shared","dark"])],64)):e.legendType==="language-family"?(R(),B(fe,{key:1},[],64)):(R(),Ye(cd,{key:2,title:V.value,items:H(l),columns:H(c),activeFilter:H(p),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:H(w),totalPopulation:H(b),fmtPop:H(g),fmtCount:H($),progress:H(m),onFilterClick:le},{"title-caret":Rt(()=>[De(hd,{open:!F.value,t:H(n),onToggle:q},null,8,["open","t"])]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount","progress"])),S.value!=="detail"?(R(),Ye(ua,{key:3,dark:e.isDark},null,8,["dark"])):ue("",!0)],2)],2))}},[["styles",[T0]],["__scopeId","data-v-37990088"]]),I0={class:"gm-title"},R0=["aria-expanded"],D0={class:"gm-body"},B0={class:"gm-keys"},z0={key:0,class:"gm-key"},G0={class:"gm-caveat"},j0={key:0,class:"gm-adm1"},H0={class:"gm-adm1-h"},U0=["aria-label"],W0=["aria-pressed"],K0=["aria-pressed"],q0={class:"gm-keys"},V0={class:"gm-caveat"},Y0={key:0,class:"gm-caveat"},Z0={key:1,class:"gm-err"},J0={key:2,class:"gm-wait",role:"status"},X0={key:3,class:"gm-pg-desktop"},Q0={key:4,class:"gm-pg-mobile"},e1={key:5,class:"gm-sheet"},t1={class:"gm-sh-head"},o1={class:"gm-sh-name"},n1={class:"gm-list-h"},a1={class:"gm-adm1-t"},r1={class:"gm-note"},s1={key:6,class:"gm-sheet"},i1={class:"gm-sh-head"},l1={class:"gm-sh-name"},c1={key:0,class:"gm-ai"},u1=["aria-label"],p1={class:"gm-stat"},d1={class:"gm-stat"},g1={class:"gm-stat"},m1={class:"gm-stat"},h1={class:"gm-stat"},f1={key:1,class:"gm-list"},_1={class:"gm-list-h"},b1={key:2,class:"gm-list"},$1={class:"gm-list-h"},y1={class:"gm-note"},Ii="#1e293b",$d="ci.legendOpen",v1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"connectivity-map",setup(e){const t=Object.create(null);function o(y,P){try{window[y]=P,t[y]=P}catch{}}const n=Hs(()=>An(()=>Promise.resolve().then(()=>Cd),void 0)),a=Se("profileConfig",ie(null)),r=U(()=>{var y;return((y=a.value)==null?void 0:y.isDark)===!0}),s=Se("mapboxToken",null),i=U(()=>{var y;return((y=a.value)==null?void 0:y.tk)||(s==null?void 0:s.value)||typeof window<"u"&&window.MAP_TOKEN||""}),l=U(()=>Us(a.value)),c=ie(null),u=Ao(null),p=ie([]),d=ie(null),w=ie(!0),b=ie(null),m=ie(!0);function g(y){const P=c.value;if(P)try{P.dispatchEvent(new CustomEvent("dxmaps:mapinfo-pending",{bubbles:!0,composed:!0,detail:{pending:y}}))}catch{}}const $=()=>{!u.value&&!b.value&&g(!0)};He(b,y=>{y&&g(!1)});const C=ie(null),v=ie(0);let k=null;function x(){const y=C.value;if(!y||!re.value||pe.value)return;const P=y.offsetTop+y.offsetHeight;P>0&&(v.value=P+8)}function S(){try{k=new ResizeObserver(x),C.value&&k.observe(C.value)}catch{k=null}x()}const N=Ao(null),I=ie("women"),O=ie(null),F=Se("uiStore",null),j=(()=>{var P;const y=(P=Se("lang",null))==null?void 0:P.value;return y&&y!=="en"?y:null})(),V=()=>{if(j)return j;const y=a.value;if(y&&(y.locale||y.lang))return String(y.locale||y.lang);try{const P=new URLSearchParams(location.search);return P.get("lang")||P.get("locale")||document.documentElement.lang||"en"}catch{return"en"}},q=new _p({locale:j,profileConfig:a}),le=Ao([]),Q=ie(0),Y=T$({getMap:()=>u.value,getActivePinColor:()=>Ii});async function ae(){await q.init();const y=await q.setActiveSource("pray-tools");le.value=Co(y||[])}function te(){const y=[];for(const P of le.value){const W=parseFloat(P.longitude??P.lng),J=parseFloat(P.latitude??P.lat);if(!isFinite(W)||!isFinite(J))continue;const T=P._normalized||{};y.push({type:"Feature",properties:{uniqueId:P.uniqueId,slug:P.slug||"",name:P.name,language:P.language,languageFamily:P.languageFamily||T.languageFamily||"",country:P.country,countryIso:P.countryIso,countryIsoLabel:P.countryIsoLabel,countryName:P.countryName,religion:P.religion,religionLabel:P.religionLabel,religionName:P.religionName,population:P.population,status:P.status,description:P.description||"",imageUrl:P.imageUrl||"",peoplePraying:Number(P.peoplePraying??T.peoplePraying??0)},geometry:{type:"Point",coordinates:[W,J]}})}return{type:"FeatureCollection",features:y}}function oe(y){if(!le.value.length||y.getSource("language-families"))return;const P=te();if(Q.value=P.features.length,y.addSource("language-families",{type:"geojson",data:P,promoteId:"uniqueId"}),P.features.length){let W=180,J=90,T=-180,z=-90;for(const ge of P.features){const[ve,Ee]=ge.geometry.coordinates;veT&&(T=ve),Eez&&(z=Ee)}const ne=Math.round(Math.min(y.getContainer().clientWidth,y.getContainer().clientHeight)*.06)+8;try{const ge=y.cameraForBounds([[W,J],[T,z]],{padding:ne});if(y.fitBounds([[W,J],[T,z]],{padding:ne,duration:0}),ge&&y.getZoom()>ge.zoom+.05){const ve=y.getBounds(),Ee=Math.min(360,ve.getEast()-ve.getWest());let Ne=y.getCenter().lng,bt=-1;for(let _e=-180;_e<180;_e+=5){let he=0;for(const we of P.features){let Ge=we.geometry.coordinates[0]-_e;Ge=(Ge+540)%360-180,Math.abs(Ge)<=Ee/2&&he++}he>bt&&(bt=he,Ne=_e)}y.jumpTo({center:[Ne,(J+z)/2]})}}catch{}}y.addLayer({id:"ci-pg-dots",type:"circle",source:"language-families",paint:{"circle-color":Ii,"circle-radius":["interpolate",["linear"],["zoom"],0,2.6,4,3.6,8,6,12,8.5],"circle-stroke-color":"#ffffff","circle-stroke-width":["interpolate",["linear"],["zoom"],0,1,6,1.4,12,1.8],"circle-opacity":.95}}),y.on("click","ci-pg-dots",W=>{var T;const J=(T=W.features)==null?void 0:T[0];!J||!F||(d.value=null,F.selectPeopleGroup(J))}),y.on("mouseenter","ci-pg-dots",()=>{y.getCanvas().style.cursor="pointer"}),y.on("mouseleave","ci-pg-dots",()=>{y.getCanvas().style.cursor=""}),typeof window<"u"&&(o("__ciState",()=>{var W,J;return{groups:le.value.length,dots:Q.value,hasLayer:!!y.getLayer("ci-pg-dots"),rendered:y.queryRenderedFeatures({layers:["ci-pg-dots"]}).length,selected:((J=(W=F==null?void 0:F.selectedPeopleGroup)==null?void 0:W.properties)==null?void 0:J.slug)||null}}),o("__ciMap",y))}const D=aa("connectivity"),re=ie(!1),pe=ie(!0);function $e(y){var P;try{(P=window.sessionStorage)==null||P.setItem($d,y?"1":"0")}catch{}}function Ie(){var y;try{const P=(y=window.sessionStorage)==null?void 0:y.getItem($d);return P==null?null:P==="1"}catch{return null}}function Fe(){pe.value=!pe.value,$e(pe.value)}function Te(){const y=typeof window<"u"&&window.innerWidth<700;if(y===re.value)return;re.value=y;const P=Ie();pe.value=P??!y}typeof window<"u"&&(Te(),window.addEventListener("resize",Te));const Ue=[{id:"yes",color:"#10b981"},{id:"partial",color:"#e8c15a"},{id:"no",color:"#b42318"},{id:"unknown",color:"#9aa2ad"}],rt=y=>(Ue.find(P=>P.id===y)||{}).color||"#9aa2ad",qe=U(()=>{const y={};for(const P of p.value)y[P.iso3]=P;return y});async function Qe(){const[y,P]=await Promise.all([fetch(`${l.value}/tables/internet-by-country.json`).then(W=>W.json()),fetch(`${l.value}/boundaries/world-adm0-web.geojson`).then(W=>W.json())]);return p.value=y.countries||[],P}function nt(y,P){const W=qe.value,T={type:"FeatureCollection",features:(P.features||[]).map(z=>{var ve;const ne=(ve=z.properties)==null?void 0:ve.iso3,ge=W[ne];return{type:"Feature",properties:{iso3:ne,band:(ge==null?void 0:ge.band)||"none",color:ge?rt(ge.band):"rgba(0,0,0,0)",hasData:!!ge},geometry:z.geometry}})};if(y.getSource("ci-src")){y.getSource("ci-src").setData(T);return}y.addSource("ci-src",{type:"geojson",data:T}),y.addLayer({id:"ci-fill",type:"fill",source:"ci-src",paint:{"fill-color":["get","color"],"fill-opacity":["case",["get","hasData"],.72,0]}}),y.addLayer({id:"ci-line",type:"line",source:"ci-src",paint:{"line-color":"rgba(255,255,255,0.5)","line-width":.5}}),y.on("click","ci-fill",z=>{var ge,ve,Ee;if(y.getLayer("ci-pg-dots")&&y.queryRenderedFeatures(z.point,{layers:["ci-pg-dots"]}).length)return;const ne=(Ee=(ve=(ge=z.features)==null?void 0:ge[0])==null?void 0:ve.properties)==null?void 0:Ee.iso3;ne&&qe.value[ne]&&(F==null||F.selectPeopleGroup(null),O.value=null,d.value=qe.value[ne])}),y.on("mouseenter","ci-fill",()=>{y.getCanvas().style.cursor="pointer"}),y.on("mouseleave","ci-fill",()=>{y.getCanvas().style.cursor=""})}const A=[{from:0,color:"#deebf7"},{from:25,color:"#9ecae1"},{from:40,color:"#6baed6"},{from:55,color:"#3182bd"},{from:70,color:"#08519c"}],M=y=>["case",["==",["typeof",["get",y]],"number"],["step",["get",y],...A.flatMap((P,W)=>W===0?[P.color]:[P.from,P.color])],"rgba(0,0,0,0)"];async function L(){var J;const[y,P]=await Promise.all([fetch(`${l.value}/tables/internet-by-adm1.json`).then(T=>{if(!T.ok)throw new Error("internet-by-adm1 "+T.status);return T.json()}),fetch(`${l.value}/boundaries/gb-IND-ADM1-full-web.geojson`).then(T=>{if(!T.ok)throw new Error("gb-IND-ADM1-full "+T.status);return T.json()})]),W={};for(const T of y.rows||[]){if(T.iso3!=="IND"||T.measure!=="ever_used_internet"||!T.adm1)continue;const z=W[J=T.adm1]??(W[J]={name:T.adm1_name||T.adm1,women:{},men:{}});z[T.sex][T.area]=T.value}return N.value=Co({meta:y.meta||{},byArea:W}),P}function Z(y,P){const W=N.value.byArea,J={type:"FeatureCollection",features:(P.features||[]).map(z=>{var ge,ve;const ne=W[(ge=z.properties)==null?void 0:ge.shapeName];return{type:"Feature",geometry:z.geometry,properties:{adm1:(ve=z.properties)==null?void 0:ve.shapeName,women:(ne==null?void 0:ne.women.total)??null,men:(ne==null?void 0:ne.men.total)??null}}})},T=y.getLayer("ci-pg-dots")?"ci-pg-dots":void 0;y.addSource("ci-adm1-src",{type:"geojson",data:J}),y.addLayer({id:"ci-adm1-fill",type:"fill",source:"ci-adm1-src",paint:{"fill-color":M(I.value),"fill-opacity":.85}},T),y.addLayer({id:"ci-adm1-line",type:"line",source:"ci-adm1-src",paint:{"line-color":"rgba(255,255,255,0.8)","line-width":.6}},T),y.getLayer("ci-fill")&&y.setFilter("ci-fill",["!=",["get","iso3"],"IND"]),y.on("click","ci-adm1-fill",z=>{var ve,Ee,Ne;if(y.getLayer("ci-pg-dots")&&y.queryRenderedFeatures(z.point,{layers:["ci-pg-dots"]}).length)return;const ne=(Ne=(Ee=(ve=z.features)==null?void 0:ve[0])==null?void 0:Ee.properties)==null?void 0:Ne.adm1,ge=ne&&W[ne];ge&&(F==null||F.selectPeopleGroup(null),d.value=null,O.value={key:ne,...ge})}),y.on("mouseenter","ci-adm1-fill",()=>{y.getCanvas().style.cursor="pointer"}),y.on("mouseleave","ci-adm1-fill",()=>{y.getCanvas().style.cursor=""})}function ee(y){I.value=y;const P=u.value;P!=null&&P.getLayer("ci-adm1-fill")&&P.setPaintProperty("ci-adm1-fill","fill-color",M(y))}const X=U(()=>{var y,P,W,J;return rp(((J=(W=(P=(y=N.value)==null?void 0:y.meta)==null?void 0:P.boundaries)==null?void 0:W.IND)==null?void 0:J.missing)||[],{type:"conjunction"})}),ce=u$(Se("profileConfig",null));let se=!1;Bt(async()=>{g(!0),window.addEventListener("dxmaps:mapinfo-host",$),S();try{await x$(ce)}catch{}const y=qs(ce);if(!se){if(!y){const P=ce==="maplibre"?"MapLibre":"Mapbox";console.warn(`[connectivity-map] the ${P} engine did not load; refusing to substitute another engine.`),b.value=ur(Pt("messages.engineMissing"),{engine:P});return}if(!c.value){b.value=Pt("messages.engineNotLoaded");return}_$(y);try{const P=ae().catch(ne=>{console.warn("[connectivity-map] people groups:",(ne==null?void 0:ne.message)||ne)}),W=L().catch(ne=>(console.warn("[connectivity-map] India by state:",(ne==null?void 0:ne.message)||ne),null)),J=await Qe();if(se||!c.value)return;const T=k$(ce);if(T&&await C$(c.value,T),se||!c.value)return;const z=new y.Map({container:c.value,style:h$(r.value?"ink":"paper",ce).style||(r.value?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11"),accessToken:i.value,locale:w$(V(),ce),center:[42,18],zoom:1.3,projection:"mercator",attributionControl:!1});u.value=Co(z),Pb(z,{boundaries:!0}),z.once("load",async()=>{try{y$(z,V())}catch{}nt(z,J),Y.initialize(),await P,oe(z);const ne=await W;ne&&!se&&Z(z,ne),m.value=!1})}catch(P){b.value=String(P.message||P),m.value=!1}}}),Mt(()=>{var y;typeof window<"u"&&window.removeEventListener("dxmaps:mapinfo-host",$);try{k==null||k.disconnect()}catch{}u.value||g(!1),typeof window<"u"&&window.removeEventListener("resize",Te);try{window.__ciState===t.__ciState&&delete window.__ciState}catch{}try{window.__ciMap===t.__ciMap&&delete window.__ciMap}catch{}se=!0,Y.cleanup(),F==null||F.selectPeopleGroup(null);try{(y=u.value)==null||y.remove()}catch{}});const f=y=>(Number(y)||0).toLocaleString(),h=U(()=>!!(F!=null&&F.selectedPeopleGroup));return yt(":host{display:block;position:relative;width:100%;height:100%;min-height:420px}.gm{position:absolute;inset:0;overflow:hidden}.gm-map{position:absolute;inset:0}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{transform:translateY(calc(-1 * var(--map-fab-clearance,0px)))}@media(max-width:699px){.gm .map-toolbar.map-toolbar{top:var(--gm-toolbar-top,72px)}}.gm-legend{position:absolute;top:8px;inset-inline-start:8px;width:var(--map-legend-width,380px);max-width:calc(100% - 16px);box-sizing:border-box;z-index:4;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.94);color:#0f1419;font:12px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 2px 10px rgba(0,0,0,.16)}@media(max-width:480px){.gm-legend{width:auto;inset-inline-end:46px}}.is-dark .gm-legend{background:rgba(19,32,25,.95);color:#e5e7eb}.gm-title{font-weight:700;font-size:12.5px;margin-bottom:5px}.gm-fold{width:100%;margin:0 0 6px;border:1px solid #d1d4cd;background:#f3f3f1;color:#3b463d;font:600 11px inherit;padding:6px 10px;border-radius:8px;cursor:pointer;min-height:32px}.gm-fold:hover{background:#e9ebe6}@media(max-width:699px){.gm-fold{min-height:44px;font-size:12px}}.gm-keys{display:flex;flex-wrap:wrap;gap:5px 12px}.gm-key{display:flex;align-items:center;gap:5px;font-size:11px;white-space:nowrap}.gm-sw{width:12px;height:12px;border-radius:3px;flex:none}.gm-caveat{margin-top:5px;font-size:10.5px;opacity:.72;line-height:1.4}.gm-adm1{margin-top:8px;padding-top:7px;border-top:1px solid rgba(0,0,0,.12)}.gm-adm1-h{font-weight:600;font-size:12px;margin-bottom:5px}.gm-seg{display:inline-flex;border:1px solid rgba(0,0,0,.2);border-radius:6px;overflow:hidden;margin-bottom:6px}.gm-seg button{font:inherit;font-size:11px;padding:3px 10px;min-height:24px;border:0;background:transparent;color:inherit;cursor:pointer}.gm-seg button.on{background:#08519c;color:#fff}.gm-adm1-t{width:100%;border-collapse:collapse;font-size:12px;margin:4px 0 6px}.gm-adm1-t th,.gm-adm1-t td{padding:3px 4px;text-align:end}.gm-adm1-t th:first-child{text-align:start}.is-dark .gm-adm1{border-top-color:rgba(255,255,255,.15)}.is-dark .gm-seg{border-color:rgba(255,255,255,.3)}.gm-sheet{position:absolute;left:0;right:0;bottom:0;z-index:6;max-height:62%;overflow-y:auto;background:#fff;color:#0f1419;border-radius:14px 14px 0 0;padding:14px 16px 22px;font:13px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 -6px 26px rgba(0,0,0,.28)}@media(min-width:700px){.gm-sheet{inset-inline-start:auto;inset-inline-end:14px;bottom:14px;width:330px;border-radius:12px}}.is-dark .gm-sheet{background:#132019;color:#e5e7eb}.gm-sh-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}.gm-sh-name{font-weight:800;font-size:15px}.gm-ai{display:flex;align-items:flex-start;gap:8px;margin:0 0 10px;padding:7px 9px;border-radius:8px;font-size:11px;line-height:1.35;background:rgba(180,120,0,.12);color:#7a4f00;border:1px solid rgba(180,120,0,.25)}.is-dark .gm-ai{background:rgba(255,200,80,.10);color:#f0cf88;border-color:rgba(255,200,80,.22)}.gm-ai-x{margin-left:auto;flex:none;border:0;background:none;cursor:pointer;font-size:15px;line-height:1;color:inherit;opacity:.7;padding:0 2px;min-width:24px;min-height:24px}.gm-ai-x:hover{opacity:1}.gm-x{margin-left:auto;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit;font:600 12px inherit;padding:6px 12px;border-radius:8px;cursor:pointer;min-height:34px}.gm-stat{display:flex;justify-content:space-between;gap:12px;padding:4px 0;border-bottom:1px solid rgba(0,0,0,.07);font-variant-numeric:tabular-nums}.is-dark .gm-stat{border-bottom-color:rgba(255,255,255,.09)}.gm-stat b{font-weight:700}.gm-list{margin-top:9px}.gm-list-h{font-weight:700;font-size:12px;margin-bottom:3px}.gm-list ul{margin:0;padding-left:17px;font-size:12px;line-height:1.5}.gm-note{margin-top:9px;font-size:11px;line-height:1.5;opacity:.75}.gm-err{position:absolute;top:50%;left:0;right:0;text-align:center;font-size:13px;opacity:.7}.gm-wait{position:absolute;top:50%;inset-inline:0;text-align:center;font-size:13px;opacity:.7}.gm-dot{width:10px;height:10px;border-radius:50%;flex:none;box-sizing:border-box;border:1.5px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.25)}.gm-pg-mobile{display:none}@media(max-width:767px){.gm-pg-mobile{display:block}.gm-pg-desktop{display:none}}","doxa-connectivity-map"),(y,P)=>(R(),B("div",{class:ye(["gm",{"is-dark":r.value}]),style:We(re.value&&v.value?{"--gm-toolbar-top":v.value+"px"}:null)},[_("div",{ref_key:"mapEl",ref:c,class:"gm-map"},null,512),u.value?(R(),Ye(Sb,{key:0},{default:Rt(()=>[De(Tb,{"is-dark":r.value},null,8,["is-dark"]),De(Nb,{map:u.value,"is-dark":r.value},null,8,["map","is-dark"]),De(Ob,{map:u.value,"is-dark":r.value},null,8,["map","is-dark"]),De(Mb,{map:u.value,"is-dark":r.value},null,8,["map","is-dark"]),De(Ib,{"map-container":c.value,"is-dark":r.value},null,8,["map-container","is-dark"]),De(i$,{"is-dark":r.value,"embed-path":"cities-internet/connectivity-map/index.html"},null,8,["is-dark"])]),_:1})):ue("",!0),Oa(_("div",{ref_key:"legendEl",ref:C,class:"gm-legend"},[_("div",I0,G(H(D)("connectivity.title")),1),re.value?(R(),B("button",{key:0,type:"button",class:"gm-fold",onClick:Fe,"aria-expanded":pe.value?"true":"false"},G(pe.value?H(D)("connectivity.ui.hideKey"):H(D)("connectivity.ui.showKey")),9,R0)):ue("",!0),Oa(_("div",D0,[_("div",B0,[(R(),B(fe,null,ot(Ue,W=>_("span",{key:W.id,class:"gm-key"},[_("i",{class:"gm-sw",style:We({background:W.color})},null,4),Oe(G(H(D)("connectivity.bands."+W.id)),1)])),64)),le.value.length?(R(),B("span",z0,[_("i",{class:"gm-dot",style:We({background:Ii})},null,4),Oe(G(H(D)("connectivity.peopleGroup"))+" ("+G(f(le.value.length))+") ",1)])):ue("",!0)]),_("div",G0,G(H(D)("connectivity.caveat")),1),N.value?(R(),B("div",j0,[_("div",H0,G(H(D)("connectivity.adm1.title")),1),_("div",{class:"gm-seg",role:"group","aria-label":H(D)("connectivity.adm1.title")},[_("button",{type:"button",class:ye({on:I.value==="women"}),"aria-pressed":I.value==="women",onClick:P[0]||(P[0]=W=>ee("women"))},G(H(D)("connectivity.adm1.women")),11,W0),_("button",{type:"button",class:ye({on:I.value==="men"}),"aria-pressed":I.value==="men",onClick:P[1]||(P[1]=W=>ee("men"))},G(H(D)("connectivity.adm1.men")),11,K0)],8,U0),_("div",q0,[(R(),B(fe,null,ot(A,(W,J)=>_("span",{key:W.from,class:"gm-key"},[_("i",{class:"gm-sw",style:We({background:W.color})},null,4),Oe(G(J+1O.value=null)},G(H(D)("connectivity.sheet.close")),1)]),_("div",n1,G(H(D)("connectivity.adm1.title")),1),_("table",a1,[_("thead",null,[_("tr",null,[P[5]||(P[5]=_("th",null,null,-1)),_("th",null,G(H(D)("connectivity.adm1.total")),1),_("th",null,G(H(D)("connectivity.adm1.urban")),1),_("th",null,G(H(D)("connectivity.adm1.rural")),1)])]),_("tbody",null,[(R(),B(fe,null,ot(["women","men"],W=>_("tr",{key:W},[_("th",null,G(H(D)("connectivity.adm1."+W)),1),(R(),B(fe,null,ot(["total","urban","rural"],J=>_("td",{key:J},G(O.value[W][J]!=null?O.value[W][J]+"%":"—"),1)),64))])),64))])]),_("p",r1,G(H(D)("connectivity.adm1.source")),1)])):ue("",!0),d.value?(R(),B("div",s1,[_("div",i1,[_("span",l1,G(d.value.country),1),_("button",{type:"button",class:"gm-x",onClick:P[3]||(P[3]=W=>d.value=null)},G(H(D)("connectivity.sheet.close")),1)]),w.value?(R(),B("div",c1,[_("span",null,G(H(D)("connectivity.sheet.ai")),1),_("button",{type:"button",class:"gm-ai-x",onClick:P[4]||(P[4]=W=>w.value=!1),"aria-label":H(D)("connectivity.sheet.dismiss")},"×",8,u1)])):ue("",!0),_("div",p1,[_("span",null,G(H(D)("connectivity.sheet.internetUsers")),1),_("b",null,G(d.value.internet_pct!=null?d.value.internet_pct+"%":H(D)("connectivity.sheet.unknown")),1)]),_("div",d1,[_("span",null,G(H(D)("connectivity.sheet.measured")),1),_("b",null,G(d.value.internet_year||"—"),1)]),_("div",g1,[_("span",null,G(H(D)("connectivity.sheet.mobilePer100")),1),_("b",null,G(d.value.mobile_per_100??"—"),1)]),_("div",m1,[_("span",null,G(H(D)("connectivity.sheet.peopleGroups")),1),_("b",null,G(f(d.value.people_groups)),1)]),_("div",h1,[_("span",null,G(H(D)("connectivity.sheet.topPlatform")),1),_("b",null,[Oe(G(d.value.top_platform||H(D)("connectivity.sheet.unknown")),1),d.value.top_platform_pct?(R(),B(fe,{key:0},[Oe(" · "+G(d.value.top_platform_pct)+"%",1)],64)):ue("",!0)])]),d.value.carriers&&d.value.carriers.length?(R(),B("div",f1,[_("div",_1,G(H(D)("connectivity.sheet.carriers",{n:d.value.carrier_count})),1),_("ul",null,[(R(!0),B(fe,null,ot(d.value.carriers,(W,J)=>(R(),B("li",{key:J},G(W),1))),128))])])):ue("",!0),d.value.platforms&&d.value.platforms.length?(R(),B("div",b1,[_("div",$1,G(H(D)("connectivity.sheet.socialPlatforms")),1),_("ul",null,[(R(!0),B(fe,null,ot(d.value.platforms,(W,J)=>(R(),B("li",{key:J},G(W.name)+" · "+G(W.pct)+"%",1))),128))])])):ue("",!0),_("p",y1,G(H(D)("connectivity.sheet.note")),1)])):ue("",!0)],6))}}},Symbol.toStringTag,{value:"Module"}));function w1(e){const t=(e==null?void 0:e.parentElement)||e;if(!t||!t.ownerDocument)return{x:0,y:0};const o=t.ownerDocument.createElement("div");o.style.cssText="position:fixed;top:0;left:0;width:0;height:0;pointer-events:none;opacity:0",t.appendChild(o);const n=o.getBoundingClientRect();return o.remove(),{x:n.left,y:n.top}}function yd(e){const t=ie(null),o=Ao({position:"fixed",inset:"0"}),n=()=>{var u,p;const r=t.value;if(!r)return;const s=w1(r),i=r.ownerDocument||(typeof document<"u"?document:null),l=((u=i==null?void 0:i.documentElement)==null?void 0:u.clientWidth)||0,c=((p=i==null?void 0:i.documentElement)==null?void 0:p.clientHeight)||0;o.value={position:"fixed",top:`${-s.y}px`,left:`${-s.x}px`,right:"auto",bottom:"auto",width:`${l}px`,height:`${c}px`,boxSizing:"border-box"}};He(e,r=>{r&&requestAnimationFrame(()=>{n(),requestAnimationFrame(n)})},{flush:"post"});const a=()=>{e.value&&n()};return typeof window<"u"&&window.addEventListener("resize",a),Mt(()=>{typeof window<"u"&&window.removeEventListener("resize",a)}),{scrimRef:t,scrimStyle:o}}const k1={class:"dt-head"},x1={class:"dt-title"},C1={class:"dt-count"},A1={key:0,class:"dt-grain"},P1={class:"dt-actions"},S1={key:0,class:"dt-err"},L1={class:"dt-wrap"},T1={class:"dt-hint"},N1={key:0,dir:"ltr"},O1=["aria-label"],M1={class:"dt-sheet-head"},F1={class:"dt-dl"},E1=["href"],I1={key:1},R1={key:2},D1={key:2,class:"dt-caveats"},B1={dir:"ltr"},z1={class:"dt-cav-k"},G1={__name:"DataTable",props:{table:{type:Object,required:!0},assetsBase:{type:String,default:"./assets"},isDark:{type:Boolean,default:!1},height:{type:String,default:"560px"},frozen:{type:Number,default:1},pageSize:{type:Number,default:50}},emits:["row-click"],setup(e,{emit:t}){const o=(F,j)=>Pt(F)||j,n=e,a=t,r=ie(!1),s=ie(null),{scrimRef:i,scrimStyle:l}=yd(s),c=ie(null),u=Ao(null),p=ie(null),d=ie(!1),w=U(()=>String(n.assetsBase||"./assets").replace(/\/+$/,"")),b=U(()=>{var F;return((F=n.table)==null?void 0:F.meta)||{}}),m=U(()=>{var F;return(((F=n.table)==null?void 0:F.rows)||[]).length}),g=U(()=>Object.entries(b.value).filter(([F,j])=>typeof j=="string"&&/caveat|meaning|note|boundary|measures|does_not/i.test(F)).map(([F,j])=>({key:F.replace(/_/g," "),text:j})));let $=null;function C(){return window.Tabulator?Promise.resolve(window.Tabulator):$||($=new Promise((F,j)=>{const V=document.createElement("script");V.src=`${w.value}/vendor/tabulator/tabulator.min.js`,V.onload=()=>F(window.Tabulator),V.onerror=()=>j(new Error("Tabulator failed to load — is public/assets/vendor/tabulator/ present?")),document.head.appendChild(V)}),$)}async function v(F){if(!(!F||F.querySelector("style[data-tabulator]")))try{const j=await fetch(`${w.value}/vendor/tabulator/tabulator.min.css`);if(!j.ok)return;const V=document.createElement("style");V.setAttribute("data-tabulator",""),V.textContent=await j.text(),F.appendChild(V)}catch{}}function k(F){var le,Q;if(!c.value)return;r.value=typeof window<"u"&&window.innerWidth<700;const j=((le=n.table)==null?void 0:le.columns)||[],q=(r.value?j.slice(0,3):j).map((Y,ae)=>({title:Y.title,field:Y.field,headerFilter:Y.type==="boolean"?"tickCross":"input",headerFilterPlaceholder:"filter…",sorter:Y.type==="number"?"number":Y.type==="boolean"?"boolean":"string",formatter:Y.type==="boolean"?"tickCross":void 0,.../_url$/.test(Y.field)?{formatter:"link",formatterParams:{target:"_blank",label:()=>"open"}}:{},frozen:!r.value&&ae{s.value=ae.getData(),a("row-click",ae.getData())}),u.value.on("tableBuilt",()=>{d.value=!0})}const x=F=>{var j,V;return((V=(((j=n.table)==null?void 0:j.columns)||[]).find(q=>q.field===F))==null?void 0:V.title)||F.replace(/_/g," ")},S=F=>typeof F=="string"&&F.includes(", ")&&F.length>40?F.split(", "):null,N=F=>typeof F=="string"&&/^https?:\/\//.test(F),I=U(()=>s.value?Object.entries(s.value).filter(([,F])=>F!==""&&F!==null&&F!==void 0):[]);function O(F){var j;try{(j=u.value)==null||j.download(F,`${(b.value.title||"table").replace(/\W+/g,"-").toLowerCase()}.${F}`)}catch(V){p.value=String(V.message||V)}}return Bt(async()=>{var F,j;try{await v((j=(F=c.value)==null?void 0:F.getRootNode)==null?void 0:j.call(F)),k(await C())}catch(V){p.value=String(V.message||V)}}),Mt(()=>{var F;try{(F=u.value)==null||F.destroy()}catch{}}),He(()=>n.table,()=>{var F,j;try{(j=u.value)==null||j.replaceData(((F=n.table)==null?void 0:F.rows)||[])}catch{}}),yt(".dt .tabulator{border:1px solid #d1d4cd;background:#fff;font-size:14px}.dt .tabulator .tabulator-header{background:#f3f3f1;border-bottom:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-header .tabulator-col{background:#f3f3f1;border-right:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{background:#e9ebe6}.dt .tabulator .tabulator-col-title{color:#3b463d;font-weight:700}.dt .tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,.dt .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select{background:#fff;border:1px solid #d1d4cd;border-radius:5px;color:#3b463d;padding:3px 6px}.dt .tabulator .tabulator-row{background:#fff;color:#3b463d;border-bottom:1px solid #e6e8e3}.dt .tabulator .tabulator-row.tabulator-row-even{background:#faf9f7}.dt .tabulator .tabulator-row:hover{background:#e9ebe6}.dt .tabulator .tabulator-row .tabulator-cell{border-inline-end:1px solid #e6e8e3;color:#3b463d;unicode-bidi:plaintext}.dt:dir(rtl) .tabulator .tabulator-row .tabulator-cell{text-align:right}.dt .tabulator .tabulator-row .tabulator-cell a{color:#4a7a52;font-weight:600}.dt .tabulator .tabulator-footer{background:#f3f3f1;border-top:1px solid #d1d4cd;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator{color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator label{color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-paginator select{background:#fff;border:1px solid #d1d4cd;border-radius:5px;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-page{border:1px solid #d1d4cd;background:#fff;color:#3b463d;border-radius:5px}.dt .tabulator .tabulator-footer .tabulator-page.active{background:#92b195;border-color:#92b195;color:#fff}.dt .tabulator .tabulator-footer .tabulator-page:not(disabled):hover{background:#e9ebe6;color:#3b463d}.dt .tabulator .tabulator-footer .tabulator-page:disabled{opacity:.45}.dt,.dt *{box-sizing:border-box}.dt{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.dt-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}.dt-title{font-size:15px;font-weight:700;margin:0}.dt-count{font-size:11.5px;opacity:.6;font-variant-numeric:tabular-nums}.dt-grain{font-size:11px;opacity:.55}.dt-actions{margin-inline-start:auto;display:flex;gap:6px}.dt-btn{font:600 11.5px inherit;padding:5px 11px;border-radius:6px;cursor:pointer;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit}.dt-btn:hover{background:rgba(0,0,0,.05)}.dt-err{padding:10px 12px;border-radius:8px;background:rgba(220,38,38,.10);color:#a12020;font-size:12.5px}.dt-caveats{margin-top:10px;padding:10px 12px;border-radius:8px;background:rgba(0,0,0,.04);font-size:11.5px;line-height:1.6;opacity:.85}.is-dark .dt-caveats{background:rgba(255,255,255,.06)}.dt-cav-k{font-weight:700;text-transform:capitalize}.dt-scrim{position:fixed;inset:0;z-index:1200;background:rgba(8,12,16,.55);display:flex;align-items:flex-end;justify-content:center}@media(min-width:700px){.dt-scrim{align-items:center}}.dt-sheet{width:100%;max-width:560px;max-height:82vh;overflow-y:auto;background:#fff;color:#0f1419;border-radius:14px 14px 0 0;padding:16px 18px 26px;box-shadow:0 -6px 30px rgba(0,0,0,.3)}@media(min-width:700px){.dt-sheet{border-radius:14px}}.is-dark .dt-sheet{background:#132019;color:#e5e7eb}.dt-sheet-head{display:flex;align-items:center;gap:12px;margin-bottom:10px;padding-bottom:9px;border-bottom:1px solid rgba(0,0,0,.10);font-size:15px}.dt-close{margin-inline-start:auto;font:600 12px inherit;padding:7px 14px;border-radius:8px;cursor:pointer;min-height:36px;border:1px solid rgba(0,0,0,.16);background:transparent;color:inherit}.dt-dl{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:7px 12px;margin:0;font-size:12.5px}.dt-dl dt{font-weight:700;opacity:.72;text-transform:capitalize}.dt-dl dd{margin:0;word-break:break-word}.dt-dl ul{margin:0;padding-inline-start:16px}.dt-dl a{color:#0b7a5b;font-weight:600}.dt-hint{font-size:11px;opacity:.6;margin:6px 0 0}.dt-wrap{width:100%;overflow:hidden;border:1px solid rgba(0,0,0,.10);border-radius:8px}.is-dark .dt-wrap{border-color:rgba(255,255,255,.12)}","doxa-data-table"),(F,j)=>{var V,q;return R(),B("div",{class:ye(["dt",{"is-dark":e.isDark}])},[_("div",k1,[_("h3",x1,G(b.value.title||"Data"),1),_("span",C1,G(m.value.toLocaleString())+" rows",1),b.value.grain?(R(),B("span",A1,"· "+G(b.value.grain),1)):ue("",!0),_("span",P1,[_("button",{type:"button",class:"dt-btn",onClick:j[0]||(j[0]=le=>O("csv"))},G(o("tables.csv","CSV")),1),_("button",{type:"button",class:"dt-btn",onClick:j[1]||(j[1]=le=>O("json"))},G(o("tables.json","JSON")),1)])]),p.value?(R(),B("div",S1,G(p.value),1)):ue("",!0),_("div",L1,[_("div",{ref_key:"host",ref:c},null,512)]),_("p",T1,[Oe(G(o("tables.tap_row_hint","Tap any row for its full detail")),1),r.value?(R(),B(fe,{key:1},[Oe(".")],64)):(R(),B("bdi",N1," — every field, including the lists the table flattens."))]),s.value?(R(),B("div",{key:1,ref_key:"scrimRef",ref:i,style:We(H(l)),class:"dt-scrim",onClick:j[3]||(j[3]=ct(le=>s.value=null,["self"]))},[_("div",{class:"dt-sheet",role:"dialog","aria-label":o("aria.rowDetail","Row detail")},[_("div",M1,[_("strong",null,G(s.value[(q=(((V=e.table)==null?void 0:V.columns)||[])[0])==null?void 0:q.field]||o("aria.rowDetail","Row detail")),1),_("button",{type:"button",class:"dt-close",onClick:j[2]||(j[2]=le=>s.value=null)},G(o("buttons.close","Close")),1)]),_("dl",F1,[(R(!0),B(fe,null,ot(I.value,([le,Q])=>(R(),B(fe,{key:le},[_("dt",null,G(x(le)),1),_("dd",null,[N(Q)?(R(),B("a",{key:0,href:Q,target:"_blank",rel:"noopener"},G(Q),9,E1)):S(Q)?(R(),B("ul",I1,[(R(!0),B(fe,null,ot(S(Q),(Y,ae)=>(R(),B("li",{key:ae},G(Y),1))),128))])):(R(),B("span",R1,G(Q===!0?"yes":Q===!1?"no":Q),1))])],64))),128))])],8,O1)],4)):ue("",!0),g.value.length?(R(),B("div",D1,[(R(!0),B(fe,null,ot(g.value,le=>(R(),B("div",{key:le.key},[_("bdi",B1,[_("span",z1,G(le.key)+":",1),Oe(" "+G(le.text),1)])]))),128))])):ue("",!0)],2)}}},j1={class:"ct-h"},H1={class:"ct-sub"},U1={class:"ct-tabs"},W1=["onClick"],K1={key:0,class:"ct-n"},q1={key:0,class:"ct-err"},V1={key:1,class:"ct-load"},Y1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"data-tables",setup(e){const t=Se("profileConfig",ie(null)),o=U(()=>{var b;return((b=t.value)==null?void 0:b.isDark)===!0}),n=U(()=>Us(t.value)),a=aa("connectivity"),r=b=>(Number(b)||0).toLocaleString(),s=[{id:"cities",file:"key-cities"},{id:"internet",file:"country-connectivity"},{id:"operators",file:"network-operators"},{id:"social",file:"social-platforms"},{id:"messaging",file:"messaging-channels"}],i=ie("cities"),l=U(()=>s.find(b=>b.id===i.value)||s[0]),c=ie({}),u=ie(!1),p=ie(null);async function d(b){if(!c.value[b]){u.value=!0,p.value=null;try{const m=await fetch(`${n.value}/tables/${b}.json`);if(!m.ok)throw new Error(String(m.status));c.value={...c.value,[b]:await m.json()}}catch{const g=s.find($=>$.file===b);p.value=ur(Pt("messages.couldNotLoadNamed"),{name:g?a("tables.tabs."+g.id):b})}finally{u.value=!1}}}He(l,b=>b&&d(b.file),{immediate:!0});const w=U(()=>{var b;return c.value[(b=l.value)==null?void 0:b.file]||null});return yt(":host{display:block;position:relative;width:100%;height:100%;min-height:320px}.ct{position:absolute;inset:0;overflow-y:auto;padding:18px;background:#f6f7f9;color:#0f1419;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.ct.is-dark{background:#0a1410;color:#e5e7eb}.ct-h{margin:0 0 4px;font-size:18px;font-weight:700}.ct-sub{margin:0 0 14px;font-size:12.5px;opacity:.72;line-height:1.5}.ct-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.ct-tab{font:600 12px inherit;padding:7px 14px;border-radius:999px;cursor:pointer;border:1px solid rgba(0,0,0,.14);background:transparent;color:inherit}.ct-tab.on{background:#10b981;border-color:#10b981;color:#04241a}.ct-load{padding:22px;text-align:center;font-size:12.5px;opacity:.6}.ct-err{padding:11px 13px;border-radius:8px;background:rgba(220,38,38,.10);color:#a12020;font-size:12.5px}.ct-n{font-size:10.5px;opacity:.6;margin-left:5px;font-variant-numeric:tabular-nums}","doxa-cities-tables"),(b,m)=>(R(),B("div",{class:ye(["ct",{"is-dark":o.value}])},[_("h2",j1,G(H(a)("connectivity.tables.title")),1),_("p",H1,G(H(a)("connectivity.tables.intro")),1),_("div",U1,[(R(),B(fe,null,ot(s,g=>_("button",{key:g.id,type:"button",class:ye(["ct-tab",{on:i.value===g.id}]),onClick:$=>i.value=g.id},[Oe(G(H(a)("connectivity.tables.tabs."+g.id)),1),c.value[g.file]?(R(),B("span",K1,G(r((c.value[g.file].rows||[]).length)),1)):ue("",!0)],10,W1)),64))]),p.value?(R(),B("div",q1,G(p.value),1)):w.value?(R(),Ye(G1,{key:l.value.id,table:w.value,"assets-base":n.value,"is-dark":o.value,height:"600px"},null,8,["table","assets-base","is-dark"])):(R(),B("div",V1,G(H(a)("connectivity.tables.loading",{name:H(a)("connectivity.tables.tabs."+l.value.id)})),1))],2))}}},Symbol.toStringTag,{value:"Module"})),Z1="pplrInstance";function J1(){return Se(Z1,null)}const X1="",Q1=["data-theme"],ev={class:"stl-inner"},tv={class:"stl-tb-caret-slot"},ov=["title","aria-label","aria-expanded"],nv={class:"stl-tb-eyebrow"},av=["title","aria-label"],rv=["title"],sv={key:2,class:"stl-tb-title"},iv={key:3,class:"stl-export"},lv=["aria-expanded","title","aria-label"],cv={class:"stl-export-label"},uv={class:"stl-export-menu",role:"menu"},pv={class:"stl-export-item-label"},dv={class:"stl-export-item-label"},gv=["aria-expanded"],mv={class:"stl-export-item-label"},hv=["aria-label"],fv={class:"stl-export-note"},_v={class:"stl-export-item-label"},bv={class:"stl-export-item-label"},$v={key:0,class:"stl-tabs-wrap"},yv={class:"stl-tabs"},vv=["onClick"],wv=["title","onClick"],kv={key:0,class:"stl-info-pop"},xv={class:"stl-col-hdr"},Cv={class:"stl-hdr-name"},Av=["title"],Pv={key:0,class:"stl-sort-arrow"},Sv=["title"],Lv={key:0,class:"stl-sort-arrow"},Tv=["data-stl-node-id","onClick"],Nv=["aria-expanded","aria-label","onClick"],Ov={key:1,class:"stl-caret-sp"},Mv={key:3,class:"stl-dot-sp"},Fv={class:"stl-name"},Ev={key:4,class:"stl-num"},Iv={key:5,class:"stl-num"},Rv={class:"stl-x-slot"},Dv=["title","aria-label"],Bv={key:0,class:"stl-empty stl-loading"},zv={key:1,class:"stl-empty"},Gv={key:2,class:"stl-empty"},jv={key:3,class:"stl-overflow"},Hv={class:"stl-overflow-hint"},Uv=["data-theme","title","aria-label"],Wv={class:"stl-reopen-label"},Kv=$o({__name:"SemanticTreeLegend",props:{nodes:{type:Array,default:()=>[]},pinNote:{type:Boolean,default:null},tabs:{type:Array,default:null},defaultTab:{type:Number,default:0},columns:{type:Array,default:()=>["count","pop"]},title:{type:String,default:"Legend"},hideTabs:{type:Boolean,default:!1},columnLabel:{type:String,default:""},open:{type:Boolean,default:null},exportEnabled:{type:Boolean,default:!1},exportCards:{type:Boolean,default:!1},progress:{type:Object,default:null}},emits:["select","update:open","export"],setup(e,{emit:t}){const o=(E,K)=>Pt(E)||K,n=E=>String(E).split(".").pop().replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^./,K=>K.toUpperCase()),{t:a,te:r,locale:s}=js("",{fallback:E=>n(E)});function i(E){const K="tabs."+((E==null?void 0:E.i18nKey)||(E==null?void 0:E.id));return E&&r(K)?a(K):(E==null?void 0:E.label)??""}function l(E){const K="legend.tabInfo."+((E==null?void 0:E.i18nKey)||(E==null?void 0:E.id));return E&&r(K)?a(K):typeof(E==null?void 0:E.info)=="string"?E.info:""}const c=e,u=t,p=J1(),d=Se("legendProgress",null),w=U(()=>c.progress??H(d)??null),b=U(()=>w.value?a("legend.progress.title"):c.title),m=U(()=>((p==null?void 0:p.theme.value)||"dark")==="dark"),g=Se("dataStore",null),$=Se("normalizedPeopleGroups",null),C=E=>!!(E&&Ar(E)&&Fi(E)),v=U(()=>{var K,me;if(c.pinNote!==null)return c.pinNote;if((K=$==null?void 0:$.value)!=null&&K.length)return $.value.slice(0,20).some(C);const E=(g==null?void 0:g.sources)||{};for(const be in E)if((((me=E[be])==null?void 0:me.features)||[]).slice(0,20).some(C))return!0;return!1});function k(E,K){var me;for(const be of E||[]){if((be==null?void 0:be.id)===K)return be;const Ce=(me=be==null?void 0:be.children)!=null&&me.length?k(be.children,K):null;if(Ce)return Ce}return null}function x(E){const K=k(j.value,E);K&&z(K)}function S(E,K=0){return E!=null&&E.length?Math.max(...E.map(me=>S(me.children??[],K+1))):K}function N(E,K,me=0){return me===K?E.slice():E.flatMap(be=>N(be.children??[],K,me+1))}function I(E,K,me=[]){var be;for(const Ce of E){if(Ce.id===K)return me;if((be=Ce.children)!=null&&be.length){const at=I(Ce.children,K,[...me,Ce]);if(at)return at}}return null}function O(E,K=new Set){var me;if(!((me=E==null?void 0:E.children)!=null&&me.length))return K;for(const be of E.children)K.add(be.id),O(be,K);return K}function F(E,K="root"){var be;if(!Array.isArray(E))return[];const me=[];for(const Ce of E){if(!Ce||typeof Ce!="object"){try{console.warn("[SemanticTreeLegend] dropped null node under",K)}catch{}continue}me.push((be=Ce.children)!=null&&be.length?{...Ce,children:F(Ce.children,Ce.label||Ce.id||K)}:Ce)}return me}const j=U(()=>F(c.nodes)),V=U(()=>S(j.value)),q=U(()=>{const E=c.tabs??[],K=E.length||V.value+1;return Array.from({length:K},(me,be)=>E[be]??{id:`gen${be+1}`,label:`Generation ${be+1}`})}),le=ie(Math.max(0,c.defaultTab|0)),Q=ie(new Set),Y=ie(null),ae=ie(c.open!==null?c.open:!0),te=ie(null),oe=ie(!1),D=ie(!1),{scrimRef:re,scrimStyle:pe}=yd(oe),$e=ie(null),Ie=ie("desc"),Fe=U({get:()=>{var E;return c.hideTabs?0:p&&!((E=p.activeTabTouched)!=null&&E.value)?Math.min(Math.max(0,c.defaultTab|0),Math.max(0,q.value.length-1)):p?p.activeTab.value:le.value},set:E=>{c.hideTabs||(p?(p.activeTab.value=E,p.activeTabTouched&&(p.activeTabTouched.value=!0)):le.value=E)}}),Te=U({get:()=>p?p.selection.value:Y.value,set:E=>{p?p.selection.value=E:Y.value=E}}),Ue=U(()=>{var E;return((E=Te.value)==null?void 0:E.id)||null}),rt=ie(null);He(()=>c.open,E=>{E!==null&&(ae.value=E)}),He(()=>j.value,()=>{var at,Ae;const E=((at=Te.value)==null?void 0:at.id)||null;if(E){const vt=k(j.value,E);if(vt){Te.value=vt;return}}const K=p?(Ae=p.activeTabTouched)==null?void 0:Ae.value:!1,me=K?p==null?void 0:p.activeTab.value:void 0,be=Math.min(Math.max(0,c.defaultTab|0),Math.max(0,q.value.length-1)),Ce=typeof me=="number"&&me>=0?me:be;p?(p.activeTab.value=Ce,!K&&p.activeTabTouched&&(p.activeTabTouched.value=!1)):le.value=Ce,Q.value=new Set,Te.value=null,u("select",null)},{deep:!1});let qe=null;p&&He(()=>p.selection.value,E=>{if((E==null?void 0:E.id)===qe)return;if(!E){qe=null;return}qe=E.id;const K=I(j.value,E.id)||[];typeof E.depth=="number"&&(Fe.value=Math.min(E.depth,q.value.length-1));const me=new Set;K.forEach(be=>me.add(be.id)),Q.value=me,u("select",E)});function Qe(E,K){const me=(K.pop??0)-(E.pop??0);return me!==0?me:(K.count??0)-(E.count??0)}const nt=U(()=>{if(!$e.value)return Qe;const E=$e.value,K=Ie.value==="asc"?1:-1;return(me,be)=>((me[E]??0)-(be[E]??0))*K});function A(E){$e.value===E?Ie.value==="desc"?Ie.value="asc":($e.value=null,Ie.value="desc"):($e.value=E,Ie.value="desc")}const M=ie([]),L=ie(!1);let Z=-1;function ee(E){if(M.value[E]){L.value=!1;return}L.value=!0,Z=E,setTimeout(()=>{if(Z!==E)return;const K=[...N(j.value,E)].sort(nt.value),me=[...M.value];me[E]=K,M.value=me,L.value=!1},0)}He(Fe,E=>ee(E),{immediate:!0}),He(()=>[j.value,$e.value,Ie.value],()=>{M.value=[],ee(Fe.value)},{deep:!1});const X=U(()=>M.value[Fe.value]||[]),ce=U(()=>{var K;const E=(K=q.value[Fe.value])==null?void 0:K.topLimit;return E?X.value.slice(0,E):X.value}),se=U(()=>{var K;const E=(K=q.value[Fe.value])==null?void 0:K.topLimit;return E?Math.max(0,X.value.length-E):0});function f(E,K,me,be,Ce){var at;for(const Ae of K)Ae&&(E.push({node:Ae,relDepth:me,parent:be,ancestors:Ce}),Q.value.has(Ae.id)&&((at=Ae.children)!=null&&at.length)&&f(E,[...Ae.children].sort(nt.value),me+1,Ae,[...Ce,Ae]))}const h=U(()=>{const E=[];f(E,ce.value,0,null,[]);for(let K=0;KCe+1&&St.ancestors[Ce]}if(Ce===me.relDepth-1){let vt=!1;for(let St=K+1;StUe.value!==null),P=U(()=>c.columns.includes("count")),W=U(()=>c.columns.includes("pop")),J=U(()=>Te.value?O(Te.value):new Set),T=U(()=>{var at;const E=Te.value;if(!E)return null;const K=I(j.value,E.id);if(!K||!K.length)return null;const me=K[K.length-1],be=K.length-1,Ce=((at=q.value[be])==null?void 0:at.label)||"Parent";return{node:me,tabName:Ce,depth:be}});function z(E){Ue.value===E.id?(qe=null,Te.value=null,u("select",null)):(qe=E.id,Te.value=E,u("select",E))}function ne(E,K){K==null||K.stopPropagation();const me=new Set(Q.value),be=me.has(E);if(be?me.delete(E):me.add(E),Q.value=me,be&&Te.value){const Ce=I(j.value,Te.value.id);Ce&&Ce.some(at=>at.id===E)&&(qe=null,Te.value=null,u("select",null))}}function ge(){const E=T.value;E!=null&&E.node&&(!c.hideTabs&&typeof E.depth=="number"&&(Fe.value=E.depth),Q.value=new Set,z(E.node))}function ve(E){if(Fe.value===E){te.value=te.value===E?null:E;return}Fe.value=E,Q.value=new Set,qe=null,Te.value=null,te.value=null,u("select",null)}function Ee(E){E==null||E.stopPropagation(),qe=null,Te.value=null,u("select",null)}function Ne(E,K){K==null||K.stopPropagation(),te.value=te.value===E?null:E}function bt(E){E==null||E.stopPropagation(),oe.value=!oe.value}function _e(E){oe.value=!1,D.value=!1,u("export",E)}He(Ue,E=>{E||(oe.value=!1,D.value=!1)}),He(oe,E=>{E||(D.value=!1)});function he(E){let K=E.parentElement;for(;K;){const me=getComputedStyle(K).overflowY;if((me==="auto"||me==="scroll")&&K.scrollHeight>K.clientHeight+1){const be=E.getBoundingClientRect(),Ce=K.getBoundingClientRect();K.scrollTop+=be.top-Ce.top-8}K=K.parentElement}}let we=0;He(Ue,async E=>{if(!E)return;const K=++we,me=rt.value;if(!me)return;await Ot();const be=(Ce=0)=>{if(K!==we)return;const at=me.querySelector(`[data-stl-node-id="${CSS.escape(String(E))}"]`);at&&he(at),Ce<6&&setTimeout(()=>be(Ce+1),70)};be(0)});function Ge(){const E=s&&(s.value??s);return typeof E=="string"&&E?E:void 0}function st(E){return E?E>=1e3?new Intl.NumberFormat(Ge(),{notation:"compact",maximumFractionDigits:E>=1e6&&E<1e7?1:0}).format(E):E.toLocaleString(Ge()):"—"}function en(E){return E!=null?E.toLocaleString(Ge()):"—"}function jo(E){var K;return{selected:Ue.value===E.node.id,descendant:y.value&&J.value.has(E.node.id),child:E.relDepth>0,leaf:!((K=E.node.children)!=null&&K.length)}}return yt(` .stl-inner { --stl-pad-x: 10px; --stl-gap: 6px; diff --git a/public/dx-maps/cities-internet/connectivity-list/index.html b/public/dx-maps/cities-internet/connectivity-list/index.html index 1c3879e68..1e6d1b03c 100644 --- a/public/dx-maps/cities-internet/connectivity-list/index.html +++ b/public/dx-maps/cities-internet/connectivity-list/index.html @@ -61,7 +61,7 @@ - + - + - + \n\n\n" + "script": "\n\n\n" } }, { @@ -145,8 +145,8 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -162,7 +162,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } } ] @@ -782,7 +782,7 @@ "bundle": "gospel-resources", "scriptUrl": "./gospel-resources/gospel-resources.js", "output": "dx-maps/gospel-resources/gospel-resources.js", - "integrity": "sha384-XYwBUHyXdwZJKHbssIQf5uIfKNziTblVW4umAgVtqOoqsehQiWeLywAjCYURxOHX", + "integrity": "sha384-nf+vR7/shgQinugDEFgmwjboPw611W+XYg1FW8z+FjQ/v6pEqdJHlaT9a82YALSG", "elements": [ "gospel-resources-map" ], @@ -805,7 +805,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -821,7 +821,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -837,8 +837,8 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -854,7 +854,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -870,8 +870,8 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } } ] diff --git a/public/dx-maps/gospel-resources/charts/index.html b/public/dx-maps/gospel-resources/charts/index.html index d2f9074d4..1d6987b83 100644 --- a/public/dx-maps/gospel-resources/charts/index.html +++ b/public/dx-maps/gospel-resources/charts/index.html @@ -61,7 +61,7 @@ - + - + - + - + - + \n\n\n" + "script": "\n\n\n" } }, { @@ -145,8 +145,8 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -162,7 +162,7 @@ "scriptUrl": "./cities-internet/cities-internet.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } } ] @@ -782,7 +782,7 @@ "bundle": "gospel-resources", "scriptUrl": "./gospel-resources/gospel-resources.js", "output": "dx-maps/gospel-resources/gospel-resources.js", - "integrity": "sha384-XYwBUHyXdwZJKHbssIQf5uIfKNziTblVW4umAgVtqOoqsehQiWeLywAjCYURxOHX", + "integrity": "sha384-nf+vR7/shgQinugDEFgmwjboPw611W+XYg1FW8z+FjQ/v6pEqdJHlaT9a82YALSG", "elements": [ "gospel-resources-map" ], @@ -805,7 +805,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -821,7 +821,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -837,8 +837,8 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -854,7 +854,7 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -870,8 +870,8 @@ "scriptUrl": "./gospel-resources/gospel-resources.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } } ]