localBadiDate-msm-locales.min.mjs.map 183 KB

1
  1. {"version":3,"file":"localBadiDate-msm-locales.min.m.js","sources":["../node_modules/meeussunmoon/dist/meeussunmoon.m.js","../src/locale/en.ts","../src/locale/ar.ts","../src/badiLocale.ts","../src/locale/de.ts","../src/locale/es.ts","../src/locale/fa.ts","../src/locale/fr.ts","../src/locale/lv.ts","../src/locale/nl.ts","../src/locale/pt.ts","../src/locale/ru.ts","../src/locale/sv.ts","../src/locale/zh.ts","../src/locale/en-us.ts","../src/formatter.ts","../src/badiYears.ts","../src/badiDate.ts","../src/clockLocations.ts","../src/localBadiDate.ts"],"sourcesContent":["/**\n * @license MeeusSunMoon v3.0.0\n * (c) 2018 Jan Greis\n * licensed under MIT\n */\n\nimport { DateTime } from 'luxon';\n\n/**\n * Converts angles in degrees to radians.\n * @param {number} deg Angle in degrees.\n * @returns {number} Angle in radians.\n */\nconst deg2rad = (deg) => deg * 0.017453292519943295;\n/**\n * Converts angles in radians to degrees.\n * @param {number} rad Angle in radians.\n * @returns {number} Angle in degrees.\n */\nconst rad2deg = (rad) => rad * 57.29577951308232;\n/**\n * Calculates the sine of an angle given in degrees.\n * @param {number} deg Angle in degrees.\n * @returns {number} Sine of the angle.\n */\nconst sind = (deg) => Math.sin(deg2rad(deg));\n/**\n * Calculates the cosine of an angle given in degrees.\n * @param {number} deg Angle in degrees.\n * @returns {number} Cosine of the angle.\n */\nconst cosd = (deg) => Math.cos(deg2rad(deg));\n/**\n * Reduces an angle to the interval 0-360°.\n * @param {number} angle Angle in degrees.\n * @returns {number} Reduced angle in degrees.\n */\nconst reduceAngle = (angle) => angle - (360 * Math.floor(angle / 360));\n/**\n * Evaluates a polynomial in the form A + Bx + Cx^2...\n * @param {number} variable Value of x in the polynomial.\n * @param {array} coeffs Array of coefficients [A, B, C...].\n * @returns {number} Sum of the polynomial.\n */\nconst polynomial = (variable, coeffs) => {\n let varPower = 1;\n let sum = 0.0;\n const numCoeffs = coeffs.length;\n for (let i = 0; i < numCoeffs; i++) {\n sum += varPower * coeffs[i];\n varPower *= variable;\n }\n return sum;\n};\n/**\n * Interpolates a value from 3 known values (see AA p24 Eq3.3).\n * @param {number} y1 Start value of the interval.\n * @param {number} y2 Middle value of the interval.\n * @param {number} y3 End value of the interval.\n * @param {number} n Location (-0.5 >= n >= 0.5) of result in the interval.\n * @param {boolean} normalize Whether the final result should be normalized.\n * @returns {number} Interpolated result.\n */\nconst interpolateFromThree = (y1, y2, y3, n, normalize = false) => {\n let a = y2 - y1;\n let b = y3 - y2;\n if (typeof normalize !== 'undefined' && normalize) {\n if (a < 0) {\n a += 360;\n }\n if (b < 0) {\n b += 360;\n }\n }\n const c = b - a;\n return y2 + (n / 2) * (a + b + n * c);\n};\n\n/**\n * Converts a datetime in UTC to the corresponding Julian Date (see AA p60f).\n * @param {DateTime} datetime Datetime to be converted.\n * @returns {number} Julian date (fractional number of days since 1 January\n * 4713BC according to the proleptic Julian calendar.\n */\nconst datetimeToJD = (datetime) => {\n let Y = datetime.year;\n let M = datetime.month;\n const D = datetime.day + (datetime.hour + (datetime.minute + datetime.second / 60) / 60) / 24;\n if (M < 3) {\n Y -= 1;\n M += 12;\n }\n const A = Math.floor(Y / 100);\n // Need a different B if we are before introduction of the Gregorian Calendar\n const gregorianCutoff = DateTime.fromISO('1582-10-15T12:00:00Z', { zone: 'UTC' });\n let B = 0;\n if (datetime > gregorianCutoff) {\n B = 2 - A + Math.floor(A / 4);\n }\n return Math.floor(365.25 * (Y + 4716)) + Math.floor(30.6001 * (M + 1)) + D + B - 1524.5;\n};\n/**\n * Converts a Julian Date to the corresponding datetime in UTC (see AA p63).\n * @param {number} JD Julian date to be converted\n * @returns {DateTime} Datetime corresponding to the given Julian date.\n */\nconst JDToDatetime = (JD) => {\n JD += 0.5;\n const Z = Math.floor(JD);\n const F = JD - Z;\n let A = Z;\n if (Z >= 2299161) {\n const alpha = Math.floor((Z - 1867216.25) / 36524.25);\n A += 1 + alpha - Math.floor(alpha / 4);\n }\n const B = A + 1524;\n const C = Math.floor((B - 122.1) / 365.25);\n const D = Math.floor(365.25 * C);\n const E = Math.floor((B - D) / 30.6001);\n const fracDay = B - D - Math.floor(30.6001 * E) + F;\n const day = Math.floor(fracDay);\n const hour = Math.floor((fracDay - day) * 24);\n const minute = Math.floor(((fracDay - day) * 24 - hour) * 60);\n const second = Math.floor((((fracDay - day) * 24 - hour) * 60 - minute) * 60);\n let month = E - 1;\n if (E > 13) {\n month -= 12;\n }\n let year = C - 4715;\n if (month > 2) {\n year -= 1;\n }\n return DateTime.fromISO('2000-01-01T12:00:00Z', { zone: 'UTC' })\n // eslint-disable-next-line sort-keys\n .set({ year, month, day, hour, minute, second });\n};\n/**\n * Converts a Julian date to the number of Julian centuries since\n * 2000-01-01T12:00:00Z (see AA p87 Eq12.1).\n * @param {number} JD Julian date.\n * @returns {number} T.\n */\nconst JDToT = (JD) => (JD - 2451545) / 36525;\n/**\n * Converts a datetime in UTC to the number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {DateTime} datetime Datetime to be converted.\n * @returns {number} T.\n */\nconst datetimeToT = (datetime) => JDToT(datetimeToJD(datetime));\n/* eslint-disable complexity */\n/**\n * Calculates the value of ΔT=TT−UT (see\n * http://eclipse.gsfc.nasa.gov/SEcat5/deltatpoly.html).\n * @param {DateTime} datetime Datetime for which ΔT should be calculated.\n * @returns {number} ΔT.\n */\nconst DeltaT = (datetime) => {\n let y = datetime.year;\n y += (datetime.month - 0.5) / 12;\n let u;\n let t;\n switch (true) {\n case y < -1999 || y > 3000:\n throw 'DeltaT can only be calculated between 1999 BCE and 3000 CE';\n case y < -500:\n u = (y - 1820) / 100;\n return -20 + 32 * Math.pow(u, 2);\n case y < 500:\n u = y / 100;\n return polynomial(u, [10583.6, -1014.41, 33.78311, -5.952053, -0.1798452, 0.022174192, 0.0090316521]);\n case y < 1600:\n u = (y - 1000) / 100;\n return polynomial(u, [1574.2, -556.01, 71.23472, 0.319781, -0.8503463, -0.005050998, 0.0083572073]);\n case y < 1700:\n t = y - 1600;\n return polynomial(t, [120, -0.9808, -0.01532, 1 / 7129]);\n case y < 1800:\n t = y - 1700;\n return polynomial(t, [8.83, 0.1603, -0.0059285, 0.00013336, -1 / 1174000]);\n case y < 1860:\n t = y - 1800;\n return polynomial(t, [13.72, -0.332447, 0.0068612, 0.0041116, -0.00037436, 0.0000121272, -0.0000001699, 0.000000000875]);\n case y < 1900:\n t = y - 1860;\n return polynomial(t, [7.62, 0.5737, -0.251754, 0.01680668, -0.0004473624, 1 / 233174]);\n case y < 1920:\n t = y - 1900;\n return polynomial(t, [-2.79, 1.494119, -0.0598939, 0.0061966, -0.000197]);\n case y < 1941:\n t = y - 1920;\n return polynomial(t, [21.20, 0.84493, -0.076100, 0.0020936]);\n case y < 1961:\n t = y - 1950;\n return polynomial(t, [29.07, 0.407, -1 / 233, 1 / 2547]);\n case y < 1986:\n t = y - 1975;\n return polynomial(t, [45.45, 1.067, -1 / 260, -1 / 718]);\n case y < 2005:\n t = y - 2000;\n return polynomial(t, [63.86, 0.3345, -0.060374, 0.0017275, 0.000651814, 0.00002373599]);\n case y < 2050:\n t = y - 2000;\n return polynomial(t, [62.92, 0.32217, 0.005589]);\n case y < 2150:\n return -20 + 32 * Math.pow(((y - 1820) / 100), 2) - 0.5628 * (2150 - y);\n default:\n u = (y - 1820) / 100;\n return -20 + 32 * Math.pow(u, 2);\n }\n};\n/* eslint-enable complexity */\n/**\n * Calculates an approximate value for k (the fractional number of new moons\n * since 2000-01-06).\n * @param {DateTime} datetime Datetime for which k is calculated.\n * @returns {number} k.\n */\nconst approxK = (datetime) => {\n const year = datetime.year + (datetime.month) / 12 +\n datetime.day / 365.25;\n return (year - 2000) * 12.3685;\n};\n/**\n * Calculates T from k.\n * @param {number} k Fractional number of new moons since 2000-01-06.\n * @returns {number} T Fractional num. of centuries since 2000-01-01:12:00:00Z.\n */\nconst kToT = (k) => k / 1236.85;\n\nlet roundToNearestMinute = false;\nlet returnTimeForNoEventCase = false;\nlet dateFormatKeys = {\n SUN_HIGH: '‡',\n SUN_LOW: '†',\n};\nconst settings = (settings) => {\n if (typeof settings.roundToNearestMinute === 'boolean') {\n roundToNearestMinute = settings.roundToNearestMinute;\n }\n if (typeof settings.returnTimeForNoEventCase === 'boolean') {\n returnTimeForNoEventCase = settings.returnTimeForNoEventCase;\n }\n if (typeof settings.dateFormatKeys === 'object') {\n dateFormatKeys = settings.dateFormatKeys;\n }\n};\n\n/** See AA p144 */\nconst sunMeanAnomaly = [357.52772, 35999.050340, -0.0001603, -1 / 300000];\n/** See AA p163 Eq 25.2 */\nconst sunMeanLongitude = [280.46646, 36000.76983, 0.0003032];\n/** See AA p147 Eq22.3 */\nconst meanObliquityOfEcliptic = [84381.448 / 3600, -4680.93 / 3600, -1.55 / 3600, 1999.25 / 3600, -51.38 / 3600, -249.67 / 3600, -39.05 / 3600,\n 7.12 / 3600, 27.87 / 3600, 5.79 / 3600, 2.45 / 3600];\n/** See AA p144 */\nconst moonArgumentOfLatitude = [93.27191, 483202.017538, -0.0036825, 1 / 327270];\n/** See AA p144 */\nconst moonAscendingNodeLongitude = [125.04452, -1934.136261, 0.0020708, 1 / 450000];\n/** See AA p144 */\nconst moonMeanAnomaly = [134.96298, 477198.867398, 0.0086972, 1 / 56250];\n/** See AA p144 */\nconst moonMeanElongation = [297.85036, 445267.111480, -0.0019142, 1 / 189474];\n/* eslint-disable no-multi-spaces, array-bracket-spacing */\n/**\n * Nutations in longitude and obliquity\n * See AA p145f\n */\nconst nutations = [\n [0, 0, 0, 0, 1, -171996, -174.2, 92025, 8.9],\n [-2, 0, 0, 2, 2, -13187, -1.6, 5736, -3.1],\n [0, 0, 0, 2, 2, -2274, -0.2, 977, -0.5],\n [0, 0, 0, 0, 2, 2062, 0.2, -895, 0.5],\n [0, 1, 0, 0, 0, 1426, -3.4, 54, -0.1],\n [0, 0, 1, 0, 0, 712, 0.1, -7, 0],\n [-2, 1, 0, 2, 2, -517, 1.2, 224, -0.6],\n [0, 0, 0, 2, 1, -386, -0.4, 200, 0],\n [0, 0, 1, 2, 2, -301, 0, 129, -0.1],\n [-2, -1, 0, 2, 2, 217, -0.5, -95, 0.3],\n [-2, 0, 1, 0, 0, -158, 0, 0, 0],\n [-2, 0, 0, 2, 1, 129, 0.1, -70, 0],\n [0, 0, -1, 2, 2, 123, 0, -53, 0],\n [2, 0, 0, 0, 0, 63, 0, 0, 0],\n [0, 0, 1, 0, 1, 63, 0.1, -33, 0],\n [2, 0, -1, 2, 2, -59, 0, 26, 0],\n [0, 0, -1, 0, 1, -58, -0.1, 32, 0],\n [0, 0, 1, 2, 1, -51, 0, 27, 0],\n [-2, 0, 2, 0, 0, 48, 0, 0, 0],\n [0, 0, -2, 2, 1, 46, 0, -24, 0],\n [2, 0, 0, 2, 2, -38, 0, 16, 0],\n [0, 0, 2, 2, 2, -31, 0, 13, 0],\n [0, 0, 2, 0, 0, 29, 0, 0, 0],\n [-2, 0, 1, 2, 2, 29, 0, -12, 0],\n [0, 0, 0, 2, 0, 26, 0, 0, 0],\n [-2, 0, 0, 2, 0, -22, 0, 0, 0],\n [0, 0, -1, 2, 1, 21, 0, -10, 0],\n [0, 2, 0, 0, 0, 17, -0.1, 0, 0],\n [2, 0, -1, 0, 1, 16, 0, -8, 0],\n [-2, 2, 0, 2, 2, -16, 0.1, 7, 0],\n [0, 1, 0, 0, 1, -15, 0, 9, 0],\n [-2, 0, 1, 0, 1, -13, 0, 7, 0],\n [0, -1, 0, 0, 1, -12, 0, 6, 0],\n [0, 0, 2, -2, 0, 11, 0, 0, 0],\n [2, 0, -1, 2, 1, -10, 0, 5, 0],\n [2, 0, 1, 2, 2, -8, 0, 3, 0],\n [0, 1, 0, 2, 2, 7, 0, -3, 0],\n [-2, 1, 1, 0, 0, -7, 0, 0, 0],\n [0, -1, 0, 2, 2, -7, 0, 3, 0],\n [2, 0, 0, 2, 1, -7, 0, 3, 0],\n [2, 0, 1, 0, 0, 6, 0, 0, 0],\n [-2, 0, 2, 2, 2, 6, 0, -3, 0],\n [-2, 0, 1, 2, 1, 6, 0, -3, 0],\n [2, 0, -2, 0, 1, -6, 0, 3, 0],\n [2, 0, 0, 0, 1, -6, 0, 3, 0],\n [0, -1, 1, 0, 0, 5, 0, 0, 0],\n [-2, -1, 0, 2, 1, -5, 0, 3, 0],\n [-2, 0, 0, 0, 1, -5, 0, 3, 0],\n [0, 0, 2, 2, 1, -5, 0, 3, 0],\n [-2, 0, 2, 0, 1, 4, 0, 0, 0],\n [-2, 1, 0, 2, 1, 4, 0, 0, 0],\n [0, 0, 1, -2, 0, 4, 0, 0, 0],\n [-1, 0, 1, 0, 0, -4, 0, 0, 0],\n [-2, 1, 0, 0, 0, -4, 0, 0, 0],\n [1, 0, 0, 0, 0, -4, 0, 0, 0],\n [0, 0, 1, 2, 0, 3, 0, 0, 0],\n [0, 0, -2, 2, 2, -3, 0, 0, 0],\n [-1, -1, 1, 0, 0, -3, 0, 0, 0],\n [0, 1, 1, 0, 0, -3, 0, 0, 0],\n [0, -1, 1, 2, 2, -3, 0, 0, 0],\n [2, -1, -1, 2, 2, -3, 0, 0, 0],\n [0, 0, 3, 2, 2, 3, 0, 0, 0],\n [2, -1, 0, 2, 2, -3, 0, 0, 0],\n];\n\n/**\n * Calculates the solar transit time on a date at a given longitude (see AA\n * p102f).\n * @param {DateTime} datetime Date for which transit is calculated.\n * @param {number} L Longitude.\n * @returns {DateTime} Solar transit time.\n */\nconst sunTransit = (datetime, L) => {\n const timezone = datetime.zone;\n let transit = datetime.set({ hour: 0, minute: 0, second: 0, millisecond: 0 })\n .setZone('UTC', { keepLocalTime: true });\n const deltaT = DeltaT(transit);\n const T = datetimeToT(transit);\n const Theta0 = apparentSiderealTimeGreenwich(T);\n // Want 0h TD for this, not UT\n const TD = T - (deltaT / (3600 * 24 * 36525));\n const alpha = sunApparentRightAscension(TD);\n // Sign flip for longitude from AA as we take East as positive\n let m = (alpha - L - Theta0) / 360;\n m = normalizeM(m, datetime.offset);\n const DeltaM = sunTransitCorrection(T, Theta0, deltaT, L, m);\n m += DeltaM;\n transit = transit.plus({ seconds: Math.floor(m * 3600 * 24 + 0.5) });\n if (roundToNearestMinute) {\n transit = transit.plus({ seconds: 30 }).set({ second: 0 });\n }\n return transit.setZone(timezone);\n};\n/**\n * Calculates the sunrise or sunset time on a date at a given latitude and\n * longitude (see AA p102f).\n * @param {DateTime} datetime Date for which sunrise or sunset is calculated.\n * @param {number} phi Latitude.\n * @param {number} L Longitude.\n * @param {string} flag 'RISE' or 'SET' depending on which event should be\n * calculated.\n * @param {number} offset number of degrees below the horizon for the desired\n * event (50/60 for sunrise/set, 6 for civil, 12 for nautical, 18 for\n * astronomical dawn/dusk.\n * @returns {DateTime} Sunrise or sunset time.\n */\n// eslint-disable-next-line complexity,require-jsdoc\nconst sunRiseSet = (datetime, phi, L, flag, offset = 50 / 60) => {\n const timezone = datetime.zone;\n let suntime = datetime.set({ hour: 0, minute: 0, second: 0, millisecond: 0 })\n .setZone('UTC', { keepLocalTime: true });\n const deltaT = DeltaT(suntime);\n const T = datetimeToT(suntime);\n const Theta0 = apparentSiderealTimeGreenwich(T);\n // Want 0h TD for this, not UT\n const TD = T - (deltaT / (3600 * 24 * 36525));\n const alpha = sunApparentRightAscension(TD);\n const delta = sunApparentDeclination(TD);\n const H0 = approxLocalHourAngle(phi, delta, offset);\n // Sign flip for longitude from AA as we take East as positive\n let m0 = (alpha - L - Theta0) / 360;\n m0 = normalizeM(m0, datetime.offset);\n let m;\n if (flag === 'RISE') {\n m = m0 - H0 / 360;\n }\n else {\n m = m0 + H0 / 360;\n }\n let counter = 0;\n let DeltaM = 1;\n // Repeat if correction is larger than ~9s\n while ((Math.abs(DeltaM) > 0.0001) && (counter < 3)) {\n DeltaM = sunRiseSetCorrection(T, Theta0, deltaT, phi, L, m, offset);\n m += DeltaM;\n counter++;\n }\n if (m > 0) {\n suntime = suntime.plus({ seconds: Math.floor(m * 3600 * 24 + 0.5) });\n }\n else {\n suntime = suntime.minus({ seconds: Math.floor(m * 3600 * 24 + 0.5) });\n }\n if (roundToNearestMinute) {\n suntime = suntime.plus({ seconds: 30 }).set({ second: 0 });\n }\n return suntime.setZone(timezone);\n};\n/**\n * Returns a fixed time as given by the hour parameter, an hour later during DST) if the\n * specified event does not occur on the date and returnTimeForNoEventCase is true. If\n * false, return whether the reason for no event is the sun being too high ('SUN_HIGH')\n * or too low ('SUN_LOW').\n * @param {DateTime} date The original date from which the event was calculated.\n * @param {string|undefined} errorCode The error code in case no event was found\n * @param {number} hour Hour to which the returned datetime should be set.\n * @param {number} minute Minute to which the returned datetime should be set.\n * @returns {(DateTime|string)} Time given by parameter 'hour' (+ correction for\n * DST if applicable) or a string indicating why there was no event ('SUN_HIGH'\n * or 'SUN_LOW')\n */\nconst handleNoEventCase = (date, errorCode, hour, minute = 0) => {\n if (returnTimeForNoEventCase) {\n const returnDate = date.set({ hour, minute, second: 0 }).plus({ minutes: date.isInDST ? 60 : 0 });\n returnDate.errorCode = errorCode;\n return returnDate;\n }\n return errorCode;\n};\n/**\n * Calculates the approximate local hour angle of the sun at sunrise or sunset.\n * @param {number} phi Latitude (see AA p102 Eq15.1).\n * @param {number} delta Apparent declination of the sun.\n * @param {number} offset number of degrees below the horizon for the desired\n * event (50/60 for sunrise/set, 6 for civil, 12 for nautical, 18 for\n * astronomical dawn/dusk.\n * @returns {number} Approximate local hour angle.\n */\nconst approxLocalHourAngle = (phi, delta, offset) => {\n const cosH0 = (sind(-offset) -\n sind(phi) * sind(delta)) /\n (cosd(phi) * cosd(delta));\n if (cosH0 < -1) {\n throw noEventCodes.SUN_HIGH;\n }\n else if (cosH0 > 1) {\n throw noEventCodes.SUN_LOW;\n }\n return rad2deg(Math.acos(cosH0));\n};\n/**\n * Normalizes a fractional time of day to be on the correct date.\n * @param {number} m Fractional time of day\n * @param {number} utcOffset Offset in minutes from UTC.\n * @returns {number} m Normalized m.\n */\nconst normalizeM = (m, utcOffset) => {\n const localM = m + utcOffset / 1440;\n if (localM < 0) {\n return m + 1;\n }\n else if (localM > 1) {\n return m - 1;\n }\n return m;\n};\n/**\n * Calculates the correction for the solar transit time (see AA p103).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} Theta0 Apparent sidereal time at Greenwich.\n * @param {number} deltaT ΔT = TT − UT.\n * @param {number} L Longitude.\n * @param {number} m Fractional time of day of the event.\n * @returns {number} Currection for the solar transit time.\n */\nconst sunTransitCorrection = (T, Theta0, deltaT, L, m) => {\n const theta0 = Theta0 + 360.985647 * m;\n const n = m + deltaT / 864000;\n const alpha = interpolatedRa(T, n);\n const H = localHourAngle(theta0, L, alpha);\n return -H / 360;\n};\n/**\n * Calculates the correction for the sunrise/sunset time (see AA p103).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} Theta0 Apparent sidereal time at Greenwich.\n * @param {number} deltaT ΔT = TT − UT.\n * @param {number} phi Latitude.\n * @param {number} L Longitude.\n * @param {number} m Fractional time of day of the event.\n * @param {number} offset number of degrees below the horizon for the desired\n * event (50/60 for sunrise/set, 6 for civil, 12 for nautical, 18 for\n * astronomical dawn/dusk.\n * @returns {number} Correction for the sunrise/sunset time.\n */\nconst sunRiseSetCorrection = (T, Theta0, deltaT, phi, L, m, offset) => {\n const theta0 = Theta0 + 360.985647 * m;\n const n = m + deltaT / 864000;\n const alpha = interpolatedRa(T, n);\n const delta = interpolatedDec(T, n);\n const H = localHourAngle(theta0, L, alpha);\n const h = altitude(phi, delta, H);\n return (h + offset) / (360 * cosd(delta) * cosd(phi) * sind(H));\n};\n/**\n * Calculates the local hour angle of the sun (see AA p103).\n * @param {number} theta0 Sidereal time at Greenwich in degrees.\n * @param {number} L Longitude.\n * @param {number} alpha Apparent right ascension of the sun.\n * @returns {number} Local hour angle of the sun.\n */\nconst localHourAngle = (theta0, L, alpha) => {\n // Sign flip for longitude\n let H = reduceAngle(theta0 + L - alpha);\n if (H > 180) {\n H -= 360;\n }\n return H;\n};\n/**\n * Calculates the altitude of the sun above the horizon (see AA P93 Eq13.6).\n * @param {number} phi Latitude.\n * @param {number} delta Apparent declination of the sun.\n * @param {number} H Local hour angle of the sun.\n * @returns {number} Altitude of the sun above the horizon.\n */\nconst altitude = (phi, delta, H) => rad2deg(Math.asin(sind(phi) * sind(delta) + cosd(phi) * cosd(delta) * cosd(H)));\n/**\n * Interpolates the sun's right ascension (see AA p103).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} n Fractional time of day of the event corrected by ΔT.\n * @returns {number} Interpolated right ascension.\n */\nconst interpolatedRa = (T, n) => {\n const alpha1 = sunApparentRightAscension(T - (1 / 36525));\n const alpha2 = sunApparentRightAscension(T);\n const alpha3 = sunApparentRightAscension(T + (1 / 36525));\n const alpha = interpolateFromThree(alpha1, alpha2, alpha3, n, true);\n return reduceAngle(alpha);\n};\n/**\n * Interpolates the sun's declination (see AA p103).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} n Fractional time of day of the event corrected by ΔT.\n * @returns {number} Interpolated declination.\n */\nconst interpolatedDec = (T, n) => {\n const delta1 = sunApparentDeclination(T - (1 / 36525));\n const delta2 = sunApparentDeclination(T);\n const delta3 = sunApparentDeclination(T + (1 / 36525));\n const delta = interpolateFromThree(delta1, delta2, delta3, n);\n return reduceAngle(delta);\n};\n/**\n * Calculates the apparent right ascension of the sun (see AA p165 Eq25.6).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Apparent right ascension of the sun.\n */\nconst sunApparentRightAscension = (T) => {\n const Omega = moonAscendingNodeLongitude$1(T);\n const epsilon = trueObliquityOfEcliptic(T) + 0.00256 * cosd(Omega);\n const lambda = sunApparentLongitude(T);\n const alpha = rad2deg(Math.atan2(cosd(epsilon) * sind(lambda), cosd(lambda)));\n return reduceAngle(alpha);\n};\n/**\n * Calculates the apparent declination of the sun (see AA p165 Eq25.7).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Apparent declination of the sun.\n */\nconst sunApparentDeclination = (T) => {\n const Omega = moonAscendingNodeLongitude$1(T);\n const epsilon = trueObliquityOfEcliptic(T) + 0.00256 * cosd(Omega);\n const lambda = sunApparentLongitude(T);\n return rad2deg(Math.asin(sind(epsilon) * sind(lambda)));\n};\n/**\n * Calculates the apparent sidereal time at Greenwich (see AA p88).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Apparent sidereal time at Greenwich\n */\nconst apparentSiderealTimeGreenwich = (T) => {\n const theta0 = meanSiderealTimeGreenwich(T);\n const epsilon = trueObliquityOfEcliptic(T);\n const DeltaPsi = nutationInLongitude(T);\n const theta = theta0 + DeltaPsi * cosd(epsilon);\n return reduceAngle(theta);\n};\n/**\n * Calculates the mean sidereal time at Greenwich (see AA p88 Eq12.4).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Mean sidereal time at Greenwich\n */\nconst meanSiderealTimeGreenwich = (T) => {\n const JD2000 = T * 36525;\n return 280.46061837 + 360.98564736629 * JD2000 + 0.000387933 * Math.pow(T, 2) - Math.pow(T, 3) / 38710000;\n};\n/**\n * Calculates the true obliquity of the ecliptic (see AA p147).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} True obliquity of the ecliptic.\n */\nconst trueObliquityOfEcliptic = (T) => {\n const epsilon0 = meanObliquityOfEcliptic$1(T);\n const DeltaEpsilon = nutationInObliquity(T);\n return epsilon0 + DeltaEpsilon;\n};\n/**\n * Calculates the mean obliquity of the ecliptic (see AA p147 Eq 22.3).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Mean obliquity of the ecliptic.\n */\nconst meanObliquityOfEcliptic$1 = (T) => {\n const U = T / 100;\n return polynomial(U, meanObliquityOfEcliptic);\n};\n/**\n * Calculates the apparent longitude of the sun (see AA p164).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Apparent longitude of the sun.\n */\nconst sunApparentLongitude = (T) => {\n const Sol = sunTrueLongitude(T);\n const Omega = moonAscendingNodeLongitude$1(T);\n return Sol - 0.00569 - 0.00478 * sind(Omega);\n};\n/**\n * Calculates the true longitude of the sun (see AA p164).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} True longitude of the sun.\n */\nconst sunTrueLongitude = (T) => {\n const L0 = sunMeanLongitude$1(T);\n const C = sunEquationOfCenter(T);\n return L0 + C;\n};\n/**\n * Calculates the equation of center of the sun (see AA p164).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Equation of center of the sun.\n */\nconst sunEquationOfCenter = (T) => {\n const M = sunMeanAnomaly$1(T);\n return (1.914602 - 0.004817 * T - 0.000014 * Math.pow(T, 2)) * sind(M) +\n (0.019993 - 0.000101 * T) * sind(2 * M) + 0.000290 * sind(3 * M);\n};\n/**\n * Calculates the nutation in longitude of the sun (see AA p144ff).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Nutation in longitude of the sun.\n */\nconst nutationInLongitude = (T) => {\n const D = moonMeanElongation$1(T);\n const M = sunMeanAnomaly$1(T);\n const MPrime = moonMeanAnomaly$1(T);\n const F = moonArgumentOfLatitude$1(T);\n const Omega = moonAscendingNodeLongitude$1(T);\n let DeltaPsi = 0;\n let sineArg;\n for (let i = 0; i < 63; i++) {\n sineArg = nutations[i][0] * D + nutations[i][1] * M + nutations[i][2] * MPrime +\n nutations[i][3] * F + nutations[i][4] * Omega;\n DeltaPsi += (nutations[i][5] + nutations[i][6] * T) * sind(sineArg);\n }\n return DeltaPsi / 36000000;\n};\n/**\n * Calculates the nutation in obliquity of the sun (see AA p144ff).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Nutation in obliquity of the sun.\n */\nconst nutationInObliquity = (T) => {\n const D = moonMeanElongation$1(T);\n const M = sunMeanAnomaly$1(T);\n const MPrime = moonMeanAnomaly$1(T);\n const F = moonArgumentOfLatitude$1(T);\n const Omega = moonAscendingNodeLongitude$1(T);\n let DeltaEpsilon = 0;\n let cosArg;\n for (let i = 0; i < 63; i++) {\n cosArg = nutations[i][0] * D + nutations[i][1] * M + nutations[i][2] * MPrime +\n nutations[i][3] * F + nutations[i][4] * Omega;\n DeltaEpsilon += (nutations[i][7] + nutations[i][8] * T) * cosd(cosArg);\n }\n return DeltaEpsilon / 36000000;\n};\n/**\n * Calculates the argument of latitude of the moon (see AA p144).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Argument of latitude of the moon.\n */\nconst moonArgumentOfLatitude$1 = (T) => {\n const F = polynomial(T, moonArgumentOfLatitude);\n return reduceAngle(F);\n};\n/**\n * Calculates the longitude of the ascending node of the Moon's mean orbit on\n * the ecliptic, measured from the mean equinox of the datea (see AA p144).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Longitude of the asc. node of the moon's mean orbit.\n */\nconst moonAscendingNodeLongitude$1 = (T) => {\n const Omega = polynomial(T, moonAscendingNodeLongitude);\n return reduceAngle(Omega);\n};\n/**\n * Calculates the mean anomaly of the moon (see AA p144).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Mean anomaly of the moon.\n */\nconst moonMeanAnomaly$1 = (T) => {\n const MPrime = polynomial(T, moonMeanAnomaly);\n return reduceAngle(MPrime);\n};\n/**\n * Calculates the mean elongation of the moon from the sun (see AA p144).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Mean elongation of the moon from the sun.\n */\nconst moonMeanElongation$1 = (T) => {\n const D = polynomial(T, moonMeanElongation);\n return reduceAngle(D);\n};\n/**\n * Calculates the mean anomaly of the sun (see AA p144).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Mean anomaly of the sun.\n */\nconst sunMeanAnomaly$1 = (T) => {\n const M = polynomial(T, sunMeanAnomaly);\n return reduceAngle(M);\n};\n/**\n * Calculates the mean longitude of the sun referred to the mean equinox of the\n * date (see AA p163).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Mean longitude of the sun referred to the mean equinox of\n * the date.\n */\nconst sunMeanLongitude$1 = (T) => {\n const L0 = polynomial(T, sunMeanLongitude);\n return reduceAngle(L0);\n};\nconst noEventCodes = {\n SUN_HIGH: 'SUN_HIGH',\n SUN_LOW: 'SUN_LOW',\n};\n\n/**\n * Calculates the Julian date in ephemeris time of the moon near the date\n * corresponding to k (see AA p350ff).\n * @param {number} k The approximate fractional number of new moons since\n * 2000-01-06.\n * @param {number} phase 0 -> new moon, 1 -> first quarter,\n * 2 -> full moon, 3 -> last quarter.\n * @returns {number} Julian date in ephemeris time of the moon of given phase.\n */\nconst truePhase = (k, phase) => {\n k += phase / 4;\n const T = kToT(k);\n const E = eccentricityCorrection(T);\n const JDE = meanPhase(T, k);\n const M = sunMeanAnomaly$2(T, k);\n const MPrime = moonMeanAnomaly$2(T, k);\n const F = moonArgumentOfLatitude$2(T, k);\n const Omega = moonAscendingNodeLongitude$2(T, k);\n let DeltaJDE = 0;\n if (phase === 0 || phase === 2) {\n DeltaJDE += newMoonFullMoonCorrections(E, M, MPrime, F, Omega, phase);\n }\n else if (phase === 1 || phase === 3) {\n DeltaJDE += quarterCorrections(E, M, MPrime, F, Omega, phase);\n }\n DeltaJDE += commonCorrections(T, k);\n return JDE + DeltaJDE;\n};\n/**\n * Calculates the mean phase of the moon as Julian date in ephemeris time (see\n * AA p349 Eq49.1).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} k The approximate fractional number of new moons since\n * 2000-01-06.\n * @returns {number} Julian date in ephemeris time of the moon of given mean\n * phase.\n */\nconst meanPhase = (T, k) => 2451550.09766 + 29.530588861 * k + 0.00015437 * Math.pow(T, 2) -\n 0.000000150 * Math.pow(T, 3) + 0.00000000073 * Math.pow(T, 4);\n/**\n * Calculates the mean anomaly of the sun (see AA p350 Eq49.4).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} k The approximate fractional number of new moons since\n * 2000-01-06.\n * @returns {number} Mean anomaly of the sun at the given time.\n */\nconst sunMeanAnomaly$2 = (T, k) => 2.5534 + 29.10535670 * k - 0.0000014 * Math.pow(T, 2) -\n 0.00000011 * Math.pow(T, 3);\n/**\n * Calculates the mean anomaly of the moon (see AA p350 Eq49.5).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} k The approximate fractional number of new moons since\n * 2000-01-06.\n * @returns {number} Mean anomaly of the moon at the given time.\n */\nconst moonMeanAnomaly$2 = (T, k) => 201.5643 + 385.81693528 * k + 0.0107582 * Math.pow(T, 2) +\n 0.00001238 * Math.pow(T, 3) - 0.000000058 * Math.pow(T, 4);\n/**\n * Calculates the argument of latitude of the moon (see AA p350 Eq49.6).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} k The approximate fractional number of new moons since\n * 2000-01-06.\n * @returns {number} Argument of latitude of the moon at the given time.\n */\nconst moonArgumentOfLatitude$2 = (T, k) => 160.7108 + 390.67050284 * k - 0.0016118 * Math.pow(T, 2) -\n 0.00000227 * Math.pow(T, 3) + 0.000000011 * Math.pow(T, 4);\n/**\n * Calculates the longitude of the ascending node of the lunar orbit (see AA\n * p350 Eq49.7).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} k The approximate fractional number of new moons since\n * 2000-01-06.\n * @returns {number} Longitude of the ascending node of the lunar orbit at the\n * given time.\n */\nconst moonAscendingNodeLongitude$2 = (T, k) => 124.7746 - 1.56375588 * k + 0.0020672 * Math.pow(T, 2) +\n 0.00000215 * Math.pow(T, 3);\n/**\n * Calculates the correction for the eccentricity of the earth's orbit.\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @returns {number} Eccentricity correction.\n */\nconst eccentricityCorrection = (T) => 1 - 0.002516 * T - 0.0000074 * Math.pow(T, 2);\n/**\n * Calculates the corrections to the planetary arguments for the moon phases\n * that are common to all phases (see AA p352).\n * @param {number} T Fractional number of Julian centuries since\n * 2000-01-01T12:00:00Z.\n * @param {number} k The approximate fractional number of new moons since\n * 2000-01-06.\n * @returns {number} Correction to the Julian date in ephemeris time for the\n * moon phase.\n */\nconst commonCorrections = (T, k) => {\n const A = [\n 0,\n 299.77 + 0.107408 * k - 0.009173 * Math.pow(T, 2),\n 251.88 + 0.016321 * k,\n 251.83 + 26.651886 * k,\n 349.42 + 36.412478 * k,\n 84.66 + 18.206239 * k,\n 141.74 + 53.303771 * k,\n 207.14 + 2.453732 * k,\n 154.84 + 7.306860 * k,\n 34.52 + 27.261239 * k,\n 207.19 + 0.121824 * k,\n 291.34 + 1.844379 * k,\n 161.72 + 24.198154 * k,\n 239.56 + 25.513099 * k,\n 331.55 + 3.592518 * k\n ];\n return 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) +\n 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]) + 0.000056 * sind(A[8]) +\n 0.000047 * sind(A[9]) + 0.000042 * sind(A[10]) + 0.000040 * sind(A[11]) + 0.000037 * sind(A[12]) +\n 0.000035 * sind(A[13]) + 0.000023 * sind(A[14]);\n};\n/**\n * Calculates the corrections to the planetary arguments for the moon phases\n * for full and new moons (see AA p351).\n * @param {number} E Correction for the eccentricity of the earth's orbit.\n * @param {number} M Mean anomaly of the sun.\n * @param {number} MPrime Mean anomaly of the moon.\n * @param {number} F Argument of latitude of the moon.\n * @param {number} Omega Longitude of the ascending node of the lunar orbit.\n * @param {number} phase 0 -> new moon, 1 -> first quarter,\n * 2 -> full moon, 3 -> last quarter.\n * @returns {number} Correction to the Julian date in ephemeris time for the\n * moon phase.\n */\nconst newMoonFullMoonCorrections = (E, M, MPrime, F, Omega, phase) => {\n let DeltaJDE = -0.00111 * sind(MPrime - 2 * F) -\n 0.00057 * sind(MPrime + 2 * F) +\n 0.00056 * E * sind(2 * MPrime + M) -\n 0.00042 * sind(3 * MPrime) +\n 0.00042 * E * sind(M + 2 * F) +\n 0.00038 * E * sind(M - 2 * F) -\n 0.00024 * E * sind(2 * MPrime - M) -\n 0.00017 * sind(Omega) -\n 0.00007 * sind(MPrime + 2 * M) +\n 0.00004 * sind(2 * MPrime - 2 * F) +\n 0.00004 * sind(3 * M) +\n 0.00003 * sind(MPrime + M - 2 * F) +\n 0.00003 * sind(2 * MPrime + 2 * F) -\n 0.00003 * sind(MPrime + M + 2 * F) +\n 0.00003 * sind(MPrime - M + 2 * F) -\n 0.00002 * sind(MPrime - M - 2 * F) -\n 0.00002 * sind(3 * MPrime + M) +\n 0.00002 * sind(4 * MPrime);\n if (phase === 0) {\n DeltaJDE +=\n -0.40720 * sind(MPrime) +\n 0.17241 * E * sind(M) +\n 0.01608 * sind(2 * MPrime) +\n 0.01039 * sind(2 * F) +\n 0.00739 * E * sind(MPrime - M) -\n 0.00514 * E * sind(MPrime + M) +\n 0.00208 * E * E * sind(2 * M);\n }\n else if (phase === 2) {\n DeltaJDE +=\n -0.40614 * sind(MPrime) +\n 0.17302 * E * sind(M) +\n 0.01614 * sind(2 * MPrime) +\n 0.01043 * sind(2 * F) +\n 0.00734 * E * sind(MPrime - M) -\n 0.00515 * E * sind(MPrime + M) +\n 0.00209 * E * E * sind(2 * M);\n }\n return DeltaJDE;\n};\n/**\n * Calculates the corrections to the planetary arguments for the moon phases\n * for first and last quarters (see AA p352).\n * @param {number} E Correction for the eccentricity of the earth's orbit.\n * @param {number} M Mean anomaly of the sun.\n * @param {number} MPrime Mean anomaly of the moon.\n * @param {number} F Argument of latitude of the moon.\n * @param {number} Omega Longitude of the ascending node of the lunar orbit.\n * @param {number} phase 0 -> new moon, 1 -> first quarter,\n * 2 -> full moon, 3 -> last quarter.\n * @returns {number} Correction to the Julian date in ephemeris time for the\n * moon phase.\n */\nconst quarterCorrections = (E, M, MPrime, F, Omega, phase) => {\n let DeltaJDE = -0.62801 * sind(MPrime) +\n 0.17172 * E * sind(M) -\n 0.01183 * E * sind(MPrime + M) +\n 0.00862 * sind(2 * MPrime) +\n 0.00804 * sind(2 * F) +\n 0.00454 * E * sind(MPrime - M) +\n 0.00204 * E * E * sind(2 * M) -\n 0.00180 * sind(MPrime - 2 * F) -\n 0.00070 * sind(MPrime + 2 * F) -\n 0.00040 * sind(3 * MPrime) -\n 0.00034 * E * sind(2 * MPrime - M) +\n 0.00032 * E * sind(M + 2 * F) +\n 0.00032 * E * sind(M - 2 * F) -\n 0.00028 * E * E * sind(MPrime + 2 * M) +\n 0.00027 * E * sind(2 * MPrime + M) -\n 0.00017 * sind(Omega) -\n 0.00005 * sind(MPrime - M - 2 * F) +\n 0.00004 * sind(2 * MPrime + 2 * F) -\n 0.00004 * sind(MPrime + M + 2 * F) +\n 0.00004 * sind(MPrime - 2 * M) +\n 0.00003 * sind(MPrime + M - 2 * F) +\n 0.00003 * sind(3 * M) +\n 0.00002 * sind(2 * MPrime - 2 * F) +\n 0.00002 * sind(MPrime - M + 2 * F) -\n 0.00002 * sind(3 * MPrime + M);\n const W = 0.00306 -\n 0.00038 * E * cosd(M) +\n 0.00026 * cosd(MPrime) -\n 0.00002 * cosd(MPrime - M) +\n 0.00002 * cosd(MPrime + M) +\n 0.00002 * cosd(2 * F);\n if (phase === 1) {\n DeltaJDE += W;\n }\n else if (phase === 3) {\n DeltaJDE -= W;\n }\n return DeltaJDE;\n};\n\n/**\n * Uses the extra information encoded into the DateTime object for dates without\n * a sun event if returnTimeForNoEventCase is true to mark the output string.\n * @param {DateTime} datetime Input datetime.\n * @param {string} formatString Valid DateTime format string.\n * @returns {string} Formatted string with marker appended.\n */\nconst format = (datetime, formatString) => {\n const noEventCode = datetime.errorCode;\n let datestring = datetime.toFormat(formatString);\n if (dateFormatKeys[noEventCode]) {\n datestring += dateFormatKeys[noEventCode];\n }\n return datestring;\n};\n/**\n * Calculates sunrise on the provided date.\n * @param {DateTime} datetime Datetime for which sunrise is calculated. Should\n * always contain a timezone or be in UTC, lone UTC offsets might lead to\n * unexpected behaviour.\n * @param {number} latitude Latitude of target location.\n * @param {number} longitude longitude of target location.\n * @returns {(DateTime|string)} Time of sunrise or a string indicating that no\n * event could be calculated as the sun was too high ('SUN_HIGH') or too low\n * ('SUN_LOW') during the entire day (unless returnTimeForNoEventCase is true).\n */\nconst sunrise = (datetime, latitude, longitude) => {\n try {\n return sunRiseSet(datetime, latitude, longitude, 'RISE');\n }\n catch (err) {\n return handleNoEventCase(datetime, err, 6);\n }\n};\n/**\n * Calculates sunset on the provided date.\n * @param {DateTime} datetime Datetime for which sunset is calculated. Should\n * always contain a timezone or be in UTC, lone UTC offsets might lead to\n * unexpected behaviour.\n * @param {number} latitude Latitude of target location.\n * @param {number} longitude longitude of target location.\n * @returns {(DateTime|string)} Time of sunset or a string indicating that no\n * event could be calculated as the sun was too high ('SUN_HIGH') or too low\n * ('SUN_LOW') during the entire day (unless returnTimeForNoEventCase is true).\n */\nconst sunset = (datetime, latitude, longitude) => {\n try {\n return sunRiseSet(datetime, latitude, longitude, 'SET');\n }\n catch (err) {\n return handleNoEventCase(datetime, err, 18);\n }\n};\n/**\n * Calculates civil dawn (sun 6° below horizon) on the provided date.\n * @param {DateTime} datetime Datetime for which civil dawn is calculated. Should\n * always contain a timezone or be in UTC, lone UTC offsets might lead to\n * unexpected behaviour.\n * @param {number} latitude Latitude of target location.\n * @param {number} longitude longitude of target location.\n * @returns {(DateTime|string)} Time of civil dawn or a string indicating that no\n * event could be calculated as the sun was too high ('SUN_HIGH') or too low\n * ('SUN_LOW') during the entire day (unless returnTimeForNoEventCase is true).\n */\nconst civilDawn = (datetime, latitude, longitude) => {\n try {\n return sunRiseSet(datetime, latitude, longitude, 'RISE', 6);\n }\n catch (err) {\n return handleNoEventCase(datetime, err, 5, 30);\n }\n};\n/**\n * Calculates civil dusk (sun 6° below horizon) on the provided date.\n * @param {DateTime} datetime Datetime for which civil dusk is calculated. Should\n * always contain a timezone or be in UTC, lone UTC offsets might lead to\n * unexpected behaviour.\n * @param {number} latitude Latitude of target location.\n * @param {number} longitude longitude of target location.\n * @returns {(DateTime|string)} Time of civil dusk or a string indicating that no\n * event could be calculated as the sun was too high ('SUN_HIGH') or too low\n * ('SUN_LOW') during the entire day (unless returnTimeForNoEventCase is true).\n */\nconst civilDusk = (datetime, latitude, longitude) => {\n try {\n return sunRiseSet(datetime, latitude, longitude, 'SET', 6);\n }\n catch (err) {\n return handleNoEventCase(datetime, err, 18, 30);\n }\n};\n/**\n * Calculates nautical dawn (sun 12° below horizon) on the provided date.\n * @param {DateTime} datetime Datetime for which nautical dawn is calculated.\n * Should always contain a timezone or be in UTC, lone UTC offsets might\n * lead to unexpected behaviour.\n * @param {number} latitude Latitude of target location.\n * @param {number} longitude longitude of target location.\n * @returns {(DateTime|string)} Time of nautical dawn or a string indicating that no\n * event could be calculated as the sun was too high ('SUN_HIGH') or too low\n * ('SUN_LOW') during the entire day (unless returnTimeForNoEventCase is true).\n */\nconst nauticalDawn = (datetime, latitude, longitude) => {\n try {\n return sunRiseSet(datetime, latitude, longitude, 'RISE', 12);\n }\n catch (err) {\n return handleNoEventCase(datetime, err, 5);\n }\n};\n/**\n * Calculates nautical dusk (sun 12° below horizon) on the provided date.\n * @param {DateTime} datetime Datetime for which nautical dusk is calculated.\n * Should always contain a timezone or be in UTC, lone UTC offsets might\n * lead to unexpected behaviour.\n * @param {number} latitude Latitude of target location.\n * @param {number} longitude longitude of target location.\n * @returns {(DateTime|string)} Time of nautical dusk or a string indicating that no\n * event could be calculated as the sun was too high ('SUN_HIGH') or too low\n * ('SUN_LOW') during the entire day (unless returnTimeForNoEventCase is true).\n */\nconst nauticalDusk = (datetime, latitude, longitude) => {\n try {\n return sunRiseSet(datetime, latitude, longitude, 'SET', 12);\n }\n catch (err) {\n return handleNoEventCase(datetime, err, 19);\n }\n};\n/**\n * Calculates astronomical dawn (sun 18° below horizon) on the provided date.\n * @param {DateTime} datetime Datetime for which astronomical dawn is calculated.\n * Should always contain a timezone or be in UTC, lone UTC offsets might\n * lead to unexpected behaviour.\n * @param {number} latitude Latitude of target location.\n * @param {number} longitude longitude of target location.\n * @returns {(DateTime|string)} Time of astronomical dawn or a string indicating that no\n * event could be calculated as the sun was too high ('SUN_HIGH') or too low\n * ('SUN_LOW') during the entire day (unless returnTimeForNoEventCase is true).\n */\nconst astronomicalDawn = (datetime, latitude, longitude) => {\n try {\n return sunRiseSet(datetime, latitude, longitude, 'RISE', 18);\n }\n catch (err) {\n return handleNoEventCase(datetime, err, 4, 30);\n }\n};\n/**\n * Calculates astronomical dusk (sun 18° below horizon) on the provided date.\n * @param {DateTime} datetime Datetime for which astronomical dusk is calculated.\n * Should always contain a timezone or be in UTC, lone UTC offsets might\n * lead to unexpected behaviour.\n * @param {number} latitude Latitude of target location.\n * @param {number} longitude longitude of target location.\n * @returns {(DateTime|string)} Time of astronomical dusk or a string indicating that no\n * event could be calculated as the sun was too high ('SUN_HIGH') or too low\n * ('SUN_LOW') during the entire day (unless returnTimeForNoEventCase is true).\n */\nconst astronomicalDusk = (datetime, latitude, longitude) => {\n try {\n return sunRiseSet(datetime, latitude, longitude, 'SET', 18);\n }\n catch (err) {\n return handleNoEventCase(datetime, err, 19, 30);\n }\n};\n/**\n * Calculates solar noon on the provided date.\n * @param {DateTime} datetime Datetime for which solar noon is calculated. Should\n * always contain a timezone or be in UTC, lone UTC offsets might lead to\n * unexpected behaviour.\n * @param {number} longitude longitude of target location.\n * @returns {DateTime} Time of solar noon at the given longitude.\n */\nconst solarNoon = (datetime, longitude) => sunTransit(datetime, longitude);\n/**\n * Calculates all moons of the given phase that occur within the given\n * Gregorian calendar year.\n * @param {number} year Year for which moon phases should be calculated.\n * @param {number} phase 0 -> new moon, 1 -> first quarter,\n * 2 -> full moon, 3 -> last quarter.\n * @param {string} timezone Optional: IANA timezone string.\n * @returns {array} Array of DateTime objects for moons of the given phase.\n */\nconst yearMoonPhases = (year, phase, timezone = 'UTC') => {\n const yearBegin = DateTime.fromObject(\n // eslint-disable-next-line sort-keys\n { year, month: 1, day: 1, hour: 0, minute: 0, second: 0, zone: timezone });\n const yearEnd = DateTime.fromObject(\n // eslint-disable-next-line sort-keys\n { year: year + 1, month: 1, day: 1, hour: 0, minute: 0, second: 0, zone: timezone });\n // this will give us k for the first new moon of the year or earlier\n let k = Math.floor(approxK(yearBegin)) - 1;\n // taking 15 events will make sure we catch every event in the year\n const phaseTimes = [];\n let JDE;\n let moonDatetime;\n let deltaT;\n for (let i = 0; i < 15; i++) {\n JDE = truePhase(k, phase);\n // we pretend it's JD and not JDE\n moonDatetime = JDToDatetime(JDE).setZone(timezone);\n // now use that to calculate deltaT\n deltaT = DeltaT(moonDatetime);\n if (deltaT > 0) {\n moonDatetime = moonDatetime.minus({ seconds: Math.round(Math.abs(deltaT)) });\n }\n else {\n moonDatetime = moonDatetime.plus({ seconds: Math.round(Math.abs(deltaT)) });\n }\n if (roundToNearestMinute) {\n moonDatetime = moonDatetime.plus({ seconds: 30 }).set({ second: 0 });\n }\n if (moonDatetime >= yearBegin && moonDatetime < yearEnd) {\n phaseTimes.push(moonDatetime);\n }\n k++;\n }\n return phaseTimes;\n};\nconst yearAllMoonPhases = (year, timezone = 'UTC') => [\n ...yearMoonPhases(year, 0, timezone).map((datetime) => ({ datetime, phase: 0 })),\n ...yearMoonPhases(year, 1, timezone).map((datetime) => ({ datetime, phase: 1 })),\n ...yearMoonPhases(year, 2, timezone).map((datetime) => ({ datetime, phase: 2 })),\n ...yearMoonPhases(year, 3, timezone).map((datetime) => ({ datetime, phase: 3 })),\n].sort((a, b) => a.datetime.valueOf() - b.datetime.valueOf());\n\nexport { astronomicalDawn, astronomicalDusk, civilDawn, civilDusk, format, nauticalDawn, nauticalDusk, settings, solarNoon, sunrise, sunset, yearAllMoonPhases, yearMoonPhases };\n","const month = {\n 1: 'Bahá',\n 2: 'Jalál',\n 3: 'Jamál',\n 4: '‘Aẓamat',\n 5: 'Núr',\n 6: 'Raḥmat',\n 7: 'Kalimát',\n 8: 'Kamál',\n 9: 'Asmá’',\n 10: '‘Izzat',\n 11: 'Ma_sh_íyyat',\n 12: '‘Ilm',\n 13: 'Qudrat',\n 14: 'Qawl',\n 15: 'Masá’il',\n 16: '_Sh_araf',\n 17: 'Sulṭán',\n 18: 'Mulk',\n 19: '‘Alá’',\n 20: 'Ayyám-i-Há',\n};\n\nconst monthL = {\n 1: 'Splendour',\n 2: 'Glory',\n 3: 'Beauty',\n 4: 'Grandeur',\n 5: 'Light',\n 6: 'Mercy',\n 7: 'Words',\n 8: 'Perfection',\n 9: 'Names',\n 10: 'Might',\n 11: 'Will',\n 12: 'Knowledge',\n 13: 'Power',\n 14: 'Speech',\n 15: 'Questions',\n 16: 'Honour',\n 17: 'Sovereignty',\n 18: 'Dominion',\n 19: 'Loftiness',\n 20: 'Ayyám-i-Há',\n};\n\nconst holyDay = {\n 1: 'Naw-Rúz',\n 2: 'First day of Riḍván',\n 3: 'Ninth day of Riḍván',\n 4: 'Twelfth day of Riḍván',\n 5: 'Declaration of the Báb',\n 6: 'Ascension of Bahá’u’lláh',\n 7: 'Martyrdom of the Báb',\n 8: 'Birth of the Báb',\n 9: 'Birth of Bahá’u’lláh',\n 10: 'Day of the Covenant',\n 11: 'Ascension of ‘Abdu’l-Bahá',\n};\n\n// CAREFUL: Numbering corresponds to Badí' week, i.e. 1 is Jalál (-> Saturday)\nconst weekday = {\n 1: 'Jalál',\n 2: 'Jamál',\n 3: 'Kamál',\n 4: 'Fiḍál',\n 5: '‘Idál',\n 6: 'Istijlál',\n 7: 'Istiqlál',\n};\n\nconst weekdayAbbr3 = {\n 1: 'Jal',\n 2: 'Jam',\n 3: 'Kam',\n 4: 'Fiḍ',\n 5: '‘Idá',\n 6: 'Isj',\n 7: 'Isq',\n};\n\nconst weekdayAbbr2 = {\n 1: 'Jl',\n 2: 'Jm',\n 3: 'Ka',\n 4: 'Fi',\n 5: '‘Id',\n 6: 'Ij',\n 7: 'Iq',\n};\n\nconst weekdayL = {\n 1: 'Glory',\n 2: 'Beauty',\n 3: 'Perfection',\n 4: 'Grace',\n 5: 'Justice',\n 6: 'Majesty',\n 7: 'Independence',\n};\n\nconst yearInVahid = {\n 1: 'Alif',\n 2: 'Bá’',\n 3: 'Ab',\n 4: 'Dál',\n 5: 'Báb',\n 6: 'Váv',\n 7: 'Abad',\n 8: 'Jád',\n 9: 'Bahá',\n 10: 'Ḥubb',\n 11: 'Bahháj',\n 12: 'Javáb',\n 13: 'Aḥad',\n 14: 'Vahháb',\n 15: 'Vidád',\n 16: 'Badí‘',\n 17: 'Bahí',\n 18: 'Abhá',\n 19: 'Váḥid',\n};\n\nconst vahid = 'Váḥid';\nconst kulliShay = 'Kull-i-_Sh_ay’';\nconst BE = 'B.E.';\nconst badiCalendar = 'Badí‘ Calendar';\nconst unicodeCharForZero = '0';\nconst defaultFormat = 'd MM+ y BE';\n\nexport { month, monthL, holyDay, weekday, weekdayAbbr3, weekdayAbbr2, weekdayL, yearInVahid, vahid, kulliShay, BE,\n badiCalendar, unicodeCharForZero, defaultFormat };\n","const month = {\n 1: 'البهاء',\n 2: 'الجلال',\n 3: 'الجمال',\n 4: 'العظمة',\n 5: 'النور',\n 6: 'الرحمة',\n 7: 'الكلمات',\n 8: 'الكمال',\n 9: 'الأسماء',\n 10: 'العزّة',\n 11: 'المشية',\n 12: 'العلم',\n 13: 'القدرة',\n 14: 'القول',\n 15: 'المسائل',\n 16: 'الشرف',\n 17: 'السلطان',\n 18: 'الملك',\n 19: 'العلاء',\n 20: 'ايام الهاء',\n};\n\nconst monthL = month;\n\nconst holyDay = {\n 1: 'عيد النَّيروز',\n 2: 'اليوم الأول من عيد الرِّضوان',\n 3: 'اليوم التاسع من عيد الرِّضوان',\n 4: 'اليوم الثاني عشر من عيد الرِّضوان',\n 5: 'يوم إعلان دعوة حضرة الباب',\n 6: 'يوم صعود حضرة بهاء الله',\n 7: 'يوم استشهاد حضرة الباب',\n 8: 'يوم ولادة حضرة الباب',\n 9: 'يوم ولادة حضرة بهاء الله',\n 10: 'يوم الميثاق',\n 11: 'يوم صعود حضرة عبد البهاء',\n};\n\nconst weekday = {\n 1: 'الجلال',\n 2: 'الجمال',\n 3: 'الكمال',\n 4: 'الفضّال',\n 5: 'العدّال',\n 6: 'الأستجلال',\n 7: 'الاستقلال',\n};\n\nconst weekdayAbbr3 = {\n 1: 'جلا',\n 2: 'جما',\n 3: 'كما',\n 4: 'فضّا',\n 5: 'عدّا',\n 6: 'اسج',\n 7: 'اسق',\n};\n\nconst weekdayAbbr2 = {\n 1: 'جل',\n 2: 'جم',\n 3: 'كم',\n 4: 'فض',\n 5: 'عد',\n 6: 'اج',\n 7: 'اق',\n};\n\nconst weekdayL = {\n 1: 'الجلال',\n 2: 'الجمال',\n 3: 'الكمال',\n 4: 'الفضّال',\n 5: 'العدّال',\n 6: 'الأستجلال',\n 7: 'أستقلال',\n};\n\nconst yearInVahid = {\n 1: 'ألف',\n 2: 'باء',\n 3: 'أب',\n 4: 'دﺍﻝ',\n 5: 'باب',\n 6: 'وﺍو',\n 7: 'أبد',\n 8: 'جاد',\n 9: 'بهاء',\n 10: 'حب',\n 11: 'بهاج',\n 12: 'جواب',\n 13: 'احد',\n 14: 'وﻫﺎب',\n 15: 'وداد',\n 16: 'بدیع',\n 17: 'بهي',\n 18: 'ابهى',\n 19: 'واحد',\n};\n\nconst vahid = 'واحد';\nconst kulliShay = 'كل شيء';\nconst BE = 'بديع';\nconst badiCalendar = 'تقويم بديع';\nconst unicodeCharForZero = '٠';\nconst defaultFormat = '&#8207;d MM y BE&#8207;';\n\nexport { month, monthL, holyDay, weekday, weekdayAbbr3, weekdayAbbr2, weekdayL, yearInVahid, vahid, kulliShay, BE,\n badiCalendar, unicodeCharForZero, defaultFormat };\n","/* eslint-disable dot-notation, line-comment-position, camelcase, sort-imports */\nimport * as en from './locale/en';\nimport * as ar from './locale/ar';\nimport * as de from './locale/de';\nimport * as es from './locale/es';\nimport * as fa from './locale/fa';\nimport * as fr from './locale/fr';\nimport * as lv from './locale/lv';\nimport * as nl from './locale/nl';\nimport * as pt from './locale/pt';\nimport * as ru from './locale/ru';\nimport * as sv from './locale/sv';\nimport * as zh from './locale/zh';\nimport * as en_us from './locale/en-us';\nimport { UnderlineFormat } from './types';\n\nconst badiLocale = { en, ar, de, es, fa, fr, lv, nl, pt, ru, sv, zh, 'en-us': en_us, default: en };\n\nconst setDefaultLanguage = (language: string) => {\n if (badiLocale[language] === undefined) {\n // eslint-disable-next-line no-console\n console.log('Chosen language does not exist. Setting has not been changed.');\n } else {\n badiLocale['default'] = badiLocale[language];\n }\n};\n\nlet underlineFormat = 'css';\n\nconst setUnderlineFormat = (format: UnderlineFormat) => {\n if (['css', 'u', 'diacritic', 'none'].includes(format)) {\n underlineFormat = format;\n } else {\n // eslint-disable-next-line no-console\n console.log('Invalid underline format. Choose one of [\"css\", \"u\", \"diacritic\", \"none\"]. ' +\n 'Setting has not been changed.');\n }\n};\n\nexport { badiLocale, setDefaultLanguage, setUnderlineFormat, underlineFormat };\n","const monthL = {\n 1: 'Herrlichkeit',\n 2: 'Ruhm',\n 3: 'Schönheit',\n 4: 'Größe',\n 5: 'Licht',\n 6: 'Barmherzigkeit',\n 7: 'Worte',\n 8: 'Vollkommenheit',\n 9: 'Namen',\n 10: 'Macht',\n 11: 'Wille',\n 12: 'Wissen',\n 13: 'Kraft',\n 14: 'Sprache',\n 15: 'Fragen',\n 16: 'Ehre',\n 17: 'Souveränität',\n 18: 'Herrschaft',\n 19: 'Erhabenheit',\n 20: 'Ayyám-i-Há',\n};\n\nconst holyDay = {\n 1: 'Naw-Rúz',\n 2: 'Erster Riḍván-Tag',\n 3: 'Neunter Riḍván-Tag',\n 4: 'Zwölfter Riḍván-Tag',\n 5: 'Erklärung des Báb',\n 6: 'Hinscheiden Bahá’u’lláhs',\n 7: 'Märtyrertod des Báb',\n 8: 'Geburt des Báb',\n 9: 'Geburt Bahá’u’lláhs',\n 10: 'Tag des Bundes',\n 11: 'Hinscheiden ‘Abdu’l-Bahás',\n};\n\nconst weekdayL = {\n 1: 'Ruhm',\n 2: 'Schönheit',\n 3: 'Vollkommenheit',\n 4: 'Gnade',\n 5: 'Gerechtigkeit',\n 6: 'Majestät',\n 7: 'Unabhängigkeit',\n};\n\nconst BE = 'B.E.';\nconst badiCalendar = 'Badí‘ Kalender';\n\nexport { monthL, holyDay, weekdayL, BE, badiCalendar };\n","const monthL = {\n 1: 'Esplendor',\n 2: 'Gloria',\n 3: 'Belleza',\n 4: 'Grandeza',\n 5: 'Luz',\n 6: 'Misericordia',\n 7: 'Palabras',\n 8: 'Perfección',\n 9: 'Nombres',\n 10: 'Fuerza',\n 11: 'Voluntad',\n 12: 'Conocimiento',\n 13: 'Poder',\n 14: 'Discurso',\n 15: 'Preguntas',\n 16: 'Honor',\n 17: 'Soberanía',\n 18: 'Dominio',\n 19: 'Sublimidad',\n 20: 'Ayyám-i-Há',\n};\n\nconst holyDay = {\n 1: 'Naw-Rúz',\n 2: 'Primer día de Riḍván',\n 3: 'Noveno día de Riḍván',\n 4: 'Duodécimo día de Riḍván',\n 5: 'Declaración del Báb',\n 6: 'Ascensión de Bahá’u’lláh',\n 7: 'Martirio del Báb',\n 8: 'Nacimiento del Báb',\n 9: 'Nacimiento de Bahá’u’lláh',\n 10: 'Día de la Alianza',\n 11: 'Fallecimiento de ‘Abdu’l-Bahá',\n};\n\nconst weekdayL = {\n 1: 'Gloria',\n 2: 'Belleza',\n 3: 'Perfección',\n 4: 'Gracia',\n 5: 'Justicia',\n 6: 'Majestuosidad',\n 7: 'Independencia',\n};\n\nconst BE = 'E.B.';\nconst badiCalendar = 'Calendario Badí‘';\n\nexport { monthL, holyDay, weekdayL, BE, badiCalendar };\n","const month = {\n 1: 'البهاء',\n 2: 'الجلال',\n 3: 'الجمال',\n 4: 'العظمة',\n 5: 'النور',\n 6: 'الرحمة',\n 7: 'الكلمات',\n 8: 'الكمال',\n 9: 'الأسماء',\n 10: 'العزّة',\n 11: 'المشية',\n 12: 'العلم',\n 13: 'القدرة',\n 14: 'القول',\n 15: 'المسائل',\n 16: 'الشرف',\n 17: 'السلطان',\n 18: 'الملك',\n 19: 'العلاء',\n 20: 'ايام الهاء',\n};\n\nconst monthL = {\n 1: 'بهاء',\n 2: 'جلال',\n 3: 'جمال',\n 4: 'عظمت',\n 5: 'نور',\n 6: 'رحمت',\n 7: 'كلمات',\n 8: 'كمال',\n 9: 'أسماء',\n 10: 'عزّت',\n 11: 'مشيت',\n 12: 'علم',\n 13: 'قدرت',\n 14: 'قول',\n 15: 'مسائل',\n 16: 'شرف',\n 17: 'سلطان',\n 18: 'ملك',\n 19: 'علاء',\n 20: 'ايام ها',\n};\n\nconst holyDay = {\n 1: 'عید نوروز',\n 2: 'روز اوّل عید رضوان',\n 3: 'روز نهم عید رضوان',\n 4: 'روز دوازدهم عید رضوان',\n 5: 'بعثت حضرت باب',\n 6: 'صعود حضرت بهاالله',\n 7: 'شهادت حضرت اعلی',\n 8: 'تولّد حضرت اعلی',\n 9: 'تولّد حضرت بهالله',\n 10: 'روز عهد و میثاق',\n 11: 'صعود حضرت عبدالبها',\n};\n\nconst weekday = {\n 1: 'یوم الجلال',\n 2: 'یوم الجمال',\n 3: 'یوم الكمال',\n 4: 'یوم الفضّال',\n 5: 'یوم العدّال',\n 6: 'یوم الأستجلال',\n 7: 'یوم الاستقلال',\n};\n\nconst weekdayAbbr3 = {\n 1: 'جلا',\n 2: 'جما',\n 3: 'كما',\n 4: 'فضّا',\n 5: 'عدّا',\n 6: 'اسج',\n 7: 'اسق',\n};\n\nconst weekdayAbbr2 = {\n 1: 'جل',\n 2: 'جم',\n 3: 'كم',\n 4: 'فض',\n 5: 'عد',\n 6: 'اج',\n 7: 'اق',\n};\n\nconst weekdayL = {\n 1: 'جلال',\n 2: 'جمال',\n 3: 'كمال',\n 4: 'فضّال',\n 5: 'عدّال',\n 6: 'استجلال',\n 7: 'استقلال',\n};\n\nconst yearInVahid = {\n 1: 'ألف',\n 2: 'باء',\n 3: 'أب',\n 4: 'دﺍﻝ',\n 5: 'باب',\n 6: 'وﺍو',\n 7: 'أبد',\n 8: 'جاد',\n 9: 'بهاء',\n 10: 'حب',\n 11: 'بهاج',\n 12: 'جواب',\n 13: 'احد',\n 14: 'وﻫﺎب',\n 15: 'وداد',\n 16: 'بدیع',\n 17: 'بهي',\n 18: 'ابهى',\n 19: 'واحد',\n};\n\nconst vahid = 'واحد';\nconst kulliShay = 'كل شيء';\nconst BE = 'بديع';\nconst badiCalendar = 'تقويم بديع';\nconst unicodeCharForZero = '۰';\nconst defaultFormat = '&#8207;d MML y BE&#8207;';\n\nexport { month, monthL, holyDay, weekday, weekdayAbbr3, weekdayAbbr2, weekdayL, yearInVahid, vahid, kulliShay, BE,\n badiCalendar, unicodeCharForZero, defaultFormat };\n","const monthL = {\n 1: 'Splendeur',\n 2: 'Gloire',\n 3: 'Beauté',\n 4: 'Grandeur',\n 5: 'Lumière',\n 6: 'Miséricorde',\n 7: 'Paroles',\n 8: 'Perfection',\n 9: 'Noms',\n 10: 'Puissance',\n 11: 'Volonté',\n 12: 'Connaissance',\n 13: 'Pouvoir',\n 14: 'Discours',\n 15: 'Questions',\n 16: 'Honneur',\n 17: 'Souveraineté',\n 18: 'Empire',\n 19: 'Élévation',\n 20: 'Ayyám-i-Há',\n};\n\nconst holyDay = {\n 1: 'Naw-Rúz',\n 2: 'Premier jour de Riḍván',\n 3: 'Neuvième jour de Riḍván',\n 4: 'Douzième jour de Riḍván',\n 5: 'Déclaration du Báb',\n 6: 'Ascension de Bahá’u’lláh',\n 7: 'Martyre du Báb',\n 8: 'Naissance du Báb',\n 9: 'Naissance de Bahá’u’lláh',\n 10: 'Jour de l’Alliance',\n 11: 'Ascension de ‘Abdu’l-Bahá',\n};\n\nconst weekdayL = {\n 1: 'Gloire',\n 2: 'Beauté',\n 3: 'Perfection',\n 4: 'Grâce',\n 5: 'Justice',\n 6: 'Majesté',\n 7: 'Indépendance',\n};\n\nconst BE = 'E.B.';\nconst badiCalendar = 'Calendrier Badí‘';\n\nexport { monthL, holyDay, weekdayL, BE, badiCalendar };\n","const monthL = {\n 1: 'Spožums',\n 2: 'Slava',\n 3: 'Skaistums',\n 4: 'Dižums',\n 5: 'Gaisma',\n 6: 'Žēlastība',\n 7: 'Vārdi',\n 8: 'Pilnība',\n 9: 'Nosaukumi',\n 10: 'Varenība',\n 11: 'Griba',\n 12: 'Zināšanas',\n 13: 'Vara',\n 14: 'Runa',\n 15: 'Jautājumi',\n 16: 'Gods',\n 17: 'Suverenitāte',\n 18: 'Valdīšana',\n 19: 'Cēlums',\n 20: 'Ayyám-i-Há',\n};\n\nconst holyDay = {\n 1: 'Naw-Rúz',\n 2: 'Riḍván pirmā diena',\n 3: 'Riḍván devītā diena',\n 4: 'Riḍván divpadsmitā diena',\n 5: 'Bába paziņojums',\n 6: 'Bahá’u’lláh Debessbraukšana',\n 7: 'Bába mocekļa nāve',\n 8: 'Bába dzimšanas diena',\n 9: 'Bahá’u’lláh dzimšanas diena',\n 10: 'Derības diena',\n 11: '‘Abdu’l-Bahá Debessbraukšana',\n};\n\nconst weekdayL = {\n 1: 'Slava',\n 2: 'Skaistums',\n 3: 'Pilnība',\n 4: 'Žēlastība',\n 5: 'Taisnīgums',\n 6: 'Majestātiskums',\n 7: 'Neatkarība',\n};\n\nconst BE = 'B.Ē.';\nconst badiCalendar = 'Badí‘ kalendārs';\n\nexport { monthL, holyDay, weekdayL, BE, badiCalendar };\n","const monthL = {\n 1: 'Pracht',\n 2: 'Heerlijkheid',\n 3: 'Schoonheid',\n 4: 'Grootheid',\n 5: 'Licht',\n 6: 'Barmhartigheid',\n 7: 'Woorden',\n 8: 'Volmaaktheid',\n 9: 'Namen',\n 10: 'Macht',\n 11: 'Wil',\n 12: 'Kennis',\n 13: 'Kracht',\n 14: 'Spraak',\n 15: 'Vragen',\n 16: 'Eer',\n 17: 'Soevereiniteit',\n 18: 'Heerschappij',\n 19: 'Verhevenheid',\n 20: 'Ayyám-i-Há',\n};\n\nconst holyDay = {\n 1: 'Naw-Rúz',\n 2: 'Eerste dag van Riḍván',\n 3: 'Negende dag van Riḍván',\n 4: 'Twaalfde dag van Riḍván',\n 5: 'Verkondiging van de Báb',\n 6: 'Heengaan van Bahá’u’lláh',\n 7: 'Marteldood van de Báb',\n 8: 'Geboortedag van de Báb',\n 9: 'Geboortedag van Bahá’u’lláh',\n 10: 'Dag van het Verbond',\n 11: 'Heengaan van ‘Abdu’l-Bahá',\n};\n\nconst weekdayL = {\n 1: 'Heerlijkheid',\n 2: 'Schoonheid',\n 3: 'Volmaaktheid',\n 4: 'Genade',\n 5: 'Gerechtigheid',\n 6: 'Majesteit',\n 7: 'Onafhankelijkheid',\n};\n\nconst BE = 'B.E.';\nconst badiCalendar = 'Badí‘-Kalender';\n\nexport { monthL, holyDay, weekdayL, BE, badiCalendar };\n","const monthL = {\n 1: 'Esplendor',\n 2: 'Glória',\n 3: 'Beleza',\n 4: 'Grandeza',\n 5: 'Luz',\n 6: 'Miséricórdia',\n 7: 'Palavras',\n 8: 'Perfeição',\n 9: 'Nomes',\n 10: 'Potência',\n 11: 'Vontade',\n 12: 'Conhecimento',\n 13: 'Poder',\n 14: 'Discurso',\n 15: 'Perguntas',\n 16: 'Honra',\n 17: 'Soberania',\n 18: 'Domínio',\n 19: 'Sublimidade',\n 20: 'Ayyám-i-Há',\n};\n\nconst holyDay = {\n 1: 'Naw-Rúz',\n 2: '1º dia do Riḍván',\n 3: '9º dia do Riḍván',\n 4: '12º dia do Riḍván',\n 5: 'Declaração do Báb',\n 6: 'Ascensão de Bahá’u’lláh',\n 7: 'Martírio do Báb',\n 8: 'Aniversário do Báb',\n 9: 'Aniversário de Bahá’u’lláh',\n 10: 'Dia do Convênio',\n 11: 'Ascensão de ‘Abdu’l-Bahá',\n};\n\nconst weekdayL = {\n 1: 'Glória',\n 2: 'Beleza',\n 3: 'Perfeição',\n 4: 'Graça',\n 5: 'Justiça',\n 6: 'Majestade',\n 7: 'Independência',\n};\n\nconst BE = 'E.B.';\nconst badiCalendar = 'Calendário Badí‘';\n\nexport { monthL, holyDay, weekdayL, BE, badiCalendar };\n","const month = {\n 1: 'Бахā',\n 2: 'Джалāл',\n 3: 'Джамāл',\n 4: '‘Аз̣амат',\n 5: 'Нӯр',\n 6: 'Рах̣мат',\n 7: 'Калимāт',\n 8: 'Камāл',\n 9: 'Асмā’',\n 10: '‘Иззат',\n 11: 'Машӣййат',\n 12: '‘Илм',\n 13: 'К̣удрат',\n 14: 'К̣аул',\n 15: 'Масā’ил',\n 16: 'Шараф',\n 17: 'Султ̣ан',\n 18: 'Мулк',\n 19: '‘Алā’',\n 20: 'Аййāм-и Хā',\n};\n\nconst monthL = {\n 1: 'Великолепие',\n 2: 'Слава',\n 3: 'Красота',\n 4: 'Величие',\n 5: 'Свет',\n 6: 'Милость',\n 7: 'Слова',\n 8: 'Совершенство',\n 9: 'Имена',\n 10: 'Мощь',\n 11: 'Воля',\n 12: 'Знание',\n 13: 'Могущество',\n 14: 'Речь',\n 15: 'Вопросы',\n 16: 'Честь',\n 17: 'Владычество',\n 18: 'Господство',\n 19: 'Возвышенность',\n 20: 'Аййāм-и Хā',\n};\n\nconst holyDay = {\n 1: 'Нау-Рӯз',\n 2: '1-й день Рид̣вāна',\n 3: '9-й день Рид̣вāна',\n 4: '12-й день Рид̣вāна',\n 5: 'Возвещение Баба',\n 6: 'Вознесение Бахауллы',\n 7: 'Мученическая Баба',\n 8: 'рождения Баба',\n 9: 'рождения Бахауллы',\n 10: 'День Завета',\n 11: 'Вознесение Абдул-Баха',\n};\n\nconst weekday = {\n 1: 'Джалāл',\n 2: 'Джамāл',\n 3: 'Камāл',\n 4: 'Фид̣āл',\n 5: '‘Идāл',\n 6: 'Истиджлāл',\n 7: 'Истик̣лāл',\n};\n\nconst weekdayAbbr3 = {\n 1: 'Джл',\n 2: 'Джм',\n 3: 'Кам',\n 4: 'Фид̣',\n 5: '‘Идā',\n 6: 'Исд',\n 7: 'Иск̣',\n};\n\nconst weekdayAbbr2 = {\n 1: 'Дл',\n 2: 'Дм',\n 3: 'Ка',\n 4: 'Фи',\n 5: '‘Ид',\n 6: 'Ид',\n 7: 'Ик̣',\n};\n\nconst weekdayL = {\n 1: 'Слава',\n 2: 'Красота',\n 3: 'Совершенство',\n 4: 'Благодать',\n 5: 'Справедливость',\n 6: 'Величие',\n 7: 'Независимость',\n};\n\nconst yearInVahid = {\n 1: 'Алиф',\n 2: 'Бā’',\n 3: 'Аб',\n 4: 'Дāл',\n 5: 'Бāб',\n 6: 'Вāв',\n 7: 'Абад',\n 8: 'Джāд',\n 9: 'Бахā',\n 10: 'Х̣убб',\n 11: 'Баххāдж',\n 12: 'Джавāб',\n 13: 'Ах̣ад',\n 14: 'Ваххāб',\n 15: 'Видāд',\n 16: 'Бадӣ‘',\n 17: 'Бахӣ',\n 18: 'Абхā',\n 19: 'Вāх̣ид',\n};\n\nconst vahid = 'Вāх̣ид';\nconst kulliShay = 'кулл-и шай’';\nconst BE = 'Э.Б.';\nconst badiCalendar = 'Календарь Бадӣ‘';\n\nexport { month, monthL, holyDay, weekday, weekdayAbbr3, weekdayAbbr2, weekdayL, yearInVahid, vahid, kulliShay, BE,\n badiCalendar };\n","const monthL = {\n 1: 'Praktfullhet',\n 2: 'Härlighet',\n 3: 'Skönhet',\n 4: 'Storhet',\n 5: 'Ljus',\n 6: 'Barmhärtighet',\n 7: 'Ord',\n 8: 'Fullkomlighet',\n 9: 'Namn',\n 10: 'Makt',\n 11: 'Vilja',\n 12: 'Kunskap',\n 13: 'Kraft',\n 14: 'Tal',\n 15: 'Frågor',\n 16: 'Ära',\n 17: 'Överhöghet',\n 18: 'Herravälde',\n 19: 'Upphöjdhet',\n 20: 'Ayyám-i-Há',\n};\n\nconst holyDay = {\n 1: 'Naw-Rúz',\n 2: 'Första Riḍván',\n 3: 'Nionde Riḍván',\n 4: 'Tolfte Riḍván',\n 5: 'Bábs Deklaration',\n 6: 'Bahá’u’lláhs Bortgång',\n 7: 'Bábs Martyrskap',\n 8: 'Bábs Födelse',\n 9: 'Bahá’u’lláhs Födelse',\n 10: 'Förbundets dag',\n 11: '‘Abdu’l-Bahás Bortgång',\n};\n\nconst weekdayL = {\n 1: 'Härlighet',\n 2: 'Skönhet',\n 3: 'Fullkomlighet',\n 4: 'Nåd',\n 5: 'Rättvisa',\n 6: 'Majestät',\n 7: 'Oberoende',\n};\n\nconst BE = 'B.E.';\nconst badiCalendar = 'Badí‘kalendern';\n\nexport { monthL, holyDay, weekdayL, BE, badiCalendar };\n","const month = {\n 1: '巴哈',\n 2: '贾拉勒',\n 3: '贾迈勒',\n 4: '阿泽迈特',\n 5: '努尔',\n 6: '拉赫迈特',\n 7: '凯利马特',\n 8: '卡迈勒',\n 9: '艾斯玛',\n 10: '伊扎特',\n 11: '迈希耶特',\n 12: '伊勒姆',\n 13: '古德雷特',\n 14: '高勒',\n 15: '迈萨伊勒',\n 16: '谢拉夫',\n 17: '苏丹',\n 18: '穆勒克',\n 19: '阿拉',\n 20: '阿亚米哈',\n};\n\nconst monthL = {\n 1: '耀',\n 2: '辉',\n 3: '美',\n 4: '宏',\n 5: '光',\n 6: '仁',\n 7: '言',\n 8: '完',\n 9: '名',\n 10: '能',\n 11: '意',\n 12: '知',\n 13: '力',\n 14: '语',\n 15: '问',\n 16: '尊',\n 17: '权',\n 18: '统',\n 19: '崇',\n 20: '哈之日',\n};\n\nconst holyDay = {\n 1: '诺鲁孜节',\n 2: '里兹万节第一日',\n 3: '里兹万节第九日',\n 4: '里兹万节第十二日',\n 5: '巴孛宣示日',\n 6: '巴哈欧拉升天日',\n 7: '巴孛殉道日',\n 8: '巴孛诞辰',\n 9: '巴哈欧拉诞辰',\n 10: '圣约日',\n 11: '阿博都-巴哈升天日',\n};\n\nconst weekday = {\n 1: '贾拉勒',\n 2: '贾迈勒',\n 3: '卡迈勒',\n 4: '菲达勒',\n 5: '伊达勒',\n 6: '伊斯提杰拉勒',\n 7: '伊斯提格拉勒',\n};\n\nconst weekdayAbbr3 = {\n 1: '贾拉勒',\n 2: '贾迈勒',\n 3: '卡迈勒',\n 4: '菲达勒',\n 5: '伊达勒',\n 6: '伊斯杰',\n 7: '伊斯格',\n};\n\nconst weekdayAbbr2 = {\n 1: '贾拉',\n 2: '贾迈',\n 3: '卡迈',\n 4: '菲达',\n 5: '伊达',\n 6: '伊杰',\n 7: '伊格',\n};\n\nconst weekdayL = {\n 1: '辉日',\n 2: '美日',\n 3: '完日',\n 4: '恩日',\n 5: '正日',\n 6: '威日',\n 7: '独日',\n};\n\nconst yearInVahid = {\n 1: '艾利夫',\n 2: '巴',\n 3: '艾卜',\n 4: '达勒',\n 5: '巴卜',\n 6: '瓦乌',\n 7: '阿巴德',\n 8: '贾德',\n 9: '巴哈',\n 10: '胡卜',\n 11: '巴哈杰',\n 12: '贾瓦卜',\n 13: '阿哈德',\n 14: '瓦哈卜',\n 15: '维达德',\n 16: '巴迪',\n 17: '巴希',\n 18: '阿卜哈',\n 19: '瓦希德',\n};\n\nconst vahid = '瓦希德';\nconst kulliShay = '库里沙伊';\nconst BE = 'BE';\nconst badiCalendar = '巴迪历';\n\nexport { month, monthL, holyDay, weekday, weekdayAbbr3, weekdayAbbr2, weekdayL, yearInVahid, vahid, kulliShay, BE,\n badiCalendar };\n","const monthL = {\n 1: 'Splendor',\n 16: 'Honor',\n};\n\nexport { monthL };\n","import { badiLocale, underlineFormat } from './badiLocale';\nimport { BadiDate } from './badiDate';\n\nconst formatTokens: Array<Array<string>> = [\n ['DDL', 'DD+', 'MML', 'MM+', 'WWL', 'yyv', 'KiS'],\n ['dd', 'DD', 'mm', 'MM', 'ww', 'WW', 'yv', 'YV', 'vv', 'kk', 'yy', 'BE', 'BC', 'Va'],\n ['d', 'D', 'm', 'M', 'W', 'v', 'k', 'y']];\n\n// eslint-disable-next-line complexity\nconst formatBadiDate = (badiDate: BadiDate, formatString?: string, language?: string): string => {\n if (!badiDate.isValid) {\n return 'Not a valid Badí‘ date';\n }\n if (typeof language === 'string' && badiLocale[language] === undefined && language.includes('-')) {\n language = language.split('-')[0];\n }\n if (language === undefined || badiLocale[language] === undefined) {\n language = 'default';\n }\n formatString = formatString ?? formatItemFallback(language, 'defaultFormat');\n let formattedDate = '';\n const length = formatString.length;\n for (let i = 0; i < length; i++) {\n // Text wrapped in {} is output as-is. A '{' without a matching '}'\n // results in invalid input\n if (formatString[i] === '{' && i < length - 1) {\n for (let j = i + 1; j <= length; j++) {\n if (j === length) {\n return 'Invalid formatting string.';\n }\n if (formatString[j] === '}') {\n i = j;\n break;\n }\n formattedDate += formatString[j];\n }\n } else {\n const next1 = formatString[i];\n const next2 = next1 + formatString[i + 1];\n const next3 = next2 + formatString[i + 2];\n if (formatTokens[0].includes(next3)) {\n formattedDate += getFormatItem(badiDate, next3, language);\n i += 2;\n } else if (formatTokens[1].includes(next2)) {\n formattedDate += getFormatItem(badiDate, next2, language);\n i += 1;\n } else if (formatTokens[2].includes(next1)) {\n formattedDate += getFormatItem(badiDate, next1, language);\n } else {\n formattedDate += next1;\n }\n }\n }\n return formattedDate;\n};\n\n// eslint-disable-next-line complexity\nconst getFormatItem = (badiDate: BadiDate, token: string, language: string): string => {\n switch (token) {\n // Single character tokens\n case 'd':\n return digitRewrite(badiDate.day, language);\n case 'D':\n return postProcessLocaleItem(formatItemFallback(language, 'month', badiDate.day), 3);\n case 'm':\n return digitRewrite(badiDate.month, language);\n case 'M':\n return postProcessLocaleItem(formatItemFallback(language, 'month', badiDate.month), 3);\n case 'W':\n return formatItemFallback(language, 'weekdayAbbr3', (badiDate.gregorianDate.weekday + 1) % 7 + 1);\n case 'y':\n return digitRewrite(badiDate.year, language);\n case 'v':\n return digitRewrite((Math.floor((badiDate.year - 1) / 19) % 19) + 1, language);\n case 'k':\n return digitRewrite(Math.floor((badiDate.year - 1) / 361) + 1, language);\n // Two character tokens\n case 'dd':\n return digitRewrite((`0${String(badiDate.day)}`).slice(-2), language);\n case 'DD':\n return postProcessLocaleItem(formatItemFallback(language, 'month', badiDate.day));\n case 'mm':\n return digitRewrite((`0${String(badiDate.month)}`).slice(-2), language);\n case 'MM':\n return postProcessLocaleItem(formatItemFallback(language, 'month', badiDate.month));\n case 'ww':\n return formatItemFallback(language, 'weekdayAbbr2', (badiDate.gregorianDate.weekday + 1) % 7 + 1);\n case 'WW':\n return formatItemFallback(language, 'weekday', (badiDate.gregorianDate.weekday + 1) % 7 + 1);\n case 'yy':\n return digitRewrite((`00${String(badiDate.year)}`).slice(-3), language);\n case 'yv':\n return digitRewrite((badiDate.year - 1) % 19 + 1, language);\n case 'YV':\n return formatItemFallback(language, 'yearInVahid', (badiDate.year - 1) % 19 + 1);\n case 'vv':\n return digitRewrite(\n (`0${String((Math.floor((badiDate.year - 1) / 19) + 2) % 19 - 1)}`).slice(-2), language);\n case 'kk':\n return digitRewrite((`0${String(Math.floor((badiDate.year - 1) / 361) + 1)}`).slice(-2), language);\n case 'Va':\n return formatItemFallback(language, 'vahid');\n case 'BE':\n return formatItemFallback(language, 'BE');\n case 'BC':\n return formatItemFallback(language, 'badiCalendar');\n // Three character tokens\n case 'DDL':\n return formatItemFallback(language, 'monthL', badiDate.day);\n case 'DD+': {\n const day = postProcessLocaleItem(formatItemFallback(language, 'month', badiDate.day));\n const dayL = formatItemFallback(language, 'monthL', badiDate.day);\n if (day === dayL) {\n return day;\n }\n if (badiLocale[language] === badiLocale.fa) {\n return `<span dir=\"rtl\">${day} (${dayL})</span>`;\n }\n return `${day} (${dayL})`;\n }\n case 'MML':\n return formatItemFallback(language, 'monthL', badiDate.month);\n case 'MM+': {\n const month = postProcessLocaleItem(formatItemFallback(language, 'month', badiDate.month));\n const monthL = formatItemFallback(language, 'monthL', badiDate.month);\n if (month === monthL) {\n return month;\n }\n if (badiLocale[language] === badiLocale.fa) {\n return `<span dir=\"rtl\">${month} (${monthL})</span>`;\n }\n return `${month} (${monthL})`;\n }\n case 'WWL':\n return formatItemFallback(language, 'weekdayL', (badiDate.gregorianDate.weekday + 1) % 7 + 1);\n case 'yyv':\n return digitRewrite((`0${String((badiDate.year - 1) % 19 + 1)}`).slice(-2), language);\n case 'KiS':\n return postProcessLocaleItem(formatItemFallback(language, 'kulliShay'));\n // istanbul ignore next\n default:\n return '';\n }\n};\n\nconst postProcessLocaleItem = (item: string, crop?: number): string => {\n if (crop && crop < item.length) {\n let char = 0;\n let counter = 0;\n while (counter < crop) {\n if (!'_’‘'.includes(item[char])) {\n counter++;\n }\n char++;\n }\n if ('_’‘'.includes(item[char])) {\n char++;\n }\n item = item.slice(0, char);\n if (item.split('_').length % 2 === 0) {\n item += '_';\n }\n }\n const stringComponents = item.split('_');\n for (let i = 1; i < stringComponents.length; i += 2) {\n stringComponents[i] = underlineString(stringComponents[i]);\n }\n return stringComponents.join('');\n};\n\nconst underlineString = (str: string): string => {\n switch (underlineFormat) {\n case 'css':\n return `<span style=\"text-decoration:underline\">${str}</span>`;\n case 'diacritic':\n return str.split('').map(char => `${char}\\u0332`).join('');\n case 'u':\n return `<u>${str}</u>`;\n case 'none':\n return str;\n // istanbul ignore next\n default:\n throw new TypeError('Unexpected underlineFormat');\n }\n};\n\nconst digitRewrite = (number: number | string, language: string): string => {\n number = String(number);\n const unicodeOffset = formatItemFallback(language, 'unicodeCharForZero').charCodeAt(0) - '0'.charCodeAt(0);\n if (unicodeOffset === 0) {\n return number;\n }\n const codePoints = [...number].map(num => num.charCodeAt(0) + unicodeOffset);\n return String.fromCharCode(...codePoints);\n};\n\nconst formatItemFallback = (language: string, category: string, index?: number): string => {\n if (index === undefined) {\n while (badiLocale[language][category] === undefined) {\n language = languageFallback(language);\n }\n return badiLocale[language][category];\n }\n while (badiLocale[language][category]?.[index] === undefined) {\n language = languageFallback(language);\n }\n return badiLocale[language][category][index];\n};\n\nconst languageFallback = (languageCode: string): string => {\n if (languageCode.includes('-')) {\n return languageCode.split('-')[0];\n // eslint-disable-next-line no-negated-condition\n } else if (languageCode !== 'default') {\n return 'default';\n }\n return 'en';\n};\n\nexport { formatBadiDate, formatItemFallback };\n","const badiYears = [\n 'l4da', 'k4ci', 'k5c7', 'l4d6', 'l4ce', 'k4c4', 'k5d4', 'l4cb', 'l4c1', 'k4cj', 'k5c8', 'l4d7', 'l4cf', 'k4c5',\n 'k4d5', 'k5ce', 'l4c2', 'k4d2', 'k4ca', 'k5da', 'l4ch', 'k4c6', 'k4d6', 'k5cf', 'l4c4', 'k4d4', 'k4cc', 'k5c1',\n 'l4cj', 'k4c8', 'k4d8', 'k5cg', 'l4c5', 'k4d5', 'k4ce', 'k5c3', 'l4d2', 'k4ca', 'k4d9', 'k5ci', 'l4c6', 'k4d6',\n 'k4cf', 'k4c4', 'k5d4', 'k4cb', 'k4bj', 'k4cj', 'k5c9', 'k4d8', 'k4cg', 'k4c6', 'k5d6', 'k4cd', 'k4c2', 'k4d2',\n 'k5ca', 'k4d9', 'k4ci', 'k4c7', 'k5d7', 'k4cf', 'k4c4', 'k4d4', 'k5cc', 'k4bj', 'k4cj', 'k4c9', 'k5d9', 'k4cg',\n 'k4c6', 'k4d5', 'k5cd', 'k4c2', 'k4d1', 'k4ca', 'k4da', 'j5cj', 'k4c7', 'k4d7', 'k4cf', 'j5c4', 'k4d3', 'k4cb',\n 'k4c1', 'k5d1', 'l4c9', 'l4d9', 'l4ch', 'k5c6', 'l4d5', 'l4cd', 'l4c2', 'k5d2', 'l4ca', 'l4da', 'l4cj', 'k5c8',\n 'l4d7', 'l4cf', 'l4c4', 'k5d4', 'l4cb', 'l4c1', 'l4d1', 'k5c9', 'l4d8', 'l4cg', 'l4c5', 'k4d5', 'k5ce', 'l4c2',\n 'l4d2', 'k4cb', 'k5db', 'l4ci', 'l4c7', 'k4d7', 'k5cf', 'l4c4', 'l4d4', 'k4cc', 'k5c2', 'l4d1', 'l4c9', 'k4d9',\n 'k5ch', 'l4c5', 'l4d5', 'k4ce', 'k5c3', 'l4d2', 'l4cb', 'k4da', 'k5ci', 'l4c6', 'l4d6', 'k4cf', 'k5c5', 'l4d4',\n 'l4cc', 'k4c1', 'k4d1', 'k5c9', 'l4d8', 'k4cg', 'k4c6', 'k5d6', 'l4ce', 'k4c3', 'k4d3', 'k5cb', 'l4da', 'k4ci',\n 'k4c7', 'k5d7', 'l4cf', 'k4c5', 'k4d5', 'k5cd', 'l4c1', 'k4cj', 'k4c9', 'k5d9', 'l4cg', 'k4c6', 'k4d6', 'k5ce',\n 'l4c3', 'k4d2', 'k4ca', 'k5bj', 'l4ci', 'k4c7', 'k4d7', 'k4cg', 'k5c5', 'k4d4', 'k4cc', 'k4c1', 'k5d1', 'k4c9',\n 'k4d9', 'k4ch', 'k5c7', 'l4d6', 'l4ce', 'l4c3', 'l5d3', 'l4ca', 'l4da', 'l4cj', 'l5c8', 'l4d7', 'l4cg', 'l4c5',\n 'l5d4', 'l4cb', 'l4c1', 'l4d1', 'l5ca', 'l4d9', 'l4ch', 'l4c6', 'l5d6', 'l4cd', 'l4c2', 'l4d2', 'l4cb', 'k5c1',\n 'l4cj', 'l4c8', 'l4d8', 'k5cg', 'l4c4', 'l4d4', 'l4cc', 'k5c2', 'l4d1', 'l4ca', 'l4da', 'k5ci', 'l4c6', 'l4d5',\n 'l4ce', 'k5c3', 'l4d2', 'l4cb', 'l4db', 'k5cj', 'l4c8', 'l4d7', 'l4cf', 'k5c5', 'l4d4', 'l4cc', 'l4c2', 'k5d2',\n 'l4c9', 'l4d9', 'l4ch', 'k4c6', 'k5d6', 'l4ce', 'l4c3', 'k4d3', 'k5cc', 'l4db', 'l4cj', 'k4c8', 'k5d8', 'l4cf',\n 'l4c4', 'k4d5', 'k5cd', 'l4c2', 'l4d2', 'k4ca', 'k5d9', 'l4cg', 'l4c6', 'k4d6', 'k5cf', 'l4c3', 'l4d3', 'k4cb',\n 'k5bj', 'l4ci', 'l4c7', 'k4d7', 'k5cg', 'l4c5', 'l4d5', 'k4cd', 'k4c2', 'k5d2', 'l4c9', 'k4d9', 'k4ch', 'k5c7',\n 'l4d6', 'k4cf', 'k4c4', 'k5d4', 'l4cb', 'l4bj', 'l4cj', 'l5c8', 'm4d7', 'l4cg', 'l4c5', 'l5d5', 'm4cc', 'l4c1',\n 'l4d1', 'l5ca', 'm4d9', 'l4ch', 'l4c7', 'l5d7', 'm4ce', 'l4c3', 'l4d3', 'l5cb', 'm4bi', 'l4ci', 'l4c8', 'l4d8',\n 'l5ch', 'l4c5', 'l4d5', 'l4cd', 'l5c2', 'l4d1', 'l4c9', 'l4da', 'l5ci', 'l4c7', 'l4d7', 'l4cf', 'l5c4', 'l4d2',\n 'l4cb', 'l4bj', 'l5d1', 'l4c8', 'l4d8', 'l4cg', 'l5c5', 'l4d4', 'l4cc', 'l4c2', 'l5d2', 'l4c9', 'l4da', 'l4ci',\n];\n\nexport { badiYears };\n","import * as luxon from 'luxon';\nimport { badiLocale, setDefaultLanguage, setUnderlineFormat } from './badiLocale';\nimport { formatBadiDate, formatItemFallback } from './formatter';\nimport { BadiDateSettings, BadiYearInfo, HolyDay, InputDate, YearHolyDayNumber, YearMonthDay } from './types';\nimport { badiYears } from './badiYears';\n\nclass BadiDate {\n private _gregorianDate: luxon.DateTime;\n private _year: number;\n private _month: number;\n private _day: number;\n private _nawRuz: luxon.DateTime;\n private _ayyamiHaLength: number;\n private _yearTwinBirthdays: Array<number>;\n private _holyDay?: HolyDay = undefined;\n private _valid: boolean = true;\n private _invalidReason: string = undefined;\n\n constructor(date: InputDate) {\n try {\n if (this._isDateObject(date)) {\n this._gregorianDate = luxon.DateTime.fromObject(\n { year: date.getFullYear(), month: date.getMonth() + 1, day: date.getDate(), zone: 'UTC' });\n } else if (luxon.DateTime.isDateTime(date)) {\n this._gregorianDate = luxon.DateTime.fromObject(\n { year: date.year, month: date.month, day: date.day, zone: 'UTC' });\n } else if (this._isYearMonthDay(date) || this._isYearHolyDayNumber(date)) {\n this._setFromBadiDate(date);\n } else {\n throw new TypeError('Unrecognized input format');\n }\n if (this._year === undefined) {\n // We haven't set the Badí' date yet\n this._setFromGregorianDate();\n }\n this._setHolyDay();\n } catch (err) {\n this._setInvalid(err);\n }\n Object.freeze(this);\n }\n\n format(formatString?: string, language?: string): string {\n return formatBadiDate(this, formatString, language);\n }\n\n _isDateObject(arg: any): arg is Date {\n return Object.prototype.toString.call(arg) === '[object Date]';\n }\n\n _isYearMonthDay(arg: any): arg is YearMonthDay {\n return typeof arg.year === 'number' && typeof arg.month === 'number' &&\n typeof arg.day === 'number';\n }\n\n _isYearHolyDayNumber(arg: any): arg is YearHolyDayNumber {\n return typeof arg.year === 'number' && arg.month === undefined &&\n arg.day === undefined && typeof arg.holyDayNumber === 'number';\n }\n\n _notInValidGregorianDateRange(datetime: luxon.DateTime): boolean {\n const lowerBound = luxon.DateTime.fromObject({ year: 1844, month: 3, day: 21, zone: 'UTC' });\n const upperBound = luxon.DateTime.fromObject({ year: 2351, month: 3, day: 20, zone: 'UTC' });\n return datetime < lowerBound || datetime > upperBound;\n }\n\n _setFromGregorianDate() {\n if (this._notInValidGregorianDateRange(this._gregorianDate)) {\n throw new RangeError('Input date outside of valid range (1844-03-21 - 2351-03-20)');\n }\n const gregorianYear = this._gregorianDate.year;\n const oldImplementationCutoff = luxon.DateTime.fromObject({ year: 2015, month: 3, day: 21, zone: 'UTC' });\n if (this._gregorianDate < oldImplementationCutoff) {\n const { month, day } = this._gregorianDate;\n if (month < 3 || (month === 3 && day < 21)) {\n this._nawRuz = luxon.DateTime.fromObject({ year: gregorianYear - 1, month: 3, day: 21, zone: 'UTC' });\n this._year = gregorianYear - 1844;\n } else {\n this._nawRuz = luxon.DateTime.fromObject({ year: gregorianYear, month: 3, day: 21, zone: 'UTC' });\n this._year = gregorianYear - 1843;\n }\n this._setOldAyyamiHaLength();\n this._yearTwinBirthdays = [12, 5, 13, 9];\n } else {\n this._year = gregorianYear - 1843;\n this._setBadiYearInfo(true);\n }\n this._setBadiMonthAndDay();\n }\n\n /**\n * Set Badí' month and day from Gregorian date\n */\n _setBadiMonthAndDay() {\n const dayOfBadiYear = this._dayOfYear(this._gregorianDate);\n if (dayOfBadiYear < 343) {\n this._month = Math.floor((dayOfBadiYear - 1) / 19 + 1);\n this._day = (dayOfBadiYear - 1) % 19 + 1;\n } else if (dayOfBadiYear < 343 + this._ayyamiHaLength) {\n this._month = 20;\n this._day = dayOfBadiYear - 342;\n } else {\n this._month = 19;\n this._day = dayOfBadiYear - (342 + this._ayyamiHaLength);\n }\n }\n\n _setFromBadiDate(date: YearMonthDay | YearHolyDayNumber) { // eslint-disable-line complexity\n this._year = date.year;\n if (this._year < 1 || this._year > 507) {\n throw new RangeError('Input date outside of valid range (1 - 507 B.E.)');\n } else if (this._year < 172) {\n this._nawRuz = luxon.DateTime.fromObject({ year: 1843 + this._year, month: 3, day: 21, zone: 'UTC' });\n this._setOldAyyamiHaLength();\n this._yearTwinBirthdays = [12, 5, 13, 9];\n } else {\n this._setBadiYearInfo();\n }\n if (this._isYearMonthDay(date)) {\n this._month = date.month;\n this._day = date.day;\n if (this._month === 20 && this._day > this._ayyamiHaLength) {\n // If only off by one day, we'll bubble up so that 5th Ayyám-i-Há in a year with only 4 days of\n // Ayyám-i-Há can be salvaged\n if (this._day - this._ayyamiHaLength === 1) {\n this._month = 19;\n this._day = 1;\n } else {\n throw new TypeError('Input numbers do not designate a valid date');\n }\n }\n if (this._month < 1 || this._month > 20 || this._day < 1 || this.day > 19) {\n throw new TypeError('Input numbers do not designate a valid date');\n }\n } else {\n if (date.holyDayNumber < 1 || date.holyDayNumber > 11) {\n throw new TypeError('Input numbers do not designate a valid Holy Day');\n }\n this._holyDay = date.holyDayNumber;\n [this._month, this._day] = this._holyDayMapping()[this._holyDay];\n }\n this._gregorianDate = this._nawRuz.plus(luxon.Duration.fromObject(\n { days: this._dayOfYear([this._year, this._month, this._day]) - 1 }));\n }\n\n _setOldAyyamiHaLength() {\n if (luxon.DateTime.fromObject({ year: this._nawRuz.year + 1 }).isInLeapYear) {\n this._ayyamiHaLength = 5;\n } else {\n this._ayyamiHaLength = 4;\n }\n }\n\n _setBadiYearInfo(fromGregorianDate: boolean = false) {\n let yearData = this._extractBadiYearInfo();\n if (fromGregorianDate && this._gregorianDate < yearData.nawRuz) {\n this._year -= 1;\n yearData = this._extractBadiYearInfo();\n }\n this._nawRuz = yearData.nawRuz;\n this._ayyamiHaLength = yearData.ayyamiHaLength;\n this._yearTwinBirthdays = yearData.twinBirthdays;\n }\n\n _extractBadiYearInfo(): BadiYearInfo {\n let nawRuz, ayyamiHaLength, twinBirthdays;\n // Check whether data needs to be unpacked or exists in the verbose version\n // istanbul ignore else\n if (badiYears[0] === 'l4da') {\n const components = badiYears[this._year - 172].split('');\n nawRuz = luxon.DateTime.fromObject(\n { year: this._year - 172 + 2015, month: 3, day: parseInt(components[0], 36), zone: 'UTC' });\n ayyamiHaLength = parseInt(components[1], 36);\n const TB1 = [parseInt(components[2], 36), parseInt(components[3], 36)];\n const TB2 = TB1[1] < 19 ? [TB1[0], TB1[1] + 1] : [TB1[0] + 1, 1];\n twinBirthdays = [TB1[0], TB1[1], TB2[0], TB2[1]];\n } else {\n ({ nawRuz, ayyamiHaLength, twinBirthdays } = badiYears[this._year] as any);\n nawRuz = luxon.DateTime.fromISO(nawRuz, { zone: 'UTC' });\n }\n return { nawRuz, ayyamiHaLength, twinBirthdays };\n }\n\n _dayOfYear(date: Array<number> | luxon.DateTime): number {\n // Naw-Rúz is day 1\n if (Array.isArray(date)) {\n // We have a Badí' date\n if (date[1] < 19) {\n return 19 * (date[1] - 1) + date[2];\n } else if (date[1] === 20) {\n return 342 + date[2];\n }\n // date[1] === 19\n return 342 + this._ayyamiHaLength + date[2];\n }\n return (date as luxon.DateTime).diff(this._nawRuz).as('days') + 1;\n }\n\n _setInvalid(invalidReason: string) {\n this._gregorianDate = luxon.DateTime.invalid('Not a valid Badí‘ date');\n this._year = NaN;\n this._month = NaN;\n this._day = NaN;\n this._ayyamiHaLength = NaN;\n this._nawRuz = luxon.DateTime.invalid('Not a valid Badí‘ date');\n this._valid = false;\n this._invalidReason = invalidReason;\n }\n\n _setHolyDay() {\n const mapping = this._holyDayMapping();\n this._holyDay = parseInt(Object.keys(mapping)\n .find(key => mapping[key][0] === this._month && mapping[key][1] === this._day), 10);\n }\n\n _holyDayMapping(): object {\n return {\n [HolyDay.NawRuz]: [1, 1],\n [HolyDay.FirstRidvan]: [2, 13],\n [HolyDay.NinthRidvan]: [3, 2],\n [HolyDay.TwelfthRidvan]: [3, 5],\n [HolyDay.DeclarationOfTheBab]: [4, this._year < 172 ? 7 : 8],\n [HolyDay.AscensionOfBahaullah]: [4, 13],\n [HolyDay.MartyrdomOfTheBab]: [6, this._year < 172 ? 16 : 17],\n [HolyDay.BirthOfTheBab]: [this._yearTwinBirthdays[0], this._yearTwinBirthdays[1]],\n [HolyDay.BirthOfBahaullah]: [this._yearTwinBirthdays[2], this._yearTwinBirthdays[3]],\n [HolyDay.DayOfTheCovenant]: [14, 4],\n [HolyDay.AscensionOfAbdulBaha]: [14, 6],\n };\n }\n\n _leapYearsBefore(): number {\n let leapYearsBefore = Math.floor(Math.min(this.year - 1, 171) / 4);\n if (this.year > 172) {\n // istanbul ignore else\n if (badiYears[0] === 'l4da') {\n leapYearsBefore += badiYears.slice(0, this.year - 172).filter(entry => entry[1] === '5').length;\n } else {\n leapYearsBefore += Object.entries(badiYears)\n .filter(([year, data]) => parseInt(year, 10) < this.year &&\n (data as any).ayyamiHaLength === 5).length;\n }\n }\n return leapYearsBefore;\n }\n\n holyDay(language: string = undefined): string {\n if (!this._holyDay) {\n return '';\n }\n if (language === undefined || badiLocale[language] === undefined) {\n language = 'default';\n }\n return formatItemFallback(language, 'holyDay', this._holyDay);\n }\n\n valueOf() {\n return this._dayOfYear([this.year, this.month, this.day]) + this._leapYearsBefore() + (this.year - 1) * 365;\n }\n\n equals(other: BadiDate) {\n return this.isValid && other.isValid && this.valueOf() === other.valueOf();\n }\n\n get isValid(): boolean {\n return this._valid;\n }\n\n get invalidReason(): string | undefined {\n return this._invalidReason;\n }\n\n get day(): number {\n return this._day;\n }\n\n get month(): number {\n return this._month;\n }\n\n get year(): number {\n return this._year;\n }\n\n // number of the Badí' weekday between 1 (Jalál ~> Saturday) and 7 (Istiqlál ~> Friday).\n get weekday(): number {\n return (this._gregorianDate.weekday + 1) % 7 + 1;\n }\n\n get yearInVahid(): number {\n return (this._year - 1) % 19 + 1;\n }\n\n get vahid(): number {\n return (Math.floor((this._year - 1) / 19) % 19) + 1;\n }\n\n get kullIShay(): number {\n return Math.floor((this._year - 1) / 361) + 1;\n }\n\n // Gregorian date on whose sunset the Badí' date ends.\n get gregorianDate(): luxon.DateTime {\n return this._gregorianDate;\n }\n\n get ayyamiHaLength(): number {\n return this._ayyamiHaLength;\n }\n\n get holyDayNumber(): number | undefined {\n return this._holyDay ? this._holyDay : undefined;\n }\n\n get workSuspended(): boolean | undefined {\n return this._holyDay ? this.holyDayNumber < 10 : undefined;\n }\n\n get nextMonth(): BadiDate {\n let { year, month } = this;\n switch (month) {\n case 18:\n month = 20;\n break;\n case 19:\n month = 1;\n year += 1;\n break;\n case 20:\n month = 19;\n break;\n default:\n month += 1;\n }\n return new BadiDate({ year, month, day: 1 });\n }\n\n get previousMonth(): BadiDate {\n let { year, month } = this;\n switch (month) {\n case 1:\n month = 19;\n year -= 1;\n break;\n case 19:\n month = 20;\n break;\n case 20:\n month = 18;\n break;\n default:\n month -= 1;\n }\n return new BadiDate({ year, month, day: 1 });\n }\n\n get nextDay(): BadiDate {\n if (this._day === 19 || (this._month === 20 && this._day === this._ayyamiHaLength)) {\n return this.nextMonth;\n }\n return new BadiDate({ year: this._year, month: this._month, day: this._day + 1 });\n }\n\n get previousDay(): BadiDate {\n if (this._day === 1) {\n const { previousMonth } = this;\n let day = 19;\n if (this._month === 19) {\n day = this._ayyamiHaLength;\n }\n return new BadiDate({\n year: previousMonth.year,\n month: previousMonth.month,\n day,\n });\n }\n return new BadiDate({ year: this._year, month: this._month, day: this._day - 1 });\n }\n}\n\nconst badiDateSettings = (settings: BadiDateSettings) => {\n if (settings.defaultLanguage) {\n setDefaultLanguage(settings.defaultLanguage);\n }\n if (settings.underlineFormat) {\n setUnderlineFormat(settings.underlineFormat);\n }\n};\n\nexport { BadiDate, badiDateSettings };\n","/* eslint-disable max-len, complexity */\nconst clockLocations = {\n Canada: [[[-63.29333, 60], [-138.9386, 60], [-139.1889, 60.08888], [-139.0681, 60.35222], [-139.6767, 60.34055], [-139.9794, 60.18777], [-140.45081, 60.30972], [-140.52139, 60.22221], [-140.9955, 60.30721], [-140.99686, 61.8948], [-141.00005, 65.84028], [-141.00206, 68.42821], [-141.00296, 69.58786], [-141.00477, 69.58884], [-140.99813, 70.12335], [-124.80692, 77.04204], [-117.95462, 78.95431], [-99.46935, 82.3539], [-75.0348, 84.79736], [-59.3117, 83.84122], [-60.98493, 82.07503], [-69.57686, 80.21588], [-71.1173, 79.6183], [-74.13178, 79.24647], [-73.93259, 78.5692], [-75.69878, 77.78571], [-77.43842, 77.49355], [-77.55793, 76.52414], [-78.54063, 76.17887], [-79.31085, 74.25332], [-75.79174, 73.25735], [-73.13581, 72.0489], [-69.1652, 71.09276], [-66.31007, 69.91087], [-66.05776, 68.70243], [-60.73262, 66.89639], [-62.3129, 65.07708], [-63.60102, 64.69197], [-64.19861, 60.84087], [-63.29333, 60.00012]]],\n Finland: [[[31.5848296, 62.9070356], [31.4390606, 62.785375], [31.3454013, 62.64032620000001], [31.2218346, 62.49829550000001], [31.138311, 62.4420838], [30.720412, 62.20890580000002], [30.6564061, 62.2085877], [30.602068, 62.14134890000001], [30.4231749, 62.02237140000001], [30.3061104, 61.964546], [30.1556605, 61.8579888], [30.0752371, 61.8183646], [30.0387281, 61.76500110000001], [29.8185491, 61.6549278], [29.74029919999999, 61.5737044], [29.5030724, 61.461338900000015], [29.3304371, 61.3526198], [29.2330501, 61.268169], [29.0298879, 61.191815300000016], [28.9583837, 61.1514492], [28.818984, 61.1216471], [28.7136921, 61.0443349], [28.6578963, 60.95109439999999], [28.5246697, 60.9571371], [28.1354613, 60.7408695], [27.873414, 60.604559], [27.7736111, 60.53333330000002], [27.725, 60.3913889], [27.4550934, 60.223534], [27.2938862, 60.2003975], [26.8756332, 60.200342100000015], [26.6110136, 60.161753200000014], [26.2947105, 60.0465237], [26.0173046, 59.97679690000001], [25.1693516, 59.9434386], [24.2815873, 59.79155570000002], [23.4566746, 59.67247360000001], [22.9224144, 59.6384411], [22.6345729, 59.6079549], [22.3965563, 59.5130947], [21.4475658, 59.4772985], [20.7608658, 59.5324815], [20.3839584, 59.4576178], [20.2843364, 59.4660819], [19.083209799999988, 60.19169020000001], [19.2202109, 60.61151010000001], [20.0251664, 60.72755450000001], [20.7714495, 61.12690790000001], [20.903203, 61.6462488], [20.1658123, 63.1648577], [20.4010006, 63.3318822], [20.8175143, 63.5011379], [21.4628083, 63.6552312], [21.8845783, 63.70121190000001], [22.9611467, 64.2200974], [23.835799, 64.66547409999997], [24.1545056, 65.29247769999998], [24.131900100000014, 65.5153846], [24.1776819, 65.6603564], [24.1318042, 65.7716089], [24.152978, 65.862572], [24.0536762, 65.95152940000006], [24.0491701, 65.99502970000003], [23.9394784, 66.07568309999998], [23.9170552, 66.16186640000002], [23.7313763, 66.19408560000002], [23.6489848, 66.30377249999997], [23.6880374, 66.3815611], [23.650965700000015, 66.4557476], [23.8605347, 66.5595503], [23.86853209999999, 66.6568254], [23.9078441, 66.72140390000003], [23.880337, 66.76350940000003], [23.99566289999999, 66.822049], [23.8525565, 66.9573479], [23.677678, 67.0620298], [23.5545444, 67.16789390000002], [23.596079, 67.20820560000003], [23.5637833, 67.2606725], [23.7311639, 67.28763560000003], [23.7172209, 67.38530669999997], [23.7639366, 67.42772120000002], [23.408239899999984, 67.46939490000003], [23.4059159, 67.50091320000003], [23.5452477, 67.5838871], [23.492249099999984, 67.6652745], [23.47871239999999, 67.8419848], [23.5171915, 67.88433529999998], [23.6407972, 67.9151784], [23.6525654, 67.9589433], [23.3937061, 68.0452571], [23.3077618, 68.14837649999997], [23.1656349, 68.13315060000002], [23.152641, 68.2333806], [23.0702517, 68.29970360000003], [22.9181313, 68.3335115], [22.8028778, 68.39328420000002], [22.3437523, 68.45688960000003], [22.2960914, 68.4840408], [22.045040799999988, 68.479329], [21.8898693, 68.5844051], [21.7010887, 68.59686950000003], [21.6061629, 68.6678769], [21.4298688, 68.691352], [21.39042, 68.76478960000003], [20.9988391, 68.89612380000003], [20.8441913, 68.93656440000004], [20.9116456, 68.96882420000003], [20.775042799999987, 69.0326073], [20.5523258, 69.0600767], [20.7173208, 69.1197912], [21.057543, 69.03628970000003], [21.1086742, 69.1039291], [20.9875741, 69.19192740000003], [21.0961691, 69.260912], [21.2788202, 69.3118841], [21.6270859, 69.27658829999997], [22.1757622, 68.95632440000003], [22.1918678, 68.9187737], [22.3407806, 68.82722570000003], [22.3745217, 68.71666660000004], [22.5353893, 68.74451260000004], [22.800824, 68.68754809999997], [23.0459522, 68.6893436], [23.1675822, 68.6285189], [23.4406356, 68.6921635], [23.6735202, 68.70552140000002], [23.7753915, 68.81885129999998], [23.983330799999987, 68.82714340000003], [24.0755916, 68.7799668], [24.30226, 68.71735020000003], [24.6083879, 68.6819016], [24.9170187, 68.60529109999997], [25.1193208, 68.6428308], [25.1212144, 68.7458351], [25.1573697, 68.80006390000003], [25.2931271, 68.8600372], [25.47250939999999, 68.90329120000003], [25.6543285, 68.90577049999997], [25.745596499999987, 69.03984729999998], [25.742717799999987, 69.14430209999998], [25.6939225, 69.1957144], [25.7410164, 69.31839509999998], [25.8462009, 69.3929115], [25.8084981, 69.4259367], [25.8768225, 69.5261298], [25.9760403, 69.610225], [25.8925512, 69.66539549999997], [26.0071395, 69.7228555], [26.1255598, 69.7345401], [26.3835888, 69.8541585], [26.4653759, 69.93980490000003], [26.6834067, 69.96301920000003], [26.8407548, 69.9603025], [27.0316081, 69.9107924], [27.3049484, 69.95762760000004], [27.43070959999999, 70.0194461], [27.5206048, 70.02243659999996], [27.614207, 70.074151], [27.9593778, 70.0921111], [27.9842853, 70.0139707], [28.160713, 69.92099370000003], [28.3452694, 69.88083179999997], [28.4042254, 69.818425], [29.1339095, 69.69534039999996], [29.1705369, 69.6390414], [29.3364956, 69.47832269999998], [29.2193395, 69.39763620000002], [28.831539, 69.2243617], [28.80543, 69.1111558], [28.929451, 69.0519407], [28.4953735, 68.9300403], [28.468076, 68.8855137], [28.66118, 68.8864737], [28.8014499, 68.8693665], [28.7072131, 68.732555], [28.4341202, 68.53979460000002], [28.6478382, 68.19591340000002], [29.3271337, 68.0745162], [29.6593888, 67.80297219999996], [30.0173409, 67.67356889999996], [29.9305102, 67.5228214], [29.8567823, 67.48926540000004], [29.6361151, 67.332861], [29.522709499999987, 67.3099172], [29.48660609999999, 67.26011490000003], [29.0732544, 66.99615390000004], [29.0331239, 66.92547219999996], [29.0607529, 66.85269279999997], [29.3507185, 66.6439171], [29.4726751, 66.5434478], [29.6969469, 66.277347], [29.9239353, 66.1262486], [29.997268, 65.97889249999997], [30.0647878, 65.90105890000002], [30.138463, 65.66868749999998], [30.0170916, 65.6965272], [29.722432799999986, 65.637045], [29.8637508, 65.5604702], [29.7331208, 65.472637], [29.7467636, 65.347391], [29.6018471, 65.2599435], [29.893525, 65.19295509999998], [29.8193446, 65.1444587], [29.896916, 65.1051579], [29.7328054, 65.09129760000003], [29.6255535, 65.06020520000003], [29.5993537, 64.99509809999998], [29.6470353, 64.8674467], [29.739663, 64.7897553], [30.0430007, 64.7928625], [30.0416232, 64.74110840000003], [30.1365729, 64.6488835], [29.9894058, 64.58761530000002], [29.9869609, 64.5338998], [30.0583348, 64.4508749], [30.0448933, 64.4020122], [30.482439699999983, 64.2623385], [30.466399899999985, 64.2044319], [30.5534271, 64.1322443], [30.5280169, 64.0488769], [30.320039, 63.9082685], [30.260416, 63.82200320000001], [29.9718903, 63.7571676], [30.24571609999999, 63.60696830000001], [30.385620199999988, 63.54577980000001], [30.4841978, 63.4670887], [30.789711, 63.4050884], [30.9330443, 63.3559208], [30.9798739, 63.3078177], [31.1483116, 63.26151890000002], [31.2416464, 63.2166421], [31.2658547, 63.1154671], [31.46252279999998, 63.02421930000001], [31.5848296, 62.9070356]]],\n // Greenland: [[[-57.44887, 82.28507], [-60.15022, 82.05782], [-61.87928, 81.82771], [-62.2191, 81.7294], [-63.42448, 81.28486], [-65.32658, 80.98138], [-66.57577, 80.83605], [-67.38791, 80.54753], [-67.66468, 80.1436], [-68.73755, 79.10919], [-72.47765, 78.62618], [-72.96065, 78.36972], [-73.1359, 78.13036], [-72.78968, 77.34387], [-73.38382, 76.66424], [-72.79822, 76.5702], [-69.80615, 76.29664], [-68.45971, 75.97179], [-66.32252, 75.80508], [-64.89914, 75.80081], [-63.13809, 76.04018], [-62.31741, 75.9034], [-60.47087, 75.78371], [-60.19731, 75.62983], [-58.94919, 75.49305], [-58.81241, 74.92883], [-58.38497, 74.89464], [-58.21399, 74.63817], [-57.47879, 74.17654], [-57.15394, 73.47554], [-55.83743, 71.40673], [-55.23901, 70.48346], [-55.10223, 69.40632], [-53.87121, 68.825], [-54.21316, 66.80748], [-53.75152, 65.52517], [-52.5034, 63.43926], [-47.39122, 59.6265], [-42.68939, 59.38714], [-41.16771, 61.50723], [-30.05428, 67.67946], [-26.83993, 68.124], [-21.04386, 70.27829], [-21.24903, 72.74034], [-16.78656, 74.91174], [-16.39331, 77.2541], [-17.64144, 78.51933], [-16.82075, 79.78455], [-11.02468, 81.34043], [-11.93085, 82.02433], [-19.48798, 82.45177], [-19.71024, 83.01599], [-27.19898, 83.85377], [-39.64602, 83.80248], [-50.82784, 82.9476], [-57.44887, 82.28507]]],\n Iceland: [[[-25.0, 63.0], [-12.8, 63.0], [-12.8, 66.8], [-25.0, 66.8]]],\n Norway: [[[30.79367, 69.78758], [30.89032, 69.73729], [30.95448, 69.63243], [30.93257, 69.55989], [30.81756, 69.52877], [30.51593, 69.54042], [30.41768, 69.58992], [30.23373, 69.65016], [30.13777, 69.64353], [30.18838, 69.56846], [30.12305, 69.51749], [30.11721, 69.46989], [30.00876, 69.41591], [29.85802, 69.42374], [29.7244, 69.38965], [29.56938, 69.31756], [29.39594, 69.32384], [29.28845, 69.29618], [29.31313, 69.23752], [29.24224, 69.11306], [29.05666, 69.01528], [28.85456, 69.07664], [28.80541, 69.11116], [28.83152, 69.22436], [29.21932, 69.39764], [29.33647, 69.47832], [29.17052, 69.63904], [29.13389, 69.69534], [28.40421, 69.81842], [28.33046, 69.84919], [28.34506, 69.8808], [28.1607, 69.92099], [27.98428, 70.01397], [27.94828, 70.09187], [27.79768, 70.07731], [27.61245, 70.07456], [27.52598, 70.02346], [27.42855, 70.01921], [27.27471, 69.97591], [27.29177, 69.95225], [27.03749, 69.91039], [26.89776, 69.93245], [26.85129, 69.96013], [26.71807, 69.94499], [26.67869, 69.96477], [26.46435, 69.93939], [26.38594, 69.85535], [26.24129, 69.81453], [26.13562, 69.73861], [26.01418, 69.72334], [25.89149, 69.6655], [25.97672, 69.61067], [25.93749, 69.57253], [25.83994, 69.54298], [25.87704, 69.5222], [25.80934, 69.42639], [25.8461, 69.39325], [25.75938, 69.34038], [25.74753, 69.28679], [25.70204, 69.25366], [25.69302, 69.19674], [25.74351, 69.13879], [25.72429, 69.0796], [25.77744, 69.01828], [25.71241, 68.98063], [25.65423, 68.90587], [25.60033, 68.88487], [25.48119, 68.90507], [25.2677, 68.85099], [25.15713, 68.79989], [25.11152, 68.70252], [25.11924, 68.6428], [24.91692, 68.60525], [24.85717, 68.56221], [24.78342, 68.63623], [24.60839, 68.6819], [24.30226, 68.71735], [24.07559, 68.77997], [23.98333, 68.82714], [23.87146, 68.83652], [23.77539, 68.81885], [23.73106, 68.75075], [23.67352, 68.70552], [23.44064, 68.69216], [23.16758, 68.62852], [23.04595, 68.68934], [22.80082, 68.68755], [22.53539, 68.74451], [22.37452, 68.71667], [22.34078, 68.82723], [22.19187, 68.91877], [22.17576, 68.95632], [21.98361, 69.07289], [21.8464, 69.14416], [21.62709, 69.27659], [21.27882, 69.31188], [21.09617, 69.26091], [21.00331, 69.22234], [20.98758, 69.19193], [21.05563, 69.12209], [21.10868, 69.10393], [21.05754, 69.03629], [20.71732, 69.11979], [20.55233, 69.06008], [20.06005, 69.04576], [20.30659, 68.92618], [20.33587, 68.80231], [20.20284, 68.66592], [20.05225, 68.59107], [19.9375, 68.55794], [20.02589, 68.53081], [20.22654, 68.49081], [19.97796, 68.38816], [19.9214, 68.35601], [18.9838, 68.51696], [18.62122, 68.50696], [18.40569, 68.58188], [18.12592, 68.53652], [18.10109, 68.40605], [18.15135, 68.19879], [17.89976, 67.96937], [17.66475, 68.03838], [17.28152, 68.11881], [17.18051, 68.05046], [16.73812, 67.91421], [16.55628, 67.64719], [16.40757, 67.53403], [16.158, 67.51916], [16.08983, 67.43528], [16.4041, 67.20497], [16.38776, 67.04546], [16.19402, 66.98259], [16.03876, 66.91245], [15.99364, 66.87323], [15.62137, 66.59434], [15.37723, 66.4843], [15.48473, 66.28246], [15.03568, 66.15356], [14.51629, 66.13258], [14.58441, 65.90134], [14.62548, 65.81181], [14.54147, 65.70075], [14.49877, 65.5213], [14.50683, 65.30973], [14.3788, 65.24762], [14.32598, 65.11892], [14.12989, 64.97856], [13.70547, 64.63996], [13.65426, 64.58034], [13.89118, 64.50713], [14.08523, 64.47825], [14.11387, 64.46248], [14.15711, 64.19505], [13.96752, 64.00797], [13.7154, 64.04629], [13.21111, 64.09537], [12.92672, 64.05795], [12.68356, 63.97422], [12.48023, 63.81876], [12.33057, 63.71507], [12.29946, 63.67198], [12.14977, 63.59395], [12.21288, 63.47859], [12.08407, 63.35558], [11.97458, 63.26923], [12.21823, 63.00033], [12.07469, 62.90254], [12.13638, 62.74792], [12.05614, 62.61192], [12.29937, 62.26749], [12.13766, 61.72382], [12.41961, 61.56298], [12.56932, 61.56875], [12.87085, 61.3565], [12.83383, 61.25846], [12.79035, 61.19705], [12.70703, 61.14327], [12.68258, 61.06122], [12.61251, 61.04683], [12.44761, 61.05073], [12.22399, 61.01308], [12.33279, 60.89017], [12.33448, 60.85236], [12.39537, 60.73389], [12.51102, 60.64246], [12.51578, 60.60015], [12.60688, 60.51274], [12.60605, 60.40593], [12.49879, 60.32365], [12.54191, 60.19338], [12.50064, 60.09908], [12.44856, 60.03917], [12.34114, 59.96567], [12.23104, 59.92759], [12.17429, 59.88981], [12.05346, 59.88594], [11.98518, 59.90072], [11.84045, 59.84174], [11.92597, 59.794], [11.93988, 59.69458], [11.88922, 59.69321], [11.85571, 59.64829], [11.72056, 59.62549], [11.69113, 59.58955], [11.75993, 59.45818], [11.77987, 59.38646], [11.81625, 59.34474], [11.82979, 59.24223], [11.78393, 59.20838], [11.77539, 59.08659], [11.71051, 59.03368], [11.68908, 58.95685], [11.59063, 58.89072], [11.45623, 58.89021], [11.45853, 58.99597], [11.34184, 59.12041], [11.20498, 59.08311], [11.17718, 59.09736], [11.1, 59], [11.0203, 58.97], [9.67858, 58.87844], [8.51901, 58.15871], [7.92368, 57.95878], [6.62638, 57.9188], [5.34686, 58.63409], [4.70265, 59.35382], [4.57381, 61.1576], [4.78262, 62.0506], [5.46681, 62.55263], [6.79965, 62.99691], [8.29243, 63.77884], [9.92293, 64.11205], [10.71819, 65.0095], [11.4246, 65.12057], [11.79779, 65.84919], [11.95329, 67.64852], [13.20171, 68.29717], [14.5701, 68.89694], [16.08064, 69.41675], [17.91552, 69.8166], [19.1906, 70.36306], [19.81259, 70.33196], [20.19467, 70.19424], [21.78519, 70.50523], [21.89626, 70.73182], [23.70892, 70.96284], [23.91773, 71.1139], [24.46864, 71.07391], [24.71744, 71.21608], [25.89478, 71.26051], [26.77445, 71.08724], [27.79185, 71.22052], [28.65819, 71.06503], [30.03102, 70.78069], [31.23946, 70.43859], [31.19482, 70.34084], [30.79367, 69.78758]], [[4.2, 80.84], [-11.5, 70.1], [19.2, 73.5], [39.2, 81.4]]],\n Sweden: [[[15.4538561, 66.34534869999999], [15.3772302, 66.4843117], [15.625833, 66.605833], [15.80794, 66.735271], [16.0387632, 66.9124213], [16.195223, 66.982232], [16.3877, 67.0455], [16.4040109, 67.2049795], [16.09015, 67.435232], [16.1566, 67.519458], [16.407797, 67.533978], [16.555733, 67.647289], [16.7381292, 67.91418620000002], [17.180003, 68.050508], [17.2818957, 68.1188101], [17.6648128, 68.0384733], [17.8998048, 67.9693359], [18.1514126, 68.198755], [18.1010915, 68.406043], [18.1258499, 68.5364954], [18.4056102, 68.5818554], [18.6211478, 68.5069382], [18.9836971, 68.5169473], [19.921397, 68.3560137], [19.9778586, 68.3881535], [20.2264196, 68.4908071], [19.9375039, 68.5579418], [20.0521233, 68.5910515], [20.2027029, 68.6659076], [20.3358646, 68.8023404], [20.3064282, 68.9261735], [20.0600472, 69.0457578], [20.5486422, 69.05996990000001], [20.7750428, 69.0326073], [20.9137291, 68.9603927], [20.8441913, 68.93656440000002], [20.9156942, 68.8971424], [20.9967921, 68.896741], [21.2340165, 68.8140862], [21.3194271, 68.7592708], [21.3893348, 68.76495460000002], [21.4298688, 68.691352], [21.5651505, 68.6752534], [21.7013706, 68.6305605], [21.7016655, 68.5963461], [21.8898693, 68.5844051], [21.9919125, 68.5339794], [22.0182391, 68.495951], [22.1528153, 68.4701805], [22.2945732, 68.4838241], [22.4661749, 68.4413001], [22.6482126, 68.41604160000001], [22.7362404, 68.3852018], [22.8041064, 68.39294], [22.9181313, 68.3335115], [23.0702517, 68.29970360000002], [23.1528179, 68.2310713], [23.1415318, 68.1543005], [23.2783645, 68.15733889999998], [23.3216014, 68.1347101], [23.3966203, 68.044179], [23.5310194, 68.0067455], [23.6632301, 67.94218640000001], [23.6407972, 67.9151784], [23.5098377, 67.87994509999999], [23.4739757, 67.81714420000002], [23.4946531, 67.7903019], [23.493057, 67.6641861], [23.5588847, 67.6192741], [23.5450496, 67.5829545], [23.4081036, 67.50173829999999], [23.4104738, 67.46759370000002], [23.5365192, 67.4599963], [23.7632859, 67.4262029], [23.7179667, 67.384843], [23.7750768, 67.3393805], [23.7311639, 67.28763560000002], [23.5834506, 67.269308], [23.5535126, 67.2468025], [23.5958386, 67.2071971], [23.5569385, 67.16578719999998], [23.6536532, 67.1042345], [23.6739708, 67.0650834], [23.8564714, 66.9558968], [23.8640579, 66.9221303], [23.9330592, 66.8845665], [23.9945079, 66.82348849999998], [23.9782068, 66.78409040000001], [23.8797209, 66.7620511], [23.9078441, 66.72140390000001], [23.8685321, 66.6568254], [23.8846737, 66.61277119999998], [23.8605347, 66.5595503], [23.7853219, 66.5333886], [23.6509657, 66.4557476], [23.6880374, 66.3815611], [23.6489848, 66.3037725], [23.7263744, 66.1968556], [23.9159179, 66.1621612], [23.936749, 66.0794759], [24.0374327, 66.0090364], [24.0421963, 65.9633925], [24.152978, 65.862572], [24.1318042, 65.7716089], [24.1721721, 65.72528229999999], [24.1776819, 65.6603564], [24.1319001, 65.5153846], [24.1444599, 65.3956667], [23.1299456, 65.2854532], [21.8250561, 64.8363612], [22.0872366, 64.43431070000001], [21.5096176, 64.04121570000002], [21.4570471, 63.7528427], [20.20662871333013, 63.274568586669865], [19.4322896, 63.0737152], [18.2961641, 62.4173632], [17.7755886, 61.1718712], [17.8981165, 60.9377595], [17.7095869, 60.7102649], [17.3865202, 60.6893467], [17.3489744, 60.5862714], [17.3024177, 60.508762], [17.29774, 60.4647038], [17.2565412, 60.4243351], [17.1955585, 60.4105852], [17.1986283, 60.3077815], [17.0585097, 60.2727725], [16.908878, 60.281498], [16.9048859, 60.2394077], [16.7046001, 60.1950497], [16.6294785, 60.2384924], [16.6154023, 60.2786235], [16.5166127, 60.3554293], [16.3927146, 60.3794045], [16.2589904, 60.4931441], [16.1947891, 60.5354328], [16.13651, 60.6103267], [16.2382972, 60.6230491], [16.3769218, 60.7434488], [16.386117, 60.7868], [16.2552139, 60.8636119], [16.1310092, 60.9920575], [15.9216155, 61.00763], [15.7619207, 61.0496869], [15.6803816, 61.11321], [15.6573361, 61.2154788], [15.4760187, 61.3149858], [15.3370007, 61.4016369], [15.20475, 61.503826], [15.1531933, 61.5956892], [14.8564014, 61.7835491], [14.7971, 61.798451], [14.6666465, 61.8918775], [14.5296202, 61.783626], [14.4997464, 61.62599], [14.3947754, 61.5637652], [14.3364964, 61.59913920000001], [14.1822587, 61.6175455], [13.9769516, 61.6213397], [13.8902353, 61.6525473], [13.6131488, 61.6726273], [13.564749, 61.656455], [13.5066718, 61.6929666], [13.5145384, 61.7377738], [13.4160916, 61.8280592], [13.2092287, 61.9365972], [13.0799221, 62.0376119], [13.0423631, 62.0182008], [12.9513736, 62.1334555], [12.9026405, 62.1418727], [12.8059683, 62.2205277], [12.6078489, 62.214806], [12.299389, 62.2659814], [12.056144, 62.6119191], [12.1363845, 62.7479169], [12.074689, 62.9025463], [12.218233, 63.0003345], [11.9745822, 63.2692252], [12.0840901, 63.3555796], [12.2128783, 63.4785906], [12.1497625, 63.593946], [12.2975812, 63.6732169], [12.3399662, 63.7269855], [12.4797773, 63.8196667], [12.6860556, 63.9738931], [12.9268369, 64.05783829999999], [13.2109436, 64.0951725], [13.7151219, 64.045304], [13.981667, 64.013056], [14.1579301, 64.1860759], [14.120556, 64.452778], [14.086006, 64.47814109999999], [13.8924406, 64.507004], [13.6540802, 64.579929], [13.7050997, 64.6396655], [14.1081927, 64.96225790000001], [14.3257603, 65.1190618], [14.3790211, 65.24804960000002], [14.5056577, 65.3099238], [14.4967711, 65.5174317], [14.5295213, 65.682227], [14.6240045, 65.81419090000001], [14.584253, 65.9013501], [14.5162846, 66.132567], [15.035653, 66.1535649], [15.4847146, 66.282458], [15.4538561, 66.34534869999999]]],\n USA: [[[-130.01989, 55.9153], [-130.17038, 55.77749], [-130.13861, 55.55335], [-129.99201, 55.28955], [-130.25933, 54.99635], [-130.66666, 54.71444], [-131.17048, 54.72103], [-132.10046, 54.6269], [-132.86477, 54.63066], [-133.60649, 54.72479], [-134.93933, 56.02375], [-136.80681, 57.75192], [-137.09296, 58.25079], [-139.07716, 59.1017], [-141.32115, 59.76436], [-143.47102, 59.81707], [-146.37014, 59.17701], [-149.21654, 59.54598], [-152.0253, 57.0535], [-155.80544, 55.02035], [-159.93198, 54.32757], [-173.1399, 51.33056], [-179.49537, 50.84863], [-179.28453, 52.29443], [-171.78447, 63.95114], [-169.94709, 63.91437], [-169.09903, 65.86662], [-168.1474, 65.7885], [-164.9772, 66.85025], [-167.15342, 68.37135], [-166.29498, 69.12437], [-161.71663, 70.74335], [-156.23466, 71.55661], [-143.75716, 70.6304], [-141.58847, 70.26895], [-141.56335, 69.73575], [-141.39798, 69.64277], [-141.00304, 69.64616], [-141.00189, 60.6745], [-141.00157, 60.30507], [-140.52034, 60.21906], [-140.44797, 60.30796], [-139.97408, 60.18451], [-139.68007, 60.33572], [-139.05208, 60.35373], [-139.17702, 60.08286], [-138.70578, 59.90624], [-138.60921, 59.76], [-137.60744, 59.24348], [-137.45151, 58.90854], [-136.82468, 59.1598], [-136.58199, 59.16554], [-136.19525, 59.63881], [-135.9476, 59.66343], [-135.47958, 59.7981], [-135.02888, 59.56364], [-135.10063, 59.42776], [-134.95978, 59.28104], [-134.7007, 59.2489], [-134.48273, 59.13097], [-134.258, 58.86087], [-133.84105, 58.72985], [-133.37997, 58.43181], [-133.45987, 58.38848], [-133.17195, 58.15383], [-132.55389, 57.4967], [-132.2478, 57.21112], [-132.36871, 57.09167], [-132.0448, 57.0451], [-132.12311, 56.8739], [-131.87311, 56.80627], [-131.83539, 56.59912], [-131.5813, 56.6123], [-131.08698, 56.40613], [-130.7818, 56.36713], [-130.4682, 56.24329], [-130.42548, 56.14172], [-130.10541, 56.12268], [-130.01989, 55.9153]], [[179.9, 52.2], [172.0, 53.3], [172.0, 52.4], [179.9, 51.0]]],\n};\n/* eslint-enable max-len */\n\nlet usingClockLocations = true;\n\nconst useClockLocations = (useClockLocations: boolean) => {\n usingClockLocations = useClockLocations;\n};\n\nconst pointInPolygon = (coords: Array<number>, polygon: Array<[number, number]>): boolean => {\n const [x, y] = coords;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; i++) {\n const [xi, yi] = polygon[i];\n const [xj, yj] = polygon[j];\n // Check that a) the segment crosses the y coordinate of the point\n // b) at least one of the two vertices is left of the point\n // c) at the y coordinate of the point, the segment is left of it\n if ((((yi < y) !== (yj < y)) && (xi <= x || xj <= x)) && ((xi + (y - yi) * (xj - xi) / (yj - yi)) < x)) {\n inside = !inside;\n }\n j = i;\n }\n return inside;\n};\n\n// The name of a country being returned doesn't just mean that the coordinates are within that country, but that they\n// are within the region of that country where a fixed time rule applies.\nconst clockLocationFromPolygons = (latitude: number, longitude: number): string | undefined => {\n if (!usingClockLocations) {\n return undefined;\n }\n // First exclude as large an area as possible from having to check polygons\n if (latitude < 51.0) {\n return undefined;\n }\n if (latitude < 57.0 && longitude > -129.0 && longitude < 172.0) {\n return undefined;\n }\n // Make a list of plausible areas based on longitude, then only check those\n const countries = [];\n const labels = [];\n if (longitude < -129.9 || longitude > 172.4) {\n countries.push(clockLocations.USA);\n labels.push('USA');\n }\n if (longitude > -141.1 && longitude < -61.1) {\n countries.push(clockLocations.Canada);\n labels.push('Canada');\n }\n // Greenland doesn't currently have a rule for this\n // if (longitude > -73.1 && longitude < -11.3) {\n // countries.push(clockLocations.Greenland);\n // labels.push('Greenland');\n // }\n if (longitude > -25.0 && longitude < -12.8) {\n countries.push(clockLocations.Iceland);\n labels.push('Iceland');\n }\n if (longitude > -9.2 && longitude < 33.6) {\n countries.push(clockLocations.Norway);\n labels.push('Norway');\n }\n if (longitude > 10.9 && longitude < 24.2) {\n countries.push(clockLocations.Sweden);\n labels.push('Sweden');\n }\n if (longitude > 19.1 && longitude < 31.6) {\n countries.push(clockLocations.Finland);\n labels.push('Finland');\n }\n // Russia currently doesn't have a rule for this\n // if (longitude > 27.3 || longitude < -169.6) {\n // countries.push(clockLocations.Russia);\n // labels.push('Russia');\n // }\n for (let i = 0; i < countries.length; i++) {\n for (let j = 0; j < countries[i].length; j++) {\n if (pointInPolygon([longitude, latitude], countries[i][j])) {\n return labels[i];\n }\n }\n }\n return undefined;\n};\n\nexport { clockLocationFromPolygons, useClockLocations };\n","import * as MeeusSunMoon from 'meeussunmoon';\nimport * as luxon from 'luxon';\nimport { BadiDate, badiDateSettings as badiDateBaseSettings } from './badiDate';\nimport { clockLocationFromPolygons, useClockLocations } from './clockLocations';\nimport { BadiDateSettings, InputDate } from './types';\n\n/* eslint-disable complexity */\n\nclass LocalBadiDate {\n private _badiDate: BadiDate;\n private _start: luxon.DateTime;\n private _sunrise: luxon.DateTime;\n private _solarNoon: luxon.DateTime;\n private _end: luxon.DateTime;\n private _clockLocation: string | undefined;\n private _holyDayCommemoration: luxon.DateTime | undefined;\n private _latitude: number;\n private _longitude: number;\n private _timezoneId: string;\n\n constructor(date: InputDate, latitude: number, longitude: number, timezoneId: string) {\n this._latitude = latitude;\n this._longitude = longitude;\n this._timezoneId = timezoneId;\n // If a datetime object is being passed, we use date and time, not just the\n // date. For a JS Date object, we can't assume it's in the correct timezone,\n // so in that case we use the date information only.\n this._badiDate = new BadiDate(this._setInputDateToCorrectDay(date, latitude, longitude));\n const gregDate = this._badiDate.gregorianDate.setZone(timezoneId, { keepLocalTime: true });\n this._clockLocation = clockLocationFromPolygons(latitude, longitude);\n if (!this._clockLocation ||\n (this._clockLocation === 'Finland' &&\n this._badiDate.month === 19)) {\n this._end = MeeusSunMoon.sunset(gregDate, latitude, longitude) as luxon.DateTime;\n this._solarNoon = MeeusSunMoon.solarNoon(gregDate, longitude);\n this._sunrise = MeeusSunMoon.sunrise(gregDate, latitude, longitude) as luxon.DateTime;\n this._start = MeeusSunMoon.sunset(gregDate.minus({ days: 1 }), latitude, longitude) as luxon.DateTime;\n } else {\n // First we set times to 18:00, 06:00, 12:00, 18:00, modifications are\n // then made depending on the region.\n this._start = gregDate.minus({ days: 1 }).set({ hour: 18 });\n this._solarNoon = gregDate.set({ hour: 12 });\n this._sunrise = gregDate.set({ hour: 6 });\n this._end = gregDate.set({ hour: 18 });\n if (this._clockLocation === 'Canada') {\n this._sunrise = this._sunrise.plus({ minutes: 30 });\n } else if (this._clockLocation === 'Iceland') {\n this._solarNoon = this._solarNoon.plus({ hours: 1 });\n } else if (this._clockLocation === 'Finland' ||\n this._clockLocation === 'USA') {\n if (this._end.isInDST) {\n this._sunrise = this._sunrise.plus({ hours: 1 });\n this._solarNoon = this._solarNoon.plus({ hours: 1 });\n this._end = this._end.plus({ hours: 1 });\n }\n if (this._start.isInDST) {\n this._start = this._start.plus({ hours: 1 });\n }\n }\n }\n switch (this._badiDate.holyDayNumber) {\n case 2:\n // First Day of Ridvan: 15:00 local standard time\n this._holyDayCommemoration = gregDate.set({ hour: gregDate.isInDST ? 16 : 15 });\n break;\n case 5:\n // Declaration of the Báb: 2 hours 11 minutes after sunset\n this._holyDayCommemoration = this._start.plus({ minutes: 131 });\n break;\n case 6:\n // Ascension of Bahá'u'lláh: 03:00 local standard time\n this._holyDayCommemoration = gregDate.set({ hour: gregDate.isInDST ? 4 : 3 });\n break;\n case 7:\n // Martyrdom of the Báb: solar noon\n this._holyDayCommemoration = this._solarNoon;\n break;\n case 11:\n // Ascension of 'Abdu'l-Bahá: 01:00 local standard time\n this._holyDayCommemoration = gregDate.set({ hour: gregDate.isInDST ? 2 : 1 });\n break;\n // skip default\n }\n }\n\n _setInputDateToCorrectDay(date: InputDate, latitude, longitude): InputDate {\n if (luxon.DateTime.isDateTime(date)) {\n const sunset = MeeusSunMoon.sunset(date, latitude, longitude);\n return (date > sunset) ? date.plus({ days: 1 }) : date;\n }\n return date;\n }\n\n get badiDate(): BadiDate {\n return this._badiDate;\n }\n\n get start(): luxon.DateTime {\n return this._start;\n }\n\n get sunrise(): luxon.DateTime {\n return this._sunrise;\n }\n\n get solarNoon(): luxon.DateTime {\n return this._solarNoon;\n }\n\n get end(): luxon.DateTime {\n return this._end;\n }\n\n get holyDayCommemoration(): luxon.DateTime | undefined {\n return this._holyDayCommemoration;\n }\n\n get clockLocation(): string | undefined {\n return this._clockLocation;\n }\n\n get latitude(): number {\n return this._latitude;\n }\n\n get longitude(): number {\n return this._longitude;\n }\n\n get timezoneId(): string {\n return this._timezoneId;\n }\n\n get nextMonth(): LocalBadiDate {\n return new LocalBadiDate(this.badiDate.nextMonth, this._latitude, this._longitude, this._timezoneId);\n }\n\n get previousMonth(): LocalBadiDate {\n return new LocalBadiDate(this.badiDate.previousMonth, this._latitude, this._longitude, this._timezoneId);\n }\n\n get nextDay(): LocalBadiDate {\n return new LocalBadiDate(this.badiDate.nextDay, this._latitude, this._longitude, this._timezoneId);\n }\n\n get previousDay(): LocalBadiDate {\n return new LocalBadiDate(this.badiDate.previousDay, this._latitude, this._longitude, this._timezoneId);\n }\n}\n\nconst badiDateSettings = (settings: BadiDateSettings) => {\n if (typeof settings.defaultLanguage === 'string' ||\n typeof settings.underlineFormat === 'string') {\n badiDateBaseSettings(settings);\n }\n if (typeof settings.useClockLocations === 'boolean') {\n useClockLocations(settings.useClockLocations);\n }\n};\n\nMeeusSunMoon.settings({ returnTimeForNoEventCase: true, roundToNearestMinute: true });\n\nexport { BadiDate, LocalBadiDate, badiDateSettings };\n"],"names":["deg2rad","deg","rad2deg","rad","sind","Math","sin","cosd","cos","reduceAngle","angle","floor","polynomial","variable","coeffs","varPower","sum","numCoeffs","length","i","interpolateFromThree","y1","y2","y3","n","normalize","a","b","datetimeToT","datetime","Y","year","M","month","D","day","hour","minute","second","A","B","DateTime","fromISO","zone","datetimeToJD","DeltaT","u","t","y","pow","roundToNearestMinute","returnTimeForNoEventCase","dateFormatKeys","SUN_HIGH","SUN_LOW","sunMeanAnomaly","sunMeanLongitude","meanObliquityOfEcliptic","moonArgumentOfLatitude","moonAscendingNodeLongitude","moonMeanAnomaly","moonMeanElongation","nutations","sunRiseSet","phi","L","flag","offset","timezone","suntime","set","millisecond","setZone","keepLocalTime","deltaT","T","Theta0","apparentSiderealTimeGreenwich","TD","alpha","sunApparentRightAscension","delta","sunApparentDeclination","H0","approxLocalHourAngle","m","m0","normalizeM","counter","DeltaM","abs","sunRiseSetCorrection","plus","seconds","minus","handleNoEventCase","date","errorCode","returnDate","minutes","isInDST","cosH0","noEventCodes","acos","utcOffset","localM","sunTransitCorrection","theta0","interpolatedRa","localHourAngle","interpolatedDec","H","altitude","asin","alpha1","alpha2","alpha3","delta1","delta2","delta3","Omega","moonAscendingNodeLongitude$1","epsilon","trueObliquityOfEcliptic","lambda","sunApparentLongitude","atan2","meanSiderealTimeGreenwich","theta","nutationInLongitude","meanObliquityOfEcliptic$1","nutationInObliquity","Sol","sunTrueLongitude","sunMeanLongitude$1","sunEquationOfCenter","sunMeanAnomaly$1","moonMeanElongation$1","MPrime","moonMeanAnomaly$1","F","moonArgumentOfLatitude$1","sineArg","DeltaPsi","cosArg","DeltaEpsilon","L0","sunset","latitude","longitude","err","solarNoon","transit","sunTransit","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","monthL","badiLocale","en","ar","de","es","fa","fr","lv","nl","pt","ru","sv","zh","en-us","default","underlineFormat","formatTokens","getFormatItem","badiDate","token","language","digitRewrite","postProcessLocaleItem","formatItemFallback","gregorianDate","weekday","String","slice","dayL","item","crop","char","includes","split","stringComponents","underlineString","join","str","map","TypeError","number","unicodeOffset","charCodeAt","codePoints","num","fromCharCode","category","index","undefined","languageFallback","languageCode","badiYears","BadiDate","[object Object]","this","_isDateObject","_gregorianDate","luxon.DateTime","fromObject","getFullYear","getMonth","getDate","isDateTime","_isYearMonthDay","_isYearHolyDayNumber","_setFromBadiDate","_year","_setFromGregorianDate","_setHolyDay","_setInvalid","Object","freeze","formatString","isValid","formattedDate","j","next1","next2","next3","formatBadiDate","arg","prototype","toString","call","holyDayNumber","lowerBound","upperBound","_notInValidGregorianDateRange","RangeError","gregorianYear","oldImplementationCutoff","_nawRuz","_setOldAyyamiHaLength","_yearTwinBirthdays","_setBadiYearInfo","_setBadiMonthAndDay","dayOfBadiYear","_dayOfYear","_month","_day","_ayyamiHaLength","_holyDay","_holyDayMapping","luxon.Duration","days","isInLeapYear","fromGregorianDate","yearData","_extractBadiYearInfo","nawRuz","ayyamiHaLength","twinBirthdays","components","parseInt","TB1","TB2","Array","isArray","diff","as","invalidReason","invalid","NaN","_valid","_invalidReason","mapping","keys","find","key","leapYearsBefore","min","filter","entry","entries","data","_leapYearsBefore","other","valueOf","yearInVahid","vahid","kullIShay","workSuspended","nextMonth","previousMonth","nextDay","previousDay","badiDateSettings","settings","format","defaultLanguage","console","log","clockLocations","usingClockLocations","pointInPolygon","coords","polygon","x","inside","xi","yi","xj","yj","LocalBadiDate","timezoneId","_latitude","_longitude","_timezoneId","_badiDate","_setInputDateToCorrectDay","gregDate","_clockLocation","countries","labels","push","clockLocationFromPolygons","_end","MeeusSunMoon.sunset","_solarNoon","MeeusSunMoon.solarNoon","_sunrise","MeeusSunMoon.sunrise","_start","hours","_holyDayCommemoration","start","sunrise","end","holyDayCommemoration","clockLocation","badiDateBaseSettings","useClockLocations","MeeusSunMoon.settings"],"mappings":";;;;;;;;;;GAaA,MAAMA,EAAWC,GAAc,oBAANA,EAMnBC,EAAWC,GAAc,kBAANA,EAMnBC,EAAQH,GAAQI,KAAKC,IAAIN,EAAQC,IAMjCM,EAAQN,GAAQI,KAAKG,IAAIR,EAAQC,IAMjCQ,EAAeC,GAAUA,EAAS,IAAML,KAAKM,MAAMD,EAAQ,KAO3DE,EAAa,CAACC,EAAUC,KAC1B,IAAIC,EAAW,EACXC,EAAM,EACV,MAAMC,EAAYH,EAAOI,OACzB,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAWE,IAC3BH,GAAOD,EAAWD,EAAOK,GACzBJ,GAAYF,EAEhB,OAAOG,GAWLI,EAAuB,CAACC,EAAIC,EAAIC,EAAIC,EAAGC,GAAY,KACrD,IAAIC,EAAIJ,EAAKD,EACTM,EAAIJ,EAAKD,OACY,IAAdG,GAA6BA,IAChCC,EAAI,IAC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