@js-joda/locale 4.2.0 → 4.5.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 (60) hide show
  1. package/CHANGELOG.md +19 -2
  2. package/README.md +8 -8
  3. package/dist/js-joda-locale.js +1090 -1296
  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 +1100 -1306
  7. package/dist/prebuilt/de/index.js.map +1 -1
  8. package/dist/prebuilt/de-de/index.js +1100 -1306
  9. package/dist/prebuilt/de-de/index.js.map +1 -1
  10. package/dist/prebuilt/en/index.js +1101 -1307
  11. package/dist/prebuilt/en/index.js.map +1 -1
  12. package/dist/prebuilt/en-us/index.js +1100 -1306
  13. package/dist/prebuilt/en-us/index.js.map +1 -1
  14. package/dist/prebuilt/es/index.js +1101 -1307
  15. package/dist/prebuilt/es/index.js.map +1 -1
  16. package/dist/prebuilt/fr/index.js +1101 -1307
  17. package/dist/prebuilt/fr/index.js.map +1 -1
  18. package/dist/prebuilt/fr-fr/index.js +1100 -1306
  19. package/dist/prebuilt/fr-fr/index.js.map +1 -1
  20. package/dist/prebuilt/hi/index.js +1100 -1306
  21. package/dist/prebuilt/hi/index.js.map +1 -1
  22. package/dist/prebuilt/it/index.js +1100 -1306
  23. package/dist/prebuilt/it/index.js.map +1 -1
  24. package/dist/prebuilt/it-it/index.js +1100 -1306
  25. package/dist/prebuilt/it-it/index.js.map +1 -1
  26. package/dist/prebuilt/ja/index.js +1100 -1306
  27. package/dist/prebuilt/ja/index.js.map +1 -1
  28. package/dist/prebuilt/ja-jp/index.js +1100 -1306
  29. package/dist/prebuilt/ja-jp/index.js.map +1 -1
  30. package/dist/prebuilt/ko/index.js +1100 -1306
  31. package/dist/prebuilt/ko/index.js.map +1 -1
  32. package/dist/prebuilt/ro/index.js +1100 -1306
  33. package/dist/prebuilt/ro/index.js.map +1 -1
  34. package/dist/prebuilt/ru/index.js +4031 -0
  35. package/dist/prebuilt/ru/index.js.map +1 -0
  36. package/dist/prebuilt/sv/index.js +1100 -1306
  37. package/dist/prebuilt/sv/index.js.map +1 -1
  38. package/dist/prebuilt/sv-se/index.js +1100 -1306
  39. package/dist/prebuilt/sv-se/index.js.map +1 -1
  40. package/dist/prebuilt/zh/index.js +1100 -1306
  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/{dist → typings}/js-joda-locale.d.ts +12 -0
  45. package/.babelrc +0 -24
  46. package/build_package.default.json +0 -14
  47. package/build_package.prebuilt.json +0 -66
  48. package/examples/usage_browser.html +0 -111
  49. package/examples/usage_browser_build.html +0 -72
  50. package/examples/usage_es6.js +0 -15
  51. package/examples/usage_node.js +0 -38
  52. package/examples/usage_node_build.js +0 -48
  53. package/utils/CldrDataIgnorePlugin.js +0 -57
  54. package/utils/README_package.template.md +0 -13
  55. package/utils/buildWebpackConfig.js +0 -28
  56. package/utils/build_package.js +0 -170
  57. package/utils/create_packages.js +0 -136
  58. package/utils/load_cldrData.prebuilt.js +0 -18
  59. package/utils/publish_release.js +0 -151
  60. package/webpack.config.js +0 -88
@@ -1,4 +1,4 @@
1
- //! @version @js-joda/locale - 4.2.0
1
+ //! @version @js-joda/locale - 4.5.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)
@@ -2467,12 +2467,6 @@ __webpack_require__.r(__webpack_exports__);
2467
2467
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Locale; });
2468
2468
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_init", function() { return _init; });
2469
2469
  /* harmony import */ var _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format/cldr/CldrDateTimeTextProvider */ "./src/format/cldr/CldrDateTimeTextProvider.js");
2470
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2471
-
2472
- 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); } }
2473
-
2474
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2475
-
2476
2470
  /*
2477
2471
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2478
2472
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2480,64 +2474,61 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
2480
2474
 
2481
2475
 
2482
2476
  var Locale = function () {
2483
- function Locale(language) {
2484
- var country = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
2485
- var localeString = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
2477
+ Locale.getAvailableLocales = function getAvailableLocales() {
2478
+ return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
2479
+ };
2486
2480
 
2487
- _classCallCheck(this, Locale);
2481
+ function Locale(language, country, localeString) {
2482
+ if (country === void 0) {
2483
+ country = '';
2484
+ }
2485
+
2486
+ if (localeString === void 0) {
2487
+ localeString = '';
2488
+ }
2488
2489
 
2489
2490
  this._language = language;
2490
2491
  this._country = country;
2491
2492
  this._localeString = localeString;
2492
2493
  }
2493
2494
 
2494
- _createClass(Locale, [{
2495
- key: "language",
2496
- value: function language() {
2497
- return this._language;
2498
- }
2499
- }, {
2500
- key: "country",
2501
- value: function country() {
2502
- return this._country;
2503
- }
2504
- }, {
2505
- key: "localeString",
2506
- value: function localeString() {
2507
- if (this._localeString.length > 0) {
2508
- return this._localeString;
2509
- }
2495
+ var _proto = Locale.prototype;
2510
2496
 
2511
- if (this._country.length > 0) {
2512
- return "".concat(this._language, "-").concat(this._country);
2513
- } else {
2514
- return this._language;
2515
- }
2497
+ _proto.language = function language() {
2498
+ return this._language;
2499
+ };
2500
+
2501
+ _proto.country = function country() {
2502
+ return this._country;
2503
+ };
2504
+
2505
+ _proto.localeString = function localeString() {
2506
+ if (this._localeString.length > 0) {
2507
+ return this._localeString;
2516
2508
  }
2517
- }, {
2518
- key: "toString",
2519
- value: function toString() {
2520
- return "Locale[".concat(this.localeString(), "]");
2509
+
2510
+ if (this._country.length > 0) {
2511
+ return this._language + "-" + this._country;
2512
+ } else {
2513
+ return this._language;
2521
2514
  }
2522
- }, {
2523
- key: "equals",
2524
- value: function equals(other) {
2525
- if (!other) {
2526
- return false;
2527
- }
2515
+ };
2528
2516
 
2529
- if (!(other instanceof Locale)) {
2530
- return false;
2531
- }
2517
+ _proto.toString = function toString() {
2518
+ return "Locale[" + this.localeString() + "]";
2519
+ };
2532
2520
 
2533
- return this.localeString() === other.localeString();
2521
+ _proto.equals = function equals(other) {
2522
+ if (!other) {
2523
+ return false;
2534
2524
  }
2535
- }], [{
2536
- key: "getAvailableLocales",
2537
- value: function getAvailableLocales() {
2538
- return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
2525
+
2526
+ if (!(other instanceof Locale)) {
2527
+ return false;
2539
2528
  }
2540
- }]);
2529
+
2530
+ return this.localeString() === other.localeString();
2531
+ };
2541
2532
 
2542
2533
  return Locale;
2543
2534
  }();
@@ -2555,6 +2546,14 @@ function _init() {
2555
2546
  Locale.KOREAN = new Locale('ko');
2556
2547
  Locale.JAPANESE = new Locale('ja', 'JP');
2557
2548
  Locale.JAPAN = new Locale('ja', 'JP', 'ja');
2549
+ Locale.ITALIAN = new Locale('it');
2550
+ Locale.ITALY = new Locale('it', 'IT', 'it');
2551
+ Locale.CHINESE = new Locale('zh');
2552
+ Locale.ROMANIAN = new Locale('ro');
2553
+ Locale.SWEDISH = new Locale('sv');
2554
+ Locale.SWEDEN = new Locale('sv', 'SE', 'sv');
2555
+ Locale.HINDI = new Locale('hi');
2556
+ Locale.RUSSIAN = new Locale('ru');
2558
2557
  }
2559
2558
 
2560
2559
  /***/ }),
@@ -2610,28 +2609,10 @@ __webpack_require__.r(__webpack_exports__);
2610
2609
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
2611
2610
  /* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locale */ "./src/Locale.js");
2612
2611
  /* harmony import */ var _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cldr/CldrDateTimeFormatterBuilder */ "./src/format/cldr/CldrDateTimeFormatterBuilder.js");
2613
- 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); }
2614
-
2615
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2616
-
2617
- 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); } }
2618
-
2619
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2620
-
2621
- 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); }
2612
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
2622
2613
 
2623
2614
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2624
2615
 
2625
- 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); }; }
2626
-
2627
- 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); }
2628
-
2629
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2630
-
2631
- 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; } }
2632
-
2633
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2634
-
2635
2616
  /*
2636
2617
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2637
2618
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2642,28 +2623,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
2642
2623
  var requireNonNull = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].assert.requireNonNull;
2643
2624
 
2644
2625
  var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
2645
- _inherits(LocaleDateTimeFormatter, _DateTimeFormatter);
2646
-
2647
- var _super = _createSuper(LocaleDateTimeFormatter);
2626
+ _inheritsLoose(LocaleDateTimeFormatter, _DateTimeFormatter);
2648
2627
 
2649
2628
  function LocaleDateTimeFormatter() {
2650
- _classCallCheck(this, LocaleDateTimeFormatter);
2651
-
2652
- return _super.apply(this, arguments);
2629
+ return _DateTimeFormatter.apply(this, arguments) || this;
2653
2630
  }
2654
2631
 
2655
- _createClass(LocaleDateTimeFormatter, [{
2656
- key: "withLocale",
2657
- value: function withLocale(locale) {
2658
- requireNonNull(locale, 'locale');
2632
+ var _proto = LocaleDateTimeFormatter.prototype;
2659
2633
 
2660
- if (locale.equals(this._locale)) {
2661
- return this;
2662
- }
2634
+ _proto.withLocale = function withLocale(locale) {
2635
+ requireNonNull(locale, 'locale');
2663
2636
 
2664
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
2637
+ if (locale.equals(this._locale)) {
2638
+ return this;
2665
2639
  }
2666
- }]);
2640
+
2641
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
2642
+ };
2667
2643
 
2668
2644
  return LocaleDateTimeFormatter;
2669
2645
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"]);
@@ -2709,12 +2685,6 @@ function _init() {
2709
2685
  __webpack_require__.r(__webpack_exports__);
2710
2686
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEntry", function() { return createEntry; });
2711
2687
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleStore", function() { return LocaleStore; });
2712
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2713
-
2714
- 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); } }
2715
-
2716
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2717
-
2718
2688
  /*
2719
2689
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2720
2690
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2724,7 +2694,7 @@ var createEntry = function createEntry(text, field) {
2724
2694
  key: text,
2725
2695
  value: field,
2726
2696
  toString: function toString() {
2727
- return "".concat(text, "->").concat(field);
2697
+ return text + "->" + field;
2728
2698
  }
2729
2699
  };
2730
2700
  };
@@ -2735,8 +2705,6 @@ var _comparator = function _comparator(obj1, obj2) {
2735
2705
 
2736
2706
  var LocaleStore = function () {
2737
2707
  function LocaleStore(valueTextMap) {
2738
- _classCallCheck(this, LocaleStore);
2739
-
2740
2708
  this._valueTextMap = valueTextMap;
2741
2709
  var map = {};
2742
2710
  var allList = [];
@@ -2760,19 +2728,17 @@ var LocaleStore = function () {
2760
2728
  this._parsable = map;
2761
2729
  }
2762
2730
 
2763
- _createClass(LocaleStore, [{
2764
- key: "getText",
2765
- value: function getText(value, style) {
2766
- var map = this._valueTextMap[style];
2767
- return map != null ? map[value] : null;
2768
- }
2769
- }, {
2770
- key: "getTextIterator",
2771
- value: function getTextIterator(style) {
2772
- var list = this._parsable[style];
2773
- return list != null ? list[Symbol.iterator]() : null;
2774
- }
2775
- }]);
2731
+ var _proto = LocaleStore.prototype;
2732
+
2733
+ _proto.getText = function getText(value, style) {
2734
+ var map = this._valueTextMap[style];
2735
+ return map != null ? map[value] : null;
2736
+ };
2737
+
2738
+ _proto.getTextIterator = function getTextIterator(style) {
2739
+ var list = this._parsable[style];
2740
+ return list != null ? list[Symbol.iterator]() : null;
2741
+ };
2776
2742
 
2777
2743
  return LocaleStore;
2778
2744
  }();
@@ -2855,28 +2821,10 @@ __webpack_require__.r(__webpack_exports__);
2855
2821
  /* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
2856
2822
  /* harmony import */ var _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser/LocalizedOffsetPrinterParser */ "./src/format/parser/LocalizedOffsetPrinterParser.js");
2857
2823
  /* harmony import */ var _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../parser/WeekFieldsPrinterParser */ "./src/format/parser/WeekFieldsPrinterParser.js");
2858
- 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); }
2859
-
2860
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2861
-
2862
- 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); } }
2863
-
2864
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2865
-
2866
- 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); }
2824
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
2867
2825
 
2868
2826
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2869
2827
 
2870
- 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); }; }
2871
-
2872
- 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); }
2873
-
2874
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2875
-
2876
- 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; } }
2877
-
2878
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2879
-
2880
2828
  /**
2881
2829
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
2882
2830
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -2894,98 +2842,87 @@ var _jodaInternal$assert = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].asser
2894
2842
  requireInstance = _jodaInternal$assert.requireInstance;
2895
2843
 
2896
2844
  var CldrDateTimeFormatterBuilder = function (_DateTimeFormatterBui) {
2897
- _inherits(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
2898
-
2899
- var _super = _createSuper(CldrDateTimeFormatterBuilder);
2845
+ _inheritsLoose(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
2900
2846
 
2901
2847
  function CldrDateTimeFormatterBuilder() {
2902
- _classCallCheck(this, CldrDateTimeFormatterBuilder);
2903
-
2904
- return _super.apply(this, arguments);
2848
+ return _DateTimeFormatterBui.apply(this, arguments) || this;
2905
2849
  }
2906
2850
 
2907
- _createClass(CldrDateTimeFormatterBuilder, [{
2908
- key: "appendText",
2909
- value: function appendText(field, styleOrMap) {
2910
- if (styleOrMap === undefined) {
2911
- return this.appendTextField(field);
2912
- } else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
2913
- return this.appendTextFieldStyle(field, styleOrMap);
2914
- } else {
2915
- return this.appendTextFieldMap(field, styleOrMap);
2916
- }
2917
- }
2918
- }, {
2919
- key: "appendTextField",
2920
- value: function appendTextField(field) {
2921
- return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
2851
+ var _proto = CldrDateTimeFormatterBuilder.prototype;
2852
+
2853
+ _proto.appendText = function appendText(field, styleOrMap) {
2854
+ if (styleOrMap === undefined) {
2855
+ return this.appendTextField(field);
2856
+ } else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
2857
+ return this.appendTextFieldStyle(field, styleOrMap);
2858
+ } else {
2859
+ return this.appendTextFieldMap(field, styleOrMap);
2922
2860
  }
2923
- }, {
2924
- key: "appendTextFieldStyle",
2925
- value: function appendTextFieldStyle(field, textStyle) {
2926
- requireNonNull(field, 'field');
2927
- requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
2928
- requireNonNull(textStyle, 'textStyle');
2929
- requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
2861
+ };
2930
2862
 
2931
- this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
2863
+ _proto.appendTextField = function appendTextField(field) {
2864
+ return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
2865
+ };
2932
2866
 
2933
- return this;
2934
- }
2935
- }, {
2936
- key: "appendTextFieldMap",
2937
- value: function appendTextFieldMap(field, textLookup) {
2938
- requireNonNull(field, 'field');
2939
- requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
2940
- requireNonNull(textLookup, 'textLookup');
2941
- var copy = Object.assign({}, textLookup);
2942
- var map = {};
2943
- map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
2944
- var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
2945
- var provider = {
2946
- getText: function getText(field, value, style) {
2947
- return store.getText(value, style);
2948
- },
2949
- getTextIterator: function getTextIterator(field, style) {
2950
- return store.getTextIterator(style);
2951
- }
2952
- };
2867
+ _proto.appendTextFieldStyle = function appendTextFieldStyle(field, textStyle) {
2868
+ requireNonNull(field, 'field');
2869
+ requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
2870
+ requireNonNull(textStyle, 'textStyle');
2871
+ requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
2953
2872
 
2954
- this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
2873
+ this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
2955
2874
 
2956
- return this;
2957
- }
2958
- }, {
2959
- key: "appendWeekField",
2960
- value: function appendWeekField(field, count) {
2961
- requireNonNull(field, 'field');
2962
- requireNonNull(count, 'count');
2875
+ return this;
2876
+ };
2877
+
2878
+ _proto.appendTextFieldMap = function appendTextFieldMap(field, textLookup) {
2879
+ requireNonNull(field, 'field');
2880
+ requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
2881
+ requireNonNull(textLookup, 'textLookup');
2882
+ var copy = Object.assign({}, textLookup);
2883
+ var map = {};
2884
+ map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
2885
+ var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
2886
+ var provider = {
2887
+ getText: function getText(field, value, style) {
2888
+ return store.getText(value, style);
2889
+ },
2890
+ getTextIterator: function getTextIterator(field, style) {
2891
+ return store.getTextIterator(style);
2892
+ }
2893
+ };
2963
2894
 
2964
- this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
2895
+ this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
2965
2896
 
2966
- return this;
2967
- }
2968
- }, {
2969
- key: "appendZoneText",
2970
- value: function appendZoneText(textStyle) {
2971
- this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
2897
+ return this;
2898
+ };
2972
2899
 
2973
- return this;
2974
- }
2975
- }, {
2976
- key: "appendLocalizedOffset",
2977
- value: function appendLocalizedOffset(textStyle) {
2978
- requireNonNull(textStyle, 'textStyle');
2900
+ _proto.appendWeekField = function appendWeekField(field, count) {
2901
+ requireNonNull(field, 'field');
2902
+ requireNonNull(count, 'count');
2979
2903
 
2980
- if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
2981
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
2982
- }
2904
+ this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
2905
+
2906
+ return this;
2907
+ };
2983
2908
 
2984
- this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
2909
+ _proto.appendZoneText = function appendZoneText(textStyle) {
2910
+ this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
2985
2911
 
2986
- return this;
2912
+ return this;
2913
+ };
2914
+
2915
+ _proto.appendLocalizedOffset = function appendLocalizedOffset(textStyle) {
2916
+ requireNonNull(textStyle, 'textStyle');
2917
+
2918
+ if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
2919
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
2987
2920
  }
2988
- }]);
2921
+
2922
+ this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
2923
+
2924
+ return this;
2925
+ };
2989
2926
 
2990
2927
  return CldrDateTimeFormatterBuilder;
2991
2928
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"]);
@@ -3010,12 +2947,6 @@ __webpack_require__.r(__webpack_exports__);
3010
2947
  /* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
3011
2948
  /* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
3012
2949
  /* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
3013
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3014
-
3015
- 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); } }
3016
-
3017
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3018
-
3019
2950
  /*
3020
2951
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
3021
2952
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -3027,218 +2958,210 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
3027
2958
 
3028
2959
  var CldrDateTimeTextProvider = function () {
3029
2960
  function CldrDateTimeTextProvider() {
3030
- _classCallCheck(this, CldrDateTimeTextProvider);
3031
-
3032
2961
  this._cache = {};
3033
2962
  Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])('supplemental/likelySubtags.json');
3034
2963
  }
3035
2964
 
3036
- _createClass(CldrDateTimeTextProvider, [{
3037
- key: "getAvailableLocales",
3038
- value: function getAvailableLocales() {
3039
- if (true) {
3040
- return ["es.*"];
3041
- }
2965
+ var _proto = CldrDateTimeTextProvider.prototype;
3042
2966
 
3043
- return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
2967
+ _proto.getAvailableLocales = function getAvailableLocales() {
2968
+ if (true) {
2969
+ return ["es.*"];
3044
2970
  }
3045
- }, {
3046
- key: "getText",
3047
- value: function getText(field, value, style, locale) {
3048
- var store = this._findStore(field, locale);
3049
2971
 
3050
- if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
3051
- return store.getText(value, style);
3052
- }
2972
+ return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
2973
+ };
3053
2974
 
3054
- return null;
2975
+ _proto.getText = function getText(field, value, style, locale) {
2976
+ var store = this._findStore(field, locale);
2977
+
2978
+ if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2979
+ return store.getText(value, style);
3055
2980
  }
3056
- }, {
3057
- key: "getTextIterator",
3058
- value: function getTextIterator(field, style, locale) {
3059
- var store = this._findStore(field, locale);
3060
2981
 
3061
- if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
3062
- return store.getTextIterator(style);
3063
- }
2982
+ return null;
2983
+ };
3064
2984
 
3065
- return null;
2985
+ _proto.getTextIterator = function getTextIterator(field, style, locale) {
2986
+ var store = this._findStore(field, locale);
2987
+
2988
+ if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2989
+ return store.getTextIterator(style);
3066
2990
  }
3067
- }, {
3068
- key: "_findStore",
3069
- value: function _findStore(field, locale) {
3070
- var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
3071
- var store = this._cache[key];
3072
-
3073
- if (store === undefined) {
3074
- store = this._createStore(field, locale);
3075
- this._cache[key] = store;
3076
- }
3077
2991
 
3078
- return store;
2992
+ return null;
2993
+ };
2994
+
2995
+ _proto._findStore = function _findStore(field, locale) {
2996
+ var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
2997
+ var store = this._cache[key];
2998
+
2999
+ if (store === undefined) {
3000
+ store = this._createStore(field, locale);
3001
+ this._cache[key] = store;
3079
3002
  }
3080
- }, {
3081
- key: "_createStore",
3082
- value: function _createStore(field, locale) {
3083
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/".concat(locale.localeString(), "/ca-gregorian.json"));
3084
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
3085
-
3086
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
3087
- var monthsData = cldr.main('dates/calendars/gregorian/months/format');
3088
- var styleMap = {};
3089
- var data = {};
3090
- data[1] = monthsData.wide[1];
3091
- data[2] = monthsData.wide[2];
3092
- data[3] = monthsData.wide[3];
3093
- data[4] = monthsData.wide[4];
3094
- data[5] = monthsData.wide[5];
3095
- data[6] = monthsData.wide[6];
3096
- data[7] = monthsData.wide[7];
3097
- data[8] = monthsData.wide[8];
3098
- data[9] = monthsData.wide[9];
3099
- data[10] = monthsData.wide[10];
3100
- data[11] = monthsData.wide[11];
3101
- data[12] = monthsData.wide[12];
3102
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
3103
- data = {};
3104
- data[1] = monthsData.narrow[1];
3105
- data[2] = monthsData.narrow[2];
3106
- data[3] = monthsData.narrow[3];
3107
- data[4] = monthsData.narrow[4];
3108
- data[5] = monthsData.narrow[5];
3109
- data[6] = monthsData.narrow[6];
3110
- data[7] = monthsData.narrow[7];
3111
- data[8] = monthsData.narrow[8];
3112
- data[9] = monthsData.narrow[9];
3113
- data[10] = monthsData.narrow[10];
3114
- data[11] = monthsData.narrow[11];
3115
- data[12] = monthsData.narrow[12];
3116
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
3117
- data = {};
3118
- data[1] = monthsData.abbreviated[1];
3119
- data[2] = monthsData.abbreviated[2];
3120
- data[3] = monthsData.abbreviated[3];
3121
- data[4] = monthsData.abbreviated[4];
3122
- data[5] = monthsData.abbreviated[5];
3123
- data[6] = monthsData.abbreviated[6];
3124
- data[7] = monthsData.abbreviated[7];
3125
- data[8] = monthsData.abbreviated[8];
3126
- data[9] = monthsData.abbreviated[9];
3127
- data[10] = monthsData.abbreviated[10];
3128
- data[11] = monthsData.abbreviated[11];
3129
- data[12] = monthsData.abbreviated[12];
3130
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
3131
- return this._createLocaleStore(styleMap);
3132
- }
3133
3003
 
3134
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
3135
- var daysData = cldr.main('dates/calendars/gregorian/days/format');
3136
- var _styleMap = {};
3137
- var _data = {};
3138
- _data[1] = daysData.wide.mon;
3139
- _data[2] = daysData.wide.tue;
3140
- _data[3] = daysData.wide.wed;
3141
- _data[4] = daysData.wide.thu;
3142
- _data[5] = daysData.wide.fri;
3143
- _data[6] = daysData.wide.sat;
3144
- _data[7] = daysData.wide.sun;
3145
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
3146
- _data = {};
3147
- _data[1] = daysData.narrow.mon;
3148
- _data[2] = daysData.narrow.tue;
3149
- _data[3] = daysData.narrow.wed;
3150
- _data[4] = daysData.narrow.thu;
3151
- _data[5] = daysData.narrow.fri;
3152
- _data[6] = daysData.narrow.sat;
3153
- _data[7] = daysData.narrow.sun;
3154
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
3155
- _data = {};
3156
- _data[1] = daysData.abbreviated.mon;
3157
- _data[2] = daysData.abbreviated.tue;
3158
- _data[3] = daysData.abbreviated.wed;
3159
- _data[4] = daysData.abbreviated.thu;
3160
- _data[5] = daysData.abbreviated.fri;
3161
- _data[6] = daysData.abbreviated.sat;
3162
- _data[7] = daysData.abbreviated.sun;
3163
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
3164
- return this._createLocaleStore(_styleMap);
3165
- }
3004
+ return store;
3005
+ };
3166
3006
 
3167
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
3168
- var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
3169
- var _styleMap2 = {};
3170
- var _data2 = {};
3171
- _data2[0] = dayPeriodsData.wide.am;
3172
- _data2[1] = dayPeriodsData.wide.pm;
3173
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
3174
- _data2 = {};
3175
- _data2[0] = dayPeriodsData.narrow.am;
3176
- _data2[1] = dayPeriodsData.narrow.pm;
3177
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
3178
- _data2 = {};
3179
- _data2[0] = dayPeriodsData.abbreviated.am;
3180
- _data2[1] = dayPeriodsData.abbreviated.pm;
3181
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
3182
- return this._createLocaleStore(_styleMap2);
3183
- }
3007
+ _proto._createStore = function _createStore(field, locale) {
3008
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/" + locale.localeString() + "/ca-gregorian.json");
3009
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
3010
+
3011
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
3012
+ var monthsData = cldr.main('dates/calendars/gregorian/months/format');
3013
+ var styleMap = {};
3014
+ var data = {};
3015
+ data[1] = monthsData.wide[1];
3016
+ data[2] = monthsData.wide[2];
3017
+ data[3] = monthsData.wide[3];
3018
+ data[4] = monthsData.wide[4];
3019
+ data[5] = monthsData.wide[5];
3020
+ data[6] = monthsData.wide[6];
3021
+ data[7] = monthsData.wide[7];
3022
+ data[8] = monthsData.wide[8];
3023
+ data[9] = monthsData.wide[9];
3024
+ data[10] = monthsData.wide[10];
3025
+ data[11] = monthsData.wide[11];
3026
+ data[12] = monthsData.wide[12];
3027
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
3028
+ data = {};
3029
+ data[1] = monthsData.narrow[1];
3030
+ data[2] = monthsData.narrow[2];
3031
+ data[3] = monthsData.narrow[3];
3032
+ data[4] = monthsData.narrow[4];
3033
+ data[5] = monthsData.narrow[5];
3034
+ data[6] = monthsData.narrow[6];
3035
+ data[7] = monthsData.narrow[7];
3036
+ data[8] = monthsData.narrow[8];
3037
+ data[9] = monthsData.narrow[9];
3038
+ data[10] = monthsData.narrow[10];
3039
+ data[11] = monthsData.narrow[11];
3040
+ data[12] = monthsData.narrow[12];
3041
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
3042
+ data = {};
3043
+ data[1] = monthsData.abbreviated[1];
3044
+ data[2] = monthsData.abbreviated[2];
3045
+ data[3] = monthsData.abbreviated[3];
3046
+ data[4] = monthsData.abbreviated[4];
3047
+ data[5] = monthsData.abbreviated[5];
3048
+ data[6] = monthsData.abbreviated[6];
3049
+ data[7] = monthsData.abbreviated[7];
3050
+ data[8] = monthsData.abbreviated[8];
3051
+ data[9] = monthsData.abbreviated[9];
3052
+ data[10] = monthsData.abbreviated[10];
3053
+ data[11] = monthsData.abbreviated[11];
3054
+ data[12] = monthsData.abbreviated[12];
3055
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
3056
+ return this._createLocaleStore(styleMap);
3057
+ }
3184
3058
 
3185
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
3186
- var erasData = cldr.main('dates/calendars/gregorian/eras');
3187
- var _styleMap3 = {};
3188
- var _data3 = {};
3189
- _data3[0] = erasData.eraNames['0'];
3190
- _data3[1] = erasData.eraNames['1'];
3191
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
3192
- _data3 = {};
3193
- _data3[0] = erasData.eraNarrow['0'];
3194
- _data3[1] = erasData.eraNarrow['1'];
3195
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
3196
- _data3 = {};
3197
- _data3[0] = erasData.eraAbbr['0'];
3198
- _data3[1] = erasData.eraAbbr['1'];
3199
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
3200
- return this._createLocaleStore(_styleMap3);
3201
- }
3059
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
3060
+ var daysData = cldr.main('dates/calendars/gregorian/days/format');
3061
+ var _styleMap = {};
3062
+ var _data = {};
3063
+ _data[1] = daysData.wide.mon;
3064
+ _data[2] = daysData.wide.tue;
3065
+ _data[3] = daysData.wide.wed;
3066
+ _data[4] = daysData.wide.thu;
3067
+ _data[5] = daysData.wide.fri;
3068
+ _data[6] = daysData.wide.sat;
3069
+ _data[7] = daysData.wide.sun;
3070
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
3071
+ _data = {};
3072
+ _data[1] = daysData.narrow.mon;
3073
+ _data[2] = daysData.narrow.tue;
3074
+ _data[3] = daysData.narrow.wed;
3075
+ _data[4] = daysData.narrow.thu;
3076
+ _data[5] = daysData.narrow.fri;
3077
+ _data[6] = daysData.narrow.sat;
3078
+ _data[7] = daysData.narrow.sun;
3079
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
3080
+ _data = {};
3081
+ _data[1] = daysData.abbreviated.mon;
3082
+ _data[2] = daysData.abbreviated.tue;
3083
+ _data[3] = daysData.abbreviated.wed;
3084
+ _data[4] = daysData.abbreviated.thu;
3085
+ _data[5] = daysData.abbreviated.fri;
3086
+ _data[6] = daysData.abbreviated.sat;
3087
+ _data[7] = daysData.abbreviated.sun;
3088
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
3089
+ return this._createLocaleStore(_styleMap);
3090
+ }
3202
3091
 
3203
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
3204
- var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
3205
- var _styleMap4 = {};
3206
- var _data4 = {};
3207
- _data4[1] = quartersData.wide['1'];
3208
- _data4[2] = quartersData.wide['2'];
3209
- _data4[3] = quartersData.wide['3'];
3210
- _data4[4] = quartersData.wide['4'];
3211
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
3212
- _data4 = {};
3213
- _data4[1] = quartersData.narrow['1'];
3214
- _data4[2] = quartersData.narrow['2'];
3215
- _data4[3] = quartersData.narrow['3'];
3216
- _data4[4] = quartersData.narrow['4'];
3217
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
3218
- _data4 = {};
3219
- _data4[1] = quartersData.abbreviated['1'];
3220
- _data4[2] = quartersData.abbreviated['2'];
3221
- _data4[3] = quartersData.abbreviated['3'];
3222
- _data4[4] = quartersData.abbreviated['4'];
3223
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
3224
- return this._createLocaleStore(_styleMap4);
3225
- }
3092
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
3093
+ var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
3094
+ var _styleMap2 = {};
3095
+ var _data2 = {};
3096
+ _data2[0] = dayPeriodsData.wide.am;
3097
+ _data2[1] = dayPeriodsData.wide.pm;
3098
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
3099
+ _data2 = {};
3100
+ _data2[0] = dayPeriodsData.narrow.am;
3101
+ _data2[1] = dayPeriodsData.narrow.pm;
3102
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
3103
+ _data2 = {};
3104
+ _data2[0] = dayPeriodsData.abbreviated.am;
3105
+ _data2[1] = dayPeriodsData.abbreviated.pm;
3106
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
3107
+ return this._createLocaleStore(_styleMap2);
3108
+ }
3226
3109
 
3227
- return null;
3110
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
3111
+ var erasData = cldr.main('dates/calendars/gregorian/eras');
3112
+ var _styleMap3 = {};
3113
+ var _data3 = {};
3114
+ _data3[0] = erasData.eraNames['0'];
3115
+ _data3[1] = erasData.eraNames['1'];
3116
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
3117
+ _data3 = {};
3118
+ _data3[0] = erasData.eraNarrow['0'];
3119
+ _data3[1] = erasData.eraNarrow['1'];
3120
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
3121
+ _data3 = {};
3122
+ _data3[0] = erasData.eraAbbr['0'];
3123
+ _data3[1] = erasData.eraAbbr['1'];
3124
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
3125
+ return this._createLocaleStore(_styleMap3);
3228
3126
  }
3229
- }, {
3230
- key: "_createLocaleStore",
3231
- value: function _createLocaleStore(valueTextMap) {
3232
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
3233
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
3234
-
3235
- 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) {
3236
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
3237
- }
3238
3127
 
3239
- return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
3128
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
3129
+ var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
3130
+ var _styleMap4 = {};
3131
+ var _data4 = {};
3132
+ _data4[1] = quartersData.wide['1'];
3133
+ _data4[2] = quartersData.wide['2'];
3134
+ _data4[3] = quartersData.wide['3'];
3135
+ _data4[4] = quartersData.wide['4'];
3136
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
3137
+ _data4 = {};
3138
+ _data4[1] = quartersData.narrow['1'];
3139
+ _data4[2] = quartersData.narrow['2'];
3140
+ _data4[3] = quartersData.narrow['3'];
3141
+ _data4[4] = quartersData.narrow['4'];
3142
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
3143
+ _data4 = {};
3144
+ _data4[1] = quartersData.abbreviated['1'];
3145
+ _data4[2] = quartersData.abbreviated['2'];
3146
+ _data4[3] = quartersData.abbreviated['3'];
3147
+ _data4[4] = quartersData.abbreviated['4'];
3148
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
3149
+ return this._createLocaleStore(_styleMap4);
3150
+ }
3151
+
3152
+ return null;
3153
+ };
3154
+
3155
+ _proto._createLocaleStore = function _createLocaleStore(valueTextMap) {
3156
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
3157
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
3158
+
3159
+ 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) {
3160
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
3240
3161
  }
3241
- }]);
3162
+
3163
+ return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
3164
+ };
3242
3165
 
3243
3166
  return CldrDateTimeTextProvider;
3244
3167
  }();
@@ -3260,18 +3183,12 @@ __webpack_require__.r(__webpack_exports__);
3260
3183
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
3261
3184
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
3262
3185
  /* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
3263
- 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; } } }; }
3186
+ 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."); }
3264
3187
 
3265
3188
  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); }
3266
3189
 
3267
3190
  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; }
3268
3191
 
3269
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3270
-
3271
- 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); } }
3272
-
3273
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3274
-
3275
3192
  /*
3276
3193
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
3277
3194
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -3296,8 +3213,6 @@ var resolveZoneIdTextCache = {};
3296
3213
 
3297
3214
  var CldrZoneTextPrinterParser = function () {
3298
3215
  function CldrZoneTextPrinterParser(textStyle) {
3299
- _classCallCheck(this, CldrZoneTextPrinterParser);
3300
-
3301
3216
  requireNonNull(textStyle, 'textStyle');
3302
3217
  requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
3303
3218
  this._textStyle = textStyle;
@@ -3306,202 +3221,178 @@ var CldrZoneTextPrinterParser = function () {
3306
3221
  Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/metaZones.json');
3307
3222
  }
3308
3223
 
3309
- _createClass(CldrZoneTextPrinterParser, [{
3310
- key: "_cachedResolveZoneIdText",
3311
- value: function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
3312
- if (resolveZoneIdTextCache[cldr.locale] == null) {
3313
- resolveZoneIdTextCache[cldr.locale] = {};
3314
- }
3224
+ var _proto = CldrZoneTextPrinterParser.prototype;
3315
3225
 
3316
- var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
3226
+ _proto._cachedResolveZoneIdText = function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
3227
+ if (resolveZoneIdTextCache[cldr.locale] == null) {
3228
+ resolveZoneIdTextCache[cldr.locale] = {};
3229
+ }
3317
3230
 
3318
- if (zoneIdToStyle[zoneId] == null) {
3319
- zoneIdToStyle[zoneId] = {};
3320
- }
3231
+ var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
3321
3232
 
3322
- var styleToType = zoneIdToStyle[zoneId];
3233
+ if (zoneIdToStyle[zoneId] == null) {
3234
+ zoneIdToStyle[zoneId] = {};
3235
+ }
3323
3236
 
3324
- if (styleToType[style] == null) {
3325
- styleToType[style] = {};
3326
- }
3237
+ var styleToType = zoneIdToStyle[zoneId];
3327
3238
 
3328
- var typeToResolvedZoneIdText = styleToType[style];
3239
+ if (styleToType[style] == null) {
3240
+ styleToType[style] = {};
3241
+ }
3329
3242
 
3330
- if (typeToResolvedZoneIdText[type] == null) {
3331
- typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
3332
- }
3243
+ var typeToResolvedZoneIdText = styleToType[style];
3333
3244
 
3334
- return typeToResolvedZoneIdText[type];
3245
+ if (typeToResolvedZoneIdText[type] == null) {
3246
+ typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
3335
3247
  }
3336
- }, {
3337
- key: "_resolveZoneIdText",
3338
- value: function _resolveZoneIdText(cldr, zoneId, style, type) {
3339
- var zoneData = cldr.main("dates/timeZoneNames/zone/".concat(zoneId, "/").concat(style, "/").concat(type));
3340
3248
 
3341
- if (zoneData) {
3342
- return zoneData;
3343
- } else {
3344
- var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/".concat(zoneId));
3249
+ return typeToResolvedZoneIdText[type];
3250
+ };
3251
+
3252
+ _proto._resolveZoneIdText = function _resolveZoneIdText(cldr, zoneId, style, type) {
3253
+ var zoneData = cldr.main("dates/timeZoneNames/zone/" + zoneId + "/" + style + "/" + type);
3254
+
3255
+ if (zoneData) {
3256
+ return zoneData;
3257
+ } else {
3258
+ var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/" + zoneId);
3259
+
3260
+ if (metazoneInfo) {
3261
+ var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
3262
+ var metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/" + type);
3345
3263
 
3346
- if (metazoneInfo) {
3347
- var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
3348
- var metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/").concat(type));
3264
+ if (metaZoneData) {
3265
+ return metaZoneData;
3266
+ } else {
3267
+ metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/generic");
3268
+
3269
+ if (!metaZoneData) {
3270
+ metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/standard");
3271
+ }
3349
3272
 
3350
3273
  if (metaZoneData) {
3351
3274
  return metaZoneData;
3352
3275
  } else {
3353
- metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/generic"));
3354
-
3355
- if (!metaZoneData) {
3356
- metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/standard"));
3357
- }
3276
+ var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
3277
+ var preferredZone = mapZones[metazone][cldr.attributes.territory];
3358
3278
 
3359
- if (metaZoneData) {
3360
- return metaZoneData;
3279
+ if (preferredZone) {
3280
+ if (preferredZone !== zoneId) {
3281
+ return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
3282
+ }
3361
3283
  } else {
3362
- var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
3363
- var preferredZone = mapZones[metazone][cldr.attributes.territory];
3364
-
3365
- if (preferredZone) {
3366
- if (preferredZone !== zoneId) {
3367
- return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
3368
- }
3369
- } else {
3370
- var goldenZone = mapZones[metazone]['001'];
3371
-
3372
- if (goldenZone !== zoneId) {
3373
- return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
3374
- }
3284
+ var goldenZone = mapZones[metazone]['001'];
3285
+
3286
+ if (goldenZone !== zoneId) {
3287
+ return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
3375
3288
  }
3376
3289
  }
3377
3290
  }
3378
3291
  }
3379
3292
  }
3380
3293
  }
3381
- }, {
3382
- key: "print",
3383
- value: function print(context, buf) {
3384
- var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
3385
-
3386
- if (zone == null) {
3387
- return false;
3388
- }
3389
-
3390
- if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
3391
- buf.append(zone.id());
3392
- return true;
3393
- }
3394
-
3395
- var daylight = false;
3396
- var hasDaylightSupport = false;
3397
- var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
3398
- var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
3399
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(context.locale().localeString(), "/timeZoneNames.json"));
3400
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
3294
+ };
3401
3295
 
3402
- var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
3296
+ _proto.print = function print(context, buf) {
3297
+ var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
3403
3298
 
3404
- if (text) {
3405
- buf.append(text);
3406
- } else {
3407
- buf.append(zone.id());
3408
- }
3299
+ if (zone == null) {
3300
+ return false;
3301
+ }
3409
3302
 
3303
+ if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
3304
+ buf.append(zone.id());
3410
3305
  return true;
3411
3306
  }
3412
- }, {
3413
- key: "_resolveZoneIds",
3414
- value: function _resolveZoneIds(localString) {
3415
- if (this._zoneIdsLocales[localString] != null) {
3416
- return this._zoneIdsLocales[localString];
3417
- }
3418
3307
 
3419
- var ids = {};
3420
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(localString, "/timeZoneNames.json"));
3421
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
3308
+ var daylight = false;
3309
+ var hasDaylightSupport = false;
3310
+ var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
3311
+ var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
3312
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + context.locale().localeString() + "/timeZoneNames.json");
3313
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
3422
3314
 
3423
- var _iterator = _createForOfIteratorHelper(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()),
3424
- _step;
3315
+ var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
3425
3316
 
3426
- try {
3427
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
3428
- var id = _step.value;
3429
- ids[id] = id;
3430
- var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
3317
+ if (text) {
3318
+ buf.append(text);
3319
+ } else {
3320
+ buf.append(zone.id());
3321
+ }
3431
3322
 
3432
- var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
3323
+ return true;
3324
+ };
3433
3325
 
3434
- if (genericText) {
3435
- ids[genericText] = id;
3436
- }
3326
+ _proto._resolveZoneIds = function _resolveZoneIds(localString) {
3327
+ if (this._zoneIdsLocales[localString] != null) {
3328
+ return this._zoneIdsLocales[localString];
3329
+ }
3437
3330
 
3438
- var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
3331
+ var ids = {};
3332
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + localString + "/timeZoneNames.json");
3333
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
3439
3334
 
3440
- if (standardText) {
3441
- ids[standardText] = id;
3442
- }
3335
+ for (var _iterator = _createForOfIteratorHelperLoose(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()), _step; !(_step = _iterator()).done;) {
3336
+ var id = _step.value;
3337
+ ids[id] = id;
3338
+ var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
3443
3339
 
3444
- var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
3340
+ var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
3445
3341
 
3446
- if (daylightText) {
3447
- ids[daylightText] = id;
3448
- }
3449
- }
3450
- } catch (err) {
3451
- _iterator.e(err);
3452
- } finally {
3453
- _iterator.f();
3342
+ if (genericText) {
3343
+ ids[genericText] = id;
3454
3344
  }
3455
3345
 
3456
- var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
3457
- this._zoneIdsLocales[localString] = {
3458
- ids: ids,
3459
- sortedKeys: sortedKeys
3460
- };
3461
- return this._zoneIdsLocales[localString];
3462
- }
3463
- }, {
3464
- key: "parse",
3465
- value: function parse(context, text, position) {
3466
- for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
3467
- var name = _arr[_i];
3468
-
3469
- if (context.subSequenceEquals(text, position, name, 0, name.length)) {
3470
- context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
3471
- return position + name.length;
3472
- }
3346
+ var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
3347
+
3348
+ if (standardText) {
3349
+ ids[standardText] = id;
3473
3350
  }
3474
3351
 
3475
- var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
3476
- ids = _this$_resolveZoneIds.ids,
3477
- sortedKeys = _this$_resolveZoneIds.sortedKeys;
3352
+ var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
3478
3353
 
3479
- var _iterator2 = _createForOfIteratorHelper(sortedKeys),
3480
- _step2;
3354
+ if (daylightText) {
3355
+ ids[daylightText] = id;
3356
+ }
3357
+ }
3481
3358
 
3482
- try {
3483
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
3484
- var _name = _step2.value;
3359
+ var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
3360
+ this._zoneIdsLocales[localString] = {
3361
+ ids: ids,
3362
+ sortedKeys: sortedKeys
3363
+ };
3364
+ return this._zoneIdsLocales[localString];
3365
+ };
3485
3366
 
3486
- if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
3487
- context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
3488
- return position + _name.length;
3489
- }
3490
- }
3491
- } catch (err) {
3492
- _iterator2.e(err);
3493
- } finally {
3494
- _iterator2.f();
3495
- }
3367
+ _proto.parse = function parse(context, text, position) {
3368
+ for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
3369
+ var name = _arr[_i];
3496
3370
 
3497
- return ~position;
3371
+ if (context.subSequenceEquals(text, position, name, 0, name.length)) {
3372
+ context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
3373
+ return position + name.length;
3374
+ }
3498
3375
  }
3499
- }, {
3500
- key: "toString",
3501
- value: function toString() {
3502
- return "ZoneText(".concat(this._textStyle, ")");
3376
+
3377
+ var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
3378
+ ids = _this$_resolveZoneIds.ids,
3379
+ sortedKeys = _this$_resolveZoneIds.sortedKeys;
3380
+
3381
+ for (var _iterator2 = _createForOfIteratorHelperLoose(sortedKeys), _step2; !(_step2 = _iterator2()).done;) {
3382
+ var _name = _step2.value;
3383
+
3384
+ if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
3385
+ context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
3386
+ return position + _name.length;
3387
+ }
3503
3388
  }
3504
- }]);
3389
+
3390
+ return ~position;
3391
+ };
3392
+
3393
+ _proto.toString = function toString() {
3394
+ return "ZoneText(" + this._textStyle + ")";
3395
+ };
3505
3396
 
3506
3397
  return CldrZoneTextPrinterParser;
3507
3398
  }();
@@ -3522,12 +3413,6 @@ __webpack_require__.r(__webpack_exports__);
3522
3413
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocalizedOffsetPrinterParser; });
3523
3414
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
3524
3415
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
3525
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3526
-
3527
- 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); } }
3528
-
3529
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3530
-
3531
3416
  /**
3532
3417
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
3533
3418
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -3538,180 +3423,174 @@ var MathUtil = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].MathUtil;
3538
3423
 
3539
3424
  var LocalizedOffsetPrinterParser = function () {
3540
3425
  function LocalizedOffsetPrinterParser(textStyle) {
3541
- _classCallCheck(this, LocalizedOffsetPrinterParser);
3542
-
3543
3426
  this._textStyle = textStyle;
3544
3427
  }
3545
3428
 
3546
- _createClass(LocalizedOffsetPrinterParser, [{
3547
- key: "textStyle",
3548
- value: function textStyle() {
3549
- return this._textStyle;
3550
- }
3551
- }, {
3552
- key: "print",
3553
- value: function print(context, buf) {
3554
- var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
3429
+ var _proto = LocalizedOffsetPrinterParser.prototype;
3555
3430
 
3556
- if (offsetSecs == null) {
3557
- return false;
3558
- }
3431
+ _proto.textStyle = function textStyle() {
3432
+ return this._textStyle;
3433
+ };
3559
3434
 
3560
- buf.append('GMT');
3435
+ _proto.print = function print(context, buf) {
3436
+ var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
3561
3437
 
3562
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3563
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
3564
- }
3438
+ if (offsetSecs == null) {
3439
+ return false;
3440
+ }
3565
3441
 
3566
- var totalSecs = MathUtil.safeToInt(offsetSecs);
3442
+ buf.append('GMT');
3567
3443
 
3568
- if (totalSecs !== 0) {
3569
- var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
3570
- var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
3571
- var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
3572
- buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
3444
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3445
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
3446
+ }
3573
3447
 
3574
- if (absMinutes > 0 || absSeconds > 0) {
3575
- buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
3448
+ var totalSecs = MathUtil.safeToInt(offsetSecs);
3576
3449
 
3577
- if (absSeconds > 0) {
3578
- buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
3579
- }
3450
+ if (totalSecs !== 0) {
3451
+ var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
3452
+ var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
3453
+ var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
3454
+ buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
3455
+
3456
+ if (absMinutes > 0 || absSeconds > 0) {
3457
+ buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
3458
+
3459
+ if (absSeconds > 0) {
3460
+ buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
3580
3461
  }
3581
3462
  }
3582
-
3583
- return true;
3584
3463
  }
3585
- }, {
3586
- key: "parse",
3587
- value: function parse(context, text, position) {
3588
- if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
3589
- return ~position;
3590
- }
3591
3464
 
3592
- position += 3;
3465
+ return true;
3466
+ };
3593
3467
 
3594
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3595
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
3596
- }
3468
+ _proto.parse = function parse(context, text, position) {
3469
+ if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
3470
+ return ~position;
3471
+ }
3597
3472
 
3598
- var end = text.length;
3473
+ position += 3;
3599
3474
 
3600
- if (position === end) {
3601
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
3602
- }
3475
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3476
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
3477
+ }
3603
3478
 
3604
- var sign = text.charAt(position);
3479
+ var end = text.length;
3605
3480
 
3606
- if (sign !== '+' && sign !== '-') {
3607
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
3608
- }
3481
+ if (position === end) {
3482
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
3483
+ }
3609
3484
 
3610
- var negative = sign === '-' ? -1 : 1;
3485
+ var sign = text.charAt(position);
3611
3486
 
3612
- if (position === end) {
3613
- return ~position;
3614
- }
3487
+ if (sign !== '+' && sign !== '-') {
3488
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
3489
+ }
3615
3490
 
3616
- position++;
3617
- var ch = text.charAt(position);
3491
+ var negative = sign === '-' ? -1 : 1;
3618
3492
 
3619
- if (ch < '0' || ch > '9') {
3620
- return ~position;
3621
- }
3493
+ if (position === end) {
3494
+ return ~position;
3495
+ }
3496
+
3497
+ position++;
3498
+ var ch = text.charAt(position);
3622
3499
 
3623
- position++;
3624
- var hour = MathUtil.parseInt(ch);
3500
+ if (ch < '0' || ch > '9') {
3501
+ return ~position;
3502
+ }
3625
3503
 
3626
- if (position !== end) {
3627
- ch = text.charAt(position);
3504
+ position++;
3505
+ var hour = MathUtil.parseInt(ch);
3628
3506
 
3629
- if (ch >= '0' && ch <= '9') {
3630
- hour = hour * 10 + MathUtil.parseInt(ch);
3507
+ if (position !== end) {
3508
+ ch = text.charAt(position);
3631
3509
 
3632
- if (hour > 23) {
3633
- return ~position;
3634
- }
3510
+ if (ch >= '0' && ch <= '9') {
3511
+ hour = hour * 10 + MathUtil.parseInt(ch);
3635
3512
 
3636
- position++;
3513
+ if (hour > 23) {
3514
+ return ~position;
3637
3515
  }
3516
+
3517
+ position++;
3638
3518
  }
3519
+ }
3639
3520
 
3640
- if (position === end || text.charAt(position) !== ':') {
3641
- var _offset = negative * 3600 * hour;
3521
+ if (position === end || text.charAt(position) !== ':') {
3522
+ var _offset = negative * 3600 * hour;
3642
3523
 
3643
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
3644
- }
3524
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
3525
+ }
3645
3526
 
3646
- position++;
3527
+ position++;
3647
3528
 
3648
- if (position > end - 2) {
3649
- return ~position;
3650
- }
3529
+ if (position > end - 2) {
3530
+ return ~position;
3531
+ }
3651
3532
 
3652
- ch = text.charAt(position);
3533
+ ch = text.charAt(position);
3653
3534
 
3654
- if (ch < '0' || ch > '9') {
3655
- return ~position;
3656
- }
3535
+ if (ch < '0' || ch > '9') {
3536
+ return ~position;
3537
+ }
3657
3538
 
3658
- position++;
3659
- var min = MathUtil.parseInt(ch);
3660
- ch = text.charAt(position);
3539
+ position++;
3540
+ var min = MathUtil.parseInt(ch);
3541
+ ch = text.charAt(position);
3661
3542
 
3662
- if (ch < '0' || ch > '9') {
3663
- return ~position;
3664
- }
3665
-
3666
- position++;
3667
- min = min * 10 + MathUtil.parseInt(ch);
3543
+ if (ch < '0' || ch > '9') {
3544
+ return ~position;
3545
+ }
3668
3546
 
3669
- if (min > 59) {
3670
- return ~position;
3671
- }
3547
+ position++;
3548
+ min = min * 10 + MathUtil.parseInt(ch);
3672
3549
 
3673
- if (position === end || text.charAt(position) !== ':') {
3674
- var _offset2 = negative * (3600 * hour + 60 * min);
3550
+ if (min > 59) {
3551
+ return ~position;
3552
+ }
3675
3553
 
3676
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
3677
- }
3554
+ if (position === end || text.charAt(position) !== ':') {
3555
+ var _offset2 = negative * (3600 * hour + 60 * min);
3678
3556
 
3679
- position++;
3557
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
3558
+ }
3680
3559
 
3681
- if (position > end - 2) {
3682
- return ~position;
3683
- }
3560
+ position++;
3684
3561
 
3685
- ch = text.charAt(position);
3562
+ if (position > end - 2) {
3563
+ return ~position;
3564
+ }
3686
3565
 
3687
- if (ch < '0' || ch > '9') {
3688
- return ~position;
3689
- }
3566
+ ch = text.charAt(position);
3690
3567
 
3691
- position++;
3692
- var sec = MathUtil.parseInt(ch);
3693
- ch = text.charAt(position);
3568
+ if (ch < '0' || ch > '9') {
3569
+ return ~position;
3570
+ }
3694
3571
 
3695
- if (ch < '0' || ch > '9') {
3696
- return ~position;
3697
- }
3572
+ position++;
3573
+ var sec = MathUtil.parseInt(ch);
3574
+ ch = text.charAt(position);
3698
3575
 
3699
- position++;
3700
- sec = sec * 10 + MathUtil.parseInt(ch);
3576
+ if (ch < '0' || ch > '9') {
3577
+ return ~position;
3578
+ }
3701
3579
 
3702
- if (sec > 59) {
3703
- return ~position;
3704
- }
3580
+ position++;
3581
+ sec = sec * 10 + MathUtil.parseInt(ch);
3705
3582
 
3706
- var offset = negative * (3600 * hour + 60 * min + sec);
3707
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
3708
- }
3709
- }, {
3710
- key: "toString",
3711
- value: function toString() {
3712
- return "LocalizedOffset(".concat(this._textStyle, ")");
3583
+ if (sec > 59) {
3584
+ return ~position;
3713
3585
  }
3714
- }]);
3586
+
3587
+ var offset = negative * (3600 * hour + 60 * min + sec);
3588
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
3589
+ };
3590
+
3591
+ _proto.toString = function toString() {
3592
+ return "LocalizedOffset(" + this._textStyle + ")";
3593
+ };
3715
3594
 
3716
3595
  return LocalizedOffsetPrinterParser;
3717
3596
  }();
@@ -3732,18 +3611,12 @@ __webpack_require__.r(__webpack_exports__);
3732
3611
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPrinterParser; });
3733
3612
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
3734
3613
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
3735
- 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; } } }; }
3614
+ 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."); }
3736
3615
 
3737
3616
  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); }
3738
3617
 
3739
3618
  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; }
3740
3619
 
3741
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3742
-
3743
- 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); } }
3744
-
3745
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3746
-
3747
3620
  /**
3748
3621
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
3749
3622
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -3753,104 +3626,86 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
3753
3626
 
3754
3627
  var TextPrinterParser = function () {
3755
3628
  function TextPrinterParser(field, textStyle, provider) {
3756
- _classCallCheck(this, TextPrinterParser);
3757
-
3758
3629
  this._field = field;
3759
3630
  this._textStyle = textStyle;
3760
3631
  this._provider = provider;
3761
3632
  }
3762
3633
 
3763
- _createClass(TextPrinterParser, [{
3764
- key: "field",
3765
- value: function field() {
3766
- return this._field;
3767
- }
3768
- }, {
3769
- key: "textStyle",
3770
- value: function textStyle() {
3771
- return this._textStyle;
3772
- }
3773
- }, {
3774
- key: "provider",
3775
- value: function provider() {
3776
- return this._provider;
3777
- }
3778
- }, {
3779
- key: "print",
3780
- value: function print(context, buf) {
3781
- var value = context.getValue(this._field);
3634
+ var _proto = TextPrinterParser.prototype;
3782
3635
 
3783
- if (value === null) {
3784
- return false;
3785
- }
3636
+ _proto.field = function field() {
3637
+ return this._field;
3638
+ };
3786
3639
 
3787
- var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
3640
+ _proto.textStyle = function textStyle() {
3641
+ return this._textStyle;
3642
+ };
3788
3643
 
3789
- if (text === null) {
3790
- return this._numberPrinterParser().print(context, buf);
3791
- }
3644
+ _proto.provider = function provider() {
3645
+ return this._provider;
3646
+ };
3792
3647
 
3793
- buf.append(text);
3794
- return true;
3648
+ _proto.print = function print(context, buf) {
3649
+ var value = context.getValue(this._field);
3650
+
3651
+ if (value === null) {
3652
+ return false;
3795
3653
  }
3796
- }, {
3797
- key: "parse",
3798
- value: function parse(context, parseText, position) {
3799
- var length = parseText.length;
3800
3654
 
3801
- if (position < 0 || position > length) {
3802
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: ".concat(position));
3803
- }
3655
+ var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
3656
+
3657
+ if (text === null) {
3658
+ return this._numberPrinterParser().print(context, buf);
3659
+ }
3804
3660
 
3805
- var style = context.isStrict() ? this._textStyle : null;
3661
+ buf.append(text);
3662
+ return true;
3663
+ };
3806
3664
 
3807
- var it = this._provider.getTextIterator(this._field, style, context.locale());
3665
+ _proto.parse = function parse(context, parseText, position) {
3666
+ var length = parseText.length;
3808
3667
 
3809
- if (it != null) {
3810
- var _iterator = _createForOfIteratorHelper(it),
3811
- _step;
3668
+ if (position < 0 || position > length) {
3669
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: " + position);
3670
+ }
3812
3671
 
3813
- try {
3814
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
3815
- var entry = _step.value;
3816
- var itText = entry.key;
3672
+ var style = context.isStrict() ? this._textStyle : null;
3817
3673
 
3818
- if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
3819
- return context.setParsedField(this._field, entry.value, position, position + itText.length);
3820
- }
3821
- }
3822
- } catch (err) {
3823
- _iterator.e(err);
3824
- } finally {
3825
- _iterator.f();
3826
- }
3674
+ var it = this._provider.getTextIterator(this._field, style, context.locale());
3827
3675
 
3828
- if (context.isStrict()) {
3829
- return ~position;
3676
+ if (it != null) {
3677
+ for (var _iterator = _createForOfIteratorHelperLoose(it), _step; !(_step = _iterator()).done;) {
3678
+ var entry = _step.value;
3679
+ var itText = entry.key;
3680
+
3681
+ if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
3682
+ return context.setParsedField(this._field, entry.value, position, position + itText.length);
3830
3683
  }
3831
3684
  }
3832
3685
 
3833
- return this._numberPrinterParser().parse(context, parseText, position);
3834
- }
3835
- }, {
3836
- key: "_numberPrinterParser",
3837
- value: function _numberPrinterParser() {
3838
- if (this._currentNumberPrinterParser == null) {
3839
- 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);
3686
+ if (context.isStrict()) {
3687
+ return ~position;
3840
3688
  }
3689
+ }
3690
+
3691
+ return this._numberPrinterParser().parse(context, parseText, position);
3692
+ };
3841
3693
 
3842
- return this._currentNumberPrinterParser;
3694
+ _proto._numberPrinterParser = function _numberPrinterParser() {
3695
+ if (this._currentNumberPrinterParser == null) {
3696
+ 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);
3843
3697
  }
3844
- }, {
3845
- key: "toString",
3846
- value: function toString() {
3847
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3848
- return "Text(".concat(this._field, ")");
3849
- }
3850
3698
 
3851
- return "Text(".concat(this._field, ",").concat(this._textStyle, ")");
3699
+ return this._currentNumberPrinterParser;
3700
+ };
3701
+
3702
+ _proto.toString = function toString() {
3703
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3704
+ return "Text(" + this._field + ")";
3852
3705
  }
3853
- }]);
3706
+
3707
+ return "Text(" + this._field + "," + this._textStyle + ")";
3708
+ };
3854
3709
 
3855
3710
  return TextPrinterParser;
3856
3711
  }();
@@ -3872,12 +3727,6 @@ __webpack_require__.r(__webpack_exports__);
3872
3727
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
3873
3728
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
3874
3729
  /* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../temporal/WeekFields */ "./src/temporal/WeekFields.js");
3875
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3876
-
3877
- 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); } }
3878
-
3879
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3880
-
3881
3730
  /*
3882
3731
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
3883
3732
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -3888,95 +3737,89 @@ var StringBuilder = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].StringBuilde
3888
3737
 
3889
3738
  var WeekFieldsPrinterParser = function () {
3890
3739
  function WeekFieldsPrinterParser(letter, count) {
3891
- _classCallCheck(this, WeekFieldsPrinterParser);
3892
-
3893
3740
  this._letter = letter;
3894
3741
  this._count = count;
3895
3742
  }
3896
3743
 
3897
- _createClass(WeekFieldsPrinterParser, [{
3898
- key: "print",
3899
- value: function print(context, buf) {
3900
- var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3744
+ var _proto = WeekFieldsPrinterParser.prototype;
3901
3745
 
3902
- var pp = this._evaluate(weekFields);
3746
+ _proto.print = function print(context, buf) {
3747
+ var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3903
3748
 
3904
- return pp.print(context, buf);
3905
- }
3906
- }, {
3907
- key: "parse",
3908
- value: function parse(context, text, position) {
3909
- var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3749
+ var pp = this._evaluate(weekFields);
3910
3750
 
3911
- var pp = this._evaluate(weekFields);
3751
+ return pp.print(context, buf);
3752
+ };
3912
3753
 
3913
- return pp.parse(context, text, position);
3914
- }
3915
- }, {
3916
- key: "_evaluate",
3917
- value: function _evaluate(weekFields) {
3918
- var pp = null;
3919
-
3920
- switch (this._letter) {
3921
- case 'e':
3922
- 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);
3923
- break;
3924
-
3925
- case 'c':
3926
- 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);
3927
- break;
3928
-
3929
- case 'w':
3930
- 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);
3931
- break;
3932
-
3933
- case 'W':
3934
- 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);
3935
- break;
3936
-
3937
- case 'Y':
3938
- if (this._count === 2) {
3939
- 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);
3940
- } else {
3941
- 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);
3942
- }
3754
+ _proto.parse = function parse(context, text, position) {
3755
+ var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3943
3756
 
3944
- break;
3945
- }
3757
+ var pp = this._evaluate(weekFields);
3946
3758
 
3947
- return pp;
3948
- }
3949
- }, {
3950
- key: "toString",
3951
- value: function toString() {
3952
- var sb = new StringBuilder(30);
3953
- sb.append('Localized(');
3954
-
3955
- if (this._letter === 'Y') {
3956
- if (this._count === 1) {
3957
- sb.append('WeekBasedYear');
3958
- } else if (this._count === 2) {
3959
- sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
3759
+ return pp.parse(context, text, position);
3760
+ };
3761
+
3762
+ _proto._evaluate = function _evaluate(weekFields) {
3763
+ var pp = null;
3764
+
3765
+ switch (this._letter) {
3766
+ case 'e':
3767
+ 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);
3768
+ break;
3769
+
3770
+ case 'c':
3771
+ 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);
3772
+ break;
3773
+
3774
+ case 'w':
3775
+ 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);
3776
+ break;
3777
+
3778
+ case 'W':
3779
+ 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);
3780
+ break;
3781
+
3782
+ case 'Y':
3783
+ if (this._count === 2) {
3784
+ 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);
3960
3785
  } else {
3961
- 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);
3962
- }
3963
- } else {
3964
- if (this._letter === 'c' || this._letter === 'e') {
3965
- sb.append('DayOfWeek');
3966
- } else if (this._letter === 'w') {
3967
- sb.append('WeekOfWeekBasedYear');
3968
- } else if (this._letter === 'W') {
3969
- sb.append('WeekOfMonth');
3786
+ 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);
3970
3787
  }
3971
3788
 
3972
- sb.append(',');
3973
- sb.append(this._count);
3789
+ break;
3790
+ }
3791
+
3792
+ return pp;
3793
+ };
3794
+
3795
+ _proto.toString = function toString() {
3796
+ var sb = new StringBuilder(30);
3797
+ sb.append('Localized(');
3798
+
3799
+ if (this._letter === 'Y') {
3800
+ if (this._count === 1) {
3801
+ sb.append('WeekBasedYear');
3802
+ } else if (this._count === 2) {
3803
+ sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
3804
+ } else {
3805
+ 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);
3806
+ }
3807
+ } else {
3808
+ if (this._letter === 'c' || this._letter === 'e') {
3809
+ sb.append('DayOfWeek');
3810
+ } else if (this._letter === 'w') {
3811
+ sb.append('WeekOfWeekBasedYear');
3812
+ } else if (this._letter === 'W') {
3813
+ sb.append('WeekOfMonth');
3974
3814
  }
3975
3815
 
3976
- sb.append(')');
3977
- return sb.toString();
3816
+ sb.append(',');
3817
+ sb.append(this._count);
3978
3818
  }
3979
- }]);
3819
+
3820
+ sb.append(')');
3821
+ return sb.toString();
3822
+ };
3980
3823
 
3981
3824
  return WeekFieldsPrinterParser;
3982
3825
  }();
@@ -4065,12 +3908,6 @@ __webpack_require__.r(__webpack_exports__);
4065
3908
  /* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
4066
3909
  /* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cldrjs */ "./node_modules/cldrjs/dist/node_main.js");
4067
3910
  /* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cldrjs__WEBPACK_IMPORTED_MODULE_2__);
4068
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4069
-
4070
- 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); } }
4071
-
4072
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
4073
-
4074
3911
  /*
4075
3912
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
4076
3913
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -4097,9 +3934,27 @@ var _weekDayMap = {
4097
3934
  'sun': _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"].SUNDAY
4098
3935
  };
4099
3936
  var ComputedDayOfField = function () {
4100
- function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
4101
- _classCallCheck(this, ComputedDayOfField);
3937
+ ComputedDayOfField.ofDayOfWeekField = function ofDayOfWeekField(weekDef) {
3938
+ 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);
3939
+ };
3940
+
3941
+ ComputedDayOfField.ofWeekOfMonthField = function ofWeekOfMonthField(weekDef) {
3942
+ 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);
3943
+ };
3944
+
3945
+ ComputedDayOfField.ofWeekOfYearField = function ofWeekOfYearField(weekDef) {
3946
+ 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);
3947
+ };
3948
+
3949
+ ComputedDayOfField.ofWeekOfWeekBasedYearField = function ofWeekOfWeekBasedYearField(weekDef) {
3950
+ 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);
3951
+ };
3952
+
3953
+ ComputedDayOfField.ofWeekBasedYearField = function ofWeekBasedYearField(weekDef) {
3954
+ 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);
3955
+ };
4102
3956
 
3957
+ function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
4103
3958
  this._name = name;
4104
3959
  this._weekDef = weekDef;
4105
3960
  this._baseUnit = baseUnit;
@@ -4107,484 +3962,482 @@ var ComputedDayOfField = function () {
4107
3962
  this._range = range;
4108
3963
  }
4109
3964
 
4110
- _createClass(ComputedDayOfField, [{
4111
- key: "getFrom",
4112
- value: function getFrom(temporal) {
4113
- var sow = this._weekDef.firstDayOfWeek().value();
4114
-
4115
- var dow = this._localizedDayOfWeek(temporal, sow);
4116
-
4117
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
4118
- return dow;
4119
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
4120
- return this._localizedWeekOfMonth(temporal, dow);
4121
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
4122
- return this._localizedWeekOfYear(temporal, dow);
4123
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
4124
- return this._localizedWOWBY(temporal);
4125
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
4126
- return this._localizedWBY(temporal);
4127
- } else {
4128
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
4129
- }
3965
+ var _proto = ComputedDayOfField.prototype;
3966
+
3967
+ _proto.getFrom = function getFrom(temporal) {
3968
+ var sow = this._weekDef.firstDayOfWeek().value();
3969
+
3970
+ var dow = this._localizedDayOfWeek(temporal, sow);
3971
+
3972
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3973
+ return dow;
3974
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3975
+ return this._localizedWeekOfMonth(temporal, dow);
3976
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3977
+ return this._localizedWeekOfYear(temporal, dow);
3978
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3979
+ return this._localizedWOWBY(temporal);
3980
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3981
+ return this._localizedWBY(temporal);
3982
+ } else {
3983
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
4130
3984
  }
4131
- }, {
4132
- key: "_localizedDayOfWeek",
4133
- value: function _localizedDayOfWeek(temporal, sow) {
4134
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4135
- return MathUtil.floorMod(isoDow - sow, 7) + 1;
4136
- }
4137
- }, {
4138
- key: "_localizedWeekOfMonth",
4139
- value: function _localizedWeekOfMonth(temporal, dow) {
4140
- var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3985
+ };
4141
3986
 
4142
- var offset = this._startOfWeekOffset(dom, dow);
3987
+ _proto._localizedDayOfWeek = function _localizedDayOfWeek(temporal, sow) {
3988
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3989
+ return MathUtil.floorMod(isoDow - sow, 7) + 1;
3990
+ };
4143
3991
 
4144
- return ComputedDayOfField._computeWeek(offset, dom);
4145
- }
4146
- }, {
4147
- key: "_localizedWeekOfYear",
4148
- value: function _localizedWeekOfYear(temporal, dow) {
4149
- var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3992
+ _proto._localizedWeekOfMonth = function _localizedWeekOfMonth(temporal, dow) {
3993
+ var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
4150
3994
 
4151
- var offset = this._startOfWeekOffset(doy, dow);
3995
+ var offset = this._startOfWeekOffset(dom, dow);
4152
3996
 
4153
- return ComputedDayOfField._computeWeek(offset, doy);
4154
- }
4155
- }, {
4156
- key: "_localizedWOWBY",
4157
- value: function _localizedWOWBY(temporal) {
4158
- var sow = this._weekDef.firstDayOfWeek().value();
3997
+ return ComputedDayOfField._computeWeek(offset, dom);
3998
+ };
4159
3999
 
4160
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4161
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4000
+ _proto._localizedWeekOfYear = function _localizedWeekOfYear(temporal, dow) {
4001
+ var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
4162
4002
 
4163
- var woy = this._localizedWeekOfYear(temporal, dow);
4003
+ var offset = this._startOfWeekOffset(doy, dow);
4164
4004
 
4165
- if (woy === 0) {
4166
- var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4167
- return this._localizedWeekOfYear(previous, dow) + 1;
4168
- } else if (woy >= 53) {
4169
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
4005
+ return ComputedDayOfField._computeWeek(offset, doy);
4006
+ };
4170
4007
 
4171
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4172
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
4008
+ _proto._localizedWOWBY = function _localizedWOWBY(temporal) {
4009
+ var sow = this._weekDef.firstDayOfWeek().value();
4173
4010
 
4174
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
4011
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4012
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4175
4013
 
4176
- if (woy >= weekIndexOfFirstWeekNextYear) {
4177
- return woy - (weekIndexOfFirstWeekNextYear - 1);
4178
- }
4179
- }
4014
+ var woy = this._localizedWeekOfYear(temporal, dow);
4180
4015
 
4181
- return woy;
4182
- }
4183
- }, {
4184
- key: "_localizedWBY",
4185
- value: function _localizedWBY(temporal) {
4186
- var sow = this._weekDef.firstDayOfWeek().value();
4016
+ if (woy === 0) {
4017
+ var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4018
+ return this._localizedWeekOfYear(previous, dow) + 1;
4019
+ } else if (woy >= 53) {
4020
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
4187
4021
 
4188
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4189
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4190
4022
  var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4023
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
4191
4024
 
4192
- var woy = this._localizedWeekOfYear(temporal, dow);
4025
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
4193
4026
 
4194
- if (woy === 0) {
4195
- return year - 1;
4196
- } else if (woy < 53) {
4197
- return year;
4027
+ if (woy >= weekIndexOfFirstWeekNextYear) {
4028
+ return woy - (weekIndexOfFirstWeekNextYear - 1);
4198
4029
  }
4030
+ }
4199
4031
 
4200
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
4032
+ return woy;
4033
+ };
4201
4034
 
4202
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
4035
+ _proto._localizedWBY = function _localizedWBY(temporal) {
4036
+ var sow = this._weekDef.firstDayOfWeek().value();
4203
4037
 
4204
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
4038
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4039
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4040
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4205
4041
 
4206
- if (woy >= weekIndexOfFirstWeekNextYear) {
4207
- return year + 1;
4208
- }
4042
+ var woy = this._localizedWeekOfYear(temporal, dow);
4209
4043
 
4044
+ if (woy === 0) {
4045
+ return year - 1;
4046
+ } else if (woy < 53) {
4210
4047
  return year;
4211
4048
  }
4212
- }, {
4213
- key: "_startOfWeekOffset",
4214
- value: function _startOfWeekOffset(day, dow) {
4215
- var weekStart = MathUtil.floorMod(day - dow, 7);
4216
- var offset = -weekStart;
4217
-
4218
- if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
4219
- offset = 7 - weekStart;
4220
- }
4221
4049
 
4222
- return offset;
4050
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
4051
+
4052
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
4053
+
4054
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
4055
+
4056
+ if (woy >= weekIndexOfFirstWeekNextYear) {
4057
+ return year + 1;
4223
4058
  }
4224
- }, {
4225
- key: "adjustInto",
4226
- value: function adjustInto(temporal, newValue) {
4227
- var newVal = this._range.checkValidIntValue(newValue, this);
4228
4059
 
4229
- var currentVal = temporal.get(this);
4060
+ return year;
4061
+ };
4230
4062
 
4231
- if (newVal === currentVal) {
4232
- return temporal;
4233
- }
4063
+ _proto._startOfWeekOffset = function _startOfWeekOffset(day, dow) {
4064
+ var weekStart = MathUtil.floorMod(day - dow, 7);
4065
+ var offset = -weekStart;
4234
4066
 
4235
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
4236
- var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
4237
- var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
4238
- var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4067
+ if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
4068
+ offset = 7 - weekStart;
4069
+ }
4239
4070
 
4240
- if (result.get(this) > newVal) {
4241
- var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
4242
- result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4243
- } else {
4244
- if (result.get(this) < newVal) {
4245
- result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4246
- }
4071
+ return offset;
4072
+ };
4247
4073
 
4248
- var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
4074
+ ComputedDayOfField._computeWeek = function _computeWeek(offset, day) {
4075
+ return MathUtil.intDiv(7 + offset + (day - 1), 7);
4076
+ };
4249
4077
 
4250
- result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4078
+ _proto.adjustInto = function adjustInto(temporal, newValue) {
4079
+ var newVal = this._range.checkValidIntValue(newValue, this);
4251
4080
 
4252
- if (result.get(this) > newVal) {
4253
- result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4254
- }
4081
+ var currentVal = temporal.get(this);
4082
+
4083
+ if (newVal === currentVal) {
4084
+ return temporal;
4085
+ }
4086
+
4087
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
4088
+ var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
4089
+ var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
4090
+ var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4091
+
4092
+ if (result.get(this) > newVal) {
4093
+ var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
4094
+ result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4095
+ } else {
4096
+ if (result.get(this) < newVal) {
4097
+ result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4255
4098
  }
4256
4099
 
4257
- return result;
4100
+ var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
4101
+
4102
+ result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4103
+
4104
+ if (result.get(this) > newVal) {
4105
+ result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
4106
+ }
4258
4107
  }
4259
4108
 
4260
- var delta = newVal - currentVal;
4261
- return temporal.plus(delta, this._baseUnit);
4109
+ return result;
4262
4110
  }
4263
- }, {
4264
- key: "resolve",
4265
- value: function resolve(fieldValues, partialTemporal, resolverStyle) {
4266
- var sow = this._weekDef.firstDayOfWeek().value();
4267
4111
 
4268
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
4269
- var value = fieldValues.remove(this);
4112
+ var delta = newVal - currentVal;
4113
+ return temporal.plus(delta, this._baseUnit);
4114
+ };
4270
4115
 
4271
- var localDow = this._range.checkValidIntValue(value, this);
4116
+ _proto.resolve = function resolve(fieldValues, partialTemporal, resolverStyle) {
4117
+ var sow = this._weekDef.firstDayOfWeek().value();
4272
4118
 
4273
- var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
4119
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
4120
+ var value = fieldValues.remove(this);
4274
4121
 
4275
- fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
4276
- return null;
4277
- }
4122
+ var localDow = this._range.checkValidIntValue(value, this);
4123
+
4124
+ var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
4125
+
4126
+ fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
4127
+ return null;
4128
+ }
4278
4129
 
4279
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
4130
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
4131
+ return null;
4132
+ }
4133
+
4134
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
4135
+ if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
4280
4136
  return null;
4281
4137
  }
4282
4138
 
4283
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
4284
- if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
4285
- return null;
4286
- }
4139
+ 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));
4287
4140
 
4288
- 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));
4141
+ var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
4289
4142
 
4290
- var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
4143
+ var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
4144
+ var date;
4145
+ var days;
4291
4146
 
4292
- var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
4293
- var date;
4294
- var days;
4147
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
4148
+ date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
4149
+ var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
4295
4150
 
4296
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
4297
- date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
4298
- var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
4151
+ var dateDow = this._localizedDayOfWeek(date, sow);
4299
4152
 
4300
- var dateDow = this._localizedDayOfWeek(date, sow);
4153
+ var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
4301
4154
 
4302
- var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
4155
+ days = weeks * 7 + (_dow - dateDow);
4156
+ } else {
4157
+ date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
4303
4158
 
4304
- days = weeks * 7 + (_dow - dateDow);
4305
- } else {
4306
- date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
4159
+ var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
4307
4160
 
4308
- var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
4161
+ var _dateDow = this._localizedDayOfWeek(date, sow);
4309
4162
 
4310
- var _dateDow = this._localizedDayOfWeek(date, sow);
4163
+ var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
4311
4164
 
4312
- var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
4165
+ days = _weeks * 7 + (_dow - _dateDow);
4166
+ }
4313
4167
 
4314
- days = _weeks * 7 + (_dow - _dateDow);
4168
+ date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
4169
+
4170
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
4171
+ if (date.getLong(this) !== fieldValues.get(this)) {
4172
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
4315
4173
  }
4174
+ }
4316
4175
 
4317
- date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
4176
+ fieldValues.remove(this);
4177
+ fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
4178
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4179
+ return date;
4180
+ }
4318
4181
 
4319
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
4320
- if (date.getLong(this) !== fieldValues.get(this)) {
4321
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
4322
- }
4323
- }
4182
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
4183
+ return null;
4184
+ }
4324
4185
 
4325
- fieldValues.remove(this);
4326
- fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
4327
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4328
- return date;
4329
- }
4186
+ 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));
4187
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4188
+ var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
4330
4189
 
4331
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
4190
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
4191
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
4332
4192
  return null;
4333
4193
  }
4334
4194
 
4335
- 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));
4336
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4337
- var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
4195
+ var _value = fieldValues.remove(this);
4338
4196
 
4339
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
4340
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
4341
- return null;
4342
- }
4197
+ var _date;
4343
4198
 
4344
- var _value = fieldValues.remove(this);
4199
+ var _days;
4345
4200
 
4346
- var _date;
4201
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
4202
+ var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
4203
+ _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
4204
+ _date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
4347
4205
 
4348
- var _days;
4206
+ var _dateDow2 = this._localizedDayOfWeek(_date, sow);
4349
4207
 
4350
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
4351
- var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
4352
- _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
4353
- _date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
4208
+ var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
4354
4209
 
4355
- var _dateDow2 = this._localizedDayOfWeek(_date, sow);
4210
+ _days = _weeks2 * 7 + (dow - _dateDow2);
4211
+ } else {
4212
+ 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));
4356
4213
 
4357
- var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
4214
+ _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
4358
4215
 
4359
- _days = _weeks2 * 7 + (dow - _dateDow2);
4360
- } else {
4361
- 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));
4216
+ var _dateDow3 = this._localizedDayOfWeek(_date, sow);
4362
4217
 
4363
- _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
4218
+ var wom = this._range.checkValidIntValue(_value, this);
4364
4219
 
4365
- var _dateDow3 = this._localizedDayOfWeek(_date, sow);
4220
+ var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
4366
4221
 
4367
- var wom = this._range.checkValidIntValue(_value, this);
4222
+ _days = _weeks3 * 7 + (dow - _dateDow3);
4223
+ }
4368
4224
 
4369
- var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
4225
+ _date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
4370
4226
 
4371
- _days = _weeks3 * 7 + (dow - _dateDow3);
4227
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
4228
+ 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)) {
4229
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
4372
4230
  }
4231
+ }
4373
4232
 
4374
- _date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
4233
+ fieldValues.remove(this);
4234
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4235
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
4236
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4237
+ return _date;
4238
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
4239
+ var _value2 = fieldValues.remove(this);
4375
4240
 
4376
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
4377
- 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)) {
4378
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
4379
- }
4380
- }
4241
+ var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
4381
4242
 
4382
- fieldValues.remove(this);
4383
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4384
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
4385
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4386
- return _date;
4387
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
4388
- var _value2 = fieldValues.remove(this);
4243
+ var _days2;
4389
4244
 
4390
- var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
4245
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
4246
+ var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
4391
4247
 
4392
- var _days2;
4248
+ var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
4393
4249
 
4394
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
4395
- var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
4250
+ _days2 = _weeks4 * 7 + (dow - _dateDow4);
4251
+ } else {
4252
+ var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
4396
4253
 
4397
- var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
4254
+ var woy = this._range.checkValidIntValue(_value2, this);
4398
4255
 
4399
- _days2 = _weeks4 * 7 + (dow - _dateDow4);
4400
- } else {
4401
- var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
4256
+ var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
4402
4257
 
4403
- var woy = this._range.checkValidIntValue(_value2, this);
4258
+ _days2 = _weeks5 * 7 + (dow - _dateDow5);
4259
+ }
4404
4260
 
4405
- var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
4261
+ _date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
4406
4262
 
4407
- _days2 = _weeks5 * 7 + (dow - _dateDow5);
4263
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
4264
+ if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
4265
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
4408
4266
  }
4267
+ }
4268
+
4269
+ fieldValues.remove(this);
4270
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4271
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4272
+ return _date2;
4273
+ } else {
4274
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
4275
+ }
4276
+ };
4409
4277
 
4410
- _date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
4278
+ _proto.name = function name() {
4279
+ return this._name;
4280
+ };
4411
4281
 
4412
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
4413
- if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
4414
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
4415
- }
4416
- }
4282
+ _proto.baseUnit = function baseUnit() {
4283
+ return this._baseUnit;
4284
+ };
4417
4285
 
4418
- fieldValues.remove(this);
4419
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4420
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4421
- return _date2;
4422
- } else {
4423
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
4424
- }
4425
- }
4426
- }, {
4427
- key: "name",
4428
- value: function name() {
4429
- return this._name;
4430
- }
4431
- }, {
4432
- key: "baseUnit",
4433
- value: function baseUnit() {
4434
- return this._baseUnit;
4435
- }
4436
- }, {
4437
- key: "rangeUnit",
4438
- value: function rangeUnit() {
4439
- return this._rangeUnit;
4440
- }
4441
- }, {
4442
- key: "range",
4443
- value: function range() {
4444
- return this._range;
4445
- }
4446
- }, {
4447
- key: "isDateBased",
4448
- value: function isDateBased() {
4449
- return true;
4450
- }
4451
- }, {
4452
- key: "isTimeBased",
4453
- value: function isTimeBased() {
4454
- return false;
4455
- }
4456
- }, {
4457
- key: "isSupportedBy",
4458
- value: function isSupportedBy(temporal) {
4459
- if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
4460
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
4461
- return true;
4462
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
4463
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
4464
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
4465
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
4466
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
4467
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
4468
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
4469
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
4470
- }
4471
- }
4286
+ _proto.rangeUnit = function rangeUnit() {
4287
+ return this._rangeUnit;
4288
+ };
4472
4289
 
4473
- return false;
4474
- }
4475
- }, {
4476
- key: "rangeRefinedBy",
4477
- value: function rangeRefinedBy(temporal) {
4478
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
4479
- return this._range;
4480
- }
4290
+ _proto.range = function range() {
4291
+ return this._range;
4292
+ };
4481
4293
 
4482
- var field = null;
4294
+ _proto.isDateBased = function isDateBased() {
4295
+ return true;
4296
+ };
4297
+
4298
+ _proto.isTimeBased = function isTimeBased() {
4299
+ return false;
4300
+ };
4483
4301
 
4484
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
4485
- field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
4302
+ _proto.isSupportedBy = function isSupportedBy(temporal) {
4303
+ if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
4304
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
4305
+ return true;
4306
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
4307
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
4486
4308
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
4487
- field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
4309
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
4488
4310
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
4489
- return this._rangeWOWBY(temporal);
4311
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
4490
4312
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
4491
- return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4492
- } else {
4493
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
4313
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
4494
4314
  }
4315
+ }
4495
4316
 
4496
- var sow = this._weekDef.firstDayOfWeek().value();
4497
-
4498
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4499
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4317
+ return false;
4318
+ };
4500
4319
 
4501
- var offset = this._startOfWeekOffset(temporal.get(field), dow);
4320
+ _proto.rangeRefinedBy = function rangeRefinedBy(temporal) {
4321
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
4322
+ return this._range;
4323
+ }
4502
4324
 
4503
- var fieldRange = temporal.range(field);
4504
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
4325
+ var field = null;
4326
+
4327
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
4328
+ field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
4329
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
4330
+ field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
4331
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
4332
+ return this._rangeWOWBY(temporal);
4333
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
4334
+ return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4335
+ } else {
4336
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
4505
4337
  }
4506
- }, {
4507
- key: "_rangeWOWBY",
4508
- value: function _rangeWOWBY(temporal) {
4509
- var sow = this._weekDef.firstDayOfWeek().value();
4510
4338
 
4511
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4512
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4339
+ var sow = this._weekDef.firstDayOfWeek().value();
4513
4340
 
4514
- var woy = this._localizedWeekOfYear(temporal, dow);
4341
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4342
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4515
4343
 
4516
- if (woy === 0) {
4517
- 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));
4518
- }
4344
+ var offset = this._startOfWeekOffset(temporal.get(field), dow);
4519
4345
 
4520
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
4346
+ var fieldRange = temporal.range(field);
4347
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
4348
+ };
4521
4349
 
4522
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4523
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
4350
+ _proto._rangeWOWBY = function _rangeWOWBY(temporal) {
4351
+ var sow = this._weekDef.firstDayOfWeek().value();
4524
4352
 
4525
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
4353
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
4354
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
4526
4355
 
4527
- if (woy >= weekIndexOfFirstWeekNextYear) {
4528
- 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));
4529
- }
4356
+ var woy = this._localizedWeekOfYear(temporal, dow);
4530
4357
 
4531
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
4358
+ if (woy === 0) {
4359
+ 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));
4532
4360
  }
4533
- }, {
4534
- key: "displayName",
4535
- value: function displayName(locale) {
4536
- requireNonNull(locale, 'locale');
4537
4361
 
4538
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
4539
- return 'Week';
4540
- }
4362
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
4541
4363
 
4542
- return this.toString();
4543
- }
4544
- }, {
4545
- key: "toString",
4546
- value: function toString() {
4547
- return "".concat(this._name, "[").concat(this._weekDef.toString(), "]");
4548
- }
4549
- }], [{
4550
- key: "ofDayOfWeekField",
4551
- value: function ofDayOfWeekField(weekDef) {
4552
- 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);
4553
- }
4554
- }, {
4555
- key: "ofWeekOfMonthField",
4556
- value: function ofWeekOfMonthField(weekDef) {
4557
- 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);
4558
- }
4559
- }, {
4560
- key: "ofWeekOfYearField",
4561
- value: function ofWeekOfYearField(weekDef) {
4562
- 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);
4563
- }
4564
- }, {
4565
- key: "ofWeekOfWeekBasedYearField",
4566
- value: function ofWeekOfWeekBasedYearField(weekDef) {
4567
- 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);
4568
- }
4569
- }, {
4570
- key: "ofWeekBasedYearField",
4571
- value: function ofWeekBasedYearField(weekDef) {
4572
- 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);
4364
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
4365
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
4366
+
4367
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
4368
+
4369
+ if (woy >= weekIndexOfFirstWeekNextYear) {
4370
+ 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));
4573
4371
  }
4574
- }, {
4575
- key: "_computeWeek",
4576
- value: function _computeWeek(offset, day) {
4577
- return MathUtil.intDiv(7 + offset + (day - 1), 7);
4372
+
4373
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
4374
+ };
4375
+
4376
+ _proto.displayName = function displayName(locale) {
4377
+ requireNonNull(locale, 'locale');
4378
+
4379
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
4380
+ return 'Week';
4578
4381
  }
4579
- }]);
4382
+
4383
+ return this.toString();
4384
+ };
4385
+
4386
+ _proto.toString = function toString() {
4387
+ return this._name + "[" + this._weekDef.toString() + "]";
4388
+ };
4580
4389
 
4581
4390
  return ComputedDayOfField;
4582
4391
  }();
4583
4392
  var WeekFieldsCache = new Map();
4584
4393
  var WeekFields = function () {
4585
- function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
4586
- _classCallCheck(this, WeekFields);
4394
+ WeekFields.of = function of(firstDayOrLocale, minDays) {
4395
+ if (minDays === undefined) {
4396
+ return WeekFields.ofLocale(firstDayOrLocale);
4397
+ } else {
4398
+ return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
4399
+ }
4400
+ };
4401
+
4402
+ WeekFields.ofLocale = function ofLocale(locale) {
4403
+ requireNonNull(locale, 'locale');
4404
+ cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
4405
+ var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
4406
+ var worldRegion = '001';
4407
+ var weekData = cldr.get('supplemental/weekData');
4408
+
4409
+ var dow = _weekDayMap[weekData.firstDay[locale.country()]];
4410
+
4411
+ if (!dow) {
4412
+ dow = _weekDayMap[weekData.firstDay[worldRegion]];
4413
+ }
4414
+
4415
+ var minDays = weekData.minDays[locale.country()];
4416
+
4417
+ if (!minDays) {
4418
+ minDays = weekData.minDays[worldRegion];
4419
+ }
4420
+
4421
+ return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
4422
+ };
4423
+
4424
+ WeekFields.ofFirstDayOfWeekMinDays = function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
4425
+ requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
4426
+ requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
4427
+ requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
4428
+ var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
4429
+ var rules = WeekFieldsCache.get(key);
4430
+
4431
+ if (rules == null) {
4432
+ rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
4433
+ WeekFieldsCache.set(key, rules);
4434
+ rules = WeekFieldsCache.get(key);
4435
+ }
4587
4436
 
4437
+ return rules;
4438
+ };
4439
+
4440
+ function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
4588
4441
  requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
4589
4442
  requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
4590
4443
  requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
@@ -4603,114 +4456,55 @@ var WeekFields = function () {
4603
4456
  cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/likelySubtags.json'));
4604
4457
  }
4605
4458
 
4606
- _createClass(WeekFields, [{
4607
- key: "firstDayOfWeek",
4608
- value: function firstDayOfWeek() {
4609
- return this._firstDayOfWeek;
4610
- }
4611
- }, {
4612
- key: "minimalDaysInFirstWeek",
4613
- value: function minimalDaysInFirstWeek() {
4614
- return this._minimalDays;
4615
- }
4616
- }, {
4617
- key: "dayOfWeek",
4618
- value: function dayOfWeek() {
4619
- return this._dayOfWeek;
4620
- }
4621
- }, {
4622
- key: "weekOfMonth",
4623
- value: function weekOfMonth() {
4624
- return this._weekOfMonth;
4625
- }
4626
- }, {
4627
- key: "weekOfYear",
4628
- value: function weekOfYear() {
4629
- return this._weekOfYear;
4630
- }
4631
- }, {
4632
- key: "weekOfWeekBasedYear",
4633
- value: function weekOfWeekBasedYear() {
4634
- return this._weekOfWeekBasedYear;
4635
- }
4636
- }, {
4637
- key: "weekBasedYear",
4638
- value: function weekBasedYear() {
4639
- return this._weekBasedYear;
4640
- }
4641
- }, {
4642
- key: "equals",
4643
- value: function equals(other) {
4644
- if (this === other) {
4645
- return true;
4646
- }
4459
+ var _proto2 = WeekFields.prototype;
4647
4460
 
4648
- if (other instanceof WeekFields) {
4649
- return this.hashCode() === other.hashCode();
4650
- }
4461
+ _proto2.firstDayOfWeek = function firstDayOfWeek() {
4462
+ return this._firstDayOfWeek;
4463
+ };
4651
4464
 
4652
- return false;
4653
- }
4654
- }, {
4655
- key: "hashCode",
4656
- value: function hashCode() {
4657
- return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
4658
- }
4659
- }, {
4660
- key: "toString",
4661
- value: function toString() {
4662
- return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
4663
- }
4664
- }], [{
4665
- key: "of",
4666
- value: function of(firstDayOrLocale, minDays) {
4667
- if (minDays === undefined) {
4668
- return WeekFields.ofLocale(firstDayOrLocale);
4669
- } else {
4670
- return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
4671
- }
4672
- }
4673
- }, {
4674
- key: "ofLocale",
4675
- value: function ofLocale(locale) {
4676
- requireNonNull(locale, 'locale');
4677
- cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
4678
- var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
4679
- var worldRegion = '001';
4680
- var weekData = cldr.get('supplemental/weekData');
4681
-
4682
- var dow = _weekDayMap[weekData.firstDay[locale.country()]];
4683
-
4684
- if (!dow) {
4685
- dow = _weekDayMap[weekData.firstDay[worldRegion]];
4686
- }
4465
+ _proto2.minimalDaysInFirstWeek = function minimalDaysInFirstWeek() {
4466
+ return this._minimalDays;
4467
+ };
4687
4468
 
4688
- var minDays = weekData.minDays[locale.country()];
4469
+ _proto2.dayOfWeek = function dayOfWeek() {
4470
+ return this._dayOfWeek;
4471
+ };
4689
4472
 
4690
- if (!minDays) {
4691
- minDays = weekData.minDays[worldRegion];
4692
- }
4473
+ _proto2.weekOfMonth = function weekOfMonth() {
4474
+ return this._weekOfMonth;
4475
+ };
4476
+
4477
+ _proto2.weekOfYear = function weekOfYear() {
4478
+ return this._weekOfYear;
4479
+ };
4480
+
4481
+ _proto2.weekOfWeekBasedYear = function weekOfWeekBasedYear() {
4482
+ return this._weekOfWeekBasedYear;
4483
+ };
4693
4484
 
4694
- return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
4485
+ _proto2.weekBasedYear = function weekBasedYear() {
4486
+ return this._weekBasedYear;
4487
+ };
4488
+
4489
+ _proto2.equals = function equals(other) {
4490
+ if (this === other) {
4491
+ return true;
4695
4492
  }
4696
- }, {
4697
- key: "ofFirstDayOfWeekMinDays",
4698
- value: function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
4699
- requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
4700
- requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
4701
- requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
4702
- var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
4703
- var rules = WeekFieldsCache.get(key);
4704
-
4705
- if (rules == null) {
4706
- rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
4707
- WeekFieldsCache.set(key, rules);
4708
- rules = WeekFieldsCache.get(key);
4709
- }
4710
4493
 
4711
- return rules;
4494
+ if (other instanceof WeekFields) {
4495
+ return this.hashCode() === other.hashCode();
4712
4496
  }
4713
- }]);
4497
+
4498
+ return false;
4499
+ };
4500
+
4501
+ _proto2.hashCode = function hashCode() {
4502
+ return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
4503
+ };
4504
+
4505
+ _proto2.toString = function toString() {
4506
+ return "WeekFields[" + this._firstDayOfWeek + "," + this._minimalDays + "]";
4507
+ };
4714
4508
 
4715
4509
  return WeekFields;
4716
4510
  }();