@bicharts/shape-core 0.6.103 → 0.6.106

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.
@@ -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 _,b as M,d as x,g as R,h as D,n as j}from"./chunk-CZJ7M6A5.mjs";import{f as p}from"./chunk-WC4JINEZ.mjs";import{a as S}from"./chunk-5HI6TVMM.mjs";var Pe=Object.freeze({hour:24,weekday:7,month:12,quarter:4,week:53,season:4}),J={nl:["jaar"],de:["jahr"],fr:["ann\xE9e"],es:["a\xF1o"],pt:["ano"],it:["anno"],pl:["rok"],cs:["rok"],sk:["rok"],sv:["\xE5r"],da:["\xE5r"],nb:["\xE5r"],fi:["vuosi"],hu:["\xE9v"],tr:["y\u0131l"],ro:["anul"],hr:["godina"],id:["tahun"],vi:["n\u0103m"],ru:["\u0433\u043E\u0434"],uk:["\u0440\u0456\u043A"],el:["\u03AD\u03C4\u03BF\u03C2"],zh:["\u5E74\u4EFD","\u5E74\u5EA6"],ja:["\u5E74\u5EA6"],ko:["\uC5F0\uB3C4","\uB144\uB3C4"],ar:["\u0633\u0646\u0629"],he:["\u05E9\u05E0\u05D4"],hi:["\u0935\u0930\u094D\u0937","\u0938\u093E\u0932"],th:["\u0E1B\u0E35\u0E07\u0E1A\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13"],fa:["\u0633\u0627\u0644"]},q={hour:{de:["stunde"],fr:["heure"],es:["hora"],pt:["hora"],it:["ora"],pl:["godzina"],cs:["hodina"],sk:["hodina"],sv:["timme"],fi:["tunti"],hu:["\xF3ra"],ro:["ora"],vi:["gi\u1EDD"],ru:["\u0447\u0430\u0441"],uk:["\u0433\u043E\u0434\u0438\u043D\u0430"],el:["\u03CE\u03C1\u03B1"],zh:["\u5C0F\u65F6"],ar:["\u0633\u0627\u0639\u0629"],he:["\u05E9\u05E2\u05D4"],hi:["\u0918\u0902\u091F\u093E"],th:["\u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07"],fa:["\u0633\u0627\u0639\u062A"]},weekday:{nl:["weekdag"],de:["wochentag"],sv:["veckodag"],da:["ugedag"],nb:["ukedag"],fi:["viikonp\xE4iv\xE4"],zh:["\u661F\u671F"],ja:["\u66DC\u65E5"],ko:["\uC694\uC77C"]},month:{nl:["maand"],de:["monat"],fr:["mois"],es:["mes"],pt:["m\xEAs"],it:["mese"],pl:["miesi\u0105c"],cs:["m\u011Bs\xEDc"],sk:["mesiac"],sv:["m\xE5nad"],da:["m\xE5ned"],nb:["m\xE5ned"],fi:["kuukausi"],hu:["h\xF3nap"],hr:["mjesec"],id:["bulan"],vi:["th\xE1ng"],ru:["\u043C\u0435\u0441\u044F\u0446"],uk:["\u043C\u0456\u0441\u044F\u0446\u044C"],el:["\u03BC\u03AE\u03BD\u03B1\u03C2"],zh:["\u6708\u4EFD"],ar:["\u0634\u0647\u0631"],he:["\u05D7\u05D5\u05D3\u05E9"],hi:["\u092E\u0939\u0940\u0928\u093E","\u092E\u093E\u0939"],th:["\u0E40\u0E14\u0E37\u0E2D\u0E19"],fa:["\u0645\u0627\u0647"]},quarter:{nl:["kwartaal"],de:["quartal"],fr:["trimestre"],es:["trimestre"],pt:["trimestre"],it:["trimestre"],pl:["kwarta\u0142"],cs:["\u010Dtvrtlet\xED"],sk:["\u0161tvr\u0165rok"],sv:["kvartal"],da:["kvartal"],nb:["kvartal"],fi:["vuosinelj\xE4nnes"],hu:["negyed\xE9v"],tr:["\xE7eyrek"],ro:["trimestru"],hr:["tromjese\u010Dje"],id:["kuartal","triwulan"],vi:["qu\xFD"],ru:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B"],uk:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B"],el:["\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"],zh:["\u5B63\u5EA6"],ja:["\u56DB\u534A\u671F"],ko:["\uBD84\uAE30"],ar:["\u0631\u0628\u0639"],he:["\u05E8\u05D1\u05E2\u05D5\u05DF"],hi:["\u0924\u093F\u092E\u093E\u0939\u0940"],th:["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A"]},week:{de:["woche"],fr:["semaine"],es:["semana"],pt:["semana"],it:["settimana"],pl:["tydzie\u0144"],cs:["t\xFDden"],sk:["t\xFD\u017Ede\u0148"],sv:["vecka"],da:["uge"],nb:["uke"],fi:["viikko"],hu:["h\xE9t"],tr:["hafta"],ro:["s\u0103pt\u0103m\xE2n\u0103"],hr:["tjedan"],id:["minggu"],vi:["tu\u1EA7n"],ru:["\u043D\u0435\u0434\u0435\u043B\u044F"],uk:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C"],el:["\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"],ar:["\u0623\u0633\u0628\u0648\u0639"],he:["\u05E9\u05D1\u05D5\u05E2"],hi:["\u0938\u092A\u094D\u0924\u093E\u0939"],th:["\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C"],fa:["\u0647\u0641\u062A\u0647"]},season:{nl:["seizoen"],de:["jahreszeit"],fr:["saison"],es:["temporada"],it:["stagione"],pl:["sezon"],cs:["sez\xF3na"],sk:["sez\xF3na"],sv:["s\xE4song","\xE5rstid"],da:["s\xE6son","\xE5rstid"],nb:["sesong","\xE5rstid"],fi:["vuodenaika"],hu:["\xE9vszak"],tr:["mevsim"],ro:["anotimp"],vi:["m\xF9a"],ru:["\u0441\u0435\u0437\u043E\u043D"],uk:["\u0441\u0435\u0437\u043E\u043D"],el:["\u03B5\u03C0\u03BF\u03C7\u03AE"],zh:["\u5B63\u8282"],ja:["\u5B63\u7BC0"],ko:["\uACC4\uC808"],ar:["\u0645\u0648\u0633\u0645"],he:["\u05E2\u05D5\u05E0\u05D4"],hi:["\u092E\u094C\u0938\u092E"],th:["\u0E24\u0E14\u0E39"],fa:["\u0641\u0635\u0644"]}},ee=["\xE5r","\xE9v","h\xE9t","\xF3ra"];function re(e,r,t){let n=p(t);if(!n)return null;let o=r.normalize("NFC").toLowerCase(),s=x(e).words;return s.includes(o)?"word":n.compounds&&s.some(i=>D(i,o,R))?"suffix":null}function O(e,r){let t=String(e??"");if(!t.trim())return null;for(let[n,o]of Object.entries(r))for(let s of o){let i=ee.includes(s)?re(t,s,n):j(t,s,n);if(i)return{lang:n,word:s,view:i}}return null}function z(e){return O(e,J)}function N(e){let r=null;for(let t of Object.keys(q)){let n=O(e,q[t]);if(n){if(r&&r.concept!==t)return null;r={concept:t,hit:n}}}return r}var ne=Object.freeze({quarter:4,half:2,week:53}),h={quarter:{en:{words:["quarter #","qtr #"],codes:["q #"]},nl:{words:["kwartaal #","# kwartaal","#e kwartaal","@ kwartaal"],codes:["k #"]},de:{words:["quartal #","# quartal","@ quartal"]},fr:{words:["trimestre #","# trimestre","#er trimestre","#e trimestre","#eme trimestre","@ trimestre"],codes:["t #","# t","trim. #"]},es:{words:["trimestre #","# trimestre","#er trimestre","#o trimestre","#\xBA trimestre","#\xB0 trimestre","@ trimestre"],codes:["t #","# t","trim. #"]},pt:{words:["trimestre #","# trimestre","#o trimestre","#\xBA trimestre","#\xB0 trimestre","@ trimestre"],codes:["t #","# t","#\xBA t","trim. #"]},it:{words:["trimestre #","# trimestre","#\xBA trimestre","#\xB0 trimestre","% trimestre","@ trimestre"],codes:["t #","trim. #"]},pl:{words:["kwarta\u0142 #","# kwarta\u0142","% kwarta\u0142","@ kwarta\u0142","# kw.","% kw."]},cs:{words:["\u010Dtvrtlet\xED #","# \u010Dtvrtlet\xED","% \u010Dtvrtlet\xED","@ \u010Dtvrtlet\xED"]},sk:{words:["\u0161tvr\u0165rok #","# \u0161tvr\u0165rok","% \u0161tvr\u0165rok","@ \u0161tvr\u0165rok"]},sv:{words:["kvartal #","# kvartalet","#:a kvartalet","#:e kvartalet","@ kvartalet"],codes:["k #"]},da:{words:["kvartal #","# kvartal","@ kvartal"],codes:["k #"]},nb:{words:["kvartal #","# kvartal","@ kvartal"],codes:["k #"]},fi:{words:["nelj\xE4nnes #","# nelj\xE4nnes","# vuosinelj\xE4nnes","vuosinelj\xE4nnes #"]},hu:{words:["negyed\xE9v #","# negyed\xE9v","% negyed\xE9v"]},tr:{words:["\xE7eyrek #","# \xE7eyrek","@ \xE7eyrek"],codes:["\xE7 #"]},ro:{words:["trimestrul #","trimestrul %","trimestru #"],codes:["t #"]},hr:{words:["tromjese\u010Dje #","# tromjese\u010Dje","% tromjese\u010Dje","kvartal #","# kvartal"]},id:{words:["kuartal #","kuartal %","kuartal ke #","triwulan #","triwulan %","triwulan ke #"],codes:["tw #","tw %"]},vi:{words:["qu\xFD #","qu\xFD %"]},ru:{words:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B #","# \u043A\u0432\u0430\u0440\u0442\u0430\u043B","% \u043A\u0432\u0430\u0440\u0442\u0430\u043B","@ \u043A\u0432\u0430\u0440\u0442\u0430\u043B","# \u043A\u0432.","% \u043A\u0432."]},uk:{words:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B #","# \u043A\u0432\u0430\u0440\u0442\u0430\u043B","% \u043A\u0432\u0430\u0440\u0442\u0430\u043B","@ \u043A\u0432\u0430\u0440\u0442\u0430\u043B","# \u043A\u0432.","% \u043A\u0432."]},el:{words:["\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF #","# \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF","#\u03BF \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF","@ \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"]},zh:{words:["\u7B2C#\u5B63\u5EA6","\u7B2C@\u5B63\u5EA6","@\u5B63\u5EA6","#\u5B63\u5EA6"]},ja:{words:["\u7B2C#\u56DB\u534A\u671F","\u7B2C@\u56DB\u534A\u671F","#\u56DB\u534A\u671F"],codes:["# q"]},ko:{words:["#\uBD84\uAE30","#/4\uBD84\uAE30"]},ar:{words:["\u0627\u0644\u0631\u0628\u0639 #","\u0627\u0644\u0631\u0628\u0639 @","\u0631\u0628\u0639 #"]},he:{words:["\u05E8\u05D1\u05E2\u05D5\u05DF #","\u05E8\u05D1\u05E2\u05D5\u05DF @"]},hi:{words:["\u0924\u093F\u092E\u093E\u0939\u0940 #","# \u0924\u093F\u092E\u093E\u0939\u0940","@ \u0924\u093F\u092E\u093E\u0939\u0940"]},th:{words:["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A #","\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A\u0E17\u0E35\u0E48 #"]}},half:{en:{words:["half #"],codes:["h #"]},nl:{words:["halfjaar #","# halfjaar","@ halfjaar"]},de:{words:["halbjahr #","# halbjahr","@ halbjahr"],codes:["hj #"]},fr:{words:["semestre #","# semestre","#er semestre","#e semestre","#eme semestre","@ semestre"],codes:["s #"]},es:{words:["semestre #","# semestre","#er semestre","#o semestre","#\xBA semestre","#\xB0 semestre","@ semestre"],codes:["s #","# s"]},pt:{words:["semestre #","# semestre","#o semestre","#\xBA semestre","#\xB0 semestre","@ semestre"],codes:["s #","# s"]},it:{words:["semestre #","# semestre","#\xBA semestre","#\xB0 semestre","% semestre","@ semestre"],codes:["s #"]},pl:{words:["p\xF3\u0142rocze #","# p\xF3\u0142rocze","% p\xF3\u0142rocze","@ p\xF3\u0142rocze"]},cs:{words:["pololet\xED #","# pololet\xED","% pololet\xED","@ pololet\xED"]},sk:{words:["polrok #","# polrok","% polrok"]},sv:{words:["halv\xE5r #","# halv\xE5ret","@ halv\xE5ret"]},da:{words:["halv\xE5r #","# halv\xE5r","@ halv\xE5r"]},nb:{words:["halv\xE5r #","# halv\xE5r","@ halv\xE5r"]},fi:{words:["vuosipuolisko #","# vuosipuolisko"]},hu:{words:["f\xE9l\xE9v #","# f\xE9l\xE9v","% f\xE9l\xE9v"]},tr:{words:["yar\u0131y\u0131l #","# yar\u0131y\u0131l","@ yar\u0131y\u0131l"]},ro:{words:["semestrul #","semestrul %"],codes:["s #"]},hr:{words:["polugodi\u0161te #","# polugodi\u0161te","% polugodi\u0161te"]},id:{words:["semester #","semester %"]},ru:{words:["\u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435 #","# \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435","% \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435","@ \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435"]},uk:{words:["\u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F #","# \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F","% \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F","@ \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F"]},el:{words:["\u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF #","# \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF","#\u03BF \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF","@ \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF"]},zh:{words:["\u4E0A\u534A\u5E74=1","\u4E0B\u534A\u5E74=2"]},ja:{words:["\u4E0A\u671F=1","\u4E0B\u671F=2","\u4E0A\u534A\u671F=1","\u4E0B\u534A\u671F=2"]},ko:{words:["\uC0C1\uBC18\uAE30=1","\uD558\uBC18\uAE30=2"]},ar:{words:["\u0627\u0644\u0646\u0635\u0641 @"]},he:{words:["\u05D7\u05E6\u05D9\u05D5\u05DF #"]},hi:{words:["\u091B\u092E\u093E\u0939\u0940 #","@ \u091B\u092E\u093E\u0939\u0940"]},th:{words:["\u0E04\u0E23\u0E36\u0E48\u0E07\u0E1B\u0E35\u0E41\u0E23\u0E01=1","\u0E04\u0E23\u0E36\u0E48\u0E07\u0E1B\u0E35\u0E2B\u0E25\u0E31\u0E07=2"]}},week:{en:{words:["week #","wk #"],codes:["w #"]},de:{words:["woche #","# woche","kw #"]},fr:{words:["semaine #","sem. #"],codes:["s #"]},es:{words:["semana #","sem. #"],codes:["s #"]},pt:{words:["semana #","sem. #"],codes:["s #"]},it:{words:["settimana #","sett. #"]},pl:{words:["tydzie\u0144 #","# tydzie\u0144","tydz. #"]},cs:{words:["t\xFDden #","# t\xFDden"]},sk:{words:["t\xFD\u017Ede\u0148 #","# t\xFD\u017Ede\u0148"]},sv:{words:["vecka #"],codes:["v #"]},da:{words:["uge #"]},nb:{words:["uke #"]},fi:{words:["viikko #","vko #","vk #"]},hu:{words:["h\xE9t #","# h\xE9t"]},tr:{words:["hafta #","# hafta"]},ro:{words:["s\u0103pt\u0103m\xE2na #"]},hr:{words:["tjedan #","# tjedan"]},id:{words:["minggu #","minggu ke #"]},vi:{words:["tu\u1EA7n #"]},ru:{words:["\u043D\u0435\u0434\u0435\u043B\u044F #","# \u043D\u0435\u0434\u0435\u043B\u044F","\u043D\u0435\u0434. #"]},uk:{words:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C #","# \u0442\u0438\u0436\u0434\u0435\u043D\u044C","\u0442\u0438\u0436. #"]},el:{words:["\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1 #","# \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"]},zh:{words:["\u7B2C#\u5468"]},ja:{words:["\u7B2C#\u9031"]},ko:{words:["#\uC8FC","#\uC8FC\uCC28"]},ar:{words:["\u0627\u0644\u0623\u0633\u0628\u0648\u0639 #","\u0623\u0633\u0628\u0648\u0639 #"]},he:{words:["\u05E9\u05D1\u05D5\u05E2 #"]},hi:{words:["\u0938\u092A\u094D\u0924\u093E\u0939 #"]},th:{words:["\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C #","\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C\u0E17\u0E35\u0E48 #"]}}},G={nl:[["eerste"],["tweede"],["derde"],["vierde"]],de:[["erstes","erste"],["zweites","zweite"],["drittes","dritte"],["viertes","vierte"]],fr:[["premier"],["deuxi\xE8me","second"],["troisi\xE8me"],["quatri\xE8me"]],es:[["primer","primero"],["segundo"],["tercer","tercero"],["cuarto"]],pt:[["primeiro"],["segundo"],["terceiro"],["quarto"]],it:[["primo"],["secondo"],["terzo"],["quarto"]],pl:[["pierwszy","pierwsze"],["drugi","drugie"],["trzeci","trzecie"],["czwarty","czwarte"]],cs:[["prvn\xED"],["druh\xE9","druh\xFD"],["t\u0159et\xED"],["\u010Dtvrt\xE9","\u010Dtvrt\xFD"]],sk:[["prv\xFD"],["druh\xFD"],["tret\xED"],["\u0161tvrt\xFD"]],sv:[["f\xF6rsta"],["andra"],["tredje"],["fj\xE4rde"]],da:[["f\xF8rste"],["andet","anden"],["tredje"],["fjerde"]],nb:[["f\xF8rste"],["andre"],["tredje"],["fjerde"]],tr:[["birinci","ilk"],["ikinci"],["\xFC\xE7\xFCnc\xFC"],["d\xF6rd\xFCnc\xFC"]],ru:[["\u043F\u0435\u0440\u0432\u044B\u0439","\u043F\u0435\u0440\u0432\u043E\u0435"],["\u0432\u0442\u043E\u0440\u043E\u0439","\u0432\u0442\u043E\u0440\u043E\u0435"],["\u0442\u0440\u0435\u0442\u0438\u0439","\u0442\u0440\u0435\u0442\u044C\u0435"],["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044B\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435"]],uk:[["\u043F\u0435\u0440\u0448\u0438\u0439","\u043F\u0435\u0440\u0448\u0435"],["\u0434\u0440\u0443\u0433\u0438\u0439","\u0434\u0440\u0443\u0433\u0435"],["\u0442\u0440\u0435\u0442\u0456\u0439","\u0442\u0440\u0435\u0442\u0454"],["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0435"]],el:[["\u03C0\u03C1\u03CE\u03C4\u03BF"],["\u03B4\u03B5\u03CD\u03C4\u03B5\u03C1\u03BF"],["\u03C4\u03C1\u03AF\u03C4\u03BF"],["\u03C4\u03AD\u03C4\u03B1\u03C1\u03C4\u03BF"]],zh:[["\u4E00"],["\u4E8C"],["\u4E09"],["\u56DB"]],ja:[["\u4E00"],["\u4E8C"],["\u4E09"],["\u56DB"]],ar:[["\u0627\u0644\u0623\u0648\u0644"],["\u0627\u0644\u062B\u0627\u0646\u064A"],["\u0627\u0644\u062B\u0627\u0644\u062B"],["\u0627\u0644\u0631\u0627\u0628\u0639"]],he:[["\u05E8\u05D0\u05E9\u05D5\u05DF"],["\u05E9\u05E0\u05D9"],["\u05E9\u05DC\u05D9\u05E9\u05D9"],["\u05E8\u05D1\u05D9\u05E2\u05D9"]],hi:[["\u092A\u0939\u0932\u0940","\u092A\u0939\u0932\u093E"],["\u0926\u0942\u0938\u0930\u0940","\u0926\u0942\u0938\u0930\u093E"],["\u0924\u0940\u0938\u0930\u0940","\u0924\u0940\u0938\u0930\u093E"],["\u091A\u094C\u0925\u0940","\u091A\u094C\u0925\u093E"]]},te=["\xE7 #"],oe=String.raw`[\s\-_./]*`,se={i:1,ii:2,iii:3,iv:4};function g(e,r){let t=String(e??"").normalize("NFC").toLowerCase();return r||(t=_(t)),t.replace(/[\s_]+/g," ").trim().replace(/\.+$/,"").trim()}function L(e){return/[.*+?^${}()|[\]\\]/.test(e)?"\\"+e:e}function E(e,r,t,n){let s=!!p(r)?.foldSensitive||te.includes(e),i=e,a=null,d=/=(\d+)$/.exec(i);d&&(a=Number(d[1]),i=i.slice(0,d.index));let u=(G[r]??[]).map(m=>m.map(w=>g(w,s))),c=a!==null?{kind:"fixed",n:a}:{kind:"digits"},l="";for(let m of g(i,s))if(m==="#")l+="([0-9]{1,2})",c={kind:"digits"};else if(m==="%")l+="(iv|iii|ii|i)",c={kind:"roman"};else if(m==="@"){let w=u.flat().sort((k,Z)=>Z.length-k.length).map(k=>[...k].map(L).join(""));l+="("+w.join("|")+")",c={kind:"ordinal",words:u}}else m===" "?l+=oe:m==="."?l+="\\.?":l+=L(m);return{lang:r,grain:t,form:n,unfold:s,re:new RegExp("^"+l+"$","u"),number:c}}var b=null;function ae(){if(b)return b;let e=[];for(let r of Object.keys(h))for(let[t,n]of Object.entries(h[r])){for(let o of n.words??[])e.push(E(o,t,r,"word"));for(let o of n.codes??[])e.push(E(o,t,r,"code"))}return b=e,e}var I=/^[0-9]+$/,P=/^[0-9]/,A=/[0-9]$/,ie=/^[\s\-_./,']*/,le=/[\s\-_./,']*$/,de=/^(年|년)/u;function T(e){if(e.length===4){let r=Number(e);return r>=1900&&r<=2099?r:null}return 2e3+Number(e)}function F(e){let r=[{body:e,year:null,yearDigits:0}];for(let t of[4,2]){if(e.length<=t)continue;let n=e.slice(0,t);if(I.test(n)&&!P.test(e.slice(t))){let i=e.slice(t),a=de.exec(i),d=a?i.slice(a[0].length):i,u=ie.exec(d)[0],c=d.slice(u.length),l=T(n);c&&l!==null&&(a||u||!P.test(c))&&r.push({body:c,year:l,yearDigits:t})}let o=e.slice(e.length-t),s=e.slice(0,e.length-t);if(I.test(o)&&!A.test(s)){let i=le.exec(s)[0],a=s.slice(0,s.length-i.length),d=T(o);a&&d!==null&&(i||!A.test(a))&&r.push({body:a,year:d,yearDigits:t})}}return r}var y=null;function ce(){if(y)return y;let e=new Set;for(let[r,t]of Object.entries(G)){let n=!!p(r)?.foldSensitive;for(let o of t)for(let s of o)e.add(g(s,!1)),n&&e.add(g(s,!0))}for(let r of Object.keys(h))for(let t of Object.values(h[r]))for(let n of t?.words??[]){let o=/=[0-9]+$/.exec(n);o&&e.add(g(n.slice(0,o.index),!1))}return y=[...e],y}var ue=/[0-9]/,me=/(^|[^\p{L}])(iv|iii|ii|i)([^\p{L}]|$)/u;function V(e){return ue.test(e)||me.test(e)?!0:ce().some(r=>e.includes(r))}function fe(e,r){switch(e.number.kind){case"fixed":return e.number.n;case"digits":return r[1]===void 0?null:Number(r[1]);case"roman":return r[1]===void 0?null:se[r[1]]??null;case"ordinal":{let t=r[1],n=e.number.words.findIndex(o=>o.includes(t));return n<0?null:n+1}}}function ge(e){let r=String(e??"");if(!r.trim()||r.length>40)return[];let t=g(r,!1),n=g(r,!0);if(!V(t)&&!V(n))return[];let o=F(t),s=F(n),i=[],a=new Set;for(let d of ae()){let u=d.lang+"|"+d.grain;if(!a.has(u))for(let c of d.unfold?s:o){let l=d.re.exec(c.body);if(!l)continue;let m=fe(d,l);if(!(m===null||m<1||m>ne[d.grain])){i.push({lang:d.lang,grain:d.grain,n:m,year:c.year,yearDigits:c.yearDigits,form:d.form}),a.add(u);break}}}return i}function W(e,r=()=>!0){if(e.length===0)return null;let t=e.map(n=>ge(n).filter(r));if(t.some(n=>n.length===0))return null;for(let n of Object.keys(h))for(let o of Object.keys(h[n])){let s=[],i=0;for(let a of t){let d=a.find(l=>l.grain===n&&l.lang===o),c=a.find(l=>l.grain===n&&l.lang==="en")??d;if(!c)break;c.lang===o&&i++,s.push(c)}if(s.length===e.length&&(o==="en"||i>0))return{lang:o,grain:n,readings:s}}return null}var K=[{name:"likert7_agreement",minMatches:5,canonical:["strongly disagree","disagree","slightly disagree","neutral","slightly agree","agree","strongly agree"]},{name:"likert5_agreement",minMatches:3,canonical:["strongly disagree","disagree","neutral","agree","strongly agree"]},{name:"likert3_agreement",minMatches:2,canonical:["disagree","neutral","agree"]},{name:"likert5_satisfaction",minMatches:3,canonical:["very dissatisfied","dissatisfied","neutral","satisfied","very satisfied"]},{name:"likert3_satisfaction",minMatches:2,canonical:["dissatisfied","neutral","satisfied"]},{name:"likert5_quality",minMatches:3,canonical:["poor","fair","good","very good","excellent"]},{name:"likert3_quality",minMatches:2,canonical:["poor","fair","good"]},{name:"frequency5",minMatches:3,canonical:["never","rarely","sometimes","often","always"]},{name:"intensity5",minMatches:3,canonical:["not at all","slightly","moderately","very","extremely"]},{name:"importance5",minMatches:3,canonical:["not important","slightly important","moderately important","very important","extremely important"]},{name:"severity_low_critical",minMatches:3,canonical:["low","medium","high","critical"]},{name:"severity_low_urgent",minMatches:3,canonical:["low","medium","high","urgent"]},{name:"severity_none_critical",minMatches:3,canonical:["none","mild","moderate","severe","critical"]},{name:"priority_p4_p1",minMatches:3,canonical:["p4","p3","p2","p1","p0"]},{name:"severity_trivial_blocker",minMatches:3,canonical:["trivial","minor","major","critical","blocker"]},{name:"severity_minor_severe",minMatches:3,canonical:["minor","moderate","major","severe"]},{name:"magnitude5_medium",minMatches:3,canonical:["very low","low","medium","high","very high"]},{name:"magnitude5_moderate",minMatches:3,canonical:["very low","low","moderate","high","very high"]},{name:"speed5",minMatches:3,canonical:["very slow","slow","moderate","fast","very fast"]},{name:"temperature6",minMatches:3,canonical:["freezing","cold","cool","mild","warm","hot"]},{name:"experience6",minMatches:3,canonical:["novice","beginner","intermediate","advanced","expert","master"]},{name:"tier_metal",minMatches:3,canonical:["bronze","silver","gold","platinum","diamond"]},{name:"tshirt_letter_sizes",minMatches:4,canonical:["xxs","xs","s","m","l","xl","xxl","xxxl"]},{name:"tshirt_word_sizes",minMatches:3,canonical:["extra small","small","medium","large","extra large"]},{name:"nps_bands",minMatches:2,canonical:["detractor","passive","promoter"]},{name:"likelihood5",minMatches:3,canonical:["very unlikely","unlikely","neutral","likely","very likely"]},{name:"education",minMatches:3,canonical:["none","primary","secondary","bachelors","masters","doctoral"]},{name:"grades_a_to_f",minMatches:3,canonical:["a","b","c","d","f"]},{name:"grades_a_to_f_plusminus",minMatches:4,canonical:["a+","a","a-","b+","b","b-","c+","c","c-","d+","d","d-","f"]}],he={seldom:"rarely",infrequently:"rarely","hardly ever":"rarely",occasionally:"sometimes",periodically:"sometimes","now and then":"sometimes",frequently:"often",frequent:"often",regularly:"often",commonly:"often",usually:"often",constantly:"always","every time":"always","all the time":"always",consistently:"always",continually:"always",bad:"poor",weak:"poor",subpar:"poor",mediocre:"fair",passable:"fair","so so":"fair",decent:"good",solid:"good",outstanding:"excellent",superb:"excellent",exceptional:"excellent",stellar:"excellent",unsatisfied:"dissatisfied",unhappy:"dissatisfied",displeased:"dissatisfied",happy:"satisfied",content:"satisfied",pleased:"satisfied",delighted:"very satisfied","highly satisfied":"very satisfied","extremely satisfied":"very satisfied","highly dissatisfied":"very dissatisfied","extremely dissatisfied":"very dissatisfied",neither:"neutral",undecided:"neutral","no opinion":"neutral","neither agree nor disagree":"neutral","completely agree":"strongly agree","totally agree":"strongly agree","completely disagree":"strongly disagree","totally disagree":"strongly disagree","highly unlikely":"very unlikely","extremely unlikely":"very unlikely","highly likely":"very likely","extremely likely":"very likely","almost certain":"very likely",bachelor:"bachelors","bachelor's":"bachelors",undergraduate:"bachelors","bachelor degree":"bachelors","master's":"masters",graduate:"masters","master degree":"masters",doctorate:"doctoral",phd:"doctoral"},pe=(()=>{let e=new Set;for(let r of K)for(let t of r.canonical)e.add(f(t));return e})(),ye=(()=>{let e=new Map;for(let[r,t]of Object.entries(he)){let n=f(r);pe.has(n)||e.has(n)||e.set(n,f(t))}return e})();function U(e){return ye.get(e)??e}var we=new Set(["hour","hr","day","dow","dom","weekday","week","wk","woy","month","mth","quarter","qtr","year","yr","semester","trimester","decade","period","fiscal","fy","rank","level","lvl","tier","grade","band","decile","percentile","quartile","quintile","score","rating","stars","step","stage","phase","round","wave","episode","chapter","age","cohort","generation","seniority","position","sequence","seq","priority"]);function $e(e){if(!e)return!1;for(let r of M(e))if(we.has(r))return!0;return N(e)!==null||z(e)!==null}function f(e){return e.toLowerCase().replace(/[-_]+/g," ").replace(/\s+/g," ").trim()}function X(e){return S(e.normalize("NFD").replace(/\p{Diacritic}/gu,""))}function ke(e){let r=new Map;for(let[t,n]of e){let o=X(t);if(!o)continue;let s=r.get(o);r.set(o,s===void 0||s===n?n:-1)}return r}function v(e){let r=new Map;for(let[t,n]of e)for(let o of t)r.set(f(o),n);return r}var C=[{name:"weekday_mon_sun",minMatches:4,dict:v([[["monday","mon"],0],[["tuesday","tue","tues"],1],[["wednesday","wed","weds"],2],[["thursday","thu","thur","thurs","thr"],3],[["friday","fri"],4],[["saturday","sat"],5],[["sunday","sun"],6]])},{name:"month_jan_dec",minMatches:4,dict:v([[["january","jan"],0],[["february","feb"],1],[["march","mar"],2],[["april","apr"],3],[["may"],4],[["june","jun"],5],[["july","jul"],6],[["august","aug"],7],[["september","sep","sept"],8],[["october","oct"],9],[["november","nov"],10],[["december","dec"],11]])},{name:"quarter_q1_q4",minMatches:3,dict:v([[["q1","qtr 1","qtr1","quarter 1","q 1"],0],[["q2","qtr 2","qtr2","quarter 2","q 2"],1],[["q3","qtr 3","qtr3","quarter 3","q 3"],2],[["q4","qtr 4","qtr4","quarter 4","q 4"],3]])}],Y={};function be(e){let r=e||"";if(!r)return{weekday:new Map,month:new Map};let t=Y[r];if(t)return t;let n=new Map,o=new Map,s=(a,d,u)=>{let c=f(d);c&&a.set(c,u);let l=f(d.replace(/\./g,""));l&&l!==c&&a.set(l,u)};try{let a=new Intl.DateTimeFormat(r,{weekday:"long",timeZone:"UTC"}),d=new Intl.DateTimeFormat(r,{weekday:"short",timeZone:"UTC"});for(let l=0;l<7;++l){let m=new Date(Date.UTC(2024,0,1+l));s(n,a.format(m),l),s(n,d.format(m),l)}let u=new Intl.DateTimeFormat(r,{month:"long"}),c=new Intl.DateTimeFormat(r,{month:"short"});for(let l=0;l<12;++l){let m=new Date(Date.UTC(2020,l,15));s(o,u.format(m),l),s(o,c.format(m),l)}}catch{}let i={weekday:n,month:o};return Y[r]=i,i}function $(e,r){if(r.size===0)return e;let t=new Map(e);for(let[n,o]of r)t.has(n)||t.set(n,o);return t}function ve(e,r){let t=be(r);for(let n of C){let o=n.name==="weekday_mon_sun"?$(n.dict,t.weekday):n.name==="month_jan_dec"?$(n.dict,t.month):n.dict,s=!0,i=null,a=new Map;for(let[u,c]of e){let l=o.get(u);if(l===void 0){i=i??ke(o);let m=i.get(X(u));l=m===void 0||m<0?void 0:m}if(l===void 0){s=!1;break}a.has(l)||a.set(l,c)}if(!s||a.size<n.minMatches)continue;let d=[...a.entries()].sort((u,c)=>u[0]-c[0]).map(u=>u[1]);return{pattern:n.name,orderedDomain:d}}return Ce(e)}var H=C.find(e=>e.name==="quarter_q1_q4");function Ce(e){let r=[...e.values()],t=W(r,s=>s.grain==="quarter"&&s.year===null&&(s.lang==="en"||s.form==="word"));if(!t||t.lang==="en")return null;let n=new Map;if(t.readings.forEach((s,i)=>{n.has(s.n)||n.set(s.n,r[i])}),n.size<H.minMatches)return null;let o=[...n.entries()].sort((s,i)=>s[0]-i[0]).map(s=>s[1]);return{pattern:H.name,orderedDomain:o}}function B(e){let r=new Map;for(let t of e){if(t==null)continue;let n=String(t);if(n.length===0)continue;let o=f(n);r.has(o)||r.set(o,n)}return r}var _e=15,Me=10,xe=(()=>{let e=["xxs","xs","s","sm","small","m","med","medium","l","lg","large","xl","xlarge","xxl","xxxl","2xl","3xl","4xl","y","n","yes","no","t","f","true","false","na","n/a","n a","none","null","unknown","other","all","both","low","medium","med","high","very low","very high","minimal","critical","urgent"],r=new Set(e.map(f));for(let t of C)for(let n of t.dict.keys())r.add(n);return r})();function Re(e){let r=e.trim();return r.length===0||r.length>Me||(r.match(/\p{L}/gu)||[]).length>1?!1:/\p{Nd}/u.test(r)}function De(e){let r=e.trim();return r.length===1&&/[\p{L}\p{Nd}]/u.test(r)}function He(e){if(!e||e.length===0)return null;let r=new Set,t=[];for(let n of e){if(n==null)continue;let o=String(n);if(r.has(o))continue;let s=f(o);if(!(s===""||xe.has(s)||Re(o)||De(o))||(r.add(o),t.push(o),t.length>_e))return null}return t.length>0?t:null}var je=/^(\p{L}{0,3}) ?([0-9]+)\s*[-–—:.)]\s*(.+)$/u;function Se(e){let r=null,t=new Set,n=[];for(let o of e.values()){let s=je.exec(o.trim());if(!s)return null;let i=s[1].toLowerCase();if(r===null)r=i;else if(i!==r)return null;let a=Number(s[2]);if(t.has(a)||f(s[3])==="")return null;t.add(a),n.push({code:a,original:o,label:s[3]})}return n}function qe(e,r){let t=Q(B(e.map(a=>a.label)),r);if(t===null)return;if(t.orderedDomain.length!==e.length)return null;let n=new Map;for(let a of e)n.set(a.label,a);let o=t.orderedDomain.map(a=>n.get(a));if(o.some(a=>a===void 0))return null;let s=!0,i=!0;for(let a=1;a<o.length;++a)o[a].code<=o[a-1].code&&(s=!1),o[a].code>=o[a-1].code&&(i=!1);return!s&&!i?null:{pattern:t.pattern,orderedDomain:o.map(a=>a.original)}}function Ke(e,r){if(!e||e.length<2)return null;let t=B(e);if(t.size<2)return null;let n=Se(t);if(n!==null){let s=qe(n,r);if(s!==void 0)return s}let o=Q(t,r);return o!==null?o:n!==null?Le(t):null}var Oe=/^([0-9]+)\s*(?:\.|\)|-)\s*([^\s\d].*)$/u,ze=3,Ne=20;function Le(e){if(e.size<ze||e.size>Ne)return null;let r=new Set,t=[];for(let n of e.values()){let o=Oe.exec(n.trim());if(!o||f(o[2])==="")return null;let s=Number(o[1]);if(r.has(s))return null;r.add(s),t.push({n:s,original:n})}return t.sort((n,o)=>n.n-o.n),{pattern:"numeric_rank_prefix",orderedDomain:t.map(n=>n.original)}}function Q(e,r){let t=new Map;for(let[o,s]of e){let i=U(o);t.has(i)||t.set(i,s)}let n=null;for(let o of K){let s=[];for(let u of o.canonical){let c=t.get(u);c!==void 0&&s.push(c)}if(s.length<o.minMatches)continue;let i=new Set(o.canonical),a=!0;for(let u of e.keys())if(!i.has(U(u))){a=!1;break}if(!a)continue;let d;n===null||s.length>n.matched||s.length===n.matched&&o.canonical.length<n.pattern.canonical.length?d=!0:d=!1,d&&(n={pattern:o,matched:s.length,orderedDomain:s})}return n?{pattern:n.pattern.name,orderedDomain:n.orderedDomain}:ve(e,r)}export{Pe as a,J as b,q as c,O as d,z as e,N as f,ne as g,h,G as i,te as j,ge as k,W as l,$e as m,He as n,Ke as o};
2
+ import{a as S}from"./chunk-5HI6TVMM.mjs";import{a as _,b as M,d as x,g as R,h as D,n as j}from"./chunk-CZJ7M6A5.mjs";import{f as p}from"./chunk-WC4JINEZ.mjs";var Pe=Object.freeze({hour:24,weekday:7,month:12,quarter:4,week:53,season:4}),J={nl:["jaar"],de:["jahr"],fr:["ann\xE9e"],es:["a\xF1o"],pt:["ano"],it:["anno"],pl:["rok"],cs:["rok"],sk:["rok"],sv:["\xE5r"],da:["\xE5r"],nb:["\xE5r"],fi:["vuosi"],hu:["\xE9v"],tr:["y\u0131l"],ro:["anul"],hr:["godina"],id:["tahun"],vi:["n\u0103m"],ru:["\u0433\u043E\u0434"],uk:["\u0440\u0456\u043A"],el:["\u03AD\u03C4\u03BF\u03C2"],zh:["\u5E74\u4EFD","\u5E74\u5EA6"],ja:["\u5E74\u5EA6"],ko:["\uC5F0\uB3C4","\uB144\uB3C4"],ar:["\u0633\u0646\u0629"],he:["\u05E9\u05E0\u05D4"],hi:["\u0935\u0930\u094D\u0937","\u0938\u093E\u0932"],th:["\u0E1B\u0E35\u0E07\u0E1A\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13"],fa:["\u0633\u0627\u0644"]},q={hour:{de:["stunde"],fr:["heure"],es:["hora"],pt:["hora"],it:["ora"],pl:["godzina"],cs:["hodina"],sk:["hodina"],sv:["timme"],fi:["tunti"],hu:["\xF3ra"],ro:["ora"],vi:["gi\u1EDD"],ru:["\u0447\u0430\u0441"],uk:["\u0433\u043E\u0434\u0438\u043D\u0430"],el:["\u03CE\u03C1\u03B1"],zh:["\u5C0F\u65F6"],ar:["\u0633\u0627\u0639\u0629"],he:["\u05E9\u05E2\u05D4"],hi:["\u0918\u0902\u091F\u093E"],th:["\u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07"],fa:["\u0633\u0627\u0639\u062A"]},weekday:{nl:["weekdag"],de:["wochentag"],sv:["veckodag"],da:["ugedag"],nb:["ukedag"],fi:["viikonp\xE4iv\xE4"],zh:["\u661F\u671F"],ja:["\u66DC\u65E5"],ko:["\uC694\uC77C"]},month:{nl:["maand"],de:["monat"],fr:["mois"],es:["mes"],pt:["m\xEAs"],it:["mese"],pl:["miesi\u0105c"],cs:["m\u011Bs\xEDc"],sk:["mesiac"],sv:["m\xE5nad"],da:["m\xE5ned"],nb:["m\xE5ned"],fi:["kuukausi"],hu:["h\xF3nap"],hr:["mjesec"],id:["bulan"],vi:["th\xE1ng"],ru:["\u043C\u0435\u0441\u044F\u0446"],uk:["\u043C\u0456\u0441\u044F\u0446\u044C"],el:["\u03BC\u03AE\u03BD\u03B1\u03C2"],zh:["\u6708\u4EFD"],ar:["\u0634\u0647\u0631"],he:["\u05D7\u05D5\u05D3\u05E9"],hi:["\u092E\u0939\u0940\u0928\u093E","\u092E\u093E\u0939"],th:["\u0E40\u0E14\u0E37\u0E2D\u0E19"],fa:["\u0645\u0627\u0647"]},quarter:{nl:["kwartaal"],de:["quartal"],fr:["trimestre"],es:["trimestre"],pt:["trimestre"],it:["trimestre"],pl:["kwarta\u0142"],cs:["\u010Dtvrtlet\xED"],sk:["\u0161tvr\u0165rok"],sv:["kvartal"],da:["kvartal"],nb:["kvartal"],fi:["vuosinelj\xE4nnes"],hu:["negyed\xE9v"],tr:["\xE7eyrek"],ro:["trimestru"],hr:["tromjese\u010Dje"],id:["kuartal","triwulan"],vi:["qu\xFD"],ru:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B"],uk:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B"],el:["\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"],zh:["\u5B63\u5EA6"],ja:["\u56DB\u534A\u671F"],ko:["\uBD84\uAE30"],ar:["\u0631\u0628\u0639"],he:["\u05E8\u05D1\u05E2\u05D5\u05DF"],hi:["\u0924\u093F\u092E\u093E\u0939\u0940"],th:["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A"]},week:{de:["woche"],fr:["semaine"],es:["semana"],pt:["semana"],it:["settimana"],pl:["tydzie\u0144"],cs:["t\xFDden"],sk:["t\xFD\u017Ede\u0148"],sv:["vecka"],da:["uge"],nb:["uke"],fi:["viikko"],hu:["h\xE9t"],tr:["hafta"],ro:["s\u0103pt\u0103m\xE2n\u0103"],hr:["tjedan"],id:["minggu"],vi:["tu\u1EA7n"],ru:["\u043D\u0435\u0434\u0435\u043B\u044F"],uk:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C"],el:["\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"],ar:["\u0623\u0633\u0628\u0648\u0639"],he:["\u05E9\u05D1\u05D5\u05E2"],hi:["\u0938\u092A\u094D\u0924\u093E\u0939"],th:["\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C"],fa:["\u0647\u0641\u062A\u0647"]},season:{nl:["seizoen"],de:["jahreszeit"],fr:["saison"],es:["temporada"],it:["stagione"],pl:["sezon"],cs:["sez\xF3na"],sk:["sez\xF3na"],sv:["s\xE4song","\xE5rstid"],da:["s\xE6son","\xE5rstid"],nb:["sesong","\xE5rstid"],fi:["vuodenaika"],hu:["\xE9vszak"],tr:["mevsim"],ro:["anotimp"],vi:["m\xF9a"],ru:["\u0441\u0435\u0437\u043E\u043D"],uk:["\u0441\u0435\u0437\u043E\u043D"],el:["\u03B5\u03C0\u03BF\u03C7\u03AE"],zh:["\u5B63\u8282"],ja:["\u5B63\u7BC0"],ko:["\uACC4\uC808"],ar:["\u0645\u0648\u0633\u0645"],he:["\u05E2\u05D5\u05E0\u05D4"],hi:["\u092E\u094C\u0938\u092E"],th:["\u0E24\u0E14\u0E39"],fa:["\u0641\u0635\u0644"]}},ee=["\xE5r","\xE9v","h\xE9t","\xF3ra"];function re(e,r,t){let n=p(t);if(!n)return null;let o=r.normalize("NFC").toLowerCase(),s=x(e).words;return s.includes(o)?"word":n.compounds&&s.some(i=>D(i,o,R))?"suffix":null}function O(e,r){let t=String(e??"");if(!t.trim())return null;for(let[n,o]of Object.entries(r))for(let s of o){let i=ee.includes(s)?re(t,s,n):j(t,s,n);if(i)return{lang:n,word:s,view:i}}return null}function z(e){return O(e,J)}function N(e){let r=null;for(let t of Object.keys(q)){let n=O(e,q[t]);if(n){if(r&&r.concept!==t)return null;r={concept:t,hit:n}}}return r}var ne=Object.freeze({quarter:4,half:2,week:53}),h={quarter:{en:{words:["quarter #","qtr #"],codes:["q #"]},nl:{words:["kwartaal #","# kwartaal","#e kwartaal","@ kwartaal"],codes:["k #"]},de:{words:["quartal #","# quartal","@ quartal"]},fr:{words:["trimestre #","# trimestre","#er trimestre","#e trimestre","#eme trimestre","@ trimestre"],codes:["t #","# t","trim. #"]},es:{words:["trimestre #","# trimestre","#er trimestre","#o trimestre","#\xBA trimestre","#\xB0 trimestre","@ trimestre"],codes:["t #","# t","trim. #"]},pt:{words:["trimestre #","# trimestre","#o trimestre","#\xBA trimestre","#\xB0 trimestre","@ trimestre"],codes:["t #","# t","#\xBA t","trim. #"]},it:{words:["trimestre #","# trimestre","#\xBA trimestre","#\xB0 trimestre","% trimestre","@ trimestre"],codes:["t #","trim. #"]},pl:{words:["kwarta\u0142 #","# kwarta\u0142","% kwarta\u0142","@ kwarta\u0142","# kw.","% kw."]},cs:{words:["\u010Dtvrtlet\xED #","# \u010Dtvrtlet\xED","% \u010Dtvrtlet\xED","@ \u010Dtvrtlet\xED"]},sk:{words:["\u0161tvr\u0165rok #","# \u0161tvr\u0165rok","% \u0161tvr\u0165rok","@ \u0161tvr\u0165rok"]},sv:{words:["kvartal #","# kvartalet","#:a kvartalet","#:e kvartalet","@ kvartalet"],codes:["k #"]},da:{words:["kvartal #","# kvartal","@ kvartal"],codes:["k #"]},nb:{words:["kvartal #","# kvartal","@ kvartal"],codes:["k #"]},fi:{words:["nelj\xE4nnes #","# nelj\xE4nnes","# vuosinelj\xE4nnes","vuosinelj\xE4nnes #"]},hu:{words:["negyed\xE9v #","# negyed\xE9v","% negyed\xE9v"]},tr:{words:["\xE7eyrek #","# \xE7eyrek","@ \xE7eyrek"],codes:["\xE7 #"]},ro:{words:["trimestrul #","trimestrul %","trimestru #"],codes:["t #"]},hr:{words:["tromjese\u010Dje #","# tromjese\u010Dje","% tromjese\u010Dje","kvartal #","# kvartal"]},id:{words:["kuartal #","kuartal %","kuartal ke #","triwulan #","triwulan %","triwulan ke #"],codes:["tw #","tw %"]},vi:{words:["qu\xFD #","qu\xFD %"]},ru:{words:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B #","# \u043A\u0432\u0430\u0440\u0442\u0430\u043B","% \u043A\u0432\u0430\u0440\u0442\u0430\u043B","@ \u043A\u0432\u0430\u0440\u0442\u0430\u043B","# \u043A\u0432.","% \u043A\u0432."]},uk:{words:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B #","# \u043A\u0432\u0430\u0440\u0442\u0430\u043B","% \u043A\u0432\u0430\u0440\u0442\u0430\u043B","@ \u043A\u0432\u0430\u0440\u0442\u0430\u043B","# \u043A\u0432.","% \u043A\u0432."]},el:{words:["\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF #","# \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF","#\u03BF \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF","@ \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"]},zh:{words:["\u7B2C#\u5B63\u5EA6","\u7B2C@\u5B63\u5EA6","@\u5B63\u5EA6","#\u5B63\u5EA6"]},ja:{words:["\u7B2C#\u56DB\u534A\u671F","\u7B2C@\u56DB\u534A\u671F","#\u56DB\u534A\u671F"],codes:["# q"]},ko:{words:["#\uBD84\uAE30","#/4\uBD84\uAE30"]},ar:{words:["\u0627\u0644\u0631\u0628\u0639 #","\u0627\u0644\u0631\u0628\u0639 @","\u0631\u0628\u0639 #"]},he:{words:["\u05E8\u05D1\u05E2\u05D5\u05DF #","\u05E8\u05D1\u05E2\u05D5\u05DF @"]},hi:{words:["\u0924\u093F\u092E\u093E\u0939\u0940 #","# \u0924\u093F\u092E\u093E\u0939\u0940","@ \u0924\u093F\u092E\u093E\u0939\u0940"]},th:{words:["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A #","\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A\u0E17\u0E35\u0E48 #"]}},half:{en:{words:["half #"],codes:["h #"]},nl:{words:["halfjaar #","# halfjaar","@ halfjaar"]},de:{words:["halbjahr #","# halbjahr","@ halbjahr"],codes:["hj #"]},fr:{words:["semestre #","# semestre","#er semestre","#e semestre","#eme semestre","@ semestre"],codes:["s #"]},es:{words:["semestre #","# semestre","#er semestre","#o semestre","#\xBA semestre","#\xB0 semestre","@ semestre"],codes:["s #","# s"]},pt:{words:["semestre #","# semestre","#o semestre","#\xBA semestre","#\xB0 semestre","@ semestre"],codes:["s #","# s"]},it:{words:["semestre #","# semestre","#\xBA semestre","#\xB0 semestre","% semestre","@ semestre"],codes:["s #"]},pl:{words:["p\xF3\u0142rocze #","# p\xF3\u0142rocze","% p\xF3\u0142rocze","@ p\xF3\u0142rocze"]},cs:{words:["pololet\xED #","# pololet\xED","% pololet\xED","@ pololet\xED"]},sk:{words:["polrok #","# polrok","% polrok"]},sv:{words:["halv\xE5r #","# halv\xE5ret","@ halv\xE5ret"]},da:{words:["halv\xE5r #","# halv\xE5r","@ halv\xE5r"]},nb:{words:["halv\xE5r #","# halv\xE5r","@ halv\xE5r"]},fi:{words:["vuosipuolisko #","# vuosipuolisko"]},hu:{words:["f\xE9l\xE9v #","# f\xE9l\xE9v","% f\xE9l\xE9v"]},tr:{words:["yar\u0131y\u0131l #","# yar\u0131y\u0131l","@ yar\u0131y\u0131l"]},ro:{words:["semestrul #","semestrul %"],codes:["s #"]},hr:{words:["polugodi\u0161te #","# polugodi\u0161te","% polugodi\u0161te"]},id:{words:["semester #","semester %"]},ru:{words:["\u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435 #","# \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435","% \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435","@ \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435"]},uk:{words:["\u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F #","# \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F","% \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F","@ \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F"]},el:{words:["\u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF #","# \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF","#\u03BF \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF","@ \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF"]},zh:{words:["\u4E0A\u534A\u5E74=1","\u4E0B\u534A\u5E74=2"]},ja:{words:["\u4E0A\u671F=1","\u4E0B\u671F=2","\u4E0A\u534A\u671F=1","\u4E0B\u534A\u671F=2"]},ko:{words:["\uC0C1\uBC18\uAE30=1","\uD558\uBC18\uAE30=2"]},ar:{words:["\u0627\u0644\u0646\u0635\u0641 @"]},he:{words:["\u05D7\u05E6\u05D9\u05D5\u05DF #"]},hi:{words:["\u091B\u092E\u093E\u0939\u0940 #","@ \u091B\u092E\u093E\u0939\u0940"]},th:{words:["\u0E04\u0E23\u0E36\u0E48\u0E07\u0E1B\u0E35\u0E41\u0E23\u0E01=1","\u0E04\u0E23\u0E36\u0E48\u0E07\u0E1B\u0E35\u0E2B\u0E25\u0E31\u0E07=2"]}},week:{en:{words:["week #","wk #"],codes:["w #"]},de:{words:["woche #","# woche","kw #"]},fr:{words:["semaine #","sem. #"],codes:["s #"]},es:{words:["semana #","sem. #"],codes:["s #"]},pt:{words:["semana #","sem. #"],codes:["s #"]},it:{words:["settimana #","sett. #"]},pl:{words:["tydzie\u0144 #","# tydzie\u0144","tydz. #"]},cs:{words:["t\xFDden #","# t\xFDden"]},sk:{words:["t\xFD\u017Ede\u0148 #","# t\xFD\u017Ede\u0148"]},sv:{words:["vecka #"],codes:["v #"]},da:{words:["uge #"]},nb:{words:["uke #"]},fi:{words:["viikko #","vko #","vk #"]},hu:{words:["h\xE9t #","# h\xE9t"]},tr:{words:["hafta #","# hafta"]},ro:{words:["s\u0103pt\u0103m\xE2na #"]},hr:{words:["tjedan #","# tjedan"]},id:{words:["minggu #","minggu ke #"]},vi:{words:["tu\u1EA7n #"]},ru:{words:["\u043D\u0435\u0434\u0435\u043B\u044F #","# \u043D\u0435\u0434\u0435\u043B\u044F","\u043D\u0435\u0434. #"]},uk:{words:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C #","# \u0442\u0438\u0436\u0434\u0435\u043D\u044C","\u0442\u0438\u0436. #"]},el:{words:["\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1 #","# \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"]},zh:{words:["\u7B2C#\u5468"]},ja:{words:["\u7B2C#\u9031"]},ko:{words:["#\uC8FC","#\uC8FC\uCC28"]},ar:{words:["\u0627\u0644\u0623\u0633\u0628\u0648\u0639 #","\u0623\u0633\u0628\u0648\u0639 #"]},he:{words:["\u05E9\u05D1\u05D5\u05E2 #"]},hi:{words:["\u0938\u092A\u094D\u0924\u093E\u0939 #"]},th:{words:["\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C #","\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C\u0E17\u0E35\u0E48 #"]}}},G={nl:[["eerste"],["tweede"],["derde"],["vierde"]],de:[["erstes","erste"],["zweites","zweite"],["drittes","dritte"],["viertes","vierte"]],fr:[["premier"],["deuxi\xE8me","second"],["troisi\xE8me"],["quatri\xE8me"]],es:[["primer","primero"],["segundo"],["tercer","tercero"],["cuarto"]],pt:[["primeiro"],["segundo"],["terceiro"],["quarto"]],it:[["primo"],["secondo"],["terzo"],["quarto"]],pl:[["pierwszy","pierwsze"],["drugi","drugie"],["trzeci","trzecie"],["czwarty","czwarte"]],cs:[["prvn\xED"],["druh\xE9","druh\xFD"],["t\u0159et\xED"],["\u010Dtvrt\xE9","\u010Dtvrt\xFD"]],sk:[["prv\xFD"],["druh\xFD"],["tret\xED"],["\u0161tvrt\xFD"]],sv:[["f\xF6rsta"],["andra"],["tredje"],["fj\xE4rde"]],da:[["f\xF8rste"],["andet","anden"],["tredje"],["fjerde"]],nb:[["f\xF8rste"],["andre"],["tredje"],["fjerde"]],tr:[["birinci","ilk"],["ikinci"],["\xFC\xE7\xFCnc\xFC"],["d\xF6rd\xFCnc\xFC"]],ru:[["\u043F\u0435\u0440\u0432\u044B\u0439","\u043F\u0435\u0440\u0432\u043E\u0435"],["\u0432\u0442\u043E\u0440\u043E\u0439","\u0432\u0442\u043E\u0440\u043E\u0435"],["\u0442\u0440\u0435\u0442\u0438\u0439","\u0442\u0440\u0435\u0442\u044C\u0435"],["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044B\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435"]],uk:[["\u043F\u0435\u0440\u0448\u0438\u0439","\u043F\u0435\u0440\u0448\u0435"],["\u0434\u0440\u0443\u0433\u0438\u0439","\u0434\u0440\u0443\u0433\u0435"],["\u0442\u0440\u0435\u0442\u0456\u0439","\u0442\u0440\u0435\u0442\u0454"],["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0435"]],el:[["\u03C0\u03C1\u03CE\u03C4\u03BF"],["\u03B4\u03B5\u03CD\u03C4\u03B5\u03C1\u03BF"],["\u03C4\u03C1\u03AF\u03C4\u03BF"],["\u03C4\u03AD\u03C4\u03B1\u03C1\u03C4\u03BF"]],zh:[["\u4E00"],["\u4E8C"],["\u4E09"],["\u56DB"]],ja:[["\u4E00"],["\u4E8C"],["\u4E09"],["\u56DB"]],ar:[["\u0627\u0644\u0623\u0648\u0644"],["\u0627\u0644\u062B\u0627\u0646\u064A"],["\u0627\u0644\u062B\u0627\u0644\u062B"],["\u0627\u0644\u0631\u0627\u0628\u0639"]],he:[["\u05E8\u05D0\u05E9\u05D5\u05DF"],["\u05E9\u05E0\u05D9"],["\u05E9\u05DC\u05D9\u05E9\u05D9"],["\u05E8\u05D1\u05D9\u05E2\u05D9"]],hi:[["\u092A\u0939\u0932\u0940","\u092A\u0939\u0932\u093E"],["\u0926\u0942\u0938\u0930\u0940","\u0926\u0942\u0938\u0930\u093E"],["\u0924\u0940\u0938\u0930\u0940","\u0924\u0940\u0938\u0930\u093E"],["\u091A\u094C\u0925\u0940","\u091A\u094C\u0925\u093E"]]},te=["\xE7 #"],oe=String.raw`[\s\-_./]*`,se={i:1,ii:2,iii:3,iv:4};function g(e,r){let t=String(e??"").normalize("NFC").toLowerCase();return r||(t=_(t)),t.replace(/[\s_]+/g," ").trim().replace(/\.+$/,"").trim()}function L(e){return/[.*+?^${}()|[\]\\]/.test(e)?"\\"+e:e}function E(e,r,t,n){let s=!!p(r)?.foldSensitive||te.includes(e),i=e,a=null,d=/=(\d+)$/.exec(i);d&&(a=Number(d[1]),i=i.slice(0,d.index));let u=(G[r]??[]).map(m=>m.map(w=>g(w,s))),c=a!==null?{kind:"fixed",n:a}:{kind:"digits"},l="";for(let m of g(i,s))if(m==="#")l+="([0-9]{1,2})",c={kind:"digits"};else if(m==="%")l+="(iv|iii|ii|i)",c={kind:"roman"};else if(m==="@"){let w=u.flat().sort((k,Z)=>Z.length-k.length).map(k=>[...k].map(L).join(""));l+="("+w.join("|")+")",c={kind:"ordinal",words:u}}else m===" "?l+=oe:m==="."?l+="\\.?":l+=L(m);return{lang:r,grain:t,form:n,unfold:s,re:new RegExp("^"+l+"$","u"),number:c}}var b=null;function ae(){if(b)return b;let e=[];for(let r of Object.keys(h))for(let[t,n]of Object.entries(h[r])){for(let o of n.words??[])e.push(E(o,t,r,"word"));for(let o of n.codes??[])e.push(E(o,t,r,"code"))}return b=e,e}var I=/^[0-9]+$/,P=/^[0-9]/,A=/[0-9]$/,ie=/^[\s\-_./,']*/,le=/[\s\-_./,']*$/,de=/^(年|년)/u;function T(e){if(e.length===4){let r=Number(e);return r>=1900&&r<=2099?r:null}return 2e3+Number(e)}function F(e){let r=[{body:e,year:null,yearDigits:0}];for(let t of[4,2]){if(e.length<=t)continue;let n=e.slice(0,t);if(I.test(n)&&!P.test(e.slice(t))){let i=e.slice(t),a=de.exec(i),d=a?i.slice(a[0].length):i,u=ie.exec(d)[0],c=d.slice(u.length),l=T(n);c&&l!==null&&(a||u||!P.test(c))&&r.push({body:c,year:l,yearDigits:t})}let o=e.slice(e.length-t),s=e.slice(0,e.length-t);if(I.test(o)&&!A.test(s)){let i=le.exec(s)[0],a=s.slice(0,s.length-i.length),d=T(o);a&&d!==null&&(i||!A.test(a))&&r.push({body:a,year:d,yearDigits:t})}}return r}var y=null;function ce(){if(y)return y;let e=new Set;for(let[r,t]of Object.entries(G)){let n=!!p(r)?.foldSensitive;for(let o of t)for(let s of o)e.add(g(s,!1)),n&&e.add(g(s,!0))}for(let r of Object.keys(h))for(let t of Object.values(h[r]))for(let n of t?.words??[]){let o=/=[0-9]+$/.exec(n);o&&e.add(g(n.slice(0,o.index),!1))}return y=[...e],y}var ue=/[0-9]/,me=/(^|[^\p{L}])(iv|iii|ii|i)([^\p{L}]|$)/u;function V(e){return ue.test(e)||me.test(e)?!0:ce().some(r=>e.includes(r))}function fe(e,r){switch(e.number.kind){case"fixed":return e.number.n;case"digits":return r[1]===void 0?null:Number(r[1]);case"roman":return r[1]===void 0?null:se[r[1]]??null;case"ordinal":{let t=r[1],n=e.number.words.findIndex(o=>o.includes(t));return n<0?null:n+1}}}function ge(e){let r=String(e??"");if(!r.trim()||r.length>40)return[];let t=g(r,!1),n=g(r,!0);if(!V(t)&&!V(n))return[];let o=F(t),s=F(n),i=[],a=new Set;for(let d of ae()){let u=d.lang+"|"+d.grain;if(!a.has(u))for(let c of d.unfold?s:o){let l=d.re.exec(c.body);if(!l)continue;let m=fe(d,l);if(!(m===null||m<1||m>ne[d.grain])){i.push({lang:d.lang,grain:d.grain,n:m,year:c.year,yearDigits:c.yearDigits,form:d.form}),a.add(u);break}}}return i}function W(e,r=()=>!0){if(e.length===0)return null;let t=e.map(n=>ge(n).filter(r));if(t.some(n=>n.length===0))return null;for(let n of Object.keys(h))for(let o of Object.keys(h[n])){let s=[],i=0;for(let a of t){let d=a.find(l=>l.grain===n&&l.lang===o),c=a.find(l=>l.grain===n&&l.lang==="en")??d;if(!c)break;c.lang===o&&i++,s.push(c)}if(s.length===e.length&&(o==="en"||i>0))return{lang:o,grain:n,readings:s}}return null}var K=[{name:"likert7_agreement",minMatches:5,canonical:["strongly disagree","disagree","slightly disagree","neutral","slightly agree","agree","strongly agree"]},{name:"likert5_agreement",minMatches:3,canonical:["strongly disagree","disagree","neutral","agree","strongly agree"]},{name:"likert3_agreement",minMatches:2,canonical:["disagree","neutral","agree"]},{name:"likert5_satisfaction",minMatches:3,canonical:["very dissatisfied","dissatisfied","neutral","satisfied","very satisfied"]},{name:"likert3_satisfaction",minMatches:2,canonical:["dissatisfied","neutral","satisfied"]},{name:"likert5_quality",minMatches:3,canonical:["poor","fair","good","very good","excellent"]},{name:"likert3_quality",minMatches:2,canonical:["poor","fair","good"]},{name:"frequency5",minMatches:3,canonical:["never","rarely","sometimes","often","always"]},{name:"intensity5",minMatches:3,canonical:["not at all","slightly","moderately","very","extremely"]},{name:"importance5",minMatches:3,canonical:["not important","slightly important","moderately important","very important","extremely important"]},{name:"severity_low_critical",minMatches:3,canonical:["low","medium","high","critical"]},{name:"severity_low_urgent",minMatches:3,canonical:["low","medium","high","urgent"]},{name:"severity_none_critical",minMatches:3,canonical:["none","mild","moderate","severe","critical"]},{name:"priority_p4_p1",minMatches:3,canonical:["p4","p3","p2","p1","p0"]},{name:"severity_trivial_blocker",minMatches:3,canonical:["trivial","minor","major","critical","blocker"]},{name:"severity_minor_severe",minMatches:3,canonical:["minor","moderate","major","severe"]},{name:"magnitude5_medium",minMatches:3,canonical:["very low","low","medium","high","very high"]},{name:"magnitude5_moderate",minMatches:3,canonical:["very low","low","moderate","high","very high"]},{name:"speed5",minMatches:3,canonical:["very slow","slow","moderate","fast","very fast"]},{name:"temperature6",minMatches:3,canonical:["freezing","cold","cool","mild","warm","hot"]},{name:"experience6",minMatches:3,canonical:["novice","beginner","intermediate","advanced","expert","master"]},{name:"tier_metal",minMatches:3,canonical:["bronze","silver","gold","platinum","diamond"]},{name:"tshirt_letter_sizes",minMatches:4,canonical:["xxs","xs","s","m","l","xl","xxl","xxxl"]},{name:"tshirt_word_sizes",minMatches:3,canonical:["extra small","small","medium","large","extra large"]},{name:"nps_bands",minMatches:2,canonical:["detractor","passive","promoter"]},{name:"likelihood5",minMatches:3,canonical:["very unlikely","unlikely","neutral","likely","very likely"]},{name:"education",minMatches:3,canonical:["none","primary","secondary","bachelors","masters","doctoral"]},{name:"grades_a_to_f",minMatches:3,canonical:["a","b","c","d","f"]},{name:"grades_a_to_f_plusminus",minMatches:4,canonical:["a+","a","a-","b+","b","b-","c+","c","c-","d+","d","d-","f"]}],he={seldom:"rarely",infrequently:"rarely","hardly ever":"rarely",occasionally:"sometimes",periodically:"sometimes","now and then":"sometimes",frequently:"often",frequent:"often",regularly:"often",commonly:"often",usually:"often",constantly:"always","every time":"always","all the time":"always",consistently:"always",continually:"always",bad:"poor",weak:"poor",subpar:"poor",mediocre:"fair",passable:"fair","so so":"fair",decent:"good",solid:"good",outstanding:"excellent",superb:"excellent",exceptional:"excellent",stellar:"excellent",unsatisfied:"dissatisfied",unhappy:"dissatisfied",displeased:"dissatisfied",happy:"satisfied",content:"satisfied",pleased:"satisfied",delighted:"very satisfied","highly satisfied":"very satisfied","extremely satisfied":"very satisfied","highly dissatisfied":"very dissatisfied","extremely dissatisfied":"very dissatisfied",neither:"neutral",undecided:"neutral","no opinion":"neutral","neither agree nor disagree":"neutral","completely agree":"strongly agree","totally agree":"strongly agree","completely disagree":"strongly disagree","totally disagree":"strongly disagree","highly unlikely":"very unlikely","extremely unlikely":"very unlikely","highly likely":"very likely","extremely likely":"very likely","almost certain":"very likely",bachelor:"bachelors","bachelor's":"bachelors",undergraduate:"bachelors","bachelor degree":"bachelors","master's":"masters",graduate:"masters","master degree":"masters",doctorate:"doctoral",phd:"doctoral"},pe=(()=>{let e=new Set;for(let r of K)for(let t of r.canonical)e.add(f(t));return e})(),ye=(()=>{let e=new Map;for(let[r,t]of Object.entries(he)){let n=f(r);pe.has(n)||e.has(n)||e.set(n,f(t))}return e})();function U(e){return ye.get(e)??e}var we=new Set(["hour","hr","day","dow","dom","weekday","week","wk","woy","month","mth","quarter","qtr","year","yr","semester","trimester","decade","period","fiscal","fy","rank","level","lvl","tier","grade","band","decile","percentile","quartile","quintile","score","rating","stars","step","stage","phase","round","wave","episode","chapter","age","cohort","generation","seniority","position","sequence","seq","priority"]);function $e(e){if(!e)return!1;for(let r of M(e))if(we.has(r))return!0;return N(e)!==null||z(e)!==null}function f(e){return e.toLowerCase().replace(/[-_]+/g," ").replace(/\s+/g," ").trim()}function X(e){return S(e.normalize("NFD").replace(/\p{Diacritic}/gu,""))}function ke(e){let r=new Map;for(let[t,n]of e){let o=X(t);if(!o)continue;let s=r.get(o);r.set(o,s===void 0||s===n?n:-1)}return r}function v(e){let r=new Map;for(let[t,n]of e)for(let o of t)r.set(f(o),n);return r}var C=[{name:"weekday_mon_sun",minMatches:4,dict:v([[["monday","mon"],0],[["tuesday","tue","tues"],1],[["wednesday","wed","weds"],2],[["thursday","thu","thur","thurs","thr"],3],[["friday","fri"],4],[["saturday","sat"],5],[["sunday","sun"],6]])},{name:"month_jan_dec",minMatches:4,dict:v([[["january","jan"],0],[["february","feb"],1],[["march","mar"],2],[["april","apr"],3],[["may"],4],[["june","jun"],5],[["july","jul"],6],[["august","aug"],7],[["september","sep","sept"],8],[["october","oct"],9],[["november","nov"],10],[["december","dec"],11]])},{name:"quarter_q1_q4",minMatches:3,dict:v([[["q1","qtr 1","qtr1","quarter 1","q 1"],0],[["q2","qtr 2","qtr2","quarter 2","q 2"],1],[["q3","qtr 3","qtr3","quarter 3","q 3"],2],[["q4","qtr 4","qtr4","quarter 4","q 4"],3]])}],Y={};function be(e){let r=e||"";if(!r)return{weekday:new Map,month:new Map};let t=Y[r];if(t)return t;let n=new Map,o=new Map,s=(a,d,u)=>{let c=f(d);c&&a.set(c,u);let l=f(d.replace(/\./g,""));l&&l!==c&&a.set(l,u)};try{let a=new Intl.DateTimeFormat(r,{weekday:"long",timeZone:"UTC"}),d=new Intl.DateTimeFormat(r,{weekday:"short",timeZone:"UTC"});for(let l=0;l<7;++l){let m=new Date(Date.UTC(2024,0,1+l));s(n,a.format(m),l),s(n,d.format(m),l)}let u=new Intl.DateTimeFormat(r,{month:"long"}),c=new Intl.DateTimeFormat(r,{month:"short"});for(let l=0;l<12;++l){let m=new Date(Date.UTC(2020,l,15));s(o,u.format(m),l),s(o,c.format(m),l)}}catch{}let i={weekday:n,month:o};return Y[r]=i,i}function $(e,r){if(r.size===0)return e;let t=new Map(e);for(let[n,o]of r)t.has(n)||t.set(n,o);return t}function ve(e,r){let t=be(r);for(let n of C){let o=n.name==="weekday_mon_sun"?$(n.dict,t.weekday):n.name==="month_jan_dec"?$(n.dict,t.month):n.dict,s=!0,i=null,a=new Map;for(let[u,c]of e){let l=o.get(u);if(l===void 0){i=i??ke(o);let m=i.get(X(u));l=m===void 0||m<0?void 0:m}if(l===void 0){s=!1;break}a.has(l)||a.set(l,c)}if(!s||a.size<n.minMatches)continue;let d=[...a.entries()].sort((u,c)=>u[0]-c[0]).map(u=>u[1]);return{pattern:n.name,orderedDomain:d}}return Ce(e)}var H=C.find(e=>e.name==="quarter_q1_q4");function Ce(e){let r=[...e.values()],t=W(r,s=>s.grain==="quarter"&&s.year===null&&(s.lang==="en"||s.form==="word"));if(!t||t.lang==="en")return null;let n=new Map;if(t.readings.forEach((s,i)=>{n.has(s.n)||n.set(s.n,r[i])}),n.size<H.minMatches)return null;let o=[...n.entries()].sort((s,i)=>s[0]-i[0]).map(s=>s[1]);return{pattern:H.name,orderedDomain:o}}function B(e){let r=new Map;for(let t of e){if(t==null)continue;let n=String(t);if(n.length===0)continue;let o=f(n);r.has(o)||r.set(o,n)}return r}var _e=15,Me=10,xe=(()=>{let e=["xxs","xs","s","sm","small","m","med","medium","l","lg","large","xl","xlarge","xxl","xxxl","2xl","3xl","4xl","y","n","yes","no","t","f","true","false","na","n/a","n a","none","null","unknown","other","all","both","low","medium","med","high","very low","very high","minimal","critical","urgent"],r=new Set(e.map(f));for(let t of C)for(let n of t.dict.keys())r.add(n);return r})();function Re(e){let r=e.trim();return r.length===0||r.length>Me||(r.match(/\p{L}/gu)||[]).length>1?!1:/\p{Nd}/u.test(r)}function De(e){let r=e.trim();return r.length===1&&/[\p{L}\p{Nd}]/u.test(r)}function He(e){if(!e||e.length===0)return null;let r=new Set,t=[];for(let n of e){if(n==null)continue;let o=String(n);if(r.has(o))continue;let s=f(o);if(!(s===""||xe.has(s)||Re(o)||De(o))||(r.add(o),t.push(o),t.length>_e))return null}return t.length>0?t:null}var je=/^(\p{L}{0,3}) ?([0-9]+)\s*[-–—:.)]\s*(.+)$/u;function Se(e){let r=null,t=new Set,n=[];for(let o of e.values()){let s=je.exec(o.trim());if(!s)return null;let i=s[1].toLowerCase();if(r===null)r=i;else if(i!==r)return null;let a=Number(s[2]);if(t.has(a)||f(s[3])==="")return null;t.add(a),n.push({code:a,original:o,label:s[3]})}return n}function qe(e,r){let t=Q(B(e.map(a=>a.label)),r);if(t===null)return;if(t.orderedDomain.length!==e.length)return null;let n=new Map;for(let a of e)n.set(a.label,a);let o=t.orderedDomain.map(a=>n.get(a));if(o.some(a=>a===void 0))return null;let s=!0,i=!0;for(let a=1;a<o.length;++a)o[a].code<=o[a-1].code&&(s=!1),o[a].code>=o[a-1].code&&(i=!1);return!s&&!i?null:{pattern:t.pattern,orderedDomain:o.map(a=>a.original)}}function Ke(e,r){if(!e||e.length<2)return null;let t=B(e);if(t.size<2)return null;let n=Se(t);if(n!==null){let s=qe(n,r);if(s!==void 0)return s}let o=Q(t,r);return o!==null?o:n!==null?Le(t):null}var Oe=/^([0-9]+)\s*(?:\.|\)|-)\s*([^\s\d].*)$/u,ze=3,Ne=20;function Le(e){if(e.size<ze||e.size>Ne)return null;let r=new Set,t=[];for(let n of e.values()){let o=Oe.exec(n.trim());if(!o||f(o[2])==="")return null;let s=Number(o[1]);if(r.has(s))return null;r.add(s),t.push({n:s,original:n})}return t.sort((n,o)=>n.n-o.n),{pattern:"numeric_rank_prefix",orderedDomain:t.map(n=>n.original)}}function Q(e,r){let t=new Map;for(let[o,s]of e){let i=U(o);t.has(i)||t.set(i,s)}let n=null;for(let o of K){let s=[];for(let u of o.canonical){let c=t.get(u);c!==void 0&&s.push(c)}if(s.length<o.minMatches)continue;let i=new Set(o.canonical),a=!0;for(let u of e.keys())if(!i.has(U(u))){a=!1;break}if(!a)continue;let d;n===null||s.length>n.matched||s.length===n.matched&&o.canonical.length<n.pattern.canonical.length?d=!0:d=!1,d&&(n={pattern:o,matched:s.length,orderedDomain:s})}return n?{pattern:n.pattern.name,orderedDomain:n.orderedDomain}:ve(e,r)}export{Pe as a,J as b,q as c,O as d,z as e,N as f,ne as g,h,G as i,te as j,ge as k,W as l,$e as m,He as n,Ke as o};
@@ -0,0 +1,6 @@
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 en}from"./chunk-5MRZID36.mjs";import{a as tn,b as G,d as v,e as U}from"./chunk-5HI6TVMM.mjs";import{p as P}from"./chunk-CZJ7M6A5.mjs";var on="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",rn="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",an="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 ut=95,sn=new Set(["n a","none","null","nil","unknown","not applicable","not available","not specified","unspecified","missing","blank","empty","tbd","to be determined"]),Tn=new Set(Array.from(sn).filter(n=>n.includes(" ")&&n!=="n a").map(n=>n.replace(/ /g,"")));function T(n){return n?sn.has(n)||Tn.has(n.replace(/ /g,"")):!0}var ct=80;function g(n){return tn(n.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()).replace(/[^\p{L}\p{Nd}\s]/gu," ").replace(/\s+/g," ").trim()}function h(n){return G(n)}var hn="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",C=(()=>{let n=new Map;for(let e of hn.split(",")){let[t,i]=e.split(" ");t&&i&&n.set(t,i)}return n})(),Ln=new Set(C.keys()),Pn=new Set(C.values()),Un=["en","fr","es","de","it","pt","ru","ja","zh","ko","ar","hi","tr","pl","he","nl","sv","fi","nb","da","cs","el","uk","ro","id","vi","th","sk","hu","hr"],En={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"},Bn=Object.freeze({"Antigua and Barbuda":"ATG","Bosnia and Herzegovina":"BIH","Heard Island and McDonald Islands":"HMD","Saint Kitts and Nevis":"KNA","St Kitts and Nevis":"KNA","Saint Pierre and Miquelon":"SPM","St Pierre and Miquelon":"SPM","Saint Vincent and the Grenadines":"VCT","St Vincent and the Grenadines":"VCT","Sao Tome and Principe":"STP","South Georgia and the South Sandwich Islands":"SGS","Svalbard and Jan Mayen":"SJM","Trinidad and Tobago":"TTO","Turks and Caicos Islands":"TCA","Turks and Caicos":"TCA","Wallis and Futuna":"WLF","Saint Helena, Ascension and Tristan da Cunha":"SHN","Bonaire, Sint Eustatius and Saba":"BES","United Kingdom of Great Britain and Northern Ireland":"GBR","Bolivia, Plurinational State of":"BOL","Bolivia (Plurinational State of)":"BOL","Brunei Darussalam":"BRN","Congo, The Democratic Republic of the":"COD","Congo, Democratic Republic of the":"COD","Democratic Republic of Congo":"COD","Falkland Islands (Malvinas)":"FLK","Holy See (Vatican City State)":"VAT","Holy See":"VAT","Iran, Islamic Republic of":"IRN","Iran (Islamic Republic of)":"IRN","Islamic Republic of Iran":"IRN","Korea, Republic of":"KOR","Republic of Korea":"KOR","Korea (the Republic of)":"KOR","Korea, Democratic People's Republic of":"PRK","Democratic People's Republic of Korea":"PRK","Korea (the Democratic People's Republic of)":"PRK","Lao People's Democratic Republic":"LAO","Micronesia, Federated States of":"FSM","Micronesia (Federated States of)":"FSM","Moldova, Republic of":"MDA","Republic of Moldova":"MDA","Palestine, State of":"PSE","State of Palestine":"PSE","Russian Federation":"RUS","Syrian Arab Republic":"SYR","Taiwan, Province of China":"TWN","Tanzania, United Republic of":"TZA","United Republic of Tanzania":"TZA","Venezuela, Bolivarian Republic of":"VEN","Venezuela (Bolivarian Republic of)":"VEN","Viet Nam":"VNM","Virgin Islands, British":"VGB","Virgin Islands, U.S.":"VIR","Saint Martin (French part)":"MAF","Sint Maarten (Dutch part)":"SXM","Netherlands (Kingdom of the)":"NLD","Macedonia, the former Yugoslav Republic of":"MKD"}),Z=null,_=null;function ln(){if(Z)return Z;let n=new Map,e=[],t=["en",...Un.filter(o=>o!=="en")];for(let o of t){let r=null;try{r=new Intl.DisplayNames([o],{type:"region"})}catch{continue}for(let[a,l]of C){let u;try{u=r.of(a)}catch{u=void 0}if(!u||u===a)continue;let c=g(u);c&&!n.has(c)&&n.set(c,l),e.push([u,l])}}for(let[o,r]of Object.entries(Bn)){let a=g(o);a&&!n.has(a)&&n.set(a,r),e.push([o,r])}for(let[o,r]of Object.entries(En)){let a=g(o);a&&n.set(a,r),e.push([o,r])}let i=new U;for(let[o,r]of e){let a=g(o);n.get(a)===r&&(i.add(o,r),i.add(a,r))}return Z=n,_=i,n}function Kn(){return _||ln(),_}function On(n){if(n==null)return null;let e=String(n).trim();if(!e)return null;let t=g(e),i=ln().get(t);return i||(T(t)?null:Kn().get(h(e))??null)}function L(n){return C.get(String(n||"").trim().toUpperCase())??null}function I(n){if(n==null)return null;let e=String(n).trim();if(!e)return null;let t=e.toUpperCase();return t.length===3&&Pn.has(t)?t:t.length===2&&Ln.has(t)?C.get(t)??null:On(e)}var dn={europe:[-25,34,45,71.5],asia:[25,-11,150,56],africa:[-26,-35,58,38],"south-america":[-92,-56,-34,13],"north-america":[-168,7,-52,72],oceania:[110,-48,200,20]};function wn(n,e,t){let i=dn[t];return!i||n<i[1]||n>i[3]?!1:e>=i[0]&&e<=i[2]?!0:i[2]>180&&e+360>=i[0]&&e+360<=i[2]}var Dn=[[24.4,49.4,-125,-66.9],[51.2,71.5,-168,-129.9],[18.9,22.3,-160.3,-154.8]],xn=[7,72,-172,-52];function un(n,e,t){return n>=t[0]&&n<=t[1]&&e>=t[2]&&e<=t[3]}var y=n=>Math.round(n*10)/10;function St(n,e=3){let t=[],i=[],o=0,r=0,a=Object.keys(dn),l=new Map(a.map(s=>[s,0]));for(let s of n){let p=s?.lat,S=s?.lon;if(typeof p!="number"||typeof S!="number"||!isFinite(p)||!isFinite(S)||p<-90||p>90||S<-180||S>180)continue;t.push(p),i.push(S);for(let m of a)wn(p,S,m)&&l.set(m,l.get(m)+1);let M=s?.country?String(s.country).trim().toUpperCase():"",b=M?B(M):null;b?((M==="US"||M==="USA")&&o++,b==="north-america"&&r++):(Dn.some(m=>un(p,S,m))&&o++,un(p,S,xn)&&r++)}let u=t.length;if(u<e)return null;t.sort((s,p)=>s-p),i.sort((s,p)=>s-p);let c={},f,d=0;for(let s of[...a].sort()){let p=l.get(s);c[s]=y(p/u*100),p>d&&(d=p,f=s)}return{pctUsa:y(o/u*100),pctNa:y(r/u*100),latP5:y(P(t,.05)),latP95:y(P(t,.95)),lonP5:y(P(i,.05)),lonP95:y(P(i,.95)),n:u,regionPct:c,...f?{dominantFrame:f,dominantFramePct:y(d/u*100)}:{}}}var cn={"north-america":"AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI","south-america":"AR BO BR CL CO EC FK GF GY PE PY SR UY VE",europe:"AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA",africa:"AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW",asia:"AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE",oceania:"AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS",antarctica:"AQ BV GS HM TF"},E=(()=>{let n=new Map;for(let e of Object.keys(cn))for(let t of cn[e].split(/\s+/))t&&n.set(t,e);return n})();function Hn(n){for(let[e,t]of n){let i=E.get(e);i&&!E.has(t)&&E.set(t,i)}}Hn(C);function B(n){if(!n)return null;let e=String(n).trim().toUpperCase();if(!e)return null;let t=E.get(e);if(t)return t;let i=I(String(n));return i?E.get(i)??null:null}function Rt(n,e=2){return kn(n.map(t=>[t,1]),e)}function kn(n,e=2){let t=new Map,i=0;for(let[l,u]of n){let c=B(l);if(!c)continue;let f=typeof u=="number"&&isFinite(u)&&u>0?u:1;t.set(c,(t.get(c)??0)+f),i+=f}if(i<e||!t.size)return null;let o=0;for(let[l,u]of n)Fn(l)&&(o+=typeof u=="number"&&isFinite(u)&&u>0?u:1);let r="europe",a=-1;for(let l of Array.from(t.keys()).sort()){let u=t.get(l);u>a&&(r=l,a=u)}return{dominantGeoRegion:r,dominantGeoRegionPct:y(a/i*100),regionCount:t.size,middleEastPct:y(Math.min(o,i)/i*100),n:i}}var fn=new Set("AE BH CY EG IL IQ IR JO KW LB OM PS QA SA SY TR YE".split(" ")),pn=new Set([...fn].map(n=>C.get(n)).filter(n=>!!n));function Fn(n){if(!n)return!1;let e=String(n).trim().toUpperCase();if(fn.has(e)||pn.has(e))return!0;let t=I(String(n));return!!t&&pn.has(t)}var Vn=Symbol.for("@bicharts/shape-core/admin1-lookup/v1"),R=(n=>n[Vn]??={lookup:null})(globalThis),Xn=(()=>{let n=new Map;return C.forEach((e,t)=>n.set(e,t)),n})();function bt(n){if(!n||typeof n.cities!="string"||typeof n.admin1!="string")throw new Error("admin1 lookup: not a lookup document");if(R.lookup&&R.lookup.version===n.version)return{cities:R.lookup.cityCount,admin1:R.lookup.admin1Count};let e=new Map,t=(d,s)=>{if(!d)return;let p=e.get(d);p?p.push(s):e.set(d,[s])},i=0;for(let d of n.cities.split(`
3
+ `)){let s=d.split("|");if(s.length<6)continue;let p={cc:s[1],a1:s[2],popK:+s[3]||0,lat:+s[4],lon:+s[5],pid:s[7]||""};t(s[0],{...p,primary:!0});for(let S of(s[6]||"").split(";"))t(S,{...p,primary:!1});i++}let o=new Map,r=new Map,a=(d,s)=>{if(!d)return;let p=r.get(d);p?p.includes(s)||p.push(s):r.set(d,[s])},l=0;for(let d of n.admin1.split(`
4
+ `)){let s=d.split("|");if(!(s.length<2||!s[0].includes("."))){o.set(s[0],s[1]),a(s[1],s[0]);for(let p of(s[2]||"").split(";"))a(p,s[0]);l++}}let u=new Map,c=new Set;for(let d of(n.crosswalk||"").split(`
5
+ `)){let[s,p]=d.split("|");s&&p&&(u.set(s,p),c.add(p))}e.forEach(d=>d.forEach(s=>{s.pid&&c.add(s.pid)}));let f=new Map;for(let d of(n.centers||"").split(`
6
+ `)){let[s,p,S]=d.split("|");s&&isFinite(+p)&&isFinite(+S)&&p!==""&&S!==""&&(f.set(s,[+p,+S]),c.add(s))}return R.lookup={version:n.version,cityByKey:e,admin1ByCode:o,admin1ByKey:r,provinceOfCode:u,provinceIds:c,centers:f,cityCount:i,admin1Count:l},{cities:i,admin1:l}}function W(){return R.lookup!==null}function Nt(){R.lookup=null}function mn(n){let e=I(n);return e?Xn.get(e)??null:null}var Yn=10;function Mn(n,e={}){if(!R.lookup||!n)return{status:"unmatched"};let t=g(String(n)),i=R.lookup.cityByKey.get(t);if(!i||i.length===0)return{status:"unmatched"};let o=e.country?mn(e.country):null;if(e.country&&o?i=i.filter(f=>f.cc===o):e.region&&(i=i.filter(f=>B(f.cc)===e.region)),i.length===0)return{status:"unmatched"};let r=i.filter(f=>f.primary),a=r.length>0?r:i,l=new Map;for(let f of a){let d=`${f.cc}|${f.a1}|${f.lat}|${f.lon}`;l.has(d)||l.set(d,f)}let u=[...l.values()].sort((f,d)=>d.popK-f.popK),c=u[0];return u.length===1||c.popK>=Yn*Math.max(u[1].popK,1)?!c.a1&&!c.pid?{status:"unmatched"}:{status:"resolved",cc:c.cc,admin1:c.a1,code:`${c.cc}.${c.a1}`,provinceId:c.pid||null,lat:c.lat,lon:c.lon,popK:c.popK}:{status:"ambiguous",candidates:u.length}}function vn(n,e){if(!R.lookup||!n)return[];let t=R.lookup.admin1ByKey.get(g(String(n)))??[],i=e?mn(e):null;return i?t.filter(o=>o.startsWith(i+".")):[...t]}function Zn(n){return!R.lookup||!n?null:R.lookup.provinceOfCode.get(n)??null}function It(n){return!R.lookup||!n?!1:R.lookup.provinceIds.has(String(n).trim().toUpperCase())}function gn(n){return!R.lookup||!n?null:R.lookup.centers?.get(String(n).trim().toUpperCase())??null}function z(n,e={}){if(!R.lookup||!n)return{status:"unmatched"};let t=String(n).trim();if(!t)return{status:"unmatched"};if(R.lookup.provinceIds.has(t.toUpperCase()))return{status:"resolved",provinceId:t.toUpperCase()};let i=R.lookup.provinceOfCode.get(t.toUpperCase());if(i)return{status:"resolved",provinceId:i};let o=[...new Set(vn(t,e.country??null).map(Zn).filter(r=>!!r))];if(o.length>1&&e.region){let r=o.filter(a=>B(a.split("-")[0])===e.region);r.length&&(o=r)}return o.length===1?{status:"resolved",provinceId:o[0]}:o.length?{status:"ambiguous",candidates:o.length}:{status:"unmatched"}}var _n={"north-america":"N",world:"W"};function nn(n,e){let t=n.filter(i=>i.row.kinds.includes(_n[e||"north-america"]));return t.length?t:(e||"north-america")==="world"?n:t}var V=en;function Kt(n){n!==V&&(V=n||"",D=null,x=null,H=null,k=null,F=null)}function Wn(){return V.length>0}var zn={US:"washington",CA:"ottawa",MX:"mexico city",GB:"london",FR:"paris",DE:"berlin",IT:"rome",ES:"madrid",PT:"lisbon",NL:"amsterdam",BE:"brussels",CH:"bern",AT:"vienna",IE:"dublin",PL:"warsaw",SE:"stockholm",NO:"oslo",DK:"copenhagen",FI:"helsinki",IS:"reykjavik",CZ:"prague",SK:"bratislava",HU:"budapest",RO:"bucharest",BG:"sofia",GR:"athens",TR:"ankara",UA:"kyiv",RU:"moscow",RS:"belgrade",HR:"zagreb",SI:"ljubljana",EE:"tallinn",LV:"riga",LT:"vilnius",JP:"tokyo",CN:"beijing",KR:"seoul",KP:"pyongyang",IN:"new delhi",PK:"islamabad",BD:"dhaka",LK:"colombo",TH:"bangkok",VN:"hanoi",PH:"manila",ID:"jakarta",MY:"kuala lumpur",SG:"singapore",MM:"naypyidaw",KH:"phnom penh",LA:"vientiane",NP:"kathmandu",AF:"kabul",IR:"tehran",IQ:"baghdad",SA:"riyadh",AE:"abu dhabi",QA:"doha",KW:"kuwait city",BH:"manama",OM:"muscat",JO:"amman",LB:"beirut",SY:"damascus",IL:"jerusalem",YE:"sanaa",EG:"cairo",LY:"tripoli",TN:"tunis",DZ:"algiers",MA:"rabat",SD:"khartoum",ET:"addis ababa",KE:"nairobi",TZ:"dodoma",UG:"kampala",NG:"abuja",GH:"accra",CI:"yamoussoukro",SN:"dakar",ML:"bamako",CM:"yaounde",CD:"kinshasa",CG:"brazzaville",AO:"luanda",ZM:"lusaka",ZW:"harare",MZ:"maputo",BW:"gaborone",NA:"windhoek",ZA:"pretoria",AU:"canberra",NZ:"wellington",PG:"port moresby",FJ:"suva",BR:"brasilia",AR:"buenos aires",CL:"santiago",PE:"lima",CO:"bogota",VE:"caracas",EC:"quito",BO:"la paz",PY:"asuncion",UY:"montevideo",GY:"georgetown",SR:"paramaribo",CU:"havana",DO:"santo domingo",HT:"port au prince",JM:"kingston",TT:"port of spain",PA:"panama city",CR:"san jose",NI:"managua",HN:"tegucigalpa",SV:"san salvador",GT:"guatemala city",BZ:"belmopan",AZ:"baku",AM:"yerevan",GE:"tbilisi",KZ:"astana",UZ:"tashkent",TM:"ashgabat",KG:"bishkek",TJ:"dushanbe",MN:"ulaanbaatar",BY:"minsk",MD:"chisinau",AL:"tirana",MK:"skopje",BA:"sarajevo",ME:"podgorica",XK:"pristina",CY:"nicosia",MT:"valletta",LU:"luxembourg"},D=null;function K(){if(D)return D;let n=new Map,e=V,t=(i,o,r)=>{if(!i)return;let a=n.get(i);a?a.some(l=>l.row===o)||a.push({row:o,primary:r}):n.set(i,[{row:o,primary:r}])};for(let i of e.split(",")){let o=i.split("|");if(o.length<7)continue;let r={a1:o[1],cc:o[2],lon:+o[3],lat:+o[4],pop:+o[5],kinds:o[6]||"N"};o.length>8&&o[8]&&(r.tags=o[8].split(";").filter(Boolean));let a=zn[r.cc];if(a&&G(o[0])===G(a)&&(r.tags||(r.tags=[]),r.tags.includes("capital")||r.tags.push("capital")),t(g(o[0]),r,!0),o.length>7&&o[7])for(let l of o[7].split(";"))t(g(l),r,!1)}for(let i of n.values())i.sort((o,r)=>r.row.pop-o.row.pop);return D=n,n}var Jn=200,x=null;function yn(){if(x)return x;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<Jn||n.set(i,t)}return x=n,n}function X(n,e){if(!n)return;let t=Sn(K(),yn(),n);if(t)return t;if(T(n))return;let i=e??G(n);if(v(i))return Sn(Qn(),jn(),i)}function Sn(n,e,t){let i=n.get(t);if(i?.some(a=>a.primary))return i;let o=e.get(t);if(!o)return i;let r=o.map(a=>({row:a.row,primary:!0}));return i?[...r,...i]:r}var H=null;function Qn(){return H||(H=bn(K())),H}var k=null;function jn(){return k||(k=bn(yn())),k}function bn(n){let e=new Map;for(let[t,i]of n){let o=G(t);if(!v(o))continue;let r=e.get(o);if(!r){e.set(o,i.slice());continue}for(let a of i){let l=r.findIndex(u=>u.row===a.row);l<0?r.push(a):a.primary&&!r[l].primary&&(r[l]=a)}}for(let t of e.values())t.sort((i,o)=>o.row.pop-i.row.pop);return e}var F=null;function $n(){if(F)return F;let n=new Map;for(let t of an.split(",")){let i=t.split("|");i.length<3||n.set(i[0],{lon:+i[1],lat:+i[2]})}let e=new Map;for(let t of K().values())for(let i of t){let o=L(i.row.cc);if(!o)continue;let r=e.get(o);(r===void 0||i.row.pop>r)&&(e.set(o,i.row.pop),n.set(o,{lon:i.row.lon,lat:i.row.lat}))}return F=n,n}var J=null;function Y(){if(J)return J;let n=new Map;for(let e of on.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(g(i.key),i);let o=g(i.name);o==="mexico"&&i.cc==="MX"?(n.set("estado de mexico",i),n.set("edomex",i)):n.set(o,i)}return J=n,n}var Q=null;function qn(){if(Q)return Q;let n=new U;for(let[e,t]of Y())n.add(e,t);return Q=n,n}var j=null;function nt(){if(j)return j;let n=new Map;for(let e of rn.split(",")){let t=e.split("|");t.length<3||n.set(t[0],{lon:+t[1],lat:+t[2]})}return j=n,n}var tt=new Set(["USA","PRI","VIR","GUM","ASM","MNP"]),Nn=new Set(["USA","CAN","MEX"]);function Rn(n,e){return e!=="north-america"||!!n&&Nn.has(n)}function An(n){if(n==null)return null;let e=g(String(n));if(!e)return null;let t=Y().get(e);return t?t.key:T(e)?null:qn().get(h(String(n)))?.key??null}var In={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 Ot(n){if(n==null)return null;let e=g(String(n));if(!e)return null;let t=In[e];return t||(T(e)?null:et().get(h(String(n)))??null)}var $=null;function et(){if($)return $;let n=new U;for(let[e,t]of Object.entries(In))n.add(e,t);return $=n,n}function it(n){return Y().get(g(n))?.cc??null}function ot(n){let e=it(n);return e?L(e):null}function wt(n){return Gn(n)[0]??null}function rt(n){if(n==null)return null;let e=String(n).trim().replace(/\.0+$/,"");if(!e)return null;let t=/^(\d{5})(-\d{4})?$/.exec(e);return t?t[1]:/^\d{3,4}$/.test(e)?e.padStart(5,"0"):null}function Gn(n){if(n==null)return[];let e=String(n).trim().replace(/\.0+$/,"");if(!e)return[];if(/^\d{3}$/.test(e)){let i=e.padStart(5,"0").slice(0,3);return i===e?[e]:[e,i]}let t=rt(e);return t?[t.slice(0,3)]:[]}function at(n){return!!n&&n.ambiguous===!0&&!("precision"in n)}function st(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 a=+t,l=+i;if(isFinite(a)&&isFinite(l)&&a>=-90&&a<=90&&l>=-180&&l<=180)if(a===0&&l===0)e={lat:0,lon:0,precision:"latlon"};else return{lat:a,lon:l,precision:"latlon"}}let o=I(n.country),r=An(n.state);if(r&&o&&ot(r)!==o&&(r=null),r&&n.region&&n.region!=="north-america"&&(r=null),n.city!==void 0&&n.city!==null){let a=g(String(n.city)),l=X(a,h(String(n.city))),u=l?nn(l,n.mapKind):null;if(u&&u.length){let c=n.state===void 0||n.state===null?"":String(n.state).trim(),f=c?g(c):"",d=c?An(c):null,s=[],p=-1;for(let M of u){let b=M.row,m=0;if(c&&b.a1!=="")if(d&&b.a1===d||g(b.a1)===f)m++;else continue;if(o)if(L(b.cc)===o)m++;else continue;m>p?(p=m,s=[M]):m===p&&s.push(M)}s.some(M=>M.primary)&&(s=s.filter(M=>M.primary));let S=new Map;for(let M of s)S.set(M.row.lon.toFixed(2)+","+M.row.lat.toFixed(2),M.row);if(S.size===1){let M=s[0].row;return{lat:M.lat,lon:M.lon,precision:"city"}}if(S.size>1)return{ambiguous:!0,matches:S.size}}if(W()){let c=Mn(String(n.city),{country:n.country??null,region:n.region??null});if(c.status==="ambiguous")return{ambiguous:!0,matches:c.candidates};if(c.status==="resolved"&&Rn(L(c.cc),n.mapKind)){let f=n.state===void 0||n.state===null?"":String(n.state).trim(),d=f?z(f,{country:n.country??null,region:n.region??null}):null;if(!d||d.status==="resolved"&&d.provinceId===c.provinceId)return{lat:c.lat,lon:c.lon,precision:"city"}}}}if(!o||tt.has(o))for(let a of Gn(n.zip)){let l=nt().get(a);if(l)return{lat:l.lat,lon:l.lon,precision:"zip3"}}if(r){let a=Y().get(g(r));if(a)return{lat:a.lat,lon:a.lon,precision:"state"}}if(!r&&n.state!==void 0&&n.state!==null&&String(n.state).trim()&&W()){let a=z(String(n.state),{country:n.country??null,region:n.region??null});if(a.status==="ambiguous")return{ambiguous:!0,matches:a.candidates};if(a.status==="resolved"){let l=L(a.provinceId.split("-")[0]),u=gn(a.provinceId);if(u&&(!o||l===o)&&Rn(l,n.mapKind))return{lat:u[1],lon:u[0],precision:"state"}}}if(o&&(n.mapKind!=="north-america"||Nn.has(o))){let a=$n().get(o);if(a)return{lat:a.lat,lon:a.lon,precision:"country"}}return e}var w={latlon:0,city:1,zip3:2,state:3,country:4},Cn=8;function Dt(n,e,t){let i=new Array(n.length),o=new Array(n.length),r=new Array(n.length),a=new Set,l=[],u=new Set,c=[],f=new Set,d=[],s={latlon:0,city:0,zip3:0,state:0,country:0},p=0,S=0,M=null;for(let m=0;m<n.length;++m){let O=n[m],N=st({...O,mapKind:e,region:t});if(at(N)){i[m]=null,o[m]=null,r[m]=null,S++;let A=q(O);A&&!f.has(A.toLowerCase())&&(f.add(A.toLowerCase()),d.length<Cn&&d.push(A))}else if(N){if(i[m]=N.lat,o[m]=N.lon,r[m]=N.precision,p++,s[N.precision]++,(M===null||w[N.precision]>w[M])&&(M=N.precision),w[N.precision]>w.city){let A=q(O);A&&!u.has(A.toLowerCase())&&(u.add(A.toLowerCase()),c.length<Cn&&c.push(A))}}else{i[m]=null,o[m]=null,r[m]=null;let A=q(O);A&&!a.has(A.toLowerCase())&&(a.add(A.toLowerCase()),l.push(A))}}let b=!Wn()&&n.some(m=>m.city!==null&&m.city!==void 0&&String(m.city).trim()!=="");return{lat:i,lon:o,precisions:r,precision:M,precisionCounts:s,coarseExamples:c,unmatched:l,ambiguousRows:S,ambiguousExamples:d,matchedRows:p,totalRows:n.length,...b?{cityTableMissing:!0}:{}}}function q(n){let e=[n.city,n.state,n.zip,n.country].filter(t=>t!=null&&String(t).trim()!=="").map(t=>String(t).trim()).join(", ");return e||(n.label===null||n.label===void 0?"":String(n.label).trim())}function xt(n,e){let t=g(String(n??""));if(!t)return[];let i=X(t,h(String(n??"")));if(!i)return[];let o=I(e??null),r=new Set;for(let a of i)if(!(o&&L(a.row.cc)!==o))for(let l of a.row.tags??[])r.add(l);return Array.from(r)}function Ht(n,e){if(!n)return!1;let t=X(n);return t?nn(t,e).length>0:!1}function kt(n,e){let t=new Set,i=0;for(let o of n){if(o==null)continue;let r=g(String(o));if(T(r)||t.has(r))continue;t.add(r);let a=X(r,h(String(o)));a&&nn(a,e).length>0&&i++}return t.size===0?0:Math.round(i/t.size*1e3)/10}export{ut as a,T as b,ct as c,g as d,h as e,Ln as f,Pn as g,ln as h,On as i,I as j,dn as k,St as l,Hn as m,B as n,Rt as o,kn as p,Fn as q,bt as r,W as s,Nt as t,mn as u,Yn as v,Mn as w,vn as x,Zn as y,It as z,z as A,Kt as B,Wn as C,Nn as D,An as E,Ot as F,wt as G,rt as H,Gn as I,at as J,st as K,Dt as L,xt as M,Ht as N,kt as O};
@@ -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{O as I,W as A,f as R}from"./chunk-PUXXFTDT.mjs";import{a as h,c as x,d as E,e as L}from"./chunk-TZ74QIKA.mjs";import{u as C}from"./chunk-CZJ7M6A5.mjs";import M from"papaparse";var k=500,P=/^[+-]?\d{1,15}$/,v=/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?)?$/,N=/^\d{1,2}[\/\-.]\d{1,2}[\/\-.]\d{2,4}$/;function O(e,o=".",n=!1){if(n)return"DateTime";let r=0,s=0,i=0,l=0;for(let c of e){if(c==null)continue;if(typeof c=="number"){l++,s++,Number.isInteger(c)&&r++;continue}if(c instanceof Date){l++,i++;continue}if(typeof c=="boolean"){l++;continue}let m=String(c).trim();if(m!==""){if(l++,P.test(h(m))){r++,s++;continue}if(L(m,o)){s++;continue}if((v.test(m)||N.test(m))&&!isNaN(Date.parse(m))){i++;continue}}}return l===0?"String":i===l?"DateTime":r===l?"Integer":s===l?"Decimal":"String"}function _(e,o,n=".",r=null){if(e==null)return null;if(typeof e=="number")return o==="String"?String(e):e;if(e instanceof Date)return o==="DateTime"?e:e.toISOString();if(typeof e=="boolean")return String(e);let s=String(e).trim();if(s==="")return null;switch(o){case"Integer":{let i=h(s);return P.test(i)?parseInt(i,10):null}case"Decimal":return E(s,n);case"DateTime":return r?r.read(s):C(s);default:return s}}function $(e){let o=(e||"").toLowerCase().replace(/\(.*$/,"").trim();return/^(tinyint|smallint|int|integer|int2|int4|int8|bigint|serial|bigserial)$/.test(o)?"Integer":/^(decimal|numeric|money|smallmoney|float|real|double|double precision|number)$/.test(o)?"Decimal":/^(date|datetime|datetime2|smalldatetime|datetimeoffset|timestamp|timestamptz|time)$/.test(o)?"DateTime":(/^(bit|bool|boolean)$/.test(o),"String")}function*q(e,o){for(let n of e)yield n?.[o]}function g(e,o,n){if(e.length===0)throw new Error("ingest: no columns were resolved from the source. Supply column descriptors, or use a source shape that carries them (grid/table/objects/sql).");let r=e.length,s=e.map((t,a)=>o.slice(0,k).map(u=>u?.[a])),i=s.map(t=>x(t,n.locale)),l=e.map((t,a)=>t.dataType===void 0||t.dataType==="DateTime"?R(q(o,a),{locale:n.locale??"en"}):null),c=e.map((t,a)=>t.dataType??O(s[a],i[a],l[a]!==null)),m=new Set((n.measures??[]).map(t=>t.toLowerCase())),b=new Set((n.dimensions??[]).map(t=>t.toLowerCase())),j=new Set((n.nonAdditive??[]).map(t=>t.toLowerCase())),D=e.map((t,a)=>{let u=t.name.toLowerCase(),f=t.isMeasure??((c[a]==="Integer"||c[a]==="Decimal")&&!I(t.name));m.has(u)&&(f=!0),b.has(u)&&(f=!1);let T={name:t.name,dataType:c[a],isMeasure:f};return f&&j.has(u)&&(T.discourageAggregationAcrossGroups=!0),T}),d=new A;d.dedupRows=n.dedup!==!1,d.deriveProvinces=n.deriveProvinces!==!1,d.setColumns(D),d.declareDimensions(D.filter((t,a)=>b.has(e[a].name.toLowerCase())));for(let t=0;t<o.length;t++){let a=o[t];d.addRow(Array.from({length:r},(u,f)=>_(a?.[f],c[f],i[f],l[f])),t)}let p=d.getColumnsWithStats(n.privacyLevel??"20",n.locale??"en"),S=new Map(p.map(t=>[t.name,t]));e.forEach(t=>{let a=S.get(t.name);a&&(t.format&&(a.modelFormat=t.format),t.description&&(a.modelDesc=t.description))});let y=t=>{let a=S.get(t);if(a)return[a];let u=t.toLowerCase();return p.filter(f=>f.name.toLowerCase()===u)};for(let[t,a]of Object.entries(n.formats??{}))for(let u of y(t))u.modelFormat=a;for(let[t,a]of Object.entries(n.descriptions??{}))for(let u of y(t))u.modelDesc=a;for(let t of n.groupBy??[])for(let a of y(t))a.isGrouping=!0;return{columns:p,rows:d.toObjectArray(),totalRows:d.getRowCount(),index:d}}function w(e,o){return e.map(n=>Array.isArray(n)?n:o.map(r=>n[r]))}function F(e,o){let n=[],r=new Set,s=Math.min(e.length,Math.max(1,o));for(let i=0;i<s;i++){let l=e[i];if(!(!l||typeof l!="object"))for(let c of Object.keys(l))r.has(c)||(r.add(c),n.push(c))}return n}function V(e){let o=String(e??"").replace(/^\uFEFF/,""),n=[],r=[],s=0;return M.parse(o,{skipEmptyLines:!1,step:i=>{let l=i.meta.cursor,c=o.slice(s,l);s=l,i.errors?.length&&r.push(...i.errors);let m=i.data;m.length===1&&m[0]===""&&c.replace(/[\r\n]/g,"")===""||n.push(m)}}),!n.length&&!r.length&&r.push(...M.parse(o,{skipEmptyLines:!0}).errors),{rows:n,errors:r}}function Y(e,o={}){switch(e.kind){case"csv":{let n=V(e.text);if(n.errors.length&&n.rows.length===0)throw new Error(`ingest: CSV parse failed - ${n.errors[0].message}`);let r=n.rows;if(r.length<2)throw new Error("ingest: CSV needs a header line plus at least one data row.");let s=r[0].map(i=>(i??"").trim());return g(s.map(i=>({name:i})),r.slice(1),o)}case"grid":{if(!e.header?.length)throw new Error("ingest: 'grid' needs a non-empty header.");return g(e.header.map(n=>({name:(n??"").trim()})),e.rows??[],o)}case"table":{if(!e.columns?.length)throw new Error("ingest: 'table' needs at least one column descriptor.");let n=e.columns.map(r=>r.name);return g(e.columns,w(e.rows??[],n),o)}case"objects":{let n=e.rows??[],r=e.columns?.length?e.columns:F(n,o.columnScanLimit??k).map(s=>({name:s}));if(!r.length)throw new Error("ingest: 'objects' produced no columns - the rows array is empty or holds no object keys.");return g(r,w(n,r.map(s=>s.name)),o)}case"sql":{if(!e.schema?.length)throw new Error("ingest: 'sql' needs at least one schema column.");let n=e.schema.map(r=>{let s=$(r.dataType);return{name:r.name,dataType:s,isMeasure:r.isMeasure,format:r.format,description:r.description}});return g(n,w(e.rows??[],n.map(r=>r.name)),o)}default:{let n=e;throw new Error(`ingest: unknown source kind '${n?.kind}'. Expected one of: csv, grid, table, objects, sql.`)}}}export{$ as a,V as b,Y as c};
@@ -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 be}from"./chunk-U3H6UBOO.mjs";import{a as At,f as ee,g as Se,h as ie,i as _e,j as ne}from"./chunk-TZ74QIKA.mjs";import{b as ht,c as yt,d as bt,e as St,f as _t}from"./chunk-WTJVREEE.mjs";import{c as ft,l as gt,n as he,p as pt,s as re,w as ye,x as ke,y as De,z as Pe}from"./chunk-AAPXJXEP.mjs";import{e as lt,k as ge,m as dt,n as mt,o as pe}from"./chunk-3ZAS32F5.mjs";import{b as ut,d as ct}from"./chunk-5HI6TVMM.mjs";import{A as fe,B as ot,E as at,a as ce,b as J,c as Ze,d as de,g as qe,h as Qe,j as Je,l as et,m as tt,o as nt,p as me,q as rt,r as it,u as Ne,w as st}from"./chunk-CZJ7M6A5.mjs";import{c as Xe,f as Ee}from"./chunk-WC4JINEZ.mjs";var cn=85,dn=60,mn=/(^|[^a-z])(state|province|provincia|provinz|region|regione|regiao|county|department|departement|departamento|prefecture|oblast|canton|kanton|bundesland|land|territory)([^a-z]|$)/i,Oe=t=>Math.round(t*10)/10,Ae=t=>t.split("-")[0];function xt(t){let e=new Map,n=0;if(t.forEach((s,o)=>{let l=he(o);l&&(e.set(l,(e.get(l)||0)+s),n+=s)}),n===0)return{};let[i,r]=[...e].sort((s,o)=>o[1]-s[1])[0];return{dominantRegion:i,dominantRegionPct:Oe(100*r/n)}}function bi(t){let e=t.province===null||t.province===void 0?"":String(t.province).trim();if(e)return Ct(e,t.provinceKind,t.country);if(!re())return null;let n=t.city===null||t.city===void 0?"":String(t.city).trim();if(!n)return null;let i=ye(n,{country:t.country===null||t.country===void 0?null:String(t.country)});return i.status==="resolved"?i.provinceId:null}function Ct(t,e,n){if(e==="us-state-code"||e==="us-state-name"){let s=_t(t,e);return s?"US-"+s:null}if(!re())return null;if(e==="admin1-code")return Pe(t)?t.toUpperCase():null;let i=n==null?null:String(n),r=new Set(ke(t,i).map(De).filter(s=>!!s));return r.size===1?[...r][0]:null}function Si(t,e={}){let n=e.deriveProvinces!==!1,i=new Array(t.length),r=new Array(t.length),s=new Set,o=[],l=new Set,a=[],c=0,d=0,g=0,m=A=>{let S=A.toLowerCase();s.has(S)||(s.add(S),o.push(A))},b=A=>A==null||A===""?null:Number(A),M=new Map;return t.forEach((A,S)=>{i[S]=null,r[S]=null;let p=A.country===null||A.country===void 0||String(A.country).trim()===""?null:String(A.country).trim(),h=A.province===null||A.province===void 0?"":String(A.province).trim();if(h){let _=Ct(h,e.provinceKind,p);_?(i[S]=_,r[S]="province",c++):m(h);return}if(!n)return;let x=b(A.lat),f=b(A.lon),C=!1;if(e.locate&&x!==null&&f!==null&&isFinite(x)&&isFinite(f)){C=!0;let _=e.locate(x,f);if(_){i[S]=_,r[S]="coordinates",c++;return}}let y=A.city===null||A.city===void 0?"":String(A.city).trim();if(y&&re()){let _=y.toLowerCase()+""+(p??""),w=M.get(_);if(w||(w=ye(y,{country:p}),M.set(_,w)),w.status==="resolved"&&w.provinceId){i[S]=w.provinceId,r[S]="city",c++;return}if(w.status==="ambiguous"){d++,l.has(_)||(l.add(_),a.length<8&&a.push(y));return}m(y);return}C&&g++}),{iso:i,source:r,unmatched:o,matchedRows:c,totalRows:t.length,ambiguousRows:d,ambiguousExamples:a,unplacedPoints:g}}function wt(t,e,n={}){let i=new Map;if(!re()||e.length===0)return i;let r=t.findIndex(l=>!l.isMeasure&&(l.geoKind||"").startsWith("country")),s=l=>l==null?"":String(l).trim(),o=l=>{let a=new Map;for(let b of e){let M=s(b[l]);if(!M)continue;let A=r>=0&&s(b[r])||null,S=M+""+(A??""),p=a.get(S);p?p.rows++:a.set(S,{city:M,country:A,rows:1})}if(a.size===0)return null;let c=0,d=0,g=new Set,m=new Map;return a.forEach(b=>{let M=ye(b.city,{country:b.country});M.status!=="unmatched"&&d++,!(M.status!=="resolved"||!M.provinceId)&&(c++,g.add(M.provinceId),m.set(M.cc,(m.get(M.cc)||0)+b.rows))}),{signals:{rollupPct:Oe(100*c/a.size),regionCount:g.size,countryCount:m.size,...xt(m)},cityPct:100*d/a.size,distinct:a.size}};return t.forEach((l,a)=>{if(l.isMeasure||a===r)return;let c=l.geoKind||"";if(c.startsWith("city")){if(n.cities===!1)return;let _=o(a);_&&i.set(a,_.signals);return}if(c)return;let d=new Map,g=new Map;for(let _ of e){let w=s(_[a]);w&&(d.set(w,(d.get(w)||0)+1),g.has(w)||g.set(w,r>=0&&s(_[r])||null))}if(d.size<3)return;let m=0,b=0,M=0,A=new Set,S=new Map;d.forEach((_,w)=>{if(Pe(w)){m++;let z=w.toUpperCase();A.add(z),S.set(Ae(z),(S.get(Ae(z))||0)+_);return}let W=new Set(ke(w,g.get(w)).map(De).filter(z=>!!z));if(W.size===1){b++;let z=[...W][0];A.add(z),S.set(Ae(z),(S.get(Ae(z))||0)+_)}else W.size>1&&M++});let h=mn.test(l.name.replace(/[_-]+/g," "))?dn:cn,x=100*m/d.size,f=100*b/d.size,C=x>=f,y=C?x:f;if(y<h){if(n.cities===!1)return;let _=o(a);if(!_||_.cityPct<ft||_.distinct<bt&&!yt(l.name,ht))return;i.set(a,_.signals);return}i.set(a,{kind:C?"admin1-code":"admin1-name",matchPct:Oe(y),ambiguous:!C&&M/d.size>.15?!0:void 0,regionCount:A.size,countryCount:S.size,...xt(S)})}),i}function ze(t){let e=(t||"").toLowerCase();return e==="en-us"||e==="en"||e.startsWith("en-us-")||e==="en-ph"||e==="en-bz"}var Le={a:0,b:0,c:0,yearFirst:!1,sep:"",trail:"",word:"",day:0,year:0,namedOrder:"dmy",cjkPattern:""},fn=/\s+(\d{1,2}):(\d{2})(?::(\d{2})(?:[.,]\d{1,9})?)?(?:\s*([ap])\.?\s?m\.?)?$/i,gn=/^(\d{1,4})(\s*[./-]\s*)(\d{1,2})(\s*[./-]\s*)(\d{1,4})(\.?)$/,pn=/^(\d{4})(\s*[年년]\s*)(\d{1,2})(\s*[月월]\s*)(\d{1,2})(\s*[日일号])$/,hn=/(\d)(?:st|nd|rd|th|er|º|ª)(?=[\s.,/-]|$)/gi,yn=new Set(["de","del","of"]),bn=new Set(["\u0433","\u0440","r"]),Sn=/^[\p{L}\p{M}\u0970\u05f3]+$/u,Fe=/^\d+$/;function _n(t){let e=+t[1],n=+t[2],i=t[3]===void 0?0:+t[3],r=t[4]!==void 0;if(n>59||i>59)return null;if(r){if(e<1||e>12)return null;e=e%12+(t[4].toLowerCase()==="p"?12:0)}else if(e>23)return null;return{h:e,mi:n,s:i,seconds:t[3]!==void 0,meridiem:r}}function Mt(t){let e=t.replace(/[\u200e\u200f\u061c]/g,"").replace(/\s+/g," ").trim();if(e==="")return null;e=At(e);let n=null,i=fn.exec(e);if(i){if(n=_n(i),!n)return null;e=e.slice(0,i.index)}let r;if(r=pn.exec(e)){let m=`cjk|${r[2]}|${r[4]}|${r[6]}`;return{...Le,form:"cjk",key:m,clock:n,a:+r[1],b:+r[3],c:+r[5],yearFirst:!0,cjkPattern:`%Y${r[2]}%m${r[4]}%d${r[6]}`}}if(r=gn.exec(e)){let m=r[2],b=r[4];if(m!==b)return null;let M=m.trim(),A=r[6];if(A&&M!==".")return null;let S=[r[1].length,r[3].length,r[5].length],p=S[0]===4,h=S[2]===4;return p===h||(p?S[1]>2||S[2]>2:S[0]>2||S[1]>2)?null:p&&M==="-"&&m==="-"&&S[1]===2&&S[2]===2?"iso":p&&M==="."&&m==="."&&!A&&!(S[1]===2&&S[2]===2)?null:{...Le,form:"numeric",key:`num|${p?"y":"x"}|${m}|${A}`,clock:n,a:+r[1],b:+r[3],c:+r[5],yearFirst:p,sep:m,trail:A}}let s=e.replace(hn,"$1").split(/[\s.,/-]+/).filter(m=>m!==""&&!yn.has(m.toLowerCase()));if(s.length===4&&Fe.test(s[2])&&bn.has(s[3].toLowerCase())&&s.pop(),s.length!==3)return null;let o=s.map(m=>Fe.test(m)?"N":Sn.test(m)?"W":"?").join(""),l=s.map(m=>Fe.test(m)?m:""),a=0,c=0,d="",g;if(o==="NWN"&&l[0].length<=2&&l[2].length===4)a=+l[0],d=s[1],c=+l[2],g="dmy";else if(o==="WNN"&&l[1].length<=2&&l[2].length===4)d=s[0],a=+l[1],c=+l[2],g="mdy";else if(o==="NWN"&&l[0].length===4&&l[2].length<=2)c=+l[0],d=s[1],a=+l[2],g="ymd";else return null;return{...Le,form:"named",key:`named|${g}`,clock:n,day:a,year:c,word:d,namedOrder:g}}var An=[31,28,31,30,31,30,31,31,30,31,30,31],xn=t=>t%4===0&&t%100!==0||t%400===0;function Tt(t,e,n){return t>=1&&t<=9999&&e>=1&&e<=12&&n>=1?n<=(e===2&&xn(t)?29:An[e-1]):!1}function Cn(t,e,n,i){let r=new Date(Date.UTC(2e3,e-1,n,i?.h??0,i?.mi??0,i?.s??0));return r.setUTCFullYear(t),r}function vt(t,e={}){let n=(e.floor??1)>=1,i=new Map,r=new Map,s=0,o=null;for(let p of t){if(p==null)continue;if(typeof p!="string"){if(n)return null;s++;continue}let h=p.trim();if(h==="")continue;s++;let x=i.get(h);if(x===void 0&&(x=Mt(h),i.set(h,x)),x===null||x==="iso"){if(n)return null;continue}if(n){if(o===null)o=x;else if(x.key!==o.key)return null}else r.set(x.key,(r.get(x.key)??0)+1)}if(!n){let p=0,h="";for(let[x,f]of r)f>p&&(p=f,h=x);if(p===0||p/s<e.floor)return null;o=[...i.values()].find(x=>x!==null&&x!=="iso"&&x.key===h)??null}if(o===null)return null;let l=o.key,a=[...i.values()].filter(p=>p!==null&&p!=="iso"&&p.key===l),c,d="shape",g=null;if(o.form==="named"){if(c=o.namedOrder,g=_e(a.map(p=>p.word),e.locale),!g)return null}else if(o.form==="cjk"||o.yearFirst)c="ymd";else{let p=0,h=0;for(let x of a)x.a>12&&p++,x.b>12&&h++;if(p>0&&h>0)return null;p>0?(c="dmy",d="values"):h>0?(c="mdy",d="values"):o.sep.trim()==="."?(c="dmy",d="shape"):(c=ze(e.locale)?"mdy":"dmy",d="locale")}let m=p=>{if(p.form==="named"){let h=g.get(ee(p.word));return h===void 0?null:[p.year,h+1,p.day]}return p.yearFirst?[p.a,p.b,p.c]:c==="dmy"?[p.c,p.b,p.a]:[p.c,p.a,p.b]},b=1/0,M=-1/0,A=0;for(let p of a){let h=m(p);if(!h||!Tt(h[0],h[1],h[2])){if(n)return null;A++;continue}b=Math.min(b,h[0]),M=Math.max(M,h[0])}if(!n&&(r.get(l)-A)/s<e.floor||b>=2400&&M<=2699||b>=1300&&M<=1500)return null;let S={form:o.form,order:c,orderFrom:d,hasTime:a.some(p=>p.clock!==null),read(p){if(typeof p!="string")return null;let h=p.trim();if(h==="")return null;let x=i.get(h);if(x===void 0&&(x=Mt(h),i.set(h,x)),x===null||x==="iso"||x.key!==l)return null;let f=m(x);return!f||!Tt(f[0],f[1],f[2])?null:Cn(f[0],f[1],f[2],x.clock)}};if(o.form!=="named"&&!a.some(p=>p.clock?.meridiem)){let p;o.form==="cjk"?p=o.cjkPattern:o.yearFirst?p=`%Y${o.sep}%m${o.sep}%d${o.trail}`:p=(c==="dmy"?`%d${o.sep}%m${o.sep}%Y`:`%m${o.sep}%d${o.sep}%Y`)+o.trail;let h=a.filter(x=>x.clock!==null).length;h===0?S.pattern=p:h===a.length&&(S.pattern=p+(a.every(x=>x.clock.seconds)?" %H:%M:%S":" %H:%M"))}return S}import rn from"papaparse";var wn=["rate","ratio","pct","percent","percentage","rating","share","score","index","nps","csat","margin","yield","coverage","utilization","utilisation","z[_-]?score","average","avg","mean","median","stddev","variance","gpa","percentile","quantile","efficiency","accuracy","probability","multiplier","coefficient","correlation","occupancy","age","bmi","temperature","density","pressure","humidity","ph","velocity","speed","elevation","altitude","latency","throughput","bandwidth","iops","ppm","ppb","dpmo","bps","capita","temperatuur","temperatur","temperatura","teplota","lampotila","homerseklet","sicaklik","pression","presion","pressao","pressione","druck","tryck","tlak","paine","nyomas","presiune","humidite","humedad","umidade","umidita","feuchtigkeit","vochtigheid","kosteus","vlhkost","vitesse","velocidad","velocidade","velocita","geschwindigkeit","snelheid","hastighet","hastighed","rychlost","nopeus","sebesseg","brzina","predkosc","densite","densidad","densidade","densita","dichte","dichtheid","hustota","tiheys","gustoca","moyenne","mediane","promedio","mediana","gemiddelde","durchschnitt","mittelwert","genomsnitt","gennemsnit","gjennomsnitt","keskiarvo","atlag","ortalama","prosjek","srednia","prumer","priemer","medie","taux","tasa","taxa","tasso","verhaltnis","verhouding","aandeel","anteil","andel","osuus","podil","udzial","udio","pourcentage","porcentaje","percentual","prozent","procent","prosentti","szazalek","yuzde","participacion","participacao","pondere","omjer","arany","oran","rata","leeftijd","edad","idade","wiek","eletkor","varsta","puntuacion","pontuacao","punteggio","betyg","ocena","indice","indeks","wskaznik","puan","ocupacion","ocupacao","occupazione","auslastung","bezetting","belaggning","belaegning","belegg","kayttoaste","oblozenie","obsazenost","obsadenost","kihasznaltsag","doluluk","ocupare","popunjenost","efficacite","eficiencia","efficienza","effizienz","effectiviteit","verimlilik"],Mn=["pct","percent","percentage","rate","ratio","rating","share","score","index","nps","csat","margin","yield","coverage","utilization","utilisation","gpa","percentile","quantile","bmi","density","pressure","humidity","velocity","efficiency","occupancy","latency","throughput","bandwidth","iops","ppm","ppb","dpmo","bps"],Tn=["latitude","longitude"],vn=["latitude","longitude"];function q(t){return ce(t)}var Et=["somme de","suma de","soma de","summe von","som van","somma di","summa av","sum av","sum af","soucet z","suma z","totaal van","total de","toplam","osszeg","nombre de","recuento de","contagem de","anzahl von","aantal van","conteggio di","antal av","lukumaara","pocet z","sum pa","\u0441\u0443\u043C\u043C\u0430","\u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E","\u0441\u0443\u043C\u0430","\u043A\u0456\u043B\u044C\u043A\u0456\u0441\u0442\u044C","\u03B1\u03B8\u03C1\u03BF\u03B9\u03C3\u03BC\u03B1","\u03C0\u03BB\u03B7\u03B8\u03BF\u03C2"],In=["moyenne de","promedio de","media de","media di","durchschnitt von","gemiddelde van","medelvarde av","genomsnitt av","gennemsnit af","keskiarvo","atlag","ortalama","prumer z","srednia z","medie de","minimum de","minimo de","minimo di","minimum von","maximum de","maximo de","massimo di","maximum von","prom.","\u0441\u0440\u0435\u0434\u043D\u0435\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435","\u0441\u0440\u0435\u0434\u043D\u0435\u0435","\u0441\u0435\u0440\u0435\u0434\u043D\u0454","\u03BC\u03B5\u03C3\u03BF\u03C2 \u03BF\u03C1\u03BF\u03C2","\u0645\u06CC\u0627\u0646\u06AF\u06CC\u0646"],Rn=["osszege","sucet","\u7684\u603B\u548C","\u7684\u8BA1\u6570","\u306E\u5408\u8A08","\uC758 \uD569\uACC4"],En=["atlaga","priemer","\u7684\u5E73\u5747\u503C","\u306E\u5E73\u5747","\uC758 \uD3C9\uADE0"],xe=Object.freeze({"nombre de":"count","recuento de":"count","contagem de":"count","anzahl von":"count","aantal van":"count","conteggio di":"count","antal av":"count",lukumaara:"count","pocet z":"count",\u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E:"count",\u043A\u0456\u043B\u044C\u043A\u0456\u0441\u0442\u044C:"count",\u03C0\u03BB\u03B7\u03B8\u03BF\u03C2:"count",\u7684\u8BA1\u6570:"count","minimum de":"min","minimo de":"min","minimo di":"min","minimum von":"min","maximum de":"max","maximo de":"max","massimo di":"max","maximum von":"max"});function We(t){return[...t].sort((e,n)=>n.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+")).join("|")}var Nt=new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:"+We(Et)+")\\s+)","i");function It(t){for(let e of t){let n=e.codePointAt(0)??0;if(n>=11904&&n<=40959||n>=44032&&n<=55215)return!0}return!1}var Nn="[\u2013\u2014-]";function kt(t){let e=t.filter(r=>!It(r)),n=t.filter(It),i=[];return e.length&&i.push("(?:\\s+|\\s*"+Nn+"\\s*)("+We(e)+")"),n.length&&i.push("\\s*("+We(n)+")"),new RegExp("(?:"+i.join("|")+")\\s*$","i")}var $e=kt(Rn),kn=kt(En);function Ce(t,e){let n=e.exec(t);if(!n)return null;let i=t.slice(0,n.index);return i.trim()===""?null:{base:i,label:(n[1]??n[2]??"").toLowerCase()}}function Dt(t){let e=q(String(t??"").trim().toLowerCase());if(!e)return null;for(let r of In)if(e.startsWith(r+" "))return xe[r]??"avg";for(let r of Et)if(e.startsWith(r+" ")||e===r)return xe[r]??"sum";let n=Ce(e,kn);if(n)return xe[n.label]??"avg";let i=Ce(e,$e);return i?xe[i.label]??"sum":null}var Dn=/(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g,Pn=new RegExp("\\b("+wn.join("|")+")\\b|("+Mn.join("|")+")$","i"),On=new RegExp("\\b("+Tn.join("|")+")\\b|("+vn.join("|")+")$","i");function Me(t){if(!t)return"";let e=String(t),n=q(e),i=Nt.exec(n);if(i)return e.slice(i[0].length).trim();let r=Ce(n,$e);return(r?e.slice(0,r.base.length):e).trim()}function Ln(t){if(!t)return!1;let e=q(String(t));return Nt.test(e)||Ce(e,$e)!==null}var Fn=["count (distinct)","count distinct","distinct count","standard deviation","average","variance","median","product","stddev","std dev","count","sum","avg","min","minimum","max","maximum","var"],Rt=new RegExp("^\\s*("+[...Fn].sort((t,e)=>e.length-t.length).map(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+")).join("|")+")\\s+of\\s+","i");function Pt(t){if(t==null)return"";let e=String(t),n=Rt.exec(e);if(!n)return e;let i=l=>l.toLowerCase().replace(/\s+/g," ").trim(),r=i(n[1]),s=e.slice(n[0].length),o=0;for(;o<8;){let l=Rt.exec(s);if(!l||i(l[1])!==r)break;let a=s.slice(l[0].length);if(a.trim()==="")break;s=a,o++}return o===0?e:e.slice(0,n[0].length)+s}function Be(t,e){if(!t||!e)return!1;let n=String(t);for(let i of e){let r=i?.hostName;if(r&&r!==i?.name&&n.includes(r))return!0}return!1}var we={Sum:["Sum of "],Avg:["Average of "],Average:["Average of "],Count:["Count of "],CountNonNull:["Count of "],Min:["Min of ","First ","Earliest "],Max:["Max of ","Last ","Latest "],Median:["Median of "],StandardDeviation:["Standard deviation of "],Variance:["Variance of "]},Ot=new RegExp("^("+Object.keys(we).join("|")+")\\((.+)\\)$");function Lt(t){if(!t)return[];let e=Ot.exec(String(t).trim());if(!e)return[];let n=we[e[1]],i=e[2],r=[];for(let s=i.indexOf(".");s>=0;s=i.indexOf(".",s+1)){if(s===0)continue;let o=i.slice(s+1);if(o.trim()!=="")for(let l of n){let a=l+o;r.includes(a)||r.push(a)}}return r}function Ft(t,e,n){let i=Ot.exec(String(t??"").trim());if(!i)return!1;let r=i[1];if((r==="Count"||r==="CountNonNull")&&n==="Decimal")return!0;let s=new Set(we[r]),o=String(e??""),l=i[2];for(let a=l.indexOf(".");a>=0;a=l.indexOf(".",a+1)){if(a===0)continue;let c=l.slice(a+1);if(c.trim()!==""){for(let d of Object.values(we))for(let g of d)if(!s.has(g)&&o===g+c)return!0}}return!1}function zn(t){let e=Me(t);return e.length===0?"":e.replace(Dn," ")}function zt(t,e){if(!e)return!1;let n=Me(e);return t.test(q(zn(e)))||t.test(q(n))||t.test(q(J(n).join(" ")))}function Wt(t){return zt(On,t)}function Wn(t){return zt(Pn,t)||Wt(t)}var $t=/int|double|decimal|single|float|number|currency|money/i;function $n(t){let e=String(t?.valueNature??"").trim().toLowerCase();return e==="categorical"?"Categorical":e==="ordinal"?"Ordinal":e==="continuous"||t?.isMeasure===!0||$t.test(String(t?.dataType??""))?"Continuous":"Categorical"}function Bn(t){return t?.isMeasure===!0||$t.test(String(t?.dataType??""))}function Bt(t){let e=t??{},n=$n(e);if(n!=="Continuous")return{nature:n,additivity:"unknown",basis:"role",suppressed:!1};if(Wt(e.name))return{nature:n,additivity:"positional",basis:"name",suppressed:!0};let i=String(e.additivity??"").trim().toLowerCase();if(!(i==="additive"&&Ln(e.name))){if(i==="additive")return{nature:n,additivity:"additive",basis:"measured",suppressed:!1};if(i==="part_of_whole")return{nature:n,additivity:"part_of_whole",basis:"measured",suppressed:!1};if(i==="intensive_rate")return{nature:n,additivity:"intensive_rate",basis:"measured",suppressed:!1}}return e.discourageAggregationAcrossGroups===!0?{nature:n,additivity:"intensive_rate",basis:"host-flag",suppressed:!1}:Wn(e.name)?{nature:n,additivity:"intensive_rate",basis:"name",suppressed:!1}:{nature:n,additivity:"additive",basis:"default",suppressed:!1}}function Gt(t){let e=Bt(t),n=t??{};if(e.nature==="Categorical")return["first","distinctcount","count"];if(e.nature==="Ordinal")return Bn(n)?["median","average","min","max","first","distinctcount","count"]:["first","distinctcount","count"];switch(e.additivity){case"positional":return["min","max","count","distinctcount","first"];case"intensive_rate":return["average","median","min","max","count","distinctcount","first"];default:return["sum","average","median","min","max","count","distinctcount","first"]}}function Ti(t){return Gt(t)[0]}function vi(t,e){return Gt(t).indexOf(e)>=0}function Ii(t,e){if(e!=="sum"&&e!=="count")return!1;if(e==="count")return!0;let n=Bt(t);return n.additivity==="additive"||n.additivity==="part_of_whole"||n.additivity==="unknown"}var Gn={de:["nr","nummer","kennung","kennziffer","plz","postleitzahl"],nl:["nr","nummer"],sv:["nr","nummer"],da:["nr","nummer"],nb:["nr","nummer"],fi:["tunnus","koodi","nro"],hu:["azonos\xEDt\xF3","k\xF3d"],tr:["kod","kodu","numaras\u0131","numarasi"],zh:["\u7F16\u53F7","\u4EE3\u7801","\u7F16\u7801","\u53F7\u7801","\u90AE\u7F16"],ja:["\u756A\u53F7","\u30B3\u30FC\u30C9"],ko:["\uBC88\uD638","\uCF54\uB4DC"],hi:["\u0915\u094B\u0921","\u0915\u094D\u0930\u092E\u093E\u0902\u0915"],fr:["num\xE9ro"],es:["c\xF3digo"],pt:["c\xF3digo","cep"],it:["codice"],pl:["kod","numer"],cs:["k\xF3d","\u010D\xEDslo"],sk:["k\xF3d","\u010D\xEDslo"],hr:["\u0161ifra","oznaka"],ru:["\u043A\u043E\u0434","\u043D\u043E\u043C\u0435\u0440"],uk:["\u043A\u043E\u0434","\u043D\u043E\u043C\u0435\u0440"],el:["\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2"],ar:["\u0631\u0645\u0632","\u0643\u0648\u062F","\u0631\u0642\u0645"],he:["\u05E7\u05D5\u05D3"],id:["kode","nomor"],vi:["m\xE3"],th:["\u0E23\u0E2B\u0E31\u0E2A"]},Kn=["fr","es","pt","it","pl","cs","sk","hr","ru","uk","el","ar","he","id","vi","th"],Vn=["num\xE9ro"],Un=t=>t.normalize("NFC").toLowerCase();function Hn(t,e,n,i){let r=Ee(n);return!r||!t?null:t===e?"word":r.wordBreaks===!1?Array.from(e).length<tt?null:(i?t.startsWith(e):t.endsWith(e))&&t.length>e.length?"suffix":null:i?Je(t,n).includes(e)?"word":null:r.script==="Hang"?et(t,e)?"suffix":null:r.compounds&&Qe(t,e,qe)?"suffix":null}function Kt(t){let e=String(t??"").trim();if(!e)return null;let n=de(e),i=de(Me(e));for(let[r,s]of Object.entries(Gn)){let o=Kn.includes(r),l=o?i:n;for(let a of s){let c=Vn.includes(a)||!!Ee(r)?.foldSensitive,d=c?l.words:l.folded;if(d.length===0)continue;let g=c?Un(a):de(a).folded.join(" "),m=Hn(o?d[0]:d[d.length-1],g,r,o);if(m)return{lang:r,word:a,view:m}}}return null}var Yn=[["Lu",/^\p{Lu}$/u],["Ll",/^\p{Ll}$/u],["Lt",/^\p{Lt}$/u],["Lm",/^\p{Lm}$/u],["Lo",/^\p{Lo}$/u],["Mn",/^\p{Mn}$/u],["Mc",/^\p{Mc}$/u],["Nd",/^\p{Nd}$/u]];function Te(t){for(let[e,n]of Yn)if(n.test(t))return e;return null}var jn=[{id:"ascii",test:/^[A-Za-z]$/,ranges:[[65,90],[97,122]]},{id:"latin",test:/^[\u00C0-\u017F]$/u,ranges:[[192,383]]},{id:"cyrillic",test:/^[\u0400-\u045F\u0490-\u0491]$/u,ranges:[[1024,1119],[1168,1169]]},{id:"greek",test:/^[\u0386-\u03CE]$/u,ranges:[[902,974]]},{id:"han",test:/^[\u4E00-\u9FFF]$/u,ranges:[[19968,40959]]},{id:"hiragana",test:/^\p{Script=Hiragana}$/u,ranges:[[12353,12447]]},{id:"katakana",test:/^\p{Script=Katakana}$/u,ranges:[[12448,12543]]},{id:"hangul",test:/^[\uAC00-\uD7A3]$/u,ranges:[[44032,55203]]},{id:"arabic",test:/^[\u0620-\u0652\u0671-\u06D3]$/u,ranges:[[1568,1618],[1649,1747]]},{id:"hebrew",test:/^[\u05B0-\u05EA]$/u,ranges:[[1456,1514]]},{id:"devanagari",test:/^\p{Script=Devanagari}$/u,ranges:[[2304,2431]]},{id:"thai",test:/^\p{Script=Thai}$/u,ranges:[[3585,3662]]}],ve=new Map;function Vt(t,e,n,i){let r=ve.get(t);if(r)return r;let s=[];for(let[o,l]of e)for(let a=o;a<=l;a++){let c=String.fromCodePoint(a);Te(c)===n&&(i&&!i.test(c)||s.push(c))}return ve.set(t,s),s}function Xn(t){let n=t.codePointAt(0);for(let o=0;o<9&&Te(String.fromCodePoint(n-1))==="Nd";o++)n--;let i="nd:"+n.toString(16),r=ve.get(i);if(r)return r;let s=[];for(let o=n;o<n+10;o++){let l=String.fromCodePoint(o);Te(l)==="Nd"&&s.push(l)}return ve.set(i,s),s}function Zn(t,e){if(e==="Nd")return Xn(t);for(let r of jn)if(r.test.test(t))return Vt(r.id+":"+e,r.ranges,e,r.id==="ascii"?null:r.test);let i=t.codePointAt(0)&-128;return Vt("block:"+i.toString(16)+":"+e,[[i,i+127]],e,null)}function qn(t,e,n,i){let r=t.filter(s=>!e.has(s));return r.length===0&&(r=t.filter(s=>s!==n)),r.length===0?n:r[Math.min(r.length-1,Math.floor(i()*r.length))]}var Qn=/^[\p{L}\p{M}\p{Nd}]$/u,Ut=/^[\p{L}\p{Nd}]$/u;function Ht(t,e){if(!t)return t??"";let n=new Set(Array.from(t)),i=d=>{let g=Te(d);return!g||!Qn.test(d)?d:qn(Zn(d,g),n,d,e)},r=d=>{let g=[];for(let m of d)g.push(i(m)),Ut.test(m)&&e()<.2&&g.push(i(m));if(g.length>6){let m=Math.floor(e()*Math.min(3,g.length-6));for(let b=0;b<m;b++)for(let M=0;M<5;M++){let A=Math.floor(e()*g.length);if(Ut.test(g[A])){g.splice(A,1);break}}}return g.join("")};if(!(t.includes("@")&&t.includes(".")))return r(t);let[o,l=""]=t.split("@"),a=l.endsWith(".com"),c=a?l.slice(0,-4):l;return`${r(o)}@${r(c)}${a?".com":""}`}var Jn=/^[A-Za-z_$][A-Za-z0-9_$]*$/,er=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),tr=new RegExp([String.raw`\bisMeasure\b`,String.raw`\bdataType\b`,String.raw`\bcolumns\s*\[\s*-?\d`,String.raw`\.iloc\s*\[[^\]]*,`,String.raw`\.iat\s*\[`,String.raw`\bselect_dtypes\b`,String.raw`\b_get_numeric_data\b`,String.raw`\bis_numeric_dtype\b`,String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`,String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`,String.raw`\bdf\.dtypes\b`,String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`,String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));function se(t,e){if(!t||!e)return!1;let n=er(e);return new RegExp("['\"`]"+n+"['\"`]").test(t)?!0:Jn.test(e)&&new RegExp("\\."+n+"(?![A-Za-z0-9_$])").test(t)}function nr(t){return!!t&&tr.test(t)}function Oi(t,e,n){return t?nr(t)?[...e]:[...n,...e].some(i=>se(t,i))?e.filter(i=>se(t,i)):[...e]:[]}var rr=5,ir=6,sr=3,te=864e5,or=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?Z?)?$/,ar=/^(\d{4})[-/](\d{1,2})$/,lr=/^(\d{4})[-\s]?Q([1-4])$/i,ur=/^Q([1-4])[-\s](\d{4})$/i,cr=/^(\d{4})$/,dr=/^(\d{4})(0[1-9]|1[0-2])$/,mr=/^(\d{4})(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])$/,fr=/^(\D+?)[\s\-/.,']*((?:19|20)\d{2})$/u,gr=/^((?:19|20)\d{2})[\s\-/.,']+(\D+)$/u;function Ge(t,e,n){let i=ee(t);if(!i)return 0;if(i==="sept")return 9;for(let o of e&&!/^en\b/i.test(e)?["en",e]:["en"]){let l=Se(o)[i];if(l!==void 0)return l+1}let r=n?.get(i);if(r!==void 0)return r+1;let s=ie(t);if(s.length>0){if(s.every(a=>a.month===s[0].month))return s[0].month+1;let o=Xe(String(e??"").split(/[-_]/)[0])?.code,l=s.find(a=>a.lang===o);if(l)return l.month+1}return 0}function pr(t){let e=ge(t).filter(i=>i.yearDigits===4);if(e.length===0||e.some(i=>i.lang==="en"))return null;let n=e[0];return e.some(i=>i.grain!=="quarter"||i.n!==n.n||i.year!==n.year)?null:Y(n.year,(n.n-1)*3+1,1)}function Y(t,e,n,i=0,r=0,s=0){if(!(t>=1&&e>=1&&e<=12&&n>=1&&n<=31))return null;let o=Date.UTC(t,e-1,n,i,r,s);if(!Number.isFinite(o))return null;let l=a=>a<10?"0"+a:String(a);return{ms:o,y:t,m:e,d:n,iso:`${t}-${l(e)}-${l(n)}`}}function hr(t,e){let n=[],i="";for(let a=0;a<e.length;a++){if(e[a]!=="%"){i+=e[a].replace(/[.*+?^${}()|[\]\\]/g,"\\$&");continue}switch(e[++a]){case"Y":n.push("Y"),i+="(\\d{4})";break;case"m":n.push("m"),i+="(\\d{1,2})";break;case"d":n.push("d"),i+="(\\d{1,2})";break;case"H":case"M":case"S":i+="\\d{1,2}";break;case"%":i+="%";break;default:return null}}let r=new RegExp("^"+i+"$").exec(t);if(!r)return null;let s=0,o=1,l=1;return n.forEach((a,c)=>{let d=+r[c+1];a==="Y"?s=d:a==="m"?o=d:l=d}),s?Y(s,o,l):null}function j(t,e,n,i){let r=(t??"").trim();if(r==="")return null;if(e){let a=hr(r,e);return a||null}let s=or.exec(r);if(s)return Y(+s[1],+s[2],+s[3],+(s[4]??0),+(s[5]??0),+(s[6]??0));if(s=lr.exec(r),s)return Y(+s[1],(+s[2]-1)*3+1,1);if(s=ur.exec(r),s)return Y(+s[2],(+s[1]-1)*3+1,1);if(s=ar.exec(r),s&&+s[2]>=1&&+s[2]<=12)return Y(+s[1],+s[2],1);if(s=mr.exec(r),s)return Y(+s[1],+s[2],+s[3]);if(s=dr.exec(r),s)return Y(+s[1],+s[2],1);if(s=cr.exec(r),s){let a=+s[1];return a>=1900&&a<=2100?Y(a,1,1):null}let o=pr(r);if(o)return o;if(s=fr.exec(r),s){let a=Ge(s[1],n,i);if(a)return Y(+s[2],a,1)}if(s=gr.exec(r),s){let a=Ge(s[2],n,i);if(a)return Y(+s[1],a,1)}let l=ne(r);if(l){let a="month"in l?l.month:Ge(l.word,n,i);if(a)return Y(l.year,a,1)}return null}function Yt(t){let e=new Date(t).getUTCDay();return e>=1&&e<=5}function jt(t,e){if(e<=t)return 0;let n=Math.round((e-t)/te),i=Math.floor(n/7),r=i*5,s=t+i*7*te;for(;s<e;)Yt(s)&&r++,s+=te;return r}function yr(t){if(t.length===0)return 0;let e=[...t].sort((i,r)=>i-r),n=e.length>>1;return e.length%2?e[n]:(e[n-1]+e[n])/2}function br(t){return t>0?t<.95?"hour":t<=1.05?"day":t>=6.5&&t<=7.5?"week":t>=27&&t<=31.5?"month":t>=88&&t<=93?"quarter":t>=362&&t<=368?"year":"irregular":"irregular"}function oe(t,e,n,i){switch(n){case"year":return e.y-t.y;case"quarter":return e.y*4+Math.floor((e.m-1)/3)-(t.y*4+Math.floor((t.m-1)/3));case"month":return e.y*12+e.m-(t.y*12+t.m);case"week":return Math.round((e.ms-t.ms)/(7*te));case"weekday":return jt(t.ms,e.ms);case"day":return Math.round((e.ms-t.ms)/te);default:return i>0?Math.round((e.ms-t.ms)/i):0}}function Xt(t,e){return Ke(t,e)?.cadence??null}function Ke(t,e){let n=e?.gapFactor??rr,i=0,r=0,s=new Map,o=Array.from(t),l;if(!e?.pattern){let f=[];for(let C of o){if(C==null||C==="")continue;let y=ne(String(C));y&&"word"in y&&f.push(y.word)}f.length>0&&(l=_e(f,e?.locale)??void 0)}for(let f of o){if(f==null||f==="")continue;i++;let C=j(String(f),e?.pattern,e?.locale,l);C&&(r++,s.set(C.ms,C))}let a=[...s.values()].sort((f,C)=>f.ms-C.ms);if(a.length<sr||i>0&&r/i<.8)return null;let c=a[a.length-1].ms-a[0].ms;if(c<=0)return null;let d=[];for(let f=1;f<a.length;f++)d.push(a[f].ms-a[f-1].ms);let g=yr(d);if(!(g>0))return null;let m=br(g/te);m==="day"&&c>=7*te&&a.every(f=>Yt(f.ms))&&jt(a[0].ms,a[a.length-1].ms)+1>a.length*.5&&(m="weekday");let b=m==="irregular"?a.length:oe(a[0],a[a.length-1],m,g)+1,M=1,A=1,S=[],p=a[0],h=1;for(let f=1;f<a.length;f++){let C=oe(a[f-1],a[f],m,g);C>M&&(M=C),m!=="irregular"&&C>n?(A++,S.push({from:p.iso,to:a[f-1].iso,points:h}),p=a[f],h=1):h++}S.push({from:p.iso,to:a[a.length-1].iso,points:h});let x={grain:m,points:a.length,expectedPoints:Math.max(b,a.length),coveragePct:Math.round(a.length/Math.max(b,a.length)*1e3)/10,runs:A,largestGapUnits:M,gapFactor:n};return e?.includeBounds&&S.length<=ir&&(x.runBounds=S),{cadence:x,points:a,stepMs:g}}var Sr=8,_r=.5,Ar=200,xr=new Set(["category","categories","subcategory","type","types","kind","class","classes","classification","segment","segments","tier","status","priority","severity","grade","level","band","bucket","group","channel","method","mode","stage","phase","period","shift","gender","sex","result","outcome","reason","flag","genre","sector","source"]),Cr=["category","classification","segment","status","priority","severity","channel"],wr=new Set(["UUID","EMAIL_LIKE","URL_LIKE","PHONE_LIKE","NUMERIC_ID","HEX_ID","OPAQUE_ID_ALPHANUMERIC","DATE_STR","BOOLEAN"]);function Mr(t){let e=J(t);if(e.length===0)return!1;let n=e[e.length-1];return xr.has(n)?!0:Cr.some(i=>n.length>i.length&&n.endsWith(i))}function Tr(t){if(t.isMeasure)return"measure";if(t.isTemporal||t.isDatePart||t.isReassembledDate)return"temporal";let e=Array.from(t.values).filter(n=>n!==""&&n!==null&&n!==void 0);return e.length<2||e.length>Ar?"cardinality":t.rows>0&&e.length>=t.rows?"row-identity":t.isBinaryFlag?"flag":pe(e,t.locale)!==null?"ordinal":t.identifierNamed||t.dataType==="String"&&wr.has(be(e))?"identifier":!t.geoKind&&Mr(t.name)?"attribute":"entity"}function Qt(t){let e=-1,n=1/0,i=!1;return t.forEach((r,s)=>{if(Tr(r)!=="entity")return;let o=new Set(Array.from(r.values).filter(a=>a!=="")).size,l=!!r.geoKind;(o<n||o===n&&l&&!i)&&(e=s,n=o,i=l)}),e}var Zt=t=>t<10?"0"+t:String(t);function qt(t,e){switch(e){case"year":return`${t.y}-01-01`;case"quarter":return`${t.y}-${Zt(Math.floor((t.m-1)/3)*3+1)}-01`;case"month":return`${t.y}-${Zt(t.m)}-01`;case"hour":return new Date(t.ms).toISOString().replace(/\.\d{3}Z$/,"Z");default:return t.iso}}function Jt(t){let{periods:e,series:n}=t,i=Math.min(e.length,n.length),r=new Set;for(let C=0;C<i;C++)e[C]&&r.add(e[C]);let s=Ke(r,{pattern:t.pattern,locale:t.locale});if(!s)return null;let o=s.cadence.grain;if(o==="irregular")return null;let l=s.points[0],a=oe(l,s.points[s.points.length-1],o,s.stepMs)+1;if(a!==s.cadence.expectedPoints)return null;let c=new Map;for(let C of r){let y=j(C,t.pattern,t.locale);if(!y)continue;let _=oe(l,y,o,s.stepMs);_>=0&&_<a&&c.set(C,{idx:_,stamp:y})}let d=new Map;for(let C=0;C<i;C++){let y=n[C];if(!y)continue;let _=c.get(e[C]);if(!_)continue;let w=d.get(y);w||(w={seen:new Set,lo:_.idx,hi:_.idx,loStamp:_.stamp,hiStamp:_.stamp,order:d.size},d.set(y,w)),w.seen.add(_.idx),_.idx<w.lo&&(w.lo=_.idx,w.loStamp=_.stamp),_.idx>w.hi&&(w.hi=_.idx,w.hiStamp=_.stamp)}if(d.size<2)return null;let g=0;for(let C of d.values())g+=C.seen.size;if(g/(d.size*a)<(t.minFill??_r))return null;let m=[],b=new Set,M=0,A=0,S=0,p=0,h=0,x=1;for(let[C,y]of d){for(let z of y.seen)b.add(z);if(y.seen.size>=a)continue;let _=[...y.seen].sort((z,X)=>z-X),w=1;for(let z=1;z<_.length;z++)w=Math.max(w,_[z]-_[z-1]);let W={key:C,acc:y,coverage:y.seen.size/a,before:y.lo,after:a-1-y.hi,interior:y.hi-y.lo+1-y.seen.size,gap:w};m.push(W),W.before>0&&M++,W.after>0&&A++,W.interior>0&&S++,p=Math.max(p,W.before),h=Math.max(h,W.after),x=Math.max(x,w)}if(m.length===0)return null;m.sort((C,y)=>C.coverage-y.coverage||C.acc.order-y.acc.order);let f=m.slice(0,t.maxListed??Sr);return{seriesColumn:t.seriesColumn,grain:o,periods:a,seriesCount:d.size,incompleteSeries:m.length,lateStarts:M,earlyEnds:A,withHoles:S,columnWideMissing:a-b.size,maxMissingBefore:p,maxMissingAfter:h,largestGap:x,series:f.map(C=>{let y={};return t.includeNames&&(y.name=C.key),t.includeDates&&(y.first=qt(C.acc.loStamp,o),y.last=qt(C.acc.hiStamp,o)),y.missingBefore=C.before,y.missingAfter=C.after,y.missingInterior=C.interior,y.largestGap=C.gap,y.coverage=Math.round(C.coverage*1e3)/1e3,y}),more:m.length-f.length}}var Ie=6;function ae(t){let e=t.slice().sort((i,r)=>i-r),n=e.length>>1;return e.length%2?e[n]:(e[n-1]+e[n])/2}function vr(t){let e=t.length;if(e<Ie)return null;let n=t[0],i=t[0],r=0;for(let f of t)f<n&&(n=f),f>i&&(i=f),r+=f;if(n===i)return null;let s=ae(t.map(Math.abs));if(s===0)return null;let o=[];for(let f=1;f<e;f++)o.push(t[f]-t[f-1]);let l=ae(o.map(Math.abs))/s,a=(e-1)/2,c=r/e,d=0,g=0,m=0;for(let f=0;f<e;f++)d+=(f-a)*(t[f]-c),g+=(f-a)*(f-a),m+=(t[f]-c)*(t[f]-c);m/=e;let b=d/g,M=c-b*a,A=t.map((f,C)=>f-(M+b*C)),S=A.reduce((f,C)=>f+C,0)/e,p=0,h=0;for(let f=0;f<e;f++)p+=(A[f]-S)*(A[f]-S),f>0&&(h+=(A[f]-A[f-1])*(A[f]-A[f-1]));return p/=e,h/=e-1,{vnDetrended:p<=m*1e-12?2:h/p,relStep:l}}function Ve(t){let{stamps:e,series:n,values:i}=t,r=Math.min(e.length,i.length),s=new Map;for(let c=0;c<r;c++){let d=e[c],g=i[c];if(d===null||g===null||!Number.isFinite(g))continue;let m="";if(n&&(m=n[c]??"",m===""))continue;let b=s.get(m);b||s.set(m,b=new Map),b.set(d,(b.get(d)??0)+g)}let o=[],l=[],a=[];for(let c of s.values()){let d=[...c.entries()].sort((m,b)=>m[0]-b[0]).map(m=>m[1]),g=vr(d);g&&(o.push(g.vnDetrended),l.push(g.relStep),a.push(d.length))}return o.length===0?null:{series:o.length,points:Math.round(ae(a)),vnDetrended:Math.round(ae(o)*1e3)/1e3,relStep:Math.round(ae(l)*1e4)/1e4}}function Yi(t){let e=t.times.map(n=>j(n,t.pattern,t.locale)?.ms??null);return Ve({stamps:e,series:t.series,values:t.values})}var Ir=5e5,Rr=8,Er=4,Nr=5,Ue=1,He=2,kr=4,Dr=8;function Pr(t,e,n){let[i,r]=[...t];if(e.isTemporal){let s=j(i,e.temporalTextPattern,n),o=j(r,e.temporalTextPattern,n);if(s&&o&&s.ms!==o.ms)return s.ms<o.ms?{a:i,b:r,setOrder:"temporal"}:{a:r,b:i,setOrder:"temporal"}}return i<r?{a:i,b:r,setOrder:"none"}:{a:r,b:i,setOrder:"none"}}function Or(t,e,n){let{rows:i,text:r,locale:s}=t,o=Pr(n.values,n,s),l=new Uint8Array(i.length),a=0;for(let c=0;c<i.length;c++){let d=r(i[c][e]);d===o.a?l[c]=1:d===o.b?l[c]=2:a++}return{code:l,blankRows:a,setOrder:o.setOrder}}function Lr(t,e){let{rows:n,text:i}=t,r=new Int32Array(n.length),s=new Map;for(let o=0;o<n.length;o++){let l=i(n[o][e]);if(l===""){r[o]=-1;continue}let a=s.get(l);a===void 0&&(a=s.size,s.set(l,a)),r[o]=a}return{ids:r,dict:s}}function Fr(t,e,n){let i=new Uint8Array(n);for(let s=0;s<t.length;s++){let o=e[s];if(o===0)continue;let l=t[s];if(l<0)continue;let a=i[l];i[l]=a&o?a|o<<2:a|o}let r={keysA:0,keysB:0,keysBoth:0,dupA:0,dupB:0};for(let s=0;s<n;s++){let o=i[s];o&Ue&&r.keysA++,o&He&&r.keysB++,(o&(Ue|He))===(Ue|He)&&r.keysBoth++,o&kr&&r.dupA++,o&Dr&&r.dupB++}return r}function zr(t,e){let n=(t.dupA+t.dupB)*(e.keysA+e.keysB),i=(e.dupA+e.dupB)*(t.keysA+t.keysB);return n<i||n===i&&t.keysBoth>e.keysBoth}var en=t=>t==null||typeof t=="string"&&t.trim()==="";function Wr(t,e,n){if(t===e)return!0;let i=en(t),r=en(e);return i||r?i&&r:typeof t=="number"&&typeof e=="number"?!1:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():n(t).trim()===n(e).trim()}function tn(t){let{rows:e,columns:n}=t,i=e.length;if(i<2||i>Ir)return null;let r=n.map((y,_)=>({c:y,i:_})).filter(({c:y})=>!y.isMeasure&&!y.isTemporal&&!y.isDatePart&&y.distinct>=Nr).sort((y,_)=>(_.c.identifierNamed?1:0)-(y.c.identifierNamed?1:0)||_.c.distinct-y.c.distinct||y.i-_.i).slice(0,Rr),s=n.map((y,_)=>({c:y,i:_})).filter(({c:y})=>!y.isMeasure&&y.values!==null&&y.values.size===2).slice(0,Er);if(r.length===0||s.length===0)return null;let o=s.map(({c:y,i:_})=>Or(t,_,y)),l=null;for(let{i:y}of r){let _=Lr(t,y);for(let w=0;w<s.length;w++){if(s[w].i===y)continue;let W=Fr(_.ids,o[w].code,_.dict.size);W.keysBoth<1||(!l||zr(W,l.tally))&&(l={tally:W,keyIdx:y,setNo:w,ids:_.ids,dict:_.dict})}}if(!l)return null;let{ids:a,dict:c,tally:d}=l,g=o[l.setNo],m=s[l.setNo].i,b=c.size,M=new Int32Array(b).fill(-1),A=new Int32Array(b).fill(-1);for(let y=0;y<i;y++){let _=g.code[y],w=a[y];_===0||w<0||(_===1?M[w]<0&&(M[w]=y):A[w]<0&&(A[w]=y))}let S=[];for(let y=0;y<n.length;y++)y!==l.keyIdx&&y!==m&&S.push(y);let p=0;for(let y=0;y<b;y++){let _=M[y],w=A[y];if(_<0||w<0)continue;let W=e[_],z=e[w],X=!0;for(let Q of S)if(!Wr(W[Q],z[Q],t.text)){X=!1;break}X&&p++}let h=p===d.keysBoth?100:p===0?0:Math.min(99,Math.max(1,Math.round(p/d.keysBoth*100))),x=new Map,f=new Map;for(let[y,_]of c){let w=M[_]>=0,W=A[_]>=0;if(!w&&!W)continue;let z=ut(y);ct(z)&&(w&&x.set(z,(x.get(z)??0)+1),W&&f.set(z,(f.get(z)??0)+1))}let C=y=>{let _=0;for(let w of y.values())w>=2&&(_+=w);return _};return{key:l.keyIdx,discriminator:m,pairing:{form:"long",key:n[l.keyIdx].name,discriminator:n[m].name,keysA:d.keysA,keysB:d.keysB,keysBoth:d.keysBoth,duplicateKeysA:d.dupA,duplicateKeysB:d.dupB,identicalPct:h,discriminatorBlankRows:g.blankRows,looseCollisionsA:C(x),looseCollisionsB:C(f),setOrder:g.setOrder}}}var $r=t=>t==="Integer"||t==="Decimal";function Br(t){let e=[],n=[];return t.forEach((i,r)=>{if(i.twoValues){if(i.isBinaryFlag){e.push(r);return}i.isMeasure||i.isTemporal||i.isDatePart||i.identifierNamed||n.push(r)}}),[...e,...n].slice(0,6)}function Gr(t,e){let n=[];for(let i=0;i<t.length&&n.length<12;i++){let r=t[i];e.has(i)||!$r(r.dataType)||r.isTemporal||r.isDatePart||r.identifierNamed||r.distinct<3||n.push(i)}return n}function nn(t){let e=new Map,{rows:n,columns:i,text:r}=t;if(n.length===0||n.length>(t.maxRows??5e5))return e;let s=Br(i);if(s.length===0)return e;let o=Gr(i,new Set(s));if(o.length===0)return e;let l=s.map(a=>{let[c,d]=i[a].twoValues,g=new Uint8Array(n.length);for(let m=0;m<n.length;m++){let b=r(n[m][a]);g[m]=b===c?1:b===d?2:0}return g});for(let a of o){let c=new Float64Array(n.length),d=0;for(let h=0;h<n.length;h++){let x=n[h][a],f=x==null||x===""?NaN:typeof x=="number"?x:parseFloat(x);c[h]=f,f===f&&f!==1/0&&f!==-1/0&&d++}if(d<2)continue;let g=new Float64Array(d);for(let h=0,x=0;h<n.length;h++){let f=c[h];f===f&&f!==1/0&&f!==-1/0&&(g[x++]=f)}g.sort();let m=new Float64Array(d),b=0;for(let h=0;h<d;h++)(h===0||g[h]!==g[h-1])&&(m[b++]=g[h]);let M=new Int32Array(n.length).fill(-1);for(let h=0;h<n.length;h++){let x=c[h];if(!(x===x&&x!==1/0&&x!==-1/0))continue;let f=0,C=b-1;for(;f<C;){let y=f+C>>>1;m[y]<x?f=y+1:C=y}M[h]=f}let A=[],S=new Int32Array(b),p=new Int32Array(b);for(let h=0;h<s.length;h++){let x=l[h];S.fill(0),p.fill(0);let f=0,C=0;for(let U=0;U<n.length;U++){let u=M[U];u<0||(x[U]===1?(S[u]++,f++):x[U]===2&&(p[u]++,C++))}if(f===0||C===0)continue;let y=f<=C,_=y?f:C,w=y?C:f,W=y?S:p,z=y?p:S,X=0,Q=0,le=0;for(let U=0;U<b;U++){let u=W[U],T=z[U];X+=u*(Q+.5*T),Q+=T,u+T>=2&&(le+=u+T)}A.push({outcome:i[s[h]].name,aucMinorityHigh:Math.round(X/(_*w)*1e4)/1e4,nMinority:_,nMajority:w,ties:le})}A.length>0&&e.set(a,A)}return e}var Kr=12,Vr=100,Ur=.3,Hr=.9,Yr=120,jr=1900,Xr=2100,Zr=0,qr=20,Qr=new Set(["id","ids","uuid","guid","key","zip","zipcode","postal","postalcode","ssn","code","codes","sku","isbn","msisdn","imei"]);function Re(t){if(!t)return!1;let e=J(t);return e.length===0?!1:Qr.has(e[e.length-1])?!0:Kt(t)!==null}var Jr=new Set(["year","yr","fy"]),ei=t=>J(t).some(e=>Jr.has(e))||lt(t)!==null,ti=/^(?:(?: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 Ye(t){if(!Number.isInteger(t)||t<190001||t>210012)return!1;let e=t%100;return e>=1&&e<=12}function je(t){if(!Number.isInteger(t)||t<19000101||t>21001231)return!1;let e=Math.floor(t/100)%100,n=t%100;return e>=1&&e<=12&&n>=1&&n<=31}var ni=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?Z?)?$/,ri=/^(\d{4})([\/.])(\d{1,2})\2(\d{1,2})$/,ii=/^(\d{1,2})([\/.\-])(\d{1,2})\2(\d{4})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/;function an(t,e){let n=[],i=0,r=si(t,e,n,()=>{i++});if(r)return r;if(i>0||n.length<2)return null;let s=vt(n,{locale:e,floor:.8});return!s||!s.pattern||s.form==="named"?null:{pattern:s.pattern,orderFrom:s.orderFrom==="shape"?s.order==="ymd"?"iso":"shape":s.orderFrom}}function si(t,e,n,i){let r=0,s=0,o=0,l=0,a=0,c="",d=0,g="",m=0,b=0,M=0,A=0,S=!1;for(let y of t){if(y==null)continue;let _=String(y).trim();if(_==="")continue;r++,n.push(_);let w;if(w=ni.exec(_)){i();let W=+w[2],z=+w[3];W>=1&&W<=12&&z>=1&&z<=31&&(s++,w[4]!==void 0&&o++,w[6]!==void 0&&l++)}else if(w=ri.exec(_)){i();let W=+w[3],z=+w[4];W>=1&&W<=12&&z>=1&&z<=31&&(c&&c!==w[2]&&(S=!0),c=w[2],a++)}else if(w=ii.exec(_)){i();let W=+w[1],z=+w[3];W>=1&&W<=31&&z>=1&&z<=31&&(W<=12||z<=12)&&(g&&g!==w[2]&&(S=!0),g=w[2],d++,W>12&&M++,z>12&&A++,w[5]!==void 0&&m++,w[7]!==void 0&&b++)}if(r>=200)break}if(r<2||(s+a+d)/r<.8||(s>0?1:0)+(a>0?1:0)+(d>0?1:0)!==1||S)return null;if(s>0)return o===s?{pattern:l===s?"%Y-%m-%dT%H:%M:%S":"%Y-%m-%dT%H:%M",orderFrom:"iso"}:{pattern:"%Y-%m-%d",orderFrom:"iso"};if(a>0)return{pattern:`%Y${c}%m${c}%d`,orderFrom:"iso"};if(M>0&&A>0)return null;let x,f;M>0?(x=!0,f="values"):A>0?(x=!1,f="values"):g==="."?(x=!0,f="shape"):(x=!ze(e),f="locale");let C=x?`%d${g}%m${g}%Y`:`%m${g}%d${g}%Y`;return m===d?{pattern:C+(b===d?" %H:%M:%S":" %H:%M"),orderFrom:f}:{pattern:C,orderFrom:f}}function oi(t,e){if(!e||!/\b(?:19|20)\d{2}\b/.test(t))return!1;let n=t.replace(/\b(?:19|20)\d{2}\b/g,"").replace(/[-/.,]/g," ").trim();if(!n)return!1;let i=ee(n);return i.length>0&&e[i]!==void 0}function ai(t,e){let n=new Map,i=new Map;for(let l of t){let a=ne(l);if(!a||"month"in a)continue;let c=ie(a.word),d=c.some(m=>m.lang==="en"),g=ee(a.word);for(let m of new Set(c.map(b=>b.lang)))m!=="en"&&(n.has(m)||(n.set(m,new Set),i.set(m,new Set)),n.get(m).add(g),d||i.get(m).add(g))}let r=[...n.keys()].filter(l=>n.get(l).size>=3&&i.get(l).size>=1),s=0,o=new Map(r.map(l=>[l,0]));for(let l of e){let a=ne(l);if(!a)continue;if("month"in a){s++;continue}let c=ie(a.word);if(c.length===0)continue;let d=c.some(g=>g.lang==="en");for(let g of r)(d||c.some(m=>m.lang===g))&&o.set(g,o.get(g)+1)}return s+Math.max(0,...o.values())}var li=/(?:19|20)[0-9]{2}/;function ui(t){let e=new Map,n=0;for(let r of t){if(!li.test(ce(r)))continue;let s=new Set(ge(r).filter(o=>o.yearDigits===4&&(o.grain==="quarter"||o.grain==="week")).map(o=>o.lang));if(s.size!==0){if(s.has("en")){n++;continue}for(let o of s)e.set(o,(e.get(o)??0)+1)}}let i=0;for(let r of e.values())i=Math.max(i,r);return i>0?i+n:0}function ci(t){let{dataType:e,name:n,isMeasure:i,distinctCount:r}=t;if(e==="DateTime")return!0;if(i)return!1;if(e==="Integer"||e==="Decimal"){let s=t.minNum,o=t.maxNum;if(!(s!=null&&o!=null&&Number.isFinite(s)&&Number.isFinite(o)&&Number.isInteger(s)&&Number.isInteger(o)&&o>=s))return!1;let a=s>=1900&&o<=2100;if(a&&r>=2&&ei(n)||a&&r>=3&&r===o-s+1)return!0;let c=Ye(s)&&Ye(o),d=je(s)&&je(o);if(c||d){if(!t.sampleValues)return!0;let g=0,m=0;for(let b of t.sampleValues){if(b==null||b==="")continue;g++;let M=Number(String(b).trim());if(Number.isFinite(M)&&(c?Ye(M):je(M))&&m++,g>=60)break}if(g>=2&&m===g)return!0}return!1}if(t.sampleValues){let s=t.locale?Se(t.locale):null,o=0,l=0,a=[],c=[];for(let d of t.sampleValues){if(d==null||d==="")continue;o++;let g=String(d).trim();if(a.push(g),ti.test(g)||oi(g,s)?l++:c.push(g),o>=60)break}if(o>=2&&l/o>=.8||o>=2&&(l+ui(c)+ai(a,c))/o>=.8||an(a,t.locale)!==null)return!0}return!1}function di(t){let e=q((t||"").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":Dt(t)}function mi(t){let{rows:e,measureColIdx:n,measureName:i,candidateDims:r,minNum:s,maxNum:o,discourageAgg:l}=t,a=100,c=.01,d="";for(let m of r){if(m.distinct<2||m.distinct>a)continue;let b=r.filter(h=>h.idx!==m.idx).map(h=>h.idx),M=new Map;for(let h of e){let x=h[n];if(typeof x!="number"||!Number.isFinite(x))continue;let f=b.length?b.map(y=>String(h[y])).join(d):"",C=M.get(f);C||(C={sum:0,cset:new Set},M.set(f,C)),C.sum+=x,C.cset.add(String(h[m.idx]))}let A=0,S=0,p=0;for(let h of M.values())h.cset.size<2||(p++,Math.abs(h.sum-100)<=100*c?A++:Math.abs(h.sum-1)<=1*c&&S++);if(p>=2&&(A/p>=.9||S/p>=.9))return{additivity:"part_of_whole",partOfWholeDim:m.name}}if(l)return{additivity:"intensive_rate"};let g=di(i);return g==="avg"||g==="min"||g==="max"?{additivity:"intensive_rate"}:g==="count"?{additivity:"additive"}:g==="sum"?{additivity:"unknown"}:s!=null&&o!=null&&Number.isFinite(s)&&Number.isFinite(o)&&s>=0&&o<=1.0001&&o>0?{additivity:"intensive_rate"}:{additivity:"unknown"}}function ln(t){let{dataType:e,isMeasure:n,name:i,distinct:r,nonblank:s,prec:o,maxval:l,minval:a}=t,c=l-a+1,d=c>0?r/c:1,g=s>0?r/s:0,m=e==="Decimal"||o>0;return!n&&Re(i)?"Categorical":d>=Hr&&(dt(i)&&r<=Yr||a>=jr&&l<=Xr||a>=Zr&&l<=qr)?"Ordinal":n||r>Kr&&(m||r>=Vr||g>=Ur)?"Continuous":"Categorical"}function sn(t,e,n){return!t||t.isMeasure||e||t.dataType!=="Integer"&&t.dataType!=="Decimal"?!1:ln({dataType:t.dataType,isMeasure:!1,name:t.name,distinct:n.distinct,nonblank:n.nonblank,prec:n.prec,maxval:typeof n.maxval=="number"?n.maxval:0,minval:typeof n.minval=="number"?n.minval:0})==="Continuous"}function fi(t){let e=null;for(let n=0;n<t.length;n++){let i=t[n];if(typeof i!="string"||i.length===0)continue;let r=i.trim();r.length!==i.length&&(e||(e=t.slice()),e[n]=r)}return e||t}var on=class{_computedStatsForLevel=null;_cols=[];_rows=[];_origIndices=[];_rowHashes=new Set;_hostQueryNames=[];_englishAliases=new Map;_declaredDimensions=new WeakSet;_inferredMeasureFlags=null;dedupRows=!0;emitLegacyAggAliases=!1;deriveProvinces=!0;dateCellsAreLocalWallClock=!1;wallClockColumnIndexes(){let e=new Set;if(!this.dateCellsAreLocalWallClock||!this._cols)return e;for(let n=0;n<this._cols.length;n++){let i=this._cols[n];!i||!/date|time/i.test(String(i.dataType??""))||ot(this._rows.map(r=>r[n]))&&e.add(n)}return e}STR(e){return e==null?"":e instanceof Date?this.wholeDayIso(e)??(isNaN(e.getTime())?"":e.toISOString()):e.toString()}getPrecision(e){if(!isFinite(e))return 0;let i=e.toString().split(".")[1];return i?i.length:0}getColumns(){return this._cols}inferredMeasureFlags(){if(this._inferredMeasureFlags)return this._inferredMeasureFlags;let e=this._cols.map(n=>!!(n&&n.isMeasure));return this._cols.forEach((n,i)=>{if(!n||n.isMeasure||this._declaredDimensions.has(n)||n.dataType!=="Integer"&&n.dataType!=="Decimal")return;let r=new Set,s=0,o=0,l=null,a=null;for(let c of this._rows){let d=c[i],g=this.STR(d);if(g!=""&&(r.add(g),s++,(l===null||d<l)&&(l=d),(a===null||d>a)&&(a=d),n.dataType=="Decimal")){let m=this.getPrecision(d);m>o&&(o=m)}}e[i]=sn(n,!1,{distinct:r.size,nonblank:s,prec:o,minval:l,maxval:a})}),Object.freeze(e),this._inferredMeasureFlags=e,e}declareDimensions(e){this._inferredMeasureFlags=null;for(let n of e)n&&this._declaredDimensions.add(n)}wholeDayIso(e){return st(e)}hasTimeComponent(e){return!(e instanceof Date)||isNaN(e.getTime())?!1:this.wholeDayIso(e)===null}getColumnsWithStats(e,n){if(this._computedStatsForLevel==e)return this._cols;let i=0,r=parseInt(e),s=this.wallClockColumnIndexes(),o=[],l=[],a=[];for(let u of this._cols){let T=new Map,P=[],D=0,v=0,k=0,F=null,O=null,N=null,G=!1,K=!0,R=!0,E=null,V=!1,L=s.has(i);for(let I of this._rows){let $=I[i],B=L&&$ instanceof Date?fe($):$,H=this.STR(B);if(H!=""){if(D+=H.length,T.set(H,(T.get(H)||0)+1),v++,u.dataType=="Integer"||u.dataType=="Decimal"||u.dataType=="DateTime")if((F===null||B<F)&&(F=B),(O===null||B>O)&&(O=B),u.dataType=="Integer"||u.dataType=="Decimal"){if(N===null?N=B:N+=B,u.dataType=="Decimal"){let Z=this.getPrecision(B);Z>k&&(k=Z)}P.push(B)}else G=G||this.hasTimeComponent(B);V&&(B<E?K=!1:B>E&&(R=!1)),E=B,V=!0}}if(v>=3&&(K&&!R?u.sortedDirection="asc":R&&!K?u.sortedDirection="desc":u.sortedDirection="none"),v>0&&T.size>0&&!u.isMeasure){let I=0,$=Number.MAX_SAFE_INTEGER;for(let B of T.values())B>I&&(I=B),B<$&&($=B);if(u.modalShare=I/v,u.minGroupCount=$===Number.MAX_SAFE_INTEGER?null:$,T.size===2){let B=[...T.keys()].map(ue=>nt(ue).trim().toLowerCase()).sort(),Z=[["false","true"],["no","yes"],["n","y"],["0","1"],["f","t"]].some(ue=>B[0]===ue[0]&&B[1]===ue[1]),un=/^(is|has)[_\p{L}\p{N}]|(?:default|churn|fraud|approv|convert|active|cancel|delinquen|flag|paid|win|pass|fail)/iu.test(u.name);(Z||un)&&(u.isBinaryFlag=!0)}}else u.isMeasure&&(u.dataType==="Integer"||u.dataType==="Decimal")&&T.size===2&&T.has("0")&&T.has("1")&&(u.isBinaryFlag=!0);if(u.dataType=="DateTime"&&(u.dateWithTime=G,G&&at(L?this._rows.map(I=>I[i]instanceof Date?fe(I[i]):I[i]):this._rows.map(I=>I[i]))?u.timeOfDayOnly=!0:delete u.timeOfDayOnly),u.isTemporal=ci({dataType:u.dataType,name:u.name,isMeasure:u.isMeasure,distinctCount:T.size,minNum:typeof F=="number"?F:null,maxNum:typeof O=="number"?O:null,sampleValues:T.keys(),locale:n}),u.isTemporal&&u.dataType==="String"&&!u.isMeasure){let I=an(T.keys(),n);I&&(u.temporalTextPattern=I.pattern)}if(u.timeOfDayOnly)delete u.temporalCadence;else if(u.isTemporal&&!u.isMeasure){let I=Xt(T.keys(),{includeBounds:r>=20,pattern:u.temporalTextPattern,locale:n});I&&(u.temporalCadence=I)}this.updateColumnStats10(r,u,v,T,k,O,F),this.updateColumnStats20(r,P,v,N,u,D,G,F,O,k,T,n),sn(u,this._declaredDimensions.has(u),{distinct:T.size,nonblank:v,prec:k,minval:F,maxval:O})&&(u.isMeasure=!0,u.geoKind=void 0,u.geoMatchPct=void 0,u.geoAmbiguous=void 0,u.dominantGeoRegion=void 0,u.dominantGeoRegionPct=void 0,u.geoRegionCount=void 0),o[i]=u.isMeasure||T.size>2e3?null:new Set(T.keys()),l[i]=T.size,a[i]=T.size===2?[...T.keys()].sort():null,i++}wt(this._cols,this._rows,{cities:this.deriveProvinces}).forEach((u,T)=>{let P=this._cols[T];u.kind&&(P.geoKind=u.kind,P.geoMatchPct=u.matchPct,u.ambiguous&&(P.geoAmbiguous=!0)),u.rollupPct!==void 0&&(P.admin1RollupPct=u.rollupPct),u.regionCount!==void 0&&(P.admin1RegionCount=u.regionCount),u.countryCount!==void 0&&(P.admin1CountryCount=u.countryCount),u.dominantRegion&&(P.dominantGeoRegion=u.dominantRegion,P.dominantGeoRegionPct=u.dominantRegionPct)});let c=this.getGeoExtent();if(c&&c.dominantFrame&&this._geoExtentLatIdx>=0){let u=this._cols[this._geoExtentLatIdx];u.geoKind||(u.dominantGeoRegion=c.dominantFrame,u.dominantGeoRegionPct=c.dominantFramePct,this.deriveProvinces&&(u.admin1RollupPct=c.dominantFramePct))}let d=[];this._cols.forEach((u,T)=>{u.isMeasure||d.push({idx:T,distinct:u.distinctCount??0,name:u.name})}),this._cols.forEach((u,T)=>{if(!u.isMeasure)return;let P=typeof u.lowValue=="number"?u.lowValue:null,D=typeof u.highValue=="number"?u.highValue:null,v=mi({rows:this._rows,measureColIdx:T,measureName:u.name,candidateDims:d,minNum:P,maxNum:D,discourageAgg:!!u.discourageAggregationAcrossGroups});u.additivity=v.additivity,v.partOfWholeDim&&(u.partOfWholeDim=v.partOfWholeDim)});let g=50,m=4,b=d.filter(u=>u.distinct>=2&&u.distinct<=g);this._cols.forEach((u,T)=>{if(!u.isMeasure)return;let P=[];for(let R of this._rows){let E=R[T];if(E==null||E==="")continue;let V=typeof E=="number"?E:parseFloat(E);isNaN(V)||P.push(V)}if(P.length===0)return;let D=[...P].sort((R,E)=>R-E);if(D[0]===D[D.length-1])u.relativeDispersion=0;else if(D.length>=m){let R=me(D,.5),E=me(D,.1),V=me(D,.9);u.relativeDispersion=Math.abs(R)>1e-9?Math.round((V-E)/Math.abs(R)*1e3)/1e3:void 0}else u.relativeDispersion=void 0;let v=[];for(let R of b){let E=new Set;for(let V of this._rows){let L=V[T];L==null||L===""||E.add(this.STR(V[R.idx])+"")}v.push({otherColumn:R.name,nonBlankGroupCount:E.size})}v.length>0&&(u.nonBlankGroups=v);let k=0;for(let R of P)k+=R;k/=P.length;let F=0;for(let R of P)F+=(R-k)*(R-k);if(F<=1e-12)return;let O=[],N=[],G=R=>{if(R.length<4)return NaN;let E=[...R].sort((L,I)=>L-I),V=L=>E[Math.min(E.length-1,Math.max(0,Math.floor(L*(E.length-1))))];return V(.75)-V(.25)},K=G(P);for(let R of b){let E=new Map;for(let I of this._rows){let $=I[T];if($==null||$==="")continue;let B=typeof $=="number"?$:parseFloat($);if(isNaN(B))continue;let H=this.STR(I[R.idx])+"",Z=E.get(H);Z?(Z.s+=B,Z.n++,Z.vals.push(B)):E.set(H,{s:B,n:1,vals:[B]})}let V=0;for(let I of E.values()){let $=I.s/I.n;V+=I.n*($-k)*($-k)}O.push({otherColumn:R.name,eta2:Math.round(V/F*1e4)/1e4});let L=[];for(let I of E.values()){let $=G(I.vals);isNaN($)||L.push($)}if(L.length>=2&&isFinite(K)&&K>1e-9){let I=(Math.max(...L)-Math.min(...L))/K;N.push({otherColumn:R.name,spreadRatio:Math.round(I*1e4)/1e4})}}O.length>0&&(u.groupDiscrimination=O),N.length>0&&(u.spreadDiscrimination=N)});let M=.97,A=.8,S=8,p=5,h=this._cols.map((u,T)=>({c:u,i:T})).filter(u=>u.c.isMeasure);for(let u=0;u<h.length;u++)for(let T=u+1;T<h.length;T++){let P=h[u].i,D=h[T].i,v=0,k=0,F=0,O=0,N=0,G=0;for(let L of this._rows){let I=L[P],$=L[D];if(I==null||I===""||$===null||$===void 0||$==="")continue;let B=typeof I=="number"?I:parseFloat(I),H=typeof $=="number"?$:parseFloat($);isNaN(B)||isNaN(H)||(v++,k+=B,F+=H,O+=B*B,N+=H*H,G+=B*H)}if(v<p)continue;let K=v*O-k*k,R=v*N-F*F;if(K<=1e-12||R<=1e-12)continue;let E=(v*G-k*F)/Math.sqrt(K*R),V=Math.min(1,Math.round(Math.abs(E)*1e3)/1e3);for(let L of[h[u].c,h[T].c])(L.maxAbsMeasureCorrelation===void 0||V>L.maxAbsMeasureCorrelation)&&(L.maxAbsMeasureCorrelation=V);if(Math.abs(E)>=M){let L=h[u].c,I=h[T].c;L.collinearWithMeasures||(L.collinearWithMeasures=[]),I.collinearWithMeasures||(I.collinearWithMeasures=[]),L.collinearWithMeasures.push(I.name),I.collinearWithMeasures.push(L.name)}else if(Math.abs(E)>=A){let L=h[u].c,I=h[T].c,$=Math.round(E*1e3)/1e3;L.correlatedWithMeasures||(L.correlatedWithMeasures=[]),I.correlatedWithMeasures||(I.correlatedWithMeasures=[]),L.correlatedWithMeasures.push({otherColumn:I.name,r:$}),I.correlatedWithMeasures.push({otherColumn:L.name,r:$})}}for(let{c:u}of h)u.correlatedWithMeasures&&(u.correlatedWithMeasures.sort((T,P)=>Math.abs(P.r)-Math.abs(T.r)||(T.otherColumn<P.otherColumn?-1:1)),u.correlatedWithMeasures.length=Math.min(u.correlatedWithMeasures.length,S));for(let u=0;u<this._cols.length;u++){let T=o[u];if(!T||T.size===0)continue;let P=[];for(let D=0;D<this._cols.length;D++){if(D===u)continue;let v=o[D];if(!v||v.size===0)continue;let k=0;for(let O of T)v.has(O)&&k++;let F=Math.round(k/T.size*100);F>0&&P.push({otherColumn:this._cols[D].name,percentShared:F})}P.length>0&&(this._cols[u].sharedValueRatioWithOthers=P)}let x=50,f=[];for(let u=0;u<this._cols.length;u++){let T=o[u];T&&T.size>=2&&T.size<=x&&f.push(u)}if(f.length>=2){let u=new Map,T=(D,v)=>D+":"+v;for(let D=0;D<f.length;D++)for(let v=D+1;v<f.length;v++)u.set(T(f[D],f[v]),new Map);for(let D of this._rows)for(let v=0;v<f.length;v++){let k=this.STR(D[f[v]])+"";for(let F=v+1;F<f.length;F++){let O=""+this.STR(D[f[F]]),N=u.get(T(f[v],f[F])),G=k+""+O;N.set(G,(N.get(G)??0)+1)}}let P=new Map;for(let D=0;D<f.length;D++)for(let v=D+1;v<f.length;v++){let k=f[D],F=f[v],O=o[k].size,N=o[F].size,G=u.get(T(k,F)),K=G.size,R=0;for(let I of G.values())(R===0||I<R)&&(R=I);let E=Math.round(K/(O*N)*100),V=K===O,L=K===N;if((this._cols[k].categoricalPairStats||=[]).push({otherColumn:this._cols[F].name,fillPct:E,determinesOther:V,minCellCount:R,distinctCombinations:K}),(this._cols[F].categoricalPairStats||=[]).push({otherColumn:this._cols[k].name,fillPct:E,determinesOther:L,minCellCount:R,distinctCombinations:K}),V&&O>N){let I=P.get(k);(!I||N<I.card)&&P.set(k,{name:this._cols[F].name,card:N,ratio:N/O})}if(L&&N>O){let I=P.get(F);(!I||O<I.card)&&P.set(F,{name:this._cols[k].name,card:O,ratio:O/N})}}for(let[D,v]of P)this._cols[D].primaryParentColumn=v.name,this._cols[D].nestingRatio=Math.round(v.ratio*100)/100}let C=6,y=this._rows.length;for(let u=0;u<this._cols.length;u++){let T=this._cols[u];if(T.isMeasure||T.primaryParentColumn)continue;let P=T.distinctCount??0;if(P<=x||y>0&&P>=y)continue;let D=[];for(let v=0;v<this._cols.length;v++){if(v===u)continue;let k=this._cols[v];if(k.isMeasure)continue;let F=k.distinctCount??0;F<2||F>=P||D.push(v)}D.sort((v,k)=>(this._cols[v].distinctCount??0)-(this._cols[k].distinctCount??0));for(let v of D.slice(0,C)){let k=new Map,F=!0;for(let N of this._rows){let G=this.STR(N[u])+"",K=this.STR(N[v])+"",R=k.get(G);if(R===void 0)k.set(G,K);else if(R!==K){F=!1;break}}if(!F)continue;let O=this._cols[v].distinctCount??0;T.primaryParentColumn=this._cols[v].name,T.nestingRatio=Math.round(O/P*100)/100;break}}let _=.01,w=.05,W=.95,z=8,X=8,Q=6,le=500,U=[];for(let u=0;u<this._cols.length&&U.length<X;u++){let T=this._cols[u].dataType;(T==="Double"||T==="Integer"||T==="Decimal")&&U.push(u)}if(U.length>=3&&this._rows.length>=z){let u=Math.min(this._rows.length,le),T=U.map(O=>{let N=[];for(let R=0;R<u;R++){let E=this._rows[R][O],V=typeof E=="number"?E:parseFloat(String(E).replace(/,/g,""));if(E==null||E===""||!isFinite(V))return null;N.push(V)}let G=N[0],K=!1;for(let R of N)if(R!==G){K=!0;break}return K?N:null}),P=U.map((O,N)=>N).filter(O=>T[O]!==null),D=O=>{let N=O.slice().sort((K,R)=>K-R),G=N.length>>1;return N.length%2?N[G]:(N[G-1]+N[G])/2},v=null,k=[],F=O=>{if(k.length>=3){let N=k.map(E=>T[E]),G=N[0].length,K=new Array(G);for(let E=0;E<G;E++){let V=0;for(let L of N)V+=L[E];K[E]=V}let R=D(K);if(R>0){let E=0;for(let L of K)Math.abs(L-R)<=R*_&&E++;let V=E/G;if(V>=W){let L=1;for(let I of N){let $=D(I)/R;$<L&&(L=$)}L>=w&&(!v||k.length>v.cols.length)&&(v={cols:k.slice(),total:R,matched:V})}}}if(!(k.length>=Q))for(let N=O;N<P.length;N++)k.push(P[N]),F(N+1),k.pop()};if(F(0),v){let O=v,G={columns:O.cols.map(K=>this._cols[U[K]].name),total:Math.round(O.total*1e3)/1e3,matchedPct:Math.round(O.matched*100)/100};for(let K of O.cols)this._cols[U[K]].constantSumGroup=G}}return this.applyTwoSetPairing(n,o),this.applyScoreSeparation(l,a),this.applySeriesCompleteness(r,n,o),this.applyMeasurePersistence(n,o),this._computedStatsForLevel=e,this._cols}applyTwoSetPairing(e,n){for(let r of this._cols)r.twoSetPairing!==void 0&&delete r.twoSetPairing;let i=tn({rows:this._rows,columns:this._cols.map((r,s)=>{let o=n[s];return{name:r.name,values:o,distinct:o?o.size:r.distinctCount??0,isMeasure:!!r.isMeasure,isTemporal:!!r.isTemporal,isDatePart:!!r.isDatePart,identifierNamed:Re(r.name),temporalTextPattern:r.temporalTextPattern}}),text:r=>this.STR(r),locale:e});i&&(this._cols[i.key].twoSetPairing=i.pairing,this._cols[i.discriminator].twoSetPairing=i.pairing)}applyScoreSeparation(e,n){for(let r of this._cols)r.scoreSeparation!==void 0&&delete r.scoreSeparation;let i=nn({rows:this._rows,columns:this._cols.map((r,s)=>({name:r.name,dataType:r.dataType,isMeasure:!!r.isMeasure,isTemporal:!!r.isTemporal,isDatePart:!!r.isDatePart,identifierNamed:Re(r.name),isBinaryFlag:!!r.isBinaryFlag,distinct:e[s]??0,twoValues:n[s]??null})),text:r=>this.STR(r)});for(let[r,s]of i)this._cols[r].scoreSeparation=s}applySeriesCompleteness(e,n,i){for(let c of this._cols)c.seriesCompleteness!==void 0&&delete c.seriesCompleteness;let r=this._cols.map((c,d)=>({c,i:d})).filter(({c})=>c.isTemporal&&!c.isMeasure&&c.temporalCadence&&c.temporalCadence.grain!=="irregular");if(r.length===0)return;let s=this.seriesKeyIndex(n,i);if(s<0)return;let o=this._cols[s],l=this._rows.map(c=>this.STR(c[s])),a=e>=20&&(o.dataType!=="String"||Array.isArray(o.safeDistinctValues));for(let{c,i:d}of r){let g=Jt({periods:this._rows.map(m=>this.STR(m[d])),series:l,seriesColumn:o.name,pattern:c.temporalTextPattern,locale:n,includeDates:e>=20,includeNames:a});g&&(c.seriesCompleteness=g)}}seriesKeyIndex(e,n){let i=[],r=[];this._cols.forEach((o,l)=>{let a=n[l];a&&(i.push(l),r.push({name:o.name,dataType:o.dataType,isMeasure:!!o.isMeasure,isTemporal:!!o.isTemporal,isDatePart:!!o.isDatePart,isReassembledDate:!!o.isReassembledDate,isBinaryFlag:!!o.isBinaryFlag,geoKind:o.geoKind,identifierNamed:Re(o.name),values:a,rows:this._rows.length,locale:e}))});let s=Qt(r);return s<0?-1:i[s]}applyMeasurePersistence(e,n){for(let a of this._cols)a.persistence!==void 0&&delete a.persistence;let i=[];if(this._cols.forEach((a,c)=>{a.isMeasure&&(a.dataType==="Integer"||a.dataType==="Decimal"||a.dataType==="Double")&&i.push(c)}),i.length===0||this._rows.length<Ie)return;let r=-1,s=[];for(let a=0;a<this._cols.length&&r<0;a++){let c=this._cols[a];if(!c.isTemporal||c.isMeasure||c.isDatePart)continue;let d=this._rows.map(g=>j(this.STR(g[a]),c.temporalTextPattern,e)?.ms??null);new Set(d.filter(g=>g!==null)).size<Ie||(r=a,s=d)}if(r<0)return;let o=this.seriesKeyIndex(e,n),l=o>=0?this._rows.map(a=>this.STR(a[o])):void 0;for(let a of i){let c=this._rows.map(g=>{let m=g[a];if(m==null||m==="")return null;let b=typeof m=="number"?m:parseFloat(String(m).replace(/,/g,""));return Number.isFinite(b)?b:null}),d=Ve({stamps:s,series:l,values:c});d&&(this._cols[a].persistence={timeColumn:this._cols[r].name,...o>=0?{seriesColumn:this._cols[o].name}:{},...d})}}updateColumnStats20(e,n,i,r,s,o,l,a,c,d,g,m){if(e>=20){let b=[...n].sort((S,p)=>S-p),M=Math.floor(b.length/2);if(i>0&&r!=null?s.avgValue=s.dataType=="Integer"?Math.round(r/i):r/i:s.avgValue=null,i>0&&(s.avgLength=o/i),this._rows.length>0){let S=p=>{let h=p instanceof Date?p:typeof p=="string"?Ne(p)??new Date(p):new Date(p),x=this.wholeDayIso(h);return x?x+"T00:00:00.000Z":isNaN(h.getTime())?p:h.toISOString().slice(0,10)+"T00:00:00.000Z"};s.dataType!="DateTime"||l||!a?s.lowValue=a:s.lowValue=S(a),s.dataType!="DateTime"||l||!c?s.highValue=c:s.highValue=S(c),s.medianValue=b.length===0?null:b.length%2===0?s.dataType=="Integer"?Math.round((b[M-1]+b[M])/2):(b[M-1]+b[M])/2:b[M],s.numericPrecision=d}if(b.length>0){let S=s.avgValue??0,p=b.length,h=0,x=0;for(let y of b){let _=y-S;h+=_*_,x+=_*_*_}let f=h/p,C=Math.sqrt(f);s.skewness=f===0?0:x/p/(C*C*C),s.stdDev=Math.sqrt(f)}r!==null&&(s.sum=r);let A=Array.from(g.entries()).sort((S,p)=>p[1]-S[1]);if(s.topCategories=A.slice(0,10).map(S=>S[1]),!s.isMeasure&&A.length>0&&(s.dataType!=="String"&&(s.topCategoryValues=A.slice(0,5).map(S=>S[0])),e>=20)){let S=A.map(h=>h[0]),p=pe(S,m);if(p!==null)s.ordinalPattern=p.pattern,s.orderedDomain=p.orderedDomain;else if(s.dataType==="String"){let h=mt(S);h!==null&&(s.safeDistinctValues=h)}}if(b.length>=8&&(s.dataType==="Integer"||s.dataType==="Decimal")){let S=p=>b[Math.floor((b.length-1)*p)];s.quantiles={p05:S(.05),p25:S(.25),p75:S(.75),p95:S(.95)}}}if(!s.isMeasure&&s.dataType==="String"&&g.size>0){let b=Array.from(g.entries()).sort((S,p)=>p[1]-S[1]).map(S=>S[0]);s.formatSignature=be(b);let M=i>0?o/i:void 0,A=/^(UUID|EMAIL_LIKE|URL_LIKE|PHONE_LIKE|NUMERIC_ID|HEX_ID|OPAQUE_ID_ALPHANUMERIC|DATE_STR|BOOLEAN)$/;s.formatSignature&&!A.test(s.formatSignature)&&(M===void 0||M>=3)&&(s.isFreeText=!0)}if(!s.isMeasure&&g.size>0){let b=Array.from(g.entries()).sort((A,S)=>S[1]-A[1]),M=St(b.map(A=>A[0]),s.name,m);if(M!==null&&(s.geoKind=M.geoKind,s.geoMatchPct=M.geoMatchPct,M.geoAmbiguous&&(s.geoAmbiguous=!0),M.geoKind.indexOf("country")===0)){let A=pt(b);A&&(s.dominantGeoRegion=A.dominantGeoRegion,s.dominantGeoRegionPct=A.dominantGeoRegionPct,s.geoRegionCount=A.regionCount,A.middleEastPct>0&&(s.middleEastPct=A.middleEastPct))}}}updateColumnStats10(e,n,i,r,s,o,l){let a=this._rows.length-i;e>=10&&(n.blankCount=a),n.distinctCount=r.size+(a!=0?1:0),n.valueNature="Categorical",i>0&&(n.dataType==="Integer"||n.dataType==="Decimal"?n.valueNature=ln({dataType:n.dataType,isMeasure:!!n.isMeasure,name:n.name,distinct:r.size,nonblank:i,prec:s,maxval:o,minval:l}):n.dataType==="DateTime"&&(n.valueNature=n.dateWithTime?"Continuous":"Ordinal"))}getRowCount(){return this._rows.length}getLeafCardinality(){if(this._leafCardinality!==null)return this._leafCardinality;let e=[];if(this._cols.forEach((i,r)=>{i.isMeasure||e.push(r)}),e.length===0)return this._leafCardinality=this._rows.length,this._leafCardinality;let n=new Set;for(let i of this._rows)n.add(JSON.stringify(e.map(r=>i[r])));return this._leafCardinality=n.size,this._leafCardinality}_leafCardinality=null;getGeoExtent(){if(this._geoExtentComputed)return this._geoExtent;this._geoExtentComputed=!0,this._geoExtent=null;let e=o=>Ze(o,{camel:!0}),n=-1,i=-1,r=-1;if(this._cols.forEach((o,l)=>{let a=e(o.name),c=o.dataType==="Integer"||o.dataType==="Decimal";c&&n<0&&a.some(d=>d==="lat"||d==="latitude")?n=l:c&&i<0&&a.some(d=>d==="lon"||d==="lng"||d==="long"||d==="longitude")&&(i=l),r<0&&!o.isMeasure&&typeof o.geoKind=="string"&&o.geoKind.indexOf("country")===0&&(r=l)}),n<0||i<0)return null;this._geoExtentLatIdx=n;let s=[];for(let o of this._rows){let l=o[n],a=o[i],c=l==null||l===""?null:Number(l),d=a==null||a===""?null:Number(a);s.push({lat:c,lon:d,country:r>=0&&he(this.STR(o[r]))?this.STR(o[r]):null})}return this._geoExtent=gt(s),this._geoExtent}_geoExtent=null;_geoExtentComputed=!1;_geoExtentLatIdx=-1;obfuscateString(e){return Ht(e,it)}toObjectArray(){let e=this.liveEnglishAliases();return this._rows.map(n=>{let i={};this._cols.forEach((r,s)=>{i[r.name]=n[s],this.emitLegacyAggAliases&&r.hostName&&r.hostName!==r.name&&!Object.prototype.hasOwnProperty.call(i,r.hostName)&&(i[r.hostName]=n[s])});for(let[r,s]of e)Object.prototype.hasOwnProperty.call(i,s.alias)||(i[s.alias]=n[r]);return i})}async getCSVAsync(e){let n=[],i=e?25:1e7,r=e?4e3:1e7,s=new Map,o=this.wallClockColumnIndexes();for(let a of this._rows){let c={};for(let d=0;d<this._cols.length;d++){let g=this._cols[d],m=a[d];if(this.STR(m)!=""){if(e&&g.dataType=="String")if(s.has(m))m=s.get(m);else{let b=this.obfuscateString(m);s.set(m,b),m=b}else if(g.dataType=="DateTime"&&!g.dateWithTime){let b=m instanceof Date?m:typeof m=="string"?Ne(m)??new Date(m):new Date(m);m=(this.wholeDayIso(b)??b.toISOString().slice(0,10))+"T00:00:00.000Z"}else o.has(d)&&m instanceof Date&&(m=fe(m));r-=this.STR(m).length}else m=null;c[d]=m,--r}if(n.push(c),--i,i<=0||r<=0)break}return await rn.unparse(n,{header:!1})}getCSVHeaderLine(){let e=this.liveEnglishAliases();return rn.unparse([this._cols.map((n,i)=>{if(this.emitLegacyAggAliases&&n.hostName)return this.STR(n.hostName);let r=e.get(i);return this.STR(r&&r.headerName?r.alias:n.name)})])}setHostQueryNames(e){this._hostQueryNames=(e??[]).map(n=>n==null?null:this.STR(n)),this._englishAliases=new Map}aliasesForCode(e){let n=Be(e,this._cols)?this.legacyAliases():[];for(let i of this.englishAliasesFor(e).values())n.push({name:i.name,alias:i.alias,reason:"english-implicit-agg"});return n}armAliasesForCode(e){return this.emitLegacyAggAliases=Be(e,this._cols),this._englishAliases=this.englishAliasesFor(e),this.getArmedAliases()}getArmedAliases(){let e=this.emitLegacyAggAliases?this.legacyAliases():[];for(let n of this.liveEnglishAliases().values())e.push({name:n.name,alias:n.alias,reason:"english-implicit-agg"});return e}legacyAliases(){let e=[];for(let n of this._cols)n&&n.hostName&&n.hostName!==n.name&&e.push({name:this.STR(n.name),alias:this.STR(n.hostName),reason:"doubled-agg-prefix"});return e}englishAliasesFor(e){let n=new Map;if(!e||this._hostQueryNames.length===0||!this._cols||this._cols.length===0)return n;let i=String(e),r=new Set;for(let o of this._cols)o&&(r.add(this.STR(o.name)),o.hostName&&r.add(this.STR(o.hostName)));let s=new Map;for(let o=0;o<this._cols.length;o++){if(!this._cols[o]||Ft(this._hostQueryNames[o],this._cols[o].name,this._cols[o].dataType))continue;let l=Lt(this._hostQueryNames[o]).filter(a=>!r.has(a)&&se(i,a));l.length===1&&s.set(l[0],[...s.get(l[0])??[],o])}for(let[o,l]of s){if(l.length!==1)continue;let a=this.STR(this._cols[l[0]].name);n.set(l[0],{name:a,alias:o,headerName:!se(i,a)})}return n}liveEnglishAliases(){let e=new Map;for(let[n,i]of this._englishAliases){let r=this._cols?this._cols[n]:null;r&&this.STR(r.name)===i.name&&e.set(n,i)}return e}addRow(e,n){if(this.dedupRows){let i="";for(let s of e)i+=this.STR(s)+"~";let r=rt(i);if(this._rowHashes.has(r))return!1;this._rowHashes.add(r)}return this._rows.push(fi(e)),this._inferredMeasureFlags=null,this._origIndices.push(n??-1),!0}getOriginalRowIndex(e){return e<0||e>=this._origIndices.length?-1:this._origIndices[e]}invalidateStats(){this._computedStatsForLevel=null,this._geoExtentComputed=!1,this._geoExtent=null,this._geoExtentLatIdx=-1}reset(){this._inferredMeasureFlags=null,this._cols=[],this._rows=[],this._origIndices=[],this._rowHashes=new Set,this._leafCardinality=null,this._hostQueryNames=[],this._englishAliases=new Map}setColumns(e){if(this._inferredMeasureFlags=null,this._cols=e,!e||e.length===0)return;let n=new Set(e.map(i=>this.STR(i?.name)));for(let i of e){if(!i)continue;let r=this.STR(i.name),s=Pt(r);!s||s===r||n.has(s)||(n.delete(r),n.add(s),i.hostName=r,i.name=s)}}};export{cn as a,dn as b,bi as c,Si as d,wt as e,vt as f,wn as g,Mn as h,Tn as i,vn as j,Me as k,Ln as l,Pt as m,Be as n,Lt as o,Wt as p,Wn as q,Bt as r,Gt as s,Ti as t,vi as u,Ii as v,Gn as w,Kn as x,Vn as y,Kt as z,se as A,nr as B,Oi as C,rr as D,ir as E,j as F,Xt as G,Sr as H,_r as I,Ar as J,Tr as K,Qt as L,Jt as M,Yi as N,Re as O,an as P,ci as Q,di as R,mi as S,ln as T,sn as U,fi as V,on as W};
@@ -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 M,c as y}from"./chunk-WC4JINEZ.mjs";import{a as D}from"./chunk-5HI6TVMM.mjs";var w=[1632,1776,2406,2534,2662,2790,2918,3046,3174,3302,3430,3664,3792,3872,4160,6112,65296],T=new RegExp("["+w.map(e=>String.fromCharCode(e)+"-"+String.fromCharCode(e+9)).join("")+"\\u066B\\u066C\\uFF0C\\uFF0E]","g"),_=/[^\x00-\x7F]/;function p(e){return _.test(e)?e.replace(T,o=>{let n=o.charCodeAt(0);if(n===1643||n===65294)return".";if(n===1644||n===65292)return",";for(let t of w)if(n>=t&&n<=t+9)return String(n-t);return o}):e}function $(e){if(!e)return".";try{return new Intl.NumberFormat(e).formatToParts(1.5).find(n=>n.type==="decimal")?.value===","?",":"."}catch{return"."}}var b="[ \\u00A0\\u202F]",h="(?:[eE][+-]?\\d+)?",A=new RegExp(`^[+-]?(?:\\d{1,3}(?:,\\d{3})+|\\d+)(?:\\.\\d+)?${h}$`),I=new RegExp(`^[+-]?(?:\\d{1,3}(?:\\.\\d{3})+|\\d{1,3}(?:${b}\\d{3})+|\\d+)(?:,\\d+)?${h}$`),P=/^[+-]?\d{1,3}[.,]\d{3}$/,L=[/^[+-]?\d{1,3}(?:,\d{3}){2,}$/,new RegExp(`^[+-]?(?:\\d{1,3}(?:,\\d{3})+|\\d+)\\.\\d+${h}$`)],W=[/^[+-]?\d{1,3}(?:\.\d{3}){2,}$/,new RegExp(`^[+-]?(?:\\d{1,3}(?:\\.\\d{3})+|\\d{1,3}(?:${b}\\d{3})+|\\d+),\\d+${h}$`)];function H(e,o){let n=0,t=0;for(let i of e){if(typeof i!="string")continue;let s=p(i.trim());s===""||P.test(s)||(L.some(r=>r.test(s))?n++:W.some(r=>r.test(s))&&t++)}return t>0&&n===0?",":n>0?".":$(o)}function U(e,o){let n=p(String(e??"").trim());return n===""?null:o===","?I.test(n)?parseFloat(n.replace(/[.   ]/g,"").replace(",",".")):null:A.test(n)?parseFloat(n.replace(/,/g,"")):null}function X(e,o){return U(e,o)!==null}var F={};function g(e){return D(e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()).replace(/[.‎‏\s]/g,"")}function Y(e){let o=e||"en",n=F[o];if(n)return n;let t={};try{let i=new Intl.DateTimeFormat(o,{month:"long"}),s=new Intl.DateTimeFormat(o,{month:"short"});for(let r=0;r<12;++r){let u=new Date(Date.UTC(2020,r,15));t[g(i.format(u))]=r,t[g(s.format(u))]=r}}catch{}return F[o]=t,t}var B=new Set(["zh","ja","ko","vi"]),v=[["en","sept",8],["de","j\xE4nner",0]],E=null,N=[];function O(){let e=new Map,o=[],n=(t,i,s)=>{let r=g(i);if(r.length<2||/^\d+$/.test(r))return;let u=e.get(r);u||e.set(r,u=[]),!u.some(l=>l.lang===t&&l.month===s)&&(t==="en"?u.unshift({lang:t,month:s}):u.push({lang:t,month:s}))};for(let t of M)if(!B.has(t.code))try{let i=`${t.intl}-u-ca-gregory-nu-latn`,s=[{month:"long"},{month:"short"},{day:"numeric",month:"long"},{day:"numeric",month:"short"},{year:"numeric",month:"long"},{year:"numeric",month:"short"}].map(r=>new Intl.DateTimeFormat(i,{timeZone:"UTC",...r}));for(let r=0;r<12;++r){let u=new Date(Date.UTC(2020,r,15));for(let l of s){let m=l.formatToParts(u).filter(d=>d.type==="month").map(d=>d.value).join("");n(t.code,m,r)}}o.push(t.code)}catch{}for(let[t,i,s]of v)n(t,i,s);return N=o,e}function q(e){return E??=O(),E.get(g(e))??[]}var k="\u05D1\u05DC\u05DE\u05D4\u05D5\u05E9\u05DB";function G(e,o){if(e.length<3||!k.includes(e[0]))return;let n=o.get(e.slice(1))?.filter(t=>t.lang==="he");return n&&n.length?n:void 0}function Q(e,o){E??=O();let n=E,t=[];for(let a of e){let c=g(a);if(!c)return null;t.includes(c)||t.push(c)}if(t.length===0)return null;let i=t.map(a=>n.get(a)??G(a,n));if(i.some(a=>!a))return null;let s=a=>{let c=[];for(let f of i){let R=f.find(x=>x.lang===a)??f.find(x=>x.lang==="en");if(!R)return null;c.push(R.month)}return c},r=a=>new Map(t.map((c,f)=>[c,a[f]]));if(i.every(a=>a.some(c=>c.lang==="en")))return r(s("en"));let u=new Map;for(let a of N){if(a==="en")continue;let c=s(a);c&&u.set(a,c)}if(u.size===0)return null;let l=[...u.values()];if(l.every(a=>a.every((c,f)=>c===l[0][f])))return r(l[0]);let m=y(String(o??"").split(/[-_]/)[0])?.code,d=m?u.get(m):void 0;return d?r(d):null}var j=/^((?:19|20)\d{2})\s*[年년]\s*(\d{1,2})\s*[月월]$/,z=new Set(["de","del","of"]),S=/^(?:19|20)\d{2}$/,C=/^[\p{L}\p{M}\u0970\u05f3]+$/u;function nn(e){let o=p(String(e??"").replace(/[\u200e\u200f\u061c]/g,"")).replace(/\s+/g," ").trim();o=o.replace(/(\d{4})\s*(?:г|р|r)\.?$/iu,"$1");let n=j.exec(o);if(n){let r=+n[2];return r>=1&&r<=12?{year:+n[1],month:r}:null}let t=o.split(/[\s\-/.,']+/).filter(r=>r!==""&&!z.has(r.toLowerCase()));if(t.length!==2)return null;let[i,s]=t;return S.test(s)&&C.test(i)?{year:+s,word:i}:S.test(i)&&C.test(s)?{year:+i,word:s}:null}export{p as a,$ as b,H as c,U as d,X as e,g as f,Y as g,q as h,Q as i,nn as j};
2
+ import{a as D}from"./chunk-5HI6TVMM.mjs";import{a as M,c as y}from"./chunk-WC4JINEZ.mjs";var w=[1632,1776,2406,2534,2662,2790,2918,3046,3174,3302,3430,3664,3792,3872,4160,6112,65296],T=new RegExp("["+w.map(e=>String.fromCharCode(e)+"-"+String.fromCharCode(e+9)).join("")+"\\u066B\\u066C\\uFF0C\\uFF0E]","g"),_=/[^\x00-\x7F]/;function p(e){return _.test(e)?e.replace(T,o=>{let n=o.charCodeAt(0);if(n===1643||n===65294)return".";if(n===1644||n===65292)return",";for(let t of w)if(n>=t&&n<=t+9)return String(n-t);return o}):e}function $(e){if(!e)return".";try{return new Intl.NumberFormat(e).formatToParts(1.5).find(n=>n.type==="decimal")?.value===","?",":"."}catch{return"."}}var b="[ \\u00A0\\u202F]",h="(?:[eE][+-]?\\d+)?",A=new RegExp(`^[+-]?(?:\\d{1,3}(?:,\\d{3})+|\\d+)(?:\\.\\d+)?${h}$`),I=new RegExp(`^[+-]?(?:\\d{1,3}(?:\\.\\d{3})+|\\d{1,3}(?:${b}\\d{3})+|\\d+)(?:,\\d+)?${h}$`),P=/^[+-]?\d{1,3}[.,]\d{3}$/,L=[/^[+-]?\d{1,3}(?:,\d{3}){2,}$/,new RegExp(`^[+-]?(?:\\d{1,3}(?:,\\d{3})+|\\d+)\\.\\d+${h}$`)],W=[/^[+-]?\d{1,3}(?:\.\d{3}){2,}$/,new RegExp(`^[+-]?(?:\\d{1,3}(?:\\.\\d{3})+|\\d{1,3}(?:${b}\\d{3})+|\\d+),\\d+${h}$`)];function H(e,o){let n=0,t=0;for(let i of e){if(typeof i!="string")continue;let s=p(i.trim());s===""||P.test(s)||(L.some(r=>r.test(s))?n++:W.some(r=>r.test(s))&&t++)}return t>0&&n===0?",":n>0?".":$(o)}function U(e,o){let n=p(String(e??"").trim());return n===""?null:o===","?I.test(n)?parseFloat(n.replace(/[.   ]/g,"").replace(",",".")):null:A.test(n)?parseFloat(n.replace(/,/g,"")):null}function X(e,o){return U(e,o)!==null}var F={};function g(e){return D(e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()).replace(/[.‎‏\s]/g,"")}function Y(e){let o=e||"en",n=F[o];if(n)return n;let t={};try{let i=new Intl.DateTimeFormat(o,{month:"long"}),s=new Intl.DateTimeFormat(o,{month:"short"});for(let r=0;r<12;++r){let u=new Date(Date.UTC(2020,r,15));t[g(i.format(u))]=r,t[g(s.format(u))]=r}}catch{}return F[o]=t,t}var B=new Set(["zh","ja","ko","vi"]),v=[["en","sept",8],["de","j\xE4nner",0]],E=null,N=[];function O(){let e=new Map,o=[],n=(t,i,s)=>{let r=g(i);if(r.length<2||/^\d+$/.test(r))return;let u=e.get(r);u||e.set(r,u=[]),!u.some(l=>l.lang===t&&l.month===s)&&(t==="en"?u.unshift({lang:t,month:s}):u.push({lang:t,month:s}))};for(let t of M)if(!B.has(t.code))try{let i=`${t.intl}-u-ca-gregory-nu-latn`,s=[{month:"long"},{month:"short"},{day:"numeric",month:"long"},{day:"numeric",month:"short"},{year:"numeric",month:"long"},{year:"numeric",month:"short"}].map(r=>new Intl.DateTimeFormat(i,{timeZone:"UTC",...r}));for(let r=0;r<12;++r){let u=new Date(Date.UTC(2020,r,15));for(let l of s){let m=l.formatToParts(u).filter(d=>d.type==="month").map(d=>d.value).join("");n(t.code,m,r)}}o.push(t.code)}catch{}for(let[t,i,s]of v)n(t,i,s);return N=o,e}function q(e){return E??=O(),E.get(g(e))??[]}var k="\u05D1\u05DC\u05DE\u05D4\u05D5\u05E9\u05DB";function G(e,o){if(e.length<3||!k.includes(e[0]))return;let n=o.get(e.slice(1))?.filter(t=>t.lang==="he");return n&&n.length?n:void 0}function Q(e,o){E??=O();let n=E,t=[];for(let a of e){let c=g(a);if(!c)return null;t.includes(c)||t.push(c)}if(t.length===0)return null;let i=t.map(a=>n.get(a)??G(a,n));if(i.some(a=>!a))return null;let s=a=>{let c=[];for(let f of i){let R=f.find(x=>x.lang===a)??f.find(x=>x.lang==="en");if(!R)return null;c.push(R.month)}return c},r=a=>new Map(t.map((c,f)=>[c,a[f]]));if(i.every(a=>a.some(c=>c.lang==="en")))return r(s("en"));let u=new Map;for(let a of N){if(a==="en")continue;let c=s(a);c&&u.set(a,c)}if(u.size===0)return null;let l=[...u.values()];if(l.every(a=>a.every((c,f)=>c===l[0][f])))return r(l[0]);let m=y(String(o??"").split(/[-_]/)[0])?.code,d=m?u.get(m):void 0;return d?r(d):null}var j=/^((?:19|20)\d{2})\s*[年년]\s*(\d{1,2})\s*[月월]$/,z=new Set(["de","del","of"]),S=/^(?:19|20)\d{2}$/,C=/^[\p{L}\p{M}\u0970\u05f3]+$/u;function nn(e){let o=p(String(e??"").replace(/[\u200e\u200f\u061c]/g,"")).replace(/\s+/g," ").trim();o=o.replace(/(\d{4})\s*(?:г|р|r)\.?$/iu,"$1");let n=j.exec(o);if(n){let r=+n[2];return r>=1&&r<=12?{year:+n[1],month:r}:null}let t=o.split(/[\s\-/.,']+/).filter(r=>r!==""&&!z.has(r.toLowerCase()));if(t.length!==2)return null;let[i,s]=t;return S.test(s)&&C.test(i)?{year:+s,word:i}:S.test(i)&&C.test(s)?{year:+i,word:s}:null}export{p as a,$ as b,H as c,U as d,X as e,g as f,Y as g,q as h,Q as i,nn as j};