@opengis/widgets 0.0.9 → 0.0.10

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.js CHANGED
@@ -1,24 +1,24 @@
1
- import { h as G, defineComponent as C, mergeModels as N, useModel as Z, ref as $, createElementBlock as a, openBlock as o, createElementVNode as t, createVNode as y, unref as h, withDirectives as X, vModelText as ae, createCommentVNode as b, createTextVNode as I, onMounted as le, onUnmounted as J, resolveComponent as re, normalizeClass as x, createBlock as D, toDisplayString as f, Fragment as L, renderList as H, normalizeStyle as F, resolveDynamicComponent as z, Teleport as de, TransitionGroup as ge, withCtx as fe, computed as T, nextTick as ve, renderSlot as E, mergeProps as K, vShow as ye } from "vue";
1
+ import { h as Y, defineComponent as C, mergeModels as J, useModel as se, ref as w, createElementBlock as a, openBlock as o, createElementVNode as t, createVNode as b, unref as y, withDirectives as O, vModelText as ve, createCommentVNode as x, createTextVNode as V, onMounted as oe, onUnmounted as ne, resolveComponent as ee, normalizeClass as _, createBlock as D, toDisplayString as v, Fragment as z, renderList as F, normalizeStyle as E, resolveDynamicComponent as S, withModifiers as G, computed as A, Teleport as ye, TransitionGroup as $e, withCtx as Ce, nextTick as Me, renderSlot as U, mergeProps as te, vShow as Le, vModelRadio as Q, vModelCheckbox as De } from "vue";
2
2
  /**
3
3
  * @license lucide-vue-next v0.535.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
7
  */
8
- const Y = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), be = (r) => r.replace(
8
+ const re = (l) => l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Te = (l) => l.replace(
9
9
  /^([A-Z])|[\s-_]+(\w)/g,
10
- (n, i, e) => e ? e.toUpperCase() : i.toLowerCase()
11
- ), xe = (r) => {
12
- const n = be(r);
13
- return n.charAt(0).toUpperCase() + n.slice(1);
14
- }, ke = (...r) => r.filter((n, i, e) => !!n && n.trim() !== "" && e.indexOf(n) === i).join(" ").trim();
10
+ (i, n, e) => e ? e.toUpperCase() : n.toLowerCase()
11
+ ), je = (l) => {
12
+ const i = Te(l);
13
+ return i.charAt(0).toUpperCase() + i.slice(1);
14
+ }, Ie = (...l) => l.filter((i, n, e) => !!i && i.trim() !== "" && e.indexOf(i) === n).join(" ").trim();
15
15
  /**
16
16
  * @license lucide-vue-next v0.535.0 - ISC
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
20
  */
21
- var B = {
21
+ var Z = {
22
22
  xmlns: "http://www.w3.org/2000/svg",
23
23
  width: 24,
24
24
  height: 24,
@@ -35,21 +35,21 @@ var B = {
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
37
  */
38
- const _e = ({ size: r, strokeWidth: n = 2, absoluteStrokeWidth: i, color: e, iconNode: s, name: g, class: u, ...p }, { slots: d }) => G(
38
+ const Ve = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: e, iconNode: s, name: f, class: p, ...g }, { slots: u }) => Y(
39
39
  "svg",
40
40
  {
41
- ...B,
42
- width: r || B.width,
43
- height: r || B.height,
44
- stroke: e || B.stroke,
45
- "stroke-width": i ? Number(n) * 24 / Number(r) : n,
46
- class: ke(
41
+ ...Z,
42
+ width: l || Z.width,
43
+ height: l || Z.height,
44
+ stroke: e || Z.stroke,
45
+ "stroke-width": n ? Number(i) * 24 / Number(l) : i,
46
+ class: Ie(
47
47
  "lucide",
48
- ...g ? [`lucide-${Y(xe(g))}-icon`, `lucide-${Y(g)}`] : ["lucide-icon"]
48
+ ...f ? [`lucide-${re(je(f))}-icon`, `lucide-${re(f)}`] : ["lucide-icon"]
49
49
  ),
50
- ...p
50
+ ...g
51
51
  },
52
- [...s.map((c) => G(...c)), ...d.default ? [d.default()] : []]
52
+ [...s.map((m) => Y(...m)), ...u.default ? [u.default()] : []]
53
53
  );
54
54
  /**
55
55
  * @license lucide-vue-next v0.535.0 - ISC
@@ -57,12 +57,12 @@ const _e = ({ size: r, strokeWidth: n = 2, absoluteStrokeWidth: i, color: e, ico
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
59
  */
60
- const _ = (r, n) => (i, { slots: e }) => G(
61
- _e,
60
+ const $ = (l, i) => (n, { slots: e }) => Y(
61
+ Ve,
62
62
  {
63
- ...i,
64
- iconNode: n,
65
- name: r
63
+ ...n,
64
+ iconNode: i,
65
+ name: l
66
66
  },
67
67
  e
68
68
  );
@@ -72,7 +72,7 @@ const _ = (r, n) => (i, { slots: e }) => G(
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
74
  */
75
- const we = _("archive", [
75
+ const ze = $("archive", [
76
76
  ["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
77
77
  ["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
78
78
  ["path", { d: "M10 12h4", key: "a56b0p" }]
@@ -83,7 +83,7 @@ const we = _("archive", [
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
85
  */
86
- const $e = _("arrow-right", [
86
+ const Fe = $("arrow-right", [
87
87
  ["path", { d: "M5 12h14", key: "1ays0h" }],
88
88
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
89
89
  ]);
@@ -93,7 +93,7 @@ const $e = _("arrow-right", [
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
95
  */
96
- const Ce = _("circle-check-big", [
96
+ const Ae = $("circle-check-big", [
97
97
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
98
98
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
99
99
  ]);
@@ -103,7 +103,7 @@ const Ce = _("circle-check-big", [
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
105
  */
106
- const U = _("download", [
106
+ const ie = $("download", [
107
107
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
108
108
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
109
109
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
@@ -114,7 +114,7 @@ const U = _("download", [
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
116
  */
117
- const Me = _("ellipsis", [
117
+ const He = $("ellipsis", [
118
118
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
119
119
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
120
120
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
@@ -125,7 +125,7 @@ const Me = _("ellipsis", [
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
127
  */
128
- const R = _("file-text", [
128
+ const W = $("file-text", [
129
129
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
130
130
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
131
131
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
@@ -138,7 +138,7 @@ const R = _("file-text", [
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
140
  */
141
- const De = _("file", [
141
+ const Se = $("file", [
142
142
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
143
143
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
144
144
  ]);
@@ -148,7 +148,7 @@ const De = _("file", [
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
150
  */
151
- const je = _("grid-3x3", [
151
+ const Ee = $("grid-3x3", [
152
152
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
153
153
  ["path", { d: "M3 9h18", key: "1pudct" }],
154
154
  ["path", { d: "M3 15h18", key: "5xshup" }],
@@ -161,7 +161,7 @@ const je = _("grid-3x3", [
161
161
  * This source code is licensed under the ISC license.
162
162
  * See the LICENSE file in the root directory of this source tree.
163
163
  */
164
- const Le = _("heart", [
164
+ const Oe = $("heart", [
165
165
  [
166
166
  "path",
167
167
  {
@@ -176,7 +176,7 @@ const Le = _("heart", [
176
176
  * This source code is licensed under the ISC license.
177
177
  * See the LICENSE file in the root directory of this source tree.
178
178
  */
179
- const Ie = _("history", [
179
+ const Be = $("history", [
180
180
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
181
181
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
182
182
  ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
@@ -187,7 +187,7 @@ const Ie = _("history", [
187
187
  * This source code is licensed under the ISC license.
188
188
  * See the LICENSE file in the root directory of this source tree.
189
189
  */
190
- const ee = _("image", [
190
+ const de = $("image", [
191
191
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
192
192
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
193
193
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
@@ -198,7 +198,7 @@ const ee = _("image", [
198
198
  * This source code is licensed under the ISC license.
199
199
  * See the LICENSE file in the root directory of this source tree.
200
200
  */
201
- const He = _("list", [
201
+ const Re = $("list", [
202
202
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
203
203
  ["path", { d: "M3 18h.01", key: "1tta3j" }],
204
204
  ["path", { d: "M3 6h.01", key: "1rqtza" }],
@@ -212,7 +212,7 @@ const He = _("list", [
212
212
  * This source code is licensed under the ISC license.
213
213
  * See the LICENSE file in the root directory of this source tree.
214
214
  */
215
- const Te = _("plus", [
215
+ const Ne = $("plus", [
216
216
  ["path", { d: "M5 12h14", key: "1ays0h" }],
217
217
  ["path", { d: "M12 5v14", key: "s699le" }]
218
218
  ]);
@@ -222,7 +222,7 @@ const Te = _("plus", [
222
222
  * This source code is licensed under the ISC license.
223
223
  * See the LICENSE file in the root directory of this source tree.
224
224
  */
225
- const ze = _("reply", [
225
+ const Ue = $("reply", [
226
226
  ["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4", key: "5vmcpk" }],
227
227
  ["path", { d: "m9 17-5-5 5-5", key: "nvlc11" }]
228
228
  ]);
@@ -232,7 +232,7 @@ const ze = _("reply", [
232
232
  * This source code is licensed under the ISC license.
233
233
  * See the LICENSE file in the root directory of this source tree.
234
234
  */
235
- const ce = _("send", [
235
+ const be = $("send", [
236
236
  [
237
237
  "path",
238
238
  {
@@ -248,7 +248,7 @@ const ce = _("send", [
248
248
  * This source code is licensed under the ISC license.
249
249
  * See the LICENSE file in the root directory of this source tree.
250
250
  */
251
- const Fe = _("share", [
251
+ const We = $("share", [
252
252
  ["path", { d: "M12 2v13", key: "1km8f5" }],
253
253
  ["path", { d: "m16 6-4-4-4 4", key: "13yo43" }],
254
254
  ["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }]
@@ -259,7 +259,7 @@ const Fe = _("share", [
259
259
  * This source code is licensed under the ISC license.
260
260
  * See the LICENSE file in the root directory of this source tree.
261
261
  */
262
- const Ve = _("sheet", [
262
+ const Ge = $("sheet", [
263
263
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
264
264
  ["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }],
265
265
  ["line", { x1: "3", x2: "21", y1: "15", y2: "15", key: "o2sbyz" }],
@@ -272,7 +272,7 @@ const Ve = _("sheet", [
272
272
  * This source code is licensed under the ISC license.
273
273
  * See the LICENSE file in the root directory of this source tree.
274
274
  */
275
- const Ae = _("square-pen", [
275
+ const qe = $("square-pen", [
276
276
  ["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
277
277
  [
278
278
  "path",
@@ -288,17 +288,7 @@ const Ae = _("square-pen", [
288
288
  * This source code is licensed under the ISC license.
289
289
  * See the LICENSE file in the root directory of this source tree.
290
290
  */
291
- const Se = _("stretch-horizontal", [
292
- ["rect", { width: "20", height: "6", x: "2", y: "4", rx: "2", key: "qdearl" }],
293
- ["rect", { width: "20", height: "6", x: "2", y: "14", rx: "2", key: "1xrn6j" }]
294
- ]);
295
- /**
296
- * @license lucide-vue-next v0.535.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */
301
- const q = _("trash-2", [
291
+ const le = $("trash-2", [
302
292
  ["path", { d: "M10 11v6", key: "nco0om" }],
303
293
  ["path", { d: "M14 11v6", key: "outv1u" }],
304
294
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
@@ -311,7 +301,7 @@ const q = _("trash-2", [
311
301
  * This source code is licensed under the ISC license.
312
302
  * See the LICENSE file in the root directory of this source tree.
313
303
  */
314
- const Ee = _("user-check", [
304
+ const Pe = $("user-check", [
315
305
  ["path", { d: "m16 11 2 2 4-4", key: "9rsbq5" }],
316
306
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
317
307
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
@@ -322,7 +312,7 @@ const Ee = _("user-check", [
322
312
  * This source code is licensed under the ISC license.
323
313
  * See the LICENSE file in the root directory of this source tree.
324
314
  */
325
- const Q = _("user", [
315
+ const ae = $("user", [
326
316
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
327
317
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
328
318
  ]);
@@ -332,7 +322,7 @@ const Q = _("user", [
332
322
  * This source code is licensed under the ISC license.
333
323
  * See the LICENSE file in the root directory of this source tree.
334
324
  */
335
- const Re = _("video", [
325
+ const Ke = $("video", [
336
326
  [
337
327
  "path",
338
328
  {
@@ -348,234 +338,234 @@ const Re = _("video", [
348
338
  * This source code is licensed under the ISC license.
349
339
  * See the LICENSE file in the root directory of this source tree.
350
340
  */
351
- const W = _("x", [
341
+ const X = $("x", [
352
342
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
353
343
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
354
- ]), Be = { class: "border-t pt-3 mt-4" }, Ne = { class: "flex gap-2" }, Oe = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Ue = { class: "flex-1 space-y-2" }, qe = { class: "flex justify-between items-center" }, We = { class: "flex gap-2" }, Pe = ["disabled"], ue = /* @__PURE__ */ C({
344
+ ]), Ze = { class: "border-t pt-3 mt-4" }, Je = { class: "flex gap-2" }, Xe = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Qe = { class: "flex-1 space-y-2" }, Ye = { class: "flex justify-between items-center" }, et = { class: "flex gap-2" }, tt = ["disabled"], xe = /* @__PURE__ */ C({
355
345
  __name: "CommentInputZone",
356
346
  props: {
357
347
  isReply: { type: Boolean, required: !1, default: !1 },
358
348
  isReplyModifiers: {}
359
349
  },
360
- emits: /* @__PURE__ */ N(["sendComment"], ["update:isReply"]),
361
- setup(r, { emit: n }) {
362
- const i = Z(r, "isReply"), e = $(""), s = n, g = () => {
350
+ emits: /* @__PURE__ */ J(["sendComment"], ["update:isReply"]),
351
+ setup(l, { emit: i }) {
352
+ const n = se(l, "isReply"), e = w(""), s = i, f = () => {
363
353
  e.value.trim() && (s("sendComment", e.value), e.value = "");
364
- }, u = (p) => {
365
- (p.ctrlKey || p.metaKey) && p.key === "Enter" && (p.preventDefault(), g());
354
+ }, p = (g) => {
355
+ (g.ctrlKey || g.metaKey) && g.key === "Enter" && (g.preventDefault(), f());
366
356
  };
367
- return (p, d) => (o(), a("div", Be, [
368
- t("div", Ne, [
369
- t("span", Oe, [
370
- y(h(Q), { class: "h-3 w-3 text-gray-500" })
357
+ return (g, u) => (o(), a("div", Ze, [
358
+ t("div", Je, [
359
+ t("span", Xe, [
360
+ b(y(ae), { class: "h-3 w-3 text-gray-500" })
371
361
  ]),
372
- t("div", Ue, [
373
- X(t("textarea", {
374
- "onUpdate:modelValue": d[0] || (d[0] = (c) => e.value = c),
375
- onKeydown: u,
362
+ t("div", Qe, [
363
+ O(t("textarea", {
364
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => e.value = m),
365
+ onKeydown: p,
376
366
  placeholder: "Add a comment...",
377
367
  class: "w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"
378
368
  }, null, 544), [
379
- [ae, e.value]
369
+ [ve, e.value]
380
370
  ]),
381
- t("div", qe, [
382
- d[4] || (d[4] = t("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
383
- t("div", We, [
384
- i.value ? (o(), a("button", {
371
+ t("div", Ye, [
372
+ u[4] || (u[4] = t("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
373
+ t("div", et, [
374
+ n.value ? (o(), a("button", {
385
375
  key: 0,
386
376
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
387
- onClick: d[1] || (d[1] = (c) => i.value = !1)
377
+ onClick: u[1] || (u[1] = (m) => n.value = !1)
388
378
  }, [
389
- y(h(W), { class: "h-3 w-3" }),
390
- d[2] || (d[2] = I(" Cancel ", -1))
391
- ])) : b("", !0),
379
+ b(y(X), { class: "h-3 w-3" }),
380
+ u[2] || (u[2] = V(" Cancel ", -1))
381
+ ])) : x("", !0),
392
382
  t("button", {
393
383
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
394
384
  disabled: !e.value.trim(),
395
- onClick: g
385
+ onClick: f
396
386
  }, [
397
- y(h(ce), { class: "h-3 w-3 mr-1" }),
398
- d[3] || (d[3] = I(" Send ", -1))
399
- ], 8, Pe)
387
+ b(y(be), { class: "h-3 w-3 mr-1" }),
388
+ u[3] || (u[3] = V(" Send ", -1))
389
+ ], 8, tt)
400
390
  ])
401
391
  ])
402
392
  ])
403
393
  ])
404
394
  ]));
405
395
  }
406
- }), Ge = { class: "z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto" }, Ke = /* @__PURE__ */ C({
396
+ }), st = { class: "z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto" }, ot = /* @__PURE__ */ C({
407
397
  __name: "CommentDetails",
408
398
  props: {
409
399
  showMoreOptions: { type: Boolean, required: !0, default: !1 },
410
400
  showMoreOptionsModifiers: {}
411
401
  },
412
- emits: /* @__PURE__ */ N(["edit", "delete"], ["update:showMoreOptions"]),
413
- setup(r, { emit: n }) {
414
- const i = n, e = Z(r, "showMoreOptions"), s = $(), g = $(!0), u = async (c) => {
415
- e.value && s.value && !s.value.contains(c.target) && !g.value && (e.value = !1), g.value = !1;
416
- }, p = () => {
417
- e.value = !1, i("edit");
418
- }, d = () => {
419
- e.value = !1, i("delete");
402
+ emits: /* @__PURE__ */ J(["edit", "delete"], ["update:showMoreOptions"]),
403
+ setup(l, { emit: i }) {
404
+ const n = i, e = se(l, "showMoreOptions"), s = w(), f = w(!0), p = async (m) => {
405
+ e.value && s.value && !s.value.contains(m.target) && !f.value && (e.value = !1), f.value = !1;
406
+ }, g = () => {
407
+ e.value = !1, n("edit");
408
+ }, u = () => {
409
+ e.value = !1, n("delete");
420
410
  };
421
- return le(() => {
422
- document.addEventListener("click", u);
423
- }), J(() => {
424
- document.removeEventListener("click", u);
425
- }), (c, l) => (o(), a("div", {
411
+ return oe(() => {
412
+ document.addEventListener("click", p);
413
+ }), ne(() => {
414
+ document.removeEventListener("click", p);
415
+ }), (m, r) => (o(), a("div", {
426
416
  class: "absolute bg-white left-0 top-full transform min-w-max z-50",
427
417
  ref_key: "moreOptionsRef",
428
418
  ref: s
429
419
  }, [
430
- t("div", Ge, [
420
+ t("div", st, [
431
421
  t("div", {
432
422
  class: "relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",
433
- onClick: p
423
+ onClick: g
434
424
  }, [
435
- y(h(Ae), { class: "h-3 w-3 mr-2" }),
436
- l[0] || (l[0] = I(" Edit ", -1))
425
+ b(y(qe), { class: "h-3 w-3 mr-2" }),
426
+ r[0] || (r[0] = V(" Edit ", -1))
437
427
  ]),
438
428
  t("div", {
439
429
  class: "relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",
440
- onClick: d
430
+ onClick: u
441
431
  }, [
442
- y(h(q), { class: "h-3 w-3 mr-2" }),
443
- l[1] || (l[1] = I(" Delete ", -1))
432
+ b(y(le), { class: "h-3 w-3 mr-2" }),
433
+ r[1] || (r[1] = V(" Delete ", -1))
444
434
  ])
445
435
  ])
446
436
  ], 512));
447
437
  }
448
- }), Ze = { class: "space-y-2" }, Xe = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Je = { class: "flex-1 min-w-0 space-y-1 relative" }, Qe = { class: "flex items-center gap-2" }, Ye = { class: "font-medium text-xs" }, et = { class: "text-xs text-gray-500" }, tt = {
438
+ }), nt = { class: "space-y-2" }, it = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, lt = { class: "flex-1 min-w-0 space-y-1 relative" }, at = { class: "flex items-center gap-2" }, rt = { class: "font-medium text-xs" }, dt = { class: "text-xs text-gray-500" }, ct = {
449
439
  key: 0,
450
440
  class: "text-xs text-gray-700 leading-relaxed"
451
- }, st = { class: "flex justify-between text-xs" }, ot = { class: "flex items-center gap-2" }, nt = {
441
+ }, ut = { class: "flex justify-between text-xs" }, pt = { class: "flex items-center gap-2" }, mt = {
452
442
  key: 0,
453
443
  class: "flex gap-2"
454
- }, it = ["disabled"], at = {
444
+ }, gt = ["disabled"], ht = {
455
445
  key: 0,
456
446
  class: "ml-8 space-y-1 border-l-2 border-gray-100 pl-3"
457
- }, lt = /* @__PURE__ */ C({
447
+ }, ft = /* @__PURE__ */ C({
458
448
  __name: "CommentItem",
459
449
  props: {
460
450
  comment: {},
461
451
  isInside: { type: Boolean }
462
452
  },
463
453
  emits: ["like", "reply", "edit", "delete"],
464
- setup(r, { emit: n }) {
465
- const i = n, e = r, s = $(e.comment.text), g = $("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), u = $("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"), p = $(!1), d = $(!1), c = $(!1), l = $(!1), m = (w) => {
466
- const v = /* @__PURE__ */ new Date(), S = Math.floor(
467
- (v.getTime() - w.getTime()) / (1e3 * 60 * 60)
454
+ setup(l, { emit: i }) {
455
+ const n = i, e = l, s = w(e.comment.text), f = w("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), p = w("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"), g = w(!1), u = w(!1), m = w(!1), r = w(!1), h = (d) => {
456
+ const c = /* @__PURE__ */ new Date(), T = Math.floor(
457
+ (c.getTime() - d.getTime()) / (1e3 * 60 * 60)
468
458
  );
469
- return S < 1 ? `${Math.floor(
470
- (v.getTime() - w.getTime()) / 6e4
471
- )}m` : S < 24 ? `${S}h` : `${Math.floor(S / 24)}d`;
472
- }, k = () => {
473
- l.value = !l.value, l.value ? i("like", e.comment.id, "add") : i("like", e.comment.id, "delete");
474
- }, j = () => {
475
- i("edit", e.comment.id, s.value), c.value = !1;
476
- }, P = (w, v) => {
477
- i("like", w, v);
478
- }, V = (w, v) => {
479
- i("edit", w, v);
459
+ return T < 1 ? `${Math.floor(
460
+ (c.getTime() - d.getTime()) / 6e4
461
+ )}m` : T < 24 ? `${T}h` : `${Math.floor(T / 24)}d`;
462
+ }, I = () => {
463
+ r.value = !r.value, r.value ? n("like", e.comment.id, "add") : n("like", e.comment.id, "delete");
464
+ }, H = () => {
465
+ n("edit", e.comment.id, s.value), m.value = !1;
466
+ }, R = (d, c) => {
467
+ n("like", d, c);
468
+ }, M = (d, c) => {
469
+ n("edit", d, c);
480
470
  };
481
- return (w, v) => {
482
- const S = re("CommentItem", !0);
483
- return o(), a("div", Ze, [
471
+ return (d, c) => {
472
+ const T = ee("CommentItem", !0);
473
+ return o(), a("div", nt, [
484
474
  t("div", {
485
- class: x(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", c.value ? "bg-gray-50" : ""])
475
+ class: _(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", m.value ? "bg-gray-50" : ""])
486
476
  }, [
487
- t("span", Xe, [
488
- y(h(Q), { class: "h-3 w-3 text-gray-500" })
477
+ t("span", it, [
478
+ b(y(ae), { class: "h-3 w-3 text-gray-500" })
489
479
  ]),
490
- t("div", Je, [
491
- t("div", Qe, [
492
- t("span", Ye, f(w.comment?.author), 1),
493
- t("span", et, f(m(w.comment?.createdAt)), 1)
480
+ t("div", lt, [
481
+ t("div", at, [
482
+ t("span", rt, v(d.comment?.author), 1),
483
+ t("span", dt, v(h(d.comment?.createdAt)), 1)
494
484
  ]),
495
- c.value ? X((o(), a("textarea", {
485
+ m.value ? O((o(), a("textarea", {
496
486
  key: 1,
497
- "onUpdate:modelValue": v[0] || (v[0] = (M) => s.value = M),
498
- class: x(c.value ? u.value : g.value)
487
+ "onUpdate:modelValue": c[0] || (c[0] = (k) => s.value = k),
488
+ class: _(m.value ? p.value : f.value)
499
489
  }, null, 2)), [
500
- [ae, s.value]
501
- ]) : (o(), a("p", tt, f(w.comment?.text), 1)),
502
- t("div", st, [
503
- t("div", ot, [
490
+ [ve, s.value]
491
+ ]) : (o(), a("p", ct, v(d.comment?.text), 1)),
492
+ t("div", ut, [
493
+ t("div", pt, [
504
494
  t("button", {
505
- class: x(["flex items-center gap-1", l.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
506
- onClick: v[1] || (v[1] = (M) => k())
495
+ class: _(["flex items-center gap-1", r.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
496
+ onClick: c[1] || (c[1] = (k) => I())
507
497
  }, [
508
- y(h(Le), {
509
- class: x(["h-3 w-3", l.value ? "fill-blue-600" : ""])
498
+ b(y(Oe), {
499
+ class: _(["h-3 w-3", r.value ? "fill-blue-600" : ""])
510
500
  }, null, 8, ["class"]),
511
- I(" " + f(w.comment?.likes), 1)
501
+ V(" " + v(d.comment?.likes), 1)
512
502
  ], 2),
513
- w.isInside ? b("", !0) : (o(), a("button", {
503
+ d.isInside ? x("", !0) : (o(), a("button", {
514
504
  key: 0,
515
505
  class: "text-gray-500 hover:text-blue-600 transition-colors",
516
- onClick: v[2] || (v[2] = (M) => d.value = !0)
506
+ onClick: c[2] || (c[2] = (k) => u.value = !0)
517
507
  }, [
518
- y(h(ze), { class: "h-3 w-3" })
508
+ b(y(Ue), { class: "h-3 w-3" })
519
509
  ])),
520
510
  t("button", {
521
511
  class: "text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",
522
512
  type: "button",
523
- onClick: v[3] || (v[3] = (M) => p.value = !0)
513
+ onClick: c[3] || (c[3] = (k) => g.value = !0)
524
514
  }, [
525
- y(h(Me), { class: "h-3 w-3" })
515
+ b(y(He), { class: "h-3 w-3" })
526
516
  ])
527
517
  ]),
528
- c.value ? (o(), a("div", nt, [
518
+ m.value ? (o(), a("div", mt, [
529
519
  t("button", {
530
520
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
531
- onClick: v[4] || (v[4] = (M) => c.value = !1)
521
+ onClick: c[4] || (c[4] = (k) => m.value = !1)
532
522
  }, [
533
- y(h(W), { class: "h-3 w-3" }),
534
- v[11] || (v[11] = I(" Cancel ", -1))
523
+ b(y(X), { class: "h-3 w-3" }),
524
+ c[11] || (c[11] = V(" Cancel ", -1))
535
525
  ]),
536
526
  t("button", {
537
527
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
538
528
  disabled: !s.value.trim(),
539
- onClick: v[5] || (v[5] = (M) => j())
529
+ onClick: c[5] || (c[5] = (k) => H())
540
530
  }, [
541
- y(h(ce), { class: "h-3 w-3 mr-1" }),
542
- v[12] || (v[12] = I(" Send ", -1))
543
- ], 8, it)
544
- ])) : b("", !0)
531
+ b(y(be), { class: "h-3 w-3 mr-1" }),
532
+ c[12] || (c[12] = V(" Send ", -1))
533
+ ], 8, gt)
534
+ ])) : x("", !0)
545
535
  ])
546
536
  ]),
547
- p.value ? (o(), D(Ke, {
537
+ g.value ? (o(), D(ot, {
548
538
  key: 0,
549
- showMoreOptions: p.value,
550
- "onUpdate:showMoreOptions": v[6] || (v[6] = (M) => p.value = M),
551
- onEdit: v[7] || (v[7] = (M) => c.value = !0),
552
- onDelete: v[8] || (v[8] = (M) => w.$emit("delete", w.comment?.id)),
553
- comment: w.comment
554
- }, null, 8, ["showMoreOptions", "comment"])) : b("", !0)
539
+ showMoreOptions: g.value,
540
+ "onUpdate:showMoreOptions": c[6] || (c[6] = (k) => g.value = k),
541
+ onEdit: c[7] || (c[7] = (k) => m.value = !0),
542
+ onDelete: c[8] || (c[8] = (k) => d.$emit("delete", d.comment?.id)),
543
+ comment: d.comment
544
+ }, null, 8, ["showMoreOptions", "comment"])) : x("", !0)
555
545
  ], 2),
556
- w.isInside ? b("", !0) : (o(), a("div", at, [
557
- (o(!0), a(L, null, H(w.comment?.replies, (M) => (o(), D(S, {
558
- key: M.id,
559
- comment: M,
546
+ d.isInside ? x("", !0) : (o(), a("div", ht, [
547
+ (o(!0), a(z, null, F(d.comment?.replies, (k) => (o(), D(T, {
548
+ key: k.id,
549
+ comment: k,
560
550
  isInside: !0,
561
- onDelete: (Mo) => w.$emit("delete", M.id),
562
- onLike: P,
563
- onEdit: V
551
+ onDelete: (j) => d.$emit("delete", k.id),
552
+ onLike: R,
553
+ onEdit: M
564
554
  }, null, 8, ["comment", "onDelete"]))), 128)),
565
- d.value && !w.isInside ? (o(), D(ue, {
555
+ u.value && !d.isInside ? (o(), D(xe, {
566
556
  key: 0,
567
- onSendComment: v[9] || (v[9] = (M) => w.$emit("reply", w.comment?.id, M)),
568
- isReply: d.value,
569
- "onUpdate:isReply": v[10] || (v[10] = (M) => d.value = M)
570
- }, null, 8, ["isReply"])) : b("", !0)
557
+ onSendComment: c[9] || (c[9] = (k) => d.$emit("reply", d.comment?.id, k)),
558
+ isReply: u.value,
559
+ "onUpdate:isReply": c[10] || (c[10] = (k) => u.value = k)
560
+ }, null, 8, ["isReply"])) : x("", !0)
571
561
  ]))
572
562
  ]);
573
563
  };
574
564
  }
575
- }), rt = ["id"], dt = {
565
+ }), vt = ["id"], yt = {
576
566
  key: 0,
577
567
  class: "text-xl font-semibold text-gray-900 mb-4"
578
- }, te = /* @__PURE__ */ C({
568
+ }, ce = /* @__PURE__ */ C({
579
569
  __name: "CommentsWidget",
580
570
  props: {
581
571
  title: {},
@@ -591,79 +581,79 @@ const W = _("x", [
591
581
  style: {}
592
582
  },
593
583
  emits: ["add", "reply", "like", "delete", "edit"],
594
- setup(r, { emit: n }) {
595
- const i = r, e = n, s = (c) => {
596
- i.onAddComment(c), e("add", c);
597
- }, g = (c, l) => {
598
- i.onLike(c, l), e("like", c, l);
599
- }, u = (c, l) => {
600
- i.onReply(c, l), e("reply", c, l);
601
- }, p = (c, l) => {
602
- i.onEdit(c, l), e("edit", c, l);
603
- }, d = (c) => {
604
- i.onDelete(c), e("delete", c);
584
+ setup(l, { emit: i }) {
585
+ const n = l, e = i, s = (m) => {
586
+ n.onAddComment(m), e("add", m);
587
+ }, f = (m, r) => {
588
+ n.onLike(m, r), e("like", m, r);
589
+ }, p = (m, r) => {
590
+ n.onReply(m, r), e("reply", m, r);
591
+ }, g = (m, r) => {
592
+ n.onEdit(m, r), e("edit", m, r);
593
+ }, u = (m) => {
594
+ n.onDelete(m), e("delete", m);
605
595
  };
606
- return (c, l) => (o(), a("div", {
607
- class: x(["mx-auto font-sans", c.className]),
608
- id: c.id,
609
- style: F(c.style)
596
+ return (m, r) => (o(), a("div", {
597
+ class: _(["mx-auto font-sans", m.className]),
598
+ id: m.id,
599
+ style: E(m.style)
610
600
  }, [
611
- c.title ? (o(), a("h3", dt, f(c.title), 1)) : b("", !0),
601
+ m.title ? (o(), a("h3", yt, v(m.title), 1)) : x("", !0),
612
602
  t("div", {
613
- class: x([c.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
614
- style: F({ maxHeight: c.maxHeight + "px" })
603
+ class: _([m.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
604
+ style: E({ maxHeight: m.maxHeight + "px" })
615
605
  }, [
616
- (o(!0), a(L, null, H(c.comments, (m) => (o(), D(lt, {
617
- key: m.id,
618
- comment: m,
619
- onReply: u,
620
- onLike: g,
621
- onDelete: l[0] || (l[0] = (k) => d(k)),
622
- onEdit: p
606
+ (o(!0), a(z, null, F(m.comments, (h) => (o(), D(ft, {
607
+ key: h.id,
608
+ comment: h,
609
+ onReply: p,
610
+ onLike: f,
611
+ onDelete: r[0] || (r[0] = (I) => u(I)),
612
+ onEdit: g
623
613
  }, null, 8, ["comment"]))), 128))
624
614
  ], 6),
625
- y(ue, {
626
- onSendComment: l[1] || (l[1] = (m) => s(m))
615
+ b(xe, {
616
+ onSendComment: r[1] || (r[1] = (h) => s(h))
627
617
  })
628
- ], 14, rt));
618
+ ], 14, vt));
629
619
  }
630
- }), se = /* @__PURE__ */ new Map([
620
+ }), ue = /* @__PURE__ */ new Map([
631
621
  ["file", {
632
622
  name: "File",
633
623
  color: "bg-green-100 text-green-700 border-green-200",
634
- icon: R
624
+ icon: W
635
625
  }],
636
626
  ["post", {
637
627
  name: "Post",
638
628
  color: "bg-blue-100 text-blue-700 border-blue-200",
639
- icon: Ve
629
+ icon: Ge
640
630
  }],
641
631
  ["user", {
642
632
  name: "User",
643
633
  color: "bg-purple-100 text-purple-700 border-purple-200",
644
- icon: Ee
634
+ icon: Pe
645
635
  }],
646
636
  ["custom", {
647
637
  name: "Custom",
648
638
  color: "bg-gray-100 text-gray-700 border-gray-200",
649
- icon: Ie
639
+ icon: Be
650
640
  }]
651
- ]), ct = { class: "mx-auto font-sans" }, ut = {
641
+ ]), bt = { class: "mx-auto font-sans" }, xt = {
652
642
  key: 0,
653
643
  class: "text-xl font-semibold text-gray-900 mb-4"
654
- }, pt = { class: "relative" }, mt = { class: "space-y-3" }, ht = { class: "flex-1 min-w-0 pb-2" }, gt = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, ft = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, vt = { class: "font-medium text-xs" }, yt = { class: "text-xs text-gray-500" }, bt = { class: "space-y-1" }, xt = { class: "text-xs text-gray-700" }, kt = { class: "capitalize mr-1" }, _t = {
644
+ }, kt = { class: "relative" }, wt = { class: "space-y-3" }, _t = { class: "flex-1 min-w-0 pb-2" }, $t = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Ct = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Mt = { class: "font-medium text-xs" }, Lt = { class: "text-xs text-gray-500" }, Dt = { class: "space-y-1" }, Tt = { class: "text-xs text-gray-700" }, jt = { class: "capitalize mr-1" }, It = {
655
645
  key: 0,
656
646
  class: "inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"
657
- }, wt = {
647
+ }, Vt = {
658
648
  key: 0,
659
649
  class: "flex items-center gap-1 text-xs"
660
- }, $t = {
650
+ }, zt = {
661
651
  key: 0,
662
652
  class: "bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"
663
- }, Ct = {
653
+ }, Ft = {
664
654
  key: 2,
665
655
  class: "bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"
666
- }, oe = /* @__PURE__ */ C({
656
+ }, pe = /* @__PURE__ */ C({
667
657
  __name: "HistoryWidget",
668
658
  props: {
669
659
  data: {},
@@ -673,46 +663,46 @@ const W = _("x", [
673
663
  className: {},
674
664
  style: {}
675
665
  },
676
- setup(r) {
677
- return (n, i) => (o(), a("div", ct, [
678
- n.title ? (o(), a("h3", ut, f(n.title), 1)) : b("", !0),
666
+ setup(l) {
667
+ return (i, n) => (o(), a("div", bt, [
668
+ i.title ? (o(), a("h3", xt, v(i.title), 1)) : x("", !0),
679
669
  t("div", {
680
- class: x(n.maxHeight ? "overflow-y-auto" : ""),
681
- style: F({ maxHeight: n.maxHeight + "px" })
670
+ class: _(i.maxHeight ? "overflow-y-auto" : ""),
671
+ style: E({ maxHeight: i.maxHeight + "px" })
682
672
  }, [
683
- t("div", pt, [
684
- i[0] || (i[0] = t("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
685
- t("div", mt, [
686
- (o(!0), a(L, null, H(n.data, (e) => (o(), a("div", {
673
+ t("div", kt, [
674
+ n[0] || (n[0] = t("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
675
+ t("div", wt, [
676
+ (o(!0), a(z, null, F(i.data, (e) => (o(), a("div", {
687
677
  class: "relative flex items-start gap-2",
688
678
  key: e?.id
689
679
  }, [
690
680
  t("div", {
691
- class: x(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${h(se).get(e?.entityType)?.color}`)
681
+ class: _(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${y(ue).get(e?.entityType)?.color}`)
692
682
  }, [
693
- (o(), D(z(h(se).get(e?.entityType)?.icon), { class: "h-3 w-3" }))
683
+ (o(), D(S(y(ue).get(e?.entityType)?.icon), { class: "h-3 w-3" }))
694
684
  ], 2),
695
- t("div", ht, [
696
- t("div", gt, [
697
- t("span", ft, [
698
- y(h(Q), { class: "h-3 w-3 text-gray-500" })
685
+ t("div", _t, [
686
+ t("div", $t, [
687
+ t("span", Ct, [
688
+ b(y(ae), { class: "h-3 w-3 text-gray-500" })
699
689
  ]),
700
- t("span", vt, f(e?.userName), 1),
701
- t("span", yt, f(e?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
690
+ t("span", Mt, v(e?.userName), 1),
691
+ t("span", Lt, v(e?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
702
692
  ]),
703
- t("div", bt, [
704
- t("div", xt, [
705
- t("span", kt, f(e?.action), 1),
706
- e?.entityId ? (o(), a("span", _t, f(e?.entityId), 1)) : b("", !0)
693
+ t("div", Dt, [
694
+ t("div", Tt, [
695
+ t("span", jt, v(e?.action), 1),
696
+ e?.entityId ? (o(), a("span", It, v(e?.entityId), 1)) : x("", !0)
707
697
  ]),
708
- e?.changes?.[e?.entityId] ? (o(), a("div", wt, [
709
- e?.changes?.[e?.entityId]?.old ? (o(), a("span", $t, f(e?.changes?.[e?.entityId]?.old), 1)) : b("", !0),
710
- e?.changes?.[e?.entityId]?.old && e?.changes?.[e?.entityId]?.new ? (o(), D(h($e), {
698
+ e?.changes?.[e?.entityId] ? (o(), a("div", Vt, [
699
+ e?.changes?.[e?.entityId]?.old ? (o(), a("span", zt, v(e?.changes?.[e?.entityId]?.old), 1)) : x("", !0),
700
+ e?.changes?.[e?.entityId]?.old && e?.changes?.[e?.entityId]?.new ? (o(), D(y(Fe), {
711
701
  key: 1,
712
702
  class: "h-2 w-2 text-gray-400"
713
- })) : b("", !0),
714
- e?.changes?.[e?.entityId]?.new ? (o(), a("span", Ct, f(e?.changes?.[e?.entityId]?.new), 1)) : b("", !0)
715
- ])) : b("", !0)
703
+ })) : x("", !0),
704
+ e?.changes?.[e?.entityId]?.new ? (o(), a("span", Ft, v(e?.changes?.[e?.entityId]?.new), 1)) : x("", !0)
705
+ ])) : x("", !0)
716
706
  ])
717
707
  ])
718
708
  ]))), 128))
@@ -721,243 +711,209 @@ const W = _("x", [
721
711
  ], 6)
722
712
  ]));
723
713
  }
724
- }), Mt = {
714
+ }), At = {
725
715
  key: 0,
726
716
  class: "text-xl font-semibold"
727
- }, Dt = { class: "flex gap-1" }, jt = { class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer" }, Lt = /* @__PURE__ */ C({
717
+ }, Ht = { class: "flex gap-1" }, St = { class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer" }, Et = /* @__PURE__ */ C({
728
718
  __name: "FileHeader",
729
- props: /* @__PURE__ */ N({
719
+ props: /* @__PURE__ */ J({
730
720
  title: {}
731
721
  }, {
732
722
  modelValue: {},
733
723
  modelModifiers: {}
734
724
  }),
735
- emits: /* @__PURE__ */ N(["onAddFile"], ["update:modelValue"]),
736
- setup(r) {
737
- const n = Z(r, "modelValue"), i = {
738
- active: "bg-black text-white hover:bg-black",
739
- inactive: "bg-white text-black hover:bg-gray-100"
725
+ emits: /* @__PURE__ */ J(["onAddFile"], ["update:modelValue"]),
726
+ setup(l) {
727
+ const i = se(l, "modelValue"), n = {
728
+ active: "bg-blue-100 text-black hover:bg-blue-100",
729
+ inactive: "bg-white text-black hover:bg-blue-100"
740
730
  };
741
731
  return (e, s) => (o(), a("div", {
742
- class: x(["flex flex-col sm:flex-row gap-3 mb-4", e.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
732
+ class: _(["flex flex-col sm:flex-row gap-3 mb-4", e.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
743
733
  }, [
744
- e.title ? (o(), a("h3", Mt, f(e.title), 1)) : b("", !0),
745
- t("div", Dt, [
746
- t("button", {
747
- class: x(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", n.value === "list" ? i.active : i.inactive]),
748
- onClick: s[0] || (s[0] = (g) => n.value = "list")
749
- }, [
750
- y(h(He), { class: "h-4 w-4" })
751
- ], 2),
734
+ e.title ? (o(), a("h3", At, v(e.title), 1)) : x("", !0),
735
+ t("div", Ht, [
752
736
  t("button", {
753
- class: x(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", n.value === "grid" ? i.active : i.inactive]),
754
- onClick: s[1] || (s[1] = (g) => n.value = "grid")
737
+ class: _(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", i.value === "list" ? n.active : n.inactive]),
738
+ onClick: s[0] || (s[0] = (f) => i.value = "list")
755
739
  }, [
756
- y(h(je), { class: "h-4 w-4" })
740
+ b(y(Re), { class: "h-4 w-4" })
757
741
  ], 2),
758
742
  t("button", {
759
- class: x(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", n.value === "compact" ? i.active : i.inactive]),
760
- onClick: s[2] || (s[2] = (g) => n.value = "compact")
743
+ class: _(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", i.value === "grid" ? n.active : n.inactive]),
744
+ onClick: s[1] || (s[1] = (f) => i.value = "grid")
761
745
  }, [
762
- y(h(Se), { class: "h-4 w-4" })
746
+ b(y(Ee), { class: "h-4 w-4" })
763
747
  ], 2),
764
748
  t("label", null, [
765
749
  t("input", {
766
750
  type: "file",
767
751
  class: "hidden",
768
- onChange: s[3] || (s[3] = (g) => e.$emit("onAddFile", g))
752
+ onChange: s[2] || (s[2] = (f) => e.$emit("onAddFile", f))
769
753
  }, null, 32),
770
- t("div", jt, [
771
- y(h(Te), { class: "h-4 w-4" }),
772
- s[4] || (s[4] = I(" Додати файл ", -1))
754
+ t("div", St, [
755
+ b(y(Ne), { class: "h-4 w-4" }),
756
+ s[3] || (s[3] = V(" Додати файл ", -1))
773
757
  ])
774
758
  ])
775
759
  ])
776
760
  ], 2));
777
761
  }
778
- }), O = {
762
+ }), me = {
779
763
  pdf: {
780
764
  color: "bg-red-100 text-red-700 border-red-200",
781
- icon: R,
765
+ icon: W,
782
766
  label: "PDF"
783
767
  },
784
768
  sketch: {
785
769
  color: "bg-gray-100 text-gray-700 border-gray-200",
786
- icon: De,
770
+ icon: Se,
787
771
  label: "SKETCH"
788
772
  },
789
773
  mp4: {
790
774
  color: "bg-purple-100 text-purple-700 border-purple-200",
791
- icon: Re,
775
+ icon: Ke,
792
776
  label: "VIDEO"
793
777
  },
794
778
  docx: {
795
779
  color: "bg-blue-100 text-blue-700 border-blue-200",
796
- icon: R,
780
+ icon: W,
797
781
  label: "DOC"
798
782
  },
799
783
  zip: {
800
784
  color: "bg-orange-100 text-orange-700 border-orange-200",
801
- icon: we,
785
+ icon: ze,
802
786
  label: "ARCHIVE"
803
787
  },
804
788
  png: {
805
789
  color: "bg-green-100 text-green-700 border-green-200",
806
- icon: ee,
790
+ icon: de,
807
791
  label: "IMAGE"
808
792
  },
809
793
  jpg: {
810
794
  color: "bg-green-100 text-green-700 border-green-200",
811
- icon: ee,
795
+ icon: de,
812
796
  label: "IMAGE"
813
797
  },
814
798
  xlsx: {
815
799
  color: "bg-emerald-100 text-emerald-700 border-emerald-200",
816
- icon: R,
800
+ icon: W,
817
801
  label: "EXCEL"
818
802
  },
819
803
  pptx: {
820
804
  color: "bg-amber-100 text-amber-700 border-amber-200",
821
- icon: R,
805
+ icon: W,
822
806
  label: "PPT"
823
807
  }
824
808
  };
825
- function pe(r, n = "en") {
826
- const i = {
809
+ function ke(l, i = "en") {
810
+ const n = {
827
811
  month: "short",
828
812
  day: "numeric"
829
813
  };
830
- return new Intl.DateTimeFormat(n, i).format(r);
814
+ return new Intl.DateTimeFormat(i, n).format(l);
831
815
  }
832
- function me(r) {
833
- if (r === 0) return "0 B";
834
- const n = 1024, i = ["B", "KB", "MB", "GB", "TB"], e = Math.floor(Math.log(r) / Math.log(n));
835
- return `${parseFloat((r / Math.pow(n, e)).toFixed(1))} ${i[e]}`;
816
+ function we(l) {
817
+ if (l === 0) return "0 B";
818
+ const i = 1024, n = ["B", "KB", "MB", "GB", "TB"], e = Math.floor(Math.log(l) / Math.log(i));
819
+ return `${parseFloat((l / Math.pow(i, e)).toFixed(1))} ${n[e]}`;
836
820
  }
837
- const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items-center gap-2" }, zt = { class: "font-medium text-xs truncate hover:text-blue-600" }, Ft = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, Vt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, At = { class: "flex items-center gap-1" }, St = ["onClick"], Et = ["onClick"], Rt = /* @__PURE__ */ C({
821
+ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = { class: "flex items-center gap-2" }, Ut = { class: "font-medium text-xs truncate hover:text-blue-600" }, Wt = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, Gt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, qt = { class: "flex items-center gap-1" }, Pt = ["onClick"], Kt = ["onClick"], Zt = /* @__PURE__ */ C({
838
822
  __name: "FileList",
839
823
  props: {
840
824
  files: {}
841
825
  },
842
826
  emits: ["delete", "download", "openLightbox"],
843
- setup(r) {
844
- return (n, i) => (o(), a("div", It, [
845
- (o(!0), a(L, null, H(n.files, (e) => (o(), a("div", {
827
+ setup(l) {
828
+ return (i, n) => (o(), a("div", Ot, [
829
+ (o(!0), a(z, null, F(i.files, (e) => (o(), a("div", {
846
830
  class: "flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",
847
- key: e.id
831
+ key: e.id,
832
+ onClick: G((s) => i.$emit("openLightbox", e), ["stop"])
848
833
  }, [
849
834
  t("div", {
850
- class: x(["p-1 rounded", h(O)[e?.ext]?.color])
835
+ class: _(["p-1 rounded", y(me)[e?.ext]?.color])
851
836
  }, [
852
- (o(), D(z(h(O)[e?.ext]?.icon), { class: "h-3 w-3" }))
837
+ (o(), D(S(y(me)[e?.ext]?.icon), { class: "h-3 w-3" }))
853
838
  ], 2),
854
839
  t("div", {
855
840
  class: "flex-1 min-w-0",
856
- onClick: (s) => n.$emit("openLightbox", e)
841
+ onClick: (s) => i.$emit("openLightbox", e)
857
842
  }, [
858
- t("div", Tt, [
859
- t("span", zt, f(e?.uploaded_name || e?.name), 1)
843
+ t("div", Nt, [
844
+ t("span", Ut, v(e?.uploaded_name || e?.name), 1)
860
845
  ])
861
- ], 8, Ht),
862
- t("div", Ft, f(h(me)(e.size)), 1),
863
- t("div", Vt, f(h(pe)(e.createdAt)), 1),
864
- t("div", At, [
846
+ ], 8, Rt),
847
+ t("div", Wt, v(y(we)(e.size)), 1),
848
+ t("div", Gt, v(y(ke)(e.createdAt)), 1),
849
+ t("div", qt, [
865
850
  t("button", {
866
- onClick: (s) => n.$emit("download", e),
851
+ onClick: G((s) => i.$emit("download", e), ["stop"]),
867
852
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"
868
853
  }, [
869
- y(h(U), { class: "h-3 w-3" })
870
- ], 8, St),
854
+ b(y(ie), { class: "h-3 w-3" })
855
+ ], 8, Pt),
871
856
  t("button", {
872
857
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",
873
- onClick: (s) => n.$emit("delete", s, e?.file_id)
858
+ onClick: G((s) => i.$emit("delete", s, e?.file_id), ["stop"])
874
859
  }, [
875
- y(h(q), { class: "h-3 w-3" })
876
- ], 8, Et)
860
+ b(y(le), { class: "h-3 w-3" })
861
+ ], 8, Kt)
877
862
  ])
878
- ]))), 128))
863
+ ], 8, Bt))), 128))
879
864
  ]));
880
865
  }
881
- }), Bt = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, Nt = { class: "space-y-2" }, Ot = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, Ut = { class: "space-y-1" }, qt = ["title"], Wt = { class: "text-xs text-gray-500 text-left" }, Pt = { class: "absolute top-2 right-1 flex items-center gap-1" }, Gt = ["onClick"], Kt = ["onClick"], Zt = /* @__PURE__ */ C({
866
+ }), Jt = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, Xt = ["onClick"], Qt = { class: "space-y-2" }, Yt = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, es = ["src"], ts = { class: "space-y-1" }, ss = ["title"], os = { class: "text-xs text-gray-500 text-left" }, ns = { class: "absolute top-2 right-1 flex items-center gap-1" }, is = ["onClick"], ls = ["onClick"], as = /* @__PURE__ */ C({
882
867
  __name: "FileGrid",
883
868
  props: {
884
869
  files: {}
885
870
  },
886
- emits: ["delete", "download"],
887
- setup(r) {
888
- return (n, i) => (o(), a("div", Bt, [
889
- (o(!0), a(L, null, H(n.files, (e) => (o(), a("div", {
871
+ emits: ["delete", "download", "openLightbox"],
872
+ setup(l) {
873
+ return (i, n) => (o(), a("div", Jt, [
874
+ (o(!0), a(z, null, F(i.files, (e) => (o(), a("div", {
890
875
  key: e.id,
891
- class: "group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50"
876
+ onClick: G((s) => i.$emit("openLightbox", e), ["stop"]),
877
+ class: "group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"
892
878
  }, [
893
- t("div", Nt, [
894
- t("div", Ot, [
895
- y(h(R), { class: "h-10 w-10 text-gray-500" })
879
+ t("div", Qt, [
880
+ t("div", Yt, [
881
+ e.ext === "png" || e.ext === "jpg" || e.ext === "jpeg" || e.ext === "gif" || e.ext === "svg" || e.ext === "webp" ? (o(), a("img", {
882
+ key: 0,
883
+ src: `/file/resize?filepath=${e?.file_path}&w=500`,
884
+ alt: "file",
885
+ class: "w-full h-full object-cover"
886
+ }, null, 8, es)) : (o(), D(y(W), {
887
+ key: 1,
888
+ class: "h-10 w-10 text-gray-500"
889
+ }))
896
890
  ]),
897
- t("div", Ut, [
891
+ t("div", ts, [
898
892
  t("h3", {
899
893
  class: "font-medium text-xs leading-tight text-left",
900
894
  title: e.uploaded_name || e.name
901
- }, f(e.uploaded_name || e.name), 9, qt),
902
- t("p", Wt, f(h(pe)(e.createdAt)) + ", " + f(h(me)(e.size)), 1)
895
+ }, v(e.uploaded_name || e.name), 9, ss),
896
+ t("p", os, v(y(ke)(e.createdAt)) + ", " + v(y(we)(e.size)), 1)
903
897
  ])
904
898
  ]),
905
- t("div", Pt, [
899
+ t("div", ns, [
906
900
  t("button", {
907
- onClick: (s) => n.$emit("download", e),
908
- class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"
901
+ onClick: G((s) => i.$emit("download", e), ["stop"]),
902
+ class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"
909
903
  }, [
910
- y(h(U), { class: "h-3 w-3" })
911
- ], 8, Gt),
904
+ b(y(ie), { class: "h-3 w-3" })
905
+ ], 8, is),
912
906
  t("a", {
913
907
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",
914
- onClick: (s) => n.$emit("delete", s, e?.file_id)
908
+ onClick: G((s) => i.$emit("delete", s, e?.file_id), ["stop"])
915
909
  }, [
916
- y(h(q), { class: "h-3 w-3" })
917
- ], 8, Kt)
910
+ b(y(le), { class: "h-3 w-3" })
911
+ ], 8, ls)
918
912
  ])
919
- ]))), 128))
913
+ ], 8, Xt))), 128))
920
914
  ]));
921
915
  }
922
- }), Xt = { class: "flex flex-wrap gap-1" }, Jt = ["title"], Qt = { class: "flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity ml-1" }, Yt = ["onClick"], es = ["onClick"], ts = /* @__PURE__ */ C({
923
- __name: "FileCompact",
924
- props: {
925
- files: {}
926
- },
927
- emits: ["delete", "download"],
928
- setup(r) {
929
- return (n, i) => (o(), a("div", Xt, [
930
- (o(!0), a(L, null, H(n.files, (e) => (o(), a("div", {
931
- key: e.id,
932
- class: "group flex items-center gap-1 p-1 rounded border hover:bg-gray-50 hover:shadow-sm transition-all"
933
- }, [
934
- t("div", {
935
- class: x(["p-0.5 rounded", h(O)[e.ext].color])
936
- }, [
937
- (o(), D(z(h(O)[e.ext].icon), { class: "h-3 w-3" }))
938
- ], 2),
939
- t("span", {
940
- class: "text-xs font-medium truncate max-w-24",
941
- title: e.uploaded_name || e.name
942
- }, f(e.uploaded_name || e.name), 9, Jt),
943
- t("div", Qt, [
944
- t("button", {
945
- onClick: (s) => n.$emit("download", e),
946
- class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-3 w-3 p-0 opacity-0 group-hover:opacity-100 transition-opacity"
947
- }, [
948
- y(h(U), { class: "h-[12px] !w-[12px]" })
949
- ], 8, Yt),
950
- t("button", {
951
- class: "ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors hover:bg-accent rounded-md h-4 w-4 p-0 text-red-600 hover:text-red-700",
952
- onClick: (s) => n.$emit("delete", s, e?.file_id)
953
- }, [
954
- y(h(q), { class: "h-2.5 w-2.5" })
955
- ], 8, es)
956
- ])
957
- ]))), 128))
958
- ]));
959
- }
960
- }), ss = { class: "mx-auto font-sans" }, os = { key: 1 }, ne = /* @__PURE__ */ C({
916
+ }), rs = { class: "mx-auto font-sans" }, ds = { key: 1 }, ge = /* @__PURE__ */ C({
961
917
  __name: "FilesWidget",
962
918
  props: {
963
919
  title: {},
@@ -966,215 +922,218 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
966
922
  maxHeight: {},
967
923
  onAddFile: { type: Function }
968
924
  },
969
- emits: ["delete", "add"],
970
- setup(r, { emit: n }) {
971
- const i = r, e = $(!1), s = $(null), g = n, u = (k, j) => {
972
- s.value = j, e.value = !0;
973
- }, p = () => {
974
- s.value && (c(s.value), s.value = null, e.value = !1);
975
- };
976
- $(i.files);
977
- const d = (k) => {
978
- i.onAddFile && i.onAddFile(k), g("add", k);
979
- }, c = (k) => {
980
- g("delete", k);
981
- }, l = (k) => {
982
- const j = document.createElement("a");
983
- j.setAttribute("download", k?.uploaded_name || k?.name), j.href = k?.file_path || k?.path, j.click();
984
- }, m = $("list");
985
- return (k, j) => {
986
- const P = re("MessageBox");
987
- return o(), a(L, null, [
988
- t("div", ss, [
989
- y(Lt, {
990
- modelValue: m.value,
991
- "onUpdate:modelValue": j[0] || (j[0] = (V) => m.value = V),
992
- title: i.title,
993
- onOnAddFile: j[1] || (j[1] = (V) => d(V))
925
+ emits: ["delete", "add", "openLightbox"],
926
+ setup(l, { emit: i }) {
927
+ const n = l, e = w(!1), s = w(null), f = w(!1), p = w(0), g = i, u = (d, c) => {
928
+ s.value = c, e.value = !0;
929
+ }, m = () => {
930
+ s.value && (H(s.value), s.value = null, e.value = !1);
931
+ }, r = A(() => Array.isArray(n.files) ? n.files.map((d) => d?.file_path) : []), h = (d) => {
932
+ const c = r.value.findIndex((T) => T === d.file_path);
933
+ c !== -1 && (f.value = !0, p.value = c);
934
+ }, I = (d) => {
935
+ n.onAddFile && n.onAddFile(d), g("add", d);
936
+ }, H = (d) => {
937
+ g("delete", d);
938
+ }, R = (d) => {
939
+ const c = document.createElement("a");
940
+ c.setAttribute("download", d?.uploaded_name || d?.name), c.href = d?.file_path || d?.path, c.click();
941
+ }, M = w("list");
942
+ return (d, c) => {
943
+ const T = ee("MessageBox"), k = ee("Lightbox");
944
+ return o(), a(z, null, [
945
+ t("div", rs, [
946
+ b(Et, {
947
+ modelValue: M.value,
948
+ "onUpdate:modelValue": c[0] || (c[0] = (j) => M.value = j),
949
+ title: n.title,
950
+ onOnAddFile: c[1] || (c[1] = (j) => I(j))
994
951
  }, null, 8, ["modelValue", "title"]),
995
- i.files.length > 0 ? (o(), a("div", {
952
+ n.files.length > 0 ? (o(), a("div", {
996
953
  key: 0,
997
- class: x(k.maxHeight ? "overflow-y-auto" : ""),
998
- style: F({ maxHeight: k.maxHeight + "px" })
954
+ class: _(d.maxHeight ? "overflow-y-auto" : ""),
955
+ style: E({ maxHeight: d.maxHeight + "px" })
999
956
  }, [
1000
- m.value === "list" ? (o(), D(Rt, {
957
+ M.value === "list" ? (o(), D(Zt, {
1001
958
  key: 0,
1002
959
  onDelete: u,
1003
- onDownload: l,
1004
- files: i.files
1005
- }, null, 8, ["files"])) : b("", !0),
1006
- m.value === "grid" ? (o(), D(Zt, {
960
+ onDownload: R,
961
+ onOpenLightbox: c[2] || (c[2] = (j) => h(j)),
962
+ files: n.files
963
+ }, null, 8, ["files"])) : x("", !0),
964
+ M.value === "grid" ? (o(), D(as, {
1007
965
  key: 1,
1008
966
  onDelete: u,
1009
- onDownload: l,
1010
- files: i.files
1011
- }, null, 8, ["files"])) : b("", !0),
1012
- m.value === "compact" ? (o(), D(ts, {
1013
- key: 2,
1014
- onDelete: u,
1015
- onDownload: l,
1016
- files: i.files
1017
- }, null, 8, ["files"])) : b("", !0)
1018
- ], 6)) : (o(), a("div", os, j[3] || (j[3] = [
967
+ onDownload: R,
968
+ onOpenLightbox: c[3] || (c[3] = (j) => h(j)),
969
+ files: n.files
970
+ }, null, 8, ["files"])) : x("", !0)
971
+ ], 6)) : (o(), a("div", ds, c[6] || (c[6] = [
1019
972
  t("div", { class: "flex items-center justify-center h-full" }, [
1020
973
  t("p", { class: "text-gray-500 leading-[3]" }, "Файлів не знайдено")
1021
974
  ], -1)
1022
975
  ])))
1023
976
  ]),
1024
- y(P, {
977
+ b(T, {
1025
978
  modelValue: e.value,
1026
- "onUpdate:modelValue": j[2] || (j[2] = (V) => e.value = V),
1027
- onConfirm: p,
979
+ "onUpdate:modelValue": c[4] || (c[4] = (j) => e.value = j),
980
+ onConfirm: m,
1028
981
  title: "Ви впевнені?",
1029
982
  message: "Ви впевнені, що хочете видалити цей файл?",
1030
983
  confirmButtonText: "Так, я впевнена/ий",
1031
984
  cancelButtonText: "Скасувати"
1032
- }, null, 8, ["modelValue"])
985
+ }, null, 8, ["modelValue"]),
986
+ b(k, {
987
+ modelValue: f.value,
988
+ "onUpdate:modelValue": c[5] || (c[5] = (j) => f.value = j),
989
+ images: r.value,
990
+ "start-index": p.value
991
+ }, null, 8, ["modelValue", "images", "start-index"])
1033
992
  ], 64);
1034
993
  };
1035
994
  }
1036
- }), ns = ["onClick"], is = /* @__PURE__ */ C({
995
+ }), cs = ["onClick"], us = /* @__PURE__ */ C({
1037
996
  __name: "CopyNotification",
1038
- setup(r, { expose: n }) {
1039
- const i = $([]);
997
+ setup(l, { expose: i }) {
998
+ const n = w([]);
1040
999
  let e = 1;
1041
1000
  const s = () => {
1042
- if (i.value.length >= 10) {
1043
- const p = i.value[0];
1044
- clearTimeout(p.timer), i.value.shift();
1001
+ if (n.value.length >= 10) {
1002
+ const g = n.value[0];
1003
+ clearTimeout(g.timer), n.value.shift();
1045
1004
  }
1046
- const u = {
1005
+ const p = {
1047
1006
  id: e++,
1048
1007
  timer: setTimeout(() => {
1049
- g(u.id);
1008
+ f(p.id);
1050
1009
  }, 1500)
1051
1010
  };
1052
- i.value.push(u);
1053
- }, g = (u) => {
1054
- const p = i.value.findIndex((d) => d.id === u);
1055
- if (p !== -1) {
1056
- const d = i.value[p];
1057
- clearTimeout(d.timer), i.value.splice(p, 1);
1011
+ n.value.push(p);
1012
+ }, f = (p) => {
1013
+ const g = n.value.findIndex((u) => u.id === p);
1014
+ if (g !== -1) {
1015
+ const u = n.value[g];
1016
+ clearTimeout(u.timer), n.value.splice(g, 1);
1058
1017
  }
1059
1018
  };
1060
- return n({
1019
+ return i({
1061
1020
  addNotification: s
1062
- }), J(() => {
1063
- i.value.forEach((u) => {
1064
- clearTimeout(u.timer);
1021
+ }), ne(() => {
1022
+ n.value.forEach((p) => {
1023
+ clearTimeout(p.timer);
1065
1024
  });
1066
- }), (u, p) => (o(), D(de, { to: "body" }, [
1067
- y(ge, {
1025
+ }), (p, g) => (o(), D(ye, { to: "body" }, [
1026
+ b($e, {
1068
1027
  name: "notification",
1069
1028
  tag: "div",
1070
1029
  class: "fixed top-4 right-4 z-50 space-y-2"
1071
1030
  }, {
1072
- default: fe(() => [
1073
- (o(!0), a(L, null, H(i.value, (d) => (o(), a("div", {
1074
- key: d.id,
1031
+ default: Ce(() => [
1032
+ (o(!0), a(z, null, F(n.value, (u) => (o(), a("div", {
1033
+ key: u.id,
1075
1034
  class: "bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"
1076
1035
  }, [
1077
- y(h(Ce), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
1078
- p[0] || (p[0] = t("div", { class: "flex-1" }, [
1036
+ b(y(Ae), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
1037
+ g[0] || (g[0] = t("div", { class: "flex-1" }, [
1079
1038
  t("p", { class: "font-medium text-sm" }, "Ссылка скопирована!"),
1080
1039
  t("p", { class: "text-xs text-green-100 opacity-90" }, "Файл добавлен в буфер обмена")
1081
1040
  ], -1)),
1082
1041
  t("button", {
1083
- onClick: (c) => g(d.id),
1042
+ onClick: (m) => f(u.id),
1084
1043
  class: "text-green-100 hover:text-white transition-colors flex-shrink-0"
1085
1044
  }, [
1086
- y(h(W), { class: "h-4 w-4" })
1087
- ], 8, ns)
1045
+ b(y(X), { class: "h-4 w-4" })
1046
+ ], 8, cs)
1088
1047
  ]))), 128))
1089
1048
  ]),
1090
1049
  _: 1
1091
1050
  })
1092
1051
  ]));
1093
1052
  }
1094
- }), A = (r, n) => {
1095
- const i = r.__vccOpts || r;
1096
- for (const [e, s] of n)
1097
- i[e] = s;
1098
- return i;
1099
- }, he = /* @__PURE__ */ A(is, [["__scopeId", "data-v-7b0d3ace"]]), as = { class: "fixed inset-0 z-50 bg-black/80" }, ls = { class: "fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0" }, rs = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, ds = { class: "flex items-center justify-between" }, cs = { class: "flex items-center gap-2" }, us = { class: "tracking-tight text-base font-medium" }, ps = { class: "p-4 pt-0" }, ms = { class: "flex flex-col items-center" }, hs = ["src", "alt"], gs = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, fs = { class: "mt-3 flex gap-2" }, vs = /* @__PURE__ */ C({
1053
+ }), B = (l, i) => {
1054
+ const n = l.__vccOpts || l;
1055
+ for (const [e, s] of i)
1056
+ n[e] = s;
1057
+ return n;
1058
+ }, _e = /* @__PURE__ */ B(us, [["__scopeId", "data-v-7b0d3ace"]]), ps = { class: "fixed inset-0 z-50 bg-black/80" }, ms = { class: "fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0" }, gs = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, hs = { class: "flex items-center justify-between" }, fs = { class: "flex items-center gap-2" }, vs = { class: "tracking-tight text-base font-medium" }, ys = { class: "p-4 pt-0" }, bs = { class: "flex flex-col items-center" }, xs = ["src", "alt"], ks = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, ws = { class: "mt-3 flex gap-2" }, _s = /* @__PURE__ */ C({
1100
1059
  __name: "GalleryModal",
1101
1060
  props: {
1102
1061
  item: {}
1103
1062
  },
1104
1063
  emits: ["close"],
1105
- setup(r) {
1106
- const n = $(), i = (u) => new Date(u).toLocaleDateString("uk-UA", {
1064
+ setup(l) {
1065
+ const i = w(), n = (p) => new Date(p).toLocaleDateString("uk-UA", {
1107
1066
  day: "2-digit",
1108
1067
  month: "2-digit",
1109
1068
  year: "numeric"
1110
- }), e = (u) => u >= 1024 * 1024 * 1024 ? (u / (1024 * 1024 * 1024)).toFixed(2) + " GB" : u >= 1024 * 1024 ? (u / (1024 * 1024)).toFixed(2) + " MB" : u >= 1024 ? (u / 1024).toFixed(2) + " KB" : u + " B", s = (u) => {
1111
- navigator.clipboard.writeText(u), n.value?.addNotification();
1112
- }, g = async (u, p) => {
1069
+ }), e = (p) => p >= 1024 * 1024 * 1024 ? (p / (1024 * 1024 * 1024)).toFixed(2) + " GB" : p >= 1024 * 1024 ? (p / (1024 * 1024)).toFixed(2) + " MB" : p >= 1024 ? (p / 1024).toFixed(2) + " KB" : p + " B", s = (p) => {
1070
+ navigator.clipboard.writeText(p), i.value?.addNotification();
1071
+ }, f = async (p, g) => {
1113
1072
  try {
1114
- const c = await (await fetch(u)).blob(), l = window.URL.createObjectURL(c), m = document.createElement("a");
1115
- m.href = l, m.download = p, document.body.appendChild(m), m.click(), window.URL.revokeObjectURL(l), document.body.removeChild(m);
1116
- } catch (d) {
1117
- console.error("Download failed:", d), alert("Download failed. Please try opening the image in a new tab.");
1073
+ const m = await (await fetch(p)).blob(), r = window.URL.createObjectURL(m), h = document.createElement("a");
1074
+ h.href = r, h.download = g, document.body.appendChild(h), h.click(), window.URL.revokeObjectURL(r), document.body.removeChild(h);
1075
+ } catch (u) {
1076
+ console.error("Download failed:", u), alert("Download failed. Please try opening the image in a new tab.");
1118
1077
  }
1119
1078
  };
1120
- return (u, p) => (o(), a("div", as, [
1121
- t("div", ls, [
1122
- t("div", rs, [
1123
- t("div", ds, [
1124
- t("div", cs, [
1125
- t("h2", us, f(u.item.name), 1)
1079
+ return (p, g) => (o(), a("div", ps, [
1080
+ t("div", ms, [
1081
+ t("div", gs, [
1082
+ t("div", hs, [
1083
+ t("div", fs, [
1084
+ t("h2", vs, v(p.item.name), 1)
1126
1085
  ])
1127
1086
  ])
1128
1087
  ]),
1129
- t("div", ps, [
1130
- t("div", ms, [
1088
+ t("div", ys, [
1089
+ t("div", bs, [
1131
1090
  t("img", {
1132
- src: u.item.path,
1133
- alt: u.item.name,
1091
+ src: p.item.path,
1092
+ alt: p.item.name,
1134
1093
  class: "max-w-full max-h-[60vh] object-contain rounded border"
1135
- }, null, 8, hs),
1136
- t("div", gs, [
1137
- t("span", null, "Size: " + f(e(u.item.size)), 1),
1138
- p[3] || (p[3] = t("span", null, "•", -1)),
1139
- t("span", null, "Date: " + f(i(u.item.createdAt)), 1)
1094
+ }, null, 8, xs),
1095
+ t("div", ks, [
1096
+ t("span", null, "Size: " + v(e(p.item.size)), 1),
1097
+ g[3] || (g[3] = t("span", null, "•", -1)),
1098
+ t("span", null, "Date: " + v(n(p.item.createdAt)), 1)
1140
1099
  ]),
1141
- t("div", fs, [
1100
+ t("div", ws, [
1142
1101
  t("button", {
1143
- onClick: p[0] || (p[0] = (d) => g(u.item.path, u.item.name)),
1102
+ onClick: g[0] || (g[0] = (u) => f(p.item.path, p.item.name)),
1144
1103
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"
1145
1104
  }, [
1146
- y(h(U), { class: "h-3 w-3 mr-1" }),
1147
- p[4] || (p[4] = I(" Download ", -1))
1105
+ b(y(ie), { class: "h-3 w-3 mr-1" }),
1106
+ g[4] || (g[4] = V(" Download ", -1))
1148
1107
  ]),
1149
1108
  t("button", {
1150
- onClick: p[1] || (p[1] = (d) => s(u.item.path)),
1109
+ onClick: g[1] || (g[1] = (u) => s(p.item.path)),
1151
1110
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"
1152
1111
  }, [
1153
- y(h(Fe), { class: "h-3 w-3 mr-1" }),
1154
- p[5] || (p[5] = I(" Share ", -1))
1112
+ b(y(We), { class: "h-3 w-3 mr-1" }),
1113
+ g[5] || (g[5] = V(" Share ", -1))
1155
1114
  ])
1156
1115
  ])
1157
1116
  ])
1158
1117
  ]),
1159
1118
  t("button", {
1160
1119
  type: "button",
1161
- onClick: p[2] || (p[2] = (d) => u.$emit("close")),
1120
+ onClick: g[2] || (g[2] = (u) => p.$emit("close")),
1162
1121
  class: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
1163
1122
  }, [
1164
- y(h(W), { class: "h-4 w-4" }),
1165
- p[6] || (p[6] = t("span", { class: "sr-only" }, "Close", -1))
1123
+ b(y(X), { class: "h-4 w-4" }),
1124
+ g[6] || (g[6] = t("span", { class: "sr-only" }, "Close", -1))
1166
1125
  ])
1167
1126
  ]),
1168
- y(he, {
1127
+ b(_e, {
1169
1128
  ref_key: "copyNotificationRef",
1170
- ref: n
1129
+ ref: i
1171
1130
  }, null, 512)
1172
1131
  ]));
1173
1132
  }
1174
- }), ys = {
1133
+ }), $s = {
1175
1134
  key: 0,
1176
1135
  class: "text-xl font-semibold text-gray-900 mb-4"
1177
- }, bs = ["onClick"], xs = ["src", "alt"], ie = /* @__PURE__ */ C({
1136
+ }, Cs = ["onClick"], Ms = ["src", "alt"], he = /* @__PURE__ */ C({
1178
1137
  __name: "GalleryWidget",
1179
1138
  props: {
1180
1139
  title: {},
@@ -1185,79 +1144,79 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
1185
1144
  className: {},
1186
1145
  style: {}
1187
1146
  },
1188
- setup(r) {
1189
- const n = r, i = $(!1), e = $(null), s = $(), g = $(0);
1190
- let u = null;
1191
- const p = T(() => {
1192
- const l = n.columns || 4;
1193
- return g.value >= 1440 ? l : g.value >= 1024 ? Math.max(1, l - 1) : g.value >= 768 ? Math.max(1, l - 2) : g.value >= 640 ? Math.max(1, l - 3) : 1;
1194
- }), d = () => {
1195
- s.value && (g.value = s.value.offsetWidth);
1147
+ setup(l) {
1148
+ const i = l, n = w(!1), e = w(null), s = w(), f = w(0);
1149
+ let p = null;
1150
+ const g = A(() => {
1151
+ const r = i.columns || 4;
1152
+ return f.value >= 1440 ? r : f.value >= 1024 ? Math.max(1, r - 1) : f.value >= 768 ? Math.max(1, r - 2) : f.value >= 640 ? Math.max(1, r - 3) : 1;
1153
+ }), u = () => {
1154
+ s.value && (f.value = s.value.offsetWidth);
1196
1155
  };
1197
- le(() => {
1198
- ve(() => {
1199
- s.value && (u = new ResizeObserver((l) => {
1200
- for (const m of l)
1201
- m.target === s.value && (g.value = m.contentRect.width);
1202
- }), u.observe(s.value), d());
1156
+ oe(() => {
1157
+ Me(() => {
1158
+ s.value && (p = new ResizeObserver((r) => {
1159
+ for (const h of r)
1160
+ h.target === s.value && (f.value = h.contentRect.width);
1161
+ }), p.observe(s.value), u());
1203
1162
  });
1204
- }), J(() => {
1205
- u && u.disconnect();
1163
+ }), ne(() => {
1164
+ p && p.disconnect();
1206
1165
  });
1207
- const c = (l) => {
1208
- e.value = l, i.value = !0;
1166
+ const m = (r) => {
1167
+ e.value = r, n.value = !0;
1209
1168
  };
1210
- return (l, m) => (o(), a("div", {
1169
+ return (r, h) => (o(), a("div", {
1211
1170
  class: "w-full mx-auto font-sans",
1212
1171
  ref_key: "containerRef",
1213
1172
  ref: s
1214
1173
  }, [
1215
- l.title ? (o(), a("h3", ys, f(l.title), 1)) : b("", !0),
1174
+ r.title ? (o(), a("h3", $s, v(r.title), 1)) : x("", !0),
1216
1175
  t("div", {
1217
- class: x(l.maxHeight ? "overflow-y-auto" : ""),
1218
- style: F({ maxHeight: l.maxHeight + "px" })
1176
+ class: _(r.maxHeight ? "overflow-y-auto" : ""),
1177
+ style: E({ maxHeight: r.maxHeight + "px" })
1219
1178
  }, [
1220
1179
  t("div", {
1221
- style: F({ columns: p.value + " auto", gap: "12px" }),
1180
+ style: E({ columns: g.value + " auto", gap: "12px" }),
1222
1181
  class: "space-y-3"
1223
1182
  }, [
1224
- (o(!0), a(L, null, H(l.items, (k) => (o(), a("div", {
1225
- key: k.id,
1226
- onClick: (j) => c(k),
1183
+ (o(!0), a(z, null, F(r.items, (I) => (o(), a("div", {
1184
+ key: I.id,
1185
+ onClick: (H) => m(I),
1227
1186
  class: "group relative break-inside-avoid bg-gray-200 rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-all mb-3"
1228
1187
  }, [
1229
1188
  t("img", {
1230
- src: k.path,
1231
- alt: k.name,
1189
+ src: I.path,
1190
+ alt: I.name,
1232
1191
  class: "w-full h-auto min-h-40 rounded-md object-contain"
1233
- }, null, 8, xs),
1234
- m[1] || (m[1] = t("div", { class: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-12" }, [
1192
+ }, null, 8, Ms),
1193
+ h[1] || (h[1] = t("div", { class: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-12" }, [
1235
1194
  t("h3", { class: "text-white font-medium text-base leading-tight mb-1" }, "Mountain Landscape"),
1236
1195
  t("p", { class: "text-white/90 text-sm" }, "2.4 MB")
1237
1196
  ], -1)),
1238
- m[2] || (m[2] = t("div", { class: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200" }, null, -1))
1239
- ], 8, bs))), 128))
1197
+ h[2] || (h[2] = t("div", { class: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200" }, null, -1))
1198
+ ], 8, Cs))), 128))
1240
1199
  ], 4)
1241
1200
  ], 6),
1242
- (o(), D(de, { to: "body" }, [
1243
- i.value && e.value ? (o(), D(vs, {
1201
+ (o(), D(ye, { to: "body" }, [
1202
+ n.value && e.value ? (o(), D(_s, {
1244
1203
  key: 0,
1245
1204
  item: e.value,
1246
- onClose: m[0] || (m[0] = (k) => i.value = !1)
1247
- }, null, 8, ["item"])) : b("", !0)
1205
+ onClose: h[0] || (h[0] = (I) => n.value = !1)
1206
+ }, null, 8, ["item"])) : x("", !0)
1248
1207
  ]))
1249
1208
  ], 512));
1250
1209
  }
1251
- }), ks = {
1210
+ }), Ls = {
1252
1211
  key: 0,
1253
1212
  class: "overflow-hidden"
1254
- }, _s = { class: "flex border-b border-gray-200 bg-gray-50" }, ws = ["onClick"], $s = { class: "p-4" }, Cs = ["innerHTML"], Ms = {
1213
+ }, Ds = { class: "flex border-b border-gray-200 bg-gray-50" }, Ts = ["onClick"], js = { class: "p-4" }, Is = ["innerHTML"], Vs = {
1255
1214
  key: 1,
1256
1215
  class: "p-4"
1257
- }, Ds = { class: "grid grid-cols-12 gap-4" }, js = {
1216
+ }, zs = { class: "grid grid-cols-12 gap-4" }, Fs = {
1258
1217
  key: 0,
1259
1218
  class: "mb-4 pb-2 border-b border-gray-200"
1260
- }, Ls = { class: "text-lg font-semibold text-gray-900" }, Is = ["innerHTML"], Hs = /* @__PURE__ */ C({
1219
+ }, As = { class: "text-lg font-semibold text-gray-900" }, Hs = ["innerHTML"], Ss = /* @__PURE__ */ C({
1261
1220
  __name: "Card",
1262
1221
  props: {
1263
1222
  panels: { default: () => [] },
@@ -1267,92 +1226,92 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
1267
1226
  className: {},
1268
1227
  style: {}
1269
1228
  },
1270
- setup(r) {
1271
- const n = r, i = $(0), e = T(() => n.panels && n.panels.length > 0 ? n.panels : n.data && Array.isArray(n.data) ? n.data.filter((c) => c.type === "tabs")[0]?.items || [] : []), s = T(() => n.panels && n.panels.length > 0 ? n.panels : n.data && Array.isArray(n.data) ? n.data : []), g = T(() => ({
1272
- [`view-${n.view}`]: !0
1273
- })), u = (d) => {
1274
- const c = {};
1275
- return d.count && (c.count = d.count), d.col && (c.col = d.col), n.data && d.name && Object.assign(c, n.data[d.name]), c;
1276
- }, p = (d) => d.width ? {
1277
- gridColumn: `span ${d.width}`
1229
+ setup(l) {
1230
+ const i = l, n = w(0), e = A(() => i.panels && i.panels.length > 0 ? i.panels : i.data && Array.isArray(i.data) ? i.data.filter((m) => m.type === "tabs")[0]?.items || [] : []), s = A(() => i.panels && i.panels.length > 0 ? i.panels : i.data && Array.isArray(i.data) ? i.data : []), f = A(() => ({
1231
+ [`view-${i.view}`]: !0
1232
+ })), p = (u) => {
1233
+ const m = {};
1234
+ return u.count && (m.count = u.count), u.col && (m.col = u.col), i.data && u.name && Object.assign(m, i.data[u.name]), m;
1235
+ }, g = (u) => u.width ? {
1236
+ gridColumn: `span ${u.width}`
1278
1237
  } : {};
1279
- return (d, c) => (o(), a("div", {
1280
- class: x(["bg-white rounded-lg shadow-sm border border-gray-200", g.value])
1238
+ return (u, m) => (o(), a("div", {
1239
+ class: _(["bg-white rounded-lg shadow-sm border border-gray-200", f.value])
1281
1240
  }, [
1282
- d.view === "tab" ? (o(), a("div", ks, [
1283
- t("div", _s, [
1284
- (o(!0), a(L, null, H(e.value, (l, m) => (o(), a("button", {
1285
- key: l.name || m,
1286
- onClick: (k) => i.value = m,
1287
- class: x([
1241
+ u.view === "tab" ? (o(), a("div", Ls, [
1242
+ t("div", Ds, [
1243
+ (o(!0), a(z, null, F(e.value, (r, h) => (o(), a("button", {
1244
+ key: r.name || h,
1245
+ onClick: (I) => n.value = h,
1246
+ class: _([
1288
1247
  "px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
1289
- { "text-blue-600 bg-white border-b-2 border-blue-600": i.value === m }
1248
+ { "text-blue-600 bg-white border-b-2 border-blue-600": n.value === h }
1290
1249
  ])
1291
- }, f(l.title || l.label || l.name || `Tab ${m + 1}`), 11, ws))), 128))
1250
+ }, v(r.title || r.label || r.name || `Tab ${h + 1}`), 11, Ts))), 128))
1292
1251
  ]),
1293
- t("div", $s, [
1294
- (o(!0), a(L, null, H(e.value, (l, m) => X((o(), a("div", {
1295
- key: l.name || m,
1296
- class: x([
1252
+ t("div", js, [
1253
+ (o(!0), a(z, null, F(e.value, (r, h) => O((o(), a("div", {
1254
+ key: r.name || h,
1255
+ class: _([
1297
1256
  "min-h-[400px] w-full",
1298
- `col-span-${l.col || 12}`
1257
+ `col-span-${r.col || 12}`
1299
1258
  ])
1300
1259
  }, [
1301
- l.html ? (o(), a("div", {
1260
+ r.html ? (o(), a("div", {
1302
1261
  key: 0,
1303
- innerHTML: l.html,
1262
+ innerHTML: r.html,
1304
1263
  class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1305
- }, null, 8, Cs)) : d.$slots[`tab-${m}`] ? E(d.$slots, `tab-${m}`, {
1264
+ }, null, 8, Is)) : u.$slots[`tab-${h}`] ? U(u.$slots, `tab-${h}`, {
1306
1265
  key: 1,
1307
- item: l,
1308
- data: d.data
1309
- }) : l.component ? (o(), D(z(l.component), K({
1266
+ item: r,
1267
+ data: u.data
1268
+ }) : r.component ? (o(), D(S(r.component), te({
1310
1269
  key: 2,
1311
1270
  ref_for: !0
1312
- }, u(l), { class: "w-full h-full" }), null, 16)) : E(d.$slots, l.slot || `tab-${m}`, {
1271
+ }, p(r), { class: "w-full h-full" }), null, 16)) : U(u.$slots, r.slot || `tab-${h}`, {
1313
1272
  key: 3,
1314
- item: l,
1315
- data: d.data
1273
+ item: r,
1274
+ data: u.data
1316
1275
  })
1317
1276
  ], 2)), [
1318
- [ye, i.value === m]
1277
+ [Le, n.value === h]
1319
1278
  ])), 128))
1320
1279
  ])
1321
- ])) : (o(), a("div", Ms, [
1322
- t("div", Ds, [
1323
- (o(!0), a(L, null, H(s.value, (l, m) => (o(), a("div", {
1324
- key: l.name || m,
1325
- class: x([
1280
+ ])) : (o(), a("div", Vs, [
1281
+ t("div", zs, [
1282
+ (o(!0), a(z, null, F(s.value, (r, h) => (o(), a("div", {
1283
+ key: r.name || h,
1284
+ class: _([
1326
1285
  "bg-gray-50 rounded-lg p-4 min-h-[300px]",
1327
- `col-span-${l.col || 12}`
1286
+ `col-span-${r.col || 12}`
1328
1287
  ]),
1329
- style: F(p(l))
1288
+ style: E(g(r))
1330
1289
  }, [
1331
- l.title || l.label ? (o(), a("div", js, [
1332
- t("h3", Ls, f(l.title || l.label), 1)
1333
- ])) : b("", !0),
1334
- l.html ? (o(), a("div", {
1290
+ r.title || r.label ? (o(), a("div", Fs, [
1291
+ t("h3", As, v(r.title || r.label), 1)
1292
+ ])) : x("", !0),
1293
+ r.html ? (o(), a("div", {
1335
1294
  key: 1,
1336
- innerHTML: l.html,
1295
+ innerHTML: r.html,
1337
1296
  class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1338
- }, null, 8, Is)) : d.$slots[`panel-${m}`] ? E(d.$slots, `panel-${m}`, {
1297
+ }, null, 8, Hs)) : u.$slots[`panel-${h}`] ? U(u.$slots, `panel-${h}`, {
1339
1298
  key: 2,
1340
- item: l,
1341
- data: d.data
1342
- }) : l.component ? (o(), D(z(l.component), K({
1299
+ item: r,
1300
+ data: u.data
1301
+ }) : r.component ? (o(), D(S(r.component), te({
1343
1302
  key: 3,
1344
1303
  ref_for: !0
1345
- }, u(l), { class: "w-full h-full" }), null, 16)) : E(d.$slots, l.slot || `panel-${m}`, {
1304
+ }, p(r), { class: "w-full h-full" }), null, 16)) : U(u.$slots, r.slot || `panel-${h}`, {
1346
1305
  key: 4,
1347
- item: l,
1348
- data: d.data
1306
+ item: r,
1307
+ data: u.data
1349
1308
  })
1350
1309
  ], 6))), 128))
1351
1310
  ])
1352
1311
  ]))
1353
1312
  ], 2));
1354
1313
  }
1355
- }), Ts = ["innerHTML"], zs = /* @__PURE__ */ C({
1314
+ }), Es = ["innerHTML"], Os = /* @__PURE__ */ C({
1356
1315
  __name: "CardItem",
1357
1316
  props: {
1358
1317
  name: {},
@@ -1366,45 +1325,45 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
1366
1325
  className: {},
1367
1326
  style: {}
1368
1327
  },
1369
- setup(r) {
1370
- const n = r, i = T(() => ({
1371
- [`col-span-${n.col}`]: !0
1372
- })), e = T(() => {
1328
+ setup(l) {
1329
+ const i = l, n = A(() => ({
1330
+ [`col-span-${i.col}`]: !0
1331
+ })), e = A(() => {
1373
1332
  const s = {};
1374
1333
  return s.col && (s.col = s.col), s;
1375
1334
  });
1376
- return (s, g) => (o(), a("div", {
1377
- class: x(["w-full", i.value])
1335
+ return (s, f) => (o(), a("div", {
1336
+ class: _(["w-full", n.value])
1378
1337
  }, [
1379
1338
  s.html ? (o(), a("div", {
1380
1339
  key: 0,
1381
1340
  innerHTML: s.html,
1382
1341
  class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1383
- }, null, 8, Ts)) : s.component ? (o(), D(z(s.component), K({ key: 1 }, e.value, { class: "w-full" }), null, 16)) : E(s.$slots, "default", { key: 2 })
1342
+ }, null, 8, Es)) : s.component ? (o(), D(S(s.component), te({ key: 1 }, e.value, { class: "w-full" }), null, 16)) : U(s.$slots, "default", { key: 2 })
1384
1343
  ], 2));
1385
1344
  }
1386
- }), Fs = { class: "text-value" }, Vs = { class: "text-sm text-gray-900" }, As = /* @__PURE__ */ C({
1345
+ }), Bs = { class: "text-value" }, Rs = { class: "text-sm text-gray-900" }, Ns = /* @__PURE__ */ C({
1387
1346
  __name: "TextValue",
1388
1347
  props: {
1389
1348
  item: {}
1390
1349
  },
1391
- setup(r) {
1392
- const n = r, i = T(() => {
1393
- const e = n.item.value;
1350
+ setup(l) {
1351
+ const i = l, n = A(() => {
1352
+ const e = i.item.value;
1394
1353
  return typeof e == "boolean" ? e ? "Так" : "Ні" : e == null ? "—" : String(e);
1395
1354
  });
1396
- return (e, s) => (o(), a("div", Fs, [
1397
- t("span", Vs, f(i.value), 1)
1355
+ return (e, s) => (o(), a("div", Bs, [
1356
+ t("span", Rs, v(n.value), 1)
1398
1357
  ]));
1399
1358
  }
1400
- }), Ss = /* @__PURE__ */ A(As, [["__scopeId", "data-v-c14550b7"]]), Es = { class: "link-value" }, Rs = ["href"], Bs = /* @__PURE__ */ C({
1359
+ }), Us = /* @__PURE__ */ B(Ns, [["__scopeId", "data-v-c14550b7"]]), Ws = { class: "link-value" }, Gs = ["href"], qs = /* @__PURE__ */ C({
1401
1360
  __name: "LinkValue",
1402
1361
  props: {
1403
1362
  item: {}
1404
1363
  },
1405
- setup(r) {
1406
- const n = r, i = T(() => {
1407
- const e = String(n.item.value);
1364
+ setup(l) {
1365
+ const i = l, n = A(() => {
1366
+ const e = String(i.item.value);
1408
1367
  try {
1409
1368
  const s = new URL(e);
1410
1369
  return s.hostname + s.pathname;
@@ -1412,26 +1371,26 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
1412
1371
  return e;
1413
1372
  }
1414
1373
  });
1415
- return (e, s) => (o(), a("div", Es, [
1374
+ return (e, s) => (o(), a("div", Ws, [
1416
1375
  t("a", {
1417
1376
  href: String(e.item.value),
1418
1377
  target: "_blank",
1419
1378
  rel: "noopener noreferrer",
1420
1379
  class: "text-blue-600 hover:text-blue-800 underline text-sm"
1421
1380
  }, [
1422
- I(f(i.value) + " ", 1),
1381
+ V(v(n.value) + " ", 1),
1423
1382
  s[0] || (s[0] = t("i", { class: "fas fa-external-link-alt ml-1 text-xs" }, null, -1))
1424
- ], 8, Rs)
1383
+ ], 8, Gs)
1425
1384
  ]));
1426
1385
  }
1427
- }), Ns = /* @__PURE__ */ A(Bs, [["__scopeId", "data-v-e6eb07a6"]]), Os = { class: "date-value" }, Us = { class: "text-sm text-gray-900" }, qs = /* @__PURE__ */ C({
1386
+ }), Ps = /* @__PURE__ */ B(qs, [["__scopeId", "data-v-e6eb07a6"]]), Ks = { class: "date-value" }, Zs = { class: "text-sm text-gray-900" }, Js = /* @__PURE__ */ C({
1428
1387
  __name: "DateValue",
1429
1388
  props: {
1430
1389
  item: {}
1431
1390
  },
1432
- setup(r) {
1433
- const n = r, i = T(() => {
1434
- const e = n.item.value;
1391
+ setup(l) {
1392
+ const i = l, n = A(() => {
1393
+ const e = i.item.value;
1435
1394
  if (e instanceof Date)
1436
1395
  return e.toLocaleDateString("uk-UA", {
1437
1396
  year: "numeric",
@@ -1453,21 +1412,21 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
1453
1412
  }
1454
1413
  return String(e);
1455
1414
  });
1456
- return (e, s) => (o(), a("div", Os, [
1457
- t("span", Us, f(i.value), 1)
1415
+ return (e, s) => (o(), a("div", Ks, [
1416
+ t("span", Zs, v(n.value), 1)
1458
1417
  ]));
1459
1418
  }
1460
- }), Ws = /* @__PURE__ */ A(qs, [["__scopeId", "data-v-b9600618"]]), Ps = { class: "status-value" }, Gs = {
1419
+ }), Xs = /* @__PURE__ */ B(Js, [["__scopeId", "data-v-b9600618"]]), Qs = { class: "status-value" }, Ys = {
1461
1420
  key: 0,
1462
1421
  class: "mr-1"
1463
- }, Ks = /* @__PURE__ */ C({
1422
+ }, eo = /* @__PURE__ */ C({
1464
1423
  __name: "StatusValue",
1465
1424
  props: {
1466
1425
  item: {}
1467
1426
  },
1468
- setup(r) {
1469
- const n = r, i = T(() => {
1470
- switch (String(n.item.value).toLowerCase()) {
1427
+ setup(l) {
1428
+ const i = l, n = A(() => {
1429
+ switch (String(i.item.value).toLowerCase()) {
1471
1430
  case "active":
1472
1431
  case "активний":
1473
1432
  case "успішно":
@@ -1489,8 +1448,8 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
1489
1448
  default:
1490
1449
  return "bg-blue-100 text-blue-800";
1491
1450
  }
1492
- }), e = T(() => {
1493
- switch (String(n.item.value).toLowerCase()) {
1451
+ }), e = A(() => {
1452
+ switch (String(i.item.value).toLowerCase()) {
1494
1453
  case "active":
1495
1454
  case "активний":
1496
1455
  case "успішно":
@@ -1513,50 +1472,50 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
1513
1472
  return "fas fa-info-circle";
1514
1473
  }
1515
1474
  });
1516
- return (s, g) => (o(), a("div", Ps, [
1475
+ return (s, f) => (o(), a("div", Qs, [
1517
1476
  t("span", {
1518
- class: x(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", i.value])
1477
+ class: _(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", n.value])
1519
1478
  }, [
1520
- e.value ? (o(), a("span", Gs, [
1479
+ e.value ? (o(), a("span", Ys, [
1521
1480
  t("i", {
1522
- class: x(e.value)
1481
+ class: _(e.value)
1523
1482
  }, null, 2)
1524
- ])) : b("", !0),
1525
- I(" " + f(String(s.item.value)), 1)
1483
+ ])) : x("", !0),
1484
+ V(" " + v(String(s.item.value)), 1)
1526
1485
  ], 2)
1527
1486
  ]));
1528
1487
  }
1529
- }), Zs = /* @__PURE__ */ A(Ks, [["__scopeId", "data-v-c72e0b01"]]), Xs = { class: "custom-value" }, Js = { class: "text-sm text-gray-900" }, Qs = /* @__PURE__ */ C({
1488
+ }), to = /* @__PURE__ */ B(eo, [["__scopeId", "data-v-c72e0b01"]]), so = { class: "custom-value" }, oo = { class: "text-sm text-gray-900" }, no = /* @__PURE__ */ C({
1530
1489
  __name: "CustomValue",
1531
1490
  props: {
1532
1491
  item: {}
1533
1492
  },
1534
- setup(r) {
1535
- return (n, i) => (o(), a("div", Xs, [
1536
- E(n.$slots, "default", {
1537
- item: n.item,
1538
- value: n.item.value
1493
+ setup(l) {
1494
+ return (i, n) => (o(), a("div", so, [
1495
+ U(i.$slots, "default", {
1496
+ item: i.item,
1497
+ value: i.item.value
1539
1498
  }, () => [
1540
- t("span", Js, f(String(n.item.value)), 1)
1499
+ t("span", oo, v(String(i.item.value)), 1)
1541
1500
  ], !0)
1542
1501
  ]));
1543
1502
  }
1544
- }), Ys = /* @__PURE__ */ A(Qs, [["__scopeId", "data-v-11a73810"]]), eo = ["id"], to = {
1503
+ }), io = /* @__PURE__ */ B(no, [["__scopeId", "data-v-11a73810"]]), lo = ["id"], ao = {
1545
1504
  key: 0,
1546
1505
  class: "text-xl font-semibold text-gray-900 mb-4"
1547
- }, so = {
1506
+ }, ro = {
1548
1507
  key: 1,
1549
1508
  class: "overflow-x-auto"
1550
- }, oo = { class: "min-w-full divide-y divide-gray-200" }, no = { class: "bg-white divide-y divide-gray-200" }, io = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, ao = { class: "flex items-center gap-2" }, lo = ["title"], ro = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, co = {
1509
+ }, co = { class: "min-w-full divide-y divide-gray-200" }, uo = { class: "bg-white divide-y divide-gray-200" }, po = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, mo = { class: "flex items-center gap-2" }, go = ["title"], ho = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, fo = {
1551
1510
  key: 2,
1552
1511
  class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
1553
- }, uo = { class: "flex items-start gap-3" }, po = {
1512
+ }, vo = { class: "flex items-start gap-3" }, yo = {
1554
1513
  key: 0,
1555
1514
  class: "flex-shrink-0"
1556
- }, mo = { class: "flex-1 min-w-0" }, ho = { class: "flex items-center gap-2 mb-2" }, go = { class: "text-sm font-medium text-gray-900" }, fo = ["title"], vo = {
1515
+ }, bo = { class: "flex-1 min-w-0" }, xo = { class: "flex items-center gap-2 mb-2" }, ko = { class: "text-sm font-medium text-gray-900" }, wo = ["title"], _o = {
1557
1516
  key: 3,
1558
1517
  class: "overflow-x-auto"
1559
- }, yo = { class: "min-w-full divide-y divide-gray-200" }, bo = { class: "bg-white divide-y divide-gray-200" }, xo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, ko = { class: "flex items-center gap-2" }, _o = ["title"], wo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, $o = /* @__PURE__ */ C({
1518
+ }, $o = { class: "min-w-full divide-y divide-gray-200" }, Co = { class: "bg-white divide-y divide-gray-200" }, Mo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, Lo = { class: "flex items-center gap-2" }, Do = ["title"], To = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, jo = /* @__PURE__ */ C({
1560
1519
  __name: "DescriptionListWidget",
1561
1520
  props: {
1562
1521
  title: {},
@@ -1566,125 +1525,408 @@ const It = { class: "space-y-0.5" }, Ht = ["onClick"], Tt = { class: "flex items
1566
1525
  className: {},
1567
1526
  style: {}
1568
1527
  },
1569
- setup(r) {
1570
- const n = (i) => {
1571
- switch (i.type) {
1528
+ setup(l) {
1529
+ const i = (n) => {
1530
+ switch (n.type) {
1572
1531
  case "link":
1573
- return Ns;
1532
+ return Ps;
1574
1533
  case "date":
1575
- return Ws;
1534
+ return Xs;
1576
1535
  case "status":
1577
- return Zs;
1536
+ return to;
1578
1537
  case "custom":
1579
- return Ys;
1538
+ return io;
1580
1539
  default:
1581
- return Ss;
1540
+ return Us;
1582
1541
  }
1583
1542
  };
1584
- return (i, e) => (o(), a("div", {
1585
- class: x(["description-list-widget", i.className]),
1586
- id: i.id,
1587
- style: F(i.style)
1543
+ return (n, e) => (o(), a("div", {
1544
+ class: _(["description-list-widget", n.className]),
1545
+ id: n.id,
1546
+ style: E(n.style)
1588
1547
  }, [
1589
- i.title ? (o(), a("h3", to, f(i.title), 1)) : b("", !0),
1590
- i.view === "table" ? (o(), a("div", so, [
1591
- t("table", oo, [
1592
- t("tbody", no, [
1593
- (o(!0), a(L, null, H(i.items, (s) => (o(), a("tr", {
1548
+ n.title ? (o(), a("h3", ao, v(n.title), 1)) : x("", !0),
1549
+ n.view === "table" ? (o(), a("div", ro, [
1550
+ t("table", co, [
1551
+ t("tbody", uo, [
1552
+ (o(!0), a(z, null, F(n.items, (s) => (o(), a("tr", {
1594
1553
  key: s.id || s.label
1595
1554
  }, [
1596
- t("td", io, [
1597
- t("div", ao, [
1555
+ t("td", po, [
1556
+ t("div", mo, [
1598
1557
  s.icon ? (o(), a("i", {
1599
1558
  key: 0,
1600
- class: x([s.icon, "text-gray-500"])
1601
- }, null, 2)) : b("", !0),
1602
- I(" " + f(s.label) + " ", 1),
1559
+ class: _([s.icon, "text-gray-500"])
1560
+ }, null, 2)) : x("", !0),
1561
+ V(" " + v(s.label) + " ", 1),
1603
1562
  s.tooltip ? (o(), a("span", {
1604
1563
  key: 1,
1605
1564
  class: "text-gray-400 cursor-help",
1606
1565
  title: s.tooltip
1607
1566
  }, e[0] || (e[0] = [
1608
1567
  t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1609
- ]), 8, lo)) : b("", !0)
1568
+ ]), 8, go)) : x("", !0)
1610
1569
  ])
1611
1570
  ]),
1612
- t("td", ro, [
1613
- (o(), D(z(n(s)), { item: s }, null, 8, ["item"]))
1571
+ t("td", ho, [
1572
+ (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1614
1573
  ])
1615
1574
  ]))), 128))
1616
1575
  ])
1617
1576
  ])
1618
- ])) : i.view === "grid" ? (o(), a("div", co, [
1619
- (o(!0), a(L, null, H(i.items, (s) => (o(), a("div", {
1577
+ ])) : n.view === "grid" ? (o(), a("div", fo, [
1578
+ (o(!0), a(z, null, F(n.items, (s) => (o(), a("div", {
1620
1579
  key: s.id || s.label,
1621
1580
  class: "description-item-card bg-white border border-gray-200 rounded-lg p-4"
1622
1581
  }, [
1623
- t("div", uo, [
1624
- s.icon ? (o(), a("div", po, [
1582
+ t("div", vo, [
1583
+ s.icon ? (o(), a("div", yo, [
1625
1584
  t("i", {
1626
- class: x([s.icon, "text-gray-500 text-lg"])
1585
+ class: _([s.icon, "text-gray-500 text-lg"])
1627
1586
  }, null, 2)
1628
- ])) : b("", !0),
1629
- t("div", mo, [
1630
- t("div", ho, [
1631
- t("h4", go, f(s.label), 1),
1587
+ ])) : x("", !0),
1588
+ t("div", bo, [
1589
+ t("div", xo, [
1590
+ t("h4", ko, v(s.label), 1),
1632
1591
  s.tooltip ? (o(), a("span", {
1633
1592
  key: 0,
1634
1593
  class: "text-gray-400 cursor-help",
1635
1594
  title: s.tooltip
1636
1595
  }, e[1] || (e[1] = [
1637
1596
  t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1638
- ]), 8, fo)) : b("", !0)
1597
+ ]), 8, wo)) : x("", !0)
1639
1598
  ]),
1640
- (o(), D(z(n(s)), { item: s }, null, 8, ["item"]))
1599
+ (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1641
1600
  ])
1642
1601
  ])
1643
1602
  ]))), 128))
1644
- ])) : (o(), a("div", vo, [
1645
- t("table", yo, [
1646
- t("tbody", bo, [
1647
- (o(!0), a(L, null, H(i.items, (s) => (o(), a("tr", {
1603
+ ])) : (o(), a("div", _o, [
1604
+ t("table", $o, [
1605
+ t("tbody", Co, [
1606
+ (o(!0), a(z, null, F(n.items, (s) => (o(), a("tr", {
1648
1607
  key: s.id || s.label
1649
1608
  }, [
1650
- t("td", xo, [
1651
- t("div", ko, [
1609
+ t("td", Mo, [
1610
+ t("div", Lo, [
1652
1611
  s.icon ? (o(), a("i", {
1653
1612
  key: 0,
1654
- class: x([s.icon, "text-gray-500"])
1655
- }, null, 2)) : b("", !0),
1656
- I(" " + f(s.label) + " ", 1),
1613
+ class: _([s.icon, "text-gray-500"])
1614
+ }, null, 2)) : x("", !0),
1615
+ V(" " + v(s.label) + " ", 1),
1657
1616
  s.tooltip ? (o(), a("span", {
1658
1617
  key: 1,
1659
1618
  class: "text-gray-400 cursor-help",
1660
1619
  title: s.tooltip
1661
1620
  }, e[2] || (e[2] = [
1662
1621
  t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1663
- ]), 8, _o)) : b("", !0)
1622
+ ]), 8, Do)) : x("", !0)
1664
1623
  ])
1665
1624
  ]),
1666
- t("td", wo, [
1667
- (o(), D(z(n(s)), { item: s }, null, 8, ["item"]))
1625
+ t("td", To, [
1626
+ (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1668
1627
  ])
1669
1628
  ]))), 128))
1670
1629
  ])
1671
1630
  ])
1672
1631
  ]))
1673
- ], 14, eo));
1632
+ ], 14, lo));
1633
+ }
1634
+ }), Io = /* @__PURE__ */ B(jo, [["__scopeId", "data-v-36d43e50"]]), Vo = {
1635
+ draw: {
1636
+ toolbar: {
1637
+ actions: {
1638
+ title: "Скасувати малювання",
1639
+ text: "Скасувати"
1640
+ },
1641
+ finish: {
1642
+ title: "Завершити малювання",
1643
+ text: "Завершити"
1644
+ },
1645
+ undo: {
1646
+ title: "Видалити останню точку",
1647
+ text: "Видалити останню"
1648
+ },
1649
+ buttons: {
1650
+ polyline: "Намалювати лінію",
1651
+ polygon: "Намалювати полігон",
1652
+ rectangle: "Намалювати прямокутник",
1653
+ circle: "Намалювати коло",
1654
+ marker: "Додати точку",
1655
+ circlemarker: "Додати маркер-коло"
1656
+ }
1657
+ },
1658
+ handlers: {
1659
+ circle: {
1660
+ tooltip: {
1661
+ start: "Клацніть і тягніть, щоб намалювати коло",
1662
+ end: "Відпустіть кнопку миші, щоб завершити"
1663
+ },
1664
+ radius: "Радіус"
1665
+ },
1666
+ circlemarker: {
1667
+ tooltip: {
1668
+ start: "Клацніть на карту, щоб додати маркер-коло"
1669
+ }
1670
+ },
1671
+ marker: {
1672
+ tooltip: {
1673
+ start: "Клацніть на карту, щоб додати точку"
1674
+ }
1675
+ },
1676
+ polygon: {
1677
+ tooltip: {
1678
+ start: "Клацніть, щоб почати малювати полігон",
1679
+ cont: "Клацайте, щоб продовжити малювати полігон",
1680
+ end: "Клацніть першу точку, щоб завершити полігон"
1681
+ }
1682
+ },
1683
+ polyline: {
1684
+ error: "<strong>Помилка:</strong> лінія не може перетинатися сама з собою",
1685
+ tooltip: {
1686
+ start: "Клацніть, щоб почати малювати лінію",
1687
+ cont: "Клацайте, щоб продовжити малювати лінію",
1688
+ end: "Клацніть останню точку, щоб завершити лінію"
1689
+ }
1690
+ },
1691
+ rectangle: {
1692
+ tooltip: {
1693
+ start: "Клацніть і тягніть, щоб намалювати прямокутник",
1694
+ end: "Відпустіть кнопку миші, щоб завершити"
1695
+ }
1696
+ },
1697
+ simpleshape: {
1698
+ tooltip: {
1699
+ end: "Відпустіть кнопку миші, щоб завершити"
1700
+ }
1701
+ }
1702
+ }
1703
+ },
1704
+ edit: {
1705
+ toolbar: {
1706
+ actions: {
1707
+ save: {
1708
+ title: "Зберегти зміни",
1709
+ text: "Зберегти"
1710
+ },
1711
+ cancel: {
1712
+ title: "Скасувати редагування",
1713
+ text: "Скасувати"
1714
+ },
1715
+ clearAll: {
1716
+ title: "Очистити всі шари",
1717
+ text: "Очистити все"
1718
+ }
1719
+ },
1720
+ buttons: {
1721
+ edit: "Редагувати шари",
1722
+ editDisabled: "Немає шарів для редагування",
1723
+ remove: "Видалити шари",
1724
+ removeDisabled: "Немає шарів для видалення"
1725
+ }
1726
+ },
1727
+ handlers: {
1728
+ edit: {
1729
+ tooltip: {
1730
+ text: "Перетягніть маркери, щоб редагувати шари",
1731
+ subtext: "Натисніть 'Скасувати', щоб повернутися"
1732
+ }
1733
+ },
1734
+ remove: {
1735
+ tooltip: {
1736
+ text: "Клацніть на шари, щоб видалити їх"
1737
+ }
1738
+ }
1739
+ }
1740
+ }
1741
+ };
1742
+ function zo(l) {
1743
+ return l ? l.type === "FeatureCollection" || l.type === "Feature" ? l : l.geom ? {
1744
+ type: "Feature",
1745
+ geometry: {
1746
+ type: l.geom.type,
1747
+ coordinates: l.geom.coordinates
1748
+ },
1749
+ properties: {}
1750
+ } : l.type && l.coordinates ? {
1751
+ type: "Feature",
1752
+ geometry: l,
1753
+ properties: {}
1754
+ } : null : null;
1755
+ }
1756
+ const Fo = { class: "relative" }, Ao = {
1757
+ key: 1,
1758
+ class: "bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"
1759
+ }, Ho = { class: "flex items-center justify-between p-2 border-b" }, So = { class: "p-2 border-b" }, Eo = { class: "flex items-center" }, Oo = { class: "flex items-center" }, Bo = { class: "flex items-center" }, Ro = { class: "p-2" }, No = { class: "flex items-center" }, fe = /* @__PURE__ */ C({
1760
+ __name: "MapWidget",
1761
+ props: {
1762
+ data: {}
1763
+ },
1764
+ setup(l) {
1765
+ const i = l, n = w(null);
1766
+ let e, s;
1767
+ const f = {
1768
+ topo100: {
1769
+ url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"
1770
+ },
1771
+ orto10: {
1772
+ url: "https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"
1773
+ },
1774
+ osmb: {
1775
+ url: "https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"
1776
+ }
1777
+ }, p = w("topo100");
1778
+ let g;
1779
+ const u = w(!0), m = w(!1);
1780
+ function r() {
1781
+ return new Promise((M, d) => {
1782
+ if (window.L && window.L.Draw) return M(0);
1783
+ const c = (k) => {
1784
+ if (Array.from(document.styleSheets).some((q) => q?.href?.includes(k))) return;
1785
+ const N = document.createElement("link");
1786
+ N.rel = "stylesheet", N.href = k, document.head.appendChild(N);
1787
+ }, T = (k) => new Promise((j, N) => {
1788
+ const q = Array.from(document.scripts).find((K) => K.src === k);
1789
+ if (q) {
1790
+ q.addEventListener("load", () => j()), q.addEventListener("error", (K) => N(K));
1791
+ return;
1792
+ }
1793
+ const P = document.createElement("script");
1794
+ P.src = k, P.async = !0, P.onload = () => j(), P.onerror = (K) => N(K), document.body.appendChild(P);
1795
+ });
1796
+ c("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), c("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), T("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => T("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => M(0)).catch(d);
1797
+ });
1798
+ }
1799
+ oe(async () => {
1800
+ await r(), L.drawLocal = Vo, e = L.map(n.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(e), g = L.tileLayer(f.topo100.url, { maxZoom: 19 }).addTo(e), p.value = "topo100", s = new L.FeatureGroup().addTo(e);
1801
+ const M = zo(i.data);
1802
+ if (M) {
1803
+ const d = [];
1804
+ L.geoJSON(M).eachLayer((c) => d.push(c)), d.length && s.addLayer(d[0]), s.toGeoJSON(), h();
1805
+ }
1806
+ });
1807
+ function h(M = 30) {
1808
+ const d = s.getLayers();
1809
+ if (!d.length) return;
1810
+ const T = L.featureGroup(d).getBounds();
1811
+ T && T.isValid() && e.fitBounds(T, { padding: [M, M] });
1812
+ }
1813
+ function I(M) {
1814
+ g && g.removeFrom(e);
1815
+ const d = f[M];
1816
+ g = L.tileLayer(d.url, d.options || {}).addTo(e), p.value = M;
1817
+ }
1818
+ function H() {
1819
+ I(p.value);
1820
+ }
1821
+ function R() {
1822
+ s && (u.value ? s.addTo(e) : s.removeFrom(e));
1823
+ }
1824
+ return (M, d) => (o(), a("div", Fo, [
1825
+ t("div", {
1826
+ ref_key: "mapContainer",
1827
+ ref: n,
1828
+ class: "w-full h-[400px]"
1829
+ }, null, 512),
1830
+ m.value ? x("", !0) : (o(), a("div", {
1831
+ key: 0,
1832
+ onClick: d[0] || (d[0] = (c) => m.value = !0),
1833
+ class: "z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"
1834
+ }, " Шари ")),
1835
+ m.value ? (o(), a("div", Ao, [
1836
+ t("div", Ho, [
1837
+ d[7] || (d[7] = t("div", null, "Шари", -1)),
1838
+ (o(), a("svg", {
1839
+ onClick: d[1] || (d[1] = (c) => m.value = !1),
1840
+ xmlns: "http://www.w3.org/2000/svg",
1841
+ viewBox: "0 0 24 24",
1842
+ fill: "none",
1843
+ stroke: "currentColor",
1844
+ "stroke-width": "2",
1845
+ "stroke-linecap": "round",
1846
+ "stroke-linejoin": "round",
1847
+ class: "icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"
1848
+ }, d[6] || (d[6] = [
1849
+ t("path", {
1850
+ stroke: "none",
1851
+ d: "M0 0h24v24H0z",
1852
+ fill: "none"
1853
+ }, null, -1),
1854
+ t("path", { d: "M18 6l-12 12" }, null, -1),
1855
+ t("path", { d: "M6 6l12 12" }, null, -1)
1856
+ ])))
1857
+ ]),
1858
+ t("div", So, [
1859
+ t("div", null, [
1860
+ t("label", Eo, [
1861
+ O(t("input", {
1862
+ type: "radio",
1863
+ name: "base-layer",
1864
+ value: "topo100",
1865
+ "onUpdate:modelValue": d[2] || (d[2] = (c) => p.value = c),
1866
+ onChange: H
1867
+ }, null, 544), [
1868
+ [Q, p.value]
1869
+ ]),
1870
+ d[8] || (d[8] = t("span", { class: "ml-2" }, "Карта України", -1))
1871
+ ])
1872
+ ]),
1873
+ t("div", null, [
1874
+ t("label", Oo, [
1875
+ O(t("input", {
1876
+ type: "radio",
1877
+ name: "base-layer",
1878
+ value: "orto10",
1879
+ "onUpdate:modelValue": d[3] || (d[3] = (c) => p.value = c),
1880
+ onChange: H
1881
+ }, null, 544), [
1882
+ [Q, p.value]
1883
+ ]),
1884
+ d[9] || (d[9] = t("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
1885
+ ])
1886
+ ]),
1887
+ t("div", null, [
1888
+ t("label", Bo, [
1889
+ O(t("input", {
1890
+ type: "radio",
1891
+ name: "base-layer",
1892
+ value: "osmb",
1893
+ "onUpdate:modelValue": d[4] || (d[4] = (c) => p.value = c),
1894
+ onChange: H
1895
+ }, null, 544), [
1896
+ [Q, p.value]
1897
+ ]),
1898
+ d[10] || (d[10] = t("span", { class: "ml-2" }, "Open Street Map", -1))
1899
+ ])
1900
+ ])
1901
+ ]),
1902
+ t("div", Ro, [
1903
+ t("label", No, [
1904
+ O(t("input", {
1905
+ type: "checkbox",
1906
+ "onUpdate:modelValue": d[5] || (d[5] = (c) => u.value = c),
1907
+ onChange: R
1908
+ }, null, 544), [
1909
+ [De, u.value]
1910
+ ]),
1911
+ d[11] || (d[11] = t("span", { class: "ml-2" }, " Показати геометрію ", -1))
1912
+ ])
1913
+ ])
1914
+ ])) : x("", !0)
1915
+ ]));
1674
1916
  }
1675
- }), Co = /* @__PURE__ */ A($o, [["__scopeId", "data-v-36d43e50"]]), jo = {
1676
- install: (r) => {
1677
- r.component("vs-widget-file", ne), r.component("vs-widget-comments", te), r.component("vs-widget-history", oe), r.component("vs-widget-gallery", ie), r.component("CommentsWidget", te), r.component("HistoryWidget", oe), r.component("GalleryWidget", ie), r.component("FilesWidget", ne), r.component("Card", Hs), r.component("CardItem", zs), r.component("DescriptionListWidget", Co), r.component("CopyNotification", he);
1917
+ }), Wo = {
1918
+ install: (l) => {
1919
+ l.component("vs-widget-file", ge), l.component("vs-widget-comments", ce), l.component("vs-widget-history", pe), l.component("vs-widget-gallery", he), l.component("vs-widget-map", fe), l.component("CommentsWidget", ce), l.component("HistoryWidget", pe), l.component("GalleryWidget", he), l.component("FilesWidget", ge), l.component("MapWidget", fe), l.component("Card", Ss), l.component("CardItem", Os), l.component("DescriptionListWidget", Io), l.component("CopyNotification", _e);
1678
1920
  }
1679
1921
  };
1680
1922
  export {
1681
- Hs as Card,
1682
- zs as CardItem,
1683
- te as CommentsWidget,
1684
- he as CopyNotification,
1685
- Co as DescriptionListWidget,
1686
- ne as FilesWidget,
1687
- ie as GalleryWidget,
1688
- oe as HistoryWidget,
1689
- jo as default
1923
+ Ss as Card,
1924
+ Os as CardItem,
1925
+ ce as CommentsWidget,
1926
+ _e as CopyNotification,
1927
+ Io as DescriptionListWidget,
1928
+ ge as FilesWidget,
1929
+ he as GalleryWidget,
1930
+ pe as HistoryWidget,
1931
+ Wo as default
1690
1932
  };