@everymatrix/player-account-controller-nd 1.66.1 → 1.66.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/components/{PlayerAccountControllerNd-gtGxOlzr.js → PlayerAccountControllerNd-C-gx4fZ-.js} +9 -9
  2. package/components/{PlayerAccountControllerNd-kA_PT5aP.js → PlayerAccountControllerNd-DKwVpFJI.js} +9 -9
  3. package/components/PlayerAccountControllerNd-HkDZ9PkO.cjs +1 -0
  4. package/components/{PlayerAccountGamingLimitsPage2Gm16Nd-B3S3aE0o.js → PlayerAccountGamingLimitsPage2Gm16Nd-Cp0HPknx.js} +843 -769
  5. package/components/PlayerAccountGamingLimitsPage2Gm16Nd-D0j9FESV.cjs +26 -0
  6. package/components/{PlayerAccountGamingLimitsPage2Gm16Nd-HpGAoH_E.js → PlayerAccountGamingLimitsPage2Gm16Nd-JTp7ykpl.js} +1065 -991
  7. package/components/{PlayerAccountGamingLimitsWrapper2Nd-fpNsXAyX.js → PlayerAccountGamingLimitsWrapper2Nd-BEi1Ax2s.js} +1 -1
  8. package/components/{PlayerAccountGamingLimitsWrapper2Nd-CErgPgvk.cjs → PlayerAccountGamingLimitsWrapper2Nd-D6DATRJZ.cjs} +1 -1
  9. package/components/{PlayerAccountGamingLimitsWrapper2Nd-4ZYALP2a.js → PlayerAccountGamingLimitsWrapper2Nd-DnzmU3uL.js} +1 -1
  10. package/components/{PlayerAccountSelfExclusionNd-CIP0pLzc.js → PlayerAccountSelfExclusionNd-BTHM1Lql.js} +1 -0
  11. package/components/{PlayerAccountSelfExclusionNd-C6g9CN37.js → PlayerAccountSelfExclusionNd-C64gq5do.js} +1 -0
  12. package/components/{PlayerAccountSelfExclusionNd-t6Q0Nexu.cjs → PlayerAccountSelfExclusionNd-psZ7cU0X.cjs} +131 -131
  13. package/components/{PlayerAccountTimeout-CLxGgNmd.js → PlayerAccountTimeout-CZL2-AHn.js} +1 -1
  14. package/components/{PlayerAccountTimeout-XhHX4kXc.js → PlayerAccountTimeout-DB1Vd2mK.js} +1 -1
  15. package/components/{PlayerAccountTimeout-D-cCHJBm.cjs → PlayerAccountTimeout-DopVU6lf.cjs} +1 -1
  16. package/components/{PlayerAccountTransactionsHistory-jkghMl1H.js → PlayerAccountTransactionsHistory-BJvXF3-v.js} +1932 -1867
  17. package/components/{PlayerAccountTransactionsHistory-_Sm0nfWr.cjs → PlayerAccountTransactionsHistory-DpccQlBh.cjs} +265 -265
  18. package/components/{PlayerAccountTransactionsHistory-YbNAPwhH.js → PlayerAccountTransactionsHistory-cwuw-lF-.js} +1648 -1633
  19. package/components/{PlayerBonusHistory-BXx0_fP4.js → PlayerBonusHistory-8skqbymr.js} +1 -1
  20. package/components/{PlayerBonusHistory-DJTWzw3S.js → PlayerBonusHistory-D6yYroMc.js} +1 -1
  21. package/components/{PlayerBonusHistory-D8cY-irD.cjs → PlayerBonusHistory-lQGquKx2.cjs} +1 -1
  22. package/components/{PlayerGamingHistory-BHH-2mBi.js → PlayerGamingHistory-C6CoiIJP.js} +1 -1
  23. package/components/{PlayerGamingHistory-2WbuH8Jo.js → PlayerGamingHistory-Cqr2wcuP.js} +1 -1
  24. package/components/{PlayerGamingHistory-DV45eT8w.cjs → PlayerGamingHistory-NKEvUygB.cjs} +1 -1
  25. package/es2015/player-account-controller-nd.cjs +1 -1
  26. package/es2015/player-account-controller-nd.js +1 -1
  27. package/esnext/player-account-controller-nd.js +1 -1
  28. package/package.json +1 -1
  29. package/stencil/{general-input-6HMiojaV.js → checkbox-group-input_14-BcBdDpf8.js} +7654 -3097
  30. package/stencil/{general-input-DGu8X142.js → checkbox-group-input_14-CJHYJs5Y.js} +7664 -3107
  31. package/stencil/checkbox-group-input_14-CNR6zkvw.cjs +5901 -0
  32. package/stencil/{index-9cd44522--OAp7ePk.js → index-13661b98-Bg3nkDqk.js} +88 -103
  33. package/stencil/index-13661b98-D16qyHKo.cjs +1 -0
  34. package/stencil/{index-9cd44522-C0ycW8_E.js → index-13661b98-DcT9swce.js} +84 -99
  35. package/stencil/pam-change-password-YhGkcb7G.js +25 -0
  36. package/stencil/{player-change-password-gm2-5cb5c6c1-Bu5Dac83.js → pam-change-password-f4a1e7e7-CfVbvq6Y.js} +223 -74
  37. package/stencil/pam-change-password-f4a1e7e7-DtMPJ715.cjs +125 -0
  38. package/stencil/{player-change-password-gm2-5cb5c6c1-Bi9IbxQV.js → pam-change-password-f4a1e7e7-e1XqJgP9.js} +223 -74
  39. package/stencil/pam-change-password-sLrzK4Qt.js +7 -0
  40. package/stencil/pam-change-password-uD3esedo.cjs +1 -0
  41. package/components/PlayerAccountControllerNd-DR6ofLiD.cjs +0 -1
  42. package/components/PlayerAccountGamingLimitsPage2Gm16Nd-CWcAVks7.cjs +0 -24
  43. package/stencil/checkbox-group-input_9-BVBeSmHl.js +0 -3895
  44. package/stencil/checkbox-group-input_9-CixpoaRc.cjs +0 -2
  45. package/stencil/checkbox-group-input_9-Ckf5IThK.js +0 -3895
  46. package/stencil/general-input-C54NeVAb.cjs +0 -5636
  47. package/stencil/index-9cd44522-CqgRbQOU.cjs +0 -1
  48. package/stencil/locale-CB060R77.cjs +0 -1
  49. package/stencil/locale-Cxpe53Ym.js +0 -153
  50. package/stencil/password-input_2-BWxS0D5h.js +0 -313
  51. package/stencil/password-input_2-Bz7EgS5w.cjs +0 -193
  52. package/stencil/password-input_2-KI96oR82.js +0 -313
  53. package/stencil/player-change-password-gm2-5cb5c6c1-B561Hszb.cjs +0 -1
  54. package/stencil/player-change-password-gm2-BRh6ZaCn.js +0 -25
  55. package/stencil/player-change-password-gm2-COxZYE4t.cjs +0 -1
  56. package/stencil/player-change-password-gm2-tu3usKOk.js +0 -7
  57. package/stencil/toggle-checkbox-input-BQz8G4GG.cjs +0 -1
  58. package/stencil/toggle-checkbox-input-Bhz93bXQ.js +0 -68
  59. package/stencil/toggle-checkbox-input-lRQooUAB.js +0 -68
  60. package/stencil/tooltipIcon-ee9760a8-BCCb4EU-.js +0 -4
  61. package/stencil/tooltipIcon-ee9760a8-Bd9l1O5C.cjs +0 -1
@@ -1,3895 +0,0 @@
1
- import { r as z, c as H, h as l, g as Ye } from "./index-9cd44522--OAp7ePk.js";
2
- import { t as x } from "./locale-Cxpe53Ym.js";
3
- import { t as G } from "./tooltipIcon-ee9760a8-BCCb4EU-.js";
4
- const rt = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}', nt = rt, ot = class {
5
- constructor(t) {
6
- z(this, t), this.sendValidityState = H(this, "sendValidityState"), this.sendInputValue = H(this, "sendInputValue"), this.value = null, this.setClientStyling = () => {
7
- let i = document.createElement("style");
8
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
9
- }, this.name = void 0, this.displayName = void 0, this.defaultValue = "", this.autofilled = void 0, this.tooltip = void 0, this.options = void 0, this.validation = void 0, this.language = void 0, this.emitValue = void 0, this.clientStyling = "", this.errorMessage = void 0, this.isValid = void 0, this.limitStylingAppends = !1, this.showTooltip = !1, this.selectedValues = [], this.showCheckboxes = !1;
10
- }
11
- handleStylingChange(t, i) {
12
- t !== i && this.setClientStyling();
13
- }
14
- validityChanged() {
15
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value, type: "checkboxgroup" });
16
- }
17
- setValue() {
18
- this.value = this.options.reduce((t, i) => (t[i.name] = this.selectedValues.includes(i.name), t), {}), this.emitValueHandler(!0);
19
- }
20
- validityStateHandler(t) {
21
- this.sendValidityState.emit(t);
22
- }
23
- emitValueHandler(t) {
24
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value, type: "checkboxgroup" });
25
- }
26
- valueHandler(t) {
27
- this.sendInputValue.emit(t);
28
- }
29
- handleClickOutside(t) {
30
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
31
- }
32
- componentDidRender() {
33
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
34
- }
35
- componentDidLoad() {
36
- this.inputReference = this.element.shadowRoot.querySelector("input"), this.isValid = this.setValidity(), this.defaultValue && (this.showCheckboxes = !0, this.selectedValues = this.options.map((t) => t.name), this.value = this.defaultValue, this.valueHandler({ name: this.name, value: this.value }));
37
- }
38
- setValidity() {
39
- return this.inputReference.validity.valid;
40
- }
41
- setErrorMessage() {
42
- if (this.inputReference.validity.valueMissing)
43
- return x("requiredError", this.language);
44
- }
45
- renderTooltip() {
46
- return this.showTooltip ? l("div", { class: `checkboxgroup__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
47
- }
48
- handleParentCheckbox(t) {
49
- const i = t.target.checked;
50
- this.showCheckboxes = i, this.selectedValues = i ? this.options.map((a) => a.name) : [];
51
- }
52
- renderLabel() {
53
- return l("label", { class: "checkbox__label", htmlFor: `${this.name}__input`, slot: "label" }, l("div", { class: "checkbox__label-text", innerHTML: `${this.displayName} ${this.validation.mandatory ? "*" : ""}` }));
54
- }
55
- render() {
56
- return l("div", { key: "2eab716c27576d42a67d791b546022d58e89e21d", class: `checkboxgroup__wrapper ${this.name}__input`, ref: (t) => this.stylingContainer = t }, l("div", { key: "9e246685583dd06a156d6b11308b2cb355d37d01", class: "checkboxgroup__wrapper--flex" }, l("vaadin-checkbox", { key: "ba6a64bdd1d1141407ed65213684d3b4d643effc", class: "checkbox__input", checked: this.selectedValues.length === this.options.length || this.defaultValue === "true", indeterminate: this.selectedValues.length > 0 && this.selectedValues.length < this.options.length, onChange: (t) => this.handleParentCheckbox(t) }, this.renderLabel()), this.tooltip && l("img", { key: "2c23ca2dfe4213d9287958b5e6f09f76e9e3b031", class: "checkboxgroup__tooltip-icon", src: G, alt: "", ref: (t) => this.tooltipIconReference = t, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), l("small", { key: "3180a35a47e4b57d8634da2f516d0c5c71ee0e9f", class: "checkboxgroup__error-message" }, this.errorMessage), this.showCheckboxes && l("vaadin-checkbox-group", { key: "b28fee432aa7bffe6aedf708f1ce9603a52833de", theme: "vertical", value: this.selectedValues, "on-value-changed": (t) => {
57
- this.selectedValues = t.detail.value;
58
- } }, this.options.map((t) => l("vaadin-checkbox", { class: "checkbox__input", name: t.name, value: t.name, label: t.displayName }))));
59
- }
60
- get element() {
61
- return Ye(this);
62
- }
63
- static get watchers() {
64
- return {
65
- clientStyling: ["handleStylingChange"],
66
- isValid: ["validityChanged"],
67
- selectedValues: ["setValue"],
68
- emitValue: ["emitValueHandler"]
69
- };
70
- }
71
- };
72
- ot.style = nt;
73
- const st = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}', lt = st, ut = class {
74
- constructor(t) {
75
- z(this, t), this.sendValidityState = H(this, "sendValidityState"), this.sendInputValue = H(this, "sendInputValue"), this.value = "", this.setClientStyling = () => {
76
- let i = document.createElement("style");
77
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
78
- }, this.name = void 0, this.displayName = void 0, this.defaultValue = "", this.autofilled = void 0, this.tooltip = void 0, this.validation = void 0, this.language = void 0, this.emitValue = void 0, this.clientStyling = "", this.errorMessage = void 0, this.isValid = void 0, this.limitStylingAppends = !1, this.showTooltip = !1;
79
- }
80
- handleStylingChange(t, i) {
81
- t !== i && this.setClientStyling();
82
- }
83
- validityChanged() {
84
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value });
85
- }
86
- validityStateHandler(t) {
87
- this.sendValidityState.emit(t);
88
- }
89
- emitValueHandler(t) {
90
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value });
91
- }
92
- valueHandler(t) {
93
- this.sendInputValue.emit(t);
94
- }
95
- handleClickOutside(t) {
96
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
97
- }
98
- componentDidRender() {
99
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
100
- }
101
- componentDidLoad() {
102
- this.defaultValue && (this.value = this.defaultValue, this.valueHandler({ name: this.name, value: this.value }));
103
- }
104
- handleClick() {
105
- this.value = this.inputReference.checked.toString(), this.errorMessage = this.setErrorMessage(), this.isValid = this.setValidity(), this.emitValueHandler(!0);
106
- }
107
- setValidity() {
108
- return this.inputReference.validity.valid;
109
- }
110
- setErrorMessage() {
111
- if (this.inputReference.validity.valueMissing)
112
- return x("requiredError", this.language);
113
- }
114
- renderLabel() {
115
- return l("label", { class: "checkbox__label", htmlFor: `${this.name}__input` }, l("div", { class: "checkbox__label-text", innerHTML: `${this.displayName} ${this.validation.mandatory ? "*" : ""}` }));
116
- }
117
- renderTooltip() {
118
- return this.showTooltip ? l("div", { class: `checkbox__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
119
- }
120
- render() {
121
- return l("div", { key: "8c80c955bb052558165a4c5b1020d0582ed0af36", class: `checkbox__wrapper ${this.name}__input`, ref: (t) => this.stylingContainer = t }, l("input", { key: "89401d543cb30b72ec614b0cd4e95b2e82b2522d", class: "checkbox__input", type: "checkbox", id: `${this.name}__input`, ref: (t) => this.inputReference = t, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), l("small", { key: "d007d8c02dd014a363e2fcc1a0e8df6ffda34bcb", class: "checkbox__error-message" }, this.errorMessage), l("div", { key: "c511c07684173359663d4907371efb82289f0433", class: "checkbox__wrapper--relative" }, this.tooltip && l("img", { key: "dd263ce86efd89f34078f3cc24729f43f40e89a6", class: "checkbox__tooltip-icon", src: G, alt: "", ref: (t) => this.tooltipIconReference = t, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
122
- }
123
- static get watchers() {
124
- return {
125
- clientStyling: ["handleStylingChange"],
126
- isValid: ["validityChanged"],
127
- emitValue: ["emitValueHandler"]
128
- };
129
- }
130
- };
131
- ut.style = lt;
132
- function Q(t) {
133
- "@babel/helpers - typeof";
134
- return Q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
135
- return typeof i;
136
- } : function(i) {
137
- return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
138
- }, Q(t);
139
- }
140
- function M(t, i) {
141
- if (i.length < t)
142
- throw new TypeError(t + " argument" + (t > 1 ? "s" : "") + " required, but only " + i.length + " present");
143
- }
144
- function dt(t) {
145
- return M(1, arguments), t instanceof Date || Q(t) === "object" && Object.prototype.toString.call(t) === "[object Date]";
146
- }
147
- function E(t) {
148
- M(1, arguments);
149
- var i = Object.prototype.toString.call(t);
150
- return t instanceof Date || Q(t) === "object" && i === "[object Date]" ? new Date(t.getTime()) : typeof t == "number" || i === "[object Number]" ? new Date(t) : ((typeof t == "string" || i === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
151
- }
152
- function ct(t) {
153
- if (M(1, arguments), !dt(t) && typeof t != "number")
154
- return !1;
155
- var i = E(t);
156
- return !isNaN(Number(i));
157
- }
158
- function R(t) {
159
- if (t === null || t === !0 || t === !1)
160
- return NaN;
161
- var i = Number(t);
162
- return isNaN(i) ? i : i < 0 ? Math.ceil(i) : Math.floor(i);
163
- }
164
- function ht(t, i) {
165
- M(2, arguments);
166
- var a = E(t).getTime(), r = R(i);
167
- return new Date(a + r);
168
- }
169
- function qe(t, i) {
170
- M(2, arguments);
171
- var a = R(i);
172
- return ht(t, -a);
173
- }
174
- var ft = 864e5;
175
- function pt(t) {
176
- M(1, arguments);
177
- var i = E(t), a = i.getTime();
178
- i.setUTCMonth(0, 1), i.setUTCHours(0, 0, 0, 0);
179
- var r = i.getTime(), e = a - r;
180
- return Math.floor(e / ft) + 1;
181
- }
182
- function ie(t) {
183
- M(1, arguments);
184
- var i = 1, a = E(t), r = a.getUTCDay(), e = (r < i ? 7 : 0) + r - i;
185
- return a.setUTCDate(a.getUTCDate() - e), a.setUTCHours(0, 0, 0, 0), a;
186
- }
187
- function Ae(t) {
188
- M(1, arguments);
189
- var i = E(t), a = i.getUTCFullYear(), r = /* @__PURE__ */ new Date(0);
190
- r.setUTCFullYear(a + 1, 0, 4), r.setUTCHours(0, 0, 0, 0);
191
- var e = ie(r), o = /* @__PURE__ */ new Date(0);
192
- o.setUTCFullYear(a, 0, 4), o.setUTCHours(0, 0, 0, 0);
193
- var n = ie(o);
194
- return i.getTime() >= e.getTime() ? a + 1 : i.getTime() >= n.getTime() ? a : a - 1;
195
- }
196
- function vt(t) {
197
- M(1, arguments);
198
- var i = Ae(t), a = /* @__PURE__ */ new Date(0);
199
- a.setUTCFullYear(i, 0, 4), a.setUTCHours(0, 0, 0, 0);
200
- var r = ie(a);
201
- return r;
202
- }
203
- var mt = 6048e5;
204
- function Ne(t) {
205
- M(1, arguments);
206
- var i = E(t), a = ie(i).getTime() - vt(i).getTime();
207
- return Math.round(a / mt) + 1;
208
- }
209
- var gt = {};
210
- function ae() {
211
- return gt;
212
- }
213
- function ee(t, i) {
214
- var a, r, e, o, n, s, c, h;
215
- M(1, arguments);
216
- var g = ae(), y = R((a = (r = (e = (o = i?.weekStartsOn) !== null && o !== void 0 ? o : i == null || (n = i.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.weekStartsOn) !== null && e !== void 0 ? e : g.weekStartsOn) !== null && r !== void 0 ? r : (c = g.locale) === null || c === void 0 || (h = c.options) === null || h === void 0 ? void 0 : h.weekStartsOn) !== null && a !== void 0 ? a : 0);
217
- if (!(y >= 0 && y <= 6))
218
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
219
- var C = E(t), T = C.getUTCDay(), O = (T < y ? 7 : 0) + T - y;
220
- return C.setUTCDate(C.getUTCDate() - O), C.setUTCHours(0, 0, 0, 0), C;
221
- }
222
- function Te(t, i) {
223
- var a, r, e, o, n, s, c, h;
224
- M(1, arguments);
225
- var g = E(t), y = g.getUTCFullYear(), C = ae(), T = R((a = (r = (e = (o = i?.firstWeekContainsDate) !== null && o !== void 0 ? o : i == null || (n = i.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && e !== void 0 ? e : C.firstWeekContainsDate) !== null && r !== void 0 ? r : (c = C.locale) === null || c === void 0 || (h = c.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && a !== void 0 ? a : 1);
226
- if (!(T >= 1 && T <= 7))
227
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
228
- var O = /* @__PURE__ */ new Date(0);
229
- O.setUTCFullYear(y + 1, 0, T), O.setUTCHours(0, 0, 0, 0);
230
- var Y = ee(O, i), U = /* @__PURE__ */ new Date(0);
231
- U.setUTCFullYear(y, 0, T), U.setUTCHours(0, 0, 0, 0);
232
- var W = ee(U, i);
233
- return g.getTime() >= Y.getTime() ? y + 1 : g.getTime() >= W.getTime() ? y : y - 1;
234
- }
235
- function yt(t, i) {
236
- var a, r, e, o, n, s, c, h;
237
- M(1, arguments);
238
- var g = ae(), y = R((a = (r = (e = (o = i?.firstWeekContainsDate) !== null && o !== void 0 ? o : i == null || (n = i.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && e !== void 0 ? e : g.firstWeekContainsDate) !== null && r !== void 0 ? r : (c = g.locale) === null || c === void 0 || (h = c.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && a !== void 0 ? a : 1), C = Te(t, i), T = /* @__PURE__ */ new Date(0);
239
- T.setUTCFullYear(C, 0, y), T.setUTCHours(0, 0, 0, 0);
240
- var O = ee(T, i);
241
- return O;
242
- }
243
- var bt = 6048e5;
244
- function We(t, i) {
245
- M(1, arguments);
246
- var a = E(t), r = ee(a, i).getTime() - yt(a, i).getTime();
247
- return Math.round(r / bt) + 1;
248
- }
249
- function w(t, i) {
250
- for (var a = t < 0 ? "-" : "", r = Math.abs(t).toString(); r.length < i; )
251
- r = "0" + r;
252
- return a + r;
253
- }
254
- var wt = {
255
- // Year
256
- y: function(i, a) {
257
- var r = i.getUTCFullYear(), e = r > 0 ? r : 1 - r;
258
- return w(a === "yy" ? e % 100 : e, a.length);
259
- },
260
- // Month
261
- M: function(i, a) {
262
- var r = i.getUTCMonth();
263
- return a === "M" ? String(r + 1) : w(r + 1, 2);
264
- },
265
- // Day of the month
266
- d: function(i, a) {
267
- return w(i.getUTCDate(), a.length);
268
- },
269
- // AM or PM
270
- a: function(i, a) {
271
- var r = i.getUTCHours() / 12 >= 1 ? "pm" : "am";
272
- switch (a) {
273
- case "a":
274
- case "aa":
275
- return r.toUpperCase();
276
- case "aaa":
277
- return r;
278
- case "aaaaa":
279
- return r[0];
280
- case "aaaa":
281
- default:
282
- return r === "am" ? "a.m." : "p.m.";
283
- }
284
- },
285
- // Hour [1-12]
286
- h: function(i, a) {
287
- return w(i.getUTCHours() % 12 || 12, a.length);
288
- },
289
- // Hour [0-23]
290
- H: function(i, a) {
291
- return w(i.getUTCHours(), a.length);
292
- },
293
- // Minute
294
- m: function(i, a) {
295
- return w(i.getUTCMinutes(), a.length);
296
- },
297
- // Second
298
- s: function(i, a) {
299
- return w(i.getUTCSeconds(), a.length);
300
- },
301
- // Fraction of second
302
- S: function(i, a) {
303
- var r = a.length, e = i.getUTCMilliseconds(), o = Math.floor(e * Math.pow(10, r - 3));
304
- return w(o, a.length);
305
- }
306
- };
307
- const K = wt;
308
- var te = {
309
- midnight: "midnight",
310
- noon: "noon",
311
- morning: "morning",
312
- afternoon: "afternoon",
313
- evening: "evening",
314
- night: "night"
315
- }, _t = {
316
- // Era
317
- G: function(i, a, r) {
318
- var e = i.getUTCFullYear() > 0 ? 1 : 0;
319
- switch (a) {
320
- case "G":
321
- case "GG":
322
- case "GGG":
323
- return r.era(e, {
324
- width: "abbreviated"
325
- });
326
- case "GGGGG":
327
- return r.era(e, {
328
- width: "narrow"
329
- });
330
- case "GGGG":
331
- default:
332
- return r.era(e, {
333
- width: "wide"
334
- });
335
- }
336
- },
337
- // Year
338
- y: function(i, a, r) {
339
- if (a === "yo") {
340
- var e = i.getUTCFullYear(), o = e > 0 ? e : 1 - e;
341
- return r.ordinalNumber(o, {
342
- unit: "year"
343
- });
344
- }
345
- return K.y(i, a);
346
- },
347
- // Local week-numbering year
348
- Y: function(i, a, r, e) {
349
- var o = Te(i, e), n = o > 0 ? o : 1 - o;
350
- if (a === "YY") {
351
- var s = n % 100;
352
- return w(s, 2);
353
- }
354
- return a === "Yo" ? r.ordinalNumber(n, {
355
- unit: "year"
356
- }) : w(n, a.length);
357
- },
358
- // ISO week-numbering year
359
- R: function(i, a) {
360
- var r = Ae(i);
361
- return w(r, a.length);
362
- },
363
- // Extended year. This is a single number designating the year of this calendar system.
364
- // The main difference between `y` and `u` localizers are B.C. years:
365
- // | Year | `y` | `u` |
366
- // |------|-----|-----|
367
- // | AC 1 | 1 | 1 |
368
- // | BC 1 | 1 | 0 |
369
- // | BC 2 | 2 | -1 |
370
- // Also `yy` always returns the last two digits of a year,
371
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
372
- u: function(i, a) {
373
- var r = i.getUTCFullYear();
374
- return w(r, a.length);
375
- },
376
- // Quarter
377
- Q: function(i, a, r) {
378
- var e = Math.ceil((i.getUTCMonth() + 1) / 3);
379
- switch (a) {
380
- case "Q":
381
- return String(e);
382
- case "QQ":
383
- return w(e, 2);
384
- case "Qo":
385
- return r.ordinalNumber(e, {
386
- unit: "quarter"
387
- });
388
- case "QQQ":
389
- return r.quarter(e, {
390
- width: "abbreviated",
391
- context: "formatting"
392
- });
393
- case "QQQQQ":
394
- return r.quarter(e, {
395
- width: "narrow",
396
- context: "formatting"
397
- });
398
- case "QQQQ":
399
- default:
400
- return r.quarter(e, {
401
- width: "wide",
402
- context: "formatting"
403
- });
404
- }
405
- },
406
- // Stand-alone quarter
407
- q: function(i, a, r) {
408
- var e = Math.ceil((i.getUTCMonth() + 1) / 3);
409
- switch (a) {
410
- case "q":
411
- return String(e);
412
- case "qq":
413
- return w(e, 2);
414
- case "qo":
415
- return r.ordinalNumber(e, {
416
- unit: "quarter"
417
- });
418
- case "qqq":
419
- return r.quarter(e, {
420
- width: "abbreviated",
421
- context: "standalone"
422
- });
423
- case "qqqqq":
424
- return r.quarter(e, {
425
- width: "narrow",
426
- context: "standalone"
427
- });
428
- case "qqqq":
429
- default:
430
- return r.quarter(e, {
431
- width: "wide",
432
- context: "standalone"
433
- });
434
- }
435
- },
436
- // Month
437
- M: function(i, a, r) {
438
- var e = i.getUTCMonth();
439
- switch (a) {
440
- case "M":
441
- case "MM":
442
- return K.M(i, a);
443
- case "Mo":
444
- return r.ordinalNumber(e + 1, {
445
- unit: "month"
446
- });
447
- case "MMM":
448
- return r.month(e, {
449
- width: "abbreviated",
450
- context: "formatting"
451
- });
452
- case "MMMMM":
453
- return r.month(e, {
454
- width: "narrow",
455
- context: "formatting"
456
- });
457
- case "MMMM":
458
- default:
459
- return r.month(e, {
460
- width: "wide",
461
- context: "formatting"
462
- });
463
- }
464
- },
465
- // Stand-alone month
466
- L: function(i, a, r) {
467
- var e = i.getUTCMonth();
468
- switch (a) {
469
- case "L":
470
- return String(e + 1);
471
- case "LL":
472
- return w(e + 1, 2);
473
- case "Lo":
474
- return r.ordinalNumber(e + 1, {
475
- unit: "month"
476
- });
477
- case "LLL":
478
- return r.month(e, {
479
- width: "abbreviated",
480
- context: "standalone"
481
- });
482
- case "LLLLL":
483
- return r.month(e, {
484
- width: "narrow",
485
- context: "standalone"
486
- });
487
- case "LLLL":
488
- default:
489
- return r.month(e, {
490
- width: "wide",
491
- context: "standalone"
492
- });
493
- }
494
- },
495
- // Local week of year
496
- w: function(i, a, r, e) {
497
- var o = We(i, e);
498
- return a === "wo" ? r.ordinalNumber(o, {
499
- unit: "week"
500
- }) : w(o, a.length);
501
- },
502
- // ISO week of year
503
- I: function(i, a, r) {
504
- var e = Ne(i);
505
- return a === "Io" ? r.ordinalNumber(e, {
506
- unit: "week"
507
- }) : w(e, a.length);
508
- },
509
- // Day of the month
510
- d: function(i, a, r) {
511
- return a === "do" ? r.ordinalNumber(i.getUTCDate(), {
512
- unit: "date"
513
- }) : K.d(i, a);
514
- },
515
- // Day of year
516
- D: function(i, a, r) {
517
- var e = pt(i);
518
- return a === "Do" ? r.ordinalNumber(e, {
519
- unit: "dayOfYear"
520
- }) : w(e, a.length);
521
- },
522
- // Day of week
523
- E: function(i, a, r) {
524
- var e = i.getUTCDay();
525
- switch (a) {
526
- case "E":
527
- case "EE":
528
- case "EEE":
529
- return r.day(e, {
530
- width: "abbreviated",
531
- context: "formatting"
532
- });
533
- case "EEEEE":
534
- return r.day(e, {
535
- width: "narrow",
536
- context: "formatting"
537
- });
538
- case "EEEEEE":
539
- return r.day(e, {
540
- width: "short",
541
- context: "formatting"
542
- });
543
- case "EEEE":
544
- default:
545
- return r.day(e, {
546
- width: "wide",
547
- context: "formatting"
548
- });
549
- }
550
- },
551
- // Local day of week
552
- e: function(i, a, r, e) {
553
- var o = i.getUTCDay(), n = (o - e.weekStartsOn + 8) % 7 || 7;
554
- switch (a) {
555
- case "e":
556
- return String(n);
557
- case "ee":
558
- return w(n, 2);
559
- case "eo":
560
- return r.ordinalNumber(n, {
561
- unit: "day"
562
- });
563
- case "eee":
564
- return r.day(o, {
565
- width: "abbreviated",
566
- context: "formatting"
567
- });
568
- case "eeeee":
569
- return r.day(o, {
570
- width: "narrow",
571
- context: "formatting"
572
- });
573
- case "eeeeee":
574
- return r.day(o, {
575
- width: "short",
576
- context: "formatting"
577
- });
578
- case "eeee":
579
- default:
580
- return r.day(o, {
581
- width: "wide",
582
- context: "formatting"
583
- });
584
- }
585
- },
586
- // Stand-alone local day of week
587
- c: function(i, a, r, e) {
588
- var o = i.getUTCDay(), n = (o - e.weekStartsOn + 8) % 7 || 7;
589
- switch (a) {
590
- case "c":
591
- return String(n);
592
- case "cc":
593
- return w(n, a.length);
594
- case "co":
595
- return r.ordinalNumber(n, {
596
- unit: "day"
597
- });
598
- case "ccc":
599
- return r.day(o, {
600
- width: "abbreviated",
601
- context: "standalone"
602
- });
603
- case "ccccc":
604
- return r.day(o, {
605
- width: "narrow",
606
- context: "standalone"
607
- });
608
- case "cccccc":
609
- return r.day(o, {
610
- width: "short",
611
- context: "standalone"
612
- });
613
- case "cccc":
614
- default:
615
- return r.day(o, {
616
- width: "wide",
617
- context: "standalone"
618
- });
619
- }
620
- },
621
- // ISO day of week
622
- i: function(i, a, r) {
623
- var e = i.getUTCDay(), o = e === 0 ? 7 : e;
624
- switch (a) {
625
- case "i":
626
- return String(o);
627
- case "ii":
628
- return w(o, a.length);
629
- case "io":
630
- return r.ordinalNumber(o, {
631
- unit: "day"
632
- });
633
- case "iii":
634
- return r.day(e, {
635
- width: "abbreviated",
636
- context: "formatting"
637
- });
638
- case "iiiii":
639
- return r.day(e, {
640
- width: "narrow",
641
- context: "formatting"
642
- });
643
- case "iiiiii":
644
- return r.day(e, {
645
- width: "short",
646
- context: "formatting"
647
- });
648
- case "iiii":
649
- default:
650
- return r.day(e, {
651
- width: "wide",
652
- context: "formatting"
653
- });
654
- }
655
- },
656
- // AM or PM
657
- a: function(i, a, r) {
658
- var e = i.getUTCHours(), o = e / 12 >= 1 ? "pm" : "am";
659
- switch (a) {
660
- case "a":
661
- case "aa":
662
- return r.dayPeriod(o, {
663
- width: "abbreviated",
664
- context: "formatting"
665
- });
666
- case "aaa":
667
- return r.dayPeriod(o, {
668
- width: "abbreviated",
669
- context: "formatting"
670
- }).toLowerCase();
671
- case "aaaaa":
672
- return r.dayPeriod(o, {
673
- width: "narrow",
674
- context: "formatting"
675
- });
676
- case "aaaa":
677
- default:
678
- return r.dayPeriod(o, {
679
- width: "wide",
680
- context: "formatting"
681
- });
682
- }
683
- },
684
- // AM, PM, midnight, noon
685
- b: function(i, a, r) {
686
- var e = i.getUTCHours(), o;
687
- switch (e === 12 ? o = te.noon : e === 0 ? o = te.midnight : o = e / 12 >= 1 ? "pm" : "am", a) {
688
- case "b":
689
- case "bb":
690
- return r.dayPeriod(o, {
691
- width: "abbreviated",
692
- context: "formatting"
693
- });
694
- case "bbb":
695
- return r.dayPeriod(o, {
696
- width: "abbreviated",
697
- context: "formatting"
698
- }).toLowerCase();
699
- case "bbbbb":
700
- return r.dayPeriod(o, {
701
- width: "narrow",
702
- context: "formatting"
703
- });
704
- case "bbbb":
705
- default:
706
- return r.dayPeriod(o, {
707
- width: "wide",
708
- context: "formatting"
709
- });
710
- }
711
- },
712
- // in the morning, in the afternoon, in the evening, at night
713
- B: function(i, a, r) {
714
- var e = i.getUTCHours(), o;
715
- switch (e >= 17 ? o = te.evening : e >= 12 ? o = te.afternoon : e >= 4 ? o = te.morning : o = te.night, a) {
716
- case "B":
717
- case "BB":
718
- case "BBB":
719
- return r.dayPeriod(o, {
720
- width: "abbreviated",
721
- context: "formatting"
722
- });
723
- case "BBBBB":
724
- return r.dayPeriod(o, {
725
- width: "narrow",
726
- context: "formatting"
727
- });
728
- case "BBBB":
729
- default:
730
- return r.dayPeriod(o, {
731
- width: "wide",
732
- context: "formatting"
733
- });
734
- }
735
- },
736
- // Hour [1-12]
737
- h: function(i, a, r) {
738
- if (a === "ho") {
739
- var e = i.getUTCHours() % 12;
740
- return e === 0 && (e = 12), r.ordinalNumber(e, {
741
- unit: "hour"
742
- });
743
- }
744
- return K.h(i, a);
745
- },
746
- // Hour [0-23]
747
- H: function(i, a, r) {
748
- return a === "Ho" ? r.ordinalNumber(i.getUTCHours(), {
749
- unit: "hour"
750
- }) : K.H(i, a);
751
- },
752
- // Hour [0-11]
753
- K: function(i, a, r) {
754
- var e = i.getUTCHours() % 12;
755
- return a === "Ko" ? r.ordinalNumber(e, {
756
- unit: "hour"
757
- }) : w(e, a.length);
758
- },
759
- // Hour [1-24]
760
- k: function(i, a, r) {
761
- var e = i.getUTCHours();
762
- return e === 0 && (e = 24), a === "ko" ? r.ordinalNumber(e, {
763
- unit: "hour"
764
- }) : w(e, a.length);
765
- },
766
- // Minute
767
- m: function(i, a, r) {
768
- return a === "mo" ? r.ordinalNumber(i.getUTCMinutes(), {
769
- unit: "minute"
770
- }) : K.m(i, a);
771
- },
772
- // Second
773
- s: function(i, a, r) {
774
- return a === "so" ? r.ordinalNumber(i.getUTCSeconds(), {
775
- unit: "second"
776
- }) : K.s(i, a);
777
- },
778
- // Fraction of second
779
- S: function(i, a) {
780
- return K.S(i, a);
781
- },
782
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
783
- X: function(i, a, r, e) {
784
- var o = e._originalDate || i, n = o.getTimezoneOffset();
785
- if (n === 0)
786
- return "Z";
787
- switch (a) {
788
- case "X":
789
- return Ie(n);
790
- case "XXXX":
791
- case "XX":
792
- return J(n);
793
- case "XXXXX":
794
- case "XXX":
795
- default:
796
- return J(n, ":");
797
- }
798
- },
799
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
800
- x: function(i, a, r, e) {
801
- var o = e._originalDate || i, n = o.getTimezoneOffset();
802
- switch (a) {
803
- case "x":
804
- return Ie(n);
805
- case "xxxx":
806
- case "xx":
807
- return J(n);
808
- case "xxxxx":
809
- case "xxx":
810
- default:
811
- return J(n, ":");
812
- }
813
- },
814
- // Timezone (GMT)
815
- O: function(i, a, r, e) {
816
- var o = e._originalDate || i, n = o.getTimezoneOffset();
817
- switch (a) {
818
- case "O":
819
- case "OO":
820
- case "OOO":
821
- return "GMT" + He(n, ":");
822
- case "OOOO":
823
- default:
824
- return "GMT" + J(n, ":");
825
- }
826
- },
827
- // Timezone (specific non-location)
828
- z: function(i, a, r, e) {
829
- var o = e._originalDate || i, n = o.getTimezoneOffset();
830
- switch (a) {
831
- case "z":
832
- case "zz":
833
- case "zzz":
834
- return "GMT" + He(n, ":");
835
- case "zzzz":
836
- default:
837
- return "GMT" + J(n, ":");
838
- }
839
- },
840
- // Seconds timestamp
841
- t: function(i, a, r, e) {
842
- var o = e._originalDate || i, n = Math.floor(o.getTime() / 1e3);
843
- return w(n, a.length);
844
- },
845
- // Milliseconds timestamp
846
- T: function(i, a, r, e) {
847
- var o = e._originalDate || i, n = o.getTime();
848
- return w(n, a.length);
849
- }
850
- };
851
- function He(t, i) {
852
- var a = t > 0 ? "-" : "+", r = Math.abs(t), e = Math.floor(r / 60), o = r % 60;
853
- if (o === 0)
854
- return a + String(e);
855
- var n = i;
856
- return a + String(e) + n + w(o, 2);
857
- }
858
- function Ie(t, i) {
859
- if (t % 60 === 0) {
860
- var a = t > 0 ? "-" : "+";
861
- return a + w(Math.abs(t) / 60, 2);
862
- }
863
- return J(t, i);
864
- }
865
- function J(t, i) {
866
- var a = i || "", r = t > 0 ? "-" : "+", e = Math.abs(t), o = w(Math.floor(e / 60), 2), n = w(e % 60, 2);
867
- return r + o + a + n;
868
- }
869
- const xt = _t;
870
- var Fe = function(i, a) {
871
- switch (i) {
872
- case "P":
873
- return a.date({
874
- width: "short"
875
- });
876
- case "PP":
877
- return a.date({
878
- width: "medium"
879
- });
880
- case "PPP":
881
- return a.date({
882
- width: "long"
883
- });
884
- case "PPPP":
885
- default:
886
- return a.date({
887
- width: "full"
888
- });
889
- }
890
- }, Be = function(i, a) {
891
- switch (i) {
892
- case "p":
893
- return a.time({
894
- width: "short"
895
- });
896
- case "pp":
897
- return a.time({
898
- width: "medium"
899
- });
900
- case "ppp":
901
- return a.time({
902
- width: "long"
903
- });
904
- case "pppp":
905
- default:
906
- return a.time({
907
- width: "full"
908
- });
909
- }
910
- }, Tt = function(i, a) {
911
- var r = i.match(/(P+)(p+)?/) || [], e = r[1], o = r[2];
912
- if (!o)
913
- return Fe(i, a);
914
- var n;
915
- switch (e) {
916
- case "P":
917
- n = a.dateTime({
918
- width: "short"
919
- });
920
- break;
921
- case "PP":
922
- n = a.dateTime({
923
- width: "medium"
924
- });
925
- break;
926
- case "PPP":
927
- n = a.dateTime({
928
- width: "long"
929
- });
930
- break;
931
- case "PPPP":
932
- default:
933
- n = a.dateTime({
934
- width: "full"
935
- });
936
- break;
937
- }
938
- return n.replace("{{date}}", Fe(e, a)).replace("{{time}}", Be(o, a));
939
- }, kt = {
940
- p: Be,
941
- P: Tt
942
- };
943
- const _e = kt;
944
- function Qe(t) {
945
- var i = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
946
- return i.setUTCFullYear(t.getFullYear()), t.getTime() - i.getTime();
947
- }
948
- var Ct = ["D", "DD"], Vt = ["YY", "YYYY"];
949
- function ze(t) {
950
- return Ct.indexOf(t) !== -1;
951
- }
952
- function Ge(t) {
953
- return Vt.indexOf(t) !== -1;
954
- }
955
- function pe(t, i, a) {
956
- if (t === "YYYY")
957
- throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(i, "`) for formatting years to the input `").concat(a, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
958
- if (t === "YY")
959
- throw new RangeError("Use `yy` instead of `YY` (in `".concat(i, "`) for formatting years to the input `").concat(a, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
960
- if (t === "D")
961
- throw new RangeError("Use `d` instead of `D` (in `".concat(i, "`) for formatting days of the month to the input `").concat(a, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
962
- if (t === "DD")
963
- throw new RangeError("Use `dd` instead of `DD` (in `".concat(i, "`) for formatting days of the month to the input `").concat(a, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
964
- }
965
- var Mt = {
966
- lessThanXSeconds: {
967
- one: "less than a second",
968
- other: "less than {{count}} seconds"
969
- },
970
- xSeconds: {
971
- one: "1 second",
972
- other: "{{count}} seconds"
973
- },
974
- halfAMinute: "half a minute",
975
- lessThanXMinutes: {
976
- one: "less than a minute",
977
- other: "less than {{count}} minutes"
978
- },
979
- xMinutes: {
980
- one: "1 minute",
981
- other: "{{count}} minutes"
982
- },
983
- aboutXHours: {
984
- one: "about 1 hour",
985
- other: "about {{count}} hours"
986
- },
987
- xHours: {
988
- one: "1 hour",
989
- other: "{{count}} hours"
990
- },
991
- xDays: {
992
- one: "1 day",
993
- other: "{{count}} days"
994
- },
995
- aboutXWeeks: {
996
- one: "about 1 week",
997
- other: "about {{count}} weeks"
998
- },
999
- xWeeks: {
1000
- one: "1 week",
1001
- other: "{{count}} weeks"
1002
- },
1003
- aboutXMonths: {
1004
- one: "about 1 month",
1005
- other: "about {{count}} months"
1006
- },
1007
- xMonths: {
1008
- one: "1 month",
1009
- other: "{{count}} months"
1010
- },
1011
- aboutXYears: {
1012
- one: "about 1 year",
1013
- other: "about {{count}} years"
1014
- },
1015
- xYears: {
1016
- one: "1 year",
1017
- other: "{{count}} years"
1018
- },
1019
- overXYears: {
1020
- one: "over 1 year",
1021
- other: "over {{count}} years"
1022
- },
1023
- almostXYears: {
1024
- one: "almost 1 year",
1025
- other: "almost {{count}} years"
1026
- }
1027
- }, Pt = function(i, a, r) {
1028
- var e, o = Mt[i];
1029
- return typeof o == "string" ? e = o : a === 1 ? e = o.one : e = o.other.replace("{{count}}", a.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + e : e + " ago" : e;
1030
- };
1031
- const Dt = Pt;
1032
- function we(t) {
1033
- return function() {
1034
- var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = i.width ? String(i.width) : t.defaultWidth, r = t.formats[a] || t.formats[t.defaultWidth];
1035
- return r;
1036
- };
1037
- }
1038
- var Et = {
1039
- full: "EEEE, MMMM do, y",
1040
- long: "MMMM do, y",
1041
- medium: "MMM d, y",
1042
- short: "MM/dd/yyyy"
1043
- }, Ot = {
1044
- full: "h:mm:ss a zzzz",
1045
- long: "h:mm:ss a z",
1046
- medium: "h:mm:ss a",
1047
- short: "h:mm a"
1048
- }, St = {
1049
- full: "{{date}} 'at' {{time}}",
1050
- long: "{{date}} 'at' {{time}}",
1051
- medium: "{{date}}, {{time}}",
1052
- short: "{{date}}, {{time}}"
1053
- }, Ht = {
1054
- date: we({
1055
- formats: Et,
1056
- defaultWidth: "full"
1057
- }),
1058
- time: we({
1059
- formats: Ot,
1060
- defaultWidth: "full"
1061
- }),
1062
- dateTime: we({
1063
- formats: St,
1064
- defaultWidth: "full"
1065
- })
1066
- };
1067
- const It = Ht;
1068
- var Ft = {
1069
- lastWeek: "'last' eeee 'at' p",
1070
- yesterday: "'yesterday at' p",
1071
- today: "'today at' p",
1072
- tomorrow: "'tomorrow at' p",
1073
- nextWeek: "eeee 'at' p",
1074
- other: "P"
1075
- }, Rt = function(i, a, r, e) {
1076
- return Ft[i];
1077
- };
1078
- const Ut = Rt;
1079
- function le(t) {
1080
- return function(i, a) {
1081
- var r = a != null && a.context ? String(a.context) : "standalone", e;
1082
- if (r === "formatting" && t.formattingValues) {
1083
- var o = t.defaultFormattingWidth || t.defaultWidth, n = a != null && a.width ? String(a.width) : o;
1084
- e = t.formattingValues[n] || t.formattingValues[o];
1085
- } else {
1086
- var s = t.defaultWidth, c = a != null && a.width ? String(a.width) : t.defaultWidth;
1087
- e = t.values[c] || t.values[s];
1088
- }
1089
- var h = t.argumentCallback ? t.argumentCallback(i) : i;
1090
- return e[h];
1091
- };
1092
- }
1093
- var $t = {
1094
- narrow: ["B", "A"],
1095
- abbreviated: ["BC", "AD"],
1096
- wide: ["Before Christ", "Anno Domini"]
1097
- }, Lt = {
1098
- narrow: ["1", "2", "3", "4"],
1099
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1100
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
1101
- }, Yt = {
1102
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1103
- abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
1104
- wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
1105
- }, qt = {
1106
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
1107
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1108
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1109
- wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
1110
- }, At = {
1111
- narrow: {
1112
- am: "a",
1113
- pm: "p",
1114
- midnight: "mi",
1115
- noon: "n",
1116
- morning: "morning",
1117
- afternoon: "afternoon",
1118
- evening: "evening",
1119
- night: "night"
1120
- },
1121
- abbreviated: {
1122
- am: "AM",
1123
- pm: "PM",
1124
- midnight: "midnight",
1125
- noon: "noon",
1126
- morning: "morning",
1127
- afternoon: "afternoon",
1128
- evening: "evening",
1129
- night: "night"
1130
- },
1131
- wide: {
1132
- am: "a.m.",
1133
- pm: "p.m.",
1134
- midnight: "midnight",
1135
- noon: "noon",
1136
- morning: "morning",
1137
- afternoon: "afternoon",
1138
- evening: "evening",
1139
- night: "night"
1140
- }
1141
- }, Nt = {
1142
- narrow: {
1143
- am: "a",
1144
- pm: "p",
1145
- midnight: "mi",
1146
- noon: "n",
1147
- morning: "in the morning",
1148
- afternoon: "in the afternoon",
1149
- evening: "in the evening",
1150
- night: "at night"
1151
- },
1152
- abbreviated: {
1153
- am: "AM",
1154
- pm: "PM",
1155
- midnight: "midnight",
1156
- noon: "noon",
1157
- morning: "in the morning",
1158
- afternoon: "in the afternoon",
1159
- evening: "in the evening",
1160
- night: "at night"
1161
- },
1162
- wide: {
1163
- am: "a.m.",
1164
- pm: "p.m.",
1165
- midnight: "midnight",
1166
- noon: "noon",
1167
- morning: "in the morning",
1168
- afternoon: "in the afternoon",
1169
- evening: "in the evening",
1170
- night: "at night"
1171
- }
1172
- }, Wt = function(i, a) {
1173
- var r = Number(i), e = r % 100;
1174
- if (e > 20 || e < 10)
1175
- switch (e % 10) {
1176
- case 1:
1177
- return r + "st";
1178
- case 2:
1179
- return r + "nd";
1180
- case 3:
1181
- return r + "rd";
1182
- }
1183
- return r + "th";
1184
- }, Bt = {
1185
- ordinalNumber: Wt,
1186
- era: le({
1187
- values: $t,
1188
- defaultWidth: "wide"
1189
- }),
1190
- quarter: le({
1191
- values: Lt,
1192
- defaultWidth: "wide",
1193
- argumentCallback: function(i) {
1194
- return i - 1;
1195
- }
1196
- }),
1197
- month: le({
1198
- values: Yt,
1199
- defaultWidth: "wide"
1200
- }),
1201
- day: le({
1202
- values: qt,
1203
- defaultWidth: "wide"
1204
- }),
1205
- dayPeriod: le({
1206
- values: At,
1207
- defaultWidth: "wide",
1208
- formattingValues: Nt,
1209
- defaultFormattingWidth: "wide"
1210
- })
1211
- };
1212
- const Qt = Bt;
1213
- function ue(t) {
1214
- return function(i) {
1215
- var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = a.width, e = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], o = i.match(e);
1216
- if (!o)
1217
- return null;
1218
- var n = o[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? Gt(s, function(y) {
1219
- return y.test(n);
1220
- }) : zt(s, function(y) {
1221
- return y.test(n);
1222
- }), h;
1223
- h = t.valueCallback ? t.valueCallback(c) : c, h = a.valueCallback ? a.valueCallback(h) : h;
1224
- var g = i.slice(n.length);
1225
- return {
1226
- value: h,
1227
- rest: g
1228
- };
1229
- };
1230
- }
1231
- function zt(t, i) {
1232
- for (var a in t)
1233
- if (t.hasOwnProperty(a) && i(t[a]))
1234
- return a;
1235
- }
1236
- function Gt(t, i) {
1237
- for (var a = 0; a < t.length; a++)
1238
- if (i(t[a]))
1239
- return a;
1240
- }
1241
- function jt(t) {
1242
- return function(i) {
1243
- var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = i.match(t.matchPattern);
1244
- if (!r)
1245
- return null;
1246
- var e = r[0], o = i.match(t.parsePattern);
1247
- if (!o)
1248
- return null;
1249
- var n = t.valueCallback ? t.valueCallback(o[0]) : o[0];
1250
- n = a.valueCallback ? a.valueCallback(n) : n;
1251
- var s = i.slice(e.length);
1252
- return {
1253
- value: n,
1254
- rest: s
1255
- };
1256
- };
1257
- }
1258
- var Xt = /^(\d+)(th|st|nd|rd)?/i, Kt = /\d+/i, Zt = {
1259
- narrow: /^(b|a)/i,
1260
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1261
- wide: /^(before christ|before common era|anno domini|common era)/i
1262
- }, Jt = {
1263
- any: [/^b/i, /^(a|c)/i]
1264
- }, ei = {
1265
- narrow: /^[1234]/i,
1266
- abbreviated: /^q[1234]/i,
1267
- wide: /^[1234](th|st|nd|rd)? quarter/i
1268
- }, ti = {
1269
- any: [/1/i, /2/i, /3/i, /4/i]
1270
- }, ii = {
1271
- narrow: /^[jfmasond]/i,
1272
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1273
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1274
- }, ai = {
1275
- narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
1276
- any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
1277
- }, ri = {
1278
- narrow: /^[smtwf]/i,
1279
- short: /^(su|mo|tu|we|th|fr|sa)/i,
1280
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1281
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1282
- }, ni = {
1283
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1284
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1285
- }, oi = {
1286
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1287
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1288
- }, si = {
1289
- any: {
1290
- am: /^a/i,
1291
- pm: /^p/i,
1292
- midnight: /^mi/i,
1293
- noon: /^no/i,
1294
- morning: /morning/i,
1295
- afternoon: /afternoon/i,
1296
- evening: /evening/i,
1297
- night: /night/i
1298
- }
1299
- }, li = {
1300
- ordinalNumber: jt({
1301
- matchPattern: Xt,
1302
- parsePattern: Kt,
1303
- valueCallback: function(i) {
1304
- return parseInt(i, 10);
1305
- }
1306
- }),
1307
- era: ue({
1308
- matchPatterns: Zt,
1309
- defaultMatchWidth: "wide",
1310
- parsePatterns: Jt,
1311
- defaultParseWidth: "any"
1312
- }),
1313
- quarter: ue({
1314
- matchPatterns: ei,
1315
- defaultMatchWidth: "wide",
1316
- parsePatterns: ti,
1317
- defaultParseWidth: "any",
1318
- valueCallback: function(i) {
1319
- return i + 1;
1320
- }
1321
- }),
1322
- month: ue({
1323
- matchPatterns: ii,
1324
- defaultMatchWidth: "wide",
1325
- parsePatterns: ai,
1326
- defaultParseWidth: "any"
1327
- }),
1328
- day: ue({
1329
- matchPatterns: ri,
1330
- defaultMatchWidth: "wide",
1331
- parsePatterns: ni,
1332
- defaultParseWidth: "any"
1333
- }),
1334
- dayPeriod: ue({
1335
- matchPatterns: oi,
1336
- defaultMatchWidth: "any",
1337
- parsePatterns: si,
1338
- defaultParseWidth: "any"
1339
- })
1340
- };
1341
- const ui = li;
1342
- var di = {
1343
- code: "en-US",
1344
- formatDistance: Dt,
1345
- formatLong: It,
1346
- formatRelative: Ut,
1347
- localize: Qt,
1348
- match: ui,
1349
- options: {
1350
- weekStartsOn: 0,
1351
- firstWeekContainsDate: 1
1352
- }
1353
- };
1354
- const je = di;
1355
- var ci = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, hi = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, fi = /^'([^]*?)'?$/, pi = /''/g, vi = /[a-zA-Z]/;
1356
- function mi(t, i, a) {
1357
- var r, e, o, n, s, c, h, g, y, C, T, O, Y, U;
1358
- M(2, arguments);
1359
- var W = String(i), F = ae(), q = (r = (e = void 0) !== null && e !== void 0 ? e : F.locale) !== null && r !== void 0 ? r : je, B = R((o = (n = (s = (c = void 0) !== null && c !== void 0 ? c : void 0) !== null && s !== void 0 ? s : F.firstWeekContainsDate) !== null && n !== void 0 ? n : (h = F.locale) === null || h === void 0 || (g = h.options) === null || g === void 0 ? void 0 : g.firstWeekContainsDate) !== null && o !== void 0 ? o : 1);
1360
- if (!(B >= 1 && B <= 7))
1361
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
1362
- var j = R((y = (C = (T = (O = void 0) !== null && O !== void 0 ? O : void 0) !== null && T !== void 0 ? T : F.weekStartsOn) !== null && C !== void 0 ? C : (Y = F.locale) === null || Y === void 0 || (U = Y.options) === null || U === void 0 ? void 0 : U.weekStartsOn) !== null && y !== void 0 ? y : 0);
1363
- if (!(j >= 0 && j <= 6))
1364
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
1365
- if (!q.localize)
1366
- throw new RangeError("locale must contain localize property");
1367
- if (!q.formatLong)
1368
- throw new RangeError("locale must contain formatLong property");
1369
- var X = E(t);
1370
- if (!ct(X))
1371
- throw new RangeError("Invalid time value");
1372
- var re = Qe(X), ne = qe(X, re), oe = {
1373
- firstWeekContainsDate: B,
1374
- weekStartsOn: j,
1375
- locale: q,
1376
- _originalDate: X
1377
- }, ge = W.match(hi).map(function(I) {
1378
- var $ = I[0];
1379
- if ($ === "p" || $ === "P") {
1380
- var Z = _e[$];
1381
- return Z(I, q.formatLong);
1382
- }
1383
- return I;
1384
- }).join("").match(ci).map(function(I) {
1385
- if (I === "''")
1386
- return "'";
1387
- var $ = I[0];
1388
- if ($ === "'")
1389
- return gi(I);
1390
- var Z = xt[$];
1391
- if (Z)
1392
- return Ge(I) && pe(I, i, String(t)), ze(I) && pe(I, i, String(t)), Z(ne, I, q.localize, oe);
1393
- if ($.match(vi))
1394
- throw new RangeError("Format string contains an unescaped latin alphabet character `" + $ + "`");
1395
- return I;
1396
- }).join("");
1397
- return ge;
1398
- }
1399
- function gi(t) {
1400
- var i = t.match(fi);
1401
- return i ? i[1].replace(pi, "'") : t;
1402
- }
1403
- function Re(t, i) {
1404
- (i == null || i > t.length) && (i = t.length);
1405
- for (var a = 0, r = Array(i); a < i; a++)
1406
- r[a] = t[a];
1407
- return r;
1408
- }
1409
- function yi(t, i) {
1410
- if (t) {
1411
- if (typeof t == "string")
1412
- return Re(t, i);
1413
- var a = {}.toString.call(t).slice(8, -1);
1414
- return a === "Object" && t.constructor && (a = t.constructor.name), a === "Map" || a === "Set" ? Array.from(t) : a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a) ? Re(t, i) : void 0;
1415
- }
1416
- }
1417
- function Ue(t, i) {
1418
- var a = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1419
- if (!a) {
1420
- if (Array.isArray(t) || (a = yi(t)) || i) {
1421
- a && (t = a);
1422
- var r = 0, e = function() {
1423
- };
1424
- return {
1425
- s: e,
1426
- n: function() {
1427
- return r >= t.length ? {
1428
- done: !0
1429
- } : {
1430
- done: !1,
1431
- value: t[r++]
1432
- };
1433
- },
1434
- e: function(h) {
1435
- throw h;
1436
- },
1437
- f: e
1438
- };
1439
- }
1440
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1441
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1442
- }
1443
- var o, n = !0, s = !1;
1444
- return {
1445
- s: function() {
1446
- a = a.call(t);
1447
- },
1448
- n: function() {
1449
- var h = a.next();
1450
- return n = h.done, h;
1451
- },
1452
- e: function(h) {
1453
- s = !0, o = h;
1454
- },
1455
- f: function() {
1456
- try {
1457
- n || a.return == null || a.return();
1458
- } finally {
1459
- if (s)
1460
- throw o;
1461
- }
1462
- }
1463
- };
1464
- }
1465
- function bi(t, i) {
1466
- if (t == null)
1467
- throw new TypeError("assign requires that input parameter not be null or undefined");
1468
- for (var a in i)
1469
- Object.prototype.hasOwnProperty.call(i, a) && (t[a] = i[a]);
1470
- return t;
1471
- }
1472
- function d(t) {
1473
- if (t === void 0)
1474
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1475
- return t;
1476
- }
1477
- function xe(t, i) {
1478
- return xe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(a, r) {
1479
- return a.__proto__ = r, a;
1480
- }, xe(t, i);
1481
- }
1482
- function v(t, i) {
1483
- if (typeof i != "function" && i !== null)
1484
- throw new TypeError("Super expression must either be null or a function");
1485
- t.prototype = Object.create(i && i.prototype, {
1486
- constructor: {
1487
- value: t,
1488
- writable: !0,
1489
- configurable: !0
1490
- }
1491
- }), Object.defineProperty(t, "prototype", {
1492
- writable: !1
1493
- }), i && xe(t, i);
1494
- }
1495
- function ve(t) {
1496
- return ve = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(i) {
1497
- return i.__proto__ || Object.getPrototypeOf(i);
1498
- }, ve(t);
1499
- }
1500
- function Xe() {
1501
- try {
1502
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1503
- }));
1504
- } catch {
1505
- }
1506
- return (Xe = function() {
1507
- return !!t;
1508
- })();
1509
- }
1510
- function wi(t, i) {
1511
- if (i && (Q(i) == "object" || typeof i == "function"))
1512
- return i;
1513
- if (i !== void 0)
1514
- throw new TypeError("Derived constructors may only return object or undefined");
1515
- return d(t);
1516
- }
1517
- function m(t) {
1518
- var i = Xe();
1519
- return function() {
1520
- var a, r = ve(t);
1521
- if (i) {
1522
- var e = ve(this).constructor;
1523
- a = Reflect.construct(r, arguments, e);
1524
- } else
1525
- a = r.apply(this, arguments);
1526
- return wi(this, a);
1527
- };
1528
- }
1529
- function f(t, i) {
1530
- if (!(t instanceof i))
1531
- throw new TypeError("Cannot call a class as a function");
1532
- }
1533
- function _i(t, i) {
1534
- if (Q(t) != "object" || !t)
1535
- return t;
1536
- var a = t[Symbol.toPrimitive];
1537
- if (a !== void 0) {
1538
- var r = a.call(t, i);
1539
- if (Q(r) != "object")
1540
- return r;
1541
- throw new TypeError("@@toPrimitive must return a primitive value.");
1542
- }
1543
- return (i === "string" ? String : Number)(t);
1544
- }
1545
- function Ke(t) {
1546
- var i = _i(t, "string");
1547
- return Q(i) == "symbol" ? i : i + "";
1548
- }
1549
- function xi(t, i) {
1550
- for (var a = 0; a < i.length; a++) {
1551
- var r = i[a];
1552
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, Ke(r.key), r);
1553
- }
1554
- }
1555
- function p(t, i, a) {
1556
- return i && xi(t.prototype, i), Object.defineProperty(t, "prototype", {
1557
- writable: !1
1558
- }), t;
1559
- }
1560
- function u(t, i, a) {
1561
- return (i = Ke(i)) in t ? Object.defineProperty(t, i, {
1562
- value: a,
1563
- enumerable: !0,
1564
- configurable: !0,
1565
- writable: !0
1566
- }) : t[i] = a, t;
1567
- }
1568
- var Ti = 10, Ze = /* @__PURE__ */ function() {
1569
- function t() {
1570
- f(this, t), u(this, "priority", void 0), u(this, "subPriority", 0);
1571
- }
1572
- return p(t, [{
1573
- key: "validate",
1574
- value: function(a, r) {
1575
- return !0;
1576
- }
1577
- }]), t;
1578
- }(), ki = /* @__PURE__ */ function(t) {
1579
- v(a, t);
1580
- var i = m(a);
1581
- function a(r, e, o, n, s) {
1582
- var c;
1583
- return f(this, a), c = i.call(this), c.value = r, c.validateValue = e, c.setValue = o, c.priority = n, s && (c.subPriority = s), c;
1584
- }
1585
- return p(a, [{
1586
- key: "validate",
1587
- value: function(e, o) {
1588
- return this.validateValue(e, this.value, o);
1589
- }
1590
- }, {
1591
- key: "set",
1592
- value: function(e, o, n) {
1593
- return this.setValue(e, o, this.value, n);
1594
- }
1595
- }]), a;
1596
- }(Ze), Ci = /* @__PURE__ */ function(t) {
1597
- v(a, t);
1598
- var i = m(a);
1599
- function a() {
1600
- var r;
1601
- f(this, a);
1602
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1603
- o[n] = arguments[n];
1604
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", Ti), u(d(r), "subPriority", -1), r;
1605
- }
1606
- return p(a, [{
1607
- key: "set",
1608
- value: function(e, o) {
1609
- if (o.timestampIsSet)
1610
- return e;
1611
- var n = /* @__PURE__ */ new Date(0);
1612
- return n.setFullYear(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()), n.setHours(e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds()), n;
1613
- }
1614
- }]), a;
1615
- }(Ze), b = /* @__PURE__ */ function() {
1616
- function t() {
1617
- f(this, t), u(this, "incompatibleTokens", void 0), u(this, "priority", void 0), u(this, "subPriority", void 0);
1618
- }
1619
- return p(t, [{
1620
- key: "run",
1621
- value: function(a, r, e, o) {
1622
- var n = this.parse(a, r, e, o);
1623
- return n ? {
1624
- setter: new ki(n.value, this.validate, this.set, this.priority, this.subPriority),
1625
- rest: n.rest
1626
- } : null;
1627
- }
1628
- }, {
1629
- key: "validate",
1630
- value: function(a, r, e) {
1631
- return !0;
1632
- }
1633
- }]), t;
1634
- }(), Vi = /* @__PURE__ */ function(t) {
1635
- v(a, t);
1636
- var i = m(a);
1637
- function a() {
1638
- var r;
1639
- f(this, a);
1640
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1641
- o[n] = arguments[n];
1642
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 140), u(d(r), "incompatibleTokens", ["R", "u", "t", "T"]), r;
1643
- }
1644
- return p(a, [{
1645
- key: "parse",
1646
- value: function(e, o, n) {
1647
- switch (o) {
1648
- case "G":
1649
- case "GG":
1650
- case "GGG":
1651
- return n.era(e, {
1652
- width: "abbreviated"
1653
- }) || n.era(e, {
1654
- width: "narrow"
1655
- });
1656
- case "GGGGG":
1657
- return n.era(e, {
1658
- width: "narrow"
1659
- });
1660
- case "GGGG":
1661
- default:
1662
- return n.era(e, {
1663
- width: "wide"
1664
- }) || n.era(e, {
1665
- width: "abbreviated"
1666
- }) || n.era(e, {
1667
- width: "narrow"
1668
- });
1669
- }
1670
- }
1671
- }, {
1672
- key: "set",
1673
- value: function(e, o, n) {
1674
- return o.era = n, e.setUTCFullYear(n, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1675
- }
1676
- }]), a;
1677
- }(b), Mi = 6e4, Pi = 36e5, Di = 1e3, P = {
1678
- month: /^(1[0-2]|0?\d)/,
1679
- // 0 to 12
1680
- date: /^(3[0-1]|[0-2]?\d)/,
1681
- // 0 to 31
1682
- dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
1683
- // 0 to 366
1684
- week: /^(5[0-3]|[0-4]?\d)/,
1685
- // 0 to 53
1686
- hour23h: /^(2[0-3]|[0-1]?\d)/,
1687
- // 0 to 23
1688
- hour24h: /^(2[0-4]|[0-1]?\d)/,
1689
- // 0 to 24
1690
- hour11h: /^(1[0-1]|0?\d)/,
1691
- // 0 to 11
1692
- hour12h: /^(1[0-2]|0?\d)/,
1693
- // 0 to 12
1694
- minute: /^[0-5]?\d/,
1695
- // 0 to 59
1696
- second: /^[0-5]?\d/,
1697
- // 0 to 59
1698
- singleDigit: /^\d/,
1699
- // 0 to 9
1700
- twoDigits: /^\d{1,2}/,
1701
- // 0 to 99
1702
- threeDigits: /^\d{1,3}/,
1703
- // 0 to 999
1704
- fourDigits: /^\d{1,4}/,
1705
- // 0 to 9999
1706
- anyDigitsSigned: /^-?\d+/,
1707
- singleDigitSigned: /^-?\d/,
1708
- // 0 to 9, -0 to -9
1709
- twoDigitsSigned: /^-?\d{1,2}/,
1710
- // 0 to 99, -0 to -99
1711
- threeDigitsSigned: /^-?\d{1,3}/,
1712
- // 0 to 999, -0 to -999
1713
- fourDigitsSigned: /^-?\d{1,4}/
1714
- // 0 to 9999, -0 to -9999
1715
- }, A = {
1716
- basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
1717
- basic: /^([+-])(\d{2})(\d{2})|Z/,
1718
- basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
1719
- extended: /^([+-])(\d{2}):(\d{2})|Z/,
1720
- extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
1721
- };
1722
- function D(t, i) {
1723
- return t && {
1724
- value: i(t.value),
1725
- rest: t.rest
1726
- };
1727
- }
1728
- function k(t, i) {
1729
- var a = i.match(t);
1730
- return a ? {
1731
- value: parseInt(a[0], 10),
1732
- rest: i.slice(a[0].length)
1733
- } : null;
1734
- }
1735
- function N(t, i) {
1736
- var a = i.match(t);
1737
- if (!a)
1738
- return null;
1739
- if (a[0] === "Z")
1740
- return {
1741
- value: 0,
1742
- rest: i.slice(1)
1743
- };
1744
- var r = a[1] === "+" ? 1 : -1, e = a[2] ? parseInt(a[2], 10) : 0, o = a[3] ? parseInt(a[3], 10) : 0, n = a[5] ? parseInt(a[5], 10) : 0;
1745
- return {
1746
- value: r * (e * Pi + o * Mi + n * Di),
1747
- rest: i.slice(a[0].length)
1748
- };
1749
- }
1750
- function Je(t) {
1751
- return k(P.anyDigitsSigned, t);
1752
- }
1753
- function V(t, i) {
1754
- switch (t) {
1755
- case 1:
1756
- return k(P.singleDigit, i);
1757
- case 2:
1758
- return k(P.twoDigits, i);
1759
- case 3:
1760
- return k(P.threeDigits, i);
1761
- case 4:
1762
- return k(P.fourDigits, i);
1763
- default:
1764
- return k(new RegExp("^\\d{1," + t + "}"), i);
1765
- }
1766
- }
1767
- function me(t, i) {
1768
- switch (t) {
1769
- case 1:
1770
- return k(P.singleDigitSigned, i);
1771
- case 2:
1772
- return k(P.twoDigitsSigned, i);
1773
- case 3:
1774
- return k(P.threeDigitsSigned, i);
1775
- case 4:
1776
- return k(P.fourDigitsSigned, i);
1777
- default:
1778
- return k(new RegExp("^-?\\d{1," + t + "}"), i);
1779
- }
1780
- }
1781
- function ke(t) {
1782
- switch (t) {
1783
- case "morning":
1784
- return 4;
1785
- case "evening":
1786
- return 17;
1787
- case "pm":
1788
- case "noon":
1789
- case "afternoon":
1790
- return 12;
1791
- case "am":
1792
- case "midnight":
1793
- case "night":
1794
- default:
1795
- return 0;
1796
- }
1797
- }
1798
- function et(t, i) {
1799
- var a = i > 0, r = a ? i : 1 - i, e;
1800
- if (r <= 50)
1801
- e = t || 100;
1802
- else {
1803
- var o = r + 50, n = Math.floor(o / 100) * 100, s = t >= o % 100;
1804
- e = t + n - (s ? 100 : 0);
1805
- }
1806
- return a ? e : 1 - e;
1807
- }
1808
- function tt(t) {
1809
- return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
1810
- }
1811
- var Ei = /* @__PURE__ */ function(t) {
1812
- v(a, t);
1813
- var i = m(a);
1814
- function a() {
1815
- var r;
1816
- f(this, a);
1817
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1818
- o[n] = arguments[n];
1819
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 130), u(d(r), "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]), r;
1820
- }
1821
- return p(a, [{
1822
- key: "parse",
1823
- value: function(e, o, n) {
1824
- var s = function(h) {
1825
- return {
1826
- year: h,
1827
- isTwoDigitYear: o === "yy"
1828
- };
1829
- };
1830
- switch (o) {
1831
- case "y":
1832
- return D(V(4, e), s);
1833
- case "yo":
1834
- return D(n.ordinalNumber(e, {
1835
- unit: "year"
1836
- }), s);
1837
- default:
1838
- return D(V(o.length, e), s);
1839
- }
1840
- }
1841
- }, {
1842
- key: "validate",
1843
- value: function(e, o) {
1844
- return o.isTwoDigitYear || o.year > 0;
1845
- }
1846
- }, {
1847
- key: "set",
1848
- value: function(e, o, n) {
1849
- var s = e.getUTCFullYear();
1850
- if (n.isTwoDigitYear) {
1851
- var c = et(n.year, s);
1852
- return e.setUTCFullYear(c, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1853
- }
1854
- var h = !("era" in o) || o.era === 1 ? n.year : 1 - n.year;
1855
- return e.setUTCFullYear(h, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1856
- }
1857
- }]), a;
1858
- }(b), Oi = /* @__PURE__ */ function(t) {
1859
- v(a, t);
1860
- var i = m(a);
1861
- function a() {
1862
- var r;
1863
- f(this, a);
1864
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1865
- o[n] = arguments[n];
1866
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 130), u(d(r), "incompatibleTokens", ["y", "R", "u", "Q", "q", "M", "L", "I", "d", "D", "i", "t", "T"]), r;
1867
- }
1868
- return p(a, [{
1869
- key: "parse",
1870
- value: function(e, o, n) {
1871
- var s = function(h) {
1872
- return {
1873
- year: h,
1874
- isTwoDigitYear: o === "YY"
1875
- };
1876
- };
1877
- switch (o) {
1878
- case "Y":
1879
- return D(V(4, e), s);
1880
- case "Yo":
1881
- return D(n.ordinalNumber(e, {
1882
- unit: "year"
1883
- }), s);
1884
- default:
1885
- return D(V(o.length, e), s);
1886
- }
1887
- }
1888
- }, {
1889
- key: "validate",
1890
- value: function(e, o) {
1891
- return o.isTwoDigitYear || o.year > 0;
1892
- }
1893
- }, {
1894
- key: "set",
1895
- value: function(e, o, n, s) {
1896
- var c = Te(e, s);
1897
- if (n.isTwoDigitYear) {
1898
- var h = et(n.year, c);
1899
- return e.setUTCFullYear(h, 0, s.firstWeekContainsDate), e.setUTCHours(0, 0, 0, 0), ee(e, s);
1900
- }
1901
- var g = !("era" in o) || o.era === 1 ? n.year : 1 - n.year;
1902
- return e.setUTCFullYear(g, 0, s.firstWeekContainsDate), e.setUTCHours(0, 0, 0, 0), ee(e, s);
1903
- }
1904
- }]), a;
1905
- }(b), Si = /* @__PURE__ */ function(t) {
1906
- v(a, t);
1907
- var i = m(a);
1908
- function a() {
1909
- var r;
1910
- f(this, a);
1911
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1912
- o[n] = arguments[n];
1913
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 130), u(d(r), "incompatibleTokens", ["G", "y", "Y", "u", "Q", "q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]), r;
1914
- }
1915
- return p(a, [{
1916
- key: "parse",
1917
- value: function(e, o) {
1918
- return me(o === "R" ? 4 : o.length, e);
1919
- }
1920
- }, {
1921
- key: "set",
1922
- value: function(e, o, n) {
1923
- var s = /* @__PURE__ */ new Date(0);
1924
- return s.setUTCFullYear(n, 0, 4), s.setUTCHours(0, 0, 0, 0), ie(s);
1925
- }
1926
- }]), a;
1927
- }(b), Hi = /* @__PURE__ */ function(t) {
1928
- v(a, t);
1929
- var i = m(a);
1930
- function a() {
1931
- var r;
1932
- f(this, a);
1933
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1934
- o[n] = arguments[n];
1935
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 130), u(d(r), "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]), r;
1936
- }
1937
- return p(a, [{
1938
- key: "parse",
1939
- value: function(e, o) {
1940
- return me(o === "u" ? 4 : o.length, e);
1941
- }
1942
- }, {
1943
- key: "set",
1944
- value: function(e, o, n) {
1945
- return e.setUTCFullYear(n, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1946
- }
1947
- }]), a;
1948
- }(b), Ii = /* @__PURE__ */ function(t) {
1949
- v(a, t);
1950
- var i = m(a);
1951
- function a() {
1952
- var r;
1953
- f(this, a);
1954
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1955
- o[n] = arguments[n];
1956
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 120), u(d(r), "incompatibleTokens", ["Y", "R", "q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]), r;
1957
- }
1958
- return p(a, [{
1959
- key: "parse",
1960
- value: function(e, o, n) {
1961
- switch (o) {
1962
- case "Q":
1963
- case "QQ":
1964
- return V(o.length, e);
1965
- case "Qo":
1966
- return n.ordinalNumber(e, {
1967
- unit: "quarter"
1968
- });
1969
- case "QQQ":
1970
- return n.quarter(e, {
1971
- width: "abbreviated",
1972
- context: "formatting"
1973
- }) || n.quarter(e, {
1974
- width: "narrow",
1975
- context: "formatting"
1976
- });
1977
- case "QQQQQ":
1978
- return n.quarter(e, {
1979
- width: "narrow",
1980
- context: "formatting"
1981
- });
1982
- case "QQQQ":
1983
- default:
1984
- return n.quarter(e, {
1985
- width: "wide",
1986
- context: "formatting"
1987
- }) || n.quarter(e, {
1988
- width: "abbreviated",
1989
- context: "formatting"
1990
- }) || n.quarter(e, {
1991
- width: "narrow",
1992
- context: "formatting"
1993
- });
1994
- }
1995
- }
1996
- }, {
1997
- key: "validate",
1998
- value: function(e, o) {
1999
- return o >= 1 && o <= 4;
2000
- }
2001
- }, {
2002
- key: "set",
2003
- value: function(e, o, n) {
2004
- return e.setUTCMonth((n - 1) * 3, 1), e.setUTCHours(0, 0, 0, 0), e;
2005
- }
2006
- }]), a;
2007
- }(b), Fi = /* @__PURE__ */ function(t) {
2008
- v(a, t);
2009
- var i = m(a);
2010
- function a() {
2011
- var r;
2012
- f(this, a);
2013
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2014
- o[n] = arguments[n];
2015
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 120), u(d(r), "incompatibleTokens", ["Y", "R", "Q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]), r;
2016
- }
2017
- return p(a, [{
2018
- key: "parse",
2019
- value: function(e, o, n) {
2020
- switch (o) {
2021
- case "q":
2022
- case "qq":
2023
- return V(o.length, e);
2024
- case "qo":
2025
- return n.ordinalNumber(e, {
2026
- unit: "quarter"
2027
- });
2028
- case "qqq":
2029
- return n.quarter(e, {
2030
- width: "abbreviated",
2031
- context: "standalone"
2032
- }) || n.quarter(e, {
2033
- width: "narrow",
2034
- context: "standalone"
2035
- });
2036
- case "qqqqq":
2037
- return n.quarter(e, {
2038
- width: "narrow",
2039
- context: "standalone"
2040
- });
2041
- case "qqqq":
2042
- default:
2043
- return n.quarter(e, {
2044
- width: "wide",
2045
- context: "standalone"
2046
- }) || n.quarter(e, {
2047
- width: "abbreviated",
2048
- context: "standalone"
2049
- }) || n.quarter(e, {
2050
- width: "narrow",
2051
- context: "standalone"
2052
- });
2053
- }
2054
- }
2055
- }, {
2056
- key: "validate",
2057
- value: function(e, o) {
2058
- return o >= 1 && o <= 4;
2059
- }
2060
- }, {
2061
- key: "set",
2062
- value: function(e, o, n) {
2063
- return e.setUTCMonth((n - 1) * 3, 1), e.setUTCHours(0, 0, 0, 0), e;
2064
- }
2065
- }]), a;
2066
- }(b), Ri = /* @__PURE__ */ function(t) {
2067
- v(a, t);
2068
- var i = m(a);
2069
- function a() {
2070
- var r;
2071
- f(this, a);
2072
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2073
- o[n] = arguments[n];
2074
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "incompatibleTokens", ["Y", "R", "q", "Q", "L", "w", "I", "D", "i", "e", "c", "t", "T"]), u(d(r), "priority", 110), r;
2075
- }
2076
- return p(a, [{
2077
- key: "parse",
2078
- value: function(e, o, n) {
2079
- var s = function(h) {
2080
- return h - 1;
2081
- };
2082
- switch (o) {
2083
- case "M":
2084
- return D(k(P.month, e), s);
2085
- case "MM":
2086
- return D(V(2, e), s);
2087
- case "Mo":
2088
- return D(n.ordinalNumber(e, {
2089
- unit: "month"
2090
- }), s);
2091
- case "MMM":
2092
- return n.month(e, {
2093
- width: "abbreviated",
2094
- context: "formatting"
2095
- }) || n.month(e, {
2096
- width: "narrow",
2097
- context: "formatting"
2098
- });
2099
- case "MMMMM":
2100
- return n.month(e, {
2101
- width: "narrow",
2102
- context: "formatting"
2103
- });
2104
- case "MMMM":
2105
- default:
2106
- return n.month(e, {
2107
- width: "wide",
2108
- context: "formatting"
2109
- }) || n.month(e, {
2110
- width: "abbreviated",
2111
- context: "formatting"
2112
- }) || n.month(e, {
2113
- width: "narrow",
2114
- context: "formatting"
2115
- });
2116
- }
2117
- }
2118
- }, {
2119
- key: "validate",
2120
- value: function(e, o) {
2121
- return o >= 0 && o <= 11;
2122
- }
2123
- }, {
2124
- key: "set",
2125
- value: function(e, o, n) {
2126
- return e.setUTCMonth(n, 1), e.setUTCHours(0, 0, 0, 0), e;
2127
- }
2128
- }]), a;
2129
- }(b), Ui = /* @__PURE__ */ function(t) {
2130
- v(a, t);
2131
- var i = m(a);
2132
- function a() {
2133
- var r;
2134
- f(this, a);
2135
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2136
- o[n] = arguments[n];
2137
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 110), u(d(r), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "w", "I", "D", "i", "e", "c", "t", "T"]), r;
2138
- }
2139
- return p(a, [{
2140
- key: "parse",
2141
- value: function(e, o, n) {
2142
- var s = function(h) {
2143
- return h - 1;
2144
- };
2145
- switch (o) {
2146
- case "L":
2147
- return D(k(P.month, e), s);
2148
- case "LL":
2149
- return D(V(2, e), s);
2150
- case "Lo":
2151
- return D(n.ordinalNumber(e, {
2152
- unit: "month"
2153
- }), s);
2154
- case "LLL":
2155
- return n.month(e, {
2156
- width: "abbreviated",
2157
- context: "standalone"
2158
- }) || n.month(e, {
2159
- width: "narrow",
2160
- context: "standalone"
2161
- });
2162
- case "LLLLL":
2163
- return n.month(e, {
2164
- width: "narrow",
2165
- context: "standalone"
2166
- });
2167
- case "LLLL":
2168
- default:
2169
- return n.month(e, {
2170
- width: "wide",
2171
- context: "standalone"
2172
- }) || n.month(e, {
2173
- width: "abbreviated",
2174
- context: "standalone"
2175
- }) || n.month(e, {
2176
- width: "narrow",
2177
- context: "standalone"
2178
- });
2179
- }
2180
- }
2181
- }, {
2182
- key: "validate",
2183
- value: function(e, o) {
2184
- return o >= 0 && o <= 11;
2185
- }
2186
- }, {
2187
- key: "set",
2188
- value: function(e, o, n) {
2189
- return e.setUTCMonth(n, 1), e.setUTCHours(0, 0, 0, 0), e;
2190
- }
2191
- }]), a;
2192
- }(b);
2193
- function $i(t, i, a) {
2194
- M(2, arguments);
2195
- var r = E(t), e = R(i), o = We(r, a) - e;
2196
- return r.setUTCDate(r.getUTCDate() - o * 7), r;
2197
- }
2198
- var Li = /* @__PURE__ */ function(t) {
2199
- v(a, t);
2200
- var i = m(a);
2201
- function a() {
2202
- var r;
2203
- f(this, a);
2204
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2205
- o[n] = arguments[n];
2206
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 100), u(d(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "i", "t", "T"]), r;
2207
- }
2208
- return p(a, [{
2209
- key: "parse",
2210
- value: function(e, o, n) {
2211
- switch (o) {
2212
- case "w":
2213
- return k(P.week, e);
2214
- case "wo":
2215
- return n.ordinalNumber(e, {
2216
- unit: "week"
2217
- });
2218
- default:
2219
- return V(o.length, e);
2220
- }
2221
- }
2222
- }, {
2223
- key: "validate",
2224
- value: function(e, o) {
2225
- return o >= 1 && o <= 53;
2226
- }
2227
- }, {
2228
- key: "set",
2229
- value: function(e, o, n, s) {
2230
- return ee($i(e, n, s), s);
2231
- }
2232
- }]), a;
2233
- }(b);
2234
- function Yi(t, i) {
2235
- M(2, arguments);
2236
- var a = E(t), r = R(i), e = Ne(a) - r;
2237
- return a.setUTCDate(a.getUTCDate() - e * 7), a;
2238
- }
2239
- var qi = /* @__PURE__ */ function(t) {
2240
- v(a, t);
2241
- var i = m(a);
2242
- function a() {
2243
- var r;
2244
- f(this, a);
2245
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2246
- o[n] = arguments[n];
2247
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 100), u(d(r), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]), r;
2248
- }
2249
- return p(a, [{
2250
- key: "parse",
2251
- value: function(e, o, n) {
2252
- switch (o) {
2253
- case "I":
2254
- return k(P.week, e);
2255
- case "Io":
2256
- return n.ordinalNumber(e, {
2257
- unit: "week"
2258
- });
2259
- default:
2260
- return V(o.length, e);
2261
- }
2262
- }
2263
- }, {
2264
- key: "validate",
2265
- value: function(e, o) {
2266
- return o >= 1 && o <= 53;
2267
- }
2268
- }, {
2269
- key: "set",
2270
- value: function(e, o, n) {
2271
- return ie(Yi(e, n));
2272
- }
2273
- }]), a;
2274
- }(b), Ai = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ni = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Wi = /* @__PURE__ */ function(t) {
2275
- v(a, t);
2276
- var i = m(a);
2277
- function a() {
2278
- var r;
2279
- f(this, a);
2280
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2281
- o[n] = arguments[n];
2282
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 90), u(d(r), "subPriority", 1), u(d(r), "incompatibleTokens", ["Y", "R", "q", "Q", "w", "I", "D", "i", "e", "c", "t", "T"]), r;
2283
- }
2284
- return p(a, [{
2285
- key: "parse",
2286
- value: function(e, o, n) {
2287
- switch (o) {
2288
- case "d":
2289
- return k(P.date, e);
2290
- case "do":
2291
- return n.ordinalNumber(e, {
2292
- unit: "date"
2293
- });
2294
- default:
2295
- return V(o.length, e);
2296
- }
2297
- }
2298
- }, {
2299
- key: "validate",
2300
- value: function(e, o) {
2301
- var n = e.getUTCFullYear(), s = tt(n), c = e.getUTCMonth();
2302
- return s ? o >= 1 && o <= Ni[c] : o >= 1 && o <= Ai[c];
2303
- }
2304
- }, {
2305
- key: "set",
2306
- value: function(e, o, n) {
2307
- return e.setUTCDate(n), e.setUTCHours(0, 0, 0, 0), e;
2308
- }
2309
- }]), a;
2310
- }(b), Bi = /* @__PURE__ */ function(t) {
2311
- v(a, t);
2312
- var i = m(a);
2313
- function a() {
2314
- var r;
2315
- f(this, a);
2316
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2317
- o[n] = arguments[n];
2318
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 90), u(d(r), "subpriority", 1), u(d(r), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "L", "w", "I", "d", "E", "i", "e", "c", "t", "T"]), r;
2319
- }
2320
- return p(a, [{
2321
- key: "parse",
2322
- value: function(e, o, n) {
2323
- switch (o) {
2324
- case "D":
2325
- case "DD":
2326
- return k(P.dayOfYear, e);
2327
- case "Do":
2328
- return n.ordinalNumber(e, {
2329
- unit: "date"
2330
- });
2331
- default:
2332
- return V(o.length, e);
2333
- }
2334
- }
2335
- }, {
2336
- key: "validate",
2337
- value: function(e, o) {
2338
- var n = e.getUTCFullYear(), s = tt(n);
2339
- return s ? o >= 1 && o <= 366 : o >= 1 && o <= 365;
2340
- }
2341
- }, {
2342
- key: "set",
2343
- value: function(e, o, n) {
2344
- return e.setUTCMonth(0, n), e.setUTCHours(0, 0, 0, 0), e;
2345
- }
2346
- }]), a;
2347
- }(b);
2348
- function Ce(t, i, a) {
2349
- var r, e, o, n, s, c, h, g;
2350
- M(2, arguments);
2351
- var y = ae(), C = R((r = (e = (o = (n = a?.weekStartsOn) !== null && n !== void 0 ? n : a == null || (s = a.locale) === null || s === void 0 || (c = s.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && o !== void 0 ? o : y.weekStartsOn) !== null && e !== void 0 ? e : (h = y.locale) === null || h === void 0 || (g = h.options) === null || g === void 0 ? void 0 : g.weekStartsOn) !== null && r !== void 0 ? r : 0);
2352
- if (!(C >= 0 && C <= 6))
2353
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
2354
- var T = E(t), O = R(i), Y = T.getUTCDay(), U = O % 7, W = (U + 7) % 7, F = (W < C ? 7 : 0) + O - Y;
2355
- return T.setUTCDate(T.getUTCDate() + F), T;
2356
- }
2357
- var Qi = /* @__PURE__ */ function(t) {
2358
- v(a, t);
2359
- var i = m(a);
2360
- function a() {
2361
- var r;
2362
- f(this, a);
2363
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2364
- o[n] = arguments[n];
2365
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 90), u(d(r), "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]), r;
2366
- }
2367
- return p(a, [{
2368
- key: "parse",
2369
- value: function(e, o, n) {
2370
- switch (o) {
2371
- case "E":
2372
- case "EE":
2373
- case "EEE":
2374
- return n.day(e, {
2375
- width: "abbreviated",
2376
- context: "formatting"
2377
- }) || n.day(e, {
2378
- width: "short",
2379
- context: "formatting"
2380
- }) || n.day(e, {
2381
- width: "narrow",
2382
- context: "formatting"
2383
- });
2384
- case "EEEEE":
2385
- return n.day(e, {
2386
- width: "narrow",
2387
- context: "formatting"
2388
- });
2389
- case "EEEEEE":
2390
- return n.day(e, {
2391
- width: "short",
2392
- context: "formatting"
2393
- }) || n.day(e, {
2394
- width: "narrow",
2395
- context: "formatting"
2396
- });
2397
- case "EEEE":
2398
- default:
2399
- return n.day(e, {
2400
- width: "wide",
2401
- context: "formatting"
2402
- }) || n.day(e, {
2403
- width: "abbreviated",
2404
- context: "formatting"
2405
- }) || n.day(e, {
2406
- width: "short",
2407
- context: "formatting"
2408
- }) || n.day(e, {
2409
- width: "narrow",
2410
- context: "formatting"
2411
- });
2412
- }
2413
- }
2414
- }, {
2415
- key: "validate",
2416
- value: function(e, o) {
2417
- return o >= 0 && o <= 6;
2418
- }
2419
- }, {
2420
- key: "set",
2421
- value: function(e, o, n, s) {
2422
- return e = Ce(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2423
- }
2424
- }]), a;
2425
- }(b), zi = /* @__PURE__ */ function(t) {
2426
- v(a, t);
2427
- var i = m(a);
2428
- function a() {
2429
- var r;
2430
- f(this, a);
2431
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2432
- o[n] = arguments[n];
2433
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 90), u(d(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "c", "t", "T"]), r;
2434
- }
2435
- return p(a, [{
2436
- key: "parse",
2437
- value: function(e, o, n, s) {
2438
- var c = function(g) {
2439
- var y = Math.floor((g - 1) / 7) * 7;
2440
- return (g + s.weekStartsOn + 6) % 7 + y;
2441
- };
2442
- switch (o) {
2443
- case "e":
2444
- case "ee":
2445
- return D(V(o.length, e), c);
2446
- case "eo":
2447
- return D(n.ordinalNumber(e, {
2448
- unit: "day"
2449
- }), c);
2450
- case "eee":
2451
- return n.day(e, {
2452
- width: "abbreviated",
2453
- context: "formatting"
2454
- }) || n.day(e, {
2455
- width: "short",
2456
- context: "formatting"
2457
- }) || n.day(e, {
2458
- width: "narrow",
2459
- context: "formatting"
2460
- });
2461
- case "eeeee":
2462
- return n.day(e, {
2463
- width: "narrow",
2464
- context: "formatting"
2465
- });
2466
- case "eeeeee":
2467
- return n.day(e, {
2468
- width: "short",
2469
- context: "formatting"
2470
- }) || n.day(e, {
2471
- width: "narrow",
2472
- context: "formatting"
2473
- });
2474
- case "eeee":
2475
- default:
2476
- return n.day(e, {
2477
- width: "wide",
2478
- context: "formatting"
2479
- }) || n.day(e, {
2480
- width: "abbreviated",
2481
- context: "formatting"
2482
- }) || n.day(e, {
2483
- width: "short",
2484
- context: "formatting"
2485
- }) || n.day(e, {
2486
- width: "narrow",
2487
- context: "formatting"
2488
- });
2489
- }
2490
- }
2491
- }, {
2492
- key: "validate",
2493
- value: function(e, o) {
2494
- return o >= 0 && o <= 6;
2495
- }
2496
- }, {
2497
- key: "set",
2498
- value: function(e, o, n, s) {
2499
- return e = Ce(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2500
- }
2501
- }]), a;
2502
- }(b), Gi = /* @__PURE__ */ function(t) {
2503
- v(a, t);
2504
- var i = m(a);
2505
- function a() {
2506
- var r;
2507
- f(this, a);
2508
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2509
- o[n] = arguments[n];
2510
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 90), u(d(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "e", "t", "T"]), r;
2511
- }
2512
- return p(a, [{
2513
- key: "parse",
2514
- value: function(e, o, n, s) {
2515
- var c = function(g) {
2516
- var y = Math.floor((g - 1) / 7) * 7;
2517
- return (g + s.weekStartsOn + 6) % 7 + y;
2518
- };
2519
- switch (o) {
2520
- case "c":
2521
- case "cc":
2522
- return D(V(o.length, e), c);
2523
- case "co":
2524
- return D(n.ordinalNumber(e, {
2525
- unit: "day"
2526
- }), c);
2527
- case "ccc":
2528
- return n.day(e, {
2529
- width: "abbreviated",
2530
- context: "standalone"
2531
- }) || n.day(e, {
2532
- width: "short",
2533
- context: "standalone"
2534
- }) || n.day(e, {
2535
- width: "narrow",
2536
- context: "standalone"
2537
- });
2538
- case "ccccc":
2539
- return n.day(e, {
2540
- width: "narrow",
2541
- context: "standalone"
2542
- });
2543
- case "cccccc":
2544
- return n.day(e, {
2545
- width: "short",
2546
- context: "standalone"
2547
- }) || n.day(e, {
2548
- width: "narrow",
2549
- context: "standalone"
2550
- });
2551
- case "cccc":
2552
- default:
2553
- return n.day(e, {
2554
- width: "wide",
2555
- context: "standalone"
2556
- }) || n.day(e, {
2557
- width: "abbreviated",
2558
- context: "standalone"
2559
- }) || n.day(e, {
2560
- width: "short",
2561
- context: "standalone"
2562
- }) || n.day(e, {
2563
- width: "narrow",
2564
- context: "standalone"
2565
- });
2566
- }
2567
- }
2568
- }, {
2569
- key: "validate",
2570
- value: function(e, o) {
2571
- return o >= 0 && o <= 6;
2572
- }
2573
- }, {
2574
- key: "set",
2575
- value: function(e, o, n, s) {
2576
- return e = Ce(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2577
- }
2578
- }]), a;
2579
- }(b);
2580
- function ji(t, i) {
2581
- M(2, arguments);
2582
- var a = R(i);
2583
- a % 7 === 0 && (a = a - 7);
2584
- var r = 1, e = E(t), o = e.getUTCDay(), n = a % 7, s = (n + 7) % 7, c = (s < r ? 7 : 0) + a - o;
2585
- return e.setUTCDate(e.getUTCDate() + c), e;
2586
- }
2587
- var Xi = /* @__PURE__ */ function(t) {
2588
- v(a, t);
2589
- var i = m(a);
2590
- function a() {
2591
- var r;
2592
- f(this, a);
2593
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2594
- o[n] = arguments[n];
2595
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 90), u(d(r), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "E", "e", "c", "t", "T"]), r;
2596
- }
2597
- return p(a, [{
2598
- key: "parse",
2599
- value: function(e, o, n) {
2600
- var s = function(h) {
2601
- return h === 0 ? 7 : h;
2602
- };
2603
- switch (o) {
2604
- case "i":
2605
- case "ii":
2606
- return V(o.length, e);
2607
- case "io":
2608
- return n.ordinalNumber(e, {
2609
- unit: "day"
2610
- });
2611
- case "iii":
2612
- return D(n.day(e, {
2613
- width: "abbreviated",
2614
- context: "formatting"
2615
- }) || n.day(e, {
2616
- width: "short",
2617
- context: "formatting"
2618
- }) || n.day(e, {
2619
- width: "narrow",
2620
- context: "formatting"
2621
- }), s);
2622
- case "iiiii":
2623
- return D(n.day(e, {
2624
- width: "narrow",
2625
- context: "formatting"
2626
- }), s);
2627
- case "iiiiii":
2628
- return D(n.day(e, {
2629
- width: "short",
2630
- context: "formatting"
2631
- }) || n.day(e, {
2632
- width: "narrow",
2633
- context: "formatting"
2634
- }), s);
2635
- case "iiii":
2636
- default:
2637
- return D(n.day(e, {
2638
- width: "wide",
2639
- context: "formatting"
2640
- }) || n.day(e, {
2641
- width: "abbreviated",
2642
- context: "formatting"
2643
- }) || n.day(e, {
2644
- width: "short",
2645
- context: "formatting"
2646
- }) || n.day(e, {
2647
- width: "narrow",
2648
- context: "formatting"
2649
- }), s);
2650
- }
2651
- }
2652
- }, {
2653
- key: "validate",
2654
- value: function(e, o) {
2655
- return o >= 1 && o <= 7;
2656
- }
2657
- }, {
2658
- key: "set",
2659
- value: function(e, o, n) {
2660
- return e = ji(e, n), e.setUTCHours(0, 0, 0, 0), e;
2661
- }
2662
- }]), a;
2663
- }(b), Ki = /* @__PURE__ */ function(t) {
2664
- v(a, t);
2665
- var i = m(a);
2666
- function a() {
2667
- var r;
2668
- f(this, a);
2669
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2670
- o[n] = arguments[n];
2671
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 80), u(d(r), "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]), r;
2672
- }
2673
- return p(a, [{
2674
- key: "parse",
2675
- value: function(e, o, n) {
2676
- switch (o) {
2677
- case "a":
2678
- case "aa":
2679
- case "aaa":
2680
- return n.dayPeriod(e, {
2681
- width: "abbreviated",
2682
- context: "formatting"
2683
- }) || n.dayPeriod(e, {
2684
- width: "narrow",
2685
- context: "formatting"
2686
- });
2687
- case "aaaaa":
2688
- return n.dayPeriod(e, {
2689
- width: "narrow",
2690
- context: "formatting"
2691
- });
2692
- case "aaaa":
2693
- default:
2694
- return n.dayPeriod(e, {
2695
- width: "wide",
2696
- context: "formatting"
2697
- }) || n.dayPeriod(e, {
2698
- width: "abbreviated",
2699
- context: "formatting"
2700
- }) || n.dayPeriod(e, {
2701
- width: "narrow",
2702
- context: "formatting"
2703
- });
2704
- }
2705
- }
2706
- }, {
2707
- key: "set",
2708
- value: function(e, o, n) {
2709
- return e.setUTCHours(ke(n), 0, 0, 0), e;
2710
- }
2711
- }]), a;
2712
- }(b), Zi = /* @__PURE__ */ function(t) {
2713
- v(a, t);
2714
- var i = m(a);
2715
- function a() {
2716
- var r;
2717
- f(this, a);
2718
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2719
- o[n] = arguments[n];
2720
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 80), u(d(r), "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]), r;
2721
- }
2722
- return p(a, [{
2723
- key: "parse",
2724
- value: function(e, o, n) {
2725
- switch (o) {
2726
- case "b":
2727
- case "bb":
2728
- case "bbb":
2729
- return n.dayPeriod(e, {
2730
- width: "abbreviated",
2731
- context: "formatting"
2732
- }) || n.dayPeriod(e, {
2733
- width: "narrow",
2734
- context: "formatting"
2735
- });
2736
- case "bbbbb":
2737
- return n.dayPeriod(e, {
2738
- width: "narrow",
2739
- context: "formatting"
2740
- });
2741
- case "bbbb":
2742
- default:
2743
- return n.dayPeriod(e, {
2744
- width: "wide",
2745
- context: "formatting"
2746
- }) || n.dayPeriod(e, {
2747
- width: "abbreviated",
2748
- context: "formatting"
2749
- }) || n.dayPeriod(e, {
2750
- width: "narrow",
2751
- context: "formatting"
2752
- });
2753
- }
2754
- }
2755
- }, {
2756
- key: "set",
2757
- value: function(e, o, n) {
2758
- return e.setUTCHours(ke(n), 0, 0, 0), e;
2759
- }
2760
- }]), a;
2761
- }(b), Ji = /* @__PURE__ */ function(t) {
2762
- v(a, t);
2763
- var i = m(a);
2764
- function a() {
2765
- var r;
2766
- f(this, a);
2767
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2768
- o[n] = arguments[n];
2769
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 80), u(d(r), "incompatibleTokens", ["a", "b", "t", "T"]), r;
2770
- }
2771
- return p(a, [{
2772
- key: "parse",
2773
- value: function(e, o, n) {
2774
- switch (o) {
2775
- case "B":
2776
- case "BB":
2777
- case "BBB":
2778
- return n.dayPeriod(e, {
2779
- width: "abbreviated",
2780
- context: "formatting"
2781
- }) || n.dayPeriod(e, {
2782
- width: "narrow",
2783
- context: "formatting"
2784
- });
2785
- case "BBBBB":
2786
- return n.dayPeriod(e, {
2787
- width: "narrow",
2788
- context: "formatting"
2789
- });
2790
- case "BBBB":
2791
- default:
2792
- return n.dayPeriod(e, {
2793
- width: "wide",
2794
- context: "formatting"
2795
- }) || n.dayPeriod(e, {
2796
- width: "abbreviated",
2797
- context: "formatting"
2798
- }) || n.dayPeriod(e, {
2799
- width: "narrow",
2800
- context: "formatting"
2801
- });
2802
- }
2803
- }
2804
- }, {
2805
- key: "set",
2806
- value: function(e, o, n) {
2807
- return e.setUTCHours(ke(n), 0, 0, 0), e;
2808
- }
2809
- }]), a;
2810
- }(b), ea = /* @__PURE__ */ function(t) {
2811
- v(a, t);
2812
- var i = m(a);
2813
- function a() {
2814
- var r;
2815
- f(this, a);
2816
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2817
- o[n] = arguments[n];
2818
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 70), u(d(r), "incompatibleTokens", ["H", "K", "k", "t", "T"]), r;
2819
- }
2820
- return p(a, [{
2821
- key: "parse",
2822
- value: function(e, o, n) {
2823
- switch (o) {
2824
- case "h":
2825
- return k(P.hour12h, e);
2826
- case "ho":
2827
- return n.ordinalNumber(e, {
2828
- unit: "hour"
2829
- });
2830
- default:
2831
- return V(o.length, e);
2832
- }
2833
- }
2834
- }, {
2835
- key: "validate",
2836
- value: function(e, o) {
2837
- return o >= 1 && o <= 12;
2838
- }
2839
- }, {
2840
- key: "set",
2841
- value: function(e, o, n) {
2842
- var s = e.getUTCHours() >= 12;
2843
- return s && n < 12 ? e.setUTCHours(n + 12, 0, 0, 0) : !s && n === 12 ? e.setUTCHours(0, 0, 0, 0) : e.setUTCHours(n, 0, 0, 0), e;
2844
- }
2845
- }]), a;
2846
- }(b), ta = /* @__PURE__ */ function(t) {
2847
- v(a, t);
2848
- var i = m(a);
2849
- function a() {
2850
- var r;
2851
- f(this, a);
2852
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2853
- o[n] = arguments[n];
2854
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 70), u(d(r), "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]), r;
2855
- }
2856
- return p(a, [{
2857
- key: "parse",
2858
- value: function(e, o, n) {
2859
- switch (o) {
2860
- case "H":
2861
- return k(P.hour23h, e);
2862
- case "Ho":
2863
- return n.ordinalNumber(e, {
2864
- unit: "hour"
2865
- });
2866
- default:
2867
- return V(o.length, e);
2868
- }
2869
- }
2870
- }, {
2871
- key: "validate",
2872
- value: function(e, o) {
2873
- return o >= 0 && o <= 23;
2874
- }
2875
- }, {
2876
- key: "set",
2877
- value: function(e, o, n) {
2878
- return e.setUTCHours(n, 0, 0, 0), e;
2879
- }
2880
- }]), a;
2881
- }(b), ia = /* @__PURE__ */ function(t) {
2882
- v(a, t);
2883
- var i = m(a);
2884
- function a() {
2885
- var r;
2886
- f(this, a);
2887
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2888
- o[n] = arguments[n];
2889
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 70), u(d(r), "incompatibleTokens", ["h", "H", "k", "t", "T"]), r;
2890
- }
2891
- return p(a, [{
2892
- key: "parse",
2893
- value: function(e, o, n) {
2894
- switch (o) {
2895
- case "K":
2896
- return k(P.hour11h, e);
2897
- case "Ko":
2898
- return n.ordinalNumber(e, {
2899
- unit: "hour"
2900
- });
2901
- default:
2902
- return V(o.length, e);
2903
- }
2904
- }
2905
- }, {
2906
- key: "validate",
2907
- value: function(e, o) {
2908
- return o >= 0 && o <= 11;
2909
- }
2910
- }, {
2911
- key: "set",
2912
- value: function(e, o, n) {
2913
- var s = e.getUTCHours() >= 12;
2914
- return s && n < 12 ? e.setUTCHours(n + 12, 0, 0, 0) : e.setUTCHours(n, 0, 0, 0), e;
2915
- }
2916
- }]), a;
2917
- }(b), aa = /* @__PURE__ */ function(t) {
2918
- v(a, t);
2919
- var i = m(a);
2920
- function a() {
2921
- var r;
2922
- f(this, a);
2923
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2924
- o[n] = arguments[n];
2925
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 70), u(d(r), "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]), r;
2926
- }
2927
- return p(a, [{
2928
- key: "parse",
2929
- value: function(e, o, n) {
2930
- switch (o) {
2931
- case "k":
2932
- return k(P.hour24h, e);
2933
- case "ko":
2934
- return n.ordinalNumber(e, {
2935
- unit: "hour"
2936
- });
2937
- default:
2938
- return V(o.length, e);
2939
- }
2940
- }
2941
- }, {
2942
- key: "validate",
2943
- value: function(e, o) {
2944
- return o >= 1 && o <= 24;
2945
- }
2946
- }, {
2947
- key: "set",
2948
- value: function(e, o, n) {
2949
- var s = n <= 24 ? n % 24 : n;
2950
- return e.setUTCHours(s, 0, 0, 0), e;
2951
- }
2952
- }]), a;
2953
- }(b), ra = /* @__PURE__ */ function(t) {
2954
- v(a, t);
2955
- var i = m(a);
2956
- function a() {
2957
- var r;
2958
- f(this, a);
2959
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2960
- o[n] = arguments[n];
2961
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 60), u(d(r), "incompatibleTokens", ["t", "T"]), r;
2962
- }
2963
- return p(a, [{
2964
- key: "parse",
2965
- value: function(e, o, n) {
2966
- switch (o) {
2967
- case "m":
2968
- return k(P.minute, e);
2969
- case "mo":
2970
- return n.ordinalNumber(e, {
2971
- unit: "minute"
2972
- });
2973
- default:
2974
- return V(o.length, e);
2975
- }
2976
- }
2977
- }, {
2978
- key: "validate",
2979
- value: function(e, o) {
2980
- return o >= 0 && o <= 59;
2981
- }
2982
- }, {
2983
- key: "set",
2984
- value: function(e, o, n) {
2985
- return e.setUTCMinutes(n, 0, 0), e;
2986
- }
2987
- }]), a;
2988
- }(b), na = /* @__PURE__ */ function(t) {
2989
- v(a, t);
2990
- var i = m(a);
2991
- function a() {
2992
- var r;
2993
- f(this, a);
2994
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2995
- o[n] = arguments[n];
2996
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 50), u(d(r), "incompatibleTokens", ["t", "T"]), r;
2997
- }
2998
- return p(a, [{
2999
- key: "parse",
3000
- value: function(e, o, n) {
3001
- switch (o) {
3002
- case "s":
3003
- return k(P.second, e);
3004
- case "so":
3005
- return n.ordinalNumber(e, {
3006
- unit: "second"
3007
- });
3008
- default:
3009
- return V(o.length, e);
3010
- }
3011
- }
3012
- }, {
3013
- key: "validate",
3014
- value: function(e, o) {
3015
- return o >= 0 && o <= 59;
3016
- }
3017
- }, {
3018
- key: "set",
3019
- value: function(e, o, n) {
3020
- return e.setUTCSeconds(n, 0), e;
3021
- }
3022
- }]), a;
3023
- }(b), oa = /* @__PURE__ */ function(t) {
3024
- v(a, t);
3025
- var i = m(a);
3026
- function a() {
3027
- var r;
3028
- f(this, a);
3029
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3030
- o[n] = arguments[n];
3031
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 30), u(d(r), "incompatibleTokens", ["t", "T"]), r;
3032
- }
3033
- return p(a, [{
3034
- key: "parse",
3035
- value: function(e, o) {
3036
- var n = function(c) {
3037
- return Math.floor(c * Math.pow(10, -o.length + 3));
3038
- };
3039
- return D(V(o.length, e), n);
3040
- }
3041
- }, {
3042
- key: "set",
3043
- value: function(e, o, n) {
3044
- return e.setUTCMilliseconds(n), e;
3045
- }
3046
- }]), a;
3047
- }(b), sa = /* @__PURE__ */ function(t) {
3048
- v(a, t);
3049
- var i = m(a);
3050
- function a() {
3051
- var r;
3052
- f(this, a);
3053
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3054
- o[n] = arguments[n];
3055
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 10), u(d(r), "incompatibleTokens", ["t", "T", "x"]), r;
3056
- }
3057
- return p(a, [{
3058
- key: "parse",
3059
- value: function(e, o) {
3060
- switch (o) {
3061
- case "X":
3062
- return N(A.basicOptionalMinutes, e);
3063
- case "XX":
3064
- return N(A.basic, e);
3065
- case "XXXX":
3066
- return N(A.basicOptionalSeconds, e);
3067
- case "XXXXX":
3068
- return N(A.extendedOptionalSeconds, e);
3069
- case "XXX":
3070
- default:
3071
- return N(A.extended, e);
3072
- }
3073
- }
3074
- }, {
3075
- key: "set",
3076
- value: function(e, o, n) {
3077
- return o.timestampIsSet ? e : new Date(e.getTime() - n);
3078
- }
3079
- }]), a;
3080
- }(b), la = /* @__PURE__ */ function(t) {
3081
- v(a, t);
3082
- var i = m(a);
3083
- function a() {
3084
- var r;
3085
- f(this, a);
3086
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3087
- o[n] = arguments[n];
3088
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 10), u(d(r), "incompatibleTokens", ["t", "T", "X"]), r;
3089
- }
3090
- return p(a, [{
3091
- key: "parse",
3092
- value: function(e, o) {
3093
- switch (o) {
3094
- case "x":
3095
- return N(A.basicOptionalMinutes, e);
3096
- case "xx":
3097
- return N(A.basic, e);
3098
- case "xxxx":
3099
- return N(A.basicOptionalSeconds, e);
3100
- case "xxxxx":
3101
- return N(A.extendedOptionalSeconds, e);
3102
- case "xxx":
3103
- default:
3104
- return N(A.extended, e);
3105
- }
3106
- }
3107
- }, {
3108
- key: "set",
3109
- value: function(e, o, n) {
3110
- return o.timestampIsSet ? e : new Date(e.getTime() - n);
3111
- }
3112
- }]), a;
3113
- }(b), ua = /* @__PURE__ */ function(t) {
3114
- v(a, t);
3115
- var i = m(a);
3116
- function a() {
3117
- var r;
3118
- f(this, a);
3119
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3120
- o[n] = arguments[n];
3121
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 40), u(d(r), "incompatibleTokens", "*"), r;
3122
- }
3123
- return p(a, [{
3124
- key: "parse",
3125
- value: function(e) {
3126
- return Je(e);
3127
- }
3128
- }, {
3129
- key: "set",
3130
- value: function(e, o, n) {
3131
- return [new Date(n * 1e3), {
3132
- timestampIsSet: !0
3133
- }];
3134
- }
3135
- }]), a;
3136
- }(b), da = /* @__PURE__ */ function(t) {
3137
- v(a, t);
3138
- var i = m(a);
3139
- function a() {
3140
- var r;
3141
- f(this, a);
3142
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3143
- o[n] = arguments[n];
3144
- return r = i.call.apply(i, [this].concat(o)), u(d(r), "priority", 20), u(d(r), "incompatibleTokens", "*"), r;
3145
- }
3146
- return p(a, [{
3147
- key: "parse",
3148
- value: function(e) {
3149
- return Je(e);
3150
- }
3151
- }, {
3152
- key: "set",
3153
- value: function(e, o, n) {
3154
- return [new Date(n), {
3155
- timestampIsSet: !0
3156
- }];
3157
- }
3158
- }]), a;
3159
- }(b), ca = {
3160
- G: new Vi(),
3161
- y: new Ei(),
3162
- Y: new Oi(),
3163
- R: new Si(),
3164
- u: new Hi(),
3165
- Q: new Ii(),
3166
- q: new Fi(),
3167
- M: new Ri(),
3168
- L: new Ui(),
3169
- w: new Li(),
3170
- I: new qi(),
3171
- d: new Wi(),
3172
- D: new Bi(),
3173
- E: new Qi(),
3174
- e: new zi(),
3175
- c: new Gi(),
3176
- i: new Xi(),
3177
- a: new Ki(),
3178
- b: new Zi(),
3179
- B: new Ji(),
3180
- h: new ea(),
3181
- H: new ta(),
3182
- K: new ia(),
3183
- k: new aa(),
3184
- m: new ra(),
3185
- s: new na(),
3186
- S: new oa(),
3187
- X: new sa(),
3188
- x: new la(),
3189
- t: new ua(),
3190
- T: new da()
3191
- }, ha = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, fa = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, pa = /^'([^]*?)'?$/, va = /''/g, ma = /\S/, ga = /[a-zA-Z]/;
3192
- function fe(t, i, a, r) {
3193
- var e, o, n, s, c, h, g, y, C, T, O, Y, U, W;
3194
- M(3, arguments);
3195
- var F = String(t), q = String(i), B = ae(), j = (e = (o = void 0) !== null && o !== void 0 ? o : B.locale) !== null && e !== void 0 ? e : je;
3196
- if (!j.match)
3197
- throw new RangeError("locale must contain match property");
3198
- var X = R((n = (s = (c = (h = void 0) !== null && h !== void 0 ? h : void 0) !== null && c !== void 0 ? c : B.firstWeekContainsDate) !== null && s !== void 0 ? s : (g = B.locale) === null || g === void 0 || (y = g.options) === null || y === void 0 ? void 0 : y.firstWeekContainsDate) !== null && n !== void 0 ? n : 1);
3199
- if (!(X >= 1 && X <= 7))
3200
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
3201
- var re = R((C = (T = (O = (Y = void 0) !== null && Y !== void 0 ? Y : void 0) !== null && O !== void 0 ? O : B.weekStartsOn) !== null && T !== void 0 ? T : (U = B.locale) === null || U === void 0 || (W = U.options) === null || W === void 0 ? void 0 : W.weekStartsOn) !== null && C !== void 0 ? C : 0);
3202
- if (!(re >= 0 && re <= 6))
3203
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
3204
- if (q === "")
3205
- return F === "" ? E(a) : /* @__PURE__ */ new Date(NaN);
3206
- var ne = {
3207
- firstWeekContainsDate: X,
3208
- weekStartsOn: re,
3209
- locale: j
3210
- }, oe = [new Ci()], ge = q.match(fa).map(function(S) {
3211
- var _ = S[0];
3212
- if (_ in _e) {
3213
- var L = _e[_];
3214
- return L(S, j.formatLong);
3215
- }
3216
- return S;
3217
- }).join("").match(ha), I = [], $ = Ue(ge), Z;
3218
- try {
3219
- var it = function() {
3220
- var _ = Z.value;
3221
- !(r != null && r.useAdditionalWeekYearTokens) && Ge(_) && pe(_, q, t), !(r != null && r.useAdditionalDayOfYearTokens) && ze(_) && pe(_, q, t);
3222
- var L = _[0], he = ca[L];
3223
- if (he) {
3224
- var Ee = he.incompatibleTokens;
3225
- if (Array.isArray(Ee)) {
3226
- var Oe = I.find(function(Se) {
3227
- return Ee.includes(Se.token) || Se.token === L;
3228
- });
3229
- if (Oe)
3230
- throw new RangeError("The format string mustn't contain `".concat(Oe.fullToken, "` and `").concat(_, "` at the same time"));
3231
- } else if (he.incompatibleTokens === "*" && I.length > 0)
3232
- throw new RangeError("The format string mustn't contain `".concat(_, "` and any other token at the same time"));
3233
- I.push({
3234
- token: L,
3235
- fullToken: _
3236
- });
3237
- var be = he.run(F, _, j.match, ne);
3238
- if (!be)
3239
- return {
3240
- v: /* @__PURE__ */ new Date(NaN)
3241
- };
3242
- oe.push(be.setter), F = be.rest;
3243
- } else {
3244
- if (L.match(ga))
3245
- throw new RangeError("Format string contains an unescaped latin alphabet character `" + L + "`");
3246
- if (_ === "''" ? _ = "'" : L === "'" && (_ = ya(_)), F.indexOf(_) === 0)
3247
- F = F.slice(_.length);
3248
- else
3249
- return {
3250
- v: /* @__PURE__ */ new Date(NaN)
3251
- };
3252
- }
3253
- };
3254
- for ($.s(); !(Z = $.n()).done; ) {
3255
- var Ve = it();
3256
- if (Q(Ve) === "object")
3257
- return Ve.v;
3258
- }
3259
- } catch (S) {
3260
- $.e(S);
3261
- } finally {
3262
- $.f();
3263
- }
3264
- if (F.length > 0 && ma.test(F))
3265
- return /* @__PURE__ */ new Date(NaN);
3266
- var at = oe.map(function(S) {
3267
- return S.priority;
3268
- }).sort(function(S, _) {
3269
- return _ - S;
3270
- }).filter(function(S, _, L) {
3271
- return L.indexOf(S) === _;
3272
- }).map(function(S) {
3273
- return oe.filter(function(_) {
3274
- return _.priority === S;
3275
- }).sort(function(_, L) {
3276
- return L.subPriority - _.subPriority;
3277
- });
3278
- }).map(function(S) {
3279
- return S[0];
3280
- }), ye = E(a);
3281
- if (isNaN(ye.getTime()))
3282
- return /* @__PURE__ */ new Date(NaN);
3283
- var se = qe(ye, Qe(ye)), Me = {}, de = Ue(at), Pe;
3284
- try {
3285
- for (de.s(); !(Pe = de.n()).done; ) {
3286
- var De = Pe.value;
3287
- if (!De.validate(se, ne))
3288
- return /* @__PURE__ */ new Date(NaN);
3289
- var ce = De.set(se, Me, ne);
3290
- Array.isArray(ce) ? (se = ce[0], bi(Me, ce[1])) : se = ce;
3291
- }
3292
- } catch (S) {
3293
- de.e(S);
3294
- } finally {
3295
- de.f();
3296
- }
3297
- return se;
3298
- }
3299
- function ya(t) {
3300
- return t.match(pa)[1].replace(va, "'");
3301
- }
3302
- function $e(t, i) {
3303
- M(2, arguments);
3304
- var a = E(t), r = E(i);
3305
- return a.getTime() > r.getTime();
3306
- }
3307
- function Le(t, i) {
3308
- M(2, arguments);
3309
- var a = E(t), r = E(i);
3310
- return a.getTime() < r.getTime();
3311
- }
3312
- const ba = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.date__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}', wa = ba, _a = class {
3313
- constructor(t) {
3314
- z(this, t), this.sendValidityState = H(this, "sendValidityState"), this.sendInputValue = H(this, "sendInputValue"), this.touched = !1, this.formatDate = (i) => {
3315
- const { year: a, month: r, day: e } = i, o = new Date(a, r, e);
3316
- return mi(o, this.dateFormat || "yyyy-MM-dd");
3317
- }, this.parseDate = (i) => {
3318
- const a = fe(i, this.dateFormat || "yyyy-MM-dd", /* @__PURE__ */ new Date());
3319
- return { year: a.getFullYear(), month: a.getMonth(), day: a.getDate() };
3320
- }, this.handleBlur = () => {
3321
- this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.touched = !0;
3322
- }, this.setClientStyling = () => {
3323
- let i = document.createElement("style");
3324
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
3325
- }, this.name = void 0, this.displayName = void 0, this.placeholder = void 0, this.validation = void 0, this.defaultValue = void 0, this.autofilled = void 0, this.tooltip = void 0, this.language = void 0, this.emitValue = void 0, this.clientStyling = "", this.dateFormat = void 0, this.emitOnClick = !1, this.errorMessage = void 0, this.isValid = void 0, this.limitStylingAppends = !1, this.showTooltip = !1;
3326
- }
3327
- handleStylingChange(t, i) {
3328
- t !== i && this.setClientStyling();
3329
- }
3330
- validityChanged() {
3331
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value });
3332
- }
3333
- validityStateHandler(t) {
3334
- this.sendValidityState.emit(t);
3335
- }
3336
- emitValueHandler(t) {
3337
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value });
3338
- }
3339
- valueHandler(t) {
3340
- this.sendInputValue.emit(t);
3341
- }
3342
- handleClickOutside(t) {
3343
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
3344
- }
3345
- connectedCallback() {
3346
- var t, i;
3347
- this.minDate = fe(((t = this.validation.min) === null || t === void 0 ? void 0 : t.toString()) || "", "yyyy-MM-dd", /* @__PURE__ */ new Date()), this.maxDate = fe(((i = this.validation.max) === null || i === void 0 ? void 0 : i.toString()) || "", "yyyy-MM-dd", /* @__PURE__ */ new Date());
3348
- }
3349
- componentDidRender() {
3350
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
3351
- }
3352
- componentDidLoad() {
3353
- if (this.datePicker = this.element.shadowRoot.querySelector("vaadin-date-picker"), this.inputReference = this.element.shadowRoot.querySelector("input"), this.datePicker) {
3354
- const t = this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');
3355
- t && t.addEventListener("click", () => this.handleCalendarIconClick());
3356
- }
3357
- this.datePicker.i18n = Object.assign(Object.assign({}, this.datePicker.i18n), { formatDate: this.formatDate, parseDate: this.parseDate }), this.isValid = this.setValidity(), this.defaultValue && (this.value = this.defaultValue, this.valueHandler({ name: this.name, value: this.value }));
3358
- }
3359
- handleCalendarIconClick() {
3360
- this.datePicker.opened && this.emitOnClick && window.postMessage({ type: `registration${this.name}Clicked` }, window.location.href);
3361
- }
3362
- handleInput(t) {
3363
- this.value = t.target.value, this.touched = !0, this.valueAsDate = fe(this.value || "", "yyyy-MM-dd", /* @__PURE__ */ new Date()), this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.emitValueHandler(!0);
3364
- }
3365
- setValidity() {
3366
- return Le(this.valueAsDate, this.minDate) || $e(this.valueAsDate, this.maxDate) ? !1 : this.inputReference.validity.valid;
3367
- }
3368
- setErrorMessage() {
3369
- if (this.inputReference.validity.valueMissing)
3370
- return x("requiredError", this.language);
3371
- if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow)
3372
- return x("dateError", this.language, { values: { min: this.validation.min, max: this.validation.max } });
3373
- if (Le(this.valueAsDate, this.minDate) || $e(this.valueAsDate, this.maxDate))
3374
- return x("dateError2", this.language);
3375
- }
3376
- renderTooltip() {
3377
- return this.showTooltip ? l("div", { class: `date__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
3378
- }
3379
- render() {
3380
- let t = "";
3381
- return this.touched && (t = this.isValid == !0 || this.isValid == null ? "" : "text__input--invalid"), l("div", { key: "fe4318723f3be85d48c56210dae9eea53187ad75", class: `date__wrapper ${this.autofilled ? "date__wrapper--autofilled" : ""} ${this.name}__input`, ref: (i) => this.stylingContainer = i }, l("label", { key: "e34777bbadaa76f2d9adb2e525c07baf4460616e", class: `date__label ${this.validation.mandatory ? "date__label--required" : ""}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? "*" : ""), l("vaadin-date-picker", { key: "e2b972f58bd2e688fef70afaa340c5fb70f9e2b4", id: `${this.name}__input`, type: "date", class: `date__input ${t}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (i) => this.handleInput(i), onBlur: this.handleBlur }), l("small", { key: "7a9d3342628bfd7f2798a6563a69ab7010c3075f", class: "date__error-message" }, this.errorMessage), this.tooltip && l("img", { key: "04745e1bd587042af44784b3c46fbf2d0174af1f", class: "date__tooltip-icon", src: G, alt: "", ref: (i) => this.tooltipIconReference = i, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
3382
- }
3383
- get element() {
3384
- return Ye(this);
3385
- }
3386
- static get watchers() {
3387
- return {
3388
- clientStyling: ["handleStylingChange"],
3389
- isValid: ["validityChanged"],
3390
- emitValue: ["emitValueHandler"]
3391
- };
3392
- }
3393
- };
3394
- _a.style = wa;
3395
- const xa = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emw--color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.email__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__input::placeholder{color:var(--emw--color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}', Ta = xa, ka = class {
3396
- constructor(t) {
3397
- z(this, t), this.sendValidityState = H(this, "sendValidityState"), this.sendInputValue = H(this, "sendInputValue"), this.validationPattern = "", this.touched = !1, this.handleInput = (i) => {
3398
- this.value = i.target.value, this.touched = !0, this.debounceTime && clearTimeout(this.debounceTime), this.debounceTime = setTimeout(() => {
3399
- this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.emitValueHandler(!0);
3400
- }, 500);
3401
- }, this.handleBlur = () => {
3402
- this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.touched = !0;
3403
- }, this.setClientStyling = () => {
3404
- let i = document.createElement("style");
3405
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
3406
- }, this.name = void 0, this.displayName = void 0, this.placeholder = void 0, this.validation = void 0, this.defaultValue = void 0, this.autofilled = void 0, this.tooltip = void 0, this.language = void 0, this.emitValue = void 0, this.isDuplicateInput = void 0, this.clientStyling = "", this.errorMessage = void 0, this.isValid = void 0, this.limitStylingAppends = !1, this.showTooltip = !1;
3407
- }
3408
- handleStylingChange(t, i) {
3409
- t !== i && this.setClientStyling();
3410
- }
3411
- validityChanged() {
3412
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value });
3413
- }
3414
- emitValueHandler(t) {
3415
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value });
3416
- }
3417
- validityStateHandler(t) {
3418
- this.sendValidityState.emit(t);
3419
- }
3420
- valueHandler(t) {
3421
- this.sendInputValue.emit(t);
3422
- }
3423
- handleClickOutside(t) {
3424
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
3425
- }
3426
- valueChangedHandler(t) {
3427
- this.isDuplicateInput && this.name === t.detail.name + "Duplicate" && (this.duplicateInputValue = t.detail.value);
3428
- }
3429
- connectedCallback() {
3430
- this.validationPattern = this.setPattern();
3431
- }
3432
- componentDidRender() {
3433
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
3434
- }
3435
- componentDidLoad() {
3436
- this.isValid = this.setValidity(), this.defaultValue && (this.value = this.defaultValue, this.valueHandler({ name: this.name, value: this.value }));
3437
- }
3438
- setValidity() {
3439
- return this.inputReference.validity.valid;
3440
- }
3441
- setPattern() {
3442
- var t, i;
3443
- if (((t = this.validation.custom) === null || t === void 0 ? void 0 : t.length) > 0)
3444
- return (i = this.validation.custom.find((a) => a.rule === "regex")) === null || i === void 0 ? void 0 : i.pattern;
3445
- }
3446
- setErrorMessage() {
3447
- var t, i, a, r;
3448
- if (this.inputReference.validity.valueMissing)
3449
- return x("requiredError", this.language);
3450
- if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong)
3451
- return x("lengthError", this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
3452
- if (this.inputReference.validity.patternMismatch) {
3453
- const e = (t = this.validation.custom.find((n) => n.rule === "regex")) === null || t === void 0 ? void 0 : t.errorKey, o = (i = this.validation.custom.find((n) => n.rule === "regex")) === null || i === void 0 ? void 0 : i.errorMessage;
3454
- return x(`${e}`, this.language) ? x(`${e}`, this.language) : o;
3455
- }
3456
- if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
3457
- const e = (a = this.validation.custom.find((n) => n.rule === "duplicate-input")) === null || a === void 0 ? void 0 : a.errorKey, o = (r = this.validation.custom.find((n) => n.rule === "duplicate-input")) === null || r === void 0 ? void 0 : r.errorMessage;
3458
- return x(`${e}`, this.language) ? x(`${e}`, this.language) : o;
3459
- }
3460
- }
3461
- renderTooltip() {
3462
- return this.showTooltip ? l("div", { class: `email__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
3463
- }
3464
- render() {
3465
- let t = "";
3466
- return this.touched && (t = this.isValid == !0 || this.isValid == null ? "" : "text__input--invalid"), l("div", { key: "8cc90cea4b25fcd2fe05c9b6c609dc37a84d28a1", class: `email__wrapper ${this.autofilled ? "number__wrapper--autofilled" : ""} ${this.name}__input`, ref: (i) => this.stylingContainer = i }, l("div", { key: "43d0be5a1fecc1fa937323746362c2daa55863a8", class: "email__wrapper--flex" }, l("label", { key: "082b86cae6d59f2b2b025801373ae2f9efe7ef7a", class: `email__label ${this.validation.mandatory ? "email__label--required" : ""}`, htmlFor: `${this.name}__input` }, this.displayName), l("div", { key: "57a25e865a0bb7376d675195940046be19066caa", class: "email__wrapper--relative" }, this.tooltip && l("img", { key: "8e720b021706191a33a39cc62e29b8acb747e740", class: "email__tooltip-icon", src: G, alt: "", ref: (i) => this.tooltipIconReference = i, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), l("input", { key: "93cbeb1fcc0d5b992b9fb171b4d47b700087f284", id: `${this.name}__input`, type: "email", class: `email__input ${t}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, ref: (i) => this.inputReference = i, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), l("small", { key: "0eab5e5e8cd4a525f2160637af1be9c2e4d313c1", class: "email__error-message" }, this.errorMessage));
3467
- }
3468
- static get watchers() {
3469
- return {
3470
- clientStyling: ["handleStylingChange"],
3471
- isValid: ["validityChanged"],
3472
- emitValue: ["emitValueHandler"]
3473
- };
3474
- }
3475
- };
3476
- ka.style = Ta;
3477
- const Ca = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}', Va = Ca, Ma = class {
3478
- constructor(t) {
3479
- z(this, t), this.sendValidityState = H(this, "sendValidityState"), this.sendInputValue = H(this, "sendInputValue"), this.validationPattern = "", this.touched = !1, this.handleInput = (i) => {
3480
- this.value = i.target.value, this.touched = !0, this.debounceTime && clearTimeout(this.debounceTime), this.debounceTime = setTimeout(() => {
3481
- this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.emitValueHandler(!0);
3482
- }, 500);
3483
- }, this.handleBlur = () => {
3484
- this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.touched = !0;
3485
- }, this.setClientStyling = () => {
3486
- let i = document.createElement("style");
3487
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
3488
- }, this.name = void 0, this.displayName = void 0, this.placeholder = void 0, this.validation = void 0, this.defaultValue = void 0, this.autofilled = void 0, this.tooltip = void 0, this.language = void 0, this.emitValue = void 0, this.clientStyling = "", this.errorMessage = void 0, this.isValid = void 0, this.limitStylingAppends = !1, this.showTooltip = !1;
3489
- }
3490
- handleStylingChange(t, i) {
3491
- t !== i && this.setClientStyling();
3492
- }
3493
- validityChanged() {
3494
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value });
3495
- }
3496
- validityStateHandler(t) {
3497
- this.sendValidityState.emit(t);
3498
- }
3499
- emitValueHandler(t) {
3500
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value });
3501
- }
3502
- valueHandler(t) {
3503
- this.sendInputValue.emit(t);
3504
- }
3505
- handleClickOutside(t) {
3506
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
3507
- }
3508
- connectedCallback() {
3509
- this.validationPattern = this.setPattern();
3510
- }
3511
- componentDidRender() {
3512
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
3513
- }
3514
- componentDidLoad() {
3515
- this.isValid = this.setValidity(), this.defaultValue && (this.value = this.defaultValue, this.valueHandler({ name: this.name, value: this.value }));
3516
- }
3517
- setValidity() {
3518
- return this.inputReference.validity.valid;
3519
- }
3520
- setPattern() {
3521
- var t, i;
3522
- if (((t = this.validation.custom) === null || t === void 0 ? void 0 : t.length) > 0)
3523
- return (i = this.validation.custom.find((a) => a.rule === "regex")) === null || i === void 0 ? void 0 : i.pattern;
3524
- }
3525
- setErrorMessage() {
3526
- var t, i;
3527
- if (this.inputReference.validity.valueMissing)
3528
- return x("requiredError", this.language);
3529
- if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow)
3530
- return x("numberLengthError", this.language, { values: { min: this.validation.min, max: this.validation.max } });
3531
- if (this.inputReference.validity.patternMismatch) {
3532
- const a = (t = this.validation.custom.find((e) => e.rule === "regex")) === null || t === void 0 ? void 0 : t.errorKey, r = (i = this.validation.custom.find((e) => e.rule === "regex")) === null || i === void 0 ? void 0 : i.errorMessage;
3533
- return x(`${a}`, this.language) ? x(`${a}`, this.language) : r;
3534
- }
3535
- }
3536
- renderTooltip() {
3537
- return this.showTooltip ? l("div", { class: `number__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
3538
- }
3539
- render() {
3540
- let t = "";
3541
- return this.touched && (t = this.isValid == !0 || this.isValid == null ? "" : "text__input--invalid"), l("div", { key: "414aaa50eb36153d2879bc9c6d1024dd1def2712", class: `number__wrapper ${this.autofilled ? "number__wrapper--autofilled" : ""} ${this.name}__input`, ref: (i) => this.stylingContainer = i }, l("div", { key: "b607615d56849a46aa0a33c47795a43c0b4f0d3f", class: "number__wrapper--flex" }, l("label", { key: "109e742b76a4bdc539fb0299d9249ee7eddb088d", class: `number__label ${this.validation.mandatory ? "number__label--required" : ""}`, htmlFor: `${this.name}__input` }, this.displayName), l("div", { key: "951f79012890dc185e9eb27e30f107a77df7fa09", class: "number__wrapper--relative" }, this.tooltip && l("img", { key: "7f9721c37bfb782bfd43ce948f94c113333a0e4d", class: "number__tooltip-icon", src: G, alt: "", ref: (i) => this.tooltipIconReference = i, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), l("input", { key: "58f9b28983789f1a7525b3a9c30ab4c1fbaa9ab1", ref: (i) => this.inputReference = i, type: "number", value: this.defaultValue, readOnly: this.autofilled, id: `${this.name}__input`, class: `number__input ${t}`, pattern: this.validationPattern, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: this.handleInput, onBlur: this.handleBlur }), l("small", { key: "800f10c617221358f2d349b39e7831116f931f08", class: "number__error-message" }, this.errorMessage));
3542
- }
3543
- static get watchers() {
3544
- return {
3545
- clientStyling: ["handleStylingChange"],
3546
- isValid: ["validityChanged"],
3547
- emitValue: ["emitValueHandler"]
3548
- };
3549
- }
3550
- };
3551
- Ma.style = Va;
3552
- const Pa = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}", Da = Pa, Ea = class {
3553
- constructor(t) {
3554
- z(this, t), this.sendInputValue = H(this, "sendInputValue"), this.sendValidityState = H(this, "sendValidityState"), this.setClientStyling = () => {
3555
- let i = document.createElement("style");
3556
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
3557
- }, this.name = void 0, this.displayName = void 0, this.optionsGroup = void 0, this.validation = void 0, this.tooltip = void 0, this.language = void 0, this.emitValue = void 0, this.clientStyling = "", this.errorMessage = void 0, this.isValid = void 0, this.limitStylingAppends = !1, this.showTooltip = !1;
3558
- }
3559
- handleStylingChange(t, i) {
3560
- t !== i && this.setClientStyling();
3561
- }
3562
- validityChanged() {
3563
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value });
3564
- }
3565
- emitValueHandler(t) {
3566
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value });
3567
- }
3568
- valueHandler(t) {
3569
- this.sendInputValue.emit(t);
3570
- }
3571
- validityStateHandler(t) {
3572
- this.sendValidityState.emit(t);
3573
- }
3574
- handleClickOutside(t) {
3575
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
3576
- }
3577
- componentDidRender() {
3578
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
3579
- }
3580
- handleClick(t) {
3581
- this.value = t.target.value, this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.emitValueHandler(!0);
3582
- }
3583
- setValidity() {
3584
- return this.inputReference.validity.valid;
3585
- }
3586
- setErrorMessage() {
3587
- if (this.inputReference.validity.valueMissing)
3588
- return x("requiredError", this.language);
3589
- }
3590
- renderTooltip() {
3591
- return this.showTooltip ? l("div", { class: `radio__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
3592
- }
3593
- render() {
3594
- return l("fieldset", { key: "29ff8fcc910622397750532629ac0c202c9726ba", class: `radio__fieldset ${this.name}__input`, ref: (t) => this.stylingContainer = t }, l("legend", { key: "cdab5b331863f3d31aab50c1d95b5a8845d53329", class: "radio__legend" }, this.displayName, ":"), this.optionsGroup.map((t) => l("div", { class: "radio__wrapper" }, l("input", { type: "radio", class: "radio__input", id: `${t.label}__input`, ref: (i) => this.inputReference = i, value: t.value, name: this.name, required: this.validation.mandatory, onClick: (i) => this.handleClick(i) }), l("label", { htmlFor: `${t.label}__input` }, t.label))), l("small", { key: "bd6cd89510e7ace1348b391f3ce9ba334a03e695", class: "radio__error-message" }, this.errorMessage), this.tooltip && l("img", { key: "27036c51c89612dbb87e5248355d3a5466c49705", class: "radio__tooltip-icon", src: G, alt: "", ref: (t) => this.tooltipIconReference = t, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
3595
- }
3596
- static get watchers() {
3597
- return {
3598
- clientStyling: ["handleStylingChange"],
3599
- isValid: ["validityChanged"],
3600
- emitValue: ["emitValueHandler"]
3601
- };
3602
- }
3603
- };
3604
- Ea.style = Da;
3605
- const Oa = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}', Sa = Oa, Ha = class {
3606
- constructor(t) {
3607
- z(this, t), this.sendValidityState = H(this, "sendValidityState"), this.sendInputValue = H(this, "sendInputValue"), this.touched = !1, this.handleComboChange = (i) => {
3608
- this.touched = !0;
3609
- const a = i.target.value, r = this.options.find((e) => e.value.toLowerCase() === a.toLowerCase());
3610
- r ? this.value = r.value : this.value = a, this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.emitValueHandler(!0);
3611
- }, this.handleBlur = (i) => {
3612
- const a = i.currentTarget;
3613
- a.opened || (this.touched = !0, this.value = a.value, this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.validityStateHandler({ valid: this.isValid, name: this.name }));
3614
- }, this.handleSelectChange = (i) => {
3615
- this.touched = !0, this.value = i.target.value, this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValueHandler(!0);
3616
- }, this.setClientStyling = () => {
3617
- let i = document.createElement("style");
3618
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
3619
- }, this.name = void 0, this.displayName = void 0, this.placeholder = void 0, this.action = void 0, this.defaultValue = "", this.autofilled = void 0, this.tooltip = void 0, this.options = [], this.validation = void 0, this.language = void 0, this.emitValue = void 0, this.clientStyling = "", this.errorMessage = void 0, this.isValid = void 0, this.limitStylingAppends = !1, this.showTooltip = !1;
3620
- }
3621
- handleStylingChange(t, i) {
3622
- t !== i && this.setClientStyling();
3623
- }
3624
- validityChanged() {
3625
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value });
3626
- }
3627
- validityStateHandler(t) {
3628
- this.sendValidityState.emit(t);
3629
- }
3630
- emitValueHandler(t) {
3631
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value });
3632
- }
3633
- valueHandler(t) {
3634
- this.sendInputValue.emit(t);
3635
- }
3636
- handleClickOutside(t) {
3637
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
3638
- }
3639
- connectedCallback() {
3640
- var t;
3641
- this.displayedOptions = this.options.map((i) => ({
3642
- label: i.label,
3643
- value: i.value
3644
- })), this.isComboBox = ((t = this.displayedOptions) === null || t === void 0 ? void 0 : t.length) > 6;
3645
- }
3646
- componentWillLoad() {
3647
- if (this.action && !this.options.length && this.action.split(" ")[0] == "GET") {
3648
- const t = this.action.split(" ")[1];
3649
- return this.getOptions(t).then((i) => {
3650
- var a;
3651
- const r = Object.keys(i)[0];
3652
- this.displayedOptions = i[r].map((e) => ({ label: e.Name, value: e.Alpha2Code })), this.isComboBox = ((a = this.displayedOptions) === null || a === void 0 ? void 0 : a.length) > 6;
3653
- });
3654
- }
3655
- }
3656
- componentDidRender() {
3657
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
3658
- }
3659
- componentDidLoad() {
3660
- if (this.inputReference = this.vaadinCombo.querySelector("input"), this.defaultValue) {
3661
- const t = this.displayedOptions.find((i) => i.value.toUpperCase() === this.defaultValue.toUpperCase());
3662
- this.value = t.value, this.valueHandler({ name: this.name, value: this.value }), this.inputReference.value = this.value;
3663
- }
3664
- this.isValid = this.setValidity();
3665
- }
3666
- getOptions(t) {
3667
- const i = new URL(t);
3668
- return new Promise((a, r) => {
3669
- fetch(i.href).then((e) => e.json()).then((e) => {
3670
- a(e);
3671
- }).catch((e) => {
3672
- console.error(e), r(e);
3673
- });
3674
- });
3675
- }
3676
- setValidity() {
3677
- return this.vaadinCombo && "validate" in this.vaadinCombo ? this.vaadinCombo.validate() : !1;
3678
- }
3679
- setErrorMessage() {
3680
- var t, i, a;
3681
- if (!((i = (t = this.inputReference) === null || t === void 0 ? void 0 : t.validity) === null || i === void 0) && i.valueMissing || !((a = this.vaadinCombo) === null || a === void 0) && a.invalid)
3682
- return x("requiredError", this.language);
3683
- }
3684
- renderTooltip() {
3685
- return this.showTooltip ? l("div", { class: `select__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
3686
- }
3687
- render() {
3688
- var t, i;
3689
- let a = "";
3690
- return this.touched && (a = this.isValid == !0 || this.isValid == null ? "" : "text__input--invalid"), l("div", { key: "064b5084b26c1c18300b91bc4e5c5199d6e57616", class: `select__wrapper ${this.autofilled ? "select__wrapper--autofilled" : ""} ${this.name}__input`, ref: (r) => this.stylingContainer = r }, l("div", { key: "7d2adb9d5dd527a8a3e48fc5432f8f7c77de6d17", class: "select__wrapper--flex" }, l("label", { key: "f9e8d1a0e7f211a10d36916b76f60b6525d012cd", class: "select__label", htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? "*" : ""}`), l("div", { key: "13a01b566a332b4085ff44dc283ed34b302ca8e5", class: "select__wrapper--relative" }, this.tooltip && l("img", { key: "411d50bd0864fe021609436611fb2989c002c8a6", class: "select__tooltip-icon", src: G, alt: "", ref: (r) => this.tooltipIconReference = r, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? l("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${a} ${this.autofilled ? "select__input--autofilled" : ""}`, "item-label-path": "label", "item-value-path": "value", ref: (r) => this.vaadinCombo = r, readOnly: this.autofilled, required: (t = this.validation) === null || t === void 0 ? void 0 : t.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur }) : l("vaadin-select", { name: this.name, id: `${this.name}__input`, class: `select__input ${a} ${this.autofilled ? "select__input--autofilled" : ""}`, "item-label-path": "label", "item-value-path": "value", ref: (r) => this.vaadinCombo = r, readOnly: this.autofilled, required: (i = this.validation) === null || i === void 0 ? void 0 : i.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, onBlur: this.handleBlur }), l("small", { key: "6a39b060f974030f00cd27a01d805077de70bca3", class: "select__error-message" }, this.errorMessage));
3691
- }
3692
- static get watchers() {
3693
- return {
3694
- clientStyling: ["handleStylingChange"],
3695
- isValid: ["validityChanged"],
3696
- emitValue: ["emitValueHandler"]
3697
- };
3698
- }
3699
- };
3700
- Ha.style = Sa;
3701
- const Ia = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__wrapper .text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}', Fa = Ia, Ra = class {
3702
- constructor(t) {
3703
- z(this, t), this.sendValidityState = H(this, "sendValidityState"), this.sendInputValue = H(this, "sendInputValue"), this.validationPattern = "", this.touched = !1, this.handleInput = (i) => {
3704
- this.phoneValue = i.target.value, this.value = { prefix: this.prefixValue, phone: this.phoneValue }, this.touched = !0, this.debounceTime && clearTimeout(this.debounceTime), this.debounceTime = setTimeout(() => {
3705
- this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.emitValueHandler(!0);
3706
- }, 500);
3707
- }, this.handleBlur = () => {
3708
- this.touched || (this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.touched = !0);
3709
- }, this.setClientStyling = () => {
3710
- let i = document.createElement("style");
3711
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
3712
- }, this.name = void 0, this.displayName = void 0, this.placeholder = void 0, this.showLabels = void 0, this.action = void 0, this.validation = void 0, this.defaultValue = void 0, this.autofilled = void 0, this.tooltip = void 0, this.language = void 0, this.emitValue = void 0, this.clientStyling = "", this.isValid = void 0, this.errorMessage = void 0, this.limitStylingAppends = !1, this.showTooltip = !1;
3713
- }
3714
- handleStylingChange(t, i) {
3715
- t !== i && this.setClientStyling();
3716
- }
3717
- validityChanged() {
3718
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value, type: "tel" });
3719
- }
3720
- validityStateHandler(t) {
3721
- this.sendValidityState.emit(t);
3722
- }
3723
- emitValueHandler(t) {
3724
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value, type: "tel" });
3725
- }
3726
- valueHandler(t) {
3727
- this.sendInputValue.emit(t);
3728
- }
3729
- handleClickOutside(t) {
3730
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
3731
- }
3732
- connectedCallback() {
3733
- this.validationPattern = this.setPattern(), this.defaultValue && (this.prefixValue = this.defaultValue.prefix ? this.defaultValue.prefix : this.defaultValue, this.phoneValue = this.defaultValue.phone || null);
3734
- }
3735
- componentWillLoad() {
3736
- if (this.action && this.action.split(" ")[0] == "GET") {
3737
- const t = this.action.split(" ")[1];
3738
- return this.getPhoneCodes(t).then((i) => {
3739
- this.phoneCodesOptions = i.phoneCodes.map((a) => typeof a == "object" && a.Prefix ? { label: a.Prefix, value: a.Prefix } : { label: a, value: a });
3740
- });
3741
- }
3742
- }
3743
- componentDidRender() {
3744
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
3745
- }
3746
- componentDidLoad() {
3747
- this.isValid = this.setValidity(), this.defaultValue && (this.value = this.defaultValue, this.valueHandler({ name: this.name, value: this.value, type: "tel" }));
3748
- }
3749
- getPhoneCodes(t) {
3750
- const i = new URL(t);
3751
- return new Promise((a, r) => {
3752
- fetch(i.href).then((e) => e.json()).then((e) => {
3753
- a(e);
3754
- }).catch((e) => {
3755
- console.error(e), r(e);
3756
- });
3757
- });
3758
- }
3759
- handlePrefixInput(t) {
3760
- this.prefixValue = t.target.value, this.value = { prefix: this.prefixValue, phone: this.phoneValue }, this.emitValueHandler(!0);
3761
- }
3762
- setValidity() {
3763
- return this.inputReference.validity.valid;
3764
- }
3765
- setPattern() {
3766
- var t, i;
3767
- if (((t = this.validation.custom) === null || t === void 0 ? void 0 : t.length) > 0)
3768
- return (i = this.validation.custom.find((a) => a.rule === "regex")) === null || i === void 0 ? void 0 : i.pattern;
3769
- }
3770
- setErrorMessage() {
3771
- var t, i;
3772
- if (this.inputReference.validity.patternMismatch) {
3773
- const a = (t = this.validation.custom.find((e) => e.rule === "regex")) === null || t === void 0 ? void 0 : t.errorKey, r = (i = this.validation.custom.find((e) => e.rule === "regex")) === null || i === void 0 ? void 0 : i.errorMessage;
3774
- return x(`${a}`, this.language) ? x(`${a}`, this.language) : r;
3775
- }
3776
- if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong)
3777
- return x("lengthError", this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
3778
- if (this.inputReference.validity.valueMissing)
3779
- return x("requiredError", this.language);
3780
- }
3781
- renderTooltip() {
3782
- return this.showTooltip ? l("div", { class: `tel__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
3783
- }
3784
- render() {
3785
- let t = "";
3786
- return this.touched && (t = this.isValid == !0 || this.isValid == null ? "" : "text__input--invalid"), l("div", { key: "a38531b8b0fa40e745a3a2b8ac39a56d0001c09f", class: `tel__wrapper ${this.autofilled ? "tel__wrapper--autofilled" : ""} ${this.name}__input`, ref: (i) => this.stylingContainer = i }, l("div", { key: "70c35c825dafc0aee70835e87aeadab141dc22d3", class: "tel__wrapper--flex-label" }, l("label", { key: "5ff2f5df35dcec4ea76f3b9496b193183c03188d", class: `tel__label ${this.validation.mandatory ? "tel__label--required" : ""}`, htmlFor: `${this.name}__input` }, this.displayName), l("div", { key: "dc1625d8c724596b05ca2b0069f492ef9172bc10", class: "tel__wrapper--relative" }, this.tooltip && l("img", { key: "a6e94e7598b6734b4c83d95e13a113d6f835d755", class: "tel__tooltip-icon", src: G, alt: "", ref: (i) => this.tooltipIconReference = i, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), l("div", { key: "d3865c4a88ea5b6de6791883b3b6955b6b3a0c15", class: `tel__wrapper--flex ${t}` }, l("vaadin-combo-box", { key: "6d845d492057a29590bffb86c509d3f8cfbf6260", class: "tel__prefix", items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (i) => this.handlePrefixInput(i) }), l("input", { key: "0cb8fe81d26828c0997379352ee25e5a416b5675", type: "tel", ref: (i) => this.inputReference = i, id: `${this.name}__input`, readOnly: this.autofilled, class: "tel__input", value: this.phoneValue, placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), l("small", { key: "1de6d39f83643e86d76659946d2996cc6e82c495", class: "tel__error-message" }, this.errorMessage));
3787
- }
3788
- static get watchers() {
3789
- return {
3790
- clientStyling: ["handleStylingChange"],
3791
- isValid: ["validityChanged"],
3792
- emitValue: ["emitValueHandler"]
3793
- };
3794
- }
3795
- };
3796
- Ra.style = Fa;
3797
- const Ua = '*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}', $a = Ua, La = class {
3798
- constructor(t) {
3799
- z(this, t), this.sendValidityState = H(this, "sendValidityState"), this.sendInputValue = H(this, "sendInputValue"), this.value = "", this.validationPattern = "", this.duplicateInputValue = null, this.touched = !1, this.handleInput = (i) => {
3800
- this.value = i.target.value, this.touched = !0, this.debounceTime && clearTimeout(this.debounceTime), this.debounceTime = setTimeout(() => {
3801
- this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValueHandler(!0);
3802
- }, 500);
3803
- }, this.handleBlur = (i) => {
3804
- this.value = i.target.value, this.touched = !0, this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage(), this.validityStateHandler({ valid: this.isValid, name: this.name });
3805
- }, this.setClientStyling = () => {
3806
- let i = document.createElement("style");
3807
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
3808
- }, this.name = void 0, this.displayName = void 0, this.placeholder = void 0, this.validation = void 0, this.defaultValue = "", this.autofilled = void 0, this.tooltip = void 0, this.language = void 0, this.checkValidity = void 0, this.emitValue = void 0, this.isDuplicateInput = void 0, this.clientStyling = "", this.isValid = void 0, this.errorMessage = "", this.limitStylingAppends = !1, this.showTooltip = !1;
3809
- }
3810
- handleStylingChange(t, i) {
3811
- t !== i && this.setClientStyling();
3812
- }
3813
- validityChanged() {
3814
- this.validityStateHandler({ valid: this.isValid, name: this.name }), this.emitValue == !0 && this.valueHandler({ name: this.name, value: this.value });
3815
- }
3816
- emitValueHandler(t) {
3817
- t == !0 && this.isValid && this.valueHandler({ name: this.name, value: this.value });
3818
- }
3819
- validityStateHandler(t) {
3820
- this.sendValidityState.emit(t);
3821
- }
3822
- valueHandler(t) {
3823
- this.sendInputValue.emit(t);
3824
- }
3825
- handleClickOutside(t) {
3826
- t.composedPath()[0] !== this.tooltipIconReference && t.composedPath()[0] !== this.tooltipReference && (this.showTooltip = !1);
3827
- }
3828
- valueChangedHandler(t) {
3829
- this.isDuplicateInput && this.name === t.detail.name + "Duplicate" && (this.duplicateInputValue = t.detail.value, this.touched && (this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage())), this.name === t.detail.name + "Duplicate" && this.name.replace("Duplicate", "") === t.detail.name && this.touched === !0 && (this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage());
3830
- }
3831
- handleValidationChange(t) {
3832
- t.detail.field === this.name && (this.validation = t.detail.validation, this.validationPattern = this.setPattern(), this.touched && (this.isValid = this.setValidity(), this.errorMessage = this.setErrorMessage()));
3833
- }
3834
- connectedCallback() {
3835
- this.validationPattern = this.setPattern();
3836
- }
3837
- componentDidRender() {
3838
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.limitStylingAppends = !0);
3839
- }
3840
- componentDidLoad() {
3841
- this.defaultValue && (this.value = this.defaultValue, this.valueHandler({ name: this.name, value: this.value }), this.isDuplicateInput && (this.touched = !0)), this.isValid = this.setValidity();
3842
- }
3843
- setValidity() {
3844
- if (this.isDuplicateInput && this.duplicateInputValue !== this.value || !this.inputReference)
3845
- return !1;
3846
- const t = this.inputReference.validity.valid, i = !this.inputReference.value || this.inputReference.value.match(this.validationPattern) !== null;
3847
- return t && i;
3848
- }
3849
- setPattern() {
3850
- var t, i;
3851
- if (((t = this.validation.custom) === null || t === void 0 ? void 0 : t.length) > 0)
3852
- return (i = this.validation.custom.find((a) => a.rule === "regex")) === null || i === void 0 ? void 0 : i.pattern;
3853
- }
3854
- setErrorMessage() {
3855
- var t, i, a, r;
3856
- if (this.inputReference.validity.valueMissing)
3857
- return x("requiredError", this.language);
3858
- if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong)
3859
- return x("lengthError", this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
3860
- if (this.inputReference.value.match(this.validationPattern) == null) {
3861
- const e = (t = this.validation.custom.find((n) => n.rule === "regex")) === null || t === void 0 ? void 0 : t.errorKey, o = (i = this.validation.custom.find((n) => n.rule === "regex")) === null || i === void 0 ? void 0 : i.errorMessage;
3862
- return x(`${e}`, this.language) || o;
3863
- }
3864
- if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
3865
- const e = (a = this.validation.custom.find((n) => n.rule === "duplicate-input")) === null || a === void 0 ? void 0 : a.errorKey, o = (r = this.validation.custom.find((n) => n.rule === "duplicate-input")) === null || r === void 0 ? void 0 : r.errorMessage;
3866
- return x(`${e}`, this.language) ? x(`${e}`, this.language) : o;
3867
- }
3868
- }
3869
- renderTooltip() {
3870
- return this.showTooltip ? l("div", { class: `text__tooltip ${this.showTooltip ? "visible" : ""}`, ref: (t) => this.tooltipReference = t, innerHTML: this.tooltip }) : null;
3871
- }
3872
- render() {
3873
- let t = "";
3874
- return this.touched && (t = this.isValid == !0 || this.isValid == null ? "" : "text__input--invalid"), l("div", { key: "65f086c89daa3c3ebc40e6f0c58fbd24ff6e9050", class: `text__wrapper ${this.name}__input ${this.autofilled ? "text__wrapper--autofilled" : ""}`, ref: (i) => this.stylingContainer = i }, l("div", { key: "970d4aa2de6419ab7904e1315c669aadc7f462b3", class: "text__wrapper--flex" }, l("label", { key: "6e3d033ebcf3ecd4a8c3f3a3a35f1e2e4bc8261a", class: `text__label ${this.validation.mandatory ? "text__label--required" : ""}`, htmlFor: `${this.name}__input` }, this.displayName), l("div", { key: "7247b4e12c1caf287534541d0cf019ddeaa78182", class: "text__wrapper--relative" }, this.tooltip && l("img", { key: "3b96da6c25789e12cbbc3408246650d6d1c72712", class: "text__tooltip-icon", src: G, alt: "", ref: (i) => this.tooltipIconReference = i, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), l("input", { key: "8fc695313a9e2e19898380dfff97ee76b6e509df", name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: "text", class: `text__input ${t}`, placeholder: `${this.placeholder}`, ref: (i) => this.inputReference = i, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), l("small", { key: "90f0552125dbf888c915aa1b2e20446df6a48b9c", class: "text__error-message" }, this.errorMessage));
3875
- }
3876
- static get watchers() {
3877
- return {
3878
- clientStyling: ["handleStylingChange"],
3879
- isValid: ["validityChanged"],
3880
- emitValue: ["emitValueHandler"]
3881
- };
3882
- }
3883
- };
3884
- La.style = $a;
3885
- export {
3886
- ot as checkbox_group_input,
3887
- ut as checkbox_input,
3888
- _a as date_input,
3889
- ka as email_input,
3890
- Ma as number_input,
3891
- Ea as radio_input,
3892
- Ha as select_input,
3893
- Ra as tel_input,
3894
- La as text_input
3895
- };