diff --git a/public/dx-maps/cities-internet/cities-internet.js b/public/dx-maps/cities-internet/cities-internet.js index 9545eaedf..d4ccbe7f4 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;Pe("mapStore");const r=Pe("dataStore"),s=Pe("uiStore"),i=fl(a,"legendType"),{items:l,columns:c,title:u,activeFilter:p,setFilter:g,totalCount:w,totalPopulation:_,progress:m,fmtPop:d,fmtCount:y}=ld(i,$d),b=Pe("normalizedPeopleGroups",null),v=K(()=>{var V,se;if((V=b==null?void 0:b.value)!=null&&V.length)return b.value;const ee=[];for(const ne in r.sources){const ae=r.sources[ne];(se=ae==null?void 0:ae.features)!=null&&se.length&&ee.push(...ae.features)}return ee}),k=Pe("mapId",null),x=K(()=>s.isMobile),P=K(()=>s.legendMode),T=K(()=>s.selectedPeopleGroup),I=K(()=>Mi(v.value)),O=K(()=>T.value?bd(I.value,T.value):[]),R=ie(a.initiallyCollapsed);let U=null;const j=K(()=>{var ee;return P.value==="detail"&&T.value?((ee=T.value.properties)==null?void 0:ee.name)||n("legend.header.peopleGroupFallback"):R.value?n("legend.header.collapsed"):u.value});function q(){R.value=!R.value}Be(P,(ee,V)=>{ee==="detail"&&V!=="detail"&&R.value&&(R.value=!1)});function pe(ee){g(ee)}return Rt(()=>{window.innerWidth<768&&(R.value=!0),U=ee=>{var V;k&&((V=ee.detail)!=null&&V.mapId)&&ee.detail.mapId!==k||(R.value=!1)},window.addEventListener("dxm:openDesktopLegend",U)}),Nt(()=>{U&&window.removeEventListener("dxm:openDesktopLegend",U)}),(ee,V)=>x.value?(E(),qe(W(o),{key:0,legendType:e.legendType,popupAction:e.popupAction,isDark:e.isDark,disableCollapse:e.disableCollapse},null,8,["legendType","popupAction","isDark","disableCollapse"])):R.value?(E(),B("button",{key:1,class:ye(["legend-reopen",{"legend-reopen-light":!e.isDark}]),title:t("aria.expandLegend","Expand legend"),onClick:V[0]||(V[0]=se=>R.value=!1)},[V[2]||(V[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",M0,G(W(u)),1),V[3]||(V[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,F0)):(E(),B("div",{key:2,class:ye(["legend-container",{"legend-dark":e.isDark}])},[P.value==="detail"?(E(),B("span",E0,[Ee(fd,{open:!R.value,t:W(n),onToggle:q},null,8,["open","t"])])):ge("",!0),P.value==="detail"?(E(),B("button",{key:1,class:"detail-close-btn",onClick:V[1]||(V[1]=rt(se=>W(s).selectPeopleGroup(null),["stop"])),"aria-label":W(n)("aria.backToLegend")},[...V[4]||(V[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,I0)):ge("",!0),$("div",{class:ye(["legend-content",{"no-padding":W(c).length>0}])},[P.value==="detail"&&T.value?(E(),B(be,{key:0},[Ee(hd,{peopleGroup:T.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"]),Ee(xr,{shared:O.value,dark:e.isDark},null,8,["shared","dark"])],64)):e.legendType==="language-family"?(E(),B(be,{key:1},[],64)):(E(),qe(ud,{key:2,title:j.value,items:W(l),columns:W(c),activeFilter:W(p),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:W(w),totalPopulation:W(_),fmtPop:W(d),fmtCount:W(y),progress:W(m),onFilterClick:pe},{"title-caret":Et(()=>[Ee(fd,{open:!R.value,t:W(n),onToggle:q},null,8,["open","t"])]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount","progress"])),P.value!=="detail"?(E(),qe(xr,{key:3,dark:e.isDark},null,8,["dark"])):ge("",!0)],2)],2))}},[["styles",[O0]],["__scopeId","data-v-37990088"]]),D0={class:"gm-title"},B0=["aria-expanded"],z0={class:"gm-body"},G0={class:"gm-keys"},j0={key:0,class:"gm-key"},H0={class:"gm-caveat"},U0={key:0,class:"gm-adm1"},W0={class:"gm-adm1-h"},K0=["aria-label"],q0=["aria-pressed"],V0=["aria-pressed"],Y0={class:"gm-keys"},Z0={class:"gm-caveat"},J0={key:0,class:"gm-caveat"},X0={key:2,class:"gm-err"},Q0={key:3,class:"gm-wait",role:"status"},e1={key:4,class:"gm-pg-desktop"},t1={key:5,class:"gm-pg-mobile"},o1={key:6,class:"gm-sheet"},n1={class:"gm-sh-head"},a1={class:"gm-sh-name"},r1={class:"gm-list-h"},s1={class:"gm-adm1-t"},i1={class:"gm-note"},l1={key:7,class:"gm-sheet"},c1={class:"gm-sh-head"},u1={class:"gm-sh-name"},p1={key:0,class:"gm-ai"},d1=["aria-label"],g1={class:"gm-stat"},m1={class:"gm-stat"},h1={class:"gm-stat"},f1={class:"gm-stat"},_1={class:"gm-stat"},b1={key:1,class:"gm-list"},$1={class:"gm-list-h"},y1={key:2,class:"gm-list"},v1={class:"gm-list-h"},w1={class:"gm-note"},Ei="#1e293b",yd="ci.legendOpen",k1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"connectivity-map",setup(e){const t=Object.create(null);function o(L,N){try{window[L]=N,t[L]=N}catch{}}const n=js(()=>Cn(()=>Promise.resolve().then(()=>Cd),void 0)),a=Pe("profileConfig",ie(null)),r=K(()=>{var N;const L=(N=a.value)==null?void 0:N.edgeScrollAffordance;return L==null?!0:!(L===!1||L==="false")});let s=null;const i=K(()=>{var L;return((L=a.value)==null?void 0:L.isDark)===!0}),l=Pe("mapboxToken",null),c=K(()=>{var L;return((L=a.value)==null?void 0:L.tk)||(l==null?void 0:l.value)||typeof window<"u"&&window.MAP_TOKEN||""}),u=K(()=>Hs(a.value)),p=ie(null),g=Co(null),w=ie([]),_=ie(null),m=ie(!0),d=ie(null),y=ie(!0);function b(L){const N=p.value;if(N)try{N.dispatchEvent(new CustomEvent("dxmaps:mapinfo-pending",{bubbles:!0,composed:!0,detail:{pending:L}}))}catch{}}const v=()=>{!g.value&&!d.value&&b(!0)};Be(d,L=>{L&&b(!1)});const k=ie(null),x=ie(0);let P=null;function T(){const L=k.value;if(!L||!fe.value||xe.value)return;const N=L.offsetTop+L.offsetHeight;N>0&&(x.value=N+8)}function I(){try{P=new ResizeObserver(T),k.value&&P.observe(k.value)}catch{P=null}T()}const O=Co(null),R=ie("women"),U=ie(null),j=Pe("uiStore",null),q=(()=>{var N;const L=(N=Pe("lang",null))==null?void 0:N.value;return L&&L!=="en"?L:null})(),pe=()=>{if(q)return q;const L=a.value;if(L&&(L.locale||L.lang))return String(L.locale||L.lang);try{const N=new URLSearchParams(location.search);return N.get("lang")||N.get("locale")||document.documentElement.lang||"en"}catch{return"en"}},ee=new bp({locale:q,profileConfig:a}),V=Co([]),se=ie(0),ne=O$({getMap:()=>g.value,getActivePinColor:()=>Ei});async function ae(){await ee.init();const L=await ee.setActiveSource("pray-tools");V.value=xo(L||[])}function H(){const L=[];for(const N of V.value){const C=parseFloat(N.longitude??N.lng),D=parseFloat(N.latitude??N.lat);if(!isFinite(C)||!isFinite(D))continue;const Z=N._normalized||{};L.push({type:"Feature",properties:{uniqueId:N.uniqueId,slug:N.slug||"",name:N.name,language:N.language,languageFamily:N.languageFamily||Z.languageFamily||"",country:N.country,countryIso:N.countryIso,countryIsoLabel:N.countryIsoLabel,countryName:N.countryName,religion:N.religion,religionLabel:N.religionLabel,religionName:N.religionName,population:N.population,status:N.status,description:N.description||"",imageUrl:N.imageUrl||"",peoplePraying:Number(N.peoplePraying??Z.peoplePraying??0)},geometry:{type:"Point",coordinates:[C,D]}})}return{type:"FeatureCollection",features:L}}function ce(L){if(!V.value.length||L.getSource("language-families"))return;const N=H();if(se.value=N.features.length,L.addSource("language-families",{type:"geojson",data:N,promoteId:"uniqueId"}),N.features.length){let C=180,D=90,Z=-180,oe=-90;for(const he of N.features){const[$e,ot]=he.geometry.coordinates;$eZ&&(Z=$e),otoe&&(oe=ot)}const ue=Math.round(Math.min(L.getContainer().clientWidth,L.getContainer().clientHeight)*.06)+8;try{const he=L.cameraForBounds([[C,D],[Z,oe]],{padding:ue});if(L.fitBounds([[C,D],[Z,oe]],{padding:ue,duration:0}),he&&L.getZoom()>he.zoom+.05){const $e=L.getBounds(),ot=Math.min(360,$e.getEast()-$e.getWest());let Pt=L.getCenter().lng,ut=-1;for(let pt=-180;pt<180;pt+=5){let no=0;for(const kn of N.features){let xn=kn.geometry.coordinates[0]-pt;xn=(xn+540)%360-180,Math.abs(xn)<=ot/2&&no++}no>ut&&(ut=no,Pt=pt)}L.jumpTo({center:[Pt,(D+oe)/2]})}}catch{}}L.addLayer({id:"ci-pg-dots",type:"circle",source:"language-families",paint:{"circle-color":Ei,"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}}),L.on("click","ci-pg-dots",C=>{var Z;const D=(Z=C.features)==null?void 0:Z[0];!D||!j||(_.value=null,j.selectPeopleGroup(D))}),L.on("mouseenter","ci-pg-dots",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","ci-pg-dots",()=>{L.getCanvas().style.cursor=""}),typeof window<"u"&&(o("__ciState",()=>{var C,D;return{groups:V.value.length,dots:se.value,hasLayer:!!L.getLayer("ci-pg-dots"),rendered:L.queryRenderedFeatures({layers:["ci-pg-dots"]}).length,selected:((D=(C=j==null?void 0:j.selectedPeopleGroup)==null?void 0:C.properties)==null?void 0:D.slug)||null}}),o("__ciMap",L))}const re=na("connectivity"),fe=ie(!1),xe=ie(!0);function Te(L){var N;try{(N=window.sessionStorage)==null||N.setItem(yd,L?"1":"0")}catch{}}function Ne(){var L;try{const N=(L=window.sessionStorage)==null?void 0:L.getItem(yd);return N==null?null:N==="1"}catch{return null}}function ze(){xe.value=!xe.value,Te(xe.value)}function Qe(){const L=typeof window<"u"&&window.innerWidth<700;if(L===fe.value)return;fe.value=L;const N=Ne();xe.value=N??!L}typeof window<"u"&&(Qe(),window.addEventListener("resize",Qe));const Ue=[{id:"yes",color:"#10b981"},{id:"partial",color:"#e8c15a"},{id:"no",color:"#b42318"},{id:"unknown",color:"#9aa2ad"}],et=L=>(Ue.find(N=>N.id===L)||{}).color||"#9aa2ad",Je=K(()=>{const L={};for(const N of w.value)L[N.iso3]=N;return L});async function A(){const[L,N]=await Promise.all([fetch(`${u.value}/tables/internet-by-country.json`).then(C=>C.json()),fetch(`${u.value}/boundaries/world-adm0-web.geojson`).then(C=>C.json())]);return w.value=L.countries||[],N}function F(L,N){const C=Je.value,Z={type:"FeatureCollection",features:(N.features||[]).map(oe=>{var $e;const ue=($e=oe.properties)==null?void 0:$e.iso3,he=C[ue];return{type:"Feature",properties:{iso3:ue,band:(he==null?void 0:he.band)||"none",color:he?et(he.band):"rgba(0,0,0,0)",hasData:!!he},geometry:oe.geometry}})};if(L.getSource("ci-src")){L.getSource("ci-src").setData(Z);return}L.addSource("ci-src",{type:"geojson",data:Z}),L.addLayer({id:"ci-fill",type:"fill",source:"ci-src",paint:{"fill-color":["get","color"],"fill-opacity":["case",["get","hasData"],.72,0]}}),L.addLayer({id:"ci-line",type:"line",source:"ci-src",paint:{"line-color":"rgba(255,255,255,0.5)","line-width":.5}}),L.on("click","ci-fill",oe=>{var he,$e,ot;if(L.getLayer("ci-pg-dots")&&L.queryRenderedFeatures(oe.point,{layers:["ci-pg-dots"]}).length)return;const ue=(ot=($e=(he=oe.features)==null?void 0:he[0])==null?void 0:$e.properties)==null?void 0:ot.iso3;ue&&Je.value[ue]&&(j==null||j.selectPeopleGroup(null),U.value=null,_.value=Je.value[ue])}),L.on("mouseenter","ci-fill",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","ci-fill",()=>{L.getCanvas().style.cursor=""})}const S=[{from:0,color:"#deebf7"},{from:25,color:"#9ecae1"},{from:40,color:"#6baed6"},{from:55,color:"#3182bd"},{from:70,color:"#08519c"}],J=L=>["case",["==",["typeof",["get",L]],"number"],["step",["get",L],...S.flatMap((N,C)=>C===0?[N.color]:[N.from,N.color])],"rgba(0,0,0,0)"];async function te(){var D;const[L,N]=await Promise.all([fetch(`${u.value}/tables/internet-by-adm1.json`).then(Z=>{if(!Z.ok)throw new Error("internet-by-adm1 "+Z.status);return Z.json()}),fetch(`${u.value}/boundaries/gb-IND-ADM1-full-web.geojson`).then(Z=>{if(!Z.ok)throw new Error("gb-IND-ADM1-full "+Z.status);return Z.json()})]),C={};for(const Z of L.rows||[]){if(Z.iso3!=="IND"||Z.measure!=="ever_used_internet"||!Z.adm1)continue;const oe=C[D=Z.adm1]??(C[D]={name:Z.adm1_name||Z.adm1,women:{},men:{}});oe[Z.sex][Z.area]=Z.value}return O.value=xo({meta:L.meta||{},byArea:C}),N}function Q(L,N){const C=O.value.byArea,D={type:"FeatureCollection",features:(N.features||[]).map(oe=>{var he,$e;const ue=C[(he=oe.properties)==null?void 0:he.shapeName];return{type:"Feature",geometry:oe.geometry,properties:{adm1:($e=oe.properties)==null?void 0:$e.shapeName,women:(ue==null?void 0:ue.women.total)??null,men:(ue==null?void 0:ue.men.total)??null}}})},Z=L.getLayer("ci-pg-dots")?"ci-pg-dots":void 0;L.addSource("ci-adm1-src",{type:"geojson",data:D}),L.addLayer({id:"ci-adm1-fill",type:"fill",source:"ci-adm1-src",paint:{"fill-color":J(R.value),"fill-opacity":.85}},Z),L.addLayer({id:"ci-adm1-line",type:"line",source:"ci-adm1-src",paint:{"line-color":"rgba(255,255,255,0.8)","line-width":.6}},Z),L.getLayer("ci-fill")&&L.setFilter("ci-fill",["!=",["get","iso3"],"IND"]),L.on("click","ci-adm1-fill",oe=>{var $e,ot,Pt;if(L.getLayer("ci-pg-dots")&&L.queryRenderedFeatures(oe.point,{layers:["ci-pg-dots"]}).length)return;const ue=(Pt=(ot=($e=oe.features)==null?void 0:$e[0])==null?void 0:ot.properties)==null?void 0:Pt.adm1,he=ue&&C[ue];he&&(j==null||j.selectPeopleGroup(null),_.value=null,U.value={key:ue,...he})}),L.on("mouseenter","ci-adm1-fill",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","ci-adm1-fill",()=>{L.getCanvas().style.cursor=""})}function de(L){R.value=L;const N=g.value;N!=null&&N.getLayer("ci-adm1-fill")&&N.setPaintProperty("ci-adm1-fill","fill-color",J(L))}const le=K(()=>{var L,N,C,D;return ap(((D=(C=(N=(L=O.value)==null?void 0:L.meta)==null?void 0:N.boundaries)==null?void 0:C.IND)==null?void 0:D.missing)||[],{type:"conjunction"})}),h=d$(Pe("profileConfig",null));let f=!1;Rt(async()=>{var N;b(!0),window.addEventListener("dxmaps:mapinfo-host",v),I(),s=Ob(((N=p.value)==null?void 0:N.parentElement)||null,{enabled:r.value});try{await A$(h)}catch{}const L=Ks(h);if(!f){if(!L){const C=h==="maplibre"?"MapLibre":"Mapbox";console.warn(`[connectivity-map] the ${C} engine did not load; refusing to substitute another engine.`),d.value=lr(xt("messages.engineMissing"),{engine:C});return}if(!p.value){d.value=xt("messages.engineNotLoaded");return}$$(L);try{const C=ae().catch(he=>{console.warn("[connectivity-map] people groups:",(he==null?void 0:he.message)||he)}),D=te().catch(he=>(console.warn("[connectivity-map] India by state:",(he==null?void 0:he.message)||he),null)),Z=await A();if(f||!p.value)return;const oe=C$(h);if(oe&&await P$(p.value,oe),f||!p.value)return;const ue=new L.Map({container:p.value,style:_$(i.value?"ink":"paper",h).style||(i.value?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11"),accessToken:c.value,locale:x$(pe(),h),center:[42,18],zoom:1.3,projection:"mercator",attributionControl:!1});g.value=xo(ue),Pb(ue,{boundaries:!0}),ue.once("load",async()=>{try{w$(ue,pe())}catch{}F(ue,Z),ne.initialize(),await C,ce(ue);const he=await D;he&&!f&&Q(ue,he),y.value=!1})}catch(C){d.value=String(C.message||C),y.value=!1}}}),Nt(()=>{var L;typeof window<"u"&&window.removeEventListener("dxmaps:mapinfo-host",v);try{P==null||P.disconnect()}catch{}try{s==null||s()}catch{}s=null,g.value||b(!1),typeof window<"u"&&window.removeEventListener("resize",Qe);try{window.__ciState===t.__ciState&&delete window.__ciState}catch{}try{window.__ciMap===t.__ciMap&&delete window.__ciMap}catch{}f=!0,ne.cleanup(),j==null||j.selectPeopleGroup(null);try{(L=g.value)==null||L.remove()}catch{}});const z=L=>(Number(L)||0).toLocaleString(),X=K(()=>!!(j!=null&&j.selectedPeopleGroup));return _t(":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)}}.map-scroll-edge{position:absolute;top:0;bottom:0;width:40px;z-index:1;touch-action:pan-y;pointer-events:auto;background:transparent}.map-scroll-edge--left{left:0}.map-scroll-edge--right{right:0}.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"),(L,N)=>(E(),B("div",{class:ye(["gm",{"is-dark":i.value}]),style:Ge(fe.value&&x.value?{"--gm-toolbar-top":x.value+"px"}:null)},[$("div",{ref_key:"mapEl",ref:p,class:"gm-map"},null,512),r.value?(E(),B(be,{key:0},[N[5]||(N[5]=$("div",{class:"map-scroll-edge map-scroll-edge--left"},null,-1)),N[6]||(N[6]=$("div",{class:"map-scroll-edge map-scroll-edge--right"},null,-1))],64)):ge("",!0),g.value?(E(),qe(Sb,{key:1},{default:Et(()=>[Ee(Tb,{"is-dark":i.value},null,8,["is-dark"]),Ee(Fb,{map:g.value,"is-dark":i.value},null,8,["map","is-dark"]),Ee(Mb,{map:g.value,"is-dark":i.value},null,8,["map","is-dark"]),Ee(Eb,{map:g.value,"is-dark":i.value},null,8,["map","is-dark"]),Ee(Db,{"map-container":p.value,"is-dark":i.value},null,8,["map-container","is-dark"]),Ee(c$,{"is-dark":i.value,"embed-path":"cities-internet/connectivity-map/index.html"},null,8,["is-dark"])]),_:1})):ge("",!0),Ta($("div",{ref_key:"legendEl",ref:k,class:"gm-legend"},[$("div",D0,G(W(re)("connectivity.title")),1),fe.value?(E(),B("button",{key:0,type:"button",class:"gm-fold",onClick:ze,"aria-expanded":xe.value?"true":"false"},G(xe.value?W(re)("connectivity.ui.hideKey"):W(re)("connectivity.ui.showKey")),9,B0)):ge("",!0),Ta($("div",z0,[$("div",G0,[(E(),B(be,null,Xe(Ue,C=>$("span",{key:C.id,class:"gm-key"},[$("i",{class:"gm-sw",style:Ge({background:C.color})},null,4),Oe(G(W(re)("connectivity.bands."+C.id)),1)])),64)),V.value.length?(E(),B("span",j0,[$("i",{class:"gm-dot",style:Ge({background:Ei})},null,4),Oe(G(W(re)("connectivity.peopleGroup"))+" ("+G(z(V.value.length))+") ",1)])):ge("",!0)]),$("div",H0,G(W(re)("connectivity.caveat")),1),O.value?(E(),B("div",U0,[$("div",W0,G(W(re)("connectivity.adm1.title")),1),$("div",{class:"gm-seg",role:"group","aria-label":W(re)("connectivity.adm1.title")},[$("button",{type:"button",class:ye({on:R.value==="women"}),"aria-pressed":R.value==="women",onClick:N[0]||(N[0]=C=>de("women"))},G(W(re)("connectivity.adm1.women")),11,q0),$("button",{type:"button",class:ye({on:R.value==="men"}),"aria-pressed":R.value==="men",onClick:N[1]||(N[1]=C=>de("men"))},G(W(re)("connectivity.adm1.men")),11,V0)],8,K0),$("div",Y0,[(E(),B(be,null,Xe(S,(C,D)=>$("span",{key:C.from,class:"gm-key"},[$("i",{class:"gm-sw",style:Ge({background:C.color})},null,4),Oe(G(D+1U.value=null)},G(W(re)("connectivity.sheet.close")),1)]),$("div",r1,G(W(re)("connectivity.adm1.title")),1),$("table",s1,[$("thead",null,[$("tr",null,[N[7]||(N[7]=$("th",null,null,-1)),$("th",null,G(W(re)("connectivity.adm1.total")),1),$("th",null,G(W(re)("connectivity.adm1.urban")),1),$("th",null,G(W(re)("connectivity.adm1.rural")),1)])]),$("tbody",null,[(E(),B(be,null,Xe(["women","men"],C=>$("tr",{key:C},[$("th",null,G(W(re)("connectivity.adm1."+C)),1),(E(),B(be,null,Xe(["total","urban","rural"],D=>$("td",{key:D},G(U.value[C][D]!=null?U.value[C][D]+"%":"—"),1)),64))])),64))])]),$("p",i1,G(W(re)("connectivity.adm1.source")),1)])):ge("",!0),_.value?(E(),B("div",l1,[$("div",c1,[$("span",u1,G(_.value.country),1),$("button",{type:"button",class:"gm-x",onClick:N[3]||(N[3]=C=>_.value=null)},G(W(re)("connectivity.sheet.close")),1)]),m.value?(E(),B("div",p1,[$("span",null,G(W(re)("connectivity.sheet.ai")),1),$("button",{type:"button",class:"gm-ai-x",onClick:N[4]||(N[4]=C=>m.value=!1),"aria-label":W(re)("connectivity.sheet.dismiss")},"×",8,d1)])):ge("",!0),$("div",g1,[$("span",null,G(W(re)("connectivity.sheet.internetUsers")),1),$("b",null,G(_.value.internet_pct!=null?_.value.internet_pct+"%":W(re)("connectivity.sheet.unknown")),1)]),$("div",m1,[$("span",null,G(W(re)("connectivity.sheet.measured")),1),$("b",null,G(_.value.internet_year||"—"),1)]),$("div",h1,[$("span",null,G(W(re)("connectivity.sheet.mobilePer100")),1),$("b",null,G(_.value.mobile_per_100??"—"),1)]),$("div",f1,[$("span",null,G(W(re)("connectivity.sheet.peopleGroups")),1),$("b",null,G(z(_.value.people_groups)),1)]),$("div",_1,[$("span",null,G(W(re)("connectivity.sheet.topPlatform")),1),$("b",null,[Oe(G(_.value.top_platform||W(re)("connectivity.sheet.unknown")),1),_.value.top_platform_pct?(E(),B(be,{key:0},[Oe(" · "+G(_.value.top_platform_pct)+"%",1)],64)):ge("",!0)])]),_.value.carriers&&_.value.carriers.length?(E(),B("div",b1,[$("div",$1,G(W(re)("connectivity.sheet.carriers",{n:_.value.carrier_count})),1),$("ul",null,[(E(!0),B(be,null,Xe(_.value.carriers,(C,D)=>(E(),B("li",{key:D},G(C),1))),128))])])):ge("",!0),_.value.platforms&&_.value.platforms.length?(E(),B("div",y1,[$("div",v1,G(W(re)("connectivity.sheet.socialPlatforms")),1),$("ul",null,[(E(!0),B(be,null,Xe(_.value.platforms,(C,D)=>(E(),B("li",{key:D},G(C.name)+" · "+G(C.pct)+"%",1))),128))])])):ge("",!0),$("p",w1,G(W(re)("connectivity.sheet.note")),1)])):ge("",!0)],6))}}},Symbol.toStringTag,{value:"Module"}));function x1(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 vd(e){const t=ie(null),o=Co({position:"fixed",inset:"0"}),n=()=>{var u,p;const r=t.value;if(!r)return;const s=x1(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"}};Be(e,r=>{r&&requestAnimationFrame(()=>{n(),requestAnimationFrame(n)})},{flush:"post"});const a=()=>{e.value&&n()};return typeof window<"u"&&window.addEventListener("resize",a),Nt(()=>{typeof window<"u"&&window.removeEventListener("resize",a)}),{scrimRef:t,scrimStyle:o}}const C1={class:"dt-head"},A1={class:"dt-title"},P1={class:"dt-count"},S1={key:0,class:"dt-grain"},L1={class:"dt-actions"},T1={key:0,class:"dt-err"},N1={class:"dt-wrap"},O1={class:"dt-hint"},F1={key:0,dir:"ltr"},M1=["aria-label"],E1={class:"dt-sheet-head"},I1={class:"dt-dl"},R1=["href"],D1={key:1},B1={key:2},z1={key:2,class:"dt-caveats"},G1={dir:"ltr"},j1={class:"dt-cav-k"},H1={__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=(R,U)=>xt(R)||U,n=e,a=t,r=ie(!1),s=ie(null),{scrimRef:i,scrimStyle:l}=vd(s),c=ie(null),u=Co(null),p=ie(null),g=ie(!1),w=K(()=>String(n.assetsBase||"./assets").replace(/\/+$/,"")),_=K(()=>{var R;return((R=n.table)==null?void 0:R.meta)||{}}),m=K(()=>{var R;return(((R=n.table)==null?void 0:R.rows)||[]).length}),d=K(()=>Object.entries(_.value).filter(([R,U])=>typeof U=="string"&&/caveat|meaning|note|boundary|measures|does_not/i.test(R)).map(([R,U])=>({key:R.replace(/_/g," "),text:U})));let y=null;function b(){return window.Tabulator?Promise.resolve(window.Tabulator):y||(y=new Promise((R,U)=>{const j=document.createElement("script");j.src=`${w.value}/vendor/tabulator/tabulator.min.js`,j.onload=()=>R(window.Tabulator),j.onerror=()=>U(new Error("Tabulator failed to load — is public/assets/vendor/tabulator/ present?")),document.head.appendChild(j)}),y)}async function v(R){if(!(!R||R.querySelector("style[data-tabulator]")))try{const U=await fetch(`${w.value}/vendor/tabulator/tabulator.min.css`);if(!U.ok)return;const j=document.createElement("style");j.setAttribute("data-tabulator",""),j.textContent=await U.text(),R.appendChild(j)}catch{}}function k(R){var pe,ee;if(!c.value)return;r.value=typeof window<"u"&&window.innerWidth<700;const U=((pe=n.table)==null?void 0:pe.columns)||[],q=(r.value?U.slice(0,3):U).map((V,se)=>({title:V.title,field:V.field,headerFilter:V.type==="boolean"?"tickCross":"input",headerFilterPlaceholder:"filter…",sorter:V.type==="number"?"number":V.type==="boolean"?"boolean":"string",formatter:V.type==="boolean"?"tickCross":void 0,.../_url$/.test(V.field)?{formatter:"link",formatterParams:{target:"_blank",label:()=>"open"}}:{},frozen:!r.value&&se{s.value=se.getData(),a("row-click",se.getData())}),u.value.on("tableBuilt",()=>{g.value=!0})}const x=R=>{var U,j;return((j=(((U=n.table)==null?void 0:U.columns)||[]).find(q=>q.field===R))==null?void 0:j.title)||R.replace(/_/g," ")},P=R=>typeof R=="string"&&R.includes(", ")&&R.length>40?R.split(", "):null,T=R=>typeof R=="string"&&/^https?:\/\//.test(R),I=K(()=>s.value?Object.entries(s.value).filter(([,R])=>R!==""&&R!==null&&R!==void 0):[]);function O(R){var U;try{(U=u.value)==null||U.download(R,`${(_.value.title||"table").replace(/\W+/g,"-").toLowerCase()}.${R}`)}catch(j){p.value=String(j.message||j)}}return Rt(async()=>{var R,U;try{await v((U=(R=c.value)==null?void 0:R.getRootNode)==null?void 0:U.call(R)),k(await b())}catch(j){p.value=String(j.message||j)}}),Nt(()=>{var R;try{(R=u.value)==null||R.destroy()}catch{}}),Be(()=>n.table,()=>{var R,U;try{(U=u.value)==null||U.replaceData(((R=n.table)==null?void 0:R.rows)||[])}catch{}}),_t(".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"),(R,U)=>{var j,q;return E(),B("div",{class:ye(["dt",{"is-dark":e.isDark}])},[$("div",C1,[$("h3",A1,G(_.value.title||"Data"),1),$("span",P1,G(m.value.toLocaleString())+" rows",1),_.value.grain?(E(),B("span",S1,"· "+G(_.value.grain),1)):ge("",!0),$("span",L1,[$("button",{type:"button",class:"dt-btn",onClick:U[0]||(U[0]=pe=>O("csv"))},G(o("tables.csv","CSV")),1),$("button",{type:"button",class:"dt-btn",onClick:U[1]||(U[1]=pe=>O("json"))},G(o("tables.json","JSON")),1)])]),p.value?(E(),B("div",T1,G(p.value),1)):ge("",!0),$("div",N1,[$("div",{ref_key:"host",ref:c},null,512)]),$("p",O1,[Oe(G(o("tables.tap_row_hint","Tap any row for its full detail")),1),r.value?(E(),B(be,{key:1},[Oe(".")],64)):(E(),B("bdi",F1," — every field, including the lists the table flattens."))]),s.value?(E(),B("div",{key:1,ref_key:"scrimRef",ref:i,style:Ge(W(l)),class:"dt-scrim",onClick:U[3]||(U[3]=rt(pe=>s.value=null,["self"]))},[$("div",{class:"dt-sheet",role:"dialog","aria-label":o("aria.rowDetail","Row detail")},[$("div",E1,[$("strong",null,G(s.value[(q=(((j=e.table)==null?void 0:j.columns)||[])[0])==null?void 0:q.field]||o("aria.rowDetail","Row detail")),1),$("button",{type:"button",class:"dt-close",onClick:U[2]||(U[2]=pe=>s.value=null)},G(o("buttons.close","Close")),1)]),$("dl",I1,[(E(!0),B(be,null,Xe(I.value,([pe,ee])=>(E(),B(be,{key:pe},[$("dt",null,G(x(pe)),1),$("dd",null,[T(ee)?(E(),B("a",{key:0,href:ee,target:"_blank",rel:"noopener"},G(ee),9,R1)):P(ee)?(E(),B("ul",D1,[(E(!0),B(be,null,Xe(P(ee),(V,se)=>(E(),B("li",{key:se},G(V),1))),128))])):(E(),B("span",B1,G(ee===!0?"yes":ee===!1?"no":ee),1))])],64))),128))])],8,M1)],4)):ge("",!0),d.value.length?(E(),B("div",z1,[(E(!0),B(be,null,Xe(d.value,pe=>(E(),B("div",{key:pe.key},[$("bdi",G1,[$("span",j1,G(pe.key)+":",1),Oe(" "+G(pe.text),1)])]))),128))])):ge("",!0)],2)}}},U1={class:"ct-h"},W1={class:"ct-sub"},K1={class:"ct-tabs"},q1=["onClick"],V1={key:0,class:"ct-n"},Y1={key:0,class:"ct-err"},Z1={key:1,class:"ct-load"},J1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"data-tables",setup(e){const t=Pe("profileConfig",ie(null)),o=K(()=>{var _;return((_=t.value)==null?void 0:_.isDark)===!0}),n=K(()=>Hs(t.value)),a=na("connectivity"),r=_=>(Number(_)||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=K(()=>s.find(_=>_.id===i.value)||s[0]),c=ie({}),u=ie(!1),p=ie(null);async function g(_){if(!c.value[_]){u.value=!0,p.value=null;try{const m=await fetch(`${n.value}/tables/${_}.json`);if(!m.ok)throw new Error(String(m.status));c.value={...c.value,[_]:await m.json()}}catch{const d=s.find(y=>y.file===_);p.value=lr(xt("messages.couldNotLoadNamed"),{name:d?a("tables.tabs."+d.id):_})}finally{u.value=!1}}}Be(l,_=>_&&g(_.file),{immediate:!0});const w=K(()=>{var _;return c.value[(_=l.value)==null?void 0:_.file]||null});return _t(":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"),(_,m)=>(E(),B("div",{class:ye(["ct",{"is-dark":o.value}])},[$("h2",U1,G(W(a)("connectivity.tables.title")),1),$("p",W1,G(W(a)("connectivity.tables.intro")),1),$("div",K1,[(E(),B(be,null,Xe(s,d=>$("button",{key:d.id,type:"button",class:ye(["ct-tab",{on:i.value===d.id}]),onClick:y=>i.value=d.id},[Oe(G(W(a)("connectivity.tables.tabs."+d.id)),1),c.value[d.file]?(E(),B("span",V1,G(r((c.value[d.file].rows||[]).length)),1)):ge("",!0)],10,q1)),64))]),p.value?(E(),B("div",Y1,G(p.value),1)):w.value?(E(),qe(H1,{key:l.value.id,table:w.value,"assets-base":n.value,"is-dark":o.value,height:"600px"},null,8,["table","assets-base","is-dark"])):(E(),B("div",Z1,G(W(a)("connectivity.tables.loading",{name:W(a)("connectivity.tables.tabs."+l.value.id)})),1))],2))}}},Symbol.toStringTag,{value:"Module"})),X1="pplrInstance";function Q1(){return Pe(X1,null)}const ev="",tv=["data-theme"],ov={class:"stl-inner"},nv={class:"stl-tb-caret-slot"},av=["title","aria-label","aria-expanded"],rv={class:"stl-tb-eyebrow"},sv=["title","aria-label"],iv=["title"],lv={key:2,class:"stl-tb-title"},cv={key:3,class:"stl-export"},uv=["aria-expanded","title","aria-label"],pv={class:"stl-export-label"},dv={class:"stl-export-menu",role:"menu"},gv={class:"stl-export-item-label"},mv={class:"stl-export-item-label"},hv=["aria-expanded"],fv={class:"stl-export-item-label"},_v=["aria-label"],bv={class:"stl-export-note"},$v={class:"stl-export-item-label"},yv={class:"stl-export-item-label"},vv={key:0,class:"stl-tabs-wrap"},wv={class:"stl-tabs"},kv=["onClick"],xv=["title","onClick"],Cv={key:0,class:"stl-info-pop"},Av={class:"stl-col-hdr"},Pv={class:"stl-hdr-name"},Sv=["title"],Lv={key:0,class:"stl-sort-arrow"},Tv=["title"],Nv={key:0,class:"stl-sort-arrow"},Ov=["data-stl-node-id","onClick"],Fv=["aria-expanded","aria-label","onClick"],Mv={key:1,class:"stl-caret-sp"},Ev={key:3,class:"stl-dot-sp"},Iv={class:"stl-name"},Rv={key:4,class:"stl-num"},Dv={key:5,class:"stl-num"},Bv={class:"stl-x-slot"},zv=["title","aria-label"],Gv={key:0,class:"stl-empty stl-loading"},jv={key:1,class:"stl-empty"},Hv={key:2,class:"stl-empty"},Uv={key:3,class:"stl-overflow"},Wv={class:"stl-overflow-hint"},Kv=["data-theme","title","aria-label"],qv={class:"stl-reopen-label"},Vv=bo({__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=(M,Y)=>xt(M)||Y,n=M=>String(M).split(".").pop().replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^./,Y=>Y.toUpperCase()),{t:a,te:r,locale:s}=Gs("",{fallback:M=>n(M)});function i(M){const Y="tabs."+((M==null?void 0:M.i18nKey)||(M==null?void 0:M.id));return M&&r(Y)?a(Y):(M==null?void 0:M.label)??""}function l(M){const Y="legend.tabInfo."+((M==null?void 0:M.i18nKey)||(M==null?void 0:M.id));return M&&r(Y)?a(Y):typeof(M==null?void 0:M.info)=="string"?M.info:""}const c=e,u=t,p=Q1(),g=Pe("legendProgress",null),w=K(()=>c.progress??W(g)??null),_=K(()=>w.value?a("legend.progress.title"):c.title),m=K(()=>((p==null?void 0:p.theme.value)||"dark")==="dark"),d=Pe("dataStore",null),y=Pe("normalizedPeopleGroups",null),b=M=>!!(M&&Cr(M)&&Fi(M)),v=K(()=>{var Y,_e;if(c.pinNote!==null)return c.pinNote;if((Y=y==null?void 0:y.value)!=null&&Y.length)return y.value.slice(0,20).some(b);const M=(d==null?void 0:d.sources)||{};for(const ve in M)if((((_e=M[ve])==null?void 0:_e.features)||[]).slice(0,20).some(b))return!0;return!1});function k(M,Y){var _e;for(const ve of M||[]){if((ve==null?void 0:ve.id)===Y)return ve;const Le=(_e=ve==null?void 0:ve.children)!=null&&_e.length?k(ve.children,Y):null;if(Le)return Le}return null}function x(M){const Y=k(U.value,M);Y&&D(Y)}function P(M,Y=0){return M!=null&&M.length?Math.max(...M.map(_e=>P(_e.children??[],Y+1))):Y}function T(M,Y,_e=0){return _e===Y?M.slice():M.flatMap(ve=>T(ve.children??[],Y,_e+1))}function I(M,Y,_e=[]){var ve;for(const Le of M){if(Le.id===Y)return _e;if((ve=Le.children)!=null&&ve.length){const tt=I(Le.children,Y,[..._e,Le]);if(tt)return tt}}return null}function O(M,Y=new Set){var _e;if(!((_e=M==null?void 0:M.children)!=null&&_e.length))return Y;for(const ve of M.children)Y.add(ve.id),O(ve,Y);return Y}function R(M,Y="root"){var ve;if(!Array.isArray(M))return[];const _e=[];for(const Le of M){if(!Le||typeof Le!="object"){try{console.warn("[SemanticTreeLegend] dropped null node under",Y)}catch{}continue}_e.push((ve=Le.children)!=null&&ve.length?{...Le,children:R(Le.children,Le.label||Le.id||Y)}:Le)}return _e}const U=K(()=>R(c.nodes)),j=K(()=>P(U.value)),q=K(()=>{const M=c.tabs??[],Y=M.length||j.value+1;return Array.from({length:Y},(_e,ve)=>M[ve]??{id:`gen${ve+1}`,label:`Generation ${ve+1}`})}),pe=ie(Math.max(0,c.defaultTab|0)),ee=ie(new Set),V=ie(null),se=ie(c.open!==null?c.open:!0),ne=ie(null),ae=ie(!1),H=ie(!1),{scrimRef:ce,scrimStyle:re}=vd(ae),fe=ie(null),xe=ie("desc"),Te=K({get:()=>{var M;return c.hideTabs?0:p&&!((M=p.activeTabTouched)!=null&&M.value)?Math.min(Math.max(0,c.defaultTab|0),Math.max(0,q.value.length-1)):p?p.activeTab.value:pe.value},set:M=>{c.hideTabs||(p?(p.activeTab.value=M,p.activeTabTouched&&(p.activeTabTouched.value=!0)):pe.value=M)}}),Ne=K({get:()=>p?p.selection.value:V.value,set:M=>{p?p.selection.value=M:V.value=M}}),ze=K(()=>{var M;return((M=Ne.value)==null?void 0:M.id)||null}),Qe=ie(null);Be(()=>c.open,M=>{M!==null&&(se.value=M)}),Be(()=>U.value,()=>{var tt,Ce;const M=((tt=Ne.value)==null?void 0:tt.id)||null;if(M){const bt=k(U.value,M);if(bt){Ne.value=bt;return}}const Y=p?(Ce=p.activeTabTouched)==null?void 0:Ce.value:!1,_e=Y?p==null?void 0:p.activeTab.value:void 0,ve=Math.min(Math.max(0,c.defaultTab|0),Math.max(0,q.value.length-1)),Le=typeof _e=="number"&&_e>=0?_e:ve;p?(p.activeTab.value=Le,!Y&&p.activeTabTouched&&(p.activeTabTouched.value=!1)):pe.value=Le,ee.value=new Set,Ne.value=null,u("select",null)},{deep:!1});let Ue=null;p&&Be(()=>p.selection.value,M=>{if((M==null?void 0:M.id)===Ue)return;if(!M){Ue=null;return}Ue=M.id;const Y=I(U.value,M.id)||[];typeof M.depth=="number"&&(Te.value=Math.min(M.depth,q.value.length-1));const _e=new Set;Y.forEach(ve=>_e.add(ve.id)),ee.value=_e,u("select",M)});function et(M,Y){const _e=(Y.pop??0)-(M.pop??0);return _e!==0?_e:(Y.count??0)-(M.count??0)}const Je=K(()=>{if(!fe.value)return et;const M=fe.value,Y=xe.value==="asc"?1:-1;return(_e,ve)=>((_e[M]??0)-(ve[M]??0))*Y});function A(M){fe.value===M?xe.value==="desc"?xe.value="asc":(fe.value=null,xe.value="desc"):(fe.value=M,xe.value="desc")}const F=ie([]),S=ie(!1);let J=-1;function te(M){if(F.value[M]){S.value=!1;return}S.value=!0,J=M,setTimeout(()=>{if(J!==M)return;const Y=[...T(U.value,M)].sort(Je.value),_e=[...F.value];_e[M]=Y,F.value=_e,S.value=!1},0)}Be(Te,M=>te(M),{immediate:!0}),Be(()=>[U.value,fe.value,xe.value],()=>{F.value=[],te(Te.value)},{deep:!1});const Q=K(()=>F.value[Te.value]||[]),de=K(()=>{var Y;const M=(Y=q.value[Te.value])==null?void 0:Y.topLimit;return M?Q.value.slice(0,M):Q.value}),le=K(()=>{var Y;const M=(Y=q.value[Te.value])==null?void 0:Y.topLimit;return M?Math.max(0,Q.value.length-M):0});function h(M,Y,_e,ve,Le){var tt;for(const Ce of Y)Ce&&(M.push({node:Ce,relDepth:_e,parent:ve,ancestors:Le}),ee.value.has(Ce.id)&&((tt=Ce.children)!=null&&tt.length)&&h(M,[...Ce.children].sort(Je.value),_e+1,Ce,[...Le,Ce]))}const f=K(()=>{const M=[];h(M,de.value,0,null,[]);for(let Y=0;YLe+1&&Ct.ancestors[Le]}if(Le===_e.relDepth-1){let bt=!1;for(let Ct=Y+1;Ctze.value!==null),X=K(()=>c.columns.includes("count")),L=K(()=>c.columns.includes("pop")),N=K(()=>Ne.value?O(Ne.value):new Set),C=K(()=>{var tt;const M=Ne.value;if(!M)return null;const Y=I(U.value,M.id);if(!Y||!Y.length)return null;const _e=Y[Y.length-1],ve=Y.length-1,Le=((tt=q.value[ve])==null?void 0:tt.label)||"Parent";return{node:_e,tabName:Le,depth:ve}});function D(M){ze.value===M.id?(Ue=null,Ne.value=null,u("select",null)):(Ue=M.id,Ne.value=M,u("select",M))}function Z(M,Y){Y==null||Y.stopPropagation();const _e=new Set(ee.value),ve=_e.has(M);if(ve?_e.delete(M):_e.add(M),ee.value=_e,ve&&Ne.value){const Le=I(U.value,Ne.value.id);Le&&Le.some(tt=>tt.id===M)&&(Ue=null,Ne.value=null,u("select",null))}}function oe(){const M=C.value;M!=null&&M.node&&(!c.hideTabs&&typeof M.depth=="number"&&(Te.value=M.depth),ee.value=new Set,D(M.node))}function ue(M){if(Te.value===M){ne.value=ne.value===M?null:M;return}Te.value=M,ee.value=new Set,Ue=null,Ne.value=null,ne.value=null,u("select",null)}function he(M){M==null||M.stopPropagation(),Ue=null,Ne.value=null,u("select",null)}function $e(M,Y){Y==null||Y.stopPropagation(),ne.value=ne.value===M?null:M}function ot(M){M==null||M.stopPropagation(),ae.value=!ae.value}function Pt(M){ae.value=!1,H.value=!1,u("export",M)}Be(ze,M=>{M||(ae.value=!1,H.value=!1)}),Be(ae,M=>{M||(H.value=!1)});function ut(M){let Y=M.parentElement;for(;Y;){const _e=getComputedStyle(Y).overflowY;if((_e==="auto"||_e==="scroll")&&Y.scrollHeight>Y.clientHeight+1){const ve=M.getBoundingClientRect(),Le=Y.getBoundingClientRect();Y.scrollTop+=ve.top-Le.top-8}Y=Y.parentElement}}let pt=0;Be(ze,async M=>{if(!M)return;const Y=++pt,_e=Qe.value;if(!_e)return;await Tt();const ve=(Le=0)=>{if(Y!==pt)return;const tt=_e.querySelector(`[data-stl-node-id="${CSS.escape(String(M))}"]`);tt&&ut(tt),Le<6&&setTimeout(()=>ve(Le+1),70)};ve(0)});function no(){const M=s&&(s.value??s);return typeof M=="string"&&M?M:void 0}function kn(M){return M?M>=1e3?new Intl.NumberFormat(no(),{notation:"compact",maximumFractionDigits:M>=1e6&&M<1e7?1:0}).format(M):M.toLocaleString(no()):"—"}function xn(M){return M!=null?M.toLocaleString(no()):"—"}function Iw(M){var Y;return{selected:ze.value===M.node.id,descendant:z.value&&N.value.has(M.node.id),child:M.relDepth>0,leaf:!((Y=M.node.children)!=null&&Y.length)}}return _t(` +`,"legend-component");const a=e;Pe("mapStore");const r=Pe("dataStore"),s=Pe("uiStore"),i=fl(a,"legendType"),{items:l,columns:c,title:u,activeFilter:p,setFilter:g,totalCount:w,totalPopulation:_,progress:m,fmtPop:d,fmtCount:y}=ld(i,$d),b=Pe("normalizedPeopleGroups",null),v=K(()=>{var V,se;if((V=b==null?void 0:b.value)!=null&&V.length)return b.value;const ee=[];for(const ne in r.sources){const ae=r.sources[ne];(se=ae==null?void 0:ae.features)!=null&&se.length&&ee.push(...ae.features)}return ee}),k=Pe("mapId",null),x=K(()=>s.isMobile),P=K(()=>s.legendMode),T=K(()=>s.selectedPeopleGroup),I=K(()=>Mi(v.value)),O=K(()=>T.value?bd(I.value,T.value):[]),R=ie(a.initiallyCollapsed);let U=null;const j=K(()=>{var ee;return P.value==="detail"&&T.value?((ee=T.value.properties)==null?void 0:ee.name)||n("legend.header.peopleGroupFallback"):R.value?n("legend.header.collapsed"):u.value});function q(){R.value=!R.value}Be(P,(ee,V)=>{ee==="detail"&&V!=="detail"&&R.value&&(R.value=!1)});function pe(ee){g(ee)}return Rt(()=>{window.innerWidth<768&&(R.value=!0),U=ee=>{var V;k&&((V=ee.detail)!=null&&V.mapId)&&ee.detail.mapId!==k||(R.value=!1)},window.addEventListener("dxm:openDesktopLegend",U)}),Nt(()=>{U&&window.removeEventListener("dxm:openDesktopLegend",U)}),(ee,V)=>x.value?(E(),qe(W(o),{key:0,legendType:e.legendType,popupAction:e.popupAction,isDark:e.isDark,disableCollapse:e.disableCollapse},null,8,["legendType","popupAction","isDark","disableCollapse"])):R.value?(E(),B("button",{key:1,class:ye(["legend-reopen",{"legend-reopen-light":!e.isDark}]),title:t("aria.expandLegend","Expand legend"),onClick:V[0]||(V[0]=se=>R.value=!1)},[V[2]||(V[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",M0,G(W(u)),1),V[3]||(V[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,F0)):(E(),B("div",{key:2,class:ye(["legend-container",{"legend-dark":e.isDark}])},[P.value==="detail"?(E(),B("span",E0,[Ee(fd,{open:!R.value,t:W(n),onToggle:q},null,8,["open","t"])])):ge("",!0),P.value==="detail"?(E(),B("button",{key:1,class:"detail-close-btn",onClick:V[1]||(V[1]=rt(se=>W(s).selectPeopleGroup(null),["stop"])),"aria-label":W(n)("aria.backToLegend")},[...V[4]||(V[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,I0)):ge("",!0),$("div",{class:ye(["legend-content",{"no-padding":W(c).length>0}])},[P.value==="detail"&&T.value?(E(),B(be,{key:0},[Ee(hd,{peopleGroup:T.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"]),Ee(xr,{shared:O.value,dark:e.isDark},null,8,["shared","dark"])],64)):e.legendType==="language-family"?(E(),B(be,{key:1},[],64)):(E(),qe(ud,{key:2,title:j.value,items:W(l),columns:W(c),activeFilter:W(p),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:W(w),totalPopulation:W(_),fmtPop:W(d),fmtCount:W(y),progress:W(m),onFilterClick:pe},{"title-caret":Et(()=>[Ee(fd,{open:!R.value,t:W(n),onToggle:q},null,8,["open","t"])]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount","progress"])),P.value!=="detail"?(E(),qe(xr,{key:3,dark:e.isDark},null,8,["dark"])):ge("",!0)],2)],2))}},[["styles",[O0]],["__scopeId","data-v-37990088"]]),D0={class:"gm-title"},B0=["aria-expanded"],z0={class:"gm-body"},G0={class:"gm-keys"},j0={key:0,class:"gm-key"},H0={class:"gm-caveat"},U0={key:0,class:"gm-adm1"},W0={class:"gm-adm1-h"},K0=["aria-label"],q0=["aria-pressed"],V0=["aria-pressed"],Y0={class:"gm-keys"},Z0={class:"gm-caveat"},J0={key:0,class:"gm-caveat"},X0={key:2,class:"gm-err"},Q0={key:3,class:"gm-wait",role:"status"},e1={key:4,class:"gm-pg-desktop"},t1={key:5,class:"gm-pg-mobile"},o1={key:6,class:"gm-sheet"},n1={class:"gm-sh-head"},a1={class:"gm-sh-name"},r1={class:"gm-list-h"},s1={class:"gm-adm1-t"},i1={class:"gm-note"},l1={key:7,class:"gm-sheet"},c1={class:"gm-sh-head"},u1={class:"gm-sh-name"},p1={key:0,class:"gm-ai"},d1=["aria-label"],g1={class:"gm-stat"},m1={class:"gm-stat"},h1={class:"gm-stat"},f1={class:"gm-stat"},_1={class:"gm-stat"},b1={key:1,class:"gm-list"},$1={class:"gm-list-h"},y1={key:2,class:"gm-list"},v1={class:"gm-list-h"},w1={class:"gm-note"},Ei="#1e293b",yd="ci.legendOpen",k1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"connectivity-map",setup(e){const t=Object.create(null);function o(L,N){try{window[L]=N,t[L]=N}catch{}}const n=js(()=>Cn(()=>Promise.resolve().then(()=>Cd),void 0)),a=Pe("profileConfig",ie(null)),r=K(()=>{var N;const L=(N=a.value)==null?void 0:N.edgeScrollAffordance;return L==null?!0:!(L===!1||L==="false")});let s=null;const i=K(()=>{var L;return((L=a.value)==null?void 0:L.isDark)===!0}),l=Pe("mapboxToken",null),c=K(()=>{var L;return((L=a.value)==null?void 0:L.tk)||(l==null?void 0:l.value)||typeof window<"u"&&window.MAP_TOKEN||""}),u=K(()=>Hs(a.value)),p=ie(null),g=Co(null),w=ie([]),_=ie(null),m=ie(!0),d=ie(null),y=ie(!0);function b(L){const N=p.value;if(N)try{N.dispatchEvent(new CustomEvent("dxmaps:mapinfo-pending",{bubbles:!0,composed:!0,detail:{pending:L}}))}catch{}}const v=()=>{!g.value&&!d.value&&b(!0)};Be(d,L=>{L&&b(!1)});const k=ie(null),x=ie(0);let P=null;function T(){const L=k.value;if(!L||!fe.value||xe.value)return;const N=L.offsetTop+L.offsetHeight;N>0&&(x.value=N+8)}function I(){try{P=new ResizeObserver(T),k.value&&P.observe(k.value)}catch{P=null}T()}const O=Co(null),R=ie("women"),U=ie(null),j=Pe("uiStore",null),q=(()=>{var N;const L=(N=Pe("lang",null))==null?void 0:N.value;return L&&L!=="en"?L:null})(),pe=()=>{if(q)return q;const L=a.value;if(L&&(L.locale||L.lang))return String(L.locale||L.lang);try{const N=new URLSearchParams(location.search);return N.get("lang")||N.get("locale")||document.documentElement.lang||"en"}catch{return"en"}},ee=new bp({locale:q,profileConfig:a}),V=Co([]),se=ie(0),ne=O$({getMap:()=>g.value,getActivePinColor:()=>Ei});async function ae(){await ee.init();const L=await ee.setActiveSource("pray-tools");V.value=xo(L||[])}function H(){const L=[];for(const N of V.value){const C=parseFloat(N.longitude??N.lng),D=parseFloat(N.latitude??N.lat);if(!isFinite(C)||!isFinite(D))continue;const Z=N._normalized||{};L.push({type:"Feature",properties:{uniqueId:N.uniqueId,slug:N.slug||"",name:N.name,language:N.language,languageFamily:N.languageFamily||Z.languageFamily||"",country:N.country,countryIso:N.countryIso,countryIsoLabel:N.countryIsoLabel,countryName:N.countryName,religion:N.religion,religionLabel:N.religionLabel,religionName:N.religionName,population:N.population,status:N.status,description:N.description||"",imageUrl:N.imageUrl||"",peoplePraying:Number(N.peoplePraying??Z.peoplePraying??0)},geometry:{type:"Point",coordinates:[C,D]}})}return{type:"FeatureCollection",features:L}}function ce(L){if(!V.value.length||L.getSource("language-families"))return;const N=H();if(se.value=N.features.length,L.addSource("language-families",{type:"geojson",data:N,promoteId:"uniqueId"}),N.features.length){let C=180,D=90,Z=-180,oe=-90;for(const he of N.features){const[$e,ot]=he.geometry.coordinates;$eZ&&(Z=$e),otoe&&(oe=ot)}const ue=Math.round(Math.min(L.getContainer().clientWidth,L.getContainer().clientHeight)*.06)+8;try{const he=L.cameraForBounds([[C,D],[Z,oe]],{padding:ue});if(L.fitBounds([[C,D],[Z,oe]],{padding:ue,duration:0}),he&&L.getZoom()>he.zoom+.05){const $e=L.getBounds(),ot=Math.min(360,$e.getEast()-$e.getWest());let Pt=L.getCenter().lng,ut=-1;for(let pt=-180;pt<180;pt+=5){let no=0;for(const kn of N.features){let xn=kn.geometry.coordinates[0]-pt;xn=(xn+540)%360-180,Math.abs(xn)<=ot/2&&no++}no>ut&&(ut=no,Pt=pt)}L.jumpTo({center:[Pt,(D+oe)/2]})}}catch{}}L.addLayer({id:"ci-pg-dots",type:"circle",source:"language-families",paint:{"circle-color":Ei,"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}}),L.on("click","ci-pg-dots",C=>{var Z;const D=(Z=C.features)==null?void 0:Z[0];!D||!j||(_.value=null,j.selectPeopleGroup(D))}),L.on("mouseenter","ci-pg-dots",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","ci-pg-dots",()=>{L.getCanvas().style.cursor=""}),typeof window<"u"&&(o("__ciState",()=>{var C,D;return{groups:V.value.length,dots:se.value,hasLayer:!!L.getLayer("ci-pg-dots"),rendered:L.queryRenderedFeatures({layers:["ci-pg-dots"]}).length,selected:((D=(C=j==null?void 0:j.selectedPeopleGroup)==null?void 0:C.properties)==null?void 0:D.slug)||null}}),o("__ciMap",L))}const re=na("connectivity"),fe=ie(!1),xe=ie(!0);function Te(L){var N;try{(N=window.sessionStorage)==null||N.setItem(yd,L?"1":"0")}catch{}}function Ne(){var L;try{const N=(L=window.sessionStorage)==null?void 0:L.getItem(yd);return N==null?null:N==="1"}catch{return null}}function ze(){xe.value=!xe.value,Te(xe.value)}function Qe(){const L=typeof window<"u"&&window.innerWidth<700;if(L===fe.value)return;fe.value=L;const N=Ne();xe.value=N??!L}typeof window<"u"&&(Qe(),window.addEventListener("resize",Qe));const Ue=[{id:"yes",color:"#10b981"},{id:"partial",color:"#e8c15a"},{id:"no",color:"#b42318"},{id:"unknown",color:"#9aa2ad"}],et=L=>(Ue.find(N=>N.id===L)||{}).color||"#9aa2ad",Je=K(()=>{const L={};for(const N of w.value)L[N.iso3]=N;return L});async function A(){const[L,N]=await Promise.all([fetch(`${u.value}/tables/internet-by-country.json`).then(C=>C.json()),fetch(`${u.value}/boundaries/world-adm0-web.geojson`).then(C=>C.json())]);return w.value=L.countries||[],N}function F(L,N){const C=Je.value,Z={type:"FeatureCollection",features:(N.features||[]).map(oe=>{var $e;const ue=($e=oe.properties)==null?void 0:$e.iso3,he=C[ue];return{type:"Feature",properties:{iso3:ue,band:(he==null?void 0:he.band)||"none",color:he?et(he.band):"rgba(0,0,0,0)",hasData:!!he},geometry:oe.geometry}})};if(L.getSource("ci-src")){L.getSource("ci-src").setData(Z);return}L.addSource("ci-src",{type:"geojson",data:Z}),L.addLayer({id:"ci-fill",type:"fill",source:"ci-src",paint:{"fill-color":["get","color"],"fill-opacity":["case",["get","hasData"],.72,0]}}),L.addLayer({id:"ci-line",type:"line",source:"ci-src",paint:{"line-color":"rgba(255,255,255,0.5)","line-width":.5}}),L.on("click","ci-fill",oe=>{var he,$e,ot;if(L.getLayer("ci-pg-dots")&&L.queryRenderedFeatures(oe.point,{layers:["ci-pg-dots"]}).length)return;const ue=(ot=($e=(he=oe.features)==null?void 0:he[0])==null?void 0:$e.properties)==null?void 0:ot.iso3;ue&&Je.value[ue]&&(j==null||j.selectPeopleGroup(null),U.value=null,_.value=Je.value[ue])}),L.on("mouseenter","ci-fill",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","ci-fill",()=>{L.getCanvas().style.cursor=""})}const S=[{from:0,color:"#deebf7"},{from:25,color:"#9ecae1"},{from:40,color:"#6baed6"},{from:55,color:"#3182bd"},{from:70,color:"#08519c"}],J=L=>["case",["==",["typeof",["get",L]],"number"],["step",["get",L],...S.flatMap((N,C)=>C===0?[N.color]:[N.from,N.color])],"rgba(0,0,0,0)"];async function te(){var D;const[L,N]=await Promise.all([fetch(`${u.value}/tables/internet-by-adm1.json`).then(Z=>{if(!Z.ok)throw new Error("internet-by-adm1 "+Z.status);return Z.json()}),fetch(`${u.value}/boundaries/gb-IND-ADM1-full-web.geojson`).then(Z=>{if(!Z.ok)throw new Error("gb-IND-ADM1-full "+Z.status);return Z.json()})]),C={};for(const Z of L.rows||[]){if(Z.iso3!=="IND"||Z.measure!=="ever_used_internet"||!Z.adm1)continue;const oe=C[D=Z.adm1]??(C[D]={name:Z.adm1_name||Z.adm1,women:{},men:{}});oe[Z.sex][Z.area]=Z.value}return O.value=xo({meta:L.meta||{},byArea:C}),N}function Q(L,N){const C=O.value.byArea,D={type:"FeatureCollection",features:(N.features||[]).map(oe=>{var he,$e;const ue=C[(he=oe.properties)==null?void 0:he.shapeName];return{type:"Feature",geometry:oe.geometry,properties:{adm1:($e=oe.properties)==null?void 0:$e.shapeName,women:(ue==null?void 0:ue.women.total)??null,men:(ue==null?void 0:ue.men.total)??null}}})},Z=L.getLayer("ci-pg-dots")?"ci-pg-dots":void 0;L.addSource("ci-adm1-src",{type:"geojson",data:D}),L.addLayer({id:"ci-adm1-fill",type:"fill",source:"ci-adm1-src",paint:{"fill-color":J(R.value),"fill-opacity":.85}},Z),L.addLayer({id:"ci-adm1-line",type:"line",source:"ci-adm1-src",paint:{"line-color":"rgba(255,255,255,0.8)","line-width":.6}},Z),L.getLayer("ci-fill")&&L.setFilter("ci-fill",["!=",["get","iso3"],"IND"]),L.on("click","ci-adm1-fill",oe=>{var $e,ot,Pt;if(L.getLayer("ci-pg-dots")&&L.queryRenderedFeatures(oe.point,{layers:["ci-pg-dots"]}).length)return;const ue=(Pt=(ot=($e=oe.features)==null?void 0:$e[0])==null?void 0:ot.properties)==null?void 0:Pt.adm1,he=ue&&C[ue];he&&(j==null||j.selectPeopleGroup(null),_.value=null,U.value={key:ue,...he})}),L.on("mouseenter","ci-adm1-fill",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","ci-adm1-fill",()=>{L.getCanvas().style.cursor=""})}function de(L){R.value=L;const N=g.value;N!=null&&N.getLayer("ci-adm1-fill")&&N.setPaintProperty("ci-adm1-fill","fill-color",J(L))}const le=K(()=>{var L,N,C,D;return ap(((D=(C=(N=(L=O.value)==null?void 0:L.meta)==null?void 0:N.boundaries)==null?void 0:C.IND)==null?void 0:D.missing)||[],{type:"conjunction"})}),h=d$(Pe("profileConfig",null));let f=!1;Rt(async()=>{var N;b(!0),window.addEventListener("dxmaps:mapinfo-host",v),I(),s=Ob(((N=p.value)==null?void 0:N.parentElement)||null,{enabled:r.value});try{await A$(h)}catch{}const L=Ks(h);if(!f){if(!L){const C=h==="maplibre"?"MapLibre":"Mapbox";console.warn(`[connectivity-map] the ${C} engine did not load; refusing to substitute another engine.`),d.value=lr(xt("messages.engineMissing"),{engine:C});return}if(!p.value){d.value=xt("messages.engineNotLoaded");return}$$(L);try{const C=ae().catch(he=>{console.warn("[connectivity-map] people groups:",(he==null?void 0:he.message)||he)}),D=te().catch(he=>(console.warn("[connectivity-map] India by state:",(he==null?void 0:he.message)||he),null)),Z=await A();if(f||!p.value)return;const oe=C$(h);if(oe&&await P$(p.value,oe),f||!p.value)return;const ue=new L.Map({container:p.value,style:_$(i.value?"ink":"paper",h).style||(i.value?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11"),accessToken:c.value,locale:x$(pe(),h),center:[42,18],zoom:1.3,projection:"mercator",attributionControl:!1});g.value=xo(ue),Pb(ue,{boundaries:!0}),ue.once("load",async()=>{try{w$(ue,pe())}catch{}F(ue,Z),ne.initialize(),await C,ce(ue);const he=await D;he&&!f&&Q(ue,he),y.value=!1})}catch(C){d.value=String(C.message||C),y.value=!1}}}),Nt(()=>{var L;typeof window<"u"&&window.removeEventListener("dxmaps:mapinfo-host",v);try{P==null||P.disconnect()}catch{}try{s==null||s()}catch{}s=null,g.value||b(!1),typeof window<"u"&&window.removeEventListener("resize",Qe);try{window.__ciState===t.__ciState&&delete window.__ciState}catch{}try{window.__ciMap===t.__ciMap&&delete window.__ciMap}catch{}f=!0,ne.cleanup(),j==null||j.selectPeopleGroup(null);try{(L=g.value)==null||L.remove()}catch{}});const z=L=>(Number(L)||0).toLocaleString(),X=K(()=>!!(j!=null&&j.selectedPeopleGroup));return _t(":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)}}.map-scroll-edge{position:absolute;top:0;bottom:0;width:40px;z-index:1;touch-action:pan-y;pointer-events:auto;background:transparent}.map-scroll-edge--left{left:0}.map-scroll-edge--right{right:0}.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"),(L,N)=>(E(),B("div",{class:ye(["gm",{"is-dark":i.value}]),style:Ge(fe.value&&x.value?{"--gm-toolbar-top":x.value+"px"}:null)},[$("div",{ref_key:"mapEl",ref:p,class:"gm-map"},null,512),r.value?(E(),B(be,{key:0},[N[5]||(N[5]=$("div",{class:"map-scroll-edge map-scroll-edge--left"},null,-1)),N[6]||(N[6]=$("div",{class:"map-scroll-edge map-scroll-edge--right"},null,-1))],64)):ge("",!0),g.value?(E(),qe(Sb,{key:1},{default:Et(()=>[Ee(Tb,{"is-dark":i.value},null,8,["is-dark"]),Ee(Fb,{map:g.value,"is-dark":i.value},null,8,["map","is-dark"]),Ee(Mb,{map:g.value,"is-dark":i.value},null,8,["map","is-dark"]),Ee(Eb,{map:g.value,"is-dark":i.value},null,8,["map","is-dark"]),Ee(Db,{"map-container":p.value,"is-dark":i.value},null,8,["map-container","is-dark"]),Ee(c$,{"is-dark":i.value,"embed-path":"cities-internet/connectivity-map/index.html"},null,8,["is-dark"])]),_:1})):ge("",!0),Ta($("div",{ref_key:"legendEl",ref:k,class:"gm-legend"},[$("div",D0,G(W(re)("connectivity.title")),1),fe.value?(E(),B("button",{key:0,type:"button",class:"gm-fold",onClick:ze,"aria-expanded":xe.value?"true":"false"},G(xe.value?W(re)("aria.collapseLegend"):W(re)("aria.expandLegend")),9,B0)):ge("",!0),Ta($("div",z0,[$("div",G0,[(E(),B(be,null,Xe(Ue,C=>$("span",{key:C.id,class:"gm-key"},[$("i",{class:"gm-sw",style:Ge({background:C.color})},null,4),Oe(G(W(re)("connectivity.bands."+C.id)),1)])),64)),V.value.length?(E(),B("span",j0,[$("i",{class:"gm-dot",style:Ge({background:Ei})},null,4),Oe(G(W(re)("connectivity.peopleGroup"))+" ("+G(z(V.value.length))+") ",1)])):ge("",!0)]),$("div",H0,G(W(re)("connectivity.caveat")),1),O.value?(E(),B("div",U0,[$("div",W0,G(W(re)("connectivity.adm1.title")),1),$("div",{class:"gm-seg",role:"group","aria-label":W(re)("connectivity.adm1.title")},[$("button",{type:"button",class:ye({on:R.value==="women"}),"aria-pressed":R.value==="women",onClick:N[0]||(N[0]=C=>de("women"))},G(W(re)("connectivity.adm1.women")),11,q0),$("button",{type:"button",class:ye({on:R.value==="men"}),"aria-pressed":R.value==="men",onClick:N[1]||(N[1]=C=>de("men"))},G(W(re)("connectivity.adm1.men")),11,V0)],8,K0),$("div",Y0,[(E(),B(be,null,Xe(S,(C,D)=>$("span",{key:C.from,class:"gm-key"},[$("i",{class:"gm-sw",style:Ge({background:C.color})},null,4),Oe(G(D+1U.value=null)},G(W(re)("connectivity.sheet.close")),1)]),$("div",r1,G(W(re)("connectivity.adm1.title")),1),$("table",s1,[$("thead",null,[$("tr",null,[N[7]||(N[7]=$("th",null,null,-1)),$("th",null,G(W(re)("connectivity.adm1.total")),1),$("th",null,G(W(re)("connectivity.adm1.urban")),1),$("th",null,G(W(re)("connectivity.adm1.rural")),1)])]),$("tbody",null,[(E(),B(be,null,Xe(["women","men"],C=>$("tr",{key:C},[$("th",null,G(W(re)("connectivity.adm1."+C)),1),(E(),B(be,null,Xe(["total","urban","rural"],D=>$("td",{key:D},G(U.value[C][D]!=null?U.value[C][D]+"%":"—"),1)),64))])),64))])]),$("p",i1,G(W(re)("connectivity.adm1.source")),1)])):ge("",!0),_.value?(E(),B("div",l1,[$("div",c1,[$("span",u1,G(_.value.country),1),$("button",{type:"button",class:"gm-x",onClick:N[3]||(N[3]=C=>_.value=null)},G(W(re)("connectivity.sheet.close")),1)]),m.value?(E(),B("div",p1,[$("span",null,G(W(re)("connectivity.sheet.ai")),1),$("button",{type:"button",class:"gm-ai-x",onClick:N[4]||(N[4]=C=>m.value=!1),"aria-label":W(re)("connectivity.sheet.dismiss")},"×",8,d1)])):ge("",!0),$("div",g1,[$("span",null,G(W(re)("connectivity.sheet.internetUsers")),1),$("b",null,G(_.value.internet_pct!=null?_.value.internet_pct+"%":W(re)("connectivity.sheet.unknown")),1)]),$("div",m1,[$("span",null,G(W(re)("connectivity.sheet.measured")),1),$("b",null,G(_.value.internet_year||"—"),1)]),$("div",h1,[$("span",null,G(W(re)("connectivity.sheet.mobilePer100")),1),$("b",null,G(_.value.mobile_per_100??"—"),1)]),$("div",f1,[$("span",null,G(W(re)("connectivity.sheet.peopleGroups")),1),$("b",null,G(z(_.value.people_groups)),1)]),$("div",_1,[$("span",null,G(W(re)("connectivity.sheet.topPlatform")),1),$("b",null,[Oe(G(_.value.top_platform||W(re)("connectivity.sheet.unknown")),1),_.value.top_platform_pct?(E(),B(be,{key:0},[Oe(" · "+G(_.value.top_platform_pct)+"%",1)],64)):ge("",!0)])]),_.value.carriers&&_.value.carriers.length?(E(),B("div",b1,[$("div",$1,G(W(re)("connectivity.sheet.carriers",{n:_.value.carrier_count})),1),$("ul",null,[(E(!0),B(be,null,Xe(_.value.carriers,(C,D)=>(E(),B("li",{key:D},G(C),1))),128))])])):ge("",!0),_.value.platforms&&_.value.platforms.length?(E(),B("div",y1,[$("div",v1,G(W(re)("connectivity.sheet.socialPlatforms")),1),$("ul",null,[(E(!0),B(be,null,Xe(_.value.platforms,(C,D)=>(E(),B("li",{key:D},G(C.name)+" · "+G(C.pct)+"%",1))),128))])])):ge("",!0),$("p",w1,G(W(re)("connectivity.sheet.note")),1)])):ge("",!0)],6))}}},Symbol.toStringTag,{value:"Module"}));function x1(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 vd(e){const t=ie(null),o=Co({position:"fixed",inset:"0"}),n=()=>{var u,p;const r=t.value;if(!r)return;const s=x1(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"}};Be(e,r=>{r&&requestAnimationFrame(()=>{n(),requestAnimationFrame(n)})},{flush:"post"});const a=()=>{e.value&&n()};return typeof window<"u"&&window.addEventListener("resize",a),Nt(()=>{typeof window<"u"&&window.removeEventListener("resize",a)}),{scrimRef:t,scrimStyle:o}}const C1={class:"dt-head"},A1={class:"dt-title"},P1={class:"dt-count"},S1={key:0,class:"dt-grain"},L1={class:"dt-actions"},T1={key:0,class:"dt-err"},N1={class:"dt-wrap"},O1={class:"dt-hint"},F1={key:0,dir:"ltr"},M1=["aria-label"],E1={class:"dt-sheet-head"},I1={class:"dt-dl"},R1=["href"],D1={key:1},B1={key:2},z1={key:2,class:"dt-caveats"},G1={dir:"ltr"},j1={class:"dt-cav-k"},H1={__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=(R,U)=>xt(R)||U,n=e,a=t,r=ie(!1),s=ie(null),{scrimRef:i,scrimStyle:l}=vd(s),c=ie(null),u=Co(null),p=ie(null),g=ie(!1),w=K(()=>String(n.assetsBase||"./assets").replace(/\/+$/,"")),_=K(()=>{var R;return((R=n.table)==null?void 0:R.meta)||{}}),m=K(()=>{var R;return(((R=n.table)==null?void 0:R.rows)||[]).length}),d=K(()=>Object.entries(_.value).filter(([R,U])=>typeof U=="string"&&/caveat|meaning|note|boundary|measures|does_not/i.test(R)).map(([R,U])=>({key:R.replace(/_/g," "),text:U})));let y=null;function b(){return window.Tabulator?Promise.resolve(window.Tabulator):y||(y=new Promise((R,U)=>{const j=document.createElement("script");j.src=`${w.value}/vendor/tabulator/tabulator.min.js`,j.onload=()=>R(window.Tabulator),j.onerror=()=>U(new Error("Tabulator failed to load — is public/assets/vendor/tabulator/ present?")),document.head.appendChild(j)}),y)}async function v(R){if(!(!R||R.querySelector("style[data-tabulator]")))try{const U=await fetch(`${w.value}/vendor/tabulator/tabulator.min.css`);if(!U.ok)return;const j=document.createElement("style");j.setAttribute("data-tabulator",""),j.textContent=await U.text(),R.appendChild(j)}catch{}}function k(R){var pe,ee;if(!c.value)return;r.value=typeof window<"u"&&window.innerWidth<700;const U=((pe=n.table)==null?void 0:pe.columns)||[],q=(r.value?U.slice(0,3):U).map((V,se)=>({title:V.title,field:V.field,headerFilter:V.type==="boolean"?"tickCross":"input",headerFilterPlaceholder:"filter…",sorter:V.type==="number"?"number":V.type==="boolean"?"boolean":"string",formatter:V.type==="boolean"?"tickCross":void 0,.../_url$/.test(V.field)?{formatter:"link",formatterParams:{target:"_blank",label:()=>"open"}}:{},frozen:!r.value&&se{s.value=se.getData(),a("row-click",se.getData())}),u.value.on("tableBuilt",()=>{g.value=!0})}const x=R=>{var U,j;return((j=(((U=n.table)==null?void 0:U.columns)||[]).find(q=>q.field===R))==null?void 0:j.title)||R.replace(/_/g," ")},P=R=>typeof R=="string"&&R.includes(", ")&&R.length>40?R.split(", "):null,T=R=>typeof R=="string"&&/^https?:\/\//.test(R),I=K(()=>s.value?Object.entries(s.value).filter(([,R])=>R!==""&&R!==null&&R!==void 0):[]);function O(R){var U;try{(U=u.value)==null||U.download(R,`${(_.value.title||"table").replace(/\W+/g,"-").toLowerCase()}.${R}`)}catch(j){p.value=String(j.message||j)}}return Rt(async()=>{var R,U;try{await v((U=(R=c.value)==null?void 0:R.getRootNode)==null?void 0:U.call(R)),k(await b())}catch(j){p.value=String(j.message||j)}}),Nt(()=>{var R;try{(R=u.value)==null||R.destroy()}catch{}}),Be(()=>n.table,()=>{var R,U;try{(U=u.value)==null||U.replaceData(((R=n.table)==null?void 0:R.rows)||[])}catch{}}),_t(".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"),(R,U)=>{var j,q;return E(),B("div",{class:ye(["dt",{"is-dark":e.isDark}])},[$("div",C1,[$("h3",A1,G(_.value.title||"Data"),1),$("span",P1,G(m.value.toLocaleString())+" rows",1),_.value.grain?(E(),B("span",S1,"· "+G(_.value.grain),1)):ge("",!0),$("span",L1,[$("button",{type:"button",class:"dt-btn",onClick:U[0]||(U[0]=pe=>O("csv"))},G(o("tables.csv","CSV")),1),$("button",{type:"button",class:"dt-btn",onClick:U[1]||(U[1]=pe=>O("json"))},G(o("tables.json","JSON")),1)])]),p.value?(E(),B("div",T1,G(p.value),1)):ge("",!0),$("div",N1,[$("div",{ref_key:"host",ref:c},null,512)]),$("p",O1,[Oe(G(o("tables.tap_row_hint","Tap any row for its full detail")),1),r.value?(E(),B(be,{key:1},[Oe(".")],64)):(E(),B("bdi",F1," — every field, including the lists the table flattens."))]),s.value?(E(),B("div",{key:1,ref_key:"scrimRef",ref:i,style:Ge(W(l)),class:"dt-scrim",onClick:U[3]||(U[3]=rt(pe=>s.value=null,["self"]))},[$("div",{class:"dt-sheet",role:"dialog","aria-label":o("aria.rowDetail","Row detail")},[$("div",E1,[$("strong",null,G(s.value[(q=(((j=e.table)==null?void 0:j.columns)||[])[0])==null?void 0:q.field]||o("aria.rowDetail","Row detail")),1),$("button",{type:"button",class:"dt-close",onClick:U[2]||(U[2]=pe=>s.value=null)},G(o("buttons.close","Close")),1)]),$("dl",I1,[(E(!0),B(be,null,Xe(I.value,([pe,ee])=>(E(),B(be,{key:pe},[$("dt",null,G(x(pe)),1),$("dd",null,[T(ee)?(E(),B("a",{key:0,href:ee,target:"_blank",rel:"noopener"},G(ee),9,R1)):P(ee)?(E(),B("ul",D1,[(E(!0),B(be,null,Xe(P(ee),(V,se)=>(E(),B("li",{key:se},G(V),1))),128))])):(E(),B("span",B1,G(ee===!0?"yes":ee===!1?"no":ee),1))])],64))),128))])],8,M1)],4)):ge("",!0),d.value.length?(E(),B("div",z1,[(E(!0),B(be,null,Xe(d.value,pe=>(E(),B("div",{key:pe.key},[$("bdi",G1,[$("span",j1,G(pe.key)+":",1),Oe(" "+G(pe.text),1)])]))),128))])):ge("",!0)],2)}}},U1={class:"ct-h"},W1={class:"ct-sub"},K1={class:"ct-tabs"},q1=["onClick"],V1={key:0,class:"ct-n"},Y1={key:0,class:"ct-err"},Z1={key:1,class:"ct-load"},J1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"data-tables",setup(e){const t=Pe("profileConfig",ie(null)),o=K(()=>{var _;return((_=t.value)==null?void 0:_.isDark)===!0}),n=K(()=>Hs(t.value)),a=na("connectivity"),r=_=>(Number(_)||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=K(()=>s.find(_=>_.id===i.value)||s[0]),c=ie({}),u=ie(!1),p=ie(null);async function g(_){if(!c.value[_]){u.value=!0,p.value=null;try{const m=await fetch(`${n.value}/tables/${_}.json`);if(!m.ok)throw new Error(String(m.status));c.value={...c.value,[_]:await m.json()}}catch{const d=s.find(y=>y.file===_);p.value=lr(xt("messages.couldNotLoadNamed"),{name:d?a("tables.tabs."+d.id):_})}finally{u.value=!1}}}Be(l,_=>_&&g(_.file),{immediate:!0});const w=K(()=>{var _;return c.value[(_=l.value)==null?void 0:_.file]||null});return _t(":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"),(_,m)=>(E(),B("div",{class:ye(["ct",{"is-dark":o.value}])},[$("h2",U1,G(W(a)("connectivity.tables.title")),1),$("p",W1,G(W(a)("connectivity.tables.intro")),1),$("div",K1,[(E(),B(be,null,Xe(s,d=>$("button",{key:d.id,type:"button",class:ye(["ct-tab",{on:i.value===d.id}]),onClick:y=>i.value=d.id},[Oe(G(W(a)("connectivity.tables.tabs."+d.id)),1),c.value[d.file]?(E(),B("span",V1,G(r((c.value[d.file].rows||[]).length)),1)):ge("",!0)],10,q1)),64))]),p.value?(E(),B("div",Y1,G(p.value),1)):w.value?(E(),qe(H1,{key:l.value.id,table:w.value,"assets-base":n.value,"is-dark":o.value,height:"600px"},null,8,["table","assets-base","is-dark"])):(E(),B("div",Z1,G(W(a)("connectivity.tables.loading",{name:W(a)("connectivity.tables.tabs."+l.value.id)})),1))],2))}}},Symbol.toStringTag,{value:"Module"})),X1="pplrInstance";function Q1(){return Pe(X1,null)}const ev="",tv=["data-theme"],ov={class:"stl-inner"},nv={class:"stl-tb-caret-slot"},av=["title","aria-label","aria-expanded"],rv={class:"stl-tb-eyebrow"},sv=["title","aria-label"],iv=["title"],lv={key:2,class:"stl-tb-title"},cv={key:3,class:"stl-export"},uv=["aria-expanded","title","aria-label"],pv={class:"stl-export-label"},dv={class:"stl-export-menu",role:"menu"},gv={class:"stl-export-item-label"},mv={class:"stl-export-item-label"},hv=["aria-expanded"],fv={class:"stl-export-item-label"},_v=["aria-label"],bv={class:"stl-export-note"},$v={class:"stl-export-item-label"},yv={class:"stl-export-item-label"},vv={key:0,class:"stl-tabs-wrap"},wv={class:"stl-tabs"},kv=["onClick"],xv=["title","onClick"],Cv={key:0,class:"stl-info-pop"},Av={class:"stl-col-hdr"},Pv={class:"stl-hdr-name"},Sv=["title"],Lv={key:0,class:"stl-sort-arrow"},Tv=["title"],Nv={key:0,class:"stl-sort-arrow"},Ov=["data-stl-node-id","onClick"],Fv=["aria-expanded","aria-label","onClick"],Mv={key:1,class:"stl-caret-sp"},Ev={key:3,class:"stl-dot-sp"},Iv={class:"stl-name"},Rv={key:4,class:"stl-num"},Dv={key:5,class:"stl-num"},Bv={class:"stl-x-slot"},zv=["title","aria-label"],Gv={key:0,class:"stl-empty stl-loading"},jv={key:1,class:"stl-empty"},Hv={key:2,class:"stl-empty"},Uv={key:3,class:"stl-overflow"},Wv={class:"stl-overflow-hint"},Kv=["data-theme","title","aria-label"],qv={class:"stl-reopen-label"},Vv=bo({__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=(M,Y)=>xt(M)||Y,n=M=>String(M).split(".").pop().replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^./,Y=>Y.toUpperCase()),{t:a,te:r,locale:s}=Gs("",{fallback:M=>n(M)});function i(M){const Y="tabs."+((M==null?void 0:M.i18nKey)||(M==null?void 0:M.id));return M&&r(Y)?a(Y):(M==null?void 0:M.label)??""}function l(M){const Y="legend.tabInfo."+((M==null?void 0:M.i18nKey)||(M==null?void 0:M.id));return M&&r(Y)?a(Y):typeof(M==null?void 0:M.info)=="string"?M.info:""}const c=e,u=t,p=Q1(),g=Pe("legendProgress",null),w=K(()=>c.progress??W(g)??null),_=K(()=>w.value?a("legend.progress.title"):c.title),m=K(()=>((p==null?void 0:p.theme.value)||"dark")==="dark"),d=Pe("dataStore",null),y=Pe("normalizedPeopleGroups",null),b=M=>!!(M&&Cr(M)&&Fi(M)),v=K(()=>{var Y,_e;if(c.pinNote!==null)return c.pinNote;if((Y=y==null?void 0:y.value)!=null&&Y.length)return y.value.slice(0,20).some(b);const M=(d==null?void 0:d.sources)||{};for(const ve in M)if((((_e=M[ve])==null?void 0:_e.features)||[]).slice(0,20).some(b))return!0;return!1});function k(M,Y){var _e;for(const ve of M||[]){if((ve==null?void 0:ve.id)===Y)return ve;const Le=(_e=ve==null?void 0:ve.children)!=null&&_e.length?k(ve.children,Y):null;if(Le)return Le}return null}function x(M){const Y=k(U.value,M);Y&&D(Y)}function P(M,Y=0){return M!=null&&M.length?Math.max(...M.map(_e=>P(_e.children??[],Y+1))):Y}function T(M,Y,_e=0){return _e===Y?M.slice():M.flatMap(ve=>T(ve.children??[],Y,_e+1))}function I(M,Y,_e=[]){var ve;for(const Le of M){if(Le.id===Y)return _e;if((ve=Le.children)!=null&&ve.length){const tt=I(Le.children,Y,[..._e,Le]);if(tt)return tt}}return null}function O(M,Y=new Set){var _e;if(!((_e=M==null?void 0:M.children)!=null&&_e.length))return Y;for(const ve of M.children)Y.add(ve.id),O(ve,Y);return Y}function R(M,Y="root"){var ve;if(!Array.isArray(M))return[];const _e=[];for(const Le of M){if(!Le||typeof Le!="object"){try{console.warn("[SemanticTreeLegend] dropped null node under",Y)}catch{}continue}_e.push((ve=Le.children)!=null&&ve.length?{...Le,children:R(Le.children,Le.label||Le.id||Y)}:Le)}return _e}const U=K(()=>R(c.nodes)),j=K(()=>P(U.value)),q=K(()=>{const M=c.tabs??[],Y=M.length||j.value+1;return Array.from({length:Y},(_e,ve)=>M[ve]??{id:`gen${ve+1}`,label:`Generation ${ve+1}`})}),pe=ie(Math.max(0,c.defaultTab|0)),ee=ie(new Set),V=ie(null),se=ie(c.open!==null?c.open:!0),ne=ie(null),ae=ie(!1),H=ie(!1),{scrimRef:ce,scrimStyle:re}=vd(ae),fe=ie(null),xe=ie("desc"),Te=K({get:()=>{var M;return c.hideTabs?0:p&&!((M=p.activeTabTouched)!=null&&M.value)?Math.min(Math.max(0,c.defaultTab|0),Math.max(0,q.value.length-1)):p?p.activeTab.value:pe.value},set:M=>{c.hideTabs||(p?(p.activeTab.value=M,p.activeTabTouched&&(p.activeTabTouched.value=!0)):pe.value=M)}}),Ne=K({get:()=>p?p.selection.value:V.value,set:M=>{p?p.selection.value=M:V.value=M}}),ze=K(()=>{var M;return((M=Ne.value)==null?void 0:M.id)||null}),Qe=ie(null);Be(()=>c.open,M=>{M!==null&&(se.value=M)}),Be(()=>U.value,()=>{var tt,Ce;const M=((tt=Ne.value)==null?void 0:tt.id)||null;if(M){const bt=k(U.value,M);if(bt){Ne.value=bt;return}}const Y=p?(Ce=p.activeTabTouched)==null?void 0:Ce.value:!1,_e=Y?p==null?void 0:p.activeTab.value:void 0,ve=Math.min(Math.max(0,c.defaultTab|0),Math.max(0,q.value.length-1)),Le=typeof _e=="number"&&_e>=0?_e:ve;p?(p.activeTab.value=Le,!Y&&p.activeTabTouched&&(p.activeTabTouched.value=!1)):pe.value=Le,ee.value=new Set,Ne.value=null,u("select",null)},{deep:!1});let Ue=null;p&&Be(()=>p.selection.value,M=>{if((M==null?void 0:M.id)===Ue)return;if(!M){Ue=null;return}Ue=M.id;const Y=I(U.value,M.id)||[];typeof M.depth=="number"&&(Te.value=Math.min(M.depth,q.value.length-1));const _e=new Set;Y.forEach(ve=>_e.add(ve.id)),ee.value=_e,u("select",M)});function et(M,Y){const _e=(Y.pop??0)-(M.pop??0);return _e!==0?_e:(Y.count??0)-(M.count??0)}const Je=K(()=>{if(!fe.value)return et;const M=fe.value,Y=xe.value==="asc"?1:-1;return(_e,ve)=>((_e[M]??0)-(ve[M]??0))*Y});function A(M){fe.value===M?xe.value==="desc"?xe.value="asc":(fe.value=null,xe.value="desc"):(fe.value=M,xe.value="desc")}const F=ie([]),S=ie(!1);let J=-1;function te(M){if(F.value[M]){S.value=!1;return}S.value=!0,J=M,setTimeout(()=>{if(J!==M)return;const Y=[...T(U.value,M)].sort(Je.value),_e=[...F.value];_e[M]=Y,F.value=_e,S.value=!1},0)}Be(Te,M=>te(M),{immediate:!0}),Be(()=>[U.value,fe.value,xe.value],()=>{F.value=[],te(Te.value)},{deep:!1});const Q=K(()=>F.value[Te.value]||[]),de=K(()=>{var Y;const M=(Y=q.value[Te.value])==null?void 0:Y.topLimit;return M?Q.value.slice(0,M):Q.value}),le=K(()=>{var Y;const M=(Y=q.value[Te.value])==null?void 0:Y.topLimit;return M?Math.max(0,Q.value.length-M):0});function h(M,Y,_e,ve,Le){var tt;for(const Ce of Y)Ce&&(M.push({node:Ce,relDepth:_e,parent:ve,ancestors:Le}),ee.value.has(Ce.id)&&((tt=Ce.children)!=null&&tt.length)&&h(M,[...Ce.children].sort(Je.value),_e+1,Ce,[...Le,Ce]))}const f=K(()=>{const M=[];h(M,de.value,0,null,[]);for(let Y=0;YLe+1&&Ct.ancestors[Le]}if(Le===_e.relDepth-1){let bt=!1;for(let Ct=Y+1;Ctze.value!==null),X=K(()=>c.columns.includes("count")),L=K(()=>c.columns.includes("pop")),N=K(()=>Ne.value?O(Ne.value):new Set),C=K(()=>{var tt;const M=Ne.value;if(!M)return null;const Y=I(U.value,M.id);if(!Y||!Y.length)return null;const _e=Y[Y.length-1],ve=Y.length-1,Le=((tt=q.value[ve])==null?void 0:tt.label)||"Parent";return{node:_e,tabName:Le,depth:ve}});function D(M){ze.value===M.id?(Ue=null,Ne.value=null,u("select",null)):(Ue=M.id,Ne.value=M,u("select",M))}function Z(M,Y){Y==null||Y.stopPropagation();const _e=new Set(ee.value),ve=_e.has(M);if(ve?_e.delete(M):_e.add(M),ee.value=_e,ve&&Ne.value){const Le=I(U.value,Ne.value.id);Le&&Le.some(tt=>tt.id===M)&&(Ue=null,Ne.value=null,u("select",null))}}function oe(){const M=C.value;M!=null&&M.node&&(!c.hideTabs&&typeof M.depth=="number"&&(Te.value=M.depth),ee.value=new Set,D(M.node))}function ue(M){if(Te.value===M){ne.value=ne.value===M?null:M;return}Te.value=M,ee.value=new Set,Ue=null,Ne.value=null,ne.value=null,u("select",null)}function he(M){M==null||M.stopPropagation(),Ue=null,Ne.value=null,u("select",null)}function $e(M,Y){Y==null||Y.stopPropagation(),ne.value=ne.value===M?null:M}function ot(M){M==null||M.stopPropagation(),ae.value=!ae.value}function Pt(M){ae.value=!1,H.value=!1,u("export",M)}Be(ze,M=>{M||(ae.value=!1,H.value=!1)}),Be(ae,M=>{M||(H.value=!1)});function ut(M){let Y=M.parentElement;for(;Y;){const _e=getComputedStyle(Y).overflowY;if((_e==="auto"||_e==="scroll")&&Y.scrollHeight>Y.clientHeight+1){const ve=M.getBoundingClientRect(),Le=Y.getBoundingClientRect();Y.scrollTop+=ve.top-Le.top-8}Y=Y.parentElement}}let pt=0;Be(ze,async M=>{if(!M)return;const Y=++pt,_e=Qe.value;if(!_e)return;await Tt();const ve=(Le=0)=>{if(Y!==pt)return;const tt=_e.querySelector(`[data-stl-node-id="${CSS.escape(String(M))}"]`);tt&&ut(tt),Le<6&&setTimeout(()=>ve(Le+1),70)};ve(0)});function no(){const M=s&&(s.value??s);return typeof M=="string"&&M?M:void 0}function kn(M){return M?M>=1e3?new Intl.NumberFormat(no(),{notation:"compact",maximumFractionDigits:M>=1e6&&M<1e7?1:0}).format(M):M.toLocaleString(no()):"—"}function xn(M){return M!=null?M.toLocaleString(no()):"—"}function Iw(M){var Y;return{selected:ze.value===M.node.id,descendant:z.value&&N.value.has(M.node.id),child:M.relDepth>0,leaf:!((Y=M.node.children)!=null&&Y.length)}}return _t(` .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 13f55c066..b549c8d17 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-p5axeJF5QjIgs123T3GuHKWpXDQvu1A1aaejwEl9ICOEkYZawbCTKFG3WoccJMSr", + "integrity": "sha384-pYGNpceO01Z7hoGNelNWOyr7QgSXo/hA0IR3MHpJBXnXmtRLChgbb6RWb6FjFfZq", "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 88b537179..55549f04b 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-p5axeJF5QjIgs123T3GuHKWpXDQvu1A1aaejwEl9ICOEkYZawbCTKFG3WoccJMSr", + "integrity": "sha384-pYGNpceO01Z7hoGNelNWOyr7QgSXo/hA0IR3MHpJBXnXmtRLChgbb6RWb6FjFfZq", "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" } } ]