@hebcal/rest-api 5.1.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/rest-api v5.1.0 */
1
+ /*! @hebcal/rest-api v5.1.1 */
2
2
  var hebcal__rest_api = (function (exports, core, leyning, triennial) {
3
3
  'use strict';
4
4
 
@@ -40,107 +40,106 @@ function yearFromFixed(abs) {
40
40
  const ABS_14SEP1752 = 639797;
41
41
  const ABS_2SEP1752 = 639785;
42
42
  */
43
+ /*
44
+ * Formerly in namespace, now top-level
45
+ */
46
+ /**
47
+ * Returns true if the Gregorian year is a leap year
48
+ * @param year Gregorian year
49
+ */
50
+ function isGregLeapYear(year) {
51
+ return !(year % 4) && (!!(year % 100) || !(year % 400));
52
+ }
53
+ /**
54
+ * Number of days in the Gregorian month for given year
55
+ * @param month Gregorian month (1=January, 12=December)
56
+ * @param year Gregorian year
57
+ */
58
+ function daysInGregMonth(month, year) {
59
+ // 1 based months
60
+ return monthLengths[+isGregLeapYear(year)][month];
61
+ }
62
+ /**
63
+ * Returns true if the object is a Javascript Date
64
+ */
65
+ function isDate(obj) {
66
+ // eslint-disable-next-line no-prototype-builtins
67
+ return typeof obj === 'object' && Date.prototype.isPrototypeOf(obj);
68
+ }
69
+ /**
70
+ * @private
71
+ * @param year
72
+ * @param month (1-12)
73
+ * @param day (1-31)
74
+ */
75
+ function toFixed(year, month, day) {
76
+ const py = year - 1;
77
+ return (365 * py +
78
+ quotient(py, 4) -
79
+ quotient(py, 100) +
80
+ quotient(py, 400) +
81
+ quotient(367 * month - 362, 12) +
82
+ (month <= 2 ? 0 : isGregLeapYear(year) ? -1 : -2) +
83
+ day);
84
+ }
43
85
  /**
44
- * Gregorian date helper functions.
86
+ * Converts Gregorian date to absolute R.D. (Rata Die) days
87
+ * @param date Gregorian date
88
+ */
89
+ function greg2abs(date) {
90
+ if (!isDate(date)) {
91
+ throw new TypeError(`Argument not a Date: ${date}`);
92
+ }
93
+ const abs = toFixed(date.getFullYear(), date.getMonth() + 1, date.getDate());
94
+ /*
95
+ if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
96
+ throw new RangeError(`Invalid Date: ${date}`);
97
+ }
98
+ */
99
+ return abs;
100
+ }
101
+ /**
102
+ * Converts from Rata Die (R.D. number) to Gregorian date.
103
+ * See the footnote on page 384 of ``Calendrical Calculations, Part II:
104
+ * Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
105
+ * Clamen, Software--Practice and Experience, Volume 23, Number 4
106
+ * (April, 1993), pages 383-404 for an explanation.
107
+ * @param abs - R.D. number of days
108
+ */
109
+ function abs2greg(abs) {
110
+ if (typeof abs !== 'number') {
111
+ throw new TypeError(`Argument not a Number: ${abs}`);
112
+ }
113
+ abs = Math.trunc(abs);
114
+ /*
115
+ if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
116
+ throw new RangeError(`Invalid Date: ${abs}`);
117
+ }
118
+ */
119
+ const year = yearFromFixed(abs);
120
+ const priorDays = abs - toFixed(year, 1, 1);
121
+ const correction = abs < toFixed(year, 3, 1) ? 0 : isGregLeapYear(year) ? 1 : 2;
122
+ const month = quotient(12 * (priorDays + correction) + 373, 367);
123
+ const day = abs - toFixed(year, month, 1) + 1;
124
+ const dt = new Date(year, month - 1, day);
125
+ if (year < 100 && year >= 0) {
126
+ dt.setFullYear(year);
127
+ }
128
+ return dt;
129
+ }
130
+
131
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-namespace */
132
+ /**
133
+ * Gregorian date helper functions
45
134
  */
46
135
  var greg;
47
136
  (function (greg) {
48
- /**
49
- * Returns true if the Gregorian year is a leap year
50
- * @param {number} year Gregorian year
51
- * @return {boolean}
52
- */
53
- function isLeapYear(year) {
54
- return !(year % 4) && (!!(year % 100) || !(year % 400));
55
- }
56
- greg.isLeapYear = isLeapYear;
57
- /**
58
- * Number of days in the Gregorian month for given year
59
- * @param {number} month Gregorian month (1=January, 12=December)
60
- * @param {number} year Gregorian year
61
- * @return {number}
62
- */
63
- function daysInMonth(month, year) {
64
- // 1 based months
65
- return monthLengths[+isLeapYear(year)][month];
66
- }
67
- greg.daysInMonth = daysInMonth;
68
- /**
69
- * Returns true if the object is a Javascript Date
70
- * @param {Object} obj
71
- * @return {boolean}
72
- */
73
- function isDate(obj) {
74
- // eslint-disable-next-line no-prototype-builtins
75
- return typeof obj === 'object' && Date.prototype.isPrototypeOf(obj);
76
- }
77
- greg.isDate = isDate;
78
- /**
79
- * @private
80
- * @param year
81
- * @param month (1-12)
82
- * @param day (1-31)
83
- */
84
- function toFixed(year, month, day) {
85
- const py = year - 1;
86
- return (365 * py +
87
- quotient(py, 4) -
88
- quotient(py, 100) +
89
- quotient(py, 400) +
90
- quotient(367 * month - 362, 12) +
91
- (month <= 2 ? 0 : isLeapYear(year) ? -1 : -2) +
92
- day);
93
- }
94
- /**
95
- * Converts Gregorian date to absolute R.D. (Rata Die) days
96
- * @param {Date} date Gregorian date
97
- * @return {number}
98
- */
99
- function greg2abs(date) {
100
- if (!isDate(date)) {
101
- throw new TypeError(`Argument not a Date: ${date}`);
102
- }
103
- const abs = toFixed(date.getFullYear(), date.getMonth() + 1, date.getDate());
104
- /*
105
- if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
106
- throw new RangeError(`Invalid Date: ${date}`);
107
- }
108
- */
109
- return abs;
110
- }
111
- greg.greg2abs = greg2abs;
112
- /**
113
- * Converts from Rata Die (R.D. number) to Gregorian date.
114
- * See the footnote on page 384 of ``Calendrical Calculations, Part II:
115
- * Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
116
- * Clamen, Software--Practice and Experience, Volume 23, Number 4
117
- * (April, 1993), pages 383-404 for an explanation.
118
- * @param {number} abs - R.D. number of days
119
- * @return {Date}
120
- */
121
- function abs2greg(abs) {
122
- if (typeof abs !== 'number') {
123
- throw new TypeError(`Argument not a Number: ${abs}`);
124
- }
125
- abs = Math.trunc(abs);
126
- /*
127
- if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
128
- throw new RangeError(`Invalid Date: ${abs}`);
129
- }
130
- */
131
- const year = yearFromFixed(abs);
132
- const priorDays = abs - toFixed(year, 1, 1);
133
- const correction = abs < toFixed(year, 3, 1) ? 0 : isLeapYear(year) ? 1 : 2;
134
- const month = quotient(12 * (priorDays + correction) + 373, 367);
135
- const day = abs - toFixed(year, month, 1) + 1;
136
- const dt = new Date(year, month - 1, day);
137
- if (year < 100 && year >= 0) {
138
- dt.setFullYear(year);
139
- }
140
- return dt;
141
- }
142
- greg.abs2greg = abs2greg;
143
137
  })(greg || (greg = {}));
138
+ greg.abs2greg = abs2greg;
139
+ greg.daysInMonth = daysInGregMonth;
140
+ greg.greg2abs = greg2abs;
141
+ greg.isDate = isDate;
142
+ greg.isLeapYear = isGregLeapYear;
144
143
 
145
144
  const alefbet = {
146
145
  א: 1,
@@ -178,8 +177,6 @@ for (const [key, val] of Object.entries(alefbet)) {
178
177
  * Similar to `string.padStart(4, '0')` but will also format
179
178
  * negative numbers similar to how the JavaScript date formats
180
179
  * negative year numbers (e.g. `-37` is formatted as `-000037`).
181
- * @param {number} number
182
- * @return {string}
183
180
  */
184
181
  function pad4(number) {
185
182
  if (number < 0) {
@@ -199,8 +196,6 @@ function pad4(number) {
199
196
  /**
200
197
  * Formats a number with leading zeros so the resulting string is 2 digits long.
201
198
  * Similar to `string.padStart(2, '0')`.
202
- * @param {number} number
203
- * @return {string}
204
199
  */
205
200
  function pad2(number) {
206
201
  if (number < 10) {
@@ -210,9 +205,6 @@ function pad2(number) {
210
205
  }
211
206
  /**
212
207
  * Returns YYYY-MM-DD in the local timezone
213
- * @private
214
- * @param {Date} dt
215
- * @return {string}
216
208
  */
217
209
  function isoDateString(dt) {
218
210
  return (pad4(dt.getFullYear()) +
@@ -231,9 +223,9 @@ const noopLocale = {
231
223
  contexts: { '': {} },
232
224
  };
233
225
  const alias = {
234
- 'h': 'he',
235
- 'a': 'ashkenazi',
236
- 's': 'en',
226
+ h: 'he',
227
+ a: 'ashkenazi',
228
+ s: 'en',
237
229
  '': 'en',
238
230
  };
239
231
  /** @private */
@@ -254,12 +246,12 @@ class Locale {
254
246
  /**
255
247
  * Returns translation only if `locale` offers a non-empty translation for `id`.
256
248
  * Otherwise, returns `undefined`.
257
- * @param {string} id Message ID to translate
258
- * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
259
- * @return {string}
249
+ * @param id Message ID to translate
250
+ * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
260
251
  */
261
252
  static lookupTranslation(id, locale) {
262
- const loc = (typeof locale === 'string' && locales.get(locale.toLowerCase())) || activeLocale;
253
+ const loc = (typeof locale === 'string' && locales.get(locale.toLowerCase())) ||
254
+ activeLocale;
263
255
  const array = loc[id];
264
256
  if ((array === null || array === void 0 ? void 0 : array.length) && array[0].length) {
265
257
  return array[0];
@@ -268,9 +260,8 @@ class Locale {
268
260
  }
269
261
  /**
270
262
  * By default, if no translation was found, returns `id`.
271
- * @param {string} id Message ID to translate
272
- * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
273
- * @return {string}
263
+ * @param id Message ID to translate
264
+ * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
274
265
  */
275
266
  static gettext(id, locale) {
276
267
  const text = this.lookupTranslation(id, locale);
@@ -281,23 +272,24 @@ class Locale {
281
272
  }
282
273
  /**
283
274
  * Register locale translations.
284
- * @param {string} locale Locale name (i.e.: `'he'`, `'fr'`)
285
- * @param {LocaleData} data parsed data from a `.po` file.
275
+ * @param locale Locale name (i.e.: `'he'`, `'fr'`)
276
+ * @param data parsed data from a `.po` file.
286
277
  */
287
278
  static addLocale(locale, data) {
288
279
  if (typeof locale !== 'string') {
289
280
  throw new TypeError(`Invalid locale name: ${locale}`);
290
281
  }
291
- if (typeof data.contexts !== 'object' || typeof data.contexts[''] !== 'object') {
282
+ if (typeof data.contexts !== 'object' ||
283
+ typeof data.contexts[''] !== 'object') {
292
284
  throw new TypeError(`Locale '${locale}' invalid compact format`);
293
285
  }
294
286
  locales.set(locale.toLowerCase(), data.contexts['']);
295
287
  }
296
288
  /**
297
289
  * Adds a translation to `locale`, replacing any previous translation.
298
- * @param {string} locale Locale name (i.e: `'he'`, `'fr'`).
299
- * @param {string} id Message ID to translate
300
- * @param {string | string[]} translation Translation text
290
+ * @param locale Locale name (i.e: `'he'`, `'fr'`).
291
+ * @param id Message ID to translate
292
+ * @param translation Translation text
301
293
  */
302
294
  static addTranslation(locale, id, translation) {
303
295
  if (typeof locale !== 'string') {
@@ -324,8 +316,8 @@ class Locale {
324
316
  }
325
317
  /**
326
318
  * Adds multiple translations to `locale`, replacing any previous translations.
327
- * @param {string} locale Locale name (i.e: `'he'`, `'fr'`).
328
- * @param {LocaleData} data parsed data from a `.po` file.
319
+ * @param locale Locale name (i.e: `'he'`, `'fr'`).
320
+ * @param data parsed data from a `.po` file.
329
321
  */
330
322
  static addTranslations(locale, data) {
331
323
  if (typeof locale !== 'string') {
@@ -335,7 +327,8 @@ class Locale {
335
327
  if (!loc) {
336
328
  throw new TypeError(`Unknown locale: ${locale}`);
337
329
  }
338
- if (typeof data.contexts !== 'object' || typeof data.contexts[''] !== 'object') {
330
+ if (typeof data.contexts !== 'object' ||
331
+ typeof data.contexts[''] !== 'object') {
339
332
  throw new TypeError(`Locale '${locale}' invalid compact format`);
340
333
  }
341
334
  const ctx = data.contexts[''];
@@ -345,7 +338,7 @@ class Locale {
345
338
  * Activates a locale. Throws an error if the locale has not been previously added.
346
339
  * After setting the locale to be used, all strings marked for translations
347
340
  * will be represented by the corresponding translation in the specified locale.
348
- * @param {string} locale Locale name (i.e: `'he'`, `'fr'`)
341
+ * @param locale Locale name (i.e: `'he'`, `'fr'`)
349
342
  */
350
343
  static useLocale(locale) {
351
344
  const locale0 = locale.toLowerCase();
@@ -359,23 +352,20 @@ class Locale {
359
352
  }
360
353
  /**
361
354
  * Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
362
- * @return {string}
363
355
  */
364
356
  static getLocaleName() {
365
357
  return activeName;
366
358
  }
367
359
  /**
368
360
  * Returns the names of registered locales
369
- * @return {string[]}
370
361
  */
371
362
  static getLocaleNames() {
372
363
  const keys = Array.from(locales.keys());
373
364
  return keys.sort((a, b) => a.localeCompare(b));
374
365
  }
375
366
  /**
376
- * @param {number} n
377
- * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
378
- * @return {string}
367
+ * Renders a number in ordinal, such as 1st, 2nd or 3rd
368
+ * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
379
369
  */
380
370
  static ordinal(n, locale) {
381
371
  const locale1 = locale === null || locale === void 0 ? void 0 : locale.toLowerCase();
@@ -402,11 +392,6 @@ class Locale {
402
392
  return n + '.';
403
393
  }
404
394
  }
405
- /**
406
- * @private
407
- * @param {number} n
408
- * @return {string}
409
- */
410
395
  static getEnOrdinal(n) {
411
396
  const s = ['th', 'st', 'nd', 'rd'];
412
397
  const v = n % 100;
@@ -414,8 +399,6 @@ class Locale {
414
399
  }
415
400
  /**
416
401
  * Removes nekudot from Hebrew string
417
- * @param {string} str
418
- * @return {string}
419
402
  */
420
403
  static hebrewStripNikkud(str) {
421
404
  return str.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
@@ -1141,9 +1124,9 @@ function eventToClassicApiObject(ev, options, leyning$1 = true) {
1141
1124
  if (reading) {
1142
1125
  result.leyning = formatLeyningResult(reading);
1143
1126
  const hyear = hd.getFullYear();
1144
- if (isParsha && !il && hyear >= 5745) {
1145
- const triReading = triennial.getTriennialForParshaHaShavua(ev);
1146
- if (triReading) {
1127
+ if (isParsha && hyear >= 5745) {
1128
+ const triReading = triennial.getTriennialForParshaHaShavua(ev, il);
1129
+ if (triReading === null || triReading === void 0 ? void 0 : triReading.aliyot) {
1147
1130
  result.leyning.triennial = formatAliyot({}, triReading.aliyot);
1148
1131
  }
1149
1132
  }
@@ -1216,6 +1199,18 @@ function formatAliyot(result, aliyot) {
1216
1199
  }
1217
1200
  return result;
1218
1201
  }
1202
+ function formatReasons(result, reason) {
1203
+ for (const num of ['7', '8', 'M']) {
1204
+ if (reason[num]) {
1205
+ const k = num == 'M' ? 'maftir' : num;
1206
+ result[k] += ' | ' + reason[num];
1207
+ }
1208
+ }
1209
+ if (reason.haftara) {
1210
+ result.haftarah += ' | ' + reason.haftara;
1211
+ }
1212
+ return result;
1213
+ }
1219
1214
  function formatLeyningResult(reading) {
1220
1215
  const result = {};
1221
1216
  if (reading.summary) {
@@ -1231,15 +1226,7 @@ function formatLeyningResult(reading) {
1231
1226
  formatAliyot(result, reading.fullkriyah);
1232
1227
  }
1233
1228
  if (reading.reason) {
1234
- for (const num of ['7', '8', 'M']) {
1235
- if (reading.reason[num]) {
1236
- const k = num == 'M' ? 'maftir' : num;
1237
- result[k] += ' | ' + reading.reason[num];
1238
- }
1239
- }
1240
- if (reading.reason.haftara) {
1241
- result.haftarah += ' | ' + reading.reason.haftara;
1242
- }
1229
+ formatReasons(result, reading.reason);
1243
1230
  }
1244
1231
  return result;
1245
1232
  }
@@ -1,2 +1,2 @@
1
- /*! @hebcal/rest-api v5.1.0 */
2
- var hebcal__rest_api=function(e,a,t,o){"use strict";const r=[0,31,28,31,30,31,30,31,31,30,31,30,31],n=[r,r.slice()];function i(e,a){return e-a*Math.floor(e/a)}function s(e,a){return Math.floor(e/a)}var h;n[1][2]=29,function(e){function a(e){return!(e%4||!(e%100)&&e%400)}function t(e){return"object"==typeof e&&Date.prototype.isPrototypeOf(e)}function o(e,t,o){const r=e-1;return 365*r+s(r,4)-s(r,100)+s(r,400)+s(367*t-362,12)+(t<=2?0:a(e)?-1:-2)+o}e.isLeapYear=a,e.daysInMonth=function(e,t){return n[+a(t)][e]},e.isDate=t,e.greg2abs=function(e){if(!t(e))throw new TypeError(`Argument not a Date: ${e}`);return o(e.getFullYear(),e.getMonth()+1,e.getDate())},e.abs2greg=function(e){if("number"!=typeof e)throw new TypeError(`Argument not a Number: ${e}`);const t=function(e){const a=e-1,t=s(a,146097),o=i(a,146097),r=s(o,36524),n=i(o,36524),h=s(n,1461),l=s(i(n,1461),365),d=400*t+100*r+4*h+l;return 4!==r&&4!==l?d+1:d}(e=Math.trunc(e)),r=s(12*(e-o(t,1,1)+(e<o(t,3,1)?0:a(t)?1:2))+373,367),n=e-o(t,r,1)+1,h=new Date(t,r-1,n);return t<100&&t>=0&&h.setFullYear(t),h}}(h||(h={}));const l={"א":1,"ב":2,"ג":3,"ד":4,"ה":5,"ו":6,"ז":7,"ח":8,"ט":9,"י":10,"כ":20,"ל":30,"מ":40,"נ":50,"ס":60,"ע":70,"פ":80,"צ":90,"ק":100,"ר":200,"ש":300,"ת":400},d=new Map,c=new Map;for(const[e,a]of Object.entries(l))d.set(e,a),c.set(a,e);function m(e){return e<0?"-00"+m(-e):e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:String(e)}function u(e){return e<10?"0"+e:String(e)}function f(e){return m(e.getFullYear())+"-"+u(e.getMonth()+1)+"-"+u(e.getDate())}var g={headers:{"plural-forms":"nplurals=2; plural=(n > 1);"},contexts:{"":{Tevet:["Teves"]}}},b={headers:{"plural-forms":"nplurals=2; plural=(n > 1);"},contexts:{"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִּשְׁרֵי"]}}};const y={headers:{"plural-forms":"nplurals=2; plural=(n!=1);"},contexts:{"":{}}},p={h:"he",a:"ashkenazi",s:"en","":"en"},w=new Map;let S,v;class T{static lookupTranslation(e,a){const t=("string"==typeof a&&w.get(a.toLowerCase())||S)[e];if((null==t?void 0:t.length)&&t[0].length)return t[0]}static gettext(e,a){const t=this.lookupTranslation(e,a);return void 0===t?e:t}static addLocale(e,a){if("string"!=typeof e)throw new TypeError(`Invalid locale name: ${e}`);if("object"!=typeof a.contexts||"object"!=typeof a.contexts[""])throw new TypeError(`Locale '${e}' invalid compact format`);w.set(e.toLowerCase(),a.contexts[""])}static addTranslation(e,a,t){if("string"!=typeof e)throw new TypeError(`Invalid locale name: ${e}`);const o=w.get(e.toLowerCase());if(!o)throw new TypeError(`Unknown locale: ${e}`);if("string"!=typeof a||0===a.length)throw new TypeError(`Invalid id: ${a}`);const r=Array.isArray(t);if(r){const e=t[0];if("string"!=typeof e||0===e.length)throw new TypeError(`Invalid translation array: ${t}`)}else if("string"!=typeof t)throw new TypeError(`Invalid translation: ${t}`);o[a]=r?t:[t]}static addTranslations(e,a){if("string"!=typeof e)throw new TypeError(`Invalid locale name: ${e}`);const t=w.get(e.toLowerCase());if(!t)throw new TypeError(`Unknown locale: ${e}`);if("object"!=typeof a.contexts||"object"!=typeof a.contexts[""])throw new TypeError(`Locale '${e}' invalid compact format`);const o=a.contexts[""];Object.assign(t,o)}static useLocale(e){const a=e.toLowerCase(),t=w.get(a);if(!t)throw new RangeError(`Locale '${e}' not found`);return v=p[a]||a,S=t,S}static getLocaleName(){return v}static getLocaleNames(){return Array.from(w.keys()).sort(((e,a)=>e.localeCompare(a)))}static ordinal(e,a){const t=(null==a?void 0:a.toLowerCase())||v;if(!t)return this.getEnOrdinal(e);switch(t){case"en":case"s":case"a":case"ashkenazi":case"ashkenazi_litvish":case"ashkenazi_poylish":case"ashkenazi_standard":return this.getEnOrdinal(e);case"es":return e+"º";case"h":case"he":case"he-x-nonikud":return String(e);default:return e+"."}}static getEnOrdinal(e){const a=["th","st","nd","rd"],t=e%100;return e+(a[(t-20)%10]||a[t]||a[0])}static hebrewStripNikkud(e){return e.replace(/[\u0590-\u05bd]/g,"").replace(/[\u05bf-\u05c7]/g,"")}}T.addLocale("en",y),T.addLocale("s",y),T.addLocale("",y),T.useLocale("en"),T.addLocale("ashkenazi",g),T.addLocale("a",g),T.addLocale("he",b),T.addLocale("h",b);const H=b.contexts[""],A={};for(const[e,a]of Object.entries(H))A[e]=[T.hebrewStripNikkud(a[0])];const C={headers:b.headers,contexts:{"":A}};T.addLocale("he-x-NoNikud",C);const I=["elevation","admin1","asciiname","geo","zip","state","stateName","geonameid"],M={"Asara B'Tevet":"Fast commemorating the siege of Jerusalem","Ben-Gurion Day":"Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion","Birkat Hachamah":"A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun","Chag HaBanot":"North African Chanukah festival of daughters. Called Eid al-Banat in Arabic, the holiday was most preserved in Tunisia",Chanukah:"Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights, the eight-day festival is observed by lighting the candles of a hanukkiah (menorah)","Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot. Also called Sefirat HaOmer, it is a practice that consists of a verbal counting of each of the forty-nine days between the two holidays","Family Day":"Yom HaMishpacha, a day to honor the family unit","Hebrew Language Day":"Promotes the Hebrew language in Israel and around the world. Occurs on the birthday of Eliezer Ben Yehuda, the father of modern spoken Hebrew","Herzl Day":"Commemorates the life and vision of Zionist leader Theodor Herzl","Jabotinsky Day":"Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky","Lag BaOmer":"33rd day of counting the Omer. The holiday is a temporary break from the semi-mourning period the counting of the Omer. Practices include lighting bonfires, getting haircuts, and Jewish weddings","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:"Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt","Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:"Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination","Purim Meshulash":"Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat","Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":'Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes "Adar Bet" or "Adar Sheni", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon',"Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat of Prophecy/Shabbat of Vision. Shabbat before Tish'a B'Av","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan. Read in preparation for Passover","Shabbat HaGadol":"Shabbat before Pesach (The Great Shabbat)","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Mevarchim Chodesh":"Shabbat that precedes Rosh Chodesh. The congregation blesses the forthcoming new month","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer. Shabbat before Shabbat HaChodesh, in preparation for Passover","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar. Read in preparation for Purim","Shabbat Shirah":"Shabbat of Song. Shabbat that includes Parashat Beshalach","Shabbat Shuva":"Shabbat of Returning. Shabbat that occurs during the Ten Days of Repentance between Rosh Hashanah and Yom Kippur","Shabbat Zachor":"Shabbat of Remembrance. Shabbat before Purim",Shavuot:"Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai","Shmini Atzeret":"Eighth Day of Assembly. Immediately following Sukkot, it is observed as a separate holiday in the Diaspora and is combined with Simchat Torah in Israel","Shushan Purim":"Purim celebrated in Jerusalem and walled cities","Shushan Purim Katan":"Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",Sigd:"Ethiopian Jewish holiday occurring 50 days after Yom Kippur","Simchat Torah":"Day of Celebrating the Torah. Celebration marking the conclusion of the annual cycle of public Torah readings, and the beginning of a new cycle",Sukkot:"Feast of Booths. Also called the Feast of Tabernacles, the seven-day holiday is one of the Three Pilgrimage Festivals (Hebrew: שלוש רגלים, shalosh regalim)","Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees. Tu BiShvat is one of four “New Years” mentioned in the Mishnah","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yitzhak Rabin Memorial Day":"Commemorates the life of Israeli Prime Minister Yitzhak Rabin","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement. The holiest day of the year in Judaism, traditionally observed with a 25-hour period of fasting and intensive prayer","Yom Kippur Katan":"Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"},R={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curacao",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GE:"Georgia",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MP:"Northern Mariana Islands",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PR:"Puerto Rico",PT:"Portugal",PY:"Paraguay",QA:"Qatar",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SK:"Slovakia",SL:"Sierra Leone",SN:"Senegal",SO:"Somalia",SR:"Suriname",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syria",SZ:"Swaziland",TC:"Turks and Caicos Islands",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TM:"Turkmenistan",TN:"Tunisia",TR:"Turkey",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VN:"Vietnam",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"};function k(e){if("object"==typeof e&&null!==e&&"function"==typeof e.getLatitude){const a=e.getCountryCode(),t={title:e.getName(),city:e.getShortName(),tzid:e.getTzid(),latitude:e.getLatitude(),longitude:e.getLongitude(),cc:a,country:R[a]};for(const a of I){const o=e[a];o&&(t[a]=o)}return t}return{geo:"none"}}function D(e){return e.toLowerCase().replace(/'/g,"").replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-/g,"").replace(/-$/g,"")}function B(e){const a=e.getDesc();return"Purim"===a||"Erev Purim"===a?["holiday","major"]:e.getCategories()}function E(e,a){let t="Hebcal";const o=a.location,r=null==o?void 0:o.getName();if(a.yahrzeit)t+=" Yahrzeits and Anniversaries";else if(r){const e=r.indexOf(",");t+=" "+(-1==e?r:r.substring(0,e))}else a.il?t+=" Israel":t+=" Diaspora";if("1"==a.subscribe)return t;if(a.year&&(a.isHebrewYear||0==e.length))t+=" "+a.year;else if(e.length){const a=e[0].getDate().greg(),o=e[e.length-1].getDate().greg();if(a.getFullYear()!=o.getFullYear())t+=" "+a.getFullYear()+"-"+o.getFullYear();else if(a.getMonth()==o.getMonth()){t+=" "+new Intl.DateTimeFormat("en-US",{month:"long"}).format(a)+" "+a.getFullYear()}else t+=" "+a.getFullYear()}return t}function N(e,t=!1){const o=(e.getFlags()&a.flags.SHABBAT_MEVARCHIM?M["Shabbat Mevarchim Chodesh"]:M[e.getDesc()]||M[e.basename()]||"").normalize();if(t&&o){const e=o.indexOf(".");if(-1!=e)return o.substring(0,e)}return o}const L=a.flags.DAF_YOMI|a.flags.OMER_COUNT|a.flags.SHABBAT_MEVARCHIM|a.flags.MOLAD|a.flags.USER_EVENT|a.flags.NACH_YOMI|a.flags.DAILY_LEARNING|a.flags.HEBREW_DATE|a.flags.YERUSHALMI_YOMI;function P(e,o){var r;const n=e.getFlags();if(n&L||void 0!==e.eventTime)return"";const i=n&a.flags.PARSHA_HASHAVUA?t.getLeyningForParshaHaShavua(e,o):t.getLeyningForHoliday(e,o);let s="";return i&&(i.summary||i.haftara)&&(i.summary&&(s+=`Torah: ${i.summary}`),i.summary&&i.haftara&&(s+="\n"),i.haftara&&(s+="Haftarah: "+i.haftara,(null===(r=i.reason)||void 0===r?void 0:r.haftara)&&(s+=" | "+i.reason.haftara))),(null==i?void 0:i.sephardic)&&(s+="\nHaftarah for Sephardim: "+i.sephardic),s}function F(e,t){if(e.getFlags()&a.flags.PARSHA_HASHAVUA)try{const a=P(e,t);if(a)return a}catch(e){}return e.memo||M[e.basename()]}function Y(e,a,t,o,r){const n=new URL(e),i="www.hebcal.com"===n.host;if(i){a&&n.searchParams.set("i","on");const e=n.pathname,i=e.startsWith("/holidays/"),s=e.startsWith("/sedrot/"),h=e.startsWith("/omer/");if(i||s||h)return n.host="hebcal.com",n.pathname=i?"/h/"+e.substring(10):s?"/s/"+e.substring(8):"/o/"+e.substring(6),r&&(r.startsWith("ical-")||r.startsWith("pdf-"))||(t&&n.searchParams.set("us",t),o&&n.searchParams.set("um",o)),r&&n.searchParams.set("uc",r),n.toString()}return(t=i?t:"hebcal.com")&&n.searchParams.set("utm_source",t),o&&n.searchParams.set("utm_medium",o),r&&n.searchParams.set("utm_campaign",r),n.toString()}function G(e){if(void 0!==e.eventTime)return!0;const t=e.getFlags();if(t&a.flags.HEBREW_DATE){return 1!==e.getDate().getDate()}return!!(t&(a.flags.DAILY_LEARNING|a.flags.DAF_YOMI|a.flags.YERUSHALMI_YOMI))||(!!(t&a.flags.MINOR_FAST&&"Yom Kippur Katan"===e.getDesc().substring(0,16))||!!(t&a.flags.SHABBAT_MEVARCHIM))}const $='"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"',O={dafyomi:"Daf Yomi",mishnayomi:"Mishna Yomi",nachyomi:"Nach Yomi",yerushalmi:"Yerushalmi Yomi",hebdate:"Hebrew Date",holiday:"Jewish Holidays",mevarchim:"",molad:"",omer:"",parashat:"Torah Reading",roshchodesh:"Jewish Holidays",user:"Personal",zmanim:""};function z(e,t){const o=e.getDate().greg(),r=o.getDate(),n=o.getMonth()+1,i=String(o.getFullYear()).padStart(4,"0"),s=t.euro?`"${r}/${n}/${i}"`:`"${n}/${r}/${i}"`;let h="",l="",d="",c='"true"';const m=Boolean(e.eventTime);let u=G(e)?e.renderBrief(t.locale):e.render(t.locale);if(m){l=h=`"${a.HebrewCalendar.reformatTimeStr(e.eventTimeStr," PM",t)}"`,d=s,c='"false"'}let f="Jewish Holidays";const g=e.getFlags();if(m&&"object"==typeof t.location){const e=t.location.getShortName(),a=e.indexOf(",");f=-1===a?e:e.substring(0,a)}else{const a=O[B(e)[0]];"string"==typeof a&&(f=a)}if(u=u.replace(/,/g,"").replace(/"/g,"''"),t.appendHebrewToSubject){const a=e.renderBrief("he");a&&(u+=` / ${a}`)}let b=e.memo||N(e,!0);b||void 0===e.linkedEvent||(b=e.linkedEvent.render(t.locale));return`"${u}",${s},${h},${d},${l},${c},"${b.replace(/,/g,";").replace(/"/g,"''").replace(/\n/g," / ")}","${m||g&a.flags.CHAG?4:3}","${f}"`}function U(e){return f(e.getDate().greg())}function _(e,r,n=!0){const i=e.eventTime,s=Boolean(i),h=e.getDate(),l=h.greg(),d="object"==typeof r.location?r.location.getTzid():"UTC",c=s?a.Zmanim.formatISOWithTimeZone(d,i):f(l),m=B(e),u=e.getFlags();let g=G(e)?e.renderBrief(r.locale):e.render(r.locale);const b=e.getDesc(),y="Havdalah"===b||"Candle lighting"===b;if(y){g+=": "+a.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",r)}const p={title:g,date:c};s||(p.hdate=h.toString()),p.category=m[0],m.length>1&&(p.subcat=m[1]),"holiday"===m[0]&&u&a.flags.CHAG&&(p.yomtov=!0),g!=b&&(p.title_orig=b);const w=e.renderBrief("he");if(w&&(p.hebrew=a.Locale.hebrewStripNikkud(w)),!y){if(n){const n=r.il,i=u===a.flags.PARSHA_HASHAVUA,s=i?t.getLeyningForParshaHaShavua(e,n):t.getLeyningForHoliday(e,n);if(s){p.leyning=function(e){const a={};e.summary&&(a.torah=e.summary);e.haftara&&(a.haftarah=e.haftara);e.sephardic&&(a.haftarah_sephardic=e.sephardic);e.fullkriyah&&J(a,e.fullkriyah);if(e.reason){for(const t of["7","8","M"])if(e.reason[t]){a["M"==t?"maftir":t]+=" | "+e.reason[t]}e.reason.haftara&&(a.haftarah+=" | "+e.reason.haftara)}return a}(s);const a=h.getFullYear();if(i&&!n&&a>=5745){const a=o.getTriennialForParshaHaShavua(e);a&&(p.leyning.triennial=J({},a.aliyot))}}}const i=e.url();if(i){const e=r.utmSource||"js",a=r.utmMedium||"api",t=r.utmCampaign;p.link=Y(i,Boolean(r.il),e,a,t)}}if(u&a.flags.OMER_COUNT){const a=e;p.omer={count:{he:a.getTodayIs("he"),en:a.getTodayIs("en")},sefira:{he:a.sefira("he"),translit:a.sefira("translit"),en:a.sefira("en")}}}if(u&a.flags.MOLAD){const t=e.molad,o=t.getYear();p.molad={hy:o,hm:a.HDate.getMonthName(t.getMonth(),o),dow:t.getDow(),hour:t.getHour(),minutes:t.getMinutes(),chalakim:t.getChalakim()},delete p.hebrew}if(r.heDateParts&&!s||u&a.flags.HEBREW_DATE){const e=h.getFullYear(),t=h.getMonthName(),o=h.getDate();p.heDateParts={y:a.gematriya(e),m:a.Locale.gettext(t,"he-x-NoNikud"),d:a.gematriya(o)}}const S=e.memo||M[e.basename()];return"string"==typeof S&&0!==S.length?p.memo=S.normalize():void 0!==e.linkedEvent&&(p.memo=e.linkedEvent.render(r.locale)),r.includeEvent&&(p.ev=e),p}function J(e,a){for(const[o,r]of Object.entries(a))if(void 0!==r){e["M"==o?"maftir":o]=t.formatAliyahWithBook(r)}return e}const K={s:"en",a:"en","he-x-NoNikud":"he",h:"he",ah:"en",sh:"en"};function x(e,t){let o=e.render();const r=e.getDate().greg(),n=function(e,a,t,o){if(a){const a=e.eventTime;return a?a.toUTCString():t.toUTCString().replace(/ \S+ GMT$/," 00:00:00 GMT")}return o}(e,t.evPubDate,r,t.lastBuildDate),i=t.location,s=!!i&&i.getIsrael(),h=i?i.getTzid():"UTC",l=t.utmSource||"shabbat1c",d=t.utmMedium||"rss",c=function(e,t,o,r,n,i){let s,h;const l=e.eventTime||e.getDate().greg(),d=a.Zmanim.formatISOWithTimeZone(o,l),c=d.substring(0,d.indexOf("T")),m=`${c.replace(/-/g,"")}-${D(e.getDesc())}`,u=e.url();if(u)s=Y(u,t,n,i).replace(/&/g,"&amp;"),h=`${u}#${m}`;else{const e=`${r}&dt=${c}`,a=Y(e,t,n,i).replace(/&/g,"&amp;");h=e.replace(/&/g,"&amp;")+`#${m}`,s=`${a}#${m}`}return[s,h]}(e,s,h,t.mainUrl||"",l,d),m=c[0],u=c[1],f=B(e)[0],g=e.getDesc();let b;if("Havdalah"===g||"Candle lighting"===g){const t=o.indexOf(": ");if(-1!=t){const r={location:i,il:s,locale:a.Locale.getLocaleName()},n=a.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",r);o=o.substring(0,t)+": "+n}}else b=F(e,s);const y=t.dayFormat,p=b||y.format(r);return`<item>\n<title>${o}</title>\n<link>${m}</link>\n<guid isPermaLink="false">${u}</guid>\n<description>${-1===p.indexOf("<")?p:`<![CDATA[${p}]]>`}</description>\n<category>${f}</category>\n<pubDate>${n}</pubDate>\n${"candles"==f?`<geo:lat>${i.getLatitude()}</geo:lat>\n<geo:long>${i.getLongitude()}</geo:long>\n`:""}</item>\n`}return e.appendIsraelAndTracking=Y,e.countryNames=R,e.eventToClassicApiObject=_,e.eventToCsv=z,e.eventToFullCalendar=function(e,t,o){const r=B(e),n=e.getFlags();"holiday"==r[0]&&n&a.flags.CHAG&&r.push("yomtov");const i=e.eventTime,s=Boolean(i),h={title:G(e)?e.renderBrief():e.render(),start:s?a.Zmanim.formatISOWithTimeZone(t,i):f(e.getDate().greg()),allDay:!s,className:r.join(" ")},l=e.renderBrief("he");l&&(h.hebrew=a.Locale.hebrewStripNikkud(l));const d=e.url();d&&(h.url=Y(d,o,"js","fc"));const c=e.getDesc();if(!("Havdalah"===c||"Candle lighting"===c)){const a=F(e,o);a?h.description=a:void 0!==e.linkedEvent&&(h.description=e.linkedEvent.render())}return h},e.eventToRssItem2=x,e.eventsToClassicApi=function(e,a,t=!0){const o={title:E(e,a),date:(new Date).toISOString()};return o.location=k(a.location),e.length&&(o.range={start:U(e[0]),end:U(e[e.length-1])}),o.items=e.map((e=>_(e,a,t))),o},e.eventsToCsv=function(e,a){return[$].concat(e.map((e=>z(e,a)))).join("\r\n")+"\r\n"},e.eventsToRss2=function(e,a){a.dayFormat=new Intl.DateTimeFormat("en-US",{weekday:"long",day:"2-digit",month:"long",year:"numeric"});const t=a.location;if(!a.mainUrl||!a.selfUrl)throw new TypeError("mainUrl cannot be empty or blank");const o=a.buildDate=a.buildDate||new Date,r=o.getFullYear(),n=a.lastBuildDate=o.toUTCString(),i=a.title||E(e,a),s=a.description||i,h=a.utmSource||"shabbat1c",l=a.utmMedium||"rss";let d=`<?xml version="1.0" encoding="UTF-8"?>\n<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:atom="http://www.w3.org/2005/Atom">\n<channel>\n<title>${i}</title>\n<link>${Y(a.mainUrl,Boolean(null==t?void 0:t.getIsrael()),h,l,a.utmCampaign).replace(/&/g,"&amp;")}</link>\n<atom:link href="${a.selfUrl.replace(/&/g,"&amp;")}" rel="self" type="application/rss+xml" />\n<description>${s}</description>\n<language>${a.lang||K[a.locale]||a.locale||"en-US"}</language>\n<copyright>Copyright (c) ${r} Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>${n}</lastBuildDate>\n`;for(const t of e)d+=x(t,a);return d+="</channel>\n</rss>\n",d},e.getCalendarTitle=E,e.getDownloadFilename=function(e){let t="hebcal";if(e.year)t+="_"+e.year,e.isHebrewYear&&(t+="h"),e.month&&(t+="_"+e.month);else if("object"==typeof e.start&&"object"==typeof e.end){const o=new a.HDate(e.start),r=new a.HDate(e.end),n=o.greg().getFullYear(),i=r.greg().getFullYear();t+=n===i?"_"+n:"_"+n+"_"+i}if("object"==typeof e.location){const a=e.location,o=a.zip||a.asciiname||a.getShortName();o&&(t+="_"+D(o).replace(/[-]/g,"_"))}return t},e.getEventCategories=B,e.getHolidayDescription=N,e.holidayDescription=M,e.locationToPlainObj=k,e.makeAnchor=D,e.makeMemo=F,e.makeTorahMemoText=P,e.pad2=u,e.pad4=m,e.renderTitleWithoutTime=function(e){return void 0===e.eventTime?e.render():e.renderBrief()},e.shouldRenderBrief=G,e.toISOString=function(e){return f(e)},e}({},hebcal,hebcal__leyning,hebcal__triennial);
1
+ /*! @hebcal/rest-api v5.1.1 */
2
+ var hebcal__rest_api=function(e,a,t,o){"use strict";const n=[0,31,28,31,30,31,30,31,31,30,31,30,31],r=[n,n.slice()];function i(e,a){return e-a*Math.floor(e/a)}function s(e,a){return Math.floor(e/a)}function h(e){return!(e%4||!(e%100)&&e%400)}function l(e){return"object"==typeof e&&Date.prototype.isPrototypeOf(e)}function d(e,a,t){const o=e-1;return 365*o+s(o,4)-s(o,100)+s(o,400)+s(367*a-362,12)+(a<=2?0:h(e)?-1:-2)+t}var c;r[1][2]=29,c||(c={}),c.abs2greg=function(e){if("number"!=typeof e)throw new TypeError(`Argument not a Number: ${e}`);const a=function(e){const a=e-1,t=s(a,146097),o=i(a,146097),n=s(o,36524),r=i(o,36524),h=s(r,1461),l=s(i(r,1461),365),d=400*t+100*n+4*h+l;return 4!==n&&4!==l?d+1:d}(e=Math.trunc(e)),t=s(12*(e-d(a,1,1)+(e<d(a,3,1)?0:h(a)?1:2))+373,367),o=e-d(a,t,1)+1,n=new Date(a,t-1,o);return a<100&&a>=0&&n.setFullYear(a),n},c.daysInMonth=function(e,a){return r[+h(a)][e]},c.greg2abs=function(e){if(!l(e))throw new TypeError(`Argument not a Date: ${e}`);return d(e.getFullYear(),e.getMonth()+1,e.getDate())},c.isDate=l,c.isLeapYear=h;const m={"א":1,"ב":2,"ג":3,"ד":4,"ה":5,"ו":6,"ז":7,"ח":8,"ט":9,"י":10,"כ":20,"ל":30,"מ":40,"נ":50,"ס":60,"ע":70,"פ":80,"צ":90,"ק":100,"ר":200,"ש":300,"ת":400},u=new Map,f=new Map;for(const[e,a]of Object.entries(m))u.set(e,a),f.set(a,e);function g(e){return e<0?"-00"+g(-e):e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:String(e)}function b(e){return e<10?"0"+e:String(e)}function y(e){return g(e.getFullYear())+"-"+b(e.getMonth()+1)+"-"+b(e.getDate())}var p={headers:{"plural-forms":"nplurals=2; plural=(n > 1);"},contexts:{"":{Tevet:["Teves"]}}},w={headers:{"plural-forms":"nplurals=2; plural=(n > 1);"},contexts:{"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִּשְׁרֵי"]}}};const S={headers:{"plural-forms":"nplurals=2; plural=(n!=1);"},contexts:{"":{}}},v={h:"he",a:"ashkenazi",s:"en","":"en"},T=new Map;let H,A;class C{static lookupTranslation(e,a){const t=("string"==typeof a&&T.get(a.toLowerCase())||H)[e];if((null==t?void 0:t.length)&&t[0].length)return t[0]}static gettext(e,a){const t=this.lookupTranslation(e,a);return void 0===t?e:t}static addLocale(e,a){if("string"!=typeof e)throw new TypeError(`Invalid locale name: ${e}`);if("object"!=typeof a.contexts||"object"!=typeof a.contexts[""])throw new TypeError(`Locale '${e}' invalid compact format`);T.set(e.toLowerCase(),a.contexts[""])}static addTranslation(e,a,t){if("string"!=typeof e)throw new TypeError(`Invalid locale name: ${e}`);const o=T.get(e.toLowerCase());if(!o)throw new TypeError(`Unknown locale: ${e}`);if("string"!=typeof a||0===a.length)throw new TypeError(`Invalid id: ${a}`);const n=Array.isArray(t);if(n){const e=t[0];if("string"!=typeof e||0===e.length)throw new TypeError(`Invalid translation array: ${t}`)}else if("string"!=typeof t)throw new TypeError(`Invalid translation: ${t}`);o[a]=n?t:[t]}static addTranslations(e,a){if("string"!=typeof e)throw new TypeError(`Invalid locale name: ${e}`);const t=T.get(e.toLowerCase());if(!t)throw new TypeError(`Unknown locale: ${e}`);if("object"!=typeof a.contexts||"object"!=typeof a.contexts[""])throw new TypeError(`Locale '${e}' invalid compact format`);const o=a.contexts[""];Object.assign(t,o)}static useLocale(e){const a=e.toLowerCase(),t=T.get(a);if(!t)throw new RangeError(`Locale '${e}' not found`);return A=v[a]||a,H=t,H}static getLocaleName(){return A}static getLocaleNames(){return Array.from(T.keys()).sort(((e,a)=>e.localeCompare(a)))}static ordinal(e,a){const t=(null==a?void 0:a.toLowerCase())||A;if(!t)return this.getEnOrdinal(e);switch(t){case"en":case"s":case"a":case"ashkenazi":case"ashkenazi_litvish":case"ashkenazi_poylish":case"ashkenazi_standard":return this.getEnOrdinal(e);case"es":return e+"º";case"h":case"he":case"he-x-nonikud":return String(e);default:return e+"."}}static getEnOrdinal(e){const a=["th","st","nd","rd"],t=e%100;return e+(a[(t-20)%10]||a[t]||a[0])}static hebrewStripNikkud(e){return e.replace(/[\u0590-\u05bd]/g,"").replace(/[\u05bf-\u05c7]/g,"")}}C.addLocale("en",S),C.addLocale("s",S),C.addLocale("",S),C.useLocale("en"),C.addLocale("ashkenazi",p),C.addLocale("a",p),C.addLocale("he",w),C.addLocale("h",w);const I=w.contexts[""],M={};for(const[e,a]of Object.entries(I))M[e]=[C.hebrewStripNikkud(a[0])];const R={headers:w.headers,contexts:{"":M}};C.addLocale("he-x-NoNikud",R);const k=["elevation","admin1","asciiname","geo","zip","state","stateName","geonameid"],D={"Asara B'Tevet":"Fast commemorating the siege of Jerusalem","Ben-Gurion Day":"Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion","Birkat Hachamah":"A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun","Chag HaBanot":"North African Chanukah festival of daughters. Called Eid al-Banat in Arabic, the holiday was most preserved in Tunisia",Chanukah:"Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights, the eight-day festival is observed by lighting the candles of a hanukkiah (menorah)","Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot. Also called Sefirat HaOmer, it is a practice that consists of a verbal counting of each of the forty-nine days between the two holidays","Family Day":"Yom HaMishpacha, a day to honor the family unit","Hebrew Language Day":"Promotes the Hebrew language in Israel and around the world. Occurs on the birthday of Eliezer Ben Yehuda, the father of modern spoken Hebrew","Herzl Day":"Commemorates the life and vision of Zionist leader Theodor Herzl","Jabotinsky Day":"Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky","Lag BaOmer":"33rd day of counting the Omer. The holiday is a temporary break from the semi-mourning period the counting of the Omer. Practices include lighting bonfires, getting haircuts, and Jewish weddings","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:"Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt","Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:"Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination","Purim Meshulash":"Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat","Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":'Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes "Adar Bet" or "Adar Sheni", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon',"Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat of Prophecy/Shabbat of Vision. Shabbat before Tish'a B'Av","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan. Read in preparation for Passover","Shabbat HaGadol":"Shabbat before Pesach (The Great Shabbat)","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Mevarchim Chodesh":"Shabbat that precedes Rosh Chodesh. The congregation blesses the forthcoming new month","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer. Shabbat before Shabbat HaChodesh, in preparation for Passover","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar. Read in preparation for Purim","Shabbat Shirah":"Shabbat of Song. Shabbat that includes Parashat Beshalach","Shabbat Shuva":"Shabbat of Returning. Shabbat that occurs during the Ten Days of Repentance between Rosh Hashanah and Yom Kippur","Shabbat Zachor":"Shabbat of Remembrance. Shabbat before Purim",Shavuot:"Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai","Shmini Atzeret":"Eighth Day of Assembly. Immediately following Sukkot, it is observed as a separate holiday in the Diaspora and is combined with Simchat Torah in Israel","Shushan Purim":"Purim celebrated in Jerusalem and walled cities","Shushan Purim Katan":"Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",Sigd:"Ethiopian Jewish holiday occurring 50 days after Yom Kippur","Simchat Torah":"Day of Celebrating the Torah. Celebration marking the conclusion of the annual cycle of public Torah readings, and the beginning of a new cycle",Sukkot:"Feast of Booths. Also called the Feast of Tabernacles, the seven-day holiday is one of the Three Pilgrimage Festivals (Hebrew: שלוש רגלים, shalosh regalim)","Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees. Tu BiShvat is one of four “New Years” mentioned in the Mishnah","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yitzhak Rabin Memorial Day":"Commemorates the life of Israeli Prime Minister Yitzhak Rabin","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement. The holiest day of the year in Judaism, traditionally observed with a 25-hour period of fasting and intensive prayer","Yom Kippur Katan":"Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"},B={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curacao",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GE:"Georgia",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MP:"Northern Mariana Islands",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PR:"Puerto Rico",PT:"Portugal",PY:"Paraguay",QA:"Qatar",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SK:"Slovakia",SL:"Sierra Leone",SN:"Senegal",SO:"Somalia",SR:"Suriname",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syria",SZ:"Swaziland",TC:"Turks and Caicos Islands",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TM:"Turkmenistan",TN:"Tunisia",TR:"Turkey",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VN:"Vietnam",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"};function E(e){if("object"==typeof e&&null!==e&&"function"==typeof e.getLatitude){const a=e.getCountryCode(),t={title:e.getName(),city:e.getShortName(),tzid:e.getTzid(),latitude:e.getLatitude(),longitude:e.getLongitude(),cc:a,country:B[a]};for(const a of k){const o=e[a];o&&(t[a]=o)}return t}return{geo:"none"}}function N(e){return e.toLowerCase().replace(/'/g,"").replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-/g,"").replace(/-$/g,"")}function L(e){const a=e.getDesc();return"Purim"===a||"Erev Purim"===a?["holiday","major"]:e.getCategories()}function P(e,a){let t="Hebcal";const o=a.location,n=null==o?void 0:o.getName();if(a.yahrzeit)t+=" Yahrzeits and Anniversaries";else if(n){const e=n.indexOf(",");t+=" "+(-1==e?n:n.substring(0,e))}else a.il?t+=" Israel":t+=" Diaspora";if("1"==a.subscribe)return t;if(a.year&&(a.isHebrewYear||0==e.length))t+=" "+a.year;else if(e.length){const a=e[0].getDate().greg(),o=e[e.length-1].getDate().greg();if(a.getFullYear()!=o.getFullYear())t+=" "+a.getFullYear()+"-"+o.getFullYear();else if(a.getMonth()==o.getMonth()){t+=" "+new Intl.DateTimeFormat("en-US",{month:"long"}).format(a)+" "+a.getFullYear()}else t+=" "+a.getFullYear()}return t}function F(e,t=!1){const o=(e.getFlags()&a.flags.SHABBAT_MEVARCHIM?D["Shabbat Mevarchim Chodesh"]:D[e.getDesc()]||D[e.basename()]||"").normalize();if(t&&o){const e=o.indexOf(".");if(-1!=e)return o.substring(0,e)}return o}const Y=a.flags.DAF_YOMI|a.flags.OMER_COUNT|a.flags.SHABBAT_MEVARCHIM|a.flags.MOLAD|a.flags.USER_EVENT|a.flags.NACH_YOMI|a.flags.DAILY_LEARNING|a.flags.HEBREW_DATE|a.flags.YERUSHALMI_YOMI;function G(e,o){var n;const r=e.getFlags();if(r&Y||void 0!==e.eventTime)return"";const i=r&a.flags.PARSHA_HASHAVUA?t.getLeyningForParshaHaShavua(e,o):t.getLeyningForHoliday(e,o);let s="";return i&&(i.summary||i.haftara)&&(i.summary&&(s+=`Torah: ${i.summary}`),i.summary&&i.haftara&&(s+="\n"),i.haftara&&(s+="Haftarah: "+i.haftara,(null===(n=i.reason)||void 0===n?void 0:n.haftara)&&(s+=" | "+i.reason.haftara))),(null==i?void 0:i.sephardic)&&(s+="\nHaftarah for Sephardim: "+i.sephardic),s}function $(e,t){if(e.getFlags()&a.flags.PARSHA_HASHAVUA)try{const a=G(e,t);if(a)return a}catch(e){}return e.memo||D[e.basename()]}function O(e,a,t,o,n){const r=new URL(e),i="www.hebcal.com"===r.host;if(i){a&&r.searchParams.set("i","on");const e=r.pathname,i=e.startsWith("/holidays/"),s=e.startsWith("/sedrot/"),h=e.startsWith("/omer/");if(i||s||h)return r.host="hebcal.com",r.pathname=i?"/h/"+e.substring(10):s?"/s/"+e.substring(8):"/o/"+e.substring(6),n&&(n.startsWith("ical-")||n.startsWith("pdf-"))||(t&&r.searchParams.set("us",t),o&&r.searchParams.set("um",o)),n&&r.searchParams.set("uc",n),r.toString()}return(t=i?t:"hebcal.com")&&r.searchParams.set("utm_source",t),o&&r.searchParams.set("utm_medium",o),n&&r.searchParams.set("utm_campaign",n),r.toString()}function z(e){if(void 0!==e.eventTime)return!0;const t=e.getFlags();if(t&a.flags.HEBREW_DATE){return 1!==e.getDate().getDate()}return!!(t&(a.flags.DAILY_LEARNING|a.flags.DAF_YOMI|a.flags.YERUSHALMI_YOMI))||(!!(t&a.flags.MINOR_FAST&&"Yom Kippur Katan"===e.getDesc().substring(0,16))||!!(t&a.flags.SHABBAT_MEVARCHIM))}const U='"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"',_={dafyomi:"Daf Yomi",mishnayomi:"Mishna Yomi",nachyomi:"Nach Yomi",yerushalmi:"Yerushalmi Yomi",hebdate:"Hebrew Date",holiday:"Jewish Holidays",mevarchim:"",molad:"",omer:"",parashat:"Torah Reading",roshchodesh:"Jewish Holidays",user:"Personal",zmanim:""};function J(e,t){const o=e.getDate().greg(),n=o.getDate(),r=o.getMonth()+1,i=String(o.getFullYear()).padStart(4,"0"),s=t.euro?`"${n}/${r}/${i}"`:`"${r}/${n}/${i}"`;let h="",l="",d="",c='"true"';const m=Boolean(e.eventTime);let u=z(e)?e.renderBrief(t.locale):e.render(t.locale);if(m){l=h=`"${a.HebrewCalendar.reformatTimeStr(e.eventTimeStr," PM",t)}"`,d=s,c='"false"'}let f="Jewish Holidays";const g=e.getFlags();if(m&&"object"==typeof t.location){const e=t.location.getShortName(),a=e.indexOf(",");f=-1===a?e:e.substring(0,a)}else{const a=_[L(e)[0]];"string"==typeof a&&(f=a)}if(u=u.replace(/,/g,"").replace(/"/g,"''"),t.appendHebrewToSubject){const a=e.renderBrief("he");a&&(u+=` / ${a}`)}let b=e.memo||F(e,!0);b||void 0===e.linkedEvent||(b=e.linkedEvent.render(t.locale));return`"${u}",${s},${h},${d},${l},${c},"${b.replace(/,/g,";").replace(/"/g,"''").replace(/\n/g," / ")}","${m||g&a.flags.CHAG?4:3}","${f}"`}function K(e){return y(e.getDate().greg())}function x(e,n,r=!0){const i=e.eventTime,s=Boolean(i),h=e.getDate(),l=h.greg(),d="object"==typeof n.location?n.location.getTzid():"UTC",c=s?a.Zmanim.formatISOWithTimeZone(d,i):y(l),m=L(e),u=e.getFlags();let f=z(e)?e.renderBrief(n.locale):e.render(n.locale);const g=e.getDesc(),b="Havdalah"===g||"Candle lighting"===g;if(b){f+=": "+a.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",n)}const p={title:f,date:c};s||(p.hdate=h.toString()),p.category=m[0],m.length>1&&(p.subcat=m[1]),"holiday"===m[0]&&u&a.flags.CHAG&&(p.yomtov=!0),f!=g&&(p.title_orig=g);const w=e.renderBrief("he");if(w&&(p.hebrew=a.Locale.hebrewStripNikkud(w)),!b){if(r){const r=n.il,i=u===a.flags.PARSHA_HASHAVUA,s=i?t.getLeyningForParshaHaShavua(e,r):t.getLeyningForHoliday(e,r);if(s){p.leyning=function(e){const a={};e.summary&&(a.torah=e.summary);e.haftara&&(a.haftarah=e.haftara);e.sephardic&&(a.haftarah_sephardic=e.sephardic);e.fullkriyah&&Z(a,e.fullkriyah);e.reason&&function(e,a){for(const t of["7","8","M"])if(a[t]){e["M"==t?"maftir":t]+=" | "+a[t]}a.haftara&&(e.haftarah+=" | "+a.haftara)}(a,e.reason);return a}(s);const a=h.getFullYear();if(i&&a>=5745){const a=o.getTriennialForParshaHaShavua(e,r);(null==a?void 0:a.aliyot)&&(p.leyning.triennial=Z({},a.aliyot))}}}const i=e.url();if(i){const e=n.utmSource||"js",a=n.utmMedium||"api",t=n.utmCampaign;p.link=O(i,Boolean(n.il),e,a,t)}}if(u&a.flags.OMER_COUNT){const a=e;p.omer={count:{he:a.getTodayIs("he"),en:a.getTodayIs("en")},sefira:{he:a.sefira("he"),translit:a.sefira("translit"),en:a.sefira("en")}}}if(u&a.flags.MOLAD){const t=e.molad,o=t.getYear();p.molad={hy:o,hm:a.HDate.getMonthName(t.getMonth(),o),dow:t.getDow(),hour:t.getHour(),minutes:t.getMinutes(),chalakim:t.getChalakim()},delete p.hebrew}if(n.heDateParts&&!s||u&a.flags.HEBREW_DATE){const e=h.getFullYear(),t=h.getMonthName(),o=h.getDate();p.heDateParts={y:a.gematriya(e),m:a.Locale.gettext(t,"he-x-NoNikud"),d:a.gematriya(o)}}const S=e.memo||D[e.basename()];return"string"==typeof S&&0!==S.length?p.memo=S.normalize():void 0!==e.linkedEvent&&(p.memo=e.linkedEvent.render(n.locale)),n.includeEvent&&(p.ev=e),p}function Z(e,a){for(const[o,n]of Object.entries(a))if(void 0!==n){e["M"==o?"maftir":o]=t.formatAliyahWithBook(n)}return e}const W={s:"en",a:"en","he-x-NoNikud":"he",h:"he",ah:"en",sh:"en"};function j(e,t){let o=e.render();const n=e.getDate().greg(),r=function(e,a,t,o){if(a){const a=e.eventTime;return a?a.toUTCString():t.toUTCString().replace(/ \S+ GMT$/," 00:00:00 GMT")}return o}(e,t.evPubDate,n,t.lastBuildDate),i=t.location,s=!!i&&i.getIsrael(),h=i?i.getTzid():"UTC",l=t.utmSource||"shabbat1c",d=t.utmMedium||"rss",c=function(e,t,o,n,r,i){let s,h;const l=e.eventTime||e.getDate().greg(),d=a.Zmanim.formatISOWithTimeZone(o,l),c=d.substring(0,d.indexOf("T")),m=`${c.replace(/-/g,"")}-${N(e.getDesc())}`,u=e.url();if(u)s=O(u,t,r,i).replace(/&/g,"&amp;"),h=`${u}#${m}`;else{const e=`${n}&dt=${c}`,a=O(e,t,r,i).replace(/&/g,"&amp;");h=e.replace(/&/g,"&amp;")+`#${m}`,s=`${a}#${m}`}return[s,h]}(e,s,h,t.mainUrl||"",l,d),m=c[0],u=c[1],f=L(e)[0],g=e.getDesc();let b;if("Havdalah"===g||"Candle lighting"===g){const t=o.indexOf(": ");if(-1!=t){const n={location:i,il:s,locale:a.Locale.getLocaleName()},r=a.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",n);o=o.substring(0,t)+": "+r}}else b=$(e,s);const y=t.dayFormat,p=b||y.format(n);return`<item>\n<title>${o}</title>\n<link>${m}</link>\n<guid isPermaLink="false">${u}</guid>\n<description>${-1===p.indexOf("<")?p:`<![CDATA[${p}]]>`}</description>\n<category>${f}</category>\n<pubDate>${r}</pubDate>\n${"candles"==f?`<geo:lat>${i.getLatitude()}</geo:lat>\n<geo:long>${i.getLongitude()}</geo:long>\n`:""}</item>\n`}return e.appendIsraelAndTracking=O,e.countryNames=B,e.eventToClassicApiObject=x,e.eventToCsv=J,e.eventToFullCalendar=function(e,t,o){const n=L(e),r=e.getFlags();"holiday"==n[0]&&r&a.flags.CHAG&&n.push("yomtov");const i=e.eventTime,s=Boolean(i),h={title:z(e)?e.renderBrief():e.render(),start:s?a.Zmanim.formatISOWithTimeZone(t,i):y(e.getDate().greg()),allDay:!s,className:n.join(" ")},l=e.renderBrief("he");l&&(h.hebrew=a.Locale.hebrewStripNikkud(l));const d=e.url();d&&(h.url=O(d,o,"js","fc"));const c=e.getDesc();if(!("Havdalah"===c||"Candle lighting"===c)){const a=$(e,o);a?h.description=a:void 0!==e.linkedEvent&&(h.description=e.linkedEvent.render())}return h},e.eventToRssItem2=j,e.eventsToClassicApi=function(e,a,t=!0){const o={title:P(e,a),date:(new Date).toISOString()};return o.location=E(a.location),e.length&&(o.range={start:K(e[0]),end:K(e[e.length-1])}),o.items=e.map((e=>x(e,a,t))),o},e.eventsToCsv=function(e,a){return[U].concat(e.map((e=>J(e,a)))).join("\r\n")+"\r\n"},e.eventsToRss2=function(e,a){a.dayFormat=new Intl.DateTimeFormat("en-US",{weekday:"long",day:"2-digit",month:"long",year:"numeric"});const t=a.location;if(!a.mainUrl||!a.selfUrl)throw new TypeError("mainUrl cannot be empty or blank");const o=a.buildDate=a.buildDate||new Date,n=o.getFullYear(),r=a.lastBuildDate=o.toUTCString(),i=a.title||P(e,a),s=a.description||i,h=a.utmSource||"shabbat1c",l=a.utmMedium||"rss";let d=`<?xml version="1.0" encoding="UTF-8"?>\n<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:atom="http://www.w3.org/2005/Atom">\n<channel>\n<title>${i}</title>\n<link>${O(a.mainUrl,Boolean(null==t?void 0:t.getIsrael()),h,l,a.utmCampaign).replace(/&/g,"&amp;")}</link>\n<atom:link href="${a.selfUrl.replace(/&/g,"&amp;")}" rel="self" type="application/rss+xml" />\n<description>${s}</description>\n<language>${a.lang||W[a.locale]||a.locale||"en-US"}</language>\n<copyright>Copyright (c) ${n} Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>${r}</lastBuildDate>\n`;for(const t of e)d+=j(t,a);return d+="</channel>\n</rss>\n",d},e.getCalendarTitle=P,e.getDownloadFilename=function(e){let t="hebcal";if(e.year)t+="_"+e.year,e.isHebrewYear&&(t+="h"),e.month&&(t+="_"+e.month);else if("object"==typeof e.start&&"object"==typeof e.end){const o=new a.HDate(e.start),n=new a.HDate(e.end),r=o.greg().getFullYear(),i=n.greg().getFullYear();t+=r===i?"_"+r:"_"+r+"_"+i}if("object"==typeof e.location){const a=e.location,o=a.zip||a.asciiname||a.getShortName();o&&(t+="_"+N(o).replace(/[-]/g,"_"))}return t},e.getEventCategories=L,e.getHolidayDescription=F,e.holidayDescription=D,e.locationToPlainObj=E,e.makeAnchor=N,e.makeMemo=$,e.makeTorahMemoText=G,e.pad2=b,e.pad4=g,e.renderTitleWithoutTime=function(e){return void 0===e.eventTime?e.render():e.renderBrief()},e.shouldRenderBrief=z,e.toISOString=function(e){return y(e)},e}({},hebcal,hebcal__leyning,hebcal__triennial);