vuiii 1.0.0-beta.76 → 1.0.0-beta.78

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.
Files changed (38) hide show
  1. package/dist/{arrow-narrow-down-BeayrxGn.js → arrow-narrow-down-BN5AJO0l.js} +1 -1
  2. package/dist/{arrow-narrow-left-COUNwY5k.js → arrow-narrow-left-DjWiaIhd.js} +1 -1
  3. package/dist/{arrow-narrow-right-8vOr4jLc.js → arrow-narrow-right-DkXaxeYG.js} +1 -1
  4. package/dist/{arrow-narrow-up-BmPohRLI.js → arrow-narrow-up-0cxnjCrw.js} +1 -1
  5. package/dist/{arrow-up-tray-BYENO0PJ.js → arrow-up-tray-DDl5rSQ4.js} +1 -1
  6. package/dist/{caret-sort-BC9YHvXt.js → caret-sort-DEFlBZh4.js} +1 -1
  7. package/dist/{check-CUXEbR-a.js → check-QTX9-01-.js} +1 -1
  8. package/dist/{chevron-down-RQewoNLk.js → chevron-down-DeBIOait.js} +1 -1
  9. package/dist/{chevron-left-CLRbU2Ue.js → chevron-left-BNN4Fuex.js} +1 -1
  10. package/dist/{chevron-right-DsjLJe--.js → chevron-right-clNRHSw7.js} +1 -1
  11. package/dist/{chevron-up-C3F3Jx-l.js → chevron-up-NuAcuUuQ.js} +1 -1
  12. package/dist/components/FilePicker.vue.d.ts +36 -0
  13. package/dist/composables/useDropArea.d.ts +9 -0
  14. package/dist/{exclamation-Uh7fNzBH.js → exclamation-BOJsQn7-.js} +1 -1
  15. package/dist/index-C1i_1Muv.js +2809 -0
  16. package/dist/index.d.ts +5 -0
  17. package/dist/{mail-u5_Welh4.js → mail-CREsU-P5.js} +1 -1
  18. package/dist/{minus-CLhvfY4M.js → minus-BaYbC5to.js} +1 -1
  19. package/dist/{pencil-DU9pgsa9.js → pencil-CEoP4TmR.js} +1 -1
  20. package/dist/{plus-D41GRHpB.js → plus-DY-H-DKb.js} +1 -1
  21. package/dist/{search-Bcl8sUjf.js → search-BYRmS3Jf.js} +1 -1
  22. package/dist/{spinner-DkfoExGp.js → spinner-CH_nnEa7.js} +1 -1
  23. package/dist/{trash-CKv7CSP5.js → trash-PXwpMiVT.js} +1 -1
  24. package/dist/{triangle-down-DaCdvYeU.js → triangle-down-cBa2wgWF.js} +1 -1
  25. package/dist/{triangle-left-DSK7oRAV.js → triangle-left-ChW4v-yZ.js} +1 -1
  26. package/dist/{triangle-right-sHOC1rCl.js → triangle-right-DSWOPUi8.js} +1 -1
  27. package/dist/{triangle-up-2QujZVso.js → triangle-up-C02JTADo.js} +1 -1
  28. package/dist/utils/debounce.d.ts +1 -0
  29. package/dist/utils/loadURLAsFile.d.ts +1 -0
  30. package/dist/utils/resolveFilesFromClipboardEvent.d.ts +4 -0
  31. package/dist/utils/retrieveFilesFromDataTransfer.d.ts +1 -0
  32. package/dist/utils/retrieveMediaUrlFromHTML copy.d.ts +1 -0
  33. package/dist/utils/retrieveMediaUrlFromHTML.d.ts +1 -0
  34. package/dist/vuiii.css +1 -1
  35. package/dist/vuiii.js +37 -31
  36. package/dist/{x-D7UTChyJ.js → x-BtutIGv7.js} +1 -1
  37. package/package.json +1 -1
  38. package/dist/index-BU6XsMzi.js +0 -2684
@@ -0,0 +1,2809 @@
1
+ import { defineComponent as M, ref as S, watch as ye, createElementBlock as m, openBlock as p, createCommentVNode as O, Fragment as H, renderList as Y, normalizeClass as T, renderSlot as w, mergeProps as q, createElementVNode as D, createTextVNode as oe, toDisplayString as L, defineAsyncComponent as hr, shallowRef as yr, createBlock as z, resolveDynamicComponent as Oe, useAttrs as Ye, useSlots as Ke, computed as k, unref as E, withModifiers as st, withCtx as P, useCssVars as $r, Transition as Gt, onUnmounted as Ht, onMounted as we, mergeModels as K, useModel as ne, createSlots as Qe, createVNode as U, nextTick as kr, resolveComponent as Ut, normalizeProps as lt, guardReactiveProps as ut, markRaw as _r, normalizeStyle as Ue, onBeforeUnmount as mt, Teleport as Xt, TransitionGroup as Yt } from "vue";
2
+ import { useRouter as Kt, useRoute as wr } from "vue-router";
3
+ const Cr = { class: "DropdownMenu" }, Ir = {
4
+ key: 0,
5
+ class: "DropdownMenu__items"
6
+ }, Or = ["onClick", "onMouseenter", "onMouseleave"], Dr = /* @__PURE__ */ M({
7
+ __name: "DropdownMenu",
8
+ props: {
9
+ items: {},
10
+ cursorIndex: {}
11
+ },
12
+ emits: ["itemClick", "itemMouseenter", "itemMouseleave"],
13
+ setup(e, { emit: t }) {
14
+ const r = e, o = t, n = S([]);
15
+ return ye(
16
+ () => r.cursorIndex,
17
+ (l) => {
18
+ l !== void 0 && l >= 0 && n.value[l]?.scrollIntoView({
19
+ block: "nearest",
20
+ behavior: "smooth"
21
+ });
22
+ }
23
+ ), (l, c) => (p(), m("div", Cr, [
24
+ e.items?.length ? (p(), m("ul", Ir, [
25
+ (p(!0), m(H, null, Y(e.items, (a, i) => (p(), m("li", {
26
+ key: i,
27
+ class: T(["DropdownMenu__item", { "DropdownMenu__item--withCursor": e.cursorIndex === i }]),
28
+ ref_for: !0,
29
+ ref_key: "itemElements",
30
+ ref: n
31
+ }, [
32
+ w(l.$slots, "item", q({ ref_for: !0 }, { item: a, index: i, cursorIndex: e.cursorIndex }), () => [
33
+ D("button", {
34
+ class: "DropdownMenu__button",
35
+ onClick: (s) => o("itemClick", { item: a, index: i }),
36
+ onMouseenter: (s) => o("itemMouseenter", { item: a, index: i }),
37
+ onMouseleave: (s) => o("itemMouseleave", { item: a, index: i })
38
+ }, [
39
+ w(l.$slots, "itemLabel", q({ ref_for: !0 }, { item: a, index: i, cursorIndex: e.cursorIndex }), () => [
40
+ oe(L(a), 1)
41
+ ])
42
+ ], 40, Or)
43
+ ])
44
+ ], 2))), 128))
45
+ ])) : O("", !0)
46
+ ]));
47
+ }
48
+ }), Lt = /* @__PURE__ */ Object.assign({ "../icons/arrow-narrow-down.vue": () => import("./arrow-narrow-down-BN5AJO0l.js"), "../icons/arrow-narrow-left.vue": () => import("./arrow-narrow-left-DjWiaIhd.js"), "../icons/arrow-narrow-right.vue": () => import("./arrow-narrow-right-DkXaxeYG.js"), "../icons/arrow-narrow-up.vue": () => import("./arrow-narrow-up-0cxnjCrw.js"), "../icons/arrow-up-tray.vue": () => import("./arrow-up-tray-DDl5rSQ4.js"), "../icons/caret-sort.vue": () => import("./caret-sort-DEFlBZh4.js"), "../icons/check.vue": () => import("./check-QTX9-01-.js"), "../icons/chevron-down.vue": () => import("./chevron-down-DeBIOait.js"), "../icons/chevron-left.vue": () => import("./chevron-left-BNN4Fuex.js"), "../icons/chevron-right.vue": () => import("./chevron-right-clNRHSw7.js"), "../icons/chevron-up.vue": () => import("./chevron-up-NuAcuUuQ.js"), "../icons/exclamation.vue": () => import("./exclamation-BOJsQn7-.js"), "../icons/mail.vue": () => import("./mail-CREsU-P5.js"), "../icons/minus.vue": () => import("./minus-BaYbC5to.js"), "../icons/pencil.vue": () => import("./pencil-CEoP4TmR.js"), "../icons/plus.vue": () => import("./plus-DY-H-DKb.js"), "../icons/search.vue": () => import("./search-BYRmS3Jf.js"), "../icons/spinner.vue": () => import("./spinner-CH_nnEa7.js"), "../icons/trash.vue": () => import("./trash-PXwpMiVT.js"), "../icons/triangle-down.vue": () => import("./triangle-down-cBa2wgWF.js"), "../icons/triangle-left.vue": () => import("./triangle-left-ChW4v-yZ.js"), "../icons/triangle-right.vue": () => import("./triangle-right-DSWOPUi8.js"), "../icons/triangle-up.vue": () => import("./triangle-up-C02JTADo.js"), "../icons/x.vue": () => import("./x-BtutIGv7.js") });
49
+ let ct;
50
+ function Br(e) {
51
+ const t = Object.keys(Lt).find((r) => r.endsWith(`/${e}.vue`));
52
+ if (t)
53
+ return hr(Lt[t]);
54
+ }
55
+ function za(e) {
56
+ ct = e;
57
+ }
58
+ function Sr(e) {
59
+ let t;
60
+ return ct && (t = ct(e)), t || (t = Br(e)), t || console.error("Unable to resolve icon component for name: " + e), t;
61
+ }
62
+ const Er = /* @__PURE__ */ M({
63
+ __name: "Icon",
64
+ props: {
65
+ name: {},
66
+ size: {}
67
+ },
68
+ setup(e) {
69
+ const t = e, r = yr(void 0);
70
+ return ye(
71
+ () => t.name,
72
+ () => r.value = Sr(t.name),
73
+ { immediate: !0 }
74
+ ), (o, n) => (p(), z(Oe(r.value), {
75
+ class: T(["Icon", { [`Icon--${o.$props.size}`]: o.$props.size }])
76
+ }, null, 8, ["class"]));
77
+ }
78
+ }), N = (e, t) => {
79
+ const r = e.__vccOpts || e;
80
+ for (const [o, n] of t)
81
+ r[o] = n;
82
+ return r;
83
+ }, ae = /* @__PURE__ */ N(Er, [["__scopeId", "data-v-716f90e6"]]), Pr = {
84
+ inheritAttrs: !1
85
+ }, Ar = /* @__PURE__ */ M({
86
+ ...Pr,
87
+ __name: "InputWrapper",
88
+ props: {
89
+ prefixIcon: {},
90
+ suffixIcon: {},
91
+ size: {},
92
+ invalid: { type: Boolean },
93
+ pill: { type: Boolean }
94
+ },
95
+ emits: ["click", "prefix-icon-click", "suffix-icon-click"],
96
+ setup(e) {
97
+ const t = e, r = Ye(), o = Ke(), n = k(() => !!r.onPrefixIconClick), l = k(() => !!r.onSuffixIconClick);
98
+ return (c, a) => (p(), m("div", {
99
+ class: T(["InputWrapper vuiii-input", [
100
+ c.$attrs.class,
101
+ {
102
+ "vuiii-input--invalid": c.$props.invalid,
103
+ "vuiii-input--disabled": c.$attrs.disabled,
104
+ "InputWrapper--pill": c.$props.pill,
105
+ [`vuiii-input--${c.$props.size}`]: c.$props.size
106
+ }
107
+ ]]),
108
+ onClick: a[2] || (a[2] = (i) => c.$emit("click", i))
109
+ }, [
110
+ E(o).prefix || t.prefixIcon ? w(c.$slots, "prefix", { key: 0 }, () => [
111
+ (p(), z(Oe(n.value ? "button" : "div"), {
112
+ class: T(["vuiii-input__prefix-icon", { InputWrapper__icon: n.value }]),
113
+ tabindex: "-1",
114
+ onClick: a[0] || (a[0] = st((i) => c.$emit("prefix-icon-click"), ["prevent"]))
115
+ }, {
116
+ default: P(() => [
117
+ c.$props.prefixIcon ? (p(), z(ae, {
118
+ key: 0,
119
+ name: c.$props.prefixIcon || "",
120
+ size: c.$props.size
121
+ }, null, 8, ["name", "size"])) : O("", !0)
122
+ ]),
123
+ _: 1
124
+ }, 8, ["class"]))
125
+ ], !0) : O("", !0),
126
+ w(c.$slots, "default", {}, void 0, !0),
127
+ E(o).suffix || t.suffixIcon ? w(c.$slots, "suffix", { key: 1 }, () => [
128
+ (p(), z(Oe(l.value ? "button" : "div"), {
129
+ class: T(["vuiii-input__suffix-icon", { InputWrapper__icon: l.value }]),
130
+ tabindex: "-1",
131
+ onClick: a[1] || (a[1] = st((i) => c.$emit("suffix-icon-click"), ["prevent"]))
132
+ }, {
133
+ default: P(() => [
134
+ c.$props.suffixIcon ? (p(), z(ae, {
135
+ key: 0,
136
+ name: c.$props.suffixIcon || "",
137
+ size: c.$props.size
138
+ }, null, 8, ["name", "size"])) : O("", !0)
139
+ ]),
140
+ _: 1
141
+ }, 8, ["class"]))
142
+ ], !0) : O("", !0)
143
+ ], 2));
144
+ }
145
+ }), Je = /* @__PURE__ */ N(Ar, [["__scopeId", "data-v-12a63e74"]]), Qt = /* @__PURE__ */ M({
146
+ __name: "FadeTransition",
147
+ props: {
148
+ duration: { default: 300 }
149
+ },
150
+ setup(e) {
151
+ return $r((t) => ({
152
+ d1bc765e: t.duration + "ms"
153
+ })), (t, r) => (p(), z(Gt, { name: "fade" }, {
154
+ default: P(() => [
155
+ w(t.$slots, "default")
156
+ ]),
157
+ _: 3
158
+ }));
159
+ }
160
+ });
161
+ function Pe() {
162
+ const e = Ye();
163
+ return k(() => {
164
+ const { class: t, ...r } = e;
165
+ return r;
166
+ });
167
+ }
168
+ function Lr(e, t = {}) {
169
+ const r = S(0), o = k(() => E(e)[r.value]), n = () => {
170
+ const a = r.value + 1, i = E(e).length;
171
+ r.value = t.cycle ? a % i : Math.min(a, i - 1);
172
+ }, l = () => {
173
+ const a = r.value - 1, i = E(e).length;
174
+ r.value = t.cycle ? (a + i) % i : Math.max(a, 0);
175
+ }, c = () => {
176
+ r.value = 0;
177
+ };
178
+ return ye(r, () => t.onCursorMove?.()), ye(() => E(e).length, c), {
179
+ cursorIndex: r,
180
+ cursorItem: o,
181
+ moveCursorForward: n,
182
+ moveCursorBack: l,
183
+ resetCursor: c
184
+ };
185
+ }
186
+ function Jt(e, t) {
187
+ const r = (o) => {
188
+ e.value?.contains(o.target) || t(o);
189
+ };
190
+ window.addEventListener("mousedown", r), Ht(() => {
191
+ window.removeEventListener("mousedown", r);
192
+ });
193
+ }
194
+ var Z = "top", ie = "bottom", ue = "right", re = "left", bt = "auto", Ze = [Z, ie, ue, re], De = "start", xe = "end", Vr = "clippingParents", Zt = "viewport", Ve = "popper", Mr = "reference", Vt = /* @__PURE__ */ Ze.reduce(function(e, t) {
195
+ return e.concat([t + "-" + De, t + "-" + xe]);
196
+ }, []), er = /* @__PURE__ */ [].concat(Ze, [bt]).reduce(function(e, t) {
197
+ return e.concat([t, t + "-" + De, t + "-" + xe]);
198
+ }, []), xr = "beforeRead", zr = "read", Rr = "afterRead", Fr = "beforeMain", Tr = "main", jr = "afterMain", Wr = "beforeWrite", qr = "write", Nr = "afterWrite", Gr = [xr, zr, Rr, Fr, Tr, jr, Wr, qr, Nr];
199
+ function se(e) {
200
+ return e ? (e.nodeName || "").toLowerCase() : null;
201
+ }
202
+ function Q(e) {
203
+ if (e == null)
204
+ return window;
205
+ if (e.toString() !== "[object Window]") {
206
+ var t = e.ownerDocument;
207
+ return t && t.defaultView || window;
208
+ }
209
+ return e;
210
+ }
211
+ function $e(e) {
212
+ var t = Q(e).Element;
213
+ return e instanceof t || e instanceof Element;
214
+ }
215
+ function ee(e) {
216
+ var t = Q(e).HTMLElement;
217
+ return e instanceof t || e instanceof HTMLElement;
218
+ }
219
+ function gt(e) {
220
+ if (typeof ShadowRoot > "u")
221
+ return !1;
222
+ var t = Q(e).ShadowRoot;
223
+ return e instanceof t || e instanceof ShadowRoot;
224
+ }
225
+ function Hr(e) {
226
+ var t = e.state;
227
+ Object.keys(t.elements).forEach(function(r) {
228
+ var o = t.styles[r] || {}, n = t.attributes[r] || {}, l = t.elements[r];
229
+ !ee(l) || !se(l) || (Object.assign(l.style, o), Object.keys(n).forEach(function(c) {
230
+ var a = n[c];
231
+ a === !1 ? l.removeAttribute(c) : l.setAttribute(c, a === !0 ? "" : a);
232
+ }));
233
+ });
234
+ }
235
+ function Ur(e) {
236
+ var t = e.state, r = {
237
+ popper: {
238
+ position: t.options.strategy,
239
+ left: "0",
240
+ top: "0",
241
+ margin: "0"
242
+ },
243
+ arrow: {
244
+ position: "absolute"
245
+ },
246
+ reference: {}
247
+ };
248
+ return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
249
+ Object.keys(t.elements).forEach(function(o) {
250
+ var n = t.elements[o], l = t.attributes[o] || {}, c = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : r[o]), a = c.reduce(function(i, s) {
251
+ return i[s] = "", i;
252
+ }, {});
253
+ !ee(n) || !se(n) || (Object.assign(n.style, a), Object.keys(l).forEach(function(i) {
254
+ n.removeAttribute(i);
255
+ }));
256
+ });
257
+ };
258
+ }
259
+ const Xr = {
260
+ name: "applyStyles",
261
+ enabled: !0,
262
+ phase: "write",
263
+ fn: Hr,
264
+ effect: Ur,
265
+ requires: ["computeStyles"]
266
+ };
267
+ function le(e) {
268
+ return e.split("-")[0];
269
+ }
270
+ var he = Math.max, Xe = Math.min, Be = Math.round;
271
+ function dt() {
272
+ var e = navigator.userAgentData;
273
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
274
+ return t.brand + "/" + t.version;
275
+ }).join(" ") : navigator.userAgent;
276
+ }
277
+ function tr() {
278
+ return !/^((?!chrome|android).)*safari/i.test(dt());
279
+ }
280
+ function Se(e, t, r) {
281
+ t === void 0 && (t = !1), r === void 0 && (r = !1);
282
+ var o = e.getBoundingClientRect(), n = 1, l = 1;
283
+ t && ee(e) && (n = e.offsetWidth > 0 && Be(o.width) / e.offsetWidth || 1, l = e.offsetHeight > 0 && Be(o.height) / e.offsetHeight || 1);
284
+ var c = $e(e) ? Q(e) : window, a = c.visualViewport, i = !tr() && r, s = (o.left + (i && a ? a.offsetLeft : 0)) / n, u = (o.top + (i && a ? a.offsetTop : 0)) / l, d = o.width / n, v = o.height / l;
285
+ return {
286
+ width: d,
287
+ height: v,
288
+ top: u,
289
+ right: s + d,
290
+ bottom: u + v,
291
+ left: s,
292
+ x: s,
293
+ y: u
294
+ };
295
+ }
296
+ function rr(e) {
297
+ var t = Se(e), r = e.offsetWidth, o = e.offsetHeight;
298
+ return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
299
+ x: e.offsetLeft,
300
+ y: e.offsetTop,
301
+ width: r,
302
+ height: o
303
+ };
304
+ }
305
+ function Yr(e, t) {
306
+ var r = t.getRootNode && t.getRootNode();
307
+ if (e.contains(t))
308
+ return !0;
309
+ if (r && gt(r)) {
310
+ var o = t;
311
+ do {
312
+ if (o && e.isSameNode(o))
313
+ return !0;
314
+ o = o.parentNode || o.host;
315
+ } while (o);
316
+ }
317
+ return !1;
318
+ }
319
+ function ce(e) {
320
+ return Q(e).getComputedStyle(e);
321
+ }
322
+ function Kr(e) {
323
+ return ["table", "td", "th"].indexOf(se(e)) >= 0;
324
+ }
325
+ function fe(e) {
326
+ return (($e(e) ? e.ownerDocument : (
327
+ // $FlowFixMe[prop-missing]
328
+ e.document
329
+ )) || window.document).documentElement;
330
+ }
331
+ function et(e) {
332
+ return se(e) === "html" ? e : (
333
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
334
+ // $FlowFixMe[incompatible-return]
335
+ // $FlowFixMe[prop-missing]
336
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
337
+ e.parentNode || // DOM Element detected
338
+ (gt(e) ? e.host : null) || // ShadowRoot detected
339
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
340
+ fe(e)
341
+ );
342
+ }
343
+ function Mt(e) {
344
+ return !ee(e) || // https://github.com/popperjs/popper-core/issues/837
345
+ ce(e).position === "fixed" ? null : e.offsetParent;
346
+ }
347
+ function Qr(e) {
348
+ var t = /firefox/i.test(dt()), r = /Trident/i.test(dt());
349
+ if (r && ee(e)) {
350
+ var o = ce(e);
351
+ if (o.position === "fixed")
352
+ return null;
353
+ }
354
+ var n = et(e);
355
+ for (gt(n) && (n = n.host); ee(n) && ["html", "body"].indexOf(se(n)) < 0; ) {
356
+ var l = ce(n);
357
+ if (l.transform !== "none" || l.perspective !== "none" || l.contain === "paint" || ["transform", "perspective"].indexOf(l.willChange) !== -1 || t && l.willChange === "filter" || t && l.filter && l.filter !== "none")
358
+ return n;
359
+ n = n.parentNode;
360
+ }
361
+ return null;
362
+ }
363
+ function tt(e) {
364
+ for (var t = Q(e), r = Mt(e); r && Kr(r) && ce(r).position === "static"; )
365
+ r = Mt(r);
366
+ return r && (se(r) === "html" || se(r) === "body" && ce(r).position === "static") ? t : r || Qr(e) || t;
367
+ }
368
+ function or(e) {
369
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
370
+ }
371
+ function Ne(e, t, r) {
372
+ return he(e, Xe(t, r));
373
+ }
374
+ function Jr(e, t, r) {
375
+ var o = Ne(e, t, r);
376
+ return o > r ? r : o;
377
+ }
378
+ function nr() {
379
+ return {
380
+ top: 0,
381
+ right: 0,
382
+ bottom: 0,
383
+ left: 0
384
+ };
385
+ }
386
+ function Zr(e) {
387
+ return Object.assign({}, nr(), e);
388
+ }
389
+ function eo(e, t) {
390
+ return t.reduce(function(r, o) {
391
+ return r[o] = e, r;
392
+ }, {});
393
+ }
394
+ function Ee(e) {
395
+ return e.split("-")[1];
396
+ }
397
+ var to = {
398
+ top: "auto",
399
+ right: "auto",
400
+ bottom: "auto",
401
+ left: "auto"
402
+ };
403
+ function ro(e, t) {
404
+ var r = e.x, o = e.y, n = t.devicePixelRatio || 1;
405
+ return {
406
+ x: Be(r * n) / n || 0,
407
+ y: Be(o * n) / n || 0
408
+ };
409
+ }
410
+ function xt(e) {
411
+ var t, r = e.popper, o = e.popperRect, n = e.placement, l = e.variation, c = e.offsets, a = e.position, i = e.gpuAcceleration, s = e.adaptive, u = e.roundOffsets, d = e.isFixed, v = c.x, f = v === void 0 ? 0 : v, g = c.y, b = g === void 0 ? 0 : g, h = typeof u == "function" ? u({
412
+ x: f,
413
+ y: b
414
+ }) : {
415
+ x: f,
416
+ y: b
417
+ };
418
+ f = h.x, b = h.y;
419
+ var $ = c.hasOwnProperty("x"), A = c.hasOwnProperty("y"), V = re, _ = Z, C = window;
420
+ if (s) {
421
+ var I = tt(r), R = "clientHeight", G = "clientWidth";
422
+ if (I === Q(r) && (I = fe(r), ce(I).position !== "static" && a === "absolute" && (R = "scrollHeight", G = "scrollWidth")), I = I, n === Z || (n === re || n === ue) && l === xe) {
423
+ _ = ie;
424
+ var j = d && I === C && C.visualViewport ? C.visualViewport.height : (
425
+ // $FlowFixMe[prop-missing]
426
+ I[R]
427
+ );
428
+ b -= j - o.height, b *= i ? 1 : -1;
429
+ }
430
+ if (n === re || (n === Z || n === ie) && l === xe) {
431
+ V = ue;
432
+ var F = d && I === C && C.visualViewport ? C.visualViewport.width : (
433
+ // $FlowFixMe[prop-missing]
434
+ I[G]
435
+ );
436
+ f -= F - o.width, f *= i ? 1 : -1;
437
+ }
438
+ }
439
+ var W = Object.assign({
440
+ position: a
441
+ }, s && to), y = u === !0 ? ro({
442
+ x: f,
443
+ y: b
444
+ }, Q(r)) : {
445
+ x: f,
446
+ y: b
447
+ };
448
+ if (f = y.x, b = y.y, i) {
449
+ var B;
450
+ return Object.assign({}, W, (B = {}, B[_] = A ? "0" : "", B[V] = $ ? "0" : "", B.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + b + "px)" : "translate3d(" + f + "px, " + b + "px, 0)", B));
451
+ }
452
+ return Object.assign({}, W, (t = {}, t[_] = A ? b + "px" : "", t[V] = $ ? f + "px" : "", t.transform = "", t));
453
+ }
454
+ function oo(e) {
455
+ var t = e.state, r = e.options, o = r.gpuAcceleration, n = o === void 0 ? !0 : o, l = r.adaptive, c = l === void 0 ? !0 : l, a = r.roundOffsets, i = a === void 0 ? !0 : a, s = {
456
+ placement: le(t.placement),
457
+ variation: Ee(t.placement),
458
+ popper: t.elements.popper,
459
+ popperRect: t.rects.popper,
460
+ gpuAcceleration: n,
461
+ isFixed: t.options.strategy === "fixed"
462
+ };
463
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, xt(Object.assign({}, s, {
464
+ offsets: t.modifiersData.popperOffsets,
465
+ position: t.options.strategy,
466
+ adaptive: c,
467
+ roundOffsets: i
468
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, xt(Object.assign({}, s, {
469
+ offsets: t.modifiersData.arrow,
470
+ position: "absolute",
471
+ adaptive: !1,
472
+ roundOffsets: i
473
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
474
+ "data-popper-placement": t.placement
475
+ });
476
+ }
477
+ const no = {
478
+ name: "computeStyles",
479
+ enabled: !0,
480
+ phase: "beforeWrite",
481
+ fn: oo,
482
+ data: {}
483
+ };
484
+ var qe = {
485
+ passive: !0
486
+ };
487
+ function ao(e) {
488
+ var t = e.state, r = e.instance, o = e.options, n = o.scroll, l = n === void 0 ? !0 : n, c = o.resize, a = c === void 0 ? !0 : c, i = Q(t.elements.popper), s = [].concat(t.scrollParents.reference, t.scrollParents.popper);
489
+ return l && s.forEach(function(u) {
490
+ u.addEventListener("scroll", r.update, qe);
491
+ }), a && i.addEventListener("resize", r.update, qe), function() {
492
+ l && s.forEach(function(u) {
493
+ u.removeEventListener("scroll", r.update, qe);
494
+ }), a && i.removeEventListener("resize", r.update, qe);
495
+ };
496
+ }
497
+ const io = {
498
+ name: "eventListeners",
499
+ enabled: !0,
500
+ phase: "write",
501
+ fn: function() {
502
+ },
503
+ effect: ao,
504
+ data: {}
505
+ };
506
+ var so = {
507
+ left: "right",
508
+ right: "left",
509
+ bottom: "top",
510
+ top: "bottom"
511
+ };
512
+ function Ge(e) {
513
+ return e.replace(/left|right|bottom|top/g, function(t) {
514
+ return so[t];
515
+ });
516
+ }
517
+ var lo = {
518
+ start: "end",
519
+ end: "start"
520
+ };
521
+ function zt(e) {
522
+ return e.replace(/start|end/g, function(t) {
523
+ return lo[t];
524
+ });
525
+ }
526
+ function ht(e) {
527
+ var t = Q(e), r = t.pageXOffset, o = t.pageYOffset;
528
+ return {
529
+ scrollLeft: r,
530
+ scrollTop: o
531
+ };
532
+ }
533
+ function yt(e) {
534
+ return Se(fe(e)).left + ht(e).scrollLeft;
535
+ }
536
+ function uo(e, t) {
537
+ var r = Q(e), o = fe(e), n = r.visualViewport, l = o.clientWidth, c = o.clientHeight, a = 0, i = 0;
538
+ if (n) {
539
+ l = n.width, c = n.height;
540
+ var s = tr();
541
+ (s || !s && t === "fixed") && (a = n.offsetLeft, i = n.offsetTop);
542
+ }
543
+ return {
544
+ width: l,
545
+ height: c,
546
+ x: a + yt(e),
547
+ y: i
548
+ };
549
+ }
550
+ function co(e) {
551
+ var t, r = fe(e), o = ht(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, l = he(r.scrollWidth, r.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), c = he(r.scrollHeight, r.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), a = -o.scrollLeft + yt(e), i = -o.scrollTop;
552
+ return ce(n || r).direction === "rtl" && (a += he(r.clientWidth, n ? n.clientWidth : 0) - l), {
553
+ width: l,
554
+ height: c,
555
+ x: a,
556
+ y: i
557
+ };
558
+ }
559
+ function $t(e) {
560
+ var t = ce(e), r = t.overflow, o = t.overflowX, n = t.overflowY;
561
+ return /auto|scroll|overlay|hidden/.test(r + n + o);
562
+ }
563
+ function ar(e) {
564
+ return ["html", "body", "#document"].indexOf(se(e)) >= 0 ? e.ownerDocument.body : ee(e) && $t(e) ? e : ar(et(e));
565
+ }
566
+ function Me(e, t) {
567
+ var r;
568
+ t === void 0 && (t = []);
569
+ var o = ar(e), n = o === ((r = e.ownerDocument) == null ? void 0 : r.body), l = Q(o), c = n ? [l].concat(l.visualViewport || [], $t(o) ? o : []) : o, a = t.concat(c);
570
+ return n ? a : (
571
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
572
+ a.concat(Me(et(c)))
573
+ );
574
+ }
575
+ function pt(e) {
576
+ return Object.assign({}, e, {
577
+ left: e.x,
578
+ top: e.y,
579
+ right: e.x + e.width,
580
+ bottom: e.y + e.height
581
+ });
582
+ }
583
+ function po(e, t) {
584
+ var r = Se(e, !1, t === "fixed");
585
+ return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
586
+ }
587
+ function Rt(e, t, r) {
588
+ return t === Zt ? pt(uo(e, r)) : $e(t) ? po(t, r) : pt(co(fe(e)));
589
+ }
590
+ function fo(e) {
591
+ var t = Me(et(e)), r = ["absolute", "fixed"].indexOf(ce(e).position) >= 0, o = r && ee(e) ? tt(e) : e;
592
+ return $e(o) ? t.filter(function(n) {
593
+ return $e(n) && Yr(n, o) && se(n) !== "body";
594
+ }) : [];
595
+ }
596
+ function vo(e, t, r, o) {
597
+ var n = t === "clippingParents" ? fo(e) : [].concat(t), l = [].concat(n, [r]), c = l[0], a = l.reduce(function(i, s) {
598
+ var u = Rt(e, s, o);
599
+ return i.top = he(u.top, i.top), i.right = Xe(u.right, i.right), i.bottom = Xe(u.bottom, i.bottom), i.left = he(u.left, i.left), i;
600
+ }, Rt(e, c, o));
601
+ return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
602
+ }
603
+ function ir(e) {
604
+ var t = e.reference, r = e.element, o = e.placement, n = o ? le(o) : null, l = o ? Ee(o) : null, c = t.x + t.width / 2 - r.width / 2, a = t.y + t.height / 2 - r.height / 2, i;
605
+ switch (n) {
606
+ case Z:
607
+ i = {
608
+ x: c,
609
+ y: t.y - r.height
610
+ };
611
+ break;
612
+ case ie:
613
+ i = {
614
+ x: c,
615
+ y: t.y + t.height
616
+ };
617
+ break;
618
+ case ue:
619
+ i = {
620
+ x: t.x + t.width,
621
+ y: a
622
+ };
623
+ break;
624
+ case re:
625
+ i = {
626
+ x: t.x - r.width,
627
+ y: a
628
+ };
629
+ break;
630
+ default:
631
+ i = {
632
+ x: t.x,
633
+ y: t.y
634
+ };
635
+ }
636
+ var s = n ? or(n) : null;
637
+ if (s != null) {
638
+ var u = s === "y" ? "height" : "width";
639
+ switch (l) {
640
+ case De:
641
+ i[s] = i[s] - (t[u] / 2 - r[u] / 2);
642
+ break;
643
+ case xe:
644
+ i[s] = i[s] + (t[u] / 2 - r[u] / 2);
645
+ break;
646
+ }
647
+ }
648
+ return i;
649
+ }
650
+ function kt(e, t) {
651
+ t === void 0 && (t = {});
652
+ var r = t, o = r.placement, n = o === void 0 ? e.placement : o, l = r.strategy, c = l === void 0 ? e.strategy : l, a = r.boundary, i = a === void 0 ? Vr : a, s = r.rootBoundary, u = s === void 0 ? Zt : s, d = r.elementContext, v = d === void 0 ? Ve : d, f = r.altBoundary, g = f === void 0 ? !1 : f, b = r.padding, h = b === void 0 ? 0 : b, $ = Zr(typeof h != "number" ? h : eo(h, Ze)), A = v === Ve ? Mr : Ve, V = e.rects.popper, _ = e.elements[g ? A : v], C = vo($e(_) ? _ : _.contextElement || fe(e.elements.popper), i, u, c), I = Se(e.elements.reference), R = ir({
653
+ reference: I,
654
+ element: V,
655
+ placement: n
656
+ }), G = pt(Object.assign({}, V, R)), j = v === Ve ? G : I, F = {
657
+ top: C.top - j.top + $.top,
658
+ bottom: j.bottom - C.bottom + $.bottom,
659
+ left: C.left - j.left + $.left,
660
+ right: j.right - C.right + $.right
661
+ }, W = e.modifiersData.offset;
662
+ if (v === Ve && W) {
663
+ var y = W[n];
664
+ Object.keys(F).forEach(function(B) {
665
+ var x = [ue, ie].indexOf(B) >= 0 ? 1 : -1, J = [Z, ie].indexOf(B) >= 0 ? "y" : "x";
666
+ F[B] += y[J] * x;
667
+ });
668
+ }
669
+ return F;
670
+ }
671
+ function mo(e, t) {
672
+ t === void 0 && (t = {});
673
+ var r = t, o = r.placement, n = r.boundary, l = r.rootBoundary, c = r.padding, a = r.flipVariations, i = r.allowedAutoPlacements, s = i === void 0 ? er : i, u = Ee(o), d = u ? a ? Vt : Vt.filter(function(g) {
674
+ return Ee(g) === u;
675
+ }) : Ze, v = d.filter(function(g) {
676
+ return s.indexOf(g) >= 0;
677
+ });
678
+ v.length === 0 && (v = d);
679
+ var f = v.reduce(function(g, b) {
680
+ return g[b] = kt(e, {
681
+ placement: b,
682
+ boundary: n,
683
+ rootBoundary: l,
684
+ padding: c
685
+ })[le(b)], g;
686
+ }, {});
687
+ return Object.keys(f).sort(function(g, b) {
688
+ return f[g] - f[b];
689
+ });
690
+ }
691
+ function bo(e) {
692
+ if (le(e) === bt)
693
+ return [];
694
+ var t = Ge(e);
695
+ return [zt(e), t, zt(t)];
696
+ }
697
+ function go(e) {
698
+ var t = e.state, r = e.options, o = e.name;
699
+ if (!t.modifiersData[o]._skip) {
700
+ for (var n = r.mainAxis, l = n === void 0 ? !0 : n, c = r.altAxis, a = c === void 0 ? !0 : c, i = r.fallbackPlacements, s = r.padding, u = r.boundary, d = r.rootBoundary, v = r.altBoundary, f = r.flipVariations, g = f === void 0 ? !0 : f, b = r.allowedAutoPlacements, h = t.options.placement, $ = le(h), A = $ === h, V = i || (A || !g ? [Ge(h)] : bo(h)), _ = [h].concat(V).reduce(function(Ce, de) {
701
+ return Ce.concat(le(de) === bt ? mo(t, {
702
+ placement: de,
703
+ boundary: u,
704
+ rootBoundary: d,
705
+ padding: s,
706
+ flipVariations: g,
707
+ allowedAutoPlacements: b
708
+ }) : de);
709
+ }, []), C = t.rects.reference, I = t.rects.popper, R = /* @__PURE__ */ new Map(), G = !0, j = _[0], F = 0; F < _.length; F++) {
710
+ var W = _[F], y = le(W), B = Ee(W) === De, x = [Z, ie].indexOf(y) >= 0, J = x ? "width" : "height", X = kt(t, {
711
+ placement: W,
712
+ boundary: u,
713
+ rootBoundary: d,
714
+ altBoundary: v,
715
+ padding: s
716
+ }), te = x ? B ? ue : re : B ? ie : Z;
717
+ C[J] > I[J] && (te = Ge(te));
718
+ var Re = Ge(te), ve = [];
719
+ if (l && ve.push(X[y] <= 0), a && ve.push(X[te] <= 0, X[Re] <= 0), ve.every(function(Ce) {
720
+ return Ce;
721
+ })) {
722
+ j = W, G = !1;
723
+ break;
724
+ }
725
+ R.set(W, ve);
726
+ }
727
+ if (G)
728
+ for (var Fe = g ? 3 : 1, rt = function(de) {
729
+ var Le = _.find(function(je) {
730
+ var me = R.get(je);
731
+ if (me)
732
+ return me.slice(0, de).every(function(ot) {
733
+ return ot;
734
+ });
735
+ });
736
+ if (Le)
737
+ return j = Le, "break";
738
+ }, Ae = Fe; Ae > 0; Ae--) {
739
+ var Te = rt(Ae);
740
+ if (Te === "break") break;
741
+ }
742
+ t.placement !== j && (t.modifiersData[o]._skip = !0, t.placement = j, t.reset = !0);
743
+ }
744
+ }
745
+ const ho = {
746
+ name: "flip",
747
+ enabled: !0,
748
+ phase: "main",
749
+ fn: go,
750
+ requiresIfExists: ["offset"],
751
+ data: {
752
+ _skip: !1
753
+ }
754
+ };
755
+ function yo(e, t, r) {
756
+ var o = le(e), n = [re, Z].indexOf(o) >= 0 ? -1 : 1, l = typeof r == "function" ? r(Object.assign({}, t, {
757
+ placement: e
758
+ })) : r, c = l[0], a = l[1];
759
+ return c = c || 0, a = (a || 0) * n, [re, ue].indexOf(o) >= 0 ? {
760
+ x: a,
761
+ y: c
762
+ } : {
763
+ x: c,
764
+ y: a
765
+ };
766
+ }
767
+ function $o(e) {
768
+ var t = e.state, r = e.options, o = e.name, n = r.offset, l = n === void 0 ? [0, 0] : n, c = er.reduce(function(u, d) {
769
+ return u[d] = yo(d, t.rects, l), u;
770
+ }, {}), a = c[t.placement], i = a.x, s = a.y;
771
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += s), t.modifiersData[o] = c;
772
+ }
773
+ const ko = {
774
+ name: "offset",
775
+ enabled: !0,
776
+ phase: "main",
777
+ requires: ["popperOffsets"],
778
+ fn: $o
779
+ };
780
+ function _o(e) {
781
+ var t = e.state, r = e.name;
782
+ t.modifiersData[r] = ir({
783
+ reference: t.rects.reference,
784
+ element: t.rects.popper,
785
+ placement: t.placement
786
+ });
787
+ }
788
+ const wo = {
789
+ name: "popperOffsets",
790
+ enabled: !0,
791
+ phase: "read",
792
+ fn: _o,
793
+ data: {}
794
+ };
795
+ function Co(e) {
796
+ return e === "x" ? "y" : "x";
797
+ }
798
+ function Io(e) {
799
+ var t = e.state, r = e.options, o = e.name, n = r.mainAxis, l = n === void 0 ? !0 : n, c = r.altAxis, a = c === void 0 ? !1 : c, i = r.boundary, s = r.rootBoundary, u = r.altBoundary, d = r.padding, v = r.tether, f = v === void 0 ? !0 : v, g = r.tetherOffset, b = g === void 0 ? 0 : g, h = kt(t, {
800
+ boundary: i,
801
+ rootBoundary: s,
802
+ padding: d,
803
+ altBoundary: u
804
+ }), $ = le(t.placement), A = Ee(t.placement), V = !A, _ = or($), C = Co(_), I = t.modifiersData.popperOffsets, R = t.rects.reference, G = t.rects.popper, j = typeof b == "function" ? b(Object.assign({}, t.rects, {
805
+ placement: t.placement
806
+ })) : b, F = typeof j == "number" ? {
807
+ mainAxis: j,
808
+ altAxis: j
809
+ } : Object.assign({
810
+ mainAxis: 0,
811
+ altAxis: 0
812
+ }, j), W = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, y = {
813
+ x: 0,
814
+ y: 0
815
+ };
816
+ if (I) {
817
+ if (l) {
818
+ var B, x = _ === "y" ? Z : re, J = _ === "y" ? ie : ue, X = _ === "y" ? "height" : "width", te = I[_], Re = te + h[x], ve = te - h[J], Fe = f ? -G[X] / 2 : 0, rt = A === De ? R[X] : G[X], Ae = A === De ? -G[X] : -R[X], Te = t.elements.arrow, Ce = f && Te ? rr(Te) : {
819
+ width: 0,
820
+ height: 0
821
+ }, de = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : nr(), Le = de[x], je = de[J], me = Ne(0, R[X], Ce[X]), ot = V ? R[X] / 2 - Fe - me - Le - F.mainAxis : rt - me - Le - F.mainAxis, pr = V ? -R[X] / 2 + Fe + me + je + F.mainAxis : Ae + me + je + F.mainAxis, nt = t.elements.arrow && tt(t.elements.arrow), fr = nt ? _ === "y" ? nt.clientTop || 0 : nt.clientLeft || 0 : 0, Ct = (B = W?.[_]) != null ? B : 0, vr = te + ot - Ct - fr, mr = te + pr - Ct, It = Ne(f ? Xe(Re, vr) : Re, te, f ? he(ve, mr) : ve);
822
+ I[_] = It, y[_] = It - te;
823
+ }
824
+ if (a) {
825
+ var Ot, br = _ === "x" ? Z : re, gr = _ === "x" ? ie : ue, be = I[C], We = C === "y" ? "height" : "width", Dt = be + h[br], Bt = be - h[gr], at = [Z, re].indexOf($) !== -1, St = (Ot = W?.[C]) != null ? Ot : 0, Et = at ? Dt : be - R[We] - G[We] - St + F.altAxis, Pt = at ? be + R[We] + G[We] - St - F.altAxis : Bt, At = f && at ? Jr(Et, be, Pt) : Ne(f ? Et : Dt, be, f ? Pt : Bt);
826
+ I[C] = At, y[C] = At - be;
827
+ }
828
+ t.modifiersData[o] = y;
829
+ }
830
+ }
831
+ const Oo = {
832
+ name: "preventOverflow",
833
+ enabled: !0,
834
+ phase: "main",
835
+ fn: Io,
836
+ requiresIfExists: ["offset"]
837
+ };
838
+ function Do(e) {
839
+ return {
840
+ scrollLeft: e.scrollLeft,
841
+ scrollTop: e.scrollTop
842
+ };
843
+ }
844
+ function Bo(e) {
845
+ return e === Q(e) || !ee(e) ? ht(e) : Do(e);
846
+ }
847
+ function So(e) {
848
+ var t = e.getBoundingClientRect(), r = Be(t.width) / e.offsetWidth || 1, o = Be(t.height) / e.offsetHeight || 1;
849
+ return r !== 1 || o !== 1;
850
+ }
851
+ function Eo(e, t, r) {
852
+ r === void 0 && (r = !1);
853
+ var o = ee(t), n = ee(t) && So(t), l = fe(t), c = Se(e, n, r), a = {
854
+ scrollLeft: 0,
855
+ scrollTop: 0
856
+ }, i = {
857
+ x: 0,
858
+ y: 0
859
+ };
860
+ return (o || !o && !r) && ((se(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
861
+ $t(l)) && (a = Bo(t)), ee(t) ? (i = Se(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : l && (i.x = yt(l))), {
862
+ x: c.left + a.scrollLeft - i.x,
863
+ y: c.top + a.scrollTop - i.y,
864
+ width: c.width,
865
+ height: c.height
866
+ };
867
+ }
868
+ function Po(e) {
869
+ var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), o = [];
870
+ e.forEach(function(l) {
871
+ t.set(l.name, l);
872
+ });
873
+ function n(l) {
874
+ r.add(l.name);
875
+ var c = [].concat(l.requires || [], l.requiresIfExists || []);
876
+ c.forEach(function(a) {
877
+ if (!r.has(a)) {
878
+ var i = t.get(a);
879
+ i && n(i);
880
+ }
881
+ }), o.push(l);
882
+ }
883
+ return e.forEach(function(l) {
884
+ r.has(l.name) || n(l);
885
+ }), o;
886
+ }
887
+ function Ao(e) {
888
+ var t = Po(e);
889
+ return Gr.reduce(function(r, o) {
890
+ return r.concat(t.filter(function(n) {
891
+ return n.phase === o;
892
+ }));
893
+ }, []);
894
+ }
895
+ function Lo(e) {
896
+ var t;
897
+ return function() {
898
+ return t || (t = new Promise(function(r) {
899
+ Promise.resolve().then(function() {
900
+ t = void 0, r(e());
901
+ });
902
+ })), t;
903
+ };
904
+ }
905
+ function Vo(e) {
906
+ var t = e.reduce(function(r, o) {
907
+ var n = r[o.name];
908
+ return r[o.name] = n ? Object.assign({}, n, o, {
909
+ options: Object.assign({}, n.options, o.options),
910
+ data: Object.assign({}, n.data, o.data)
911
+ }) : o, r;
912
+ }, {});
913
+ return Object.keys(t).map(function(r) {
914
+ return t[r];
915
+ });
916
+ }
917
+ var Ft = {
918
+ placement: "bottom",
919
+ modifiers: [],
920
+ strategy: "absolute"
921
+ };
922
+ function Tt() {
923
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
924
+ t[r] = arguments[r];
925
+ return !t.some(function(o) {
926
+ return !(o && typeof o.getBoundingClientRect == "function");
927
+ });
928
+ }
929
+ function Mo(e) {
930
+ e === void 0 && (e = {});
931
+ var t = e, r = t.defaultModifiers, o = r === void 0 ? [] : r, n = t.defaultOptions, l = n === void 0 ? Ft : n;
932
+ return function(a, i, s) {
933
+ s === void 0 && (s = l);
934
+ var u = {
935
+ placement: "bottom",
936
+ orderedModifiers: [],
937
+ options: Object.assign({}, Ft, l),
938
+ modifiersData: {},
939
+ elements: {
940
+ reference: a,
941
+ popper: i
942
+ },
943
+ attributes: {},
944
+ styles: {}
945
+ }, d = [], v = !1, f = {
946
+ state: u,
947
+ setOptions: function($) {
948
+ var A = typeof $ == "function" ? $(u.options) : $;
949
+ b(), u.options = Object.assign({}, l, u.options, A), u.scrollParents = {
950
+ reference: $e(a) ? Me(a) : a.contextElement ? Me(a.contextElement) : [],
951
+ popper: Me(i)
952
+ };
953
+ var V = Ao(Vo([].concat(o, u.options.modifiers)));
954
+ return u.orderedModifiers = V.filter(function(_) {
955
+ return _.enabled;
956
+ }), g(), f.update();
957
+ },
958
+ // Sync update – it will always be executed, even if not necessary. This
959
+ // is useful for low frequency updates where sync behavior simplifies the
960
+ // logic.
961
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
962
+ // prefer the async Popper#update method
963
+ forceUpdate: function() {
964
+ if (!v) {
965
+ var $ = u.elements, A = $.reference, V = $.popper;
966
+ if (Tt(A, V)) {
967
+ u.rects = {
968
+ reference: Eo(A, tt(V), u.options.strategy === "fixed"),
969
+ popper: rr(V)
970
+ }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(F) {
971
+ return u.modifiersData[F.name] = Object.assign({}, F.data);
972
+ });
973
+ for (var _ = 0; _ < u.orderedModifiers.length; _++) {
974
+ if (u.reset === !0) {
975
+ u.reset = !1, _ = -1;
976
+ continue;
977
+ }
978
+ var C = u.orderedModifiers[_], I = C.fn, R = C.options, G = R === void 0 ? {} : R, j = C.name;
979
+ typeof I == "function" && (u = I({
980
+ state: u,
981
+ options: G,
982
+ name: j,
983
+ instance: f
984
+ }) || u);
985
+ }
986
+ }
987
+ }
988
+ },
989
+ // Async and optimistically optimized update – it will not be executed if
990
+ // not necessary (debounced to run at most once-per-tick)
991
+ update: Lo(function() {
992
+ return new Promise(function(h) {
993
+ f.forceUpdate(), h(u);
994
+ });
995
+ }),
996
+ destroy: function() {
997
+ b(), v = !0;
998
+ }
999
+ };
1000
+ if (!Tt(a, i))
1001
+ return f;
1002
+ f.setOptions(s).then(function(h) {
1003
+ !v && s.onFirstUpdate && s.onFirstUpdate(h);
1004
+ });
1005
+ function g() {
1006
+ u.orderedModifiers.forEach(function(h) {
1007
+ var $ = h.name, A = h.options, V = A === void 0 ? {} : A, _ = h.effect;
1008
+ if (typeof _ == "function") {
1009
+ var C = _({
1010
+ state: u,
1011
+ name: $,
1012
+ instance: f,
1013
+ options: V
1014
+ }), I = function() {
1015
+ };
1016
+ d.push(C || I);
1017
+ }
1018
+ });
1019
+ }
1020
+ function b() {
1021
+ d.forEach(function(h) {
1022
+ return h();
1023
+ }), d = [];
1024
+ }
1025
+ return f;
1026
+ };
1027
+ }
1028
+ var xo = [io, wo, no, Xr], zo = /* @__PURE__ */ Mo({
1029
+ defaultModifiers: xo
1030
+ });
1031
+ function sr(e, t, r = {}) {
1032
+ const o = S(void 0);
1033
+ function n() {
1034
+ zo(e.value, t.value, {
1035
+ placement: r.placement || "bottom-start",
1036
+ modifiers: [ho, Oo, ko, { name: "offset", options: { offset: [0, 4] } }]
1037
+ });
1038
+ }
1039
+ function l() {
1040
+ e.value && t.value && n();
1041
+ }
1042
+ return ye(e, l), ye(t, l), we(l), o;
1043
+ }
1044
+ function ge(e, t) {
1045
+ return typeof t == "function" ? t(e) : t ? e[t] : e;
1046
+ }
1047
+ function jt(e, t = {}, r) {
1048
+ const o = t.stringifyValue || String, n = o(ge(e, t.value));
1049
+ return {
1050
+ value: n,
1051
+ label: ge(e, t.label),
1052
+ disabled: t.disabled && ge(e, t.disabled),
1053
+ description: t.description && ge(e, t.description),
1054
+ icon: t.icon && ge(e, t.icon),
1055
+ isSelected: r === void 0 ? void 0 : n === o(r),
1056
+ data: e
1057
+ };
1058
+ }
1059
+ function ke(e, t = {}, r) {
1060
+ return Array.isArray(e) ? e.map((o) => jt(o, t, r)) : typeof e == "object" && e !== null ? Object.entries(e || {}).reduce((o, [n, l]) => o.concat({
1061
+ ...jt(n, t, r),
1062
+ label: l,
1063
+ data: n
1064
+ }), []) : [];
1065
+ }
1066
+ function lr(e, t = {}, r) {
1067
+ return Array.isArray(e) ? e.map((o) => ({
1068
+ label: ge(o, t.groupLabel),
1069
+ options: ke(ge(o, t.groupOptions), t, r)
1070
+ })) : typeof e == "object" && e !== null ? Object.entries(e || {}).reduce(
1071
+ (o, [n, l]) => o.concat({ label: n, options: ke(l, t, r) }),
1072
+ []
1073
+ ) : [];
1074
+ }
1075
+ const Ro = ["placeholder", "disabled", "value"], Fo = { class: "Autocomplete__optionLabel" }, To = {
1076
+ key: 0,
1077
+ class: "Autocomplete__optionDescription"
1078
+ }, jo = {
1079
+ inheritAttrs: !1
1080
+ }, Wo = /* @__PURE__ */ M({
1081
+ ...jo,
1082
+ __name: "Autocomplete",
1083
+ props: /* @__PURE__ */ K({
1084
+ prefixIcon: {},
1085
+ suffixIcon: {},
1086
+ size: { default: "normal" },
1087
+ invalid: { type: Boolean },
1088
+ pill: { type: Boolean },
1089
+ options: {},
1090
+ optionLabel: {},
1091
+ optionValue: {},
1092
+ optionDisabled: {},
1093
+ optionDescription: {},
1094
+ optionIcon: {},
1095
+ groupLabel: {},
1096
+ groupOptions: {},
1097
+ placeholder: {},
1098
+ disabled: { type: Boolean },
1099
+ inputClass: {},
1100
+ filter: {}
1101
+ }, {
1102
+ modelValue: { default: "" },
1103
+ modelModifiers: {}
1104
+ }),
1105
+ emits: /* @__PURE__ */ K(["prefix-icon-click", "suffix-icon-click", "select"], ["update:modelValue"]),
1106
+ setup(e, { expose: t, emit: r }) {
1107
+ const o = ne(e, "modelValue"), n = e, l = r, c = Pe(), a = S(), i = S(), s = S(), u = S(!1), d = k(() => {
1108
+ const y = {
1109
+ value: n.optionValue,
1110
+ label: n.optionLabel,
1111
+ disabled: n.optionDisabled,
1112
+ description: n.optionDescription,
1113
+ icon: n.optionIcon
1114
+ };
1115
+ return n.groupOptions ? lr(
1116
+ n.options,
1117
+ {
1118
+ groupLabel: n.groupLabel,
1119
+ groupOptions: n.groupOptions,
1120
+ ...y
1121
+ },
1122
+ o.value
1123
+ ).flatMap((x) => x.options) : ke(n.options, y, o.value);
1124
+ });
1125
+ function v(y, B) {
1126
+ if (!B)
1127
+ return !0;
1128
+ const x = B.toLowerCase(), J = String(y.label).toLowerCase(), X = y.description ? String(y.description).toLowerCase() : "";
1129
+ return J.includes(x) || X.includes(x);
1130
+ }
1131
+ const f = k(() => {
1132
+ const y = n.filter || v;
1133
+ return d.value.filter((B) => y(B, o.value));
1134
+ }), g = k(() => f.value), { cursorIndex: b, cursorItem: h, moveCursorForward: $, moveCursorBack: A, resetCursor: V } = Lr(g), _ = k(() => a.value?.$el);
1135
+ sr(_, i), Jt(_, (y) => {
1136
+ u.value && !y.defaultPrevented && (y.preventDefault(), I());
1137
+ });
1138
+ function C() {
1139
+ u.value || n.disabled || (u.value = !0, V());
1140
+ }
1141
+ function I() {
1142
+ u.value && (u.value = !1);
1143
+ }
1144
+ function R(y) {
1145
+ o.value = y.target.value, C();
1146
+ }
1147
+ function G(y) {
1148
+ switch (y.key) {
1149
+ case "ArrowDown":
1150
+ y.preventDefault(), u.value ? $() : C();
1151
+ break;
1152
+ case "ArrowUp":
1153
+ y.preventDefault(), u.value && A();
1154
+ break;
1155
+ case "Enter":
1156
+ y.preventDefault(), u.value && h.value && W(h.value);
1157
+ break;
1158
+ case "Escape":
1159
+ u.value && (y.preventDefault(), I());
1160
+ break;
1161
+ case "Tab":
1162
+ I();
1163
+ break;
1164
+ }
1165
+ }
1166
+ function j() {
1167
+ u.value || C();
1168
+ }
1169
+ function F({ item: y }) {
1170
+ W(y);
1171
+ }
1172
+ function W(y) {
1173
+ y.disabled || (o.value = String(y.label), l("select", y), I(), kr(() => {
1174
+ s.value?.focus();
1175
+ }));
1176
+ }
1177
+ return t({
1178
+ inputElement: s,
1179
+ focus: () => s.value?.focus(),
1180
+ blur: () => s.value?.blur(),
1181
+ open: C,
1182
+ close: I,
1183
+ filter: v
1184
+ }), (y, B) => (p(), z(Je, {
1185
+ ref_key: "rootElement",
1186
+ ref: a,
1187
+ class: T(["Autocomplete", y.$attrs.class]),
1188
+ size: y.$props.size,
1189
+ invalid: y.$props.invalid,
1190
+ disabled: y.$props.disabled,
1191
+ prefixIcon: y.$props.prefixIcon,
1192
+ suffixIcon: y.$props.suffixIcon,
1193
+ pill: y.$props.pill,
1194
+ onClick: B[1] || (B[1] = (x) => s.value?.focus()),
1195
+ onPrefixIconClick: B[2] || (B[2] = (x) => y.$emit("prefix-icon-click")),
1196
+ onSuffixIconClick: B[3] || (B[3] = (x) => y.$emit("suffix-icon-click"))
1197
+ }, Qe({
1198
+ default: P(() => [
1199
+ D("input", q({
1200
+ ref_key: "inputElement",
1201
+ ref: s
1202
+ }, E(c), {
1203
+ class: ["vuiii-input__nested Autocomplete__input", e.inputClass],
1204
+ placeholder: e.placeholder,
1205
+ disabled: e.disabled,
1206
+ value: o.value,
1207
+ onInput: R,
1208
+ onClick: j,
1209
+ onKeydown: G
1210
+ }), null, 16, Ro),
1211
+ U(Qt, { duration: 100 }, {
1212
+ default: P(() => [
1213
+ u.value && g.value.length > 0 ? (p(), m("div", {
1214
+ key: 0,
1215
+ class: "Autocomplete__dropdown",
1216
+ ref_key: "dropdownElement",
1217
+ ref: i
1218
+ }, [
1219
+ U(Dr, {
1220
+ class: "Autocomplete__dropdownMenu",
1221
+ items: g.value,
1222
+ cursorIndex: E(b),
1223
+ onItemClick: F,
1224
+ onItemMouseenter: B[0] || (B[0] = ({ index: x }) => b.value = x)
1225
+ }, {
1226
+ itemLabel: P(({ item: x, index: J }) => [
1227
+ w(y.$slots, "option", {
1228
+ option: x,
1229
+ index: J,
1230
+ isHighlighted: E(b) === J
1231
+ }, () => [
1232
+ D("div", Fo, L(x.label), 1),
1233
+ x.description ? (p(), m("div", To, L(x.description), 1)) : O("", !0)
1234
+ ], !0)
1235
+ ]),
1236
+ _: 3
1237
+ }, 8, ["items", "cursorIndex"])
1238
+ ], 512)) : O("", !0)
1239
+ ]),
1240
+ _: 3
1241
+ })
1242
+ ]),
1243
+ _: 2
1244
+ }, [
1245
+ y.$slots.prefix ? {
1246
+ name: "prefix",
1247
+ fn: P(() => [
1248
+ w(y.$slots, "prefix", {}, void 0, !0)
1249
+ ]),
1250
+ key: "0"
1251
+ } : void 0,
1252
+ y.$slots.suffix ? {
1253
+ name: "suffix",
1254
+ fn: P(() => [
1255
+ w(y.$slots, "suffix", {}, void 0, !0)
1256
+ ]),
1257
+ key: "1"
1258
+ } : void 0
1259
+ ]), 1032, ["class", "size", "invalid", "disabled", "prefixIcon", "suffixIcon", "pill"]));
1260
+ }
1261
+ }), Ra = /* @__PURE__ */ N(Wo, [["__scopeId", "data-v-bc6aeb05"]]), qo = { class: "Breadcrumbs" }, No = /* @__PURE__ */ M({
1262
+ __name: "Breadcrumbs",
1263
+ props: {
1264
+ breadcrumbs: { default: () => [] }
1265
+ },
1266
+ setup(e) {
1267
+ return (t, r) => {
1268
+ const o = Ut("router-link");
1269
+ return p(), m("div", qo, [
1270
+ (p(!0), m(H, null, Y(e.breadcrumbs, (n, l) => (p(), m("div", {
1271
+ key: l,
1272
+ class: "Breadcrumbs__breadcrumb"
1273
+ }, [
1274
+ U(o, {
1275
+ to: n.link,
1276
+ class: "Breadcrumbs__link"
1277
+ }, {
1278
+ default: P(() => [
1279
+ oe(L(n.label), 1)
1280
+ ]),
1281
+ _: 2
1282
+ }, 1032, ["to"]),
1283
+ U(ae, {
1284
+ name: "chevron-right",
1285
+ class: "Breadcrumbs__arrow"
1286
+ })
1287
+ ]))), 128))
1288
+ ]);
1289
+ };
1290
+ }
1291
+ }), Fa = /* @__PURE__ */ N(No, [["__scopeId", "data-v-44a63a08"]]), Go = { key: 0 }, ze = /* @__PURE__ */ M({
1292
+ __name: "Button",
1293
+ props: {
1294
+ disabled: { type: Boolean },
1295
+ type: { default: "button" },
1296
+ size: {},
1297
+ variant: {},
1298
+ prefixIcon: {},
1299
+ suffixIcon: {},
1300
+ label: {},
1301
+ block: { type: Boolean },
1302
+ loading: { type: Boolean },
1303
+ outlined: { type: Boolean },
1304
+ pill: { type: Boolean },
1305
+ to: {},
1306
+ href: {}
1307
+ },
1308
+ setup(e) {
1309
+ const t = e, r = k(() => t.to ? "router-link" : t.href ? "a" : "button");
1310
+ return (o, n) => (p(), z(Oe(r.value), q({
1311
+ class: ["Button vuiii-button", {
1312
+ [`vuiii-button--variant-${o.$props.variant}`]: o.$props.variant,
1313
+ [`vuiii-button--size-${o.$props.size}`]: o.$props.size,
1314
+ "vuiii-button--disabled": o.$props.disabled || o.$props.loading,
1315
+ "vuiii-button--loading": o.$props.loading,
1316
+ "vuiii-button--outlined": o.$props.outlined && o.$props.variant,
1317
+ "vuiii-button--block": o.$props.block,
1318
+ "vuiii-button--pill": o.$props.pill
1319
+ }]
1320
+ }, o.$attrs, {
1321
+ to: r.value === "router-link" ? o.$props.to : void 0,
1322
+ href: r.value === "a" ? o.$props.href : void 0,
1323
+ type: r.value === "button" ? o.$props.type : void 0
1324
+ }), {
1325
+ default: P(() => [
1326
+ w(o.$slots, "prefix", {}, () => [
1327
+ o.$props.prefixIcon || o.$props.loading ? (p(), z(ae, {
1328
+ key: 0,
1329
+ class: "vuiii-button__icon vuiii-button__icon--prefix",
1330
+ name: o.$props.loading ? "spinner" : o.$props.prefixIcon,
1331
+ size: o.$props.size
1332
+ }, null, 8, ["name", "size"])) : O("", !0)
1333
+ ]),
1334
+ o.$slots.default || o.$props.label ? (p(), m("span", Go, [
1335
+ w(o.$slots, "default", {}, () => [
1336
+ oe(L(o.$props.label), 1)
1337
+ ])
1338
+ ])) : O("", !0),
1339
+ w(o.$slots, "suffix", {}, () => [
1340
+ o.$props.suffixIcon ? (p(), z(ae, {
1341
+ key: 0,
1342
+ class: "vuiii-button__icon vuiii-button__icon--suffix",
1343
+ name: o.$props.suffixIcon,
1344
+ size: o.$props.size
1345
+ }, null, 8, ["name", "size"])) : O("", !0)
1346
+ ])
1347
+ ]),
1348
+ _: 3
1349
+ }, 16, ["class", "to", "href", "type"]));
1350
+ }
1351
+ }), Ho = {}, Uo = { class: "ButtonGroup" };
1352
+ function Xo(e, t) {
1353
+ return p(), m("div", Uo, [
1354
+ w(e.$slots, "default", {}, void 0, !0)
1355
+ ]);
1356
+ }
1357
+ const Yo = /* @__PURE__ */ N(Ho, [["render", Xo], ["__scopeId", "data-v-3d8ee6b9"]]), Ko = ["checked", "required", "disabled"], Qo = {
1358
+ key: 0,
1359
+ class: "Checkbox__switch"
1360
+ }, Jo = {
1361
+ key: 1,
1362
+ class: "Checkbox__checkbox vuiii-input"
1363
+ }, Zo = { key: 0 }, en = {
1364
+ key: 0,
1365
+ class: "Checkbox__label"
1366
+ }, tn = {
1367
+ key: 0,
1368
+ class: "Checkbox__required"
1369
+ }, rn = {
1370
+ key: 1,
1371
+ class: "Checkbox__description"
1372
+ }, on = {
1373
+ inheritAttrs: !1
1374
+ }, nn = /* @__PURE__ */ M({
1375
+ ...on,
1376
+ __name: "Checkbox",
1377
+ props: /* @__PURE__ */ K({
1378
+ required: { type: Boolean },
1379
+ disabled: { type: Boolean },
1380
+ switch: { type: Boolean },
1381
+ label: {},
1382
+ description: {},
1383
+ size: { default: "normal" },
1384
+ valueParser: {}
1385
+ }, {
1386
+ modelValue: {},
1387
+ modelModifiers: {}
1388
+ }),
1389
+ emits: ["update:modelValue"],
1390
+ setup(e) {
1391
+ const t = ne(e, "modelValue"), r = Pe(), o = e, n = k(() => o.valueParser || {
1392
+ parse: Boolean,
1393
+ stringify: Boolean
1394
+ }), l = k(() => n.value.stringify(t.value));
1395
+ function c(a) {
1396
+ t.value = n.value.parse(a.target.checked);
1397
+ }
1398
+ return (a, i) => (p(), m("label", {
1399
+ class: T(["Checkbox", [
1400
+ a.$attrs.class,
1401
+ {
1402
+ [`Checkbox--size-${a.$props.size}`]: a.$props.size,
1403
+ "Checkbox--disabled": a.$props.disabled
1404
+ }
1405
+ ]])
1406
+ }, [
1407
+ D("input", q({
1408
+ checked: l.value,
1409
+ class: "Checkbox__input",
1410
+ required: a.$props.required,
1411
+ disabled: a.$props.disabled,
1412
+ type: "checkbox"
1413
+ }, E(r), {
1414
+ onInput: i[0] || (i[0] = (s) => c(s))
1415
+ }), null, 16, Ko),
1416
+ w(a.$slots, "symbol", lt(ut({ disabled: !!e.disabled, size: e.size, checked: l.value })), () => [
1417
+ a.$props.switch ? (p(), m("div", Qo, [...i[1] || (i[1] = [
1418
+ D("div", { class: "Checkbox__switchDot" }, null, -1)
1419
+ ])])) : (p(), m("div", Jo, [
1420
+ U(ae, {
1421
+ name: "check",
1422
+ class: "Checkbox__checkboxIcon",
1423
+ size: a.$props.size
1424
+ }, null, 8, ["size"])
1425
+ ]))
1426
+ ], !0),
1427
+ a.$slots.default || a.$props.label || a.$props.description ? (p(), m("div", Zo, [
1428
+ a.$slots.default || a.$props.label ? (p(), m("div", en, [
1429
+ a.$props.required ? (p(), m("span", tn, "*")) : O("", !0),
1430
+ w(a.$slots, "default", {}, () => [
1431
+ oe(L(a.$props.label), 1)
1432
+ ], !0)
1433
+ ])) : O("", !0),
1434
+ a.$props.description ? (p(), m("div", rn, L(a.$props.description), 1)) : O("", !0)
1435
+ ])) : O("", !0)
1436
+ ], 2));
1437
+ }
1438
+ }), an = /* @__PURE__ */ N(nn, [["__scopeId", "data-v-927c8261"]]);
1439
+ function _t(e = "string") {
1440
+ return {
1441
+ string: {
1442
+ stringify: (r) => r == null ? "" : String(r),
1443
+ parse: (r) => r === "" ? void 0 : String(r)
1444
+ },
1445
+ number: {
1446
+ stringify: (r) => r == null ? "" : String(r),
1447
+ parse: (r) => r === "" ? void 0 : Number(r)
1448
+ },
1449
+ boolean: {
1450
+ stringify: (r) => r ? "true" : "false",
1451
+ parse: (r) => r === "true"
1452
+ },
1453
+ date: {
1454
+ stringify: (r) => new Date(r).toISOString(),
1455
+ parse: (r) => new Date(r)
1456
+ }
1457
+ }[e];
1458
+ }
1459
+ const sn = /* @__PURE__ */ M({
1460
+ __name: "CheckboxGroup",
1461
+ props: /* @__PURE__ */ K({
1462
+ options: {},
1463
+ optionLabel: {},
1464
+ optionValue: {},
1465
+ optionDisabled: {},
1466
+ optionDescription: {},
1467
+ valueParser: {},
1468
+ type: {},
1469
+ inline: { type: Boolean }
1470
+ }, {
1471
+ modelValue: {},
1472
+ modelModifiers: {}
1473
+ }),
1474
+ emits: ["update:modelValue"],
1475
+ setup(e) {
1476
+ const t = ne(e, "modelValue"), r = e, o = k(() => r.valueParser || _t(r.type)), n = k(() => ke(r.options, {
1477
+ value: r.optionValue,
1478
+ label: r.optionLabel,
1479
+ disabled: r.optionDisabled,
1480
+ description: r.optionDescription,
1481
+ stringifyValue: o.value.stringify
1482
+ })), l = k(() => new Set(t.value)), c = (a, i) => {
1483
+ const s = new Set(l.value.values()), u = o.value.parse(a);
1484
+ i ? s.add(u) : s.delete(u), t.value = Array.from(s);
1485
+ };
1486
+ return (a, i) => (p(), m("div", {
1487
+ class: T(["CheckboxGroup", { "CheckboxGroup--inline": a.$props.inline }])
1488
+ }, [
1489
+ (p(!0), m(H, null, Y(n.value, (s) => (p(), m("div", {
1490
+ key: s.value
1491
+ }, [
1492
+ U(an, {
1493
+ disabled: s.disabled,
1494
+ "model-value": l.value.has(s.value),
1495
+ label: s.label,
1496
+ description: s.description,
1497
+ "onUpdate:modelValue": (u) => c(s.value, u)
1498
+ }, Qe({ _: 2 }, [
1499
+ a.$slots.symbol ? {
1500
+ name: "symbol",
1501
+ fn: P(({ checked: u, disabled: d }) => [
1502
+ w(a.$slots, "symbol", q({ ref_for: !0 }, { checked: u, disabled: d }), void 0, !0)
1503
+ ]),
1504
+ key: "0"
1505
+ } : void 0
1506
+ ]), 1032, ["disabled", "model-value", "label", "description", "onUpdate:modelValue"])
1507
+ ]))), 128))
1508
+ ], 2));
1509
+ }
1510
+ }), Ta = /* @__PURE__ */ N(sn, [["__scopeId", "data-v-9484e97b"]]), ln = {
1511
+ cancelLabel: "Cancel",
1512
+ confirmLabel: "OK"
1513
+ }, ft = ln, un = S(1), _e = S([]), pe = k(() => _e.value[_e.value.length - 1]), cn = () => un.value++, wt = (e, t, { modal: r } = {}) => {
1514
+ const o = document.activeElement;
1515
+ return o.blur?.(), new Promise((n) => {
1516
+ const l = {
1517
+ id: cn(),
1518
+ component: _r(e),
1519
+ props: t,
1520
+ resolve: n,
1521
+ focusElement: o,
1522
+ modal: r
1523
+ };
1524
+ _e.value.push(l);
1525
+ });
1526
+ }, dn = (e) => {
1527
+ typeof e == "string" && (e = {
1528
+ content: e
1529
+ });
1530
+ const { title: t, content: r, confirmVariant: o, confirmLabel: n = ft.confirmLabel, confirmIcon: l, modal: c } = e;
1531
+ return wt(ur, {
1532
+ title: t,
1533
+ content: r,
1534
+ modal: c,
1535
+ buttons: [
1536
+ {
1537
+ variant: o || "primary",
1538
+ label: n || "",
1539
+ icon: l
1540
+ }
1541
+ ]
1542
+ });
1543
+ }, pn = (e) => {
1544
+ typeof e == "string" && (e = {
1545
+ content: e
1546
+ });
1547
+ const {
1548
+ title: t,
1549
+ content: r,
1550
+ cancelLabel: o = ft.cancelLabel,
1551
+ cancelVariant: n,
1552
+ cancelIcon: l,
1553
+ confirmLabel: c = ft.confirmLabel,
1554
+ confirmVariant: a,
1555
+ confirmIcon: i,
1556
+ modal: s
1557
+ } = e;
1558
+ return wt(ur, {
1559
+ title: t,
1560
+ content: r,
1561
+ modal: s,
1562
+ buttons: [
1563
+ {
1564
+ variant: n || "secondary",
1565
+ label: o || "",
1566
+ icon: l,
1567
+ value: !1
1568
+ },
1569
+ {
1570
+ variant: a || "primary",
1571
+ label: c || "",
1572
+ icon: i,
1573
+ value: !0
1574
+ }
1575
+ ]
1576
+ });
1577
+ }, Wt = (e, t = void 0) => {
1578
+ _e.value = _e.value.filter((r) => r.id !== e.id), e.resolve(t), e.focusElement && e.focusElement.focus?.();
1579
+ }, He = (e, t = void 0) => {
1580
+ e.onBeforeClose ? e.onBeforeClose(() => Wt(e, t)) : Wt(e, t);
1581
+ }, fn = (e) => (e && pe.value && (pe.value.onBeforeClose = e), (t) => {
1582
+ pe.value && He(pe.value, t);
1583
+ }), vn = {
1584
+ open: wt,
1585
+ alert: dn,
1586
+ confirm: pn
1587
+ };
1588
+ function mn() {
1589
+ return vn;
1590
+ }
1591
+ const bn = {
1592
+ key: 1,
1593
+ class: "DialogLayout__header"
1594
+ }, gn = { class: "DialogLayout__title" }, hn = { class: "DialogLayout__body" }, yn = { class: "DialogLayout__content" }, $n = {
1595
+ key: 2,
1596
+ class: "DialogLayout__footer"
1597
+ }, kn = { class: "DialogLayout__buttons" }, _n = /* @__PURE__ */ M({
1598
+ __name: "DialogLayout",
1599
+ props: {
1600
+ title: { default: "" },
1601
+ content: { default: "" },
1602
+ width: { default: 600 },
1603
+ withCloseButton: { type: Boolean },
1604
+ scroll: { type: Boolean },
1605
+ plain: { type: Boolean },
1606
+ buttons: { default: () => [] }
1607
+ },
1608
+ setup(e) {
1609
+ const t = Ke(), r = fn(), o = S(), n = e, l = k(() => !!(t.header || n.title)), c = k(() => !!t.footer || !!n.buttons?.length), a = k(() => {
1610
+ const i = n.width + (Number(n.width) ? "px" : "");
1611
+ return i && i !== "auto" ? {
1612
+ width: "100%",
1613
+ maxWidth: i
1614
+ } : {};
1615
+ });
1616
+ return we(() => {
1617
+ const i = o.value?.querySelectorAll("input");
1618
+ if (i?.length) {
1619
+ i[0]?.focus();
1620
+ return;
1621
+ }
1622
+ const s = o.value?.querySelectorAll("button");
1623
+ if (s?.length) {
1624
+ const u = Array.from(s).find((d) => d.classList.contains("vuiii-button--primary"));
1625
+ if (u) {
1626
+ u.focus();
1627
+ return;
1628
+ }
1629
+ s[0]?.focus();
1630
+ }
1631
+ }), (i, s) => (p(), m("div", {
1632
+ ref_key: "root",
1633
+ ref: o,
1634
+ class: T(["DialogLayout", {
1635
+ hasHeader: l.value,
1636
+ hasFooter: c.value,
1637
+ isScrollable: i.$props.scroll,
1638
+ isPlain: i.$props.plain,
1639
+ isWithCloseButton: i.$props.withCloseButton
1640
+ }]),
1641
+ style: Ue(a.value)
1642
+ }, [
1643
+ i.$props.withCloseButton ? (p(), m("div", {
1644
+ key: 0,
1645
+ class: "DialogLayout__close",
1646
+ onClick: s[0] || (s[0] = (u) => E(r)())
1647
+ }, [
1648
+ U(ae, {
1649
+ name: "x",
1650
+ class: "DialogLayout__closeIcon"
1651
+ })
1652
+ ])) : O("", !0),
1653
+ l.value ? (p(), m("div", bn, [
1654
+ w(i.$slots, "header", {}, () => [
1655
+ D("div", gn, L(i.$props.title), 1)
1656
+ ], !0)
1657
+ ])) : O("", !0),
1658
+ D("div", hn, [
1659
+ w(i.$slots, "default", {}, () => [
1660
+ D("div", yn, L(i.$props.content), 1)
1661
+ ], !0)
1662
+ ]),
1663
+ c.value ? (p(), m("div", $n, [
1664
+ w(i.$slots, "footer", {}, () => [
1665
+ D("div", kn, [
1666
+ (p(!0), m(H, null, Y(i.$props.buttons, (u, d) => (p(), m("span", {
1667
+ key: d,
1668
+ class: "DialogLayout__buttonWrapper"
1669
+ }, [
1670
+ U(ze, {
1671
+ type: "button",
1672
+ label: u.label,
1673
+ variant: u.variant,
1674
+ "prefix-icon": u.icon,
1675
+ disabled: u.disabled,
1676
+ loading: u.loading,
1677
+ onClick: (v) => E(r)(u.value)
1678
+ }, null, 8, ["label", "variant", "prefix-icon", "disabled", "loading", "onClick"])
1679
+ ]))), 128))
1680
+ ])
1681
+ ], !0)
1682
+ ])) : O("", !0)
1683
+ ], 6));
1684
+ }
1685
+ }), ur = /* @__PURE__ */ N(_n, [["__scopeId", "data-v-9671bc6e"]]);
1686
+ function cr(e, t, r) {
1687
+ const o = (n) => {
1688
+ n.key.toLowerCase() === e.toLowerCase() && t(n);
1689
+ };
1690
+ we(() => {
1691
+ window.addEventListener("keydown", o, r);
1692
+ }), mt(() => {
1693
+ window.removeEventListener("keydown", o, r);
1694
+ });
1695
+ }
1696
+ const wn = { class: "DialogStack" }, Cn = {
1697
+ key: 0,
1698
+ class: "DialogStack__backdrop"
1699
+ }, In = ["onClick"], On = /* @__PURE__ */ M({
1700
+ __name: "DialogStack",
1701
+ setup(e) {
1702
+ const t = (r, o) => {
1703
+ !o.modal && r.target === r.currentTarget && He(o);
1704
+ };
1705
+ return cr("Escape", (r) => {
1706
+ pe.value && !pe.value.modal && !r.defaultPrevented && (He(pe.value), r.preventDefault());
1707
+ }), (r, o) => (p(), z(Xt, { to: "body" }, [
1708
+ D("div", wn, [
1709
+ U(Gt, { name: "DialogStack__backdrop" }, {
1710
+ default: P(() => [
1711
+ E(_e).length ? (p(), m("div", Cn)) : O("", !0)
1712
+ ]),
1713
+ _: 1
1714
+ }),
1715
+ U(Yt, { name: "DialogStack__dialog" }, {
1716
+ default: P(() => [
1717
+ (p(!0), m(H, null, Y(E(_e), (n) => (p(), m("div", {
1718
+ key: n.id,
1719
+ class: "DialogStack__dialogWrapper",
1720
+ onClick: (l) => t(l, n)
1721
+ }, [
1722
+ (p(), z(Oe(n.component), q({ ref_for: !0 }, n.props, {
1723
+ "data-dialog-id": n.id,
1724
+ class: ["DialogStack__dialog", { isActive: E(pe)?.id === n.id }],
1725
+ onClose: (l) => E(He)(n, l)
1726
+ }), null, 16, ["data-dialog-id", "class", "onClose"]))
1727
+ ], 8, In))), 128))
1728
+ ]),
1729
+ _: 1
1730
+ })
1731
+ ])
1732
+ ]));
1733
+ }
1734
+ }), ja = /* @__PURE__ */ N(On, [["__scopeId", "data-v-075d0d5a"]]), Dn = /* @__PURE__ */ M({
1735
+ __name: "Dropdown",
1736
+ props: {
1737
+ label: {},
1738
+ variant: {},
1739
+ block: { type: Boolean },
1740
+ icon: {}
1741
+ },
1742
+ emits: ["open", "close"],
1743
+ setup(e, { expose: t, emit: r }) {
1744
+ const o = r, n = S(!1), l = S(), c = S();
1745
+ function a() {
1746
+ n.value || (n.value = !0, o("open"));
1747
+ }
1748
+ function i() {
1749
+ n.value && (n.value = !1, o("close"));
1750
+ }
1751
+ function s(u) {
1752
+ u ?? !n.value ? a() : i();
1753
+ }
1754
+ return sr(l, c), Jt(l, (u) => {
1755
+ n.value && !u.defaultPrevented && (u.preventDefault(), i());
1756
+ }), cr("Escape", (u) => {
1757
+ n.value && !u.defaultPrevented && (u.preventDefault(), i());
1758
+ }), t({
1759
+ open: a,
1760
+ close: i,
1761
+ toggle: s,
1762
+ isOpen: k(() => n.value)
1763
+ }), (u, d) => (p(), m("div", {
1764
+ class: T(["Dropdown", { "Dropdown--block": e.block }]),
1765
+ ref_key: "rootElement",
1766
+ ref: l
1767
+ }, [
1768
+ w(u.$slots, "trigger", lt(ut({ open: a, close: i, toggle: s, isOpen: n.value })), () => [
1769
+ U(ze, {
1770
+ label: e.label,
1771
+ variant: e.variant,
1772
+ block: e.block,
1773
+ prefixIcon: e.icon,
1774
+ suffixIcon: "chevron-down",
1775
+ onClick: d[0] || (d[0] = (v) => s())
1776
+ }, null, 8, ["label", "variant", "block", "prefixIcon"])
1777
+ ], !0),
1778
+ U(Qt, { duration: 100 }, {
1779
+ default: P(() => [
1780
+ n.value ? (p(), m("div", {
1781
+ key: 0,
1782
+ class: "Dropdown__dropdown",
1783
+ ref_key: "dropdownElement",
1784
+ ref: c
1785
+ }, [
1786
+ w(u.$slots, "default", lt(ut({ close: i })), void 0, !0)
1787
+ ], 512)) : O("", !0)
1788
+ ]),
1789
+ _: 3
1790
+ })
1791
+ ], 2));
1792
+ }
1793
+ }), Wa = /* @__PURE__ */ N(Dn, [["__scopeId", "data-v-53e81477"]]);
1794
+ function Bn(e, t) {
1795
+ let r;
1796
+ return (...o) => {
1797
+ r && clearTimeout(r), r = setTimeout(() => e(...o), t);
1798
+ };
1799
+ }
1800
+ async function Sn(e) {
1801
+ const r = await (await fetch(
1802
+ `undefined/media/download-from-url?url=${encodeURIComponent(e)}`
1803
+ )).blob();
1804
+ return new File([r], e.split("/").pop(), { type: r.type });
1805
+ }
1806
+ function En(e) {
1807
+ return new DOMParser().parseFromString(e, "text/html").querySelector("img, video, audio")?.getAttribute("src") || null;
1808
+ }
1809
+ async function Pn(e) {
1810
+ const t = Array.from(e.files);
1811
+ if (t.length)
1812
+ return t;
1813
+ const r = e.getData("text/html");
1814
+ if (r) {
1815
+ const o = En(r);
1816
+ if (o)
1817
+ return [await Sn(o)];
1818
+ }
1819
+ return [];
1820
+ }
1821
+ function An(e, t, r = {}) {
1822
+ const o = S(!1), n = k(() => Array.isArray(r.accept) ? r.accept : r.accept?.split(",").map((d) => d.trim())), l = Bn((d) => o.value = d, 1), c = (d) => Array.from(d.dataTransfer?.items || []).some((v) => ["file", "text/html"].includes(v.kind)), a = (d) => {
1823
+ c(d) && (d.preventDefault(), d.stopPropagation(), d.dataTransfer.dropEffect = "copy", l(!0));
1824
+ }, i = (d) => {
1825
+ c(d) && (d.preventDefault(), d.stopPropagation(), d.dataTransfer.dropEffect = "copy");
1826
+ }, s = (d) => {
1827
+ c(d) && (d.preventDefault(), d.stopPropagation(), d.dataTransfer.dropEffect = "none", l(!1));
1828
+ }, u = async (d) => {
1829
+ if (c(d)) {
1830
+ d.preventDefault(), d.stopPropagation();
1831
+ try {
1832
+ if (!d.dataTransfer)
1833
+ return;
1834
+ let v = await Pn(d.dataTransfer);
1835
+ r.accept && (v = v.filter((f) => n.value?.some((g) => f.type.startsWith(g)))), r.multiple || (v = v.slice(0, 1)), o.value = !1, v.length && t(v);
1836
+ } catch (v) {
1837
+ r.onError?.(v);
1838
+ }
1839
+ }
1840
+ };
1841
+ return we(() => {
1842
+ e.value?.addEventListener("dragover", a), e.value?.addEventListener("dragenter", i), e.value?.addEventListener("dragleave", s), e.value?.addEventListener("drop", u);
1843
+ }), mt(() => {
1844
+ e.value?.removeEventListener("dragover", a), e.value?.removeEventListener("dragenter", i), e.value?.removeEventListener("dragleave", s), e.value?.removeEventListener("drop", u);
1845
+ }), {
1846
+ isDropzoneActive: o
1847
+ };
1848
+ }
1849
+ const qa = (e = document.body) => {
1850
+ const t = (o) => {
1851
+ o.defaultPrevented || (o.dataTransfer.dropEffect = "none", o.preventDefault());
1852
+ }, r = (o) => {
1853
+ o.preventDefault();
1854
+ };
1855
+ we(() => {
1856
+ e.addEventListener("dragenter", r, !1), e.addEventListener("dragover", t, !1), e.addEventListener("dragleave", r, !1), e.addEventListener("drop", r, !1);
1857
+ }), mt(() => {
1858
+ e.removeEventListener("dragenter", r, !1), e.removeEventListener("dragover", t, !1), e.removeEventListener("dragleave", r, !1), e.removeEventListener("drop", r, !1);
1859
+ });
1860
+ }, Ln = ["multiple", "accept"], Vn = /* @__PURE__ */ M({
1861
+ __name: "FilePicker",
1862
+ props: {
1863
+ multiple: { type: Boolean, default: !1 },
1864
+ accept: {},
1865
+ label: {}
1866
+ },
1867
+ emits: ["files"],
1868
+ setup(e, { emit: t }) {
1869
+ const r = e, o = t, n = S(), l = S(), c = k(() => Array.isArray(r.accept) ? r.accept.join(",") : r.accept);
1870
+ function a() {
1871
+ l.value?.click();
1872
+ }
1873
+ function i(s) {
1874
+ const u = s.target, d = u.files ? Array.from(u.files) : [];
1875
+ o("files", d), u.value = "";
1876
+ }
1877
+ return An(n, (s) => o("files", s), {
1878
+ accept: r.accept,
1879
+ multiple: r.multiple
1880
+ }), (s, u) => (p(), m(H, null, [
1881
+ D("button", {
1882
+ type: "button",
1883
+ class: "FilePicker",
1884
+ onClick: a,
1885
+ ref_key: "pickerOpener",
1886
+ ref: n
1887
+ }, [
1888
+ w(s.$slots, "default", {}, () => [
1889
+ U(ze, {
1890
+ "prefix-icon": "arrow-up-tray",
1891
+ label: e.label,
1892
+ variant: "primary",
1893
+ outlined: ""
1894
+ }, null, 8, ["label"])
1895
+ ], !0)
1896
+ ], 512),
1897
+ D("input", {
1898
+ ref_key: "fileInput",
1899
+ ref: l,
1900
+ type: "file",
1901
+ multiple: e.multiple,
1902
+ accept: c.value,
1903
+ hidden: "",
1904
+ onChange: i
1905
+ }, null, 40, Ln)
1906
+ ], 64));
1907
+ }
1908
+ }), Na = /* @__PURE__ */ N(Vn, [["__scopeId", "data-v-40222e12"]]), Mn = {
1909
+ key: 0,
1910
+ class: "FormGroup__header"
1911
+ }, xn = ["for"], zn = {
1912
+ key: 0,
1913
+ class: "FormGroup__required"
1914
+ }, Rn = {
1915
+ key: 1,
1916
+ class: "FormGroup__description"
1917
+ }, Fn = {
1918
+ key: 2,
1919
+ class: "FormGroup__hint"
1920
+ }, Tn = {
1921
+ key: 3,
1922
+ class: "FormGroup__error"
1923
+ }, jn = /* @__PURE__ */ M({
1924
+ __name: "FormGroup",
1925
+ props: {
1926
+ label: {},
1927
+ for: {},
1928
+ required: { type: Boolean },
1929
+ error: { type: [String, Boolean] },
1930
+ description: {},
1931
+ hint: {}
1932
+ },
1933
+ setup(e) {
1934
+ return (t, r) => (p(), m("div", {
1935
+ class: T(["FormGroup", { "FormGroup--invalid": t.$props.error }])
1936
+ }, [
1937
+ t.$props.label || t.$slots.label ? (p(), m("div", Mn, [
1938
+ D("label", {
1939
+ class: "FormGroup__label",
1940
+ for: t.$props.for
1941
+ }, [
1942
+ w(t.$slots, "label", {}, () => [
1943
+ oe(L(t.$props.label), 1)
1944
+ ], !0)
1945
+ ], 8, xn),
1946
+ t.$props.required ? (p(), m("div", zn, "*")) : O("", !0)
1947
+ ])) : O("", !0),
1948
+ t.$slots.description || t.$props.description ? (p(), m("div", Rn, [
1949
+ w(t.$slots, "description", {}, () => [
1950
+ oe(L(t.$props.description), 1)
1951
+ ], !0)
1952
+ ])) : O("", !0),
1953
+ w(t.$slots, "default", {}, void 0, !0),
1954
+ t.$slots.hint || t.$props.hint ? (p(), m("div", Fn, [
1955
+ w(t.$slots, "hint", {}, () => [
1956
+ oe(L(t.$props.hint), 1)
1957
+ ], !0)
1958
+ ])) : O("", !0),
1959
+ t.$props.error && typeof t.$props.error == "string" ? (p(), m("div", Tn, L(t.$props.error), 1)) : O("", !0)
1960
+ ], 2));
1961
+ }
1962
+ }), Wn = /* @__PURE__ */ N(jn, [["__scopeId", "data-v-b18bb598"]]), qn = { class: "FormFields" }, Nn = /* @__PURE__ */ M({
1963
+ __name: "FormFields",
1964
+ props: {
1965
+ fields: {},
1966
+ modelValue: {},
1967
+ validationResults: {}
1968
+ },
1969
+ emits: ["update:model-value"],
1970
+ setup(e, { emit: t }) {
1971
+ const r = e, o = k(() => r.fields.map((s) => ({
1972
+ ...s,
1973
+ value: c(s.name),
1974
+ required: !!i(s.name, s.required),
1975
+ disabled: !!i(s.name, s.disabled),
1976
+ invalid: r.validationResults?.[s.name]?.isInvalid,
1977
+ errorMessage: r.validationResults?.[s.name]?.errorMessage
1978
+ }))), n = k(() => new Map(r.fields.map((s) => [s.name, s]))), l = t, c = (s) => (n.value.get(s).value?.getter || ((d) => d[s]))(r.modelValue), a = (s, u) => {
1979
+ const v = (n.value.get(s).value?.setter || ((f, g) => ({ ...g, [s]: f })))(u, r.modelValue);
1980
+ l("update:model-value", v);
1981
+ }, i = (s, u) => typeof u == "function" ? u?.(r.modelValue[s]) : u;
1982
+ return (s, u) => (p(), m("div", qn, [
1983
+ (p(!0), m(H, null, Y(o.value, (d, v) => (p(), z(Wn, {
1984
+ key: d.name,
1985
+ label: d.label,
1986
+ description: d.description,
1987
+ hint: d.hint,
1988
+ required: d.required,
1989
+ invalid: d.invalid,
1990
+ "error-message": d.errorMessage
1991
+ }, {
1992
+ default: P(() => [
1993
+ w(s.$slots, `field:${String(d.name)}`, q({ ref_for: !0 }, { ...d, index: v }), () => [
1994
+ (p(), z(Oe(d.component), q({
1995
+ "model-value": d.value
1996
+ }, { ref_for: !0 }, i(d.name, d.props), {
1997
+ required: d.required,
1998
+ disabled: d.disabled,
1999
+ invalid: d.invalid,
2000
+ "onUpdate:modelValue": (f) => a(d.name, f)
2001
+ }), null, 16, ["model-value", "required", "disabled", "invalid", "onUpdate:modelValue"]))
2002
+ ], !0)
2003
+ ]),
2004
+ _: 2
2005
+ }, 1032, ["label", "description", "hint", "required", "invalid", "error-message"]))), 128))
2006
+ ]));
2007
+ }
2008
+ }), Ga = /* @__PURE__ */ N(Nn, [["__scopeId", "data-v-bf60c4d0"]]);
2009
+ function Gn(e, t) {
2010
+ return t = [...t, "modelValue", "modelModifiers"], k(() => Object.fromEntries(Object.entries(e).filter(([r]) => !t.includes(r))));
2011
+ }
2012
+ const Ha = /* @__PURE__ */ M({
2013
+ __name: "IconButton",
2014
+ props: {
2015
+ disabled: { type: Boolean },
2016
+ type: {},
2017
+ size: {},
2018
+ variant: {},
2019
+ loading: { type: Boolean },
2020
+ outlined: { type: Boolean },
2021
+ pill: { type: Boolean },
2022
+ to: {},
2023
+ href: {},
2024
+ icon: {},
2025
+ title: {}
2026
+ },
2027
+ emits: ["click"],
2028
+ setup(e, { emit: t }) {
2029
+ const o = Gn(e, ["icon"]), n = t;
2030
+ return (l, c) => (p(), z(ze, q({
2031
+ class: "vuiii-icon-button",
2032
+ prefixIcon: e.icon
2033
+ }, E(o), {
2034
+ onClick: c[0] || (c[0] = (a) => n("click", a))
2035
+ }), null, 16, ["prefixIcon"]));
2036
+ }
2037
+ }), Hn = ["aria-label", "type", "value"], Un = {
2038
+ inheritAttrs: !1
2039
+ }, Xn = /* @__PURE__ */ M({
2040
+ ...Un,
2041
+ __name: "Input",
2042
+ props: /* @__PURE__ */ K({
2043
+ prefixIcon: {},
2044
+ suffixIcon: {},
2045
+ size: {},
2046
+ invalid: { type: Boolean },
2047
+ pill: { type: Boolean },
2048
+ inputClass: {}
2049
+ }, {
2050
+ modelValue: {},
2051
+ modelModifiers: {}
2052
+ }),
2053
+ emits: /* @__PURE__ */ K(["prefix-icon-click", "suffix-icon-click"], ["update:modelValue"]),
2054
+ setup(e, { expose: t }) {
2055
+ const r = ne(e, "modelValue"), o = Ye(), n = Pe(), l = Ke(), c = S();
2056
+ function a(s) {
2057
+ const u = s.target;
2058
+ return o.type === "number" ? u.valueAsNumber : o.type === "date" ? u.valueAsDate : u.value;
2059
+ }
2060
+ function i(s) {
2061
+ r.value = a(s);
2062
+ }
2063
+ return t({
2064
+ input: c,
2065
+ focus: () => c.value.focus(),
2066
+ select: () => c.value.select()
2067
+ }), (s, u) => (p(), z(Je, {
2068
+ "prefix-icon": s.$props.prefixIcon,
2069
+ "suffix-icon": s.$props.suffixIcon,
2070
+ size: s.$props.size,
2071
+ invalid: s.$props.invalid,
2072
+ pill: s.$props.pill,
2073
+ class: T(s.$attrs.class),
2074
+ disabled: s.$attrs.disabled,
2075
+ onClick: u[1] || (u[1] = (d) => c.value.focus()),
2076
+ onPrefixIconClick: u[2] || (u[2] = (d) => s.$emit("prefix-icon-click")),
2077
+ onSuffixIconClick: u[3] || (u[3] = (d) => s.$emit("suffix-icon-click"))
2078
+ }, Qe({
2079
+ default: P(() => [
2080
+ D("input", q({
2081
+ ref_key: "input",
2082
+ ref: c,
2083
+ "aria-label": s.$attrs.placeholder || "input"
2084
+ }, E(n), {
2085
+ class: ["vuiii-input__nested Input__input", [
2086
+ e.inputClass,
2087
+ {
2088
+ "Input__input--withPrefixIcon": s.$props.prefixIcon,
2089
+ "Input__input--withSuffixIcon": s.$props.suffixIcon
2090
+ }
2091
+ ]],
2092
+ type: s.$attrs.type || "text",
2093
+ value: r.value,
2094
+ onInput: u[0] || (u[0] = (d) => i(d))
2095
+ }), null, 16, Hn)
2096
+ ]),
2097
+ _: 2
2098
+ }, [
2099
+ E(l).prefix ? {
2100
+ name: "prefix",
2101
+ fn: P(() => [
2102
+ w(s.$slots, "prefix", {}, void 0, !0)
2103
+ ]),
2104
+ key: "0"
2105
+ } : void 0,
2106
+ E(l).suffix ? {
2107
+ name: "suffix",
2108
+ fn: P(() => [
2109
+ w(s.$slots, "suffix", {}, void 0, !0)
2110
+ ]),
2111
+ key: "1"
2112
+ } : void 0
2113
+ ]), 1032, ["prefix-icon", "suffix-icon", "size", "invalid", "pill", "class", "disabled"]));
2114
+ }
2115
+ }), Ua = /* @__PURE__ */ N(Xn, [["__scopeId", "data-v-9075681e"]]), Xa = /* @__PURE__ */ M({
2116
+ __name: "RadioButtonGroup",
2117
+ props: /* @__PURE__ */ K({
2118
+ options: {},
2119
+ optionLabel: { type: [String, Number, Function] },
2120
+ optionValue: { type: [String, Number, Function] },
2121
+ optionDisabled: { type: [String, Number, Function] },
2122
+ optionIcon: { type: [String, Number, Function] },
2123
+ optionDescription: { type: [String, Number, Function] },
2124
+ valueParser: {},
2125
+ disabled: { type: Boolean },
2126
+ size: {}
2127
+ }, {
2128
+ modelValue: {},
2129
+ modelModifiers: {}
2130
+ }),
2131
+ emits: ["update:modelValue"],
2132
+ setup(e) {
2133
+ const t = ne(e, "modelValue"), r = e, o = k(
2134
+ () => ke(
2135
+ r.options,
2136
+ {
2137
+ value: r.optionValue,
2138
+ label: r.optionLabel,
2139
+ disabled: r.optionDisabled,
2140
+ description: r.optionDescription,
2141
+ icon: r.optionIcon
2142
+ },
2143
+ t.value
2144
+ )
2145
+ );
2146
+ return (n, l) => (p(), z(Yo, null, {
2147
+ default: P(() => [
2148
+ (p(!0), m(H, null, Y(o.value, (c) => (p(), z(ze, {
2149
+ key: c.value,
2150
+ variant: "primary",
2151
+ outlined: !c.isSelected,
2152
+ label: c.label,
2153
+ disabled: n.$props.disabled || c.disabled,
2154
+ title: c.description,
2155
+ "prefix-icon": c.icon,
2156
+ size: n.$props.size,
2157
+ onClick: (a) => t.value = c.value
2158
+ }, null, 8, ["outlined", "label", "disabled", "title", "prefix-icon", "size", "onClick"]))), 128))
2159
+ ]),
2160
+ _: 1
2161
+ }));
2162
+ }
2163
+ });
2164
+ let Yn = 1;
2165
+ function Kn() {
2166
+ return Yn++;
2167
+ }
2168
+ const Qn = ["value", "name", "disabled", "readonly", "checked", "onInput"], Jn = { key: 0 }, Zn = { class: "RadioGroup__label" }, ea = {
2169
+ key: 0,
2170
+ class: "RadioGroup__description"
2171
+ }, ta = {
2172
+ inheritAttrs: !1
2173
+ }, ra = /* @__PURE__ */ M({
2174
+ ...ta,
2175
+ __name: "RadioGroup",
2176
+ props: /* @__PURE__ */ K({
2177
+ options: {},
2178
+ optionLabel: {},
2179
+ optionValue: {},
2180
+ optionDisabled: {},
2181
+ optionDescription: {},
2182
+ valueParser: {},
2183
+ disabled: { type: Boolean },
2184
+ readonly: { type: Boolean },
2185
+ inline: { type: Boolean },
2186
+ type: { default: "string" }
2187
+ }, {
2188
+ modelValue: {},
2189
+ modelModifiers: {}
2190
+ }),
2191
+ emits: ["update:modelValue"],
2192
+ setup(e) {
2193
+ const t = ne(e, "modelValue"), r = Ye(), o = Pe(), n = r.name || "RadioGroup-input-" + Kn(), l = e, c = k(() => l.valueParser || _t(l.type)), a = k(
2194
+ () => ke(
2195
+ l.options,
2196
+ {
2197
+ value: l.optionValue,
2198
+ label: l.optionLabel,
2199
+ disabled: l.optionDisabled,
2200
+ description: l.optionDescription,
2201
+ stringifyValue: c.value?.stringify
2202
+ },
2203
+ t.value
2204
+ )
2205
+ );
2206
+ function i(s) {
2207
+ t.value = c.value.parse(s);
2208
+ }
2209
+ return (s, u) => (p(), m("div", {
2210
+ class: T(["RadioGroup", [s.$attrs.class, { "RadioGroup--inline": e.inline }]])
2211
+ }, [
2212
+ (p(!0), m(H, null, Y(a.value, (d) => (p(), m("label", {
2213
+ key: d.value,
2214
+ class: T(["RadioGroup__option", { "RadioGroup__option--disabled": s.$props.disabled || d.disabled }])
2215
+ }, [
2216
+ D("input", q({ ref_for: !0 }, E(o), {
2217
+ value: d.value,
2218
+ class: "RadioGroup__input",
2219
+ type: "radio",
2220
+ name: E(n),
2221
+ disabled: s.$props.disabled || d.disabled,
2222
+ readonly: s.$props.readonly,
2223
+ checked: d.isSelected,
2224
+ onInput: (v) => i(d.value)
2225
+ }), null, 16, Qn),
2226
+ w(s.$slots, "symbol", q({ ref_for: !0 }, { disabled: !!e.disabled, checked: !!d.isSelected }), () => [
2227
+ u[0] || (u[0] = D("div", { class: "RadioGroup__radio vuiii-input" }, [
2228
+ D("div", { class: "RadioGroup__radioDot" })
2229
+ ], -1))
2230
+ ], !0),
2231
+ d.label || d.description || s.$slots.default ? (p(), m("div", Jn, [
2232
+ w(s.$slots, "default", q({ ref_for: !0 }, { option: d }), () => [
2233
+ D("div", Zn, L(d.label), 1)
2234
+ ], !0),
2235
+ d.description ? (p(), m("div", ea, L(d.description), 1)) : O("", !0)
2236
+ ])) : O("", !0)
2237
+ ], 2))), 128))
2238
+ ], 2));
2239
+ }
2240
+ }), Ya = /* @__PURE__ */ N(ra, [["__scopeId", "data-v-eaa91e04"]]), oa = ["value", "required"], na = ["disabled", "hidden"], aa = ["label"], ia = ["disabled", "value", "selected"], sa = ["disabled", "value", "selected"], la = { class: "Select__dropdownIcon vuiii-input__suffix-icon" }, ua = {
2241
+ inheritAttrs: !1
2242
+ }, ca = /* @__PURE__ */ M({
2243
+ ...ua,
2244
+ __name: "Select",
2245
+ props: /* @__PURE__ */ K({
2246
+ options: {},
2247
+ optionLabel: {},
2248
+ optionValue: {},
2249
+ optionDisabled: {},
2250
+ groupLabel: {},
2251
+ groupOptions: {},
2252
+ valueParser: {},
2253
+ placeholder: {},
2254
+ size: { default: "normal" },
2255
+ required: { type: Boolean },
2256
+ inputClass: {},
2257
+ invalid: { type: Boolean },
2258
+ disabled: { type: Boolean },
2259
+ pill: { type: Boolean },
2260
+ type: { default: "string" }
2261
+ }, {
2262
+ modelValue: {},
2263
+ modelModifiers: {}
2264
+ }),
2265
+ emits: ["update:modelValue"],
2266
+ setup(e) {
2267
+ const t = ne(e, "modelValue"), r = Pe(), o = e, n = k(() => o.valueParser || _t(o.type)), l = k(() => n.value.stringify(t.value)), c = k(() => {
2268
+ if (o.groupOptions)
2269
+ return lr(
2270
+ o.options,
2271
+ {
2272
+ groupLabel: o.groupLabel,
2273
+ groupOptions: o.groupOptions,
2274
+ value: o.optionValue,
2275
+ label: o.optionLabel,
2276
+ disabled: o.optionDisabled,
2277
+ stringifyValue: n.value.stringify
2278
+ },
2279
+ t.value
2280
+ );
2281
+ }), a = k(() => {
2282
+ if (!c.value)
2283
+ return ke(
2284
+ o.options,
2285
+ {
2286
+ value: o.optionValue,
2287
+ label: o.optionLabel,
2288
+ disabled: o.optionDisabled,
2289
+ stringifyValue: n.value.stringify
2290
+ },
2291
+ t.value
2292
+ );
2293
+ });
2294
+ function i(s) {
2295
+ t.value = n.value.parse(s.target.value);
2296
+ }
2297
+ return (s, u) => (p(), z(Je, {
2298
+ class: T(["Select", s.$attrs.class]),
2299
+ size: s.$props.size,
2300
+ invalid: s.$props.invalid,
2301
+ disabled: s.$props.disabled,
2302
+ pill: s.$props.pill
2303
+ }, {
2304
+ suffix: P(() => [
2305
+ D("div", la, [
2306
+ U(ae, {
2307
+ name: "triangle-down",
2308
+ size: s.$props.size
2309
+ }, null, 8, ["size"])
2310
+ ])
2311
+ ]),
2312
+ default: P(() => [
2313
+ D("select", q(E(r), {
2314
+ class: ["vuiii-input__nested Select__select", e.inputClass],
2315
+ value: l.value,
2316
+ required: s.$props.required,
2317
+ onInput: u[0] || (u[0] = (d) => i(d))
2318
+ }), [
2319
+ s.$props.placeholder ? (p(), m("option", {
2320
+ key: 0,
2321
+ "data-placeholder": "",
2322
+ disabled: s.$props.required,
2323
+ hidden: s.$props.required,
2324
+ value: "",
2325
+ selected: ""
2326
+ }, L(s.$props.placeholder), 9, na)) : O("", !0),
2327
+ c.value ? (p(!0), m(H, { key: 1 }, Y(c.value, (d, v) => (p(), m("optgroup", {
2328
+ key: v,
2329
+ label: d.label
2330
+ }, [
2331
+ (p(!0), m(H, null, Y(d.options, (f) => (p(), m("option", {
2332
+ key: f.value,
2333
+ disabled: f.disabled,
2334
+ value: f.value,
2335
+ selected: f.isSelected
2336
+ }, L(f.label), 9, ia))), 128))
2337
+ ], 8, aa))), 128)) : (p(!0), m(H, { key: 2 }, Y(a.value, (d) => (p(), m("option", {
2338
+ key: d.value,
2339
+ disabled: d.disabled,
2340
+ value: d.value,
2341
+ selected: d.isSelected
2342
+ }, L(d.label), 9, sa))), 128))
2343
+ ], 16, oa)
2344
+ ]),
2345
+ _: 1
2346
+ }, 8, ["class", "size", "invalid", "disabled", "pill"]));
2347
+ }
2348
+ }), Ka = /* @__PURE__ */ N(ca, [["__scopeId", "data-v-d145e314"]]), vt = 7e3, da = 5, pa = S(1), Ie = S([]);
2349
+ function fa() {
2350
+ return pa.value++;
2351
+ }
2352
+ function dr(e) {
2353
+ Ie.value = Ie.value.filter(({ id: t }) => t !== e);
2354
+ }
2355
+ function qt(e, t = "success", r = vt) {
2356
+ const o = {
2357
+ id: fa(),
2358
+ text: e,
2359
+ type: t
2360
+ };
2361
+ Ie.value.push(o), Ie.value.length > da && Ie.value.shift(), r > 0 && setTimeout(() => dr(o.id), r);
2362
+ }
2363
+ const va = {
2364
+ success: (e, t = vt) => qt(e, "success", t),
2365
+ error: (e, t = vt) => qt(e, "error", t)
2366
+ };
2367
+ function ma() {
2368
+ return va;
2369
+ }
2370
+ const ba = { class: "Snackbar" }, ga = ["onClick"], ha = /* @__PURE__ */ M({
2371
+ __name: "SnackbarStack",
2372
+ setup(e) {
2373
+ const t = k(() => [...Ie.value].reverse());
2374
+ return (r, o) => (p(), z(Xt, { to: "body" }, [
2375
+ D("div", ba, [
2376
+ U(Yt, { name: "Snackbar__transition" }, {
2377
+ default: P(() => [
2378
+ (p(!0), m(H, null, Y(t.value, (n, l) => (p(), m("div", {
2379
+ key: n.id,
2380
+ class: "Snackbar__message"
2381
+ }, [
2382
+ D("div", {
2383
+ class: "Snackbar__messageWrapper",
2384
+ style: Ue({ transform: `translateY(-${100 * l}%)` })
2385
+ }, [
2386
+ D("div", {
2387
+ class: T(["Snackbar__messageBlock", `Snackbar__messageBlock--${n.type}`])
2388
+ }, [
2389
+ D("div", null, L(n.text), 1),
2390
+ D("div", {
2391
+ class: "Snackbar__messageClose",
2392
+ onClick: (c) => E(dr)(n.id)
2393
+ }, [
2394
+ U(ae, {
2395
+ class: "Snackbar__messageCloseIcon",
2396
+ name: "x"
2397
+ })
2398
+ ], 8, ga)
2399
+ ], 2)
2400
+ ], 4)
2401
+ ]))), 128))
2402
+ ]),
2403
+ _: 1
2404
+ })
2405
+ ])
2406
+ ]));
2407
+ }
2408
+ }), Qa = /* @__PURE__ */ N(ha, [["__scopeId", "data-v-e7c3ec03"]]), ya = { key: 0 }, $a = ["width"], ka = ["onClick"], _a = { class: "vuiii-table__sortIcon" }, wa = {
2409
+ key: 1,
2410
+ class: "vuiii-table__label"
2411
+ }, Ca = { key: 0 }, Ia = ["onClick", "onMouseenter", "onMouseleave"], Oa = { key: 0 }, Da = ["colspan"], Ba = { class: "vuiii-table__noDataMessage" }, Ja = /* @__PURE__ */ M({
2412
+ __name: "Table",
2413
+ props: /* @__PURE__ */ K({
2414
+ items: {},
2415
+ columns: {},
2416
+ rowClass: { type: [String, Function] },
2417
+ highlightOnHover: { type: Boolean },
2418
+ noDataMessage: {}
2419
+ }, {
2420
+ sortColumnName: {
2421
+ default: null
2422
+ },
2423
+ sortColumnNameModifiers: {},
2424
+ sortDirection: {
2425
+ default: "asc"
2426
+ },
2427
+ sortDirectionModifiers: {}
2428
+ }),
2429
+ emits: /* @__PURE__ */ K(["click-row", "mouseenter-row", "mouseleave-row", "sort"], ["update:sortColumnName", "update:sortDirection"]),
2430
+ setup(e, { emit: t }) {
2431
+ const r = ne(e, "sortColumnName"), o = ne(e, "sortDirection"), n = e, l = t, c = k(() => n.columns.reduce(
2432
+ (v, f) => [...v, typeof f == "string" ? { name: f } : f],
2433
+ []
2434
+ )), a = k(() => c.value.some((v) => v.label));
2435
+ function i(v, f) {
2436
+ return typeof v == "string" && typeof f == "string" ? v.localeCompare(f) : v - f;
2437
+ }
2438
+ const s = k(() => {
2439
+ const v = (g, b) => {
2440
+ const h = typeof g.value == "function" ? g.value(b) : b[g.name], $ = typeof g.formatter == "function" ? g.formatter(h) : h, A = typeof g.cellClass == "function" ? g.cellClass({ item: b, value: h }) : g.cellClass;
2441
+ return {
2442
+ column: g,
2443
+ value: h,
2444
+ formattedValue: $,
2445
+ cellClass: A,
2446
+ item: b
2447
+ };
2448
+ }, f = n.items?.map((g, b) => {
2449
+ const h = typeof n.rowClass == "function" ? n.rowClass({ item: g, index: b }) : n.rowClass, $ = c.value.reduce((A, V) => [...A, v(V, g)], []);
2450
+ return {
2451
+ item: g,
2452
+ rowClass: h,
2453
+ cells: $
2454
+ };
2455
+ }) || [];
2456
+ if (r.value) {
2457
+ const g = c.value.findIndex((h) => h.name === r.value), b = c.value[g]?.sorter ?? i;
2458
+ f.sort(
2459
+ (h, $) => b(h.cells[g]?.value, $.cells[g]?.value) * (o.value === "asc" ? 1 : -1)
2460
+ );
2461
+ }
2462
+ return f;
2463
+ });
2464
+ function u(v, { index: f, item: g }) {
2465
+ v.defaultPrevented || l("click-row", { index: f, item: g });
2466
+ }
2467
+ function d(v) {
2468
+ r.value === v ? o.value = o.value === "asc" ? "desc" : "asc" : (r.value = v, o.value = "asc"), l("sort", { sortColumnName: r.value, sortDirection: o.value });
2469
+ }
2470
+ return (v, f) => {
2471
+ const g = Ut("router-link");
2472
+ return p(), m("table", {
2473
+ class: T(["vuiii-table", { "vuiii-table--hover": v.$props.highlightOnHover && e.items?.length }])
2474
+ }, [
2475
+ a.value ? (p(), m("thead", ya, [
2476
+ D("tr", null, [
2477
+ (p(!0), m(H, null, Y(c.value, (b, h) => (p(), m("th", {
2478
+ key: h,
2479
+ style: Ue({ textAlign: b.align || "left" }),
2480
+ width: b.width
2481
+ }, [
2482
+ b.sortable ? (p(), m("div", {
2483
+ key: 0,
2484
+ class: T(["vuiii-table__label vuiii-table__label--sortable", { "vuiii-table__label vuiii-table__label--activeSort": r.value === b.name }]),
2485
+ onClick: st(($) => d(b.name), ["prevent"]),
2486
+ role: "button",
2487
+ tabindex: "0"
2488
+ }, [
2489
+ oe(L(b.label) + " ", 1),
2490
+ D("div", _a, [
2491
+ U(ae, {
2492
+ name: "caret-sort",
2493
+ size: "small"
2494
+ })
2495
+ ])
2496
+ ], 10, ka)) : (p(), m("div", wa, L(b.label), 1))
2497
+ ], 12, $a))), 128)),
2498
+ v.$slots.tools ? (p(), m("th", Ca)) : O("", !0)
2499
+ ])
2500
+ ])) : O("", !0),
2501
+ D("tbody", null, [
2502
+ (p(!0), m(H, null, Y(s.value, (b, h) => (p(), m("tr", {
2503
+ key: h,
2504
+ class: T(b.rowClass),
2505
+ onClick: ($) => u($, { index: h, item: b.item }),
2506
+ onMouseenter: ($) => v.$emit("mouseenter-row", { index: h, item: b.item }),
2507
+ onMouseleave: ($) => v.$emit("mouseleave-row", { index: h, item: b.item })
2508
+ }, [
2509
+ (p(!0), m(H, null, Y(b.cells, ($) => (p(), m("td", {
2510
+ key: $.column.name,
2511
+ style: Ue({ textAlign: $.column.align || "left" }),
2512
+ class: T($.cellClass)
2513
+ }, [
2514
+ w(v.$slots, `column:${$.column.name}`, q({ ref_for: !0 }, { item: b.item, value: $.value, index: h, column: $.column }), () => [
2515
+ $.column.href ? (p(), z(g, {
2516
+ key: 0,
2517
+ class: "vuiii-link",
2518
+ to: $.column.href($.item),
2519
+ target: $.column.target
2520
+ }, {
2521
+ default: P(() => [
2522
+ oe(L($.formattedValue), 1)
2523
+ ]),
2524
+ _: 2
2525
+ }, 1032, ["to", "target"])) : (p(), m(H, { key: 1 }, [
2526
+ oe(L($.formattedValue), 1)
2527
+ ], 64))
2528
+ ])
2529
+ ], 6))), 128)),
2530
+ v.$slots.rowOptions ? (p(), m("td", {
2531
+ key: 0,
2532
+ class: "vuiii-table__rowOptions",
2533
+ onClick: f[0] || (f[0] = ($) => $.preventDefault())
2534
+ }, [
2535
+ w(v.$slots, "rowOptions", q({ ref_for: !0 }, { item: b.item, index: h }))
2536
+ ])) : O("", !0)
2537
+ ], 42, Ia))), 128)),
2538
+ !e.items?.length && (v.$props.noDataMessage || v.$slots.noDataMessage) ? (p(), m("tr", Oa, [
2539
+ D("td", {
2540
+ colspan: Object.keys(e.columns).length
2541
+ }, [
2542
+ w(v.$slots, "noDataMessage", {}, () => [
2543
+ D("div", Ba, L(v.$props.noDataMessage), 1)
2544
+ ])
2545
+ ], 8, Da)
2546
+ ])) : O("", !0)
2547
+ ])
2548
+ ], 2);
2549
+ };
2550
+ }
2551
+ }), Sa = ["value", "disabled", "readonly"], Ea = {
2552
+ inheritAttrs: !1
2553
+ }, Pa = /* @__PURE__ */ M({
2554
+ ...Ea,
2555
+ __name: "Textarea",
2556
+ props: /* @__PURE__ */ K({
2557
+ prefixIcon: {},
2558
+ size: {},
2559
+ invalid: { type: Boolean },
2560
+ pill: { type: Boolean },
2561
+ disabled: { type: Boolean },
2562
+ readonly: { type: Boolean }
2563
+ }, {
2564
+ modelValue: {},
2565
+ modelModifiers: {}
2566
+ }),
2567
+ emits: /* @__PURE__ */ K(["prefix-icon-click"], ["update:modelValue"]),
2568
+ setup(e, { expose: t }) {
2569
+ const r = ne(e, "modelValue"), o = Pe(), n = Ke(), l = S();
2570
+ function c(a) {
2571
+ r.value = a.target.value;
2572
+ }
2573
+ return t({
2574
+ focus: () => l.value.focus(),
2575
+ select: () => l.value.select()
2576
+ }), (a, i) => (p(), z(Je, {
2577
+ class: T(["Textarea", a.$attrs.class]),
2578
+ size: a.$props.size,
2579
+ invalid: a.$props.invalid,
2580
+ disabled: a.$props.disabled,
2581
+ "prefix-icon": a.$props.prefixIcon,
2582
+ onClick: i[1] || (i[1] = (s) => l.value.focus()),
2583
+ onPrefixIconClick: i[2] || (i[2] = (s) => a.$emit("prefix-icon-click"))
2584
+ }, Qe({
2585
+ default: P(() => [
2586
+ D("textarea", q(E(o), {
2587
+ ref_key: "textareaElement",
2588
+ ref: l,
2589
+ class: "vuiii-input__nested Textarea__textarea",
2590
+ value: a.$props.modelValue,
2591
+ disabled: a.$props.disabled,
2592
+ readonly: a.$props.readonly,
2593
+ onInput: i[0] || (i[0] = (s) => c(s))
2594
+ }), null, 16, Sa)
2595
+ ]),
2596
+ _: 2
2597
+ }, [
2598
+ E(n).prefix ? {
2599
+ name: "prefix",
2600
+ fn: P(() => [
2601
+ w(a.$slots, "prefix", {}, void 0, !0)
2602
+ ]),
2603
+ key: "0"
2604
+ } : void 0
2605
+ ]), 1032, ["class", "size", "invalid", "disabled", "prefix-icon"]));
2606
+ }
2607
+ }), Za = /* @__PURE__ */ N(Pa, [["__scopeId", "data-v-4b234a9c"]]);
2608
+ function Aa(e, t = {}) {
2609
+ const r = ma(), o = mn(), n = Kt(), l = S(!1), c = S(!1), a = S(null), i = S(t.initialResultValue), s = async (...u) => {
2610
+ try {
2611
+ if (l.value = !0, a.value = null, t.onBeforeSubmit && await t.onBeforeSubmit({ params: u, dialog: o, snackbar: r }) === !1) {
2612
+ l.value = !1;
2613
+ return;
2614
+ }
2615
+ i.value = await e(...u);
2616
+ } catch (d) {
2617
+ if (a.value = d, t.errorMessage && r && r.error(
2618
+ typeof t.errorMessage == "function" ? t.errorMessage({ error: d, params: u }) : t.errorMessage || d.message
2619
+ ), l.value = !1, t.onError && t.onError({ error: d, params: u, router: n, snackbar: r, dialog: o }))
2620
+ return;
2621
+ throw d;
2622
+ }
2623
+ return c.value = !0, l.value = !1, t.successMessage && r && r.success(
2624
+ typeof t.successMessage == "function" ? t.successMessage({ result: i.value, params: u }) : t.successMessage
2625
+ ), t.onSuccess?.({ result: i.value, params: u, router: n, snackbar: r, dialog: o }), t.redirectOnSuccess && n.push(
2626
+ typeof t.redirectOnSuccess == "function" ? t.redirectOnSuccess({ result: i.value, params: u }) : t.redirectOnSuccess
2627
+ ), i.value;
2628
+ };
2629
+ return t.immediate && we(s), {
2630
+ submit: s,
2631
+ result: i,
2632
+ error: a,
2633
+ isSubmitting: l,
2634
+ hasSubbmitted: c
2635
+ };
2636
+ }
2637
+ const La = (e, t = {}) => {
2638
+ const {
2639
+ isSubmitting: r,
2640
+ hasSubbmitted: o,
2641
+ submit: n,
2642
+ result: l,
2643
+ error: c
2644
+ } = Aa(e, {
2645
+ onBeforeSubmit: t.onBeforeLoad ? ({ params: a, dialog: i, snackbar: s }) => t.onBeforeLoad({ params: a, dialog: i, snackbar: s }) : void 0,
2646
+ onSuccess: ({ router: a, params: i, result: s }) => t.onSuccess?.({ data: s, params: i, router: a }),
2647
+ onError: ({ router: a, error: i, params: s }) => t.onError?.({ error: i, params: s, router: a }),
2648
+ successMessage: typeof t.successMessage == "function" ? ({ params: a, result: i }) => t.successMessage({ data: i, params: a }) : t.successMessage,
2649
+ errorMessage: typeof t.errorMessage == "function" ? ({ params: a, error: i }) => t.errorMessage({ error: i, params: a }) : t.errorMessage,
2650
+ immediate: t.immediate,
2651
+ initialResultValue: t.initialValue
2652
+ });
2653
+ return {
2654
+ load: n,
2655
+ isLoading: r,
2656
+ hasLoaded: o,
2657
+ data: l,
2658
+ error: c
2659
+ };
2660
+ }, it = 25;
2661
+ function ei(e, t = {}) {
2662
+ const r = S([]), o = S(), { immediate: n, initialValue: l, ...c } = t, { isLoading: a, hasLoaded: i, load: s } = La(e, c), u = async (f = 1) => {
2663
+ const g = await s({ page: f, itemsPerPage: t.itemsPerPage || it });
2664
+ return r.value = g.items, o.value = g.pagination, g;
2665
+ }, d = async () => {
2666
+ if (!o.value?.hasNextPage)
2667
+ return;
2668
+ const f = await s({
2669
+ page: o.value.currentPage + 1,
2670
+ itemsPerPage: t.itemsPerPage || it
2671
+ });
2672
+ return t.append ? r.value = [...r.value, ...f.items] : r.value = f.items, o.value = f.pagination, f;
2673
+ }, v = async () => {
2674
+ if (!o.value?.hasPreviousPage)
2675
+ return;
2676
+ const f = await s({
2677
+ page: o.value.currentPage - 1,
2678
+ itemsPerPage: t.itemsPerPage || it
2679
+ });
2680
+ return t.append ? r.value = [...f.items, ...r.value] : r.value = f.items, o.value = f.pagination, f;
2681
+ };
2682
+ return n && we(u), {
2683
+ isLoading: a,
2684
+ hasLoaded: i,
2685
+ items: r,
2686
+ pagination: o,
2687
+ loadPage: u,
2688
+ loadNextPage: d,
2689
+ loadPreviousPage: v
2690
+ };
2691
+ }
2692
+ function ti(e, t) {
2693
+ const r = (o) => {
2694
+ e.value?.contains(o.target) || t(o);
2695
+ };
2696
+ window.addEventListener("focus", r), Ht(() => {
2697
+ window.removeEventListener("focus", r);
2698
+ });
2699
+ }
2700
+ const Nt = (e) => e !== "" && e !== void 0 && e !== null && (Array.isArray(e) ? e.length > 0 : !0);
2701
+ function Va(e) {
2702
+ const t = Kt(), r = wr(), o = k(() => {
2703
+ let a = r.query;
2704
+ return e.filter?.length && (a = Object.fromEntries(
2705
+ Object.entries(a).filter(([i]) => e.filter?.includes(i))
2706
+ )), a = Object.fromEntries(
2707
+ Object.entries(a).map(([i, s]) => [
2708
+ i,
2709
+ decodeURIComponent(e.parse?.[i] ? e.parse[i](s) : s)
2710
+ ])
2711
+ ), e.defaults && Object.entries(e.defaults).forEach(([i, s]) => {
2712
+ a[i] === void 0 && (a[i] = s);
2713
+ }), a;
2714
+ }), n = (a, i) => encodeURIComponent(e.serialize?.[a] ? e.serialize[a](i) : i), l = (a) => {
2715
+ const i = Object.fromEntries(
2716
+ Object.entries(a).filter(([s, u]) => Nt(u)).map(([s, u]) => [s, n(s, u)])
2717
+ );
2718
+ return t.push({
2719
+ query: i
2720
+ });
2721
+ }, c = (a, i) => {
2722
+ const s = {
2723
+ ...r.query
2724
+ };
2725
+ return s[a] = Nt(i) ? n(a, i) : void 0, t.push({ query: s });
2726
+ };
2727
+ return ye(o, () => e.onChange?.(o.value), { immediate: e.immediate }), {
2728
+ queryParams: o,
2729
+ setQuery: l,
2730
+ setQueryParam: c
2731
+ };
2732
+ }
2733
+ function ri(e) {
2734
+ const { queryParams: t, setQuery: r } = Va({
2735
+ onChange: (l) => e.onChange?.(l.page),
2736
+ filter: ["page"],
2737
+ parse: { page: (l) => Number(l) || 1 },
2738
+ immediate: e.immediate
2739
+ });
2740
+ return { page: k(() => t.value.page), setPage: (l) => r({ page: String(l) }) };
2741
+ }
2742
+ function oi(e) {
2743
+ const t = S(), r = S(!1), o = async (i) => (r.value = !0, t.value = await e(i), r.value = !1, n.value), n = k(() => t.value?.isValid ?? !1), l = k(() => !n.value), c = k(
2744
+ () => t.value && !r.value ? t.value.errorMessages : {}
2745
+ ), a = k(
2746
+ () => t.value?.validatedFields ?? {}
2747
+ );
2748
+ return {
2749
+ isValidating: k(() => r.value),
2750
+ isValid: n,
2751
+ isInvalid: l,
2752
+ errorMessages: c,
2753
+ validatedFields: a,
2754
+ validate: o
2755
+ };
2756
+ }
2757
+ function ni(e, t = {}) {
2758
+ let r = Array.from(e.clipboardData?.items || []).filter((o) => o.kind === "file").map((o) => o.getAsFile()).filter((o) => o !== null);
2759
+ return t.accept && (r = r.filter((o) => o.type.startsWith(t.accept + "/"))), t.multiple || (r = r.slice(0, 1)), r;
2760
+ }
2761
+ class ai extends Error {
2762
+ }
2763
+ export {
2764
+ Ra as A,
2765
+ Fa as B,
2766
+ an as C,
2767
+ ur as D,
2768
+ fn as E,
2769
+ Na as F,
2770
+ mn as G,
2771
+ ma as H,
2772
+ ae as I,
2773
+ za as J,
2774
+ ke as K,
2775
+ ni as L,
2776
+ Pn as M,
2777
+ En as N,
2778
+ Ya as R,
2779
+ Ka as S,
2780
+ Za as T,
2781
+ ai as V,
2782
+ N as _,
2783
+ ze as a,
2784
+ Yo as b,
2785
+ Ta as c,
2786
+ ja as d,
2787
+ Wa as e,
2788
+ Dr as f,
2789
+ Ga as g,
2790
+ Wn as h,
2791
+ Ha as i,
2792
+ Ua as j,
2793
+ Xa as k,
2794
+ Qa as l,
2795
+ Ja as m,
2796
+ Qt as n,
2797
+ An as o,
2798
+ qa as p,
2799
+ La as q,
2800
+ ei as r,
2801
+ Jt as s,
2802
+ ti as t,
2803
+ Lr as u,
2804
+ cr as v,
2805
+ ri as w,
2806
+ Va as x,
2807
+ Aa as y,
2808
+ oi as z
2809
+ };