@dskripchenko/laravel-admin 1.1.20 → 1.1.22

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.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import { ref as F, computed as v, defineComponent as L, openBlock as o, createElementBlock as c, createElementVNode as d, createBlock as b, unref as r, withCtx as m, Fragment as P, renderList as D, createTextVNode as x, toDisplayString as p, createCommentVNode as R, createVNode as $, renderSlot as Y, resolveDynamicComponent as se, normalizeClass as Z, createSlots as qe, h as Tt, watch as ee, onBeforeUnmount as Lt, resolveComponent as rt, Transition as Ze, withModifiers as ut, nextTick as _e, onMounted as Fe, withKeys as Pt, normalizeProps as Ue, mergeProps as Re, normalizeStyle as Te, inject as dt, provide as Mt, createApp as Nt, reactive as Bt } from "vue";
2
- import { defineStore as ne, createPinia as It } from "pinia";
3
- import { RouterLink as Dt, useRouter as ie, useRoute as be, createWebHistory as ct, createRouter as Vt } from "vue-router";
4
- import { UidMenu as mt, UidMenuItem as Oe, UidMenuSeparator as zt, UidAvatar as ft, UidSidebar as qt, UidSidebarGroup as Ot, UidSidebarItem as Wt, UidSidebarLayout as Kt, UidCard as j, UidButton as z, UidAlert as te, UidInput as de, UidCheckbox as vt, UidSkeleton as We, UidErrorState as jt, UidEmptyState as Gt, UidTable as Ke, UidPagination as Ht, UidBadge as je, UidSelect as Ee, UidStat as Ce, UidHeatmap as Xt, UidGauge as Yt, UidFormField as ke, UidTextarea as Jt, UidNumberInput as Qt, UidDatePicker as Zt, UidStack as en, UidGrid as tn, UidTabs as pt, UidTabPanel as gt, UidTab as Ae, UidDescriptionList as nn, UidDescriptionItem as an, UidDrawer as ln, UidStepper as sn, UidFileUpload as on, UidProgress as rn } from "@dskripchenko/ui";
5
- import un from "axios";
1
+ import { ref as R, computed as v, defineComponent as P, openBlock as o, createElementBlock as c, createElementVNode as d, createBlock as b, unref as r, withCtx as m, Fragment as M, renderList as D, createTextVNode as S, toDisplayString as h, createCommentVNode as T, createVNode as $, renderSlot as Y, resolveDynamicComponent as se, normalizeClass as ee, createSlots as qe, h as Lt, watch as Q, onBeforeUnmount as Pt, resolveComponent as rt, Transition as Ze, withModifiers as ut, nextTick as _e, onMounted as Re, withKeys as Mt, normalizeProps as Fe, mergeProps as Ue, normalizeStyle as Te, inject as dt, provide as Nt, createApp as Bt, reactive as It } from "vue";
2
+ import { defineStore as ne, createPinia as Dt } from "pinia";
3
+ import { RouterLink as Vt, useRouter as ie, useRoute as be, createWebHistory as ct, createRouter as zt } from "vue-router";
4
+ import { UidMenu as mt, UidMenuItem as Oe, UidMenuSeparator as qt, UidAvatar as ft, UidSidebar as Ot, UidSidebarGroup as Wt, UidSidebarItem as jt, UidSidebarLayout as Kt, UidCard as K, UidButton as z, UidAlert as te, UidInput as de, UidCheckbox as vt, UidSkeleton as We, UidErrorState as Gt, UidEmptyState as Ht, UidTable as je, UidPagination as Xt, UidBadge as Ke, UidSelect as Ee, UidStat as Ce, UidHeatmap as Yt, UidGauge as Jt, UidFormField as ke, UidTextarea as Qt, UidNumberInput as Zt, UidDatePicker as en, UidStack as tn, UidGrid as nn, UidTabs as pt, UidTabPanel as gt, UidTab as Ae, UidDescriptionList as an, UidDescriptionItem as ln, UidDrawer as sn, UidStepper as on, UidFileUpload as rn, UidProgress as un } from "@dskripchenko/ui";
5
+ import dn from "axios";
6
6
  import { p as ht, u as ce } from "./formState-DGNcH1XQ.js";
7
- import { t as xo } from "./formState-DGNcH1XQ.js";
7
+ import { t as So } from "./formState-DGNcH1XQ.js";
8
8
  let ye = null;
9
- function dn(e) {
9
+ function cn(e) {
10
10
  ye = e;
11
11
  }
12
12
  function H() {
@@ -16,14 +16,14 @@ function H() {
16
16
  );
17
17
  return ye;
18
18
  }
19
- function Yi() {
19
+ function Ji() {
20
20
  ye = null;
21
21
  }
22
- function Ji() {
22
+ function Qi() {
23
23
  return ye !== null;
24
24
  }
25
25
  const Ge = ne("admin-theme", () => {
26
- const e = F("light"), t = F(["light", "dark"]), n = v(() => e.value === "dark");
26
+ const e = R("light"), t = R(["light", "dark"]), n = v(() => e.value === "dark");
27
27
  function s(u) {
28
28
  e.value = u.theme, t.value = u.availableThemes, i(u.theme);
29
29
  }
@@ -39,8 +39,8 @@ const Ge = ne("admin-theme", () => {
39
39
  a(u);
40
40
  try {
41
41
  await H().post("/system/setTheme", { theme: u });
42
- } catch (g) {
43
- throw a(f), g;
42
+ } catch (p) {
43
+ throw a(f), p;
44
44
  }
45
45
  }
46
46
  function i(u) {
@@ -54,7 +54,7 @@ const Ge = ne("admin-theme", () => {
54
54
  applyLocal: a,
55
55
  setTheme: l
56
56
  };
57
- }), cn = ["aria-label", "aria-pressed"], mn = ["data-icon"], _t = /* @__PURE__ */ L({
57
+ }), mn = ["aria-label", "aria-pressed"], fn = ["data-icon"], _t = /* @__PURE__ */ P({
58
58
  __name: "ThemeToggle",
59
59
  setup(e) {
60
60
  const t = Ge(), n = v(() => t.current === "dark"), s = v(() => n.value ? "sun" : "moon"), a = v(
@@ -74,11 +74,11 @@ const Ge = ne("admin-theme", () => {
74
74
  d("span", {
75
75
  class: "admin-topbar__icon",
76
76
  "data-icon": s.value
77
- }, null, 8, mn)
78
- ], 8, cn));
77
+ }, null, 8, fn)
78
+ ], 8, mn));
79
79
  }
80
80
  }), He = ne("admin-locale", () => {
81
- const e = F("ru"), t = F(["ru", "en"]);
81
+ const e = R("ru"), t = R(["ru", "en"]);
82
82
  function n(i) {
83
83
  e.value = i.locale, t.value = i.availableLocales, l(i.locale);
84
84
  }
@@ -112,12 +112,12 @@ const Ge = ne("admin-theme", () => {
112
112
  applyLocal: s,
113
113
  setLocale: a
114
114
  };
115
- }), fn = {
115
+ }), vn = {
116
116
  type: "button",
117
117
  class: "admin-topbar__icon-btn",
118
118
  style: { width: "auto", padding: "0 8px", gap: "4px", "font-size": "12px" },
119
119
  "aria-label": "Сменить локаль"
120
- }, yt = /* @__PURE__ */ L({
120
+ }, yt = /* @__PURE__ */ P({
121
121
  __name: "LocaleSwitcher",
122
122
  setup(e) {
123
123
  const t = He();
@@ -126,21 +126,21 @@ const Ge = ne("admin-theme", () => {
126
126
  }
127
127
  return (s, a) => (o(), b(r(mt), null, {
128
128
  trigger: m(() => [
129
- d("button", fn, [
129
+ d("button", vn, [
130
130
  a[0] || (a[0] = d("span", {
131
131
  class: "admin-topbar__icon",
132
132
  "data-icon": "globe"
133
133
  }, null, -1)),
134
- d("span", null, p((r(t).current ?? "").toUpperCase()), 1)
134
+ d("span", null, h((r(t).current ?? "").toUpperCase()), 1)
135
135
  ])
136
136
  ]),
137
137
  default: m(() => [
138
- (o(!0), c(P, null, D(r(t).available, (l) => (o(), b(r(Oe), {
138
+ (o(!0), c(M, null, D(r(t).available, (l) => (o(), b(r(Oe), {
139
139
  key: l,
140
140
  onClick: (i) => n(l)
141
141
  }, {
142
142
  default: m(() => [
143
- x(p(l.toUpperCase()), 1)
143
+ S(h(l.toUpperCase()), 1)
144
144
  ]),
145
145
  _: 2
146
146
  }, 1032, ["onClick"]))), 128))
@@ -149,48 +149,48 @@ const Ge = ne("admin-theme", () => {
149
149
  }));
150
150
  }
151
151
  }), Xe = ne("admin-notifications", () => {
152
- const e = F([]), t = F(0), n = F(!1), s = F("all"), a = F(null), l = v(() => t.value > 0);
153
- function i(S) {
154
- t.value = S.unread_notifications_count;
152
+ const e = R([]), t = R(0), n = R(!1), s = R("all"), a = R(null), l = v(() => t.value > 0);
153
+ function i(x) {
154
+ t.value = x.unread_notifications_count;
155
155
  }
156
- async function u(S = "all", A = 1) {
156
+ async function u(x = "all", C = 1) {
157
157
  n.value = !0;
158
158
  try {
159
- const h = await H().get(`/notifications/list?type=${S}&page=${A}`);
160
- e.value = h.data, t.value = h.meta.unread_count, a.value = {
161
- page: h.meta.page,
162
- per_page: h.meta.per_page,
163
- total: h.meta.total,
164
- last_page: h.meta.last_page
165
- }, s.value = S;
159
+ const g = await H().get(`/notifications/list?type=${x}&page=${C}`);
160
+ e.value = g.data, t.value = g.meta.unread_count, a.value = {
161
+ page: g.meta.page,
162
+ per_page: g.meta.per_page,
163
+ total: g.meta.total,
164
+ last_page: g.meta.last_page
165
+ }, s.value = x;
166
166
  } finally {
167
167
  n.value = !1;
168
168
  }
169
169
  }
170
170
  async function f() {
171
- const A = await H().get(
171
+ const C = await H().get(
172
172
  "/notifications/unread"
173
173
  );
174
- t.value = A.count, s.value === "unread" && (e.value = A.data);
174
+ t.value = C.count, s.value === "unread" && (e.value = C.data);
175
175
  }
176
- async function g(S) {
177
- await H().post("/notifications/markAsRead", { id: S });
178
- const y = e.value.find((h) => h.id === S);
176
+ async function p(x) {
177
+ await H().post("/notifications/markAsRead", { id: x });
178
+ const y = e.value.find((g) => g.id === x);
179
179
  y && y.read_at === null && (y.read_at = (/* @__PURE__ */ new Date()).toISOString(), t.value = Math.max(0, t.value - 1));
180
180
  }
181
181
  async function _() {
182
182
  await H().post("/notifications/markAllAsRead");
183
- const A = (/* @__PURE__ */ new Date()).toISOString();
183
+ const C = (/* @__PURE__ */ new Date()).toISOString();
184
184
  for (const y of e.value)
185
- y.read_at === null && (y.read_at = A);
185
+ y.read_at === null && (y.read_at = C);
186
186
  t.value = 0;
187
187
  }
188
- async function k(S) {
189
- await H().post("/notifications/destroy", { id: S });
190
- const y = e.value.findIndex((h) => h.id === S);
188
+ async function k(x) {
189
+ await H().post("/notifications/destroy", { id: x });
190
+ const y = e.value.findIndex((g) => g.id === x);
191
191
  if (y !== -1) {
192
- const h = e.value[y].read_at === null;
193
- e.value.splice(y, 1), h && (t.value = Math.max(0, t.value - 1));
192
+ const g = e.value[y].read_at === null;
193
+ e.value.splice(y, 1), g && (t.value = Math.max(0, t.value - 1));
194
194
  }
195
195
  }
196
196
  return {
@@ -203,18 +203,18 @@ const Ge = ne("admin-theme", () => {
203
203
  hydrate: i,
204
204
  load: u,
205
205
  loadUnread: f,
206
- markAsRead: g,
206
+ markAsRead: p,
207
207
  markAllAsRead: _,
208
208
  destroy: k
209
209
  };
210
- }), vn = ["title"], pn = /* @__PURE__ */ L({
210
+ }), pn = ["title"], gn = /* @__PURE__ */ P({
211
211
  __name: "NotificationBell",
212
212
  setup(e) {
213
213
  const t = Xe(), n = v(() => {
214
214
  const s = t.unreadCount;
215
215
  return s <= 0 ? null : s > 99 ? "99+" : String(s);
216
216
  });
217
- return (s, a) => (o(), b(r(Dt), {
217
+ return (s, a) => (o(), b(r(Vt), {
218
218
  to: "/notifications",
219
219
  class: "admin-topbar__icon-btn",
220
220
  "aria-label": "Уведомления"
@@ -228,7 +228,7 @@ const Ge = ne("admin-theme", () => {
228
228
  key: 0,
229
229
  class: "admin-topbar__bell-badge",
230
230
  title: `Непрочитанных: ${r(t).unreadCount}`
231
- }, p(n.value), 9, vn)) : R("", !0)
231
+ }, h(n.value), 9, pn)) : T("", !0)
232
232
  ]),
233
233
  _: 1
234
234
  }));
@@ -247,12 +247,12 @@ class bt extends ae {
247
247
  super(401, t), this.name = "UnauthenticatedError";
248
248
  }
249
249
  }
250
- class gn extends ae {
250
+ class hn extends ae {
251
251
  constructor(t) {
252
252
  super(403, t), this.name = "ForbiddenError";
253
253
  }
254
254
  }
255
- class hn extends ae {
255
+ class _n extends ae {
256
256
  constructor(t) {
257
257
  super(404, t), this.name = "NotFoundError";
258
258
  }
@@ -281,25 +281,25 @@ function et(e, t) {
281
281
  case 401:
282
282
  return new bt(t);
283
283
  case 403:
284
- return new gn(t);
285
- case 404:
286
284
  return new hn(t);
285
+ case 404:
286
+ return new _n(t);
287
287
  case 422:
288
288
  return new Le(t);
289
289
  default:
290
290
  return new ae(e, t);
291
291
  }
292
292
  }
293
- const Q = ne("admin-auth", () => {
294
- const e = F(null), t = F([]), n = F(null), s = v(() => e.value !== null), a = v(() => n.value !== null);
293
+ const Z = ne("admin-auth", () => {
294
+ const e = R(null), t = R([]), n = R(null), s = v(() => e.value !== null), a = v(() => n.value !== null);
295
295
  function l(y) {
296
296
  e.value = y.user, t.value = y.permissions;
297
297
  }
298
298
  function i(y) {
299
- return t.value.includes("*") || t.value.includes(y) ? !0 : t.value.some((h) => {
300
- if (!h.endsWith(".*")) return !1;
301
- const U = h.slice(0, -1);
302
- return y.startsWith(U);
299
+ return t.value.includes("*") || t.value.includes(y) ? !0 : t.value.some((g) => {
300
+ if (!g.endsWith(".*")) return !1;
301
+ const F = g.slice(0, -1);
302
+ return y.startsWith(F);
303
303
  });
304
304
  }
305
305
  function u(y) {
@@ -308,47 +308,47 @@ const Q = ne("admin-auth", () => {
308
308
  function f(y) {
309
309
  return y.every(i);
310
310
  }
311
- async function g(y) {
312
- const h = H();
311
+ async function p(y) {
312
+ const g = H();
313
313
  try {
314
- const U = await h.post(
314
+ const F = await g.post(
315
315
  "/auth/login",
316
316
  y
317
317
  );
318
- return U?.user && (e.value = U.user), Array.isArray(U?.permissions) && (t.value = U.permissions), n.value = null, "authenticated";
319
- } catch (U) {
320
- if (U instanceof ae && U.errorKey === "two_factor_required") {
321
- const q = U.payload.challenge_token;
318
+ return F?.user && (e.value = F.user), Array.isArray(F?.permissions) && (t.value = F.permissions), n.value = null, "authenticated";
319
+ } catch (F) {
320
+ if (F instanceof ae && F.errorKey === "two_factor_required") {
321
+ const q = F.payload.challenge_token;
322
322
  return n.value = {
323
323
  challengeToken: typeof q == "string" ? q : "",
324
324
  remember: y.remember ?? !1
325
325
  }, "two_factor_required";
326
326
  }
327
- throw U;
327
+ throw F;
328
328
  }
329
329
  }
330
330
  async function _(y) {
331
331
  if (n.value === null)
332
332
  throw new Error("No pending 2FA challenge");
333
- const U = await H().post("/auth/twoFactorChallenge", {
333
+ const F = await H().post("/auth/twoFactorChallenge", {
334
334
  challenge_token: n.value.challengeToken,
335
335
  code: y
336
336
  });
337
- e.value = U.user, n.value = null;
337
+ e.value = F.user, n.value = null;
338
338
  }
339
339
  async function k(y) {
340
340
  if (n.value === null)
341
341
  throw new Error("No pending 2FA challenge");
342
- const U = await H().post("/auth/twoFactorRecovery", {
342
+ const F = await H().post("/auth/twoFactorRecovery", {
343
343
  challenge_token: n.value.challengeToken,
344
344
  recovery_code: y
345
345
  });
346
- return e.value = U.user, n.value = null, { remaining: U.recovery_codes_remaining };
346
+ return e.value = F.user, n.value = null, { remaining: F.recovery_codes_remaining };
347
347
  }
348
- function S() {
348
+ function x() {
349
349
  n.value = null;
350
350
  }
351
- async function A() {
351
+ async function C() {
352
352
  const y = H();
353
353
  try {
354
354
  await y.post("/auth/logout");
@@ -369,22 +369,22 @@ const Q = ne("admin-auth", () => {
369
369
  hasPermission: i,
370
370
  hasAnyPermission: u,
371
371
  hasAllPermissions: f,
372
- login: g,
372
+ login: p,
373
373
  twoFactorChallenge: _,
374
374
  twoFactorRecovery: k,
375
- cancelChallenge: S,
376
- logout: A
375
+ cancelChallenge: x,
376
+ logout: C
377
377
  };
378
- }), _n = {
378
+ }), yn = {
379
379
  type: "button",
380
380
  class: "admin-topbar__icon-btn admin-user-menu__trigger",
381
381
  "aria-label": "Меню пользователя",
382
382
  "aria-haspopup": "menu",
383
383
  style: { width: "auto", padding: "0 4px", gap: "8px" }
384
- }, yn = /* @__PURE__ */ L({
384
+ }, bn = /* @__PURE__ */ P({
385
385
  __name: "UserMenu",
386
386
  setup(e) {
387
- const t = Q(), n = ie();
387
+ const t = Z(), n = ie();
388
388
  async function s() {
389
389
  try {
390
390
  await t.logout();
@@ -397,7 +397,7 @@ const Q = ne("admin-auth", () => {
397
397
  }
398
398
  return (l, i) => (o(), b(r(mt), null, {
399
399
  trigger: m(() => [
400
- d("button", _n, [
400
+ d("button", yn, [
401
401
  $(r(ft), {
402
402
  src: r(t).user?.avatar ?? void 0,
403
403
  name: r(t).user?.name ?? "?",
@@ -409,17 +409,17 @@ const Q = ne("admin-auth", () => {
409
409
  default: m(() => [
410
410
  $(r(Oe), { onClick: a }, {
411
411
  default: m(() => [...i[0] || (i[0] = [
412
- x("Профиль", -1)
412
+ S("Профиль", -1)
413
413
  ])]),
414
414
  _: 1
415
415
  }),
416
- $(r(zt)),
416
+ $(r(qt)),
417
417
  $(r(Oe), {
418
418
  variant: "danger",
419
419
  onClick: s
420
420
  }, {
421
421
  default: m(() => [...i[1] || (i[1] = [
422
- x("Выйти", -1)
422
+ S("Выйти", -1)
423
423
  ])]),
424
424
  _: 1
425
425
  })
@@ -427,10 +427,10 @@ const Q = ne("admin-auth", () => {
427
427
  _: 1
428
428
  }));
429
429
  }
430
- }), bn = { class: "admin-topbar" }, kn = { class: "admin-topbar__breadcrumbs" }, wn = {
430
+ }), kn = { class: "admin-topbar" }, wn = { class: "admin-topbar__breadcrumbs" }, $n = {
431
431
  key: 0,
432
432
  class: "sep"
433
- }, $n = /* @__PURE__ */ L({
433
+ }, xn = /* @__PURE__ */ P({
434
434
  __name: "AdminTopBar",
435
435
  props: {
436
436
  breadcrumbs: { default: () => [] },
@@ -439,7 +439,7 @@ const Q = ne("admin-auth", () => {
439
439
  emits: ["toggle-sidebar"],
440
440
  setup(e, { emit: t }) {
441
441
  const n = e, s = t, a = v(() => n.breadcrumbs.length - 1);
442
- return (l, i) => (o(), c("header", bn, [
442
+ return (l, i) => (o(), c("header", kn, [
443
443
  e.showCollapseToggle ? (o(), c("button", {
444
444
  key: 0,
445
445
  type: "button",
@@ -451,17 +451,17 @@ const Q = ne("admin-auth", () => {
451
451
  class: "admin-topbar__icon",
452
452
  "data-icon": "panel-left"
453
453
  }, null, -1)
454
- ])])) : R("", !0),
455
- d("div", kn, [
454
+ ])])) : T("", !0),
455
+ d("div", wn, [
456
456
  Y(l.$slots, "breadcrumbs", {}, () => [
457
- (o(!0), c(P, null, D(e.breadcrumbs, (u, f) => (o(), c(P, { key: f }, [
458
- f > 0 ? (o(), c("span", wn, "›")) : R("", !0),
457
+ (o(!0), c(M, null, D(e.breadcrumbs, (u, f) => (o(), c(M, { key: f }, [
458
+ f > 0 ? (o(), c("span", $n, "›")) : T("", !0),
459
459
  (o(), b(se(u.to ? "a" : "span"), {
460
460
  href: typeof u.to == "string" ? u.to : void 0,
461
- class: Z(f === a.value ? "cur" : "")
461
+ class: ee(f === a.value ? "cur" : "")
462
462
  }, {
463
463
  default: m(() => [
464
- x(p(u.label), 1)
464
+ S(h(u.label), 1)
465
465
  ]),
466
466
  _: 2
467
467
  }, 1032, ["href", "class"]))
@@ -484,37 +484,37 @@ const Q = ne("admin-auth", () => {
484
484
  ], -1))
485
485
  ]),
486
486
  Y(l.$slots, "actions"),
487
- $(pn),
487
+ $(gn),
488
488
  $(_t),
489
489
  $(yt),
490
- $(yn)
490
+ $(bn)
491
491
  ]));
492
492
  }
493
493
  }), kt = ne("admin-menu", () => {
494
- const e = F([]), t = F(!1), n = F(null), s = F(!1), a = v(() => {
495
- const g = Q(), _ = (k) => {
496
- if (Array.isArray(k.permissions) && k.permissions.length > 0 && !g.hasAnyPermission(k.permissions))
494
+ const e = R([]), t = R(!1), n = R(null), s = R(!1), a = v(() => {
495
+ const p = Z(), _ = (k) => {
496
+ if (Array.isArray(k.permissions) && k.permissions.length > 0 && !p.hasAnyPermission(k.permissions))
497
497
  return null;
498
- const S = (k.children ?? []).map(_).filter((A) => A !== null);
499
- return { ...k, children: S };
498
+ const x = (k.children ?? []).map(_).filter((C) => C !== null);
499
+ return { ...k, children: x };
500
500
  };
501
501
  return e.value.map(_).filter((k) => k !== null);
502
502
  }), l = v(() => {
503
- const g = /* @__PURE__ */ new Map();
503
+ const p = /* @__PURE__ */ new Map();
504
504
  for (const k of a.value) {
505
- const S = k.group ?? null;
506
- g.has(S) || g.set(S, []), g.get(S).push(k);
505
+ const x = k.group ?? null;
506
+ p.has(x) || p.set(x, []), p.get(x).push(k);
507
507
  }
508
508
  const _ = [];
509
- for (const [k, S] of g)
510
- S.sort((A, y) => {
511
- const h = (A.order ?? 0) - (y.order ?? 0);
512
- return h !== 0 ? h : A.label.localeCompare(y.label);
513
- }), _.push({ group: k, items: S });
509
+ for (const [k, x] of p)
510
+ x.sort((C, y) => {
511
+ const g = (C.order ?? 0) - (y.order ?? 0);
512
+ return g !== 0 ? g : C.label.localeCompare(y.label);
513
+ }), _.push({ group: k, items: x });
514
514
  return _;
515
515
  });
516
- async function i(g = !1) {
517
- if (s.value && !g) return e.value;
516
+ async function i(p = !1) {
517
+ if (s.value && !p) return e.value;
518
518
  t.value = !0, n.value = null;
519
519
  try {
520
520
  const k = await H().get("/system/menu");
@@ -525,8 +525,8 @@ const Q = ne("admin-auth", () => {
525
525
  t.value = !1;
526
526
  }
527
527
  }
528
- function u(g) {
529
- e.value = g, s.value = !0, n.value = null;
528
+ function u(p) {
529
+ e.value = p, s.value = !0, n.value = null;
530
530
  }
531
531
  function f() {
532
532
  e.value = [], s.value = !1, n.value = null, t.value = !1;
@@ -542,16 +542,16 @@ const Q = ne("admin-auth", () => {
542
542
  setItems: u,
543
543
  reset: f
544
544
  };
545
- }), xn = { class: "admin-sidebar-brand" }, Sn = { class: "admin-sidebar-brand__mark" }, Cn = {
545
+ }), Sn = { class: "admin-sidebar-brand" }, Cn = { class: "admin-sidebar-brand__mark" }, An = {
546
546
  key: 0,
547
547
  class: "admin-sidebar-brand__name"
548
- }, An = {
548
+ }, En = {
549
549
  key: 0,
550
550
  class: "admin-sidebar-tenant"
551
- }, En = { class: "admin-sidebar-foot" }, Fn = {
551
+ }, Rn = { class: "admin-sidebar-foot" }, Fn = {
552
552
  key: 0,
553
553
  class: "admin-sidebar-foot__text"
554
- }, Un = ["href"], Rn = /* @__PURE__ */ L({
554
+ }, Un = ["href"], Tn = /* @__PURE__ */ P({
555
555
  __name: "AdminSidebar",
556
556
  props: {
557
557
  collapsed: { type: Boolean, default: !1 },
@@ -568,37 +568,37 @@ const Q = ne("admin-auth", () => {
568
568
  }
569
569
  function l(u) {
570
570
  if (u)
571
- return () => Tt("span", { class: "admin-sidebar__icon", "data-icon": u });
571
+ return () => Lt("span", { class: "admin-sidebar__icon", "data-icon": u });
572
572
  }
573
573
  function i(u) {
574
574
  if (u.url) return u.url;
575
575
  if (u.routeName) return { name: u.routeName };
576
576
  }
577
- return (u, f) => (o(), b(r(qt), { collapsed: e.collapsed }, qe({
577
+ return (u, f) => (o(), b(r(Ot), { collapsed: e.collapsed }, qe({
578
578
  header: m(() => [
579
- d("div", xn, [
580
- d("div", Sn, p(e.brandMark), 1),
581
- e.collapsed ? R("", !0) : (o(), c("div", Cn, p(e.brandName), 1))
579
+ d("div", Sn, [
580
+ d("div", Cn, h(e.brandMark), 1),
581
+ e.collapsed ? T("", !0) : (o(), c("div", An, h(e.brandName), 1))
582
582
  ]),
583
- e.tenant && !e.collapsed ? (o(), c("div", An, [
584
- d("span", null, p(e.tenant.label), 1),
585
- d("b", null, p(e.tenant.name), 1)
586
- ])) : R("", !0)
583
+ e.tenant && !e.collapsed ? (o(), c("div", En, [
584
+ d("span", null, h(e.tenant.label), 1),
585
+ d("b", null, h(e.tenant.name), 1)
586
+ ])) : T("", !0)
587
587
  ]),
588
588
  nav: m(() => [
589
- (o(!0), c(P, null, D(s.value, (g, _) => (o(), b(r(Ot), {
589
+ (o(!0), c(M, null, D(s.value, (p, _) => (o(), b(r(Wt), {
590
590
  key: `grp-${_}`,
591
- title: g.group ?? void 0
591
+ title: p.group ?? void 0
592
592
  }, {
593
593
  default: m(() => [
594
- (o(!0), c(P, null, D(g.items, (k) => (o(), b(r(Wt), {
594
+ (o(!0), c(M, null, D(p.items, (k) => (o(), b(r(jt), {
595
595
  key: k.key,
596
596
  to: i(k),
597
597
  active: a(k),
598
598
  badge: k.badge ?? void 0
599
599
  }, qe({
600
600
  default: m(() => [
601
- x(" " + p(k.label), 1)
601
+ S(" " + h(k.label), 1)
602
602
  ]),
603
603
  _: 2
604
604
  }, [
@@ -619,24 +619,24 @@ const Q = ne("admin-auth", () => {
619
619
  e.version || e.docsUrl ? {
620
620
  name: "footer",
621
621
  fn: m(() => [
622
- d("div", En, [
623
- e.version ? (o(), c("span", Fn, p(e.version), 1)) : R("", !0),
622
+ d("div", Rn, [
623
+ e.version ? (o(), c("span", Fn, h(e.version), 1)) : T("", !0),
624
624
  e.docsUrl ? (o(), c("a", {
625
625
  key: 1,
626
626
  href: e.docsUrl,
627
627
  class: "admin-sidebar-foot__text admin-sidebar-foot__link"
628
- }, " Docs ", 8, Un)) : R("", !0)
628
+ }, " Docs ", 8, Un)) : T("", !0)
629
629
  ])
630
630
  ]),
631
631
  key: "0"
632
632
  } : void 0
633
633
  ]), 1032, ["collapsed"]));
634
634
  }
635
- }), Tn = { class: "admin-shell-root" }, Ln = {
635
+ }), Ln = { class: "admin-shell-root" }, Pn = {
636
636
  key: 0,
637
637
  class: "admin-impersonation-banner",
638
638
  role: "status"
639
- }, Ie = "data-admin-impersonating", Pn = /* @__PURE__ */ L({
639
+ }, Ie = "data-admin-impersonating", Mn = /* @__PURE__ */ P({
640
640
  __name: "AdminShell",
641
641
  props: {
642
642
  collapsed: { type: Boolean, default: !1 },
@@ -651,39 +651,39 @@ const Q = ne("admin-auth", () => {
651
651
  function l() {
652
652
  s("exit-impersonation");
653
653
  }
654
- return ee(
654
+ return Q(
655
655
  () => n.impersonation,
656
656
  (i) => {
657
657
  typeof document > "u" || (i !== null ? document.documentElement.setAttribute(Ie, "true") : document.documentElement.removeAttribute(Ie));
658
658
  },
659
659
  { immediate: !0 }
660
- ), Lt(() => {
660
+ ), Pt(() => {
661
661
  typeof document < "u" && document.documentElement.removeAttribute(Ie);
662
- }), (i, u) => (o(), c("div", Tn, [
663
- e.impersonation ? (o(), c("div", Ln, [
662
+ }), (i, u) => (o(), c("div", Ln, [
663
+ e.impersonation ? (o(), c("div", Pn, [
664
664
  d("span", null, [
665
- u[1] || (u[1] = x(" Вы вошли как ", -1)),
666
- d("b", null, p(e.impersonation.asName), 1),
667
- u[2] || (u[2] = x(" · режим имперсонации ", -1))
665
+ u[1] || (u[1] = S(" Вы вошли как ", -1)),
666
+ d("b", null, h(e.impersonation.asName), 1),
667
+ u[2] || (u[2] = S(" · режим имперсонации ", -1))
668
668
  ]),
669
669
  d("button", {
670
670
  type: "button",
671
671
  class: "admin-impersonation-banner__exit",
672
672
  onClick: l
673
673
  }, " Выйти из режима ")
674
- ])) : R("", !0),
674
+ ])) : T("", !0),
675
675
  $(r(Kt), {
676
676
  "model-value": e.collapsed,
677
677
  "onUpdate:modelValue": a
678
678
  }, {
679
679
  sidebar: m(() => [
680
680
  Y(i.$slots, "sidebar", {}, () => [
681
- $(Rn, { collapsed: e.collapsed }, null, 8, ["collapsed"])
681
+ $(Tn, { collapsed: e.collapsed }, null, 8, ["collapsed"])
682
682
  ])
683
683
  ]),
684
684
  header: m(() => [
685
685
  Y(i.$slots, "topbar", {}, () => [
686
- $($n, {
686
+ $(xn, {
687
687
  onToggleSidebar: u[0] || (u[0] = (f) => a(!e.collapsed))
688
688
  })
689
689
  ])
@@ -696,7 +696,7 @@ const Q = ne("admin-auth", () => {
696
696
  ]));
697
697
  }
698
698
  }), Ye = ne("admin-navigation", () => {
699
- const e = F(0), t = v(() => e.value > 0);
699
+ const e = R(0), t = v(() => e.value > 0);
700
700
  function n() {
701
701
  e.value += 1;
702
702
  }
@@ -707,12 +707,12 @@ const Q = ne("admin-auth", () => {
707
707
  e.value = 0;
708
708
  }
709
709
  return { pending: e, isLoading: t, start: n, end: s, reset: a };
710
- }), Mn = /* @__PURE__ */ L({
710
+ }), Nn = /* @__PURE__ */ P({
711
711
  __name: "AdminLoadingBar",
712
712
  setup(e) {
713
- const t = Ye(), n = F(!1);
713
+ const t = Ye(), n = R(!1);
714
714
  let s = null;
715
- ee(
715
+ Q(
716
716
  () => t.isLoading,
717
717
  (l) => {
718
718
  l ? (s !== null && (clearTimeout(s), s = null), n.value = !0) : s = setTimeout(() => {
@@ -726,22 +726,22 @@ const Q = ne("admin-auth", () => {
726
726
  "admin-loading-bar--visible": n.value
727
727
  }));
728
728
  return (l, i) => (o(), c("div", {
729
- class: Z(a.value),
729
+ class: ee(a.value),
730
730
  role: "progressbar",
731
731
  "aria-busy": "true"
732
732
  }, null, 2));
733
733
  }
734
- }), Nn = { class: "admin-page-host" }, Bn = /* @__PURE__ */ L({
734
+ }), Bn = { class: "admin-page-host" }, In = /* @__PURE__ */ P({
735
735
  __name: "AdminApp",
736
736
  setup(e) {
737
737
  const t = be(), n = v(() => !(t.meta?.fullscreen === !0 || t.meta?.kind === "auth" || t.name === "admin.notFound"));
738
738
  return (s, a) => {
739
739
  const l = rt("router-view");
740
- return o(), c(P, null, [
741
- $(Mn),
742
- n.value ? (o(), b(Pn, { key: 0 }, {
740
+ return o(), c(M, null, [
741
+ $(Nn),
742
+ n.value ? (o(), b(Mn, { key: 0 }, {
743
743
  default: m(() => [
744
- d("div", Nn, [
744
+ d("div", Bn, [
745
745
  $(l, null, {
746
746
  default: m(({ Component: i }) => [
747
747
  $(Ze, { name: "admin-page" }, {
@@ -771,30 +771,30 @@ const Q = ne("admin-auth", () => {
771
771
  };
772
772
  }
773
773
  }), oe = ne("admin-manifest", () => {
774
- const e = F(null), t = F(!1), n = F(null), s = v(() => e.value !== null), a = v(() => e.value?.version ?? null), l = v(() => e.value?.resources ?? []), i = v(() => e.value?.screens ?? []), u = v(() => e.value?.settings ?? []), f = v(() => e.value?.plugins ?? []);
775
- function g(y) {
776
- return l.value.find((h) => h.slug === y) ?? null;
774
+ const e = R(null), t = R(!1), n = R(null), s = v(() => e.value !== null), a = v(() => e.value?.version ?? null), l = v(() => e.value?.resources ?? []), i = v(() => e.value?.screens ?? []), u = v(() => e.value?.settings ?? []), f = v(() => e.value?.plugins ?? []);
775
+ function p(y) {
776
+ return l.value.find((g) => g.slug === y) ?? null;
777
777
  }
778
778
  function _(y) {
779
- return i.value.find((h) => h.slug === y) ?? null;
779
+ return i.value.find((g) => g.slug === y) ?? null;
780
780
  }
781
781
  function k(y) {
782
- return u.value.find((h) => h.slug === y) ?? null;
782
+ return u.value.find((g) => g.slug === y) ?? null;
783
783
  }
784
- async function S(y = !1) {
784
+ async function x(y = !1) {
785
785
  if (e.value !== null && !y)
786
786
  return e.value;
787
787
  t.value = !0, n.value = null;
788
788
  try {
789
- const U = await H().get("/system/manifest");
790
- return e.value = U, U;
791
- } catch (h) {
792
- throw n.value = h instanceof Error ? h : new Error(String(h)), h;
789
+ const F = await H().get("/system/manifest");
790
+ return e.value = F, F;
791
+ } catch (g) {
792
+ throw n.value = g instanceof Error ? g : new Error(String(g)), g;
793
793
  } finally {
794
794
  t.value = !1;
795
795
  }
796
796
  }
797
- function A() {
797
+ function C() {
798
798
  e.value = null, n.value = null, t.value = !1;
799
799
  }
800
800
  return {
@@ -810,55 +810,55 @@ const Q = ne("admin-auth", () => {
810
810
  settings: u,
811
811
  plugins: f,
812
812
  // actions
813
- getResource: g,
813
+ getResource: p,
814
814
  getScreen: _,
815
815
  getSettings: k,
816
- load: S,
817
- reset: A
816
+ load: x,
817
+ reset: C
818
818
  };
819
- }), In = { class: "admin-home" }, Dn = { class: "admin-home__title" }, Vn = {
819
+ }), Dn = { class: "admin-home" }, Vn = { class: "admin-home__title" }, zn = {
820
820
  key: 0,
821
821
  class: "admin-home__resources"
822
- }, zn = { class: "admin-home__grid" }, qn = ["onClick"], On = { class: "admin-home__card-label" }, Wn = { class: "admin-home__card-slug" }, Kn = /* @__PURE__ */ L({
822
+ }, qn = { class: "admin-home__grid" }, On = ["onClick"], Wn = { class: "admin-home__card-label" }, jn = { class: "admin-home__card-slug" }, Kn = /* @__PURE__ */ P({
823
823
  __name: "HomePage",
824
824
  setup(e) {
825
- const t = oe(), n = Q(), s = ie(), a = v(() => n.user?.name ?? ""), l = v(() => t.manifest?.resources ?? []);
826
- return (i, u) => (o(), c("div", In, [
827
- $(r(j), {
825
+ const t = oe(), n = Z(), s = ie(), a = v(() => n.user?.name ?? ""), l = v(() => t.manifest?.resources ?? []);
826
+ return (i, u) => (o(), c("div", Dn, [
827
+ $(r(K), {
828
828
  padding: "lg",
829
829
  class: "admin-home__hero"
830
830
  }, {
831
831
  default: m(() => [
832
- d("h1", Dn, "Добро пожаловать" + p(a.value ? ", " + a.value : ""), 1),
832
+ d("h1", Vn, "Добро пожаловать" + h(a.value ? ", " + a.value : ""), 1),
833
833
  u[0] || (u[0] = d("p", { class: "admin-home__lead" }, " Админ-панель готова. Воспользуйтесь сайдбаром или переходите к ресурсам ниже. ", -1))
834
834
  ]),
835
835
  _: 1
836
836
  }),
837
- l.value.length ? (o(), c("section", Vn, [
837
+ l.value.length ? (o(), c("section", zn, [
838
838
  u[1] || (u[1] = d("h2", { class: "admin-home__heading" }, "Ресурсы", -1)),
839
- d("ul", zn, [
840
- (o(!0), c(P, null, D(l.value, (f) => (o(), c("li", {
839
+ d("ul", qn, [
840
+ (o(!0), c(M, null, D(l.value, (f) => (o(), c("li", {
841
841
  key: f.slug
842
842
  }, [
843
843
  d("button", {
844
844
  type: "button",
845
845
  class: "admin-home__card",
846
- onClick: (g) => r(s).push({ name: `admin.resource.${f.slug}.index` })
846
+ onClick: (p) => r(s).push({ name: `admin.resource.${f.slug}.index` })
847
847
  }, [
848
- d("span", On, p(f.label), 1),
849
- d("span", Wn, p(f.slug), 1)
850
- ], 8, qn)
848
+ d("span", Wn, h(f.label), 1),
849
+ d("span", jn, h(f.slug), 1)
850
+ ], 8, On)
851
851
  ]))), 128))
852
852
  ])
853
- ])) : R("", !0)
853
+ ])) : T("", !0)
854
854
  ]));
855
855
  }
856
- }), jn = { class: "admin-status-page" }, Gn = /* @__PURE__ */ L({
856
+ }), Gn = { class: "admin-status-page" }, Hn = /* @__PURE__ */ P({
857
857
  __name: "ForbiddenPage",
858
858
  setup(e) {
859
859
  const t = ie();
860
- return (n, s) => (o(), c("div", jn, [
861
- $(r(j), {
860
+ return (n, s) => (o(), c("div", Gn, [
861
+ $(r(K), {
862
862
  padding: "lg",
863
863
  class: "admin-status-page__card"
864
864
  }, {
@@ -870,7 +870,7 @@ const Q = ne("admin-auth", () => {
870
870
  onClick: s[0] || (s[0] = (a) => r(t).replace({ name: "admin.home" }))
871
871
  }, {
872
872
  default: m(() => [...s[1] || (s[1] = [
873
- x(" На главную ", -1)
873
+ S(" На главную ", -1)
874
874
  ])]),
875
875
  _: 1
876
876
  })
@@ -879,12 +879,12 @@ const Q = ne("admin-auth", () => {
879
879
  })
880
880
  ]));
881
881
  }
882
- }), Hn = { class: "admin-status-page" }, Xn = /* @__PURE__ */ L({
882
+ }), Xn = { class: "admin-status-page" }, Yn = /* @__PURE__ */ P({
883
883
  __name: "NotFoundPage",
884
884
  setup(e) {
885
885
  const t = ie();
886
- return (n, s) => (o(), c("div", Hn, [
887
- $(r(j), {
886
+ return (n, s) => (o(), c("div", Xn, [
887
+ $(r(K), {
888
888
  padding: "lg",
889
889
  class: "admin-status-page__card"
890
890
  }, {
@@ -896,7 +896,7 @@ const Q = ne("admin-auth", () => {
896
896
  onClick: s[0] || (s[0] = (a) => r(t).replace({ name: "admin.home" }))
897
897
  }, {
898
898
  default: m(() => [...s[1] || (s[1] = [
899
- x(" На главную ", -1)
899
+ S(" На главную ", -1)
900
900
  ])]),
901
901
  _: 1
902
902
  })
@@ -905,51 +905,51 @@ const Q = ne("admin-auth", () => {
905
905
  })
906
906
  ]));
907
907
  }
908
- }), Yn = { class: "admin-settings-page" }, Jn = { class: "admin-settings-page__title" }, Qn = {
908
+ }), Jn = { class: "admin-settings-page" }, Qn = { class: "admin-settings-page__title" }, Zn = {
909
909
  key: 0,
910
910
  class: "admin-settings-page__hint"
911
- }, Zn = {
911
+ }, ea = {
912
912
  key: 1,
913
913
  class: "admin-settings-page__debug"
914
- }, ea = /* @__PURE__ */ L({
914
+ }, ta = /* @__PURE__ */ P({
915
915
  __name: "SettingsPage",
916
916
  setup(e) {
917
917
  const t = be(), n = oe(), s = v(() => String(t.params.slug ?? "")), a = v(() => n.manifest?.settings?.find((l) => l.slug === s.value) ?? null);
918
- return (l, i) => (o(), c("div", Yn, [
919
- $(r(j), { padding: "lg" }, {
918
+ return (l, i) => (o(), c("div", Jn, [
919
+ $(r(K), { padding: "lg" }, {
920
920
  default: m(() => [
921
- d("h1", Jn, p(a.value?.label ?? s.value), 1),
922
- a.value ? (o(), c("pre", Zn, p(JSON.stringify(a.value.fields, null, 2)), 1)) : (o(), c("p", Qn, " Settings «" + p(s.value) + "» не найдено в manifest'е. ", 1))
921
+ d("h1", Qn, h(a.value?.label ?? s.value), 1),
922
+ a.value ? (o(), c("pre", ea, h(JSON.stringify(a.value.fields, null, 2)), 1)) : (o(), c("p", Zn, " Settings «" + h(s.value) + "» не найдено в manifest'е. ", 1))
923
923
  ]),
924
924
  _: 1
925
925
  })
926
926
  ]));
927
927
  }
928
- }), ta = { class: "admin-status-page" }, na = { class: "admin-status-page__title" }, aa = { class: "admin-status-page__hint" }, la = /* @__PURE__ */ L({
928
+ }), na = { class: "admin-status-page" }, aa = { class: "admin-status-page__title" }, la = { class: "admin-status-page__hint" }, sa = /* @__PURE__ */ P({
929
929
  __name: "UnknownScreenPage",
930
930
  setup(e) {
931
931
  const t = be(), n = v(() => String(t.params.slug ?? "")), s = v(() => String(t.meta?.title ?? n.value));
932
- return (a, l) => (o(), c("div", ta, [
933
- $(r(j), {
932
+ return (a, l) => (o(), c("div", na, [
933
+ $(r(K), {
934
934
  padding: "lg",
935
935
  class: "admin-status-page__card"
936
936
  }, {
937
937
  default: m(() => [
938
- d("h1", na, p(s.value), 1),
939
- d("p", aa, [
940
- x(" Это заглушка для screen «" + p(n.value) + "». Передайте свой компонент через ", 1),
941
- l[0] || (l[0] = d("code", null, "createAdminApp(" + p("{") + " pages: " + p("{") + " screen: MyScreen " + p("}") + " " + p("}") + ")", -1)),
942
- l[1] || (l[1] = x(". ", -1))
938
+ d("h1", aa, h(s.value), 1),
939
+ d("p", la, [
940
+ S(" Это заглушка для screen «" + h(n.value) + "». Передайте свой компонент через ", 1),
941
+ l[0] || (l[0] = d("code", null, "createAdminApp(" + h("{") + " pages: " + h("{") + " screen: MyScreen " + h("}") + " " + h("}") + ")", -1)),
942
+ l[1] || (l[1] = S(". ", -1))
943
943
  ])
944
944
  ]),
945
945
  _: 1
946
946
  })
947
947
  ]));
948
948
  }
949
- }), sa = { class: "admin-auth-card__row" }, ia = ["href"], oa = {
949
+ }), ia = { class: "admin-auth-card__row" }, oa = ["href"], ra = {
950
950
  key: 1,
951
951
  style: { "text-align": "center", "font-size": "var(--uid-font-size-xs)", color: "var(--uid-text-secondary)", "padding-top": "4px" }
952
- }, ra = ["href"], ua = /* @__PURE__ */ L({
952
+ }, ua = ["href"], da = /* @__PURE__ */ P({
953
953
  __name: "LoginForm",
954
954
  props: {
955
955
  forgotUrl: { default: null },
@@ -958,28 +958,28 @@ const Q = ne("admin-auth", () => {
958
958
  },
959
959
  emits: ["success"],
960
960
  setup(e, { emit: t }) {
961
- const n = t, s = Q(), a = F(""), l = F(""), i = F(!1), u = F(!1), f = F(null), g = F({}), _ = v(() => g.value.email?.[0]), k = v(() => g.value.password?.[0]);
962
- async function S() {
961
+ const n = t, s = Z(), a = R(""), l = R(""), i = R(!1), u = R(!1), f = R(null), p = R({}), _ = v(() => p.value.email?.[0]), k = v(() => p.value.password?.[0]);
962
+ async function x() {
963
963
  if (!u.value) {
964
- u.value = !0, f.value = null, g.value = {};
964
+ u.value = !0, f.value = null, p.value = {};
965
965
  try {
966
- const A = await s.login({
966
+ const C = await s.login({
967
967
  email: a.value,
968
968
  password: l.value,
969
969
  remember: i.value
970
970
  });
971
- n("success", A);
972
- } catch (A) {
973
- A instanceof Le ? (g.value = A.fields, f.value = A.firstFieldMessage()) : A instanceof Pe ? f.value = "Нет соединения с сервером" : A instanceof ae ? f.value = A.message || "Не удалось войти" : f.value = A.message;
971
+ n("success", C);
972
+ } catch (C) {
973
+ C instanceof Le ? (p.value = C.fields, f.value = C.firstFieldMessage()) : C instanceof Pe ? f.value = "Нет соединения с сервером" : C instanceof ae ? f.value = C.message || "Не удалось войти" : f.value = C.message;
974
974
  } finally {
975
975
  u.value = !1;
976
976
  }
977
977
  }
978
978
  }
979
- return (A, y) => (o(), c("form", {
979
+ return (C, y) => (o(), c("form", {
980
980
  class: "admin-auth-card__bd",
981
981
  novalidate: "",
982
- onSubmit: ut(S, ["prevent"])
982
+ onSubmit: ut(x, ["prevent"])
983
983
  }, [
984
984
  f.value ? (o(), b(r(te), {
985
985
  key: 0,
@@ -988,13 +988,13 @@ const Q = ne("admin-auth", () => {
988
988
  role: "alert"
989
989
  }, {
990
990
  default: m(() => [
991
- x(p(f.value), 1)
991
+ S(h(f.value), 1)
992
992
  ]),
993
993
  _: 1
994
- })) : R("", !0),
994
+ })) : T("", !0),
995
995
  $(r(de), {
996
996
  modelValue: a.value,
997
- "onUpdate:modelValue": y[0] || (y[0] = (h) => a.value = h),
997
+ "onUpdate:modelValue": y[0] || (y[0] = (g) => a.value = g),
998
998
  type: "email",
999
999
  label: "Email",
1000
1000
  placeholder: "you@company.com",
@@ -1006,7 +1006,7 @@ const Q = ne("admin-auth", () => {
1006
1006
  }, null, 8, ["modelValue", "disabled", "error"]),
1007
1007
  $(r(de), {
1008
1008
  modelValue: l.value,
1009
- "onUpdate:modelValue": y[1] || (y[1] = (h) => l.value = h),
1009
+ "onUpdate:modelValue": y[1] || (y[1] = (g) => l.value = g),
1010
1010
  type: "password",
1011
1011
  label: "Пароль",
1012
1012
  autocomplete: "current-password",
@@ -1015,14 +1015,14 @@ const Q = ne("admin-auth", () => {
1015
1015
  error: k.value,
1016
1016
  name: "password"
1017
1017
  }, null, 8, ["modelValue", "disabled", "error"]),
1018
- d("div", sa, [
1018
+ d("div", ia, [
1019
1019
  $(r(vt), {
1020
1020
  modelValue: i.value,
1021
- "onUpdate:modelValue": y[2] || (y[2] = (h) => i.value = h),
1021
+ "onUpdate:modelValue": y[2] || (y[2] = (g) => i.value = g),
1022
1022
  disabled: u.value
1023
1023
  }, {
1024
1024
  default: m(() => [...y[3] || (y[3] = [
1025
- x(" Запомнить меня ", -1)
1025
+ S(" Запомнить меня ", -1)
1026
1026
  ])]),
1027
1027
  _: 1
1028
1028
  }, 8, ["modelValue", "disabled"]),
@@ -1030,7 +1030,7 @@ const Q = ne("admin-auth", () => {
1030
1030
  key: 0,
1031
1031
  href: e.forgotUrl,
1032
1032
  class: "admin-auth-card__link"
1033
- }, " Забыли пароль? ", 8, ia)) : R("", !0)
1033
+ }, " Забыли пароль? ", 8, oa)) : T("", !0)
1034
1034
  ]),
1035
1035
  $(r(z), {
1036
1036
  type: "submit",
@@ -1040,35 +1040,35 @@ const Q = ne("admin-auth", () => {
1040
1040
  disabled: u.value
1041
1041
  }, {
1042
1042
  default: m(() => [
1043
- x(p(u.value ? "Вход…" : "Войти"), 1)
1043
+ S(h(u.value ? "Вход…" : "Войти"), 1)
1044
1044
  ]),
1045
1045
  _: 1
1046
1046
  }, 8, ["loading", "disabled"]),
1047
- e.ssoLinkLabel && e.ssoUrl ? (o(), c("div", oa, [
1048
- y[4] || (y[4] = x(" или войдите через ", -1)),
1047
+ e.ssoLinkLabel && e.ssoUrl ? (o(), c("div", ra, [
1048
+ y[4] || (y[4] = S(" или войдите через ", -1)),
1049
1049
  d("a", {
1050
1050
  href: e.ssoUrl,
1051
1051
  class: "admin-auth-card__link"
1052
- }, p(e.ssoLinkLabel), 9, ra)
1053
- ])) : R("", !0)
1052
+ }, h(e.ssoLinkLabel), 9, ua)
1053
+ ])) : T("", !0)
1054
1054
  ], 32));
1055
1055
  }
1056
- }), da = ["value", "disabled", "aria-label", "onInput", "onKeydown"], ca = { class: "admin-auth-card__row" }, ma = /* @__PURE__ */ L({
1056
+ }), ca = ["value", "disabled", "aria-label", "onInput", "onKeydown"], ma = { class: "admin-auth-card__row" }, fa = /* @__PURE__ */ P({
1057
1057
  __name: "TwoFactorForm",
1058
1058
  emits: ["success", "cancel"],
1059
1059
  setup(e, { emit: t }) {
1060
- const n = t, s = Q(), a = F("totp"), l = F(["", "", "", "", "", ""]), i = F(""), u = F([]), f = F(!1), g = F(null), _ = F(null), k = v(() => l.value.join("")), S = v(() => a.value === "totp" ? k.value.length === 6 : i.value.trim().length > 0);
1061
- function A(w, V) {
1060
+ const n = t, s = Z(), a = R("totp"), l = R(["", "", "", "", "", ""]), i = R(""), u = R([]), f = R(!1), p = R(null), _ = R(null), k = v(() => l.value.join("")), x = v(() => a.value === "totp" ? k.value.length === 6 : i.value.trim().length > 0);
1061
+ function C(w, V) {
1062
1062
  V instanceof HTMLInputElement && (u.value[w] = V);
1063
1063
  }
1064
1064
  function y(w, V) {
1065
1065
  const W = V.target, G = W.value.replace(/\D/g, "").slice(-1);
1066
1066
  l.value[w] = G, W.value = G, G && w < l.value.length - 1 && _e(() => u.value[w + 1]?.focus()), k.value.length === l.value.length && q();
1067
1067
  }
1068
- function h(w, V) {
1068
+ function g(w, V) {
1069
1069
  V.key === "Backspace" && !l.value[w] && w > 0 ? _e(() => u.value[w - 1]?.focus()) : V.key === "ArrowLeft" && w > 0 ? (u.value[w - 1]?.focus(), V.preventDefault()) : V.key === "ArrowRight" && w < l.value.length - 1 && (u.value[w + 1]?.focus(), V.preventDefault());
1070
1070
  }
1071
- function U(w) {
1071
+ function F(w) {
1072
1072
  const W = (w.clipboardData?.getData("text") ?? "").replace(/\D/g, "").slice(0, l.value.length);
1073
1073
  if (W.length !== 0) {
1074
1074
  w.preventDefault();
@@ -1080,8 +1080,8 @@ const Q = ne("admin-auth", () => {
1080
1080
  }
1081
1081
  }
1082
1082
  async function q() {
1083
- if (!(f.value || !S.value)) {
1084
- f.value = !0, g.value = null;
1083
+ if (!(f.value || !x.value)) {
1084
+ f.value = !0, p.value = null;
1085
1085
  try {
1086
1086
  if (a.value === "totp")
1087
1087
  await s.twoFactorChallenge(k.value);
@@ -1091,34 +1091,34 @@ const Q = ne("admin-auth", () => {
1091
1091
  }
1092
1092
  n("success");
1093
1093
  } catch (w) {
1094
- w instanceof Le ? g.value = w.firstFieldMessage() ?? "Неверный код" : w instanceof Pe ? g.value = "Нет соединения с сервером" : w instanceof ae ? g.value = w.message || "Не удалось проверить код" : g.value = w.message;
1094
+ w instanceof Le ? p.value = w.firstFieldMessage() ?? "Неверный код" : w instanceof Pe ? p.value = "Нет соединения с сервером" : w instanceof ae ? p.value = w.message || "Не удалось проверить код" : p.value = w.message;
1095
1095
  } finally {
1096
1096
  f.value = !1;
1097
1097
  }
1098
1098
  }
1099
1099
  }
1100
- function M() {
1100
+ function L() {
1101
1101
  s.cancelChallenge(), n("cancel");
1102
1102
  }
1103
- function T() {
1104
- a.value = a.value === "totp" ? "recovery" : "totp", g.value = null;
1103
+ function U() {
1104
+ a.value = a.value === "totp" ? "recovery" : "totp", p.value = null;
1105
1105
  }
1106
1106
  return (w, V) => (o(), c("form", {
1107
1107
  class: "admin-auth-card__bd",
1108
1108
  novalidate: "",
1109
1109
  onSubmit: ut(q, ["prevent"])
1110
1110
  }, [
1111
- g.value ? (o(), b(r(te), {
1111
+ p.value ? (o(), b(r(te), {
1112
1112
  key: 0,
1113
1113
  variant: "danger",
1114
1114
  class: "admin-auth-card__alert",
1115
1115
  role: "alert"
1116
1116
  }, {
1117
1117
  default: m(() => [
1118
- x(p(g.value), 1)
1118
+ S(h(p.value), 1)
1119
1119
  ]),
1120
1120
  _: 1
1121
- })) : R("", !0),
1121
+ })) : T("", !0),
1122
1122
  _.value !== null ? (o(), b(r(te), {
1123
1123
  key: 1,
1124
1124
  variant: "info",
@@ -1126,19 +1126,19 @@ const Q = ne("admin-auth", () => {
1126
1126
  role: "status"
1127
1127
  }, {
1128
1128
  default: m(() => [
1129
- x(" Использован recovery-код. Осталось: " + p(_.value), 1)
1129
+ S(" Использован recovery-код. Осталось: " + h(_.value), 1)
1130
1130
  ]),
1131
1131
  _: 1
1132
- })) : R("", !0),
1132
+ })) : T("", !0),
1133
1133
  a.value === "totp" ? (o(), c("div", {
1134
1134
  key: 2,
1135
1135
  class: "admin-code-input",
1136
- onPaste: U
1136
+ onPaste: F
1137
1137
  }, [
1138
- (o(!0), c(P, null, D(l.value, (W, G) => (o(), c("input", {
1138
+ (o(!0), c(M, null, D(l.value, (W, G) => (o(), c("input", {
1139
1139
  key: G,
1140
1140
  ref_for: !0,
1141
- ref: (C) => A(G, C),
1141
+ ref: (A) => C(G, A),
1142
1142
  value: l.value[G],
1143
1143
  type: "text",
1144
1144
  inputmode: "numeric",
@@ -1146,9 +1146,9 @@ const Q = ne("admin-auth", () => {
1146
1146
  maxlength: "1",
1147
1147
  disabled: f.value,
1148
1148
  "aria-label": `Цифра ${G + 1}`,
1149
- onInput: (C) => y(G, C),
1150
- onKeydown: (C) => h(G, C)
1151
- }, null, 40, da))), 128))
1149
+ onInput: (A) => y(G, A),
1150
+ onKeydown: (A) => g(G, A)
1151
+ }, null, 40, ca))), 128))
1152
1152
  ], 32)) : (o(), b(r(de), {
1153
1153
  key: 3,
1154
1154
  modelValue: i.value,
@@ -1164,40 +1164,40 @@ const Q = ne("admin-auth", () => {
1164
1164
  variant: "primary",
1165
1165
  size: "lg",
1166
1166
  loading: f.value,
1167
- disabled: f.value || !S.value
1167
+ disabled: f.value || !x.value
1168
1168
  }, {
1169
1169
  default: m(() => [
1170
- x(p(f.value ? "Проверка…" : "Подтвердить"), 1)
1170
+ S(h(f.value ? "Проверка…" : "Подтвердить"), 1)
1171
1171
  ]),
1172
1172
  _: 1
1173
1173
  }, 8, ["loading", "disabled"]),
1174
- d("div", ca, [
1174
+ d("div", ma, [
1175
1175
  d("button", {
1176
1176
  type: "button",
1177
1177
  class: "admin-auth-card__link",
1178
- onClick: T
1178
+ onClick: U
1179
1179
  }, [
1180
- a.value === "totp" ? (o(), c(P, { key: 0 }, [
1181
- x("Использовать recovery-код")
1182
- ], 64)) : (o(), c(P, { key: 1 }, [
1183
- x("Вернуться к коду из приложения")
1180
+ a.value === "totp" ? (o(), c(M, { key: 0 }, [
1181
+ S("Использовать recovery-код")
1182
+ ], 64)) : (o(), c(M, { key: 1 }, [
1183
+ S("Вернуться к коду из приложения")
1184
1184
  ], 64))
1185
1185
  ]),
1186
1186
  d("button", {
1187
1187
  type: "button",
1188
1188
  class: "admin-auth-card__link",
1189
- onClick: M
1189
+ onClick: L
1190
1190
  }, " Отмена ")
1191
1191
  ])
1192
1192
  ], 32));
1193
1193
  }
1194
- }), fa = { class: "admin-auth-page" }, va = {
1194
+ }), va = { class: "admin-auth-page" }, pa = {
1195
1195
  key: 0,
1196
1196
  class: "admin-auth-page__corner"
1197
- }, pa = { class: "admin-auth-card__hd" }, ga = ["src", "alt"], ha = {
1197
+ }, ga = { class: "admin-auth-card__hd" }, ha = ["src", "alt"], _a = {
1198
1198
  key: 1,
1199
1199
  "aria-hidden": "true"
1200
- }, _a = { key: 2 }, ya = { class: "admin-auth-card__title" }, ba = { class: "admin-auth-card__sub" }, ka = /* @__PURE__ */ L({
1200
+ }, ya = { key: 2 }, ba = { class: "admin-auth-card__title" }, ka = { class: "admin-auth-card__sub" }, wa = /* @__PURE__ */ P({
1201
1201
  __name: "LoginPage",
1202
1202
  props: {
1203
1203
  brandName: { default: "Laravel Admin" },
@@ -1211,7 +1211,7 @@ const Q = ne("admin-auth", () => {
1211
1211
  showCornerActions: { type: Boolean, default: !0 }
1212
1212
  },
1213
1213
  setup(e) {
1214
- const t = e, n = Q(), s = ie(), a = be();
1214
+ const t = e, n = Z(), s = ie(), a = be();
1215
1215
  async function l() {
1216
1216
  const i = a.query[t.redirectQueryKey];
1217
1217
  if (typeof i == "string" && i.length > 0 && i.startsWith("/")) {
@@ -1220,55 +1220,55 @@ const Q = ne("admin-auth", () => {
1220
1220
  }
1221
1221
  await s.push({ name: t.homeRouteName });
1222
1222
  }
1223
- return ee(
1223
+ return Q(
1224
1224
  () => n.isAuthenticated,
1225
1225
  (i) => {
1226
1226
  i && l();
1227
1227
  }
1228
- ), Fe(() => {
1228
+ ), Re(() => {
1229
1229
  n.isAuthenticated && l();
1230
- }), (i, u) => (o(), c("div", fa, [
1231
- e.showCornerActions ? (o(), c("div", va, [
1230
+ }), (i, u) => (o(), c("div", va, [
1231
+ e.showCornerActions ? (o(), c("div", pa, [
1232
1232
  $(_t),
1233
1233
  $(yt)
1234
- ])) : R("", !0),
1235
- $(r(j), {
1236
- class: Z(["admin-auth-card", r(n).isChallengePending ? "admin-auth-card--wide" : ""]),
1234
+ ])) : T("", !0),
1235
+ $(r(K), {
1236
+ class: ee(["admin-auth-card", r(n).isChallengePending ? "admin-auth-card--wide" : ""]),
1237
1237
  padding: "none"
1238
1238
  }, {
1239
1239
  default: m(() => [
1240
- d("div", pa, [
1240
+ d("div", ga, [
1241
1241
  d("div", {
1242
- class: Z(["admin-auth-card__logo", r(n).isChallengePending ? "admin-auth-card__logo--accent" : ""])
1242
+ class: ee(["admin-auth-card__logo", r(n).isChallengePending ? "admin-auth-card__logo--accent" : ""])
1243
1243
  }, [
1244
1244
  e.brandLogo && !r(n).isChallengePending ? (o(), c("img", {
1245
1245
  key: 0,
1246
1246
  src: e.brandLogo,
1247
1247
  alt: e.brandName
1248
- }, null, 8, ga)) : r(n).isChallengePending ? (o(), c("span", ha, "🛡")) : (o(), c("span", _a, p(e.brandMark), 1))
1248
+ }, null, 8, ha)) : r(n).isChallengePending ? (o(), c("span", _a, "🛡")) : (o(), c("span", ya, h(e.brandMark), 1))
1249
1249
  ], 2),
1250
- d("div", ya, [
1251
- r(n).isChallengePending ? (o(), c(P, { key: 0 }, [
1252
- x("Двухфакторная проверка")
1253
- ], 64)) : (o(), c(P, { key: 1 }, [
1254
- x(p(e.brandName), 1)
1250
+ d("div", ba, [
1251
+ r(n).isChallengePending ? (o(), c(M, { key: 0 }, [
1252
+ S("Двухфакторная проверка")
1253
+ ], 64)) : (o(), c(M, { key: 1 }, [
1254
+ S(h(e.brandName), 1)
1255
1255
  ], 64))
1256
1256
  ]),
1257
- d("div", ba, [
1258
- r(n).isChallengePending ? (o(), c(P, { key: 0 }, [
1259
- x(" Введите 6-значный код из приложения-аутентификатора ")
1260
- ], 64)) : (o(), c(P, { key: 1 }, [
1261
- x("Войдите, чтобы продолжить работу")
1257
+ d("div", ka, [
1258
+ r(n).isChallengePending ? (o(), c(M, { key: 0 }, [
1259
+ S(" Введите 6-значный код из приложения-аутентификатора ")
1260
+ ], 64)) : (o(), c(M, { key: 1 }, [
1261
+ S("Войдите, чтобы продолжить работу")
1262
1262
  ], 64))
1263
1263
  ])
1264
1264
  ]),
1265
- r(n).isChallengePending ? (o(), b(ma, {
1265
+ r(n).isChallengePending ? (o(), b(fa, {
1266
1266
  key: 0,
1267
1267
  onSuccess: u[0] || (u[0] = () => {
1268
1268
  }),
1269
1269
  onCancel: u[1] || (u[1] = () => {
1270
1270
  })
1271
- })) : (o(), b(ua, {
1271
+ })) : (o(), b(da, {
1272
1272
  key: 1,
1273
1273
  "forgot-url": e.forgotUrl,
1274
1274
  "sso-link-label": e.ssoLinkLabel,
@@ -1281,31 +1281,31 @@ const Q = ne("admin-auth", () => {
1281
1281
  }, 8, ["class"])
1282
1282
  ]));
1283
1283
  }
1284
- }), tt = { page: 1, per_page: 20, total: 0, last_page: 1 }, wa = ne("admin-resource-index", () => {
1285
- const e = F(null), t = F([]), n = F({ ...tt }), s = F(!1), a = F(!1), l = F(null);
1284
+ }), tt = { page: 1, per_page: 20, total: 0, last_page: 1 }, wt = ne("admin-resource-index", () => {
1285
+ const e = R(null), t = R([]), n = R({ ...tt }), s = R(!1), a = R(!1), l = R(null);
1286
1286
  let i = null;
1287
- const u = 200, f = F(""), g = F({}), _ = F(null), k = F(null), S = F(/* @__PURE__ */ new Set()), A = v(() => !s.value && l.value === null && t.value.length === 0), y = v(() => S.value.size), h = v(() => S.value.size > 0), U = v(() => l.value !== null), q = v(() => S.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((K) => S.value.has(M(K))) ? "all" : "mixed");
1288
- function M(B) {
1287
+ const u = 200, f = R(""), p = R({}), _ = R(null), k = R(null), x = R(/* @__PURE__ */ new Set()), C = v(() => !s.value && l.value === null && t.value.length === 0), y = v(() => x.value.size), g = v(() => x.value.size > 0), F = v(() => l.value !== null), q = v(() => x.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((j) => x.value.has(L(j))) ? "all" : "mixed");
1288
+ function L(B) {
1289
1289
  return B.id ?? B.key ?? "";
1290
1290
  }
1291
- function T(B) {
1291
+ function U(B) {
1292
1292
  e.value !== B && (e.value = B, w(), s.value = !0);
1293
1293
  }
1294
1294
  function w() {
1295
- t.value = [], n.value = { ...tt }, s.value = !1, l.value = null, f.value = "", g.value = {}, _.value = null, k.value = null, S.value = /* @__PURE__ */ new Set();
1295
+ t.value = [], n.value = { ...tt }, s.value = !1, l.value = null, f.value = "", p.value = {}, _.value = null, k.value = null, x.value = /* @__PURE__ */ new Set();
1296
1296
  }
1297
1297
  function V(B = {}) {
1298
- const K = {
1298
+ const j = {
1299
1299
  page: B.page ?? n.value.page,
1300
1300
  per_page: B.per_page ?? n.value.per_page
1301
1301
  }, $e = B.search ?? f.value;
1302
- $e && (K.q = $e);
1302
+ $e && (j.q = $e);
1303
1303
  const ge = B.sort ?? _.value, Qe = B.direction ?? k.value;
1304
- ge && Qe !== null && (K.order = [{ column: ge, direction: Qe }]);
1305
- const Ut = B.filters ?? g.value, Be = {};
1306
- for (const [Rt, re] of Object.entries(Ut))
1307
- re == null || re === "" || (Be[Rt] = Array.isArray(re) ? re.join(",") : re);
1308
- return Object.keys(Be).length > 0 && (K.filters = Be), K;
1304
+ ge && Qe !== null && (j.order = [{ column: ge, direction: Qe }]);
1305
+ const Ut = B.filters ?? p.value, Be = {};
1306
+ for (const [Tt, re] of Object.entries(Ut))
1307
+ re == null || re === "" || (Be[Tt] = Array.isArray(re) ? re.join(",") : re);
1308
+ return Object.keys(Be).length > 0 && (j.filters = Be), j;
1309
1309
  }
1310
1310
  async function W(B = {}) {
1311
1311
  if (!e.value)
@@ -1314,10 +1314,10 @@ const Q = ne("admin-auth", () => {
1314
1314
  a.value = !0;
1315
1315
  }, u);
1316
1316
  try {
1317
- const K = H(), $e = V(B), ge = await K.post(`/${e.value}/search`, $e);
1317
+ const j = H(), $e = V(B), ge = await j.post(`/${e.value}/search`, $e);
1318
1318
  t.value = ge.data, n.value = ge.meta;
1319
- } catch (K) {
1320
- throw l.value = K instanceof Error ? K : new Error(String(K)), K;
1319
+ } catch (j) {
1320
+ throw l.value = j instanceof Error ? j : new Error(String(j)), j;
1321
1321
  } finally {
1322
1322
  s.value = !1, a.value = !1, i !== null && (clearTimeout(i), i = null);
1323
1323
  }
@@ -1325,14 +1325,14 @@ const Q = ne("admin-auth", () => {
1325
1325
  async function G(B) {
1326
1326
  f.value = B, n.value.page = 1, await W();
1327
1327
  }
1328
- async function C(B, K) {
1329
- K == null || K === "" ? delete g.value[B] : g.value[B] = K, n.value.page = 1, await W();
1328
+ async function A(B, j) {
1329
+ j == null || j === "" ? delete p.value[B] : p.value[B] = j, n.value.page = 1, await W();
1330
1330
  }
1331
1331
  async function E() {
1332
- g.value = {}, n.value.page = 1, await W();
1332
+ p.value = {}, n.value.page = 1, await W();
1333
1333
  }
1334
- async function N(B, K = "asc") {
1335
- _.value = B, k.value = K, await W();
1334
+ async function N(B, j = "asc") {
1335
+ _.value = B, k.value = j, await W();
1336
1336
  }
1337
1337
  async function O(B) {
1338
1338
  _.value === B ? k.value === "asc" ? k.value = "desc" : k.value === "desc" ? (_.value = null, k.value = null) : k.value = "asc" : (_.value = B, k.value = "asc"), await W();
@@ -1340,24 +1340,24 @@ const Q = ne("admin-auth", () => {
1340
1340
  async function X(B) {
1341
1341
  n.value.page = B, await W();
1342
1342
  }
1343
- function Ct(B) {
1344
- const K = new Set(S.value);
1345
- K.has(B) ? K.delete(B) : K.add(B), S.value = K;
1343
+ function At(B) {
1344
+ const j = new Set(x.value);
1345
+ j.has(B) ? j.delete(B) : j.add(B), x.value = j;
1346
1346
  }
1347
- function At() {
1347
+ function Et() {
1348
1348
  if (q.value === "all") {
1349
- S.value = /* @__PURE__ */ new Set();
1349
+ x.value = /* @__PURE__ */ new Set();
1350
1350
  return;
1351
1351
  }
1352
- const B = new Set(S.value);
1353
- for (const K of t.value) B.add(M(K));
1354
- S.value = B;
1352
+ const B = new Set(x.value);
1353
+ for (const j of t.value) B.add(L(j));
1354
+ x.value = B;
1355
1355
  }
1356
- function Et() {
1357
- S.value = /* @__PURE__ */ new Set();
1356
+ function Rt() {
1357
+ x.value = /* @__PURE__ */ new Set();
1358
1358
  }
1359
1359
  function Ft(B) {
1360
- return S.value.has(B);
1360
+ return x.value.has(B);
1361
1361
  }
1362
1362
  return {
1363
1363
  // state
@@ -1368,48 +1368,51 @@ const Q = ne("admin-auth", () => {
1368
1368
  slowLoading: a,
1369
1369
  error: l,
1370
1370
  search: f,
1371
- filters: g,
1371
+ filters: p,
1372
1372
  sortKey: _,
1373
1373
  sortDirection: k,
1374
- selection: S,
1374
+ selection: x,
1375
1375
  // getters
1376
- isEmpty: A,
1377
- hasError: U,
1378
- hasSelection: h,
1376
+ isEmpty: C,
1377
+ hasError: F,
1378
+ hasSelection: g,
1379
1379
  selectedCount: y,
1380
1380
  selectionState: q,
1381
1381
  // actions
1382
- setSlug: T,
1382
+ setSlug: U,
1383
1383
  reset: w,
1384
1384
  load: W,
1385
1385
  setSearch: G,
1386
- setFilter: C,
1386
+ setFilter: A,
1387
1387
  clearFilters: E,
1388
1388
  setSort: N,
1389
1389
  toggleSort: O,
1390
1390
  setPage: X,
1391
- toggleRow: Ct,
1392
- toggleAllOnPage: At,
1393
- clearSelection: Et,
1391
+ toggleRow: At,
1392
+ toggleAllOnPage: Et,
1393
+ clearSelection: Rt,
1394
1394
  isSelected: Ft,
1395
- rowId: M
1395
+ rowId: L
1396
1396
  };
1397
- }), nt = "d.m.Y H:i:s", $a = "d.m.Y", xa = /^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}/;
1398
- function Sa(e, t, n = {}) {
1397
+ }), $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1398
+ __proto__: null,
1399
+ useResourceIndexStore: wt
1400
+ }, Symbol.toStringTag, { value: "Module" })), nt = "d.m.Y H:i:s", xa = "d.m.Y", Sa = /^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}/;
1401
+ function Ca(e, t, n = {}) {
1399
1402
  if (e == null) return "";
1400
- if (!t && typeof e == "string" && xa.test(e))
1403
+ if (!t && typeof e == "string" && Sa.test(e))
1401
1404
  return De(e, nt);
1402
1405
  switch (t) {
1403
1406
  case "date":
1404
- return De(String(e), n.format ?? $a);
1407
+ return De(String(e), n.format ?? xa);
1405
1408
  case "datetime":
1406
1409
  return De(String(e), n.format ?? nt);
1407
1410
  case "money":
1408
- return Ca(e, n.currency ?? "RUB", n.decimals ?? 2);
1411
+ return Aa(e, n.currency ?? "RUB", n.decimals ?? 2);
1409
1412
  case "boolean":
1410
- return Aa(e, n.trueLabel ?? "Да", n.falseLabel ?? "Нет");
1413
+ return Ea(e, n.trueLabel ?? "Да", n.falseLabel ?? "Нет");
1411
1414
  case "bytes":
1412
- return Ea(e);
1415
+ return Ra(e);
1413
1416
  default:
1414
1417
  return String(e);
1415
1418
  }
@@ -1442,37 +1445,37 @@ function De(e, t) {
1442
1445
  }
1443
1446
  return l;
1444
1447
  }
1445
- function Ca(e, t, n) {
1448
+ function Aa(e, t, n) {
1446
1449
  const s = typeof e == "number" ? e : Number(e);
1447
1450
  return isNaN(s) ? String(e) : `${s.toFixed(n)} ${t}`;
1448
1451
  }
1449
- function Aa(e, t, n) {
1452
+ function Ea(e, t, n) {
1450
1453
  return e === !0 || e === 1 || e === "1" || e === "true" ? t : n;
1451
1454
  }
1452
- function Ea(e) {
1455
+ function Ra(e) {
1453
1456
  const t = typeof e == "number" ? e : Number(e);
1454
1457
  return isNaN(t) ? String(e) : t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : t < 1024 * 1024 * 1024 ? `${(t / 1024 / 1024).toFixed(1)} MB` : `${(t / 1024 / 1024 / 1024).toFixed(1)} GB`;
1455
1458
  }
1456
- const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-page__hd" }, Ra = { class: "admin-page__title-wrap" }, Ta = { class: "admin-page__title" }, La = {
1459
+ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-page__hd" }, Ta = { class: "admin-page__title-wrap" }, La = { class: "admin-page__title" }, Pa = {
1457
1460
  key: 0,
1458
1461
  class: "admin-page__count"
1459
- }, Pa = { class: "admin-page__actions" }, Ma = {
1462
+ }, Ma = { class: "admin-page__actions" }, Na = {
1460
1463
  key: 0,
1461
1464
  class: "admin-bulk-toolbar",
1462
1465
  role: "toolbar"
1463
- }, Na = { class: "admin-bulk-toolbar__count" }, Ba = {
1466
+ }, Ba = { class: "admin-bulk-toolbar__count" }, Ia = {
1464
1467
  key: 1,
1465
1468
  class: "admin-filter-bar"
1466
- }, Ia = ["value"], Da = {
1469
+ }, Da = ["value"], Va = {
1467
1470
  key: 2,
1468
1471
  class: "admin-resource-index__loading"
1469
- }, Va = {
1472
+ }, za = {
1470
1473
  key: 5,
1471
1474
  class: "admin-resource-index__table"
1472
- }, za = {
1475
+ }, qa = {
1473
1476
  key: 6,
1474
1477
  class: "admin-resource-index__footer"
1475
- }, qa = /* @__PURE__ */ L({
1478
+ }, Oa = /* @__PURE__ */ P({
1476
1479
  __name: "ResourceIndexPage",
1477
1480
  props: {
1478
1481
  slug: {},
@@ -1483,9 +1486,9 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1483
1486
  },
1484
1487
  emits: ["bulk-action", "row-click"],
1485
1488
  setup(e, { emit: t }) {
1486
- const n = e, s = t, a = wa(), l = oe(), i = Ye(), u = v(() => l.getResource(n.slug)), f = v(
1489
+ const n = e, s = t, a = wt(), l = oe(), i = Ye(), u = v(() => l.getResource(n.slug)), f = v(
1487
1490
  () => n.title ?? u.value?.label ?? n.slug
1488
- ), g = v(() => (u.value?.columns ?? []).map((E) => {
1491
+ ), p = v(() => (u.value?.columns ?? []).map((E) => {
1489
1492
  const N = E;
1490
1493
  return {
1491
1494
  key: String(N.key ?? N.name ?? ""),
@@ -1495,8 +1498,8 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1495
1498
  width: typeof N.width == "string" ? N.width : void 0
1496
1499
  };
1497
1500
  }).filter((E) => E.key)), _ = v(() => {
1498
- const C = u.value?.columns ?? [], E = {};
1499
- for (const N of C) {
1501
+ const A = u.value?.columns ?? [], E = {};
1502
+ for (const N of A) {
1500
1503
  const O = N, X = String(O.key ?? O.name ?? "");
1501
1504
  X && (E[X] = {
1502
1505
  preset: typeof O.preset == "string" ? O.preset : void 0,
@@ -1505,22 +1508,22 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1505
1508
  }
1506
1509
  return E;
1507
1510
  });
1508
- function k(C, E) {
1509
- const O = E?.row?.[C], X = _.value[C];
1510
- return Sa(O, X?.preset, X?.meta ?? {});
1511
+ function k(A, E) {
1512
+ const O = E?.row?.[A], X = _.value[A];
1513
+ return Ca(O, X?.preset, X?.meta ?? {});
1511
1514
  }
1512
- function S(C) {
1513
- return C?.row;
1515
+ function x(A) {
1516
+ return A?.row;
1514
1517
  }
1515
- const A = v(
1518
+ const C = v(
1516
1519
  () => a.search !== "" || Object.keys(a.filters).length > 0
1517
1520
  ), y = v(
1518
- () => !a.isEmpty || A.value
1519
- ), h = v(() => {
1520
- const C = a.meta.total;
1521
- return C === 0 ? "" : `${a.items.length} из ${C}`;
1521
+ () => !a.isEmpty || C.value
1522
+ ), g = v(() => {
1523
+ const A = a.meta.total;
1524
+ return A === 0 ? "" : `${a.items.length} из ${A}`;
1522
1525
  });
1523
- async function U() {
1526
+ async function F() {
1524
1527
  i.start();
1525
1528
  try {
1526
1529
  await a.load();
@@ -1529,71 +1532,71 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1529
1532
  i.end();
1530
1533
  }
1531
1534
  }
1532
- Fe(async () => {
1535
+ Re(async () => {
1533
1536
  a.setSlug(n.slug), l.manifest === null && await l.load().catch(() => {
1534
- }), await U();
1535
- }), ee(
1537
+ }), await F();
1538
+ }), Q(
1536
1539
  () => n.slug,
1537
- async (C, E) => {
1538
- C !== E && (a.setSlug(C), await U());
1540
+ async (A, E) => {
1541
+ A !== E && (a.setSlug(A), await F());
1539
1542
  }
1540
1543
  );
1541
- async function q(C) {
1542
- await _e(), await a.setSort(C, a.sortDirection);
1544
+ async function q(A) {
1545
+ await _e(), await a.setSort(A, a.sortDirection);
1543
1546
  }
1544
- async function M(C) {
1545
- await _e(), await a.setSort(a.sortKey, C);
1547
+ async function L(A) {
1548
+ await _e(), await a.setSort(a.sortKey, A);
1546
1549
  }
1547
- function T(C) {
1548
- a.selection = C;
1550
+ function U(A) {
1551
+ a.selection = A;
1549
1552
  }
1550
- async function w(C) {
1551
- await a.setPage(C);
1553
+ async function w(A) {
1554
+ await a.setPage(A);
1552
1555
  }
1553
- function V(C) {
1554
- s("row-click", C);
1556
+ function V(A) {
1557
+ s("row-click", A);
1555
1558
  }
1556
- function W(C) {
1557
- s("bulk-action", C, [...a.selection]);
1559
+ function W(A) {
1560
+ s("bulk-action", A, [...a.selection]);
1558
1561
  }
1559
1562
  async function G() {
1560
1563
  await a.load().catch(() => {
1561
1564
  });
1562
1565
  }
1563
- return (C, E) => (o(), c("section", Fa, [
1566
+ return (A, E) => (o(), c("section", Fa, [
1564
1567
  d("header", Ua, [
1565
- d("div", Ra, [
1566
- d("h1", Ta, p(f.value), 1),
1567
- e.subtitle || h.value ? (o(), c("div", La, [
1568
- e.subtitle ? (o(), c(P, { key: 0 }, [
1569
- x(p(e.subtitle), 1)
1570
- ], 64)) : R("", !0),
1571
- e.subtitle && h.value ? (o(), c(P, { key: 1 }, [
1572
- x(" · ")
1573
- ], 64)) : R("", !0),
1574
- h.value ? (o(), c(P, { key: 2 }, [
1575
- x(p(h.value), 1)
1576
- ], 64)) : R("", !0)
1577
- ])) : R("", !0)
1568
+ d("div", Ta, [
1569
+ d("h1", La, h(f.value), 1),
1570
+ e.subtitle || g.value ? (o(), c("div", Pa, [
1571
+ e.subtitle ? (o(), c(M, { key: 0 }, [
1572
+ S(h(e.subtitle), 1)
1573
+ ], 64)) : T("", !0),
1574
+ e.subtitle && g.value ? (o(), c(M, { key: 1 }, [
1575
+ S(" · ")
1576
+ ], 64)) : T("", !0),
1577
+ g.value ? (o(), c(M, { key: 2 }, [
1578
+ S(h(g.value), 1)
1579
+ ], 64)) : T("", !0)
1580
+ ])) : T("", !0)
1578
1581
  ]),
1579
- d("div", Pa, [
1580
- Y(C.$slots, "actions"),
1582
+ d("div", Ma, [
1583
+ Y(A.$slots, "actions"),
1581
1584
  e.createRouteName ? (o(), b(r(z), {
1582
1585
  key: 0,
1583
1586
  variant: "primary",
1584
- onClick: E[0] || (E[0] = (N) => C.$router.push({ name: e.createRouteName }))
1587
+ onClick: E[0] || (E[0] = (N) => A.$router.push({ name: e.createRouteName }))
1585
1588
  }, {
1586
1589
  default: m(() => [
1587
- x(p(e.createLabel), 1)
1590
+ S(h(e.createLabel), 1)
1588
1591
  ]),
1589
1592
  _: 1
1590
- })) : R("", !0)
1593
+ })) : T("", !0)
1591
1594
  ])
1592
1595
  ]),
1593
- r(a).hasSelection ? (o(), c("div", Ma, [
1594
- d("span", Na, [
1595
- E[7] || (E[7] = x(" Выбрано ", -1)),
1596
- d("b", null, p(r(a).selectedCount), 1)
1596
+ r(a).hasSelection ? (o(), c("div", Na, [
1597
+ d("span", Ba, [
1598
+ E[7] || (E[7] = S(" Выбрано ", -1)),
1599
+ d("b", null, h(r(a).selectedCount), 1)
1597
1600
  ]),
1598
1601
  E[13] || (E[13] = d("span", { class: "admin-bulk-toolbar__divider" }, null, -1)),
1599
1602
  $(r(z), {
@@ -1602,7 +1605,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1602
1605
  onClick: E[1] || (E[1] = (N) => W("publish"))
1603
1606
  }, {
1604
1607
  default: m(() => [...E[8] || (E[8] = [
1605
- x("Опубликовать", -1)
1608
+ S("Опубликовать", -1)
1606
1609
  ])]),
1607
1610
  _: 1
1608
1611
  }),
@@ -1612,7 +1615,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1612
1615
  onClick: E[2] || (E[2] = (N) => W("archive"))
1613
1616
  }, {
1614
1617
  default: m(() => [...E[9] || (E[9] = [
1615
- x("Архивировать", -1)
1618
+ S("Архивировать", -1)
1616
1619
  ])]),
1617
1620
  _: 1
1618
1621
  }),
@@ -1622,7 +1625,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1622
1625
  onClick: E[3] || (E[3] = (N) => W("export"))
1623
1626
  }, {
1624
1627
  default: m(() => [...E[10] || (E[10] = [
1625
- x("Экспорт", -1)
1628
+ S("Экспорт", -1)
1626
1629
  ])]),
1627
1630
  _: 1
1628
1631
  }),
@@ -1632,7 +1635,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1632
1635
  onClick: E[4] || (E[4] = (N) => W("delete"))
1633
1636
  }, {
1634
1637
  default: m(() => [...E[11] || (E[11] = [
1635
- x("Удалить", -1)
1638
+ S("Удалить", -1)
1636
1639
  ])]),
1637
1640
  _: 1
1638
1641
  }),
@@ -1643,19 +1646,19 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1643
1646
  onClick: r(a).clearSelection
1644
1647
  }, {
1645
1648
  default: m(() => [...E[12] || (E[12] = [
1646
- x(" Снять выделение ", -1)
1649
+ S(" Снять выделение ", -1)
1647
1650
  ])]),
1648
1651
  _: 1
1649
1652
  }, 8, ["onClick"])
1650
- ])) : y.value ? (o(), c("div", Ba, [
1653
+ ])) : y.value ? (o(), c("div", Ia, [
1651
1654
  d("input", {
1652
1655
  value: r(a).search,
1653
1656
  type: "search",
1654
1657
  placeholder: "Поиск…",
1655
1658
  class: "admin-filter-bar__search",
1656
- onKeydown: E[5] || (E[5] = Pt((N) => r(a).setSearch(N.target.value), ["enter"]))
1657
- }, null, 40, Ia),
1658
- Y(C.$slots, "filters", {
1659
+ onKeydown: E[5] || (E[5] = Mt((N) => r(a).setSearch(N.target.value), ["enter"]))
1660
+ }, null, 40, Da),
1661
+ Y(A.$slots, "filters", {
1659
1662
  filters: r(a).filters,
1660
1663
  setFilter: r(a).setFilter
1661
1664
  }),
@@ -1667,17 +1670,17 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1667
1670
  onClick: r(a).clearFilters
1668
1671
  }, {
1669
1672
  default: m(() => [...E[15] || (E[15] = [
1670
- x(" Сброс ", -1)
1673
+ S(" Сброс ", -1)
1671
1674
  ])]),
1672
1675
  _: 1
1673
- }, 8, ["onClick"])) : R("", !0)
1674
- ])) : R("", !0),
1675
- r(a).loading && r(a).items.length === 0 ? (o(), c("div", Da, [
1676
- r(a).slowLoading ? (o(), c(P, { key: 0 }, D(8, (N) => $(r(We), {
1676
+ }, 8, ["onClick"])) : T("", !0)
1677
+ ])) : T("", !0),
1678
+ r(a).loading && r(a).items.length === 0 ? (o(), c("div", Va, [
1679
+ r(a).slowLoading ? (o(), c(M, { key: 0 }, D(8, (N) => $(r(We), {
1677
1680
  key: N,
1678
1681
  height: "40px"
1679
- })), 64)) : R("", !0)
1680
- ])) : r(a).hasError ? (o(), b(r(jt), {
1682
+ })), 64)) : T("", !0)
1683
+ ])) : r(a).hasError ? (o(), b(r(Gt), {
1681
1684
  key: 3,
1682
1685
  title: "Не удалось загрузить данные",
1683
1686
  description: r(a).error?.message ?? "Попробуйте обновить страницу.",
@@ -1689,13 +1692,13 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1689
1692
  onClick: G
1690
1693
  }, {
1691
1694
  default: m(() => [...E[17] || (E[17] = [
1692
- x("Обновить", -1)
1695
+ S("Обновить", -1)
1693
1696
  ])]),
1694
1697
  _: 1
1695
1698
  })
1696
1699
  ]),
1697
1700
  _: 1
1698
- }, 8, ["description"])) : r(a).isEmpty ? (o(), b(r(Gt), {
1701
+ }, 8, ["description"])) : r(a).isEmpty ? (o(), b(r(Ht), {
1699
1702
  key: 4,
1700
1703
  title: "Пока пусто",
1701
1704
  description: "Создайте первую запись или измените фильтры.",
@@ -1705,18 +1708,18 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1705
1708
  e.createRouteName ? (o(), b(r(z), {
1706
1709
  key: 0,
1707
1710
  variant: "primary",
1708
- onClick: E[6] || (E[6] = (N) => C.$router.push({ name: e.createRouteName }))
1711
+ onClick: E[6] || (E[6] = (N) => A.$router.push({ name: e.createRouteName }))
1709
1712
  }, {
1710
1713
  default: m(() => [
1711
- x(p(e.createLabel), 1)
1714
+ S(h(e.createLabel), 1)
1712
1715
  ]),
1713
1716
  _: 1
1714
- })) : R("", !0)
1717
+ })) : T("", !0)
1715
1718
  ]),
1716
1719
  _: 1
1717
- })) : (o(), c("div", Va, [
1718
- $(r(Ke), {
1719
- columns: g.value,
1720
+ })) : (o(), c("div", za, [
1721
+ $(r(je), {
1722
+ columns: p.value,
1720
1723
  data: r(a).items,
1721
1724
  "sort-key": r(a).sortKey,
1722
1725
  "sort-direction": r(a).sortDirection,
@@ -1724,74 +1727,74 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1724
1727
  selection: r(a).selection,
1725
1728
  "row-key": (N) => r(a).rowId(N),
1726
1729
  "onUpdate:sortKey": q,
1727
- "onUpdate:sortDirection": M,
1728
- "onUpdate:selection": T,
1730
+ "onUpdate:sortDirection": L,
1731
+ "onUpdate:selection": U,
1729
1732
  onRowClick: V
1730
1733
  }, qe({ _: 2 }, [
1731
- D(g.value, (N) => ({
1734
+ D(p.value, (N) => ({
1732
1735
  name: N.key,
1733
1736
  fn: m((O) => [
1734
- Y(C.$slots, `cell-${N.key}`, {
1735
- row: S(O)
1737
+ Y(A.$slots, `cell-${N.key}`, {
1738
+ row: x(O)
1736
1739
  }, () => [
1737
- x(p(k(N.key, O)), 1)
1740
+ S(h(k(N.key, O)), 1)
1738
1741
  ])
1739
1742
  ])
1740
1743
  }))
1741
1744
  ]), 1032, ["columns", "data", "sort-key", "sort-direction", "selection", "row-key"])
1742
1745
  ])),
1743
- !r(a).loading && !r(a).hasError && !r(a).isEmpty ? (o(), c("footer", za, [
1744
- $(r(Ht), {
1746
+ !r(a).loading && !r(a).hasError && !r(a).isEmpty ? (o(), c("footer", qa, [
1747
+ $(r(Xt), {
1745
1748
  "model-value": r(a).meta.page,
1746
1749
  total: r(a).meta.total,
1747
1750
  "per-page": r(a).meta.per_page,
1748
1751
  "onUpdate:modelValue": w
1749
1752
  }, null, 8, ["model-value", "total", "per-page"])
1750
- ])) : R("", !0)
1753
+ ])) : T("", !0)
1751
1754
  ]));
1752
1755
  }
1753
- }), wt = ne("admin-resource-form", () => {
1754
- const e = F(null), t = F("create"), n = F(null), s = F({}), a = F({}), l = F({}), i = F(!1), u = F(!1), f = F(!1), g = F(null), _ = v(() => t.value === "create"), k = v(() => t.value === "edit"), S = v(() => t.value === "view"), A = v(() => g.value !== null), y = v(() => {
1755
- const C = s.value, E = a.value, N = /* @__PURE__ */ new Set([...Object.keys(C), ...Object.keys(E)]);
1756
+ }), $t = ne("admin-resource-form", () => {
1757
+ const e = R(null), t = R("create"), n = R(null), s = R({}), a = R({}), l = R({}), i = R(!1), u = R(!1), f = R(!1), p = R(null), _ = v(() => t.value === "create"), k = v(() => t.value === "edit"), x = v(() => t.value === "view"), C = v(() => p.value !== null), y = v(() => {
1758
+ const A = s.value, E = a.value, N = /* @__PURE__ */ new Set([...Object.keys(A), ...Object.keys(E)]);
1756
1759
  for (const O of N)
1757
- if (!Object.is(C[O], E[O]))
1758
- if (typeof C[O] == "object" || typeof E[O] == "object") {
1759
- if (JSON.stringify(C[O]) !== JSON.stringify(E[O])) return !0;
1760
+ if (!Object.is(A[O], E[O]))
1761
+ if (typeof A[O] == "object" || typeof E[O] == "object") {
1762
+ if (JSON.stringify(A[O]) !== JSON.stringify(E[O])) return !0;
1760
1763
  } else
1761
1764
  return !0;
1762
1765
  return !1;
1763
1766
  });
1764
- function h(C, E) {
1765
- for (const N of Object.keys(C)) delete C[N];
1766
- Object.assign(C, E);
1767
+ function g(A, E) {
1768
+ for (const N of Object.keys(A)) delete A[N];
1769
+ Object.assign(A, E);
1767
1770
  }
1768
- function U() {
1769
- h(s.value, {}), h(a.value, {}), l.value = {}, i.value = !1, u.value = !1, f.value = !1, g.value = null, n.value = null;
1771
+ function F() {
1772
+ g(s.value, {}), g(a.value, {}), l.value = {}, i.value = !1, u.value = !1, f.value = !1, p.value = null, n.value = null;
1770
1773
  }
1771
- function q(C, E = {}) {
1772
- e.value = C, t.value = "create", n.value = null, h(s.value, E), h(a.value, E), l.value = {}, g.value = null;
1774
+ function q(A, E = {}) {
1775
+ e.value = A, t.value = "create", n.value = null, g(s.value, E), g(a.value, E), l.value = {}, p.value = null;
1773
1776
  }
1774
- async function M(C, E, N = "edit") {
1775
- e.value = C, t.value = N, n.value = E, i.value = !0, g.value = null, l.value = {};
1777
+ async function L(A, E, N = "edit") {
1778
+ e.value = A, t.value = N, n.value = E, i.value = !0, p.value = null, l.value = {};
1776
1779
  try {
1777
- const X = await H().get(`/${C}/read`, {
1780
+ const X = await H().get(`/${A}/read`, {
1778
1781
  params: { id: E }
1779
1782
  });
1780
- h(s.value, X.record), h(a.value, X.record);
1783
+ g(s.value, X.record), g(a.value, X.record);
1781
1784
  } catch (O) {
1782
- throw g.value = O instanceof Error ? O : new Error(String(O)), O;
1785
+ throw p.value = O instanceof Error ? O : new Error(String(O)), O;
1783
1786
  } finally {
1784
1787
  i.value = !1;
1785
1788
  }
1786
1789
  }
1787
- function T(C, E) {
1788
- if (s.value[C] = E, l.value[C]) {
1790
+ function U(A, E) {
1791
+ if (s.value[A] = E, l.value[A]) {
1789
1792
  const N = { ...l.value };
1790
- delete N[C], l.value = N;
1793
+ delete N[A], l.value = N;
1791
1794
  }
1792
1795
  }
1793
- function w(C) {
1794
- l.value = { ...C };
1796
+ function w(A) {
1797
+ l.value = { ...A };
1795
1798
  }
1796
1799
  function V() {
1797
1800
  l.value = {};
@@ -1799,14 +1802,14 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1799
1802
  async function W() {
1800
1803
  if (!e.value) throw new Error("useResourceFormStore.save() before slug set");
1801
1804
  if (u.value) throw new Error("Already saving");
1802
- u.value = !0, g.value = null, l.value = {};
1805
+ u.value = !0, p.value = null, l.value = {};
1803
1806
  try {
1804
- const C = H(), E = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, N = t.value === "create" ? s.value : { id: n.value, ...s.value }, O = await C.post(E, N), X = O.record?.id ?? O.id;
1807
+ const A = H(), E = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, N = t.value === "create" ? s.value : { id: n.value, ...s.value }, O = await A.post(E, N), X = O.record?.id ?? O.id;
1805
1808
  if (X === void 0)
1806
1809
  throw new Error("save: backend response does not contain record.id");
1807
- return n.value = X, h(a.value, { ...s.value }), t.value = "edit", X;
1808
- } catch (C) {
1809
- throw C instanceof Le ? l.value = { ...C.fields } : (C instanceof ae || C instanceof Error) && (g.value = C), C;
1810
+ return n.value = X, g(a.value, { ...s.value }), t.value = "edit", X;
1811
+ } catch (A) {
1812
+ throw A instanceof Le ? l.value = { ...A.fields } : (A instanceof ae || A instanceof Error) && (p.value = A), A;
1810
1813
  } finally {
1811
1814
  u.value = !1;
1812
1815
  }
@@ -1815,11 +1818,11 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1815
1818
  if (!e.value || n.value === null)
1816
1819
  throw new Error("Nothing to delete");
1817
1820
  if (f.value) throw new Error("Already deleting");
1818
- f.value = !0, g.value = null;
1821
+ f.value = !0, p.value = null;
1819
1822
  try {
1820
1823
  await H().post(`/${e.value}/delete`, { id: n.value });
1821
- } catch (C) {
1822
- throw C instanceof Error && (g.value = C), C;
1824
+ } catch (A) {
1825
+ throw A instanceof Error && (p.value = A), A;
1823
1826
  } finally {
1824
1827
  f.value = !1;
1825
1828
  }
@@ -1835,18 +1838,18 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1835
1838
  loading: i,
1836
1839
  saving: u,
1837
1840
  deleting: f,
1838
- error: g,
1841
+ error: p,
1839
1842
  // getters
1840
1843
  isCreate: _,
1841
1844
  isEdit: k,
1842
- isView: S,
1845
+ isView: x,
1843
1846
  isDirty: y,
1844
- hasError: A,
1847
+ hasError: C,
1845
1848
  // actions
1846
- reset: U,
1849
+ reset: F,
1847
1850
  prepareCreate: q,
1848
- load: M,
1849
- setField: T,
1851
+ load: L,
1852
+ setField: U,
1850
1853
  setErrors: w,
1851
1854
  clearErrors: V,
1852
1855
  save: W,
@@ -1877,14 +1880,14 @@ function Me() {
1877
1880
  }
1878
1881
  };
1879
1882
  }
1880
- const me = Me(), fe = Me(), Qi = me.register, $t = me.get, Zi = me.has, eo = me.list, to = fe.register, at = fe.get, no = fe.has, ao = fe.list;
1881
- function lo() {
1883
+ const me = Me(), fe = Me(), Zi = me.register, xt = me.get, eo = me.has, to = me.list, no = fe.register, at = fe.get, ao = fe.has, lo = fe.list;
1884
+ function so() {
1882
1885
  me.clear(), fe.clear();
1883
1886
  }
1884
- function Oa(e) {
1887
+ function Wa(e) {
1885
1888
  e.fields && me.registerBundle(e.fields), e.layouts && fe.registerBundle(e.layouts);
1886
1889
  }
1887
- const xt = /* @__PURE__ */ L({
1890
+ const St = /* @__PURE__ */ P({
1888
1891
  __name: "UnknownField",
1889
1892
  props: {
1890
1893
  type: {},
@@ -1893,36 +1896,36 @@ const xt = /* @__PURE__ */ L({
1893
1896
  setup(e) {
1894
1897
  return (t, n) => (o(), b(r(te), { variant: "warning" }, {
1895
1898
  title: m(() => [
1896
- x("Неизвестный тип поля: " + p(e.type), 1)
1899
+ S("Неизвестный тип поля: " + h(e.type), 1)
1897
1900
  ]),
1898
1901
  default: m(() => [
1899
- e.name ? (o(), c(P, { key: 0 }, [
1900
- d("code", null, p(e.name), 1),
1901
- n[0] || (n[0] = x(" — зарегистрируйте field-компонент через ", -1)),
1902
- d("code", null, "registerField('" + p(e.type) + "', YourComponent)", 1),
1903
- n[1] || (n[1] = x(". ", -1))
1904
- ], 64)) : R("", !0)
1902
+ e.name ? (o(), c(M, { key: 0 }, [
1903
+ d("code", null, h(e.name), 1),
1904
+ n[0] || (n[0] = S(" — зарегистрируйте field-компонент через ", -1)),
1905
+ d("code", null, "registerField('" + h(e.type) + "', YourComponent)", 1),
1906
+ n[1] || (n[1] = S(". ", -1))
1907
+ ], 64)) : T("", !0)
1905
1908
  ]),
1906
1909
  _: 1
1907
1910
  }));
1908
1911
  }
1909
- }), St = /* @__PURE__ */ L({
1912
+ }), Ct = /* @__PURE__ */ P({
1910
1913
  __name: "FieldRenderer",
1911
1914
  props: {
1912
1915
  node: {}
1913
1916
  },
1914
1917
  setup(e) {
1915
- const t = e, n = v(() => $t(t.node.type)), s = v(() => {
1918
+ const t = e, n = v(() => xt(t.node.type)), s = v(() => {
1916
1919
  const { type: a, ...l } = t.node;
1917
1920
  return l;
1918
1921
  });
1919
- return (a, l) => n.value ? (o(), b(se(n.value), Ue(Re({ key: 0 }, s.value)), null, 16)) : (o(), b(xt, {
1922
+ return (a, l) => n.value ? (o(), b(se(n.value), Fe(Ue({ key: 0 }, s.value)), null, 16)) : (o(), b(St, {
1920
1923
  key: 1,
1921
1924
  type: e.node.type,
1922
1925
  name: e.node.name
1923
1926
  }, null, 8, ["type", "name"]));
1924
1927
  }
1925
- }), we = /* @__PURE__ */ L({
1928
+ }), we = /* @__PURE__ */ P({
1926
1929
  __name: "LayoutRenderer",
1927
1930
  props: {
1928
1931
  node: {}
@@ -1936,27 +1939,27 @@ const xt = /* @__PURE__ */ L({
1936
1939
  return i ? { kind: "layout", component: i } : { kind: "unknown" };
1937
1940
  }
1938
1941
  const l = at(t.node.type);
1939
- return l ? { kind: "layout", component: l } : $t(t.node.type) ? { kind: "field" } : { kind: "unknown" };
1942
+ return l ? { kind: "layout", component: l } : xt(t.node.type) ? { kind: "field" } : { kind: "unknown" };
1940
1943
  }), s = v(() => {
1941
1944
  const { type: l, kind: i, ...u } = t.node;
1942
1945
  return u;
1943
1946
  }), a = v(() => t.node);
1944
- return (l, i) => n.value.kind === "layout" && n.value.component ? (o(), b(se(n.value.component), Ue(Re({ key: 0 }, s.value)), null, 16)) : n.value.kind === "field" ? (o(), b(St, {
1947
+ return (l, i) => n.value.kind === "layout" && n.value.component ? (o(), b(se(n.value.component), Fe(Ue({ key: 0 }, s.value)), null, 16)) : n.value.kind === "field" ? (o(), b(Ct, {
1945
1948
  key: 1,
1946
1949
  node: a.value
1947
- }, null, 8, ["node"])) : (o(), b(xt, {
1950
+ }, null, 8, ["node"])) : (o(), b(St, {
1948
1951
  key: 2,
1949
1952
  type: e.node.type,
1950
1953
  name: e.node.name
1951
1954
  }, null, 8, ["type", "name"]));
1952
1955
  }
1953
- }), Wa = { class: "admin-page admin-resource-form" }, Ka = { class: "admin-page__hd" }, ja = { class: "admin-page__title-wrap" }, Ga = { class: "admin-page__title" }, Ha = { class: "admin-page__actions" }, Xa = {
1956
+ }), ja = { class: "admin-page admin-resource-form" }, Ka = { class: "admin-page__hd" }, Ga = { class: "admin-page__title-wrap" }, Ha = { class: "admin-page__title" }, Xa = { class: "admin-page__actions" }, Ya = {
1954
1957
  key: 1,
1955
1958
  class: "admin-resource-form__loading"
1956
- }, Ya = {
1959
+ }, Ja = {
1957
1960
  key: 3,
1958
1961
  class: "admin-resource-form__savebar"
1959
- }, lt = /* @__PURE__ */ L({
1962
+ }, lt = /* @__PURE__ */ P({
1960
1963
  __name: "ResourceFormPage",
1961
1964
  props: {
1962
1965
  slug: {},
@@ -1964,8 +1967,8 @@ const xt = /* @__PURE__ */ L({
1964
1967
  indexRouteName: { default: "admin.home" }
1965
1968
  },
1966
1969
  setup(e) {
1967
- const t = e, n = wt(), s = oe(), a = ie(), l = ht(n.state, n.errors);
1968
- ee(
1970
+ const t = e, n = $t(), s = oe(), a = ie(), l = ht(n.state, n.errors);
1971
+ Q(
1969
1972
  () => n.errors,
1970
1973
  (y) => {
1971
1974
  l.setErrors({ ...y });
@@ -1973,11 +1976,11 @@ const xt = /* @__PURE__ */ L({
1973
1976
  );
1974
1977
  const i = v(() => s.getResource(t.slug)), u = v(
1975
1978
  () => i.value?.fields ?? []
1976
- ), f = v(() => n.isCreate ? `Создать: ${i.value?.label ?? t.slug}` : `${i.value?.label ?? t.slug}: запись #${t.id}`), g = v(() => {
1979
+ ), f = v(() => n.isCreate ? `Создать: ${i.value?.label ?? t.slug}` : `${i.value?.label ?? t.slug}: запись #${t.id}`), p = v(() => {
1977
1980
  const y = n.state.status;
1978
1981
  return typeof y == "string" ? y : null;
1979
1982
  }), _ = v(() => {
1980
- switch (g.value) {
1983
+ switch (p.value) {
1981
1984
  case "published":
1982
1985
  return "success";
1983
1986
  case "review":
@@ -1989,14 +1992,14 @@ const xt = /* @__PURE__ */ L({
1989
1992
  return "default";
1990
1993
  }
1991
1994
  });
1992
- Fe(async () => {
1995
+ Re(async () => {
1993
1996
  s.manifest === null && await s.load().catch(() => {
1994
1997
  }), t.id !== null && t.id !== void 0 ? await n.load(t.slug, t.id, "edit").catch(() => {
1995
1998
  }) : n.prepareCreate(t.slug);
1996
- }), ee(
1999
+ }), Q(
1997
2000
  () => [t.slug, t.id],
1998
- async ([y, h]) => {
1999
- h != null ? await n.load(y, h, "edit").catch(() => {
2001
+ async ([y, g]) => {
2002
+ g != null ? await n.load(y, g, "edit").catch(() => {
2000
2003
  }) : n.prepareCreate(y);
2001
2004
  }
2002
2005
  );
@@ -2011,41 +2014,41 @@ const xt = /* @__PURE__ */ L({
2011
2014
  } catch {
2012
2015
  }
2013
2016
  }
2014
- async function S() {
2017
+ async function x() {
2015
2018
  confirm("Удалить запись?") && (await n.destroy().catch(() => {
2016
2019
  }), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
2017
2020
  }));
2018
2021
  }
2019
- function A() {
2022
+ function C() {
2020
2023
  n.isDirty && !confirm("Несохранённые изменения будут потеряны. Продолжить?") || a.push({ name: t.indexRouteName }).catch(() => {
2021
2024
  });
2022
2025
  }
2023
- return (y, h) => (o(), c("section", Wa, [
2026
+ return (y, g) => (o(), c("section", ja, [
2024
2027
  d("header", Ka, [
2025
- d("div", ja, [
2028
+ d("div", Ga, [
2026
2029
  d("a", {
2027
2030
  class: "admin-resource-form__back",
2028
- onClick: A
2031
+ onClick: C
2029
2032
  }, "← Назад"),
2030
- d("h1", Ga, p(f.value), 1),
2031
- g.value ? (o(), b(r(je), {
2033
+ d("h1", Ha, h(f.value), 1),
2034
+ p.value ? (o(), b(r(Ke), {
2032
2035
  key: 0,
2033
2036
  variant: _.value
2034
2037
  }, {
2035
2038
  default: m(() => [
2036
- x(p(g.value), 1)
2039
+ S(h(p.value), 1)
2037
2040
  ]),
2038
2041
  _: 1
2039
- }, 8, ["variant"])) : R("", !0)
2042
+ }, 8, ["variant"])) : T("", !0)
2040
2043
  ]),
2041
- d("div", Ha, [
2044
+ d("div", Xa, [
2042
2045
  $(r(z), {
2043
2046
  variant: "ghost",
2044
2047
  disabled: r(n).saving || r(n).deleting,
2045
- onClick: A
2048
+ onClick: C
2046
2049
  }, {
2047
- default: m(() => [...h[0] || (h[0] = [
2048
- x(" Отмена ", -1)
2050
+ default: m(() => [...g[0] || (g[0] = [
2051
+ S(" Отмена ", -1)
2049
2052
  ])]),
2050
2053
  _: 1
2051
2054
  }, 8, ["disabled"]),
@@ -2054,13 +2057,13 @@ const xt = /* @__PURE__ */ L({
2054
2057
  variant: "danger",
2055
2058
  disabled: r(n).saving || r(n).deleting,
2056
2059
  loading: r(n).deleting,
2057
- onClick: S
2060
+ onClick: x
2058
2061
  }, {
2059
- default: m(() => [...h[1] || (h[1] = [
2060
- x(" Удалить ", -1)
2062
+ default: m(() => [...g[1] || (g[1] = [
2063
+ S(" Удалить ", -1)
2061
2064
  ])]),
2062
2065
  _: 1
2063
- }, 8, ["disabled", "loading"])) : R("", !0),
2066
+ }, 8, ["disabled", "loading"])) : T("", !0),
2064
2067
  $(r(z), {
2065
2068
  variant: "primary",
2066
2069
  disabled: r(n).saving || r(n).loading,
@@ -2068,7 +2071,7 @@ const xt = /* @__PURE__ */ L({
2068
2071
  onClick: k
2069
2072
  }, {
2070
2073
  default: m(() => [
2071
- x(p(r(n).isCreate ? "Создать" : "Сохранить"), 1)
2074
+ S(h(r(n).isCreate ? "Создать" : "Сохранить"), 1)
2072
2075
  ]),
2073
2076
  _: 1
2074
2077
  }, 8, ["disabled", "loading"])
@@ -2081,37 +2084,37 @@ const xt = /* @__PURE__ */ L({
2081
2084
  role: "alert"
2082
2085
  }, {
2083
2086
  default: m(() => [
2084
- x(p(r(n).error?.message ?? "Не удалось сохранить запись"), 1)
2087
+ S(h(r(n).error?.message ?? "Не удалось сохранить запись"), 1)
2085
2088
  ]),
2086
2089
  _: 1
2087
- })) : R("", !0),
2088
- r(n).loading ? (o(), c("div", Xa, [
2089
- (o(), c(P, null, D(6, (U) => $(r(We), {
2090
- key: U,
2090
+ })) : T("", !0),
2091
+ r(n).loading ? (o(), c("div", Ya, [
2092
+ (o(), c(M, null, D(6, (F) => $(r(We), {
2093
+ key: F,
2091
2094
  height: "40px"
2092
2095
  })), 64))
2093
- ])) : (o(), b(r(j), {
2096
+ ])) : (o(), b(r(K), {
2094
2097
  key: 2,
2095
2098
  padding: "md",
2096
2099
  class: "admin-resource-form__body"
2097
2100
  }, {
2098
2101
  default: m(() => [
2099
- (o(!0), c(P, null, D(u.value, (U, q) => (o(), b(we, {
2102
+ (o(!0), c(M, null, D(u.value, (F, q) => (o(), b(we, {
2100
2103
  key: q,
2101
- node: U
2104
+ node: F
2102
2105
  }, null, 8, ["node"]))), 128))
2103
2106
  ]),
2104
2107
  _: 1
2105
2108
  })),
2106
- r(n).isDirty && !r(n).loading ? (o(), c("div", Ya, [
2107
- h[4] || (h[4] = d("span", { class: "admin-resource-form__savebar-hint" }, " Есть несохранённые изменения ", -1)),
2109
+ r(n).isDirty && !r(n).loading ? (o(), c("div", Ja, [
2110
+ g[4] || (g[4] = d("span", { class: "admin-resource-form__savebar-hint" }, " Есть несохранённые изменения ", -1)),
2108
2111
  $(r(z), {
2109
2112
  variant: "ghost",
2110
2113
  size: "sm",
2111
- onClick: A
2114
+ onClick: C
2112
2115
  }, {
2113
- default: m(() => [...h[2] || (h[2] = [
2114
- x("Отмена", -1)
2116
+ default: m(() => [...g[2] || (g[2] = [
2117
+ S("Отмена", -1)
2115
2118
  ])]),
2116
2119
  _: 1
2117
2120
  }),
@@ -2122,15 +2125,15 @@ const xt = /* @__PURE__ */ L({
2122
2125
  disabled: r(n).saving,
2123
2126
  onClick: k
2124
2127
  }, {
2125
- default: m(() => [...h[3] || (h[3] = [
2126
- x(" Сохранить ", -1)
2128
+ default: m(() => [...g[3] || (g[3] = [
2129
+ S(" Сохранить ", -1)
2127
2130
  ])]),
2128
2131
  _: 1
2129
2132
  }, 8, ["loading", "disabled"])
2130
- ])) : R("", !0)
2133
+ ])) : T("", !0)
2131
2134
  ]));
2132
2135
  }
2133
- }), ve = Me(), so = ve.register, st = ve.get, io = ve.has, oo = ve.list, ro = ve.clear, Ja = ve.registerBundle, Qa = /* @__PURE__ */ L({
2136
+ }), ve = Me(), io = ve.register, st = ve.get, oo = ve.has, ro = ve.list, uo = ve.clear, Qa = ve.registerBundle, Za = /* @__PURE__ */ P({
2134
2137
  __name: "UnknownEntry",
2135
2138
  props: {
2136
2139
  type: {},
@@ -2139,41 +2142,41 @@ const xt = /* @__PURE__ */ L({
2139
2142
  setup(e) {
2140
2143
  return (t, n) => (o(), b(r(te), { variant: "warning" }, {
2141
2144
  title: m(() => [
2142
- x("Неизвестный тип infolist-entry: " + p(e.type), 1)
2145
+ S("Неизвестный тип infolist-entry: " + h(e.type), 1)
2143
2146
  ]),
2144
2147
  default: m(() => [
2145
- n[0] || (n[0] = x(" Зарегистрируйте через ", -1)),
2146
- d("code", null, "registerInfolistEntry('" + p(e.type) + "', YourComponent)", 1),
2147
- n[1] || (n[1] = x(". ", -1))
2148
+ n[0] || (n[0] = S(" Зарегистрируйте через ", -1)),
2149
+ d("code", null, "registerInfolistEntry('" + h(e.type) + "', YourComponent)", 1),
2150
+ n[1] || (n[1] = S(". ", -1))
2148
2151
  ]),
2149
2152
  _: 1
2150
2153
  }));
2151
2154
  }
2152
- }), Za = {
2155
+ }), el = {
2153
2156
  key: 1,
2154
2157
  class: "admin-infolist-rows"
2155
- }, el = {
2158
+ }, tl = {
2156
2159
  key: 2,
2157
2160
  class: "admin-infolist-cols"
2158
- }, tl = {
2161
+ }, nl = {
2159
2162
  key: 3,
2160
2163
  class: "admin-infolist-section"
2161
- }, nl = {
2164
+ }, al = {
2162
2165
  key: 0,
2163
2166
  class: "admin-infolist-section__hd"
2164
- }, al = {
2167
+ }, ll = {
2165
2168
  key: 0,
2166
2169
  class: "admin-infolist-section__title"
2167
- }, ll = {
2170
+ }, sl = {
2168
2171
  key: 1,
2169
2172
  class: "admin-infolist-section__description"
2170
- }, sl = { class: "admin-infolist-section__body" }, il = {
2173
+ }, il = { class: "admin-infolist-section__body" }, ol = {
2171
2174
  key: 4,
2172
2175
  class: "admin-infolist-tabs"
2173
- }, ol = {
2176
+ }, rl = {
2174
2177
  class: "admin-infolist-tabs__list",
2175
2178
  role: "tablist"
2176
- }, rl = { class: "admin-infolist-tabs__panel" }, ul = /* @__PURE__ */ L({
2179
+ }, ul = { class: "admin-infolist-tabs__panel" }, dl = /* @__PURE__ */ P({
2177
2180
  __name: "InfolistRenderer",
2178
2181
  props: {
2179
2182
  node: {}
@@ -2191,8 +2194,8 @@ const xt = /* @__PURE__ */ L({
2191
2194
  const _ = st(t.node.type);
2192
2195
  return _ ? { kind: "entry", component: _ } : { kind: "unknown" };
2193
2196
  }), a = v(() => {
2194
- const { type: _, kind: k, items: S, ...A } = t.node;
2195
- return A;
2197
+ const { type: _, kind: k, items: x, ...C } = t.node;
2198
+ return C;
2196
2199
  }), l = v(
2197
2200
  () => t.node.items ?? []
2198
2201
  ), i = v(() => t.node.title ?? null), u = v(
@@ -2200,52 +2203,52 @@ const xt = /* @__PURE__ */ L({
2200
2203
  ), f = v(() => {
2201
2204
  const _ = t.node.active;
2202
2205
  return typeof _ == "number" ? _ : 0;
2203
- }), g = v(() => t.node.items ?? []);
2206
+ }), p = v(() => t.node.items ?? []);
2204
2207
  return (_, k) => {
2205
- const S = rt("InfolistRenderer", !0);
2206
- return s.value.kind === "entry" ? (o(), b(se(s.value.component), Ue(Re({ key: 0 }, a.value)), null, 16)) : s.value.kind === "layout" && s.value.layoutType === "rows" ? (o(), c("div", Za, [
2207
- (o(!0), c(P, null, D(l.value, (A, y) => (o(), b(S, {
2208
+ const x = rt("InfolistRenderer", !0);
2209
+ return s.value.kind === "entry" ? (o(), b(se(s.value.component), Fe(Ue({ key: 0 }, a.value)), null, 16)) : s.value.kind === "layout" && s.value.layoutType === "rows" ? (o(), c("div", el, [
2210
+ (o(!0), c(M, null, D(l.value, (C, y) => (o(), b(x, {
2208
2211
  key: y,
2209
- node: A
2212
+ node: C
2210
2213
  }, null, 8, ["node"]))), 128))
2211
- ])) : s.value.kind === "layout" && s.value.layoutType === "columns" ? (o(), c("div", el, [
2212
- (o(!0), c(P, null, D(l.value, (A, y) => (o(), c("div", {
2214
+ ])) : s.value.kind === "layout" && s.value.layoutType === "columns" ? (o(), c("div", tl, [
2215
+ (o(!0), c(M, null, D(l.value, (C, y) => (o(), c("div", {
2213
2216
  key: y,
2214
2217
  class: "admin-infolist-cols__item",
2215
2218
  style: Te({
2216
- gridColumn: `span ${typeof A.span == "number" ? A.span : Math.max(1, Math.floor(12 / l.value.length))}`
2219
+ gridColumn: `span ${typeof C.span == "number" ? C.span : Math.max(1, Math.floor(12 / l.value.length))}`
2217
2220
  })
2218
2221
  }, [
2219
- $(S, { node: A }, null, 8, ["node"])
2222
+ $(x, { node: C }, null, 8, ["node"])
2220
2223
  ], 4))), 128))
2221
- ])) : s.value.kind === "layout" && (s.value.layoutType === "section" || s.value.layoutType === "block") ? (o(), c("section", tl, [
2222
- i.value || u.value ? (o(), c("header", nl, [
2223
- i.value ? (o(), c("h3", al, p(i.value), 1)) : R("", !0),
2224
- u.value ? (o(), c("p", ll, p(u.value), 1)) : R("", !0)
2225
- ])) : R("", !0),
2226
- d("div", sl, [
2227
- (o(!0), c(P, null, D(l.value, (A, y) => (o(), b(S, {
2224
+ ])) : s.value.kind === "layout" && (s.value.layoutType === "section" || s.value.layoutType === "block") ? (o(), c("section", nl, [
2225
+ i.value || u.value ? (o(), c("header", al, [
2226
+ i.value ? (o(), c("h3", ll, h(i.value), 1)) : T("", !0),
2227
+ u.value ? (o(), c("p", sl, h(u.value), 1)) : T("", !0)
2228
+ ])) : T("", !0),
2229
+ d("div", il, [
2230
+ (o(!0), c(M, null, D(l.value, (C, y) => (o(), b(x, {
2228
2231
  key: y,
2229
- node: A
2232
+ node: C
2230
2233
  }, null, 8, ["node"]))), 128))
2231
2234
  ])
2232
- ])) : s.value.kind === "layout" && s.value.layoutType === "tabs" ? (o(), c("div", il, [
2233
- d("ul", ol, [
2234
- (o(!0), c(P, null, D(g.value, (A, y) => (o(), c("li", {
2235
- key: A.key ?? y,
2236
- class: Z([
2235
+ ])) : s.value.kind === "layout" && s.value.layoutType === "tabs" ? (o(), c("div", ol, [
2236
+ d("ul", rl, [
2237
+ (o(!0), c(M, null, D(p.value, (C, y) => (o(), c("li", {
2238
+ key: C.key ?? y,
2239
+ class: ee([
2237
2240
  "admin-infolist-tabs__tab",
2238
2241
  { "admin-infolist-tabs__tab--active": y === f.value }
2239
2242
  ])
2240
- }, p(A.label), 3))), 128))
2243
+ }, h(C.label), 3))), 128))
2241
2244
  ]),
2242
- d("div", rl, [
2243
- (o(!0), c(P, null, D(g.value[f.value]?.items ?? [], (A, y) => (o(), b(S, {
2245
+ d("div", ul, [
2246
+ (o(!0), c(M, null, D(p.value[f.value]?.items ?? [], (C, y) => (o(), b(x, {
2244
2247
  key: y,
2245
- node: A
2248
+ node: C
2246
2249
  }, null, 8, ["node"]))), 128))
2247
2250
  ])
2248
- ])) : (o(), b(Qa, {
2251
+ ])) : (o(), b(Za, {
2249
2252
  key: 5,
2250
2253
  type: e.node.type,
2251
2254
  name: e.node.name
@@ -2253,10 +2256,10 @@ const xt = /* @__PURE__ */ L({
2253
2256
  };
2254
2257
  }
2255
2258
  }), Je = /* @__PURE__ */ Symbol("admin.infolist-record");
2256
- function dl(e) {
2257
- Mt(Je, e);
2259
+ function cl(e) {
2260
+ Nt(Je, e);
2258
2261
  }
2259
- function uo() {
2262
+ function co() {
2260
2263
  const e = dt(Je);
2261
2264
  if (!e)
2262
2265
  throw new Error("useRecord() called outside of provideRecord() scope");
@@ -2265,10 +2268,10 @@ function uo() {
2265
2268
  function Ne() {
2266
2269
  return dt(Je, null);
2267
2270
  }
2268
- const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-page__hd" }, fl = { class: "admin-page__title-wrap" }, vl = { class: "admin-page__title" }, pl = { class: "admin-page__actions" }, gl = {
2271
+ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-page__hd" }, vl = { class: "admin-page__title-wrap" }, pl = { class: "admin-page__title" }, gl = { class: "admin-page__actions" }, hl = {
2269
2272
  key: 1,
2270
2273
  class: "admin-resource-view__loading"
2271
- }, hl = /* @__PURE__ */ L({
2274
+ }, _l = /* @__PURE__ */ P({
2272
2275
  __name: "ResourceViewPage",
2273
2276
  props: {
2274
2277
  slug: {},
@@ -2277,18 +2280,18 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2277
2280
  indexRouteName: { default: "admin.home" }
2278
2281
  },
2279
2282
  setup(e) {
2280
- const t = e, n = wt(), s = oe(), a = ie();
2281
- dl(n.state);
2283
+ const t = e, n = $t(), s = oe(), a = ie();
2284
+ cl(n.state);
2282
2285
  const l = v(() => s.getResource(t.slug)), i = v(
2283
2286
  () => l.value?.fields ?? []
2284
2287
  ), u = v(
2285
2288
  () => `${l.value?.label ?? t.slug}: запись #${t.id}`
2286
2289
  );
2287
- Fe(async () => {
2290
+ Re(async () => {
2288
2291
  s.manifest === null && await s.load().catch(() => {
2289
2292
  }), await n.load(t.slug, t.id, "view").catch(() => {
2290
2293
  });
2291
- }), ee(
2294
+ }), Q(
2292
2295
  () => [t.slug, t.id],
2293
2296
  async ([_, k]) => {
2294
2297
  await n.load(_, k, "view").catch(() => {
@@ -2304,23 +2307,23 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2304
2307
  a.push({ name: t.editRouteName, params: { id: t.id } }).catch(() => {
2305
2308
  });
2306
2309
  }
2307
- async function g() {
2310
+ async function p() {
2308
2311
  confirm("Удалить запись?") && (await n.destroy().catch(() => {
2309
2312
  }), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
2310
2313
  }));
2311
2314
  }
2312
- return (_, k) => (o(), c("section", cl, [
2313
- d("header", ml, [
2314
- d("div", fl, [
2315
- d("h1", vl, p(u.value), 1)
2315
+ return (_, k) => (o(), c("section", ml, [
2316
+ d("header", fl, [
2317
+ d("div", vl, [
2318
+ d("h1", pl, h(u.value), 1)
2316
2319
  ]),
2317
- d("div", pl, [
2320
+ d("div", gl, [
2318
2321
  $(r(z), {
2319
2322
  variant: "ghost",
2320
2323
  onClick: f
2321
2324
  }, {
2322
2325
  default: m(() => [...k[0] || (k[0] = [
2323
- x("Редактировать", -1)
2326
+ S("Редактировать", -1)
2324
2327
  ])]),
2325
2328
  _: 1
2326
2329
  }),
@@ -2328,10 +2331,10 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2328
2331
  variant: "danger",
2329
2332
  loading: r(n).deleting,
2330
2333
  disabled: r(n).deleting,
2331
- onClick: g
2334
+ onClick: p
2332
2335
  }, {
2333
2336
  default: m(() => [...k[1] || (k[1] = [
2334
- x(" Удалить ", -1)
2337
+ S(" Удалить ", -1)
2335
2338
  ])]),
2336
2339
  _: 1
2337
2340
  }, 8, ["loading", "disabled"])
@@ -2344,40 +2347,40 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2344
2347
  role: "alert"
2345
2348
  }, {
2346
2349
  default: m(() => [
2347
- x(p(r(n).error?.message ?? "Не удалось загрузить запись"), 1)
2350
+ S(h(r(n).error?.message ?? "Не удалось загрузить запись"), 1)
2348
2351
  ]),
2349
2352
  _: 1
2350
- })) : R("", !0),
2351
- r(n).loading ? (o(), c("div", gl, [
2352
- (o(), c(P, null, D(8, (S) => $(r(We), {
2353
- key: S,
2353
+ })) : T("", !0),
2354
+ r(n).loading ? (o(), c("div", hl, [
2355
+ (o(), c(M, null, D(8, (x) => $(r(We), {
2356
+ key: x,
2354
2357
  height: "24px"
2355
2358
  })), 64))
2356
- ])) : (o(), b(r(j), {
2359
+ ])) : (o(), b(r(K), {
2357
2360
  key: 2,
2358
2361
  padding: "md",
2359
2362
  class: "admin-resource-view__body"
2360
2363
  }, {
2361
2364
  default: m(() => [
2362
- (o(!0), c(P, null, D(i.value, (S, A) => (o(), b(ul, {
2363
- key: A,
2364
- node: S
2365
+ (o(!0), c(M, null, D(i.value, (x, C) => (o(), b(dl, {
2366
+ key: C,
2367
+ node: x
2365
2368
  }, null, 8, ["node"]))), 128))
2366
2369
  ]),
2367
2370
  _: 1
2368
2371
  }))
2369
2372
  ]));
2370
2373
  }
2371
- }), _l = { class: "admin-page admin-profile" }, yl = { class: "admin-page__hd" }, bl = { class: "admin-page__title-wrap" }, kl = { class: "admin-page__title" }, wl = { class: "admin-page__count" }, $l = { class: "admin-profile__layout" }, xl = {
2374
+ }), yl = { class: "admin-page admin-profile" }, bl = { class: "admin-page__hd" }, kl = { class: "admin-page__title-wrap" }, wl = { class: "admin-page__title" }, $l = { class: "admin-page__count" }, xl = { class: "admin-profile__layout" }, Sl = {
2372
2375
  class: "admin-profile__nav",
2373
2376
  "aria-label": "Profile sections"
2374
- }, Sl = ["onClick"], Cl = ["data-icon"], Al = { class: "admin-profile__content" }, El = { class: "admin-profile__hero" }, Fl = { class: "admin-profile__hero-text" }, Ul = { class: "admin-profile__hero-name" }, Rl = { class: "admin-profile__hero-meta" }, Tl = { class: "admin-profile__form" }, Ll = { class: "admin-profile__card-ft" }, Pl = { class: "admin-profile__card-hd" }, Ml = {
2377
+ }, Cl = ["onClick"], Al = ["data-icon"], El = { class: "admin-profile__content" }, Rl = { class: "admin-profile__hero" }, Fl = { class: "admin-profile__hero-text" }, Ul = { class: "admin-profile__hero-name" }, Tl = { class: "admin-profile__hero-meta" }, Ll = { class: "admin-profile__form" }, Pl = { class: "admin-profile__card-ft" }, Ml = { class: "admin-profile__card-hd" }, Nl = {
2375
2378
  key: 0,
2376
2379
  class: "admin-profile__hint"
2377
- }, Nl = {
2380
+ }, Bl = {
2378
2381
  key: 1,
2379
2382
  class: "admin-profile__hint"
2380
- }, Bl = { class: "admin-profile__card-ft" }, Il = { class: "admin-profile__hint" }, Dl = /* @__PURE__ */ L({
2383
+ }, Il = { class: "admin-profile__card-ft" }, Dl = { class: "admin-profile__hint" }, Vl = /* @__PURE__ */ P({
2381
2384
  __name: "ProfilePage",
2382
2385
  props: {
2383
2386
  title: { default: "Profile" },
@@ -2386,180 +2389,193 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2386
2389
  },
2387
2390
  emits: ["update:section", "avatar-replace", "two-factor-disable", "two-factor-regenerate", "save"],
2388
2391
  setup(e, { emit: t }) {
2389
- const n = e, s = t, a = Q(), l = Ge(), i = He(), u = [
2392
+ const n = e, s = t, a = Z(), l = Ge(), i = He(), u = [
2390
2393
  { id: "general", label: "Основное", icon: "user" },
2391
2394
  { id: "security", label: "Безопасность", icon: "shield" },
2392
2395
  { id: "tokens", label: "API токены", icon: "key" },
2393
2396
  { id: "sessions", label: "Сессии", icon: "monitor" }
2394
- ], f = F(n.section);
2395
- function g(M) {
2396
- f.value = M, s("update:section", M);
2397
+ ], f = R(n.section);
2398
+ function p(L) {
2399
+ f.value = L, s("update:section", L);
2397
2400
  }
2398
- const _ = F({
2401
+ const _ = R({
2399
2402
  name: a.user?.name ?? "",
2400
2403
  email: a.user?.email ?? "",
2401
2404
  locale: i.current,
2402
2405
  theme: l.current
2403
2406
  }), k = v(
2404
- () => i.available.map((M) => ({ value: M, label: M.toUpperCase() }))
2405
- ), S = v(
2406
- () => l.available.map((M) => ({ value: M, label: M === "dark" ? "Тёмная" : M === "light" ? "Светлая" : M }))
2407
+ () => i.available.map((L) => ({ value: L, label: L.toUpperCase() }))
2408
+ ), x = v(
2409
+ () => l.available.map((L) => ({ value: L, label: L === "dark" ? "Тёмная" : L === "light" ? "Светлая" : L }))
2410
+ );
2411
+ Q(
2412
+ () => _.value.locale,
2413
+ (L, U) => {
2414
+ L === U || !L || i.setLocale(L).catch(() => {
2415
+ });
2416
+ }
2417
+ ), Q(
2418
+ () => _.value.theme,
2419
+ (L, U) => {
2420
+ L === U || !L || l.setTheme(L).catch(() => {
2421
+ });
2422
+ }
2407
2423
  );
2408
- function A() {
2424
+ function C() {
2409
2425
  s("save", { ..._.value });
2410
2426
  }
2411
2427
  function y() {
2412
2428
  s("avatar-replace");
2413
2429
  }
2414
- function h() {
2430
+ function g() {
2415
2431
  s("two-factor-disable");
2416
2432
  }
2417
- function U() {
2433
+ function F() {
2418
2434
  s("two-factor-regenerate");
2419
2435
  }
2420
2436
  const q = v(() => !!a.user?.twoFactorEnabled);
2421
- return (M, T) => (o(), c("section", _l, [
2422
- d("header", yl, [
2423
- d("div", bl, [
2424
- d("h1", kl, p(e.title), 1),
2425
- d("div", wl, p(e.subtitle), 1)
2437
+ return (L, U) => (o(), c("section", yl, [
2438
+ d("header", bl, [
2439
+ d("div", kl, [
2440
+ d("h1", wl, h(e.title), 1),
2441
+ d("div", $l, h(e.subtitle), 1)
2426
2442
  ])
2427
2443
  ]),
2428
- d("div", $l, [
2429
- d("nav", xl, [
2430
- (o(), c(P, null, D(u, (w) => d("button", {
2444
+ d("div", xl, [
2445
+ d("nav", Sl, [
2446
+ (o(), c(M, null, D(u, (w) => d("button", {
2431
2447
  key: w.id,
2432
2448
  type: "button",
2433
- class: Z([
2449
+ class: ee([
2434
2450
  "admin-profile__nav-item",
2435
2451
  { "admin-profile__nav-item--active": f.value === w.id }
2436
2452
  ]),
2437
- onClick: (V) => g(w.id)
2453
+ onClick: (V) => p(w.id)
2438
2454
  }, [
2439
2455
  d("span", {
2440
2456
  class: "admin-profile__nav-icon",
2441
2457
  "data-icon": w.icon
2442
- }, null, 8, Cl),
2443
- d("span", null, p(w.label), 1)
2444
- ], 10, Sl)), 64))
2458
+ }, null, 8, Al),
2459
+ d("span", null, h(w.label), 1)
2460
+ ], 10, Cl)), 64))
2445
2461
  ]),
2446
- d("div", Al, [
2447
- f.value === "general" ? (o(), b(r(j), {
2462
+ d("div", El, [
2463
+ f.value === "general" ? (o(), b(r(K), {
2448
2464
  key: 0,
2449
2465
  padding: "md"
2450
2466
  }, {
2451
2467
  default: m(() => [
2452
- T[7] || (T[7] = d("header", { class: "admin-profile__card-hd" }, [
2468
+ U[7] || (U[7] = d("header", { class: "admin-profile__card-hd" }, [
2453
2469
  d("h3", { class: "admin-profile__card-title" }, "Профиль")
2454
2470
  ], -1)),
2455
- d("div", El, [
2471
+ d("div", Rl, [
2456
2472
  $(r(ft), {
2457
2473
  src: r(a).user?.avatar ?? void 0,
2458
2474
  name: r(a).user?.name ?? "?",
2459
2475
  size: "lg"
2460
2476
  }, null, 8, ["src", "name"]),
2461
2477
  d("div", Fl, [
2462
- d("div", Ul, p(r(a).user?.name ?? "—"), 1),
2463
- d("div", Rl, p(r(a).user?.email ?? "—"), 1)
2478
+ d("div", Ul, h(r(a).user?.name ?? "—"), 1),
2479
+ d("div", Tl, h(r(a).user?.email ?? "—"), 1)
2464
2480
  ]),
2465
- T[5] || (T[5] = d("div", { style: { flex: "1" } }, null, -1)),
2481
+ U[5] || (U[5] = d("div", { style: { flex: "1" } }, null, -1)),
2466
2482
  $(r(z), {
2467
2483
  variant: "ghost",
2468
2484
  size: "sm",
2469
2485
  onClick: y
2470
2486
  }, {
2471
- default: m(() => [...T[4] || (T[4] = [
2472
- x(" Заменить ", -1)
2487
+ default: m(() => [...U[4] || (U[4] = [
2488
+ S(" Заменить ", -1)
2473
2489
  ])]),
2474
2490
  _: 1
2475
2491
  })
2476
2492
  ]),
2477
- d("div", Tl, [
2493
+ d("div", Ll, [
2478
2494
  $(r(de), {
2479
2495
  modelValue: _.value.name,
2480
- "onUpdate:modelValue": T[0] || (T[0] = (w) => _.value.name = w),
2496
+ "onUpdate:modelValue": U[0] || (U[0] = (w) => _.value.name = w),
2481
2497
  label: "Имя",
2482
2498
  name: "name"
2483
2499
  }, null, 8, ["modelValue"]),
2484
2500
  $(r(de), {
2485
2501
  modelValue: _.value.email,
2486
- "onUpdate:modelValue": T[1] || (T[1] = (w) => _.value.email = w),
2502
+ "onUpdate:modelValue": U[1] || (U[1] = (w) => _.value.email = w),
2487
2503
  label: "Email",
2488
2504
  type: "email",
2489
2505
  name: "email"
2490
2506
  }, null, 8, ["modelValue"]),
2491
2507
  $(r(Ee), {
2492
2508
  modelValue: _.value.locale,
2493
- "onUpdate:modelValue": T[2] || (T[2] = (w) => _.value.locale = w),
2509
+ "onUpdate:modelValue": U[2] || (U[2] = (w) => _.value.locale = w),
2494
2510
  options: k.value,
2495
2511
  label: "Язык"
2496
2512
  }, null, 8, ["modelValue", "options"]),
2497
2513
  $(r(Ee), {
2498
2514
  modelValue: _.value.theme,
2499
- "onUpdate:modelValue": T[3] || (T[3] = (w) => _.value.theme = w),
2500
- options: S.value,
2515
+ "onUpdate:modelValue": U[3] || (U[3] = (w) => _.value.theme = w),
2516
+ options: x.value,
2501
2517
  label: "Тема"
2502
2518
  }, null, 8, ["modelValue", "options"])
2503
2519
  ]),
2504
- d("footer", Ll, [
2520
+ d("footer", Pl, [
2505
2521
  $(r(z), {
2506
2522
  variant: "primary",
2507
- onClick: A
2523
+ onClick: C
2508
2524
  }, {
2509
- default: m(() => [...T[6] || (T[6] = [
2510
- x("Сохранить", -1)
2525
+ default: m(() => [...U[6] || (U[6] = [
2526
+ S("Сохранить", -1)
2511
2527
  ])]),
2512
2528
  _: 1
2513
2529
  })
2514
2530
  ])
2515
2531
  ]),
2516
2532
  _: 1
2517
- })) : f.value === "security" ? (o(), b(r(j), {
2533
+ })) : f.value === "security" ? (o(), b(r(K), {
2518
2534
  key: 1,
2519
2535
  padding: "md"
2520
2536
  }, {
2521
2537
  default: m(() => [
2522
- d("header", Pl, [
2523
- T[8] || (T[8] = d("h3", { class: "admin-profile__card-title" }, "Двухфакторная аутентификация", -1)),
2524
- $(r(je), {
2538
+ d("header", Ml, [
2539
+ U[8] || (U[8] = d("h3", { class: "admin-profile__card-title" }, "Двухфакторная аутентификация", -1)),
2540
+ $(r(Ke), {
2525
2541
  variant: q.value ? "success" : "default"
2526
2542
  }, {
2527
2543
  default: m(() => [
2528
- x(p(q.value ? "Включена" : "Отключена"), 1)
2544
+ S(h(q.value ? "Включена" : "Отключена"), 1)
2529
2545
  ]),
2530
2546
  _: 1
2531
2547
  }, 8, ["variant"])
2532
2548
  ]),
2533
- q.value ? (o(), c("p", Ml, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (o(), c("p", Nl, " Включите 2FA для дополнительной защиты аккаунта. ")),
2534
- d("footer", Bl, [
2535
- q.value ? (o(), c(P, { key: 0 }, [
2549
+ q.value ? (o(), c("p", Nl, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (o(), c("p", Bl, " Включите 2FA для дополнительной защиты аккаунта. ")),
2550
+ d("footer", Il, [
2551
+ q.value ? (o(), c(M, { key: 0 }, [
2536
2552
  $(r(z), {
2537
2553
  variant: "ghost",
2538
2554
  size: "sm",
2539
- onClick: U
2555
+ onClick: F
2540
2556
  }, {
2541
- default: m(() => [...T[9] || (T[9] = [
2542
- x(" Перегенерировать коды ", -1)
2557
+ default: m(() => [...U[9] || (U[9] = [
2558
+ S(" Перегенерировать коды ", -1)
2543
2559
  ])]),
2544
2560
  _: 1
2545
2561
  }),
2546
2562
  $(r(z), {
2547
2563
  variant: "danger",
2548
2564
  size: "sm",
2549
- onClick: h
2565
+ onClick: g
2550
2566
  }, {
2551
- default: m(() => [...T[10] || (T[10] = [
2552
- x(" Отключить 2FA ", -1)
2567
+ default: m(() => [...U[10] || (U[10] = [
2568
+ S(" Отключить 2FA ", -1)
2553
2569
  ])]),
2554
2570
  _: 1
2555
2571
  })
2556
- ], 64)) : Y(M.$slots, "enable-2fa", { key: 1 }, () => [
2572
+ ], 64)) : Y(L.$slots, "enable-2fa", { key: 1 }, () => [
2557
2573
  $(r(z), {
2558
2574
  variant: "primary",
2559
2575
  disabled: ""
2560
2576
  }, {
2561
- default: m(() => [...T[11] || (T[11] = [
2562
- x(" Включить 2FA (host customize) ", -1)
2577
+ default: m(() => [...U[11] || (U[11] = [
2578
+ S(" Включить 2FA (host customize) ", -1)
2563
2579
  ])]),
2564
2580
  _: 1
2565
2581
  })
@@ -2567,13 +2583,13 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2567
2583
  ])
2568
2584
  ]),
2569
2585
  _: 3
2570
- })) : Y(M.$slots, f.value, {
2586
+ })) : Y(L.$slots, f.value, {
2571
2587
  key: 2,
2572
2588
  section: f.value
2573
2589
  }, () => [
2574
- $(r(j), { padding: "md" }, {
2590
+ $(r(K), { padding: "md" }, {
2575
2591
  default: m(() => [
2576
- d("p", Il, " Section «" + p(f.value) + "» не реализована библиотекой — host-проект подключает её через slot " + p(f.value) + ". ", 1)
2592
+ d("p", Dl, " Section «" + h(f.value) + "» не реализована библиотекой — host-проект подключает её через slot " + h(f.value) + ". ", 1)
2577
2593
  ]),
2578
2594
  _: 1
2579
2595
  })
@@ -2582,7 +2598,7 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2582
2598
  ])
2583
2599
  ]));
2584
2600
  }
2585
- }), pe = Me(), co = pe.register, Vl = pe.get, mo = pe.has, fo = pe.list, vo = pe.clear, zl = pe.registerBundle, ql = /* @__PURE__ */ L({
2601
+ }), pe = Me(), mo = pe.register, zl = pe.get, fo = pe.has, vo = pe.list, po = pe.clear, ql = pe.registerBundle, Ol = /* @__PURE__ */ P({
2586
2602
  __name: "UnknownWidget",
2587
2603
  props: {
2588
2604
  type: {}
@@ -2590,35 +2606,35 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2590
2606
  setup(e) {
2591
2607
  return (t, n) => (o(), b(r(te), { variant: "warning" }, {
2592
2608
  title: m(() => [
2593
- x("Неизвестный widget-тип: " + p(e.type), 1)
2609
+ S("Неизвестный widget-тип: " + h(e.type), 1)
2594
2610
  ]),
2595
2611
  default: m(() => [
2596
- n[0] || (n[0] = x(" Зарегистрируйте через ", -1)),
2597
- d("code", null, "registerWidget('" + p(e.type) + "', YourComponent)", 1),
2598
- n[1] || (n[1] = x(". ", -1))
2612
+ n[0] || (n[0] = S(" Зарегистрируйте через ", -1)),
2613
+ d("code", null, "registerWidget('" + h(e.type) + "', YourComponent)", 1),
2614
+ n[1] || (n[1] = S(". ", -1))
2599
2615
  ]),
2600
2616
  _: 1
2601
2617
  }));
2602
2618
  }
2603
- }), Ol = /* @__PURE__ */ L({
2619
+ }), Wl = /* @__PURE__ */ P({
2604
2620
  __name: "WidgetRenderer",
2605
2621
  props: {
2606
2622
  node: {}
2607
2623
  },
2608
2624
  setup(e) {
2609
- const t = e, n = v(() => Vl(t.node.type)), s = v(() => {
2625
+ const t = e, n = v(() => zl(t.node.type)), s = v(() => {
2610
2626
  const { type: a, span: l, ...i } = t.node;
2611
2627
  return i;
2612
2628
  });
2613
- return (a, l) => n.value ? (o(), b(se(n.value), Ue(Re({ key: 0 }, s.value)), null, 16)) : (o(), b(ql, {
2629
+ return (a, l) => n.value ? (o(), b(se(n.value), Fe(Ue({ key: 0 }, s.value)), null, 16)) : (o(), b(Ol, {
2614
2630
  key: 1,
2615
2631
  type: e.node.type
2616
2632
  }, null, 8, ["type"]));
2617
2633
  }
2618
- }), Wl = { class: "admin-page admin-dashboard" }, Kl = { class: "admin-page__hd" }, jl = { class: "admin-page__title-wrap" }, Gl = { class: "admin-page__title" }, Hl = {
2634
+ }), jl = { class: "admin-page admin-dashboard" }, Kl = { class: "admin-page__hd" }, Gl = { class: "admin-page__title-wrap" }, Hl = { class: "admin-page__title" }, Xl = {
2619
2635
  key: 0,
2620
2636
  class: "admin-page__count"
2621
- }, Xl = { class: "admin-page__actions" }, Yl = { class: "admin-dashboard__grid" }, Jl = /* @__PURE__ */ L({
2637
+ }, Yl = { class: "admin-page__actions" }, Jl = { class: "admin-dashboard__grid" }, Ql = /* @__PURE__ */ P({
2622
2638
  __name: "DashboardPage",
2623
2639
  props: {
2624
2640
  slug: { default: void 0 },
@@ -2627,37 +2643,37 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2627
2643
  subtitle: { default: void 0 }
2628
2644
  },
2629
2645
  setup(e) {
2630
- const t = e, n = oe(), s = v(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((g) => g.slug === t.slug) ?? null), a = v(() => t.widgets ? t.widgets : s.value ? s.value.widgets ?? [] : []), l = v(
2646
+ const t = e, n = oe(), s = v(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((p) => p.slug === t.slug) ?? null), a = v(() => t.widgets ? t.widgets : s.value ? s.value.widgets ?? [] : []), l = v(
2631
2647
  () => t.title ?? s.value?.label ?? "Dashboard"
2632
2648
  ), i = v(
2633
2649
  () => t.subtitle ?? s.value?.description ?? null
2634
2650
  );
2635
2651
  function u(f) {
2636
- const g = typeof f.span == "number" ? f.span : 12;
2637
- return Math.max(1, Math.min(12, g));
2652
+ const p = typeof f.span == "number" ? f.span : 12;
2653
+ return Math.max(1, Math.min(12, p));
2638
2654
  }
2639
- return (f, g) => (o(), c("section", Wl, [
2655
+ return (f, p) => (o(), c("section", jl, [
2640
2656
  d("header", Kl, [
2641
- d("div", jl, [
2642
- d("h1", Gl, p(l.value), 1),
2643
- i.value ? (o(), c("div", Hl, p(i.value), 1)) : R("", !0)
2657
+ d("div", Gl, [
2658
+ d("h1", Hl, h(l.value), 1),
2659
+ i.value ? (o(), c("div", Xl, h(i.value), 1)) : T("", !0)
2644
2660
  ]),
2645
- d("div", Xl, [
2661
+ d("div", Yl, [
2646
2662
  Y(f.$slots, "actions")
2647
2663
  ])
2648
2664
  ]),
2649
- d("div", Yl, [
2650
- (o(!0), c(P, null, D(a.value, (_, k) => (o(), c("div", {
2665
+ d("div", Jl, [
2666
+ (o(!0), c(M, null, D(a.value, (_, k) => (o(), c("div", {
2651
2667
  key: k,
2652
2668
  class: "admin-dashboard__cell",
2653
2669
  style: Te({ gridColumn: `span ${u(_)} / span ${u(_)}` })
2654
2670
  }, [
2655
- $(Ol, { node: _ }, null, 8, ["node"])
2671
+ $(Wl, { node: _ }, null, 8, ["node"])
2656
2672
  ], 4))), 128))
2657
2673
  ])
2658
2674
  ]));
2659
2675
  }
2660
- }), Ql = /* @__PURE__ */ L({
2676
+ }), Zl = /* @__PURE__ */ P({
2661
2677
  __name: "StatWidget",
2662
2678
  props: {
2663
2679
  title: { default: "" },
@@ -2688,16 +2704,16 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2688
2704
  loading: e.loading
2689
2705
  }, null, 8, ["title", "value", "prefix", "suffix", "trend", "precision", "tone", "loading"]));
2690
2706
  }
2691
- }), Zl = {
2707
+ }), es = {
2692
2708
  key: 0,
2693
2709
  class: "admin-widget__hd"
2694
- }, es = {
2710
+ }, ts = {
2695
2711
  key: 0,
2696
2712
  class: "admin-widget__title"
2697
- }, ts = {
2713
+ }, ns = {
2698
2714
  key: 1,
2699
2715
  class: "admin-widget__desc"
2700
- }, ns = ["viewBox", "height", "aria-label"], as = ["x", "y", "width", "height", "fill", "data-label", "data-value"], ls = /* @__PURE__ */ L({
2716
+ }, as = ["viewBox", "height", "aria-label"], ls = ["x", "y", "width", "height", "fill", "data-label", "data-value"], ss = /* @__PURE__ */ P({
2701
2717
  __name: "BarChartWidget",
2702
2718
  props: {
2703
2719
  title: { default: "" },
@@ -2717,15 +2733,15 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2717
2733
  heightPct: i.value / n.value * 100
2718
2734
  }));
2719
2735
  });
2720
- return (a, l) => (o(), b(r(j), {
2736
+ return (a, l) => (o(), b(r(K), {
2721
2737
  padding: "md",
2722
2738
  class: "admin-widget"
2723
2739
  }, {
2724
2740
  default: m(() => [
2725
- e.title || e.description ? (o(), c("header", Zl, [
2726
- e.title ? (o(), c("h3", es, p(e.title), 1)) : R("", !0),
2727
- e.description ? (o(), c("p", ts, p(e.description), 1)) : R("", !0)
2728
- ])) : R("", !0),
2741
+ e.title || e.description ? (o(), c("header", es, [
2742
+ e.title ? (o(), c("h3", ts, h(e.title), 1)) : T("", !0),
2743
+ e.description ? (o(), c("p", ns, h(e.description), 1)) : T("", !0)
2744
+ ])) : T("", !0),
2729
2745
  (o(), c("svg", {
2730
2746
  class: "admin-widget-bar-chart",
2731
2747
  viewBox: `0 0 100 ${e.height}`,
@@ -2735,7 +2751,7 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2735
2751
  role: "img",
2736
2752
  "aria-label": e.title || "Bar chart"
2737
2753
  }, [
2738
- (o(!0), c(P, null, D(s.value, (i, u) => (o(), c("rect", {
2754
+ (o(!0), c(M, null, D(s.value, (i, u) => (o(), c("rect", {
2739
2755
  key: u,
2740
2756
  x: i.x,
2741
2757
  y: e.height - i.heightPct / 100 * e.height,
@@ -2746,17 +2762,17 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2746
2762
  "data-label": i.label,
2747
2763
  "data-value": i.value
2748
2764
  }, [
2749
- d("title", null, p(i.label) + ": " + p(i.value), 1)
2750
- ], 8, as))), 128))
2751
- ], 8, ns))
2765
+ d("title", null, h(i.label) + ": " + h(i.value), 1)
2766
+ ], 8, ls))), 128))
2767
+ ], 8, as))
2752
2768
  ]),
2753
2769
  _: 1
2754
2770
  }));
2755
2771
  }
2756
- }), ss = {
2772
+ }), is = {
2757
2773
  key: 0,
2758
2774
  class: "admin-widget__hd"
2759
- }, is = { class: "admin-widget__title" }, os = { class: "admin-donut-widget__row" }, rs = ["aria-label"], us = ["d", "fill"], ds = { class: "admin-donut-widget__legend" }, cs = { class: "admin-donut-widget__label" }, ms = { class: "admin-donut-widget__value" }, fs = /* @__PURE__ */ L({
2775
+ }, os = { class: "admin-widget__title" }, rs = { class: "admin-donut-widget__row" }, us = ["aria-label"], ds = ["d", "fill"], cs = { class: "admin-donut-widget__legend" }, ms = { class: "admin-donut-widget__label" }, fs = { class: "admin-donut-widget__value" }, vs = /* @__PURE__ */ P({
2760
2776
  __name: "DonutChartWidget",
2761
2777
  props: {
2762
2778
  title: { default: "" },
@@ -2774,52 +2790,52 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2774
2790
  return t.data.map((i, u) => {
2775
2791
  const f = l / s.value * 2 * Math.PI;
2776
2792
  l += i.value;
2777
- const g = l / s.value * 2 * Math.PI, _ = 50, k = 60, S = 60, A = k + _ * Math.cos(f - Math.PI / 2), y = S + _ * Math.sin(f - Math.PI / 2), h = k + _ * Math.cos(g - Math.PI / 2), U = S + _ * Math.sin(g - Math.PI / 2), q = g - f > Math.PI ? 1 : 0, M = t.data.length === 1 ? `M ${k - _} ${S} a ${_} ${_} 0 1 0 ${_ * 2} 0 a ${_} ${_} 0 1 0 ${-_ * 2} 0` : `M ${k} ${S} L ${A} ${y} A ${_} ${_} 0 ${q} 1 ${h} ${U} Z`;
2793
+ const p = l / s.value * 2 * Math.PI, _ = 50, k = 60, x = 60, C = k + _ * Math.cos(f - Math.PI / 2), y = x + _ * Math.sin(f - Math.PI / 2), g = k + _ * Math.cos(p - Math.PI / 2), F = x + _ * Math.sin(p - Math.PI / 2), q = p - f > Math.PI ? 1 : 0, L = t.data.length === 1 ? `M ${k - _} ${x} a ${_} ${_} 0 1 0 ${_ * 2} 0 a ${_} ${_} 0 1 0 ${-_ * 2} 0` : `M ${k} ${x} L ${C} ${y} A ${_} ${_} 0 ${q} 1 ${g} ${F} Z`;
2778
2794
  return {
2779
2795
  ...i,
2780
- path: M,
2796
+ path: L,
2781
2797
  color: i.color ?? n[u % n.length],
2782
2798
  pct: (i.value / s.value * 100).toFixed(1)
2783
2799
  };
2784
2800
  });
2785
2801
  });
2786
- return (l, i) => (o(), b(r(j), {
2802
+ return (l, i) => (o(), b(r(K), {
2787
2803
  padding: "md",
2788
2804
  class: "admin-widget admin-donut-widget"
2789
2805
  }, {
2790
2806
  default: m(() => [
2791
- e.title ? (o(), c("header", ss, [
2792
- d("h3", is, p(e.title), 1)
2793
- ])) : R("", !0),
2794
- d("div", os, [
2807
+ e.title ? (o(), c("header", is, [
2808
+ d("h3", os, h(e.title), 1)
2809
+ ])) : T("", !0),
2810
+ d("div", rs, [
2795
2811
  (o(), c("svg", {
2796
2812
  viewBox: "0 0 120 120",
2797
2813
  class: "admin-donut-widget__svg",
2798
2814
  role: "img",
2799
2815
  "aria-label": e.title
2800
2816
  }, [
2801
- (o(!0), c(P, null, D(a.value, (u, f) => (o(), c("path", {
2817
+ (o(!0), c(M, null, D(a.value, (u, f) => (o(), c("path", {
2802
2818
  key: f,
2803
2819
  d: u.path,
2804
2820
  fill: u.color
2805
2821
  }, [
2806
- d("title", null, p(u.label) + ": " + p(u.value) + " (" + p(u.pct) + "%)", 1)
2807
- ], 8, us))), 128)),
2822
+ d("title", null, h(u.label) + ": " + h(u.value) + " (" + h(u.pct) + "%)", 1)
2823
+ ], 8, ds))), 128)),
2808
2824
  i[0] || (i[0] = d("circle", {
2809
2825
  cx: "60",
2810
2826
  cy: "60",
2811
2827
  r: "30",
2812
2828
  fill: "var(--uid-surface-raised)"
2813
2829
  }, null, -1))
2814
- ], 8, rs)),
2815
- d("ul", ds, [
2816
- (o(!0), c(P, null, D(a.value, (u, f) => (o(), c("li", { key: f }, [
2830
+ ], 8, us)),
2831
+ d("ul", cs, [
2832
+ (o(!0), c(M, null, D(a.value, (u, f) => (o(), c("li", { key: f }, [
2817
2833
  d("span", {
2818
2834
  class: "admin-donut-widget__dot",
2819
2835
  style: Te({ background: u.color })
2820
2836
  }, null, 4),
2821
- d("span", cs, p(u.label), 1),
2822
- d("span", ms, p(u.pct) + "%", 1)
2837
+ d("span", ms, h(u.label), 1),
2838
+ d("span", fs, h(u.pct) + "%", 1)
2823
2839
  ]))), 128))
2824
2840
  ])
2825
2841
  ])
@@ -2827,10 +2843,10 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2827
2843
  _: 1
2828
2844
  }));
2829
2845
  }
2830
- }), vs = {
2846
+ }), ps = {
2831
2847
  key: 0,
2832
2848
  class: "admin-widget__hd"
2833
- }, ps = { class: "admin-widget__title" }, gs = /* @__PURE__ */ L({
2849
+ }, gs = { class: "admin-widget__title" }, hs = /* @__PURE__ */ P({
2834
2850
  __name: "RecentTableWidget",
2835
2851
  props: {
2836
2852
  title: { default: "" },
@@ -2839,15 +2855,15 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2839
2855
  emptyText: { default: "Нет данных" }
2840
2856
  },
2841
2857
  setup(e) {
2842
- return (t, n) => (o(), b(r(j), {
2858
+ return (t, n) => (o(), b(r(K), {
2843
2859
  padding: "md",
2844
2860
  class: "admin-widget"
2845
2861
  }, {
2846
2862
  default: m(() => [
2847
- e.title ? (o(), c("header", vs, [
2848
- d("h3", ps, p(e.title), 1)
2849
- ])) : R("", !0),
2850
- $(r(Ke), {
2863
+ e.title ? (o(), c("header", ps, [
2864
+ d("h3", gs, h(e.title), 1)
2865
+ ])) : T("", !0),
2866
+ $(r(je), {
2851
2867
  columns: e.columns,
2852
2868
  data: e.rows,
2853
2869
  "empty-text": e.emptyText
@@ -2856,10 +2872,10 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2856
2872
  _: 1
2857
2873
  }));
2858
2874
  }
2859
- }), hs = {
2875
+ }), _s = {
2860
2876
  key: 0,
2861
2877
  class: "admin-widget__hd"
2862
- }, _s = { class: "admin-widget__title" }, ys = /* @__PURE__ */ L({
2878
+ }, ys = { class: "admin-widget__title" }, bs = /* @__PURE__ */ P({
2863
2879
  __name: "HeatmapWidget",
2864
2880
  props: {
2865
2881
  title: { default: "" },
@@ -2869,15 +2885,15 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2869
2885
  gap: { default: 2 }
2870
2886
  },
2871
2887
  setup(e) {
2872
- return (t, n) => (o(), b(r(j), {
2888
+ return (t, n) => (o(), b(r(K), {
2873
2889
  padding: "md",
2874
2890
  class: "admin-widget"
2875
2891
  }, {
2876
2892
  default: m(() => [
2877
- e.title ? (o(), c("header", hs, [
2878
- d("h3", _s, p(e.title), 1)
2879
- ])) : R("", !0),
2880
- $(r(Xt), {
2893
+ e.title ? (o(), c("header", _s, [
2894
+ d("h3", ys, h(e.title), 1)
2895
+ ])) : T("", !0),
2896
+ $(r(Yt), {
2881
2897
  data: e.data,
2882
2898
  levels: e.levels,
2883
2899
  color: e.color,
@@ -2887,10 +2903,10 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2887
2903
  _: 1
2888
2904
  }));
2889
2905
  }
2890
- }), bs = {
2906
+ }), ks = {
2891
2907
  key: 0,
2892
2908
  class: "admin-widget__hd"
2893
- }, ks = { class: "admin-widget__title" }, ws = { style: { display: "flex", "justify-content": "center" } }, $s = /* @__PURE__ */ L({
2909
+ }, ws = { class: "admin-widget__title" }, $s = { style: { display: "flex", "justify-content": "center" } }, xs = /* @__PURE__ */ P({
2894
2910
  __name: "GaugeWidget",
2895
2911
  props: {
2896
2912
  title: { default: "" },
@@ -2912,16 +2928,16 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2912
2928
  warning: "warning",
2913
2929
  negative: "danger"
2914
2930
  }, s = v(() => n[t.tone]);
2915
- return (a, l) => (o(), b(r(j), {
2931
+ return (a, l) => (o(), b(r(K), {
2916
2932
  padding: "md",
2917
2933
  class: "admin-widget"
2918
2934
  }, {
2919
2935
  default: m(() => [
2920
- e.title ? (o(), c("header", bs, [
2921
- d("h3", ks, p(e.title), 1)
2922
- ])) : R("", !0),
2923
- d("div", ws, [
2924
- $(r(Yt), {
2936
+ e.title ? (o(), c("header", ks, [
2937
+ d("h3", ws, h(e.title), 1)
2938
+ ])) : T("", !0),
2939
+ d("div", $s, [
2940
+ $(r(Jt), {
2925
2941
  value: e.value,
2926
2942
  min: e.min,
2927
2943
  max: e.max,
@@ -2938,49 +2954,49 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2938
2954
  _: 1
2939
2955
  }));
2940
2956
  }
2941
- }), xs = {
2957
+ }), Ss = {
2942
2958
  key: 0,
2943
2959
  class: "admin-widget__hd"
2944
- }, Ss = { class: "admin-widget__title" }, Cs = { class: "admin-markdown-widget" }, As = /* @__PURE__ */ L({
2960
+ }, Cs = { class: "admin-widget__title" }, As = { class: "admin-markdown-widget" }, Es = /* @__PURE__ */ P({
2945
2961
  __name: "MarkdownWidget",
2946
2962
  props: {
2947
2963
  title: { default: "" },
2948
2964
  content: {}
2949
2965
  },
2950
2966
  setup(e) {
2951
- return (t, n) => (o(), b(r(j), {
2967
+ return (t, n) => (o(), b(r(K), {
2952
2968
  padding: "md",
2953
2969
  class: "admin-widget"
2954
2970
  }, {
2955
2971
  default: m(() => [
2956
- e.title ? (o(), c("header", xs, [
2957
- d("h3", Ss, p(e.title), 1)
2958
- ])) : R("", !0),
2959
- d("div", Cs, p(e.content), 1)
2972
+ e.title ? (o(), c("header", Ss, [
2973
+ d("h3", Cs, h(e.title), 1)
2974
+ ])) : T("", !0),
2975
+ d("div", As, h(e.content), 1)
2960
2976
  ]),
2961
2977
  _: 1
2962
2978
  }));
2963
2979
  }
2964
2980
  });
2965
- function Es() {
2966
- zl({
2967
- stat: Ql,
2968
- "bar-chart": ls,
2969
- "donut-chart": fs,
2970
- "recent-table": gs,
2971
- heatmap: ys,
2972
- gauge: $s,
2973
- markdown: As
2981
+ function Rs() {
2982
+ ql({
2983
+ stat: Zl,
2984
+ "bar-chart": ss,
2985
+ "donut-chart": vs,
2986
+ "recent-table": hs,
2987
+ heatmap: bs,
2988
+ gauge: xs,
2989
+ markdown: Es
2974
2990
  });
2975
2991
  }
2976
2992
  function Fs(e) {
2977
2993
  return e.success === !0;
2978
2994
  }
2979
- function po(e) {
2995
+ function go(e) {
2980
2996
  return e.success === !1;
2981
2997
  }
2982
2998
  function Us(e) {
2983
- const t = un.create({
2999
+ const t = dn.create({
2984
3000
  baseURL: e.baseURL,
2985
3001
  withCredentials: !0,
2986
3002
  headers: {
@@ -2989,7 +3005,7 @@ function Us(e) {
2989
3005
  }
2990
3006
  });
2991
3007
  e.csrfToken && (t.defaults.headers.common["X-CSRF-TOKEN"] = e.csrfToken), e.locale && (t.defaults.headers.common["X-Admin-Locale"] = e.locale), t.interceptors.request.use((a) => {
2992
- const l = Rs("XSRF-TOKEN");
3008
+ const l = Ts("XSRF-TOKEN");
2993
3009
  return l && a.headers.set("X-XSRF-TOKEN", decodeURIComponent(l)), a;
2994
3010
  }), t.interceptors.response.use(
2995
3011
  (a) => {
@@ -3025,26 +3041,26 @@ function Us(e) {
3025
3041
  }
3026
3042
  };
3027
3043
  }
3028
- function Rs(e) {
3044
+ function Ts(e) {
3029
3045
  if (typeof document > "u") return null;
3030
- const t = document.cookie.match(new RegExp("(^|; )" + Ts(e) + "=([^;]*)"));
3046
+ const t = document.cookie.match(new RegExp("(^|; )" + Ls(e) + "=([^;]*)"));
3031
3047
  return t ? t[2] : null;
3032
3048
  }
3033
- function Ts(e) {
3049
+ function Ls(e) {
3034
3050
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3035
3051
  }
3036
3052
  function xe(e, t) {
3037
3053
  const n = e.permissions?.[t];
3038
3054
  return typeof n == "string" && n.length > 0 ? [n] : [];
3039
3055
  }
3040
- function Ls(e, t) {
3056
+ function Ps(e, t) {
3041
3057
  const n = e.permissions?.[t];
3042
3058
  return typeof n == "string" && n.length > 0 ? [n] : [];
3043
3059
  }
3044
- function Ps(e) {
3060
+ function Ms(e) {
3045
3061
  return Array.isArray(e.permission) ? e.permission : typeof e.permission == "string" && e.permission.length > 0 ? [e.permission] : [];
3046
3062
  }
3047
- function Ms(e, t) {
3063
+ function Ns(e, t) {
3048
3064
  const n = e.slug, s = `/r/${n}`;
3049
3065
  return [
3050
3066
  {
@@ -3105,7 +3121,7 @@ function Ms(e, t) {
3105
3121
  }
3106
3122
  ];
3107
3123
  }
3108
- function Ns(e, t) {
3124
+ function Bs(e, t) {
3109
3125
  return {
3110
3126
  path: `/screens/${e.slug}`,
3111
3127
  name: `admin.screen.${e.slug}`,
@@ -3115,11 +3131,11 @@ function Ns(e, t) {
3115
3131
  kind: "screen",
3116
3132
  slug: e.slug,
3117
3133
  title: e.name,
3118
- permissions: Ps(e)
3134
+ permissions: Ms(e)
3119
3135
  }
3120
3136
  };
3121
3137
  }
3122
- function Bs(e, t) {
3138
+ function Is(e, t) {
3123
3139
  return {
3124
3140
  path: `/settings/${e.slug}`,
3125
3141
  name: `admin.settings.${e.slug}`,
@@ -3129,11 +3145,11 @@ function Bs(e, t) {
3129
3145
  kind: "settings",
3130
3146
  slug: e.slug,
3131
3147
  title: e.label,
3132
- permissions: Ls(e, "view")
3148
+ permissions: Ps(e, "view")
3133
3149
  }
3134
3150
  };
3135
3151
  }
3136
- function Is(e, t) {
3152
+ function Ds(e, t) {
3137
3153
  if (typeof e.slug != "string" || e.slug.length === 0) return null;
3138
3154
  const n = e.permission, s = Array.isArray(n) ? n : typeof n == "string" && n.length > 0 ? [n] : [];
3139
3155
  return {
@@ -3149,27 +3165,27 @@ function Is(e, t) {
3149
3165
  }
3150
3166
  };
3151
3167
  }
3152
- function Ds(e, t) {
3168
+ function Vs(e, t) {
3153
3169
  if (e === null) return [];
3154
3170
  const n = [];
3155
3171
  for (const s of e.resources)
3156
- n.push(...Ms(s, t));
3172
+ n.push(...Ns(s, t));
3157
3173
  for (const s of e.screens)
3158
- n.push(Ns(s, t));
3159
- for (const s of e.settings)
3160
3174
  n.push(Bs(s, t));
3175
+ for (const s of e.settings)
3176
+ n.push(Is(s, t));
3161
3177
  for (const s of e.dashboards) {
3162
- const a = Is(s, t);
3178
+ const a = Ds(s, t);
3163
3179
  a && n.push(a);
3164
3180
  }
3165
3181
  return n;
3166
3182
  }
3167
- function Vs(e = {}) {
3183
+ function zs(e = {}) {
3168
3184
  const t = e.loginRouteName ?? "admin.login", n = e.forbiddenRouteName ?? "admin.forbidden", s = e.redirectQueryKey ?? "redirect";
3169
3185
  return (a) => {
3170
3186
  if (a.name === t)
3171
3187
  return !0;
3172
- const l = Q();
3188
+ const l = Z();
3173
3189
  if (a.meta?.requiresAuth === !0 && !l.isAuthenticated)
3174
3190
  return {
3175
3191
  name: t,
@@ -3184,7 +3200,7 @@ function Vs(e = {}) {
3184
3200
  return Array.isArray(u) && u.length > 0 && !l.hasAnyPermission(u) ? { name: n } : !0;
3185
3201
  };
3186
3202
  }
3187
- function zs(e = {}) {
3203
+ function qs(e = {}) {
3188
3204
  const t = e.template, n = e.brand ?? "", s = e.fallback ?? "";
3189
3205
  return (a) => {
3190
3206
  if (typeof document > "u") return;
@@ -3193,16 +3209,16 @@ function zs(e = {}) {
3193
3209
  t ? i = t.replace("{title}", l).replace("{brand}", n) : l && n ? i = `${l} · ${n}` : i = l || n, document.title = i;
3194
3210
  };
3195
3211
  }
3196
- const qs = [
3212
+ const Os = [
3197
3213
  "admin.resource.",
3198
3214
  "admin.screen.",
3199
3215
  "admin.settings.",
3200
3216
  "admin.dashboard."
3201
3217
  ];
3202
- function Os(e) {
3203
- return typeof e != "string" ? !1 : qs.some((t) => e.startsWith(t));
3204
- }
3205
3218
  function Ws(e) {
3219
+ return typeof e != "string" ? !1 : Os.some((t) => e.startsWith(t));
3220
+ }
3221
+ function js(e) {
3206
3222
  const t = e.base ?? "/admin", n = e.history ?? ct(t), s = [
3207
3223
  {
3208
3224
  path: "/login",
@@ -3239,22 +3255,22 @@ function Ws(e) {
3239
3255
  name: "admin.notFound",
3240
3256
  component: e.components.notFound,
3241
3257
  meta: { kind: "system", title: "404" }
3242
- }, l = Vt({
3258
+ }, l = zt({
3243
3259
  history: n,
3244
3260
  routes: [...s, ...e.extraRoutes ?? [], a]
3245
3261
  });
3246
- return l.beforeEach(Vs(e.authGuard)), l.afterEach(zs(e.titleGuard)), l.replaceManifestRoutes = (i) => {
3262
+ return l.beforeEach(zs(e.authGuard)), l.afterEach(qs(e.titleGuard)), l.replaceManifestRoutes = (i) => {
3247
3263
  const u = l.getRoutes();
3248
- for (const g of u)
3249
- Os(g.name) && l.removeRoute(g.name);
3264
+ for (const p of u)
3265
+ Ws(p.name) && l.removeRoute(p.name);
3250
3266
  l.hasRoute("admin.notFound") && l.removeRoute("admin.notFound");
3251
- const f = Ds(i, e.components);
3252
- for (const g of f)
3253
- l.addRoute(g);
3267
+ const f = Vs(i, e.components);
3268
+ for (const p of f)
3269
+ l.addRoute(p);
3254
3270
  l.addRoute(a);
3255
3271
  }, l;
3256
3272
  }
3257
- const J = /* @__PURE__ */ L({
3273
+ const J = /* @__PURE__ */ P({
3258
3274
  __name: "TextField",
3259
3275
  props: {
3260
3276
  name: {},
@@ -3287,7 +3303,7 @@ const J = /* @__PURE__ */ L({
3287
3303
  "onUpdate:modelValue": l
3288
3304
  }, null, 8, ["model-value", "type", "label", "hint", "error", "placeholder", "required", "disabled", "readonly", "name", "autocomplete"]));
3289
3305
  }
3290
- }), Se = /* @__PURE__ */ L({
3306
+ }), Se = /* @__PURE__ */ P({
3291
3307
  __name: "TextAreaField",
3292
3308
  props: {
3293
3309
  name: {},
@@ -3312,7 +3328,7 @@ const J = /* @__PURE__ */ L({
3312
3328
  disabled: e.disabled
3313
3329
  }, {
3314
3330
  default: m(() => [
3315
- $(r(Jt), {
3331
+ $(r(Qt), {
3316
3332
  "model-value": s.value,
3317
3333
  rows: e.rows,
3318
3334
  placeholder: e.placeholder ?? void 0,
@@ -3325,7 +3341,7 @@ const J = /* @__PURE__ */ L({
3325
3341
  _: 1
3326
3342
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3327
3343
  }
3328
- }), Ve = /* @__PURE__ */ L({
3344
+ }), Ve = /* @__PURE__ */ P({
3329
3345
  __name: "NumberField",
3330
3346
  props: {
3331
3347
  name: {},
@@ -3355,7 +3371,7 @@ const J = /* @__PURE__ */ L({
3355
3371
  disabled: e.disabled
3356
3372
  }, {
3357
3373
  default: m(() => [
3358
- $(r(Qt), {
3374
+ $(r(Zt), {
3359
3375
  "model-value": s.value,
3360
3376
  min: e.min ?? void 0,
3361
3377
  max: e.max ?? void 0,
@@ -3370,7 +3386,7 @@ const J = /* @__PURE__ */ L({
3370
3386
  _: 1
3371
3387
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3372
3388
  }
3373
- }), le = /* @__PURE__ */ L({
3389
+ }), le = /* @__PURE__ */ P({
3374
3390
  __name: "SelectField",
3375
3391
  props: {
3376
3392
  name: {},
@@ -3414,7 +3430,7 @@ const J = /* @__PURE__ */ L({
3414
3430
  _: 1
3415
3431
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3416
3432
  }
3417
- }), ze = /* @__PURE__ */ L({
3433
+ }), ze = /* @__PURE__ */ P({
3418
3434
  __name: "CheckboxField",
3419
3435
  props: {
3420
3436
  name: {},
@@ -3444,9 +3460,9 @@ const J = /* @__PURE__ */ L({
3444
3460
  "onUpdate:modelValue": l
3445
3461
  }, {
3446
3462
  default: m(() => [
3447
- e.inlineLabel ? (o(), c(P, { key: 0 }, [
3448
- x(p(e.inlineLabel), 1)
3449
- ], 64)) : R("", !0)
3463
+ e.inlineLabel ? (o(), c(M, { key: 0 }, [
3464
+ S(h(e.inlineLabel), 1)
3465
+ ], 64)) : T("", !0)
3450
3466
  ]),
3451
3467
  _: 1
3452
3468
  }, 8, ["model-value", "disabled", "name"])
@@ -3454,7 +3470,7 @@ const J = /* @__PURE__ */ L({
3454
3470
  _: 1
3455
3471
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3456
3472
  }
3457
- }), ue = /* @__PURE__ */ L({
3473
+ }), ue = /* @__PURE__ */ P({
3458
3474
  __name: "DateField",
3459
3475
  props: {
3460
3476
  name: {},
@@ -3482,7 +3498,7 @@ const J = /* @__PURE__ */ L({
3482
3498
  disabled: e.disabled
3483
3499
  }, {
3484
3500
  default: m(() => [
3485
- $(r(Zt), {
3501
+ $(r(en), {
3486
3502
  "model-value": s.value,
3487
3503
  min: e.min ?? void 0,
3488
3504
  max: e.max ?? void 0,
@@ -3494,20 +3510,20 @@ const J = /* @__PURE__ */ L({
3494
3510
  _: 1
3495
3511
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3496
3512
  }
3497
- }), it = /* @__PURE__ */ L({
3513
+ }), it = /* @__PURE__ */ P({
3498
3514
  __name: "RowsLayout",
3499
3515
  props: {
3500
3516
  items: {},
3501
3517
  gap: { default: "var(--uid-space-md)" }
3502
3518
  },
3503
3519
  setup(e) {
3504
- return (t, n) => (o(), b(r(en), {
3520
+ return (t, n) => (o(), b(r(tn), {
3505
3521
  direction: "column",
3506
3522
  gap: e.gap,
3507
3523
  align: "stretch"
3508
3524
  }, {
3509
3525
  default: m(() => [
3510
- (o(!0), c(P, null, D(e.items, (s, a) => (o(), b(we, {
3526
+ (o(!0), c(M, null, D(e.items, (s, a) => (o(), b(we, {
3511
3527
  key: a,
3512
3528
  node: s
3513
3529
  }, null, 8, ["node"]))), 128))
@@ -3515,7 +3531,7 @@ const J = /* @__PURE__ */ L({
3515
3531
  _: 1
3516
3532
  }, 8, ["gap"]));
3517
3533
  }
3518
- }), Ks = /* @__PURE__ */ L({
3534
+ }), Ks = /* @__PURE__ */ P({
3519
3535
  __name: "ColumnsLayout",
3520
3536
  props: {
3521
3537
  items: {},
@@ -3528,12 +3544,12 @@ const J = /* @__PURE__ */ L({
3528
3544
  const l = a.span;
3529
3545
  return typeof l == "number" && l > 0 ? Math.min(l, t.cols) : n.value;
3530
3546
  }
3531
- return (a, l) => (o(), b(r(tn), {
3547
+ return (a, l) => (o(), b(r(nn), {
3532
3548
  cols: e.cols,
3533
3549
  gap: e.gap
3534
3550
  }, {
3535
3551
  default: m(() => [
3536
- (o(!0), c(P, null, D(e.items, (i, u) => (o(), c("div", {
3552
+ (o(!0), c(M, null, D(e.items, (i, u) => (o(), c("div", {
3537
3553
  key: u,
3538
3554
  class: "admin-columns__item",
3539
3555
  style: Te({ gridColumn: `span ${s(i)} / span ${s(i)}` })
@@ -3544,16 +3560,16 @@ const J = /* @__PURE__ */ L({
3544
3560
  _: 1
3545
3561
  }, 8, ["cols", "gap"]));
3546
3562
  }
3547
- }), js = {
3563
+ }), Gs = {
3548
3564
  key: 0,
3549
3565
  class: "admin-section__header"
3550
- }, Gs = {
3566
+ }, Hs = {
3551
3567
  key: 0,
3552
3568
  class: "admin-section__title"
3553
- }, Hs = {
3569
+ }, Xs = {
3554
3570
  key: 1,
3555
3571
  class: "admin-section__description"
3556
- }, Xs = { class: "admin-section__body" }, he = /* @__PURE__ */ L({
3572
+ }, Ys = { class: "admin-section__body" }, he = /* @__PURE__ */ P({
3557
3573
  __name: "SectionLayout",
3558
3574
  props: {
3559
3575
  items: {},
@@ -3561,17 +3577,17 @@ const J = /* @__PURE__ */ L({
3561
3577
  description: { default: null }
3562
3578
  },
3563
3579
  setup(e) {
3564
- return (t, n) => (o(), b(r(j), {
3580
+ return (t, n) => (o(), b(r(K), {
3565
3581
  padding: "md",
3566
3582
  class: "admin-section"
3567
3583
  }, {
3568
3584
  default: m(() => [
3569
- e.title || e.description ? (o(), c("header", js, [
3570
- e.title ? (o(), c("h3", Gs, p(e.title), 1)) : R("", !0),
3571
- e.description ? (o(), c("p", Hs, p(e.description), 1)) : R("", !0)
3572
- ])) : R("", !0),
3573
- d("div", Xs, [
3574
- (o(!0), c(P, null, D(e.items, (s, a) => (o(), b(we, {
3585
+ e.title || e.description ? (o(), c("header", Gs, [
3586
+ e.title ? (o(), c("h3", Hs, h(e.title), 1)) : T("", !0),
3587
+ e.description ? (o(), c("p", Xs, h(e.description), 1)) : T("", !0)
3588
+ ])) : T("", !0),
3589
+ d("div", Ys, [
3590
+ (o(!0), c(M, null, D(e.items, (s, a) => (o(), b(we, {
3575
3591
  key: a,
3576
3592
  node: s
3577
3593
  }, null, 8, ["node"]))), 128))
@@ -3580,7 +3596,7 @@ const J = /* @__PURE__ */ L({
3580
3596
  _: 1
3581
3597
  }));
3582
3598
  }
3583
- }), Ys = /* @__PURE__ */ L({
3599
+ }), Js = /* @__PURE__ */ P({
3584
3600
  __name: "TabsLayout",
3585
3601
  props: {
3586
3602
  items: {},
@@ -3592,7 +3608,7 @@ const J = /* @__PURE__ */ L({
3592
3608
  function a(u, f) {
3593
3609
  return u.key ?? f;
3594
3610
  }
3595
- const l = F(n.active ?? a(n.items[0] ?? {}, 0));
3611
+ const l = R(n.active ?? a(n.items[0] ?? {}, 0));
3596
3612
  function i(u) {
3597
3613
  l.value = u, s("update:active", u);
3598
3614
  }
@@ -3601,24 +3617,24 @@ const J = /* @__PURE__ */ L({
3601
3617
  "onUpdate:modelValue": i
3602
3618
  }, {
3603
3619
  list: m(() => [
3604
- (o(!0), c(P, null, D(e.items, (g, _) => (o(), b(r(Ae), {
3605
- key: a(g, _),
3606
- value: a(g, _)
3620
+ (o(!0), c(M, null, D(e.items, (p, _) => (o(), b(r(Ae), {
3621
+ key: a(p, _),
3622
+ value: a(p, _)
3607
3623
  }, {
3608
3624
  default: m(() => [
3609
- x(p(g.label), 1)
3625
+ S(h(p.label), 1)
3610
3626
  ]),
3611
3627
  _: 2
3612
3628
  }, 1032, ["value"]))), 128))
3613
3629
  ]),
3614
3630
  default: m(() => [
3615
- (o(!0), c(P, null, D(e.items, (g, _) => (o(), b(r(gt), {
3616
- key: `panel-${a(g, _)}`,
3617
- value: a(g, _)
3631
+ (o(!0), c(M, null, D(e.items, (p, _) => (o(), b(r(gt), {
3632
+ key: `panel-${a(p, _)}`,
3633
+ value: a(p, _)
3618
3634
  }, {
3619
3635
  default: m(() => [
3620
- (o(!0), c(P, null, D(g.items, (k, S) => (o(), b(we, {
3621
- key: S,
3636
+ (o(!0), c(M, null, D(p.items, (k, x) => (o(), b(we, {
3637
+ key: x,
3622
3638
  node: k
3623
3639
  }, null, 8, ["node"]))), 128))
3624
3640
  ]),
@@ -3629,8 +3645,8 @@ const J = /* @__PURE__ */ L({
3629
3645
  }, 8, ["model-value"]));
3630
3646
  }
3631
3647
  });
3632
- function Js() {
3633
- Oa({
3648
+ function Qs() {
3649
+ Wa({
3634
3650
  fields: {
3635
3651
  // Backend Field-классы из dskripchenko/laravel-admin отдают эти fieldType()
3636
3652
  // строки. Соответствие см. core/src/Field/{Input,TextArea,Select,...}.php.
@@ -3679,7 +3695,7 @@ function Js() {
3679
3695
  columns: Ks,
3680
3696
  section: he,
3681
3697
  block: he,
3682
- tabs: Ys,
3698
+ tabs: Js,
3683
3699
  accordion: he,
3684
3700
  group: it,
3685
3701
  step: he,
@@ -3687,7 +3703,7 @@ function Js() {
3687
3703
  }
3688
3704
  });
3689
3705
  }
3690
- const I = /* @__PURE__ */ L({
3706
+ const I = /* @__PURE__ */ P({
3691
3707
  __name: "TextEntry",
3692
3708
  props: {
3693
3709
  name: { default: "" },
@@ -3702,13 +3718,13 @@ const I = /* @__PURE__ */ L({
3702
3718
  return a === void 0 && n && t.name && (a = n[t.name]), a == null || a === "" ? t.placeholder : String(a);
3703
3719
  });
3704
3720
  return (a, l) => (o(), c("span", {
3705
- class: Z(["admin-infolist-text", e.mono ? "admin-infolist-text--mono" : ""])
3706
- }, p(s.value), 3));
3721
+ class: ee(["admin-infolist-text", e.mono ? "admin-infolist-text--mono" : ""])
3722
+ }, h(s.value), 3));
3707
3723
  }
3708
- }), Qs = {
3724
+ }), Zs = {
3709
3725
  key: 1,
3710
3726
  class: "admin-infolist-text"
3711
- }, Zs = /* @__PURE__ */ L({
3727
+ }, ei = /* @__PURE__ */ P({
3712
3728
  __name: "BadgeEntry",
3713
3729
  props: {
3714
3730
  name: { default: "" },
@@ -3722,17 +3738,17 @@ const I = /* @__PURE__ */ L({
3722
3738
  let l = t.value;
3723
3739
  return l === void 0 && n && t.name && (l = n[t.name]), l == null ? "" : String(l);
3724
3740
  }), a = v(() => t.variant ? t.variant : t.map[s.value] ?? "default");
3725
- return (l, i) => s.value ? (o(), b(r(je), {
3741
+ return (l, i) => s.value ? (o(), b(r(Ke), {
3726
3742
  key: 0,
3727
3743
  variant: a.value
3728
3744
  }, {
3729
3745
  default: m(() => [
3730
- x(p(s.value), 1)
3746
+ S(h(s.value), 1)
3731
3747
  ]),
3732
3748
  _: 1
3733
- }, 8, ["variant"])) : (o(), c("span", Qs, "—"));
3749
+ }, 8, ["variant"])) : (o(), c("span", Zs, "—"));
3734
3750
  }
3735
- }), ei = ["data-icon"], ti = { key: 0 }, ni = /* @__PURE__ */ L({
3751
+ }), ti = ["data-icon"], ni = { key: 0 }, ai = /* @__PURE__ */ P({
3736
3752
  __name: "IconEntry",
3737
3753
  props: {
3738
3754
  name: { default: "" },
@@ -3749,19 +3765,19 @@ const I = /* @__PURE__ */ L({
3749
3765
  return i === void 0 && n && t.name && (i = n[t.name]), !!i;
3750
3766
  }), a = v(() => s.value ? t.trueLabel : t.falseLabel), l = v(() => s.value ? t.trueIcon : t.falseIcon);
3751
3767
  return (i, u) => (o(), c("span", {
3752
- class: Z(["admin-infolist-icon", s.value ? "admin-infolist-icon--on" : "admin-infolist-icon--off"])
3768
+ class: ee(["admin-infolist-icon", s.value ? "admin-infolist-icon--on" : "admin-infolist-icon--off"])
3753
3769
  }, [
3754
3770
  d("span", {
3755
3771
  class: "admin-infolist-icon__glyph",
3756
3772
  "data-icon": l.value
3757
- }, null, 8, ei),
3758
- a.value ? (o(), c("span", ti, p(a.value), 1)) : R("", !0)
3773
+ }, null, 8, ti),
3774
+ a.value ? (o(), c("span", ni, h(a.value), 1)) : T("", !0)
3759
3775
  ], 2));
3760
3776
  }
3761
- }), ai = {
3777
+ }), li = {
3762
3778
  key: 1,
3763
3779
  class: "admin-infolist-text"
3764
- }, ot = /* @__PURE__ */ L({
3780
+ }, ot = /* @__PURE__ */ P({
3765
3781
  __name: "KeyValueEntry",
3766
3782
  props: {
3767
3783
  name: { default: "" },
@@ -3776,32 +3792,32 @@ const I = /* @__PURE__ */ L({
3776
3792
  function a(l) {
3777
3793
  return l == null ? "—" : typeof l == "object" ? JSON.stringify(l) : String(l);
3778
3794
  }
3779
- return (l, i) => s.value.length > 0 ? (o(), b(r(nn), {
3795
+ return (l, i) => s.value.length > 0 ? (o(), b(r(an), {
3780
3796
  key: 0,
3781
3797
  direction: "vertical",
3782
3798
  columns: 1
3783
3799
  }, {
3784
3800
  default: m(() => [
3785
- (o(!0), c(P, null, D(s.value, ([u, f]) => (o(), b(r(an), {
3801
+ (o(!0), c(M, null, D(s.value, ([u, f]) => (o(), b(r(ln), {
3786
3802
  key: u,
3787
3803
  label: u
3788
3804
  }, {
3789
3805
  default: m(() => [
3790
- x(p(a(f)), 1)
3806
+ S(h(a(f)), 1)
3791
3807
  ]),
3792
3808
  _: 2
3793
3809
  }, 1032, ["label"]))), 128))
3794
3810
  ]),
3795
3811
  _: 1
3796
- })) : (o(), c("span", ai, "—"));
3812
+ })) : (o(), c("span", li, "—"));
3797
3813
  }
3798
3814
  });
3799
- function li() {
3800
- Ja({
3815
+ function si() {
3816
+ Qa({
3801
3817
  // Дефолтные типы infolist (BadgeEntry::make() и т.п.).
3802
3818
  text: I,
3803
- badge: Zs,
3804
- icon: ni,
3819
+ badge: ei,
3820
+ icon: ai,
3805
3821
  keyvalue: ot,
3806
3822
  "key-value": ot,
3807
3823
  // Маппинг от backend Field::fieldType() → TextEntry для view-режима.
@@ -3842,30 +3858,30 @@ function li() {
3842
3858
  "color-picker": I
3843
3859
  });
3844
3860
  }
3845
- function go(e, t = {}) {
3846
- const n = t.pages ?? {}, s = t.base ?? si(e.baseUrl) ?? "/admin", a = Us({
3861
+ function ho(e, t = {}) {
3862
+ const n = t.pages ?? {}, s = t.base ?? ii(e.baseUrl) ?? "/admin", a = Us({
3847
3863
  baseURL: e.apiUrl,
3848
3864
  csrfToken: e.csrf
3849
3865
  });
3850
- dn(a);
3851
- const l = Nt(Bn), i = It();
3852
- l.use(i), Q().hydrate(e), He().hydrate(e), Ge().hydrate(e), Xe().hydrate(e), Js(), Es(), li();
3853
- const u = Ws({
3866
+ cn(a);
3867
+ const l = Bt(In), i = Dt();
3868
+ l.use(i), Z().hydrate(e), He().hydrate(e), Ge().hydrate(e), Xe().hydrate(e), Qs(), Rs(), si();
3869
+ const u = js({
3854
3870
  base: s,
3855
3871
  history: t.router?.history ?? ct(s),
3856
3872
  components: {
3857
- login: n.login ?? ka,
3873
+ login: n.login ?? wa,
3858
3874
  home: n.home ?? Kn,
3859
- forbidden: n.forbidden ?? Gn,
3860
- notFound: n.notFound ?? Xn,
3861
- profile: n.profile ?? Dl,
3862
- resourceIndex: n.resourceIndex ?? qa,
3875
+ forbidden: n.forbidden ?? Hn,
3876
+ notFound: n.notFound ?? Yn,
3877
+ profile: n.profile ?? Vl,
3878
+ resourceIndex: n.resourceIndex ?? Oa,
3863
3879
  resourceCreate: n.resourceCreate ?? lt,
3864
3880
  resourceEdit: n.resourceEdit ?? lt,
3865
- resourceView: n.resourceView ?? hl,
3866
- dashboard: n.dashboard ?? Jl,
3867
- settings: n.settings ?? ea,
3868
- screen: n.screen ?? la
3881
+ resourceView: n.resourceView ?? _l,
3882
+ dashboard: n.dashboard ?? Ql,
3883
+ settings: n.settings ?? ta,
3884
+ screen: n.screen ?? sa
3869
3885
  },
3870
3886
  extraRoutes: t.router?.extraRoutes,
3871
3887
  authGuard: t.router?.authGuard,
@@ -3873,33 +3889,46 @@ function go(e, t = {}) {
3873
3889
  });
3874
3890
  l.use(u);
3875
3891
  const f = Ye();
3876
- if (u.beforeEach((g, _, k) => {
3877
- g.fullPath !== _.fullPath && f.start(), k();
3892
+ if (u.beforeEach((p, _, k) => {
3893
+ p.fullPath !== _.fullPath && f.start(), k();
3878
3894
  }), u.afterEach(() => {
3879
3895
  f.end();
3880
3896
  }), u.onError(() => {
3881
3897
  f.end();
3898
+ }), u.beforeResolve(async (p, _, k) => {
3899
+ const x = typeof p.name == "string" ? p.name : null;
3900
+ if (x && x.startsWith("admin.resource.") && x.endsWith(".index")) {
3901
+ const C = p.params.slug ?? p.meta.slug;
3902
+ if (C)
3903
+ try {
3904
+ const { useResourceIndexStore: y } = await Promise.resolve().then(() => $a), g = y();
3905
+ (g.slug !== C || g.items.length === 0) && (g.setSlug(C), await g.load().catch(() => {
3906
+ }));
3907
+ } catch {
3908
+ }
3909
+ }
3910
+ k();
3882
3911
  }), !t.skipManifestLoad) {
3883
- const g = oe(), _ = Q(), k = kt(), S = () => {
3912
+ const p = oe(), _ = Z(), k = kt(), x = () => {
3884
3913
  k.load().catch(() => {
3885
- }), g.load().then((A) => {
3886
- u.replaceManifestRoutes(A);
3914
+ }), p.load().then((C) => {
3915
+ u.replaceManifestRoutes(C);
3887
3916
  const y = u.currentRoute.value;
3888
3917
  y.name === "admin.notFound" && y.fullPath !== "/" && u.replace(y.fullPath);
3889
- }).catch((A) => {
3890
- typeof console < "u" && console.error("[laravel-admin] manifest load failed:", A);
3918
+ }).catch((C) => {
3919
+ typeof console < "u" && console.error("[laravel-admin] manifest load failed:", C);
3891
3920
  });
3892
3921
  };
3893
- _.isAuthenticated && S(), ee(
3922
+ _.isAuthenticated && x(), Q(
3894
3923
  () => _.user,
3895
- (A, y) => {
3896
- A && !y && S();
3924
+ (C, y) => {
3925
+ C && !y && x();
3897
3926
  }
3898
3927
  );
3899
3928
  }
3900
3929
  return t.onAppCreated?.(l), { app: l, router: u, client: a };
3901
3930
  }
3902
- function si(e) {
3931
+ function ii(e) {
3903
3932
  if (!e) return null;
3904
3933
  try {
3905
3934
  return new URL(e).pathname || "/admin";
@@ -3907,8 +3936,8 @@ function si(e) {
3907
3936
  return e.startsWith("/") ? e : null;
3908
3937
  }
3909
3938
  }
3910
- async function ho(e = {}) {
3911
- const t = ii();
3939
+ async function _o(e = {}) {
3940
+ const t = oi();
3912
3941
  if (t)
3913
3942
  return t;
3914
3943
  if (e.client)
@@ -3922,31 +3951,31 @@ async function ho(e = {}) {
3922
3951
  }
3923
3952
  return null;
3924
3953
  }
3925
- function ii() {
3954
+ function oi() {
3926
3955
  return typeof window > "u" ? null : window.__ADMIN_BOOTSTRAP__ ?? null;
3927
3956
  }
3928
- function _o() {
3957
+ function yo() {
3929
3958
  return typeof document > "u" ? null : document.querySelector('meta[name="csrf-token"]')?.getAttribute("content") ?? null;
3930
3959
  }
3931
- const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" }, ui = {
3960
+ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" }, di = {
3932
3961
  key: 0,
3933
3962
  class: "admin-notifs__count"
3934
- }, di = { class: "admin-notifs__list" }, ci = {
3963
+ }, ci = { class: "admin-notifs__list" }, mi = {
3935
3964
  key: 0,
3936
3965
  class: "admin-notifs__empty"
3937
- }, mi = {
3966
+ }, fi = {
3938
3967
  key: 1,
3939
3968
  class: "admin-notifs__empty"
3940
- }, fi = ["onClick"], vi = ["data-kind"], pi = { class: "admin-notifs__body" }, gi = { class: "admin-notifs__row1" }, hi = {
3969
+ }, vi = ["onClick"], pi = ["data-kind"], gi = { class: "admin-notifs__body" }, hi = { class: "admin-notifs__row1" }, _i = {
3941
3970
  key: 0,
3942
3971
  class: "admin-notifs__title-strong"
3943
- }, _i = {
3972
+ }, yi = {
3944
3973
  key: 1,
3945
3974
  class: "admin-notifs__title-soft"
3946
- }, yi = { class: "admin-notifs__time" }, bi = {
3975
+ }, bi = { class: "admin-notifs__time" }, ki = {
3947
3976
  key: 0,
3948
3977
  class: "admin-notifs__text"
3949
- }, ki = ["onClick"], yo = /* @__PURE__ */ L({
3978
+ }, wi = ["onClick"], bo = /* @__PURE__ */ P({
3950
3979
  __name: "NotificationsDrawer",
3951
3980
  props: {
3952
3981
  open: { type: Boolean }
@@ -3954,55 +3983,55 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
3954
3983
  emits: ["update:open", "select-item"],
3955
3984
  setup(e, { emit: t }) {
3956
3985
  const n = e, s = t, a = Xe();
3957
- function l(h) {
3958
- s("update:open", h);
3986
+ function l(g) {
3987
+ s("update:open", g);
3959
3988
  }
3960
- ee(
3989
+ Q(
3961
3990
  () => n.open,
3962
- async (h) => {
3963
- h && await a.load(a.lastFilter ?? "all", 1).catch(() => {
3991
+ async (g) => {
3992
+ g && await a.load(a.lastFilter ?? "all", 1).catch(() => {
3964
3993
  });
3965
3994
  },
3966
3995
  { immediate: !0 }
3967
3996
  );
3968
3997
  const i = v(() => a.lastFilter ?? "all");
3969
- async function u(h) {
3970
- await a.load(h, 1).catch(() => {
3998
+ async function u(g) {
3999
+ await a.load(g, 1).catch(() => {
3971
4000
  });
3972
4001
  }
3973
4002
  async function f() {
3974
4003
  await a.markAllAsRead().catch(() => {
3975
4004
  });
3976
4005
  }
3977
- async function g(h) {
3978
- s("select-item", h), h.read_at || await a.markAsRead(h.id).catch(() => {
4006
+ async function p(g) {
4007
+ s("select-item", g), g.read_at || await a.markAsRead(g.id).catch(() => {
3979
4008
  });
3980
4009
  }
3981
- async function _(h, U) {
3982
- U.stopPropagation(), await a.destroy(h.id).catch(() => {
4010
+ async function _(g, F) {
4011
+ F.stopPropagation(), await a.destroy(g.id).catch(() => {
3983
4012
  });
3984
4013
  }
3985
- function k(h) {
3986
- const U = h.data.level;
3987
- return U === "success" || U === "warning" || U === "danger" ? U : "info";
4014
+ function k(g) {
4015
+ const F = g.data.level;
4016
+ return F === "success" || F === "warning" || F === "danger" ? F : "info";
3988
4017
  }
3989
- function S(h) {
3990
- return h.data.title ?? "—";
4018
+ function x(g) {
4019
+ return g.data.title ?? "—";
3991
4020
  }
3992
- function A(h) {
3993
- return h.data.body ?? "";
4021
+ function C(g) {
4022
+ return g.data.body ?? "";
3994
4023
  }
3995
- function y(h) {
3996
- if (!h) return "";
3997
- const U = new Date(h), q = Math.max(0, Date.now() - U.getTime()), M = Math.floor(q / 6e4);
3998
- if (M < 1) return "только что";
3999
- if (M < 60) return `${M} мин назад`;
4000
- const T = Math.floor(M / 60);
4001
- if (T < 24) return `${T} ч назад`;
4002
- const w = Math.floor(T / 24);
4003
- return w < 7 ? `${w} д назад` : U.toLocaleDateString("ru-RU");
4024
+ function y(g) {
4025
+ if (!g) return "";
4026
+ const F = new Date(g), q = Math.max(0, Date.now() - F.getTime()), L = Math.floor(q / 6e4);
4027
+ if (L < 1) return "только что";
4028
+ if (L < 60) return `${L} мин назад`;
4029
+ const U = Math.floor(L / 60);
4030
+ if (U < 24) return `${U} ч назад`;
4031
+ const w = Math.floor(U / 24);
4032
+ return w < 7 ? `${w} д назад` : F.toLocaleDateString("ru-RU");
4004
4033
  }
4005
- return (h, U) => (o(), b(r(ln), {
4034
+ return (g, F) => (o(), b(r(sn), {
4006
4035
  "model-value": e.open,
4007
4036
  side: "right",
4008
4037
  width: "400px",
@@ -4010,10 +4039,10 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4010
4039
  "onUpdate:modelValue": l
4011
4040
  }, {
4012
4041
  header: m(() => [
4013
- d("div", oi, [
4014
- d("h2", ri, [
4015
- U[0] || (U[0] = x(" Уведомления ", -1)),
4016
- r(a).unreadCount > 0 ? (o(), c("span", ui, " (" + p(r(a).unreadCount) + ") ", 1)) : R("", !0)
4042
+ d("div", ri, [
4043
+ d("h2", ui, [
4044
+ F[0] || (F[0] = S(" Уведомления ", -1)),
4045
+ r(a).unreadCount > 0 ? (o(), c("span", di, " (" + h(r(a).unreadCount) + ") ", 1)) : T("", !0)
4017
4046
  ]),
4018
4047
  r(a).unreadCount > 0 ? (o(), b(r(z), {
4019
4048
  key: 0,
@@ -4021,11 +4050,11 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4021
4050
  size: "sm",
4022
4051
  onClick: f
4023
4052
  }, {
4024
- default: m(() => [...U[1] || (U[1] = [
4025
- x(" Прочитать все ", -1)
4053
+ default: m(() => [...F[1] || (F[1] = [
4054
+ S(" Прочитать все ", -1)
4026
4055
  ])]),
4027
4056
  _: 1
4028
- })) : R("", !0)
4057
+ })) : T("", !0)
4029
4058
  ])
4030
4059
  ]),
4031
4060
  default: m(() => [
@@ -4035,62 +4064,62 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4035
4064
  }, {
4036
4065
  list: m(() => [
4037
4066
  $(r(Ae), { value: "all" }, {
4038
- default: m(() => [...U[2] || (U[2] = [
4039
- x("Все", -1)
4067
+ default: m(() => [...F[2] || (F[2] = [
4068
+ S("Все", -1)
4040
4069
  ])]),
4041
4070
  _: 1
4042
4071
  }),
4043
4072
  $(r(Ae), { value: "unread" }, {
4044
4073
  default: m(() => [
4045
- U[3] || (U[3] = x(" Непрочитанные", -1)),
4046
- r(a).unreadCount > 0 ? (o(), c(P, { key: 0 }, [
4047
- x(" (" + p(r(a).unreadCount) + ") ", 1)
4048
- ], 64)) : R("", !0)
4074
+ F[3] || (F[3] = S(" Непрочитанные", -1)),
4075
+ r(a).unreadCount > 0 ? (o(), c(M, { key: 0 }, [
4076
+ S(" (" + h(r(a).unreadCount) + ") ", 1)
4077
+ ], 64)) : T("", !0)
4049
4078
  ]),
4050
4079
  _: 1
4051
4080
  }),
4052
4081
  $(r(Ae), { value: "read" }, {
4053
- default: m(() => [...U[4] || (U[4] = [
4054
- x("Прочитанные", -1)
4082
+ default: m(() => [...F[4] || (F[4] = [
4083
+ S("Прочитанные", -1)
4055
4084
  ])]),
4056
4085
  _: 1
4057
4086
  })
4058
4087
  ]),
4059
4088
  default: m(() => [
4060
- (o(), c(P, null, D(["all", "unread", "read"], (q) => $(r(gt), {
4089
+ (o(), c(M, null, D(["all", "unread", "read"], (q) => $(r(gt), {
4061
4090
  key: q,
4062
4091
  value: q
4063
4092
  }, {
4064
4093
  default: m(() => [
4065
- d("ul", di, [
4066
- r(a).loading ? (o(), c("li", ci, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", mi, " Нет уведомлений ")) : R("", !0),
4067
- (o(!0), c(P, null, D(r(a).items, (M) => (o(), c("li", {
4068
- key: M.id,
4069
- class: Z([
4094
+ d("ul", ci, [
4095
+ r(a).loading ? (o(), c("li", mi, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", fi, " Нет уведомлений ")) : T("", !0),
4096
+ (o(!0), c(M, null, D(r(a).items, (L) => (o(), c("li", {
4097
+ key: L.id,
4098
+ class: ee([
4070
4099
  "admin-notifs__item",
4071
- `admin-notifs__item--${k(M)}`,
4072
- { "admin-notifs__item--unread": !M.read_at }
4100
+ `admin-notifs__item--${k(L)}`,
4101
+ { "admin-notifs__item--unread": !L.read_at }
4073
4102
  ]),
4074
- onClick: (T) => g(M)
4103
+ onClick: (U) => p(L)
4075
4104
  }, [
4076
4105
  d("span", {
4077
4106
  class: "admin-notifs__icon",
4078
- "data-kind": k(M)
4079
- }, null, 8, vi),
4080
- d("div", pi, [
4081
- d("div", gi, [
4082
- M.read_at ? (o(), c("span", _i, p(S(M)), 1)) : (o(), c("strong", hi, p(S(M)), 1)),
4083
- d("span", yi, p(y(M.created_at)), 1)
4107
+ "data-kind": k(L)
4108
+ }, null, 8, pi),
4109
+ d("div", gi, [
4110
+ d("div", hi, [
4111
+ L.read_at ? (o(), c("span", yi, h(x(L)), 1)) : (o(), c("strong", _i, h(x(L)), 1)),
4112
+ d("span", bi, h(y(L.created_at)), 1)
4084
4113
  ]),
4085
- A(M) ? (o(), c("p", bi, p(A(M)), 1)) : R("", !0)
4114
+ C(L) ? (o(), c("p", ki, h(C(L)), 1)) : T("", !0)
4086
4115
  ]),
4087
4116
  d("button", {
4088
4117
  type: "button",
4089
4118
  class: "admin-notifs__close",
4090
4119
  "aria-label": "Удалить",
4091
- onClick: (T) => _(M, T)
4092
- }, " × ", 8, ki)
4093
- ], 10, fi))), 128))
4120
+ onClick: (U) => _(L, U)
4121
+ }, " × ", 8, wi)
4122
+ ], 10, vi))), 128))
4094
4123
  ])
4095
4124
  ]),
4096
4125
  _: 1
@@ -4102,22 +4131,22 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4102
4131
  _: 1
4103
4132
  }, 8, ["model-value"]));
4104
4133
  }
4105
- }), wi = { class: "admin-page admin-import-wizard" }, $i = { class: "admin-page__hd" }, xi = { class: "admin-page__title-wrap" }, Si = { class: "admin-page__title" }, Ci = { class: "admin-page__actions" }, Ai = {
4134
+ }), $i = { class: "admin-page admin-import-wizard" }, xi = { class: "admin-page__hd" }, Si = { class: "admin-page__title-wrap" }, Ci = { class: "admin-page__title" }, Ai = { class: "admin-page__actions" }, Ei = {
4106
4135
  key: 0,
4107
4136
  class: "admin-import-wizard__empty"
4108
- }, Ei = {
4137
+ }, Ri = {
4109
4138
  key: 1,
4110
4139
  class: "admin-import-wizard__mapping"
4111
4140
  }, Fi = { class: "admin-import-wizard__map-source" }, Ui = {
4112
4141
  key: 0,
4113
4142
  class: "admin-import-wizard__map-sample"
4114
- }, Ri = { class: "admin-import-wizard__card-hd" }, Ti = {
4143
+ }, Ti = { class: "admin-import-wizard__card-hd" }, Li = {
4115
4144
  key: 2,
4116
4145
  class: "admin-import-wizard__empty"
4117
- }, Li = {
4146
+ }, Pi = {
4118
4147
  key: 0,
4119
4148
  class: "admin-import-wizard__empty"
4120
- }, Pi = { class: "admin-import-wizard__kpi" }, Mi = { class: "admin-import-wizard__nav" }, bo = /* @__PURE__ */ L({
4149
+ }, Mi = { class: "admin-import-wizard__kpi" }, Ni = { class: "admin-import-wizard__nav" }, ko = /* @__PURE__ */ P({
4121
4150
  __name: "ImportWizardPage",
4122
4151
  props: {
4123
4152
  title: { default: "Импорт" },
@@ -4135,36 +4164,36 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4135
4164
  { label: "Сопоставление", description: "Колонки файла → поля" },
4136
4165
  { label: "Предпросмотр", description: "Проверка первых строк" },
4137
4166
  { label: "Импорт", description: "Запуск + сводка" }
4138
- ], l = F(0), i = v(() => n.step ?? l.value);
4139
- function u(T) {
4140
- n.step === void 0 && (T < 0 || T >= a.length || (l.value = T));
4167
+ ], l = R(0), i = v(() => n.step ?? l.value);
4168
+ function u(U) {
4169
+ n.step === void 0 && (U < 0 || U >= a.length || (l.value = U));
4141
4170
  }
4142
- const f = F([]);
4143
- function g(T) {
4144
- f.value = T, T.length > 0 && s("file-uploaded", T[0].file);
4171
+ const f = R([]);
4172
+ function p(U) {
4173
+ f.value = U, U.length > 0 && s("file-uploaded", U[0].file);
4145
4174
  }
4146
- const _ = F({});
4147
- function k(T, w) {
4148
- _.value[T] = w === null || w === "" ? null : String(w);
4175
+ const _ = R({});
4176
+ function k(U, w) {
4177
+ _.value[U] = w === null || w === "" ? null : String(w);
4149
4178
  }
4150
- function S() {
4151
- return n.headers.map((T) => ({
4152
- source: T.key,
4153
- target: _.value[T.key] ?? null
4179
+ function x() {
4180
+ return n.headers.map((U) => ({
4181
+ source: U.key,
4182
+ target: _.value[U.key] ?? null
4154
4183
  }));
4155
4184
  }
4156
- function A() {
4157
- s("mapping-submit", S()), u(2);
4185
+ function C() {
4186
+ s("mapping-submit", x()), u(2);
4158
4187
  }
4159
4188
  function y() {
4160
4189
  s("run-import"), u(3);
4161
4190
  }
4162
- const h = v(() => i.value > 0), U = v(() => {
4191
+ const g = v(() => i.value > 0), F = v(() => {
4163
4192
  switch (i.value) {
4164
4193
  case 0:
4165
4194
  return f.value.length > 0;
4166
4195
  case 1:
4167
- return Object.values(_.value).some((T) => T !== null);
4196
+ return Object.values(_.value).some((U) => U !== null);
4168
4197
  case 2:
4169
4198
  return !0;
4170
4199
  default:
@@ -4174,31 +4203,31 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4174
4203
  { value: "", label: "Не импортировать" },
4175
4204
  ...n.fieldOptions
4176
4205
  ]);
4177
- function M() {
4206
+ function L() {
4178
4207
  s("cancel");
4179
4208
  }
4180
- return (T, w) => (o(), c("section", wi, [
4181
- d("header", $i, [
4182
- d("div", xi, [
4183
- d("h1", Si, p(e.title), 1)
4209
+ return (U, w) => (o(), c("section", $i, [
4210
+ d("header", xi, [
4211
+ d("div", Si, [
4212
+ d("h1", Ci, h(e.title), 1)
4184
4213
  ]),
4185
- d("div", Ci, [
4214
+ d("div", Ai, [
4186
4215
  $(r(z), {
4187
4216
  variant: "ghost",
4188
- onClick: M
4217
+ onClick: L
4189
4218
  }, {
4190
4219
  default: m(() => [...w[2] || (w[2] = [
4191
- x("Отмена", -1)
4220
+ S("Отмена", -1)
4192
4221
  ])]),
4193
4222
  _: 1
4194
4223
  })
4195
4224
  ])
4196
4225
  ]),
4197
- $(r(sn), {
4226
+ $(r(on), {
4198
4227
  steps: a,
4199
4228
  current: i.value
4200
4229
  }, null, 8, ["current"]),
4201
- i.value === 0 ? (o(), b(r(j), {
4230
+ i.value === 0 ? (o(), b(r(K), {
4202
4231
  key: 0,
4203
4232
  padding: "md",
4204
4233
  class: "admin-import-wizard__card"
@@ -4208,18 +4237,18 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4208
4237
  d("h3", null, "1. Загрузите файл"),
4209
4238
  d("p", null, "CSV / TSV / XLSX, до 50 MB")
4210
4239
  ], -1)),
4211
- $(r(on), {
4240
+ $(r(rn), {
4212
4241
  "model-value": f.value,
4213
4242
  accept: ".csv,.tsv,.xlsx",
4214
4243
  "max-size": 50 * 1024 * 1024,
4215
4244
  "max-files": 1,
4216
4245
  "primary-text": "Перетащите файл сюда или",
4217
4246
  "secondary-text": "нажмите чтобы выбрать",
4218
- "onUpdate:modelValue": g
4247
+ "onUpdate:modelValue": p
4219
4248
  }, null, 8, ["model-value"])
4220
4249
  ]),
4221
4250
  _: 1
4222
- })) : i.value === 1 ? (o(), b(r(j), {
4251
+ })) : i.value === 1 ? (o(), b(r(K), {
4223
4252
  key: 1,
4224
4253
  padding: "md",
4225
4254
  class: "admin-import-wizard__card"
@@ -4229,14 +4258,14 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4229
4258
  d("h3", null, "2. Сопоставьте колонки"),
4230
4259
  d("p", null, "Выберите поле ресурса для каждой колонки файла")
4231
4260
  ], -1)),
4232
- e.headers.length === 0 ? (o(), c("div", Ai, " Нет данных — host ещё не отдал headers. Загрузите файл сначала. ")) : (o(), c("div", Ei, [
4233
- (o(!0), c(P, null, D(e.headers, (V) => (o(), c("div", {
4261
+ e.headers.length === 0 ? (o(), c("div", Ei, " Нет данных — host ещё не отдал headers. Загрузите файл сначала. ")) : (o(), c("div", Ri, [
4262
+ (o(!0), c(M, null, D(e.headers, (V) => (o(), c("div", {
4234
4263
  key: V.key,
4235
4264
  class: "admin-import-wizard__map-row"
4236
4265
  }, [
4237
4266
  d("div", Fi, [
4238
- d("strong", null, p(V.label), 1),
4239
- V.sample ? (o(), c("span", Ui, " «" + p(V.sample) + "» ", 1)) : R("", !0)
4267
+ d("strong", null, h(V.label), 1),
4268
+ V.sample ? (o(), c("span", Ui, " «" + h(V.sample) + "» ", 1)) : T("", !0)
4240
4269
  ]),
4241
4270
  w[4] || (w[4] = d("span", { class: "admin-import-wizard__map-arrow" }, "→", -1)),
4242
4271
  $(r(Ee), {
@@ -4249,15 +4278,15 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4249
4278
  ]))
4250
4279
  ]),
4251
4280
  _: 1
4252
- })) : i.value === 2 ? (o(), b(r(j), {
4281
+ })) : i.value === 2 ? (o(), b(r(K), {
4253
4282
  key: 2,
4254
4283
  padding: "md",
4255
4284
  class: "admin-import-wizard__card"
4256
4285
  }, {
4257
4286
  default: m(() => [
4258
- d("header", Ri, [
4287
+ d("header", Ti, [
4259
4288
  w[6] || (w[6] = d("h3", null, "3. Предпросмотр", -1)),
4260
- d("p", null, "Первые " + p(e.preview.length) + " строк перед импортом", 1)
4289
+ d("p", null, "Первые " + h(e.preview.length) + " строк перед импортом", 1)
4261
4290
  ]),
4262
4291
  e.preview.some((V) => V.__warning) ? (o(), b(r(te), {
4263
4292
  key: 0,
@@ -4265,18 +4294,18 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4265
4294
  style: { "margin-bottom": "var(--uid-space-md)" }
4266
4295
  }, {
4267
4296
  default: m(() => [...w[7] || (w[7] = [
4268
- x(" Часть строк имеет предупреждения — проверьте перед импортом. ", -1)
4297
+ S(" Часть строк имеет предупреждения — проверьте перед импортом. ", -1)
4269
4298
  ])]),
4270
4299
  _: 1
4271
- })) : R("", !0),
4272
- e.previewColumns.length > 0 ? (o(), b(r(Ke), {
4300
+ })) : T("", !0),
4301
+ e.previewColumns.length > 0 ? (o(), b(r(je), {
4273
4302
  key: 1,
4274
4303
  columns: e.previewColumns,
4275
4304
  data: e.preview
4276
- }, null, 8, ["columns", "data"])) : (o(), c("div", Ti, " Host не передал previewColumns/preview. "))
4305
+ }, null, 8, ["columns", "data"])) : (o(), c("div", Li, " Host не передал previewColumns/preview. "))
4277
4306
  ]),
4278
4307
  _: 1
4279
- })) : (o(), b(r(j), {
4308
+ })) : (o(), b(r(K), {
4280
4309
  key: 3,
4281
4310
  padding: "md",
4282
4311
  class: "admin-import-wizard__card"
@@ -4285,13 +4314,13 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4285
4314
  w[8] || (w[8] = d("header", { class: "admin-import-wizard__card-hd" }, [
4286
4315
  d("h3", null, "4. Импорт")
4287
4316
  ], -1)),
4288
- e.progress ? (o(), c(P, { key: 1 }, [
4289
- e.progress.total > 0 ? (o(), b(r(rn), {
4317
+ e.progress ? (o(), c(M, { key: 1 }, [
4318
+ e.progress.total > 0 ? (o(), b(r(un), {
4290
4319
  key: 0,
4291
4320
  "model-value": e.progress.created + e.progress.updated + e.progress.errors,
4292
4321
  max: e.progress.total
4293
- }, null, 8, ["model-value", "max"])) : R("", !0),
4294
- d("div", Pi, [
4322
+ }, null, 8, ["model-value", "max"])) : T("", !0),
4323
+ d("div", Mi, [
4295
4324
  $(r(Ce), {
4296
4325
  title: "Создано",
4297
4326
  value: e.progress.created,
@@ -4308,40 +4337,40 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4308
4337
  tone: "danger"
4309
4338
  }, null, 8, ["value"])
4310
4339
  ])
4311
- ], 64)) : (o(), c("div", Li, " Запускается импорт… "))
4340
+ ], 64)) : (o(), c("div", Pi, " Запускается импорт… "))
4312
4341
  ]),
4313
4342
  _: 1
4314
4343
  })),
4315
- d("footer", Mi, [
4316
- h.value ? (o(), b(r(z), {
4344
+ d("footer", Ni, [
4345
+ g.value ? (o(), b(r(z), {
4317
4346
  key: 0,
4318
4347
  variant: "ghost",
4319
4348
  onClick: w[0] || (w[0] = (V) => u(i.value - 1))
4320
4349
  }, {
4321
4350
  default: m(() => [...w[9] || (w[9] = [
4322
- x(" Назад ", -1)
4351
+ S(" Назад ", -1)
4323
4352
  ])]),
4324
4353
  _: 1
4325
- })) : R("", !0),
4354
+ })) : T("", !0),
4326
4355
  w[13] || (w[13] = d("span", { style: { flex: "1" } }, null, -1)),
4327
4356
  i.value === 0 ? (o(), b(r(z), {
4328
4357
  key: 1,
4329
4358
  variant: "primary",
4330
- disabled: !U.value,
4359
+ disabled: !F.value,
4331
4360
  onClick: w[1] || (w[1] = (V) => u(1))
4332
4361
  }, {
4333
4362
  default: m(() => [...w[10] || (w[10] = [
4334
- x(" Далее ", -1)
4363
+ S(" Далее ", -1)
4335
4364
  ])]),
4336
4365
  _: 1
4337
4366
  }, 8, ["disabled"])) : i.value === 1 ? (o(), b(r(z), {
4338
4367
  key: 2,
4339
4368
  variant: "primary",
4340
- disabled: !U.value,
4341
- onClick: A
4369
+ disabled: !F.value,
4370
+ onClick: C
4342
4371
  }, {
4343
4372
  default: m(() => [...w[11] || (w[11] = [
4344
- x(" Подтвердить mapping ", -1)
4373
+ S(" Подтвердить mapping ", -1)
4345
4374
  ])]),
4346
4375
  _: 1
4347
4376
  }, 8, ["disabled"])) : i.value === 2 ? (o(), b(r(z), {
@@ -4350,14 +4379,14 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4350
4379
  onClick: y
4351
4380
  }, {
4352
4381
  default: m(() => [...w[12] || (w[12] = [
4353
- x(" Запустить импорт ", -1)
4382
+ S(" Запустить импорт ", -1)
4354
4383
  ])]),
4355
4384
  _: 1
4356
- })) : R("", !0)
4385
+ })) : T("", !0)
4357
4386
  ])
4358
4387
  ]));
4359
4388
  }
4360
- }), Ni = { class: "admin-page admin-field-gallery" }, Bi = { class: "admin-gallery__group-title" }, Ii = { class: "admin-gallery__grid" }, Di = { class: "admin-gallery__card-hd" }, Vi = { class: "admin-gallery__card-title" }, zi = { class: "admin-gallery__card-type" }, qi = { class: "admin-gallery__card-desc" }, Oi = { class: "admin-gallery__card-demo" }, ko = /* @__PURE__ */ L({
4389
+ }), Bi = { class: "admin-page admin-field-gallery" }, Ii = { class: "admin-gallery__group-title" }, Di = { class: "admin-gallery__grid" }, Vi = { class: "admin-gallery__card-hd" }, zi = { class: "admin-gallery__card-title" }, qi = { class: "admin-gallery__card-type" }, Oi = { class: "admin-gallery__card-desc" }, Wi = { class: "admin-gallery__card-demo" }, wo = /* @__PURE__ */ P({
4361
4390
  __name: "FieldGalleryPage",
4362
4391
  setup(e) {
4363
4392
  const t = [
@@ -4421,35 +4450,35 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4421
4450
  node: { type: "date", name: "demo_date", label: "Дата публикации", inputType: "date" },
4422
4451
  initial: { demo_date: "2026-05-01" }
4423
4452
  }
4424
- ], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}), s = Bt(
4453
+ ], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}), s = It(
4425
4454
  t.reduce((a, l) => Object.assign(a, l.initial), {})
4426
4455
  );
4427
- return ht(s), (a, l) => (o(), c("section", Ni, [
4456
+ return ht(s), (a, l) => (o(), c("section", Bi, [
4428
4457
  l[0] || (l[0] = d("header", { class: "admin-page__hd" }, [
4429
4458
  d("div", { class: "admin-page__title-wrap" }, [
4430
4459
  d("h1", { class: "admin-page__title" }, "Field Gallery"),
4431
4460
  d("div", { class: "admin-page__count" }, " Каталог встроенных field-компонентов library + примеры использования ")
4432
4461
  ])
4433
4462
  ], -1)),
4434
- (o(!0), c(P, null, D(r(n), (i, u) => (o(), c("section", {
4463
+ (o(!0), c(M, null, D(r(n), (i, u) => (o(), c("section", {
4435
4464
  key: u,
4436
4465
  class: "admin-gallery__group"
4437
4466
  }, [
4438
- d("h2", Bi, p(u), 1),
4439
- d("div", Ii, [
4440
- (o(!0), c(P, null, D(i, (f) => (o(), b(r(j), {
4467
+ d("h2", Ii, h(u), 1),
4468
+ d("div", Di, [
4469
+ (o(!0), c(M, null, D(i, (f) => (o(), b(r(K), {
4441
4470
  key: f.type + f.title,
4442
4471
  padding: "md",
4443
4472
  class: "admin-gallery__card"
4444
4473
  }, {
4445
4474
  default: m(() => [
4446
- d("header", Di, [
4447
- d("h3", Vi, p(f.title), 1),
4448
- d("code", zi, "type: " + p(f.type), 1)
4475
+ d("header", Vi, [
4476
+ d("h3", zi, h(f.title), 1),
4477
+ d("code", qi, "type: " + h(f.type), 1)
4449
4478
  ]),
4450
- d("p", qi, p(f.description), 1),
4451
- d("div", Oi, [
4452
- $(St, {
4479
+ d("p", Oi, h(f.description), 1),
4480
+ d("div", Wi, [
4481
+ $(Ct, {
4453
4482
  node: f.node
4454
4483
  }, null, 8, ["node"])
4455
4484
  ])
@@ -4462,118 +4491,118 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4462
4491
  }
4463
4492
  });
4464
4493
  export {
4465
- Bn as AdminApp,
4466
- Pn as AdminShell,
4467
- Rn as AdminSidebar,
4468
- $n as AdminTopBar,
4494
+ In as AdminApp,
4495
+ Mn as AdminShell,
4496
+ Tn as AdminSidebar,
4497
+ xn as AdminTopBar,
4469
4498
  ae as ApiError,
4470
- Zs as BadgeEntry,
4471
- ls as BarChartWidget,
4499
+ ei as BadgeEntry,
4500
+ ss as BarChartWidget,
4472
4501
  ze as CheckboxField,
4473
4502
  Ks as ColumnsLayout,
4474
- Jl as DashboardPage,
4503
+ Ql as DashboardPage,
4475
4504
  ue as DateField,
4476
- fs as DonutChartWidget,
4477
- ko as FieldGalleryPage,
4478
- St as FieldRenderer,
4479
- gn as ForbiddenError,
4480
- Gn as ForbiddenPage,
4481
- $s as GaugeWidget,
4482
- ys as HeatmapWidget,
4505
+ vs as DonutChartWidget,
4506
+ wo as FieldGalleryPage,
4507
+ Ct as FieldRenderer,
4508
+ hn as ForbiddenError,
4509
+ Hn as ForbiddenPage,
4510
+ xs as GaugeWidget,
4511
+ bs as HeatmapWidget,
4483
4512
  Kn as HomePage,
4484
- ni as IconEntry,
4485
- bo as ImportWizardPage,
4486
- ul as InfolistRenderer,
4513
+ ai as IconEntry,
4514
+ ko as ImportWizardPage,
4515
+ dl as InfolistRenderer,
4487
4516
  ot as KeyValueEntry,
4488
4517
  we as LayoutRenderer,
4489
4518
  yt as LocaleSwitcher,
4490
- ua as LoginForm,
4491
- ka as LoginPage,
4492
- As as MarkdownWidget,
4519
+ da as LoginForm,
4520
+ wa as LoginPage,
4521
+ Es as MarkdownWidget,
4493
4522
  Pe as NetworkError,
4494
- hn as NotFoundError,
4495
- Xn as NotFoundPage,
4496
- pn as NotificationBell,
4497
- yo as NotificationsDrawer,
4523
+ _n as NotFoundError,
4524
+ Yn as NotFoundPage,
4525
+ gn as NotificationBell,
4526
+ bo as NotificationsDrawer,
4498
4527
  Ve as NumberField,
4499
- Dl as ProfilePage,
4500
- gs as RecentTableWidget,
4528
+ Vl as ProfilePage,
4529
+ hs as RecentTableWidget,
4501
4530
  lt as ResourceFormPage,
4502
- qa as ResourceIndexPage,
4503
- hl as ResourceViewPage,
4531
+ Oa as ResourceIndexPage,
4532
+ _l as ResourceViewPage,
4504
4533
  it as RowsLayout,
4505
4534
  he as SectionLayout,
4506
4535
  le as SelectField,
4507
- ea as SettingsPage,
4508
- Ql as StatWidget,
4509
- Ys as TabsLayout,
4536
+ ta as SettingsPage,
4537
+ Zl as StatWidget,
4538
+ Js as TabsLayout,
4510
4539
  Se as TextAreaField,
4511
4540
  I as TextEntry,
4512
4541
  J as TextField,
4513
4542
  _t as ThemeToggle,
4514
- ma as TwoFactorForm,
4543
+ fa as TwoFactorForm,
4515
4544
  bt as UnauthenticatedError,
4516
- Qa as UnknownEntry,
4517
- xt as UnknownField,
4518
- la as UnknownScreenPage,
4519
- ql as UnknownWidget,
4520
- yn as UserMenu,
4545
+ Za as UnknownEntry,
4546
+ St as UnknownField,
4547
+ sa as UnknownScreenPage,
4548
+ Ol as UnknownWidget,
4549
+ bn as UserMenu,
4521
4550
  Le as ValidationError,
4522
- Ol as WidgetRenderer,
4523
- Ds as buildRoutesFromManifest,
4524
- Yi as clearAdminClient,
4525
- ro as clearInfolistRegistry,
4526
- lo as clearRegistry,
4527
- vo as clearWidgetRegistry,
4528
- go as createAdminApp,
4551
+ Wl as WidgetRenderer,
4552
+ Vs as buildRoutesFromManifest,
4553
+ Ji as clearAdminClient,
4554
+ uo as clearInfolistRegistry,
4555
+ so as clearRegistry,
4556
+ po as clearWidgetRegistry,
4557
+ ho as createAdminApp,
4529
4558
  Us as createAdminClient,
4530
- Ws as createAdminRouter,
4531
- Vs as createAuthGuard,
4532
- zs as createTitleGuard,
4559
+ js as createAdminRouter,
4560
+ zs as createAuthGuard,
4561
+ qs as createTitleGuard,
4533
4562
  H as getAdminClient,
4534
- $t as getField,
4563
+ xt as getField,
4535
4564
  st as getInfolistEntry,
4536
4565
  at as getLayout,
4537
- Vl as getWidget,
4538
- Ji as hasAdminClient,
4539
- Zi as hasField,
4540
- io as hasInfolistEntry,
4541
- no as hasLayout,
4542
- mo as hasWidget,
4543
- po as isError,
4566
+ zl as getWidget,
4567
+ Qi as hasAdminClient,
4568
+ eo as hasField,
4569
+ oo as hasInfolistEntry,
4570
+ ao as hasLayout,
4571
+ fo as hasWidget,
4572
+ go as isError,
4544
4573
  Fs as isSuccess,
4545
- eo as listFields,
4546
- oo as listInfolistEntries,
4547
- ao as listLayouts,
4548
- fo as listWidgets,
4549
- ho as loadBootstrap,
4574
+ to as listFields,
4575
+ ro as listInfolistEntries,
4576
+ lo as listLayouts,
4577
+ vo as listWidgets,
4578
+ _o as loadBootstrap,
4550
4579
  ht as provideFormState,
4551
- dl as provideRecord,
4552
- _o as readCsrfFromMeta,
4553
- ii as readInlineBootstrap,
4554
- Js as registerBuiltinComponents,
4555
- li as registerBuiltinInfolistEntries,
4556
- Es as registerBuiltinWidgets,
4557
- Oa as registerComponents,
4558
- Qi as registerField,
4559
- Ja as registerInfolistEntries,
4560
- so as registerInfolistEntry,
4561
- to as registerLayout,
4562
- co as registerWidget,
4563
- zl as registerWidgets,
4564
- dn as setAdminClient,
4580
+ cl as provideRecord,
4581
+ yo as readCsrfFromMeta,
4582
+ oi as readInlineBootstrap,
4583
+ Qs as registerBuiltinComponents,
4584
+ si as registerBuiltinInfolistEntries,
4585
+ Rs as registerBuiltinWidgets,
4586
+ Wa as registerComponents,
4587
+ Zi as registerField,
4588
+ Qa as registerInfolistEntries,
4589
+ io as registerInfolistEntry,
4590
+ no as registerLayout,
4591
+ mo as registerWidget,
4592
+ ql as registerWidgets,
4593
+ cn as setAdminClient,
4565
4594
  et as toApiError,
4566
- xo as tryUseFormState,
4595
+ So as tryUseFormState,
4567
4596
  Ne as tryUseRecord,
4568
- Q as useAuthStore,
4597
+ Z as useAuthStore,
4569
4598
  ce as useFormState,
4570
4599
  He as useLocaleStore,
4571
4600
  oe as useManifestStore,
4572
4601
  kt as useMenuStore,
4573
4602
  Xe as useNotificationsStore,
4574
- uo as useRecord,
4575
- wt as useResourceFormStore,
4576
- wa as useResourceIndexStore,
4603
+ co as useRecord,
4604
+ $t as useResourceFormStore,
4605
+ wt as useResourceIndexStore,
4577
4606
  Ge as useThemeStore
4578
4607
  };
4579
4608
  //# sourceMappingURL=index.mjs.map