manolis-ui 0.11.4 → 0.13.1
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/datetimePicker-B5De2MZQ.js +4 -0
- package/dist/index.d.ts +69 -18
- package/dist/manolis-ui.css +1 -1
- package/dist/manolis-ui.js +2319 -1294
- package/dist/manolis-ui.umd.cjs +10 -15
- package/dist/style.css +588 -203
- package/package.json +14 -15
package/dist/manolis-ui.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var ft = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
|
+
};
|
|
4
|
+
var mt = (e, t, n) => t.has(e) || ft("Cannot " + n);
|
|
5
|
+
var oe = (e, t, n) => (mt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Be = (e, t, n) => t.has(e) ? ft("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Ve = (e, t, n, a) => (mt(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n);
|
|
6
|
+
import { defineComponent as A, computed as K, createElementBlock as p, openBlock as f, normalizeClass as B, createCommentVNode as E, renderSlot as V, createTextVNode as Ct, createElementVNode as d, Fragment as U, renderList as F, toDisplayString as O, ref as M, watch as R, h as He, onMounted as ue, withDirectives as Ce, createVNode as ie, isRef as Yt, vModelCheckbox as Jt, unref as Z, provide as Xt, normalizeStyle as ye, inject as Gt, useId as Qt, defineAsyncComponent as ze, nextTick as Pe, onBeforeUnmount as _e, withModifiers as te, createBlock as ae, resolveDynamicComponent as Oe, mergeProps as Ne, withKeys as We, onUnmounted as Dt, resolveComponent as Ae, withCtx as pt, vModelText as Tt, useSlots as en, Comment as tn, vShow as nn } from "vue";
|
|
7
|
+
const an = ["disabled"], ln = {
|
|
3
8
|
key: 0,
|
|
4
9
|
class: "loading loading-spinner"
|
|
5
|
-
},
|
|
10
|
+
}, fo = /* @__PURE__ */ A({
|
|
6
11
|
__name: "ButtonComponent",
|
|
7
12
|
props: {
|
|
8
13
|
outlined: { type: Boolean, default: !1 },
|
|
@@ -13,9 +18,9 @@ const je = ["disabled"], Fe = {
|
|
|
13
18
|
shape: {},
|
|
14
19
|
disabled: { type: Boolean, default: !1 }
|
|
15
20
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
switch (
|
|
21
|
+
setup(e) {
|
|
22
|
+
const t = e, n = K(() => {
|
|
23
|
+
switch (t.size) {
|
|
19
24
|
case "large":
|
|
20
25
|
return "btn-lg";
|
|
21
26
|
case "small":
|
|
@@ -29,8 +34,8 @@ const je = ["disabled"], Fe = {
|
|
|
29
34
|
default:
|
|
30
35
|
return "";
|
|
31
36
|
}
|
|
32
|
-
}),
|
|
33
|
-
switch (
|
|
37
|
+
}), a = K(() => {
|
|
38
|
+
switch (t.type) {
|
|
34
39
|
case "neutral":
|
|
35
40
|
return "btn-neutral";
|
|
36
41
|
case "primary":
|
|
@@ -54,8 +59,8 @@ const je = ["disabled"], Fe = {
|
|
|
54
59
|
default:
|
|
55
60
|
return "btn-neutral";
|
|
56
61
|
}
|
|
57
|
-
}), o =
|
|
58
|
-
switch (
|
|
62
|
+
}), o = K(() => {
|
|
63
|
+
switch (t.shape) {
|
|
59
64
|
case "square":
|
|
60
65
|
return "btn-square";
|
|
61
66
|
case "circle":
|
|
@@ -64,27 +69,27 @@ const je = ["disabled"], Fe = {
|
|
|
64
69
|
return "";
|
|
65
70
|
}
|
|
66
71
|
});
|
|
67
|
-
return (l,
|
|
68
|
-
class:
|
|
72
|
+
return (l, s) => (f(), p("button", {
|
|
73
|
+
class: B([
|
|
69
74
|
"btn",
|
|
70
|
-
{ "btn-outline":
|
|
71
|
-
{ "btn-active":
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
{ "btn-outline": t.outlined },
|
|
76
|
+
{ "btn-active": t.active },
|
|
77
|
+
a.value,
|
|
78
|
+
n.value,
|
|
74
79
|
o.value
|
|
75
80
|
]),
|
|
76
|
-
disabled:
|
|
81
|
+
disabled: t.disabled
|
|
77
82
|
}, [
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
e.loading ? (f(), p("span", ln)) : E("", !0),
|
|
84
|
+
V(l.$slots, "default", {}, () => [
|
|
85
|
+
s[0] || (s[0] = Ct("Submit", -1))
|
|
81
86
|
])
|
|
82
|
-
], 10,
|
|
87
|
+
], 10, an));
|
|
83
88
|
}
|
|
84
|
-
}),
|
|
89
|
+
}), on = {
|
|
85
90
|
tabindex: "0",
|
|
86
91
|
class: "z-1 bg-base-100 shadow-sm p-2 rounded-sm min-w-[inherit] md:min-w-full xl:min-w-52 dropdown-content menu"
|
|
87
|
-
},
|
|
92
|
+
}, sn = ["href"], mo = /* @__PURE__ */ A({
|
|
88
93
|
__name: "dropdown",
|
|
89
94
|
props: {
|
|
90
95
|
items: {},
|
|
@@ -93,85 +98,85 @@ const je = ["disabled"], Fe = {
|
|
|
93
98
|
openOnHover: { type: Boolean, default: !1 },
|
|
94
99
|
forceOpen: { type: Boolean, default: !1 }
|
|
95
100
|
},
|
|
96
|
-
setup(
|
|
97
|
-
const
|
|
101
|
+
setup(e) {
|
|
102
|
+
const t = {
|
|
98
103
|
left: "dropdown-left",
|
|
99
104
|
right: "dropdown-right",
|
|
100
105
|
bottom: "dropdown-bottom",
|
|
101
106
|
top: "dropdown-top"
|
|
102
|
-
},
|
|
107
|
+
}, n = {
|
|
103
108
|
start: "",
|
|
104
109
|
end: "dropdown-end"
|
|
105
|
-
},
|
|
106
|
-
return (o, l) => (
|
|
107
|
-
class:
|
|
110
|
+
}, a = e;
|
|
111
|
+
return (o, l) => (f(), p("div", {
|
|
112
|
+
class: B(["dropdown", t[a.position], n[a.floatPosition], { "dropdown-open": a.forceOpen }, { "dropdown-hover": a.openOnHover }])
|
|
108
113
|
}, [
|
|
109
|
-
|
|
114
|
+
V(o.$slots, "default", {
|
|
110
115
|
tabindex: "0",
|
|
111
116
|
role: "button"
|
|
112
117
|
}, () => [
|
|
113
|
-
l[0] || (l[0] =
|
|
118
|
+
l[0] || (l[0] = d("div", { class: "m-1 btn" }, "Open dropdown", -1))
|
|
114
119
|
]),
|
|
115
|
-
|
|
116
|
-
(
|
|
117
|
-
|
|
118
|
-
href:
|
|
119
|
-
},
|
|
120
|
+
d("ul", on, [
|
|
121
|
+
(f(!0), p(U, null, F(e.items, (s) => (f(), p("li", null, [
|
|
122
|
+
d("a", {
|
|
123
|
+
href: s.link
|
|
124
|
+
}, O(s.text), 9, sn)
|
|
120
125
|
]))), 256)),
|
|
121
|
-
|
|
126
|
+
V(o.$slots, "additional")
|
|
122
127
|
])
|
|
123
128
|
], 2));
|
|
124
129
|
}
|
|
125
|
-
}),
|
|
130
|
+
}), rn = { class: "modal-box" }, un = { class: "modal-action" }, po = /* @__PURE__ */ A({
|
|
126
131
|
__name: "modal",
|
|
127
132
|
props: {
|
|
128
133
|
position: { default: "center" },
|
|
129
134
|
withBackdrop: { type: Boolean, default: !1 },
|
|
130
135
|
forceOpen: { type: [Boolean, null], default: null }
|
|
131
136
|
},
|
|
132
|
-
setup(
|
|
133
|
-
const
|
|
137
|
+
setup(e) {
|
|
138
|
+
const t = e, n = {
|
|
134
139
|
top: "modal-top",
|
|
135
140
|
bottom: "modal-bottom",
|
|
136
141
|
center: "modal-middle"
|
|
137
|
-
},
|
|
138
|
-
var
|
|
139
|
-
(
|
|
142
|
+
}, a = M(null), o = () => {
|
|
143
|
+
var s;
|
|
144
|
+
(s = a.value) == null || s.showModal();
|
|
140
145
|
}, l = () => {
|
|
141
|
-
var
|
|
142
|
-
(
|
|
146
|
+
var s;
|
|
147
|
+
(s = a.value) == null || s.close();
|
|
143
148
|
};
|
|
144
|
-
return
|
|
145
|
-
() =>
|
|
146
|
-
(
|
|
147
|
-
|
|
149
|
+
return R(
|
|
150
|
+
() => t.forceOpen,
|
|
151
|
+
(s) => {
|
|
152
|
+
s == !0 && o(), s == !1 && l();
|
|
148
153
|
}
|
|
149
|
-
), (
|
|
150
|
-
|
|
154
|
+
), (s, u) => (f(), p(U, null, [
|
|
155
|
+
t.forceOpen == null ? (f(), p("span", {
|
|
151
156
|
key: 0,
|
|
152
157
|
class: "w-fit cursor-pointer",
|
|
153
158
|
onClick: o
|
|
154
159
|
}, [
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
V(s.$slots, "trigger", { role: "button" }, () => [
|
|
161
|
+
u[0] || (u[0] = d("button", { class: "btn" }, "Open", -1))
|
|
157
162
|
])
|
|
158
|
-
])) :
|
|
159
|
-
|
|
163
|
+
])) : E("", !0),
|
|
164
|
+
d("dialog", {
|
|
160
165
|
ref_key: "dialog",
|
|
161
|
-
ref:
|
|
162
|
-
class:
|
|
166
|
+
ref: a,
|
|
167
|
+
class: B(["modal", n[t.position]])
|
|
163
168
|
}, [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
+
d("div", rn, [
|
|
170
|
+
V(s.$slots, "default"),
|
|
171
|
+
d("div", un, [
|
|
172
|
+
V(s.$slots, "actions"),
|
|
173
|
+
d("form", {
|
|
169
174
|
method: "dialog",
|
|
170
175
|
onSubmit: l,
|
|
171
|
-
class:
|
|
176
|
+
class: B(e.withBackdrop ? "modal-backdrop" : "")
|
|
172
177
|
}, [
|
|
173
|
-
|
|
174
|
-
|
|
178
|
+
V(s.$slots, "close-button", {}, () => [
|
|
179
|
+
u[1] || (u[1] = d("button", { class: "btn" }, "Close", -1))
|
|
175
180
|
])
|
|
176
181
|
], 34)
|
|
177
182
|
])
|
|
@@ -179,22 +184,22 @@ const je = ["disabled"], Fe = {
|
|
|
179
184
|
], 2)
|
|
180
185
|
], 64));
|
|
181
186
|
}
|
|
182
|
-
}),
|
|
187
|
+
}), cn = { class: "flex justify-center items-center swap-on" }, dn = { class: "flex justify-center items-center swap-off" }, ho = /* @__PURE__ */ A({
|
|
183
188
|
__name: "swap",
|
|
184
189
|
props: {
|
|
185
190
|
effect: {}
|
|
186
191
|
},
|
|
187
|
-
setup(
|
|
188
|
-
const
|
|
189
|
-
return (
|
|
190
|
-
class:
|
|
192
|
+
setup(e) {
|
|
193
|
+
const t = e;
|
|
194
|
+
return (n, a) => (f(), p("label", {
|
|
195
|
+
class: B(["swap", t.effect ? `swap-${e.effect}` : ""])
|
|
191
196
|
}, [
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
a[0] || (a[0] = d("input", { type: "checkbox" }, null, -1)),
|
|
198
|
+
d("div", cn, [
|
|
199
|
+
V(n.$slots, "on")
|
|
195
200
|
]),
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
d("div", dn, [
|
|
202
|
+
V(n.$slots, "off")
|
|
198
203
|
])
|
|
199
204
|
], 2));
|
|
200
205
|
}
|
|
@@ -205,14 +210,14 @@ const je = ["disabled"], Fe = {
|
|
|
205
210
|
* This source code is licensed under the ISC license.
|
|
206
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
207
212
|
*/
|
|
208
|
-
const
|
|
213
|
+
const fn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
209
214
|
/**
|
|
210
215
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
211
216
|
*
|
|
212
217
|
* This source code is licensed under the ISC license.
|
|
213
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
214
219
|
*/
|
|
215
|
-
var
|
|
220
|
+
var $e = {
|
|
216
221
|
xmlns: "http://www.w3.org/2000/svg",
|
|
217
222
|
width: 24,
|
|
218
223
|
height: 24,
|
|
@@ -229,18 +234,18 @@ var de = {
|
|
|
229
234
|
* This source code is licensed under the ISC license.
|
|
230
235
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
236
|
*/
|
|
232
|
-
const
|
|
237
|
+
const mn = ({ size: e, strokeWidth: t = 2, absoluteStrokeWidth: n, color: a, iconNode: o, name: l, class: s, ...u }, { slots: i }) => He(
|
|
233
238
|
"svg",
|
|
234
239
|
{
|
|
235
|
-
|
|
236
|
-
width:
|
|
237
|
-
height:
|
|
238
|
-
stroke:
|
|
239
|
-
"stroke-width":
|
|
240
|
-
class: ["lucide", `lucide-${
|
|
241
|
-
...
|
|
240
|
+
...$e,
|
|
241
|
+
width: e || $e.width,
|
|
242
|
+
height: e || $e.height,
|
|
243
|
+
stroke: a || $e.stroke,
|
|
244
|
+
"stroke-width": n ? Number(t) * 24 / Number(e) : t,
|
|
245
|
+
class: ["lucide", `lucide-${fn(l ?? "icon")}`],
|
|
246
|
+
...u
|
|
242
247
|
},
|
|
243
|
-
[...o.map((
|
|
248
|
+
[...o.map((c) => He(...c)), ...i.default ? [i.default()] : []]
|
|
244
249
|
);
|
|
245
250
|
/**
|
|
246
251
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
@@ -248,14 +253,14 @@ const Ge = ({ size: i, strokeWidth: p = 2, absoluteStrokeWidth: e, color: t, ico
|
|
|
248
253
|
* This source code is licensed under the ISC license.
|
|
249
254
|
* See the LICENSE file in the root directory of this source tree.
|
|
250
255
|
*/
|
|
251
|
-
const
|
|
252
|
-
|
|
256
|
+
const be = (e, t) => (n, { slots: a }) => He(
|
|
257
|
+
mn,
|
|
253
258
|
{
|
|
254
|
-
...
|
|
255
|
-
iconNode:
|
|
256
|
-
name:
|
|
259
|
+
...n,
|
|
260
|
+
iconNode: t,
|
|
261
|
+
name: e
|
|
257
262
|
},
|
|
258
|
-
|
|
263
|
+
a
|
|
259
264
|
);
|
|
260
265
|
/**
|
|
261
266
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
@@ -263,19 +268,7 @@ const te = (i, p) => (e, { slots: t }) => me(
|
|
|
263
268
|
* This source code is licensed under the ISC license.
|
|
264
269
|
* See the LICENSE file in the root directory of this source tree.
|
|
265
270
|
*/
|
|
266
|
-
const
|
|
267
|
-
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
268
|
-
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
269
|
-
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
270
|
-
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
271
|
-
]);
|
|
272
|
-
/**
|
|
273
|
-
* @license lucide-vue-next v0.468.0 - ISC
|
|
274
|
-
*
|
|
275
|
-
* This source code is licensed under the ISC license.
|
|
276
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
-
*/
|
|
278
|
-
const Qe = te("CircleChevronDownIcon", [
|
|
271
|
+
const pn = be("CircleChevronDownIcon", [
|
|
279
272
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
280
273
|
["path", { d: "m16 10-4 4-4-4", key: "894hmk" }]
|
|
281
274
|
]);
|
|
@@ -285,7 +278,7 @@ const Qe = te("CircleChevronDownIcon", [
|
|
|
285
278
|
* This source code is licensed under the ISC license.
|
|
286
279
|
* See the LICENSE file in the root directory of this source tree.
|
|
287
280
|
*/
|
|
288
|
-
const
|
|
281
|
+
const hn = be("CircleXIcon", [
|
|
289
282
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
290
283
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
291
284
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -296,7 +289,7 @@ const et = te("CircleXIcon", [
|
|
|
296
289
|
* This source code is licensed under the ISC license.
|
|
297
290
|
* See the LICENSE file in the root directory of this source tree.
|
|
298
291
|
*/
|
|
299
|
-
const
|
|
292
|
+
const vn = be("MoonIcon", [
|
|
300
293
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
301
294
|
]);
|
|
302
295
|
/**
|
|
@@ -305,7 +298,7 @@ const tt = te("MoonIcon", [
|
|
|
305
298
|
* This source code is licensed under the ISC license.
|
|
306
299
|
* See the LICENSE file in the root directory of this source tree.
|
|
307
300
|
*/
|
|
308
|
-
const
|
|
301
|
+
const ht = be("SearchIcon", [
|
|
309
302
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
310
303
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
311
304
|
]);
|
|
@@ -315,7 +308,7 @@ const we = te("SearchIcon", [
|
|
|
315
308
|
* This source code is licensed under the ISC license.
|
|
316
309
|
* See the LICENSE file in the root directory of this source tree.
|
|
317
310
|
*/
|
|
318
|
-
const
|
|
311
|
+
const gn = be("SunIcon", [
|
|
319
312
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
320
313
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
321
314
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -325,44 +318,44 @@ const lt = te("SunIcon", [
|
|
|
325
318
|
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
326
319
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
327
320
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
328
|
-
]),
|
|
329
|
-
const
|
|
330
|
-
return
|
|
321
|
+
]), yn = (e, t) => {
|
|
322
|
+
const n = M(null);
|
|
323
|
+
return ue(() => {
|
|
331
324
|
if (typeof window < "u") {
|
|
332
|
-
const
|
|
333
|
-
|
|
325
|
+
const a = window.localStorage.getItem(e);
|
|
326
|
+
n.value = a ? JSON.parse(a) : t;
|
|
334
327
|
}
|
|
335
|
-
}),
|
|
336
|
-
typeof window < "u" && window.localStorage.setItem(
|
|
337
|
-
}),
|
|
338
|
-
},
|
|
328
|
+
}), R(n, (a) => {
|
|
329
|
+
typeof window < "u" && window.localStorage.setItem(e, JSON.stringify(a));
|
|
330
|
+
}), n;
|
|
331
|
+
}, bn = { class: "swap-rotate swap" }, wn = ["true-value", "false-value"], vo = /* @__PURE__ */ A({
|
|
339
332
|
__name: "theme-controller",
|
|
340
333
|
props: {
|
|
341
334
|
lightTheme: { default: "light" },
|
|
342
335
|
darkTheme: { default: "dark" }
|
|
343
336
|
},
|
|
344
|
-
setup(
|
|
345
|
-
const
|
|
346
|
-
function
|
|
337
|
+
setup(e) {
|
|
338
|
+
const t = e, n = yn("theme", t.lightTheme);
|
|
339
|
+
function a(o) {
|
|
347
340
|
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", o);
|
|
348
341
|
}
|
|
349
|
-
return
|
|
350
|
-
|
|
351
|
-
}), (o, l) => (
|
|
352
|
-
|
|
342
|
+
return ue(() => a(n.value ? n.value : "")), R(n, (o) => {
|
|
343
|
+
a(o);
|
|
344
|
+
}), (o, l) => (f(), p("label", bn, [
|
|
345
|
+
Ce(d("input", {
|
|
353
346
|
type: "checkbox",
|
|
354
347
|
class: "theme-controller",
|
|
355
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
356
|
-
"true-value":
|
|
357
|
-
"false-value":
|
|
358
|
-
}, null, 8,
|
|
359
|
-
[
|
|
348
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => Yt(n) ? n.value = s : null),
|
|
349
|
+
"true-value": t.lightTheme,
|
|
350
|
+
"false-value": t.darkTheme
|
|
351
|
+
}, null, 8, wn), [
|
|
352
|
+
[Jt, Z(n)]
|
|
360
353
|
]),
|
|
361
|
-
|
|
362
|
-
|
|
354
|
+
ie(Z(gn), { class: "swap-off fill-current" }),
|
|
355
|
+
ie(Z(vn), { class: "swap-on fill-current" })
|
|
363
356
|
]));
|
|
364
357
|
}
|
|
365
|
-
}),
|
|
358
|
+
}), xn = ["name"], kn = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, $n = { class: "collapse-content" }, Sn = ["innerHTML"], go = /* @__PURE__ */ A({
|
|
366
359
|
__name: "accordion",
|
|
367
360
|
props: {
|
|
368
361
|
name: {},
|
|
@@ -370,26 +363,26 @@ const lt = te("SunIcon", [
|
|
|
370
363
|
joinItems: { type: Boolean, default: !1 },
|
|
371
364
|
icon: {}
|
|
372
365
|
},
|
|
373
|
-
setup(
|
|
374
|
-
const
|
|
375
|
-
return (
|
|
376
|
-
class:
|
|
366
|
+
setup(e) {
|
|
367
|
+
const t = e;
|
|
368
|
+
return (n, a) => (f(!0), p(U, null, F(t.items, (o, l) => (f(), p("div", {
|
|
369
|
+
class: B(["collapse border border-base-300", [e.icon ? `collapse-${e.icon}` : "", { "join-item": e.joinItems }]]),
|
|
377
370
|
key: l
|
|
378
371
|
}, [
|
|
379
|
-
|
|
372
|
+
d("input", {
|
|
380
373
|
type: "radio",
|
|
381
374
|
name: e.name,
|
|
382
375
|
value: "true"
|
|
383
|
-
}, null, 8,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
376
|
+
}, null, 8, xn),
|
|
377
|
+
d("div", kn, O(o.title), 1),
|
|
378
|
+
d("div", $n, [
|
|
379
|
+
d("span", {
|
|
387
380
|
innerHTML: o.content
|
|
388
|
-
}, null, 8,
|
|
381
|
+
}, null, 8, Sn)
|
|
389
382
|
])
|
|
390
383
|
], 2))), 128));
|
|
391
384
|
}
|
|
392
|
-
}),
|
|
385
|
+
}), Cn = ["src"], Dn = { class: "text-xl" }, yo = /* @__PURE__ */ A({
|
|
393
386
|
__name: "avatar",
|
|
394
387
|
props: {
|
|
395
388
|
image: {},
|
|
@@ -397,46 +390,46 @@ const lt = te("SunIcon", [
|
|
|
397
390
|
initials: {},
|
|
398
391
|
fullyRounded: { type: Boolean, default: !1 }
|
|
399
392
|
},
|
|
400
|
-
setup(
|
|
401
|
-
const
|
|
402
|
-
return
|
|
403
|
-
() =>
|
|
404
|
-
(
|
|
405
|
-
|
|
393
|
+
setup(e) {
|
|
394
|
+
const t = e, n = M(t.onlineStatus);
|
|
395
|
+
return R(
|
|
396
|
+
() => t.onlineStatus,
|
|
397
|
+
(a) => {
|
|
398
|
+
a && (n.value = a);
|
|
406
399
|
}
|
|
407
|
-
), (
|
|
408
|
-
class:
|
|
400
|
+
), (a, o) => (f(), p("div", {
|
|
401
|
+
class: B(["avatar", [{ "avatar-online": n.value === "online" }, { "avatar-offline": n.value === "offline" }]])
|
|
409
402
|
}, [
|
|
410
|
-
|
|
403
|
+
e.image ? (f(), p("div", {
|
|
411
404
|
key: 0,
|
|
412
|
-
class:
|
|
405
|
+
class: B(["rounded", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
|
|
413
406
|
}, [
|
|
414
|
-
|
|
415
|
-
src:
|
|
407
|
+
d("img", {
|
|
408
|
+
src: e.image,
|
|
416
409
|
class: "w-full h-full"
|
|
417
|
-
}, null, 8,
|
|
418
|
-
], 2)) : (
|
|
410
|
+
}, null, 8, Cn)
|
|
411
|
+
], 2)) : (f(), p("div", {
|
|
419
412
|
key: 1,
|
|
420
|
-
class:
|
|
413
|
+
class: B(["flex justify-center bg-neutral p-[25%] rounded w-16 text-neutral-content text-center", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
|
|
421
414
|
}, [
|
|
422
|
-
|
|
415
|
+
d("p", Dn, O(e.initials), 1)
|
|
423
416
|
], 2))
|
|
424
417
|
], 2));
|
|
425
418
|
}
|
|
426
|
-
}),
|
|
419
|
+
}), bo = /* @__PURE__ */ A({
|
|
427
420
|
__name: "badge",
|
|
428
421
|
props: {
|
|
429
422
|
color: { default: "neutral" },
|
|
430
423
|
outline: { type: Boolean, default: !1 },
|
|
431
424
|
size: { default: "medium" }
|
|
432
425
|
},
|
|
433
|
-
setup(
|
|
434
|
-
const
|
|
426
|
+
setup(e) {
|
|
427
|
+
const t = e, n = {
|
|
435
428
|
"extra small": "badge-xs",
|
|
436
429
|
small: "badge-sm",
|
|
437
430
|
medium: "badge-md",
|
|
438
431
|
large: "badge-lg"
|
|
439
|
-
},
|
|
432
|
+
}, a = {
|
|
440
433
|
neutral: "badge-neutral",
|
|
441
434
|
primary: "badge-primary",
|
|
442
435
|
secondary: "badge-secondary",
|
|
@@ -447,25 +440,25 @@ const lt = te("SunIcon", [
|
|
|
447
440
|
warning: "badge-warning",
|
|
448
441
|
error: "badge-error"
|
|
449
442
|
};
|
|
450
|
-
return (o, l) => (
|
|
451
|
-
class:
|
|
443
|
+
return (o, l) => (f(), p("span", {
|
|
444
|
+
class: B(["badge", n[t.size], a[t.color], { "badge-outline": t.outline }])
|
|
452
445
|
}, [
|
|
453
|
-
|
|
446
|
+
V(o.$slots, "default")
|
|
454
447
|
], 2));
|
|
455
448
|
}
|
|
456
|
-
}),
|
|
449
|
+
}), Tn = ["src", "alt"], Mn = {
|
|
457
450
|
key: 0,
|
|
458
451
|
class: "card-body"
|
|
459
|
-
},
|
|
452
|
+
}, In = {
|
|
460
453
|
key: 0,
|
|
461
454
|
class: "group-hover:text-primary text-lg text-left cursor-pointer card-title"
|
|
462
|
-
},
|
|
455
|
+
}, En = {
|
|
463
456
|
key: 1,
|
|
464
457
|
class: "text-left"
|
|
465
|
-
},
|
|
458
|
+
}, Bn = { class: "flex-col flex-nowrap mt-auto card-actions" }, Vn = {
|
|
466
459
|
key: 1,
|
|
467
460
|
class: "card-body"
|
|
468
|
-
},
|
|
461
|
+
}, wo = /* @__PURE__ */ A({
|
|
469
462
|
__name: "card",
|
|
470
463
|
props: {
|
|
471
464
|
imgUrl: { default: "" },
|
|
@@ -481,65 +474,65 @@ const lt = te("SunIcon", [
|
|
|
481
474
|
imgWidth: { default: "" },
|
|
482
475
|
horizontal: { type: Boolean, default: !1 }
|
|
483
476
|
},
|
|
484
|
-
setup(
|
|
485
|
-
const
|
|
486
|
-
return
|
|
487
|
-
() =>
|
|
488
|
-
(
|
|
489
|
-
|
|
477
|
+
setup(e) {
|
|
478
|
+
const t = e, n = M(t.outlined);
|
|
479
|
+
return R(
|
|
480
|
+
() => t.outlined,
|
|
481
|
+
(a) => {
|
|
482
|
+
n.value = a;
|
|
490
483
|
}
|
|
491
|
-
), (
|
|
492
|
-
class:
|
|
493
|
-
{ "border-4 border-primary":
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
{ "card-side":
|
|
484
|
+
), (a, o) => (f(), p("div", {
|
|
485
|
+
class: B(["group bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact", [
|
|
486
|
+
{ "border-4 border-primary": n.value },
|
|
487
|
+
e.color ?? "",
|
|
488
|
+
e.background,
|
|
489
|
+
{ "card-side": e.horizontal }
|
|
497
490
|
]])
|
|
498
491
|
}, [
|
|
499
|
-
|
|
500
|
-
class:
|
|
492
|
+
d("figure", {
|
|
493
|
+
class: B([{ "contents!": e.horizontal && e.imgWidth }])
|
|
501
494
|
}, [
|
|
502
|
-
|
|
495
|
+
e.imgUrl || e.imgUrl && !e.loading ? (f(), p("img", {
|
|
503
496
|
key: 0,
|
|
504
|
-
src:
|
|
505
|
-
alt:
|
|
506
|
-
class:
|
|
497
|
+
src: e.imgUrl,
|
|
498
|
+
alt: e.alt,
|
|
499
|
+
class: B(["rounded-sm object-cover", [
|
|
507
500
|
{
|
|
508
|
-
hidden:
|
|
501
|
+
hidden: e.loading
|
|
509
502
|
},
|
|
510
|
-
!
|
|
511
|
-
|
|
503
|
+
!e.horizontal && e.imgHeight ? e.imgHeight : "h-full",
|
|
504
|
+
e.horizontal && e.imgWidth ? e.imgWidth : "w-full"
|
|
512
505
|
]])
|
|
513
|
-
}, null, 10,
|
|
514
|
-
|
|
506
|
+
}, null, 10, Tn)) : E("", !0),
|
|
507
|
+
e.loading && e.imgUrl ? (f(), p("div", {
|
|
515
508
|
key: 1,
|
|
516
|
-
class:
|
|
517
|
-
}, null, 2)) :
|
|
509
|
+
class: B(["w-full skeleton", e.imgHeight])
|
|
510
|
+
}, null, 2)) : E("", !0)
|
|
518
511
|
], 2),
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
512
|
+
e.loading ? E("", !0) : (f(), p("div", Mn, [
|
|
513
|
+
e.title ? (f(), p("h2", In, O(e.title), 1)) : E("", !0),
|
|
514
|
+
V(a.$slots, "details"),
|
|
515
|
+
e.description ? (f(), p("p", En, O(e.description), 1)) : E("", !0),
|
|
516
|
+
d("div", Bn, [
|
|
517
|
+
V(a.$slots, "actions")
|
|
525
518
|
])
|
|
526
519
|
])),
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
520
|
+
e.loading ? (f(), p("div", Vn, [...o[0] || (o[0] = [
|
|
521
|
+
d("div", { class: "flex flex-col gap-4 w-52" }, [
|
|
522
|
+
d("div", { class: "w-28 h-4 skeleton" }),
|
|
523
|
+
d("div", { class: "w-full h-4 skeleton" }),
|
|
524
|
+
d("div", { class: "w-full h-4 skeleton" })
|
|
532
525
|
], -1)
|
|
533
|
-
]))) :
|
|
526
|
+
])])) : E("", !0)
|
|
534
527
|
], 2));
|
|
535
528
|
}
|
|
536
|
-
}),
|
|
529
|
+
}), Mt = Symbol("CarouselItemStyle"), zn = { class: "relative h-full" }, Pn = {
|
|
537
530
|
key: 0,
|
|
538
531
|
class: "top-1/2 right-5 left-5 z-10 absolute flex justify-between -translate-y-1/2 transform"
|
|
539
|
-
},
|
|
532
|
+
}, On = {
|
|
540
533
|
key: 1,
|
|
541
534
|
class: "bottom-5 z-10 absolute flex justify-center gap-2 py-2 w-full"
|
|
542
|
-
},
|
|
535
|
+
}, Nn = ["onClick", "aria-label"], An = /* @__PURE__ */ A({
|
|
543
536
|
__name: "carousel",
|
|
544
537
|
props: {
|
|
545
538
|
showIndicators: {
|
|
@@ -554,7 +547,7 @@ const lt = te("SunIcon", [
|
|
|
554
547
|
type: String,
|
|
555
548
|
default: "horizontal",
|
|
556
549
|
required: !1,
|
|
557
|
-
validator: (
|
|
550
|
+
validator: (e) => e == "horizontal" || e == "vertical"
|
|
558
551
|
},
|
|
559
552
|
initialSlide: {
|
|
560
553
|
type: Number,
|
|
@@ -563,149 +556,149 @@ const lt = te("SunIcon", [
|
|
|
563
556
|
slidesPerView: {
|
|
564
557
|
type: Number,
|
|
565
558
|
default: 1,
|
|
566
|
-
validator: (
|
|
559
|
+
validator: (e) => e >= 1
|
|
567
560
|
},
|
|
568
561
|
gap: {
|
|
569
562
|
type: Number,
|
|
570
563
|
default: 0,
|
|
571
|
-
validator: (
|
|
564
|
+
validator: (e) => e >= 0
|
|
572
565
|
},
|
|
573
566
|
slideDuration: {
|
|
574
567
|
type: Number,
|
|
575
568
|
default: 300,
|
|
576
|
-
validator: (
|
|
569
|
+
validator: (e) => e >= 0
|
|
577
570
|
}
|
|
578
571
|
},
|
|
579
|
-
setup(
|
|
580
|
-
const
|
|
581
|
-
width: `calc((100% - ${
|
|
572
|
+
setup(e, { expose: t }) {
|
|
573
|
+
const n = e, a = M(n.initialSlide), o = M(null), l = M(!1), s = M(0), u = K(() => ({
|
|
574
|
+
width: `calc((100% - ${n.slidesPerView > 1 ? (n.slidesPerView - 1) * n.gap : 0}px) / ${n.slidesPerView})`
|
|
582
575
|
}));
|
|
583
|
-
|
|
584
|
-
const
|
|
585
|
-
o.value ?
|
|
586
|
-
},
|
|
587
|
-
if (!o.value ||
|
|
588
|
-
const
|
|
589
|
-
if (
|
|
590
|
-
const
|
|
591
|
-
l.value = !0,
|
|
592
|
-
const
|
|
593
|
-
if (Math.abs(
|
|
594
|
-
l.value = !1,
|
|
576
|
+
Xt(Mt, u);
|
|
577
|
+
const i = () => {
|
|
578
|
+
o.value ? s.value = o.value.children.length : s.value = 0;
|
|
579
|
+
}, c = async (S) => {
|
|
580
|
+
if (!o.value || n.slidesPerView <= 0 || l.value || (i(), s.value === 0)) return;
|
|
581
|
+
const D = (S % s.value + s.value) % s.value, k = o.value, C = n.sliderOrientation === "vertical" ? (k.offsetHeight - (n.slidesPerView - 1) * n.gap) / n.slidesPerView : (k.offsetWidth - (n.slidesPerView - 1) * n.gap) / n.slidesPerView;
|
|
582
|
+
if (C <= 0) return;
|
|
583
|
+
const z = C + n.gap, j = D * z, H = n.sliderOrientation === "vertical" ? k.scrollHeight - k.offsetHeight : k.scrollWidth - k.offsetWidth, v = Math.max(0, Math.min(j, H + 0.5));
|
|
584
|
+
l.value = !0, k.style.scrollBehavior = "auto";
|
|
585
|
+
const h = n.sliderOrientation === "vertical" ? k.scrollTop : k.scrollLeft, x = v - h;
|
|
586
|
+
if (Math.abs(x) < 1) {
|
|
587
|
+
l.value = !1, a.value = D;
|
|
595
588
|
return;
|
|
596
589
|
}
|
|
597
|
-
const T = performance.now(),
|
|
598
|
-
const
|
|
599
|
-
|
|
590
|
+
const T = performance.now(), r = (b) => {
|
|
591
|
+
const $ = b - T, I = Math.min(1, $ / n.slideDuration), P = I < 0.5 ? 4 * I * I * I : 1 - Math.pow(-2 * I + 2, 3) / 2, q = h + x * P;
|
|
592
|
+
n.sliderOrientation === "vertical" ? k.scrollTop = q : k.scrollLeft = q, I < 1 ? requestAnimationFrame(r) : (n.sliderOrientation === "vertical" ? k.scrollTop = v : k.scrollLeft = v, a.value = D, l.value = !1);
|
|
600
593
|
};
|
|
601
|
-
requestAnimationFrame(
|
|
602
|
-
},
|
|
603
|
-
|
|
604
|
-
},
|
|
605
|
-
|
|
606
|
-
},
|
|
607
|
-
|
|
608
|
-
},
|
|
609
|
-
if (!o.value ||
|
|
610
|
-
const
|
|
611
|
-
if (
|
|
612
|
-
const
|
|
613
|
-
|
|
594
|
+
requestAnimationFrame(r);
|
|
595
|
+
}, m = () => {
|
|
596
|
+
c(a.value + 1);
|
|
597
|
+
}, w = () => {
|
|
598
|
+
c(a.value - 1);
|
|
599
|
+
}, g = (S) => {
|
|
600
|
+
c(S);
|
|
601
|
+
}, y = () => {
|
|
602
|
+
if (!o.value || n.slidesPerView <= 0 || (i(), s.value === 0)) return;
|
|
603
|
+
const S = o.value, D = n.sliderOrientation === "vertical" ? S.offsetHeight : S.offsetWidth, k = n.slidesPerView > 1 ? (n.slidesPerView - 1) * n.gap : 0, C = (D - k) / n.slidesPerView;
|
|
604
|
+
if (C <= 0) return;
|
|
605
|
+
const z = Math.max(0, s.value - n.slidesPerView), j = Math.min(Math.max(0, n.initialSlide), z), H = j * (C + n.gap), v = n.sliderOrientation === "vertical" ? S.scrollHeight - S.offsetHeight : S.scrollWidth - S.offsetWidth, h = Math.max(0, Math.min(H, v + 0.5));
|
|
606
|
+
n.sliderOrientation === "vertical" ? S.scrollTo({ top: h, behavior: "auto" }) : S.scrollTo({ left: h, behavior: "auto" }), a.value = j;
|
|
614
607
|
};
|
|
615
|
-
return
|
|
608
|
+
return ue(() => {
|
|
616
609
|
requestAnimationFrame(() => {
|
|
617
|
-
requestAnimationFrame(
|
|
618
|
-
}),
|
|
619
|
-
}),
|
|
620
|
-
requestAnimationFrame(() =>
|
|
621
|
-
}),
|
|
610
|
+
requestAnimationFrame(y);
|
|
611
|
+
}), i();
|
|
612
|
+
}), R(() => n.initialSlide, (S) => {
|
|
613
|
+
requestAnimationFrame(() => c(S));
|
|
614
|
+
}), R(() => [n.slidesPerView, n.gap], () => {
|
|
622
615
|
requestAnimationFrame(() => {
|
|
623
616
|
requestAnimationFrame(() => {
|
|
624
|
-
if (
|
|
625
|
-
const
|
|
626
|
-
|
|
617
|
+
if (i(), s.value === 0) return;
|
|
618
|
+
const S = Math.max(0, s.value - n.slidesPerView), D = Math.min(a.value, S), k = n.slideDuration;
|
|
619
|
+
n.slideDuration = 0, c(D), n.slideDuration = k;
|
|
627
620
|
});
|
|
628
621
|
});
|
|
629
|
-
}),
|
|
630
|
-
|
|
622
|
+
}), t({ scrollToSlide: c }), (S, D) => (f(), p("div", zn, [
|
|
623
|
+
d("div", {
|
|
631
624
|
ref_key: "carouselContainer",
|
|
632
625
|
ref: o,
|
|
633
|
-
class:
|
|
634
|
-
style:
|
|
626
|
+
class: B(["rounded w-full h-full overflow-x-scroll scroll-smooth carousel", [{ "carousel-horizontal md:snap-none": e.sliderOrientation == "horizontal" }, { "carousel-vertical": e.sliderOrientation == "vertical" }]]),
|
|
627
|
+
style: ye({ gap: `${e.gap}px` })
|
|
635
628
|
}, [
|
|
636
|
-
|
|
629
|
+
V(S.$slots, "default", {}, void 0, !0)
|
|
637
630
|
], 6),
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
onClick:
|
|
631
|
+
e.showNavigationButtons ? (f(), p("div", Pn, [
|
|
632
|
+
d("div", {
|
|
633
|
+
onClick: w,
|
|
641
634
|
role: "button",
|
|
642
635
|
"aria-label": "Previous Slide"
|
|
643
636
|
}, [
|
|
644
|
-
|
|
645
|
-
|
|
637
|
+
V(S.$slots, "prevButton", {}, () => [
|
|
638
|
+
D[0] || (D[0] = d("button", {
|
|
646
639
|
class: "btn btn-circle",
|
|
647
640
|
tabindex: "-1"
|
|
648
641
|
}, "❮", -1))
|
|
649
642
|
], !0)
|
|
650
643
|
]),
|
|
651
|
-
|
|
652
|
-
onClick:
|
|
644
|
+
d("div", {
|
|
645
|
+
onClick: m,
|
|
653
646
|
role: "button",
|
|
654
647
|
"aria-label": "Next Slide"
|
|
655
648
|
}, [
|
|
656
|
-
|
|
657
|
-
|
|
649
|
+
V(S.$slots, "nextButton", {}, () => [
|
|
650
|
+
D[1] || (D[1] = d("button", {
|
|
658
651
|
class: "btn btn-circle",
|
|
659
652
|
tabindex: "-1"
|
|
660
653
|
}, "❯", -1))
|
|
661
654
|
], !0)
|
|
662
655
|
])
|
|
663
|
-
])) :
|
|
664
|
-
|
|
665
|
-
(
|
|
666
|
-
key: `dot-${
|
|
667
|
-
onClick: (
|
|
668
|
-
class:
|
|
669
|
-
"aria-label": `Go to slide ${
|
|
670
|
-
}, null, 10,
|
|
671
|
-
])) :
|
|
656
|
+
])) : E("", !0),
|
|
657
|
+
e.showIndicators ? (f(), p("div", On, [
|
|
658
|
+
(f(!0), p(U, null, F(s.value, (k, C) => (f(), p("button", {
|
|
659
|
+
key: `dot-${C}`,
|
|
660
|
+
onClick: (z) => g(C),
|
|
661
|
+
class: B(["btn btn-circle btn-xs", { "btn-active": C === a.value }]),
|
|
662
|
+
"aria-label": `Go to slide ${C + 1}`
|
|
663
|
+
}, null, 10, Nn))), 128))
|
|
664
|
+
])) : E("", !0)
|
|
672
665
|
]));
|
|
673
666
|
}
|
|
674
|
-
}),
|
|
675
|
-
const
|
|
676
|
-
for (const [
|
|
677
|
-
|
|
678
|
-
return
|
|
679
|
-
},
|
|
667
|
+
}), we = (e, t) => {
|
|
668
|
+
const n = e.__vccOpts || e;
|
|
669
|
+
for (const [a, o] of t)
|
|
670
|
+
n[a] = o;
|
|
671
|
+
return n;
|
|
672
|
+
}, xo = /* @__PURE__ */ we(An, [["__scopeId", "data-v-db55a6a5"]]), Ln = /* @__PURE__ */ A({
|
|
680
673
|
__name: "carouselItem",
|
|
681
|
-
setup(
|
|
682
|
-
const
|
|
683
|
-
return (
|
|
674
|
+
setup(e) {
|
|
675
|
+
const t = Gt(Mt, M({}));
|
|
676
|
+
return (n, a) => (f(), p("div", {
|
|
684
677
|
class: "w-full h-full carousel-item",
|
|
685
|
-
style:
|
|
678
|
+
style: ye(Z(t))
|
|
686
679
|
}, [
|
|
687
|
-
|
|
680
|
+
V(n.$slots, "default", {}, void 0, !0)
|
|
688
681
|
], 4));
|
|
689
682
|
}
|
|
690
|
-
}),
|
|
683
|
+
}), ko = /* @__PURE__ */ we(Ln, [["__scopeId", "data-v-507384bc"]]), Un = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, jn = ["onClick"], Fn = {
|
|
691
684
|
key: 0,
|
|
692
|
-
class: "inline-component-wrapper flex
|
|
693
|
-
},
|
|
685
|
+
class: "inline-component-wrapper flex grow justify-center items-center w-full h-full"
|
|
686
|
+
}, Rn = {
|
|
694
687
|
key: 1,
|
|
695
688
|
class: "flex flex-col"
|
|
696
|
-
},
|
|
689
|
+
}, qn = { class: "text-sm" }, Hn = {
|
|
697
690
|
key: 0,
|
|
698
691
|
class: "opacity-75 overflow-hidden text-xs truncate ..."
|
|
699
|
-
},
|
|
692
|
+
}, _n = {
|
|
700
693
|
key: 1,
|
|
701
694
|
class: "hidden md:block opacity-35 overflow-hidden text-xs truncate ..."
|
|
702
|
-
},
|
|
695
|
+
}, Wn = { class: "hidden" }, Zn = ["id"], Kn = { class: "modal-box" }, Yn = { class: "font-bold text-lg" }, Jn = ["name", "checked"], Xn = { class: "collapse-title flex justify-between items-center pr-4 w-full font-medium text-xl" }, Gn = {
|
|
703
696
|
key: 0,
|
|
704
697
|
class: "opacity-75 overflow-hidden text-sm truncate ..."
|
|
705
|
-
},
|
|
698
|
+
}, Qn = {
|
|
706
699
|
key: 1,
|
|
707
700
|
class: "opacity-35 text-sm"
|
|
708
|
-
},
|
|
701
|
+
}, ea = { class: "collapse-content flex place-content-center p-0" }, ta = /* @__PURE__ */ A({
|
|
709
702
|
__name: "advancedSearch",
|
|
710
703
|
props: {
|
|
711
704
|
searchOptions: {},
|
|
@@ -714,37 +707,37 @@ const lt = te("SunIcon", [
|
|
|
714
707
|
value: {}
|
|
715
708
|
},
|
|
716
709
|
emits: ["search", "update:search-data"],
|
|
717
|
-
setup(
|
|
718
|
-
const
|
|
719
|
-
datetime:
|
|
720
|
-
"standard-select":
|
|
710
|
+
setup(e, { emit: t }) {
|
|
711
|
+
const n = e, a = t, o = n.id ?? `advancedSearch-${Qt()}`, l = M(null), s = M(null), u = {
|
|
712
|
+
datetime: ze(() => import("./datetimePicker-B5De2MZQ.js")),
|
|
713
|
+
"standard-select": ze(() => import("./select-Cz4vf_YE.js")),
|
|
721
714
|
// Add other components here when you create them:
|
|
722
715
|
// 'custom-range': defineAsyncComponent(() => import('./CustomRange.vue')),
|
|
723
716
|
// 'custom-number': defineAsyncComponent(() => import('./CustomNumber.vue')),
|
|
724
|
-
"custom-text":
|
|
717
|
+
"custom-text": ze(() => import("./inputField-BxT95oyM.js"))
|
|
725
718
|
// 'custom-select': defineAsyncComponent(() => import('./CustomSelect.vue')),
|
|
726
|
-
},
|
|
719
|
+
}, i = M({}), c = M({
|
|
727
720
|
left: "0px",
|
|
728
721
|
top: "0px",
|
|
729
722
|
transform: "translateX(0%)"
|
|
730
|
-
}),
|
|
731
|
-
var
|
|
723
|
+
}), m = M(null), w = (v) => {
|
|
724
|
+
var h;
|
|
732
725
|
if (v.value === void 0 || v.value === null || v.value === "")
|
|
733
726
|
return "";
|
|
734
727
|
switch (v.type) {
|
|
735
728
|
case "datetime":
|
|
736
729
|
if (typeof v.value == "string")
|
|
737
730
|
try {
|
|
738
|
-
const
|
|
739
|
-
if (!isNaN(
|
|
740
|
-
return
|
|
731
|
+
const x = new Date(v.value);
|
|
732
|
+
if (!isNaN(x.getTime()))
|
|
733
|
+
return x.toLocaleString();
|
|
741
734
|
} catch {
|
|
742
735
|
}
|
|
743
736
|
else if (v.range && typeof v.value == "object" && v.value !== null && "start" in v.value && "end" in v.value)
|
|
744
737
|
try {
|
|
745
|
-
const
|
|
746
|
-
if (!isNaN(
|
|
747
|
-
return `${
|
|
738
|
+
const x = new Date(v.value.start), T = new Date(v.value.end);
|
|
739
|
+
if (!isNaN(x.getTime()) && !isNaN(T.getTime()))
|
|
740
|
+
return `${x.toLocaleDateString()} - ${T.toLocaleDateString()}`;
|
|
748
741
|
} catch {
|
|
749
742
|
}
|
|
750
743
|
break;
|
|
@@ -758,12 +751,12 @@ const lt = te("SunIcon", [
|
|
|
758
751
|
break;
|
|
759
752
|
case "standard-select":
|
|
760
753
|
case "custom-select":
|
|
761
|
-
if ((
|
|
762
|
-
const
|
|
754
|
+
if ((h = v.props) != null && h.options && Array.isArray(v.props.options)) {
|
|
755
|
+
const x = v.props.options.find(
|
|
763
756
|
(T) => T.value === v.value
|
|
764
757
|
);
|
|
765
|
-
if (
|
|
766
|
-
return
|
|
758
|
+
if (x)
|
|
759
|
+
return x.text;
|
|
767
760
|
}
|
|
768
761
|
return String(v.value);
|
|
769
762
|
case "custom-text":
|
|
@@ -773,37 +766,37 @@ const lt = te("SunIcon", [
|
|
|
773
766
|
}
|
|
774
767
|
return String(v.value);
|
|
775
768
|
};
|
|
776
|
-
function
|
|
777
|
-
var
|
|
778
|
-
const
|
|
779
|
-
if (!
|
|
769
|
+
function g(v) {
|
|
770
|
+
var r, b;
|
|
771
|
+
const h = (r = l.value) == null ? void 0 : r.name;
|
|
772
|
+
if (!h) {
|
|
780
773
|
console.warn("componentValueUpdated called but no active tab.");
|
|
781
774
|
return;
|
|
782
775
|
}
|
|
783
|
-
const
|
|
784
|
-
(
|
|
785
|
-
)) == null ? void 0 :
|
|
786
|
-
(
|
|
776
|
+
const x = (b = n.searchOptions.find(
|
|
777
|
+
($) => ($ == null ? void 0 : $.category) === n.currentCategory
|
|
778
|
+
)) == null ? void 0 : b.tabs, T = x == null ? void 0 : x.find(
|
|
779
|
+
($) => $.name === h
|
|
787
780
|
);
|
|
788
|
-
T ? (T.value = v,
|
|
781
|
+
T ? (T.value = v, a("update:search-data", {
|
|
789
782
|
tab: T.name,
|
|
790
783
|
data: v
|
|
791
784
|
})) : console.error(
|
|
792
|
-
`Tab with name "${
|
|
785
|
+
`Tab with name "${h}" not found in current category.`
|
|
793
786
|
);
|
|
794
787
|
}
|
|
795
|
-
function
|
|
796
|
-
|
|
788
|
+
function y(v) {
|
|
789
|
+
g(v);
|
|
797
790
|
}
|
|
798
|
-
function
|
|
799
|
-
|
|
791
|
+
function S() {
|
|
792
|
+
a("search");
|
|
800
793
|
}
|
|
801
|
-
async function
|
|
794
|
+
async function D(v) {
|
|
802
795
|
var T;
|
|
803
|
-
const
|
|
804
|
-
((T = l.value) == null ? void 0 : T.displayMode) === "popup" &&
|
|
796
|
+
const h = document.getElementById(`advancedSearchMobile-${o}`), x = h && h.contains(v.target);
|
|
797
|
+
((T = l.value) == null ? void 0 : T.displayMode) === "popup" && m.value && !m.value.contains(v.target) && !x && (await Pe(), l.value = null);
|
|
805
798
|
}
|
|
806
|
-
async function
|
|
799
|
+
async function k() {
|
|
807
800
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
808
801
|
const v = document.getElementById(
|
|
809
802
|
`advancedSearchMobile-${o}`
|
|
@@ -813,22 +806,22 @@ const lt = te("SunIcon", [
|
|
|
813
806
|
);
|
|
814
807
|
}
|
|
815
808
|
}
|
|
816
|
-
async function
|
|
817
|
-
var
|
|
809
|
+
async function C(v) {
|
|
810
|
+
var x, T, r;
|
|
818
811
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
819
|
-
|
|
812
|
+
k();
|
|
820
813
|
return;
|
|
821
814
|
}
|
|
822
|
-
const
|
|
823
|
-
if (((
|
|
815
|
+
const h = v.displayMode ?? "popup";
|
|
816
|
+
if (((x = l.value) == null ? void 0 : x.name) === v.name && ((T = l.value) == null ? void 0 : T.displayMode) === h)
|
|
824
817
|
l.value = null;
|
|
825
|
-
else if (l.value = { ...v, displayMode:
|
|
826
|
-
const
|
|
827
|
-
if (
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
left: `${
|
|
831
|
-
top: `${
|
|
818
|
+
else if (l.value = { ...v, displayMode: h }, await Pe(), ((r = l.value) == null ? void 0 : r.displayMode) === "popup") {
|
|
819
|
+
const b = i.value[v.name];
|
|
820
|
+
if (b && m.value) {
|
|
821
|
+
const $ = b.getBoundingClientRect(), I = m.value.getBoundingClientRect(), P = $.bottom - I.top, q = $.left + $.width / 2 - I.left;
|
|
822
|
+
c.value = {
|
|
823
|
+
left: `${q}px`,
|
|
824
|
+
top: `${P + 8}px`,
|
|
832
825
|
// Add a small gap
|
|
833
826
|
transform: "translateX(-50%)"
|
|
834
827
|
// Center horizontally
|
|
@@ -840,25 +833,25 @@ const lt = te("SunIcon", [
|
|
|
840
833
|
);
|
|
841
834
|
}
|
|
842
835
|
}
|
|
843
|
-
const
|
|
844
|
-
const
|
|
836
|
+
const z = (v) => {
|
|
837
|
+
const h = v.relatedTarget;
|
|
845
838
|
setTimeout(() => {
|
|
846
|
-
var
|
|
847
|
-
((
|
|
839
|
+
var x;
|
|
840
|
+
((x = l.value) == null ? void 0 : x.displayMode) === "inline" && m.value && (!h || !m.value.contains(h)) ? (console.log("Blur detected outside container, closing inline view."), l.value = null) : console.log(
|
|
848
841
|
"Blur detected, but staying within container or not an inline tab."
|
|
849
842
|
);
|
|
850
843
|
}, 50);
|
|
851
|
-
},
|
|
844
|
+
}, j = () => {
|
|
852
845
|
console.log("Enter key pressed on inline component, closing inline view."), l.value = null;
|
|
853
846
|
};
|
|
854
|
-
|
|
855
|
-
var
|
|
847
|
+
R(s, (v) => {
|
|
848
|
+
var h;
|
|
856
849
|
console.log(
|
|
857
850
|
"advanced-search: inlineComponentRef changed. New Value:",
|
|
858
851
|
v
|
|
859
|
-
), console.log("advanced-search: activeTab.value:", l.value), v && ((
|
|
852
|
+
), console.log("advanced-search: activeTab.value:", l.value), v && ((h = l.value) == null ? void 0 : h.displayMode) === "inline" ? (console.log(
|
|
860
853
|
"advanced-search: Inline component ref is available and active tab is inline. Attempting to focus child input..."
|
|
861
|
-
),
|
|
854
|
+
), Pe(() => {
|
|
862
855
|
console.log(
|
|
863
856
|
"advanced-search: Inside nextTick. Attempting to call child's focus method..."
|
|
864
857
|
), console.log("advanced-search: Type of newValue:", typeof v), console.log(
|
|
@@ -873,606 +866,1638 @@ const lt = te("SunIcon", [
|
|
|
873
866
|
})) : console.log(
|
|
874
867
|
v ? "advanced-search: inlineComponentRef available, but active tab is not inline." : "advanced-search: inlineComponentRef is now null (component likely unmounted)."
|
|
875
868
|
);
|
|
876
|
-
}),
|
|
877
|
-
document.addEventListener("click",
|
|
878
|
-
}),
|
|
879
|
-
document.removeEventListener("click",
|
|
869
|
+
}), ue(() => {
|
|
870
|
+
document.addEventListener("click", D), window.addEventListener("resize", H);
|
|
871
|
+
}), _e(() => {
|
|
872
|
+
document.removeEventListener("click", D), window.removeEventListener("resize", H);
|
|
880
873
|
});
|
|
881
|
-
const
|
|
882
|
-
var v,
|
|
874
|
+
const H = () => {
|
|
875
|
+
var v, h;
|
|
883
876
|
if (typeof window < "u") {
|
|
884
|
-
const
|
|
885
|
-
!
|
|
877
|
+
const x = window.innerWidth <= 768, T = l.value !== null && (l.value.displayMode === "popup" || l.value.displayMode === "inline") && window.innerWidth > 768;
|
|
878
|
+
!x && (((v = l.value) == null ? void 0 : v.displayMode) === "popup" || ((h = l.value) == null ? void 0 : h.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), l.value = null), x && !T && l.value !== null && (console.log(
|
|
886
879
|
"Resizing to desktop from potential mobile active state, closing active tab."
|
|
887
880
|
), l.value = null);
|
|
888
|
-
const
|
|
881
|
+
const r = document.getElementById(
|
|
889
882
|
`advancedSearchMobile-${o}`
|
|
890
883
|
);
|
|
891
|
-
|
|
884
|
+
r != null && r.open && !x && (console.log("Modal is open on desktop, closing modal and active tab."), r.close(), l.value = null);
|
|
892
885
|
}
|
|
893
886
|
};
|
|
894
|
-
return (v,
|
|
895
|
-
var
|
|
896
|
-
return
|
|
897
|
-
|
|
887
|
+
return (v, h) => {
|
|
888
|
+
var x, T;
|
|
889
|
+
return f(), p(U, null, [
|
|
890
|
+
d("div", {
|
|
898
891
|
ref_key: "searchContainer",
|
|
899
|
-
ref:
|
|
892
|
+
ref: m,
|
|
900
893
|
class: "w-full"
|
|
901
894
|
}, [
|
|
902
|
-
|
|
895
|
+
d("div", {
|
|
903
896
|
class: "group/search relative flex place-items-center shadow-md p-2 border-2 border-base-300/25 rounded-sm w-full transition-all cursor-pointer md:cursor-auto",
|
|
904
|
-
onClick:
|
|
897
|
+
onClick: k
|
|
905
898
|
}, [
|
|
906
|
-
|
|
907
|
-
(
|
|
908
|
-
(
|
|
909
|
-
)) == null ? void 0 :
|
|
910
|
-
var
|
|
911
|
-
return
|
|
912
|
-
key: `${
|
|
913
|
-
onClick:
|
|
914
|
-
class:
|
|
915
|
-
"tab-active": ((
|
|
916
|
-
"tab-active-inline": ((
|
|
899
|
+
d("div", Un, [
|
|
900
|
+
(f(!0), p(U, null, F(((x = n.searchOptions.find(
|
|
901
|
+
(r) => r.category === n.currentCategory
|
|
902
|
+
)) == null ? void 0 : x.tabs) || [], (r, b) => {
|
|
903
|
+
var $, I, P, q, Q;
|
|
904
|
+
return f(), p("button", {
|
|
905
|
+
key: `${r.name}-${b}`,
|
|
906
|
+
onClick: te((Y) => C(r), ["stop"]),
|
|
907
|
+
class: B([{
|
|
908
|
+
"tab-active": (($ = l.value) == null ? void 0 : $.name) === r.name,
|
|
909
|
+
"tab-active-inline": ((I = l.value) == null ? void 0 : I.name) === r.name && ((P = l.value) == null ? void 0 : P.displayMode) === "inline"
|
|
917
910
|
// Add new class
|
|
918
|
-
}, "group/searchitem after:top-0 after:-right-2 after:absolute relative first-of-type:flex-auto last-of-type:flex-auto after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-
|
|
911
|
+
}, "group/searchitem after:top-0 after:-right-2 after:absolute relative first-of-type:flex-auto last-of-type:flex-auto after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-px after:h-10 overflow-x-hidden text-start md:after:content-[''] after:content-none last-of-type:after:content-none"]),
|
|
919
912
|
ref_for: !0,
|
|
920
|
-
ref: (
|
|
913
|
+
ref: (Y) => i.value[r.name] = Y
|
|
921
914
|
}, [
|
|
922
|
-
((
|
|
923
|
-
(
|
|
915
|
+
((q = l.value) == null ? void 0 : q.name) === r.name && ((Q = l.value) == null ? void 0 : Q.displayMode) === "inline" ? (f(), p("div", Fn, [
|
|
916
|
+
(f(), ae(Oe(u[l.value.type]), Ne({ ref_for: !0 }, l.value.props || {}, {
|
|
924
917
|
modelValue: l.value.value,
|
|
925
|
-
onUpdated:
|
|
926
|
-
"onUpdate:modelValue":
|
|
927
|
-
onBlur:
|
|
928
|
-
onKeydown:
|
|
918
|
+
onUpdated: h[0] || (h[0] = (Y) => y(Y)),
|
|
919
|
+
"onUpdate:modelValue": h[1] || (h[1] = (Y) => y(Y)),
|
|
920
|
+
onBlur: z,
|
|
921
|
+
onKeydown: We(te(j, ["stop", "prevent"]), ["enter"]),
|
|
929
922
|
ref_for: !0,
|
|
930
923
|
ref_key: "inlineComponentRef",
|
|
931
|
-
ref:
|
|
924
|
+
ref: s
|
|
932
925
|
}), null, 16, ["modelValue", "onKeydown"]))
|
|
933
|
-
])) : (
|
|
934
|
-
|
|
935
|
-
|
|
926
|
+
])) : (f(), p("div", Rn, [
|
|
927
|
+
d("p", qn, O(r.name), 1),
|
|
928
|
+
r.value !== void 0 && r.value !== null && r.value !== "" ? (f(), p("p", Hn, O(w(r)), 1)) : (f(), p("p", _n, O(r.description), 1))
|
|
936
929
|
]))
|
|
937
|
-
], 10,
|
|
930
|
+
], 10, jn);
|
|
938
931
|
}), 128))
|
|
939
932
|
]),
|
|
940
|
-
l.value && l.value.displayMode === "popup" ? (
|
|
933
|
+
l.value && l.value.displayMode === "popup" ? (f(), p("div", {
|
|
941
934
|
key: 0,
|
|
942
935
|
class: "absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",
|
|
943
|
-
style:
|
|
936
|
+
style: ye(c.value)
|
|
944
937
|
}, [
|
|
945
|
-
(
|
|
938
|
+
(f(), ae(Oe(u[l.value.type]), Ne(l.value.props || {}, {
|
|
946
939
|
modelValue: l.value.value,
|
|
947
|
-
onUpdated:
|
|
948
|
-
"onUpdate:modelValue":
|
|
940
|
+
onUpdated: h[2] || (h[2] = (r) => g(r)),
|
|
941
|
+
"onUpdate:modelValue": h[3] || (h[3] = (r) => g(r))
|
|
949
942
|
}), null, 16, ["modelValue"]))
|
|
950
|
-
], 4)) :
|
|
951
|
-
|
|
943
|
+
], 4)) : E("", !0),
|
|
944
|
+
d("button", {
|
|
952
945
|
title: "search",
|
|
953
946
|
type: "submit",
|
|
954
947
|
class: "ml-1 btn btn-primary btn-square",
|
|
955
|
-
onClick:
|
|
948
|
+
onClick: te(S, ["stop"])
|
|
956
949
|
}, [
|
|
957
|
-
|
|
950
|
+
ie(Z(ht), {
|
|
958
951
|
size: 24,
|
|
959
952
|
color: "white"
|
|
960
953
|
})
|
|
961
954
|
])
|
|
962
955
|
]),
|
|
963
|
-
|
|
964
|
-
|
|
956
|
+
d("div", Wn, [
|
|
957
|
+
d("button", {
|
|
965
958
|
title: "search",
|
|
966
|
-
onClick:
|
|
959
|
+
onClick: h[4] || (h[4] = () => {
|
|
967
960
|
})
|
|
968
961
|
}, [
|
|
969
|
-
|
|
962
|
+
ie(Z(ht), {
|
|
970
963
|
size: 24,
|
|
971
964
|
color: "white"
|
|
972
965
|
})
|
|
973
966
|
])
|
|
974
967
|
])
|
|
975
968
|
], 512),
|
|
976
|
-
|
|
977
|
-
id: `advancedSearchMobile-${
|
|
969
|
+
d("dialog", {
|
|
970
|
+
id: `advancedSearchMobile-${Z(o)}`,
|
|
978
971
|
class: "modal"
|
|
979
972
|
}, [
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
973
|
+
d("div", Kn, [
|
|
974
|
+
V(v.$slots, "additionalForMobile", {}, () => [
|
|
975
|
+
d("h3", Yn, O(e.currentCategory), 1)
|
|
983
976
|
], !0),
|
|
984
|
-
(
|
|
985
|
-
(
|
|
986
|
-
)) == null ? void 0 : T.tabs) || [], (
|
|
977
|
+
(f(!0), p(U, null, F(((T = n.searchOptions.find(
|
|
978
|
+
(r) => r.category === n.currentCategory
|
|
979
|
+
)) == null ? void 0 : T.tabs) || [], (r, b) => (f(), p("div", {
|
|
987
980
|
class: "collapse bg-base-200 my-4",
|
|
988
|
-
key:
|
|
981
|
+
key: r.name
|
|
989
982
|
}, [
|
|
990
|
-
|
|
983
|
+
d("input", {
|
|
991
984
|
type: "radio",
|
|
992
|
-
name: `accordion-${
|
|
993
|
-
checked:
|
|
994
|
-
}, null, 8,
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
985
|
+
name: `accordion-${Z(o)}`,
|
|
986
|
+
checked: b === 0
|
|
987
|
+
}, null, 8, Jn),
|
|
988
|
+
d("div", Xn, [
|
|
989
|
+
d("div", null, O(r.name), 1),
|
|
990
|
+
r.value !== void 0 && r.value !== null && r.value !== "" ? (f(), p("div", Gn, O(w(r)), 1)) : (f(), p("div", Qn, O(r.description), 1))
|
|
998
991
|
]),
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
(
|
|
1002
|
-
modelValue:
|
|
1003
|
-
onUpdated:
|
|
1004
|
-
"onUpdate:modelValue":
|
|
992
|
+
d("div", ea, [
|
|
993
|
+
h[7] || (h[7] = d("br", null, null, -1)),
|
|
994
|
+
(f(), ae(Oe(u[r.type]), Ne({ ref_for: !0 }, r.props || {}, {
|
|
995
|
+
modelValue: r.value,
|
|
996
|
+
onUpdated: h[5] || (h[5] = ($) => g($)),
|
|
997
|
+
"onUpdate:modelValue": h[6] || (h[6] = ($) => g($))
|
|
1005
998
|
}), null, 16, ["modelValue"]))
|
|
1006
999
|
])
|
|
1007
1000
|
]))), 128)),
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1001
|
+
d("div", { class: "modal-action" }, [
|
|
1002
|
+
d("form", { method: "dialog" }, [
|
|
1003
|
+
d("button", {
|
|
1011
1004
|
class: "btn btn-primary",
|
|
1012
|
-
onClick:
|
|
1005
|
+
onClick: S
|
|
1013
1006
|
}, " Close and Search ")
|
|
1014
1007
|
])
|
|
1015
1008
|
])
|
|
1016
1009
|
])
|
|
1017
|
-
], 8,
|
|
1010
|
+
], 8, Zn)
|
|
1018
1011
|
], 64);
|
|
1019
1012
|
};
|
|
1020
1013
|
}
|
|
1021
|
-
}),
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1014
|
+
}), $o = /* @__PURE__ */ we(ta, [["__scopeId", "data-v-577c3624"]]);
|
|
1015
|
+
var ne, se;
|
|
1016
|
+
class na {
|
|
1017
|
+
/**
|
|
1018
|
+
* @param {T} current
|
|
1019
|
+
*/
|
|
1020
|
+
constructor(t) {
|
|
1021
|
+
/**
|
|
1022
|
+
* @type {T}
|
|
1023
|
+
*/
|
|
1024
|
+
Be(this, ne);
|
|
1025
|
+
Be(this, se, /* @__PURE__ */ new Set());
|
|
1026
|
+
Ve(this, ne, t);
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* @return {T}
|
|
1030
|
+
*/
|
|
1031
|
+
get current() {
|
|
1032
|
+
return oe(this, ne);
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* @param {T} value
|
|
1036
|
+
*/
|
|
1037
|
+
set current(t) {
|
|
1038
|
+
oe(this, ne) != t && (Ve(this, ne, t), oe(this, se).forEach((n) => n(t)));
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* @type {import("hooks").Ref["on"]}
|
|
1042
|
+
*/
|
|
1043
|
+
on(t) {
|
|
1044
|
+
return oe(this, se).add(t), () => oe(this, se).delete(t);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
ne = new WeakMap(), se = new WeakMap();
|
|
1048
|
+
const It = (e) => new na(e), Ze = Symbol.for("atomico.hooks");
|
|
1049
|
+
globalThis[Ze] = globalThis[Ze] || {};
|
|
1050
|
+
let re = globalThis[Ze];
|
|
1051
|
+
const aa = Symbol.for("Atomico.suspense"), Et = Symbol.for("Atomico.effect"), la = Symbol.for("Atomico.layoutEffect"), Bt = Symbol.for("Atomico.insertionEffect"), ce = (e, t, n) => {
|
|
1052
|
+
const { i: a, hooks: o } = re.c, l = o[a] = o[a] || {};
|
|
1053
|
+
return l.value = e(l.value), l.effect = t, l.tag = n, re.c.i++, o[a].value;
|
|
1054
|
+
}, oa = (e) => ce((t = It(e)) => t), xe = () => ce((e = It(re.c.host)) => e), Vt = () => re.c.update, sa = (e, t, n = 0) => {
|
|
1055
|
+
let a = {}, o = !1;
|
|
1056
|
+
const l = () => o, s = (u, i) => {
|
|
1057
|
+
for (const c in a) {
|
|
1058
|
+
const m = a[c];
|
|
1059
|
+
m.effect && m.tag === u && (m.value = m.effect(m.value, i));
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
return { load: (u) => {
|
|
1063
|
+
re.c = { host: t, hooks: a, update: e, i: 0, id: n };
|
|
1064
|
+
let i;
|
|
1065
|
+
try {
|
|
1066
|
+
o = !1, i = u();
|
|
1067
|
+
} catch (c) {
|
|
1068
|
+
if (c !== aa)
|
|
1069
|
+
throw c;
|
|
1070
|
+
o = !0;
|
|
1071
|
+
} finally {
|
|
1072
|
+
re.c = null;
|
|
1073
|
+
}
|
|
1074
|
+
return i;
|
|
1075
|
+
}, cleanEffects: (u) => (s(Bt, u), () => (s(la, u), () => {
|
|
1076
|
+
s(Et, u);
|
|
1077
|
+
})), isSuspense: l };
|
|
1078
|
+
}, de = Symbol.for;
|
|
1079
|
+
function zt(e, t) {
|
|
1080
|
+
const n = e.length;
|
|
1081
|
+
if (n !== t.length)
|
|
1082
|
+
return !1;
|
|
1083
|
+
for (let a = 0; a < n; a++) {
|
|
1084
|
+
let o = e[a], l = t[a];
|
|
1085
|
+
if (o !== l)
|
|
1086
|
+
return !1;
|
|
1087
|
+
}
|
|
1088
|
+
return !0;
|
|
1089
|
+
}
|
|
1090
|
+
const W = (e) => typeof e == "function", me = (e) => typeof e == "object", { isArray: ia } = Array, Ke = (e, t) => (t ? e instanceof HTMLStyleElement : !0) && "hydrate" in ((e == null ? void 0 : e.dataset) || {});
|
|
1091
|
+
function Pt(e, t) {
|
|
1092
|
+
let n;
|
|
1093
|
+
const a = (o) => {
|
|
1094
|
+
let { length: l } = o;
|
|
1095
|
+
for (let s = 0; s < l; s++) {
|
|
1096
|
+
const u = o[s];
|
|
1097
|
+
if (u && Array.isArray(u))
|
|
1098
|
+
a(u);
|
|
1099
|
+
else {
|
|
1100
|
+
const i = typeof u;
|
|
1101
|
+
if (u == null || i === "function" || i === "boolean")
|
|
1102
|
+
continue;
|
|
1103
|
+
i === "string" || i === "number" ? (n == null && (n = ""), n += u) : (n != null && (t(n), n = null), t(u));
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
};
|
|
1107
|
+
a(e), n != null && t(n);
|
|
1108
|
+
}
|
|
1109
|
+
const Ot = (e, t, n) => (e.addEventListener(t, n), () => e.removeEventListener(t, n));
|
|
1110
|
+
class Nt {
|
|
1111
|
+
/**
|
|
1112
|
+
*
|
|
1113
|
+
* @param {HTMLElement} target
|
|
1114
|
+
* @param {string} message
|
|
1115
|
+
* @param {string} value
|
|
1116
|
+
*/
|
|
1117
|
+
constructor(t, n, a) {
|
|
1118
|
+
this.message = n, this.target = t, this.value = a;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
class At extends Nt {
|
|
1122
|
+
}
|
|
1123
|
+
class ra extends Nt {
|
|
1124
|
+
}
|
|
1125
|
+
const De = "Custom", ua = null, ca = { true: 1, "": 1, 1: 1 };
|
|
1126
|
+
function da(e, t, n, a, o) {
|
|
1127
|
+
const {
|
|
1128
|
+
type: l,
|
|
1129
|
+
reflect: s,
|
|
1130
|
+
event: u,
|
|
1131
|
+
value: i,
|
|
1132
|
+
attr: c = fa(t)
|
|
1133
|
+
} = (n == null ? void 0 : n.name) != De && me(n) && n != ua ? n : { type: n }, m = (l == null ? void 0 : l.name) === De && l.map, w = i != null ? l == Function || !W(i) ? () => i : i : null;
|
|
1134
|
+
Object.defineProperty(e, t, {
|
|
1135
|
+
configurable: !0,
|
|
1136
|
+
/**
|
|
1137
|
+
* @this {import("dom").AtomicoThisInternal}
|
|
1138
|
+
* @param {any} newValue
|
|
1139
|
+
*/
|
|
1140
|
+
set(g) {
|
|
1141
|
+
const y = this[t];
|
|
1142
|
+
w && l != Boolean && g == null && (g = w());
|
|
1143
|
+
const { error: S, value: D } = (m ? ha : va)(
|
|
1144
|
+
l,
|
|
1145
|
+
g
|
|
1146
|
+
);
|
|
1147
|
+
if (S && D != null)
|
|
1148
|
+
throw new At(
|
|
1149
|
+
this,
|
|
1150
|
+
`The value defined for prop '${t}' must be of type '${l.name}'`,
|
|
1151
|
+
D
|
|
1152
|
+
);
|
|
1153
|
+
y != D && (this._props[t] = D ?? void 0, this.update(), u && Lt(this, u), this.updated.then(() => {
|
|
1154
|
+
s && (this._ignoreAttr = c, ma(this, l, c, this[t]), this._ignoreAttr = null);
|
|
1155
|
+
}));
|
|
1073
1156
|
},
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1157
|
+
/**
|
|
1158
|
+
* @this {import("dom").AtomicoThisInternal}
|
|
1159
|
+
*/
|
|
1160
|
+
get() {
|
|
1161
|
+
return this._props[t];
|
|
1077
1162
|
}
|
|
1078
|
-
},
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1163
|
+
}), w && (o[t] = w()), a[c] = { prop: t, type: l };
|
|
1164
|
+
}
|
|
1165
|
+
const Lt = (e, { type: t, base: n = CustomEvent, ...a }) => e.dispatchEvent(new n(t, a)), fa = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase(), ma = (e, t, n, a) => a == null || t == Boolean && !a ? e.removeAttribute(n) : e.setAttribute(
|
|
1166
|
+
n,
|
|
1167
|
+
(t == null ? void 0 : t.name) === De && (t != null && t.serialize) ? t == null ? void 0 : t.serialize(a) : me(a) ? JSON.stringify(a) : t == Boolean ? "" : a
|
|
1168
|
+
), pa = (e, t) => e == Boolean ? !!ca[t] : e == Number ? Number(t) : e == String ? t : e == Array || e == Object ? JSON.parse(t) : e.name == De ? t : (
|
|
1169
|
+
// TODO: If when defining reflect the prop can also be of type string?
|
|
1170
|
+
new e(t)
|
|
1171
|
+
), ha = ({ map: e }, t) => {
|
|
1172
|
+
try {
|
|
1173
|
+
return { value: e(t), error: !1 };
|
|
1174
|
+
} catch {
|
|
1175
|
+
return { value: t, error: !0 };
|
|
1176
|
+
}
|
|
1177
|
+
}, va = (e, t) => e == null || t == null ? { value: t, error: !1 } : e != String && t === "" ? { value: void 0, error: !1 } : e == Object || e == Array || e == Symbol ? {
|
|
1178
|
+
value: t,
|
|
1179
|
+
error: {}.toString.call(t) !== `[object ${e.name}]`
|
|
1180
|
+
} : t instanceof e ? {
|
|
1181
|
+
value: t,
|
|
1182
|
+
error: e == Number && Number.isNaN(t.valueOf())
|
|
1183
|
+
} : e == String || e == Number || e == Boolean ? {
|
|
1184
|
+
value: t,
|
|
1185
|
+
error: e == Number ? typeof t != "number" ? !0 : Number.isNaN(t) : e == String ? typeof t != "string" : typeof t != "boolean"
|
|
1186
|
+
} : { value: t, error: !0 };
|
|
1187
|
+
let ga = 0;
|
|
1188
|
+
const ya = (e) => {
|
|
1189
|
+
var n;
|
|
1190
|
+
return ((n = (e == null ? void 0 : e.dataset) || {}) == null ? void 0 : n.hydrate) || "" || "c" + ga++;
|
|
1191
|
+
}, ke = (e, t = HTMLElement) => {
|
|
1192
|
+
const n = {}, a = {}, o = "prototype" in t && t.prototype instanceof Element, l = o ? t : "base" in t ? t.base : HTMLElement, { props: s, styles: u } = o ? e : t;
|
|
1193
|
+
class i extends l {
|
|
1194
|
+
constructor() {
|
|
1195
|
+
super(), this._setup(), this._render = () => e({ ...this._props });
|
|
1196
|
+
for (const m in a)
|
|
1197
|
+
this[m] = a[m];
|
|
1198
|
+
}
|
|
1199
|
+
/**
|
|
1200
|
+
* @returns {import("core").Sheets[]}
|
|
1201
|
+
*/
|
|
1202
|
+
static get styles() {
|
|
1203
|
+
return [super.styles, u];
|
|
1204
|
+
}
|
|
1205
|
+
async _setup() {
|
|
1206
|
+
if (this._props)
|
|
1207
|
+
return;
|
|
1208
|
+
this._props = {};
|
|
1209
|
+
let m, w;
|
|
1210
|
+
this.mounted = new Promise(
|
|
1211
|
+
(k) => this.mount = () => {
|
|
1212
|
+
k(), m != this.parentNode && (w != m ? this.unmounted.then(this.update) : this.update()), m = this.parentNode;
|
|
1213
|
+
}
|
|
1214
|
+
), this.unmounted = new Promise(
|
|
1215
|
+
(k) => this.unmount = () => {
|
|
1216
|
+
k(), (m != this.parentNode || !this.isConnected) && (g.cleanEffects(!0)()(), w = this.parentNode, m = null);
|
|
1217
|
+
}
|
|
1218
|
+
), this.symbolId = this.symbolId || Symbol(), this.symbolIdParent = Symbol();
|
|
1219
|
+
const g = sa(
|
|
1220
|
+
() => this.update(),
|
|
1221
|
+
this,
|
|
1222
|
+
ya(this)
|
|
1223
|
+
);
|
|
1224
|
+
let y, S = !0;
|
|
1225
|
+
const D = Ke(this);
|
|
1226
|
+
this.update = () => (y || (y = !0, this.updated = (this.updated || this.mounted).then(() => {
|
|
1227
|
+
try {
|
|
1228
|
+
const k = g.load(this._render), C = g.cleanEffects();
|
|
1229
|
+
return k && //@ts-ignore
|
|
1230
|
+
k.render(this, this.symbolId, D), y = !1, S && !g.isSuspense() && (S = !1, !D && ba(this)), C();
|
|
1231
|
+
} finally {
|
|
1232
|
+
y = !1;
|
|
1233
|
+
}
|
|
1234
|
+
}).then(
|
|
1235
|
+
/**
|
|
1236
|
+
* @param {import("internal/hooks.js").CleanUseEffects} [cleanUseEffect]
|
|
1237
|
+
*/
|
|
1238
|
+
(k) => {
|
|
1239
|
+
k && k();
|
|
1240
|
+
}
|
|
1241
|
+
)), this.updated), this.update();
|
|
1242
|
+
}
|
|
1243
|
+
connectedCallback() {
|
|
1244
|
+
this.mount(), super.connectedCallback && super.connectedCallback();
|
|
1245
|
+
}
|
|
1246
|
+
disconnectedCallback() {
|
|
1247
|
+
super.disconnectedCallback && super.disconnectedCallback(), this.unmount();
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* @this {import("dom").AtomicoThisInternal}
|
|
1251
|
+
* @param {string} attr
|
|
1252
|
+
* @param {(string|null)} oldValue
|
|
1253
|
+
* @param {(string|null)} value
|
|
1254
|
+
*/
|
|
1255
|
+
attributeChangedCallback(m, w, g) {
|
|
1256
|
+
if (n[m]) {
|
|
1257
|
+
if (m === this._ignoreAttr || w === g)
|
|
1258
|
+
return;
|
|
1259
|
+
const { prop: y, type: S } = n[m];
|
|
1260
|
+
try {
|
|
1261
|
+
this[y] = pa(S, g);
|
|
1262
|
+
} catch {
|
|
1263
|
+
throw new ra(
|
|
1264
|
+
this,
|
|
1265
|
+
`The value defined as attr '${m}' cannot be parsed by type '${S.name}'`,
|
|
1266
|
+
g
|
|
1267
|
+
);
|
|
1268
|
+
}
|
|
1269
|
+
} else
|
|
1270
|
+
super.attributeChangedCallback(m, w, g);
|
|
1271
|
+
}
|
|
1272
|
+
static get props() {
|
|
1273
|
+
return { ...super.props, ...s };
|
|
1274
|
+
}
|
|
1275
|
+
static get observedAttributes() {
|
|
1276
|
+
const m = super.observedAttributes || [];
|
|
1277
|
+
for (const w in s)
|
|
1278
|
+
da(this.prototype, w, s[w], n, a);
|
|
1279
|
+
return Object.keys(n).concat(m);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
return i;
|
|
1283
|
+
};
|
|
1284
|
+
function ba(e) {
|
|
1285
|
+
const { styles: t } = e.constructor, { shadowRoot: n } = e;
|
|
1286
|
+
if (n && t.length) {
|
|
1287
|
+
const a = [];
|
|
1288
|
+
Pt(t, (o) => {
|
|
1289
|
+
o && (o instanceof Element ? n.appendChild(o.cloneNode(!0)) : a.push(o));
|
|
1290
|
+
}), a.length && (n.adoptedStyleSheets = a);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
const Ut = (e) => (t, n) => {
|
|
1294
|
+
ce(
|
|
1295
|
+
/**
|
|
1296
|
+
* Clean the effect hook
|
|
1297
|
+
* @type {import("internal/hooks.js").CollectorEffect}
|
|
1298
|
+
*/
|
|
1299
|
+
([a, o] = []) => ((o || !o) && (o && zt(o, n) ? a = a || !0 : (W(a) && a(), a = null)), [a, n]),
|
|
1300
|
+
/**
|
|
1301
|
+
* @returns {any}
|
|
1302
|
+
*/
|
|
1303
|
+
([a, o], l) => l ? (W(a) && a(), []) : [a || t(), o],
|
|
1304
|
+
e
|
|
1305
|
+
);
|
|
1306
|
+
}, ve = Ut(Et), wa = Ut(Bt);
|
|
1307
|
+
class jt extends Array {
|
|
1308
|
+
/**
|
|
1309
|
+
*
|
|
1310
|
+
* @param {any} initialState
|
|
1311
|
+
* @param {(nextState: any, state:any[], mount: boolean )=>void} mapState
|
|
1312
|
+
*/
|
|
1313
|
+
constructor(t, n) {
|
|
1314
|
+
let a = !0;
|
|
1315
|
+
const o = (l) => {
|
|
1316
|
+
try {
|
|
1317
|
+
n(l, this, a);
|
|
1318
|
+
} finally {
|
|
1319
|
+
a = !1;
|
|
1086
1320
|
}
|
|
1321
|
+
};
|
|
1322
|
+
super(void 0, o, n), o(t);
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* The following code allows a mutable approach to useState
|
|
1326
|
+
* and useProp this with the idea of allowing an alternative
|
|
1327
|
+
* approach similar to Vue or Qwik of state management
|
|
1328
|
+
* @todo pending review with the community
|
|
1329
|
+
*/
|
|
1330
|
+
// get value() {
|
|
1331
|
+
// return this[0];
|
|
1332
|
+
// }
|
|
1333
|
+
// set value(nextState) {
|
|
1334
|
+
// this[2](nextState, this);
|
|
1335
|
+
// }
|
|
1336
|
+
}
|
|
1337
|
+
const Ge = (e) => {
|
|
1338
|
+
const t = Vt();
|
|
1339
|
+
return ce(
|
|
1340
|
+
(n = new jt(e, (a, o, l) => {
|
|
1341
|
+
a = W(a) ? a(o[0]) : a, a !== o[0] && (o[0] = a, l || t());
|
|
1342
|
+
})) => n
|
|
1343
|
+
);
|
|
1344
|
+
}, J = (e, t) => {
|
|
1345
|
+
const [n] = ce(([a, o, l = 0] = []) => ((!o || o && !zt(o, t)) && (a = e()), [a, t, l]));
|
|
1346
|
+
return n;
|
|
1347
|
+
}, Qe = (e) => {
|
|
1348
|
+
const { current: t } = xe();
|
|
1349
|
+
if (!(e in t))
|
|
1350
|
+
throw new At(
|
|
1351
|
+
t,
|
|
1352
|
+
`For useProp("${e}"), the prop does not exist on the host.`,
|
|
1353
|
+
e
|
|
1087
1354
|
);
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1355
|
+
return ce(
|
|
1356
|
+
(n = new jt(t[e], (a, o) => {
|
|
1357
|
+
a = W(a) ? a(t[e]) : a, t[e] = a;
|
|
1358
|
+
})) => (n[0] = t[e], n)
|
|
1359
|
+
);
|
|
1360
|
+
}, X = (e, t = {}) => {
|
|
1361
|
+
const n = xe();
|
|
1362
|
+
return n[e] || (n[e] = (a = t.detail) => Lt(n.current, {
|
|
1363
|
+
type: e,
|
|
1364
|
+
...t,
|
|
1365
|
+
detail: a
|
|
1366
|
+
})), n[e];
|
|
1367
|
+
}, Ye = de("atomico/options");
|
|
1368
|
+
globalThis[Ye] = globalThis[Ye] || {
|
|
1369
|
+
sheet: !!document.adoptedStyleSheets
|
|
1370
|
+
};
|
|
1371
|
+
const Ft = globalThis[Ye], xa = {
|
|
1372
|
+
checked: 1,
|
|
1373
|
+
value: 1,
|
|
1374
|
+
selected: 1
|
|
1375
|
+
}, ka = {
|
|
1376
|
+
list: 1,
|
|
1377
|
+
type: 1,
|
|
1378
|
+
size: 1,
|
|
1379
|
+
form: 1,
|
|
1380
|
+
width: 1,
|
|
1381
|
+
height: 1,
|
|
1382
|
+
src: 1,
|
|
1383
|
+
href: 1,
|
|
1384
|
+
slot: 1
|
|
1385
|
+
}, $a = {
|
|
1386
|
+
shadowDom: 1,
|
|
1387
|
+
staticNode: 1,
|
|
1388
|
+
cloneNode: 1,
|
|
1389
|
+
children: 1,
|
|
1390
|
+
key: 1
|
|
1391
|
+
}, Se = {}, Je = [];
|
|
1392
|
+
class Xe extends Text {
|
|
1393
|
+
}
|
|
1394
|
+
const Sa = de("atomico/id"), pe = de("atomico/type"), Le = de("atomico/ref"), Rt = de("atomico/vnode"), Ca = () => {
|
|
1395
|
+
};
|
|
1396
|
+
function Da(e, t, n) {
|
|
1397
|
+
return Ht(this, e, t, n);
|
|
1398
|
+
}
|
|
1399
|
+
const qt = (e, t, ...n) => {
|
|
1400
|
+
const a = t || Se;
|
|
1401
|
+
let { children: o } = a;
|
|
1402
|
+
if (o = o ?? (n.length ? n : Je), e === Ca)
|
|
1403
|
+
return o;
|
|
1404
|
+
const l = e ? e instanceof Node ? 1 : (
|
|
1405
|
+
//@ts-ignore
|
|
1406
|
+
e.prototype instanceof HTMLElement && 2
|
|
1407
|
+
) : 0;
|
|
1408
|
+
if (l === !1 && e instanceof Function)
|
|
1409
|
+
return e(
|
|
1410
|
+
o != Je ? { children: o, ...a } : a
|
|
1094
1411
|
);
|
|
1095
|
-
|
|
1096
|
-
|
|
1412
|
+
const s = Ft.render || Da;
|
|
1413
|
+
return {
|
|
1414
|
+
[pe]: Rt,
|
|
1415
|
+
type: e,
|
|
1416
|
+
props: a,
|
|
1417
|
+
children: o,
|
|
1418
|
+
key: a.key,
|
|
1419
|
+
// key for lists by keys
|
|
1420
|
+
// define if the node declares its shadowDom
|
|
1421
|
+
shadow: a.shadowDom,
|
|
1422
|
+
// allows renderings to run only once
|
|
1423
|
+
static: a.staticNode,
|
|
1424
|
+
// defines whether the type is a childNode `1` or a constructor `2`
|
|
1425
|
+
raw: l,
|
|
1426
|
+
// defines whether to use the second parameter for document.createElement
|
|
1427
|
+
is: a.is,
|
|
1428
|
+
// clone the node if it comes from a reference
|
|
1429
|
+
clone: a.cloneNode,
|
|
1430
|
+
render: s
|
|
1431
|
+
};
|
|
1432
|
+
};
|
|
1433
|
+
function Ht(e, t, n = Sa, a, o) {
|
|
1434
|
+
let l;
|
|
1435
|
+
if (t && t[n] && t[n].vnode == e || e[pe] != Rt)
|
|
1436
|
+
return t;
|
|
1437
|
+
(e || !t) && (o = o || e.type == "svg", l = e.type != "host" && (e.raw == 1 ? (t && e.clone ? t[Le] : t) != e.type : e.raw == 2 ? !(t instanceof e.type) : t ? t[Le] || t.localName != e.type : !t), l && e.type != null && (e.raw == 1 && e.clone ? (a = !0, t = e.type.cloneNode(!0), t[Le] = e.type) : t = e.raw == 1 ? e.type : e.raw == 2 ? new e.type() : o ? document.createElementNS(
|
|
1438
|
+
"http://www.w3.org/2000/svg",
|
|
1439
|
+
e.type
|
|
1440
|
+
) : document.createElement(
|
|
1441
|
+
e.type,
|
|
1442
|
+
e.is ? { is: e.is } : void 0
|
|
1443
|
+
)));
|
|
1444
|
+
const s = t[n] ? t[n] : Se, { vnode: u = Se, cycle: i = 0 } = s;
|
|
1445
|
+
let { fragment: c, handlers: m } = s;
|
|
1446
|
+
const { children: w = Je, props: g = Se } = u;
|
|
1447
|
+
if (m = l ? {} : m || {}, e.static && !l)
|
|
1448
|
+
return t;
|
|
1449
|
+
if (e.shadow && !t.shadowRoot && // @ts-ignore
|
|
1450
|
+
t.attachShadow({ mode: "open", ...e.shadow }), e.props != g && Ia(t, g, e.props, m, o), e.children !== w) {
|
|
1451
|
+
const y = e.shadow ? t.shadowRoot : t;
|
|
1452
|
+
c = Ma(
|
|
1453
|
+
e.children,
|
|
1454
|
+
/**
|
|
1455
|
+
* @todo for hydration use attribute and send childNodes
|
|
1456
|
+
*/
|
|
1457
|
+
c,
|
|
1458
|
+
y,
|
|
1459
|
+
n,
|
|
1460
|
+
// add support to foreignObject, children will escape from svg
|
|
1461
|
+
!i && a,
|
|
1462
|
+
o && e.type == "foreignObject" ? !1 : o
|
|
1097
1463
|
);
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1464
|
+
}
|
|
1465
|
+
return t[n] = { vnode: e, handlers: m, fragment: c, cycle: i + 1 }, t;
|
|
1466
|
+
}
|
|
1467
|
+
function Ta(e, t) {
|
|
1468
|
+
const n = new Xe(""), a = new Xe("");
|
|
1469
|
+
let o;
|
|
1470
|
+
if (e[t ? "prepend" : "append"](n), t) {
|
|
1471
|
+
let { lastElementChild: l } = e;
|
|
1472
|
+
for (; l; ) {
|
|
1473
|
+
const { previousElementSibling: s } = l;
|
|
1474
|
+
if (Ke(l, !0) && !Ke(s, !0)) {
|
|
1475
|
+
o = l;
|
|
1476
|
+
break;
|
|
1477
|
+
}
|
|
1478
|
+
l = s;
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
return o ? o.before(a) : e.append(a), {
|
|
1482
|
+
markStart: n,
|
|
1483
|
+
markEnd: a
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
function Ma(e, t, n, a, o, l) {
|
|
1487
|
+
e = e == null ? null : ia(e) ? e : [e];
|
|
1488
|
+
const s = t || Ta(n, o), { markStart: u, markEnd: i, keyes: c } = s;
|
|
1489
|
+
let m;
|
|
1490
|
+
const w = c && /* @__PURE__ */ new Set();
|
|
1491
|
+
let g = u;
|
|
1492
|
+
if (e && Pt(e, (y) => {
|
|
1493
|
+
if (typeof y == "object" && !y[pe])
|
|
1494
|
+
return;
|
|
1495
|
+
const S = y[pe] && y.key, D = c && S != null && c.get(S);
|
|
1496
|
+
g != i && g === D ? w.delete(g) : g = g == i ? i : g.nextSibling;
|
|
1497
|
+
const k = c ? D : g;
|
|
1498
|
+
let C = k;
|
|
1499
|
+
if (y[pe])
|
|
1500
|
+
C = Ht(y, k, a, o, l);
|
|
1501
|
+
else {
|
|
1502
|
+
const z = y + "";
|
|
1503
|
+
!(C instanceof Text) || C instanceof Xe ? C = new Text(z) : C.data != z && (C.data = z);
|
|
1504
|
+
}
|
|
1505
|
+
C != g && (c && w.delete(C), !k || c ? (n.insertBefore(C, g), c && g != i && w.add(g)) : k == i ? n.insertBefore(C, i) : (n.replaceChild(C, k), g = C)), S != null && (m = m || /* @__PURE__ */ new Map(), m.set(S, C));
|
|
1506
|
+
}), g = g == i ? i : g.nextSibling, t && g != i)
|
|
1507
|
+
for (; g != i; ) {
|
|
1508
|
+
const y = g;
|
|
1509
|
+
g = g.nextSibling, y.remove();
|
|
1510
|
+
}
|
|
1511
|
+
return w && w.forEach((y) => y.remove()), s.keyes = m, s;
|
|
1512
|
+
}
|
|
1513
|
+
function Ia(e, t, n, a, o) {
|
|
1514
|
+
for (const l in t)
|
|
1515
|
+
!(l in n) && vt(e, l, t[l], null, o, a);
|
|
1516
|
+
for (const l in n)
|
|
1517
|
+
vt(e, l, t[l], n[l], o, a);
|
|
1518
|
+
}
|
|
1519
|
+
function vt(e, t, n, a, o, l) {
|
|
1520
|
+
if (t = t == "class" && !o ? "className" : t, n = n ?? null, a = a ?? null, t in e && xa[t] && (n = e[t]), !(a === n || $a[t] || t[0] == "_"))
|
|
1521
|
+
if (t[0] == "o" && t[1] == "n" && (W(a) || W(n)))
|
|
1522
|
+
Ea(e, t.slice(2), a, l);
|
|
1523
|
+
else if (t == "ref")
|
|
1524
|
+
a && (W(a) ? a(e) : a.current = e);
|
|
1525
|
+
else if (t == "style") {
|
|
1526
|
+
const { style: s } = e;
|
|
1527
|
+
n = n || "", a = a || "";
|
|
1528
|
+
const u = me(n), i = me(a);
|
|
1529
|
+
if (u)
|
|
1530
|
+
for (const c in n)
|
|
1531
|
+
if (i)
|
|
1532
|
+
!(c in a) && gt(s, c, null);
|
|
1533
|
+
else
|
|
1534
|
+
break;
|
|
1535
|
+
if (i)
|
|
1536
|
+
for (const c in a) {
|
|
1537
|
+
const m = a[c];
|
|
1538
|
+
u && n[c] === m || gt(s, c, m);
|
|
1539
|
+
}
|
|
1540
|
+
else
|
|
1541
|
+
s.cssText = a;
|
|
1542
|
+
} else {
|
|
1543
|
+
const s = t[0] == "$" ? t.slice(1) : t;
|
|
1544
|
+
s === t && (!o && !ka[t] && t in e || W(a) || W(n)) ? e[t] = a ?? "" : a == null ? e.removeAttribute(s) : e.setAttribute(
|
|
1545
|
+
s,
|
|
1546
|
+
me(a) ? JSON.stringify(a) : a
|
|
1105
1547
|
);
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
)
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
function Ea(e, t, n, a) {
|
|
1551
|
+
if (a.handleEvent || (a.handleEvent = (o) => a[o.type].call(e, o)), n) {
|
|
1552
|
+
if (!a[t]) {
|
|
1553
|
+
const o = n.capture || n.once || n.passive ? Object.assign({}, n) : null;
|
|
1554
|
+
e.addEventListener(t, a, o);
|
|
1555
|
+
}
|
|
1556
|
+
a[t] = n;
|
|
1557
|
+
} else
|
|
1558
|
+
a[t] && (e.removeEventListener(t, a), delete a[t]);
|
|
1559
|
+
}
|
|
1560
|
+
function gt(e, t, n) {
|
|
1561
|
+
let a = "setProperty";
|
|
1562
|
+
n == null && (a = "removeProperty", n = null), ~t.indexOf("-") ? e[a](t, n) : e[t] = n;
|
|
1563
|
+
}
|
|
1564
|
+
const yt = {};
|
|
1565
|
+
function Me(e, ...t) {
|
|
1566
|
+
const n = (e.raw || e).reduce(
|
|
1567
|
+
(a, o, l) => a + o + (t[l] || ""),
|
|
1568
|
+
""
|
|
1569
|
+
);
|
|
1570
|
+
return yt[n] = yt[n] || Ba(n);
|
|
1571
|
+
}
|
|
1572
|
+
function Ba(e) {
|
|
1573
|
+
if (Ft.sheet) {
|
|
1574
|
+
const t = new CSSStyleSheet();
|
|
1575
|
+
return t.replaceSync(e), t;
|
|
1576
|
+
} else {
|
|
1577
|
+
const t = document.createElement("style");
|
|
1578
|
+
return t.textContent = e, t;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
const Va = qt("host", { style: "display: contents" }), Ue = de("atomico/context"), za = (e, t) => {
|
|
1582
|
+
const n = xe();
|
|
1583
|
+
wa(
|
|
1584
|
+
() => Ot(
|
|
1585
|
+
n.current,
|
|
1586
|
+
"ConnectContext",
|
|
1587
|
+
/**
|
|
1588
|
+
* @param {CustomEvent<import("context").DetailConnectContext>} event
|
|
1589
|
+
*/
|
|
1590
|
+
(a) => {
|
|
1591
|
+
e === a.detail.id && (a.stopPropagation(), a.detail.connect(t));
|
|
1133
1592
|
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
F(), Se();
|
|
1148
|
-
}, Se = () => o.value = !1, Ce = () => {
|
|
1149
|
-
l.value = e.range ? { start: null, end: null } : null, r.value = e.range ? { start: null, end: null } : null, F();
|
|
1150
|
-
}, xe = (g) => {
|
|
1151
|
-
e.range ? l.value.start && l.value.end ? l.value = { start: g, end: null } : l.value.start ? l.value.end = g : l.value.start = g : l.value = g, F();
|
|
1152
|
-
}, Ie = (g) => (g = k(g), e.range ? l.value.start && V(l.value.start) && g.getTime() === l.value.start.getTime() || l.value.end && V(l.value.end) && g.getTime() === l.value.end.getTime() : V(l.value) && g.getTime() === l.value.getTime()), Me = (g) => {
|
|
1153
|
-
g = k(g);
|
|
1154
|
-
const h = /* @__PURE__ */ new Date();
|
|
1155
|
-
return g.getDate() === h.getDate() && g.getMonth() === h.getMonth() && g.getFullYear() === h.getFullYear();
|
|
1156
|
-
}, De = (g) => (g = k(g), e.range && V(l.value.start) && g.getTime() === l.value.start.getTime()), Te = (g) => (g = k(g), e.range && V(l.value.end) && g.getTime() === l.value.end.getTime()), Ve = (g) => {
|
|
1157
|
-
if (g = k(g), e.range && V(l.value.start) && V(l.value.end)) {
|
|
1158
|
-
const h = l.value.start.getTime(), c = l.value.end.getTime(), G = g.getTime();
|
|
1159
|
-
return G > h && G < c;
|
|
1593
|
+
),
|
|
1594
|
+
[e]
|
|
1595
|
+
);
|
|
1596
|
+
}, Pa = (e) => {
|
|
1597
|
+
const t = X("ConnectContext", {
|
|
1598
|
+
bubbles: !0,
|
|
1599
|
+
composed: !0
|
|
1600
|
+
}), n = () => {
|
|
1601
|
+
let l;
|
|
1602
|
+
return t({
|
|
1603
|
+
id: e,
|
|
1604
|
+
connect(s) {
|
|
1605
|
+
l = s;
|
|
1160
1606
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1607
|
+
}), l;
|
|
1608
|
+
}, [a, o] = Ge(
|
|
1609
|
+
n
|
|
1610
|
+
);
|
|
1611
|
+
return ve(() => {
|
|
1612
|
+
a || (e[Ue] || (e[Ue] = customElements.whenDefined(
|
|
1613
|
+
new e().localName
|
|
1614
|
+
)), e[Ue].then(
|
|
1615
|
+
() => o(n)
|
|
1616
|
+
));
|
|
1617
|
+
}, [e]), a;
|
|
1618
|
+
}, Oa = (e) => {
|
|
1619
|
+
const t = Pa(e), n = Vt();
|
|
1620
|
+
return ve(() => {
|
|
1621
|
+
if (t)
|
|
1622
|
+
return Ot(t, "UpdatedValue", n);
|
|
1623
|
+
}, [t]), (t || e).value;
|
|
1624
|
+
}, Na = (e) => {
|
|
1625
|
+
const t = ke(
|
|
1626
|
+
() => (za(t, xe().current), Va),
|
|
1627
|
+
{
|
|
1628
|
+
props: {
|
|
1629
|
+
value: {
|
|
1630
|
+
type: Object,
|
|
1631
|
+
event: { type: "UpdatedValue" },
|
|
1632
|
+
value: () => e
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
);
|
|
1637
|
+
return t.value = e, t;
|
|
1638
|
+
}, N = (e, t, n) => (t == null ? t = { key: n } : t.key = n, qt(e, t)), he = N, _t = Me`*,*:before,*:after{box-sizing:border-box}button{padding:0;touch-action:manipulation;cursor:pointer;user-select:none}`, Wt = Me`.vh{position:absolute;transform:scale(0)}`;
|
|
1639
|
+
function et() {
|
|
1640
|
+
const e = /* @__PURE__ */ new Date();
|
|
1641
|
+
return new L(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
1642
|
+
}
|
|
1643
|
+
function tt(e, t = 0) {
|
|
1644
|
+
const n = _(e), a = n.getUTCDay(), o = (a < t ? 7 : 0) + a - t;
|
|
1645
|
+
return n.setUTCDate(n.getUTCDate() - o), L.from(n);
|
|
1646
|
+
}
|
|
1647
|
+
function Zt(e, t = 0) {
|
|
1648
|
+
return tt(e, t).add({ days: 6 });
|
|
1649
|
+
}
|
|
1650
|
+
function Kt(e) {
|
|
1651
|
+
return L.from(new Date(Date.UTC(e.year, e.month, 0)));
|
|
1652
|
+
}
|
|
1653
|
+
function Ie(e, t, n) {
|
|
1654
|
+
return t && L.compare(e, t) < 0 ? t : n && L.compare(e, n) > 0 ? n : e;
|
|
1655
|
+
}
|
|
1656
|
+
const Aa = { days: 1 };
|
|
1657
|
+
function La(e, t = 0) {
|
|
1658
|
+
let n = tt(e.toPlainDate(), t);
|
|
1659
|
+
const a = Zt(Kt(e), t), o = [];
|
|
1660
|
+
for (; L.compare(n, a) < 0; ) {
|
|
1661
|
+
const l = [];
|
|
1662
|
+
for (let s = 0; s < 7; s++)
|
|
1663
|
+
l.push(n), n = n.add(Aa);
|
|
1664
|
+
o.push(l);
|
|
1665
|
+
}
|
|
1666
|
+
return o;
|
|
1667
|
+
}
|
|
1668
|
+
function _(e) {
|
|
1669
|
+
return new Date(Date.UTC(e.year, e.month - 1, e.day ?? 1));
|
|
1670
|
+
}
|
|
1671
|
+
const Ua = /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[0-1])$/, je = (e, t) => e.toString().padStart(t, "0");
|
|
1672
|
+
class L {
|
|
1673
|
+
constructor(t, n, a) {
|
|
1674
|
+
this.year = t, this.month = n, this.day = a;
|
|
1675
|
+
}
|
|
1676
|
+
// this is an incomplete implementation that only handles arithmetic on a single unit at a time.
|
|
1677
|
+
// i didn't want to get into more complex arithmetic since it get tricky fast
|
|
1678
|
+
// this is enough to serve my needs and will still be a drop-in replacement when actual Temporal API lands
|
|
1679
|
+
add(t) {
|
|
1680
|
+
const n = _(this);
|
|
1681
|
+
if ("days" in t)
|
|
1682
|
+
return n.setUTCDate(this.day + t.days), L.from(n);
|
|
1683
|
+
let { year: a, month: o } = this;
|
|
1684
|
+
"months" in t ? (o = this.month + t.months, n.setUTCMonth(o - 1)) : (a = this.year + t.years, n.setUTCFullYear(a));
|
|
1685
|
+
const l = L.from(_({ year: a, month: o, day: 1 }));
|
|
1686
|
+
return Ie(L.from(n), l, Kt(l));
|
|
1687
|
+
}
|
|
1688
|
+
toString() {
|
|
1689
|
+
return `${je(this.year, 4)}-${je(this.month, 2)}-${je(this.day, 2)}`;
|
|
1690
|
+
}
|
|
1691
|
+
toPlainYearMonth() {
|
|
1692
|
+
return new Ee(this.year, this.month);
|
|
1693
|
+
}
|
|
1694
|
+
equals(t) {
|
|
1695
|
+
return L.compare(this, t) === 0;
|
|
1696
|
+
}
|
|
1697
|
+
static compare(t, n) {
|
|
1698
|
+
return t.year < n.year ? -1 : t.year > n.year ? 1 : t.month < n.month ? -1 : t.month > n.month ? 1 : t.day < n.day ? -1 : t.day > n.day ? 1 : 0;
|
|
1699
|
+
}
|
|
1700
|
+
static from(t) {
|
|
1701
|
+
if (typeof t == "string") {
|
|
1702
|
+
const n = t.match(Ua);
|
|
1703
|
+
if (!n)
|
|
1704
|
+
throw new TypeError(t);
|
|
1705
|
+
const [, a, o, l] = n;
|
|
1706
|
+
return new L(
|
|
1707
|
+
parseInt(a, 10),
|
|
1708
|
+
parseInt(o, 10),
|
|
1709
|
+
parseInt(l, 10)
|
|
1710
|
+
);
|
|
1711
|
+
}
|
|
1712
|
+
return new L(
|
|
1713
|
+
t.getUTCFullYear(),
|
|
1714
|
+
t.getUTCMonth() + 1,
|
|
1715
|
+
t.getUTCDate()
|
|
1716
|
+
);
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
class Ee {
|
|
1720
|
+
constructor(t, n) {
|
|
1721
|
+
this.year = t, this.month = n;
|
|
1722
|
+
}
|
|
1723
|
+
add(t) {
|
|
1724
|
+
const n = _(this), a = (t.months ?? 0) + (t.years ?? 0) * 12;
|
|
1725
|
+
return n.setUTCMonth(n.getUTCMonth() + a), new Ee(n.getUTCFullYear(), n.getUTCMonth() + 1);
|
|
1726
|
+
}
|
|
1727
|
+
equals(t) {
|
|
1728
|
+
return this.year === t.year && this.month === t.month;
|
|
1729
|
+
}
|
|
1730
|
+
toPlainDate() {
|
|
1731
|
+
return new L(this.year, this.month, 1);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
function Te(e, t) {
|
|
1735
|
+
if (t)
|
|
1736
|
+
try {
|
|
1737
|
+
return e.from(t);
|
|
1738
|
+
} catch {
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
function G(e) {
|
|
1742
|
+
const [t, n] = Qe(e);
|
|
1743
|
+
return [J(() => Te(L, t), [t]), (a) => n(a == null ? void 0 : a.toString())];
|
|
1744
|
+
}
|
|
1745
|
+
function ja(e) {
|
|
1746
|
+
const [t = "", n] = Qe(e);
|
|
1747
|
+
return [J(() => {
|
|
1748
|
+
const [a, o] = t.split("/"), l = Te(L, a), s = Te(L, o);
|
|
1749
|
+
return l && s ? [l, s] : [];
|
|
1750
|
+
}, [t]), (a) => n(`${a[0]}/${a[1]}`)];
|
|
1751
|
+
}
|
|
1752
|
+
function Fa(e) {
|
|
1753
|
+
const [t = "", n] = Qe(e);
|
|
1754
|
+
return [J(() => {
|
|
1755
|
+
const a = [];
|
|
1756
|
+
for (const o of t.trim().split(/\s+/)) {
|
|
1757
|
+
const l = Te(L, o);
|
|
1758
|
+
l && a.push(l);
|
|
1759
|
+
}
|
|
1760
|
+
return a;
|
|
1761
|
+
}, [t]), (a) => n(a.join(" "))];
|
|
1762
|
+
}
|
|
1763
|
+
function ge(e, t) {
|
|
1764
|
+
return J(
|
|
1765
|
+
() => new Intl.DateTimeFormat(t, { timeZone: "UTC", ...e }),
|
|
1766
|
+
[t, e]
|
|
1767
|
+
);
|
|
1768
|
+
}
|
|
1769
|
+
function bt(e, t, n) {
|
|
1770
|
+
const a = ge(e, n);
|
|
1771
|
+
return J(() => {
|
|
1772
|
+
const o = [], l = /* @__PURE__ */ new Date();
|
|
1773
|
+
for (var s = 0; s < 7; s++) {
|
|
1774
|
+
const u = (l.getUTCDay() - t + 7) % 7;
|
|
1775
|
+
o[u] = a.format(l), l.setUTCDate(l.getUTCDate() + 1);
|
|
1776
|
+
}
|
|
1777
|
+
return o;
|
|
1778
|
+
}, [t, a]);
|
|
1779
|
+
}
|
|
1780
|
+
const wt = (e, t, n) => Ie(e, t, n) === e, xt = (e) => e.target.matches(":dir(ltr)"), Ra = { month: "long", day: "numeric" }, qa = { month: "long" }, Ha = { weekday: "long" }, Fe = { bubbles: !0 };
|
|
1781
|
+
function _a({ props: e, context: t }) {
|
|
1782
|
+
const { offset: n } = e, {
|
|
1783
|
+
firstDayOfWeek: a,
|
|
1784
|
+
isDateDisallowed: o,
|
|
1785
|
+
min: l,
|
|
1786
|
+
max: s,
|
|
1787
|
+
today: u,
|
|
1788
|
+
page: i,
|
|
1789
|
+
locale: c,
|
|
1790
|
+
focusedDate: m,
|
|
1791
|
+
formatWeekday: w
|
|
1792
|
+
} = t, g = u ?? et(), y = bt(Ha, a, c), S = J(
|
|
1793
|
+
() => ({ weekday: w }),
|
|
1794
|
+
[w]
|
|
1795
|
+
), D = bt(S, a, c), k = ge(Ra, c), C = ge(qa, c), z = J(
|
|
1796
|
+
() => i.start.add({ months: n }),
|
|
1797
|
+
[i, n]
|
|
1798
|
+
), j = J(
|
|
1799
|
+
() => La(z, a),
|
|
1800
|
+
[z, a]
|
|
1801
|
+
), H = X("focusday", Fe), v = X("selectday", Fe), h = X("hoverday", Fe);
|
|
1802
|
+
function x(b) {
|
|
1803
|
+
H(Ie(b, l, s));
|
|
1804
|
+
}
|
|
1805
|
+
function T(b) {
|
|
1806
|
+
let $;
|
|
1807
|
+
switch (b.key) {
|
|
1808
|
+
case "ArrowRight":
|
|
1809
|
+
$ = m.add({ days: xt(b) ? 1 : -1 });
|
|
1810
|
+
break;
|
|
1811
|
+
case "ArrowLeft":
|
|
1812
|
+
$ = m.add({ days: xt(b) ? -1 : 1 });
|
|
1813
|
+
break;
|
|
1814
|
+
case "ArrowDown":
|
|
1815
|
+
$ = m.add({ days: 7 });
|
|
1816
|
+
break;
|
|
1817
|
+
case "ArrowUp":
|
|
1818
|
+
$ = m.add({ days: -7 });
|
|
1819
|
+
break;
|
|
1820
|
+
case "PageUp":
|
|
1821
|
+
$ = m.add(b.shiftKey ? { years: -1 } : { months: -1 });
|
|
1822
|
+
break;
|
|
1823
|
+
case "PageDown":
|
|
1824
|
+
$ = m.add(b.shiftKey ? { years: 1 } : { months: 1 });
|
|
1825
|
+
break;
|
|
1826
|
+
case "Home":
|
|
1827
|
+
$ = tt(m, a);
|
|
1828
|
+
break;
|
|
1829
|
+
case "End":
|
|
1830
|
+
$ = Zt(m, a);
|
|
1831
|
+
break;
|
|
1832
|
+
default:
|
|
1833
|
+
return;
|
|
1834
|
+
}
|
|
1835
|
+
x($), b.preventDefault();
|
|
1836
|
+
}
|
|
1837
|
+
function r(b) {
|
|
1838
|
+
var rt, ut;
|
|
1839
|
+
const $ = z.equals(b);
|
|
1840
|
+
if (!t.showOutsideDays && !$)
|
|
1841
|
+
return;
|
|
1842
|
+
const I = b.equals(m), P = b.equals(g), q = _(b), Q = o == null ? void 0 : o(q), Y = !wt(b, l, s);
|
|
1843
|
+
let it = "", le;
|
|
1844
|
+
if (t.type === "range") {
|
|
1845
|
+
const [ee, fe] = t.value, ct = ee == null ? void 0 : ee.equals(b), dt = fe == null ? void 0 : fe.equals(b);
|
|
1846
|
+
le = ee && fe && wt(b, ee, fe), it = `${ct ? "range-start" : ""} ${dt ? "range-end" : ""} ${le && !ct && !dt ? "range-inner" : ""}`;
|
|
1847
|
+
} else
|
|
1848
|
+
t.type === "multi" ? le = t.value.some((ee) => ee.equals(b)) : le = (rt = t.value) == null ? void 0 : rt.equals(b);
|
|
1849
|
+
return {
|
|
1850
|
+
part: `${`button day day-${q.getDay()} ${// we don't want outside days to ever be shown as selected
|
|
1851
|
+
$ ? le ? "selected" : "" : "outside"} ${Q ? "disallowed" : ""} ${P ? "today" : ""} ${((ut = t.getDayParts) == null ? void 0 : ut.call(t, q)) ?? ""}`} ${it}`,
|
|
1852
|
+
tabindex: $ && I ? 0 : -1,
|
|
1853
|
+
disabled: Y,
|
|
1854
|
+
"aria-disabled": Q ? "true" : void 0,
|
|
1855
|
+
"aria-pressed": $ && le,
|
|
1856
|
+
"aria-current": P ? "date" : void 0,
|
|
1857
|
+
"aria-label": k.format(q),
|
|
1858
|
+
onkeydown: T,
|
|
1859
|
+
onclick() {
|
|
1860
|
+
Q || v(b), x(b);
|
|
1861
|
+
},
|
|
1862
|
+
onmouseover() {
|
|
1863
|
+
!Q && !Y && h(b);
|
|
1864
|
+
}
|
|
1865
|
+
};
|
|
1866
|
+
}
|
|
1867
|
+
return {
|
|
1868
|
+
weeks: j,
|
|
1869
|
+
yearMonth: z,
|
|
1870
|
+
daysLong: y,
|
|
1871
|
+
daysVisible: D,
|
|
1872
|
+
formatter: C,
|
|
1873
|
+
getDayProps: r
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1876
|
+
const Re = et(), nt = Na({
|
|
1877
|
+
type: "date",
|
|
1878
|
+
firstDayOfWeek: 1,
|
|
1879
|
+
focusedDate: Re,
|
|
1880
|
+
page: { start: Re.toPlainYearMonth(), end: Re.toPlainYearMonth() }
|
|
1881
|
+
});
|
|
1882
|
+
customElements.define("calendar-ctx", nt);
|
|
1883
|
+
const Wa = (e, t) => (t + e) % 7, Za = ke(
|
|
1884
|
+
(e) => {
|
|
1885
|
+
const t = Oa(nt), n = oa(), a = _a({ props: e, context: t });
|
|
1886
|
+
function o() {
|
|
1887
|
+
var l;
|
|
1888
|
+
(l = n.current.querySelector("button[tabindex='0']")) == null || l.focus();
|
|
1889
|
+
}
|
|
1890
|
+
return /* @__PURE__ */ he("host", { shadowDom: !0, focus: o, children: [
|
|
1891
|
+
/* @__PURE__ */ N("div", { id: "h", part: "heading", children: a.formatter.format(_(a.yearMonth)) }),
|
|
1892
|
+
/* @__PURE__ */ he("table", { ref: n, "aria-labelledby": "h", part: "table", children: [
|
|
1893
|
+
/* @__PURE__ */ N("thead", { children: /* @__PURE__ */ N("tr", { part: "tr head", children: a.daysLong.map((l, s) => /* @__PURE__ */ he(
|
|
1894
|
+
"th",
|
|
1895
|
+
{
|
|
1896
|
+
part: `th day day-${Wa(t.firstDayOfWeek, s)}`,
|
|
1897
|
+
scope: "col",
|
|
1898
|
+
children: [
|
|
1899
|
+
/* @__PURE__ */ N("span", { class: "vh", children: l }),
|
|
1900
|
+
/* @__PURE__ */ N("span", { "aria-hidden": "true", children: a.daysVisible[s] })
|
|
1901
|
+
]
|
|
1902
|
+
}
|
|
1903
|
+
)) }) }),
|
|
1904
|
+
/* @__PURE__ */ N("tbody", { children: a.weeks.map((l, s) => /* @__PURE__ */ N("tr", { part: "tr week", children: l.map((u, i) => {
|
|
1905
|
+
const c = a.getDayProps(u);
|
|
1906
|
+
return /* @__PURE__ */ N("td", { part: "td", children: c && /* @__PURE__ */ N("button", { ...c, children: u.day }) }, i);
|
|
1907
|
+
}) }, s)) })
|
|
1908
|
+
] })
|
|
1909
|
+
] });
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
props: {
|
|
1913
|
+
offset: {
|
|
1914
|
+
type: Number,
|
|
1915
|
+
value: 0
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
styles: [
|
|
1919
|
+
_t,
|
|
1920
|
+
Wt,
|
|
1921
|
+
Me`:host{--color-accent: black;--color-text-on-accent: white;display:flex;flex-direction:column;gap:.25rem;text-align:center;inline-size:fit-content}table{border-collapse:collapse;font-size:.875rem}th{font-weight:700;block-size:2.25rem}td{padding-inline:0}button{color:inherit;font-size:inherit;background:transparent;border:0;font-variant-numeric:tabular-nums;block-size:2.25rem;inline-size:2.25rem}button:hover:where(:not(:disabled,[aria-disabled])){background:#0000000d}button:is([aria-pressed=true],:focus-visible){background:var(--color-accent);color:var(--color-text-on-accent)}button:focus-visible{outline:1px solid var(--color-text-on-accent);outline-offset:-2px}button:disabled,:host::part(outside),:host::part(disallowed){cursor:default;opacity:.5}`
|
|
1922
|
+
]
|
|
1923
|
+
}
|
|
1924
|
+
);
|
|
1925
|
+
customElements.define("calendar-month", Za);
|
|
1926
|
+
function kt(e) {
|
|
1927
|
+
return /* @__PURE__ */ N(
|
|
1928
|
+
"button",
|
|
1929
|
+
{
|
|
1930
|
+
part: `button ${e.name} ${e.onclick ? "" : "disabled"}`,
|
|
1931
|
+
onclick: e.onclick,
|
|
1932
|
+
"aria-disabled": e.onclick ? null : "true",
|
|
1933
|
+
children: /* @__PURE__ */ N("slot", { name: e.name, children: e.children })
|
|
1934
|
+
}
|
|
1935
|
+
);
|
|
1936
|
+
}
|
|
1937
|
+
function at(e) {
|
|
1938
|
+
const t = _(e.page.start), n = _(e.page.end);
|
|
1939
|
+
return /* @__PURE__ */ he("div", { role: "group", "aria-labelledby": "h", part: "container", children: [
|
|
1940
|
+
/* @__PURE__ */ N("div", { id: "h", class: "vh", "aria-live": "polite", "aria-atomic": "true", children: e.formatVerbose.formatRange(t, n) }),
|
|
1941
|
+
/* @__PURE__ */ he("div", { part: "header", children: [
|
|
1942
|
+
/* @__PURE__ */ N(kt, { name: "previous", onclick: e.previous, children: "Previous" }),
|
|
1943
|
+
/* @__PURE__ */ N("slot", { part: "heading", name: "heading", children: /* @__PURE__ */ N("div", { "aria-hidden": "true", children: e.format.formatRange(t, n) }) }),
|
|
1944
|
+
/* @__PURE__ */ N(kt, { name: "next", onclick: e.next, children: "Next" })
|
|
1945
|
+
] }),
|
|
1946
|
+
/* @__PURE__ */ N(
|
|
1947
|
+
nt,
|
|
1948
|
+
{
|
|
1949
|
+
value: e,
|
|
1950
|
+
onselectday: e.onSelect,
|
|
1951
|
+
onfocusday: e.onFocus,
|
|
1952
|
+
onhoverday: e.onHover,
|
|
1953
|
+
children: /* @__PURE__ */ N("slot", {})
|
|
1954
|
+
}
|
|
1955
|
+
)
|
|
1956
|
+
] });
|
|
1957
|
+
}
|
|
1958
|
+
const lt = {
|
|
1959
|
+
value: {
|
|
1960
|
+
type: String,
|
|
1961
|
+
value: ""
|
|
1962
|
+
},
|
|
1963
|
+
min: {
|
|
1964
|
+
type: String,
|
|
1965
|
+
value: ""
|
|
1966
|
+
},
|
|
1967
|
+
max: {
|
|
1968
|
+
type: String,
|
|
1969
|
+
value: ""
|
|
1970
|
+
},
|
|
1971
|
+
today: {
|
|
1972
|
+
type: String,
|
|
1973
|
+
value: ""
|
|
1974
|
+
},
|
|
1975
|
+
isDateDisallowed: {
|
|
1976
|
+
type: Function,
|
|
1977
|
+
value: (e) => !1
|
|
1978
|
+
},
|
|
1979
|
+
formatWeekday: {
|
|
1980
|
+
type: String,
|
|
1981
|
+
value: () => "narrow"
|
|
1982
|
+
},
|
|
1983
|
+
getDayParts: {
|
|
1984
|
+
type: Function,
|
|
1985
|
+
value: (e) => ""
|
|
1986
|
+
},
|
|
1987
|
+
firstDayOfWeek: {
|
|
1988
|
+
type: Number,
|
|
1989
|
+
value: () => 1
|
|
1990
|
+
},
|
|
1991
|
+
showOutsideDays: {
|
|
1992
|
+
type: Boolean,
|
|
1993
|
+
value: !1
|
|
1994
|
+
},
|
|
1995
|
+
locale: {
|
|
1996
|
+
type: String,
|
|
1997
|
+
value: () => {
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
months: {
|
|
2001
|
+
type: Number,
|
|
2002
|
+
value: 1
|
|
2003
|
+
},
|
|
2004
|
+
focusedDate: {
|
|
2005
|
+
type: String,
|
|
2006
|
+
value: () => {
|
|
2007
|
+
}
|
|
2008
|
+
},
|
|
2009
|
+
pageBy: {
|
|
2010
|
+
type: String,
|
|
2011
|
+
value: () => "months"
|
|
2012
|
+
}
|
|
2013
|
+
}, ot = [
|
|
2014
|
+
_t,
|
|
2015
|
+
Wt,
|
|
2016
|
+
Me`:host{display:block;inline-size:fit-content}[role=group]{display:flex;flex-direction:column;gap:1em}:host::part(header){display:flex;align-items:center;justify-content:space-between}:host::part(heading){font-weight:700;font-size:1.25em}button{display:flex;align-items:center;justify-content:center}button[aria-disabled]{cursor:default;opacity:.5}`
|
|
2017
|
+
], Ka = { year: "numeric" }, Ya = { year: "numeric", month: "long" };
|
|
2018
|
+
function qe(e, t) {
|
|
2019
|
+
return (t.year - e.year) * 12 + t.month - e.month;
|
|
2020
|
+
}
|
|
2021
|
+
const $t = (e, t) => (e = t === 12 ? new Ee(e.year, 1) : e, {
|
|
2022
|
+
start: e,
|
|
2023
|
+
end: e.add({ months: t - 1 })
|
|
2024
|
+
});
|
|
2025
|
+
function Ja({
|
|
2026
|
+
pageBy: e,
|
|
2027
|
+
focusedDate: t,
|
|
2028
|
+
months: n,
|
|
2029
|
+
max: a,
|
|
2030
|
+
min: o,
|
|
2031
|
+
goto: l
|
|
2032
|
+
}) {
|
|
2033
|
+
const s = e === "single" ? 1 : n, [u, i] = Ge(
|
|
2034
|
+
() => $t(t.toPlainYearMonth(), n)
|
|
2035
|
+
), c = (w) => i($t(u.start.add({ months: w }), n)), m = (w) => {
|
|
2036
|
+
const g = qe(u.start, w.toPlainYearMonth());
|
|
2037
|
+
return g >= 0 && g < n;
|
|
2038
|
+
};
|
|
2039
|
+
return ve(() => {
|
|
2040
|
+
if (m(t))
|
|
2041
|
+
return;
|
|
2042
|
+
const w = qe(t.toPlainYearMonth(), u.start);
|
|
2043
|
+
l(t.add({ months: w }));
|
|
2044
|
+
}, [u.start]), ve(() => {
|
|
2045
|
+
if (m(t))
|
|
2046
|
+
return;
|
|
2047
|
+
const w = qe(u.start, t.toPlainYearMonth());
|
|
2048
|
+
c(w === -1 ? -s : w === n ? s : Math.floor(w / n) * n);
|
|
2049
|
+
}, [t, s, n]), {
|
|
2050
|
+
page: u,
|
|
2051
|
+
previous: !o || !m(o) ? () => c(-s) : void 0,
|
|
2052
|
+
next: !a || !m(a) ? () => c(s) : void 0
|
|
2053
|
+
};
|
|
2054
|
+
}
|
|
2055
|
+
function st({
|
|
2056
|
+
months: e,
|
|
2057
|
+
pageBy: t,
|
|
2058
|
+
locale: n,
|
|
2059
|
+
focusedDate: a,
|
|
2060
|
+
setFocusedDate: o
|
|
2061
|
+
}) {
|
|
2062
|
+
const [l] = G("min"), [s] = G("max"), [u] = G("today"), i = X("focusday"), c = X("change"), m = J(
|
|
2063
|
+
() => Ie(a ?? u ?? et(), l, s),
|
|
2064
|
+
[a, u, l, s]
|
|
2065
|
+
);
|
|
2066
|
+
function w(C) {
|
|
2067
|
+
o(C), i(_(C));
|
|
2068
|
+
}
|
|
2069
|
+
const { next: g, previous: y, page: S } = Ja({
|
|
2070
|
+
pageBy: t,
|
|
2071
|
+
focusedDate: m,
|
|
2072
|
+
months: e,
|
|
2073
|
+
min: l,
|
|
2074
|
+
max: s,
|
|
2075
|
+
goto: w
|
|
2076
|
+
}), D = xe();
|
|
2077
|
+
function k(C) {
|
|
2078
|
+
const z = (C == null ? void 0 : C.target) ?? "day";
|
|
2079
|
+
z === "day" ? D.current.querySelectorAll("calendar-month").forEach((j) => j.focus(C)) : D.current.shadowRoot.querySelector(`[part~='${z}']`).focus(C);
|
|
2080
|
+
}
|
|
2081
|
+
return {
|
|
2082
|
+
format: ge(Ka, n),
|
|
2083
|
+
formatVerbose: ge(Ya, n),
|
|
2084
|
+
page: S,
|
|
2085
|
+
focusedDate: m,
|
|
2086
|
+
dispatch: c,
|
|
2087
|
+
onFocus(C) {
|
|
2088
|
+
C.stopPropagation(), w(C.detail), setTimeout(k);
|
|
2089
|
+
},
|
|
2090
|
+
min: l,
|
|
2091
|
+
max: s,
|
|
2092
|
+
today: u,
|
|
2093
|
+
next: g,
|
|
2094
|
+
previous: y,
|
|
2095
|
+
focus: k
|
|
2096
|
+
};
|
|
2097
|
+
}
|
|
2098
|
+
const Xa = ke(
|
|
2099
|
+
(e) => {
|
|
2100
|
+
const [t, n] = G("value"), [a = t, o] = G("focusedDate"), l = st({
|
|
2101
|
+
...e,
|
|
2102
|
+
focusedDate: a,
|
|
2103
|
+
setFocusedDate: o
|
|
2104
|
+
});
|
|
2105
|
+
function s(u) {
|
|
2106
|
+
n(u.detail), l.dispatch();
|
|
2107
|
+
}
|
|
2108
|
+
return /* @__PURE__ */ N("host", { shadowDom: !0, focus: l.focus, children: /* @__PURE__ */ N(
|
|
2109
|
+
at,
|
|
2110
|
+
{
|
|
2111
|
+
...e,
|
|
2112
|
+
...l,
|
|
2113
|
+
type: "date",
|
|
2114
|
+
value: t,
|
|
2115
|
+
onSelect: s
|
|
2116
|
+
}
|
|
2117
|
+
) });
|
|
2118
|
+
},
|
|
2119
|
+
{ props: lt, styles: ot }
|
|
2120
|
+
);
|
|
2121
|
+
customElements.define("calendar-date", Xa);
|
|
2122
|
+
const St = (e, t) => L.compare(e, t) < 0 ? [e, t] : [t, e], Ga = ke(
|
|
2123
|
+
(e) => {
|
|
2124
|
+
const [t, n] = ja("value"), [a = t[0], o] = G("focusedDate"), l = st({
|
|
2125
|
+
...e,
|
|
2126
|
+
focusedDate: a,
|
|
2127
|
+
setFocusedDate: o
|
|
2128
|
+
}), s = X("rangestart"), u = X("rangeend"), [i, c] = G(
|
|
2129
|
+
"tentative"
|
|
2130
|
+
), [m, w] = Ge();
|
|
2131
|
+
ve(() => w(void 0), [i]);
|
|
2132
|
+
function g(k) {
|
|
2133
|
+
l.onFocus(k), y(k);
|
|
2134
|
+
}
|
|
2135
|
+
function y(k) {
|
|
2136
|
+
k.stopPropagation(), i && w(k.detail);
|
|
2137
|
+
}
|
|
2138
|
+
function S(k) {
|
|
2139
|
+
const C = k.detail;
|
|
2140
|
+
k.stopPropagation(), i ? (n(St(i, C)), c(void 0), u(_(C)), l.dispatch()) : (c(C), s(_(C)));
|
|
2141
|
+
}
|
|
2142
|
+
const D = i ? St(i, m ?? i) : t;
|
|
2143
|
+
return /* @__PURE__ */ N("host", { shadowDom: !0, focus: l.focus, children: /* @__PURE__ */ N(
|
|
2144
|
+
at,
|
|
2145
|
+
{
|
|
2146
|
+
...e,
|
|
2147
|
+
...l,
|
|
2148
|
+
type: "range",
|
|
2149
|
+
value: D,
|
|
2150
|
+
onFocus: g,
|
|
2151
|
+
onHover: y,
|
|
2152
|
+
onSelect: S
|
|
2153
|
+
}
|
|
2154
|
+
) });
|
|
2155
|
+
},
|
|
2156
|
+
{
|
|
2157
|
+
props: {
|
|
2158
|
+
...lt,
|
|
2159
|
+
tentative: {
|
|
2160
|
+
type: String,
|
|
2161
|
+
value: ""
|
|
2162
|
+
}
|
|
2163
|
+
},
|
|
2164
|
+
styles: ot
|
|
2165
|
+
}
|
|
2166
|
+
);
|
|
2167
|
+
customElements.define("calendar-range", Ga);
|
|
2168
|
+
const Qa = ke(
|
|
2169
|
+
(e) => {
|
|
2170
|
+
const [t, n] = Fa("value"), [a = t[0], o] = G("focusedDate"), l = st({
|
|
2171
|
+
...e,
|
|
2172
|
+
focusedDate: a,
|
|
2173
|
+
setFocusedDate: o
|
|
2174
|
+
});
|
|
2175
|
+
function s(u) {
|
|
2176
|
+
const i = [...t], c = t.findIndex((m) => m.equals(u.detail));
|
|
2177
|
+
c < 0 ? i.push(u.detail) : i.splice(c, 1), n(i), l.dispatch();
|
|
2178
|
+
}
|
|
2179
|
+
return /* @__PURE__ */ N("host", { shadowDom: !0, focus: l.focus, children: /* @__PURE__ */ N(
|
|
2180
|
+
at,
|
|
2181
|
+
{
|
|
2182
|
+
...e,
|
|
2183
|
+
...l,
|
|
2184
|
+
type: "multi",
|
|
2185
|
+
value: t,
|
|
2186
|
+
onSelect: s
|
|
2187
|
+
}
|
|
2188
|
+
) });
|
|
2189
|
+
},
|
|
2190
|
+
{ props: lt, styles: ot }
|
|
2191
|
+
);
|
|
2192
|
+
customElements.define("calendar-multi", Qa);
|
|
2193
|
+
const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
2194
|
+
key: 2,
|
|
2195
|
+
class: "join items-center gap-2 w-full justify-between py-2 px-4 max-md:input max-md:input-bordered rounded"
|
|
2196
|
+
}, al = { class: "join-item" }, ll = ["id", "disabled"], ol = { class: "join-item" }, sl = ["id", "disabled"], il = ["id", "disabled"], rl = {
|
|
2197
|
+
key: 4,
|
|
2198
|
+
class: "flex mt-4"
|
|
2199
|
+
}, So = /* @__PURE__ */ A({
|
|
2200
|
+
__name: "datetimePicker",
|
|
2201
|
+
props: {
|
|
2202
|
+
mode: { default: "datetime" },
|
|
2203
|
+
range: { type: Boolean, default: !1 },
|
|
2204
|
+
placeholder: { default: "Select date and time" },
|
|
2205
|
+
popup: { type: Boolean, default: !1 },
|
|
2206
|
+
id: { default: "date-time-picker" },
|
|
2207
|
+
initialDate: { default: null },
|
|
2208
|
+
disabled: { type: Boolean, default: !1 },
|
|
2209
|
+
locale: { default: "nl-NL" },
|
|
2210
|
+
min: {},
|
|
2211
|
+
max: {}
|
|
2212
|
+
},
|
|
2213
|
+
emits: ["update:modelValue", "change"],
|
|
2214
|
+
setup(e, { emit: t }) {
|
|
2215
|
+
const n = e, a = t, o = M(!1), l = M(null), s = M(null), u = M(null), i = M(null), c = M(null), m = M(null), w = M({
|
|
2216
|
+
from: "",
|
|
2217
|
+
to: "",
|
|
2218
|
+
single: ""
|
|
2219
|
+
}), g = M({
|
|
2220
|
+
single: null,
|
|
2221
|
+
start: null,
|
|
2222
|
+
end: null
|
|
2223
|
+
}), y = K(() => {
|
|
2224
|
+
let h = "", x = "";
|
|
2225
|
+
n.mode !== "time" && (n.range && g.value.start && g.value.end ? h = `${g.value.start} - ${g.value.end}` : !n.range && g.value.single && (h = g.value.single)), n.mode !== "date" && (n.range && w.value.from && w.value.to ? x = `${w.value.from} - ${w.value.to}` : !n.range && w.value.single && (x = w.value.single));
|
|
2226
|
+
const T = (r) => {
|
|
2227
|
+
if (!r || r.includes(":")) return r;
|
|
2228
|
+
if (r.match(/^\d{4}-\d{2}-\d{2}$/)) {
|
|
2229
|
+
const b = r.split("-");
|
|
2230
|
+
try {
|
|
2231
|
+
return new Date(r).toLocaleDateString(n.locale);
|
|
2232
|
+
} catch {
|
|
2233
|
+
return `${b[2]}/${b[1]}/${b[0]}`;
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
return r;
|
|
1176
2237
|
};
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
)
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
2238
|
+
if (n.mode === "date") {
|
|
2239
|
+
if (n.range) {
|
|
2240
|
+
const [r, b] = h.split(" - ").map(T);
|
|
2241
|
+
return r && b ? `${r} - ${b}` : "";
|
|
2242
|
+
}
|
|
2243
|
+
return T(h);
|
|
2244
|
+
}
|
|
2245
|
+
if (n.mode === "time") return x;
|
|
2246
|
+
if (n.range) {
|
|
2247
|
+
const [r, b] = h.split(" - ").map(T), [$, I] = x.split(" - ");
|
|
2248
|
+
let P = "";
|
|
2249
|
+
return r && $ && (P += `${r} ${$}`), b && I && (P += P ? ` - ${b} ${I}` : `${b} ${I}`), P.trim();
|
|
2250
|
+
}
|
|
2251
|
+
return `${T(h)} ${x}`.trim();
|
|
2252
|
+
}), S = (h, x) => {
|
|
2253
|
+
if (n.range) {
|
|
2254
|
+
const T = h.start, r = h.end, b = x.from, $ = x.to;
|
|
2255
|
+
let I = null, P = null;
|
|
2256
|
+
if (n.mode === "time" && b && $ ? (I = b, P = $) : n.mode === "date" && T && r ? (I = T, P = r) : n.mode === "datetime" && T && r && b && $ && (I = `${T}T${b}`, P = `${r}T${$}`), I && P)
|
|
2257
|
+
return { start: I, end: P };
|
|
2258
|
+
} else {
|
|
2259
|
+
const T = h.single, r = x.single;
|
|
2260
|
+
if (n.mode === "date") return T;
|
|
2261
|
+
if (n.mode === "time") return r || null;
|
|
2262
|
+
if (n.mode === "datetime" && T && r)
|
|
2263
|
+
return `${T}T${r}`;
|
|
2264
|
+
}
|
|
2265
|
+
return null;
|
|
2266
|
+
}, D = () => {
|
|
2267
|
+
if (s.value)
|
|
2268
|
+
g.value.single = s.value.value || null;
|
|
2269
|
+
else if (u.value) {
|
|
2270
|
+
const h = u.value.value;
|
|
2271
|
+
g.value.start = (h == null ? void 0 : h.start) || null, g.value.end = (h == null ? void 0 : h.end) || null;
|
|
2272
|
+
}
|
|
2273
|
+
}, k = () => {
|
|
2274
|
+
D();
|
|
2275
|
+
const h = S(g.value, w.value);
|
|
2276
|
+
a("update:modelValue", h), a("change", h);
|
|
2277
|
+
}, C = () => {
|
|
2278
|
+
var h, x, T;
|
|
2279
|
+
n.range ? (w.value.from = ((h = c.value) == null ? void 0 : h.value) || "", w.value.to = ((x = m.value) == null ? void 0 : x.value) || "") : w.value.single = ((T = i.value) == null ? void 0 : T.value) || "", k();
|
|
2280
|
+
}, z = () => {
|
|
2281
|
+
o.value = !o.value, o.value && k();
|
|
2282
|
+
}, j = () => {
|
|
2283
|
+
o.value = !1, k();
|
|
2284
|
+
}, H = () => {
|
|
2285
|
+
if (n.initialDate) {
|
|
2286
|
+
if (n.range) {
|
|
2287
|
+
if (typeof n.initialDate == "object" && n.initialDate !== null && "start" in n.initialDate) {
|
|
2288
|
+
const h = n.initialDate, x = (b) => b instanceof Date ? b.toISOString() : b, T = x(h.start), r = x(h.end);
|
|
2289
|
+
if (T && r && (g.value = {
|
|
2290
|
+
single: null,
|
|
2291
|
+
// Now calling .includes() on a guaranteed string
|
|
2292
|
+
start: T.includes("T") ? T.split("T")[0] : T,
|
|
2293
|
+
end: r.includes("T") ? r.split("T")[0] : r
|
|
2294
|
+
}, n.mode === "datetime" || n.mode === "time")) {
|
|
2295
|
+
const b = new Date(T), $ = new Date(r), I = (P) => `${String(P.getUTCHours()).padStart(2, "0")}:${String(P.getUTCMinutes()).padStart(2, "0")}`;
|
|
2296
|
+
w.value = {
|
|
2297
|
+
single: "",
|
|
2298
|
+
from: I(b),
|
|
2299
|
+
to: I($)
|
|
2300
|
+
}, c.value && (c.value.value = w.value.from), m.value && (m.value.value = w.value.to);
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
} else if (typeof n.initialDate == "string" || n.initialDate instanceof Date) {
|
|
2304
|
+
const h = n.initialDate.toString();
|
|
2305
|
+
if (g.value.single = h.includes("T") ? h.split("T")[0] : h, g.value.start = null, g.value.end = null, n.mode === "datetime" || n.mode === "time") {
|
|
2306
|
+
const x = new Date(h), T = `${String(x.getUTCHours()).padStart(2, "0")}:${String(x.getUTCMinutes()).padStart(2, "0")}`;
|
|
2307
|
+
w.value.single = T, i.value && (i.value.value = T);
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
}, v = (h) => {
|
|
2312
|
+
n.popup && o.value && l.value && !l.value.contains(h.target) && j();
|
|
1190
2313
|
};
|
|
1191
|
-
return
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
s("div", {
|
|
1202
|
-
class: "flex items-center gap-2 cursor-pointer",
|
|
1203
|
-
onClick: h[0] || (h[0] = (c) => e.disabled ? null : ie())
|
|
2314
|
+
return ue(() => {
|
|
2315
|
+
s.value && s.value.addEventListener("change", k), u.value && u.value.addEventListener("change", k), H(), setTimeout(k, 0), n.popup && document.addEventListener("click", v);
|
|
2316
|
+
}), Dt(() => {
|
|
2317
|
+
s.value && s.value.removeEventListener("change", k), u.value && u.value.removeEventListener("change", k), n.popup && document.removeEventListener("click", v);
|
|
2318
|
+
}), (h, x) => {
|
|
2319
|
+
const T = Ae("calendar-month"), r = Ae("calendar-date"), b = Ae("calendar-range");
|
|
2320
|
+
return f(), p("div", {
|
|
2321
|
+
class: "inline-block relative w-fit lg:w-full",
|
|
2322
|
+
ref_key: "pickerContainer",
|
|
2323
|
+
ref: l
|
|
1204
2324
|
}, [
|
|
1205
|
-
|
|
1206
|
-
|
|
2325
|
+
n.popup ? (f(), p("div", {
|
|
2326
|
+
key: 0,
|
|
2327
|
+
class: "flex items-center gap-2 cursor-pointer w-full",
|
|
2328
|
+
onClick: x[0] || (x[0] = ($) => n.disabled ? null : z())
|
|
2329
|
+
}, [
|
|
2330
|
+
d("input", {
|
|
1207
2331
|
type: "text",
|
|
1208
2332
|
class: "input-bordered w-full cursor-pointer input",
|
|
1209
|
-
placeholder:
|
|
1210
|
-
value:
|
|
2333
|
+
placeholder: n.placeholder,
|
|
2334
|
+
value: y.value,
|
|
1211
2335
|
readonly: "",
|
|
1212
|
-
id:
|
|
1213
|
-
disabled:
|
|
1214
|
-
}, null, 8,
|
|
1215
|
-
|
|
2336
|
+
id: `${n.id}-input`,
|
|
2337
|
+
disabled: n.disabled
|
|
2338
|
+
}, null, 8, el),
|
|
2339
|
+
d("button", {
|
|
1216
2340
|
class: "btn btn-ghost",
|
|
1217
|
-
disabled:
|
|
1218
|
-
}, [
|
|
1219
|
-
|
|
1220
|
-
], 8, jt)
|
|
1221
|
-
], !0) : B("", !0)
|
|
1222
|
-
]),
|
|
1223
|
-
o.value || !i.popup ? (n(), a("div", {
|
|
1224
|
-
key: 0,
|
|
1225
|
-
class: M(["z-50 bg-base-100 md:mt-2 md:p-4 px-4 rounded-md w-full", [{ absolute: i.popup }]]),
|
|
1226
|
-
id: f.value
|
|
1227
|
-
}, [
|
|
1228
|
-
w.value ? (n(), a("div", qt, [
|
|
1229
|
-
s("button", {
|
|
1230
|
-
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
1231
|
-
onClick: Be,
|
|
1232
|
-
disabled: e.disabled
|
|
1233
|
-
}, h[12] || (h[12] = [
|
|
1234
|
-
s("svg", {
|
|
2341
|
+
disabled: n.disabled
|
|
2342
|
+
}, [...x[1] || (x[1] = [
|
|
2343
|
+
d("svg", {
|
|
1235
2344
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1236
|
-
class: "w-4 h-4",
|
|
1237
|
-
fill: "none",
|
|
1238
2345
|
viewBox: "0 0 24 24",
|
|
1239
|
-
|
|
2346
|
+
fill: "currentColor",
|
|
2347
|
+
class: "size-6"
|
|
1240
2348
|
}, [
|
|
1241
|
-
|
|
1242
|
-
"stroke-linecap": "round",
|
|
1243
|
-
"stroke-linejoin": "round",
|
|
1244
|
-
"stroke-width": "2",
|
|
1245
|
-
d: "M15 19l-7-7 7-7"
|
|
1246
|
-
})
|
|
2349
|
+
d("path", { d: "M12.75 12.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM7.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM18 3.75c0-.621-.504-1.125-1.125-1.125h-15c-.621 0-1.125.504-1.125 1.125v15c0 .621.504 1.125 1.125 1.125h15c.621 0 1.125-.504 1.125-1.125v-15ZM4.5 5.25v12h15v-12h-15Z" })
|
|
1247
2350
|
], -1)
|
|
1248
|
-
]), 8,
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
"
|
|
1264
|
-
onChange:
|
|
1265
|
-
},
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
"
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
2351
|
+
])], 8, tl)
|
|
2352
|
+
])) : E("", !0),
|
|
2353
|
+
o.value || !n.popup ? (f(), p("div", {
|
|
2354
|
+
key: 1,
|
|
2355
|
+
class: B(["z-50 bg-base-100 md:p-4 px-4 rounded-md w-full", { "absolute top-full left-0 mt-2 shadow-lg": n.popup, "mt-2": !n.popup }])
|
|
2356
|
+
}, [
|
|
2357
|
+
!n.range && n.mode !== "time" ? (f(), ae(r, {
|
|
2358
|
+
key: 0,
|
|
2359
|
+
class: "cally w-full",
|
|
2360
|
+
ref_key: "datePicker",
|
|
2361
|
+
ref: s,
|
|
2362
|
+
id: `${n.id}-date`,
|
|
2363
|
+
min: n.min,
|
|
2364
|
+
max: n.max,
|
|
2365
|
+
disabled: n.disabled,
|
|
2366
|
+
"initial-date": n.initialDate,
|
|
2367
|
+
onChange: k
|
|
2368
|
+
}, {
|
|
2369
|
+
default: pt(() => [
|
|
2370
|
+
x[2] || (x[2] = d("svg", {
|
|
2371
|
+
"aria-label": "Previous",
|
|
2372
|
+
class: "fill-current size-4",
|
|
2373
|
+
slot: "previous",
|
|
2374
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2375
|
+
viewBox: "0 0 24 24"
|
|
2376
|
+
}, [
|
|
2377
|
+
d("path", {
|
|
2378
|
+
fill: "currentColor",
|
|
2379
|
+
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
2380
|
+
})
|
|
2381
|
+
], -1)),
|
|
2382
|
+
x[3] || (x[3] = d("svg", {
|
|
2383
|
+
"aria-label": "Next",
|
|
2384
|
+
class: "fill-current size-4",
|
|
2385
|
+
slot: "next",
|
|
2386
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2387
|
+
viewBox: "0 0 24 24"
|
|
2388
|
+
}, [
|
|
2389
|
+
d("path", {
|
|
2390
|
+
fill: "currentColor",
|
|
2391
|
+
d: "m8.25 4.5 7.5 7.5-7.5 7.5"
|
|
2392
|
+
})
|
|
2393
|
+
], -1)),
|
|
2394
|
+
ie(T, {
|
|
2395
|
+
locale: n.locale
|
|
2396
|
+
}, null, 8, ["locale"])
|
|
2397
|
+
]),
|
|
2398
|
+
_: 1
|
|
2399
|
+
}, 8, ["id", "min", "max", "disabled", "initial-date"])) : E("", !0),
|
|
2400
|
+
n.range && n.mode !== "time" ? (f(), ae(b, {
|
|
2401
|
+
key: 1,
|
|
2402
|
+
class: "cally w-full",
|
|
2403
|
+
ref_key: "rangeDatePicker",
|
|
2404
|
+
ref: u,
|
|
2405
|
+
id: `${n.id}-date-range`,
|
|
2406
|
+
min: n.min,
|
|
2407
|
+
max: n.max,
|
|
2408
|
+
disabled: n.disabled,
|
|
2409
|
+
"initial-date": n.initialDate,
|
|
2410
|
+
onChange: k
|
|
2411
|
+
}, {
|
|
2412
|
+
default: pt(() => [
|
|
2413
|
+
x[4] || (x[4] = d("svg", {
|
|
2414
|
+
"aria-label": "Previous",
|
|
2415
|
+
class: "fill-current size-4",
|
|
2416
|
+
slot: "previous",
|
|
2417
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2418
|
+
viewBox: "0 0 24 24"
|
|
2419
|
+
}, [
|
|
2420
|
+
d("path", {
|
|
2421
|
+
fill: "currentColor",
|
|
2422
|
+
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
2423
|
+
})
|
|
2424
|
+
], -1)),
|
|
2425
|
+
x[5] || (x[5] = d("svg", {
|
|
2426
|
+
"aria-label": "Next",
|
|
2427
|
+
class: "fill-current size-4",
|
|
2428
|
+
slot: "next",
|
|
2429
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2430
|
+
viewBox: "0 0 24 24"
|
|
2431
|
+
}, [
|
|
2432
|
+
d("path", {
|
|
2433
|
+
fill: "currentColor",
|
|
2434
|
+
d: "m8.25 4.5 7.5 7.5-7.5 7.5"
|
|
2435
|
+
})
|
|
2436
|
+
], -1)),
|
|
2437
|
+
ie(T, {
|
|
2438
|
+
locale: n.locale
|
|
2439
|
+
}, null, 8, ["locale"])
|
|
2440
|
+
]),
|
|
2441
|
+
_: 1
|
|
2442
|
+
}, 8, ["id", "min", "max", "disabled", "initial-date"])) : E("", !0),
|
|
2443
|
+
n.range && n.mode !== "date" ? (f(), p("div", nl, [
|
|
2444
|
+
d("div", al, [
|
|
2445
|
+
d("input", {
|
|
2446
|
+
class: "max-md:max-w-xs text-center hover:border-b-2 hover:-mb-0.5 open:bg-primary open:p-1 open:-m-0.5 open:rounded w-full",
|
|
1321
2447
|
type: "time",
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
class: "w-full select-bordered select",
|
|
1330
|
-
"onUpdate:modelValue": h[7] || (h[7] = (c) => m.value.start = c),
|
|
1331
|
-
onChange: F
|
|
1332
|
-
}, [
|
|
1333
|
-
(n(!0), a(O, null, P(R(v), (c) => (n(), a("option", {
|
|
1334
|
-
key: c,
|
|
1335
|
-
value: c
|
|
1336
|
-
}, x(c.toString().padStart(2, "0")), 9, al))), 128))
|
|
1337
|
-
], 544), [
|
|
1338
|
-
[
|
|
1339
|
-
Z,
|
|
1340
|
-
m.value.start,
|
|
1341
|
-
void 0,
|
|
1342
|
-
{ number: !0 }
|
|
1343
|
-
]
|
|
1344
|
-
]),
|
|
1345
|
-
H(s("select", {
|
|
1346
|
-
class: "w-full select-bordered select",
|
|
1347
|
-
"onUpdate:modelValue": h[8] || (h[8] = (c) => $.value.start = c),
|
|
1348
|
-
onChange: F
|
|
1349
|
-
}, [
|
|
1350
|
-
(n(!0), a(O, null, P(R(y), (c) => (n(), a("option", {
|
|
1351
|
-
key: c,
|
|
1352
|
-
value: c
|
|
1353
|
-
}, x(c.toString().padStart(2, "0")), 9, ol))), 128))
|
|
1354
|
-
], 544), [
|
|
1355
|
-
[
|
|
1356
|
-
Z,
|
|
1357
|
-
$.value.start,
|
|
1358
|
-
void 0,
|
|
1359
|
-
{ number: !0 }
|
|
1360
|
-
]
|
|
1361
|
-
])
|
|
1362
|
-
]))
|
|
2448
|
+
ref_key: "timeFromInput",
|
|
2449
|
+
ref: c,
|
|
2450
|
+
id: `${n.id}-time-from`,
|
|
2451
|
+
placeholder: "van",
|
|
2452
|
+
onChange: C,
|
|
2453
|
+
disabled: n.disabled
|
|
2454
|
+
}, null, 40, ll)
|
|
1363
2455
|
]),
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
2456
|
+
x[6] || (x[6] = d("svg", {
|
|
2457
|
+
class: "join-item",
|
|
2458
|
+
viewBox: "0 0 1024 1024",
|
|
2459
|
+
focusable: "false",
|
|
2460
|
+
"data-icon": "swap-right",
|
|
2461
|
+
width: "1em",
|
|
2462
|
+
height: "1em",
|
|
2463
|
+
fill: "currentColor",
|
|
2464
|
+
"aria-hidden": "true"
|
|
2465
|
+
}, [
|
|
2466
|
+
d("path", { d: "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" })
|
|
2467
|
+
], -1)),
|
|
2468
|
+
d("div", ol, [
|
|
2469
|
+
d("input", {
|
|
2470
|
+
class: "hover:border-b-2 hover:-mb-0.5 open:bg-primary open:p-1 open:-m-0.5 open:rounded w-full",
|
|
1368
2471
|
type: "time",
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
H(s("select", {
|
|
1376
|
-
class: "w-full select-bordered select",
|
|
1377
|
-
"onUpdate:modelValue": h[10] || (h[10] = (c) => m.value.end = c),
|
|
1378
|
-
onChange: F
|
|
1379
|
-
}, [
|
|
1380
|
-
(n(!0), a(O, null, P(R(v), (c) => (n(), a("option", {
|
|
1381
|
-
key: c,
|
|
1382
|
-
value: c
|
|
1383
|
-
}, x(c.toString().padStart(2, "0")), 9, rl))), 128))
|
|
1384
|
-
], 544), [
|
|
1385
|
-
[
|
|
1386
|
-
Z,
|
|
1387
|
-
m.value.end,
|
|
1388
|
-
void 0,
|
|
1389
|
-
{ number: !0 }
|
|
1390
|
-
]
|
|
1391
|
-
]),
|
|
1392
|
-
H(s("select", {
|
|
1393
|
-
class: "w-full select-bordered select",
|
|
1394
|
-
"onUpdate:modelValue": h[11] || (h[11] = (c) => $.value.end = c),
|
|
1395
|
-
onChange: F
|
|
1396
|
-
}, [
|
|
1397
|
-
(n(!0), a(O, null, P(R(y), (c) => (n(), a("option", {
|
|
1398
|
-
key: c,
|
|
1399
|
-
value: c
|
|
1400
|
-
}, x(c.toString().padStart(2, "0")), 9, il))), 128))
|
|
1401
|
-
], 544), [
|
|
1402
|
-
[
|
|
1403
|
-
Z,
|
|
1404
|
-
$.value.end,
|
|
1405
|
-
void 0,
|
|
1406
|
-
{ number: !0 }
|
|
1407
|
-
]
|
|
1408
|
-
])
|
|
1409
|
-
]))
|
|
2472
|
+
ref_key: "timeToInput",
|
|
2473
|
+
ref: m,
|
|
2474
|
+
id: `${n.id}-time-to`,
|
|
2475
|
+
onChange: C,
|
|
2476
|
+
disabled: n.disabled
|
|
2477
|
+
}, null, 40, sl)
|
|
1410
2478
|
])
|
|
1411
|
-
])) : (
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
[
|
|
1432
|
-
Z,
|
|
1433
|
-
m.value,
|
|
1434
|
-
void 0,
|
|
1435
|
-
{ number: !0 }
|
|
1436
|
-
]
|
|
1437
|
-
]),
|
|
1438
|
-
H(s("select", {
|
|
1439
|
-
class: "w-full select-bordered select",
|
|
1440
|
-
"onUpdate:modelValue": h[5] || (h[5] = (c) => $.value = c),
|
|
1441
|
-
onChange: F
|
|
1442
|
-
}, [
|
|
1443
|
-
(n(!0), a(O, null, P(R(y), (c) => (n(), a("option", {
|
|
1444
|
-
key: c,
|
|
1445
|
-
value: c
|
|
1446
|
-
}, x(c.toString().padStart(2, "0")), 9, tl))), 128))
|
|
1447
|
-
], 544), [
|
|
1448
|
-
[
|
|
1449
|
-
Z,
|
|
1450
|
-
$.value,
|
|
1451
|
-
void 0,
|
|
1452
|
-
{ number: !0 }
|
|
1453
|
-
]
|
|
1454
|
-
])
|
|
1455
|
-
]))
|
|
1456
|
-
]))
|
|
1457
|
-
])) : B("", !0),
|
|
1458
|
-
s("div", ul, [
|
|
1459
|
-
s("button", {
|
|
1460
|
-
class: M(["btn btn-secondary", i.popup ? "w-fit" : "w-full"]),
|
|
1461
|
-
onClick: Ce
|
|
1462
|
-
}, " Clear ", 2),
|
|
1463
|
-
i.popup ? (n(), a("button", {
|
|
1464
|
-
key: 0,
|
|
1465
|
-
class: "btn btn-primary btn-wide",
|
|
1466
|
-
onClick: X
|
|
1467
|
-
}, " Close ")) : B("", !0)
|
|
1468
|
-
])
|
|
1469
|
-
], 10, Ft)) : B("", !0)
|
|
1470
|
-
], 512));
|
|
2479
|
+
])) : E("", !0),
|
|
2480
|
+
!n.range && n.mode !== "date" ? (f(), p("input", {
|
|
2481
|
+
key: 3,
|
|
2482
|
+
class: "open:bg-primary open:rounded w-full input input-bordered my-2 justify-center",
|
|
2483
|
+
type: "time",
|
|
2484
|
+
ref_key: "timeInput",
|
|
2485
|
+
ref: i,
|
|
2486
|
+
id: `${n.id}-time`,
|
|
2487
|
+
onChange: C,
|
|
2488
|
+
disabled: n.disabled
|
|
2489
|
+
}, null, 40, il)) : E("", !0),
|
|
2490
|
+
n.popup ? (f(), p("div", rl, [
|
|
2491
|
+
d("button", {
|
|
2492
|
+
class: "btn btn-primary",
|
|
2493
|
+
onClick: j
|
|
2494
|
+
}, " Close ")
|
|
2495
|
+
])) : E("", !0)
|
|
2496
|
+
], 2)) : E("", !0)
|
|
2497
|
+
], 512);
|
|
2498
|
+
};
|
|
1471
2499
|
}
|
|
1472
|
-
},
|
|
1473
|
-
__proto__: null,
|
|
1474
|
-
default: cl
|
|
1475
|
-
}, Symbol.toStringTag, { value: "Module" })), vl = ["value", "checked", "onChange", "disabled"], In = /* @__PURE__ */ L({
|
|
2500
|
+
}), ul = ["value", "checked", "onChange", "disabled"], Co = /* @__PURE__ */ A({
|
|
1476
2501
|
__name: "rating",
|
|
1477
2502
|
props: {
|
|
1478
2503
|
initialRating: { default: 0 },
|
|
@@ -1484,61 +2509,61 @@ const lt = te("SunIcon", [
|
|
|
1484
2509
|
color: { default: "bg-yellow-400" },
|
|
1485
2510
|
gap: { default: 0 }
|
|
1486
2511
|
},
|
|
1487
|
-
setup(
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1490
|
-
() =>
|
|
2512
|
+
setup(e) {
|
|
2513
|
+
const t = e, n = M(t.initialRating);
|
|
2514
|
+
R(
|
|
2515
|
+
() => t.initialRating,
|
|
1491
2516
|
(o) => {
|
|
1492
|
-
|
|
2517
|
+
n.value = o;
|
|
1493
2518
|
}
|
|
1494
2519
|
);
|
|
1495
|
-
const
|
|
1496
|
-
|
|
2520
|
+
const a = (o) => {
|
|
2521
|
+
n.value = o;
|
|
1497
2522
|
};
|
|
1498
|
-
return (o, l) => (
|
|
1499
|
-
class:
|
|
1500
|
-
`rating-${
|
|
1501
|
-
{ "rating-half":
|
|
1502
|
-
{ "pointer-events-none": !
|
|
2523
|
+
return (o, l) => (f(), p("div", {
|
|
2524
|
+
class: B(["rating", [
|
|
2525
|
+
`rating-${t.size}`,
|
|
2526
|
+
{ "rating-half": e.halfStars },
|
|
2527
|
+
{ "pointer-events-none": !e.isInteractive }
|
|
1503
2528
|
]])
|
|
1504
2529
|
}, [
|
|
1505
|
-
(
|
|
1506
|
-
key:
|
|
2530
|
+
(f(!0), p(U, null, F(e.numberOfStars * (e.halfStars ? 2 : 1), (s) => (f(), p("input", {
|
|
2531
|
+
key: s,
|
|
1507
2532
|
type: "radio",
|
|
1508
|
-
value:
|
|
1509
|
-
checked:
|
|
1510
|
-
onChange: (
|
|
1511
|
-
class:
|
|
2533
|
+
value: e.halfStars ? s * 0.5 : s,
|
|
2534
|
+
checked: n.value === (e.halfStars ? s * 0.5 : s),
|
|
2535
|
+
onChange: (u) => e.isInteractive ? a(e.halfStars ? s * 0.5 : s) : null,
|
|
2536
|
+
class: B(["mask", [
|
|
1512
2537
|
{
|
|
1513
2538
|
// 'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
|
|
1514
|
-
"mask-half-1":
|
|
1515
|
-
"mask-half-2":
|
|
1516
|
-
"cursor-pointer":
|
|
1517
|
-
"cursor-default": !
|
|
1518
|
-
"mask-star":
|
|
1519
|
-
"mask-star-2":
|
|
1520
|
-
"mask-heart":
|
|
1521
|
-
"mask-hexagon":
|
|
1522
|
-
"mask-hexagon-2":
|
|
1523
|
-
"mask-decagon":
|
|
1524
|
-
"mask-pentagon":
|
|
1525
|
-
"mask-diamond":
|
|
1526
|
-
"mask-square":
|
|
1527
|
-
"mask-triangle":
|
|
1528
|
-
"mask-triangle-2":
|
|
1529
|
-
"mask-triangle-3":
|
|
1530
|
-
"mask-triangle-4":
|
|
2539
|
+
"mask-half-1": e.halfStars && s % 2 !== 0,
|
|
2540
|
+
"mask-half-2": e.halfStars && s % 2 === 0,
|
|
2541
|
+
"cursor-pointer": e.isInteractive,
|
|
2542
|
+
"cursor-default": !e.isInteractive,
|
|
2543
|
+
"mask-star": e.shape === "star",
|
|
2544
|
+
"mask-star-2": e.shape === "star-bold",
|
|
2545
|
+
"mask-heart": e.shape === "heart",
|
|
2546
|
+
"mask-hexagon": e.shape === "hexagon-vertical",
|
|
2547
|
+
"mask-hexagon-2": e.shape === "hexagon-horizontal",
|
|
2548
|
+
"mask-decagon": e.shape === "decagon",
|
|
2549
|
+
"mask-pentagon": e.shape === "pentagon",
|
|
2550
|
+
"mask-diamond": e.shape === "diamond",
|
|
2551
|
+
"mask-square": e.shape === "square",
|
|
2552
|
+
"mask-triangle": e.shape === "triangle-top",
|
|
2553
|
+
"mask-triangle-2": e.shape === "triangle-bottom",
|
|
2554
|
+
"mask-triangle-3": e.shape === "triangle-left",
|
|
2555
|
+
"mask-triangle-4": e.shape === "triangle-right"
|
|
1531
2556
|
},
|
|
1532
|
-
|
|
2557
|
+
n.value >= (e.halfStars ? s * 0.5 : s) ? t.color : ""
|
|
1533
2558
|
]]),
|
|
1534
|
-
style:
|
|
1535
|
-
marginRight:
|
|
2559
|
+
style: ye({
|
|
2560
|
+
marginRight: e.halfStars && s % 2 === 0 ? `${t.gap}px` : e.halfStars ? "0" : `${t.gap}px`
|
|
1536
2561
|
}),
|
|
1537
|
-
disabled: !
|
|
1538
|
-
}, null, 46,
|
|
2562
|
+
disabled: !e.isInteractive
|
|
2563
|
+
}, null, 46, ul))), 128))
|
|
1539
2564
|
], 2));
|
|
1540
2565
|
}
|
|
1541
|
-
}),
|
|
2566
|
+
}), cl = { class: "badge" }, dl = ["onClick"], fl = { class: "opacity-75" }, ml = ["placeholder"], Do = /* @__PURE__ */ A({
|
|
1542
2567
|
__name: "taginput",
|
|
1543
2568
|
props: {
|
|
1544
2569
|
modelValue: {},
|
|
@@ -1547,61 +2572,61 @@ const lt = te("SunIcon", [
|
|
|
1547
2572
|
class: {}
|
|
1548
2573
|
},
|
|
1549
2574
|
emits: ["update:modelValue"],
|
|
1550
|
-
setup(
|
|
1551
|
-
const
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1554
|
-
},
|
|
1555
|
-
o.value = o.value.filter((
|
|
1556
|
-
},
|
|
1557
|
-
|
|
1558
|
-
},
|
|
1559
|
-
|
|
2575
|
+
setup(e, { emit: t }) {
|
|
2576
|
+
const n = e, a = t, o = M([...n.modelValue]), l = n.maxTagAmount === void 0 ? -1 : n.maxTagAmount, s = M(null), u = M(""), i = K(() => l < 0 || o.value.length < l), c = () => {
|
|
2577
|
+
const y = u.value.trim();
|
|
2578
|
+
y && !o.value.includes(y) && (o.value.push(y), a("update:modelValue", o.value), u.value = "");
|
|
2579
|
+
}, m = (y) => {
|
|
2580
|
+
o.value = o.value.filter((S) => S !== y), a("update:modelValue", o.value);
|
|
2581
|
+
}, w = () => {
|
|
2582
|
+
u.value === "" && (o.value.pop(), a("update:modelValue", o.value));
|
|
2583
|
+
}, g = (y) => {
|
|
2584
|
+
y.key === "Enter" ? c() : y.key === "Backspace" && u.value === "" && w();
|
|
1560
2585
|
};
|
|
1561
|
-
return
|
|
1562
|
-
o.value = [...
|
|
1563
|
-
}), (
|
|
1564
|
-
class:
|
|
2586
|
+
return R(() => n.modelValue, (y) => {
|
|
2587
|
+
o.value = [...y];
|
|
2588
|
+
}), (y, S) => (f(), p("div", {
|
|
2589
|
+
class: B(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", y.$props.class])
|
|
1565
2590
|
}, [
|
|
1566
|
-
(
|
|
1567
|
-
key:
|
|
1568
|
-
tag:
|
|
2591
|
+
(f(!0), p(U, null, F(o.value, (D) => V(y.$slots, "tag", {
|
|
2592
|
+
key: D,
|
|
2593
|
+
tag: D
|
|
1569
2594
|
}, () => [
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
class: "
|
|
1573
|
-
onClick: (
|
|
2595
|
+
d("div", cl, [
|
|
2596
|
+
d("button", {
|
|
2597
|
+
class: "px-1! py-0! h-fit font-bold cursor-pointer",
|
|
2598
|
+
onClick: (k) => m(D),
|
|
1574
2599
|
"aria-label": "Remove tag"
|
|
1575
|
-
}, "X", 8,
|
|
1576
|
-
|
|
2600
|
+
}, "X", 8, dl),
|
|
2601
|
+
d("span", fl, O(D), 1)
|
|
1577
2602
|
])
|
|
1578
2603
|
])), 128)),
|
|
1579
|
-
|
|
1580
|
-
|
|
2604
|
+
V(y.$slots, "input", { showInput: i.value }, () => [
|
|
2605
|
+
i.value ? Ce((f(), p("input", {
|
|
1581
2606
|
key: 0,
|
|
1582
2607
|
ref_key: "inputRef",
|
|
1583
|
-
ref:
|
|
1584
|
-
"onUpdate:modelValue":
|
|
2608
|
+
ref: s,
|
|
2609
|
+
"onUpdate:modelValue": S[0] || (S[0] = (D) => u.value = D),
|
|
1585
2610
|
type: "text",
|
|
1586
|
-
placeholder:
|
|
2611
|
+
placeholder: e.placeholder || "Type here",
|
|
1587
2612
|
class: "h-full input input-ghost",
|
|
1588
|
-
onKeydown:
|
|
2613
|
+
onKeydown: g,
|
|
1589
2614
|
"aria-label": "Add tags"
|
|
1590
|
-
}, null, 40,
|
|
1591
|
-
[
|
|
1592
|
-
]) :
|
|
2615
|
+
}, null, 40, ml)), [
|
|
2616
|
+
[Tt, u.value]
|
|
2617
|
+
]) : E("", !0)
|
|
1593
2618
|
])
|
|
1594
2619
|
], 2));
|
|
1595
2620
|
}
|
|
1596
|
-
}),
|
|
2621
|
+
}), pl = { class: "w-full max-w-xs form-control" }, hl = {
|
|
1597
2622
|
key: 0,
|
|
1598
2623
|
class: "label"
|
|
1599
|
-
},
|
|
2624
|
+
}, vl = { class: "label-text" }, gl = ["value"], yl = {
|
|
1600
2625
|
key: 0,
|
|
1601
2626
|
value: "",
|
|
1602
2627
|
disabled: "",
|
|
1603
2628
|
selected: ""
|
|
1604
|
-
},
|
|
2629
|
+
}, bl = ["value"], To = /* @__PURE__ */ A({
|
|
1605
2630
|
__name: "select",
|
|
1606
2631
|
props: {
|
|
1607
2632
|
options: {},
|
|
@@ -1610,45 +2635,45 @@ const lt = te("SunIcon", [
|
|
|
1610
2635
|
modelValue: {}
|
|
1611
2636
|
},
|
|
1612
2637
|
emits: ["update:modelValue"],
|
|
1613
|
-
setup(
|
|
1614
|
-
console.log(
|
|
1615
|
-
const o =
|
|
1616
|
-
const
|
|
1617
|
-
o("update:modelValue",
|
|
2638
|
+
setup(e, { expose: t, emit: n }) {
|
|
2639
|
+
console.log(e.placeholder);
|
|
2640
|
+
const o = n, l = M(null), s = (i) => {
|
|
2641
|
+
const c = i.target;
|
|
2642
|
+
o("update:modelValue", c.value);
|
|
1618
2643
|
};
|
|
1619
|
-
return
|
|
2644
|
+
return t({
|
|
1620
2645
|
focusInput: () => {
|
|
1621
|
-
var
|
|
1622
|
-
console.log("select.vue: focusInput method called."), (
|
|
2646
|
+
var i;
|
|
2647
|
+
console.log("select.vue: focusInput method called."), (i = l.value) == null || i.focus();
|
|
1623
2648
|
}
|
|
1624
2649
|
// You can expose other properties or methods here if needed by the parent
|
|
1625
2650
|
// e.g., the current value: modelValue
|
|
1626
|
-
}), (
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
])) :
|
|
1630
|
-
|
|
2651
|
+
}), (i, c) => (f(), p("div", pl, [
|
|
2652
|
+
e.label ? (f(), p("label", hl, [
|
|
2653
|
+
d("span", vl, O(e.label), 1)
|
|
2654
|
+
])) : E("", !0),
|
|
2655
|
+
d("select", {
|
|
1631
2656
|
ref_key: "selectElement",
|
|
1632
2657
|
ref: l,
|
|
1633
2658
|
class: "rounded-md w-full select-bordered select",
|
|
1634
|
-
value:
|
|
1635
|
-
onChange:
|
|
2659
|
+
value: e.modelValue,
|
|
2660
|
+
onChange: s
|
|
1636
2661
|
}, [
|
|
1637
|
-
|
|
1638
|
-
(
|
|
1639
|
-
key:
|
|
1640
|
-
value:
|
|
1641
|
-
},
|
|
1642
|
-
], 40,
|
|
2662
|
+
e.placeholder ? (f(), p("option", yl, O(e.placeholder), 1)) : E("", !0),
|
|
2663
|
+
(f(!0), p(U, null, F(e.options, (m) => (f(), p("option", {
|
|
2664
|
+
key: m.value,
|
|
2665
|
+
value: m.value
|
|
2666
|
+
}, O(m.text), 9, bl))), 128))
|
|
2667
|
+
], 40, gl)
|
|
1643
2668
|
]));
|
|
1644
2669
|
}
|
|
1645
|
-
}),
|
|
2670
|
+
}), wl = {
|
|
1646
2671
|
key: 0,
|
|
1647
2672
|
class: "label"
|
|
1648
|
-
},
|
|
2673
|
+
}, xl = { class: "label-text" }, kl = ["onKeydown", "aria-expanded", "aria-activedescendant"], $l = ["placeholder", "disabled"], Sl = {
|
|
1649
2674
|
class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
|
|
1650
2675
|
role: "listbox"
|
|
1651
|
-
},
|
|
2676
|
+
}, Cl = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, Dl = ["onMousedown", "id", "aria-selected"], Mo = {
|
|
1652
2677
|
__name: "filterableSelect",
|
|
1653
2678
|
props: {
|
|
1654
2679
|
// Array of options: [{ value: any, text: string }, ...]
|
|
@@ -1678,195 +2703,195 @@ const lt = te("SunIcon", [
|
|
|
1678
2703
|
}
|
|
1679
2704
|
},
|
|
1680
2705
|
emits: ["update:modelValue", "select", "clear"],
|
|
1681
|
-
setup(
|
|
1682
|
-
const
|
|
1683
|
-
const
|
|
1684
|
-
return console.log("hasDefaultSlotContent computed:",
|
|
1685
|
-
}),
|
|
1686
|
-
|
|
1687
|
-
},
|
|
1688
|
-
|
|
1689
|
-
},
|
|
1690
|
-
|
|
1691
|
-
},
|
|
1692
|
-
const
|
|
1693
|
-
return
|
|
1694
|
-
(
|
|
2706
|
+
setup(e, { expose: t, emit: n }) {
|
|
2707
|
+
const a = e, o = n, l = en(), s = K(() => {
|
|
2708
|
+
const b = (l.default ? l.default() : []).filter(($) => $.type !== tn);
|
|
2709
|
+
return console.log("hasDefaultSlotContent computed:", b.length > 0), b.length > 0;
|
|
2710
|
+
}), u = M(""), i = M(null), c = M(!1), m = M(null), w = M(null), g = M(null), y = M(null), S = () => {
|
|
2711
|
+
c.value = !a.disabled;
|
|
2712
|
+
}, D = () => {
|
|
2713
|
+
c.value = !1, y.value = null, s.value || (i.value && u.value !== i.value.text ? u.value = i.value.text : i.value || (u.value = ""));
|
|
2714
|
+
}, k = () => {
|
|
2715
|
+
c.value ? D() : S();
|
|
2716
|
+
}, C = K(() => {
|
|
2717
|
+
const r = u.value ? u.value.toLowerCase() : "";
|
|
2718
|
+
return r === "" && !c.value ? [] : a.options.filter(
|
|
2719
|
+
($) => $ && $.text ? $.text.toLowerCase().includes(r) : ""
|
|
1695
2720
|
);
|
|
1696
2721
|
});
|
|
1697
|
-
|
|
1698
|
-
() =>
|
|
1699
|
-
(
|
|
1700
|
-
if (
|
|
1701
|
-
|
|
2722
|
+
R(
|
|
2723
|
+
() => a.modelValue,
|
|
2724
|
+
(r, b) => {
|
|
2725
|
+
if (r !== b && D(), r == null)
|
|
2726
|
+
i.value = null, !c.value && !s.value && (u.value = "");
|
|
1702
2727
|
else {
|
|
1703
|
-
const
|
|
1704
|
-
|
|
2728
|
+
const $ = a.options.find((I) => I.value === r);
|
|
2729
|
+
$ ? (i.value = $, !c.value && !s.value && (u.value = $.text)) : (i.value = null, !c.value && !s.value && (u.value = ""));
|
|
1705
2730
|
}
|
|
1706
2731
|
},
|
|
1707
2732
|
{ immediate: !0 }
|
|
1708
2733
|
// Run immediately on component mount
|
|
1709
2734
|
);
|
|
1710
|
-
const
|
|
1711
|
-
|
|
1712
|
-
},
|
|
2735
|
+
const z = (r) => {
|
|
2736
|
+
w.value && !w.value.contains(r.target) && D();
|
|
2737
|
+
}, j = () => {
|
|
1713
2738
|
setTimeout(() => {
|
|
1714
|
-
|
|
2739
|
+
w.value && !w.value.contains(document.activeElement) && D();
|
|
1715
2740
|
}, 100);
|
|
1716
2741
|
};
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
document.addEventListener("click",
|
|
1720
|
-
}, 0) : document.removeEventListener("click",
|
|
1721
|
-
}),
|
|
1722
|
-
document.removeEventListener("click",
|
|
2742
|
+
R(c, (r) => {
|
|
2743
|
+
r ? setTimeout(() => {
|
|
2744
|
+
document.addEventListener("click", z);
|
|
2745
|
+
}, 0) : document.removeEventListener("click", z);
|
|
2746
|
+
}), _e(() => {
|
|
2747
|
+
document.removeEventListener("click", z), window.removeEventListener("keydown", T);
|
|
1723
2748
|
});
|
|
1724
|
-
const
|
|
1725
|
-
if (
|
|
1726
|
-
const
|
|
1727
|
-
o("update:modelValue", null),
|
|
1728
|
-
}, v = (
|
|
1729
|
-
|
|
1730
|
-
},
|
|
1731
|
-
|
|
1732
|
-
},
|
|
1733
|
-
|
|
1734
|
-
}, T = (
|
|
1735
|
-
if (!
|
|
1736
|
-
const
|
|
1737
|
-
(
|
|
2749
|
+
const H = () => {
|
|
2750
|
+
if (a.disabled) return;
|
|
2751
|
+
const r = i.value;
|
|
2752
|
+
o("update:modelValue", null), r && o("clear", r);
|
|
2753
|
+
}, v = (r) => {
|
|
2754
|
+
i.value = r, s.value || (u.value = r.text), o("update:modelValue", r.value), o("select", r), D();
|
|
2755
|
+
}, h = () => {
|
|
2756
|
+
C.value.length > 0 && v(C.value[0]);
|
|
2757
|
+
}, x = () => {
|
|
2758
|
+
c.value || S();
|
|
2759
|
+
}, T = (r) => {
|
|
2760
|
+
if (!c.value || C.value.length === 0) return;
|
|
2761
|
+
const b = C.value.findIndex(
|
|
2762
|
+
(I, P) => "option-" + P === y.value
|
|
1738
2763
|
);
|
|
1739
|
-
let
|
|
1740
|
-
if (
|
|
1741
|
-
|
|
1742
|
-
else if (
|
|
1743
|
-
|
|
1744
|
-
else if (
|
|
1745
|
-
|
|
1746
|
-
const
|
|
1747
|
-
(
|
|
2764
|
+
let $ = -1;
|
|
2765
|
+
if (r.key === "ArrowDown")
|
|
2766
|
+
r.preventDefault(), $ = (b + 1) % C.value.length;
|
|
2767
|
+
else if (r.key === "ArrowUp")
|
|
2768
|
+
r.preventDefault(), $ = (b - 1 + C.value.length) % C.value.length;
|
|
2769
|
+
else if (r.key === "Enter" && y.value) {
|
|
2770
|
+
r.preventDefault();
|
|
2771
|
+
const I = C.value.find(
|
|
2772
|
+
(P, q) => "option-" + q === y.value
|
|
1748
2773
|
);
|
|
1749
|
-
|
|
2774
|
+
I && v(I);
|
|
1750
2775
|
return;
|
|
1751
|
-
} else if (
|
|
1752
|
-
|
|
2776
|
+
} else if (r.key === "Escape") {
|
|
2777
|
+
r.preventDefault(), D(), g.value && g.value.focus();
|
|
1753
2778
|
return;
|
|
1754
|
-
} else if (
|
|
2779
|
+
} else if (s.value)
|
|
1755
2780
|
return;
|
|
1756
|
-
if (
|
|
1757
|
-
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1760
|
-
|
|
2781
|
+
if ($ !== -1) {
|
|
2782
|
+
y.value = "option-" + $;
|
|
2783
|
+
const I = document.getElementById(y.value);
|
|
2784
|
+
I && requestAnimationFrame(() => {
|
|
2785
|
+
I.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
1761
2786
|
});
|
|
1762
2787
|
}
|
|
1763
2788
|
};
|
|
1764
|
-
return
|
|
1765
|
-
|
|
1766
|
-
}),
|
|
1767
|
-
document.removeEventListener("click",
|
|
1768
|
-
}),
|
|
1769
|
-
isDropdownOpen:
|
|
2789
|
+
return R(c, (r) => {
|
|
2790
|
+
r ? (window.addEventListener("keydown", T), !s.value && !u.value && i.value && (u.value = i.value.text)) : window.removeEventListener("keydown", T);
|
|
2791
|
+
}), _e(() => {
|
|
2792
|
+
document.removeEventListener("click", z), window.removeEventListener("keydown", T);
|
|
2793
|
+
}), t({
|
|
2794
|
+
isDropdownOpen: c,
|
|
1770
2795
|
// Expose state
|
|
1771
|
-
selectedItem:
|
|
2796
|
+
selectedItem: i,
|
|
1772
2797
|
// Expose selected item
|
|
1773
|
-
openDropdown:
|
|
2798
|
+
openDropdown: S,
|
|
1774
2799
|
// Expose method to open
|
|
1775
|
-
closeDropdown:
|
|
2800
|
+
closeDropdown: D,
|
|
1776
2801
|
// Expose method to close
|
|
1777
|
-
toggleDropdown:
|
|
2802
|
+
toggleDropdown: k,
|
|
1778
2803
|
// Expose method to toggle
|
|
1779
2804
|
selectItem: v,
|
|
1780
2805
|
// Expose method to select an item programmatically
|
|
1781
|
-
filterText:
|
|
2806
|
+
filterText: u,
|
|
1782
2807
|
// Expose filter text (useful if parent controls filtering)
|
|
1783
|
-
hasDefaultSlotContent:
|
|
2808
|
+
hasDefaultSlotContent: s
|
|
1784
2809
|
// Expose to know if the default slot is used
|
|
1785
|
-
}), (
|
|
2810
|
+
}), (r, b) => (f(), p("div", {
|
|
1786
2811
|
class: "relative w-full max-w-xs form-control",
|
|
1787
2812
|
ref_key: "componentRoot",
|
|
1788
|
-
ref:
|
|
2813
|
+
ref: w
|
|
1789
2814
|
}, [
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
])) :
|
|
1793
|
-
|
|
1794
|
-
class:
|
|
1795
|
-
style:
|
|
1796
|
-
|
|
2815
|
+
e.label ? (f(), p("label", wl, [
|
|
2816
|
+
d("span", xl, O(e.label), 1)
|
|
2817
|
+
])) : E("", !0),
|
|
2818
|
+
d("div", {
|
|
2819
|
+
class: B(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !s.value, select: !s.value }]),
|
|
2820
|
+
style: ye(
|
|
2821
|
+
i.value ? "background-image: unset; padding-right: 0.5rem;" : ""
|
|
1797
2822
|
),
|
|
1798
2823
|
tabindex: "0",
|
|
1799
|
-
onClick:
|
|
2824
|
+
onClick: b[1] || (b[1] = ($) => s.value ? k() : S()),
|
|
1800
2825
|
onKeydown: [
|
|
1801
|
-
|
|
1802
|
-
|
|
2826
|
+
We(te(h, ["prevent"]), ["enter"]),
|
|
2827
|
+
We(te(h, ["prevent"]), ["space"])
|
|
1803
2828
|
],
|
|
1804
|
-
onBlur:
|
|
2829
|
+
onBlur: j,
|
|
1805
2830
|
role: "combobox",
|
|
1806
2831
|
"aria-haspopup": "listbox",
|
|
1807
|
-
"aria-expanded":
|
|
1808
|
-
"aria-activedescendant":
|
|
2832
|
+
"aria-expanded": c.value,
|
|
2833
|
+
"aria-activedescendant": y.value,
|
|
1809
2834
|
"aria-autocomplete": "list",
|
|
1810
2835
|
ref_key: "activatorWrapper",
|
|
1811
|
-
ref:
|
|
2836
|
+
ref: g
|
|
1812
2837
|
}, [
|
|
1813
|
-
|
|
1814
|
-
|
|
2838
|
+
V(r.$slots, "default", {}, () => [
|
|
2839
|
+
s.value ? E("", !0) : Ce((f(), p("input", {
|
|
1815
2840
|
key: 0,
|
|
1816
2841
|
type: "text",
|
|
1817
|
-
placeholder:
|
|
2842
|
+
placeholder: e.placeholder,
|
|
1818
2843
|
class: "bg-transparent border-none focus:outline-none w-full",
|
|
1819
|
-
"onUpdate:modelValue":
|
|
2844
|
+
"onUpdate:modelValue": b[0] || (b[0] = ($) => u.value = $),
|
|
1820
2845
|
ref_key: "filterInput",
|
|
1821
|
-
ref:
|
|
1822
|
-
onFocus:
|
|
1823
|
-
onInput:
|
|
2846
|
+
ref: m,
|
|
2847
|
+
onFocus: S,
|
|
2848
|
+
onInput: x,
|
|
1824
2849
|
tabindex: "-1",
|
|
1825
|
-
disabled:
|
|
1826
|
-
}, null, 40,
|
|
1827
|
-
[
|
|
2850
|
+
disabled: a.disabled
|
|
2851
|
+
}, null, 40, $l)), [
|
|
2852
|
+
[Tt, u.value]
|
|
1828
2853
|
])
|
|
1829
2854
|
]),
|
|
1830
|
-
|
|
2855
|
+
i.value && !e.disabled ? (f(), ae(Z(hn), {
|
|
1831
2856
|
key: 0,
|
|
1832
2857
|
size: 20,
|
|
1833
2858
|
class: "mx-2 text-base-content/50 hover:text-base-content/80 cursor-pointer",
|
|
1834
|
-
onClick:
|
|
1835
|
-
})) :
|
|
1836
|
-
|
|
2859
|
+
onClick: te(H, ["stop"])
|
|
2860
|
+
})) : E("", !0),
|
|
2861
|
+
s.value && !i.value ? (f(), ae(Z(pn), {
|
|
1837
2862
|
key: 1,
|
|
1838
|
-
class:
|
|
2863
|
+
class: B([{ "rotate-180": c.value }, "mx-2"]),
|
|
1839
2864
|
size: 20
|
|
1840
|
-
}, null, 8, ["class"])) :
|
|
1841
|
-
], 46,
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
(
|
|
1845
|
-
key:
|
|
1846
|
-
onMousedown:
|
|
2865
|
+
}, null, 8, ["class"])) : E("", !0)
|
|
2866
|
+
], 46, kl),
|
|
2867
|
+
Ce(d("div", Sl, [
|
|
2868
|
+
d("ul", Cl, [
|
|
2869
|
+
(f(!0), p(U, null, F(C.value, ($, I) => (f(), p("li", {
|
|
2870
|
+
key: $.value,
|
|
2871
|
+
onMousedown: te((P) => v($), ["prevent"]),
|
|
1847
2872
|
class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
|
|
1848
|
-
id: "option-" +
|
|
2873
|
+
id: "option-" + I,
|
|
1849
2874
|
role: "option",
|
|
1850
|
-
"aria-selected":
|
|
2875
|
+
"aria-selected": i.value && i.value.value === $.value
|
|
1851
2876
|
}, [
|
|
1852
|
-
|
|
1853
|
-
], 40,
|
|
2877
|
+
d("a", null, O($.text), 1)
|
|
2878
|
+
], 40, Dl))), 128))
|
|
1854
2879
|
])
|
|
1855
2880
|
], 512), [
|
|
1856
|
-
[
|
|
2881
|
+
[nn, c.value && C.value.length > 0]
|
|
1857
2882
|
])
|
|
1858
2883
|
], 512));
|
|
1859
2884
|
}
|
|
1860
|
-
},
|
|
2885
|
+
}, Tl = { class: "w-full max-w-xs form-control" }, Ml = {
|
|
1861
2886
|
key: 0,
|
|
1862
2887
|
class: "label"
|
|
1863
|
-
},
|
|
2888
|
+
}, Il = { class: "label-text" }, El = ["type", "placeholder", "disabled", "value"], Bl = {
|
|
1864
2889
|
key: 1,
|
|
1865
2890
|
class: "label"
|
|
1866
|
-
},
|
|
2891
|
+
}, Vl = { class: "label-text-alt text-error validator-hint" }, zl = {
|
|
1867
2892
|
key: 2,
|
|
1868
2893
|
class: "label"
|
|
1869
|
-
},
|
|
2894
|
+
}, Pl = { class: "label-text-alt text-success validator-hint" }, Io = /* @__PURE__ */ A({
|
|
1870
2895
|
__name: "inputField",
|
|
1871
2896
|
props: {
|
|
1872
2897
|
modelValue: { default: "" },
|
|
@@ -1882,81 +2907,81 @@ const lt = te("SunIcon", [
|
|
|
1882
2907
|
disabled: { type: Boolean, default: !1 }
|
|
1883
2908
|
},
|
|
1884
2909
|
emits: ["update:modelValue", "validate"],
|
|
1885
|
-
setup(
|
|
1886
|
-
const
|
|
1887
|
-
var
|
|
1888
|
-
let
|
|
1889
|
-
const
|
|
1890
|
-
return (
|
|
1891
|
-
}),
|
|
1892
|
-
const
|
|
1893
|
-
o("update:modelValue",
|
|
1894
|
-
},
|
|
1895
|
-
|
|
2910
|
+
setup(e, { expose: t, emit: n }) {
|
|
2911
|
+
const a = e, o = n, l = M(null), s = M(!1), u = M(""), i = K(() => {
|
|
2912
|
+
var k, C, z, j;
|
|
2913
|
+
let y = !0, S = "";
|
|
2914
|
+
const D = a.modelValue;
|
|
2915
|
+
return (k = a.rules) != null && k.required && (D == null || D === "") && (y = !1, S = "This field is required."), y && ((C = a.rules) == null ? void 0 : C.minLength) !== void 0 && typeof D == "string" && D.length < a.rules.minLength && (y = !1, S = `Must be at least ${a.rules.minLength} characters.`), y && ((z = a.rules) == null ? void 0 : z.maxLength) !== void 0 && typeof D == "string" && D.length > a.rules.maxLength && (y = !1, S = `Cannot exceed ${a.rules.maxLength} characters.`), y && ((j = a.rules) != null && j.email) && typeof D == "string" && D && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(D) || (y = !1, S = "Please enter a valid email address.")), u.value = S, o("validate", y), y;
|
|
2916
|
+
}), c = K(() => s.value && !i.value), m = (y) => {
|
|
2917
|
+
const S = y.target;
|
|
2918
|
+
o("update:modelValue", S.value), s.value && i.value;
|
|
2919
|
+
}, w = () => {
|
|
2920
|
+
s.value = !0, i.value;
|
|
1896
2921
|
};
|
|
1897
|
-
return
|
|
1898
|
-
() =>
|
|
2922
|
+
return R(
|
|
2923
|
+
() => a.modelValue,
|
|
1899
2924
|
() => {
|
|
1900
|
-
|
|
2925
|
+
s.value && i.value;
|
|
1901
2926
|
}
|
|
1902
|
-
),
|
|
2927
|
+
), t({
|
|
1903
2928
|
focusInput: () => {
|
|
1904
|
-
var
|
|
1905
|
-
console.log("inputField.vue: focusInput method called."), (
|
|
2929
|
+
var y;
|
|
2930
|
+
console.log("inputField.vue: focusInput method called."), (y = l.value) == null || y.focus();
|
|
1906
2931
|
},
|
|
1907
|
-
isValid:
|
|
1908
|
-
isTouched:
|
|
1909
|
-
errorMessage:
|
|
1910
|
-
}), (
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
])) :
|
|
1914
|
-
|
|
1915
|
-
|
|
2932
|
+
isValid: i,
|
|
2933
|
+
isTouched: s,
|
|
2934
|
+
errorMessage: u
|
|
2935
|
+
}), (y, S) => (f(), p("div", Tl, [
|
|
2936
|
+
e.label ? (f(), p("label", Ml, [
|
|
2937
|
+
d("span", Il, O(e.label), 1)
|
|
2938
|
+
])) : E("", !0),
|
|
2939
|
+
V(y.$slots, "default"),
|
|
2940
|
+
d("input", {
|
|
1916
2941
|
ref_key: "inputElement",
|
|
1917
2942
|
ref: l,
|
|
1918
|
-
type:
|
|
1919
|
-
placeholder:
|
|
1920
|
-
disabled:
|
|
1921
|
-
class:
|
|
2943
|
+
type: e.type,
|
|
2944
|
+
placeholder: e.placeholder,
|
|
2945
|
+
disabled: a.disabled,
|
|
2946
|
+
class: B(["input-bordered rounded-md w-full input validator", [
|
|
1922
2947
|
{
|
|
1923
2948
|
// Size classes - Apply based on size prop
|
|
1924
|
-
"input-xs":
|
|
1925
|
-
"input-sm":
|
|
1926
|
-
"input-md":
|
|
1927
|
-
"input-lg":
|
|
1928
|
-
"input-xl":
|
|
2949
|
+
"input-xs": e.size === "xs",
|
|
2950
|
+
"input-sm": e.size === "sm",
|
|
2951
|
+
"input-md": e.size === "md",
|
|
2952
|
+
"input-lg": e.size === "lg",
|
|
2953
|
+
"input-xl": e.size === "xl",
|
|
1929
2954
|
// Style classes - Apply based on style prop
|
|
1930
|
-
"input-ghost":
|
|
2955
|
+
"input-ghost": e.style === "ghost",
|
|
1931
2956
|
// Color classes - Apply only if NOT in an error state AND NOT in a validation success state.
|
|
1932
2957
|
// This ensures validation feedback overrides base colors.
|
|
1933
|
-
"input-neutral":
|
|
1934
|
-
"input-primary":
|
|
1935
|
-
"input-secondary":
|
|
1936
|
-
"input-accent":
|
|
1937
|
-
"input-info":
|
|
1938
|
-
"input-success":
|
|
2958
|
+
"input-neutral": e.color === "neutral" && !c.value && !(i.value && s.value && e.needsValidation),
|
|
2959
|
+
"input-primary": e.color === "primary" && !c.value && !(i.value && s.value && e.needsValidation),
|
|
2960
|
+
"input-secondary": e.color === "secondary" && !c.value && !(i.value && s.value && e.needsValidation),
|
|
2961
|
+
"input-accent": e.color === "accent" && !c.value && !(i.value && s.value && e.needsValidation),
|
|
2962
|
+
"input-info": e.color === "info" && !c.value && !(i.value && s.value && e.needsValidation),
|
|
2963
|
+
"input-success": e.color === "success" && !c.value && !(i.value && s.value && e.needsValidation),
|
|
1939
2964
|
// Color success applies only if not in error or validation success state
|
|
1940
|
-
"input-warning":
|
|
2965
|
+
"input-warning": e.color === "warning" && !c.value && !(i.value && s.value && e.needsValidation),
|
|
1941
2966
|
// Validation state classes - These take precedence visually via conditions or CSS specificity.
|
|
1942
|
-
"input-error":
|
|
2967
|
+
"input-error": c.value,
|
|
1943
2968
|
// Apply error style if validation fails
|
|
1944
|
-
"input-success-validation":
|
|
2969
|
+
"input-success-validation": i.value && s.value && !c.value && e.needsValidation
|
|
1945
2970
|
// Apply validation success style if valid, touched, not error, AND validation is needed. Using a distinct name 'input-success-validation' is recommended to avoid CSS conflicts with the 'input-success' color class.
|
|
1946
2971
|
}
|
|
1947
2972
|
]]),
|
|
1948
|
-
value:
|
|
1949
|
-
onInput:
|
|
1950
|
-
onBlur:
|
|
1951
|
-
}, null, 42,
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
])) :
|
|
1955
|
-
|
|
1956
|
-
])) :
|
|
2973
|
+
value: e.modelValue,
|
|
2974
|
+
onInput: m,
|
|
2975
|
+
onBlur: w
|
|
2976
|
+
}, null, 42, El),
|
|
2977
|
+
c.value ? (f(), p("div", Bl, [
|
|
2978
|
+
d("span", Vl, O(u.value), 1)
|
|
2979
|
+
])) : i.value && s.value && e.successMessage ? (f(), p("div", zl, [
|
|
2980
|
+
d("span", Pl, O(e.successMessage), 1)
|
|
2981
|
+
])) : E("", !0)
|
|
1957
2982
|
]));
|
|
1958
2983
|
}
|
|
1959
|
-
}),
|
|
2984
|
+
}), Eo = /* @__PURE__ */ A({
|
|
1960
2985
|
__name: "loader",
|
|
1961
2986
|
props: {
|
|
1962
2987
|
loading: { type: Boolean, default: !0 },
|
|
@@ -1964,47 +2989,47 @@ const lt = te("SunIcon", [
|
|
|
1964
2989
|
type: { default: "spinner" },
|
|
1965
2990
|
color: { default: "primary" }
|
|
1966
2991
|
},
|
|
1967
|
-
setup(
|
|
1968
|
-
const
|
|
1969
|
-
return
|
|
1970
|
-
() =>
|
|
1971
|
-
(
|
|
1972
|
-
|
|
2992
|
+
setup(e) {
|
|
2993
|
+
const t = e, n = M(t.loading);
|
|
2994
|
+
return R(
|
|
2995
|
+
() => t.loading,
|
|
2996
|
+
(a) => {
|
|
2997
|
+
n.value = a;
|
|
1973
2998
|
}
|
|
1974
|
-
), (
|
|
2999
|
+
), (a, o) => n.value ? (f(), p("span", {
|
|
1975
3000
|
key: 0,
|
|
1976
|
-
class:
|
|
1977
|
-
{ "loading-xs":
|
|
1978
|
-
{ "loading-sm":
|
|
1979
|
-
{ "loading-md":
|
|
1980
|
-
{ "loading-lg":
|
|
1981
|
-
{ "loading-xl":
|
|
3001
|
+
class: B(["loading", [
|
|
3002
|
+
{ "loading-xs": e.size === "xs" },
|
|
3003
|
+
{ "loading-sm": e.size === "sm" },
|
|
3004
|
+
{ "loading-md": e.size === "md" },
|
|
3005
|
+
{ "loading-lg": e.size === "lg" },
|
|
3006
|
+
{ "loading-xl": e.size === "xl" },
|
|
1982
3007
|
// types
|
|
1983
|
-
{ "loading-spinner":
|
|
1984
|
-
{ "loading-dots":
|
|
1985
|
-
{ "loading-ring":
|
|
1986
|
-
{ "loading-balls":
|
|
1987
|
-
{ "loading-bars":
|
|
1988
|
-
{ "loading-infinity":
|
|
3008
|
+
{ "loading-spinner": e.type === "spinner" },
|
|
3009
|
+
{ "loading-dots": e.type === "dots" },
|
|
3010
|
+
{ "loading-ring": e.type === "ring" },
|
|
3011
|
+
{ "loading-balls": e.type === "balls" },
|
|
3012
|
+
{ "loading-bars": e.type === "bars" },
|
|
3013
|
+
{ "loading-infinity": e.type === "infinity" },
|
|
1989
3014
|
// colors
|
|
1990
|
-
{ "text-primary":
|
|
1991
|
-
{ "text-secondary":
|
|
1992
|
-
{ "text-accent":
|
|
1993
|
-
{ "text-neutral":
|
|
1994
|
-
{ "text-info":
|
|
1995
|
-
{ "text-success":
|
|
1996
|
-
{ "text-warning":
|
|
1997
|
-
{ "text-error":
|
|
3015
|
+
{ "text-primary": e.color === "primary" },
|
|
3016
|
+
{ "text-secondary": e.color === "secondary" },
|
|
3017
|
+
{ "text-accent": e.color === "accent" },
|
|
3018
|
+
{ "text-neutral": e.color === "neutral" },
|
|
3019
|
+
{ "text-info": e.color === "info" },
|
|
3020
|
+
{ "text-success": e.color === "success" },
|
|
3021
|
+
{ "text-warning": e.color === "warning" },
|
|
3022
|
+
{ "text-error": e.color === "error" }
|
|
1998
3023
|
]])
|
|
1999
|
-
}, null, 2)) :
|
|
3024
|
+
}, null, 2)) : E("", !0);
|
|
2000
3025
|
}
|
|
2001
|
-
}),
|
|
3026
|
+
}), Ol = { class: "footer sm:footer-horizontal container" }, Nl = { class: "footer-title" }, Al = ["href"], Ll = {
|
|
2002
3027
|
key: 0,
|
|
2003
3028
|
class: "sm:hidden w-full"
|
|
2004
|
-
},
|
|
3029
|
+
}, Ul = { class: "border-b-2 border-base-100 last:border-b-0 w-full" }, jl = {
|
|
2005
3030
|
tabindex: "0",
|
|
2006
3031
|
class: "collapse collapse-plus w-full"
|
|
2007
|
-
},
|
|
3032
|
+
}, Fl = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, Rl = { class: "collapse-content flex w-full text-sm" }, ql = { class: "flex flex-col gap-2.5" }, Hl = { class: "w-full" }, _l = ["href"], Wl = { class: "w-full" }, Bo = /* @__PURE__ */ A({
|
|
2008
3033
|
__name: "footer",
|
|
2009
3034
|
props: {
|
|
2010
3035
|
items: {},
|
|
@@ -2012,119 +3037,119 @@ const lt = te("SunIcon", [
|
|
|
2012
3037
|
color: {},
|
|
2013
3038
|
collapseOnMobile: { type: Boolean, default: !1 }
|
|
2014
3039
|
},
|
|
2015
|
-
setup(
|
|
2016
|
-
const
|
|
2017
|
-
return (
|
|
2018
|
-
class:
|
|
3040
|
+
setup(e) {
|
|
3041
|
+
const t = e;
|
|
3042
|
+
return (n, a) => (f(), p("div", {
|
|
3043
|
+
class: B(["mx-auto md:px-10 py-10 text-base-content", [e.background ?? "bg-base-200", e.color ?? "text-base-content"]])
|
|
2019
3044
|
}, [
|
|
2020
|
-
|
|
2021
|
-
(
|
|
2022
|
-
class:
|
|
3045
|
+
d("footer", Ol, [
|
|
3046
|
+
(f(!0), p(U, null, F(t.items, (o) => (f(), p("nav", {
|
|
3047
|
+
class: B([{ "hidden sm:grid": e.collapseOnMobile }])
|
|
2023
3048
|
}, [
|
|
2024
|
-
|
|
2025
|
-
(
|
|
3049
|
+
d("h6", Nl, O(o.title), 1),
|
|
3050
|
+
(f(!0), p(U, null, F(o.items, (l) => (f(), p("a", {
|
|
2026
3051
|
class: "link link-hover",
|
|
2027
3052
|
href: l.link
|
|
2028
|
-
},
|
|
3053
|
+
}, O(l.text), 9, Al))), 256))
|
|
2029
3054
|
], 2))), 256)),
|
|
2030
|
-
e.collapseOnMobile ? (
|
|
2031
|
-
(
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
(
|
|
2037
|
-
|
|
3055
|
+
e.collapseOnMobile ? (f(), p("nav", Ll, [
|
|
3056
|
+
(f(!0), p(U, null, F(t.items, (o) => (f(), p("ul", Ul, [
|
|
3057
|
+
d("div", jl, [
|
|
3058
|
+
d("div", Fl, O(o.title), 1),
|
|
3059
|
+
d("div", Rl, [
|
|
3060
|
+
d("ul", ql, [
|
|
3061
|
+
(f(!0), p(U, null, F(o.items, (l) => (f(), p("li", Hl, [
|
|
3062
|
+
d("a", {
|
|
2038
3063
|
class: "w-full font-medium link link-hover",
|
|
2039
3064
|
href: l.link
|
|
2040
|
-
},
|
|
3065
|
+
}, O(l.text), 9, _l)
|
|
2041
3066
|
]))), 256))
|
|
2042
3067
|
])
|
|
2043
3068
|
])
|
|
2044
3069
|
])
|
|
2045
3070
|
]))), 256))
|
|
2046
|
-
])) :
|
|
2047
|
-
|
|
2048
|
-
|
|
3071
|
+
])) : E("", !0),
|
|
3072
|
+
d("aside", Wl, [
|
|
3073
|
+
V(n.$slots, "default")
|
|
2049
3074
|
])
|
|
2050
3075
|
])
|
|
2051
3076
|
], 2));
|
|
2052
3077
|
}
|
|
2053
|
-
}),
|
|
2054
|
-
function
|
|
2055
|
-
return
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
3078
|
+
}), Zl = {}, Kl = { class: "min-h-40 container hero" }, Yl = { class: "px-0! text-center hero-content" }, Jl = { class: "mt-9 text-4xl" };
|
|
3079
|
+
function Xl(e, t) {
|
|
3080
|
+
return f(), p("div", Kl, [
|
|
3081
|
+
d("div", Yl, [
|
|
3082
|
+
d("div", null, [
|
|
3083
|
+
d("h1", Jl, [
|
|
3084
|
+
V(e.$slots, "title", {}, () => [
|
|
3085
|
+
t[0] || (t[0] = Ct("hero title", -1))
|
|
2061
3086
|
])
|
|
2062
3087
|
]),
|
|
2063
|
-
|
|
2064
|
-
|
|
3088
|
+
d("p", null, [
|
|
3089
|
+
V(e.$slots, "description", { class: "py-9" })
|
|
2065
3090
|
]),
|
|
2066
|
-
|
|
2067
|
-
|
|
3091
|
+
V(e.$slots, "call-to-action-block", { class: "max-w-full" }, () => [
|
|
3092
|
+
t[1] || (t[1] = d("button", { class: "btn btn-primary" }, "Call to action", -1))
|
|
2068
3093
|
])
|
|
2069
3094
|
])
|
|
2070
3095
|
])
|
|
2071
3096
|
]);
|
|
2072
3097
|
}
|
|
2073
|
-
const
|
|
3098
|
+
const Vo = /* @__PURE__ */ we(Zl, [["render", Xl]]), Gl = { class: "flex flex-row place-content-center gap-4 categories" }, Ql = ["onClick"], zo = /* @__PURE__ */ A({
|
|
2074
3099
|
__name: "categoryNavigation",
|
|
2075
3100
|
props: {
|
|
2076
3101
|
searchOptions: {},
|
|
2077
3102
|
currentCategory: {}
|
|
2078
3103
|
},
|
|
2079
3104
|
emits: ["update:currentCategory"],
|
|
2080
|
-
setup(
|
|
2081
|
-
const
|
|
3105
|
+
setup(e, { emit: t }) {
|
|
3106
|
+
const n = e, a = t;
|
|
2082
3107
|
function o(l) {
|
|
2083
|
-
|
|
3108
|
+
a("update:currentCategory", l);
|
|
2084
3109
|
}
|
|
2085
|
-
return (l,
|
|
2086
|
-
(
|
|
2087
|
-
key:
|
|
3110
|
+
return (l, s) => (f(), p("div", Gl, [
|
|
3111
|
+
(f(!0), p(U, null, F(n.searchOptions, (u) => (f(), p("div", {
|
|
3112
|
+
key: u.category
|
|
2088
3113
|
}, [
|
|
2089
|
-
|
|
2090
|
-
onClick: (
|
|
2091
|
-
class:
|
|
2092
|
-
},
|
|
3114
|
+
d("button", {
|
|
3115
|
+
onClick: (i) => o(u.category),
|
|
3116
|
+
class: B(["truncate btn btn-ghost", { "font-semibold": n.currentCategory === u.category }])
|
|
3117
|
+
}, O(u.category), 11, Ql)
|
|
2093
3118
|
]))), 128))
|
|
2094
3119
|
]));
|
|
2095
3120
|
}
|
|
2096
|
-
}),
|
|
3121
|
+
}), eo = { class: "md:flex hidden navbar-start" }, to = { class: "md:flex justify-center items-center hidden navbar-center" }, no = { class: "md:flex hidden navbar-end" }, ao = { class: "navbar-bottom md:flex hidden" }, lo = /* @__PURE__ */ A({
|
|
2097
3122
|
__name: "navigationBar",
|
|
2098
3123
|
props: {
|
|
2099
3124
|
isCollapsed: { type: Boolean, default: !0 }
|
|
2100
3125
|
},
|
|
2101
|
-
setup(
|
|
2102
|
-
const
|
|
2103
|
-
return (
|
|
2104
|
-
class:
|
|
3126
|
+
setup(e) {
|
|
3127
|
+
const t = e;
|
|
3128
|
+
return (n, a) => (f(), p("nav", {
|
|
3129
|
+
class: B(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar", t.isCollapsed ? "collapsed" : ""])
|
|
2105
3130
|
}, [
|
|
2106
|
-
|
|
2107
|
-
|
|
3131
|
+
d("div", eo, [
|
|
3132
|
+
V(n.$slots, "start", {}, void 0, !0)
|
|
2108
3133
|
]),
|
|
2109
|
-
|
|
2110
|
-
|
|
3134
|
+
d("div", to, [
|
|
3135
|
+
V(n.$slots, "center", {}, void 0, !0)
|
|
2111
3136
|
]),
|
|
2112
|
-
|
|
2113
|
-
|
|
3137
|
+
d("div", no, [
|
|
3138
|
+
V(n.$slots, "end", {}, void 0, !0)
|
|
2114
3139
|
]),
|
|
2115
|
-
|
|
2116
|
-
|
|
3140
|
+
d("div", ao, [
|
|
3141
|
+
V(n.$slots, "bottom", {}, void 0, !0)
|
|
2117
3142
|
])
|
|
2118
3143
|
], 2));
|
|
2119
3144
|
}
|
|
2120
|
-
}),
|
|
3145
|
+
}), Po = /* @__PURE__ */ we(lo, [["__scopeId", "data-v-8ddb2b45"]]), oo = {
|
|
2121
3146
|
key: 0,
|
|
2122
3147
|
class: "hidden top-4 right-0 absolute md:flex gap-4"
|
|
2123
|
-
},
|
|
3148
|
+
}, so = ["onClick", "aria-selected"], io = {
|
|
2124
3149
|
key: 0,
|
|
2125
3150
|
role: "tabpanel",
|
|
2126
3151
|
class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full overflow-x-auto tab-content"
|
|
2127
|
-
},
|
|
3152
|
+
}, ro = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, Oo = /* @__PURE__ */ A({
|
|
2128
3153
|
__name: "tab",
|
|
2129
3154
|
props: {
|
|
2130
3155
|
items: {},
|
|
@@ -2133,82 +3158,82 @@ const zn = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-ro
|
|
|
2133
3158
|
buttonOnlyMode: { type: Boolean, default: !1 }
|
|
2134
3159
|
},
|
|
2135
3160
|
emits: ["tab-changed"],
|
|
2136
|
-
setup(
|
|
2137
|
-
const
|
|
2138
|
-
function l(
|
|
2139
|
-
|
|
3161
|
+
setup(e, { emit: t }) {
|
|
3162
|
+
const n = e, a = M(n.items[0]), o = t;
|
|
3163
|
+
function l(i) {
|
|
3164
|
+
a.value = i, o("tab-changed", i);
|
|
2140
3165
|
}
|
|
2141
|
-
function
|
|
2142
|
-
const
|
|
2143
|
-
l(
|
|
3166
|
+
function s() {
|
|
3167
|
+
const c = (n.items.indexOf(a.value) + 1) % n.items.length;
|
|
3168
|
+
l(n.items[c]);
|
|
2144
3169
|
}
|
|
2145
|
-
function
|
|
2146
|
-
const
|
|
2147
|
-
l(
|
|
3170
|
+
function u() {
|
|
3171
|
+
const c = (n.items.indexOf(a.value) - 1 + n.items.length) % n.items.length;
|
|
3172
|
+
l(n.items[c]);
|
|
2148
3173
|
}
|
|
2149
|
-
return
|
|
2150
|
-
|
|
2151
|
-
}),
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
},
|
|
2155
|
-
}), (
|
|
2156
|
-
|
|
3174
|
+
return ue(() => {
|
|
3175
|
+
n.items && l(n.items[0]);
|
|
3176
|
+
}), Dt(() => {
|
|
3177
|
+
n.rotateTabsAfter && n.rotateTabsAfter > 0 && setInterval(() => {
|
|
3178
|
+
s();
|
|
3179
|
+
}, n.rotateTabsAfter * 1e3);
|
|
3180
|
+
}), (i, c) => (f(), p(U, null, [
|
|
3181
|
+
d("div", {
|
|
2157
3182
|
role: "tablist",
|
|
2158
|
-
class:
|
|
3183
|
+
class: B(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto": e.buttonOnlyMode }])
|
|
2159
3184
|
}, [
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
onClick:
|
|
3185
|
+
e.withControlls ? (f(), p("div", oo, [
|
|
3186
|
+
d("button", {
|
|
3187
|
+
onClick: c[0] || (c[0] = (m) => u()),
|
|
2163
3188
|
class: "cursor-pointer"
|
|
2164
3189
|
}, "Previous"),
|
|
2165
|
-
|
|
2166
|
-
onClick:
|
|
3190
|
+
d("button", {
|
|
3191
|
+
onClick: c[1] || (c[1] = (m) => s()),
|
|
2167
3192
|
class: "text-primary cursor-pointer"
|
|
2168
3193
|
}, "Next")
|
|
2169
|
-
])) :
|
|
2170
|
-
(
|
|
2171
|
-
|
|
3194
|
+
])) : E("", !0),
|
|
3195
|
+
(f(!0), p(U, null, F(e.items, (m) => (f(), p(U, null, [
|
|
3196
|
+
d("a", {
|
|
2172
3197
|
type: "button",
|
|
2173
3198
|
role: "tab",
|
|
2174
|
-
class:
|
|
2175
|
-
onClick: (
|
|
2176
|
-
"aria-selected":
|
|
2177
|
-
},
|
|
2178
|
-
|
|
2179
|
-
|
|
3199
|
+
class: B(["min-w-max tab", m === a.value ? "bg-primary text-base-100" : ""]),
|
|
3200
|
+
onClick: (w) => l(m),
|
|
3201
|
+
"aria-selected": a.value == m
|
|
3202
|
+
}, O(m), 11, so),
|
|
3203
|
+
e.buttonOnlyMode ? E("", !0) : (f(), p("div", io, [
|
|
3204
|
+
V(i.$slots, `${m}-tab`)
|
|
2180
3205
|
]))
|
|
2181
3206
|
], 64))), 256))
|
|
2182
3207
|
], 2),
|
|
2183
|
-
|
|
2184
|
-
|
|
3208
|
+
d("div", ro, [
|
|
3209
|
+
V(i.$slots, "default")
|
|
2185
3210
|
])
|
|
2186
3211
|
], 64));
|
|
2187
3212
|
}
|
|
2188
3213
|
});
|
|
2189
3214
|
export {
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
3215
|
+
go as Accordion,
|
|
3216
|
+
$o as AdvancedSearch,
|
|
3217
|
+
yo as Avatar,
|
|
3218
|
+
bo as Badge,
|
|
3219
|
+
fo as ButtonComponent,
|
|
3220
|
+
wo as Card,
|
|
3221
|
+
xo as Carousel,
|
|
3222
|
+
ko as CarouselItem,
|
|
3223
|
+
zo as CategoryNavigation,
|
|
3224
|
+
So as DatetimePicker,
|
|
3225
|
+
mo as Dropdown,
|
|
3226
|
+
Mo as FilterableSelect,
|
|
3227
|
+
Bo as Footer,
|
|
3228
|
+
Vo as Hero,
|
|
3229
|
+
Io as InputField,
|
|
3230
|
+
Eo as Loader,
|
|
3231
|
+
po as Modal,
|
|
3232
|
+
Po as NavigationBar,
|
|
3233
|
+
Co as Rating,
|
|
3234
|
+
To as Selector,
|
|
3235
|
+
ho as Swap,
|
|
3236
|
+
Oo as Tab,
|
|
3237
|
+
Do as TagInput,
|
|
3238
|
+
vo as ThemeController
|
|
2214
3239
|
};
|