1"use strict";(self.webpackChunkworld_vision=self.webpackChunkworld_vision||[]).push([[151],{96829(e,t,r){r.d(t,{G7:()=>l,e:()=>c,iP:()=>a,j2:()=>s});var n=r(5350),o=r(96448);const a="rgba(255, 107, 0, 0.4)",s="rgba(255, 107, 0, 1)",c=1;function l(){return new n.default({url:"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Countries/FeatureServer",outFields:["ISO_CC","COUNTRY","FID"],objectIdField:"FID",renderer:{type:"simple",symbol:new o.A({color:a,outline:{color:s,width:c}})}})}},84515(e,t,r){r.d(t,{G7:()=>n.G7,o6:()=>s,no:()=>c,tn:()=>l});var n=r(96829),o=r(15830),a=r(21997);function s({container:e,featureLayer:t,camera:r,mouseWheelZoomEnabled:n,browserTouchPanEnabled:s}){return new o.A({container:e,map:new a.A({basemap:"satellite",ground:"world-elevation",layers:[t]}),camera:r,alphaCompositingEnabled:!0,highlightOptions:{color:"rgba(255, 107, 0, 1)",fillOpacity:.6,haloOpacity:0,shadowOpacity:0},environment:{background:{type:"color",color:[0,0,0,0]},starsEnabled:!1,atmosphereEnabled:!1,lighting:{type:"virtual"}},ui:{components:[]},navigation:{mouseWheelZoomEnabled:n,browserTouchPanEnabled:s}})}function c(e){if(e){const t=Object.keys(e);if(t.length>0)return{where:`ISO_CC IN ('${t.join("','")}')`}}return null}function l(e,t={}){const r={...e};return r.position||(r.position=t),r.tilt||(r.tilt=0),r.heading||(r.heading=0),r}},73532(e,t,r){r.r(t),r.d(t,{default:()=>de});var n=r(45410),o=r(2086),a=r(12258),s=(r(77168),r(74934));function c({image:e,title:t,children:r,className:n,...o}){return(0,s.jsxs)("div",{className:`button-card ${n||""}`,...o,children:[e?.src&&(0,s.jsx)(a.A,{className:"button-card__image",...e}),(0,s.jsxs)("div",{className:"button-card__content",children:[t&&(0,s.jsx)("div",{className:"button-card__title",children:t}),r]})]})}var l=r(39656);const i={position:{x:-9e6,y:5e6,z:11e6,spatialReference:{wkid:3857}},heading:360,tilt:22},u={position:{x:-9e6,y:5e6,z:16e6,spatialReference:{wkid:3857}},heading:360,tilt:22};
1var d=r(42296),h=r(56093),f=r(25742),p=r(46052);function m({children:e,color:t="#666",...r}){return(0,s.jsx)("span",{className:"tag",style:{backgroundColor:t},...r,children:e})}function g({image:e,country:t,title:r,types:n,desc:c,onClose:l}){const i=(0,o.useRef)(null),u=(0,o.useId)(),d=!!r&&r.length>0;return(0,p.V)(i),(0,o.useEffect)(()=>{i.current&&(i.current.scrollTop=0)},[]),(0,s.jsx)("div",{className:"pbi-detail-overlay",onClick:e=>{e.target===e.currentTarget&&l()},role:"dialog","aria-modal":"true",...d?{"aria-labelledby":u}:{"aria-label":"Place-based initiative details"},children:(0,s.jsxs)("div",{className:"pbi-detail-overlay__card",ref:i,tabIndex:-1,children:[(0,s.jsx)("button",{className:"pbi-detail-overlay__close","aria-label":"Close",onClick:e=>{e.preventDefault(),e.stopPropagation(),l()},children:(0,s.jsx)("span",{className:"icon icon--close"})}),e?.src?.length>0&&(0,s.jsx)(a.A,{className:"pbi-detail-overlay__image",...e}),(0,s.jsxs)("div",{className:"pbi-detail-overlay__content",children:[t&&t?.length>0&&(0,s.jsx)("div",{className:"pbi-detail-overlay__country",children:t}),d&&(0,s.jsx)("div",{className:"pbi-detail-overlay__title",id:u,dangerouslySetInnerHTML:{__html:r}}),n?.length?(0,s.jsx)("div",{className:"pbi-detail-overlay__types",children:n.map((e,t)=>(0,s.jsx)(m,{color:e.color,children:e.name},t))}):null,c?.length?(0,s.jsx)("div",{className:"pbi-detail-overlay__desc",dangerouslySetInnerHTML:{__html:c}}):null]})]})})}var y=r(70646),b=r(10740),w=r(63993);function v({title:e,types:t,image:r,onClick:n,...o}){return(0,s.jsxs)("div",{className:"pbi-card",onClick:n,...o,children:[r?.src&&r.src.length>0&&(0,s.jsx)(a.A,{className:"pbi-card__image",...r}),(0,s.jsxs)("div",{className:"pbi-card__content",children:[e&&e.length>0&&(0,s.jsx)("div",{className:"pbi-card__title",dangerouslySetInnerHTML:{__html:e}}),t&&t.length>0&&(0,s.jsx)("div",{className:"pbi-card__types",children:t.map((e,t)=>(0,s.jsx)(m,{color:e.color,children:e.name},t))})]})]})}function _({stats:e,short:t,className:r=""}){return e&&(e.budget||e.people||e.schools||e.healthcare)?(0,s.jsxs)("ul",{className:`stats-list ${r}`,children:[e.budget&&(0,s.jsxs)("li",{children:[(0,s.jsx)(d.A,{name:"money"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("strong",{children:"Budget:"})," ",Number(e.budget).toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0})]})]}),e.people&&(0,s.jsxs)("li",{children:[(0,s.jsx)(d.A,{name:"person"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("strong",{children:"People Gaining Access to Water:"})," ",Number(e.people).toLocaleString()]})]}),!t&&e.schools&&(0,s.jsxs)("li",{children:[(0,s.jsx)(d.A,{name:"school"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("strong",{children:"Schools Gaining Access to Water:"})," ",Number(e.schools).toLocaleString()]})]}),!t&&e.healthcare&&(0,s.jsxs)("li",{children:[(0,s.jsx)(d.A,{name:"health"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("strong",{children:"Healthcare Facilities Gaining Access to Water:"})," ",Number(e.healthcare).toLocaleString()]})]})]}):null}function C({name:e,desc:t,images:r,fileUrl:n,videoUrl:a,dataUrl:c,pbis:l,stats:i,tooltip:u,onClose:m}){const[C,x]=(0,o.useState)(null),[j,E]=(0,o.useState)(!1),k=(0,o.useRef)(null),L=(0,o.useRef)(null),R=(0,o.useRef)(null),N=(0,o.useRef)(null),T=(0,o.useId)(),D=!!e&&e.length>0,S=C?.countryName===e?C.pbi:null;return(0,p.V)(L),(0,b.n)(),(0,y.r)(N,{smoothing:.15,speed:1}),(0,o.useEffect)(()=>{if(!k.current)return;L.current?.scrollTo({top:0,left:0,behavior:"auto"});const e=k.current.closest(".modal__inner");e instanceof HTMLElement&&e.scrollTo({top:0,left:0,behavior:"auto"});const t=e=>{R.current&&!R.current.contains(e.target)&&E(!1)},r=e=>!!e&&e.scrollHeight>e.clientHeight,n=e=>{const t=e.target;if(!t||(n=t).isContentEditable||n.closest(["a[href]","button","summary","input","textarea","select",'[role="button"]','[role="link"]','[role="menuitem"]'].join(", ")))return;var n;const o=(e=>{const t=e.closest(".country-modal__content"),n=e.closest(".modal__inner"),o=k.current?.closest(".modal__inner"),a=o instanceof HTMLElement?o:null;return[t,n,L.current,a].find(r)??null})(t);if(!o)return;const a=Math.max(120,.9*o.clientHeight);switch(e.key){case"ArrowDown":e.preventDefault(),o.scrollBy({top:48,behavior:"auto"});break;case"ArrowUp":e.preventDefault(),o.scrollBy({top:-48,behavior:"auto"});break;case"PageDown":e.preventDefault(),o.scrollBy({top:a,behavior:"auto"});break;case"PageUp":e.preventDefault(),o.scrollBy({top:-a,behavior:"auto"});break;case"Home":e.preventDefault(),o.scrollTo({top:0,behavior:"auto"});break;case"End":e.preventDefault(),o.scrollTo({top:o.scrollHeight,behavior:"auto"});break;case" ":e.preventDefault(),o.scrollBy({top:e.shiftKey?-a:a,behavior:"auto"})}},o=k.current;return o.addEventListener("click",t),o.addEventListener("keydown",n),()=>{o?.removeEventListener("click",t),o?.removeEventListener("keydown",n)}},[]),(0,s.jsxs)(f.A,{className:"country-modal",onClose:m,...D?{"aria-labelledby":T}:{"aria-label":"Country details"},children:[(0,s.jsxs)("div",{className:"country-modal__wrap",ref:k,children:[(0,s.jsx)("div",{className:"country-modal__carousel",children:(0,s.jsx)(h.A,{images:r,aspectRatio:"portrait"})}),(0,s.jsxs)("div",{className:"country-modal__content",ref:L,tabIndex:-1,
1children:[(0,s.jsxs)("a",{href:"#",className:"country-modal__close",onClick:e=>{e.preventDefault(),e.stopPropagation(),m()},children:[(0,s.jsx)(d.A,{name:"prev"})," Map"]}),D&&(0,s.jsx)("h3",{className:"country-modal__title",id:T,children:e}),((0,w.JT)(a)||(0,w.JT)(n)||(0,w.JT)(c))&&(0,s.jsxs)("ul",{className:"country-modal__links",children:[(0,w.JT)(n)&&(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:n,title:"Download Business Plan",target:"_blank",rel:"noreferrer noopener",className:"button button--primary",children:"Download Business Plan"})}),(0,w.JT)(a)&&(0,s.jsx)("li",{children:(0,s.jsxs)("a",{href:a,title:"Watch Video",target:"_blank",rel:"noreferrer noopener",children:[(0,s.jsx)("span",{className:"icon icon--play"})," Watch Video"]})}),(0,w.JT)(c)&&(0,s.jsx)("li",{children:(0,s.jsxs)("a",{href:c,title:"Video Data",target:"_blank",rel:"noreferrer noopener",children:[(0,s.jsx)("span",{className:"icon icon--external"})," View Data"]})})]}),(0,s.jsx)(_,{stats:i,className:"country-modal__stats"}),(0,w.JT)(t)&&(0,s.jsx)("div",{className:"country-modal__desc",dangerouslySetInnerHTML:{__html:t}}),(0,w.JT)(l)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h4",{className:"country-modal__subtitle",children:["Place-Based Initiatives",(0,w.JT)(u)&&(0,s.jsxs)("span",{ref:R,className:"country-modal__tooltip",children:[(0,s.jsx)(d.A,{name:"info",role:"button","aria-label":"Show tooltip",onClick:()=>{E(!j)}}),(0,s.jsx)("span",{className:"country-modal__tooltip__text "+(j?"-active":""),dangerouslySetInnerHTML:{__html:u}})]})]}),(0,s.jsx)("div",{className:"country-modal__pbis",ref:N,"data-scroll-lock-allow":!0,children:l.map((t,r)=>(0,s.jsx)(v,{...t,role:"button",onClick:r=>{r.preventDefault(),x({countryName:e,pbi:t})}},r))})]})]})]}),S&&(0,s.jsx)(g,{image:S.image,country:e,title:S.title,types:S.types,desc:S.desc,onClose:()=>x(null)})]})}var x=r(24208),j=r(96448);const E={title:"",desc:"",globe:{countries:{}},countries:{},tooltip:"",hasLoaded:!1};let k=null;var L=r(61430),R=r(84408),N=r(62657),T=r(5770);const D=3e6,S=4e5,A=52e5,I=480,P=-1e5,F=1.5,O=.85,M=1.15,H=1.5,U=2.5,W=-7e5,B=-11e5,Y=-12e5,V=(e,t,r)=>Math.min(r,Math.max(t,e));function $({globe:e,centroid:t,width:r,viewportHeight:n,mobileCountryFocusAltitude:o}){const a=r>=l.L.md,s=n/r,c=V(s/F,O,M),i=a?D:(o??A)*c,u=V((s-H)/(U-H),0,1);let d=((e,t,r)=>e+(t-e)*r)(W,B,u);r<I&&(d+=P),d=Math.max(Y,d),e.goTo({position:{x:t.x+(a?S:0),y:t.y+(a?0:d),z:i,spatialReference:{wkid:e.camera.position.spatialReference.wkid}},heading:e.camera.heading,tilt:e.camera.tilt})}var J=r(96829);const G=new j.A({color:J.iP,outline:{color:J.j2,width:J.e}});function z(e){return"Polygon"===e.type?e.coordinates:e.coordinates.flat()}function K(e,t){switch(t.type){case"SELECT_COUNTRY":return{mode:"card",country:t.country};case"OPEN_DETAIL":return"card"===e.mode?{mode:"detail",country:e.country}:e;case"OPEN_DETAIL_DIRECT":return{mode:"detail",country:t.country};case"BACK_TO_MAP":return{mode:"globe"};default:return e}}const Z={mode:"globe"};var q=r(94398),X=r(28047);function Q(e,t,r,n){const a=(0,o.useRef)(!1),s=(0,o.useRef)(!1),c=(0,o.useRef)(e.mode),l=(0,o.useRef)(e.mode);(0,o.useEffect)(()=>{if(a.current)return;if(!n||!r?.hasLoaded||!r?.countries)return;const e=window.location.hash.match(/#\/country\/([^/?#]+)/i),o=e?.[1]?function(e){try{return decodeURIComponent(e)}catch{return e}}(e[1]):new URLSearchParams(window.location.search).get("country")??"";if(o){const e=(0,X.j)(r.countries).resolve(o);if(e&&e!==q.tu){const n=r.countries[e];n&&t({type:"OPEN_DETAIL_DIRECT",country:n})}}a.current=!0},[n,r,t]),(0,o.useEffect)(()=>{const t=c.current;if(c.current=e.mode,l.current=e.mode,"globe"!==e.mode){if("detail"===e.mode){const r=e.country,n=window.location.pathname+window.location.search,o=`#/country/${r.code.toLowerCase()}`;"detail"===t||s.current?window.history.replaceState({},document.title,n+o):(window.history.pushState({scopeModal:!0},"",n+o),s.current=!0)}}else if("globe"!==t){s.current=!1;const e=window.location.pathname+window.location.search;window.history.replaceState({},document.title,e)}},[e]),(0,o.useEffect)(()=>{const e=()=>{"globe"!==l.current&&(s.current=!1,t({type:"BACK_TO_MAP"}))};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[t])}var ee=r(2464),te=r(90714),re=r(24993),ne=r(40424),oe=r(42713);const ae=[-80,15],se=({countries:e,availableIsos:t,selectedIso:r,onSelect:n,onClear:a,disabled:c,
1className:l})=>{const[i,u]=(0,o.useState)(!1),d=(0,o.useRef)(null),h=(0,o.useCallback)(()=>{u(!1)},[]),f=!c&&i,p=(0,o.useCallback)(()=>{c||u(!0)},[c]);(0,o.useEffect)(()=>{if(!c)return;const e=window.setTimeout(()=>{u(!1)},0);return()=>{window.clearTimeout(e)}},[c]);const m=(0,o.useMemo)(()=>{const r=t?new Set(t):void 0;return Object.entries(e).filter(([e])=>!r||r.has(e)).map(([e,t])=>({iso:e,name:t})).sort((e,t)=>e.name.localeCompare(t.name))},[e,t]),g=r?e[r]??null:null;(0,o.useEffect)(()=>{if(!f)return;const e=e=>{d.current&&!d.current.contains(e.target)&&h()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h,f]),(0,o.useEffect)(()=>{if(!f)return;const e=e=>{"Escape"===e.key&&h()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[h,f]);const y=e=>{n(e),h()};return(0,s.jsxs)("div",{className:`country-dropdown${l?` ${l}`:""}${f?" country-dropdown--open":""}`,ref:d,children:[(0,s.jsxs)("div",{className:"country-dropdown__trigger-row",children:[(0,s.jsxs)("button",{type:"button",className:"country-dropdown__trigger",onClick:()=>{f?h():p()},disabled:c,"aria-expanded":f,"aria-haspopup":"listbox","aria-label":"Select a country",children:[(0,s.jsx)("span",{className:"country-dropdown__label",children:g??"Select a country"}),(0,s.jsx)("svg",{className:"country-dropdown__chevron",width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",children:(0,s.jsx)("path",{d:"M1 1L5 5L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),g&&a?(0,s.jsx)("button",{type:"button",className:"country-dropdown__clear",onClick:()=>{h(),a?.()},disabled:c,"aria-label":"Clear selection",children:(0,s.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:(0,s.jsx)("path",{d:"M1 1L9 9M1 9L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):null]}),f&&(0,s.jsx)("ul",{className:"country-dropdown__panel",role:"listbox",children:m.map(({iso:e,name:t})=>(0,s.jsx)("li",{role:"option","aria-selected":e===r,className:"country-dropdown__option"+(e===r?" country-dropdown__option--selected":""),onClick:()=>y(e),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),y(e))},tabIndex:0,children:t},e))})]})};var ce=r(84515);const le=({position:e={},camera:t={},countries:r,disableClick:n,disableDrag:a,disableKeyboard:c,hoverHighlightEnabled:l,mouseWheelZoomEnabled:i,browserTouchPanEnabled:u,suspended:d=!1,onReady:h,waitForLayers:f=!1,onCountryMouseIn:p,onCountryMouseOut:m,onCountryClick:g,layerFadeInEnabled:y=!1,layerFadeInDuration:b=800,coverColor:w,coverFadeOutDuration:v=600,ref:_,...C})=>{const{className:x,...j}=C,E=(0,o.useRef)(null),k=(0,o.useRef)(null),L=(0,o.useRef)(null),[R,N]=(0,o.useState)(!1),[T,D]=(0,o.useState)(!!w);return(0,o.useImperativeHandle)(_,()=>k.current,[R]),(0,o.useEffect)(()=>{const n=E.current;if(!n)return;let o;const a=(0,ce.G7)();L.current=a;const s=(0,ce.tn)(t,e),c=(0,ce.o6)({container:n,featureLayer:a,camera:s,mouseWheelZoomEnabled:i,browserTouchPanEnabled:u});return a.load().catch(()=>{}),c.whenLayerView(a).then(e=>{const t=(0,ce.no)(r);t&&(e.filter=t),y&&L.current&&(L.current.opacity=0),!1===i&&(c.navigation.actionMap.mouseWheel="none",c.navigation.actionMap.dragTertiary="none"),N(!0),f||h?.(!0),requestAnimationFrame(()=>{if(y&&L.current){const e=Date.now(),t=()=>{const r=Date.now()-e,n=Math.min(r/b,1);L.current&&(L.current.opacity=n),n<1?requestAnimationFrame(t):f&&h?.(!0)};t()}else f&&h?.(!0);w&&(o=window.setTimeout(()=>{D(!1)},y?b:0))})}),k.current=c,()=>{clearTimeout(o),c.destroy()}},[]),(0,o.useEffect)(()=>{R&&L.current&&k.current&&k.current.whenLayerView(L.current).then(e=>{const t=(0,ce.no)(r);t&&(e.filter=t)})},[r,R]),(0,o.useEffect)(()=>{if(!E.current||!k.current)return;const e=E.current.querySelector("canvas");e&&(e.style.touchAction=!0===u?"pan-y":!1===u?"none":""),k.current.navigation&&void 0!==u&&(k.current.navigation.browserTouchPanEnabled=u)},[u]),(0,o.useEffect)(()=>{k.current&&R&&void 0!==i&&(k.current.navigation.actionMap.mouseWheel=i?"zoom":"none",k.current.navigation.actionMap.dragTertiary=i?"zoom":"none")},[i,R]),(0,o.useEffect)(()=>
1{if(!E.current||!k.current)return;E.current.style.visibility=d?"hidden":""},[d]),function({sceneViewRef:e,featureLayerRef:t,disableClick:r,disableDrag:n,disableKeyboard:a,hoverHighlightEnabled:s,countries:c,onCountryMouseIn:l,onCountryMouseOut:i,onCountryClick:u}){const d=(0,o.useRef)(null),h=(0,o.useRef)(null),f=(0,o.useRef)([]),p=(0,o.useRef)([]),m=(0,o.useRef)([]),g=(0,o.useRef)([]),y=(0,o.useRef)(c),b=(0,o.useRef)(u),w=(0,o.useRef)(l),v=(0,o.useRef)(i),_=(0,o.useRef)(s);(0,o.useEffect)(()=>{y.current=c},[c]),(0,o.useEffect)(()=>{b.current=u},[u]),(0,o.useEffect)(()=>{w.current=l},[l]),(0,o.useEffect)(()=>{v.current=i},[i]),(0,o.useEffect)(()=>{_.current=s},[s]),(0,o.useEffect)(()=>{if(e.current)if(n?(f.current.push(e.current.on("drag",e=>{e.stopPropagation()})),f.current.push(e.current.on("drag",["Shift"],e=>{e.stopPropagation()})),f.current.push(e.current.on("drag",["Shift","Control"],e=>{e.stopPropagation()}))):(f.current.forEach(e=>{e.remove()}),f.current=[]),r)d.current&&(d.current.remove(),d.current=null),h.current&&(h.current.remove(),h.current=null),g.current.length>0&&(g.current.forEach(e=>e.remove()),g.current=[]),p.current.push(e.current.on("key-down",e=>{const t=e.key;-1!==["+","-","Shift","_","="].indexOf(t)&&e.stopPropagation()})),p.current.push(e.current.on("click",e=>{e.stopPropagation()})),p.current.push(e.current.on("double-click",e=>{e.stopPropagation()})),p.current.push(e.current.on("mouse-wheel",e=>{e.stopPropagation()})),p.current.push(e.current.on("double-click",["Control"],e=>{e.stopPropagation()}));else{if(p.current.forEach(e=>{e.remove()}),p.current=[],!t.current||!e.current)return;e.current.whenLayerView(t.current).then(r=>{e.current&&(h.current=e.current.on("pointer-move",async n=>{if(!e.current||!t.current)return;const o=await e.current.hitTest(n,{include:t.current});if(o.results.length>0){const e=o.results[0].graphic,t=y.current?.[e.attributes.ISO_CC];if(!t)return;w.current?.({name:t,iso:e.attributes.ISO_CC}),!1!==_.current&&(g.current.length>0&&g.current.forEach(e=>e.remove()),g.current=[],g.current.push(r.highlight(e.attributes.FID)))}else g.current.length>0&&(g.current.forEach(e=>e.remove()),g.current=[]),v.current?.()}),d.current=e.current.on("click",async n=>{if(!e.current||!t.current)return;const o=await e.current.hitTest(n,{include:t.current});if(o.results.length>0){const e=o.results[0].graphic,t=y.current?.[e.attributes.ISO_CC];if(!t)return;g.current.length>0&&(g.current.forEach(e=>e.remove()),g.current=[]),b.current?.({name:t,iso:e.attributes.ISO_CC},e,r)}}))})}return()=>{g.current.length>0&&(g.current.forEach(e=>e.remove()),g.current=[])}},[r,n,e,t]),(0,o.useEffect)(()=>{if(e.current)return a?m.current.push(e.current.on("key-down",e=>{e.stopPropagation()})):(m.current.forEach(e=>e.remove()),m.current=[]),()=>{m.current.forEach(e=>e.remove()),m.current=[]}},[a,e])}({sceneViewRef:k,featureLayerRef:L,disableClick:n,disableDrag:a,disableKeyboard:c,hoverHighlightEnabled:l,countries:r,onCountryMouseIn:p,onCountryMouseOut:m,onCountryClick:g}),(0,s.jsx)("div",{className:"globe"+(x?` ${x}`:""),ref:E,"data-disable-scroll":!1===u?"true":void 0,...j,children:w&&(0,s.jsx)("div",{className:"globe__cover "+(T?"":"globe__cover--hidden"),style:{backgroundColor:w,transitionDuration:`${v}ms`}})})};(Object.getOwnPropertyDescriptor(le,"name")||{}).writable||Object.defineProperty(le,"name",{value:"default",configurable:!0});var ie=r(83690),ue=r(69620);const de=({config:e})=>{const t=(0,o.useRef)(null),r=(0,o.useRef)(null),a=(0,o.useRef)(null),h=(0,o.useRef)(null),f=(0,o.useRef)([]),p=(0,o.useRef)(null),g=(0,o.useRef)(null),y=(0,o.useRef)(null),b=(0,o.useRef)(!1),{width:v,height:D}=(0,ue.l)(),S=(0,o.useMemo)(()=>((e,t)=>{if(e>=l.L.md)return i;const r=t??("undefined"!=typeof window?window.innerHeight:0),n=(o=(r>0&&e>0?r/e:1.5)/1.5,Math.min(1.15,Math.max(.85,o)));var o;const a=u.position.z??16e6;return{...u,position:{...u.position,z:a*n}}})(v,D),[v,D]),[A,I]=(0,o.useReducer)(K,Z),P="globe"!==A.mode?A.country:null,F="card"===A.mode,O="detail"===A.mode,M="globe"!==A.mode,[H,U]=(0,o.useState)(!0),[W,B]=(0,o.useState)(""),[Y,V]=(0,o.useState)(!1),[J,q]=(0,o.useState)(""),[X,ce]=(0,o.useState)({x:0,y:0}),{config:de}=function(){const[e,t]=(0,o.useState)(()=>k||(window.wv__scope?{...E,...window.wv__scope}:E)),[r,n]=(0,o.useState)(null);return(0,o.useEffect)(()=>
1{if(e.hasLoaded)return;const r=new AbortController;return fetch("/wp-json/pd/v1/partials/scope",{signal:r.signal}).then(e=>{if(!e.ok)throw new Error(`Failed to fetch scope data: ${e.status}`);return e.json()}).then(r=>{k={...e,...r,hasLoaded:!0},t(e=>({...e,...r,hasLoaded:!0}))}).catch(e=>{"AbortError"!==e.name&&(w.vF.logDebug("ScopeConfigFetchError",{message:e.message,timestamp:Date.now()}),n(e.message))}),()=>r.abort()},[e]),{config:e,error:r}}(),he=(0,o.useCallback)(e=>I({type:"SELECT_COUNTRY",country:e}),[I]),{featureQueryReady:fe,handleCountryClick:pe,selectCountryByIso:me}=function({globeRef:e,restorePointRef:t,highlightRef:r,config:n,width:a,viewportHeight:s,mobileCountryFocusAltitude:c,onCountrySelect:l,setCountryLabel:i}){const[u,d]=(0,o.useState)(!1),h=(0,o.useRef)(null),f=(0,o.useRef)({}),p=(0,o.useRef)(null),m=(0,o.useRef)({}),g=(0,o.useRef)({}),y=(0,o.useRef)(null),b=(0,o.useMemo)(()=>Object.keys(n.countries??{}).length>0,[n.countries]),v=!b||u;(0,o.useEffect)(()=>{if(!e.current?.map)return;const t=e.current.map.layers.find(e=>"feature"===e.type);h.current=t??null},[e]),(0,o.useEffect)(()=>{if(!e.current||v||!b)return;const t=Object.keys(n.countries??{}),r=h.current??e.current.map?.layers.find(e=>"feature"===e.type);if(!r)return;let o=!1;return(async()=>{try{await e.current.whenLayerView(r);const n=r.objectIdField;if(!n)return void d(!0);const a=await r.queryFeatures({where:`ISO_CC IN ('${t.join("','")}')`,outFields:["ISO_CC",n],returnGeometry:!1});if(o)return;const s={};a.features.forEach(e=>{const t=e.attributes.ISO_CC,r=e.attributes[n];t&&null!=r&&(s[t]||(s[t]=[]),s[t].push(r))}),f.current=s,d(!0);const c=t.filter(e=>!s[e]);c.length>0&&w.vF.warn("scope:preloadCountryFeatures.missingIsos",{missing:c,count:c.length})}catch(e){w.vF.error("scope:preloadCountryFeatures",e),o||d(!0)}})(),()=>{o=!0}},[n.countries,v,e,b]),(0,o.useEffect)(()=>{if(!v&&b)return p.current=window.setTimeout(()=>{d(!0)},15e3),()=>{p.current&&(window.clearTimeout(p.current),p.current=null)}},[v,b]);const _=(0,o.useCallback)((e,t)=>{const r=m.current[e];if(r)return Promise.resolve(r);const n=g.current[e];if(n)return n;const o=fetch(t).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(t=>{const r=function(e){let t=[];if("features"in e)for(const r of e.features)r?.geometry&&(t=t.concat(z(r.geometry)));else"Feature"===e.type?e.geometry&&(t=z(e.geometry)):t=z(e);return t.length?new R.A({rings:t,spatialReference:{wkid:4326}}):null}(t);return r&&(m.current[e]=r),r}).finally(()=>{delete g.current[e]});return g.current[e]=o,o},[]),C=(0,o.useCallback)(()=>{if(y.current)return y.current;const t=e.current?.map;if(!t)return null;const r=new T.A({listMode:"hide"});return t.add(r),y.current=r,r},[e]),x=(0,o.useCallback)(async o=>{try{const u=n.countries[o];if(!u||!e.current)return;const d=e.current,p=h.current??d.map?.layers.find(e=>"feature"===e.type),m=f.current[o];let g=null,y=[];if(p){g=await d.whenLayerView(p);const e=p.objectIdField;g&&e&&(y=(await p.queryFeatures({where:`ISO_CC = '${o}'`,outFields:[e],returnGeometry:!0})).features)}let b=null,v=-1/0;for(const e of y){const t=e.geometry?.extent;if(!t)continue;const r=t.width*t.height;r>v&&(v=r,b=e.geometry)}!b&&y.length>0&&(b=y[0].geometry??null);let x=null;if(!b)if(u.geojson)try{x=await _(o,u.geojson)}catch(e){w.vF.error("scope:selectCountryByIso.fallback",{iso:o,error:e})}else w.vF.warn("scope:selectCountryByIso.noFallback",{iso:o,reason:"no-geojson-url"});let j=null;const E=b??x;if(E){const e=(0,L.execute)(E);j={x:e.x,y:e.y}}if(!j&&!b&&!x)return w.vF.warn("scope:selectCountryByIso.noGeometry",{iso:o}),l(u),void i("");t.current||(t.current=d.camera.clone()),j&&$({globe:d,centroid:j,width:a,viewportHeight:s,mobileCountryFocusAltitude:c});const k=r.current,R=[],T=p?.objectIdField;let D=!1;if(g&&T)if(m?.length)m.forEach(e=>{R.push(g.highlight(e))}),D=!0;else if(y.length>0)for(const e of y){const t=e.attributes[T];null!=t&&(R.push(g.highlight(t)),D=!0)}if(!D&&x){const e=C();if(e){const t=new N.A({geometry:x,symbol:G});e.add(t),R.push({remove:()=>e.remove(t)})}}
1r.current=R,k.forEach(e=>e.remove()),l(u),i("")}catch(e){w.vF.error("scope:selectCountryByIso",e)}},[n.countries,e,t,r,a,s,c,l,i,_,C]),j=(0,o.useCallback)(async({iso:o},u,d)=>{try{const h=n.countries[o];if(!h)return;const p=d.layer.objectIdField;if(!p)return;const m=f.current[o],g=m?.length?void 0:d.layer.queryFeatures({where:`ISO_CC = '${o}'`,outFields:[p]});if(e.current&&u.geometry){const n=e.current;t.current=n.camera.clone();const o=(0,L.execute)(u.geometry);if($({globe:n,centroid:{x:o.x,y:o.y},width:a,viewportHeight:s,mobileCountryFocusAltitude:c}),m?.length){const e=r.current,t=[];m.forEach(e=>{t.push(d.highlight(e))}),r.current=t,e.forEach(e=>e.remove())}else if(g){const e=await g;if(e.features.length>0){const t=r.current,n=[];for(const t of e.features){const e=t.attributes[p];null!=e&&n.push(d.highlight(e))}r.current=n,t.forEach(e=>e.remove())}}l(h),i("")}}catch(e){w.vF.error("scope:handleCountryClick",e)}},[n.countries,e,t,r,a,s,c,l,i]);return{featureQueryReady:v,handleCountryClick:j,selectCountryByIso:x}}({globeRef:a,restorePointRef:h,highlightRef:f,config:de,width:v,viewportHeight:D,mobileCountryFocusAltitude:42e5,onCountrySelect:he,setCountryLabel:B});(0,o.useEffect)(()=>{(0,ie.Ve)("scope")},[]),(0,o.useEffect)(()=>{Y&&fe&&de?.hasLoaded&&(0,ie.c2)("scope")},[Y,fe,de.hasLoaded]),function({country:e,globeRef:t,restorePointRef:r,highlightRef:n,initialCamera:a,setRegionLabel:s,setRegionLabelPos:c}){const l=(0,o.useRef)(null),i=(0,o.useRef)(null),u=(0,o.useRef)(new Set);(0,o.useEffect)(()=>{const o=()=>{i.current&&(i.current.remove(),i.current=null),l.current&&t.current?.map&&t.current.map.remove(l.current),l.current=null,s(""),c({x:0,y:0})};if(e){if(!(0,w.JT)(e.geojson))return void o();const r=String(e.geojson);if(u.current.has(r))return void o();o(),l.current=new x.default({url:r,outFields:["*"],renderer:{type:"simple",symbol:new j.A({color:"rgba(255, 255, 255, 0.25)",outline:{color:"rgba(255, 255, 255, 0.75)",width:2}})}});const n=l.current;t.current?.map?.add(n,1);let a=!1;return t.current?.whenLayerView(n).then(()=>{!a&&t.current&&l.current===n&&(i.current=t.current.on("pointer-move",async e=>{const r=await(t.current?.hitTest(e,{include:n}));if((0,w.JT)(r?.results)){const t=r.results[0],n=t.graphic?.attributes;s((e=>{const t=e.OA??e.NAME_1??e.NAME??e.name??e.label??"";return"string"==typeof t?t:""})(n)),c({x:e.x,y:e.y})}else s(""),c({x:0,y:0})}))}).catch(e=>{u.current.add(r),o(),w.vF.logDebug("[useCountryRegions] Error initializing layer view:",{error:e,geoJsonUrl:r})}),()=>{a=!0,o()}}if(o(),n.current.length>0&&(n.current.forEach(e=>e.remove()),n.current=[]),t.current?.ready&&r.current)try{t.current.goTo(r.current)}catch(e){w.vF.logDebug("[useCountryRegions] Error resetting globe position:",{error:e})}return r.current=null,()=>{o()}},[e,t,r,n,a,s,c])}({country:P,globeRef:a,restorePointRef:h,highlightRef:f,initialCamera:S,setRegionLabel:q,setRegionLabelPos:ce});const{animationState:ge,toggleScrollAnimation:ye,globeTranslateY:be,headerOpacity:we,headerY:ve,legendOpacity:_e}=function({containerRef:e,globeRef:t,initPos:r,width:n,config:a,globeReady:s,setShowOverlay:c}){const i=(0,o.useRef)(!1),u=(0,o.useRef)("initial"),[d,h]=(0,o.useState)("initial"),f=(0,o.useRef)(null),p=(0,o.useRef)(0),{scrollYProgress:m}=(0,ee.L)({target:e,offset:["start start","end end"]}),g=(0,te.d)(0),y=n<=l.L.sm?"8vh":"14vh",b=(0,re.G)(g,[0,1],[y,"0vh"]),w=(0,re.G)(g,[0,1],[1,0]),v=(0,re.G)(g,[0,1],["0%","-40%"]),_=(0,re.G)(g,[0,1],[0,1]),C=(0,o.useCallback)(e=>{f.current?.stop(),f.current=(0,ne.i)(g,e,{duration:.7,ease:[.4,0,.2,1]})},[g]),x=(0,o.useCallback)(()=>{t.current&&t.current.when().then(()=>{t.current?.goTo({position:[a?.globe?.center?.[0]??ae[0],a?.globe?.center?.[1]??ae[1],22e6],heading:0,tilt:0},{duration:a?.globe?.animationDuration??2e3})})},[a?.globe?.center,a?.globe?.animationDuration,t]),j=(0,o.useCallback)(()=>{t.current&&t.current.when().then(()=>{t.current?.goTo(r,{duration:a?.globe?.animationDuration??2e3})})},[t,r,a?.globe?.animationDuration]),E=(0,o.useCallback)(()=>{const t=e.current;if(t){const e=t.getBoundingClientRect(),r=window.scrollY+e.top+.11*Math.max(t.offsetHeight-window.innerHeight,0);Math.abs(window.scrollY-r)>2&&window.scrollTo({top:r,behavior:"auto"})}p.current=performance.now()+600,u.current="centered",h("centered"),f.current?.stop(),g.set(1),c(!1),x()},[e,x,c,g]);return(0,oe.L)(m,"change",e=>
1{if(i.current||!s)return;if(performance.now()<p.current)return;const t=u.current;let r=t;"initial"===t?e>=.08&&(r="centered"):"centered"===t?e>.75?r="past":e<=.03&&(r="initial"):"past"===t&&e<=.75&&(r="centered"),r!==u.current&&(u.current=r,h(r),"centered"===r?(C(1),x(),c(!1)):"initial"===r?(C(0),j(),c(!0)):"past"===r&&(C(1),c(!1)))}),{animationState:d,toggleScrollAnimation:(0,o.useCallback)(e=>{i.current=!e},[]),forceCenteredView:E,globeTranslateY:b,headerOpacity:w,headerY:v,legendOpacity:_}}({containerRef:t,globeRef:a,initPos:S,width:v,config:de,globeReady:Y,setShowOverlay:U});(0,o.useEffect)(()=>{ye(!M)},[M,ye]),(0,o.useEffect)(()=>{if(!M)return p.current=null,g.current=null,y.current=null,void(b.current=!1);if(O)return p.current=null,g.current=null,y.current=null,void(b.current=!1);const e=window.scrollY;p.current=e;const t=()=>{const t=p.current??e;Math.abs(window.scrollY-t)>1&&window.scrollTo({top:t,behavior:"auto"})},r=(e,t,r)=>{const n=(e=>{let t=e,r=0;for(;t&&t!==document.body&&r<25;){const e=window.getComputedStyle(t),n=t.scrollHeight>t.clientHeight+1,o=t.scrollWidth>t.clientWidth+1,a=/(auto|scroll|overlay)/.test(e.overflowY),s=/(auto|scroll|overlay)/.test(e.overflowX);if(n&&a||o&&s)return{container:t,reachedDepthCap:!1};t=t.parentElement,r++}return{container:null,reachedDepthCap:null!==t&&t!==document.body&&r>=25}})(e),o=n.container;if(!o)return!!n.reachedDepthCap&&(b.current||(w.vF.warn("[Scope] Scroll ancestor depth cap reached; allowing native scroll",{maxDepth:25,targetTag:e?.tagName}),b.current=!0),!0);const a=o.scrollHeight>o.clientHeight+1,s=o.scrollWidth>o.clientWidth+1;if(a&&0!==r){const e=o.scrollTop<=0,t=o.scrollTop+o.clientHeight>=o.scrollHeight-1;if(r<0&&!e)return!0;if(r>0&&!t)return!0}if(s&&0!==t){const e=o.scrollLeft<=0,r=o.scrollLeft+o.clientWidth>=o.scrollWidth-1;if(t<0&&!e)return!0;if(t>0&&!r)return!0}return!1},n=e=>{const n=e.target;r(n,e.deltaX,e.deltaY)||(e.preventDefault(),t())},o=e=>{g.current=e.touches[0]?.clientX??null,y.current=e.touches[0]?.clientY??null},a=e=>{const n=e.target,o=e.touches[0]?.clientX,a=e.touches[0]?.clientY,s=g.current,c=y.current;r(n,null!=o&&null!=s?s-o:0,null!=a&&null!=c?c-a:0)||(e.preventDefault(),t())},s=e=>{const n=e.target;if(n&&((o=n).isContentEditable||o.closest(["a[href]","button","input","textarea","select","summary",'[role="button"]','[role="link"]','[role="menuitem"]','[tabindex]:not([tabindex="-1"])'].join(", "))))return;var o;const a=e.key;["ArrowUp","ArrowDown","PageUp","PageDown","Home","End"," "].includes(a)&&(r(n,0,"ArrowUp"===a||"PageUp"===a?-1:1)||(e.preventDefault(),t()))};return t(),window.addEventListener("scroll",t,{passive:!0}),document.addEventListener("wheel",n,{passive:!1,capture:!0}),document.addEventListener("touchstart",o,{passive:!0,capture:!0}),document.addEventListener("touchmove",a,{passive:!1,capture:!0}),document.addEventListener("keydown",s,{capture:!0}),()=>{window.removeEventListener("scroll",t),document.removeEventListener("wheel",n,{capture:!0}),document.removeEventListener("touchstart",o,{capture:!0}),document.removeEventListener("touchmove",a,{capture:!0}),document.removeEventListener("keydown",s,{capture:!0})}},[M,O]),Q(A,I,de,fe),(0,o.useEffect)(()=>(document.body.classList.toggle("is-scope-summary-active",F),()=>{document.body.classList.remove("is-scope-summary-active")}),[F]),(0,o.useEffect)(()=>{P&&t.current&&requestAnimationFrame(()=>{const e="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;t.current?.scrollIntoView({behavior:e?"auto":"smooth",block:"start"})})},[P]);const Ce=(0,o.useMemo)(()=>{const e=new Set,t=[];return P?.pbis?.forEach(r=>{r.types.forEach(r=>{e.has(r.name)||(e.add(r.name),t.push(r))})}),t},[P]),xe=(0,o.useMemo)(()=>{const e=de.globe?.countries;if(!e)return e;if(!P)return e;const t=P.code.toLowerCase(),r=Object.entries(e).find(([e])=>e.toLowerCase()===t);return r?{[r[0]]:r[1]}:e},[de.globe?.countries,P]),je=P?.code??null,Ee=(0,o.useCallback)(({name:e})=>{B(e)},[]),ke=(0,o.useCallback)(()=>B(""),[]),Le=(0,o.useCallback)(()=>{I({type:"BACK_TO_MAP"})},[I]),Re="centered"===ge||"past"===ge,Ne=M?"locked":ge;return(0,s.jsx)("div",{id:"geographic-scope",className:"scope-container",ref:t,children:(0,s.jsxs)("section",{className:"scope","data-state":Ne,ref:r,children:[H&&(0,s.jsx)("div",{className:"scope__overlay"}),(0,s.jsxs)("div",{className:"scope__wrap",children:[(0,s.jsxs)(n.P.header,{className:"scope__header",style:{opacity:M?0:we,y:M?"-40%":ve},children:[(0,w.JT)(de.title)&&(0,s.jsx)("h2",{className:"scope__title",children:de.title}),(0,w.JT)(de.desc)&&(0,s.jsx)("p",{className:"scope__desc",children:de.desc})]}),(0,s.jsxs)(n.P.div,{className:"scope__globe-container",style:{y:be},children:[(0,s.jsx)(le,{ref:a,camera:S,browserTouchPanEnabled:!P,disableDrag:!!P,disableKeyboard:!!P,mouseWheelZoomEnabled:!1,disableClick:!!P||!fe||!Re,suspended:O,onReady:V,waitForLayers:!1,onCountryMouseIn:Ee,onCountryMouseOut:ke,onCountryClick:pe,countries:xe,layerFadeInEnabled:de.globe?.layerFadeInEnabled,layerFadeInDuration:de.globe?.layerFadeInDuration,coverColor:de.globe?.coverColor,coverFadeOutDuration:de.globe?.coverFadeOutDuration}),!P&&W.length>0&&(0,s.jsx)("div",{className:"scope__label",children:W})]}
1),Y&&!P&&de.globe?.countries&&(0,s.jsx)(se,{countries:de.globe.countries,selectedIso:je,onSelect:me,onClear:Le,disabled:!Re,className:"scope__country-dropdown"}),F&&P&&(0,s.jsxs)("div",{className:"scope__card-overlay",children:[(0,s.jsxs)(c,{className:"scope__button-card",image:P.cardImage||P.images[0],title:(0,s.jsx)("a",{href:"#",className:"scope__country-title-link",onClick:e=>{e.preventDefault(),I({type:"OPEN_DETAIL"})},children:P.name}),children:[(0,s.jsx)(_,{stats:P.stats,short:!0,className:"scope__button-card__stats"}),(0,w.JT)(Ce)?(0,s.jsx)("div",{className:"scope__button-card__initiatives",children:Ce.map(e=>(0,s.jsx)(m,{color:e.color,children:e.name},e.name))}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)("div",{className:"scope__button-card__cta-wrap",children:(0,s.jsx)("a",{href:"#",className:"button button--primary",onClick:e=>{e.preventDefault(),I({type:"OPEN_DETAIL"})},children:"View Country Details"})})]}),(0,s.jsxs)("button",{className:"scope__back",onClick:Le,children:[(0,s.jsx)(d.A,{name:"prev"}),"Back to Map"]}),J.length>0&&(0,s.jsx)("div",{className:"scope__region",style:{left:X.x,top:X.y},children:J})]}),O&&P&&(0,s.jsx)(C,{name:P.name,desc:P.desc,images:P.images,fileUrl:P.file,videoUrl:P.video,dataUrl:P.data,pbis:P.pbis,stats:P.stats,tooltip:de.tooltip,onClose:Le}),Y&&!P&&(0,s.jsxs)(n.P.div,{className:"scope__legend",style:{opacity:_e},children:[(0,s.jsx)("span",{className:"icon icon--drag"}),"Grab and spin the globe to view the countries we're in."]})]})]})})}},94398(e,t,r){r.d(t,{Cy:()=>i,Ex:()=>y,H4:()=>a,HZ:()=>h,LO:()=>n.L,Ni:()=>b,QC:()=>g,T8:()=>c,Wr:()=>m,i6:()=>s,nT:()=>d,tC:()=>w,tu:()=>u,wc:()=>l,xn:()=>p,xo:()=>f,zg:()=>o});var n=r(39656);const o="https://storage.washdata.net/latest.json",a=new URL("geodata/combined-borders.json",o).toString(),s="cb1_26a2_1_e348c9e45afc0d75e10f85fe",c="period",l={defaultToAll:!0,defaultToCurrentFiscalYear:!0},i=9,u="ALL",d="All Years",h="All Periods",f=e=>e===u,p={water:{actualColor:"#f97316",targetColor:"#fdba74"},sanitation:{actualColor:"#059669",targetColor:"#6ee7b7"},hygiene:{actualColor:"#7c3aed",targetColor:"#c4b5fd"}},m="#CBD5E1",g=.01,y=6,b=40,w=80},5677(e,t,r){r.d(t,{$J:()=>v,C0:()=>g,DY:()=>w,Fs:()=>k,Gm:()=>l,Ik:()=>E,NQ:()=>j,OM:()=>i,Og:()=>c,PC:()=>C,P_:()=>h,RH:()=>p,Wi:()=>u,Wk:()=>x,Xc:()=>R,YE:()=>s,_p:()=>b,ci:()=>_,gq:()=>a,l7:()=>m,lI:()=>f,o3:()=>n,tx:()=>d,uS:()=>y,wb:()=>o,xc:()=>L});const n={water:"Water",sanitation:"Sanitation",hygiene:"Hygiene"},o={water:"",sanitation:"",hygiene:""},a="Data is live",s="* Data is live and subject to change.",c={years:"Fiscal Year",countries:"Country and Region"},l="All Years",i="All Countries",u="All Periods",d={water:"People gaining access to safe water",sanitation:"People gaining access to safe sanitation",hygiene:"People gaining access to hygiene services"},h="Click to view demographic breakdown",f="No demographic breakdown available",p="View Breakdown",m="Other",g="Total",y="No breakdown data for the current filters.",b="{label} breakdown, {range}",w="{from} - present",v="{from} to {to}",_="{label} breakdown. {totalLabel}: {total}, across {count} groups.",C="{label} breakdown across {count} groups.",x="",j="",E="",k="",L={chartDataLoadFailed:"Unable to load chart data.",kpiDataLoadFailed:"Unable to load KPI data.",dashboardDataLoadFailed:"Unable to load dashboard data.",mapDataLoadFailed:"Unable to load map data.",retry:"Try again"},R={charts:"Loading charts...",filters:"Loading filters...",kpiData:"Loading KPI data...",mapData:"Loading map data..."}},28047(e,t,r){r.d(t,{j:()=>i,q:()=>a});var n=r(94398),o=r(5677);function a(e,t){return e===n.tu?o.OM:t?.[e]?.name??e}const s=c(o.OM);function c(e){return e.trim().toUpperCase().replace(/[^A-Z0-9]/g,"")}function l(e){return e.trim().toLowerCase().replace(/[^a-z0-9]/g,"")}function i(e){const t=new Set,r=new Map,o=new Map;if(e){const n=[];for(const[a,s]of Object.entries(e)){if(!s)continue;const e=a.toUpperCase();if(t.add(e),s.code2){const t=s.code2.trim().toUpperCase();t&&!r.has(t)&&r.set(t,e)}const c="string"==typeof s.name?l(s.name):"";c&&!o.has(c)&&o.set(c,e),s.aliases?.length&&n.push([e,s.aliases])}for(const[e,t]of n)for(const r of t){const t=l(r);t&&!o.has(t)&&o.set(t,e)}}function a(e){if(!e)return null;const a=e.trim();if(!a)return null;const l=c(a);if(!l)return null;if("ALL"===l||l===s)return n.tu;if(2===l.length&&/^[A-Z]{2}$/.test(l)){const e=r.get(l);if(e)return e}if(3===l.length&&/^[A-Z]{3}$/.test(l)&&t.has(l))return l;return o.get(l.toLowerCase())||(0===t.size&&/^[A-Z]{3}$/.test(l)?l:null)}return{resolve:a,resolveMany:function(e,t){const r=[];for(const t of e){if(t===n.tu){r.push(t);continue}const e=a(t);e&&r.push(e)}return r.length?r:t??[n.tu]},knownCodes:t}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.