@codemonster-ru/vueforge 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.ts.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent as K, ref as X, computed as w, watch as le, resolveComponent as be, openBlock as b, createElementBlock as m, normalizeClass as C, renderSlot as k, Fragment as oe, createTextVNode as ee, toDisplayString as H, createBlock as M, withCtx as Y, createCommentVNode as _, createElementVNode as B, renderList as he, withKeys as q, withModifiers as U, unref as J, createVNode as me, nextTick as ue, onMounted as Te, onBeforeUnmount as Re, Teleport as Se, withDirectives as ye, vShow as ke, reactive as Ve, createSlots as Le } from "vue";
2
- import { useRoute as We, useRouter as Me } from "vue-router";
3
- import { CmIcon as Q } from "@codemonster-ru/vueiconify";
4
- const He = ["href", "aria-disabled", "tabindex"], Ce = /* @__PURE__ */ K({
1
+ import { defineComponent as K, ref as j, computed as _, watch as re, resolveComponent as ye, openBlock as b, createElementBlock as y, normalizeClass as $, renderSlot as C, Fragment as le, createTextVNode as oe, toDisplayString as E, createBlock as O, withCtx as Y, createCommentVNode as w, createElementVNode as B, renderList as ke, withKeys as Z, withModifiers as J, unref as Q, createVNode as Ce, nextTick as ce, onMounted as Re, onBeforeUnmount as we, Teleport as _e, withDirectives as ue, vShow as fe, reactive as Ve, createSlots as Le, useSlots as We } from "vue";
2
+ import { useRoute as Oe, useRouter as Ee } from "vue-router";
3
+ import { CmIcon as ee } from "@codemonster-ru/vueiconify";
4
+ const He = ["href", "aria-disabled", "tabindex"], $e = /* @__PURE__ */ K({
5
5
  __name: "link",
6
6
  props: {
7
7
  to: { default: void 0 },
@@ -14,40 +14,40 @@ const He = ["href", "aria-disabled", "tabindex"], Ce = /* @__PURE__ */ K({
14
14
  disabled: { type: Boolean }
15
15
  },
16
16
  emits: ["click", "active", "update:active", "onActive"],
17
- setup(t, { emit: e }) {
18
- const r = e, o = t, n = We(), c = Me(), s = X(null), i = w(() => o.href ?? o.url), l = w(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), u = w(() => o.to), d = w(() => o.to ? c.resolve(o.to) : null), a = w(() => {
19
- if (l.value !== "router-link")
17
+ setup(o, { emit: e }) {
18
+ const r = e, t = o, l = Oe(), c = Ee(), s = j(null), i = _(() => t.href ?? t.url), n = _(() => t.as ? t.as === "router-link" && !t.to ? "a" : t.as : t.type === "router-link" || t.type === "a" ? t.type === "router-link" && !t.to ? "a" : t.type : t.to ? "router-link" : "a"), u = _(() => t.to), d = _(() => t.to ? c.resolve(t.to) : null), a = _(() => {
19
+ if (n.value !== "router-link")
20
20
  return !1;
21
21
  const p = d.value;
22
- return p ? p.name ? n.matched.some(({ name: y }) => y === p.name) : p.fullPath ? n.fullPath === p.fullPath : n.path === p.path : !1;
23
- }), f = w(() => o.active === void 0 ? a.value : o.active), v = (p) => {
24
- if (!o.disabled) {
22
+ return p ? p.name ? l.matched.some(({ name: k }) => k === p.name) : p.fullPath ? l.fullPath === p.fullPath : l.path === p.path : !1;
23
+ }), f = _(() => t.active === void 0 ? a.value : t.active), v = (p) => {
24
+ if (!t.disabled) {
25
25
  r("click", p);
26
26
  return;
27
27
  }
28
28
  p.preventDefault(), p.stopPropagation();
29
29
  };
30
- return le(a, (p) => {
30
+ return re(a, (p) => {
31
31
  p && (r("active"), r("onActive")), r("update:active", p);
32
- }), (p, y) => {
33
- const h = be("router-link");
34
- return l.value === "a" ? (b(), m("a", {
32
+ }), (p, k) => {
33
+ const m = ye("router-link");
34
+ return n.value === "a" ? (b(), y("a", {
35
35
  key: 0,
36
36
  href: i.value,
37
- class: C(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": p.disabled }]),
37
+ class: $(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": p.disabled }]),
38
38
  "aria-disabled": p.disabled,
39
39
  tabindex: p.disabled ? -1 : void 0,
40
40
  onClick: v
41
41
  }, [
42
- p.$slots.default ? k(p.$slots, "default", { key: 0 }) : (b(), m(oe, { key: 1 }, [
43
- ee(H(p.label), 1)
42
+ p.$slots.default ? C(p.$slots, "default", { key: 0 }) : (b(), y(le, { key: 1 }, [
43
+ oe(E(p.label), 1)
44
44
  ], 64))
45
- ], 10, He)) : (b(), M(h, {
45
+ ], 10, He)) : (b(), O(m, {
46
46
  key: 1,
47
47
  ref_key: "link",
48
48
  ref: s,
49
49
  to: u.value,
50
- class: C(["vf-link", { "vf-link_active": f.value }]),
50
+ class: $(["vf-link", { "vf-link_active": f.value }]),
51
51
  "aria-disabled": p.disabled,
52
52
  tabindex: p.disabled ? -1 : void 0,
53
53
  "active-class": "vf-link_partially-active",
@@ -55,23 +55,23 @@ const He = ["href", "aria-disabled", "tabindex"], Ce = /* @__PURE__ */ K({
55
55
  onClick: v
56
56
  }, {
57
57
  default: Y(() => [
58
- p.$slots.default ? k(p.$slots, "default", { key: 0 }) : (b(), m(oe, { key: 1 }, [
59
- ee(H(p.label), 1)
58
+ p.$slots.default ? C(p.$slots, "default", { key: 0 }) : (b(), y(le, { key: 1 }, [
59
+ oe(E(p.label), 1)
60
60
  ], 64))
61
61
  ]),
62
62
  _: 3
63
63
  }, 8, ["to", "class", "aria-disabled", "tabindex"]));
64
64
  };
65
65
  }
66
- }), Oe = (t, e) => {
67
- const r = t.__vccOpts || t;
68
- for (const [o, n] of e)
69
- r[o] = n;
66
+ }), Me = (o, e) => {
67
+ const r = o.__vccOpts || o;
68
+ for (const [t, l] of e)
69
+ r[t] = l;
70
70
  return r;
71
- }, Ee = {}, Pe = { class: "vf-card" }, Ae = {
71
+ }, Pe = {}, Ae = { class: "vf-card" }, De = {
72
72
  key: 0,
73
73
  class: "vf-card__default"
74
- }, De = {
74
+ }, Ie = {
75
75
  key: 1,
76
76
  class: "vf-card__header"
77
77
  }, je = {
@@ -81,30 +81,30 @@ const He = ["href", "aria-disabled", "tabindex"], Ce = /* @__PURE__ */ K({
81
81
  key: 3,
82
82
  class: "vf-card__footer"
83
83
  };
84
- function Xe(t, e) {
85
- return b(), m("div", Pe, [
86
- t.$slots.default ? (b(), m("div", Ae, [
87
- k(t.$slots, "default")
88
- ])) : _("", !0),
89
- t.$slots.header ? (b(), m("div", De, [
90
- k(t.$slots, "header")
91
- ])) : _("", !0),
92
- t.$slots.body ? (b(), m("div", je, [
93
- k(t.$slots, "body")
94
- ])) : _("", !0),
95
- t.$slots.footer ? (b(), m("div", Ne, [
96
- k(t.$slots, "footer")
97
- ])) : _("", !0)
84
+ function Ke(o, e) {
85
+ return b(), y("div", Ae, [
86
+ o.$slots.default ? (b(), y("div", De, [
87
+ C(o.$slots, "default")
88
+ ])) : w("", !0),
89
+ o.$slots.header ? (b(), y("div", Ie, [
90
+ C(o.$slots, "header")
91
+ ])) : w("", !0),
92
+ o.$slots.body ? (b(), y("div", je, [
93
+ C(o.$slots, "body")
94
+ ])) : w("", !0),
95
+ o.$slots.footer ? (b(), y("div", Ne, [
96
+ C(o.$slots, "footer")
97
+ ])) : w("", !0)
98
98
  ]);
99
99
  }
100
- const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
100
+ const Xe = /* @__PURE__ */ Me(Pe, [["render", Ke]]), Ye = {
101
101
  class: "vf-menu__list",
102
102
  role: "menu"
103
- }, Ke = {
103
+ }, Ge = {
104
104
  key: 1,
105
105
  class: "vf-menu__separator",
106
106
  role: "separator"
107
- }, Ge = ["aria-expanded", "onClick", "onKeydown"], co = /* @__PURE__ */ K({
107
+ }, qe = ["aria-expanded", "onClick", "onKeydown"], bt = /* @__PURE__ */ K({
108
108
  name: "VfMenu",
109
109
  __name: "menu",
110
110
  props: {
@@ -112,69 +112,69 @@ const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
112
112
  orientation: { default: "vertical" }
113
113
  },
114
114
  emits: ["active", "onActive"],
115
- setup(t, { emit: e }) {
116
- const r = e, o = t, n = X([]), c = (d, a) => `${d.label ?? d.to ?? d.href ?? d.url ?? "item"}_${a.toString()}`, s = (d) => d.to ? "router-link" : "a", i = (d) => d.map((a) => ({
115
+ setup(o, { emit: e }) {
116
+ const r = e, t = o, l = j([]), c = (d, a) => `${d.label ?? d.to ?? d.href ?? d.url ?? "item"}_${a.toString()}`, s = (d) => d.to ? "router-link" : "a", i = (d) => d.map((a) => ({
117
117
  ...a,
118
118
  items: a.items ? i(a.items) : void 0
119
- })), l = (d) => {
120
- d.items && d.items.length ? (n.value.map((a) => {
119
+ })), n = (d) => {
120
+ d.items && d.items.length ? (l.value.map((a) => {
121
121
  a !== d && (a.subMenuVisible = !1);
122
122
  }), d.subMenuVisible = !d.subMenuVisible) : Object.prototype.hasOwnProperty.call(d, "command") && typeof d.command == "function" && d.command();
123
123
  }, u = (d) => {
124
124
  var a;
125
- for (const f in n.value) {
126
- const v = n.value[f];
125
+ for (const f in l.value) {
126
+ const v = l.value[f];
127
127
  Object.prototype.hasOwnProperty.call(v, "items") && ((a = v.items) != null && a.some((p) => p === d) ? (v.active = !0, v.subMenuVisible = !0) : (v.active = !1, v.subMenuVisible = !1));
128
128
  }
129
129
  r("active", d), r("onActive", d);
130
130
  };
131
- return le(
132
- () => o.items,
131
+ return re(
132
+ () => t.items,
133
133
  (d) => {
134
- n.value = i(d);
134
+ l.value = i(d);
135
135
  },
136
136
  { deep: !0, immediate: !0 }
137
137
  ), (d, a) => {
138
- const f = be("VfMenu");
139
- return b(), m("div", {
140
- class: C(["vf-menu", `vf-menu_${d.orientation}`])
138
+ const f = ye("VfMenu");
139
+ return b(), y("div", {
140
+ class: $(["vf-menu", `vf-menu_${d.orientation}`])
141
141
  }, [
142
- B("ul", Ie, [
143
- (b(!0), m(oe, null, he(n.value, (v, p) => (b(), m("li", {
142
+ B("ul", Ye, [
143
+ (b(!0), y(le, null, ke(l.value, (v, p) => (b(), y("li", {
144
144
  key: c(v, p),
145
145
  class: "vf-menu__item",
146
146
  role: "none"
147
147
  }, [
148
- d.$slots[c(v, p)] ? k(d.$slots, c(v, p), {
148
+ d.$slots[c(v, p)] ? C(d.$slots, c(v, p), {
149
149
  key: 0,
150
150
  item: { ...v, class: "vf-menu__link" }
151
- }) : v.separator ? (b(), m("hr", Ke)) : v.items && v.items.length ? (b(), m(oe, { key: 2 }, [
151
+ }) : v.separator ? (b(), y("hr", Ge)) : v.items && v.items.length ? (b(), y(le, { key: 2 }, [
152
152
  B("div", {
153
- class: C(["vf-menu__parent", { "vf-menu__parent_active": v.active }]),
153
+ class: $(["vf-menu__parent", { "vf-menu__parent_active": v.active }]),
154
154
  role: "menuitem",
155
155
  tabindex: "0",
156
156
  "aria-expanded": v.subMenuVisible ? "true" : "false",
157
- onClick: (y) => l(v),
157
+ onClick: (k) => n(v),
158
158
  onKeydown: [
159
- q(U((y) => l(v), ["prevent"]), ["enter"]),
160
- q(U((y) => l(v), ["prevent"]), ["space"])
159
+ Z(J((k) => n(v), ["prevent"]), ["enter"]),
160
+ Z(J((k) => n(v), ["prevent"]), ["space"])
161
161
  ]
162
162
  }, [
163
- v.icon ? (b(), M(J(Q), {
163
+ v.icon ? (b(), O(Q(ee), {
164
164
  key: 0,
165
165
  icon: v.icon,
166
166
  class: "vf-menu__icon"
167
- }, null, 8, ["icon"])) : _("", !0),
168
- ee(" " + H(v.label) + " ", 1),
169
- me(J(Q), { icon: "chevronDown" })
170
- ], 42, Ge),
171
- v.items ? (b(), M(f, {
167
+ }, null, 8, ["icon"])) : w("", !0),
168
+ oe(" " + E(v.label) + " ", 1),
169
+ Ce(Q(ee), { icon: "chevronDown" })
170
+ ], 42, qe),
171
+ v.items ? (b(), O(f, {
172
172
  key: 0,
173
173
  items: v.items,
174
- class: C(["vf-menu__submenu", { "vf-menu__submenu_visible": v.subMenuVisible }]),
174
+ class: $(["vf-menu__submenu", { "vf-menu__submenu_visible": v.subMenuVisible }]),
175
175
  onOnActive: u
176
- }, null, 8, ["items", "class"])) : _("", !0)
177
- ], 64)) : (b(), M(Ce, {
176
+ }, null, 8, ["items", "class"])) : w("", !0)
177
+ ], 64)) : (b(), O($e, {
178
178
  key: 3,
179
179
  to: v.to,
180
180
  href: v.href ?? v.url,
@@ -184,16 +184,16 @@ const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
184
184
  disabled: v.disabled,
185
185
  role: "menuitem",
186
186
  "aria-disabled": v.disabled ? "true" : "false",
187
- onClick: (y) => l(v),
188
- onActive: (y) => u(v)
187
+ onClick: (k) => n(v),
188
+ onActive: (k) => u(v)
189
189
  }, {
190
190
  default: Y(() => [
191
- v.icon ? (b(), M(J(Q), {
191
+ v.icon ? (b(), O(Q(ee), {
192
192
  key: 0,
193
193
  icon: v.icon,
194
194
  class: "vf-menu__icon"
195
- }, null, 8, ["icon"])) : _("", !0),
196
- ee(" " + H(v.label), 1)
195
+ }, null, 8, ["icon"])) : w("", !0),
196
+ oe(" " + E(v.label), 1)
197
197
  ]),
198
198
  _: 2
199
199
  }, 1032, ["to", "href", "as", "active", "disabled", "aria-disabled", "onClick", "onActive"]))
@@ -202,7 +202,7 @@ const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
202
202
  ], 2);
203
203
  };
204
204
  }
205
- }), qe = ["type", "disabled"], uo = /* @__PURE__ */ K({
205
+ }), Ue = ["type", "disabled"], ht = /* @__PURE__ */ K({
206
206
  __name: "button",
207
207
  props: {
208
208
  to: { default: void 0 },
@@ -220,71 +220,71 @@ const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
220
220
  severity: { default: "primary" },
221
221
  disabled: { type: Boolean, default: !1 }
222
222
  },
223
- setup(t) {
224
- const e = t, r = ["button", "submit", "reset"], o = (d) => !!d && r.includes(d), n = w(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), c = w(() => o(e.type) ? e.type : "button"), s = w(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), i = w(() => {
223
+ setup(o) {
224
+ const e = o, r = ["button", "submit", "reset"], t = (d) => !!d && r.includes(d), l = _(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !t(e.type))), c = _(() => t(e.type) ? e.type : "button"), s = _(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !t(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), i = _(() => {
225
225
  let d = ["vf-button", `vf-button_${e.severity}`];
226
226
  return ["top", "bottom"].includes(e.iconPos) && d.push("vf-button_vertical"), e.variant === "text" && d.push("vf-button_text"), e.variant === "outlined" && d.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && d.push(`vf-button_${e.size}`), (e.loading || e.disabled) && d.push("vf-button_disabled"), e.rounded && d.push("vf-button_rounded"), d;
227
- }), l = w(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = w(() => ["vf-button__label"]);
228
- return (d, a) => n.value ? (b(), m("button", {
227
+ }), n = _(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = _(() => ["vf-button__label"]);
228
+ return (d, a) => l.value ? (b(), y("button", {
229
229
  key: 0,
230
230
  type: c.value,
231
- class: C(i.value),
231
+ class: $(i.value),
232
232
  disabled: e.loading || e.disabled
233
233
  }, [
234
- e.icon && !e.loading ? (b(), M(J(Q), {
234
+ e.icon && !e.loading ? (b(), O(Q(ee), {
235
235
  key: 0,
236
236
  icon: e.icon,
237
- class: C(l.value)
238
- }, null, 8, ["icon", "class"])) : _("", !0),
239
- e.loading ? (b(), M(J(Q), {
237
+ class: $(n.value)
238
+ }, null, 8, ["icon", "class"])) : w("", !0),
239
+ e.loading ? (b(), O(Q(ee), {
240
240
  key: 1,
241
241
  icon: "circleNotch",
242
- class: C(l.value),
242
+ class: $(n.value),
243
243
  spin: ""
244
- }, null, 8, ["class"])) : _("", !0),
245
- d.$slots.default ? (b(), m("span", {
244
+ }, null, 8, ["class"])) : w("", !0),
245
+ d.$slots.default ? (b(), y("span", {
246
246
  key: 2,
247
- class: C(u.value)
247
+ class: $(u.value)
248
248
  }, [
249
- k(d.$slots, "default")
250
- ], 2)) : d.label ? (b(), m("span", {
249
+ C(d.$slots, "default")
250
+ ], 2)) : d.label ? (b(), y("span", {
251
251
  key: 3,
252
- class: C(u.value)
253
- }, H(d.label), 3)) : _("", !0)
254
- ], 10, qe)) : (b(), M(Ce, {
252
+ class: $(u.value)
253
+ }, E(d.label), 3)) : w("", !0)
254
+ ], 10, Ue)) : (b(), O($e, {
255
255
  key: 1,
256
256
  to: e.to,
257
257
  href: e.href ?? e.url,
258
258
  as: s.value,
259
- class: C(i.value),
259
+ class: $(i.value),
260
260
  disabled: e.loading || e.disabled
261
261
  }, {
262
262
  default: Y(() => [
263
- e.icon ? (b(), M(J(Q), {
263
+ e.icon ? (b(), O(Q(ee), {
264
264
  key: 0,
265
265
  icon: e.icon,
266
- class: C(l.value)
267
- }, null, 8, ["icon", "class"])) : _("", !0),
268
- d.$slots.default ? (b(), m("span", {
266
+ class: $(n.value)
267
+ }, null, 8, ["icon", "class"])) : w("", !0),
268
+ d.$slots.default ? (b(), y("span", {
269
269
  key: 1,
270
- class: C(u.value)
270
+ class: $(u.value)
271
271
  }, [
272
- k(d.$slots, "default")
273
- ], 2)) : d.label ? (b(), m("span", {
272
+ C(d.$slots, "default")
273
+ ], 2)) : d.label ? (b(), y("span", {
274
274
  key: 2,
275
- class: C(u.value)
276
- }, H(d.label), 3)) : _("", !0)
275
+ class: $(u.value)
276
+ }, E(d.label), 3)) : w("", !0)
277
277
  ]),
278
278
  _: 3
279
279
  }, 8, ["to", "href", "as", "class", "disabled"]));
280
280
  }
281
- }), Ue = {
281
+ }), Ze = {
282
282
  key: 0,
283
283
  class: "vf-input__prefix"
284
- }, Ze = ["type", "value", "placeholder", "disabled", "readonly"], Je = {
284
+ }, Je = ["type", "value", "placeholder", "disabled", "readonly"], Qe = {
285
285
  key: 1,
286
286
  class: "vf-input__suffix"
287
- }, fo = /* @__PURE__ */ K({
287
+ }, mt = /* @__PURE__ */ K({
288
288
  __name: "input",
289
289
  props: {
290
290
  modelValue: { default: "" },
@@ -296,20 +296,20 @@ const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
296
296
  variant: { default: "filled" }
297
297
  },
298
298
  emits: ["update:modelValue", "input", "change", "focus", "blur"],
299
- setup(t, { emit: e }) {
300
- const r = e, o = t, n = w(() => {
301
- const u = ["vf-input", `vf-input_${o.variant}`];
302
- return o.size !== "normal" && u.push(`vf-input_${o.size}`), o.disabled && u.push("vf-input_disabled"), u;
299
+ setup(o, { emit: e }) {
300
+ const r = e, t = o, l = _(() => {
301
+ const u = ["vf-input", `vf-input_${t.variant}`];
302
+ return t.size !== "normal" && u.push(`vf-input_${t.size}`), t.disabled && u.push("vf-input_disabled"), u;
303
303
  }), c = (u) => {
304
304
  const d = u.target;
305
305
  r("update:modelValue", d.value), r("input", u);
306
- }, s = (u) => r("change", u), i = (u) => r("focus", u), l = (u) => r("blur", u);
307
- return (u, d) => (b(), m("div", {
308
- class: C(n.value)
306
+ }, s = (u) => r("change", u), i = (u) => r("focus", u), n = (u) => r("blur", u);
307
+ return (u, d) => (b(), y("div", {
308
+ class: $(l.value)
309
309
  }, [
310
- u.$slots.prefix ? (b(), m("span", Ue, [
311
- k(u.$slots, "prefix")
312
- ])) : _("", !0),
310
+ u.$slots.prefix ? (b(), y("span", Ze, [
311
+ C(u.$slots, "prefix")
312
+ ])) : w("", !0),
313
313
  B("input", {
314
314
  class: "vf-input__control",
315
315
  type: u.type,
@@ -320,14 +320,14 @@ const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
320
320
  onInput: c,
321
321
  onChange: s,
322
322
  onFocus: i,
323
- onBlur: l
324
- }, null, 40, Ze),
325
- u.$slots.suffix ? (b(), m("span", Je, [
326
- k(u.$slots, "suffix")
327
- ])) : _("", !0)
323
+ onBlur: n
324
+ }, null, 40, Je),
325
+ u.$slots.suffix ? (b(), y("span", Qe, [
326
+ C(u.$slots, "suffix")
327
+ ])) : w("", !0)
328
328
  ], 2));
329
329
  }
330
- }), fe = [
330
+ }), ge = [
331
331
  "top",
332
332
  "top-start",
333
333
  "top-end",
@@ -340,122 +340,122 @@ const Ye = /* @__PURE__ */ Oe(Ee, [["render", Xe]]), Ie = {
340
340
  "left",
341
341
  "left-start",
342
342
  "left-end"
343
- ], A = (t) => {
344
- if (t == null || !(t instanceof HTMLElement))
343
+ ], X = (o) => {
344
+ if (o == null || !(o instanceof HTMLElement))
345
345
  return null;
346
346
  if (typeof window < "u") {
347
- const e = window.getComputedStyle(t), r = `${e.overflowX}${e.overflowY}`;
347
+ const e = window.getComputedStyle(o), r = `${e.overflowX}${e.overflowY}`;
348
348
  if (/(auto|scroll|overlay)/.test(r))
349
- return t;
349
+ return o;
350
350
  }
351
- return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : A(t.parentNode);
351
+ return o.scrollHeight > o.clientHeight || o.scrollWidth > o.clientWidth ? o : X(o.parentNode);
352
352
  };
353
- function Qe(t) {
354
- return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
353
+ function eo(o) {
354
+ return typeof window > "u" ? !1 : window.getComputedStyle(o).position === "fixed";
355
355
  }
356
- const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G = (t, e) => et(t, e) === "fixed", T = (t, e, r = {}) => {
357
- const o = t.getBoundingClientRect(), n = e ? e.offsetParent : null, c = e ? G(r, e) : !1;
358
- if (n && !c) {
359
- const s = n.getBoundingClientRect(), i = n.scrollLeft, l = n.scrollTop;
356
+ const oo = (o, e) => o.strategy ? o.strategy : eo(e) ? "fixed" : "absolute", q = (o, e) => oo(o, e) === "fixed", V = (o, e, r = {}) => {
357
+ const t = o.getBoundingClientRect(), l = e ? e.offsetParent : null, c = e ? q(r, e) : !1;
358
+ if (l && !c) {
359
+ const s = l.getBoundingClientRect(), i = l.scrollLeft, n = l.scrollTop;
360
360
  return {
361
- left: o.left - s.left + i,
362
- top: o.top - s.top + l,
363
- width: o.width,
364
- height: o.height
361
+ left: t.left - s.left + i,
362
+ top: t.top - s.top + n,
363
+ width: t.width,
364
+ height: t.height
365
365
  };
366
366
  }
367
367
  return {
368
- left: o.left,
369
- top: o.top,
370
- width: o.width,
371
- height: o.height
368
+ left: t.left,
369
+ top: t.top,
370
+ width: t.width,
371
+ height: t.height
372
372
  };
373
- }, I = (t, e) => {
373
+ }, G = (o, e) => {
374
374
  var r;
375
- return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
376
- }, we = (t, e) => !!I(t, e), tt = (t) => {
377
- const e = A(t);
375
+ return (r = o.middleware) == null ? void 0 : r.find((t) => t.name === e);
376
+ }, Fe = (o, e) => !!G(o, e), to = (o) => {
377
+ const e = X(o);
378
378
  let r = "";
379
379
  return e !== null && ((e.dataset.scrollTop === void 0 || e.scrollTop === +e.dataset.scrollTop) && (e.dataset.scrollTop = "0"), (e.dataset.scrollLeft === void 0 || e.scrollLeft === +e.dataset.scrollLeft) && (e.dataset.scrollLeft = "0"), e.scrollTop > +e.dataset.scrollTop ? r = "bottom" : e.scrollTop < +e.dataset.scrollTop ? r = "top" : e.scrollLeft > +e.dataset.scrollLeft ? r = "right" : e.scrollLeft < +e.dataset.scrollLeft && (r = "left"), e.dataset.scrollTop = e.scrollTop <= 0 ? "0" : e.scrollTop.toString(), e.dataset.scrollLeft = e.scrollLeft <= 0 ? "0" : e.scrollLeft.toString()), r;
380
- }, ot = (t) => t.scrollLeft + t.clientWidth, rt = (t) => t.scrollTop + t.clientHeight, V = (t, e, r = null, o = {}, n) => {
381
- if (r === null && typeof window < "u" && G(o, e))
382
- return t;
380
+ }, ro = (o) => o.scrollLeft + o.clientWidth, lo = (o) => o.scrollTop + o.clientHeight, P = (o, e, r = null, t = {}, l) => {
381
+ if (r === null && typeof window < "u" && q(t, e))
382
+ return o;
383
383
  let c = 0;
384
384
  if (r === null) {
385
- const s = A(e);
385
+ const s = X(e);
386
386
  c = s ? s.scrollTop : 0;
387
387
  }
388
- return t - c;
389
- }, L = (t, e, r = null, o = {}, n) => {
388
+ return o - c;
389
+ }, A = (o, e, r = null, t = {}, l) => {
390
390
  let c;
391
- if (r === null && typeof window < "u" && G(o, e))
391
+ if (r === null && typeof window < "u" && q(t, e))
392
392
  c = window.innerWidth;
393
393
  else if (r === null) {
394
- const s = A(e);
395
- c = s ? ot(s) : 0;
394
+ const s = X(e);
395
+ c = s ? ro(s) : 0;
396
396
  } else
397
397
  c = r.getBoundingClientRect().width;
398
- return -(t + e.clientWidth - c);
399
- }, E = (t, e, r = null, o = {}, n) => {
398
+ return -(o + e.clientWidth - c);
399
+ }, I = (o, e, r = null, t = {}, l) => {
400
400
  let c;
401
- if (r === null && typeof window < "u" && G(o, e))
401
+ if (r === null && typeof window < "u" && q(t, e))
402
402
  c = window.innerHeight;
403
403
  else if (r === null) {
404
- const s = A(e);
405
- c = s ? rt(s) : 0;
404
+ const s = X(e);
405
+ c = s ? lo(s) : 0;
406
406
  } else
407
407
  c = r.getBoundingClientRect().height;
408
- return -(t + e.clientHeight - c);
409
- }, W = (t, e, r = null, o = {}, n) => {
410
- if (r === null && typeof window < "u" && G(o, e))
411
- return t;
408
+ return -(o + e.clientHeight - c);
409
+ }, D = (o, e, r = null, t = {}, l) => {
410
+ if (r === null && typeof window < "u" && q(t, e))
411
+ return o;
412
412
  let c = 0;
413
413
  if (r === null) {
414
- const s = A(e);
414
+ const s = X(e);
415
415
  c = s ? s.scrollLeft : 0;
416
416
  }
417
- return t - c;
418
- }, ve = ({
419
- options: t,
417
+ return o - c;
418
+ }, be = ({
419
+ options: o,
420
420
  primaryX: e,
421
421
  primaryY: r,
422
- floating: o,
423
- placement: n,
422
+ floating: t,
423
+ placement: l,
424
424
  reference: c,
425
425
  scrollDirection: s
426
426
  }) => {
427
- const i = ae(c, o, n, t), l = I(t, "offset");
428
- if (l) {
429
- const u = l.fn({
427
+ const i = se(c, t, l, o), n = G(o, "offset");
428
+ if (n) {
429
+ const u = n.fn({
430
430
  x: i.x,
431
431
  y: i.y,
432
- options: t,
432
+ options: o,
433
433
  primaryX: e,
434
434
  primaryY: r,
435
- floating: o,
436
- placement: n,
435
+ floating: t,
436
+ placement: l,
437
437
  reference: c,
438
438
  scrollDirection: s
439
439
  });
440
440
  i.x = u.x, i.y = u.y;
441
441
  }
442
- return _t(i, o, c, t) ? {
442
+ return Fo(i, t, c, o) ? {
443
443
  x: i.x,
444
444
  y: i.y,
445
- placement: n
445
+ placement: l
446
446
  } : !1;
447
- }, nt = (t) => ({
447
+ }, no = (o) => ({
448
448
  name: "flip",
449
- params: t,
449
+ params: o,
450
450
  fn: ({
451
451
  x: e,
452
452
  y: r,
453
- options: o,
454
- primaryX: n,
453
+ options: t,
454
+ primaryX: l,
455
455
  primaryY: c,
456
456
  floating: s,
457
457
  placement: i,
458
- reference: l,
458
+ reference: n,
459
459
  scrollDirection: u
460
460
  }) => {
461
461
  var d;
@@ -464,244 +464,244 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
464
464
  y: r,
465
465
  placement: i
466
466
  }, f = {
467
- ...o,
468
- middleware: (d = o.middleware) == null ? void 0 : d.filter((x) => x.name !== "shift")
469
- }, v = (t == null ? void 0 : t.placements) ?? fe, p = !(t != null && t.placements), y = p ? fe : v;
470
- let h = !1;
471
- const R = (x) => {
472
- if (h)
467
+ ...t,
468
+ middleware: (d = t.middleware) == null ? void 0 : d.filter((z) => z.name !== "shift")
469
+ }, v = (o == null ? void 0 : o.placements) ?? ge, p = !(o != null && o.placements), k = p ? ge : v;
470
+ let m = !1;
471
+ const x = (z) => {
472
+ if (m)
473
473
  return;
474
- const F = ve({
474
+ const S = be({
475
475
  options: f,
476
- primaryX: n,
476
+ primaryX: l,
477
477
  primaryY: c,
478
478
  floating: s,
479
- placement: x,
480
- reference: l,
479
+ placement: z,
480
+ reference: n,
481
481
  scrollDirection: u
482
482
  });
483
- F && (a.x = F.x, a.y = F.y, a.placement = F.placement, h = !0);
484
- }, D = Ft(l, s, f);
485
- if (!p && v.includes(i) && R(i), h || y.forEach(R), !h) {
486
- const x = v.reduce(
487
- (F, O) => {
488
- const j = ve({
483
+ S && (a.x = S.x, a.y = S.y, a.placement = S.placement, m = !0);
484
+ }, H = xo(n, s, f);
485
+ if (!p && v.includes(i) && x(i), m || k.forEach(x), !m) {
486
+ const z = v.reduce(
487
+ (S, L) => {
488
+ const M = be({
489
489
  options: f,
490
- primaryX: n,
490
+ primaryX: l,
491
491
  primaryY: c,
492
492
  floating: s,
493
- placement: O,
494
- reference: l,
493
+ placement: L,
494
+ reference: n,
495
495
  scrollDirection: u
496
496
  });
497
- if (!j)
498
- return F;
499
- const S = te(O), N = D[S];
500
- return !F || N > F.space ? { result: j, space: N } : F;
497
+ if (!M)
498
+ return S;
499
+ const R = te(L), W = H[R];
500
+ return !S || W > S.space ? { result: M, space: W } : S;
501
501
  },
502
502
  null
503
503
  );
504
- x && (a.x = x.result.x, a.y = x.result.y, a.placement = x.result.placement, h = !0);
504
+ z && (a.x = z.result.x, a.y = z.result.y, a.placement = z.result.placement, m = !0);
505
505
  }
506
- if (!h && v.length > 0) {
507
- const x = te(i);
508
- let F = x, O = D[x];
509
- v.forEach((Z) => {
510
- const g = te(Z), $ = D[g];
511
- $ > O && (O = $, F = g);
506
+ if (!m && v.length > 0) {
507
+ const z = te(i);
508
+ let S = z, L = H[z];
509
+ v.forEach((h) => {
510
+ const g = te(h), F = H[g];
511
+ F > L && (L = F, S = g);
512
512
  });
513
- const j = $t(F, i, v), S = ae(l, s, j, f), N = I(f, "offset");
514
- if (N) {
515
- const Z = N.fn({
516
- x: S.x,
517
- y: S.y,
513
+ const M = Bo(S, i, v), R = se(n, s, M, f), W = G(f, "offset");
514
+ if (W) {
515
+ const h = W.fn({
516
+ x: R.x,
517
+ y: R.y,
518
518
  options: f,
519
- primaryX: n,
519
+ primaryX: l,
520
520
  primaryY: c,
521
521
  floating: s,
522
- placement: j,
523
- reference: l,
522
+ placement: M,
523
+ reference: n,
524
524
  scrollDirection: u
525
525
  });
526
- S.x = Z.x, S.y = Z.y;
526
+ R.x = h.x, R.y = h.y;
527
527
  }
528
- a.x = S.x, a.y = S.y, a.placement = S.placement;
528
+ a.x = R.x, a.y = R.y, a.placement = R.placement;
529
529
  }
530
530
  return a;
531
531
  }
532
- }), lt = (t, e, r, o, n) => {
532
+ }), ao = (o, e, r, t, l) => {
533
533
  var c, s, i;
534
- let l = 0;
535
- o.startsWith("right") ? l = -2 : o.startsWith("left") && (l = t);
536
- const u = I(e, "arrow"), d = I(e, "shift");
534
+ let n = 0;
535
+ t.startsWith("right") ? n = -o : t.startsWith("left") && (n = o);
536
+ const u = G(e, "arrow"), d = G(e, "shift");
537
537
  if (u) {
538
538
  const a = ((c = u.params) == null ? void 0 : c.arrow).getBoundingClientRect();
539
- o.startsWith("right") ? l -= a.width / 2 : o.startsWith("left") && (l += a.width / 2);
539
+ t.startsWith("right") ? n -= a.width / 2 : t.startsWith("left") && (n += a.width / 2);
540
540
  }
541
- if (we(e, "shift") && u) {
541
+ if (Fe(e, "shift") && u) {
542
542
  let a = null, f = 0;
543
543
  d && (a = (s = d.params) == null ? void 0 : s.parent);
544
544
  const v = (i = u.params) == null ? void 0 : i.arrow;
545
- f = v.getBoundingClientRect().width / 2, f += it(v), f -= t, o.startsWith("right") ? L(r - l, n, a, e) <= t ? L(r, n, a, e) > 0 ? l = t - L(r, n, a, e) : l = t : W(r - l - f, n, a, e) <= t && (W(r - l - f, n, a, e) >= 0 ? (l = -2 - (W(r - l - f, n, a, e) + t), a && (l = -2)) : l = -2) : o.startsWith("left") ? L(r - l + f, n, a, e) <= t ? (l = t + L(r - f, n, a, e), l <= t && (l = t)) : W(r - l, n, a, e) <= t && (l = -2 + W(r, n, a, e), l <= -2 && (l = -2)) : L(r - l, n, a, e) <= t ? L(r - l, n, a, e) <= t && L(r, n, a, e) > 0 ? l = t - L(r, n, a, e) : l = t : W(r - l, n, a, e) <= t && (W(r - l, n, a, e) <= t && W(r, n, a, e) > 0 ? l = -(t - W(r, n, a, e)) : l = -2);
545
+ f = v.getBoundingClientRect().width / 2, f += co(v), f -= o, t.startsWith("right") ? A(r - n, l, a, e) <= o ? A(r, l, a, e) > 0 ? n = o - A(r, l, a, e) : n = o : D(r - n - f, l, a, e) <= o && (D(r - n - f, l, a, e) >= 0 ? (n = -o - (D(r - n - f, l, a, e) + o), a && (n = -o)) : n = -o) : t.startsWith("left") ? A(r - n + f, l, a, e) <= o ? (n = o + A(r - f, l, a, e), n <= o && (n = o)) : D(r - n, l, a, e) <= o && (n = -o + D(r, l, a, e), n <= -o && (n = -o)) : A(r - n, l, a, e) <= o ? A(r - n, l, a, e) <= o && A(r, l, a, e) > 0 ? n = o - A(r, l, a, e) : n = o : D(r - n, l, a, e) <= o && (D(r - n, l, a, e) <= o && D(r, l, a, e) > 0 ? n = -(o - D(r, l, a, e)) : n = -o);
546
546
  }
547
- return l;
548
- }, at = (t, e, r, o, n) => {
547
+ return n;
548
+ }, so = (o, e, r, t, l) => {
549
549
  var c, s, i;
550
- let l = 0;
551
- o.startsWith("top") ? l = t : o.startsWith("bottom") && (l = -2);
552
- const u = I(e, "arrow"), d = I(e, "shift");
550
+ let n = 0;
551
+ t.startsWith("top") ? n = o : t.startsWith("bottom") && (n = -o);
552
+ const u = G(e, "arrow"), d = G(e, "shift");
553
553
  if (u) {
554
554
  const a = ((c = u.params) == null ? void 0 : c.arrow).getBoundingClientRect();
555
- o.startsWith("top") ? l += a.height / 2 : o.startsWith("bottom") && (l -= a.height / 2);
555
+ t.startsWith("top") ? n += a.height / 2 : t.startsWith("bottom") && (n -= a.height / 2);
556
556
  }
557
- if (we(e, "shift") && u) {
557
+ if (Fe(e, "shift") && u) {
558
558
  let a = null, f = 0;
559
559
  d && (a = (s = d.params) == null ? void 0 : s.parent);
560
560
  const v = (i = u.params) == null ? void 0 : i.arrow;
561
- f = v.getBoundingClientRect().height / 2, f += dt(v), f -= t, o.startsWith("top") ? V(r - l, n, a, e) <= t ? V(r, n, a, e) >= 0 ? l = -(t - V(r, n, a, e)) : l = -2 : E(r - l + f, n, a, e) <= t && (l = t + E(r - f, n, a, e), l <= t && (l = t)) : o.startsWith("bottom") ? V(r - l - f, n, a, e) <= t ? V(r - l - f, n, a, e) >= 0 ? (l = -2 - (V(r - l - f, n, a, e) + t), a && (l = -2)) : l = -2 : E(r - l, n, a, e) <= t && (E(r, n, a, e) >= 0 ? l = t - E(r, n, a, e) : l = t) : V(r - l, n, a, e) <= t ? V(r - l, n, a, e) >= 0 ? l = -(t - V(r - l, n, a, e)) : l = -2 : E(r - l, n, a, e) <= t && (E(r - l, n, a, e) >= 0 ? l = t - E(r - l, n, a, e) : l = t);
561
+ f = v.getBoundingClientRect().height / 2, f += uo(v), f -= o, t.startsWith("top") ? P(r - n, l, a, e) <= o ? P(r, l, a, e) >= 0 ? n = -(o - P(r, l, a, e)) : n = -o : I(r - n + f, l, a, e) <= o && (n = o + I(r - f, l, a, e), n <= o && (n = o)) : t.startsWith("bottom") ? P(r - n - f, l, a, e) <= o ? P(r - n - f, l, a, e) >= 0 ? (n = -o - (P(r - n - f, l, a, e) + o), a && (n = -o)) : n = -o : I(r - n, l, a, e) <= o && (I(r, l, a, e) >= 0 ? n = o - I(r, l, a, e) : n = o) : P(r - n, l, a, e) <= o ? P(r - n, l, a, e) >= 0 ? n = -(o - P(r - n, l, a, e)) : n = -o : I(r - n, l, a, e) <= o && (I(r - n, l, a, e) >= 0 ? n = o - I(r - n, l, a, e) : n = o);
562
562
  }
563
- return l;
564
- }, st = (t) => ({
563
+ return n;
564
+ }, io = (o) => ({
565
565
  name: "offset",
566
- params: { value: t },
566
+ params: { value: o },
567
567
  fn: ({
568
568
  x: e,
569
569
  y: r,
570
- options: o,
571
- primaryX: n,
570
+ options: t,
571
+ primaryX: l,
572
572
  primaryY: c,
573
573
  floating: s,
574
574
  placement: i
575
575
  }) => ({
576
- x: e - lt(t, o, n, i, s),
577
- y: r - at(t, o, c, i, s),
576
+ x: e - ao(o, t, l, i, s),
577
+ y: r - so(o, t, c, i, s),
578
578
  placement: i
579
579
  })
580
- }), it = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, dt = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, ct = (t, e) => {
581
- const r = A(t), o = [];
580
+ }), co = (o) => o.getBoundingClientRect().width !== o.clientWidth ? (o.getBoundingClientRect().width - o.clientWidth) / 2 : 0, uo = (o) => o.getBoundingClientRect().height !== o.clientHeight ? (o.getBoundingClientRect().height - o.clientHeight) / 2 : 0, fo = (o, e) => {
581
+ const r = X(o), t = [];
582
582
  if (r !== null) {
583
- const n = () => e();
584
- r.addEventListener("scroll", n, !1), o.push(() => r.removeEventListener("scroll", n, !1));
583
+ const l = () => e();
584
+ r.addEventListener("scroll", l, !1), t.push(() => r.removeEventListener("scroll", l, !1));
585
585
  }
586
586
  if (typeof window < "u") {
587
- const n = () => e(), c = () => e();
588
- window.addEventListener("scroll", n, !1), window.addEventListener("resize", c, !1), o.push(() => window.removeEventListener("scroll", n, !1)), o.push(() => window.removeEventListener("resize", c, !1));
587
+ const l = () => e(), c = () => e();
588
+ window.addEventListener("scroll", l, !1), window.addEventListener("resize", c, !1), t.push(() => window.removeEventListener("scroll", l, !1)), t.push(() => window.removeEventListener("resize", c, !1));
589
589
  }
590
- if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
591
- const n = new ResizeObserver(() => e());
592
- n.observe(t), o.push(() => n.disconnect());
590
+ if (typeof ResizeObserver < "u" && o instanceof HTMLElement) {
591
+ const l = new ResizeObserver(() => e());
592
+ l.observe(o), t.push(() => l.disconnect());
593
593
  }
594
- return () => o.forEach((n) => n());
595
- }, ut = (t, e, r = {}) => {
596
- const o = T(t, e, r);
594
+ return () => t.forEach((l) => l());
595
+ }, vo = (o, e, r = {}) => {
596
+ const t = V(o, e, r);
597
597
  return {
598
- x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
599
- y: o.top - e.getBoundingClientRect().height,
598
+ x: t.left - e.getBoundingClientRect().width / 2 + t.width / 2,
599
+ y: t.top - e.getBoundingClientRect().height,
600
600
  placement: "top"
601
601
  };
602
- }, ft = (t, e, r = {}) => {
603
- const o = T(t, e, r);
602
+ }, po = (o, e, r = {}) => {
603
+ const t = V(o, e, r);
604
604
  return {
605
- x: o.left,
606
- y: o.top - e.getBoundingClientRect().height,
605
+ x: t.left,
606
+ y: t.top - e.getBoundingClientRect().height,
607
607
  placement: "top-start"
608
608
  };
609
- }, vt = (t, e, r = {}) => {
610
- const o = T(t, e, r);
609
+ }, go = (o, e, r = {}) => {
610
+ const t = V(o, e, r);
611
611
  return {
612
- x: o.left - e.getBoundingClientRect().width + o.width,
613
- y: o.top - e.getBoundingClientRect().height,
612
+ x: t.left - e.getBoundingClientRect().width + t.width,
613
+ y: t.top - e.getBoundingClientRect().height,
614
614
  placement: "top-end"
615
615
  };
616
- }, pt = (t, e, r = {}) => {
617
- const o = T(t, e, r);
616
+ }, bo = (o, e, r = {}) => {
617
+ const t = V(o, e, r);
618
618
  return {
619
- x: o.left + o.width,
620
- y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
619
+ x: t.left + t.width,
620
+ y: t.top - e.getBoundingClientRect().height / 2 + t.height / 2,
621
621
  placement: "right"
622
622
  };
623
- }, gt = (t, e, r = {}) => {
624
- const o = T(t, e, r);
623
+ }, ho = (o, e, r = {}) => {
624
+ const t = V(o, e, r);
625
625
  return {
626
- x: o.left + o.width,
627
- y: o.top,
626
+ x: t.left + t.width,
627
+ y: t.top,
628
628
  placement: "right-start"
629
629
  };
630
- }, bt = (t, e, r = {}) => {
631
- const o = T(t, e, r);
630
+ }, mo = (o, e, r = {}) => {
631
+ const t = V(o, e, r);
632
632
  return {
633
- x: o.left + o.width,
634
- y: o.top + o.height - e.getBoundingClientRect().height,
633
+ x: t.left + t.width,
634
+ y: t.top + t.height - e.getBoundingClientRect().height,
635
635
  placement: "right-end"
636
636
  };
637
- }, ht = (t, e, r = {}) => {
638
- const o = T(t, e, r);
637
+ }, yo = (o, e, r = {}) => {
638
+ const t = V(o, e, r);
639
639
  return {
640
- x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
641
- y: o.top + o.height,
640
+ x: t.left + t.width / 2 - e.getBoundingClientRect().width / 2,
641
+ y: t.top + t.height,
642
642
  placement: "bottom"
643
643
  };
644
- }, mt = (t, e, r = {}) => {
645
- const o = T(t, e, r);
644
+ }, ko = (o, e, r = {}) => {
645
+ const t = V(o, e, r);
646
646
  return {
647
- x: o.left,
648
- y: o.top + o.height,
647
+ x: t.left,
648
+ y: t.top + t.height,
649
649
  placement: "bottom-start"
650
650
  };
651
- }, yt = (t, e, r = {}) => {
652
- const o = T(t, e, r);
651
+ }, Co = (o, e, r = {}) => {
652
+ const t = V(o, e, r);
653
653
  return {
654
- x: o.left - e.getBoundingClientRect().width + o.width,
655
- y: o.top + o.height,
654
+ x: t.left - e.getBoundingClientRect().width + t.width,
655
+ y: t.top + t.height,
656
656
  placement: "bottom-end"
657
657
  };
658
- }, kt = (t, e, r = {}) => {
659
- const o = T(t, e, r);
658
+ }, wo = (o, e, r = {}) => {
659
+ const t = V(o, e, r);
660
660
  return {
661
- x: o.left - e.getBoundingClientRect().width,
662
- y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
661
+ x: t.left - e.getBoundingClientRect().width,
662
+ y: t.top + t.height / 2 - e.getBoundingClientRect().height / 2,
663
663
  placement: "left"
664
664
  };
665
- }, Ct = (t, e, r = {}) => {
666
- const o = T(t, e, r);
665
+ }, _o = (o, e, r = {}) => {
666
+ const t = V(o, e, r);
667
667
  return {
668
- x: o.left - e.getBoundingClientRect().width,
669
- y: o.top,
668
+ x: t.left - e.getBoundingClientRect().width,
669
+ y: t.top,
670
670
  placement: "left-start"
671
671
  };
672
- }, wt = (t, e, r = {}) => {
673
- const o = T(t, e, r);
672
+ }, $o = (o, e, r = {}) => {
673
+ const t = V(o, e, r);
674
674
  return {
675
- x: o.left - e.getBoundingClientRect().width,
676
- y: o.top + o.height - e.getBoundingClientRect().height,
675
+ x: t.left - e.getBoundingClientRect().width,
676
+ y: t.top + t.height - e.getBoundingClientRect().height,
677
677
  placement: "left-end"
678
678
  };
679
- }, ae = (t, e, r, o = {}) => {
679
+ }, se = (o, e, r, t = {}) => {
680
680
  switch (r) {
681
681
  case "top":
682
- return ut(t, e, o);
682
+ return vo(o, e, t);
683
683
  case "top-start":
684
- return ft(t, e, o);
684
+ return po(o, e, t);
685
685
  case "top-end":
686
- return vt(t, e, o);
686
+ return go(o, e, t);
687
687
  case "right":
688
- return pt(t, e, o);
688
+ return bo(o, e, t);
689
689
  case "right-start":
690
- return gt(t, e, o);
690
+ return ho(o, e, t);
691
691
  case "right-end":
692
- return bt(t, e, o);
692
+ return mo(o, e, t);
693
693
  case "bottom":
694
- return ht(t, e, o);
694
+ return yo(o, e, t);
695
695
  case "bottom-start":
696
- return mt(t, e, o);
696
+ return ko(o, e, t);
697
697
  case "bottom-end":
698
- return yt(t, e, o);
698
+ return Co(o, e, t);
699
699
  case "left":
700
- return kt(t, e, o);
700
+ return wo(o, e, t);
701
701
  case "left-start":
702
- return Ct(t, e, o);
702
+ return _o(o, e, t);
703
703
  case "left-end":
704
- return wt(t, e, o);
704
+ return $o(o, e, t);
705
705
  default:
706
706
  return {
707
707
  x: 0,
@@ -709,25 +709,25 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
709
709
  placement: ""
710
710
  };
711
711
  }
712
- }, _t = (t, e, r, o = {}) => {
713
- if (G(o, e)) {
712
+ }, Fo = (o, e, r, t = {}) => {
713
+ if (q(t, e)) {
714
714
  if (typeof window > "u")
715
715
  return !0;
716
- const a = t.x, f = t.y, v = a + e.clientWidth, p = f + e.clientHeight;
716
+ const a = o.x, f = o.y, v = a + e.clientWidth, p = f + e.clientHeight;
717
717
  return a >= 0 && f >= 0 && v <= window.innerWidth && p <= window.innerHeight;
718
718
  }
719
- if (A(r) !== null)
720
- return V(t.y, e, null, o) > 0 && L(t.x, e, null, o) > 0 && E(t.y, e, null, o) > 0 && W(t.x, e, null, o) > 0;
719
+ if (X(r) !== null)
720
+ return P(o.y, e, null, t) > 0 && A(o.x, e, null, t) > 0 && I(o.y, e, null, t) > 0 && D(o.x, e, null, t) > 0;
721
721
  if (typeof window > "u")
722
722
  return !0;
723
- const n = window.innerWidth, c = window.innerHeight, s = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
723
+ const l = window.innerWidth, c = window.innerHeight, s = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
724
724
  if (s) {
725
- const a = s.getBoundingClientRect(), f = a.left + t.x, v = a.top + t.y, p = f + e.clientWidth, y = v + e.clientHeight;
726
- return f >= 0 && v >= 0 && p <= n && y <= c;
725
+ const a = s.getBoundingClientRect(), f = a.left + o.x, v = a.top + o.y, p = f + e.clientWidth, k = v + e.clientHeight;
726
+ return f >= 0 && v >= 0 && p <= l && k <= c;
727
727
  }
728
- const i = t.x, l = t.y, u = i + e.clientWidth, d = l + e.clientHeight;
729
- return i >= 0 && l >= 0 && u <= n && d <= c;
730
- }, te = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", $t = (t, e, r) => te(e) === t && r.includes(e) ? e : r.find((o) => te(o) === t) ?? r[0], Ft = (t, e, r = {}) => {
728
+ const i = o.x, n = o.y, u = i + e.clientWidth, d = n + e.clientHeight;
729
+ return i >= 0 && n >= 0 && u <= l && d <= c;
730
+ }, te = (o) => o.startsWith("right") ? "right" : o.startsWith("left") ? "left" : o.startsWith("top") ? "top" : "bottom", Bo = (o, e, r) => te(e) === o && r.includes(e) ? e : r.find((t) => te(t) === o) ?? r[0], xo = (o, e, r = {}) => {
731
731
  if (typeof window > "u")
732
732
  return {
733
733
  top: 0,
@@ -735,30 +735,30 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
735
735
  bottom: 0,
736
736
  left: 0
737
737
  };
738
- const o = G(r, e) ? null : A(t), n = t.getBoundingClientRect(), c = o ? o.getBoundingClientRect() : {
738
+ const t = q(r, e) ? null : X(o), l = o.getBoundingClientRect(), c = t ? t.getBoundingClientRect() : {
739
739
  top: 0,
740
740
  left: 0,
741
741
  right: window.innerWidth,
742
742
  bottom: window.innerHeight
743
743
  };
744
744
  return {
745
- top: n.top - c.top,
746
- right: c.right - n.right,
747
- bottom: c.bottom - n.bottom,
748
- left: n.left - c.left
745
+ top: l.top - c.top,
746
+ right: c.right - l.right,
747
+ bottom: c.bottom - l.bottom,
748
+ left: l.left - c.left
749
749
  };
750
- }, Bt = (t, e, r = {}) => new Promise((o) => {
751
- var n, c;
750
+ }, zo = (o, e, r = {}) => new Promise((t) => {
751
+ var l, c;
752
752
  const s = r.placement ? r.placement : "bottom", i = {
753
753
  x: 0,
754
754
  y: 0,
755
755
  placement: s,
756
756
  middlewareData: {}
757
- }, l = ae(t, e, s, r);
758
- i.x = l.x, i.y = l.y, i.placement = l.placement;
759
- const u = i.x, d = i.y, a = tt(t);
760
- (n = r.middleware) == null || n.forEach((y) => {
761
- const h = y.fn({
757
+ }, n = se(o, e, s, r);
758
+ i.x = n.x, i.y = n.y, i.placement = n.placement;
759
+ const u = i.x, d = i.y, a = to(o);
760
+ (l = r.middleware) == null || l.forEach((k) => {
761
+ const m = k.fn({
762
762
  x: i.x,
763
763
  y: i.y,
764
764
  options: r,
@@ -766,20 +766,20 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
766
766
  primaryY: d,
767
767
  floating: e,
768
768
  placement: i.placement,
769
- reference: t,
769
+ reference: o,
770
770
  scrollDirection: a
771
771
  });
772
- i.x = h.x, i.y = h.y, i.placement = h.placement, y.name === "arrow" && (h.baseX = h.x, h.baseY = h.y, h.x = h.arrowX ?? h.x, h.y = h.arrowY ?? h.y), i.middlewareData[y.name] = h;
772
+ i.x = m.x, i.y = m.y, i.placement = m.placement, k.name === "arrow" && (m.baseX = m.x, m.baseY = m.y, m.x = m.arrowX ?? m.x, m.y = m.arrowY ?? m.y), i.middlewareData[k.name] = m;
773
773
  });
774
- const f = ae(t, e, i.placement, r), v = I(r, "offset"), p = v ? (c = v.params) == null ? void 0 : c.value : 0;
774
+ const f = se(o, e, i.placement, r), v = G(r, "offset"), p = v ? (c = v.params) == null ? void 0 : c.value : 0;
775
775
  if (Number.isFinite(i.x) || (i.x = f.x), !Number.isFinite(i.y))
776
- if (G(r, e)) {
777
- const y = t.getBoundingClientRect(), h = e.getBoundingClientRect().height;
778
- i.placement.startsWith("top") ? i.y = y.top - h - p : i.placement.startsWith("bottom") ? i.y = y.bottom + p : i.y = f.y;
776
+ if (q(r, e)) {
777
+ const k = o.getBoundingClientRect(), m = e.getBoundingClientRect().height;
778
+ i.placement.startsWith("top") ? i.y = k.top - m - p : i.placement.startsWith("bottom") ? i.y = k.bottom + p : i.y = f.y;
779
779
  } else
780
780
  i.y = f.y;
781
- o(i);
782
- }), xt = ["disabled", "aria-expanded", "onKeydown"], zt = ["data-placement"], Tt = ["disabled", "aria-selected", "onClick"], vo = /* @__PURE__ */ K({
781
+ t(i);
782
+ }), So = ["disabled", "aria-expanded", "onKeydown"], To = ["data-placement"], Ro = ["disabled", "aria-selected", "onClick"], yt = /* @__PURE__ */ K({
783
783
  __name: "select",
784
784
  props: {
785
785
  modelValue: { default: void 0 },
@@ -791,83 +791,83 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
791
791
  size: { default: "normal" }
792
792
  },
793
793
  emits: ["update:modelValue", "change", "focus", "blur"],
794
- setup(t, { emit: e }) {
794
+ setup(o, { emit: e }) {
795
795
  let r = 0;
796
- const o = e, n = t, c = X(null), s = X(null), i = X(null), l = X(!1), u = X("bottom"), d = X("bottom"), a = `vf-select-panel-${++r}`;
796
+ const t = e, l = o, c = j(null), s = j(null), i = j(null), n = j(!1), u = j("bottom"), d = j("bottom"), a = `vf-select-panel-${++r}`;
797
797
  let f = null;
798
- const v = w(() => n.options.map((g) => ({
799
- label: g[n.optionLabel],
800
- value: g[n.optionValue],
798
+ const v = _(() => l.options.map((g) => ({
799
+ label: g[l.optionLabel],
800
+ value: g[l.optionValue],
801
801
  disabled: g.disabled
802
- }))), p = w(() => v.value.find((g) => g.value === n.modelValue)), y = w(() => {
802
+ }))), p = _(() => v.value.find((g) => g.value === l.modelValue)), k = _(() => {
803
803
  var g;
804
804
  return ((g = p.value) == null ? void 0 : g.label) ?? "";
805
- }), h = w(() => {
806
- const g = ["vf-select", l.value ? "vf-select_open" : ""];
807
- return n.size !== "normal" && g.push(`vf-select_${n.size}`), n.disabled && g.push("vf-select_disabled"), g.filter(Boolean);
808
- }), R = (g) => g.value === n.modelValue, D = (g) => {
809
- g.disabled || (o("update:modelValue", g.value), o("change", g.value), O());
810
- }, x = (g) => o("focus", g), F = (g) => o("blur", g), O = () => {
811
- l.value = !1, u.value = "bottom", d.value = "bottom";
812
- }, j = () => {
813
- n.disabled || (l.value = !l.value, l.value && (u.value = "bottom", d.value = "bottom"));
814
- }, S = async () => {
815
- var g, $;
816
- l.value || (l.value = !0, await ue()), ($ = (g = i.value) == null ? void 0 : g.querySelector(".vf-select__option:not(.is-disabled)")) == null || $.focus();
817
- }, N = (g) => {
818
- var z;
819
- if (!l.value || !c.value)
805
+ }), m = _(() => {
806
+ const g = ["vf-select", n.value ? "vf-select_open" : ""];
807
+ return l.size !== "normal" && g.push(`vf-select_${l.size}`), l.disabled && g.push("vf-select_disabled"), g.filter(Boolean);
808
+ }), x = (g) => g.value === l.modelValue, H = (g) => {
809
+ g.disabled || (t("update:modelValue", g.value), t("change", g.value), L());
810
+ }, z = (g) => t("focus", g), S = (g) => t("blur", g), L = () => {
811
+ n.value = !1, u.value = "bottom", d.value = "bottom";
812
+ }, M = () => {
813
+ l.disabled || (n.value = !n.value, n.value && (u.value = "bottom", d.value = "bottom"));
814
+ }, R = async () => {
815
+ var g, F;
816
+ n.value || (n.value = !0, await ce()), (F = (g = i.value) == null ? void 0 : g.querySelector(".vf-select__option:not(.is-disabled)")) == null || F.focus();
817
+ }, W = (g) => {
818
+ var T;
819
+ if (!n.value || !c.value)
820
820
  return;
821
- const $ = g.target;
822
- c.value.contains($) || (z = i.value) != null && z.contains($) || O();
823
- }, Z = () => {
821
+ const F = g.target;
822
+ c.value.contains(F) || (T = i.value) != null && T.contains(F) || L();
823
+ }, h = () => {
824
824
  if (!s.value || !i.value)
825
825
  return;
826
- const g = s.value, $ = i.value, z = async () => {
826
+ const g = s.value, F = i.value, T = async () => {
827
827
  const {
828
- x: Be,
829
- y: xe,
830
- placement: ze
831
- } = await Bt(g, $, {
828
+ x: ze,
829
+ y: Se,
830
+ placement: Te
831
+ } = await zo(g, F, {
832
832
  placement: u.value,
833
833
  strategy: "fixed",
834
- middleware: [st(2), nt({ placements: ["bottom", "top"] })]
834
+ middleware: [io(2), no({ placements: ["bottom", "top"] })]
835
835
  });
836
- d.value = ze ?? u.value, $.style.minWidth = `${g.getBoundingClientRect().width}px`, $.style.left = `${Be}px`, $.style.top = `${xe}px`;
837
- }, re = async () => {
838
- await z();
839
- }, Fe = ct(g, () => {
840
- re();
841
- }), ne = () => {
842
- re();
836
+ d.value = Te ?? u.value, F.style.minWidth = `${g.getBoundingClientRect().width}px`, F.style.left = `${ze}px`, F.style.top = `${Se}px`;
837
+ }, U = async () => {
838
+ await T();
839
+ }, ne = fo(g, () => {
840
+ U();
841
+ }), ae = () => {
842
+ U();
843
843
  };
844
- document.addEventListener("scroll", ne, !0), window.addEventListener("resize", ne, !1), f = {
845
- update: re,
844
+ document.addEventListener("scroll", ae, !0), window.addEventListener("resize", ae, !1), f = {
845
+ update: U,
846
846
  destroy: () => {
847
- Fe(), document.removeEventListener("scroll", ne, !0), window.removeEventListener("resize", ne, !1);
847
+ ne(), document.removeEventListener("scroll", ae, !0), window.removeEventListener("resize", ae, !1);
848
848
  }
849
849
  }, f.update();
850
850
  };
851
- return le(l, async (g) => {
851
+ return re(n, async (g) => {
852
852
  if (!g) {
853
853
  f && (f.destroy(), f = null);
854
854
  return;
855
855
  }
856
- await ue(), f || Z(), f == null || f.update();
857
- }), le(
858
- () => n.options,
856
+ await ce(), f || h(), f == null || f.update();
857
+ }), re(
858
+ () => l.options,
859
859
  () => {
860
860
  f == null || f.update();
861
861
  },
862
862
  { deep: !0 }
863
- ), Te(() => {
864
- document.addEventListener("click", N);
865
- }), Re(() => {
866
- document.removeEventListener("click", N), f == null || f.destroy(), f = null;
867
- }), (g, $) => (b(), m("div", {
863
+ ), Re(() => {
864
+ document.addEventListener("click", W);
865
+ }), we(() => {
866
+ document.removeEventListener("click", W), f == null || f.destroy(), f = null;
867
+ }), (g, F) => (b(), y("div", {
868
868
  ref_key: "root",
869
869
  ref: c,
870
- class: C(h.value)
870
+ class: $(m.value)
871
871
  }, [
872
872
  B("button", {
873
873
  ref_key: "trigger",
@@ -875,28 +875,28 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
875
875
  class: "vf-select__control",
876
876
  type: "button",
877
877
  disabled: g.disabled,
878
- "aria-expanded": l.value,
878
+ "aria-expanded": n.value,
879
879
  "aria-controls": a,
880
880
  "aria-haspopup": "listbox",
881
- onClick: j,
881
+ onClick: M,
882
882
  onKeydown: [
883
- q(U(S, ["prevent"]), ["down"]),
884
- q(U(j, ["prevent"]), ["enter"]),
885
- q(U(O, ["prevent"]), ["esc"])
883
+ Z(J(R, ["prevent"]), ["down"]),
884
+ Z(J(M, ["prevent"]), ["enter"]),
885
+ Z(J(L, ["prevent"]), ["esc"])
886
886
  ],
887
- onFocus: x,
888
- onBlur: F
887
+ onFocus: z,
888
+ onBlur: S
889
889
  }, [
890
890
  B("span", {
891
- class: C(["vf-select__label", { "vf-select__label_placeholder": !y.value }])
892
- }, H(y.value || g.placeholder), 3),
893
- $[0] || ($[0] = B("span", {
891
+ class: $(["vf-select__label", { "vf-select__label_placeholder": !k.value }])
892
+ }, E(k.value || g.placeholder), 3),
893
+ F[0] || (F[0] = B("span", {
894
894
  class: "vf-select__chevron",
895
895
  "aria-hidden": "true"
896
896
  }, "▾", -1))
897
- ], 40, xt),
898
- (b(), M(Se, { to: "body" }, [
899
- ye(B("div", {
897
+ ], 40, So),
898
+ (b(), O(_e, { to: "body" }, [
899
+ ue(B("div", {
900
900
  id: a,
901
901
  ref_key: "panel",
902
902
  ref: i,
@@ -904,25 +904,25 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
904
904
  role: "listbox",
905
905
  "data-placement": d.value
906
906
  }, [
907
- (b(!0), m(oe, null, he(v.value, (z) => (b(), m("button", {
908
- key: z.value,
909
- class: C(["vf-select__option", { "is-active": R(z), "is-disabled": z.disabled }]),
907
+ (b(!0), y(le, null, ke(v.value, (T) => (b(), y("button", {
908
+ key: T.value,
909
+ class: $(["vf-select__option", { "is-active": x(T), "is-disabled": T.disabled }]),
910
910
  type: "button",
911
911
  role: "option",
912
- disabled: z.disabled,
913
- "aria-selected": R(z),
914
- onClick: (re) => D(z)
915
- }, H(z.label), 11, Tt))), 128))
916
- ], 8, zt), [
917
- [ke, l.value]
912
+ disabled: T.disabled,
913
+ "aria-selected": x(T),
914
+ onClick: (U) => H(T)
915
+ }, E(T.label), 11, Ro))), 128))
916
+ ], 8, To), [
917
+ [fe, n.value]
918
918
  ])
919
919
  ]))
920
920
  ], 2));
921
921
  }
922
- }), Rt = ["checked", "disabled"], St = {
922
+ }), Vo = ["checked", "disabled"], Lo = {
923
923
  key: 0,
924
924
  class: "vf-checkbox__label"
925
- }, po = /* @__PURE__ */ K({
925
+ }, kt = /* @__PURE__ */ K({
926
926
  __name: "checkbox",
927
927
  props: {
928
928
  modelValue: { type: Boolean, default: !1 },
@@ -930,16 +930,16 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
930
930
  disabled: { type: Boolean, default: !1 }
931
931
  },
932
932
  emits: ["update:modelValue", "change"],
933
- setup(t, { emit: e }) {
934
- const r = e, o = t, n = w(() => {
933
+ setup(o, { emit: e }) {
934
+ const r = e, t = o, l = _(() => {
935
935
  const s = ["vf-checkbox"];
936
- return o.disabled && s.push("vf-checkbox_disabled"), s;
936
+ return t.disabled && s.push("vf-checkbox_disabled"), s;
937
937
  }), c = (s) => {
938
938
  const i = s.target;
939
939
  r("update:modelValue", i.checked), r("change", s);
940
940
  };
941
- return (s, i) => (b(), m("label", {
942
- class: C(n.value)
941
+ return (s, i) => (b(), y("label", {
942
+ class: $(l.value)
943
943
  }, [
944
944
  B("input", {
945
945
  class: "vf-checkbox__control",
@@ -947,19 +947,19 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
947
947
  checked: s.modelValue,
948
948
  disabled: s.disabled,
949
949
  onChange: c
950
- }, null, 40, Rt),
950
+ }, null, 40, Vo),
951
951
  i[0] || (i[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
952
- s.label || s.$slots.default ? (b(), m("span", St, [
953
- k(s.$slots, "default", {}, () => [
954
- ee(H(s.label), 1)
952
+ s.label || s.$slots.default ? (b(), y("span", Lo, [
953
+ C(s.$slots, "default", {}, () => [
954
+ oe(E(s.label), 1)
955
955
  ])
956
- ])) : _("", !0)
956
+ ])) : w("", !0)
957
957
  ], 2));
958
958
  }
959
- }), Vt = ["checked", "disabled"], Lt = {
959
+ }), Wo = ["checked", "disabled"], Oo = {
960
960
  key: 0,
961
961
  class: "vf-switch__label"
962
- }, go = /* @__PURE__ */ K({
962
+ }, Ct = /* @__PURE__ */ K({
963
963
  __name: "switch",
964
964
  props: {
965
965
  modelValue: { type: Boolean, default: !1 },
@@ -967,16 +967,16 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
967
967
  disabled: { type: Boolean, default: !1 }
968
968
  },
969
969
  emits: ["update:modelValue", "change"],
970
- setup(t, { emit: e }) {
971
- const r = e, o = t, n = w(() => {
970
+ setup(o, { emit: e }) {
971
+ const r = e, t = o, l = _(() => {
972
972
  const s = ["vf-switch"];
973
- return o.disabled && s.push("vf-switch_disabled"), s;
973
+ return t.disabled && s.push("vf-switch_disabled"), s;
974
974
  }), c = (s) => {
975
975
  const i = s.target;
976
976
  r("update:modelValue", i.checked), r("change", s);
977
977
  };
978
- return (s, i) => (b(), m("label", {
979
- class: C(n.value)
978
+ return (s, i) => (b(), y("label", {
979
+ class: $(l.value)
980
980
  }, [
981
981
  B("input", {
982
982
  class: "vf-switch__control",
@@ -984,43 +984,43 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
984
984
  checked: s.modelValue,
985
985
  disabled: s.disabled,
986
986
  onChange: c
987
- }, null, 40, Vt),
987
+ }, null, 40, Wo),
988
988
  i[0] || (i[0] = B("span", { class: "vf-switch__track" }, [
989
989
  B("span", { class: "vf-switch__thumb" })
990
990
  ], -1)),
991
- s.label || s.$slots.default ? (b(), m("span", Lt, [
992
- k(s.$slots, "default", {}, () => [
993
- ee(H(s.label), 1)
991
+ s.label || s.$slots.default ? (b(), y("span", Oo, [
992
+ C(s.$slots, "default", {}, () => [
993
+ oe(E(s.label), 1)
994
994
  ])
995
- ])) : _("", !0)
995
+ ])) : w("", !0)
996
996
  ], 2));
997
997
  }
998
- }), Wt = { class: "vf-popover" }, Mt = ["aria-expanded", "onKeydown"], bo = /* @__PURE__ */ K({
998
+ }), Eo = { class: "vf-popover" }, Ho = ["aria-expanded", "onKeydown"], wt = /* @__PURE__ */ K({
999
999
  __name: "popover",
1000
1000
  emits: ["click", "onClick"],
1001
- setup(t, { expose: e, emit: r }) {
1002
- const o = r, n = Ve({ visible: !1 });
1001
+ setup(o, { expose: e, emit: r }) {
1002
+ const t = r, l = Ve({ visible: !1 });
1003
1003
  let c = 0;
1004
- const s = `vf-popover-panel-${++c}`, i = () => n.visible = !0, l = () => n.visible = !1, u = () => n.visible = !n.visible, d = () => {
1005
- u(), o("click"), o("onClick");
1004
+ const s = `vf-popover-panel-${++c}`, i = () => l.visible = !0, n = () => l.visible = !1, u = () => l.visible = !l.visible, d = () => {
1005
+ u(), t("click"), t("onClick");
1006
1006
  };
1007
- return e({ show: i, hide: l, toggle: u }), (a, f) => (b(), m("div", Wt, [
1007
+ return e({ show: i, hide: n, toggle: u }), (a, f) => (b(), y("div", Eo, [
1008
1008
  B("div", {
1009
1009
  class: "vf-popover__button",
1010
1010
  role: "button",
1011
1011
  tabindex: "0",
1012
1012
  "aria-haspopup": "dialog",
1013
- "aria-expanded": n.visible,
1013
+ "aria-expanded": l.visible,
1014
1014
  "aria-controls": s,
1015
1015
  onClick: d,
1016
1016
  onKeydown: [
1017
- q(U(d, ["prevent"]), ["enter"]),
1018
- q(U(d, ["prevent"]), ["space"])
1017
+ Z(J(d, ["prevent"]), ["enter"]),
1018
+ Z(J(d, ["prevent"]), ["space"])
1019
1019
  ]
1020
1020
  }, [
1021
- k(a.$slots, "button")
1022
- ], 40, Mt),
1023
- ye(me(Ye, {
1021
+ C(a.$slots, "button")
1022
+ ], 40, Ho),
1023
+ ue(Ce(Xe, {
1024
1024
  id: s,
1025
1025
  class: "vf-popover__wrapper"
1026
1026
  }, Le({
@@ -1032,104 +1032,227 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
1032
1032
  a.$slots.default ? {
1033
1033
  name: "default",
1034
1034
  fn: Y(() => [
1035
- k(a.$slots, "default")
1035
+ C(a.$slots, "default")
1036
1036
  ]),
1037
1037
  key: "0"
1038
1038
  } : void 0,
1039
1039
  a.$slots.header || a.$slots.popoverHeader ? {
1040
1040
  name: "header",
1041
1041
  fn: Y(() => [
1042
- k(a.$slots, "header"),
1043
- a.$slots.header ? _("", !0) : k(a.$slots, "popoverHeader", { key: 0 })
1042
+ C(a.$slots, "header"),
1043
+ a.$slots.header ? w("", !0) : C(a.$slots, "popoverHeader", { key: 0 })
1044
1044
  ]),
1045
1045
  key: "1"
1046
1046
  } : void 0,
1047
1047
  a.$slots.body || a.$slots.popoverBody ? {
1048
1048
  name: "body",
1049
1049
  fn: Y(() => [
1050
- k(a.$slots, "body"),
1051
- a.$slots.body ? _("", !0) : k(a.$slots, "popoverBody", { key: 0 })
1050
+ C(a.$slots, "body"),
1051
+ a.$slots.body ? w("", !0) : C(a.$slots, "popoverBody", { key: 0 })
1052
1052
  ]),
1053
1053
  key: "2"
1054
1054
  } : void 0,
1055
1055
  a.$slots.footer || a.$slots.popoverFooter ? {
1056
1056
  name: "footer",
1057
1057
  fn: Y(() => [
1058
- k(a.$slots, "footer"),
1059
- a.$slots.footer ? _("", !0) : k(a.$slots, "popoverFooter", { key: 0 })
1058
+ C(a.$slots, "footer"),
1059
+ a.$slots.footer ? w("", !0) : C(a.$slots, "popoverFooter", { key: 0 })
1060
1060
  ]),
1061
1061
  key: "3"
1062
1062
  } : void 0
1063
1063
  ]), 1536), [
1064
- [ke, n.visible]
1064
+ [fe, l.visible]
1065
1065
  ])
1066
1066
  ]));
1067
1067
  }
1068
- }), Ht = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], Ot = (t) => {
1069
- const e = t.replace(/([A-Z])/g, "-$1");
1068
+ }), Mo = ["aria-labelledby", "aria-describedby"], Po = {
1069
+ key: 0,
1070
+ class: "vf-modal__header"
1071
+ }, Ao = {
1072
+ key: 0,
1073
+ class: "vf-modal__title"
1074
+ }, Do = {
1075
+ key: 3,
1076
+ class: "vf-modal__footer"
1077
+ }, _t = /* @__PURE__ */ K({
1078
+ __name: "modal",
1079
+ props: {
1080
+ modelValue: { type: Boolean, default: !1 },
1081
+ title: { default: "" },
1082
+ closeOnOverlay: { type: Boolean, default: !0 },
1083
+ closeOnEsc: { type: Boolean, default: !0 },
1084
+ showClose: { type: Boolean, default: !0 },
1085
+ lockScroll: { type: Boolean, default: !0 },
1086
+ size: { default: "md" }
1087
+ },
1088
+ emits: ["update:modelValue", "open", "close"],
1089
+ setup(o, { expose: e, emit: r }) {
1090
+ const t = r, l = o;
1091
+ let c = 0, s = 0, i = "", n = null;
1092
+ const u = j(null), d = We(), a = `vf-modal-title-${++c}`, f = `vf-modal-body-${c}`, v = _(() => !!l.title || !!d.header), p = _(() => !!d.body || !!d.default), k = _(() => {
1093
+ const h = ["vf-modal"];
1094
+ return l.size !== "md" && h.push(`vf-modal_${l.size}`), h;
1095
+ }), m = () => t("update:modelValue", !0), x = () => {
1096
+ t("update:modelValue", !1), t("close");
1097
+ }, H = () => {
1098
+ l.closeOnOverlay && x();
1099
+ }, z = (h) => {
1100
+ !l.modelValue || !l.closeOnEsc || h.key === "Escape" && (h.preventDefault(), x());
1101
+ }, S = () => u.value ? Array.from(u.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((g) => !g.hasAttribute("disabled") && !g.getAttribute("aria-hidden")) : [], L = () => {
1102
+ var g;
1103
+ const h = S();
1104
+ h.length ? h[0].focus() : (g = u.value) == null || g.focus();
1105
+ }, M = (h) => {
1106
+ var ne;
1107
+ if (h.key !== "Tab")
1108
+ return;
1109
+ const g = S();
1110
+ if (!g.length) {
1111
+ h.preventDefault(), (ne = u.value) == null || ne.focus();
1112
+ return;
1113
+ }
1114
+ const F = g[0], T = g[g.length - 1], U = document.activeElement;
1115
+ if (h.shiftKey && U === F) {
1116
+ h.preventDefault(), T.focus();
1117
+ return;
1118
+ }
1119
+ !h.shiftKey && U === T && (h.preventDefault(), F.focus());
1120
+ }, R = () => {
1121
+ !l.lockScroll || typeof document > "u" || (s === 0 && (i = document.body.style.overflow, document.body.style.overflow = "hidden"), s += 1);
1122
+ }, W = () => {
1123
+ !l.lockScroll || typeof document > "u" || (s = Math.max(0, s - 1), s === 0 && (document.body.style.overflow = i));
1124
+ };
1125
+ return re(
1126
+ () => l.modelValue,
1127
+ async (h) => {
1128
+ h ? (typeof document < "u" && (n = document.activeElement), R(), t("open"), await ce(), L(), typeof document < "u" && document.addEventListener("keydown", z)) : (W(), typeof document < "u" && (document.removeEventListener("keydown", z), n == null || n.focus()));
1129
+ },
1130
+ { immediate: !0 }
1131
+ ), we(() => {
1132
+ W(), typeof document < "u" && document.removeEventListener("keydown", z);
1133
+ }), e({ open: m, close: x }), (h, g) => (b(), O(_e, { to: "body" }, [
1134
+ ue(B("div", {
1135
+ class: $(k.value),
1136
+ role: "presentation"
1137
+ }, [
1138
+ B("div", {
1139
+ class: "vf-modal__overlay",
1140
+ onClick: H
1141
+ }),
1142
+ B("div", {
1143
+ ref_key: "panel",
1144
+ ref: u,
1145
+ class: "vf-modal__panel",
1146
+ role: "dialog",
1147
+ "aria-modal": "true",
1148
+ "aria-labelledby": v.value ? a : void 0,
1149
+ "aria-describedby": p.value ? f : void 0,
1150
+ tabindex: "-1",
1151
+ onKeydown: M
1152
+ }, [
1153
+ v.value ? (b(), y("div", Po, [
1154
+ B("div", {
1155
+ id: a,
1156
+ class: "vf-modal__header-content"
1157
+ }, [
1158
+ C(h.$slots, "header", {}, () => [
1159
+ h.title ? (b(), y("h3", Ao, E(h.title), 1)) : w("", !0)
1160
+ ])
1161
+ ])
1162
+ ])) : w("", !0),
1163
+ h.showClose ? C(h.$slots, "close", {
1164
+ key: 1,
1165
+ close: x
1166
+ }, () => [
1167
+ B("button", {
1168
+ type: "button",
1169
+ class: "vf-modal__close",
1170
+ "aria-label": "Close",
1171
+ onClick: x
1172
+ }, "×")
1173
+ ]) : w("", !0),
1174
+ h.$slots.body || h.$slots.default ? (b(), y("div", {
1175
+ key: 2,
1176
+ id: f,
1177
+ class: "vf-modal__body"
1178
+ }, [
1179
+ C(h.$slots, "body"),
1180
+ h.$slots.body ? w("", !0) : C(h.$slots, "default", { key: 0 })
1181
+ ])) : w("", !0),
1182
+ h.$slots.footer ? (b(), y("div", Do, [
1183
+ C(h.$slots, "footer")
1184
+ ])) : w("", !0)
1185
+ ], 40, Mo)
1186
+ ], 2), [
1187
+ [fe, h.modelValue]
1188
+ ])
1189
+ ]));
1190
+ }
1191
+ }), Io = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], jo = (o) => {
1192
+ const e = o.replace(/([A-Z])/g, "-$1");
1070
1193
  return e.charAt(0).toUpperCase() + e.slice(1);
1071
- }, Et = (t) => t.filter((e) => !Ht.includes(e)).map((e) => Ot(e)).join("-").toLowerCase(), ie = (t) => t.join("."), Pt = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), de = (t) => {
1072
- if (!Pt(t))
1194
+ }, No = (o) => o.filter((e) => !Io.includes(e)).map((e) => jo(e)).join("-").toLowerCase(), de = (o) => o.join("."), Ko = (o) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(o), ve = (o) => {
1195
+ if (!Ko(o))
1073
1196
  return null;
1074
- if (t.length === 4) {
1075
- const e = t[1], r = t[2], o = t[3];
1076
- return `#${e}${e}${r}${r}${o}${o}`;
1197
+ if (o.length === 4) {
1198
+ const e = o[1], r = o[2], t = o[3];
1199
+ return `#${e}${e}${r}${r}${t}${t}`;
1077
1200
  }
1078
- return t.toLowerCase();
1079
- }, _e = (t) => {
1080
- const e = de(t);
1201
+ return o.toLowerCase();
1202
+ }, Be = (o) => {
1203
+ const e = ve(o);
1081
1204
  if (!e)
1082
1205
  return [0, 0, 0];
1083
- const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, n = r >> 8 & 255, c = r & 255;
1084
- return [o, n, c];
1085
- }, pe = (t) => {
1086
- const [e, r, o] = _e(t);
1087
- return `${e}, ${r}, ${o}`;
1088
- }, At = (t, e, r) => {
1089
- const o = t / 255, n = e / 255, c = r / 255, s = Math.max(o, n, c), i = Math.min(o, n, c), l = s - i;
1206
+ const r = parseInt(e.slice(1), 16), t = r >> 16 & 255, l = r >> 8 & 255, c = r & 255;
1207
+ return [t, l, c];
1208
+ }, he = (o) => {
1209
+ const [e, r, t] = Be(o);
1210
+ return `${e}, ${r}, ${t}`;
1211
+ }, Xo = (o, e, r) => {
1212
+ const t = o / 255, l = e / 255, c = r / 255, s = Math.max(t, l, c), i = Math.min(t, l, c), n = s - i;
1090
1213
  let u = 0, d = 0;
1091
1214
  const a = (s + i) / 2;
1092
- if (l !== 0) {
1093
- switch (d = l / (1 - Math.abs(2 * a - 1)), s) {
1094
- case o:
1095
- u = (n - c) / l % 6;
1215
+ if (n !== 0) {
1216
+ switch (d = n / (1 - Math.abs(2 * a - 1)), s) {
1217
+ case t:
1218
+ u = (l - c) / n % 6;
1096
1219
  break;
1097
- case n:
1098
- u = (c - o) / l + 2;
1220
+ case l:
1221
+ u = (c - t) / n + 2;
1099
1222
  break;
1100
1223
  case c:
1101
- u = (o - n) / l + 4;
1224
+ u = (t - l) / n + 4;
1102
1225
  break;
1103
1226
  }
1104
1227
  u *= 60, u < 0 && (u += 360);
1105
1228
  }
1106
1229
  return [u, d * 100, a * 100];
1107
- }, Dt = (t, e, r) => {
1108
- const o = e / 100, n = r / 100, c = (1 - Math.abs(2 * n - 1)) * o, s = c * (1 - Math.abs(t / 60 % 2 - 1)), i = n - c / 2;
1109
- let l = 0, u = 0, d = 0;
1110
- t >= 0 && t < 60 ? (l = c, u = s, d = 0) : t >= 60 && t < 120 ? (l = s, u = c, d = 0) : t >= 120 && t < 180 ? (l = 0, u = c, d = s) : t >= 180 && t < 240 ? (l = 0, u = s, d = c) : t >= 240 && t < 300 ? (l = s, u = 0, d = c) : (l = c, u = 0, d = s);
1111
- const a = Math.round((l + i) * 255), f = Math.round((u + i) * 255), v = Math.round((d + i) * 255);
1230
+ }, Yo = (o, e, r) => {
1231
+ const t = e / 100, l = r / 100, c = (1 - Math.abs(2 * l - 1)) * t, s = c * (1 - Math.abs(o / 60 % 2 - 1)), i = l - c / 2;
1232
+ let n = 0, u = 0, d = 0;
1233
+ o >= 0 && o < 60 ? (n = c, u = s, d = 0) : o >= 60 && o < 120 ? (n = s, u = c, d = 0) : o >= 120 && o < 180 ? (n = 0, u = c, d = s) : o >= 180 && o < 240 ? (n = 0, u = s, d = c) : o >= 240 && o < 300 ? (n = s, u = 0, d = c) : (n = c, u = 0, d = s);
1234
+ const a = Math.round((n + i) * 255), f = Math.round((u + i) * 255), v = Math.round((d + i) * 255);
1112
1235
  return [a, f, v];
1113
- }, jt = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, Nt = (t, e, r) => Math.min(r, Math.max(e, t)), Xt = (t, e) => {
1114
- const r = de(t);
1236
+ }, Go = (o, e, r) => `#${[o, e, r].map((t) => t.toString(16).padStart(2, "0")).join("")}`, qo = (o, e, r) => Math.min(r, Math.max(e, o)), Uo = (o, e) => {
1237
+ const r = ve(o);
1115
1238
  if (!r)
1116
- return t;
1117
- const [o, n, c] = _e(r), [s, i, l] = At(o, n, c), d = (e - 5) * 7, a = Nt(l + d, 0, 100), [f, v, p] = Dt(s, i, a);
1118
- return jt(f, v, p);
1119
- }, se = (t) => !!t && typeof t == "object" && !Array.isArray(t), ce = (t, e) => {
1239
+ return o;
1240
+ const [t, l, c] = Be(r), [s, i, n] = Xo(t, l, c), d = (e - 5) * 7, a = qo(n + d, 0, 100), [f, v, p] = Yo(s, i, a);
1241
+ return Go(f, v, p);
1242
+ }, ie = (o) => !!o && typeof o == "object" && !Array.isArray(o), pe = (o, e) => {
1120
1243
  if (!e)
1121
- return { ...t };
1122
- const r = { ...t };
1123
- for (const o in e) {
1124
- const n = e[o], c = t[o];
1125
- se(c) && se(n) ? r[o] = ce(c, n) : r[o] = n;
1244
+ return { ...o };
1245
+ const r = { ...o };
1246
+ for (const t in e) {
1247
+ const l = e[t], c = o[t];
1248
+ ie(c) && ie(l) ? r[t] = pe(c, l) : r[t] = l;
1126
1249
  }
1127
1250
  return r;
1128
- }, Yt = (t) => {
1129
- if (!t)
1251
+ }, Zo = (o) => {
1252
+ if (!o)
1130
1253
  return null;
1131
- if (se(t) && "preset" in t) {
1132
- const e = t;
1254
+ if (ie(o) && "preset" in o) {
1255
+ const e = o;
1133
1256
  return {
1134
1257
  preset: e.preset ?? {},
1135
1258
  overrides: e.overrides,
@@ -1138,59 +1261,59 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
1138
1261
  strict: e.strict
1139
1262
  };
1140
1263
  }
1141
- return { preset: t };
1142
- }, It = (t) => {
1143
- const e = [], r = [], o = [], n = [], c = (l) => o.push(l), s = (l) => n.push(l), i = (l, u) => {
1144
- if (!(!l || typeof l != "object"))
1145
- for (const d in l) {
1146
- const a = l[d], f = u.concat([d]);
1147
- if (se(a)) {
1264
+ return { preset: o };
1265
+ }, Jo = (o) => {
1266
+ const e = [], r = [], t = [], l = [], c = (n) => t.push(n), s = (n) => l.push(n), i = (n, u) => {
1267
+ if (!(!n || typeof n != "object"))
1268
+ for (const d in n) {
1269
+ const a = n[d], f = u.concat([d]);
1270
+ if (ie(a)) {
1148
1271
  i(a, f);
1149
1272
  continue;
1150
1273
  }
1151
1274
  if (a && typeof a == "object") {
1152
- s(`Theme value "${ie(f)}" is not a plain object or string and will be ignored.`);
1275
+ s(`Theme value "${de(f)}" is not a plain object or string and will be ignored.`);
1153
1276
  continue;
1154
1277
  }
1155
1278
  if (typeof a != "string") {
1156
- s(`Theme value "${ie(f)}" is not a string and will be ignored.`);
1279
+ s(`Theme value "${de(f)}" is not a string and will be ignored.`);
1157
1280
  continue;
1158
1281
  }
1159
- const p = f.includes("colorScheme") && f.includes("dark") ? r : e, y = Et(f);
1160
- if (p.push(`--vf-${y}: ${a}`), f.includes("colors")) {
1161
- const h = de(a);
1162
- if (!h) {
1282
+ const p = f.includes("colorScheme") && f.includes("dark") ? r : e, k = No(f);
1283
+ if (p.push(`--vf-${k}: ${a}`), f.includes("colors")) {
1284
+ const m = ve(a);
1285
+ if (!m) {
1163
1286
  c(
1164
- `Theme color "${ie(f)}" is not hex. Shade variables will not be generated for it.`
1287
+ `Theme color "${de(f)}" is not hex. Shade variables will not be generated for it.`
1165
1288
  );
1166
1289
  continue;
1167
1290
  }
1168
- if (p.push(`--vf-${y}-rgb: ${pe(h)}`), d !== "white")
1169
- for (let R = 1; R < 10; ++R) {
1170
- const D = Xt(h, R);
1171
- p.push(`--vf-${y}-${R}00: ${D}`), p.push(`--vf-${y}-${R}00-rgb: ${pe(D)}`);
1291
+ if (p.push(`--vf-${k}-rgb: ${he(m)}`), d !== "white")
1292
+ for (let x = 1; x < 10; ++x) {
1293
+ const H = Uo(m, x);
1294
+ p.push(`--vf-${k}-${x}00: ${H}`), p.push(`--vf-${k}-${x}00-rgb: ${he(H)}`);
1172
1295
  }
1173
1296
  }
1174
1297
  }
1175
1298
  };
1176
- return i(t, []), { baseVars: e, darkVars: r, warnings: o, errors: n };
1177
- }, Kt = (t) => {
1299
+ return i(o, []), { baseVars: e, darkVars: r, warnings: t, errors: l };
1300
+ }, Qo = (o) => {
1178
1301
  if (typeof document > "u")
1179
1302
  return null;
1180
- const e = document.getElementById(t);
1303
+ const e = document.getElementById(o);
1181
1304
  if (e && e.tagName.toLowerCase() === "style")
1182
1305
  return e;
1183
1306
  const r = document.createElement("style");
1184
- return r.id = t, document.head.appendChild(r), r;
1185
- }, Gt = (t) => ({
1186
- selector: t.selector ?? ":root",
1187
- darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
1188
- }), qt = (t, e, r, o) => {
1189
- const { baseVars: n, darkVars: c, warnings: s, errors: i } = It(t), l = Kt("vueforge-theme");
1190
- if (!l)
1307
+ return r.id = o, document.head.appendChild(r), r;
1308
+ }, et = (o) => ({
1309
+ selector: o.selector ?? ":root",
1310
+ darkSelector: o.darkSelector ?? ":root[data-theme=dark]"
1311
+ }), ot = (o, e, r, t) => {
1312
+ const { baseVars: l, darkVars: c, warnings: s, errors: i } = Jo(o), n = Qo("vueforge-theme");
1313
+ if (!n)
1191
1314
  return;
1192
1315
  if (i.length) {
1193
- if (o)
1316
+ if (t)
1194
1317
  throw new Error(`[VueForge] ${i.join(" ")}`);
1195
1318
  for (const d of i)
1196
1319
  console.warn(`[VueForge] ${d}`);
@@ -1199,31 +1322,31 @@ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", G =
1199
1322
  for (const d of s)
1200
1323
  console.warn(`[VueForge] ${d}`);
1201
1324
  const u = [];
1202
- n.length && u.push(`${e} { ${n.join(";")} }`), c.length && u.push(`${r} { ${c.join(";")} }`), l.textContent = u.join(`
1325
+ l.length && u.push(`${e} { ${l.join(";")} }`), c.length && u.push(`${r} { ${c.join(";")} }`), n.textContent = u.join(`
1203
1326
  `);
1204
1327
  };
1205
- let P = null;
1206
- const $e = (t) => {
1207
- const e = Yt(t);
1328
+ let N = null;
1329
+ const xe = (o) => {
1330
+ const e = Zo(o);
1208
1331
  if (!e)
1209
1332
  return;
1210
- const r = ce(e.preset, e.overrides), { selector: o, darkSelector: n } = Gt(e);
1211
- P = { ...e }, qt(r, o, n, e.strict);
1212
- }, ho = (t) => {
1213
- if (!P)
1333
+ const r = pe(e.preset, e.overrides), { selector: t, darkSelector: l } = et(e);
1334
+ N = { ...e }, ot(r, t, l, e.strict);
1335
+ }, $t = (o) => {
1336
+ if (!N)
1214
1337
  return;
1215
- const e = t.overrides === void 0 ? P.overrides : ce(P.overrides ?? {}, t.overrides ?? {}), r = {
1216
- preset: t.preset ?? P.preset,
1338
+ const e = o.overrides === void 0 ? N.overrides : pe(N.overrides ?? {}, o.overrides ?? {}), r = {
1339
+ preset: o.preset ?? N.preset,
1217
1340
  overrides: e,
1218
- selector: t.selector ?? P.selector,
1219
- darkSelector: t.darkSelector ?? P.darkSelector
1341
+ selector: o.selector ?? N.selector,
1342
+ darkSelector: o.darkSelector ?? N.darkSelector
1220
1343
  };
1221
- $e(r);
1222
- }, mo = () => P ? { ...P } : null, yo = {
1223
- install(t, e = {}) {
1224
- e.theme && $e(e.theme);
1344
+ xe(r);
1345
+ }, Ft = () => N ? { ...N } : null, Bt = {
1346
+ install(o, e = {}) {
1347
+ e.theme && xe(e.theme);
1225
1348
  }
1226
- }, ge = {
1349
+ }, me = {
1227
1350
  colors: {
1228
1351
  white: "#ffffff",
1229
1352
  green: "#0cbc87",
@@ -1285,7 +1408,7 @@ const $e = (t) => {
1285
1408
  dividerColor: "#2e2e32"
1286
1409
  }
1287
1410
  }
1288
- }, Ut = {
1411
+ }, tt = {
1289
1412
  fontSize: "var(--vf-typography-font-size)",
1290
1413
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1291
1414
  borderRadius: "var(--vf-radii-md)",
@@ -1427,11 +1550,11 @@ const $e = (t) => {
1427
1550
  }
1428
1551
  }
1429
1552
  }
1430
- }, Zt = {
1553
+ }, rt = {
1431
1554
  padding: "12px",
1432
1555
  borderColor: "var(--vf-border-color)",
1433
1556
  borderRadius: "var(--vf-radii-md)"
1434
- }, Jt = {}, Qt = {
1557
+ }, lt = {}, nt = {
1435
1558
  gap: "0.5rem",
1436
1559
  fontSize: "var(--vf-typography-font-size)",
1437
1560
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
@@ -1452,10 +1575,10 @@ const $e = (t) => {
1452
1575
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1453
1576
  fontSize: "var(--vf-sizes-lg-font-size)"
1454
1577
  }
1455
- }, eo = {
1578
+ }, at = {
1456
1579
  hoverColor: "var(--vf-blue)",
1457
1580
  activeColor: "var(--vf-blue)"
1458
- }, to = {
1581
+ }, st = {
1459
1582
  iconGap: "6px",
1460
1583
  submenuOffset: "12px",
1461
1584
  separatorThickness: "1px",
@@ -1475,9 +1598,36 @@ const $e = (t) => {
1475
1598
  marginBottom: "0.5rem",
1476
1599
  marginLeft: "0.5rem"
1477
1600
  }
1478
- }, oo = {
1601
+ }, it = {
1602
+ width: "90vw",
1603
+ maxWidth: "520px",
1604
+ maxHeight: "80vh",
1605
+ widthSm: "90vw",
1606
+ maxWidthSm: "420px",
1607
+ widthLg: "90vw",
1608
+ maxWidthLg: "720px",
1609
+ padding: "1.25rem",
1610
+ borderRadius: "var(--vf-radii-lg)",
1611
+ backgroundColor: "var(--vf-bg-color)",
1612
+ textColor: "var(--vf-text-color)",
1613
+ overlayBackgroundColor: "rgba(0, 0, 0, 0.45)",
1614
+ shadow: "0 12px 40px rgba(0, 0, 0, 0.2)",
1615
+ zIndex: "100",
1616
+ headerGap: "0.75rem",
1617
+ bodyGap: "1rem",
1618
+ footerGap: "0.5rem",
1619
+ titleFontSize: "1.125rem",
1620
+ titleLineHeight: "1.4",
1621
+ titleFontWeight: "600",
1622
+ closeSize: "2rem",
1623
+ closeRadius: "999px",
1624
+ closeOffset: "0.5rem",
1625
+ closeColor: "var(--vf-text-color)",
1626
+ closeFontSize: "1.25rem",
1627
+ closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
1628
+ }, dt = {
1479
1629
  backgroundColor: "var(--vf-bg-color)"
1480
- }, ro = {
1630
+ }, ct = {
1481
1631
  minWidth: "12rem",
1482
1632
  fontSize: "var(--vf-typography-font-size)",
1483
1633
  controlGap: "0.75rem",
@@ -1510,7 +1660,7 @@ const $e = (t) => {
1510
1660
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1511
1661
  fontSize: "var(--vf-sizes-lg-font-size)"
1512
1662
  }
1513
- }, no = {
1663
+ }, ut = {
1514
1664
  size: "1rem",
1515
1665
  gap: "0.5rem",
1516
1666
  borderRadius: "var(--vf-radii-sm)",
@@ -1522,7 +1672,7 @@ const $e = (t) => {
1522
1672
  checkColor: "#ffffff",
1523
1673
  textColor: "var(--vf-text-color)",
1524
1674
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1525
- }, lo = {
1675
+ }, ft = {
1526
1676
  width: "2.25rem",
1527
1677
  height: "1.25rem",
1528
1678
  thumbSize: "1rem",
@@ -1534,35 +1684,37 @@ const $e = (t) => {
1534
1684
  thumbColor: "#ffffff",
1535
1685
  textColor: "var(--vf-text-color)",
1536
1686
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1537
- }, ko = {
1538
- ...ge,
1687
+ }, xt = {
1688
+ ...me,
1539
1689
  components: {
1540
- base: ge,
1541
- button: Ut,
1542
- card: Zt,
1543
- codeBlock: Jt,
1544
- input: Qt,
1545
- link: eo,
1546
- menu: to,
1547
- popover: oo,
1548
- select: ro,
1549
- checkbox: no,
1550
- switch: lo
1690
+ base: me,
1691
+ button: tt,
1692
+ card: rt,
1693
+ codeBlock: lt,
1694
+ input: nt,
1695
+ link: at,
1696
+ menu: st,
1697
+ modal: it,
1698
+ popover: dt,
1699
+ select: ct,
1700
+ checkbox: ut,
1701
+ switch: ft
1551
1702
  }
1552
1703
  };
1553
1704
  export {
1554
- uo as Button,
1555
- Ye as Card,
1556
- po as Checkbox,
1557
- ko as DefaultTheme,
1558
- fo as Input,
1559
- Ce as Link,
1560
- co as Menu,
1561
- bo as Popover,
1562
- vo as Select,
1563
- go as Switch,
1564
- yo as VueForge,
1565
- mo as getTheme,
1566
- $e as setTheme,
1567
- ho as updateTheme
1705
+ ht as Button,
1706
+ Xe as Card,
1707
+ kt as Checkbox,
1708
+ xt as DefaultTheme,
1709
+ mt as Input,
1710
+ $e as Link,
1711
+ bt as Menu,
1712
+ _t as Modal,
1713
+ wt as Popover,
1714
+ yt as Select,
1715
+ Ct as Switch,
1716
+ Bt as VueForge,
1717
+ Ft as getTheme,
1718
+ xe as setTheme,
1719
+ $t as updateTheme
1568
1720
  };