@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)
@@ -1819,12 +1819,6 @@ __webpack_require__.r(__webpack_exports__);
1819
1819
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Locale; });
1820
1820
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_init", function() { return _init; });
1821
1821
  /* harmony import */ var _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format/cldr/CldrDateTimeTextProvider */ "./src/format/cldr/CldrDateTimeTextProvider.js");
1822
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1823
-
1824
- 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); } }
1825
-
1826
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
1827
-
1828
1822
  /*
1829
1823
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
1830
1824
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -1832,64 +1826,61 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
1832
1826
 
1833
1827
 
1834
1828
  var Locale = function () {
1835
- function Locale(language) {
1836
- var country = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
1837
- var localeString = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
1829
+ Locale.getAvailableLocales = function getAvailableLocales() {
1830
+ return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
1831
+ };
1838
1832
 
1839
- _classCallCheck(this, Locale);
1833
+ function Locale(language, country, localeString) {
1834
+ if (country === void 0) {
1835
+ country = '';
1836
+ }
1837
+
1838
+ if (localeString === void 0) {
1839
+ localeString = '';
1840
+ }
1840
1841
 
1841
1842
  this._language = language;
1842
1843
  this._country = country;
1843
1844
  this._localeString = localeString;
1844
1845
  }
1845
1846
 
1846
- _createClass(Locale, [{
1847
- key: "language",
1848
- value: function language() {
1849
- return this._language;
1850
- }
1851
- }, {
1852
- key: "country",
1853
- value: function country() {
1854
- return this._country;
1855
- }
1856
- }, {
1857
- key: "localeString",
1858
- value: function localeString() {
1859
- if (this._localeString.length > 0) {
1860
- return this._localeString;
1861
- }
1847
+ var _proto = Locale.prototype;
1862
1848
 
1863
- if (this._country.length > 0) {
1864
- return "".concat(this._language, "-").concat(this._country);
1865
- } else {
1866
- return this._language;
1867
- }
1849
+ _proto.language = function language() {
1850
+ return this._language;
1851
+ };
1852
+
1853
+ _proto.country = function country() {
1854
+ return this._country;
1855
+ };
1856
+
1857
+ _proto.localeString = function localeString() {
1858
+ if (this._localeString.length > 0) {
1859
+ return this._localeString;
1868
1860
  }
1869
- }, {
1870
- key: "toString",
1871
- value: function toString() {
1872
- return "Locale[".concat(this.localeString(), "]");
1861
+
1862
+ if (this._country.length > 0) {
1863
+ return this._language + "-" + this._country;
1864
+ } else {
1865
+ return this._language;
1873
1866
  }
1874
- }, {
1875
- key: "equals",
1876
- value: function equals(other) {
1877
- if (!other) {
1878
- return false;
1879
- }
1867
+ };
1880
1868
 
1881
- if (!(other instanceof Locale)) {
1882
- return false;
1883
- }
1869
+ _proto.toString = function toString() {
1870
+ return "Locale[" + this.localeString() + "]";
1871
+ };
1884
1872
 
1885
- return this.localeString() === other.localeString();
1873
+ _proto.equals = function equals(other) {
1874
+ if (!other) {
1875
+ return false;
1886
1876
  }
1887
- }], [{
1888
- key: "getAvailableLocales",
1889
- value: function getAvailableLocales() {
1890
- return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
1877
+
1878
+ if (!(other instanceof Locale)) {
1879
+ return false;
1891
1880
  }
1892
- }]);
1881
+
1882
+ return this.localeString() === other.localeString();
1883
+ };
1893
1884
 
1894
1885
  return Locale;
1895
1886
  }();
@@ -1907,6 +1898,14 @@ function _init() {
1907
1898
  Locale.KOREAN = new Locale('ko');
1908
1899
  Locale.JAPANESE = new Locale('ja', 'JP');
1909
1900
  Locale.JAPAN = new Locale('ja', 'JP', 'ja');
1901
+ Locale.ITALIAN = new Locale('it');
1902
+ Locale.ITALY = new Locale('it', 'IT', 'it');
1903
+ Locale.CHINESE = new Locale('zh');
1904
+ Locale.ROMANIAN = new Locale('ro');
1905
+ Locale.SWEDISH = new Locale('sv');
1906
+ Locale.SWEDEN = new Locale('sv', 'SE', 'sv');
1907
+ Locale.HINDI = new Locale('hi');
1908
+ Locale.RUSSIAN = new Locale('ru');
1910
1909
  }
1911
1910
 
1912
1911
  /***/ }),
@@ -1962,28 +1961,10 @@ __webpack_require__.r(__webpack_exports__);
1962
1961
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
1963
1962
  /* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locale */ "./src/Locale.js");
1964
1963
  /* harmony import */ var _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cldr/CldrDateTimeFormatterBuilder */ "./src/format/cldr/CldrDateTimeFormatterBuilder.js");
1965
- 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); }
1966
-
1967
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1968
-
1969
- 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); } }
1970
-
1971
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
1972
-
1973
- 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); }
1964
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
1974
1965
 
1975
1966
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1976
1967
 
1977
- 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); }; }
1978
-
1979
- 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); }
1980
-
1981
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1982
-
1983
- 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; } }
1984
-
1985
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1986
-
1987
1968
  /*
1988
1969
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
1989
1970
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -1994,28 +1975,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1994
1975
  var requireNonNull = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].assert.requireNonNull;
1995
1976
 
1996
1977
  var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
1997
- _inherits(LocaleDateTimeFormatter, _DateTimeFormatter);
1998
-
1999
- var _super = _createSuper(LocaleDateTimeFormatter);
1978
+ _inheritsLoose(LocaleDateTimeFormatter, _DateTimeFormatter);
2000
1979
 
2001
1980
  function LocaleDateTimeFormatter() {
2002
- _classCallCheck(this, LocaleDateTimeFormatter);
2003
-
2004
- return _super.apply(this, arguments);
1981
+ return _DateTimeFormatter.apply(this, arguments) || this;
2005
1982
  }
2006
1983
 
2007
- _createClass(LocaleDateTimeFormatter, [{
2008
- key: "withLocale",
2009
- value: function withLocale(locale) {
2010
- requireNonNull(locale, 'locale');
1984
+ var _proto = LocaleDateTimeFormatter.prototype;
2011
1985
 
2012
- if (locale.equals(this._locale)) {
2013
- return this;
2014
- }
1986
+ _proto.withLocale = function withLocale(locale) {
1987
+ requireNonNull(locale, 'locale');
2015
1988
 
2016
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
1989
+ if (locale.equals(this._locale)) {
1990
+ return this;
2017
1991
  }
2018
- }]);
1992
+
1993
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
1994
+ };
2019
1995
 
2020
1996
  return LocaleDateTimeFormatter;
2021
1997
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"]);
@@ -2061,12 +2037,6 @@ function _init() {
2061
2037
  __webpack_require__.r(__webpack_exports__);
2062
2038
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEntry", function() { return createEntry; });
2063
2039
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleStore", function() { return LocaleStore; });
2064
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2065
-
2066
- 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); } }
2067
-
2068
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2069
-
2070
2040
  /*
2071
2041
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2072
2042
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2076,7 +2046,7 @@ var createEntry = function createEntry(text, field) {
2076
2046
  key: text,
2077
2047
  value: field,
2078
2048
  toString: function toString() {
2079
- return "".concat(text, "->").concat(field);
2049
+ return text + "->" + field;
2080
2050
  }
2081
2051
  };
2082
2052
  };
@@ -2087,8 +2057,6 @@ var _comparator = function _comparator(obj1, obj2) {
2087
2057
 
2088
2058
  var LocaleStore = function () {
2089
2059
  function LocaleStore(valueTextMap) {
2090
- _classCallCheck(this, LocaleStore);
2091
-
2092
2060
  this._valueTextMap = valueTextMap;
2093
2061
  var map = {};
2094
2062
  var allList = [];
@@ -2112,19 +2080,17 @@ var LocaleStore = function () {
2112
2080
  this._parsable = map;
2113
2081
  }
2114
2082
 
2115
- _createClass(LocaleStore, [{
2116
- key: "getText",
2117
- value: function getText(value, style) {
2118
- var map = this._valueTextMap[style];
2119
- return map != null ? map[value] : null;
2120
- }
2121
- }, {
2122
- key: "getTextIterator",
2123
- value: function getTextIterator(style) {
2124
- var list = this._parsable[style];
2125
- return list != null ? list[Symbol.iterator]() : null;
2126
- }
2127
- }]);
2083
+ var _proto = LocaleStore.prototype;
2084
+
2085
+ _proto.getText = function getText(value, style) {
2086
+ var map = this._valueTextMap[style];
2087
+ return map != null ? map[value] : null;
2088
+ };
2089
+
2090
+ _proto.getTextIterator = function getTextIterator(style) {
2091
+ var list = this._parsable[style];
2092
+ return list != null ? list[Symbol.iterator]() : null;
2093
+ };
2128
2094
 
2129
2095
  return LocaleStore;
2130
2096
  }();
@@ -2207,28 +2173,10 @@ __webpack_require__.r(__webpack_exports__);
2207
2173
  /* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
2208
2174
  /* harmony import */ var _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser/LocalizedOffsetPrinterParser */ "./src/format/parser/LocalizedOffsetPrinterParser.js");
2209
2175
  /* harmony import */ var _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../parser/WeekFieldsPrinterParser */ "./src/format/parser/WeekFieldsPrinterParser.js");
2210
- 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); }
2211
-
2212
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2213
-
2214
- 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); } }
2215
-
2216
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2217
-
2218
- 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); }
2176
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
2219
2177
 
2220
2178
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2221
2179
 
2222
- 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); }; }
2223
-
2224
- 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); }
2225
-
2226
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2227
-
2228
- 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; } }
2229
-
2230
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2231
-
2232
2180
  /**
2233
2181
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
2234
2182
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -2246,98 +2194,87 @@ var _jodaInternal$assert = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].asser
2246
2194
  requireInstance = _jodaInternal$assert.requireInstance;
2247
2195
 
2248
2196
  var CldrDateTimeFormatterBuilder = function (_DateTimeFormatterBui) {
2249
- _inherits(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
2250
-
2251
- var _super = _createSuper(CldrDateTimeFormatterBuilder);
2197
+ _inheritsLoose(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
2252
2198
 
2253
2199
  function CldrDateTimeFormatterBuilder() {
2254
- _classCallCheck(this, CldrDateTimeFormatterBuilder);
2255
-
2256
- return _super.apply(this, arguments);
2200
+ return _DateTimeFormatterBui.apply(this, arguments) || this;
2257
2201
  }
2258
2202
 
2259
- _createClass(CldrDateTimeFormatterBuilder, [{
2260
- key: "appendText",
2261
- value: function appendText(field, styleOrMap) {
2262
- if (styleOrMap === undefined) {
2263
- return this.appendTextField(field);
2264
- } else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
2265
- return this.appendTextFieldStyle(field, styleOrMap);
2266
- } else {
2267
- return this.appendTextFieldMap(field, styleOrMap);
2268
- }
2269
- }
2270
- }, {
2271
- key: "appendTextField",
2272
- value: function appendTextField(field) {
2273
- return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
2203
+ var _proto = CldrDateTimeFormatterBuilder.prototype;
2204
+
2205
+ _proto.appendText = function appendText(field, styleOrMap) {
2206
+ if (styleOrMap === undefined) {
2207
+ return this.appendTextField(field);
2208
+ } else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
2209
+ return this.appendTextFieldStyle(field, styleOrMap);
2210
+ } else {
2211
+ return this.appendTextFieldMap(field, styleOrMap);
2274
2212
  }
2275
- }, {
2276
- key: "appendTextFieldStyle",
2277
- value: function appendTextFieldStyle(field, textStyle) {
2278
- requireNonNull(field, 'field');
2279
- requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
2280
- requireNonNull(textStyle, 'textStyle');
2281
- requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
2213
+ };
2282
2214
 
2283
- this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
2215
+ _proto.appendTextField = function appendTextField(field) {
2216
+ return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
2217
+ };
2284
2218
 
2285
- return this;
2286
- }
2287
- }, {
2288
- key: "appendTextFieldMap",
2289
- value: function appendTextFieldMap(field, textLookup) {
2290
- requireNonNull(field, 'field');
2291
- requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
2292
- requireNonNull(textLookup, 'textLookup');
2293
- var copy = Object.assign({}, textLookup);
2294
- var map = {};
2295
- map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
2296
- var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
2297
- var provider = {
2298
- getText: function getText(field, value, style) {
2299
- return store.getText(value, style);
2300
- },
2301
- getTextIterator: function getTextIterator(field, style) {
2302
- return store.getTextIterator(style);
2303
- }
2304
- };
2219
+ _proto.appendTextFieldStyle = function appendTextFieldStyle(field, textStyle) {
2220
+ requireNonNull(field, 'field');
2221
+ requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
2222
+ requireNonNull(textStyle, 'textStyle');
2223
+ requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
2305
2224
 
2306
- this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
2225
+ this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
2307
2226
 
2308
- return this;
2309
- }
2310
- }, {
2311
- key: "appendWeekField",
2312
- value: function appendWeekField(field, count) {
2313
- requireNonNull(field, 'field');
2314
- requireNonNull(count, 'count');
2227
+ return this;
2228
+ };
2229
+
2230
+ _proto.appendTextFieldMap = function appendTextFieldMap(field, textLookup) {
2231
+ requireNonNull(field, 'field');
2232
+ requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
2233
+ requireNonNull(textLookup, 'textLookup');
2234
+ var copy = Object.assign({}, textLookup);
2235
+ var map = {};
2236
+ map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
2237
+ var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
2238
+ var provider = {
2239
+ getText: function getText(field, value, style) {
2240
+ return store.getText(value, style);
2241
+ },
2242
+ getTextIterator: function getTextIterator(field, style) {
2243
+ return store.getTextIterator(style);
2244
+ }
2245
+ };
2315
2246
 
2316
- this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
2247
+ this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
2317
2248
 
2318
- return this;
2319
- }
2320
- }, {
2321
- key: "appendZoneText",
2322
- value: function appendZoneText(textStyle) {
2323
- this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
2249
+ return this;
2250
+ };
2324
2251
 
2325
- return this;
2326
- }
2327
- }, {
2328
- key: "appendLocalizedOffset",
2329
- value: function appendLocalizedOffset(textStyle) {
2330
- requireNonNull(textStyle, 'textStyle');
2252
+ _proto.appendWeekField = function appendWeekField(field, count) {
2253
+ requireNonNull(field, 'field');
2254
+ requireNonNull(count, 'count');
2331
2255
 
2332
- if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
2333
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
2334
- }
2256
+ this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
2257
+
2258
+ return this;
2259
+ };
2335
2260
 
2336
- this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
2261
+ _proto.appendZoneText = function appendZoneText(textStyle) {
2262
+ this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
2337
2263
 
2338
- return this;
2264
+ return this;
2265
+ };
2266
+
2267
+ _proto.appendLocalizedOffset = function appendLocalizedOffset(textStyle) {
2268
+ requireNonNull(textStyle, 'textStyle');
2269
+
2270
+ if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
2271
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
2339
2272
  }
2340
- }]);
2273
+
2274
+ this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
2275
+
2276
+ return this;
2277
+ };
2341
2278
 
2342
2279
  return CldrDateTimeFormatterBuilder;
2343
2280
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"]);
@@ -2362,12 +2299,6 @@ __webpack_require__.r(__webpack_exports__);
2362
2299
  /* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
2363
2300
  /* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
2364
2301
  /* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
2365
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2366
-
2367
- 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); } }
2368
-
2369
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2370
-
2371
2302
  /*
2372
2303
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2373
2304
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2379,218 +2310,210 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
2379
2310
 
2380
2311
  var CldrDateTimeTextProvider = function () {
2381
2312
  function CldrDateTimeTextProvider() {
2382
- _classCallCheck(this, CldrDateTimeTextProvider);
2383
-
2384
2313
  this._cache = {};
2385
2314
  Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])('supplemental/likelySubtags.json');
2386
2315
  }
2387
2316
 
2388
- _createClass(CldrDateTimeTextProvider, [{
2389
- key: "getAvailableLocales",
2390
- value: function getAvailableLocales() {
2391
- if (true) {
2392
- return ["ja.*"];
2393
- }
2317
+ var _proto = CldrDateTimeTextProvider.prototype;
2394
2318
 
2395
- return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
2319
+ _proto.getAvailableLocales = function getAvailableLocales() {
2320
+ if (true) {
2321
+ return ["ja.*"];
2396
2322
  }
2397
- }, {
2398
- key: "getText",
2399
- value: function getText(field, value, style, locale) {
2400
- var store = this._findStore(field, locale);
2401
2323
 
2402
- if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2403
- return store.getText(value, style);
2404
- }
2324
+ return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
2325
+ };
2405
2326
 
2406
- return null;
2327
+ _proto.getText = function getText(field, value, style, locale) {
2328
+ var store = this._findStore(field, locale);
2329
+
2330
+ if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2331
+ return store.getText(value, style);
2407
2332
  }
2408
- }, {
2409
- key: "getTextIterator",
2410
- value: function getTextIterator(field, style, locale) {
2411
- var store = this._findStore(field, locale);
2412
2333
 
2413
- if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2414
- return store.getTextIterator(style);
2415
- }
2334
+ return null;
2335
+ };
2416
2336
 
2417
- return null;
2418
- }
2419
- }, {
2420
- key: "_findStore",
2421
- value: function _findStore(field, locale) {
2422
- var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
2423
- var store = this._cache[key];
2424
-
2425
- if (store === undefined) {
2426
- store = this._createStore(field, locale);
2427
- this._cache[key] = store;
2428
- }
2337
+ _proto.getTextIterator = function getTextIterator(field, style, locale) {
2338
+ var store = this._findStore(field, locale);
2429
2339
 
2430
- return store;
2340
+ if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2341
+ return store.getTextIterator(style);
2431
2342
  }
2432
- }, {
2433
- key: "_createStore",
2434
- value: function _createStore(field, locale) {
2435
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/".concat(locale.localeString(), "/ca-gregorian.json"));
2436
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
2437
-
2438
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
2439
- var monthsData = cldr.main('dates/calendars/gregorian/months/format');
2440
- var styleMap = {};
2441
- var data = {};
2442
- data[1] = monthsData.wide[1];
2443
- data[2] = monthsData.wide[2];
2444
- data[3] = monthsData.wide[3];
2445
- data[4] = monthsData.wide[4];
2446
- data[5] = monthsData.wide[5];
2447
- data[6] = monthsData.wide[6];
2448
- data[7] = monthsData.wide[7];
2449
- data[8] = monthsData.wide[8];
2450
- data[9] = monthsData.wide[9];
2451
- data[10] = monthsData.wide[10];
2452
- data[11] = monthsData.wide[11];
2453
- data[12] = monthsData.wide[12];
2454
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
2455
- data = {};
2456
- data[1] = monthsData.narrow[1];
2457
- data[2] = monthsData.narrow[2];
2458
- data[3] = monthsData.narrow[3];
2459
- data[4] = monthsData.narrow[4];
2460
- data[5] = monthsData.narrow[5];
2461
- data[6] = monthsData.narrow[6];
2462
- data[7] = monthsData.narrow[7];
2463
- data[8] = monthsData.narrow[8];
2464
- data[9] = monthsData.narrow[9];
2465
- data[10] = monthsData.narrow[10];
2466
- data[11] = monthsData.narrow[11];
2467
- data[12] = monthsData.narrow[12];
2468
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
2469
- data = {};
2470
- data[1] = monthsData.abbreviated[1];
2471
- data[2] = monthsData.abbreviated[2];
2472
- data[3] = monthsData.abbreviated[3];
2473
- data[4] = monthsData.abbreviated[4];
2474
- data[5] = monthsData.abbreviated[5];
2475
- data[6] = monthsData.abbreviated[6];
2476
- data[7] = monthsData.abbreviated[7];
2477
- data[8] = monthsData.abbreviated[8];
2478
- data[9] = monthsData.abbreviated[9];
2479
- data[10] = monthsData.abbreviated[10];
2480
- data[11] = monthsData.abbreviated[11];
2481
- data[12] = monthsData.abbreviated[12];
2482
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
2483
- return this._createLocaleStore(styleMap);
2484
- }
2485
2343
 
2486
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
2487
- var daysData = cldr.main('dates/calendars/gregorian/days/format');
2488
- var _styleMap = {};
2489
- var _data = {};
2490
- _data[1] = daysData.wide.mon;
2491
- _data[2] = daysData.wide.tue;
2492
- _data[3] = daysData.wide.wed;
2493
- _data[4] = daysData.wide.thu;
2494
- _data[5] = daysData.wide.fri;
2495
- _data[6] = daysData.wide.sat;
2496
- _data[7] = daysData.wide.sun;
2497
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
2498
- _data = {};
2499
- _data[1] = daysData.narrow.mon;
2500
- _data[2] = daysData.narrow.tue;
2501
- _data[3] = daysData.narrow.wed;
2502
- _data[4] = daysData.narrow.thu;
2503
- _data[5] = daysData.narrow.fri;
2504
- _data[6] = daysData.narrow.sat;
2505
- _data[7] = daysData.narrow.sun;
2506
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
2507
- _data = {};
2508
- _data[1] = daysData.abbreviated.mon;
2509
- _data[2] = daysData.abbreviated.tue;
2510
- _data[3] = daysData.abbreviated.wed;
2511
- _data[4] = daysData.abbreviated.thu;
2512
- _data[5] = daysData.abbreviated.fri;
2513
- _data[6] = daysData.abbreviated.sat;
2514
- _data[7] = daysData.abbreviated.sun;
2515
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
2516
- return this._createLocaleStore(_styleMap);
2517
- }
2344
+ return null;
2345
+ };
2518
2346
 
2519
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
2520
- var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
2521
- var _styleMap2 = {};
2522
- var _data2 = {};
2523
- _data2[0] = dayPeriodsData.wide.am;
2524
- _data2[1] = dayPeriodsData.wide.pm;
2525
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
2526
- _data2 = {};
2527
- _data2[0] = dayPeriodsData.narrow.am;
2528
- _data2[1] = dayPeriodsData.narrow.pm;
2529
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
2530
- _data2 = {};
2531
- _data2[0] = dayPeriodsData.abbreviated.am;
2532
- _data2[1] = dayPeriodsData.abbreviated.pm;
2533
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
2534
- return this._createLocaleStore(_styleMap2);
2535
- }
2347
+ _proto._findStore = function _findStore(field, locale) {
2348
+ var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
2349
+ var store = this._cache[key];
2536
2350
 
2537
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
2538
- var erasData = cldr.main('dates/calendars/gregorian/eras');
2539
- var _styleMap3 = {};
2540
- var _data3 = {};
2541
- _data3[0] = erasData.eraNames['0'];
2542
- _data3[1] = erasData.eraNames['1'];
2543
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
2544
- _data3 = {};
2545
- _data3[0] = erasData.eraNarrow['0'];
2546
- _data3[1] = erasData.eraNarrow['1'];
2547
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
2548
- _data3 = {};
2549
- _data3[0] = erasData.eraAbbr['0'];
2550
- _data3[1] = erasData.eraAbbr['1'];
2551
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
2552
- return this._createLocaleStore(_styleMap3);
2553
- }
2351
+ if (store === undefined) {
2352
+ store = this._createStore(field, locale);
2353
+ this._cache[key] = store;
2354
+ }
2554
2355
 
2555
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
2556
- var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
2557
- var _styleMap4 = {};
2558
- var _data4 = {};
2559
- _data4[1] = quartersData.wide['1'];
2560
- _data4[2] = quartersData.wide['2'];
2561
- _data4[3] = quartersData.wide['3'];
2562
- _data4[4] = quartersData.wide['4'];
2563
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
2564
- _data4 = {};
2565
- _data4[1] = quartersData.narrow['1'];
2566
- _data4[2] = quartersData.narrow['2'];
2567
- _data4[3] = quartersData.narrow['3'];
2568
- _data4[4] = quartersData.narrow['4'];
2569
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
2570
- _data4 = {};
2571
- _data4[1] = quartersData.abbreviated['1'];
2572
- _data4[2] = quartersData.abbreviated['2'];
2573
- _data4[3] = quartersData.abbreviated['3'];
2574
- _data4[4] = quartersData.abbreviated['4'];
2575
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
2576
- return this._createLocaleStore(_styleMap4);
2577
- }
2356
+ return store;
2357
+ };
2578
2358
 
2579
- return null;
2580
- }
2581
- }, {
2582
- key: "_createLocaleStore",
2583
- value: function _createLocaleStore(valueTextMap) {
2584
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
2585
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
2586
-
2587
- 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) {
2588
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
2589
- }
2359
+ _proto._createStore = function _createStore(field, locale) {
2360
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/" + locale.localeString() + "/ca-gregorian.json");
2361
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
2362
+
2363
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
2364
+ var monthsData = cldr.main('dates/calendars/gregorian/months/format');
2365
+ var styleMap = {};
2366
+ var data = {};
2367
+ data[1] = monthsData.wide[1];
2368
+ data[2] = monthsData.wide[2];
2369
+ data[3] = monthsData.wide[3];
2370
+ data[4] = monthsData.wide[4];
2371
+ data[5] = monthsData.wide[5];
2372
+ data[6] = monthsData.wide[6];
2373
+ data[7] = monthsData.wide[7];
2374
+ data[8] = monthsData.wide[8];
2375
+ data[9] = monthsData.wide[9];
2376
+ data[10] = monthsData.wide[10];
2377
+ data[11] = monthsData.wide[11];
2378
+ data[12] = monthsData.wide[12];
2379
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
2380
+ data = {};
2381
+ data[1] = monthsData.narrow[1];
2382
+ data[2] = monthsData.narrow[2];
2383
+ data[3] = monthsData.narrow[3];
2384
+ data[4] = monthsData.narrow[4];
2385
+ data[5] = monthsData.narrow[5];
2386
+ data[6] = monthsData.narrow[6];
2387
+ data[7] = monthsData.narrow[7];
2388
+ data[8] = monthsData.narrow[8];
2389
+ data[9] = monthsData.narrow[9];
2390
+ data[10] = monthsData.narrow[10];
2391
+ data[11] = monthsData.narrow[11];
2392
+ data[12] = monthsData.narrow[12];
2393
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
2394
+ data = {};
2395
+ data[1] = monthsData.abbreviated[1];
2396
+ data[2] = monthsData.abbreviated[2];
2397
+ data[3] = monthsData.abbreviated[3];
2398
+ data[4] = monthsData.abbreviated[4];
2399
+ data[5] = monthsData.abbreviated[5];
2400
+ data[6] = monthsData.abbreviated[6];
2401
+ data[7] = monthsData.abbreviated[7];
2402
+ data[8] = monthsData.abbreviated[8];
2403
+ data[9] = monthsData.abbreviated[9];
2404
+ data[10] = monthsData.abbreviated[10];
2405
+ data[11] = monthsData.abbreviated[11];
2406
+ data[12] = monthsData.abbreviated[12];
2407
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
2408
+ return this._createLocaleStore(styleMap);
2409
+ }
2410
+
2411
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
2412
+ var daysData = cldr.main('dates/calendars/gregorian/days/format');
2413
+ var _styleMap = {};
2414
+ var _data = {};
2415
+ _data[1] = daysData.wide.mon;
2416
+ _data[2] = daysData.wide.tue;
2417
+ _data[3] = daysData.wide.wed;
2418
+ _data[4] = daysData.wide.thu;
2419
+ _data[5] = daysData.wide.fri;
2420
+ _data[6] = daysData.wide.sat;
2421
+ _data[7] = daysData.wide.sun;
2422
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
2423
+ _data = {};
2424
+ _data[1] = daysData.narrow.mon;
2425
+ _data[2] = daysData.narrow.tue;
2426
+ _data[3] = daysData.narrow.wed;
2427
+ _data[4] = daysData.narrow.thu;
2428
+ _data[5] = daysData.narrow.fri;
2429
+ _data[6] = daysData.narrow.sat;
2430
+ _data[7] = daysData.narrow.sun;
2431
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
2432
+ _data = {};
2433
+ _data[1] = daysData.abbreviated.mon;
2434
+ _data[2] = daysData.abbreviated.tue;
2435
+ _data[3] = daysData.abbreviated.wed;
2436
+ _data[4] = daysData.abbreviated.thu;
2437
+ _data[5] = daysData.abbreviated.fri;
2438
+ _data[6] = daysData.abbreviated.sat;
2439
+ _data[7] = daysData.abbreviated.sun;
2440
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
2441
+ return this._createLocaleStore(_styleMap);
2442
+ }
2443
+
2444
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
2445
+ var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
2446
+ var _styleMap2 = {};
2447
+ var _data2 = {};
2448
+ _data2[0] = dayPeriodsData.wide.am;
2449
+ _data2[1] = dayPeriodsData.wide.pm;
2450
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
2451
+ _data2 = {};
2452
+ _data2[0] = dayPeriodsData.narrow.am;
2453
+ _data2[1] = dayPeriodsData.narrow.pm;
2454
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
2455
+ _data2 = {};
2456
+ _data2[0] = dayPeriodsData.abbreviated.am;
2457
+ _data2[1] = dayPeriodsData.abbreviated.pm;
2458
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
2459
+ return this._createLocaleStore(_styleMap2);
2460
+ }
2461
+
2462
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
2463
+ var erasData = cldr.main('dates/calendars/gregorian/eras');
2464
+ var _styleMap3 = {};
2465
+ var _data3 = {};
2466
+ _data3[0] = erasData.eraNames['0'];
2467
+ _data3[1] = erasData.eraNames['1'];
2468
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
2469
+ _data3 = {};
2470
+ _data3[0] = erasData.eraNarrow['0'];
2471
+ _data3[1] = erasData.eraNarrow['1'];
2472
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
2473
+ _data3 = {};
2474
+ _data3[0] = erasData.eraAbbr['0'];
2475
+ _data3[1] = erasData.eraAbbr['1'];
2476
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
2477
+ return this._createLocaleStore(_styleMap3);
2478
+ }
2479
+
2480
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
2481
+ var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
2482
+ var _styleMap4 = {};
2483
+ var _data4 = {};
2484
+ _data4[1] = quartersData.wide['1'];
2485
+ _data4[2] = quartersData.wide['2'];
2486
+ _data4[3] = quartersData.wide['3'];
2487
+ _data4[4] = quartersData.wide['4'];
2488
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
2489
+ _data4 = {};
2490
+ _data4[1] = quartersData.narrow['1'];
2491
+ _data4[2] = quartersData.narrow['2'];
2492
+ _data4[3] = quartersData.narrow['3'];
2493
+ _data4[4] = quartersData.narrow['4'];
2494
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
2495
+ _data4 = {};
2496
+ _data4[1] = quartersData.abbreviated['1'];
2497
+ _data4[2] = quartersData.abbreviated['2'];
2498
+ _data4[3] = quartersData.abbreviated['3'];
2499
+ _data4[4] = quartersData.abbreviated['4'];
2500
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
2501
+ return this._createLocaleStore(_styleMap4);
2502
+ }
2503
+
2504
+ return null;
2505
+ };
2506
+
2507
+ _proto._createLocaleStore = function _createLocaleStore(valueTextMap) {
2508
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
2509
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
2590
2510
 
2591
- return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
2511
+ 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) {
2512
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
2592
2513
  }
2593
- }]);
2514
+
2515
+ return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
2516
+ };
2594
2517
 
2595
2518
  return CldrDateTimeTextProvider;
2596
2519
  }();
@@ -2612,18 +2535,12 @@ __webpack_require__.r(__webpack_exports__);
2612
2535
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
2613
2536
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
2614
2537
  /* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
2615
- 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; } } }; }
2538
+ 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."); }
2616
2539
 
2617
2540
  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); }
2618
2541
 
2619
2542
  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; }
2620
2543
 
2621
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2622
-
2623
- 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); } }
2624
-
2625
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2626
-
2627
2544
  /*
2628
2545
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2629
2546
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2648,8 +2565,6 @@ var resolveZoneIdTextCache = {};
2648
2565
 
2649
2566
  var CldrZoneTextPrinterParser = function () {
2650
2567
  function CldrZoneTextPrinterParser(textStyle) {
2651
- _classCallCheck(this, CldrZoneTextPrinterParser);
2652
-
2653
2568
  requireNonNull(textStyle, 'textStyle');
2654
2569
  requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
2655
2570
  this._textStyle = textStyle;
@@ -2658,202 +2573,178 @@ var CldrZoneTextPrinterParser = function () {
2658
2573
  Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/metaZones.json');
2659
2574
  }
2660
2575
 
2661
- _createClass(CldrZoneTextPrinterParser, [{
2662
- key: "_cachedResolveZoneIdText",
2663
- value: function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
2664
- if (resolveZoneIdTextCache[cldr.locale] == null) {
2665
- resolveZoneIdTextCache[cldr.locale] = {};
2666
- }
2576
+ var _proto = CldrZoneTextPrinterParser.prototype;
2667
2577
 
2668
- var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
2578
+ _proto._cachedResolveZoneIdText = function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
2579
+ if (resolveZoneIdTextCache[cldr.locale] == null) {
2580
+ resolveZoneIdTextCache[cldr.locale] = {};
2581
+ }
2669
2582
 
2670
- if (zoneIdToStyle[zoneId] == null) {
2671
- zoneIdToStyle[zoneId] = {};
2672
- }
2583
+ var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
2673
2584
 
2674
- var styleToType = zoneIdToStyle[zoneId];
2585
+ if (zoneIdToStyle[zoneId] == null) {
2586
+ zoneIdToStyle[zoneId] = {};
2587
+ }
2675
2588
 
2676
- if (styleToType[style] == null) {
2677
- styleToType[style] = {};
2678
- }
2589
+ var styleToType = zoneIdToStyle[zoneId];
2679
2590
 
2680
- var typeToResolvedZoneIdText = styleToType[style];
2591
+ if (styleToType[style] == null) {
2592
+ styleToType[style] = {};
2593
+ }
2681
2594
 
2682
- if (typeToResolvedZoneIdText[type] == null) {
2683
- typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
2684
- }
2595
+ var typeToResolvedZoneIdText = styleToType[style];
2685
2596
 
2686
- return typeToResolvedZoneIdText[type];
2597
+ if (typeToResolvedZoneIdText[type] == null) {
2598
+ typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
2687
2599
  }
2688
- }, {
2689
- key: "_resolveZoneIdText",
2690
- value: function _resolveZoneIdText(cldr, zoneId, style, type) {
2691
- var zoneData = cldr.main("dates/timeZoneNames/zone/".concat(zoneId, "/").concat(style, "/").concat(type));
2692
2600
 
2693
- if (zoneData) {
2694
- return zoneData;
2695
- } else {
2696
- var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/".concat(zoneId));
2601
+ return typeToResolvedZoneIdText[type];
2602
+ };
2603
+
2604
+ _proto._resolveZoneIdText = function _resolveZoneIdText(cldr, zoneId, style, type) {
2605
+ var zoneData = cldr.main("dates/timeZoneNames/zone/" + zoneId + "/" + style + "/" + type);
2697
2606
 
2698
- if (metazoneInfo) {
2699
- var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
2700
- var metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/").concat(type));
2607
+ if (zoneData) {
2608
+ return zoneData;
2609
+ } else {
2610
+ var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/" + zoneId);
2611
+
2612
+ if (metazoneInfo) {
2613
+ var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
2614
+ var metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/" + type);
2615
+
2616
+ if (metaZoneData) {
2617
+ return metaZoneData;
2618
+ } else {
2619
+ metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/generic");
2620
+
2621
+ if (!metaZoneData) {
2622
+ metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/standard");
2623
+ }
2701
2624
 
2702
2625
  if (metaZoneData) {
2703
2626
  return metaZoneData;
2704
2627
  } else {
2705
- metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/generic"));
2706
-
2707
- if (!metaZoneData) {
2708
- metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/standard"));
2709
- }
2628
+ var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
2629
+ var preferredZone = mapZones[metazone][cldr.attributes.territory];
2710
2630
 
2711
- if (metaZoneData) {
2712
- return metaZoneData;
2631
+ if (preferredZone) {
2632
+ if (preferredZone !== zoneId) {
2633
+ return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
2634
+ }
2713
2635
  } else {
2714
- var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
2715
- var preferredZone = mapZones[metazone][cldr.attributes.territory];
2716
-
2717
- if (preferredZone) {
2718
- if (preferredZone !== zoneId) {
2719
- return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
2720
- }
2721
- } else {
2722
- var goldenZone = mapZones[metazone]['001'];
2723
-
2724
- if (goldenZone !== zoneId) {
2725
- return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
2726
- }
2636
+ var goldenZone = mapZones[metazone]['001'];
2637
+
2638
+ if (goldenZone !== zoneId) {
2639
+ return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
2727
2640
  }
2728
2641
  }
2729
2642
  }
2730
2643
  }
2731
2644
  }
2732
2645
  }
2733
- }, {
2734
- key: "print",
2735
- value: function print(context, buf) {
2736
- var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
2737
-
2738
- if (zone == null) {
2739
- return false;
2740
- }
2741
-
2742
- if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
2743
- buf.append(zone.id());
2744
- return true;
2745
- }
2746
-
2747
- var daylight = false;
2748
- var hasDaylightSupport = false;
2749
- var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
2750
- var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
2751
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(context.locale().localeString(), "/timeZoneNames.json"));
2752
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
2646
+ };
2753
2647
 
2754
- var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
2648
+ _proto.print = function print(context, buf) {
2649
+ var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
2755
2650
 
2756
- if (text) {
2757
- buf.append(text);
2758
- } else {
2759
- buf.append(zone.id());
2760
- }
2651
+ if (zone == null) {
2652
+ return false;
2653
+ }
2761
2654
 
2655
+ if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
2656
+ buf.append(zone.id());
2762
2657
  return true;
2763
2658
  }
2764
- }, {
2765
- key: "_resolveZoneIds",
2766
- value: function _resolveZoneIds(localString) {
2767
- if (this._zoneIdsLocales[localString] != null) {
2768
- return this._zoneIdsLocales[localString];
2769
- }
2770
2659
 
2771
- var ids = {};
2772
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(localString, "/timeZoneNames.json"));
2773
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
2660
+ var daylight = false;
2661
+ var hasDaylightSupport = false;
2662
+ var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
2663
+ var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
2664
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + context.locale().localeString() + "/timeZoneNames.json");
2665
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
2774
2666
 
2775
- var _iterator = _createForOfIteratorHelper(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()),
2776
- _step;
2667
+ var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
2777
2668
 
2778
- try {
2779
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
2780
- var id = _step.value;
2781
- ids[id] = id;
2782
- var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
2669
+ if (text) {
2670
+ buf.append(text);
2671
+ } else {
2672
+ buf.append(zone.id());
2673
+ }
2783
2674
 
2784
- var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
2675
+ return true;
2676
+ };
2785
2677
 
2786
- if (genericText) {
2787
- ids[genericText] = id;
2788
- }
2678
+ _proto._resolveZoneIds = function _resolveZoneIds(localString) {
2679
+ if (this._zoneIdsLocales[localString] != null) {
2680
+ return this._zoneIdsLocales[localString];
2681
+ }
2789
2682
 
2790
- var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
2683
+ var ids = {};
2684
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + localString + "/timeZoneNames.json");
2685
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
2791
2686
 
2792
- if (standardText) {
2793
- ids[standardText] = id;
2794
- }
2687
+ for (var _iterator = _createForOfIteratorHelperLoose(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()), _step; !(_step = _iterator()).done;) {
2688
+ var id = _step.value;
2689
+ ids[id] = id;
2690
+ var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
2795
2691
 
2796
- var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
2692
+ var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
2797
2693
 
2798
- if (daylightText) {
2799
- ids[daylightText] = id;
2800
- }
2801
- }
2802
- } catch (err) {
2803
- _iterator.e(err);
2804
- } finally {
2805
- _iterator.f();
2694
+ if (genericText) {
2695
+ ids[genericText] = id;
2806
2696
  }
2807
2697
 
2808
- var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
2809
- this._zoneIdsLocales[localString] = {
2810
- ids: ids,
2811
- sortedKeys: sortedKeys
2812
- };
2813
- return this._zoneIdsLocales[localString];
2814
- }
2815
- }, {
2816
- key: "parse",
2817
- value: function parse(context, text, position) {
2818
- for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
2819
- var name = _arr[_i];
2820
-
2821
- if (context.subSequenceEquals(text, position, name, 0, name.length)) {
2822
- context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
2823
- return position + name.length;
2824
- }
2698
+ var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
2699
+
2700
+ if (standardText) {
2701
+ ids[standardText] = id;
2825
2702
  }
2826
2703
 
2827
- var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
2828
- ids = _this$_resolveZoneIds.ids,
2829
- sortedKeys = _this$_resolveZoneIds.sortedKeys;
2704
+ var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
2830
2705
 
2831
- var _iterator2 = _createForOfIteratorHelper(sortedKeys),
2832
- _step2;
2706
+ if (daylightText) {
2707
+ ids[daylightText] = id;
2708
+ }
2709
+ }
2833
2710
 
2834
- try {
2835
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
2836
- var _name = _step2.value;
2711
+ var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
2712
+ this._zoneIdsLocales[localString] = {
2713
+ ids: ids,
2714
+ sortedKeys: sortedKeys
2715
+ };
2716
+ return this._zoneIdsLocales[localString];
2717
+ };
2837
2718
 
2838
- if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
2839
- context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
2840
- return position + _name.length;
2841
- }
2842
- }
2843
- } catch (err) {
2844
- _iterator2.e(err);
2845
- } finally {
2846
- _iterator2.f();
2847
- }
2719
+ _proto.parse = function parse(context, text, position) {
2720
+ for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
2721
+ var name = _arr[_i];
2848
2722
 
2849
- return ~position;
2723
+ if (context.subSequenceEquals(text, position, name, 0, name.length)) {
2724
+ context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
2725
+ return position + name.length;
2726
+ }
2850
2727
  }
2851
- }, {
2852
- key: "toString",
2853
- value: function toString() {
2854
- return "ZoneText(".concat(this._textStyle, ")");
2728
+
2729
+ var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
2730
+ ids = _this$_resolveZoneIds.ids,
2731
+ sortedKeys = _this$_resolveZoneIds.sortedKeys;
2732
+
2733
+ for (var _iterator2 = _createForOfIteratorHelperLoose(sortedKeys), _step2; !(_step2 = _iterator2()).done;) {
2734
+ var _name = _step2.value;
2735
+
2736
+ if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
2737
+ context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
2738
+ return position + _name.length;
2739
+ }
2855
2740
  }
2856
- }]);
2741
+
2742
+ return ~position;
2743
+ };
2744
+
2745
+ _proto.toString = function toString() {
2746
+ return "ZoneText(" + this._textStyle + ")";
2747
+ };
2857
2748
 
2858
2749
  return CldrZoneTextPrinterParser;
2859
2750
  }();
@@ -2874,12 +2765,6 @@ __webpack_require__.r(__webpack_exports__);
2874
2765
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocalizedOffsetPrinterParser; });
2875
2766
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
2876
2767
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
2877
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2878
-
2879
- 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); } }
2880
-
2881
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2882
-
2883
2768
  /**
2884
2769
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
2885
2770
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -2890,180 +2775,174 @@ var MathUtil = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].MathUtil;
2890
2775
 
2891
2776
  var LocalizedOffsetPrinterParser = function () {
2892
2777
  function LocalizedOffsetPrinterParser(textStyle) {
2893
- _classCallCheck(this, LocalizedOffsetPrinterParser);
2894
-
2895
2778
  this._textStyle = textStyle;
2896
2779
  }
2897
2780
 
2898
- _createClass(LocalizedOffsetPrinterParser, [{
2899
- key: "textStyle",
2900
- value: function textStyle() {
2901
- return this._textStyle;
2902
- }
2903
- }, {
2904
- key: "print",
2905
- value: function print(context, buf) {
2906
- var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
2781
+ var _proto = LocalizedOffsetPrinterParser.prototype;
2907
2782
 
2908
- if (offsetSecs == null) {
2909
- return false;
2910
- }
2783
+ _proto.textStyle = function textStyle() {
2784
+ return this._textStyle;
2785
+ };
2911
2786
 
2912
- buf.append('GMT');
2787
+ _proto.print = function print(context, buf) {
2788
+ var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
2913
2789
 
2914
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
2915
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
2916
- }
2790
+ if (offsetSecs == null) {
2791
+ return false;
2792
+ }
2917
2793
 
2918
- var totalSecs = MathUtil.safeToInt(offsetSecs);
2794
+ buf.append('GMT');
2919
2795
 
2920
- if (totalSecs !== 0) {
2921
- var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
2922
- var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
2923
- var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
2924
- buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
2796
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
2797
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
2798
+ }
2925
2799
 
2926
- if (absMinutes > 0 || absSeconds > 0) {
2927
- buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
2800
+ var totalSecs = MathUtil.safeToInt(offsetSecs);
2928
2801
 
2929
- if (absSeconds > 0) {
2930
- buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
2931
- }
2802
+ if (totalSecs !== 0) {
2803
+ var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
2804
+ var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
2805
+ var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
2806
+ buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
2807
+
2808
+ if (absMinutes > 0 || absSeconds > 0) {
2809
+ buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
2810
+
2811
+ if (absSeconds > 0) {
2812
+ buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
2932
2813
  }
2933
2814
  }
2934
-
2935
- return true;
2936
2815
  }
2937
- }, {
2938
- key: "parse",
2939
- value: function parse(context, text, position) {
2940
- if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
2941
- return ~position;
2942
- }
2943
2816
 
2944
- position += 3;
2817
+ return true;
2818
+ };
2945
2819
 
2946
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
2947
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
2948
- }
2820
+ _proto.parse = function parse(context, text, position) {
2821
+ if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
2822
+ return ~position;
2823
+ }
2949
2824
 
2950
- var end = text.length;
2825
+ position += 3;
2951
2826
 
2952
- if (position === end) {
2953
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
2954
- }
2827
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
2828
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
2829
+ }
2955
2830
 
2956
- var sign = text.charAt(position);
2831
+ var end = text.length;
2957
2832
 
2958
- if (sign !== '+' && sign !== '-') {
2959
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
2960
- }
2833
+ if (position === end) {
2834
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
2835
+ }
2961
2836
 
2962
- var negative = sign === '-' ? -1 : 1;
2837
+ var sign = text.charAt(position);
2963
2838
 
2964
- if (position === end) {
2965
- return ~position;
2966
- }
2839
+ if (sign !== '+' && sign !== '-') {
2840
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
2841
+ }
2967
2842
 
2968
- position++;
2969
- var ch = text.charAt(position);
2843
+ var negative = sign === '-' ? -1 : 1;
2970
2844
 
2971
- if (ch < '0' || ch > '9') {
2972
- return ~position;
2973
- }
2845
+ if (position === end) {
2846
+ return ~position;
2847
+ }
2974
2848
 
2975
- position++;
2976
- var hour = MathUtil.parseInt(ch);
2849
+ position++;
2850
+ var ch = text.charAt(position);
2977
2851
 
2978
- if (position !== end) {
2979
- ch = text.charAt(position);
2852
+ if (ch < '0' || ch > '9') {
2853
+ return ~position;
2854
+ }
2980
2855
 
2981
- if (ch >= '0' && ch <= '9') {
2982
- hour = hour * 10 + MathUtil.parseInt(ch);
2856
+ position++;
2857
+ var hour = MathUtil.parseInt(ch);
2983
2858
 
2984
- if (hour > 23) {
2985
- return ~position;
2986
- }
2859
+ if (position !== end) {
2860
+ ch = text.charAt(position);
2987
2861
 
2988
- position++;
2989
- }
2990
- }
2862
+ if (ch >= '0' && ch <= '9') {
2863
+ hour = hour * 10 + MathUtil.parseInt(ch);
2991
2864
 
2992
- if (position === end || text.charAt(position) !== ':') {
2993
- var _offset = negative * 3600 * hour;
2865
+ if (hour > 23) {
2866
+ return ~position;
2867
+ }
2994
2868
 
2995
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
2869
+ position++;
2996
2870
  }
2871
+ }
2997
2872
 
2998
- position++;
2873
+ if (position === end || text.charAt(position) !== ':') {
2874
+ var _offset = negative * 3600 * hour;
2999
2875
 
3000
- if (position > end - 2) {
3001
- return ~position;
3002
- }
2876
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
2877
+ }
3003
2878
 
3004
- ch = text.charAt(position);
2879
+ position++;
3005
2880
 
3006
- if (ch < '0' || ch > '9') {
3007
- return ~position;
3008
- }
2881
+ if (position > end - 2) {
2882
+ return ~position;
2883
+ }
3009
2884
 
3010
- position++;
3011
- var min = MathUtil.parseInt(ch);
3012
- ch = text.charAt(position);
2885
+ ch = text.charAt(position);
3013
2886
 
3014
- if (ch < '0' || ch > '9') {
3015
- return ~position;
3016
- }
2887
+ if (ch < '0' || ch > '9') {
2888
+ return ~position;
2889
+ }
3017
2890
 
3018
- position++;
3019
- min = min * 10 + MathUtil.parseInt(ch);
2891
+ position++;
2892
+ var min = MathUtil.parseInt(ch);
2893
+ ch = text.charAt(position);
3020
2894
 
3021
- if (min > 59) {
3022
- return ~position;
3023
- }
2895
+ if (ch < '0' || ch > '9') {
2896
+ return ~position;
2897
+ }
3024
2898
 
3025
- if (position === end || text.charAt(position) !== ':') {
3026
- var _offset2 = negative * (3600 * hour + 60 * min);
2899
+ position++;
2900
+ min = min * 10 + MathUtil.parseInt(ch);
3027
2901
 
3028
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
3029
- }
3030
-
3031
- position++;
2902
+ if (min > 59) {
2903
+ return ~position;
2904
+ }
3032
2905
 
3033
- if (position > end - 2) {
3034
- return ~position;
3035
- }
2906
+ if (position === end || text.charAt(position) !== ':') {
2907
+ var _offset2 = negative * (3600 * hour + 60 * min);
3036
2908
 
3037
- ch = text.charAt(position);
2909
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
2910
+ }
3038
2911
 
3039
- if (ch < '0' || ch > '9') {
3040
- return ~position;
3041
- }
2912
+ position++;
3042
2913
 
3043
- position++;
3044
- var sec = MathUtil.parseInt(ch);
3045
- ch = text.charAt(position);
2914
+ if (position > end - 2) {
2915
+ return ~position;
2916
+ }
3046
2917
 
3047
- if (ch < '0' || ch > '9') {
3048
- return ~position;
3049
- }
2918
+ ch = text.charAt(position);
3050
2919
 
3051
- position++;
3052
- sec = sec * 10 + MathUtil.parseInt(ch);
2920
+ if (ch < '0' || ch > '9') {
2921
+ return ~position;
2922
+ }
3053
2923
 
3054
- if (sec > 59) {
3055
- return ~position;
3056
- }
2924
+ position++;
2925
+ var sec = MathUtil.parseInt(ch);
2926
+ ch = text.charAt(position);
3057
2927
 
3058
- var offset = negative * (3600 * hour + 60 * min + sec);
3059
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
2928
+ if (ch < '0' || ch > '9') {
2929
+ return ~position;
3060
2930
  }
3061
- }, {
3062
- key: "toString",
3063
- value: function toString() {
3064
- return "LocalizedOffset(".concat(this._textStyle, ")");
2931
+
2932
+ position++;
2933
+ sec = sec * 10 + MathUtil.parseInt(ch);
2934
+
2935
+ if (sec > 59) {
2936
+ return ~position;
3065
2937
  }
3066
- }]);
2938
+
2939
+ var offset = negative * (3600 * hour + 60 * min + sec);
2940
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
2941
+ };
2942
+
2943
+ _proto.toString = function toString() {
2944
+ return "LocalizedOffset(" + this._textStyle + ")";
2945
+ };
3067
2946
 
3068
2947
  return LocalizedOffsetPrinterParser;
3069
2948
  }();
@@ -3084,18 +2963,12 @@ __webpack_require__.r(__webpack_exports__);
3084
2963
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPrinterParser; });
3085
2964
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
3086
2965
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
3087
- 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; } } }; }
2966
+ 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."); }
3088
2967
 
3089
2968
  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); }
3090
2969
 
3091
2970
  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; }
3092
2971
 
3093
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3094
-
3095
- 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); } }
3096
-
3097
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3098
-
3099
2972
  /**
3100
2973
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
3101
2974
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -3105,104 +2978,86 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
3105
2978
 
3106
2979
  var TextPrinterParser = function () {
3107
2980
  function TextPrinterParser(field, textStyle, provider) {
3108
- _classCallCheck(this, TextPrinterParser);
3109
-
3110
2981
  this._field = field;
3111
2982
  this._textStyle = textStyle;
3112
2983
  this._provider = provider;
3113
2984
  }
3114
2985
 
3115
- _createClass(TextPrinterParser, [{
3116
- key: "field",
3117
- value: function field() {
3118
- return this._field;
3119
- }
3120
- }, {
3121
- key: "textStyle",
3122
- value: function textStyle() {
3123
- return this._textStyle;
3124
- }
3125
- }, {
3126
- key: "provider",
3127
- value: function provider() {
3128
- return this._provider;
3129
- }
3130
- }, {
3131
- key: "print",
3132
- value: function print(context, buf) {
3133
- var value = context.getValue(this._field);
2986
+ var _proto = TextPrinterParser.prototype;
3134
2987
 
3135
- if (value === null) {
3136
- return false;
3137
- }
2988
+ _proto.field = function field() {
2989
+ return this._field;
2990
+ };
3138
2991
 
3139
- var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
2992
+ _proto.textStyle = function textStyle() {
2993
+ return this._textStyle;
2994
+ };
3140
2995
 
3141
- if (text === null) {
3142
- return this._numberPrinterParser().print(context, buf);
3143
- }
2996
+ _proto.provider = function provider() {
2997
+ return this._provider;
2998
+ };
3144
2999
 
3145
- buf.append(text);
3146
- return true;
3000
+ _proto.print = function print(context, buf) {
3001
+ var value = context.getValue(this._field);
3002
+
3003
+ if (value === null) {
3004
+ return false;
3147
3005
  }
3148
- }, {
3149
- key: "parse",
3150
- value: function parse(context, parseText, position) {
3151
- var length = parseText.length;
3152
3006
 
3153
- if (position < 0 || position > length) {
3154
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: ".concat(position));
3155
- }
3007
+ var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
3156
3008
 
3157
- var style = context.isStrict() ? this._textStyle : null;
3009
+ if (text === null) {
3010
+ return this._numberPrinterParser().print(context, buf);
3011
+ }
3158
3012
 
3159
- var it = this._provider.getTextIterator(this._field, style, context.locale());
3013
+ buf.append(text);
3014
+ return true;
3015
+ };
3160
3016
 
3161
- if (it != null) {
3162
- var _iterator = _createForOfIteratorHelper(it),
3163
- _step;
3017
+ _proto.parse = function parse(context, parseText, position) {
3018
+ var length = parseText.length;
3164
3019
 
3165
- try {
3166
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
3167
- var entry = _step.value;
3168
- var itText = entry.key;
3020
+ if (position < 0 || position > length) {
3021
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: " + position);
3022
+ }
3169
3023
 
3170
- if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
3171
- return context.setParsedField(this._field, entry.value, position, position + itText.length);
3172
- }
3173
- }
3174
- } catch (err) {
3175
- _iterator.e(err);
3176
- } finally {
3177
- _iterator.f();
3178
- }
3024
+ var style = context.isStrict() ? this._textStyle : null;
3179
3025
 
3180
- if (context.isStrict()) {
3181
- return ~position;
3026
+ var it = this._provider.getTextIterator(this._field, style, context.locale());
3027
+
3028
+ if (it != null) {
3029
+ for (var _iterator = _createForOfIteratorHelperLoose(it), _step; !(_step = _iterator()).done;) {
3030
+ var entry = _step.value;
3031
+ var itText = entry.key;
3032
+
3033
+ if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
3034
+ return context.setParsedField(this._field, entry.value, position, position + itText.length);
3182
3035
  }
3183
3036
  }
3184
3037
 
3185
- return this._numberPrinterParser().parse(context, parseText, position);
3186
- }
3187
- }, {
3188
- key: "_numberPrinterParser",
3189
- value: function _numberPrinterParser() {
3190
- if (this._currentNumberPrinterParser == null) {
3191
- 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);
3038
+ if (context.isStrict()) {
3039
+ return ~position;
3192
3040
  }
3041
+ }
3042
+
3043
+ return this._numberPrinterParser().parse(context, parseText, position);
3044
+ };
3193
3045
 
3194
- return this._currentNumberPrinterParser;
3046
+ _proto._numberPrinterParser = function _numberPrinterParser() {
3047
+ if (this._currentNumberPrinterParser == null) {
3048
+ 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);
3195
3049
  }
3196
- }, {
3197
- key: "toString",
3198
- value: function toString() {
3199
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3200
- return "Text(".concat(this._field, ")");
3201
- }
3202
3050
 
3203
- return "Text(".concat(this._field, ",").concat(this._textStyle, ")");
3051
+ return this._currentNumberPrinterParser;
3052
+ };
3053
+
3054
+ _proto.toString = function toString() {
3055
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3056
+ return "Text(" + this._field + ")";
3204
3057
  }
3205
- }]);
3058
+
3059
+ return "Text(" + this._field + "," + this._textStyle + ")";
3060
+ };
3206
3061
 
3207
3062
  return TextPrinterParser;
3208
3063
  }();
@@ -3224,12 +3079,6 @@ __webpack_require__.r(__webpack_exports__);
3224
3079
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
3225
3080
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
3226
3081
  /* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../temporal/WeekFields */ "./src/temporal/WeekFields.js");
3227
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3228
-
3229
- 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); } }
3230
-
3231
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3232
-
3233
3082
  /*
3234
3083
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
3235
3084
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -3240,95 +3089,89 @@ var StringBuilder = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].StringBuilde
3240
3089
 
3241
3090
  var WeekFieldsPrinterParser = function () {
3242
3091
  function WeekFieldsPrinterParser(letter, count) {
3243
- _classCallCheck(this, WeekFieldsPrinterParser);
3244
-
3245
3092
  this._letter = letter;
3246
3093
  this._count = count;
3247
3094
  }
3248
3095
 
3249
- _createClass(WeekFieldsPrinterParser, [{
3250
- key: "print",
3251
- value: function print(context, buf) {
3252
- var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3096
+ var _proto = WeekFieldsPrinterParser.prototype;
3253
3097
 
3254
- var pp = this._evaluate(weekFields);
3098
+ _proto.print = function print(context, buf) {
3099
+ var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3255
3100
 
3256
- return pp.print(context, buf);
3257
- }
3258
- }, {
3259
- key: "parse",
3260
- value: function parse(context, text, position) {
3261
- var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3101
+ var pp = this._evaluate(weekFields);
3262
3102
 
3263
- var pp = this._evaluate(weekFields);
3103
+ return pp.print(context, buf);
3104
+ };
3264
3105
 
3265
- return pp.parse(context, text, position);
3266
- }
3267
- }, {
3268
- key: "_evaluate",
3269
- value: function _evaluate(weekFields) {
3270
- var pp = null;
3271
-
3272
- switch (this._letter) {
3273
- case 'e':
3274
- 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);
3275
- break;
3276
-
3277
- case 'c':
3278
- 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);
3279
- break;
3280
-
3281
- case 'w':
3282
- 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);
3283
- break;
3284
-
3285
- case 'W':
3286
- 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);
3287
- break;
3288
-
3289
- case 'Y':
3290
- if (this._count === 2) {
3291
- 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);
3292
- } else {
3293
- 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);
3294
- }
3106
+ _proto.parse = function parse(context, text, position) {
3107
+ var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3295
3108
 
3296
- break;
3297
- }
3109
+ var pp = this._evaluate(weekFields);
3298
3110
 
3299
- return pp;
3300
- }
3301
- }, {
3302
- key: "toString",
3303
- value: function toString() {
3304
- var sb = new StringBuilder(30);
3305
- sb.append('Localized(');
3306
-
3307
- if (this._letter === 'Y') {
3308
- if (this._count === 1) {
3309
- sb.append('WeekBasedYear');
3310
- } else if (this._count === 2) {
3311
- sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
3111
+ return pp.parse(context, text, position);
3112
+ };
3113
+
3114
+ _proto._evaluate = function _evaluate(weekFields) {
3115
+ var pp = null;
3116
+
3117
+ switch (this._letter) {
3118
+ case 'e':
3119
+ 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);
3120
+ break;
3121
+
3122
+ case 'c':
3123
+ 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);
3124
+ break;
3125
+
3126
+ case 'w':
3127
+ 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);
3128
+ break;
3129
+
3130
+ case 'W':
3131
+ 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);
3132
+ break;
3133
+
3134
+ case 'Y':
3135
+ if (this._count === 2) {
3136
+ 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);
3312
3137
  } else {
3313
- 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);
3314
- }
3315
- } else {
3316
- if (this._letter === 'c' || this._letter === 'e') {
3317
- sb.append('DayOfWeek');
3318
- } else if (this._letter === 'w') {
3319
- sb.append('WeekOfWeekBasedYear');
3320
- } else if (this._letter === 'W') {
3321
- sb.append('WeekOfMonth');
3138
+ 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);
3322
3139
  }
3323
3140
 
3324
- sb.append(',');
3325
- sb.append(this._count);
3141
+ break;
3142
+ }
3143
+
3144
+ return pp;
3145
+ };
3146
+
3147
+ _proto.toString = function toString() {
3148
+ var sb = new StringBuilder(30);
3149
+ sb.append('Localized(');
3150
+
3151
+ if (this._letter === 'Y') {
3152
+ if (this._count === 1) {
3153
+ sb.append('WeekBasedYear');
3154
+ } else if (this._count === 2) {
3155
+ sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
3156
+ } else {
3157
+ 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);
3158
+ }
3159
+ } else {
3160
+ if (this._letter === 'c' || this._letter === 'e') {
3161
+ sb.append('DayOfWeek');
3162
+ } else if (this._letter === 'w') {
3163
+ sb.append('WeekOfWeekBasedYear');
3164
+ } else if (this._letter === 'W') {
3165
+ sb.append('WeekOfMonth');
3326
3166
  }
3327
3167
 
3328
- sb.append(')');
3329
- return sb.toString();
3168
+ sb.append(',');
3169
+ sb.append(this._count);
3330
3170
  }
3331
- }]);
3171
+
3172
+ sb.append(')');
3173
+ return sb.toString();
3174
+ };
3332
3175
 
3333
3176
  return WeekFieldsPrinterParser;
3334
3177
  }();
@@ -3417,12 +3260,6 @@ __webpack_require__.r(__webpack_exports__);
3417
3260
  /* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
3418
3261
  /* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cldrjs */ "./node_modules/cldrjs/dist/node_main.js");
3419
3262
  /* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cldrjs__WEBPACK_IMPORTED_MODULE_2__);
3420
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3421
-
3422
- 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); } }
3423
-
3424
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3425
-
3426
3263
  /*
3427
3264
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
3428
3265
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -3449,9 +3286,27 @@ var _weekDayMap = {
3449
3286
  'sun': _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"].SUNDAY
3450
3287
  };
3451
3288
  var ComputedDayOfField = function () {
3452
- function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
3453
- _classCallCheck(this, ComputedDayOfField);
3289
+ ComputedDayOfField.ofDayOfWeekField = function ofDayOfWeekField(weekDef) {
3290
+ 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);
3291
+ };
3292
+
3293
+ ComputedDayOfField.ofWeekOfMonthField = function ofWeekOfMonthField(weekDef) {
3294
+ 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);
3295
+ };
3454
3296
 
3297
+ ComputedDayOfField.ofWeekOfYearField = function ofWeekOfYearField(weekDef) {
3298
+ 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);
3299
+ };
3300
+
3301
+ ComputedDayOfField.ofWeekOfWeekBasedYearField = function ofWeekOfWeekBasedYearField(weekDef) {
3302
+ 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);
3303
+ };
3304
+
3305
+ ComputedDayOfField.ofWeekBasedYearField = function ofWeekBasedYearField(weekDef) {
3306
+ 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);
3307
+ };
3308
+
3309
+ function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
3455
3310
  this._name = name;
3456
3311
  this._weekDef = weekDef;
3457
3312
  this._baseUnit = baseUnit;
@@ -3459,484 +3314,482 @@ var ComputedDayOfField = function () {
3459
3314
  this._range = range;
3460
3315
  }
3461
3316
 
3462
- _createClass(ComputedDayOfField, [{
3463
- key: "getFrom",
3464
- value: function getFrom(temporal) {
3465
- var sow = this._weekDef.firstDayOfWeek().value();
3466
-
3467
- var dow = this._localizedDayOfWeek(temporal, sow);
3468
-
3469
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3470
- return dow;
3471
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3472
- return this._localizedWeekOfMonth(temporal, dow);
3473
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3474
- return this._localizedWeekOfYear(temporal, dow);
3475
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3476
- return this._localizedWOWBY(temporal);
3477
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3478
- return this._localizedWBY(temporal);
3479
- } else {
3480
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3481
- }
3482
- }
3483
- }, {
3484
- key: "_localizedDayOfWeek",
3485
- value: function _localizedDayOfWeek(temporal, sow) {
3486
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3487
- return MathUtil.floorMod(isoDow - sow, 7) + 1;
3488
- }
3489
- }, {
3490
- key: "_localizedWeekOfMonth",
3491
- value: function _localizedWeekOfMonth(temporal, dow) {
3492
- var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3493
-
3494
- var offset = this._startOfWeekOffset(dom, dow);
3317
+ var _proto = ComputedDayOfField.prototype;
3495
3318
 
3496
- return ComputedDayOfField._computeWeek(offset, dom);
3497
- }
3498
- }, {
3499
- key: "_localizedWeekOfYear",
3500
- value: function _localizedWeekOfYear(temporal, dow) {
3501
- var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3319
+ _proto.getFrom = function getFrom(temporal) {
3320
+ var sow = this._weekDef.firstDayOfWeek().value();
3502
3321
 
3503
- var offset = this._startOfWeekOffset(doy, dow);
3322
+ var dow = this._localizedDayOfWeek(temporal, sow);
3504
3323
 
3505
- return ComputedDayOfField._computeWeek(offset, doy);
3324
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3325
+ return dow;
3326
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3327
+ return this._localizedWeekOfMonth(temporal, dow);
3328
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3329
+ return this._localizedWeekOfYear(temporal, dow);
3330
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3331
+ return this._localizedWOWBY(temporal);
3332
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3333
+ return this._localizedWBY(temporal);
3334
+ } else {
3335
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3506
3336
  }
3507
- }, {
3508
- key: "_localizedWOWBY",
3509
- value: function _localizedWOWBY(temporal) {
3510
- var sow = this._weekDef.firstDayOfWeek().value();
3337
+ };
3511
3338
 
3512
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3513
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3339
+ _proto._localizedDayOfWeek = function _localizedDayOfWeek(temporal, sow) {
3340
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3341
+ return MathUtil.floorMod(isoDow - sow, 7) + 1;
3342
+ };
3514
3343
 
3515
- var woy = this._localizedWeekOfYear(temporal, dow);
3344
+ _proto._localizedWeekOfMonth = function _localizedWeekOfMonth(temporal, dow) {
3345
+ var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3516
3346
 
3517
- if (woy === 0) {
3518
- var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3519
- return this._localizedWeekOfYear(previous, dow) + 1;
3520
- } else if (woy >= 53) {
3521
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3347
+ var offset = this._startOfWeekOffset(dom, dow);
3522
3348
 
3523
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3524
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3349
+ return ComputedDayOfField._computeWeek(offset, dom);
3350
+ };
3525
3351
 
3526
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3352
+ _proto._localizedWeekOfYear = function _localizedWeekOfYear(temporal, dow) {
3353
+ var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3527
3354
 
3528
- if (woy >= weekIndexOfFirstWeekNextYear) {
3529
- return woy - (weekIndexOfFirstWeekNextYear - 1);
3530
- }
3531
- }
3355
+ var offset = this._startOfWeekOffset(doy, dow);
3532
3356
 
3533
- return woy;
3534
- }
3535
- }, {
3536
- key: "_localizedWBY",
3537
- value: function _localizedWBY(temporal) {
3538
- var sow = this._weekDef.firstDayOfWeek().value();
3357
+ return ComputedDayOfField._computeWeek(offset, doy);
3358
+ };
3539
3359
 
3540
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3541
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3542
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3360
+ _proto._localizedWOWBY = function _localizedWOWBY(temporal) {
3361
+ var sow = this._weekDef.firstDayOfWeek().value();
3543
3362
 
3544
- var woy = this._localizedWeekOfYear(temporal, dow);
3363
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3364
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3545
3365
 
3546
- if (woy === 0) {
3547
- return year - 1;
3548
- } else if (woy < 53) {
3549
- return year;
3550
- }
3366
+ var woy = this._localizedWeekOfYear(temporal, dow);
3551
3367
 
3368
+ if (woy === 0) {
3369
+ var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3370
+ return this._localizedWeekOfYear(previous, dow) + 1;
3371
+ } else if (woy >= 53) {
3552
3372
  var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3553
3373
 
3374
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3554
3375
  var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3555
3376
 
3556
3377
  var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3557
3378
 
3558
3379
  if (woy >= weekIndexOfFirstWeekNextYear) {
3559
- return year + 1;
3380
+ return woy - (weekIndexOfFirstWeekNextYear - 1);
3560
3381
  }
3382
+ }
3383
+
3384
+ return woy;
3385
+ };
3386
+
3387
+ _proto._localizedWBY = function _localizedWBY(temporal) {
3388
+ var sow = this._weekDef.firstDayOfWeek().value();
3561
3389
 
3390
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3391
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3392
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3393
+
3394
+ var woy = this._localizedWeekOfYear(temporal, dow);
3395
+
3396
+ if (woy === 0) {
3397
+ return year - 1;
3398
+ } else if (woy < 53) {
3562
3399
  return year;
3563
3400
  }
3564
- }, {
3565
- key: "_startOfWeekOffset",
3566
- value: function _startOfWeekOffset(day, dow) {
3567
- var weekStart = MathUtil.floorMod(day - dow, 7);
3568
- var offset = -weekStart;
3569
-
3570
- if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
3571
- offset = 7 - weekStart;
3572
- }
3573
3401
 
3574
- return offset;
3402
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3403
+
3404
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3405
+
3406
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3407
+
3408
+ if (woy >= weekIndexOfFirstWeekNextYear) {
3409
+ return year + 1;
3575
3410
  }
3576
- }, {
3577
- key: "adjustInto",
3578
- value: function adjustInto(temporal, newValue) {
3579
- var newVal = this._range.checkValidIntValue(newValue, this);
3580
3411
 
3581
- var currentVal = temporal.get(this);
3412
+ return year;
3413
+ };
3582
3414
 
3583
- if (newVal === currentVal) {
3584
- return temporal;
3585
- }
3415
+ _proto._startOfWeekOffset = function _startOfWeekOffset(day, dow) {
3416
+ var weekStart = MathUtil.floorMod(day - dow, 7);
3417
+ var offset = -weekStart;
3586
3418
 
3587
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3588
- var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
3589
- var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
3590
- var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3419
+ if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
3420
+ offset = 7 - weekStart;
3421
+ }
3591
3422
 
3592
- if (result.get(this) > newVal) {
3593
- var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
3594
- result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3595
- } else {
3596
- if (result.get(this) < newVal) {
3597
- result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3598
- }
3423
+ return offset;
3424
+ };
3599
3425
 
3600
- var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
3426
+ ComputedDayOfField._computeWeek = function _computeWeek(offset, day) {
3427
+ return MathUtil.intDiv(7 + offset + (day - 1), 7);
3428
+ };
3601
3429
 
3602
- result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3430
+ _proto.adjustInto = function adjustInto(temporal, newValue) {
3431
+ var newVal = this._range.checkValidIntValue(newValue, this);
3603
3432
 
3604
- if (result.get(this) > newVal) {
3605
- result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3606
- }
3433
+ var currentVal = temporal.get(this);
3434
+
3435
+ if (newVal === currentVal) {
3436
+ return temporal;
3437
+ }
3438
+
3439
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3440
+ var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
3441
+ var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
3442
+ var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3443
+
3444
+ if (result.get(this) > newVal) {
3445
+ var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
3446
+ result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3447
+ } else {
3448
+ if (result.get(this) < newVal) {
3449
+ result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3607
3450
  }
3608
3451
 
3609
- return result;
3452
+ var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
3453
+
3454
+ result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3455
+
3456
+ if (result.get(this) > newVal) {
3457
+ result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3458
+ }
3610
3459
  }
3611
3460
 
3612
- var delta = newVal - currentVal;
3613
- return temporal.plus(delta, this._baseUnit);
3461
+ return result;
3614
3462
  }
3615
- }, {
3616
- key: "resolve",
3617
- value: function resolve(fieldValues, partialTemporal, resolverStyle) {
3618
- var sow = this._weekDef.firstDayOfWeek().value();
3619
3463
 
3620
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3621
- var value = fieldValues.remove(this);
3464
+ var delta = newVal - currentVal;
3465
+ return temporal.plus(delta, this._baseUnit);
3466
+ };
3622
3467
 
3623
- var localDow = this._range.checkValidIntValue(value, this);
3468
+ _proto.resolve = function resolve(fieldValues, partialTemporal, resolverStyle) {
3469
+ var sow = this._weekDef.firstDayOfWeek().value();
3624
3470
 
3625
- var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
3471
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3472
+ var value = fieldValues.remove(this);
3626
3473
 
3627
- fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
3628
- return null;
3629
- }
3474
+ var localDow = this._range.checkValidIntValue(value, this);
3475
+
3476
+ var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
3477
+
3478
+ fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
3479
+ return null;
3480
+ }
3481
+
3482
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
3483
+ return null;
3484
+ }
3630
3485
 
3631
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
3486
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3487
+ if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
3632
3488
  return null;
3633
3489
  }
3634
3490
 
3635
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3636
- if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
3637
- return null;
3638
- }
3491
+ 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));
3639
3492
 
3640
- 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));
3493
+ var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
3641
3494
 
3642
- var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
3495
+ var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
3496
+ var date;
3497
+ var days;
3643
3498
 
3644
- var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
3645
- var date;
3646
- var days;
3499
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3500
+ date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
3501
+ var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
3647
3502
 
3648
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3649
- date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
3650
- var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
3503
+ var dateDow = this._localizedDayOfWeek(date, sow);
3651
3504
 
3652
- var dateDow = this._localizedDayOfWeek(date, sow);
3505
+ var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
3653
3506
 
3654
- var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
3507
+ days = weeks * 7 + (_dow - dateDow);
3508
+ } else {
3509
+ date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
3655
3510
 
3656
- days = weeks * 7 + (_dow - dateDow);
3657
- } else {
3658
- date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
3511
+ var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
3512
+
3513
+ var _dateDow = this._localizedDayOfWeek(date, sow);
3659
3514
 
3660
- var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
3515
+ var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
3661
3516
 
3662
- var _dateDow = this._localizedDayOfWeek(date, sow);
3517
+ days = _weeks * 7 + (_dow - _dateDow);
3518
+ }
3663
3519
 
3664
- var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
3520
+ date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3665
3521
 
3666
- days = _weeks * 7 + (_dow - _dateDow);
3522
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3523
+ if (date.getLong(this) !== fieldValues.get(this)) {
3524
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
3667
3525
  }
3526
+ }
3668
3527
 
3669
- date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3528
+ fieldValues.remove(this);
3529
+ fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
3530
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3531
+ return date;
3532
+ }
3670
3533
 
3671
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3672
- if (date.getLong(this) !== fieldValues.get(this)) {
3673
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
3674
- }
3675
- }
3534
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
3535
+ return null;
3536
+ }
3676
3537
 
3677
- fieldValues.remove(this);
3678
- fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
3679
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3680
- return date;
3681
- }
3538
+ 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));
3539
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3540
+ var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
3682
3541
 
3683
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
3542
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3543
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
3684
3544
  return null;
3685
3545
  }
3686
3546
 
3687
- 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));
3688
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3689
- var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
3547
+ var _value = fieldValues.remove(this);
3690
3548
 
3691
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3692
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
3693
- return null;
3694
- }
3549
+ var _date;
3695
3550
 
3696
- var _value = fieldValues.remove(this);
3551
+ var _days;
3697
3552
 
3698
- var _date;
3553
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3554
+ var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
3555
+ _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
3556
+ _date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
3699
3557
 
3700
- var _days;
3558
+ var _dateDow2 = this._localizedDayOfWeek(_date, sow);
3701
3559
 
3702
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3703
- var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
3704
- _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
3705
- _date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
3560
+ var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
3706
3561
 
3707
- var _dateDow2 = this._localizedDayOfWeek(_date, sow);
3562
+ _days = _weeks2 * 7 + (dow - _dateDow2);
3563
+ } else {
3564
+ 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));
3708
3565
 
3709
- var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
3566
+ _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
3710
3567
 
3711
- _days = _weeks2 * 7 + (dow - _dateDow2);
3712
- } else {
3713
- 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));
3568
+ var _dateDow3 = this._localizedDayOfWeek(_date, sow);
3714
3569
 
3715
- _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
3570
+ var wom = this._range.checkValidIntValue(_value, this);
3716
3571
 
3717
- var _dateDow3 = this._localizedDayOfWeek(_date, sow);
3572
+ var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
3718
3573
 
3719
- var wom = this._range.checkValidIntValue(_value, this);
3574
+ _days = _weeks3 * 7 + (dow - _dateDow3);
3575
+ }
3720
3576
 
3721
- var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
3577
+ _date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3722
3578
 
3723
- _days = _weeks3 * 7 + (dow - _dateDow3);
3579
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3580
+ 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)) {
3581
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
3724
3582
  }
3583
+ }
3725
3584
 
3726
- _date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3585
+ fieldValues.remove(this);
3586
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3587
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
3588
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3589
+ return _date;
3590
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3591
+ var _value2 = fieldValues.remove(this);
3727
3592
 
3728
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3729
- 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)) {
3730
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
3731
- }
3732
- }
3593
+ var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
3733
3594
 
3734
- fieldValues.remove(this);
3735
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3736
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
3737
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3738
- return _date;
3739
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3740
- var _value2 = fieldValues.remove(this);
3595
+ var _days2;
3741
3596
 
3742
- var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
3597
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3598
+ var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
3743
3599
 
3744
- var _days2;
3600
+ var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
3745
3601
 
3746
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3747
- var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
3602
+ _days2 = _weeks4 * 7 + (dow - _dateDow4);
3603
+ } else {
3604
+ var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
3748
3605
 
3749
- var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
3606
+ var woy = this._range.checkValidIntValue(_value2, this);
3750
3607
 
3751
- _days2 = _weeks4 * 7 + (dow - _dateDow4);
3752
- } else {
3753
- var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
3608
+ var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
3754
3609
 
3755
- var woy = this._range.checkValidIntValue(_value2, this);
3610
+ _days2 = _weeks5 * 7 + (dow - _dateDow5);
3611
+ }
3756
3612
 
3757
- var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
3613
+ _date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3758
3614
 
3759
- _days2 = _weeks5 * 7 + (dow - _dateDow5);
3615
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3616
+ if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
3617
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
3760
3618
  }
3619
+ }
3761
3620
 
3762
- _date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3621
+ fieldValues.remove(this);
3622
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3623
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3624
+ return _date2;
3625
+ } else {
3626
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3627
+ }
3628
+ };
3763
3629
 
3764
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3765
- if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
3766
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
3767
- }
3768
- }
3630
+ _proto.name = function name() {
3631
+ return this._name;
3632
+ };
3769
3633
 
3770
- fieldValues.remove(this);
3771
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3772
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3773
- return _date2;
3774
- } else {
3775
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3776
- }
3777
- }
3778
- }, {
3779
- key: "name",
3780
- value: function name() {
3781
- return this._name;
3782
- }
3783
- }, {
3784
- key: "baseUnit",
3785
- value: function baseUnit() {
3786
- return this._baseUnit;
3787
- }
3788
- }, {
3789
- key: "rangeUnit",
3790
- value: function rangeUnit() {
3791
- return this._rangeUnit;
3792
- }
3793
- }, {
3794
- key: "range",
3795
- value: function range() {
3796
- return this._range;
3797
- }
3798
- }, {
3799
- key: "isDateBased",
3800
- value: function isDateBased() {
3801
- return true;
3802
- }
3803
- }, {
3804
- key: "isTimeBased",
3805
- value: function isTimeBased() {
3806
- return false;
3807
- }
3808
- }, {
3809
- key: "isSupportedBy",
3810
- value: function isSupportedBy(temporal) {
3811
- if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
3812
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3813
- return true;
3814
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3815
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3816
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3817
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3818
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3819
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
3820
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3821
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
3822
- }
3823
- }
3634
+ _proto.baseUnit = function baseUnit() {
3635
+ return this._baseUnit;
3636
+ };
3824
3637
 
3825
- return false;
3826
- }
3827
- }, {
3828
- key: "rangeRefinedBy",
3829
- value: function rangeRefinedBy(temporal) {
3830
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3831
- return this._range;
3832
- }
3638
+ _proto.rangeUnit = function rangeUnit() {
3639
+ return this._rangeUnit;
3640
+ };
3641
+
3642
+ _proto.range = function range() {
3643
+ return this._range;
3644
+ };
3645
+
3646
+ _proto.isDateBased = function isDateBased() {
3647
+ return true;
3648
+ };
3833
3649
 
3834
- var field = null;
3650
+ _proto.isTimeBased = function isTimeBased() {
3651
+ return false;
3652
+ };
3835
3653
 
3836
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3837
- field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
3654
+ _proto.isSupportedBy = function isSupportedBy(temporal) {
3655
+ if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
3656
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3657
+ return true;
3658
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3659
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3838
3660
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3839
- field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
3661
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3840
3662
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3841
- return this._rangeWOWBY(temporal);
3663
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
3842
3664
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3843
- return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3844
- } else {
3845
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3665
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
3846
3666
  }
3667
+ }
3847
3668
 
3848
- var sow = this._weekDef.firstDayOfWeek().value();
3669
+ return false;
3670
+ };
3849
3671
 
3850
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3851
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3672
+ _proto.rangeRefinedBy = function rangeRefinedBy(temporal) {
3673
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3674
+ return this._range;
3675
+ }
3852
3676
 
3853
- var offset = this._startOfWeekOffset(temporal.get(field), dow);
3677
+ var field = null;
3854
3678
 
3855
- var fieldRange = temporal.range(field);
3856
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
3679
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3680
+ field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
3681
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3682
+ field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
3683
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3684
+ return this._rangeWOWBY(temporal);
3685
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3686
+ return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3687
+ } else {
3688
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3857
3689
  }
3858
- }, {
3859
- key: "_rangeWOWBY",
3860
- value: function _rangeWOWBY(temporal) {
3861
- var sow = this._weekDef.firstDayOfWeek().value();
3862
3690
 
3863
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3864
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3691
+ var sow = this._weekDef.firstDayOfWeek().value();
3865
3692
 
3866
- var woy = this._localizedWeekOfYear(temporal, dow);
3693
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3694
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3867
3695
 
3868
- if (woy === 0) {
3869
- 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));
3870
- }
3696
+ var offset = this._startOfWeekOffset(temporal.get(field), dow);
3871
3697
 
3872
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3698
+ var fieldRange = temporal.range(field);
3699
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
3700
+ };
3873
3701
 
3874
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3875
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3702
+ _proto._rangeWOWBY = function _rangeWOWBY(temporal) {
3703
+ var sow = this._weekDef.firstDayOfWeek().value();
3876
3704
 
3877
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3705
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3706
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3878
3707
 
3879
- if (woy >= weekIndexOfFirstWeekNextYear) {
3880
- 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));
3881
- }
3708
+ var woy = this._localizedWeekOfYear(temporal, dow);
3882
3709
 
3883
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
3710
+ if (woy === 0) {
3711
+ 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));
3884
3712
  }
3885
- }, {
3886
- key: "displayName",
3887
- value: function displayName(locale) {
3888
- requireNonNull(locale, 'locale');
3889
3713
 
3890
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3891
- return 'Week';
3892
- }
3714
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3893
3715
 
3894
- return this.toString();
3895
- }
3896
- }, {
3897
- key: "toString",
3898
- value: function toString() {
3899
- return "".concat(this._name, "[").concat(this._weekDef.toString(), "]");
3900
- }
3901
- }], [{
3902
- key: "ofDayOfWeekField",
3903
- value: function ofDayOfWeekField(weekDef) {
3904
- 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);
3905
- }
3906
- }, {
3907
- key: "ofWeekOfMonthField",
3908
- value: function ofWeekOfMonthField(weekDef) {
3909
- 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);
3910
- }
3911
- }, {
3912
- key: "ofWeekOfYearField",
3913
- value: function ofWeekOfYearField(weekDef) {
3914
- 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);
3915
- }
3916
- }, {
3917
- key: "ofWeekOfWeekBasedYearField",
3918
- value: function ofWeekOfWeekBasedYearField(weekDef) {
3919
- 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);
3920
- }
3921
- }, {
3922
- key: "ofWeekBasedYearField",
3923
- value: function ofWeekBasedYearField(weekDef) {
3924
- 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);
3716
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3717
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3718
+
3719
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3720
+
3721
+ if (woy >= weekIndexOfFirstWeekNextYear) {
3722
+ 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));
3925
3723
  }
3926
- }, {
3927
- key: "_computeWeek",
3928
- value: function _computeWeek(offset, day) {
3929
- return MathUtil.intDiv(7 + offset + (day - 1), 7);
3724
+
3725
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
3726
+ };
3727
+
3728
+ _proto.displayName = function displayName(locale) {
3729
+ requireNonNull(locale, 'locale');
3730
+
3731
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3732
+ return 'Week';
3930
3733
  }
3931
- }]);
3734
+
3735
+ return this.toString();
3736
+ };
3737
+
3738
+ _proto.toString = function toString() {
3739
+ return this._name + "[" + this._weekDef.toString() + "]";
3740
+ };
3932
3741
 
3933
3742
  return ComputedDayOfField;
3934
3743
  }();
3935
3744
  var WeekFieldsCache = new Map();
3936
3745
  var WeekFields = function () {
3937
- function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
3938
- _classCallCheck(this, WeekFields);
3746
+ WeekFields.of = function of(firstDayOrLocale, minDays) {
3747
+ if (minDays === undefined) {
3748
+ return WeekFields.ofLocale(firstDayOrLocale);
3749
+ } else {
3750
+ return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
3751
+ }
3752
+ };
3753
+
3754
+ WeekFields.ofLocale = function ofLocale(locale) {
3755
+ requireNonNull(locale, 'locale');
3756
+ cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
3757
+ var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
3758
+ var worldRegion = '001';
3759
+ var weekData = cldr.get('supplemental/weekData');
3760
+
3761
+ var dow = _weekDayMap[weekData.firstDay[locale.country()]];
3762
+
3763
+ if (!dow) {
3764
+ dow = _weekDayMap[weekData.firstDay[worldRegion]];
3765
+ }
3766
+
3767
+ var minDays = weekData.minDays[locale.country()];
3768
+
3769
+ if (!minDays) {
3770
+ minDays = weekData.minDays[worldRegion];
3771
+ }
3772
+
3773
+ return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
3774
+ };
3775
+
3776
+ WeekFields.ofFirstDayOfWeekMinDays = function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
3777
+ requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
3778
+ requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
3779
+ requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
3780
+ var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
3781
+ var rules = WeekFieldsCache.get(key);
3782
+
3783
+ if (rules == null) {
3784
+ rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
3785
+ WeekFieldsCache.set(key, rules);
3786
+ rules = WeekFieldsCache.get(key);
3787
+ }
3788
+
3789
+ return rules;
3790
+ };
3939
3791
 
3792
+ function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
3940
3793
  requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
3941
3794
  requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
3942
3795
  requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
@@ -3955,114 +3808,55 @@ var WeekFields = function () {
3955
3808
  cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/likelySubtags.json'));
3956
3809
  }
3957
3810
 
3958
- _createClass(WeekFields, [{
3959
- key: "firstDayOfWeek",
3960
- value: function firstDayOfWeek() {
3961
- return this._firstDayOfWeek;
3962
- }
3963
- }, {
3964
- key: "minimalDaysInFirstWeek",
3965
- value: function minimalDaysInFirstWeek() {
3966
- return this._minimalDays;
3967
- }
3968
- }, {
3969
- key: "dayOfWeek",
3970
- value: function dayOfWeek() {
3971
- return this._dayOfWeek;
3972
- }
3973
- }, {
3974
- key: "weekOfMonth",
3975
- value: function weekOfMonth() {
3976
- return this._weekOfMonth;
3977
- }
3978
- }, {
3979
- key: "weekOfYear",
3980
- value: function weekOfYear() {
3981
- return this._weekOfYear;
3982
- }
3983
- }, {
3984
- key: "weekOfWeekBasedYear",
3985
- value: function weekOfWeekBasedYear() {
3986
- return this._weekOfWeekBasedYear;
3987
- }
3988
- }, {
3989
- key: "weekBasedYear",
3990
- value: function weekBasedYear() {
3991
- return this._weekBasedYear;
3992
- }
3993
- }, {
3994
- key: "equals",
3995
- value: function equals(other) {
3996
- if (this === other) {
3997
- return true;
3998
- }
3811
+ var _proto2 = WeekFields.prototype;
3999
3812
 
4000
- if (other instanceof WeekFields) {
4001
- return this.hashCode() === other.hashCode();
4002
- }
3813
+ _proto2.firstDayOfWeek = function firstDayOfWeek() {
3814
+ return this._firstDayOfWeek;
3815
+ };
4003
3816
 
4004
- return false;
4005
- }
4006
- }, {
4007
- key: "hashCode",
4008
- value: function hashCode() {
4009
- return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
4010
- }
4011
- }, {
4012
- key: "toString",
4013
- value: function toString() {
4014
- return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
4015
- }
4016
- }], [{
4017
- key: "of",
4018
- value: function of(firstDayOrLocale, minDays) {
4019
- if (minDays === undefined) {
4020
- return WeekFields.ofLocale(firstDayOrLocale);
4021
- } else {
4022
- return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
4023
- }
4024
- }
4025
- }, {
4026
- key: "ofLocale",
4027
- value: function ofLocale(locale) {
4028
- requireNonNull(locale, 'locale');
4029
- cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
4030
- var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
4031
- var worldRegion = '001';
4032
- var weekData = cldr.get('supplemental/weekData');
4033
-
4034
- var dow = _weekDayMap[weekData.firstDay[locale.country()]];
4035
-
4036
- if (!dow) {
4037
- dow = _weekDayMap[weekData.firstDay[worldRegion]];
4038
- }
3817
+ _proto2.minimalDaysInFirstWeek = function minimalDaysInFirstWeek() {
3818
+ return this._minimalDays;
3819
+ };
4039
3820
 
4040
- var minDays = weekData.minDays[locale.country()];
3821
+ _proto2.dayOfWeek = function dayOfWeek() {
3822
+ return this._dayOfWeek;
3823
+ };
4041
3824
 
4042
- if (!minDays) {
4043
- minDays = weekData.minDays[worldRegion];
4044
- }
3825
+ _proto2.weekOfMonth = function weekOfMonth() {
3826
+ return this._weekOfMonth;
3827
+ };
4045
3828
 
4046
- return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
3829
+ _proto2.weekOfYear = function weekOfYear() {
3830
+ return this._weekOfYear;
3831
+ };
3832
+
3833
+ _proto2.weekOfWeekBasedYear = function weekOfWeekBasedYear() {
3834
+ return this._weekOfWeekBasedYear;
3835
+ };
3836
+
3837
+ _proto2.weekBasedYear = function weekBasedYear() {
3838
+ return this._weekBasedYear;
3839
+ };
3840
+
3841
+ _proto2.equals = function equals(other) {
3842
+ if (this === other) {
3843
+ return true;
4047
3844
  }
4048
- }, {
4049
- key: "ofFirstDayOfWeekMinDays",
4050
- value: function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
4051
- requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
4052
- requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
4053
- requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
4054
- var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
4055
- var rules = WeekFieldsCache.get(key);
4056
-
4057
- if (rules == null) {
4058
- rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
4059
- WeekFieldsCache.set(key, rules);
4060
- rules = WeekFieldsCache.get(key);
4061
- }
4062
3845
 
4063
- return rules;
3846
+ if (other instanceof WeekFields) {
3847
+ return this.hashCode() === other.hashCode();
4064
3848
  }
4065
- }]);
3849
+
3850
+ return false;
3851
+ };
3852
+
3853
+ _proto2.hashCode = function hashCode() {
3854
+ return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
3855
+ };
3856
+
3857
+ _proto2.toString = function toString() {
3858
+ return "WeekFields[" + this._firstDayOfWeek + "," + this._minimalDays + "]";
3859
+ };
4066
3860
 
4067
3861
  return WeekFields;
4068
3862
  }();