@js-joda/timezone 2.10.0 → 2.11.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.
@@ -1,4 +1,4 @@
1
- //! @version @js-joda/timezone-2.10.0
1
+ //! @version @js-joda/timezone-2.11.0
2
2
  //! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
3
3
  //! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
4
4
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -111,28 +111,10 @@ __webpack_require__.r(__webpack_exports__);
111
111
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MomentZoneRules", function() { return MomentZoneRules; });
112
112
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
113
113
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
114
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
115
-
116
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
117
-
118
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
119
-
120
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
121
-
122
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
114
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
123
115
 
124
116
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
125
117
 
126
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
127
-
128
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
129
-
130
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
131
-
132
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
133
-
134
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
135
-
136
118
  /*
137
119
  * @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
138
120
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -140,215 +122,188 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
140
122
  */
141
123
 
142
124
  var MomentZoneRules = function (_ZoneRules) {
143
- _inherits(MomentZoneRules, _ZoneRules);
144
-
145
- var _super = _createSuper(MomentZoneRules);
125
+ _inheritsLoose(MomentZoneRules, _ZoneRules);
146
126
 
147
127
  function MomentZoneRules(tzdbInfo) {
148
128
  var _this;
149
129
 
150
- _classCallCheck(this, MomentZoneRules);
151
-
152
- _this = _super.call(this);
130
+ _this = _ZoneRules.call(this) || this;
153
131
  _this._tzdbInfo = tzdbInfo;
154
132
  _this._ldtUntils = new LDTUntils(_this._tzdbInfo.untils, _this._tzdbInfo.offsets);
155
133
  return _this;
156
134
  }
157
135
 
158
- _createClass(MomentZoneRules, [{
159
- key: "isFixedOffset",
160
- value: function isFixedOffset() {
161
- return this._tzdbInfo.offsets.length === 1;
136
+ var _proto = MomentZoneRules.prototype;
137
+
138
+ _proto.isFixedOffset = function isFixedOffset() {
139
+ return this._tzdbInfo.offsets.length === 1;
140
+ };
141
+
142
+ _proto.offsetOfInstant = function offsetOfInstant(instant) {
143
+ var epochMilli = instant.toEpochMilli();
144
+ return this.offsetOfEpochMilli(epochMilli);
145
+ };
146
+
147
+ _proto.offsetOfEpochMilli = function offsetOfEpochMilli(epochMilli) {
148
+ var index = binarySearch(this._tzdbInfo.untils, epochMilli);
149
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(index));
150
+ };
151
+
152
+ _proto.offsetOfLocalDateTime = function offsetOfLocalDateTime(localDateTime) {
153
+ var info = this._offsetInfo(localDateTime);
154
+
155
+ if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
156
+ return info.offsetBefore();
162
157
  }
163
- }, {
164
- key: "offsetOfInstant",
165
- value: function offsetOfInstant(instant) {
166
- var epochMilli = instant.toEpochMilli();
167
- return this.offsetOfEpochMilli(epochMilli);
158
+
159
+ return info;
160
+ };
161
+
162
+ _proto._offsetInfo = function _offsetInfo(localDateTime) {
163
+ var index = ldtBinarySearch(this._ldtUntils, localDateTime);
164
+ var offsetIndex = index >> 1;
165
+
166
+ if (index % 2 === 1) {
167
+ var ldtBefore = this._ldtUntils.get(Math.max(index - 1, 0));
168
+
169
+ var ldtAfter = this._ldtUntils.get(Math.min(index, this._ldtUntils.size - 1));
170
+
171
+ var offsetBefore = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
172
+ var offsetAfter = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(Math.min(offsetIndex + 1, this._tzdbInfo.offsets.length - 1)));
173
+
174
+ if (offsetBefore.compareTo(offsetAfter) > 0) {
175
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"].of(ldtBefore, offsetBefore, offsetAfter);
176
+ } else {
177
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"].of(ldtAfter, offsetBefore, offsetAfter);
178
+ }
168
179
  }
169
- }, {
170
- key: "offsetOfEpochMilli",
171
- value: function offsetOfEpochMilli(epochMilli) {
172
- var index = binarySearch(this._tzdbInfo.untils, epochMilli);
173
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(index));
180
+
181
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
182
+ };
183
+
184
+ _proto._offsetByIndexInSeconds = function _offsetByIndexInSeconds(index) {
185
+ return -offsetInSeconds(this._tzdbInfo.offsets[index]);
186
+ };
187
+
188
+ _proto.validOffsets = function validOffsets(localDateTime) {
189
+ var info = this._offsetInfo(localDateTime);
190
+
191
+ if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
192
+ return info.validOffsets();
174
193
  }
175
- }, {
176
- key: "offsetOfLocalDateTime",
177
- value: function offsetOfLocalDateTime(localDateTime) {
178
- var info = this._offsetInfo(localDateTime);
179
194
 
180
- if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
181
- return info.offsetBefore();
182
- }
195
+ return [info];
196
+ };
183
197
 
198
+ _proto.transition = function transition(localDateTime) {
199
+ var info = this._offsetInfo(localDateTime);
200
+
201
+ if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
184
202
  return info;
185
203
  }
186
- }, {
187
- key: "_offsetInfo",
188
- value: function _offsetInfo(localDateTime) {
189
- var index = ldtBinarySearch(this._ldtUntils, localDateTime);
190
- var offsetIndex = index >> 1;
191
204
 
192
- if (index % 2 === 1) {
193
- var ldtBefore = this._ldtUntils.get(Math.max(index - 1, 0));
205
+ return null;
206
+ };
194
207
 
195
- var ldtAfter = this._ldtUntils.get(Math.min(index, this._ldtUntils.size - 1));
208
+ _proto.standardOffset = function standardOffset(instant) {
209
+ notSupported('ZoneRules.standardOffset');
210
+ };
196
211
 
197
- var offsetBefore = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
198
- var offsetAfter = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(Math.min(offsetIndex + 1, this._tzdbInfo.offsets.length - 1)));
212
+ _proto.daylightSavings = function daylightSavings(instant) {
213
+ notSupported('ZoneRules.daylightSavings');
214
+ };
199
215
 
200
- if (offsetBefore.compareTo(offsetAfter) > 0) {
201
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"].of(ldtBefore, offsetBefore, offsetAfter);
202
- } else {
203
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"].of(ldtAfter, offsetBefore, offsetAfter);
204
- }
205
- }
216
+ _proto.isDaylightSavings = function isDaylightSavings(instant) {
217
+ notSupported('ZoneRules.isDaylightSavings');
218
+ };
206
219
 
207
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
208
- }
209
- }, {
210
- key: "_offsetByIndexInSeconds",
211
- value: function _offsetByIndexInSeconds(index) {
212
- return -offsetInSeconds(this._tzdbInfo.offsets[index]);
213
- }
214
- }, {
215
- key: "validOffsets",
216
- value: function validOffsets(localDateTime) {
217
- var info = this._offsetInfo(localDateTime);
220
+ _proto.isValidOffset = function isValidOffset(localDateTime, offset) {
221
+ return this.validOffsets(localDateTime).some(function (o) {
222
+ return o.equals(offset);
223
+ });
224
+ };
218
225
 
219
- if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
220
- return info.validOffsets();
221
- }
226
+ _proto.nextTransition = function nextTransition(instant) {
227
+ notSupported('ZoneRules.nextTransition');
228
+ };
222
229
 
223
- return [info];
224
- }
225
- }, {
226
- key: "transition",
227
- value: function transition(localDateTime) {
228
- var info = this._offsetInfo(localDateTime);
230
+ _proto.previousTransition = function previousTransition(instant) {
231
+ notSupported('ZoneRules.previousTransition');
232
+ };
229
233
 
230
- if (info instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffsetTransition"]) {
231
- return info;
232
- }
234
+ _proto.transitions = function transitions() {
235
+ notSupported('ZoneRules.transitions');
236
+ };
233
237
 
234
- return null;
235
- }
236
- }, {
237
- key: "standardOffset",
238
- value: function standardOffset(instant) {
239
- notSupported('ZoneRules.standardOffset');
240
- }
241
- }, {
242
- key: "daylightSavings",
243
- value: function daylightSavings(instant) {
244
- notSupported('ZoneRules.daylightSavings');
245
- }
246
- }, {
247
- key: "isDaylightSavings",
248
- value: function isDaylightSavings(instant) {
249
- notSupported('ZoneRules.isDaylightSavings');
250
- }
251
- }, {
252
- key: "isValidOffset",
253
- value: function isValidOffset(localDateTime, offset) {
254
- return this.validOffsets(localDateTime).some(function (o) {
255
- return o.equals(offset);
256
- });
257
- }
258
- }, {
259
- key: "nextTransition",
260
- value: function nextTransition(instant) {
261
- notSupported('ZoneRules.nextTransition');
262
- }
263
- }, {
264
- key: "previousTransition",
265
- value: function previousTransition(instant) {
266
- notSupported('ZoneRules.previousTransition');
267
- }
268
- }, {
269
- key: "transitions",
270
- value: function transitions() {
271
- notSupported('ZoneRules.transitions');
238
+ _proto.transitionRules = function transitionRules() {
239
+ notSupported('ZoneRules.transitionRules');
240
+ };
241
+
242
+ _proto.equals = function equals(other) {
243
+ if (this === other) {
244
+ return true;
272
245
  }
273
- }, {
274
- key: "transitionRules",
275
- value: function transitionRules() {
276
- notSupported('ZoneRules.transitionRules');
246
+
247
+ if (other instanceof MomentZoneRules) {
248
+ return this._tzdbInfo === other._tzdbInfo;
277
249
  }
278
- }, {
279
- key: "equals",
280
- value: function equals(other) {
281
- if (this === other) {
282
- return true;
283
- }
284
250
 
285
- if (other instanceof MomentZoneRules) {
286
- return this._tzdbInfo === other._tzdbInfo;
287
- }
251
+ return false;
252
+ };
288
253
 
289
- return false;
290
- }
291
- }, {
292
- key: "toString",
293
- value: function toString() {
294
- return this._tzdbInfo.name;
295
- }
296
- }]);
254
+ _proto.toString = function toString() {
255
+ return this._tzdbInfo.name;
256
+ };
297
257
 
298
258
  return MomentZoneRules;
299
259
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRules"]);
300
260
 
301
261
  var LDTUntils = function () {
302
262
  function LDTUntils(_tzdbUntils, tzdbOffsets) {
303
- _classCallCheck(this, LDTUntils);
304
-
305
263
  this._tzdbUntils = _tzdbUntils;
306
264
  this._tzdbOffsets = tzdbOffsets;
307
265
  this._ldtUntils = [];
308
266
  this.size = this._tzdbUntils.length * 2;
309
267
  }
310
268
 
311
- _createClass(LDTUntils, [{
312
- key: "_generateTupple",
313
- value: function _generateTupple(index) {
314
- var epochMillis = this._tzdbUntils[index];
269
+ var _proto2 = LDTUntils.prototype;
315
270
 
316
- if (epochMillis === Infinity) {
317
- return [_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].MAX, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].MAX];
318
- }
271
+ _proto2._generateTupple = function _generateTupple(index) {
272
+ var epochMillis = this._tzdbUntils[index];
319
273
 
320
- var instant = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Instant"].ofEpochMilli(epochMillis);
321
- var offset1 = offsetInSeconds(this._tzdbOffsets[index]);
322
- var zone1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset1);
323
- var ldt1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone1);
324
- var nextIndex = Math.min(index + 1, this._tzdbOffsets.length - 1);
325
- var offset2 = offsetInSeconds(this._tzdbOffsets[nextIndex]);
326
- var zone2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset2);
327
- var ldt2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone2);
328
-
329
- if (offset1 > offset2) {
330
- return [ldt1, ldt2];
331
- } else {
332
- return [ldt2, ldt1];
333
- }
274
+ if (epochMillis === Infinity) {
275
+ return [_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].MAX, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].MAX];
334
276
  }
335
- }, {
336
- key: "_getTupple",
337
- value: function _getTupple(index) {
338
- if (this._ldtUntils[index] == null) {
339
- this._ldtUntils[index] = this._generateTupple(index);
340
- }
341
277
 
342
- return this._ldtUntils[index];
278
+ var instant = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Instant"].ofEpochMilli(epochMillis);
279
+ var offset1 = offsetInSeconds(this._tzdbOffsets[index]);
280
+ var zone1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset1);
281
+ var ldt1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone1);
282
+ var nextIndex = Math.min(index + 1, this._tzdbOffsets.length - 1);
283
+ var offset2 = offsetInSeconds(this._tzdbOffsets[nextIndex]);
284
+ var zone2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset2);
285
+ var ldt2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone2);
286
+
287
+ if (offset1 > offset2) {
288
+ return [ldt1, ldt2];
289
+ } else {
290
+ return [ldt2, ldt1];
343
291
  }
344
- }, {
345
- key: "get",
346
- value: function get(index) {
347
- var ldtTupple = this._getTupple(index >> 1);
292
+ };
348
293
 
349
- return ldtTupple[index % 2];
294
+ _proto2._getTupple = function _getTupple(index) {
295
+ if (this._ldtUntils[index] == null) {
296
+ this._ldtUntils[index] = this._generateTupple(index);
350
297
  }
351
- }]);
298
+
299
+ return this._ldtUntils[index];
300
+ };
301
+
302
+ _proto2.get = function get(index) {
303
+ var ldtTupple = this._getTupple(index >> 1);
304
+
305
+ return ldtTupple[index % 2];
306
+ };
352
307
 
353
308
  return LDTUntils;
354
309
  }();
@@ -398,7 +353,7 @@ function binarySearch(array, value) {
398
353
  }
399
354
 
400
355
  function notSupported(msg) {
401
- throw new Error("not supported: ".concat(msg));
356
+ throw new Error("not supported: " + msg);
402
357
  }
403
358
 
404
359
  /***/ }),
@@ -417,34 +372,16 @@ __webpack_require__.r(__webpack_exports__);
417
372
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
418
373
  /* harmony import */ var _MomentZoneRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MomentZoneRules */ "./src/MomentZoneRules.js");
419
374
  /* harmony import */ var _unpack__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unpack */ "./src/unpack.js");
420
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
421
-
422
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
375
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
423
376
 
424
377
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
425
378
 
426
379
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
427
380
 
428
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
429
-
430
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
431
-
432
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
433
-
434
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
381
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
435
382
 
436
383
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
437
384
 
438
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
439
-
440
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
441
-
442
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
443
-
444
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
445
-
446
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
447
-
448
385
  /*
449
386
  * @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
450
387
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -459,82 +396,53 @@ var AVAILABLE_ZONE_IDS = [];
459
396
  var zones = {};
460
397
  var links = {};
461
398
  var MomentZoneRulesProvider = function (_ZoneRulesProvider) {
462
- _inherits(MomentZoneRulesProvider, _ZoneRulesProvider);
463
-
464
- var _super = _createSuper(MomentZoneRulesProvider);
399
+ _inheritsLoose(MomentZoneRulesProvider, _ZoneRulesProvider);
465
400
 
466
401
  function MomentZoneRulesProvider() {
467
- _classCallCheck(this, MomentZoneRulesProvider);
468
-
469
- return _super.apply(this, arguments);
402
+ return _ZoneRulesProvider.apply(this, arguments) || this;
470
403
  }
471
404
 
472
- _createClass(MomentZoneRulesProvider, null, [{
473
- key: "getRules",
474
- value: function getRules(zoneId) {
475
- var tzdbZoneInfo = zones[links[zoneId]];
476
-
477
- if (tzdbZoneInfo == null) {
478
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]("Unknown time-zone ID: ".concat(zoneId));
479
- }
405
+ MomentZoneRulesProvider.getRules = function getRules(zoneId) {
406
+ var tzdbZoneInfo = zones[links[zoneId]];
480
407
 
481
- return new _MomentZoneRules__WEBPACK_IMPORTED_MODULE_1__["MomentZoneRules"](tzdbZoneInfo);
482
- }
483
- }, {
484
- key: "getAvailableZoneIds",
485
- value: function getAvailableZoneIds() {
486
- return AVAILABLE_ZONE_IDS;
487
- }
488
- }, {
489
- key: "getVersion",
490
- value: function getVersion() {
491
- return TZDB_VERSION;
408
+ if (tzdbZoneInfo == null) {
409
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]("Unknown time-zone ID: " + zoneId);
492
410
  }
493
- }, {
494
- key: "getTzdbData",
495
- value: function getTzdbData() {
496
- return TZDB_DATA;
411
+
412
+ return new _MomentZoneRules__WEBPACK_IMPORTED_MODULE_1__["MomentZoneRules"](tzdbZoneInfo);
413
+ };
414
+
415
+ MomentZoneRulesProvider.getAvailableZoneIds = function getAvailableZoneIds() {
416
+ return AVAILABLE_ZONE_IDS;
417
+ };
418
+
419
+ MomentZoneRulesProvider.getVersion = function getVersion() {
420
+ return TZDB_VERSION;
421
+ };
422
+
423
+ MomentZoneRulesProvider.getTzdbData = function getTzdbData() {
424
+ return TZDB_DATA;
425
+ };
426
+
427
+ MomentZoneRulesProvider.loadTzdbData = function loadTzdbData(packedJson) {
428
+ TZDB_DATA = packedJson;
429
+ TZDB_VERSION = packedJson.version;
430
+
431
+ for (var _iterator = _createForOfIteratorHelperLoose(packedJson.zones), _step; !(_step = _iterator()).done;) {
432
+ var packedZoneInfo = _step.value;
433
+ var tzdbZoneInfo = Object(_unpack__WEBPACK_IMPORTED_MODULE_2__["unpack"])(packedZoneInfo);
434
+ AVAILABLE_ZONE_IDS.push(tzdbZoneInfo.name);
435
+ zones[tzdbZoneInfo.name] = tzdbZoneInfo;
436
+ links[tzdbZoneInfo.name] = tzdbZoneInfo.name;
497
437
  }
498
- }, {
499
- key: "loadTzdbData",
500
- value: function loadTzdbData(packedJson) {
501
- TZDB_DATA = packedJson;
502
- TZDB_VERSION = packedJson.version;
503
-
504
- var _iterator = _createForOfIteratorHelper(packedJson.zones),
505
- _step;
506
-
507
- try {
508
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
509
- var packedZoneInfo = _step.value;
510
- var tzdbZoneInfo = Object(_unpack__WEBPACK_IMPORTED_MODULE_2__["unpack"])(packedZoneInfo);
511
- AVAILABLE_ZONE_IDS.push(tzdbZoneInfo.name);
512
- zones[tzdbZoneInfo.name] = tzdbZoneInfo;
513
- links[tzdbZoneInfo.name] = tzdbZoneInfo.name;
514
- }
515
- } catch (err) {
516
- _iterator.e(err);
517
- } finally {
518
- _iterator.f();
519
- }
520
438
 
521
- var _iterator2 = _createForOfIteratorHelper(packedJson.links),
522
- _step2;
523
-
524
- try {
525
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
526
- var packedLink = _step2.value;
527
- var link = packedLink.split('|');
528
- AVAILABLE_ZONE_IDS.push(link[1]);
529
- links[link[1]] = link[0];
530
- }
531
- } catch (err) {
532
- _iterator2.e(err);
533
- } finally {
534
- _iterator2.f();
535
- }
439
+ for (var _iterator2 = _createForOfIteratorHelperLoose(packedJson.links), _step2; !(_step2 = _iterator2()).done;) {
440
+ var packedLink = _step2.value;
441
+ var link = packedLink.split('|');
442
+ AVAILABLE_ZONE_IDS.push(link[1]);
443
+ links[link[1]] = link[0];
536
444
  }
537
- }]);
445
+ };
538
446
 
539
447
  return MomentZoneRulesProvider;
540
448
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"]);