@hotelinking/ui 4.34.3 → 4.34.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui.es.js +1000 -1040
- package/dist/ui.umd.cjs +1 -1
- package/package.json +17 -17
package/dist/ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as e, createBlock as t, resolveDynamicComponent as l, normalizeClass as n, createElementBlock as a, createVNode as o, renderSlot as r, createElementVNode as i, ref as s, computed as u, unref as d, shallowRef as c, watch as p, triggerRef as g, onScopeDispose as f, nextTick as
|
|
1
|
+
import { openBlock as e, createBlock as t, resolveDynamicComponent as l, normalizeClass as n, createElementBlock as a, createVNode as o, renderSlot as r, createElementVNode as i, ref as s, computed as u, unref as d, shallowRef as c, watch as p, triggerRef as g, onScopeDispose as m, inject as f, nextTick as v, watchEffect as h, onMounted as y, cloneVNode as b, h as x, Fragment as w, defineComponent as k, provide as S, reactive as C, onUnmounted as O, toRaw as M, getCurrentInstance as T, Teleport as D, withCtx as E, createTextVNode as I, toDisplayString as _, Transition as P, renderList as j, createCommentVNode as R, withDirectives as B, vModelDynamic as A, vShow as L, withModifiers as F, vModelText as N, createStaticVNode as z, resolveComponent as $, vModelCheckbox as H, isRef as V } from "vue";
|
|
2
2
|
import Y from "dayjs";
|
|
3
3
|
import U from "vue3-apexcharts";
|
|
4
4
|
import q from "vue3-draggable";
|
|
@@ -9,281 +9,234 @@ const W = { name: "uiIcon" }, K = Object.assign(W, { props: { icon: { type: Func
|
|
|
9
9
|
o2.disabled || (u2.value = !u2.value, n2("checkboxChanged", { checked: u2.value, value: o2.value }));
|
|
10
10
|
}) }, null, 40, le)]), i("div", ne, [i("span", ae, [r(l3.$slots, "default")])])]));
|
|
11
11
|
} });
|
|
12
|
-
function ue() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Object.prototype.hasOwnProperty.call(l2, n2) && (e2[n2] = l2[n2]);
|
|
28
|
-
}
|
|
29
|
-
return e2;
|
|
30
|
-
}, de.apply(this, arguments);
|
|
31
|
-
}
|
|
32
|
-
function ce(e2, t2, l2) {
|
|
33
|
-
var n2, a2, o2 = null != (n2 = l2.initialDeps) ? n2 : [];
|
|
34
|
-
return function() {
|
|
35
|
-
var n3;
|
|
36
|
-
l2.key && null != l2.debug && l2.debug() && (n3 = Date.now());
|
|
37
|
-
var r2, i2 = e2(), s2 = i2.length !== o2.length || i2.some(function(e3, t3) {
|
|
38
|
-
return o2[t3] !== e3;
|
|
39
|
-
});
|
|
40
|
-
if (!s2)
|
|
41
|
-
return a2;
|
|
42
|
-
if (o2 = i2, l2.key && null != l2.debug && l2.debug() && (r2 = Date.now()), a2 = t2.apply(void 0, i2), l2.key && null != l2.debug && l2.debug()) {
|
|
43
|
-
var u2 = Math.round(100 * (Date.now() - n3)) / 100, d2 = Math.round(100 * (Date.now() - r2)) / 100, c2 = d2 / 16, p2 = function(e3, t3) {
|
|
44
|
-
for (e3 = String(e3); e3.length < t3; )
|
|
45
|
-
e3 = " " + e3;
|
|
46
|
-
return e3;
|
|
12
|
+
function ue(e2, t2, l2) {
|
|
13
|
+
let n2, a2 = l2.initialDeps ?? [];
|
|
14
|
+
return () => {
|
|
15
|
+
var o2, r2, i2, s2;
|
|
16
|
+
let u2;
|
|
17
|
+
l2.key && (null == (o2 = l2.debug) ? void 0 : o2.call(l2)) && (u2 = Date.now());
|
|
18
|
+
const d2 = e2(), c2 = d2.length !== a2.length || d2.some((e3, t3) => a2[t3] !== e3);
|
|
19
|
+
if (!c2)
|
|
20
|
+
return n2;
|
|
21
|
+
let p2;
|
|
22
|
+
if (a2 = d2, l2.key && (null == (r2 = l2.debug) ? void 0 : r2.call(l2)) && (p2 = Date.now()), n2 = t2(...d2), l2.key && (null == (i2 = l2.debug) ? void 0 : i2.call(l2))) {
|
|
23
|
+
const e3 = Math.round(100 * (Date.now() - u2)) / 100, t3 = Math.round(100 * (Date.now() - p2)) / 100, n3 = t3 / 16, a3 = (e4, t4) => {
|
|
24
|
+
for (e4 = String(e4); e4.length < t4; )
|
|
25
|
+
e4 = " " + e4;
|
|
26
|
+
return e4;
|
|
47
27
|
};
|
|
48
|
-
console.info(
|
|
28
|
+
console.info(`%c⏱ ${a3(t3, 5)} /${a3(e3, 5)} ms`, `
|
|
29
|
+
font-size: .6rem;
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * n3, 120))}deg 100% 31%);`, null == l2 ? void 0 : l2.key);
|
|
49
32
|
}
|
|
50
|
-
return null ==
|
|
33
|
+
return null == (s2 = null == l2 ? void 0 : l2.onChange) || s2.call(l2, n2), n2;
|
|
51
34
|
};
|
|
52
35
|
}
|
|
53
|
-
function
|
|
36
|
+
function de(e2, t2) {
|
|
54
37
|
if (void 0 === e2)
|
|
55
|
-
throw new Error("Unexpected undefined" + (t2 ?
|
|
38
|
+
throw new Error("Unexpected undefined" + (t2 ? `: ${t2}` : ""));
|
|
56
39
|
return e2;
|
|
57
40
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
n2.push(a2);
|
|
41
|
+
const ce = (e2) => e2, pe = (e2) => {
|
|
42
|
+
const t2 = Math.max(e2.startIndex - e2.overscan, 0), l2 = Math.min(e2.endIndex + e2.overscan, e2.count - 1), n2 = [];
|
|
43
|
+
for (let e3 = t2; e3 <= l2; e3++)
|
|
44
|
+
n2.push(e3);
|
|
63
45
|
return n2;
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
if (l2)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
46
|
+
}, ge = (e2, t2) => {
|
|
47
|
+
const l2 = e2.scrollElement;
|
|
48
|
+
if (!l2)
|
|
49
|
+
return;
|
|
50
|
+
const n2 = (e3) => {
|
|
51
|
+
const { width: l3, height: n3 } = e3;
|
|
52
|
+
t2({ width: Math.round(l3), height: Math.round(n3) });
|
|
53
|
+
};
|
|
54
|
+
if (n2(l2.getBoundingClientRect()), "undefined" == typeof ResizeObserver)
|
|
55
|
+
return () => {
|
|
70
56
|
};
|
|
57
|
+
const a2 = new ResizeObserver((e3) => {
|
|
58
|
+
const t3 = e3[0];
|
|
59
|
+
if (null == t3 ? void 0 : t3.borderBoxSize) {
|
|
60
|
+
const e4 = t3.borderBoxSize[0];
|
|
61
|
+
if (e4)
|
|
62
|
+
return void n2({ width: e4.inlineSize, height: e4.blockSize });
|
|
63
|
+
}
|
|
71
64
|
n2(l2.getBoundingClientRect());
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
l2.removeEventListener("scroll", n2);
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}, ye = function(e2, t2, l2) {
|
|
96
|
-
if (null != t2 && t2.borderBoxSize) {
|
|
97
|
-
var n2 = t2.borderBoxSize[0];
|
|
98
|
-
if (n2)
|
|
99
|
-
return Math.round(n2[l2.options.horizontal ? "inlineSize" : "blockSize"]);
|
|
65
|
+
});
|
|
66
|
+
return a2.observe(l2, { box: "border-box" }), () => {
|
|
67
|
+
a2.unobserve(l2);
|
|
68
|
+
};
|
|
69
|
+
}, me = (e2, t2) => {
|
|
70
|
+
const l2 = e2.scrollElement;
|
|
71
|
+
if (!l2)
|
|
72
|
+
return;
|
|
73
|
+
const n2 = () => {
|
|
74
|
+
t2(l2[e2.options.horizontal ? "scrollLeft" : "scrollTop"]);
|
|
75
|
+
};
|
|
76
|
+
return n2(), l2.addEventListener("scroll", n2, { passive: true }), () => {
|
|
77
|
+
l2.removeEventListener("scroll", n2);
|
|
78
|
+
};
|
|
79
|
+
}, fe = (e2, t2, l2) => {
|
|
80
|
+
if (null == t2 ? void 0 : t2.borderBoxSize) {
|
|
81
|
+
const e3 = t2.borderBoxSize[0];
|
|
82
|
+
if (e3) {
|
|
83
|
+
return Math.round(e3[l2.options.horizontal ? "inlineSize" : "blockSize"]);
|
|
84
|
+
}
|
|
100
85
|
}
|
|
101
86
|
return Math.round(e2.getBoundingClientRect()[l2.options.horizontal ? "width" : "height"]);
|
|
102
|
-
},
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}, function(e3, t3, l3, a2) {
|
|
158
|
-
return n2.pendingMeasuredCacheIndexes = [], { count: e3, paddingStart: t3, scrollMargin: l3, getItemKey: a2 };
|
|
159
|
-
}, { key: false }), this.getFurthestMeasurement = function(e3, t3) {
|
|
160
|
-
for (var l3 = /* @__PURE__ */ new Map(), a2 = /* @__PURE__ */ new Map(), o2 = t3 - 1; o2 >= 0; o2--) {
|
|
161
|
-
var r2 = e3[o2];
|
|
162
|
-
if (!l3.has(r2.lane)) {
|
|
163
|
-
var i2 = a2.get(r2.lane);
|
|
164
|
-
if (null == i2 || r2.end > i2.end ? a2.set(r2.lane, r2) : r2.end < i2.end && l3.set(r2.lane, true), l3.size === n2.options.lanes)
|
|
87
|
+
}, ve = (e2, { adjustments: t2 = 0, behavior: l2 }, n2) => {
|
|
88
|
+
var a2, o2;
|
|
89
|
+
const r2 = e2 + t2;
|
|
90
|
+
null == (o2 = null == (a2 = n2.scrollElement) ? void 0 : a2.scrollTo) || o2.call(a2, { [n2.options.horizontal ? "left" : "top"]: r2, behavior: l2 });
|
|
91
|
+
};
|
|
92
|
+
class he {
|
|
93
|
+
constructor(e2) {
|
|
94
|
+
this.unsubs = [], this.scrollElement = null, this.isScrolling = false, this.isScrollingTimeoutId = null, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollDirection = null, this.scrollAdjustments = 0, this.measureElementCache = /* @__PURE__ */ new Map(), this.observer = (() => {
|
|
95
|
+
let e3 = null;
|
|
96
|
+
const t2 = () => e3 || ("undefined" != typeof ResizeObserver ? e3 = new ResizeObserver((e4) => {
|
|
97
|
+
e4.forEach((e5) => {
|
|
98
|
+
this._measureElement(e5.target, e5);
|
|
99
|
+
});
|
|
100
|
+
}) : null);
|
|
101
|
+
return { disconnect: () => {
|
|
102
|
+
var e4;
|
|
103
|
+
return null == (e4 = t2()) ? void 0 : e4.disconnect();
|
|
104
|
+
}, observe: (e4) => {
|
|
105
|
+
var l2;
|
|
106
|
+
return null == (l2 = t2()) ? void 0 : l2.observe(e4, { box: "border-box" });
|
|
107
|
+
}, unobserve: (e4) => {
|
|
108
|
+
var l2;
|
|
109
|
+
return null == (l2 = t2()) ? void 0 : l2.unobserve(e4);
|
|
110
|
+
} };
|
|
111
|
+
})(), this.range = null, this.setOptions = (e3) => {
|
|
112
|
+
Object.entries(e3).forEach(([t2, l2]) => {
|
|
113
|
+
void 0 === l2 && delete e3[t2];
|
|
114
|
+
}), this.options = { debug: false, initialOffset: 0, overscan: 1, paddingStart: 0, paddingEnd: 0, scrollPaddingStart: 0, scrollPaddingEnd: 0, horizontal: false, getItemKey: ce, rangeExtractor: pe, onChange: () => {
|
|
115
|
+
}, measureElement: fe, initialRect: { width: 0, height: 0 }, scrollMargin: 0, scrollingDelay: 150, indexAttribute: "data-index", initialMeasurementsCache: [], lanes: 1, ...e3 };
|
|
116
|
+
}, this.notify = (e3) => {
|
|
117
|
+
var t2, l2;
|
|
118
|
+
null == (l2 = (t2 = this.options).onChange) || l2.call(t2, this, e3);
|
|
119
|
+
}, this.maybeNotify = ue(() => (this.calculateRange(), [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null]), (e3) => {
|
|
120
|
+
this.notify(e3);
|
|
121
|
+
}, { key: "production" !== process.env.NODE_ENV && "maybeNotify", debug: () => this.options.debug, initialDeps: [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null] }), this.cleanup = () => {
|
|
122
|
+
this.unsubs.filter(Boolean).forEach((e3) => e3()), this.unsubs = [], this.scrollElement = null;
|
|
123
|
+
}, this._didMount = () => (this.measureElementCache.forEach(this.observer.observe), () => {
|
|
124
|
+
this.observer.disconnect(), this.cleanup();
|
|
125
|
+
}), this._willUpdate = () => {
|
|
126
|
+
const e3 = this.options.getScrollElement();
|
|
127
|
+
this.scrollElement !== e3 && (this.cleanup(), this.scrollElement = e3, this._scrollToOffset(this.scrollOffset, { adjustments: void 0, behavior: void 0 }), this.unsubs.push(this.options.observeElementRect(this, (e4) => {
|
|
128
|
+
this.scrollRect = e4, this.maybeNotify();
|
|
129
|
+
})), this.unsubs.push(this.options.observeElementOffset(this, (e4) => {
|
|
130
|
+
this.scrollAdjustments = 0, this.scrollOffset !== e4 && (null !== this.isScrollingTimeoutId && (clearTimeout(this.isScrollingTimeoutId), this.isScrollingTimeoutId = null), this.isScrolling = true, this.scrollDirection = this.scrollOffset < e4 ? "forward" : "backward", this.scrollOffset = e4, this.maybeNotify(), this.isScrollingTimeoutId = setTimeout(() => {
|
|
131
|
+
this.isScrollingTimeoutId = null, this.isScrolling = false, this.scrollDirection = null, this.maybeNotify();
|
|
132
|
+
}, this.options.scrollingDelay));
|
|
133
|
+
})));
|
|
134
|
+
}, this.getSize = () => this.scrollRect[this.options.horizontal ? "width" : "height"], this.memoOptions = ue(() => [this.options.count, this.options.paddingStart, this.options.scrollMargin, this.options.getItemKey], (e3, t2, l2, n2) => (this.pendingMeasuredCacheIndexes = [], { count: e3, paddingStart: t2, scrollMargin: l2, getItemKey: n2 }), { key: false }), this.getFurthestMeasurement = (e3, t2) => {
|
|
135
|
+
const l2 = /* @__PURE__ */ new Map(), n2 = /* @__PURE__ */ new Map();
|
|
136
|
+
for (let a2 = t2 - 1; a2 >= 0; a2--) {
|
|
137
|
+
const t3 = e3[a2];
|
|
138
|
+
if (l2.has(t3.lane))
|
|
139
|
+
continue;
|
|
140
|
+
const o2 = n2.get(t3.lane);
|
|
141
|
+
if (null == o2 || t3.end > o2.end ? n2.set(t3.lane, t3) : t3.end < o2.end && l2.set(t3.lane, true), l2.size === this.options.lanes)
|
|
165
142
|
break;
|
|
166
143
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
n2.pendingMeasuredCacheIndexes = [];
|
|
176
|
-
for (var s2 = n2.measurementsCache.slice(0, i2), u2 = i2; u2 < l3; u2++) {
|
|
177
|
-
var d2 = r2(u2), c2 = 1 === n2.options.lanes ? s2[u2 - 1] : n2.getFurthestMeasurement(s2, u2), p2 = c2 ? c2.end : a2 + o2, g2 = t3.get(d2), f2 = "number" == typeof g2 ? g2 : n2.options.estimateSize(u2), m2 = p2 + f2, v2 = c2 ? c2.lane : u2 % n2.options.lanes;
|
|
178
|
-
s2[u2] = { index: u2, start: p2, size: f2, end: m2, key: d2, lane: v2 };
|
|
179
|
-
}
|
|
180
|
-
return n2.measurementsCache = s2, s2;
|
|
181
|
-
}, { key: "production" !== process.env.NODE_ENV && "getMeasurements", debug: function() {
|
|
182
|
-
return n2.options.debug;
|
|
183
|
-
} }), this.calculateRange = ce(function() {
|
|
184
|
-
return [n2.getMeasurements(), n2.getSize(), n2.scrollOffset];
|
|
185
|
-
}, function(e3, t3, l3) {
|
|
186
|
-
return n2.range = e3.length > 0 && t3 > 0 ? function(e4) {
|
|
187
|
-
var t4 = e4.measurements, l4 = e4.outerSize, n3 = e4.scrollOffset, a2 = t4.length - 1, o2 = function(e5) {
|
|
188
|
-
return t4[e5].start;
|
|
189
|
-
}, r2 = xe(0, a2, o2, n3), i2 = r2;
|
|
190
|
-
for (; i2 < a2 && t4[i2].end < n3 + l4; )
|
|
191
|
-
i2++;
|
|
192
|
-
return { startIndex: r2, endIndex: i2 };
|
|
193
|
-
}({ measurements: e3, outerSize: t3, scrollOffset: l3 }) : null;
|
|
194
|
-
}, { key: "production" !== process.env.NODE_ENV && "calculateRange", debug: function() {
|
|
195
|
-
return n2.options.debug;
|
|
196
|
-
} }), this.getIndexes = ce(function() {
|
|
197
|
-
return [n2.options.rangeExtractor, n2.calculateRange(), n2.options.overscan, n2.options.count];
|
|
198
|
-
}, function(e3, t3, l3, n3) {
|
|
199
|
-
return null === t3 ? [] : e3(de({}, t3, { overscan: l3, count: n3 }));
|
|
200
|
-
}, { key: "production" !== process.env.NODE_ENV && "getIndexes", debug: function() {
|
|
201
|
-
return n2.options.debug;
|
|
202
|
-
} }), this.indexFromElement = function(e3) {
|
|
203
|
-
var t3 = n2.options.indexAttribute, l3 = e3.getAttribute(t3);
|
|
204
|
-
return l3 ? parseInt(l3, 10) : (console.warn("Missing attribute name '" + t3 + "={index}' on measured element."), -1);
|
|
205
|
-
}, this._measureElement = function(e3, t3) {
|
|
206
|
-
var l3 = n2.measurementsCache[n2.indexFromElement(e3)];
|
|
207
|
-
if (l3 && e3.isConnected) {
|
|
208
|
-
var a2 = n2.measureElementCache.get(l3.key);
|
|
209
|
-
a2 !== e3 && (a2 && n2.observer.unobserve(a2), n2.observer.observe(e3), n2.measureElementCache.set(l3.key, e3));
|
|
210
|
-
var o2 = n2.options.measureElement(e3, t3, n2);
|
|
211
|
-
n2.resizeItem(l3, o2);
|
|
212
|
-
} else
|
|
213
|
-
n2.measureElementCache.forEach(function(t4, l4) {
|
|
214
|
-
t4 === e3 && (n2.observer.unobserve(e3), n2.measureElementCache.delete(l4));
|
|
215
|
-
});
|
|
216
|
-
}, this.resizeItem = function(e3, t3) {
|
|
217
|
-
var l3, a2 = t3 - (null != (l3 = n2.itemSizeCache.get(e3.key)) ? l3 : e3.size);
|
|
218
|
-
0 !== a2 && (e3.start < n2.scrollOffset && ("production" !== process.env.NODE_ENV && n2.options.debug && console.info("correction", a2), n2._scrollToOffset(n2.scrollOffset, { adjustments: n2.scrollAdjustments += a2, behavior: void 0 })), n2.pendingMeasuredCacheIndexes.push(e3.index), n2.itemSizeCache = new Map(n2.itemSizeCache.set(e3.key, t3)), n2.notify(false));
|
|
219
|
-
}, this.measureElement = function(e3) {
|
|
220
|
-
e3 && n2._measureElement(e3, void 0);
|
|
221
|
-
}, this.getVirtualItems = ce(function() {
|
|
222
|
-
return [n2.getIndexes(), n2.getMeasurements()];
|
|
223
|
-
}, function(e3, t3) {
|
|
224
|
-
for (var l3 = [], n3 = 0, a2 = e3.length; n3 < a2; n3++) {
|
|
225
|
-
var o2 = t3[e3[n3]];
|
|
226
|
-
l3.push(o2);
|
|
227
|
-
}
|
|
228
|
-
return l3;
|
|
229
|
-
}, { key: "production" !== process.env.NODE_ENV && "getIndexes", debug: function() {
|
|
230
|
-
return n2.options.debug;
|
|
231
|
-
} }), this.getVirtualItemForOffset = function(e3) {
|
|
232
|
-
var t3 = n2.getMeasurements();
|
|
233
|
-
return pe(t3[xe(0, t3.length - 1, function(e4) {
|
|
234
|
-
return pe(t3[e4]).start;
|
|
235
|
-
}, e3)]);
|
|
236
|
-
}, this.getOffsetForAlignment = function(e3, t3) {
|
|
237
|
-
var l3 = n2.getSize();
|
|
238
|
-
"auto" === t3 && (t3 = e3 <= n2.scrollOffset ? "start" : e3 >= n2.scrollOffset + l3 ? "end" : "start"), "start" === t3 || ("end" === t3 ? e3 -= l3 : "center" === t3 && (e3 -= l3 / 2));
|
|
239
|
-
var a2 = n2.options.horizontal ? "scrollWidth" : "scrollHeight", o2 = (n2.scrollElement ? "document" in n2.scrollElement ? n2.scrollElement.document.documentElement[a2] : n2.scrollElement[a2] : 0) - n2.getSize();
|
|
240
|
-
return Math.max(Math.min(o2, e3), 0);
|
|
241
|
-
}, this.getOffsetForIndex = function(e3, t3) {
|
|
242
|
-
void 0 === t3 && (t3 = "auto"), e3 = Math.max(0, Math.min(e3, n2.options.count - 1));
|
|
243
|
-
var l3 = pe(n2.getMeasurements()[e3]);
|
|
244
|
-
if ("auto" === t3)
|
|
245
|
-
if (l3.end >= n2.scrollOffset + n2.getSize() - n2.options.scrollPaddingEnd)
|
|
246
|
-
t3 = "end";
|
|
247
|
-
else {
|
|
248
|
-
if (!(l3.start <= n2.scrollOffset + n2.options.scrollPaddingStart))
|
|
249
|
-
return [n2.scrollOffset, t3];
|
|
250
|
-
t3 = "start";
|
|
144
|
+
return n2.size === this.options.lanes ? Array.from(n2.values()).sort((e4, t3) => e4.end === t3.end ? e4.index - t3.index : e4.end - t3.end)[0] : void 0;
|
|
145
|
+
}, this.getMeasurements = ue(() => [this.memoOptions(), this.itemSizeCache], ({ count: e3, paddingStart: t2, scrollMargin: l2, getItemKey: n2 }, a2) => {
|
|
146
|
+
const o2 = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
147
|
+
this.pendingMeasuredCacheIndexes = [];
|
|
148
|
+
const r2 = this.measurementsCache.slice(0, o2);
|
|
149
|
+
for (let i2 = o2; i2 < e3; i2++) {
|
|
150
|
+
const e4 = n2(i2), o3 = 1 === this.options.lanes ? r2[i2 - 1] : this.getFurthestMeasurement(r2, i2), s2 = o3 ? o3.end : t2 + l2, u2 = a2.get(e4), d2 = "number" == typeof u2 ? u2 : this.options.estimateSize(i2), c2 = s2 + d2, p2 = o3 ? o3.lane : i2 % this.options.lanes;
|
|
151
|
+
r2[i2] = { index: i2, start: s2, size: d2, end: c2, key: e4, lane: p2 };
|
|
251
152
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
},
|
|
153
|
+
return this.measurementsCache = r2, r2;
|
|
154
|
+
}, { key: "production" !== process.env.NODE_ENV && "getMeasurements", debug: () => this.options.debug }), this.calculateRange = ue(() => [this.getMeasurements(), this.getSize(), this.scrollOffset], (e3, t2, l2) => this.range = e3.length > 0 && t2 > 0 ? function({ measurements: e4, outerSize: t3, scrollOffset: l3 }) {
|
|
155
|
+
const n2 = e4.length - 1, a2 = (t4) => e4[t4].start, o2 = ye(0, n2, a2, l3);
|
|
156
|
+
let r2 = o2;
|
|
157
|
+
for (; r2 < n2 && e4[r2].end < l3 + t3; )
|
|
158
|
+
r2++;
|
|
159
|
+
return { startIndex: o2, endIndex: r2 };
|
|
160
|
+
}({ measurements: e3, outerSize: t2, scrollOffset: l2 }) : null, { key: "production" !== process.env.NODE_ENV && "calculateRange", debug: () => this.options.debug }), this.getIndexes = ue(() => [this.options.rangeExtractor, this.calculateRange(), this.options.overscan, this.options.count], (e3, t2, l2, n2) => null === t2 ? [] : e3({ ...t2, overscan: l2, count: n2 }), { key: "production" !== process.env.NODE_ENV && "getIndexes", debug: () => this.options.debug }), this.indexFromElement = (e3) => {
|
|
161
|
+
const t2 = this.options.indexAttribute, l2 = e3.getAttribute(t2);
|
|
162
|
+
return l2 ? parseInt(l2, 10) : (console.warn(`Missing attribute name '${t2}={index}' on measured element.`), -1);
|
|
163
|
+
}, this._measureElement = (e3, t2) => {
|
|
164
|
+
const l2 = this.measurementsCache[this.indexFromElement(e3)];
|
|
165
|
+
if (!l2 || !e3.isConnected)
|
|
166
|
+
return void this.measureElementCache.forEach((t3, l3) => {
|
|
167
|
+
t3 === e3 && (this.observer.unobserve(e3), this.measureElementCache.delete(l3));
|
|
168
|
+
});
|
|
169
|
+
const n2 = this.measureElementCache.get(l2.key);
|
|
170
|
+
n2 !== e3 && (n2 && this.observer.unobserve(n2), this.observer.observe(e3), this.measureElementCache.set(l2.key, e3));
|
|
171
|
+
const a2 = this.options.measureElement(e3, t2, this);
|
|
172
|
+
this.resizeItem(l2, a2);
|
|
173
|
+
}, this.resizeItem = (e3, t2) => {
|
|
174
|
+
const l2 = t2 - (this.itemSizeCache.get(e3.key) ?? e3.size);
|
|
175
|
+
0 !== l2 && (e3.start < this.scrollOffset + this.scrollAdjustments && ("production" !== process.env.NODE_ENV && this.options.debug && console.info("correction", l2), this._scrollToOffset(this.scrollOffset, { adjustments: this.scrollAdjustments += l2, behavior: void 0 })), this.pendingMeasuredCacheIndexes.push(e3.index), this.itemSizeCache = new Map(this.itemSizeCache.set(e3.key, t2)), this.notify(false));
|
|
176
|
+
}, this.measureElement = (e3) => {
|
|
177
|
+
e3 && this._measureElement(e3, void 0);
|
|
178
|
+
}, this.getVirtualItems = ue(() => [this.getIndexes(), this.getMeasurements()], (e3, t2) => {
|
|
179
|
+
const l2 = [];
|
|
180
|
+
for (let n2 = 0, a2 = e3.length; n2 < a2; n2++) {
|
|
181
|
+
const a3 = t2[e3[n2]];
|
|
182
|
+
l2.push(a3);
|
|
183
|
+
}
|
|
184
|
+
return l2;
|
|
185
|
+
}, { key: "production" !== process.env.NODE_ENV && "getIndexes", debug: () => this.options.debug }), this.getVirtualItemForOffset = (e3) => {
|
|
186
|
+
const t2 = this.getMeasurements();
|
|
187
|
+
return de(t2[ye(0, t2.length - 1, (e4) => de(t2[e4]).start, e3)]);
|
|
188
|
+
}, this.getOffsetForAlignment = (e3, t2) => {
|
|
189
|
+
const l2 = this.getSize();
|
|
190
|
+
"auto" === t2 && (t2 = e3 <= this.scrollOffset ? "start" : e3 >= this.scrollOffset + l2 ? "end" : "start"), "start" === t2 || ("end" === t2 ? e3 -= l2 : "center" === t2 && (e3 -= l2 / 2));
|
|
191
|
+
const n2 = this.options.horizontal ? "scrollWidth" : "scrollHeight", a2 = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[n2] : this.scrollElement[n2] : 0) - this.getSize();
|
|
192
|
+
return Math.max(Math.min(a2, e3), 0);
|
|
193
|
+
}, this.getOffsetForIndex = (e3, t2 = "auto") => {
|
|
194
|
+
e3 = Math.max(0, Math.min(e3, this.options.count - 1));
|
|
195
|
+
const l2 = de(this.getMeasurements()[e3]);
|
|
196
|
+
if ("auto" === t2)
|
|
197
|
+
if (l2.end >= this.scrollOffset + this.getSize() - this.options.scrollPaddingEnd)
|
|
198
|
+
t2 = "end";
|
|
199
|
+
else {
|
|
200
|
+
if (!(l2.start <= this.scrollOffset + this.options.scrollPaddingStart))
|
|
201
|
+
return [this.scrollOffset, t2];
|
|
202
|
+
t2 = "start";
|
|
203
|
+
}
|
|
204
|
+
const n2 = "end" === t2 ? l2.end + this.options.scrollPaddingEnd : l2.start - this.options.scrollPaddingStart;
|
|
205
|
+
return [this.getOffsetForAlignment(n2, t2), t2];
|
|
206
|
+
}, this.isDynamicMode = () => this.measureElementCache.size > 0, this.cancelScrollToIndex = () => {
|
|
207
|
+
null !== this.scrollToIndexTimeoutId && (clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
208
|
+
}, this.scrollToOffset = (e3, { align: t2 = "start", behavior: l2 } = {}) => {
|
|
209
|
+
this.cancelScrollToIndex(), "smooth" === l2 && this.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), this._scrollToOffset(this.getOffsetForAlignment(e3, t2), { adjustments: void 0, behavior: l2 });
|
|
210
|
+
}, this.scrollToIndex = (e3, { align: t2 = "auto", behavior: l2 } = {}) => {
|
|
211
|
+
e3 = Math.max(0, Math.min(e3, this.options.count - 1)), this.cancelScrollToIndex(), "smooth" === l2 && this.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");
|
|
212
|
+
const [n2, a2] = this.getOffsetForIndex(e3, t2);
|
|
213
|
+
this._scrollToOffset(n2, { adjustments: void 0, behavior: l2 }), "smooth" !== l2 && this.isDynamicMode() && (this.scrollToIndexTimeoutId = setTimeout(() => {
|
|
214
|
+
this.scrollToIndexTimeoutId = null;
|
|
215
|
+
if (this.measureElementCache.has(this.options.getItemKey(e3))) {
|
|
216
|
+
const [t3] = this.getOffsetForIndex(e3, a2);
|
|
217
|
+
((e4, t4) => Math.abs(e4 - t4) < 1)(t3, this.scrollOffset) || this.scrollToIndex(e3, { align: a2, behavior: l2 });
|
|
218
|
+
} else
|
|
219
|
+
this.scrollToIndex(e3, { align: a2, behavior: l2 });
|
|
220
|
+
}));
|
|
221
|
+
}, this.scrollBy = (e3, { behavior: t2 } = {}) => {
|
|
222
|
+
this.cancelScrollToIndex(), "smooth" === t2 && this.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), this._scrollToOffset(this.scrollOffset + e3, { adjustments: void 0, behavior: t2 });
|
|
223
|
+
}, this.getTotalSize = () => {
|
|
224
|
+
var e3;
|
|
225
|
+
const t2 = this.getMeasurements();
|
|
226
|
+
let l2;
|
|
227
|
+
return l2 = 0 === t2.length ? this.options.paddingStart : 1 === this.options.lanes ? (null == (e3 = t2[t2.length - 1]) ? void 0 : e3.end) ?? 0 : Math.max(...t2.slice(-this.options.lanes).map((e4) => e4.end)), l2 - this.options.scrollMargin + this.options.paddingEnd;
|
|
228
|
+
}, this._scrollToOffset = (e3, { adjustments: t2, behavior: l2 }) => {
|
|
229
|
+
this.options.scrollToFn(e3, { behavior: l2, adjustments: t2 }, this);
|
|
230
|
+
}, this.measure = () => {
|
|
231
|
+
this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(false);
|
|
232
|
+
}, this.setOptions(e2), this.scrollRect = this.options.initialRect, this.scrollOffset = this.options.initialOffset, this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((e3) => {
|
|
233
|
+
this.itemSizeCache.set(e3.key, e3.size);
|
|
234
|
+
}), this.maybeNotify();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const ye = (e2, t2, l2, n2) => {
|
|
285
238
|
for (; e2 <= t2; ) {
|
|
286
|
-
|
|
239
|
+
const a2 = (e2 + t2) / 2 | 0, o2 = l2(a2);
|
|
287
240
|
if (o2 < n2)
|
|
288
241
|
e2 = a2 + 1;
|
|
289
242
|
else {
|
|
@@ -294,55 +247,50 @@ var ge = function(e2) {
|
|
|
294
247
|
}
|
|
295
248
|
return e2 > 0 ? e2 - 1 : 0;
|
|
296
249
|
};
|
|
297
|
-
function
|
|
250
|
+
function be(e2) {
|
|
298
251
|
return function(e3) {
|
|
299
|
-
|
|
300
|
-
return p(
|
|
301
|
-
return d(e3).getScrollElement();
|
|
302
|
-
}, function(e4) {
|
|
252
|
+
const t2 = new he(d(e3)), l2 = c(t2), n2 = t2._didMount();
|
|
253
|
+
return p(() => d(e3).getScrollElement(), (e4) => {
|
|
303
254
|
e4 && t2._willUpdate();
|
|
304
|
-
}, { immediate: true }), p(
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}));
|
|
314
|
-
}
|
|
315
|
-
function ke(e2, t2, l2) {
|
|
255
|
+
}, { immediate: true }), p(() => d(e3), (e4) => {
|
|
256
|
+
t2.setOptions({ ...e4, onChange: (t3, n3) => {
|
|
257
|
+
var a2;
|
|
258
|
+
g(l2), null == (a2 = e4.onChange) || a2.call(e4, t3, n3);
|
|
259
|
+
} }), t2._willUpdate(), g(l2);
|
|
260
|
+
}, { immediate: true }), m(n2), l2;
|
|
261
|
+
}(u(() => ({ observeElementRect: ge, observeElementOffset: me, scrollToFn: ve, ...d(e2) })));
|
|
262
|
+
}
|
|
263
|
+
function xe(e2, t2, l2) {
|
|
316
264
|
let n2 = s(null == l2 ? void 0 : l2.value), a2 = u(() => void 0 !== e2.value);
|
|
317
265
|
return [u(() => a2.value ? e2.value : n2.value), function(e3) {
|
|
318
266
|
return a2.value || (n2.value = e3), null == t2 ? void 0 : t2(e3);
|
|
319
267
|
}];
|
|
320
268
|
}
|
|
321
|
-
let
|
|
322
|
-
function
|
|
323
|
-
return ++
|
|
269
|
+
let we = Symbol("headlessui.useid"), ke = 0;
|
|
270
|
+
function Se() {
|
|
271
|
+
return f(we, () => "" + ++ke)();
|
|
324
272
|
}
|
|
325
|
-
function
|
|
273
|
+
function Ce(e2) {
|
|
326
274
|
var t2;
|
|
327
275
|
if (null == e2 || null == e2.value)
|
|
328
276
|
return null;
|
|
329
277
|
let l2 = null != (t2 = e2.value.$el) ? t2 : e2.value;
|
|
330
278
|
return l2 instanceof Node ? l2 : null;
|
|
331
279
|
}
|
|
332
|
-
function
|
|
280
|
+
function Oe(e2, t2, ...l2) {
|
|
333
281
|
if (e2 in t2) {
|
|
334
282
|
let n3 = t2[e2];
|
|
335
283
|
return "function" == typeof n3 ? n3(...l2) : n3;
|
|
336
284
|
}
|
|
337
285
|
let n2 = new Error(`Tried to handle "${e2}" but there is no handler defined. Only defined handlers are: ${Object.keys(t2).map((e3) => `"${e3}"`).join(", ")}.`);
|
|
338
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n2,
|
|
286
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n2, Oe), n2;
|
|
339
287
|
}
|
|
340
|
-
var
|
|
341
|
-
t3 in e3 ?
|
|
288
|
+
var Me = Object.defineProperty, Te = (e2, t2, l2) => (((e3, t3, l3) => {
|
|
289
|
+
t3 in e3 ? Me(e3, t3, { enumerable: true, configurable: true, writable: true, value: l3 }) : e3[t3] = l3;
|
|
342
290
|
})(e2, "symbol" != typeof t2 ? t2 + "" : t2, l2), l2);
|
|
343
|
-
let
|
|
291
|
+
let De = new class {
|
|
344
292
|
constructor() {
|
|
345
|
-
|
|
293
|
+
Te(this, "current", this.detect()), Te(this, "currentId", 0);
|
|
346
294
|
}
|
|
347
295
|
set(e2) {
|
|
348
296
|
this.current !== e2 && (this.currentId = 0, this.current = e2);
|
|
@@ -363,44 +311,44 @@ let Ee = new class {
|
|
|
363
311
|
return "undefined" == typeof window || "undefined" == typeof document ? "server" : "client";
|
|
364
312
|
}
|
|
365
313
|
}();
|
|
366
|
-
function
|
|
367
|
-
if (
|
|
314
|
+
function Ee(e2) {
|
|
315
|
+
if (De.isServer)
|
|
368
316
|
return null;
|
|
369
317
|
if (e2 instanceof Node)
|
|
370
318
|
return e2.ownerDocument;
|
|
371
319
|
if (null != e2 && e2.hasOwnProperty("value")) {
|
|
372
|
-
let t2 =
|
|
320
|
+
let t2 = Ce(e2);
|
|
373
321
|
if (t2)
|
|
374
322
|
return t2.ownerDocument;
|
|
375
323
|
}
|
|
376
324
|
return document;
|
|
377
325
|
}
|
|
378
|
-
let
|
|
379
|
-
var
|
|
380
|
-
function
|
|
381
|
-
return null == e2 ? [] : Array.from(e2.querySelectorAll(
|
|
326
|
+
let Ie = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e2) => `${e2}:not([tabindex='-1'])`).join(",");
|
|
327
|
+
var _e = ((e2) => (e2[e2.First = 1] = "First", e2[e2.Previous = 2] = "Previous", e2[e2.Next = 4] = "Next", e2[e2.Last = 8] = "Last", e2[e2.WrapAround = 16] = "WrapAround", e2[e2.NoScroll = 32] = "NoScroll", e2))(_e || {}), Pe = ((e2) => (e2[e2.Error = 0] = "Error", e2[e2.Overflow = 1] = "Overflow", e2[e2.Success = 2] = "Success", e2[e2.Underflow = 3] = "Underflow", e2))(Pe || {}), je = ((e2) => (e2[e2.Previous = -1] = "Previous", e2[e2.Next = 1] = "Next", e2))(je || {});
|
|
328
|
+
function Re(e2 = document.body) {
|
|
329
|
+
return null == e2 ? [] : Array.from(e2.querySelectorAll(Ie)).sort((e3, t2) => Math.sign((e3.tabIndex || Number.MAX_SAFE_INTEGER) - (t2.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
382
330
|
}
|
|
383
|
-
var
|
|
384
|
-
function
|
|
331
|
+
var Be = ((e2) => (e2[e2.Strict = 0] = "Strict", e2[e2.Loose = 1] = "Loose", e2))(Be || {});
|
|
332
|
+
function Ae(e2, t2 = 0) {
|
|
385
333
|
var l2;
|
|
386
|
-
return e2 !== (null == (l2 =
|
|
334
|
+
return e2 !== (null == (l2 = Ee(e2)) ? void 0 : l2.body) && Oe(t2, { 0: () => e2.matches(Ie), 1() {
|
|
387
335
|
let t3 = e2;
|
|
388
336
|
for (; null !== t3; ) {
|
|
389
|
-
if (t3.matches(
|
|
337
|
+
if (t3.matches(Ie))
|
|
390
338
|
return true;
|
|
391
339
|
t3 = t3.parentElement;
|
|
392
340
|
}
|
|
393
341
|
return false;
|
|
394
342
|
} });
|
|
395
343
|
}
|
|
396
|
-
function
|
|
397
|
-
let t2 =
|
|
398
|
-
|
|
399
|
-
t2 && !
|
|
344
|
+
function Le(e2) {
|
|
345
|
+
let t2 = Ee(e2);
|
|
346
|
+
v(() => {
|
|
347
|
+
t2 && !Ae(t2.activeElement, 0) && Ne(e2);
|
|
400
348
|
});
|
|
401
349
|
}
|
|
402
|
-
var
|
|
403
|
-
function
|
|
350
|
+
var Fe = ((e2) => (e2[e2.Keyboard = 0] = "Keyboard", e2[e2.Mouse = 1] = "Mouse", e2))(Fe || {});
|
|
351
|
+
function Ne(e2) {
|
|
404
352
|
null == e2 || e2.focus({ preventScroll: true });
|
|
405
353
|
}
|
|
406
354
|
"undefined" != typeof window && "undefined" != typeof document && (document.addEventListener("keydown", (e2) => {
|
|
@@ -408,8 +356,8 @@ function ze(e2) {
|
|
|
408
356
|
}, true), document.addEventListener("click", (e2) => {
|
|
409
357
|
1 === e2.detail ? delete document.documentElement.dataset.headlessuiFocusVisible : 0 === e2.detail && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
410
358
|
}, true));
|
|
411
|
-
let
|
|
412
|
-
function
|
|
359
|
+
let ze = ["textarea", "input"].join(",");
|
|
360
|
+
function $e(e2, t2 = (e3) => e3) {
|
|
413
361
|
return e2.slice().sort((e3, l2) => {
|
|
414
362
|
let n2 = t2(e3), a2 = t2(l2);
|
|
415
363
|
if (null === n2 || null === a2)
|
|
@@ -418,9 +366,9 @@ function He(e2, t2 = (e3) => e3) {
|
|
|
418
366
|
return o2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
419
367
|
});
|
|
420
368
|
}
|
|
421
|
-
function
|
|
369
|
+
function He(e2, t2, { sorted: l2 = true, relativeTo: n2 = null, skipElements: a2 = [] } = {}) {
|
|
422
370
|
var o2;
|
|
423
|
-
let r2 = null != (o2 = Array.isArray(e2) ? e2.length > 0 ? e2[0].ownerDocument : document : null == e2 ? void 0 : e2.ownerDocument) ? o2 : document, i2 = Array.isArray(e2) ? l2 ?
|
|
371
|
+
let r2 = null != (o2 = Array.isArray(e2) ? e2.length > 0 ? e2[0].ownerDocument : document : null == e2 ? void 0 : e2.ownerDocument) ? o2 : document, i2 = Array.isArray(e2) ? l2 ? $e(e2) : e2 : Re(e2);
|
|
424
372
|
a2.length > 0 && i2.length > 1 && (i2 = i2.filter((e3) => !a2.includes(e3))), n2 = null != n2 ? n2 : r2.activeElement;
|
|
425
373
|
let s2, u2 = (() => {
|
|
426
374
|
if (5 & t2)
|
|
@@ -455,26 +403,26 @@ function Ve(e2, t2, { sorted: l2 = true, relativeTo: n2 = null, skipElements: a2
|
|
|
455
403
|
} while (s2 !== r2.activeElement);
|
|
456
404
|
return 6 & t2 && function(e3) {
|
|
457
405
|
var t3, l3;
|
|
458
|
-
return null != (l3 = null == (t3 = null == e3 ? void 0 : e3.matches) ? void 0 : t3.call(e3,
|
|
406
|
+
return null != (l3 = null == (t3 = null == e3 ? void 0 : e3.matches) ? void 0 : t3.call(e3, ze)) && l3;
|
|
459
407
|
}(s2) && s2.select(), 2;
|
|
460
408
|
}
|
|
461
|
-
function
|
|
409
|
+
function Ve() {
|
|
462
410
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
463
411
|
}
|
|
464
|
-
function
|
|
465
|
-
return
|
|
412
|
+
function Ye() {
|
|
413
|
+
return Ve() || /Android/gi.test(window.navigator.userAgent);
|
|
466
414
|
}
|
|
467
|
-
function
|
|
468
|
-
|
|
415
|
+
function Ue(e2, t2, l2) {
|
|
416
|
+
De.isServer || h((n2) => {
|
|
469
417
|
document.addEventListener(e2, t2, l2), n2(() => document.removeEventListener(e2, t2, l2));
|
|
470
418
|
});
|
|
471
419
|
}
|
|
472
|
-
function
|
|
473
|
-
|
|
420
|
+
function qe(e2, t2, l2) {
|
|
421
|
+
De.isServer || h((n2) => {
|
|
474
422
|
window.addEventListener(e2, t2, l2), n2(() => window.removeEventListener(e2, t2, l2));
|
|
475
423
|
});
|
|
476
424
|
}
|
|
477
|
-
function
|
|
425
|
+
function We(e2, t2, l2 = u(() => true)) {
|
|
478
426
|
function n2(n3, a3) {
|
|
479
427
|
if (!l2.value || n3.defaultPrevented)
|
|
480
428
|
return;
|
|
@@ -487,56 +435,56 @@ function Ke(e2, t2, l2 = u(() => true)) {
|
|
|
487
435
|
for (let e3 of r2) {
|
|
488
436
|
if (null === e3)
|
|
489
437
|
continue;
|
|
490
|
-
let t3 = e3 instanceof HTMLElement ? e3 :
|
|
438
|
+
let t3 = e3 instanceof HTMLElement ? e3 : Ce(e3);
|
|
491
439
|
if (null != t3 && t3.contains(o2) || n3.composed && n3.composedPath().includes(t3))
|
|
492
440
|
return;
|
|
493
441
|
}
|
|
494
|
-
return !
|
|
442
|
+
return !Ae(o2, Be.Loose) && -1 !== o2.tabIndex && n3.preventDefault(), t2(n3, o2);
|
|
495
443
|
}
|
|
496
444
|
let a2 = s(null);
|
|
497
|
-
|
|
445
|
+
Ue("pointerdown", (e3) => {
|
|
498
446
|
var t3, n3;
|
|
499
447
|
l2.value && (a2.value = (null == (n3 = null == (t3 = e3.composedPath) ? void 0 : t3.call(e3)) ? void 0 : n3[0]) || e3.target);
|
|
500
|
-
}, true),
|
|
448
|
+
}, true), Ue("mousedown", (e3) => {
|
|
501
449
|
var t3, n3;
|
|
502
450
|
l2.value && (a2.value = (null == (n3 = null == (t3 = e3.composedPath) ? void 0 : t3.call(e3)) ? void 0 : n3[0]) || e3.target);
|
|
503
|
-
}, true),
|
|
504
|
-
|
|
505
|
-
}, true),
|
|
451
|
+
}, true), Ue("click", (e3) => {
|
|
452
|
+
Ye() || a2.value && (n2(e3, () => a2.value), a2.value = null);
|
|
453
|
+
}, true), Ue("touchend", (e3) => n2(e3, () => e3.target instanceof HTMLElement ? e3.target : null), true), qe("blur", (e3) => n2(e3, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), true);
|
|
506
454
|
}
|
|
507
|
-
function
|
|
455
|
+
function Ke(e2, t2) {
|
|
508
456
|
if (e2)
|
|
509
457
|
return e2;
|
|
510
458
|
let l2 = null != t2 ? t2 : "button";
|
|
511
459
|
return "string" == typeof l2 && "button" === l2.toLowerCase() ? "button" : void 0;
|
|
512
460
|
}
|
|
513
|
-
function
|
|
514
|
-
let l2 = s(
|
|
461
|
+
function Je(e2, t2) {
|
|
462
|
+
let l2 = s(Ke(e2.value.type, e2.value.as));
|
|
515
463
|
return y(() => {
|
|
516
|
-
l2.value =
|
|
517
|
-
}),
|
|
464
|
+
l2.value = Ke(e2.value.type, e2.value.as);
|
|
465
|
+
}), h(() => {
|
|
518
466
|
var e3;
|
|
519
|
-
l2.value ||
|
|
467
|
+
l2.value || Ce(t2) && Ce(t2) instanceof HTMLButtonElement && (null == (e3 = Ce(t2)) || !e3.hasAttribute("type")) && (l2.value = "button");
|
|
520
468
|
}), l2;
|
|
521
469
|
}
|
|
522
|
-
function
|
|
470
|
+
function Ge(e2) {
|
|
523
471
|
return [e2.screenX, e2.screenY];
|
|
524
472
|
}
|
|
525
|
-
function
|
|
473
|
+
function Ze() {
|
|
526
474
|
let e2 = s([-1, -1]);
|
|
527
475
|
return { wasMoved(t2) {
|
|
528
|
-
let l2 =
|
|
476
|
+
let l2 = Ge(t2);
|
|
529
477
|
return (e2.value[0] !== l2[0] || e2.value[1] !== l2[1]) && (e2.value = l2, true);
|
|
530
478
|
}, update(t2) {
|
|
531
|
-
e2.value =
|
|
479
|
+
e2.value = Ge(t2);
|
|
532
480
|
} };
|
|
533
481
|
}
|
|
534
|
-
function
|
|
535
|
-
|
|
482
|
+
function Xe({ container: e2, accept: t2, walk: l2, enabled: n2 }) {
|
|
483
|
+
h(() => {
|
|
536
484
|
let a2 = e2.value;
|
|
537
485
|
if (!a2 || void 0 !== n2 && !n2.value)
|
|
538
486
|
return;
|
|
539
|
-
let o2 =
|
|
487
|
+
let o2 = Ee(e2);
|
|
540
488
|
if (!o2)
|
|
541
489
|
return;
|
|
542
490
|
let r2 = Object.assign((e3) => t2(e3), { acceptNode: t2 }), i2 = o2.createTreeWalker(a2, NodeFilter.SHOW_ELEMENT, r2, false);
|
|
@@ -544,20 +492,20 @@ function Qe({ container: e2, accept: t2, walk: l2, enabled: n2 }) {
|
|
|
544
492
|
l2(i2.currentNode);
|
|
545
493
|
});
|
|
546
494
|
}
|
|
547
|
-
var
|
|
548
|
-
function
|
|
495
|
+
var Qe = ((e2) => (e2[e2.None = 0] = "None", e2[e2.RenderStrategy = 1] = "RenderStrategy", e2[e2.Static = 2] = "Static", e2))(Qe || {}), et = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(et || {});
|
|
496
|
+
function tt({ visible: e2 = true, features: t2 = 0, ourProps: l2, theirProps: n2, ...a2 }) {
|
|
549
497
|
var o2;
|
|
550
|
-
let r2 =
|
|
498
|
+
let r2 = at(n2, l2), i2 = Object.assign(a2, { props: r2 });
|
|
551
499
|
if (e2 || 2 & t2 && r2.static)
|
|
552
|
-
return
|
|
500
|
+
return lt(i2);
|
|
553
501
|
if (1 & t2) {
|
|
554
|
-
return
|
|
502
|
+
return Oe(null == (o2 = r2.unmount) || o2 ? 0 : 1, { 0: () => null, 1: () => lt({ ...a2, props: { ...r2, hidden: true, style: { display: "none" } } }) });
|
|
555
503
|
}
|
|
556
|
-
return
|
|
504
|
+
return lt(i2);
|
|
557
505
|
}
|
|
558
|
-
function
|
|
506
|
+
function lt({ props: e2, attrs: t2, slots: l2, slot: n2, name: a2 }) {
|
|
559
507
|
var o2, r2;
|
|
560
|
-
let { as: i2, ...s2 } =
|
|
508
|
+
let { as: i2, ...s2 } = rt(e2, ["unmount", "static"]), u2 = null == (o2 = l2.default) ? void 0 : o2.call(l2, n2), d2 = {};
|
|
561
509
|
if (n2) {
|
|
562
510
|
let e3 = false, t3 = [];
|
|
563
511
|
for (let [l3, a3] of Object.entries(n2))
|
|
@@ -565,25 +513,25 @@ function nt({ props: e2, attrs: t2, slots: l2, slot: n2, name: a2 }) {
|
|
|
565
513
|
e3 && (d2["data-headlessui-state"] = t3.join(" "));
|
|
566
514
|
}
|
|
567
515
|
if ("template" === i2) {
|
|
568
|
-
if (u2 =
|
|
516
|
+
if (u2 = nt(null != u2 ? u2 : []), Object.keys(s2).length > 0 || Object.keys(t2).length > 0) {
|
|
569
517
|
let [e3, ...l3] = null != u2 ? u2 : [];
|
|
570
518
|
if (!function(e4) {
|
|
571
519
|
return null != e4 && ("string" == typeof e4.type || "object" == typeof e4.type || "function" == typeof e4.type);
|
|
572
520
|
}(e3) || l3.length > 0)
|
|
573
521
|
throw new Error(['Passing props on "template"!', "", `The current component <${a2} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(s2).concat(Object.keys(t2)).map((e4) => e4.trim()).filter((e4, t3, l4) => l4.indexOf(e4) === t3).sort((e4, t3) => e4.localeCompare(t3)).map((e4) => ` - ${e4}`).join("\n"), "", "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((e4) => ` - ${e4}`).join("\n")].join("\n"));
|
|
574
|
-
let n3 =
|
|
522
|
+
let n3 = at(null != (r2 = e3.props) ? r2 : {}, s2, d2), o3 = b(e3, n3, true);
|
|
575
523
|
for (let e4 in n3)
|
|
576
524
|
e4.startsWith("on") && (o3.props || (o3.props = {}), o3.props[e4] = n3[e4]);
|
|
577
525
|
return o3;
|
|
578
526
|
}
|
|
579
527
|
return Array.isArray(u2) && 1 === u2.length ? u2[0] : u2;
|
|
580
528
|
}
|
|
581
|
-
return
|
|
529
|
+
return x(i2, Object.assign({}, s2, d2), { default: () => u2 });
|
|
582
530
|
}
|
|
583
|
-
function
|
|
584
|
-
return e2.flatMap((e3) => e3.type ===
|
|
531
|
+
function nt(e2) {
|
|
532
|
+
return e2.flatMap((e3) => e3.type === w ? nt(e3.children) : [e3]);
|
|
585
533
|
}
|
|
586
|
-
function
|
|
534
|
+
function at(...e2) {
|
|
587
535
|
if (0 === e2.length)
|
|
588
536
|
return {};
|
|
589
537
|
if (1 === e2.length)
|
|
@@ -605,32 +553,32 @@ function ot(...e2) {
|
|
|
605
553
|
} });
|
|
606
554
|
return t2;
|
|
607
555
|
}
|
|
608
|
-
function
|
|
556
|
+
function ot(e2) {
|
|
609
557
|
let t2 = Object.assign({}, e2);
|
|
610
558
|
for (let e3 in t2)
|
|
611
559
|
void 0 === t2[e3] && delete t2[e3];
|
|
612
560
|
return t2;
|
|
613
561
|
}
|
|
614
|
-
function
|
|
562
|
+
function rt(e2, t2 = []) {
|
|
615
563
|
let l2 = Object.assign({}, e2);
|
|
616
564
|
for (let e3 of t2)
|
|
617
565
|
e3 in l2 && delete l2[e3];
|
|
618
566
|
return l2;
|
|
619
567
|
}
|
|
620
|
-
var
|
|
621
|
-
let
|
|
568
|
+
var it = ((e2) => (e2[e2.None = 1] = "None", e2[e2.Focusable = 2] = "Focusable", e2[e2.Hidden = 4] = "Hidden", e2))(it || {});
|
|
569
|
+
let st = k({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup: (e2, { slots: t2, attrs: l2 }) => () => {
|
|
622
570
|
var n2;
|
|
623
571
|
let { features: a2, ...o2 } = e2;
|
|
624
|
-
return
|
|
625
|
-
} }),
|
|
626
|
-
var
|
|
627
|
-
function
|
|
628
|
-
return
|
|
572
|
+
return tt({ ourProps: { "aria-hidden": 2 == (2 & a2) || (null != (n2 = o2["aria-hidden"]) ? n2 : 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", ...4 == (4 & a2) && 2 != (2 & a2) && { display: "none" } } }, theirProps: o2, slot: {}, attrs: l2, slots: t2, name: "Hidden" });
|
|
573
|
+
} }), ut = Symbol("Context");
|
|
574
|
+
var dt = ((e2) => (e2[e2.Open = 1] = "Open", e2[e2.Closed = 2] = "Closed", e2[e2.Closing = 4] = "Closing", e2[e2.Opening = 8] = "Opening", e2))(dt || {});
|
|
575
|
+
function ct() {
|
|
576
|
+
return f(ut, null);
|
|
629
577
|
}
|
|
630
|
-
function
|
|
631
|
-
S(
|
|
578
|
+
function pt(e2) {
|
|
579
|
+
S(ut, e2);
|
|
632
580
|
}
|
|
633
|
-
var
|
|
581
|
+
var gt = ((e2) => (e2.Space = " ", e2.Enter = "Enter", e2.Escape = "Escape", e2.Backspace = "Backspace", e2.Delete = "Delete", e2.ArrowLeft = "ArrowLeft", e2.ArrowUp = "ArrowUp", e2.ArrowRight = "ArrowRight", e2.ArrowDown = "ArrowDown", e2.Home = "Home", e2.End = "End", e2.PageUp = "PageUp", e2.PageDown = "PageDown", e2.Tab = "Tab", e2))(gt || {});
|
|
634
582
|
let mt = [];
|
|
635
583
|
!function(e2) {
|
|
636
584
|
function t2() {
|
|
@@ -643,8 +591,8 @@ let mt = [];
|
|
|
643
591
|
}
|
|
644
592
|
window.addEventListener("click", e2, { capture: true }), window.addEventListener("mousedown", e2, { capture: true }), window.addEventListener("focus", e2, { capture: true }), document.body.addEventListener("click", e2, { capture: true }), document.body.addEventListener("mousedown", e2, { capture: true }), document.body.addEventListener("focus", e2, { capture: true });
|
|
645
593
|
});
|
|
646
|
-
var
|
|
647
|
-
function
|
|
594
|
+
var ft = ((e2) => (e2[e2.First = 0] = "First", e2[e2.Previous = 1] = "Previous", e2[e2.Next = 2] = "Next", e2[e2.Last = 3] = "Last", e2[e2.Specific = 4] = "Specific", e2[e2.Nothing = 5] = "Nothing", e2))(ft || {});
|
|
595
|
+
function vt(e2, t2) {
|
|
648
596
|
let l2 = t2.resolveItems();
|
|
649
597
|
if (l2.length <= 0)
|
|
650
598
|
return null;
|
|
@@ -684,12 +632,12 @@ function yt(e2, t2) {
|
|
|
684
632
|
}(e2);
|
|
685
633
|
}
|
|
686
634
|
}
|
|
687
|
-
function
|
|
635
|
+
function ht(e2) {
|
|
688
636
|
"function" == typeof queueMicrotask ? queueMicrotask(e2) : Promise.resolve().then(e2).catch((e3) => setTimeout(() => {
|
|
689
637
|
throw e3;
|
|
690
638
|
}));
|
|
691
639
|
}
|
|
692
|
-
function
|
|
640
|
+
function yt() {
|
|
693
641
|
let e2 = [], t2 = { addEventListener: (e3, l2, n2, a2) => (e3.addEventListener(l2, n2, a2), t2.add(() => e3.removeEventListener(l2, n2, a2))), requestAnimationFrame(...e3) {
|
|
694
642
|
let l2 = requestAnimationFrame(...e3);
|
|
695
643
|
t2.add(() => cancelAnimationFrame(l2));
|
|
@@ -702,7 +650,7 @@ function ht() {
|
|
|
702
650
|
t2.add(() => clearTimeout(l2));
|
|
703
651
|
}, microTask(...e3) {
|
|
704
652
|
let l2 = { current: true };
|
|
705
|
-
return
|
|
653
|
+
return ht(() => {
|
|
706
654
|
l2.current && e3[0]();
|
|
707
655
|
}), t2.add(() => {
|
|
708
656
|
l2.current = false;
|
|
@@ -713,7 +661,7 @@ function ht() {
|
|
|
713
661
|
Object.assign(e3.style, { [t3]: n2 });
|
|
714
662
|
});
|
|
715
663
|
}, group(e3) {
|
|
716
|
-
let t3 =
|
|
664
|
+
let t3 = yt();
|
|
717
665
|
return e3(t3), this.add(() => t3.dispose());
|
|
718
666
|
}, add: (t3) => (e2.push(t3), () => {
|
|
719
667
|
let l2 = e2.indexOf(t3);
|
|
@@ -726,60 +674,60 @@ function ht() {
|
|
|
726
674
|
} };
|
|
727
675
|
return t2;
|
|
728
676
|
}
|
|
729
|
-
function
|
|
677
|
+
function bt(e2 = {}, t2 = null, l2 = []) {
|
|
730
678
|
for (let [n2, a2] of Object.entries(e2))
|
|
731
|
-
|
|
679
|
+
wt(l2, xt(t2, n2), a2);
|
|
732
680
|
return l2;
|
|
733
681
|
}
|
|
734
|
-
function
|
|
682
|
+
function xt(e2, t2) {
|
|
735
683
|
return e2 ? e2 + "[" + t2 + "]" : t2;
|
|
736
684
|
}
|
|
737
|
-
function
|
|
685
|
+
function wt(e2, t2, l2) {
|
|
738
686
|
if (Array.isArray(l2))
|
|
739
687
|
for (let [n2, a2] of l2.entries())
|
|
740
|
-
|
|
688
|
+
wt(e2, xt(t2, n2.toString()), a2);
|
|
741
689
|
else
|
|
742
|
-
l2 instanceof Date ? e2.push([t2, l2.toISOString()]) : "boolean" == typeof l2 ? e2.push([t2, l2 ? "1" : "0"]) : "string" == typeof l2 ? e2.push([t2, l2]) : "number" == typeof l2 ? e2.push([t2, `${l2}`]) : null == l2 ? e2.push([t2, ""]) :
|
|
690
|
+
l2 instanceof Date ? e2.push([t2, l2.toISOString()]) : "boolean" == typeof l2 ? e2.push([t2, l2 ? "1" : "0"]) : "string" == typeof l2 ? e2.push([t2, l2]) : "number" == typeof l2 ? e2.push([t2, `${l2}`]) : null == l2 ? e2.push([t2, ""]) : bt(l2, t2, e2);
|
|
743
691
|
}
|
|
744
|
-
var
|
|
745
|
-
let
|
|
746
|
-
function
|
|
747
|
-
let t2 =
|
|
692
|
+
var kt = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(kt || {}), St = ((e2) => (e2[e2.Single = 0] = "Single", e2[e2.Multi = 1] = "Multi", e2))(St || {}), Ct = ((e2) => (e2[e2.Pointer = 0] = "Pointer", e2[e2.Focus = 1] = "Focus", e2[e2.Other = 2] = "Other", e2))(Ct || {});
|
|
693
|
+
let Ot = Symbol("ComboboxContext");
|
|
694
|
+
function Mt(e2) {
|
|
695
|
+
let t2 = f(Ot, null);
|
|
748
696
|
if (null === t2) {
|
|
749
697
|
let t3 = new Error(`<${e2} /> is missing a parent <Combobox /> component.`);
|
|
750
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
698
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, Mt), t3;
|
|
751
699
|
}
|
|
752
700
|
return t2;
|
|
753
701
|
}
|
|
754
|
-
let
|
|
755
|
-
let l2 =
|
|
756
|
-
let e3 =
|
|
702
|
+
let Tt = Symbol("VirtualContext"), Dt = k({ name: "VirtualProvider", setup(e2, { slots: t2 }) {
|
|
703
|
+
let l2 = Mt("VirtualProvider"), n2 = u(() => {
|
|
704
|
+
let e3 = Ce(l2.optionsRef);
|
|
757
705
|
if (!e3)
|
|
758
706
|
return { start: 0, end: 0 };
|
|
759
707
|
let t3 = window.getComputedStyle(e3);
|
|
760
708
|
return { start: parseFloat(t3.paddingBlockStart || t3.paddingTop), end: parseFloat(t3.paddingBlockEnd || t3.paddingBottom) };
|
|
761
|
-
}), a2 =
|
|
709
|
+
}), a2 = be(u(() => ({ scrollPaddingStart: n2.value.start, scrollPaddingEnd: n2.value.end, count: l2.virtual.value.options.length, estimateSize: () => 40, getScrollElement: () => Ce(l2.optionsRef), overscan: 12 }))), o2 = u(() => {
|
|
762
710
|
var e3;
|
|
763
711
|
return null == (e3 = l2.virtual.value) ? void 0 : e3.options;
|
|
764
712
|
}), r2 = s(0);
|
|
765
713
|
return p([o2], () => {
|
|
766
714
|
r2.value += 1;
|
|
767
|
-
}), S(
|
|
715
|
+
}), S(Tt, l2.virtual.value ? a2 : null), () => [x("div", { style: { position: "relative", width: "100%", height: `${a2.value.getTotalSize()}px` }, ref: (e3) => {
|
|
768
716
|
if (e3) {
|
|
769
717
|
if ("undefined" != typeof process && void 0 !== process.env.JEST_WORKER_ID || 0 === l2.activationTrigger.value)
|
|
770
718
|
return;
|
|
771
719
|
null !== l2.activeOptionIndex.value && l2.virtual.value.options.length > l2.activeOptionIndex.value && a2.value.scrollToIndex(l2.activeOptionIndex.value);
|
|
772
720
|
}
|
|
773
721
|
} }, a2.value.getVirtualItems().map((e3) => b(t2.default({ option: l2.virtual.value.options[e3.index], open: 0 === l2.comboboxState.value })[0], { key: `${r2.value}-${e3.index}`, "data-index": e3.index, "aria-setsize": l2.virtual.value.options.length, "aria-posinset": e3.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${e3.start}px)`, overflowAnchor: "none" } })))];
|
|
774
|
-
} }),
|
|
775
|
-
let a2 = s(1), o2 = s(null), r2 = s(null), i2 = s(null), d2 = s(null), c2 = s({ static: false, hold: false }), g2 = s([]),
|
|
776
|
-
function
|
|
777
|
-
let t3 = null !==
|
|
722
|
+
} }), Et = k({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: false }, by: { type: [String, Function], nullable: true, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: true }, name: { type: String, optional: true }, nullable: { type: Boolean, default: false }, multiple: { type: [Boolean], default: false }, immediate: { type: [Boolean], default: false }, virtual: { type: Object, default: null } }, inheritAttrs: false, setup(e2, { slots: t2, attrs: l2, emit: n2 }) {
|
|
723
|
+
let a2 = s(1), o2 = s(null), r2 = s(null), i2 = s(null), d2 = s(null), c2 = s({ static: false, hold: false }), g2 = s([]), m2 = s(null), f2 = s(2), v2 = s(false);
|
|
724
|
+
function h2(e3 = (e4) => e4) {
|
|
725
|
+
let t3 = null !== m2.value ? g2.value[m2.value] : null, l3 = e3(g2.value.slice()), n3 = l3.length > 0 && null !== l3[0].dataRef.order.value ? l3.sort((e4, t4) => e4.dataRef.order.value - t4.dataRef.order.value) : $e(l3, (e4) => Ce(e4.dataRef.domRef)), a3 = t3 ? n3.indexOf(t3) : null;
|
|
778
726
|
return -1 === a3 && (a3 = null), { options: n3, activeOptionIndex: a3 };
|
|
779
727
|
}
|
|
780
|
-
let
|
|
728
|
+
let b2 = u(() => e2.multiple ? 1 : 0), k2 = u(() => e2.nullable), [O2, T2] = xe(u(() => e2.modelValue), (e3) => n2("update:modelValue", e3), u(() => e2.defaultValue)), D2 = u(() => void 0 === O2.value ? Oe(b2.value, { 1: [], 0: void 0 }) : O2.value), E2 = null, I2 = null;
|
|
781
729
|
function _2(e3) {
|
|
782
|
-
return
|
|
730
|
+
return Oe(b2.value, { 0: () => null == T2 ? void 0 : T2(e3), 1: () => {
|
|
783
731
|
let t3 = M(j2.value.value).slice(), l3 = M(e3), n3 = t3.findIndex((e4) => j2.compare(l3, M(e4)));
|
|
784
732
|
return -1 === n3 ? t3.push(l3) : t3.splice(n3, 1), null == T2 ? void 0 : T2(t3);
|
|
785
733
|
} });
|
|
@@ -787,12 +735,12 @@ let Dt = Symbol("VirtualContext"), Et = w({ name: "VirtualProvider", setup(e2, {
|
|
|
787
735
|
let P2 = u(() => {
|
|
788
736
|
});
|
|
789
737
|
p([P2], ([e3], [t3]) => {
|
|
790
|
-
if (j2.virtual.value && e3 && t3 && null !==
|
|
791
|
-
let l3 = e3.indexOf(t3[
|
|
792
|
-
|
|
738
|
+
if (j2.virtual.value && e3 && t3 && null !== m2.value) {
|
|
739
|
+
let l3 = e3.indexOf(t3[m2.value]);
|
|
740
|
+
m2.value = -1 !== l3 ? l3 : null;
|
|
793
741
|
}
|
|
794
742
|
});
|
|
795
|
-
let j2 = { comboboxState: a2, value: D2, mode:
|
|
743
|
+
let j2 = { comboboxState: a2, value: D2, mode: b2, compare(t3, l3) {
|
|
796
744
|
if ("string" == typeof e2.by) {
|
|
797
745
|
let n3 = e2.by;
|
|
798
746
|
return (null == t3 ? void 0 : t3[n3]) === (null == l3 ? void 0 : l3[n3]);
|
|
@@ -803,7 +751,7 @@ let Dt = Symbol("VirtualContext"), Et = w({ name: "VirtualProvider", setup(e2, {
|
|
|
803
751
|
}, calculateIndex: (t3) => j2.virtual.value ? null === e2.by ? j2.virtual.value.options.indexOf(t3) : j2.virtual.value.options.findIndex((e3) => j2.compare(e3, t3)) : g2.value.findIndex((e3) => j2.compare(e3.dataRef.value, t3)), defaultValue: u(() => e2.defaultValue), nullable: k2, immediate: u(() => false), virtual: u(() => null), inputRef: r2, labelRef: o2, buttonRef: i2, optionsRef: d2, disabled: u(() => e2.disabled), options: g2, change(e3) {
|
|
804
752
|
T2(e3);
|
|
805
753
|
}, activeOptionIndex: u(() => {
|
|
806
|
-
if (v2.value && null ===
|
|
754
|
+
if (v2.value && null === m2.value && (j2.virtual.value ? j2.virtual.value.options.length > 0 : g2.value.length > 0)) {
|
|
807
755
|
if (j2.virtual.value) {
|
|
808
756
|
let e4 = j2.virtual.value.options.findIndex((e5) => {
|
|
809
757
|
var t3;
|
|
@@ -816,25 +764,25 @@ let Dt = Symbol("VirtualContext"), Et = w({ name: "VirtualProvider", setup(e2, {
|
|
|
816
764
|
if (-1 !== e3)
|
|
817
765
|
return e3;
|
|
818
766
|
}
|
|
819
|
-
return
|
|
820
|
-
}), activationTrigger:
|
|
821
|
-
v2.value = false, !e2.disabled && 1 !== a2.value && (a2.value = 1,
|
|
767
|
+
return m2.value;
|
|
768
|
+
}), activationTrigger: f2, optionsPropsRef: c2, closeCombobox() {
|
|
769
|
+
v2.value = false, !e2.disabled && 1 !== a2.value && (a2.value = 1, m2.value = null);
|
|
822
770
|
}, openCombobox() {
|
|
823
771
|
if (v2.value = true, !e2.disabled && 0 !== a2.value) {
|
|
824
772
|
if (j2.value.value) {
|
|
825
773
|
let e3 = j2.calculateIndex(j2.value.value);
|
|
826
|
-
-1 !== e3 && (
|
|
774
|
+
-1 !== e3 && (m2.value = e3);
|
|
827
775
|
}
|
|
828
776
|
a2.value = 0;
|
|
829
777
|
}
|
|
830
778
|
}, setActivationTrigger(e3) {
|
|
831
|
-
|
|
779
|
+
f2.value = e3;
|
|
832
780
|
}, goToOption(t3, l3, n3) {
|
|
833
781
|
v2.value = false, null !== E2 && cancelAnimationFrame(E2), E2 = requestAnimationFrame(() => {
|
|
834
782
|
if (e2.disabled || d2.value && !c2.value.static && 1 === a2.value)
|
|
835
783
|
return;
|
|
836
784
|
if (j2.virtual.value)
|
|
837
|
-
return
|
|
785
|
+
return m2.value = t3 === ft.Specific ? l3 : vt({ focus: t3 }, { resolveItems: () => j2.virtual.value.options, resolveActiveIndex: () => {
|
|
838
786
|
var e3, t4;
|
|
839
787
|
return null != (t4 = null != (e3 = j2.activeOptionIndex.value) ? e3 : j2.virtual.value.options.findIndex((e4) => {
|
|
840
788
|
var t5;
|
|
@@ -842,14 +790,14 @@ let Dt = Symbol("VirtualContext"), Et = w({ name: "VirtualProvider", setup(e2, {
|
|
|
842
790
|
})) ? t4 : null;
|
|
843
791
|
}, resolveDisabled: (e3) => j2.virtual.value.disabled(e3), resolveId() {
|
|
844
792
|
throw new Error("Function not implemented.");
|
|
845
|
-
} }), void (
|
|
846
|
-
let o3 =
|
|
793
|
+
} }), void (f2.value = null != n3 ? n3 : 2);
|
|
794
|
+
let o3 = h2();
|
|
847
795
|
if (null === o3.activeOptionIndex) {
|
|
848
796
|
let e3 = o3.options.findIndex((e4) => !e4.dataRef.disabled);
|
|
849
797
|
-1 !== e3 && (o3.activeOptionIndex = e3);
|
|
850
798
|
}
|
|
851
|
-
let r3 = t3 ===
|
|
852
|
-
|
|
799
|
+
let r3 = t3 === ft.Specific ? l3 : vt({ focus: t3 }, { resolveItems: () => o3.options, resolveActiveIndex: () => o3.activeOptionIndex, resolveId: (e3) => e3.id, resolveDisabled: (e3) => e3.dataRef.disabled });
|
|
800
|
+
m2.value = r3, f2.value = null != n3 ? n3 : 2, g2.value = o3.options;
|
|
853
801
|
});
|
|
854
802
|
}, selectOption(e3) {
|
|
855
803
|
let t3 = g2.value.find((t4) => t4.id === e3);
|
|
@@ -865,31 +813,31 @@ let Dt = Symbol("VirtualContext"), Et = w({ name: "VirtualProvider", setup(e2, {
|
|
|
865
813
|
let { dataRef: e3 } = g2.value[j2.activeOptionIndex.value];
|
|
866
814
|
_2(e3.value);
|
|
867
815
|
}
|
|
868
|
-
j2.goToOption(
|
|
816
|
+
j2.goToOption(ft.Specific, j2.activeOptionIndex.value);
|
|
869
817
|
}
|
|
870
818
|
}, registerOption(e3, t3) {
|
|
871
819
|
let l3 = C({ id: e3, dataRef: t3 });
|
|
872
820
|
if (j2.virtual.value)
|
|
873
821
|
return void g2.value.push(l3);
|
|
874
822
|
I2 && cancelAnimationFrame(I2);
|
|
875
|
-
let n3 =
|
|
876
|
-
null ===
|
|
877
|
-
let e4 =
|
|
878
|
-
g2.value = e4.options,
|
|
823
|
+
let n3 = h2((e4) => (e4.push(l3), e4));
|
|
824
|
+
null === m2.value && j2.isSelected(t3.value.value) && (n3.activeOptionIndex = n3.options.indexOf(l3)), g2.value = n3.options, m2.value = n3.activeOptionIndex, f2.value = 2, n3.options.some((e4) => !Ce(e4.dataRef.domRef)) && (I2 = requestAnimationFrame(() => {
|
|
825
|
+
let e4 = h2();
|
|
826
|
+
g2.value = e4.options, m2.value = e4.activeOptionIndex;
|
|
879
827
|
}));
|
|
880
828
|
}, unregisterOption(e3, t3) {
|
|
881
829
|
if (null !== E2 && cancelAnimationFrame(E2), t3 && (v2.value = true), j2.virtual.value)
|
|
882
830
|
return void (g2.value = g2.value.filter((t4) => t4.id !== e3));
|
|
883
|
-
let l3 =
|
|
831
|
+
let l3 = h2((t4) => {
|
|
884
832
|
let l4 = t4.findIndex((t5) => t5.id === e3);
|
|
885
833
|
return -1 !== l4 && t4.splice(l4, 1), t4;
|
|
886
834
|
});
|
|
887
|
-
g2.value = l3.options,
|
|
888
|
-
}, isSelected: (e3) =>
|
|
889
|
-
|
|
835
|
+
g2.value = l3.options, m2.value = l3.activeOptionIndex, f2.value = 2;
|
|
836
|
+
}, isSelected: (e3) => Oe(b2.value, { 0: () => j2.compare(M(j2.value.value), M(e3)), 1: () => M(j2.value.value).some((t3) => j2.compare(M(t3), M(e3))) }), isActive: (e3) => m2.value === j2.calculateIndex(e3) };
|
|
837
|
+
We([r2, i2, d2], () => j2.closeCombobox(), u(() => 0 === a2.value)), S(Ot, j2), pt(u(() => Oe(a2.value, { 0: dt.Open, 1: dt.Closed })));
|
|
890
838
|
let R2 = u(() => {
|
|
891
839
|
var e3;
|
|
892
|
-
return null == (e3 =
|
|
840
|
+
return null == (e3 = Ce(r2)) ? void 0 : e3.closest("form");
|
|
893
841
|
});
|
|
894
842
|
return y(() => {
|
|
895
843
|
p([R2], () => {
|
|
@@ -904,87 +852,90 @@ let Dt = Symbol("VirtualContext"), Et = w({ name: "VirtualProvider", setup(e2, {
|
|
|
904
852
|
}, { immediate: true });
|
|
905
853
|
}), () => {
|
|
906
854
|
var n3, o3, r3;
|
|
907
|
-
let { name: i3, disabled: s2, form: u2, ...d3 } = e2, c3 = { open: 0 === a2.value, disabled: s2, activeIndex: j2.activeOptionIndex.value, activeOption: null === j2.activeOptionIndex.value ? null : j2.virtual.value ? j2.virtual.value.options[null != (n3 = j2.activeOptionIndex.value) ? n3 : 0] : null != (r3 = null == (o3 = j2.options.value[j2.activeOptionIndex.value]) ? void 0 : o3.dataRef.value
|
|
908
|
-
return
|
|
855
|
+
let { name: i3, disabled: s2, form: u2, ...d3 } = e2, c3 = { open: 0 === a2.value, disabled: s2, activeIndex: j2.activeOptionIndex.value, activeOption: null === j2.activeOptionIndex.value ? null : j2.virtual.value ? j2.virtual.value.options[null != (n3 = j2.activeOptionIndex.value) ? n3 : 0] : null != (r3 = null == (o3 = j2.options.value[j2.activeOptionIndex.value]) ? void 0 : o3.dataRef.value) ? r3 : null, value: D2.value };
|
|
856
|
+
return x(w, [...null != i3 && null != D2.value ? bt({ [i3]: D2.value }).map(([e3, t3]) => x(st, ot({ features: it.Hidden, key: e3, as: "input", type: "hidden", hidden: true, readOnly: true, form: u2, name: e3, value: t3 }))) : [], tt({ theirProps: { ...l2, ...rt(d3, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: c3, slots: t2, attrs: l2, name: "Combobox" })]);
|
|
909
857
|
};
|
|
910
|
-
} }),
|
|
911
|
-
|
|
912
|
-
|
|
858
|
+
} }), It = k({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
859
|
+
var n2;
|
|
860
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-combobox-label-${Se()}`, o2 = Mt("ComboboxLabel");
|
|
861
|
+
function r2() {
|
|
913
862
|
var e3;
|
|
914
|
-
null == (e3 =
|
|
863
|
+
null == (e3 = Ce(o2.inputRef)) || e3.focus({ preventScroll: true });
|
|
915
864
|
}
|
|
916
865
|
return () => {
|
|
917
|
-
let
|
|
918
|
-
return
|
|
866
|
+
let n3 = { open: 0 === o2.comboboxState.value, disabled: o2.disabled.value }, { ...i2 } = e2;
|
|
867
|
+
return tt({ ourProps: { id: a2, ref: o2.labelRef, onClick: r2 }, theirProps: i2, slot: n3, attrs: t2, slots: l2, name: "ComboboxLabel" });
|
|
919
868
|
};
|
|
920
|
-
} }),
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
869
|
+
} }), _t = k({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
870
|
+
var a2;
|
|
871
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-combobox-button-${Se()}`, r2 = Mt("ComboboxButton");
|
|
872
|
+
function i2(e3) {
|
|
873
|
+
r2.disabled.value || (0 === r2.comboboxState.value ? r2.closeCombobox() : (e3.preventDefault(), r2.openCombobox()), v(() => {
|
|
924
874
|
var e4;
|
|
925
|
-
return null == (e4 =
|
|
875
|
+
return null == (e4 = Ce(r2.inputRef)) ? void 0 : e4.focus({ preventScroll: true });
|
|
926
876
|
}));
|
|
927
877
|
}
|
|
928
|
-
function
|
|
878
|
+
function s2(e3) {
|
|
929
879
|
switch (e3.key) {
|
|
930
|
-
case
|
|
931
|
-
return e3.preventDefault(), e3.stopPropagation(), 1 ===
|
|
880
|
+
case gt.ArrowDown:
|
|
881
|
+
return e3.preventDefault(), e3.stopPropagation(), 1 === r2.comboboxState.value && r2.openCombobox(), void v(() => {
|
|
932
882
|
var e4;
|
|
933
|
-
return null == (e4 =
|
|
883
|
+
return null == (e4 = r2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
934
884
|
});
|
|
935
|
-
case
|
|
936
|
-
return e3.preventDefault(), e3.stopPropagation(), 1 ===
|
|
937
|
-
|
|
938
|
-
})), void
|
|
885
|
+
case gt.ArrowUp:
|
|
886
|
+
return e3.preventDefault(), e3.stopPropagation(), 1 === r2.comboboxState.value && (r2.openCombobox(), v(() => {
|
|
887
|
+
r2.value.value || r2.goToOption(ft.Last);
|
|
888
|
+
})), void v(() => {
|
|
939
889
|
var e4;
|
|
940
|
-
return null == (e4 =
|
|
890
|
+
return null == (e4 = r2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
941
891
|
});
|
|
942
|
-
case
|
|
943
|
-
if (0 !==
|
|
892
|
+
case gt.Escape:
|
|
893
|
+
if (0 !== r2.comboboxState.value)
|
|
944
894
|
return;
|
|
945
|
-
return e3.preventDefault(),
|
|
895
|
+
return e3.preventDefault(), r2.optionsRef.value && !r2.optionsPropsRef.value.static && e3.stopPropagation(), r2.closeCombobox(), void v(() => {
|
|
946
896
|
var e4;
|
|
947
|
-
return null == (e4 =
|
|
897
|
+
return null == (e4 = r2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
948
898
|
});
|
|
949
899
|
}
|
|
950
900
|
}
|
|
951
|
-
n2({ el:
|
|
952
|
-
let
|
|
901
|
+
n2({ el: r2.buttonRef, $el: r2.buttonRef });
|
|
902
|
+
let d2 = Je(u(() => ({ as: e2.as, type: t2.type })), r2.buttonRef);
|
|
953
903
|
return () => {
|
|
954
|
-
var n3,
|
|
955
|
-
let u2 = { open: 0 ===
|
|
956
|
-
return
|
|
904
|
+
var n3, a3;
|
|
905
|
+
let u2 = { open: 0 === r2.comboboxState.value, disabled: r2.disabled.value, value: r2.value.value }, { ...c2 } = e2;
|
|
906
|
+
return tt({ ourProps: { ref: r2.buttonRef, id: o2, type: d2.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": null == (n3 = Ce(r2.optionsRef)) ? void 0 : n3.id, "aria-expanded": 0 === r2.comboboxState.value, "aria-labelledby": r2.labelRef.value ? [null == (a3 = Ce(r2.labelRef)) ? void 0 : a3.id, o2].join(" ") : void 0, disabled: true === r2.disabled.value || void 0, onKeydown: s2, onClick: i2 }, theirProps: c2, slot: u2, attrs: t2, slots: l2, name: "ComboboxButton" });
|
|
957
907
|
};
|
|
958
|
-
} }),
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
908
|
+
} }), Pt = k({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e2) => true }, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
909
|
+
var o2;
|
|
910
|
+
let r2 = null != (o2 = e2.id) ? o2 : `headlessui-combobox-input-${Se()}`, i2 = Mt("ComboboxInput"), d2 = u(() => Ee(Ce(i2.inputRef))), c2 = { value: false };
|
|
911
|
+
function g2() {
|
|
912
|
+
i2.change(null);
|
|
913
|
+
let e3 = Ce(i2.optionsRef);
|
|
914
|
+
e3 && (e3.scrollTop = 0), i2.goToOption(ft.Nothing);
|
|
964
915
|
}
|
|
965
|
-
a2({ el:
|
|
966
|
-
let
|
|
916
|
+
a2({ el: i2.inputRef, $el: i2.inputRef });
|
|
917
|
+
let m2 = u(() => {
|
|
967
918
|
var t3;
|
|
968
|
-
let l3 =
|
|
969
|
-
return
|
|
919
|
+
let l3 = i2.value.value;
|
|
920
|
+
return Ce(i2.inputRef) ? void 0 !== e2.displayValue && void 0 !== l3 ? null != (t3 = e2.displayValue(l3)) ? t3 : "" : "string" == typeof l3 ? l3 : "" : "";
|
|
970
921
|
});
|
|
971
922
|
y(() => {
|
|
972
|
-
p([
|
|
973
|
-
if (
|
|
923
|
+
p([m2, i2.comboboxState, d2], ([e3, t3], [l3, n3]) => {
|
|
924
|
+
if (c2.value)
|
|
974
925
|
return;
|
|
975
|
-
let a3 =
|
|
926
|
+
let a3 = Ce(i2.inputRef);
|
|
976
927
|
a3 && ((0 === n3 && 1 === t3 || e3 !== l3) && (a3.value = e3), requestAnimationFrame(() => {
|
|
977
928
|
var e4;
|
|
978
|
-
if (
|
|
929
|
+
if (c2.value || !a3 || (null == (e4 = d2.value) ? void 0 : e4.activeElement) !== a3)
|
|
979
930
|
return;
|
|
980
931
|
let { selectionStart: t4, selectionEnd: l4 } = a3;
|
|
981
932
|
0 === Math.abs((null != l4 ? l4 : 0) - (null != t4 ? t4 : 0)) && 0 === t4 && a3.setSelectionRange(a3.value.length, a3.value.length);
|
|
982
933
|
}));
|
|
983
|
-
}, { immediate: true }), p([
|
|
934
|
+
}, { immediate: true }), p([i2.comboboxState], ([e3], [t3]) => {
|
|
984
935
|
if (0 === e3 && 1 === t3) {
|
|
985
|
-
if (
|
|
936
|
+
if (c2.value)
|
|
986
937
|
return;
|
|
987
|
-
let e4 =
|
|
938
|
+
let e4 = Ce(i2.inputRef);
|
|
988
939
|
if (!e4)
|
|
989
940
|
return;
|
|
990
941
|
let t4 = e4.value, { selectionStart: l3, selectionEnd: n3, selectionDirection: a3 } = e4;
|
|
@@ -992,175 +943,175 @@ let Dt = Symbol("VirtualContext"), Et = w({ name: "VirtualProvider", setup(e2, {
|
|
|
992
943
|
}
|
|
993
944
|
});
|
|
994
945
|
});
|
|
995
|
-
let
|
|
996
|
-
function
|
|
997
|
-
|
|
946
|
+
let f2 = s(false);
|
|
947
|
+
function h2() {
|
|
948
|
+
f2.value = true;
|
|
998
949
|
}
|
|
999
|
-
function
|
|
1000
|
-
|
|
1001
|
-
|
|
950
|
+
function b2() {
|
|
951
|
+
yt().nextFrame(() => {
|
|
952
|
+
f2.value = false;
|
|
1002
953
|
});
|
|
1003
954
|
}
|
|
1004
|
-
function
|
|
1005
|
-
switch (
|
|
1006
|
-
case
|
|
1007
|
-
if (
|
|
955
|
+
function x2(e3) {
|
|
956
|
+
switch (c2.value = true, e3.key) {
|
|
957
|
+
case gt.Enter:
|
|
958
|
+
if (c2.value = false, 0 !== i2.comboboxState.value || f2.value)
|
|
1008
959
|
return;
|
|
1009
|
-
if (e3.preventDefault(), e3.stopPropagation(), null ===
|
|
1010
|
-
return void
|
|
1011
|
-
|
|
960
|
+
if (e3.preventDefault(), e3.stopPropagation(), null === i2.activeOptionIndex.value)
|
|
961
|
+
return void i2.closeCombobox();
|
|
962
|
+
i2.selectActiveOption(), 0 === i2.mode.value && i2.closeCombobox();
|
|
1012
963
|
break;
|
|
1013
|
-
case
|
|
1014
|
-
return
|
|
1015
|
-
case
|
|
1016
|
-
return
|
|
1017
|
-
|
|
1018
|
-
|
|
964
|
+
case gt.ArrowDown:
|
|
965
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), Oe(i2.comboboxState.value, { 0: () => i2.goToOption(ft.Next), 1: () => i2.openCombobox() });
|
|
966
|
+
case gt.ArrowUp:
|
|
967
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), Oe(i2.comboboxState.value, { 0: () => i2.goToOption(ft.Previous), 1: () => {
|
|
968
|
+
i2.openCombobox(), v(() => {
|
|
969
|
+
i2.value.value || i2.goToOption(ft.Last);
|
|
1019
970
|
});
|
|
1020
971
|
} });
|
|
1021
|
-
case
|
|
972
|
+
case gt.Home:
|
|
1022
973
|
if (e3.shiftKey)
|
|
1023
974
|
break;
|
|
1024
|
-
return
|
|
1025
|
-
case
|
|
1026
|
-
return
|
|
1027
|
-
case
|
|
975
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(ft.First);
|
|
976
|
+
case gt.PageUp:
|
|
977
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(ft.First);
|
|
978
|
+
case gt.End:
|
|
1028
979
|
if (e3.shiftKey)
|
|
1029
980
|
break;
|
|
1030
|
-
return
|
|
1031
|
-
case
|
|
1032
|
-
return
|
|
1033
|
-
case
|
|
1034
|
-
if (
|
|
981
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(ft.Last);
|
|
982
|
+
case gt.PageDown:
|
|
983
|
+
return c2.value = false, e3.preventDefault(), e3.stopPropagation(), i2.goToOption(ft.Last);
|
|
984
|
+
case gt.Escape:
|
|
985
|
+
if (c2.value = false, 0 !== i2.comboboxState.value)
|
|
1035
986
|
return;
|
|
1036
|
-
e3.preventDefault(),
|
|
987
|
+
e3.preventDefault(), i2.optionsRef.value && !i2.optionsPropsRef.value.static && e3.stopPropagation(), i2.nullable.value && 0 === i2.mode.value && null === i2.value.value && g2(), i2.closeCombobox();
|
|
1037
988
|
break;
|
|
1038
|
-
case
|
|
1039
|
-
if (
|
|
989
|
+
case gt.Tab:
|
|
990
|
+
if (c2.value = false, 0 !== i2.comboboxState.value)
|
|
1040
991
|
return;
|
|
1041
|
-
0 ===
|
|
992
|
+
0 === i2.mode.value && 1 !== i2.activationTrigger.value && i2.selectActiveOption(), i2.closeCombobox();
|
|
1042
993
|
}
|
|
1043
994
|
}
|
|
1044
|
-
function
|
|
1045
|
-
t2("change", e3),
|
|
995
|
+
function w2(e3) {
|
|
996
|
+
t2("change", e3), i2.nullable.value && 0 === i2.mode.value && "" === e3.target.value && g2(), i2.openCombobox();
|
|
1046
997
|
}
|
|
1047
|
-
function
|
|
998
|
+
function k2(e3) {
|
|
1048
999
|
var t3, l3, n3;
|
|
1049
1000
|
let a3 = null != (t3 = e3.relatedTarget) ? t3 : mt.find((t4) => t4 !== e3.currentTarget);
|
|
1050
|
-
if (
|
|
1051
|
-
return e3.preventDefault(), 0 ===
|
|
1001
|
+
if (c2.value = false, !(null != (l3 = Ce(i2.optionsRef)) && l3.contains(a3) || null != (n3 = Ce(i2.buttonRef)) && n3.contains(a3) || 0 !== i2.comboboxState.value))
|
|
1002
|
+
return e3.preventDefault(), 0 === i2.mode.value && (i2.nullable.value && null === i2.value.value ? g2() : 1 !== i2.activationTrigger.value && i2.selectActiveOption()), i2.closeCombobox();
|
|
1052
1003
|
}
|
|
1053
|
-
function
|
|
1004
|
+
function S2(e3) {
|
|
1054
1005
|
var t3, l3, n3;
|
|
1055
1006
|
let a3 = null != (t3 = e3.relatedTarget) ? t3 : mt.find((t4) => t4 !== e3.currentTarget);
|
|
1056
|
-
null != (l3 =
|
|
1057
|
-
|
|
1007
|
+
null != (l3 = Ce(i2.buttonRef)) && l3.contains(a3) || null != (n3 = Ce(i2.optionsRef)) && n3.contains(a3) || i2.disabled.value || i2.immediate.value && 0 !== i2.comboboxState.value && (i2.openCombobox(), yt().nextFrame(() => {
|
|
1008
|
+
i2.setActivationTrigger(1);
|
|
1058
1009
|
}));
|
|
1059
1010
|
}
|
|
1060
|
-
let
|
|
1011
|
+
let C2 = u(() => {
|
|
1061
1012
|
var t3, l3, n3, a3;
|
|
1062
|
-
return null != (a3 = null != (n3 = null != (l3 = e2.defaultValue) ? l3 : void 0 !==
|
|
1013
|
+
return null != (a3 = null != (n3 = null != (l3 = e2.defaultValue) ? l3 : void 0 !== i2.defaultValue.value ? null == (t3 = e2.displayValue) ? void 0 : t3.call(e2, i2.defaultValue.value) : null) ? n3 : i2.defaultValue.value) ? a3 : "";
|
|
1063
1014
|
});
|
|
1064
1015
|
return () => {
|
|
1065
|
-
var t3, a3,
|
|
1066
|
-
let
|
|
1067
|
-
return
|
|
1016
|
+
var t3, a3, o3, s2, u2, d3, c3;
|
|
1017
|
+
let p2 = { open: 0 === i2.comboboxState.value }, { displayValue: g3, onChange: m3, ...f3 } = e2, v2 = { "aria-controls": null == (t3 = i2.optionsRef.value) ? void 0 : t3.id, "aria-expanded": 0 === i2.comboboxState.value, "aria-activedescendant": null === i2.activeOptionIndex.value ? void 0 : i2.virtual.value ? null == (a3 = i2.options.value.find((e3) => !i2.virtual.value.disabled(e3.dataRef.value) && i2.compare(e3.dataRef.value, i2.virtual.value.options[i2.activeOptionIndex.value]))) ? void 0 : a3.id : null == (o3 = i2.options.value[i2.activeOptionIndex.value]) ? void 0 : o3.id, "aria-labelledby": null != (d3 = null == (s2 = Ce(i2.labelRef)) ? void 0 : s2.id) ? d3 : null == (u2 = Ce(i2.buttonRef)) ? void 0 : u2.id, "aria-autocomplete": "list", id: r2, onCompositionstart: h2, onCompositionend: b2, onKeydown: x2, onInput: w2, onFocus: S2, onBlur: k2, role: "combobox", type: null != (c3 = l2.type) ? c3 : "text", tabIndex: 0, ref: i2.inputRef, defaultValue: C2.value, disabled: true === i2.disabled.value || void 0 };
|
|
1018
|
+
return tt({ ourProps: v2, theirProps: f3, slot: p2, attrs: l2, slots: n2, features: Qe.RenderStrategy | Qe.Static, name: "ComboboxInput" });
|
|
1068
1019
|
};
|
|
1069
|
-
} }),
|
|
1070
|
-
let a2 =
|
|
1071
|
-
n2({ el: a2.optionsRef, $el: a2.optionsRef }),
|
|
1020
|
+
} }), jt = k({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, hold: { type: [Boolean], default: false } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1021
|
+
let a2 = Mt("ComboboxOptions"), o2 = `headlessui-combobox-options-${Se()}`;
|
|
1022
|
+
n2({ el: a2.optionsRef, $el: a2.optionsRef }), h(() => {
|
|
1072
1023
|
a2.optionsPropsRef.value.static = e2.static;
|
|
1073
|
-
}),
|
|
1024
|
+
}), h(() => {
|
|
1074
1025
|
a2.optionsPropsRef.value.hold = e2.hold;
|
|
1075
1026
|
});
|
|
1076
|
-
let r2 =
|
|
1077
|
-
return
|
|
1027
|
+
let r2 = ct(), i2 = u(() => null !== r2 ? (r2.value & dt.Open) === dt.Open : 0 === a2.comboboxState.value);
|
|
1028
|
+
return Xe({ container: u(() => Ce(a2.optionsRef)), enabled: u(() => 0 === a2.comboboxState.value), accept: (e3) => "option" === e3.getAttribute("role") ? NodeFilter.FILTER_REJECT : e3.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT, walk(e3) {
|
|
1078
1029
|
e3.setAttribute("role", "none");
|
|
1079
1030
|
} }), () => {
|
|
1080
1031
|
var n3, r3, s2;
|
|
1081
1032
|
let u2 = { open: 0 === a2.comboboxState.value };
|
|
1082
|
-
return
|
|
1033
|
+
return tt({ ourProps: { "aria-labelledby": null != (s2 = null == (n3 = Ce(a2.labelRef)) ? void 0 : n3.id) ? s2 : null == (r3 = Ce(a2.buttonRef)) ? void 0 : r3.id, id: o2, ref: a2.optionsRef, role: "listbox", "aria-multiselectable": 1 === a2.mode.value || void 0 }, theirProps: rt(e2, ["hold"]), slot: u2, attrs: t2, slots: a2.virtual.value && 0 === a2.comboboxState.value ? { ...l2, default: () => [x(Dt, {}, l2.default)] } : l2, features: Qe.RenderStrategy | Qe.Static, visible: i2.value, name: "ComboboxOptions" });
|
|
1083
1034
|
};
|
|
1084
|
-
} }),
|
|
1085
|
-
let a2 =
|
|
1035
|
+
} }), Rt = k({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: false }, order: { type: [Number], default: null } }, setup(e2, { slots: t2, attrs: l2, expose: n2 }) {
|
|
1036
|
+
let a2 = Mt("ComboboxOption"), o2 = `headlessui-combobox-option-${Se()}`, r2 = s(null);
|
|
1086
1037
|
n2({ el: r2, $el: r2 });
|
|
1087
1038
|
let i2 = u(() => {
|
|
1088
1039
|
var t3;
|
|
1089
1040
|
return a2.virtual.value ? a2.activeOptionIndex.value === a2.calculateIndex(e2.value) : null !== a2.activeOptionIndex.value && (null == (t3 = a2.options.value[a2.activeOptionIndex.value]) ? void 0 : t3.id) === o2;
|
|
1090
|
-
}), d2 = u(() => a2.isSelected(e2.value)), c2 =
|
|
1041
|
+
}), d2 = u(() => a2.isSelected(e2.value)), c2 = f(Tt, null), p2 = u(() => ({ disabled: e2.disabled, value: e2.value, domRef: r2, order: u(() => e2.order) }));
|
|
1091
1042
|
function g2(t3) {
|
|
1092
1043
|
var l3;
|
|
1093
1044
|
if (e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value))
|
|
1094
1045
|
return t3.preventDefault();
|
|
1095
|
-
a2.selectOption(o2),
|
|
1046
|
+
a2.selectOption(o2), Ye() || requestAnimationFrame(() => {
|
|
1096
1047
|
var e3;
|
|
1097
|
-
return null == (e3 =
|
|
1048
|
+
return null == (e3 = Ce(a2.inputRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1098
1049
|
}), 0 === a2.mode.value && requestAnimationFrame(() => a2.closeCombobox());
|
|
1099
1050
|
}
|
|
1100
|
-
function
|
|
1051
|
+
function m2() {
|
|
1101
1052
|
var t3;
|
|
1102
1053
|
if (e2.disabled || null != (t3 = a2.virtual.value) && t3.disabled(e2.value))
|
|
1103
|
-
return a2.goToOption(
|
|
1054
|
+
return a2.goToOption(ft.Nothing);
|
|
1104
1055
|
let l3 = a2.calculateIndex(e2.value);
|
|
1105
|
-
a2.goToOption(
|
|
1056
|
+
a2.goToOption(ft.Specific, l3);
|
|
1106
1057
|
}
|
|
1107
|
-
y(() => a2.registerOption(o2, p2)), O(() => a2.unregisterOption(o2, i2.value)),
|
|
1108
|
-
let e3 =
|
|
1058
|
+
y(() => a2.registerOption(o2, p2)), O(() => a2.unregisterOption(o2, i2.value)), h(() => {
|
|
1059
|
+
let e3 = Ce(r2);
|
|
1109
1060
|
e3 && (null == c2 || c2.value.measureElement(e3));
|
|
1110
|
-
}),
|
|
1111
|
-
0 === a2.comboboxState.value && i2.value && (a2.virtual.value || 0 !== a2.activationTrigger.value &&
|
|
1061
|
+
}), h(() => {
|
|
1062
|
+
0 === a2.comboboxState.value && i2.value && (a2.virtual.value || 0 !== a2.activationTrigger.value && v(() => {
|
|
1112
1063
|
var e3, t3;
|
|
1113
|
-
return null == (t3 = null == (e3 =
|
|
1064
|
+
return null == (t3 = null == (e3 = Ce(r2)) ? void 0 : e3.scrollIntoView) ? void 0 : t3.call(e3, { block: "nearest" });
|
|
1114
1065
|
}));
|
|
1115
1066
|
});
|
|
1116
|
-
let b2 =
|
|
1117
|
-
function
|
|
1067
|
+
let b2 = Ze();
|
|
1068
|
+
function x2(e3) {
|
|
1118
1069
|
b2.update(e3);
|
|
1119
1070
|
}
|
|
1120
|
-
function
|
|
1071
|
+
function w2(t3) {
|
|
1121
1072
|
var l3;
|
|
1122
1073
|
if (!b2.wasMoved(t3) || e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value) || i2.value)
|
|
1123
1074
|
return;
|
|
1124
1075
|
let n3 = a2.calculateIndex(e2.value);
|
|
1125
|
-
a2.goToOption(
|
|
1076
|
+
a2.goToOption(ft.Specific, n3, 0);
|
|
1126
1077
|
}
|
|
1127
|
-
function
|
|
1078
|
+
function k2(t3) {
|
|
1128
1079
|
var l3;
|
|
1129
|
-
b2.wasMoved(t3) && (e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value) || i2.value && (a2.optionsPropsRef.value.hold || a2.goToOption(
|
|
1080
|
+
b2.wasMoved(t3) && (e2.disabled || null != (l3 = a2.virtual.value) && l3.disabled(e2.value) || i2.value && (a2.optionsPropsRef.value.hold || a2.goToOption(ft.Nothing)));
|
|
1130
1081
|
}
|
|
1131
1082
|
return () => {
|
|
1132
1083
|
let { disabled: n3 } = e2, a3 = { active: i2.value, selected: d2.value, disabled: n3 };
|
|
1133
|
-
return
|
|
1084
|
+
return tt({ ourProps: { id: o2, ref: r2, role: "option", tabIndex: true === n3 ? void 0 : -1, "aria-disabled": true === n3 || void 0, "aria-selected": d2.value, disabled: void 0, onClick: g2, onFocus: m2, onPointerenter: x2, onMouseenter: x2, onPointermove: w2, onMousemove: w2, onPointerleave: k2, onMouseleave: k2 }, theirProps: rt(e2, ["order", "value"]), slot: a3, attrs: l2, slots: t2, name: "ComboboxOption" });
|
|
1134
1085
|
};
|
|
1135
1086
|
} });
|
|
1136
|
-
function
|
|
1137
|
-
|
|
1087
|
+
function Bt(e2, t2, l2, n2) {
|
|
1088
|
+
De.isServer || h((a2) => {
|
|
1138
1089
|
(e2 = null != e2 ? e2 : window).addEventListener(t2, l2, n2), a2(() => e2.removeEventListener(t2, l2, n2));
|
|
1139
1090
|
});
|
|
1140
1091
|
}
|
|
1141
|
-
var
|
|
1142
|
-
function
|
|
1092
|
+
var At = ((e2) => (e2[e2.Forwards = 0] = "Forwards", e2[e2.Backwards = 1] = "Backwards", e2))(At || {});
|
|
1093
|
+
function Lt(e2) {
|
|
1143
1094
|
if (!e2)
|
|
1144
1095
|
return /* @__PURE__ */ new Set();
|
|
1145
1096
|
if ("function" == typeof e2)
|
|
1146
1097
|
return new Set(e2());
|
|
1147
1098
|
let t2 = /* @__PURE__ */ new Set();
|
|
1148
1099
|
for (let l2 of e2.value) {
|
|
1149
|
-
let e3 =
|
|
1100
|
+
let e3 = Ce(l2);
|
|
1150
1101
|
e3 instanceof HTMLElement && t2.add(e3);
|
|
1151
1102
|
}
|
|
1152
1103
|
return t2;
|
|
1153
1104
|
}
|
|
1154
|
-
var
|
|
1155
|
-
let
|
|
1105
|
+
var Ft = ((e2) => (e2[e2.None = 1] = "None", e2[e2.InitialFocus = 2] = "InitialFocus", e2[e2.TabLock = 4] = "TabLock", e2[e2.FocusLock = 8] = "FocusLock", e2[e2.RestoreFocus = 16] = "RestoreFocus", e2[e2.All = 30] = "All", e2))(Ft || {});
|
|
1106
|
+
let Nt = Object.assign(k({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: s(/* @__PURE__ */ new Set()) } }, inheritAttrs: false, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1156
1107
|
let a2 = s(null);
|
|
1157
1108
|
n2({ el: a2, $el: a2 });
|
|
1158
|
-
let o2 = u(() =>
|
|
1109
|
+
let o2 = u(() => Ee(a2)), r2 = s(false);
|
|
1159
1110
|
y(() => r2.value = true), O(() => r2.value = false), function({ ownerDocument: e3 }, t3) {
|
|
1160
1111
|
let l3 = function(e4) {
|
|
1161
1112
|
let t4 = s(mt.slice());
|
|
1162
1113
|
return p([e4], ([e5], [l4]) => {
|
|
1163
|
-
true === l4 && false === e5 ?
|
|
1114
|
+
true === l4 && false === e5 ? ht(() => {
|
|
1164
1115
|
t4.value.splice(0);
|
|
1165
1116
|
}) : false === l4 && true === e5 && (t4.value = mt.slice());
|
|
1166
1117
|
}, { flush: "post" }), () => {
|
|
@@ -1169,12 +1120,12 @@ let zt = Object.assign(w({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1169
1120
|
};
|
|
1170
1121
|
}(t3);
|
|
1171
1122
|
y(() => {
|
|
1172
|
-
|
|
1123
|
+
h(() => {
|
|
1173
1124
|
var n3, a3;
|
|
1174
|
-
t3.value || (null == (n3 = e3.value) ? void 0 : n3.activeElement) === (null == (a3 = e3.value) ? void 0 : a3.body) &&
|
|
1125
|
+
t3.value || (null == (n3 = e3.value) ? void 0 : n3.activeElement) === (null == (a3 = e3.value) ? void 0 : a3.body) && Ne(l3());
|
|
1175
1126
|
}, { flush: "post" });
|
|
1176
1127
|
}), O(() => {
|
|
1177
|
-
t3.value &&
|
|
1128
|
+
t3.value && Ne(l3());
|
|
1178
1129
|
});
|
|
1179
1130
|
}({ ownerDocument: o2 }, u(() => r2.value && Boolean(16 & e2.features)));
|
|
1180
1131
|
let i2 = function({ ownerDocument: e3, container: t3, initialFocus: l3 }, n3) {
|
|
@@ -1183,76 +1134,76 @@ let zt = Object.assign(w({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1183
1134
|
p([t3, l3, n3], (r3, i3) => {
|
|
1184
1135
|
if (r3.every((e4, t4) => (null == i3 ? void 0 : i3[t4]) === e4) || !n3.value)
|
|
1185
1136
|
return;
|
|
1186
|
-
let s2 =
|
|
1187
|
-
s2 &&
|
|
1137
|
+
let s2 = Ce(t3);
|
|
1138
|
+
s2 && ht(() => {
|
|
1188
1139
|
var t4, n4;
|
|
1189
1140
|
if (!o3.value)
|
|
1190
1141
|
return;
|
|
1191
|
-
let r4 =
|
|
1142
|
+
let r4 = Ce(l3), i4 = null == (t4 = e3.value) ? void 0 : t4.activeElement;
|
|
1192
1143
|
if (r4) {
|
|
1193
1144
|
if (r4 === i4)
|
|
1194
1145
|
return void (a3.value = i4);
|
|
1195
1146
|
} else if (s2.contains(i4))
|
|
1196
1147
|
return void (a3.value = i4);
|
|
1197
|
-
r4 ?
|
|
1148
|
+
r4 ? Ne(r4) : He(s2, _e.First | _e.NoScroll) === Pe.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), a3.value = null == (n4 = e3.value) ? void 0 : n4.activeElement;
|
|
1198
1149
|
});
|
|
1199
1150
|
}, { immediate: true, flush: "post" });
|
|
1200
1151
|
}), a3;
|
|
1201
1152
|
}({ ownerDocument: o2, container: a2, initialFocus: u(() => e2.initialFocus) }, u(() => r2.value && Boolean(2 & e2.features)));
|
|
1202
1153
|
!function({ ownerDocument: e3, container: t3, containers: l3, previousActiveElement: n3 }, a3) {
|
|
1203
1154
|
var o3;
|
|
1204
|
-
|
|
1155
|
+
Bt(null == (o3 = e3.value) ? void 0 : o3.defaultView, "focus", (e4) => {
|
|
1205
1156
|
if (!a3.value)
|
|
1206
1157
|
return;
|
|
1207
|
-
let o4 =
|
|
1208
|
-
|
|
1158
|
+
let o4 = Lt(l3);
|
|
1159
|
+
Ce(t3) instanceof HTMLElement && o4.add(Ce(t3));
|
|
1209
1160
|
let r3 = n3.value;
|
|
1210
1161
|
if (!r3)
|
|
1211
1162
|
return;
|
|
1212
1163
|
let i3 = e4.target;
|
|
1213
|
-
i3 && i3 instanceof HTMLElement ?
|
|
1164
|
+
i3 && i3 instanceof HTMLElement ? zt(o4, i3) ? (n3.value = i3, Ne(i3)) : (e4.preventDefault(), e4.stopPropagation(), Ne(r3)) : Ne(n3.value);
|
|
1214
1165
|
}, true);
|
|
1215
1166
|
}({ ownerDocument: o2, container: a2, containers: e2.containers, previousActiveElement: i2 }, u(() => r2.value && Boolean(8 & e2.features)));
|
|
1216
1167
|
let d2 = function() {
|
|
1217
1168
|
let e3 = s(0);
|
|
1218
|
-
return
|
|
1169
|
+
return qe("keydown", (t3) => {
|
|
1219
1170
|
"Tab" === t3.key && (e3.value = t3.shiftKey ? 1 : 0);
|
|
1220
1171
|
}), e3;
|
|
1221
1172
|
}();
|
|
1222
1173
|
function c2(e3) {
|
|
1223
|
-
let t3 =
|
|
1224
|
-
t3 &&
|
|
1225
|
-
|
|
1226
|
-
}, [
|
|
1227
|
-
|
|
1174
|
+
let t3 = Ce(a2);
|
|
1175
|
+
t3 && Oe(d2.value, { [At.Forwards]: () => {
|
|
1176
|
+
He(t3, _e.First, { skipElements: [e3.relatedTarget] });
|
|
1177
|
+
}, [At.Backwards]: () => {
|
|
1178
|
+
He(t3, _e.Last, { skipElements: [e3.relatedTarget] });
|
|
1228
1179
|
} });
|
|
1229
1180
|
}
|
|
1230
1181
|
let g2 = s(false);
|
|
1231
|
-
function
|
|
1182
|
+
function m2(e3) {
|
|
1232
1183
|
"Tab" === e3.key && (g2.value = true, requestAnimationFrame(() => {
|
|
1233
1184
|
g2.value = false;
|
|
1234
1185
|
}));
|
|
1235
1186
|
}
|
|
1236
|
-
function
|
|
1187
|
+
function f2(t3) {
|
|
1237
1188
|
if (!r2.value)
|
|
1238
1189
|
return;
|
|
1239
|
-
let l3 =
|
|
1240
|
-
|
|
1190
|
+
let l3 = Lt(e2.containers);
|
|
1191
|
+
Ce(a2) instanceof HTMLElement && l3.add(Ce(a2));
|
|
1241
1192
|
let n3 = t3.relatedTarget;
|
|
1242
|
-
n3 instanceof HTMLElement && "true" !== n3.dataset.headlessuiFocusGuard && (
|
|
1193
|
+
n3 instanceof HTMLElement && "true" !== n3.dataset.headlessuiFocusGuard && (zt(l3, n3) || (g2.value ? He(Ce(a2), Oe(d2.value, { [At.Forwards]: () => _e.Next, [At.Backwards]: () => _e.Previous }) | _e.WrapAround, { relativeTo: t3.target }) : t3.target instanceof HTMLElement && Ne(t3.target)));
|
|
1243
1194
|
}
|
|
1244
1195
|
return () => {
|
|
1245
|
-
let n3 = { ref: a2, onKeydown:
|
|
1246
|
-
return
|
|
1196
|
+
let n3 = { ref: a2, onKeydown: m2, onFocusout: f2 }, { features: o3, initialFocus: r3, containers: i3, ...s2 } = e2;
|
|
1197
|
+
return x(w, [Boolean(4 & o3) && x(st, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: c2, features: it.Focusable }), tt({ ourProps: n3, theirProps: { ...t2, ...s2 }, slot: {}, attrs: t2, slots: l2, name: "FocusTrap" }), Boolean(4 & o3) && x(st, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: c2, features: it.Focusable })]);
|
|
1247
1198
|
};
|
|
1248
|
-
} }), { features:
|
|
1249
|
-
function
|
|
1199
|
+
} }), { features: Ft });
|
|
1200
|
+
function zt(e2, t2) {
|
|
1250
1201
|
for (let l2 of e2)
|
|
1251
1202
|
if (l2.contains(t2))
|
|
1252
1203
|
return true;
|
|
1253
1204
|
return false;
|
|
1254
1205
|
}
|
|
1255
|
-
function
|
|
1206
|
+
function $t() {
|
|
1256
1207
|
let e2;
|
|
1257
1208
|
return { before({ doc: t2 }) {
|
|
1258
1209
|
var l2;
|
|
@@ -1263,13 +1214,13 @@ function Ht() {
|
|
|
1263
1214
|
l2.style(n2, "paddingRight", `${o2}px`);
|
|
1264
1215
|
} };
|
|
1265
1216
|
}
|
|
1266
|
-
function
|
|
1217
|
+
function Ht(e2) {
|
|
1267
1218
|
let t2 = {};
|
|
1268
1219
|
for (let l2 of e2)
|
|
1269
1220
|
Object.assign(t2, l2(t2));
|
|
1270
1221
|
return t2;
|
|
1271
1222
|
}
|
|
1272
|
-
let
|
|
1223
|
+
let Vt = function(e2, t2) {
|
|
1273
1224
|
let l2 = e2(), n2 = /* @__PURE__ */ new Set();
|
|
1274
1225
|
return { getSnapshot: () => l2, subscribe: (e3) => (n2.add(e3), () => n2.delete(e3)), dispatch(e3, ...a2) {
|
|
1275
1226
|
let o2 = t2[e3].call(l2, ...a2);
|
|
@@ -1277,20 +1228,20 @@ let Yt = function(e2, t2) {
|
|
|
1277
1228
|
} };
|
|
1278
1229
|
}(() => /* @__PURE__ */ new Map(), { PUSH(e2, t2) {
|
|
1279
1230
|
var l2;
|
|
1280
|
-
let n2 = null != (l2 = this.get(e2)) ? l2 : { doc: e2, count: 0, d:
|
|
1231
|
+
let n2 = null != (l2 = this.get(e2)) ? l2 : { doc: e2, count: 0, d: yt(), meta: /* @__PURE__ */ new Set() };
|
|
1281
1232
|
return n2.count++, n2.meta.add(t2), this.set(e2, n2), this;
|
|
1282
1233
|
}, POP(e2, t2) {
|
|
1283
1234
|
let l2 = this.get(e2);
|
|
1284
1235
|
return l2 && (l2.count--, l2.meta.delete(t2)), this;
|
|
1285
1236
|
}, SCROLL_PREVENT({ doc: e2, d: t2, meta: l2 }) {
|
|
1286
|
-
let n2 = { doc: e2, d: t2, meta:
|
|
1237
|
+
let n2 = { doc: e2, d: t2, meta: Ht(l2) }, a2 = [Ve() ? { before({ doc: e3, d: t3, meta: l3 }) {
|
|
1287
1238
|
function n3(e4) {
|
|
1288
1239
|
return l3.containers.flatMap((e5) => e5()).some((t4) => t4.contains(e4));
|
|
1289
1240
|
}
|
|
1290
1241
|
t3.microTask(() => {
|
|
1291
1242
|
var l4;
|
|
1292
1243
|
if ("auto" !== window.getComputedStyle(e3.documentElement).scrollBehavior) {
|
|
1293
|
-
let l5 =
|
|
1244
|
+
let l5 = yt();
|
|
1294
1245
|
l5.style(e3.documentElement, "scrollBehavior", "auto"), t3.add(() => t3.microTask(() => l5.dispose()));
|
|
1295
1246
|
}
|
|
1296
1247
|
let a3 = null != (l4 = window.scrollY) ? l4 : window.pageYOffset, o2 = null;
|
|
@@ -1328,7 +1279,7 @@ let Yt = function(e2, t2) {
|
|
|
1328
1279
|
a3 !== t4 && window.scrollTo(0, a3), o2 && o2.isConnected && (o2.scrollIntoView({ block: "nearest" }), o2 = null);
|
|
1329
1280
|
});
|
|
1330
1281
|
});
|
|
1331
|
-
} } : {},
|
|
1282
|
+
} } : {}, $t(), { before({ doc: e3, d: t3 }) {
|
|
1332
1283
|
t3.style(e3.documentElement, "overflow", "hidden");
|
|
1333
1284
|
} }];
|
|
1334
1285
|
a2.forEach(({ before: e3 }) => null == e3 ? void 0 : e3(n2)), a2.forEach(({ after: e3 }) => null == e3 ? void 0 : e3(n2));
|
|
@@ -1337,69 +1288,69 @@ let Yt = function(e2, t2) {
|
|
|
1337
1288
|
}, TEARDOWN({ doc: e2 }) {
|
|
1338
1289
|
this.delete(e2);
|
|
1339
1290
|
} });
|
|
1340
|
-
function
|
|
1291
|
+
function Yt(e2, t2, l2) {
|
|
1341
1292
|
let n2 = function(e3) {
|
|
1342
1293
|
let t3 = c(e3.getSnapshot());
|
|
1343
1294
|
return O(e3.subscribe(() => {
|
|
1344
1295
|
t3.value = e3.getSnapshot();
|
|
1345
1296
|
})), t3;
|
|
1346
|
-
}(
|
|
1297
|
+
}(Vt), a2 = u(() => {
|
|
1347
1298
|
let t3 = e2.value ? n2.value.get(e2.value) : void 0;
|
|
1348
1299
|
return !!t3 && t3.count > 0;
|
|
1349
1300
|
});
|
|
1350
1301
|
return p([e2, t2], ([e3, t3], [n3], a3) => {
|
|
1351
1302
|
if (!e3 || !t3)
|
|
1352
1303
|
return;
|
|
1353
|
-
|
|
1304
|
+
Vt.dispatch("PUSH", e3, l2);
|
|
1354
1305
|
let o2 = false;
|
|
1355
1306
|
a3(() => {
|
|
1356
|
-
o2 || (
|
|
1307
|
+
o2 || (Vt.dispatch("POP", null != n3 ? n3 : e3, l2), o2 = true);
|
|
1357
1308
|
});
|
|
1358
1309
|
}, { immediate: true }), a2;
|
|
1359
1310
|
}
|
|
1360
|
-
|
|
1361
|
-
let e2 =
|
|
1311
|
+
Vt.subscribe(() => {
|
|
1312
|
+
let e2 = Vt.getSnapshot(), t2 = /* @__PURE__ */ new Map();
|
|
1362
1313
|
for (let [l2] of e2)
|
|
1363
1314
|
t2.set(l2, l2.documentElement.style.overflow);
|
|
1364
1315
|
for (let l2 of e2.values()) {
|
|
1365
1316
|
let e3 = "hidden" === t2.get(l2.doc), n2 = 0 !== l2.count;
|
|
1366
|
-
(n2 && !e3 || !n2 && e3) &&
|
|
1317
|
+
(n2 && !e3 || !n2 && e3) && Vt.dispatch(l2.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", l2), 0 === l2.count && Vt.dispatch("TEARDOWN", l2);
|
|
1367
1318
|
}
|
|
1368
1319
|
});
|
|
1369
|
-
let
|
|
1370
|
-
function
|
|
1371
|
-
|
|
1320
|
+
let Ut = /* @__PURE__ */ new Map(), qt = /* @__PURE__ */ new Map();
|
|
1321
|
+
function Wt(e2, t2 = s(true)) {
|
|
1322
|
+
h((l2) => {
|
|
1372
1323
|
var n2;
|
|
1373
1324
|
if (!t2.value)
|
|
1374
1325
|
return;
|
|
1375
|
-
let a2 =
|
|
1326
|
+
let a2 = Ce(e2);
|
|
1376
1327
|
if (!a2)
|
|
1377
1328
|
return;
|
|
1378
1329
|
l2(function() {
|
|
1379
1330
|
var e3;
|
|
1380
1331
|
if (!a2)
|
|
1381
1332
|
return;
|
|
1382
|
-
let t3 = null != (e3 =
|
|
1383
|
-
if (1 === t3 ?
|
|
1333
|
+
let t3 = null != (e3 = qt.get(a2)) ? e3 : 1;
|
|
1334
|
+
if (1 === t3 ? qt.delete(a2) : qt.set(a2, t3 - 1), 1 !== t3)
|
|
1384
1335
|
return;
|
|
1385
|
-
let l3 =
|
|
1386
|
-
l3 && (null === l3["aria-hidden"] ? a2.removeAttribute("aria-hidden") : a2.setAttribute("aria-hidden", l3["aria-hidden"]), a2.inert = l3.inert,
|
|
1336
|
+
let l3 = Ut.get(a2);
|
|
1337
|
+
l3 && (null === l3["aria-hidden"] ? a2.removeAttribute("aria-hidden") : a2.setAttribute("aria-hidden", l3["aria-hidden"]), a2.inert = l3.inert, Ut.delete(a2));
|
|
1387
1338
|
});
|
|
1388
|
-
let o2 = null != (n2 =
|
|
1389
|
-
|
|
1339
|
+
let o2 = null != (n2 = qt.get(a2)) ? n2 : 0;
|
|
1340
|
+
qt.set(a2, o2 + 1), 0 === o2 && (Ut.set(a2, { "aria-hidden": a2.getAttribute("aria-hidden"), inert: a2.inert }), a2.setAttribute("aria-hidden", "true"), a2.inert = true);
|
|
1390
1341
|
});
|
|
1391
1342
|
}
|
|
1392
|
-
let
|
|
1393
|
-
function
|
|
1394
|
-
return
|
|
1343
|
+
let Kt = Symbol("ForcePortalRootContext");
|
|
1344
|
+
function Jt() {
|
|
1345
|
+
return f(Kt, false);
|
|
1395
1346
|
}
|
|
1396
|
-
let
|
|
1347
|
+
let Gt = k({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: false } }, setup: (e2, { slots: t2, attrs: l2 }) => (S(Kt, e2.force), () => {
|
|
1397
1348
|
let { force: n2, ...a2 } = e2;
|
|
1398
|
-
return
|
|
1399
|
-
}) }),
|
|
1400
|
-
var
|
|
1401
|
-
function
|
|
1402
|
-
let a2 =
|
|
1349
|
+
return tt({ theirProps: a2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "ForcePortalRoot" });
|
|
1350
|
+
}) }), Zt = Symbol("StackContext");
|
|
1351
|
+
var Xt = ((e2) => (e2[e2.Add = 0] = "Add", e2[e2.Remove = 1] = "Remove", e2))(Xt || {});
|
|
1352
|
+
function Qt({ type: e2, enabled: t2, element: l2, onUpdate: n2 }) {
|
|
1353
|
+
let a2 = f(Zt, () => {
|
|
1403
1354
|
});
|
|
1404
1355
|
function o2(...e3) {
|
|
1405
1356
|
null == n2 || n2(...e3), a2(...e3);
|
|
@@ -1410,33 +1361,34 @@ function el({ type: e2, enabled: t2, element: l2, onUpdate: n2 }) {
|
|
|
1410
1361
|
}, { immediate: true, flush: "sync" });
|
|
1411
1362
|
}), O(() => {
|
|
1412
1363
|
t2.value && o2(1, e2, l2);
|
|
1413
|
-
}), S(
|
|
1364
|
+
}), S(Zt, o2);
|
|
1414
1365
|
}
|
|
1415
|
-
let
|
|
1416
|
-
function
|
|
1366
|
+
let el = Symbol("DescriptionContext");
|
|
1367
|
+
function tl({ slot: e2 = s({}), name: t2 = "Description", props: l2 = {} } = {}) {
|
|
1417
1368
|
let n2 = s([]);
|
|
1418
|
-
return S(
|
|
1369
|
+
return S(el, { register: function(e3) {
|
|
1419
1370
|
return n2.value.push(e3), () => {
|
|
1420
1371
|
let t3 = n2.value.indexOf(e3);
|
|
1421
1372
|
-1 !== t3 && n2.value.splice(t3, 1);
|
|
1422
1373
|
};
|
|
1423
1374
|
}, slot: e2, name: t2, props: l2 }), u(() => n2.value.length > 0 ? n2.value.join(" ") : void 0);
|
|
1424
1375
|
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1376
|
+
k({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1377
|
+
var n2;
|
|
1378
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-description-${Se()}`, o2 = function() {
|
|
1379
|
+
let e3 = f(el, null);
|
|
1428
1380
|
if (null === e3)
|
|
1429
1381
|
throw new Error("Missing parent");
|
|
1430
1382
|
return e3;
|
|
1431
1383
|
}();
|
|
1432
|
-
return y(() => O(
|
|
1433
|
-
let { name:
|
|
1434
|
-
return
|
|
1384
|
+
return y(() => O(o2.register(a2))), () => {
|
|
1385
|
+
let { name: n3 = "Description", slot: r2 = s({}), props: i2 = {} } = o2, { ...u2 } = e2, c2 = { ...Object.entries(i2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: d(l3) }), {}), id: a2 };
|
|
1386
|
+
return tt({ ourProps: c2, theirProps: u2, slot: r2.value, attrs: t2, slots: l2, name: n3 });
|
|
1435
1387
|
};
|
|
1436
1388
|
} });
|
|
1437
|
-
let
|
|
1438
|
-
let n2 = s(null), a2 = u(() =>
|
|
1439
|
-
let t3 =
|
|
1389
|
+
let ll = k({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1390
|
+
let n2 = s(null), a2 = u(() => Ee(n2)), o2 = Jt(), r2 = f(al, null), i2 = s(true === o2 || null == r2 ? function(e3) {
|
|
1391
|
+
let t3 = Ee(e3);
|
|
1440
1392
|
if (!t3) {
|
|
1441
1393
|
if (null === e3)
|
|
1442
1394
|
return null;
|
|
@@ -1450,15 +1402,15 @@ let nl = w({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
1450
1402
|
}(n2.value) : r2.resolveTarget()), d2 = s(false);
|
|
1451
1403
|
y(() => {
|
|
1452
1404
|
d2.value = true;
|
|
1453
|
-
}),
|
|
1405
|
+
}), h(() => {
|
|
1454
1406
|
o2 || null != r2 && (i2.value = r2.resolveTarget());
|
|
1455
1407
|
});
|
|
1456
|
-
let c2 =
|
|
1408
|
+
let c2 = f(nl, null), g2 = false, m2 = T();
|
|
1457
1409
|
return p(n2, () => {
|
|
1458
1410
|
if (g2 || !c2)
|
|
1459
1411
|
return;
|
|
1460
|
-
let e3 =
|
|
1461
|
-
e3 && (O(c2.register(e3),
|
|
1412
|
+
let e3 = Ce(n2);
|
|
1413
|
+
e3 && (O(c2.register(e3), m2), g2 = true);
|
|
1462
1414
|
}), O(() => {
|
|
1463
1415
|
var e3, t3;
|
|
1464
1416
|
let l3 = null == (e3 = a2.value) ? void 0 : e3.getElementById("headlessui-portal-root");
|
|
@@ -1467,39 +1419,39 @@ let nl = w({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
1467
1419
|
if (!d2.value || null === i2.value)
|
|
1468
1420
|
return null;
|
|
1469
1421
|
let a3 = { ref: n2, "data-headlessui-portal": "" };
|
|
1470
|
-
return
|
|
1422
|
+
return x(D, { to: i2.value }, tt({ ourProps: a3, theirProps: e2, slot: {}, attrs: l2, slots: t2, name: "Portal" }));
|
|
1471
1423
|
};
|
|
1472
|
-
} }),
|
|
1473
|
-
let
|
|
1424
|
+
} }), nl = Symbol("PortalParentContext");
|
|
1425
|
+
let al = Symbol("PortalGroupContext"), ol = k({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1474
1426
|
let n2 = C({ resolveTarget: () => e2.target });
|
|
1475
|
-
return S(
|
|
1427
|
+
return S(al, n2), () => {
|
|
1476
1428
|
let { target: n3, ...a2 } = e2;
|
|
1477
|
-
return
|
|
1429
|
+
return tt({ theirProps: a2, ourProps: {}, slot: {}, attrs: t2, slots: l2, name: "PortalGroup" });
|
|
1478
1430
|
};
|
|
1479
1431
|
} });
|
|
1480
|
-
var
|
|
1481
|
-
let
|
|
1482
|
-
function
|
|
1483
|
-
let t2 =
|
|
1432
|
+
var rl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(rl || {});
|
|
1433
|
+
let il = Symbol("DialogContext");
|
|
1434
|
+
function sl(e2) {
|
|
1435
|
+
let t2 = f(il, null);
|
|
1484
1436
|
if (null === t2) {
|
|
1485
1437
|
let t3 = new Error(`<${e2} /> is missing a parent <Dialog /> component.`);
|
|
1486
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1438
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, sl), t3;
|
|
1487
1439
|
}
|
|
1488
1440
|
return t2;
|
|
1489
1441
|
}
|
|
1490
|
-
let
|
|
1491
|
-
var o2;
|
|
1492
|
-
let
|
|
1442
|
+
let ul = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", dl = k({ name: "Dialog", inheritAttrs: false, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, open: { type: [Boolean, String], default: ul }, initialFocus: { type: Object, default: null }, id: { type: String, default: null }, role: { type: String, default: "dialog" } }, emits: { close: (e2) => true }, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
1443
|
+
var o2, r2;
|
|
1444
|
+
let i2 = null != (o2 = e2.id) ? o2 : `headlessui-dialog-${Se()}`, d2 = s(false);
|
|
1493
1445
|
y(() => {
|
|
1494
|
-
|
|
1446
|
+
d2.value = true;
|
|
1495
1447
|
});
|
|
1496
|
-
let
|
|
1497
|
-
if (a2({ el:
|
|
1448
|
+
let c2 = false, p2 = u(() => "dialog" === e2.role || "alertdialog" === e2.role ? e2.role : (c2 || (c2 = true, console.warn(`Invalid role [${p2}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), g2 = s(0), m2 = ct(), b2 = u(() => e2.open === ul && null !== m2 ? (m2.value & dt.Open) === dt.Open : e2.open), w2 = s(null), C2 = u(() => Ee(w2));
|
|
1449
|
+
if (a2({ el: w2, $el: w2 }), e2.open === ul && null === m2)
|
|
1498
1450
|
throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
1499
|
-
if ("boolean" != typeof
|
|
1500
|
-
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${
|
|
1501
|
-
let
|
|
1502
|
-
let e3 =
|
|
1451
|
+
if ("boolean" != typeof b2.value)
|
|
1452
|
+
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${b2.value === ul ? void 0 : e2.open}`);
|
|
1453
|
+
let O2 = u(() => d2.value && b2.value ? 0 : 1), M2 = u(() => 0 === O2.value), T2 = u(() => g2.value > 1), D2 = null !== f(il, null), [E2, I2] = function() {
|
|
1454
|
+
let e3 = f(nl, null), t3 = s([]);
|
|
1503
1455
|
function l3(l4) {
|
|
1504
1456
|
let n4 = t3.value.indexOf(l4);
|
|
1505
1457
|
-1 !== n4 && t3.value.splice(n4, 1), e3 && e3.unregister(l4);
|
|
@@ -1507,12 +1459,12 @@ let dl = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", cl = w({ name: "Dialog", inheri
|
|
|
1507
1459
|
let n3 = { register: function(n4) {
|
|
1508
1460
|
return t3.value.push(n4), e3 && e3.register(n4), () => l3(n4);
|
|
1509
1461
|
}, unregister: l3, portals: t3 };
|
|
1510
|
-
return [t3,
|
|
1462
|
+
return [t3, k({ name: "PortalWrapper", setup: (e4, { slots: t4 }) => (S(nl, n3), () => {
|
|
1511
1463
|
var e5;
|
|
1512
1464
|
return null == (e5 = t4.default) ? void 0 : e5.call(t4);
|
|
1513
1465
|
}) })];
|
|
1514
|
-
}(), { resolveContainers:
|
|
1515
|
-
let n3 = s(null), a3 =
|
|
1466
|
+
}(), { resolveContainers: _2, mainTreeNodeRef: P2, MainTreeNode: j2 } = function({ defaultContainers: e3 = [], portals: t3, mainTreeNodeRef: l3 } = {}) {
|
|
1467
|
+
let n3 = s(null), a3 = Ee(n3);
|
|
1516
1468
|
function o3() {
|
|
1517
1469
|
var l4, o4, r3;
|
|
1518
1470
|
let i3 = [];
|
|
@@ -1522,180 +1474,184 @@ let dl = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", cl = w({ name: "Dialog", inheri
|
|
|
1522
1474
|
for (let e4 of t3.value)
|
|
1523
1475
|
i3.push(e4);
|
|
1524
1476
|
for (let e4 of null != (l4 = null == a3 ? void 0 : a3.querySelectorAll("html > *, body > *")) ? l4 : [])
|
|
1525
|
-
e4 !== document.body && e4 !== document.head && e4 instanceof HTMLElement && "headlessui-portal-root" !== e4.id && (e4.contains(
|
|
1477
|
+
e4 !== document.body && e4 !== document.head && e4 instanceof HTMLElement && "headlessui-portal-root" !== e4.id && (e4.contains(Ce(n3)) || e4.contains(null == (r3 = null == (o4 = Ce(n3)) ? void 0 : o4.getRootNode()) ? void 0 : r3.host) || i3.some((t4) => e4.contains(t4)) || i3.push(e4));
|
|
1526
1478
|
return i3;
|
|
1527
1479
|
}
|
|
1528
|
-
return { resolveContainers: o3, contains: (e4) => o3().some((t4) => t4.contains(e4)), mainTreeNodeRef: n3, MainTreeNode: () => null != l3 ? null :
|
|
1529
|
-
}({ portals:
|
|
1480
|
+
return { resolveContainers: o3, contains: (e4) => o3().some((t4) => t4.contains(e4)), mainTreeNodeRef: n3, MainTreeNode: () => null != l3 ? null : x(st, { features: it.Hidden, ref: n3 }) };
|
|
1481
|
+
}({ portals: E2, defaultContainers: [u(() => {
|
|
1530
1482
|
var e3;
|
|
1531
|
-
return null != (e3 =
|
|
1532
|
-
})] }),
|
|
1483
|
+
return null != (e3 = H2.panelRef.value) ? e3 : w2.value;
|
|
1484
|
+
})] }), R2 = u(() => T2.value ? "parent" : "leaf"), B2 = u(() => null !== m2 && (m2.value & dt.Closing) === dt.Closing), A2 = u(() => !D2 && !B2.value && M2.value), L2 = u(() => {
|
|
1533
1485
|
var e3, t3, l3;
|
|
1534
|
-
return null != (l3 = Array.from(null != (t3 = null == (e3 =
|
|
1486
|
+
return null != (l3 = Array.from(null != (t3 = null == (e3 = C2.value) ? void 0 : e3.querySelectorAll("body > *")) ? t3 : []).find((e4) => "headlessui-portal-root" !== e4.id && (e4.contains(Ce(P2)) && e4 instanceof HTMLElement))) ? l3 : null;
|
|
1535
1487
|
});
|
|
1536
|
-
|
|
1537
|
-
let
|
|
1488
|
+
Wt(L2, A2);
|
|
1489
|
+
let F2 = u(() => !!T2.value || M2.value), N2 = u(() => {
|
|
1538
1490
|
var e3, t3, l3;
|
|
1539
|
-
return null != (l3 = Array.from(null != (t3 = null == (e3 =
|
|
1491
|
+
return null != (l3 = Array.from(null != (t3 = null == (e3 = C2.value) ? void 0 : e3.querySelectorAll("[data-headlessui-portal]")) ? t3 : []).find((e4) => e4.contains(Ce(P2)) && e4 instanceof HTMLElement)) ? l3 : null;
|
|
1540
1492
|
});
|
|
1541
|
-
|
|
1493
|
+
Wt(N2, F2), Qt({ type: "Dialog", enabled: u(() => 0 === O2.value), element: w2, onUpdate: (e3, t3) => {
|
|
1542
1494
|
if ("Dialog" === t3)
|
|
1543
|
-
return
|
|
1495
|
+
return Oe(e3, { [Xt.Add]: () => g2.value += 1, [Xt.Remove]: () => g2.value -= 1 });
|
|
1544
1496
|
} });
|
|
1545
|
-
let
|
|
1546
|
-
|
|
1497
|
+
let z2 = tl({ name: "DialogDescription", slot: u(() => ({ open: b2.value })) }), $2 = s(null), H2 = { titleId: $2, panelRef: s(null), dialogState: O2, setTitleId(e3) {
|
|
1498
|
+
$2.value !== e3 && ($2.value = e3);
|
|
1547
1499
|
}, close() {
|
|
1548
1500
|
t2("close", false);
|
|
1549
1501
|
} };
|
|
1550
|
-
S(
|
|
1551
|
-
let
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
},
|
|
1555
|
-
let
|
|
1556
|
-
|
|
1557
|
-
|
|
1502
|
+
S(il, H2);
|
|
1503
|
+
let V2 = u(() => !(!M2.value || T2.value));
|
|
1504
|
+
We(_2, (e3, t3) => {
|
|
1505
|
+
H2.close(), v(() => null == t3 ? void 0 : t3.focus());
|
|
1506
|
+
}, V2);
|
|
1507
|
+
let Y2 = u(() => !(T2.value || 0 !== O2.value));
|
|
1508
|
+
Bt(null == (r2 = C2.value) ? void 0 : r2.defaultView, "keydown", (e3) => {
|
|
1509
|
+
Y2.value && (e3.defaultPrevented || e3.key === gt.Escape && (e3.preventDefault(), e3.stopPropagation(), H2.close()));
|
|
1558
1510
|
});
|
|
1559
|
-
let
|
|
1560
|
-
return
|
|
1511
|
+
let U2 = u(() => !(B2.value || 0 !== O2.value || D2));
|
|
1512
|
+
return Yt(C2, U2, (e3) => {
|
|
1561
1513
|
var t3;
|
|
1562
|
-
return { containers: [...null != (t3 = e3.containers) ? t3 : [],
|
|
1563
|
-
}),
|
|
1564
|
-
if (0 !==
|
|
1514
|
+
return { containers: [...null != (t3 = e3.containers) ? t3 : [], _2] };
|
|
1515
|
+
}), h((e3) => {
|
|
1516
|
+
if (0 !== O2.value)
|
|
1565
1517
|
return;
|
|
1566
|
-
let t3 =
|
|
1518
|
+
let t3 = Ce(w2);
|
|
1567
1519
|
if (!t3)
|
|
1568
1520
|
return;
|
|
1569
1521
|
let l3 = new ResizeObserver((e4) => {
|
|
1570
1522
|
for (let t4 of e4) {
|
|
1571
1523
|
let e5 = t4.target.getBoundingClientRect();
|
|
1572
|
-
0 === e5.x && 0 === e5.y && 0 === e5.width && 0 === e5.height &&
|
|
1524
|
+
0 === e5.x && 0 === e5.y && 0 === e5.width && 0 === e5.height && H2.close();
|
|
1573
1525
|
}
|
|
1574
1526
|
});
|
|
1575
1527
|
l3.observe(t3), e3(() => l3.disconnect());
|
|
1576
1528
|
}), () => {
|
|
1577
|
-
let {
|
|
1578
|
-
return
|
|
1529
|
+
let { open: t3, initialFocus: a3, ...o3 } = e2, r3 = { ...l2, ref: w2, id: i2, role: p2.value, "aria-modal": 0 === O2.value || void 0, "aria-labelledby": $2.value, "aria-describedby": z2.value }, s2 = { open: 0 === O2.value };
|
|
1530
|
+
return x(Gt, { force: true }, () => [x(ll, () => x(ol, { target: w2.value }, () => x(Gt, { force: false }, () => x(Nt, { initialFocus: a3, containers: _2, features: M2.value ? Oe(R2.value, { parent: Nt.features.RestoreFocus, leaf: Nt.features.All & ~Nt.features.FocusLock }) : Nt.features.None }, () => x(I2, {}, () => tt({ ourProps: r3, theirProps: { ...o3, ...l2 }, slot: s2, attrs: l2, slots: n2, visible: 0 === O2.value, features: Qe.RenderStrategy | Qe.Static, name: "Dialog" })))))), x(j2)]);
|
|
1579
1531
|
};
|
|
1580
1532
|
} });
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1533
|
+
k({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1534
|
+
var n2;
|
|
1535
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-dialog-overlay-${Se()}`, o2 = sl("DialogOverlay");
|
|
1536
|
+
function r2(e3) {
|
|
1537
|
+
e3.target === e3.currentTarget && (e3.preventDefault(), e3.stopPropagation(), o2.close());
|
|
1585
1538
|
}
|
|
1586
1539
|
return () => {
|
|
1587
|
-
let {
|
|
1588
|
-
return
|
|
1540
|
+
let { ...n3 } = e2;
|
|
1541
|
+
return tt({ ourProps: { id: a2, "aria-hidden": true, onClick: r2 }, theirProps: n3, slot: { open: 0 === o2.dialogState.value }, attrs: t2, slots: l2, name: "DialogOverlay" });
|
|
1589
1542
|
};
|
|
1590
|
-
} }),
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1543
|
+
} }), k({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, inheritAttrs: false, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1544
|
+
var a2;
|
|
1545
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-dialog-backdrop-${Se()}`, r2 = sl("DialogBackdrop"), i2 = s(null);
|
|
1546
|
+
return n2({ el: i2, $el: i2 }), y(() => {
|
|
1547
|
+
if (null === r2.panelRef.value)
|
|
1594
1548
|
throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
1595
1549
|
}), () => {
|
|
1596
|
-
let {
|
|
1597
|
-
return
|
|
1550
|
+
let { ...n3 } = e2, a3 = { id: o2, ref: i2, "aria-hidden": true };
|
|
1551
|
+
return x(Gt, { force: true }, () => x(ll, () => tt({ ourProps: a3, theirProps: { ...t2, ...n3 }, slot: { open: 0 === r2.dialogState.value }, attrs: t2, slots: l2, name: "DialogBackdrop" })));
|
|
1598
1552
|
};
|
|
1599
1553
|
} });
|
|
1600
|
-
let
|
|
1601
|
-
|
|
1602
|
-
|
|
1554
|
+
let cl = k({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1555
|
+
var a2;
|
|
1556
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-dialog-panel-${Se()}`, r2 = sl("DialogPanel");
|
|
1557
|
+
function i2(e3) {
|
|
1603
1558
|
e3.stopPropagation();
|
|
1604
1559
|
}
|
|
1605
|
-
return n2({ el:
|
|
1606
|
-
let {
|
|
1607
|
-
return
|
|
1560
|
+
return n2({ el: r2.panelRef, $el: r2.panelRef }), () => {
|
|
1561
|
+
let { ...n3 } = e2;
|
|
1562
|
+
return tt({ ourProps: { id: o2, ref: r2.panelRef, onClick: i2 }, theirProps: n3, slot: { open: 0 === r2.dialogState.value }, attrs: t2, slots: l2, name: "DialogPanel" });
|
|
1608
1563
|
};
|
|
1609
|
-
} }),
|
|
1610
|
-
|
|
1564
|
+
} }), pl = k({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1565
|
+
var n2;
|
|
1566
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-dialog-title-${Se()}`, o2 = sl("DialogTitle");
|
|
1611
1567
|
return y(() => {
|
|
1612
|
-
|
|
1568
|
+
o2.setTitleId(a2), O(() => o2.setTitleId(null));
|
|
1613
1569
|
}), () => {
|
|
1614
|
-
let {
|
|
1615
|
-
return
|
|
1570
|
+
let { ...n3 } = e2;
|
|
1571
|
+
return tt({ ourProps: { id: a2 }, theirProps: n3, slot: { open: 0 === o2.dialogState.value }, attrs: t2, slots: l2, name: "DialogTitle" });
|
|
1616
1572
|
};
|
|
1617
1573
|
} });
|
|
1618
|
-
var
|
|
1574
|
+
var gl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(gl || {});
|
|
1619
1575
|
let ml = Symbol("DisclosureContext");
|
|
1620
|
-
function
|
|
1621
|
-
let t2 =
|
|
1576
|
+
function fl(e2) {
|
|
1577
|
+
let t2 = f(ml, null);
|
|
1622
1578
|
if (null === t2) {
|
|
1623
1579
|
let t3 = new Error(`<${e2} /> is missing a parent <Disclosure /> component.`);
|
|
1624
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1580
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, fl), t3;
|
|
1625
1581
|
}
|
|
1626
1582
|
return t2;
|
|
1627
1583
|
}
|
|
1628
|
-
let
|
|
1629
|
-
let
|
|
1630
|
-
let n2 = s(e2.defaultOpen ? 0 : 1), a2 = s(null), o2 = s(null), r2 = { buttonId: s(`headlessui-disclosure-button-${
|
|
1631
|
-
n2.value =
|
|
1584
|
+
let vl = Symbol("DisclosurePanelContext");
|
|
1585
|
+
let hl = k({ name: "Disclosure", props: { as: { type: [Object, String], default: "template" }, defaultOpen: { type: [Boolean], default: false } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1586
|
+
let n2 = s(e2.defaultOpen ? 0 : 1), a2 = s(null), o2 = s(null), r2 = { buttonId: s(`headlessui-disclosure-button-${Se()}`), panelId: s(`headlessui-disclosure-panel-${Se()}`), disclosureState: n2, panel: a2, button: o2, toggleDisclosure() {
|
|
1587
|
+
n2.value = Oe(n2.value, { 0: 1, 1: 0 });
|
|
1632
1588
|
}, closeDisclosure() {
|
|
1633
1589
|
1 !== n2.value && (n2.value = 1);
|
|
1634
1590
|
}, close(e3) {
|
|
1635
1591
|
r2.closeDisclosure();
|
|
1636
|
-
let t3 = e3 ? e3 instanceof HTMLElement ? e3 : e3.value instanceof HTMLElement ?
|
|
1592
|
+
let t3 = e3 ? e3 instanceof HTMLElement ? e3 : e3.value instanceof HTMLElement ? Ce(e3) : Ce(r2.button) : Ce(r2.button);
|
|
1637
1593
|
null == t3 || t3.focus();
|
|
1638
1594
|
} };
|
|
1639
|
-
return S(ml, r2),
|
|
1595
|
+
return S(ml, r2), pt(u(() => Oe(n2.value, { 0: dt.Open, 1: dt.Closed }))), () => {
|
|
1640
1596
|
let { defaultOpen: a3, ...o3 } = e2;
|
|
1641
|
-
return
|
|
1597
|
+
return tt({ theirProps: o3, ourProps: {}, slot: { open: 0 === n2.value, close: r2.close }, slots: t2, attrs: l2, name: "Disclosure" });
|
|
1642
1598
|
};
|
|
1643
|
-
} }),
|
|
1644
|
-
let a2 =
|
|
1599
|
+
} }), yl = k({ name: "DisclosureButton", props: { as: { type: [Object, String], default: "button" }, disabled: { type: [Boolean], default: false }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1600
|
+
let a2 = fl("DisclosureButton"), o2 = f(vl, null), r2 = u(() => null !== o2 && o2.value === a2.panelId.value);
|
|
1645
1601
|
y(() => {
|
|
1646
1602
|
r2.value || null !== e2.id && (a2.buttonId.value = e2.id);
|
|
1647
1603
|
}), O(() => {
|
|
1648
1604
|
r2.value || (a2.buttonId.value = null);
|
|
1649
1605
|
});
|
|
1650
1606
|
let i2 = s(null);
|
|
1651
|
-
n2({ el: i2, $el: i2 }), r2.value ||
|
|
1607
|
+
n2({ el: i2, $el: i2 }), r2.value || h(() => {
|
|
1652
1608
|
a2.button.value = i2.value;
|
|
1653
1609
|
});
|
|
1654
|
-
let d2 =
|
|
1610
|
+
let d2 = Je(u(() => ({ as: e2.as, type: t2.type })), i2);
|
|
1655
1611
|
function c2() {
|
|
1656
1612
|
var t3;
|
|
1657
|
-
e2.disabled || (r2.value ? (a2.toggleDisclosure(), null == (t3 =
|
|
1613
|
+
e2.disabled || (r2.value ? (a2.toggleDisclosure(), null == (t3 = Ce(a2.button)) || t3.focus()) : a2.toggleDisclosure());
|
|
1658
1614
|
}
|
|
1659
1615
|
function p2(t3) {
|
|
1660
1616
|
var l3;
|
|
1661
1617
|
if (!e2.disabled)
|
|
1662
1618
|
if (r2.value)
|
|
1663
1619
|
switch (t3.key) {
|
|
1664
|
-
case
|
|
1665
|
-
case
|
|
1666
|
-
t3.preventDefault(), t3.stopPropagation(), a2.toggleDisclosure(), null == (l3 =
|
|
1620
|
+
case gt.Space:
|
|
1621
|
+
case gt.Enter:
|
|
1622
|
+
t3.preventDefault(), t3.stopPropagation(), a2.toggleDisclosure(), null == (l3 = Ce(a2.button)) || l3.focus();
|
|
1667
1623
|
}
|
|
1668
1624
|
else
|
|
1669
1625
|
switch (t3.key) {
|
|
1670
|
-
case
|
|
1671
|
-
case
|
|
1626
|
+
case gt.Space:
|
|
1627
|
+
case gt.Enter:
|
|
1672
1628
|
t3.preventDefault(), t3.stopPropagation(), a2.toggleDisclosure();
|
|
1673
1629
|
}
|
|
1674
1630
|
}
|
|
1675
1631
|
function g2(e3) {
|
|
1676
|
-
if (e3.key ===
|
|
1632
|
+
if (e3.key === gt.Space)
|
|
1677
1633
|
e3.preventDefault();
|
|
1678
1634
|
}
|
|
1679
1635
|
return () => {
|
|
1680
1636
|
var n3;
|
|
1681
1637
|
let o3 = { open: 0 === a2.disclosureState.value }, { id: s2, ...u2 } = e2;
|
|
1682
|
-
return
|
|
1638
|
+
return tt({ ourProps: r2.value ? { ref: i2, type: d2.value, onClick: c2, onKeydown: p2 } : { id: null != (n3 = a2.buttonId.value) ? n3 : s2, ref: i2, type: d2.value, "aria-expanded": 0 === a2.disclosureState.value, "aria-controls": 0 === a2.disclosureState.value || Ce(a2.panel) ? a2.panelId.value : void 0, disabled: !!e2.disabled || void 0, onClick: c2, onKeydown: p2, onKeyup: g2 }, theirProps: u2, slot: o3, attrs: t2, slots: l2, name: "DisclosureButton" });
|
|
1683
1639
|
};
|
|
1684
|
-
} }),
|
|
1685
|
-
let a2 =
|
|
1640
|
+
} }), bl = k({ name: "DisclosurePanel", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1641
|
+
let a2 = fl("DisclosurePanel");
|
|
1686
1642
|
y(() => {
|
|
1687
1643
|
null !== e2.id && (a2.panelId.value = e2.id);
|
|
1688
1644
|
}), O(() => {
|
|
1689
1645
|
a2.panelId.value = null;
|
|
1690
|
-
}), n2({ el: a2.panel, $el: a2.panel }), S(
|
|
1691
|
-
let o2 =
|
|
1646
|
+
}), n2({ el: a2.panel, $el: a2.panel }), S(vl, a2.panelId);
|
|
1647
|
+
let o2 = ct(), r2 = u(() => null !== o2 ? (o2.value & dt.Open) === dt.Open : 0 === a2.disclosureState.value);
|
|
1692
1648
|
return () => {
|
|
1693
1649
|
var n3;
|
|
1694
1650
|
let o3 = { open: 0 === a2.disclosureState.value, close: a2.close }, { id: i2, ...s2 } = e2;
|
|
1695
|
-
return
|
|
1651
|
+
return tt({ ourProps: { id: null != (n3 = a2.panelId.value) ? n3 : i2, ref: a2.panel }, theirProps: s2, slot: o3, attrs: t2, slots: l2, features: Qe.RenderStrategy | Qe.Static, visible: r2.value, name: "DisclosurePanel" });
|
|
1696
1652
|
};
|
|
1697
|
-
} }),
|
|
1698
|
-
function
|
|
1653
|
+
} }), xl = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
1654
|
+
function wl(e2) {
|
|
1699
1655
|
var t2, l2;
|
|
1700
1656
|
let n2 = null != (t2 = e2.innerText) ? t2 : "", a2 = e2.cloneNode(true);
|
|
1701
1657
|
if (!(a2 instanceof HTMLElement))
|
|
@@ -1704,12 +1660,12 @@ function kl(e2) {
|
|
|
1704
1660
|
for (let e3 of a2.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
|
|
1705
1661
|
e3.remove(), o2 = true;
|
|
1706
1662
|
let r2 = o2 ? null != (l2 = a2.innerText) ? l2 : "" : n2;
|
|
1707
|
-
return
|
|
1663
|
+
return xl.test(r2) && (r2 = r2.replace(xl, "")), r2;
|
|
1708
1664
|
}
|
|
1709
|
-
function
|
|
1665
|
+
function kl(e2) {
|
|
1710
1666
|
let t2 = s(""), l2 = s("");
|
|
1711
1667
|
return () => {
|
|
1712
|
-
let n2 =
|
|
1668
|
+
let n2 = Ce(e2);
|
|
1713
1669
|
if (!n2)
|
|
1714
1670
|
return "";
|
|
1715
1671
|
let a2 = n2.innerText;
|
|
@@ -1725,38 +1681,38 @@ function Sl(e2) {
|
|
|
1725
1681
|
let t4 = document.getElementById(e5);
|
|
1726
1682
|
if (t4) {
|
|
1727
1683
|
let e6 = t4.getAttribute("aria-label");
|
|
1728
|
-
return "string" == typeof e6 ? e6.trim() :
|
|
1684
|
+
return "string" == typeof e6 ? e6.trim() : wl(t4).trim();
|
|
1729
1685
|
}
|
|
1730
1686
|
return null;
|
|
1731
1687
|
}).filter(Boolean);
|
|
1732
1688
|
if (e4.length > 0)
|
|
1733
1689
|
return e4.join(", ");
|
|
1734
1690
|
}
|
|
1735
|
-
return
|
|
1691
|
+
return wl(e3).trim();
|
|
1736
1692
|
}(n2).trim().toLowerCase();
|
|
1737
1693
|
return t2.value = a2, l2.value = o2, o2;
|
|
1738
1694
|
};
|
|
1739
1695
|
}
|
|
1740
|
-
var
|
|
1741
|
-
let
|
|
1742
|
-
function
|
|
1743
|
-
let t2 =
|
|
1696
|
+
var Sl = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(Sl || {}), Cl = ((e2) => (e2[e2.Pointer = 0] = "Pointer", e2[e2.Other = 1] = "Other", e2))(Cl || {});
|
|
1697
|
+
let Ol = Symbol("MenuContext");
|
|
1698
|
+
function Ml(e2) {
|
|
1699
|
+
let t2 = f(Ol, null);
|
|
1744
1700
|
if (null === t2) {
|
|
1745
1701
|
let t3 = new Error(`<${e2} /> is missing a parent <Menu /> component.`);
|
|
1746
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1702
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, Ml), t3;
|
|
1747
1703
|
}
|
|
1748
1704
|
return t2;
|
|
1749
1705
|
}
|
|
1750
|
-
let
|
|
1706
|
+
let Tl = k({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1751
1707
|
let n2 = s(1), a2 = s(null), o2 = s(null), r2 = s([]), i2 = s(""), d2 = s(null), c2 = s(1);
|
|
1752
1708
|
function p2(e3 = (e4) => e4) {
|
|
1753
|
-
let t3 = null !== d2.value ? r2.value[d2.value] : null, l3 =
|
|
1709
|
+
let t3 = null !== d2.value ? r2.value[d2.value] : null, l3 = $e(e3(r2.value.slice()), (e4) => Ce(e4.dataRef.domRef)), n3 = t3 ? l3.indexOf(t3) : null;
|
|
1754
1710
|
return -1 === n3 && (n3 = null), { items: l3, activeItemIndex: n3 };
|
|
1755
1711
|
}
|
|
1756
1712
|
let g2 = { menuState: n2, buttonRef: a2, itemsRef: o2, items: r2, searchQuery: i2, activeItemIndex: d2, activationTrigger: c2, closeMenu: () => {
|
|
1757
1713
|
n2.value = 1, d2.value = null;
|
|
1758
1714
|
}, openMenu: () => n2.value = 0, goToItem(e3, t3, l3) {
|
|
1759
|
-
let n3 = p2(), a3 =
|
|
1715
|
+
let n3 = p2(), a3 = vt(e3 === ft.Specific ? { focus: ft.Specific, id: t3 } : { focus: e3 }, { resolveItems: () => n3.items, resolveActiveIndex: () => n3.activeItemIndex, resolveId: (e4) => e4.id, resolveDisabled: (e4) => e4.dataRef.disabled });
|
|
1760
1716
|
i2.value = "", d2.value = a3, c2.value = null != l3 ? l3 : 1, r2.value = n3.items;
|
|
1761
1717
|
}, search(e3) {
|
|
1762
1718
|
let t3 = "" !== i2.value ? 0 : 1;
|
|
@@ -1775,185 +1731,189 @@ let Dl = w({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1775
1731
|
});
|
|
1776
1732
|
r2.value = t3.items, d2.value = t3.activeItemIndex, c2.value = 1;
|
|
1777
1733
|
} };
|
|
1778
|
-
return
|
|
1734
|
+
return We([a2, o2], (e3, t3) => {
|
|
1779
1735
|
var l3;
|
|
1780
|
-
g2.closeMenu(),
|
|
1781
|
-
}, u(() => 0 === n2.value)), S(
|
|
1736
|
+
g2.closeMenu(), Ae(t3, Be.Loose) || (e3.preventDefault(), null == (l3 = Ce(a2)) || l3.focus());
|
|
1737
|
+
}, u(() => 0 === n2.value)), S(Ol, g2), pt(u(() => Oe(n2.value, { 0: dt.Open, 1: dt.Closed }))), () => {
|
|
1782
1738
|
let a3 = { open: 0 === n2.value, close: g2.closeMenu };
|
|
1783
|
-
return
|
|
1739
|
+
return tt({ ourProps: {}, theirProps: e2, slot: a3, slots: t2, attrs: l2, name: "Menu" });
|
|
1784
1740
|
};
|
|
1785
|
-
} }),
|
|
1786
|
-
|
|
1787
|
-
|
|
1741
|
+
} }), Dl = k({ name: "MenuButton", props: { disabled: { type: Boolean, default: false }, as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1742
|
+
var a2;
|
|
1743
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-button-${Se()}`, r2 = Ml("MenuButton");
|
|
1744
|
+
function i2(e3) {
|
|
1788
1745
|
switch (e3.key) {
|
|
1789
|
-
case
|
|
1790
|
-
case
|
|
1791
|
-
case
|
|
1792
|
-
e3.preventDefault(), e3.stopPropagation(),
|
|
1746
|
+
case gt.Space:
|
|
1747
|
+
case gt.Enter:
|
|
1748
|
+
case gt.ArrowDown:
|
|
1749
|
+
e3.preventDefault(), e3.stopPropagation(), r2.openMenu(), v(() => {
|
|
1793
1750
|
var e4;
|
|
1794
|
-
null == (e4 =
|
|
1751
|
+
null == (e4 = Ce(r2.itemsRef)) || e4.focus({ preventScroll: true }), r2.goToItem(ft.First);
|
|
1795
1752
|
});
|
|
1796
1753
|
break;
|
|
1797
|
-
case
|
|
1798
|
-
e3.preventDefault(), e3.stopPropagation(),
|
|
1754
|
+
case gt.ArrowUp:
|
|
1755
|
+
e3.preventDefault(), e3.stopPropagation(), r2.openMenu(), v(() => {
|
|
1799
1756
|
var e4;
|
|
1800
|
-
null == (e4 =
|
|
1757
|
+
null == (e4 = Ce(r2.itemsRef)) || e4.focus({ preventScroll: true }), r2.goToItem(ft.Last);
|
|
1801
1758
|
});
|
|
1802
1759
|
}
|
|
1803
1760
|
}
|
|
1804
|
-
function
|
|
1805
|
-
if (e3.key ===
|
|
1761
|
+
function s2(e3) {
|
|
1762
|
+
if (e3.key === gt.Space)
|
|
1806
1763
|
e3.preventDefault();
|
|
1807
1764
|
}
|
|
1808
|
-
function
|
|
1809
|
-
e2.disabled || (0 ===
|
|
1765
|
+
function d2(t3) {
|
|
1766
|
+
e2.disabled || (0 === r2.menuState.value ? (r2.closeMenu(), v(() => {
|
|
1810
1767
|
var e3;
|
|
1811
|
-
return null == (e3 =
|
|
1812
|
-
})) : (t3.preventDefault(),
|
|
1768
|
+
return null == (e3 = Ce(r2.buttonRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1769
|
+
})) : (t3.preventDefault(), r2.openMenu(), function(e3) {
|
|
1813
1770
|
requestAnimationFrame(() => requestAnimationFrame(e3));
|
|
1814
1771
|
}(() => {
|
|
1815
1772
|
var e3;
|
|
1816
|
-
return null == (e3 =
|
|
1773
|
+
return null == (e3 = Ce(r2.itemsRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1817
1774
|
})));
|
|
1818
1775
|
}
|
|
1819
|
-
n2({ el:
|
|
1820
|
-
let
|
|
1776
|
+
n2({ el: r2.buttonRef, $el: r2.buttonRef });
|
|
1777
|
+
let c2 = Je(u(() => ({ as: e2.as, type: t2.type })), r2.buttonRef);
|
|
1821
1778
|
return () => {
|
|
1822
1779
|
var n3;
|
|
1823
|
-
let
|
|
1824
|
-
return
|
|
1780
|
+
let a3 = { open: 0 === r2.menuState.value }, { ...u2 } = e2;
|
|
1781
|
+
return tt({ ourProps: { ref: r2.buttonRef, id: o2, type: c2.value, "aria-haspopup": "menu", "aria-controls": null == (n3 = Ce(r2.itemsRef)) ? void 0 : n3.id, "aria-expanded": 0 === r2.menuState.value, onKeydown: i2, onKeyup: s2, onClick: d2 }, theirProps: u2, slot: a3, attrs: t2, slots: l2, name: "MenuButton" });
|
|
1825
1782
|
};
|
|
1826
|
-
} }),
|
|
1827
|
-
|
|
1828
|
-
|
|
1783
|
+
} }), El = k({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: null } }, setup(e2, { attrs: t2, slots: l2, expose: n2 }) {
|
|
1784
|
+
var a2;
|
|
1785
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-items-${Se()}`, r2 = Ml("MenuItems"), i2 = s(null);
|
|
1786
|
+
function d2(e3) {
|
|
1829
1787
|
var t3;
|
|
1830
|
-
switch (
|
|
1831
|
-
case
|
|
1832
|
-
if ("" !==
|
|
1833
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1834
|
-
case
|
|
1835
|
-
if (e3.preventDefault(), e3.stopPropagation(), null !==
|
|
1836
|
-
null == (t3 =
|
|
1788
|
+
switch (i2.value && clearTimeout(i2.value), e3.key) {
|
|
1789
|
+
case gt.Space:
|
|
1790
|
+
if ("" !== r2.searchQuery.value)
|
|
1791
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.search(e3.key);
|
|
1792
|
+
case gt.Enter:
|
|
1793
|
+
if (e3.preventDefault(), e3.stopPropagation(), null !== r2.activeItemIndex.value) {
|
|
1794
|
+
null == (t3 = Ce(r2.items.value[r2.activeItemIndex.value].dataRef.domRef)) || t3.click();
|
|
1837
1795
|
}
|
|
1838
|
-
|
|
1796
|
+
r2.closeMenu(), Le(Ce(r2.buttonRef));
|
|
1839
1797
|
break;
|
|
1840
|
-
case
|
|
1841
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1842
|
-
case
|
|
1843
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1844
|
-
case
|
|
1845
|
-
case
|
|
1846
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1847
|
-
case
|
|
1848
|
-
case
|
|
1849
|
-
return e3.preventDefault(), e3.stopPropagation(),
|
|
1850
|
-
case
|
|
1851
|
-
e3.preventDefault(), e3.stopPropagation(),
|
|
1798
|
+
case gt.ArrowDown:
|
|
1799
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(ft.Next);
|
|
1800
|
+
case gt.ArrowUp:
|
|
1801
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(ft.Previous);
|
|
1802
|
+
case gt.Home:
|
|
1803
|
+
case gt.PageUp:
|
|
1804
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(ft.First);
|
|
1805
|
+
case gt.End:
|
|
1806
|
+
case gt.PageDown:
|
|
1807
|
+
return e3.preventDefault(), e3.stopPropagation(), r2.goToItem(ft.Last);
|
|
1808
|
+
case gt.Escape:
|
|
1809
|
+
e3.preventDefault(), e3.stopPropagation(), r2.closeMenu(), v(() => {
|
|
1852
1810
|
var e4;
|
|
1853
|
-
return null == (e4 =
|
|
1811
|
+
return null == (e4 = Ce(r2.buttonRef)) ? void 0 : e4.focus({ preventScroll: true });
|
|
1854
1812
|
});
|
|
1855
1813
|
break;
|
|
1856
|
-
case
|
|
1857
|
-
e3.preventDefault(), e3.stopPropagation(),
|
|
1858
|
-
return
|
|
1859
|
-
}(
|
|
1814
|
+
case gt.Tab:
|
|
1815
|
+
e3.preventDefault(), e3.stopPropagation(), r2.closeMenu(), v(() => function(e4, t4) {
|
|
1816
|
+
return He(Re(), t4, { relativeTo: e4 });
|
|
1817
|
+
}(Ce(r2.buttonRef), e3.shiftKey ? _e.Previous : _e.Next));
|
|
1860
1818
|
break;
|
|
1861
1819
|
default:
|
|
1862
|
-
1 === e3.key.length && (
|
|
1820
|
+
1 === e3.key.length && (r2.search(e3.key), i2.value = setTimeout(() => r2.clearSearch(), 350));
|
|
1863
1821
|
}
|
|
1864
1822
|
}
|
|
1865
|
-
function
|
|
1866
|
-
if (e3.key ===
|
|
1823
|
+
function c2(e3) {
|
|
1824
|
+
if (e3.key === gt.Space)
|
|
1867
1825
|
e3.preventDefault();
|
|
1868
1826
|
}
|
|
1869
|
-
n2({ el:
|
|
1827
|
+
n2({ el: r2.itemsRef, $el: r2.itemsRef }), Xe({ container: u(() => Ce(r2.itemsRef)), enabled: u(() => 0 === r2.menuState.value), accept: (e3) => "menuitem" === e3.getAttribute("role") ? NodeFilter.FILTER_REJECT : e3.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT, walk(e3) {
|
|
1870
1828
|
e3.setAttribute("role", "none");
|
|
1871
1829
|
} });
|
|
1872
|
-
let
|
|
1830
|
+
let p2 = ct(), g2 = u(() => null !== p2 ? (p2.value & dt.Open) === dt.Open : 0 === r2.menuState.value);
|
|
1873
1831
|
return () => {
|
|
1874
|
-
var n3,
|
|
1875
|
-
let
|
|
1876
|
-
return
|
|
1832
|
+
var n3, a3;
|
|
1833
|
+
let i3 = { open: 0 === r2.menuState.value }, { ...s2 } = e2;
|
|
1834
|
+
return tt({ ourProps: { "aria-activedescendant": null === r2.activeItemIndex.value || null == (n3 = r2.items.value[r2.activeItemIndex.value]) ? void 0 : n3.id, "aria-labelledby": null == (a3 = Ce(r2.buttonRef)) ? void 0 : a3.id, id: o2, onKeydown: d2, onKeyup: c2, role: "menu", tabIndex: 0, ref: r2.itemsRef }, theirProps: s2, slot: i3, attrs: t2, slots: l2, features: Qe.RenderStrategy | Qe.Static, visible: g2.value, name: "MenuItems" });
|
|
1877
1835
|
};
|
|
1878
|
-
} }),
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1836
|
+
} }), Il = k({ name: "MenuItem", inheritAttrs: false, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: false }, id: { type: String, default: null } }, setup(e2, { slots: t2, attrs: l2, expose: n2 }) {
|
|
1837
|
+
var a2;
|
|
1838
|
+
let o2 = null != (a2 = e2.id) ? a2 : `headlessui-menu-item-${Se()}`, r2 = Ml("MenuItem"), i2 = s(null);
|
|
1839
|
+
n2({ el: i2, $el: i2 });
|
|
1840
|
+
let d2 = u(() => null !== r2.activeItemIndex.value && r2.items.value[r2.activeItemIndex.value].id === o2), c2 = kl(i2), p2 = u(() => ({ disabled: e2.disabled, get textValue() {
|
|
1841
|
+
return c2();
|
|
1842
|
+
}, domRef: i2 }));
|
|
1843
|
+
function g2(t3) {
|
|
1885
1844
|
if (e2.disabled)
|
|
1886
1845
|
return t3.preventDefault();
|
|
1887
|
-
|
|
1846
|
+
r2.closeMenu(), Le(Ce(r2.buttonRef));
|
|
1888
1847
|
}
|
|
1889
|
-
function
|
|
1848
|
+
function m2() {
|
|
1890
1849
|
if (e2.disabled)
|
|
1891
|
-
return
|
|
1892
|
-
|
|
1850
|
+
return r2.goToItem(ft.Nothing);
|
|
1851
|
+
r2.goToItem(ft.Specific, o2);
|
|
1893
1852
|
}
|
|
1894
|
-
y(() =>
|
|
1895
|
-
0 ===
|
|
1853
|
+
y(() => r2.registerItem(o2, p2)), O(() => r2.unregisterItem(o2)), h(() => {
|
|
1854
|
+
0 === r2.menuState.value && d2.value && 0 !== r2.activationTrigger.value && v(() => {
|
|
1896
1855
|
var e3, t3;
|
|
1897
|
-
return null == (t3 = null == (e3 =
|
|
1856
|
+
return null == (t3 = null == (e3 = Ce(i2)) ? void 0 : e3.scrollIntoView) ? void 0 : t3.call(e3, { block: "nearest" });
|
|
1898
1857
|
});
|
|
1899
1858
|
});
|
|
1900
|
-
let
|
|
1901
|
-
function
|
|
1902
|
-
|
|
1859
|
+
let f2 = Ze();
|
|
1860
|
+
function b2(e3) {
|
|
1861
|
+
f2.update(e3);
|
|
1903
1862
|
}
|
|
1904
|
-
function
|
|
1905
|
-
|
|
1863
|
+
function x2(t3) {
|
|
1864
|
+
f2.wasMoved(t3) && (e2.disabled || d2.value || r2.goToItem(ft.Specific, o2, 0));
|
|
1906
1865
|
}
|
|
1907
|
-
function
|
|
1908
|
-
|
|
1866
|
+
function w2(t3) {
|
|
1867
|
+
f2.wasMoved(t3) && (e2.disabled || d2.value && r2.goToItem(ft.Nothing));
|
|
1909
1868
|
}
|
|
1910
1869
|
return () => {
|
|
1911
|
-
let { disabled: n3 } = e2,
|
|
1912
|
-
return
|
|
1870
|
+
let { disabled: n3 } = e2, a3 = { active: d2.value, disabled: n3, close: r2.closeMenu }, { ...s2 } = e2;
|
|
1871
|
+
return tt({ ourProps: { id: o2, ref: i2, role: "menuitem", tabIndex: true === n3 ? void 0 : -1, "aria-disabled": true === n3 || void 0, disabled: void 0, onClick: g2, onFocus: m2, onPointerenter: b2, onMouseenter: b2, onPointermove: x2, onMousemove: x2, onPointerleave: w2, onMouseleave: w2 }, theirProps: { ...l2, ...s2 }, slot: a3, attrs: l2, slots: t2, name: "MenuItem" });
|
|
1913
1872
|
};
|
|
1914
|
-
} }),
|
|
1915
|
-
function
|
|
1916
|
-
let e2 =
|
|
1873
|
+
} }), _l = Symbol("LabelContext");
|
|
1874
|
+
function Pl() {
|
|
1875
|
+
let e2 = f(_l, null);
|
|
1917
1876
|
if (null === e2) {
|
|
1918
1877
|
let e3 = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
1919
|
-
throw Error.captureStackTrace && Error.captureStackTrace(e3,
|
|
1878
|
+
throw Error.captureStackTrace && Error.captureStackTrace(e3, Pl), e3;
|
|
1920
1879
|
}
|
|
1921
1880
|
return e2;
|
|
1922
1881
|
}
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
};
|
|
1930
|
-
}, slot: e2, name: t2, props: l2 }), u(() => n2.value.length > 0 ? n2.value.join(" ") : void 0);
|
|
1931
|
-
}
|
|
1932
|
-
let Bl = w({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false }, id: { type: String, default: () => `headlessui-label-${Ce()}` } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1933
|
-
let n2 = jl();
|
|
1934
|
-
return y(() => O(n2.register(e2.id))), () => {
|
|
1935
|
-
let { name: a2 = "Label", slot: o2 = {}, props: r2 = {} } = n2, { id: i2, passive: s2, ...u2 } = e2, c2 = { ...Object.entries(r2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: d(l3) }), {}), id: i2 };
|
|
1936
|
-
return s2 && (delete c2.onClick, delete c2.htmlFor, delete u2.onClick), lt({ ourProps: c2, theirProps: u2, slot: o2, attrs: l2, slots: t2, name: a2 });
|
|
1882
|
+
let jl = k({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false }, id: { type: String, default: null } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1883
|
+
var n2;
|
|
1884
|
+
let a2 = null != (n2 = e2.id) ? n2 : `headlessui-label-${Se()}`, o2 = Pl();
|
|
1885
|
+
return y(() => O(o2.register(a2))), () => {
|
|
1886
|
+
let { name: n3 = "Label", slot: r2 = {}, props: i2 = {} } = o2, { passive: s2, ...u2 } = e2, c2 = { ...Object.entries(i2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: d(l3) }), {}), id: a2 };
|
|
1887
|
+
return s2 && (delete c2.onClick, delete c2.htmlFor, delete u2.onClick), tt({ ourProps: c2, theirProps: u2, slot: r2, attrs: l2, slots: t2, name: n3 });
|
|
1937
1888
|
};
|
|
1938
|
-
} }),
|
|
1939
|
-
let n2 = s(null), a2 =
|
|
1889
|
+
} }), Rl = Symbol("GroupContext"), Bl = k({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1890
|
+
let n2 = s(null), a2 = function({ slot: e3 = {}, name: t3 = "Label", props: l3 = {} } = {}) {
|
|
1891
|
+
let n3 = s([]);
|
|
1892
|
+
return S(_l, { register: function(e4) {
|
|
1893
|
+
return n3.value.push(e4), () => {
|
|
1894
|
+
let t4 = n3.value.indexOf(e4);
|
|
1895
|
+
-1 !== t4 && n3.value.splice(t4, 1);
|
|
1896
|
+
};
|
|
1897
|
+
}, slot: e3, name: t3, props: l3 }), u(() => n3.value.length > 0 ? n3.value.join(" ") : void 0);
|
|
1898
|
+
}({ name: "SwitchLabel", props: { htmlFor: u(() => {
|
|
1940
1899
|
var e3;
|
|
1941
1900
|
return null == (e3 = n2.value) ? void 0 : e3.id;
|
|
1942
1901
|
}), onClick(e3) {
|
|
1943
1902
|
n2.value && ("LABEL" === e3.currentTarget.tagName && e3.preventDefault(), n2.value.click(), n2.value.focus({ preventScroll: true }));
|
|
1944
|
-
} } }), o2 =
|
|
1945
|
-
return S(
|
|
1946
|
-
} }),
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1903
|
+
} } }), o2 = tl({ name: "SwitchDescription" });
|
|
1904
|
+
return S(Rl, { switchRef: n2, labelledby: a2, describedby: o2 }), () => tt({ theirProps: e2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "SwitchGroup" });
|
|
1905
|
+
} }), Al = k({ name: "Switch", emits: { "update:modelValue": (e2) => true }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: true }, form: { type: String, optional: true }, name: { type: String, optional: true }, value: { type: String, optional: true }, id: { type: String, default: null } }, inheritAttrs: false, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: a2 }) {
|
|
1906
|
+
var o2;
|
|
1907
|
+
let r2 = null != (o2 = e2.id) ? o2 : `headlessui-switch-${Se()}`, i2 = f(Rl, null), [d2, c2] = xe(u(() => e2.modelValue), (e3) => t2("update:modelValue", e3), u(() => e2.defaultChecked));
|
|
1908
|
+
function g2() {
|
|
1909
|
+
c2(!d2.value);
|
|
1950
1910
|
}
|
|
1951
|
-
let
|
|
1952
|
-
function
|
|
1953
|
-
e3.preventDefault(),
|
|
1911
|
+
let m2 = s(null), v2 = null === i2 ? m2 : i2.switchRef, h2 = Je(u(() => ({ as: e2.as, type: l2.type })), v2);
|
|
1912
|
+
function b2(e3) {
|
|
1913
|
+
e3.preventDefault(), g2();
|
|
1954
1914
|
}
|
|
1955
|
-
function
|
|
1956
|
-
e3.key ===
|
|
1915
|
+
function k2(e3) {
|
|
1916
|
+
e3.key === gt.Space ? (e3.preventDefault(), g2()) : e3.key === gt.Enter && function(e4) {
|
|
1957
1917
|
var t3, l3;
|
|
1958
1918
|
let n3 = null != (t3 = null == e4 ? void 0 : e4.form) ? t3 : e4.closest("form");
|
|
1959
1919
|
if (n3) {
|
|
@@ -1964,39 +1924,39 @@ let Bl = w({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
1964
1924
|
}
|
|
1965
1925
|
}(e3.currentTarget);
|
|
1966
1926
|
}
|
|
1967
|
-
function
|
|
1927
|
+
function S2(e3) {
|
|
1968
1928
|
e3.preventDefault();
|
|
1969
1929
|
}
|
|
1970
|
-
a2({ el:
|
|
1971
|
-
let
|
|
1930
|
+
a2({ el: v2, $el: v2 });
|
|
1931
|
+
let C2 = u(() => {
|
|
1972
1932
|
var e3, t3;
|
|
1973
|
-
return null == (t3 = null == (e3 =
|
|
1933
|
+
return null == (t3 = null == (e3 = Ce(v2)) ? void 0 : e3.closest) ? void 0 : t3.call(e3, "form");
|
|
1974
1934
|
});
|
|
1975
1935
|
return y(() => {
|
|
1976
|
-
p([
|
|
1977
|
-
if (
|
|
1978
|
-
return
|
|
1936
|
+
p([C2], () => {
|
|
1937
|
+
if (C2.value && void 0 !== e2.defaultChecked)
|
|
1938
|
+
return C2.value.addEventListener("reset", t3), () => {
|
|
1979
1939
|
var e3;
|
|
1980
|
-
null == (e3 =
|
|
1940
|
+
null == (e3 = C2.value) || e3.removeEventListener("reset", t3);
|
|
1981
1941
|
};
|
|
1982
1942
|
function t3() {
|
|
1983
|
-
|
|
1943
|
+
c2(e2.defaultChecked);
|
|
1984
1944
|
}
|
|
1985
1945
|
}, { immediate: true });
|
|
1986
1946
|
}), () => {
|
|
1987
|
-
let {
|
|
1988
|
-
return
|
|
1947
|
+
let { name: t3, value: a3, form: o3, ...s2 } = e2, u2 = { checked: d2.value }, c3 = { id: r2, ref: v2, role: "switch", type: h2.value, tabIndex: 0, "aria-checked": d2.value, "aria-labelledby": null == i2 ? void 0 : i2.labelledby.value, "aria-describedby": null == i2 ? void 0 : i2.describedby.value, onClick: b2, onKeyup: k2, onKeypress: S2 };
|
|
1948
|
+
return x(w, [null != t3 && null != d2.value ? x(st, ot({ features: it.Hidden, as: "input", type: "checkbox", hidden: true, readOnly: true, checked: d2.value, form: o3, name: t3, value: a3 })) : null, tt({ ourProps: c3, theirProps: { ...l2, ...rt(s2, ["modelValue", "defaultChecked"]) }, slot: u2, attrs: l2, slots: n2, name: "Switch" })]);
|
|
1989
1949
|
};
|
|
1990
|
-
} }),
|
|
1991
|
-
function
|
|
1950
|
+
} }), Ll = jl;
|
|
1951
|
+
function Fl(e2, ...t2) {
|
|
1992
1952
|
e2 && t2.length > 0 && e2.classList.add(...t2);
|
|
1993
1953
|
}
|
|
1994
|
-
function
|
|
1954
|
+
function Nl(e2, ...t2) {
|
|
1995
1955
|
e2 && t2.length > 0 && e2.classList.remove(...t2);
|
|
1996
1956
|
}
|
|
1997
|
-
var
|
|
1998
|
-
function
|
|
1999
|
-
let r2 =
|
|
1957
|
+
var zl = ((e2) => (e2.Finished = "finished", e2.Cancelled = "cancelled", e2))(zl || {});
|
|
1958
|
+
function $l(e2, t2, l2, n2, a2, o2) {
|
|
1959
|
+
let r2 = yt(), i2 = void 0 !== o2 ? function(e3) {
|
|
2000
1960
|
let t3 = { called: false };
|
|
2001
1961
|
return (...l3) => {
|
|
2002
1962
|
if (!t3.called)
|
|
@@ -2004,9 +1964,9 @@ function Vl(e2, t2, l2, n2, a2, o2) {
|
|
|
2004
1964
|
};
|
|
2005
1965
|
}(o2) : () => {
|
|
2006
1966
|
};
|
|
2007
|
-
return
|
|
2008
|
-
|
|
2009
|
-
let l3 =
|
|
1967
|
+
return Nl(e2, ...a2), Fl(e2, ...t2, ...l2), r2.nextFrame(() => {
|
|
1968
|
+
Nl(e2, ...l2), Fl(e2, ...n2), r2.add(function(e3, t3) {
|
|
1969
|
+
let l3 = yt();
|
|
2010
1970
|
if (!e3)
|
|
2011
1971
|
return l3.dispose;
|
|
2012
1972
|
let { transitionDuration: n3, transitionDelay: a3 } = getComputedStyle(e3), [o3, r3] = [n3, a3].map((e4) => {
|
|
@@ -2014,79 +1974,79 @@ function Vl(e2, t2, l2, n2, a2, o2) {
|
|
|
2014
1974
|
return t4;
|
|
2015
1975
|
});
|
|
2016
1976
|
return 0 !== o3 ? l3.setTimeout(() => t3("finished"), o3 + r3) : t3("finished"), l3.add(() => t3("cancelled")), l3.dispose;
|
|
2017
|
-
}(e2, (l3) => (
|
|
2018
|
-
}), r2.add(() =>
|
|
1977
|
+
}(e2, (l3) => (Nl(e2, ...n2, ...t2), Fl(e2, ...a2), i2(l3))));
|
|
1978
|
+
}), r2.add(() => Nl(e2, ...t2, ...l2, ...n2, ...a2)), r2.add(() => i2("cancelled")), r2.dispose;
|
|
2019
1979
|
}
|
|
2020
|
-
function
|
|
1980
|
+
function Hl(e2 = "") {
|
|
2021
1981
|
return e2.split(/\s+/).filter((e3) => e3.length > 1);
|
|
2022
1982
|
}
|
|
2023
|
-
let
|
|
2024
|
-
var
|
|
2025
|
-
let
|
|
2026
|
-
function
|
|
2027
|
-
return "children" in e2 ?
|
|
1983
|
+
let Vl = Symbol("TransitionContext");
|
|
1984
|
+
var Yl = ((e2) => (e2.Visible = "visible", e2.Hidden = "hidden", e2))(Yl || {});
|
|
1985
|
+
let Ul = Symbol("NestingContext");
|
|
1986
|
+
function ql(e2) {
|
|
1987
|
+
return "children" in e2 ? ql(e2.children) : e2.value.filter(({ state: e3 }) => "visible" === e3).length > 0;
|
|
2028
1988
|
}
|
|
2029
|
-
function
|
|
1989
|
+
function Wl(e2) {
|
|
2030
1990
|
let t2 = s([]), l2 = s(false);
|
|
2031
|
-
function n2(n3, a2 =
|
|
1991
|
+
function n2(n3, a2 = et.Hidden) {
|
|
2032
1992
|
let o2 = t2.value.findIndex(({ id: e3 }) => e3 === n3);
|
|
2033
|
-
-1 !== o2 && (
|
|
1993
|
+
-1 !== o2 && (Oe(a2, { [et.Unmount]() {
|
|
2034
1994
|
t2.value.splice(o2, 1);
|
|
2035
|
-
}, [
|
|
1995
|
+
}, [et.Hidden]() {
|
|
2036
1996
|
t2.value[o2].state = "hidden";
|
|
2037
|
-
} }), !
|
|
1997
|
+
} }), !ql(t2) && l2.value && (null == e2 || e2()));
|
|
2038
1998
|
}
|
|
2039
1999
|
return y(() => l2.value = true), O(() => l2.value = false), { children: t2, register: function(e3) {
|
|
2040
2000
|
let l3 = t2.value.find(({ id: t3 }) => t3 === e3);
|
|
2041
|
-
return l3 ? "visible" !== l3.state && (l3.state = "visible") : t2.value.push({ id: e3, state: "visible" }), () => n2(e3,
|
|
2001
|
+
return l3 ? "visible" !== l3.state && (l3.state = "visible") : t2.value.push({ id: e3, state: "visible" }), () => n2(e3, et.Unmount);
|
|
2042
2002
|
}, unregister: n2 };
|
|
2043
2003
|
}
|
|
2044
|
-
let
|
|
2004
|
+
let Kl = Qe.RenderStrategy, Jl = k({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: true }, appear: { type: [Boolean], default: false }, 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: () => true, afterEnter: () => true, beforeLeave: () => true, afterLeave: () => true }, setup(e2, { emit: t2, attrs: l2, slots: a2, expose: o2 }) {
|
|
2045
2005
|
let r2 = s(0);
|
|
2046
2006
|
function i2() {
|
|
2047
|
-
r2.value |=
|
|
2007
|
+
r2.value |= dt.Opening, t2("beforeEnter");
|
|
2048
2008
|
}
|
|
2049
2009
|
function d2() {
|
|
2050
|
-
r2.value &= ~
|
|
2010
|
+
r2.value &= ~dt.Opening, t2("afterEnter");
|
|
2051
2011
|
}
|
|
2052
2012
|
function c2() {
|
|
2053
|
-
r2.value |=
|
|
2013
|
+
r2.value |= dt.Closing, t2("beforeLeave");
|
|
2054
2014
|
}
|
|
2055
2015
|
function g2() {
|
|
2056
|
-
r2.value &= ~
|
|
2057
|
-
}
|
|
2058
|
-
if (null ===
|
|
2059
|
-
return () =>
|
|
2060
|
-
let
|
|
2061
|
-
o2({ el:
|
|
2062
|
-
let { show: b2, appear:
|
|
2063
|
-
let e3 =
|
|
2016
|
+
r2.value &= ~dt.Closing, t2("afterLeave");
|
|
2017
|
+
}
|
|
2018
|
+
if (null === f(Vl, null) && null !== ct())
|
|
2019
|
+
return () => x(Zl, { ...e2, onBeforeEnter: i2, onAfterEnter: d2, onBeforeLeave: c2, onAfterLeave: g2 }, a2);
|
|
2020
|
+
let m2 = s(null), v2 = u(() => e2.unmount ? et.Unmount : et.Hidden);
|
|
2021
|
+
o2({ el: m2, $el: m2 });
|
|
2022
|
+
let { show: b2, appear: w2 } = function() {
|
|
2023
|
+
let e3 = f(Vl, null);
|
|
2064
2024
|
if (null === e3)
|
|
2065
2025
|
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
2066
2026
|
return e3;
|
|
2067
|
-
}(), { register:
|
|
2068
|
-
let e3 =
|
|
2027
|
+
}(), { register: k2, unregister: C2 } = function() {
|
|
2028
|
+
let e3 = f(Ul, null);
|
|
2069
2029
|
if (null === e3)
|
|
2070
2030
|
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
2071
2031
|
return e3;
|
|
2072
|
-
}(), M2 = s(b2.value ? "visible" : "hidden"), T2 = { value: true }, D2 =
|
|
2032
|
+
}(), M2 = s(b2.value ? "visible" : "hidden"), T2 = { value: true }, D2 = Se(), E2 = { value: false }, I2 = Wl(() => {
|
|
2073
2033
|
!E2.value && "hidden" !== M2.value && (M2.value = "hidden", C2(D2), g2());
|
|
2074
2034
|
});
|
|
2075
2035
|
y(() => {
|
|
2076
|
-
let e3 =
|
|
2036
|
+
let e3 = k2(D2);
|
|
2077
2037
|
O(e3);
|
|
2078
|
-
}),
|
|
2079
|
-
if (
|
|
2038
|
+
}), h(() => {
|
|
2039
|
+
if (v2.value === et.Hidden && D2) {
|
|
2080
2040
|
if (b2.value && "visible" !== M2.value)
|
|
2081
2041
|
return void (M2.value = "visible");
|
|
2082
|
-
|
|
2042
|
+
Oe(M2.value, { hidden: () => C2(D2), visible: () => k2(D2) });
|
|
2083
2043
|
}
|
|
2084
2044
|
});
|
|
2085
|
-
let _2 =
|
|
2045
|
+
let _2 = Hl(e2.enter), P2 = Hl(e2.enterFrom), j2 = Hl(e2.enterTo), R2 = Hl(e2.entered), B2 = Hl(e2.leave), A2 = Hl(e2.leaveFrom), L2 = Hl(e2.leaveTo);
|
|
2086
2046
|
return y(() => {
|
|
2087
|
-
|
|
2047
|
+
h(() => {
|
|
2088
2048
|
if ("visible" === M2.value) {
|
|
2089
|
-
let e3 =
|
|
2049
|
+
let e3 = Ce(m2);
|
|
2090
2050
|
if (e3 instanceof Comment && "" === e3.data)
|
|
2091
2051
|
throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
2092
2052
|
}
|
|
@@ -2094,107 +2054,107 @@ let Gl = et.RenderStrategy, Zl = w({ props: { as: { type: [Object, String], defa
|
|
|
2094
2054
|
}), y(() => {
|
|
2095
2055
|
p([b2], (e3, t3, l3) => {
|
|
2096
2056
|
(function(e4) {
|
|
2097
|
-
let t4 = T2.value && !
|
|
2098
|
-
!l4 || !(l4 instanceof HTMLElement) || t4 || (E2.value = true, b2.value && i2(), b2.value || c2(), e4(b2.value ?
|
|
2099
|
-
E2.value = false, e5 ===
|
|
2100
|
-
}) :
|
|
2101
|
-
E2.value = false, e5 ===
|
|
2057
|
+
let t4 = T2.value && !w2.value, l4 = Ce(m2);
|
|
2058
|
+
!l4 || !(l4 instanceof HTMLElement) || t4 || (E2.value = true, b2.value && i2(), b2.value || c2(), e4(b2.value ? $l(l4, _2, P2, j2, R2, (e5) => {
|
|
2059
|
+
E2.value = false, e5 === zl.Finished && d2();
|
|
2060
|
+
}) : $l(l4, B2, A2, L2, R2, (e5) => {
|
|
2061
|
+
E2.value = false, e5 === zl.Finished && (ql(I2) || (M2.value = "hidden", C2(D2), g2()));
|
|
2102
2062
|
})));
|
|
2103
2063
|
})(l3), T2.value = false;
|
|
2104
2064
|
}, { immediate: true });
|
|
2105
|
-
}), S(
|
|
2106
|
-
let { appear: t3, show: o3, enter: r3, enterFrom: i3, enterTo: s2, entered: u2, leave: d3, leaveFrom: c3, leaveTo: p2, ...g3 } = e2,
|
|
2107
|
-
return
|
|
2065
|
+
}), S(Ul, I2), pt(u(() => Oe(M2.value, { visible: dt.Open, hidden: dt.Closed }) | r2.value)), () => {
|
|
2066
|
+
let { appear: t3, show: o3, enter: r3, enterFrom: i3, enterTo: s2, entered: u2, leave: d3, leaveFrom: c3, leaveTo: p2, ...g3 } = e2, f2 = { ref: m2 };
|
|
2067
|
+
return tt({ theirProps: { ...g3, ...w2.value && b2.value && De.isServer ? { class: n([l2.class, g3.class, ..._2, ...P2]) } : {} }, ourProps: f2, slot: {}, slots: a2, attrs: l2, features: Kl, visible: "visible" === M2.value, name: "TransitionChild" });
|
|
2108
2068
|
};
|
|
2109
|
-
} }),
|
|
2110
|
-
let a2 =
|
|
2111
|
-
|
|
2069
|
+
} }), Gl = Jl, Zl = k({ inheritAttrs: false, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: true }, appear: { type: [Boolean], default: false }, 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: () => true, afterEnter: () => true, beforeLeave: () => true, afterLeave: () => true }, setup(e2, { emit: t2, attrs: l2, slots: n2 }) {
|
|
2070
|
+
let a2 = ct(), o2 = u(() => null === e2.show && null !== a2 ? (a2.value & dt.Open) === dt.Open : e2.show);
|
|
2071
|
+
h(() => {
|
|
2112
2072
|
if (![true, false].includes(o2.value))
|
|
2113
2073
|
throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
|
|
2114
2074
|
});
|
|
2115
|
-
let r2 = s(o2.value ? "visible" : "hidden"), i2 =
|
|
2075
|
+
let r2 = s(o2.value ? "visible" : "hidden"), i2 = Wl(() => {
|
|
2116
2076
|
r2.value = "hidden";
|
|
2117
2077
|
}), d2 = s(true), c2 = { show: o2, appear: u(() => e2.appear || !d2.value) };
|
|
2118
2078
|
return y(() => {
|
|
2119
|
-
|
|
2120
|
-
d2.value = false, o2.value ? r2.value = "visible" :
|
|
2079
|
+
h(() => {
|
|
2080
|
+
d2.value = false, o2.value ? r2.value = "visible" : ql(i2) || (r2.value = "hidden");
|
|
2121
2081
|
});
|
|
2122
|
-
}), S(
|
|
2123
|
-
let a3 =
|
|
2124
|
-
return
|
|
2082
|
+
}), S(Ul, i2), S(Vl, c2), () => {
|
|
2083
|
+
let a3 = rt(e2, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), o3 = { unmount: e2.unmount };
|
|
2084
|
+
return tt({ ourProps: { ...o3, as: "template" }, theirProps: {}, slot: {}, slots: { ...n2, default: () => [x(Gl, { onBeforeEnter: () => t2("beforeEnter"), onAfterEnter: () => t2("afterEnter"), onBeforeLeave: () => t2("beforeLeave"), onAfterLeave: () => t2("afterLeave"), ...l2, ...o3, ...a3 }, n2.default)] }, attrs: {}, features: Kl, visible: "visible" === r2.value, name: "Transition" });
|
|
2125
2085
|
};
|
|
2126
2086
|
} });
|
|
2127
|
-
function
|
|
2087
|
+
function Xl(t2, l2) {
|
|
2128
2088
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" })]);
|
|
2129
2089
|
}
|
|
2130
|
-
function
|
|
2090
|
+
function Ql(t2, l2) {
|
|
2131
2091
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18" })]);
|
|
2132
2092
|
}
|
|
2133
|
-
function
|
|
2093
|
+
function en(t2, l2) {
|
|
2134
2094
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 5.25h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5" })]);
|
|
2135
2095
|
}
|
|
2136
|
-
function
|
|
2096
|
+
function tn(t2, l2) {
|
|
2137
2097
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" })]);
|
|
2138
2098
|
}
|
|
2139
|
-
function
|
|
2099
|
+
function ln(t2, l2) {
|
|
2140
2100
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m4.5 12.75 6 6 9-13.5" })]);
|
|
2141
2101
|
}
|
|
2142
|
-
function
|
|
2102
|
+
function nn(t2, l2) {
|
|
2143
2103
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })]);
|
|
2144
2104
|
}
|
|
2145
|
-
function
|
|
2105
|
+
function an(t2, l2) {
|
|
2146
2106
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 19.5 8.25 12l7.5-7.5" })]);
|
|
2147
2107
|
}
|
|
2148
|
-
function
|
|
2108
|
+
function on(t2, l2) {
|
|
2149
2109
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" })]);
|
|
2150
2110
|
}
|
|
2151
|
-
function
|
|
2111
|
+
function rn(t2, l2) {
|
|
2152
2112
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" })]);
|
|
2153
2113
|
}
|
|
2154
|
-
function
|
|
2114
|
+
function sn(t2, l2) {
|
|
2155
2115
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })]);
|
|
2156
2116
|
}
|
|
2157
|
-
function
|
|
2117
|
+
function un(t2, l2) {
|
|
2158
2118
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", 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" })]);
|
|
2159
2119
|
}
|
|
2160
|
-
function
|
|
2120
|
+
function dn(t2, l2) {
|
|
2161
2121
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M10.05 4.575a1.575 1.575 0 1 0-3.15 0v3m3.15-3v-1.5a1.575 1.575 0 0 1 3.15 0v1.5m-3.15 0 .075 5.925m3.075.75V4.575m0 0a1.575 1.575 0 0 1 3.15 0V15M6.9 7.575a1.575 1.575 0 1 0-3.15 0v8.175a6.75 6.75 0 0 0 6.75 6.75h2.018a5.25 5.25 0 0 0 3.712-1.538l1.732-1.732a5.25 5.25 0 0 0 1.538-3.712l.003-2.024a.668.668 0 0 1 .198-.471 1.575 1.575 0 1 0-2.228-2.228 3.818 3.818 0 0 0-1.12 2.687M6.9 7.575V12m6.27 4.318A4.49 4.49 0 0 1 16.35 15m.002 0h-.002" })]);
|
|
2162
2122
|
}
|
|
2163
|
-
function
|
|
2123
|
+
function cn(t2, l2) {
|
|
2164
2124
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m2.25 12 8.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" })]);
|
|
2165
2125
|
}
|
|
2166
|
-
function
|
|
2126
|
+
function pn(t2, l2) {
|
|
2167
2127
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" })]);
|
|
2168
2128
|
}
|
|
2169
|
-
function
|
|
2129
|
+
function gn(t2, l2) {
|
|
2170
2130
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" })]);
|
|
2171
2131
|
}
|
|
2172
|
-
function
|
|
2132
|
+
function mn(t2, l2) {
|
|
2173
2133
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" })]);
|
|
2174
2134
|
}
|
|
2175
|
-
function
|
|
2135
|
+
function fn(t2, l2) {
|
|
2176
2136
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" })]);
|
|
2177
2137
|
}
|
|
2178
|
-
function
|
|
2138
|
+
function vn(t2, l2) {
|
|
2179
2139
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18 18 6M6 6l12 12" })]);
|
|
2180
2140
|
}
|
|
2181
|
-
const hn = { class: "py-1" },
|
|
2141
|
+
const hn = { class: "py-1" }, yn = ["onClick"], bn = { key: 1, class: "animate-pulse px-4 py-2 bg-gray-200 rounded-md flex inline-flex items-center relative inline-block text-left" }, xn = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" }, null, -1), wn = { name: "uiDropdown" }, kn = Object.assign(wn, { props: { items: { type: Array, required: true }, position: { type: String, default: "left" }, disabled: Boolean, label: String, loading: { type: Boolean, default: true } }, emits: ["optionSelected"], setup(l2, { emit: r2 }) {
|
|
2182
2142
|
const s2 = r2, c2 = l2, p2 = u(() => {
|
|
2183
2143
|
let e2 = c2.items.find((e3) => true === e3.active);
|
|
2184
2144
|
return e2 ? e2.name : c2.label;
|
|
2185
2145
|
});
|
|
2186
|
-
return (r3, u2) => l2.loading ? (e(), a("div",
|
|
2146
|
+
return (r3, u2) => l2.loading ? (e(), a("div", bn, [xn, o(d(nn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-200 dark:text-gray-300" })])) : (e(), t(d(Tl), { key: 0, as: "div", class: n(["relative inline-block text-left", { "opacity-25": l2.disabled }]) }, { default: E(() => [i("div", null, [o(d(Dl), { class: "inline-flex justify-between 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" }, { default: E(() => [I(_(p2.value) + " ", 1), o(d(nn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5" })]), _: 1 })]), o(P, { "enter-active-class": "transition ease-out duration-100", "enter-from-class": "transform opacity-0 scale-95", "enter-to-class": "transform opacity-100 scale-100", "leave-active-class": "transition ease-in duration-75", "leave-from-class": "transform opacity-100 scale-100", "leave-to-class": "transform opacity-0 scale-95" }, { default: E(() => [l2.disabled ? R("", true) : (e(), t(d(El), { key: 0, class: n([{ "right-0": "right" === l2.position, "left-0": "left" === l2.position }, "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"]) }, { default: E(() => [i("div", hn, [(e(true), a(w, null, j(l2.items, (l3, a2) => (e(), t(d(Il), { key: a2 }, { default: E(() => [i("a", { onClick: (e2) => ((e3) => {
|
|
2187
2147
|
c2.disabled || s2("optionSelected", e3.value);
|
|
2188
|
-
})(l3), class: n([l3.active ? "bg-gray-100 text-gray-900" : "text-gray-700", "block px-4 py-2 text-sm cursor-pointer"]) }, _(l3.name), 11,
|
|
2189
|
-
} }),
|
|
2148
|
+
})(l3), class: n([l3.active ? "bg-gray-100 text-gray-900" : "text-gray-700", "block px-4 py-2 text-sm cursor-pointer"]) }, _(l3.name), 11, yn)]), _: 2 }, 1024))), 128))])]), _: 1 }, 8, ["class"]))]), _: 1 })]), _: 1 }, 8, ["class"]));
|
|
2149
|
+
} }), Sn = { key: 0 }, Cn = { class: "flex justify-between" }, On = { key: 0, class: "block text-sm font-medium text-gray-700" }, Mn = { key: 1, class: "text-[10px] text-gray-500 uppercase justify-self-end" }, Tn = ["disabled", "name", "placeholder", "type"], Dn = { key: 2, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" }, En = { key: 1, class: "animate-pulse" }, In = { key: 0, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 md:w-1/4 mb-1.5" }, _n = i("div", { class: "animate-pulse px-4 py-3.5 bg-gray-200 rounded-md flex inline-flex items-center relative inline-block text-left w-full" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" })], -1), Pn = { name: "uiInput" }, jn = Object.assign(Pn, { props: { label: String, type: { type: String, default: "text" }, name: String, placeholder: { type: String, default: "..." }, icon: { type: Function, default: () => {
|
|
2190
2150
|
} }, disabled: Boolean, color: { type: String, default: "gray" }, value: { type: String, default: "" }, error: String, optional: String, addOn: String, rightAddOn: String, loading: { type: Boolean, default: true } }, emits: ["inputChanged", "rightAddOnClicked", "addOnClicked"], setup(t2, { emit: l2 }) {
|
|
2191
2151
|
const r2 = l2, u2 = t2, c2 = (e2) => {
|
|
2192
2152
|
r2("inputChanged", { value: e2.target.value, name: e2.target.name });
|
|
2193
2153
|
}, g2 = s(u2.value);
|
|
2194
2154
|
return p(() => u2.value, (e2) => {
|
|
2195
2155
|
g2.value = e2, r2("inputChanged", { name: u2.name, value: g2.value });
|
|
2196
|
-
}), (l3, r3) => t2.loading ? (e(), a("div",
|
|
2197
|
-
} }),
|
|
2156
|
+
}), (l3, r3) => t2.loading ? (e(), a("div", En, [void 0 !== t2.label ? (e(), a("div", In)) : R("", true), _n])) : (e(), a("div", Sn, [i("div", Cn, [t2.label ? (e(), a("label", On, _(t2.label), 1)) : R("", true), t2.optional ? (e(), a("span", Mn, _(t2.optional), 1)) : R("", true)]), i("div", { class: n([{ "mt-1": t2.label }, "relative flex"]) }, [t2.addOn ? (e(), a("span", { key: 0, onClick: r3[0] || (r3[0] = (e2) => l3.$emit("addOnClicked")), 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 cursor-pointer" }, _(t2.addOn), 1)) : R("", true), B(i("input", { "onUpdate:modelValue": r3[1] || (r3[1] = (e2) => g2.value = e2), class: n([{ "border-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "border-red-400": "danger" === t2.color, "border-yellow-400": "warning" === t2.color, "border-green-400": "success" === t2.color, "bg-gray-100": t2.disabled, "text-black": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-400": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color, "rounded-md": !t2.addOn || !t2.rightAddOn, "rounded-r-md": t2.addOn, "rounded-l-none": t2.addOn, "rounded-l-md": t2.rightAddOn, "rounded-r-none": t2.rightAddOn }, "shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 placeholder-gray-300"]), disabled: t2.disabled, name: t2.name, placeholder: t2.placeholder, type: t2.type, onInput: c2 }, null, 42, Tn), [[A, g2.value]]), t2.rightAddOn ? (e(), a("span", { key: 1, onClick: r3[2] || (r3[2] = (e2) => l3.$emit("rightAddOnClicked")), class: "inline-flex items-center px-3 rounded-r-md border border-l-0 border-gray-300 bg-gray-50 hover:bg-gray-200 text-gray-500 sm:text-sm cursor-pointer" }, _(t2.rightAddOn), 1)) : R("", true), t2.icon ? (e(), a("div", Dn, [o(K, { icon: t2.icon, color: t2.color, loading: t2.loading }, null, 8, ["icon", "color", "loading"]), B(o(K, { icon: d(ln), color: "green", loading: t2.loading }, null, 8, ["icon", "loading"]), [[L, "success" === t2.color]]), B(o(K, { icon: d(un), color: "yellow", loading: t2.loading }, null, 8, ["icon", "loading"]), [[L, "warning" === t2.color]]), B(o(K, { icon: d(vn), color: "red", loading: t2.loading }, null, 8, ["icon", "loading"]), [[L, "danger" === t2.color]])])) : R("", true)], 2), B(i("p", { class: n([{ "text-gray-400": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-400": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }, "mt-2 text-xs flex flex-row items-center"]) }, _(t2.error), 3), [[L, t2.error]])]));
|
|
2157
|
+
} }), Rn = { key: 0 }, Bn = { class: "flex justify-between" }, An = { key: 0, class: "block text-sm font-medium text-gray-700" }, Ln = { key: 1, class: "text-[10px] text-gray-500 uppercase" }, Fn = { class: "space-y-1 flex flex-col items-center justify-center" }, Nn = { class: "flex text-sm text-gray-600 flex flex-col sm:flex-row text-center" }, zn = { for: "file-upload", 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" }, $n = ["accept"], Hn = { class: "pl-1" }, Vn = { class: "text-xs text-gray-500 pb-4" }, Yn = { class: "mt-2 text-xs flex flex-row items-center text-red-300" }, Un = { key: 1, class: "animate-pulse" }, qn = [i("div", { class: "flex justify-center items-center flex-col rounded-md border-2 border-dashed px-6 pt-5 pb-6 border-gray-200" }, [i("div", { class: "rounded-full h-20 w-20 bg-gray-200 mb-4" }), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full md:w-1/3 mb-3" }), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full md:w-1/4 mb-3" })], -1)], Wn = { name: "uiInputFile" }, Kn = Object.assign(Wn, { props: { name: String, label: String, optional: String, placeholder: String, dragAndDrop: String, fileTypesAndSizes: String, error: String, accept: String, icon: { type: Function, default: function(t2, l2) {
|
|
2198
2158
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M7.5 7.5h-.75A2.25 2.25 0 0 0 4.5 9.75v7.5a2.25 2.25 0 0 0 2.25 2.25h7.5a2.25 2.25 0 0 0 2.25-2.25v-7.5a2.25 2.25 0 0 0-2.25-2.25h-.75m0-3-3-3m0 0-3 3m3-3v11.25m6-2.25h.75a2.25 2.25 0 0 1 2.25 2.25v7.5a2.25 2.25 0 0 1-2.25 2.25h-7.5a2.25 2.25 0 0 1-2.25-2.25v-.75" })]);
|
|
2199
2159
|
} }, loading: { type: Boolean, default: true } }, emits: ["filesUploaded"], setup(t2, { emit: l2 }) {
|
|
2200
2160
|
const r2 = s(""), u2 = l2, c2 = t2, p2 = (e2) => {
|
|
@@ -2203,42 +2163,42 @@ const hn = { class: "py-1" }, xn = ["onClick"], wn = { key: 1, class: "animate-p
|
|
|
2203
2163
|
}, g2 = (e2) => {
|
|
2204
2164
|
u2("filesUploaded", e2.target.files), c2.filename = e2.target.files[0].name;
|
|
2205
2165
|
};
|
|
2206
|
-
return (l3, s2) => t2.loading ? (e(), a("div",
|
|
2207
|
-
}, ["prevent"])), onDrop: F(p2, ["prevent"]) }, [i("div",
|
|
2208
|
-
} }),
|
|
2209
|
-
const c2 = s(""), p2 = r2, g2 = l2,
|
|
2210
|
-
return (r3, s2) => l2.loading ? (e(), a("div",
|
|
2211
|
-
} }),
|
|
2166
|
+
return (l3, s2) => t2.loading ? (e(), a("div", Un, qn)) : (e(), a("div", Rn, [i("div", Bn, [t2.label ? (e(), a("label", An, _(t2.label), 1)) : R("", true), t2.optional ? (e(), a("span", Ln, _(t2.optional), 1)) : R("", true)]), i("div", { class: n([[{ "mt-1": t2.label }, { "border-gray-300 hover:border-gray-400": !t2.error }, { "border-red-300 hover:border-red-400": t2.error }], "dropArea flex justify-center rounded-md border-2 border-dashed px-6 pt-5 pb-6"]), onDragover: s2[0] || (s2[0] = F(() => {
|
|
2167
|
+
}, ["prevent"])), onDrop: F(p2, ["prevent"]) }, [i("div", Fn, [o(K, { icon: t2.icon, size: "massive", color: "gray", "aria-hidden": "true", class: "mb-4", loading: t2.loading }, null, 8, ["icon", "loading"]), i("div", Nn, [i("label", zn, [i("span", null, _(t2.placeholder), 1), i("input", { id: "file-upload", name: "file-upload", type: "file", class: "sr-only", accept: t2.accept, onChange: g2 }, null, 40, $n)]), i("p", Hn, _(t2.dragAndDrop), 1)]), i("p", Vn, _(t2.fileTypesAndSizes), 1), B(i("p", { class: "font-bold text-xs uppercase block p-2 bg-gray-200 rounded" }, _(r2.value), 513), [[L, "" !== r2.value]])])], 34), B(i("p", Yn, [o(K, { icon: d(fn), color: "red", class: "mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), I(_(t2.error), 1)], 512), [[L, t2.error]])]));
|
|
2168
|
+
} }), Jn = { class: "relative mt-1" }, Gn = { key: 1, class: "animate-pulse px-4 py-2.5 bg-gray-200 rounded-md flex justify-between items-center w-full" }, Zn = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1), Xn = { name: "uiSelect" }, Qn = Object.assign(Xn, { props: { items: { type: Array, required: true }, label: String, error: String, color: String, select: Object, loading: { type: Boolean, default: true } }, emits: ["selectChanged"], setup(l2, { emit: r2 }) {
|
|
2169
|
+
const c2 = s(""), p2 = r2, g2 = l2, m2 = u(() => "" === c2.value ? g2.items : g2.items.filter((e2) => e2.name.toLowerCase().includes(c2.value.toLowerCase()))), f2 = u(() => g2.select);
|
|
2170
|
+
return (r3, s2) => l2.loading ? (e(), a("div", Gn, [Zn, o(d(rn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-300 dark:text-gray-400" })])) : (e(), t(d(Et), { key: 0, modelValue: f2.value, "onUpdate:modelValue": [s2[1] || (s2[1] = (e2) => f2.value = e2), s2[2] || (s2[2] = (e2) => p2("selectChanged", e2))], as: "div" }, { default: E(() => [o(d(It), { class: "block text-sm font-medium" }, { default: E(() => [I(_(l2.label), 1)]), _: 1 }), i("div", Jn, [o(d(Pt), { "display-value": (e2) => e2 == null ? void 0 : e2.name, class: n([{ "border-gray-300": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "border-red-400": "danger" === l2.color, "border-yellow-400": "warning" === l2.color, "border-green-400": "success" === l2.color, "bg-gray-100": r3.disabled, "text-black": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "text-red-400": "danger" === l2.color, "text-yellow-400": "warning" === l2.color, "text-green-400": "success" === l2.color }, "w-full rounded-md border 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"]), onChange: s2[0] || (s2[0] = (e2) => c2.value = e2.target.value) }, null, 8, ["display-value", "class"]), o(d(_t), { class: "absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none" }, { default: E(() => [o(d(rn), { "aria-hidden": "true", class: "h-5 w-5 text-gray-400" })]), _: 1 }), m2.value.length > 0 ? (e(), t(d(jt), { key: 0, 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" }, { default: E(() => [(e(true), a(w, null, j(m2.value, (l3) => (e(), t(d(Rt), { key: l3.id, value: l3, as: "template" }, { default: E(({ active: t2, selected: r4 }) => [i("li", { class: n(["relative cursor-default select-none py-2 pl-3 pr-9", t2 ? "bg-indigo-600 text-white" : "text-gray-900"]) }, [i("span", { class: n(["block truncate", r4 && "font-semibold"]) }, _(l3.name), 3), r4 ? (e(), a("span", { key: 0, class: n(["absolute inset-y-0 right-0 flex items-center pr-4", t2 ? "text-white" : "text-indigo-600"]) }, [o(d(ln), { "aria-hidden": "true", class: "h-5 w-5", loading: true })], 2)) : R("", true)], 2)]), _: 2 }, 1032, ["value"]))), 128))]), _: 1 })) : R("", true)]), B(i("p", { class: n([{ "text-gray-400": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "text-red-400": "danger" === l2.color, "text-yellow-400": "warning" === l2.color, "text-green-400": "success" === l2.color }, "mt-2 text-xs flex flex-row items-center"]) }, _(l2.error), 3), [[L, l2.error]])]), _: 1 }, 8, ["modelValue"]));
|
|
2171
|
+
} }), ea = { key: 1, class: "inline-flex items-center px-3 py-2.5 rounded text-xs font-medium leading-none animate-pulse bg-gray-200" }, ta = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" }, null, -1)], la = { name: "uiTag" }, na = Object.assign(la, { props: { color: { type: String, default: "primary" }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => t2.loading ? (e(), a("div", ea, ta)) : (e(), a("span", { key: 0, class: n([{ "bg-indigo-100 text-indigo-800 border border-indigo-200": "primary" === t2.color, "bg-red-100 text-red-800 border border-red-200": "danger" === t2.color, "bg-yellow-100 text-yellow-800 border border-yellow-200": "warning" === t2.color, "bg-green-100 text-green-800 border border-green-200": "success" === t2.color, "bg-black text-white border border-black": "black" === t2.color, "text-black border border-gray-200 bg-white": "white" === t2.color }, "inline-flex items-center px-3 py-2 rounded text-xs font-medium leading-none"]) }, [r(l2.$slots, "default")], 2)) }), aa = { key: 0 }, oa = { key: 0, class: "block text-sm font-medium text-gray-700" }, ra = ["disabled", "placeholder"], ia = { key: 1, class: "animate-pulse" }, sa = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 md:w-1/4 mb-1.5" }, null, -1), i("div", { class: "h-24 bg-gray-200 rounded-lg flex inline-flex items-center relative inline-block text-left w-full" }, null, -1)], ua = { name: "uiTextArea" }, da = Object.assign(ua, { props: { label: String, placeholder: { type: String, default: "..." }, value: String, color: String, disabled: { type: Boolean, default: false }, error: String, loading: { type: Boolean, default: true } }, emits: ["inputChanged"], setup(t2, { emit: l2 }) {
|
|
2212
2172
|
const r2 = l2, u2 = t2, c2 = (e2) => {
|
|
2213
2173
|
r2("inputChanged", e2.target.value);
|
|
2214
2174
|
}, g2 = s(u2.value);
|
|
2215
2175
|
return p(() => u2.value, (e2) => {
|
|
2216
2176
|
g2.value = e2, r2("inputChanged", e2);
|
|
2217
|
-
}), (l3, r3) => t2.loading ? (e(), a("div",
|
|
2218
|
-
} }),
|
|
2177
|
+
}), (l3, r3) => t2.loading ? (e(), a("div", ia, sa)) : (e(), a("div", aa, [t2.label ? (e(), a("label", oa, _(t2.label), 1)) : R("", true), i("div", { class: n({ "mt-1": t2.label }) }, [B(i("textarea", { disabled: t2.disabled, rows: "4", "onUpdate:modelValue": r3[0] || (r3[0] = (e2) => g2.value = e2), placeholder: t2.placeholder, class: n(["shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md", { "border-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "border-red-300": "danger" === t2.color, "border-yellow-400": "warning" === t2.color, "border-green-400": "success" === t2.color, "bg-gray-100": t2.disabled, "text-black": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-300": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }]), onChange: c2 }, null, 42, ra), [[N, g2.value]])], 2), B(i("p", { class: n([{ "text-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-300": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }, "mt-2 text-xs flex flex-row items-center"]) }, [o(K, { icon: d(fn), color: "red", class: "mr-2" }, null, 8, ["icon"]), I(_(t2.error), 1)], 2), [[L, t2.error]])]));
|
|
2178
|
+
} }), ca = { class: "text-sm font-medium text-gray-900" }, pa = { key: 0, class: "text-sm text-gray-500 ml-2" }, ga = { key: 1, class: "animate-pulse flex items-center" }, ma = [i("div", { class: "relative bg-gray-200 rounded-full w-12 h-6 p-1 flex items-center" }, [i("div", { class: "rounded-full bg-gray-300 dark:bg-gray-400 h-4 w-4" })], -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-16 ml-2" }, null, -1)], fa = { name: "uiToggle" }, va = Object.assign(fa, { props: { item: { type: Object, required: true }, checked: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, setup(l2) {
|
|
2219
2179
|
const r2 = s(l2.checked);
|
|
2220
|
-
return (s2, u2) => l2.loading ? (e(), a("div",
|
|
2221
|
-
} }), ha = { key: 0, class: "flex flex-col" },
|
|
2180
|
+
return (s2, u2) => l2.loading ? (e(), a("div", ga, ma)) : (e(), t(d(Bl), { key: 0, as: "div", class: "flex items-center relative" }, { default: E(() => [o(d(Al), { disabled: l2.disabled, onClick: u2[0] || (u2[0] = (e2) => s2.$emit("toggleChanged", { item: l2.item, active: !r2.value })), modelValue: r2.value, "onUpdate:modelValue": u2[1] || (u2[1] = (e2) => r2.value = e2), class: n([r2.value ? "bg-indigo-600" : "bg-gray-200", "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"]) }, { default: E(() => [i("span", { "aria-hidden": "true", class: n([r2.value ? "translate-x-5" : "translate-x-0", l2.disabled ? "bg-gray-300" : "", "pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"]) }, null, 2)]), _: 1 }, 8, ["disabled", "modelValue", "class"]), o(d(Ll), { as: "span", class: "ml-3" }, { default: E(() => [i("span", ca, _(l2.item.title), 1), l2.item.subtitle ? (e(), a("span", pa, _(l2.item.subtitle), 1)) : R("", true)]), _: 1 }), l2.item.action ? (e(), a("span", { key: 0, class: "cursor-pointer text-indigo-600 hover:text-indigo-400 uppercase text-xs absolute right-0 bottom-0.5", onClick: u2[2] || (u2[2] = (e2) => s2.$emit("actionClicked", l2.item)) }, _(l2.item.action), 1)) : R("", true)]), _: 1 }));
|
|
2181
|
+
} }), ha = { key: 0, class: "flex flex-col" }, ya = { class: "flex" }, ba = { class: "flex-shrink-0" }, xa = { class: "ml-3" }, wa = { class: "mt-4" }, ka = { class: "-mx-2 -my-1.5 flex" }, Sa = ["onClick"], Ca = { key: 1, class: "flex flex-col animate-pulse" }, Oa = [z('<div class="p-4 border-l-4 bg-gray-100 border-gray-400 rounded"><div class="flex"><div class="flex-shrink-0"><div class="h-6 w-6 animate-pulse rounded-full bg-gray-200 dark:bg-gray-300"></div></div><div class="ml-3 w-full"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-3/5"></div></div></div></div>', 1)], Ma = { name: "uiAlert" }, Ta = Object.assign(Ma, { props: { actions: { type: Array }, title: { type: String }, type: { type: String, default: "info" }, loading: { type: Boolean, default: true } }, setup: (l2) => (o2, s2) => l2.loading ? (e(), a("div", Ca, Oa)) : (e(), a("div", ha, [i("div", { class: n([{ "bg-indigo-50 border-indigo-400": "info" === l2.type, "bg-red-50 border-red-400": "danger" === l2.type, "bg-yellow-50 border-yellow-400": "warning" === l2.type, "bg-green-50 border-green-400": "success" === l2.type }, "p-4 border-l-4 rounded"]) }, [i("div", ya, [i("div", ba, ["info" === l2.type ? (e(), t(d(pn), { key: 0, class: "h-8 w-8 text-indigo-400", "aria-hidden": "true" })) : R("", true), "danger" === l2.type ? (e(), t(d(fn), { key: 1, class: "h-8 w-8 text-red-400", "aria-hidden": "true" })) : R("", true), "warning" === l2.type ? (e(), t(d(un), { key: 2, class: "h-8 w-8 text-yellow-400", "aria-hidden": "true" })) : R("", true), "success" === l2.type ? (e(), t(d(tn), { key: 3, class: "h-8 w-8 text-green-400", "aria-hidden": "true" })) : R("", true)]), i("div", xa, [i("h3", { class: n([{ "text-red-800": "danger" === l2.type, "text-yellow-800": "warning" === l2.type, "text-green-800": "success" === l2.type }, "text-sm font-medium"]) }, _(l2.title), 3), i("div", { class: n([{ "text-red-700": "danger" === l2.type, "text-yellow-700": "warning" === l2.type, "text-green-700": "success" === l2.type }, "mt-2 text-sm"]) }, [r(o2.$slots, "default")], 2), i("div", wa, [i("div", ka, [(e(true), a(w, null, j(l2.actions, (t2, r2) => (e(), a("button", { onClick: (e2) => o2.$emit("alertEvent", t2.event), type: "button", key: r2, class: n([{ "bg-green-50 text-green-800 hover:bg-green-100 focus:ring-green-600 focus:ring-offset-green-50": "success" === l2.type, "bg-indigo-50 text-indigo-800 hover:bg-indigo-100 focus:ring-indigo-600 focus:ring-offset-indigo-50": "info" === l2.type, "bg-red-50 text-red-800 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50": "danger" === l2.type, "bg-yellow-50 text-yellow-800 hover:bg-yellow-100 focus:ring-yellow-600 focus:ring-offset-yellow-50": "warning" === l2.type }, "px-2 py-1.5 text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2"]) }, _(t2.name), 11, Sa))), 128))])])])])], 2)])) }), Da = { key: 0, class: "inline-flex", "aria-label": "Breadcrumb" }, Ea = { role: "list", class: "flex items-center space-x-4 text-xs" }, Ia = { key: 0 }, _a = ["onClick"], Pa = { key: 1, class: "flex items-center" }, ja = ["onClick", "aria-current"], Ra = { key: 1, class: "flex flex-row items-center animate-pulse" }, Ba = [i("div", { class: "animate-pulse rounded-full bg-gray-200 dark:bg-gray-300 h-4 w-4 mr-4" }, null, -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5 mr-4" }, null, -1), i("div", { class: "animate-pulse rounded-full bg-gray-200 dark:bg-gray-300 h-4 w-4 mr-4" }, null, -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5" }, null, -1)], Aa = { name: "uiBreadcrumbs" }, La = Object.assign(Aa, { props: { pages: { type: Array, required: true }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, r2) => t2.loading ? (e(), a("div", Ra, Ba)) : (e(), a("nav", Da, [i("ol", Ea, [(e(true), a(w, null, j(t2.pages, (t3, r3) => (e(), a("li", { key: r3 }, [0 === r3 ? (e(), a("div", Ia, [i("p", { onClick: (e2) => l2.$emit("breadCrumbClicked", t3.routeName), class: "flex flex-row items-center justify-center text-indigo-600 hover:text-indigo-800 cursor-pointer" }, [o(d(cn), { class: "flex-shrink-0 h-3 w-3 text-gray-400 mr-4", "aria-hidden": "true" }), i("span", null, _(t3.name), 1)], 8, _a)])) : (e(), a("div", Pa, [o(d(on), { class: "flex-shrink-0 h-3 w-3 text-gray-400", "aria-hidden": "true" }), i("span", { onClick: (e2) => l2.$emit("breadCrumbClicked", t3.routeName), class: n(["cursor-pointer ml-4 text-xs text-gray-400 hover:text-gray-500", { "text-indigo-600 hover:text-indigo-800": !t3.current }]), "aria-current": t3.current ? "page" : "" }, _(t3.name), 11, ja)]))]))), 128))])])) }), Fa = { class: "flex items-center flex-col sm:flex-row justify-center sm:justify-start" }, Na = ["src"], za = { class: "font-bold text-center sm:text-left" }, $a = { class: "mt-1 text-xs text-center sm:text-left" }, Ha = { key: 0, class: "flex flex-wrap mt-4 justify-center sm:justify-start" }, Va = { key: 1, class: "rounded-lg bg-white shadow p-6 cursor-pointer animate-pulse" }, Ya = [z('<div class="flex items-center flex-col sm:flex-row justify-center sm:justify-start w-full"><div class="w-16 h-16 rounded-full bg-gray-200 flex self-center"></div><div class="w-full ml-4"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full mt-4 sm:mt-0 sm:w-16 mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full sm:w-32"></div></div></div>', 1)], Ua = { name: "uiCard" }, qa = Object.assign(Ua, { props: { id: { type: String, required: true }, name: { type: String, required: true }, type: String, tags: Array, logo: String, loading: { type: Boolean, default: true } }, setup: (l2) => (n2, o2) => {
|
|
2222
2182
|
var _a2;
|
|
2223
|
-
return l2.loading ? (e(), a("div",
|
|
2224
|
-
} }),
|
|
2183
|
+
return l2.loading ? (e(), a("div", Va, Ya)) : (e(), a("div", { key: 0, class: "rounded-lg bg-white shadow p-6 cursor-pointer", onClick: o2[0] || (o2[0] = (e2) => n2.$emit("cardSelected", { id: l2.id, name: l2.name, type: l2.type, tags: l2.tags })) }, [i("div", Fa, [i("img", { class: "w-16 h-16 rounded-full mb-4 sm:mb-0 sm:mr-4", src: l2.logo }, null, 8, Na), i("div", null, [i("h4", za, _(l2.name), 1), i("p", $a, _(l2.type), 1)])]), ((_a2 = l2.tags) == null ? void 0 : _a2.length) > 0 ? (e(), a("div", Ha, [(e(true), a(w, null, j(l2.tags, (n3) => (e(), t(na, { class: "mb-1 mr-1", key: n3.name, color: n3.color, loading: l2.loading }, { default: E(() => [I(_(n3.name), 1)]), _: 2 }, 1032, ["color", "loading"]))), 128))])) : R("", true)]));
|
|
2184
|
+
} }), Wa = { name: "uiFilter" }, Ka = Object.assign(Wa, { props: { position: { type: String, default: "left" }, items: { type: Array, required: true }, label: { type: String, required: true }, loading: { type: Boolean, default: true } }, emits: ["filterSelected"], setup(l2, { emit: n2 }) {
|
|
2225
2185
|
const a2 = n2, o2 = s(l2.items);
|
|
2226
|
-
return (n3, r2) => (e(), t(
|
|
2186
|
+
return (n3, r2) => (e(), t(kn, { loading: l2.loading, onOptionSelected: r2[0] || (r2[0] = (e2) => ((e3) => {
|
|
2227
2187
|
o2.value.forEach((t2) => {
|
|
2228
2188
|
t2.value !== e3 ? t2.active = false : t2.active = true;
|
|
2229
2189
|
}), a2("filterSelected", e3);
|
|
2230
2190
|
})(e2)), position: l2.position, items: o2.value, label: l2.label }, null, 8, ["loading", "position", "items", "label"]));
|
|
2231
|
-
} }),
|
|
2191
|
+
} }), Ja = i("div", { class: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" }, null, -1), Ga = { class: "fixed inset-0 z-10 overflow-y-auto" }, Za = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Xa = { class: "absolute top-0 right-0 hidden pt-4 pr-4 sm:block" }, Qa = i("span", { class: "sr-only" }, "X", -1), eo = { class: "sm:flex sm:items-start" }, to = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left sm:mr-4 sm:w-10/12 break-words" }, lo = { class: "mt-4 text-gray-500 text-sm" }, no = { key: 0, class: "mt-8" }, ao = ["onClick"], oo = { name: "uiModal" }, ro = Object.assign(oo, { props: { title: String, actions: Object, modalName: String, open: { type: Boolean, default: false }, type: { type: String, default: "default" }, loading: { type: Boolean, default: false } }, emits: ["modalAction"], setup(l2, { emit: s2 }) {
|
|
2232
2192
|
const u2 = l2, c2 = s2, p2 = (e2) => {
|
|
2233
2193
|
c2("modalAction", { modal: u2.modalName, action: e2 });
|
|
2234
2194
|
};
|
|
2235
|
-
return (s3, u3) => (e(), t(d(
|
|
2236
|
-
} }),
|
|
2195
|
+
return (s3, u3) => (e(), t(d(Zl), { as: "template", show: l2.open }, { default: E(() => [o(d(dl), { as: "div", class: "relative z-10", onClose: u3[1] || (u3[1] = (e2) => p2("close")) }, { default: E(() => [o(d(Jl), { as: "template", enter: "ease-out duration-300", "enter-from": "opacity-0", "enter-to": "opacity-100", leave: "ease-in duration-200", "leave-from": "opacity-100", "leave-to": "opacity-0" }, { default: E(() => [Ja]), _: 1 }), i("div", Ga, [i("div", Za, [o(d(Jl), { as: "template", enter: "ease-out duration-300", "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", "enter-to": "opacity-100 translate-y-0 sm:scale-100", leave: "ease-in duration-200", "leave-from": "opacity-100 translate-y-0 sm:scale-100", "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" }, { default: E(() => [o(d(cl), { class: "relative transform 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" }, { default: E(() => [i("div", Xa, [i("button", { type: "button", class: "rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none", onClick: u3[0] || (u3[0] = (e2) => p2("close")) }, [Qa, o(K, { icon: d(vn), "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])])]), i("div", eo, [i("div", { class: n(["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", { "bg-red-100": "danger" === l2.type, "bg-green-100": "success" === l2.type, "bg-indigo-100": "default" === l2.type, "bg-yellow-100": "warning" === l2.type }]) }, [B(o(d(vn), { class: "h-6 w-6 text-red-600", "aria-hidden": "true" }, null, 512), [[L, "danger" === l2.type]]), B(o(d(ln), { class: "h-6 w-6 text-green-600", "aria-hidden": "true" }, null, 512), [[L, "success" === l2.type]]), B(o(d(un), { class: "h-6 w-6 text-yellow-600", "aria-hidden": "true" }, null, 512), [[L, "warning" === l2.type]]), B(o(d(dn), { class: "h-6 w-6 text-indigo-600", "aria-hidden": "true" }, null, 512), [[L, "default" === l2.type]])], 2), i("div", to, [o(d(pl), { as: "h3", class: "text-lg font-medium leading-6 text-gray-900" }, { default: E(() => [I(_(l2.title), 1)]), _: 1 }), i("div", lo, [r(s3.$slots, "default")]), l2.actions ? (e(), a("div", no, [(e(true), a(w, null, j(l2.actions, (t2, l3) => (e(), a("button", { key: l3, type: "button", 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", onClick: (e2) => p2(t2.value) }, _(t2.name), 9, ao))), 128))])) : R("", true)])])]), _: 3 })]), _: 3 })])])]), _: 3 })]), _: 3 }, 8, ["show"]));
|
|
2196
|
+
} }), io = { class: "w-full flex flex-col items-center space-y-4 sm:items-end" }, so = { key: 0, class: "max-w-sm w-full bg-white shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden" }, uo = { class: "p-4" }, co = { class: "flex items-start" }, po = { class: "flex-shrink-0 mt-0.5" }, go = { class: "ml-3 w-0 flex-1 pt-0.5" }, mo = { class: "font-medium text-gray-900" }, fo = { class: "mt-1 text-sm text-gray-500" }, vo = { class: "ml-4 flex-shrink-0 flex" }, ho = i("span", { class: "sr-only" }, "Close", -1), yo = { name: "uiNotification" }, bo = Object.assign(yo, { props: { show: Boolean, type: { type: String, default: "info" }, title: String, message: String, fixed: { type: Boolean, default: true } }, setup(t2) {
|
|
2237
2197
|
const l2 = t2, r2 = u(() => l2.show);
|
|
2238
|
-
return (l3, s2) => (e(), a("div", { "aria-live": "assertive", class: n([{ fixed: t2.fixed }, "inset-0 flex items-end px-4 py-6 pointer-events-none sm:p-6 sm:items-start"]) }, [i("div",
|
|
2239
|
-
} }),
|
|
2198
|
+
return (l3, s2) => (e(), a("div", { "aria-live": "assertive", class: n([{ fixed: t2.fixed }, "inset-0 flex items-end px-4 py-6 pointer-events-none sm:p-6 sm:items-start"]) }, [i("div", io, [o(P, { "enter-active-class": "transform ease-out duration-300 transition", "enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2", "enter-to-class": "translate-y-0 opacity-100 sm:translate-x-0", "leave-active-class": "transition ease-in duration-100", "leave-from-class": "opacity-100", "leave-to-class": "opacity-0" }, { default: E(() => [r2.value ? (e(), a("div", so, [i("div", uo, [i("div", co, [i("div", po, [B(o(d(tn), { "aria-hidden": "true", class: "h-6 w-6 text-green-400" }, null, 512), [[L, "success" === t2.type]]), B(o(d(fn), { "aria-hidden": "true", class: "h-6 w-6 text-red-400" }, null, 512), [[L, "danger" === t2.type]]), B(o(d(un), { "aria-hidden": "true", class: "h-6 w-6 text-yellow-400" }, null, 512), [[L, "warning" === t2.type]]), B(o(d(pn), { "aria-hidden": "true", class: "h-6 w-6 text-indigo-600" }, null, 512), [[L, "info" === t2.type]])]), i("div", go, [i("p", mo, _(t2.title), 1), i("p", fo, _(t2.message), 1)]), i("div", vo, [i("button", { 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", type: "button", onClick: s2[0] || (s2[0] = (e2) => l3.$emit("closeNotification")) }, [ho, o(d(vn), { "aria-hidden": "true", class: "h-5 w-5" })])])])])])) : R("", true)]), _: 1 })])], 2));
|
|
2199
|
+
} }), xo = { key: 0, role: "list", class: "divide-y divide-gray-100" }, wo = { class: "min-w-0" }, ko = { class: "flex items-start gap-x-3" }, So = { class: "text-sm font-semibold leading-6 text-gray-900" }, Co = { class: "mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500" }, Oo = { class: "truncate" }, Mo = { class: "flex flex-none items-center gap-x-4" }, To = ["href"], Do = { class: "sr-only" }, Eo = { key: 1, class: "divide-y divide-gray-100 animate-pulse" }, Io = [z('<div class="min-w-0 w-full"><div class="flex items-start gap-x-3"><p class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2"></p></div></div><div class="flex flex-none items-center gap-x-4"><div class="hidden rounded-md bg-gray-200 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"><p class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-10"></p></div></div>', 2)], _o = { name: "uiTaskList" }, Po = Object.assign(_o, { props: { tasks: { type: Array, required: true }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => t2.loading ? (e(), a("ul", Eo, [(e(true), a(w, null, j(t2.tasks, (t3) => (e(), a("li", { key: t3.id, class: "flex items-center justify-between gap-x-6 py-5" }, Io))), 128))])) : (e(), a("ul", xo, [(e(true), a(w, null, j(t2.tasks, (t3) => (e(), a("li", { key: t3.id, class: "flex items-center justify-between gap-x-6 py-5" }, [i("div", wo, [i("div", ko, [i("p", So, _(t3.name), 1), i("p", { class: n([{ "text-green-700 bg-green-50 ring-green-600/20": "Complete" === t3.status, "text-gray-600 bg-gray-50 ring-gray-500/10": "In progress" === t3.status, "text-yellow-800 bg-yellow-50 ring-yellow-600/20": "Incomplete" === t3.status }, "rounded-md whitespace-nowrap mt-0.5 px-1.5 py-0.5 text-xs font-medium ring-1 ring-inset"]) }, _(t3.statusLiteral), 3)]), i("div", Co, [i("p", Oo, _(t3.description), 1)])]), i("div", Mo, [i("a", { href: t3.href, 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" }, [I(_(t3.action), 1), i("span", Do, ", " + _(t3.name), 1)], 8, To)])]))), 128))])) });
|
|
2240
2200
|
"undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
|
|
2241
|
-
function
|
|
2201
|
+
function jo(e2) {
|
|
2242
2202
|
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
2243
2203
|
}
|
|
2244
2204
|
!function(e2) {
|
|
@@ -2274,42 +2234,42 @@ function Bo(e2) {
|
|
|
2274
2234
|
} };
|
|
2275
2235
|
l2.default.locale(n2, null, true);
|
|
2276
2236
|
}(Y);
|
|
2277
|
-
const
|
|
2237
|
+
const Ro = (e2, t2) => {
|
|
2278
2238
|
const l2 = e2.__vccOpts || e2;
|
|
2279
2239
|
for (const [e3, n2] of t2)
|
|
2280
2240
|
l2[e3] = n2;
|
|
2281
2241
|
return l2;
|
|
2282
|
-
},
|
|
2283
|
-
const
|
|
2242
|
+
}, Bo = { class: "dateSelector flex items-center text-white flex-row" }, Ao = { class: "pagination flex items-center my-1 md:my-0" }, Lo = { class: "date mx-4 font-bold text-center text-indigo-600 select-none uppercase" }, Fo = { class: "pagination flex items-center my-1 sm:my-0" };
|
|
2243
|
+
const No = Ro({ name: "dateSelector", components: { ChevronLeftIcon: an, ChevronRightIcon: on }, computed: { currentDate() {
|
|
2284
2244
|
return Y(this.selectedDate).locale("es").format("DD MMM. YYYY");
|
|
2285
2245
|
} }, props: { selectedDate: { type: Object, required: true } }, methods: { selectDate(e2, t2) {
|
|
2286
2246
|
let l2;
|
|
2287
2247
|
"previous" === t2 && ("day" === e2 && (l2 = Y(this.selectedDate).subtract(1, "day")), "month" === e2 && (l2 = Y(this.selectedDate).subtract(1, "month")), "year" === e2 && (l2 = Y(this.selectedDate).subtract(1, "year"))), "next" === t2 && ("day" === e2 && (l2 = Y(this.selectedDate).add(1, "day")), "month" === e2 && (l2 = Y(this.selectedDate).add(1, "month")), "year" === e2 && (l2 = Y(this.selectedDate).add(1, "year"))), this.$emit("dateSelected", l2);
|
|
2288
2248
|
} } }, [["render", function(t2, l2, n2, r2, s2, u2) {
|
|
2289
2249
|
const d2 = $("ChevronLeftIcon"), c2 = $("ChevronRightIcon");
|
|
2290
|
-
return e(), a("div",
|
|
2291
|
-
}]]),
|
|
2292
|
-
const
|
|
2293
|
-
return e(), a("div",
|
|
2250
|
+
return e(), a("div", Bo, [i("div", Ao, [i("div", { class: "previousYear flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[0] || (l2[0] = (e2) => u2.selectDate("year", "previous")) }, [o(d2, { class: "h-4" }), o(d2, { class: "h-4 -ml-3" }), o(d2, { class: "h-4 -ml-3" })]), i("div", { class: "previousMonth flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[1] || (l2[1] = (e2) => u2.selectDate("month", "previous")) }, [o(d2, { class: "h-4" }), o(d2, { class: "h-4 -ml-3" })]), i("div", { class: "previousDay flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[2] || (l2[2] = (e2) => u2.selectDate("day", "previous")) }, [o(d2, { class: "h-4" })])]), i("div", Lo, _(u2.currentDate), 1), i("div", Fo, [i("div", { class: "previousDay flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[3] || (l2[3] = (e2) => u2.selectDate("day", "next")) }, [o(c2, { class: "h-4" })]), i("div", { class: "previousMonth flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[4] || (l2[4] = (e2) => u2.selectDate("month", "next")) }, [o(c2, { class: "h-4" }), o(c2, { class: "h-4 -ml-3" })]), i("div", { class: "previousYear flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[5] || (l2[5] = (e2) => u2.selectDate("year", "next")) }, [o(c2, { class: "h-4" }), o(c2, { class: "h-4 -ml-3" }), o(c2, { class: "h-4 -ml-3" })])])]);
|
|
2251
|
+
}]]), zo = { name: "SkeletonTable" }, $o = { class: "px-4 sm:px-6 lg:px-8 animate-pulse" }, Ho = { class: "flow-root" }, Vo = { class: "-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8" }, Yo = { class: "inline-block min-w-full py-2 align-middle px-1" }, Uo = { class: "overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, qo = { class: "min-w-full divide-y divide-gray-300" }, Wo = i("thead", { class: "bg-gray-50" }, [i("tr", null, [i("th", { scope: "col", class: "py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "relative py-3.5 pl-3 pr-4 sm:pr-6" }, [i("span", { class: "sr-only" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })])])])], -1), Ko = { class: "divide-y divide-gray-200 bg-white" }, Jo = [i("td", { class: "whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6" }, [i("a", { href: "#", class: "text-indigo-600 hover:text-indigo-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" }), i("span", { class: "sr-only" }, [I(", {"), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })])])], -1)];
|
|
2252
|
+
const Go = Ro(zo, [["render", function(t2, l2, n2, o2, r2, s2) {
|
|
2253
|
+
return e(), a("div", $o, [i("div", Ho, [i("div", Vo, [i("div", Yo, [i("div", Uo, [i("table", qo, [Wo, i("tbody", Ko, [(e(), a(w, null, j(10, (e2) => i("tr", { key: e2 }, Jo)), 64))])])])])])])]);
|
|
2294
2254
|
}]]);
|
|
2295
|
-
var
|
|
2296
|
-
|
|
2255
|
+
var Zo = { exports: {} };
|
|
2256
|
+
Zo.exports = function(e2, t2, l2) {
|
|
2297
2257
|
t2.prototype.isToday = function() {
|
|
2298
2258
|
var e3 = "YYYY-MM-DD", t3 = l2();
|
|
2299
2259
|
return this.format(e3) === t3.format(e3);
|
|
2300
2260
|
};
|
|
2301
2261
|
};
|
|
2302
|
-
const
|
|
2303
|
-
const
|
|
2262
|
+
const Xo = jo(Zo.exports), Qo = { class: "text-xs" }, er = { class: "font-bold text-lg" }, tr = { class: "text-xs font-medium" };
|
|
2263
|
+
const lr = { name: "dayPrice", props: { currency: String, price: Object, basePrice: Number, isBasePrice: { type: Boolean, default: false } }, computed: { currentDay() {
|
|
2304
2264
|
return { isWeekend: 6 == Y(this.price.date).format("d") || 0 == Y(this.price.date).format("d"), price: this.price.price };
|
|
2305
|
-
} } },
|
|
2306
|
-
const
|
|
2307
|
-
return Y.extend(
|
|
2265
|
+
} } }, nr = { class: "priceDay" };
|
|
2266
|
+
const ar = { name: "uiPriceCalendar", data: () => ({ today: /* @__PURE__ */ new Date(), date: /* @__PURE__ */ new Date(), selectedRooms: [], showBasePricesModal: false, showDays: 14 }), props: { type: String, category: { type: Object, required: true }, rooms: { type: Array, required: true }, currency: Object, actions: Array, loading: { type: Boolean, default: true }, literals: { type: Object, required: true } }, components: { DateSelector: No, Day: Ro({ name: "calendarDay", props: { day: Object }, computed: { currentDay() {
|
|
2267
|
+
return Y.extend(Xo), { dayName: Y(this.day).locale("es").format("ddd"), day: Y(this.day).locale("es").format("DD"), month: Y(this.day).locale("es").format("MMM."), isWeekend: 6 == Y(this.day).format("d") || 0 == Y(this.day).format("d"), isToday: Y(this.day).isToday() };
|
|
2308
2268
|
} } }, [["render", function(t2, l2, o2, r2, s2, u2) {
|
|
2309
|
-
return e(), a("div", { class: n(["day select-none text-center", { "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-[#0ff] text-white": u2.currentDay.isToday }]) }, [i("p",
|
|
2310
|
-
}]]), Price:
|
|
2311
|
-
return e(), a("div",
|
|
2312
|
-
}]]), uiButton: Q, SkeletonTable:
|
|
2269
|
+
return e(), a("div", { class: n(["day select-none text-center", { "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-[#0ff] text-white": u2.currentDay.isToday }]) }, [i("p", Qo, _(u2.currentDay.dayName), 1), i("p", er, _(u2.currentDay.day), 1), i("p", tr, _(u2.currentDay.month), 1)], 2);
|
|
2270
|
+
}]]), Price: Ro(lr, [["render", function(t2, l2, o2, r2, s2, u2) {
|
|
2271
|
+
return e(), a("div", nr, [i("div", { class: n([{ "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-green-300 text-white": o2.price.price > o2.basePrice, "bg-yellow-300 text-white": o2.price.price < o2.basePrice }, "select-none text-center rounded-lg p-1"]) }, _(u2.currentDay.price) + _(o2.currency), 3)]);
|
|
2272
|
+
}]]), uiButton: Q, SkeletonTable: Go }, computed: { days() {
|
|
2313
2273
|
let e2 = [];
|
|
2314
2274
|
for (let t2 = 0; t2 < this.showDays; t2++)
|
|
2315
2275
|
e2.push(Y(this.date).add(t2, "day"));
|
|
@@ -2331,98 +2291,98 @@ const rr = { name: "uiPriceCalendar", data: () => ({ today: /* @__PURE__ */ new
|
|
|
2331
2291
|
this.$emit("tableAction", e2);
|
|
2332
2292
|
}, changeRoomPrice(e2) {
|
|
2333
2293
|
this.$emit("changeRoomPrice", e2);
|
|
2334
|
-
} } },
|
|
2335
|
-
const
|
|
2294
|
+
} } }, or = { key: 0, class: "px-4 sm:px-6 lg:px-8" }, rr = { class: "flow-root" }, ir = { class: "overflow-x-auto sm:-mx-6 lg:-mx-8 shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, sr = { class: "inline-block min-w-full align-middle" }, ur = { class: "min-w-full text-sm" }, dr = { class: "bg-white" }, cr = { colspan: "6", scope: "colgroup", class: "bg-gray-50 py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-3" }, pr = { colspan: "20", scope: "colgroup", class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, gr = { key: 0 }, mr = { colspan: "6", class: "pl-4" }, fr = { key: 1 }, vr = { colspan: "6", class: "pl-4" }, hr = { key: 2 }, yr = { colspan: "6", class: "pl-4" }, br = { colspan: "20", scope: "colgroup", class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900 relative" }, xr = { key: 0, 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" }, wr = ["onClick"], kr = { colspan: "2", scope: "colgroup", class: "relative bg-gray-100 py-3.5 pl-4 pr-3 text-left font-semibold text-gray-900" }, Sr = ["checked", "indeterminate"], Cr = { class: "pl-6" }, Or = { colspan: "2", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, Mr = { colspan: "2", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, Tr = i("th", { colspan: "14", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, null, -1), Dr = { colspan: "2", class: "relative py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6" }, Er = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, Ir = ["value"], _r = { class: "pl-6" }, Pr = { colspan: "2", class: "pl-4" }, jr = { colspan: "2", class: "pl-4" };
|
|
2295
|
+
const Rr = Ro(ar, [["render", function(l2, r2, s2, u2, d2, c2) {
|
|
2336
2296
|
var _a2, _b;
|
|
2337
|
-
const p2 = $("DateSelector"), g2 = $("Day"),
|
|
2338
|
-
return s2.loading ? (e(), t(v2, { key: 1 })) : (e(), a("div",
|
|
2339
|
-
}]]),
|
|
2297
|
+
const p2 = $("DateSelector"), g2 = $("Day"), m2 = $("uiButton"), f2 = $("Price"), v2 = $("SkeletonTable");
|
|
2298
|
+
return s2.loading ? (e(), t(v2, { key: 1 })) : (e(), a("div", or, [i("div", rr, [i("div", ir, [i("div", sr, [i("table", ur, [i("tbody", dr, [i("tr", null, [i("th", cr, [o(p2, { selectedDate: l2.date, onDateSelected: r2[0] || (r2[0] = (e2) => c2.changeDate(e2)) }, null, 8, ["selectedDate"])]), (e(true), a(w, null, j(c2.days, (t2, l3) => (e(), a("th", { scope: "col", key: l3, class: "text-sm font-semibold text-gray-900 p-0" }, [o(g2, { class: "border-l border-gray-200 px-6 py-3", day: t2 }, null, 8, ["day"])]))), 128))]), i("tr", null, [i("th", pr, [i("span", null, _(s2.literals.category) + " " + _(s2.category.name), 1), o(m2, { loading: s2.loading, class: "ml-4", size: "small", onClick: c2.changeCategoryBulkPrices }, { default: E(() => [I(_(s2.literals.changeInBulk), 1)]), _: 1 }, 8, ["loading", "onClick"])])]), "discounts" === s2.type ? (e(), a("tr", gr, [i("td", mr, _(s2.literals.pricesDiscount), 1), (e(true), a(w, null, j(s2.category.selectionPrices, (t2, l3) => (e(), a("td", { key: l3, class: "p-0" }, [o(f2, { onClick: (e2) => c2.changeCategorySelectionPrice(t2), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer", price: t2, currency: s2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))])) : R("", true), "prices" === s2.type ? (e(), a("tr", fr, [i("td", vr, _(s2.literals.pricesSelection), 1), (e(true), a(w, null, j(s2.category.selectionPrices, (t2, l3) => (e(), a("td", { key: l3, class: "p-0" }, [o(f2, { onClick: (e2) => c2.changeCategorySelectionPrice(t2), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer", price: t2, currency: s2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))])) : R("", true), "prices" === s2.type ? (e(), a("tr", hr, [i("td", yr, _(s2.literals.pricesUpgrade), 1), (e(true), a(w, null, j(s2.category.upgradePrices, (t2, l3) => (e(), a("td", { key: l3, class: "p-0" }, [o(f2, { onClick: (e2) => c2.changeCategoryUpgradePrice(t2), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer bg-gray-100", price: t2, currency: s2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))])) : R("", true), i("tr", null, [i("th", br, [((_a2 = l2.selectedRooms) == null ? void 0 : _a2.length) > 0 && ((_b = s2.actions) == null ? void 0 : _b.length) > 0 ? (e(), a("div", xr, [(e(true), a(w, null, j(s2.actions, (t2, n2) => (e(), a("button", { onClick: (e2) => c2.tableAction({ action: t2.id, items: l2.selectedRooms }), key: n2, type: "button", 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" }, _(t2.name), 9, wr))), 128))])) : R("", true), i("span", null, _(s2.literals.pricesSelection), 1)])]), i("tr", null, [i("th", kr, [i("input", { type: "checkbox", class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", checked: c2.indeterminate || l2.selectedRooms.length === s2.rooms.length, indeterminate: c2.indeterminate, onChange: r2[1] || (r2[1] = (e2) => l2.selectedRooms = e2.target.checked ? s2.rooms.map((e3) => e3.name) : []) }, null, 40, Sr), i("span", Cr, _(s2.literals.room), 1)]), i("th", Or, _(s2.literals.building), 1), i("th", Mr, _(s2.literals.floor), 1), Tr]), (e(true), a(w, null, j(s2.rooms, (t2) => (e(), a("tr", { key: t2.name, class: n([{ "even:bg-gray-100": "prices" === s2.type, "odd:bg-gray-100": "discounts" === s2.type }]) }, [i("td", Dr, [l2.selectedRooms.includes(t2.name) ? (e(), a("div", Er)) : R("", true), B(i("input", { type: "checkbox", class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", value: t2.name, "onUpdate:modelValue": r2[2] || (r2[2] = (e2) => l2.selectedRooms = e2) }, null, 8, Ir), [[H, l2.selectedRooms]]), i("span", _r, _(t2.name), 1)]), i("td", Pr, _(t2.building), 1), i("td", jr, _(t2.floor), 1), (e(true), a(w, null, j(t2.selectionPrices, (t3, l3) => (e(), a("td", { class: "p-0", key: l3 }, [o(f2, { onClick: (e2) => c2.changeRoomPrice(t3), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 cursor-pointer", price: t3, currency: s2.currency.symbol, basePrice: c2.getSelectionBasePrice(t3) }, null, 8, ["onClick", "price", "currency", "basePrice"])]))), 128))], 2))), 128))])])])])])]));
|
|
2299
|
+
}]]), Br = { class: "chart-selector flex flex-row items-center justify-center" }, Ar = { name: "rangeSelector" }, Lr = Object.assign(Ar, { props: { range: { type: String } }, emits: ["rangeSelected"], setup(t2, { emit: l2 }) {
|
|
2340
2300
|
const o2 = l2, r2 = t2;
|
|
2341
2301
|
let s2 = u(() => r2.range);
|
|
2342
2302
|
const c2 = (e2) => {
|
|
2343
2303
|
s2.value = e2, o2("rangeSelected", e2);
|
|
2344
2304
|
};
|
|
2345
|
-
return (t3, l3) => (e(), a("ul",
|
|
2346
|
-
} }),
|
|
2305
|
+
return (t3, l3) => (e(), a("ul", Br, [i("li", { class: n({ selected: "24h" === d(s2) }), onClick: l3[0] || (l3[0] = (e2) => c2("24h")) }, " 24H ", 2), i("li", { class: n({ selected: "7d" === d(s2) }), onClick: l3[1] || (l3[1] = (e2) => c2("7d")) }, "7D", 2), i("li", { class: n({ selected: "1m" === d(s2) }), onClick: l3[2] || (l3[2] = (e2) => c2("1m")) }, "1M", 2), i("li", { class: n({ selected: "3m" === d(s2) }), onClick: l3[3] || (l3[3] = (e2) => c2("3m")) }, "3M", 2)]));
|
|
2306
|
+
} }), Fr = { class: "chart-header flex flex-row justify-between" }, Nr = { class: "text-sm font-medium text-gray-500 truncate" }, zr = { class: "chart-content" }, $r = { class: "h-full w-full flex items-center justify-center flex-col" }, Hr = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Vr = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, Yr = [i("div", { role: "status", class: "w-full animate-pulse h-full flex flex-col" }, [i("div", { class: "h-2.5 w-36 bg-gray-200 rounded-full mb-2.5" }), i("div", { class: "w-48 h-2 mb-6 bg-gray-200 rounded-full" }), i("div", { class: "flex flex-row justify-between items-baseline grow gap-x-1" }, [i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" })])], -1)], Ur = { name: "uiChart" }, qr = Object.assign(Ur, { props: { title: String, id: { type: String, default: "noChartId" }, type: { type: String, default: "area" }, series: { type: Array, required: true }, options: { type: Object, required: true }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false }, range: { type: String, default: "24h" }, horizontal: { type: Boolean, default: false }, stacked: { type: Boolean, default: false }, height: { type: Number, default: 320 } }, emits: ["selectedRange", "chartUpdated", "dataPointSelection"], setup(t2, { emit: l2 }) {
|
|
2347
2307
|
const r2 = l2, s2 = t2;
|
|
2348
2308
|
let c2 = { chart: { toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff", "#00ffff", "#aba9ba"], stroke: { show: true, curve: "stepline", lineCap: "butt", width: 1, dashArray: 0 }, dataLabels: { enabled: false }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } } };
|
|
2349
2309
|
"area" === s2.type && (c2.tooltip = { intersect: true, shared: false });
|
|
2350
|
-
const p2 = u(() => s2.series), g2 = u(() => (c2.chart.stacked = s2.stacked, { ...c2, ...s2.options, plotOptions: { bar: { horizontal: s2.horizontal } } })),
|
|
2310
|
+
const p2 = u(() => s2.series), g2 = u(() => (c2.chart.stacked = s2.stacked, { ...c2, ...s2.options, plotOptions: { bar: { horizontal: s2.horizontal } } })), m2 = () => r2("chartUpdated"), f2 = (e2, t3, l3) => {
|
|
2351
2311
|
r2("dataPointSelection", { id: s2.id, chartContext: t3, config: l3, event: e2 });
|
|
2352
2312
|
};
|
|
2353
|
-
return (l3, r3) => (e(), a(
|
|
2354
|
-
} }),
|
|
2355
|
-
const
|
|
2356
|
-
return e(), a("footer",
|
|
2357
|
-
}]]),
|
|
2358
|
-
const c2 = l2, p2 = t2, g2 = s(3),
|
|
2313
|
+
return (l3, r3) => (e(), a(w, null, [B(i("div", { class: n(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div", Fr, [i("div", Nr, _(t2.title), 1), o(Lr, { range: t2.range, onRangeSelected: r3[0] || (r3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), B(i("div", zr, [o(d(U), { type: t2.type, series: p2.value, width: "100%", height: t2.height, options: g2.value, onUpdated: m2, onMounted: m2, onDataPointSelection: f2 }, null, 8, ["type", "series", "height", "options"])], 512), [[L, !t2.empty]]), B(i("div", $r, [o(K, { icon: d(un), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Hr], 512), [[L, t2.empty]])], 2), [[L, !t2.loading]]), B(i("div", Vr, Yr, 512), [[L, t2.loading]])], 64));
|
|
2314
|
+
} }), Wr = { name: "uiFooter" }, Kr = { class: "bg-white" }, Jr = [i("div", { class: "mx-auto py-6 px-4 sm:px-6 md:flex md:items-center md:justify-between lg:px-8" }, [i("div", { class: "mt-8 md:mt-0 md:order-1" }, [i("p", { class: "text-center text-base text-gray-400" }, "© Made by Hotelinking.")])], -1)];
|
|
2315
|
+
const Gr = Ro(Wr, [["render", function(t2, l2, n2, o2, r2, i2) {
|
|
2316
|
+
return e(), a("footer", Kr, Jr);
|
|
2317
|
+
}]]), Zr = i("div", { class: "spinner h-12 w-12 mb-6" }, [i("img", { src: "https://images.hotelinking.com/ui/loader.gif", alt: "loading animation" })], -1), Xr = { name: "uiLoadScreen" }, Qr = Object.assign(Xr, { props: { title: String, message: String, fixed: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => (e(), a("div", { class: n([{ fixed: t2.fixed }, "load-screen h-full w-full top-0 left-0 z-50 flex flex-col items-center justify-center bg-gray-50"]) }, [Zr, B(i("h2", { class: "text-xs font-bold text-center uppercase mb-2" }, _(t2.title), 513), [[L, t2.title]]), B(i("p", { class: "text-xs text-center uppercase md:w-1/4" }, _(t2.message), 513), [[L, t2.message]])], 2)) }), ei = { key: 0, class: "py-6 flex items-center justify-between" }, ti = { class: "flex-1 flex justify-between sm:hidden" }, li = { href: "#", class: "relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" }, ni = { href: "#", class: "ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" }, ai = { class: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between" }, oi = { class: "text-sm text-gray-700" }, ri = { class: "font-bold" }, ii = { class: "font-bold" }, si = { class: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px", "aria-label": "Pagination" }, ui = { class: "sr-only" }, di = ["onClick"], ci = { class: "sr-only" }, pi = { key: 1, class: "py-6 flex flex-row justify-between items-center animate-pulse" }, gi = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5" }, null, -1), i("div", { class: "h-10 w-32 bg-gray-200 rounded dark:bg-gray-300" }, null, -1)], mi = { name: "uiPagination" }, fi = Object.assign(mi, { props: { current: { type: Number, requires: true }, total: { type: Number, requires: true }, loading: { type: Boolean, default: true } }, emits: ["changePage"], setup(t2, { emit: l2 }) {
|
|
2318
|
+
const c2 = l2, p2 = t2, g2 = s(3), m2 = u(() => Math.max(1, Number(p2.current) - Number(g2.value))), f2 = u(() => Math.min(Number(p2.current) + Number(g2.value), Number(p2.total))), v2 = u(() => {
|
|
2359
2319
|
let e2 = [];
|
|
2360
|
-
for (let t3 = Number(
|
|
2320
|
+
for (let t3 = Number(m2.value); t3 <= Number(f2.value); t3++)
|
|
2361
2321
|
e2.push(t3);
|
|
2362
2322
|
return e2;
|
|
2363
2323
|
});
|
|
2364
|
-
return (l3, s2) => t2.loading ? (e(), a("div",
|
|
2365
|
-
} }),
|
|
2324
|
+
return (l3, s2) => t2.loading ? (e(), a("div", pi, gi)) : (e(), a("div", ei, [i("div", ti, [i("a", li, [r(l3.$slots, "previous")]), i("a", ni, [r(l3.$slots, "next")])]), i("div", ai, [i("div", null, [i("p", oi, [r(l3.$slots, "showing"), I(), i("span", ri, _(t2.current + " "), 1), r(l3.$slots, "of"), I(), i("span", ii, _(t2.total), 1)])]), i("div", null, [i("nav", si, [B(i("button", { onClick: s2[0] || (s2[0] = (e2) => c2("changePage", t2.current - 1)), class: "relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50" }, [i("span", ui, [r(l3.$slots, "previous")]), o(d(an), { class: "h-5 w-5", "aria-hidden": "true" })], 512), [[L, 1 !== t2.current]]), (e(true), a(w, null, j(v2.value, (l4) => (e(), a("button", { onClick: (e2) => c2("changePage", l4), key: l4, "aria-current": "page", class: n([[l4 === t2.current ? "z-10 bg-indigo-50 border-indigo-500 text-indigo-600" : "bg-white border-gray-300 text-gray-500 hover:bg-gray-50"], "relative inline-flex items-center px-4 py-2 border text-sm font-medium"]) }, _(l4), 11, di))), 128)), B(i("button", { onClick: s2[1] || (s2[1] = (e2) => c2("changePage", t2.current + 1)), class: "relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50" }, [i("span", ci, [r(l3.$slots, "next")]), o(d(on), { class: "h-5 w-5", "aria-hidden": "true" })], 512), [[L, t2.current !== t2.total]])])])])]));
|
|
2325
|
+
} }), vi = { class: "hidden md:flex md:flex-col sticky md:inset-y-0" }, hi = { class: "flex flex-col flex-grow overflow-y-auto" }, yi = { class: "grow flex flex-col" }, bi = { class: "flex-1 space-y-1", "aria-label": "Sidebar" }, xi = { key: 0 }, wi = ["onClick"], ki = { key: 0 }, Si = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, Ci = { key: 0, class: "flex-1" }, Oi = { key: 1, class: "flex-1" }, Mi = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1)], Ti = { key: 0 }, Di = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, Ei = { name: "uiSidebar" }, Ii = Object.assign(Ei, { props: { navigation: { type: Array, required: true }, loading: { type: Boolean, default: true } }, emits: ["sideBarClick"], setup(l2, { emit: r2 }) {
|
|
2366
2326
|
const s2 = r2;
|
|
2367
|
-
return (r3, u2) => (e(), a("div",
|
|
2368
|
-
} }),
|
|
2327
|
+
return (r3, u2) => (e(), a("div", vi, [i("div", hi, [i("div", yi, [i("nav", bi, [(e(true), a(w, null, j(l2.navigation, (r4) => (e(), a(w, { key: r4.name }, [r4.children ? (e(), t(d(hl), { key: 1, as: "div", class: "space-y-1" }, { default: E(({ open: i2 }) => [o(d(yl), { class: n([r4.current ? "bg-indigo-600 text-white" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900", "group w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none"]) }, { default: E(() => [o(K, { loading: l2.loading, icon: r4.icon, class: "mr-3 flex-shrink-0 h-6 w-6 text-gray-400 group-hover:text-gray-500", "aria-hidden": "true" }, null, 8, ["loading", "icon"]), l2.loading ? (e(), a("div", Oi, Mi)) : (e(), a("span", Ci, _(r4.name), 1)), o(d(on), { class: n([i2 ? "text-gray-400 rotate-90" : "text-gray-400", "ml-3 flex-shrink-0 h-3 w-3 transform group-hover:text-gray-400 transition-colors ease-in-out duration-150"]) }, null, 8, ["class"])]), _: 2 }, 1032, ["class"]), o(d(bl), { class: "space-y-1" }, { default: E(() => [(e(true), a(w, null, j(r4.children, (n2) => (e(), t(d(yl), { onClick: (e2) => s2("sideBarClick", n2.id), key: n2.name, class: "group w-full flex items-center pl-11 pr-2 py-2 text-sm font-medium text-gray-600 rounded-md hover:text-gray-900 hover:bg-gray-50" }, { default: E(() => [l2.loading ? (e(), a("div", Di)) : (e(), a("span", Ti, _(n2.name), 1))]), _: 2 }, 1032, ["onClick"]))), 128))]), _: 2 }, 1024)]), _: 2 }, 1024)) : (e(), a("div", xi, [i("button", { onClick: (e2) => s2("sideBarClick", r4.id), class: n([r4.current ? "bg-indigo-600 text-white" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900", "group w-full flex items-center pl-2 py-2 text-sm font-medium rounded-md"]) }, [o(K, { loading: l2.loading, icon: r4.icon, class: n([r4.current ? "text-white" : "text-gray-400 group-hover:text-gray-500", "mr-3 flex-shrink-0 h-6 w-6"]), "aria-hidden": "true" }, null, 8, ["loading", "icon", "class"]), l2.loading ? (e(), a("div", Si)) : (e(), a("span", ki, _(r4.name), 1))], 10, wi)]))], 64))), 128))])])])]));
|
|
2328
|
+
} }), _i = { key: 0 }, Pi = { class: "ml-16 text-sm font-medium text-gray-500 truncate" }, ji = { class: "ml-16 flex items-baseline pb-5" }, Ri = { class: "text-2xl font-semibold text-gray-900" }, Bi = { class: "absolute bottom-0 inset-x-0 bg-gray-50 px-4 py-4 sm:px-6" }, Ai = { class: "text-sm" }, Li = { key: 1 }, Fi = { class: "relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full pb-6" }, Ni = { class: "absolute bg-gray-200 rounded-md p-3 animate-pulse" }, zi = i("div", { class: "ml-16" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2 mb-4 animate-pulse" })], -1), $i = i("div", { class: "ml-16" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2 animate-pulse" })], -1), Hi = { name: "uiStats" }, Vi = Object.assign(Hi, { props: { item: { type: Object, required: true }, loading: { type: Boolean, default: true } }, emits: ["statClick"], setup(l2, { emit: r2 }) {
|
|
2369
2329
|
const s2 = r2;
|
|
2370
|
-
return (r3, u2) => l2.loading ? (e(), a("div",
|
|
2371
|
-
} }),
|
|
2330
|
+
return (r3, u2) => l2.loading ? (e(), a("div", Li, [i("div", Fi, [i("dt", null, [i("div", Ni, [o(K, { loading: l2.loading, icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true" }, null, 8, ["loading", "icon"])]), zi, $i])])])) : (e(), a("div", _i, [i("div", { class: n(["relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full", { "pb-12": l2.item.showFooter }]) }, [i("dt", null, [i("div", { class: n(["absolute rounded-md p-3", { "bg-indigo-500": !l2.item.color, "bg-green-500": "success" === l2.item.color, "bg-red-500": "danger" === l2.item.color, "bg-yellow-500": "warning" === l2.item.color }]) }, [o(K, { icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])], 2), i("p", Pi, _(l2.item.name), 1)]), i("dd", ji, [i("p", Ri, _(l2.item.stat), 1), l2.item.changeType ? (e(), a("p", { key: 0, class: n([{ "text-green-600": "increase" === l2.item.changeType, "text-red-600": "decrease" === l2.item.changeType, "text-black": "neutral" === l2.item.changeType }, "ml-2 flex items-baseline text-sm font-semibold"]) }, ["increase" === l2.item.changeType ? (e(), t(d(Ql), { key: 0, class: "self-center flex-shrink-0 h-3 w-3 text-green-500", "aria-hidden": "true" })) : R("", true), "decrease" === l2.item.changeType ? (e(), t(d(Xl), { key: 1, class: "self-center flex-shrink-0 h-3 w-3 text-red-500", "aria-hidden": "true" })) : R("", true), I(" " + _(l2.item.change), 1)], 2)) : R("", true), B(i("div", Bi, [i("div", Ai, [i("span", { onClick: u2[0] || (u2[0] = (e2) => s2("statClick", l2.item.id)), class: "font-medium text-indigo-600 hover:text-indigo-500 cursor-pointer" }, _(l2.item.actionText), 1)])], 512), [[L, l2.item.showFooter]])])], 2)]));
|
|
2331
|
+
} }), Yi = { key: 0, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, Ui = { class: "px-4 py-5 sm:px-6" }, qi = { class: "text-lg font-medium leading-6 text-gray-900" }, Wi = { class: "mt-1 max-w-2xl text-sm text-gray-500" }, Ki = { class: "border-t border-gray-200" }, Ji = { class: "text-sm font-medium text-gray-500" }, Gi = { key: 0, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, Zi = { key: 1, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, Xi = ["onClick"], Qi = { key: 3, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, es = { key: 1, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, ts = z('<div class="px-4 py-5 sm:px-6 animate-pulse"><h3 class="text-lg font-medium leading-6 text-gray-900"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4"></div></h3><p class="mt-1 max-w-2xl text-sm text-gray-500"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/5"></div></p></div>', 1), ls = { class: "border-t border-gray-200" }, ns = [i("dt", { class: "text-sm font-medium text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" })], -1), i("dd", { class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" })], -1)], as = { name: "uiStripedCard" }, os = Object.assign(as, { props: { title: String, subtitle: String, items: Object, loading: { type: Boolean, default: true } }, emits: ["itemClicked"], setup: (l2, { emit: r2 }) => (r3, s2) => l2.loading ? (e(), a("div", es, [ts, i("div", ls, [i("dl", null, [(e(), a(w, null, j(5, (e2) => i("div", { key: e2, class: n(["px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", [e2 % 2 == 0 ? "bg-gray-50" : "bg-white"]]) }, ns, 2)), 64))])])])) : (e(), a("div", Yi, [i("div", Ui, [i("h3", qi, _(l2.title), 1), i("p", Wi, _(l2.subtitle), 1)]), i("div", Ki, [i("dl", null, [(e(true), a(w, null, j(l2.items, (s3, u2) => (e(), a("div", { key: u2, class: n(["px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", [u2 % 2 == 0 ? "bg-gray-50" : "bg-white"]]) }, [i("dt", Ji, _(s3.title), 1), "tag" === s3.type ? (e(), a("dd", Gi, [o(na, { color: s3.color }, { default: E(() => [I(_(s3.text), 1)]), _: 2 }, 1032, ["color"])])) : "tags" === s3.type ? (e(), a("dd", Zi, [(e(true), a(w, null, j(s3.tags, (n2, a2) => (e(), t(na, { loading: l2.loading, key: a2, color: n2.color, class: "mr-2 mb-2" }, { default: E(() => [I(_(n2.text), 1)]), _: 2 }, 1032, ["loading", "color"]))), 128))])) : "link" === s3.type ? (e(), a("dd", { key: 2, class: "mt-1 text-sm text-indigo-600 hover:text-indigo-400 sm:col-span-2 sm:mt-0 cursor-pointer", onClick: (e2) => r3.$emit("itemClicked", s3.emits) }, _(s3.text), 9, Xi)) : (e(), a("dd", Qi, _(s3.text), 1))], 2))), 128))])])])) }), rs = { class: "absolute top-10 bg-indigo-600 text-white text-xs p-2 rounded z-10 font-light w-60 flex flex-row items-start" }, is = i("svg", { class: "absolute -top-3 left-0", xmlns: "http://www.w3.org/2000/svg", width: "27.687", height: "26.954", viewBox: "0 0 27.687 26.954" }, [i("path", { id: "Polígono_1", "data-name": "Polígono 1", d: "M10.5,0,21,19H0Z", transform: "translate(0 10.5) rotate(-30)", fill: "#4f46e5" })], -1), ss = { class: "ml-2" }, us = { __name: "tooltip", props: { tip: { type: String, required: true } }, setup: (t2) => (l2, n2) => (e(), a("div", rs, [is, i("div", null, [o(K, { icon: d(gn), loading: false, color: "white", size: "big" }, null, 8, ["icon"])]), i("span", ss, _(t2.tip), 1)])) }, ds = { key: 0 }, cs = { class: "flex flex-col" }, ps = { class: "-my-2 overflow-x-auto" }, gs = { class: "inline-block min-w-full py-2 align-middle px-1" }, ms = { class: "relative overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg" }, fs = { key: 0, class: "absolute top-0 left-12 flex h-12 items-center space-x-3 sm:left-16 bg-white shadow rounded px-4 py-1 z-10" }, vs = ["onClick"], hs = { class: "min-w-full table-fixed divide-y divide-gray-300" }, ys = { class: "bg-gray-50" }, bs = ["checked", "indeterminate"], xs = ["onMouseover", "onMouseleave"], ws = ["onClick"], ks = { key: 2, class: "group flex items-center uppercase text-xs" }, Ss = { class: "divide-y divide-gray-200 bg-white" }, Cs = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, Os = ["value"], Ms = ["onClick"], Ts = { key: 2 }, Ds = { name: "uiTable" }, Es = Object.assign(Ds, { props: { header: { type: Array, required: true }, items: { type: Array, required: true }, orderedBy: String, orderDirection: { type: String, default: "asc" }, actions: Array, loading: { type: Boolean, default: true } }, emits: ["tableAction", "orderBy"], setup(l2, { emit: r2 }) {
|
|
2372
2332
|
let c2 = s([]);
|
|
2373
2333
|
s(false);
|
|
2374
2334
|
let p2 = s(void 0);
|
|
2375
|
-
const g2 = r2,
|
|
2335
|
+
const g2 = r2, m2 = l2, f2 = u(() => c2.value.length > 0 && c2.value.length < m2.items.length), v2 = (e2, t2) => {
|
|
2376
2336
|
p2 !== e2 && t2 && (p2.value = e2), t2 || (p2.value = void 0);
|
|
2377
2337
|
};
|
|
2378
2338
|
return (r3, s2) => {
|
|
2379
2339
|
var _a2, _b;
|
|
2380
|
-
return l2.loading ? (e(), t(
|
|
2340
|
+
return l2.loading ? (e(), t(Go, { key: 1 })) : (e(), a("div", ds, [i("div", cs, [i("div", ps, [i("div", gs, [i("div", ms, [((_a2 = d(c2)) == null ? void 0 : _a2.length) > 0 && ((_b = l2.actions) == null ? void 0 : _b.length) > 0 ? (e(), a("div", fs, [(e(true), a(w, null, j(l2.actions, (t2, l3) => (e(), a("button", { onClick: (e2) => g2("tableAction", { action: t2.id, items: d(c2) }), key: l3, type: "button", 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" }, _(t2.name), 9, vs))), 128))])) : R("", true), i("table", hs, [i("thead", ys, [i("tr", null, [i("th", { scope: "col", class: n([l2.actions ? "px-6 sm:px-8" : "px-3", "relative"]) }, [l2.actions ? (e(), a("input", { key: 0, checked: f2.value || d(c2).length === l2.items.length, indeterminate: f2.value, class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500", type: "checkbox", onChange: s2[0] || (s2[0] = (e2) => V(c2) ? c2.value = e2.target.checked ? l2.items.map((e3) => e3.id) : [] : c2 = e2.target.checked ? l2.items.map((e3) => e3.id) : []) }, null, 40, bs)) : R("", true)], 2), (e(true), a(w, null, j(l2.header, (r4, s3) => (e(), a("th", { key: s3, class: "py-3.5 pr-3 text-left font-semibold text-gray-900 flex-wrap relative", scope: "col", onMouseover: (e2) => v2(r4.name, true), onMouseleave: (e2) => v2(r4.name, false) }, [r4.tooltip ? B((e(), t(us, { key: 0, tip: r4.tooltip }, null, 8, ["tip"])), [[L, d(p2) === r4.name]]) : R("", true), r4.value ? (e(), a("button", { key: 1, class: "group flex items-center uppercase text-xs relative", onClick: (e2) => g2("orderBy", { value: r4.value, orderDirection: "asc" === l2.orderDirection ? "desc" : "asc" }) }, [i("span", null, _(r4.name), 1), i("span", { class: n([[r4.value === l2.orderedBy ? "bg-indigo-600 text-white group-hover:bg-gray-300" : "text-gray-400 group-hover:visible group-focus:visible"], "ml-2 flex-none rounded group-hover:bg-indigo-200 group-hover:text-white"]) }, [o(K, { icon: "asc" === l2.orderDirection ? d(nn) : d(sn), loading: l2.loading, color: r4.value === l2.orderedBy ? "white" : "primary" }, null, 8, ["icon", "loading", "color"])], 2)], 8, ws)) : (e(), a("p", ks, [i("span", null, _(r4.name), 1)]))], 40, xs))), 128))])]), i("tbody", Ss, [(e(true), a(w, null, j(l2.items, (o2, r4) => {
|
|
2381
2341
|
var _a3, _b2;
|
|
2382
|
-
return e(), a("tr", { key: o2.id, class: n([d(c2).includes(o2.id) && "bg-gray-50", r4 % 2 == 0 ? void 0 : "bg-gray-50"]) }, [i("td", { class: n([((_a3 = l2.actions) == null ? void 0 : _a3.length) > 0 ? "w-2" : "w-0", "relative"]) }, [d(c2).includes(o2.id) ? (e(), a("div",
|
|
2342
|
+
return e(), a("tr", { key: o2.id, class: n([d(c2).includes(o2.id) && "bg-gray-50", r4 % 2 == 0 ? void 0 : "bg-gray-50"]) }, [i("td", { class: n([((_a3 = l2.actions) == null ? void 0 : _a3.length) > 0 ? "w-2" : "w-0", "relative"]) }, [d(c2).includes(o2.id) ? (e(), a("div", Cs)) : R("", true), ((_b2 = l2.actions) == null ? void 0 : _b2.length) > 0 ? B((e(), a("input", { key: 1, "onUpdate:modelValue": s2[1] || (s2[1] = (e2) => V(c2) ? c2.value = e2 : c2 = e2), value: o2.id, class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 flex-wrap", type: "checkbox" }, null, 8, Os)), [[H, d(c2)]]) : R("", true)], 2), (e(true), a(w, null, j(o2.row, (r5, i2) => (e(), a("td", { key: i2, class: n(["whitespace-nowrap py-4 pr-3 text-sm", d(c2).includes(o2.id) ? "text-indigo-600" : "text-gray-900"]) }, ["object" == typeof r5 && "tag" === r5.type ? (e(), t(na, { key: 0, loading: l2.loading, color: r5.color }, { default: E(() => [I(_(r5.content), 1)]), _: 2 }, 1032, ["loading", "color"])) : "object" == typeof r5 && "link" === r5.type ? (e(), a("span", { key: 1, class: "text-indigo-600 hover:text-indigo-400 cursor-pointer", onClick: (e2) => g2(r5.emits, { id: o2.id, data: (o2 == null ? void 0 : o2.emitWith) || null }) }, _(r5.content), 9, Ms)) : (e(), a("span", Ts, _(r5), 1))], 2))), 128))], 2);
|
|
2383
2343
|
}), 128))])])])])])])]));
|
|
2384
2344
|
};
|
|
2385
|
-
} }),
|
|
2345
|
+
} }), Is = { class: "lg:hidden" }, _s = ["value"], Ps = { class: "hidden lg:block" }, js = { class: "border-b border-gray-200" }, Rs = { class: "-mb-px flex space-x-8", "aria-label": "Tabs" }, Bs = ["onClick", "aria-current"], As = { name: "uiTabs" }, Ls = Object.assign(As, { props: { tabs: Array }, emits: ["tabClicked"], setup(t2, { emit: l2 }) {
|
|
2386
2346
|
const o2 = l2;
|
|
2387
|
-
return (l3, r2) => (e(), a("div", null, [i("div",
|
|
2347
|
+
return (l3, r2) => (e(), a("div", null, [i("div", Is, [i("select", { onChange: r2[0] || (r2[0] = (e2) => {
|
|
2388
2348
|
o2("tabClicked", e2.target.value);
|
|
2389
|
-
}), id: "tabs", name: "tabs", class: "block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" }, [(e(true), a(
|
|
2390
|
-
} }),
|
|
2349
|
+
}), id: "tabs", name: "tabs", class: "block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" }, [(e(true), a(w, null, j(t2.tabs, (t3) => (e(), a("option", { value: t3.id, key: t3.name }, _(t3.name), 9, _s))), 128))], 32)]), i("div", Ps, [i("div", js, [i("nav", Rs, [(e(true), a(w, null, j(t2.tabs, (t3) => (e(), a("a", { key: t3.name, onClick: (e2) => o2("tabClicked", t3.id), class: n([t3.current ? "border-indigo-500 text-indigo-600" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-200", "whitespace-nowrap flex py-4 px-1 border-b-2 font-medium text-sm cursor-pointer"]), "aria-current": t3.current ? "page" : void 0 }, [I(_(t3.name) + " ", 1), t3.count ? (e(), a("span", { key: 0, class: n([t3.current ? "bg-indigo-100 text-indigo-600" : "bg-gray-100 text-gray-900", "hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"]) }, _(t3.count), 3)) : R("", true)], 10, Bs))), 128))])])])]));
|
|
2350
|
+
} }), Fs = { key: 0, class: "bg-white overflow-hidden shadow rounded-lg" }, Ns = { class: "px-4 py-5 sm:px-6" }, zs = { class: "text-xl font-bold" }, $s = { class: "px-4 py-5 sm:p-6" }, Hs = { class: "flow-root" }, Vs = { class: "-mb-8", role: "list" }, Ys = { class: "relative pb-8" }, Us = { key: 0, class: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200", "aria-hidden": "true" }, qs = { class: "relative flex space-x-3" }, Ws = { class: "min-w-0 flex-1 pt-1.5 flex justify-between space-x-4 items-center" }, Ks = { class: "text-sm text-gray-500" }, Js = ["onClick"], Gs = { class: "text-right text-sm whitespace-nowrap text-gray-500" }, Zs = ["datetime"], Xs = { class: "bg-gray-50 px-4 py-4 sm:px-6 z-10" }, Qs = { class: "text-sm" }, eu = { class: "h-full w-full flex items-center justify-center flex-col mb-5" }, tu = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), lu = { key: 1, class: "bg-white overflow-hidden shadow rounded-lg" }, nu = i("div", { class: "px-4 py-5 sm:px-6 animate-pulse" }, [i("h1", { class: "text-xl font-bold" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4" })])], -1), au = { class: "px-4 py-5 sm:p-6 animate-pulse" }, ou = { class: "flow-root" }, ru = { class: "-mb-8", role: "list" }, iu = { class: "relative pb-8" }, su = { key: 0, class: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200", "aria-hidden": "true" }, uu = z('<div class="relative flex space-x-3"><div><span class="h-8 w-8 rounded-full bg-gray-300 flex items-center justify-center ring-4 ring-white"></span></div><div class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4 items-center"><div><p class="text-sm text-gray-500 flex-1"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full"></div></p></div><div class="text-right text-sm whitespace-nowrap text-gray-500 flex-1"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4"></div></div></div></div>', 1), du = i("div", { class: "bg-gray-50 px-4 py-4 sm:px-6 z-10 animate-pulse" }, [i("div", { class: "text-sm" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4" })])], -1), cu = { name: "uiTimeline" }, pu = Object.assign(cu, { props: { name: { type: String, required: true }, timeline: { type: Object }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false } }, setup: (t2) => (l2, r2) => {
|
|
2391
2351
|
const s2 = $("uiIcon");
|
|
2392
|
-
return t2.loading ? (e(), a("div",
|
|
2393
|
-
} }),
|
|
2352
|
+
return t2.loading ? (e(), a("div", lu, [nu, i("div", au, [i("div", ou, [i("ul", ru, [(e(), a(w, null, j(10, (t3) => i("li", { key: l2.index }, [i("div", iu, [10 !== t3 ? (e(), a("span", su)) : R("", true), uu])])), 64))])])]), du])) : (e(), a("div", Fs, [i("div", Ns, [i("h1", zs, _(t2.name), 1)]), B(i("div", $s, [i("div", Hs, [i("ul", Vs, [(e(true), a(w, null, j(t2.timeline.items, (r3, u2) => (e(), a("li", { key: u2 }, [i("div", Ys, [u2 !== t2.timeline.items.length - 1 ? (e(), a("span", Us)) : R("", true), i("div", qs, [i("div", null, [i("span", { class: n([r3.iconBackground, "h-8 w-8 rounded-full flex items-center justify-center ring-4 ring-white"]) }, [o(s2, { loading: t2.loading, icon: r3.icon, "aria-hidden": "true", class: "h-5 w-5 text-white", color: "white" }, null, 8, ["loading", "icon"])], 2)]), i("div", Ws, [i("div", null, [i("p", Ks, [i("a", { onClick: (e2) => l2.$emit("timelineEventClicked", r3.linkId), class: "font-medium text-indigo-600 hover:text-indigo-800 cursor-pointer" }, _(r3.target), 9, Js), I(" " + _(r3.content), 1)])]), i("div", Gs, [i("time", { datetime: r3.datetime }, _(r3.date), 9, Zs)])])])])]))), 128))])])], 512), [[L, !t2.empty]]), B(i("div", Xs, [i("div", Qs, [i("a", { class: "cursor-pointer font-medium text-indigo-600 hover:text-indigo-500", onClick: r2[0] || (r2[0] = (e2) => l2.$emit("timelineFooterClicked", t2.timeline.id)) }, _(t2.timeline.footerText), 1)])], 512), [[L, !t2.empty]]), B(i("div", eu, [o(K, { icon: d(un), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), tu], 512), [[L, t2.empty]])]));
|
|
2353
|
+
} }), gu = { name: "uiTopbar", props: ["navigation", "logo", "profileMenu", "brand", "accountLogo", "alerted"], components: { Disclosure: hl, DisclosureButton: yl, DisclosurePanel: bl, Menu: Tl, MenuButton: Dl, MenuItem: Il, MenuItems: El, Bars3Icon: function(t2, l2) {
|
|
2394
2354
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" })]);
|
|
2395
|
-
}, XMarkIcon:
|
|
2396
|
-
const
|
|
2397
|
-
const p2 = $("Bars3Icon"), g2 = $("XMarkIcon"),
|
|
2398
|
-
return e(), t(
|
|
2399
|
-
}]]),
|
|
2355
|
+
}, XMarkIcon: vn } }, mu = { class: "mx-auto px-6 lg:px-8" }, fu = { class: "flex justify-between h-20" }, vu = { class: "flex" }, hu = { class: "-ml-2 mr-2 flex items-center lg:hidden" }, yu = i("span", { class: "sr-only" }, "Open main menu", -1), bu = ["src"], xu = { class: "flex items-center" }, wu = { class: "lg:ml-4 lg:flex-shrink-0 lg:flex lg:items-center hidden" }, ku = { class: "redCircle flex items-center justify-center h-4 w-4 bg-red-500 rounded-full absolute -top-0 -left-1" }, Su = [i("span", { class: "animate-ping absolute inline-flex h-4 w-4 bg-red-500 rounded-full opacity-75" }, null, -1)], Cu = ["src"], Ou = ["onClick"], Mu = { class: "pt-2 pb-3 space-y-1" }, Tu = ["onClick"], Du = { class: "pt-4 pb-3 border-t border-gray-200" }, Eu = { class: "flex items-center px-4 sm:px-6" }, Iu = { class: "flex-shrink-0" }, _u = ["src"], Pu = { key: 0, class: "ml-3" }, ju = { class: "text-base font-medium text-gray-800" }, Ru = { class: "text-sm font-medium text-gray-500" }, Bu = { class: "mt-3 space-y-1" }, Au = ["onClick"];
|
|
2356
|
+
const Lu = Ro(gu, [["render", function(l2, r2, s2, u2, d2, c2) {
|
|
2357
|
+
const p2 = $("Bars3Icon"), g2 = $("XMarkIcon"), m2 = $("DisclosureButton"), f2 = $("MenuButton"), v2 = $("MenuItem"), h2 = $("MenuItems"), y2 = $("Menu"), b2 = $("DisclosurePanel"), x2 = $("Disclosure");
|
|
2358
|
+
return e(), t(x2, { as: "nav", class: "bg-white shadow z-10" }, { default: E(({ open: u3 }) => [i("div", mu, [i("div", fu, [i("div", vu, [i("div", hu, [o(m2, { class: "inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500" }, { default: E(() => [yu, u3 ? (e(), t(g2, { key: 1, class: "block h-6 w-6", "aria-hidden": "true" })) : (e(), t(p2, { key: 0, class: "block h-6 w-6", "aria-hidden": "true" }))]), _: 2 }, 1024)]), i("div", { class: "flex-shrink-0 flex items-center cursor-pointer", onClick: r2[0] || (r2[0] = (e2) => l2.$emit("topBarClick", "logo")) }, [i("img", { class: "h-10", src: s2.logo, alt: "Hotelinking suite product logo" }, null, 8, bu)])]), i("div", xu, [i("div", wu, [o(y2, { as: "div", class: "ml-3 relative" }, { default: E(() => [i("div", null, [B(o(f2, { class: "bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 relative" }, { default: E(() => [B(i("div", ku, Su, 512), [[L, s2.alerted]]), i("img", { class: "h-10 w-10 rounded-full", src: s2.accountLogo }, null, 8, Cu)]), _: 1 }, 512), [[L, s2.accountLogo]])]), o(P, { "enter-active-class": "transition ease-out duration-200", "enter-from-class": "transform opacity-0 scale-95", "enter-to-class": "transform opacity-100 scale-100", "leave-active-class": "transition ease-in duration-75", "leave-from-class": "transform opacity-100 scale-100", "leave-to-class": "transform opacity-0 scale-95" }, { default: E(() => [o(h2, { class: "origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, { default: E(() => [(e(true), a(w, null, j(s2.profileMenu, (a2) => (e(), t(v2, { key: a2.name }, { default: E(({ active: e2 }) => [i("p", { onClick: (e3) => l2.$emit("topBarClick", a2.id), class: n(["cursor-pointer", [e2 ? "bg-gray-100" : "", "block px-4 py-2 text-sm text-gray-700"]]) }, _(a2.name), 11, Ou)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 })]), _: 1 })])])])]), o(b2, { class: "lg:hidden" }, { default: E(() => [i("div", Mu, [(e(true), a(w, null, j(s2.navigation, (a2) => (e(), t(m2, { as: "template", key: a2.name, class: n(["block pl-3 pr-4 py-2 border-l-4 text-base font-medium sm:pl-5 sm:pr-6", { "bg-indigo-50 border-indigo-500 text-indigo-700": a2.current && true === a2.current, "border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700": !a2.current }]) }, { default: E(() => [i("p", { onClick: (e2) => l2.$emit("topBarClick", a2.id) }, _(a2.name), 9, Tu)]), _: 2 }, 1032, ["class"]))), 128))]), i("div", Du, [i("div", Eu, [i("div", Iu, [i("img", { class: "h-10 w-10 rounded-full", src: s2.accountLogo }, null, 8, _u)]), s2.brand ? (e(), a("div", Pu, [i("div", ju, _(s2.brand.title), 1), i("div", Ru, _(s2.brand.subtitle), 1)])) : R("", true)]), i("div", Bu, [(e(true), a(w, null, j(s2.profileMenu, (n2) => (e(), t(m2, { as: "template", key: n2.name, class: "block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100 sm:px-6" }, { default: E(() => [i("p", { onClick: (e2) => l2.$emit("topBarClick", n2.id) }, _(n2.name), 9, Au)]), _: 2 }, 1024))), 128))])])]), _: 1 })]), _: 1 });
|
|
2359
|
+
}]]), Fu = { chart: { type: "bar", toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff"], dataLabels: { enabled: true, formatter: function(e2, t2) {
|
|
2400
2360
|
return t2.w.globals.labels[t2.dataPointIndex] + ": " + e2;
|
|
2401
|
-
} }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: { bar: { borderRadius: 0, horizontal: true, barHeight: "80%", isFunnel: true } } },
|
|
2402
|
-
const r2 = l2, s2 = t2, c2 = u(() => ({ ...s2.options, ...
|
|
2361
|
+
} }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: { bar: { borderRadius: 0, horizontal: true, barHeight: "80%", isFunnel: true } } }, Nu = { class: "chart-header flex flex-row justify-between" }, zu = { class: "text-sm font-medium text-gray-500 truncate" }, $u = { class: "chart-content" }, Hu = { class: "h-full w-full flex items-center justify-center flex-col" }, Vu = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Yu = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, Uu = [i("div", { role: "status", class: "w-full animate-pulse h-full flex flex-col" }, [i("div", { class: "h-2.5 w-36 bg-gray-200 rounded-full mb-2.5" }), i("div", { class: "w-48 h-2 mb-6 bg-gray-200 rounded-full" }), i("div", { class: "flex flex-row justify-between items-baseline grow gap-x-1" }, [i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" })])], -1)], qu = { name: "uiChart" }, Wu = Object.assign(qu, { props: { title: String, id: { type: String, default: "noChartId" }, series: { type: Object, required: true }, options: { type: Object, required: true }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false }, range: { type: String, default: "24h" }, height: { type: Number, default: 320 } }, emits: ["selectedRange", "chartUpdated", "dataPointSelection"], setup(t2, { emit: l2 }) {
|
|
2362
|
+
const r2 = l2, s2 = t2, c2 = u(() => ({ ...s2.options, ...Fu })), p2 = u(() => s2.series), g2 = () => r2("chartUpdated"), m2 = (e2, t3, l3) => {
|
|
2403
2363
|
r2("dataPointSelection", { id: s2.id, chartContext: t3, config: l3, event: e2 });
|
|
2404
2364
|
};
|
|
2405
|
-
return (l3, r3) => (e(), a(
|
|
2406
|
-
} }),
|
|
2365
|
+
return (l3, r3) => (e(), a(w, null, [B(i("div", { class: n(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div", Nu, [i("div", zu, _(t2.title), 1), o(Lr, { range: t2.range, onRangeSelected: r3[0] || (r3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), B(i("div", $u, [o(d(U), { type: l3.bar, series: p2.value, width: "100%", height: t2.height, options: c2.value, onUpdated: g2, onMounted: g2, onDataPointSelection: m2 }, null, 8, ["type", "series", "height", "options"])], 512), [[L, !t2.empty]]), B(i("div", Hu, [o(K, { icon: d(un), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Vu], 512), [[L, t2.empty]])], 2), [[L, !t2.loading]]), B(i("div", Yu, Uu, 512), [[L, t2.loading]])], 64));
|
|
2366
|
+
} }), Ku = { class: "w-full flex flex-col items-center justify-center p-10 grow" }, Ju = { class: "text-2xl mt-4 font-bold" }, Gu = { class: "buttons flex flex-row items-center justify-center mt-8 gap-x-1" }, Zu = { __name: "uiNoResults", props: { title: { type: String, required: true }, message: { type: String, required: true }, actions: { type: Array } }, emits: ["action"], setup: (l2, { emit: n2 }) => (n3, r2) => (e(), a("div", Ku, [o(K, { loading: false, icon: d(un), size: "massive", color: "gray" }, null, 8, ["icon"]), i("h2", Ju, _(l2.title), 1), i("p", null, _(l2.message), 1), i("div", Gu, [(e(true), a(w, null, j(l2.actions, (l3, a2) => (e(), t(Q, { key: a2, loading: false, onClick: (e2) => n3.$emit("action", l3.action) }, { default: E(() => [I(_(l3.text), 1)]), _: 2 }, 1032, ["onClick"]))), 128))])])) }, Xu = i("div", { class: "fixed inset-0" }, null, -1), Qu = { class: "fixed inset-0 overflow-hidden" }, ed = { class: "absolute inset-0 overflow-hidden" }, td = { class: "pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10" }, ld = { class: "flex h-full flex-col overflow-y-scroll bg-white shadow-xl" }, nd = { class: "bg-indigo-700 px-4 py-6 sm:px-6" }, ad = { class: "flex items-center justify-between" }, od = { class: "ml-3 flex h-7 items-center" }, rd = i("span", { class: "absolute -inset-2.5" }, null, -1), id = i("span", { class: "sr-only" }, "Close panel", -1), sd = { class: "mt-1" }, ud = { class: "text-sm text-indigo-300" }, dd = { class: "relative flex-1 px-4 py-6 sm:px-6" }, cd = { name: "uiRightSidebar" }, pd = Object.assign(cd, { props: { title: { type: String, required: true }, description: { type: String }, open: { type: Boolean, default: false } }, emits: ["closeRightBar"], setup(l2, { emit: n2 }) {
|
|
2407
2367
|
const a2 = n2;
|
|
2408
|
-
return (n3, s2) => (e(), t(d(
|
|
2409
|
-
} }),
|
|
2368
|
+
return (n3, s2) => (e(), t(d(Zl), { as: "template", show: l2.open }, { default: E(() => [o(d(dl), { as: "div", class: "relative z-10", onClose: s2[1] || (s2[1] = (e2) => a2("closeRightBar")) }, { default: E(() => [Xu, i("div", Qu, [i("div", ed, [i("div", td, [o(d(Jl), { as: "template", enter: "transform transition ease-in-out duration-500 sm:duration-700", "enter-from": "translate-x-full", "enter-to": "translate-x-0", leave: "transform transition ease-in-out duration-500 sm:duration-700", "leave-from": "translate-x-0", "leave-to": "translate-x-full" }, { default: E(() => [o(d(cl), { class: "pointer-events-auto w-screen max-w-md" }, { default: E(() => [i("div", ld, [i("div", nd, [i("div", ad, [o(d(pl), { class: "text-base font-semibold leading-6 text-white" }, { default: E(() => [I(_(l2.title), 1)]), _: 1 }), i("div", od, [i("button", { type: "button", class: "relative rounded-md bg-indigo-700 text-indigo-200 hover:text-white outline-none", onClick: s2[0] || (s2[0] = (e2) => a2("closeRightBar")) }, [rd, id, o(d(vn), { class: "h-6 w-6 ring-0", "aria-hidden": "true" })])])]), i("div", sd, [i("p", ud, _(l2.description), 1)])]), i("div", dd, [r(n3.$slots, "default")])])]), _: 3 })]), _: 3 })])])])]), _: 3 })]), _: 3 }, 8, ["show"]));
|
|
2369
|
+
} }), gd = { class: "uiGallery" }, md = { key: 1, role: "list", class: "grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 sm:gap-x-4 lg:grid-cols-6" }, fd = { class: "group aspect-h-7 aspect-w-10 block w-full overflow-hidden rounded-lg bg-gray-100 focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 focus-within:ring-offset-gray-100" }, vd = ["src"], hd = ["onClick"], yd = { class: "pointer-events-none mt-2 block truncate text-sm font-medium text-gray-900" }, bd = { class: "flex items-center justify-between" }, xd = { class: "pointer-events-none block text-sm font-medium text-gray-500" }, wd = { key: 2, role: "list", class: "grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 sm:gap-x-4 lg:grid-cols-6" }, kd = [i("div", { class: "group aspect-h-7 aspect-w-10 block w-full overflow-hidden rounded-lg bg-gray-200 animate-pulse dark:bg-gray-200 focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 focus-within:ring-offset-gray-100" }, null, -1), i("p", { class: "animate-pulse h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28 mt-4" }, null, -1), i("p", { class: "animate-pulse h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-14 mt-2" }, null, -1)], Sd = { name: "uiGallery" }, Cd = Object.assign(Sd, { props: { galleryId: String, gallery: Array, loading: Boolean, literals: Object }, setup(l2, { emit: n2 }) {
|
|
2410
2370
|
const r2 = n2, u2 = s(false);
|
|
2411
|
-
return (n3, s2) => (e(), a("div",
|
|
2371
|
+
return (n3, s2) => (e(), a("div", gd, [l2.loading ? R("", true) : (e(), t(ro, { key: 0, open: u2.value, modalName: "deleteAllImagesModal", title: l2.literals.modalTitle, type: "warning", actions: [{ value: "close", name: l2.literals.closeAction }, { value: `deleteGallery_${l2.galleryId}`, name: l2.literals.deleteAction }], onModalAction: s2[0] || (s2[0] = (e2) => {
|
|
2412
2372
|
var t2;
|
|
2413
2373
|
"close" !== (t2 = e2).action ? r2("modalAction", t2) : u2.value = false;
|
|
2414
|
-
}) }, { default: E(() => [i("p", null, _(l2.literals.modalText), 1)]), _: 1 }, 8, ["open", "title", "actions"])), l2.loading ? (e(), a("ul",
|
|
2415
|
-
} }),
|
|
2374
|
+
}) }, { default: E(() => [i("p", null, _(l2.literals.modalText), 1)]), _: 1 }, 8, ["open", "title", "actions"])), l2.loading ? (e(), a("ul", wd, [(e(), a(w, null, j(4, (e2) => i("li", null, kd)), 64))])) : (e(), a("ul", md, [(e(true), a(w, null, j(l2.gallery, (t2) => (e(), a("li", { key: t2.source, class: "relative" }, [i("div", fd, [i("img", { src: t2.source, alt: "", class: "pointer-events-none object-cover group-hover:opacity-75" }, null, 8, vd), i("button", { type: "button", class: "absolute inset-0 focus:outline-none", onClick: (e2) => n3.$emit("imgClicked", t2) }, null, 8, hd)]), i("p", yd, _(t2.title), 1), i("div", bd, [i("p", xd, _(t2.size), 1), o(K, { class: "cursor-pointer", icon: d(mn), color: "red", loading: false, onClick: (e2) => r2("deleteImage", t2) }, null, 8, ["icon", "onClick"])])]))), 128))])), l2.gallery.length > 0 && !l2.loading ? (e(), t(Q, { key: 3, onClick: s2[1] || (s2[1] = (e2) => u2.value = true), class: "mt-8", loading: false, color: "red", size: "small" }, { default: E(() => [I(_(l2.literals.deleteAllImages), 1)]), _: 1 })) : R("", true)]));
|
|
2375
|
+
} }), Od = { class: "cursor-move mb-1 relative flex items-center space-x-3 rounded-lg border border-gray-300 bg-white p-4 shadow-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 hover:border-gray-400" }, Md = { class: "flex flex-row items-center w-full" }, Td = { class: "content text-sm grow" }, Dd = { class: "font-bold" }, Ed = { key: 0 }, Id = { class: "font-bold text-gray-400" }, _d = { key: 1, class: "animate-pulse" }, Pd = [z('<div class="h-16 mb-1 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div><div class="h-16 mb-1 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div><div class="h-16 mb-1 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div><div class="h-16 mb-1 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div><div class="h-16 relative flex items-center space-x-3 rounded-lg bg-gray-200 dark:bg-gray-300 p-4 shadow-sm"></div>', 5)], jd = { name: "uiDragAndDrop" }, Rd = { uiButton: Q, uiIcon: K, uiCheckbox: se, uiDropdown: kn, uiInput: jn, uiInputFile: Kn, uiSelect: Qn, uiTag: na, uiTextArea: da, uiToggle: va, uiAlert: Ta, uiBreadcrumbs: La, uiCard: qa, uiFilter: Ka, uiModal: ro, uiNotification: bo, uiTaskList: Po, uiPriceCalendar: Rr, uiChart: qr, uiFooter: Gr, uiLoadingScreen: Qr, uiPagination: fi, uiSidebar: Ii, uiStats: Vi, uiStripedCard: os, uiTable: Es, uiTabs: Ls, uiTimeline: pu, uiTopbar: Lu, uiFunnelChartV2: Wu, uiNoResults: Zu, uiRightSidebar: pd, uiGallery: Cd, uiDragAndDrop: Object.assign(jd, { props: { elements: { type: Array, required: true }, loading: true }, setup(l2) {
|
|
2416
2376
|
const n2 = l2;
|
|
2417
2377
|
let r2 = s(n2.elements);
|
|
2418
2378
|
return p(() => n2.elements, (e2) => {
|
|
2419
2379
|
r2.value = e2;
|
|
2420
|
-
}), (n3, s2) => l2.loading ? (e(), a("div",
|
|
2421
|
-
} }) },
|
|
2422
|
-
Object.keys(
|
|
2423
|
-
e2.component(t2,
|
|
2380
|
+
}), (n3, s2) => l2.loading ? (e(), a("div", _d, Pd)) : (e(), t(d(q), { key: 0, modelValue: d(r2), "onUpdate:modelValue": s2[0] || (s2[0] = (e2) => V(r2) ? r2.value = e2 : r2 = e2) }, { item: E(({ item: t2 }) => [i("div", Od, [i("div", Md, [o(K, { icon: d(en), loading: false, color: "gray", class: "mr-4", size: "big" }, null, 8, ["icon"]), i("div", Td, [i("p", Dd, _(t2.name), 1), t2.description ? (e(), a("p", Ed, _(t2.description), 1)) : R("", true)]), i("div", Id, _(d(r2).indexOf(t2) + 1), 1)])])]), _: 1 }, 8, ["modelValue"]));
|
|
2381
|
+
} }) }, Bd = { install(e2) {
|
|
2382
|
+
Object.keys(Rd).forEach((t2) => {
|
|
2383
|
+
e2.component(t2, Rd[t2]);
|
|
2424
2384
|
});
|
|
2425
2385
|
} };
|
|
2426
2386
|
export {
|
|
2427
|
-
|
|
2387
|
+
Bd as default
|
|
2428
2388
|
};
|