ilib-webos 14.9.2-webos1 → 14.12.0-webos1
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.
- package/index.js +1 -50
- package/lib/Address.js +1 -612
- package/lib/AddressFmt.js +1 -469
- package/lib/AlphabeticIndex.js +1 -710
- package/lib/AreaUnit.js +1 -253
- package/lib/Astro.js +1 -822
- package/lib/AsyncNodeLoader.js +1 -103
- package/lib/CType.js +1 -336
- package/lib/Calendar.js +1 -87
- package/lib/CalendarFactory.js +3 -192
- package/lib/CaseMapper.js +1 -174
- package/lib/Charmap.js +1 -333
- package/lib/CharmapFactory.js +3 -202
- package/lib/CharmapTable.js +1 -330
- package/lib/Charset.js +1 -222
- package/lib/CodePointSource.js +1 -86
- package/lib/Collator.js +1 -792
- package/lib/CopticCal.js +1 -49
- package/lib/CopticDate.js +1 -127
- package/lib/CopticRataDie.js +1 -95
- package/lib/Country.js +1 -215
- package/lib/Currency.js +1 -265
- package/lib/DateFactory.js +3 -262
- package/lib/DateFmt.js +1 -1650
- package/lib/DateRngFmt.js +1 -417
- package/lib/DigitalSpeedUnit.js +1 -380
- package/lib/DigitalStorageUnit.js +1 -356
- package/lib/DurationFmt.js +1 -419
- package/lib/ElementIterator.js +1 -104
- package/lib/EnergyUnit.js +1 -263
- package/lib/EthiopicCal.js +1 -119
- package/lib/EthiopicDate.js +1 -308
- package/lib/EthiopicRataDie.js +1 -121
- package/lib/FuelConsumptionUnit.js +1 -292
- package/lib/GlyphString.js +1 -437
- package/lib/GregRataDie.js +1 -182
- package/lib/GregorianCal.js +1 -120
- package/lib/GregorianDate.js +1 -459
- package/lib/HanCal.js +1 -327
- package/lib/HanDate.js +1 -547
- package/lib/HanRataDie.js +1 -183
- package/lib/HebrewCal.js +1 -225
- package/lib/HebrewDate.js +1 -551
- package/lib/HebrewRataDie.js +1 -225
- package/lib/IDate.js +1 -388
- package/lib/INumber.js +1 -298
- package/lib/ISO2022.js +1 -80
- package/lib/ISet.js +1 -164
- package/lib/IString.js +1 -1447
- package/lib/IslamicCal.js +1 -123
- package/lib/IslamicDate.js +1 -380
- package/lib/IslamicRataDie.js +1 -115
- package/lib/JSUtils.js +1 -354
- package/lib/JulianCal.js +1 -153
- package/lib/JulianDate.js +1 -330
- package/lib/JulianDay.js +1 -113
- package/lib/JulianRataDie.js +1 -119
- package/lib/LengthUnit.js +1 -275
- package/lib/ListFmt.js +1 -213
- package/lib/Loader.js +1 -270
- package/lib/Locale.js +2 -1135
- package/lib/LocaleInfo.js +1 -576
- package/lib/LocaleMatcher.js +1 -447
- package/lib/MassUnit.js +1 -263
- package/lib/MathUtils.js +1 -216
- package/lib/Measurement.js +1 -560
- package/lib/MeasurementFactory.js +1 -170
- package/lib/Name.js +1 -1306
- package/lib/NameFmt.js +1 -404
- package/lib/NodeLoader.js +1 -101
- package/lib/NormString.js +1 -617
- package/lib/NumFmt.js +1 -679
- package/lib/NumberingPlan.js +1 -235
- package/lib/Path.js +1 -101
- package/lib/PersAlgoRataDie.js +1 -154
- package/lib/PersRataDie.js +1 -213
- package/lib/PersianAlgoCal.js +1 -129
- package/lib/PersianAlgoDate.js +1 -377
- package/lib/PersianCal.js +1 -138
- package/lib/PersianDate.js +1 -409
- package/lib/PhoneFmt.js +1 -459
- package/lib/PhoneGeoLocator.js +1 -651
- package/lib/PhoneHandlerFactory.js +1 -601
- package/lib/PhoneLocale.js +1 -288
- package/lib/PhoneNumber.js +1 -1606
- package/lib/QMLLoader.js +1 -87
- package/lib/RataDie.js +1 -308
- package/lib/ResBundle.js +1 -704
- package/lib/ScriptInfo.js +1 -220
- package/lib/SearchUtils.js +1 -131
- package/lib/StringMapper.js +1 -170
- package/lib/TemperatureUnit.js +1 -225
- package/lib/ThaiSolarCal.js +1 -62
- package/lib/ThaiSolarDate.js +1 -233
- package/lib/TimeUnit.js +1 -272
- package/lib/TimeZone.js +1 -893
- package/lib/UTF16BE.js +1 -99
- package/lib/UTF16LE.js +1 -104
- package/lib/UTF8.js +1 -202
- package/lib/UnitFmt.js +1 -528
- package/lib/UnknownUnit.js +1 -170
- package/lib/Utils.js +1 -519
- package/lib/VelocityUnit.js +1 -259
- package/lib/VolumeUnit.js +1 -461
- package/lib/WebLoader.js +1 -226
- package/lib/WebpackLoader.js +3 -191
- package/lib/ilib-node-async.js +1 -32
- package/lib/ilib-node.js +1 -31
- package/lib/ilib-qt.js +1 -146
- package/lib/ilib-unpack.js +1 -157
- package/lib/ilib-web.js +1 -157
- package/lib/ilib-webpack.js +2 -30
- package/lib/ilib.js +1 -851
- package/lib/index.js +1 -0
- package/lib/isAlnum.js +1 -61
- package/lib/isAlpha.js +1 -66
- package/lib/isAscii.js +1 -60
- package/lib/isBlank.js +1 -61
- package/lib/isCntrl.js +1 -60
- package/lib/isDigit.js +1 -62
- package/lib/isGraph.js +1 -63
- package/lib/isIdeo.js +1 -65
- package/lib/isLower.js +1 -64
- package/lib/isPrint.js +1 -44
- package/lib/isPunct.js +1 -73
- package/lib/isScript.js +1 -66
- package/lib/isSpace.js +1 -70
- package/lib/isUpper.js +1 -64
- package/lib/isXdigit.js +1 -65
- package/locale/af/NA/unitfmt.json +1 -1
- package/locale/af/dateformats.json +1 -1
- package/locale/af/list.json +1 -1
- package/locale/af/sysres.json +1 -1
- package/locale/af/unitfmt.json +1 -1
- package/locale/am/dateformats.json +1 -1
- package/locale/am/list.json +1 -1
- package/locale/am/sysres.json +1 -1
- package/locale/am/unitfmt.json +1 -1
- package/locale/ar/AE/dateformats.json +1 -1
- package/locale/ar/AE/localeinfo.json +1 -0
- package/locale/ar/AE/unitfmt.json +1 -1
- package/locale/ar/BH/dateformats.json +1 -1
- package/locale/ar/BH/unitfmt.json +1 -1
- package/locale/ar/DJ/dateformats.json +1 -1
- package/locale/ar/DJ/unitfmt.json +1 -1
- package/locale/ar/DZ/dateformats.json +1 -1
- package/locale/ar/DZ/unitfmt.json +1 -1
- package/locale/ar/EG/dateformats.json +1 -1
- package/locale/ar/EG/unitfmt.json +1 -1
- package/locale/ar/EH/dateformats.json +1 -1
- package/locale/ar/EH/unitfmt.json +1 -1
- package/locale/ar/ER/dateformats.json +1 -1
- package/locale/ar/ER/unitfmt.json +1 -1
- package/locale/ar/IL/dateformats.json +1 -1
- package/locale/ar/IL/unitfmt.json +1 -1
- package/locale/ar/IQ/dateformats.json +1 -1
- package/locale/ar/IQ/unitfmt.json +1 -1
- package/locale/ar/JO/dateformats.json +1 -1
- package/locale/ar/JO/unitfmt.json +1 -1
- package/locale/ar/KM/dateformats.json +1 -1
- package/locale/ar/KM/unitfmt.json +1 -1
- package/locale/ar/KW/dateformats.json +1 -1
- package/locale/ar/KW/unitfmt.json +1 -1
- package/locale/ar/LB/dateformats.json +1 -1
- package/locale/ar/LB/unitfmt.json +1 -1
- package/locale/ar/LY/dateformats.json +1 -1
- package/locale/ar/LY/unitfmt.json +1 -1
- package/locale/ar/MA/dateformats.json +1 -1
- package/locale/ar/MA/unitfmt.json +1 -1
- package/locale/ar/MR/dateformats.json +1 -1
- package/locale/ar/MR/unitfmt.json +1 -1
- package/locale/ar/OM/dateformats.json +1 -1
- package/locale/ar/OM/unitfmt.json +1 -1
- package/locale/ar/PS/dateformats.json +1 -1
- package/locale/ar/PS/unitfmt.json +1 -1
- package/locale/ar/QA/dateformats.json +1 -1
- package/locale/ar/QA/unitfmt.json +1 -1
- package/locale/ar/SA/dateformats.json +1 -1
- package/locale/ar/SA/sysres.json +1 -1
- package/locale/ar/SA/unitfmt.json +1 -1
- package/locale/ar/SD/dateformats.json +1 -1
- package/locale/ar/SD/unitfmt.json +1 -1
- package/locale/ar/SO/dateformats.json +1 -1
- package/locale/ar/SO/unitfmt.json +1 -1
- package/locale/ar/SS/dateformats.json +1 -1
- package/locale/ar/SS/unitfmt.json +1 -1
- package/locale/ar/SY/dateformats.json +1 -1
- package/locale/ar/SY/unitfmt.json +1 -1
- package/locale/ar/TD/dateformats.json +1 -1
- package/locale/ar/TD/unitfmt.json +1 -1
- package/locale/ar/TN/dateformats.json +1 -1
- package/locale/ar/TN/unitfmt.json +1 -1
- package/locale/ar/YE/dateformats.json +1 -1
- package/locale/ar/YE/unitfmt.json +1 -1
- package/locale/ar/dateformats.json +1 -1
- package/locale/ar/sysres.json +1 -1
- package/locale/ar/unitfmt.json +1 -1
- package/locale/as/dateformats.json +1 -1
- package/locale/as/sysres.json +1 -1
- package/locale/as/unitfmt.json +1 -1
- package/locale/az/Cyrl/dateformats.json +1 -1
- package/locale/az/Cyrl/sysres.json +1 -1
- package/locale/az/Cyrl/unitfmt.json +1 -1
- package/locale/az/Latn/dateformats.json +1 -1
- package/locale/az/Latn/sysres.json +1 -1
- package/locale/az/Latn/unitfmt.json +1 -1
- package/locale/az/dateformats.json +1 -1
- package/locale/az/localeinfo.json +1 -1
- package/locale/az/sysres.json +1 -1
- package/locale/az/unitfmt.json +1 -1
- package/locale/be/dateformats.json +1 -1
- package/locale/be/sysres.json +1 -1
- package/locale/be/unitfmt.json +1 -1
- package/locale/bg/dateformats.json +1 -1
- package/locale/bg/sysres.json +1 -1
- package/locale/bg/unitfmt.json +1 -1
- package/locale/bn/IN/unitfmt.json +1 -1
- package/locale/bn/dateformats.json +1 -1
- package/locale/bn/sysres.json +1 -1
- package/locale/bn/unitfmt.json +1 -1
- package/locale/bs/Cyrl/dateformats.json +1 -1
- package/locale/bs/Cyrl/sysres.json +1 -1
- package/locale/bs/Cyrl/unitfmt.json +1 -1
- package/locale/bs/Latn/dateformats.json +1 -1
- package/locale/bs/Latn/unitfmt.json +1 -1
- package/locale/bs/dateformats.json +1 -1
- package/locale/bs/sysres.json +1 -1
- package/locale/bs/unitfmt.json +1 -1
- package/locale/ca/AD/dateformats.json +1 -1
- package/locale/ca/AD/unitfmt.json +1 -1
- package/locale/ca/ES/unitfmt.json +1 -1
- package/locale/ca/FR/dateformats.json +1 -1
- package/locale/ca/FR/unitfmt.json +1 -1
- package/locale/ca/IT/dateformats.json +1 -1
- package/locale/ca/IT/unitfmt.json +1 -1
- package/locale/ca/dateformats.json +1 -1
- package/locale/ca/sysres.json +1 -1
- package/locale/ca/unitfmt.json +1 -1
- package/locale/ccc.json +1 -1
- package/locale/cs/dateformats.json +1 -1
- package/locale/cs/sysres.json +1 -1
- package/locale/cs/unitfmt.json +1 -1
- package/locale/ctype.json +1 -1
- package/locale/ctype_c.json +1 -1
- package/locale/ctype_l.json +1 -1
- package/locale/ctype_m.json +1 -1
- package/locale/ctype_n.json +1 -1
- package/locale/ctype_p.json +1 -1
- package/locale/ctype_s.json +1 -1
- package/locale/da/GL/unitfmt.json +1 -1
- package/locale/da/dateformats.json +1 -1
- package/locale/da/sysres.json +1 -1
- package/locale/da/unitfmt.json +1 -1
- package/locale/de/AT/unitfmt.json +1 -1
- package/locale/de/BE/unitfmt.json +1 -1
- package/locale/de/CH/unitfmt.json +1 -1
- package/locale/de/IT/unitfmt.json +1 -1
- package/locale/de/LI/unitfmt.json +1 -1
- package/locale/de/LU/dateformats.json +1 -1
- package/locale/de/LU/unitfmt.json +1 -1
- package/locale/de/dateformats.json +1 -1
- package/locale/de/sysres.json +1 -1
- package/locale/de/unitfmt.json +1 -1
- package/locale/el/CY/dateformats.json +1 -1
- package/locale/el/CY/unitfmt.json +1 -1
- package/locale/el/dateformats.json +1 -1
- package/locale/el/sysres.json +1 -1
- package/locale/el/unitfmt.json +1 -1
- package/locale/en/001/dateformats.json +1 -1
- package/locale/en/001/sysres.json +1 -1
- package/locale/en/001/unitfmt.json +1 -1
- package/locale/en/150/dateformats.json +1 -1
- package/locale/en/150/sysres.json +1 -1
- package/locale/en/150/unitfmt.json +1 -1
- package/locale/en/AE/dateformats.json +1 -1
- package/locale/en/AE/unitfmt.json +1 -1
- package/locale/en/AG/dateformats.json +1 -1
- package/locale/en/AG/sysres.json +1 -1
- package/locale/en/AG/unitfmt.json +1 -1
- package/locale/en/AI/dateformats.json +1 -1
- package/locale/en/AI/sysres.json +1 -1
- package/locale/en/AI/unitfmt.json +1 -1
- package/locale/en/AS/unitfmt.json +1 -1
- package/locale/en/AT/dateformats.json +1 -1
- package/locale/en/AT/sysres.json +1 -1
- package/locale/en/AT/unitfmt.json +1 -1
- package/locale/en/AU/dateformats.json +1 -1
- package/locale/en/AU/sysres.json +1 -1
- package/locale/en/AU/unitfmt.json +1 -1
- package/locale/en/BB/dateformats.json +1 -1
- package/locale/en/BB/sysres.json +1 -1
- package/locale/en/BB/unitfmt.json +1 -1
- package/locale/en/BE/dateformats.json +1 -1
- package/locale/en/BE/sysres.json +1 -1
- package/locale/en/BE/unitfmt.json +1 -1
- package/locale/en/BI/unitfmt.json +1 -1
- package/locale/en/BM/dateformats.json +1 -1
- package/locale/en/BM/sysres.json +1 -1
- package/locale/en/BM/unitfmt.json +1 -1
- package/locale/en/BS/dateformats.json +1 -1
- package/locale/en/BS/sysres.json +1 -1
- package/locale/en/BS/unitfmt.json +1 -1
- package/locale/en/BW/dateformats.json +1 -1
- package/locale/en/BW/sysres.json +1 -1
- package/locale/en/BW/unitfmt.json +1 -1
- package/locale/en/BZ/dateformats.json +1 -1
- package/locale/en/BZ/sysres.json +1 -1
- package/locale/en/BZ/unitfmt.json +1 -1
- package/locale/en/CA/dateformats.json +1 -1
- package/locale/en/CA/sysres.json +1 -1
- package/locale/en/CA/unitfmt.json +1 -1
- package/locale/en/CC/dateformats.json +1 -1
- package/locale/en/CC/sysres.json +1 -1
- package/locale/en/CC/unitfmt.json +1 -1
- package/locale/en/CH/dateformats.json +1 -1
- package/locale/en/CH/sysres.json +1 -1
- package/locale/en/CH/unitfmt.json +1 -1
- package/locale/en/CK/dateformats.json +1 -1
- package/locale/en/CK/sysres.json +1 -1
- package/locale/en/CK/unitfmt.json +1 -1
- package/locale/en/CM/dateformats.json +1 -1
- package/locale/en/CM/sysres.json +1 -1
- package/locale/en/CM/unitfmt.json +1 -1
- package/locale/en/CX/dateformats.json +1 -1
- package/locale/en/CX/sysres.json +1 -1
- package/locale/en/CX/unitfmt.json +1 -1
- package/locale/en/CY/dateformats.json +1 -1
- package/locale/en/CY/sysres.json +1 -1
- package/locale/en/CY/unitfmt.json +1 -1
- package/locale/en/DE/dateformats.json +1 -1
- package/locale/en/DE/sysres.json +1 -1
- package/locale/en/DE/unitfmt.json +1 -1
- package/locale/en/DG/dateformats.json +1 -1
- package/locale/en/DG/sysres.json +1 -1
- package/locale/en/DG/unitfmt.json +1 -1
- package/locale/en/DK/dateformats.json +1 -1
- package/locale/en/DK/sysres.json +1 -1
- package/locale/en/DK/unitfmt.json +1 -1
- package/locale/en/DM/dateformats.json +1 -1
- package/locale/en/DM/sysres.json +1 -1
- package/locale/en/DM/unitfmt.json +1 -1
- package/locale/en/ER/dateformats.json +1 -1
- package/locale/en/ER/sysres.json +1 -1
- package/locale/en/ER/unitfmt.json +1 -1
- package/locale/en/FI/dateformats.json +1 -1
- package/locale/en/FI/sysres.json +1 -1
- package/locale/en/FI/unitfmt.json +1 -1
- package/locale/en/FJ/dateformats.json +1 -1
- package/locale/en/FJ/sysres.json +1 -1
- package/locale/en/FJ/unitfmt.json +1 -1
- package/locale/en/FK/dateformats.json +1 -1
- package/locale/en/FK/sysres.json +1 -1
- package/locale/en/FK/unitfmt.json +1 -1
- package/locale/en/FM/dateformats.json +1 -1
- package/locale/en/FM/sysres.json +1 -1
- package/locale/en/FM/unitfmt.json +1 -1
- package/locale/en/GB/dateformats.json +1 -1
- package/locale/en/GB/sysres.json +1 -1
- package/locale/en/GB/unitfmt.json +1 -1
- package/locale/en/GD/dateformats.json +1 -1
- package/locale/en/GD/sysres.json +1 -1
- package/locale/en/GD/unitfmt.json +1 -1
- package/locale/en/GG/dateformats.json +1 -1
- package/locale/en/GG/sysres.json +1 -1
- package/locale/en/GG/unitfmt.json +1 -1
- package/locale/en/GH/dateformats.json +1 -1
- package/locale/en/GH/sysres.json +1 -1
- package/locale/en/GH/unitfmt.json +1 -1
- package/locale/en/GI/dateformats.json +1 -1
- package/locale/en/GI/sysres.json +1 -1
- package/locale/en/GI/unitfmt.json +1 -1
- package/locale/en/GM/dateformats.json +1 -1
- package/locale/en/GM/sysres.json +1 -1
- package/locale/en/GM/unitfmt.json +1 -1
- package/locale/en/GU/unitfmt.json +1 -1
- package/locale/en/GY/dateformats.json +1 -1
- package/locale/en/GY/sysres.json +1 -1
- package/locale/en/GY/unitfmt.json +1 -1
- package/locale/en/HK/dateformats.json +1 -1
- package/locale/en/HK/sysres.json +1 -1
- package/locale/en/HK/unitfmt.json +1 -1
- package/locale/en/IE/dateformats.json +1 -1
- package/locale/en/IE/sysres.json +1 -1
- package/locale/en/IE/unitfmt.json +1 -1
- package/locale/en/IL/dateformats.json +1 -1
- package/locale/en/IL/sysres.json +1 -1
- package/locale/en/IL/unitfmt.json +1 -1
- package/locale/en/IM/dateformats.json +1 -1
- package/locale/en/IM/sysres.json +1 -1
- package/locale/en/IM/unitfmt.json +1 -1
- package/locale/en/IN/dateformats.json +1 -1
- package/locale/en/IN/sysres.json +1 -1
- package/locale/en/IN/unitfmt.json +1 -1
- package/locale/en/IO/dateformats.json +1 -1
- package/locale/en/IO/sysres.json +1 -1
- package/locale/en/IO/unitfmt.json +1 -1
- package/locale/en/JE/dateformats.json +1 -1
- package/locale/en/JE/sysres.json +1 -1
- package/locale/en/JE/unitfmt.json +1 -1
- package/locale/en/JM/dateformats.json +1 -1
- package/locale/en/JM/sysres.json +1 -1
- package/locale/en/JM/unitfmt.json +1 -1
- package/locale/en/KE/dateformats.json +1 -1
- package/locale/en/KE/sysres.json +1 -1
- package/locale/en/KE/unitfmt.json +1 -1
- package/locale/en/KI/dateformats.json +1 -1
- package/locale/en/KI/sysres.json +1 -1
- package/locale/en/KI/unitfmt.json +1 -1
- package/locale/en/KN/dateformats.json +1 -1
- package/locale/en/KN/sysres.json +1 -1
- package/locale/en/KN/unitfmt.json +1 -1
- package/locale/en/KY/dateformats.json +1 -1
- package/locale/en/KY/sysres.json +1 -1
- package/locale/en/KY/unitfmt.json +1 -1
- package/locale/en/LC/dateformats.json +1 -1
- package/locale/en/LC/sysres.json +1 -1
- package/locale/en/LC/unitfmt.json +1 -1
- package/locale/en/LR/dateformats.json +1 -1
- package/locale/en/LR/sysres.json +1 -1
- package/locale/en/LR/unitfmt.json +1 -1
- package/locale/en/LS/dateformats.json +1 -1
- package/locale/en/LS/sysres.json +1 -1
- package/locale/en/LS/unitfmt.json +1 -1
- package/locale/en/MG/dateformats.json +1 -1
- package/locale/en/MG/sysres.json +1 -1
- package/locale/en/MG/unitfmt.json +1 -1
- package/locale/en/MH/unitfmt.json +1 -1
- package/locale/en/MO/dateformats.json +1 -1
- package/locale/en/MO/sysres.json +1 -1
- package/locale/en/MO/unitfmt.json +1 -1
- package/locale/en/MP/unitfmt.json +1 -1
- package/locale/en/MS/dateformats.json +1 -1
- package/locale/en/MS/sysres.json +1 -1
- package/locale/en/MS/unitfmt.json +1 -1
- package/locale/en/MT/dateformats.json +1 -1
- package/locale/en/MT/sysres.json +1 -1
- package/locale/en/MT/unitfmt.json +1 -1
- package/locale/en/MU/dateformats.json +1 -1
- package/locale/en/MU/sysres.json +1 -1
- package/locale/en/MU/unitfmt.json +1 -1
- package/locale/en/MW/dateformats.json +1 -1
- package/locale/en/MW/sysres.json +1 -1
- package/locale/en/MW/unitfmt.json +1 -1
- package/locale/en/MY/dateformats.json +1 -1
- package/locale/en/MY/sysres.json +1 -1
- package/locale/en/MY/unitfmt.json +1 -1
- package/locale/en/NA/dateformats.json +1 -1
- package/locale/en/NA/sysres.json +1 -1
- package/locale/en/NA/unitfmt.json +1 -1
- package/locale/en/NF/dateformats.json +1 -1
- package/locale/en/NF/sysres.json +1 -1
- package/locale/en/NF/unitfmt.json +1 -1
- package/locale/en/NG/dateformats.json +1 -1
- package/locale/en/NG/sysres.json +1 -1
- package/locale/en/NG/unitfmt.json +1 -1
- package/locale/en/NL/dateformats.json +1 -1
- package/locale/en/NL/sysres.json +1 -1
- package/locale/en/NL/unitfmt.json +1 -1
- package/locale/en/NR/dateformats.json +1 -1
- package/locale/en/NR/sysres.json +1 -1
- package/locale/en/NR/unitfmt.json +1 -1
- package/locale/en/NU/dateformats.json +1 -1
- package/locale/en/NU/sysres.json +1 -1
- package/locale/en/NU/unitfmt.json +1 -1
- package/locale/en/NZ/dateformats.json +1 -1
- package/locale/en/NZ/sysres.json +1 -1
- package/locale/en/NZ/unitfmt.json +1 -1
- package/locale/en/PG/dateformats.json +1 -1
- package/locale/en/PG/sysres.json +1 -1
- package/locale/en/PG/unitfmt.json +1 -1
- package/locale/en/PH/dateformats.json +1 -1
- package/locale/en/PH/list.json +1 -0
- package/locale/en/PH/unitfmt.json +1 -1
- package/locale/en/PK/dateformats.json +1 -1
- package/locale/en/PK/sysres.json +1 -1
- package/locale/en/PK/unitfmt.json +1 -1
- package/locale/en/PN/dateformats.json +1 -1
- package/locale/en/PN/sysres.json +1 -1
- package/locale/en/PN/unitfmt.json +1 -1
- package/locale/en/PR/unitfmt.json +1 -1
- package/locale/en/PW/dateformats.json +1 -1
- package/locale/en/PW/sysres.json +1 -1
- package/locale/en/PW/unitfmt.json +1 -1
- package/locale/en/RW/dateformats.json +1 -1
- package/locale/en/RW/sysres.json +1 -1
- package/locale/en/RW/unitfmt.json +1 -1
- package/locale/en/SB/dateformats.json +1 -1
- package/locale/en/SB/sysres.json +1 -1
- package/locale/en/SB/unitfmt.json +1 -1
- package/locale/en/SC/dateformats.json +1 -1
- package/locale/en/SC/sysres.json +1 -1
- package/locale/en/SC/unitfmt.json +1 -1
- package/locale/en/SD/dateformats.json +1 -1
- package/locale/en/SD/sysres.json +1 -1
- package/locale/en/SD/unitfmt.json +1 -1
- package/locale/en/SE/dateformats.json +1 -1
- package/locale/en/SE/sysres.json +1 -1
- package/locale/en/SE/unitfmt.json +1 -1
- package/locale/en/SG/dateformats.json +1 -1
- package/locale/en/SG/sysres.json +1 -1
- package/locale/en/SG/unitfmt.json +1 -1
- package/locale/en/SH/dateformats.json +1 -1
- package/locale/en/SH/sysres.json +1 -1
- package/locale/en/SH/unitfmt.json +1 -1
- package/locale/en/SI/dateformats.json +1 -1
- package/locale/en/SI/sysres.json +1 -1
- package/locale/en/SI/unitfmt.json +1 -1
- package/locale/en/SL/dateformats.json +1 -1
- package/locale/en/SL/sysres.json +1 -1
- package/locale/en/SL/unitfmt.json +1 -1
- package/locale/en/SS/dateformats.json +1 -1
- package/locale/en/SS/sysres.json +1 -1
- package/locale/en/SS/unitfmt.json +1 -1
- package/locale/en/SX/dateformats.json +1 -1
- package/locale/en/SX/sysres.json +1 -1
- package/locale/en/SX/unitfmt.json +1 -1
- package/locale/en/SZ/dateformats.json +1 -1
- package/locale/en/SZ/sysres.json +1 -1
- package/locale/en/SZ/unitfmt.json +1 -1
- package/locale/en/TC/dateformats.json +1 -1
- package/locale/en/TC/sysres.json +1 -1
- package/locale/en/TC/unitfmt.json +1 -1
- package/locale/en/TK/dateformats.json +1 -1
- package/locale/en/TK/sysres.json +1 -1
- package/locale/en/TK/unitfmt.json +1 -1
- package/locale/en/TO/dateformats.json +1 -1
- package/locale/en/TO/sysres.json +1 -1
- package/locale/en/TO/unitfmt.json +1 -1
- package/locale/en/TT/dateformats.json +1 -1
- package/locale/en/TT/sysres.json +1 -1
- package/locale/en/TT/unitfmt.json +1 -1
- package/locale/en/TV/dateformats.json +1 -1
- package/locale/en/TV/sysres.json +1 -1
- package/locale/en/TV/unitfmt.json +1 -1
- package/locale/en/TZ/dateformats.json +1 -1
- package/locale/en/TZ/sysres.json +1 -1
- package/locale/en/TZ/unitfmt.json +1 -1
- package/locale/en/UG/dateformats.json +1 -1
- package/locale/en/UG/sysres.json +1 -1
- package/locale/en/UG/unitfmt.json +1 -1
- package/locale/en/UM/unitfmt.json +1 -1
- package/locale/en/VC/dateformats.json +1 -1
- package/locale/en/VC/sysres.json +1 -1
- package/locale/en/VC/unitfmt.json +1 -1
- package/locale/en/VG/dateformats.json +1 -1
- package/locale/en/VG/sysres.json +1 -1
- package/locale/en/VG/unitfmt.json +1 -1
- package/locale/en/VI/unitfmt.json +1 -1
- package/locale/en/VU/dateformats.json +1 -1
- package/locale/en/VU/sysres.json +1 -1
- package/locale/en/VU/unitfmt.json +1 -1
- package/locale/en/WS/dateformats.json +1 -1
- package/locale/en/WS/sysres.json +1 -1
- package/locale/en/WS/unitfmt.json +1 -1
- package/locale/en/ZA/dateformats.json +1 -1
- package/locale/en/ZA/sysres.json +1 -1
- package/locale/en/ZA/unitfmt.json +1 -1
- package/locale/en/ZM/dateformats.json +1 -1
- package/locale/en/ZM/sysres.json +1 -1
- package/locale/en/ZM/unitfmt.json +1 -1
- package/locale/en/ZW/dateformats.json +1 -1
- package/locale/en/ZW/sysres.json +1 -1
- package/locale/en/ZW/unitfmt.json +1 -1
- package/locale/en/dateformats.json +1 -1
- package/locale/en/sysres.json +1 -1
- package/locale/en/unitfmt.json +1 -1
- package/locale/es/419/dateformats.json +1 -1
- package/locale/es/419/sysres.json +1 -1
- package/locale/es/419/unitfmt.json +1 -1
- package/locale/es/AR/dateformats.json +1 -1
- package/locale/es/AR/sysres.json +1 -1
- package/locale/es/AR/unitfmt.json +1 -1
- package/locale/es/BO/dateformats.json +1 -1
- package/locale/es/BO/sysres.json +1 -1
- package/locale/es/BO/unitfmt.json +1 -1
- package/locale/es/BR/dateformats.json +1 -1
- package/locale/es/BR/sysres.json +1 -1
- package/locale/es/BR/unitfmt.json +1 -1
- package/locale/es/BZ/dateformats.json +1 -1
- package/locale/es/BZ/sysres.json +1 -1
- package/locale/es/BZ/unitfmt.json +1 -1
- package/locale/es/CL/dateformats.json +1 -1
- package/locale/es/CL/sysres.json +1 -1
- package/locale/es/CL/unitfmt.json +1 -1
- package/locale/es/CO/dateformats.json +1 -1
- package/locale/es/CO/sysres.json +1 -1
- package/locale/es/CO/unitfmt.json +1 -1
- package/locale/es/CR/dateformats.json +1 -1
- package/locale/es/CR/sysres.json +1 -1
- package/locale/es/CR/unitfmt.json +1 -1
- package/locale/es/CU/dateformats.json +1 -1
- package/locale/es/CU/sysres.json +1 -1
- package/locale/es/CU/unitfmt.json +1 -1
- package/locale/es/DO/dateformats.json +1 -1
- package/locale/es/DO/sysres.json +1 -1
- package/locale/es/DO/unitfmt.json +1 -1
- package/locale/es/EA/dateformats.json +1 -1
- package/locale/es/EA/unitfmt.json +1 -1
- package/locale/es/EC/dateformats.json +1 -1
- package/locale/es/EC/sysres.json +1 -1
- package/locale/es/EC/unitfmt.json +1 -1
- package/locale/es/GQ/dateformats.json +1 -1
- package/locale/es/GQ/unitfmt.json +1 -1
- package/locale/es/GT/dateformats.json +1 -1
- package/locale/es/GT/sysres.json +1 -1
- package/locale/es/GT/unitfmt.json +1 -1
- package/locale/es/HN/dateformats.json +1 -1
- package/locale/es/HN/sysres.json +1 -1
- package/locale/es/HN/unitfmt.json +1 -1
- package/locale/es/IC/dateformats.json +1 -1
- package/locale/es/IC/unitfmt.json +1 -1
- package/locale/es/MX/dateformats.json +1 -1
- package/locale/es/MX/sysres.json +1 -1
- package/locale/es/MX/unitfmt.json +1 -1
- package/locale/es/NI/dateformats.json +1 -1
- package/locale/es/NI/sysres.json +1 -1
- package/locale/es/NI/unitfmt.json +1 -1
- package/locale/es/PA/dateformats.json +1 -1
- package/locale/es/PA/sysres.json +1 -1
- package/locale/es/PA/unitfmt.json +1 -1
- package/locale/es/PE/dateformats.json +1 -1
- package/locale/es/PE/sysres.json +1 -1
- package/locale/es/PE/unitfmt.json +1 -1
- package/locale/es/PH/dateformats.json +1 -1
- package/locale/es/PH/unitfmt.json +1 -1
- package/locale/es/PR/dateformats.json +1 -1
- package/locale/es/PR/sysres.json +1 -1
- package/locale/es/PR/unitfmt.json +1 -1
- package/locale/es/PY/dateformats.json +1 -1
- package/locale/es/PY/sysres.json +1 -1
- package/locale/es/PY/unitfmt.json +1 -1
- package/locale/es/SV/dateformats.json +1 -1
- package/locale/es/SV/sysres.json +1 -1
- package/locale/es/SV/unitfmt.json +1 -1
- package/locale/es/US/dateformats.json +1 -1
- package/locale/es/US/list.json +1 -0
- package/locale/es/US/sysres.json +1 -1
- package/locale/es/US/unitfmt.json +1 -1
- package/locale/es/UY/dateformats.json +1 -1
- package/locale/es/UY/sysres.json +1 -1
- package/locale/es/UY/unitfmt.json +1 -1
- package/locale/es/VE/dateformats.json +1 -1
- package/locale/es/VE/sysres.json +1 -1
- package/locale/es/VE/unitfmt.json +1 -1
- package/locale/es/dateformats.json +1 -1
- package/locale/es/plurals.json +1 -1
- package/locale/es/sysres.json +1 -1
- package/locale/es/unitfmt.json +1 -1
- package/locale/et/dateformats.json +1 -1
- package/locale/et/sysres.json +1 -1
- package/locale/et/unitfmt.json +1 -1
- package/locale/eu/dateformats.json +1 -1
- package/locale/eu/sysres.json +1 -1
- package/locale/eu/unitfmt.json +1 -1
- package/locale/fa/AF/dateformats.json +1 -1
- package/locale/fa/AF/sysres.json +1 -1
- package/locale/fa/AF/unitfmt.json +1 -1
- package/locale/fa/dateformats.json +1 -1
- package/locale/fa/list.json +1 -1
- package/locale/fa/sysres.json +1 -1
- package/locale/fa/unitfmt.json +1 -1
- package/locale/fi/dateformats.json +1 -1
- package/locale/fi/sysres.json +1 -1
- package/locale/fi/unitfmt.json +1 -1
- package/locale/fr/BE/dateformats.json +1 -1
- package/locale/fr/BE/unitfmt.json +1 -1
- package/locale/fr/BF/dateformats.json +1 -1
- package/locale/fr/BF/unitfmt.json +1 -1
- package/locale/fr/BI/dateformats.json +1 -1
- package/locale/fr/BI/unitfmt.json +1 -1
- package/locale/fr/BJ/dateformats.json +1 -1
- package/locale/fr/BJ/unitfmt.json +1 -1
- package/locale/fr/BL/dateformats.json +1 -1
- package/locale/fr/BL/unitfmt.json +1 -1
- package/locale/fr/CA/dateformats.json +1 -1
- package/locale/fr/CA/unitfmt.json +1 -1
- package/locale/fr/CD/dateformats.json +1 -1
- package/locale/fr/CD/unitfmt.json +1 -1
- package/locale/fr/CF/dateformats.json +1 -1
- package/locale/fr/CF/unitfmt.json +1 -1
- package/locale/fr/CG/dateformats.json +1 -1
- package/locale/fr/CG/unitfmt.json +1 -1
- package/locale/fr/CH/dateformats.json +1 -1
- package/locale/fr/CH/unitfmt.json +1 -1
- package/locale/fr/CI/dateformats.json +1 -1
- package/locale/fr/CI/unitfmt.json +1 -1
- package/locale/fr/CM/dateformats.json +1 -1
- package/locale/fr/CM/unitfmt.json +1 -1
- package/locale/fr/DJ/dateformats.json +1 -1
- package/locale/fr/DJ/unitfmt.json +1 -1
- package/locale/fr/DZ/dateformats.json +1 -1
- package/locale/fr/DZ/unitfmt.json +1 -1
- package/locale/fr/GA/dateformats.json +1 -1
- package/locale/fr/GA/unitfmt.json +1 -1
- package/locale/fr/GF/dateformats.json +1 -1
- package/locale/fr/GF/unitfmt.json +1 -1
- package/locale/fr/GN/dateformats.json +1 -1
- package/locale/fr/GN/unitfmt.json +1 -1
- package/locale/fr/GP/dateformats.json +1 -1
- package/locale/fr/GP/unitfmt.json +1 -1
- package/locale/fr/GQ/dateformats.json +1 -1
- package/locale/fr/GQ/unitfmt.json +1 -1
- package/locale/fr/HT/dateformats.json +1 -1
- package/locale/fr/HT/unitfmt.json +1 -1
- package/locale/fr/KM/dateformats.json +1 -1
- package/locale/fr/KM/unitfmt.json +1 -1
- package/locale/fr/LU/dateformats.json +1 -1
- package/locale/fr/LU/unitfmt.json +1 -1
- package/locale/fr/MA/dateformats.json +1 -1
- package/locale/fr/MA/unitfmt.json +1 -1
- package/locale/fr/MC/dateformats.json +1 -1
- package/locale/fr/MC/unitfmt.json +1 -1
- package/locale/fr/MF/dateformats.json +1 -1
- package/locale/fr/MF/unitfmt.json +1 -1
- package/locale/fr/MG/dateformats.json +1 -1
- package/locale/fr/MG/unitfmt.json +1 -1
- package/locale/fr/ML/dateformats.json +1 -1
- package/locale/fr/ML/unitfmt.json +1 -1
- package/locale/fr/MQ/dateformats.json +1 -1
- package/locale/fr/MQ/unitfmt.json +1 -1
- package/locale/fr/MR/dateformats.json +1 -1
- package/locale/fr/MR/unitfmt.json +1 -1
- package/locale/fr/MU/dateformats.json +1 -1
- package/locale/fr/MU/unitfmt.json +1 -1
- package/locale/fr/NC/dateformats.json +1 -1
- package/locale/fr/NC/unitfmt.json +1 -1
- package/locale/fr/NE/dateformats.json +1 -1
- package/locale/fr/NE/unitfmt.json +1 -1
- package/locale/fr/PF/dateformats.json +1 -1
- package/locale/fr/PF/unitfmt.json +1 -1
- package/locale/fr/PM/dateformats.json +1 -1
- package/locale/fr/PM/unitfmt.json +1 -1
- package/locale/fr/RE/dateformats.json +1 -1
- package/locale/fr/RE/unitfmt.json +1 -1
- package/locale/fr/RW/dateformats.json +1 -1
- package/locale/fr/RW/unitfmt.json +1 -1
- package/locale/fr/SC/dateformats.json +1 -1
- package/locale/fr/SC/unitfmt.json +1 -1
- package/locale/fr/SN/dateformats.json +1 -1
- package/locale/fr/SN/unitfmt.json +1 -1
- package/locale/fr/SY/dateformats.json +1 -1
- package/locale/fr/SY/unitfmt.json +1 -1
- package/locale/fr/TD/dateformats.json +1 -1
- package/locale/fr/TD/unitfmt.json +1 -1
- package/locale/fr/TG/dateformats.json +1 -1
- package/locale/fr/TG/unitfmt.json +1 -1
- package/locale/fr/TN/dateformats.json +1 -1
- package/locale/fr/TN/unitfmt.json +1 -1
- package/locale/fr/VU/dateformats.json +1 -1
- package/locale/fr/VU/unitfmt.json +1 -1
- package/locale/fr/WF/dateformats.json +1 -1
- package/locale/fr/WF/unitfmt.json +1 -1
- package/locale/fr/YT/dateformats.json +1 -1
- package/locale/fr/YT/unitfmt.json +1 -1
- package/locale/fr/dateformats.json +1 -1
- package/locale/fr/plurals.json +1 -1
- package/locale/fr/sysres.json +1 -1
- package/locale/fr/unitfmt.json +1 -1
- package/locale/ga/GB/unitfmt.json +1 -1
- package/locale/ga/dateformats.json +1 -1
- package/locale/ga/list.json +1 -1
- package/locale/ga/sysres.json +1 -1
- package/locale/ga/unitfmt.json +1 -1
- package/locale/gl/dateformats.json +1 -1
- package/locale/gl/sysres.json +1 -1
- package/locale/gl/unitfmt.json +1 -1
- package/locale/gu/dateformats.json +1 -1
- package/locale/gu/sysres.json +1 -1
- package/locale/gu/unitfmt.json +1 -1
- package/locale/ha/GH/dateformats.json +1 -1
- package/locale/ha/GH/unitfmt.json +1 -1
- package/locale/ha/NE/dateformats.json +1 -1
- package/locale/ha/NE/unitfmt.json +1 -1
- package/locale/ha/dateformats.json +1 -1
- package/locale/ha/list.json +1 -1
- package/locale/ha/sysres.json +1 -1
- package/locale/ha/unitfmt.json +1 -1
- package/locale/he/dateformats.json +1 -1
- package/locale/he/sysres.json +1 -1
- package/locale/he/unitfmt.json +1 -1
- package/locale/hi/dateformats.json +1 -1
- package/locale/hi/sysres.json +1 -1
- package/locale/hi/unitfmt.json +1 -1
- package/locale/hr/BA/dateformats.json +1 -1
- package/locale/hr/BA/unitfmt.json +1 -1
- package/locale/hr/dateformats.json +1 -1
- package/locale/hr/localeinfo.json +1 -1
- package/locale/hr/sysres.json +1 -1
- package/locale/hr/unitfmt.json +1 -1
- package/locale/hu/dateformats.json +1 -1
- package/locale/hu/sysres.json +1 -1
- package/locale/hu/unitfmt.json +1 -1
- package/locale/hy/dateformats.json +1 -1
- package/locale/hy/sysres.json +1 -1
- package/locale/hy/unitfmt.json +1 -1
- package/locale/id/dateformats.json +1 -1
- package/locale/id/sysres.json +1 -1
- package/locale/id/unitfmt.json +1 -1
- package/locale/ilibmanifest.json +1 -1
- package/locale/is/dateformats.json +1 -1
- package/locale/is/sysres.json +1 -1
- package/locale/is/unitfmt.json +1 -1
- package/locale/it/CH/dateformats.json +1 -1
- package/locale/it/CH/unitfmt.json +1 -1
- package/locale/it/SM/unitfmt.json +1 -1
- package/locale/it/VA/unitfmt.json +1 -1
- package/locale/it/dateformats.json +1 -1
- package/locale/it/plurals.json +1 -1
- package/locale/it/sysres.json +1 -1
- package/locale/it/unitfmt.json +1 -1
- package/locale/ja/dateformats.json +1 -1
- package/locale/ja/sysres.json +1 -1
- package/locale/ja/unitfmt.json +1 -1
- package/locale/ka/dateformats.json +1 -1
- package/locale/ka/sysres.json +1 -1
- package/locale/ka/unitfmt.json +1 -1
- package/locale/kk/dateformats.json +1 -1
- package/locale/kk/sysres.json +1 -1
- package/locale/kk/unitfmt.json +1 -1
- package/locale/km/dateformats.json +1 -1
- package/locale/km/sysres.json +1 -1
- package/locale/km/unitfmt.json +1 -1
- package/locale/kn/dateformats.json +1 -1
- package/locale/kn/sysres.json +1 -1
- package/locale/kn/unitfmt.json +1 -1
- package/locale/ko/KP/unitfmt.json +1 -1
- package/locale/ko/dateformats.json +1 -1
- package/locale/ko/sysres.json +1 -1
- package/locale/ko/unitfmt.json +1 -1
- package/locale/ku/dateformats.json +1 -1
- package/locale/ku/unitfmt.json +1 -1
- package/locale/ky/dateformats.json +1 -1
- package/locale/ky/list.json +1 -1
- package/locale/ky/sysres.json +1 -1
- package/locale/ky/unitfmt.json +1 -1
- package/locale/lo/dateformats.json +1 -1
- package/locale/lo/list.json +1 -1
- package/locale/lo/sysres.json +1 -1
- package/locale/lo/unitfmt.json +1 -1
- package/locale/localematch.json +1 -1
- package/locale/lt/dateformats.json +1 -1
- package/locale/lt/sysres.json +1 -1
- package/locale/lt/unitfmt.json +1 -1
- package/locale/lv/dateformats.json +1 -1
- package/locale/lv/sysres.json +1 -1
- package/locale/lv/unitfmt.json +1 -1
- package/locale/mk/dateformats.json +1 -1
- package/locale/mk/sysres.json +1 -1
- package/locale/mk/unitfmt.json +1 -1
- package/locale/ml/dateformats.json +1 -1
- package/locale/ml/list.json +1 -1
- package/locale/ml/sysres.json +1 -1
- package/locale/ml/unitfmt.json +1 -1
- package/locale/mn/dateformats.json +1 -1
- package/locale/mn/sysres.json +1 -1
- package/locale/mn/unitfmt.json +1 -1
- package/locale/mr/dateformats.json +1 -1
- package/locale/mr/list.json +1 -1
- package/locale/mr/sysres.json +1 -1
- package/locale/mr/unitfmt.json +1 -1
- package/locale/ms/BN/dateformats.json +1 -1
- package/locale/ms/BN/unitfmt.json +1 -1
- package/locale/ms/ID/dateformats.json +1 -0
- package/locale/ms/ID/localeinfo.json +1 -0
- package/locale/ms/ID/unitfmt.json +1 -0
- package/locale/ms/SG/unitfmt.json +1 -1
- package/locale/ms/dateformats.json +1 -1
- package/locale/ms/sysres.json +1 -1
- package/locale/ms/unitfmt.json +1 -1
- package/locale/mt/dateformats.json +1 -1
- package/locale/mt/sysres.json +1 -1
- package/locale/mt/unitfmt.json +1 -1
- package/locale/my/dateformats.json +1 -1
- package/locale/my/list.json +1 -1
- package/locale/my/sysres.json +1 -1
- package/locale/my/unitfmt.json +1 -1
- package/locale/nb/SJ/dateformats.json +1 -1
- package/locale/nb/SJ/unitfmt.json +1 -1
- package/locale/nb/dateformats.json +1 -1
- package/locale/nb/localeinfo.json +1 -1
- package/locale/nb/sysres.json +1 -1
- package/locale/nb/unitfmt.json +1 -1
- package/locale/ne/IN/unitfmt.json +1 -1
- package/locale/ne/dateformats.json +1 -1
- package/locale/ne/sysres.json +1 -1
- package/locale/ne/unitfmt.json +1 -1
- package/locale/nfkd/Latn.json +1 -1
- package/locale/nfkd/all.json +1 -1
- package/locale/nl/AW/unitfmt.json +1 -1
- package/locale/nl/BE/dateformats.json +1 -1
- package/locale/nl/BE/unitfmt.json +1 -1
- package/locale/nl/BQ/unitfmt.json +1 -1
- package/locale/nl/CW/unitfmt.json +1 -1
- package/locale/nl/SR/unitfmt.json +1 -1
- package/locale/nl/SX/unitfmt.json +1 -1
- package/locale/nl/dateformats.json +1 -1
- package/locale/nl/localeinfo.json +1 -1
- package/locale/nl/sysres.json +1 -1
- package/locale/nl/unitfmt.json +1 -1
- package/locale/or/dateformats.json +1 -1
- package/locale/or/sysres.json +1 -1
- package/locale/or/unitfmt.json +1 -1
- package/locale/pa/Arab/dateformats.json +1 -1
- package/locale/pa/Arab/list.json +1 -1
- package/locale/pa/Arab/sysres.json +1 -1
- package/locale/pa/Arab/unitfmt.json +1 -1
- package/locale/pa/Guru/dateformats.json +1 -1
- package/locale/pa/Guru/unitfmt.json +1 -1
- package/locale/pa/dateformats.json +1 -1
- package/locale/pa/list.json +1 -1
- package/locale/pa/sysres.json +1 -1
- package/locale/pa/unitfmt.json +1 -1
- package/locale/pl/dateformats.json +1 -1
- package/locale/pl/sysres.json +1 -1
- package/locale/pl/unitfmt.json +1 -1
- package/locale/pt/AO/dateformats.json +1 -1
- package/locale/pt/AO/sysres.json +1 -1
- package/locale/pt/AO/unitfmt.json +1 -1
- package/locale/pt/CH/dateformats.json +1 -1
- package/locale/pt/CH/sysres.json +1 -1
- package/locale/pt/CH/unitfmt.json +1 -1
- package/locale/pt/CV/dateformats.json +1 -1
- package/locale/pt/CV/sysres.json +1 -1
- package/locale/pt/CV/unitfmt.json +1 -1
- package/locale/pt/GQ/dateformats.json +1 -1
- package/locale/pt/GQ/sysres.json +1 -1
- package/locale/pt/GQ/unitfmt.json +1 -1
- package/locale/pt/GW/dateformats.json +1 -1
- package/locale/pt/GW/sysres.json +1 -1
- package/locale/pt/GW/unitfmt.json +1 -1
- package/locale/pt/LU/dateformats.json +1 -1
- package/locale/pt/LU/sysres.json +1 -1
- package/locale/pt/LU/unitfmt.json +1 -1
- package/locale/pt/MO/dateformats.json +1 -1
- package/locale/pt/MO/sysres.json +1 -1
- package/locale/pt/MO/unitfmt.json +1 -1
- package/locale/pt/MZ/dateformats.json +1 -1
- package/locale/pt/MZ/sysres.json +1 -1
- package/locale/pt/MZ/unitfmt.json +1 -1
- package/locale/pt/PT/dateformats.json +1 -1
- package/locale/pt/PT/plurals.json +1 -1
- package/locale/pt/PT/sysres.json +1 -1
- package/locale/pt/PT/unitfmt.json +1 -1
- package/locale/pt/ST/dateformats.json +1 -1
- package/locale/pt/ST/sysres.json +1 -1
- package/locale/pt/ST/unitfmt.json +1 -1
- package/locale/pt/TL/dateformats.json +1 -1
- package/locale/pt/TL/sysres.json +1 -1
- package/locale/pt/TL/unitfmt.json +1 -1
- package/locale/pt/dateformats.json +1 -1
- package/locale/pt/plurals.json +1 -1
- package/locale/pt/sysres.json +1 -1
- package/locale/pt/unitfmt.json +1 -1
- package/locale/rangeToScript.json +1 -1
- package/locale/ro/MD/unitfmt.json +1 -1
- package/locale/ro/dateformats.json +1 -1
- package/locale/ro/sysres.json +1 -1
- package/locale/ro/unitfmt.json +1 -1
- package/locale/ru/BY/dateformats.json +1 -1
- package/locale/ru/BY/unitfmt.json +1 -1
- package/locale/ru/KG/dateformats.json +1 -1
- package/locale/ru/KG/unitfmt.json +1 -1
- package/locale/ru/KZ/dateformats.json +1 -1
- package/locale/ru/KZ/unitfmt.json +1 -1
- package/locale/ru/MD/dateformats.json +1 -1
- package/locale/ru/MD/unitfmt.json +1 -1
- package/locale/ru/UA/dateformats.json +1 -1
- package/locale/ru/UA/unitfmt.json +1 -1
- package/locale/ru/dateformats.json +1 -1
- package/locale/ru/sysres.json +1 -1
- package/locale/ru/unitfmt.json +1 -1
- package/locale/scriptToRange.json +1 -1
- package/locale/scripts.json +1 -1
- package/locale/si/dateformats.json +1 -1
- package/locale/si/sysres.json +1 -1
- package/locale/si/unitfmt.json +1 -1
- package/locale/sk/dateformats.json +1 -1
- package/locale/sk/sysres.json +1 -1
- package/locale/sk/unitfmt.json +1 -1
- package/locale/sl/dateformats.json +1 -1
- package/locale/sl/sysres.json +1 -1
- package/locale/sl/unitfmt.json +1 -1
- package/locale/sq/MK/unitfmt.json +1 -1
- package/locale/sq/XK/unitfmt.json +1 -1
- package/locale/sq/dateformats.json +1 -1
- package/locale/sq/sysres.json +1 -1
- package/locale/sq/unitfmt.json +1 -1
- package/locale/sr/Cyrl/BA/dateformats.json +1 -1
- package/locale/sr/Cyrl/BA/sysres.json +1 -1
- package/locale/sr/Cyrl/BA/unitfmt.json +1 -1
- package/locale/sr/Cyrl/ME/dateformats.json +1 -1
- package/locale/sr/Cyrl/ME/sysres.json +1 -1
- package/locale/sr/Cyrl/ME/unitfmt.json +1 -1
- package/locale/sr/Cyrl/XK/dateformats.json +1 -1
- package/locale/sr/Cyrl/XK/unitfmt.json +1 -1
- package/locale/sr/Cyrl/dateformats.json +1 -1
- package/locale/sr/Cyrl/unitfmt.json +1 -1
- package/locale/sr/Latn/BA/dateformats.json +1 -1
- package/locale/sr/Latn/BA/sysres.json +1 -1
- package/locale/sr/Latn/BA/unitfmt.json +1 -1
- package/locale/sr/Latn/ME/dateformats.json +1 -1
- package/locale/sr/Latn/ME/sysres.json +1 -1
- package/locale/sr/Latn/ME/unitfmt.json +1 -1
- package/locale/sr/Latn/XK/dateformats.json +1 -1
- package/locale/sr/Latn/XK/unitfmt.json +1 -1
- package/locale/sr/Latn/dateformats.json +1 -1
- package/locale/sr/Latn/sysres.json +1 -1
- package/locale/sr/Latn/unitfmt.json +1 -1
- package/locale/sr/dateformats.json +1 -1
- package/locale/sr/sysres.json +1 -1
- package/locale/sr/unitfmt.json +1 -1
- package/locale/sv/AX/unitfmt.json +1 -1
- package/locale/sv/FI/unitfmt.json +1 -1
- package/locale/sv/dateformats.json +1 -1
- package/locale/sv/list.json +1 -1
- package/locale/sv/sysres.json +1 -1
- package/locale/sv/unitfmt.json +1 -1
- package/locale/sw/CD/unitfmt.json +1 -1
- package/locale/sw/KE/unitfmt.json +1 -1
- package/locale/sw/UG/unitfmt.json +1 -1
- package/locale/sw/dateformats.json +1 -1
- package/locale/sw/sysres.json +1 -1
- package/locale/sw/unitfmt.json +1 -1
- package/locale/ta/LK/dateformats.json +1 -1
- package/locale/ta/LK/unitfmt.json +1 -1
- package/locale/ta/MY/dateformats.json +1 -1
- package/locale/ta/MY/unitfmt.json +1 -1
- package/locale/ta/SG/dateformats.json +1 -1
- package/locale/ta/SG/unitfmt.json +1 -1
- package/locale/ta/dateformats.json +1 -1
- package/locale/ta/sysres.json +1 -1
- package/locale/ta/unitfmt.json +1 -1
- package/locale/te/dateformats.json +1 -1
- package/locale/te/sysres.json +1 -1
- package/locale/te/unitfmt.json +1 -1
- package/locale/tg/dateformats.json +1 -1
- package/locale/tg/sysres.json +1 -1
- package/locale/th/dateformats.json +1 -1
- package/locale/th/sysres.json +1 -1
- package/locale/th/unitfmt.json +1 -1
- package/locale/tk/dateformats.json +1 -1
- package/locale/tk/sysres.json +1 -1
- package/locale/tk/unitfmt.json +1 -1
- package/locale/tr/CY/dateformats.json +1 -1
- package/locale/tr/CY/unitfmt.json +1 -1
- package/locale/tr/dateformats.json +1 -1
- package/locale/tr/sysres.json +1 -1
- package/locale/tr/unitfmt.json +1 -1
- package/locale/uk/dateformats.json +1 -1
- package/locale/uk/sysres.json +1 -1
- package/locale/uk/unitfmt.json +1 -1
- package/locale/und/AU/localeinfo.json +1 -1
- package/locale/und/GB/localeinfo.json +1 -1
- package/locale/und/dateformats.json +1 -0
- package/locale/und/sysres.json +1 -0
- package/locale/unitfmt.json +1 -1
- package/locale/ur/IN/sysres.json +1 -1
- package/locale/ur/IN/unitfmt.json +1 -1
- package/locale/ur/dateformats.json +1 -1
- package/locale/ur/sysres.json +1 -1
- package/locale/ur/unitfmt.json +1 -1
- package/locale/uz/Arab/dateformats.json +1 -1
- package/locale/uz/Arab/sysres.json +1 -1
- package/locale/uz/Arab/unitfmt.json +1 -1
- package/locale/uz/Cyrl/dateformats.json +1 -1
- package/locale/uz/Cyrl/sysres.json +1 -1
- package/locale/uz/Cyrl/unitfmt.json +1 -1
- package/locale/uz/Latn/dateformats.json +1 -1
- package/locale/uz/Latn/sysres.json +1 -1
- package/locale/uz/Latn/unitfmt.json +1 -1
- package/locale/uz/dateformats.json +1 -1
- package/locale/uz/sysres.json +1 -1
- package/locale/uz/unitfmt.json +1 -1
- package/locale/vi/dateformats.json +1 -1
- package/locale/vi/sysres.json +1 -1
- package/locale/vi/unitfmt.json +1 -1
- package/locale/wo/dateformats.json +1 -1
- package/locale/wo/sysres.json +1 -1
- package/locale/wo/unitfmt.json +1 -1
- package/locale/zh/Hans/HK/dateformats.json +1 -1
- package/locale/zh/Hans/HK/localeinfo.json +1 -0
- package/locale/zh/Hans/HK/unitfmt.json +1 -1
- package/locale/zh/Hans/MO/dateformats.json +1 -1
- package/locale/zh/Hans/MO/localeinfo.json +1 -0
- package/locale/zh/Hans/MO/unitfmt.json +1 -1
- package/locale/zh/Hans/SG/dateformats.json +1 -1
- package/locale/zh/Hans/SG/localeinfo.json +1 -0
- package/locale/zh/Hans/SG/unitfmt.json +1 -1
- package/locale/zh/Hans/dateformats.json +1 -1
- package/locale/zh/Hans/unitfmt.json +1 -1
- package/locale/zh/Hant/HK/dateformats.json +1 -1
- package/locale/zh/Hant/HK/localeinfo.json +1 -1
- package/locale/zh/Hant/HK/unitfmt.json +1 -1
- package/locale/zh/Hant/MO/dateformats.json +1 -1
- package/locale/zh/Hant/MO/localeinfo.json +1 -1
- package/locale/zh/Hant/MO/unitfmt.json +1 -1
- package/locale/zh/Hant/dateformats.json +1 -1
- package/locale/zh/Hant/sysres.json +1 -1
- package/locale/zh/Hant/unitfmt.json +1 -1
- package/locale/zh/dateformats.json +1 -1
- package/locale/zh/sysres.json +1 -1
- package/locale/zh/unitfmt.json +1 -1
- package/locale/zoneinfo/Africa/Asmera.json +1 -1
- package/locale/zoneinfo/Africa/Casablanca.json +1 -1
- package/locale/zoneinfo/Africa/El_Aaiun.json +1 -1
- package/locale/zoneinfo/Africa/Juba.json +1 -1
- package/locale/zoneinfo/America/Atikokan.json +1 -1
- package/locale/zoneinfo/America/Buenos_Aires.json +1 -1
- package/locale/zoneinfo/America/Campo_Grande.json +1 -1
- package/locale/zoneinfo/America/Catamarca.json +1 -1
- package/locale/zoneinfo/America/Coral_Harbour.json +1 -1
- package/locale/zoneinfo/America/Cordoba.json +1 -1
- package/locale/zoneinfo/America/Cuiaba.json +1 -1
- package/locale/zoneinfo/America/Indianapolis.json +1 -1
- package/locale/zoneinfo/America/Jujuy.json +1 -1
- package/locale/zoneinfo/America/Louisville.json +1 -1
- package/locale/zoneinfo/America/Mendoza.json +1 -1
- package/locale/zoneinfo/America/Montreal.json +1 -1
- package/locale/zoneinfo/America/Sao_Paulo.json +1 -1
- package/locale/zoneinfo/Asia/Gaza.json +1 -1
- package/locale/zoneinfo/Asia/Hebron.json +1 -1
- package/locale/zoneinfo/Asia/Saigon.json +1 -1
- package/locale/zoneinfo/Asia/Tehran.json +1 -1
- package/locale/zoneinfo/Australia/Currie.json +1 -1
- package/locale/zoneinfo/Brazil/East.json +1 -1
- package/locale/zoneinfo/Pacific/Enderbury.json +1 -1
- package/locale/zoneinfo/Pacific/Johnston.json +1 -1
- package/locale/zoneinfo/Pacific/Kanton.json +1 -0
- package/locale/zoneinfo/zonetab.json +1 -1
- package/locale/zu/dateformats.json +1 -1
- package/locale/zu/sysres.json +1 -1
- package/package.json +8 -8
- package/lib/externs.js +0 -24
package/index.js
CHANGED
|
@@ -1,50 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* index.js - top level entry point for ilib
|
|
3
|
-
*
|
|
4
|
-
* Copyright © 2018 JEDLSoft
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
*
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
var ilib = require("./lib/ilib.js");
|
|
21
|
-
|
|
22
|
-
if (!ilib._platform || (typeof(ilib._dyndata) !== 'boolean' && typeof(ilib._dyncode) !== 'boolean')) {
|
|
23
|
-
if (typeof(__webpack_require__) !== 'undefined') {
|
|
24
|
-
require("./lib/ilib-webpack.js");
|
|
25
|
-
} else {
|
|
26
|
-
switch (ilib._getPlatform()) {
|
|
27
|
-
case 'webos-webapp':
|
|
28
|
-
break;
|
|
29
|
-
case 'webos':
|
|
30
|
-
case 'nodejs':
|
|
31
|
-
require("./lib/ilib-node.js");
|
|
32
|
-
break;
|
|
33
|
-
case 'qt':
|
|
34
|
-
require("./lib/ilib-qt.js");
|
|
35
|
-
break;
|
|
36
|
-
case 'rhino':
|
|
37
|
-
require("./lib/ilib-rhino.js");
|
|
38
|
-
break;
|
|
39
|
-
case 'ringo':
|
|
40
|
-
require("./lib/ilib-ringo.js");
|
|
41
|
-
break;
|
|
42
|
-
default:
|
|
43
|
-
ilib._dyncode = false;
|
|
44
|
-
ilib._dyndata = false;
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
module.exports = ilib;
|
|
1
|
+
var ilib=require("./lib/ilib.js");if(!ilib._platform||"boolean"!=typeof ilib._dyndata&&"boolean"!=typeof ilib._dyncode)if("undefined"!=typeof __webpack_require__)require("./lib/ilib-webpack.js");else switch(ilib._getPlatform()){case"webos-webapp":break;case"webos":case"nodejs":require("./lib/ilib-node.js");break;case"qt":require("./lib/ilib-qt.js");break;case"rhino":require("./lib/ilib-rhino.js");break;case"ringo":require("./lib/ilib-ringo.js");break;default:ilib._dyncode=!1,ilib._dyndata=!1}module.exports=ilib;
|
package/lib/Address.js
CHANGED
|
@@ -1,613 +1,2 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Address.js - Represent a mailing address
|
|
3
|
-
*
|
|
4
|
-
* Copyright © 2013-2015, 2018, JEDLSoft
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
*
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/*globals console RegExp */
|
|
21
|
-
|
|
22
1
|
// !data address countries nativecountries ctrynames
|
|
23
|
-
|
|
24
|
-
var ilib = require("../index.js");
|
|
25
|
-
var Utils = require("./Utils.js");
|
|
26
|
-
var JSUtils = require("./JSUtils.js");
|
|
27
|
-
var Locale = require("./Locale.js");
|
|
28
|
-
var CType = require("./CType.js");
|
|
29
|
-
var isIdeo = require("./isIdeo.js");
|
|
30
|
-
var isAscii = require("./isAscii.js");
|
|
31
|
-
var isDigit = require("./isDigit.js");
|
|
32
|
-
var IString = require("./IString.js");
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @class
|
|
36
|
-
* Create a new Address instance and parse a physical address.<p>
|
|
37
|
-
*
|
|
38
|
-
* This function parses a physical address written in a free-form string.
|
|
39
|
-
* It returns an object with a number of properties from the list below
|
|
40
|
-
* that it may have extracted from that address.<p>
|
|
41
|
-
*
|
|
42
|
-
* The following is a list of properties that the algorithm will return:<p>
|
|
43
|
-
*
|
|
44
|
-
* <ul>
|
|
45
|
-
* <li><i>streetAddress</i>: The street address, including house numbers and all.
|
|
46
|
-
* <li><i>locality</i>: The locality of this address (usually a city or town).
|
|
47
|
-
* <li><i>region</i>: The region where the locality is located. In the US, this
|
|
48
|
-
* corresponds to states. In other countries, this may be provinces,
|
|
49
|
-
* cantons, prefectures, etc. In some smaller countries, there are no
|
|
50
|
-
* such divisions.
|
|
51
|
-
* <li><i>postalCode</i>: Country-specific code for expediting mail. In the US,
|
|
52
|
-
* this is the zip code.
|
|
53
|
-
* <li><i>country</i>: The country of the address.
|
|
54
|
-
* <li><i>countryCode</i>: The ISO 3166 2-letter region code for the destination
|
|
55
|
-
* country in this address.
|
|
56
|
-
* </ul>
|
|
57
|
-
*
|
|
58
|
-
* The above properties will not necessarily appear in the instance. For
|
|
59
|
-
* any individual property, if the free-form address does not contain
|
|
60
|
-
* that property or it cannot be parsed out, the it is left out.<p>
|
|
61
|
-
*
|
|
62
|
-
* The options parameter may contain any of the following properties:
|
|
63
|
-
*
|
|
64
|
-
* <ul>
|
|
65
|
-
* <li><i>locale</i> - locale or localeSpec to use to parse the address. If not
|
|
66
|
-
* specified, this function will use the current ilib locale
|
|
67
|
-
*
|
|
68
|
-
* <li><i>onLoad</i> - a callback function to call when the address info for the
|
|
69
|
-
* locale is fully loaded and the address has been parsed. When the onLoad
|
|
70
|
-
* option is given, the address object
|
|
71
|
-
* will attempt to load any missing locale data using the ilib loader callback.
|
|
72
|
-
* When the constructor is done (even if the data is already preassembled), the
|
|
73
|
-
* onLoad function is called with the current instance as a parameter, so this
|
|
74
|
-
* callback can be used with preassembled or dynamic loading or a mix of the two.
|
|
75
|
-
*
|
|
76
|
-
* <li><i>sync</i> - tell whether to load any missing locale data synchronously or
|
|
77
|
-
* asynchronously. If this option is given as "false", then the "onLoad"
|
|
78
|
-
* callback must be given, as the instance returned from this constructor will
|
|
79
|
-
* not be usable for a while.
|
|
80
|
-
*
|
|
81
|
-
* <li><i>loadParams</i> - an object containing parameters to pass to the
|
|
82
|
-
* loader callback function when locale data is missing. The parameters are not
|
|
83
|
-
* interpretted or modified in any way. They are simply passed along. The object
|
|
84
|
-
* may contain any property/value pairs as long as the calling code is in
|
|
85
|
-
* agreement with the loader callback function as to what those parameters mean.
|
|
86
|
-
* </ul>
|
|
87
|
-
*
|
|
88
|
-
* When an address cannot be parsed properly, the entire address will be placed
|
|
89
|
-
* into the streetAddress property.<p>
|
|
90
|
-
*
|
|
91
|
-
* When the freeformAddress is another Address, this will act like a copy
|
|
92
|
-
* constructor.<p>
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* @constructor
|
|
96
|
-
* @param {string|Address} freeformAddress free-form address to parse, or a
|
|
97
|
-
* javascript object containing the fields
|
|
98
|
-
* @param {Object} options options to the parser
|
|
99
|
-
*/
|
|
100
|
-
var Address = function (freeformAddress, options) {
|
|
101
|
-
var address;
|
|
102
|
-
|
|
103
|
-
if (!freeformAddress) {
|
|
104
|
-
return undefined;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
this.sync = true;
|
|
108
|
-
this.loadParams = {};
|
|
109
|
-
|
|
110
|
-
if (options) {
|
|
111
|
-
if (options.locale) {
|
|
112
|
-
this.locale = (typeof(options.locale) === 'string') ? new Locale(options.locale) : options.locale;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (typeof(options.sync) !== 'undefined') {
|
|
116
|
-
this.sync = !!options.sync;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (options.loadParams) {
|
|
120
|
-
this.loadParams = options.loadParams;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
this.locale = this.locale || new Locale();
|
|
125
|
-
// initialize from an already parsed object
|
|
126
|
-
if (typeof(freeformAddress) === 'object') {
|
|
127
|
-
/**
|
|
128
|
-
* The street address, including house numbers and all.
|
|
129
|
-
* @type {string|undefined}
|
|
130
|
-
*/
|
|
131
|
-
this.streetAddress = freeformAddress.streetAddress;
|
|
132
|
-
/**
|
|
133
|
-
* The locality of this address (usually a city or town).
|
|
134
|
-
* @type {string|undefined}
|
|
135
|
-
*/
|
|
136
|
-
this.locality = freeformAddress.locality;
|
|
137
|
-
/**
|
|
138
|
-
* The region (province, canton, prefecture, state, etc.) where the address is located.
|
|
139
|
-
* @type {string|undefined}
|
|
140
|
-
*/
|
|
141
|
-
this.region = freeformAddress.region;
|
|
142
|
-
/**
|
|
143
|
-
* Country-specific code for expediting mail. In the US, this is the zip code.
|
|
144
|
-
* @type {string|undefined}
|
|
145
|
-
*/
|
|
146
|
-
this.postalCode = freeformAddress.postalCode;
|
|
147
|
-
/**
|
|
148
|
-
* Optional city-specific code for a particular post office, used to expidite
|
|
149
|
-
* delivery.
|
|
150
|
-
* @type {string|undefined}
|
|
151
|
-
*/
|
|
152
|
-
this.postOffice = freeformAddress.postOffice;
|
|
153
|
-
/**
|
|
154
|
-
* The country of the address.
|
|
155
|
-
* @type {string|undefined}
|
|
156
|
-
*/
|
|
157
|
-
this.country = freeformAddress.country;
|
|
158
|
-
if (freeformAddress.countryCode) {
|
|
159
|
-
/**
|
|
160
|
-
* The 2 or 3 letter ISO 3166 region code for the destination country in this address.
|
|
161
|
-
* @type {string}
|
|
162
|
-
*/
|
|
163
|
-
this.countryCode = freeformAddress.countryCode;
|
|
164
|
-
}
|
|
165
|
-
if (freeformAddress.format) {
|
|
166
|
-
/**
|
|
167
|
-
* private
|
|
168
|
-
* @type {string}
|
|
169
|
-
*/
|
|
170
|
-
this.format = freeformAddress.format;
|
|
171
|
-
}
|
|
172
|
-
return this;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
address = freeformAddress.replace(/[ \t\r]+/g, " ").trim();
|
|
176
|
-
address = address.replace(/[\s\n]+$/, "");
|
|
177
|
-
address = address.replace(/^[\s\n]+/, "");
|
|
178
|
-
//console.log("\n\n-------------\nAddress is '" + address + "'");
|
|
179
|
-
|
|
180
|
-
this.lines = address.split(/[,,\n]/g);
|
|
181
|
-
this.removeEmptyLines(this.lines);
|
|
182
|
-
|
|
183
|
-
isAscii._init(this.sync, this.loadParams, ilib.bind(this, function() {
|
|
184
|
-
isIdeo._init(this.sync, this.loadParams, ilib.bind(this, function() {
|
|
185
|
-
isDigit._init(this.sync, this.loadParams, ilib.bind(this, function() {
|
|
186
|
-
if (typeof(ilib.data.nativecountries) === 'undefined') {
|
|
187
|
-
Utils.loadData({
|
|
188
|
-
object: "Address",
|
|
189
|
-
name: "nativecountries.json", // countries in their own language
|
|
190
|
-
locale: "-", // only need to load the root file
|
|
191
|
-
nonlocale: true,
|
|
192
|
-
sync: this.sync,
|
|
193
|
-
loadParams: this.loadParams,
|
|
194
|
-
callback: ilib.bind(this, function(nativecountries) {
|
|
195
|
-
ilib.data.nativecountries = nativecountries;
|
|
196
|
-
this._loadCountries(options && options.onLoad);
|
|
197
|
-
})
|
|
198
|
-
});
|
|
199
|
-
} else {
|
|
200
|
-
this._loadCountries(options && options.onLoad);
|
|
201
|
-
}
|
|
202
|
-
}));
|
|
203
|
-
}));
|
|
204
|
-
}));
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
/** @protected */
|
|
208
|
-
Address.prototype = {
|
|
209
|
-
/**
|
|
210
|
-
* @private
|
|
211
|
-
*/
|
|
212
|
-
_loadCountries: function(onLoad) {
|
|
213
|
-
if (typeof(ilib.data.countries) === 'undefined') {
|
|
214
|
-
Utils.loadData({
|
|
215
|
-
object: "Address",
|
|
216
|
-
name: "countries.json", // countries in English
|
|
217
|
-
locale: "-", // only need to load the root file
|
|
218
|
-
nonlocale: true,
|
|
219
|
-
sync: this.sync,
|
|
220
|
-
loadParams: this.loadParams,
|
|
221
|
-
callback: ilib.bind(this, function(countries) {
|
|
222
|
-
ilib.data.countries = countries;
|
|
223
|
-
this._loadCtrynames(onLoad);
|
|
224
|
-
})
|
|
225
|
-
});
|
|
226
|
-
} else {
|
|
227
|
-
this._loadCtrynames(onLoad);
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @private
|
|
233
|
-
*/
|
|
234
|
-
_loadCtrynames: function(onLoad) {
|
|
235
|
-
Utils.loadData({
|
|
236
|
-
name: "ctrynames.json",
|
|
237
|
-
object: "Address",
|
|
238
|
-
locale: this.locale,
|
|
239
|
-
sync: this.sync,
|
|
240
|
-
loadParams: JSUtils.merge(this.loadParams, {returnOne: true}),
|
|
241
|
-
callback: ilib.bind(this, function(ctrynames) {
|
|
242
|
-
this.ctrynames = ctrynames;
|
|
243
|
-
this._determineDest(ctrynames, onLoad);
|
|
244
|
-
})
|
|
245
|
-
});
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* @private
|
|
250
|
-
* @param {Object?} ctrynames
|
|
251
|
-
*/
|
|
252
|
-
_findDest: function (ctrynames) {
|
|
253
|
-
var match;
|
|
254
|
-
|
|
255
|
-
for (var countryName in ctrynames) {
|
|
256
|
-
if (countryName && countryName !== "generated") {
|
|
257
|
-
// find the longest match in the current table
|
|
258
|
-
// ctrynames contains the country names mapped to region code
|
|
259
|
-
// for efficiency, only test for things longer than the current match
|
|
260
|
-
if (!match || match.text.length < countryName.length) {
|
|
261
|
-
var temp = this._findCountry(countryName);
|
|
262
|
-
if (temp) {
|
|
263
|
-
match = temp;
|
|
264
|
-
this.country = match.text;
|
|
265
|
-
this.countryCode = ctrynames[countryName];
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return match;
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* @private
|
|
275
|
-
* @param {Object?} localizedCountries
|
|
276
|
-
* @param {function(Address):undefined} callback
|
|
277
|
-
*/
|
|
278
|
-
_determineDest: function (localizedCountries, callback) {
|
|
279
|
-
var match;
|
|
280
|
-
|
|
281
|
-
/*
|
|
282
|
-
* First, find the name of the destination country, as that determines how to parse
|
|
283
|
-
* the rest of the address. For any address, there are three possible ways
|
|
284
|
-
* that the name of the country could be written:
|
|
285
|
-
* 1. In the current language
|
|
286
|
-
* 2. In its own native language
|
|
287
|
-
* 3. In English
|
|
288
|
-
* We'll try all three.
|
|
289
|
-
*/
|
|
290
|
-
var tables = [];
|
|
291
|
-
if (localizedCountries) {
|
|
292
|
-
tables.push(localizedCountries);
|
|
293
|
-
}
|
|
294
|
-
tables.push(ilib.data.nativecountries);
|
|
295
|
-
tables.push(ilib.data.countries);
|
|
296
|
-
|
|
297
|
-
for (var i = 0; i < tables.length; i++) {
|
|
298
|
-
match = this._findDest(tables[i]);
|
|
299
|
-
|
|
300
|
-
if (match) {
|
|
301
|
-
this.lines[match.line] = this.lines[match.line].substring(0, match.start) + this.lines[match.line].substring(match.start + match.text.length);
|
|
302
|
-
|
|
303
|
-
this._init(callback);
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// no country, so try parsing it as if we were in the same country
|
|
309
|
-
this.country = undefined;
|
|
310
|
-
this.countryCode = this.locale.getRegion();
|
|
311
|
-
this._init(callback);
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* @private
|
|
316
|
-
* @param {function(Address):undefined} callback
|
|
317
|
-
*/
|
|
318
|
-
_init: function(callback) {
|
|
319
|
-
Utils.loadData({
|
|
320
|
-
object: "Address",
|
|
321
|
-
locale: new Locale(this.countryCode),
|
|
322
|
-
name: "address.json",
|
|
323
|
-
sync: this.sync,
|
|
324
|
-
loadParams: this.loadParams,
|
|
325
|
-
callback: ilib.bind(this, function(info) {
|
|
326
|
-
if (!info || JSUtils.isEmpty(info) || !info.fields) {
|
|
327
|
-
// load the "unknown" locale instead
|
|
328
|
-
Utils.loadData({
|
|
329
|
-
object: "Address",
|
|
330
|
-
locale: new Locale("XX"),
|
|
331
|
-
name: "address.json",
|
|
332
|
-
sync: this.sync,
|
|
333
|
-
loadParams: this.loadParams,
|
|
334
|
-
callback: ilib.bind(this, function(info) {
|
|
335
|
-
this.info = info;
|
|
336
|
-
this._parseAddress();
|
|
337
|
-
if (typeof(callback) === 'function') {
|
|
338
|
-
callback(this);
|
|
339
|
-
}
|
|
340
|
-
})
|
|
341
|
-
});
|
|
342
|
-
} else {
|
|
343
|
-
this.info = info;
|
|
344
|
-
this._parseAddress();
|
|
345
|
-
if (typeof(callback) === 'function') {
|
|
346
|
-
callback(this);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
})
|
|
350
|
-
});
|
|
351
|
-
},
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* @private
|
|
355
|
-
*/
|
|
356
|
-
_parseAddress: function() {
|
|
357
|
-
// clean it up first
|
|
358
|
-
var i,
|
|
359
|
-
asianChars = 0,
|
|
360
|
-
latinChars = 0,
|
|
361
|
-
startAt,
|
|
362
|
-
infoFields,
|
|
363
|
-
field,
|
|
364
|
-
pattern,
|
|
365
|
-
matchFunction,
|
|
366
|
-
match,
|
|
367
|
-
fieldNumber;
|
|
368
|
-
|
|
369
|
-
// for locales that support both latin and asian character addresses,
|
|
370
|
-
// decide if we are parsing an asian or latin script address
|
|
371
|
-
if (this.info && this.info.multiformat) {
|
|
372
|
-
for (var j = 0; j < this.lines.length; j++) {
|
|
373
|
-
var line = new IString(this.lines[j]);
|
|
374
|
-
var it = line.charIterator();
|
|
375
|
-
while (it.hasNext()) {
|
|
376
|
-
var c = it.next();
|
|
377
|
-
if (isIdeo(c) ||
|
|
378
|
-
CType.withinRange(c, "hangul") ||
|
|
379
|
-
CType.withinRange(c, 'katakana') ||
|
|
380
|
-
CType.withinRange(c, 'hiragana') ||
|
|
381
|
-
CType.withinRange(c, 'bopomofo')) {
|
|
382
|
-
asianChars++;
|
|
383
|
-
} else if (isAscii(c) && !isDigit(c)) {
|
|
384
|
-
latinChars++;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
this.format = (asianChars >= latinChars) ? "asian" : "latin";
|
|
390
|
-
startAt = this.info.startAt[this.format];
|
|
391
|
-
infoFields = this.info.fields[this.format];
|
|
392
|
-
// //console.log("multiformat locale: format is now " + this.format);
|
|
393
|
-
} else {
|
|
394
|
-
startAt = (this.info && this.info.startAt) || "end";
|
|
395
|
-
infoFields = (this.info && this.info.fields) || [];
|
|
396
|
-
}
|
|
397
|
-
this.compare = (startAt === "end") ? this.endsWith : this.startsWith;
|
|
398
|
-
|
|
399
|
-
//console.log("this.lines is: " + JSON.stringify(this.lines));
|
|
400
|
-
|
|
401
|
-
for (i = 0; i < infoFields.length && this.lines.length > 0; i++) {
|
|
402
|
-
field = infoFields[i];
|
|
403
|
-
this.removeEmptyLines(this.lines);
|
|
404
|
-
//console.log("Searching for field " + field.name);
|
|
405
|
-
if (field.pattern) {
|
|
406
|
-
if (typeof(field.pattern) === 'string') {
|
|
407
|
-
pattern = new RegExp(field.pattern, "img");
|
|
408
|
-
matchFunction = this.matchRegExp;
|
|
409
|
-
} else {
|
|
410
|
-
pattern = field.pattern;
|
|
411
|
-
matchFunction = this.matchPattern;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
switch (field.line) {
|
|
415
|
-
case 'startAtFirst':
|
|
416
|
-
for (fieldNumber = 0; fieldNumber < this.lines.length; fieldNumber++) {
|
|
417
|
-
match = matchFunction(this, this.lines[fieldNumber], pattern, field.matchGroup, startAt);
|
|
418
|
-
if (match) {
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
break;
|
|
423
|
-
case 'startAtLast':
|
|
424
|
-
for (fieldNumber = this.lines.length-1; fieldNumber >= 0; fieldNumber--) {
|
|
425
|
-
match = matchFunction(this, this.lines[fieldNumber], pattern, field.matchGroup, startAt);
|
|
426
|
-
if (match) {
|
|
427
|
-
break;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
break;
|
|
431
|
-
case 'first':
|
|
432
|
-
fieldNumber = 0;
|
|
433
|
-
match = matchFunction(this, this.lines[fieldNumber], pattern, field.matchGroup, startAt);
|
|
434
|
-
break;
|
|
435
|
-
case 'last':
|
|
436
|
-
default:
|
|
437
|
-
fieldNumber = this.lines.length - 1;
|
|
438
|
-
match = matchFunction(this, this.lines[fieldNumber], pattern, field.matchGroup, startAt);
|
|
439
|
-
break;
|
|
440
|
-
}
|
|
441
|
-
if (match) {
|
|
442
|
-
// //console.log("found match for " + field.name + ": " + JSON.stringify(match));
|
|
443
|
-
// //console.log("remaining line is " + match.line);
|
|
444
|
-
this.lines[fieldNumber] = match.line;
|
|
445
|
-
this[field.name] = match.match;
|
|
446
|
-
}
|
|
447
|
-
} else {
|
|
448
|
-
// if nothing is given, default to taking the whole field
|
|
449
|
-
this[field.name] = this.lines.splice(fieldNumber,1)[0].trim();
|
|
450
|
-
//console.log("typeof(this[field.name]) is " + typeof(this[field.name]) + " and value is " + JSON.stringify(this[field.name]));
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
// all the left overs go in the street address field
|
|
455
|
-
this.removeEmptyLines(this.lines);
|
|
456
|
-
if (this.lines.length > 0) {
|
|
457
|
-
//console.log("this.lines is " + JSON.stringify(this.lines) + " and splicing to get streetAddress");
|
|
458
|
-
// Korea uses spaces between words, despite being an "asian" locale
|
|
459
|
-
var joinString = (this.info.joinString && this.info.joinString[this.format]) || ((this.format && this.format === "asian") ? "" : ", ");
|
|
460
|
-
this.streetAddress = this.lines.join(joinString).trim();
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
this.lines = undefined;
|
|
464
|
-
//console.log("final result is " + JSON.stringify(this));
|
|
465
|
-
},
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* @protected
|
|
469
|
-
* Find the named country either at the end or the beginning of the address.
|
|
470
|
-
*/
|
|
471
|
-
_findCountry: function(name) {
|
|
472
|
-
var start = -1, match, line = 0;
|
|
473
|
-
|
|
474
|
-
if (this.lines.length > 0) {
|
|
475
|
-
start = this.startsWith(this.lines[line], name);
|
|
476
|
-
if (start === -1) {
|
|
477
|
-
line = this.lines.length-1;
|
|
478
|
-
start = this.endsWith(this.lines[line], name);
|
|
479
|
-
}
|
|
480
|
-
if (start !== -1) {
|
|
481
|
-
match = {
|
|
482
|
-
text: this.lines[line].substring(start, start + name.length),
|
|
483
|
-
line: line,
|
|
484
|
-
start: start
|
|
485
|
-
};
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
return match;
|
|
490
|
-
},
|
|
491
|
-
|
|
492
|
-
endsWith: function (subject, query) {
|
|
493
|
-
var start = subject.length-query.length,
|
|
494
|
-
i,
|
|
495
|
-
pat;
|
|
496
|
-
//console.log("endsWith: checking " + query + " against " + subject);
|
|
497
|
-
for (i = 0; i < query.length; i++) {
|
|
498
|
-
// TODO: use case mapper instead of toLowerCase()
|
|
499
|
-
if (subject.charAt(start+i).toLowerCase() !== query.charAt(i).toLowerCase()) {
|
|
500
|
-
return -1;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
if (start > 0) {
|
|
504
|
-
pat = /\s/;
|
|
505
|
-
if (!pat.test(subject.charAt(start-1))) {
|
|
506
|
-
// make sure if we are not at the beginning of the string, that the match is
|
|
507
|
-
// not the end of some other word
|
|
508
|
-
return -1;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
return start;
|
|
512
|
-
},
|
|
513
|
-
|
|
514
|
-
startsWith: function (subject, query) {
|
|
515
|
-
var i;
|
|
516
|
-
// //console.log("startsWith: checking " + query + " against " + subject);
|
|
517
|
-
for (i = 0; i < query.length; i++) {
|
|
518
|
-
// TODO: use case mapper instead of toLowerCase()
|
|
519
|
-
if (subject.charAt(i).toLowerCase() !== query.charAt(i).toLowerCase()) {
|
|
520
|
-
return -1;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
return 0;
|
|
524
|
-
},
|
|
525
|
-
|
|
526
|
-
removeEmptyLines: function (arr) {
|
|
527
|
-
var i = 0;
|
|
528
|
-
|
|
529
|
-
while (i < arr.length) {
|
|
530
|
-
if (arr[i]) {
|
|
531
|
-
arr[i] = arr[i].trim();
|
|
532
|
-
if (arr[i].length === 0) {
|
|
533
|
-
arr.splice(i,1);
|
|
534
|
-
} else {
|
|
535
|
-
i++;
|
|
536
|
-
}
|
|
537
|
-
} else {
|
|
538
|
-
arr.splice(i,1);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
matchRegExp: function(address, line, expression, matchGroup, startAt) {
|
|
544
|
-
var lastMatch,
|
|
545
|
-
match,
|
|
546
|
-
ret = {},
|
|
547
|
-
last;
|
|
548
|
-
|
|
549
|
-
//console.log("searching for regexp " + expression.source + " in line " + line);
|
|
550
|
-
|
|
551
|
-
match = expression.exec(line);
|
|
552
|
-
if (startAt === 'end') {
|
|
553
|
-
while (match !== null && match.length > 0) {
|
|
554
|
-
//console.log("found matches " + JSON.stringify(match));
|
|
555
|
-
lastMatch = match;
|
|
556
|
-
match = expression.exec(line);
|
|
557
|
-
}
|
|
558
|
-
match = lastMatch;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
if (match && match !== null) {
|
|
562
|
-
//console.log("found matches " + JSON.stringify(match));
|
|
563
|
-
matchGroup = matchGroup || 0;
|
|
564
|
-
if (match[matchGroup] !== undefined) {
|
|
565
|
-
ret.match = match[matchGroup].trim();
|
|
566
|
-
ret.match = ret.match.replace(/^\-|\-+$/, '');
|
|
567
|
-
ret.match = ret.match.replace(/\s+$/, '');
|
|
568
|
-
last = (startAt === 'end') ? line.lastIndexOf(match[matchGroup]) : line.indexOf(match[matchGroup]);
|
|
569
|
-
//console.log("last is " + last);
|
|
570
|
-
ret.line = line.slice(0,last);
|
|
571
|
-
if (address.format !== "asian") {
|
|
572
|
-
ret.line += " ";
|
|
573
|
-
}
|
|
574
|
-
ret.line += line.slice(last+match[matchGroup].length);
|
|
575
|
-
ret.line = ret.line.trim();
|
|
576
|
-
//console.log("found match " + ret.match + " from matchgroup " + matchGroup + " and rest of line is " + ret.line);
|
|
577
|
-
return ret;
|
|
578
|
-
}
|
|
579
|
-
//} else {
|
|
580
|
-
//console.log("no match");
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
return undefined;
|
|
584
|
-
},
|
|
585
|
-
|
|
586
|
-
matchPattern: function(address, line, pattern, matchGroup) {
|
|
587
|
-
var start,
|
|
588
|
-
j,
|
|
589
|
-
ret = {};
|
|
590
|
-
|
|
591
|
-
//console.log("searching in line " + line);
|
|
592
|
-
|
|
593
|
-
// search an array of possible fixed strings
|
|
594
|
-
//console.log("Using fixed set of strings.");
|
|
595
|
-
for (j = 0; j < pattern.length; j++) {
|
|
596
|
-
start = address.compare(line, pattern[j]);
|
|
597
|
-
if (start !== -1) {
|
|
598
|
-
ret.match = line.substring(start, start+pattern[j].length);
|
|
599
|
-
if (start !== 0) {
|
|
600
|
-
ret.line = line.substring(0,start).trim();
|
|
601
|
-
} else {
|
|
602
|
-
ret.line = line.substring(pattern[j].length).trim();
|
|
603
|
-
}
|
|
604
|
-
//console.log("found match " + ret.match + " and rest of line is " + ret.line);
|
|
605
|
-
return ret;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
return undefined;
|
|
610
|
-
}
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
module.exports = Address;
|
|
2
|
+
var ilib=require("../index.js"),Utils=require("./Utils.js"),JSUtils=require("./JSUtils.js"),Locale=require("./Locale.js"),CType=require("./CType.js"),isIdeo=require("./isIdeo.js"),isAscii=require("./isAscii.js"),isDigit=require("./isDigit.js"),IString=require("./IString.js"),Address=function(freeformAddress,options){var address;if(freeformAddress){if(this.sync=!0,this.loadParams={},options&&(options.locale&&(this.locale="string"==typeof options.locale?new Locale(options.locale):options.locale),void 0!==options.sync&&(this.sync=!!options.sync),options.loadParams&&(this.loadParams=options.loadParams)),this.locale=this.locale||new Locale(),"object"==typeof freeformAddress)return this.streetAddress=freeformAddress.streetAddress,this.locality=freeformAddress.locality,this.region=freeformAddress.region,this.postalCode=freeformAddress.postalCode,this.postOffice=freeformAddress.postOffice,this.country=freeformAddress.country,freeformAddress.countryCode&&(this.countryCode=freeformAddress.countryCode),freeformAddress.format&&(this.format=freeformAddress.format),this;address=(address=(address=freeformAddress.replace(/[ \t\r]+/g," ").trim()).replace(/[\s\n]+$/,"")).replace(/^[\s\n]+/,""),this.lines=address.split(/[,,\n]/g),this.removeEmptyLines(this.lines),isAscii._init(this.sync,this.loadParams,ilib.bind(this,function(){isIdeo._init(this.sync,this.loadParams,ilib.bind(this,function(){isDigit._init(this.sync,this.loadParams,ilib.bind(this,function(){void 0===ilib.data.nativecountries?Utils.loadData({object:"Address",name:"nativecountries.json",locale:"-",nonlocale:!0,sync:this.sync,loadParams:this.loadParams,callback:ilib.bind(this,function(nativecountries){ilib.data.nativecountries=nativecountries,this._loadCountries(options&&options.onLoad)})}):this._loadCountries(options&&options.onLoad)}))}))}))}};Address.prototype={_loadCountries:function(onLoad){void 0===ilib.data.countries?Utils.loadData({object:"Address",name:"countries.json",locale:"-",nonlocale:!0,sync:this.sync,loadParams:this.loadParams,callback:ilib.bind(this,function(countries){ilib.data.countries=countries,this._loadCtrynames(onLoad)})}):this._loadCtrynames(onLoad)},_loadCtrynames:function(onLoad){Utils.loadData({name:"ctrynames.json",object:"Address",locale:this.locale,sync:this.sync,loadParams:JSUtils.merge(this.loadParams,{returnOne:!0}),callback:ilib.bind(this,function(ctrynames){this.ctrynames=ctrynames,this._determineDest(ctrynames,onLoad)})})},_findDest:function(ctrynames){var match;for(var countryName in ctrynames)if(countryName&&"generated"!==countryName&&(!match||match.text.length<countryName.length)){var temp=this._findCountry(countryName);temp&&(match=temp,this.country=match.text,this.countryCode=ctrynames[countryName])}return match},_determineDest:function(localizedCountries,callback){var match,tables=[];localizedCountries&&tables.push(localizedCountries),tables.push(ilib.data.nativecountries),tables.push(ilib.data.countries);for(var i=0;i<tables.length;i++)if(match=this._findDest(tables[i]))return this.lines[match.line]=this.lines[match.line].substring(0,match.start)+this.lines[match.line].substring(match.start+match.text.length),void this._init(callback);this.country=void 0,this.countryCode=this.locale.getRegion(),this._init(callback)},_init:function(callback){Utils.loadData({object:"Address",locale:new Locale(this.countryCode),name:"address.json",sync:this.sync,loadParams:this.loadParams,callback:ilib.bind(this,function(info){info&&!JSUtils.isEmpty(info)&&info.fields?(this.info=info,this._parseAddress(),"function"==typeof callback&&callback(this)):Utils.loadData({object:"Address",locale:new Locale("XX"),name:"address.json",sync:this.sync,loadParams:this.loadParams,callback:ilib.bind(this,function(info){this.info=info,this._parseAddress(),"function"==typeof callback&&callback(this)})})})})},_parseAddress:function(){var i,startAt,infoFields,field,pattern,matchFunction,match,fieldNumber,asianChars=0,latinChars=0;if(this.info&&this.info.multiformat){for(var j=0;j<this.lines.length;j++)for(var it=new IString(this.lines[j]).charIterator();it.hasNext();){var c=it.next();isIdeo(c)||CType.withinRange(c,"hangul")||CType.withinRange(c,"katakana")||CType.withinRange(c,"hiragana")||CType.withinRange(c,"bopomofo")?asianChars++:isAscii(c)&&!isDigit(c)&&latinChars++}this.format=latinChars<=asianChars?"asian":"latin",startAt=this.info.startAt[this.format],infoFields=this.info.fields[this.format]}else startAt=this.info&&this.info.startAt||"end",infoFields=this.info&&this.info.fields||[];for(this.compare="end"===startAt?this.endsWith:this.startsWith,i=0;i<infoFields.length&&0<this.lines.length;i++)if(field=infoFields[i],this.removeEmptyLines(this.lines),field.pattern){switch("string"==typeof field.pattern?(pattern=new RegExp(field.pattern,"img"),matchFunction=this.matchRegExp):(pattern=field.pattern,matchFunction=this.matchPattern),field.line){case"startAtFirst":for(fieldNumber=0;fieldNumber<this.lines.length&&!(match=matchFunction(this,this.lines[fieldNumber],pattern,field.matchGroup,startAt));fieldNumber++);break;case"startAtLast":for(fieldNumber=this.lines.length-1;0<=fieldNumber&&!(match=matchFunction(this,this.lines[fieldNumber],pattern,field.matchGroup,startAt));fieldNumber--);break;case"first":fieldNumber=0,match=matchFunction(this,this.lines[fieldNumber],pattern,field.matchGroup,startAt);break;case"last":default:fieldNumber=this.lines.length-1,match=matchFunction(this,this.lines[fieldNumber],pattern,field.matchGroup,startAt)}match&&(this.lines[fieldNumber]=match.line,this[field.name]=match.match)}else this[field.name]=this.lines.splice(fieldNumber,1)[0].trim();if(this.removeEmptyLines(this.lines),0<this.lines.length){var joinString=this.info.joinString&&this.info.joinString[this.format]||(this.format&&"asian"===this.format?"":", ");this.streetAddress=this.lines.join(joinString).trim()}this.lines=void 0},_findCountry:function(name){var match,start=-1,line=0;return 0<this.lines.length&&(-1===(start=this.startsWith(this.lines[line],name))&&(line=this.lines.length-1,start=this.endsWith(this.lines[line],name)),-1!==start&&(match={text:this.lines[line].substring(start,start+name.length),line:line,start:start})),match},endsWith:function(subject,query){var i,start=subject.length-query.length;for(i=0;i<query.length;i++)if(subject.charAt(start+i).toLowerCase()!==query.charAt(i).toLowerCase())return-1;return 0<start&&!/\s/.test(subject.charAt(start-1))?-1:start},startsWith:function(subject,query){var i;for(i=0;i<query.length;i++)if(subject.charAt(i).toLowerCase()!==query.charAt(i).toLowerCase())return-1;return 0},removeEmptyLines:function(arr){for(var i=0;i<arr.length;)arr[i]?(arr[i]=arr[i].trim(),0===arr[i].length?arr.splice(i,1):i++):arr.splice(i,1)},matchRegExp:function(address,line,expression,matchGroup,startAt){var lastMatch,match,last,ret={};if(match=expression.exec(line),"end"===startAt){for(;null!==match&&0<match.length;)lastMatch=match,match=expression.exec(line);match=lastMatch}if(match&&null!==match&&void 0!==match[matchGroup=matchGroup||0])return ret.match=match[matchGroup].trim(),ret.match=ret.match.replace(/^\-|\-+$/,""),ret.match=ret.match.replace(/\s+$/,""),last="end"===startAt?line.lastIndexOf(match[matchGroup]):line.indexOf(match[matchGroup]),ret.line=line.slice(0,last),"asian"!==address.format&&(ret.line+=" "),ret.line+=line.slice(last+match[matchGroup].length),ret.line=ret.line.trim(),ret},matchPattern:function(address,line,pattern,matchGroup){var start,j,ret={};for(j=0;j<pattern.length;j++)if(-1!==(start=address.compare(line,pattern[j])))return ret.match=line.substring(start,start+pattern[j].length),ret.line=0!==start?line.substring(0,start).trim():line.substring(pattern[j].length).trim(),ret}},module.exports=Address;
|