@hebcal/rest-api 3.9.0 → 3.12.0

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/README.md CHANGED
@@ -66,6 +66,9 @@ Converts to lowercase and replaces non-word characters with hyphen ('-')
66
66
  <dt><a href="#makeTorahMemoText">makeTorahMemoText(ev, il)</a> ⇒ <code>string</code></dt>
67
67
  <dd><p>Makes mulit-line text that summarizes Torah &amp; Haftarah</p>
68
68
  </dd>
69
+ <dt><a href="#appendIsraelAndTracking">appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign)</a> ⇒ <code>string</code></dt>
70
+ <dd><p>Appends utm_source and utm_medium parameters to a URL</p>
71
+ </dd>
69
72
  <dt><a href="#eventToCsv">eventToCsv(e, options)</a> ⇒ <code>string</code></dt>
70
73
  <dd><p>Renders an Event as a string</p>
71
74
  </dd>
@@ -83,6 +86,8 @@ Converts to lowercase and replaces non-word characters with hyphen (&#39;-&#39;)
83
86
  <dd></dd>
84
87
  <dt><a href="#eventsToRss">eventsToRss(events, location, mainUrl, selfUrl, [lang], [evPubDate])</a> ⇒ <code>string</code></dt>
85
88
  <dd></dd>
89
+ <dt><a href="#eventsToRss2">eventsToRss2(events, options)</a> ⇒ <code>string</code></dt>
90
+ <dd></dd>
86
91
  <dt><a href="#eventToRssItem">eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl)</a> ⇒ <code>string</code></dt>
87
92
  <dd></dd>
88
93
  <dt><a href="#eventToFullCalendar">eventToFullCalendar(ev, tzid, il)</a> ⇒ <code>Object</code></dt>
@@ -231,6 +236,21 @@ Makes mulit-line text that summarizes Torah & Haftarah
231
236
  | ev | <code>Event</code> |
232
237
  | il | <code>boolean</code> |
233
238
 
239
+ <a name="appendIsraelAndTracking"></a>
240
+
241
+ ## appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) ⇒ <code>string</code>
242
+ Appends utm_source and utm_medium parameters to a URL
243
+
244
+ **Kind**: global function
245
+
246
+ | Param | Type |
247
+ | --- | --- |
248
+ | url | <code>string</code> |
249
+ | il | <code>boolean</code> |
250
+ | utmSource | <code>string</code> |
251
+ | utmMedium | <code>string</code> |
252
+ | utmCampaign | <code>string</code> |
253
+
234
254
  <a name="eventToCsv"></a>
235
255
 
236
256
  ## eventToCsv(e, options) ⇒ <code>string</code>
@@ -241,7 +261,7 @@ Renders an Event as a string
241
261
  | Param | Type |
242
262
  | --- | --- |
243
263
  | e | <code>Event</code> |
244
- | options | <code>HebcalOptions</code> |
264
+ | options | <code>HebrewCalendar.Options</code> |
245
265
 
246
266
  <a name="eventsToCsv"></a>
247
267
 
@@ -312,6 +332,16 @@ Converts a Hebcal event to a classic Hebcal.com JSON API object
312
332
  | [lang] | <code>string</code> | <code>&quot;en-US&quot;</code> | language such as 'he' (default 'en-US') |
313
333
  | [evPubDate] | <code>boolean</code> | <code>true</code> | if true, use event time as pubDate (false uses lastBuildDate) |
314
334
 
335
+ <a name="eventsToRss2"></a>
336
+
337
+ ## eventsToRss2(events, options) ⇒ <code>string</code>
338
+ **Kind**: global function
339
+
340
+ | Param | Type |
341
+ | --- | --- |
342
+ | events | <code>Array.&lt;Event&gt;</code> |
343
+ | options | <code>HebrewCalendar.Options</code> |
344
+
315
345
  <a name="eventToRssItem"></a>
316
346
 
317
347
  ## eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl) ⇒ <code>string</code>
package/dist/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/rest-api v3.9.0 */
1
+ /*! @hebcal/rest-api v3.12.0 */
2
2
  var hebcal__rest_api = (function (exports, core, leyn) {
3
3
  'use strict';
4
4
 
@@ -41,7 +41,7 @@ var global$q =
41
41
 
42
42
  var objectGetOwnPropertyDescriptor = {};
43
43
 
44
- var fails$8 = function (exec) {
44
+ var fails$a = function (exec) {
45
45
  try {
46
46
  return !!exec();
47
47
  } catch (error) {
@@ -49,17 +49,27 @@ var fails$8 = function (exec) {
49
49
  }
50
50
  };
51
51
 
52
- var fails$7 = fails$8;
52
+ var fails$9 = fails$a;
53
53
 
54
54
  // Detect IE8's incomplete defineProperty implementation
55
- var descriptors = !fails$7(function () {
55
+ var descriptors = !fails$9(function () {
56
56
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
57
57
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
58
58
  });
59
59
 
60
+ var fails$8 = fails$a;
61
+
62
+ var functionBindNative = !fails$8(function () {
63
+ var test = (function () { /* empty */ }).bind();
64
+ // eslint-disable-next-line no-prototype-builtins -- safe
65
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
66
+ });
67
+
68
+ var NATIVE_BIND$1 = functionBindNative;
69
+
60
70
  var call$5 = Function.prototype.call;
61
71
 
62
- var functionCall = call$5.bind ? call$5.bind(call$5) : function () {
72
+ var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
63
73
  return call$5.apply(call$5, arguments);
64
74
  };
65
75
 
@@ -88,13 +98,15 @@ var createPropertyDescriptor$2 = function (bitmap, value) {
88
98
  };
89
99
  };
90
100
 
101
+ var NATIVE_BIND = functionBindNative;
102
+
91
103
  var FunctionPrototype$1 = Function.prototype;
92
104
  var bind = FunctionPrototype$1.bind;
93
105
  var call$4 = FunctionPrototype$1.call;
94
- var callBind = bind && bind.bind(call$4);
106
+ var uncurryThis$a = NATIVE_BIND && bind.bind(call$4, call$4);
95
107
 
96
- var functionUncurryThis = bind ? function (fn) {
97
- return fn && callBind(call$4, fn);
108
+ var functionUncurryThis = NATIVE_BIND ? function (fn) {
109
+ return fn && uncurryThis$a(fn);
98
110
  } : function (fn) {
99
111
  return fn && function () {
100
112
  return call$4.apply(fn, arguments);
@@ -112,14 +124,14 @@ var classofRaw$1 = function (it) {
112
124
 
113
125
  var global$p = global$q;
114
126
  var uncurryThis$8 = functionUncurryThis;
115
- var fails$6 = fails$8;
127
+ var fails$7 = fails$a;
116
128
  var classof$2 = classofRaw$1;
117
129
 
118
130
  var Object$4 = global$p.Object;
119
131
  var split = uncurryThis$8(''.split);
120
132
 
121
133
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
122
- var indexedObject = fails$6(function () {
134
+ var indexedObject = fails$7(function () {
123
135
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
124
136
  // eslint-disable-next-line no-prototype-builtins -- safe
125
137
  return !Object$4('z').propertyIsEnumerable(0);
@@ -208,10 +220,10 @@ var engineV8Version = version;
208
220
  /* eslint-disable es/no-symbol -- required for testing */
209
221
 
210
222
  var V8_VERSION = engineV8Version;
211
- var fails$5 = fails$8;
223
+ var fails$6 = fails$a;
212
224
 
213
225
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
214
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$5(function () {
226
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
215
227
  var symbol = Symbol();
216
228
  // Chrome 38 Symbol has incorrect toString conversion
217
229
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -321,9 +333,11 @@ var store$2 = sharedStore;
321
333
  (shared$4.exports = function (key, value) {
322
334
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
323
335
  })('versions', []).push({
324
- version: '3.19.1',
336
+ version: '3.20.3',
325
337
  mode: 'global',
326
- copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
338
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
339
+ license: 'https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE',
340
+ source: 'https://github.com/zloirock/core-js'
327
341
  });
328
342
 
329
343
  var global$f = global$q;
@@ -431,19 +445,19 @@ var documentCreateElement$1 = function (it) {
431
445
  return EXISTS$1 ? document$1.createElement(it) : {};
432
446
  };
433
447
 
434
- var DESCRIPTORS$5 = descriptors;
435
- var fails$4 = fails$8;
448
+ var DESCRIPTORS$6 = descriptors;
449
+ var fails$5 = fails$a;
436
450
  var createElement = documentCreateElement$1;
437
451
 
438
- // Thank's IE8 for his funny defineProperty
439
- var ie8DomDefine = !DESCRIPTORS$5 && !fails$4(function () {
440
- // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
452
+ // Thanks to IE8 for its funny defineProperty
453
+ var ie8DomDefine = !DESCRIPTORS$6 && !fails$5(function () {
454
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
441
455
  return Object.defineProperty(createElement('div'), 'a', {
442
456
  get: function () { return 7; }
443
457
  }).a != 7;
444
458
  });
445
459
 
446
- var DESCRIPTORS$4 = descriptors;
460
+ var DESCRIPTORS$5 = descriptors;
447
461
  var call$1 = functionCall;
448
462
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
449
463
  var createPropertyDescriptor$1 = createPropertyDescriptor$2;
@@ -453,21 +467,34 @@ var hasOwn$5 = hasOwnProperty_1;
453
467
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
454
468
 
455
469
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
456
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
470
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
457
471
 
458
472
  // `Object.getOwnPropertyDescriptor` method
459
473
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
460
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
474
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
461
475
  O = toIndexedObject$3(O);
462
476
  P = toPropertyKey$1(P);
463
477
  if (IE8_DOM_DEFINE$1) try {
464
- return $getOwnPropertyDescriptor(O, P);
478
+ return $getOwnPropertyDescriptor$1(O, P);
465
479
  } catch (error) { /* empty */ }
466
480
  if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule.f, O, P), O[P]);
467
481
  };
468
482
 
469
483
  var objectDefineProperty = {};
470
484
 
485
+ var DESCRIPTORS$4 = descriptors;
486
+ var fails$4 = fails$a;
487
+
488
+ // V8 ~ Chrome 36-
489
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
490
+ var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$4(function () {
491
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
492
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
493
+ value: 42,
494
+ writable: false
495
+ }).prototype != 42;
496
+ });
497
+
471
498
  var global$b = global$q;
472
499
  var isObject$1 = isObject$5;
473
500
 
@@ -483,16 +510,37 @@ var anObject$5 = function (argument) {
483
510
  var global$a = global$q;
484
511
  var DESCRIPTORS$3 = descriptors;
485
512
  var IE8_DOM_DEFINE = ie8DomDefine;
513
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
486
514
  var anObject$4 = anObject$5;
487
515
  var toPropertyKey = toPropertyKey$2;
488
516
 
489
517
  var TypeError$2 = global$a.TypeError;
490
518
  // eslint-disable-next-line es/no-object-defineproperty -- safe
491
519
  var $defineProperty = Object.defineProperty;
520
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
521
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
522
+ var ENUMERABLE = 'enumerable';
523
+ var CONFIGURABLE$1 = 'configurable';
524
+ var WRITABLE = 'writable';
492
525
 
493
526
  // `Object.defineProperty` method
494
527
  // https://tc39.es/ecma262/#sec-object.defineproperty
495
- objectDefineProperty.f = DESCRIPTORS$3 ? $defineProperty : function defineProperty(O, P, Attributes) {
528
+ objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
529
+ anObject$4(O);
530
+ P = toPropertyKey(P);
531
+ anObject$4(Attributes);
532
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
533
+ var current = $getOwnPropertyDescriptor(O, P);
534
+ if (current && current[WRITABLE]) {
535
+ O[P] = Attributes.value;
536
+ Attributes = {
537
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
538
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
539
+ writable: false
540
+ };
541
+ }
542
+ } return $defineProperty(O, P, Attributes);
543
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
496
544
  anObject$4(O);
497
545
  P = toPropertyKey(P);
498
546
  anObject$4(Attributes);
@@ -832,17 +880,19 @@ var ownKeys = ownKeys$1;
832
880
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
833
881
  var definePropertyModule$1 = objectDefineProperty;
834
882
 
835
- var copyConstructorProperties$1 = function (target, source) {
883
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
836
884
  var keys = ownKeys(source);
837
885
  var defineProperty = definePropertyModule$1.f;
838
886
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
839
887
  for (var i = 0; i < keys.length; i++) {
840
888
  var key = keys[i];
841
- if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
889
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
890
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
891
+ }
842
892
  }
843
893
  };
844
894
 
845
- var fails$3 = fails$8;
895
+ var fails$3 = fails$a;
846
896
  var isCallable$1 = isCallable$a;
847
897
 
848
898
  var replacement = /#|\.prototype\./;
@@ -987,27 +1037,39 @@ var regexpFlags$1 = function () {
987
1037
  return result;
988
1038
  };
989
1039
 
990
- var regexpStickyHelpers = {};
991
-
992
- var fails$2 = fails$8;
1040
+ var fails$2 = fails$a;
993
1041
  var global$3 = global$q;
994
1042
 
995
1043
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
996
1044
  var $RegExp$2 = global$3.RegExp;
997
1045
 
998
- regexpStickyHelpers.UNSUPPORTED_Y = fails$2(function () {
1046
+ var UNSUPPORTED_Y$1 = fails$2(function () {
999
1047
  var re = $RegExp$2('a', 'y');
1000
1048
  re.lastIndex = 2;
1001
1049
  return re.exec('abcd') != null;
1002
1050
  });
1003
1051
 
1004
- regexpStickyHelpers.BROKEN_CARET = fails$2(function () {
1052
+ // UC Browser bug
1053
+ // https://github.com/zloirock/core-js/issues/1008
1054
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$2(function () {
1055
+ return !$RegExp$2('a', 'y').sticky;
1056
+ });
1057
+
1058
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$2(function () {
1005
1059
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1006
1060
  var re = $RegExp$2('^r', 'gy');
1007
1061
  re.lastIndex = 2;
1008
1062
  return re.exec('str') != null;
1009
1063
  });
1010
1064
 
1065
+ var regexpStickyHelpers = {
1066
+ BROKEN_CARET: BROKEN_CARET,
1067
+ MISSED_STICKY: MISSED_STICKY,
1068
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
1069
+ };
1070
+
1071
+ var objectDefineProperties = {};
1072
+
1011
1073
  var internalObjectKeys = objectKeysInternal;
1012
1074
  var enumBugKeys$1 = enumBugKeys$3;
1013
1075
 
@@ -1019,6 +1081,7 @@ var objectKeys$1 = Object.keys || function keys(O) {
1019
1081
  };
1020
1082
 
1021
1083
  var DESCRIPTORS = descriptors;
1084
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1022
1085
  var definePropertyModule = objectDefineProperty;
1023
1086
  var anObject$1 = anObject$5;
1024
1087
  var toIndexedObject = toIndexedObject$4;
@@ -1027,7 +1090,7 @@ var objectKeys = objectKeys$1;
1027
1090
  // `Object.defineProperties` method
1028
1091
  // https://tc39.es/ecma262/#sec-object.defineproperties
1029
1092
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1030
- var objectDefineProperties = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
1093
+ objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1031
1094
  anObject$1(O);
1032
1095
  var props = toIndexedObject(Properties);
1033
1096
  var keys = objectKeys(Properties);
@@ -1045,7 +1108,7 @@ var html$1 = getBuiltIn('document', 'documentElement');
1045
1108
  /* global ActiveXObject -- old IE, WSH */
1046
1109
 
1047
1110
  var anObject = anObject$5;
1048
- var defineProperties = objectDefineProperties;
1111
+ var definePropertiesModule = objectDefineProperties;
1049
1112
  var enumBugKeys = enumBugKeys$3;
1050
1113
  var hiddenKeys = hiddenKeys$4;
1051
1114
  var html = html$1;
@@ -1123,10 +1186,10 @@ var objectCreate = Object.create || function create(O, Properties) {
1123
1186
  // add "__proto__" for Object.getPrototypeOf polyfill
1124
1187
  result[IE_PROTO] = O;
1125
1188
  } else result = NullProtoObject();
1126
- return Properties === undefined ? result : defineProperties(result, Properties);
1189
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1127
1190
  };
1128
1191
 
1129
- var fails$1 = fails$8;
1192
+ var fails$1 = fails$a;
1130
1193
  var global$2 = global$q;
1131
1194
 
1132
1195
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
@@ -1137,7 +1200,7 @@ var regexpUnsupportedDotAll = fails$1(function () {
1137
1200
  return !(re.dotAll && re.exec('\n') && re.flags === 's');
1138
1201
  });
1139
1202
 
1140
- var fails = fails$8;
1203
+ var fails = fails$a;
1141
1204
  var global$1 = global$q;
1142
1205
 
1143
1206
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
@@ -1178,7 +1241,7 @@ var UPDATES_LAST_INDEX_WRONG = (function () {
1178
1241
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1179
1242
  })();
1180
1243
 
1181
- var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
1244
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1182
1245
 
1183
1246
  // nonparticipating capturing group, copied from es5-shim's String#split patch.
1184
1247
  var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
@@ -1186,7 +1249,6 @@ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1186
1249
  var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1187
1250
 
1188
1251
  if (PATCH) {
1189
- // eslint-disable-next-line max-statements -- TODO
1190
1252
  patchedExec = function exec(string) {
1191
1253
  var re = this;
1192
1254
  var state = getInternalState(re);
@@ -1430,6 +1492,9 @@ function getEventCategories(ev) {
1430
1492
 
1431
1493
  case core.flags.MINOR_HOLIDAY:
1432
1494
  return ['holiday', 'minor'];
1495
+
1496
+ case core.flags.MISHNA_YOMI:
1497
+ return ['mishnayomi'];
1433
1498
  // fall through to string-based category
1434
1499
  }
1435
1500
 
@@ -1911,10 +1976,12 @@ function formatLeyningResult(reading) {
1911
1976
  * @param {boolean} il
1912
1977
  * @param {string} tzid
1913
1978
  * @param {string} mainUrl
1979
+ * @param {string} utmSource
1980
+ * @param {string} utmMedium
1914
1981
  * @return {string[]}
1915
1982
  */
1916
1983
 
1917
- function getLinkAndGuid(ev, il, tzid, mainUrl) {
1984
+ function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {
1918
1985
  let link;
1919
1986
  let guid;
1920
1987
  const dt = ev.eventTime || ev.getDate().greg();
@@ -1926,11 +1993,11 @@ function getLinkAndGuid(ev, il, tzid, mainUrl) {
1926
1993
  const url0 = ev.url();
1927
1994
 
1928
1995
  if (url0) {
1929
- link = appendIsraelAndTracking(url0, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
1996
+ link = appendIsraelAndTracking(url0, il, utmSource, utmMedium).replace(/&/g, '&amp;');
1930
1997
  guid = "".concat(url0, "#").concat(anchor);
1931
1998
  } else {
1932
1999
  const url1 = "".concat(mainUrl, "&dt=").concat(dtStr);
1933
- const url = appendIsraelAndTracking(url1, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
2000
+ const url = appendIsraelAndTracking(url1, il, utmSource, utmMedium).replace(/&/g, '&amp;');
1934
2001
  guid = url1.replace(/&/g, '&amp;') + "#".concat(anchor);
1935
2002
  link = "".concat(url, "#").concat(anchor);
1936
2003
  }
@@ -1952,20 +2019,55 @@ function eventsToRss(events, location, mainUrl, selfUrl) {
1952
2019
  let lang = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'en-US';
1953
2020
  let evPubDate = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
1954
2021
  const cityDescr = location.getName();
1955
- const thisYear = new Date().getFullYear();
1956
- const title = core.Locale.gettext('Shabbat') + ' Times for ' + cityDescr;
1957
- const lastBuildDate = new Date().toUTCString();
1958
- const dayFormat = new Intl.DateTimeFormat('en-US', {
2022
+ const options = {
2023
+ location,
2024
+ mainUrl,
2025
+ selfUrl,
2026
+ lang,
2027
+ evPubDate,
2028
+ title: core.Locale.gettext('Shabbat') + " Times for ".concat(cityDescr),
2029
+ description: "Weekly Shabbat candle lighting times for ".concat(cityDescr),
2030
+ utmSource: 'shabbat1c',
2031
+ utmMedium: 'rss'
2032
+ };
2033
+ return eventsToRss2(events, options);
2034
+ }
2035
+ const localeToLg = {
2036
+ 's': 'en',
2037
+ 'a': 'en',
2038
+ 'he-x-NoNikud': 'he',
2039
+ 'h': 'he',
2040
+ 'ah': 'en',
2041
+ 'sh': 'en'
2042
+ };
2043
+ /**
2044
+ * @param {Event[]} events
2045
+ * @param {HebrewCalendar.Options} options
2046
+ * @return {string}
2047
+ */
2048
+
2049
+ function eventsToRss2(events, options) {
2050
+ options.dayFormat = new Intl.DateTimeFormat('en-US', {
1959
2051
  weekday: 'long',
1960
2052
  day: '2-digit',
1961
2053
  month: 'long',
1962
2054
  year: 'numeric'
1963
2055
  });
1964
- const mainUrlEsc = appendIsraelAndTracking(mainUrl, location.getIsrael(), 'shabbat1c', 'rss').replace(/&/g, '&amp;');
1965
- selfUrl = selfUrl.replace(/&/g, '&amp;');
1966
- let str = "<?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>".concat(title, "</title>\n<link>").concat(mainUrlEsc, "</link>\n<atom:link href=\"").concat(selfUrl, "\" rel=\"self\" type=\"application/rss+xml\" />\n<description>Weekly Shabbat candle lighting times for ").concat(cityDescr, "</description>\n<language>").concat(lang, "</language>\n<copyright>Copyright (c) ").concat(thisYear, " Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>").concat(lastBuildDate, "</lastBuildDate>\n");
2056
+ const location = options.location;
2057
+ const mainUrl = options.mainUrl;
2058
+ const buildDate = options.buildDate = options.buildDate || new Date();
2059
+ const thisYear = buildDate.getFullYear();
2060
+ const lastBuildDate = options.lastBuildDate = buildDate.toUTCString();
2061
+ const title = options.title || getCalendarTitle(events, options);
2062
+ const description = options.description || title;
2063
+ const utmSource = options.utmSource || 'shabbat1c';
2064
+ const utmMedium = options.utmMedium || 'rss';
2065
+ const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), utmSource, utmMedium, options.utmCampaign).replace(/&/g, '&amp;');
2066
+ const selfUrlEsc = options.selfUrl.replace(/&/g, '&amp;');
2067
+ const lang = options.lang || localeToLg[options.locale] || options.locale || 'en-US';
2068
+ let str = "<?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>".concat(title, "</title>\n<link>").concat(mainUrlEsc, "</link>\n<atom:link href=\"").concat(selfUrlEsc, "\" rel=\"self\" type=\"application/rss+xml\" />\n<description>").concat(description, "</description>\n<language>").concat(lang, "</language>\n<copyright>Copyright (c) ").concat(thisYear, " Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>").concat(lastBuildDate, "</lastBuildDate>\n");
1967
2069
  events.forEach(ev => {
1968
- str += eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl);
2070
+ str += eventToRssItem2(ev, options);
1969
2071
  });
1970
2072
  str += '</channel>\n</rss>\n';
1971
2073
  return str;
@@ -1992,6 +2094,16 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
1992
2094
 
1993
2095
  return lastBuildDate;
1994
2096
  }
2097
+ /**
2098
+ * @param {Event} ev
2099
+ * @param {HebrewCalendar.Options} options
2100
+ * @return {string}
2101
+ */
2102
+
2103
+
2104
+ function eventToRssItem2(ev, options) {
2105
+ return eventToRssItem(ev, options.evPubDate, options.lastBuildDate, options.dayFormat, options.location, options.mainUrl, options);
2106
+ }
1995
2107
  /**
1996
2108
  * @param {Event} ev
1997
2109
  * @param {boolean} evPubDate
@@ -1999,17 +2111,19 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
1999
2111
  * @param {Intl.DateTimeFormat} dayFormat
2000
2112
  * @param {Location} location
2001
2113
  * @param {string} mainUrl
2114
+ * @param {HebrewCalendar.Options} [options]
2002
2115
  * @return {string}
2003
2116
  */
2004
2117
 
2005
-
2006
- function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl) {
2118
+ function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, options) {
2007
2119
  let subj = ev.render();
2008
2120
  const evDate = ev.getDate().greg();
2009
2121
  const pubDate = getPubDate(ev, evPubDate, evDate, lastBuildDate);
2010
2122
  const il = location ? location.getIsrael() : false;
2011
2123
  const tzid = location ? location.getTzid() : 'UTC';
2012
- const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl);
2124
+ const utmSource = options && options.utmSource || 'shabbat1c';
2125
+ const utmMedium = options && options.utmMedium || 'rss';
2126
+ const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium);
2013
2127
  const link = linkGuid[0];
2014
2128
  const guid = linkGuid[1];
2015
2129
  const categories = getEventCategories(ev);
@@ -2098,9 +2212,11 @@ exports.eventToClassicApiObject = eventToClassicApiObject;
2098
2212
  exports.eventToCsv = eventToCsv;
2099
2213
  exports.eventToFullCalendar = eventToFullCalendar;
2100
2214
  exports.eventToRssItem = eventToRssItem;
2215
+ exports.eventToRssItem2 = eventToRssItem2;
2101
2216
  exports.eventsToClassicApi = eventsToClassicApi;
2102
2217
  exports.eventsToCsv = eventsToCsv;
2103
2218
  exports.eventsToRss = eventsToRss;
2219
+ exports.eventsToRss2 = eventsToRss2;
2104
2220
  exports.getCalendarTitle = getCalendarTitle;
2105
2221
  exports.getDownloadFilename = getDownloadFilename;
2106
2222
  exports.getEventCategories = getEventCategories;
@@ -1,2 +1,2 @@
1
- /*! @hebcal/rest-api v3.9.0 */
2
- var hebcal__rest_api=function(e,t,a){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var r=n(hebcal__leyning),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=function(e){return e&&e.Math==Math&&e},s=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof o&&o)||function(){return this}()||Function("return this")(),h={},c=function(e){try{return!!e()}catch(e){return!0}},l=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=Function.prototype.call,d=u.bind?u.bind(u):function(){return u.apply(u,arguments)},f={},m={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b=g&&!m.call({1:2},1);f.f=b?function(e){var t=g(this,e);return!!t&&t.enumerable}:m;var y,p,v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},S=Function.prototype,w=S.bind,A=S.call,H=w&&w.bind(A),T=w?function(e){return e&&H(A,e)}:function(e){return e&&function(){return A.apply(e,arguments)}},C=T,I=C({}.toString),R=C("".slice),O=function(e){return R(I(e),8,-1)},E=T,M=c,B=O,P=s.Object,D=E("".split),F=M((function(){return!P("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?D(e,""):P(e)}:P,k=s.TypeError,N=function(e){if(null==e)throw k("Can't call method on "+e);return e},L=F,x=N,G=function(e){return L(x(e))},j=function(e){return"function"==typeof e},Y=j,_=function(e){return"object"==typeof e?null!==e:Y(e)},z=s,U=j,K=function(e){return U(e)?e:void 0},J=function(e,t){return arguments.length<2?K(z[e]):z[e]&&z[e][t]},Z=T({}.isPrototypeOf),W=s,V=J("navigator","userAgent")||"",$=W.process,q=W.Deno,Q=$&&$.versions||q&&q.version,X=Q&&Q.v8;X&&(p=(y=X.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!p&&V&&(!(y=V.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=V.match(/Chrome\/(\d+)/))&&(p=+y[1]);var ee=p,te=c,ae=!!Object.getOwnPropertySymbols&&!te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ee&&ee<41})),ne=ae&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,re=J,oe=j,ie=Z,se=ne,he=s.Object,ce=se?function(e){return"symbol"==typeof e}:function(e){var t=re("Symbol");return oe(t)&&ie(t.prototype,he(e))},le=s.String,ue=j,de=function(e){try{return le(e)}catch(e){return"Object"}},fe=s.TypeError,me=function(e){if(ue(e))return e;throw fe(de(e)+" is not a function")},ge=d,be=j,ye=_,pe=s.TypeError,ve={exports:{}},Se=s,we=Object.defineProperty,Ae=function(e,t){try{we(Se,e,{value:t,configurable:!0,writable:!0})}catch(a){Se[e]=t}return t},He=Ae,Te="__core-js_shared__",Ce=s[Te]||He(Te,{}),Ie=Ce;(ve.exports=function(e,t){return Ie[e]||(Ie[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Re=N,Oe=s.Object,Ee=function(e){return Oe(Re(e))},Me=T({}.hasOwnProperty),Be=Object.hasOwn||function(e,t){return Me(Ee(e),t)},Pe=T,De=0,Fe=Math.random(),ke=Pe(1..toString),Ne=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ke(++De+Fe,36)},Le=s,xe=ve.exports,Ge=Be,je=Ne,Ye=ae,_e=ne,ze=xe("wks"),Ue=Le.Symbol,Ke=Ue&&Ue.for,Je=_e?Ue:Ue&&Ue.withoutSetter||je,Ze=function(e){if(!Ge(ze,e)||!Ye&&"string"!=typeof ze[e]){var t="Symbol."+e;Ye&&Ge(Ue,e)?ze[e]=Ue[e]:ze[e]=_e&&Ke?Ke(t):Je(t)}return ze[e]},We=d,Ve=_,$e=ce,qe=function(e,t){var a=e[t];return null==a?void 0:me(a)},Qe=function(e,t){var a,n;if("string"===t&&be(a=e.toString)&&!ye(n=ge(a,e)))return n;if(be(a=e.valueOf)&&!ye(n=ge(a,e)))return n;if("string"!==t&&be(a=e.toString)&&!ye(n=ge(a,e)))return n;throw pe("Can't convert object to primitive value")},Xe=Ze,et=s.TypeError,tt=Xe("toPrimitive"),at=function(e,t){if(!Ve(e)||$e(e))return e;var a,n=qe(e,tt);if(n){if(void 0===t&&(t="default"),a=We(n,e,t),!Ve(a)||$e(a))return a;throw et("Can't convert object to primitive value")}return void 0===t&&(t="number"),Qe(e,t)},nt=ce,rt=function(e){var t=at(e,"string");return nt(t)?t:t+""},ot=_,it=s.document,st=ot(it)&&ot(it.createElement),ht=function(e){return st?it.createElement(e):{}},ct=ht,lt=!l&&!c((function(){return 7!=Object.defineProperty(ct("div"),"a",{get:function(){return 7}}).a})),ut=l,dt=d,ft=f,mt=v,gt=G,bt=rt,yt=Be,pt=lt,vt=Object.getOwnPropertyDescriptor;h.f=ut?vt:function(e,t){if(e=gt(e),t=bt(t),pt)try{return vt(e,t)}catch(e){}if(yt(e,t))return mt(!dt(ft.f,e,t),e[t])};var St={},wt=s,At=_,Ht=wt.String,Tt=wt.TypeError,Ct=function(e){if(At(e))return e;throw Tt(Ht(e)+" is not an object")},It=l,Rt=lt,Ot=Ct,Et=rt,Mt=s.TypeError,Bt=Object.defineProperty;St.f=It?Bt:function(e,t,a){if(Ot(e),t=Et(t),Ot(a),Rt)try{return Bt(e,t,a)}catch(e){}if("get"in a||"set"in a)throw Mt("Accessors not supported");return"value"in a&&(e[t]=a.value),e};var Pt=St,Dt=v,Ft=l?function(e,t,a){return Pt.f(e,t,Dt(1,a))}:function(e,t,a){return e[t]=a,e},kt={exports:{}},Nt=j,Lt=Ce,xt=T(Function.toString);Nt(Lt.inspectSource)||(Lt.inspectSource=function(e){return xt(e)});var Gt,jt,Yt,_t=Lt.inspectSource,zt=j,Ut=_t,Kt=s.WeakMap,Jt=zt(Kt)&&/native code/.test(Ut(Kt)),Zt=ve.exports,Wt=Ne,Vt=Zt("keys"),$t=function(e){return Vt[e]||(Vt[e]=Wt(e))},qt={},Qt=Jt,Xt=s,ea=T,ta=_,aa=Ft,na=Be,ra=Ce,oa=$t,ia=qt,sa="Object already initialized",ha=Xt.TypeError,ca=Xt.WeakMap;if(Qt||ra.state){var la=ra.state||(ra.state=new ca),ua=ea(la.get),da=ea(la.has),fa=ea(la.set);Gt=function(e,t){if(da(la,e))throw new ha(sa);return t.facade=e,fa(la,e,t),t},jt=function(e){return ua(la,e)||{}},Yt=function(e){return da(la,e)}}else{var ma=oa("state");ia[ma]=!0,Gt=function(e,t){if(na(e,ma))throw new ha(sa);return t.facade=e,aa(e,ma,t),t},jt=function(e){return na(e,ma)?e[ma]:{}},Yt=function(e){return na(e,ma)}}var ga={set:Gt,get:jt,has:Yt,enforce:function(e){return Yt(e)?jt(e):Gt(e,{})},getterFor:function(e){return function(t){var a;if(!ta(t)||(a=jt(t)).type!==e)throw ha("Incompatible receiver, "+e+" required");return a}}},ba=l,ya=Be,pa=Function.prototype,va=ba&&Object.getOwnPropertyDescriptor,Sa=ya(pa,"name"),wa=Sa&&"something"===function(){}.name,Aa=Sa&&(!ba||ba&&va(pa,"name").configurable),Ha=s,Ta=j,Ca=Be,Ia=Ft,Ra=Ae,Oa=_t,Ea={EXISTS:Sa,PROPER:wa,CONFIGURABLE:Aa}.CONFIGURABLE,Ma=ga.get,Ba=ga.enforce,Pa=String(String).split("String");(kt.exports=function(e,t,a,n){var r,o=!!n&&!!n.unsafe,i=!!n&&!!n.enumerable,s=!!n&&!!n.noTargetGet,h=n&&void 0!==n.name?n.name:t;Ta(a)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ca(a,"name")||Ea&&a.name!==h)&&Ia(a,"name",h),(r=Ba(a)).source||(r.source=Pa.join("string"==typeof h?h:""))),e!==Ha?(o?!s&&e[t]&&(i=!0):delete e[t],i?e[t]=a:Ia(e,t,a)):i?e[t]=a:Ra(t,a)})(Function.prototype,"toString",(function(){return Ta(this)&&Ma(this).source||Oa(this)}));var Da={},Fa=Math.ceil,ka=Math.floor,Na=function(e){var t=+e;return t!=t||0===t?0:(t>0?ka:Fa)(t)},La=Na,xa=Math.max,Ga=Math.min,ja=Na,Ya=Math.min,_a=function(e){return e>0?Ya(ja(e),9007199254740991):0},za=G,Ua=function(e,t){var a=La(e);return a<0?xa(a+t,0):Ga(a,t)},Ka=function(e){return _a(e.length)},Ja=function(e){return function(t,a,n){var r,o=za(t),i=Ka(o),s=Ua(n,i);if(e&&a!=a){for(;i>s;)if((r=o[s++])!=r)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===a)return e||s||0;return!e&&-1}},Za={includes:Ja(!0),indexOf:Ja(!1)},Wa=Be,Va=G,$a=Za.indexOf,qa=qt,Qa=T([].push),Xa=function(e,t){var a,n=Va(e),r=0,o=[];for(a in n)!Wa(qa,a)&&Wa(n,a)&&Qa(o,a);for(;t.length>r;)Wa(n,a=t[r++])&&(~$a(o,a)||Qa(o,a));return o},en=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tn=Xa,an=en.concat("length","prototype");Da.f=Object.getOwnPropertyNames||function(e){return tn(e,an)};var nn={};nn.f=Object.getOwnPropertySymbols;var rn=J,on=Da,sn=nn,hn=Ct,cn=T([].concat),ln=rn("Reflect","ownKeys")||function(e){var t=on.f(hn(e)),a=sn.f;return a?cn(t,a(e)):t},un=Be,dn=ln,fn=h,mn=St,gn=c,bn=j,yn=/#|\.prototype\./,pn=function(e,t){var a=Sn[vn(e)];return a==An||a!=wn&&(bn(t)?gn(t):!!t)},vn=pn.normalize=function(e){return String(e).replace(yn,".").toLowerCase()},Sn=pn.data={},wn=pn.NATIVE="N",An=pn.POLYFILL="P",Hn=pn,Tn=s,Cn=h.f,In=Ft,Rn=kt.exports,On=Ae,En=function(e,t){for(var a=dn(t),n=mn.f,r=fn.f,o=0;o<a.length;o++){var i=a[o];un(e,i)||n(e,i,r(t,i))}},Mn=Hn,Bn={};Bn[Ze("toStringTag")]="z";var Pn=s,Dn="[object z]"===String(Bn),Fn=j,kn=O,Nn=Ze("toStringTag"),Ln=Pn.Object,xn="Arguments"==kn(function(){return arguments}()),Gn=Dn?kn:function(e){var t,a,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=Ln(e),Nn))?a:xn?kn(t):"Object"==(n=kn(t))&&Fn(t.callee)?"Arguments":n},jn=s.String,Yn=Ct,_n={},zn=c,Un=s.RegExp;_n.UNSUPPORTED_Y=zn((function(){var e=Un("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),_n.BROKEN_CARET=zn((function(){var e=Un("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var Kn,Jn=Xa,Zn=en,Wn=Object.keys||function(e){return Jn(e,Zn)},Vn=St,$n=Ct,qn=G,Qn=Wn,Xn=l?Object.defineProperties:function(e,t){$n(e);for(var a,n=qn(t),r=Qn(t),o=r.length,i=0;o>i;)Vn.f(e,a=r[i++],n[a]);return e},er=J("document","documentElement"),tr=Ct,ar=Xn,nr=en,rr=qt,or=er,ir=ht,sr=$t("IE_PROTO"),hr=function(){},cr=function(e){return"<script>"+e+"</"+"script>"},lr=function(e){e.write(cr("")),e.close();var t=e.parentWindow.Object;return e=null,t},ur=function(){try{Kn=new ActiveXObject("htmlfile")}catch(e){}var e,t;ur="undefined"!=typeof document?document.domain&&Kn?lr(Kn):((t=ir("iframe")).style.display="none",or.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(cr("document.F=Object")),e.close(),e.F):lr(Kn);for(var a=nr.length;a--;)delete ur.prototype[nr[a]];return ur()};rr[sr]=!0;var dr,fr,mr=Object.create||function(e,t){var a;return null!==e?(hr.prototype=tr(e),a=new hr,hr.prototype=null,a[sr]=e):a=ur(),void 0===t?a:ar(a,t)},gr=c,br=s.RegExp,yr=gr((function(){var e=br(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),pr=c,vr=s.RegExp,Sr=pr((function(){var e=vr("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),wr=d,Ar=T,Hr=function(e){if("Symbol"===Gn(e))throw TypeError("Cannot convert a Symbol value to a string");return jn(e)},Tr=function(){var e=Yn(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Cr=_n,Ir=ve.exports,Rr=mr,Or=ga.get,Er=yr,Mr=Sr,Br=Ir("native-string-replace",String.prototype.replace),Pr=RegExp.prototype.exec,Dr=Pr,Fr=Ar("".charAt),kr=Ar("".indexOf),Nr=Ar("".replace),Lr=Ar("".slice),xr=(fr=/b*/g,wr(Pr,dr=/a/,"a"),wr(Pr,fr,"a"),0!==dr.lastIndex||0!==fr.lastIndex),Gr=Cr.UNSUPPORTED_Y||Cr.BROKEN_CARET,jr=void 0!==/()??/.exec("")[1];(xr||jr||Gr||Er||Mr)&&(Dr=function(e){var t,a,n,r,o,i,s,h=this,c=Or(h),l=Hr(e),u=c.raw;if(u)return u.lastIndex=h.lastIndex,t=wr(Dr,u,l),h.lastIndex=u.lastIndex,t;var d=c.groups,f=Gr&&h.sticky,m=wr(Tr,h),g=h.source,b=0,y=l;if(f&&(m=Nr(m,"y",""),-1===kr(m,"g")&&(m+="g"),y=Lr(l,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==Fr(l,h.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,b++),a=new RegExp("^(?:"+g+")",m)),jr&&(a=new RegExp("^"+g+"$(?!\\s)",m)),xr&&(n=h.lastIndex),r=wr(Pr,f?a:h,y),f?r?(r.input=Lr(r.input,b),r[0]=Lr(r[0],b),r.index=h.lastIndex,h.lastIndex+=r[0].length):h.lastIndex=0:xr&&r&&(h.lastIndex=h.global?r.index+r[0].length:n),jr&&r&&r.length>1&&wr(Br,r[0],a,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r&&d)for(r.groups=i=Rr(null),o=0;o<d.length;o++)i[(s=d[o])[0]]=r[s[1]];return r});(function(e,t){var a,n,r,o,i,s=e.target,h=e.global,c=e.stat;if(a=h?Tn:c?Tn[s]||On(s,{}):(Tn[s]||{}).prototype)for(n in t){if(o=t[n],r=e.noTargetGet?(i=Cn(a,n))&&i.value:a[n],!Mn(h?n:s+(c?".":"#")+n,e.forced)&&void 0!==r){if(typeof o==typeof r)continue;En(o,r)}(e.sham||r&&r.sham)&&In(o,"sham",!0),Rn(a,n,o,e)}})({target:"RegExp",proto:!0,forced:/./.exec!==Dr},{exec:Dr});var Yr={"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:"Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights","Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","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","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 before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","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 Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:"Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai","Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:"Ethiopian Jewish holiday occurring 50 days after Yom Kippur","Simchat Torah":"Day of Celebrating the Torah",Sukkot:"Feast of Booths","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","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","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. Note that Hebcal displays modern holidays like Yom HaAtzma'ut according to the Israeli schedule. 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. Note that Hebcal displays modern holidays like Yom HaZikaron according to the Israeli schedule. 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","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};function _r(e){return e.toLowerCase().replace(/'/g,"").replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-/g,"").replace(/-$/g,"")}function zr(e){return e<10?"0"+e:String(e)}function Ur(e){return e<0?"-00"+Ur(-e):e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:String(e)}function Kr(e){return Ur(e.getFullYear())+"-"+zr(e.getMonth()+1)+"-"+zr(e.getDate())}function Jr(e){const a=e.getDesc();if("Fast begins"===a||"Fast ends"===a)return["zmanim","fast"];switch(e.getFlags()){case t.flags.OMER_COUNT:return["omer"];case t.flags.HEBREW_DATE:return["hebdate"];case t.flags.PARSHA_HASHAVUA:return["parashat"];case t.flags.DAF_YOMI:return["dafyomi"];case t.flags.ROSH_CHODESH:return["roshchodesh"];case t.flags.SPECIAL_SHABBAT:return["holiday","shabbat"];case t.flags.MINOR_FAST:return["holiday","fast"];case t.flags.MAJOR_FAST:return["holiday","fast","major"];case t.flags.MODERN_HOLIDAY:return["holiday","modern"];case t.flags.SHABBAT_MEVARCHIM:return["mevarchim"];case t.flags.MOLAD:return["molad"];case t.flags.USER_EVENT:return["user"];case t.flags.MINOR_HOLIDAY:return["holiday","minor"]}if(e.cholHaMoedDay)return["holiday","major","cholhamoed"];switch(a){case"Havdalah":return["havdalah"];case"Candle lighting":return["candles"];case"Lag BaOmer":case"Leil Selichot":case"Pesach Sheni":case"Erev Purim":case"Purim Katan":case"Shushan Purim":case"Tu B'Av":case"Tu BiShvat":case"Rosh Hashana LaBehemot":return["holiday","minor"];case"Erev Tish'a B'Av":return["holiday","fast","major"];default:return["holiday","major"]}}function Zr(e,t){let a="Hebcal";const n=t.location;if(t.yahrzeit)a+=" Yahrzeits and Anniversaries";else if(n&&n.name){const e=n.name.indexOf(",");a+=" "+(-1==e?n.name:n.name.substring(0,e))}else t.il?a+=" Israel":a+=" Diaspora";if("1"==t.subscribe)return a;if(t.isHebrewYear||0==e.length)a+=" "+t.year;else{const t=e[0].getDate().greg(),n=e[e.length-1].getDate().greg();if(t.getFullYear()!=n.getFullYear())a+=" "+t.getFullYear()+"-"+n.getFullYear();else if(t.getMonth()==n.getMonth()){a+=" "+new Intl.DateTimeFormat("en-US",{month:"long"}).format(t)+" "+t.getFullYear()}else a+=" "+t.getFullYear()}return a}function Wr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a=Yr[e.getDesc()]||Yr[e.basename()]||"";if(t&&a){const e=a.indexOf(".");if(-1!=e)return a.substring(0,e)}return a}const Vr=t.flags.DAF_YOMI|t.flags.OMER_COUNT|t.flags.SHABBAT_MEVARCHIM|t.flags.MOLAD|t.flags.USER_EVENT|t.flags.HEBREW_DATE;function $r(e,a){const n=e.getFlags();if(n&Vr)return"";const o=n&t.flags.PARSHA_HASHAVUA?r.getLeyningForParshaHaShavua(e,a):r.getLeyningForHoliday(e,a);let i="";return o&&(o.summary||o.haftara)&&(o.summary&&(i+="Torah: ".concat(o.summary)),o.summary&&o.haftara&&(i+="\n"),o.haftara&&(i+="Haftarah: "+o.haftara,o.reason&&o.reason.haftara&&(i+=" | "+o.reason.haftara))),o&&o.sephardic&&(i+="\nHaftarah for Sephardim: "+o.sephardic),i}function qr(e,t,a,n,r){"https://www.hebcal.com"!==e.substring(0,22)?a="hebcal.com":t&&-1===e.indexOf("?")&&(e+="?i=on");const o=-1===e.indexOf("?")?"?":"&";return e+o+"utm_source=".concat(a,"&utm_medium=").concat(n)+(r?"&utm_campaign=".concat(r):"")}function Qr(e){if(void 0!==e.eventTime)return!0;const a=e.getFlags();if(a&t.flags.HEBREW_DATE){return 1!==e.getDate().getDate()}return!!(a&t.flags.DAF_YOMI)}const Xr='"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"',eo={dafyomi:"Daf Yomi",hebdate:"Hebrew Date",holiday:"Jewish Holidays",mevarchim:null,molad:null,omer:null,parashat:"Torah Reading",roshchodesh:"Jewish Holidays",user:"Personal"};function to(e,a){const n=e.getDate().greg(),r=n.getDate(),o=n.getMonth()+1,i=String(n.getFullYear()).padStart(4,"0"),s=a.euro?'"'.concat(r,"/").concat(o,"/").concat(i,'"'):'"'.concat(o,"/").concat(r,"/").concat(i,'"');let h="",c="",l="",u='"true"';const d=Boolean(e.eventTime);let f=Qr(e)?e.renderBrief(a.locale):e.render(a.locale);if(e.eventTime){const n=t.HebrewCalendar.reformatTimeStr(e.eventTimeStr," PM",a);c=h='"'.concat(n,'"'),l=s,u='"false"'}let m="Jewish Holidays";const g=e.getFlags();if(d&&a.location&&a.location.name){const e=a.location.name,t=e.indexOf(",");m=-1===t?e:e.substring(0,t)}else if(g&t.flags.DAF_YOMI){const e=f.indexOf(": ");-1!=e&&(m=f.substring(0,e),f=f.substring(e+2))}else{const t=eo[Jr(e)[0]];t&&(m=t)}if(f=f.replace(/,/g,"").replace(/"/g,"''"),a.appendHebrewToSubject){const t=e.renderBrief("he");t&&(f+=" / ".concat(t))}let b=e.memo||Wr(e,!0);b||void 0===e.linkedEvent||(b=e.linkedEvent.render(a.locale));const y=b.replace(/,/g,";").replace(/"/g,"''"),p=d||g&t.flags.CHAG?4:3;return'"'.concat(f,'",').concat(s,",").concat(h,",").concat(l,",").concat(c,",").concat(u,',"').concat(y,'","').concat(p,'","').concat(m,'"')}var ao={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 no(e,a){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=Boolean(e.eventTime),i=e.getDate(),s=i.greg(),h="object"==typeof a.location?a.location.getTzid():"UTC",c=o?t.Zmanim.formatISOWithTimeZone(h,e.eventTime):Kr(s),l=Jr(e),u=e.getFlags();let d=Qr(e)?e.renderBrief(a.locale):e.render(a.locale);const f=e.getDesc(),m="Havdalah"===f||"Candle lighting"===f;if(m){d+=": "+t.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",a)}const g={title:d,date:c,category:l[0]};l.length>1&&(g.subcat=l[1]),"holiday"===l[0]&&u&t.flags.CHAG&&(g.yomtov=!0),d!=f&&(g.title_orig=f);const b=e.renderBrief("he");if(b&&(g.hebrew=t.Locale.hebrewStripNikkud(b)),!m){if(n){const n=a.il,o=u===t.flags.PARSHA_HASHAVUA,s=o?r.getLeyningForParshaHaShavua(e,n):r.getLeyningForHoliday(e,n);if(s){g.leyning=oo(s);const t=i.getFullYear();if(o&&!n&&t>=5745&&t<=5830){const t=r.getTriennialForParshaHaShavua(e);t&&(g.leyning.triennial=ro({},t))}}}const o=e.url();if(o){const e=a.utmSource||"js",t=a.utmMedium||"api",n=a.utmCampaign;g.link=qr(o,a.il,e,t,n)}}const y=e.memo||Yr[e.basename()];return y?g.memo=y:void 0!==e.linkedEvent&&(g.memo=e.linkedEvent.render(a.locale)),g}function ro(e,t){return Object.keys(t).forEach((a=>{const n=t[a];if(void 0!==n){e["M"==a?"maftir":a]=r.formatAliyahWithBook(n)}})),e}function oo(e){const t={};return e.summary&&(t.torah=e.summary),e.haftara&&(t.haftarah=e.haftara),e.sephardic&&(t.haftarah_sephardic=e.sephardic),e.fullkriyah&&ro(t,e.fullkriyah),e.reason&&(["7","8","M"].forEach((a=>{if(e.reason[a]){t["M"==a?"maftir":a]+=" | "+e.reason[a]}})),e.reason.haftara&&(t.haftarah+=" | "+e.reason.haftara)),t}function io(e,a,n,r,o,i){let s=e.render();const h=e.getDate().greg(),c=function(e,t,a,n){if(t){const t=e.eventTime;return t?t.toUTCString():a.toUTCString().replace(/ \S+ GMT$/," 00:00:00 GMT")}return n}(e,a,h,n),l=!!o&&o.getIsrael(),u=function(e,a,n,r){let o,i;const s=e.eventTime||e.getDate().greg(),h=t.Zmanim.formatISOWithTimeZone(n,s),c=h.substring(0,h.indexOf("T")),l=c.replace(/-/g,""),u=_r(e.getDesc()),d="".concat(l,"-").concat(u),f=e.url();if(f)o=qr(f,a,"shabbat1c","rss").replace(/&/g,"&amp;"),i="".concat(f,"#").concat(d);else{const e="".concat(r,"&dt=").concat(c),t=qr(e,a,"shabbat1c","rss").replace(/&/g,"&amp;");i=e.replace(/&/g,"&amp;")+"#".concat(d),o="".concat(t,"#").concat(d)}return[o,i]}(e,l,o?o.getTzid():"UTC",i),d=u[0],f=u[1],m=Jr(e)[0],g=e.getDesc();let b;if("Havdalah"===g||"Candle lighting"===g){const a=s.indexOf(": ");if(-1!=a){const n={location:o,il:l,locale:t.Locale.getLocaleName()},r=t.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",n);s=s.substring(0,a)+": "+r}}else b=e.getFlags()&t.flags.PARSHA_HASHAVUA?$r(e,l):e.memo||Yr[e.basename()];const y=b||r.format(h),p="candles"==m?"<geo:lat>".concat(o.getLatitude(),"</geo:lat>\n<geo:long>").concat(o.getLongitude(),"</geo:long>\n"):"";return"<item>\n<title>".concat(s,"</title>\n<link>").concat(d,'</link>\n<guid isPermaLink="false">').concat(f,"</guid>\n<description>").concat(y,"</description>\n<category>").concat(m,"</category>\n<pubDate>").concat(c,"</pubDate>\n").concat(p,"</item>\n")}return e.appendIsraelAndTracking=qr,e.countryNames=ao,e.eventToClassicApiObject=no,e.eventToCsv=to,e.eventToFullCalendar=function(e,a,n){const r=Jr(e),o=e.getFlags();"holiday"==r[0]&&o&t.flags.CHAG&&r.push("yomtov");const i=Boolean(e.eventTime),s={title:Qr(e)?e.renderBrief():e.render(),start:i?t.Zmanim.formatISOWithTimeZone(a,e.eventTime):Kr(e.getDate().greg()),allDay:!i,className:r.join(" ")},h=e.renderBrief("he");h&&(s.hebrew=t.Locale.hebrewStripNikkud(h));const c=e.url();c&&(s.url=qr(c,n,"js","fc"));const l=e.getDesc();if(!("Havdalah"===l||"Candle lighting"===l)){const a=o&t.flags.PARSHA_HASHAVUA?$r(e,n):e.memo||Yr[e.basename()];a?s.description=a:void 0!==e.linkedEvent&&(s.description=e.linkedEvent.render())}return s},e.eventToRssItem=io,e.eventsToClassicApi=function(e,t){let a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n={title:Zr(e,t),date:(new Date).toISOString()},r=t.location;return"object"==typeof r&&"string"==typeof r.name?(n.location={title:r.getName(),city:r.getShortName(),tzid:r.getTzid(),latitude:r.getLatitude(),longitude:r.getLongitude(),cc:r.getCountryCode(),country:ao[r.getCountryCode()]},["admin1","asciiname","geo","zip","state","geonameid"].forEach((e=>{r[e]&&(n.location[e]=r[e])}))):n.location={geo:"none"},n.items=e.map((e=>no(e,t,a))),n},e.eventsToCsv=function(e,t){return[Xr].concat(e.map((e=>to(e,t)))).join("\r\n")+"\r\n"},e.eventsToRss=function(e,a,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US",i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];const s=a.getName(),h=(new Date).getFullYear(),c=t.Locale.gettext("Shabbat")+" Times for "+s,l=(new Date).toUTCString(),u=new Intl.DateTimeFormat("en-US",{weekday:"long",day:"2-digit",month:"long",year:"numeric"}),d=qr(n,a.getIsrael(),"shabbat1c","rss").replace(/&/g,"&amp;");r=r.replace(/&/g,"&amp;");let f='<?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>'.concat(c,"</title>\n<link>").concat(d,'</link>\n<atom:link href="').concat(r,'" rel="self" type="application/rss+xml" />\n<description>Weekly Shabbat candle lighting times for ').concat(s,"</description>\n<language>").concat(o,"</language>\n<copyright>Copyright (c) ").concat(h," Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>").concat(l,"</lastBuildDate>\n");return e.forEach((e=>{f+=io(e,i,l,u,a,n)})),f+="</channel>\n</rss>\n",f},e.getCalendarTitle=Zr,e.getDownloadFilename=function(e){let t="hebcal_"+e.year;if(e.isHebrewYear&&(t+="h"),e.month&&(t+="_"+e.month),e.location){t+="_"+_r(e.location.zip||e.location.asciiname||e.location.getShortName()).replace(/[-]/g,"_")}return t},e.getEventCategories=Jr,e.getHolidayDescription=Wr,e.holidayDescription=Yr,e.makeAnchor=_r,e.makeTorahMemoText=$r,e.pad2=zr,e.pad4=Ur,e.renderTitleWithoutTime=function(e){return void 0===e.eventTime?e.render():e.renderBrief()},e.shouldRenderBrief=Qr,e.timeZoneOffsetStr=function(e,a){return t.Zmanim.timeZoneOffset(e,a)},e.toISOString=Kr,e.toISOStringWithTimezone=function(e,a,n){const r=Kr(e);return a?r+"T"+a+":00"+t.Zmanim.timeZoneOffset(n,e):r},Object.defineProperty(e,"__esModule",{value:!0}),e}({},hebcal);
1
+ /*! @hebcal/rest-api v3.12.0 */
2
+ var hebcal__rest_api=function(e,t,a){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var r=n(hebcal__leyning),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=function(e){return e&&e.Math==Math&&e},s=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof o&&o)||function(){return this}()||Function("return this")(),c={},h=function(e){try{return!!e()}catch(e){return!0}},l=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!h((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),d=u,f=Function.prototype.call,m=d?f.bind(f):function(){return f.apply(f,arguments)},g={},b={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,p=y&&!b.call({1:2},1);g.f=p?function(e){var t=y(this,e);return!!t&&t.enumerable}:b;var v,S,w=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},A=u,H=Function.prototype,T=H.bind,C=H.call,I=A&&T.bind(C,C),R=A?function(e){return e&&I(e)}:function(e){return e&&function(){return C.apply(e,arguments)}},O=R,M=O({}.toString),E=O("".slice),D=function(e){return E(M(e),8,-1)},P=R,B=h,k=D,F=s.Object,N=P("".split),L=B((function(){return!F("z").propertyIsEnumerable(0)}))?function(e){return"String"==k(e)?N(e,""):F(e)}:F,j=s.TypeError,x=function(e){if(null==e)throw j("Can't call method on "+e);return e},G=L,Y=x,_=function(e){return G(Y(e))},z=function(e){return"function"==typeof e},U=z,K=function(e){return"object"==typeof e?null!==e:U(e)},J=s,Z=z,W=function(e){return Z(e)?e:void 0},V=function(e,t){return arguments.length<2?W(J[e]):J[e]&&J[e][t]},$=R({}.isPrototypeOf),q=s,Q=V("navigator","userAgent")||"",X=q.process,ee=q.Deno,te=X&&X.versions||ee&&ee.version,ae=te&&te.v8;ae&&(S=(v=ae.split("."))[0]>0&&v[0]<4?1:+(v[0]+v[1])),!S&&Q&&(!(v=Q.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=Q.match(/Chrome\/(\d+)/))&&(S=+v[1]);var ne=S,re=h,oe=!!Object.getOwnPropertySymbols&&!re((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ne&&ne<41})),ie=oe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,se=V,ce=z,he=$,le=ie,ue=s.Object,de=le?function(e){return"symbol"==typeof e}:function(e){var t=se("Symbol");return ce(t)&&he(t.prototype,ue(e))},fe=s.String,me=z,ge=function(e){try{return fe(e)}catch(e){return"Object"}},be=s.TypeError,ye=function(e){if(me(e))return e;throw be(ge(e)+" is not a function")},pe=m,ve=z,Se=K,we=s.TypeError,Ae={exports:{}},He=s,Te=Object.defineProperty,Ce=function(e,t){try{Te(He,e,{value:t,configurable:!0,writable:!0})}catch(a){He[e]=t}return t},Ie=Ce,Re="__core-js_shared__",Oe=s[Re]||Ie(Re,{}),Me=Oe;(Ae.exports=function(e,t){return Me[e]||(Me[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.20.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"});var Ee=x,De=s.Object,Pe=function(e){return De(Ee(e))},Be=R({}.hasOwnProperty),ke=Object.hasOwn||function(e,t){return Be(Pe(e),t)},Fe=R,Ne=0,Le=Math.random(),je=Fe(1..toString),xe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+je(++Ne+Le,36)},Ge=s,Ye=Ae.exports,_e=ke,ze=xe,Ue=oe,Ke=ie,Je=Ye("wks"),Ze=Ge.Symbol,We=Ze&&Ze.for,Ve=Ke?Ze:Ze&&Ze.withoutSetter||ze,$e=function(e){if(!_e(Je,e)||!Ue&&"string"!=typeof Je[e]){var t="Symbol."+e;Ue&&_e(Ze,e)?Je[e]=Ze[e]:Je[e]=Ke&&We?We(t):Ve(t)}return Je[e]},qe=m,Qe=K,Xe=de,et=function(e,t){var a=e[t];return null==a?void 0:ye(a)},tt=function(e,t){var a,n;if("string"===t&&ve(a=e.toString)&&!Se(n=pe(a,e)))return n;if(ve(a=e.valueOf)&&!Se(n=pe(a,e)))return n;if("string"!==t&&ve(a=e.toString)&&!Se(n=pe(a,e)))return n;throw we("Can't convert object to primitive value")},at=$e,nt=s.TypeError,rt=at("toPrimitive"),ot=function(e,t){if(!Qe(e)||Xe(e))return e;var a,n=et(e,rt);if(n){if(void 0===t&&(t="default"),a=qe(n,e,t),!Qe(a)||Xe(a))return a;throw nt("Can't convert object to primitive value")}return void 0===t&&(t="number"),tt(e,t)},it=de,st=function(e){var t=ot(e,"string");return it(t)?t:t+""},ct=K,ht=s.document,lt=ct(ht)&&ct(ht.createElement),ut=function(e){return lt?ht.createElement(e):{}},dt=ut,ft=!l&&!h((function(){return 7!=Object.defineProperty(dt("div"),"a",{get:function(){return 7}}).a})),mt=l,gt=m,bt=g,yt=w,pt=_,vt=st,St=ke,wt=ft,At=Object.getOwnPropertyDescriptor;c.f=mt?At:function(e,t){if(e=pt(e),t=vt(t),wt)try{return At(e,t)}catch(e){}if(St(e,t))return yt(!gt(bt.f,e,t),e[t])};var Ht={},Tt=l&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ct=s,It=K,Rt=Ct.String,Ot=Ct.TypeError,Mt=function(e){if(It(e))return e;throw Ot(Rt(e)+" is not an object")},Et=l,Dt=ft,Pt=Tt,Bt=Mt,kt=st,Ft=s.TypeError,Nt=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,jt="enumerable",xt="configurable",Gt="writable";Ht.f=Et?Pt?function(e,t,a){if(Bt(e),t=kt(t),Bt(a),"function"==typeof e&&"prototype"===t&&"value"in a&&Gt in a&&!a.writable){var n=Lt(e,t);n&&n.writable&&(e[t]=a.value,a={configurable:xt in a?a.configurable:n.configurable,enumerable:jt in a?a.enumerable:n.enumerable,writable:!1})}return Nt(e,t,a)}:Nt:function(e,t,a){if(Bt(e),t=kt(t),Bt(a),Dt)try{return Nt(e,t,a)}catch(e){}if("get"in a||"set"in a)throw Ft("Accessors not supported");return"value"in a&&(e[t]=a.value),e};var Yt=Ht,_t=w,zt=l?function(e,t,a){return Yt.f(e,t,_t(1,a))}:function(e,t,a){return e[t]=a,e},Ut={exports:{}},Kt=z,Jt=Oe,Zt=R(Function.toString);Kt(Jt.inspectSource)||(Jt.inspectSource=function(e){return Zt(e)});var Wt,Vt,$t,qt=Jt.inspectSource,Qt=z,Xt=qt,ea=s.WeakMap,ta=Qt(ea)&&/native code/.test(Xt(ea)),aa=Ae.exports,na=xe,ra=aa("keys"),oa=function(e){return ra[e]||(ra[e]=na(e))},ia={},sa=ta,ca=s,ha=R,la=K,ua=zt,da=ke,fa=Oe,ma=oa,ga=ia,ba="Object already initialized",ya=ca.TypeError,pa=ca.WeakMap;if(sa||fa.state){var va=fa.state||(fa.state=new pa),Sa=ha(va.get),wa=ha(va.has),Aa=ha(va.set);Wt=function(e,t){if(wa(va,e))throw new ya(ba);return t.facade=e,Aa(va,e,t),t},Vt=function(e){return Sa(va,e)||{}},$t=function(e){return wa(va,e)}}else{var Ha=ma("state");ga[Ha]=!0,Wt=function(e,t){if(da(e,Ha))throw new ya(ba);return t.facade=e,ua(e,Ha,t),t},Vt=function(e){return da(e,Ha)?e[Ha]:{}},$t=function(e){return da(e,Ha)}}var Ta={set:Wt,get:Vt,has:$t,enforce:function(e){return $t(e)?Vt(e):Wt(e,{})},getterFor:function(e){return function(t){var a;if(!la(t)||(a=Vt(t)).type!==e)throw ya("Incompatible receiver, "+e+" required");return a}}},Ca=l,Ia=ke,Ra=Function.prototype,Oa=Ca&&Object.getOwnPropertyDescriptor,Ma=Ia(Ra,"name"),Ea=Ma&&"something"===function(){}.name,Da=Ma&&(!Ca||Ca&&Oa(Ra,"name").configurable),Pa=s,Ba=z,ka=ke,Fa=zt,Na=Ce,La=qt,ja={EXISTS:Ma,PROPER:Ea,CONFIGURABLE:Da}.CONFIGURABLE,xa=Ta.get,Ga=Ta.enforce,Ya=String(String).split("String");(Ut.exports=function(e,t,a,n){var r,o=!!n&&!!n.unsafe,i=!!n&&!!n.enumerable,s=!!n&&!!n.noTargetGet,c=n&&void 0!==n.name?n.name:t;Ba(a)&&("Symbol("===String(c).slice(0,7)&&(c="["+String(c).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ka(a,"name")||ja&&a.name!==c)&&Fa(a,"name",c),(r=Ga(a)).source||(r.source=Ya.join("string"==typeof c?c:""))),e!==Pa?(o?!s&&e[t]&&(i=!0):delete e[t],i?e[t]=a:Fa(e,t,a)):i?e[t]=a:Na(t,a)})(Function.prototype,"toString",(function(){return Ba(this)&&xa(this).source||La(this)}));var _a={},za=Math.ceil,Ua=Math.floor,Ka=function(e){var t=+e;return t!=t||0===t?0:(t>0?Ua:za)(t)},Ja=Ka,Za=Math.max,Wa=Math.min,Va=Ka,$a=Math.min,qa=function(e){return e>0?$a(Va(e),9007199254740991):0},Qa=_,Xa=function(e,t){var a=Ja(e);return a<0?Za(a+t,0):Wa(a,t)},en=function(e){return qa(e.length)},tn=function(e){return function(t,a,n){var r,o=Qa(t),i=en(o),s=Xa(n,i);if(e&&a!=a){for(;i>s;)if((r=o[s++])!=r)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===a)return e||s||0;return!e&&-1}},an={includes:tn(!0),indexOf:tn(!1)},nn=ke,rn=_,on=an.indexOf,sn=ia,cn=R([].push),hn=function(e,t){var a,n=rn(e),r=0,o=[];for(a in n)!nn(sn,a)&&nn(n,a)&&cn(o,a);for(;t.length>r;)nn(n,a=t[r++])&&(~on(o,a)||cn(o,a));return o},ln=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],un=hn,dn=ln.concat("length","prototype");_a.f=Object.getOwnPropertyNames||function(e){return un(e,dn)};var fn={};fn.f=Object.getOwnPropertySymbols;var mn=V,gn=_a,bn=fn,yn=Mt,pn=R([].concat),vn=mn("Reflect","ownKeys")||function(e){var t=gn.f(yn(e)),a=bn.f;return a?pn(t,a(e)):t},Sn=ke,wn=vn,An=c,Hn=Ht,Tn=h,Cn=z,In=/#|\.prototype\./,Rn=function(e,t){var a=Mn[On(e)];return a==Dn||a!=En&&(Cn(t)?Tn(t):!!t)},On=Rn.normalize=function(e){return String(e).replace(In,".").toLowerCase()},Mn=Rn.data={},En=Rn.NATIVE="N",Dn=Rn.POLYFILL="P",Pn=Rn,Bn=s,kn=c.f,Fn=zt,Nn=Ut.exports,Ln=Ce,jn=function(e,t,a){for(var n=wn(t),r=Hn.f,o=An.f,i=0;i<n.length;i++){var s=n[i];Sn(e,s)||a&&Sn(a,s)||r(e,s,o(t,s))}},xn=Pn,Gn={};Gn[$e("toStringTag")]="z";var Yn=s,_n="[object z]"===String(Gn),zn=z,Un=D,Kn=$e("toStringTag"),Jn=Yn.Object,Zn="Arguments"==Un(function(){return arguments}()),Wn=_n?Un:function(e){var t,a,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=Jn(e),Kn))?a:Zn?Un(t):"Object"==(n=Un(t))&&zn(t.callee)?"Arguments":n},Vn=s.String,$n=Mt,qn=h,Qn=s.RegExp,Xn=qn((function(){var e=Qn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),er=Xn||qn((function(){return!Qn("a","y").sticky})),tr={BROKEN_CARET:Xn||qn((function(){var e=Qn("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:er,UNSUPPORTED_Y:Xn},ar={},nr=hn,rr=ln,or=Object.keys||function(e){return nr(e,rr)},ir=l,sr=Tt,cr=Ht,hr=Mt,lr=_,ur=or;ar.f=ir&&!sr?Object.defineProperties:function(e,t){hr(e);for(var a,n=lr(t),r=ur(t),o=r.length,i=0;o>i;)cr.f(e,a=r[i++],n[a]);return e};var dr,fr=V("document","documentElement"),mr=Mt,gr=ar,br=ln,yr=ia,pr=fr,vr=ut,Sr=oa("IE_PROTO"),wr=function(){},Ar=function(e){return"<script>"+e+"</"+"script>"},Hr=function(e){e.write(Ar("")),e.close();var t=e.parentWindow.Object;return e=null,t},Tr=function(){try{dr=new ActiveXObject("htmlfile")}catch(e){}var e,t;Tr="undefined"!=typeof document?document.domain&&dr?Hr(dr):((t=vr("iframe")).style.display="none",pr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Ar("document.F=Object")),e.close(),e.F):Hr(dr);for(var a=br.length;a--;)delete Tr.prototype[br[a]];return Tr()};yr[Sr]=!0;var Cr,Ir,Rr=Object.create||function(e,t){var a;return null!==e?(wr.prototype=mr(e),a=new wr,wr.prototype=null,a[Sr]=e):a=Tr(),void 0===t?a:gr.f(a,t)},Or=h,Mr=s.RegExp,Er=Or((function(){var e=Mr(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Dr=h,Pr=s.RegExp,Br=Dr((function(){var e=Pr("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),kr=m,Fr=R,Nr=function(e){if("Symbol"===Wn(e))throw TypeError("Cannot convert a Symbol value to a string");return Vn(e)},Lr=function(){var e=$n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},jr=tr,xr=Ae.exports,Gr=Rr,Yr=Ta.get,_r=Er,zr=Br,Ur=xr("native-string-replace",String.prototype.replace),Kr=RegExp.prototype.exec,Jr=Kr,Zr=Fr("".charAt),Wr=Fr("".indexOf),Vr=Fr("".replace),$r=Fr("".slice),qr=(Ir=/b*/g,kr(Kr,Cr=/a/,"a"),kr(Kr,Ir,"a"),0!==Cr.lastIndex||0!==Ir.lastIndex),Qr=jr.BROKEN_CARET,Xr=void 0!==/()??/.exec("")[1];(qr||Xr||Qr||_r||zr)&&(Jr=function(e){var t,a,n,r,o,i,s,c=this,h=Yr(c),l=Nr(e),u=h.raw;if(u)return u.lastIndex=c.lastIndex,t=kr(Jr,u,l),c.lastIndex=u.lastIndex,t;var d=h.groups,f=Qr&&c.sticky,m=kr(Lr,c),g=c.source,b=0,y=l;if(f&&(m=Vr(m,"y",""),-1===Wr(m,"g")&&(m+="g"),y=$r(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Zr(l,c.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,b++),a=new RegExp("^(?:"+g+")",m)),Xr&&(a=new RegExp("^"+g+"$(?!\\s)",m)),qr&&(n=c.lastIndex),r=kr(Kr,f?a:c,y),f?r?(r.input=$r(r.input,b),r[0]=$r(r[0],b),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:qr&&r&&(c.lastIndex=c.global?r.index+r[0].length:n),Xr&&r&&r.length>1&&kr(Ur,r[0],a,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r&&d)for(r.groups=i=Gr(null),o=0;o<d.length;o++)i[(s=d[o])[0]]=r[s[1]];return r});(function(e,t){var a,n,r,o,i,s=e.target,c=e.global,h=e.stat;if(a=c?Bn:h?Bn[s]||Ln(s,{}):(Bn[s]||{}).prototype)for(n in t){if(o=t[n],r=e.noTargetGet?(i=kn(a,n))&&i.value:a[n],!xn(c?n:s+(h?".":"#")+n,e.forced)&&void 0!==r){if(typeof o==typeof r)continue;jn(o,r)}(e.sham||r&&r.sham)&&Fn(o,"sham",!0),Nn(a,n,o,e)}})({target:"RegExp",proto:!0,forced:/./.exec!==Jr},{exec:Jr});var eo={"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:"Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights","Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","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","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 before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","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 Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:"Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai","Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:"Ethiopian Jewish holiday occurring 50 days after Yom Kippur","Simchat Torah":"Day of Celebrating the Torah",Sukkot:"Feast of Booths","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","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","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. Note that Hebcal displays modern holidays like Yom HaAtzma'ut according to the Israeli schedule. 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. Note that Hebcal displays modern holidays like Yom HaZikaron according to the Israeli schedule. 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","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};function to(e){return e.toLowerCase().replace(/'/g,"").replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-/g,"").replace(/-$/g,"")}function ao(e){return e<10?"0"+e:String(e)}function no(e){return e<0?"-00"+no(-e):e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:String(e)}function ro(e){return no(e.getFullYear())+"-"+ao(e.getMonth()+1)+"-"+ao(e.getDate())}function oo(e){const a=e.getDesc();if("Fast begins"===a||"Fast ends"===a)return["zmanim","fast"];switch(e.getFlags()){case t.flags.OMER_COUNT:return["omer"];case t.flags.HEBREW_DATE:return["hebdate"];case t.flags.PARSHA_HASHAVUA:return["parashat"];case t.flags.DAF_YOMI:return["dafyomi"];case t.flags.ROSH_CHODESH:return["roshchodesh"];case t.flags.SPECIAL_SHABBAT:return["holiday","shabbat"];case t.flags.MINOR_FAST:return["holiday","fast"];case t.flags.MAJOR_FAST:return["holiday","fast","major"];case t.flags.MODERN_HOLIDAY:return["holiday","modern"];case t.flags.SHABBAT_MEVARCHIM:return["mevarchim"];case t.flags.MOLAD:return["molad"];case t.flags.USER_EVENT:return["user"];case t.flags.MINOR_HOLIDAY:return["holiday","minor"];case t.flags.MISHNA_YOMI:return["mishnayomi"]}if(e.cholHaMoedDay)return["holiday","major","cholhamoed"];switch(a){case"Havdalah":return["havdalah"];case"Candle lighting":return["candles"];case"Lag BaOmer":case"Leil Selichot":case"Pesach Sheni":case"Erev Purim":case"Purim Katan":case"Shushan Purim":case"Tu B'Av":case"Tu BiShvat":case"Rosh Hashana LaBehemot":return["holiday","minor"];case"Erev Tish'a B'Av":return["holiday","fast","major"];default:return["holiday","major"]}}function io(e,t){let a="Hebcal";const n=t.location;if(t.yahrzeit)a+=" Yahrzeits and Anniversaries";else if(n&&n.name){const e=n.name.indexOf(",");a+=" "+(-1==e?n.name:n.name.substring(0,e))}else t.il?a+=" Israel":a+=" Diaspora";if("1"==t.subscribe)return a;if(t.isHebrewYear||0==e.length)a+=" "+t.year;else{const t=e[0].getDate().greg(),n=e[e.length-1].getDate().greg();if(t.getFullYear()!=n.getFullYear())a+=" "+t.getFullYear()+"-"+n.getFullYear();else if(t.getMonth()==n.getMonth()){a+=" "+new Intl.DateTimeFormat("en-US",{month:"long"}).format(t)+" "+t.getFullYear()}else a+=" "+t.getFullYear()}return a}function so(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a=eo[e.getDesc()]||eo[e.basename()]||"";if(t&&a){const e=a.indexOf(".");if(-1!=e)return a.substring(0,e)}return a}const co=t.flags.DAF_YOMI|t.flags.OMER_COUNT|t.flags.SHABBAT_MEVARCHIM|t.flags.MOLAD|t.flags.USER_EVENT|t.flags.HEBREW_DATE;function ho(e,a){const n=e.getFlags();if(n&co)return"";const o=n&t.flags.PARSHA_HASHAVUA?r.getLeyningForParshaHaShavua(e,a):r.getLeyningForHoliday(e,a);let i="";return o&&(o.summary||o.haftara)&&(o.summary&&(i+="Torah: ".concat(o.summary)),o.summary&&o.haftara&&(i+="\n"),o.haftara&&(i+="Haftarah: "+o.haftara,o.reason&&o.reason.haftara&&(i+=" | "+o.reason.haftara))),o&&o.sephardic&&(i+="\nHaftarah for Sephardim: "+o.sephardic),i}function lo(e,t,a,n,r){"https://www.hebcal.com"!==e.substring(0,22)?a="hebcal.com":t&&-1===e.indexOf("?")&&(e+="?i=on");const o=-1===e.indexOf("?")?"?":"&";return e+o+"utm_source=".concat(a,"&utm_medium=").concat(n)+(r?"&utm_campaign=".concat(r):"")}function uo(e){if(void 0!==e.eventTime)return!0;const a=e.getFlags();if(a&t.flags.HEBREW_DATE){return 1!==e.getDate().getDate()}return!!(a&t.flags.DAF_YOMI)}const fo='"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"',mo={dafyomi:"Daf Yomi",hebdate:"Hebrew Date",holiday:"Jewish Holidays",mevarchim:null,molad:null,omer:null,parashat:"Torah Reading",roshchodesh:"Jewish Holidays",user:"Personal"};function go(e,a){const n=e.getDate().greg(),r=n.getDate(),o=n.getMonth()+1,i=String(n.getFullYear()).padStart(4,"0"),s=a.euro?'"'.concat(r,"/").concat(o,"/").concat(i,'"'):'"'.concat(o,"/").concat(r,"/").concat(i,'"');let c="",h="",l="",u='"true"';const d=Boolean(e.eventTime);let f=uo(e)?e.renderBrief(a.locale):e.render(a.locale);if(e.eventTime){const n=t.HebrewCalendar.reformatTimeStr(e.eventTimeStr," PM",a);h=c='"'.concat(n,'"'),l=s,u='"false"'}let m="Jewish Holidays";const g=e.getFlags();if(d&&a.location&&a.location.name){const e=a.location.name,t=e.indexOf(",");m=-1===t?e:e.substring(0,t)}else if(g&t.flags.DAF_YOMI){const e=f.indexOf(": ");-1!=e&&(m=f.substring(0,e),f=f.substring(e+2))}else{const t=mo[oo(e)[0]];t&&(m=t)}if(f=f.replace(/,/g,"").replace(/"/g,"''"),a.appendHebrewToSubject){const t=e.renderBrief("he");t&&(f+=" / ".concat(t))}let b=e.memo||so(e,!0);b||void 0===e.linkedEvent||(b=e.linkedEvent.render(a.locale));const y=b.replace(/,/g,";").replace(/"/g,"''"),p=d||g&t.flags.CHAG?4:3;return'"'.concat(f,'",').concat(s,",").concat(c,",").concat(l,",").concat(h,",").concat(u,',"').concat(y,'","').concat(p,'","').concat(m,'"')}var bo={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 yo(e,a){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=Boolean(e.eventTime),i=e.getDate(),s=i.greg(),c="object"==typeof a.location?a.location.getTzid():"UTC",h=o?t.Zmanim.formatISOWithTimeZone(c,e.eventTime):ro(s),l=oo(e),u=e.getFlags();let d=uo(e)?e.renderBrief(a.locale):e.render(a.locale);const f=e.getDesc(),m="Havdalah"===f||"Candle lighting"===f;if(m){d+=": "+t.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",a)}const g={title:d,date:h,category:l[0]};l.length>1&&(g.subcat=l[1]),"holiday"===l[0]&&u&t.flags.CHAG&&(g.yomtov=!0),d!=f&&(g.title_orig=f);const b=e.renderBrief("he");if(b&&(g.hebrew=t.Locale.hebrewStripNikkud(b)),!m){if(n){const n=a.il,o=u===t.flags.PARSHA_HASHAVUA,s=o?r.getLeyningForParshaHaShavua(e,n):r.getLeyningForHoliday(e,n);if(s){g.leyning=vo(s);const t=i.getFullYear();if(o&&!n&&t>=5745&&t<=5830){const t=r.getTriennialForParshaHaShavua(e);t&&(g.leyning.triennial=po({},t))}}}const o=e.url();if(o){const e=a.utmSource||"js",t=a.utmMedium||"api",n=a.utmCampaign;g.link=lo(o,a.il,e,t,n)}}const y=e.memo||eo[e.basename()];return y?g.memo=y:void 0!==e.linkedEvent&&(g.memo=e.linkedEvent.render(a.locale)),g}function po(e,t){return Object.keys(t).forEach((a=>{const n=t[a];if(void 0!==n){e["M"==a?"maftir":a]=r.formatAliyahWithBook(n)}})),e}function vo(e){const t={};return e.summary&&(t.torah=e.summary),e.haftara&&(t.haftarah=e.haftara),e.sephardic&&(t.haftarah_sephardic=e.sephardic),e.fullkriyah&&po(t,e.fullkriyah),e.reason&&(["7","8","M"].forEach((a=>{if(e.reason[a]){t["M"==a?"maftir":a]+=" | "+e.reason[a]}})),e.reason.haftara&&(t.haftarah+=" | "+e.reason.haftara)),t}const So={s:"en",a:"en","he-x-NoNikud":"he",h:"he",ah:"en",sh:"en"};function wo(e,t){t.dayFormat=new Intl.DateTimeFormat("en-US",{weekday:"long",day:"2-digit",month:"long",year:"numeric"});const a=t.location,n=t.mainUrl,r=t.buildDate=t.buildDate||new Date,o=r.getFullYear(),i=t.lastBuildDate=r.toUTCString(),s=t.title||io(e,t),c=t.description||s,h=t.utmSource||"shabbat1c",l=t.utmMedium||"rss",u=lo(n,a&&a.getIsrael(),h,l,t.utmCampaign).replace(/&/g,"&amp;"),d=t.selfUrl.replace(/&/g,"&amp;"),f=t.lang||So[t.locale]||t.locale||"en-US";let m='<?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>'.concat(s,"</title>\n<link>").concat(u,'</link>\n<atom:link href="').concat(d,'" rel="self" type="application/rss+xml" />\n<description>').concat(c,"</description>\n<language>").concat(f,"</language>\n<copyright>Copyright (c) ").concat(o," Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>").concat(i,"</lastBuildDate>\n");return e.forEach((e=>{m+=Ao(e,t)})),m+="</channel>\n</rss>\n",m}function Ao(e,t){return Ho(e,t.evPubDate,t.lastBuildDate,t.dayFormat,t.location,t.mainUrl,t)}function Ho(e,a,n,r,o,i,s){let c=e.render();const h=e.getDate().greg(),l=function(e,t,a,n){if(t){const t=e.eventTime;return t?t.toUTCString():a.toUTCString().replace(/ \S+ GMT$/," 00:00:00 GMT")}return n}(e,a,h,n),u=!!o&&o.getIsrael(),d=function(e,a,n,r,o,i){let s,c;const h=e.eventTime||e.getDate().greg(),l=t.Zmanim.formatISOWithTimeZone(n,h),u=l.substring(0,l.indexOf("T")),d=u.replace(/-/g,""),f=to(e.getDesc()),m="".concat(d,"-").concat(f),g=e.url();if(g)s=lo(g,a,o,i).replace(/&/g,"&amp;"),c="".concat(g,"#").concat(m);else{const e="".concat(r,"&dt=").concat(u),t=lo(e,a,o,i).replace(/&/g,"&amp;");c=e.replace(/&/g,"&amp;")+"#".concat(m),s="".concat(t,"#").concat(m)}return[s,c]}(e,u,o?o.getTzid():"UTC",i,s&&s.utmSource||"shabbat1c",s&&s.utmMedium||"rss"),f=d[0],m=d[1],g=oo(e)[0],b=e.getDesc();let y;if("Havdalah"===b||"Candle lighting"===b){const a=c.indexOf(": ");if(-1!=a){const n={location:o,il:u,locale:t.Locale.getLocaleName()},r=t.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",n);c=c.substring(0,a)+": "+r}}else y=e.getFlags()&t.flags.PARSHA_HASHAVUA?ho(e,u):e.memo||eo[e.basename()];const p=y||r.format(h),v="candles"==g?"<geo:lat>".concat(o.getLatitude(),"</geo:lat>\n<geo:long>").concat(o.getLongitude(),"</geo:long>\n"):"";return"<item>\n<title>".concat(c,"</title>\n<link>").concat(f,'</link>\n<guid isPermaLink="false">').concat(m,"</guid>\n<description>").concat(p,"</description>\n<category>").concat(g,"</category>\n<pubDate>").concat(l,"</pubDate>\n").concat(v,"</item>\n")}return e.appendIsraelAndTracking=lo,e.countryNames=bo,e.eventToClassicApiObject=yo,e.eventToCsv=go,e.eventToFullCalendar=function(e,a,n){const r=oo(e),o=e.getFlags();"holiday"==r[0]&&o&t.flags.CHAG&&r.push("yomtov");const i=Boolean(e.eventTime),s={title:uo(e)?e.renderBrief():e.render(),start:i?t.Zmanim.formatISOWithTimeZone(a,e.eventTime):ro(e.getDate().greg()),allDay:!i,className:r.join(" ")},c=e.renderBrief("he");c&&(s.hebrew=t.Locale.hebrewStripNikkud(c));const h=e.url();h&&(s.url=lo(h,n,"js","fc"));const l=e.getDesc();if(!("Havdalah"===l||"Candle lighting"===l)){const a=o&t.flags.PARSHA_HASHAVUA?ho(e,n):e.memo||eo[e.basename()];a?s.description=a:void 0!==e.linkedEvent&&(s.description=e.linkedEvent.render())}return s},e.eventToRssItem=Ho,e.eventToRssItem2=Ao,e.eventsToClassicApi=function(e,t){let a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n={title:io(e,t),date:(new Date).toISOString()},r=t.location;return"object"==typeof r&&"string"==typeof r.name?(n.location={title:r.getName(),city:r.getShortName(),tzid:r.getTzid(),latitude:r.getLatitude(),longitude:r.getLongitude(),cc:r.getCountryCode(),country:bo[r.getCountryCode()]},["admin1","asciiname","geo","zip","state","geonameid"].forEach((e=>{r[e]&&(n.location[e]=r[e])}))):n.location={geo:"none"},n.items=e.map((e=>yo(e,t,a))),n},e.eventsToCsv=function(e,t){return[fo].concat(e.map((e=>go(e,t)))).join("\r\n")+"\r\n"},e.eventsToRss=function(e,a,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US",i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];const s=a.getName(),c={location:a,mainUrl:n,selfUrl:r,lang:o,evPubDate:i,title:t.Locale.gettext("Shabbat")+" Times for ".concat(s),description:"Weekly Shabbat candle lighting times for ".concat(s),utmSource:"shabbat1c",utmMedium:"rss"};return wo(e,c)},e.eventsToRss2=wo,e.getCalendarTitle=io,e.getDownloadFilename=function(e){let t="hebcal_"+e.year;if(e.isHebrewYear&&(t+="h"),e.month&&(t+="_"+e.month),e.location){t+="_"+to(e.location.zip||e.location.asciiname||e.location.getShortName()).replace(/[-]/g,"_")}return t},e.getEventCategories=oo,e.getHolidayDescription=so,e.holidayDescription=eo,e.makeAnchor=to,e.makeTorahMemoText=ho,e.pad2=ao,e.pad4=no,e.renderTitleWithoutTime=function(e){return void 0===e.eventTime?e.render():e.renderBrief()},e.shouldRenderBrief=uo,e.timeZoneOffsetStr=function(e,a){return t.Zmanim.timeZoneOffset(e,a)},e.toISOString=ro,e.toISOStringWithTimezone=function(e,a,n){const r=ro(e);return a?r+"T"+a+":00"+t.Zmanim.timeZoneOffset(n,e):r},Object.defineProperty(e,"__esModule",{value:!0}),e}({},hebcal);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/rest-api v3.9.0 */
1
+ /*! @hebcal/rest-api v3.12.0 */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -180,6 +180,9 @@ function getEventCategories(ev) {
180
180
 
181
181
  case core.flags.MINOR_HOLIDAY:
182
182
  return ['holiday', 'minor'];
183
+
184
+ case core.flags.MISHNA_YOMI:
185
+ return ['mishnayomi'];
183
186
  // fall through to string-based category
184
187
  }
185
188
 
@@ -658,10 +661,12 @@ function formatLeyningResult(reading) {
658
661
  * @param {boolean} il
659
662
  * @param {string} tzid
660
663
  * @param {string} mainUrl
664
+ * @param {string} utmSource
665
+ * @param {string} utmMedium
661
666
  * @return {string[]}
662
667
  */
663
668
 
664
- function getLinkAndGuid(ev, il, tzid, mainUrl) {
669
+ function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {
665
670
  let link;
666
671
  let guid;
667
672
  const dt = ev.eventTime || ev.getDate().greg();
@@ -673,11 +678,11 @@ function getLinkAndGuid(ev, il, tzid, mainUrl) {
673
678
  const url0 = ev.url();
674
679
 
675
680
  if (url0) {
676
- link = appendIsraelAndTracking(url0, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
681
+ link = appendIsraelAndTracking(url0, il, utmSource, utmMedium).replace(/&/g, '&amp;');
677
682
  guid = `${url0}#${anchor}`;
678
683
  } else {
679
684
  const url1 = `${mainUrl}&dt=${dtStr}`;
680
- const url = appendIsraelAndTracking(url1, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
685
+ const url = appendIsraelAndTracking(url1, il, utmSource, utmMedium).replace(/&/g, '&amp;');
681
686
  guid = url1.replace(/&/g, '&amp;') + `#${anchor}`;
682
687
  link = `${url}#${anchor}`;
683
688
  }
@@ -697,30 +702,65 @@ function getLinkAndGuid(ev, il, tzid, mainUrl) {
697
702
 
698
703
  function eventsToRss(events, location, mainUrl, selfUrl, lang = 'en-US', evPubDate = true) {
699
704
  const cityDescr = location.getName();
700
- const thisYear = new Date().getFullYear();
701
- const title = core.Locale.gettext('Shabbat') + ' Times for ' + cityDescr;
702
- const lastBuildDate = new Date().toUTCString();
703
- const dayFormat = new Intl.DateTimeFormat('en-US', {
705
+ const options = {
706
+ location,
707
+ mainUrl,
708
+ selfUrl,
709
+ lang,
710
+ evPubDate,
711
+ title: core.Locale.gettext('Shabbat') + ` Times for ${cityDescr}`,
712
+ description: `Weekly Shabbat candle lighting times for ${cityDescr}`,
713
+ utmSource: 'shabbat1c',
714
+ utmMedium: 'rss'
715
+ };
716
+ return eventsToRss2(events, options);
717
+ }
718
+ const localeToLg = {
719
+ 's': 'en',
720
+ 'a': 'en',
721
+ 'he-x-NoNikud': 'he',
722
+ 'h': 'he',
723
+ 'ah': 'en',
724
+ 'sh': 'en'
725
+ };
726
+ /**
727
+ * @param {Event[]} events
728
+ * @param {HebrewCalendar.Options} options
729
+ * @return {string}
730
+ */
731
+
732
+ function eventsToRss2(events, options) {
733
+ options.dayFormat = new Intl.DateTimeFormat('en-US', {
704
734
  weekday: 'long',
705
735
  day: '2-digit',
706
736
  month: 'long',
707
737
  year: 'numeric'
708
738
  });
709
- const mainUrlEsc = appendIsraelAndTracking(mainUrl, location.getIsrael(), 'shabbat1c', 'rss').replace(/&/g, '&amp;');
710
- selfUrl = selfUrl.replace(/&/g, '&amp;');
739
+ const location = options.location;
740
+ const mainUrl = options.mainUrl;
741
+ const buildDate = options.buildDate = options.buildDate || new Date();
742
+ const thisYear = buildDate.getFullYear();
743
+ const lastBuildDate = options.lastBuildDate = buildDate.toUTCString();
744
+ const title = options.title || getCalendarTitle(events, options);
745
+ const description = options.description || title;
746
+ const utmSource = options.utmSource || 'shabbat1c';
747
+ const utmMedium = options.utmMedium || 'rss';
748
+ const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), utmSource, utmMedium, options.utmCampaign).replace(/&/g, '&amp;');
749
+ const selfUrlEsc = options.selfUrl.replace(/&/g, '&amp;');
750
+ const lang = options.lang || localeToLg[options.locale] || options.locale || 'en-US';
711
751
  let str = `<?xml version="1.0" encoding="UTF-8"?>
712
752
  <rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:atom="http://www.w3.org/2005/Atom">
713
753
  <channel>
714
754
  <title>${title}</title>
715
755
  <link>${mainUrlEsc}</link>
716
- <atom:link href="${selfUrl}" rel="self" type="application/rss+xml" />
717
- <description>Weekly Shabbat candle lighting times for ${cityDescr}</description>
756
+ <atom:link href="${selfUrlEsc}" rel="self" type="application/rss+xml" />
757
+ <description>${description}</description>
718
758
  <language>${lang}</language>
719
759
  <copyright>Copyright (c) ${thisYear} Michael J. Radwin. All rights reserved.</copyright>
720
760
  <lastBuildDate>${lastBuildDate}</lastBuildDate>
721
761
  `;
722
762
  events.forEach(ev => {
723
- str += eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl);
763
+ str += eventToRssItem2(ev, options);
724
764
  });
725
765
  str += '</channel>\n</rss>\n';
726
766
  return str;
@@ -747,6 +787,16 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
747
787
 
748
788
  return lastBuildDate;
749
789
  }
790
+ /**
791
+ * @param {Event} ev
792
+ * @param {HebrewCalendar.Options} options
793
+ * @return {string}
794
+ */
795
+
796
+
797
+ function eventToRssItem2(ev, options) {
798
+ return eventToRssItem(ev, options.evPubDate, options.lastBuildDate, options.dayFormat, options.location, options.mainUrl, options);
799
+ }
750
800
  /**
751
801
  * @param {Event} ev
752
802
  * @param {boolean} evPubDate
@@ -754,17 +804,19 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
754
804
  * @param {Intl.DateTimeFormat} dayFormat
755
805
  * @param {Location} location
756
806
  * @param {string} mainUrl
807
+ * @param {HebrewCalendar.Options} [options]
757
808
  * @return {string}
758
809
  */
759
810
 
760
-
761
- function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl) {
811
+ function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, options) {
762
812
  let subj = ev.render();
763
813
  const evDate = ev.getDate().greg();
764
814
  const pubDate = getPubDate(ev, evPubDate, evDate, lastBuildDate);
765
815
  const il = location ? location.getIsrael() : false;
766
816
  const tzid = location ? location.getTzid() : 'UTC';
767
- const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl);
817
+ const utmSource = options && options.utmSource || 'shabbat1c';
818
+ const utmMedium = options && options.utmMedium || 'rss';
819
+ const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium);
768
820
  const link = linkGuid[0];
769
821
  const guid = linkGuid[1];
770
822
  const categories = getEventCategories(ev);
@@ -861,9 +913,11 @@ exports.eventToClassicApiObject = eventToClassicApiObject;
861
913
  exports.eventToCsv = eventToCsv;
862
914
  exports.eventToFullCalendar = eventToFullCalendar;
863
915
  exports.eventToRssItem = eventToRssItem;
916
+ exports.eventToRssItem2 = eventToRssItem2;
864
917
  exports.eventsToClassicApi = eventsToClassicApi;
865
918
  exports.eventsToCsv = eventsToCsv;
866
919
  exports.eventsToRss = eventsToRss;
920
+ exports.eventsToRss2 = eventsToRss2;
867
921
  exports.getCalendarTitle = getCalendarTitle;
868
922
  exports.getDownloadFilename = getDownloadFilename;
869
923
  exports.getEventCategories = getEventCategories;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/rest-api v3.9.0 */
1
+ /*! @hebcal/rest-api v3.12.0 */
2
2
  import { flags, Zmanim, HebrewCalendar, Locale } from '@hebcal/core';
3
3
  import * as leyn from '@hebcal/leyning';
4
4
 
@@ -156,6 +156,9 @@ function getEventCategories(ev) {
156
156
 
157
157
  case flags.MINOR_HOLIDAY:
158
158
  return ['holiday', 'minor'];
159
+
160
+ case flags.MISHNA_YOMI:
161
+ return ['mishnayomi'];
159
162
  // fall through to string-based category
160
163
  }
161
164
 
@@ -634,10 +637,12 @@ function formatLeyningResult(reading) {
634
637
  * @param {boolean} il
635
638
  * @param {string} tzid
636
639
  * @param {string} mainUrl
640
+ * @param {string} utmSource
641
+ * @param {string} utmMedium
637
642
  * @return {string[]}
638
643
  */
639
644
 
640
- function getLinkAndGuid(ev, il, tzid, mainUrl) {
645
+ function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {
641
646
  let link;
642
647
  let guid;
643
648
  const dt = ev.eventTime || ev.getDate().greg();
@@ -649,11 +654,11 @@ function getLinkAndGuid(ev, il, tzid, mainUrl) {
649
654
  const url0 = ev.url();
650
655
 
651
656
  if (url0) {
652
- link = appendIsraelAndTracking(url0, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
657
+ link = appendIsraelAndTracking(url0, il, utmSource, utmMedium).replace(/&/g, '&amp;');
653
658
  guid = `${url0}#${anchor}`;
654
659
  } else {
655
660
  const url1 = `${mainUrl}&dt=${dtStr}`;
656
- const url = appendIsraelAndTracking(url1, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
661
+ const url = appendIsraelAndTracking(url1, il, utmSource, utmMedium).replace(/&/g, '&amp;');
657
662
  guid = url1.replace(/&/g, '&amp;') + `#${anchor}`;
658
663
  link = `${url}#${anchor}`;
659
664
  }
@@ -673,30 +678,65 @@ function getLinkAndGuid(ev, il, tzid, mainUrl) {
673
678
 
674
679
  function eventsToRss(events, location, mainUrl, selfUrl, lang = 'en-US', evPubDate = true) {
675
680
  const cityDescr = location.getName();
676
- const thisYear = new Date().getFullYear();
677
- const title = Locale.gettext('Shabbat') + ' Times for ' + cityDescr;
678
- const lastBuildDate = new Date().toUTCString();
679
- const dayFormat = new Intl.DateTimeFormat('en-US', {
681
+ const options = {
682
+ location,
683
+ mainUrl,
684
+ selfUrl,
685
+ lang,
686
+ evPubDate,
687
+ title: Locale.gettext('Shabbat') + ` Times for ${cityDescr}`,
688
+ description: `Weekly Shabbat candle lighting times for ${cityDescr}`,
689
+ utmSource: 'shabbat1c',
690
+ utmMedium: 'rss'
691
+ };
692
+ return eventsToRss2(events, options);
693
+ }
694
+ const localeToLg = {
695
+ 's': 'en',
696
+ 'a': 'en',
697
+ 'he-x-NoNikud': 'he',
698
+ 'h': 'he',
699
+ 'ah': 'en',
700
+ 'sh': 'en'
701
+ };
702
+ /**
703
+ * @param {Event[]} events
704
+ * @param {HebrewCalendar.Options} options
705
+ * @return {string}
706
+ */
707
+
708
+ function eventsToRss2(events, options) {
709
+ options.dayFormat = new Intl.DateTimeFormat('en-US', {
680
710
  weekday: 'long',
681
711
  day: '2-digit',
682
712
  month: 'long',
683
713
  year: 'numeric'
684
714
  });
685
- const mainUrlEsc = appendIsraelAndTracking(mainUrl, location.getIsrael(), 'shabbat1c', 'rss').replace(/&/g, '&amp;');
686
- selfUrl = selfUrl.replace(/&/g, '&amp;');
715
+ const location = options.location;
716
+ const mainUrl = options.mainUrl;
717
+ const buildDate = options.buildDate = options.buildDate || new Date();
718
+ const thisYear = buildDate.getFullYear();
719
+ const lastBuildDate = options.lastBuildDate = buildDate.toUTCString();
720
+ const title = options.title || getCalendarTitle(events, options);
721
+ const description = options.description || title;
722
+ const utmSource = options.utmSource || 'shabbat1c';
723
+ const utmMedium = options.utmMedium || 'rss';
724
+ const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), utmSource, utmMedium, options.utmCampaign).replace(/&/g, '&amp;');
725
+ const selfUrlEsc = options.selfUrl.replace(/&/g, '&amp;');
726
+ const lang = options.lang || localeToLg[options.locale] || options.locale || 'en-US';
687
727
  let str = `<?xml version="1.0" encoding="UTF-8"?>
688
728
  <rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:atom="http://www.w3.org/2005/Atom">
689
729
  <channel>
690
730
  <title>${title}</title>
691
731
  <link>${mainUrlEsc}</link>
692
- <atom:link href="${selfUrl}" rel="self" type="application/rss+xml" />
693
- <description>Weekly Shabbat candle lighting times for ${cityDescr}</description>
732
+ <atom:link href="${selfUrlEsc}" rel="self" type="application/rss+xml" />
733
+ <description>${description}</description>
694
734
  <language>${lang}</language>
695
735
  <copyright>Copyright (c) ${thisYear} Michael J. Radwin. All rights reserved.</copyright>
696
736
  <lastBuildDate>${lastBuildDate}</lastBuildDate>
697
737
  `;
698
738
  events.forEach(ev => {
699
- str += eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl);
739
+ str += eventToRssItem2(ev, options);
700
740
  });
701
741
  str += '</channel>\n</rss>\n';
702
742
  return str;
@@ -723,6 +763,16 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
723
763
 
724
764
  return lastBuildDate;
725
765
  }
766
+ /**
767
+ * @param {Event} ev
768
+ * @param {HebrewCalendar.Options} options
769
+ * @return {string}
770
+ */
771
+
772
+
773
+ function eventToRssItem2(ev, options) {
774
+ return eventToRssItem(ev, options.evPubDate, options.lastBuildDate, options.dayFormat, options.location, options.mainUrl, options);
775
+ }
726
776
  /**
727
777
  * @param {Event} ev
728
778
  * @param {boolean} evPubDate
@@ -730,17 +780,19 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
730
780
  * @param {Intl.DateTimeFormat} dayFormat
731
781
  * @param {Location} location
732
782
  * @param {string} mainUrl
783
+ * @param {HebrewCalendar.Options} [options]
733
784
  * @return {string}
734
785
  */
735
786
 
736
-
737
- function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl) {
787
+ function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, options) {
738
788
  let subj = ev.render();
739
789
  const evDate = ev.getDate().greg();
740
790
  const pubDate = getPubDate(ev, evPubDate, evDate, lastBuildDate);
741
791
  const il = location ? location.getIsrael() : false;
742
792
  const tzid = location ? location.getTzid() : 'UTC';
743
- const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl);
793
+ const utmSource = options && options.utmSource || 'shabbat1c';
794
+ const utmMedium = options && options.utmMedium || 'rss';
795
+ const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium);
744
796
  const link = linkGuid[0];
745
797
  const guid = linkGuid[1];
746
798
  const categories = getEventCategories(ev);
@@ -831,4 +883,4 @@ function eventToFullCalendar(ev, tzid, il) {
831
883
  return result;
832
884
  }
833
885
 
834
- export { appendIsraelAndTracking, countryNames, eventToClassicApiObject, eventToCsv, eventToFullCalendar, eventToRssItem, eventsToClassicApi, eventsToCsv, eventsToRss, getCalendarTitle, getDownloadFilename, getEventCategories, getHolidayDescription, holidayDescription, makeAnchor, makeTorahMemoText, pad2, pad4, renderTitleWithoutTime, shouldRenderBrief, timeZoneOffsetStr, toISOString, toISOStringWithTimezone };
886
+ export { appendIsraelAndTracking, countryNames, eventToClassicApiObject, eventToCsv, eventToFullCalendar, eventToRssItem, eventToRssItem2, eventsToClassicApi, eventsToCsv, eventsToRss, eventsToRss2, getCalendarTitle, getDownloadFilename, getEventCategories, getHolidayDescription, holidayDescription, makeAnchor, makeTorahMemoText, pad2, pad4, renderTitleWithoutTime, shouldRenderBrief, timeZoneOffsetStr, toISOString, toISOStringWithTimezone };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/rest-api",
3
- "version": "3.9.0",
3
+ "version": "3.12.0",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal"
@@ -21,8 +21,8 @@
21
21
  "url": "https://github.com/hebcal/hebcal-rest-api/issues"
22
22
  },
23
23
  "dependencies": {
24
- "@hebcal/core": "^3.29.1",
25
- "@hebcal/leyning": "^4.10.2"
24
+ "@hebcal/core": "^3.33.1",
25
+ "@hebcal/leyning": "^4.12.1"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "rollup -c",
@@ -51,20 +51,20 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@ava/babel": "^2.0.0",
54
- "@babel/core": "^7.16.0",
55
- "@babel/preset-env": "^7.16.0",
56
- "@babel/register": "^7.16.0",
54
+ "@babel/core": "^7.16.10",
55
+ "@babel/preset-env": "^7.16.11",
56
+ "@babel/register": "^7.16.9",
57
57
  "@rollup/plugin-babel": "^5.3.0",
58
58
  "@rollup/plugin-commonjs": "^21.0.1",
59
59
  "@rollup/plugin-json": "^4.1.0",
60
- "@rollup/plugin-node-resolve": "^13.0.6",
60
+ "@rollup/plugin-node-resolve": "^13.1.3",
61
61
  "ava": "^3.15.0",
62
- "core-js": "^3.19.1",
63
- "eslint": "^8.2.0",
62
+ "core-js": "^3.20.3",
63
+ "eslint": "^8.7.0",
64
64
  "eslint-config-google": "^0.14.0",
65
65
  "jsdoc": "^3.6.7",
66
66
  "jsdoc-to-markdown": "^7.1.0",
67
- "rollup": "^2.59.0",
67
+ "rollup": "^2.64.0",
68
68
  "rollup-plugin-terser": "^7.0.2"
69
69
  }
70
70
  }
package/rest-api.d.ts CHANGED
@@ -39,7 +39,9 @@ declare module '@hebcal/rest-api' {
39
39
  * @param [evPubDate] - if true, use event time as pubDate (false uses lastBuildDate)
40
40
  */
41
41
  export function eventsToRss(events: Event[], location: Location, mainUrl: string, selfUrl: string, lang?: string, evPubDate?: boolean): string;
42
- export function eventToRssItem(ev: Event, evPubDate: boolean, lastBuildDate: string, dayFormat: Intl.DateTimeFormat, location: Location, baseUrl: string): string;
42
+ export function eventsToRss2(events: Event[], options: HebrewCalendar.Options): string;
43
+ export function eventToRssItem(ev: Event, evPubDate: boolean, lastBuildDate: string, dayFormat: Intl.DateTimeFormat, location: Location, baseUrl: string, options?: HebrewCalendar.Options): string;
44
+ export function eventToRssItem2(ev: Event, options: HebrewCalendar.Options): string;
43
45
  export function getDownloadFilename(options: HebrewCalendar.Options): string;
44
46
  export function pad2(number: number): string;
45
47
  export function pad4(number: number): string;