@roku-ui/vue 0.1.0 → 0.1.2
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/components/Avatar.vue.d.ts +5 -4
- package/dist/components/Btn.vue.d.ts +5 -7
- package/dist/components/Chip.vue.d.ts +48 -47
- package/dist/components/Indicator.vue.d.ts +1 -1
- package/dist/components/Modal.vue.d.ts +19 -37
- package/dist/components/Notification.vue.d.ts +1 -1
- package/dist/components/NotificationSystem.vue.d.ts +1 -1
- package/dist/components/Paper.vue.d.ts +51 -0
- package/dist/components/PinInput.vue.d.ts +1 -1
- package/dist/components/Progress.vue.d.ts +3 -3
- package/dist/components/RokuProvider.vue.d.ts +4 -4
- package/dist/components/Select.vue.d.ts +39 -42
- package/dist/components/Slider.vue.d.ts +77 -42
- package/dist/components/Switch.vue.d.ts +73 -52
- package/dist/components/TextField.vue.d.ts +7 -2
- package/dist/components/ThemeProvider.vue.d.ts +23 -0
- package/dist/components/ThemeSwitch.vue.d.ts +2 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/composables/index.d.ts +61 -2
- package/dist/index.js +1178 -887
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/test.d.ts +1 -0
- package/dist/utils/index.d.ts +20 -0
- package/dist/utils/theme.d.ts +3 -1
- package/package.json +23 -17
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as $, computed as m, useAttrs as ht, openBlock as g, createBlock as D, resolveDynamicComponent as _e, mergeProps as Pe, unref as l, withCtx as J, renderSlot as H, createCommentVNode as z, getCurrentScope as pt, onScopeDispose as mt, onMounted as se, nextTick as gt, getCurrentInstance as Qe, watch as ie, ref as v, mergeModels as ee, useModel as me, watchEffect as X, createElementBlock as y, createElementVNode as M, normalizeClass as w, withModifiers as Ze, normalizeStyle as T, Fragment as te, renderList as fe, toDisplayString as re, withDirectives as Je, vModelCheckbox as bt, reactive as vt, inject as et, provide as Fe, createTextVNode as yt, Teleport as wt, createVNode as We, Transition as _t, withKeys as xt, useSlots as kt, isRef as Mt } from "vue";
|
|
2
|
+
const St = /* @__PURE__ */ $({
|
|
3
3
|
__name: "Btn",
|
|
4
4
|
props: {
|
|
5
5
|
type: { default: "button" },
|
|
@@ -9,7 +9,6 @@ const ct = /* @__PURE__ */ R({
|
|
|
9
9
|
pressEffect: { default: "translate" },
|
|
10
10
|
variant: {},
|
|
11
11
|
color: {},
|
|
12
|
-
disabled: { type: Boolean },
|
|
13
12
|
animate: { type: Boolean },
|
|
14
13
|
rounded: { default: "md" }
|
|
15
14
|
},
|
|
@@ -45,7 +44,7 @@ const ct = /* @__PURE__ */ R({
|
|
|
45
44
|
iconContent: "h-10 w-10 p-3"
|
|
46
45
|
};
|
|
47
46
|
}
|
|
48
|
-
}),
|
|
47
|
+
}), o = m(() => {
|
|
49
48
|
switch (t.variant) {
|
|
50
49
|
case "filled":
|
|
51
50
|
switch (t.color) {
|
|
@@ -117,213 +116,286 @@ const ct = /* @__PURE__ */ R({
|
|
|
117
116
|
default:
|
|
118
117
|
return "btn-default";
|
|
119
118
|
}
|
|
120
|
-
});
|
|
121
|
-
return (
|
|
122
|
-
"data-size":
|
|
123
|
-
type:
|
|
124
|
-
class:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
}), a = ht();
|
|
120
|
+
return (s, i) => (g(), D(_e(s.is), Pe({
|
|
121
|
+
"data-size": s.size,
|
|
122
|
+
type: s.type,
|
|
123
|
+
class: ["flex items-center justify-center gap-1 decoration-none", [
|
|
124
|
+
l(o),
|
|
125
|
+
l(r),
|
|
126
|
+
s.icon ? l(n).iconContent : l(n).normalContent,
|
|
128
127
|
{
|
|
129
|
-
"filter-grayscale": a.disabled,
|
|
130
|
-
"active:translate-y-0.25": !a.disabled &&
|
|
131
|
-
"active:scale-98": !a.disabled &&
|
|
132
|
-
"transition-all":
|
|
128
|
+
"filter-grayscale": l(a).disabled,
|
|
129
|
+
"active:translate-y-0.25": !l(a).disabled && s.pressEffect === "translate",
|
|
130
|
+
"active:scale-98": !l(a).disabled && s.pressEffect === "scale",
|
|
131
|
+
"transition-all": s.animate
|
|
133
132
|
}
|
|
134
|
-
]]
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
a.$slots.rightSection ? P(a.$slots, "rightSection", { key: 1 }) : $("", !0)
|
|
133
|
+
]]
|
|
134
|
+
}, s.$attrs), {
|
|
135
|
+
default: J(() => [
|
|
136
|
+
s.$slots.leftSection ? H(s.$slots, "leftSection", { key: 0 }) : z("", !0),
|
|
137
|
+
H(s.$slots, "default"),
|
|
138
|
+
s.$slots.rightSection ? H(s.$slots, "rightSection", { key: 1 }) : z("", !0)
|
|
141
139
|
]),
|
|
142
140
|
_: 3
|
|
143
|
-
},
|
|
141
|
+
}, 16, ["data-size", "type", "class"]));
|
|
144
142
|
}
|
|
145
143
|
});
|
|
146
|
-
function
|
|
147
|
-
return
|
|
144
|
+
function Ne(e) {
|
|
145
|
+
return pt() ? (mt(e), !0) : !1;
|
|
148
146
|
}
|
|
149
|
-
function
|
|
150
|
-
return typeof e == "function" ? e() :
|
|
147
|
+
function He(e) {
|
|
148
|
+
return typeof e == "function" ? e() : l(e);
|
|
151
149
|
}
|
|
152
|
-
const
|
|
150
|
+
const be = typeof window < "u" && typeof document < "u";
|
|
153
151
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
154
|
-
const
|
|
152
|
+
const At = Object.prototype.toString, Ct = (e) => At.call(e) === "[object Object]", $t = () => {
|
|
155
153
|
};
|
|
156
|
-
function
|
|
157
|
-
return e ||
|
|
154
|
+
function Tt(e) {
|
|
155
|
+
return e || Qe();
|
|
158
156
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
n ? de(e, n) : t ? e() : Ze(e);
|
|
157
|
+
function zt(e, t = !0, r) {
|
|
158
|
+
Tt() ? se(e, r) : t ? e() : gt(e);
|
|
162
159
|
}
|
|
163
|
-
function
|
|
160
|
+
function q(e) {
|
|
164
161
|
var t;
|
|
165
|
-
const r =
|
|
162
|
+
const r = He(e);
|
|
166
163
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
167
164
|
}
|
|
168
|
-
const
|
|
169
|
-
function
|
|
170
|
-
let t, r, n,
|
|
171
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n,
|
|
172
|
-
return
|
|
165
|
+
const xe = be ? window : void 0;
|
|
166
|
+
function Y(...e) {
|
|
167
|
+
let t, r, n, o;
|
|
168
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, o] = e, t = xe) : [t, r, n, o] = e, !t)
|
|
169
|
+
return $t;
|
|
173
170
|
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
174
|
-
const a = [],
|
|
175
|
-
a.forEach((
|
|
176
|
-
}, i = (
|
|
177
|
-
() => [
|
|
178
|
-
([
|
|
179
|
-
if (
|
|
171
|
+
const a = [], s = () => {
|
|
172
|
+
a.forEach((f) => f()), a.length = 0;
|
|
173
|
+
}, i = (f, u, p, b) => (f.addEventListener(u, p, b), () => f.removeEventListener(u, p, b)), c = ie(
|
|
174
|
+
() => [q(t), He(o)],
|
|
175
|
+
([f, u]) => {
|
|
176
|
+
if (s(), !f)
|
|
180
177
|
return;
|
|
181
|
-
const p =
|
|
178
|
+
const p = Ct(u) ? { ...u } : u;
|
|
182
179
|
a.push(
|
|
183
|
-
...r.flatMap((
|
|
180
|
+
...r.flatMap((b) => n.map((k) => i(f, b, k, p)))
|
|
184
181
|
);
|
|
185
182
|
},
|
|
186
183
|
{ immediate: !0, flush: "post" }
|
|
187
184
|
), d = () => {
|
|
188
|
-
|
|
185
|
+
c(), s();
|
|
189
186
|
};
|
|
190
|
-
return
|
|
187
|
+
return Ne(d), d;
|
|
191
188
|
}
|
|
192
|
-
function
|
|
189
|
+
function Rt(e) {
|
|
193
190
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
194
191
|
}
|
|
195
|
-
function
|
|
192
|
+
function Ae(...e) {
|
|
196
193
|
let t, r, n = {};
|
|
197
194
|
e.length === 3 ? (t = e[0], r = e[1], n = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, r = e[0], n = e[1]) : (t = e[0], r = e[1]) : (t = !0, r = e[0]);
|
|
198
195
|
const {
|
|
199
|
-
target:
|
|
196
|
+
target: o = xe,
|
|
200
197
|
eventName: a = "keydown",
|
|
201
|
-
passive:
|
|
198
|
+
passive: s = !1,
|
|
202
199
|
dedupe: i = !1
|
|
203
|
-
} = n,
|
|
204
|
-
return
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
}
|
|
208
|
-
function
|
|
209
|
-
const e =
|
|
210
|
-
return
|
|
200
|
+
} = n, c = Rt(t);
|
|
201
|
+
return Y(o, a, (f) => {
|
|
202
|
+
f.repeat && He(i) || c(f) && r(f);
|
|
203
|
+
}, s);
|
|
204
|
+
}
|
|
205
|
+
function Et() {
|
|
206
|
+
const e = v(!1);
|
|
207
|
+
return Qe() && se(() => {
|
|
211
208
|
e.value = !0;
|
|
212
209
|
}), e;
|
|
213
210
|
}
|
|
214
|
-
function
|
|
215
|
-
const t =
|
|
211
|
+
function tt(e) {
|
|
212
|
+
const t = Et();
|
|
216
213
|
return m(() => (t.value, !!e()));
|
|
217
214
|
}
|
|
218
|
-
function
|
|
219
|
-
const { window: n =
|
|
215
|
+
function Pt(e, t, r = {}) {
|
|
216
|
+
const { window: n = xe, ...o } = r;
|
|
217
|
+
let a;
|
|
218
|
+
const s = tt(() => n && "MutationObserver" in n), i = () => {
|
|
219
|
+
a && (a.disconnect(), a = void 0);
|
|
220
|
+
}, c = ie(
|
|
221
|
+
() => q(e),
|
|
222
|
+
(u) => {
|
|
223
|
+
i(), s.value && n && u && (a = new MutationObserver(t), a.observe(u, o));
|
|
224
|
+
},
|
|
225
|
+
{ immediate: !0 }
|
|
226
|
+
), d = () => a == null ? void 0 : a.takeRecords(), f = () => {
|
|
227
|
+
i(), c();
|
|
228
|
+
};
|
|
229
|
+
return Ne(f), {
|
|
230
|
+
isSupported: s,
|
|
231
|
+
stop: f,
|
|
232
|
+
takeRecords: d
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function Nt(e, t, r = {}) {
|
|
236
|
+
const { window: n = xe, ...o } = r;
|
|
220
237
|
let a;
|
|
221
|
-
const
|
|
238
|
+
const s = tt(() => n && "ResizeObserver" in n), i = () => {
|
|
222
239
|
a && (a.disconnect(), a = void 0);
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
(
|
|
226
|
-
if (i(),
|
|
240
|
+
}, c = m(() => Array.isArray(e) ? e.map((u) => q(u)) : [q(e)]), d = ie(
|
|
241
|
+
c,
|
|
242
|
+
(u) => {
|
|
243
|
+
if (i(), s.value && n) {
|
|
227
244
|
a = new ResizeObserver(t);
|
|
228
|
-
for (const p of
|
|
229
|
-
p && a.observe(p,
|
|
245
|
+
for (const p of u)
|
|
246
|
+
p && a.observe(p, o);
|
|
230
247
|
}
|
|
231
248
|
},
|
|
232
249
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
233
|
-
),
|
|
250
|
+
), f = () => {
|
|
234
251
|
i(), d();
|
|
235
252
|
};
|
|
236
|
-
return
|
|
237
|
-
isSupported:
|
|
238
|
-
stop:
|
|
253
|
+
return Ne(f), {
|
|
254
|
+
isSupported: s,
|
|
255
|
+
stop: f
|
|
239
256
|
};
|
|
240
257
|
}
|
|
241
|
-
function
|
|
258
|
+
function Ht(e, t = {}) {
|
|
242
259
|
const {
|
|
243
260
|
reset: r = !0,
|
|
244
261
|
windowResize: n = !0,
|
|
245
|
-
windowScroll:
|
|
262
|
+
windowScroll: o = !0,
|
|
246
263
|
immediate: a = !0
|
|
247
|
-
} = t,
|
|
248
|
-
function
|
|
249
|
-
const
|
|
250
|
-
if (!
|
|
251
|
-
r && (
|
|
264
|
+
} = t, s = v(0), i = v(0), c = v(0), d = v(0), f = v(0), u = v(0), p = v(0), b = v(0);
|
|
265
|
+
function k() {
|
|
266
|
+
const S = q(e);
|
|
267
|
+
if (!S) {
|
|
268
|
+
r && (s.value = 0, i.value = 0, c.value = 0, d.value = 0, f.value = 0, u.value = 0, p.value = 0, b.value = 0);
|
|
252
269
|
return;
|
|
253
270
|
}
|
|
254
|
-
const
|
|
255
|
-
|
|
271
|
+
const C = S.getBoundingClientRect();
|
|
272
|
+
s.value = C.height, i.value = C.bottom, c.value = C.left, d.value = C.right, f.value = C.top, u.value = C.width, p.value = C.x, b.value = C.y;
|
|
256
273
|
}
|
|
257
|
-
return
|
|
258
|
-
|
|
274
|
+
return Nt(e, k), ie(() => q(e), (S) => !S && k()), Pt(e, k, {
|
|
275
|
+
attributeFilter: ["style", "class"]
|
|
276
|
+
}), o && Y("scroll", k, { capture: !0, passive: !0 }), n && Y("resize", k, { passive: !0 }), zt(() => {
|
|
277
|
+
a && k();
|
|
259
278
|
}), {
|
|
260
|
-
height:
|
|
279
|
+
height: s,
|
|
261
280
|
bottom: i,
|
|
262
|
-
left:
|
|
281
|
+
left: c,
|
|
263
282
|
right: d,
|
|
264
|
-
top:
|
|
265
|
-
width:
|
|
283
|
+
top: f,
|
|
284
|
+
width: u,
|
|
266
285
|
x: p,
|
|
267
|
-
y:
|
|
268
|
-
update:
|
|
286
|
+
y: b,
|
|
287
|
+
update: k
|
|
269
288
|
};
|
|
270
289
|
}
|
|
271
|
-
function
|
|
272
|
-
const { initialValue: r = !1, focusVisible: n = !1 } = t,
|
|
273
|
-
|
|
274
|
-
var
|
|
275
|
-
(!n || (d = (
|
|
276
|
-
}),
|
|
277
|
-
const
|
|
278
|
-
get: () =>
|
|
290
|
+
function It(e, t = {}) {
|
|
291
|
+
const { initialValue: r = !1, focusVisible: n = !1 } = t, o = v(!1), a = m(() => q(e));
|
|
292
|
+
Y(a, "focus", (i) => {
|
|
293
|
+
var c, d;
|
|
294
|
+
(!n || (d = (c = i.target).matches) != null && d.call(c, ":focus-visible")) && (o.value = !0);
|
|
295
|
+
}), Y(a, "blur", () => o.value = !1);
|
|
296
|
+
const s = m({
|
|
297
|
+
get: () => o.value,
|
|
279
298
|
set(i) {
|
|
280
|
-
var
|
|
281
|
-
!i &&
|
|
299
|
+
var c, d;
|
|
300
|
+
!i && o.value ? (c = a.value) == null || c.blur() : i && !o.value && ((d = a.value) == null || d.focus());
|
|
282
301
|
}
|
|
283
302
|
});
|
|
284
|
-
return
|
|
303
|
+
return ie(
|
|
285
304
|
a,
|
|
286
305
|
() => {
|
|
287
|
-
|
|
306
|
+
s.value = r;
|
|
288
307
|
},
|
|
289
308
|
{ immediate: !0, flush: "post" }
|
|
290
|
-
), { focused:
|
|
309
|
+
), { focused: s };
|
|
291
310
|
}
|
|
292
|
-
const
|
|
311
|
+
const Ot = { class: "relative inline-block" }, rn = /* @__PURE__ */ $({
|
|
293
312
|
__name: "Slider",
|
|
294
|
-
props: {
|
|
295
|
-
modelValue: {},
|
|
313
|
+
props: /* @__PURE__ */ ee({
|
|
296
314
|
size: { default: "md" },
|
|
297
|
-
animate: { type: Boolean, default: !
|
|
315
|
+
animate: { type: Boolean, default: !1 },
|
|
316
|
+
width: { default: 12 },
|
|
298
317
|
options: {},
|
|
299
|
-
|
|
300
|
-
|
|
318
|
+
min: { default: 0 },
|
|
319
|
+
max: { default: 100 },
|
|
320
|
+
step: { default: 1 },
|
|
321
|
+
tickNum: {},
|
|
322
|
+
color: { default: "primary" }
|
|
323
|
+
}, {
|
|
324
|
+
modelValue: {
|
|
325
|
+
default: void 0
|
|
326
|
+
},
|
|
327
|
+
modelModifiers: {}
|
|
328
|
+
}),
|
|
301
329
|
emits: ["update:modelValue"],
|
|
302
|
-
setup(e
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
330
|
+
setup(e) {
|
|
331
|
+
const t = e;
|
|
332
|
+
function r(A, R, E) {
|
|
333
|
+
const I = [];
|
|
334
|
+
for (let G = A; G <= R; G += E)
|
|
335
|
+
I.push(G);
|
|
336
|
+
return I[I.length - 1] !== R && I.push(R), I;
|
|
337
|
+
}
|
|
338
|
+
function n(A, R) {
|
|
339
|
+
const E = [];
|
|
340
|
+
E.push(R[0]);
|
|
341
|
+
const I = (R.length - 1) / (A - 1);
|
|
342
|
+
for (let G = 1; G < A - 1; G++)
|
|
343
|
+
E.push(R[Math.round(G * I)]);
|
|
344
|
+
return E.push(R[R.length - 1]), E;
|
|
345
|
+
}
|
|
346
|
+
const o = m(() => t.options ? t.options.length : t.tickNum ?? 0), a = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(o.value, a.value)), i = me(e, "modelValue"), c = m(() => a.value.length ?? 0), d = v(a.value.includes(i.value) ? a.value.indexOf(i.value) : 0);
|
|
347
|
+
function f(A) {
|
|
348
|
+
return a.value.indexOf(A);
|
|
349
|
+
}
|
|
350
|
+
const u = m(() => {
|
|
351
|
+
switch (t.color) {
|
|
352
|
+
case "primary":
|
|
353
|
+
return "bg-primary-container";
|
|
354
|
+
case "secondary":
|
|
355
|
+
return "bg-secondary-container";
|
|
356
|
+
case "tertiary":
|
|
357
|
+
return "bg-tertiary-container";
|
|
358
|
+
case "error":
|
|
359
|
+
return "bg-error-container";
|
|
360
|
+
}
|
|
361
|
+
}), p = m(() => `dark:bg-white bg-${t.color}-container`), b = m(() => {
|
|
362
|
+
switch (t.color) {
|
|
363
|
+
case "primary":
|
|
364
|
+
return "dark:bg-primary-container bg-white";
|
|
365
|
+
case "secondary":
|
|
366
|
+
return "dark:bg-secondary-container bg-white";
|
|
367
|
+
case "tertiary":
|
|
368
|
+
return "dark:bg-tertiary-container bg-white";
|
|
369
|
+
case "error":
|
|
370
|
+
return "dark:bg-error-container bg-white";
|
|
371
|
+
}
|
|
306
372
|
});
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
373
|
+
X(() => {
|
|
374
|
+
i.value = a.value[d.value];
|
|
375
|
+
});
|
|
376
|
+
const k = v(), S = v(), C = Ht(k), le = v(!1);
|
|
377
|
+
function ce(A) {
|
|
378
|
+
if (!le.value)
|
|
310
379
|
return;
|
|
311
|
-
if (!(
|
|
312
|
-
|
|
380
|
+
if (!(A.buttons === 1)) {
|
|
381
|
+
le.value = !1;
|
|
313
382
|
return;
|
|
314
383
|
}
|
|
315
|
-
|
|
316
|
-
const { clientX:
|
|
317
|
-
|
|
384
|
+
A.preventDefault(), A.stopPropagation();
|
|
385
|
+
const { clientX: E } = A, I = C.left.value, ft = C.right.value - I, Se = Math.round((E - I) / ft * (c.value - 1));
|
|
386
|
+
Se < 0 || Se > c.value - 1 || (d.value = Se);
|
|
318
387
|
}
|
|
319
|
-
|
|
320
|
-
|
|
388
|
+
X(() => {
|
|
389
|
+
d.value = f(i.value);
|
|
390
|
+
});
|
|
391
|
+
function _(A) {
|
|
392
|
+
A.preventDefault(), A.stopPropagation(), le.value = !0, ce(A);
|
|
321
393
|
}
|
|
322
|
-
|
|
323
|
-
|
|
394
|
+
Y(k, "pointerdown", _), se(() => {
|
|
395
|
+
Y(document, "pointermove", ce), d.value = Math.max(0, f(i.value));
|
|
324
396
|
});
|
|
325
|
-
const
|
|
326
|
-
switch (
|
|
397
|
+
const O = m(() => {
|
|
398
|
+
switch (t.size) {
|
|
327
399
|
case "sm":
|
|
328
400
|
return {
|
|
329
401
|
wrapper: "h-2",
|
|
@@ -355,82 +427,83 @@ const kt = { class: "relative inline-block" }, Hr = /* @__PURE__ */ R({
|
|
|
355
427
|
progress: "-mx-1.5"
|
|
356
428
|
};
|
|
357
429
|
}
|
|
358
|
-
}),
|
|
430
|
+
}), j = m(() => t.animate ? {
|
|
359
431
|
indicator: "transition-left",
|
|
360
432
|
progress: "transition-width"
|
|
361
433
|
} : {
|
|
362
434
|
indicator: "",
|
|
363
435
|
progress: ""
|
|
364
436
|
});
|
|
365
|
-
return (
|
|
366
|
-
|
|
437
|
+
return (A, R) => (g(), y("div", Ot, [
|
|
438
|
+
M("div", {
|
|
367
439
|
ref_key: "wrapper",
|
|
368
|
-
ref:
|
|
440
|
+
ref: k,
|
|
369
441
|
type: "size",
|
|
370
|
-
class: w(["flex cursor-pointer items-center",
|
|
371
|
-
onTouchmove:
|
|
442
|
+
class: w(["flex cursor-pointer items-center", l(O).wrapper]),
|
|
443
|
+
onTouchmove: R[0] || (R[0] = Ze(() => {
|
|
372
444
|
}, ["prevent"]))
|
|
373
445
|
}, [
|
|
374
|
-
|
|
375
|
-
class: w(["rounded-full bg-
|
|
446
|
+
M("div", {
|
|
447
|
+
class: w(["rounded-full bg-surface-lowest transition-background-color,border-color,color", l(O).innerWrapper])
|
|
376
448
|
}, [
|
|
377
|
-
|
|
378
|
-
class: w(["relative flex",
|
|
379
|
-
style:
|
|
380
|
-
width: `${
|
|
449
|
+
M("div", {
|
|
450
|
+
class: w(["relative flex", l(O).content]),
|
|
451
|
+
style: T({
|
|
452
|
+
width: `${t.width}rem`
|
|
381
453
|
})
|
|
382
454
|
}, [
|
|
383
|
-
(g(!0), y(
|
|
384
|
-
key:
|
|
385
|
-
style:
|
|
386
|
-
left: `${
|
|
455
|
+
(g(!0), y(te, null, fe(l(s), (E) => (g(), y("div", {
|
|
456
|
+
key: E,
|
|
457
|
+
style: T({
|
|
458
|
+
left: `${f(E) / (l(c) - 1) * 100}%`
|
|
387
459
|
}),
|
|
388
|
-
class: w(["absolute top-50% rounded-full bg-white",
|
|
460
|
+
class: w(["absolute top-50% rounded-full bg-white", l(O).tick])
|
|
389
461
|
}, null, 6))), 128)),
|
|
390
|
-
|
|
462
|
+
M("div", {
|
|
391
463
|
ref_key: "indicator",
|
|
392
|
-
ref:
|
|
393
|
-
class: w(["absolute top-50% cursor-pointer rounded-full
|
|
394
|
-
style:
|
|
395
|
-
left: `${
|
|
464
|
+
ref: S,
|
|
465
|
+
class: w(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [l(O).indicator, l(j).indicator, l(p)]]),
|
|
466
|
+
style: T({
|
|
467
|
+
left: `${l(d) / (l(c) - 1) * 100}%`
|
|
396
468
|
})
|
|
397
469
|
}, [
|
|
398
|
-
|
|
399
|
-
class: w(["pointer-events-none absolute left-50% top-50% rounded-full
|
|
470
|
+
M("div", {
|
|
471
|
+
class: w(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [l(O).indicatorInner, l(b)]])
|
|
400
472
|
}, null, 2)
|
|
401
473
|
], 6),
|
|
402
|
-
|
|
403
|
-
class: w(["pointer-events-none h-full rounded-full
|
|
404
|
-
style:
|
|
405
|
-
width: `${
|
|
474
|
+
M("div", {
|
|
475
|
+
class: w(["pointer-events-none h-full rounded-full", [l(O).progress, l(j).progress, l(u)]]),
|
|
476
|
+
style: T({
|
|
477
|
+
width: `${l(d) / (l(c) - 1) * 100}%`
|
|
406
478
|
})
|
|
407
479
|
}, null, 6)
|
|
408
480
|
], 6)
|
|
409
481
|
], 2)
|
|
410
482
|
], 34),
|
|
411
|
-
|
|
412
|
-
class: "relative mx-1 h-1em text-xs
|
|
413
|
-
style:
|
|
414
|
-
width: `${
|
|
483
|
+
M("div", {
|
|
484
|
+
class: "relative mx-1 h-1em text-xs text-surface-onlow",
|
|
485
|
+
style: T({
|
|
486
|
+
width: `${t.width}rem`
|
|
415
487
|
})
|
|
416
488
|
}, [
|
|
417
|
-
(g(!0), y(
|
|
418
|
-
key:
|
|
419
|
-
style:
|
|
420
|
-
left: `${
|
|
489
|
+
(g(!0), y(te, null, fe(l(s), (E, I) => (g(), y("div", {
|
|
490
|
+
key: I,
|
|
491
|
+
style: T({
|
|
492
|
+
left: `${f(E) / (l(c) - 1) * 100}%`
|
|
421
493
|
}),
|
|
422
|
-
class: w(["absolute w-auto flex rounded-full -translate-x-50%",
|
|
423
|
-
},
|
|
494
|
+
class: w(["absolute w-auto flex rounded-full -translate-x-50%", l(O).tick])
|
|
495
|
+
}, re(E), 7))), 128))
|
|
424
496
|
], 4)
|
|
425
497
|
]));
|
|
426
498
|
}
|
|
427
499
|
});
|
|
428
|
-
function
|
|
500
|
+
function ge(e) {
|
|
429
501
|
return m(
|
|
430
|
-
() => ({ style:
|
|
502
|
+
() => ({ style: Bt(e.rounded), class: "rounded-[var(--r-rounded)]" })
|
|
431
503
|
);
|
|
432
504
|
}
|
|
433
|
-
function
|
|
505
|
+
function Bt(e) {
|
|
506
|
+
const t = /^-?\d*\.?\d+(px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;
|
|
434
507
|
switch (e) {
|
|
435
508
|
case "none":
|
|
436
509
|
return "--r-rounded: 0";
|
|
@@ -443,13 +516,13 @@ function Mt(e) {
|
|
|
443
516
|
case "full":
|
|
444
517
|
return "--r-rounded: 9999px";
|
|
445
518
|
default:
|
|
446
|
-
return typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
|
|
519
|
+
return typeof e == "string" && t.test(e) ? `--r-rounded: ${e};` : typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
|
|
447
520
|
}
|
|
448
521
|
}
|
|
449
|
-
const
|
|
522
|
+
const Vt = ["id"], Ft = ["for"], Wt = ["for"], Lt = /* @__PURE__ */ $({
|
|
523
|
+
inheritAttrs: !1,
|
|
450
524
|
__name: "Switch",
|
|
451
|
-
props: {
|
|
452
|
-
modelValue: {},
|
|
525
|
+
props: /* @__PURE__ */ ee({
|
|
453
526
|
size: { default: "md" },
|
|
454
527
|
animate: { type: Boolean, default: !0 },
|
|
455
528
|
options: {},
|
|
@@ -457,128 +530,138 @@ const St = ["id"], At = ["for"], $t = ["for"], Br = /* @__PURE__ */ R({
|
|
|
457
530
|
id: {},
|
|
458
531
|
rounded: { default: "full" },
|
|
459
532
|
color: { default: "primary" },
|
|
460
|
-
disabled: { type: Boolean }
|
|
461
|
-
|
|
533
|
+
disabled: { type: Boolean },
|
|
534
|
+
offIcon: {},
|
|
535
|
+
onIcon: {}
|
|
536
|
+
}, {
|
|
537
|
+
modelValue: { type: Boolean },
|
|
538
|
+
modelModifiers: {}
|
|
539
|
+
}),
|
|
462
540
|
emits: ["update:modelValue"],
|
|
463
|
-
setup(e
|
|
464
|
-
const
|
|
465
|
-
switch (
|
|
541
|
+
setup(e) {
|
|
542
|
+
const t = e, r = me(e, "modelValue"), n = v(null), o = v(!1), a = m(() => {
|
|
543
|
+
switch (t.size) {
|
|
466
544
|
case "sm":
|
|
467
545
|
return {
|
|
546
|
+
icon: "text-xs mx-0.5",
|
|
468
547
|
wrapper: "h-4 w-8",
|
|
469
|
-
indicator:
|
|
548
|
+
indicator: o.value ? "h-3 w-4" : "h-3 w-3",
|
|
470
549
|
inactive: "left-[calc(0.125rem-1px)]",
|
|
471
|
-
active:
|
|
550
|
+
active: o.value ? "left-[calc(0.875rem-1px)]" : "left-[calc(1.125rem-1px)]"
|
|
472
551
|
};
|
|
473
552
|
case "md":
|
|
474
553
|
return {
|
|
554
|
+
icon: "text-sm mx-1",
|
|
475
555
|
wrapper: "h-6 w-12",
|
|
476
|
-
indicator:
|
|
556
|
+
indicator: o.value ? "h-4 w-5" : "h-4 w-4",
|
|
477
557
|
inactive: "left-[calc(0.25rem-1px)]",
|
|
478
|
-
active:
|
|
558
|
+
active: o.value ? "left-[calc(1.5rem-1px)]" : "left-[calc(1.75rem-1px)]"
|
|
479
559
|
};
|
|
480
560
|
case "lg":
|
|
481
561
|
return {
|
|
562
|
+
icon: "text-lg mx-2",
|
|
482
563
|
wrapper: "h-8 w-16",
|
|
483
|
-
indicator:
|
|
564
|
+
indicator: o.value ? "h-6 w-8" : "h-6 w-6",
|
|
484
565
|
inactive: "left-[calc(0.25rem-1px)]",
|
|
485
|
-
active:
|
|
566
|
+
active: o.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
|
|
486
567
|
};
|
|
487
568
|
}
|
|
488
|
-
}),
|
|
569
|
+
}), s = m(() => t.animate ? {
|
|
489
570
|
indicator: "transition-all",
|
|
490
571
|
progress: "transition-width"
|
|
491
572
|
} : {
|
|
492
573
|
indicator: "",
|
|
493
574
|
progress: ""
|
|
494
|
-
})
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}
|
|
501
|
-
}) : k(!1);
|
|
502
|
-
function d() {
|
|
503
|
-
const v = k("");
|
|
504
|
-
return de(() => {
|
|
505
|
-
r.id ? v.value = r.id : v.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
506
|
-
}), v;
|
|
575
|
+
});
|
|
576
|
+
function i() {
|
|
577
|
+
const u = v("");
|
|
578
|
+
return se(() => {
|
|
579
|
+
t.id ? u.value = t.id : u.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
580
|
+
}), u;
|
|
507
581
|
}
|
|
508
|
-
const
|
|
509
|
-
let
|
|
510
|
-
switch (
|
|
582
|
+
const c = i(), d = m(() => {
|
|
583
|
+
let u = "bg-primary-container";
|
|
584
|
+
switch (t.color) {
|
|
511
585
|
case "secondary":
|
|
512
|
-
|
|
586
|
+
u = "bg-secondary-7";
|
|
513
587
|
break;
|
|
514
588
|
case "tertiary":
|
|
515
|
-
|
|
589
|
+
u = "bg-tertiary-7";
|
|
516
590
|
break;
|
|
517
591
|
case "error":
|
|
518
|
-
|
|
592
|
+
u = "bg-error-7";
|
|
519
593
|
break;
|
|
520
594
|
}
|
|
521
595
|
return {
|
|
522
|
-
wrapper:
|
|
523
|
-
indicator:
|
|
596
|
+
wrapper: r.value ? `border border-transparent ${u}` : "bg-surface-lowest border border-surface-border-low",
|
|
597
|
+
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
524
598
|
};
|
|
525
|
-
}),
|
|
526
|
-
return (
|
|
599
|
+
}), f = ge(t);
|
|
600
|
+
return (u, p) => (g(), y("div", {
|
|
527
601
|
role: "switch",
|
|
528
602
|
class: w(["relative flex items-center gap-2", {
|
|
529
|
-
"pointer-events-none filter-grayscale":
|
|
603
|
+
"pointer-events-none filter-grayscale op60": t.disabled
|
|
530
604
|
}])
|
|
531
605
|
}, [
|
|
532
|
-
|
|
533
|
-
id: c
|
|
534
|
-
"onUpdate:modelValue":
|
|
606
|
+
Je(M("input", Pe({
|
|
607
|
+
id: l(c),
|
|
608
|
+
"onUpdate:modelValue": p[0] || (p[0] = (b) => r.value = b)
|
|
609
|
+
}, u.$attrs, {
|
|
535
610
|
class: "hidden",
|
|
536
611
|
type: "checkbox"
|
|
537
|
-
}, null,
|
|
538
|
-
[
|
|
612
|
+
}), null, 16, Vt), [
|
|
613
|
+
[bt, r.value]
|
|
539
614
|
]),
|
|
540
|
-
|
|
615
|
+
M("label", {
|
|
541
616
|
class: "leading-0 cursor-pointer!",
|
|
542
|
-
for: c
|
|
617
|
+
for: l(c)
|
|
543
618
|
}, [
|
|
544
|
-
|
|
619
|
+
M("div", {
|
|
545
620
|
ref_key: "wrapper",
|
|
546
|
-
ref:
|
|
547
|
-
class: w([[
|
|
548
|
-
style:
|
|
549
|
-
onPointerdown:
|
|
550
|
-
onPointerup:
|
|
551
|
-
onPointerleave:
|
|
552
|
-
onPointerenter:
|
|
621
|
+
ref: n,
|
|
622
|
+
class: w([[l(a).wrapper, l(d).wrapper, l(f).class], "relative inline-block transition-all"]),
|
|
623
|
+
style: T([l(f).style]),
|
|
624
|
+
onPointerdown: p[1] || (p[1] = (b) => o.value = !0),
|
|
625
|
+
onPointerup: p[2] || (p[2] = (b) => o.value = !1),
|
|
626
|
+
onPointerleave: p[3] || (p[3] = (b) => o.value = !1),
|
|
627
|
+
onPointerenter: p[4] || (p[4] = (b) => b.buttons === 1 && (o.value = !0))
|
|
553
628
|
}, [
|
|
554
|
-
|
|
555
|
-
class: w(["absolute top-50% -translate-y-50%", [
|
|
556
|
-
style:
|
|
557
|
-
}, null, 6)
|
|
629
|
+
M("div", {
|
|
630
|
+
class: w(["absolute top-50% -translate-y-50%", [l(a).indicator, l(d).indicator, l(s).indicator, r.value ? l(a).active : l(a).inactive, l(f).class]]),
|
|
631
|
+
style: T([l(f).style])
|
|
632
|
+
}, null, 6),
|
|
633
|
+
M("i", {
|
|
634
|
+
class: w(["absolute top-1/2 -translate-y-50%", [l(a).icon, {
|
|
635
|
+
[`left-0 text-${u.color}-on`]: r.value,
|
|
636
|
+
"right-0 text-surface-on ": !r.value,
|
|
637
|
+
[u.onIcon ?? ""]: r.value && u.onIcon,
|
|
638
|
+
[u.offIcon ?? ""]: !r.value && u.offIcon
|
|
639
|
+
}]])
|
|
640
|
+
}, null, 2)
|
|
558
641
|
], 38)
|
|
559
|
-
], 8,
|
|
560
|
-
|
|
642
|
+
], 8, Ft),
|
|
643
|
+
u.label ? (g(), y("label", {
|
|
561
644
|
key: 0,
|
|
562
|
-
for: c
|
|
563
|
-
},
|
|
645
|
+
for: l(c)
|
|
646
|
+
}, re(u.label), 9, Wt)) : z("", !0)
|
|
564
647
|
], 2));
|
|
565
648
|
}
|
|
566
649
|
});
|
|
567
|
-
function
|
|
650
|
+
function ve(e) {
|
|
568
651
|
"@babel/helpers - typeof";
|
|
569
|
-
return
|
|
652
|
+
return ve = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
570
653
|
return typeof t;
|
|
571
654
|
} : function(t) {
|
|
572
655
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
573
|
-
},
|
|
656
|
+
}, ve(e);
|
|
574
657
|
}
|
|
575
|
-
var
|
|
658
|
+
var Dt = /^\s+/, jt = /\s+$/;
|
|
576
659
|
function h(e, t) {
|
|
577
660
|
if (e = e || "", t = t || {}, e instanceof h)
|
|
578
661
|
return e;
|
|
579
662
|
if (!(this instanceof h))
|
|
580
663
|
return new h(e, t);
|
|
581
|
-
var r =
|
|
664
|
+
var r = Gt(e);
|
|
582
665
|
this._originalInput = e, this._r = r.r, this._g = r.g, this._b = r.b, this._a = r.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || r.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = r.ok;
|
|
583
666
|
}
|
|
584
667
|
h.prototype = {
|
|
@@ -605,14 +688,14 @@ h.prototype = {
|
|
|
605
688
|
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
606
689
|
},
|
|
607
690
|
getLuminance: function() {
|
|
608
|
-
var t = this.toRgb(), r, n,
|
|
609
|
-
return r = t.r / 255, n = t.g / 255,
|
|
691
|
+
var t = this.toRgb(), r, n, o, a, s, i;
|
|
692
|
+
return r = t.r / 255, n = t.g / 255, o = t.b / 255, r <= 0.03928 ? a = r / 12.92 : a = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? s = n / 12.92 : s = Math.pow((n + 0.055) / 1.055, 2.4), o <= 0.03928 ? i = o / 12.92 : i = Math.pow((o + 0.055) / 1.055, 2.4), 0.2126 * a + 0.7152 * s + 0.0722 * i;
|
|
610
693
|
},
|
|
611
694
|
setAlpha: function(t) {
|
|
612
|
-
return this._a =
|
|
695
|
+
return this._a = rt(t), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
613
696
|
},
|
|
614
697
|
toHsv: function() {
|
|
615
|
-
var t =
|
|
698
|
+
var t = De(this._r, this._g, this._b);
|
|
616
699
|
return {
|
|
617
700
|
h: t.h * 360,
|
|
618
701
|
s: t.s,
|
|
@@ -621,11 +704,11 @@ h.prototype = {
|
|
|
621
704
|
};
|
|
622
705
|
},
|
|
623
706
|
toHsvString: function() {
|
|
624
|
-
var t =
|
|
625
|
-
return this._a == 1 ? "hsv(" + r + ", " + n + "%, " +
|
|
707
|
+
var t = De(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), o = Math.round(t.v * 100);
|
|
708
|
+
return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + o + "%)" : "hsva(" + r + ", " + n + "%, " + o + "%, " + this._roundA + ")";
|
|
626
709
|
},
|
|
627
710
|
toHsl: function() {
|
|
628
|
-
var t =
|
|
711
|
+
var t = Le(this._r, this._g, this._b);
|
|
629
712
|
return {
|
|
630
713
|
h: t.h * 360,
|
|
631
714
|
s: t.s,
|
|
@@ -634,17 +717,17 @@ h.prototype = {
|
|
|
634
717
|
};
|
|
635
718
|
},
|
|
636
719
|
toHslString: function() {
|
|
637
|
-
var t =
|
|
638
|
-
return this._a == 1 ? "hsl(" + r + ", " + n + "%, " +
|
|
720
|
+
var t = Le(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), o = Math.round(t.l * 100);
|
|
721
|
+
return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + o + "%)" : "hsla(" + r + ", " + n + "%, " + o + "%, " + this._roundA + ")";
|
|
639
722
|
},
|
|
640
723
|
toHex: function(t) {
|
|
641
|
-
return
|
|
724
|
+
return je(this._r, this._g, this._b, t);
|
|
642
725
|
},
|
|
643
726
|
toHexString: function(t) {
|
|
644
727
|
return "#" + this.toHex(t);
|
|
645
728
|
},
|
|
646
729
|
toHex8: function(t) {
|
|
647
|
-
return
|
|
730
|
+
return Yt(this._r, this._g, this._b, this._a, t);
|
|
648
731
|
},
|
|
649
732
|
toHex8String: function(t) {
|
|
650
733
|
return "#" + this.toHex8(t);
|
|
@@ -662,30 +745,30 @@ h.prototype = {
|
|
|
662
745
|
},
|
|
663
746
|
toPercentageRgb: function() {
|
|
664
747
|
return {
|
|
665
|
-
r: Math.round(
|
|
666
|
-
g: Math.round(
|
|
667
|
-
b: Math.round(
|
|
748
|
+
r: Math.round(x(this._r, 255) * 100) + "%",
|
|
749
|
+
g: Math.round(x(this._g, 255) * 100) + "%",
|
|
750
|
+
b: Math.round(x(this._b, 255) * 100) + "%",
|
|
668
751
|
a: this._a
|
|
669
752
|
};
|
|
670
753
|
},
|
|
671
754
|
toPercentageRgbString: function() {
|
|
672
|
-
return this._a == 1 ? "rgb(" + Math.round(
|
|
755
|
+
return this._a == 1 ? "rgb(" + Math.round(x(this._r, 255) * 100) + "%, " + Math.round(x(this._g, 255) * 100) + "%, " + Math.round(x(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(x(this._r, 255) * 100) + "%, " + Math.round(x(this._g, 255) * 100) + "%, " + Math.round(x(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
673
756
|
},
|
|
674
757
|
toName: function() {
|
|
675
|
-
return this._a === 0 ? "transparent" : this._a < 1 ? !1 :
|
|
758
|
+
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : ir[je(this._r, this._g, this._b, !0)] || !1;
|
|
676
759
|
},
|
|
677
760
|
toFilter: function(t) {
|
|
678
|
-
var r = "#" +
|
|
761
|
+
var r = "#" + Ge(this._r, this._g, this._b, this._a), n = r, o = this._gradientType ? "GradientType = 1, " : "";
|
|
679
762
|
if (t) {
|
|
680
763
|
var a = h(t);
|
|
681
|
-
n = "#" +
|
|
764
|
+
n = "#" + Ge(a._r, a._g, a._b, a._a);
|
|
682
765
|
}
|
|
683
|
-
return "progid:DXImageTransform.Microsoft.gradient(" +
|
|
766
|
+
return "progid:DXImageTransform.Microsoft.gradient(" + o + "startColorstr=" + r + ",endColorstr=" + n + ")";
|
|
684
767
|
},
|
|
685
768
|
toString: function(t) {
|
|
686
769
|
var r = !!t;
|
|
687
770
|
t = t || this._format;
|
|
688
|
-
var n = !1,
|
|
771
|
+
var n = !1, o = this._a < 1 && this._a >= 0, a = !r && o && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
|
|
689
772
|
return a ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
|
|
690
773
|
},
|
|
691
774
|
clone: function() {
|
|
@@ -696,69 +779,69 @@ h.prototype = {
|
|
|
696
779
|
return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this;
|
|
697
780
|
},
|
|
698
781
|
lighten: function() {
|
|
699
|
-
return this._applyModification(
|
|
782
|
+
return this._applyModification(Jt, arguments);
|
|
700
783
|
},
|
|
701
784
|
brighten: function() {
|
|
702
|
-
return this._applyModification(
|
|
785
|
+
return this._applyModification(er, arguments);
|
|
703
786
|
},
|
|
704
787
|
darken: function() {
|
|
705
|
-
return this._applyModification(
|
|
788
|
+
return this._applyModification(tr, arguments);
|
|
706
789
|
},
|
|
707
790
|
desaturate: function() {
|
|
708
|
-
return this._applyModification(
|
|
791
|
+
return this._applyModification(Kt, arguments);
|
|
709
792
|
},
|
|
710
793
|
saturate: function() {
|
|
711
|
-
return this._applyModification(
|
|
794
|
+
return this._applyModification(Qt, arguments);
|
|
712
795
|
},
|
|
713
796
|
greyscale: function() {
|
|
714
|
-
return this._applyModification(
|
|
797
|
+
return this._applyModification(Zt, arguments);
|
|
715
798
|
},
|
|
716
799
|
spin: function() {
|
|
717
|
-
return this._applyModification(
|
|
800
|
+
return this._applyModification(rr, arguments);
|
|
718
801
|
},
|
|
719
802
|
_applyCombination: function(t, r) {
|
|
720
803
|
return t.apply(null, [this].concat([].slice.call(r)));
|
|
721
804
|
},
|
|
722
805
|
analogous: function() {
|
|
723
|
-
return this._applyCombination(
|
|
806
|
+
return this._applyCombination(ar, arguments);
|
|
724
807
|
},
|
|
725
808
|
complement: function() {
|
|
726
|
-
return this._applyCombination(
|
|
809
|
+
return this._applyCombination(nr, arguments);
|
|
727
810
|
},
|
|
728
811
|
monochromatic: function() {
|
|
729
|
-
return this._applyCombination(
|
|
812
|
+
return this._applyCombination(sr, arguments);
|
|
730
813
|
},
|
|
731
814
|
splitcomplement: function() {
|
|
732
|
-
return this._applyCombination(
|
|
815
|
+
return this._applyCombination(or, arguments);
|
|
733
816
|
},
|
|
734
817
|
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
735
818
|
// polyad: function (number) {
|
|
736
819
|
// return this._applyCombination(polyad, [number]);
|
|
737
820
|
// },
|
|
738
821
|
triad: function() {
|
|
739
|
-
return this._applyCombination(
|
|
822
|
+
return this._applyCombination(Ue, [3]);
|
|
740
823
|
},
|
|
741
824
|
tetrad: function() {
|
|
742
|
-
return this._applyCombination(
|
|
825
|
+
return this._applyCombination(Ue, [4]);
|
|
743
826
|
}
|
|
744
827
|
};
|
|
745
828
|
h.fromRatio = function(e, t) {
|
|
746
|
-
if (
|
|
829
|
+
if (ve(e) == "object") {
|
|
747
830
|
var r = {};
|
|
748
831
|
for (var n in e)
|
|
749
|
-
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] =
|
|
832
|
+
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = ue(e[n]));
|
|
750
833
|
e = r;
|
|
751
834
|
}
|
|
752
835
|
return h(e, t);
|
|
753
836
|
};
|
|
754
|
-
function
|
|
837
|
+
function Gt(e) {
|
|
755
838
|
var t = {
|
|
756
839
|
r: 0,
|
|
757
840
|
g: 0,
|
|
758
841
|
b: 0
|
|
759
|
-
}, r = 1, n = null,
|
|
760
|
-
return typeof e == "string" && (e =
|
|
761
|
-
ok:
|
|
842
|
+
}, r = 1, n = null, o = null, a = null, s = !1, i = !1;
|
|
843
|
+
return typeof e == "string" && (e = dr(e)), ve(e) == "object" && (W(e.r) && W(e.g) && W(e.b) ? (t = Ut(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : W(e.h) && W(e.s) && W(e.v) ? (n = ue(e.s), o = ue(e.v), t = qt(e.h, n, o), s = !0, i = "hsv") : W(e.h) && W(e.s) && W(e.l) && (n = ue(e.s), a = ue(e.l), t = Xt(e.h, n, a), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = rt(r), {
|
|
844
|
+
ok: s,
|
|
762
845
|
format: e.format || i,
|
|
763
846
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
764
847
|
g: Math.min(255, Math.max(t.g, 0)),
|
|
@@ -766,102 +849,102 @@ function Rt(e) {
|
|
|
766
849
|
a: r
|
|
767
850
|
};
|
|
768
851
|
}
|
|
769
|
-
function
|
|
852
|
+
function Ut(e, t, r) {
|
|
770
853
|
return {
|
|
771
|
-
r:
|
|
772
|
-
g:
|
|
773
|
-
b:
|
|
854
|
+
r: x(e, 255) * 255,
|
|
855
|
+
g: x(t, 255) * 255,
|
|
856
|
+
b: x(r, 255) * 255
|
|
774
857
|
};
|
|
775
858
|
}
|
|
776
|
-
function
|
|
777
|
-
e =
|
|
778
|
-
var n = Math.max(e, t, r),
|
|
779
|
-
if (n ==
|
|
780
|
-
a =
|
|
859
|
+
function Le(e, t, r) {
|
|
860
|
+
e = x(e, 255), t = x(t, 255), r = x(r, 255);
|
|
861
|
+
var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s, i = (n + o) / 2;
|
|
862
|
+
if (n == o)
|
|
863
|
+
a = s = 0;
|
|
781
864
|
else {
|
|
782
|
-
var
|
|
783
|
-
switch (
|
|
865
|
+
var c = n - o;
|
|
866
|
+
switch (s = i > 0.5 ? c / (2 - n - o) : c / (n + o), n) {
|
|
784
867
|
case e:
|
|
785
|
-
a = (t - r) /
|
|
868
|
+
a = (t - r) / c + (t < r ? 6 : 0);
|
|
786
869
|
break;
|
|
787
870
|
case t:
|
|
788
|
-
a = (r - e) /
|
|
871
|
+
a = (r - e) / c + 2;
|
|
789
872
|
break;
|
|
790
873
|
case r:
|
|
791
|
-
a = (e - t) /
|
|
874
|
+
a = (e - t) / c + 4;
|
|
792
875
|
break;
|
|
793
876
|
}
|
|
794
877
|
a /= 6;
|
|
795
878
|
}
|
|
796
879
|
return {
|
|
797
880
|
h: a,
|
|
798
|
-
s
|
|
881
|
+
s,
|
|
799
882
|
l: i
|
|
800
883
|
};
|
|
801
884
|
}
|
|
802
|
-
function
|
|
803
|
-
var n,
|
|
804
|
-
e =
|
|
805
|
-
function
|
|
806
|
-
return
|
|
885
|
+
function Xt(e, t, r) {
|
|
886
|
+
var n, o, a;
|
|
887
|
+
e = x(e, 360), t = x(t, 100), r = x(r, 100);
|
|
888
|
+
function s(d, f, u) {
|
|
889
|
+
return u < 0 && (u += 1), u > 1 && (u -= 1), u < 1 / 6 ? d + (f - d) * 6 * u : u < 1 / 2 ? f : u < 2 / 3 ? d + (f - d) * (2 / 3 - u) * 6 : d;
|
|
807
890
|
}
|
|
808
891
|
if (t === 0)
|
|
809
|
-
n =
|
|
892
|
+
n = o = a = r;
|
|
810
893
|
else {
|
|
811
|
-
var i = r < 0.5 ? r * (1 + t) : r + t - r * t,
|
|
812
|
-
n =
|
|
894
|
+
var i = r < 0.5 ? r * (1 + t) : r + t - r * t, c = 2 * r - i;
|
|
895
|
+
n = s(c, i, e + 1 / 3), o = s(c, i, e), a = s(c, i, e - 1 / 3);
|
|
813
896
|
}
|
|
814
897
|
return {
|
|
815
898
|
r: n * 255,
|
|
816
|
-
g:
|
|
899
|
+
g: o * 255,
|
|
817
900
|
b: a * 255
|
|
818
901
|
};
|
|
819
902
|
}
|
|
820
|
-
function
|
|
821
|
-
e =
|
|
822
|
-
var n = Math.max(e, t, r),
|
|
823
|
-
if (
|
|
903
|
+
function De(e, t, r) {
|
|
904
|
+
e = x(e, 255), t = x(t, 255), r = x(r, 255);
|
|
905
|
+
var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s, i = n, c = n - o;
|
|
906
|
+
if (s = n === 0 ? 0 : c / n, n == o)
|
|
824
907
|
a = 0;
|
|
825
908
|
else {
|
|
826
909
|
switch (n) {
|
|
827
910
|
case e:
|
|
828
|
-
a = (t - r) /
|
|
911
|
+
a = (t - r) / c + (t < r ? 6 : 0);
|
|
829
912
|
break;
|
|
830
913
|
case t:
|
|
831
|
-
a = (r - e) /
|
|
914
|
+
a = (r - e) / c + 2;
|
|
832
915
|
break;
|
|
833
916
|
case r:
|
|
834
|
-
a = (e - t) /
|
|
917
|
+
a = (e - t) / c + 4;
|
|
835
918
|
break;
|
|
836
919
|
}
|
|
837
920
|
a /= 6;
|
|
838
921
|
}
|
|
839
922
|
return {
|
|
840
923
|
h: a,
|
|
841
|
-
s
|
|
924
|
+
s,
|
|
842
925
|
v: i
|
|
843
926
|
};
|
|
844
927
|
}
|
|
845
|
-
function
|
|
846
|
-
e =
|
|
847
|
-
var n = Math.floor(e),
|
|
928
|
+
function qt(e, t, r) {
|
|
929
|
+
e = x(e, 360) * 6, t = x(t, 100), r = x(r, 100);
|
|
930
|
+
var n = Math.floor(e), o = e - n, a = r * (1 - t), s = r * (1 - o * t), i = r * (1 - (1 - o) * t), c = n % 6, d = [r, s, a, a, i, r][c], f = [i, r, r, s, a, a][c], u = [a, a, i, r, r, s][c];
|
|
848
931
|
return {
|
|
849
932
|
r: d * 255,
|
|
850
|
-
g:
|
|
851
|
-
b:
|
|
933
|
+
g: f * 255,
|
|
934
|
+
b: u * 255
|
|
852
935
|
};
|
|
853
936
|
}
|
|
854
|
-
function
|
|
855
|
-
var
|
|
856
|
-
return n &&
|
|
937
|
+
function je(e, t, r, n) {
|
|
938
|
+
var o = [V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16))];
|
|
939
|
+
return n && o[0].charAt(0) == o[0].charAt(1) && o[1].charAt(0) == o[1].charAt(1) && o[2].charAt(0) == o[2].charAt(1) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
|
|
857
940
|
}
|
|
858
|
-
function
|
|
859
|
-
var a = [
|
|
860
|
-
return
|
|
941
|
+
function Yt(e, t, r, n, o) {
|
|
942
|
+
var a = [V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16)), V(nt(n))];
|
|
943
|
+
return o && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
|
|
861
944
|
}
|
|
862
|
-
function
|
|
863
|
-
var
|
|
864
|
-
return
|
|
945
|
+
function Ge(e, t, r, n) {
|
|
946
|
+
var o = [V(nt(n)), V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16))];
|
|
947
|
+
return o.join("");
|
|
865
948
|
}
|
|
866
949
|
h.equals = function(e, t) {
|
|
867
950
|
return !e || !t ? !1 : h(e).toRgbString() == h(t).toRgbString();
|
|
@@ -873,54 +956,54 @@ h.random = function() {
|
|
|
873
956
|
b: Math.random()
|
|
874
957
|
});
|
|
875
958
|
};
|
|
876
|
-
function
|
|
959
|
+
function Kt(e, t) {
|
|
877
960
|
t = t === 0 ? 0 : t || 10;
|
|
878
961
|
var r = h(e).toHsl();
|
|
879
|
-
return r.s -= t / 100, r.s =
|
|
962
|
+
return r.s -= t / 100, r.s = ke(r.s), h(r);
|
|
880
963
|
}
|
|
881
|
-
function
|
|
964
|
+
function Qt(e, t) {
|
|
882
965
|
t = t === 0 ? 0 : t || 10;
|
|
883
966
|
var r = h(e).toHsl();
|
|
884
|
-
return r.s += t / 100, r.s =
|
|
967
|
+
return r.s += t / 100, r.s = ke(r.s), h(r);
|
|
885
968
|
}
|
|
886
|
-
function
|
|
969
|
+
function Zt(e) {
|
|
887
970
|
return h(e).desaturate(100);
|
|
888
971
|
}
|
|
889
|
-
function
|
|
972
|
+
function Jt(e, t) {
|
|
890
973
|
t = t === 0 ? 0 : t || 10;
|
|
891
974
|
var r = h(e).toHsl();
|
|
892
|
-
return r.l += t / 100, r.l =
|
|
975
|
+
return r.l += t / 100, r.l = ke(r.l), h(r);
|
|
893
976
|
}
|
|
894
|
-
function
|
|
977
|
+
function er(e, t) {
|
|
895
978
|
t = t === 0 ? 0 : t || 10;
|
|
896
979
|
var r = h(e).toRgb();
|
|
897
980
|
return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), h(r);
|
|
898
981
|
}
|
|
899
|
-
function
|
|
982
|
+
function tr(e, t) {
|
|
900
983
|
t = t === 0 ? 0 : t || 10;
|
|
901
984
|
var r = h(e).toHsl();
|
|
902
|
-
return r.l -= t / 100, r.l =
|
|
985
|
+
return r.l -= t / 100, r.l = ke(r.l), h(r);
|
|
903
986
|
}
|
|
904
|
-
function
|
|
987
|
+
function rr(e, t) {
|
|
905
988
|
var r = h(e).toHsl(), n = (r.h + t) % 360;
|
|
906
989
|
return r.h = n < 0 ? 360 + n : n, h(r);
|
|
907
990
|
}
|
|
908
|
-
function
|
|
991
|
+
function nr(e) {
|
|
909
992
|
var t = h(e).toHsl();
|
|
910
993
|
return t.h = (t.h + 180) % 360, h(t);
|
|
911
994
|
}
|
|
912
|
-
function
|
|
995
|
+
function Ue(e, t) {
|
|
913
996
|
if (isNaN(t) || t <= 0)
|
|
914
997
|
throw new Error("Argument to polyad must be a positive number");
|
|
915
|
-
for (var r = h(e).toHsl(), n = [h(e)],
|
|
998
|
+
for (var r = h(e).toHsl(), n = [h(e)], o = 360 / t, a = 1; a < t; a++)
|
|
916
999
|
n.push(h({
|
|
917
|
-
h: (r.h + a *
|
|
1000
|
+
h: (r.h + a * o) % 360,
|
|
918
1001
|
s: r.s,
|
|
919
1002
|
l: r.l
|
|
920
1003
|
}));
|
|
921
1004
|
return n;
|
|
922
1005
|
}
|
|
923
|
-
function
|
|
1006
|
+
function or(e) {
|
|
924
1007
|
var t = h(e).toHsl(), r = t.h;
|
|
925
1008
|
return [h(e), h({
|
|
926
1009
|
h: (r + 72) % 360,
|
|
@@ -932,40 +1015,40 @@ function Wt(e) {
|
|
|
932
1015
|
l: t.l
|
|
933
1016
|
})];
|
|
934
1017
|
}
|
|
935
|
-
function
|
|
1018
|
+
function ar(e, t, r) {
|
|
936
1019
|
t = t || 6, r = r || 30;
|
|
937
|
-
var n = h(e).toHsl(),
|
|
938
|
-
for (n.h = (n.h - (
|
|
939
|
-
n.h = (n.h +
|
|
1020
|
+
var n = h(e).toHsl(), o = 360 / r, a = [h(e)];
|
|
1021
|
+
for (n.h = (n.h - (o * t >> 1) + 720) % 360; --t; )
|
|
1022
|
+
n.h = (n.h + o) % 360, a.push(h(n));
|
|
940
1023
|
return a;
|
|
941
1024
|
}
|
|
942
|
-
function
|
|
1025
|
+
function sr(e, t) {
|
|
943
1026
|
t = t || 6;
|
|
944
|
-
for (var r = h(e).toHsv(), n = r.h,
|
|
945
|
-
|
|
1027
|
+
for (var r = h(e).toHsv(), n = r.h, o = r.s, a = r.v, s = [], i = 1 / t; t--; )
|
|
1028
|
+
s.push(h({
|
|
946
1029
|
h: n,
|
|
947
|
-
s,
|
|
1030
|
+
s: o,
|
|
948
1031
|
v: a
|
|
949
1032
|
})), a = (a + i) % 1;
|
|
950
|
-
return
|
|
1033
|
+
return s;
|
|
951
1034
|
}
|
|
952
1035
|
h.mix = function(e, t, r) {
|
|
953
1036
|
r = r === 0 ? 0 : r || 50;
|
|
954
|
-
var n = h(e).toRgb(),
|
|
955
|
-
r: (
|
|
956
|
-
g: (
|
|
957
|
-
b: (
|
|
958
|
-
a: (
|
|
1037
|
+
var n = h(e).toRgb(), o = h(t).toRgb(), a = r / 100, s = {
|
|
1038
|
+
r: (o.r - n.r) * a + n.r,
|
|
1039
|
+
g: (o.g - n.g) * a + n.g,
|
|
1040
|
+
b: (o.b - n.b) * a + n.b,
|
|
1041
|
+
a: (o.a - n.a) * a + n.a
|
|
959
1042
|
};
|
|
960
|
-
return h(
|
|
1043
|
+
return h(s);
|
|
961
1044
|
};
|
|
962
1045
|
h.readability = function(e, t) {
|
|
963
1046
|
var r = h(e), n = h(t);
|
|
964
1047
|
return (Math.max(r.getLuminance(), n.getLuminance()) + 0.05) / (Math.min(r.getLuminance(), n.getLuminance()) + 0.05);
|
|
965
1048
|
};
|
|
966
1049
|
h.isReadable = function(e, t, r) {
|
|
967
|
-
var n = h.readability(e, t),
|
|
968
|
-
switch (a = !1,
|
|
1050
|
+
var n = h.readability(e, t), o, a;
|
|
1051
|
+
switch (a = !1, o = fr(r), o.level + o.size) {
|
|
969
1052
|
case "AAsmall":
|
|
970
1053
|
case "AAAlarge":
|
|
971
1054
|
a = n >= 4.5;
|
|
@@ -980,16 +1063,16 @@ h.isReadable = function(e, t, r) {
|
|
|
980
1063
|
return a;
|
|
981
1064
|
};
|
|
982
1065
|
h.mostReadable = function(e, t, r) {
|
|
983
|
-
var n = null,
|
|
984
|
-
r = r || {},
|
|
1066
|
+
var n = null, o = 0, a, s, i, c;
|
|
1067
|
+
r = r || {}, s = r.includeFallbackColors, i = r.level, c = r.size;
|
|
985
1068
|
for (var d = 0; d < t.length; d++)
|
|
986
|
-
a = h.readability(e, t[d]), a >
|
|
1069
|
+
a = h.readability(e, t[d]), a > o && (o = a, n = h(t[d]));
|
|
987
1070
|
return h.isReadable(e, n, {
|
|
988
1071
|
level: i,
|
|
989
|
-
size:
|
|
990
|
-
}) || !
|
|
1072
|
+
size: c
|
|
1073
|
+
}) || !s ? n : (r.includeFallbackColors = !1, h.mostReadable(e, ["#fff", "#000"], r));
|
|
991
1074
|
};
|
|
992
|
-
var
|
|
1075
|
+
var $e = h.names = {
|
|
993
1076
|
aliceblue: "f0f8ff",
|
|
994
1077
|
antiquewhite: "faebd7",
|
|
995
1078
|
aqua: "0ff",
|
|
@@ -1139,69 +1222,69 @@ var ye = h.names = {
|
|
|
1139
1222
|
whitesmoke: "f5f5f5",
|
|
1140
1223
|
yellow: "ff0",
|
|
1141
1224
|
yellowgreen: "9acd32"
|
|
1142
|
-
},
|
|
1143
|
-
function
|
|
1225
|
+
}, ir = h.hexNames = lr($e);
|
|
1226
|
+
function lr(e) {
|
|
1144
1227
|
var t = {};
|
|
1145
1228
|
for (var r in e)
|
|
1146
1229
|
e.hasOwnProperty(r) && (t[e[r]] = r);
|
|
1147
1230
|
return t;
|
|
1148
1231
|
}
|
|
1149
|
-
function
|
|
1232
|
+
function rt(e) {
|
|
1150
1233
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
1151
1234
|
}
|
|
1152
|
-
function
|
|
1153
|
-
|
|
1154
|
-
var r =
|
|
1235
|
+
function x(e, t) {
|
|
1236
|
+
cr(e) && (e = "100%");
|
|
1237
|
+
var r = ur(e);
|
|
1155
1238
|
return e = Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
|
|
1156
1239
|
}
|
|
1157
|
-
function
|
|
1240
|
+
function ke(e) {
|
|
1158
1241
|
return Math.min(1, Math.max(0, e));
|
|
1159
1242
|
}
|
|
1160
|
-
function
|
|
1243
|
+
function N(e) {
|
|
1161
1244
|
return parseInt(e, 16);
|
|
1162
1245
|
}
|
|
1163
|
-
function
|
|
1246
|
+
function cr(e) {
|
|
1164
1247
|
return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
|
|
1165
1248
|
}
|
|
1166
|
-
function
|
|
1249
|
+
function ur(e) {
|
|
1167
1250
|
return typeof e == "string" && e.indexOf("%") != -1;
|
|
1168
1251
|
}
|
|
1169
|
-
function
|
|
1252
|
+
function V(e) {
|
|
1170
1253
|
return e.length == 1 ? "0" + e : "" + e;
|
|
1171
1254
|
}
|
|
1172
|
-
function
|
|
1255
|
+
function ue(e) {
|
|
1173
1256
|
return e <= 1 && (e = e * 100 + "%"), e;
|
|
1174
1257
|
}
|
|
1175
|
-
function
|
|
1258
|
+
function nt(e) {
|
|
1176
1259
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1177
1260
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return
|
|
1261
|
+
function Xe(e) {
|
|
1262
|
+
return N(e) / 255;
|
|
1180
1263
|
}
|
|
1181
|
-
var
|
|
1182
|
-
var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?",
|
|
1264
|
+
var B = function() {
|
|
1265
|
+
var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?", o = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?";
|
|
1183
1266
|
return {
|
|
1184
1267
|
CSS_UNIT: new RegExp(r),
|
|
1185
1268
|
rgb: new RegExp("rgb" + n),
|
|
1186
|
-
rgba: new RegExp("rgba" +
|
|
1269
|
+
rgba: new RegExp("rgba" + o),
|
|
1187
1270
|
hsl: new RegExp("hsl" + n),
|
|
1188
|
-
hsla: new RegExp("hsla" +
|
|
1271
|
+
hsla: new RegExp("hsla" + o),
|
|
1189
1272
|
hsv: new RegExp("hsv" + n),
|
|
1190
|
-
hsva: new RegExp("hsva" +
|
|
1273
|
+
hsva: new RegExp("hsva" + o),
|
|
1191
1274
|
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1192
1275
|
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1193
1276
|
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1194
1277
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1195
1278
|
};
|
|
1196
1279
|
}();
|
|
1197
|
-
function
|
|
1198
|
-
return !!
|
|
1280
|
+
function W(e) {
|
|
1281
|
+
return !!B.CSS_UNIT.exec(e);
|
|
1199
1282
|
}
|
|
1200
|
-
function
|
|
1201
|
-
e = e.replace(
|
|
1283
|
+
function dr(e) {
|
|
1284
|
+
e = e.replace(Dt, "").replace(jt, "").toLowerCase();
|
|
1202
1285
|
var t = !1;
|
|
1203
|
-
if (
|
|
1204
|
-
e =
|
|
1286
|
+
if ($e[e])
|
|
1287
|
+
e = $e[e], t = !0;
|
|
1205
1288
|
else if (e == "transparent")
|
|
1206
1289
|
return {
|
|
1207
1290
|
r: 0,
|
|
@@ -1211,58 +1294,58 @@ function Kt(e) {
|
|
|
1211
1294
|
format: "name"
|
|
1212
1295
|
};
|
|
1213
1296
|
var r;
|
|
1214
|
-
return (r =
|
|
1297
|
+
return (r = B.rgb.exec(e)) ? {
|
|
1215
1298
|
r: r[1],
|
|
1216
1299
|
g: r[2],
|
|
1217
1300
|
b: r[3]
|
|
1218
|
-
} : (r =
|
|
1301
|
+
} : (r = B.rgba.exec(e)) ? {
|
|
1219
1302
|
r: r[1],
|
|
1220
1303
|
g: r[2],
|
|
1221
1304
|
b: r[3],
|
|
1222
1305
|
a: r[4]
|
|
1223
|
-
} : (r =
|
|
1306
|
+
} : (r = B.hsl.exec(e)) ? {
|
|
1224
1307
|
h: r[1],
|
|
1225
1308
|
s: r[2],
|
|
1226
1309
|
l: r[3]
|
|
1227
|
-
} : (r =
|
|
1310
|
+
} : (r = B.hsla.exec(e)) ? {
|
|
1228
1311
|
h: r[1],
|
|
1229
1312
|
s: r[2],
|
|
1230
1313
|
l: r[3],
|
|
1231
1314
|
a: r[4]
|
|
1232
|
-
} : (r =
|
|
1315
|
+
} : (r = B.hsv.exec(e)) ? {
|
|
1233
1316
|
h: r[1],
|
|
1234
1317
|
s: r[2],
|
|
1235
1318
|
v: r[3]
|
|
1236
|
-
} : (r =
|
|
1319
|
+
} : (r = B.hsva.exec(e)) ? {
|
|
1237
1320
|
h: r[1],
|
|
1238
1321
|
s: r[2],
|
|
1239
1322
|
v: r[3],
|
|
1240
1323
|
a: r[4]
|
|
1241
|
-
} : (r =
|
|
1242
|
-
r:
|
|
1243
|
-
g:
|
|
1244
|
-
b:
|
|
1245
|
-
a:
|
|
1324
|
+
} : (r = B.hex8.exec(e)) ? {
|
|
1325
|
+
r: N(r[1]),
|
|
1326
|
+
g: N(r[2]),
|
|
1327
|
+
b: N(r[3]),
|
|
1328
|
+
a: Xe(r[4]),
|
|
1246
1329
|
format: t ? "name" : "hex8"
|
|
1247
|
-
} : (r =
|
|
1248
|
-
r:
|
|
1249
|
-
g:
|
|
1250
|
-
b:
|
|
1330
|
+
} : (r = B.hex6.exec(e)) ? {
|
|
1331
|
+
r: N(r[1]),
|
|
1332
|
+
g: N(r[2]),
|
|
1333
|
+
b: N(r[3]),
|
|
1251
1334
|
format: t ? "name" : "hex"
|
|
1252
|
-
} : (r =
|
|
1253
|
-
r:
|
|
1254
|
-
g:
|
|
1255
|
-
b:
|
|
1256
|
-
a:
|
|
1335
|
+
} : (r = B.hex4.exec(e)) ? {
|
|
1336
|
+
r: N(r[1] + "" + r[1]),
|
|
1337
|
+
g: N(r[2] + "" + r[2]),
|
|
1338
|
+
b: N(r[3] + "" + r[3]),
|
|
1339
|
+
a: Xe(r[4] + "" + r[4]),
|
|
1257
1340
|
format: t ? "name" : "hex8"
|
|
1258
|
-
} : (r =
|
|
1259
|
-
r:
|
|
1260
|
-
g:
|
|
1261
|
-
b:
|
|
1341
|
+
} : (r = B.hex3.exec(e)) ? {
|
|
1342
|
+
r: N(r[1] + "" + r[1]),
|
|
1343
|
+
g: N(r[2] + "" + r[2]),
|
|
1344
|
+
b: N(r[3] + "" + r[3]),
|
|
1262
1345
|
format: t ? "name" : "hex"
|
|
1263
1346
|
} : !1;
|
|
1264
1347
|
}
|
|
1265
|
-
function
|
|
1348
|
+
function fr(e) {
|
|
1266
1349
|
var t, r;
|
|
1267
1350
|
return e = e || {
|
|
1268
1351
|
level: "AA",
|
|
@@ -1272,114 +1355,232 @@ function Qt(e) {
|
|
|
1272
1355
|
size: r
|
|
1273
1356
|
};
|
|
1274
1357
|
}
|
|
1275
|
-
const
|
|
1276
|
-
primary: ["#
|
|
1277
|
-
secondary: ["#
|
|
1278
|
-
tertiary: ["#
|
|
1279
|
-
error: ["#
|
|
1280
|
-
surface: ["#fafafa", "#f5f5f5", "#e5e5e5", "#d4d4d4", "#a3a3a3", "#737373", "#525252", "#404040", "#262626", "#171717", "#
|
|
1281
|
-
},
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1358
|
+
const ot = {
|
|
1359
|
+
primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
|
|
1360
|
+
secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
|
|
1361
|
+
tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
|
|
1362
|
+
error: ["#ffeaea", "#fcd5d5", "#f2a8a9", "#ea7a7a", "#e25353", "#de3939", "#dd2b2b", "#c41e1f", "#af171a", "#9a0913", "#450a0a"],
|
|
1363
|
+
surface: ["#fafafa", "#f5f5f5", "#e5e5e5", "#d4d4d4", "#a3a3a3", "#737373", "#525252", "#404040", "#262626", "#171717", "#121212"]
|
|
1364
|
+
}, Te = {
|
|
1365
|
+
name: "dark",
|
|
1366
|
+
scheme: "dark",
|
|
1367
|
+
colors: ot
|
|
1368
|
+
}, hr = {
|
|
1369
|
+
name: "light",
|
|
1370
|
+
scheme: "light",
|
|
1371
|
+
colors: ot
|
|
1372
|
+
}, nn = Symbol("Notifications"), at = vt([]);
|
|
1373
|
+
function pr() {
|
|
1374
|
+
return at;
|
|
1375
|
+
}
|
|
1376
|
+
class on {
|
|
1289
1377
|
static show(t) {
|
|
1290
|
-
t.hash = Math.random().toString(36),
|
|
1378
|
+
t.hash = Math.random().toString(36), at.push(t);
|
|
1291
1379
|
}
|
|
1292
1380
|
}
|
|
1293
|
-
const
|
|
1381
|
+
const ze = [0.96, 0.907, 0.805, 0.697, 0.605, 0.547, 0.518, 0.445, 0.395, 0.34, 0.28], qe = [0.32, 0.16, 0.08, 0.04, 0, 0, 0.04, 0.08, 0.16, 0.32, 0.64];
|
|
1382
|
+
function mr(e) {
|
|
1383
|
+
const t = h(e).toHsl().l;
|
|
1384
|
+
return ze.reduce(
|
|
1385
|
+
(r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
|
|
1386
|
+
);
|
|
1387
|
+
}
|
|
1388
|
+
function gr(e) {
|
|
1389
|
+
const t = h(e), r = mr(t), n = ze.findIndex((a) => a === r), o = ze.map((a) => {
|
|
1390
|
+
const s = h({ h: t.toHsl().h, s: t.toHsl().s, l: a }), i = qe[n] - qe[n];
|
|
1391
|
+
return i >= 0 ? s.saturate(i * 100) : s.desaturate(i * -100), s;
|
|
1392
|
+
});
|
|
1393
|
+
return { baseColorIndex: n, colors: o.map((a) => a.toHexString()) };
|
|
1394
|
+
}
|
|
1395
|
+
function an(e) {
|
|
1396
|
+
return gr(e).colors;
|
|
1397
|
+
}
|
|
1398
|
+
function br() {
|
|
1399
|
+
if (typeof window > "u")
|
|
1400
|
+
return v("dark");
|
|
1401
|
+
const e = v(document.documentElement.dataset.scheme);
|
|
1402
|
+
return new MutationObserver((r) => {
|
|
1403
|
+
r.forEach((n) => {
|
|
1404
|
+
n.type === "attributes" && n.attributeName === "data-scheme" && (e.value = document.documentElement.dataset.scheme);
|
|
1405
|
+
});
|
|
1406
|
+
}).observe(document.documentElement, {
|
|
1407
|
+
attributes: !0,
|
|
1408
|
+
attributeFilter: ["data-scheme"]
|
|
1409
|
+
}), e;
|
|
1410
|
+
}
|
|
1411
|
+
function sn() {
|
|
1412
|
+
return et("currentThemeScheme", null);
|
|
1413
|
+
}
|
|
1414
|
+
function vr() {
|
|
1415
|
+
return et("currentTheme", v(Te));
|
|
1416
|
+
}
|
|
1417
|
+
function st(e, t = !0) {
|
|
1418
|
+
const r = v(e), n = v(e.scheme), o = br();
|
|
1419
|
+
X(() => {
|
|
1420
|
+
o.value && (n.value = o.value);
|
|
1421
|
+
}), Fe("currentTheme", r), Fe("currentThemeScheme", n);
|
|
1422
|
+
const s = {
|
|
1423
|
+
...Object.keys(r.value.colors).map((f) => {
|
|
1424
|
+
const u = f;
|
|
1425
|
+
return r.value.colors[u].reduce((b, k, S) => {
|
|
1426
|
+
const C = h(k).toRgb();
|
|
1427
|
+
return b[`--r-color-${u}-${S}`] = `${C.r} ${C.g} ${C.b}`, b;
|
|
1428
|
+
}, {});
|
|
1429
|
+
}).reduce((f, u) => ({
|
|
1430
|
+
...f,
|
|
1431
|
+
...u
|
|
1432
|
+
}), {})
|
|
1433
|
+
}, i = {
|
|
1434
|
+
"color-scheme": n.value,
|
|
1435
|
+
"font-family": "'Roboto', sans-serif",
|
|
1436
|
+
"background-color": "rgb(var(--r-color-surface-lowest))",
|
|
1437
|
+
color: "rgb(var(--r-color-surface-on))"
|
|
1438
|
+
}, c = m(() => {
|
|
1439
|
+
if (t)
|
|
1440
|
+
return {};
|
|
1441
|
+
switch (e.scheme) {
|
|
1442
|
+
case "dark":
|
|
1443
|
+
return {
|
|
1444
|
+
colorScheme: "dark",
|
|
1445
|
+
"--r-color-surface-on": "var(--r-color-surface-3)",
|
|
1446
|
+
"--r-color-surface-oninverted": "var(--r-color-surface-8)",
|
|
1447
|
+
"--r-color-surface-onlow": "var(--r-color-surface-4)",
|
|
1448
|
+
"--r-color-surface-onlowinverted": "var(--r-color-surface-7)",
|
|
1449
|
+
"--r-color-surface-lowest": "var(--r-color-surface-10)",
|
|
1450
|
+
"--r-color-surface-low": "var(--r-color-surface-9)",
|
|
1451
|
+
"--r-color-surface-base": "var(--r-color-surface-8)",
|
|
1452
|
+
"--r-color-surface-high": "var(--r-color-surface-7)",
|
|
1453
|
+
"--r-color-surface-highest": "var(--r-color-surface-6)",
|
|
1454
|
+
"--r-color-surface-border": "var(--r-color-surface-7)",
|
|
1455
|
+
"--r-color-primary-container": "var(--r-color-primary-8)",
|
|
1456
|
+
"--r-color-secondary-container": "var(--r-color-secondary-8)",
|
|
1457
|
+
"--r-color-tertiary-container": "var(--r-color-tertiary-8)",
|
|
1458
|
+
"--r-color-error-container": "var(--r-color-error-8)",
|
|
1459
|
+
"--r-color-primary-containerd": "var(--r-color-primary-9)",
|
|
1460
|
+
"--r-color-secondary-containerd": "var(--r-color-secondary-9)",
|
|
1461
|
+
"--r-color-tertiary-containerd": "var(--r-color-tertiary-9)",
|
|
1462
|
+
"--r-color-error-containerd": "var(--r-color-error-9)",
|
|
1463
|
+
"--r-color-primary-containerl": "var(--r-color-primary-6)",
|
|
1464
|
+
"--r-color-secondary-containerl": "var(--r-color-secondary-6)",
|
|
1465
|
+
"--r-color-tertiary-containerl": "var(--r-color-tertiary-6)",
|
|
1466
|
+
"--r-color-error-containerl": "var(--r-color-error-6)"
|
|
1467
|
+
};
|
|
1468
|
+
case "light":
|
|
1469
|
+
return {
|
|
1470
|
+
colorScheme: "light",
|
|
1471
|
+
"--r-color-surface-on": "var(--r-color-surface-7)",
|
|
1472
|
+
"--r-color-surface-oninverted": "var(--r-color-surface-2)",
|
|
1473
|
+
"--r-color-surface-onlow": "var(--r-color-surface-6)",
|
|
1474
|
+
"--r-color-surface-onlowinverted": "var(--r-color-surface-3)",
|
|
1475
|
+
"--r-color-surface-lowest": "var(--r-color-surface-3)",
|
|
1476
|
+
"--r-color-surface-low": "var(--r-color-surface-2)",
|
|
1477
|
+
"--r-color-surface-base": "var(--r-color-surface-1)",
|
|
1478
|
+
"--r-color-surface-high": "var(--r-color-surface-0)",
|
|
1479
|
+
"--r-color-surface-highest": "var(--r-color-surface-0)",
|
|
1480
|
+
"--r-color-surface-border": "var(--r-color-surface-4)",
|
|
1481
|
+
"--r-color-primary-container": "var(--r-color-primary-6)",
|
|
1482
|
+
"--r-color-secondary-container": "var(--r-color-secondary-6)",
|
|
1483
|
+
"--r-color-tertiary-container": "var(--r-color-tertiary-6)",
|
|
1484
|
+
"--r-color-error-container": "var(--r-color-error-6)",
|
|
1485
|
+
"--r-color-primary-containerd": "var(--r-color-primary-7)",
|
|
1486
|
+
"--r-color-secondary-containerd": "var(--r-color-secondary-7)",
|
|
1487
|
+
"--r-color-tertiary-containerd": "var(--r-color-tertiary-7)",
|
|
1488
|
+
"--r-color-error-containerd": "var(--r-color-error-7)",
|
|
1489
|
+
"--r-color-primary-containerl": "var(--r-color-primary-4)",
|
|
1490
|
+
"--r-color-secondary-containerl": "var(--r-color-secondary-4)",
|
|
1491
|
+
"--r-color-tertiary-containerl": "var(--r-color-tertiary-4)",
|
|
1492
|
+
"--r-color-error-containerl": "var(--r-color-error-4)"
|
|
1493
|
+
};
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
return {
|
|
1497
|
+
...s,
|
|
1498
|
+
...i,
|
|
1499
|
+
...c.value
|
|
1500
|
+
};
|
|
1501
|
+
}
|
|
1502
|
+
const ln = /* @__PURE__ */ $({
|
|
1294
1503
|
__name: "RokuProvider",
|
|
1295
1504
|
props: {
|
|
1296
1505
|
is: { default: "div" },
|
|
1297
1506
|
theme: { default() {
|
|
1298
|
-
return
|
|
1507
|
+
return typeof window > "u" || document.documentElement.dataset.scheme === "dark" ? Te : hr;
|
|
1299
1508
|
} }
|
|
1300
1509
|
},
|
|
1301
1510
|
setup(e) {
|
|
1302
|
-
const t = e, r =
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
};
|
|
1318
|
-
return rt("theme", t.theme), (s, a) => (g(), L(xe(s.is), { style: n }, {
|
|
1319
|
-
default: ce(() => [
|
|
1320
|
-
P(s.$slots, "default")
|
|
1511
|
+
const t = e, r = v(0), n = v(0);
|
|
1512
|
+
be && new ResizeObserver(() => {
|
|
1513
|
+
const i = window.innerWidth - document.body.clientWidth;
|
|
1514
|
+
i !== 0 && (r.value = i), n.value = i;
|
|
1515
|
+
}).observe(document.body);
|
|
1516
|
+
const o = m(() => n.value === r.value ? "0px" : `${r.value}px`), a = st(t.theme);
|
|
1517
|
+
return (s, i) => (g(), D(_e(s.is), {
|
|
1518
|
+
style: T([
|
|
1519
|
+
l(a),
|
|
1520
|
+
{ paddingRight: l(o) }
|
|
1521
|
+
]),
|
|
1522
|
+
class: "text-surface-on transition-background-color,border-color,color"
|
|
1523
|
+
}, {
|
|
1524
|
+
default: J(() => [
|
|
1525
|
+
H(s.$slots, "default")
|
|
1321
1526
|
]),
|
|
1322
1527
|
_: 3
|
|
1323
|
-
}));
|
|
1528
|
+
}, 8, ["style"]));
|
|
1324
1529
|
}
|
|
1325
|
-
}),
|
|
1530
|
+
}), yr = { class: "w-full flex items-center" }, wr = ["placeholder", "value"], _r = /* @__PURE__ */ M("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), xr = {
|
|
1326
1531
|
key: 0,
|
|
1327
1532
|
class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
|
|
1328
|
-
},
|
|
1329
|
-
|
|
1330
|
-
],
|
|
1533
|
+
}, kr = ["onPointerdown", "onHover"], Mr = { key: 0 }, Sr = /* @__PURE__ */ M("i", { class: "i-tabler-check h-3 w-3" }, null, -1), Ar = [
|
|
1534
|
+
Sr
|
|
1535
|
+
], cn = /* @__PURE__ */ $({
|
|
1331
1536
|
__name: "Select",
|
|
1332
|
-
props: {
|
|
1537
|
+
props: /* @__PURE__ */ ee({
|
|
1333
1538
|
options: { default() {
|
|
1334
1539
|
return [];
|
|
1335
1540
|
} },
|
|
1336
|
-
modelValue: { default: void 0 },
|
|
1337
1541
|
size: { default: "md" },
|
|
1338
|
-
noneText: { default: "No options" }
|
|
1339
|
-
|
|
1340
|
-
|
|
1542
|
+
noneText: { default: "No options" },
|
|
1543
|
+
placeholder: { default: "" }
|
|
1544
|
+
}, {
|
|
1545
|
+
modelValue: { default: void 0 },
|
|
1546
|
+
modelModifiers: {}
|
|
1547
|
+
}),
|
|
1548
|
+
emits: /* @__PURE__ */ ee(["change"], ["update:modelValue"]),
|
|
1341
1549
|
setup(e, { emit: t }) {
|
|
1342
|
-
const r = e, n = t, s = m(
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
}), a = k(null), o = k(null), { focused: i } = xt(a), l = m(() => r.options.map((x) => _(x)).indexOf(s.value)), d = k(-1), u = k(-1);
|
|
1350
|
-
oe(() => {
|
|
1351
|
-
i.value || (u.value = -1);
|
|
1352
|
-
}), oe(() => {
|
|
1353
|
-
s.value = _(r.options[l.value]);
|
|
1354
|
-
}), ae(s, () => {
|
|
1355
|
-
n("change", s.value);
|
|
1550
|
+
const r = e, n = t, o = me(e, "modelValue"), a = v(null), s = v(null), { focused: i } = It(a), c = m(() => r.options.map((_) => S(_)).indexOf(o.value)), d = v(-1), f = v(-1);
|
|
1551
|
+
X(() => {
|
|
1552
|
+
i.value || (f.value = -1);
|
|
1553
|
+
}), X(() => {
|
|
1554
|
+
o.value = S(r.options[c.value]);
|
|
1555
|
+
}), ie(o, () => {
|
|
1556
|
+
n("change", o.value);
|
|
1356
1557
|
});
|
|
1357
|
-
const
|
|
1358
|
-
function
|
|
1359
|
-
if (
|
|
1360
|
-
return typeof
|
|
1558
|
+
const u = r.options, p = m(() => u[c.value]), b = m(() => k(p.value));
|
|
1559
|
+
function k(_) {
|
|
1560
|
+
if (_)
|
|
1561
|
+
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.label;
|
|
1361
1562
|
}
|
|
1362
|
-
function _
|
|
1363
|
-
if (
|
|
1364
|
-
return typeof
|
|
1563
|
+
function S(_) {
|
|
1564
|
+
if (_)
|
|
1565
|
+
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.id;
|
|
1365
1566
|
}
|
|
1366
|
-
|
|
1367
|
-
i.value && (
|
|
1368
|
-
}),
|
|
1369
|
-
i.value && (
|
|
1370
|
-
}),
|
|
1371
|
-
i.value &&
|
|
1567
|
+
Ae("ArrowDown", (_) => {
|
|
1568
|
+
i.value && (_.preventDefault(), f.value = (f.value + 1) % u.length);
|
|
1569
|
+
}), Ae("ArrowUp", (_) => {
|
|
1570
|
+
i.value && (_.preventDefault(), f.value = (f.value - 1 + u.length) % u.length);
|
|
1571
|
+
}), Ae("Enter", () => {
|
|
1572
|
+
i.value && f.value !== -1 && (o.value = S(u[f.value]), i.value = !1);
|
|
1372
1573
|
});
|
|
1373
|
-
function
|
|
1574
|
+
function C(_) {
|
|
1374
1575
|
if (!i.value) {
|
|
1375
1576
|
i.value = !0;
|
|
1376
1577
|
return;
|
|
1377
1578
|
}
|
|
1378
|
-
|
|
1579
|
+
o.value = S(_), i.value = !1;
|
|
1379
1580
|
}
|
|
1380
|
-
const
|
|
1381
|
-
input: "container-
|
|
1382
|
-
})),
|
|
1581
|
+
const le = m(() => ({
|
|
1582
|
+
input: "container-base focus:border-primary-container"
|
|
1583
|
+
})), ce = m(() => {
|
|
1383
1584
|
switch (r.size) {
|
|
1384
1585
|
case "sm":
|
|
1385
1586
|
return {
|
|
@@ -1398,45 +1599,45 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1398
1599
|
};
|
|
1399
1600
|
}
|
|
1400
1601
|
});
|
|
1401
|
-
return (
|
|
1602
|
+
return (_, O) => (g(), y("div", {
|
|
1402
1603
|
ref_key: "wrapperRef",
|
|
1403
|
-
ref:
|
|
1604
|
+
ref: s,
|
|
1404
1605
|
class: "r-select-wrapper relative"
|
|
1405
1606
|
}, [
|
|
1406
|
-
|
|
1407
|
-
|
|
1607
|
+
M("div", yr, [
|
|
1608
|
+
M("input", {
|
|
1408
1609
|
ref_key: "inputRef",
|
|
1409
1610
|
ref: a,
|
|
1410
|
-
class: w([[
|
|
1411
|
-
placeholder:
|
|
1611
|
+
class: w([[l(le).input, l(ce).wrapper], "r-select-input cursor-pointer border rounded outline-none"]),
|
|
1612
|
+
placeholder: _.placeholder,
|
|
1412
1613
|
readonly: "",
|
|
1413
|
-
value:
|
|
1614
|
+
value: l(b),
|
|
1414
1615
|
"aria-haspopup": "listbox",
|
|
1415
1616
|
autocomplete: "off",
|
|
1416
|
-
onFocus:
|
|
1417
|
-
}, null, 42,
|
|
1418
|
-
|
|
1617
|
+
onFocus: O[0] || (O[0] = (j) => i.value = !0)
|
|
1618
|
+
}, null, 42, wr),
|
|
1619
|
+
_r
|
|
1419
1620
|
]),
|
|
1420
|
-
|
|
1621
|
+
l(i) ? (g(), y("div", {
|
|
1421
1622
|
key: 0,
|
|
1422
|
-
class: w([
|
|
1623
|
+
class: w([l(ce).dropdown, "absolute z-1 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])
|
|
1423
1624
|
}, [
|
|
1424
|
-
|
|
1425
|
-
key:
|
|
1625
|
+
l(u).length === 0 ? (g(), y("div", xr, re(_.noneText), 1)) : (g(!0), y(te, { key: 1 }, fe(l(u), (j, A) => (g(), y("div", {
|
|
1626
|
+
key: S(j),
|
|
1426
1627
|
class: w([{
|
|
1427
|
-
"hover:bg-surface-
|
|
1428
|
-
"container-filled-primary":
|
|
1628
|
+
"hover:bg-surface-high": l(f) !== A,
|
|
1629
|
+
"container-filled-primary": l(f) === A
|
|
1429
1630
|
}, "flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),
|
|
1430
|
-
onPointerdown: (
|
|
1431
|
-
onHover: (
|
|
1631
|
+
onPointerdown: (R) => C(j),
|
|
1632
|
+
onHover: (R) => d.value = A
|
|
1432
1633
|
}, [
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
], 42,
|
|
1436
|
-
], 2)) :
|
|
1634
|
+
yt(re(k(j)) + " ", 1),
|
|
1635
|
+
j === l(p) ? (g(), y("div", Mr, Ar)) : z("", !0)
|
|
1636
|
+
], 42, kr))), 128))
|
|
1637
|
+
], 2)) : z("", !0)
|
|
1437
1638
|
], 512));
|
|
1438
1639
|
}
|
|
1439
|
-
}),
|
|
1640
|
+
}), Cr = ["value", "placeholder", "type"], $r = /* @__PURE__ */ $({
|
|
1440
1641
|
__name: "TextField",
|
|
1441
1642
|
props: {
|
|
1442
1643
|
modelValue: {},
|
|
@@ -1445,54 +1646,70 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1445
1646
|
error: { type: Boolean },
|
|
1446
1647
|
disabled: { type: Boolean },
|
|
1447
1648
|
rounded: { default: "md" },
|
|
1649
|
+
size: { default: "md" },
|
|
1448
1650
|
password: { type: Boolean },
|
|
1449
1651
|
placeholder: {}
|
|
1450
1652
|
},
|
|
1451
1653
|
emits: ["change", "update:modelValue", "input", "click", "pointerdown", "pointerup"],
|
|
1452
1654
|
setup(e, { expose: t, emit: r }) {
|
|
1453
|
-
const n = e,
|
|
1655
|
+
const n = e, o = r, a = m(() => {
|
|
1656
|
+
switch (n.size) {
|
|
1657
|
+
case "sm":
|
|
1658
|
+
return {
|
|
1659
|
+
base: "h-6 px-2 py-1 text-xs"
|
|
1660
|
+
};
|
|
1661
|
+
case "md":
|
|
1662
|
+
return {
|
|
1663
|
+
base: "h-8 px-3 py-1 text-sm"
|
|
1664
|
+
};
|
|
1665
|
+
case "lg":
|
|
1666
|
+
return {
|
|
1667
|
+
base: "h-10 px-4 py-2 text-base"
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
}), s = m(() => {
|
|
1454
1671
|
if (n.error)
|
|
1455
|
-
return "text-error-
|
|
1672
|
+
return "text-error-container bg-surface-base border-error-container focus:border-error-container";
|
|
1456
1673
|
switch (n.color) {
|
|
1457
1674
|
case "secondary":
|
|
1458
|
-
return "text-surface-
|
|
1675
|
+
return "text-surface-on bg-surface-base border-surface-border-base focus:border-secondary-container";
|
|
1459
1676
|
case "tertiary":
|
|
1460
|
-
return "text-surface-
|
|
1677
|
+
return "text-surface-on bg-surface-base border-surface-border-base focus:border-tertiary-container";
|
|
1461
1678
|
case "error":
|
|
1462
|
-
return "text-surface-
|
|
1679
|
+
return "text-surface-on bg-surface-base border-surface-border-base focus:border-error-container";
|
|
1463
1680
|
case "primary":
|
|
1464
1681
|
default:
|
|
1465
|
-
return "text-surface-
|
|
1682
|
+
return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
|
|
1466
1683
|
}
|
|
1467
|
-
}),
|
|
1468
|
-
function
|
|
1469
|
-
var
|
|
1470
|
-
|
|
1684
|
+
}), i = m(() => n.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), c = ge(n), d = v(null);
|
|
1685
|
+
function f(u) {
|
|
1686
|
+
var p;
|
|
1687
|
+
o("update:modelValue", ((p = u.target) == null ? void 0 : p.value) ?? ""), o("input", u);
|
|
1471
1688
|
}
|
|
1472
1689
|
return t({
|
|
1473
|
-
el:
|
|
1474
|
-
}), (u,
|
|
1690
|
+
el: d
|
|
1691
|
+
}), (u, p) => (g(), y("input", {
|
|
1475
1692
|
ref_key: "input",
|
|
1476
|
-
ref:
|
|
1693
|
+
ref: d,
|
|
1477
1694
|
value: u.modelValue,
|
|
1478
|
-
class: w(["bg-back-2 border px-2 py-1 outline-none", [
|
|
1479
|
-
style:
|
|
1695
|
+
class: w(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [l(s), l(i), l(c).class, l(a).base]]),
|
|
1696
|
+
style: T([l(c).style]),
|
|
1480
1697
|
placeholder: u.placeholder,
|
|
1481
1698
|
type: n.password ? "password" : "text",
|
|
1482
|
-
onChange:
|
|
1483
|
-
onInput:
|
|
1484
|
-
onClick:
|
|
1485
|
-
onPointerdown:
|
|
1486
|
-
onPointerup:
|
|
1487
|
-
}, null, 46,
|
|
1699
|
+
onChange: p[0] || (p[0] = (b) => u.$emit("change", b)),
|
|
1700
|
+
onInput: f,
|
|
1701
|
+
onClick: p[1] || (p[1] = (b) => u.$emit("click", b)),
|
|
1702
|
+
onPointerdown: p[2] || (p[2] = (b) => u.$emit("pointerdown", b)),
|
|
1703
|
+
onPointerup: p[3] || (p[3] = (b) => u.$emit("pointerup", b))
|
|
1704
|
+
}, null, 46, Cr));
|
|
1488
1705
|
}
|
|
1489
|
-
}),
|
|
1706
|
+
}), Tr = {
|
|
1490
1707
|
key: 0,
|
|
1491
|
-
class: "i-tabler-loader-2 h-
|
|
1492
|
-
},
|
|
1708
|
+
class: "i-tabler-loader-2 h-container w-container shrink-0 animate-spin"
|
|
1709
|
+
}, zr = { key: 1 }, Rr = { class: "grow-1" }, Er = {
|
|
1493
1710
|
key: 1,
|
|
1494
|
-
class: "text-sm text-surface-
|
|
1495
|
-
},
|
|
1711
|
+
class: "text-sm text-surface-container"
|
|
1712
|
+
}, Pr = /* @__PURE__ */ M("i", { class: "i-tabler-x" }, null, -1), Nr = /* @__PURE__ */ $({
|
|
1496
1713
|
__name: "Notification",
|
|
1497
1714
|
props: {
|
|
1498
1715
|
title: {},
|
|
@@ -1508,92 +1725,102 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1508
1725
|
const t = e, r = m(() => {
|
|
1509
1726
|
switch (t.color) {
|
|
1510
1727
|
case "secondary":
|
|
1511
|
-
return "bg-secondary-
|
|
1728
|
+
return "bg-secondary-container";
|
|
1512
1729
|
case "tertiary":
|
|
1513
|
-
return "bg-tertiary-
|
|
1730
|
+
return "bg-tertiary-container";
|
|
1514
1731
|
case "error":
|
|
1515
|
-
return "bg-error-
|
|
1732
|
+
return "bg-error-container";
|
|
1516
1733
|
default:
|
|
1517
|
-
return "bg-primary-
|
|
1734
|
+
return "bg-primary-container";
|
|
1518
1735
|
}
|
|
1519
1736
|
}), n = m(() => {
|
|
1520
1737
|
switch (t.color) {
|
|
1521
1738
|
case "secondary":
|
|
1522
|
-
return "text-secondary-
|
|
1739
|
+
return "text-secondary-container";
|
|
1523
1740
|
case "tertiary":
|
|
1524
|
-
return "text-tertiary-
|
|
1741
|
+
return "text-tertiary-container";
|
|
1525
1742
|
case "error":
|
|
1526
|
-
return "text-error-
|
|
1743
|
+
return "text-error-container";
|
|
1527
1744
|
default:
|
|
1528
|
-
return "text-primary-
|
|
1745
|
+
return "text-primary-container";
|
|
1529
1746
|
}
|
|
1530
1747
|
});
|
|
1531
|
-
return (
|
|
1532
|
-
const
|
|
1748
|
+
return (o, a) => {
|
|
1749
|
+
const s = St;
|
|
1533
1750
|
return g(), y("div", {
|
|
1534
|
-
class: w(["relative max-w-100 min-h-16 min-w-80 w-full flex items-center gap-2 container-
|
|
1535
|
-
{ "border-0": !
|
|
1751
|
+
class: w(["relative max-w-100 min-h-16 min-w-80 w-full flex items-center gap-2 container-low rounded p-3", [
|
|
1752
|
+
{ "border-0": !o.withBorder }
|
|
1536
1753
|
]])
|
|
1537
1754
|
}, [
|
|
1538
|
-
|
|
1755
|
+
o.icon ? (g(), y("div", {
|
|
1539
1756
|
key: 0,
|
|
1540
|
-
class: w(["leading-0",
|
|
1757
|
+
class: w(["leading-0", l(n)])
|
|
1541
1758
|
}, [
|
|
1542
|
-
|
|
1759
|
+
o.loading ? (g(), y("i", Tr)) : (g(), y("i", {
|
|
1543
1760
|
key: 1,
|
|
1544
|
-
class: w(["h-
|
|
1761
|
+
class: w(["h-container w-container shrink-0", o.icon])
|
|
1545
1762
|
}, null, 2))
|
|
1546
|
-
], 2)) : (g(), y("div",
|
|
1547
|
-
|
|
1763
|
+
], 2)) : (g(), y("div", zr, [
|
|
1764
|
+
M("div", {
|
|
1548
1765
|
class: w(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
|
|
1549
|
-
"animate-pulse":
|
|
1550
|
-
},
|
|
1766
|
+
"animate-pulse": o.loading
|
|
1767
|
+
}, l(r)]])
|
|
1551
1768
|
}, null, 2)
|
|
1552
1769
|
])),
|
|
1553
|
-
|
|
1554
|
-
|
|
1770
|
+
M("div", Rr, [
|
|
1771
|
+
o.title ? (g(), y("div", {
|
|
1555
1772
|
key: 0,
|
|
1556
|
-
class: w([
|
|
1557
|
-
},
|
|
1558
|
-
|
|
1773
|
+
class: w([l(n), "text-base"])
|
|
1774
|
+
}, re(o.title), 3)) : z("", !0),
|
|
1775
|
+
o.message ? (g(), y("div", Er, re(o.message), 1)) : z("", !0)
|
|
1559
1776
|
]),
|
|
1560
|
-
|
|
1777
|
+
o.closeable ? (g(), D(s, {
|
|
1561
1778
|
key: 2,
|
|
1562
1779
|
icon: "",
|
|
1563
1780
|
variant: "transparent",
|
|
1564
|
-
class: "text-
|
|
1565
|
-
onClick: a[0] || (a[0] = (i) =>
|
|
1781
|
+
class: "text-surface-on hover:text-surface-on",
|
|
1782
|
+
onClick: a[0] || (a[0] = (i) => o.$emit("close"))
|
|
1566
1783
|
}, {
|
|
1567
|
-
default:
|
|
1568
|
-
|
|
1784
|
+
default: J(() => [
|
|
1785
|
+
Pr
|
|
1569
1786
|
]),
|
|
1570
1787
|
_: 1
|
|
1571
|
-
})) :
|
|
1788
|
+
})) : z("", !0)
|
|
1572
1789
|
], 2);
|
|
1573
1790
|
};
|
|
1574
1791
|
}
|
|
1575
|
-
}),
|
|
1576
|
-
__name: "
|
|
1792
|
+
}), Hr = ["data-scheme", "data-theme"], Ir = /* @__PURE__ */ $({
|
|
1793
|
+
__name: "ThemeProvider",
|
|
1577
1794
|
props: {
|
|
1578
|
-
|
|
1795
|
+
theme: {}
|
|
1796
|
+
},
|
|
1797
|
+
setup(e) {
|
|
1798
|
+
const r = st(e.theme, !1);
|
|
1799
|
+
return (n, o) => (g(), y("div", {
|
|
1800
|
+
style: T([l(r)]),
|
|
1801
|
+
"data-scheme": n.theme.scheme,
|
|
1802
|
+
"data-theme": n.theme.name
|
|
1803
|
+
}, [
|
|
1804
|
+
H(n.$slots, "default")
|
|
1805
|
+
], 12, Hr));
|
|
1806
|
+
}
|
|
1807
|
+
}), un = /* @__PURE__ */ $({
|
|
1808
|
+
__name: "Modal",
|
|
1809
|
+
props: /* @__PURE__ */ ee({
|
|
1579
1810
|
persistent: { type: Boolean, default: !1 },
|
|
1580
1811
|
blur: { type: [String, Boolean] }
|
|
1581
|
-
},
|
|
1812
|
+
}, {
|
|
1813
|
+
modelValue: { type: Boolean },
|
|
1814
|
+
modelModifiers: {}
|
|
1815
|
+
}),
|
|
1582
1816
|
emits: ["update:modelValue"],
|
|
1583
|
-
setup(e
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
},
|
|
1588
|
-
set(l) {
|
|
1589
|
-
n("update:modelValue", l);
|
|
1590
|
-
}
|
|
1591
|
-
}), a = k(null);
|
|
1592
|
-
function o(l) {
|
|
1593
|
-
r.persistent || l.target === a.value && (s.value = !1);
|
|
1817
|
+
setup(e) {
|
|
1818
|
+
const t = e, r = me(e, "modelValue"), n = v(null);
|
|
1819
|
+
function o(i) {
|
|
1820
|
+
t.persistent || i.target === n.value && (r.value = !1);
|
|
1594
1821
|
}
|
|
1595
|
-
const
|
|
1596
|
-
switch (
|
|
1822
|
+
const a = m(() => {
|
|
1823
|
+
switch (t.blur) {
|
|
1597
1824
|
case "sm":
|
|
1598
1825
|
return "backdrop-blur-sm";
|
|
1599
1826
|
case "md":
|
|
@@ -1605,140 +1832,150 @@ const Ir = /* @__PURE__ */ R({
|
|
|
1605
1832
|
return "";
|
|
1606
1833
|
}
|
|
1607
1834
|
});
|
|
1608
|
-
|
|
1609
|
-
r.
|
|
1610
|
-
document.body.style.overflow = "", document.body.style.marginRight = "";
|
|
1835
|
+
X(() => {
|
|
1836
|
+
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1837
|
+
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1611
1838
|
}, 300);
|
|
1612
|
-
})
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1839
|
+
});
|
|
1840
|
+
const s = vr();
|
|
1841
|
+
return (i, c) => {
|
|
1842
|
+
const d = Ir;
|
|
1843
|
+
return g(), D(wt, { to: "body" }, [
|
|
1844
|
+
We(d, { theme: l(s) }, {
|
|
1845
|
+
default: J(() => [
|
|
1846
|
+
M("div", {
|
|
1847
|
+
ref_key: "wrapperRef",
|
|
1848
|
+
ref: n,
|
|
1849
|
+
class: w(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full flex items-end justify-center bg-surface-lowest/50 transition-all duration-300 md:items-center", [a.value, {
|
|
1850
|
+
"op0 pointer-events-none": !r.value,
|
|
1851
|
+
op100: r.value
|
|
1852
|
+
}]]),
|
|
1853
|
+
onClick: o
|
|
1854
|
+
}, [
|
|
1855
|
+
We(_t, {
|
|
1856
|
+
"enter-from-class": "translate-y-1/2",
|
|
1857
|
+
"enter-to-class": "translate-y-0",
|
|
1858
|
+
"leave-from-class": "translate-y-0",
|
|
1859
|
+
"leave-to-class": "translate-y-1/2",
|
|
1860
|
+
"enter-active-class": "transition ease-out duration-300",
|
|
1861
|
+
"leave-active-class": "transition ease-in duration-200"
|
|
1862
|
+
}, {
|
|
1863
|
+
default: J(() => [
|
|
1864
|
+
r.value ? H(i.$slots, "default", { key: 0 }) : z("", !0)
|
|
1865
|
+
]),
|
|
1866
|
+
_: 3
|
|
1867
|
+
})
|
|
1868
|
+
], 2)
|
|
1632
1869
|
]),
|
|
1633
1870
|
_: 3
|
|
1634
|
-
})
|
|
1635
|
-
]
|
|
1636
|
-
|
|
1871
|
+
}, 8, ["theme"])
|
|
1872
|
+
]);
|
|
1873
|
+
};
|
|
1637
1874
|
}
|
|
1638
|
-
}),
|
|
1639
|
-
let
|
|
1640
|
-
const
|
|
1641
|
-
const t =
|
|
1642
|
-
t && t.forEach((r) =>
|
|
1643
|
-
},
|
|
1875
|
+
}), it = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakSet();
|
|
1876
|
+
let U, Ie = 0, Oe = 0;
|
|
1877
|
+
const L = "__aa_tgt", he = "__aa_del", we = "__aa_new", Br = (e) => {
|
|
1878
|
+
const t = Dr(e);
|
|
1879
|
+
t && t.forEach((r) => jr(r));
|
|
1880
|
+
}, Vr = (e) => {
|
|
1644
1881
|
e.forEach((t) => {
|
|
1645
|
-
t.target ===
|
|
1882
|
+
t.target === U && Wr(), P.has(t.target) && Q(t.target);
|
|
1646
1883
|
});
|
|
1647
1884
|
};
|
|
1648
|
-
function
|
|
1649
|
-
const t =
|
|
1885
|
+
function Fr(e) {
|
|
1886
|
+
const t = Re.get(e);
|
|
1650
1887
|
t == null || t.disconnect();
|
|
1651
|
-
let r =
|
|
1652
|
-
const
|
|
1653
|
-
r || (r =
|
|
1654
|
-
const { offsetWidth: a, offsetHeight:
|
|
1655
|
-
r.top -
|
|
1656
|
-
a - (r.left +
|
|
1657
|
-
|
|
1658
|
-
r.left -
|
|
1659
|
-
].map((
|
|
1660
|
-
++n > 1 &&
|
|
1888
|
+
let r = P.get(e), n = 0;
|
|
1889
|
+
const o = 5;
|
|
1890
|
+
r || (r = ae(e), P.set(e, r));
|
|
1891
|
+
const { offsetWidth: a, offsetHeight: s } = U, c = [
|
|
1892
|
+
r.top - o,
|
|
1893
|
+
a - (r.left + o + r.width),
|
|
1894
|
+
s - (r.top + o + r.height),
|
|
1895
|
+
r.left - o
|
|
1896
|
+
].map((f) => `${-1 * Math.floor(f)}px`).join(" "), d = new IntersectionObserver(() => {
|
|
1897
|
+
++n > 1 && Q(e);
|
|
1661
1898
|
}, {
|
|
1662
|
-
root:
|
|
1899
|
+
root: U,
|
|
1663
1900
|
threshold: 1,
|
|
1664
|
-
rootMargin:
|
|
1901
|
+
rootMargin: c
|
|
1665
1902
|
});
|
|
1666
|
-
d.observe(e),
|
|
1903
|
+
d.observe(e), Re.set(e, d);
|
|
1667
1904
|
}
|
|
1668
|
-
function
|
|
1669
|
-
clearTimeout(
|
|
1670
|
-
const t =
|
|
1671
|
-
|
|
1672
|
-
const n =
|
|
1905
|
+
function Q(e) {
|
|
1906
|
+
clearTimeout(ye.get(e));
|
|
1907
|
+
const t = Me(e), r = pe(t) ? 500 : t.duration;
|
|
1908
|
+
ye.set(e, setTimeout(async () => {
|
|
1909
|
+
const n = K.get(e);
|
|
1673
1910
|
try {
|
|
1674
|
-
await (n == null ? void 0 : n.finished),
|
|
1911
|
+
await (n == null ? void 0 : n.finished), P.set(e, ae(e)), Fr(e);
|
|
1675
1912
|
} catch {
|
|
1676
1913
|
}
|
|
1677
1914
|
}, r));
|
|
1678
1915
|
}
|
|
1679
|
-
function
|
|
1680
|
-
clearTimeout(
|
|
1681
|
-
|
|
1916
|
+
function Wr() {
|
|
1917
|
+
clearTimeout(ye.get(U)), ye.set(U, setTimeout(() => {
|
|
1918
|
+
it.forEach((e) => dt(e, (t) => lt(() => Q(t))));
|
|
1682
1919
|
}, 100));
|
|
1683
1920
|
}
|
|
1684
|
-
function
|
|
1921
|
+
function Lr(e) {
|
|
1685
1922
|
setTimeout(() => {
|
|
1686
|
-
|
|
1923
|
+
Or.set(e, setInterval(() => lt(Q.bind(null, e)), 2e3));
|
|
1687
1924
|
}, Math.round(2e3 * Math.random()));
|
|
1688
1925
|
}
|
|
1689
|
-
function
|
|
1926
|
+
function lt(e) {
|
|
1690
1927
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
1691
1928
|
}
|
|
1692
|
-
let
|
|
1693
|
-
typeof window < "u" && (
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
1696
|
-
function
|
|
1697
|
-
return e.reduce((n,
|
|
1929
|
+
let Ee, Z;
|
|
1930
|
+
typeof window < "u" && (U = document.documentElement, Ee = new MutationObserver(Br), Z = new ResizeObserver(Vr), window.addEventListener("scroll", () => {
|
|
1931
|
+
Oe = window.scrollY, Ie = window.scrollX;
|
|
1932
|
+
}), Z.observe(U));
|
|
1933
|
+
function Dr(e) {
|
|
1934
|
+
return e.reduce((n, o) => [
|
|
1698
1935
|
...n,
|
|
1699
|
-
...Array.from(
|
|
1700
|
-
...Array.from(
|
|
1701
|
-
], []).every((n) => n.nodeName === "#comment") ? !1 : e.reduce((n,
|
|
1936
|
+
...Array.from(o.addedNodes),
|
|
1937
|
+
...Array.from(o.removedNodes)
|
|
1938
|
+
], []).every((n) => n.nodeName === "#comment") ? !1 : e.reduce((n, o) => {
|
|
1702
1939
|
if (n === !1)
|
|
1703
1940
|
return !1;
|
|
1704
|
-
if (
|
|
1705
|
-
if (
|
|
1706
|
-
n.add(
|
|
1707
|
-
for (let a = 0; a <
|
|
1708
|
-
const
|
|
1709
|
-
if (
|
|
1710
|
-
if (
|
|
1941
|
+
if (o.target instanceof Element) {
|
|
1942
|
+
if (Ce(o.target), !n.has(o.target)) {
|
|
1943
|
+
n.add(o.target);
|
|
1944
|
+
for (let a = 0; a < o.target.children.length; a++) {
|
|
1945
|
+
const s = o.target.children.item(a);
|
|
1946
|
+
if (s) {
|
|
1947
|
+
if (he in s)
|
|
1711
1948
|
return !1;
|
|
1712
|
-
|
|
1949
|
+
Ce(o.target, s), n.add(s);
|
|
1713
1950
|
}
|
|
1714
1951
|
}
|
|
1715
1952
|
}
|
|
1716
|
-
if (
|
|
1717
|
-
for (let a = 0; a <
|
|
1718
|
-
const
|
|
1719
|
-
if (
|
|
1953
|
+
if (o.removedNodes.length)
|
|
1954
|
+
for (let a = 0; a < o.removedNodes.length; a++) {
|
|
1955
|
+
const s = o.removedNodes[a];
|
|
1956
|
+
if (he in s)
|
|
1720
1957
|
return !1;
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1958
|
+
s instanceof Element && (n.add(s), Ce(o.target, s), ne.set(s, [
|
|
1959
|
+
o.previousSibling,
|
|
1960
|
+
o.nextSibling
|
|
1724
1961
|
]));
|
|
1725
1962
|
}
|
|
1726
1963
|
}
|
|
1727
1964
|
return n;
|
|
1728
1965
|
}, /* @__PURE__ */ new Set());
|
|
1729
1966
|
}
|
|
1730
|
-
function
|
|
1731
|
-
!t && !(
|
|
1967
|
+
function Ce(e, t) {
|
|
1968
|
+
!t && !(L in e) ? Object.defineProperty(e, L, { value: e }) : t && !(L in t) && Object.defineProperty(t, L, { value: e });
|
|
1732
1969
|
}
|
|
1733
|
-
function
|
|
1970
|
+
function jr(e) {
|
|
1734
1971
|
var t;
|
|
1735
|
-
const r = e.isConnected, n =
|
|
1736
|
-
r &&
|
|
1972
|
+
const r = e.isConnected, n = P.has(e);
|
|
1973
|
+
r && ne.has(e) && ne.delete(e), K.has(e) && ((t = K.get(e)) === null || t === void 0 || t.cancel()), we in e ? Ye(e) : n && r ? Ur(e) : n && !r ? Xr(e) : Ye(e);
|
|
1737
1974
|
}
|
|
1738
|
-
function
|
|
1975
|
+
function F(e) {
|
|
1739
1976
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
1740
1977
|
}
|
|
1741
|
-
function
|
|
1978
|
+
function Gr(e) {
|
|
1742
1979
|
let t = e.parentElement;
|
|
1743
1980
|
for (; t; ) {
|
|
1744
1981
|
if (t.scrollLeft || t.scrollTop)
|
|
@@ -1747,8 +1984,8 @@ function Mr(e) {
|
|
|
1747
1984
|
}
|
|
1748
1985
|
return { x: 0, y: 0 };
|
|
1749
1986
|
}
|
|
1750
|
-
function
|
|
1751
|
-
const t = e.getBoundingClientRect(), { x: r, y: n } =
|
|
1987
|
+
function ae(e) {
|
|
1988
|
+
const t = e.getBoundingClientRect(), { x: r, y: n } = Gr(e);
|
|
1752
1989
|
return {
|
|
1753
1990
|
top: t.top + n,
|
|
1754
1991
|
left: t.left + r,
|
|
@@ -1756,69 +1993,69 @@ function Q(e) {
|
|
|
1756
1993
|
height: t.height
|
|
1757
1994
|
};
|
|
1758
1995
|
}
|
|
1759
|
-
function
|
|
1760
|
-
let n = t.width,
|
|
1996
|
+
function ct(e, t, r) {
|
|
1997
|
+
let n = t.width, o = t.height, a = r.width, s = r.height;
|
|
1761
1998
|
const i = getComputedStyle(e);
|
|
1762
1999
|
if (i.getPropertyValue("box-sizing") === "content-box") {
|
|
1763
|
-
const d =
|
|
1764
|
-
n -=
|
|
2000
|
+
const d = F(i.paddingTop) + F(i.paddingBottom) + F(i.borderTopWidth) + F(i.borderBottomWidth), f = F(i.paddingLeft) + F(i.paddingRight) + F(i.borderRightWidth) + F(i.borderLeftWidth);
|
|
2001
|
+
n -= f, a -= f, o -= d, s -= d;
|
|
1765
2002
|
}
|
|
1766
|
-
return [n, a,
|
|
2003
|
+
return [n, a, o, s].map(Math.round);
|
|
1767
2004
|
}
|
|
1768
|
-
function
|
|
1769
|
-
return
|
|
2005
|
+
function Me(e) {
|
|
2006
|
+
return L in e && oe.has(e[L]) ? oe.get(e[L]) : { duration: 250, easing: "ease-in-out" };
|
|
1770
2007
|
}
|
|
1771
|
-
function
|
|
1772
|
-
if (
|
|
1773
|
-
return e[
|
|
2008
|
+
function ut(e) {
|
|
2009
|
+
if (L in e)
|
|
2010
|
+
return e[L];
|
|
1774
2011
|
}
|
|
1775
|
-
function
|
|
1776
|
-
const t =
|
|
1777
|
-
return t ?
|
|
2012
|
+
function Be(e) {
|
|
2013
|
+
const t = ut(e);
|
|
2014
|
+
return t ? de.has(t) : !1;
|
|
1778
2015
|
}
|
|
1779
|
-
function
|
|
1780
|
-
t.forEach((r) => r(e,
|
|
2016
|
+
function dt(e, ...t) {
|
|
2017
|
+
t.forEach((r) => r(e, oe.has(e)));
|
|
1781
2018
|
for (let r = 0; r < e.children.length; r++) {
|
|
1782
2019
|
const n = e.children.item(r);
|
|
1783
|
-
n && t.forEach((
|
|
2020
|
+
n && t.forEach((o) => o(n, oe.has(n)));
|
|
1784
2021
|
}
|
|
1785
2022
|
}
|
|
1786
|
-
function
|
|
2023
|
+
function Ve(e) {
|
|
1787
2024
|
return Array.isArray(e) ? e : [e];
|
|
1788
2025
|
}
|
|
1789
|
-
function
|
|
2026
|
+
function pe(e) {
|
|
1790
2027
|
return typeof e == "function";
|
|
1791
2028
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const t =
|
|
1794
|
-
if (
|
|
1795
|
-
return
|
|
2029
|
+
function Ur(e) {
|
|
2030
|
+
const t = P.get(e), r = ae(e);
|
|
2031
|
+
if (!Be(e))
|
|
2032
|
+
return P.set(e, r);
|
|
1796
2033
|
let n;
|
|
1797
2034
|
if (!t)
|
|
1798
2035
|
return;
|
|
1799
|
-
const
|
|
1800
|
-
if (typeof
|
|
1801
|
-
const a = t.left - r.left,
|
|
1802
|
-
transform: `translate(${a}px, ${
|
|
2036
|
+
const o = Me(e);
|
|
2037
|
+
if (typeof o != "function") {
|
|
2038
|
+
const a = t.left - r.left, s = t.top - r.top, [i, c, d, f] = ct(e, t, r), u = {
|
|
2039
|
+
transform: `translate(${a}px, ${s}px)`
|
|
1803
2040
|
}, p = {
|
|
1804
2041
|
transform: "translate(0, 0)"
|
|
1805
2042
|
};
|
|
1806
|
-
i !==
|
|
1807
|
-
duration:
|
|
1808
|
-
easing:
|
|
2043
|
+
i !== c && (u.width = `${i}px`, p.width = `${c}px`), d !== f && (u.height = `${d}px`, p.height = `${f}px`), n = e.animate([u, p], {
|
|
2044
|
+
duration: o.duration,
|
|
2045
|
+
easing: o.easing
|
|
1809
2046
|
});
|
|
1810
2047
|
} else {
|
|
1811
|
-
const [a] =
|
|
2048
|
+
const [a] = Ve(o(e, "remain", t, r));
|
|
1812
2049
|
n = new Animation(a), n.play();
|
|
1813
2050
|
}
|
|
1814
|
-
|
|
1815
|
-
}
|
|
1816
|
-
function
|
|
1817
|
-
|
|
1818
|
-
const t =
|
|
1819
|
-
|
|
1820
|
-
const r =
|
|
1821
|
-
if (
|
|
2051
|
+
K.set(e, n), P.set(e, r), n.addEventListener("finish", Q.bind(null, e));
|
|
2052
|
+
}
|
|
2053
|
+
function Ye(e) {
|
|
2054
|
+
we in e && delete e[we];
|
|
2055
|
+
const t = ae(e);
|
|
2056
|
+
P.set(e, t);
|
|
2057
|
+
const r = Me(e);
|
|
2058
|
+
if (!Be(e))
|
|
1822
2059
|
return;
|
|
1823
2060
|
let n;
|
|
1824
2061
|
if (typeof r != "function")
|
|
@@ -1831,43 +2068,43 @@ function He(e) {
|
|
|
1831
2068
|
easing: "ease-in"
|
|
1832
2069
|
});
|
|
1833
2070
|
else {
|
|
1834
|
-
const [
|
|
1835
|
-
n = new Animation(
|
|
2071
|
+
const [o] = Ve(r(e, "add", t));
|
|
2072
|
+
n = new Animation(o), n.play();
|
|
1836
2073
|
}
|
|
1837
|
-
|
|
2074
|
+
K.set(e, n), n.addEventListener("finish", Q.bind(null, e));
|
|
1838
2075
|
}
|
|
1839
|
-
function
|
|
2076
|
+
function Ke(e, t) {
|
|
1840
2077
|
var r;
|
|
1841
|
-
e.remove(),
|
|
1842
|
-
if (
|
|
2078
|
+
e.remove(), P.delete(e), ne.delete(e), K.delete(e), (r = Re.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
|
|
2079
|
+
if (he in e && delete e[he], Object.defineProperty(e, we, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
1843
2080
|
for (const n in t)
|
|
1844
2081
|
e.style[n] = "";
|
|
1845
2082
|
}, 0);
|
|
1846
2083
|
}
|
|
1847
|
-
function
|
|
2084
|
+
function Xr(e) {
|
|
1848
2085
|
var t;
|
|
1849
|
-
if (!
|
|
2086
|
+
if (!ne.has(e) || !P.has(e))
|
|
1850
2087
|
return;
|
|
1851
|
-
const [r, n] =
|
|
1852
|
-
Object.defineProperty(e,
|
|
1853
|
-
const
|
|
1854
|
-
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t =
|
|
1855
|
-
return
|
|
1856
|
-
const [
|
|
1857
|
-
(
|
|
1858
|
-
let p,
|
|
2088
|
+
const [r, n] = ne.get(e);
|
|
2089
|
+
Object.defineProperty(e, he, { value: !0, configurable: !0 });
|
|
2090
|
+
const o = window.scrollX, a = window.scrollY;
|
|
2091
|
+
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = ut(e)) === null || t === void 0 || t.appendChild(e), !Be(e))
|
|
2092
|
+
return Ke(e);
|
|
2093
|
+
const [s, i, c, d] = Yr(e), f = Me(e), u = P.get(e);
|
|
2094
|
+
(o !== Ie || a !== Oe) && qr(e, o, a, f);
|
|
2095
|
+
let p, b = {
|
|
1859
2096
|
position: "absolute",
|
|
1860
|
-
top: `${
|
|
2097
|
+
top: `${s}px`,
|
|
1861
2098
|
left: `${i}px`,
|
|
1862
|
-
width: `${
|
|
2099
|
+
width: `${c}px`,
|
|
1863
2100
|
height: `${d}px`,
|
|
1864
2101
|
margin: "0",
|
|
1865
2102
|
pointerEvents: "none",
|
|
1866
2103
|
transformOrigin: "center",
|
|
1867
2104
|
zIndex: "100"
|
|
1868
2105
|
};
|
|
1869
|
-
if (!
|
|
1870
|
-
Object.assign(e.style,
|
|
2106
|
+
if (!pe(f))
|
|
2107
|
+
Object.assign(e.style, b), p = e.animate([
|
|
1871
2108
|
{
|
|
1872
2109
|
transform: "scale(1)",
|
|
1873
2110
|
opacity: 1
|
|
@@ -1876,84 +2113,84 @@ function Ar(e) {
|
|
|
1876
2113
|
transform: "scale(.98)",
|
|
1877
2114
|
opacity: 0
|
|
1878
2115
|
}
|
|
1879
|
-
], { duration:
|
|
2116
|
+
], { duration: f.duration, easing: "ease-out" });
|
|
1880
2117
|
else {
|
|
1881
|
-
const [
|
|
1882
|
-
(
|
|
2118
|
+
const [k, S] = Ve(f(e, "remove", u));
|
|
2119
|
+
(S == null ? void 0 : S.styleReset) !== !1 && (b = (S == null ? void 0 : S.styleReset) || b, Object.assign(e.style, b)), p = new Animation(k), p.play();
|
|
1883
2120
|
}
|
|
1884
|
-
|
|
2121
|
+
K.set(e, p), p.addEventListener("finish", Ke.bind(null, e, b));
|
|
1885
2122
|
}
|
|
1886
|
-
function
|
|
1887
|
-
const
|
|
1888
|
-
if (getComputedStyle(
|
|
2123
|
+
function qr(e, t, r, n) {
|
|
2124
|
+
const o = Ie - t, a = Oe - r, s = document.documentElement.style.scrollBehavior;
|
|
2125
|
+
if (getComputedStyle(U).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + o, window.scrollY + a), !e.parentElement)
|
|
1889
2126
|
return;
|
|
1890
|
-
const
|
|
1891
|
-
let d =
|
|
1892
|
-
const
|
|
2127
|
+
const c = e.parentElement;
|
|
2128
|
+
let d = c.clientHeight, f = c.clientWidth;
|
|
2129
|
+
const u = performance.now();
|
|
1893
2130
|
function p() {
|
|
1894
2131
|
requestAnimationFrame(() => {
|
|
1895
|
-
if (!
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1898
|
-
left: window.scrollX -
|
|
1899
|
-
top: window.scrollY -
|
|
1900
|
-
}), d =
|
|
2132
|
+
if (!pe(n)) {
|
|
2133
|
+
const b = d - c.clientHeight, k = f - c.clientWidth;
|
|
2134
|
+
u + n.duration > performance.now() ? (window.scrollTo({
|
|
2135
|
+
left: window.scrollX - k,
|
|
2136
|
+
top: window.scrollY - b
|
|
2137
|
+
}), d = c.clientHeight, f = c.clientWidth, p()) : document.documentElement.style.scrollBehavior = s;
|
|
1901
2138
|
}
|
|
1902
2139
|
});
|
|
1903
2140
|
}
|
|
1904
2141
|
p();
|
|
1905
2142
|
}
|
|
1906
|
-
function
|
|
1907
|
-
const t =
|
|
1908
|
-
let
|
|
1909
|
-
for (;
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
const a = getComputedStyle(
|
|
1913
|
-
return [i,
|
|
1914
|
-
}
|
|
1915
|
-
function
|
|
1916
|
-
return
|
|
2143
|
+
function Yr(e) {
|
|
2144
|
+
const t = P.get(e), [r, , n] = ct(e, t, ae(e));
|
|
2145
|
+
let o = e.parentElement;
|
|
2146
|
+
for (; o && (getComputedStyle(o).position === "static" || o instanceof HTMLBodyElement); )
|
|
2147
|
+
o = o.parentElement;
|
|
2148
|
+
o || (o = document.body);
|
|
2149
|
+
const a = getComputedStyle(o), s = P.get(o) || ae(o), i = Math.round(t.top - s.top) - F(a.borderTopWidth), c = Math.round(t.left - s.left) - F(a.borderLeftWidth);
|
|
2150
|
+
return [i, c, r, n];
|
|
2151
|
+
}
|
|
2152
|
+
function Kr(e, t = {}) {
|
|
2153
|
+
return Ee && Z && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !pe(t) && !t.disrespectUserMotionPreference || (de.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), dt(e, Q, Lr, (o) => Z == null ? void 0 : Z.observe(o)), pe(t) ? oe.set(e, t) : oe.set(e, { duration: 250, easing: "ease-in-out", ...t }), Ee.observe(e, { childList: !0 }), it.add(e))), Object.freeze({
|
|
1917
2154
|
parent: e,
|
|
1918
2155
|
enable: () => {
|
|
1919
|
-
|
|
2156
|
+
de.add(e);
|
|
1920
2157
|
},
|
|
1921
2158
|
disable: () => {
|
|
1922
|
-
|
|
2159
|
+
de.delete(e);
|
|
1923
2160
|
},
|
|
1924
|
-
isEnabled: () =>
|
|
2161
|
+
isEnabled: () => de.has(e)
|
|
1925
2162
|
});
|
|
1926
2163
|
}
|
|
1927
|
-
const
|
|
2164
|
+
const Qr = {
|
|
1928
2165
|
mounted: (e, t) => {
|
|
1929
|
-
|
|
2166
|
+
Kr(e, t.value || {});
|
|
1930
2167
|
},
|
|
1931
2168
|
// ignore ssr see #96:
|
|
1932
2169
|
getSSRProps: () => ({})
|
|
1933
|
-
},
|
|
2170
|
+
}, Zr = { class: "fixed z-20 flex flex-col gap-2 p-2" }, dn = /* @__PURE__ */ $({
|
|
1934
2171
|
__name: "NotificationSystem",
|
|
1935
2172
|
setup(e) {
|
|
1936
|
-
const t =
|
|
2173
|
+
const t = pr();
|
|
1937
2174
|
return (r, n) => {
|
|
1938
|
-
const
|
|
1939
|
-
return
|
|
1940
|
-
(g(!0), y(
|
|
2175
|
+
const o = Nr;
|
|
2176
|
+
return Je((g(), y("div", Zr, [
|
|
2177
|
+
(g(!0), y(te, null, fe(l(t), (a) => (g(), D(o, {
|
|
1941
2178
|
key: a.hash,
|
|
1942
|
-
"with-border": "",
|
|
1943
2179
|
closeable: "",
|
|
2180
|
+
"with-border": "",
|
|
1944
2181
|
title: a.title,
|
|
1945
2182
|
message: a.message,
|
|
1946
2183
|
icon: a.icon,
|
|
1947
2184
|
loading: a.loading,
|
|
1948
2185
|
color: a.color,
|
|
1949
|
-
onClose: (
|
|
2186
|
+
onClose: (s) => l(t).splice(l(t).indexOf(a), 1)
|
|
1950
2187
|
}, null, 8, ["title", "message", "icon", "loading", "color", "onClose"]))), 128))
|
|
1951
2188
|
])), [
|
|
1952
|
-
[
|
|
2189
|
+
[l(Qr)]
|
|
1953
2190
|
]);
|
|
1954
2191
|
};
|
|
1955
2192
|
}
|
|
1956
|
-
}),
|
|
2193
|
+
}), Jr = { class: "flex gap-2" }, fn = /* @__PURE__ */ $({
|
|
1957
2194
|
__name: "PinInput",
|
|
1958
2195
|
props: {
|
|
1959
2196
|
modelValue: {},
|
|
@@ -1962,36 +2199,36 @@ const Rr = {
|
|
|
1962
2199
|
password: { type: Boolean }
|
|
1963
2200
|
},
|
|
1964
2201
|
setup(e) {
|
|
1965
|
-
const t = e, r =
|
|
2202
|
+
const t = e, r = v([]);
|
|
1966
2203
|
function n(a) {
|
|
1967
2204
|
a.preventDefault(), a.stopPropagation();
|
|
1968
|
-
const
|
|
1969
|
-
a.target.value = "", Array.from(i).forEach((
|
|
1970
|
-
|
|
2205
|
+
const s = r.value.findIndex((c) => c.el === a.target), i = a.target.value ?? "";
|
|
2206
|
+
a.target.value = "", Array.from(i).forEach((c, d) => {
|
|
2207
|
+
s + d >= r.value.length || (r.value[s + d].el.value = c, s + d + 1 < r.value.length ? (r.value[s + d + 1].el.focus(), r.value[s + d + 1].el.select()) : r.value[s + d].el.blur());
|
|
1971
2208
|
});
|
|
1972
2209
|
}
|
|
1973
|
-
function
|
|
2210
|
+
function o(a) {
|
|
1974
2211
|
a.preventDefault(), a.stopPropagation();
|
|
1975
|
-
const
|
|
2212
|
+
const s = a.target.value !== "";
|
|
1976
2213
|
a.target.value = "";
|
|
1977
|
-
const i = r.value.findIndex((
|
|
1978
|
-
i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(),
|
|
2214
|
+
const i = r.value.findIndex((c) => c.el === a.target);
|
|
2215
|
+
i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), s || (r.value[i - 1].el.value = ""));
|
|
1979
2216
|
}
|
|
1980
|
-
return (a,
|
|
1981
|
-
(g(!0), y(
|
|
2217
|
+
return (a, s) => (g(), y("div", Jr, [
|
|
2218
|
+
(g(!0), y(te, null, fe(t.length, (i) => (g(), D(l($r), {
|
|
1982
2219
|
ref_for: !0,
|
|
1983
2220
|
ref_key: "inputs",
|
|
1984
2221
|
ref: r,
|
|
1985
2222
|
key: i,
|
|
1986
2223
|
class: "h-8 w-8 text-center",
|
|
1987
2224
|
password: t.password,
|
|
1988
|
-
onPointerup:
|
|
1989
|
-
onInput:
|
|
1990
|
-
onKeydown:
|
|
2225
|
+
onPointerup: s[0] || (s[0] = (c) => c.target.select()),
|
|
2226
|
+
onInput: Ze(n, ["stop", "prevent"]),
|
|
2227
|
+
onKeydown: xt(o, ["backspace"])
|
|
1991
2228
|
}, null, 8, ["password"]))), 128))
|
|
1992
2229
|
]));
|
|
1993
2230
|
}
|
|
1994
|
-
}),
|
|
2231
|
+
}), hn = /* @__PURE__ */ $({
|
|
1995
2232
|
__name: "Progress",
|
|
1996
2233
|
props: {
|
|
1997
2234
|
value: { default: 0 },
|
|
@@ -2006,16 +2243,16 @@ const Rr = {
|
|
|
2006
2243
|
const t = e, r = m(() => {
|
|
2007
2244
|
switch (t.size) {
|
|
2008
2245
|
case "sm":
|
|
2009
|
-
return "h-0.
|
|
2246
|
+
return "h-0.25";
|
|
2010
2247
|
case "md":
|
|
2011
|
-
return "h-
|
|
2248
|
+
return "h-0.5";
|
|
2012
2249
|
case "lg":
|
|
2013
|
-
return "h-
|
|
2250
|
+
return "h-1";
|
|
2014
2251
|
}
|
|
2015
2252
|
}), n = m(() => {
|
|
2016
2253
|
switch (t.color) {
|
|
2017
2254
|
case "primary":
|
|
2018
|
-
return "bg-primary-
|
|
2255
|
+
return "bg-primary-container";
|
|
2019
2256
|
case "secondary":
|
|
2020
2257
|
return "bg-secondary-7";
|
|
2021
2258
|
case "tertiary":
|
|
@@ -2023,25 +2260,24 @@ const Rr = {
|
|
|
2023
2260
|
case "error":
|
|
2024
2261
|
return "bg-error-7";
|
|
2025
2262
|
}
|
|
2026
|
-
}),
|
|
2027
|
-
return (a,
|
|
2028
|
-
class: w(["relative w-full self-center overflow-hidden bg-surface-
|
|
2029
|
-
style:
|
|
2263
|
+
}), o = ge(t);
|
|
2264
|
+
return (a, s) => (g(), y("div", {
|
|
2265
|
+
class: w(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [l(r), l(o).class]]),
|
|
2266
|
+
style: T([l(o).style])
|
|
2030
2267
|
}, [
|
|
2031
2268
|
a.loading ? (g(), y("div", {
|
|
2032
2269
|
key: 1,
|
|
2033
|
-
class: w(["loading-progress h-full", [
|
|
2270
|
+
class: w(["loading-progress h-full", [l(n)]])
|
|
2034
2271
|
}, null, 2)) : (g(), y("div", {
|
|
2035
2272
|
key: 0,
|
|
2036
|
-
class: w(["h-full", [
|
|
2037
|
-
style:
|
|
2273
|
+
class: w(["h-full", [l(n)]]),
|
|
2274
|
+
style: T([{
|
|
2038
2275
|
width: `${(a.value - a.min) / (a.max - a.min) * 100}%`
|
|
2039
2276
|
}])
|
|
2040
2277
|
}, null, 6))
|
|
2041
2278
|
], 6));
|
|
2042
2279
|
}
|
|
2043
|
-
})
|
|
2044
|
-
const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
2280
|
+
}), en = { class: "relative" }, pn = /* @__PURE__ */ $({
|
|
2045
2281
|
__name: "Indicator",
|
|
2046
2282
|
props: {
|
|
2047
2283
|
color: { default: "primary" },
|
|
@@ -2061,7 +2297,7 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2061
2297
|
default:
|
|
2062
2298
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `w-${t.size} h-${t.size}` : t.size;
|
|
2063
2299
|
}
|
|
2064
|
-
}), n =
|
|
2300
|
+
}), n = kt(), o = m(() => {
|
|
2065
2301
|
if (!n.label)
|
|
2066
2302
|
return "";
|
|
2067
2303
|
switch (t.size) {
|
|
@@ -2083,69 +2319,64 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2083
2319
|
case "bottom-right":
|
|
2084
2320
|
return "bottom-0 right-0 translate-x-1/2 translate-y-1/2";
|
|
2085
2321
|
}
|
|
2086
|
-
}),
|
|
2322
|
+
}), s = m(() => {
|
|
2087
2323
|
switch (t.color) {
|
|
2088
2324
|
case "primary":
|
|
2089
|
-
return "bg-primary-
|
|
2325
|
+
return "bg-primary-container text-primary-on";
|
|
2090
2326
|
case "secondary":
|
|
2091
|
-
return "bg-secondary-
|
|
2327
|
+
return "bg-secondary-container text-secondary-on";
|
|
2092
2328
|
case "tertiary":
|
|
2093
|
-
return "bg-tertiary-
|
|
2329
|
+
return "bg-tertiary-container text-tertiary-on";
|
|
2094
2330
|
case "error":
|
|
2095
|
-
return "bg-error-
|
|
2331
|
+
return "bg-error-container text-error-on";
|
|
2096
2332
|
}
|
|
2097
2333
|
});
|
|
2098
|
-
return (i,
|
|
2099
|
-
|
|
2100
|
-
class: w([[
|
|
2334
|
+
return (i, c) => (g(), y("div", en, [
|
|
2335
|
+
M("div", {
|
|
2336
|
+
class: w([[l(a), l(o)], "absolute z-1"])
|
|
2101
2337
|
}, [
|
|
2102
2338
|
t.ping ? (g(), y("div", {
|
|
2103
2339
|
key: 0,
|
|
2104
|
-
class: w(["absolute animate-ping rounded-full", [
|
|
2340
|
+
class: w(["absolute animate-ping rounded-full border-2 border-transparent box-content", [
|
|
2105
2341
|
{
|
|
2106
|
-
[
|
|
2342
|
+
[l(r)]: !i.$slots.label
|
|
2107
2343
|
},
|
|
2108
|
-
|
|
2344
|
+
l(s)
|
|
2109
2345
|
]])
|
|
2110
2346
|
}, [
|
|
2111
|
-
i.$slots.label ?
|
|
2112
|
-
], 2)) :
|
|
2113
|
-
|
|
2114
|
-
class: w(["top-0 rounded-full", [
|
|
2347
|
+
i.$slots.label ? H(i.$slots, "label", { key: 0 }) : z("", !0)
|
|
2348
|
+
], 2)) : z("", !0),
|
|
2349
|
+
M("div", {
|
|
2350
|
+
class: w(["top-0 rounded-full border-2 border-surface-low box-content", [
|
|
2115
2351
|
{
|
|
2116
|
-
[
|
|
2352
|
+
[l(r)]: !i.$slots.label
|
|
2117
2353
|
},
|
|
2118
|
-
|
|
2354
|
+
l(s)
|
|
2119
2355
|
]])
|
|
2120
2356
|
}, [
|
|
2121
|
-
i.$slots.label ?
|
|
2357
|
+
i.$slots.label ? H(i.$slots, "label", { key: 0 }) : z("", !0)
|
|
2122
2358
|
], 2)
|
|
2123
2359
|
], 2),
|
|
2124
|
-
|
|
2360
|
+
H(i.$slots, "default")
|
|
2125
2361
|
]));
|
|
2126
2362
|
}
|
|
2127
|
-
}),
|
|
2363
|
+
}), mn = /* @__PURE__ */ $({
|
|
2128
2364
|
__name: "Chip",
|
|
2129
|
-
props: {
|
|
2365
|
+
props: /* @__PURE__ */ ee({
|
|
2130
2366
|
is: { default: "img" },
|
|
2131
2367
|
src: {},
|
|
2132
2368
|
size: { default: "md" },
|
|
2133
2369
|
style: {},
|
|
2134
2370
|
class: {},
|
|
2135
|
-
modelValue: { type: Boolean },
|
|
2136
2371
|
rounded: { default: "full" }
|
|
2137
|
-
},
|
|
2372
|
+
}, {
|
|
2373
|
+
modelValue: { type: Boolean, default: void 0 },
|
|
2374
|
+
modelModifiers: {}
|
|
2375
|
+
}),
|
|
2138
2376
|
emits: ["update:modelValue"],
|
|
2139
|
-
setup(e
|
|
2140
|
-
const r = e, n = t,
|
|
2141
|
-
|
|
2142
|
-
return r.modelValue;
|
|
2143
|
-
},
|
|
2144
|
-
set(u) {
|
|
2145
|
-
n("update:modelValue", u);
|
|
2146
|
-
}
|
|
2147
|
-
}), a = fe(r), o = m(() => {
|
|
2148
|
-
switch (r.size) {
|
|
2377
|
+
setup(e) {
|
|
2378
|
+
const t = e, r = me(e, "modelValue"), n = ge(t), o = m(() => {
|
|
2379
|
+
switch (t.size) {
|
|
2149
2380
|
case "sm":
|
|
2150
2381
|
return "px-3 text-sm h-6";
|
|
2151
2382
|
case "md":
|
|
@@ -2153,18 +2384,18 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2153
2384
|
case "lg":
|
|
2154
2385
|
return "px-8 h-10 text-lg";
|
|
2155
2386
|
}
|
|
2156
|
-
}),
|
|
2157
|
-
return (
|
|
2158
|
-
class: w(["inline-flex items-center gap-1", [
|
|
2159
|
-
style:
|
|
2160
|
-
onPointerup:
|
|
2387
|
+
}), a = m(() => r.value ? "container-filled-primary border-transparent" : "container-base"), s = m(() => r.value !== void 0), i = m(() => s.value ? "cursor-pointer" : "");
|
|
2388
|
+
return (c, d) => (g(), y("span", {
|
|
2389
|
+
class: w(["inline-flex items-center gap-1", [l(n).class, l(o), l(a), l(i)]]),
|
|
2390
|
+
style: T([l(n).style]),
|
|
2391
|
+
onPointerup: d[0] || (d[0] = (f) => l(s) && (r.value = !r.value))
|
|
2161
2392
|
}, [
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2393
|
+
c.$slots.leftSection ? H(c.$slots, "leftSection", { key: 0 }) : z("", !0),
|
|
2394
|
+
H(c.$slots, "default"),
|
|
2395
|
+
c.$slots.rightSection ? H(c.$slots, "rightSection", { key: 1 }) : z("", !0)
|
|
2165
2396
|
], 38));
|
|
2166
2397
|
}
|
|
2167
|
-
}),
|
|
2398
|
+
}), gn = /* @__PURE__ */ $({
|
|
2168
2399
|
__name: "Avatar",
|
|
2169
2400
|
props: {
|
|
2170
2401
|
is: { default: "img" },
|
|
@@ -2185,46 +2416,106 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
|
|
|
2185
2416
|
default:
|
|
2186
2417
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `--size: ${t.size}rem;` : `--size: ${t.size};`;
|
|
2187
2418
|
}
|
|
2188
|
-
}), n =
|
|
2189
|
-
|
|
2190
|
-
|
|
2419
|
+
}), n = v(!1), o = v(null);
|
|
2420
|
+
function a() {
|
|
2421
|
+
n.value = !0;
|
|
2422
|
+
}
|
|
2423
|
+
return se(() => {
|
|
2424
|
+
var s;
|
|
2425
|
+
(s = o.value) != null && s.complete && a();
|
|
2426
|
+
}), (s, i) => (g(), y(te, null, [
|
|
2427
|
+
s.src ? (g(), D(_e(s.is), Pe({
|
|
2191
2428
|
key: 0,
|
|
2192
|
-
|
|
2429
|
+
ref_key: "img",
|
|
2430
|
+
ref: o,
|
|
2431
|
+
style: [s.style, l(r)],
|
|
2193
2432
|
placeholder: "",
|
|
2194
2433
|
src: s.src,
|
|
2195
|
-
class:
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
c(n) ? $("", !0) : (g(), y("img", {
|
|
2434
|
+
class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !l(n) }, t.class]]
|
|
2435
|
+
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) : z("", !0),
|
|
2436
|
+
l(n) ? z("", !0) : (g(), y("div", {
|
|
2199
2437
|
key: 1,
|
|
2200
|
-
class: "h-[var(--size)] w-[var(--size)] animate-pulse rounded-full bg-surface-
|
|
2201
|
-
style:
|
|
2438
|
+
class: "h-[var(--size)] w-[var(--size)] animate-pulse rounded-full bg-surface-high object-cover border-transparent",
|
|
2439
|
+
style: T([s.style, l(r)])
|
|
2202
2440
|
}, null, 4))
|
|
2203
2441
|
], 64));
|
|
2204
2442
|
}
|
|
2443
|
+
}), bn = /* @__PURE__ */ $({
|
|
2444
|
+
__name: "ThemeSwitch",
|
|
2445
|
+
setup(e) {
|
|
2446
|
+
const t = v(void 0);
|
|
2447
|
+
return X(() => {
|
|
2448
|
+
be && (t.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : t.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
|
|
2449
|
+
}), se(() => {
|
|
2450
|
+
if (be) {
|
|
2451
|
+
const r = localStorage.getItem("scheme");
|
|
2452
|
+
r === "dark" ? t.value = !0 : r === "light" ? t.value = !1 : t.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2453
|
+
}
|
|
2454
|
+
}), (r, n) => {
|
|
2455
|
+
const o = Lt;
|
|
2456
|
+
return g(), D(o, {
|
|
2457
|
+
modelValue: l(t),
|
|
2458
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => Mt(t) ? t.value = a : null),
|
|
2459
|
+
color: "secondary",
|
|
2460
|
+
"on-icon": "i-tabler-moon",
|
|
2461
|
+
"off-icon": "i-tabler-sun"
|
|
2462
|
+
}, null, 8, ["modelValue"]);
|
|
2463
|
+
};
|
|
2464
|
+
}
|
|
2465
|
+
}), vn = /* @__PURE__ */ $({
|
|
2466
|
+
__name: "Paper",
|
|
2467
|
+
props: {
|
|
2468
|
+
size: { default: "md" },
|
|
2469
|
+
rounded: { default: "md" },
|
|
2470
|
+
withBorder: { type: Boolean, default: !1 },
|
|
2471
|
+
is: { default: "div" }
|
|
2472
|
+
},
|
|
2473
|
+
setup(e) {
|
|
2474
|
+
const r = ge(e);
|
|
2475
|
+
return (n, o) => (g(), D(_e(n.is), {
|
|
2476
|
+
class: w(["container-low rounded-lg p-4", [
|
|
2477
|
+
{
|
|
2478
|
+
"border-transparent": !n.withBorder
|
|
2479
|
+
},
|
|
2480
|
+
l(r).class
|
|
2481
|
+
]]),
|
|
2482
|
+
style: T([l(r).style])
|
|
2483
|
+
}, {
|
|
2484
|
+
default: J(() => [
|
|
2485
|
+
H(n.$slots, "default")
|
|
2486
|
+
]),
|
|
2487
|
+
_: 3
|
|
2488
|
+
}, 8, ["class", "style"]));
|
|
2489
|
+
}
|
|
2205
2490
|
});
|
|
2206
|
-
function Ur() {
|
|
2207
|
-
return ut("theme");
|
|
2208
|
-
}
|
|
2209
2491
|
export {
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2492
|
+
gn as Avatar,
|
|
2493
|
+
St as Btn,
|
|
2494
|
+
mn as Chip,
|
|
2495
|
+
pn as Indicator,
|
|
2496
|
+
un as Modal,
|
|
2497
|
+
Nr as Notification,
|
|
2498
|
+
dn as NotificationSystem,
|
|
2499
|
+
on as Notifications,
|
|
2500
|
+
vn as Paper,
|
|
2501
|
+
fn as PinInput,
|
|
2502
|
+
hn as Progress,
|
|
2503
|
+
ln as RokuProvider,
|
|
2504
|
+
cn as Select,
|
|
2505
|
+
rn as Slider,
|
|
2506
|
+
Lt as Switch,
|
|
2507
|
+
$r as TextField,
|
|
2508
|
+
Ir as ThemeProvider,
|
|
2509
|
+
bn as ThemeSwitch,
|
|
2510
|
+
Te as darkTheme,
|
|
2511
|
+
an as generateColors,
|
|
2512
|
+
gr as generateColorsMap,
|
|
2513
|
+
hr as lightTheme,
|
|
2514
|
+
nn as notificationsSymbol,
|
|
2515
|
+
ot as themeColors,
|
|
2516
|
+
vr as useCurrentTheme,
|
|
2517
|
+
sn as useCurrentThemeScheme,
|
|
2518
|
+
pr as useNotifications,
|
|
2519
|
+
br as useRootTheme,
|
|
2520
|
+
st as useThemeStyles
|
|
2230
2521
|
};
|