@bicharts/shape-core 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
+ import{a as D}from"./chunk-JH3W3DH7.mjs";var h="AB|CA|Alberta|-113.75|52.18,AK|US|Alaska|-148.32|61.29,AL|US|Alabama|-86.73|33.08,AR|US|Arkansas|-92.85|35.29,AZ|US|Arizona|-111.99|33.32,BC|CA|British Columbia|-122.73|49.27,CA|US|California|-119.21|35.2,CO|US|Colorado|-105|39.63,CT|US|Connecticut|-73.01|41.42,DC|US|District of Columbia|-77.04|38.9,DE|US|Delaware|-75.59|39.57,FL|US|Florida|-81.29|27.53,GA|US|Georgia|-84.02|33.43,HI|US|Hawaii|-157.73|21.26,IA|US|Iowa|-92.79|41.88,ID|US|Idaho|-115.65|44.2,IL|US|Illinois|-88.05|41.67,IN|US|Indiana|-86.27|40.23,KS|US|Kansas|-96|38.59,KY|US|Kentucky|-84.91|38.13,LA|US|Louisiana|-91.28|30.57,MA|US|Massachusetts|-71.28|42.32,MB|CA|Manitoba|-97.3|49.88,MD|US|Maryland|-76.79|39.18,ME|US|Maine|-70.01|43.92,MI|US|Michigan|-83.69|42.56,MN|US|Minnesota|-93.26|44.98,MO|US|Missouri|-92.66|38.73,MS|US|Mississippi|-89.62|32.36,MT|US|Montana|-111.07|46.37,MX01|MX|Aguascalientes|-102.29|21.91,MX02|MX|Baja California|-116.5|32.46,MX03|MX|Baja California Sur|-110.12|23.52,MX04|MX|Campeche|-91.08|19.25,MX05|MX|Chiapas|-92.77|16.28,MX06|MX|Chihuahua|-106.27|30.1,MX07|MX|Coahuila|-101.88|26.32,MX08|MX|Colima|-103.94|19.15,MX09|MX|Mexico City|-99.13|19.41,MX10|MX|Durango|-104.24|24.64,MX11|MX|Guanajuato|-101.37|20.87,MX12|MX|Guerrero|-99.83|17.31,MX13|MX|Hidalgo|-98.81|20.13,MX14|MX|Jalisco|-103.39|20.64,MX15|MX|M\xE9xico|-99.14|19.51,MX16|MX|Michoac\xE1n|-101.68|19.49,MX17|MX|Morelos|-99.15|18.88,MX18|MX|Nayarit|-104.89|21.5,MX19|MX|Nuevo Le\xF3n|-100.26|25.69,MX20|MX|Oaxaca|-96.23|17.05,MX21|MX|Puebla|-98.12|19.07,MX22|MX|Quer\xE9taro|-100.35|20.57,MX23|MX|Quintana Roo|-87.09|20.7,MX24|MX|San Luis Potos\xED|-100.7|22.22,MX25|MX|Sinaloa|-107.49|24.63,MX26|MX|Sonora|-111.05|29.37,MX27|MX|Tabasco|-92.98|17.99,MX28|MX|Tamaulipas|-98.33|24.92,MX29|MX|Tlaxcala|-98.19|19.31,MX30|MX|Veracruz|-96.31|19.2,MX31|MX|Yucat\xE1n|-89.52|20.94,MX32|MX|Zacatecas|-102.7|22.93,NB|CA|New Brunswick|-65.73|45.83,NC|US|North Carolina|-79.61|35.57,ND|US|North Dakota|-98.8|47.31,NE|US|Nebraska|-96.42|41.07,NH|US|New Hampshire|-71.37|43,NJ|US|New Jersey|-74.34|40.51,NL|CA|Newfoundland and Labrador|-52.77|47.55,NM|US|New Mexico|-106.28|34.69,NS|CA|Nova Scotia|-63.11|44.86,NV|US|Nevada|-115.95|36.72,NY|US|New York|-74.13|40.89,OH|US|Ohio|-82.75|40.53,OK|US|Oklahoma|-97.01|35.66,ON|CA|Ontario|-79.27|43.94,OR|US|Oregon|-122.75|44.96,PA|US|Pennsylvania|-76.12|40.23,PE|CA|Prince Edward Island|-63.13|46.23,QC|CA|Quebec|-73.14|45.89,RI|US|Rhode Island|-71.45|41.79,SC|US|South Carolina|-80.69|33.6,SD|US|South Dakota|-98.66|43.89,SK|CA|Saskatchewan|-105.99|51.63,TN|US|Tennessee|-87.53|35.63,TX|US|Texas|-97.51|31.01,UT|US|Utah|-111.96|40.5,VA|US|Virginia|-77.08|37.61,VT|US|Vermont|-73.21|44.48,WA|US|Washington|-121.46|47.29,WI|US|Wisconsin|-88.6|43.36,WV|US|West Virginia|-81.42|38.99,WY|US|Wyoming|-105.54|42.26,YT|CA|Yukon|-135.05|60.72",b="006|-66.84|18.26,007|-66.15|18.15,008|-64.74|17.74,009|-66.12|18.37,010|-72.6|42.26,011|-72.53|42.07,012|-73.21|42.37,013|-72.51|42.58,014|-71.81|42.59,015|-71.85|42.23,016|-71.84|42.28,017|-71.44|42.33,018|-71.21|42.64,019|-70.89|42.66,020|-71.28|42.12,021|-71.05|42.31,022|-71.04|42.35,023|-70.86|41.98,024|-71.22|42.37,025|-70.6|41.71,026|-70.2|41.73,027|-71.07|41.77,028|-71.62|41.69,029|-71.47|41.82,030|-71.51|42.9,031|-71.48|43,032|-71.65|43.57,033|-71.58|43.26,034|-72.19|42.91,035|-71.31|44.69,036|-72.32|43.17,037|-72.13|43.69,038|-71.1|43.56,039|-70.76|43.24,040|-70.6|43.78,041|-70.27|43.7,042|-70.49|44.38,043|-69.75|44.3,044|-68.83|45.45,045|-69.57|43.99,046|-67.8|44.79,047|-68.34|46.55,048|-69.17|44.2,049|-69.97|44.99,050|-72.43|43.85,051|-72.65|43.28,052|-73.14|43.03,053|-72.77|42.94,054|-72.98|44.58,056|-72.6|44.35,057|-73.04|43.69,058|-72.12|44.68,059|-71.7|44.79,060|-72.81|41.88,061|-72.69|41.74,062|-72.12|41.81,063|-72.03|41.5,064|-72.61|41.46,065|-72.94|41.36,066|-73.22|41.24,067|-73.24|41.68,068|-73.42|41.28,069|-73.57|41.14,070|-74.28|40.76,071|-74.2|40.74,072|-74.2|40.68,073|-74.08|40.71,074|-74.4|41.09,075|-74.17|40.92,076|-74.01|40.94,077|-74.17|40.28,078|-74.81|40.97,079|-74.55|40.74,080|-74.98|39.78,081|-75.07|39.94,082|-74.68|39.32,083|-75.04|39.45,084|-74.48|39.35,085|-74.62|40.25,086|-74.68|40.23,087|-74.22|39.96,088|-74.72|40.54,089|-74.48|40.45,100|-73.96|40.77,101|-73.95|40.78,102|-74.02|40.72,103|-74.15|40.58,104|-73.85|40.9,105|-73.75|41.27,106|-73.74|41.02,107|-73.84|40.96,108|-73.8|40.95,109|-74.27|41.3,110|-73.69|40.74,111|-73.93|40.76,112|-73.94|40.66,113|-73.84|40.73,114|-73.77|40.69,115|-73.62|40.71,116|-73.88|40.57,117|-73.23|40.82,118|-73.5|40.77,119|-72.53|40.95,120|-74.22|42.92,121|-74.4|43.46,122|-73.81|42.7,123|-73.96|42.82,124|-74.27|42.09,125|-73.7|41.89,126|-73.88|41.69,127|-74.75|41.74,128|-73.91|43.61,129|-74.03|44.53,130|-76.16|43.08,131|-76.46|43.27,132|-76.2|43.03,133|-75.07|43.45,134|-75.35|43.03,135|-75.15|43.14,136|-75.39|44.33,137|-75.2|42.21,138|-75.46|42.43,139|-75.88|42.12,140|-78.48|43.01,141|-78.7|42.49,142|-78.8|42.91,143|-78.96|43.12,144|-77.71|42.96,145|-77.17|43.14,146|-77.65|43.17,147|-78.84|42.21,148|-77.18|42.29,149|-76.78|42.09,150|-80.23|40.56,151|-80.18|40.53,152|-79.97|40.46,153|-80.24|40.01,154|-79.65|39.92,155|-78.8|39.95,156|-79.47|40.33,157|-79.02|40.71,158|-78.66|41.32,159|-78.84|40.35,160|-79.88|40.93,161|-80.3|41.19,162|-79.35|41.08,163|-79.58|41.59,164|-80|41.87,165|-80.04|42.1,166|-78.28|40.48,167|-78.47|41.76,168|-78|40.97,169|-77.37|41.8,170|-77.29|40.44,171|-76.78|40.33,172|-77.81|39.98,173|-76.93|39.89,174|-76.72|39.97,175|-76.24|40.05,176|-76.34|40.05,177|-77.22|41.34,178|-76.77|40.93,179|-76.27|40.69,180|-75.45|40.67,181|-75.47|40.6,182|-75.88|40.9,183|-75.19|41.12,184|-75.38|41.53,185|-75.68|41.37,186|-76.17|41.4,187|-75.86|41.22,188|-76.12|41.82,189|-75.14|40.36,190|-75.37|39.97,191|-75.15|40.01,193|-75.78|39.92,194|-75.46|40.19,195|-75.9|40.42,196|-75.95|40.34,197|-75.68|39.53,198|-75.58|39.77,199|-75.46|38.83,200|-77.02|38.9,201|-77.68|38.9,202|-77.03|38.89,203|-77.01|38.86,204|-77.05|38.89,205|-77.01|38.87,206|-76.76|38.45,207|-76.78|38.88,208|-77.23|39.15,209|-76.99|39.05,210|-76.32|39.53,211|-76.73|39.58,212|-76.58|39.31,214|-76.55|39,215|-79.08|39.56,216|-76.02|38.86,217|-77.5|39.52,218|-75.57|38.27,219|-75.94|39.57,220|-77.25|38.78,221|-77.25|38.92,222|-77.11|38.88,223|-77.13|38.79,224|-77.25|38.22,225|-77.51|38.09,226|-78.25|39.03,227|-78.05|38.49,228|-78.79|38.57,229|-78.55|38.02,230|-78.09|37.66,231|-76.96|37.55,232|-77.46|37.51,233|-76.3|36.68,234|-76.66|36.77,235|-76.26|36.87,236|-76.44|37.12,237|-76.38|36.85,238|-77.41|36.94,239|-78.39|37.03,240|-80.1|37.23,241|-79.89|36.9,242|-82.49|36.83,243|-81.13|36.86,244|-79.51|38.05,245|-79.11|37.15,246|-81.8|37.19,247|-81.14|37.39,248|-81.64|37.47,249|-80.32|37.95,250|-81.45|38.27,251|-81.89|38.64,252|-81.45|38.77,253|-81.64|38.42,254|-78.11|39.45,255|-82.19|38.25,256|-82.08|37.76,257|-82.41|38.4,258|-81.21|37.72,259|-80.89|37.83,260|-80.63|40.05,261|-81.27|39.2,262|-80.02|38.75,263|-80.23|39.27,264|-80.65|39.21,265|-80.05|39.59,266|-80.8|38.48,267|-78.98|39.33,268|-79.12|38.88,270|-80.45|36.24,271|-80.24|36.06,272|-79.82|35.86,273|-79.52|35.55,274|-79.81|36.09,275|-78.54|35.93,276|-78.65|35.81,277|-78.9|35.99,278|-77.32|35.88,279|-76.5|36.19,280|-81.2|35.4,281|-80.41|35.21,282|-80.83|35.22,283|-78.94|34.96,284|-78.23|34.39,285|-77.23|35.06,286|-81.36|36.06,287|-82.78|35.51,288|-82.55|35.6,289|-83.97|35.11,290|-80.88|34.19,291|-80.62|33.71,292|-80.96|34.04,293|-81.86|34.78,294|-80.08|33.05,295|-79.49|34.07,296|-82.57|34.61,297|-80.92|34.83,298|-81.74|33.51,299|-80.96|32.55,300|-84.08|33.85,301|-84.91|34.04,302|-84.55|33.25,303|-84.42|33.77,304|-82.11|32.48,305|-83.81|34.58,306|-83.14|33.86,307|-85.1|34.71,308|-82.34|33.35,309|-82.01|33.4,310|-83.42|32.64,312|-83.64|32.83,313|-81.49|31.68,314|-81.15|32.03,315|-82.21|31.4,316|-83.21|31.02,317|-83.87|31.48,318|-84.69|32.45,319|-84.95|32.47,320|-82.58|30.27,321|-81.48|29.39,322|-81.69|30.3,323|-84.25|30.29,324|-85.58|30.55,325|-87.03|30.76,326|-82.6|29.58,327|-81.28|28.79,328|-81.32|28.47,329|-80.67|27.96,330|-80.58|25.31,331|-80.38|25.74,333|-80.25|26.13,334|-81.01|26.64,335|-82.22|28.19,336|-82.47|28.01,337|-82.73|27.85,338|-81.64|27.72,339|-81.71|26.77,341|-81.32|26.11,342|-82.16|27.29,344|-82.35|29.01,346|-82.52|28.41,347|-81.4|28.29,349|-80.72|27.34,350|-86.8|34.05,351|-86.38|33.43,352|-86.77|33.5,354|-87.86|33.07,355|-87.71|33.96,356|-87.4|34.67,357|-86.26|34.75,358|-86.59|34.69,359|-85.94|34.27,360|-86.09|32.09,361|-86.27|32.31,362|-85.65|33.53,363|-85.56|31.34,364|-86.97|31.38,365|-88.14|31.32,366|-88.19|30.68,367|-87.34|32.33,368|-85.41|32.61,369|-88.25|32.12,370|-87.02|36.12,371|-86.23|35.75,372|-86.83|36.15,373|-85.36|35.32,374|-85.33|35.06,376|-82.3|36.36,377|-84.31|36.27,378|-83.35|36.3,379|-83.97|35.97,380|-89.43|35.55,381|-89.96|35.1,382|-88.68|36.29,383|-88.5|35.61,384|-87.36|35.34,385|-85.34|36.18,386|-89.76|34.57,387|-90.81|33.54,388|-88.63|34.36,389|-89.9|33.77,390|-90|32.53,391|-90.67|32.51,392|-90.22|32.32,393|-88.8|32.42,394|-89.26|31.23,395|-89|30.59,396|-90.67|31.32,397|-88.87|33.53,398|-84.67|31.32,400|-85.29|38.07,401|-86.2|37.85,402|-85.66|38.19,403|-84.2|38.06,404|-84.42|37.53,405|-84.45|38.04,406|-84.87|38.22,407|-84.12|36.95,408|-83.26|36.9,409|-83.74|36.95,410|-84.32|38.64,411|-83.06|38.38,412|-82.67|37.89,413|-83.48|37.58,414|-83.15|37.84,415|-82.39|37.46,416|-82.78|37.54,417|-83.25|37.23,418|-82.88|37.21,420|-88.57|36.9,421|-86.09|36.89,422|-87.11|36.95,423|-87.02|37.52,424|-87.7|37.47,425|-84.71|37.15,426|-84.82|36.81,427|-85.73|37.32,430|-82.9|40.21,431|-82.99|39.69,432|-82.97|39.98,433|-83.38|40.55,434|-83.3|41.42,435|-84.22|41.46,436|-83.54|41.67,437|-81.66|39.85,438|-81.88|40.27,439|-80.9|40.25,440|-80.97|41.64,441|-81.66|41.42,442|-81.6|41.13,443|-81.54|41.07,444|-80.77|41.09,445|-80.64|41.05,446|-81.53|40.65,447|-81.39|40.83,448|-82.77|41.02,449|-82.55|40.74,450|-84.48|39.43,451|-83.84|39.16,452|-84.48|39.18,453|-84.3|39.97,454|-84.18|39.74,455|-83.81|39.94,456|-82.86|38.99,457|-81.78|39.35,458|-84.23|40.83,460|-86.13|40.17,461|-86.18|39.62,462|-86.14|39.79,463|-87.05|41.41,464|-87.34|41.55,465|-86.08|41.44,466|-86.28|41.66,467|-85.21|41.17,468|-85.17|41.09,469|-86.14|40.76,470|-85.08|39.16,471|-86.02|38.43,472|-85.74|39.05,473|-85.15|40.09,474|-86.63|38.99,475|-87.03|38.46,476|-87.53|38.13,477|-87.58|38.03,478|-87.29|39.45,479|-87.11|40.5,480|-82.79|42.83,481|-83.62|42.2,482|-83.1|42.38,483|-83.35|42.66,484|-83.22|43.29,485|-83.69|43.03,486|-84.36|43.99,487|-83.67|44.45,488|-84.67|43.02,489|-84.59|42.74,490|-85.54|42.2,491|-86.36|41.87,492|-84.36|42.06,493|-85.57|43.33,494|-86.14|43.39,495|-85.66|42.96,496|-85.52|44.44,497|-84.37|45.17,498|-86.94|46.17,499|-88.93|46.6,500|-94.77|41.63,501|-92.79|41.84,502|-93.67|42.12,503|-93.63|41.59,504|-93.37|43.17,505|-94.45|42.77,506|-92.45|42.65,507|-92.31|42.49,508|-94.56|40.96,510|-95.91|42.6,511|-96.39|42.52,512|-96.06|43.28,513|-95.16|43.27,514|-95.08|42.11,515|-95.55|41.44,516|-95.37|40.74,520|-90.98|42.46,521|-91.73|43.2,522|-92.31|41.9,523|-91.66|41.87,524|-91.69|41.96,525|-92.46|40.95,526|-91.44|40.88,527|-90.88|41.64,528|-90.61|41.56,530|-88.24|43.51,531|-88.33|42.75,532|-87.98|43.06,534|-87.86|42.74,535|-89.66|42.95,537|-89.38|43.08,538|-90.73|42.88,539|-89.55|43.64,540|-92.46|45.08,541|-88.23|45.09,542|-87.6|44.52,543|-88.01|44.53,544|-89.85|44.93,545|-89.86|45.89,546|-90.87|43.93,547|-91.52|44.85,548|-91.63|46.04,549|-88.96|44.19,550|-92.98|45.17,551|-93.08|44.96,553|-94.06|44.99,554|-93.31|45.01,556|-91.03|47.67,557|-92.68|47.39,558|-92.08|46.96,559|-92.28|43.89,560|-94.04|44.02,561|-95.65|43.92,562|-95.75|45.08,563|-94.59|45.83,564|-94.5|46.63,565|-96.08|46.86,566|-94.31|47.88,567|-96.22|48.39,570|-97.07|43.48,571|-96.76|43.54,572|-97.18|45.04,573|-98.53|43.91,574|-98.93|45.36,575|-100.61|43.86,576|-101.59|45.43,577|-103.11|44.26,580|-97.39|46.66,581|-96.83|46.86,582|-97.72|48.25,583|-99.34|48.32,584|-99.12|46.88,585|-100.98|46.76,586|-102.99|46.75,587|-101.7|48.34,588|-103.48|48.2,590|-108.62|45.98,591|-108.45|45.69,592|-105.6|48.2,593|-105.58|46.4,594|-111.24|47.79,595|-109.12|48.38,596|-111.74|46.65,597|-112.31|45.48,598|-114.25|46.97,599|-114.57|48.37,600|-88.15|42.29,601|-88.47|42.01,602|-87.69|42.04,603|-87.79|41.89,604|-88.09|41.39,605|-88.55|41.69,606|-87.69|41.83,607|-87.82|42.03,608|-87.76|41.84,609|-87.92|40.8,610|-89.56|42.18,611|-89.08|42.28,612|-90.29|41.5,613|-89.16|41.34,614|-90.43|40.82,615|-89.68|40.71,616|-89.61|40.72,617|-88.89|40.52,618|-88.15|40.11,619|-88.19|39.66,620|-90.01|39.13,622|-89.72|38.41,623|-91.02|39.99,624|-88.19|39.04,625|-89.21|39.63,626|-90|39.86,627|-89.66|39.8,628|-88.65|38.35,629|-88.89|37.55,630|-90.83|38.35,631|-90.32|38.64,633|-91.11|39.02,634|-91.78|39.93,635|-92.61|40.2,636|-90.64|37.61,637|-89.81|37.37,638|-89.73|36.55,639|-90.62|36.84,640|-94.1|39.07,641|-94.58|39.14,644|-94.69|40.13,645|-94.83|39.75,646|-93.55|39.89,647|-94.15|38.06,648|-94.35|36.93,650|-92.23|38.45,651|-92.19|38.51,652|-92.38|39.21,653|-93.26|38.71,654|-92.03|37.93,655|-91.92|37.67,656|-93.08|36.76,657|-92.43|37.03,658|-93.3|37.22,660|-95.12|38.84,661|-94.73|39.11,662|-94.72|38.95,664|-96.15|39.64,665|-96.34|39.4,666|-95.76|39.06,667|-95.23|37.64,668|-96.39|38.36,669|-97.86|39.77,670|-98.49|37.33,671|-98.4|37.44,672|-97.33|37.7,673|-95.81|37.23,674|-97.79|38.98,675|-98.99|38.25,676|-99.47|39.34,677|-101.15|39.35,678|-100.82|37.91,679|-101.43|37.18,680|-96.46|41.55,681|-96.05|41.24,683|-96.93|40.39,684|-97.26|40.89,685|-96.69|40.82,686|-97.68|41.55,687|-98.16|42.43,688|-99.15|41.34,689|-98.9|40.34,690|-100.99|40.37,691|-101.59|41.42,692|-100.64|42.67,693|-102.84|42.29,700|-89.93|29.63,701|-89.93|30.02,703|-90.65|29.62,704|-90.27|30.66,705|-92.25|30.2,706|-93.21|30.34,707|-91.2|30.57,708|-91.1|30.45,710|-93.4|32.45,711|-93.75|32.47,712|-91.95|32.56,713|-91.86|31.43,714|-92.84|31.57,716|-91.75|33.61,717|-92.79|33.48,718|-93.84|33.66,719|-93.61|34.4,720|-91.9|34.92,721|-92.56|34.93,722|-92.37|34.7,723|-90.59|35.07,724|-90.76|36.04,725|-91.81|36.01,726|-92.93|36.15,727|-94.05|36.11,728|-93.33|35.3,729|-94.08|35.29,730|-97.83|35.31,731|-97.5|35.43,734|-97.14|34.21,735|-98.81|34.53,736|-99.33|35.52,737|-98.2|36.42,738|-99.54|36.5,739|-101.67|36.74,740|-96.19|36.34,741|-95.96|36.15,743|-95.02|36.55,744|-95.44|35.64,745|-95.65|34.66,746|-97.05|36.71,747|-95.41|34.02,748|-96.66|35.17,749|-94.69|35.23,750|-96.76|33.06,751|-96.32|32.48,752|-96.78|32.79,753|-96.84|32.81,754|-95.67|33.37,755|-94.45|33.3,756|-94.58|32.49,757|-95.37|32.24,758|-95.68|31.44,759|-94.29|31.29,760|-97.54|32.59,761|-97.38|32.77,762|-97.44|33.52,763|-98.87|33.73,764|-98.59|32.61,765|-97.62|31.11,766|-97.06|31.7,767|-97.15|31.57,768|-99.37|31.23,769|-100.88|31.03,770|-95.39|29.79,772|-95.37|29.77,773|-95.24|30.48,774|-96.02|29.38,775|-94.98|29.68,776|-94.16|30.27,777|-94.19|29.96,778|-96.32|30.67,779|-96.95|28.92,780|-99.01|28.67,781|-97.93|29.08,782|-98.53|29.47,783|-98.14|27.63,784|-97.44|27.73,785|-98.19|26.39,786|-98.1|30.27,787|-97.78|30.3,788|-100.26|29.44,789|-96.87|29.92,790|-101.63|35.48,791|-101.85|35.21,792|-100.57|34.25,793|-102.15|33.37,794|-101.88|33.58,795|-100.31|32.7,796|-99.72|32.46,797|-102.22|31.57,798|-104.17|30.53,799|-106.16|31.8,800|-105.11|39.91,801|-104.47|39.51,802|-104.93|39.78,803|-105.31|40.04,804|-106.16|39.98,805|-105.35|40.57,806|-104.49|40.38,807|-103.09|40.4,808|-103.16|39.12,809|-104.67|38.79,810|-103.58|37.77,811|-106.39|37.54,812|-106.39|38.46,813|-108.42|37.49,814|-108.02|38.43,815|-108.7|38.92,816|-107.86|39.99,820|-105.27|41.31,821|-110.51|44.57,822|-104.67|42.39,823|-107.03|41.75,824|-108.65|44.32,825|-108.91|43.14,826|-106.43|43.1,827|-105|44.2,828|-106.71|44.55,829|-109.71|42.82,830|-110.51|43.7,831|-110.53|42.6,832|-112.17|42.66,833|-114.23|42.81,834|-111.63|43.86,835|-115.77|46.07,836|-115.99|44,837|-116.04|43.58,838|-116.47|47.77,840|-110.86|40.53,841|-111.81|40.71,843|-112.18|41.67,844|-112.01|41.23,845|-109.72|38.09,846|-111.68|39.63,847|-112.82|37.61,850|-112.09|33.63,851|-111.41|33,852|-111.69|33.6,853|-113.44|33.49,855|-110.3|33.43,856|-110.59|32,857|-111.09|32.18,859|-109.81|34.23,860|-111.15|35.89,863|-112.57|34.85,864|-113.79|35.66,865|-109.55|36.03,870|-106.9|35.22,871|-106.72|35.12,873|-108.56|35.44,874|-108.23|36.59,875|-106.04|36.27,877|-104.68|36.06,878|-107.94|34,879|-107.48|33.2,880|-108.03|32.37,881|-103.81|34.26,882|-104.07|32.87,883|-105.48|33.62,884|-103.79|35.74,890|-114.84|37,891|-115.42|36.33,893|-116.96|39.5,894|-118.06|41.29,895|-119.72|39.9,897|-119.8|39.18,898|-115.71|40.95,900|-118.32|34.04,902|-118.76|34.07,903|-118.34|33.95,904|-118.48|34.02,905|-118.33|33.83,906|-118.03|33.93,907|-118.45|33.39,908|-118.18|33.8,910|-118.25|34.28,911|-118.13|34.15,912|-118.25|34.19,913|-118.55|34.36,914|-118.47|34.18,915|-118.33|34.19,916|-118.38|34.18,917|-117.78|34.14,918|-118.13|34.09,919|-116.62|32.73,920|-116.7|33.16,921|-117.14|32.85,922|-115.5|33.59,923|-117.14|34.66,924|-117.33|34.17,925|-117.06|33.68,926|-117.73|33.63,927|-117.85|33.74,928|-117.71|33.85,930|-119.12|34.39,931|-119.97|34.48,932|-119.07|35.98,933|-119.01|35.35,934|-120.5|35.38,935|-118.36|37.37,936|-119.72|36.95,937|-119.85|36.71,939|-121.42|36.34,940|-122.31|37.41,941|-122.44|37.77,943|-122.13|37.44,944|-122.32|37.53,945|-122.05|38.09,946|-122.19|37.78,947|-122.26|37.89,948|-122.3|37.97,949|-122.74|38.14,950|-121.42|36.85,951|-121.76|37.33,952|-120.79|38.14,953|-120.56|37.62,954|-123.15|39.08,955|-123.75|40.5,956|-121.34|38.62,957|-120.86|39.13,958|-121.44|38.58,959|-121.73|39.47,960|-122.42|41.06,961|-120.33|40.52,967|-155.53|19.6,968|-157.83|21.34,969|144.77|13.45,970|-121.45|45.3,971|-123.79|45.64,972|-122.74|45.57,973|-123.26|44.68,974|-123.46|43.61,975|-123.06|42.34,976|-120.4|42.67,977|-120.77|44.32,978|-118.59|45.21,979|-117.63|43.34,980|-121.78|47.42,981|-122.32|47.6,982|-121.79|48.39,983|-123.87|47.96,984|-122.46|47.18,985|-123.27|46.94,986|-122.15|45.99,988|-119.91|48,989|-120.57|46.71,990|-117.56|47.62,991|-118.13|47.91,992|-117.4|47.67,993|-118.82|46.4,994|-117.21|46.2,995|-156.93|60.89,996|-151.66|60.82,997|-146.69|65.19,998|-136.2|58.94,999|-131.24|55.86",X="ABW|-70.02|12.54,AFG|68|34.63,AGO|14.24|-9.84,AIA|-63.06|18.22,ALA|19.93|60.1,ALB|19.81|41.14,AND|1.53|42.51,ARE|55.24|24.99,ARG|-61.28|-32.95,ARM|44.52|40.23,ASM|-170.7|-14.28,ATA|21.28|-80.52,ATF|70.22|-49.35,ATG|-61.84|17.12,AUS|144.91|-33.49,AUT|15.51|47.93,AZE|49.02|40.37,BDI|29.49|-3.34,BEL|4.37|50.89,BEN|2.33|7.65,BES|-68.27|12.15,BFA|-2.08|12.15,BGD|90.42|23.65,BGR|24.92|42.71,BHR|50.57|26.18,BHS|-77.34|25.06,BIH|17.97|44.18,BLM|-62.85|17.9,BLR|27.81|53.57,BLZ|-88.41|17.54,BMU|-64.78|32.29,BOL|-65.79|-17.39,BRA|-45.89|-17.51,BRB|-59.62|13.11,BRN|114.74|4.82,BTN|89.69|27.32,BWA|25.99|-23.43,CAF|18.32|4.94,CAN|-79.4|43.71,CCK|96.82|-12.16,CHE|7.96|47.07,CHL|-71.21|-33.72,CHN|114.44|32,CIV|-4.89|6.16,CMR|11.19|5.41,COD|20.23|-4.72,COG|14.18|-4.04,COK|-159.78|-21.21,COL|-74.85|5.93,COM|43.58|-11.89,CPV|-23.87|15.66,CRI|-84.14|9.99,CUB|-80.25|22.21,CUW|-68.88|12.12,CXR|105.68|-10.42,CYM|-81.38|19.32,CYP|33.31|35,CZE|15.44|49.89,DEU|9.65|51.24,DJI|43.15|11.59,DMA|-61.39|15.3,DNK|11.42|55.79,DOM|-70.07|18.75,DZA|3.55|35.62,ECU|-79.29|-1.4,EGY|31.22|29.84,ERI|38.84|15.25,ESH|-13.19|27.14,ESP|-2.91|39.69,EST|25.17|59.29,ETH|39.02|9.26,FIN|24.87|61.26,FJI|178.2|-17.85,FLK|-57.86|-51.69,FRA|2.87|47.28,FRO|-6.77|62.01,FSM|158.16|6.92,GAB|10.22|-0.06,GBR|-1.37|52.49,GEO|43.92|41.84,GGY|-2.54|49.46,GHA|-0.98|6.4,GIB|-5.35|36.14,GIN|-12.8|9.75,GLP|-61.53|16.23,GMB|-16.59|13.41,GNB|-15.48|11.9,GNQ|9.77|1.86,GRC|23.73|37.98,GRD|-61.75|12.05,GRL|-51.72|64.18,GTM|-90.71|14.73,GUF|-52.64|5.04,GUM|144.82|13.5,GUY|-58.11|6.63,HKG|114.15|22.33,HMD|73.5|-53.1,HND|-87.41|14.94,HRV|16.21|45.31,HTI|-72.34|18.54,HUN|19.21|47.39,IDN|106.85|-6.21,IMN|-4.48|54.15,IND|78.36|21,IOT|71.35|-6.19,IRL|-6.87|53.12,IRN|51.6|34.4,IRQ|44.78|33.65,ISL|-21.7|64.22,ISR|34.97|32.07,ITA|12|42.73,JAM|-76.91|18.03,JEY|-2.1|49.19,JOR|35.96|32.03,JPN|137.27|35.53,KAZ|70.17|47.24,KEN|36.81|-0.97,KGZ|73.96|41.94,KHM|104.7|11.75,KIR|172.98|1.33,KNA|-62.72|17.3,KOR|127.51|36.58,KWT|48.06|29.2,Kosovo|20.9|42.58,LAO|102.6|17.97,LBN|35.53|33.87,LBR|-10.39|6.36,LBY|13.19|32.89,LCA|-60.97|14.04,LIE|9.52|47.14,LKA|80.25|7.25,LSO|27.67|-29.38,LTU|24.18|55.04,LUX|6.08|49.56,LVA|24.13|56.85,MAC|113.55|22.19,MAF|-63.08|18.07,MAR|-6.65|33.43,MCO|7.42|43.74,MDA|28.82|47.09,MDG|47.46|-18.89,MDV|73.51|4.18,MEX|-100.65|21.59,MHL|171.38|7.09,MKD|21.47|41.8,MLI|-7.15|12.95,MLT|14.46|35.91,MMR|96.18|18.74,MNE|19.17|42.53,MNG|105.33|47.94,MNP|145.75|15.21,MOZ|32.58|-25.97,MRT|-14.58|18.01,MSR|-62.21|16.79,MTQ|-61.01|14.64,MUS|57.51|-20.23,MWI|34.34|-14.24,MYS|103.35|3.45,MYT|45.23|-12.77,N. Cyprus|33.56|35.27,NAM|17.19|-21.34,NCL|166.47|-22.26,NER|5.05|14.04,NFK|167.97|-29.05,NGA|5.91|7.87,NIC|-86.17|12.33,NIU|-169.92|-19.05,NLD|5.21|52.09,NOR|9.62|60.46,NPL|84.7|27.64,NRU|166.93|-0.55,NZL|174.54|-38.9,OMN|57.69|23.27,PAK|71.47|30.24,PAN|-79.83|8.98,PCN|-130.1|-25.07,PER|-76.4|-11.18,PHL|121.05|14.65,PLW|134.58|7.52,PNG|147.4|-7.71,POL|19.26|51.79,PRI|-66.24|18.35,PRK|126.54|39.52,PRT|-9.08|39.42,PRY|-57.15|-25.27,PSE|35.23|31.78,PYF|-149.59|-17.57,QAT|51.49|25.32,REU|55.45|-21.08,ROU|25.47|45.38,RUS|51.84|54.52,RWA|29.78|-1.98,SAU|43.01|23.76,SDN|31.67|14.67,SEN|-16.73|14.66,SGP|103.85|1.33,SGS|-36.51|-54.28,SHN|-5.72|-15.92,SJM|15.65|78.22,SLB|159.97|-9.44,SLE|-12.4|8.36,SLV|-89.08|13.7,SMR|12.45|43.94,SOM|44.96|4.91,SPM|-56.18|46.78,SRB|20.62|44.5,SSD|29.91|6.61,STP|6.73|0.34,SUR|-55.18|5.84,SVK|18.69|48.55,SVN|14.83|46.16,SWE|16.03|58.86,SWZ|31.28|-26.43,SXM|-63.05|18.03,SYC|55.46|-4.62,SYR|37.18|35.12,Somaliland|46.23|9.76,TCA|-72.1|21.74,TCD|16.57|11.53,TGO|1.16|6.8,THA|100.71|13.71,TJK|69.39|39.08,TKM|59.4|38.74,TLS|125.65|-8.67,TON|-175.2|-21.14,TTO|-61.4|10.5,TUN|10.23|35.87,TUR|32.1|39.5,TUV|179.19|-8.52,TWN|121.06|24.37,TZA|36.11|-5.88,UGA|32.23|0.59,UKR|32.8|48.99,URY|-56.28|-34.1,USA|-93.51|37.4,UZB|69.22|41.26,VAT|12.45|41.9,VCT|-61.21|13.14,VEN|-67.82|9.83,VGB|-64.62|18.43,VIR|-64.8|17.9,VNM|106.63|10.82,VUT|168.31|-17.74,WLF|-176.17|-13.28,WSM|-171.77|-13.83,YEM|44.62|14.36,ZAF|26.96|-28.33,ZMB|28.41|-13.86,ZWE|30.49|-18.56";var W={\u00F8:"o",\u0153:"oe",\u00E6:"ae",\u00DF:"ss",\u0142:"l",\u0111:"d",\u00F0:"d",\u00FE:"th",\u0131:"i",\u0127:"h",\u0167:"t",\u014B:"n",\u0138:"k",\u0259:"e",\u01DD:"e",\u0133:"ij",\u0140:"l",\u017F:"s"};function u(n){return n.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().replace(/[øœæßłđðþıħŧŋəĸ]/g,e=>W[e]).replace(/[^\p{L}\p{Nd}\s]/gu," ").replace(/\s+/g," ").trim()}var Z="AD AND,AE ARE,AF AFG,AG ATG,AI AIA,AL ALB,AM ARM,AO AGO,AQ ATA,AR ARG,AS ASM,AT AUT,AU AUS,AW ABW,AX ALA,AZ AZE,BA BIH,BB BRB,BD BGD,BE BEL,BF BFA,BG BGR,BH BHR,BI BDI,BJ BEN,BL BLM,BM BMU,BN BRN,BO BOL,BQ BES,BR BRA,BS BHS,BT BTN,BV BVT,BW BWA,BY BLR,BZ BLZ,CA CAN,CC CCK,CD COD,CF CAF,CG COG,CH CHE,CI CIV,CK COK,CL CHL,CM CMR,CN CHN,CO COL,CR CRI,CU CUB,CV CPV,CW CUW,CX CXR,CY CYP,CZ CZE,DE DEU,DJ DJI,DK DNK,DM DMA,DO DOM,DZ DZA,EC ECU,EE EST,EG EGY,EH ESH,ER ERI,ES ESP,ET ETH,FI FIN,FJ FJI,FK FLK,FM FSM,FO FRO,FR FRA,GA GAB,GB GBR,GD GRD,GE GEO,GF GUF,GG GGY,GH GHA,GI GIB,GL GRL,GM GMB,GN GIN,GP GLP,GQ GNQ,GR GRC,GS SGS,GT GTM,GU GUM,GW GNB,GY GUY,HK HKG,HM HMD,HN HND,HR HRV,HT HTI,HU HUN,ID IDN,IE IRL,IL ISR,IM IMN,IN IND,IO IOT,IQ IRQ,IR IRN,IS ISL,IT ITA,JE JEY,JM JAM,JO JOR,JP JPN,KE KEN,KG KGZ,KH KHM,KI KIR,KM COM,KN KNA,KP PRK,KR KOR,KW KWT,KY CYM,KZ KAZ,LA LAO,LB LBN,LC LCA,LI LIE,LK LKA,LR LBR,LS LSO,LT LTU,LU LUX,LV LVA,LY LBY,MA MAR,MC MCO,MD MDA,ME MNE,MF MAF,MG MDG,MH MHL,MK MKD,ML MLI,MM MMR,MN MNG,MO MAC,MP MNP,MQ MTQ,MR MRT,MS MSR,MT MLT,MU MUS,MV MDV,MW MWI,MX MEX,MY MYS,MZ MOZ,NA NAM,NC NCL,NE NER,NF NFK,NG NGA,NI NIC,NL NLD,NO NOR,NP NPL,NR NRU,NU NIU,NZ NZL,OM OMN,PA PAN,PE PER,PF PYF,PG PNG,PH PHL,PK PAK,PL POL,PM SPM,PN PCN,PR PRI,PS PSE,PT PRT,PW PLW,PY PRY,QA QAT,RE REU,RO ROU,RS SRB,RU RUS,RW RWA,SA SAU,SB SLB,SC SYC,SD SDN,SE SWE,SG SGP,SH SHN,SI SVN,SJ SJM,SK SVK,SL SLE,SM SMR,SN SEN,SO SOM,SR SUR,SS SSD,ST STP,SV SLV,SX SXM,SY SYR,SZ SWZ,TC TCA,TD TCD,TF ATF,TG TGO,TH THA,TJ TJK,TK TKL,TL TLS,TM TKM,TN TUN,TO TON,TR TUR,TT TTO,TV TUV,TW TWN,TZ TZA,UA UKR,UG UGA,UM UMI,US USA,UY URY,UZ UZB,VA VAT,VC VCT,VE VEN,VG VGB,VI VIR,VN VNM,VU VUT,WF WLF,WS WSM,YE YEM,YT MYT,ZA ZAF,ZM ZMB,ZW ZWE",m=(()=>{let n=new Map;for(let e of Z.split(",")){let[t,i]=e.split(" ");t&&i&&n.set(t,i)}return n})(),k=new Set(m.keys()),_=new Set(m.values()),z=["en","fr","es","de","it","pt","ru","ja","zh","ko","ar","hi","tr","pl","he","nl","sv","fi","no","da","cs","el","uk","ro","id","vi","th"],J={usa:"USA","u.s.":"USA","u.s.a.":"USA",us:"USA",america:"USA","united states of america":"USA","the united states":"USA",uk:"GBR","u.k.":"GBR","great britain":"GBR",britain:"GBR",england:"GBR","south korea":"KOR","north korea":"PRK",korea:"KOR","ivory coast":"CIV","cote d ivoire":"CIV",vietnam:"VNM",laos:"LAO",syria:"SYR",iran:"IRN",russia:"RUS",moldova:"MDA",tanzania:"TZA",bolivia:"BOL",venezuela:"VEN",brunei:"BRN","czech republic":"CZE",czechia:"CZE",slovakia:"SVK",uae:"ARE","united arab emirates":"ARE",drc:"COD","dr congo":"COD","democratic republic of the congo":"COD","republic of the congo":"COG",congo:"COG",swaziland:"SWZ",eswatini:"SWZ","cape verde":"CPV","cabo verde":"CPV",burma:"MMR",myanmar:"MMR",holland:"NLD","the netherlands":"NLD",netherlands:"NLD",vatican:"VAT","vatican city":"VAT",palestine:"PSE",macau:"MAC",macao:"MAC","hong kong":"HKG",taiwan:"TWN",turkey:"TUR",turkiye:"TUR",macedonia:"MKD","north macedonia":"MKD",gambia:"GMB","the gambia":"GMB",bahamas:"BHS","the bahamas":"BHS","east timor":"TLS","timor leste":"TLS"},L=null;function Q(){if(L)return L;let n=new Map,e=["en",...z.filter(t=>t!=="en")];for(let t of e){let i=null;try{i=new Intl.DisplayNames([t],{type:"region"})}catch{continue}for(let[o,a]of m){let r;try{r=i.of(o)}catch{r=void 0}if(!r||r===o)continue;let l=u(r);l&&!n.has(l)&&n.set(l,a)}}for(let[t,i]of Object.entries(J)){let o=u(t);o&&n.set(o,i)}return L=n,n}function I(n){return m.get(String(n||"").trim().toUpperCase())??null}function w(n){if(n==null)return null;let e=String(n).trim();if(!e)return null;let t=e.toUpperCase();return t.length===3&&_.has(t)?t:t.length===2&&k.has(t)?m.get(t)??null:Q().get(u(e))??null}var F={"north-america":"N",world:"W"},T=D;function A3(n){n!==T&&(T=n||"",g=null,G=null)}function v(){return T.length>0}var g=null;function K(){if(g)return g;let n=new Map,e=T,t=(i,o,a)=>{if(!i)return;let r=n.get(i);r?r.some(l=>l.row===o)||r.push({row:o,primary:a}):n.set(i,[{row:o,primary:a}])};for(let i of e.split(",")){let o=i.split("|");if(o.length<7)continue;let a={a1:o[1],cc:o[2],lon:+o[3],lat:+o[4],pop:+o[5],kinds:o[6]||"N"};if(t(u(o[0]),a,!0),o.length>7&&o[7])for(let r of o[7].split(";"))t(u(r),a,!1)}for(let i of n.values())i.sort((o,a)=>a.row.pop-o.row.pop);return g=n,n}var j=200,G=null;function $(){if(G)return G;let n=new Map;for(let[e,t]of K()){if(!e.endsWith(" city"))continue;let i=e.slice(0,-5);!i||K().get(i)?.some(o=>o.primary)||t[0].row.pop<j||n.set(i,t)}return G=n,n}function Y(n){if(!n)return;let e=K().get(n);if(e?.some(o=>o.primary))return e;let t=$().get(n);if(!t)return e;let i=t.map(o=>({row:o.row,primary:!0}));return e?[...i,...e]:i}var P=null;function q(){if(P)return P;let n=new Map;for(let e of X.split(",")){let t=e.split("|");t.length<3||n.set(t[0],{lon:+t[1],lat:+t[2]})}return P=n,n}var y=null;function O(){if(y)return y;let n=new Map;for(let e of h.split(",")){let t=e.split("|");if(t.length<5)continue;let i={key:t[0],cc:t[1],name:t[2],lon:+t[3],lat:+t[4]};n.set(u(i.key),i);let o=u(i.name);o==="mexico"&&i.cc==="MX"?(n.set("estado de mexico",i),n.set("edomex",i)):n.set(o,i)}return y=n,n}var B=null;function n3(){if(B)return B;let n=new Map;for(let e of b.split(",")){let t=e.split("|");t.length<3||n.set(t[0],{lon:+t[1],lat:+t[2]})}return B=n,n}function H(n){if(n==null)return null;let e=u(String(n));return e?O().get(e)?.key??null:null}var t3={us:"US",usa:"US","u s":"US","u s a":"US",america:"US","united states":"US","united states of america":"US",ca:"CA",can:"CA",canada:"CA",mx:"MX",mex:"MX",mexico:"MX","estados unidos mexicanos":"MX"};function C3(n){if(n==null)return null;let e=u(String(n));return e?t3[e]??null:null}function e3(n){return O().get(u(n))?.cc??null}function i3(n){let e=e3(n);return e?I(e):null}function R3(n){return x(n)[0]??null}function x(n){if(n==null)return[];let e=String(n).trim().replace(/\.0+$/,"");if(!e)return[];let t=/^(\d{5})(-\d{4})?$/.exec(e);if(t)return[t[1].slice(0,3)];if(/^\d{4}$/.test(e))return[e.padStart(5,"0").slice(0,3)];if(/^\d{3}$/.test(e)){let i=e.padStart(5,"0").slice(0,3);return i===e?[e]:[e,i]}return[]}function o3(n){return!!n&&n.ambiguous===!0&&!("precision"in n)}function r3(n){let e=null,t=typeof n.lat=="string"?n.lat.trim():n.lat,i=typeof n.lon=="string"?n.lon.trim():n.lon;if(t!=null&&t!==""&&i!==void 0&&i!==null&&i!==""){let r=+t,l=+i;if(isFinite(r)&&isFinite(l)&&r>=-90&&r<=90&&l>=-180&&l<=180)if(r===0&&l===0)e={lat:0,lon:0,precision:"latlon"};else return{lat:r,lon:l,precision:"latlon"}}let o=w(n.country),a=H(n.state);if(a&&o&&i3(a)!==o&&(a=null),n.city!==void 0&&n.city!==null){let r=u(String(n.city)),l=F[n.mapKind||"north-america"]??"N",f=Y(r);if(f){let C=n.state===void 0||n.state===null?"":String(n.state).trim(),d=C?u(C):"",p=C?H(C):null,S=[],R=-1;for(let s of f){let A=s.row;if(!A.kinds.includes(l))continue;let c=0;if(C&&A.a1!=="")if(p&&A.a1===p||u(A.a1)===d)c++;else continue;if(o)if(I(A.cc)===o)c++;else continue;c>R?(R=c,S=[s]):c===R&&S.push(s)}S.some(s=>s.primary)&&(S=S.filter(s=>s.primary));let N=new Map;for(let s of S)N.set(s.row.lon.toFixed(2)+","+s.row.lat.toFixed(2),s.row);if(N.size===1){let s=S[0].row;return{lat:s.lat,lon:s.lon,precision:"city"}}if(N.size>1)return{ambiguous:!0,matches:N.size}}}for(let r of x(n.zip)){let l=n3().get(r);if(l)return{lat:l.lat,lon:l.lon,precision:"zip3"}}if(a){let r=O().get(u(a));if(r)return{lat:r.lat,lon:r.lon,precision:"state"}}if(o){let r=q().get(o);if(r)return{lat:r.lat,lon:r.lon,precision:"country"}}return e}var U={latlon:0,city:1,zip3:2,state:3,country:4},V=8;function N3(n,e){let t=new Array(n.length),i=new Array(n.length),o=new Set,a=[],r=new Set,l=[],f=new Set,C=[],d={latlon:0,city:0,zip3:0,state:0,country:0},p=0,S=0,R=null;for(let s=0;s<n.length;++s){let A=n[s],c=r3({...A,mapKind:e});if(o3(c)){t[s]=null,i[s]=null,S++;let M=E(A);M&&!f.has(M.toLowerCase())&&(f.add(M.toLowerCase()),C.length<V&&C.push(M))}else if(c){if(t[s]=c.lat,i[s]=c.lon,p++,d[c.precision]++,(R===null||U[c.precision]>U[R])&&(R=c.precision),U[c.precision]>U.city){let M=E(A);M&&!r.has(M.toLowerCase())&&(r.add(M.toLowerCase()),l.length<V&&l.push(M))}}else{t[s]=null,i[s]=null;let M=E(A);M&&!o.has(M.toLowerCase())&&(o.add(M.toLowerCase()),a.push(M))}}let N=!v()&&n.some(s=>s.city!==null&&s.city!==void 0&&String(s.city).trim()!=="");return{lat:t,lon:i,precision:R,precisionCounts:d,coarseExamples:l,unmatched:a,ambiguousRows:S,ambiguousExamples:C,matchedRows:p,totalRows:n.length,...N?{cityTableMissing:!0}:{}}}function E(n){return[n.city,n.state,n.zip,n.country].filter(e=>e!=null&&String(e).trim()!=="").map(e=>String(e).trim()).join(", ")}function s3(n,e){if(!n)return!1;let t=Y(n);if(!t)return!1;let i=F[e||"north-america"]??"N";return t.some(o=>o.row.kinds.includes(i))}function f3(n,e){let t=new Set,i=0;for(let o of n){if(o==null)continue;let a=u(String(o));!a||t.has(a)||(t.add(a),s3(a,e)&&i++)}return t.size===0?0:Math.round(i/t.size*1e3)/10}export{u as a,m as b,k as c,_ as d,Q as e,A3 as f,v as g,H as h,C3 as i,R3 as j,x as k,o3 as l,r3 as m,N3 as n,s3 as o,f3 as p};
@@ -1,2 +1,2 @@
1
1
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{a as H}from"./chunk-QEH7WTLB.mjs";import{a as j,b as q}from"./chunk-2LR73DNS.mjs";import{a as Y,b as G,c as x}from"./chunk-NWDPA7DG.mjs";import{a as U}from"./chunk-FMHK6M3O.mjs";import{a as z,b as F,c as k}from"./chunk-WBEROMBG.mjs";import X from"papaparse";var Z=12,$=100,J=.3,Q=.9,tt=120,et=1900,nt=2100,it=0,st=20,rt=new Set(["id","ids","uuid","guid","key","zip","zipcode","postal","postalcode","ssn","code","codes","sku","isbn","msisdn","imei"]);function at(p){if(!p)return!1;let e=p.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_\-./]+/g," ").toLowerCase().split(/\s+/).filter(o=>o.length>0);return e.length===0?!1:rt.has(e[e.length-1])}var ot=/\b(year|yr|fy|fiscal\s*year|calendar\s*year)\b/i,ut=/^(?:(?:19|20)\d{2}(?:[-/ ]?(?:q[1-4]|w(?:0?[1-9]|[1-4]\d|5[0-3])|(?:0?[1-9]|1[0-2])))?|q[1-4][-/ ](?:19|20)\d{2}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*[-/ ]?(?:19|20)?\d{2})$/i;function W(p){if(!Number.isInteger(p)||p<190001||p>210012)return!1;let e=p%100;return e>=1&&e<=12}function P(p){if(!Number.isInteger(p)||p<19000101||p>21001231)return!1;let e=Math.floor(p/100)%100,o=p%100;return e>=1&&e<=12&&o>=1&&o<=31}function lt(p,e){if(!e||!/\b(?:19|20)\d{2}\b/.test(p))return!1;let o=p.replace(/\b(?:19|20)\d{2}\b/g,"").replace(/[-/.,]/g," ").trim();if(!o)return!1;let c=j(o);return c.length>0&&e[c]!==void 0}function ct(p){let{dataType:e,name:o,isMeasure:c,distinctCount:f}=p;if(e==="DateTime")return!0;if(c)return!1;if(e==="Integer"||e==="Decimal"){let n=p.minNum,b=p.maxNum;if(!(n!=null&&b!=null&&Number.isFinite(n)&&Number.isFinite(b)&&Number.isInteger(n)&&Number.isInteger(b)&&b>=n))return!1;let T=n>=1900&&b<=2100;if(T&&f>=2&&ot.test(o)||T&&f>=3&&f===b-n+1)return!0;let M=W(n)&&W(b),D=P(n)&&P(b);if(M||D){if(!p.sampleValues)return!0;let h=0,N=0;for(let l of p.sampleValues){if(l==null||l==="")continue;h++;let t=Number(String(l).trim());if(Number.isFinite(t)&&(M?W(t):P(t))&&N++,h>=60)break}if(h>=2&&N===h)return!0}return!1}if(p.sampleValues){let n=p.locale?q(p.locale):null,b=0,I=0;for(let T of p.sampleValues){if(T==null||T==="")continue;b++;let M=String(T).trim();if((ut.test(M)||lt(M,n))&&I++,b>=60)break}if(b>=2&&I/b>=.8)return!0}return!1}function mt(p){let e=(p||"").trim().toLowerCase();return e.startsWith("sum ")||e.startsWith("total ")?"sum":e.startsWith("average ")||e.startsWith("avg. ")?"avg":e.startsWith("count ")||e.startsWith("distinct count ")||e.startsWith("count (distinct) ")?"count":e.startsWith("min ")||e.startsWith("minimum ")?"min":e.startsWith("max ")||e.startsWith("maximum ")?"max":null}function ft(p){let{rows:e,measureColIdx:o,measureName:c,candidateDims:f,minNum:n,maxNum:b,discourageAgg:I}=p,T=100,M=.01,D="";for(let N of f){if(N.distinct<2||N.distinct>T)continue;let l=f.filter(i=>i.idx!==N.idx).map(i=>i.idx),t=new Map;for(let i of e){let u=i[o];if(typeof u!="number"||!Number.isFinite(u))continue;let d=l.length?l.map(y=>String(i[y])).join(D):"",g=t.get(d);g||(g={sum:0,cset:new Set},t.set(d,g)),g.sum+=u,g.cset.add(String(i[N.idx]))}let r=0,a=0,s=0;for(let i of t.values())i.cset.size<2||(s++,Math.abs(i.sum-100)<=100*M?r++:Math.abs(i.sum-1)<=1*M&&a++);if(s>=2&&(r/s>=.9||a/s>=.9))return{additivity:"part_of_whole",partOfWholeDim:N.name}}if(I)return{additivity:"intensive_rate"};let h=mt(c);return h==="avg"||h==="min"||h==="max"?{additivity:"intensive_rate"}:h==="sum"||h==="count"?{additivity:"additive"}:n!=null&&b!=null&&Number.isFinite(n)&&Number.isFinite(b)&&n>=0&&b<=1.0001&&b>0?{additivity:"intensive_rate"}:{additivity:"unknown"}}function B(p){let{dataType:e,isMeasure:o,name:c,distinct:f,nonblank:n,prec:b,maxval:I,minval:T}=p,M=I-T+1,D=M>0?f/M:1,h=n>0?f/n:0,N=e==="Decimal"||b>0;return at(c)?"Categorical":D>=Q&&(z(c)&&f<=tt||T>=et&&I<=nt||T>=it&&I<=st)?"Ordinal":o||f>Z&&(N||f>=$||h>=J)?"Continuous":"Categorical"}var K=class{_computedStatsForLevel=null;_cols=[];_rows=[];_origIndices=[];_rowHashes=new Set;dedupRows=!0;STR(e){return e==null?"":e.toString()}getPrecision(e){if(!isFinite(e))return 0;let c=e.toString().split(".")[1];return c?c.length:0}getColumns(){return this._cols}hasTimeComponent(e){return!(e instanceof Date)||isNaN(e.getTime())?!1:e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0}getColumnsWithStats(e,o){if(this._computedStatsForLevel==e)return this._cols;let c=0,f=parseInt(e),n=[];for(let t of this._cols){let r=new Map,a=[],s=0,i=0,u=0,d=null,g=null,y=null,w=!1,R=!0,A=!0,v=null,S=!1;for(let C of this._rows){let m=C[c],_=this.STR(m);if(_!=""){if(s+=_.length,r.set(_,(r.get(_)||0)+1),i++,t.dataType=="Integer"||t.dataType=="Decimal"||t.dataType=="DateTime")if((d===null||m<d)&&(d=m),(g===null||m>g)&&(g=m),t.dataType=="Integer"||t.dataType=="Decimal"){if(y===null?y=m:y+=m,t.dataType=="Decimal"){let L=this.getPrecision(m);L>u&&(u=L)}a.push(m)}else w=w||this.hasTimeComponent(m);S&&(m<v?R=!1:m>v&&(A=!1)),v=m,S=!0}}if(i>=3&&(R&&!A?t.sortedDirection="asc":A&&!R?t.sortedDirection="desc":t.sortedDirection="none"),i>0&&r.size>0&&!t.isMeasure){let C=0,m=Number.MAX_SAFE_INTEGER;for(let _ of r.values())_>C&&(C=_),_<m&&(m=_);if(t.modalShare=C/i,t.minGroupCount=m===Number.MAX_SAFE_INTEGER?null:m,r.size===2){let _=[...r.keys()].map(V=>Y(V).trim().toLowerCase()).sort(),E=[["false","true"],["no","yes"],["n","y"],["0","1"],["f","t"]].some(V=>_[0]===V[0]&&_[1]===V[1]),O=/^(is|has)[_a-z0-9]|(?:default|churn|fraud|approv|convert|active|cancel|delinquen|flag|paid|win|pass|fail)/i.test(t.name);(E||O)&&(t.isBinaryFlag=!0)}}t.dataType=="DateTime"&&(t.dateWithTime=w),t.isTemporal=ct({dataType:t.dataType,name:t.name,isMeasure:t.isMeasure,distinctCount:r.size,minNum:typeof d=="number"?d:null,maxNum:typeof g=="number"?g:null,sampleValues:r.keys(),locale:o}),this.updateColumnStats10(f,t,i,r,u,g,d),this.updateColumnStats20(f,a,i,y,t,s,w,d,g,u,r,o),!t.isMeasure&&(t.dataType==="Integer"||t.dataType==="Decimal")&&B({dataType:t.dataType,isMeasure:!1,name:t.name,distinct:r.size,nonblank:i,prec:u,maxval:typeof g=="number"?g:0,minval:typeof d=="number"?d:0})==="Continuous"&&(t.isMeasure=!0),n[c]=t.isMeasure||r.size>2e3?null:new Set(r.keys()),c++}let b=[];this._cols.forEach((t,r)=>{t.isMeasure||b.push({idx:r,distinct:t.distinctCount??0,name:t.name})}),this._cols.forEach((t,r)=>{if(!t.isMeasure)return;let a=typeof t.lowValue=="number"?t.lowValue:null,s=typeof t.highValue=="number"?t.highValue:null,i=ft({rows:this._rows,measureColIdx:r,measureName:t.name,candidateDims:b,minNum:a,maxNum:s,discourageAgg:!!t.discourageAggregationAcrossGroups});t.additivity=i.additivity,i.partOfWholeDim&&(t.partOfWholeDim=i.partOfWholeDim)});let I=50,T=b.filter(t=>t.distinct>=2&&t.distinct<=I);this._cols.forEach((t,r)=>{if(!t.isMeasure)return;let a=[];for(let v of this._rows){let S=v[r];if(S==null||S==="")continue;let C=typeof S=="number"?S:parseFloat(S);isNaN(C)||a.push(C)}if(a.length===0)return;let s=[...a].sort((v,S)=>v-S),i=v=>s[Math.min(s.length-1,Math.max(0,Math.floor(v*(s.length-1))))],u=i(.5),d=i(.1),g=i(.9),y=Math.abs(u)>1e-9?Math.abs(u):Math.abs(s[s.length-1])>1e-9?Math.abs(s[s.length-1]):1;t.relativeDispersion=Math.round((g-d)/y*1e3)/1e3;let w=0;for(let v of a)w+=v;w/=a.length;let R=0;for(let v of a)R+=(v-w)*(v-w);if(R<=1e-12)return;let A=[];for(let v of T){let S=new Map;for(let m of this._rows){let _=m[r];if(_==null||_==="")continue;let L=typeof _=="number"?_:parseFloat(_);if(isNaN(L))continue;let E=this.STR(m[v.idx])+"",O=S.get(E);O?(O.s+=L,O.n++):S.set(E,{s:L,n:1})}let C=0;for(let m of S.values()){let _=m.s/m.n;C+=m.n*(_-w)*(_-w)}A.push({otherColumn:v.name,eta2:Math.round(C/R*1e4)/1e4})}A.length>0&&(t.groupDiscrimination=A)});let M=.97,D=5,h=this._cols.map((t,r)=>({c:t,i:r})).filter(t=>t.c.isMeasure);for(let t=0;t<h.length;t++)for(let r=t+1;r<h.length;r++){let a=h[t].i,s=h[r].i,i=0,u=0,d=0,g=0,y=0,w=0;for(let S of this._rows){let C=S[a],m=S[s];if(C==null||C===""||m===null||m===void 0||m==="")continue;let _=typeof C=="number"?C:parseFloat(C),L=typeof m=="number"?m:parseFloat(m);isNaN(_)||isNaN(L)||(i++,u+=_,d+=L,g+=_*_,y+=L*L,w+=_*L)}if(i<D)continue;let R=i*g-u*u,A=i*y-d*d;if(R<=1e-12||A<=1e-12)continue;let v=(i*w-u*d)/Math.sqrt(R*A);if(Math.abs(v)>=M){let S=h[t].c,C=h[r].c;S.collinearWithMeasures||(S.collinearWithMeasures=[]),C.collinearWithMeasures||(C.collinearWithMeasures=[]),S.collinearWithMeasures.push(C.name),C.collinearWithMeasures.push(S.name)}}for(let t=0;t<this._cols.length;t++){let r=n[t];if(!r||r.size===0)continue;let a=[];for(let s=0;s<this._cols.length;s++){if(s===t)continue;let i=n[s];if(!i||i.size===0)continue;let u=0;for(let g of r)i.has(g)&&u++;let d=Math.round(u/r.size*100);d>0&&a.push({otherColumn:this._cols[s].name,percentShared:d})}a.length>0&&(this._cols[t].sharedValueRatioWithOthers=a)}let N=50,l=[];for(let t=0;t<this._cols.length;t++){let r=n[t];r&&r.size>=2&&r.size<=N&&l.push(t)}if(l.length>=2){let t=new Map,r=(s,i)=>s+":"+i;for(let s=0;s<l.length;s++)for(let i=s+1;i<l.length;i++)t.set(r(l[s],l[i]),new Map);for(let s of this._rows)for(let i=0;i<l.length;i++){let u=this.STR(s[l[i]])+"";for(let d=i+1;d<l.length;d++){let g=""+this.STR(s[l[d]]),y=t.get(r(l[i],l[d])),w=u+""+g;y.set(w,(y.get(w)??0)+1)}}let a=new Map;for(let s=0;s<l.length;s++)for(let i=s+1;i<l.length;i++){let u=l[s],d=l[i],g=n[u].size,y=n[d].size,w=t.get(r(u,d)),R=w.size,A=0;for(let m of w.values())(A===0||m<A)&&(A=m);let v=Math.round(R/(g*y)*100),S=R===g,C=R===y;if((this._cols[u].categoricalPairStats||=[]).push({otherColumn:this._cols[d].name,fillPct:v,determinesOther:S,minCellCount:A,distinctCombinations:R}),(this._cols[d].categoricalPairStats||=[]).push({otherColumn:this._cols[u].name,fillPct:v,determinesOther:C,minCellCount:A,distinctCombinations:R}),S&&g>y){let m=a.get(u);(!m||y<m.card)&&a.set(u,{name:this._cols[d].name,card:y,ratio:y/g})}if(C&&y>g){let m=a.get(d);(!m||g<m.card)&&a.set(d,{name:this._cols[u].name,card:g,ratio:g/y})}}for(let[s,i]of a)this._cols[s].primaryParentColumn=i.name,this._cols[s].nestingRatio=Math.round(i.ratio*100)/100}return this._computedStatsForLevel=e,this._cols}updateColumnStats20(e,o,c,f,n,b,I,T,M,D,h,N){if(e>=20){let l=[...o].sort((a,s)=>a-s),t=Math.floor(l.length/2);if(c>0&&f!=null?n.avgValue=n.dataType=="Integer"?Math.round(f/c):f/c:n.avgValue=null,c>0&&(n.avgLength=b/c),this._rows.length>0&&(n.dataType!="DateTime"||I||!T?n.lowValue=T:n.lowValue=new Date(T).toISOString().slice(0,10)+"T00:00:00.000Z",n.dataType!="DateTime"||I||!M?n.highValue=M:n.highValue=new Date(M).toISOString().slice(0,10)+"T00:00:00.000Z",n.medianValue=l.length===0?null:l.length%2===0?n.dataType=="Integer"?Math.round((l[t-1]+l[t])/2):(l[t-1]+l[t])/2:l[t],n.numericPrecision=D),l.length>0){let a=n.avgValue??0,s=l.length,i=0,u=0;for(let g of l){let y=g-a;i+=y*y,u+=y*y*y}let d=i/s;n.skewness=d===0?0:u/s/Math.pow(Math.sqrt(d),3),n.stdDev=Math.sqrt(d)}f!==null&&(n.sum=f);let r=Array.from(h.entries()).sort((a,s)=>s[1]-a[1]);if(n.topCategories=r.slice(0,10).map(a=>a[1]),!n.isMeasure&&r.length>0){if(n.dataType==="String"){let s=r.map(u=>u[0]);n.formatSignature=H(s);let i=/^(UUID|EMAIL_LIKE|URL_LIKE|PHONE_LIKE|NUMERIC_ID|HEX_ID|OPAQUE_ID_ALPHANUMERIC|DATE_STR|BOOLEAN)$/;n.formatSignature&&!i.test(n.formatSignature)&&(n.avgLength===void 0||n.avgLength>=3)&&(n.isFreeText=!0)}else n.topCategoryValues=r.slice(0,5).map(s=>s[0]);if(e>=20){let s=r.map(u=>u[0]),i=k(s,N);if(i!==null)n.ordinalPattern=i.pattern,n.orderedDomain=i.orderedDomain;else if(n.dataType==="String"){let u=F(s);u!==null&&(n.safeDistinctValues=u)}}let a=U(r.map(s=>s[0]),n.name,N);a!==null&&(n.geoKind=a.geoKind,n.geoMatchPct=a.geoMatchPct,a.geoAmbiguous&&(n.geoAmbiguous=!0))}if(l.length>=8&&(n.dataType==="Integer"||n.dataType==="Decimal")){let a=s=>l[Math.floor((l.length-1)*s)];n.quantiles={p05:a(.05),p25:a(.25),p75:a(.75),p95:a(.95)}}}}updateColumnStats10(e,o,c,f,n,b,I){e>=10&&(o.blankCount=this._rows.length-c,o.distinctCount=f.size+(o.blankCount!=0?1:0),o.valueNature="Categorical",c>0&&(o.dataType==="Integer"||o.dataType==="Decimal"?o.valueNature=B({dataType:o.dataType,isMeasure:!!o.isMeasure,name:o.name,distinct:f.size,nonblank:c,prec:n,maxval:b,minval:I}):o.dataType==="DateTime"&&(o.valueNature=o.dateWithTime?"Continuous":"Ordinal")))}getRowCount(){return this._rows.length}getLeafCardinality(){if(this._leafCardinality!==null)return this._leafCardinality;let e=[];if(this._cols.forEach((c,f)=>{c.isMeasure||e.push(f)}),e.length===0)return this._leafCardinality=this._rows.length,this._leafCardinality;let o=new Set;for(let c of this._rows)o.add(JSON.stringify(e.map(f=>c[f])));return this._leafCardinality=o.size,this._leafCardinality}_leafCardinality=null;obfuscateString(e){let o="abcdefghijklmnopqrstuvwxyz",c=()=>o[Math.floor(x()*o.length)],f=()=>c().toUpperCase(),n=()=>Math.floor(x()*10).toString(),b=t=>/[A-Z]/.test(t)?f():/[a-z]/.test(t)?c():/[0-9]/.test(t)?n():t,I=e.includes("@")&&e.includes("."),T=I?e.split("@"):[e],M=I?T[1]:"",D=M.endsWith(".com"),h=D?".com":"",N=D?M.slice(0,-4):M,l=t=>{let r="";for(let a of t)r+=b(a),/[a-zA-Z0-9]/.test(a)&&x()<.2&&(r+=b(a));if(r.length>6){let a=Math.floor(x()*Math.min(3,r.length-6));for(let s=0;s<a;s++){let i=0;for(;i<5;){let u=Math.floor(x()*r.length);if(/[a-zA-Z0-9]/.test(r[u])){r=r.slice(0,u)+r.slice(u+1);break}i++}}}return r};if(I){let t=l(T[0]),r=l(N);return`${t}@${r}${h}`}else return l(e)}toObjectArray(){return this._rows.map(e=>{let o={};return this._cols.forEach((c,f)=>{o[c.name]=e[f]}),o})}async getCSVAsync(e){let o=[],c=e?25:1e7,f=e?4e3:1e7,n=new Map;for(let I of this._rows){let T={};for(let M=0;M<this._cols.length;M++){let D=this._cols[M],h=I[M];if(this.STR(h)!=""){if(e&&D.dataType=="String")if(n.has(h))h=n.get(h);else{let N=this.obfuscateString(h);n.set(h,N),h=N}else D.dataType=="DateTime"&&!D.dateWithTime&&(h=new Date(h).toISOString().slice(0,10)+"T00:00:00.000Z");f-=this.STR(h).length}else h=null;T[M]=h,--f}if(o.push(T),--c,c<=0||f<=0)break}return await X.unparse(o,{header:!1})}getCSVHeaderLine(){return X.unparse([this._cols.map(e=>this.STR(e.name))])}addRow(e,o){if(this.dedupRows){let c="";for(let n of e)c+=this.STR(n)+"~";let f=G(c);if(this._rowHashes.has(f))return!1;this._rowHashes.add(f)}return this._rows.push(e),this._origIndices.push(o??-1),!0}getOriginalRowIndex(e){return e<0||e>=this._origIndices.length?-1:this._origIndices[e]}reset(){this._cols=[],this._rows=[],this._origIndices=[],this._rowHashes=new Set,this._leafCardinality=null}setColumns(e){this._cols=e}};export{at as a,ct as b,mt as c,ft as d,B as e,K as f};
2
+ import{a as H}from"./chunk-QEH7WTLB.mjs";import{a as j,b as q}from"./chunk-2LR73DNS.mjs";import{a as Y,b as G,c as x}from"./chunk-NWDPA7DG.mjs";import{a as U}from"./chunk-EYYD532M.mjs";import{a as z,b as F,c as k}from"./chunk-WBEROMBG.mjs";import X from"papaparse";var Z=12,$=100,J=.3,Q=.9,tt=120,et=1900,nt=2100,it=0,st=20,rt=new Set(["id","ids","uuid","guid","key","zip","zipcode","postal","postalcode","ssn","code","codes","sku","isbn","msisdn","imei"]);function at(p){if(!p)return!1;let e=p.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_\-./]+/g," ").toLowerCase().split(/\s+/).filter(o=>o.length>0);return e.length===0?!1:rt.has(e[e.length-1])}var ot=/\b(year|yr|fy|fiscal\s*year|calendar\s*year)\b/i,ut=/^(?:(?:19|20)\d{2}(?:[-/ ]?(?:q[1-4]|w(?:0?[1-9]|[1-4]\d|5[0-3])|(?:0?[1-9]|1[0-2])))?|q[1-4][-/ ](?:19|20)\d{2}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*[-/ ]?(?:19|20)?\d{2})$/i;function W(p){if(!Number.isInteger(p)||p<190001||p>210012)return!1;let e=p%100;return e>=1&&e<=12}function P(p){if(!Number.isInteger(p)||p<19000101||p>21001231)return!1;let e=Math.floor(p/100)%100,o=p%100;return e>=1&&e<=12&&o>=1&&o<=31}function lt(p,e){if(!e||!/\b(?:19|20)\d{2}\b/.test(p))return!1;let o=p.replace(/\b(?:19|20)\d{2}\b/g,"").replace(/[-/.,]/g," ").trim();if(!o)return!1;let c=j(o);return c.length>0&&e[c]!==void 0}function ct(p){let{dataType:e,name:o,isMeasure:c,distinctCount:f}=p;if(e==="DateTime")return!0;if(c)return!1;if(e==="Integer"||e==="Decimal"){let n=p.minNum,b=p.maxNum;if(!(n!=null&&b!=null&&Number.isFinite(n)&&Number.isFinite(b)&&Number.isInteger(n)&&Number.isInteger(b)&&b>=n))return!1;let T=n>=1900&&b<=2100;if(T&&f>=2&&ot.test(o)||T&&f>=3&&f===b-n+1)return!0;let M=W(n)&&W(b),D=P(n)&&P(b);if(M||D){if(!p.sampleValues)return!0;let h=0,N=0;for(let l of p.sampleValues){if(l==null||l==="")continue;h++;let t=Number(String(l).trim());if(Number.isFinite(t)&&(M?W(t):P(t))&&N++,h>=60)break}if(h>=2&&N===h)return!0}return!1}if(p.sampleValues){let n=p.locale?q(p.locale):null,b=0,I=0;for(let T of p.sampleValues){if(T==null||T==="")continue;b++;let M=String(T).trim();if((ut.test(M)||lt(M,n))&&I++,b>=60)break}if(b>=2&&I/b>=.8)return!0}return!1}function mt(p){let e=(p||"").trim().toLowerCase();return e.startsWith("sum ")||e.startsWith("total ")?"sum":e.startsWith("average ")||e.startsWith("avg. ")?"avg":e.startsWith("count ")||e.startsWith("distinct count ")||e.startsWith("count (distinct) ")?"count":e.startsWith("min ")||e.startsWith("minimum ")?"min":e.startsWith("max ")||e.startsWith("maximum ")?"max":null}function ft(p){let{rows:e,measureColIdx:o,measureName:c,candidateDims:f,minNum:n,maxNum:b,discourageAgg:I}=p,T=100,M=.01,D="";for(let N of f){if(N.distinct<2||N.distinct>T)continue;let l=f.filter(i=>i.idx!==N.idx).map(i=>i.idx),t=new Map;for(let i of e){let u=i[o];if(typeof u!="number"||!Number.isFinite(u))continue;let d=l.length?l.map(y=>String(i[y])).join(D):"",g=t.get(d);g||(g={sum:0,cset:new Set},t.set(d,g)),g.sum+=u,g.cset.add(String(i[N.idx]))}let r=0,a=0,s=0;for(let i of t.values())i.cset.size<2||(s++,Math.abs(i.sum-100)<=100*M?r++:Math.abs(i.sum-1)<=1*M&&a++);if(s>=2&&(r/s>=.9||a/s>=.9))return{additivity:"part_of_whole",partOfWholeDim:N.name}}if(I)return{additivity:"intensive_rate"};let h=mt(c);return h==="avg"||h==="min"||h==="max"?{additivity:"intensive_rate"}:h==="sum"||h==="count"?{additivity:"additive"}:n!=null&&b!=null&&Number.isFinite(n)&&Number.isFinite(b)&&n>=0&&b<=1.0001&&b>0?{additivity:"intensive_rate"}:{additivity:"unknown"}}function B(p){let{dataType:e,isMeasure:o,name:c,distinct:f,nonblank:n,prec:b,maxval:I,minval:T}=p,M=I-T+1,D=M>0?f/M:1,h=n>0?f/n:0,N=e==="Decimal"||b>0;return at(c)?"Categorical":D>=Q&&(z(c)&&f<=tt||T>=et&&I<=nt||T>=it&&I<=st)?"Ordinal":o||f>Z&&(N||f>=$||h>=J)?"Continuous":"Categorical"}var K=class{_computedStatsForLevel=null;_cols=[];_rows=[];_origIndices=[];_rowHashes=new Set;dedupRows=!0;STR(e){return e==null?"":e.toString()}getPrecision(e){if(!isFinite(e))return 0;let c=e.toString().split(".")[1];return c?c.length:0}getColumns(){return this._cols}hasTimeComponent(e){return!(e instanceof Date)||isNaN(e.getTime())?!1:e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0}getColumnsWithStats(e,o){if(this._computedStatsForLevel==e)return this._cols;let c=0,f=parseInt(e),n=[];for(let t of this._cols){let r=new Map,a=[],s=0,i=0,u=0,d=null,g=null,y=null,w=!1,R=!0,A=!0,v=null,S=!1;for(let C of this._rows){let m=C[c],_=this.STR(m);if(_!=""){if(s+=_.length,r.set(_,(r.get(_)||0)+1),i++,t.dataType=="Integer"||t.dataType=="Decimal"||t.dataType=="DateTime")if((d===null||m<d)&&(d=m),(g===null||m>g)&&(g=m),t.dataType=="Integer"||t.dataType=="Decimal"){if(y===null?y=m:y+=m,t.dataType=="Decimal"){let L=this.getPrecision(m);L>u&&(u=L)}a.push(m)}else w=w||this.hasTimeComponent(m);S&&(m<v?R=!1:m>v&&(A=!1)),v=m,S=!0}}if(i>=3&&(R&&!A?t.sortedDirection="asc":A&&!R?t.sortedDirection="desc":t.sortedDirection="none"),i>0&&r.size>0&&!t.isMeasure){let C=0,m=Number.MAX_SAFE_INTEGER;for(let _ of r.values())_>C&&(C=_),_<m&&(m=_);if(t.modalShare=C/i,t.minGroupCount=m===Number.MAX_SAFE_INTEGER?null:m,r.size===2){let _=[...r.keys()].map(V=>Y(V).trim().toLowerCase()).sort(),E=[["false","true"],["no","yes"],["n","y"],["0","1"],["f","t"]].some(V=>_[0]===V[0]&&_[1]===V[1]),O=/^(is|has)[_a-z0-9]|(?:default|churn|fraud|approv|convert|active|cancel|delinquen|flag|paid|win|pass|fail)/i.test(t.name);(E||O)&&(t.isBinaryFlag=!0)}}t.dataType=="DateTime"&&(t.dateWithTime=w),t.isTemporal=ct({dataType:t.dataType,name:t.name,isMeasure:t.isMeasure,distinctCount:r.size,minNum:typeof d=="number"?d:null,maxNum:typeof g=="number"?g:null,sampleValues:r.keys(),locale:o}),this.updateColumnStats10(f,t,i,r,u,g,d),this.updateColumnStats20(f,a,i,y,t,s,w,d,g,u,r,o),!t.isMeasure&&(t.dataType==="Integer"||t.dataType==="Decimal")&&B({dataType:t.dataType,isMeasure:!1,name:t.name,distinct:r.size,nonblank:i,prec:u,maxval:typeof g=="number"?g:0,minval:typeof d=="number"?d:0})==="Continuous"&&(t.isMeasure=!0),n[c]=t.isMeasure||r.size>2e3?null:new Set(r.keys()),c++}let b=[];this._cols.forEach((t,r)=>{t.isMeasure||b.push({idx:r,distinct:t.distinctCount??0,name:t.name})}),this._cols.forEach((t,r)=>{if(!t.isMeasure)return;let a=typeof t.lowValue=="number"?t.lowValue:null,s=typeof t.highValue=="number"?t.highValue:null,i=ft({rows:this._rows,measureColIdx:r,measureName:t.name,candidateDims:b,minNum:a,maxNum:s,discourageAgg:!!t.discourageAggregationAcrossGroups});t.additivity=i.additivity,i.partOfWholeDim&&(t.partOfWholeDim=i.partOfWholeDim)});let I=50,T=b.filter(t=>t.distinct>=2&&t.distinct<=I);this._cols.forEach((t,r)=>{if(!t.isMeasure)return;let a=[];for(let v of this._rows){let S=v[r];if(S==null||S==="")continue;let C=typeof S=="number"?S:parseFloat(S);isNaN(C)||a.push(C)}if(a.length===0)return;let s=[...a].sort((v,S)=>v-S),i=v=>s[Math.min(s.length-1,Math.max(0,Math.floor(v*(s.length-1))))],u=i(.5),d=i(.1),g=i(.9),y=Math.abs(u)>1e-9?Math.abs(u):Math.abs(s[s.length-1])>1e-9?Math.abs(s[s.length-1]):1;t.relativeDispersion=Math.round((g-d)/y*1e3)/1e3;let w=0;for(let v of a)w+=v;w/=a.length;let R=0;for(let v of a)R+=(v-w)*(v-w);if(R<=1e-12)return;let A=[];for(let v of T){let S=new Map;for(let m of this._rows){let _=m[r];if(_==null||_==="")continue;let L=typeof _=="number"?_:parseFloat(_);if(isNaN(L))continue;let E=this.STR(m[v.idx])+"",O=S.get(E);O?(O.s+=L,O.n++):S.set(E,{s:L,n:1})}let C=0;for(let m of S.values()){let _=m.s/m.n;C+=m.n*(_-w)*(_-w)}A.push({otherColumn:v.name,eta2:Math.round(C/R*1e4)/1e4})}A.length>0&&(t.groupDiscrimination=A)});let M=.97,D=5,h=this._cols.map((t,r)=>({c:t,i:r})).filter(t=>t.c.isMeasure);for(let t=0;t<h.length;t++)for(let r=t+1;r<h.length;r++){let a=h[t].i,s=h[r].i,i=0,u=0,d=0,g=0,y=0,w=0;for(let S of this._rows){let C=S[a],m=S[s];if(C==null||C===""||m===null||m===void 0||m==="")continue;let _=typeof C=="number"?C:parseFloat(C),L=typeof m=="number"?m:parseFloat(m);isNaN(_)||isNaN(L)||(i++,u+=_,d+=L,g+=_*_,y+=L*L,w+=_*L)}if(i<D)continue;let R=i*g-u*u,A=i*y-d*d;if(R<=1e-12||A<=1e-12)continue;let v=(i*w-u*d)/Math.sqrt(R*A);if(Math.abs(v)>=M){let S=h[t].c,C=h[r].c;S.collinearWithMeasures||(S.collinearWithMeasures=[]),C.collinearWithMeasures||(C.collinearWithMeasures=[]),S.collinearWithMeasures.push(C.name),C.collinearWithMeasures.push(S.name)}}for(let t=0;t<this._cols.length;t++){let r=n[t];if(!r||r.size===0)continue;let a=[];for(let s=0;s<this._cols.length;s++){if(s===t)continue;let i=n[s];if(!i||i.size===0)continue;let u=0;for(let g of r)i.has(g)&&u++;let d=Math.round(u/r.size*100);d>0&&a.push({otherColumn:this._cols[s].name,percentShared:d})}a.length>0&&(this._cols[t].sharedValueRatioWithOthers=a)}let N=50,l=[];for(let t=0;t<this._cols.length;t++){let r=n[t];r&&r.size>=2&&r.size<=N&&l.push(t)}if(l.length>=2){let t=new Map,r=(s,i)=>s+":"+i;for(let s=0;s<l.length;s++)for(let i=s+1;i<l.length;i++)t.set(r(l[s],l[i]),new Map);for(let s of this._rows)for(let i=0;i<l.length;i++){let u=this.STR(s[l[i]])+"";for(let d=i+1;d<l.length;d++){let g=""+this.STR(s[l[d]]),y=t.get(r(l[i],l[d])),w=u+""+g;y.set(w,(y.get(w)??0)+1)}}let a=new Map;for(let s=0;s<l.length;s++)for(let i=s+1;i<l.length;i++){let u=l[s],d=l[i],g=n[u].size,y=n[d].size,w=t.get(r(u,d)),R=w.size,A=0;for(let m of w.values())(A===0||m<A)&&(A=m);let v=Math.round(R/(g*y)*100),S=R===g,C=R===y;if((this._cols[u].categoricalPairStats||=[]).push({otherColumn:this._cols[d].name,fillPct:v,determinesOther:S,minCellCount:A,distinctCombinations:R}),(this._cols[d].categoricalPairStats||=[]).push({otherColumn:this._cols[u].name,fillPct:v,determinesOther:C,minCellCount:A,distinctCombinations:R}),S&&g>y){let m=a.get(u);(!m||y<m.card)&&a.set(u,{name:this._cols[d].name,card:y,ratio:y/g})}if(C&&y>g){let m=a.get(d);(!m||g<m.card)&&a.set(d,{name:this._cols[u].name,card:g,ratio:g/y})}}for(let[s,i]of a)this._cols[s].primaryParentColumn=i.name,this._cols[s].nestingRatio=Math.round(i.ratio*100)/100}return this._computedStatsForLevel=e,this._cols}updateColumnStats20(e,o,c,f,n,b,I,T,M,D,h,N){if(e>=20){let l=[...o].sort((a,s)=>a-s),t=Math.floor(l.length/2);if(c>0&&f!=null?n.avgValue=n.dataType=="Integer"?Math.round(f/c):f/c:n.avgValue=null,c>0&&(n.avgLength=b/c),this._rows.length>0&&(n.dataType!="DateTime"||I||!T?n.lowValue=T:n.lowValue=new Date(T).toISOString().slice(0,10)+"T00:00:00.000Z",n.dataType!="DateTime"||I||!M?n.highValue=M:n.highValue=new Date(M).toISOString().slice(0,10)+"T00:00:00.000Z",n.medianValue=l.length===0?null:l.length%2===0?n.dataType=="Integer"?Math.round((l[t-1]+l[t])/2):(l[t-1]+l[t])/2:l[t],n.numericPrecision=D),l.length>0){let a=n.avgValue??0,s=l.length,i=0,u=0;for(let g of l){let y=g-a;i+=y*y,u+=y*y*y}let d=i/s;n.skewness=d===0?0:u/s/Math.pow(Math.sqrt(d),3),n.stdDev=Math.sqrt(d)}f!==null&&(n.sum=f);let r=Array.from(h.entries()).sort((a,s)=>s[1]-a[1]);if(n.topCategories=r.slice(0,10).map(a=>a[1]),!n.isMeasure&&r.length>0){if(n.dataType==="String"){let s=r.map(u=>u[0]);n.formatSignature=H(s);let i=/^(UUID|EMAIL_LIKE|URL_LIKE|PHONE_LIKE|NUMERIC_ID|HEX_ID|OPAQUE_ID_ALPHANUMERIC|DATE_STR|BOOLEAN)$/;n.formatSignature&&!i.test(n.formatSignature)&&(n.avgLength===void 0||n.avgLength>=3)&&(n.isFreeText=!0)}else n.topCategoryValues=r.slice(0,5).map(s=>s[0]);if(e>=20){let s=r.map(u=>u[0]),i=k(s,N);if(i!==null)n.ordinalPattern=i.pattern,n.orderedDomain=i.orderedDomain;else if(n.dataType==="String"){let u=F(s);u!==null&&(n.safeDistinctValues=u)}}let a=U(r.map(s=>s[0]),n.name,N);a!==null&&(n.geoKind=a.geoKind,n.geoMatchPct=a.geoMatchPct,a.geoAmbiguous&&(n.geoAmbiguous=!0))}if(l.length>=8&&(n.dataType==="Integer"||n.dataType==="Decimal")){let a=s=>l[Math.floor((l.length-1)*s)];n.quantiles={p05:a(.05),p25:a(.25),p75:a(.75),p95:a(.95)}}}}updateColumnStats10(e,o,c,f,n,b,I){e>=10&&(o.blankCount=this._rows.length-c,o.distinctCount=f.size+(o.blankCount!=0?1:0),o.valueNature="Categorical",c>0&&(o.dataType==="Integer"||o.dataType==="Decimal"?o.valueNature=B({dataType:o.dataType,isMeasure:!!o.isMeasure,name:o.name,distinct:f.size,nonblank:c,prec:n,maxval:b,minval:I}):o.dataType==="DateTime"&&(o.valueNature=o.dateWithTime?"Continuous":"Ordinal")))}getRowCount(){return this._rows.length}getLeafCardinality(){if(this._leafCardinality!==null)return this._leafCardinality;let e=[];if(this._cols.forEach((c,f)=>{c.isMeasure||e.push(f)}),e.length===0)return this._leafCardinality=this._rows.length,this._leafCardinality;let o=new Set;for(let c of this._rows)o.add(JSON.stringify(e.map(f=>c[f])));return this._leafCardinality=o.size,this._leafCardinality}_leafCardinality=null;obfuscateString(e){let o="abcdefghijklmnopqrstuvwxyz",c=()=>o[Math.floor(x()*o.length)],f=()=>c().toUpperCase(),n=()=>Math.floor(x()*10).toString(),b=t=>/[A-Z]/.test(t)?f():/[a-z]/.test(t)?c():/[0-9]/.test(t)?n():t,I=e.includes("@")&&e.includes("."),T=I?e.split("@"):[e],M=I?T[1]:"",D=M.endsWith(".com"),h=D?".com":"",N=D?M.slice(0,-4):M,l=t=>{let r="";for(let a of t)r+=b(a),/[a-zA-Z0-9]/.test(a)&&x()<.2&&(r+=b(a));if(r.length>6){let a=Math.floor(x()*Math.min(3,r.length-6));for(let s=0;s<a;s++){let i=0;for(;i<5;){let u=Math.floor(x()*r.length);if(/[a-zA-Z0-9]/.test(r[u])){r=r.slice(0,u)+r.slice(u+1);break}i++}}}return r};if(I){let t=l(T[0]),r=l(N);return`${t}@${r}${h}`}else return l(e)}toObjectArray(){return this._rows.map(e=>{let o={};return this._cols.forEach((c,f)=>{o[c.name]=e[f]}),o})}async getCSVAsync(e){let o=[],c=e?25:1e7,f=e?4e3:1e7,n=new Map;for(let I of this._rows){let T={};for(let M=0;M<this._cols.length;M++){let D=this._cols[M],h=I[M];if(this.STR(h)!=""){if(e&&D.dataType=="String")if(n.has(h))h=n.get(h);else{let N=this.obfuscateString(h);n.set(h,N),h=N}else D.dataType=="DateTime"&&!D.dateWithTime&&(h=new Date(h).toISOString().slice(0,10)+"T00:00:00.000Z");f-=this.STR(h).length}else h=null;T[M]=h,--f}if(o.push(T),--c,c<=0||f<=0)break}return await X.unparse(o,{header:!1})}getCSVHeaderLine(){return X.unparse([this._cols.map(e=>this.STR(e.name))])}addRow(e,o){if(this.dedupRows){let c="";for(let n of e)c+=this.STR(n)+"~";let f=G(c);if(this._rowHashes.has(f))return!1;this._rowHashes.add(f)}return this._rows.push(e),this._origIndices.push(o??-1),!0}getOriginalRowIndex(e){return e<0||e>=this._origIndices.length?-1:this._origIndices[e]}reset(){this._cols=[],this._rows=[],this._origIndices=[],this._rowHashes=new Set,this._leafCardinality=null}setColumns(e){this._cols=e}};export{at as a,ct as b,mt as c,ft as d,B as e,K as f};
@@ -1,2 +1,2 @@
1
1
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{a,b,c,d}from"./chunk-FMHK6M3O.mjs";import"./chunk-HD4QWSPI.mjs";export{d as buildGeoIsoColumn,a as detectGeo,c as isJoinGeoKind,b as toGeoIso};
2
+ import{a,b,c,d}from"./chunk-EYYD532M.mjs";import"./chunk-KKD5PAZQ.mjs";import"./chunk-JH3W3DH7.mjs";export{d as buildGeoIsoColumn,a as detectGeo,c as isJoinGeoKind,b as toGeoIso};
package/dist/geoPoint.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l}from"./chunk-HD4QWSPI.mjs";export{j as buildGeoPointColumns,l as cityMatchPct,c as isCityTableLoaded,h as isGeoPointAmbiguity,k as isKnownCity,e as normalizeCountry,a as normalizePlaceName,b as registerCityTable,d as resolveAdmin1,i as resolveGeoPoint,g as zipPrefixCandidates,f as zipToPrefix3};
2
+ import{a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l}from"./chunk-KKD5PAZQ.mjs";import"./chunk-JH3W3DH7.mjs";export{j as buildGeoPointColumns,l as cityMatchPct,c as isCityTableLoaded,h as isGeoPointAmbiguity,k as isKnownCity,e as normalizeCountry,a as normalizePlaceName,b as registerCityTable,d as resolveAdmin1,i as resolveGeoPoint,g as zipPrefixCandidates,f as zipToPrefix3};