@js-joda/locale 4.2.1 → 4.6.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/js-joda-locale.esm.js +1823 -0
  3. package/dist/js-joda-locale.js +1095 -1297
  4. package/dist/js-joda-locale.js.map +1 -1
  5. package/dist/js-joda-locale.min.js +9 -36
  6. package/dist/prebuilt/de/index.js +1105 -1307
  7. package/dist/prebuilt/de/index.js.map +1 -1
  8. package/dist/prebuilt/de-de/index.js +1105 -1307
  9. package/dist/prebuilt/de-de/index.js.map +1 -1
  10. package/dist/prebuilt/en/index.js +1106 -1308
  11. package/dist/prebuilt/en/index.js.map +1 -1
  12. package/dist/prebuilt/en-us/index.js +1105 -1307
  13. package/dist/prebuilt/en-us/index.js.map +1 -1
  14. package/dist/prebuilt/es/index.js +1106 -1308
  15. package/dist/prebuilt/es/index.js.map +1 -1
  16. package/dist/prebuilt/fr/index.js +1106 -1308
  17. package/dist/prebuilt/fr/index.js.map +1 -1
  18. package/dist/prebuilt/fr-fr/index.js +1105 -1307
  19. package/dist/prebuilt/fr-fr/index.js.map +1 -1
  20. package/dist/prebuilt/hi/index.js +1105 -1307
  21. package/dist/prebuilt/hi/index.js.map +1 -1
  22. package/dist/prebuilt/it/index.js +1105 -1307
  23. package/dist/prebuilt/it/index.js.map +1 -1
  24. package/dist/prebuilt/it-it/index.js +1105 -1307
  25. package/dist/prebuilt/it-it/index.js.map +1 -1
  26. package/dist/prebuilt/ja/index.js +1105 -1307
  27. package/dist/prebuilt/ja/index.js.map +1 -1
  28. package/dist/prebuilt/ja-jp/index.js +1105 -1307
  29. package/dist/prebuilt/ja-jp/index.js.map +1 -1
  30. package/dist/prebuilt/ko/index.js +1105 -1307
  31. package/dist/prebuilt/ko/index.js.map +1 -1
  32. package/dist/prebuilt/ro/index.js +1105 -1307
  33. package/dist/prebuilt/ro/index.js.map +1 -1
  34. package/dist/prebuilt/ru/index.js +4035 -0
  35. package/dist/prebuilt/ru/index.js.map +1 -0
  36. package/dist/prebuilt/sv/index.js +1105 -1307
  37. package/dist/prebuilt/sv/index.js.map +1 -1
  38. package/dist/prebuilt/sv-se/index.js +1105 -1307
  39. package/dist/prebuilt/sv-se/index.js.map +1 -1
  40. package/dist/prebuilt/zh/index.js +1105 -1307
  41. package/dist/prebuilt/zh/index.js.map +1 -1
  42. package/package.json +24 -17
  43. package/src/Locale.js +8 -0
  44. package/src/js-joda-locale.js +3 -1
  45. package/{dist → typings}/js-joda-locale.d.ts +28 -2
  46. package/.babelrc +0 -24
  47. package/build_package.default.json +0 -14
  48. package/build_package.prebuilt.json +0 -66
  49. package/examples/usage_browser.html +0 -111
  50. package/examples/usage_browser_build.html +0 -72
  51. package/examples/usage_es6.js +0 -15
  52. package/examples/usage_node.js +0 -38
  53. package/examples/usage_node_build.js +0 -48
  54. package/utils/CldrDataIgnorePlugin.js +0 -57
  55. package/utils/README_package.template.md +0 -13
  56. package/utils/buildWebpackConfig.js +0 -28
  57. package/utils/build_package.js +0 -170
  58. package/utils/create_packages.js +0 -136
  59. package/utils/load_cldrData.prebuilt.js +0 -18
  60. package/utils/publish_release.js +0 -151
  61. package/webpack.config.js +0 -88
@@ -1,4 +1,4 @@
1
- //! @version @js-joda/locale - 4.2.1
1
+ //! @version @js-joda/locale - 4.6.0
2
2
  //! @copyright (c) 2015-2016, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
3
3
  //! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4
4
  //! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
@@ -113,12 +113,6 @@ __webpack_require__.r(__webpack_exports__);
113
113
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Locale; });
114
114
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_init", function() { return _init; });
115
115
  /* harmony import */ var _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format/cldr/CldrDateTimeTextProvider */ "./src/format/cldr/CldrDateTimeTextProvider.js");
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
116
  /*
123
117
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
124
118
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -126,64 +120,61 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
126
120
 
127
121
 
128
122
  var Locale = function () {
129
- function Locale(language) {
130
- var country = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
131
- var localeString = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
123
+ Locale.getAvailableLocales = function getAvailableLocales() {
124
+ return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
125
+ };
132
126
 
133
- _classCallCheck(this, Locale);
127
+ function Locale(language, country, localeString) {
128
+ if (country === void 0) {
129
+ country = '';
130
+ }
131
+
132
+ if (localeString === void 0) {
133
+ localeString = '';
134
+ }
134
135
 
135
136
  this._language = language;
136
137
  this._country = country;
137
138
  this._localeString = localeString;
138
139
  }
139
140
 
140
- _createClass(Locale, [{
141
- key: "language",
142
- value: function language() {
143
- return this._language;
144
- }
145
- }, {
146
- key: "country",
147
- value: function country() {
148
- return this._country;
149
- }
150
- }, {
151
- key: "localeString",
152
- value: function localeString() {
153
- if (this._localeString.length > 0) {
154
- return this._localeString;
155
- }
141
+ var _proto = Locale.prototype;
156
142
 
157
- if (this._country.length > 0) {
158
- return "".concat(this._language, "-").concat(this._country);
159
- } else {
160
- return this._language;
161
- }
143
+ _proto.language = function language() {
144
+ return this._language;
145
+ };
146
+
147
+ _proto.country = function country() {
148
+ return this._country;
149
+ };
150
+
151
+ _proto.localeString = function localeString() {
152
+ if (this._localeString.length > 0) {
153
+ return this._localeString;
162
154
  }
163
- }, {
164
- key: "toString",
165
- value: function toString() {
166
- return "Locale[".concat(this.localeString(), "]");
155
+
156
+ if (this._country.length > 0) {
157
+ return this._language + "-" + this._country;
158
+ } else {
159
+ return this._language;
167
160
  }
168
- }, {
169
- key: "equals",
170
- value: function equals(other) {
171
- if (!other) {
172
- return false;
173
- }
161
+ };
174
162
 
175
- if (!(other instanceof Locale)) {
176
- return false;
177
- }
163
+ _proto.toString = function toString() {
164
+ return "Locale[" + this.localeString() + "]";
165
+ };
178
166
 
179
- return this.localeString() === other.localeString();
167
+ _proto.equals = function equals(other) {
168
+ if (!other) {
169
+ return false;
180
170
  }
181
- }], [{
182
- key: "getAvailableLocales",
183
- value: function getAvailableLocales() {
184
- return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
171
+
172
+ if (!(other instanceof Locale)) {
173
+ return false;
185
174
  }
186
- }]);
175
+
176
+ return this.localeString() === other.localeString();
177
+ };
187
178
 
188
179
  return Locale;
189
180
  }();
@@ -201,6 +192,14 @@ function _init() {
201
192
  Locale.KOREAN = new Locale('ko');
202
193
  Locale.JAPANESE = new Locale('ja', 'JP');
203
194
  Locale.JAPAN = new Locale('ja', 'JP', 'ja');
195
+ Locale.ITALIAN = new Locale('it');
196
+ Locale.ITALY = new Locale('it', 'IT', 'it');
197
+ Locale.CHINESE = new Locale('zh');
198
+ Locale.ROMANIAN = new Locale('ro');
199
+ Locale.SWEDISH = new Locale('sv');
200
+ Locale.SWEDEN = new Locale('sv', 'SE', 'sv');
201
+ Locale.HINDI = new Locale('hi');
202
+ Locale.RUSSIAN = new Locale('ru');
204
203
  }
205
204
 
206
205
  /***/ }),
@@ -256,28 +255,10 @@ __webpack_require__.r(__webpack_exports__);
256
255
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
257
256
  /* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locale */ "./src/Locale.js");
258
257
  /* harmony import */ var _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cldr/CldrDateTimeFormatterBuilder */ "./src/format/cldr/CldrDateTimeFormatterBuilder.js");
259
- 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); }
260
-
261
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
262
-
263
- 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); } }
264
-
265
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
266
-
267
- 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); }
258
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
268
259
 
269
260
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
270
261
 
271
- 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); }; }
272
-
273
- 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); }
274
-
275
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
276
-
277
- 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; } }
278
-
279
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
280
-
281
262
  /*
282
263
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
283
264
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -288,28 +269,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
288
269
  var requireNonNull = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].assert.requireNonNull;
289
270
 
290
271
  var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
291
- _inherits(LocaleDateTimeFormatter, _DateTimeFormatter);
292
-
293
- var _super = _createSuper(LocaleDateTimeFormatter);
272
+ _inheritsLoose(LocaleDateTimeFormatter, _DateTimeFormatter);
294
273
 
295
274
  function LocaleDateTimeFormatter() {
296
- _classCallCheck(this, LocaleDateTimeFormatter);
297
-
298
- return _super.apply(this, arguments);
275
+ return _DateTimeFormatter.apply(this, arguments) || this;
299
276
  }
300
277
 
301
- _createClass(LocaleDateTimeFormatter, [{
302
- key: "withLocale",
303
- value: function withLocale(locale) {
304
- requireNonNull(locale, 'locale');
278
+ var _proto = LocaleDateTimeFormatter.prototype;
305
279
 
306
- if (locale.equals(this._locale)) {
307
- return this;
308
- }
280
+ _proto.withLocale = function withLocale(locale) {
281
+ requireNonNull(locale, 'locale');
309
282
 
310
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
283
+ if (locale.equals(this._locale)) {
284
+ return this;
311
285
  }
312
- }]);
286
+
287
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
288
+ };
313
289
 
314
290
  return LocaleDateTimeFormatter;
315
291
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"]);
@@ -355,12 +331,6 @@ function _init() {
355
331
  __webpack_require__.r(__webpack_exports__);
356
332
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEntry", function() { return createEntry; });
357
333
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleStore", function() { return LocaleStore; });
358
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
359
-
360
- 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); } }
361
-
362
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
363
-
364
334
  /*
365
335
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
366
336
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -370,7 +340,7 @@ var createEntry = function createEntry(text, field) {
370
340
  key: text,
371
341
  value: field,
372
342
  toString: function toString() {
373
- return "".concat(text, "->").concat(field);
343
+ return text + "->" + field;
374
344
  }
375
345
  };
376
346
  };
@@ -381,8 +351,6 @@ var _comparator = function _comparator(obj1, obj2) {
381
351
 
382
352
  var LocaleStore = function () {
383
353
  function LocaleStore(valueTextMap) {
384
- _classCallCheck(this, LocaleStore);
385
-
386
354
  this._valueTextMap = valueTextMap;
387
355
  var map = {};
388
356
  var allList = [];
@@ -406,19 +374,17 @@ var LocaleStore = function () {
406
374
  this._parsable = map;
407
375
  }
408
376
 
409
- _createClass(LocaleStore, [{
410
- key: "getText",
411
- value: function getText(value, style) {
412
- var map = this._valueTextMap[style];
413
- return map != null ? map[value] : null;
414
- }
415
- }, {
416
- key: "getTextIterator",
417
- value: function getTextIterator(style) {
418
- var list = this._parsable[style];
419
- return list != null ? list[Symbol.iterator]() : null;
420
- }
421
- }]);
377
+ var _proto = LocaleStore.prototype;
378
+
379
+ _proto.getText = function getText(value, style) {
380
+ var map = this._valueTextMap[style];
381
+ return map != null ? map[value] : null;
382
+ };
383
+
384
+ _proto.getTextIterator = function getTextIterator(style) {
385
+ var list = this._parsable[style];
386
+ return list != null ? list[Symbol.iterator]() : null;
387
+ };
422
388
 
423
389
  return LocaleStore;
424
390
  }();
@@ -501,28 +467,10 @@ __webpack_require__.r(__webpack_exports__);
501
467
  /* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
502
468
  /* harmony import */ var _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser/LocalizedOffsetPrinterParser */ "./src/format/parser/LocalizedOffsetPrinterParser.js");
503
469
  /* harmony import */ var _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../parser/WeekFieldsPrinterParser */ "./src/format/parser/WeekFieldsPrinterParser.js");
504
- 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); }
505
-
506
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
507
-
508
- 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); } }
509
-
510
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
511
-
512
- 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); }
470
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
513
471
 
514
472
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
515
473
 
516
- 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); }; }
517
-
518
- 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); }
519
-
520
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
521
-
522
- 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; } }
523
-
524
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
525
-
526
474
  /**
527
475
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
528
476
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -540,98 +488,87 @@ var _jodaInternal$assert = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].asser
540
488
  requireInstance = _jodaInternal$assert.requireInstance;
541
489
 
542
490
  var CldrDateTimeFormatterBuilder = function (_DateTimeFormatterBui) {
543
- _inherits(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
544
-
545
- var _super = _createSuper(CldrDateTimeFormatterBuilder);
491
+ _inheritsLoose(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
546
492
 
547
493
  function CldrDateTimeFormatterBuilder() {
548
- _classCallCheck(this, CldrDateTimeFormatterBuilder);
549
-
550
- return _super.apply(this, arguments);
494
+ return _DateTimeFormatterBui.apply(this, arguments) || this;
551
495
  }
552
496
 
553
- _createClass(CldrDateTimeFormatterBuilder, [{
554
- key: "appendText",
555
- value: function appendText(field, styleOrMap) {
556
- if (styleOrMap === undefined) {
557
- return this.appendTextField(field);
558
- } else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
559
- return this.appendTextFieldStyle(field, styleOrMap);
560
- } else {
561
- return this.appendTextFieldMap(field, styleOrMap);
562
- }
563
- }
564
- }, {
565
- key: "appendTextField",
566
- value: function appendTextField(field) {
567
- return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
497
+ var _proto = CldrDateTimeFormatterBuilder.prototype;
498
+
499
+ _proto.appendText = function appendText(field, styleOrMap) {
500
+ if (styleOrMap === undefined) {
501
+ return this.appendTextField(field);
502
+ } else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
503
+ return this.appendTextFieldStyle(field, styleOrMap);
504
+ } else {
505
+ return this.appendTextFieldMap(field, styleOrMap);
568
506
  }
569
- }, {
570
- key: "appendTextFieldStyle",
571
- value: function appendTextFieldStyle(field, textStyle) {
572
- requireNonNull(field, 'field');
573
- requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
574
- requireNonNull(textStyle, 'textStyle');
575
- requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
507
+ };
576
508
 
577
- this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
509
+ _proto.appendTextField = function appendTextField(field) {
510
+ return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
511
+ };
578
512
 
579
- return this;
580
- }
581
- }, {
582
- key: "appendTextFieldMap",
583
- value: function appendTextFieldMap(field, textLookup) {
584
- requireNonNull(field, 'field');
585
- requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
586
- requireNonNull(textLookup, 'textLookup');
587
- var copy = Object.assign({}, textLookup);
588
- var map = {};
589
- map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
590
- var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
591
- var provider = {
592
- getText: function getText(field, value, style) {
593
- return store.getText(value, style);
594
- },
595
- getTextIterator: function getTextIterator(field, style) {
596
- return store.getTextIterator(style);
597
- }
598
- };
513
+ _proto.appendTextFieldStyle = function appendTextFieldStyle(field, textStyle) {
514
+ requireNonNull(field, 'field');
515
+ requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
516
+ requireNonNull(textStyle, 'textStyle');
517
+ requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
599
518
 
600
- this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
519
+ this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
601
520
 
602
- return this;
603
- }
604
- }, {
605
- key: "appendWeekField",
606
- value: function appendWeekField(field, count) {
607
- requireNonNull(field, 'field');
608
- requireNonNull(count, 'count');
521
+ return this;
522
+ };
523
+
524
+ _proto.appendTextFieldMap = function appendTextFieldMap(field, textLookup) {
525
+ requireNonNull(field, 'field');
526
+ requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
527
+ requireNonNull(textLookup, 'textLookup');
528
+ var copy = Object.assign({}, textLookup);
529
+ var map = {};
530
+ map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
531
+ var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
532
+ var provider = {
533
+ getText: function getText(field, value, style) {
534
+ return store.getText(value, style);
535
+ },
536
+ getTextIterator: function getTextIterator(field, style) {
537
+ return store.getTextIterator(style);
538
+ }
539
+ };
609
540
 
610
- this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
541
+ this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
611
542
 
612
- return this;
613
- }
614
- }, {
615
- key: "appendZoneText",
616
- value: function appendZoneText(textStyle) {
617
- this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
543
+ return this;
544
+ };
618
545
 
619
- return this;
620
- }
621
- }, {
622
- key: "appendLocalizedOffset",
623
- value: function appendLocalizedOffset(textStyle) {
624
- requireNonNull(textStyle, 'textStyle');
546
+ _proto.appendWeekField = function appendWeekField(field, count) {
547
+ requireNonNull(field, 'field');
548
+ requireNonNull(count, 'count');
625
549
 
626
- if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
627
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
628
- }
550
+ this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
551
+
552
+ return this;
553
+ };
629
554
 
630
- this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
555
+ _proto.appendZoneText = function appendZoneText(textStyle) {
556
+ this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
631
557
 
632
- return this;
558
+ return this;
559
+ };
560
+
561
+ _proto.appendLocalizedOffset = function appendLocalizedOffset(textStyle) {
562
+ requireNonNull(textStyle, 'textStyle');
563
+
564
+ if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
565
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
633
566
  }
634
- }]);
567
+
568
+ this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
569
+
570
+ return this;
571
+ };
635
572
 
636
573
  return CldrDateTimeFormatterBuilder;
637
574
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"]);
@@ -656,12 +593,6 @@ __webpack_require__.r(__webpack_exports__);
656
593
  /* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
657
594
  /* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
658
595
  /* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
659
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
660
-
661
- 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); } }
662
-
663
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
664
-
665
596
  /*
666
597
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
667
598
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -673,218 +604,210 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
673
604
 
674
605
  var CldrDateTimeTextProvider = function () {
675
606
  function CldrDateTimeTextProvider() {
676
- _classCallCheck(this, CldrDateTimeTextProvider);
677
-
678
607
  this._cache = {};
679
608
  Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])('supplemental/likelySubtags.json');
680
609
  }
681
610
 
682
- _createClass(CldrDateTimeTextProvider, [{
683
- key: "getAvailableLocales",
684
- value: function getAvailableLocales() {
685
- if (typeof JS_JODA_LOCALE_AVAILABLE_LOCALES !== 'undefined') {
686
- return JS_JODA_LOCALE_AVAILABLE_LOCALES;
687
- }
611
+ var _proto = CldrDateTimeTextProvider.prototype;
688
612
 
689
- return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
613
+ _proto.getAvailableLocales = function getAvailableLocales() {
614
+ if (typeof JS_JODA_LOCALE_AVAILABLE_LOCALES !== 'undefined') {
615
+ return JS_JODA_LOCALE_AVAILABLE_LOCALES;
690
616
  }
691
- }, {
692
- key: "getText",
693
- value: function getText(field, value, style, locale) {
694
- var store = this._findStore(field, locale);
695
617
 
696
- if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
697
- return store.getText(value, style);
698
- }
618
+ return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
619
+ };
699
620
 
700
- return null;
621
+ _proto.getText = function getText(field, value, style, locale) {
622
+ var store = this._findStore(field, locale);
623
+
624
+ if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
625
+ return store.getText(value, style);
701
626
  }
702
- }, {
703
- key: "getTextIterator",
704
- value: function getTextIterator(field, style, locale) {
705
- var store = this._findStore(field, locale);
706
627
 
707
- if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
708
- return store.getTextIterator(style);
709
- }
628
+ return null;
629
+ };
710
630
 
711
- return null;
631
+ _proto.getTextIterator = function getTextIterator(field, style, locale) {
632
+ var store = this._findStore(field, locale);
633
+
634
+ if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
635
+ return store.getTextIterator(style);
712
636
  }
713
- }, {
714
- key: "_findStore",
715
- value: function _findStore(field, locale) {
716
- var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
717
- var store = this._cache[key];
718
637
 
719
- if (store === undefined) {
720
- store = this._createStore(field, locale);
721
- this._cache[key] = store;
722
- }
638
+ return null;
639
+ };
723
640
 
724
- return store;
725
- }
726
- }, {
727
- key: "_createStore",
728
- value: function _createStore(field, locale) {
729
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/".concat(locale.localeString(), "/ca-gregorian.json"));
730
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
731
-
732
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
733
- var monthsData = cldr.main('dates/calendars/gregorian/months/format');
734
- var styleMap = {};
735
- var data = {};
736
- data[1] = monthsData.wide[1];
737
- data[2] = monthsData.wide[2];
738
- data[3] = monthsData.wide[3];
739
- data[4] = monthsData.wide[4];
740
- data[5] = monthsData.wide[5];
741
- data[6] = monthsData.wide[6];
742
- data[7] = monthsData.wide[7];
743
- data[8] = monthsData.wide[8];
744
- data[9] = monthsData.wide[9];
745
- data[10] = monthsData.wide[10];
746
- data[11] = monthsData.wide[11];
747
- data[12] = monthsData.wide[12];
748
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
749
- data = {};
750
- data[1] = monthsData.narrow[1];
751
- data[2] = monthsData.narrow[2];
752
- data[3] = monthsData.narrow[3];
753
- data[4] = monthsData.narrow[4];
754
- data[5] = monthsData.narrow[5];
755
- data[6] = monthsData.narrow[6];
756
- data[7] = monthsData.narrow[7];
757
- data[8] = monthsData.narrow[8];
758
- data[9] = monthsData.narrow[9];
759
- data[10] = monthsData.narrow[10];
760
- data[11] = monthsData.narrow[11];
761
- data[12] = monthsData.narrow[12];
762
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
763
- data = {};
764
- data[1] = monthsData.abbreviated[1];
765
- data[2] = monthsData.abbreviated[2];
766
- data[3] = monthsData.abbreviated[3];
767
- data[4] = monthsData.abbreviated[4];
768
- data[5] = monthsData.abbreviated[5];
769
- data[6] = monthsData.abbreviated[6];
770
- data[7] = monthsData.abbreviated[7];
771
- data[8] = monthsData.abbreviated[8];
772
- data[9] = monthsData.abbreviated[9];
773
- data[10] = monthsData.abbreviated[10];
774
- data[11] = monthsData.abbreviated[11];
775
- data[12] = monthsData.abbreviated[12];
776
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
777
- return this._createLocaleStore(styleMap);
778
- }
641
+ _proto._findStore = function _findStore(field, locale) {
642
+ var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
643
+ var store = this._cache[key];
779
644
 
780
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
781
- var daysData = cldr.main('dates/calendars/gregorian/days/format');
782
- var _styleMap = {};
783
- var _data = {};
784
- _data[1] = daysData.wide.mon;
785
- _data[2] = daysData.wide.tue;
786
- _data[3] = daysData.wide.wed;
787
- _data[4] = daysData.wide.thu;
788
- _data[5] = daysData.wide.fri;
789
- _data[6] = daysData.wide.sat;
790
- _data[7] = daysData.wide.sun;
791
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
792
- _data = {};
793
- _data[1] = daysData.narrow.mon;
794
- _data[2] = daysData.narrow.tue;
795
- _data[3] = daysData.narrow.wed;
796
- _data[4] = daysData.narrow.thu;
797
- _data[5] = daysData.narrow.fri;
798
- _data[6] = daysData.narrow.sat;
799
- _data[7] = daysData.narrow.sun;
800
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
801
- _data = {};
802
- _data[1] = daysData.abbreviated.mon;
803
- _data[2] = daysData.abbreviated.tue;
804
- _data[3] = daysData.abbreviated.wed;
805
- _data[4] = daysData.abbreviated.thu;
806
- _data[5] = daysData.abbreviated.fri;
807
- _data[6] = daysData.abbreviated.sat;
808
- _data[7] = daysData.abbreviated.sun;
809
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
810
- return this._createLocaleStore(_styleMap);
811
- }
645
+ if (store === undefined) {
646
+ store = this._createStore(field, locale);
647
+ this._cache[key] = store;
648
+ }
812
649
 
813
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
814
- var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
815
- var _styleMap2 = {};
816
- var _data2 = {};
817
- _data2[0] = dayPeriodsData.wide.am;
818
- _data2[1] = dayPeriodsData.wide.pm;
819
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
820
- _data2 = {};
821
- _data2[0] = dayPeriodsData.narrow.am;
822
- _data2[1] = dayPeriodsData.narrow.pm;
823
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
824
- _data2 = {};
825
- _data2[0] = dayPeriodsData.abbreviated.am;
826
- _data2[1] = dayPeriodsData.abbreviated.pm;
827
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
828
- return this._createLocaleStore(_styleMap2);
829
- }
650
+ return store;
651
+ };
830
652
 
831
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
832
- var erasData = cldr.main('dates/calendars/gregorian/eras');
833
- var _styleMap3 = {};
834
- var _data3 = {};
835
- _data3[0] = erasData.eraNames['0'];
836
- _data3[1] = erasData.eraNames['1'];
837
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
838
- _data3 = {};
839
- _data3[0] = erasData.eraNarrow['0'];
840
- _data3[1] = erasData.eraNarrow['1'];
841
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
842
- _data3 = {};
843
- _data3[0] = erasData.eraAbbr['0'];
844
- _data3[1] = erasData.eraAbbr['1'];
845
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
846
- return this._createLocaleStore(_styleMap3);
847
- }
653
+ _proto._createStore = function _createStore(field, locale) {
654
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/" + locale.localeString() + "/ca-gregorian.json");
655
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
656
+
657
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
658
+ var monthsData = cldr.main('dates/calendars/gregorian/months/format');
659
+ var styleMap = {};
660
+ var data = {};
661
+ data[1] = monthsData.wide[1];
662
+ data[2] = monthsData.wide[2];
663
+ data[3] = monthsData.wide[3];
664
+ data[4] = monthsData.wide[4];
665
+ data[5] = monthsData.wide[5];
666
+ data[6] = monthsData.wide[6];
667
+ data[7] = monthsData.wide[7];
668
+ data[8] = monthsData.wide[8];
669
+ data[9] = monthsData.wide[9];
670
+ data[10] = monthsData.wide[10];
671
+ data[11] = monthsData.wide[11];
672
+ data[12] = monthsData.wide[12];
673
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
674
+ data = {};
675
+ data[1] = monthsData.narrow[1];
676
+ data[2] = monthsData.narrow[2];
677
+ data[3] = monthsData.narrow[3];
678
+ data[4] = monthsData.narrow[4];
679
+ data[5] = monthsData.narrow[5];
680
+ data[6] = monthsData.narrow[6];
681
+ data[7] = monthsData.narrow[7];
682
+ data[8] = monthsData.narrow[8];
683
+ data[9] = monthsData.narrow[9];
684
+ data[10] = monthsData.narrow[10];
685
+ data[11] = monthsData.narrow[11];
686
+ data[12] = monthsData.narrow[12];
687
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
688
+ data = {};
689
+ data[1] = monthsData.abbreviated[1];
690
+ data[2] = monthsData.abbreviated[2];
691
+ data[3] = monthsData.abbreviated[3];
692
+ data[4] = monthsData.abbreviated[4];
693
+ data[5] = monthsData.abbreviated[5];
694
+ data[6] = monthsData.abbreviated[6];
695
+ data[7] = monthsData.abbreviated[7];
696
+ data[8] = monthsData.abbreviated[8];
697
+ data[9] = monthsData.abbreviated[9];
698
+ data[10] = monthsData.abbreviated[10];
699
+ data[11] = monthsData.abbreviated[11];
700
+ data[12] = monthsData.abbreviated[12];
701
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
702
+ return this._createLocaleStore(styleMap);
703
+ }
704
+
705
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
706
+ var daysData = cldr.main('dates/calendars/gregorian/days/format');
707
+ var _styleMap = {};
708
+ var _data = {};
709
+ _data[1] = daysData.wide.mon;
710
+ _data[2] = daysData.wide.tue;
711
+ _data[3] = daysData.wide.wed;
712
+ _data[4] = daysData.wide.thu;
713
+ _data[5] = daysData.wide.fri;
714
+ _data[6] = daysData.wide.sat;
715
+ _data[7] = daysData.wide.sun;
716
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
717
+ _data = {};
718
+ _data[1] = daysData.narrow.mon;
719
+ _data[2] = daysData.narrow.tue;
720
+ _data[3] = daysData.narrow.wed;
721
+ _data[4] = daysData.narrow.thu;
722
+ _data[5] = daysData.narrow.fri;
723
+ _data[6] = daysData.narrow.sat;
724
+ _data[7] = daysData.narrow.sun;
725
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
726
+ _data = {};
727
+ _data[1] = daysData.abbreviated.mon;
728
+ _data[2] = daysData.abbreviated.tue;
729
+ _data[3] = daysData.abbreviated.wed;
730
+ _data[4] = daysData.abbreviated.thu;
731
+ _data[5] = daysData.abbreviated.fri;
732
+ _data[6] = daysData.abbreviated.sat;
733
+ _data[7] = daysData.abbreviated.sun;
734
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
735
+ return this._createLocaleStore(_styleMap);
736
+ }
737
+
738
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
739
+ var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
740
+ var _styleMap2 = {};
741
+ var _data2 = {};
742
+ _data2[0] = dayPeriodsData.wide.am;
743
+ _data2[1] = dayPeriodsData.wide.pm;
744
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
745
+ _data2 = {};
746
+ _data2[0] = dayPeriodsData.narrow.am;
747
+ _data2[1] = dayPeriodsData.narrow.pm;
748
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
749
+ _data2 = {};
750
+ _data2[0] = dayPeriodsData.abbreviated.am;
751
+ _data2[1] = dayPeriodsData.abbreviated.pm;
752
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
753
+ return this._createLocaleStore(_styleMap2);
754
+ }
755
+
756
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
757
+ var erasData = cldr.main('dates/calendars/gregorian/eras');
758
+ var _styleMap3 = {};
759
+ var _data3 = {};
760
+ _data3[0] = erasData.eraNames['0'];
761
+ _data3[1] = erasData.eraNames['1'];
762
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
763
+ _data3 = {};
764
+ _data3[0] = erasData.eraNarrow['0'];
765
+ _data3[1] = erasData.eraNarrow['1'];
766
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
767
+ _data3 = {};
768
+ _data3[0] = erasData.eraAbbr['0'];
769
+ _data3[1] = erasData.eraAbbr['1'];
770
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
771
+ return this._createLocaleStore(_styleMap3);
772
+ }
773
+
774
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
775
+ var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
776
+ var _styleMap4 = {};
777
+ var _data4 = {};
778
+ _data4[1] = quartersData.wide['1'];
779
+ _data4[2] = quartersData.wide['2'];
780
+ _data4[3] = quartersData.wide['3'];
781
+ _data4[4] = quartersData.wide['4'];
782
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
783
+ _data4 = {};
784
+ _data4[1] = quartersData.narrow['1'];
785
+ _data4[2] = quartersData.narrow['2'];
786
+ _data4[3] = quartersData.narrow['3'];
787
+ _data4[4] = quartersData.narrow['4'];
788
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
789
+ _data4 = {};
790
+ _data4[1] = quartersData.abbreviated['1'];
791
+ _data4[2] = quartersData.abbreviated['2'];
792
+ _data4[3] = quartersData.abbreviated['3'];
793
+ _data4[4] = quartersData.abbreviated['4'];
794
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
795
+ return this._createLocaleStore(_styleMap4);
796
+ }
797
+
798
+ return null;
799
+ };
848
800
 
849
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
850
- var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
851
- var _styleMap4 = {};
852
- var _data4 = {};
853
- _data4[1] = quartersData.wide['1'];
854
- _data4[2] = quartersData.wide['2'];
855
- _data4[3] = quartersData.wide['3'];
856
- _data4[4] = quartersData.wide['4'];
857
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
858
- _data4 = {};
859
- _data4[1] = quartersData.narrow['1'];
860
- _data4[2] = quartersData.narrow['2'];
861
- _data4[3] = quartersData.narrow['3'];
862
- _data4[4] = quartersData.narrow['4'];
863
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
864
- _data4 = {};
865
- _data4[1] = quartersData.abbreviated['1'];
866
- _data4[2] = quartersData.abbreviated['2'];
867
- _data4[3] = quartersData.abbreviated['3'];
868
- _data4[4] = quartersData.abbreviated['4'];
869
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
870
- return this._createLocaleStore(_styleMap4);
871
- }
801
+ _proto._createLocaleStore = function _createLocaleStore(valueTextMap) {
802
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
803
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
872
804
 
873
- return null;
805
+ if (Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW) > -1 && Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE) === -1) {
806
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
874
807
  }
875
- }, {
876
- key: "_createLocaleStore",
877
- value: function _createLocaleStore(valueTextMap) {
878
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
879
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
880
-
881
- if (Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW) > -1 && Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE) === -1) {
882
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
883
- }
884
808
 
885
- return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
886
- }
887
- }]);
809
+ return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
810
+ };
888
811
 
889
812
  return CldrDateTimeTextProvider;
890
813
  }();
@@ -906,18 +829,12 @@ __webpack_require__.r(__webpack_exports__);
906
829
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
907
830
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
908
831
  /* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
909
- 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; } } }; }
832
+ 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."); }
910
833
 
911
834
  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); }
912
835
 
913
836
  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; }
914
837
 
915
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
916
-
917
- 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); } }
918
-
919
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
920
-
921
838
  /*
922
839
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
923
840
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -942,8 +859,6 @@ var resolveZoneIdTextCache = {};
942
859
 
943
860
  var CldrZoneTextPrinterParser = function () {
944
861
  function CldrZoneTextPrinterParser(textStyle) {
945
- _classCallCheck(this, CldrZoneTextPrinterParser);
946
-
947
862
  requireNonNull(textStyle, 'textStyle');
948
863
  requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
949
864
  this._textStyle = textStyle;
@@ -952,202 +867,178 @@ var CldrZoneTextPrinterParser = function () {
952
867
  Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/metaZones.json');
953
868
  }
954
869
 
955
- _createClass(CldrZoneTextPrinterParser, [{
956
- key: "_cachedResolveZoneIdText",
957
- value: function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
958
- if (resolveZoneIdTextCache[cldr.locale] == null) {
959
- resolveZoneIdTextCache[cldr.locale] = {};
960
- }
870
+ var _proto = CldrZoneTextPrinterParser.prototype;
961
871
 
962
- var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
872
+ _proto._cachedResolveZoneIdText = function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
873
+ if (resolveZoneIdTextCache[cldr.locale] == null) {
874
+ resolveZoneIdTextCache[cldr.locale] = {};
875
+ }
963
876
 
964
- if (zoneIdToStyle[zoneId] == null) {
965
- zoneIdToStyle[zoneId] = {};
966
- }
877
+ var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
967
878
 
968
- var styleToType = zoneIdToStyle[zoneId];
879
+ if (zoneIdToStyle[zoneId] == null) {
880
+ zoneIdToStyle[zoneId] = {};
881
+ }
969
882
 
970
- if (styleToType[style] == null) {
971
- styleToType[style] = {};
972
- }
883
+ var styleToType = zoneIdToStyle[zoneId];
973
884
 
974
- var typeToResolvedZoneIdText = styleToType[style];
885
+ if (styleToType[style] == null) {
886
+ styleToType[style] = {};
887
+ }
975
888
 
976
- if (typeToResolvedZoneIdText[type] == null) {
977
- typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
978
- }
889
+ var typeToResolvedZoneIdText = styleToType[style];
979
890
 
980
- return typeToResolvedZoneIdText[type];
891
+ if (typeToResolvedZoneIdText[type] == null) {
892
+ typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
981
893
  }
982
- }, {
983
- key: "_resolveZoneIdText",
984
- value: function _resolveZoneIdText(cldr, zoneId, style, type) {
985
- var zoneData = cldr.main("dates/timeZoneNames/zone/".concat(zoneId, "/").concat(style, "/").concat(type));
986
894
 
987
- if (zoneData) {
988
- return zoneData;
989
- } else {
990
- var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/".concat(zoneId));
895
+ return typeToResolvedZoneIdText[type];
896
+ };
897
+
898
+ _proto._resolveZoneIdText = function _resolveZoneIdText(cldr, zoneId, style, type) {
899
+ var zoneData = cldr.main("dates/timeZoneNames/zone/" + zoneId + "/" + style + "/" + type);
900
+
901
+ if (zoneData) {
902
+ return zoneData;
903
+ } else {
904
+ var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/" + zoneId);
991
905
 
992
- if (metazoneInfo) {
993
- var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
994
- var metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/").concat(type));
906
+ if (metazoneInfo) {
907
+ var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
908
+ var metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/" + type);
909
+
910
+ if (metaZoneData) {
911
+ return metaZoneData;
912
+ } else {
913
+ metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/generic");
914
+
915
+ if (!metaZoneData) {
916
+ metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/standard");
917
+ }
995
918
 
996
919
  if (metaZoneData) {
997
920
  return metaZoneData;
998
921
  } else {
999
- metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/generic"));
922
+ var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
923
+ var preferredZone = mapZones[metazone][cldr.attributes.territory];
1000
924
 
1001
- if (!metaZoneData) {
1002
- metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/standard"));
1003
- }
1004
-
1005
- if (metaZoneData) {
1006
- return metaZoneData;
925
+ if (preferredZone) {
926
+ if (preferredZone !== zoneId) {
927
+ return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
928
+ }
1007
929
  } else {
1008
- var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
1009
- var preferredZone = mapZones[metazone][cldr.attributes.territory];
1010
-
1011
- if (preferredZone) {
1012
- if (preferredZone !== zoneId) {
1013
- return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
1014
- }
1015
- } else {
1016
- var goldenZone = mapZones[metazone]['001'];
1017
-
1018
- if (goldenZone !== zoneId) {
1019
- return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
1020
- }
930
+ var goldenZone = mapZones[metazone]['001'];
931
+
932
+ if (goldenZone !== zoneId) {
933
+ return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
1021
934
  }
1022
935
  }
1023
936
  }
1024
937
  }
1025
938
  }
1026
939
  }
1027
- }, {
1028
- key: "print",
1029
- value: function print(context, buf) {
1030
- var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
1031
-
1032
- if (zone == null) {
1033
- return false;
1034
- }
1035
-
1036
- if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
1037
- buf.append(zone.id());
1038
- return true;
1039
- }
1040
-
1041
- var daylight = false;
1042
- var hasDaylightSupport = false;
1043
- var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
1044
- var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
1045
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(context.locale().localeString(), "/timeZoneNames.json"));
1046
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
940
+ };
1047
941
 
1048
- var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
942
+ _proto.print = function print(context, buf) {
943
+ var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
1049
944
 
1050
- if (text) {
1051
- buf.append(text);
1052
- } else {
1053
- buf.append(zone.id());
1054
- }
945
+ if (zone == null) {
946
+ return false;
947
+ }
1055
948
 
949
+ if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
950
+ buf.append(zone.id());
1056
951
  return true;
1057
952
  }
1058
- }, {
1059
- key: "_resolveZoneIds",
1060
- value: function _resolveZoneIds(localString) {
1061
- if (this._zoneIdsLocales[localString] != null) {
1062
- return this._zoneIdsLocales[localString];
1063
- }
1064
953
 
1065
- var ids = {};
1066
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(localString, "/timeZoneNames.json"));
1067
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
954
+ var daylight = false;
955
+ var hasDaylightSupport = false;
956
+ var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
957
+ var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
958
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + context.locale().localeString() + "/timeZoneNames.json");
959
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
1068
960
 
1069
- var _iterator = _createForOfIteratorHelper(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()),
1070
- _step;
961
+ var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
1071
962
 
1072
- try {
1073
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
1074
- var id = _step.value;
1075
- ids[id] = id;
1076
- var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
963
+ if (text) {
964
+ buf.append(text);
965
+ } else {
966
+ buf.append(zone.id());
967
+ }
1077
968
 
1078
- var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
969
+ return true;
970
+ };
1079
971
 
1080
- if (genericText) {
1081
- ids[genericText] = id;
1082
- }
972
+ _proto._resolveZoneIds = function _resolveZoneIds(localString) {
973
+ if (this._zoneIdsLocales[localString] != null) {
974
+ return this._zoneIdsLocales[localString];
975
+ }
1083
976
 
1084
- var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
977
+ var ids = {};
978
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + localString + "/timeZoneNames.json");
979
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
1085
980
 
1086
- if (standardText) {
1087
- ids[standardText] = id;
1088
- }
981
+ for (var _iterator = _createForOfIteratorHelperLoose(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()), _step; !(_step = _iterator()).done;) {
982
+ var id = _step.value;
983
+ ids[id] = id;
984
+ var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
1089
985
 
1090
- var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
986
+ var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
1091
987
 
1092
- if (daylightText) {
1093
- ids[daylightText] = id;
1094
- }
1095
- }
1096
- } catch (err) {
1097
- _iterator.e(err);
1098
- } finally {
1099
- _iterator.f();
988
+ if (genericText) {
989
+ ids[genericText] = id;
1100
990
  }
1101
991
 
1102
- var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
1103
- this._zoneIdsLocales[localString] = {
1104
- ids: ids,
1105
- sortedKeys: sortedKeys
1106
- };
1107
- return this._zoneIdsLocales[localString];
1108
- }
1109
- }, {
1110
- key: "parse",
1111
- value: function parse(context, text, position) {
1112
- for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
1113
- var name = _arr[_i];
992
+ var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
1114
993
 
1115
- if (context.subSequenceEquals(text, position, name, 0, name.length)) {
1116
- context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
1117
- return position + name.length;
1118
- }
994
+ if (standardText) {
995
+ ids[standardText] = id;
1119
996
  }
1120
997
 
1121
- var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
1122
- ids = _this$_resolveZoneIds.ids,
1123
- sortedKeys = _this$_resolveZoneIds.sortedKeys;
998
+ var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
1124
999
 
1125
- var _iterator2 = _createForOfIteratorHelper(sortedKeys),
1126
- _step2;
1000
+ if (daylightText) {
1001
+ ids[daylightText] = id;
1002
+ }
1003
+ }
1127
1004
 
1128
- try {
1129
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1130
- var _name = _step2.value;
1005
+ var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
1006
+ this._zoneIdsLocales[localString] = {
1007
+ ids: ids,
1008
+ sortedKeys: sortedKeys
1009
+ };
1010
+ return this._zoneIdsLocales[localString];
1011
+ };
1131
1012
 
1132
- if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
1133
- context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
1134
- return position + _name.length;
1135
- }
1136
- }
1137
- } catch (err) {
1138
- _iterator2.e(err);
1139
- } finally {
1140
- _iterator2.f();
1141
- }
1013
+ _proto.parse = function parse(context, text, position) {
1014
+ for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
1015
+ var name = _arr[_i];
1142
1016
 
1143
- return ~position;
1017
+ if (context.subSequenceEquals(text, position, name, 0, name.length)) {
1018
+ context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
1019
+ return position + name.length;
1020
+ }
1144
1021
  }
1145
- }, {
1146
- key: "toString",
1147
- value: function toString() {
1148
- return "ZoneText(".concat(this._textStyle, ")");
1022
+
1023
+ var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
1024
+ ids = _this$_resolveZoneIds.ids,
1025
+ sortedKeys = _this$_resolveZoneIds.sortedKeys;
1026
+
1027
+ for (var _iterator2 = _createForOfIteratorHelperLoose(sortedKeys), _step2; !(_step2 = _iterator2()).done;) {
1028
+ var _name = _step2.value;
1029
+
1030
+ if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
1031
+ context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
1032
+ return position + _name.length;
1033
+ }
1149
1034
  }
1150
- }]);
1035
+
1036
+ return ~position;
1037
+ };
1038
+
1039
+ _proto.toString = function toString() {
1040
+ return "ZoneText(" + this._textStyle + ")";
1041
+ };
1151
1042
 
1152
1043
  return CldrZoneTextPrinterParser;
1153
1044
  }();
@@ -1168,12 +1059,6 @@ __webpack_require__.r(__webpack_exports__);
1168
1059
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocalizedOffsetPrinterParser; });
1169
1060
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
1170
1061
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
1171
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1172
-
1173
- 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); } }
1174
-
1175
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
1176
-
1177
1062
  /**
1178
1063
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
1179
1064
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -1184,180 +1069,174 @@ var MathUtil = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].MathUtil;
1184
1069
 
1185
1070
  var LocalizedOffsetPrinterParser = function () {
1186
1071
  function LocalizedOffsetPrinterParser(textStyle) {
1187
- _classCallCheck(this, LocalizedOffsetPrinterParser);
1188
-
1189
1072
  this._textStyle = textStyle;
1190
1073
  }
1191
1074
 
1192
- _createClass(LocalizedOffsetPrinterParser, [{
1193
- key: "textStyle",
1194
- value: function textStyle() {
1195
- return this._textStyle;
1196
- }
1197
- }, {
1198
- key: "print",
1199
- value: function print(context, buf) {
1200
- var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
1075
+ var _proto = LocalizedOffsetPrinterParser.prototype;
1201
1076
 
1202
- if (offsetSecs == null) {
1203
- return false;
1204
- }
1077
+ _proto.textStyle = function textStyle() {
1078
+ return this._textStyle;
1079
+ };
1205
1080
 
1206
- buf.append('GMT');
1081
+ _proto.print = function print(context, buf) {
1082
+ var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
1207
1083
 
1208
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
1209
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
1210
- }
1084
+ if (offsetSecs == null) {
1085
+ return false;
1086
+ }
1211
1087
 
1212
- var totalSecs = MathUtil.safeToInt(offsetSecs);
1088
+ buf.append('GMT');
1213
1089
 
1214
- if (totalSecs !== 0) {
1215
- var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
1216
- var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
1217
- var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
1218
- buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
1090
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
1091
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
1092
+ }
1219
1093
 
1220
- if (absMinutes > 0 || absSeconds > 0) {
1221
- buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
1094
+ var totalSecs = MathUtil.safeToInt(offsetSecs);
1222
1095
 
1223
- if (absSeconds > 0) {
1224
- buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
1225
- }
1096
+ if (totalSecs !== 0) {
1097
+ var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
1098
+ var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
1099
+ var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
1100
+ buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
1101
+
1102
+ if (absMinutes > 0 || absSeconds > 0) {
1103
+ buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
1104
+
1105
+ if (absSeconds > 0) {
1106
+ buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
1226
1107
  }
1227
1108
  }
1228
-
1229
- return true;
1230
1109
  }
1231
- }, {
1232
- key: "parse",
1233
- value: function parse(context, text, position) {
1234
- if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
1235
- return ~position;
1236
- }
1237
1110
 
1238
- position += 3;
1111
+ return true;
1112
+ };
1239
1113
 
1240
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
1241
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
1242
- }
1114
+ _proto.parse = function parse(context, text, position) {
1115
+ if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
1116
+ return ~position;
1117
+ }
1243
1118
 
1244
- var end = text.length;
1119
+ position += 3;
1245
1120
 
1246
- if (position === end) {
1247
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
1248
- }
1121
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
1122
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
1123
+ }
1249
1124
 
1250
- var sign = text.charAt(position);
1125
+ var end = text.length;
1251
1126
 
1252
- if (sign !== '+' && sign !== '-') {
1253
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
1254
- }
1127
+ if (position === end) {
1128
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
1129
+ }
1255
1130
 
1256
- var negative = sign === '-' ? -1 : 1;
1131
+ var sign = text.charAt(position);
1257
1132
 
1258
- if (position === end) {
1259
- return ~position;
1260
- }
1133
+ if (sign !== '+' && sign !== '-') {
1134
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
1135
+ }
1261
1136
 
1262
- position++;
1263
- var ch = text.charAt(position);
1137
+ var negative = sign === '-' ? -1 : 1;
1264
1138
 
1265
- if (ch < '0' || ch > '9') {
1266
- return ~position;
1267
- }
1139
+ if (position === end) {
1140
+ return ~position;
1141
+ }
1268
1142
 
1269
- position++;
1270
- var hour = MathUtil.parseInt(ch);
1143
+ position++;
1144
+ var ch = text.charAt(position);
1271
1145
 
1272
- if (position !== end) {
1273
- ch = text.charAt(position);
1146
+ if (ch < '0' || ch > '9') {
1147
+ return ~position;
1148
+ }
1274
1149
 
1275
- if (ch >= '0' && ch <= '9') {
1276
- hour = hour * 10 + MathUtil.parseInt(ch);
1150
+ position++;
1151
+ var hour = MathUtil.parseInt(ch);
1277
1152
 
1278
- if (hour > 23) {
1279
- return ~position;
1280
- }
1153
+ if (position !== end) {
1154
+ ch = text.charAt(position);
1281
1155
 
1282
- position++;
1283
- }
1284
- }
1156
+ if (ch >= '0' && ch <= '9') {
1157
+ hour = hour * 10 + MathUtil.parseInt(ch);
1285
1158
 
1286
- if (position === end || text.charAt(position) !== ':') {
1287
- var _offset = negative * 3600 * hour;
1159
+ if (hour > 23) {
1160
+ return ~position;
1161
+ }
1288
1162
 
1289
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
1163
+ position++;
1290
1164
  }
1165
+ }
1291
1166
 
1292
- position++;
1167
+ if (position === end || text.charAt(position) !== ':') {
1168
+ var _offset = negative * 3600 * hour;
1293
1169
 
1294
- if (position > end - 2) {
1295
- return ~position;
1296
- }
1170
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
1171
+ }
1297
1172
 
1298
- ch = text.charAt(position);
1173
+ position++;
1299
1174
 
1300
- if (ch < '0' || ch > '9') {
1301
- return ~position;
1302
- }
1175
+ if (position > end - 2) {
1176
+ return ~position;
1177
+ }
1303
1178
 
1304
- position++;
1305
- var min = MathUtil.parseInt(ch);
1306
- ch = text.charAt(position);
1179
+ ch = text.charAt(position);
1307
1180
 
1308
- if (ch < '0' || ch > '9') {
1309
- return ~position;
1310
- }
1181
+ if (ch < '0' || ch > '9') {
1182
+ return ~position;
1183
+ }
1311
1184
 
1312
- position++;
1313
- min = min * 10 + MathUtil.parseInt(ch);
1185
+ position++;
1186
+ var min = MathUtil.parseInt(ch);
1187
+ ch = text.charAt(position);
1314
1188
 
1315
- if (min > 59) {
1316
- return ~position;
1317
- }
1189
+ if (ch < '0' || ch > '9') {
1190
+ return ~position;
1191
+ }
1318
1192
 
1319
- if (position === end || text.charAt(position) !== ':') {
1320
- var _offset2 = negative * (3600 * hour + 60 * min);
1193
+ position++;
1194
+ min = min * 10 + MathUtil.parseInt(ch);
1321
1195
 
1322
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
1323
- }
1196
+ if (min > 59) {
1197
+ return ~position;
1198
+ }
1324
1199
 
1325
- position++;
1200
+ if (position === end || text.charAt(position) !== ':') {
1201
+ var _offset2 = negative * (3600 * hour + 60 * min);
1326
1202
 
1327
- if (position > end - 2) {
1328
- return ~position;
1329
- }
1203
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
1204
+ }
1330
1205
 
1331
- ch = text.charAt(position);
1206
+ position++;
1332
1207
 
1333
- if (ch < '0' || ch > '9') {
1334
- return ~position;
1335
- }
1208
+ if (position > end - 2) {
1209
+ return ~position;
1210
+ }
1336
1211
 
1337
- position++;
1338
- var sec = MathUtil.parseInt(ch);
1339
- ch = text.charAt(position);
1212
+ ch = text.charAt(position);
1340
1213
 
1341
- if (ch < '0' || ch > '9') {
1342
- return ~position;
1343
- }
1214
+ if (ch < '0' || ch > '9') {
1215
+ return ~position;
1216
+ }
1344
1217
 
1345
- position++;
1346
- sec = sec * 10 + MathUtil.parseInt(ch);
1218
+ position++;
1219
+ var sec = MathUtil.parseInt(ch);
1220
+ ch = text.charAt(position);
1347
1221
 
1348
- if (sec > 59) {
1349
- return ~position;
1350
- }
1351
-
1352
- var offset = negative * (3600 * hour + 60 * min + sec);
1353
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
1222
+ if (ch < '0' || ch > '9') {
1223
+ return ~position;
1354
1224
  }
1355
- }, {
1356
- key: "toString",
1357
- value: function toString() {
1358
- return "LocalizedOffset(".concat(this._textStyle, ")");
1225
+
1226
+ position++;
1227
+ sec = sec * 10 + MathUtil.parseInt(ch);
1228
+
1229
+ if (sec > 59) {
1230
+ return ~position;
1359
1231
  }
1360
- }]);
1232
+
1233
+ var offset = negative * (3600 * hour + 60 * min + sec);
1234
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
1235
+ };
1236
+
1237
+ _proto.toString = function toString() {
1238
+ return "LocalizedOffset(" + this._textStyle + ")";
1239
+ };
1361
1240
 
1362
1241
  return LocalizedOffsetPrinterParser;
1363
1242
  }();
@@ -1378,18 +1257,12 @@ __webpack_require__.r(__webpack_exports__);
1378
1257
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPrinterParser; });
1379
1258
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
1380
1259
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
1381
- 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; } } }; }
1260
+ 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."); }
1382
1261
 
1383
1262
  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); }
1384
1263
 
1385
1264
  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; }
1386
1265
 
1387
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1388
-
1389
- 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); } }
1390
-
1391
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
1392
-
1393
1266
  /**
1394
1267
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
1395
1268
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -1399,104 +1272,86 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
1399
1272
 
1400
1273
  var TextPrinterParser = function () {
1401
1274
  function TextPrinterParser(field, textStyle, provider) {
1402
- _classCallCheck(this, TextPrinterParser);
1403
-
1404
1275
  this._field = field;
1405
1276
  this._textStyle = textStyle;
1406
1277
  this._provider = provider;
1407
1278
  }
1408
1279
 
1409
- _createClass(TextPrinterParser, [{
1410
- key: "field",
1411
- value: function field() {
1412
- return this._field;
1413
- }
1414
- }, {
1415
- key: "textStyle",
1416
- value: function textStyle() {
1417
- return this._textStyle;
1418
- }
1419
- }, {
1420
- key: "provider",
1421
- value: function provider() {
1422
- return this._provider;
1423
- }
1424
- }, {
1425
- key: "print",
1426
- value: function print(context, buf) {
1427
- var value = context.getValue(this._field);
1280
+ var _proto = TextPrinterParser.prototype;
1428
1281
 
1429
- if (value === null) {
1430
- return false;
1431
- }
1282
+ _proto.field = function field() {
1283
+ return this._field;
1284
+ };
1432
1285
 
1433
- var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
1286
+ _proto.textStyle = function textStyle() {
1287
+ return this._textStyle;
1288
+ };
1434
1289
 
1435
- if (text === null) {
1436
- return this._numberPrinterParser().print(context, buf);
1437
- }
1290
+ _proto.provider = function provider() {
1291
+ return this._provider;
1292
+ };
1438
1293
 
1439
- buf.append(text);
1440
- return true;
1294
+ _proto.print = function print(context, buf) {
1295
+ var value = context.getValue(this._field);
1296
+
1297
+ if (value === null) {
1298
+ return false;
1441
1299
  }
1442
- }, {
1443
- key: "parse",
1444
- value: function parse(context, parseText, position) {
1445
- var length = parseText.length;
1446
1300
 
1447
- if (position < 0 || position > length) {
1448
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: ".concat(position));
1449
- }
1301
+ var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
1450
1302
 
1451
- var style = context.isStrict() ? this._textStyle : null;
1303
+ if (text === null) {
1304
+ return this._numberPrinterParser().print(context, buf);
1305
+ }
1452
1306
 
1453
- var it = this._provider.getTextIterator(this._field, style, context.locale());
1307
+ buf.append(text);
1308
+ return true;
1309
+ };
1454
1310
 
1455
- if (it != null) {
1456
- var _iterator = _createForOfIteratorHelper(it),
1457
- _step;
1311
+ _proto.parse = function parse(context, parseText, position) {
1312
+ var length = parseText.length;
1458
1313
 
1459
- try {
1460
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
1461
- var entry = _step.value;
1462
- var itText = entry.key;
1314
+ if (position < 0 || position > length) {
1315
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: " + position);
1316
+ }
1463
1317
 
1464
- if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
1465
- return context.setParsedField(this._field, entry.value, position, position + itText.length);
1466
- }
1467
- }
1468
- } catch (err) {
1469
- _iterator.e(err);
1470
- } finally {
1471
- _iterator.f();
1472
- }
1318
+ var style = context.isStrict() ? this._textStyle : null;
1473
1319
 
1474
- if (context.isStrict()) {
1475
- return ~position;
1320
+ var it = this._provider.getTextIterator(this._field, style, context.locale());
1321
+
1322
+ if (it != null) {
1323
+ for (var _iterator = _createForOfIteratorHelperLoose(it), _step; !(_step = _iterator()).done;) {
1324
+ var entry = _step.value;
1325
+ var itText = entry.key;
1326
+
1327
+ if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
1328
+ return context.setParsedField(this._field, entry.value, position, position + itText.length);
1476
1329
  }
1477
1330
  }
1478
1331
 
1479
- return this._numberPrinterParser().parse(context, parseText, position);
1480
- }
1481
- }, {
1482
- key: "_numberPrinterParser",
1483
- value: function _numberPrinterParser() {
1484
- if (this._currentNumberPrinterParser == null) {
1485
- this._currentNumberPrinterParser = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(this._field, 1, 19, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL);
1332
+ if (context.isStrict()) {
1333
+ return ~position;
1486
1334
  }
1335
+ }
1336
+
1337
+ return this._numberPrinterParser().parse(context, parseText, position);
1338
+ };
1487
1339
 
1488
- return this._currentNumberPrinterParser;
1340
+ _proto._numberPrinterParser = function _numberPrinterParser() {
1341
+ if (this._currentNumberPrinterParser == null) {
1342
+ this._currentNumberPrinterParser = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(this._field, 1, 19, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL);
1489
1343
  }
1490
- }, {
1491
- key: "toString",
1492
- value: function toString() {
1493
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
1494
- return "Text(".concat(this._field, ")");
1495
- }
1496
1344
 
1497
- return "Text(".concat(this._field, ",").concat(this._textStyle, ")");
1345
+ return this._currentNumberPrinterParser;
1346
+ };
1347
+
1348
+ _proto.toString = function toString() {
1349
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
1350
+ return "Text(" + this._field + ")";
1498
1351
  }
1499
- }]);
1352
+
1353
+ return "Text(" + this._field + "," + this._textStyle + ")";
1354
+ };
1500
1355
 
1501
1356
  return TextPrinterParser;
1502
1357
  }();
@@ -1518,12 +1373,6 @@ __webpack_require__.r(__webpack_exports__);
1518
1373
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
1519
1374
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
1520
1375
  /* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../temporal/WeekFields */ "./src/temporal/WeekFields.js");
1521
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1522
-
1523
- 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); } }
1524
-
1525
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
1526
-
1527
1376
  /*
1528
1377
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
1529
1378
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -1534,95 +1383,89 @@ var StringBuilder = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].StringBuilde
1534
1383
 
1535
1384
  var WeekFieldsPrinterParser = function () {
1536
1385
  function WeekFieldsPrinterParser(letter, count) {
1537
- _classCallCheck(this, WeekFieldsPrinterParser);
1538
-
1539
1386
  this._letter = letter;
1540
1387
  this._count = count;
1541
1388
  }
1542
1389
 
1543
- _createClass(WeekFieldsPrinterParser, [{
1544
- key: "print",
1545
- value: function print(context, buf) {
1546
- var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
1390
+ var _proto = WeekFieldsPrinterParser.prototype;
1547
1391
 
1548
- var pp = this._evaluate(weekFields);
1392
+ _proto.print = function print(context, buf) {
1393
+ var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
1549
1394
 
1550
- return pp.print(context, buf);
1551
- }
1552
- }, {
1553
- key: "parse",
1554
- value: function parse(context, text, position) {
1555
- var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
1395
+ var pp = this._evaluate(weekFields);
1556
1396
 
1557
- var pp = this._evaluate(weekFields);
1397
+ return pp.print(context, buf);
1398
+ };
1558
1399
 
1559
- return pp.parse(context, text, position);
1560
- }
1561
- }, {
1562
- key: "_evaluate",
1563
- value: function _evaluate(weekFields) {
1564
- var pp = null;
1400
+ _proto.parse = function parse(context, text, position) {
1401
+ var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
1565
1402
 
1566
- switch (this._letter) {
1567
- case 'e':
1568
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
1569
- break;
1403
+ var pp = this._evaluate(weekFields);
1570
1404
 
1571
- case 'c':
1572
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
1573
- break;
1405
+ return pp.parse(context, text, position);
1406
+ };
1574
1407
 
1575
- case 'w':
1576
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfWeekBasedYear(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
1577
- break;
1408
+ _proto._evaluate = function _evaluate(weekFields) {
1409
+ var pp = null;
1578
1410
 
1579
- case 'W':
1580
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfMonth(), 1, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
1581
- break;
1411
+ switch (this._letter) {
1412
+ case 'e':
1413
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
1414
+ break;
1582
1415
 
1583
- case 'Y':
1584
- if (this._count === 2) {
1585
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser(weekFields.weekBasedYear(), 2, 2, 0, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser.BASE_DATE);
1586
- } else {
1587
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekBasedYear(), this._count, 19, this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD, -1);
1588
- }
1416
+ case 'c':
1417
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
1418
+ break;
1589
1419
 
1590
- break;
1591
- }
1420
+ case 'w':
1421
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfWeekBasedYear(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
1422
+ break;
1592
1423
 
1593
- return pp;
1594
- }
1595
- }, {
1596
- key: "toString",
1597
- value: function toString() {
1598
- var sb = new StringBuilder(30);
1599
- sb.append('Localized(');
1424
+ case 'W':
1425
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfMonth(), 1, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
1426
+ break;
1600
1427
 
1601
- if (this._letter === 'Y') {
1602
- if (this._count === 1) {
1603
- sb.append('WeekBasedYear');
1604
- } else if (this._count === 2) {
1605
- sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
1428
+ case 'Y':
1429
+ if (this._count === 2) {
1430
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser(weekFields.weekBasedYear(), 2, 2, 0, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser.BASE_DATE);
1606
1431
  } else {
1607
- sb.append('WeekBasedYear,').append(this._count).append(',').append(19).append(',').append(this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD);
1608
- }
1609
- } else {
1610
- if (this._letter === 'c' || this._letter === 'e') {
1611
- sb.append('DayOfWeek');
1612
- } else if (this._letter === 'w') {
1613
- sb.append('WeekOfWeekBasedYear');
1614
- } else if (this._letter === 'W') {
1615
- sb.append('WeekOfMonth');
1432
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekBasedYear(), this._count, 19, this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD, -1);
1616
1433
  }
1617
1434
 
1618
- sb.append(',');
1619
- sb.append(this._count);
1435
+ break;
1436
+ }
1437
+
1438
+ return pp;
1439
+ };
1440
+
1441
+ _proto.toString = function toString() {
1442
+ var sb = new StringBuilder(30);
1443
+ sb.append('Localized(');
1444
+
1445
+ if (this._letter === 'Y') {
1446
+ if (this._count === 1) {
1447
+ sb.append('WeekBasedYear');
1448
+ } else if (this._count === 2) {
1449
+ sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
1450
+ } else {
1451
+ sb.append('WeekBasedYear,').append(this._count).append(',').append(19).append(',').append(this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD);
1452
+ }
1453
+ } else {
1454
+ if (this._letter === 'c' || this._letter === 'e') {
1455
+ sb.append('DayOfWeek');
1456
+ } else if (this._letter === 'w') {
1457
+ sb.append('WeekOfWeekBasedYear');
1458
+ } else if (this._letter === 'W') {
1459
+ sb.append('WeekOfMonth');
1620
1460
  }
1621
1461
 
1622
- sb.append(')');
1623
- return sb.toString();
1462
+ sb.append(',');
1463
+ sb.append(this._count);
1624
1464
  }
1625
- }]);
1465
+
1466
+ sb.append(')');
1467
+ return sb.toString();
1468
+ };
1626
1469
 
1627
1470
  return WeekFieldsPrinterParser;
1628
1471
  }();
@@ -1635,7 +1478,7 @@ var WeekFieldsPrinterParser = function () {
1635
1478
  /*!*******************************!*\
1636
1479
  !*** ./src/js-joda-locale.js ***!
1637
1480
  \*******************************/
1638
- /*! exports provided: Locale */
1481
+ /*! exports provided: Locale, WeekFields */
1639
1482
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1640
1483
 
1641
1484
  "use strict";
@@ -1646,6 +1489,9 @@ __webpack_require__.r(__webpack_exports__);
1646
1489
  /* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Locale */ "./src/Locale.js");
1647
1490
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Locale", function() { return _Locale__WEBPACK_IMPORTED_MODULE_2__["default"]; });
1648
1491
 
1492
+ /* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./temporal/WeekFields */ "./src/temporal/WeekFields.js");
1493
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WeekFields", function() { return _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_3__["WeekFields"]; });
1494
+
1649
1495
  /*
1650
1496
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
1651
1497
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -1653,6 +1499,7 @@ __webpack_require__.r(__webpack_exports__);
1653
1499
 
1654
1500
 
1655
1501
 
1502
+
1656
1503
  Object(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["use"])(_plug__WEBPACK_IMPORTED_MODULE_1__["default"]);
1657
1504
 
1658
1505
 
@@ -1711,12 +1558,6 @@ __webpack_require__.r(__webpack_exports__);
1711
1558
  /* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
1712
1559
  /* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cldrjs */ "cldrjs");
1713
1560
  /* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cldrjs__WEBPACK_IMPORTED_MODULE_2__);
1714
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1715
-
1716
- 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); } }
1717
-
1718
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
1719
-
1720
1561
  /*
1721
1562
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
1722
1563
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -1743,9 +1584,27 @@ var _weekDayMap = {
1743
1584
  'sun': _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"].SUNDAY
1744
1585
  };
1745
1586
  var ComputedDayOfField = function () {
1746
- function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
1747
- _classCallCheck(this, ComputedDayOfField);
1587
+ ComputedDayOfField.ofDayOfWeekField = function ofDayOfWeekField(weekDef) {
1588
+ return new ComputedDayOfField('DayOfWeek', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, DAY_OF_WEEK_RANGE);
1589
+ };
1590
+
1591
+ ComputedDayOfField.ofWeekOfMonthField = function ofWeekOfMonthField(weekDef) {
1592
+ return new ComputedDayOfField('WeekOfMonth', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS, WEEK_OF_MONTH_RANGE);
1593
+ };
1748
1594
 
1595
+ ComputedDayOfField.ofWeekOfYearField = function ofWeekOfYearField(weekDef) {
1596
+ return new ComputedDayOfField('WeekOfYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS, WEEK_OF_YEAR_RANGE);
1597
+ };
1598
+
1599
+ ComputedDayOfField.ofWeekOfWeekBasedYearField = function ofWeekOfWeekBasedYearField(weekDef) {
1600
+ return new ComputedDayOfField('WeekOfWeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, WEEK_OF_WEEK_BASED_YEAR_RANGE);
1601
+ };
1602
+
1603
+ ComputedDayOfField.ofWeekBasedYearField = function ofWeekBasedYearField(weekDef) {
1604
+ return new ComputedDayOfField('WeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER, WEEK_BASED_YEAR_RANGE);
1605
+ };
1606
+
1607
+ function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
1749
1608
  this._name = name;
1750
1609
  this._weekDef = weekDef;
1751
1610
  this._baseUnit = baseUnit;
@@ -1753,484 +1612,482 @@ var ComputedDayOfField = function () {
1753
1612
  this._range = range;
1754
1613
  }
1755
1614
 
1756
- _createClass(ComputedDayOfField, [{
1757
- key: "getFrom",
1758
- value: function getFrom(temporal) {
1759
- var sow = this._weekDef.firstDayOfWeek().value();
1760
-
1761
- var dow = this._localizedDayOfWeek(temporal, sow);
1762
-
1763
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
1764
- return dow;
1765
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
1766
- return this._localizedWeekOfMonth(temporal, dow);
1767
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
1768
- return this._localizedWeekOfYear(temporal, dow);
1769
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
1770
- return this._localizedWOWBY(temporal);
1771
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
1772
- return this._localizedWBY(temporal);
1773
- } else {
1774
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
1775
- }
1776
- }
1777
- }, {
1778
- key: "_localizedDayOfWeek",
1779
- value: function _localizedDayOfWeek(temporal, sow) {
1780
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1781
- return MathUtil.floorMod(isoDow - sow, 7) + 1;
1782
- }
1783
- }, {
1784
- key: "_localizedWeekOfMonth",
1785
- value: function _localizedWeekOfMonth(temporal, dow) {
1786
- var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
1787
-
1788
- var offset = this._startOfWeekOffset(dom, dow);
1615
+ var _proto = ComputedDayOfField.prototype;
1789
1616
 
1790
- return ComputedDayOfField._computeWeek(offset, dom);
1791
- }
1792
- }, {
1793
- key: "_localizedWeekOfYear",
1794
- value: function _localizedWeekOfYear(temporal, dow) {
1795
- var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
1617
+ _proto.getFrom = function getFrom(temporal) {
1618
+ var sow = this._weekDef.firstDayOfWeek().value();
1796
1619
 
1797
- var offset = this._startOfWeekOffset(doy, dow);
1620
+ var dow = this._localizedDayOfWeek(temporal, sow);
1798
1621
 
1799
- return ComputedDayOfField._computeWeek(offset, doy);
1622
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
1623
+ return dow;
1624
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
1625
+ return this._localizedWeekOfMonth(temporal, dow);
1626
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
1627
+ return this._localizedWeekOfYear(temporal, dow);
1628
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
1629
+ return this._localizedWOWBY(temporal);
1630
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
1631
+ return this._localizedWBY(temporal);
1632
+ } else {
1633
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
1800
1634
  }
1801
- }, {
1802
- key: "_localizedWOWBY",
1803
- value: function _localizedWOWBY(temporal) {
1804
- var sow = this._weekDef.firstDayOfWeek().value();
1635
+ };
1805
1636
 
1806
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1807
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
1637
+ _proto._localizedDayOfWeek = function _localizedDayOfWeek(temporal, sow) {
1638
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1639
+ return MathUtil.floorMod(isoDow - sow, 7) + 1;
1640
+ };
1808
1641
 
1809
- var woy = this._localizedWeekOfYear(temporal, dow);
1642
+ _proto._localizedWeekOfMonth = function _localizedWeekOfMonth(temporal, dow) {
1643
+ var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
1810
1644
 
1811
- if (woy === 0) {
1812
- var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1813
- return this._localizedWeekOfYear(previous, dow) + 1;
1814
- } else if (woy >= 53) {
1815
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
1645
+ var offset = this._startOfWeekOffset(dom, dow);
1816
1646
 
1817
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
1818
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
1647
+ return ComputedDayOfField._computeWeek(offset, dom);
1648
+ };
1819
1649
 
1820
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
1650
+ _proto._localizedWeekOfYear = function _localizedWeekOfYear(temporal, dow) {
1651
+ var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
1821
1652
 
1822
- if (woy >= weekIndexOfFirstWeekNextYear) {
1823
- return woy - (weekIndexOfFirstWeekNextYear - 1);
1824
- }
1825
- }
1653
+ var offset = this._startOfWeekOffset(doy, dow);
1826
1654
 
1827
- return woy;
1828
- }
1829
- }, {
1830
- key: "_localizedWBY",
1831
- value: function _localizedWBY(temporal) {
1832
- var sow = this._weekDef.firstDayOfWeek().value();
1655
+ return ComputedDayOfField._computeWeek(offset, doy);
1656
+ };
1833
1657
 
1834
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1835
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
1836
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
1658
+ _proto._localizedWOWBY = function _localizedWOWBY(temporal) {
1659
+ var sow = this._weekDef.firstDayOfWeek().value();
1837
1660
 
1838
- var woy = this._localizedWeekOfYear(temporal, dow);
1661
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1662
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
1839
1663
 
1840
- if (woy === 0) {
1841
- return year - 1;
1842
- } else if (woy < 53) {
1843
- return year;
1844
- }
1664
+ var woy = this._localizedWeekOfYear(temporal, dow);
1845
1665
 
1666
+ if (woy === 0) {
1667
+ var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1668
+ return this._localizedWeekOfYear(previous, dow) + 1;
1669
+ } else if (woy >= 53) {
1846
1670
  var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
1847
1671
 
1672
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
1848
1673
  var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
1849
1674
 
1850
1675
  var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
1851
1676
 
1852
1677
  if (woy >= weekIndexOfFirstWeekNextYear) {
1853
- return year + 1;
1678
+ return woy - (weekIndexOfFirstWeekNextYear - 1);
1854
1679
  }
1680
+ }
1681
+
1682
+ return woy;
1683
+ };
1684
+
1685
+ _proto._localizedWBY = function _localizedWBY(temporal) {
1686
+ var sow = this._weekDef.firstDayOfWeek().value();
1855
1687
 
1688
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1689
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
1690
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
1691
+
1692
+ var woy = this._localizedWeekOfYear(temporal, dow);
1693
+
1694
+ if (woy === 0) {
1695
+ return year - 1;
1696
+ } else if (woy < 53) {
1856
1697
  return year;
1857
1698
  }
1858
- }, {
1859
- key: "_startOfWeekOffset",
1860
- value: function _startOfWeekOffset(day, dow) {
1861
- var weekStart = MathUtil.floorMod(day - dow, 7);
1862
- var offset = -weekStart;
1863
1699
 
1864
- if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
1865
- offset = 7 - weekStart;
1866
- }
1700
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
1701
+
1702
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
1867
1703
 
1868
- return offset;
1704
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
1705
+
1706
+ if (woy >= weekIndexOfFirstWeekNextYear) {
1707
+ return year + 1;
1869
1708
  }
1870
- }, {
1871
- key: "adjustInto",
1872
- value: function adjustInto(temporal, newValue) {
1873
- var newVal = this._range.checkValidIntValue(newValue, this);
1874
1709
 
1875
- var currentVal = temporal.get(this);
1710
+ return year;
1711
+ };
1876
1712
 
1877
- if (newVal === currentVal) {
1878
- return temporal;
1879
- }
1713
+ _proto._startOfWeekOffset = function _startOfWeekOffset(day, dow) {
1714
+ var weekStart = MathUtil.floorMod(day - dow, 7);
1715
+ var offset = -weekStart;
1880
1716
 
1881
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
1882
- var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
1883
- var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
1884
- var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1717
+ if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
1718
+ offset = 7 - weekStart;
1719
+ }
1885
1720
 
1886
- if (result.get(this) > newVal) {
1887
- var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
1888
- result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1889
- } else {
1890
- if (result.get(this) < newVal) {
1891
- result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1892
- }
1721
+ return offset;
1722
+ };
1723
+
1724
+ ComputedDayOfField._computeWeek = function _computeWeek(offset, day) {
1725
+ return MathUtil.intDiv(7 + offset + (day - 1), 7);
1726
+ };
1893
1727
 
1894
- var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
1728
+ _proto.adjustInto = function adjustInto(temporal, newValue) {
1729
+ var newVal = this._range.checkValidIntValue(newValue, this);
1895
1730
 
1896
- result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1731
+ var currentVal = temporal.get(this);
1897
1732
 
1898
- if (result.get(this) > newVal) {
1899
- result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1900
- }
1733
+ if (newVal === currentVal) {
1734
+ return temporal;
1735
+ }
1736
+
1737
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
1738
+ var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
1739
+ var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
1740
+ var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1741
+
1742
+ if (result.get(this) > newVal) {
1743
+ var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
1744
+ result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1745
+ } else {
1746
+ if (result.get(this) < newVal) {
1747
+ result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1901
1748
  }
1902
1749
 
1903
- return result;
1750
+ var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
1751
+
1752
+ result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1753
+
1754
+ if (result.get(this) > newVal) {
1755
+ result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
1756
+ }
1904
1757
  }
1905
1758
 
1906
- var delta = newVal - currentVal;
1907
- return temporal.plus(delta, this._baseUnit);
1759
+ return result;
1908
1760
  }
1909
- }, {
1910
- key: "resolve",
1911
- value: function resolve(fieldValues, partialTemporal, resolverStyle) {
1912
- var sow = this._weekDef.firstDayOfWeek().value();
1913
1761
 
1914
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
1915
- var value = fieldValues.remove(this);
1762
+ var delta = newVal - currentVal;
1763
+ return temporal.plus(delta, this._baseUnit);
1764
+ };
1916
1765
 
1917
- var localDow = this._range.checkValidIntValue(value, this);
1766
+ _proto.resolve = function resolve(fieldValues, partialTemporal, resolverStyle) {
1767
+ var sow = this._weekDef.firstDayOfWeek().value();
1918
1768
 
1919
- var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
1769
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
1770
+ var value = fieldValues.remove(this);
1920
1771
 
1921
- fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
1922
- return null;
1923
- }
1772
+ var localDow = this._range.checkValidIntValue(value, this);
1924
1773
 
1925
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
1774
+ var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
1775
+
1776
+ fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
1777
+ return null;
1778
+ }
1779
+
1780
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
1781
+ return null;
1782
+ }
1783
+
1784
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
1785
+ if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
1926
1786
  return null;
1927
1787
  }
1928
1788
 
1929
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
1930
- if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
1931
- return null;
1932
- }
1789
+ var _isoDow2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
1933
1790
 
1934
- var _isoDow2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
1791
+ var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
1935
1792
 
1936
- var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
1793
+ var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
1794
+ var date;
1795
+ var days;
1937
1796
 
1938
- var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
1939
- var date;
1940
- var days;
1797
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
1798
+ date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
1799
+ var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
1941
1800
 
1942
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
1943
- date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
1944
- var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
1801
+ var dateDow = this._localizedDayOfWeek(date, sow);
1945
1802
 
1946
- var dateDow = this._localizedDayOfWeek(date, sow);
1803
+ var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
1947
1804
 
1948
- var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
1805
+ days = weeks * 7 + (_dow - dateDow);
1806
+ } else {
1807
+ date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
1949
1808
 
1950
- days = weeks * 7 + (_dow - dateDow);
1951
- } else {
1952
- date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
1809
+ var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
1953
1810
 
1954
- var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
1811
+ var _dateDow = this._localizedDayOfWeek(date, sow);
1955
1812
 
1956
- var _dateDow = this._localizedDayOfWeek(date, sow);
1813
+ var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
1957
1814
 
1958
- var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
1815
+ days = _weeks * 7 + (_dow - _dateDow);
1816
+ }
1817
+
1818
+ date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
1959
1819
 
1960
- days = _weeks * 7 + (_dow - _dateDow);
1820
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
1821
+ if (date.getLong(this) !== fieldValues.get(this)) {
1822
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
1961
1823
  }
1824
+ }
1962
1825
 
1963
- date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
1826
+ fieldValues.remove(this);
1827
+ fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
1828
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1829
+ return date;
1830
+ }
1964
1831
 
1965
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
1966
- if (date.getLong(this) !== fieldValues.get(this)) {
1967
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
1968
- }
1969
- }
1832
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
1833
+ return null;
1834
+ }
1970
1835
 
1971
- fieldValues.remove(this);
1972
- fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
1973
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1974
- return date;
1975
- }
1836
+ var isoDow = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
1837
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
1838
+ var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
1976
1839
 
1977
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
1840
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
1841
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
1978
1842
  return null;
1979
1843
  }
1980
1844
 
1981
- var isoDow = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
1982
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
1983
- var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
1845
+ var _value = fieldValues.remove(this);
1984
1846
 
1985
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
1986
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
1987
- return null;
1988
- }
1847
+ var _date;
1989
1848
 
1990
- var _value = fieldValues.remove(this);
1849
+ var _days;
1991
1850
 
1992
- var _date;
1851
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
1852
+ var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
1853
+ _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
1854
+ _date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
1993
1855
 
1994
- var _days;
1856
+ var _dateDow2 = this._localizedDayOfWeek(_date, sow);
1995
1857
 
1996
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
1997
- var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
1998
- _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
1999
- _date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
1858
+ var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
2000
1859
 
2001
- var _dateDow2 = this._localizedDayOfWeek(_date, sow);
1860
+ _days = _weeks2 * 7 + (dow - _dateDow2);
1861
+ } else {
1862
+ var _month = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR));
2002
1863
 
2003
- var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
1864
+ _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
2004
1865
 
2005
- _days = _weeks2 * 7 + (dow - _dateDow2);
2006
- } else {
2007
- var _month = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR));
1866
+ var _dateDow3 = this._localizedDayOfWeek(_date, sow);
2008
1867
 
2009
- _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
1868
+ var wom = this._range.checkValidIntValue(_value, this);
2010
1869
 
2011
- var _dateDow3 = this._localizedDayOfWeek(_date, sow);
1870
+ var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
2012
1871
 
2013
- var wom = this._range.checkValidIntValue(_value, this);
1872
+ _days = _weeks3 * 7 + (dow - _dateDow3);
1873
+ }
2014
1874
 
2015
- var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
1875
+ _date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
2016
1876
 
2017
- _days = _weeks3 * 7 + (dow - _dateDow3);
1877
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
1878
+ if (_date.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR)) {
1879
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
2018
1880
  }
1881
+ }
2019
1882
 
2020
- _date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
1883
+ fieldValues.remove(this);
1884
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
1885
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
1886
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1887
+ return _date;
1888
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
1889
+ var _value2 = fieldValues.remove(this);
2021
1890
 
2022
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
2023
- if (_date.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR)) {
2024
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
2025
- }
2026
- }
1891
+ var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
2027
1892
 
2028
- fieldValues.remove(this);
2029
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
2030
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
2031
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
2032
- return _date;
2033
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
2034
- var _value2 = fieldValues.remove(this);
1893
+ var _days2;
2035
1894
 
2036
- var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
1895
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
1896
+ var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
2037
1897
 
2038
- var _days2;
1898
+ var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
2039
1899
 
2040
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
2041
- var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
1900
+ _days2 = _weeks4 * 7 + (dow - _dateDow4);
1901
+ } else {
1902
+ var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
2042
1903
 
2043
- var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
1904
+ var woy = this._range.checkValidIntValue(_value2, this);
2044
1905
 
2045
- _days2 = _weeks4 * 7 + (dow - _dateDow4);
2046
- } else {
2047
- var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
1906
+ var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
2048
1907
 
2049
- var woy = this._range.checkValidIntValue(_value2, this);
1908
+ _days2 = _weeks5 * 7 + (dow - _dateDow5);
1909
+ }
2050
1910
 
2051
- var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
1911
+ _date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
2052
1912
 
2053
- _days2 = _weeks5 * 7 + (dow - _dateDow5);
1913
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
1914
+ if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
1915
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
2054
1916
  }
1917
+ }
1918
+
1919
+ fieldValues.remove(this);
1920
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
1921
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1922
+ return _date2;
1923
+ } else {
1924
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
1925
+ }
1926
+ };
2055
1927
 
2056
- _date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
1928
+ _proto.name = function name() {
1929
+ return this._name;
1930
+ };
2057
1931
 
2058
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
2059
- if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
2060
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
2061
- }
2062
- }
1932
+ _proto.baseUnit = function baseUnit() {
1933
+ return this._baseUnit;
1934
+ };
2063
1935
 
2064
- fieldValues.remove(this);
2065
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
2066
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
2067
- return _date2;
2068
- } else {
2069
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
2070
- }
2071
- }
2072
- }, {
2073
- key: "name",
2074
- value: function name() {
2075
- return this._name;
2076
- }
2077
- }, {
2078
- key: "baseUnit",
2079
- value: function baseUnit() {
2080
- return this._baseUnit;
2081
- }
2082
- }, {
2083
- key: "rangeUnit",
2084
- value: function rangeUnit() {
2085
- return this._rangeUnit;
2086
- }
2087
- }, {
2088
- key: "range",
2089
- value: function range() {
2090
- return this._range;
2091
- }
2092
- }, {
2093
- key: "isDateBased",
2094
- value: function isDateBased() {
2095
- return true;
2096
- }
2097
- }, {
2098
- key: "isTimeBased",
2099
- value: function isTimeBased() {
2100
- return false;
2101
- }
2102
- }, {
2103
- key: "isSupportedBy",
2104
- value: function isSupportedBy(temporal) {
2105
- if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
2106
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
2107
- return true;
2108
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
2109
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
2110
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
2111
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
2112
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
2113
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
2114
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
2115
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
2116
- }
2117
- }
1936
+ _proto.rangeUnit = function rangeUnit() {
1937
+ return this._rangeUnit;
1938
+ };
2118
1939
 
2119
- return false;
2120
- }
2121
- }, {
2122
- key: "rangeRefinedBy",
2123
- value: function rangeRefinedBy(temporal) {
2124
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
2125
- return this._range;
2126
- }
1940
+ _proto.range = function range() {
1941
+ return this._range;
1942
+ };
1943
+
1944
+ _proto.isDateBased = function isDateBased() {
1945
+ return true;
1946
+ };
2127
1947
 
2128
- var field = null;
1948
+ _proto.isTimeBased = function isTimeBased() {
1949
+ return false;
1950
+ };
2129
1951
 
2130
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
2131
- field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
1952
+ _proto.isSupportedBy = function isSupportedBy(temporal) {
1953
+ if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
1954
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
1955
+ return true;
1956
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
1957
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
2132
1958
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
2133
- field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
1959
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
2134
1960
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
2135
- return this._rangeWOWBY(temporal);
1961
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
2136
1962
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
2137
- return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
2138
- } else {
2139
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
1963
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
2140
1964
  }
1965
+ }
2141
1966
 
2142
- var sow = this._weekDef.firstDayOfWeek().value();
1967
+ return false;
1968
+ };
2143
1969
 
2144
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
2145
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
1970
+ _proto.rangeRefinedBy = function rangeRefinedBy(temporal) {
1971
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
1972
+ return this._range;
1973
+ }
2146
1974
 
2147
- var offset = this._startOfWeekOffset(temporal.get(field), dow);
1975
+ var field = null;
2148
1976
 
2149
- var fieldRange = temporal.range(field);
2150
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
1977
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
1978
+ field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
1979
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
1980
+ field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
1981
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
1982
+ return this._rangeWOWBY(temporal);
1983
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
1984
+ return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
1985
+ } else {
1986
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
2151
1987
  }
2152
- }, {
2153
- key: "_rangeWOWBY",
2154
- value: function _rangeWOWBY(temporal) {
2155
- var sow = this._weekDef.firstDayOfWeek().value();
2156
1988
 
2157
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
2158
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
1989
+ var sow = this._weekDef.firstDayOfWeek().value();
2159
1990
 
2160
- var woy = this._localizedWeekOfYear(temporal, dow);
1991
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
1992
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
2161
1993
 
2162
- if (woy === 0) {
2163
- return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).minus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
2164
- }
1994
+ var offset = this._startOfWeekOffset(temporal.get(field), dow);
2165
1995
 
2166
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
1996
+ var fieldRange = temporal.range(field);
1997
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
1998
+ };
2167
1999
 
2168
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
2169
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
2000
+ _proto._rangeWOWBY = function _rangeWOWBY(temporal) {
2001
+ var sow = this._weekDef.firstDayOfWeek().value();
2170
2002
 
2171
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
2003
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
2004
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
2172
2005
 
2173
- if (woy >= weekIndexOfFirstWeekNextYear) {
2174
- return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
2175
- }
2006
+ var woy = this._localizedWeekOfYear(temporal, dow);
2176
2007
 
2177
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
2008
+ if (woy === 0) {
2009
+ return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).minus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
2178
2010
  }
2179
- }, {
2180
- key: "displayName",
2181
- value: function displayName(locale) {
2182
- requireNonNull(locale, 'locale');
2183
2011
 
2184
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
2185
- return 'Week';
2186
- }
2012
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
2187
2013
 
2188
- return this.toString();
2189
- }
2190
- }, {
2191
- key: "toString",
2192
- value: function toString() {
2193
- return "".concat(this._name, "[").concat(this._weekDef.toString(), "]");
2194
- }
2195
- }], [{
2196
- key: "ofDayOfWeekField",
2197
- value: function ofDayOfWeekField(weekDef) {
2198
- return new ComputedDayOfField('DayOfWeek', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, DAY_OF_WEEK_RANGE);
2199
- }
2200
- }, {
2201
- key: "ofWeekOfMonthField",
2202
- value: function ofWeekOfMonthField(weekDef) {
2203
- return new ComputedDayOfField('WeekOfMonth', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS, WEEK_OF_MONTH_RANGE);
2204
- }
2205
- }, {
2206
- key: "ofWeekOfYearField",
2207
- value: function ofWeekOfYearField(weekDef) {
2208
- return new ComputedDayOfField('WeekOfYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS, WEEK_OF_YEAR_RANGE);
2209
- }
2210
- }, {
2211
- key: "ofWeekOfWeekBasedYearField",
2212
- value: function ofWeekOfWeekBasedYearField(weekDef) {
2213
- return new ComputedDayOfField('WeekOfWeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, WEEK_OF_WEEK_BASED_YEAR_RANGE);
2214
- }
2215
- }, {
2216
- key: "ofWeekBasedYearField",
2217
- value: function ofWeekBasedYearField(weekDef) {
2218
- return new ComputedDayOfField('WeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER, WEEK_BASED_YEAR_RANGE);
2014
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
2015
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
2016
+
2017
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
2018
+
2019
+ if (woy >= weekIndexOfFirstWeekNextYear) {
2020
+ return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
2219
2021
  }
2220
- }, {
2221
- key: "_computeWeek",
2222
- value: function _computeWeek(offset, day) {
2223
- return MathUtil.intDiv(7 + offset + (day - 1), 7);
2022
+
2023
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
2024
+ };
2025
+
2026
+ _proto.displayName = function displayName(locale) {
2027
+ requireNonNull(locale, 'locale');
2028
+
2029
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
2030
+ return 'Week';
2224
2031
  }
2225
- }]);
2032
+
2033
+ return this.toString();
2034
+ };
2035
+
2036
+ _proto.toString = function toString() {
2037
+ return this._name + "[" + this._weekDef.toString() + "]";
2038
+ };
2226
2039
 
2227
2040
  return ComputedDayOfField;
2228
2041
  }();
2229
2042
  var WeekFieldsCache = new Map();
2230
2043
  var WeekFields = function () {
2231
- function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
2232
- _classCallCheck(this, WeekFields);
2044
+ WeekFields.of = function of(firstDayOrLocale, minDays) {
2045
+ if (minDays === undefined) {
2046
+ return WeekFields.ofLocale(firstDayOrLocale);
2047
+ } else {
2048
+ return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
2049
+ }
2050
+ };
2051
+
2052
+ WeekFields.ofLocale = function ofLocale(locale) {
2053
+ requireNonNull(locale, 'locale');
2054
+ cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
2055
+ var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
2056
+ var worldRegion = '001';
2057
+ var weekData = cldr.get('supplemental/weekData');
2058
+
2059
+ var dow = _weekDayMap[weekData.firstDay[locale.country()]];
2060
+
2061
+ if (!dow) {
2062
+ dow = _weekDayMap[weekData.firstDay[worldRegion]];
2063
+ }
2064
+
2065
+ var minDays = weekData.minDays[locale.country()];
2066
+
2067
+ if (!minDays) {
2068
+ minDays = weekData.minDays[worldRegion];
2069
+ }
2070
+
2071
+ return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
2072
+ };
2233
2073
 
2074
+ WeekFields.ofFirstDayOfWeekMinDays = function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
2075
+ requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
2076
+ requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
2077
+ requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
2078
+ var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
2079
+ var rules = WeekFieldsCache.get(key);
2080
+
2081
+ if (rules == null) {
2082
+ rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
2083
+ WeekFieldsCache.set(key, rules);
2084
+ rules = WeekFieldsCache.get(key);
2085
+ }
2086
+
2087
+ return rules;
2088
+ };
2089
+
2090
+ function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
2234
2091
  requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
2235
2092
  requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
2236
2093
  requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
@@ -2249,114 +2106,55 @@ var WeekFields = function () {
2249
2106
  cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/likelySubtags.json'));
2250
2107
  }
2251
2108
 
2252
- _createClass(WeekFields, [{
2253
- key: "firstDayOfWeek",
2254
- value: function firstDayOfWeek() {
2255
- return this._firstDayOfWeek;
2256
- }
2257
- }, {
2258
- key: "minimalDaysInFirstWeek",
2259
- value: function minimalDaysInFirstWeek() {
2260
- return this._minimalDays;
2261
- }
2262
- }, {
2263
- key: "dayOfWeek",
2264
- value: function dayOfWeek() {
2265
- return this._dayOfWeek;
2266
- }
2267
- }, {
2268
- key: "weekOfMonth",
2269
- value: function weekOfMonth() {
2270
- return this._weekOfMonth;
2271
- }
2272
- }, {
2273
- key: "weekOfYear",
2274
- value: function weekOfYear() {
2275
- return this._weekOfYear;
2276
- }
2277
- }, {
2278
- key: "weekOfWeekBasedYear",
2279
- value: function weekOfWeekBasedYear() {
2280
- return this._weekOfWeekBasedYear;
2281
- }
2282
- }, {
2283
- key: "weekBasedYear",
2284
- value: function weekBasedYear() {
2285
- return this._weekBasedYear;
2286
- }
2287
- }, {
2288
- key: "equals",
2289
- value: function equals(other) {
2290
- if (this === other) {
2291
- return true;
2292
- }
2109
+ var _proto2 = WeekFields.prototype;
2293
2110
 
2294
- if (other instanceof WeekFields) {
2295
- return this.hashCode() === other.hashCode();
2296
- }
2111
+ _proto2.firstDayOfWeek = function firstDayOfWeek() {
2112
+ return this._firstDayOfWeek;
2113
+ };
2297
2114
 
2298
- return false;
2299
- }
2300
- }, {
2301
- key: "hashCode",
2302
- value: function hashCode() {
2303
- return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
2304
- }
2305
- }, {
2306
- key: "toString",
2307
- value: function toString() {
2308
- return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
2309
- }
2310
- }], [{
2311
- key: "of",
2312
- value: function of(firstDayOrLocale, minDays) {
2313
- if (minDays === undefined) {
2314
- return WeekFields.ofLocale(firstDayOrLocale);
2315
- } else {
2316
- return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
2317
- }
2318
- }
2319
- }, {
2320
- key: "ofLocale",
2321
- value: function ofLocale(locale) {
2322
- requireNonNull(locale, 'locale');
2323
- cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
2324
- var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
2325
- var worldRegion = '001';
2326
- var weekData = cldr.get('supplemental/weekData');
2115
+ _proto2.minimalDaysInFirstWeek = function minimalDaysInFirstWeek() {
2116
+ return this._minimalDays;
2117
+ };
2327
2118
 
2328
- var dow = _weekDayMap[weekData.firstDay[locale.country()]];
2119
+ _proto2.dayOfWeek = function dayOfWeek() {
2120
+ return this._dayOfWeek;
2121
+ };
2329
2122
 
2330
- if (!dow) {
2331
- dow = _weekDayMap[weekData.firstDay[worldRegion]];
2332
- }
2123
+ _proto2.weekOfMonth = function weekOfMonth() {
2124
+ return this._weekOfMonth;
2125
+ };
2333
2126
 
2334
- var minDays = weekData.minDays[locale.country()];
2127
+ _proto2.weekOfYear = function weekOfYear() {
2128
+ return this._weekOfYear;
2129
+ };
2335
2130
 
2336
- if (!minDays) {
2337
- minDays = weekData.minDays[worldRegion];
2338
- }
2131
+ _proto2.weekOfWeekBasedYear = function weekOfWeekBasedYear() {
2132
+ return this._weekOfWeekBasedYear;
2133
+ };
2339
2134
 
2340
- return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
2341
- }
2342
- }, {
2343
- key: "ofFirstDayOfWeekMinDays",
2344
- value: function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
2345
- requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
2346
- requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
2347
- requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
2348
- var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
2349
- var rules = WeekFieldsCache.get(key);
2350
-
2351
- if (rules == null) {
2352
- rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
2353
- WeekFieldsCache.set(key, rules);
2354
- rules = WeekFieldsCache.get(key);
2355
- }
2135
+ _proto2.weekBasedYear = function weekBasedYear() {
2136
+ return this._weekBasedYear;
2137
+ };
2356
2138
 
2357
- return rules;
2139
+ _proto2.equals = function equals(other) {
2140
+ if (this === other) {
2141
+ return true;
2142
+ }
2143
+
2144
+ if (other instanceof WeekFields) {
2145
+ return this.hashCode() === other.hashCode();
2358
2146
  }
2359
- }]);
2147
+
2148
+ return false;
2149
+ };
2150
+
2151
+ _proto2.hashCode = function hashCode() {
2152
+ return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
2153
+ };
2154
+
2155
+ _proto2.toString = function toString() {
2156
+ return "WeekFields[" + this._firstDayOfWeek + "," + this._minimalDays + "]";
2157
+ };
2360
2158
 
2361
2159
  return WeekFields;
2362
2160
  }();