@symbo.ls/uikit 2.11.52 → 2.11.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -545,7 +545,7 @@ var require_cjs = __commonJS({
545
545
  mergeArrayExclude: () => mergeArrayExclude,
546
546
  mergeIfExisted: () => mergeIfExisted,
547
547
  overwrite: () => overwrite,
548
- overwriteDeep: () => overwriteDeep,
548
+ overwriteDeep: () => overwriteDeep2,
549
549
  overwriteShallow: () => overwriteShallow4,
550
550
  removeFromObject: () => removeFromObject
551
551
  });
@@ -803,14 +803,14 @@ var require_cjs = __commonJS({
803
803
  }
804
804
  return obj;
805
805
  };
806
- var overwriteDeep = (obj, params, excludeFrom = []) => {
806
+ var overwriteDeep2 = (obj, params, excludeFrom = []) => {
807
807
  for (const e in params) {
808
808
  if (excludeFrom.includes(e) || e.includes("__"))
809
809
  continue;
810
810
  const objProp = obj[e];
811
811
  const paramsProp = params[e];
812
812
  if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
813
- overwriteDeep(objProp, paramsProp);
813
+ overwriteDeep2(objProp, paramsProp);
814
814
  } else if (paramsProp !== void 0) {
815
815
  obj[e] = paramsProp;
816
816
  }
@@ -2476,6 +2476,9 @@ var require_cjs = __commonJS({
2476
2476
  configReset.h6 = configTemplates.h6;
2477
2477
  }
2478
2478
  const { body, ...templates } = TYPOGRAPHY2.templates;
2479
+ const globalTheme = CONFIG22.useDocumentTheme ? getMediaTheme4("document", `@${CONFIG22.globalTheme}`) : {};
2480
+ if (RESET2.html)
2481
+ (0, import_utils24.overwriteDeep)(RESET2.html, globalTheme);
2479
2482
  return (0, import_utils24.deepMerge)((0, import_utils24.merge)(RESET2, reset), {
2480
2483
  html: {
2481
2484
  position: "absolute",
@@ -2487,8 +2490,8 @@ var require_cjs = __commonJS({
2487
2490
  margin: "0",
2488
2491
  WebkitFontSmoothing: "subpixel-antialiased",
2489
2492
  scrollBehavior: "smooth",
2493
+ ...globalTheme,
2490
2494
  fontSize: TYPOGRAPHY2.browserDefault + "px",
2491
- ...CONFIG22.useDocumentTheme ? getMediaTheme4("document", `@${CONFIG22.globalTheme}`) : {},
2492
2495
  fontFamily: DOCUMENT2.fontFamily,
2493
2496
  lineHeight: DOCUMENT2.lineHeight
2494
2497
  },
@@ -4357,94 +4360,4273 @@ var require_createState = __commonJS({
4357
4360
  const inheritedState = (0, import_inherit.createInheritedState)(element, parent);
4358
4361
  element.state = inheritedState || {};
4359
4362
  }
4360
- const dependentState = applyDependentState(element, element.state);
4361
- if (dependentState)
4362
- element.state = dependentState;
4363
- if (skip)
4364
- return element.state;
4365
- applyMethods(element);
4366
- (0, import_event.triggerEventOn)("stateCreated", element);
4367
- return element.state;
4368
- };
4369
- var applyDependentState = (element, state) => {
4370
- const { __ref: ref } = state;
4371
- if (!ref)
4372
- return;
4373
- const dependentState = (0, import_utils16.deepClone)(ref, import_ignore.IGNORE_STATE_PARAMS);
4374
- const newDepends = { [element.key]: dependentState };
4375
- ref.__depends = (0, import_utils16.isObject)(ref.__depends) ? { ...ref.__depends, ...newDepends } : newDepends;
4376
- return dependentState;
4377
- };
4378
- var checkForTypes = (element) => {
4379
- const { state, __ref: ref } = element;
4380
- if ((0, import_utils16.isFunction)(state)) {
4381
- ref.__state = state;
4382
- return (0, import_utils16.exec)(state, element);
4363
+ const dependentState = applyDependentState(element, element.state);
4364
+ if (dependentState)
4365
+ element.state = dependentState;
4366
+ if (skip)
4367
+ return element.state;
4368
+ applyMethods(element);
4369
+ (0, import_event.triggerEventOn)("stateCreated", element);
4370
+ return element.state;
4371
+ };
4372
+ var applyDependentState = (element, state) => {
4373
+ const { __ref: ref } = state;
4374
+ if (!ref)
4375
+ return;
4376
+ const dependentState = (0, import_utils16.deepClone)(ref, import_ignore.IGNORE_STATE_PARAMS);
4377
+ const newDepends = { [element.key]: dependentState };
4378
+ ref.__depends = (0, import_utils16.isObject)(ref.__depends) ? { ...ref.__depends, ...newDepends } : newDepends;
4379
+ return dependentState;
4380
+ };
4381
+ var checkForTypes = (element) => {
4382
+ const { state, __ref: ref } = element;
4383
+ if ((0, import_utils16.isFunction)(state)) {
4384
+ ref.__state = state;
4385
+ return (0, import_utils16.exec)(state, element);
4386
+ }
4387
+ if ((0, import_utils16.is)(state)("string", "number")) {
4388
+ ref.__state = state;
4389
+ return {};
4390
+ }
4391
+ if (state === true) {
4392
+ ref.__state = element.key;
4393
+ return {};
4394
+ }
4395
+ if (state) {
4396
+ ref.__hasRootState = true;
4397
+ return state;
4398
+ }
4399
+ return false;
4400
+ };
4401
+ var applyMethods = (element) => {
4402
+ const state = element.state;
4403
+ const ref = element.__ref;
4404
+ state.clean = import_methods.clean;
4405
+ state.parse = import_methods.parse;
4406
+ state.destroy = import_methods.destroy;
4407
+ state.update = import_updateState.updateState;
4408
+ state.rootUpdate = import_methods.rootUpdate;
4409
+ state.parentUpdate = import_methods.parentUpdate;
4410
+ state.create = createState;
4411
+ state.add = import_methods.add;
4412
+ state.toggle = import_methods.toggle;
4413
+ state.remove = import_methods.remove;
4414
+ state.apply = import_methods.apply;
4415
+ state.parent = element.parent.state;
4416
+ state.set = import_methods.set;
4417
+ state.__element = element;
4418
+ state.__children = {};
4419
+ state.__root = ref.__root ? ref.__root.state : state;
4420
+ if (state.parent)
4421
+ state.parent.__children[element.key] = state;
4422
+ };
4423
+ }
4424
+ });
4425
+
4426
+ // ../../node_modules/@domql/state/dist/cjs/index.js
4427
+ var require_cjs8 = __commonJS({
4428
+ "../../node_modules/@domql/state/dist/cjs/index.js"(exports, module2) {
4429
+ "use strict";
4430
+ var __defProp2 = Object.defineProperty;
4431
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
4432
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
4433
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
4434
+ var __copyProps2 = (to, from2, except, desc) => {
4435
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
4436
+ for (let key of __getOwnPropNames2(from2))
4437
+ if (!__hasOwnProp2.call(to, key) && key !== except)
4438
+ __defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
4439
+ }
4440
+ return to;
4441
+ };
4442
+ var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
4443
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
4444
+ var state_exports = {};
4445
+ module2.exports = __toCommonJS2(state_exports);
4446
+ __reExport(state_exports, require_ignore(), module2.exports);
4447
+ __reExport(state_exports, require_createState(), module2.exports);
4448
+ __reExport(state_exports, require_updateState(), module2.exports);
4449
+ __reExport(state_exports, require_methods(), module2.exports);
4450
+ __reExport(state_exports, require_inherit(), module2.exports);
4451
+ }
4452
+ });
4453
+
4454
+ // ../../node_modules/moment/moment.js
4455
+ var require_moment = __commonJS({
4456
+ "../../node_modules/moment/moment.js"(exports, module2) {
4457
+ (function(global, factory) {
4458
+ typeof exports === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.moment = factory();
4459
+ })(exports, function() {
4460
+ "use strict";
4461
+ var hookCallback;
4462
+ function hooks() {
4463
+ return hookCallback.apply(null, arguments);
4464
+ }
4465
+ function setHookCallback(callback) {
4466
+ hookCallback = callback;
4467
+ }
4468
+ function isArray7(input) {
4469
+ return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]";
4470
+ }
4471
+ function isObject7(input) {
4472
+ return input != null && Object.prototype.toString.call(input) === "[object Object]";
4473
+ }
4474
+ function hasOwnProp(a, b) {
4475
+ return Object.prototype.hasOwnProperty.call(a, b);
4476
+ }
4477
+ function isObjectEmpty(obj) {
4478
+ if (Object.getOwnPropertyNames) {
4479
+ return Object.getOwnPropertyNames(obj).length === 0;
4480
+ } else {
4481
+ var k;
4482
+ for (k in obj) {
4483
+ if (hasOwnProp(obj, k)) {
4484
+ return false;
4485
+ }
4486
+ }
4487
+ return true;
4488
+ }
4489
+ }
4490
+ function isUndefined(input) {
4491
+ return input === void 0;
4492
+ }
4493
+ function isNumber(input) {
4494
+ return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]";
4495
+ }
4496
+ function isDate(input) {
4497
+ return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]";
4498
+ }
4499
+ function map(arr, fn) {
4500
+ var res = [], i, arrLen = arr.length;
4501
+ for (i = 0; i < arrLen; ++i) {
4502
+ res.push(fn(arr[i], i));
4503
+ }
4504
+ return res;
4505
+ }
4506
+ function extend(a, b) {
4507
+ for (var i in b) {
4508
+ if (hasOwnProp(b, i)) {
4509
+ a[i] = b[i];
4510
+ }
4511
+ }
4512
+ if (hasOwnProp(b, "toString")) {
4513
+ a.toString = b.toString;
4514
+ }
4515
+ if (hasOwnProp(b, "valueOf")) {
4516
+ a.valueOf = b.valueOf;
4517
+ }
4518
+ return a;
4519
+ }
4520
+ function createUTC(input, format2, locale2, strict) {
4521
+ return createLocalOrUTC(input, format2, locale2, strict, true).utc();
4522
+ }
4523
+ function defaultParsingFlags() {
4524
+ return {
4525
+ empty: false,
4526
+ unusedTokens: [],
4527
+ unusedInput: [],
4528
+ overflow: -2,
4529
+ charsLeftOver: 0,
4530
+ nullInput: false,
4531
+ invalidEra: null,
4532
+ invalidMonth: null,
4533
+ invalidFormat: false,
4534
+ userInvalidated: false,
4535
+ iso: false,
4536
+ parsedDateParts: [],
4537
+ era: null,
4538
+ meridiem: null,
4539
+ rfc2822: false,
4540
+ weekdayMismatch: false
4541
+ };
4542
+ }
4543
+ function getParsingFlags(m) {
4544
+ if (m._pf == null) {
4545
+ m._pf = defaultParsingFlags();
4546
+ }
4547
+ return m._pf;
4548
+ }
4549
+ var some;
4550
+ if (Array.prototype.some) {
4551
+ some = Array.prototype.some;
4552
+ } else {
4553
+ some = function(fun) {
4554
+ var t = Object(this), len = t.length >>> 0, i;
4555
+ for (i = 0; i < len; i++) {
4556
+ if (i in t && fun.call(this, t[i], i, t)) {
4557
+ return true;
4558
+ }
4559
+ }
4560
+ return false;
4561
+ };
4562
+ }
4563
+ function isValid(m) {
4564
+ if (m._isValid == null) {
4565
+ var flags = getParsingFlags(m), parsedParts = some.call(flags.parsedDateParts, function(i) {
4566
+ return i != null;
4567
+ }), isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);
4568
+ if (m._strict) {
4569
+ isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0;
4570
+ }
4571
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
4572
+ m._isValid = isNowValid;
4573
+ } else {
4574
+ return isNowValid;
4575
+ }
4576
+ }
4577
+ return m._isValid;
4578
+ }
4579
+ function createInvalid(flags) {
4580
+ var m = createUTC(NaN);
4581
+ if (flags != null) {
4582
+ extend(getParsingFlags(m), flags);
4583
+ } else {
4584
+ getParsingFlags(m).userInvalidated = true;
4585
+ }
4586
+ return m;
4587
+ }
4588
+ var momentProperties = hooks.momentProperties = [], updateInProgress = false;
4589
+ function copyConfig(to2, from3) {
4590
+ var i, prop, val, momentPropertiesLen = momentProperties.length;
4591
+ if (!isUndefined(from3._isAMomentObject)) {
4592
+ to2._isAMomentObject = from3._isAMomentObject;
4593
+ }
4594
+ if (!isUndefined(from3._i)) {
4595
+ to2._i = from3._i;
4596
+ }
4597
+ if (!isUndefined(from3._f)) {
4598
+ to2._f = from3._f;
4599
+ }
4600
+ if (!isUndefined(from3._l)) {
4601
+ to2._l = from3._l;
4602
+ }
4603
+ if (!isUndefined(from3._strict)) {
4604
+ to2._strict = from3._strict;
4605
+ }
4606
+ if (!isUndefined(from3._tzm)) {
4607
+ to2._tzm = from3._tzm;
4608
+ }
4609
+ if (!isUndefined(from3._isUTC)) {
4610
+ to2._isUTC = from3._isUTC;
4611
+ }
4612
+ if (!isUndefined(from3._offset)) {
4613
+ to2._offset = from3._offset;
4614
+ }
4615
+ if (!isUndefined(from3._pf)) {
4616
+ to2._pf = getParsingFlags(from3);
4617
+ }
4618
+ if (!isUndefined(from3._locale)) {
4619
+ to2._locale = from3._locale;
4620
+ }
4621
+ if (momentPropertiesLen > 0) {
4622
+ for (i = 0; i < momentPropertiesLen; i++) {
4623
+ prop = momentProperties[i];
4624
+ val = from3[prop];
4625
+ if (!isUndefined(val)) {
4626
+ to2[prop] = val;
4627
+ }
4628
+ }
4629
+ }
4630
+ return to2;
4631
+ }
4632
+ function Moment(config) {
4633
+ copyConfig(this, config);
4634
+ this._d = new Date(config._d != null ? config._d.getTime() : NaN);
4635
+ if (!this.isValid()) {
4636
+ this._d = /* @__PURE__ */ new Date(NaN);
4637
+ }
4638
+ if (updateInProgress === false) {
4639
+ updateInProgress = true;
4640
+ hooks.updateOffset(this);
4641
+ updateInProgress = false;
4642
+ }
4643
+ }
4644
+ function isMoment(obj) {
4645
+ return obj instanceof Moment || obj != null && obj._isAMomentObject != null;
4646
+ }
4647
+ function warn(msg) {
4648
+ if (hooks.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) {
4649
+ console.warn("Deprecation warning: " + msg);
4650
+ }
4651
+ }
4652
+ function deprecate(msg, fn) {
4653
+ var firstTime = true;
4654
+ return extend(function() {
4655
+ if (hooks.deprecationHandler != null) {
4656
+ hooks.deprecationHandler(null, msg);
4657
+ }
4658
+ if (firstTime) {
4659
+ var args = [], arg, i, key, argLen = arguments.length;
4660
+ for (i = 0; i < argLen; i++) {
4661
+ arg = "";
4662
+ if (typeof arguments[i] === "object") {
4663
+ arg += "\n[" + i + "] ";
4664
+ for (key in arguments[0]) {
4665
+ if (hasOwnProp(arguments[0], key)) {
4666
+ arg += key + ": " + arguments[0][key] + ", ";
4667
+ }
4668
+ }
4669
+ arg = arg.slice(0, -2);
4670
+ } else {
4671
+ arg = arguments[i];
4672
+ }
4673
+ args.push(arg);
4674
+ }
4675
+ warn(
4676
+ msg + "\nArguments: " + Array.prototype.slice.call(args).join("") + "\n" + new Error().stack
4677
+ );
4678
+ firstTime = false;
4679
+ }
4680
+ return fn.apply(this, arguments);
4681
+ }, fn);
4682
+ }
4683
+ var deprecations = {};
4684
+ function deprecateSimple(name, msg) {
4685
+ if (hooks.deprecationHandler != null) {
4686
+ hooks.deprecationHandler(name, msg);
4687
+ }
4688
+ if (!deprecations[name]) {
4689
+ warn(msg);
4690
+ deprecations[name] = true;
4691
+ }
4692
+ }
4693
+ hooks.suppressDeprecationWarnings = false;
4694
+ hooks.deprecationHandler = null;
4695
+ function isFunction3(input) {
4696
+ return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]";
4697
+ }
4698
+ function set2(config) {
4699
+ var prop, i;
4700
+ for (i in config) {
4701
+ if (hasOwnProp(config, i)) {
4702
+ prop = config[i];
4703
+ if (isFunction3(prop)) {
4704
+ this[i] = prop;
4705
+ } else {
4706
+ this["_" + i] = prop;
4707
+ }
4708
+ }
4709
+ }
4710
+ this._config = config;
4711
+ this._dayOfMonthOrdinalParseLenient = new RegExp(
4712
+ (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
4713
+ );
4714
+ }
4715
+ function mergeConfigs(parentConfig, childConfig) {
4716
+ var res = extend({}, parentConfig), prop;
4717
+ for (prop in childConfig) {
4718
+ if (hasOwnProp(childConfig, prop)) {
4719
+ if (isObject7(parentConfig[prop]) && isObject7(childConfig[prop])) {
4720
+ res[prop] = {};
4721
+ extend(res[prop], parentConfig[prop]);
4722
+ extend(res[prop], childConfig[prop]);
4723
+ } else if (childConfig[prop] != null) {
4724
+ res[prop] = childConfig[prop];
4725
+ } else {
4726
+ delete res[prop];
4727
+ }
4728
+ }
4729
+ }
4730
+ for (prop in parentConfig) {
4731
+ if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject7(parentConfig[prop])) {
4732
+ res[prop] = extend({}, res[prop]);
4733
+ }
4734
+ }
4735
+ return res;
4736
+ }
4737
+ function Locale(config) {
4738
+ if (config != null) {
4739
+ this.set(config);
4740
+ }
4741
+ }
4742
+ var keys;
4743
+ if (Object.keys) {
4744
+ keys = Object.keys;
4745
+ } else {
4746
+ keys = function(obj) {
4747
+ var i, res = [];
4748
+ for (i in obj) {
4749
+ if (hasOwnProp(obj, i)) {
4750
+ res.push(i);
4751
+ }
4752
+ }
4753
+ return res;
4754
+ };
4755
+ }
4756
+ var defaultCalendar = {
4757
+ sameDay: "[Today at] LT",
4758
+ nextDay: "[Tomorrow at] LT",
4759
+ nextWeek: "dddd [at] LT",
4760
+ lastDay: "[Yesterday at] LT",
4761
+ lastWeek: "[Last] dddd [at] LT",
4762
+ sameElse: "L"
4763
+ };
4764
+ function calendar2(key, mom, now2) {
4765
+ var output = this._calendar[key] || this._calendar["sameElse"];
4766
+ return isFunction3(output) ? output.call(mom, now2) : output;
4767
+ }
4768
+ function zeroFill(number, targetLength, forceSign) {
4769
+ var absNumber = "" + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign2 = number >= 0;
4770
+ return (sign2 ? forceSign ? "+" : "" : "-") + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
4771
+ }
4772
+ var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {};
4773
+ function addFormatToken(token3, padded, ordinal2, callback) {
4774
+ var func = callback;
4775
+ if (typeof callback === "string") {
4776
+ func = function() {
4777
+ return this[callback]();
4778
+ };
4779
+ }
4780
+ if (token3) {
4781
+ formatTokenFunctions[token3] = func;
4782
+ }
4783
+ if (padded) {
4784
+ formatTokenFunctions[padded[0]] = function() {
4785
+ return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
4786
+ };
4787
+ }
4788
+ if (ordinal2) {
4789
+ formatTokenFunctions[ordinal2] = function() {
4790
+ return this.localeData().ordinal(
4791
+ func.apply(this, arguments),
4792
+ token3
4793
+ );
4794
+ };
4795
+ }
4796
+ }
4797
+ function removeFormattingTokens(input) {
4798
+ if (input.match(/\[[\s\S]/)) {
4799
+ return input.replace(/^\[|\]$/g, "");
4800
+ }
4801
+ return input.replace(/\\/g, "");
4802
+ }
4803
+ function makeFormatFunction(format2) {
4804
+ var array = format2.match(formattingTokens), i, length2;
4805
+ for (i = 0, length2 = array.length; i < length2; i++) {
4806
+ if (formatTokenFunctions[array[i]]) {
4807
+ array[i] = formatTokenFunctions[array[i]];
4808
+ } else {
4809
+ array[i] = removeFormattingTokens(array[i]);
4810
+ }
4811
+ }
4812
+ return function(mom) {
4813
+ var output = "", i2;
4814
+ for (i2 = 0; i2 < length2; i2++) {
4815
+ output += isFunction3(array[i2]) ? array[i2].call(mom, format2) : array[i2];
4816
+ }
4817
+ return output;
4818
+ };
4819
+ }
4820
+ function formatMoment(m, format2) {
4821
+ if (!m.isValid()) {
4822
+ return m.localeData().invalidDate();
4823
+ }
4824
+ format2 = expandFormat(format2, m.localeData());
4825
+ formatFunctions[format2] = formatFunctions[format2] || makeFormatFunction(format2);
4826
+ return formatFunctions[format2](m);
4827
+ }
4828
+ function expandFormat(format2, locale2) {
4829
+ var i = 5;
4830
+ function replaceLongDateFormatTokens(input) {
4831
+ return locale2.longDateFormat(input) || input;
4832
+ }
4833
+ localFormattingTokens.lastIndex = 0;
4834
+ while (i >= 0 && localFormattingTokens.test(format2)) {
4835
+ format2 = format2.replace(
4836
+ localFormattingTokens,
4837
+ replaceLongDateFormatTokens
4838
+ );
4839
+ localFormattingTokens.lastIndex = 0;
4840
+ i -= 1;
4841
+ }
4842
+ return format2;
4843
+ }
4844
+ var defaultLongDateFormat = {
4845
+ LTS: "h:mm:ss A",
4846
+ LT: "h:mm A",
4847
+ L: "MM/DD/YYYY",
4848
+ LL: "MMMM D, YYYY",
4849
+ LLL: "MMMM D, YYYY h:mm A",
4850
+ LLLL: "dddd, MMMM D, YYYY h:mm A"
4851
+ };
4852
+ function longDateFormat(key) {
4853
+ var format2 = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()];
4854
+ if (format2 || !formatUpper) {
4855
+ return format2;
4856
+ }
4857
+ this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function(tok) {
4858
+ if (tok === "MMMM" || tok === "MM" || tok === "DD" || tok === "dddd") {
4859
+ return tok.slice(1);
4860
+ }
4861
+ return tok;
4862
+ }).join("");
4863
+ return this._longDateFormat[key];
4864
+ }
4865
+ var defaultInvalidDate = "Invalid date";
4866
+ function invalidDate() {
4867
+ return this._invalidDate;
4868
+ }
4869
+ var defaultOrdinal = "%d", defaultDayOfMonthOrdinalParse = /\d{1,2}/;
4870
+ function ordinal(number) {
4871
+ return this._ordinal.replace("%d", number);
4872
+ }
4873
+ var defaultRelativeTime = {
4874
+ future: "in %s",
4875
+ past: "%s ago",
4876
+ s: "a few seconds",
4877
+ ss: "%d seconds",
4878
+ m: "a minute",
4879
+ mm: "%d minutes",
4880
+ h: "an hour",
4881
+ hh: "%d hours",
4882
+ d: "a day",
4883
+ dd: "%d days",
4884
+ w: "a week",
4885
+ ww: "%d weeks",
4886
+ M: "a month",
4887
+ MM: "%d months",
4888
+ y: "a year",
4889
+ yy: "%d years"
4890
+ };
4891
+ function relativeTime(number, withoutSuffix, string, isFuture) {
4892
+ var output = this._relativeTime[string];
4893
+ return isFunction3(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);
4894
+ }
4895
+ function pastFuture(diff5, output) {
4896
+ var format2 = this._relativeTime[diff5 > 0 ? "future" : "past"];
4897
+ return isFunction3(format2) ? format2(output) : format2.replace(/%s/i, output);
4898
+ }
4899
+ var aliases = {};
4900
+ function addUnitAlias(unit, shorthand) {
4901
+ var lowerCase = unit.toLowerCase();
4902
+ aliases[lowerCase] = aliases[lowerCase + "s"] = aliases[shorthand] = unit;
4903
+ }
4904
+ function normalizeUnits(units) {
4905
+ return typeof units === "string" ? aliases[units] || aliases[units.toLowerCase()] : void 0;
4906
+ }
4907
+ function normalizeObjectUnits(inputObject) {
4908
+ var normalizedInput = {}, normalizedProp, prop;
4909
+ for (prop in inputObject) {
4910
+ if (hasOwnProp(inputObject, prop)) {
4911
+ normalizedProp = normalizeUnits(prop);
4912
+ if (normalizedProp) {
4913
+ normalizedInput[normalizedProp] = inputObject[prop];
4914
+ }
4915
+ }
4916
+ }
4917
+ return normalizedInput;
4918
+ }
4919
+ var priorities = {};
4920
+ function addUnitPriority(unit, priority) {
4921
+ priorities[unit] = priority;
4922
+ }
4923
+ function getPrioritizedUnits(unitsObj) {
4924
+ var units = [], u;
4925
+ for (u in unitsObj) {
4926
+ if (hasOwnProp(unitsObj, u)) {
4927
+ units.push({ unit: u, priority: priorities[u] });
4928
+ }
4929
+ }
4930
+ units.sort(function(a, b) {
4931
+ return a.priority - b.priority;
4932
+ });
4933
+ return units;
4934
+ }
4935
+ function isLeapYear(year) {
4936
+ return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
4937
+ }
4938
+ function absFloor(number) {
4939
+ if (number < 0) {
4940
+ return Math.ceil(number) || 0;
4941
+ } else {
4942
+ return Math.floor(number);
4943
+ }
4944
+ }
4945
+ function toInt(argumentForCoercion) {
4946
+ var coercedNumber = +argumentForCoercion, value = 0;
4947
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
4948
+ value = absFloor(coercedNumber);
4949
+ }
4950
+ return value;
4951
+ }
4952
+ function makeGetSet(unit, keepTime) {
4953
+ return function(value) {
4954
+ if (value != null) {
4955
+ set$1(this, unit, value);
4956
+ hooks.updateOffset(this, keepTime);
4957
+ return this;
4958
+ } else {
4959
+ return get(this, unit);
4960
+ }
4961
+ };
4962
+ }
4963
+ function get(mom, unit) {
4964
+ return mom.isValid() ? mom._d["get" + (mom._isUTC ? "UTC" : "") + unit]() : NaN;
4965
+ }
4966
+ function set$1(mom, unit, value) {
4967
+ if (mom.isValid() && !isNaN(value)) {
4968
+ if (unit === "FullYear" && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
4969
+ value = toInt(value);
4970
+ mom._d["set" + (mom._isUTC ? "UTC" : "") + unit](
4971
+ value,
4972
+ mom.month(),
4973
+ daysInMonth(value, mom.month())
4974
+ );
4975
+ } else {
4976
+ mom._d["set" + (mom._isUTC ? "UTC" : "") + unit](value);
4977
+ }
4978
+ }
4979
+ }
4980
+ function stringGet(units) {
4981
+ units = normalizeUnits(units);
4982
+ if (isFunction3(this[units])) {
4983
+ return this[units]();
4984
+ }
4985
+ return this;
4986
+ }
4987
+ function stringSet(units, value) {
4988
+ if (typeof units === "object") {
4989
+ units = normalizeObjectUnits(units);
4990
+ var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length;
4991
+ for (i = 0; i < prioritizedLen; i++) {
4992
+ this[prioritized[i].unit](units[prioritized[i].unit]);
4993
+ }
4994
+ } else {
4995
+ units = normalizeUnits(units);
4996
+ if (isFunction3(this[units])) {
4997
+ return this[units](value);
4998
+ }
4999
+ }
5000
+ return this;
5001
+ }
5002
+ var match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, regexes;
5003
+ regexes = {};
5004
+ function addRegexToken(token3, regex, strictRegex) {
5005
+ regexes[token3] = isFunction3(regex) ? regex : function(isStrict, localeData2) {
5006
+ return isStrict && strictRegex ? strictRegex : regex;
5007
+ };
5008
+ }
5009
+ function getParseRegexForToken(token3, config) {
5010
+ if (!hasOwnProp(regexes, token3)) {
5011
+ return new RegExp(unescapeFormat(token3));
5012
+ }
5013
+ return regexes[token3](config._strict, config._locale);
5014
+ }
5015
+ function unescapeFormat(s) {
5016
+ return regexEscape(
5017
+ s.replace("\\", "").replace(
5018
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
5019
+ function(matched, p1, p2, p3, p4) {
5020
+ return p1 || p2 || p3 || p4;
5021
+ }
5022
+ )
5023
+ );
5024
+ }
5025
+ function regexEscape(s) {
5026
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
5027
+ }
5028
+ var tokens = {};
5029
+ function addParseToken(token3, callback) {
5030
+ var i, func = callback, tokenLen;
5031
+ if (typeof token3 === "string") {
5032
+ token3 = [token3];
5033
+ }
5034
+ if (isNumber(callback)) {
5035
+ func = function(input, array) {
5036
+ array[callback] = toInt(input);
5037
+ };
5038
+ }
5039
+ tokenLen = token3.length;
5040
+ for (i = 0; i < tokenLen; i++) {
5041
+ tokens[token3[i]] = func;
5042
+ }
5043
+ }
5044
+ function addWeekParseToken(token3, callback) {
5045
+ addParseToken(token3, function(input, array, config, token4) {
5046
+ config._w = config._w || {};
5047
+ callback(input, config._w, config, token4);
5048
+ });
5049
+ }
5050
+ function addTimeToArrayFromToken(token3, input, config) {
5051
+ if (input != null && hasOwnProp(tokens, token3)) {
5052
+ tokens[token3](input, config._a, config, token3);
5053
+ }
5054
+ }
5055
+ var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8;
5056
+ function mod(n, x) {
5057
+ return (n % x + x) % x;
5058
+ }
5059
+ var indexOf;
5060
+ if (Array.prototype.indexOf) {
5061
+ indexOf = Array.prototype.indexOf;
5062
+ } else {
5063
+ indexOf = function(o) {
5064
+ var i;
5065
+ for (i = 0; i < this.length; ++i) {
5066
+ if (this[i] === o) {
5067
+ return i;
5068
+ }
5069
+ }
5070
+ return -1;
5071
+ };
5072
+ }
5073
+ function daysInMonth(year, month) {
5074
+ if (isNaN(year) || isNaN(month)) {
5075
+ return NaN;
5076
+ }
5077
+ var modMonth = mod(month, 12);
5078
+ year += (month - modMonth) / 12;
5079
+ return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;
5080
+ }
5081
+ addFormatToken("M", ["MM", 2], "Mo", function() {
5082
+ return this.month() + 1;
5083
+ });
5084
+ addFormatToken("MMM", 0, 0, function(format2) {
5085
+ return this.localeData().monthsShort(this, format2);
5086
+ });
5087
+ addFormatToken("MMMM", 0, 0, function(format2) {
5088
+ return this.localeData().months(this, format2);
5089
+ });
5090
+ addUnitAlias("month", "M");
5091
+ addUnitPriority("month", 8);
5092
+ addRegexToken("M", match1to2);
5093
+ addRegexToken("MM", match1to2, match2);
5094
+ addRegexToken("MMM", function(isStrict, locale2) {
5095
+ return locale2.monthsShortRegex(isStrict);
5096
+ });
5097
+ addRegexToken("MMMM", function(isStrict, locale2) {
5098
+ return locale2.monthsRegex(isStrict);
5099
+ });
5100
+ addParseToken(["M", "MM"], function(input, array) {
5101
+ array[MONTH] = toInt(input) - 1;
5102
+ });
5103
+ addParseToken(["MMM", "MMMM"], function(input, array, config, token3) {
5104
+ var month = config._locale.monthsParse(input, token3, config._strict);
5105
+ if (month != null) {
5106
+ array[MONTH] = month;
5107
+ } else {
5108
+ getParsingFlags(config).invalidMonth = input;
5109
+ }
5110
+ });
5111
+ var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split(
5112
+ "_"
5113
+ ), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord;
5114
+ function localeMonths(m, format2) {
5115
+ if (!m) {
5116
+ return isArray7(this._months) ? this._months : this._months["standalone"];
5117
+ }
5118
+ return isArray7(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format2) ? "format" : "standalone"][m.month()];
5119
+ }
5120
+ function localeMonthsShort(m, format2) {
5121
+ if (!m) {
5122
+ return isArray7(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"];
5123
+ }
5124
+ return isArray7(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format2) ? "format" : "standalone"][m.month()];
5125
+ }
5126
+ function handleStrictParse(monthName, format2, strict) {
5127
+ var i, ii, mom, llc = monthName.toLocaleLowerCase();
5128
+ if (!this._monthsParse) {
5129
+ this._monthsParse = [];
5130
+ this._longMonthsParse = [];
5131
+ this._shortMonthsParse = [];
5132
+ for (i = 0; i < 12; ++i) {
5133
+ mom = createUTC([2e3, i]);
5134
+ this._shortMonthsParse[i] = this.monthsShort(
5135
+ mom,
5136
+ ""
5137
+ ).toLocaleLowerCase();
5138
+ this._longMonthsParse[i] = this.months(mom, "").toLocaleLowerCase();
5139
+ }
5140
+ }
5141
+ if (strict) {
5142
+ if (format2 === "MMM") {
5143
+ ii = indexOf.call(this._shortMonthsParse, llc);
5144
+ return ii !== -1 ? ii : null;
5145
+ } else {
5146
+ ii = indexOf.call(this._longMonthsParse, llc);
5147
+ return ii !== -1 ? ii : null;
5148
+ }
5149
+ } else {
5150
+ if (format2 === "MMM") {
5151
+ ii = indexOf.call(this._shortMonthsParse, llc);
5152
+ if (ii !== -1) {
5153
+ return ii;
5154
+ }
5155
+ ii = indexOf.call(this._longMonthsParse, llc);
5156
+ return ii !== -1 ? ii : null;
5157
+ } else {
5158
+ ii = indexOf.call(this._longMonthsParse, llc);
5159
+ if (ii !== -1) {
5160
+ return ii;
5161
+ }
5162
+ ii = indexOf.call(this._shortMonthsParse, llc);
5163
+ return ii !== -1 ? ii : null;
5164
+ }
5165
+ }
5166
+ }
5167
+ function localeMonthsParse(monthName, format2, strict) {
5168
+ var i, mom, regex;
5169
+ if (this._monthsParseExact) {
5170
+ return handleStrictParse.call(this, monthName, format2, strict);
5171
+ }
5172
+ if (!this._monthsParse) {
5173
+ this._monthsParse = [];
5174
+ this._longMonthsParse = [];
5175
+ this._shortMonthsParse = [];
5176
+ }
5177
+ for (i = 0; i < 12; i++) {
5178
+ mom = createUTC([2e3, i]);
5179
+ if (strict && !this._longMonthsParse[i]) {
5180
+ this._longMonthsParse[i] = new RegExp(
5181
+ "^" + this.months(mom, "").replace(".", "") + "$",
5182
+ "i"
5183
+ );
5184
+ this._shortMonthsParse[i] = new RegExp(
5185
+ "^" + this.monthsShort(mom, "").replace(".", "") + "$",
5186
+ "i"
5187
+ );
5188
+ }
5189
+ if (!strict && !this._monthsParse[i]) {
5190
+ regex = "^" + this.months(mom, "") + "|^" + this.monthsShort(mom, "");
5191
+ this._monthsParse[i] = new RegExp(regex.replace(".", ""), "i");
5192
+ }
5193
+ if (strict && format2 === "MMMM" && this._longMonthsParse[i].test(monthName)) {
5194
+ return i;
5195
+ } else if (strict && format2 === "MMM" && this._shortMonthsParse[i].test(monthName)) {
5196
+ return i;
5197
+ } else if (!strict && this._monthsParse[i].test(monthName)) {
5198
+ return i;
5199
+ }
5200
+ }
5201
+ }
5202
+ function setMonth(mom, value) {
5203
+ var dayOfMonth;
5204
+ if (!mom.isValid()) {
5205
+ return mom;
5206
+ }
5207
+ if (typeof value === "string") {
5208
+ if (/^\d+$/.test(value)) {
5209
+ value = toInt(value);
5210
+ } else {
5211
+ value = mom.localeData().monthsParse(value);
5212
+ if (!isNumber(value)) {
5213
+ return mom;
5214
+ }
5215
+ }
5216
+ }
5217
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
5218
+ mom._d["set" + (mom._isUTC ? "UTC" : "") + "Month"](value, dayOfMonth);
5219
+ return mom;
5220
+ }
5221
+ function getSetMonth(value) {
5222
+ if (value != null) {
5223
+ setMonth(this, value);
5224
+ hooks.updateOffset(this, true);
5225
+ return this;
5226
+ } else {
5227
+ return get(this, "Month");
5228
+ }
5229
+ }
5230
+ function getDaysInMonth() {
5231
+ return daysInMonth(this.year(), this.month());
5232
+ }
5233
+ function monthsShortRegex(isStrict) {
5234
+ if (this._monthsParseExact) {
5235
+ if (!hasOwnProp(this, "_monthsRegex")) {
5236
+ computeMonthsParse.call(this);
5237
+ }
5238
+ if (isStrict) {
5239
+ return this._monthsShortStrictRegex;
5240
+ } else {
5241
+ return this._monthsShortRegex;
5242
+ }
5243
+ } else {
5244
+ if (!hasOwnProp(this, "_monthsShortRegex")) {
5245
+ this._monthsShortRegex = defaultMonthsShortRegex;
5246
+ }
5247
+ return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;
5248
+ }
5249
+ }
5250
+ function monthsRegex(isStrict) {
5251
+ if (this._monthsParseExact) {
5252
+ if (!hasOwnProp(this, "_monthsRegex")) {
5253
+ computeMonthsParse.call(this);
5254
+ }
5255
+ if (isStrict) {
5256
+ return this._monthsStrictRegex;
5257
+ } else {
5258
+ return this._monthsRegex;
5259
+ }
5260
+ } else {
5261
+ if (!hasOwnProp(this, "_monthsRegex")) {
5262
+ this._monthsRegex = defaultMonthsRegex;
5263
+ }
5264
+ return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;
5265
+ }
5266
+ }
5267
+ function computeMonthsParse() {
5268
+ function cmpLenRev(a, b) {
5269
+ return b.length - a.length;
5270
+ }
5271
+ var shortPieces = [], longPieces = [], mixedPieces = [], i, mom;
5272
+ for (i = 0; i < 12; i++) {
5273
+ mom = createUTC([2e3, i]);
5274
+ shortPieces.push(this.monthsShort(mom, ""));
5275
+ longPieces.push(this.months(mom, ""));
5276
+ mixedPieces.push(this.months(mom, ""));
5277
+ mixedPieces.push(this.monthsShort(mom, ""));
5278
+ }
5279
+ shortPieces.sort(cmpLenRev);
5280
+ longPieces.sort(cmpLenRev);
5281
+ mixedPieces.sort(cmpLenRev);
5282
+ for (i = 0; i < 12; i++) {
5283
+ shortPieces[i] = regexEscape(shortPieces[i]);
5284
+ longPieces[i] = regexEscape(longPieces[i]);
5285
+ }
5286
+ for (i = 0; i < 24; i++) {
5287
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
5288
+ }
5289
+ this._monthsRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
5290
+ this._monthsShortRegex = this._monthsRegex;
5291
+ this._monthsStrictRegex = new RegExp(
5292
+ "^(" + longPieces.join("|") + ")",
5293
+ "i"
5294
+ );
5295
+ this._monthsShortStrictRegex = new RegExp(
5296
+ "^(" + shortPieces.join("|") + ")",
5297
+ "i"
5298
+ );
5299
+ }
5300
+ addFormatToken("Y", 0, 0, function() {
5301
+ var y = this.year();
5302
+ return y <= 9999 ? zeroFill(y, 4) : "+" + y;
5303
+ });
5304
+ addFormatToken(0, ["YY", 2], 0, function() {
5305
+ return this.year() % 100;
5306
+ });
5307
+ addFormatToken(0, ["YYYY", 4], 0, "year");
5308
+ addFormatToken(0, ["YYYYY", 5], 0, "year");
5309
+ addFormatToken(0, ["YYYYYY", 6, true], 0, "year");
5310
+ addUnitAlias("year", "y");
5311
+ addUnitPriority("year", 1);
5312
+ addRegexToken("Y", matchSigned);
5313
+ addRegexToken("YY", match1to2, match2);
5314
+ addRegexToken("YYYY", match1to4, match4);
5315
+ addRegexToken("YYYYY", match1to6, match6);
5316
+ addRegexToken("YYYYYY", match1to6, match6);
5317
+ addParseToken(["YYYYY", "YYYYYY"], YEAR);
5318
+ addParseToken("YYYY", function(input, array) {
5319
+ array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
5320
+ });
5321
+ addParseToken("YY", function(input, array) {
5322
+ array[YEAR] = hooks.parseTwoDigitYear(input);
5323
+ });
5324
+ addParseToken("Y", function(input, array) {
5325
+ array[YEAR] = parseInt(input, 10);
5326
+ });
5327
+ function daysInYear(year) {
5328
+ return isLeapYear(year) ? 366 : 365;
5329
+ }
5330
+ hooks.parseTwoDigitYear = function(input) {
5331
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3);
5332
+ };
5333
+ var getSetYear = makeGetSet("FullYear", true);
5334
+ function getIsLeapYear() {
5335
+ return isLeapYear(this.year());
5336
+ }
5337
+ function createDate(y, m, d, h, M, s, ms) {
5338
+ var date;
5339
+ if (y < 100 && y >= 0) {
5340
+ date = new Date(y + 400, m, d, h, M, s, ms);
5341
+ if (isFinite(date.getFullYear())) {
5342
+ date.setFullYear(y);
5343
+ }
5344
+ } else {
5345
+ date = new Date(y, m, d, h, M, s, ms);
5346
+ }
5347
+ return date;
5348
+ }
5349
+ function createUTCDate(y) {
5350
+ var date, args;
5351
+ if (y < 100 && y >= 0) {
5352
+ args = Array.prototype.slice.call(arguments);
5353
+ args[0] = y + 400;
5354
+ date = new Date(Date.UTC.apply(null, args));
5355
+ if (isFinite(date.getUTCFullYear())) {
5356
+ date.setUTCFullYear(y);
5357
+ }
5358
+ } else {
5359
+ date = new Date(Date.UTC.apply(null, arguments));
5360
+ }
5361
+ return date;
5362
+ }
5363
+ function firstWeekOffset(year, dow, doy) {
5364
+ var fwd = 7 + dow - doy, fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
5365
+ return -fwdlw + fwd - 1;
5366
+ }
5367
+ function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
5368
+ var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear;
5369
+ if (dayOfYear <= 0) {
5370
+ resYear = year - 1;
5371
+ resDayOfYear = daysInYear(resYear) + dayOfYear;
5372
+ } else if (dayOfYear > daysInYear(year)) {
5373
+ resYear = year + 1;
5374
+ resDayOfYear = dayOfYear - daysInYear(year);
5375
+ } else {
5376
+ resYear = year;
5377
+ resDayOfYear = dayOfYear;
5378
+ }
5379
+ return {
5380
+ year: resYear,
5381
+ dayOfYear: resDayOfYear
5382
+ };
5383
+ }
5384
+ function weekOfYear(mom, dow, doy) {
5385
+ var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear;
5386
+ if (week < 1) {
5387
+ resYear = mom.year() - 1;
5388
+ resWeek = week + weeksInYear(resYear, dow, doy);
5389
+ } else if (week > weeksInYear(mom.year(), dow, doy)) {
5390
+ resWeek = week - weeksInYear(mom.year(), dow, doy);
5391
+ resYear = mom.year() + 1;
5392
+ } else {
5393
+ resYear = mom.year();
5394
+ resWeek = week;
5395
+ }
5396
+ return {
5397
+ week: resWeek,
5398
+ year: resYear
5399
+ };
5400
+ }
5401
+ function weeksInYear(year, dow, doy) {
5402
+ var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
5403
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
5404
+ }
5405
+ addFormatToken("w", ["ww", 2], "wo", "week");
5406
+ addFormatToken("W", ["WW", 2], "Wo", "isoWeek");
5407
+ addUnitAlias("week", "w");
5408
+ addUnitAlias("isoWeek", "W");
5409
+ addUnitPriority("week", 5);
5410
+ addUnitPriority("isoWeek", 5);
5411
+ addRegexToken("w", match1to2);
5412
+ addRegexToken("ww", match1to2, match2);
5413
+ addRegexToken("W", match1to2);
5414
+ addRegexToken("WW", match1to2, match2);
5415
+ addWeekParseToken(
5416
+ ["w", "ww", "W", "WW"],
5417
+ function(input, week, config, token3) {
5418
+ week[token3.substr(0, 1)] = toInt(input);
5419
+ }
5420
+ );
5421
+ function localeWeek(mom) {
5422
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
5423
+ }
5424
+ var defaultLocaleWeek = {
5425
+ dow: 0,
5426
+ // Sunday is the first day of the week.
5427
+ doy: 6
5428
+ // The week that contains Jan 6th is the first week of the year.
5429
+ };
5430
+ function localeFirstDayOfWeek() {
5431
+ return this._week.dow;
5432
+ }
5433
+ function localeFirstDayOfYear() {
5434
+ return this._week.doy;
5435
+ }
5436
+ function getSetWeek(input) {
5437
+ var week = this.localeData().week(this);
5438
+ return input == null ? week : this.add((input - week) * 7, "d");
5439
+ }
5440
+ function getSetISOWeek(input) {
5441
+ var week = weekOfYear(this, 1, 4).week;
5442
+ return input == null ? week : this.add((input - week) * 7, "d");
5443
+ }
5444
+ addFormatToken("d", 0, "do", "day");
5445
+ addFormatToken("dd", 0, 0, function(format2) {
5446
+ return this.localeData().weekdaysMin(this, format2);
5447
+ });
5448
+ addFormatToken("ddd", 0, 0, function(format2) {
5449
+ return this.localeData().weekdaysShort(this, format2);
5450
+ });
5451
+ addFormatToken("dddd", 0, 0, function(format2) {
5452
+ return this.localeData().weekdays(this, format2);
5453
+ });
5454
+ addFormatToken("e", 0, 0, "weekday");
5455
+ addFormatToken("E", 0, 0, "isoWeekday");
5456
+ addUnitAlias("day", "d");
5457
+ addUnitAlias("weekday", "e");
5458
+ addUnitAlias("isoWeekday", "E");
5459
+ addUnitPriority("day", 11);
5460
+ addUnitPriority("weekday", 11);
5461
+ addUnitPriority("isoWeekday", 11);
5462
+ addRegexToken("d", match1to2);
5463
+ addRegexToken("e", match1to2);
5464
+ addRegexToken("E", match1to2);
5465
+ addRegexToken("dd", function(isStrict, locale2) {
5466
+ return locale2.weekdaysMinRegex(isStrict);
5467
+ });
5468
+ addRegexToken("ddd", function(isStrict, locale2) {
5469
+ return locale2.weekdaysShortRegex(isStrict);
5470
+ });
5471
+ addRegexToken("dddd", function(isStrict, locale2) {
5472
+ return locale2.weekdaysRegex(isStrict);
5473
+ });
5474
+ addWeekParseToken(["dd", "ddd", "dddd"], function(input, week, config, token3) {
5475
+ var weekday = config._locale.weekdaysParse(input, token3, config._strict);
5476
+ if (weekday != null) {
5477
+ week.d = weekday;
5478
+ } else {
5479
+ getParsingFlags(config).invalidWeekday = input;
5480
+ }
5481
+ });
5482
+ addWeekParseToken(["d", "e", "E"], function(input, week, config, token3) {
5483
+ week[token3] = toInt(input);
5484
+ });
5485
+ function parseWeekday(input, locale2) {
5486
+ if (typeof input !== "string") {
5487
+ return input;
5488
+ }
5489
+ if (!isNaN(input)) {
5490
+ return parseInt(input, 10);
5491
+ }
5492
+ input = locale2.weekdaysParse(input);
5493
+ if (typeof input === "number") {
5494
+ return input;
5495
+ }
5496
+ return null;
5497
+ }
5498
+ function parseIsoWeekday(input, locale2) {
5499
+ if (typeof input === "string") {
5500
+ return locale2.weekdaysParse(input) % 7 || 7;
5501
+ }
5502
+ return isNaN(input) ? null : input;
5503
+ }
5504
+ function shiftWeekdays(ws, n) {
5505
+ return ws.slice(n, 7).concat(ws.slice(0, n));
5506
+ }
5507
+ var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
5508
+ function localeWeekdays(m, format2) {
5509
+ var weekdays = isArray7(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format2) ? "format" : "standalone"];
5510
+ return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;
5511
+ }
5512
+ function localeWeekdaysShort(m) {
5513
+ return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;
5514
+ }
5515
+ function localeWeekdaysMin(m) {
5516
+ return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;
5517
+ }
5518
+ function handleStrictParse$1(weekdayName, format2, strict) {
5519
+ var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
5520
+ if (!this._weekdaysParse) {
5521
+ this._weekdaysParse = [];
5522
+ this._shortWeekdaysParse = [];
5523
+ this._minWeekdaysParse = [];
5524
+ for (i = 0; i < 7; ++i) {
5525
+ mom = createUTC([2e3, 1]).day(i);
5526
+ this._minWeekdaysParse[i] = this.weekdaysMin(
5527
+ mom,
5528
+ ""
5529
+ ).toLocaleLowerCase();
5530
+ this._shortWeekdaysParse[i] = this.weekdaysShort(
5531
+ mom,
5532
+ ""
5533
+ ).toLocaleLowerCase();
5534
+ this._weekdaysParse[i] = this.weekdays(mom, "").toLocaleLowerCase();
5535
+ }
5536
+ }
5537
+ if (strict) {
5538
+ if (format2 === "dddd") {
5539
+ ii = indexOf.call(this._weekdaysParse, llc);
5540
+ return ii !== -1 ? ii : null;
5541
+ } else if (format2 === "ddd") {
5542
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
5543
+ return ii !== -1 ? ii : null;
5544
+ } else {
5545
+ ii = indexOf.call(this._minWeekdaysParse, llc);
5546
+ return ii !== -1 ? ii : null;
5547
+ }
5548
+ } else {
5549
+ if (format2 === "dddd") {
5550
+ ii = indexOf.call(this._weekdaysParse, llc);
5551
+ if (ii !== -1) {
5552
+ return ii;
5553
+ }
5554
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
5555
+ if (ii !== -1) {
5556
+ return ii;
5557
+ }
5558
+ ii = indexOf.call(this._minWeekdaysParse, llc);
5559
+ return ii !== -1 ? ii : null;
5560
+ } else if (format2 === "ddd") {
5561
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
5562
+ if (ii !== -1) {
5563
+ return ii;
5564
+ }
5565
+ ii = indexOf.call(this._weekdaysParse, llc);
5566
+ if (ii !== -1) {
5567
+ return ii;
5568
+ }
5569
+ ii = indexOf.call(this._minWeekdaysParse, llc);
5570
+ return ii !== -1 ? ii : null;
5571
+ } else {
5572
+ ii = indexOf.call(this._minWeekdaysParse, llc);
5573
+ if (ii !== -1) {
5574
+ return ii;
5575
+ }
5576
+ ii = indexOf.call(this._weekdaysParse, llc);
5577
+ if (ii !== -1) {
5578
+ return ii;
5579
+ }
5580
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
5581
+ return ii !== -1 ? ii : null;
5582
+ }
5583
+ }
5584
+ }
5585
+ function localeWeekdaysParse(weekdayName, format2, strict) {
5586
+ var i, mom, regex;
5587
+ if (this._weekdaysParseExact) {
5588
+ return handleStrictParse$1.call(this, weekdayName, format2, strict);
5589
+ }
5590
+ if (!this._weekdaysParse) {
5591
+ this._weekdaysParse = [];
5592
+ this._minWeekdaysParse = [];
5593
+ this._shortWeekdaysParse = [];
5594
+ this._fullWeekdaysParse = [];
5595
+ }
5596
+ for (i = 0; i < 7; i++) {
5597
+ mom = createUTC([2e3, 1]).day(i);
5598
+ if (strict && !this._fullWeekdaysParse[i]) {
5599
+ this._fullWeekdaysParse[i] = new RegExp(
5600
+ "^" + this.weekdays(mom, "").replace(".", "\\.?") + "$",
5601
+ "i"
5602
+ );
5603
+ this._shortWeekdaysParse[i] = new RegExp(
5604
+ "^" + this.weekdaysShort(mom, "").replace(".", "\\.?") + "$",
5605
+ "i"
5606
+ );
5607
+ this._minWeekdaysParse[i] = new RegExp(
5608
+ "^" + this.weekdaysMin(mom, "").replace(".", "\\.?") + "$",
5609
+ "i"
5610
+ );
5611
+ }
5612
+ if (!this._weekdaysParse[i]) {
5613
+ regex = "^" + this.weekdays(mom, "") + "|^" + this.weekdaysShort(mom, "") + "|^" + this.weekdaysMin(mom, "");
5614
+ this._weekdaysParse[i] = new RegExp(regex.replace(".", ""), "i");
5615
+ }
5616
+ if (strict && format2 === "dddd" && this._fullWeekdaysParse[i].test(weekdayName)) {
5617
+ return i;
5618
+ } else if (strict && format2 === "ddd" && this._shortWeekdaysParse[i].test(weekdayName)) {
5619
+ return i;
5620
+ } else if (strict && format2 === "dd" && this._minWeekdaysParse[i].test(weekdayName)) {
5621
+ return i;
5622
+ } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
5623
+ return i;
5624
+ }
5625
+ }
5626
+ }
5627
+ function getSetDayOfWeek(input) {
5628
+ if (!this.isValid()) {
5629
+ return input != null ? this : NaN;
5630
+ }
5631
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
5632
+ if (input != null) {
5633
+ input = parseWeekday(input, this.localeData());
5634
+ return this.add(input - day, "d");
5635
+ } else {
5636
+ return day;
5637
+ }
5638
+ }
5639
+ function getSetLocaleDayOfWeek(input) {
5640
+ if (!this.isValid()) {
5641
+ return input != null ? this : NaN;
5642
+ }
5643
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
5644
+ return input == null ? weekday : this.add(input - weekday, "d");
5645
+ }
5646
+ function getSetISODayOfWeek(input) {
5647
+ if (!this.isValid()) {
5648
+ return input != null ? this : NaN;
5649
+ }
5650
+ if (input != null) {
5651
+ var weekday = parseIsoWeekday(input, this.localeData());
5652
+ return this.day(this.day() % 7 ? weekday : weekday - 7);
5653
+ } else {
5654
+ return this.day() || 7;
5655
+ }
5656
+ }
5657
+ function weekdaysRegex(isStrict) {
5658
+ if (this._weekdaysParseExact) {
5659
+ if (!hasOwnProp(this, "_weekdaysRegex")) {
5660
+ computeWeekdaysParse.call(this);
5661
+ }
5662
+ if (isStrict) {
5663
+ return this._weekdaysStrictRegex;
5664
+ } else {
5665
+ return this._weekdaysRegex;
5666
+ }
5667
+ } else {
5668
+ if (!hasOwnProp(this, "_weekdaysRegex")) {
5669
+ this._weekdaysRegex = defaultWeekdaysRegex;
5670
+ }
5671
+ return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;
5672
+ }
5673
+ }
5674
+ function weekdaysShortRegex(isStrict) {
5675
+ if (this._weekdaysParseExact) {
5676
+ if (!hasOwnProp(this, "_weekdaysRegex")) {
5677
+ computeWeekdaysParse.call(this);
5678
+ }
5679
+ if (isStrict) {
5680
+ return this._weekdaysShortStrictRegex;
5681
+ } else {
5682
+ return this._weekdaysShortRegex;
5683
+ }
5684
+ } else {
5685
+ if (!hasOwnProp(this, "_weekdaysShortRegex")) {
5686
+ this._weekdaysShortRegex = defaultWeekdaysShortRegex;
5687
+ }
5688
+ return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
5689
+ }
5690
+ }
5691
+ function weekdaysMinRegex(isStrict) {
5692
+ if (this._weekdaysParseExact) {
5693
+ if (!hasOwnProp(this, "_weekdaysRegex")) {
5694
+ computeWeekdaysParse.call(this);
5695
+ }
5696
+ if (isStrict) {
5697
+ return this._weekdaysMinStrictRegex;
5698
+ } else {
5699
+ return this._weekdaysMinRegex;
5700
+ }
5701
+ } else {
5702
+ if (!hasOwnProp(this, "_weekdaysMinRegex")) {
5703
+ this._weekdaysMinRegex = defaultWeekdaysMinRegex;
5704
+ }
5705
+ return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
5706
+ }
5707
+ }
5708
+ function computeWeekdaysParse() {
5709
+ function cmpLenRev(a, b) {
5710
+ return b.length - a.length;
5711
+ }
5712
+ var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp;
5713
+ for (i = 0; i < 7; i++) {
5714
+ mom = createUTC([2e3, 1]).day(i);
5715
+ minp = regexEscape(this.weekdaysMin(mom, ""));
5716
+ shortp = regexEscape(this.weekdaysShort(mom, ""));
5717
+ longp = regexEscape(this.weekdays(mom, ""));
5718
+ minPieces.push(minp);
5719
+ shortPieces.push(shortp);
5720
+ longPieces.push(longp);
5721
+ mixedPieces.push(minp);
5722
+ mixedPieces.push(shortp);
5723
+ mixedPieces.push(longp);
5724
+ }
5725
+ minPieces.sort(cmpLenRev);
5726
+ shortPieces.sort(cmpLenRev);
5727
+ longPieces.sort(cmpLenRev);
5728
+ mixedPieces.sort(cmpLenRev);
5729
+ this._weekdaysRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
5730
+ this._weekdaysShortRegex = this._weekdaysRegex;
5731
+ this._weekdaysMinRegex = this._weekdaysRegex;
5732
+ this._weekdaysStrictRegex = new RegExp(
5733
+ "^(" + longPieces.join("|") + ")",
5734
+ "i"
5735
+ );
5736
+ this._weekdaysShortStrictRegex = new RegExp(
5737
+ "^(" + shortPieces.join("|") + ")",
5738
+ "i"
5739
+ );
5740
+ this._weekdaysMinStrictRegex = new RegExp(
5741
+ "^(" + minPieces.join("|") + ")",
5742
+ "i"
5743
+ );
5744
+ }
5745
+ function hFormat() {
5746
+ return this.hours() % 12 || 12;
5747
+ }
5748
+ function kFormat() {
5749
+ return this.hours() || 24;
5750
+ }
5751
+ addFormatToken("H", ["HH", 2], 0, "hour");
5752
+ addFormatToken("h", ["hh", 2], 0, hFormat);
5753
+ addFormatToken("k", ["kk", 2], 0, kFormat);
5754
+ addFormatToken("hmm", 0, 0, function() {
5755
+ return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2);
5756
+ });
5757
+ addFormatToken("hmmss", 0, 0, function() {
5758
+ return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
5759
+ });
5760
+ addFormatToken("Hmm", 0, 0, function() {
5761
+ return "" + this.hours() + zeroFill(this.minutes(), 2);
5762
+ });
5763
+ addFormatToken("Hmmss", 0, 0, function() {
5764
+ return "" + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
5765
+ });
5766
+ function meridiem(token3, lowercase) {
5767
+ addFormatToken(token3, 0, 0, function() {
5768
+ return this.localeData().meridiem(
5769
+ this.hours(),
5770
+ this.minutes(),
5771
+ lowercase
5772
+ );
5773
+ });
5774
+ }
5775
+ meridiem("a", true);
5776
+ meridiem("A", false);
5777
+ addUnitAlias("hour", "h");
5778
+ addUnitPriority("hour", 13);
5779
+ function matchMeridiem(isStrict, locale2) {
5780
+ return locale2._meridiemParse;
5781
+ }
5782
+ addRegexToken("a", matchMeridiem);
5783
+ addRegexToken("A", matchMeridiem);
5784
+ addRegexToken("H", match1to2);
5785
+ addRegexToken("h", match1to2);
5786
+ addRegexToken("k", match1to2);
5787
+ addRegexToken("HH", match1to2, match2);
5788
+ addRegexToken("hh", match1to2, match2);
5789
+ addRegexToken("kk", match1to2, match2);
5790
+ addRegexToken("hmm", match3to4);
5791
+ addRegexToken("hmmss", match5to6);
5792
+ addRegexToken("Hmm", match3to4);
5793
+ addRegexToken("Hmmss", match5to6);
5794
+ addParseToken(["H", "HH"], HOUR);
5795
+ addParseToken(["k", "kk"], function(input, array, config) {
5796
+ var kInput = toInt(input);
5797
+ array[HOUR] = kInput === 24 ? 0 : kInput;
5798
+ });
5799
+ addParseToken(["a", "A"], function(input, array, config) {
5800
+ config._isPm = config._locale.isPM(input);
5801
+ config._meridiem = input;
5802
+ });
5803
+ addParseToken(["h", "hh"], function(input, array, config) {
5804
+ array[HOUR] = toInt(input);
5805
+ getParsingFlags(config).bigHour = true;
5806
+ });
5807
+ addParseToken("hmm", function(input, array, config) {
5808
+ var pos = input.length - 2;
5809
+ array[HOUR] = toInt(input.substr(0, pos));
5810
+ array[MINUTE] = toInt(input.substr(pos));
5811
+ getParsingFlags(config).bigHour = true;
5812
+ });
5813
+ addParseToken("hmmss", function(input, array, config) {
5814
+ var pos1 = input.length - 4, pos2 = input.length - 2;
5815
+ array[HOUR] = toInt(input.substr(0, pos1));
5816
+ array[MINUTE] = toInt(input.substr(pos1, 2));
5817
+ array[SECOND] = toInt(input.substr(pos2));
5818
+ getParsingFlags(config).bigHour = true;
5819
+ });
5820
+ addParseToken("Hmm", function(input, array, config) {
5821
+ var pos = input.length - 2;
5822
+ array[HOUR] = toInt(input.substr(0, pos));
5823
+ array[MINUTE] = toInt(input.substr(pos));
5824
+ });
5825
+ addParseToken("Hmmss", function(input, array, config) {
5826
+ var pos1 = input.length - 4, pos2 = input.length - 2;
5827
+ array[HOUR] = toInt(input.substr(0, pos1));
5828
+ array[MINUTE] = toInt(input.substr(pos1, 2));
5829
+ array[SECOND] = toInt(input.substr(pos2));
5830
+ });
5831
+ function localeIsPM(input) {
5832
+ return (input + "").toLowerCase().charAt(0) === "p";
5833
+ }
5834
+ var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, getSetHour = makeGetSet("Hours", true);
5835
+ function localeMeridiem(hours2, minutes2, isLower) {
5836
+ if (hours2 > 11) {
5837
+ return isLower ? "pm" : "PM";
5838
+ } else {
5839
+ return isLower ? "am" : "AM";
5840
+ }
5841
+ }
5842
+ var baseConfig = {
5843
+ calendar: defaultCalendar,
5844
+ longDateFormat: defaultLongDateFormat,
5845
+ invalidDate: defaultInvalidDate,
5846
+ ordinal: defaultOrdinal,
5847
+ dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
5848
+ relativeTime: defaultRelativeTime,
5849
+ months: defaultLocaleMonths,
5850
+ monthsShort: defaultLocaleMonthsShort,
5851
+ week: defaultLocaleWeek,
5852
+ weekdays: defaultLocaleWeekdays,
5853
+ weekdaysMin: defaultLocaleWeekdaysMin,
5854
+ weekdaysShort: defaultLocaleWeekdaysShort,
5855
+ meridiemParse: defaultLocaleMeridiemParse
5856
+ };
5857
+ var locales = {}, localeFamilies = {}, globalLocale;
5858
+ function commonPrefix(arr1, arr2) {
5859
+ var i, minl = Math.min(arr1.length, arr2.length);
5860
+ for (i = 0; i < minl; i += 1) {
5861
+ if (arr1[i] !== arr2[i]) {
5862
+ return i;
5863
+ }
5864
+ }
5865
+ return minl;
5866
+ }
5867
+ function normalizeLocale(key) {
5868
+ return key ? key.toLowerCase().replace("_", "-") : key;
5869
+ }
5870
+ function chooseLocale(names) {
5871
+ var i = 0, j, next2, locale2, split;
5872
+ while (i < names.length) {
5873
+ split = normalizeLocale(names[i]).split("-");
5874
+ j = split.length;
5875
+ next2 = normalizeLocale(names[i + 1]);
5876
+ next2 = next2 ? next2.split("-") : null;
5877
+ while (j > 0) {
5878
+ locale2 = loadLocale(split.slice(0, j).join("-"));
5879
+ if (locale2) {
5880
+ return locale2;
5881
+ }
5882
+ if (next2 && next2.length >= j && commonPrefix(split, next2) >= j - 1) {
5883
+ break;
5884
+ }
5885
+ j--;
5886
+ }
5887
+ i++;
5888
+ }
5889
+ return globalLocale;
5890
+ }
5891
+ function isLocaleNameSane(name) {
5892
+ return name.match("^[^/\\\\]*$") != null;
5893
+ }
5894
+ function loadLocale(name) {
5895
+ var oldLocale = null, aliasedRequire;
5896
+ if (locales[name] === void 0 && typeof module2 !== "undefined" && module2 && module2.exports && isLocaleNameSane(name)) {
5897
+ try {
5898
+ oldLocale = globalLocale._abbr;
5899
+ aliasedRequire = require;
5900
+ aliasedRequire("./locale/" + name);
5901
+ getSetGlobalLocale(oldLocale);
5902
+ } catch (e) {
5903
+ locales[name] = null;
5904
+ }
5905
+ }
5906
+ return locales[name];
5907
+ }
5908
+ function getSetGlobalLocale(key, values) {
5909
+ var data;
5910
+ if (key) {
5911
+ if (isUndefined(values)) {
5912
+ data = getLocale(key);
5913
+ } else {
5914
+ data = defineLocale(key, values);
5915
+ }
5916
+ if (data) {
5917
+ globalLocale = data;
5918
+ } else {
5919
+ if (typeof console !== "undefined" && console.warn) {
5920
+ console.warn(
5921
+ "Locale " + key + " not found. Did you forget to load it?"
5922
+ );
5923
+ }
5924
+ }
5925
+ }
5926
+ return globalLocale._abbr;
5927
+ }
5928
+ function defineLocale(name, config) {
5929
+ if (config !== null) {
5930
+ var locale2, parentConfig = baseConfig;
5931
+ config.abbr = name;
5932
+ if (locales[name] != null) {
5933
+ deprecateSimple(
5934
+ "defineLocaleOverride",
5935
+ "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
5936
+ );
5937
+ parentConfig = locales[name]._config;
5938
+ } else if (config.parentLocale != null) {
5939
+ if (locales[config.parentLocale] != null) {
5940
+ parentConfig = locales[config.parentLocale]._config;
5941
+ } else {
5942
+ locale2 = loadLocale(config.parentLocale);
5943
+ if (locale2 != null) {
5944
+ parentConfig = locale2._config;
5945
+ } else {
5946
+ if (!localeFamilies[config.parentLocale]) {
5947
+ localeFamilies[config.parentLocale] = [];
5948
+ }
5949
+ localeFamilies[config.parentLocale].push({
5950
+ name,
5951
+ config
5952
+ });
5953
+ return null;
5954
+ }
5955
+ }
5956
+ }
5957
+ locales[name] = new Locale(mergeConfigs(parentConfig, config));
5958
+ if (localeFamilies[name]) {
5959
+ localeFamilies[name].forEach(function(x) {
5960
+ defineLocale(x.name, x.config);
5961
+ });
5962
+ }
5963
+ getSetGlobalLocale(name);
5964
+ return locales[name];
5965
+ } else {
5966
+ delete locales[name];
5967
+ return null;
5968
+ }
5969
+ }
5970
+ function updateLocale(name, config) {
5971
+ if (config != null) {
5972
+ var locale2, tmpLocale, parentConfig = baseConfig;
5973
+ if (locales[name] != null && locales[name].parentLocale != null) {
5974
+ locales[name].set(mergeConfigs(locales[name]._config, config));
5975
+ } else {
5976
+ tmpLocale = loadLocale(name);
5977
+ if (tmpLocale != null) {
5978
+ parentConfig = tmpLocale._config;
5979
+ }
5980
+ config = mergeConfigs(parentConfig, config);
5981
+ if (tmpLocale == null) {
5982
+ config.abbr = name;
5983
+ }
5984
+ locale2 = new Locale(config);
5985
+ locale2.parentLocale = locales[name];
5986
+ locales[name] = locale2;
5987
+ }
5988
+ getSetGlobalLocale(name);
5989
+ } else {
5990
+ if (locales[name] != null) {
5991
+ if (locales[name].parentLocale != null) {
5992
+ locales[name] = locales[name].parentLocale;
5993
+ if (name === getSetGlobalLocale()) {
5994
+ getSetGlobalLocale(name);
5995
+ }
5996
+ } else if (locales[name] != null) {
5997
+ delete locales[name];
5998
+ }
5999
+ }
6000
+ }
6001
+ return locales[name];
6002
+ }
6003
+ function getLocale(key) {
6004
+ var locale2;
6005
+ if (key && key._locale && key._locale._abbr) {
6006
+ key = key._locale._abbr;
6007
+ }
6008
+ if (!key) {
6009
+ return globalLocale;
6010
+ }
6011
+ if (!isArray7(key)) {
6012
+ locale2 = loadLocale(key);
6013
+ if (locale2) {
6014
+ return locale2;
6015
+ }
6016
+ key = [key];
6017
+ }
6018
+ return chooseLocale(key);
6019
+ }
6020
+ function listLocales() {
6021
+ return keys(locales);
6022
+ }
6023
+ function checkOverflow(m) {
6024
+ var overflow, a = m._a;
6025
+ if (a && getParsingFlags(m).overflow === -2) {
6026
+ overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;
6027
+ if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
6028
+ overflow = DATE;
6029
+ }
6030
+ if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
6031
+ overflow = WEEK;
6032
+ }
6033
+ if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
6034
+ overflow = WEEKDAY;
6035
+ }
6036
+ getParsingFlags(m).overflow = overflow;
6037
+ }
6038
+ return m;
6039
+ }
6040
+ var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [
6041
+ ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
6042
+ ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
6043
+ ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
6044
+ ["GGGG-[W]WW", /\d{4}-W\d\d/, false],
6045
+ ["YYYY-DDD", /\d{4}-\d{3}/],
6046
+ ["YYYY-MM", /\d{4}-\d\d/, false],
6047
+ ["YYYYYYMMDD", /[+-]\d{10}/],
6048
+ ["YYYYMMDD", /\d{8}/],
6049
+ ["GGGG[W]WWE", /\d{4}W\d{3}/],
6050
+ ["GGGG[W]WW", /\d{4}W\d{2}/, false],
6051
+ ["YYYYDDD", /\d{7}/],
6052
+ ["YYYYMM", /\d{6}/, false],
6053
+ ["YYYY", /\d{4}/, false]
6054
+ ], isoTimes = [
6055
+ ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
6056
+ ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
6057
+ ["HH:mm:ss", /\d\d:\d\d:\d\d/],
6058
+ ["HH:mm", /\d\d:\d\d/],
6059
+ ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
6060
+ ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
6061
+ ["HHmmss", /\d\d\d\d\d\d/],
6062
+ ["HHmm", /\d\d\d\d/],
6063
+ ["HH", /\d\d/]
6064
+ ], aspNetJsonRegex = /^\/?Date\((-?\d+)/i, rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, obsOffsets = {
6065
+ UT: 0,
6066
+ GMT: 0,
6067
+ EDT: -4 * 60,
6068
+ EST: -5 * 60,
6069
+ CDT: -5 * 60,
6070
+ CST: -6 * 60,
6071
+ MDT: -6 * 60,
6072
+ MST: -7 * 60,
6073
+ PDT: -7 * 60,
6074
+ PST: -8 * 60
6075
+ };
6076
+ function configFromISO(config) {
6077
+ var i, l, string = config._i, match5 = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length;
6078
+ if (match5) {
6079
+ getParsingFlags(config).iso = true;
6080
+ for (i = 0, l = isoDatesLen; i < l; i++) {
6081
+ if (isoDates[i][1].exec(match5[1])) {
6082
+ dateFormat = isoDates[i][0];
6083
+ allowTime = isoDates[i][2] !== false;
6084
+ break;
6085
+ }
6086
+ }
6087
+ if (dateFormat == null) {
6088
+ config._isValid = false;
6089
+ return;
6090
+ }
6091
+ if (match5[3]) {
6092
+ for (i = 0, l = isoTimesLen; i < l; i++) {
6093
+ if (isoTimes[i][1].exec(match5[3])) {
6094
+ timeFormat = (match5[2] || " ") + isoTimes[i][0];
6095
+ break;
6096
+ }
6097
+ }
6098
+ if (timeFormat == null) {
6099
+ config._isValid = false;
6100
+ return;
6101
+ }
6102
+ }
6103
+ if (!allowTime && timeFormat != null) {
6104
+ config._isValid = false;
6105
+ return;
6106
+ }
6107
+ if (match5[4]) {
6108
+ if (tzRegex.exec(match5[4])) {
6109
+ tzFormat = "Z";
6110
+ } else {
6111
+ config._isValid = false;
6112
+ return;
6113
+ }
6114
+ }
6115
+ config._f = dateFormat + (timeFormat || "") + (tzFormat || "");
6116
+ configFromStringAndFormat(config);
6117
+ } else {
6118
+ config._isValid = false;
6119
+ }
6120
+ }
6121
+ function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
6122
+ var result = [
6123
+ untruncateYear(yearStr),
6124
+ defaultLocaleMonthsShort.indexOf(monthStr),
6125
+ parseInt(dayStr, 10),
6126
+ parseInt(hourStr, 10),
6127
+ parseInt(minuteStr, 10)
6128
+ ];
6129
+ if (secondStr) {
6130
+ result.push(parseInt(secondStr, 10));
6131
+ }
6132
+ return result;
6133
+ }
6134
+ function untruncateYear(yearStr) {
6135
+ var year = parseInt(yearStr, 10);
6136
+ if (year <= 49) {
6137
+ return 2e3 + year;
6138
+ } else if (year <= 999) {
6139
+ return 1900 + year;
6140
+ }
6141
+ return year;
6142
+ }
6143
+ function preprocessRFC2822(s) {
6144
+ return s.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
6145
+ }
6146
+ function checkWeekday(weekdayStr, parsedInput, config) {
6147
+ if (weekdayStr) {
6148
+ var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(
6149
+ parsedInput[0],
6150
+ parsedInput[1],
6151
+ parsedInput[2]
6152
+ ).getDay();
6153
+ if (weekdayProvided !== weekdayActual) {
6154
+ getParsingFlags(config).weekdayMismatch = true;
6155
+ config._isValid = false;
6156
+ return false;
6157
+ }
6158
+ }
6159
+ return true;
6160
+ }
6161
+ function calculateOffset(obsOffset, militaryOffset, numOffset) {
6162
+ if (obsOffset) {
6163
+ return obsOffsets[obsOffset];
6164
+ } else if (militaryOffset) {
6165
+ return 0;
6166
+ } else {
6167
+ var hm = parseInt(numOffset, 10), m = hm % 100, h = (hm - m) / 100;
6168
+ return h * 60 + m;
6169
+ }
6170
+ }
6171
+ function configFromRFC2822(config) {
6172
+ var match5 = rfc2822.exec(preprocessRFC2822(config._i)), parsedArray;
6173
+ if (match5) {
6174
+ parsedArray = extractFromRFC2822Strings(
6175
+ match5[4],
6176
+ match5[3],
6177
+ match5[2],
6178
+ match5[5],
6179
+ match5[6],
6180
+ match5[7]
6181
+ );
6182
+ if (!checkWeekday(match5[1], parsedArray, config)) {
6183
+ return;
6184
+ }
6185
+ config._a = parsedArray;
6186
+ config._tzm = calculateOffset(match5[8], match5[9], match5[10]);
6187
+ config._d = createUTCDate.apply(null, config._a);
6188
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
6189
+ getParsingFlags(config).rfc2822 = true;
6190
+ } else {
6191
+ config._isValid = false;
6192
+ }
6193
+ }
6194
+ function configFromString(config) {
6195
+ var matched = aspNetJsonRegex.exec(config._i);
6196
+ if (matched !== null) {
6197
+ config._d = /* @__PURE__ */ new Date(+matched[1]);
6198
+ return;
6199
+ }
6200
+ configFromISO(config);
6201
+ if (config._isValid === false) {
6202
+ delete config._isValid;
6203
+ } else {
6204
+ return;
6205
+ }
6206
+ configFromRFC2822(config);
6207
+ if (config._isValid === false) {
6208
+ delete config._isValid;
6209
+ } else {
6210
+ return;
6211
+ }
6212
+ if (config._strict) {
6213
+ config._isValid = false;
6214
+ } else {
6215
+ hooks.createFromInputFallback(config);
6216
+ }
6217
+ }
6218
+ hooks.createFromInputFallback = deprecate(
6219
+ "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
6220
+ function(config) {
6221
+ config._d = /* @__PURE__ */ new Date(config._i + (config._useUTC ? " UTC" : ""));
6222
+ }
6223
+ );
6224
+ function defaults(a, b, c) {
6225
+ if (a != null) {
6226
+ return a;
6227
+ }
6228
+ if (b != null) {
6229
+ return b;
6230
+ }
6231
+ return c;
6232
+ }
6233
+ function currentDateArray(config) {
6234
+ var nowValue = new Date(hooks.now());
6235
+ if (config._useUTC) {
6236
+ return [
6237
+ nowValue.getUTCFullYear(),
6238
+ nowValue.getUTCMonth(),
6239
+ nowValue.getUTCDate()
6240
+ ];
6241
+ }
6242
+ return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
6243
+ }
6244
+ function configFromArray(config) {
6245
+ var i, date, input = [], currentDate, expectedWeekday, yearToUse;
6246
+ if (config._d) {
6247
+ return;
6248
+ }
6249
+ currentDate = currentDateArray(config);
6250
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
6251
+ dayOfYearFromWeekInfo(config);
6252
+ }
6253
+ if (config._dayOfYear != null) {
6254
+ yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
6255
+ if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
6256
+ getParsingFlags(config)._overflowDayOfYear = true;
6257
+ }
6258
+ date = createUTCDate(yearToUse, 0, config._dayOfYear);
6259
+ config._a[MONTH] = date.getUTCMonth();
6260
+ config._a[DATE] = date.getUTCDate();
6261
+ }
6262
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
6263
+ config._a[i] = input[i] = currentDate[i];
6264
+ }
6265
+ for (; i < 7; i++) {
6266
+ config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];
6267
+ }
6268
+ if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {
6269
+ config._nextDay = true;
6270
+ config._a[HOUR] = 0;
6271
+ }
6272
+ config._d = (config._useUTC ? createUTCDate : createDate).apply(
6273
+ null,
6274
+ input
6275
+ );
6276
+ expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
6277
+ if (config._tzm != null) {
6278
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
6279
+ }
6280
+ if (config._nextDay) {
6281
+ config._a[HOUR] = 24;
6282
+ }
6283
+ if (config._w && typeof config._w.d !== "undefined" && config._w.d !== expectedWeekday) {
6284
+ getParsingFlags(config).weekdayMismatch = true;
6285
+ }
6286
+ }
6287
+ function dayOfYearFromWeekInfo(config) {
6288
+ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
6289
+ w = config._w;
6290
+ if (w.GG != null || w.W != null || w.E != null) {
6291
+ dow = 1;
6292
+ doy = 4;
6293
+ weekYear = defaults(
6294
+ w.GG,
6295
+ config._a[YEAR],
6296
+ weekOfYear(createLocal(), 1, 4).year
6297
+ );
6298
+ week = defaults(w.W, 1);
6299
+ weekday = defaults(w.E, 1);
6300
+ if (weekday < 1 || weekday > 7) {
6301
+ weekdayOverflow = true;
6302
+ }
6303
+ } else {
6304
+ dow = config._locale._week.dow;
6305
+ doy = config._locale._week.doy;
6306
+ curWeek = weekOfYear(createLocal(), dow, doy);
6307
+ weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
6308
+ week = defaults(w.w, curWeek.week);
6309
+ if (w.d != null) {
6310
+ weekday = w.d;
6311
+ if (weekday < 0 || weekday > 6) {
6312
+ weekdayOverflow = true;
6313
+ }
6314
+ } else if (w.e != null) {
6315
+ weekday = w.e + dow;
6316
+ if (w.e < 0 || w.e > 6) {
6317
+ weekdayOverflow = true;
6318
+ }
6319
+ } else {
6320
+ weekday = dow;
6321
+ }
6322
+ }
6323
+ if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
6324
+ getParsingFlags(config)._overflowWeeks = true;
6325
+ } else if (weekdayOverflow != null) {
6326
+ getParsingFlags(config)._overflowWeekday = true;
6327
+ } else {
6328
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
6329
+ config._a[YEAR] = temp.year;
6330
+ config._dayOfYear = temp.dayOfYear;
6331
+ }
6332
+ }
6333
+ hooks.ISO_8601 = function() {
6334
+ };
6335
+ hooks.RFC_2822 = function() {
6336
+ };
6337
+ function configFromStringAndFormat(config) {
6338
+ if (config._f === hooks.ISO_8601) {
6339
+ configFromISO(config);
6340
+ return;
6341
+ }
6342
+ if (config._f === hooks.RFC_2822) {
6343
+ configFromRFC2822(config);
6344
+ return;
6345
+ }
6346
+ config._a = [];
6347
+ getParsingFlags(config).empty = true;
6348
+ var string = "" + config._i, i, parsedInput, tokens2, token3, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen;
6349
+ tokens2 = expandFormat(config._f, config._locale).match(formattingTokens) || [];
6350
+ tokenLen = tokens2.length;
6351
+ for (i = 0; i < tokenLen; i++) {
6352
+ token3 = tokens2[i];
6353
+ parsedInput = (string.match(getParseRegexForToken(token3, config)) || [])[0];
6354
+ if (parsedInput) {
6355
+ skipped = string.substr(0, string.indexOf(parsedInput));
6356
+ if (skipped.length > 0) {
6357
+ getParsingFlags(config).unusedInput.push(skipped);
6358
+ }
6359
+ string = string.slice(
6360
+ string.indexOf(parsedInput) + parsedInput.length
6361
+ );
6362
+ totalParsedInputLength += parsedInput.length;
6363
+ }
6364
+ if (formatTokenFunctions[token3]) {
6365
+ if (parsedInput) {
6366
+ getParsingFlags(config).empty = false;
6367
+ } else {
6368
+ getParsingFlags(config).unusedTokens.push(token3);
6369
+ }
6370
+ addTimeToArrayFromToken(token3, parsedInput, config);
6371
+ } else if (config._strict && !parsedInput) {
6372
+ getParsingFlags(config).unusedTokens.push(token3);
6373
+ }
6374
+ }
6375
+ getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
6376
+ if (string.length > 0) {
6377
+ getParsingFlags(config).unusedInput.push(string);
6378
+ }
6379
+ if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {
6380
+ getParsingFlags(config).bigHour = void 0;
6381
+ }
6382
+ getParsingFlags(config).parsedDateParts = config._a.slice(0);
6383
+ getParsingFlags(config).meridiem = config._meridiem;
6384
+ config._a[HOUR] = meridiemFixWrap(
6385
+ config._locale,
6386
+ config._a[HOUR],
6387
+ config._meridiem
6388
+ );
6389
+ era = getParsingFlags(config).era;
6390
+ if (era !== null) {
6391
+ config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
6392
+ }
6393
+ configFromArray(config);
6394
+ checkOverflow(config);
6395
+ }
6396
+ function meridiemFixWrap(locale2, hour, meridiem2) {
6397
+ var isPm;
6398
+ if (meridiem2 == null) {
6399
+ return hour;
6400
+ }
6401
+ if (locale2.meridiemHour != null) {
6402
+ return locale2.meridiemHour(hour, meridiem2);
6403
+ } else if (locale2.isPM != null) {
6404
+ isPm = locale2.isPM(meridiem2);
6405
+ if (isPm && hour < 12) {
6406
+ hour += 12;
6407
+ }
6408
+ if (!isPm && hour === 12) {
6409
+ hour = 0;
6410
+ }
6411
+ return hour;
6412
+ } else {
6413
+ return hour;
6414
+ }
6415
+ }
6416
+ function configFromStringAndArray(config) {
6417
+ var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config._f.length;
6418
+ if (configfLen === 0) {
6419
+ getParsingFlags(config).invalidFormat = true;
6420
+ config._d = /* @__PURE__ */ new Date(NaN);
6421
+ return;
6422
+ }
6423
+ for (i = 0; i < configfLen; i++) {
6424
+ currentScore = 0;
6425
+ validFormatFound = false;
6426
+ tempConfig = copyConfig({}, config);
6427
+ if (config._useUTC != null) {
6428
+ tempConfig._useUTC = config._useUTC;
6429
+ }
6430
+ tempConfig._f = config._f[i];
6431
+ configFromStringAndFormat(tempConfig);
6432
+ if (isValid(tempConfig)) {
6433
+ validFormatFound = true;
6434
+ }
6435
+ currentScore += getParsingFlags(tempConfig).charsLeftOver;
6436
+ currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
6437
+ getParsingFlags(tempConfig).score = currentScore;
6438
+ if (!bestFormatIsValid) {
6439
+ if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {
6440
+ scoreToBeat = currentScore;
6441
+ bestMoment = tempConfig;
6442
+ if (validFormatFound) {
6443
+ bestFormatIsValid = true;
6444
+ }
6445
+ }
6446
+ } else {
6447
+ if (currentScore < scoreToBeat) {
6448
+ scoreToBeat = currentScore;
6449
+ bestMoment = tempConfig;
6450
+ }
6451
+ }
6452
+ }
6453
+ extend(config, bestMoment || tempConfig);
6454
+ }
6455
+ function configFromObject(config) {
6456
+ if (config._d) {
6457
+ return;
6458
+ }
6459
+ var i = normalizeObjectUnits(config._i), dayOrDate = i.day === void 0 ? i.date : i.day;
6460
+ config._a = map(
6461
+ [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
6462
+ function(obj) {
6463
+ return obj && parseInt(obj, 10);
6464
+ }
6465
+ );
6466
+ configFromArray(config);
6467
+ }
6468
+ function createFromConfig(config) {
6469
+ var res = new Moment(checkOverflow(prepareConfig(config)));
6470
+ if (res._nextDay) {
6471
+ res.add(1, "d");
6472
+ res._nextDay = void 0;
6473
+ }
6474
+ return res;
6475
+ }
6476
+ function prepareConfig(config) {
6477
+ var input = config._i, format2 = config._f;
6478
+ config._locale = config._locale || getLocale(config._l);
6479
+ if (input === null || format2 === void 0 && input === "") {
6480
+ return createInvalid({ nullInput: true });
6481
+ }
6482
+ if (typeof input === "string") {
6483
+ config._i = input = config._locale.preparse(input);
6484
+ }
6485
+ if (isMoment(input)) {
6486
+ return new Moment(checkOverflow(input));
6487
+ } else if (isDate(input)) {
6488
+ config._d = input;
6489
+ } else if (isArray7(format2)) {
6490
+ configFromStringAndArray(config);
6491
+ } else if (format2) {
6492
+ configFromStringAndFormat(config);
6493
+ } else {
6494
+ configFromInput(config);
6495
+ }
6496
+ if (!isValid(config)) {
6497
+ config._d = null;
6498
+ }
6499
+ return config;
6500
+ }
6501
+ function configFromInput(config) {
6502
+ var input = config._i;
6503
+ if (isUndefined(input)) {
6504
+ config._d = new Date(hooks.now());
6505
+ } else if (isDate(input)) {
6506
+ config._d = new Date(input.valueOf());
6507
+ } else if (typeof input === "string") {
6508
+ configFromString(config);
6509
+ } else if (isArray7(input)) {
6510
+ config._a = map(input.slice(0), function(obj) {
6511
+ return parseInt(obj, 10);
6512
+ });
6513
+ configFromArray(config);
6514
+ } else if (isObject7(input)) {
6515
+ configFromObject(config);
6516
+ } else if (isNumber(input)) {
6517
+ config._d = new Date(input);
6518
+ } else {
6519
+ hooks.createFromInputFallback(config);
6520
+ }
6521
+ }
6522
+ function createLocalOrUTC(input, format2, locale2, strict, isUTC) {
6523
+ var c = {};
6524
+ if (format2 === true || format2 === false) {
6525
+ strict = format2;
6526
+ format2 = void 0;
6527
+ }
6528
+ if (locale2 === true || locale2 === false) {
6529
+ strict = locale2;
6530
+ locale2 = void 0;
6531
+ }
6532
+ if (isObject7(input) && isObjectEmpty(input) || isArray7(input) && input.length === 0) {
6533
+ input = void 0;
6534
+ }
6535
+ c._isAMomentObject = true;
6536
+ c._useUTC = c._isUTC = isUTC;
6537
+ c._l = locale2;
6538
+ c._i = input;
6539
+ c._f = format2;
6540
+ c._strict = strict;
6541
+ return createFromConfig(c);
6542
+ }
6543
+ function createLocal(input, format2, locale2, strict) {
6544
+ return createLocalOrUTC(input, format2, locale2, strict, false);
6545
+ }
6546
+ var prototypeMin = deprecate(
6547
+ "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
6548
+ function() {
6549
+ var other = createLocal.apply(null, arguments);
6550
+ if (this.isValid() && other.isValid()) {
6551
+ return other < this ? this : other;
6552
+ } else {
6553
+ return createInvalid();
6554
+ }
6555
+ }
6556
+ ), prototypeMax = deprecate(
6557
+ "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
6558
+ function() {
6559
+ var other = createLocal.apply(null, arguments);
6560
+ if (this.isValid() && other.isValid()) {
6561
+ return other > this ? this : other;
6562
+ } else {
6563
+ return createInvalid();
6564
+ }
6565
+ }
6566
+ );
6567
+ function pickBy(fn, moments) {
6568
+ var res, i;
6569
+ if (moments.length === 1 && isArray7(moments[0])) {
6570
+ moments = moments[0];
6571
+ }
6572
+ if (!moments.length) {
6573
+ return createLocal();
6574
+ }
6575
+ res = moments[0];
6576
+ for (i = 1; i < moments.length; ++i) {
6577
+ if (!moments[i].isValid() || moments[i][fn](res)) {
6578
+ res = moments[i];
6579
+ }
6580
+ }
6581
+ return res;
6582
+ }
6583
+ function min() {
6584
+ var args = [].slice.call(arguments, 0);
6585
+ return pickBy("isBefore", args);
6586
+ }
6587
+ function max() {
6588
+ var args = [].slice.call(arguments, 0);
6589
+ return pickBy("isAfter", args);
6590
+ }
6591
+ var now = function() {
6592
+ return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
6593
+ };
6594
+ var ordering = [
6595
+ "year",
6596
+ "quarter",
6597
+ "month",
6598
+ "week",
6599
+ "day",
6600
+ "hour",
6601
+ "minute",
6602
+ "second",
6603
+ "millisecond"
6604
+ ];
6605
+ function isDurationValid(m) {
6606
+ var key, unitHasDecimal = false, i, orderLen = ordering.length;
6607
+ for (key in m) {
6608
+ if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
6609
+ return false;
6610
+ }
6611
+ }
6612
+ for (i = 0; i < orderLen; ++i) {
6613
+ if (m[ordering[i]]) {
6614
+ if (unitHasDecimal) {
6615
+ return false;
6616
+ }
6617
+ if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
6618
+ unitHasDecimal = true;
6619
+ }
6620
+ }
6621
+ }
6622
+ return true;
6623
+ }
6624
+ function isValid$1() {
6625
+ return this._isValid;
6626
+ }
6627
+ function createInvalid$1() {
6628
+ return createDuration(NaN);
6629
+ }
6630
+ function Duration(duration) {
6631
+ var normalizedInput = normalizeObjectUnits(duration), years2 = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months2 = normalizedInput.month || 0, weeks2 = normalizedInput.week || normalizedInput.isoWeek || 0, days2 = normalizedInput.day || 0, hours2 = normalizedInput.hour || 0, minutes2 = normalizedInput.minute || 0, seconds2 = normalizedInput.second || 0, milliseconds2 = normalizedInput.millisecond || 0;
6632
+ this._isValid = isDurationValid(normalizedInput);
6633
+ this._milliseconds = +milliseconds2 + seconds2 * 1e3 + // 1000
6634
+ minutes2 * 6e4 + // 1000 * 60
6635
+ hours2 * 1e3 * 60 * 60;
6636
+ this._days = +days2 + weeks2 * 7;
6637
+ this._months = +months2 + quarters * 3 + years2 * 12;
6638
+ this._data = {};
6639
+ this._locale = getLocale();
6640
+ this._bubble();
6641
+ }
6642
+ function isDuration(obj) {
6643
+ return obj instanceof Duration;
6644
+ }
6645
+ function absRound(number) {
6646
+ if (number < 0) {
6647
+ return Math.round(-1 * number) * -1;
6648
+ } else {
6649
+ return Math.round(number);
6650
+ }
6651
+ }
6652
+ function compareArrays(array1, array2, dontConvert) {
6653
+ var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i;
6654
+ for (i = 0; i < len; i++) {
6655
+ if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {
6656
+ diffs++;
6657
+ }
6658
+ }
6659
+ return diffs + lengthDiff;
6660
+ }
6661
+ function offset(token3, separator) {
6662
+ addFormatToken(token3, 0, 0, function() {
6663
+ var offset2 = this.utcOffset(), sign2 = "+";
6664
+ if (offset2 < 0) {
6665
+ offset2 = -offset2;
6666
+ sign2 = "-";
6667
+ }
6668
+ return sign2 + zeroFill(~~(offset2 / 60), 2) + separator + zeroFill(~~offset2 % 60, 2);
6669
+ });
6670
+ }
6671
+ offset("Z", ":");
6672
+ offset("ZZ", "");
6673
+ addRegexToken("Z", matchShortOffset);
6674
+ addRegexToken("ZZ", matchShortOffset);
6675
+ addParseToken(["Z", "ZZ"], function(input, array, config) {
6676
+ config._useUTC = true;
6677
+ config._tzm = offsetFromString(matchShortOffset, input);
6678
+ });
6679
+ var chunkOffset = /([\+\-]|\d\d)/gi;
6680
+ function offsetFromString(matcher, string) {
6681
+ var matches = (string || "").match(matcher), chunk, parts, minutes2;
6682
+ if (matches === null) {
6683
+ return null;
6684
+ }
6685
+ chunk = matches[matches.length - 1] || [];
6686
+ parts = (chunk + "").match(chunkOffset) || ["-", 0, 0];
6687
+ minutes2 = +(parts[1] * 60) + toInt(parts[2]);
6688
+ return minutes2 === 0 ? 0 : parts[0] === "+" ? minutes2 : -minutes2;
6689
+ }
6690
+ function cloneWithOffset(input, model) {
6691
+ var res, diff5;
6692
+ if (model._isUTC) {
6693
+ res = model.clone();
6694
+ diff5 = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
6695
+ res._d.setTime(res._d.valueOf() + diff5);
6696
+ hooks.updateOffset(res, false);
6697
+ return res;
6698
+ } else {
6699
+ return createLocal(input).local();
6700
+ }
6701
+ }
6702
+ function getDateOffset(m) {
6703
+ return -Math.round(m._d.getTimezoneOffset());
6704
+ }
6705
+ hooks.updateOffset = function() {
6706
+ };
6707
+ function getSetOffset(input, keepLocalTime, keepMinutes) {
6708
+ var offset2 = this._offset || 0, localAdjust;
6709
+ if (!this.isValid()) {
6710
+ return input != null ? this : NaN;
6711
+ }
6712
+ if (input != null) {
6713
+ if (typeof input === "string") {
6714
+ input = offsetFromString(matchShortOffset, input);
6715
+ if (input === null) {
6716
+ return this;
6717
+ }
6718
+ } else if (Math.abs(input) < 16 && !keepMinutes) {
6719
+ input = input * 60;
6720
+ }
6721
+ if (!this._isUTC && keepLocalTime) {
6722
+ localAdjust = getDateOffset(this);
6723
+ }
6724
+ this._offset = input;
6725
+ this._isUTC = true;
6726
+ if (localAdjust != null) {
6727
+ this.add(localAdjust, "m");
6728
+ }
6729
+ if (offset2 !== input) {
6730
+ if (!keepLocalTime || this._changeInProgress) {
6731
+ addSubtract(
6732
+ this,
6733
+ createDuration(input - offset2, "m"),
6734
+ 1,
6735
+ false
6736
+ );
6737
+ } else if (!this._changeInProgress) {
6738
+ this._changeInProgress = true;
6739
+ hooks.updateOffset(this, true);
6740
+ this._changeInProgress = null;
6741
+ }
6742
+ }
6743
+ return this;
6744
+ } else {
6745
+ return this._isUTC ? offset2 : getDateOffset(this);
6746
+ }
6747
+ }
6748
+ function getSetZone(input, keepLocalTime) {
6749
+ if (input != null) {
6750
+ if (typeof input !== "string") {
6751
+ input = -input;
6752
+ }
6753
+ this.utcOffset(input, keepLocalTime);
6754
+ return this;
6755
+ } else {
6756
+ return -this.utcOffset();
6757
+ }
6758
+ }
6759
+ function setOffsetToUTC(keepLocalTime) {
6760
+ return this.utcOffset(0, keepLocalTime);
6761
+ }
6762
+ function setOffsetToLocal(keepLocalTime) {
6763
+ if (this._isUTC) {
6764
+ this.utcOffset(0, keepLocalTime);
6765
+ this._isUTC = false;
6766
+ if (keepLocalTime) {
6767
+ this.subtract(getDateOffset(this), "m");
6768
+ }
6769
+ }
6770
+ return this;
6771
+ }
6772
+ function setOffsetToParsedOffset() {
6773
+ if (this._tzm != null) {
6774
+ this.utcOffset(this._tzm, false, true);
6775
+ } else if (typeof this._i === "string") {
6776
+ var tZone = offsetFromString(matchOffset, this._i);
6777
+ if (tZone != null) {
6778
+ this.utcOffset(tZone);
6779
+ } else {
6780
+ this.utcOffset(0, true);
6781
+ }
6782
+ }
6783
+ return this;
6784
+ }
6785
+ function hasAlignedHourOffset(input) {
6786
+ if (!this.isValid()) {
6787
+ return false;
6788
+ }
6789
+ input = input ? createLocal(input).utcOffset() : 0;
6790
+ return (this.utcOffset() - input) % 60 === 0;
6791
+ }
6792
+ function isDaylightSavingTime() {
6793
+ return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
6794
+ }
6795
+ function isDaylightSavingTimeShifted() {
6796
+ if (!isUndefined(this._isDSTShifted)) {
6797
+ return this._isDSTShifted;
6798
+ }
6799
+ var c = {}, other;
6800
+ copyConfig(c, this);
6801
+ c = prepareConfig(c);
6802
+ if (c._a) {
6803
+ other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
6804
+ this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;
6805
+ } else {
6806
+ this._isDSTShifted = false;
6807
+ }
6808
+ return this._isDSTShifted;
6809
+ }
6810
+ function isLocal() {
6811
+ return this.isValid() ? !this._isUTC : false;
6812
+ }
6813
+ function isUtcOffset() {
6814
+ return this.isValid() ? this._isUTC : false;
6815
+ }
6816
+ function isUtc() {
6817
+ return this.isValid() ? this._isUTC && this._offset === 0 : false;
6818
+ }
6819
+ var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
6820
+ function createDuration(input, key) {
6821
+ var duration = input, match5 = null, sign2, ret, diffRes;
6822
+ if (isDuration(input)) {
6823
+ duration = {
6824
+ ms: input._milliseconds,
6825
+ d: input._days,
6826
+ M: input._months
6827
+ };
6828
+ } else if (isNumber(input) || !isNaN(+input)) {
6829
+ duration = {};
6830
+ if (key) {
6831
+ duration[key] = +input;
6832
+ } else {
6833
+ duration.milliseconds = +input;
6834
+ }
6835
+ } else if (match5 = aspNetRegex.exec(input)) {
6836
+ sign2 = match5[1] === "-" ? -1 : 1;
6837
+ duration = {
6838
+ y: 0,
6839
+ d: toInt(match5[DATE]) * sign2,
6840
+ h: toInt(match5[HOUR]) * sign2,
6841
+ m: toInt(match5[MINUTE]) * sign2,
6842
+ s: toInt(match5[SECOND]) * sign2,
6843
+ ms: toInt(absRound(match5[MILLISECOND] * 1e3)) * sign2
6844
+ // the millisecond decimal point is included in the match
6845
+ };
6846
+ } else if (match5 = isoRegex.exec(input)) {
6847
+ sign2 = match5[1] === "-" ? -1 : 1;
6848
+ duration = {
6849
+ y: parseIso(match5[2], sign2),
6850
+ M: parseIso(match5[3], sign2),
6851
+ w: parseIso(match5[4], sign2),
6852
+ d: parseIso(match5[5], sign2),
6853
+ h: parseIso(match5[6], sign2),
6854
+ m: parseIso(match5[7], sign2),
6855
+ s: parseIso(match5[8], sign2)
6856
+ };
6857
+ } else if (duration == null) {
6858
+ duration = {};
6859
+ } else if (typeof duration === "object" && ("from" in duration || "to" in duration)) {
6860
+ diffRes = momentsDifference(
6861
+ createLocal(duration.from),
6862
+ createLocal(duration.to)
6863
+ );
6864
+ duration = {};
6865
+ duration.ms = diffRes.milliseconds;
6866
+ duration.M = diffRes.months;
6867
+ }
6868
+ ret = new Duration(duration);
6869
+ if (isDuration(input) && hasOwnProp(input, "_locale")) {
6870
+ ret._locale = input._locale;
6871
+ }
6872
+ if (isDuration(input) && hasOwnProp(input, "_isValid")) {
6873
+ ret._isValid = input._isValid;
6874
+ }
6875
+ return ret;
6876
+ }
6877
+ createDuration.fn = Duration.prototype;
6878
+ createDuration.invalid = createInvalid$1;
6879
+ function parseIso(inp, sign2) {
6880
+ var res = inp && parseFloat(inp.replace(",", "."));
6881
+ return (isNaN(res) ? 0 : res) * sign2;
6882
+ }
6883
+ function positiveMomentsDifference(base, other) {
6884
+ var res = {};
6885
+ res.months = other.month() - base.month() + (other.year() - base.year()) * 12;
6886
+ if (base.clone().add(res.months, "M").isAfter(other)) {
6887
+ --res.months;
6888
+ }
6889
+ res.milliseconds = +other - +base.clone().add(res.months, "M");
6890
+ return res;
6891
+ }
6892
+ function momentsDifference(base, other) {
6893
+ var res;
6894
+ if (!(base.isValid() && other.isValid())) {
6895
+ return { milliseconds: 0, months: 0 };
6896
+ }
6897
+ other = cloneWithOffset(other, base);
6898
+ if (base.isBefore(other)) {
6899
+ res = positiveMomentsDifference(base, other);
6900
+ } else {
6901
+ res = positiveMomentsDifference(other, base);
6902
+ res.milliseconds = -res.milliseconds;
6903
+ res.months = -res.months;
6904
+ }
6905
+ return res;
6906
+ }
6907
+ function createAdder(direction, name) {
6908
+ return function(val, period) {
6909
+ var dur, tmp;
6910
+ if (period !== null && !isNaN(+period)) {
6911
+ deprecateSimple(
6912
+ name,
6913
+ "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
6914
+ );
6915
+ tmp = val;
6916
+ val = period;
6917
+ period = tmp;
6918
+ }
6919
+ dur = createDuration(val, period);
6920
+ addSubtract(this, dur, direction);
6921
+ return this;
6922
+ };
6923
+ }
6924
+ function addSubtract(mom, duration, isAdding, updateOffset) {
6925
+ var milliseconds2 = duration._milliseconds, days2 = absRound(duration._days), months2 = absRound(duration._months);
6926
+ if (!mom.isValid()) {
6927
+ return;
6928
+ }
6929
+ updateOffset = updateOffset == null ? true : updateOffset;
6930
+ if (months2) {
6931
+ setMonth(mom, get(mom, "Month") + months2 * isAdding);
6932
+ }
6933
+ if (days2) {
6934
+ set$1(mom, "Date", get(mom, "Date") + days2 * isAdding);
6935
+ }
6936
+ if (milliseconds2) {
6937
+ mom._d.setTime(mom._d.valueOf() + milliseconds2 * isAdding);
6938
+ }
6939
+ if (updateOffset) {
6940
+ hooks.updateOffset(mom, days2 || months2);
6941
+ }
6942
+ }
6943
+ var add = createAdder(1, "add"), subtract = createAdder(-1, "subtract");
6944
+ function isString4(input) {
6945
+ return typeof input === "string" || input instanceof String;
6946
+ }
6947
+ function isMomentInput(input) {
6948
+ return isMoment(input) || isDate(input) || isString4(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0;
6949
+ }
6950
+ function isMomentInputObject(input) {
6951
+ var objectTest = isObject7(input) && !isObjectEmpty(input), propertyTest = false, properties = [
6952
+ "years",
6953
+ "year",
6954
+ "y",
6955
+ "months",
6956
+ "month",
6957
+ "M",
6958
+ "days",
6959
+ "day",
6960
+ "d",
6961
+ "dates",
6962
+ "date",
6963
+ "D",
6964
+ "hours",
6965
+ "hour",
6966
+ "h",
6967
+ "minutes",
6968
+ "minute",
6969
+ "m",
6970
+ "seconds",
6971
+ "second",
6972
+ "s",
6973
+ "milliseconds",
6974
+ "millisecond",
6975
+ "ms"
6976
+ ], i, property, propertyLen = properties.length;
6977
+ for (i = 0; i < propertyLen; i += 1) {
6978
+ property = properties[i];
6979
+ propertyTest = propertyTest || hasOwnProp(input, property);
6980
+ }
6981
+ return objectTest && propertyTest;
6982
+ }
6983
+ function isNumberOrStringArray(input) {
6984
+ var arrayTest = isArray7(input), dataTypeTest = false;
6985
+ if (arrayTest) {
6986
+ dataTypeTest = input.filter(function(item) {
6987
+ return !isNumber(item) && isString4(input);
6988
+ }).length === 0;
6989
+ }
6990
+ return arrayTest && dataTypeTest;
6991
+ }
6992
+ function isCalendarSpec(input) {
6993
+ var objectTest = isObject7(input) && !isObjectEmpty(input), propertyTest = false, properties = [
6994
+ "sameDay",
6995
+ "nextDay",
6996
+ "lastDay",
6997
+ "nextWeek",
6998
+ "lastWeek",
6999
+ "sameElse"
7000
+ ], i, property;
7001
+ for (i = 0; i < properties.length; i += 1) {
7002
+ property = properties[i];
7003
+ propertyTest = propertyTest || hasOwnProp(input, property);
7004
+ }
7005
+ return objectTest && propertyTest;
7006
+ }
7007
+ function getCalendarFormat(myMoment, now2) {
7008
+ var diff5 = myMoment.diff(now2, "days", true);
7009
+ return diff5 < -6 ? "sameElse" : diff5 < -1 ? "lastWeek" : diff5 < 0 ? "lastDay" : diff5 < 1 ? "sameDay" : diff5 < 2 ? "nextDay" : diff5 < 7 ? "nextWeek" : "sameElse";
7010
+ }
7011
+ function calendar$1(time, formats) {
7012
+ if (arguments.length === 1) {
7013
+ if (!arguments[0]) {
7014
+ time = void 0;
7015
+ formats = void 0;
7016
+ } else if (isMomentInput(arguments[0])) {
7017
+ time = arguments[0];
7018
+ formats = void 0;
7019
+ } else if (isCalendarSpec(arguments[0])) {
7020
+ formats = arguments[0];
7021
+ time = void 0;
7022
+ }
7023
+ }
7024
+ var now2 = time || createLocal(), sod = cloneWithOffset(now2, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction3(formats[format2]) ? formats[format2].call(this, now2) : formats[format2]);
7025
+ return this.format(
7026
+ output || this.localeData().calendar(format2, this, createLocal(now2))
7027
+ );
7028
+ }
7029
+ function clone() {
7030
+ return new Moment(this);
7031
+ }
7032
+ function isAfter(input, units) {
7033
+ var localInput = isMoment(input) ? input : createLocal(input);
7034
+ if (!(this.isValid() && localInput.isValid())) {
7035
+ return false;
7036
+ }
7037
+ units = normalizeUnits(units) || "millisecond";
7038
+ if (units === "millisecond") {
7039
+ return this.valueOf() > localInput.valueOf();
7040
+ } else {
7041
+ return localInput.valueOf() < this.clone().startOf(units).valueOf();
7042
+ }
7043
+ }
7044
+ function isBefore(input, units) {
7045
+ var localInput = isMoment(input) ? input : createLocal(input);
7046
+ if (!(this.isValid() && localInput.isValid())) {
7047
+ return false;
7048
+ }
7049
+ units = normalizeUnits(units) || "millisecond";
7050
+ if (units === "millisecond") {
7051
+ return this.valueOf() < localInput.valueOf();
7052
+ } else {
7053
+ return this.clone().endOf(units).valueOf() < localInput.valueOf();
7054
+ }
7055
+ }
7056
+ function isBetween(from3, to2, units, inclusivity) {
7057
+ var localFrom = isMoment(from3) ? from3 : createLocal(from3), localTo = isMoment(to2) ? to2 : createLocal(to2);
7058
+ if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
7059
+ return false;
7060
+ }
7061
+ inclusivity = inclusivity || "()";
7062
+ return (inclusivity[0] === "(" ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ")" ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));
7063
+ }
7064
+ function isSame(input, units) {
7065
+ var localInput = isMoment(input) ? input : createLocal(input), inputMs;
7066
+ if (!(this.isValid() && localInput.isValid())) {
7067
+ return false;
7068
+ }
7069
+ units = normalizeUnits(units) || "millisecond";
7070
+ if (units === "millisecond") {
7071
+ return this.valueOf() === localInput.valueOf();
7072
+ } else {
7073
+ inputMs = localInput.valueOf();
7074
+ return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
7075
+ }
7076
+ }
7077
+ function isSameOrAfter(input, units) {
7078
+ return this.isSame(input, units) || this.isAfter(input, units);
7079
+ }
7080
+ function isSameOrBefore(input, units) {
7081
+ return this.isSame(input, units) || this.isBefore(input, units);
7082
+ }
7083
+ function diff4(input, units, asFloat) {
7084
+ var that, zoneDelta, output;
7085
+ if (!this.isValid()) {
7086
+ return NaN;
7087
+ }
7088
+ that = cloneWithOffset(input, this);
7089
+ if (!that.isValid()) {
7090
+ return NaN;
7091
+ }
7092
+ zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
7093
+ units = normalizeUnits(units);
7094
+ switch (units) {
7095
+ case "year":
7096
+ output = monthDiff(this, that) / 12;
7097
+ break;
7098
+ case "month":
7099
+ output = monthDiff(this, that);
7100
+ break;
7101
+ case "quarter":
7102
+ output = monthDiff(this, that) / 3;
7103
+ break;
7104
+ case "second":
7105
+ output = (this - that) / 1e3;
7106
+ break;
7107
+ case "minute":
7108
+ output = (this - that) / 6e4;
7109
+ break;
7110
+ case "hour":
7111
+ output = (this - that) / 36e5;
7112
+ break;
7113
+ case "day":
7114
+ output = (this - that - zoneDelta) / 864e5;
7115
+ break;
7116
+ case "week":
7117
+ output = (this - that - zoneDelta) / 6048e5;
7118
+ break;
7119
+ default:
7120
+ output = this - that;
7121
+ }
7122
+ return asFloat ? output : absFloor(output);
7123
+ }
7124
+ function monthDiff(a, b) {
7125
+ if (a.date() < b.date()) {
7126
+ return -monthDiff(b, a);
7127
+ }
7128
+ var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
7129
+ if (b - anchor < 0) {
7130
+ anchor2 = a.clone().add(wholeMonthDiff - 1, "months");
7131
+ adjust = (b - anchor) / (anchor - anchor2);
7132
+ } else {
7133
+ anchor2 = a.clone().add(wholeMonthDiff + 1, "months");
7134
+ adjust = (b - anchor) / (anchor2 - anchor);
7135
+ }
7136
+ return -(wholeMonthDiff + adjust) || 0;
7137
+ }
7138
+ hooks.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
7139
+ hooks.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
7140
+ function toString() {
7141
+ return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
7142
+ }
7143
+ function toISOString(keepOffset) {
7144
+ if (!this.isValid()) {
7145
+ return null;
7146
+ }
7147
+ var utc = keepOffset !== true, m = utc ? this.clone().utc() : this;
7148
+ if (m.year() < 0 || m.year() > 9999) {
7149
+ return formatMoment(
7150
+ m,
7151
+ utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
7152
+ );
7153
+ }
7154
+ if (isFunction3(Date.prototype.toISOString)) {
7155
+ if (utc) {
7156
+ return this.toDate().toISOString();
7157
+ } else {
7158
+ return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(m, "Z"));
7159
+ }
7160
+ }
7161
+ return formatMoment(
7162
+ m,
7163
+ utc ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
7164
+ );
7165
+ }
7166
+ function inspect() {
7167
+ if (!this.isValid()) {
7168
+ return "moment.invalid(/* " + this._i + " */)";
7169
+ }
7170
+ var func = "moment", zone = "", prefix2, year, datetime, suffix;
7171
+ if (!this.isLocal()) {
7172
+ func = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone";
7173
+ zone = "Z";
7174
+ }
7175
+ prefix2 = "[" + func + '("]';
7176
+ year = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY";
7177
+ datetime = "-MM-DD[T]HH:mm:ss.SSS";
7178
+ suffix = zone + '[")]';
7179
+ return this.format(prefix2 + year + datetime + suffix);
7180
+ }
7181
+ function format(inputString) {
7182
+ if (!inputString) {
7183
+ inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
7184
+ }
7185
+ var output = formatMoment(this, inputString);
7186
+ return this.localeData().postformat(output);
7187
+ }
7188
+ function from2(time, withoutSuffix) {
7189
+ if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
7190
+ return createDuration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix);
7191
+ } else {
7192
+ return this.localeData().invalidDate();
7193
+ }
7194
+ }
7195
+ function fromNow(withoutSuffix) {
7196
+ return this.from(createLocal(), withoutSuffix);
7197
+ }
7198
+ function to(time, withoutSuffix) {
7199
+ if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
7200
+ return createDuration({ from: this, to: time }).locale(this.locale()).humanize(!withoutSuffix);
7201
+ } else {
7202
+ return this.localeData().invalidDate();
7203
+ }
7204
+ }
7205
+ function toNow(withoutSuffix) {
7206
+ return this.to(createLocal(), withoutSuffix);
7207
+ }
7208
+ function locale(key) {
7209
+ var newLocaleData;
7210
+ if (key === void 0) {
7211
+ return this._locale._abbr;
7212
+ } else {
7213
+ newLocaleData = getLocale(key);
7214
+ if (newLocaleData != null) {
7215
+ this._locale = newLocaleData;
7216
+ }
7217
+ return this;
7218
+ }
7219
+ }
7220
+ var lang = deprecate(
7221
+ "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
7222
+ function(key) {
7223
+ if (key === void 0) {
7224
+ return this.localeData();
7225
+ } else {
7226
+ return this.locale(key);
7227
+ }
7228
+ }
7229
+ );
7230
+ function localeData() {
7231
+ return this._locale;
7232
+ }
7233
+ var MS_PER_SECOND = 1e3, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 * MS_PER_MINUTE, MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
7234
+ function mod$1(dividend, divisor) {
7235
+ return (dividend % divisor + divisor) % divisor;
7236
+ }
7237
+ function localStartOfDate(y, m, d) {
7238
+ if (y < 100 && y >= 0) {
7239
+ return new Date(y + 400, m, d) - MS_PER_400_YEARS;
7240
+ } else {
7241
+ return new Date(y, m, d).valueOf();
7242
+ }
7243
+ }
7244
+ function utcStartOfDate(y, m, d) {
7245
+ if (y < 100 && y >= 0) {
7246
+ return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
7247
+ } else {
7248
+ return Date.UTC(y, m, d);
7249
+ }
7250
+ }
7251
+ function startOf(units) {
7252
+ var time, startOfDate;
7253
+ units = normalizeUnits(units);
7254
+ if (units === void 0 || units === "millisecond" || !this.isValid()) {
7255
+ return this;
7256
+ }
7257
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
7258
+ switch (units) {
7259
+ case "year":
7260
+ time = startOfDate(this.year(), 0, 1);
7261
+ break;
7262
+ case "quarter":
7263
+ time = startOfDate(
7264
+ this.year(),
7265
+ this.month() - this.month() % 3,
7266
+ 1
7267
+ );
7268
+ break;
7269
+ case "month":
7270
+ time = startOfDate(this.year(), this.month(), 1);
7271
+ break;
7272
+ case "week":
7273
+ time = startOfDate(
7274
+ this.year(),
7275
+ this.month(),
7276
+ this.date() - this.weekday()
7277
+ );
7278
+ break;
7279
+ case "isoWeek":
7280
+ time = startOfDate(
7281
+ this.year(),
7282
+ this.month(),
7283
+ this.date() - (this.isoWeekday() - 1)
7284
+ );
7285
+ break;
7286
+ case "day":
7287
+ case "date":
7288
+ time = startOfDate(this.year(), this.month(), this.date());
7289
+ break;
7290
+ case "hour":
7291
+ time = this._d.valueOf();
7292
+ time -= mod$1(
7293
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
7294
+ MS_PER_HOUR
7295
+ );
7296
+ break;
7297
+ case "minute":
7298
+ time = this._d.valueOf();
7299
+ time -= mod$1(time, MS_PER_MINUTE);
7300
+ break;
7301
+ case "second":
7302
+ time = this._d.valueOf();
7303
+ time -= mod$1(time, MS_PER_SECOND);
7304
+ break;
7305
+ }
7306
+ this._d.setTime(time);
7307
+ hooks.updateOffset(this, true);
7308
+ return this;
7309
+ }
7310
+ function endOf(units) {
7311
+ var time, startOfDate;
7312
+ units = normalizeUnits(units);
7313
+ if (units === void 0 || units === "millisecond" || !this.isValid()) {
7314
+ return this;
7315
+ }
7316
+ startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
7317
+ switch (units) {
7318
+ case "year":
7319
+ time = startOfDate(this.year() + 1, 0, 1) - 1;
7320
+ break;
7321
+ case "quarter":
7322
+ time = startOfDate(
7323
+ this.year(),
7324
+ this.month() - this.month() % 3 + 3,
7325
+ 1
7326
+ ) - 1;
7327
+ break;
7328
+ case "month":
7329
+ time = startOfDate(this.year(), this.month() + 1, 1) - 1;
7330
+ break;
7331
+ case "week":
7332
+ time = startOfDate(
7333
+ this.year(),
7334
+ this.month(),
7335
+ this.date() - this.weekday() + 7
7336
+ ) - 1;
7337
+ break;
7338
+ case "isoWeek":
7339
+ time = startOfDate(
7340
+ this.year(),
7341
+ this.month(),
7342
+ this.date() - (this.isoWeekday() - 1) + 7
7343
+ ) - 1;
7344
+ break;
7345
+ case "day":
7346
+ case "date":
7347
+ time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
7348
+ break;
7349
+ case "hour":
7350
+ time = this._d.valueOf();
7351
+ time += MS_PER_HOUR - mod$1(
7352
+ time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
7353
+ MS_PER_HOUR
7354
+ ) - 1;
7355
+ break;
7356
+ case "minute":
7357
+ time = this._d.valueOf();
7358
+ time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
7359
+ break;
7360
+ case "second":
7361
+ time = this._d.valueOf();
7362
+ time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
7363
+ break;
7364
+ }
7365
+ this._d.setTime(time);
7366
+ hooks.updateOffset(this, true);
7367
+ return this;
7368
+ }
7369
+ function valueOf() {
7370
+ return this._d.valueOf() - (this._offset || 0) * 6e4;
7371
+ }
7372
+ function unix() {
7373
+ return Math.floor(this.valueOf() / 1e3);
7374
+ }
7375
+ function toDate() {
7376
+ return new Date(this.valueOf());
7377
+ }
7378
+ function toArray() {
7379
+ var m = this;
7380
+ return [
7381
+ m.year(),
7382
+ m.month(),
7383
+ m.date(),
7384
+ m.hour(),
7385
+ m.minute(),
7386
+ m.second(),
7387
+ m.millisecond()
7388
+ ];
7389
+ }
7390
+ function toObject() {
7391
+ var m = this;
7392
+ return {
7393
+ years: m.year(),
7394
+ months: m.month(),
7395
+ date: m.date(),
7396
+ hours: m.hours(),
7397
+ minutes: m.minutes(),
7398
+ seconds: m.seconds(),
7399
+ milliseconds: m.milliseconds()
7400
+ };
7401
+ }
7402
+ function toJSON() {
7403
+ return this.isValid() ? this.toISOString() : null;
7404
+ }
7405
+ function isValid$2() {
7406
+ return isValid(this);
7407
+ }
7408
+ function parsingFlags() {
7409
+ return extend({}, getParsingFlags(this));
7410
+ }
7411
+ function invalidAt() {
7412
+ return getParsingFlags(this).overflow;
7413
+ }
7414
+ function creationData() {
7415
+ return {
7416
+ input: this._i,
7417
+ format: this._f,
7418
+ locale: this._locale,
7419
+ isUTC: this._isUTC,
7420
+ strict: this._strict
7421
+ };
7422
+ }
7423
+ addFormatToken("N", 0, 0, "eraAbbr");
7424
+ addFormatToken("NN", 0, 0, "eraAbbr");
7425
+ addFormatToken("NNN", 0, 0, "eraAbbr");
7426
+ addFormatToken("NNNN", 0, 0, "eraName");
7427
+ addFormatToken("NNNNN", 0, 0, "eraNarrow");
7428
+ addFormatToken("y", ["y", 1], "yo", "eraYear");
7429
+ addFormatToken("y", ["yy", 2], 0, "eraYear");
7430
+ addFormatToken("y", ["yyy", 3], 0, "eraYear");
7431
+ addFormatToken("y", ["yyyy", 4], 0, "eraYear");
7432
+ addRegexToken("N", matchEraAbbr);
7433
+ addRegexToken("NN", matchEraAbbr);
7434
+ addRegexToken("NNN", matchEraAbbr);
7435
+ addRegexToken("NNNN", matchEraName);
7436
+ addRegexToken("NNNNN", matchEraNarrow);
7437
+ addParseToken(
7438
+ ["N", "NN", "NNN", "NNNN", "NNNNN"],
7439
+ function(input, array, config, token3) {
7440
+ var era = config._locale.erasParse(input, token3, config._strict);
7441
+ if (era) {
7442
+ getParsingFlags(config).era = era;
7443
+ } else {
7444
+ getParsingFlags(config).invalidEra = input;
7445
+ }
7446
+ }
7447
+ );
7448
+ addRegexToken("y", matchUnsigned);
7449
+ addRegexToken("yy", matchUnsigned);
7450
+ addRegexToken("yyy", matchUnsigned);
7451
+ addRegexToken("yyyy", matchUnsigned);
7452
+ addRegexToken("yo", matchEraYearOrdinal);
7453
+ addParseToken(["y", "yy", "yyy", "yyyy"], YEAR);
7454
+ addParseToken(["yo"], function(input, array, config, token3) {
7455
+ var match5;
7456
+ if (config._locale._eraYearOrdinalRegex) {
7457
+ match5 = input.match(config._locale._eraYearOrdinalRegex);
7458
+ }
7459
+ if (config._locale.eraYearOrdinalParse) {
7460
+ array[YEAR] = config._locale.eraYearOrdinalParse(input, match5);
7461
+ } else {
7462
+ array[YEAR] = parseInt(input, 10);
7463
+ }
7464
+ });
7465
+ function localeEras(m, format2) {
7466
+ var i, l, date, eras = this._eras || getLocale("en")._eras;
7467
+ for (i = 0, l = eras.length; i < l; ++i) {
7468
+ switch (typeof eras[i].since) {
7469
+ case "string":
7470
+ date = hooks(eras[i].since).startOf("day");
7471
+ eras[i].since = date.valueOf();
7472
+ break;
7473
+ }
7474
+ switch (typeof eras[i].until) {
7475
+ case "undefined":
7476
+ eras[i].until = Infinity;
7477
+ break;
7478
+ case "string":
7479
+ date = hooks(eras[i].until).startOf("day").valueOf();
7480
+ eras[i].until = date.valueOf();
7481
+ break;
7482
+ }
7483
+ }
7484
+ return eras;
7485
+ }
7486
+ function localeErasParse(eraName, format2, strict) {
7487
+ var i, l, eras = this.eras(), name, abbr, narrow;
7488
+ eraName = eraName.toUpperCase();
7489
+ for (i = 0, l = eras.length; i < l; ++i) {
7490
+ name = eras[i].name.toUpperCase();
7491
+ abbr = eras[i].abbr.toUpperCase();
7492
+ narrow = eras[i].narrow.toUpperCase();
7493
+ if (strict) {
7494
+ switch (format2) {
7495
+ case "N":
7496
+ case "NN":
7497
+ case "NNN":
7498
+ if (abbr === eraName) {
7499
+ return eras[i];
7500
+ }
7501
+ break;
7502
+ case "NNNN":
7503
+ if (name === eraName) {
7504
+ return eras[i];
7505
+ }
7506
+ break;
7507
+ case "NNNNN":
7508
+ if (narrow === eraName) {
7509
+ return eras[i];
7510
+ }
7511
+ break;
7512
+ }
7513
+ } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
7514
+ return eras[i];
7515
+ }
7516
+ }
7517
+ }
7518
+ function localeErasConvertYear(era, year) {
7519
+ var dir = era.since <= era.until ? 1 : -1;
7520
+ if (year === void 0) {
7521
+ return hooks(era.since).year();
7522
+ } else {
7523
+ return hooks(era.since).year() + (year - era.offset) * dir;
7524
+ }
7525
+ }
7526
+ function getEraName() {
7527
+ var i, l, val, eras = this.localeData().eras();
7528
+ for (i = 0, l = eras.length; i < l; ++i) {
7529
+ val = this.clone().startOf("day").valueOf();
7530
+ if (eras[i].since <= val && val <= eras[i].until) {
7531
+ return eras[i].name;
7532
+ }
7533
+ if (eras[i].until <= val && val <= eras[i].since) {
7534
+ return eras[i].name;
7535
+ }
7536
+ }
7537
+ return "";
7538
+ }
7539
+ function getEraNarrow() {
7540
+ var i, l, val, eras = this.localeData().eras();
7541
+ for (i = 0, l = eras.length; i < l; ++i) {
7542
+ val = this.clone().startOf("day").valueOf();
7543
+ if (eras[i].since <= val && val <= eras[i].until) {
7544
+ return eras[i].narrow;
7545
+ }
7546
+ if (eras[i].until <= val && val <= eras[i].since) {
7547
+ return eras[i].narrow;
7548
+ }
7549
+ }
7550
+ return "";
7551
+ }
7552
+ function getEraAbbr() {
7553
+ var i, l, val, eras = this.localeData().eras();
7554
+ for (i = 0, l = eras.length; i < l; ++i) {
7555
+ val = this.clone().startOf("day").valueOf();
7556
+ if (eras[i].since <= val && val <= eras[i].until) {
7557
+ return eras[i].abbr;
7558
+ }
7559
+ if (eras[i].until <= val && val <= eras[i].since) {
7560
+ return eras[i].abbr;
7561
+ }
7562
+ }
7563
+ return "";
7564
+ }
7565
+ function getEraYear() {
7566
+ var i, l, dir, val, eras = this.localeData().eras();
7567
+ for (i = 0, l = eras.length; i < l; ++i) {
7568
+ dir = eras[i].since <= eras[i].until ? 1 : -1;
7569
+ val = this.clone().startOf("day").valueOf();
7570
+ if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) {
7571
+ return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset;
7572
+ }
7573
+ }
7574
+ return this.year();
7575
+ }
7576
+ function erasNameRegex(isStrict) {
7577
+ if (!hasOwnProp(this, "_erasNameRegex")) {
7578
+ computeErasParse.call(this);
7579
+ }
7580
+ return isStrict ? this._erasNameRegex : this._erasRegex;
7581
+ }
7582
+ function erasAbbrRegex(isStrict) {
7583
+ if (!hasOwnProp(this, "_erasAbbrRegex")) {
7584
+ computeErasParse.call(this);
7585
+ }
7586
+ return isStrict ? this._erasAbbrRegex : this._erasRegex;
7587
+ }
7588
+ function erasNarrowRegex(isStrict) {
7589
+ if (!hasOwnProp(this, "_erasNarrowRegex")) {
7590
+ computeErasParse.call(this);
7591
+ }
7592
+ return isStrict ? this._erasNarrowRegex : this._erasRegex;
7593
+ }
7594
+ function matchEraAbbr(isStrict, locale2) {
7595
+ return locale2.erasAbbrRegex(isStrict);
7596
+ }
7597
+ function matchEraName(isStrict, locale2) {
7598
+ return locale2.erasNameRegex(isStrict);
7599
+ }
7600
+ function matchEraNarrow(isStrict, locale2) {
7601
+ return locale2.erasNarrowRegex(isStrict);
7602
+ }
7603
+ function matchEraYearOrdinal(isStrict, locale2) {
7604
+ return locale2._eraYearOrdinalRegex || matchUnsigned;
7605
+ }
7606
+ function computeErasParse() {
7607
+ var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i, l, eras = this.eras();
7608
+ for (i = 0, l = eras.length; i < l; ++i) {
7609
+ namePieces.push(regexEscape(eras[i].name));
7610
+ abbrPieces.push(regexEscape(eras[i].abbr));
7611
+ narrowPieces.push(regexEscape(eras[i].narrow));
7612
+ mixedPieces.push(regexEscape(eras[i].name));
7613
+ mixedPieces.push(regexEscape(eras[i].abbr));
7614
+ mixedPieces.push(regexEscape(eras[i].narrow));
7615
+ }
7616
+ this._erasRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
7617
+ this._erasNameRegex = new RegExp("^(" + namePieces.join("|") + ")", "i");
7618
+ this._erasAbbrRegex = new RegExp("^(" + abbrPieces.join("|") + ")", "i");
7619
+ this._erasNarrowRegex = new RegExp(
7620
+ "^(" + narrowPieces.join("|") + ")",
7621
+ "i"
7622
+ );
7623
+ }
7624
+ addFormatToken(0, ["gg", 2], 0, function() {
7625
+ return this.weekYear() % 100;
7626
+ });
7627
+ addFormatToken(0, ["GG", 2], 0, function() {
7628
+ return this.isoWeekYear() % 100;
7629
+ });
7630
+ function addWeekYearFormatToken(token3, getter) {
7631
+ addFormatToken(0, [token3, token3.length], 0, getter);
7632
+ }
7633
+ addWeekYearFormatToken("gggg", "weekYear");
7634
+ addWeekYearFormatToken("ggggg", "weekYear");
7635
+ addWeekYearFormatToken("GGGG", "isoWeekYear");
7636
+ addWeekYearFormatToken("GGGGG", "isoWeekYear");
7637
+ addUnitAlias("weekYear", "gg");
7638
+ addUnitAlias("isoWeekYear", "GG");
7639
+ addUnitPriority("weekYear", 1);
7640
+ addUnitPriority("isoWeekYear", 1);
7641
+ addRegexToken("G", matchSigned);
7642
+ addRegexToken("g", matchSigned);
7643
+ addRegexToken("GG", match1to2, match2);
7644
+ addRegexToken("gg", match1to2, match2);
7645
+ addRegexToken("GGGG", match1to4, match4);
7646
+ addRegexToken("gggg", match1to4, match4);
7647
+ addRegexToken("GGGGG", match1to6, match6);
7648
+ addRegexToken("ggggg", match1to6, match6);
7649
+ addWeekParseToken(
7650
+ ["gggg", "ggggg", "GGGG", "GGGGG"],
7651
+ function(input, week, config, token3) {
7652
+ week[token3.substr(0, 2)] = toInt(input);
7653
+ }
7654
+ );
7655
+ addWeekParseToken(["gg", "GG"], function(input, week, config, token3) {
7656
+ week[token3] = hooks.parseTwoDigitYear(input);
7657
+ });
7658
+ function getSetWeekYear(input) {
7659
+ return getSetWeekYearHelper.call(
7660
+ this,
7661
+ input,
7662
+ this.week(),
7663
+ this.weekday(),
7664
+ this.localeData()._week.dow,
7665
+ this.localeData()._week.doy
7666
+ );
7667
+ }
7668
+ function getSetISOWeekYear(input) {
7669
+ return getSetWeekYearHelper.call(
7670
+ this,
7671
+ input,
7672
+ this.isoWeek(),
7673
+ this.isoWeekday(),
7674
+ 1,
7675
+ 4
7676
+ );
7677
+ }
7678
+ function getISOWeeksInYear() {
7679
+ return weeksInYear(this.year(), 1, 4);
7680
+ }
7681
+ function getISOWeeksInISOWeekYear() {
7682
+ return weeksInYear(this.isoWeekYear(), 1, 4);
7683
+ }
7684
+ function getWeeksInYear() {
7685
+ var weekInfo = this.localeData()._week;
7686
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
7687
+ }
7688
+ function getWeeksInWeekYear() {
7689
+ var weekInfo = this.localeData()._week;
7690
+ return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
7691
+ }
7692
+ function getSetWeekYearHelper(input, week, weekday, dow, doy) {
7693
+ var weeksTarget;
7694
+ if (input == null) {
7695
+ return weekOfYear(this, dow, doy).year;
7696
+ } else {
7697
+ weeksTarget = weeksInYear(input, dow, doy);
7698
+ if (week > weeksTarget) {
7699
+ week = weeksTarget;
7700
+ }
7701
+ return setWeekAll.call(this, input, week, weekday, dow, doy);
7702
+ }
7703
+ }
7704
+ function setWeekAll(weekYear, week, weekday, dow, doy) {
7705
+ var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
7706
+ this.year(date.getUTCFullYear());
7707
+ this.month(date.getUTCMonth());
7708
+ this.date(date.getUTCDate());
7709
+ return this;
7710
+ }
7711
+ addFormatToken("Q", 0, "Qo", "quarter");
7712
+ addUnitAlias("quarter", "Q");
7713
+ addUnitPriority("quarter", 7);
7714
+ addRegexToken("Q", match1);
7715
+ addParseToken("Q", function(input, array) {
7716
+ array[MONTH] = (toInt(input) - 1) * 3;
7717
+ });
7718
+ function getSetQuarter(input) {
7719
+ return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
7720
+ }
7721
+ addFormatToken("D", ["DD", 2], "Do", "date");
7722
+ addUnitAlias("date", "D");
7723
+ addUnitPriority("date", 9);
7724
+ addRegexToken("D", match1to2);
7725
+ addRegexToken("DD", match1to2, match2);
7726
+ addRegexToken("Do", function(isStrict, locale2) {
7727
+ return isStrict ? locale2._dayOfMonthOrdinalParse || locale2._ordinalParse : locale2._dayOfMonthOrdinalParseLenient;
7728
+ });
7729
+ addParseToken(["D", "DD"], DATE);
7730
+ addParseToken("Do", function(input, array) {
7731
+ array[DATE] = toInt(input.match(match1to2)[0]);
7732
+ });
7733
+ var getSetDayOfMonth = makeGetSet("Date", true);
7734
+ addFormatToken("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
7735
+ addUnitAlias("dayOfYear", "DDD");
7736
+ addUnitPriority("dayOfYear", 4);
7737
+ addRegexToken("DDD", match1to3);
7738
+ addRegexToken("DDDD", match3);
7739
+ addParseToken(["DDD", "DDDD"], function(input, array, config) {
7740
+ config._dayOfYear = toInt(input);
7741
+ });
7742
+ function getSetDayOfYear(input) {
7743
+ var dayOfYear = Math.round(
7744
+ (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
7745
+ ) + 1;
7746
+ return input == null ? dayOfYear : this.add(input - dayOfYear, "d");
7747
+ }
7748
+ addFormatToken("m", ["mm", 2], 0, "minute");
7749
+ addUnitAlias("minute", "m");
7750
+ addUnitPriority("minute", 14);
7751
+ addRegexToken("m", match1to2);
7752
+ addRegexToken("mm", match1to2, match2);
7753
+ addParseToken(["m", "mm"], MINUTE);
7754
+ var getSetMinute = makeGetSet("Minutes", false);
7755
+ addFormatToken("s", ["ss", 2], 0, "second");
7756
+ addUnitAlias("second", "s");
7757
+ addUnitPriority("second", 15);
7758
+ addRegexToken("s", match1to2);
7759
+ addRegexToken("ss", match1to2, match2);
7760
+ addParseToken(["s", "ss"], SECOND);
7761
+ var getSetSecond = makeGetSet("Seconds", false);
7762
+ addFormatToken("S", 0, 0, function() {
7763
+ return ~~(this.millisecond() / 100);
7764
+ });
7765
+ addFormatToken(0, ["SS", 2], 0, function() {
7766
+ return ~~(this.millisecond() / 10);
7767
+ });
7768
+ addFormatToken(0, ["SSS", 3], 0, "millisecond");
7769
+ addFormatToken(0, ["SSSS", 4], 0, function() {
7770
+ return this.millisecond() * 10;
7771
+ });
7772
+ addFormatToken(0, ["SSSSS", 5], 0, function() {
7773
+ return this.millisecond() * 100;
7774
+ });
7775
+ addFormatToken(0, ["SSSSSS", 6], 0, function() {
7776
+ return this.millisecond() * 1e3;
7777
+ });
7778
+ addFormatToken(0, ["SSSSSSS", 7], 0, function() {
7779
+ return this.millisecond() * 1e4;
7780
+ });
7781
+ addFormatToken(0, ["SSSSSSSS", 8], 0, function() {
7782
+ return this.millisecond() * 1e5;
7783
+ });
7784
+ addFormatToken(0, ["SSSSSSSSS", 9], 0, function() {
7785
+ return this.millisecond() * 1e6;
7786
+ });
7787
+ addUnitAlias("millisecond", "ms");
7788
+ addUnitPriority("millisecond", 16);
7789
+ addRegexToken("S", match1to3, match1);
7790
+ addRegexToken("SS", match1to3, match2);
7791
+ addRegexToken("SSS", match1to3, match3);
7792
+ var token2, getSetMillisecond;
7793
+ for (token2 = "SSSS"; token2.length <= 9; token2 += "S") {
7794
+ addRegexToken(token2, matchUnsigned);
7795
+ }
7796
+ function parseMs(input, array) {
7797
+ array[MILLISECOND] = toInt(("0." + input) * 1e3);
7798
+ }
7799
+ for (token2 = "S"; token2.length <= 9; token2 += "S") {
7800
+ addParseToken(token2, parseMs);
7801
+ }
7802
+ getSetMillisecond = makeGetSet("Milliseconds", false);
7803
+ addFormatToken("z", 0, 0, "zoneAbbr");
7804
+ addFormatToken("zz", 0, 0, "zoneName");
7805
+ function getZoneAbbr() {
7806
+ return this._isUTC ? "UTC" : "";
7807
+ }
7808
+ function getZoneName() {
7809
+ return this._isUTC ? "Coordinated Universal Time" : "";
7810
+ }
7811
+ var proto = Moment.prototype;
7812
+ proto.add = add;
7813
+ proto.calendar = calendar$1;
7814
+ proto.clone = clone;
7815
+ proto.diff = diff4;
7816
+ proto.endOf = endOf;
7817
+ proto.format = format;
7818
+ proto.from = from2;
7819
+ proto.fromNow = fromNow;
7820
+ proto.to = to;
7821
+ proto.toNow = toNow;
7822
+ proto.get = stringGet;
7823
+ proto.invalidAt = invalidAt;
7824
+ proto.isAfter = isAfter;
7825
+ proto.isBefore = isBefore;
7826
+ proto.isBetween = isBetween;
7827
+ proto.isSame = isSame;
7828
+ proto.isSameOrAfter = isSameOrAfter;
7829
+ proto.isSameOrBefore = isSameOrBefore;
7830
+ proto.isValid = isValid$2;
7831
+ proto.lang = lang;
7832
+ proto.locale = locale;
7833
+ proto.localeData = localeData;
7834
+ proto.max = prototypeMax;
7835
+ proto.min = prototypeMin;
7836
+ proto.parsingFlags = parsingFlags;
7837
+ proto.set = stringSet;
7838
+ proto.startOf = startOf;
7839
+ proto.subtract = subtract;
7840
+ proto.toArray = toArray;
7841
+ proto.toObject = toObject;
7842
+ proto.toDate = toDate;
7843
+ proto.toISOString = toISOString;
7844
+ proto.inspect = inspect;
7845
+ if (typeof Symbol !== "undefined" && Symbol.for != null) {
7846
+ proto[Symbol.for("nodejs.util.inspect.custom")] = function() {
7847
+ return "Moment<" + this.format() + ">";
7848
+ };
7849
+ }
7850
+ proto.toJSON = toJSON;
7851
+ proto.toString = toString;
7852
+ proto.unix = unix;
7853
+ proto.valueOf = valueOf;
7854
+ proto.creationData = creationData;
7855
+ proto.eraName = getEraName;
7856
+ proto.eraNarrow = getEraNarrow;
7857
+ proto.eraAbbr = getEraAbbr;
7858
+ proto.eraYear = getEraYear;
7859
+ proto.year = getSetYear;
7860
+ proto.isLeapYear = getIsLeapYear;
7861
+ proto.weekYear = getSetWeekYear;
7862
+ proto.isoWeekYear = getSetISOWeekYear;
7863
+ proto.quarter = proto.quarters = getSetQuarter;
7864
+ proto.month = getSetMonth;
7865
+ proto.daysInMonth = getDaysInMonth;
7866
+ proto.week = proto.weeks = getSetWeek;
7867
+ proto.isoWeek = proto.isoWeeks = getSetISOWeek;
7868
+ proto.weeksInYear = getWeeksInYear;
7869
+ proto.weeksInWeekYear = getWeeksInWeekYear;
7870
+ proto.isoWeeksInYear = getISOWeeksInYear;
7871
+ proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
7872
+ proto.date = getSetDayOfMonth;
7873
+ proto.day = proto.days = getSetDayOfWeek;
7874
+ proto.weekday = getSetLocaleDayOfWeek;
7875
+ proto.isoWeekday = getSetISODayOfWeek;
7876
+ proto.dayOfYear = getSetDayOfYear;
7877
+ proto.hour = proto.hours = getSetHour;
7878
+ proto.minute = proto.minutes = getSetMinute;
7879
+ proto.second = proto.seconds = getSetSecond;
7880
+ proto.millisecond = proto.milliseconds = getSetMillisecond;
7881
+ proto.utcOffset = getSetOffset;
7882
+ proto.utc = setOffsetToUTC;
7883
+ proto.local = setOffsetToLocal;
7884
+ proto.parseZone = setOffsetToParsedOffset;
7885
+ proto.hasAlignedHourOffset = hasAlignedHourOffset;
7886
+ proto.isDST = isDaylightSavingTime;
7887
+ proto.isLocal = isLocal;
7888
+ proto.isUtcOffset = isUtcOffset;
7889
+ proto.isUtc = isUtc;
7890
+ proto.isUTC = isUtc;
7891
+ proto.zoneAbbr = getZoneAbbr;
7892
+ proto.zoneName = getZoneName;
7893
+ proto.dates = deprecate(
7894
+ "dates accessor is deprecated. Use date instead.",
7895
+ getSetDayOfMonth
7896
+ );
7897
+ proto.months = deprecate(
7898
+ "months accessor is deprecated. Use month instead",
7899
+ getSetMonth
7900
+ );
7901
+ proto.years = deprecate(
7902
+ "years accessor is deprecated. Use year instead",
7903
+ getSetYear
7904
+ );
7905
+ proto.zone = deprecate(
7906
+ "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
7907
+ getSetZone
7908
+ );
7909
+ proto.isDSTShifted = deprecate(
7910
+ "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
7911
+ isDaylightSavingTimeShifted
7912
+ );
7913
+ function createUnix(input) {
7914
+ return createLocal(input * 1e3);
7915
+ }
7916
+ function createInZone() {
7917
+ return createLocal.apply(null, arguments).parseZone();
7918
+ }
7919
+ function preParsePostFormat(string) {
7920
+ return string;
7921
+ }
7922
+ var proto$1 = Locale.prototype;
7923
+ proto$1.calendar = calendar2;
7924
+ proto$1.longDateFormat = longDateFormat;
7925
+ proto$1.invalidDate = invalidDate;
7926
+ proto$1.ordinal = ordinal;
7927
+ proto$1.preparse = preParsePostFormat;
7928
+ proto$1.postformat = preParsePostFormat;
7929
+ proto$1.relativeTime = relativeTime;
7930
+ proto$1.pastFuture = pastFuture;
7931
+ proto$1.set = set2;
7932
+ proto$1.eras = localeEras;
7933
+ proto$1.erasParse = localeErasParse;
7934
+ proto$1.erasConvertYear = localeErasConvertYear;
7935
+ proto$1.erasAbbrRegex = erasAbbrRegex;
7936
+ proto$1.erasNameRegex = erasNameRegex;
7937
+ proto$1.erasNarrowRegex = erasNarrowRegex;
7938
+ proto$1.months = localeMonths;
7939
+ proto$1.monthsShort = localeMonthsShort;
7940
+ proto$1.monthsParse = localeMonthsParse;
7941
+ proto$1.monthsRegex = monthsRegex;
7942
+ proto$1.monthsShortRegex = monthsShortRegex;
7943
+ proto$1.week = localeWeek;
7944
+ proto$1.firstDayOfYear = localeFirstDayOfYear;
7945
+ proto$1.firstDayOfWeek = localeFirstDayOfWeek;
7946
+ proto$1.weekdays = localeWeekdays;
7947
+ proto$1.weekdaysMin = localeWeekdaysMin;
7948
+ proto$1.weekdaysShort = localeWeekdaysShort;
7949
+ proto$1.weekdaysParse = localeWeekdaysParse;
7950
+ proto$1.weekdaysRegex = weekdaysRegex;
7951
+ proto$1.weekdaysShortRegex = weekdaysShortRegex;
7952
+ proto$1.weekdaysMinRegex = weekdaysMinRegex;
7953
+ proto$1.isPM = localeIsPM;
7954
+ proto$1.meridiem = localeMeridiem;
7955
+ function get$1(format2, index, field, setter) {
7956
+ var locale2 = getLocale(), utc = createUTC().set(setter, index);
7957
+ return locale2[field](utc, format2);
7958
+ }
7959
+ function listMonthsImpl(format2, index, field) {
7960
+ if (isNumber(format2)) {
7961
+ index = format2;
7962
+ format2 = void 0;
7963
+ }
7964
+ format2 = format2 || "";
7965
+ if (index != null) {
7966
+ return get$1(format2, index, field, "month");
7967
+ }
7968
+ var i, out = [];
7969
+ for (i = 0; i < 12; i++) {
7970
+ out[i] = get$1(format2, i, field, "month");
7971
+ }
7972
+ return out;
7973
+ }
7974
+ function listWeekdaysImpl(localeSorted, format2, index, field) {
7975
+ if (typeof localeSorted === "boolean") {
7976
+ if (isNumber(format2)) {
7977
+ index = format2;
7978
+ format2 = void 0;
7979
+ }
7980
+ format2 = format2 || "";
7981
+ } else {
7982
+ format2 = localeSorted;
7983
+ index = format2;
7984
+ localeSorted = false;
7985
+ if (isNumber(format2)) {
7986
+ index = format2;
7987
+ format2 = void 0;
7988
+ }
7989
+ format2 = format2 || "";
7990
+ }
7991
+ var locale2 = getLocale(), shift = localeSorted ? locale2._week.dow : 0, i, out = [];
7992
+ if (index != null) {
7993
+ return get$1(format2, (index + shift) % 7, field, "day");
7994
+ }
7995
+ for (i = 0; i < 7; i++) {
7996
+ out[i] = get$1(format2, (i + shift) % 7, field, "day");
7997
+ }
7998
+ return out;
7999
+ }
8000
+ function listMonths(format2, index) {
8001
+ return listMonthsImpl(format2, index, "months");
4383
8002
  }
4384
- if ((0, import_utils16.is)(state)("string", "number")) {
4385
- ref.__state = state;
4386
- return {};
8003
+ function listMonthsShort(format2, index) {
8004
+ return listMonthsImpl(format2, index, "monthsShort");
4387
8005
  }
4388
- if (state === true) {
4389
- ref.__state = element.key;
4390
- return {};
8006
+ function listWeekdays(localeSorted, format2, index) {
8007
+ return listWeekdaysImpl(localeSorted, format2, index, "weekdays");
4391
8008
  }
4392
- if (state) {
4393
- ref.__hasRootState = true;
4394
- return state;
8009
+ function listWeekdaysShort(localeSorted, format2, index) {
8010
+ return listWeekdaysImpl(localeSorted, format2, index, "weekdaysShort");
4395
8011
  }
4396
- return false;
4397
- };
4398
- var applyMethods = (element) => {
4399
- const state = element.state;
4400
- const ref = element.__ref;
4401
- state.clean = import_methods.clean;
4402
- state.parse = import_methods.parse;
4403
- state.destroy = import_methods.destroy;
4404
- state.update = import_updateState.updateState;
4405
- state.rootUpdate = import_methods.rootUpdate;
4406
- state.parentUpdate = import_methods.parentUpdate;
4407
- state.create = createState;
4408
- state.add = import_methods.add;
4409
- state.toggle = import_methods.toggle;
4410
- state.remove = import_methods.remove;
4411
- state.apply = import_methods.apply;
4412
- state.parent = element.parent.state;
4413
- state.set = import_methods.set;
4414
- state.__element = element;
4415
- state.__children = {};
4416
- state.__root = ref.__root ? ref.__root.state : state;
4417
- if (state.parent)
4418
- state.parent.__children[element.key] = state;
4419
- };
8012
+ function listWeekdaysMin(localeSorted, format2, index) {
8013
+ return listWeekdaysImpl(localeSorted, format2, index, "weekdaysMin");
8014
+ }
8015
+ getSetGlobalLocale("en", {
8016
+ eras: [
8017
+ {
8018
+ since: "0001-01-01",
8019
+ until: Infinity,
8020
+ offset: 1,
8021
+ name: "Anno Domini",
8022
+ narrow: "AD",
8023
+ abbr: "AD"
8024
+ },
8025
+ {
8026
+ since: "0000-12-31",
8027
+ until: -Infinity,
8028
+ offset: 1,
8029
+ name: "Before Christ",
8030
+ narrow: "BC",
8031
+ abbr: "BC"
8032
+ }
8033
+ ],
8034
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
8035
+ ordinal: function(number) {
8036
+ var b = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b === 1 ? "st" : b === 2 ? "nd" : b === 3 ? "rd" : "th";
8037
+ return number + output;
8038
+ }
8039
+ });
8040
+ hooks.lang = deprecate(
8041
+ "moment.lang is deprecated. Use moment.locale instead.",
8042
+ getSetGlobalLocale
8043
+ );
8044
+ hooks.langData = deprecate(
8045
+ "moment.langData is deprecated. Use moment.localeData instead.",
8046
+ getLocale
8047
+ );
8048
+ var mathAbs = Math.abs;
8049
+ function abs2() {
8050
+ var data = this._data;
8051
+ this._milliseconds = mathAbs(this._milliseconds);
8052
+ this._days = mathAbs(this._days);
8053
+ this._months = mathAbs(this._months);
8054
+ data.milliseconds = mathAbs(data.milliseconds);
8055
+ data.seconds = mathAbs(data.seconds);
8056
+ data.minutes = mathAbs(data.minutes);
8057
+ data.hours = mathAbs(data.hours);
8058
+ data.months = mathAbs(data.months);
8059
+ data.years = mathAbs(data.years);
8060
+ return this;
8061
+ }
8062
+ function addSubtract$1(duration, input, value, direction) {
8063
+ var other = createDuration(input, value);
8064
+ duration._milliseconds += direction * other._milliseconds;
8065
+ duration._days += direction * other._days;
8066
+ duration._months += direction * other._months;
8067
+ return duration._bubble();
8068
+ }
8069
+ function add$1(input, value) {
8070
+ return addSubtract$1(this, input, value, 1);
8071
+ }
8072
+ function subtract$1(input, value) {
8073
+ return addSubtract$1(this, input, value, -1);
8074
+ }
8075
+ function absCeil(number) {
8076
+ if (number < 0) {
8077
+ return Math.floor(number);
8078
+ } else {
8079
+ return Math.ceil(number);
8080
+ }
8081
+ }
8082
+ function bubble() {
8083
+ var milliseconds2 = this._milliseconds, days2 = this._days, months2 = this._months, data = this._data, seconds2, minutes2, hours2, years2, monthsFromDays;
8084
+ if (!(milliseconds2 >= 0 && days2 >= 0 && months2 >= 0 || milliseconds2 <= 0 && days2 <= 0 && months2 <= 0)) {
8085
+ milliseconds2 += absCeil(monthsToDays(months2) + days2) * 864e5;
8086
+ days2 = 0;
8087
+ months2 = 0;
8088
+ }
8089
+ data.milliseconds = milliseconds2 % 1e3;
8090
+ seconds2 = absFloor(milliseconds2 / 1e3);
8091
+ data.seconds = seconds2 % 60;
8092
+ minutes2 = absFloor(seconds2 / 60);
8093
+ data.minutes = minutes2 % 60;
8094
+ hours2 = absFloor(minutes2 / 60);
8095
+ data.hours = hours2 % 24;
8096
+ days2 += absFloor(hours2 / 24);
8097
+ monthsFromDays = absFloor(daysToMonths(days2));
8098
+ months2 += monthsFromDays;
8099
+ days2 -= absCeil(monthsToDays(monthsFromDays));
8100
+ years2 = absFloor(months2 / 12);
8101
+ months2 %= 12;
8102
+ data.days = days2;
8103
+ data.months = months2;
8104
+ data.years = years2;
8105
+ return this;
8106
+ }
8107
+ function daysToMonths(days2) {
8108
+ return days2 * 4800 / 146097;
8109
+ }
8110
+ function monthsToDays(months2) {
8111
+ return months2 * 146097 / 4800;
8112
+ }
8113
+ function as(units) {
8114
+ if (!this.isValid()) {
8115
+ return NaN;
8116
+ }
8117
+ var days2, months2, milliseconds2 = this._milliseconds;
8118
+ units = normalizeUnits(units);
8119
+ if (units === "month" || units === "quarter" || units === "year") {
8120
+ days2 = this._days + milliseconds2 / 864e5;
8121
+ months2 = this._months + daysToMonths(days2);
8122
+ switch (units) {
8123
+ case "month":
8124
+ return months2;
8125
+ case "quarter":
8126
+ return months2 / 3;
8127
+ case "year":
8128
+ return months2 / 12;
8129
+ }
8130
+ } else {
8131
+ days2 = this._days + Math.round(monthsToDays(this._months));
8132
+ switch (units) {
8133
+ case "week":
8134
+ return days2 / 7 + milliseconds2 / 6048e5;
8135
+ case "day":
8136
+ return days2 + milliseconds2 / 864e5;
8137
+ case "hour":
8138
+ return days2 * 24 + milliseconds2 / 36e5;
8139
+ case "minute":
8140
+ return days2 * 1440 + milliseconds2 / 6e4;
8141
+ case "second":
8142
+ return days2 * 86400 + milliseconds2 / 1e3;
8143
+ case "millisecond":
8144
+ return Math.floor(days2 * 864e5) + milliseconds2;
8145
+ default:
8146
+ throw new Error("Unknown unit " + units);
8147
+ }
8148
+ }
8149
+ }
8150
+ function valueOf$1() {
8151
+ if (!this.isValid()) {
8152
+ return NaN;
8153
+ }
8154
+ return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;
8155
+ }
8156
+ function makeAs(alias) {
8157
+ return function() {
8158
+ return this.as(alias);
8159
+ };
8160
+ }
8161
+ var asMilliseconds = makeAs("ms"), asSeconds = makeAs("s"), asMinutes = makeAs("m"), asHours = makeAs("h"), asDays = makeAs("d"), asWeeks = makeAs("w"), asMonths = makeAs("M"), asQuarters = makeAs("Q"), asYears = makeAs("y");
8162
+ function clone$1() {
8163
+ return createDuration(this);
8164
+ }
8165
+ function get$2(units) {
8166
+ units = normalizeUnits(units);
8167
+ return this.isValid() ? this[units + "s"]() : NaN;
8168
+ }
8169
+ function makeGetter(name) {
8170
+ return function() {
8171
+ return this.isValid() ? this._data[name] : NaN;
8172
+ };
8173
+ }
8174
+ var milliseconds = makeGetter("milliseconds"), seconds = makeGetter("seconds"), minutes = makeGetter("minutes"), hours = makeGetter("hours"), days = makeGetter("days"), months = makeGetter("months"), years = makeGetter("years");
8175
+ function weeks() {
8176
+ return absFloor(this.days() / 7);
8177
+ }
8178
+ var round = Math.round, thresholds = {
8179
+ ss: 44,
8180
+ // a few seconds to seconds
8181
+ s: 45,
8182
+ // seconds to minute
8183
+ m: 45,
8184
+ // minutes to hour
8185
+ h: 22,
8186
+ // hours to day
8187
+ d: 26,
8188
+ // days to month/week
8189
+ w: null,
8190
+ // weeks to month
8191
+ M: 11
8192
+ // months to year
8193
+ };
8194
+ function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale2) {
8195
+ return locale2.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
8196
+ }
8197
+ function relativeTime$1(posNegDuration, withoutSuffix, thresholds2, locale2) {
8198
+ var duration = createDuration(posNegDuration).abs(), seconds2 = round(duration.as("s")), minutes2 = round(duration.as("m")), hours2 = round(duration.as("h")), days2 = round(duration.as("d")), months2 = round(duration.as("M")), weeks2 = round(duration.as("w")), years2 = round(duration.as("y")), a = seconds2 <= thresholds2.ss && ["s", seconds2] || seconds2 < thresholds2.s && ["ss", seconds2] || minutes2 <= 1 && ["m"] || minutes2 < thresholds2.m && ["mm", minutes2] || hours2 <= 1 && ["h"] || hours2 < thresholds2.h && ["hh", hours2] || days2 <= 1 && ["d"] || days2 < thresholds2.d && ["dd", days2];
8199
+ if (thresholds2.w != null) {
8200
+ a = a || weeks2 <= 1 && ["w"] || weeks2 < thresholds2.w && ["ww", weeks2];
8201
+ }
8202
+ a = a || months2 <= 1 && ["M"] || months2 < thresholds2.M && ["MM", months2] || years2 <= 1 && ["y"] || ["yy", years2];
8203
+ a[2] = withoutSuffix;
8204
+ a[3] = +posNegDuration > 0;
8205
+ a[4] = locale2;
8206
+ return substituteTimeAgo.apply(null, a);
8207
+ }
8208
+ function getSetRelativeTimeRounding(roundingFunction) {
8209
+ if (roundingFunction === void 0) {
8210
+ return round;
8211
+ }
8212
+ if (typeof roundingFunction === "function") {
8213
+ round = roundingFunction;
8214
+ return true;
8215
+ }
8216
+ return false;
8217
+ }
8218
+ function getSetRelativeTimeThreshold(threshold, limit) {
8219
+ if (thresholds[threshold] === void 0) {
8220
+ return false;
8221
+ }
8222
+ if (limit === void 0) {
8223
+ return thresholds[threshold];
8224
+ }
8225
+ thresholds[threshold] = limit;
8226
+ if (threshold === "s") {
8227
+ thresholds.ss = limit - 1;
8228
+ }
8229
+ return true;
8230
+ }
8231
+ function humanize(argWithSuffix, argThresholds) {
8232
+ if (!this.isValid()) {
8233
+ return this.localeData().invalidDate();
8234
+ }
8235
+ var withSuffix = false, th = thresholds, locale2, output;
8236
+ if (typeof argWithSuffix === "object") {
8237
+ argThresholds = argWithSuffix;
8238
+ argWithSuffix = false;
8239
+ }
8240
+ if (typeof argWithSuffix === "boolean") {
8241
+ withSuffix = argWithSuffix;
8242
+ }
8243
+ if (typeof argThresholds === "object") {
8244
+ th = Object.assign({}, thresholds, argThresholds);
8245
+ if (argThresholds.s != null && argThresholds.ss == null) {
8246
+ th.ss = argThresholds.s - 1;
8247
+ }
8248
+ }
8249
+ locale2 = this.localeData();
8250
+ output = relativeTime$1(this, !withSuffix, th, locale2);
8251
+ if (withSuffix) {
8252
+ output = locale2.pastFuture(+this, output);
8253
+ }
8254
+ return locale2.postformat(output);
8255
+ }
8256
+ var abs$1 = Math.abs;
8257
+ function sign(x) {
8258
+ return (x > 0) - (x < 0) || +x;
8259
+ }
8260
+ function toISOString$1() {
8261
+ if (!this.isValid()) {
8262
+ return this.localeData().invalidDate();
8263
+ }
8264
+ var seconds2 = abs$1(this._milliseconds) / 1e3, days2 = abs$1(this._days), months2 = abs$1(this._months), minutes2, hours2, years2, s, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign;
8265
+ if (!total) {
8266
+ return "P0D";
8267
+ }
8268
+ minutes2 = absFloor(seconds2 / 60);
8269
+ hours2 = absFloor(minutes2 / 60);
8270
+ seconds2 %= 60;
8271
+ minutes2 %= 60;
8272
+ years2 = absFloor(months2 / 12);
8273
+ months2 %= 12;
8274
+ s = seconds2 ? seconds2.toFixed(3).replace(/\.?0+$/, "") : "";
8275
+ totalSign = total < 0 ? "-" : "";
8276
+ ymSign = sign(this._months) !== sign(total) ? "-" : "";
8277
+ daysSign = sign(this._days) !== sign(total) ? "-" : "";
8278
+ hmsSign = sign(this._milliseconds) !== sign(total) ? "-" : "";
8279
+ return totalSign + "P" + (years2 ? ymSign + years2 + "Y" : "") + (months2 ? ymSign + months2 + "M" : "") + (days2 ? daysSign + days2 + "D" : "") + (hours2 || minutes2 || seconds2 ? "T" : "") + (hours2 ? hmsSign + hours2 + "H" : "") + (minutes2 ? hmsSign + minutes2 + "M" : "") + (seconds2 ? hmsSign + s + "S" : "");
8280
+ }
8281
+ var proto$2 = Duration.prototype;
8282
+ proto$2.isValid = isValid$1;
8283
+ proto$2.abs = abs2;
8284
+ proto$2.add = add$1;
8285
+ proto$2.subtract = subtract$1;
8286
+ proto$2.as = as;
8287
+ proto$2.asMilliseconds = asMilliseconds;
8288
+ proto$2.asSeconds = asSeconds;
8289
+ proto$2.asMinutes = asMinutes;
8290
+ proto$2.asHours = asHours;
8291
+ proto$2.asDays = asDays;
8292
+ proto$2.asWeeks = asWeeks;
8293
+ proto$2.asMonths = asMonths;
8294
+ proto$2.asQuarters = asQuarters;
8295
+ proto$2.asYears = asYears;
8296
+ proto$2.valueOf = valueOf$1;
8297
+ proto$2._bubble = bubble;
8298
+ proto$2.clone = clone$1;
8299
+ proto$2.get = get$2;
8300
+ proto$2.milliseconds = milliseconds;
8301
+ proto$2.seconds = seconds;
8302
+ proto$2.minutes = minutes;
8303
+ proto$2.hours = hours;
8304
+ proto$2.days = days;
8305
+ proto$2.weeks = weeks;
8306
+ proto$2.months = months;
8307
+ proto$2.years = years;
8308
+ proto$2.humanize = humanize;
8309
+ proto$2.toISOString = toISOString$1;
8310
+ proto$2.toString = toISOString$1;
8311
+ proto$2.toJSON = toISOString$1;
8312
+ proto$2.locale = locale;
8313
+ proto$2.localeData = localeData;
8314
+ proto$2.toIsoString = deprecate(
8315
+ "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
8316
+ toISOString$1
8317
+ );
8318
+ proto$2.lang = lang;
8319
+ addFormatToken("X", 0, 0, "unix");
8320
+ addFormatToken("x", 0, 0, "valueOf");
8321
+ addRegexToken("x", matchSigned);
8322
+ addRegexToken("X", matchTimestamp);
8323
+ addParseToken("X", function(input, array, config) {
8324
+ config._d = new Date(parseFloat(input) * 1e3);
8325
+ });
8326
+ addParseToken("x", function(input, array, config) {
8327
+ config._d = new Date(toInt(input));
8328
+ });
8329
+ hooks.version = "2.29.4";
8330
+ setHookCallback(createLocal);
8331
+ hooks.fn = proto;
8332
+ hooks.min = min;
8333
+ hooks.max = max;
8334
+ hooks.now = now;
8335
+ hooks.utc = createUTC;
8336
+ hooks.unix = createUnix;
8337
+ hooks.months = listMonths;
8338
+ hooks.isDate = isDate;
8339
+ hooks.locale = getSetGlobalLocale;
8340
+ hooks.invalid = createInvalid;
8341
+ hooks.duration = createDuration;
8342
+ hooks.isMoment = isMoment;
8343
+ hooks.weekdays = listWeekdays;
8344
+ hooks.parseZone = createInZone;
8345
+ hooks.localeData = getLocale;
8346
+ hooks.isDuration = isDuration;
8347
+ hooks.monthsShort = listMonthsShort;
8348
+ hooks.weekdaysMin = listWeekdaysMin;
8349
+ hooks.defineLocale = defineLocale;
8350
+ hooks.updateLocale = updateLocale;
8351
+ hooks.locales = listLocales;
8352
+ hooks.weekdaysShort = listWeekdaysShort;
8353
+ hooks.normalizeUnits = normalizeUnits;
8354
+ hooks.relativeTimeRounding = getSetRelativeTimeRounding;
8355
+ hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
8356
+ hooks.calendarFormat = getCalendarFormat;
8357
+ hooks.prototype = proto;
8358
+ hooks.HTML5_FMT = {
8359
+ DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
8360
+ // <input type="datetime-local" />
8361
+ DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
8362
+ // <input type="datetime-local" step="1" />
8363
+ DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
8364
+ // <input type="datetime-local" step="0.001" />
8365
+ DATE: "YYYY-MM-DD",
8366
+ // <input type="date" />
8367
+ TIME: "HH:mm",
8368
+ // <input type="time" />
8369
+ TIME_SECONDS: "HH:mm:ss",
8370
+ // <input type="time" step="1" />
8371
+ TIME_MS: "HH:mm:ss.SSS",
8372
+ // <input type="time" step="0.001" />
8373
+ WEEK: "GGGG-[W]WW",
8374
+ // <input type="week" />
8375
+ MONTH: "YYYY-MM"
8376
+ // <input type="month" />
8377
+ };
8378
+ return hooks;
8379
+ });
4420
8380
  }
4421
8381
  });
4422
8382
 
4423
- // ../../node_modules/@domql/state/dist/cjs/index.js
4424
- var require_cjs8 = __commonJS({
4425
- "../../node_modules/@domql/state/dist/cjs/index.js"(exports, module2) {
8383
+ // ../../node_modules/headless-datepicker/dist/headless-datepicker.js
8384
+ var require_headless_datepicker = __commonJS({
8385
+ "../../node_modules/headless-datepicker/dist/headless-datepicker.js"(exports) {
4426
8386
  "use strict";
4427
- var __defProp2 = Object.defineProperty;
4428
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
4429
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
4430
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
4431
- var __copyProps2 = (to, from2, except, desc) => {
4432
- if (from2 && typeof from2 === "object" || typeof from2 === "function") {
4433
- for (let key of __getOwnPropNames2(from2))
4434
- if (!__hasOwnProp2.call(to, key) && key !== except)
4435
- __defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
8387
+ Object.defineProperty(exports, "__esModule", { value: true });
8388
+ var moment = require_moment();
8389
+ var HeadlessDatepicker2;
8390
+ (function(HeadlessDatepicker3) {
8391
+ class Calendar {
8392
+ constructor(options = {}) {
8393
+ this.options = options;
8394
+ this.selectedDates = [];
8395
+ options.locale = options.locale || "en";
8396
+ options.disabledDates = options.disabledDates || [];
8397
+ options.extras = options.extras || [];
8398
+ options.calendarMode = options.calendarMode || "fill";
8399
+ options.zeroBasedMonth = options.zeroBasedMonth === void 0 ? false : options.zeroBasedMonth;
8400
+ this.monthOffset = this.options.zeroBasedMonth ? 0 : 1;
8401
+ this.localMoment = moment;
8402
+ if (!this.localMoment)
8403
+ throw "headlessDatepicker: momentjs is not available. Please do import or require('moment') or reference it from a script tag.";
8404
+ }
8405
+ getRange(startDate, endDate) {
8406
+ let dates = [];
8407
+ let dateWorker = this.createHdpDate(startDate, false);
8408
+ while (dateWorker.moment.isSameOrBefore(endDate)) {
8409
+ dates.push(dateWorker);
8410
+ dateWorker = this.createHdpDate(this.addDay(dateWorker.moment.toDate()), false);
8411
+ }
8412
+ return dates;
8413
+ }
8414
+ getMonth(yearMonthPair) {
8415
+ const startDate = this.hdMoment().year(yearMonthPair.year).month(yearMonthPair.month - this.monthOffset).date(1).toDate();
8416
+ const endDate = this.hdMoment().year(yearMonthPair.year).month(yearMonthPair.month - this.monthOffset).add(1, "months").date(0).toDate();
8417
+ const range = this.getRange(startDate, endDate);
8418
+ const weekDays = this.getWeekDays(range);
8419
+ const weeks = this.getWeeks(range, this.options.calendarMode);
8420
+ const firstDayOfMonth = this.getFirstDayOfMonthFromRange(range);
8421
+ const month = {
8422
+ weekDayName: weekDays,
8423
+ year: yearMonthPair.year,
8424
+ number: firstDayOfMonth.moment.month() + this.monthOffset,
8425
+ monthName: this.getMonthNames(firstDayOfMonth),
8426
+ weeks
8427
+ };
8428
+ return month;
8429
+ }
8430
+ getMonths(yearMonthPairs) {
8431
+ return yearMonthPairs.map((item) => {
8432
+ return this.getMonth({ year: item.year, month: item.month });
8433
+ });
8434
+ }
8435
+ getFirstDayOfMonthFromRange(range) {
8436
+ return range.find((item) => {
8437
+ return item && item.isAdjacent == false;
8438
+ });
8439
+ }
8440
+ // createMomentDay
8441
+ hdMoment(date) {
8442
+ const m = this.localMoment(date);
8443
+ m.locale(this.options.locale, this.options.localeSettings);
8444
+ return m;
8445
+ }
8446
+ // dateIsSelected
8447
+ isSelectedCheck(date) {
8448
+ const found = this.selectedDates.find((item) => {
8449
+ return this.hdMoment(item).isSame(date, "day");
8450
+ });
8451
+ return typeof found !== "undefined";
8452
+ }
8453
+ // minimumDateIsReached
8454
+ isBelowMinimumDateCheck(date) {
8455
+ return this.options.minimumDate ? this.hdMoment(this.options.minimumDate).isAfter(date, "day") : false;
8456
+ }
8457
+ // maximumDateIsReached
8458
+ isAboveMaximumDateCheck(date) {
8459
+ return this.options.maximumDate ? this.hdMoment(this.options.maximumDate).isBefore(date, "day") : false;
8460
+ }
8461
+ // dateIsDisabled
8462
+ isDisabledCheck(date) {
8463
+ return this.options.disabledDates.findIndex((item) => {
8464
+ return this.hdMoment(item).isSame(date, "day");
8465
+ }) !== -1;
8466
+ }
8467
+ // attachExtrasToDay
8468
+ attachExtras(date) {
8469
+ var extras = this.options.extras.filter((item) => {
8470
+ return this.hdMoment(item.date).isSame(date, "day");
8471
+ });
8472
+ return extras.length == 0 ? null : extras[0].data;
8473
+ }
8474
+ createHdpDate(date, isAdjacent) {
8475
+ const momentDate = this.hdMoment(date);
8476
+ const day = date.getDay();
8477
+ const month = date.getMonth();
8478
+ const isMinimum = this.isBelowMinimumDateCheck(date);
8479
+ const isMaximum = this.isAboveMaximumDateCheck(date);
8480
+ const isDisabled = this.isDisabledCheck(date);
8481
+ const isActive = !isMinimum && !isMaximum && !isDisabled;
8482
+ return {
8483
+ moment: momentDate,
8484
+ isActive,
8485
+ isToday: momentDate.isSame(/* @__PURE__ */ new Date(), "day"),
8486
+ isSelected: this.isSelectedCheck(date),
8487
+ isBelowMinimumDate: isMinimum,
8488
+ isAboveMaximumDate: isMaximum,
8489
+ isDisabled,
8490
+ isAdjacent,
8491
+ extras: this.attachExtras(date)
8492
+ };
8493
+ }
8494
+ createWeekItem(weekDates) {
8495
+ const firstDate = weekDates[0];
8496
+ return {
8497
+ weekOfYear: firstDate.moment.week(),
8498
+ weekOfMonth: Math.ceil(firstDate.moment.date() / 7),
8499
+ dates: weekDates
8500
+ };
8501
+ }
8502
+ addDay(date) {
8503
+ const newDate = new Date(date);
8504
+ newDate.setDate(newDate.getDate() + 1);
8505
+ return newDate;
8506
+ }
8507
+ createAdjacentDateEntry(momentDate, showAdjacentMonths) {
8508
+ return showAdjacentMonths ? this.createHdpDate(momentDate.toDate(), true) : null;
8509
+ }
8510
+ getWeekDays(range) {
8511
+ const weekDays = {
8512
+ full: [],
8513
+ short: [],
8514
+ min: []
8515
+ };
8516
+ const firstDayOfWeekIndex = range.findIndex((item) => {
8517
+ return item.moment.weekday() == 0;
8518
+ });
8519
+ for (let i = firstDayOfWeekIndex; i < firstDayOfWeekIndex + 7; i++) {
8520
+ const day = range[i].moment;
8521
+ weekDays.full.push(day.format("dddd"));
8522
+ weekDays.short.push(day.format("ddd"));
8523
+ weekDays.min.push(day.format("dd"));
8524
+ }
8525
+ return weekDays;
8526
+ }
8527
+ getMonthNames(firstDayOfMonth) {
8528
+ return {
8529
+ full: firstDayOfMonth.moment.format("MMMM"),
8530
+ short: firstDayOfMonth.moment.format("MMM")
8531
+ };
8532
+ }
8533
+ getAdjacentBefore(momentDate, showAdjacentMonths) {
8534
+ const dayOfWeek = momentDate.weekday();
8535
+ const clonedDate = momentDate.clone();
8536
+ clonedDate.subtract(dayOfWeek, "days");
8537
+ const dates = [];
8538
+ while (clonedDate.isBefore(momentDate)) {
8539
+ dates.push(this.createAdjacentDateEntry(clonedDate, showAdjacentMonths));
8540
+ clonedDate.add(1, "day");
8541
+ }
8542
+ return dates;
8543
+ }
8544
+ getAdjacentAfter(momentDate, showAdjacentMonths) {
8545
+ const dayOfWeek = momentDate.weekday();
8546
+ const clonedDate = momentDate.clone();
8547
+ clonedDate.add(6 - dayOfWeek, "days");
8548
+ const dates = [];
8549
+ while (clonedDate.isAfter(momentDate)) {
8550
+ dates.push(this.createAdjacentDateEntry(clonedDate, showAdjacentMonths));
8551
+ clonedDate.subtract(1, "day");
8552
+ }
8553
+ dates.reverse();
8554
+ return dates;
8555
+ }
8556
+ getLastWeekNumberInYear(range) {
8557
+ const lastDayInLastWeek = [...range].reverse().find((d) => d.moment.week() !== 1);
8558
+ return lastDayInLastWeek.moment.week();
8559
+ }
8560
+ splitIntoWeeks(range) {
8561
+ const weeks = [];
8562
+ let startWeekNumber = range[0].moment.week();
8563
+ let endWeekNumber = range[range.length - 1].moment.week();
8564
+ let newYear = false;
8565
+ if (endWeekNumber == 1) {
8566
+ endWeekNumber = this.getLastWeekNumberInYear(range);
8567
+ endWeekNumber++;
8568
+ newYear = true;
8569
+ }
8570
+ if (startWeekNumber > endWeekNumber) {
8571
+ startWeekNumber = 0;
8572
+ }
8573
+ for (var i = startWeekNumber; i <= endWeekNumber; i++) {
8574
+ let compareWeek = i;
8575
+ if (newYear && i == endWeekNumber) {
8576
+ compareWeek = 1;
8577
+ }
8578
+ if (i == 0) {
8579
+ compareWeek = range[0].moment.week();
8580
+ }
8581
+ const weekDates = range.filter(function(r) {
8582
+ return r.moment.week() == compareWeek;
8583
+ });
8584
+ weeks.push(this.createWeekItem(weekDates));
8585
+ }
8586
+ return weeks;
8587
+ }
8588
+ exactMode(range) {
8589
+ return this.splitIntoWeeks(range);
8590
+ }
8591
+ fillMode(range, showAdjacentMonths) {
8592
+ var weeks = this.splitIntoWeeks(range);
8593
+ var lastWeekIndex = weeks.length - 1;
8594
+ weeks[0].dates = this.getAdjacentBefore(range[0].moment, showAdjacentMonths).concat(weeks[0].dates);
8595
+ weeks[lastWeekIndex].dates = weeks[lastWeekIndex].dates.concat(this.getAdjacentAfter(range[range.length - 1].moment, showAdjacentMonths));
8596
+ return weeks;
8597
+ }
8598
+ adjacentMode(range) {
8599
+ return this.fillMode(range, true);
8600
+ }
8601
+ fixedMode(range) {
8602
+ const weeks = this.adjacentMode(range);
8603
+ while (weeks.length < 6) {
8604
+ const lastDay = weeks[weeks.length - 1].dates.slice(-1)[0].moment.clone();
8605
+ const nextDay = lastDay.add(1, "day");
8606
+ const newWeek = this.getAdjacentAfter(nextDay, true);
8607
+ newWeek.unshift(this.createAdjacentDateEntry(nextDay, true));
8608
+ weeks.push(this.createWeekItem(newWeek));
8609
+ }
8610
+ return weeks;
8611
+ }
8612
+ getWeeks(range, mode) {
8613
+ const showAdjacentMonths = false;
8614
+ switch (mode) {
8615
+ case "exact":
8616
+ return this.exactMode(range);
8617
+ case "adjacent":
8618
+ return this.adjacentMode(range);
8619
+ case "fill":
8620
+ return this.fillMode(range, false);
8621
+ case "fixed":
8622
+ return this.fixedMode(range);
8623
+ default:
8624
+ throw new Error("Invalid mode: " + mode);
8625
+ }
8626
+ }
4436
8627
  }
4437
- return to;
4438
- };
4439
- var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
4440
- var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
4441
- var state_exports = {};
4442
- module2.exports = __toCommonJS2(state_exports);
4443
- __reExport(state_exports, require_ignore(), module2.exports);
4444
- __reExport(state_exports, require_createState(), module2.exports);
4445
- __reExport(state_exports, require_updateState(), module2.exports);
4446
- __reExport(state_exports, require_methods(), module2.exports);
4447
- __reExport(state_exports, require_inherit(), module2.exports);
8628
+ HeadlessDatepicker3.Calendar = Calendar;
8629
+ })(HeadlessDatepicker2 = exports.HeadlessDatepicker || (exports.HeadlessDatepicker = {}));
4448
8630
  }
4449
8631
  });
4450
8632
 
@@ -7244,6 +11426,7 @@ __export(domql_exports, {
7244
11426
  Clickable: () => Clickable,
7245
11427
  Collection: () => Collection,
7246
11428
  DatePicker: () => DatePicker,
11429
+ DatePickerDay: () => DatePickerDay,
7247
11430
  DatePickerGrid: () => DatePickerGrid,
7248
11431
  DatePickerMonthsSlider: () => DatePickerMonthsSlider,
7249
11432
  DatePickerTwoColumns: () => DatePickerTwoColumns,
@@ -7252,6 +11435,7 @@ __export(domql_exports, {
7252
11435
  Dialog: () => Dialog,
7253
11436
  DialogFooter: () => DialogFooter,
7254
11437
  Direction: () => Direction,
11438
+ DragNdropUser: () => DragNdropUser,
7255
11439
  DropdownList: () => DropdownList,
7256
11440
  DropdownParent: () => DropdownParent,
7257
11441
  Field: () => Field,
@@ -7315,6 +11499,7 @@ __export(domql_exports, {
7315
11499
  TooltipParent: () => TooltipParent,
7316
11500
  Transform: () => Transform,
7317
11501
  Underline: () => Underline,
11502
+ Upload: () => Upload,
7318
11503
  Video: () => Video,
7319
11504
  XYZ: () => XYZ,
7320
11505
  getSystemTheme: () => getSystemTheme,
@@ -10036,6 +14221,19 @@ var DialogFooter = {
10036
14221
  };
10037
14222
 
10038
14223
  // Datepicker/index.js
14224
+ var import_headless_datepicker = __toESM(require_headless_datepicker());
14225
+ var calendar = new import_headless_datepicker.HeadlessDatepicker.Calendar({
14226
+ calendarMode: "exact"
14227
+ });
14228
+ var extractMonthDays = (data) => {
14229
+ const result = [];
14230
+ data.weeks.forEach((week) => {
14231
+ week.dates.forEach((date) => {
14232
+ result.push(date);
14233
+ });
14234
+ });
14235
+ return result;
14236
+ };
10039
14237
  var DatePickerYears = {
10040
14238
  tag: "aside",
10041
14239
  props: {
@@ -10076,16 +14274,16 @@ var DatePickerYears = {
10076
14274
  opacity: ".4",
10077
14275
  background: "transparent",
10078
14276
  transition: "opacity .25s ease",
10079
- isActive: state.activeYear === text,
10080
- ".isActive": { opacity: "1" },
14277
+ isSelected: state.activeYear === text,
14278
+ ".isSelected": { opacity: "1" },
10081
14279
  ":hover": { opacity: "1" }
10082
14280
  }),
10083
14281
  on: {
10084
14282
  click: (event, element, state) => state.update({ activeYear: element.text }),
10085
14283
  render: (el, state) => {
10086
14284
  const { props: props7 } = el;
10087
- const { isActive } = props7;
10088
- if (isActive) {
14285
+ const { isSelected } = props7;
14286
+ if (isSelected) {
10089
14287
  window.requestAnimationFrame(() => {
10090
14288
  el.parent.parent.node.scrollTop = el.node.offsetTop - 100;
10091
14289
  });
@@ -10180,13 +14378,13 @@ var DatePickerMonthsSlider = {
10180
14378
  textAlign: "center",
10181
14379
  boxSizing: "content-box",
10182
14380
  minWidth: "272px",
10183
- isActive: state.activeMonth === parseInt(key),
10184
- ".isActive": { opacity: "1" }
14381
+ isSelected: state.activeMonth === parseInt(key),
14382
+ ".isSelected": { opacity: "1" }
10185
14383
  }),
10186
14384
  render: (el, state) => {
10187
14385
  const { props: props7 } = el;
10188
- const { isActive } = props7;
10189
- if (isActive) {
14386
+ const { isSelected } = props7;
14387
+ if (isSelected) {
10190
14388
  window.requestAnimationFrame(() => {
10191
14389
  el.parent.parent.node.scrollLeft = el.node.offsetLeft;
10192
14390
  });
@@ -10241,18 +14439,14 @@ var DatePickerWeekDays = {
10241
14439
  { text: "Su" }
10242
14440
  ]
10243
14441
  };
10244
- var DatePickerGrid = {
10245
- extend: Grid,
10246
- props: {
10247
- columns: "repeat(7, 1fr)",
10248
- minWidth: "100%",
10249
- gap: "W2",
10250
- padding: "- Z"
10251
- },
10252
- childExtend: {
10253
- extend: Button,
10254
- props: ({ state, key }) => ({
10255
- isActive: state.activeDay === parseInt(key) + 1,
14442
+ var DatePickerDay = {
14443
+ extend: Button,
14444
+ state: true,
14445
+ props: ({ state, key }) => {
14446
+ const isSelected = state.parent.activeDay === parseInt(key) + 1;
14447
+ const gridColumnStart = 7 - state.parent.weekItems.weeks[0].dates.length;
14448
+ return {
14449
+ isSelected,
10256
14450
  textAlign: "center",
10257
14451
  fontSize: "Z1",
10258
14452
  round: "100%",
@@ -10261,23 +14455,37 @@ var DatePickerGrid = {
10261
14455
  lineHeight: ".9",
10262
14456
  background: "transparent",
10263
14457
  theme: "secondary @dark .color",
10264
- ".isActive": { theme: "primary" },
10265
- "!isActive": {
14458
+ text: parseInt(key) + 1,
14459
+ ":first-child": {
14460
+ style: { gridColumnStart }
14461
+ },
14462
+ ".isSelected": { theme: "primary" },
14463
+ "!isSelected": {
10266
14464
  ":hover": { theme: "secondary" },
10267
14465
  ":nth-child(7n-1), &:nth-child(7n)": { opacity: ".5" }
10268
14466
  }
10269
- }),
10270
- on: {
10271
- click: (event, element, state) => {
10272
- state.update({ activeDay: element.text });
10273
- console.log(state.activeDay + "." + state.activeMonth + "." + state.activeYear);
10274
- }
14467
+ };
14468
+ },
14469
+ on: {
14470
+ click: (event, element, state) => {
14471
+ state.parent.parent.update({
14472
+ active: state.parse()
14473
+ });
14474
+ console.log(state);
10275
14475
  }
14476
+ }
14477
+ };
14478
+ var DatePickerGrid = {
14479
+ extend: Grid,
14480
+ props: {
14481
+ columns: "repeat(7, 1fr)",
14482
+ minWidth: "100%",
14483
+ gap: "W2",
14484
+ padding: "- Z"
10276
14485
  },
10277
- $setPropsCollection: (el, s) => {
10278
- const daysInMonth = new Date(s.activeYear, s.activeMonth, 0).getDate();
10279
- const days = new Array(daysInMonth).fill(void 0).map((v, k) => ({ text: k + 1 }));
10280
- return days;
14486
+ childExtend: DatePickerDay,
14487
+ $setStateCollection: (el, s) => {
14488
+ return s.days;
10281
14489
  }
10282
14490
  };
10283
14491
  var monthNumbersContainer = {
@@ -10306,10 +14514,24 @@ var monthNumbersContainer = {
10306
14514
  overflow: "auto hidden"
10307
14515
  }
10308
14516
  },
14517
+ state: (el, s) => {
14518
+ const state = el.parent.state;
14519
+ return new Array(12).fill(void 0).map((v, k) => {
14520
+ const year = state.activeYear;
14521
+ const month = k + 1;
14522
+ const weekItems = calendar.getMonth({ year, month });
14523
+ return {
14524
+ year,
14525
+ month,
14526
+ weekItems,
14527
+ days: extractMonthDays(weekItems)
14528
+ };
14529
+ });
14530
+ },
10309
14531
  content: {
10310
14532
  extend: Flex,
10311
14533
  childExtend: DatePickerGrid,
10312
- ...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
14534
+ $setStateCollection: (el, s) => s.parse()
10313
14535
  }
10314
14536
  };
10315
14537
  var props = {
@@ -10345,17 +14567,15 @@ var DatePicker = {
10345
14567
  };
10346
14568
  var DatePickerTwoColumns = {
10347
14569
  extend: DatePicker,
10348
- props: {
10349
- calendar: {
10350
- months: {
10351
- maxWidth: `${544 / 16}em`
10352
- },
10353
- weekDaysContainer: {
10354
- maxWidth: `${544 / 16}em`
10355
- },
10356
- monthNumbersContainer: {
10357
- maxWidth: `${544 / 16}em`
10358
- }
14570
+ Flex: {
14571
+ DatePickerMonthsSlider: {
14572
+ maxWidth: `${544 / 16}em`
14573
+ },
14574
+ DatePickerWeekDays: {
14575
+ maxWidth: `${544 / 16}em`
14576
+ },
14577
+ monthNumbersContainer: {
14578
+ maxWidth: `${544 / 16}em`
10359
14579
  }
10360
14580
  }
10361
14581
  };
@@ -10464,7 +14684,7 @@ var props3 = {
10464
14684
  }
10465
14685
  };
10466
14686
  var TimePicker = {
10467
- extend: Flex,
14687
+ extend: [Dialog, Flex],
10468
14688
  props: props3,
10469
14689
  title: { text: "enter time" },
10470
14690
  content: {
@@ -11330,6 +15550,79 @@ var Textarea = {
11330
15550
  tag: "textarea"
11331
15551
  };
11332
15552
 
15553
+ // Upload/index.js
15554
+ var Upload = {
15555
+ extend: [Focusable, Flex],
15556
+ tag: "label",
15557
+ props: {
15558
+ position: "relative",
15559
+ flow: "column",
15560
+ align: "center center",
15561
+ round: "A",
15562
+ cursor: "pointer",
15563
+ border: "1.6px, dashed, white 0.1",
15564
+ padding: "B B2",
15565
+ input: {
15566
+ position: "absolute",
15567
+ inset: "0 0 0 0",
15568
+ opacity: "0",
15569
+ visibility: "hidden"
15570
+ }
15571
+ },
15572
+ input: { attr: { type: "file" } },
15573
+ icon: {
15574
+ extend: Icon,
15575
+ props: {
15576
+ name: "upload",
15577
+ fontSize: `${26 / 16}em`,
15578
+ opacity: ".2"
15579
+ }
15580
+ },
15581
+ p: {
15582
+ props: {
15583
+ text: " or click and upload from your computer",
15584
+ flexFlow: "column",
15585
+ flexAlign: "center center",
15586
+ opacity: ".22",
15587
+ margin: "0"
15588
+ },
15589
+ span: {
15590
+ text: "Drag and drop your font file",
15591
+ style: { display: "block" }
15592
+ }
15593
+ }
15594
+ };
15595
+ var DragNdropUser = {
15596
+ extend: Flex,
15597
+ props: ({ state }) => ({
15598
+ flow: "column",
15599
+ align: "center center",
15600
+ gap: "A",
15601
+ round: "A",
15602
+ img: { boxSize: "C C", src: state.src },
15603
+ buttons: {
15604
+ gap: "Y",
15605
+ childProps: {
15606
+ padding: "0",
15607
+ boxSize: "B B",
15608
+ background: "gray3",
15609
+ round: "Y1",
15610
+ color: "gray6",
15611
+ style: { "> svg": { fontSize: `${14 / 16}em` } }
15612
+ }
15613
+ }
15614
+ }),
15615
+ img: { extend: Avatar },
15616
+ buttons: {
15617
+ extend: Flex,
15618
+ childExtend: SquareButton,
15619
+ ...[
15620
+ { props: { icon: "reload" } },
15621
+ { props: { icon: "trash" } }
15622
+ ]
15623
+ }
15624
+ };
15625
+
11333
15626
  // Label/index.js
11334
15627
  var Label = {
11335
15628
  extend: Button,
@@ -11400,3 +15693,12 @@ var Select = {
11400
15693
  disabled: ({ props: props7 }) => props7.disabled
11401
15694
  }
11402
15695
  };
15696
+ /*! Bundled license information:
15697
+
15698
+ moment/moment.js:
15699
+ (*! moment.js *)
15700
+ (*! version : 2.29.4 *)
15701
+ (*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
15702
+ (*! license : MIT *)
15703
+ (*! momentjs.com *)
15704
+ */