@hotelinking/ui 1.10.0 → 1.19.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/README.md +3 -1
- package/dist/style.css +3 -0
- package/dist/ui.cjs.js +3 -3
- package/dist/ui.es.js +2852 -998
- package/package.json +13 -6
- package/dist/index.css +0 -1359
package/dist/ui.es.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
|
|
1
|
+
import { openBlock as g, createBlock as le, resolveDynamicComponent as yn, normalizeClass as R, createElementBlock as x, createVNode as S, renderSlot as Ae, ref as w, createElementVNode as c, cloneVNode as xn, h as q, Fragment as Z, inject as ne, provide as ie, onMounted as U, watchEffect as ee, nextTick as oe, computed as y, defineComponent as A, toRaw as H, watch as be, onUnmounted as se, Teleport as wn, reactive as Sn, unref as _, shallowRef as kn, withCtx as Y, createTextVNode as ye, toDisplayString as O, Transition as Ot, renderList as ue, createCommentVNode as W, withDirectives as G, vModelDynamic as $n, vShow as re, withModifiers as ht, vModelText as _n, resolveComponent as Oe, vModelCheckbox as Cn } from "vue";
|
|
2
|
+
import V from "dayjs";
|
|
3
|
+
import On from "vue3-apexcharts";
|
|
4
|
+
const Dn = { name: "uiIcon" }, ve = /* @__PURE__ */ Object.assign(Dn, {
|
|
3
5
|
props: {
|
|
4
6
|
/**
|
|
5
7
|
* COMPONENTE del icono
|
|
@@ -15,8 +17,8 @@ const dt = { name: "uiIcon" }, Y = /* @__PURE__ */ Object.assign(dt, {
|
|
|
15
17
|
color: { type: String, default: "primary" }
|
|
16
18
|
},
|
|
17
19
|
setup(e) {
|
|
18
|
-
return (
|
|
19
|
-
class:
|
|
20
|
+
return (t, o) => (g(), le(yn(e.icon), {
|
|
21
|
+
class: R({
|
|
20
22
|
"h-4 w-4": e.size === "normal",
|
|
21
23
|
"h-6 w-6": e.size === "big",
|
|
22
24
|
"h-12 w-12": e.size === "huge",
|
|
@@ -32,9 +34,9 @@ const dt = { name: "uiIcon" }, Y = /* @__PURE__ */ Object.assign(dt, {
|
|
|
32
34
|
})
|
|
33
35
|
}, null, 8, ["class"]));
|
|
34
36
|
}
|
|
35
|
-
}),
|
|
37
|
+
}), Mn = ["disabled"], Tn = {
|
|
36
38
|
name: "uiButton"
|
|
37
|
-
},
|
|
39
|
+
}, Dt = /* @__PURE__ */ Object.assign(Tn, {
|
|
38
40
|
props: {
|
|
39
41
|
/**
|
|
40
42
|
* Color del botón
|
|
@@ -67,9 +69,9 @@ const dt = { name: "uiIcon" }, Y = /* @__PURE__ */ Object.assign(dt, {
|
|
|
67
69
|
}
|
|
68
70
|
},
|
|
69
71
|
setup(e) {
|
|
70
|
-
return (
|
|
72
|
+
return (t, o) => (g(), x("button", {
|
|
71
73
|
disabled: e.disabled,
|
|
72
|
-
class:
|
|
74
|
+
class: R([{
|
|
73
75
|
"bg-indigo-600 hover:bg-indigo-800": e.color === "primary",
|
|
74
76
|
"bg-cyan-300 hover:bg-cyan-500": e.color === "secondary",
|
|
75
77
|
"bg-red-400 hover:bg-red-600": e.color === "red",
|
|
@@ -81,17 +83,17 @@ const dt = { name: "uiIcon" }, Y = /* @__PURE__ */ Object.assign(dt, {
|
|
|
81
83
|
}, "inline-flex items-center border border-transparent font-medium shadow-sm text-white focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-25"]),
|
|
82
84
|
type: "button"
|
|
83
85
|
}, [
|
|
84
|
-
|
|
86
|
+
S(ve, {
|
|
85
87
|
icon: e.icon,
|
|
86
88
|
color: "white",
|
|
87
89
|
class: "-ml-0.5 mr-2"
|
|
88
90
|
}, null, 8, ["icon"]),
|
|
89
|
-
|
|
90
|
-
], 10,
|
|
91
|
+
Ae(t.$slots, "default")
|
|
92
|
+
], 10, Mn));
|
|
91
93
|
}
|
|
92
|
-
}),
|
|
94
|
+
}), En = { class: "relative flex items-start" }, Pn = { class: "flex items-center h-5" }, Ln = ["checked", "value", "disabled"], Rn = { class: "ml-3 text-sm" }, jn = { class: "text-gray-500" }, In = {
|
|
93
95
|
name: "uiCheckbox"
|
|
94
|
-
},
|
|
96
|
+
}, An = /* @__PURE__ */ Object.assign(In, {
|
|
95
97
|
props: {
|
|
96
98
|
/**
|
|
97
99
|
* Checkbox desactivado
|
|
@@ -115,197 +117,200 @@ const dt = { name: "uiIcon" }, Y = /* @__PURE__ */ Object.assign(dt, {
|
|
|
115
117
|
}
|
|
116
118
|
},
|
|
117
119
|
emits: ["checkboxChanged"],
|
|
118
|
-
setup(e, { emit:
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
checked:
|
|
122
|
-
value:
|
|
120
|
+
setup(e, { emit: t }) {
|
|
121
|
+
const o = e, r = w(o.check), n = () => {
|
|
122
|
+
o.disabled || (r.value = !r.value, t("checkboxChanged", {
|
|
123
|
+
checked: r.value,
|
|
124
|
+
value: o.value
|
|
123
125
|
}));
|
|
124
126
|
};
|
|
125
|
-
return (
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
return (l, a) => (g(), x("div", En, [
|
|
128
|
+
c("div", Pn, [
|
|
129
|
+
c("input", {
|
|
128
130
|
checked: e.check,
|
|
129
131
|
value: e.value,
|
|
130
132
|
disabled: e.disabled,
|
|
131
133
|
class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded disabled:opacity-25",
|
|
132
134
|
type: "checkbox",
|
|
133
|
-
onChange:
|
|
134
|
-
}, null, 40,
|
|
135
|
+
onChange: a[0] || (a[0] = (i) => n())
|
|
136
|
+
}, null, 40, Ln)
|
|
135
137
|
]),
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
c("div", Rn, [
|
|
139
|
+
c("span", jn, [
|
|
140
|
+
Ae(l.$slots, "default")
|
|
139
141
|
])
|
|
140
142
|
])
|
|
141
143
|
]));
|
|
142
144
|
}
|
|
143
145
|
});
|
|
144
|
-
function
|
|
145
|
-
if (e in
|
|
146
|
-
let
|
|
147
|
-
return typeof
|
|
146
|
+
function K(e, t, ...o) {
|
|
147
|
+
if (e in t) {
|
|
148
|
+
let n = t[e];
|
|
149
|
+
return typeof n == "function" ? n(...o) : n;
|
|
148
150
|
}
|
|
149
|
-
let
|
|
150
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
151
|
+
let r = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((n) => `"${n}"`).join(", ")}.`);
|
|
152
|
+
throw Error.captureStackTrace && Error.captureStackTrace(r, K), r;
|
|
151
153
|
}
|
|
152
|
-
var
|
|
153
|
-
function
|
|
154
|
-
var
|
|
155
|
-
let
|
|
156
|
-
if (e ||
|
|
157
|
-
return
|
|
158
|
-
if (
|
|
159
|
-
let
|
|
160
|
-
return
|
|
154
|
+
var me = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(me || {}), xe = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(xe || {});
|
|
155
|
+
function B({ visible: e = !0, features: t = 0, ourProps: o, theirProps: r, ...n }) {
|
|
156
|
+
var l;
|
|
157
|
+
let a = Tt(r, o), i = Object.assign(n, { props: a });
|
|
158
|
+
if (e || t & 2 && a.static)
|
|
159
|
+
return Xe(i);
|
|
160
|
+
if (t & 1) {
|
|
161
|
+
let s = (l = a.unmount) == null || l ? 0 : 1;
|
|
162
|
+
return K(s, { [0]() {
|
|
161
163
|
return null;
|
|
162
164
|
}, [1]() {
|
|
163
|
-
return
|
|
165
|
+
return Xe({ ...n, props: { ...a, hidden: !0, style: { display: "none" } } });
|
|
164
166
|
} });
|
|
165
167
|
}
|
|
166
|
-
return
|
|
167
|
-
}
|
|
168
|
-
function
|
|
169
|
-
var
|
|
170
|
-
let { as:
|
|
171
|
-
if (
|
|
172
|
-
let
|
|
173
|
-
for (let [
|
|
174
|
-
typeof b == "boolean" && (
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
if (
|
|
178
|
-
if (u =
|
|
179
|
-
let [
|
|
180
|
-
if (!
|
|
181
|
-
throw new Error(['Passing props on "template"!', "", `The current component <${
|
|
182
|
-
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((
|
|
168
|
+
return Xe(i);
|
|
169
|
+
}
|
|
170
|
+
function Xe({ props: e, attrs: t, slots: o, slot: r, name: n }) {
|
|
171
|
+
var l, a;
|
|
172
|
+
let { as: i, ...s } = Fe(e, ["unmount", "static"]), u = (l = o.default) == null ? void 0 : l.call(o, r), d = {};
|
|
173
|
+
if (r) {
|
|
174
|
+
let m = !1, v = [];
|
|
175
|
+
for (let [p, b] of Object.entries(r))
|
|
176
|
+
typeof b == "boolean" && (m = !0), b === !0 && v.push(p);
|
|
177
|
+
m && (d["data-headlessui-state"] = v.join(" "));
|
|
178
|
+
}
|
|
179
|
+
if (i === "template") {
|
|
180
|
+
if (u = Mt(u ?? []), Object.keys(s).length > 0 || Object.keys(t).length > 0) {
|
|
181
|
+
let [m, ...v] = u ?? [];
|
|
182
|
+
if (!Fn(m) || v.length > 0)
|
|
183
|
+
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(s).concat(Object.keys(t)).map((h) => h.trim()).filter((h, f, $) => $.indexOf(h) === f).sort((h, f) => h.localeCompare(f)).map((h) => ` - ${h}`).join(`
|
|
184
|
+
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((h) => ` - ${h}`).join(`
|
|
183
185
|
`)].join(`
|
|
184
186
|
`));
|
|
185
|
-
let
|
|
186
|
-
for (let
|
|
187
|
-
|
|
187
|
+
let p = Tt((a = m.props) != null ? a : {}, s), b = xn(m, p);
|
|
188
|
+
for (let h in p)
|
|
189
|
+
h.startsWith("on") && (b.props || (b.props = {}), b.props[h] = p[h]);
|
|
188
190
|
return b;
|
|
189
191
|
}
|
|
190
192
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
191
193
|
}
|
|
192
|
-
return
|
|
194
|
+
return q(i, Object.assign({}, s, d), { default: () => u });
|
|
193
195
|
}
|
|
194
|
-
function
|
|
195
|
-
return e.flatMap((
|
|
196
|
+
function Mt(e) {
|
|
197
|
+
return e.flatMap((t) => t.type === Z ? Mt(t.children) : [t]);
|
|
196
198
|
}
|
|
197
|
-
function
|
|
199
|
+
function Tt(...e) {
|
|
198
200
|
if (e.length === 0)
|
|
199
201
|
return {};
|
|
200
202
|
if (e.length === 1)
|
|
201
203
|
return e[0];
|
|
202
|
-
let
|
|
203
|
-
for (let
|
|
204
|
-
for (let
|
|
205
|
-
|
|
206
|
-
if (
|
|
207
|
-
return Object.assign(
|
|
208
|
-
for (let
|
|
209
|
-
Object.assign(
|
|
210
|
-
let
|
|
211
|
-
for (let
|
|
212
|
-
if (
|
|
204
|
+
let t = {}, o = {};
|
|
205
|
+
for (let r of e)
|
|
206
|
+
for (let n in r)
|
|
207
|
+
n.startsWith("on") && typeof r[n] == "function" ? (o[n] != null || (o[n] = []), o[n].push(r[n])) : t[n] = r[n];
|
|
208
|
+
if (t.disabled || t["aria-disabled"])
|
|
209
|
+
return Object.assign(t, Object.fromEntries(Object.keys(o).map((r) => [r, void 0])));
|
|
210
|
+
for (let r in o)
|
|
211
|
+
Object.assign(t, { [r](n, ...l) {
|
|
212
|
+
let a = o[r];
|
|
213
|
+
for (let i of a) {
|
|
214
|
+
if (n instanceof Event && n.defaultPrevented)
|
|
213
215
|
return;
|
|
214
|
-
|
|
216
|
+
i(n, ...l);
|
|
215
217
|
}
|
|
216
218
|
} });
|
|
217
|
-
return
|
|
219
|
+
return t;
|
|
218
220
|
}
|
|
219
|
-
function
|
|
220
|
-
let
|
|
221
|
-
for (let
|
|
222
|
-
|
|
223
|
-
return
|
|
224
|
-
}
|
|
225
|
-
function
|
|
226
|
-
let
|
|
227
|
-
for (let
|
|
228
|
-
|
|
229
|
-
return
|
|
230
|
-
}
|
|
231
|
-
function
|
|
221
|
+
function Et(e) {
|
|
222
|
+
let t = Object.assign({}, e);
|
|
223
|
+
for (let o in t)
|
|
224
|
+
t[o] === void 0 && delete t[o];
|
|
225
|
+
return t;
|
|
226
|
+
}
|
|
227
|
+
function Fe(e, t = []) {
|
|
228
|
+
let o = Object.assign({}, e);
|
|
229
|
+
for (let r of t)
|
|
230
|
+
r in o && delete o[r];
|
|
231
|
+
return o;
|
|
232
|
+
}
|
|
233
|
+
function Fn(e) {
|
|
232
234
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
233
235
|
}
|
|
234
|
-
let
|
|
235
|
-
function
|
|
236
|
-
return ++
|
|
236
|
+
let Bn = 0;
|
|
237
|
+
function Nn() {
|
|
238
|
+
return ++Bn;
|
|
237
239
|
}
|
|
238
|
-
function
|
|
239
|
-
return
|
|
240
|
+
function te() {
|
|
241
|
+
return Nn();
|
|
240
242
|
}
|
|
241
|
-
var
|
|
242
|
-
function
|
|
243
|
+
var P = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(P || {});
|
|
244
|
+
function Hn(e) {
|
|
243
245
|
throw new Error("Unexpected object: " + e);
|
|
244
246
|
}
|
|
245
|
-
var
|
|
246
|
-
function
|
|
247
|
-
let
|
|
248
|
-
if (
|
|
247
|
+
var I = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(I || {});
|
|
248
|
+
function Pt(e, t) {
|
|
249
|
+
let o = t.resolveItems();
|
|
250
|
+
if (o.length <= 0)
|
|
249
251
|
return null;
|
|
250
|
-
let
|
|
252
|
+
let r = t.resolveActiveIndex(), n = r ?? -1, l = (() => {
|
|
251
253
|
switch (e.focus) {
|
|
252
254
|
case 0:
|
|
253
|
-
return
|
|
255
|
+
return o.findIndex((a) => !t.resolveDisabled(a));
|
|
254
256
|
case 1: {
|
|
255
|
-
let
|
|
256
|
-
return
|
|
257
|
+
let a = o.slice().reverse().findIndex((i, s, u) => n !== -1 && u.length - s - 1 >= n ? !1 : !t.resolveDisabled(i));
|
|
258
|
+
return a === -1 ? a : o.length - 1 - a;
|
|
257
259
|
}
|
|
258
260
|
case 2:
|
|
259
|
-
return
|
|
261
|
+
return o.findIndex((a, i) => i <= n ? !1 : !t.resolveDisabled(a));
|
|
260
262
|
case 3: {
|
|
261
|
-
let
|
|
262
|
-
return
|
|
263
|
+
let a = o.slice().reverse().findIndex((i) => !t.resolveDisabled(i));
|
|
264
|
+
return a === -1 ? a : o.length - 1 - a;
|
|
263
265
|
}
|
|
264
266
|
case 4:
|
|
265
|
-
return
|
|
267
|
+
return o.findIndex((a) => t.resolveId(a) === e.id);
|
|
266
268
|
case 5:
|
|
267
269
|
return null;
|
|
268
270
|
default:
|
|
269
|
-
|
|
271
|
+
Hn(e);
|
|
270
272
|
}
|
|
271
273
|
})();
|
|
272
|
-
return
|
|
274
|
+
return l === -1 ? r : l;
|
|
275
|
+
}
|
|
276
|
+
function k(e) {
|
|
277
|
+
var t;
|
|
278
|
+
return e == null || e.value == null ? null : (t = e.value.$el) != null ? t : e.value;
|
|
273
279
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
280
|
+
let Lt = Symbol("Context");
|
|
281
|
+
var z = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(z || {});
|
|
282
|
+
function Vn() {
|
|
283
|
+
return Be() !== null;
|
|
277
284
|
}
|
|
278
|
-
let Le = Symbol("Context");
|
|
279
|
-
var X = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(X || {});
|
|
280
285
|
function Be() {
|
|
281
|
-
return ne(
|
|
286
|
+
return ne(Lt, null);
|
|
282
287
|
}
|
|
283
|
-
function
|
|
284
|
-
|
|
288
|
+
function st(e) {
|
|
289
|
+
ie(Lt, e);
|
|
285
290
|
}
|
|
286
|
-
function
|
|
291
|
+
function bt(e, t) {
|
|
287
292
|
if (e)
|
|
288
293
|
return e;
|
|
289
|
-
let
|
|
290
|
-
if (typeof
|
|
294
|
+
let o = t ?? "button";
|
|
295
|
+
if (typeof o == "string" && o.toLowerCase() === "button")
|
|
291
296
|
return "button";
|
|
292
297
|
}
|
|
293
|
-
function
|
|
294
|
-
let
|
|
295
|
-
return
|
|
296
|
-
|
|
297
|
-
}),
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
}),
|
|
298
|
+
function ut(e, t) {
|
|
299
|
+
let o = w(bt(e.value.type, e.value.as));
|
|
300
|
+
return U(() => {
|
|
301
|
+
o.value = bt(e.value.type, e.value.as);
|
|
302
|
+
}), ee(() => {
|
|
303
|
+
var r;
|
|
304
|
+
o.value || k(t) && k(t) instanceof HTMLButtonElement && !((r = k(t)) != null && r.hasAttribute("type")) && (o.value = "button");
|
|
305
|
+
}), o;
|
|
301
306
|
}
|
|
302
|
-
var
|
|
303
|
-
let
|
|
307
|
+
var Yn = Object.defineProperty, Un = (e, t, o) => t in e ? Yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, yt = (e, t, o) => (Un(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
308
|
+
let qn = class {
|
|
304
309
|
constructor() {
|
|
305
|
-
|
|
310
|
+
yt(this, "current", this.detect()), yt(this, "currentId", 0);
|
|
306
311
|
}
|
|
307
|
-
set(
|
|
308
|
-
this.current !==
|
|
312
|
+
set(t) {
|
|
313
|
+
this.current !== t && (this.currentId = 0, this.current = t);
|
|
309
314
|
}
|
|
310
315
|
reset() {
|
|
311
316
|
this.set(this.detect());
|
|
@@ -322,899 +327,1544 @@ let Rt = class {
|
|
|
322
327
|
detect() {
|
|
323
328
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
324
329
|
}
|
|
325
|
-
},
|
|
326
|
-
function
|
|
327
|
-
if (
|
|
330
|
+
}, Ne = new qn();
|
|
331
|
+
function Se(e) {
|
|
332
|
+
if (Ne.isServer)
|
|
328
333
|
return null;
|
|
329
334
|
if (e instanceof Node)
|
|
330
335
|
return e.ownerDocument;
|
|
331
336
|
if (e != null && e.hasOwnProperty("value")) {
|
|
332
|
-
let
|
|
333
|
-
if (
|
|
334
|
-
return
|
|
337
|
+
let t = k(e);
|
|
338
|
+
if (t)
|
|
339
|
+
return t.ownerDocument;
|
|
335
340
|
}
|
|
336
341
|
return document;
|
|
337
342
|
}
|
|
338
|
-
function
|
|
339
|
-
|
|
340
|
-
let
|
|
341
|
-
if (!
|
|
343
|
+
function Rt({ container: e, accept: t, walk: o, enabled: r }) {
|
|
344
|
+
ee(() => {
|
|
345
|
+
let n = e.value;
|
|
346
|
+
if (!n || r !== void 0 && !r.value)
|
|
342
347
|
return;
|
|
343
|
-
let
|
|
344
|
-
if (!
|
|
348
|
+
let l = Se(e);
|
|
349
|
+
if (!l)
|
|
345
350
|
return;
|
|
346
|
-
let
|
|
347
|
-
for (;
|
|
348
|
-
|
|
351
|
+
let a = Object.assign((s) => t(s), { acceptNode: t }), i = l.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, a, !1);
|
|
352
|
+
for (; i.nextNode(); )
|
|
353
|
+
o(i.currentNode);
|
|
349
354
|
});
|
|
350
355
|
}
|
|
351
|
-
let
|
|
352
|
-
var
|
|
353
|
-
function
|
|
354
|
-
return e == null ? [] : Array.from(e.querySelectorAll(
|
|
356
|
+
let et = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
357
|
+
var pe = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(pe || {}), jt = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(jt || {}), zn = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(zn || {});
|
|
358
|
+
function It(e = document.body) {
|
|
359
|
+
return e == null ? [] : Array.from(e.querySelectorAll(et)).sort((t, o) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (o.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
355
360
|
}
|
|
356
|
-
var
|
|
357
|
-
function
|
|
358
|
-
var
|
|
359
|
-
return e === ((
|
|
360
|
-
return e.matches(
|
|
361
|
+
var dt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(dt || {});
|
|
362
|
+
function ct(e, t = 0) {
|
|
363
|
+
var o;
|
|
364
|
+
return e === ((o = Se(e)) == null ? void 0 : o.body) ? !1 : K(t, { [0]() {
|
|
365
|
+
return e.matches(et);
|
|
361
366
|
}, [1]() {
|
|
362
|
-
let
|
|
363
|
-
for (;
|
|
364
|
-
if (
|
|
367
|
+
let r = e;
|
|
368
|
+
for (; r !== null; ) {
|
|
369
|
+
if (r.matches(et))
|
|
365
370
|
return !0;
|
|
366
|
-
|
|
371
|
+
r = r.parentElement;
|
|
367
372
|
}
|
|
368
373
|
return !1;
|
|
369
374
|
} });
|
|
370
375
|
}
|
|
371
|
-
function
|
|
372
|
-
let
|
|
373
|
-
|
|
374
|
-
|
|
376
|
+
function At(e) {
|
|
377
|
+
let t = Se(e);
|
|
378
|
+
oe(() => {
|
|
379
|
+
t && !ct(t.activeElement, 0) && we(e);
|
|
375
380
|
});
|
|
376
381
|
}
|
|
377
|
-
var
|
|
382
|
+
var Wn = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Wn || {});
|
|
378
383
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
379
384
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
380
385
|
}, !0), document.addEventListener("click", (e) => {
|
|
381
386
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
382
387
|
}, !0));
|
|
383
|
-
function
|
|
388
|
+
function we(e) {
|
|
384
389
|
e == null || e.focus({ preventScroll: !0 });
|
|
385
390
|
}
|
|
386
|
-
let
|
|
387
|
-
function
|
|
388
|
-
var
|
|
389
|
-
return (
|
|
391
|
+
let Kn = ["textarea", "input"].join(",");
|
|
392
|
+
function Jn(e) {
|
|
393
|
+
var t, o;
|
|
394
|
+
return (o = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Kn)) != null ? o : !1;
|
|
390
395
|
}
|
|
391
|
-
function
|
|
392
|
-
return e.slice().sort((
|
|
393
|
-
let
|
|
394
|
-
if (
|
|
396
|
+
function ft(e, t = (o) => o) {
|
|
397
|
+
return e.slice().sort((o, r) => {
|
|
398
|
+
let n = t(o), l = t(r);
|
|
399
|
+
if (n === null || l === null)
|
|
395
400
|
return 0;
|
|
396
|
-
let
|
|
397
|
-
return
|
|
401
|
+
let a = n.compareDocumentPosition(l);
|
|
402
|
+
return a & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : a & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
398
403
|
});
|
|
399
404
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
405
|
+
function Gn(e, t) {
|
|
406
|
+
return je(It(), t, { relativeTo: e });
|
|
402
407
|
}
|
|
403
|
-
function
|
|
404
|
-
var
|
|
405
|
-
let
|
|
406
|
-
|
|
407
|
-
let
|
|
408
|
-
if (
|
|
408
|
+
function je(e, t, { sorted: o = !0, relativeTo: r = null, skipElements: n = [] } = {}) {
|
|
409
|
+
var l;
|
|
410
|
+
let a = (l = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? l : document, i = Array.isArray(e) ? o ? ft(e) : e : It(e);
|
|
411
|
+
n.length > 0 && i.length > 1 && (i = i.filter((b) => !n.includes(b))), r = r ?? a.activeElement;
|
|
412
|
+
let s = (() => {
|
|
413
|
+
if (t & 5)
|
|
409
414
|
return 1;
|
|
410
|
-
if (
|
|
415
|
+
if (t & 10)
|
|
411
416
|
return -1;
|
|
412
417
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
413
418
|
})(), u = (() => {
|
|
414
|
-
if (
|
|
419
|
+
if (t & 1)
|
|
415
420
|
return 0;
|
|
416
|
-
if (
|
|
417
|
-
return Math.max(0,
|
|
418
|
-
if (
|
|
419
|
-
return Math.max(0,
|
|
420
|
-
if (
|
|
421
|
-
return
|
|
421
|
+
if (t & 2)
|
|
422
|
+
return Math.max(0, i.indexOf(r)) - 1;
|
|
423
|
+
if (t & 4)
|
|
424
|
+
return Math.max(0, i.indexOf(r)) + 1;
|
|
425
|
+
if (t & 8)
|
|
426
|
+
return i.length - 1;
|
|
422
427
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
423
|
-
})(),
|
|
428
|
+
})(), d = t & 32 ? { preventScroll: !0 } : {}, m = 0, v = i.length, p;
|
|
424
429
|
do {
|
|
425
|
-
if (
|
|
430
|
+
if (m >= v || m + v <= 0)
|
|
426
431
|
return 0;
|
|
427
|
-
let b = u +
|
|
428
|
-
if (
|
|
429
|
-
b = (b +
|
|
432
|
+
let b = u + m;
|
|
433
|
+
if (t & 16)
|
|
434
|
+
b = (b + v) % v;
|
|
430
435
|
else {
|
|
431
436
|
if (b < 0)
|
|
432
437
|
return 3;
|
|
433
|
-
if (b >=
|
|
438
|
+
if (b >= v)
|
|
434
439
|
return 1;
|
|
435
440
|
}
|
|
436
|
-
|
|
437
|
-
} while (
|
|
438
|
-
return
|
|
441
|
+
p = i[b], p == null || p.focus(d), m += s;
|
|
442
|
+
} while (p !== a.activeElement);
|
|
443
|
+
return t & 6 && Jn(p) && p.select(), 2;
|
|
439
444
|
}
|
|
440
|
-
function
|
|
441
|
-
|
|
442
|
-
document.addEventListener(e,
|
|
445
|
+
function xt(e, t, o) {
|
|
446
|
+
Ne.isServer || ee((r) => {
|
|
447
|
+
document.addEventListener(e, t, o), r(() => document.removeEventListener(e, t, o));
|
|
443
448
|
});
|
|
444
449
|
}
|
|
445
|
-
function
|
|
446
|
-
|
|
447
|
-
window.addEventListener(e,
|
|
450
|
+
function Ft(e, t, o) {
|
|
451
|
+
Ne.isServer || ee((r) => {
|
|
452
|
+
window.addEventListener(e, t, o), r(() => window.removeEventListener(e, t, o));
|
|
448
453
|
});
|
|
449
454
|
}
|
|
450
|
-
function
|
|
451
|
-
function
|
|
452
|
-
if (!
|
|
455
|
+
function vt(e, t, o = y(() => !0)) {
|
|
456
|
+
function r(l, a) {
|
|
457
|
+
if (!o.value || l.defaultPrevented)
|
|
453
458
|
return;
|
|
454
|
-
let
|
|
455
|
-
if (
|
|
459
|
+
let i = a(l);
|
|
460
|
+
if (i === null || !i.getRootNode().contains(i))
|
|
456
461
|
return;
|
|
457
|
-
let
|
|
458
|
-
return typeof
|
|
462
|
+
let s = function u(d) {
|
|
463
|
+
return typeof d == "function" ? u(d()) : Array.isArray(d) || d instanceof Set ? d : [d];
|
|
459
464
|
}(e);
|
|
460
|
-
for (let u of
|
|
465
|
+
for (let u of s) {
|
|
461
466
|
if (u === null)
|
|
462
467
|
continue;
|
|
463
|
-
let
|
|
464
|
-
if (
|
|
468
|
+
let d = u instanceof HTMLElement ? u : k(u);
|
|
469
|
+
if (d != null && d.contains(i) || l.composed && l.composedPath().includes(d))
|
|
465
470
|
return;
|
|
466
471
|
}
|
|
467
|
-
return !
|
|
468
|
-
}
|
|
469
|
-
let
|
|
470
|
-
|
|
471
|
-
var
|
|
472
|
-
|
|
473
|
-
}, !0),
|
|
474
|
-
|
|
475
|
-
}, !0),
|
|
476
|
-
}
|
|
477
|
-
var
|
|
478
|
-
let
|
|
472
|
+
return !ct(i, dt.Loose) && i.tabIndex !== -1 && l.preventDefault(), t(l, i);
|
|
473
|
+
}
|
|
474
|
+
let n = w(null);
|
|
475
|
+
xt("mousedown", (l) => {
|
|
476
|
+
var a, i;
|
|
477
|
+
o.value && (n.value = ((i = (a = l.composedPath) == null ? void 0 : a.call(l)) == null ? void 0 : i[0]) || l.target);
|
|
478
|
+
}, !0), xt("click", (l) => {
|
|
479
|
+
n.value && (r(l, () => n.value), n.value = null);
|
|
480
|
+
}, !0), Ft("blur", (l) => r(l, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
481
|
+
}
|
|
482
|
+
var De = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(De || {});
|
|
483
|
+
let Ie = A({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: o }) {
|
|
479
484
|
return () => {
|
|
480
|
-
let { features:
|
|
481
|
-
return
|
|
485
|
+
let { features: r, ...n } = e, l = { "aria-hidden": (r & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
|
|
486
|
+
return B({ ourProps: l, theirProps: n, slot: {}, attrs: o, slots: t, name: "Hidden" });
|
|
482
487
|
};
|
|
483
488
|
} });
|
|
484
|
-
function
|
|
485
|
-
for (let [
|
|
486
|
-
|
|
487
|
-
return
|
|
488
|
-
}
|
|
489
|
-
function
|
|
490
|
-
return e ? e + "[" +
|
|
491
|
-
}
|
|
492
|
-
function
|
|
493
|
-
if (Array.isArray(
|
|
494
|
-
for (let [
|
|
495
|
-
|
|
489
|
+
function Bt(e = {}, t = null, o = []) {
|
|
490
|
+
for (let [r, n] of Object.entries(e))
|
|
491
|
+
Ht(o, Nt(t, r), n);
|
|
492
|
+
return o;
|
|
493
|
+
}
|
|
494
|
+
function Nt(e, t) {
|
|
495
|
+
return e ? e + "[" + t + "]" : t;
|
|
496
|
+
}
|
|
497
|
+
function Ht(e, t, o) {
|
|
498
|
+
if (Array.isArray(o))
|
|
499
|
+
for (let [r, n] of o.entries())
|
|
500
|
+
Ht(e, Nt(t, r.toString()), n);
|
|
496
501
|
else
|
|
497
|
-
|
|
498
|
-
}
|
|
499
|
-
function
|
|
500
|
-
var
|
|
501
|
-
let
|
|
502
|
-
if (
|
|
503
|
-
for (let
|
|
504
|
-
if (
|
|
505
|
-
|
|
502
|
+
o instanceof Date ? e.push([t, o.toISOString()]) : typeof o == "boolean" ? e.push([t, o ? "1" : "0"]) : typeof o == "string" ? e.push([t, o]) : typeof o == "number" ? e.push([t, `${o}`]) : o == null ? e.push([t, ""]) : Bt(o, t, e);
|
|
503
|
+
}
|
|
504
|
+
function Xn(e) {
|
|
505
|
+
var t;
|
|
506
|
+
let o = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
|
|
507
|
+
if (o) {
|
|
508
|
+
for (let r of o.elements)
|
|
509
|
+
if (r.tagName === "INPUT" && r.type === "submit" || r.tagName === "BUTTON" && r.type === "submit" || r.nodeName === "INPUT" && r.type === "image") {
|
|
510
|
+
r.click();
|
|
506
511
|
return;
|
|
507
512
|
}
|
|
508
513
|
}
|
|
509
514
|
}
|
|
510
|
-
function
|
|
511
|
-
let
|
|
512
|
-
return [y(() =>
|
|
513
|
-
return
|
|
515
|
+
function Vt(e, t, o) {
|
|
516
|
+
let r = w(o == null ? void 0 : o.value), n = y(() => e.value !== void 0);
|
|
517
|
+
return [y(() => n.value ? e.value : r.value), function(l) {
|
|
518
|
+
return n.value || (r.value = l), t == null ? void 0 : t(l);
|
|
514
519
|
}];
|
|
515
520
|
}
|
|
516
|
-
function
|
|
521
|
+
function wt(e) {
|
|
517
522
|
return [e.screenX, e.screenY];
|
|
518
523
|
}
|
|
519
|
-
function
|
|
520
|
-
let e =
|
|
521
|
-
return { wasMoved(
|
|
522
|
-
let
|
|
523
|
-
return e.value[0] ===
|
|
524
|
-
}, update(
|
|
525
|
-
e.value =
|
|
524
|
+
function Yt() {
|
|
525
|
+
let e = w([-1, -1]);
|
|
526
|
+
return { wasMoved(t) {
|
|
527
|
+
let o = wt(t);
|
|
528
|
+
return e.value[0] === o[0] && e.value[1] === o[1] ? !1 : (e.value = o, !0);
|
|
529
|
+
}, update(t) {
|
|
530
|
+
e.value = wt(t);
|
|
526
531
|
} };
|
|
527
532
|
}
|
|
528
|
-
function
|
|
533
|
+
function Ut() {
|
|
529
534
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
530
535
|
}
|
|
531
|
-
function
|
|
536
|
+
function Qn() {
|
|
532
537
|
return /Android/gi.test(window.navigator.userAgent);
|
|
533
538
|
}
|
|
534
|
-
function
|
|
535
|
-
return
|
|
536
|
-
}
|
|
537
|
-
function
|
|
538
|
-
let e = [],
|
|
539
|
-
return
|
|
540
|
-
}, requestAnimationFrame(...
|
|
541
|
-
let
|
|
542
|
-
|
|
543
|
-
}, nextFrame(...
|
|
544
|
-
|
|
545
|
-
|
|
539
|
+
function Zn() {
|
|
540
|
+
return Ut() || Qn();
|
|
541
|
+
}
|
|
542
|
+
function He() {
|
|
543
|
+
let e = [], t = { addEventListener(o, r, n, l) {
|
|
544
|
+
return o.addEventListener(r, n, l), t.add(() => o.removeEventListener(r, n, l));
|
|
545
|
+
}, requestAnimationFrame(...o) {
|
|
546
|
+
let r = requestAnimationFrame(...o);
|
|
547
|
+
t.add(() => cancelAnimationFrame(r));
|
|
548
|
+
}, nextFrame(...o) {
|
|
549
|
+
t.requestAnimationFrame(() => {
|
|
550
|
+
t.requestAnimationFrame(...o);
|
|
546
551
|
});
|
|
547
|
-
}, setTimeout(...
|
|
548
|
-
let
|
|
549
|
-
|
|
550
|
-
}, style(
|
|
551
|
-
let
|
|
552
|
-
return Object.assign(
|
|
553
|
-
Object.assign(
|
|
552
|
+
}, setTimeout(...o) {
|
|
553
|
+
let r = setTimeout(...o);
|
|
554
|
+
t.add(() => clearTimeout(r));
|
|
555
|
+
}, style(o, r, n) {
|
|
556
|
+
let l = o.style.getPropertyValue(r);
|
|
557
|
+
return Object.assign(o.style, { [r]: n }), this.add(() => {
|
|
558
|
+
Object.assign(o.style, { [r]: l });
|
|
554
559
|
});
|
|
555
|
-
}, group(
|
|
556
|
-
let
|
|
557
|
-
return
|
|
558
|
-
}, add(
|
|
559
|
-
return e.push(
|
|
560
|
-
let
|
|
561
|
-
if (
|
|
562
|
-
for (let
|
|
563
|
-
|
|
560
|
+
}, group(o) {
|
|
561
|
+
let r = He();
|
|
562
|
+
return o(r), this.add(() => r.dispose());
|
|
563
|
+
}, add(o) {
|
|
564
|
+
return e.push(o), () => {
|
|
565
|
+
let r = e.indexOf(o);
|
|
566
|
+
if (r >= 0)
|
|
567
|
+
for (let n of e.splice(r, 1))
|
|
568
|
+
n();
|
|
564
569
|
};
|
|
565
570
|
}, dispose() {
|
|
566
|
-
for (let
|
|
567
|
-
|
|
571
|
+
for (let o of e.splice(0))
|
|
572
|
+
o();
|
|
568
573
|
} };
|
|
569
|
-
return
|
|
574
|
+
return t;
|
|
570
575
|
}
|
|
571
|
-
function
|
|
572
|
-
return e ===
|
|
576
|
+
function eo(e, t) {
|
|
577
|
+
return e === t;
|
|
573
578
|
}
|
|
574
|
-
var
|
|
575
|
-
let
|
|
576
|
-
function
|
|
577
|
-
let
|
|
578
|
-
if (
|
|
579
|
-
let
|
|
580
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
579
|
+
var to = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(to || {}), no = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(no || {}), oo = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(oo || {});
|
|
580
|
+
let qt = Symbol("ComboboxContext");
|
|
581
|
+
function Me(e) {
|
|
582
|
+
let t = ne(qt, null);
|
|
583
|
+
if (t === null) {
|
|
584
|
+
let o = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
585
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o, Me), o;
|
|
581
586
|
}
|
|
582
|
-
return
|
|
587
|
+
return t;
|
|
583
588
|
}
|
|
584
|
-
let
|
|
585
|
-
let
|
|
586
|
-
function b(
|
|
587
|
-
let
|
|
588
|
-
return
|
|
589
|
+
let lo = A({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], default: () => eo }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 } }, inheritAttrs: !1, setup(e, { slots: t, attrs: o, emit: r }) {
|
|
590
|
+
let n = w(1), l = w(null), a = w(null), i = w(null), s = w(null), u = w({ static: !1, hold: !1 }), d = w([]), m = w(null), v = w(1), p = w(!1);
|
|
591
|
+
function b(C = (E) => E) {
|
|
592
|
+
let E = m.value !== null ? d.value[m.value] : null, L = ft(C(d.value.slice()), (j) => k(j.dataRef.domRef)), T = E ? L.indexOf(E) : null;
|
|
593
|
+
return T === -1 && (T = null), { options: L, activeOptionIndex: T };
|
|
589
594
|
}
|
|
590
|
-
let
|
|
595
|
+
let h = y(() => e.multiple ? 1 : 0), f = y(() => e.nullable), [$, M] = Vt(y(() => e.modelValue === void 0 ? K(h.value, { [1]: [], [0]: void 0 }) : e.modelValue), (C) => r("update:modelValue", C), y(() => e.defaultValue)), D = { comboboxState: n, value: $, mode: h, compare(C, E) {
|
|
591
596
|
if (typeof e.by == "string") {
|
|
592
|
-
let
|
|
593
|
-
return (
|
|
597
|
+
let L = e.by;
|
|
598
|
+
return (C == null ? void 0 : C[L]) === (E == null ? void 0 : E[L]);
|
|
594
599
|
}
|
|
595
|
-
return e.by(
|
|
596
|
-
}, defaultValue: y(() => e.defaultValue), nullable:
|
|
597
|
-
|
|
600
|
+
return e.by(C, E);
|
|
601
|
+
}, defaultValue: y(() => e.defaultValue), nullable: f, inputRef: a, labelRef: l, buttonRef: i, optionsRef: s, disabled: y(() => e.disabled), options: d, change(C) {
|
|
602
|
+
M(C);
|
|
598
603
|
}, activeOptionIndex: y(() => {
|
|
599
|
-
if (
|
|
600
|
-
let
|
|
601
|
-
|
|
604
|
+
if (p.value && m.value === null && d.value.length > 0) {
|
|
605
|
+
let C = d.value.findIndex((E) => !E.dataRef.disabled);
|
|
606
|
+
C !== -1 && (m.value = C);
|
|
602
607
|
}
|
|
603
|
-
return
|
|
604
|
-
}), activationTrigger:
|
|
605
|
-
|
|
608
|
+
return m.value;
|
|
609
|
+
}), activationTrigger: v, optionsPropsRef: u, closeCombobox() {
|
|
610
|
+
p.value = !1, !e.disabled && n.value !== 1 && (n.value = 1, m.value = null);
|
|
606
611
|
}, openCombobox() {
|
|
607
|
-
if (
|
|
612
|
+
if (p.value = !0, e.disabled || n.value === 0)
|
|
608
613
|
return;
|
|
609
|
-
let
|
|
610
|
-
let
|
|
611
|
-
return
|
|
614
|
+
let C = d.value.findIndex((E) => {
|
|
615
|
+
let L = H(E.dataRef.value);
|
|
616
|
+
return K(h.value, { [0]: () => D.compare(H(D.value.value), H(L)), [1]: () => H(D.value.value).some((T) => D.compare(H(T), H(L))) });
|
|
612
617
|
});
|
|
613
|
-
|
|
614
|
-
}, goToOption(
|
|
615
|
-
if (
|
|
618
|
+
C !== -1 && (m.value = C), n.value = 0;
|
|
619
|
+
}, goToOption(C, E, L) {
|
|
620
|
+
if (p.value = !1, e.disabled || s.value && !u.value.static && n.value === 1)
|
|
616
621
|
return;
|
|
617
|
-
let
|
|
618
|
-
if (
|
|
619
|
-
let
|
|
620
|
-
|
|
622
|
+
let T = b();
|
|
623
|
+
if (T.activeOptionIndex === null) {
|
|
624
|
+
let N = T.options.findIndex((de) => !de.dataRef.disabled);
|
|
625
|
+
N !== -1 && (T.activeOptionIndex = N);
|
|
621
626
|
}
|
|
622
|
-
let
|
|
623
|
-
|
|
624
|
-
}, selectOption(
|
|
625
|
-
let
|
|
626
|
-
if (
|
|
627
|
+
let j = Pt(C === I.Specific ? { focus: I.Specific, id: E } : { focus: C }, { resolveItems: () => T.options, resolveActiveIndex: () => T.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
628
|
+
m.value = j, v.value = L ?? 1, d.value = T.options;
|
|
629
|
+
}, selectOption(C) {
|
|
630
|
+
let E = d.value.find((T) => T.id === C);
|
|
631
|
+
if (!E)
|
|
627
632
|
return;
|
|
628
|
-
let { dataRef:
|
|
629
|
-
|
|
630
|
-
let
|
|
631
|
-
return
|
|
633
|
+
let { dataRef: L } = E;
|
|
634
|
+
M(K(h.value, { [0]: () => L.value, [1]: () => {
|
|
635
|
+
let T = H(D.value.value).slice(), j = H(L.value), N = T.findIndex((de) => D.compare(j, H(de)));
|
|
636
|
+
return N === -1 ? T.push(j) : T.splice(N, 1), T;
|
|
632
637
|
} }));
|
|
633
638
|
}, selectActiveOption() {
|
|
634
|
-
if (
|
|
639
|
+
if (D.activeOptionIndex.value === null)
|
|
635
640
|
return;
|
|
636
|
-
let { dataRef:
|
|
637
|
-
|
|
638
|
-
let
|
|
639
|
-
return
|
|
640
|
-
} })),
|
|
641
|
-
}, registerOption(
|
|
642
|
-
let
|
|
643
|
-
if (
|
|
644
|
-
let
|
|
645
|
-
|
|
641
|
+
let { dataRef: C, id: E } = d.value[D.activeOptionIndex.value];
|
|
642
|
+
M(K(h.value, { [0]: () => C.value, [1]: () => {
|
|
643
|
+
let L = H(D.value.value).slice(), T = H(C.value), j = L.findIndex((N) => D.compare(T, H(N)));
|
|
644
|
+
return j === -1 ? L.push(T) : L.splice(j, 1), L;
|
|
645
|
+
} })), D.goToOption(I.Specific, E);
|
|
646
|
+
}, registerOption(C, E) {
|
|
647
|
+
let L = { id: C, dataRef: E }, T = b((j) => [...j, L]);
|
|
648
|
+
if (m.value === null) {
|
|
649
|
+
let j = E.value.value;
|
|
650
|
+
K(h.value, { [0]: () => D.compare(H(D.value.value), H(j)), [1]: () => H(D.value.value).some((N) => D.compare(H(N), H(j))) }) && (T.activeOptionIndex = T.options.indexOf(L));
|
|
646
651
|
}
|
|
647
|
-
|
|
648
|
-
let
|
|
649
|
-
|
|
652
|
+
d.value = T.options, m.value = T.activeOptionIndex, v.value = 1, T.options.some((j) => !k(j.dataRef.domRef)) && requestAnimationFrame(() => {
|
|
653
|
+
let j = b();
|
|
654
|
+
d.value = j.options, m.value = j.activeOptionIndex;
|
|
650
655
|
});
|
|
651
|
-
}, unregisterOption(
|
|
652
|
-
var
|
|
653
|
-
|
|
654
|
-
let
|
|
655
|
-
let
|
|
656
|
-
return
|
|
656
|
+
}, unregisterOption(C) {
|
|
657
|
+
var E;
|
|
658
|
+
D.activeOptionIndex.value !== null && ((E = D.options.value[D.activeOptionIndex.value]) == null ? void 0 : E.id) === C && (p.value = !0);
|
|
659
|
+
let L = b((T) => {
|
|
660
|
+
let j = T.findIndex((N) => N.id === C);
|
|
661
|
+
return j !== -1 && T.splice(j, 1), T;
|
|
657
662
|
});
|
|
658
|
-
|
|
663
|
+
d.value = L.options, m.value = L.activeOptionIndex, v.value = 1;
|
|
659
664
|
} };
|
|
660
|
-
|
|
661
|
-
let
|
|
662
|
-
var
|
|
663
|
-
return (
|
|
665
|
+
vt([a, i, s], () => D.closeCombobox(), y(() => n.value === 0)), ie(qt, D), st(y(() => K(n.value, { [0]: z.Open, [1]: z.Closed })));
|
|
666
|
+
let X = y(() => D.activeOptionIndex.value === null ? null : d.value[D.activeOptionIndex.value].dataRef.value), Q = y(() => {
|
|
667
|
+
var C;
|
|
668
|
+
return (C = k(a)) == null ? void 0 : C.closest("form");
|
|
664
669
|
});
|
|
665
|
-
return
|
|
666
|
-
|
|
667
|
-
if (!
|
|
670
|
+
return U(() => {
|
|
671
|
+
be([Q], () => {
|
|
672
|
+
if (!Q.value || e.defaultValue === void 0)
|
|
668
673
|
return;
|
|
669
|
-
function
|
|
670
|
-
|
|
674
|
+
function C() {
|
|
675
|
+
D.change(e.defaultValue);
|
|
671
676
|
}
|
|
672
|
-
return
|
|
673
|
-
var
|
|
674
|
-
(
|
|
677
|
+
return Q.value.addEventListener("reset", C), () => {
|
|
678
|
+
var E;
|
|
679
|
+
(E = Q.value) == null || E.removeEventListener("reset", C);
|
|
675
680
|
};
|
|
676
681
|
}, { immediate: !0 });
|
|
677
682
|
}), () => {
|
|
678
|
-
let { name:
|
|
679
|
-
return
|
|
683
|
+
let { name: C, disabled: E, form: L, ...T } = e, j = { open: n.value === 0, disabled: E, activeIndex: D.activeOptionIndex.value, activeOption: X.value, value: $.value };
|
|
684
|
+
return q(Z, [...C != null && $.value != null ? Bt({ [C]: $.value }).map(([N, de]) => q(Ie, Et({ features: De.Hidden, key: N, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: L, name: N, value: de }))) : [], B({ theirProps: { ...o, ...Fe(T, ["modelValue", "defaultValue", "nullable", "multiple", "onUpdate:modelValue", "by"]) }, ourProps: {}, slot: j, slots: t, attrs: o, name: "Combobox" })]);
|
|
680
685
|
};
|
|
681
|
-
} }),
|
|
682
|
-
let
|
|
683
|
-
function
|
|
684
|
-
var
|
|
685
|
-
(
|
|
686
|
+
} }), ro = A({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-combobox-label-${te()}` } }, setup(e, { attrs: t, slots: o }) {
|
|
687
|
+
let r = Me("ComboboxLabel");
|
|
688
|
+
function n() {
|
|
689
|
+
var l;
|
|
690
|
+
(l = k(r.inputRef)) == null || l.focus({ preventScroll: !0 });
|
|
686
691
|
}
|
|
687
692
|
return () => {
|
|
688
|
-
let
|
|
689
|
-
return
|
|
693
|
+
let l = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { id: a, ...i } = e, s = { id: a, ref: r.labelRef, onClick: n };
|
|
694
|
+
return B({ ourProps: s, theirProps: i, slot: l, attrs: t, slots: o, name: "ComboboxLabel" });
|
|
690
695
|
};
|
|
691
|
-
} }),
|
|
692
|
-
let
|
|
693
|
-
|
|
694
|
-
function
|
|
695
|
-
|
|
696
|
+
} }), ao = A({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-combobox-button-${te()}` } }, setup(e, { attrs: t, slots: o, expose: r }) {
|
|
697
|
+
let n = Me("ComboboxButton");
|
|
698
|
+
r({ el: n.buttonRef, $el: n.buttonRef });
|
|
699
|
+
function l(s) {
|
|
700
|
+
n.disabled.value || (n.comboboxState.value === 0 ? n.closeCombobox() : (s.preventDefault(), n.openCombobox()), oe(() => {
|
|
696
701
|
var u;
|
|
697
|
-
return (u =
|
|
702
|
+
return (u = k(n.inputRef)) == null ? void 0 : u.focus({ preventScroll: !0 });
|
|
698
703
|
}));
|
|
699
704
|
}
|
|
700
|
-
function
|
|
701
|
-
switch (
|
|
702
|
-
case
|
|
703
|
-
|
|
705
|
+
function a(s) {
|
|
706
|
+
switch (s.key) {
|
|
707
|
+
case P.ArrowDown:
|
|
708
|
+
s.preventDefault(), s.stopPropagation(), n.comboboxState.value === 1 && n.openCombobox(), oe(() => {
|
|
704
709
|
var u;
|
|
705
|
-
return (u =
|
|
710
|
+
return (u = n.inputRef.value) == null ? void 0 : u.focus({ preventScroll: !0 });
|
|
706
711
|
});
|
|
707
712
|
return;
|
|
708
|
-
case
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
})),
|
|
713
|
+
case P.ArrowUp:
|
|
714
|
+
s.preventDefault(), s.stopPropagation(), n.comboboxState.value === 1 && (n.openCombobox(), oe(() => {
|
|
715
|
+
n.value.value || n.goToOption(I.Last);
|
|
716
|
+
})), oe(() => {
|
|
712
717
|
var u;
|
|
713
|
-
return (u =
|
|
718
|
+
return (u = n.inputRef.value) == null ? void 0 : u.focus({ preventScroll: !0 });
|
|
714
719
|
});
|
|
715
720
|
return;
|
|
716
|
-
case
|
|
717
|
-
if (
|
|
721
|
+
case P.Escape:
|
|
722
|
+
if (n.comboboxState.value !== 0)
|
|
718
723
|
return;
|
|
719
|
-
|
|
724
|
+
s.preventDefault(), n.optionsRef.value && !n.optionsPropsRef.value.static && s.stopPropagation(), n.closeCombobox(), oe(() => {
|
|
720
725
|
var u;
|
|
721
|
-
return (u =
|
|
726
|
+
return (u = n.inputRef.value) == null ? void 0 : u.focus({ preventScroll: !0 });
|
|
722
727
|
});
|
|
723
728
|
return;
|
|
724
729
|
}
|
|
725
730
|
}
|
|
726
|
-
let
|
|
731
|
+
let i = ut(y(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
727
732
|
return () => {
|
|
728
|
-
var
|
|
729
|
-
let
|
|
730
|
-
return
|
|
733
|
+
var s, u;
|
|
734
|
+
let d = { open: n.comboboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: m, ...v } = e, p = { ref: n.buttonRef, id: m, type: i.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (s = k(n.optionsRef)) == null ? void 0 : s.id, "aria-expanded": n.disabled.value ? void 0 : n.comboboxState.value === 0, "aria-labelledby": n.labelRef.value ? [(u = k(n.labelRef)) == null ? void 0 : u.id, m].join(" ") : void 0, disabled: n.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: l };
|
|
735
|
+
return B({ ourProps: p, theirProps: v, slot: d, attrs: t, slots: o, name: "ComboboxButton" });
|
|
731
736
|
};
|
|
732
|
-
} }),
|
|
733
|
-
let
|
|
734
|
-
|
|
735
|
-
let
|
|
736
|
-
var
|
|
737
|
-
let
|
|
738
|
-
return
|
|
737
|
+
} }), io = A({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: () => `headlessui-combobox-input-${te()}` } }, emits: { change: (e) => !0 }, setup(e, { emit: t, attrs: o, slots: r, expose: n }) {
|
|
738
|
+
let l = Me("ComboboxInput"), a = { value: !1 };
|
|
739
|
+
n({ el: l.inputRef, $el: l.inputRef });
|
|
740
|
+
let i = y(() => {
|
|
741
|
+
var f;
|
|
742
|
+
let $ = l.value.value;
|
|
743
|
+
return k(l.inputRef) ? typeof e.displayValue < "u" && $ !== void 0 ? (f = e.displayValue($)) != null ? f : "" : typeof $ == "string" ? $ : "" : "";
|
|
739
744
|
});
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
if (
|
|
745
|
+
U(() => {
|
|
746
|
+
be([i, l.comboboxState], ([f, $], [M, D]) => {
|
|
747
|
+
if (a.value)
|
|
743
748
|
return;
|
|
744
|
-
let
|
|
745
|
-
|
|
746
|
-
}, { immediate: !0 }),
|
|
747
|
-
if (
|
|
748
|
-
let
|
|
749
|
-
if (!
|
|
749
|
+
let X = k(l.inputRef);
|
|
750
|
+
X && (D === 0 && $ === 1 || f !== M) && (X.value = f);
|
|
751
|
+
}, { immediate: !0 }), be([l.comboboxState], ([f], [$]) => {
|
|
752
|
+
if (f === 0 && $ === 1) {
|
|
753
|
+
let M = k(l.inputRef);
|
|
754
|
+
if (!M)
|
|
750
755
|
return;
|
|
751
|
-
let
|
|
752
|
-
|
|
756
|
+
let D = M.value, { selectionStart: X, selectionEnd: Q, selectionDirection: C } = M;
|
|
757
|
+
M.value = "", M.value = D, C !== null ? M.setSelectionRange(X, Q, C) : M.setSelectionRange(X, Q);
|
|
753
758
|
}
|
|
754
759
|
});
|
|
755
760
|
});
|
|
756
|
-
let
|
|
757
|
-
function
|
|
758
|
-
|
|
761
|
+
let s = w(!1), u = w(null);
|
|
762
|
+
function d() {
|
|
763
|
+
s.value = !0;
|
|
759
764
|
}
|
|
760
|
-
function
|
|
761
|
-
|
|
762
|
-
|
|
765
|
+
function m() {
|
|
766
|
+
He().nextFrame(() => {
|
|
767
|
+
s.value = !1, u.value && (l.openCombobox(), t("change", u.value), u.value = null);
|
|
763
768
|
});
|
|
764
769
|
}
|
|
765
|
-
function
|
|
766
|
-
switch (
|
|
767
|
-
case
|
|
768
|
-
case
|
|
769
|
-
if (
|
|
770
|
+
function v(f) {
|
|
771
|
+
switch (a.value = !0, f.key) {
|
|
772
|
+
case P.Backspace:
|
|
773
|
+
case P.Delete:
|
|
774
|
+
if (l.mode.value !== 0 || !l.nullable.value)
|
|
770
775
|
return;
|
|
771
|
-
let
|
|
776
|
+
let $ = f.currentTarget;
|
|
772
777
|
requestAnimationFrame(() => {
|
|
773
|
-
if (
|
|
774
|
-
|
|
775
|
-
let
|
|
776
|
-
|
|
778
|
+
if ($.value === "") {
|
|
779
|
+
l.change(null);
|
|
780
|
+
let M = k(l.optionsRef);
|
|
781
|
+
M && (M.scrollTop = 0), l.goToOption(I.Nothing);
|
|
777
782
|
}
|
|
778
783
|
});
|
|
779
784
|
break;
|
|
780
|
-
case
|
|
781
|
-
if (
|
|
785
|
+
case P.Enter:
|
|
786
|
+
if (a.value = !1, l.comboboxState.value !== 0 || s.value)
|
|
782
787
|
return;
|
|
783
|
-
if (
|
|
784
|
-
|
|
788
|
+
if (f.preventDefault(), f.stopPropagation(), l.activeOptionIndex.value === null) {
|
|
789
|
+
l.closeCombobox();
|
|
785
790
|
return;
|
|
786
791
|
}
|
|
787
|
-
|
|
792
|
+
l.selectActiveOption(), l.mode.value === 0 && l.closeCombobox();
|
|
788
793
|
break;
|
|
789
|
-
case
|
|
790
|
-
return
|
|
791
|
-
case
|
|
792
|
-
return
|
|
793
|
-
|
|
794
|
-
|
|
794
|
+
case P.ArrowDown:
|
|
795
|
+
return a.value = !1, f.preventDefault(), f.stopPropagation(), K(l.comboboxState.value, { [0]: () => l.goToOption(I.Next), [1]: () => l.openCombobox() });
|
|
796
|
+
case P.ArrowUp:
|
|
797
|
+
return a.value = !1, f.preventDefault(), f.stopPropagation(), K(l.comboboxState.value, { [0]: () => l.goToOption(I.Previous), [1]: () => {
|
|
798
|
+
l.openCombobox(), oe(() => {
|
|
799
|
+
l.value.value || l.goToOption(I.Last);
|
|
795
800
|
});
|
|
796
801
|
} });
|
|
797
|
-
case
|
|
798
|
-
if (
|
|
802
|
+
case P.Home:
|
|
803
|
+
if (f.shiftKey)
|
|
799
804
|
break;
|
|
800
|
-
return
|
|
801
|
-
case
|
|
802
|
-
return
|
|
803
|
-
case
|
|
804
|
-
if (
|
|
805
|
+
return a.value = !1, f.preventDefault(), f.stopPropagation(), l.goToOption(I.First);
|
|
806
|
+
case P.PageUp:
|
|
807
|
+
return a.value = !1, f.preventDefault(), f.stopPropagation(), l.goToOption(I.First);
|
|
808
|
+
case P.End:
|
|
809
|
+
if (f.shiftKey)
|
|
805
810
|
break;
|
|
806
|
-
return
|
|
807
|
-
case
|
|
808
|
-
return
|
|
809
|
-
case
|
|
810
|
-
if (
|
|
811
|
+
return a.value = !1, f.preventDefault(), f.stopPropagation(), l.goToOption(I.Last);
|
|
812
|
+
case P.PageDown:
|
|
813
|
+
return a.value = !1, f.preventDefault(), f.stopPropagation(), l.goToOption(I.Last);
|
|
814
|
+
case P.Escape:
|
|
815
|
+
if (a.value = !1, l.comboboxState.value !== 0)
|
|
811
816
|
return;
|
|
812
|
-
|
|
817
|
+
f.preventDefault(), l.optionsRef.value && !l.optionsPropsRef.value.static && f.stopPropagation(), l.closeCombobox();
|
|
813
818
|
break;
|
|
814
|
-
case
|
|
815
|
-
if (
|
|
819
|
+
case P.Tab:
|
|
820
|
+
if (a.value = !1, l.comboboxState.value !== 0)
|
|
816
821
|
return;
|
|
817
|
-
|
|
822
|
+
l.mode.value === 0 && l.selectActiveOption(), l.closeCombobox();
|
|
818
823
|
break;
|
|
819
824
|
}
|
|
820
825
|
}
|
|
821
|
-
function
|
|
822
|
-
if (
|
|
823
|
-
u.value =
|
|
826
|
+
function p(f) {
|
|
827
|
+
if (s.value) {
|
|
828
|
+
u.value = f;
|
|
824
829
|
return;
|
|
825
830
|
}
|
|
826
|
-
|
|
831
|
+
l.openCombobox(), t("change", f);
|
|
827
832
|
}
|
|
828
833
|
function b() {
|
|
829
|
-
|
|
834
|
+
a.value = !1;
|
|
830
835
|
}
|
|
831
|
-
let
|
|
832
|
-
var
|
|
833
|
-
return (
|
|
836
|
+
let h = y(() => {
|
|
837
|
+
var f, $, M, D;
|
|
838
|
+
return (D = (M = ($ = e.defaultValue) != null ? $ : l.defaultValue.value !== void 0 ? (f = e.displayValue) == null ? void 0 : f.call(e, l.defaultValue.value) : null) != null ? M : l.defaultValue.value) != null ? D : "";
|
|
834
839
|
});
|
|
835
840
|
return () => {
|
|
836
|
-
var
|
|
837
|
-
let
|
|
838
|
-
return
|
|
841
|
+
var f, $, M, D, X, Q;
|
|
842
|
+
let C = { open: l.comboboxState.value === 0 }, { id: E, displayValue: L, onChange: T, ...j } = e, N = { "aria-controls": (f = l.optionsRef.value) == null ? void 0 : f.id, "aria-expanded": l.disabled.value ? void 0 : l.comboboxState.value === 0, "aria-activedescendant": l.activeOptionIndex.value === null || ($ = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : $.id, "aria-labelledby": (X = (M = k(l.labelRef)) == null ? void 0 : M.id) != null ? X : (D = k(l.buttonRef)) == null ? void 0 : D.id, "aria-autocomplete": "list", id: E, onCompositionstart: d, onCompositionend: m, onKeydown: v, onInput: p, onBlur: b, role: "combobox", type: (Q = o.type) != null ? Q : "text", tabIndex: 0, ref: l.inputRef, defaultValue: h.value, disabled: l.disabled.value === !0 ? !0 : void 0 };
|
|
843
|
+
return B({ ourProps: N, theirProps: j, slot: C, attrs: o, slots: r, features: me.RenderStrategy | me.Static, name: "ComboboxInput" });
|
|
839
844
|
};
|
|
840
|
-
} }),
|
|
841
|
-
let
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
}),
|
|
845
|
-
|
|
845
|
+
} }), so = A({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: t, slots: o, expose: r }) {
|
|
846
|
+
let n = Me("ComboboxOptions"), l = `headlessui-combobox-options-${te()}`;
|
|
847
|
+
r({ el: n.optionsRef, $el: n.optionsRef }), ee(() => {
|
|
848
|
+
n.optionsPropsRef.value.static = e.static;
|
|
849
|
+
}), ee(() => {
|
|
850
|
+
n.optionsPropsRef.value.hold = e.hold;
|
|
846
851
|
});
|
|
847
|
-
let
|
|
848
|
-
return
|
|
849
|
-
return
|
|
850
|
-
}, walk(
|
|
851
|
-
|
|
852
|
+
let a = Be(), i = y(() => a !== null ? (a.value & z.Open) === z.Open : n.comboboxState.value === 0);
|
|
853
|
+
return Rt({ container: y(() => k(n.optionsRef)), enabled: y(() => n.comboboxState.value === 0), accept(s) {
|
|
854
|
+
return s.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : s.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
855
|
+
}, walk(s) {
|
|
856
|
+
s.setAttribute("role", "none");
|
|
852
857
|
} }), () => {
|
|
853
|
-
var
|
|
854
|
-
let
|
|
855
|
-
return
|
|
858
|
+
var s, u, d;
|
|
859
|
+
let m = { open: n.comboboxState.value === 0 }, v = { "aria-labelledby": (d = (s = k(n.labelRef)) == null ? void 0 : s.id) != null ? d : (u = k(n.buttonRef)) == null ? void 0 : u.id, id: l, ref: n.optionsRef, role: "listbox", "aria-multiselectable": n.mode.value === 1 ? !0 : void 0 }, p = Fe(e, ["hold"]);
|
|
860
|
+
return B({ ourProps: v, theirProps: p, slot: m, attrs: t, slots: o, features: me.RenderStrategy | me.Static, visible: i.value, name: "ComboboxOptions" });
|
|
856
861
|
};
|
|
857
|
-
} }),
|
|
858
|
-
let
|
|
859
|
-
|
|
860
|
-
let
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
var
|
|
864
|
-
return (
|
|
862
|
+
} }), uo = A({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: o, expose: r }) {
|
|
863
|
+
let n = Me("ComboboxOption"), l = `headlessui-combobox-option-${te()}`, a = w(null);
|
|
864
|
+
r({ el: a, $el: a });
|
|
865
|
+
let i = y(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === l : !1), s = y(() => K(n.mode.value, { [0]: () => n.compare(H(n.value.value), H(e.value)), [1]: () => H(n.value.value).some((f) => n.compare(H(f), H(e.value))) })), u = y(() => ({ disabled: e.disabled, value: e.value, domRef: a }));
|
|
866
|
+
U(() => n.registerOption(l, u)), se(() => n.unregisterOption(l)), ee(() => {
|
|
867
|
+
n.comboboxState.value === 0 && i.value && n.activationTrigger.value !== 0 && oe(() => {
|
|
868
|
+
var f, $;
|
|
869
|
+
return ($ = (f = k(a)) == null ? void 0 : f.scrollIntoView) == null ? void 0 : $.call(f, { block: "nearest" });
|
|
865
870
|
});
|
|
866
871
|
});
|
|
867
|
-
function
|
|
872
|
+
function d(f) {
|
|
868
873
|
if (e.disabled)
|
|
869
|
-
return
|
|
870
|
-
|
|
871
|
-
var
|
|
872
|
-
return (
|
|
874
|
+
return f.preventDefault();
|
|
875
|
+
n.selectOption(l), n.mode.value === 0 && n.closeCombobox(), Zn() || requestAnimationFrame(() => {
|
|
876
|
+
var $;
|
|
877
|
+
return ($ = k(n.inputRef)) == null ? void 0 : $.focus();
|
|
873
878
|
});
|
|
874
879
|
}
|
|
875
|
-
function
|
|
880
|
+
function m() {
|
|
876
881
|
if (e.disabled)
|
|
877
|
-
return
|
|
878
|
-
|
|
882
|
+
return n.goToOption(I.Nothing);
|
|
883
|
+
n.goToOption(I.Specific, l);
|
|
879
884
|
}
|
|
880
|
-
let
|
|
881
|
-
function
|
|
882
|
-
|
|
885
|
+
let v = Yt();
|
|
886
|
+
function p(f) {
|
|
887
|
+
v.update(f);
|
|
883
888
|
}
|
|
884
|
-
function b(
|
|
885
|
-
|
|
889
|
+
function b(f) {
|
|
890
|
+
v.wasMoved(f) && (e.disabled || i.value || n.goToOption(I.Specific, l, 0));
|
|
886
891
|
}
|
|
887
|
-
function
|
|
888
|
-
|
|
892
|
+
function h(f) {
|
|
893
|
+
v.wasMoved(f) && (e.disabled || i.value && (n.optionsPropsRef.value.hold || n.goToOption(I.Nothing)));
|
|
889
894
|
}
|
|
890
895
|
return () => {
|
|
891
|
-
let { disabled:
|
|
892
|
-
return
|
|
896
|
+
let { disabled: f } = e, $ = { active: i.value, selected: s.value, disabled: f }, M = { id: l, ref: a, role: "option", tabIndex: f === !0 ? void 0 : -1, "aria-disabled": f === !0 ? !0 : void 0, "aria-selected": s.value, disabled: void 0, onClick: d, onFocus: m, onPointerenter: p, onMouseenter: p, onPointermove: b, onMousemove: b, onPointerleave: h, onMouseleave: h };
|
|
897
|
+
return B({ ourProps: M, theirProps: e, slot: $, attrs: o, slots: t, name: "ComboboxOption" });
|
|
898
|
+
};
|
|
899
|
+
} });
|
|
900
|
+
var Re = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(Re || {});
|
|
901
|
+
function co() {
|
|
902
|
+
let e = w(0);
|
|
903
|
+
return Ft("keydown", (t) => {
|
|
904
|
+
t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0);
|
|
905
|
+
}), e;
|
|
906
|
+
}
|
|
907
|
+
function zt(e, t, o, r) {
|
|
908
|
+
Ne.isServer || ee((n) => {
|
|
909
|
+
e = e ?? window, e.addEventListener(t, o, r), n(() => e.removeEventListener(t, o, r));
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
function Wt(e) {
|
|
913
|
+
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
|
|
914
|
+
throw t;
|
|
915
|
+
}));
|
|
916
|
+
}
|
|
917
|
+
function fo(e) {
|
|
918
|
+
function t() {
|
|
919
|
+
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
|
|
920
|
+
}
|
|
921
|
+
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
|
|
922
|
+
}
|
|
923
|
+
function Kt(e) {
|
|
924
|
+
if (!e)
|
|
925
|
+
return /* @__PURE__ */ new Set();
|
|
926
|
+
if (typeof e == "function")
|
|
927
|
+
return new Set(e());
|
|
928
|
+
let t = /* @__PURE__ */ new Set();
|
|
929
|
+
for (let o of e.value) {
|
|
930
|
+
let r = k(o);
|
|
931
|
+
r instanceof HTMLElement && t.add(r);
|
|
932
|
+
}
|
|
933
|
+
return t;
|
|
934
|
+
}
|
|
935
|
+
var Jt = ((e) => (e[e.None = 1] = "None", e[e.InitialFocus = 2] = "InitialFocus", e[e.TabLock = 4] = "TabLock", e[e.FocusLock = 8] = "FocusLock", e[e.RestoreFocus = 16] = "RestoreFocus", e[e.All = 30] = "All", e))(Jt || {});
|
|
936
|
+
let Pe = Object.assign(A({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: w(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: o, expose: r }) {
|
|
937
|
+
let n = w(null);
|
|
938
|
+
r({ el: n, $el: n });
|
|
939
|
+
let l = y(() => Se(n)), a = w(!1);
|
|
940
|
+
U(() => a.value = !0), se(() => a.value = !1), po({ ownerDocument: l }, y(() => a.value && !!(e.features & 16)));
|
|
941
|
+
let i = mo({ ownerDocument: l, container: n, initialFocus: y(() => e.initialFocus) }, y(() => a.value && !!(e.features & 2)));
|
|
942
|
+
go({ ownerDocument: l, container: n, containers: e.containers, previousActiveElement: i }, y(() => a.value && !!(e.features & 8)));
|
|
943
|
+
let s = co();
|
|
944
|
+
function u(p) {
|
|
945
|
+
let b = k(n);
|
|
946
|
+
b && ((h) => h())(() => {
|
|
947
|
+
K(s.value, { [Re.Forwards]: () => {
|
|
948
|
+
je(b, pe.First, { skipElements: [p.relatedTarget] });
|
|
949
|
+
}, [Re.Backwards]: () => {
|
|
950
|
+
je(b, pe.Last, { skipElements: [p.relatedTarget] });
|
|
951
|
+
} });
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
let d = w(!1);
|
|
955
|
+
function m(p) {
|
|
956
|
+
p.key === "Tab" && (d.value = !0, requestAnimationFrame(() => {
|
|
957
|
+
d.value = !1;
|
|
958
|
+
}));
|
|
959
|
+
}
|
|
960
|
+
function v(p) {
|
|
961
|
+
if (!a.value)
|
|
962
|
+
return;
|
|
963
|
+
let b = Kt(e.containers);
|
|
964
|
+
k(n) instanceof HTMLElement && b.add(k(n));
|
|
965
|
+
let h = p.relatedTarget;
|
|
966
|
+
h instanceof HTMLElement && h.dataset.headlessuiFocusGuard !== "true" && (Gt(b, h) || (d.value ? je(k(n), K(s.value, { [Re.Forwards]: () => pe.Next, [Re.Backwards]: () => pe.Previous }) | pe.WrapAround, { relativeTo: p.target }) : p.target instanceof HTMLElement && we(p.target)));
|
|
967
|
+
}
|
|
968
|
+
return () => {
|
|
969
|
+
let p = {}, b = { ref: n, onKeydown: m, onFocusout: v }, { features: h, initialFocus: f, containers: $, ...M } = e;
|
|
970
|
+
return q(Z, [!!(h & 4) && q(Ie, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: De.Focusable }), B({ ourProps: b, theirProps: { ...t, ...M }, slot: p, attrs: t, slots: o, name: "FocusTrap" }), !!(h & 4) && q(Ie, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: De.Focusable })]);
|
|
971
|
+
};
|
|
972
|
+
} }), { features: Jt }), $e = [];
|
|
973
|
+
fo(() => {
|
|
974
|
+
function e(t) {
|
|
975
|
+
t.target instanceof HTMLElement && t.target !== document.body && $e[0] !== t.target && ($e.unshift(t.target), $e = $e.filter((o) => o != null && o.isConnected), $e.splice(10));
|
|
976
|
+
}
|
|
977
|
+
window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
|
|
978
|
+
});
|
|
979
|
+
function vo(e) {
|
|
980
|
+
let t = w($e.slice());
|
|
981
|
+
return be([e], ([o], [r]) => {
|
|
982
|
+
r === !0 && o === !1 ? Wt(() => {
|
|
983
|
+
t.value.splice(0);
|
|
984
|
+
}) : r === !1 && o === !0 && (t.value = $e.slice());
|
|
985
|
+
}, { flush: "post" }), () => {
|
|
986
|
+
var o;
|
|
987
|
+
return (o = t.value.find((r) => r != null && r.isConnected)) != null ? o : null;
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
function po({ ownerDocument: e }, t) {
|
|
991
|
+
let o = vo(t);
|
|
992
|
+
U(() => {
|
|
993
|
+
ee(() => {
|
|
994
|
+
var r, n;
|
|
995
|
+
t.value || ((r = e.value) == null ? void 0 : r.activeElement) === ((n = e.value) == null ? void 0 : n.body) && we(o());
|
|
996
|
+
}, { flush: "post" });
|
|
997
|
+
}), se(() => {
|
|
998
|
+
t.value && we(o());
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
function mo({ ownerDocument: e, container: t, initialFocus: o }, r) {
|
|
1002
|
+
let n = w(null), l = w(!1);
|
|
1003
|
+
return U(() => l.value = !0), se(() => l.value = !1), U(() => {
|
|
1004
|
+
be([t, o, r], (a, i) => {
|
|
1005
|
+
if (a.every((u, d) => (i == null ? void 0 : i[d]) === u) || !r.value)
|
|
1006
|
+
return;
|
|
1007
|
+
let s = k(t);
|
|
1008
|
+
s && Wt(() => {
|
|
1009
|
+
var u, d;
|
|
1010
|
+
if (!l.value)
|
|
1011
|
+
return;
|
|
1012
|
+
let m = k(o), v = (u = e.value) == null ? void 0 : u.activeElement;
|
|
1013
|
+
if (m) {
|
|
1014
|
+
if (m === v) {
|
|
1015
|
+
n.value = v;
|
|
1016
|
+
return;
|
|
1017
|
+
}
|
|
1018
|
+
} else if (s.contains(v)) {
|
|
1019
|
+
n.value = v;
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
m ? we(m) : je(s, pe.First | pe.NoScroll) === jt.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), n.value = (d = e.value) == null ? void 0 : d.activeElement;
|
|
1023
|
+
});
|
|
1024
|
+
}, { immediate: !0, flush: "post" });
|
|
1025
|
+
}), n;
|
|
1026
|
+
}
|
|
1027
|
+
function go({ ownerDocument: e, container: t, containers: o, previousActiveElement: r }, n) {
|
|
1028
|
+
var l;
|
|
1029
|
+
zt((l = e.value) == null ? void 0 : l.defaultView, "focus", (a) => {
|
|
1030
|
+
if (!n.value)
|
|
1031
|
+
return;
|
|
1032
|
+
let i = Kt(o);
|
|
1033
|
+
k(t) instanceof HTMLElement && i.add(k(t));
|
|
1034
|
+
let s = r.value;
|
|
1035
|
+
if (!s)
|
|
1036
|
+
return;
|
|
1037
|
+
let u = a.target;
|
|
1038
|
+
u && u instanceof HTMLElement ? Gt(i, u) ? (r.value = u, we(u)) : (a.preventDefault(), a.stopPropagation(), we(s)) : we(r.value);
|
|
1039
|
+
}, !0);
|
|
1040
|
+
}
|
|
1041
|
+
function Gt(e, t) {
|
|
1042
|
+
for (let o of e)
|
|
1043
|
+
if (o.contains(t))
|
|
1044
|
+
return !0;
|
|
1045
|
+
return !1;
|
|
1046
|
+
}
|
|
1047
|
+
let Qe = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Map();
|
|
1048
|
+
function St(e, t = w(!0)) {
|
|
1049
|
+
ee((o) => {
|
|
1050
|
+
var r;
|
|
1051
|
+
if (!t.value)
|
|
1052
|
+
return;
|
|
1053
|
+
let n = k(e);
|
|
1054
|
+
if (!n)
|
|
1055
|
+
return;
|
|
1056
|
+
o(function() {
|
|
1057
|
+
var a;
|
|
1058
|
+
if (!n)
|
|
1059
|
+
return;
|
|
1060
|
+
let i = (a = Le.get(n)) != null ? a : 1;
|
|
1061
|
+
if (i === 1 ? Le.delete(n) : Le.set(n, i - 1), i !== 1)
|
|
1062
|
+
return;
|
|
1063
|
+
let s = Qe.get(n);
|
|
1064
|
+
s && (s["aria-hidden"] === null ? n.removeAttribute("aria-hidden") : n.setAttribute("aria-hidden", s["aria-hidden"]), n.inert = s.inert, Qe.delete(n));
|
|
1065
|
+
});
|
|
1066
|
+
let l = (r = Le.get(n)) != null ? r : 0;
|
|
1067
|
+
Le.set(n, l + 1), l === 0 && (Qe.set(n, { "aria-hidden": n.getAttribute("aria-hidden"), inert: n.inert }), n.setAttribute("aria-hidden", "true"), n.inert = !0);
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
let Xt = Symbol("ForcePortalRootContext");
|
|
1071
|
+
function ho() {
|
|
1072
|
+
return ne(Xt, !1);
|
|
1073
|
+
}
|
|
1074
|
+
let tt = A({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: o }) {
|
|
1075
|
+
return ie(Xt, e.force), () => {
|
|
1076
|
+
let { force: r, ...n } = e;
|
|
1077
|
+
return B({ theirProps: n, ourProps: {}, slot: {}, slots: t, attrs: o, name: "ForcePortalRoot" });
|
|
1078
|
+
};
|
|
1079
|
+
} });
|
|
1080
|
+
function bo(e) {
|
|
1081
|
+
let t = Se(e);
|
|
1082
|
+
if (!t) {
|
|
1083
|
+
if (e === null)
|
|
1084
|
+
return null;
|
|
1085
|
+
throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`);
|
|
1086
|
+
}
|
|
1087
|
+
let o = t.getElementById("headlessui-portal-root");
|
|
1088
|
+
if (o)
|
|
1089
|
+
return o;
|
|
1090
|
+
let r = t.createElement("div");
|
|
1091
|
+
return r.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(r);
|
|
1092
|
+
}
|
|
1093
|
+
let Qt = A({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: o }) {
|
|
1094
|
+
let r = w(null), n = y(() => Se(r)), l = ho(), a = ne(Zt, null), i = w(l === !0 || a == null ? bo(r.value) : a.resolveTarget());
|
|
1095
|
+
ee(() => {
|
|
1096
|
+
l || a != null && (i.value = a.resolveTarget());
|
|
1097
|
+
});
|
|
1098
|
+
let s = ne(nt, null);
|
|
1099
|
+
return U(() => {
|
|
1100
|
+
let u = k(r);
|
|
1101
|
+
u && s && se(s.register(u));
|
|
1102
|
+
}), se(() => {
|
|
1103
|
+
var u, d;
|
|
1104
|
+
let m = (u = n.value) == null ? void 0 : u.getElementById("headlessui-portal-root");
|
|
1105
|
+
m && i.value === m && i.value.children.length <= 0 && ((d = i.value.parentElement) == null || d.removeChild(i.value));
|
|
1106
|
+
}), () => {
|
|
1107
|
+
if (i.value === null)
|
|
1108
|
+
return null;
|
|
1109
|
+
let u = { ref: r, "data-headlessui-portal": "" };
|
|
1110
|
+
return q(wn, { to: i.value }, B({ ourProps: u, theirProps: e, slot: {}, attrs: o, slots: t, name: "Portal" }));
|
|
1111
|
+
};
|
|
1112
|
+
} }), nt = Symbol("PortalParentContext");
|
|
1113
|
+
function yo() {
|
|
1114
|
+
let e = ne(nt, null), t = w([]);
|
|
1115
|
+
function o(l) {
|
|
1116
|
+
return t.value.push(l), e && e.register(l), () => r(l);
|
|
1117
|
+
}
|
|
1118
|
+
function r(l) {
|
|
1119
|
+
let a = t.value.indexOf(l);
|
|
1120
|
+
a !== -1 && t.value.splice(a, 1), e && e.unregister(l);
|
|
1121
|
+
}
|
|
1122
|
+
let n = { register: o, unregister: r, portals: t };
|
|
1123
|
+
return [t, A({ name: "PortalWrapper", setup(l, { slots: a }) {
|
|
1124
|
+
return ie(nt, n), () => {
|
|
1125
|
+
var i;
|
|
1126
|
+
return (i = a.default) == null ? void 0 : i.call(a);
|
|
1127
|
+
};
|
|
1128
|
+
} })];
|
|
1129
|
+
}
|
|
1130
|
+
let Zt = Symbol("PortalGroupContext"), xo = A({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: o }) {
|
|
1131
|
+
let r = Sn({ resolveTarget() {
|
|
1132
|
+
return e.target;
|
|
1133
|
+
} });
|
|
1134
|
+
return ie(Zt, r), () => {
|
|
1135
|
+
let { target: n, ...l } = e;
|
|
1136
|
+
return B({ theirProps: l, ourProps: {}, slot: {}, attrs: t, slots: o, name: "PortalGroup" });
|
|
893
1137
|
};
|
|
894
|
-
} }),
|
|
895
|
-
|
|
896
|
-
|
|
1138
|
+
} }), en = Symbol("StackContext");
|
|
1139
|
+
var ot = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(ot || {});
|
|
1140
|
+
function wo() {
|
|
1141
|
+
return ne(en, () => {
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
function So({ type: e, enabled: t, element: o, onUpdate: r }) {
|
|
1145
|
+
let n = wo();
|
|
1146
|
+
function l(...a) {
|
|
1147
|
+
r == null || r(...a), n(...a);
|
|
1148
|
+
}
|
|
1149
|
+
U(() => {
|
|
1150
|
+
be(t, (a, i) => {
|
|
1151
|
+
a ? l(0, e, o) : i === !0 && l(1, e, o);
|
|
1152
|
+
}, { immediate: !0, flush: "sync" });
|
|
1153
|
+
}), se(() => {
|
|
1154
|
+
t.value && l(1, e, o);
|
|
1155
|
+
}), ie(en, l);
|
|
1156
|
+
}
|
|
1157
|
+
let tn = Symbol("DescriptionContext");
|
|
1158
|
+
function ko() {
|
|
1159
|
+
let e = ne(tn, null);
|
|
897
1160
|
if (e === null)
|
|
898
1161
|
throw new Error("Missing parent");
|
|
899
1162
|
return e;
|
|
900
1163
|
}
|
|
901
|
-
function
|
|
902
|
-
let
|
|
903
|
-
function
|
|
904
|
-
return
|
|
905
|
-
let
|
|
906
|
-
|
|
1164
|
+
function nn({ slot: e = w({}), name: t = "Description", props: o = {} } = {}) {
|
|
1165
|
+
let r = w([]);
|
|
1166
|
+
function n(l) {
|
|
1167
|
+
return r.value.push(l), () => {
|
|
1168
|
+
let a = r.value.indexOf(l);
|
|
1169
|
+
a !== -1 && r.value.splice(a, 1);
|
|
907
1170
|
};
|
|
908
1171
|
}
|
|
909
|
-
return
|
|
1172
|
+
return ie(tn, { register: n, slot: e, name: t, props: o }), y(() => r.value.length > 0 ? r.value.join(" ") : void 0);
|
|
910
1173
|
}
|
|
911
|
-
|
|
912
|
-
let
|
|
913
|
-
return
|
|
914
|
-
let { name:
|
|
915
|
-
return
|
|
1174
|
+
A({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${te()}` } }, setup(e, { attrs: t, slots: o }) {
|
|
1175
|
+
let r = ko();
|
|
1176
|
+
return U(() => se(r.register(e.id))), () => {
|
|
1177
|
+
let { name: n = "Description", slot: l = w({}), props: a = {} } = r, { id: i, ...s } = e, u = { ...Object.entries(a).reduce((d, [m, v]) => Object.assign(d, { [m]: _(v) }), {}), id: i };
|
|
1178
|
+
return B({ ourProps: u, theirProps: s, slot: l.value, attrs: t, slots: o, name: n });
|
|
916
1179
|
};
|
|
917
1180
|
} });
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
1181
|
+
function $o(e) {
|
|
1182
|
+
let t = kn(e.getSnapshot());
|
|
1183
|
+
return se(e.subscribe(() => {
|
|
1184
|
+
t.value = e.getSnapshot();
|
|
1185
|
+
})), t;
|
|
1186
|
+
}
|
|
1187
|
+
function _o(e, t) {
|
|
1188
|
+
let o = e(), r = /* @__PURE__ */ new Set();
|
|
1189
|
+
return { getSnapshot() {
|
|
1190
|
+
return o;
|
|
1191
|
+
}, subscribe(n) {
|
|
1192
|
+
return r.add(n), () => r.delete(n);
|
|
1193
|
+
}, dispatch(n, ...l) {
|
|
1194
|
+
let a = t[n].call(o, ...l);
|
|
1195
|
+
a && (o = a, r.forEach((i) => i()));
|
|
1196
|
+
} };
|
|
1197
|
+
}
|
|
1198
|
+
function Co() {
|
|
1199
|
+
let e;
|
|
1200
|
+
return { before({ doc: t }) {
|
|
1201
|
+
var o;
|
|
1202
|
+
let r = t.documentElement;
|
|
1203
|
+
e = ((o = t.defaultView) != null ? o : window).innerWidth - r.clientWidth;
|
|
1204
|
+
}, after({ doc: t, d: o }) {
|
|
1205
|
+
let r = t.documentElement, n = r.clientWidth - r.offsetWidth, l = e - n;
|
|
1206
|
+
o.style(r, "paddingRight", `${l}px`);
|
|
1207
|
+
} };
|
|
1208
|
+
}
|
|
1209
|
+
function Oo() {
|
|
1210
|
+
if (!Ut())
|
|
1211
|
+
return {};
|
|
1212
|
+
let e;
|
|
1213
|
+
return { before() {
|
|
1214
|
+
e = window.pageYOffset;
|
|
1215
|
+
}, after({ doc: t, d: o, meta: r }) {
|
|
1216
|
+
function n(a) {
|
|
1217
|
+
return r.containers.flatMap((i) => i()).some((i) => i.contains(a));
|
|
1218
|
+
}
|
|
1219
|
+
o.style(t.body, "marginTop", `-${e}px`), window.scrollTo(0, 0);
|
|
1220
|
+
let l = null;
|
|
1221
|
+
o.addEventListener(t, "click", (a) => {
|
|
1222
|
+
if (a.target instanceof HTMLElement)
|
|
1223
|
+
try {
|
|
1224
|
+
let i = a.target.closest("a");
|
|
1225
|
+
if (!i)
|
|
1226
|
+
return;
|
|
1227
|
+
let { hash: s } = new URL(i.href), u = t.querySelector(s);
|
|
1228
|
+
u && !n(u) && (l = u);
|
|
1229
|
+
} catch {
|
|
1230
|
+
}
|
|
1231
|
+
}, !0), o.addEventListener(t, "touchmove", (a) => {
|
|
1232
|
+
a.target instanceof HTMLElement && !n(a.target) && a.preventDefault();
|
|
1233
|
+
}, { passive: !1 }), o.add(() => {
|
|
1234
|
+
window.scrollTo(0, window.pageYOffset + e), l && l.isConnected && (l.scrollIntoView({ block: "nearest" }), l = null);
|
|
1235
|
+
});
|
|
1236
|
+
} };
|
|
1237
|
+
}
|
|
1238
|
+
function Do() {
|
|
1239
|
+
return { before({ doc: e, d: t }) {
|
|
1240
|
+
t.style(e.documentElement, "overflow", "hidden");
|
|
1241
|
+
} };
|
|
1242
|
+
}
|
|
1243
|
+
function Mo(e) {
|
|
1244
|
+
let t = {};
|
|
1245
|
+
for (let o of e)
|
|
1246
|
+
Object.assign(t, o(t));
|
|
1247
|
+
return t;
|
|
1248
|
+
}
|
|
1249
|
+
let _e = _o(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
1250
|
+
var o;
|
|
1251
|
+
let r = (o = this.get(e)) != null ? o : { doc: e, count: 0, d: He(), meta: /* @__PURE__ */ new Set() };
|
|
1252
|
+
return r.count++, r.meta.add(t), this.set(e, r), this;
|
|
1253
|
+
}, POP(e, t) {
|
|
1254
|
+
let o = this.get(e);
|
|
1255
|
+
return o && (o.count--, o.meta.delete(t)), this;
|
|
1256
|
+
}, SCROLL_PREVENT({ doc: e, d: t, meta: o }) {
|
|
1257
|
+
let r = { doc: e, d: t, meta: Mo(o) }, n = [Oo(), Co(), Do()];
|
|
1258
|
+
n.forEach(({ before: l }) => l == null ? void 0 : l(r)), n.forEach(({ after: l }) => l == null ? void 0 : l(r));
|
|
1259
|
+
}, SCROLL_ALLOW({ d: e }) {
|
|
1260
|
+
e.dispose();
|
|
1261
|
+
}, TEARDOWN({ doc: e }) {
|
|
1262
|
+
this.delete(e);
|
|
1263
|
+
} });
|
|
1264
|
+
_e.subscribe(() => {
|
|
1265
|
+
let e = _e.getSnapshot(), t = /* @__PURE__ */ new Map();
|
|
1266
|
+
for (let [o] of e)
|
|
1267
|
+
t.set(o, o.documentElement.style.overflow);
|
|
1268
|
+
for (let o of e.values()) {
|
|
1269
|
+
let r = t.get(o.doc) === "hidden", n = o.count !== 0;
|
|
1270
|
+
(n && !r || !n && r) && _e.dispatch(o.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", o), o.count === 0 && _e.dispatch("TEARDOWN", o);
|
|
1271
|
+
}
|
|
1272
|
+
});
|
|
1273
|
+
function To(e, t, o) {
|
|
1274
|
+
let r = $o(_e), n = y(() => {
|
|
1275
|
+
let l = e.value ? r.value.get(e.value) : void 0;
|
|
1276
|
+
return l ? l.count > 0 : !1;
|
|
1277
|
+
});
|
|
1278
|
+
return be([e, t], ([l, a], [i], s) => {
|
|
1279
|
+
if (!l || !a)
|
|
1280
|
+
return;
|
|
1281
|
+
_e.dispatch("PUSH", l, o);
|
|
1282
|
+
let u = !1;
|
|
1283
|
+
s(() => {
|
|
1284
|
+
u || (_e.dispatch("POP", i ?? l, o), u = !0);
|
|
1285
|
+
});
|
|
1286
|
+
}, { immediate: !0 }), n;
|
|
1287
|
+
}
|
|
1288
|
+
function Eo({ defaultContainers: e = [], portals: t } = {}) {
|
|
1289
|
+
let o = w(null), r = Se(o);
|
|
1290
|
+
function n() {
|
|
1291
|
+
var l;
|
|
1292
|
+
let a = [];
|
|
1293
|
+
for (let i of e)
|
|
1294
|
+
i !== null && (i instanceof HTMLElement ? a.push(i) : "value" in i && i.value instanceof HTMLElement && a.push(i.value));
|
|
1295
|
+
if (t != null && t.value)
|
|
1296
|
+
for (let i of t.value)
|
|
1297
|
+
a.push(i);
|
|
1298
|
+
for (let i of (l = r == null ? void 0 : r.querySelectorAll("html > *, body > *")) != null ? l : [])
|
|
1299
|
+
i !== document.body && i !== document.head && i instanceof HTMLElement && i.id !== "headlessui-portal-root" && (i.contains(k(o)) || a.some((s) => i.contains(s)) || a.push(i));
|
|
923
1300
|
return a;
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
let
|
|
935
|
-
if (
|
|
936
|
-
let
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1301
|
+
}
|
|
1302
|
+
return { resolveContainers: n, contains(l) {
|
|
1303
|
+
return n().some((a) => a.contains(l));
|
|
1304
|
+
}, mainTreeNodeRef: o, MainTreeNode() {
|
|
1305
|
+
return q(Ie, { features: De.Hidden, ref: o });
|
|
1306
|
+
} };
|
|
1307
|
+
}
|
|
1308
|
+
var Po = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Po || {});
|
|
1309
|
+
let lt = Symbol("DialogContext");
|
|
1310
|
+
function Ve(e) {
|
|
1311
|
+
let t = ne(lt, null);
|
|
1312
|
+
if (t === null) {
|
|
1313
|
+
let o = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
|
|
1314
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o, Ve), o;
|
|
1315
|
+
}
|
|
1316
|
+
return t;
|
|
1317
|
+
}
|
|
1318
|
+
let ze = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Lo = A({ name: "Dialog", inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, open: { type: [Boolean, String], default: ze }, initialFocus: { type: Object, default: null }, id: { type: String, default: () => `headlessui-dialog-${te()}` } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: o, slots: r, expose: n }) {
|
|
1319
|
+
var l;
|
|
1320
|
+
let a = w(!1);
|
|
1321
|
+
U(() => {
|
|
1322
|
+
a.value = !0;
|
|
1323
|
+
});
|
|
1324
|
+
let i = w(0), s = Be(), u = y(() => e.open === ze && s !== null ? (s.value & z.Open) === z.Open : e.open), d = w(null), m = y(() => Se(d));
|
|
1325
|
+
if (n({ el: d, $el: d }), !(e.open !== ze || s !== null))
|
|
1326
|
+
throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
1327
|
+
if (typeof u.value != "boolean")
|
|
1328
|
+
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value === ze ? void 0 : e.open}`);
|
|
1329
|
+
let v = y(() => a.value && u.value ? 0 : 1), p = y(() => v.value === 0), b = y(() => i.value > 1), h = ne(lt, null) !== null, [f, $] = yo(), { resolveContainers: M, mainTreeNodeRef: D, MainTreeNode: X } = Eo({ portals: f, defaultContainers: [y(() => {
|
|
1330
|
+
var F;
|
|
1331
|
+
return (F = ae.panelRef.value) != null ? F : d.value;
|
|
1332
|
+
})] }), Q = y(() => b.value ? "parent" : "leaf"), C = y(() => s !== null ? (s.value & z.Closing) === z.Closing : !1), E = y(() => h || C.value ? !1 : p.value), L = y(() => {
|
|
1333
|
+
var F, J, ce;
|
|
1334
|
+
return (ce = Array.from((J = (F = m.value) == null ? void 0 : F.querySelectorAll("body > *")) != null ? J : []).find((fe) => fe.id === "headlessui-portal-root" ? !1 : fe.contains(k(D)) && fe instanceof HTMLElement)) != null ? ce : null;
|
|
1335
|
+
});
|
|
1336
|
+
St(L, E);
|
|
1337
|
+
let T = y(() => b.value ? !0 : p.value), j = y(() => {
|
|
1338
|
+
var F, J, ce;
|
|
1339
|
+
return (ce = Array.from((J = (F = m.value) == null ? void 0 : F.querySelectorAll("[data-headlessui-portal]")) != null ? J : []).find((fe) => fe.contains(k(D)) && fe instanceof HTMLElement)) != null ? ce : null;
|
|
1340
|
+
});
|
|
1341
|
+
St(j, T), So({ type: "Dialog", enabled: y(() => v.value === 0), element: d, onUpdate: (F, J) => {
|
|
1342
|
+
if (J === "Dialog")
|
|
1343
|
+
return K(F, { [ot.Add]: () => i.value += 1, [ot.Remove]: () => i.value -= 1 });
|
|
1344
|
+
} });
|
|
1345
|
+
let N = nn({ name: "DialogDescription", slot: y(() => ({ open: u.value })) }), de = w(null), ae = { titleId: de, panelRef: w(null), dialogState: v, setTitleId(F) {
|
|
1346
|
+
de.value !== F && (de.value = F);
|
|
1347
|
+
}, close() {
|
|
1348
|
+
t("close", !1);
|
|
1349
|
+
} };
|
|
1350
|
+
ie(lt, ae);
|
|
1351
|
+
let Ee = y(() => !(!p.value || b.value));
|
|
1352
|
+
vt(M, (F, J) => {
|
|
1353
|
+
ae.close(), oe(() => J == null ? void 0 : J.focus());
|
|
1354
|
+
}, Ee);
|
|
1355
|
+
let ge = y(() => !(b.value || v.value !== 0));
|
|
1356
|
+
zt((l = m.value) == null ? void 0 : l.defaultView, "keydown", (F) => {
|
|
1357
|
+
ge.value && (F.defaultPrevented || F.key === P.Escape && (F.preventDefault(), F.stopPropagation(), ae.close()));
|
|
1358
|
+
});
|
|
1359
|
+
let Ce = y(() => !(C.value || v.value !== 0 || h));
|
|
1360
|
+
return To(m, Ce, (F) => {
|
|
1361
|
+
var J;
|
|
1362
|
+
return { containers: [...(J = F.containers) != null ? J : [], M] };
|
|
1363
|
+
}), ee((F) => {
|
|
1364
|
+
if (v.value !== 0)
|
|
1365
|
+
return;
|
|
1366
|
+
let J = k(d);
|
|
1367
|
+
if (!J)
|
|
1368
|
+
return;
|
|
1369
|
+
let ce = new ResizeObserver((fe) => {
|
|
1370
|
+
for (let qe of fe) {
|
|
1371
|
+
let he = qe.target.getBoundingClientRect();
|
|
1372
|
+
he.x === 0 && he.y === 0 && he.width === 0 && he.height === 0 && ae.close();
|
|
1373
|
+
}
|
|
1374
|
+
});
|
|
1375
|
+
ce.observe(J), F(() => ce.disconnect());
|
|
1376
|
+
}), () => {
|
|
1377
|
+
let { id: F, open: J, initialFocus: ce, ...fe } = e, qe = { ...o, ref: d, id: F, role: "dialog", "aria-modal": v.value === 0 ? !0 : void 0, "aria-labelledby": de.value, "aria-describedby": N.value }, he = { open: v.value === 0 };
|
|
1378
|
+
return q(tt, { force: !0 }, () => [q(Qt, () => q(xo, { target: d.value }, () => q(tt, { force: !1 }, () => q(Pe, { initialFocus: ce, containers: M, features: p.value ? K(Q.value, { parent: Pe.features.RestoreFocus, leaf: Pe.features.All & ~Pe.features.FocusLock }) : Pe.features.None }, () => q($, {}, () => B({ ourProps: qe, theirProps: { ...fe, ...o }, slot: he, attrs: o, slots: r, visible: v.value === 0, features: me.RenderStrategy | me.Static, name: "Dialog" })))))), q(X)]);
|
|
1379
|
+
};
|
|
1380
|
+
} });
|
|
1381
|
+
A({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-overlay-${te()}` } }, setup(e, { attrs: t, slots: o }) {
|
|
1382
|
+
let r = Ve("DialogOverlay");
|
|
1383
|
+
function n(l) {
|
|
1384
|
+
l.target === l.currentTarget && (l.preventDefault(), l.stopPropagation(), r.close());
|
|
1385
|
+
}
|
|
1386
|
+
return () => {
|
|
1387
|
+
let { id: l, ...a } = e;
|
|
1388
|
+
return B({ ourProps: { id: l, "aria-hidden": !0, onClick: n }, theirProps: a, slot: { open: r.dialogState.value === 0 }, attrs: t, slots: o, name: "DialogOverlay" });
|
|
1389
|
+
};
|
|
1390
|
+
} });
|
|
1391
|
+
A({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-backdrop-${te()}` } }, inheritAttrs: !1, setup(e, { attrs: t, slots: o, expose: r }) {
|
|
1392
|
+
let n = Ve("DialogBackdrop"), l = w(null);
|
|
1393
|
+
return r({ el: l, $el: l }), U(() => {
|
|
1394
|
+
if (n.panelRef.value === null)
|
|
1395
|
+
throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
1396
|
+
}), () => {
|
|
1397
|
+
let { id: a, ...i } = e, s = { id: a, ref: l, "aria-hidden": !0 };
|
|
1398
|
+
return q(tt, { force: !0 }, () => q(Qt, () => B({ ourProps: s, theirProps: { ...t, ...i }, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: o, name: "DialogBackdrop" })));
|
|
1399
|
+
};
|
|
1400
|
+
} });
|
|
1401
|
+
let Ro = A({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-panel-${te()}` } }, setup(e, { attrs: t, slots: o, expose: r }) {
|
|
1402
|
+
let n = Ve("DialogPanel");
|
|
1403
|
+
r({ el: n.panelRef, $el: n.panelRef });
|
|
1404
|
+
function l(a) {
|
|
1405
|
+
a.stopPropagation();
|
|
1406
|
+
}
|
|
1407
|
+
return () => {
|
|
1408
|
+
let { id: a, ...i } = e, s = { id: a, ref: n.panelRef, onClick: l };
|
|
1409
|
+
return B({ ourProps: s, theirProps: i, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: o, name: "DialogPanel" });
|
|
1410
|
+
};
|
|
1411
|
+
} }), jo = A({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: () => `headlessui-dialog-title-${te()}` } }, setup(e, { attrs: t, slots: o }) {
|
|
1412
|
+
let r = Ve("DialogTitle");
|
|
1413
|
+
return U(() => {
|
|
1414
|
+
r.setTitleId(e.id), se(() => r.setTitleId(null));
|
|
1415
|
+
}), () => {
|
|
1416
|
+
let { id: n, ...l } = e;
|
|
1417
|
+
return B({ ourProps: { id: n }, theirProps: l, slot: { open: r.dialogState.value === 0 }, attrs: t, slots: o, name: "DialogTitle" });
|
|
1418
|
+
};
|
|
1419
|
+
} }), kt = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
1420
|
+
function $t(e) {
|
|
1421
|
+
var t, o;
|
|
1422
|
+
let r = (t = e.innerText) != null ? t : "", n = e.cloneNode(!0);
|
|
1423
|
+
if (!(n instanceof HTMLElement))
|
|
1424
|
+
return r;
|
|
1425
|
+
let l = !1;
|
|
1426
|
+
for (let i of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
|
|
1427
|
+
i.remove(), l = !0;
|
|
1428
|
+
let a = l ? (o = n.innerText) != null ? o : "" : r;
|
|
1429
|
+
return kt.test(a) && (a = a.replace(kt, "")), a;
|
|
1430
|
+
}
|
|
1431
|
+
function Io(e) {
|
|
1432
|
+
let t = e.getAttribute("aria-label");
|
|
1433
|
+
if (typeof t == "string")
|
|
1434
|
+
return t.trim();
|
|
1435
|
+
let o = e.getAttribute("aria-labelledby");
|
|
1436
|
+
if (o) {
|
|
1437
|
+
let r = o.split(" ").map((n) => {
|
|
1438
|
+
let l = document.getElementById(n);
|
|
1439
|
+
if (l) {
|
|
1440
|
+
let a = l.getAttribute("aria-label");
|
|
1441
|
+
return typeof a == "string" ? a.trim() : $t(l).trim();
|
|
941
1442
|
}
|
|
942
1443
|
return null;
|
|
943
1444
|
}).filter(Boolean);
|
|
944
|
-
if (
|
|
945
|
-
return
|
|
1445
|
+
if (r.length > 0)
|
|
1446
|
+
return r.join(", ");
|
|
946
1447
|
}
|
|
947
|
-
return
|
|
1448
|
+
return $t(e).trim();
|
|
948
1449
|
}
|
|
949
|
-
function
|
|
950
|
-
let
|
|
1450
|
+
function Ao(e) {
|
|
1451
|
+
let t = w(""), o = w("");
|
|
951
1452
|
return () => {
|
|
952
|
-
let
|
|
953
|
-
if (!
|
|
1453
|
+
let r = k(e);
|
|
1454
|
+
if (!r)
|
|
954
1455
|
return "";
|
|
955
|
-
let
|
|
956
|
-
if (
|
|
957
|
-
return
|
|
958
|
-
let
|
|
959
|
-
return
|
|
1456
|
+
let n = r.innerText;
|
|
1457
|
+
if (t.value === n)
|
|
1458
|
+
return o.value;
|
|
1459
|
+
let l = Io(r).trim().toLowerCase();
|
|
1460
|
+
return t.value = n, o.value = l, l;
|
|
960
1461
|
};
|
|
961
1462
|
}
|
|
962
|
-
var
|
|
963
|
-
function
|
|
1463
|
+
var Fo = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Fo || {}), Bo = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Bo || {});
|
|
1464
|
+
function No(e) {
|
|
964
1465
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
965
1466
|
}
|
|
966
|
-
let
|
|
967
|
-
function
|
|
968
|
-
let
|
|
969
|
-
if (
|
|
970
|
-
let
|
|
971
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
972
|
-
}
|
|
973
|
-
return
|
|
974
|
-
}
|
|
975
|
-
let
|
|
976
|
-
let
|
|
977
|
-
function
|
|
978
|
-
let
|
|
979
|
-
return
|
|
980
|
-
}
|
|
981
|
-
let
|
|
982
|
-
|
|
983
|
-
}, openMenu: () =>
|
|
984
|
-
let
|
|
985
|
-
|
|
986
|
-
}, search(
|
|
987
|
-
let
|
|
988
|
-
|
|
989
|
-
let b = (
|
|
990
|
-
|
|
1467
|
+
let on = Symbol("MenuContext");
|
|
1468
|
+
function Ke(e) {
|
|
1469
|
+
let t = ne(on, null);
|
|
1470
|
+
if (t === null) {
|
|
1471
|
+
let o = new Error(`<${e} /> is missing a parent <Menu /> component.`);
|
|
1472
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o, Ke), o;
|
|
1473
|
+
}
|
|
1474
|
+
return t;
|
|
1475
|
+
}
|
|
1476
|
+
let Ho = A({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: o }) {
|
|
1477
|
+
let r = w(1), n = w(null), l = w(null), a = w([]), i = w(""), s = w(null), u = w(1);
|
|
1478
|
+
function d(v = (p) => p) {
|
|
1479
|
+
let p = s.value !== null ? a.value[s.value] : null, b = ft(v(a.value.slice()), (f) => k(f.dataRef.domRef)), h = p ? b.indexOf(p) : null;
|
|
1480
|
+
return h === -1 && (h = null), { items: b, activeItemIndex: h };
|
|
1481
|
+
}
|
|
1482
|
+
let m = { menuState: r, buttonRef: n, itemsRef: l, items: a, searchQuery: i, activeItemIndex: s, activationTrigger: u, closeMenu: () => {
|
|
1483
|
+
r.value = 1, s.value = null;
|
|
1484
|
+
}, openMenu: () => r.value = 0, goToItem(v, p, b) {
|
|
1485
|
+
let h = d(), f = Pt(v === I.Specific ? { focus: I.Specific, id: p } : { focus: v }, { resolveItems: () => h.items, resolveActiveIndex: () => h.activeItemIndex, resolveId: ($) => $.id, resolveDisabled: ($) => $.dataRef.disabled });
|
|
1486
|
+
i.value = "", s.value = f, u.value = b ?? 1, a.value = h.items;
|
|
1487
|
+
}, search(v) {
|
|
1488
|
+
let p = i.value !== "" ? 0 : 1;
|
|
1489
|
+
i.value += v.toLowerCase();
|
|
1490
|
+
let b = (s.value !== null ? a.value.slice(s.value + p).concat(a.value.slice(0, s.value + p)) : a.value).find((f) => f.dataRef.textValue.startsWith(i.value) && !f.dataRef.disabled), h = b ? a.value.indexOf(b) : -1;
|
|
1491
|
+
h === -1 || h === s.value || (s.value = h, u.value = 1);
|
|
991
1492
|
}, clearSearch() {
|
|
992
|
-
|
|
993
|
-
}, registerItem(
|
|
994
|
-
let b =
|
|
995
|
-
|
|
996
|
-
}, unregisterItem(
|
|
997
|
-
let
|
|
998
|
-
let
|
|
999
|
-
return
|
|
1493
|
+
i.value = "";
|
|
1494
|
+
}, registerItem(v, p) {
|
|
1495
|
+
let b = d((h) => [...h, { id: v, dataRef: p }]);
|
|
1496
|
+
a.value = b.items, s.value = b.activeItemIndex, u.value = 1;
|
|
1497
|
+
}, unregisterItem(v) {
|
|
1498
|
+
let p = d((b) => {
|
|
1499
|
+
let h = b.findIndex((f) => f.id === v);
|
|
1500
|
+
return h !== -1 && b.splice(h, 1), b;
|
|
1000
1501
|
});
|
|
1001
|
-
|
|
1502
|
+
a.value = p.items, s.value = p.activeItemIndex, u.value = 1;
|
|
1002
1503
|
} };
|
|
1003
|
-
return
|
|
1504
|
+
return vt([n, l], (v, p) => {
|
|
1004
1505
|
var b;
|
|
1005
|
-
|
|
1006
|
-
}, y(() =>
|
|
1007
|
-
let
|
|
1008
|
-
return
|
|
1506
|
+
m.closeMenu(), ct(p, dt.Loose) || (v.preventDefault(), (b = k(n)) == null || b.focus());
|
|
1507
|
+
}, y(() => r.value === 0)), ie(on, m), st(y(() => K(r.value, { [0]: z.Open, [1]: z.Closed }))), () => {
|
|
1508
|
+
let v = { open: r.value === 0, close: m.closeMenu };
|
|
1509
|
+
return B({ ourProps: {}, theirProps: e, slot: v, slots: t, attrs: o, name: "Menu" });
|
|
1009
1510
|
};
|
|
1010
|
-
} }),
|
|
1011
|
-
let
|
|
1012
|
-
|
|
1013
|
-
function
|
|
1511
|
+
} }), Vo = A({ name: "MenuButton", props: { disabled: { type: Boolean, default: !1 }, as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-menu-button-${te()}` } }, setup(e, { attrs: t, slots: o, expose: r }) {
|
|
1512
|
+
let n = Ke("MenuButton");
|
|
1513
|
+
r({ el: n.buttonRef, $el: n.buttonRef });
|
|
1514
|
+
function l(u) {
|
|
1014
1515
|
switch (u.key) {
|
|
1015
|
-
case
|
|
1016
|
-
case
|
|
1017
|
-
case
|
|
1018
|
-
u.preventDefault(), u.stopPropagation(),
|
|
1019
|
-
var
|
|
1020
|
-
(
|
|
1516
|
+
case P.Space:
|
|
1517
|
+
case P.Enter:
|
|
1518
|
+
case P.ArrowDown:
|
|
1519
|
+
u.preventDefault(), u.stopPropagation(), n.openMenu(), oe(() => {
|
|
1520
|
+
var d;
|
|
1521
|
+
(d = k(n.itemsRef)) == null || d.focus({ preventScroll: !0 }), n.goToItem(I.First);
|
|
1021
1522
|
});
|
|
1022
1523
|
break;
|
|
1023
|
-
case
|
|
1024
|
-
u.preventDefault(), u.stopPropagation(),
|
|
1025
|
-
var
|
|
1026
|
-
(
|
|
1524
|
+
case P.ArrowUp:
|
|
1525
|
+
u.preventDefault(), u.stopPropagation(), n.openMenu(), oe(() => {
|
|
1526
|
+
var d;
|
|
1527
|
+
(d = k(n.itemsRef)) == null || d.focus({ preventScroll: !0 }), n.goToItem(I.Last);
|
|
1027
1528
|
});
|
|
1028
1529
|
break;
|
|
1029
1530
|
}
|
|
1030
1531
|
}
|
|
1031
|
-
function
|
|
1532
|
+
function a(u) {
|
|
1032
1533
|
switch (u.key) {
|
|
1033
|
-
case
|
|
1534
|
+
case P.Space:
|
|
1034
1535
|
u.preventDefault();
|
|
1035
1536
|
break;
|
|
1036
1537
|
}
|
|
1037
1538
|
}
|
|
1038
|
-
function
|
|
1039
|
-
e.disabled || (
|
|
1040
|
-
var
|
|
1041
|
-
return (
|
|
1042
|
-
})) : (u.preventDefault(),
|
|
1043
|
-
var
|
|
1044
|
-
return (
|
|
1539
|
+
function i(u) {
|
|
1540
|
+
e.disabled || (n.menuState.value === 0 ? (n.closeMenu(), oe(() => {
|
|
1541
|
+
var d;
|
|
1542
|
+
return (d = k(n.buttonRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1543
|
+
})) : (u.preventDefault(), n.openMenu(), No(() => {
|
|
1544
|
+
var d;
|
|
1545
|
+
return (d = k(n.itemsRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1045
1546
|
})));
|
|
1046
1547
|
}
|
|
1047
|
-
let
|
|
1548
|
+
let s = ut(y(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1048
1549
|
return () => {
|
|
1049
1550
|
var u;
|
|
1050
|
-
let
|
|
1051
|
-
return
|
|
1551
|
+
let d = { open: n.menuState.value === 0 }, { id: m, ...v } = e, p = { ref: n.buttonRef, id: m, type: s.value, "aria-haspopup": "menu", "aria-controls": (u = k(n.itemsRef)) == null ? void 0 : u.id, "aria-expanded": e.disabled ? void 0 : n.menuState.value === 0, onKeydown: l, onKeyup: a, onClick: i };
|
|
1552
|
+
return B({ ourProps: p, theirProps: v, slot: d, attrs: t, slots: o, name: "MenuButton" });
|
|
1052
1553
|
};
|
|
1053
|
-
} }),
|
|
1054
|
-
let
|
|
1055
|
-
|
|
1056
|
-
return
|
|
1057
|
-
}, walk(
|
|
1058
|
-
|
|
1554
|
+
} }), Yo = A({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-menu-items-${te()}` } }, setup(e, { attrs: t, slots: o, expose: r }) {
|
|
1555
|
+
let n = Ke("MenuItems"), l = w(null);
|
|
1556
|
+
r({ el: n.itemsRef, $el: n.itemsRef }), Rt({ container: y(() => k(n.itemsRef)), enabled: y(() => n.menuState.value === 0), accept(d) {
|
|
1557
|
+
return d.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : d.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1558
|
+
}, walk(d) {
|
|
1559
|
+
d.setAttribute("role", "none");
|
|
1059
1560
|
} });
|
|
1060
|
-
function
|
|
1061
|
-
var
|
|
1062
|
-
switch (
|
|
1063
|
-
case
|
|
1064
|
-
if (
|
|
1065
|
-
return
|
|
1066
|
-
case
|
|
1067
|
-
if (
|
|
1068
|
-
let
|
|
1069
|
-
(
|
|
1561
|
+
function a(d) {
|
|
1562
|
+
var m;
|
|
1563
|
+
switch (l.value && clearTimeout(l.value), d.key) {
|
|
1564
|
+
case P.Space:
|
|
1565
|
+
if (n.searchQuery.value !== "")
|
|
1566
|
+
return d.preventDefault(), d.stopPropagation(), n.search(d.key);
|
|
1567
|
+
case P.Enter:
|
|
1568
|
+
if (d.preventDefault(), d.stopPropagation(), n.activeItemIndex.value !== null) {
|
|
1569
|
+
let v = n.items.value[n.activeItemIndex.value];
|
|
1570
|
+
(m = k(v.dataRef.domRef)) == null || m.click();
|
|
1070
1571
|
}
|
|
1071
|
-
|
|
1572
|
+
n.closeMenu(), At(k(n.buttonRef));
|
|
1072
1573
|
break;
|
|
1073
|
-
case
|
|
1074
|
-
return
|
|
1075
|
-
case
|
|
1076
|
-
return
|
|
1077
|
-
case
|
|
1078
|
-
case
|
|
1079
|
-
return
|
|
1080
|
-
case
|
|
1081
|
-
case
|
|
1082
|
-
return
|
|
1083
|
-
case
|
|
1084
|
-
|
|
1085
|
-
var
|
|
1086
|
-
return (
|
|
1574
|
+
case P.ArrowDown:
|
|
1575
|
+
return d.preventDefault(), d.stopPropagation(), n.goToItem(I.Next);
|
|
1576
|
+
case P.ArrowUp:
|
|
1577
|
+
return d.preventDefault(), d.stopPropagation(), n.goToItem(I.Previous);
|
|
1578
|
+
case P.Home:
|
|
1579
|
+
case P.PageUp:
|
|
1580
|
+
return d.preventDefault(), d.stopPropagation(), n.goToItem(I.First);
|
|
1581
|
+
case P.End:
|
|
1582
|
+
case P.PageDown:
|
|
1583
|
+
return d.preventDefault(), d.stopPropagation(), n.goToItem(I.Last);
|
|
1584
|
+
case P.Escape:
|
|
1585
|
+
d.preventDefault(), d.stopPropagation(), n.closeMenu(), oe(() => {
|
|
1586
|
+
var v;
|
|
1587
|
+
return (v = k(n.buttonRef)) == null ? void 0 : v.focus({ preventScroll: !0 });
|
|
1087
1588
|
});
|
|
1088
1589
|
break;
|
|
1089
|
-
case
|
|
1090
|
-
|
|
1590
|
+
case P.Tab:
|
|
1591
|
+
d.preventDefault(), d.stopPropagation(), n.closeMenu(), oe(() => Gn(k(n.buttonRef), d.shiftKey ? pe.Previous : pe.Next));
|
|
1091
1592
|
break;
|
|
1092
1593
|
default:
|
|
1093
|
-
|
|
1594
|
+
d.key.length === 1 && (n.search(d.key), l.value = setTimeout(() => n.clearSearch(), 350));
|
|
1094
1595
|
break;
|
|
1095
1596
|
}
|
|
1096
1597
|
}
|
|
1097
|
-
function d
|
|
1098
|
-
switch (
|
|
1099
|
-
case
|
|
1100
|
-
|
|
1598
|
+
function i(d) {
|
|
1599
|
+
switch (d.key) {
|
|
1600
|
+
case P.Space:
|
|
1601
|
+
d.preventDefault();
|
|
1101
1602
|
break;
|
|
1102
1603
|
}
|
|
1103
1604
|
}
|
|
1104
|
-
let
|
|
1605
|
+
let s = Be(), u = y(() => s !== null ? (s.value & z.Open) === z.Open : n.menuState.value === 0);
|
|
1105
1606
|
return () => {
|
|
1106
|
-
var
|
|
1107
|
-
let
|
|
1108
|
-
return
|
|
1607
|
+
var d, m;
|
|
1608
|
+
let v = { open: n.menuState.value === 0 }, { id: p, ...b } = e, h = { "aria-activedescendant": n.activeItemIndex.value === null || (d = n.items.value[n.activeItemIndex.value]) == null ? void 0 : d.id, "aria-labelledby": (m = k(n.buttonRef)) == null ? void 0 : m.id, id: p, onKeydown: a, onKeyup: i, role: "menu", tabIndex: 0, ref: n.itemsRef };
|
|
1609
|
+
return B({ ourProps: h, theirProps: b, slot: v, attrs: t, slots: o, features: me.RenderStrategy | me.Static, visible: u.value, name: "MenuItems" });
|
|
1109
1610
|
};
|
|
1110
|
-
} }),
|
|
1111
|
-
let
|
|
1112
|
-
|
|
1113
|
-
let
|
|
1114
|
-
return
|
|
1115
|
-
}, domRef:
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
var
|
|
1119
|
-
return (
|
|
1611
|
+
} }), Uo = A({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-menu-item-${te()}` } }, setup(e, { slots: t, attrs: o, expose: r }) {
|
|
1612
|
+
let n = Ke("MenuItem"), l = w(null);
|
|
1613
|
+
r({ el: l, $el: l });
|
|
1614
|
+
let a = y(() => n.activeItemIndex.value !== null ? n.items.value[n.activeItemIndex.value].id === e.id : !1), i = Ao(l), s = y(() => ({ disabled: e.disabled, get textValue() {
|
|
1615
|
+
return i();
|
|
1616
|
+
}, domRef: l }));
|
|
1617
|
+
U(() => n.registerItem(e.id, s)), se(() => n.unregisterItem(e.id)), ee(() => {
|
|
1618
|
+
n.menuState.value === 0 && a.value && n.activationTrigger.value !== 0 && oe(() => {
|
|
1619
|
+
var h, f;
|
|
1620
|
+
return (f = (h = k(l)) == null ? void 0 : h.scrollIntoView) == null ? void 0 : f.call(h, { block: "nearest" });
|
|
1120
1621
|
});
|
|
1121
1622
|
});
|
|
1122
|
-
function u(
|
|
1623
|
+
function u(h) {
|
|
1123
1624
|
if (e.disabled)
|
|
1124
|
-
return
|
|
1125
|
-
|
|
1625
|
+
return h.preventDefault();
|
|
1626
|
+
n.closeMenu(), At(k(n.buttonRef));
|
|
1126
1627
|
}
|
|
1127
|
-
function
|
|
1628
|
+
function d() {
|
|
1128
1629
|
if (e.disabled)
|
|
1129
|
-
return
|
|
1130
|
-
|
|
1630
|
+
return n.goToItem(I.Nothing);
|
|
1631
|
+
n.goToItem(I.Specific, e.id);
|
|
1131
1632
|
}
|
|
1132
|
-
let
|
|
1133
|
-
function
|
|
1134
|
-
|
|
1633
|
+
let m = Yt();
|
|
1634
|
+
function v(h) {
|
|
1635
|
+
m.update(h);
|
|
1135
1636
|
}
|
|
1136
|
-
function
|
|
1137
|
-
|
|
1637
|
+
function p(h) {
|
|
1638
|
+
m.wasMoved(h) && (e.disabled || a.value || n.goToItem(I.Specific, e.id, 0));
|
|
1138
1639
|
}
|
|
1139
|
-
function b(
|
|
1140
|
-
|
|
1640
|
+
function b(h) {
|
|
1641
|
+
m.wasMoved(h) && (e.disabled || a.value && n.goToItem(I.Nothing));
|
|
1141
1642
|
}
|
|
1142
1643
|
return () => {
|
|
1143
|
-
let { disabled:
|
|
1144
|
-
return
|
|
1644
|
+
let { disabled: h } = e, f = { active: a.value, disabled: h, close: n.closeMenu }, { id: $, ...M } = e;
|
|
1645
|
+
return B({ ourProps: { id: $, ref: l, role: "menuitem", tabIndex: h === !0 ? void 0 : -1, "aria-disabled": h === !0 ? !0 : void 0, disabled: void 0, onClick: u, onFocus: d, onPointerenter: v, onMouseenter: v, onPointermove: p, onMousemove: p, onPointerleave: b, onMouseleave: b }, theirProps: { ...o, ...M }, slot: f, attrs: o, slots: t, name: "MenuItem" });
|
|
1145
1646
|
};
|
|
1146
|
-
} }),
|
|
1147
|
-
function
|
|
1148
|
-
let e = ne(
|
|
1647
|
+
} }), ln = Symbol("LabelContext");
|
|
1648
|
+
function rn() {
|
|
1649
|
+
let e = ne(ln, null);
|
|
1149
1650
|
if (e === null) {
|
|
1150
|
-
let
|
|
1151
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
1651
|
+
let t = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
1652
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t, rn), t;
|
|
1152
1653
|
}
|
|
1153
1654
|
return e;
|
|
1154
1655
|
}
|
|
1155
|
-
function
|
|
1156
|
-
let
|
|
1157
|
-
function
|
|
1158
|
-
return
|
|
1159
|
-
let
|
|
1160
|
-
|
|
1656
|
+
function qo({ slot: e = {}, name: t = "Label", props: o = {} } = {}) {
|
|
1657
|
+
let r = w([]);
|
|
1658
|
+
function n(l) {
|
|
1659
|
+
return r.value.push(l), () => {
|
|
1660
|
+
let a = r.value.indexOf(l);
|
|
1661
|
+
a !== -1 && r.value.splice(a, 1);
|
|
1161
1662
|
};
|
|
1162
1663
|
}
|
|
1163
|
-
return
|
|
1664
|
+
return ie(ln, { register: n, slot: e, name: t, props: o }), y(() => r.value.length > 0 ? r.value.join(" ") : void 0);
|
|
1164
1665
|
}
|
|
1165
|
-
let
|
|
1166
|
-
let
|
|
1167
|
-
return
|
|
1168
|
-
let { name:
|
|
1169
|
-
return
|
|
1666
|
+
let zo = A({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: () => `headlessui-label-${te()}` } }, setup(e, { slots: t, attrs: o }) {
|
|
1667
|
+
let r = rn();
|
|
1668
|
+
return U(() => se(r.register(e.id))), () => {
|
|
1669
|
+
let { name: n = "Label", slot: l = {}, props: a = {} } = r, { id: i, passive: s, ...u } = e, d = { ...Object.entries(a).reduce((m, [v, p]) => Object.assign(m, { [v]: _(p) }), {}), id: i };
|
|
1670
|
+
return s && (delete d.onClick, delete d.htmlFor, delete u.onClick), B({ ourProps: d, theirProps: u, slot: l, attrs: o, slots: t, name: n });
|
|
1170
1671
|
};
|
|
1171
|
-
} }),
|
|
1172
|
-
let
|
|
1173
|
-
var
|
|
1174
|
-
return (
|
|
1175
|
-
}), onClick(
|
|
1176
|
-
|
|
1177
|
-
} } }),
|
|
1178
|
-
return
|
|
1179
|
-
} }),
|
|
1180
|
-
let
|
|
1181
|
-
function
|
|
1182
|
-
|
|
1183
|
-
}
|
|
1184
|
-
let u =
|
|
1185
|
-
|
|
1186
|
-
function
|
|
1187
|
-
|
|
1188
|
-
}
|
|
1189
|
-
function
|
|
1190
|
-
|
|
1191
|
-
}
|
|
1192
|
-
function b(
|
|
1193
|
-
|
|
1194
|
-
}
|
|
1195
|
-
let
|
|
1196
|
-
var
|
|
1197
|
-
return (
|
|
1672
|
+
} }), an = Symbol("GroupContext"), Wo = A({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: o }) {
|
|
1673
|
+
let r = w(null), n = qo({ name: "SwitchLabel", props: { htmlFor: y(() => {
|
|
1674
|
+
var a;
|
|
1675
|
+
return (a = r.value) == null ? void 0 : a.id;
|
|
1676
|
+
}), onClick(a) {
|
|
1677
|
+
r.value && (a.currentTarget.tagName === "LABEL" && a.preventDefault(), r.value.click(), r.value.focus({ preventScroll: !0 }));
|
|
1678
|
+
} } }), l = nn({ name: "SwitchDescription" });
|
|
1679
|
+
return ie(an, { switchRef: r, labelledby: n, describedby: l }), () => B({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: o, name: "SwitchGroup" });
|
|
1680
|
+
} }), Ko = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: () => `headlessui-switch-${te()}` } }, inheritAttrs: !1, setup(e, { emit: t, attrs: o, slots: r, expose: n }) {
|
|
1681
|
+
let l = ne(an, null), [a, i] = Vt(y(() => e.modelValue), (f) => t("update:modelValue", f), y(() => e.defaultChecked));
|
|
1682
|
+
function s() {
|
|
1683
|
+
i(!a.value);
|
|
1684
|
+
}
|
|
1685
|
+
let u = w(null), d = l === null ? u : l.switchRef, m = ut(y(() => ({ as: e.as, type: o.type })), d);
|
|
1686
|
+
n({ el: d, $el: d });
|
|
1687
|
+
function v(f) {
|
|
1688
|
+
f.preventDefault(), s();
|
|
1689
|
+
}
|
|
1690
|
+
function p(f) {
|
|
1691
|
+
f.key === P.Space ? (f.preventDefault(), s()) : f.key === P.Enter && Xn(f.currentTarget);
|
|
1692
|
+
}
|
|
1693
|
+
function b(f) {
|
|
1694
|
+
f.preventDefault();
|
|
1695
|
+
}
|
|
1696
|
+
let h = y(() => {
|
|
1697
|
+
var f, $;
|
|
1698
|
+
return ($ = (f = k(d)) == null ? void 0 : f.closest) == null ? void 0 : $.call(f, "form");
|
|
1198
1699
|
});
|
|
1199
|
-
return
|
|
1200
|
-
|
|
1201
|
-
if (!
|
|
1700
|
+
return U(() => {
|
|
1701
|
+
be([h], () => {
|
|
1702
|
+
if (!h.value || e.defaultChecked === void 0)
|
|
1202
1703
|
return;
|
|
1203
|
-
function
|
|
1204
|
-
|
|
1704
|
+
function f() {
|
|
1705
|
+
i(e.defaultChecked);
|
|
1205
1706
|
}
|
|
1206
|
-
return
|
|
1207
|
-
var
|
|
1208
|
-
(
|
|
1707
|
+
return h.value.addEventListener("reset", f), () => {
|
|
1708
|
+
var $;
|
|
1709
|
+
($ = h.value) == null || $.removeEventListener("reset", f);
|
|
1209
1710
|
};
|
|
1210
1711
|
}, { immediate: !0 });
|
|
1211
1712
|
}), () => {
|
|
1212
|
-
let { id:
|
|
1213
|
-
return
|
|
1713
|
+
let { id: f, name: $, value: M, form: D, ...X } = e, Q = { checked: a.value }, C = { id: f, ref: d, role: "switch", type: m.value, tabIndex: 0, "aria-checked": a.value, "aria-labelledby": l == null ? void 0 : l.labelledby.value, "aria-describedby": l == null ? void 0 : l.describedby.value, onClick: v, onKeyup: p, onKeypress: b };
|
|
1714
|
+
return q(Z, [$ != null && a.value != null ? q(Ie, Et({ features: De.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: a.value, form: D, name: $, value: M })) : null, B({ ourProps: C, theirProps: { ...o, ...Fe(X, ["modelValue", "defaultChecked"]) }, slot: Q, attrs: o, slots: r, name: "Switch" })]);
|
|
1715
|
+
};
|
|
1716
|
+
} }), Jo = zo;
|
|
1717
|
+
function Go(e) {
|
|
1718
|
+
let t = { called: !1 };
|
|
1719
|
+
return (...o) => {
|
|
1720
|
+
if (!t.called)
|
|
1721
|
+
return t.called = !0, e(...o);
|
|
1214
1722
|
};
|
|
1215
|
-
}
|
|
1216
|
-
function
|
|
1217
|
-
|
|
1723
|
+
}
|
|
1724
|
+
function Ze(e, ...t) {
|
|
1725
|
+
e && t.length > 0 && e.classList.add(...t);
|
|
1726
|
+
}
|
|
1727
|
+
function We(e, ...t) {
|
|
1728
|
+
e && t.length > 0 && e.classList.remove(...t);
|
|
1729
|
+
}
|
|
1730
|
+
var rt = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(rt || {});
|
|
1731
|
+
function Xo(e, t) {
|
|
1732
|
+
let o = He();
|
|
1733
|
+
if (!e)
|
|
1734
|
+
return o.dispose;
|
|
1735
|
+
let { transitionDuration: r, transitionDelay: n } = getComputedStyle(e), [l, a] = [r, n].map((i) => {
|
|
1736
|
+
let [s = 0] = i.split(",").filter(Boolean).map((u) => u.includes("ms") ? parseFloat(u) : parseFloat(u) * 1e3).sort((u, d) => d - u);
|
|
1737
|
+
return s;
|
|
1738
|
+
});
|
|
1739
|
+
return l !== 0 ? o.setTimeout(() => t("finished"), l + a) : t("finished"), o.add(() => t("cancelled")), o.dispose;
|
|
1740
|
+
}
|
|
1741
|
+
function _t(e, t, o, r, n, l) {
|
|
1742
|
+
let a = He(), i = l !== void 0 ? Go(l) : () => {
|
|
1743
|
+
};
|
|
1744
|
+
return We(e, ...n), Ze(e, ...t, ...o), a.nextFrame(() => {
|
|
1745
|
+
We(e, ...o), Ze(e, ...r), a.add(Xo(e, (s) => (We(e, ...r, ...t), Ze(e, ...n), i(s))));
|
|
1746
|
+
}), a.add(() => We(e, ...t, ...o, ...r, ...n)), a.add(() => i("cancelled")), a.dispose;
|
|
1747
|
+
}
|
|
1748
|
+
function ke(e = "") {
|
|
1749
|
+
return e.split(" ").filter((t) => t.trim().length > 1);
|
|
1750
|
+
}
|
|
1751
|
+
let pt = Symbol("TransitionContext");
|
|
1752
|
+
var Qo = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Qo || {});
|
|
1753
|
+
function Zo() {
|
|
1754
|
+
return ne(pt, null) !== null;
|
|
1755
|
+
}
|
|
1756
|
+
function el() {
|
|
1757
|
+
let e = ne(pt, null);
|
|
1758
|
+
if (e === null)
|
|
1759
|
+
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1760
|
+
return e;
|
|
1761
|
+
}
|
|
1762
|
+
function tl() {
|
|
1763
|
+
let e = ne(mt, null);
|
|
1764
|
+
if (e === null)
|
|
1765
|
+
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1766
|
+
return e;
|
|
1767
|
+
}
|
|
1768
|
+
let mt = Symbol("NestingContext");
|
|
1769
|
+
function Je(e) {
|
|
1770
|
+
return "children" in e ? Je(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0;
|
|
1771
|
+
}
|
|
1772
|
+
function sn(e) {
|
|
1773
|
+
let t = w([]), o = w(!1);
|
|
1774
|
+
U(() => o.value = !0), se(() => o.value = !1);
|
|
1775
|
+
function r(l, a = xe.Hidden) {
|
|
1776
|
+
let i = t.value.findIndex(({ id: s }) => s === l);
|
|
1777
|
+
i !== -1 && (K(a, { [xe.Unmount]() {
|
|
1778
|
+
t.value.splice(i, 1);
|
|
1779
|
+
}, [xe.Hidden]() {
|
|
1780
|
+
t.value[i].state = "hidden";
|
|
1781
|
+
} }), !Je(t) && o.value && (e == null || e()));
|
|
1782
|
+
}
|
|
1783
|
+
function n(l) {
|
|
1784
|
+
let a = t.value.find(({ id: i }) => i === l);
|
|
1785
|
+
return a ? a.state !== "visible" && (a.state = "visible") : t.value.push({ id: l, state: "visible" }), () => r(l, xe.Unmount);
|
|
1786
|
+
}
|
|
1787
|
+
return { children: t, register: n, unregister: r };
|
|
1788
|
+
}
|
|
1789
|
+
let un = me.RenderStrategy, at = A({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: o, slots: r, expose: n }) {
|
|
1790
|
+
let l = w(0);
|
|
1791
|
+
function a() {
|
|
1792
|
+
l.value |= z.Opening, t("beforeEnter");
|
|
1793
|
+
}
|
|
1794
|
+
function i() {
|
|
1795
|
+
l.value &= ~z.Opening, t("afterEnter");
|
|
1796
|
+
}
|
|
1797
|
+
function s() {
|
|
1798
|
+
l.value |= z.Closing, t("beforeLeave");
|
|
1799
|
+
}
|
|
1800
|
+
function u() {
|
|
1801
|
+
l.value &= ~z.Closing, t("afterLeave");
|
|
1802
|
+
}
|
|
1803
|
+
if (!Zo() && Vn())
|
|
1804
|
+
return () => q(dn, { ...e, onBeforeEnter: a, onAfterEnter: i, onBeforeLeave: s, onAfterLeave: u }, r);
|
|
1805
|
+
let d = w(null), m = y(() => e.unmount ? xe.Unmount : xe.Hidden);
|
|
1806
|
+
n({ el: d, $el: d });
|
|
1807
|
+
let { show: v, appear: p } = el(), { register: b, unregister: h } = tl(), f = w(v.value ? "visible" : "hidden"), $ = { value: !0 }, M = te(), D = { value: !1 }, X = sn(() => {
|
|
1808
|
+
!D.value && f.value !== "hidden" && (f.value = "hidden", h(M), u());
|
|
1809
|
+
});
|
|
1810
|
+
U(() => {
|
|
1811
|
+
let ae = b(M);
|
|
1812
|
+
se(ae);
|
|
1813
|
+
}), ee(() => {
|
|
1814
|
+
if (m.value === xe.Hidden && M) {
|
|
1815
|
+
if (v.value && f.value !== "visible") {
|
|
1816
|
+
f.value = "visible";
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
K(f.value, { hidden: () => h(M), visible: () => b(M) });
|
|
1820
|
+
}
|
|
1821
|
+
});
|
|
1822
|
+
let Q = ke(e.enter), C = ke(e.enterFrom), E = ke(e.enterTo), L = ke(e.entered), T = ke(e.leave), j = ke(e.leaveFrom), N = ke(e.leaveTo);
|
|
1823
|
+
U(() => {
|
|
1824
|
+
ee(() => {
|
|
1825
|
+
if (f.value === "visible") {
|
|
1826
|
+
let ae = k(d);
|
|
1827
|
+
if (ae instanceof Comment && ae.data === "")
|
|
1828
|
+
throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
1829
|
+
}
|
|
1830
|
+
});
|
|
1831
|
+
});
|
|
1832
|
+
function de(ae) {
|
|
1833
|
+
let Ee = $.value && !p.value, ge = k(d);
|
|
1834
|
+
!ge || !(ge instanceof HTMLElement) || Ee || (D.value = !0, v.value && a(), v.value || s(), ae(v.value ? _t(ge, Q, C, E, L, (Ce) => {
|
|
1835
|
+
D.value = !1, Ce === rt.Finished && i();
|
|
1836
|
+
}) : _t(ge, T, j, N, L, (Ce) => {
|
|
1837
|
+
D.value = !1, Ce === rt.Finished && (Je(X) || (f.value = "hidden", h(M), u()));
|
|
1838
|
+
})));
|
|
1839
|
+
}
|
|
1840
|
+
return U(() => {
|
|
1841
|
+
be([v], (ae, Ee, ge) => {
|
|
1842
|
+
de(ge), $.value = !1;
|
|
1843
|
+
}, { immediate: !0 });
|
|
1844
|
+
}), ie(mt, X), st(y(() => K(f.value, { visible: z.Open, hidden: z.Closed }) | l.value)), () => {
|
|
1845
|
+
let { appear: ae, show: Ee, enter: ge, enterFrom: Ce, enterTo: F, entered: J, leave: ce, leaveFrom: fe, leaveTo: qe, ...he } = e, hn = { ref: d }, bn = { ...he, ...p.value && v.value && Ne.isServer ? { class: R([o.class, he.class, ...Q, ...C]) } : {} };
|
|
1846
|
+
return B({ theirProps: bn, ourProps: hn, slot: {}, slots: r, attrs: o, features: un, visible: f.value === "visible", name: "TransitionChild" });
|
|
1847
|
+
};
|
|
1848
|
+
} }), nl = at, dn = A({ inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: o, slots: r }) {
|
|
1849
|
+
let n = Be(), l = y(() => e.show === null && n !== null ? (n.value & z.Open) === z.Open : e.show);
|
|
1850
|
+
ee(() => {
|
|
1851
|
+
if (![!0, !1].includes(l.value))
|
|
1852
|
+
throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
|
|
1853
|
+
});
|
|
1854
|
+
let a = w(l.value ? "visible" : "hidden"), i = sn(() => {
|
|
1855
|
+
a.value = "hidden";
|
|
1856
|
+
}), s = w(!0), u = { show: l, appear: y(() => e.appear || !s.value) };
|
|
1857
|
+
return U(() => {
|
|
1858
|
+
ee(() => {
|
|
1859
|
+
s.value = !1, l.value ? a.value = "visible" : Je(i) || (a.value = "hidden");
|
|
1860
|
+
});
|
|
1861
|
+
}), ie(mt, i), ie(pt, u), () => {
|
|
1862
|
+
let d = Fe(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), m = { unmount: e.unmount };
|
|
1863
|
+
return B({ ourProps: { ...m, as: "template" }, theirProps: {}, slot: {}, slots: { ...r, default: () => [q(nl, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...o, ...m, ...d }, r.default)] }, attrs: {}, features: un, visible: a.value === "visible", name: "Transition" });
|
|
1864
|
+
};
|
|
1865
|
+
} });
|
|
1866
|
+
function ol(e, t) {
|
|
1867
|
+
return g(), x("svg", {
|
|
1218
1868
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1219
1869
|
fill: "none",
|
|
1220
1870
|
viewBox: "0 0 24 24",
|
|
@@ -1222,15 +1872,31 @@ function mn(e, n) {
|
|
|
1222
1872
|
stroke: "currentColor",
|
|
1223
1873
|
"aria-hidden": "true"
|
|
1224
1874
|
}, [
|
|
1225
|
-
|
|
1875
|
+
c("path", {
|
|
1226
1876
|
"stroke-linecap": "round",
|
|
1227
1877
|
"stroke-linejoin": "round",
|
|
1228
1878
|
d: "M7.5 7.5h-.75A2.25 2.25 0 004.5 9.75v7.5a2.25 2.25 0 002.25 2.25h7.5a2.25 2.25 0 002.25-2.25v-7.5a2.25 2.25 0 00-2.25-2.25h-.75m0-3l-3-3m0 0l-3 3m3-3v11.25m6-2.25h.75a2.25 2.25 0 012.25 2.25v7.5a2.25 2.25 0 01-2.25 2.25h-7.5a2.25 2.25 0 01-2.25-2.25v-.75"
|
|
1229
1879
|
})
|
|
1230
1880
|
]);
|
|
1231
1881
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return
|
|
1882
|
+
function cn(e, t) {
|
|
1883
|
+
return g(), x("svg", {
|
|
1884
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1885
|
+
fill: "none",
|
|
1886
|
+
viewBox: "0 0 24 24",
|
|
1887
|
+
"stroke-width": "1.5",
|
|
1888
|
+
stroke: "currentColor",
|
|
1889
|
+
"aria-hidden": "true"
|
|
1890
|
+
}, [
|
|
1891
|
+
c("path", {
|
|
1892
|
+
"stroke-linecap": "round",
|
|
1893
|
+
"stroke-linejoin": "round",
|
|
1894
|
+
d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1895
|
+
})
|
|
1896
|
+
]);
|
|
1897
|
+
}
|
|
1898
|
+
function gt(e, t) {
|
|
1899
|
+
return g(), x("svg", {
|
|
1234
1900
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1235
1901
|
fill: "none",
|
|
1236
1902
|
viewBox: "0 0 24 24",
|
|
@@ -1238,15 +1904,15 @@ function ot(e, n) {
|
|
|
1238
1904
|
stroke: "currentColor",
|
|
1239
1905
|
"aria-hidden": "true"
|
|
1240
1906
|
}, [
|
|
1241
|
-
|
|
1907
|
+
c("path", {
|
|
1242
1908
|
"stroke-linecap": "round",
|
|
1243
1909
|
"stroke-linejoin": "round",
|
|
1244
1910
|
d: "M4.5 12.75l6 6 9-13.5"
|
|
1245
1911
|
})
|
|
1246
1912
|
]);
|
|
1247
1913
|
}
|
|
1248
|
-
function
|
|
1249
|
-
return
|
|
1914
|
+
function ll(e, t) {
|
|
1915
|
+
return g(), x("svg", {
|
|
1250
1916
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1251
1917
|
fill: "none",
|
|
1252
1918
|
viewBox: "0 0 24 24",
|
|
@@ -1254,15 +1920,47 @@ function bn(e, n) {
|
|
|
1254
1920
|
stroke: "currentColor",
|
|
1255
1921
|
"aria-hidden": "true"
|
|
1256
1922
|
}, [
|
|
1257
|
-
|
|
1923
|
+
c("path", {
|
|
1258
1924
|
"stroke-linecap": "round",
|
|
1259
1925
|
"stroke-linejoin": "round",
|
|
1260
1926
|
d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
|
|
1261
1927
|
})
|
|
1262
1928
|
]);
|
|
1263
1929
|
}
|
|
1264
|
-
function
|
|
1265
|
-
return
|
|
1930
|
+
function rl(e, t) {
|
|
1931
|
+
return g(), x("svg", {
|
|
1932
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1933
|
+
fill: "none",
|
|
1934
|
+
viewBox: "0 0 24 24",
|
|
1935
|
+
"stroke-width": "1.5",
|
|
1936
|
+
stroke: "currentColor",
|
|
1937
|
+
"aria-hidden": "true"
|
|
1938
|
+
}, [
|
|
1939
|
+
c("path", {
|
|
1940
|
+
"stroke-linecap": "round",
|
|
1941
|
+
"stroke-linejoin": "round",
|
|
1942
|
+
d: "M15.75 19.5L8.25 12l7.5-7.5"
|
|
1943
|
+
})
|
|
1944
|
+
]);
|
|
1945
|
+
}
|
|
1946
|
+
function fn(e, t) {
|
|
1947
|
+
return g(), x("svg", {
|
|
1948
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1949
|
+
fill: "none",
|
|
1950
|
+
viewBox: "0 0 24 24",
|
|
1951
|
+
"stroke-width": "1.5",
|
|
1952
|
+
stroke: "currentColor",
|
|
1953
|
+
"aria-hidden": "true"
|
|
1954
|
+
}, [
|
|
1955
|
+
c("path", {
|
|
1956
|
+
"stroke-linecap": "round",
|
|
1957
|
+
"stroke-linejoin": "round",
|
|
1958
|
+
d: "M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
1959
|
+
})
|
|
1960
|
+
]);
|
|
1961
|
+
}
|
|
1962
|
+
function al(e, t) {
|
|
1963
|
+
return g(), x("svg", {
|
|
1266
1964
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1267
1965
|
fill: "none",
|
|
1268
1966
|
viewBox: "0 0 24 24",
|
|
@@ -1270,15 +1968,15 @@ function gn(e, n) {
|
|
|
1270
1968
|
stroke: "currentColor",
|
|
1271
1969
|
"aria-hidden": "true"
|
|
1272
1970
|
}, [
|
|
1273
|
-
|
|
1971
|
+
c("path", {
|
|
1274
1972
|
"stroke-linecap": "round",
|
|
1275
1973
|
"stroke-linejoin": "round",
|
|
1276
1974
|
d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"
|
|
1277
1975
|
})
|
|
1278
1976
|
]);
|
|
1279
1977
|
}
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1978
|
+
function il(e, t) {
|
|
1979
|
+
return g(), x("svg", {
|
|
1282
1980
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1283
1981
|
fill: "none",
|
|
1284
1982
|
viewBox: "0 0 24 24",
|
|
@@ -1286,15 +1984,15 @@ function hn(e, n) {
|
|
|
1286
1984
|
stroke: "currentColor",
|
|
1287
1985
|
"aria-hidden": "true"
|
|
1288
1986
|
}, [
|
|
1289
|
-
|
|
1987
|
+
c("path", {
|
|
1290
1988
|
"stroke-linecap": "round",
|
|
1291
1989
|
"stroke-linejoin": "round",
|
|
1292
1990
|
d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"
|
|
1293
1991
|
})
|
|
1294
1992
|
]);
|
|
1295
1993
|
}
|
|
1296
|
-
function
|
|
1297
|
-
return
|
|
1994
|
+
function Ge(e, t) {
|
|
1995
|
+
return g(), x("svg", {
|
|
1298
1996
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1299
1997
|
fill: "none",
|
|
1300
1998
|
viewBox: "0 0 24 24",
|
|
@@ -1302,15 +2000,79 @@ function xn(e, n) {
|
|
|
1302
2000
|
stroke: "currentColor",
|
|
1303
2001
|
"aria-hidden": "true"
|
|
1304
2002
|
}, [
|
|
1305
|
-
|
|
2003
|
+
c("path", {
|
|
1306
2004
|
"stroke-linecap": "round",
|
|
1307
2005
|
"stroke-linejoin": "round",
|
|
1308
2006
|
d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
|
|
1309
2007
|
})
|
|
1310
2008
|
]);
|
|
1311
2009
|
}
|
|
1312
|
-
function
|
|
1313
|
-
return
|
|
2010
|
+
function sl(e, t) {
|
|
2011
|
+
return g(), x("svg", {
|
|
2012
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2013
|
+
fill: "none",
|
|
2014
|
+
viewBox: "0 0 24 24",
|
|
2015
|
+
"stroke-width": "1.5",
|
|
2016
|
+
stroke: "currentColor",
|
|
2017
|
+
"aria-hidden": "true"
|
|
2018
|
+
}, [
|
|
2019
|
+
c("path", {
|
|
2020
|
+
"stroke-linecap": "round",
|
|
2021
|
+
"stroke-linejoin": "round",
|
|
2022
|
+
d: "M10.05 4.575a1.575 1.575 0 10-3.15 0v3m3.15-3v-1.5a1.575 1.575 0 013.15 0v1.5m-3.15 0l.075 5.925m3.075.75V4.575m0 0a1.575 1.575 0 013.15 0V15M6.9 7.575a1.575 1.575 0 10-3.15 0v8.175a6.75 6.75 0 006.75 6.75h2.018a5.25 5.25 0 003.712-1.538l1.732-1.732a5.25 5.25 0 001.538-3.712l.003-2.024a.668.668 0 01.198-.471 1.575 1.575 0 10-2.228-2.228 3.818 3.818 0 00-1.12 2.687M6.9 7.575V12m6.27 4.318A4.49 4.49 0 0116.35 15m.002 0h-.002"
|
|
2023
|
+
})
|
|
2024
|
+
]);
|
|
2025
|
+
}
|
|
2026
|
+
function ul(e, t) {
|
|
2027
|
+
return g(), x("svg", {
|
|
2028
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2029
|
+
fill: "none",
|
|
2030
|
+
viewBox: "0 0 24 24",
|
|
2031
|
+
"stroke-width": "1.5",
|
|
2032
|
+
stroke: "currentColor",
|
|
2033
|
+
"aria-hidden": "true"
|
|
2034
|
+
}, [
|
|
2035
|
+
c("path", {
|
|
2036
|
+
"stroke-linecap": "round",
|
|
2037
|
+
"stroke-linejoin": "round",
|
|
2038
|
+
d: "M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"
|
|
2039
|
+
})
|
|
2040
|
+
]);
|
|
2041
|
+
}
|
|
2042
|
+
function vn(e, t) {
|
|
2043
|
+
return g(), x("svg", {
|
|
2044
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2045
|
+
fill: "none",
|
|
2046
|
+
viewBox: "0 0 24 24",
|
|
2047
|
+
"stroke-width": "1.5",
|
|
2048
|
+
stroke: "currentColor",
|
|
2049
|
+
"aria-hidden": "true"
|
|
2050
|
+
}, [
|
|
2051
|
+
c("path", {
|
|
2052
|
+
"stroke-linecap": "round",
|
|
2053
|
+
"stroke-linejoin": "round",
|
|
2054
|
+
d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"
|
|
2055
|
+
})
|
|
2056
|
+
]);
|
|
2057
|
+
}
|
|
2058
|
+
function Ye(e, t) {
|
|
2059
|
+
return g(), x("svg", {
|
|
2060
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2061
|
+
fill: "none",
|
|
2062
|
+
viewBox: "0 0 24 24",
|
|
2063
|
+
"stroke-width": "1.5",
|
|
2064
|
+
stroke: "currentColor",
|
|
2065
|
+
"aria-hidden": "true"
|
|
2066
|
+
}, [
|
|
2067
|
+
c("path", {
|
|
2068
|
+
"stroke-linecap": "round",
|
|
2069
|
+
"stroke-linejoin": "round",
|
|
2070
|
+
d: "M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
2071
|
+
})
|
|
2072
|
+
]);
|
|
2073
|
+
}
|
|
2074
|
+
function it(e, t) {
|
|
2075
|
+
return g(), x("svg", {
|
|
1314
2076
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1315
2077
|
fill: "none",
|
|
1316
2078
|
viewBox: "0 0 24 24",
|
|
@@ -1318,16 +2080,16 @@ function Oe(e, n) {
|
|
|
1318
2080
|
stroke: "currentColor",
|
|
1319
2081
|
"aria-hidden": "true"
|
|
1320
2082
|
}, [
|
|
1321
|
-
|
|
2083
|
+
c("path", {
|
|
1322
2084
|
"stroke-linecap": "round",
|
|
1323
2085
|
"stroke-linejoin": "round",
|
|
1324
|
-
d: "
|
|
2086
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
1325
2087
|
})
|
|
1326
2088
|
]);
|
|
1327
2089
|
}
|
|
1328
|
-
const
|
|
2090
|
+
const dl = { class: "py-1" }, cl = ["onClick"], fl = {
|
|
1329
2091
|
name: "uiDropdown"
|
|
1330
|
-
},
|
|
2092
|
+
}, pn = /* @__PURE__ */ Object.assign(fl, {
|
|
1331
2093
|
props: {
|
|
1332
2094
|
/**
|
|
1333
2095
|
* Array de elementos que componen el dropdown
|
|
@@ -1350,29 +2112,26 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1350
2112
|
/**
|
|
1351
2113
|
* label del Dropdown
|
|
1352
2114
|
*/
|
|
1353
|
-
label:
|
|
1354
|
-
type: String,
|
|
1355
|
-
required: !0
|
|
1356
|
-
}
|
|
2115
|
+
label: String
|
|
1357
2116
|
},
|
|
1358
2117
|
emits: ["optionSelected"],
|
|
1359
|
-
setup(e, { emit:
|
|
1360
|
-
const
|
|
1361
|
-
let
|
|
1362
|
-
return
|
|
1363
|
-
}),
|
|
1364
|
-
|
|
2118
|
+
setup(e, { emit: t }) {
|
|
2119
|
+
const o = e, r = y(() => {
|
|
2120
|
+
let l = o.items.find((a) => a.active === !0);
|
|
2121
|
+
return l ? l.name : o.label;
|
|
2122
|
+
}), n = (l) => {
|
|
2123
|
+
o.disabled || t("optionSelected", l.value);
|
|
1365
2124
|
};
|
|
1366
|
-
return (
|
|
2125
|
+
return (l, a) => (g(), le(_(Ho), {
|
|
1367
2126
|
as: "div",
|
|
1368
|
-
class:
|
|
2127
|
+
class: R(["relative inline-block text-left", { "opacity-25": e.disabled }])
|
|
1369
2128
|
}, {
|
|
1370
|
-
default:
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
default:
|
|
1374
|
-
|
|
1375
|
-
|
|
2129
|
+
default: Y(() => [
|
|
2130
|
+
c("div", null, [
|
|
2131
|
+
S(_(Vo), { class: "inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500" }, {
|
|
2132
|
+
default: Y(() => [
|
|
2133
|
+
ye(O(r.value) + " ", 1),
|
|
2134
|
+
S(_(ll), {
|
|
1376
2135
|
"aria-hidden": "true",
|
|
1377
2136
|
class: "-mr-1 ml-2 h-5 w-5"
|
|
1378
2137
|
})
|
|
@@ -1380,7 +2139,7 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1380
2139
|
_: 1
|
|
1381
2140
|
})
|
|
1382
2141
|
]),
|
|
1383
|
-
|
|
2142
|
+
S(Ot, {
|
|
1384
2143
|
"enter-active-class": "transition ease-out duration-100",
|
|
1385
2144
|
"enter-from-class": "transform opacity-0 scale-95",
|
|
1386
2145
|
"enter-to-class": "transform opacity-100 scale-100",
|
|
@@ -1388,22 +2147,22 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1388
2147
|
"leave-from-class": "transform opacity-100 scale-100",
|
|
1389
2148
|
"leave-to-class": "transform opacity-0 scale-95"
|
|
1390
2149
|
}, {
|
|
1391
|
-
default:
|
|
1392
|
-
e.disabled ? W("", !0) : (
|
|
2150
|
+
default: Y(() => [
|
|
2151
|
+
e.disabled ? W("", !0) : (g(), le(_(Yo), {
|
|
1393
2152
|
key: 0,
|
|
1394
|
-
class:
|
|
2153
|
+
class: R([{ "right-0": e.position === "right", "left-0": e.position === "left" }, "origin-top-right absolute mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none z-10"])
|
|
1395
2154
|
}, {
|
|
1396
|
-
default:
|
|
1397
|
-
|
|
1398
|
-
(
|
|
1399
|
-
default:
|
|
1400
|
-
|
|
1401
|
-
onClick: (u) =>
|
|
1402
|
-
class:
|
|
1403
|
-
|
|
2155
|
+
default: Y(() => [
|
|
2156
|
+
c("div", dl, [
|
|
2157
|
+
(g(!0), x(Z, null, ue(e.items, (i, s) => (g(), le(_(Uo), { key: s }, {
|
|
2158
|
+
default: Y(() => [
|
|
2159
|
+
c("a", {
|
|
2160
|
+
onClick: (u) => n(i),
|
|
2161
|
+
class: R([
|
|
2162
|
+
i.active ? "bg-gray-100 text-gray-900" : "text-gray-700",
|
|
1404
2163
|
"block px-4 py-2 text-sm cursor-pointer"
|
|
1405
2164
|
])
|
|
1406
|
-
},
|
|
2165
|
+
}, O(i.name), 11, cl)
|
|
1407
2166
|
]),
|
|
1408
2167
|
_: 2
|
|
1409
2168
|
}, 1024))), 128))
|
|
@@ -1418,21 +2177,21 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1418
2177
|
_: 1
|
|
1419
2178
|
}, 8, ["class"]));
|
|
1420
2179
|
}
|
|
1421
|
-
}),
|
|
2180
|
+
}), vl = { class: "flex justify-between" }, pl = {
|
|
1422
2181
|
key: 0,
|
|
1423
2182
|
class: "block text-sm font-medium text-gray-700"
|
|
1424
|
-
},
|
|
2183
|
+
}, ml = {
|
|
1425
2184
|
key: 1,
|
|
1426
2185
|
class: "text-[10px] text-gray-500 uppercase justify-self-end"
|
|
1427
|
-
},
|
|
2186
|
+
}, gl = {
|
|
1428
2187
|
key: 0,
|
|
1429
2188
|
class: "inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 sm:text-sm"
|
|
1430
|
-
},
|
|
2189
|
+
}, hl = ["disabled", "name", "placeholder", "type"], bl = {
|
|
1431
2190
|
key: 1,
|
|
1432
2191
|
class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"
|
|
1433
|
-
},
|
|
2192
|
+
}, yl = {
|
|
1434
2193
|
name: "uiInput"
|
|
1435
|
-
},
|
|
2194
|
+
}, xl = /* @__PURE__ */ Object.assign(yl, {
|
|
1436
2195
|
props: {
|
|
1437
2196
|
/**
|
|
1438
2197
|
* Texto sobre el campo
|
|
@@ -1496,22 +2255,22 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1496
2255
|
addOn: String
|
|
1497
2256
|
},
|
|
1498
2257
|
emits: ["inputChanged"],
|
|
1499
|
-
setup(e, { emit:
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1502
|
-
},
|
|
1503
|
-
return (
|
|
1504
|
-
|
|
1505
|
-
e.label ? (
|
|
1506
|
-
e.optional ? (
|
|
2258
|
+
setup(e, { emit: t }) {
|
|
2259
|
+
const o = e, r = (l) => {
|
|
2260
|
+
t("inputChanged", { value: l.target.value, name: l.target.name });
|
|
2261
|
+
}, n = w(o.value);
|
|
2262
|
+
return (l, a) => (g(), x("div", null, [
|
|
2263
|
+
c("div", vl, [
|
|
2264
|
+
e.label ? (g(), x("label", pl, O(e.label), 1)) : W("", !0),
|
|
2265
|
+
e.optional ? (g(), x("span", ml, O(e.optional), 1)) : W("", !0)
|
|
1507
2266
|
]),
|
|
1508
|
-
|
|
1509
|
-
class:
|
|
2267
|
+
c("div", {
|
|
2268
|
+
class: R([{ "mt-1": e.label }, "relative flex"])
|
|
1510
2269
|
}, [
|
|
1511
|
-
e.addOn ? (
|
|
1512
|
-
|
|
1513
|
-
"onUpdate:modelValue":
|
|
1514
|
-
class:
|
|
2270
|
+
e.addOn ? (g(), x("span", gl, O(e.addOn), 1)) : W("", !0),
|
|
2271
|
+
G(c("input", {
|
|
2272
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => n.value = i),
|
|
2273
|
+
class: R([{
|
|
1515
2274
|
"border-gray-300": e.color !== "danger" || e.color !== "warning" || e.color !== "success",
|
|
1516
2275
|
"border-red-300": e.color === "danger",
|
|
1517
2276
|
"border-yellow-400": e.color === "warning",
|
|
@@ -1528,66 +2287,66 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1528
2287
|
name: e.name,
|
|
1529
2288
|
placeholder: e.placeholder,
|
|
1530
2289
|
type: e.type,
|
|
1531
|
-
onInput:
|
|
1532
|
-
}, null, 42,
|
|
1533
|
-
[
|
|
2290
|
+
onInput: r
|
|
2291
|
+
}, null, 42, hl), [
|
|
2292
|
+
[$n, n.value]
|
|
1534
2293
|
]),
|
|
1535
|
-
e.icon ? (
|
|
1536
|
-
|
|
2294
|
+
e.icon ? (g(), x("div", bl, [
|
|
2295
|
+
S(ve, {
|
|
1537
2296
|
icon: e.icon,
|
|
1538
2297
|
color: e.color
|
|
1539
2298
|
}, null, 8, ["icon", "color"]),
|
|
1540
|
-
|
|
1541
|
-
icon:
|
|
2299
|
+
G(S(ve, {
|
|
2300
|
+
icon: _(gt),
|
|
1542
2301
|
color: "green"
|
|
1543
2302
|
}, null, 8, ["icon"]), [
|
|
1544
|
-
[
|
|
2303
|
+
[re, e.color === "success"]
|
|
1545
2304
|
]),
|
|
1546
|
-
|
|
1547
|
-
icon:
|
|
2305
|
+
G(S(ve, {
|
|
2306
|
+
icon: _(Ge),
|
|
1548
2307
|
color: "yellow"
|
|
1549
2308
|
}, null, 8, ["icon"]), [
|
|
1550
|
-
[
|
|
2309
|
+
[re, e.color === "warning"]
|
|
1551
2310
|
]),
|
|
1552
|
-
|
|
1553
|
-
icon:
|
|
2311
|
+
G(S(ve, {
|
|
2312
|
+
icon: _(il),
|
|
1554
2313
|
color: "red"
|
|
1555
2314
|
}, null, 8, ["icon"]), [
|
|
1556
|
-
[
|
|
2315
|
+
[re, e.color === "danger"]
|
|
1557
2316
|
])
|
|
1558
2317
|
])) : W("", !0)
|
|
1559
2318
|
], 2),
|
|
1560
|
-
|
|
1561
|
-
class:
|
|
2319
|
+
G(c("p", {
|
|
2320
|
+
class: R([{
|
|
1562
2321
|
"text-gray-300": e.color !== "danger" || e.color !== "warning" || e.color !== "success",
|
|
1563
2322
|
"text-red-300": e.color === "danger",
|
|
1564
2323
|
"text-yellow-400": e.color === "warning",
|
|
1565
2324
|
"text-green-400": e.color === "success"
|
|
1566
2325
|
}, "mt-2 text-xs flex flex-row items-center"])
|
|
1567
2326
|
}, [
|
|
1568
|
-
|
|
1569
|
-
icon:
|
|
2327
|
+
S(ve, {
|
|
2328
|
+
icon: _(Ye),
|
|
1570
2329
|
color: "red",
|
|
1571
2330
|
class: "mr-2"
|
|
1572
2331
|
}, null, 8, ["icon"]),
|
|
1573
|
-
|
|
2332
|
+
ye(O(e.error), 1)
|
|
1574
2333
|
], 2), [
|
|
1575
|
-
[
|
|
2334
|
+
[re, e.error]
|
|
1576
2335
|
])
|
|
1577
2336
|
]));
|
|
1578
2337
|
}
|
|
1579
|
-
}),
|
|
2338
|
+
}), wl = { class: "flex justify-between" }, Sl = {
|
|
1580
2339
|
key: 0,
|
|
1581
2340
|
class: "block text-sm font-medium text-gray-700"
|
|
1582
|
-
},
|
|
2341
|
+
}, kl = {
|
|
1583
2342
|
key: 1,
|
|
1584
2343
|
class: "text-[10px] text-gray-500 uppercase"
|
|
1585
|
-
},
|
|
2344
|
+
}, $l = ["onDrop"], _l = { class: "space-y-1 flex flex-col items-center justify-center" }, Cl = { class: "flex text-sm text-gray-600 flex flex-col sm:flex-row text-center" }, Ol = {
|
|
1586
2345
|
for: "file-upload",
|
|
1587
2346
|
class: "relative cursor-pointer rounded-md font-medium text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 hover:text-indigo-500"
|
|
1588
|
-
},
|
|
2347
|
+
}, Dl = ["accept"], Ml = { class: "pl-1" }, Tl = { class: "text-xs text-gray-500 pb-4" }, El = { class: "mt-2 text-xs flex flex-row items-center text-red-300" }, Pl = {
|
|
1589
2348
|
name: "uiInputFile"
|
|
1590
|
-
},
|
|
2349
|
+
}, Ll = /* @__PURE__ */ Object.assign(Pl, {
|
|
1591
2350
|
props: {
|
|
1592
2351
|
name: String,
|
|
1593
2352
|
label: String,
|
|
@@ -1599,24 +2358,24 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1599
2358
|
accept: String,
|
|
1600
2359
|
icon: {
|
|
1601
2360
|
type: Function,
|
|
1602
|
-
default:
|
|
2361
|
+
default: ol
|
|
1603
2362
|
}
|
|
1604
2363
|
},
|
|
1605
2364
|
emits: ["filesUploaded"],
|
|
1606
|
-
setup(e, { emit:
|
|
1607
|
-
const
|
|
1608
|
-
let
|
|
1609
|
-
|
|
1610
|
-
},
|
|
1611
|
-
|
|
2365
|
+
setup(e, { emit: t }) {
|
|
2366
|
+
const o = e, r = w(""), n = (a) => {
|
|
2367
|
+
let s = a.dataTransfer.files;
|
|
2368
|
+
t("filesUploaded", s), o.filename = s[0].name;
|
|
2369
|
+
}, l = (a) => {
|
|
2370
|
+
t("filesUploaded", a.target.files), o.filename = a.target.files[0].name;
|
|
1612
2371
|
};
|
|
1613
|
-
return (
|
|
1614
|
-
|
|
1615
|
-
e.label ? (
|
|
1616
|
-
e.optional ? (
|
|
2372
|
+
return (a, i) => (g(), x("div", null, [
|
|
2373
|
+
c("div", wl, [
|
|
2374
|
+
e.label ? (g(), x("label", Sl, O(e.label), 1)) : W("", !0),
|
|
2375
|
+
e.optional ? (g(), x("span", kl, O(e.optional), 1)) : W("", !0)
|
|
1617
2376
|
]),
|
|
1618
|
-
|
|
1619
|
-
class:
|
|
2377
|
+
c("div", {
|
|
2378
|
+
class: R([
|
|
1620
2379
|
[
|
|
1621
2380
|
{ "mt-1": e.label },
|
|
1622
2381
|
{ "border-gray-300 hover:border-gray-400": !e.error },
|
|
@@ -1624,53 +2383,53 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1624
2383
|
],
|
|
1625
2384
|
"dropArea flex justify-center rounded-md border-2 border-dashed px-6 pt-5 pb-6"
|
|
1626
2385
|
]),
|
|
1627
|
-
onDragover:
|
|
2386
|
+
onDragover: i[0] || (i[0] = ht(() => {
|
|
1628
2387
|
}, ["prevent"])),
|
|
1629
|
-
onDrop:
|
|
2388
|
+
onDrop: ht(n, ["prevent"])
|
|
1630
2389
|
}, [
|
|
1631
|
-
|
|
1632
|
-
|
|
2390
|
+
c("div", _l, [
|
|
2391
|
+
S(ve, {
|
|
1633
2392
|
icon: e.icon,
|
|
1634
2393
|
size: "massive",
|
|
1635
2394
|
color: "gray",
|
|
1636
2395
|
"aria-hidden": "true",
|
|
1637
2396
|
class: "mb-4"
|
|
1638
2397
|
}, null, 8, ["icon"]),
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
2398
|
+
c("div", Cl, [
|
|
2399
|
+
c("label", Ol, [
|
|
2400
|
+
c("span", null, O(e.placeholder), 1),
|
|
2401
|
+
c("input", {
|
|
1643
2402
|
id: "file-upload",
|
|
1644
2403
|
name: "file-upload",
|
|
1645
2404
|
type: "file",
|
|
1646
2405
|
class: "sr-only",
|
|
1647
2406
|
accept: e.accept,
|
|
1648
|
-
onChange:
|
|
1649
|
-
}, null, 40,
|
|
2407
|
+
onChange: l
|
|
2408
|
+
}, null, 40, Dl)
|
|
1650
2409
|
]),
|
|
1651
|
-
|
|
2410
|
+
c("p", Ml, O(e.dragAndDrop), 1)
|
|
1652
2411
|
]),
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
[
|
|
2412
|
+
c("p", Tl, O(e.fileTypesAndSizes), 1),
|
|
2413
|
+
G(c("p", { class: "font-bold text-xs uppercase block p-2 bg-gray-200 rounded" }, O(r.value), 513), [
|
|
2414
|
+
[re, r.value !== ""]
|
|
1656
2415
|
])
|
|
1657
2416
|
])
|
|
1658
|
-
], 42,
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
icon:
|
|
2417
|
+
], 42, $l),
|
|
2418
|
+
G(c("p", El, [
|
|
2419
|
+
S(ve, {
|
|
2420
|
+
icon: _(Ye),
|
|
1662
2421
|
color: "red",
|
|
1663
2422
|
class: "mr-2"
|
|
1664
2423
|
}, null, 8, ["icon"]),
|
|
1665
|
-
|
|
2424
|
+
ye(O(e.error), 1)
|
|
1666
2425
|
], 512), [
|
|
1667
|
-
[
|
|
2426
|
+
[re, e.error]
|
|
1668
2427
|
])
|
|
1669
2428
|
]));
|
|
1670
2429
|
}
|
|
1671
|
-
}),
|
|
2430
|
+
}), Rl = { class: "relative mt-1" }, jl = {
|
|
1672
2431
|
name: "uiSelect"
|
|
1673
|
-
},
|
|
2432
|
+
}, Il = /* @__PURE__ */ Object.assign(jl, {
|
|
1674
2433
|
props: {
|
|
1675
2434
|
/**
|
|
1676
2435
|
* Array de Items del select
|
|
@@ -1689,69 +2448,69 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1689
2448
|
select: Object
|
|
1690
2449
|
},
|
|
1691
2450
|
emits: ["selectChanged"],
|
|
1692
|
-
setup(e, { emit:
|
|
1693
|
-
const
|
|
1694
|
-
|
|
2451
|
+
setup(e, { emit: t }) {
|
|
2452
|
+
const o = e, r = w(""), n = w(o.select), l = y(() => r.value === "" ? o.items : o.items.filter((i) => i.name.toLowerCase().includes(r.value.toLowerCase()))), a = () => {
|
|
2453
|
+
t("selectChanged", n.value);
|
|
1695
2454
|
};
|
|
1696
|
-
return (
|
|
1697
|
-
modelValue:
|
|
2455
|
+
return (i, s) => (g(), le(_(lo), {
|
|
2456
|
+
modelValue: n.value,
|
|
1698
2457
|
"onUpdate:modelValue": [
|
|
1699
|
-
|
|
1700
|
-
|
|
2458
|
+
s[1] || (s[1] = (u) => n.value = u),
|
|
2459
|
+
s[3] || (s[3] = (u) => a())
|
|
1701
2460
|
],
|
|
1702
2461
|
as: "div",
|
|
1703
|
-
onClick:
|
|
2462
|
+
onClick: s[2] || (s[2] = (u) => a())
|
|
1704
2463
|
}, {
|
|
1705
|
-
default:
|
|
1706
|
-
|
|
1707
|
-
default:
|
|
1708
|
-
|
|
2464
|
+
default: Y(() => [
|
|
2465
|
+
S(_(ro), { class: "block text-sm font-medium text-gray-700" }, {
|
|
2466
|
+
default: Y(() => [
|
|
2467
|
+
ye(O(e.label), 1)
|
|
1709
2468
|
]),
|
|
1710
2469
|
_: 1
|
|
1711
2470
|
}),
|
|
1712
|
-
|
|
1713
|
-
|
|
2471
|
+
c("div", Rl, [
|
|
2472
|
+
S(_(io), {
|
|
1714
2473
|
"display-value": (u) => u == null ? void 0 : u.name,
|
|
1715
2474
|
class: "w-full rounded-md border border-gray-300 bg-white py-2 pl-3 pr-10 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm",
|
|
1716
|
-
onChange:
|
|
2475
|
+
onChange: s[0] || (s[0] = (u) => r.value = u.target.value)
|
|
1717
2476
|
}, null, 8, ["display-value"]),
|
|
1718
|
-
|
|
1719
|
-
default:
|
|
1720
|
-
|
|
2477
|
+
S(_(ao), { class: "absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none" }, {
|
|
2478
|
+
default: Y(() => [
|
|
2479
|
+
S(_(al), {
|
|
1721
2480
|
"aria-hidden": "true",
|
|
1722
2481
|
class: "h-5 w-5 text-gray-400"
|
|
1723
2482
|
})
|
|
1724
2483
|
]),
|
|
1725
2484
|
_: 1
|
|
1726
2485
|
}),
|
|
1727
|
-
|
|
2486
|
+
l.value.length > 0 ? (g(), le(_(so), {
|
|
1728
2487
|
key: 0,
|
|
1729
2488
|
class: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm"
|
|
1730
2489
|
}, {
|
|
1731
|
-
default:
|
|
1732
|
-
(
|
|
2490
|
+
default: Y(() => [
|
|
2491
|
+
(g(!0), x(Z, null, ue(l.value, (u) => (g(), le(_(uo), {
|
|
1733
2492
|
key: u.id,
|
|
1734
2493
|
value: u,
|
|
1735
2494
|
as: "template"
|
|
1736
2495
|
}, {
|
|
1737
|
-
default:
|
|
1738
|
-
|
|
1739
|
-
class:
|
|
2496
|
+
default: Y(({ active: d, selected: m }) => [
|
|
2497
|
+
c("li", {
|
|
2498
|
+
class: R([
|
|
1740
2499
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
1741
|
-
|
|
2500
|
+
d ? "bg-indigo-600 text-white" : "text-gray-900"
|
|
1742
2501
|
])
|
|
1743
2502
|
}, [
|
|
1744
|
-
|
|
1745
|
-
class:
|
|
1746
|
-
},
|
|
1747
|
-
|
|
2503
|
+
c("span", {
|
|
2504
|
+
class: R(["block truncate", m && "font-semibold"])
|
|
2505
|
+
}, O(u.name), 3),
|
|
2506
|
+
m ? (g(), x("span", {
|
|
1748
2507
|
key: 0,
|
|
1749
|
-
class:
|
|
2508
|
+
class: R([
|
|
1750
2509
|
"absolute inset-y-0 right-0 flex items-center pr-4",
|
|
1751
|
-
|
|
2510
|
+
d ? "text-white" : "text-indigo-600"
|
|
1752
2511
|
])
|
|
1753
2512
|
}, [
|
|
1754
|
-
|
|
2513
|
+
S(_(gt), {
|
|
1755
2514
|
"aria-hidden": "true",
|
|
1756
2515
|
class: "h-5 w-5"
|
|
1757
2516
|
})
|
|
@@ -1768,9 +2527,9 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1768
2527
|
_: 1
|
|
1769
2528
|
}, 8, ["modelValue"]));
|
|
1770
2529
|
}
|
|
1771
|
-
}),
|
|
2530
|
+
}), Al = {
|
|
1772
2531
|
name: "uiTag"
|
|
1773
|
-
},
|
|
2532
|
+
}, mn = /* @__PURE__ */ Object.assign(Al, {
|
|
1774
2533
|
props: {
|
|
1775
2534
|
/**
|
|
1776
2535
|
* Color del tag
|
|
@@ -1781,8 +2540,8 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1781
2540
|
}
|
|
1782
2541
|
},
|
|
1783
2542
|
setup(e) {
|
|
1784
|
-
return (
|
|
1785
|
-
class:
|
|
2543
|
+
return (t, o) => (g(), x("span", {
|
|
2544
|
+
class: R([{
|
|
1786
2545
|
"bg-indigo-100 text-indigo-800 border border-indigo-200": e.color === "primary",
|
|
1787
2546
|
"bg-red-100 text-red-800 border border-red-200": e.color === "danger",
|
|
1788
2547
|
"bg-yellow-100 text-yellow-800 border border-yellow-200": e.color === "warning",
|
|
@@ -1791,15 +2550,15 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1791
2550
|
"text-black border border-gray-200": e.color === "white"
|
|
1792
2551
|
}, "inline-flex items-center px-3 py-2 rounded text-xs font-medium leading-none"])
|
|
1793
2552
|
}, [
|
|
1794
|
-
|
|
2553
|
+
Ae(t.$slots, "default")
|
|
1795
2554
|
], 2));
|
|
1796
2555
|
}
|
|
1797
|
-
}),
|
|
2556
|
+
}), Fl = {
|
|
1798
2557
|
key: 0,
|
|
1799
2558
|
class: "block text-sm font-medium text-gray-700"
|
|
1800
|
-
},
|
|
2559
|
+
}, Bl = ["disabled", "placeholder"], Nl = {
|
|
1801
2560
|
name: "uiTextArea"
|
|
1802
|
-
},
|
|
2561
|
+
}, Hl = /* @__PURE__ */ Object.assign(Nl, {
|
|
1803
2562
|
props: {
|
|
1804
2563
|
/**
|
|
1805
2564
|
* Nombre del Campo de texto
|
|
@@ -1833,21 +2592,21 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1833
2592
|
error: String
|
|
1834
2593
|
},
|
|
1835
2594
|
emits: ["inputChanged"],
|
|
1836
|
-
setup(e, { emit:
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1839
|
-
},
|
|
1840
|
-
return (
|
|
1841
|
-
e.label ? (
|
|
1842
|
-
|
|
1843
|
-
class:
|
|
2595
|
+
setup(e, { emit: t }) {
|
|
2596
|
+
const o = e, r = (l) => {
|
|
2597
|
+
t("inputChanged", { value: l.target.value, name: l.target.value });
|
|
2598
|
+
}, n = w(o.value);
|
|
2599
|
+
return (l, a) => (g(), x("div", null, [
|
|
2600
|
+
e.label ? (g(), x("label", Fl, O(e.label), 1)) : W("", !0),
|
|
2601
|
+
c("div", {
|
|
2602
|
+
class: R({ "mt-1": e.label })
|
|
1844
2603
|
}, [
|
|
1845
|
-
|
|
2604
|
+
G(c("textarea", {
|
|
1846
2605
|
disabled: e.disabled,
|
|
1847
2606
|
rows: "4",
|
|
1848
|
-
"onUpdate:modelValue":
|
|
2607
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => n.value = i),
|
|
1849
2608
|
placeholder: e.placeholder,
|
|
1850
|
-
class:
|
|
2609
|
+
class: R(["shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md", {
|
|
1851
2610
|
"border-gray-300": e.color !== "danger" || e.color !== "warning" || e.color !== "success",
|
|
1852
2611
|
"border-red-300": e.color === "danger",
|
|
1853
2612
|
"border-yellow-400": e.color === "warning",
|
|
@@ -1858,36 +2617,36 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1858
2617
|
"text-yellow-400": e.color === "warning",
|
|
1859
2618
|
"text-green-400": e.color === "success"
|
|
1860
2619
|
}]),
|
|
1861
|
-
onChange:
|
|
1862
|
-
}, null, 42,
|
|
1863
|
-
[
|
|
2620
|
+
onChange: r
|
|
2621
|
+
}, null, 42, Bl), [
|
|
2622
|
+
[_n, n.value]
|
|
1864
2623
|
])
|
|
1865
2624
|
], 2),
|
|
1866
|
-
|
|
1867
|
-
class:
|
|
2625
|
+
G(c("p", {
|
|
2626
|
+
class: R([{
|
|
1868
2627
|
"text-gray-300": e.color !== "danger" || e.color !== "warning" || e.color !== "success",
|
|
1869
2628
|
"text-red-300": e.color === "danger",
|
|
1870
2629
|
"text-yellow-400": e.color === "warning",
|
|
1871
2630
|
"text-green-400": e.color === "success"
|
|
1872
2631
|
}, "mt-2 text-xs flex flex-row items-center"])
|
|
1873
2632
|
}, [
|
|
1874
|
-
|
|
1875
|
-
icon:
|
|
2633
|
+
S(ve, {
|
|
2634
|
+
icon: _(Ye),
|
|
1876
2635
|
color: "red",
|
|
1877
2636
|
class: "mr-2"
|
|
1878
2637
|
}, null, 8, ["icon"]),
|
|
1879
|
-
|
|
2638
|
+
ye(O(e.error), 1)
|
|
1880
2639
|
], 2), [
|
|
1881
|
-
[
|
|
2640
|
+
[re, e.error]
|
|
1882
2641
|
])
|
|
1883
2642
|
]));
|
|
1884
2643
|
}
|
|
1885
|
-
}),
|
|
2644
|
+
}), Vl = { class: "text-sm font-medium text-gray-900" }, Yl = {
|
|
1886
2645
|
key: 0,
|
|
1887
2646
|
class: "text-sm text-gray-500 ml-2"
|
|
1888
|
-
},
|
|
2647
|
+
}, Ul = {
|
|
1889
2648
|
name: "uiToggle"
|
|
1890
|
-
},
|
|
2649
|
+
}, ql = /* @__PURE__ */ Object.assign(Ul, {
|
|
1891
2650
|
props: {
|
|
1892
2651
|
/**
|
|
1893
2652
|
* Item del toggle
|
|
@@ -1906,30 +2665,33 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1906
2665
|
/**
|
|
1907
2666
|
* Toggle disabled
|
|
1908
2667
|
*/
|
|
1909
|
-
disabled:
|
|
2668
|
+
disabled: {
|
|
2669
|
+
type: Boolean,
|
|
2670
|
+
default: !1
|
|
2671
|
+
}
|
|
1910
2672
|
},
|
|
1911
2673
|
setup(e) {
|
|
1912
|
-
const
|
|
1913
|
-
return (
|
|
2674
|
+
const o = w(e.checked);
|
|
2675
|
+
return (r, n) => (g(), le(_(Wo), {
|
|
1914
2676
|
as: "div",
|
|
1915
2677
|
class: "flex items-center relative"
|
|
1916
2678
|
}, {
|
|
1917
|
-
default:
|
|
1918
|
-
|
|
2679
|
+
default: Y(() => [
|
|
2680
|
+
S(_(Ko), {
|
|
1919
2681
|
disabled: e.disabled,
|
|
1920
|
-
onClick:
|
|
1921
|
-
modelValue:
|
|
1922
|
-
"onUpdate:modelValue":
|
|
1923
|
-
class:
|
|
1924
|
-
|
|
2682
|
+
onClick: n[0] || (n[0] = (l) => r.$emit("toggleChanged", { item: e.item, active: !o.value })),
|
|
2683
|
+
modelValue: o.value,
|
|
2684
|
+
"onUpdate:modelValue": n[1] || (n[1] = (l) => o.value = l),
|
|
2685
|
+
class: R([
|
|
2686
|
+
o.value ? "bg-indigo-600" : "bg-gray-200",
|
|
1925
2687
|
"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
|
|
1926
2688
|
])
|
|
1927
2689
|
}, {
|
|
1928
|
-
default:
|
|
1929
|
-
|
|
2690
|
+
default: Y(() => [
|
|
2691
|
+
c("span", {
|
|
1930
2692
|
"aria-hidden": "true",
|
|
1931
|
-
class:
|
|
1932
|
-
|
|
2693
|
+
class: R([
|
|
2694
|
+
o.value ? "translate-x-5" : "translate-x-0",
|
|
1933
2695
|
e.disabled ? "bg-gray-300" : "",
|
|
1934
2696
|
"pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
|
|
1935
2697
|
])
|
|
@@ -1937,43 +2699,1135 @@ const yn = { class: "py-1" }, wn = ["onClick"], Sn = {
|
|
|
1937
2699
|
]),
|
|
1938
2700
|
_: 1
|
|
1939
2701
|
}, 8, ["disabled", "modelValue", "class"]),
|
|
1940
|
-
|
|
2702
|
+
S(_(Jo), {
|
|
1941
2703
|
as: "span",
|
|
1942
2704
|
class: "ml-3"
|
|
1943
2705
|
}, {
|
|
1944
|
-
default:
|
|
1945
|
-
|
|
1946
|
-
e.item.subtitle ? (
|
|
2706
|
+
default: Y(() => [
|
|
2707
|
+
c("span", Vl, O(e.item.title), 1),
|
|
2708
|
+
e.item.subtitle ? (g(), x("span", Yl, O(e.item.subtitle), 1)) : W("", !0)
|
|
1947
2709
|
]),
|
|
1948
2710
|
_: 1
|
|
1949
2711
|
}),
|
|
1950
|
-
e.item.action ? (
|
|
2712
|
+
e.item.action ? (g(), x("span", {
|
|
1951
2713
|
key: 0,
|
|
1952
2714
|
class: "cursor-pointer text-indigo-600 hover:text-indigo-400 uppercase text-xs absolute right-0 bottom-0.5",
|
|
1953
|
-
onClick:
|
|
1954
|
-
},
|
|
2715
|
+
onClick: n[2] || (n[2] = (l) => r.$emit("actionClicked", e.item))
|
|
2716
|
+
}, O(e.item.action), 1)) : W("", !0)
|
|
1955
2717
|
]),
|
|
1956
2718
|
_: 1
|
|
1957
2719
|
}));
|
|
1958
2720
|
}
|
|
1959
|
-
}),
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
2721
|
+
}), zl = { class: "flex flex-col" }, Wl = { class: "flex" }, Kl = { class: "flex-shrink-0" }, Jl = { class: "ml-3" }, Gl = { class: "mt-4" }, Xl = { class: "-mx-2 -my-1.5 flex" }, Ql = ["onClick"], Zl = {
|
|
2722
|
+
name: "uiAlert"
|
|
2723
|
+
}, er = /* @__PURE__ */ Object.assign(Zl, {
|
|
2724
|
+
props: {
|
|
2725
|
+
/**
|
|
2726
|
+
* Acciones que se pueden hacer en la notificación
|
|
2727
|
+
*/
|
|
2728
|
+
actions: {
|
|
2729
|
+
type: Array
|
|
2730
|
+
},
|
|
2731
|
+
/**
|
|
2732
|
+
* Título de notificación
|
|
2733
|
+
*/
|
|
2734
|
+
title: {
|
|
2735
|
+
type: String
|
|
2736
|
+
},
|
|
2737
|
+
/**
|
|
2738
|
+
* Tipo de la notificación
|
|
2739
|
+
*/
|
|
2740
|
+
type: {
|
|
2741
|
+
type: String,
|
|
2742
|
+
default: "info"
|
|
2743
|
+
}
|
|
2744
|
+
},
|
|
2745
|
+
setup(e) {
|
|
2746
|
+
return (t, o) => (g(), x("div", zl, [
|
|
2747
|
+
c("div", {
|
|
2748
|
+
class: R([{
|
|
2749
|
+
"bg-indigo-50 border-indigo-400": e.type === "info",
|
|
2750
|
+
"bg-red-50 border-red-400": e.type === "danger",
|
|
2751
|
+
"bg-yellow-50 border-yellow-400": e.type === "warning",
|
|
2752
|
+
"bg-green-50 border-green-400": e.type === "success"
|
|
2753
|
+
}, "p-4 border-l-4"])
|
|
2754
|
+
}, [
|
|
2755
|
+
c("div", Wl, [
|
|
2756
|
+
c("div", Kl, [
|
|
2757
|
+
e.type === "info" ? (g(), le(_(vn), {
|
|
2758
|
+
key: 0,
|
|
2759
|
+
class: "h-8 w-8 text-indigo-400",
|
|
2760
|
+
"aria-hidden": "true"
|
|
2761
|
+
})) : W("", !0),
|
|
2762
|
+
e.type === "danger" ? (g(), le(_(Ye), {
|
|
2763
|
+
key: 1,
|
|
2764
|
+
class: "h-8 w-8 text-red-400",
|
|
2765
|
+
"aria-hidden": "true"
|
|
2766
|
+
})) : W("", !0),
|
|
2767
|
+
e.type === "warning" ? (g(), le(_(Ge), {
|
|
2768
|
+
key: 2,
|
|
2769
|
+
class: "h-8 w-8 text-yellow-400",
|
|
2770
|
+
"aria-hidden": "true"
|
|
2771
|
+
})) : W("", !0),
|
|
2772
|
+
e.type === "success" ? (g(), le(_(cn), {
|
|
2773
|
+
key: 3,
|
|
2774
|
+
class: "h-8 w-8 text-green-400",
|
|
2775
|
+
"aria-hidden": "true"
|
|
2776
|
+
})) : W("", !0)
|
|
2777
|
+
]),
|
|
2778
|
+
c("div", Jl, [
|
|
2779
|
+
c("h3", {
|
|
2780
|
+
class: R([{
|
|
2781
|
+
"text-red-800": e.type === "danger",
|
|
2782
|
+
"text-yellow-800": e.type === "warning",
|
|
2783
|
+
"text-green-800": e.type === "success"
|
|
2784
|
+
}, "text-sm font-medium"])
|
|
2785
|
+
}, O(e.title), 3),
|
|
2786
|
+
c("div", {
|
|
2787
|
+
class: R([{
|
|
2788
|
+
"text-red-700": e.type === "danger",
|
|
2789
|
+
"text-yellow-700": e.type === "warning",
|
|
2790
|
+
"text-green-700": e.type === "success"
|
|
2791
|
+
}, "mt-2 text-sm"])
|
|
2792
|
+
}, [
|
|
2793
|
+
Ae(t.$slots, "default")
|
|
2794
|
+
], 2),
|
|
2795
|
+
c("div", Gl, [
|
|
2796
|
+
c("div", Xl, [
|
|
2797
|
+
(g(!0), x(Z, null, ue(e.actions, (r, n) => (g(), x("button", {
|
|
2798
|
+
onClick: (l) => t.$emit("alertEvent", r.event),
|
|
2799
|
+
type: "button",
|
|
2800
|
+
key: n,
|
|
2801
|
+
class: R([
|
|
2802
|
+
{
|
|
2803
|
+
"bg-green-50 text-green-800 hover:bg-green-100 focus:ring-green-600 focus:ring-offset-green-50": e.type === "success",
|
|
2804
|
+
"bg-indigo-50 text-indigo-800 hover:bg-indigo-100 focus:ring-indigo-600 focus:ring-offset-indigo-50": e.type === "info",
|
|
2805
|
+
"bg-red-50 text-red-800 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50": e.type === "danger",
|
|
2806
|
+
"bg-yellow-50 text-yellow-800 hover:bg-yellow-100 focus:ring-yellow-600 focus:ring-offset-yellow-50": e.type === "warning"
|
|
2807
|
+
},
|
|
2808
|
+
"px-2 py-1.5 text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2"
|
|
2809
|
+
])
|
|
2810
|
+
}, O(r.name), 11, Ql))), 128))
|
|
2811
|
+
])
|
|
2812
|
+
])
|
|
2813
|
+
])
|
|
2814
|
+
])
|
|
2815
|
+
], 2)
|
|
2816
|
+
]));
|
|
2817
|
+
}
|
|
2818
|
+
}), tr = {
|
|
2819
|
+
class: "flex",
|
|
2820
|
+
"aria-label": "Breadcrumb"
|
|
2821
|
+
}, nr = {
|
|
2822
|
+
role: "list",
|
|
2823
|
+
class: "flex items-center space-x-4 text-xs"
|
|
2824
|
+
}, or = { key: 0 }, lr = ["onClick"], rr = {
|
|
2825
|
+
key: 1,
|
|
2826
|
+
class: "flex items-center"
|
|
2827
|
+
}, ar = ["onClick", "aria-current"], ir = {
|
|
2828
|
+
name: "uiBreadcrumbs"
|
|
2829
|
+
}, sr = /* @__PURE__ */ Object.assign(ir, {
|
|
2830
|
+
props: {
|
|
2831
|
+
/**
|
|
2832
|
+
* Array de páginas en los Breadcrumbs
|
|
2833
|
+
*/
|
|
2834
|
+
pages: Array,
|
|
2835
|
+
required: !0
|
|
2836
|
+
},
|
|
2837
|
+
setup(e) {
|
|
2838
|
+
return (t, o) => (g(), x("nav", tr, [
|
|
2839
|
+
c("ol", nr, [
|
|
2840
|
+
(g(!0), x(Z, null, ue(e.pages, (r, n) => (g(), x("li", { key: n }, [
|
|
2841
|
+
n === 0 ? (g(), x("div", or, [
|
|
2842
|
+
c("p", {
|
|
2843
|
+
onClick: (l) => t.$emit("breadCrumbClicked", r.routeName),
|
|
2844
|
+
class: "flex flex-row items-center justify-center text-indigo-600 hover:text-indigo-800 cursor-pointer"
|
|
2845
|
+
}, [
|
|
2846
|
+
S(_(ul), {
|
|
2847
|
+
class: "flex-shrink-0 h-3 w-3 text-gray-400 mr-4",
|
|
2848
|
+
"aria-hidden": "true"
|
|
2849
|
+
}),
|
|
2850
|
+
c("span", null, O(r.name), 1)
|
|
2851
|
+
], 8, lr)
|
|
2852
|
+
])) : (g(), x("div", rr, [
|
|
2853
|
+
S(_(fn), {
|
|
2854
|
+
class: "flex-shrink-0 h-3 w-3 text-gray-400",
|
|
2855
|
+
"aria-hidden": "true"
|
|
2856
|
+
}),
|
|
2857
|
+
c("span", {
|
|
2858
|
+
onClick: (l) => t.$emit("breadCrumbClicked", r.routeName),
|
|
2859
|
+
class: R(["cursor-pointer ml-4 text-xs text-gray-400 hover:text-gray-500", { "text-indigo-600 hover:text-indigo-800": !r.current }]),
|
|
2860
|
+
"aria-current": r.current ? "page" : ""
|
|
2861
|
+
}, O(r.name), 11, ar)
|
|
2862
|
+
]))
|
|
2863
|
+
]))), 128))
|
|
2864
|
+
])
|
|
2865
|
+
]));
|
|
2866
|
+
}
|
|
2867
|
+
}), ur = { class: "flex items-center flex-col sm:flex-row justify-center sm:justify-start" }, dr = ["src"], cr = { class: "font-bold text-center sm:text-left" }, fr = { class: "mt-1 text-xs text-center sm:text-left" }, vr = {
|
|
2868
|
+
key: 0,
|
|
2869
|
+
class: "flex flex-wrap mt-4 justify-center sm:justify-start"
|
|
2870
|
+
}, pr = {
|
|
2871
|
+
name: "uiCard"
|
|
2872
|
+
}, mr = /* @__PURE__ */ Object.assign(pr, {
|
|
2873
|
+
props: {
|
|
2874
|
+
id: {
|
|
2875
|
+
type: String,
|
|
2876
|
+
required: !0
|
|
2877
|
+
},
|
|
2878
|
+
name: {
|
|
2879
|
+
type: String,
|
|
2880
|
+
required: !0
|
|
2881
|
+
},
|
|
2882
|
+
type: String,
|
|
2883
|
+
tags: Array,
|
|
2884
|
+
logo: String
|
|
2885
|
+
},
|
|
2886
|
+
setup(e) {
|
|
2887
|
+
return (t, o) => {
|
|
2888
|
+
var r;
|
|
2889
|
+
return g(), x("div", {
|
|
2890
|
+
class: "rounded-lg bg-white shadow p-6 cursor-pointer",
|
|
2891
|
+
onClick: o[0] || (o[0] = (n) => t.$emit("cardSelected", { id: e.id, name: e.name, type: e.type, tags: e.tags }))
|
|
2892
|
+
}, [
|
|
2893
|
+
c("div", ur, [
|
|
2894
|
+
c("img", {
|
|
2895
|
+
class: "w-16 h-16 rounded-full mb-4 sm:mb-0 sm:mr-4",
|
|
2896
|
+
src: e.logo
|
|
2897
|
+
}, null, 8, dr),
|
|
2898
|
+
c("div", null, [
|
|
2899
|
+
c("h4", cr, O(e.name), 1),
|
|
2900
|
+
c("p", fr, O(e.type), 1)
|
|
2901
|
+
])
|
|
2902
|
+
]),
|
|
2903
|
+
((r = e.tags) == null ? void 0 : r.length) > 0 ? (g(), x("div", vr, [
|
|
2904
|
+
(g(!0), x(Z, null, ue(e.tags, (n) => (g(), le(mn, {
|
|
2905
|
+
class: "my-1 mr-1",
|
|
2906
|
+
key: n.name,
|
|
2907
|
+
color: n.color
|
|
2908
|
+
}, {
|
|
2909
|
+
default: Y(() => [
|
|
2910
|
+
ye(O(n.name), 1)
|
|
2911
|
+
]),
|
|
2912
|
+
_: 2
|
|
2913
|
+
}, 1032, ["color"]))), 128))
|
|
2914
|
+
])) : W("", !0)
|
|
2915
|
+
]);
|
|
2916
|
+
};
|
|
2917
|
+
}
|
|
2918
|
+
}), gr = {
|
|
2919
|
+
name: "uiFilter"
|
|
2920
|
+
}, hr = /* @__PURE__ */ Object.assign(gr, {
|
|
2921
|
+
props: {
|
|
2922
|
+
position: {
|
|
2923
|
+
type: String,
|
|
2924
|
+
default: "left"
|
|
2925
|
+
},
|
|
2926
|
+
items: {
|
|
2927
|
+
type: Array,
|
|
2928
|
+
required: !0
|
|
2929
|
+
},
|
|
2930
|
+
label: {
|
|
2931
|
+
type: String,
|
|
2932
|
+
required: !0
|
|
2933
|
+
}
|
|
2934
|
+
},
|
|
2935
|
+
emits: ["filterSelected"],
|
|
2936
|
+
setup(e, { emit: t }) {
|
|
2937
|
+
const o = e, r = (l) => {
|
|
2938
|
+
n.value.forEach((a) => {
|
|
2939
|
+
a.value !== l ? a.active = !1 : a.active = !0;
|
|
2940
|
+
}), t("filterSelected", l);
|
|
2941
|
+
}, n = w(o.items);
|
|
2942
|
+
return (l, a) => (g(), le(pn, {
|
|
2943
|
+
onOptionSelected: a[0] || (a[0] = (i) => r(i)),
|
|
2944
|
+
position: e.position,
|
|
2945
|
+
items: n.value,
|
|
2946
|
+
label: e.label
|
|
2947
|
+
}, null, 8, ["position", "items", "label"]));
|
|
2948
|
+
}
|
|
2949
|
+
}), br = /* @__PURE__ */ c("div", { class: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" }, null, -1), yr = { class: "fixed inset-0 z-10 overflow-y-auto" }, xr = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, wr = { class: "absolute top-0 right-0 hidden pt-4 pr-4 sm:block" }, Sr = /* @__PURE__ */ c("span", { class: "sr-only" }, "X", -1), kr = { class: "sm:flex sm:items-start" }, $r = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left sm:mr-4" }, _r = { class: "mt-4 text-gray-500 text-sm" }, Cr = {
|
|
2950
|
+
key: 0,
|
|
2951
|
+
class: "mt-8"
|
|
2952
|
+
}, Or = ["onClick"], Dr = {
|
|
2953
|
+
name: "uiModal"
|
|
2954
|
+
}, Mr = /* @__PURE__ */ Object.assign(Dr, {
|
|
2955
|
+
props: {
|
|
2956
|
+
title: String,
|
|
2957
|
+
actions: Object,
|
|
2958
|
+
modalName: String,
|
|
2959
|
+
open: {
|
|
2960
|
+
type: Boolean,
|
|
2961
|
+
default: !1
|
|
2962
|
+
},
|
|
2963
|
+
type: {
|
|
2964
|
+
type: String,
|
|
2965
|
+
default: "default"
|
|
2966
|
+
}
|
|
2967
|
+
},
|
|
2968
|
+
emits: ["modalAction"],
|
|
2969
|
+
setup(e, { emit: t }) {
|
|
2970
|
+
const o = e, r = (n) => {
|
|
2971
|
+
t("modalAction", { modal: o.modalName, action: n });
|
|
2972
|
+
};
|
|
2973
|
+
return (n, l) => (g(), le(_(dn), {
|
|
2974
|
+
as: "template",
|
|
2975
|
+
show: e.open
|
|
2976
|
+
}, {
|
|
2977
|
+
default: Y(() => [
|
|
2978
|
+
S(_(Lo), {
|
|
2979
|
+
as: "div",
|
|
2980
|
+
class: "relative z-10",
|
|
2981
|
+
onClose: l[1] || (l[1] = (a) => r("close"))
|
|
2982
|
+
}, {
|
|
2983
|
+
default: Y(() => [
|
|
2984
|
+
S(_(at), {
|
|
2985
|
+
as: "template",
|
|
2986
|
+
enter: "ease-out duration-300",
|
|
2987
|
+
"enter-from": "opacity-0",
|
|
2988
|
+
"enter-to": "opacity-100",
|
|
2989
|
+
leave: "ease-in duration-200",
|
|
2990
|
+
"leave-from": "opacity-100",
|
|
2991
|
+
"leave-to": "opacity-0"
|
|
2992
|
+
}, {
|
|
2993
|
+
default: Y(() => [
|
|
2994
|
+
br
|
|
2995
|
+
]),
|
|
2996
|
+
_: 1
|
|
2997
|
+
}),
|
|
2998
|
+
c("div", yr, [
|
|
2999
|
+
c("div", xr, [
|
|
3000
|
+
S(_(at), {
|
|
3001
|
+
as: "template",
|
|
3002
|
+
enter: "ease-out duration-300",
|
|
3003
|
+
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
3004
|
+
"enter-to": "opacity-100 translate-y-0 sm:scale-100",
|
|
3005
|
+
leave: "ease-in duration-200",
|
|
3006
|
+
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
3007
|
+
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
3008
|
+
}, {
|
|
3009
|
+
default: Y(() => [
|
|
3010
|
+
S(_(Ro), { class: "relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 w-9/12 sm:w-full sm:max-w-lg sm:p-6" }, {
|
|
3011
|
+
default: Y(() => [
|
|
3012
|
+
c("div", wr, [
|
|
3013
|
+
c("button", {
|
|
3014
|
+
type: "button",
|
|
3015
|
+
class: "rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none",
|
|
3016
|
+
onClick: l[0] || (l[0] = (a) => r("close"))
|
|
3017
|
+
}, [
|
|
3018
|
+
Sr,
|
|
3019
|
+
S(ve, {
|
|
3020
|
+
icon: _(it),
|
|
3021
|
+
"aria-hidden": "true"
|
|
3022
|
+
}, null, 8, ["icon"])
|
|
3023
|
+
])
|
|
3024
|
+
]),
|
|
3025
|
+
c("div", kr, [
|
|
3026
|
+
c("div", {
|
|
3027
|
+
class: R(["mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10", {
|
|
3028
|
+
"bg-red-100": e.type === "danger",
|
|
3029
|
+
"bg-green-100": e.type === "success",
|
|
3030
|
+
"bg-indigo-100": e.type === "default",
|
|
3031
|
+
"bg-yellow-100": e.type === "warning"
|
|
3032
|
+
}])
|
|
3033
|
+
}, [
|
|
3034
|
+
G(S(_(it), {
|
|
3035
|
+
class: "h-6 w-6 text-red-600",
|
|
3036
|
+
"aria-hidden": "true"
|
|
3037
|
+
}, null, 512), [
|
|
3038
|
+
[re, e.type === "danger"]
|
|
3039
|
+
]),
|
|
3040
|
+
G(S(_(gt), {
|
|
3041
|
+
class: "h-6 w-6 text-green-600",
|
|
3042
|
+
"aria-hidden": "true"
|
|
3043
|
+
}, null, 512), [
|
|
3044
|
+
[re, e.type === "success"]
|
|
3045
|
+
]),
|
|
3046
|
+
G(S(_(Ge), {
|
|
3047
|
+
class: "h-6 w-6 text-yellow-600",
|
|
3048
|
+
"aria-hidden": "true"
|
|
3049
|
+
}, null, 512), [
|
|
3050
|
+
[re, e.type === "warning"]
|
|
3051
|
+
]),
|
|
3052
|
+
G(S(_(sl), {
|
|
3053
|
+
class: "h-6 w-6 text-indigo-600",
|
|
3054
|
+
"aria-hidden": "true"
|
|
3055
|
+
}, null, 512), [
|
|
3056
|
+
[re, e.type === "default"]
|
|
3057
|
+
])
|
|
3058
|
+
], 2),
|
|
3059
|
+
c("div", $r, [
|
|
3060
|
+
S(_(jo), {
|
|
3061
|
+
as: "h3",
|
|
3062
|
+
class: "text-lg font-medium leading-6 text-gray-900"
|
|
3063
|
+
}, {
|
|
3064
|
+
default: Y(() => [
|
|
3065
|
+
ye(O(e.title), 1)
|
|
3066
|
+
]),
|
|
3067
|
+
_: 1
|
|
3068
|
+
}),
|
|
3069
|
+
c("div", _r, [
|
|
3070
|
+
Ae(n.$slots, "default")
|
|
3071
|
+
]),
|
|
3072
|
+
e.actions ? (g(), x("div", Cr, [
|
|
3073
|
+
(g(!0), x(Z, null, ue(e.actions, (a, i) => (g(), x("button", {
|
|
3074
|
+
key: i,
|
|
3075
|
+
type: "button",
|
|
3076
|
+
class: "inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 mb-2 sm:mb-0 mr-2 sm:w-auto sm:text-sm",
|
|
3077
|
+
onClick: (s) => r(a.value)
|
|
3078
|
+
}, O(a.name), 9, Or))), 128))
|
|
3079
|
+
])) : W("", !0)
|
|
3080
|
+
])
|
|
3081
|
+
])
|
|
3082
|
+
]),
|
|
3083
|
+
_: 3
|
|
3084
|
+
})
|
|
3085
|
+
]),
|
|
3086
|
+
_: 3
|
|
3087
|
+
})
|
|
3088
|
+
])
|
|
3089
|
+
])
|
|
3090
|
+
]),
|
|
3091
|
+
_: 3
|
|
3092
|
+
})
|
|
3093
|
+
]),
|
|
3094
|
+
_: 3
|
|
3095
|
+
}, 8, ["show"]));
|
|
3096
|
+
}
|
|
3097
|
+
}), Tr = { class: "w-full flex flex-col items-center space-y-4 sm:items-end" }, Er = {
|
|
3098
|
+
key: 0,
|
|
3099
|
+
class: "max-w-sm w-full bg-white shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden"
|
|
3100
|
+
}, Pr = { class: "p-4" }, Lr = { class: "flex items-start" }, Rr = { class: "flex-shrink-0 mt-0.5" }, jr = { class: "ml-3 w-0 flex-1 pt-0.5" }, Ir = { class: "font-medium text-gray-900" }, Ar = { class: "mt-1 text-sm text-gray-500" }, Fr = { class: "ml-4 flex-shrink-0 flex" }, Br = /* @__PURE__ */ c("span", { class: "sr-only" }, "Close", -1), Nr = {
|
|
3101
|
+
name: "uiNotification"
|
|
3102
|
+
}, Hr = /* @__PURE__ */ Object.assign(Nr, {
|
|
3103
|
+
props: {
|
|
3104
|
+
show: Boolean,
|
|
3105
|
+
type: {
|
|
3106
|
+
type: String,
|
|
3107
|
+
default: "info"
|
|
3108
|
+
},
|
|
3109
|
+
title: String,
|
|
3110
|
+
message: String,
|
|
3111
|
+
fixed: {
|
|
3112
|
+
type: Boolean,
|
|
3113
|
+
default: !0
|
|
3114
|
+
}
|
|
3115
|
+
},
|
|
3116
|
+
setup(e) {
|
|
3117
|
+
const t = e, o = y(() => t.show);
|
|
3118
|
+
return (r, n) => (g(), x("div", {
|
|
3119
|
+
"aria-live": "assertive",
|
|
3120
|
+
class: R([{ fixed: e.fixed }, "inset-0 flex items-end px-4 py-6 pointer-events-none sm:p-6 sm:items-start"])
|
|
3121
|
+
}, [
|
|
3122
|
+
c("div", Tr, [
|
|
3123
|
+
S(Ot, {
|
|
3124
|
+
"enter-active-class": "transform ease-out duration-300 transition",
|
|
3125
|
+
"enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
|
|
3126
|
+
"enter-to-class": "translate-y-0 opacity-100 sm:translate-x-0",
|
|
3127
|
+
"leave-active-class": "transition ease-in duration-100",
|
|
3128
|
+
"leave-from-class": "opacity-100",
|
|
3129
|
+
"leave-to-class": "opacity-0"
|
|
3130
|
+
}, {
|
|
3131
|
+
default: Y(() => [
|
|
3132
|
+
o.value ? (g(), x("div", Er, [
|
|
3133
|
+
c("div", Pr, [
|
|
3134
|
+
c("div", Lr, [
|
|
3135
|
+
c("div", Rr, [
|
|
3136
|
+
G(S(_(cn), {
|
|
3137
|
+
"aria-hidden": "true",
|
|
3138
|
+
class: "h-6 w-6 text-green-400"
|
|
3139
|
+
}, null, 512), [
|
|
3140
|
+
[re, e.type === "success"]
|
|
3141
|
+
]),
|
|
3142
|
+
G(S(_(Ye), {
|
|
3143
|
+
"aria-hidden": "true",
|
|
3144
|
+
class: "h-6 w-6 text-red-400"
|
|
3145
|
+
}, null, 512), [
|
|
3146
|
+
[re, e.type === "danger"]
|
|
3147
|
+
]),
|
|
3148
|
+
G(S(_(Ge), {
|
|
3149
|
+
"aria-hidden": "true",
|
|
3150
|
+
class: "h-6 w-6 text-yellow-400"
|
|
3151
|
+
}, null, 512), [
|
|
3152
|
+
[re, e.type === "warning"]
|
|
3153
|
+
]),
|
|
3154
|
+
G(S(_(vn), {
|
|
3155
|
+
"aria-hidden": "true",
|
|
3156
|
+
class: "h-6 w-6 text-indigo-600"
|
|
3157
|
+
}, null, 512), [
|
|
3158
|
+
[re, e.type === "info"]
|
|
3159
|
+
])
|
|
3160
|
+
]),
|
|
3161
|
+
c("div", jr, [
|
|
3162
|
+
c("p", Ir, O(e.title), 1),
|
|
3163
|
+
c("p", Ar, O(e.message), 1)
|
|
3164
|
+
]),
|
|
3165
|
+
c("div", Fr, [
|
|
3166
|
+
c("button", {
|
|
3167
|
+
class: "bg-white rounded-md inline-flex text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",
|
|
3168
|
+
type: "button",
|
|
3169
|
+
onClick: n[0] || (n[0] = (l) => r.$emit("closeNotification"))
|
|
3170
|
+
}, [
|
|
3171
|
+
Br,
|
|
3172
|
+
S(_(it), {
|
|
3173
|
+
"aria-hidden": "true",
|
|
3174
|
+
class: "h-5 w-5"
|
|
3175
|
+
})
|
|
3176
|
+
])
|
|
3177
|
+
])
|
|
3178
|
+
])
|
|
3179
|
+
])
|
|
3180
|
+
])) : W("", !0)
|
|
3181
|
+
]),
|
|
3182
|
+
_: 1
|
|
3183
|
+
})
|
|
3184
|
+
])
|
|
3185
|
+
], 2));
|
|
3186
|
+
}
|
|
3187
|
+
}), Vr = {
|
|
3188
|
+
role: "list",
|
|
3189
|
+
class: "divide-y divide-gray-100"
|
|
3190
|
+
}, Yr = { class: "min-w-0" }, Ur = { class: "flex items-start gap-x-3" }, qr = { class: "text-sm font-semibold leading-6 text-gray-900" }, zr = { class: "mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500" }, Wr = { class: "truncate" }, Kr = { class: "flex flex-none items-center gap-x-4" }, Jr = ["href"], Gr = { class: "sr-only" }, Xr = {
|
|
3191
|
+
name: "uiTaskList"
|
|
3192
|
+
}, Qr = /* @__PURE__ */ Object.assign(Xr, {
|
|
3193
|
+
props: {
|
|
3194
|
+
tasks: {
|
|
3195
|
+
type: Array,
|
|
3196
|
+
required: !0
|
|
3197
|
+
}
|
|
3198
|
+
},
|
|
3199
|
+
setup(e) {
|
|
3200
|
+
return (t, o) => (g(), x("ul", Vr, [
|
|
3201
|
+
(g(!0), x(Z, null, ue(e.tasks, (r) => (g(), x("li", {
|
|
3202
|
+
key: r.id,
|
|
3203
|
+
class: "flex items-center justify-between gap-x-6 py-5"
|
|
3204
|
+
}, [
|
|
3205
|
+
c("div", Yr, [
|
|
3206
|
+
c("div", Ur, [
|
|
3207
|
+
c("p", qr, O(r.name), 1),
|
|
3208
|
+
c("p", {
|
|
3209
|
+
class: R([
|
|
3210
|
+
{
|
|
3211
|
+
"text-green-700 bg-green-50 ring-green-600/20": r.status === "Complete",
|
|
3212
|
+
"text-gray-600 bg-gray-50 ring-gray-500/10": r.status === "In progress",
|
|
3213
|
+
"text-yellow-800 bg-yellow-50 ring-yellow-600/20": r.status === "Incomplete"
|
|
3214
|
+
},
|
|
3215
|
+
"rounded-md whitespace-nowrap mt-0.5 px-1.5 py-0.5 text-xs font-medium ring-1 ring-inset"
|
|
3216
|
+
])
|
|
3217
|
+
}, O(r.statusLiteral), 3)
|
|
3218
|
+
]),
|
|
3219
|
+
c("div", zr, [
|
|
3220
|
+
c("p", Wr, O(r.description), 1)
|
|
3221
|
+
])
|
|
3222
|
+
]),
|
|
3223
|
+
c("div", Kr, [
|
|
3224
|
+
c("a", {
|
|
3225
|
+
href: r.href,
|
|
3226
|
+
class: "hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block"
|
|
3227
|
+
}, [
|
|
3228
|
+
ye(O(r.action), 1),
|
|
3229
|
+
c("span", Gr, ", " + O(r.name), 1)
|
|
3230
|
+
], 8, Jr)
|
|
3231
|
+
])
|
|
3232
|
+
]))), 128))
|
|
3233
|
+
]));
|
|
3234
|
+
}
|
|
3235
|
+
});
|
|
3236
|
+
var Ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3237
|
+
function Zr(e) {
|
|
3238
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3239
|
+
}
|
|
3240
|
+
var ea = { exports: {} };
|
|
3241
|
+
(function(e, t) {
|
|
3242
|
+
(function(o, r) {
|
|
3243
|
+
e.exports = r(V);
|
|
3244
|
+
})(Ue, function(o) {
|
|
3245
|
+
function r(a) {
|
|
3246
|
+
return a && typeof a == "object" && "default" in a ? a : { default: a };
|
|
3247
|
+
}
|
|
3248
|
+
var n = r(o), l = { name: "es", monthsShort: "ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"), weekdays: "domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"), weekdaysShort: "dom._lun._mar._mié._jue._vie._sáb.".split("_"), weekdaysMin: "do_lu_ma_mi_ju_vi_sá".split("_"), months: "enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"), weekStart: 1, formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY H:mm", LLLL: "dddd, D [de] MMMM [de] YYYY H:mm" }, relativeTime: { future: "en %s", past: "hace %s", s: "unos segundos", m: "un minuto", mm: "%d minutos", h: "una hora", hh: "%d horas", d: "un día", dd: "%d días", M: "un mes", MM: "%d meses", y: "un año", yy: "%d años" }, ordinal: function(a) {
|
|
3249
|
+
return a + "º";
|
|
3250
|
+
} };
|
|
3251
|
+
return n.default.locale(l, null, !0), l;
|
|
3252
|
+
});
|
|
3253
|
+
})(ea);
|
|
3254
|
+
var ta = { exports: {} };
|
|
3255
|
+
(function(e, t) {
|
|
3256
|
+
(function(o, r) {
|
|
3257
|
+
e.exports = r(V);
|
|
3258
|
+
})(Ue, function(o) {
|
|
3259
|
+
function r(s) {
|
|
3260
|
+
return s && typeof s == "object" && "default" in s ? s : { default: s };
|
|
3261
|
+
}
|
|
3262
|
+
var n = r(o), l = { s: "ein paar Sekunden", m: ["eine Minute", "einer Minute"], mm: "%d Minuten", h: ["eine Stunde", "einer Stunde"], hh: "%d Stunden", d: ["ein Tag", "einem Tag"], dd: ["%d Tage", "%d Tagen"], M: ["ein Monat", "einem Monat"], MM: ["%d Monate", "%d Monaten"], y: ["ein Jahr", "einem Jahr"], yy: ["%d Jahre", "%d Jahren"] };
|
|
3263
|
+
function a(s, u, d) {
|
|
3264
|
+
var m = l[d];
|
|
3265
|
+
return Array.isArray(m) && (m = m[u ? 0 : 1]), m.replace("%d", s);
|
|
3266
|
+
}
|
|
3267
|
+
var i = { name: "de", weekdays: "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"), weekdaysShort: "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"), weekdaysMin: "So_Mo_Di_Mi_Do_Fr_Sa".split("_"), months: "Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"), monthsShort: "Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"), ordinal: function(s) {
|
|
3268
|
+
return s + ".";
|
|
3269
|
+
}, weekStart: 1, yearStart: 4, formats: { LTS: "HH:mm:ss", LT: "HH:mm", L: "DD.MM.YYYY", LL: "D. MMMM YYYY", LLL: "D. MMMM YYYY HH:mm", LLLL: "dddd, D. MMMM YYYY HH:mm" }, relativeTime: { future: "in %s", past: "vor %s", s: a, m: a, mm: a, h: a, hh: a, d: a, dd: a, M: a, MM: a, y: a, yy: a } };
|
|
3270
|
+
return n.default.locale(i, null, !0), i;
|
|
3271
|
+
});
|
|
3272
|
+
})(ta);
|
|
3273
|
+
var na = { exports: {} };
|
|
3274
|
+
(function(e, t) {
|
|
3275
|
+
(function(o, r) {
|
|
3276
|
+
e.exports = r();
|
|
3277
|
+
})(Ue, function() {
|
|
3278
|
+
return { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(o) {
|
|
3279
|
+
var r = ["th", "st", "nd", "rd"], n = o % 100;
|
|
3280
|
+
return "[" + o + (r[(n - 20) % 10] || r[n] || r[0]) + "]";
|
|
3281
|
+
} };
|
|
3282
|
+
});
|
|
3283
|
+
})(na);
|
|
3284
|
+
var oa = { exports: {} };
|
|
3285
|
+
(function(e, t) {
|
|
3286
|
+
(function(o, r) {
|
|
3287
|
+
e.exports = r(V);
|
|
3288
|
+
})(Ue, function(o) {
|
|
3289
|
+
function r(a) {
|
|
3290
|
+
return a && typeof a == "object" && "default" in a ? a : { default: a };
|
|
3291
|
+
}
|
|
3292
|
+
var n = r(o), l = { name: "fr", weekdays: "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"), weekdaysShort: "dim._lun._mar._mer._jeu._ven._sam.".split("_"), weekdaysMin: "di_lu_ma_me_je_ve_sa".split("_"), months: "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"), monthsShort: "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"), weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm" }, relativeTime: { future: "dans %s", past: "il y a %s", s: "quelques secondes", m: "une minute", mm: "%d minutes", h: "une heure", hh: "%d heures", d: "un jour", dd: "%d jours", M: "un mois", MM: "%d mois", y: "un an", yy: "%d ans" }, ordinal: function(a) {
|
|
3293
|
+
return "" + a + (a === 1 ? "er" : "");
|
|
3294
|
+
} };
|
|
3295
|
+
return n.default.locale(l, null, !0), l;
|
|
3296
|
+
});
|
|
3297
|
+
})(oa);
|
|
3298
|
+
const Te = (e, t) => {
|
|
3299
|
+
const o = e.__vccOpts || e;
|
|
3300
|
+
for (const [r, n] of t)
|
|
3301
|
+
o[r] = n;
|
|
3302
|
+
return o;
|
|
3303
|
+
}, la = {
|
|
3304
|
+
name: "dateSelector",
|
|
3305
|
+
components: { ChevronLeftIcon: rl, ChevronRightIcon: fn },
|
|
3306
|
+
computed: {
|
|
3307
|
+
currentDate() {
|
|
3308
|
+
return V(this.selectedDate).locale("es").format("DD MMM. YYYY");
|
|
3309
|
+
}
|
|
3310
|
+
},
|
|
3311
|
+
props: {
|
|
3312
|
+
selectedDate: {
|
|
3313
|
+
type: Object,
|
|
3314
|
+
required: !0
|
|
3315
|
+
}
|
|
3316
|
+
},
|
|
3317
|
+
methods: {
|
|
3318
|
+
selectDate(e, t) {
|
|
3319
|
+
let o;
|
|
3320
|
+
t === "previous" && (e === "day" && (o = V(this.selectedDate).subtract(1, "day")), e === "month" && (o = V(this.selectedDate).subtract(1, "month")), e === "year" && (o = V(this.selectedDate).subtract(1, "year"))), t === "next" && (e === "day" && (o = V(this.selectedDate).add(1, "day")), e === "month" && (o = V(this.selectedDate).add(1, "month")), e === "year" && (o = V(this.selectedDate).add(1, "year"))), this.$emit("dateSelected", o);
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
}, ra = { class: "dateSelector flex items-center text-white flex-row" }, aa = { class: "pagination flex items-center my-1 md:my-0" }, ia = { class: "date mx-4 font-bold text-center text-indigo-600 select-none uppercase" }, sa = { class: "pagination flex items-center my-1 sm:my-0" };
|
|
3324
|
+
function ua(e, t, o, r, n, l) {
|
|
3325
|
+
const a = Oe("ChevronLeftIcon"), i = Oe("ChevronRightIcon");
|
|
3326
|
+
return g(), x("div", ra, [
|
|
3327
|
+
c("div", aa, [
|
|
3328
|
+
c("div", {
|
|
3329
|
+
class: "previousYear flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm",
|
|
3330
|
+
onClick: t[0] || (t[0] = (s) => l.selectDate("year", "previous"))
|
|
3331
|
+
}, [
|
|
3332
|
+
S(a, { class: "h-4" }),
|
|
3333
|
+
S(a, { class: "h-4 -ml-3" }),
|
|
3334
|
+
S(a, { class: "h-4 -ml-3" })
|
|
3335
|
+
]),
|
|
3336
|
+
c("div", {
|
|
3337
|
+
class: "previousMonth flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm",
|
|
3338
|
+
onClick: t[1] || (t[1] = (s) => l.selectDate("month", "previous"))
|
|
3339
|
+
}, [
|
|
3340
|
+
S(a, { class: "h-4" }),
|
|
3341
|
+
S(a, { class: "h-4 -ml-3" })
|
|
3342
|
+
]),
|
|
3343
|
+
c("div", {
|
|
3344
|
+
class: "previousDay flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm",
|
|
3345
|
+
onClick: t[2] || (t[2] = (s) => l.selectDate("day", "previous"))
|
|
3346
|
+
}, [
|
|
3347
|
+
S(a, { class: "h-4" })
|
|
3348
|
+
])
|
|
3349
|
+
]),
|
|
3350
|
+
c("div", ia, O(l.currentDate), 1),
|
|
3351
|
+
c("div", sa, [
|
|
3352
|
+
c("div", {
|
|
3353
|
+
class: "previousDay flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm",
|
|
3354
|
+
onClick: t[3] || (t[3] = (s) => l.selectDate("day", "next"))
|
|
3355
|
+
}, [
|
|
3356
|
+
S(i, { class: "h-4" })
|
|
3357
|
+
]),
|
|
3358
|
+
c("div", {
|
|
3359
|
+
class: "previousMonth flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm",
|
|
3360
|
+
onClick: t[4] || (t[4] = (s) => l.selectDate("month", "next"))
|
|
3361
|
+
}, [
|
|
3362
|
+
S(i, { class: "h-4" }),
|
|
3363
|
+
S(i, { class: "h-4 -ml-3" })
|
|
3364
|
+
]),
|
|
3365
|
+
c("div", {
|
|
3366
|
+
class: "previousYear flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm",
|
|
3367
|
+
onClick: t[5] || (t[5] = (s) => l.selectDate("year", "next"))
|
|
3368
|
+
}, [
|
|
3369
|
+
S(i, { class: "h-4" }),
|
|
3370
|
+
S(i, { class: "h-4 -ml-3" }),
|
|
3371
|
+
S(i, { class: "h-4 -ml-3" })
|
|
3372
|
+
])
|
|
3373
|
+
])
|
|
3374
|
+
]);
|
|
3375
|
+
}
|
|
3376
|
+
const da = /* @__PURE__ */ Te(la, [["render", ua]]);
|
|
3377
|
+
var gn = { exports: {} };
|
|
3378
|
+
(function(e, t) {
|
|
3379
|
+
(function(o, r) {
|
|
3380
|
+
e.exports = r();
|
|
3381
|
+
})(Ue, function() {
|
|
3382
|
+
return function(o, r, n) {
|
|
3383
|
+
r.prototype.isToday = function() {
|
|
3384
|
+
var l = "YYYY-MM-DD", a = n();
|
|
3385
|
+
return this.format(l) === a.format(l);
|
|
3386
|
+
};
|
|
3387
|
+
};
|
|
3388
|
+
});
|
|
3389
|
+
})(gn);
|
|
3390
|
+
var ca = gn.exports;
|
|
3391
|
+
const fa = /* @__PURE__ */ Zr(ca), va = {
|
|
3392
|
+
name: "calendarDay",
|
|
3393
|
+
props: {
|
|
3394
|
+
day: Object
|
|
3395
|
+
},
|
|
3396
|
+
computed: {
|
|
3397
|
+
currentDay() {
|
|
3398
|
+
return V.extend(fa), {
|
|
3399
|
+
dayName: V(this.day).locale("es").format("ddd"),
|
|
3400
|
+
day: V(this.day).locale("es").format("DD"),
|
|
3401
|
+
month: V(this.day).locale("es").format("MMM."),
|
|
3402
|
+
isWeekend: V(this.day).format("d") == 6 || V(this.day).format("d") == 0,
|
|
3403
|
+
isToday: V(this.day).isToday()
|
|
3404
|
+
};
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3407
|
+
}, pa = { class: "text-xs" }, ma = { class: "font-bold text-lg" }, ga = { class: "text-xs font-medium" };
|
|
3408
|
+
function ha(e, t, o, r, n, l) {
|
|
3409
|
+
return g(), x("div", {
|
|
3410
|
+
class: R([
|
|
3411
|
+
"day select-none text-center",
|
|
3412
|
+
{
|
|
3413
|
+
"bg-indigo-200 text-white": l.currentDay.isWeekend,
|
|
3414
|
+
"bg-[#0ff] text-white": l.currentDay.isToday
|
|
3415
|
+
}
|
|
3416
|
+
])
|
|
3417
|
+
}, [
|
|
3418
|
+
c("p", pa, O(l.currentDay.dayName), 1),
|
|
3419
|
+
c("p", ma, O(l.currentDay.day), 1),
|
|
3420
|
+
c("p", ga, O(l.currentDay.month), 1)
|
|
3421
|
+
], 2);
|
|
3422
|
+
}
|
|
3423
|
+
const ba = /* @__PURE__ */ Te(va, [["render", ha]]), ya = {
|
|
3424
|
+
name: "dayPrice",
|
|
3425
|
+
props: {
|
|
3426
|
+
currency: String,
|
|
3427
|
+
price: Object,
|
|
3428
|
+
basePrice: Number,
|
|
3429
|
+
isBasePrice: {
|
|
3430
|
+
type: Boolean,
|
|
3431
|
+
default: !1
|
|
3432
|
+
}
|
|
3433
|
+
},
|
|
3434
|
+
computed: {
|
|
3435
|
+
currentDay() {
|
|
3436
|
+
return {
|
|
3437
|
+
isWeekend: V(this.price.date).format("d") == 6 || V(this.price.date).format("d") == 0,
|
|
3438
|
+
price: this.price.price
|
|
3439
|
+
};
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
}, xa = { class: "priceDay" };
|
|
3443
|
+
function wa(e, t, o, r, n, l) {
|
|
3444
|
+
return g(), x("div", xa, [
|
|
3445
|
+
c("div", {
|
|
3446
|
+
class: R([
|
|
3447
|
+
{
|
|
3448
|
+
"bg-indigo-200 text-white": l.currentDay.isWeekend,
|
|
3449
|
+
"bg-green-300 text-white": o.price.price > o.basePrice,
|
|
3450
|
+
"bg-yellow-300 text-white": o.price.price < o.basePrice
|
|
3451
|
+
},
|
|
3452
|
+
"select-none text-center rounded-lg p-1"
|
|
3453
|
+
])
|
|
3454
|
+
}, O(l.currentDay.price) + O(o.currency), 3)
|
|
3455
|
+
]);
|
|
3456
|
+
}
|
|
3457
|
+
const Sa = /* @__PURE__ */ Te(ya, [["render", wa]]), ka = {
|
|
3458
|
+
name: "uiPriceCalendar",
|
|
3459
|
+
data: () => ({
|
|
3460
|
+
today: /* @__PURE__ */ new Date(),
|
|
3461
|
+
date: /* @__PURE__ */ new Date(),
|
|
3462
|
+
selectedRooms: [],
|
|
3463
|
+
showBasePricesModal: !1,
|
|
3464
|
+
showDays: 14
|
|
3465
|
+
}),
|
|
3466
|
+
props: {
|
|
3467
|
+
category: {
|
|
3468
|
+
type: Object,
|
|
3469
|
+
required: !0
|
|
3470
|
+
},
|
|
3471
|
+
rooms: {
|
|
3472
|
+
type: Array,
|
|
3473
|
+
required: !0
|
|
3474
|
+
},
|
|
3475
|
+
currency: Object,
|
|
3476
|
+
actions: Array
|
|
3477
|
+
},
|
|
3478
|
+
components: { DateSelector: da, Day: ba, Price: Sa, uiButton: Dt },
|
|
3479
|
+
computed: {
|
|
3480
|
+
days() {
|
|
3481
|
+
let e = [];
|
|
3482
|
+
for (let t = 0; t < this.showDays; t++)
|
|
3483
|
+
e.push(V(this.date).add(t, "day"));
|
|
3484
|
+
return e;
|
|
3485
|
+
},
|
|
3486
|
+
indeterminate() {
|
|
3487
|
+
return this.selectedRooms.length > 0 && this.selectedRooms.length < this.rooms.length;
|
|
3488
|
+
}
|
|
3489
|
+
},
|
|
3490
|
+
methods: {
|
|
3491
|
+
changeDate(e) {
|
|
3492
|
+
V(e).isBefore(this.today) || (this.date = e, this.$emit("dateChanged", this.date));
|
|
3493
|
+
},
|
|
3494
|
+
getSelectionBasePrice(e) {
|
|
3495
|
+
let t = this.category.selectionPrices.find((o) => V(o.date).isSame(e.date));
|
|
3496
|
+
return t ? t.price : e.price;
|
|
3497
|
+
},
|
|
3498
|
+
changeCategoryBulkPrices() {
|
|
3499
|
+
this.$emit("changeCategoryBulkPrices");
|
|
3500
|
+
},
|
|
3501
|
+
changeCategorySelectionPrice(e) {
|
|
3502
|
+
this.$emit("changeCategorySelectionPrice", e);
|
|
3503
|
+
},
|
|
3504
|
+
changeCategoryUpgradePrice(e) {
|
|
3505
|
+
this.$emit("changeCategoryUpgradePrice", e);
|
|
3506
|
+
},
|
|
3507
|
+
tableAction(e) {
|
|
3508
|
+
this.$emit("tableAction", e);
|
|
3509
|
+
},
|
|
3510
|
+
changeRoomPrice(e) {
|
|
3511
|
+
this.$emit("changeRoomPrice", e);
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
}, $a = { class: "px-4 sm:px-6 lg:px-8" }, _a = { class: "flow-root" }, Ca = { class: "overflow-x-auto sm:-mx-6 lg:-mx-8 shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, Oa = { class: "inline-block min-w-full align-middle" }, Da = { class: "min-w-full" }, Ma = { class: "bg-white" }, Ta = {
|
|
3515
|
+
colspan: "6",
|
|
3516
|
+
scope: "colgroup",
|
|
3517
|
+
class: "bg-gray-50 py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-3"
|
|
3518
|
+
}, Ea = {
|
|
3519
|
+
colspan: "20",
|
|
3520
|
+
scope: "colgroup",
|
|
3521
|
+
class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900"
|
|
3522
|
+
}, Pa = /* @__PURE__ */ c("span", null, "Categoría: Simple", -1), La = /* @__PURE__ */ c("td", {
|
|
3523
|
+
colspan: "6",
|
|
3524
|
+
class: "pl-4"
|
|
3525
|
+
}, " Precios de selección ", -1), Ra = /* @__PURE__ */ c("td", {
|
|
3526
|
+
colspan: "6",
|
|
3527
|
+
class: "pl-4"
|
|
3528
|
+
}, " Precios de mejora ", -1), ja = {
|
|
3529
|
+
colspan: "20",
|
|
3530
|
+
scope: "colgroup",
|
|
3531
|
+
class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900 relative"
|
|
3532
|
+
}, Ia = {
|
|
3533
|
+
key: 0,
|
|
3534
|
+
class: "absolute top-0 left-12 flex h-12 items-center space-x-3 sm:left-48 bg-white shadow rounded px-4 py-1 z-10"
|
|
3535
|
+
}, Aa = ["onClick"], Fa = /* @__PURE__ */ c("span", null, "Precios de selección", -1), Ba = {
|
|
3536
|
+
colspan: "2",
|
|
3537
|
+
scope: "colgroup",
|
|
3538
|
+
class: "relative bg-gray-100 py-3.5 pl-4 pr-3 text-left font-semibold text-gray-900"
|
|
3539
|
+
}, Na = ["checked", "indeterminate"], Ha = /* @__PURE__ */ c("span", { class: "pl-6" }, "Habitación", -1), Va = /* @__PURE__ */ c("th", {
|
|
3540
|
+
colspan: "2",
|
|
3541
|
+
scope: "colgroup",
|
|
3542
|
+
class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900"
|
|
3543
|
+
}, " Edificio ", -1), Ya = /* @__PURE__ */ c("th", {
|
|
3544
|
+
colspan: "2",
|
|
3545
|
+
scope: "colgroup",
|
|
3546
|
+
class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900"
|
|
3547
|
+
}, " Planta ", -1), Ua = /* @__PURE__ */ c("th", {
|
|
3548
|
+
colspan: "14",
|
|
3549
|
+
scope: "colgroup",
|
|
3550
|
+
class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900"
|
|
3551
|
+
}, null, -1), qa = {
|
|
3552
|
+
colspan: "2",
|
|
3553
|
+
class: "relative py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"
|
|
3554
|
+
}, za = {
|
|
3555
|
+
key: 0,
|
|
3556
|
+
class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600"
|
|
3557
|
+
}, Wa = ["value"], Ka = { class: "pl-6" }, Ja = {
|
|
3558
|
+
colspan: "2",
|
|
3559
|
+
class: "pl-4"
|
|
3560
|
+
}, Ga = {
|
|
3561
|
+
colspan: "2",
|
|
3562
|
+
class: "pl-4"
|
|
3563
|
+
};
|
|
3564
|
+
function Xa(e, t, o, r, n, l) {
|
|
3565
|
+
var d, m;
|
|
3566
|
+
const a = Oe("DateSelector"), i = Oe("Day"), s = Oe("uiButton"), u = Oe("Price");
|
|
3567
|
+
return g(), x("div", $a, [
|
|
3568
|
+
c("div", _a, [
|
|
3569
|
+
c("div", Ca, [
|
|
3570
|
+
c("div", Oa, [
|
|
3571
|
+
c("table", Da, [
|
|
3572
|
+
c("tbody", Ma, [
|
|
3573
|
+
c("tr", null, [
|
|
3574
|
+
c("th", Ta, [
|
|
3575
|
+
S(a, {
|
|
3576
|
+
selectedDate: e.date,
|
|
3577
|
+
onDateSelected: t[0] || (t[0] = (v) => l.changeDate(v))
|
|
3578
|
+
}, null, 8, ["selectedDate"])
|
|
3579
|
+
]),
|
|
3580
|
+
(g(!0), x(Z, null, ue(l.days, (v, p) => (g(), x("th", {
|
|
3581
|
+
scope: "col",
|
|
3582
|
+
key: p,
|
|
3583
|
+
class: "text-sm font-semibold text-gray-900 p-0"
|
|
3584
|
+
}, [
|
|
3585
|
+
S(i, {
|
|
3586
|
+
class: "border-l border-gray-200 px-6 py-3",
|
|
3587
|
+
day: v
|
|
3588
|
+
}, null, 8, ["day"])
|
|
3589
|
+
]))), 128))
|
|
3590
|
+
]),
|
|
3591
|
+
c("tr", null, [
|
|
3592
|
+
c("th", Ea, [
|
|
3593
|
+
Pa,
|
|
3594
|
+
S(s, {
|
|
3595
|
+
class: "ml-4",
|
|
3596
|
+
size: "small",
|
|
3597
|
+
onClick: l.changeCategoryBulkPrices
|
|
3598
|
+
}, {
|
|
3599
|
+
default: Y(() => [
|
|
3600
|
+
ye("Cambiar precios en bloque ")
|
|
3601
|
+
]),
|
|
3602
|
+
_: 1
|
|
3603
|
+
}, 8, ["onClick"])
|
|
3604
|
+
])
|
|
3605
|
+
]),
|
|
3606
|
+
c("tr", null, [
|
|
3607
|
+
La,
|
|
3608
|
+
(g(!0), x(Z, null, ue(o.category.selectionPrices, (v, p) => (g(), x("td", {
|
|
3609
|
+
key: p,
|
|
3610
|
+
class: "p-0"
|
|
3611
|
+
}, [
|
|
3612
|
+
S(u, {
|
|
3613
|
+
onClick: (b) => l.changeCategorySelectionPrice(v),
|
|
3614
|
+
class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer",
|
|
3615
|
+
price: v,
|
|
3616
|
+
currency: o.currency.symbol,
|
|
3617
|
+
isBasePrice: !0
|
|
3618
|
+
}, null, 8, ["onClick", "price", "currency"])
|
|
3619
|
+
]))), 128))
|
|
3620
|
+
]),
|
|
3621
|
+
c("tr", null, [
|
|
3622
|
+
Ra,
|
|
3623
|
+
(g(!0), x(Z, null, ue(o.category.upgradePrices, (v, p) => (g(), x("td", {
|
|
3624
|
+
key: p,
|
|
3625
|
+
class: "p-0"
|
|
3626
|
+
}, [
|
|
3627
|
+
S(u, {
|
|
3628
|
+
onClick: (b) => l.changeCategoryUpgradePrice(v),
|
|
3629
|
+
class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer bg-gray-100",
|
|
3630
|
+
price: v,
|
|
3631
|
+
currency: o.currency.symbol,
|
|
3632
|
+
isBasePrice: !0
|
|
3633
|
+
}, null, 8, ["onClick", "price", "currency"])
|
|
3634
|
+
]))), 128))
|
|
3635
|
+
]),
|
|
3636
|
+
c("tr", null, [
|
|
3637
|
+
c("th", ja, [
|
|
3638
|
+
((d = e.selectedRooms) == null ? void 0 : d.length) > 0 && ((m = o.actions) == null ? void 0 : m.length) > 0 ? (g(), x("div", Ia, [
|
|
3639
|
+
(g(!0), x(Z, null, ue(o.actions, (v, p) => (g(), x("button", {
|
|
3640
|
+
onClick: (b) => l.tableAction({ action: v.id, items: e.selectedRooms }),
|
|
3641
|
+
key: p,
|
|
3642
|
+
type: "button",
|
|
3643
|
+
class: "inline-flex items-center rounded bg-indigo-600 hover:bg-indigo-800 px-2.5 py-1.5 text-xs font-medium text-white shadow-sm disabled:cursor-not-allowed disabled:opacity-30"
|
|
3644
|
+
}, O(v.name), 9, Aa))), 128))
|
|
3645
|
+
])) : W("", !0),
|
|
3646
|
+
Fa
|
|
3647
|
+
])
|
|
3648
|
+
]),
|
|
3649
|
+
c("tr", null, [
|
|
3650
|
+
c("th", Ba, [
|
|
3651
|
+
c("input", {
|
|
3652
|
+
type: "checkbox",
|
|
3653
|
+
class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",
|
|
3654
|
+
checked: l.indeterminate || e.selectedRooms.length === o.rooms.length,
|
|
3655
|
+
indeterminate: l.indeterminate,
|
|
3656
|
+
onChange: t[1] || (t[1] = (v) => e.selectedRooms = v.target.checked ? o.rooms.map((p) => p.name) : [])
|
|
3657
|
+
}, null, 40, Na),
|
|
3658
|
+
Ha
|
|
3659
|
+
]),
|
|
3660
|
+
Va,
|
|
3661
|
+
Ya,
|
|
3662
|
+
Ua
|
|
3663
|
+
]),
|
|
3664
|
+
(g(!0), x(Z, null, ue(o.rooms, (v) => (g(), x("tr", {
|
|
3665
|
+
key: v.name,
|
|
3666
|
+
class: "even:bg-gray-100"
|
|
3667
|
+
}, [
|
|
3668
|
+
c("td", qa, [
|
|
3669
|
+
e.selectedRooms.includes(v.name) ? (g(), x("div", za)) : W("", !0),
|
|
3670
|
+
G(c("input", {
|
|
3671
|
+
type: "checkbox",
|
|
3672
|
+
class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",
|
|
3673
|
+
value: v.name,
|
|
3674
|
+
"onUpdate:modelValue": t[2] || (t[2] = (p) => e.selectedRooms = p)
|
|
3675
|
+
}, null, 8, Wa), [
|
|
3676
|
+
[Cn, e.selectedRooms]
|
|
3677
|
+
]),
|
|
3678
|
+
c("span", Ka, O(v.name), 1)
|
|
3679
|
+
]),
|
|
3680
|
+
c("td", Ja, O(v.building), 1),
|
|
3681
|
+
c("td", Ga, O(v.floor), 1),
|
|
3682
|
+
(g(!0), x(Z, null, ue(v.selectionPrices, (p, b) => (g(), x("td", {
|
|
3683
|
+
class: "p-0",
|
|
3684
|
+
key: b
|
|
3685
|
+
}, [
|
|
3686
|
+
S(u, {
|
|
3687
|
+
onClick: (h) => l.changeRoomPrice(p),
|
|
3688
|
+
class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 cursor-pointer",
|
|
3689
|
+
price: p,
|
|
3690
|
+
currency: o.currency.symbol,
|
|
3691
|
+
basePrice: l.getSelectionBasePrice(p)
|
|
3692
|
+
}, null, 8, ["onClick", "price", "currency", "basePrice"])
|
|
3693
|
+
]))), 128))
|
|
3694
|
+
]))), 128))
|
|
3695
|
+
])
|
|
3696
|
+
])
|
|
3697
|
+
])
|
|
3698
|
+
])
|
|
3699
|
+
])
|
|
3700
|
+
]);
|
|
3701
|
+
}
|
|
3702
|
+
const Qa = /* @__PURE__ */ Te(ka, [["render", Xa]]);
|
|
3703
|
+
const Za = { class: "chart-selector flex flex-row items-center justify-center" }, ei = {
|
|
3704
|
+
name: "rangeSelector"
|
|
3705
|
+
}, ti = /* @__PURE__ */ Object.assign(ei, {
|
|
3706
|
+
emits: ["rangeSelected"],
|
|
3707
|
+
setup(e, { emit: t }) {
|
|
3708
|
+
let o = w("24h");
|
|
3709
|
+
const r = (n) => {
|
|
3710
|
+
o.value = n, t("rangeSelected", n);
|
|
3711
|
+
};
|
|
3712
|
+
return (n, l) => (g(), x("ul", Za, [
|
|
3713
|
+
c("li", {
|
|
3714
|
+
class: R({ selected: _(o) === "24h" }),
|
|
3715
|
+
onClick: l[0] || (l[0] = (a) => r("24h"))
|
|
3716
|
+
}, " 24H ", 2),
|
|
3717
|
+
c("li", {
|
|
3718
|
+
class: R({ selected: _(o) === "7d" }),
|
|
3719
|
+
onClick: l[1] || (l[1] = (a) => r("7d"))
|
|
3720
|
+
}, "7D", 2),
|
|
3721
|
+
c("li", {
|
|
3722
|
+
class: R({ selected: _(o) === "1m" }),
|
|
3723
|
+
onClick: l[2] || (l[2] = (a) => r("1m"))
|
|
3724
|
+
}, "1M", 2),
|
|
3725
|
+
c("li", {
|
|
3726
|
+
class: R({ selected: _(o) === "3m" }),
|
|
3727
|
+
onClick: l[3] || (l[3] = (a) => r("3m"))
|
|
3728
|
+
}, "3M", 2)
|
|
3729
|
+
]));
|
|
3730
|
+
}
|
|
3731
|
+
}), ni = /* @__PURE__ */ Te(ti, [["__scopeId", "data-v-e8fe3015"]]), oi = {
|
|
3732
|
+
toolbar: {
|
|
3733
|
+
show: !1
|
|
3734
|
+
},
|
|
3735
|
+
zoom: {
|
|
3736
|
+
enabled: !1
|
|
3737
|
+
}
|
|
3738
|
+
}, li = [
|
|
3739
|
+
"#715aff",
|
|
3740
|
+
"#00ffff",
|
|
3741
|
+
"#aba9ba"
|
|
3742
|
+
], ri = {
|
|
3743
|
+
show: !0,
|
|
3744
|
+
curve: "stepline",
|
|
3745
|
+
lineCap: "butt",
|
|
3746
|
+
width: 1,
|
|
3747
|
+
dashArray: 0
|
|
3748
|
+
}, ai = {
|
|
3749
|
+
enabled: !1
|
|
3750
|
+
}, ii = {
|
|
3751
|
+
strokeWidth: 0,
|
|
3752
|
+
size: 4,
|
|
3753
|
+
hover: {
|
|
3754
|
+
size: 8
|
|
3755
|
+
}
|
|
3756
|
+
}, si = {
|
|
3757
|
+
chart: oi,
|
|
3758
|
+
colors: li,
|
|
3759
|
+
stroke: ri,
|
|
3760
|
+
dataLabels: ai,
|
|
3761
|
+
markers: ii
|
|
3762
|
+
};
|
|
3763
|
+
const ui = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, di = { class: "chart-header flex flex-row justify-between" }, ci = { class: "text-sm font-medium text-gray-500 truncate" }, fi = { class: "chart-content" }, vi = {
|
|
3764
|
+
name: "uiChart"
|
|
3765
|
+
}, pi = /* @__PURE__ */ Object.assign(vi, {
|
|
3766
|
+
props: {
|
|
3767
|
+
title: String,
|
|
3768
|
+
type: {
|
|
3769
|
+
type: String,
|
|
3770
|
+
default: "area"
|
|
3771
|
+
},
|
|
3772
|
+
series: {
|
|
3773
|
+
type: Array,
|
|
3774
|
+
required: !0
|
|
3775
|
+
},
|
|
3776
|
+
options: {
|
|
3777
|
+
type: Object,
|
|
3778
|
+
required: !0
|
|
3779
|
+
}
|
|
3780
|
+
},
|
|
3781
|
+
emits: ["selectedRange", "chartUpdated"],
|
|
3782
|
+
setup(e, { emit: t }) {
|
|
3783
|
+
const o = e, r = y(() => ({ ...o.options, ...si })), n = y(() => o.series), l = () => t("chartUpdated");
|
|
3784
|
+
return (a, i) => (g(), x("div", ui, [
|
|
3785
|
+
c("div", di, [
|
|
3786
|
+
c("div", ci, O(e.title), 1),
|
|
3787
|
+
S(ni, {
|
|
3788
|
+
onRangeSelected: i[0] || (i[0] = (s) => t("selectedRange", s))
|
|
3789
|
+
})
|
|
3790
|
+
]),
|
|
3791
|
+
c("div", fi, [
|
|
3792
|
+
S(_(On), {
|
|
3793
|
+
type: e.type,
|
|
3794
|
+
series: n.value,
|
|
3795
|
+
width: "100%",
|
|
3796
|
+
height: "100%",
|
|
3797
|
+
options: r.value,
|
|
3798
|
+
onUpdated: l,
|
|
3799
|
+
onMounted: a.emitEvent
|
|
3800
|
+
}, null, 8, ["type", "series", "options", "onMounted"])
|
|
3801
|
+
])
|
|
3802
|
+
]));
|
|
3803
|
+
}
|
|
3804
|
+
}), mi = /* @__PURE__ */ Te(pi, [["__scopeId", "data-v-4913a7a5"]]), gi = {
|
|
3805
|
+
uiButton: Dt,
|
|
3806
|
+
uiIcon: ve,
|
|
3807
|
+
uiCheckbox: An,
|
|
3808
|
+
uiDropdown: pn,
|
|
3809
|
+
uiInput: xl,
|
|
3810
|
+
uiInputFile: Ll,
|
|
3811
|
+
uiSelect: Il,
|
|
3812
|
+
uiTag: mn,
|
|
3813
|
+
uiTextArea: Hl,
|
|
3814
|
+
uiToggle: ql,
|
|
3815
|
+
uiAlert: er,
|
|
3816
|
+
uiBreadcrumbs: sr,
|
|
3817
|
+
uiCard: mr,
|
|
3818
|
+
uiFilter: hr,
|
|
3819
|
+
uiModal: Mr,
|
|
3820
|
+
uiNotification: Hr,
|
|
3821
|
+
uiTaskList: Qr,
|
|
3822
|
+
uiPriceCalendar: Qa,
|
|
3823
|
+
uiChart: mi
|
|
3824
|
+
}, Ct = gi, wi = {
|
|
1971
3825
|
install(e) {
|
|
1972
|
-
Object.keys(
|
|
1973
|
-
e.component(
|
|
3826
|
+
Object.keys(Ct).forEach((t) => {
|
|
3827
|
+
e.component(t, Ct[t]);
|
|
1974
3828
|
});
|
|
1975
3829
|
}
|
|
1976
3830
|
};
|
|
1977
3831
|
export {
|
|
1978
|
-
|
|
3832
|
+
wi as default
|
|
1979
3833
|
};
|