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