bitboss-ui 0.2.49 → 0.2.50
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/index101.js +1 -1
- package/dist/index103.js +2 -2
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index111.js +3 -3
- package/dist/index113.js +1 -1
- package/dist/index116.js +1 -1
- package/dist/index117.js +1 -1
- package/dist/index118.js +1 -1
- package/dist/index119.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index131.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +9 -9
- package/dist/index19.js +3 -3
- package/dist/index197.js +2 -10
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +4 -5
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +366 -14
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +131 -13
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +5 -19
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +18 -19
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +2 -29
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +2 -8
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +174 -2
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +23 -368
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +365 -126
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +235 -2
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +3 -174
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +35 -23
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +6 -373
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +16 -2
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +16 -4
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +20 -235
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +29 -2
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +8 -3
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +3 -35
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +3 -6
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +10 -2
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +2 -3
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +2 -3
- package/dist/index221.js.map +1 -1
- package/dist/index223.js +4 -4
- package/dist/index226.js +1 -1
- package/dist/index228.js +4 -69
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +6 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +2 -160
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +297 -1
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +2 -15
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +2 -295
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +116 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +106 -2
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +435 -2
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +89 -2
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +224 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +258 -2
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +200 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -2
- package/dist/index242.js +2 -117
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +2 -106
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -4
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +1 -1
- package/dist/index246.js +5 -435
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +159 -88
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +1 -226
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +68 -257
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.js +15 -200
- package/dist/index250.js.map +1 -1
- package/dist/index254.js +3 -2
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +2 -3
- package/dist/index255.js.map +1 -1
- package/dist/index29.js +3 -3
- package/dist/index31.js +31 -31
- package/dist/index31.js.map +1 -1
- package/dist/index33.js +1 -1
- package/dist/index35.js +2 -2
- package/dist/index47.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index65.js +3 -3
- package/dist/index72.js +1 -1
- package/dist/index75.js +1 -1
- package/dist/index79.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index221.js
CHANGED
package/dist/index221.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index221.js","sources":["../src/utilities/functions/
|
|
1
|
+
{"version":3,"file":"index221.js","sources":["../src/utilities/functions/head.ts"],"sourcesContent":["/** Takes an array and returns the first item in it */\nexport const head = <T>(arr: T[]) => arr[0];\n"],"names":["head","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAI,CAAC;"}
|
package/dist/index223.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { arrow as j, computePosition as A } from "./
|
|
2
|
-
import { autoUpdate as T, flip as W, platform as X, shift as Y } from "./
|
|
1
|
+
import { arrow as j, computePosition as A } from "./index199.js";
|
|
2
|
+
import { autoUpdate as T, flip as W, platform as X, shift as Y } from "./index199.js";
|
|
3
3
|
import { unref as o, computed as r, ref as f, shallowRef as B, watch as h, getCurrentScope as F, onScopeDispose as I, shallowReadonly as a } from "vue";
|
|
4
|
-
import { isNode as U, getNodeName as k } from "./
|
|
5
|
-
import { getOverflowAncestors as ee } from "./
|
|
4
|
+
import { isNode as U, getNodeName as k } from "./index235.js";
|
|
5
|
+
import { getOverflowAncestors as ee } from "./index235.js";
|
|
6
6
|
function q(n) {
|
|
7
7
|
return n != null && typeof n == "object" && "$el" in n;
|
|
8
8
|
}
|
package/dist/index226.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as F, commonjsGlobal as g } from "./
|
|
1
|
+
import { getDefaultExportFromCjs as F, commonjsGlobal as g } from "./index229.js";
|
|
2
2
|
var M = "Expected a function", S = NaN, N = "[object Symbol]", W = /^\s+|\s+$/g, A = /^[-+]0x[0-9a-f]+$/i, B = /^0b[01]+$/i, R = /^0o[0-7]+$/i, _ = parseInt, D = typeof g == "object" && g && g.Object === Object && g, G = typeof self == "object" && self && self.Object === Object && self, P = D || G || Function("return this")(), H = Object.prototype, U = H.toString, X = Math.max, q = Math.min, T = function() {
|
|
3
3
|
return P.Date.now();
|
|
4
4
|
};
|
package/dist/index228.js
CHANGED
|
@@ -1,72 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import u from "./index117.js";
|
|
5
|
-
import "./index169.js";
|
|
6
|
-
const k = { class: "bb-toast-message__icon-container" }, g = { class: "bb-toast-message__content" }, f = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "bb-toast-message__title"
|
|
9
|
-
}, C = { class: "bb-toast-message__text" }, v = { class: "bb-toast-message__close" }, w = /* @__PURE__ */ t("svg", {
|
|
10
|
-
fill: "none",
|
|
11
|
-
viewBox: "0 0 24 24",
|
|
12
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
-
}, [
|
|
14
|
-
/* @__PURE__ */ t("path", {
|
|
15
|
-
d: "M23 23L1 1M23 1L1 23",
|
|
16
|
-
stroke: "currentColor",
|
|
17
|
-
"stroke-linecap": "round",
|
|
18
|
-
"stroke-width": "2"
|
|
19
|
-
})
|
|
20
|
-
], -1), N = /* @__PURE__ */ d({
|
|
21
|
-
__name: "BbToastMessage",
|
|
22
|
-
props: {
|
|
23
|
-
title: {},
|
|
24
|
-
text: {},
|
|
25
|
-
icon: {},
|
|
26
|
-
theme: { default: "default" },
|
|
27
|
-
id: {},
|
|
28
|
-
showClose: { type: Boolean }
|
|
29
|
-
},
|
|
30
|
-
emits: ["click:close"],
|
|
31
|
-
setup(n, { emit: c }) {
|
|
32
|
-
const r = n, m = c, _ = () => {
|
|
33
|
-
m("click:close", r.id);
|
|
34
|
-
};
|
|
35
|
-
return (e, y) => (s(), a("div", {
|
|
36
|
-
"aria-atomic": "true",
|
|
37
|
-
"aria-live": "assertive",
|
|
38
|
-
"aria-role": "alert",
|
|
39
|
-
class: b(["bb-toast-message", { [`bb-toast-message--${e.theme}`]: e.theme }])
|
|
40
|
-
}, [
|
|
41
|
-
t("div", k, [
|
|
42
|
-
e.icon ? (s(), i(u, {
|
|
43
|
-
key: 0,
|
|
44
|
-
class: "bb-alert__icon",
|
|
45
|
-
type: e.icon
|
|
46
|
-
}, null, 8, ["type"])) : o("", !0)
|
|
47
|
-
]),
|
|
48
|
-
t("div", g, [
|
|
49
|
-
e.title ? (s(), a("p", f, l(e.title), 1)) : o("", !0),
|
|
50
|
-
t("p", C, l(e.text), 1)
|
|
51
|
-
]),
|
|
52
|
-
t("div", v, [
|
|
53
|
-
e.showClose ? (s(), i(h, {
|
|
54
|
-
key: 0,
|
|
55
|
-
"aria-label": "Chiudi",
|
|
56
|
-
block: "",
|
|
57
|
-
class: "bb-toast-message__close-btn",
|
|
58
|
-
onClick: _
|
|
59
|
-
}, {
|
|
60
|
-
default: p(() => [
|
|
61
|
-
w
|
|
62
|
-
]),
|
|
63
|
-
_: 1
|
|
64
|
-
})) : o("", !0)
|
|
65
|
-
])
|
|
66
|
-
], 2));
|
|
67
|
-
}
|
|
68
|
-
});
|
|
1
|
+
const e = function(t) {
|
|
2
|
+
return (...n) => n.length >= t.length ? t(...n) : e(t.bind(void 0, ...n));
|
|
3
|
+
};
|
|
69
4
|
export {
|
|
70
|
-
|
|
5
|
+
e as curry
|
|
71
6
|
};
|
|
72
7
|
//# sourceMappingURL=index228.js.map
|
package/dist/index228.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index228.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index228.js","sources":["../src/utilities/functions/curry.ts"],"sourcesContent":["export type Curried<A extends any[], R> = <P extends Partial<A>>(\n\t...args: P\n) => P extends A\n\t? R\n\t: A extends [...SameLength<P>, ...infer S]\n\t\t? S extends any[]\n\t\t\t? Curried<S, R>\n\t\t\t: never\n\t\t: never;\n\ntype SameLength<T extends any[]> = Extract<{ [K in keyof T]: any }, any[]>;\n\nexport const curry = function <A extends any[], R>(\n\tfn: (...args: A) => R\n): Curried<A, R> {\n\treturn (...args: any[]): any =>\n\t\targs.length >= fn.length\n\t\t\t? fn(...(args as any))\n\t\t\t: curry((fn as any).bind(undefined, ...args));\n};\n"],"names":["curry","fn","args"],"mappings":"AAYa,MAAAA,IAAQ,SACpBC,GACgB;AAChB,SAAO,IAAIC,MACVA,EAAK,UAAUD,EAAG,SACfA,EAAG,GAAIC,CAAY,IACnBF,EAAOC,EAAW,KAAK,QAAW,GAAGC,CAAI,CAAC;AAC/C;"}
|
package/dist/index229.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
5
|
export {
|
|
6
|
-
o as
|
|
6
|
+
o as commonjsGlobal,
|
|
7
|
+
l as getDefaultExportFromCjs
|
|
7
8
|
};
|
|
8
9
|
//# sourceMappingURL=index229.js.map
|
package/dist/index229.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index229.js","sources":[
|
|
1
|
+
{"version":3,"file":"index229.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/index230.js
CHANGED
|
@@ -1,163 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { clamp as P } from "./index196.js";
|
|
3
|
-
import { drop as q } from "./index256.js";
|
|
4
|
-
import { isNil as R } from "./index120.js";
|
|
5
|
-
import { isNotNil as w } from "./index124.js";
|
|
6
|
-
import { wait as L } from "./index122.js";
|
|
7
|
-
import U from "./index115.js";
|
|
8
|
-
import "./index158.js";
|
|
9
|
-
const j = { class: "bb-base-tag__input-container" }, G = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], te = /* @__PURE__ */ K({
|
|
10
|
-
__name: "BaseTag",
|
|
11
|
-
props: {
|
|
12
|
-
autocomplete: {},
|
|
13
|
-
autofocus: {},
|
|
14
|
-
comma: { type: Boolean },
|
|
15
|
-
disabled: { type: Boolean },
|
|
16
|
-
divider: { default: "Enter" },
|
|
17
|
-
hasErrors: { type: Boolean },
|
|
18
|
-
id: {},
|
|
19
|
-
modelValue: {},
|
|
20
|
-
multiple: { type: Boolean, default: !0 },
|
|
21
|
-
name: {},
|
|
22
|
-
placeholder: {},
|
|
23
|
-
readonly: {}
|
|
24
|
-
},
|
|
25
|
-
emits: ["blur", "change", "click", "duplicate", "focus", "inactive", "input", "keydown", "keyup", "update:modelValue"],
|
|
26
|
-
setup(N, { emit: I }) {
|
|
27
|
-
const a = N, u = I;
|
|
28
|
-
if (a.multiple && !Array.isArray(a.modelValue))
|
|
29
|
-
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
|
30
|
-
const i = s(null), $ = s(null), c = s(null), t = s(""), D = y(() => a.placeholder), o = y(
|
|
31
|
-
() => [].concat(a.modelValue).filter(w)
|
|
32
|
-
), h = y(() => {
|
|
33
|
-
let e = {};
|
|
34
|
-
return o.value.forEach((n, r) => {
|
|
35
|
-
e[JSON.stringify(n)] = r;
|
|
36
|
-
}), {
|
|
37
|
-
get: (n) => e[JSON.stringify(n)]
|
|
38
|
-
};
|
|
39
|
-
}), f = s(!1), l = s(null), A = (e) => {
|
|
40
|
-
if (u("keyup", e), a.readonly || a.disabled) {
|
|
41
|
-
e.preventDefault();
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (e.key === a.divider) {
|
|
45
|
-
if (t.value[t.value.length - 1] === e.key && (t.value = t.value.slice(0, t.value.length - 1)), !t.value)
|
|
46
|
-
return;
|
|
47
|
-
l.value = null;
|
|
48
|
-
const n = h.value.get(t.value);
|
|
49
|
-
R(n) ? F(t.value) : u("duplicate", t.value), t.value = "";
|
|
50
|
-
} else if (e.key === "ArrowLeft")
|
|
51
|
-
l.value === null ? l.value = o.value.length - 1 : l.value === 0 ? l.value = null : l.value--;
|
|
52
|
-
else if (e.key === "ArrowRight")
|
|
53
|
-
l.value === null ? l.value = 1 : l.value === o.value.length - 1 ? l.value = null : l.value++;
|
|
54
|
-
else if (e.key === "Backspace") {
|
|
55
|
-
if (t.value)
|
|
56
|
-
return;
|
|
57
|
-
w(l.value) ? (b(l.value), l.value = P(
|
|
58
|
-
l.value,
|
|
59
|
-
0,
|
|
60
|
-
o.value.length - 2
|
|
61
|
-
), o.value.length === 1 && (l.value = null)) : l.value = o.value.length - 1;
|
|
62
|
-
} else
|
|
63
|
-
(e.key === "Tab" || e.key === "Escape") && (l.value = null);
|
|
64
|
-
}, F = (e) => {
|
|
65
|
-
a.multiple ? u("update:modelValue", a.modelValue.concat(e)) : u("update:modelValue", e);
|
|
66
|
-
}, b = (e) => {
|
|
67
|
-
if (typeof e == "number")
|
|
68
|
-
a.multiple ? u("update:modelValue", q(a.modelValue, 1, e)) : u("update:modelValue", null);
|
|
69
|
-
else {
|
|
70
|
-
const n = h.value.get(t.value);
|
|
71
|
-
b(n);
|
|
72
|
-
}
|
|
73
|
-
}, M = (e) => {
|
|
74
|
-
u("focus", e), f.value = !0, document.addEventListener("click", _), document.addEventListener("focusin", V), c.value instanceof HTMLInputElement && c.value.select();
|
|
75
|
-
}, O = (e) => {
|
|
76
|
-
u("click", e), !(a.disabled || a.readonly) && c.value instanceof HTMLElement && c.value.focus();
|
|
77
|
-
}, _ = (e) => {
|
|
78
|
-
if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
|
|
79
|
-
u("inactive"), document.removeEventListener("click", _), f.value = !1, a.multiple && L(500).then(() => {
|
|
80
|
-
t.value = "";
|
|
81
|
-
});
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
}, V = (e) => {
|
|
85
|
-
if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
|
|
86
|
-
u("inactive"), document.removeEventListener("focusin", V), f.value = !1, a.multiple && L(500).then(() => {
|
|
87
|
-
t.value = "";
|
|
88
|
-
});
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
}, T = {
|
|
92
|
-
onBlur: (e) => u("blur", e),
|
|
93
|
-
onChange: (e) => u("change", e),
|
|
94
|
-
onKeydown: (e) => {
|
|
95
|
-
e.key === "Enter" && a.divider === "Enter" && e.preventDefault(), u("keydown", e);
|
|
96
|
-
},
|
|
97
|
-
onInput: (e) => u("input", e)
|
|
98
|
-
};
|
|
99
|
-
return (e, n) => (p(), m("span", {
|
|
100
|
-
ref_key: "outerContainer",
|
|
101
|
-
ref: i,
|
|
102
|
-
class: g({
|
|
103
|
-
"bb-base-tag": !0,
|
|
104
|
-
"bb-base-tag--active": f.value,
|
|
105
|
-
"bb-base-tag--disabled": e.disabled,
|
|
106
|
-
"bb-base-tag--errors": e.hasErrors,
|
|
107
|
-
"bb-base-tag--readonly": e.readonly
|
|
108
|
-
}),
|
|
109
|
-
onClick: O
|
|
110
|
-
}, [
|
|
111
|
-
v(e.$slots, "prepend-outer"),
|
|
112
|
-
k("span", {
|
|
113
|
-
ref_key: "innerContainer",
|
|
114
|
-
ref: $,
|
|
115
|
-
class: "bb-base-tag__inner-container"
|
|
116
|
-
}, [
|
|
117
|
-
v(e.$slots, "prepend"),
|
|
118
|
-
k("span", j, [
|
|
119
|
-
e.comma ? (p(!0), m(E, { key: 0 }, C(o.value, (r, d) => (p(), m("span", {
|
|
120
|
-
key: r,
|
|
121
|
-
class: g({
|
|
122
|
-
"bb-base-tag__selected": !0,
|
|
123
|
-
"bb-base-tag__selected--comma": !0,
|
|
124
|
-
"bb-base-tag__selected--focused": d === l.value
|
|
125
|
-
})
|
|
126
|
-
}, B(r) + B(d < o.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), m(E, { key: 1 }, C(o.value, (r, d) => (p(), S(U, {
|
|
127
|
-
key: r,
|
|
128
|
-
class: g({
|
|
129
|
-
"bb-base-tag__selected": !0,
|
|
130
|
-
"bb-base-tag__selected--chip": !0,
|
|
131
|
-
"bb-base-tag__selected--focused": d === l.value
|
|
132
|
-
}),
|
|
133
|
-
clearable: !0,
|
|
134
|
-
text: r,
|
|
135
|
-
"onClick:clear": (Q) => b(d)
|
|
136
|
-
}, null, 8, ["class", "text", "onClick:clear"]))), 128)),
|
|
137
|
-
z(k("input", H({ id: e.id }, T, {
|
|
138
|
-
ref_key: "input",
|
|
139
|
-
ref: c,
|
|
140
|
-
"onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
|
|
141
|
-
autocomplete: e.autocomplete,
|
|
142
|
-
autofocus: e.autofocus,
|
|
143
|
-
class: "bb-base-tag__text-input",
|
|
144
|
-
disabled: e.disabled,
|
|
145
|
-
placeholder: D.value,
|
|
146
|
-
readonly: e.readonly,
|
|
147
|
-
type: "text",
|
|
148
|
-
onFocus: M,
|
|
149
|
-
onKeyup: A
|
|
150
|
-
}), null, 16, G), [
|
|
151
|
-
[J, t.value]
|
|
152
|
-
])
|
|
153
|
-
]),
|
|
154
|
-
v(e.$slots, "append")
|
|
155
|
-
], 512),
|
|
156
|
-
v(e.$slots, "append-outer")
|
|
157
|
-
], 2));
|
|
158
|
-
}
|
|
159
|
-
});
|
|
1
|
+
var o = { exports: {} };
|
|
160
2
|
export {
|
|
161
|
-
|
|
3
|
+
o as __module
|
|
162
4
|
};
|
|
163
5
|
//# sourceMappingURL=index230.js.map
|
package/dist/index230.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index230.js","sources":["../src/components/BaseTag/BaseTag.vue"],"sourcesContent":["<template>\n\t<span\n\t\tref=\"outerContainer\"\n\t\t:class=\"{\n\t\t\t'bb-base-tag': true,\n\t\t\t'bb-base-tag--active': active,\n\t\t\t'bb-base-tag--disabled': disabled,\n\t\t\t'bb-base-tag--errors': hasErrors,\n\t\t\t'bb-base-tag--readonly': readonly,\n\t\t}\"\n\t\t@click=\"onOuterContainerClick\"\n\t>\n\t\t<slot name=\"prepend-outer\"></slot>\n\t\t<span ref=\"innerContainer\" class=\"bb-base-tag__inner-container\">\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<span class=\"bb-base-tag__input-container\">\n\t\t\t\t<template v-if=\"comma\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-for=\"(option, index) in modelValueNormalized\"\n\t\t\t\t\t\t:key=\"option\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-base-tag__selected': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--comma': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--focused': index === focusedIndex,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t>{{ option\n\t\t\t\t\t\t}}{{ index < modelValueNormalized.length - 1 ? ',' : '' }}</span\n\t\t\t\t\t>\n\t\t\t\t</template>\n\t\t\t\t<template v-else>\n\t\t\t\t\t<BbChip\n\t\t\t\t\t\tv-for=\"(option, index) in modelValueNormalized\"\n\t\t\t\t\t\t:key=\"option\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-base-tag__selected': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--chip': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--focused': index === focusedIndex,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:clearable=\"true\"\n\t\t\t\t\t\t:text=\"option\"\n\t\t\t\t\t\t@click:clear=\"removeValue(index)\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\n\t\t\t\t<input\n\t\t\t\t\t:id=\"id\"\n\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\tref=\"input\"\n\t\t\t\t\tv-model=\"query\"\n\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t:class=\"'bb-base-tag__text-input'\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:type=\"'text'\"\n\t\t\t\t\t@focus=\"onInputFocus\"\n\t\t\t\t\t@keyup=\"onInputKeyup\"\n\t\t\t\t/>\n\t\t\t</span>\n\t\t\t<slot name=\"append\"></slot>\n\t\t</span>\n\t\t<slot name=\"append-outer\"></slot>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, ref } from 'vue';\nimport { drop } from '@/utilities/functions/drop';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { wait } from '@/utilities/functions/wait';\nimport BbChip from '../BbChip/BbChip.vue';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\n\nexport type BaseTagProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The divider key used to separate values from one another. By default it is \"Enter\"\n\t */\n\tdivider?: KeyboardEvent['key'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n};\n\nconst props = withDefaults(defineProps<BaseTagProps>(), {\n\tdivider: 'Enter',\n\tmultiple: true,\n});\n\nexport type BaseTagEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\n\t(e: 'change', event: Event): void;\n\n\t(e: 'click', event: MouseEvent): void;\n\n\t(e: 'duplicate', string: string): void;\n\n\t(e: 'focus', event: FocusEvent): void;\n\n\t(e: 'inactive'): void;\n\n\t(e: 'input', event: Event): void;\n\n\t(e: 'keydown', event: KeyboardEvent): void;\n\n\t(e: 'keyup', event: KeyboardEvent): void;\n\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst emit = defineEmits<BaseTagEvents>();\n\nexport type BaseTagSlots = {\n\tappend?: (props: {}) => any;\n\n\t'append-outer'?: (props: {}) => any;\n\n\tprepend?: (props: {}) => any;\n\n\t'prepend-outer'?: (props: {}) => any;\n};\n\ndefineSlots<BaseTagSlots>();\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n\tthrow new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst query = ref<string>('');\nconst computedPlaceholder = computed(() => {\n\treturn props.placeholder;\n});\n\nconst modelValueNormalized = computed(() =>\n\t[].concat(props.modelValue).filter(isNotNil)\n);\n\n/**\n * Indexes modelValue to a map so when can easily know which values are selected\n */\nconst modelValueIndexed = computed(() => {\n\tlet map: { [key: string]: number } = {};\n\tmodelValueNormalized.value.forEach((value: any, index: number) => {\n\t\tmap[JSON.stringify(value)] = index;\n\t});\n\treturn {\n\t\tget: (value: any) => map[JSON.stringify(value)],\n\t};\n});\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst focusedIndex = ref<null | number>(null);\n\nconst onInputKeyup = (event: KeyboardEvent) => {\n\temit('keyup', event);\n\tif (props.readonly || props.disabled) {\n\t\tevent.preventDefault();\n\t\treturn;\n\t}\n\tif (event.key === props.divider) {\n\t\tif (query.value[query.value.length - 1] === event.key) {\n\t\t\tquery.value = query.value.slice(0, query.value.length - 1);\n\t\t}\n\t\tif (!query.value) return;\n\t\tfocusedIndex.value = null;\n\t\tconst currentIndex = modelValueIndexed.value.get(query.value);\n\t\tif (isNil(currentIndex)) selectValue(query.value);\n\t\telse emit('duplicate', query.value);\n\t\tquery.value = '';\n\t} else if (event.key === 'ArrowLeft') {\n\t\tif (focusedIndex.value === null)\n\t\t\tfocusedIndex.value = modelValueNormalized.value.length - 1;\n\t\telse if (focusedIndex.value === 0) focusedIndex.value = null;\n\t\telse focusedIndex.value--;\n\t} else if (event.key === 'ArrowRight') {\n\t\tif (focusedIndex.value === null) focusedIndex.value = 1;\n\t\telse if (focusedIndex.value === modelValueNormalized.value.length - 1)\n\t\t\tfocusedIndex.value = null;\n\t\telse focusedIndex.value++;\n\t} else if (event.key === 'Backspace') {\n\t\tif (query.value) return;\n\t\tif (isNotNil(focusedIndex.value)) {\n\t\t\tremoveValue(focusedIndex.value);\n\t\t\tfocusedIndex.value = clamp(\n\t\t\t\tfocusedIndex.value,\n\t\t\t\t0,\n\t\t\t\tmodelValueNormalized.value.length - 2\n\t\t\t);\n\t\t\tif (modelValueNormalized.value.length === 1) focusedIndex.value = null;\n\t\t} else focusedIndex.value = modelValueNormalized.value.length - 1;\n\t} else if (event.key === 'Tab' || event.key === 'Escape') {\n\t\tfocusedIndex.value = null;\n\t}\n};\n\nconst selectValue = (text: string) => {\n\tif (props.multiple) emit('update:modelValue', props.modelValue.concat(text));\n\telse emit('update:modelValue', text);\n};\n\nconst removeValue = (indexOrString: number | string) => {\n\tif (typeof indexOrString === 'number') {\n\t\tif (props.multiple)\n\t\t\temit('update:modelValue', drop(props.modelValue, 1, indexOrString));\n\t\telse emit('update:modelValue', null);\n\t} else {\n\t\tconst currentIndex = modelValueIndexed.value.get(query.value);\n\t\tremoveValue(currentIndex);\n\t}\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tactive.value = true;\n\tdocument.addEventListener('click', onClickOutside);\n\tdocument.addEventListener('focusin', onFocusOutside);\n\tif (input.value instanceof HTMLInputElement) input.value.select();\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n\temit('click', event);\n\tif (props.disabled || props.readonly) return;\n\tif (input.value instanceof HTMLElement) {\n\t\tinput.value.focus();\n\t}\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onClickOutside = (event: Event) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.contains(event.target)) {\n\t\t\t\temit('inactive');\n\t\t\t\tdocument.removeEventListener('click', onClickOutside);\n\t\t\t\tactive.value = false;\n\t\t\t\tif (props.multiple)\n\t\t\t\t\twait(500).then(() => {\n\t\t\t\t\t\tquery.value = '';\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onFocusOutside = (event: FocusEvent) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.contains(event.target)) {\n\t\t\t\temit('inactive');\n\t\t\t\tdocument.removeEventListener('focusin', onFocusOutside);\n\t\t\t\tactive.value = false;\n\t\t\t\tif (props.multiple)\n\t\t\t\t\twait(500).then(() => {\n\t\t\t\t\t\tquery.value = '';\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonKeydown: (event: KeyboardEvent) => {\n\t\tif (event.key === 'Enter' && props.divider === 'Enter') {\n\t\t\tevent.preventDefault();\n\t\t}\n\t\temit('keydown', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n};\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTag';\n</style>\n"],"names":["props","__props","emit","__emit","outerContainer","ref","innerContainer","input","query","computedPlaceholder","computed","modelValueNormalized","isNotNil","modelValueIndexed","map","value","index","active","focusedIndex","onInputKeyup","event","currentIndex","isNil","selectValue","removeValue","clamp","text","indexOrString","drop","onInputFocus","onClickOutside","onFocusOutside","onOuterContainerClick","wait","eventListeners"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6IA,UAAMA,IAAQC,GA2BRC,IAAOC;AAcb,QAAIH,EAAM,YAAY,CAAC,MAAM,QAAQA,EAAM,UAAU;AAC9C,YAAA,IAAI,MAAM,2DAA2D;AAGtE,UAAAI,IAAiBC,EAAwB,IAAI,GAC7CC,IAAiBD,EAAwB,IAAI,GAC7CE,IAAQF,EAAwB,IAAI,GACpCG,IAAQH,EAAY,EAAE,GACtBI,IAAsBC,EAAS,MAC7BV,EAAM,WACb,GAEKW,IAAuBD;AAAA,MAAS,MACrC,CAAA,EAAG,OAAOV,EAAM,UAAU,EAAE,OAAOY,CAAQ;AAAA,IAAA,GAMtCC,IAAoBH,EAAS,MAAM;AACxC,UAAII,IAAiC,CAAA;AACrC,aAAAH,EAAqB,MAAM,QAAQ,CAACI,GAAYC,MAAkB;AACjE,QAAAF,EAAI,KAAK,UAAUC,CAAK,CAAC,IAAIC;AAAA,MAAA,CAC7B,GACM;AAAA,QACN,KAAK,CAACD,MAAeD,EAAI,KAAK,UAAUC,CAAK,CAAC;AAAA,MAAA;AAAA,IAC/C,CACA,GAQKE,IAASZ,EAAI,EAAK,GAElBa,IAAeb,EAAmB,IAAI,GAEtCc,IAAe,CAACC,MAAyB;AAE1C,UADJlB,EAAK,SAASkB,CAAK,GACfpB,EAAM,YAAYA,EAAM,UAAU;AACrC,QAAAoB,EAAM,eAAe;AACrB;AAAA,MACD;AACI,UAAAA,EAAM,QAAQpB,EAAM,SAAS;AAIhC,YAHIQ,EAAM,MAAMA,EAAM,MAAM,SAAS,CAAC,MAAMY,EAAM,QAC3CZ,EAAA,QAAQA,EAAM,MAAM,MAAM,GAAGA,EAAM,MAAM,SAAS,CAAC,IAEtD,CAACA,EAAM;AAAO;AAClB,QAAAU,EAAa,QAAQ;AACrB,cAAMG,IAAeR,EAAkB,MAAM,IAAIL,EAAM,KAAK;AAC5D,QAAIc,EAAMD,CAAY,IAAGE,EAAYf,EAAM,KAAK,IACtCN,EAAA,aAAaM,EAAM,KAAK,GAClCA,EAAM,QAAQ;AAAA,MAAA,WACJY,EAAM,QAAQ;AACxB,QAAIF,EAAa,UAAU,OACbA,EAAA,QAAQP,EAAqB,MAAM,SAAS,IACjDO,EAAa,UAAU,IAAGA,EAAa,QAAQ,OACtCA,EAAA;AAAA,eACRE,EAAM,QAAQ;AACxB,QAAIF,EAAa,UAAU,OAAMA,EAAa,QAAQ,IAC7CA,EAAa,UAAUP,EAAqB,MAAM,SAAS,IACnEO,EAAa,QAAQ,OACJA,EAAA;AAAA,eACRE,EAAM,QAAQ,aAAa;AACrC,YAAIZ,EAAM;AAAO;AACb,QAAAI,EAASM,EAAa,KAAK,KAC9BM,EAAYN,EAAa,KAAK,GAC9BA,EAAa,QAAQO;AAAA,UACpBP,EAAa;AAAA,UACb;AAAA,UACAP,EAAqB,MAAM,SAAS;AAAA,QAAA,GAEjCA,EAAqB,MAAM,WAAW,MAAGO,EAAa,QAAQ,SAC/CA,EAAA,QAAQP,EAAqB,MAAM,SAAS;AAAA,MAAA;SACtDS,EAAM,QAAQ,SAASA,EAAM,QAAQ,cAC/CF,EAAa,QAAQ;AAAA,IACtB,GAGKK,IAAc,CAACG,MAAiB;AACrC,MAAI1B,EAAM,WAAUE,EAAK,qBAAqBF,EAAM,WAAW,OAAO0B,CAAI,CAAC,IACtExB,EAAK,qBAAqBwB,CAAI;AAAA,IAAA,GAG9BF,IAAc,CAACG,MAAmC;AACnD,UAAA,OAAOA,KAAkB;AAC5B,QAAI3B,EAAM,WACTE,EAAK,qBAAqB0B,EAAK5B,EAAM,YAAY,GAAG2B,CAAa,CAAC,IAC9DzB,EAAK,qBAAqB,IAAI;AAAA,WAC7B;AACN,cAAMmB,IAAeR,EAAkB,MAAM,IAAIL,EAAM,KAAK;AAC5D,QAAAgB,EAAYH,CAAY;AAAA,MACzB;AAAA,IAAA,GAGKQ,IAAe,CAACT,MAAsB;AAC3C,MAAAlB,EAAK,SAASkB,CAAK,GACnBH,EAAO,QAAQ,IACN,SAAA,iBAAiB,SAASa,CAAc,GACxC,SAAA,iBAAiB,WAAWC,CAAc,GAC/CxB,EAAM,iBAAiB,oBAAkBA,EAAM,MAAM;IAAO,GAM3DyB,IAAwB,CAACZ,MAAsB;AAEhD,MADJlB,EAAK,SAASkB,CAAK,GACf,EAAApB,EAAM,YAAYA,EAAM,aACxBO,EAAM,iBAAiB,eAC1BA,EAAM,MAAM;IACb,GAOKuB,IAAiB,CAACV,MAAiB;AACpC,UAAAA,EAAM,kBAAkB,QACvBhB,EAAe,SACd,CAACA,EAAe,MAAM,SAASgB,EAAM,MAAM,GAAG;AACjD,QAAAlB,EAAK,UAAU,GACN,SAAA,oBAAoB,SAAS4B,CAAc,GACpDb,EAAO,QAAQ,IACXjB,EAAM,YACJiC,EAAA,GAAG,EAAE,KAAK,MAAM;AACpB,UAAAzB,EAAM,QAAQ;AAAA,QAAA,CACd;AACF;AAAA,MACD;AAAA,IAEF,GAGKuB,IAAiB,CAACX,MAAsB;AACzC,UAAAA,EAAM,kBAAkB,QACvBhB,EAAe,SACd,CAACA,EAAe,MAAM,SAASgB,EAAM,MAAM,GAAG;AACjD,QAAAlB,EAAK,UAAU,GACN,SAAA,oBAAoB,WAAW6B,CAAc,GACtDd,EAAO,QAAQ,IACXjB,EAAM,YACJiC,EAAA,GAAG,EAAE,KAAK,MAAM;AACpB,UAAAzB,EAAM,QAAQ;AAAA,QAAA,CACd;AACF;AAAA,MACD;AAAA,IAEF,GAGK0B,IAAiB;AAAA,MACtB,QAAQ,CAACd,MAAsBlB,EAAK,QAAQkB,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBlB,EAAK,UAAUkB,CAAK;AAAA,MAChD,WAAW,CAACA,MAAyB;AACpC,QAAIA,EAAM,QAAQ,WAAWpB,EAAM,YAAY,WAC9CoB,EAAM,eAAe,GAEtBlB,EAAK,WAAWkB,CAAK;AAAA,MACtB;AAAA,MACA,SAAS,CAACA,MAAiBlB,EAAK,SAASkB,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index230.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index231.js
CHANGED
|
@@ -1,2 +1,298 @@
|
|
|
1
|
-
|
|
1
|
+
import { commonjsGlobal as R } from "./index229.js";
|
|
2
|
+
import { __module as U } from "./index232.js";
|
|
3
|
+
var V;
|
|
4
|
+
function et() {
|
|
5
|
+
return V ? U.exports : (V = 1, function(B, K) {
|
|
6
|
+
(function(C, k) {
|
|
7
|
+
B.exports = k();
|
|
8
|
+
})(R, function() {
|
|
9
|
+
var C = 1e3, k = 6e4, q = 36e5, A = "millisecond", S = "second", w = "minute", _ = "hour", M = "day", T = "week", m = "month", F = "quarter", y = "year", O = "date", J = "Invalid Date", E = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, G = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, P = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(i) {
|
|
10
|
+
var n = ["th", "st", "nd", "rd"], t = i % 100;
|
|
11
|
+
return "[" + i + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
|
|
12
|
+
} }, I = function(i, n, t) {
|
|
13
|
+
var r = String(i);
|
|
14
|
+
return !r || r.length >= n ? i : "" + Array(n + 1 - r.length).join(t) + i;
|
|
15
|
+
}, Q = { s: I, z: function(i) {
|
|
16
|
+
var n = -i.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
|
|
17
|
+
return (n <= 0 ? "+" : "-") + I(r, 2, "0") + ":" + I(e, 2, "0");
|
|
18
|
+
}, m: function i(n, t) {
|
|
19
|
+
if (n.date() < t.date())
|
|
20
|
+
return -i(t, n);
|
|
21
|
+
var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, m), s = t - e < 0, u = n.clone().add(r + (s ? -1 : 1), m);
|
|
22
|
+
return +(-(r + (t - e) / (s ? e - u : u - e)) || 0);
|
|
23
|
+
}, a: function(i) {
|
|
24
|
+
return i < 0 ? Math.ceil(i) || 0 : Math.floor(i);
|
|
25
|
+
}, p: function(i) {
|
|
26
|
+
return { M: m, y, w: T, d: M, D: O, h: _, m: w, s: S, ms: A, Q: F }[i] || String(i || "").toLowerCase().replace(/s$/, "");
|
|
27
|
+
}, u: function(i) {
|
|
28
|
+
return i === void 0;
|
|
29
|
+
} }, x = "en", D = {};
|
|
30
|
+
D[x] = P;
|
|
31
|
+
var Z = "$isDayjsObject", N = function(i) {
|
|
32
|
+
return i instanceof L || !(!i || !i[Z]);
|
|
33
|
+
}, j = function i(n, t, r) {
|
|
34
|
+
var e;
|
|
35
|
+
if (!n)
|
|
36
|
+
return x;
|
|
37
|
+
if (typeof n == "string") {
|
|
38
|
+
var s = n.toLowerCase();
|
|
39
|
+
D[s] && (e = s), t && (D[s] = t, e = s);
|
|
40
|
+
var u = n.split("-");
|
|
41
|
+
if (!e && u.length > 1)
|
|
42
|
+
return i(u[0]);
|
|
43
|
+
} else {
|
|
44
|
+
var o = n.name;
|
|
45
|
+
D[o] = n, e = o;
|
|
46
|
+
}
|
|
47
|
+
return !r && e && (x = e), e || !r && x;
|
|
48
|
+
}, f = function(i, n) {
|
|
49
|
+
if (N(i))
|
|
50
|
+
return i.clone();
|
|
51
|
+
var t = typeof n == "object" ? n : {};
|
|
52
|
+
return t.date = i, t.args = arguments, new L(t);
|
|
53
|
+
}, a = Q;
|
|
54
|
+
a.l = j, a.i = N, a.w = function(i, n) {
|
|
55
|
+
return f(i, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
|
|
56
|
+
};
|
|
57
|
+
var L = function() {
|
|
58
|
+
function i(t) {
|
|
59
|
+
this.$L = j(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[Z] = !0;
|
|
60
|
+
}
|
|
61
|
+
var n = i.prototype;
|
|
62
|
+
return n.parse = function(t) {
|
|
63
|
+
this.$d = function(r) {
|
|
64
|
+
var e = r.date, s = r.utc;
|
|
65
|
+
if (e === null)
|
|
66
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
67
|
+
if (a.u(e))
|
|
68
|
+
return /* @__PURE__ */ new Date();
|
|
69
|
+
if (e instanceof Date)
|
|
70
|
+
return new Date(e);
|
|
71
|
+
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
72
|
+
var u = e.match(E);
|
|
73
|
+
if (u) {
|
|
74
|
+
var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
|
|
75
|
+
return s ? new Date(Date.UTC(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c)) : new Date(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return new Date(e);
|
|
79
|
+
}(t), this.init();
|
|
80
|
+
}, n.init = function() {
|
|
81
|
+
var t = this.$d;
|
|
82
|
+
this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
|
|
83
|
+
}, n.$utils = function() {
|
|
84
|
+
return a;
|
|
85
|
+
}, n.isValid = function() {
|
|
86
|
+
return this.$d.toString() !== J;
|
|
87
|
+
}, n.isSame = function(t, r) {
|
|
88
|
+
var e = f(t);
|
|
89
|
+
return this.startOf(r) <= e && e <= this.endOf(r);
|
|
90
|
+
}, n.isAfter = function(t, r) {
|
|
91
|
+
return f(t) < this.startOf(r);
|
|
92
|
+
}, n.isBefore = function(t, r) {
|
|
93
|
+
return this.endOf(r) < f(t);
|
|
94
|
+
}, n.$g = function(t, r, e) {
|
|
95
|
+
return a.u(t) ? this[r] : this.set(e, t);
|
|
96
|
+
}, n.unix = function() {
|
|
97
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
98
|
+
}, n.valueOf = function() {
|
|
99
|
+
return this.$d.getTime();
|
|
100
|
+
}, n.startOf = function(t, r) {
|
|
101
|
+
var e = this, s = !!a.u(r) || r, u = a.p(t), o = function(p, $) {
|
|
102
|
+
var v = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
|
|
103
|
+
return s ? v : v.endOf(M);
|
|
104
|
+
}, c = function(p, $) {
|
|
105
|
+
return a.w(e.toDate()[p].apply(e.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
|
|
106
|
+
}, h = this.$W, d = this.$M, l = this.$D, b = "set" + (this.$u ? "UTC" : "");
|
|
107
|
+
switch (u) {
|
|
108
|
+
case y:
|
|
109
|
+
return s ? o(1, 0) : o(31, 11);
|
|
110
|
+
case m:
|
|
111
|
+
return s ? o(1, d) : o(0, d + 1);
|
|
112
|
+
case T:
|
|
113
|
+
var g = this.$locale().weekStart || 0, Y = (h < g ? h + 7 : h) - g;
|
|
114
|
+
return o(s ? l - Y : l + (6 - Y), d);
|
|
115
|
+
case M:
|
|
116
|
+
case O:
|
|
117
|
+
return c(b + "Hours", 0);
|
|
118
|
+
case _:
|
|
119
|
+
return c(b + "Minutes", 1);
|
|
120
|
+
case w:
|
|
121
|
+
return c(b + "Seconds", 2);
|
|
122
|
+
case S:
|
|
123
|
+
return c(b + "Milliseconds", 3);
|
|
124
|
+
default:
|
|
125
|
+
return this.clone();
|
|
126
|
+
}
|
|
127
|
+
}, n.endOf = function(t) {
|
|
128
|
+
return this.startOf(t, !1);
|
|
129
|
+
}, n.$set = function(t, r) {
|
|
130
|
+
var e, s = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[O] = u + "Date", e[m] = u + "Month", e[y] = u + "FullYear", e[_] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[A] = u + "Milliseconds", e)[s], c = s === M ? this.$D + (r - this.$W) : r;
|
|
131
|
+
if (s === m || s === y) {
|
|
132
|
+
var h = this.clone().set(O, 1);
|
|
133
|
+
h.$d[o](c), h.init(), this.$d = h.set(O, Math.min(this.$D, h.daysInMonth())).$d;
|
|
134
|
+
} else
|
|
135
|
+
o && this.$d[o](c);
|
|
136
|
+
return this.init(), this;
|
|
137
|
+
}, n.set = function(t, r) {
|
|
138
|
+
return this.clone().$set(t, r);
|
|
139
|
+
}, n.get = function(t) {
|
|
140
|
+
return this[a.p(t)]();
|
|
141
|
+
}, n.add = function(t, r) {
|
|
142
|
+
var e, s = this;
|
|
143
|
+
t = Number(t);
|
|
144
|
+
var u = a.p(r), o = function(d) {
|
|
145
|
+
var l = f(s);
|
|
146
|
+
return a.w(l.date(l.date() + Math.round(d * t)), s);
|
|
147
|
+
};
|
|
148
|
+
if (u === m)
|
|
149
|
+
return this.set(m, this.$M + t);
|
|
150
|
+
if (u === y)
|
|
151
|
+
return this.set(y, this.$y + t);
|
|
152
|
+
if (u === M)
|
|
153
|
+
return o(1);
|
|
154
|
+
if (u === T)
|
|
155
|
+
return o(7);
|
|
156
|
+
var c = (e = {}, e[w] = k, e[_] = q, e[S] = C, e)[u] || 1, h = this.$d.getTime() + t * c;
|
|
157
|
+
return a.w(h, this);
|
|
158
|
+
}, n.subtract = function(t, r) {
|
|
159
|
+
return this.add(-1 * t, r);
|
|
160
|
+
}, n.format = function(t) {
|
|
161
|
+
var r = this, e = this.$locale();
|
|
162
|
+
if (!this.isValid())
|
|
163
|
+
return e.invalidDate || J;
|
|
164
|
+
var s = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, l = e.months, b = e.meridiem, g = function($, v, H, W) {
|
|
165
|
+
return $ && ($[v] || $(r, s)) || H[v].slice(0, W);
|
|
166
|
+
}, Y = function($) {
|
|
167
|
+
return a.s(o % 12 || 12, $, "0");
|
|
168
|
+
}, p = b || function($, v, H) {
|
|
169
|
+
var W = $ < 12 ? "AM" : "PM";
|
|
170
|
+
return H ? W.toLowerCase() : W;
|
|
171
|
+
};
|
|
172
|
+
return s.replace(G, function($, v) {
|
|
173
|
+
return v || function(H) {
|
|
174
|
+
switch (H) {
|
|
175
|
+
case "YY":
|
|
176
|
+
return String(r.$y).slice(-2);
|
|
177
|
+
case "YYYY":
|
|
178
|
+
return a.s(r.$y, 4, "0");
|
|
179
|
+
case "M":
|
|
180
|
+
return h + 1;
|
|
181
|
+
case "MM":
|
|
182
|
+
return a.s(h + 1, 2, "0");
|
|
183
|
+
case "MMM":
|
|
184
|
+
return g(e.monthsShort, h, l, 3);
|
|
185
|
+
case "MMMM":
|
|
186
|
+
return g(l, h);
|
|
187
|
+
case "D":
|
|
188
|
+
return r.$D;
|
|
189
|
+
case "DD":
|
|
190
|
+
return a.s(r.$D, 2, "0");
|
|
191
|
+
case "d":
|
|
192
|
+
return String(r.$W);
|
|
193
|
+
case "dd":
|
|
194
|
+
return g(e.weekdaysMin, r.$W, d, 2);
|
|
195
|
+
case "ddd":
|
|
196
|
+
return g(e.weekdaysShort, r.$W, d, 3);
|
|
197
|
+
case "dddd":
|
|
198
|
+
return d[r.$W];
|
|
199
|
+
case "H":
|
|
200
|
+
return String(o);
|
|
201
|
+
case "HH":
|
|
202
|
+
return a.s(o, 2, "0");
|
|
203
|
+
case "h":
|
|
204
|
+
return Y(1);
|
|
205
|
+
case "hh":
|
|
206
|
+
return Y(2);
|
|
207
|
+
case "a":
|
|
208
|
+
return p(o, c, !0);
|
|
209
|
+
case "A":
|
|
210
|
+
return p(o, c, !1);
|
|
211
|
+
case "m":
|
|
212
|
+
return String(c);
|
|
213
|
+
case "mm":
|
|
214
|
+
return a.s(c, 2, "0");
|
|
215
|
+
case "s":
|
|
216
|
+
return String(r.$s);
|
|
217
|
+
case "ss":
|
|
218
|
+
return a.s(r.$s, 2, "0");
|
|
219
|
+
case "SSS":
|
|
220
|
+
return a.s(r.$ms, 3, "0");
|
|
221
|
+
case "Z":
|
|
222
|
+
return u;
|
|
223
|
+
}
|
|
224
|
+
return null;
|
|
225
|
+
}($) || u.replace(":", "");
|
|
226
|
+
});
|
|
227
|
+
}, n.utcOffset = function() {
|
|
228
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
229
|
+
}, n.diff = function(t, r, e) {
|
|
230
|
+
var s, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * k, d = this - c, l = function() {
|
|
231
|
+
return a.m(u, c);
|
|
232
|
+
};
|
|
233
|
+
switch (o) {
|
|
234
|
+
case y:
|
|
235
|
+
s = l() / 12;
|
|
236
|
+
break;
|
|
237
|
+
case m:
|
|
238
|
+
s = l();
|
|
239
|
+
break;
|
|
240
|
+
case F:
|
|
241
|
+
s = l() / 3;
|
|
242
|
+
break;
|
|
243
|
+
case T:
|
|
244
|
+
s = (d - h) / 6048e5;
|
|
245
|
+
break;
|
|
246
|
+
case M:
|
|
247
|
+
s = (d - h) / 864e5;
|
|
248
|
+
break;
|
|
249
|
+
case _:
|
|
250
|
+
s = d / q;
|
|
251
|
+
break;
|
|
252
|
+
case w:
|
|
253
|
+
s = d / k;
|
|
254
|
+
break;
|
|
255
|
+
case S:
|
|
256
|
+
s = d / C;
|
|
257
|
+
break;
|
|
258
|
+
default:
|
|
259
|
+
s = d;
|
|
260
|
+
}
|
|
261
|
+
return e ? s : a.a(s);
|
|
262
|
+
}, n.daysInMonth = function() {
|
|
263
|
+
return this.endOf(m).$D;
|
|
264
|
+
}, n.$locale = function() {
|
|
265
|
+
return D[this.$L];
|
|
266
|
+
}, n.locale = function(t, r) {
|
|
267
|
+
if (!t)
|
|
268
|
+
return this.$L;
|
|
269
|
+
var e = this.clone(), s = j(t, r, !0);
|
|
270
|
+
return s && (e.$L = s), e;
|
|
271
|
+
}, n.clone = function() {
|
|
272
|
+
return a.w(this.$d, this);
|
|
273
|
+
}, n.toDate = function() {
|
|
274
|
+
return new Date(this.valueOf());
|
|
275
|
+
}, n.toJSON = function() {
|
|
276
|
+
return this.isValid() ? this.toISOString() : null;
|
|
277
|
+
}, n.toISOString = function() {
|
|
278
|
+
return this.$d.toISOString();
|
|
279
|
+
}, n.toString = function() {
|
|
280
|
+
return this.$d.toUTCString();
|
|
281
|
+
}, i;
|
|
282
|
+
}(), z = L.prototype;
|
|
283
|
+
return f.prototype = z, [["$ms", A], ["$s", S], ["$m", w], ["$H", _], ["$W", M], ["$M", m], ["$y", y], ["$D", O]].forEach(function(i) {
|
|
284
|
+
z[i[1]] = function(n) {
|
|
285
|
+
return this.$g(n, i[0], i[1]);
|
|
286
|
+
};
|
|
287
|
+
}), f.extend = function(i, n) {
|
|
288
|
+
return i.$i || (i(n, L, f), i.$i = !0), f;
|
|
289
|
+
}, f.locale = j, f.isDayjs = N, f.unix = function(i) {
|
|
290
|
+
return f(1e3 * i);
|
|
291
|
+
}, f.en = D[x], f.Ls = D, f.p = {}, f;
|
|
292
|
+
});
|
|
293
|
+
}(U), U.exports);
|
|
294
|
+
}
|
|
295
|
+
export {
|
|
296
|
+
et as __require
|
|
297
|
+
};
|
|
2
298
|
//# sourceMappingURL=index231.js.map
|