@citizenplane/pimp 7.0.2 → 7.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pimp.es.js CHANGED
@@ -29,10 +29,10 @@ var __objRest = (source, exclude) => {
29
29
  }
30
30
  return target;
31
31
  };
32
- import { openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, resolveComponent, createVNode, createCommentVNode, createTextVNode, withDirectives, vModelText, Fragment, renderList, vModelSelect, defineComponent, h, resolveDirective, Transition, normalizeStyle, TransitionGroup, vShow, withModifiers, vModelCheckbox, withKeys } from "vue";
33
- function _mergeNamespaces(n2, m2) {
34
- m2.forEach(function(e2) {
35
- Object.keys(e2).forEach(function(k2) {
32
+ import { openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, resolveComponent, createVNode, createCommentVNode, createTextVNode, withDirectives, vModelText, Fragment, renderList, vModelSelect, defineComponent, watch, h as h$1, resolveDirective, Transition, normalizeStyle, withKeys, TransitionGroup, vShow, withModifiers, vModelCheckbox } from "vue";
33
+ function _mergeNamespaces(n2, m) {
34
+ m.forEach(function(e2) {
35
+ e2 && typeof e2 !== "string" && !Array.isArray(e2) && Object.keys(e2).forEach(function(k2) {
36
36
  if (k2 !== "default" && !(k2 in n2)) {
37
37
  var d2 = Object.getOwnPropertyDescriptor(e2, k2);
38
38
  Object.defineProperty(n2, k2, d2.get ? d2 : {
@@ -47,175 +47,172 @@ function _mergeNamespaces(n2, m2) {
47
47
  return Object.freeze(n2);
48
48
  }
49
49
  /*!
50
- * maska v1.4.6
50
+ * maska v1.5.0
51
51
  * (c) 2019-2021 Alexander Shabunevich
52
52
  * Released under the MIT License.
53
53
  */
54
54
  function e(e2, t2) {
55
+ if (!(e2 instanceof t2))
56
+ throw new TypeError("Cannot call a class as a function");
57
+ }
58
+ function t(e2, t2) {
59
+ for (var n2 = 0; n2 < t2.length; n2++) {
60
+ var r2 = t2[n2];
61
+ r2.enumerable = r2.enumerable || false, r2.configurable = true, "value" in r2 && (r2.writable = true), Object.defineProperty(e2, r2.key, r2);
62
+ }
63
+ }
64
+ function n$1(e2, t2, n2) {
65
+ return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2;
66
+ }
67
+ function r(e2, t2) {
55
68
  var n2 = Object.keys(e2);
56
69
  if (Object.getOwnPropertySymbols) {
57
- var a2 = Object.getOwnPropertySymbols(e2);
58
- t2 && (a2 = a2.filter(function(t3) {
70
+ var r2 = Object.getOwnPropertySymbols(e2);
71
+ t2 && (r2 = r2.filter(function(t3) {
59
72
  return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
60
- })), n2.push.apply(n2, a2);
73
+ })), n2.push.apply(n2, r2);
61
74
  }
62
75
  return n2;
63
76
  }
64
- function t(t2) {
65
- for (var n2 = 1; n2 < arguments.length; n2++) {
66
- var a2 = arguments[n2] != null ? arguments[n2] : {};
67
- n2 % 2 ? e(Object(a2), true).forEach(function(e2) {
68
- r(t2, e2, a2[e2]);
69
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(a2)) : e(Object(a2)).forEach(function(e2) {
70
- Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(a2, e2));
77
+ function a(e2) {
78
+ for (var t2 = 1; t2 < arguments.length; t2++) {
79
+ var a2 = arguments[t2] != null ? arguments[t2] : {};
80
+ t2 % 2 ? r(Object(a2), true).forEach(function(t3) {
81
+ n$1(e2, t3, a2[t3]);
82
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(a2)) : r(Object(a2)).forEach(function(t3) {
83
+ Object.defineProperty(e2, t3, Object.getOwnPropertyDescriptor(a2, t3));
71
84
  });
72
85
  }
73
- return t2;
74
- }
75
- function n$1(e2, t2) {
76
- if (!(e2 instanceof t2))
77
- throw new TypeError("Cannot call a class as a function");
86
+ return e2;
78
87
  }
79
- function a(e2, t2) {
80
- for (var n2 = 0; n2 < t2.length; n2++) {
81
- var a2 = t2[n2];
82
- a2.enumerable = a2.enumerable || false, a2.configurable = true, "value" in a2 && (a2.writable = true), Object.defineProperty(e2, a2.key, a2);
83
- }
84
- }
85
- function r(e2, t2, n2) {
86
- return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2;
88
+ var o = { "#": { pattern: /[0-9]/ }, X: { pattern: /[0-9a-zA-Z]/ }, S: { pattern: /[a-zA-Z]/ }, A: { pattern: /[a-zA-Z]/, uppercase: true }, a: { pattern: /[a-zA-Z]/, lowercase: true }, "!": { escape: true }, "*": { repeat: true } };
89
+ function s$1(e2, t2) {
90
+ var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : o, r2 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3];
91
+ return i(t2).length > 1 ? u(t2)(e2, t2, n2, r2) : p(e2, t2, n2, r2);
87
92
  }
88
- var u = { "#": { pattern: /[0-9]/ }, X: { pattern: /[0-9a-zA-Z]/ }, S: { pattern: /[a-zA-Z]/ }, A: { pattern: /[a-zA-Z]/, uppercase: true }, a: { pattern: /[a-zA-Z]/, lowercase: true }, "!": { escape: true }, "*": { repeat: true } };
89
- function i(e2, t2) {
90
- var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : u, a2 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3];
91
- return o(t2).length > 1 ? s$1(t2)(e2, t2, n2, a2) : l$1(e2, t2, n2, a2);
92
- }
93
- function o(e2) {
93
+ function i(e2) {
94
94
  try {
95
95
  return JSON.parse(e2);
96
96
  } catch (t2) {
97
97
  return [e2];
98
98
  }
99
99
  }
100
- function s$1(e2) {
101
- var t2 = o(e2).sort(function(e3, t3) {
100
+ function u(e2) {
101
+ var t2 = i(e2).sort(function(e3, t3) {
102
102
  return e3.length - t3.length;
103
103
  });
104
- return function(e3, a2, r2) {
105
- var u2 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], i2 = t2.map(function(t3) {
106
- return l$1(e3, t3, r2, false);
107
- }), o2 = i2.pop();
108
- for (var s2 in t2)
109
- if (n2(o2, t2[s2], r2))
110
- return l$1(e3, t2[s2], r2, u2);
104
+ return function(e3, r2, a2) {
105
+ var o2 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], s2 = t2.map(function(t3) {
106
+ return p(e3, t3, a2, false);
107
+ }), i2 = s2.pop();
108
+ for (var u2 in t2)
109
+ if (n2(i2, t2[u2], a2))
110
+ return p(e3, t2[u2], a2, o2);
111
111
  return "";
112
112
  };
113
113
  function n2(e3, t3, n3) {
114
- for (var a2 in n3)
115
- n3[a2].escape && (t3 = t3.replace(new RegExp(a2 + ".{1}", "g"), ""));
114
+ for (var r2 in n3)
115
+ n3[r2].escape && (t3 = t3.replace(new RegExp(r2 + ".{1}", "g"), ""));
116
116
  return t3.split("").filter(function(e4) {
117
117
  return n3[e4] && n3[e4].pattern;
118
118
  }).length >= e3.length;
119
119
  }
120
120
  }
121
- function l$1(e2, t2, n2) {
122
- for (var a2 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], r2 = 0, u2 = 0, i2 = "", o2 = ""; r2 < t2.length && u2 < e2.length; ) {
123
- var s2 = t2[r2], l2 = e2[u2], p2 = n2[s2];
124
- if (p2 && p2.pattern)
125
- p2.pattern.test(l2) && (i2 += c(l2, p2), r2++, a2 && t2[r2] && (n2[t2[r2]] ? n2[t2[r2]] && n2[t2[r2]].escape && (i2 += t2[r2 + 1], r2 += 2) : (i2 += t2[r2], r2++))), u2++;
126
- else if (p2 && p2.repeat) {
127
- var f2 = n2[t2[r2 - 1]];
128
- f2 && !f2.pattern.test(l2) ? r2++ : r2--;
121
+ function p(e2, t2, n2) {
122
+ for (var r2 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], a2 = 0, o2 = 0, s2 = "", i2 = ""; a2 < t2.length && o2 < e2.length; ) {
123
+ var u2 = t2[a2], p2 = e2[o2], c2 = n2[u2];
124
+ if (c2 && c2.pattern)
125
+ c2.pattern.test(p2) && (s2 += l$1(p2, c2), a2++, r2 && t2[a2] && (n2[t2[a2]] ? n2[t2[a2]] && n2[t2[a2]].escape && (s2 += t2[a2 + 1], a2 += 2) : (s2 += t2[a2], a2++))), o2++;
126
+ else if (c2 && c2.repeat) {
127
+ var f2 = n2[t2[a2 - 1]];
128
+ f2 && !f2.pattern.test(p2) ? a2++ : a2--;
129
129
  } else
130
- p2 && p2.escape && (s2 = t2[++r2]), a2 && (i2 += s2), l2 === s2 && u2++, r2++;
130
+ c2 && c2.escape && (u2 = t2[++a2]), r2 && (s2 += u2), p2 === u2 && o2++, a2++;
131
131
  }
132
- for (; a2 && r2 < t2.length; ) {
133
- var v2 = t2[r2];
132
+ for (; r2 && a2 < t2.length; ) {
133
+ var v2 = t2[a2];
134
134
  if (n2[v2]) {
135
- o2 = "";
135
+ i2 = "";
136
136
  break;
137
137
  }
138
- o2 += v2, r2++;
138
+ i2 += v2, a2++;
139
139
  }
140
- return i2 + o2;
140
+ return s2 + i2;
141
141
  }
142
- function c(e2, t2) {
142
+ function l$1(e2, t2) {
143
143
  return t2.transform && (e2 = t2.transform(e2)), t2.uppercase ? e2.toLocaleUpperCase() : t2.lowercase ? e2.toLocaleLowerCase() : e2;
144
144
  }
145
- function p(e2) {
145
+ function c(e2) {
146
146
  return e2 instanceof HTMLInputElement ? e2 : e2.querySelector("input") || e2;
147
147
  }
148
148
  function f(e2) {
149
149
  return Object.prototype.toString.call(e2) === "[object String]";
150
150
  }
151
151
  var v = function() {
152
- function e2(a2) {
153
- var r3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
154
- if (n$1(this, e2), !a2)
152
+ function n2(t2) {
153
+ var r3 = this, s2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
154
+ if (e(this, n2), !t2)
155
155
  throw new Error("Maska: no element for mask");
156
- if (r3.tokens)
157
- for (var i2 in r3.tokens)
158
- r3.tokens[i2] = t({}, r3.tokens[i2]), r3.tokens[i2].pattern && f(r3.tokens[i2].pattern) && (r3.tokens[i2].pattern = new RegExp(r3.tokens[i2].pattern));
159
- this._opts = { mask: r3.mask, tokens: t(t({}, u), r3.tokens) }, this._el = f(a2) ? document.querySelectorAll(a2) : a2.length ? a2 : [a2], this.init();
160
- }
161
- var r2, o2;
162
- return r2 = e2, (o2 = [{ key: "init", value: function() {
163
- for (var e3 = this, t2 = function(t3) {
164
- var n3 = p(e3._el[t3]);
165
- !e3._opts.mask || n3.dataset.mask && n3.dataset.mask === e3._opts.mask || (n3.dataset.mask = e3._opts.mask), setTimeout(function() {
166
- return e3.updateValue(n3);
167
- }, 0), n3.dataset.maskInited || (n3.dataset.maskInited = true, n3.addEventListener("input", function(t4) {
168
- return e3.updateValue(t4.target, t4);
169
- }), n3.addEventListener("beforeinput", function(t4) {
170
- return e3.beforeInput(t4);
171
- }));
172
- }, n2 = 0; n2 < this._el.length; n2++)
173
- t2(n2);
156
+ if (s2.preprocessor != null && typeof s2.preprocessor != "function")
157
+ throw new Error("Maska: preprocessor must be a function");
158
+ if (s2.tokens)
159
+ for (var i3 in s2.tokens)
160
+ s2.tokens[i3] = a({}, s2.tokens[i3]), s2.tokens[i3].pattern && f(s2.tokens[i3].pattern) && (s2.tokens[i3].pattern = new RegExp(s2.tokens[i3].pattern));
161
+ this._opts = { mask: s2.mask, tokens: a(a({}, o), s2.tokens), preprocessor: s2.preprocessor }, this._el = f(t2) ? document.querySelectorAll(t2) : t2.length ? t2 : [t2], this.inputEvent = function(e2) {
162
+ return r3.updateValue(e2.target, e2);
163
+ }, this.init();
164
+ }
165
+ var r2, i2;
166
+ return r2 = n2, (i2 = [{ key: "init", value: function() {
167
+ for (var e2 = this, t2 = function(t3) {
168
+ var n4 = c(e2._el[t3]);
169
+ !e2._opts.mask || n4.dataset.mask && n4.dataset.mask === e2._opts.mask || (n4.dataset.mask = e2._opts.mask), setTimeout(function() {
170
+ return e2.updateValue(n4);
171
+ }, 0), n4.dataset.maskInited || (n4.dataset.maskInited = true, n4.addEventListener("input", e2.inputEvent), n4.addEventListener("beforeinput", e2.beforeInput));
172
+ }, n3 = 0; n3 < this._el.length; n3++)
173
+ t2(n3);
174
174
  } }, { key: "destroy", value: function() {
175
- for (var e3 = this, t2 = 0; t2 < this._el.length; t2++) {
176
- var n2 = p(this._el[t2]);
177
- n2.removeEventListener("input", function(t3) {
178
- return e3.updateValue(t3.target, t3);
179
- }), n2.removeEventListener("beforeinput", function(t3) {
180
- return e3.beforeInput(t3);
181
- }), delete n2.dataset.mask, delete n2.dataset.maskInited;
182
- }
183
- } }, { key: "updateValue", value: function(e3, t2) {
184
- if (e3 && e3.type) {
185
- var n2 = e3.type.match(/^number$/i) && e3.validity.badInput;
186
- if (!e3.value && !n2 || !e3.dataset.mask)
187
- return e3.dataset.maskRawValue = "", void this.dispatch("maska", e3, t2);
188
- var a2 = e3.selectionEnd, r3 = e3.value, u2 = r3[a2 - 1];
189
- e3.dataset.maskRawValue = i(e3.value, e3.dataset.mask, this._opts.tokens, false), e3.value = i(e3.value, e3.dataset.mask, this._opts.tokens), t2 && t2.inputType === "insertText" && a2 === r3.length && (a2 = e3.value.length), function(e4, t3, n3) {
190
- for (; t3 && t3 < e4.value.length && e4.value.charAt(t3 - 1) !== n3; )
175
+ for (var e2 = 0; e2 < this._el.length; e2++) {
176
+ var t2 = c(this._el[e2]);
177
+ t2.removeEventListener("input", this.inputEvent), t2.removeEventListener("beforeinput", this.beforeInput), delete t2.dataset.mask, delete t2.dataset.maskInited;
178
+ }
179
+ } }, { key: "updateValue", value: function(e2, t2) {
180
+ if (e2 && e2.type) {
181
+ var n3 = e2.type.match(/^number$/i) && e2.validity.badInput;
182
+ if (!e2.value && !n3 || !e2.dataset.mask)
183
+ return e2.dataset.maskRawValue = "", void this.dispatch("maska", e2, t2);
184
+ var r3 = e2.selectionEnd, a2 = e2.value, o2 = a2[r3 - 1];
185
+ e2.dataset.maskRawValue = s$1(e2.value, e2.dataset.mask, this._opts.tokens, false);
186
+ var i3 = e2.value;
187
+ this._opts.preprocessor && (i3 = this._opts.preprocessor(i3)), e2.value = s$1(i3, e2.dataset.mask, this._opts.tokens), t2 && t2.inputType === "insertText" && r3 === a2.length && (r3 = e2.value.length), function(e3, t3, n4) {
188
+ for (; t3 && t3 < e3.value.length && e3.value.charAt(t3 - 1) !== n4; )
191
189
  t3++;
192
- (e4.type ? e4.type.match(/^(text|search|password|tel|url)$/i) : !e4.type) && e4 === document.activeElement && (e4.setSelectionRange(t3, t3), setTimeout(function() {
193
- e4.setSelectionRange(t3, t3);
190
+ (e3.type ? e3.type.match(/^(text|search|password|tel|url)$/i) : !e3.type) && e3 === document.activeElement && (e3.setSelectionRange(t3, t3), setTimeout(function() {
191
+ e3.setSelectionRange(t3, t3);
194
192
  }, 0));
195
- }(e3, a2, u2), this.dispatch("maska", e3, t2), e3.value !== r3 && this.dispatch("input", e3, t2);
196
- }
197
- } }, { key: "beforeInput", value: function(e3) {
198
- e3 && e3.target && e3.target.type && e3.target.type.match(/^number$/i) && e3.data && isNaN(e3.target.value + e3.data) && e3.preventDefault();
199
- } }, { key: "dispatch", value: function(e3, t2, n2) {
200
- t2.dispatchEvent(function(e4) {
201
- var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n3 = document.createEvent("Event");
202
- return n3.initEvent(e4, true, true), t3 && (n3.inputType = t3), n3;
203
- }(e3, n2 && n2.inputType || null));
204
- } }]) && a(r2.prototype, o2), e2;
193
+ }(e2, r3, o2), this.dispatch("maska", e2, t2), e2.value !== a2 && this.dispatch("input", e2, t2);
194
+ }
195
+ } }, { key: "beforeInput", value: function(e2) {
196
+ e2 && e2.target && e2.target.type && e2.target.type.match(/^number$/i) && e2.data && isNaN(e2.target.value + e2.data) && e2.preventDefault();
197
+ } }, { key: "dispatch", value: function(e2, t2, n3) {
198
+ t2.dispatchEvent(function(e3) {
199
+ var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n4 = document.createEvent("Event");
200
+ return n4.initEvent(e3, true, true), t3 && (n4.inputType = t3), n4;
201
+ }(e2, n3 && n3.inputType || null));
202
+ } }]) && t(r2.prototype, i2), n2;
205
203
  }();
206
- var d, k = (d = new WeakMap(), function(e2, n2) {
207
- if (n2.value)
208
- return d.has(e2) && !function(e3) {
209
- return !(f(e3.value) && e3.value === e3.oldValue || Array.isArray(e3.value) && JSON.stringify(e3.value) === JSON.stringify(e3.oldValue) || e3.value && e3.value.mask && e3.oldValue && e3.oldValue.mask && e3.value.mask === e3.oldValue.mask);
210
- }(n2) ? d.get(e2).updateValue(e2) : void d.set(e2, new v(e2, function(e3) {
211
- var n3 = {};
212
- return e3.mask ? (n3.mask = Array.isArray(e3.mask) ? JSON.stringify(e3.mask) : e3.mask, n3.tokens = e3.tokens ? t({}, e3.tokens) : {}) : n3.mask = Array.isArray(e3) ? JSON.stringify(e3) : e3, n3;
213
- }(n2.value)));
204
+ var d, h = (d = new WeakMap(), function(e2, t2) {
205
+ t2.value && (d.has(e2) && !function(e3) {
206
+ return !(f(e3.value) && e3.value === e3.oldValue || Array.isArray(e3.value) && JSON.stringify(e3.value) === JSON.stringify(e3.oldValue) || e3.value && e3.value.mask && e3.oldValue && e3.oldValue.mask && e3.value.mask === e3.oldValue.mask);
207
+ }(t2) || d.set(e2, new v(e2, function(e3) {
208
+ var t3 = {};
209
+ return e3.mask ? (t3.mask = Array.isArray(e3.mask) ? JSON.stringify(e3.mask) : e3.mask, t3.tokens = e3.tokens ? a({}, e3.tokens) : {}, t3.preprocessor = e3.preprocessor) : t3.mask = Array.isArray(e3) ? JSON.stringify(e3) : e3, t3;
210
+ }(t2.value))));
214
211
  });
215
- function m(e2) {
216
- e2.directive("maska", k);
212
+ function k(e2) {
213
+ e2.directive("maska", h);
217
214
  }
218
- typeof window != "undefined" && window.Vue && window.Vue.use && window.Vue.use(m);
215
+ typeof window != "undefined" && window.Vue && window.Vue.use && window.Vue.use(k);
219
216
  var ClickOutside = {
220
217
  beforeMount(el, binding) {
221
218
  el.clickOutsideEvent = function(event) {
@@ -481,6 +478,13 @@ function parseInteger(string) {
481
478
  return parseInt(string, 10);
482
479
  }
483
480
  }
481
+ function parseFloating(string) {
482
+ if (isUndefined(string) || string === null || string === "") {
483
+ return void 0;
484
+ } else {
485
+ return parseFloat(string);
486
+ }
487
+ }
484
488
  function parseMillis(fraction) {
485
489
  if (isUndefined(fraction) || fraction === null || fraction === "") {
486
490
  return void 0;
@@ -538,7 +542,7 @@ function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {
538
542
  intlOpts.timeZone = timeZone;
539
543
  }
540
544
  const modified = __spreadValues({ timeZoneName: offsetFormat }, intlOpts);
541
- const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((m2) => m2.type.toLowerCase() === "timezonename");
545
+ const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((m) => m.type.toLowerCase() === "timezonename");
542
546
  return parsed ? parsed.value : null;
543
547
  }
544
548
  function signedOffset(offHourStr, offMinuteStr) {
@@ -583,7 +587,7 @@ function formatOffset(offset2, format) {
583
587
  function timeObject(obj) {
584
588
  return pick(obj, ["hour", "minute", "second", "millisecond"]);
585
589
  }
586
- const ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;
590
+ const ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/;
587
591
  const monthsLong = [
588
592
  "January",
589
593
  "February",
@@ -835,6 +839,10 @@ class Formatter {
835
839
  return this.num(dt.second);
836
840
  case "ss":
837
841
  return this.num(dt.second, 2);
842
+ case "uu":
843
+ return this.num(Math.floor(dt.millisecond / 10), 2);
844
+ case "uuu":
845
+ return this.num(Math.floor(dt.millisecond / 100));
838
846
  case "m":
839
847
  return this.num(dt.minute);
840
848
  case "mm":
@@ -1049,7 +1057,7 @@ let dtfCache = {};
1049
1057
  function makeDTF(zone) {
1050
1058
  if (!dtfCache[zone]) {
1051
1059
  dtfCache[zone] = new Intl.DateTimeFormat("en-US", {
1052
- hourCycle: "h23",
1060
+ hour12: false,
1053
1061
  timeZone: zone,
1054
1062
  year: "numeric",
1055
1063
  month: "2-digit",
@@ -1099,6 +1107,9 @@ class IANAZone extends Zone {
1099
1107
  return !!(s2 && s2.match(matchingRegex));
1100
1108
  }
1101
1109
  static isValidZone(zone) {
1110
+ if (!zone) {
1111
+ return false;
1112
+ }
1102
1113
  try {
1103
1114
  new Intl.DateTimeFormat("en-US", { timeZone: zone }).format();
1104
1115
  return true;
@@ -1106,15 +1117,6 @@ class IANAZone extends Zone {
1106
1117
  return false;
1107
1118
  }
1108
1119
  }
1109
- static parseGMTOffset(specifier) {
1110
- if (specifier) {
1111
- const match2 = specifier.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);
1112
- if (match2) {
1113
- return -60 * parseInt(match2[1]);
1114
- }
1115
- }
1116
- return null;
1117
- }
1118
1120
  constructor(name) {
1119
1121
  super();
1120
1122
  this.zoneName = name;
@@ -1140,11 +1142,12 @@ class IANAZone extends Zone {
1140
1142
  if (isNaN(date))
1141
1143
  return NaN;
1142
1144
  const dtf = makeDTF(this.name), [year, month, day, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);
1145
+ const adjustedHour = hour === 24 ? 0 : hour;
1143
1146
  const asUTC = objToLocalTS({
1144
1147
  year,
1145
1148
  month,
1146
1149
  day,
1147
- hour,
1150
+ hour: adjustedHour,
1148
1151
  minute,
1149
1152
  second,
1150
1153
  millisecond: 0
@@ -1241,7 +1244,6 @@ class InvalidZone extends Zone {
1241
1244
  }
1242
1245
  }
1243
1246
  function normalizeZone(input, defaultZone2) {
1244
- let offset2;
1245
1247
  if (isUndefined(input) || input === null) {
1246
1248
  return defaultZone2;
1247
1249
  } else if (input instanceof Zone) {
@@ -1252,9 +1254,7 @@ function normalizeZone(input, defaultZone2) {
1252
1254
  return defaultZone2;
1253
1255
  else if (lowered === "utc" || lowered === "gmt")
1254
1256
  return FixedOffsetZone.utcInstance;
1255
- else if ((offset2 = IANAZone.parseGMTOffset(input)) != null) {
1256
- return FixedOffsetZone.instance(offset2);
1257
- } else if (IANAZone.isValidSpecifier(lowered))
1257
+ else if (IANAZone.isValidSpecifier(lowered))
1258
1258
  return IANAZone.create(input);
1259
1259
  else
1260
1260
  return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);
@@ -1440,8 +1440,7 @@ class PolyDateFormatter {
1440
1440
  if (dt.zone.isUniversal) {
1441
1441
  const gmtOffset = -1 * (dt.offset / 60);
1442
1442
  const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
1443
- const isOffsetZoneSupported = IANAZone.isValidZone(offsetZ);
1444
- if (dt.offset !== 0 && isOffsetZoneSupported) {
1443
+ if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
1445
1444
  z = offsetZ;
1446
1445
  this.dt = dt;
1447
1446
  } else {
@@ -1590,7 +1589,7 @@ class Locale {
1590
1589
  });
1591
1590
  }
1592
1591
  extract(dt, intlOpts, field) {
1593
- const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m2) => m2.type.toLowerCase() === field);
1592
+ const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field);
1594
1593
  return matching ? matching.value : null;
1595
1594
  }
1596
1595
  numberFormatter(opts = {}) {
@@ -1614,8 +1613,8 @@ function combineRegexes(...regexes) {
1614
1613
  return RegExp(`^${full}$`);
1615
1614
  }
1616
1615
  function combineExtractors(...extractors) {
1617
- return (m2) => extractors.reduce(([mergedVals, mergedZone, cursor], ex) => {
1618
- const [val, zone, next] = ex(m2, cursor);
1616
+ return (m) => extractors.reduce(([mergedVals, mergedZone, cursor], ex) => {
1617
+ const [val, zone, next] = ex(m, cursor);
1619
1618
  return [__spreadValues(__spreadValues({}, mergedVals), val), mergedZone || zone, next];
1620
1619
  }, [{}, null, 1]).slice(0, 2);
1621
1620
  }
@@ -1624,9 +1623,9 @@ function parse(s2, ...patterns) {
1624
1623
  return [null, null];
1625
1624
  }
1626
1625
  for (const [regex, extractor] of patterns) {
1627
- const m2 = regex.exec(s2);
1628
- if (m2) {
1629
- return extractor(m2);
1626
+ const m = regex.exec(s2);
1627
+ if (m) {
1628
+ return extractor(m);
1630
1629
  }
1631
1630
  }
1632
1631
  return [null, null];
@@ -1643,8 +1642,8 @@ function simpleParse(...keys) {
1643
1642
  }
1644
1643
  const offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${offsetRegex.source}?`), isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`), isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/, isoOrdinalRegex = /(\d{4})-?(\d{3})/, extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"), extractISOOrdinalData = simpleParse("year", "ordinal"), sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/, sqlTimeRegex = RegExp(`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`), sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);
1645
1644
  function int(match2, pos, fallback) {
1646
- const m2 = match2[pos];
1647
- return isUndefined(m2) ? fallback : parseInteger(m2);
1645
+ const m = match2[pos];
1646
+ return isUndefined(m) ? fallback : parseInteger(m);
1648
1647
  }
1649
1648
  function extractISOYmd(match2, cursor) {
1650
1649
  const item = {
@@ -1672,7 +1671,7 @@ function extractIANAZone(match2, cursor) {
1672
1671
  return [{}, zone, cursor + 1];
1673
1672
  }
1674
1673
  const isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);
1675
- const isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
1674
+ const isoDuration = /^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
1676
1675
  function extractISODuration(match2) {
1677
1676
  const [s2, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match2;
1678
1677
  const hasNegativePrefix = s2[0] === "-";
@@ -1680,13 +1679,13 @@ function extractISODuration(match2) {
1680
1679
  const maybeNegate = (num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num;
1681
1680
  return [
1682
1681
  {
1683
- years: maybeNegate(parseInteger(yearStr)),
1684
- months: maybeNegate(parseInteger(monthStr)),
1685
- weeks: maybeNegate(parseInteger(weekStr)),
1686
- days: maybeNegate(parseInteger(dayStr)),
1687
- hours: maybeNegate(parseInteger(hourStr)),
1688
- minutes: maybeNegate(parseInteger(minuteStr)),
1689
- seconds: maybeNegate(parseInteger(secondStr), secondStr === "-0"),
1682
+ years: maybeNegate(parseFloating(yearStr)),
1683
+ months: maybeNegate(parseFloating(monthStr)),
1684
+ weeks: maybeNegate(parseFloating(weekStr)),
1685
+ days: maybeNegate(parseFloating(dayStr)),
1686
+ hours: maybeNegate(parseFloating(hourStr)),
1687
+ minutes: maybeNegate(parseFloating(minuteStr)),
1688
+ seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"),
1690
1689
  milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)
1691
1690
  }
1692
1691
  ];
@@ -1924,6 +1923,17 @@ class Duration {
1924
1923
  conversionAccuracy: opts.conversionAccuracy
1925
1924
  });
1926
1925
  }
1926
+ static fromDurationLike(durationLike) {
1927
+ if (isNumber(durationLike)) {
1928
+ return Duration.fromMillis(durationLike);
1929
+ } else if (Duration.isDuration(durationLike)) {
1930
+ return durationLike;
1931
+ } else if (typeof durationLike === "object") {
1932
+ return Duration.fromObject(durationLike);
1933
+ } else {
1934
+ throw new InvalidArgumentError(`Unknown duration argument ${durationLike} of type ${typeof durationLike}`);
1935
+ }
1936
+ }
1927
1937
  static fromISO(text, opts) {
1928
1938
  const [parsed] = parseISODuration(text);
1929
1939
  if (parsed) {
@@ -2061,7 +2071,7 @@ class Duration {
2061
2071
  plus(duration) {
2062
2072
  if (!this.isValid)
2063
2073
  return this;
2064
- const dur = friendlyDuration(duration), result = {};
2074
+ const dur = Duration.fromDurationLike(duration), result = {};
2065
2075
  for (const k2 of orderedUnits$1) {
2066
2076
  if (hasOwnProperty(dur.values, k2) || hasOwnProperty(this.values, k2)) {
2067
2077
  result[k2] = dur.get(k2) + this.get(k2);
@@ -2072,7 +2082,7 @@ class Duration {
2072
2082
  minus(duration) {
2073
2083
  if (!this.isValid)
2074
2084
  return this;
2075
- const dur = friendlyDuration(duration);
2085
+ const dur = Duration.fromDurationLike(duration);
2076
2086
  return this.plus(dur.negate());
2077
2087
  }
2078
2088
  mapUnits(fn) {
@@ -2132,7 +2142,7 @@ class Duration {
2132
2142
  }
2133
2143
  const i2 = Math.trunc(own);
2134
2144
  built[k2] = i2;
2135
- accumulated[k2] = own - i2;
2145
+ accumulated[k2] = (own * 1e3 - i2 * 1e3) / 1e3;
2136
2146
  for (const down in vals) {
2137
2147
  if (orderedUnits$1.indexOf(down) > orderedUnits$1.indexOf(k2)) {
2138
2148
  convert(this.matrix, vals, down, built, k2);
@@ -2214,17 +2224,6 @@ class Duration {
2214
2224
  return true;
2215
2225
  }
2216
2226
  }
2217
- function friendlyDuration(durationish) {
2218
- if (isNumber(durationish)) {
2219
- return Duration.fromMillis(durationish);
2220
- } else if (Duration.isDuration(durationish)) {
2221
- return durationish;
2222
- } else if (typeof durationish === "object") {
2223
- return Duration.fromObject(durationish);
2224
- } else {
2225
- throw new InvalidArgumentError(`Unknown duration argument ${durationish} of type ${typeof durationish}`);
2226
- }
2227
- }
2228
2227
  const INVALID$1 = "Invalid Interval";
2229
2228
  function validateStartEnd(start, end) {
2230
2229
  if (!start || !start.isValid) {
@@ -2268,11 +2267,11 @@ class Interval {
2268
2267
  }
2269
2268
  }
2270
2269
  static after(start, duration) {
2271
- const dur = friendlyDuration(duration), dt = friendlyDateTime(start);
2270
+ const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(start);
2272
2271
  return Interval.fromDateTimes(dt, dt.plus(dur));
2273
2272
  }
2274
2273
  static before(end, duration) {
2275
- const dur = friendlyDuration(duration), dt = friendlyDateTime(end);
2274
+ const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(end);
2276
2275
  return Interval.fromDateTimes(dt.minus(dur), dt);
2277
2276
  }
2278
2277
  static fromISO(text, opts) {
@@ -2376,7 +2375,7 @@ class Interval {
2376
2375
  return results;
2377
2376
  }
2378
2377
  splitBy(duration) {
2379
- const dur = friendlyDuration(duration);
2378
+ const dur = Duration.fromDurationLike(duration);
2380
2379
  if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) {
2381
2380
  return [];
2382
2381
  }
@@ -2690,7 +2689,7 @@ function oneOf(strings, startIndex) {
2690
2689
  }
2691
2690
  }
2692
2691
  function offset(regex, groups) {
2693
- return { regex, deser: ([, h2, m2]) => signedOffset(h2, m2), groups };
2692
+ return { regex, deser: ([, h2, m]) => signedOffset(h2, m), groups };
2694
2693
  }
2695
2694
  function simple(regex) {
2696
2695
  return { regex, deser: ([s2]) => s2 };
@@ -2768,6 +2767,10 @@ function unitForToken(token, loc) {
2768
2767
  return intUnit(three);
2769
2768
  case "u":
2770
2769
  return simple(oneToNine);
2770
+ case "uu":
2771
+ return simple(oneOrTwo);
2772
+ case "uuu":
2773
+ return intUnit(one);
2771
2774
  case "a":
2772
2775
  return oneOf(loc.meridiems(), 0);
2773
2776
  case "kkkk":
@@ -2918,13 +2921,16 @@ function dateTimeFromMatches(matches) {
2918
2921
  return null;
2919
2922
  }
2920
2923
  };
2921
- let zone;
2922
- if (!isUndefined(matches.Z)) {
2923
- zone = new FixedOffsetZone(matches.Z);
2924
- } else if (!isUndefined(matches.z)) {
2924
+ let zone = null;
2925
+ let specificOffset;
2926
+ if (!isUndefined(matches.z)) {
2925
2927
  zone = IANAZone.create(matches.z);
2926
- } else {
2927
- zone = null;
2928
+ }
2929
+ if (!isUndefined(matches.Z)) {
2930
+ if (!zone) {
2931
+ zone = new FixedOffsetZone(matches.Z);
2932
+ }
2933
+ specificOffset = matches.Z;
2928
2934
  }
2929
2935
  if (!isUndefined(matches.q)) {
2930
2936
  matches.M = (matches.q - 1) * 3 + 1;
@@ -2949,7 +2955,7 @@ function dateTimeFromMatches(matches) {
2949
2955
  }
2950
2956
  return r2;
2951
2957
  }, {});
2952
- return [vals, zone];
2958
+ return [vals, zone, specificOffset];
2953
2959
  }
2954
2960
  let dummyDateTimeCache = null;
2955
2961
  function getDummyDateTime() {
@@ -2982,16 +2988,16 @@ function explainFromTokens(locale, input, format) {
2982
2988
  if (disqualifyingUnit) {
2983
2989
  return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };
2984
2990
  } else {
2985
- const [regexString, handlers] = buildRegex(units), regex = RegExp(regexString, "i"), [rawMatches, matches] = match(input, regex, handlers), [result, zone] = matches ? dateTimeFromMatches(matches) : [null, null];
2991
+ const [regexString, handlers] = buildRegex(units), regex = RegExp(regexString, "i"), [rawMatches, matches] = match(input, regex, handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, void 0];
2986
2992
  if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
2987
2993
  throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");
2988
2994
  }
2989
- return { input, tokens, regex, rawMatches, matches, result, zone };
2995
+ return { input, tokens, regex, rawMatches, matches, result, zone, specificOffset };
2990
2996
  }
2991
2997
  }
2992
2998
  function parseFromTokens(locale, input, format) {
2993
- const { result, zone, invalidReason } = explainFromTokens(locale, input, format);
2994
- return [result, zone, invalidReason];
2999
+ const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);
3000
+ return [result, zone, specificOffset, invalidReason];
2995
3001
  }
2996
3002
  const nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
2997
3003
  function unitOutOfRange(unit, value) {
@@ -3166,11 +3172,12 @@ function adjustTime(inst, dur) {
3166
3172
  }
3167
3173
  return { ts, o: o2 };
3168
3174
  }
3169
- function parseDataToDateTime(parsed, parsedZone, opts, format, text) {
3175
+ function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
3170
3176
  const { setZone, zone } = opts;
3171
3177
  if (parsed && Object.keys(parsed).length !== 0) {
3172
3178
  const interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, __spreadProps(__spreadValues({}, opts), {
3173
- zone: interpretationZone
3179
+ zone: interpretationZone,
3180
+ specificOffset
3174
3181
  }));
3175
3182
  return setZone ? inst : inst.setZone(zone);
3176
3183
  } else {
@@ -3413,7 +3420,7 @@ class DateTime {
3413
3420
  if (!zoneToUse.isValid) {
3414
3421
  return DateTime.invalid(unsupportedZone(zoneToUse));
3415
3422
  }
3416
- const tsNow = Settings.now(), offsetProvis = zoneToUse.offset(tsNow), normalized = normalizeObject(obj, normalizeUnit), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale.fromObject(opts);
3423
+ const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), normalized = normalizeObject(obj, normalizeUnit), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale.fromObject(opts);
3417
3424
  if ((containsGregor || containsOrdinal) && definiteWeekDef) {
3418
3425
  throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
3419
3426
  }
@@ -3480,11 +3487,11 @@ class DateTime {
3480
3487
  locale,
3481
3488
  numberingSystem,
3482
3489
  defaultToEN: true
3483
- }), [vals, parsedZone, invalid] = parseFromTokens(localeToUse, text, fmt);
3490
+ }), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);
3484
3491
  if (invalid) {
3485
3492
  return DateTime.invalid(invalid);
3486
3493
  } else {
3487
- return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text);
3494
+ return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);
3488
3495
  }
3489
3496
  }
3490
3497
  static fromString(text, fmt, opts = {}) {
@@ -3688,13 +3695,13 @@ class DateTime {
3688
3695
  plus(duration) {
3689
3696
  if (!this.isValid)
3690
3697
  return this;
3691
- const dur = friendlyDuration(duration);
3698
+ const dur = Duration.fromDurationLike(duration);
3692
3699
  return clone(this, adjustTime(this, dur));
3693
3700
  }
3694
3701
  minus(duration) {
3695
3702
  if (!this.isValid)
3696
3703
  return this;
3697
- const dur = friendlyDuration(duration).negate();
3704
+ const dur = Duration.fromDurationLike(duration).negate();
3698
3705
  return clone(this, adjustTime(this, dur));
3699
3706
  }
3700
3707
  startOf(unit) {
@@ -3994,10 +4001,11 @@ const capitalizeFirstLetter = (rawString) => {
3994
4001
  };
3995
4002
  var CpBadge_vue_vue_type_style_index_0_lang = "";
3996
4003
  var _export_sfc = (sfc, props) => {
4004
+ const target = sfc.__vccOpts || sfc;
3997
4005
  for (const [key, val] of props) {
3998
- sfc[key] = val;
4006
+ target[key] = val;
3999
4007
  }
4000
- return sfc;
4008
+ return target;
4001
4009
  };
4002
4010
  const badgeColors = ["neutral", "blue", "green", "red", "orange", "purple", "teal", "pink", "yellow"];
4003
4011
  const _sfc_main$k = {
@@ -5547,8 +5555,8 @@ var feather$2 = { exports: {} };
5547
5555
  var getOwnPropertyNamesModule = __webpack_require__("./node_modules/core-js/internals/object-get-own-property-names.js");
5548
5556
  var getOwnPropertySymbolsModule = __webpack_require__("./node_modules/core-js/internals/object-get-own-property-symbols.js");
5549
5557
  var anObject = __webpack_require__("./node_modules/core-js/internals/an-object.js");
5550
- var Reflect = global2.Reflect;
5551
- module2.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
5558
+ var Reflect2 = global2.Reflect;
5559
+ module2.exports = Reflect2 && Reflect2.ownKeys || function ownKeys(it) {
5552
5560
  var keys = getOwnPropertyNamesModule.f(anObject(it));
5553
5561
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
5554
5562
  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
@@ -6048,8 +6056,11 @@ const _sfc_main$f = defineComponent({
6048
6056
  }
6049
6057
  },
6050
6058
  setup(props, { attrs }) {
6051
- const icon = feather$2.exports.icons[props.type];
6052
- return () => h(props.tag, __spreadProps(__spreadValues({}, attrs), {
6059
+ let icon = feather$2.exports.icons[props.type];
6060
+ watch(() => props.type, () => {
6061
+ icon = feather$2.exports.icons[props.type];
6062
+ });
6063
+ return () => h$1(props.tag, __spreadProps(__spreadValues({}, attrs), {
6053
6064
  "data-name": props.type,
6054
6065
  "data-tags": icon.tags,
6055
6066
  "data-type": props.type,
@@ -6060,7 +6071,7 @@ const _sfc_main$f = defineComponent({
6060
6071
  [`cpIcon--${props.animationSpeed}`]: props.animationSpeed
6061
6072
  }
6062
6073
  }), [
6063
- h("svg", __spreadProps(__spreadValues({}, icon.attrs), {
6074
+ h$1("svg", __spreadProps(__spreadValues({}, icon.attrs), {
6064
6075
  fill: props.fill,
6065
6076
  height: props.size,
6066
6077
  stroke: props.stroke,
@@ -6074,8 +6085,8 @@ const _sfc_main$f = defineComponent({
6074
6085
  ]);
6075
6086
  }
6076
6087
  });
6077
- var CoreDatepicker_vue_vue_type_style_index_0_scoped_true_lang = "";
6078
- const MOBILE_SIZE = 768;
6088
+ var CoreDatepicker_vue_vue_type_style_index_0_lang = "";
6089
+ var CoreDatepicker_vue_vue_type_style_index_1_lang = "";
6079
6090
  const _sfc_main$e = {
6080
6091
  name: "CoreDatepicker",
6081
6092
  components: {
@@ -6235,23 +6246,28 @@ const _sfc_main$e = {
6235
6246
  triggerWrapperPosition: {},
6236
6247
  viewportWidth: void 0,
6237
6248
  isMobile: void 0,
6238
- triggerElement: void 0,
6239
- isInline: this.inline || false
6249
+ triggerElement: void 0
6240
6250
  };
6241
6251
  },
6242
6252
  computed: {
6253
+ transitionName() {
6254
+ return this.inline ? "" : "asd__fade";
6255
+ },
6243
6256
  wrapperClasses() {
6244
- return {
6245
- "asd__wrapper--datepicker-open": this.showDatepicker,
6246
- "asd__wrapper--full-screen": this.showFullscreen,
6247
- "asd__wrapper--isInline": this.isInline,
6248
- "asd__wrapper--showOneMonth": this.monthsToShow === 1
6249
- };
6257
+ return [
6258
+ this.$attrs.class,
6259
+ {
6260
+ "asd__wrapper--datepicker-open": this.showDatepicker,
6261
+ "asd__wrapper--full-screen": this.showFullscreen,
6262
+ "asd__wrapper--isInline": this.inline,
6263
+ "asd__wrapper--showOneMonth": this.monthsToShow === 1
6264
+ }
6265
+ ];
6250
6266
  },
6251
6267
  wrapperStyles() {
6252
6268
  return {
6253
6269
  width: this.width * this.showMonths + "px",
6254
- zIndex: this.isInline ? "" : "100"
6270
+ zIndex: this.inline ? "" : "100"
6255
6271
  };
6256
6272
  },
6257
6273
  innerStyles() {
@@ -6297,7 +6313,7 @@ const _sfc_main$e = {
6297
6313
  return dtDateTwo < dtDateOne;
6298
6314
  },
6299
6315
  visibleMonths() {
6300
- const firstMonthArray = this.months.filter((m2, index) => index > 0);
6316
+ const firstMonthArray = this.months.filter((m, index) => index > 0);
6301
6317
  const numberOfMonthsArray = [];
6302
6318
  for (let i2 = 0; i2 < this.showMonths; i2++) {
6303
6319
  numberOfMonthsArray.push(i2);
@@ -6316,8 +6332,6 @@ const _sfc_main$e = {
6316
6332
  },
6317
6333
  selectedDate2(newValue) {
6318
6334
  const newDate = !newValue || newValue === "" ? "" : newValue;
6319
- if (newValue && this.selectedDate1 && !this.isDateVisible(newDate))
6320
- this.nextMonth();
6321
6335
  this.$emit("date-two-selected", newDate);
6322
6336
  },
6323
6337
  mode() {
@@ -6366,7 +6380,7 @@ const _sfc_main$e = {
6366
6380
  this.setStartDates();
6367
6381
  this.generateMonths();
6368
6382
  this.generateYears();
6369
- if (this.startOpen || this.isInline) {
6383
+ if (this.startOpen || this.inline) {
6370
6384
  this.openDatepicker();
6371
6385
  }
6372
6386
  this.triggerElement.addEventListener("click", this._handleWindowClickEvent);
@@ -6379,15 +6393,9 @@ const _sfc_main$e = {
6379
6393
  methods: {
6380
6394
  handleDatepickerSizing() {
6381
6395
  this.viewportWidth = window.innerWidth + "px";
6382
- this._isWindowLessThan = (width) => {
6383
- return window.innerWidth <= width || screen.width <= width;
6384
- };
6385
- this.isInline = this.inline || this._isWindowLessThan(MOBILE_SIZE);
6386
- this.$emit("is-inline", this.isInline);
6387
6396
  this._handleWindowResizeEvent = this.debounce(() => {
6388
- this.isInline = this.inline || this._isWindowLessThan(MOBILE_SIZE);
6389
- this.isInline ? this.openDatepicker() : this.closeDatepicker();
6390
- this.$emit("is-inline", this.isInline);
6397
+ this.inline ? this.openDatepicker() : this.closeDatepicker();
6398
+ this.$emit("is-inline", this.inline);
6391
6399
  this.positionDatepicker();
6392
6400
  this.setStartDates();
6393
6401
  }, 200);
@@ -6459,7 +6467,7 @@ const _sfc_main$e = {
6459
6467
  return null;
6460
6468
  },
6461
6469
  handleClickOutside(event) {
6462
- if (event.target.id === this.triggerElementId || !this.showDatepicker || this.isInline || this.isRecurrent) {
6470
+ if (event.target.id === this.triggerElementId || !this.showDatepicker || this.inline || this.isRecurrent) {
6463
6471
  return;
6464
6472
  }
6465
6473
  this.closeDatepicker();
@@ -6527,6 +6535,12 @@ const _sfc_main$e = {
6527
6535
  }
6528
6536
  },
6529
6537
  setStartDates() {
6538
+ if (this.mode === "range") {
6539
+ if (this.dateOne)
6540
+ this.selectDate(this.dateOne);
6541
+ if (this.dateTwo)
6542
+ this.selectDate(this.dateTwo);
6543
+ }
6530
6544
  let startDate = this.dateOne ? DateTime.fromISO(this.dateOne) : DateTime.local();
6531
6545
  const minDate = DateTime.fromISO(this.minDate);
6532
6546
  if (this.hasMinDate && startDate < minDate) {
@@ -6644,19 +6658,12 @@ const _sfc_main$e = {
6644
6658
  const targetMonth = DateTime.fromISO(this.visibleMonths[visibleMonthIdx]);
6645
6659
  const monthIdx = targetMonth.month;
6646
6660
  const year = targetMonth.year;
6647
- this.focusedDate = DateTime.fromISO(this.focusedDate).set({ month: monthIdx }).set({ year }).toISODate();
6661
+ this.focusedDate = DateTime.fromISO(this.focusedDate).set({ month: monthIdx, year }).toISODate();
6648
6662
  }
6649
6663
  },
6650
6664
  isToday(date) {
6651
6665
  return DateTime.local().toISODate() === date;
6652
6666
  },
6653
- isSameDate(date1, date2) {
6654
- if (!date1) {
6655
- return false;
6656
- }
6657
- const dtDate1 = typeof date1 === "object" ? DateTime.fromJSDate(date1) : DateTime.fromISO(date1);
6658
- return dtDate1.toISODate() === date2;
6659
- },
6660
6667
  isSelected(date) {
6661
6668
  if (!date) {
6662
6669
  return;
@@ -6808,7 +6815,7 @@ const _sfc_main$e = {
6808
6815
  this.initialDate2 = this.dateTwo;
6809
6816
  this.$emit("opened");
6810
6817
  this.$nextTick(() => {
6811
- if (!this.isInline)
6818
+ if (!this.inline)
6812
6819
  this.setFocusedDate(this.focusedDate);
6813
6820
  });
6814
6821
  },
@@ -6821,7 +6828,7 @@ const _sfc_main$e = {
6821
6828
  }
6822
6829
  },
6823
6830
  closeDatepicker() {
6824
- if (this.isInline) {
6831
+ if (this.inline) {
6825
6832
  return;
6826
6833
  }
6827
6834
  this.showDatepicker = false;
@@ -6886,19 +6893,20 @@ const _hoisted_13$2 = {
6886
6893
  class: "asd__month-table",
6887
6894
  role: "presentation"
6888
6895
  };
6889
- const _hoisted_14$2 = ["data-date", "tabindex", "onMouseover"];
6896
+ const _hoisted_14$2 = ["data-date", "onMouseover"];
6890
6897
  const _hoisted_15$2 = ["date", "disabled", "onClick"];
6891
6898
  const _hoisted_16$2 = { class: "asd__day-number" };
6892
6899
  function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
6893
6900
  const _component_cp_icon = resolveComponent("cp-icon");
6894
6901
  const _directive_resize_select = resolveDirective("resize-select");
6895
6902
  const _directive_click_outside = resolveDirective("click-outside");
6896
- return openBlock(), createBlock(Transition, { name: "asd__fade" }, {
6903
+ return openBlock(), createBlock(Transition, { name: $options.transitionName }, {
6897
6904
  default: withCtx(() => [
6898
- withDirectives(createElementVNode("div", {
6905
+ withDirectives((openBlock(), createElementBlock("div", {
6899
6906
  id: $data.wrapperId,
6900
6907
  class: normalizeClass(["asd__wrapper", $options.wrapperClasses]),
6901
- style: normalizeStyle($options.showFullscreen ? void 0 : $options.wrapperStyles)
6908
+ style: normalizeStyle($options.showFullscreen ? void 0 : $options.wrapperStyles),
6909
+ onKeydown: _cache[3] || (_cache[3] = withKeys((...args) => $options.closeDatepicker && $options.closeDatepicker(...args), ["esc"]))
6902
6910
  }, [
6903
6911
  $options.showFullscreen ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
6904
6912
  createElementVNode("button", {
@@ -6906,19 +6914,21 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
6906
6914
  type: "button",
6907
6915
  onClick: _cache[0] || (_cache[0] = (...args) => $options.closeDatepicker && $options.closeDatepicker(...args))
6908
6916
  }, [
6909
- _ctx.$slots["close-icon"] ? renderSlot(_ctx.$slots, "close-icon", { key: 0 }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_3$8, "X"))
6917
+ _ctx.$slots["close-icon"] ? renderSlot(_ctx.$slots, "close-icon", { key: 0 }) : (openBlock(), createElementBlock("div", _hoisted_3$8, "X"))
6910
6918
  ]),
6911
6919
  createElementVNode("h3", null, toDisplayString($props.mobileHeader || $options.mobileHeaderFallback), 1)
6912
6920
  ])) : createCommentVNode("", true),
6913
6921
  createElementVNode("div", _hoisted_4$8, [
6914
6922
  createElementVNode("button", {
6915
6923
  class: "asd__change-month-button asd__change-month-button--previous",
6924
+ "aria-label": "previous month",
6916
6925
  onClick: _cache[1] || (_cache[1] = (...args) => $options.previousMonth && $options.previousMonth(...args))
6917
6926
  }, [
6918
6927
  createVNode(_component_cp_icon, { type: "chevron-left" })
6919
6928
  ]),
6920
6929
  createElementVNode("button", {
6921
6930
  class: "asd__change-month-button asd__change-month-button--next",
6931
+ "aria-label": "next month",
6922
6932
  onClick: _cache[2] || (_cache[2] = (...args) => $options.nextMonth && $options.nextMonth(...args))
6923
6933
  }, [
6924
6934
  createVNode(_component_cp_icon, { type: "chevron-right" })
@@ -7004,13 +7014,11 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
7004
7014
  (openBlock(true), createElementBlock(Fragment, null, renderList(week, ({ dayDate, dayNumber }, dayIndex) => {
7005
7015
  return openBlock(), createElementBlock("td", {
7006
7016
  key: dayIndex + "_" + dayNumber,
7017
+ ref_for: true,
7007
7018
  ref: `date-${dayDate}`,
7008
7019
  class: normalizeClass(["asd__day", $options.getDayClasses(dayNumber, dayDate)]),
7009
7020
  "data-date": dayDate,
7010
- tabindex: $options.isDateVisible(dayDate) && $options.isSameDate($data.focusedDate, dayDate) ? 0 : -1,
7011
- onMouseover: () => {
7012
- $options.setHoverDate(dayDate);
7013
- }
7021
+ onMouseover: ($event) => $options.setHoverDate(dayDate)
7014
7022
  }, [
7015
7023
  dayNumber ? (openBlock(), createElementBlock("button", {
7016
7024
  key: 0,
@@ -7035,16 +7043,16 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
7035
7043
  _: 1
7036
7044
  })
7037
7045
  ], 4),
7038
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
7039
- ], 14, _hoisted_1$c), [
7046
+ renderSlot(_ctx.$slots, "default")
7047
+ ], 46, _hoisted_1$c)), [
7040
7048
  [vShow, $data.showDatepicker],
7041
7049
  [_directive_click_outside, $options.handleClickOutside]
7042
7050
  ])
7043
7051
  ]),
7044
7052
  _: 3
7045
- });
7053
+ }, 8, ["name"]);
7046
7054
  }
7047
- var CpCoreDatepicker = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-9936b010"]]);
7055
+ var CpCoreDatepicker = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
7048
7056
  var index_vue_vue_type_style_index_0_lang$6 = "";
7049
7057
  const _sfc_main$d = {
7050
7058
  inheritAttrs: false,
@@ -7465,6 +7473,9 @@ const _sfc_main$a = {
7465
7473
  },
7466
7474
  computedMinDate() {
7467
7475
  return this.allowPastDates ? "" : this.minDate;
7476
+ },
7477
+ dynamicClasses() {
7478
+ return { "cpDatepicker__datepicker--isInline": this.isInline };
7468
7479
  }
7469
7480
  },
7470
7481
  watch: {
@@ -7478,7 +7489,7 @@ const _sfc_main$a = {
7478
7489
  methods: {
7479
7490
  selectDate(dateType, dateValue) {
7480
7491
  this[dateType] = dateValue;
7481
- this.$emit("dates", [this.dateOne, ...this.dateTwo && this.dateTwo]);
7492
+ this.$emit("dates", [this.dateOne, ...this.dateTwo && [this.dateTwo]]);
7482
7493
  },
7483
7494
  updateDateValue(date, newValue, oldValue) {
7484
7495
  if (newValue !== oldValue) {
@@ -7515,11 +7526,12 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
7515
7526
  "months-to-show": $options.numberOfMonths,
7516
7527
  "min-date": $options.computedMinDate,
7517
7528
  "max-date": $props.maxDate,
7529
+ class: normalizeClass(["cpDatepicker__datepicker", { "cpDatepicker__datepicker--isInline": $props.isInline }]),
7518
7530
  onDateOneSelected: _cache[0] || (_cache[0] = (date) => $options.selectDate("dateOne", date)),
7519
7531
  onDateTwoSelected: _cache[1] || (_cache[1] = (date) => $options.selectDate("dateTwo", date)),
7520
7532
  onOpened: _cache[2] || (_cache[2] = () => $data.isDisabled = true),
7521
7533
  onClosed: _cache[3] || (_cache[3] = () => $data.isDisabled = null)
7522
- }, null, 8, ["date-one", "date-two", "trigger-element-id", "close-after-select", "mode", "inline", "months-to-show", "min-date", "max-date"])
7534
+ }, null, 8, ["date-one", "date-two", "trigger-element-id", "close-after-select", "mode", "inline", "months-to-show", "min-date", "max-date", "class"])
7523
7535
  ]);
7524
7536
  }
7525
7537
  var CpDatepicker = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
@@ -7591,6 +7603,9 @@ const _sfc_main$9 = {
7591
7603
  },
7592
7604
  isDaysDisplayed() {
7593
7605
  return this.mode === "range";
7606
+ },
7607
+ dynamicClasses() {
7608
+ return { "cpCalendar__datepicker--isInline": this.isInline };
7594
7609
  }
7595
7610
  },
7596
7611
  watch: {
@@ -7717,6 +7732,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
7717
7732
  "close-after-select": $props.closeAfterSelect,
7718
7733
  "close-calendar": $data.triggerCalendar,
7719
7734
  inline: $data.isInline,
7735
+ class: normalizeClass(["cpCalendar__datepicker", $options.dynamicClasses]),
7720
7736
  onDateOneSelected: _cache[1] || (_cache[1] = (date) => $options.selectDate("dateOne", date)),
7721
7737
  onDateTwoSelected: _cache[2] || (_cache[2] = (date) => $options.selectDate("dateTwo", date)),
7722
7738
  onIsInline: _cache[3] || (_cache[3] = (value) => $data.isInline = value),
@@ -7802,7 +7818,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
7802
7818
  ])) : createCommentVNode("", true)
7803
7819
  ]),
7804
7820
  _: 1
7805
- }, 8, ["date-one", "date-two", "customized-dates", "trigger-element-id", "mode", "close-after-select", "close-calendar", "inline"])
7821
+ }, 8, ["date-one", "date-two", "customized-dates", "trigger-element-id", "mode", "close-after-select", "close-calendar", "inline", "class"])
7806
7822
  ]);
7807
7823
  }
7808
7824
  var CpCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
@@ -8551,7 +8567,7 @@ function rgbToRgba(rgbValue) {
8551
8567
  }
8552
8568
  function hexToRgba(hexValue) {
8553
8569
  var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
8554
- var hex = hexValue.replace(rgx, function(m2, r3, g2, b2) {
8570
+ var hex = hexValue.replace(rgx, function(m, r3, g2, b2) {
8555
8571
  return r3 + r3 + g2 + g2 + b2 + b2;
8556
8572
  });
8557
8573
  var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
@@ -8679,9 +8695,9 @@ function getElementTransforms(el) {
8679
8695
  var str = el.style.transform || "";
8680
8696
  var reg = /(\w+)\(([^)]*)\)/g;
8681
8697
  var transforms = new Map();
8682
- var m2;
8683
- while (m2 = reg.exec(str)) {
8684
- transforms.set(m2[1], m2[2]);
8698
+ var m;
8699
+ while (m = reg.exec(str)) {
8700
+ transforms.set(m[1], m[2]);
8685
8701
  }
8686
8702
  return transforms;
8687
8703
  }
@@ -9741,7 +9757,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
9741
9757
  ]),
9742
9758
  _: 1
9743
9759
  }, 8, ["onEnter"])
9744
- ], 512)), [
9760
+ ])), [
9745
9761
  [_directive_click_outside, $options.closeDropdown]
9746
9762
  ]);
9747
9763
  }
@@ -10595,7 +10611,7 @@ const Pimp = {
10595
10611
  app.component(name, Components[name]);
10596
10612
  });
10597
10613
  app.directive("click-outside", ClickOutside);
10598
- app.use(m);
10614
+ app.use(k);
10599
10615
  }
10600
10616
  };
10601
10617
  export { Pimp as default };