@opengis/widgets 0.0.15 → 0.0.16

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.
@@ -1,49 +1,49 @@
1
- (function(B,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(B=typeof globalThis<"u"?globalThis:B||self,e(B.WidgetLib={},B.Vue))})(this,(function(B,e){"use strict";/**
1
+ (function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E.WidgetLib={},E.Vue))})(this,function(E,e){"use strict";/**
2
2
  * @license lucide-vue-next v0.535.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const W=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ne=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,o,t)=>t?t.toUpperCase():o.toLowerCase()),le=s=>{const l=ne(s);return l.charAt(0).toUpperCase()+l.slice(1)},se=(...s)=>s.filter((l,o,t)=>!!l&&l.trim()!==""&&t.indexOf(l)===o).join(" ").trim();/**
6
+ */const K=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),re=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,o,t)=>t?t.toUpperCase():o.toLowerCase()),ae=r=>{const l=re(r);return l.charAt(0).toUpperCase()+l.slice(1)},ie=(...r)=>r.filter((l,o,t)=>!!l&&l.trim()!==""&&t.indexOf(l)===o).join(" ").trim();/**
7
7
  * @license lucide-vue-next v0.535.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */var T={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
11
+ */var F={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
12
12
  * @license lucide-vue-next v0.535.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const re=({size:s,strokeWidth:l=2,absoluteStrokeWidth:o,color:t,iconNode:n,name:p,class:a,...h},{slots:y})=>e.h("svg",{...T,width:s||T.width,height:s||T.height,stroke:t||T.stroke,"stroke-width":o?Number(l)*24/Number(s):l,class:se("lucide",...p?[`lucide-${W(le(p))}-icon`,`lucide-${W(p)}`]:["lucide-icon"]),...h},[...n.map(d=>e.h(...d)),...y.default?[y.default()]:[]]);/**
16
+ */const ce=({size:r,strokeWidth:l=2,absoluteStrokeWidth:o,color:t,iconNode:n,name:k,class:s,...y},{slots:c})=>e.h("svg",{...F,width:r||F.width,height:r||F.height,stroke:t||F.stroke,"stroke-width":o?Number(l)*24/Number(r):l,class:ie("lucide",...k?[`lucide-${K(ae(k))}-icon`,`lucide-${K(k)}`]:["lucide-icon"]),...y},[...n.map(d=>e.h(...d)),...c.default?[c.default()]:[]]);/**
17
17
  * @license lucide-vue-next v0.535.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const _=(s,l)=>(o,{slots:t})=>e.h(re,{...o,iconNode:l,name:s},t);/**
21
+ */const _=(r,l)=>(o,{slots:t})=>e.h(ce,{...o,iconNode:l,name:r},t);/**
22
22
  * @license lucide-vue-next v0.535.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const ae=_("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
26
+ */const de=_("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
27
27
  * @license lucide-vue-next v0.535.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const ie=_("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
31
+ */const me=_("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
32
32
  * @license lucide-vue-next v0.535.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const ce=_("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
36
+ */const pe=_("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
37
37
  * @license lucide-vue-next v0.535.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const q=_("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
41
+ */const Z=_("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
42
42
  * @license lucide-vue-next v0.535.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const de=_("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
46
+ */const fe=_("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
47
47
  * @license lucide-vue-next v0.535.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
@@ -53,79 +53,79 @@
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const me=_("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
56
+ */const ge=_("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
57
57
  * @license lucide-vue-next v0.535.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const pe=_("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
61
+ */const he=_("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
62
62
  * @license lucide-vue-next v0.535.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const fe=_("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);/**
66
+ */const ye=_("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);/**
67
67
  * @license lucide-vue-next v0.535.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const ge=_("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
71
+ */const ke=_("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
72
72
  * @license lucide-vue-next v0.535.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const G=_("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
76
+ */const J=_("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
77
77
  * @license lucide-vue-next v0.535.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const he=_("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
81
+ */const be=_("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
82
82
  * @license lucide-vue-next v0.535.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const K=_("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
86
+ */const X=_("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
87
87
  * @license lucide-vue-next v0.535.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const ye=_("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]);/**
91
+ */const xe=_("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]);/**
92
92
  * @license lucide-vue-next v0.535.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const Z=_("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
96
+ */const Q=_("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
97
97
  * @license lucide-vue-next v0.535.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const ke=_("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
101
+ */const ue=_("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
102
102
  * @license lucide-vue-next v0.535.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const be=_("square-pen",[["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"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
106
+ */const _e=_("square-pen",[["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"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
107
107
  * @license lucide-vue-next v0.535.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const j=_("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
111
+ */const O=_("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
112
112
  * @license lucide-vue-next v0.535.0 - ISC
113
113
  *
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
- */const xe=_("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);/**
116
+ */const we=_("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);/**
117
117
  * @license lucide-vue-next v0.535.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const A=_("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
121
+ */const P=_("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
122
122
  * @license lucide-vue-next v0.535.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const ue=_("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
126
+ */const Ee=_("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
127
127
  * @license lucide-vue-next v0.535.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const H=_("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_e={class:"border-t pt-3 mt-4"},we={class:"flex gap-2"},Ee={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Be={class:"flex-1 space-y-2"},Ve={class:"flex justify-between items-center"},Ne={class:"flex gap-2"},Ce=["disabled"],J=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(s,{emit:l}){const o=e.useModel(s,"isReply"),t=e.ref(""),n=l,p=()=>{t.value.trim()&&(n("sendComment",t.value),t.value="")},a=h=>{(h.ctrlKey||h.metaKey)&&h.key==="Enter"&&(h.preventDefault(),p())};return(h,y)=>(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("div",we,[e.createElementVNode("span",Ee,[e.createVNode(e.unref(A),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Be,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":y[0]||(y[0]=d=>t.value=d),onKeydown:a,placeholder:"Add a comment...",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"},null,544),[[e.vModelText,t.value]]),e.createElementVNode("div",Ve,[y[4]||(y[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",Ne,[o.value?(e.openBlock(),e.createElementBlock("button",{key:0,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",onClick:y[1]||(y[1]=d=>o.value=!1)},[e.createVNode(e.unref(H),{class:"h-3 w-3"}),y[2]||(y[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{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",disabled:!t.value.trim(),onClick:p},[e.createVNode(e.unref(Z),{class:"h-3 w-3 mr-1"}),y[3]||(y[3]=e.createTextVNode(" Send ",-1))],8,Ce)])])])])]))}}),$e={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"},De=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(s,{emit:l}){const o=l,t=e.useModel(s,"showMoreOptions"),n=e.ref(),p=e.ref(!0),a=async d=>{t.value&&n.value&&!n.value.contains(d.target)&&!p.value&&(t.value=!1),p.value=!1},h=()=>{t.value=!1,o("edit")},y=()=>{t.value=!1,o("delete")};return e.onMounted(()=>{document.addEventListener("click",a)}),e.onUnmounted(()=>{document.removeEventListener("click",a)}),(d,r)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:n},[e.createElementVNode("div",$e,[e.createElementVNode("div",{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",onClick:h},[e.createVNode(e.unref(be),{class:"h-3 w-3 mr-2"}),r[0]||(r[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{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",onClick:y},[e.createVNode(e.unref(j),{class:"h-3 w-3 mr-2"}),r[1]||(r[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),Me={class:"space-y-2"},Le={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Te={class:"flex-1 min-w-0 space-y-1 relative"},Se={class:"flex items-center gap-2"},ze={class:"font-medium text-xs"},Fe={class:"text-xs text-gray-500"},Ie={key:0,class:"text-xs text-gray-700 leading-relaxed"},je={class:"flex justify-between text-xs"},Ae={class:"flex items-center gap-2"},He={key:0,class:"flex gap-2"},Oe=["disabled"],Pe={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},Re=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(s,{emit:l}){const o=l,t=s,n=e.ref(t.comment.text),p=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),a=e.ref("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"),h=e.ref(!1),y=e.ref(!1),d=e.ref(!1),r=e.ref(!1),g=i=>{const c=new Date,u=Math.floor((c.getTime()-i.getTime())/(1e3*60*60));return u<1?`${Math.floor((c.getTime()-i.getTime())/6e4)}m`:u<24?`${u}h`:`${Math.floor(u/24)}d`},m=()=>{r.value=!r.value,r.value?o("like",t.comment.id,"add"):o("like",t.comment.id,"delete")},x=()=>{o("edit",t.comment.id,n.value),d.value=!1},N=(i,c)=>{o("like",i,c)},w=(i,c)=>{o("edit",i,c)};return(i,c)=>{const u=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",d.value?"bg-gray-50":""])},[e.createElementVNode("span",Le,[e.createVNode(e.unref(A),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Te,[e.createElementVNode("div",Se,[e.createElementVNode("span",ze,e.toDisplayString(i.comment?.author),1),e.createElementVNode("span",Fe,e.toDisplayString(g(i.comment?.createdAt)),1)]),d.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":c[0]||(c[0]=k=>n.value=k),class:e.normalizeClass(d.value?a.value:p.value)},null,2)),[[e.vModelText,n.value]]):(e.openBlock(),e.createElementBlock("p",Ie,e.toDisplayString(i.comment?.text),1)),e.createElementVNode("div",je,[e.createElementVNode("div",Ae,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",r.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:c[1]||(c[1]=k=>m())},[e.createVNode(e.unref(fe),{class:e.normalizeClass(["h-3 w-3",r.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(i.comment?.likes),1)],2),i.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:c[2]||(c[2]=k=>y.value=!0)},[e.createVNode(e.unref(ye),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:c[3]||(c[3]=k=>h.value=!0)},[e.createVNode(e.unref(de),{class:"h-3 w-3"})])]),d.value?(e.openBlock(),e.createElementBlock("div",He,[e.createElementVNode("button",{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",onClick:c[4]||(c[4]=k=>d.value=!1)},[e.createVNode(e.unref(H),{class:"h-3 w-3"}),c[11]||(c[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{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",disabled:!n.value.trim(),onClick:c[5]||(c[5]=k=>x())},[e.createVNode(e.unref(Z),{class:"h-3 w-3 mr-1"}),c[12]||(c[12]=e.createTextVNode(" Send ",-1))],8,Oe)])):e.createCommentVNode("",!0)])]),h.value?(e.openBlock(),e.createBlock(De,{key:0,showMoreOptions:h.value,"onUpdate:showMoreOptions":c[6]||(c[6]=k=>h.value=k),onEdit:c[7]||(c[7]=k=>d.value=!0),onDelete:c[8]||(c[8]=k=>i.$emit("delete",i.comment?.id)),comment:i.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),i.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.comment?.replies,k=>(e.openBlock(),e.createBlock(u,{key:k.id,comment:k,isInside:!0,onDelete:b=>i.$emit("delete",k.id),onLike:N,onEdit:w},null,8,["comment","onDelete"]))),128)),y.value&&!i.isInside?(e.openBlock(),e.createBlock(J,{key:0,onSendComment:c[9]||(c[9]=k=>i.$emit("reply",i.comment?.id,k)),isReply:y.value,"onUpdate:isReply":c[10]||(c[10]=k=>y.value=k)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),Ue=["id"],We={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},S=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(s,{emit:l}){const o=s,t=l,n=d=>{o?.onAddComment?.(d),t("add",d)},p=(d,r)=>{o?.onLike?.(d,r),t("like",d,r)},a=(d,r)=>{o.onReply?.(d,r),t("reply",d,r)},h=(d,r)=>{o.onEdit?.(d,r),t("edit",d,r)},y=d=>{o.onDelete?.(d),t("delete",d)};return(d,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",d.className]),id:d.id,style:e.normalizeStyle(d.style)},[d.title?(e.openBlock(),e.createElementBlock("h3",We,e.toDisplayString(d.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([d.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:d.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.comments,g=>(e.openBlock(),e.createBlock(Re,{key:g.id,comment:g,onReply:a,onLike:p,onDelete:r[0]||(r[0]=m=>y(m)),onEdit:h},null,8,["comment"]))),128))],6),e.createVNode(J,{onSendComment:r[1]||(r[1]=g=>n(g))})],14,Ue))}}),X=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:D}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:ke}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:xe}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:ge}]]),qe={class:"mx-auto font-sans"},Ge={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Ke={class:"relative"},Ze={class:"space-y-3"},Je={class:"flex-1 min-w-0 pb-2"},Xe={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Qe={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Ye={class:"font-medium text-xs"},ve={class:"text-xs text-gray-500"},et={class:"space-y-1"},tt={class:"text-xs text-gray-700"},ot={class:"capitalize mr-1"},nt={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},lt={key:0,class:"flex items-center gap-1 text-xs"},st={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},rt={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},z=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(s){const l=s,o=e.ref(Array.isArray(l.data)?l.data:[]);o.value.length===0&&l.id&&t();async function t(){const n=await fetch(`/api/widget/history/${l.id}`);if(!n.ok)return{data:[]};const p=await n.json();p.rows.forEach(a=>{a.timestamp=new Date(a.cdate),a.id=a.entity_id,a.entityType=a.entity_type,a.entityId=a.entity_id,a.action=a.change_type,a.userId=a.change_user_id,a.userName=a.username,a.timestamp=new Date(a.cdate),a.description=a.username,a.status=a.username}),o.value=p.rows}return(n,p)=>(e.openBlock(),e.createElementBlock("div",qe,[n.title?(e.openBlock(),e.createElementBlock("h3",Ge,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(n.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:n.maxHeight+"px"})},[e.createElementVNode("div",Ke,[p[0]||(p[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,a=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:a?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(X).get(a?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(X).get(a?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Je,[e.createElementVNode("div",Xe,[e.createElementVNode("span",Qe,[e.createVNode(e.unref(A),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",Ye,e.toDisplayString(a?.userName),1),e.createElementVNode("span",ve,e.toDisplayString(a?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",et,[e.createElementVNode("div",tt,[e.createElementVNode("span",ot,e.toDisplayString(a?.action),1),a?.entityId?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(a?.entityId),1)):e.createCommentVNode("",!0)]),a?.changes?.[a?.entityId]?(e.openBlock(),e.createElementBlock("div",lt,[a?.changes?.[a?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(a?.changes?.[a?.entityId]?.old),1)):e.createCommentVNode("",!0),a?.changes?.[a?.entityId]?.old&&a?.changes?.[a?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(ie),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),a?.changes?.[a?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",rt,e.toDisplayString(a?.changes?.[a?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),at={key:0,class:"text-xl font-semibold"},it={class:"flex gap-1"},ct={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"},dt=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(s){const l=e.useModel(s,"modelValue"),o={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",t.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[t.title?(e.openBlock(),e.createElementBlock("h3",at,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",it,[e.createElementVNode("button",{class:e.normalizeClass(["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",l.value==="list"?o.active:o.inactive]),onClick:n[0]||(n[0]=p=>l.value="list")},[e.createVNode(e.unref(he),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["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",l.value==="grid"?o.active:o.inactive]),onClick:n[1]||(n[1]=p=>l.value="grid")},[e.createVNode(e.unref(pe),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:n[2]||(n[2]=p=>t.$emit("onAddFile",p))},null,32),e.createElementVNode("div",ct,[e.createVNode(e.unref(K),{class:"h-4 w-4"}),n[3]||(n[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),O={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:D,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:me,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:ue,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:D,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:ae,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:G,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:G,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:D,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:D,label:"PPT"}};function Q(s,l="en"){const o={month:"short",day:"numeric"};return new Intl.DateTimeFormat(l,o).format(s)}function Y(s){if(s===0)return"0 B";const l=1024,o=["B","KB","MB","GB","TB"],t=Math.floor(Math.log(s)/Math.log(l));return`${parseFloat((s/Math.pow(l,t)).toFixed(1))} ${o[t]}`}const mt={class:"space-y-0.5"},pt=["onClick"],ft=["onClick"],gt={class:"flex items-center gap-2"},ht={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},yt={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},kt={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},bt={class:"flex items-center gap-1"},xt=["onClick"],ut=["onClick"],v=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(s){return(l,o)=>(e.openBlock(),e.createElementBlock("div",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,t=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:t.id,onClick:e.withModifiers(n=>l.$emit("openLightbox",t),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(O)[t?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(O)[t?.ext]?.icon||e.unref(O).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:n=>l.$emit("openLightbox",t)},[e.createElementVNode("div",gt,[e.createElementVNode("span",ht,e.toDisplayString(t?.uploaded_name||t?.name),1)])],8,ft),e.createElementVNode("div",yt,e.toDisplayString(e.unref(Y)(t.size)),1),e.createElementVNode("div",kt,e.toDisplayString(e.unref(Q)(t.createdAt)),1),e.createElementVNode("div",bt,[e.createElementVNode("button",{onClick:e.withModifiers(n=>l.$emit("download",t),["stop"]),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"},[e.createVNode(e.unref(q),{class:"h-3 w-3"})],8,xt),e.createElementVNode("button",{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",onClick:e.withModifiers(n=>l.$emit("delete",n,t?.file_id),["stop"])},[e.createVNode(e.unref(j),{class:"h-3 w-3"})],8,ut)])],8,pt))),128))]))}}),_t={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},wt=["onClick"],Et={class:"space-y-2"},Bt={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},Vt=["src"],Nt={class:"space-y-1"},Ct=["title"],$t={class:"text-xs text-gray-500 text-left"},Dt={class:"absolute top-2 right-1 flex items-center gap-1"},Mt=["onClick"],Lt=["onClick"],Tt=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(s){return(l,o)=>(e.openBlock(),e.createElementBlock("div",_t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,t=>(e.openBlock(),e.createElementBlock("div",{key:t.id,onClick:e.withModifiers(n=>l.$emit("openLightbox",t),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",Et,[e.createElementVNode("div",Bt,[t.ext==="png"||t.ext==="jpg"||t.ext==="jpeg"||t.ext==="gif"||t.ext==="svg"||t.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${t?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,Vt)):(e.openBlock(),e.createBlock(e.unref(D),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",Nt,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:t.uploaded_name||t.name},e.toDisplayString(t.uploaded_name||t.name),9,Ct),e.createElementVNode("p",$t,e.toDisplayString(e.unref(Q)(t.createdAt))+", "+e.toDisplayString(e.unref(Y)(t.size)),1)])]),e.createElementVNode("div",Dt,[e.createElementVNode("button",{onClick:e.withModifiers(n=>l.$emit("download",t),["stop"]),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"},[e.createVNode(e.unref(q),{class:"h-3 w-3"})],8,Mt),e.createElementVNode("button",{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",onClick:e.withModifiers(n=>l.$emit("delete",n,t?.file_id),["stop"])},[e.createVNode(e.unref(j),{class:"h-3 w-3"})],8,Lt)])],8,wt))),128))]))}}),St={class:"mx-auto font-sans"},zt={key:1},P=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(s,{emit:l}){const o=s,t=e.ref(!1),n=e.ref(null),p=e.ref(!1),a=e.ref(0),h=e.ref(o.files??[]),y=l;h.value.length===0&&c();const d=(b,f)=>{n.value=f,t.value=!0},r=()=>{n.value&&(N(n.value),n.value=null,t.value=!1)},g=e.computed(()=>Array.isArray(h.value)?h.value.map(b=>b?.file_path):[]),m=b=>{const f=g.value.findIndex(V=>V===b.file_path);f!==-1&&(p.value=!0,a.value=f)},x=b=>{o.onAddFile?o.onAddFile(b):u(b),y("add",b)},N=b=>{o.onDelete?o.onDelete(b):k(b),y("delete",b)},w=b=>{const f=document.createElement("a");f.setAttribute("download",b?.uploaded_name||b?.name),f.href=b?.file_path||b?.path,f.click()},i=e.ref("list");async function c(){if(!o.id)return;const b=await fetch(`/api/widget/file/${o.id}`).then(f=>f.json());b.rows.forEach(f=>{f.timestamp=new Date(f.cdate),f.id=f.entity_id,f.entityType=f.entity_type,f.entityId=f.entity_id,f.entityType=f.entity_type,f.action=f.change_type,f.userId=f.change_user_id,f.userName=f.username,f.timestamp=new Date(f.cdate),f.description=f.username,f.status=f.username}),h.value=b.rows}const u=async b=>{if(!(!b.target||!b.target.files||b.target.files.length===0))try{await Promise.all(Array.from(b.target.files).map(async f=>{const V=new FormData;V.append("file",f);const C=`/api/widget/file/${o.id}`,E=await fetch(C,{method:"POST",body:V});if(!E.ok)throw new Error(`HTTP error! status: ${E.status}`);return f})),await c()}catch(f){console.error("Помилка при завантаженні файлів:",f)}},k=async b=>{try{await fetch(`/api/widget/file/${o.id}/${b}`,{method:"DELETE"}),await c()}catch(f){console.error(f)}};return(b,f)=>{const V=e.resolveComponent("MessageBox"),C=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",St,[e.createVNode(dt,{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=E=>i.value=E),title:o.title,onOnAddFile:f[1]||(f[1]=E=>x(E))},null,8,["modelValue","title"]),h.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(b.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:b.maxHeight+"px"})},[i.value==="list"?(e.openBlock(),e.createBlock(v,{key:0,onDelete:d,onDownload:w,onOpenLightbox:f[2]||(f[2]=E=>m(E)),files:h.value},null,8,["files"])):e.createCommentVNode("",!0),i.value==="grid"?(e.openBlock(),e.createBlock(Tt,{key:1,onDelete:d,onDownload:w,onOpenLightbox:f[3]||(f[3]=E=>m(E)),files:h.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",zt,[...f[6]||(f[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])]))]),e.createVNode(V,{modelValue:t.value,"onUpdate:modelValue":f[4]||(f[4]=E=>t.value=E),onConfirm:r,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(C,{modelValue:p.value,"onUpdate:modelValue":f[5]||(f[5]=E=>p.value=E),images:g.value,"start-index":a.value},null,8,["modelValue","images","start-index"])],64)}}}),Ft={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},It=["onClick"],jt={key:0,rel:"noreferrer",class:"relative block h-full w-full"},At=["src"],Ht={key:0,class:"thumb-cover"},Ot=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(s,{emit:l}){const o=l,t=e.ref(!1),n=e.ref(0),p=s,a=e.computed(()=>Array.isArray(p.items)?p.items.map(y=>y?.file_path):[]),h=y=>{const d=a.value.findIndex(r=>r===y.file_path);d!==-1&&(t.value=!0,n.value=d)};return(y,d)=>{const r=e.resolveComponent("Lightbox");return y.items?.length>=1?(e.openBlock(),e.createElementBlock("div",Ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.items,(g,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+m,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:m,onClick:e.withModifiers(x=>h(g),["stop"])},[m<5?(e.openBlock(),e.createElementBlock("div",jt,[e.createElementVNode("img",{src:`/file/resize?filepath=${g?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",m===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,At),m===4&&y.items?.length>5?(e.openBlock(),e.createElementBlock("div",Ht," +"+e.toDisplayString(y.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,It))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-y.items.length),g=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+g,class:e.normalizeClass(["h-full w-full image"+(y.items.length+g-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(r,{modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=g=>t.value=g),images:a.value,"start-index":n.value,delete:"true",download:"true",onDelete:d[1]||(d[1]=g=>o("delete",g))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),Pt={key:0,class:"text-xl font-semibold"},Rt={class:"flex gap-1"},Ut={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"},Wt=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(s){return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",l.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[l.title?(e.openBlock(),e.createElementBlock("h3",Pt,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Rt,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:o[0]||(o[0]=t=>l.$emit("onAddImage",t))},null,32),e.createElementVNode("div",Ut,[e.createVNode(e.unref(K),{class:"h-4 w-4"}),o[1]||(o[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),qt={class:"w-full mx-auto font-sans",ref:"containerRef"},Gt={key:1},F=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(s,{emit:l}){const o=s,t=e.ref(o.items??[]),n=l;t.value.length===0&&y();const p=r=>{o.onAddImage?o.onAddImage(r):h(r),n("add",r)},a=r=>{const g=t.value.find(m=>m.file_path===r)?.file_id;g&&(o.onDelete?o.onDelete(g):d(g))},h=async r=>{if(!(!r.target||!r.target.files||r.target.files.length===0))try{await Promise.all(Array.from(r.target.files).map(async g=>{const m=new FormData;m.append("file",g);const x=`/api/widget/file/${o.id}`,N=await fetch(x,{method:"POST",body:m});if(!N.ok)throw new Error(`HTTP error! status: ${N.status}`);return g})),await y()}catch(g){console.error("Помилка при завантаженні файлів:",g)}};async function y(){if(!o.id)return;const r=await fetch(`/api/widget/file/${o.id}`).then(g=>g.json());t.value=r.rows}const d=async r=>{try{await fetch(`/api/widget/file/${o.id}/${r}`,{method:"DELETE"}),await y()}catch(g){console.error(g)}};return(r,g)=>(e.openBlock(),e.createElementBlock("div",qt,[e.createVNode(Wt,{title:r.title,onOnAddImage:g[0]||(g[0]=m=>p(m))},null,8,["title"]),t.value.length>0?(e.openBlock(),e.createBlock(Ot,{key:0,items:t.value,onDelete:g[1]||(g[1]=m=>a(m))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",Gt,[...g[2]||(g[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])]))],512))}}),Kt={class:"text-value"},Zt={class:"text-sm text-gray-900"},Jt=e.defineComponent({__name:"TextValue",props:{item:{}},setup(s){const l=s,o=e.computed(()=>{const t=l.item.value;return typeof t=="boolean"?t?"Так":"Ні":t==null?"—":String(t)});return(t,n)=>(e.openBlock(),e.createElementBlock("div",Kt,[e.createElementVNode("span",Zt,e.toDisplayString(o.value),1)]))}}),$=(s,l)=>{const o=s.__vccOpts||s;for(const[t,n]of l)o[t]=n;return o},Xt=$(Jt,[["__scopeId","data-v-c14550b7"]]),Qt={class:"link-value"},Yt=["href"],vt=$(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(s){const l=s,o=e.computed(()=>{const t=String(l.item.value);try{const n=new URL(t);return n.hostname+n.pathname}catch{return t}});return(t,n)=>(e.openBlock(),e.createElementBlock("div",Qt,[e.createElementVNode("a",{href:String(t.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(o.value)+" ",1),n[0]||(n[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,Yt)]))}}),[["__scopeId","data-v-e6eb07a6"]]),eo={class:"date-value"},to={class:"text-sm text-gray-900"},oo=$(e.defineComponent({__name:"DateValue",props:{item:{}},setup(s){const l=s,o=e.computed(()=>{const t=l.item.value;if(t instanceof Date)return t.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof t=="string"){const n=new Date(t);if(!isNaN(n.getTime()))return n.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(t)});return(t,n)=>(e.openBlock(),e.createElementBlock("div",eo,[e.createElementVNode("span",to,e.toDisplayString(o.value),1)]))}}),[["__scopeId","data-v-b9600618"]]),no={class:"status-value"},lo={key:0,class:"mr-1"},so=$(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(s){const l=s,o=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),t=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(n,p)=>(e.openBlock(),e.createElementBlock("div",no,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",o.value])},[t.value?(e.openBlock(),e.createElementBlock("span",lo,[e.createElementVNode("i",{class:e.normalizeClass(t.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(n.item.value)),1)],2)]))}}),[["__scopeId","data-v-c72e0b01"]]),ro={class:"custom-value"},ao={class:"text-sm text-gray-900"},io=$(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(s){return(l,o)=>(e.openBlock(),e.createElementBlock("div",ro,[e.renderSlot(l.$slots,"default",{item:l.item,value:l.item.value},()=>[e.createElementVNode("span",ao,e.toDisplayString(String(l.item.value)),1)],!0)]))}}),[["__scopeId","data-v-11a73810"]]),co=["id"],mo={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},po={key:1,class:"overflow-x-auto"},fo={class:"min-w-full divide-y divide-gray-200"},go={class:"bg-white divide-y divide-gray-200"},ho={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},yo={class:"flex items-center gap-2"},ko=["title"],bo={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},xo={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},uo={class:"flex items-start gap-3"},_o={key:0,class:"flex-shrink-0"},wo={class:"flex-1 min-w-0"},Eo={class:"flex items-center gap-2 mb-2"},Bo={class:"text-sm font-medium text-gray-900"},Vo=["title"],No={key:3,class:"overflow-x-auto"},Co={class:"min-w-full divide-y divide-gray-200"},$o={class:"bg-white divide-y divide-gray-200"},Do={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Mo={class:"flex items-center gap-2"},Lo=["title"],To={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},R=$(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(s){const l=o=>{switch(o.type){case"link":return vt;case"date":return oo;case"status":return so;case"custom":return io;default:return Xt}};return(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",o.className]),id:o.id,style:e.normalizeStyle(o.style)},[o.title?(e.openBlock(),e.createElementBlock("h3",mo,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),o.view==="table"?(e.openBlock(),e.createElementBlock("div",po,[e.createElementVNode("table",fo,[e.createElementVNode("tbody",go,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,n=>(e.openBlock(),e.createElementBlock("tr",{key:n.id||n.label},[e.createElementVNode("td",ho,[e.createElementVNode("div",yo,[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([n.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label)+" ",1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:n.tooltip},[...t[0]||(t[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,ko)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",bo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])]))),128))])])])):o.view==="grid"?(e.openBlock(),e.createElementBlock("div",xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id||n.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",uo,[n.icon?(e.openBlock(),e.createElementBlock("div",_o,[e.createElementVNode("i",{class:e.normalizeClass([n.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",wo,[e.createElementVNode("div",Eo,[e.createElementVNode("h4",Bo,e.toDisplayString(n.label),1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:n.tooltip},[...t[1]||(t[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,Vo)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",No,[e.createElementVNode("table",Co,[e.createElementVNode("tbody",$o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,n=>(e.openBlock(),e.createElementBlock("tr",{key:n.id||n.label},[e.createElementVNode("td",Do,[e.createElementVNode("div",Mo,[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([n.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label)+" ",1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:n.tooltip},[...t[2]||(t[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,Lo)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",To,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])]))),128))])])]))],14,co))}}),[["__scopeId","data-v-36d43e50"]]),So={draw:{toolbar:{actions:{title:"Скасувати малювання",text:"Скасувати"},finish:{title:"Завершити малювання",text:"Завершити"},undo:{title:"Видалити останню точку",text:"Видалити останню"},buttons:{polyline:"Намалювати лінію",polygon:"Намалювати полігон",rectangle:"Намалювати прямокутник",circle:"Намалювати коло",marker:"Додати точку",circlemarker:"Додати маркер-коло"}},handlers:{circle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати коло",end:"Відпустіть кнопку миші, щоб завершити"},radius:"Радіус"},circlemarker:{tooltip:{start:"Клацніть на карту, щоб додати маркер-коло"}},marker:{tooltip:{start:"Клацніть на карту, щоб додати точку"}},polygon:{tooltip:{start:"Клацніть, щоб почати малювати полігон",cont:"Клацайте, щоб продовжити малювати полігон",end:"Клацніть першу точку, щоб завершити полігон"}},polyline:{error:"<strong>Помилка:</strong> лінія не може перетинатися сама з собою",tooltip:{start:"Клацніть, щоб почати малювати лінію",cont:"Клацайте, щоб продовжити малювати лінію",end:"Клацніть останню точку, щоб завершити лінію"}},rectangle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати прямокутник",end:"Відпустіть кнопку миші, щоб завершити"}},simpleshape:{tooltip:{end:"Відпустіть кнопку миші, щоб завершити"}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни",text:"Зберегти"},cancel:{title:"Скасувати редагування",text:"Скасувати"},clearAll:{title:"Очистити всі шари",text:"Очистити все"}},buttons:{edit:"Редагувати шари",editDisabled:"Немає шарів для редагування",remove:"Видалити шари",removeDisabled:"Немає шарів для видалення"}},handlers:{edit:{tooltip:{text:"Перетягніть маркери, щоб редагувати шари",subtext:"Натисніть 'Скасувати', щоб повернутися"}},remove:{tooltip:{text:"Клацніть на шари, щоб видалити їх"}}}}};function zo(s){return s?s.type==="FeatureCollection"||s.type==="Feature"?s:s.geom?{type:"Feature",geometry:{type:s.geom.type,coordinates:s.geom.coordinates},properties:{}}:s.type&&s.coordinates?{type:"Feature",geometry:s,properties:{}}:null:null}const Fo={class:"relative min-h-[300px] h-full pb-[3.25rem]"},Io={key:1,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},jo={class:"flex items-center justify-between p-2 border-b"},Ao={class:"p-2 border-b"},Ho={class:"flex items-center"},Oo={class:"flex items-center"},Po={class:"flex items-center"},Ro={class:"p-2"},Uo={class:"flex items-center"},I=e.defineComponent({__name:"MapWidget",props:{geom:{},id:{},className:{},style:{}},setup(s){const l=s,o=e.ref(null);let t,n;const p={topo100:{url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},orto10:{url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},osmb:{url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}},a=e.ref("topo100");let h;const y=e.ref(!0),d=e.ref(!1);function r(){return new Promise((w,i)=>{if(window.L&&window.L.Draw)return w(0);const c=k=>{if(Array.from(document.styleSheets).some(V=>V?.href?.includes(k)))return;const f=document.createElement("link");f.rel="stylesheet",f.href=k,document.head.appendChild(f)},u=k=>new Promise((b,f)=>{const V=Array.from(document.scripts).find(E=>E.src===k);if(V){V.addEventListener("load",()=>b()),V.addEventListener("error",E=>f(E));return}const C=document.createElement("script");C.src=k,C.async=!0,C.onload=()=>b(),C.onerror=E=>f(E),document.body.appendChild(C)});c("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),c("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),u("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(()=>u("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(()=>w(0)).catch(i)})}e.onMounted(async()=>{await r(),L.drawLocal=So,t=L.map(o.value,{zoomControl:!1}).setView([50,30],10),L.control.zoom({position:"bottomright"}).addTo(t),h=L.tileLayer(p.topo100.url,{maxZoom:19}).addTo(t),a.value="topo100",n=new L.FeatureGroup().addTo(t);const w=zo(l.geom);if(w){const i=[];L.geoJSON(w).eachLayer(c=>i.push(c)),i.length&&n.addLayer(i[0]),n.toGeoJSON(),g()}});function g(w=30){const i=n.getLayers();if(!i.length)return;const u=L.featureGroup(i).getBounds();u&&u.isValid()&&t.fitBounds(u,{padding:[w,w]})}function m(w){h&&h.removeFrom(t);const i=p[w];h=L.tileLayer(i.url,i.options||{}).addTo(t),a.value=w}function x(){m(a.value)}function N(){n&&(y.value?n.addTo(t):n.removeFrom(t))}return(w,i)=>(e.openBlock(),e.createElementBlock("div",Fo,[e.createElementVNode("div",{ref_key:"mapContainer",ref:o,class:"w-full h-full min-h-[300px]"},null,512),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:i[0]||(i[0]=c=>d.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"}," Шари ")),d.value?(e.openBlock(),e.createElementBlock("div",Io,[e.createElementVNode("div",jo,[i[7]||(i[7]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:i[1]||(i[1]=c=>d.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"},[...i[6]||(i[6]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])]))]),e.createElementVNode("div",Ao,[e.createElementVNode("div",null,[e.createElementVNode("label",Ho,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"topo100","onUpdate:modelValue":i[2]||(i[2]=c=>a.value=c),onChange:x},null,544),[[e.vModelRadio,a.value]]),i[8]||(i[8]=e.createElementVNode("span",{class:"ml-2"},"Карта України",-1))])]),e.createElementVNode("div",null,[e.createElementVNode("label",Oo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"orto10","onUpdate:modelValue":i[3]||(i[3]=c=>a.value=c),onChange:x},null,544),[[e.vModelRadio,a.value]]),i[9]||(i[9]=e.createElementVNode("span",{class:"ml-2"},"Ortophoto 1:10К",-1))])]),e.createElementVNode("div",null,[e.createElementVNode("label",Po,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"osmb","onUpdate:modelValue":i[4]||(i[4]=c=>a.value=c),onChange:x},null,544),[[e.vModelRadio,a.value]]),i[10]||(i[10]=e.createElementVNode("span",{class:"ml-2"},"Open Street Map",-1))])])]),e.createElementVNode("div",Ro,[e.createElementVNode("label",Uo,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[5]||(i[5]=c=>y.value=c),onChange:N},null,544),[[e.vModelCheckbox,y.value]]),i[11]||(i[11]=e.createElementVNode("span",{class:"ml-2"}," Показати геометрію ",-1))])])])):e.createCommentVNode("",!0)]))}}),Wo={class:"flex justify-between items-center mb-[15px]"},qo={class:"font-semibold text-[16px]"},Go={class:"overflow-x-auto"},Ko={class:"min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600"},Zo={class:"text-left font-medium text-gray-700"},Jo={class:"py-2 min-w-[200px]"},Xo={key:0,class:"py-2 min-w-[200px]"},Qo={class:"divide-y divide-gray-200"},Yo={class:"bg-white odd:bg-gray-50"},vo={class:"py-2 pr-5"},en=["href"],tn={class:"py-2 pr-5 gap-2 inline-flex"},on=["onClick"],nn=["onClick"],ee=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},items:{}},setup(s){const l=e.getCurrentInstance(),o=e.ref([]),t=e.ref([]),n=s,p=e.ref([]),a=e.ref(""),h=e.ref("");async function y(){const i=await fetch("/api/data/"+n.token).then(c=>c.json());o.value=i.rows,t.value=i.columns,p.value=i.actions,a.value=i.form,h.value=i.addToken}const{$notify:d=console.log,$confirm:r,$form:g}=l?.appContext?.config?.globalProperties||{};async function m(i){await g({token:i.token}),y()}function x(){g({token:h.value})}function N(i){r({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const c=await fetch(`/api/table/${i.token}`,{method:"DELETE"});if(!c.ok){const{error:u,code:k}=await c.json();d({title:"Помилка",type:"warning",message:u});return}d({title:"Видаленно",message:"Успішно видалено"}),await y()}})}e.onMounted(async()=>{await y()});function w(i,c){return c.format?.toLowerCase()==="text"?i[c.name]:i[c.name+"_data"]??i[c.name+"_text"]??"-"}return(i,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Wo,[e.createElementVNode("div",qo,e.toDisplayString(i.title),1),p.value.includes("add")&&h.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:x,class:"px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-blue-100 text-blue-500 hover:bg-blue-500 focus:ring-blue-500"},"Додати")):e.createCommentVNode("",!0)]),e.createElementVNode("div",Go,[e.createElementVNode("table",Ko,[e.createElementVNode("thead",Zo,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,u=>(e.openBlock(),e.createElementBlock("th",Jo,e.toDisplayString(u.ua),1))),256)),p.value.includes("edit")?(e.openBlock(),e.createElementBlock("th",Xo," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",Qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createElementBlock("tr",Yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,k=>(e.openBlock(),e.createElementBlock("td",vo,[k.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:k.link.replace("{{id}}",u.id),class:"font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"},e.toDisplayString(w(u,k)),9,en)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(w(u,k)),1)],64))]))),256)),e.createElementVNode("td",tn,[u.token?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:k=>m(u),class:"inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"},[...c[0]||(c[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12px",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M20,16v4a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4H8",fill:"none",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),e.createElementVNode("polygon",{fill:"none",points:"12.5 15.8 22 6.2 17.8 2 8.3 11.5 8 16 12.5 15.8",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],8,on)):e.createCommentVNode("",!0),u.token?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:k=>N(u),class:"inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"},[...c[1]||(c[1]=[e.createStaticVNode('<svg class="flex-shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg>',1)])],8,nn)):e.createCommentVNode("",!0)])]))),256))])])])]))}}),te={"vs-widget-map":I,"vs-widget-comments":S,"vs-widget-history":z,"vs-widget-gallery":F,"vs-widget-file":v,"vs-widget-list":R,"vs-widget-table":ee},ln={key:0,class:"mb-4 pb-2 border-b border-gray-200"},sn={class:"text-lg font-semibold text-gray-900"},rn=["innerHTML"],an={key:0,class:"mb-4 pb-2 border-b border-gray-200"},cn={class:"text-lg font-semibold text-gray-900"},dn=["innerHTML"],U=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(s){const l=s,o=e.computed(()=>l.col?{[`lg:col-span-${l.col}`]:!0}:{});function t(p){return te[p]||p}const n=e.computed(()=>{const p={};return p.col&&(p.col=p.col),p});return(p,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full bg-gray-50 rounded-lg p-4 col-span-12",o.value])},[p.title?(e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("h3",sn,e.toDisplayString(p.title),1)])):e.createCommentVNode("",!0),p.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:p.html,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"},null,8,rn)):p.type?.includes("tabs")?(e.openBlock(),e.createBlock(M,{key:2,view:"tab",panels:p.items,data:p.data},null,8,["panels","data"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(p.items,h=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.title||h.label?(e.openBlock(),e.createElementBlock("div",an,[e.createElementVNode("h3",cn,e.toDisplayString(h.title||h.label),1)])):e.createCommentVNode("",!0),h.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:h.html,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"},null,8,dn)):h.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t(h.component)),e.mergeProps({key:2,ref_for:!0},{...n.value,...p.data},{class:"w-full"}),null,16)):e.renderSlot(p.$slots,"default",{key:3})],64))),256))],2))}}),mn={class:"md:flex gap-[20px]"},pn={key:0,class:"col-span-4"},fn=["innerHTML"],gn={key:1,class:"overflow-hidden w-full"},hn={class:"flex border-b border-gray-200 bg-gray-50"},yn=["onClick"],kn={class:"p-1"},bn=["innerHTML"],xn={key:2,class:"p-1 w-full"},un={class:"grid grid-cols-12 gap-4"},M=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!0},id:{},className:{},style:{}},setup(s){const l=s,o=e.ref(0),t=e.ref([]);function n(r){return te[r]||r}function p(r){return t.value=r.filter(g=>g.type==="pin"),r.filter(g=>g.type!=="pin")}const a=e.computed(()=>l.panels&&l.panels.length>0?l.normalizeTabs?p(l.panels):l.panels:l.data&&Array.isArray(l.data)?l.data.filter(g=>g.type==="tabs")[0]?.items||[]:[]),h=e.computed(()=>l.panels&&l.panels.length>0?l.normalizeTabs?p(l.panels):l.panels:l.data&&Array.isArray(l.data)?l.data:[]),y=e.computed(()=>({[`view-${l.view}`]:!0})),d=r=>{const g={};return r.count&&(g.count=r.count),r.col&&(g.col=r.col),r.html&&(g.html=r.html),r.title&&(g.title=r.title),r.type&&(g.type=r.type),r.token&&(g.token=r.token),l.data&&(g.data=l.data),g};return(r,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.classWrapper||y.value)},[e.createElementVNode("div",mn,[t.value.length!==0?(e.openBlock(),e.createElementBlock("div",pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value[0].items,(m,x)=>(e.openBlock(),e.createElementBlock("div",{key:m.name||x,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 w-full m-1 mb-3"},[m.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:m.html,class:"text-gray-900 leading-relaxed"},null,8,fn)):m.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(m.component)),e.mergeProps({key:1,ref_for:!0},m.component==="Card"?m:d(m),{id:r.data.id,class:"w-full h-full"}),null,16,["id"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),r.view==="tab"?(e.openBlock(),e.createElementBlock("div",gn,[e.createElementVNode("div",hn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(m,x)=>(e.openBlock(),e.createElementBlock("button",{key:m.name||x,onClick:N=>o.value=x,class:e.normalizeClass(["px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",{"text-blue-600 bg-white border-b-2 border-blue-600":o.value===x}])},e.toDisplayString(m.title||m.label||m.name||`Tab ${x+1}`),11,yn))),128))]),e.createElementVNode("div",kn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(m,x)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:m.name||x,class:e.normalizeClass([r.classPanel||"w-full border-gray-100 py-2",`col-span-${m.col||12}`])},[m.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:m.html,class:"text-gray-900 leading-relaxed"},null,8,bn)):r.$slots[`tab-${x}`]?e.renderSlot(r.$slots,`tab-${x}`,{key:1,item:m,data:r.data}):m.component||m.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(m.component||m.name)),e.mergeProps({key:2,ref_for:!0},m.component==="Card"?m:d(m),{id:r.data.id,class:"w-full h-full"}),null,16,["id"])):e.renderSlot(r.$slots,m.slot||`tab-${x}`,{key:3,item:m,data:r.data})],2)),[[e.vShow,o.value===x]])),128))])])):(e.openBlock(),e.createElementBlock("div",xn,[e.createElementVNode("div",un,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(m,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m.name||x},[r.$slots[`panel-${x}`]?e.renderSlot(r.$slots,`panel-${x}`,{key:0,item:m,data:r.data}):m.items||m.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(U),e.mergeProps({key:1,ref_for:!0},d(m),{items:m.items,class:"w-full h-full"}),null,16,["items"])):m.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(m.component)),e.mergeProps({key:2,ref_for:!0},d(m),{class:"w-full h-full"}),null,16)):e.renderSlot(r.$slots,m.slot||`panel-${x}`,{key:3,item:m,data:r.data})],64))),128))])]))])],2))}}),_n=["onClick"],oe=$(e.defineComponent({__name:"CopyNotification",setup(s,{expose:l}){const o=e.ref([]);let t=1;const n=()=>{if(o.value.length>=10){const h=o.value[0];clearTimeout(h.timer),o.value.shift()}const a={id:t++,timer:setTimeout(()=>{p(a.id)},1500)};o.value.push(a)},p=a=>{const h=o.value.findIndex(y=>y.id===a);if(h!==-1){const y=o.value[h];clearTimeout(y.timer),o.value.splice(h,1)}};return l({addNotification:n}),e.onUnmounted(()=>{o.value.forEach(a=>{clearTimeout(a.timer)})}),(a,h)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,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"},[e.createVNode(e.unref(ce),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),h[0]||(h[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:d=>p(y.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(H),{class:"h-4 w-4"})],8,_n)]))),128))]),_:1})]))}}),[["__scopeId","data-v-55903525"]]);M.install=function(s){s.component("vs-widget-file",P),s.component("vs-widget-comments",S),s.component("vs-widget-history",z),s.component("vs-widget-gallery",F),s.component("vs-widget-map",I),s.component("CommentsWidget",S),s.component("HistoryWidget",z),s.component("GalleryWidget",F),s.component("FilesWidget",P),s.component("MapWidget",I),s.component("Card",M),s.component("CardItem",U),s.component("DescriptionListWidget",R),s.component("CopyNotification",oe)},B.Card=M,B.CardItem=U,B.CommentsWidget=S,B.CopyNotification=oe,B.DescriptionListWidget=R,B.FilesWidget=P,B.GalleryWidget=F,B.HistoryWidget=z,B.MapWidget=I,B.TableWidget=ee,B.default=M,Object.defineProperties(B,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
131
+ */const U=_("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Be={class:"border-t pt-3 mt-4"},Ve={class:"flex gap-2"},Ne={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Ce={class:"flex-1 space-y-2"},$e={class:"flex justify-between items-center"},De={class:"flex gap-2"},Me=["disabled"],Y=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(r,{emit:l}){const o=e.useModel(r,"isReply"),t=e.ref(""),n=l,k=()=>{t.value.trim()&&(n("sendComment",t.value),t.value="")},s=y=>{(y.ctrlKey||y.metaKey)&&y.key==="Enter"&&(y.preventDefault(),k())};return(y,c)=>(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",Ve,[e.createElementVNode("span",Ne,[e.createVNode(e.unref(P),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Ce,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=d=>t.value=d),onKeydown:s,placeholder:"Add a comment...",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"},null,544),[[e.vModelText,t.value]]),e.createElementVNode("div",$e,[c[4]||(c[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",De,[o.value?(e.openBlock(),e.createElementBlock("button",{key:0,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",onClick:c[1]||(c[1]=d=>o.value=!1)},[e.createVNode(e.unref(U),{class:"h-3 w-3"}),c[2]||(c[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{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",disabled:!t.value.trim(),onClick:k},[e.createVNode(e.unref(Q),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=e.createTextVNode(" Send ",-1))],8,Me)])])])])]))}}),Le={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"},Te=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(r,{emit:l}){const o=l,t=e.useModel(r,"showMoreOptions"),n=e.ref(),k=e.ref(!0),s=async d=>{t.value&&n.value&&!n.value.contains(d.target)&&!k.value&&(t.value=!1),k.value=!1},y=()=>{t.value=!1,o("edit")},c=()=>{t.value=!1,o("delete")};return e.onMounted(()=>{document.addEventListener("click",s)}),e.onUnmounted(()=>{document.removeEventListener("click",s)}),(d,a)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:n},[e.createElementVNode("div",Le,[e.createElementVNode("div",{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",onClick:y},[e.createVNode(e.unref(_e),{class:"h-3 w-3 mr-2"}),a[0]||(a[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{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",onClick:c},[e.createVNode(e.unref(O),{class:"h-3 w-3 mr-2"}),a[1]||(a[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),Se={class:"space-y-2"},ze={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Fe={class:"flex-1 min-w-0 space-y-1 relative"},Ie={class:"flex items-center gap-2"},je={class:"font-medium text-xs"},Ae={class:"text-xs text-gray-500"},He={key:0,class:"text-xs text-gray-700 leading-relaxed"},Oe={class:"flex justify-between text-xs"},Pe={class:"flex items-center gap-2"},Ue={key:0,class:"flex gap-2"},Re=["disabled"],We={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},qe=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(r,{emit:l}){const o=l,t=r,n=e.ref(t.comment.text),k=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),s=e.ref("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"),y=e.ref(!1),c=e.ref(!1),d=e.ref(!1),a=e.ref(!1),h=b=>{const f=new Date,x=Math.floor((f.getTime()-b.getTime())/(1e3*60*60));return x<1?`${Math.floor((f.getTime()-b.getTime())/6e4)}m`:x<24?`${x}h`:`${Math.floor(x/24)}d`},m=()=>{a.value=!a.value,a.value?o("like",t.comment.id,"add"):o("like",t.comment.id,"delete")},u=()=>{o("edit",t.comment.id,n.value),d.value=!1},V=(b,f)=>{o("like",b,f)},N=(b,f)=>{o("edit",b,f)};return(b,f)=>{const x=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",d.value?"bg-gray-50":""])},[e.createElementVNode("span",ze,[e.createVNode(e.unref(P),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Fe,[e.createElementVNode("div",Ie,[e.createElementVNode("span",je,e.toDisplayString(b.comment?.author),1),e.createElementVNode("span",Ae,e.toDisplayString(h(b.comment?.createdAt)),1)]),d.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":f[0]||(f[0]=i=>n.value=i),class:e.normalizeClass(d.value?s.value:k.value)},null,2)),[[e.vModelText,n.value]]):(e.openBlock(),e.createElementBlock("p",He,e.toDisplayString(b.comment?.text),1)),e.createElementVNode("div",Oe,[e.createElementVNode("div",Pe,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",a.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:f[1]||(f[1]=i=>m())},[e.createVNode(e.unref(ye),{class:e.normalizeClass(["h-3 w-3",a.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(b.comment?.likes),1)],2),b.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:f[2]||(f[2]=i=>c.value=!0)},[e.createVNode(e.unref(xe),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:f[3]||(f[3]=i=>y.value=!0)},[e.createVNode(e.unref(fe),{class:"h-3 w-3"})])]),d.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("button",{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",onClick:f[4]||(f[4]=i=>d.value=!1)},[e.createVNode(e.unref(U),{class:"h-3 w-3"}),f[11]||(f[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{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",disabled:!n.value.trim(),onClick:f[5]||(f[5]=i=>u())},[e.createVNode(e.unref(Q),{class:"h-3 w-3 mr-1"}),f[12]||(f[12]=e.createTextVNode(" Send ",-1))],8,Re)])):e.createCommentVNode("",!0)])]),y.value?(e.openBlock(),e.createBlock(Te,{key:0,showMoreOptions:y.value,"onUpdate:showMoreOptions":f[6]||(f[6]=i=>y.value=i),onEdit:f[7]||(f[7]=i=>d.value=!0),onDelete:f[8]||(f[8]=i=>b.$emit("delete",b.comment?.id)),comment:b.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),b.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.comment?.replies,i=>(e.openBlock(),e.createBlock(x,{key:i.id,comment:i,isInside:!0,onDelete:g=>b.$emit("delete",i.id),onLike:V,onEdit:N},null,8,["comment","onDelete"]))),128)),c.value&&!b.isInside?(e.openBlock(),e.createBlock(Y,{key:0,onSendComment:f[9]||(f[9]=i=>b.$emit("reply",b.comment?.id,i)),isReply:c.value,"onUpdate:isReply":f[10]||(f[10]=i=>c.value=i)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),Ge=["id"],Ke={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},I=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(r,{emit:l}){const o=r,t=l,n=d=>{o?.onAddComment?.(d),t("add",d)},k=(d,a)=>{o?.onLike?.(d,a),t("like",d,a)},s=(d,a)=>{o.onReply?.(d,a),t("reply",d,a)},y=(d,a)=>{o.onEdit?.(d,a),t("edit",d,a)},c=d=>{o.onDelete?.(d),t("delete",d)};return(d,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",d.className]),id:d.id,style:e.normalizeStyle(d.style)},[d.title?(e.openBlock(),e.createElementBlock("h3",Ke,e.toDisplayString(d.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([d.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:d.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.comments,h=>(e.openBlock(),e.createBlock(qe,{key:h.id,comment:h,onReply:s,onLike:k,onDelete:a[0]||(a[0]=m=>c(m)),onEdit:y},null,8,["comment"]))),128))],6),e.createVNode(Y,{onSendComment:a[1]||(a[1]=h=>n(h))})],14,Ge))}}),v=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:D}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:ue}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:we}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:ke}]]),Ze={class:"mx-auto font-sans"},Je={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Xe={class:"relative"},Qe={class:"space-y-3"},Ye={class:"flex-1 min-w-0 pb-2"},ve={class:"flex items-center gap-1.5 mb-1 mt-0.5"},et={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},tt={class:"font-medium text-xs"},ot={class:"text-xs text-gray-500"},nt={class:"space-y-1"},lt={class:"text-xs text-gray-700"},st={class:"capitalize mr-1"},rt={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},at={key:0,class:"flex items-center gap-1 text-xs"},it={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},ct={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},j=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(r){const l=r,o=e.ref(Array.isArray(l.data)?l.data:[]);o.value.length===0&&l.id&&t();async function t(){const n=await fetch(`/api/widget/history/${l.id}`);if(!n.ok)return{data:[]};const k=await n.json();k.rows.forEach(s=>{s.timestamp=new Date(s.cdate),s.id=s.entity_id,s.entityType=s.entity_type,s.entityId=s.entity_id,s.action=s.change_type,s.userId=s.change_user_id,s.userName=s.username,s.timestamp=new Date(s.cdate),s.description=s.username,s.status=s.username}),o.value=k.rows}return(n,k)=>(e.openBlock(),e.createElementBlock("div",Ze,[n.title?(e.openBlock(),e.createElementBlock("h3",Je,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(n.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:n.maxHeight+"px"})},[e.createElementVNode("div",Xe,[k[0]||(k[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,s=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:s?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(v).get(s?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(v).get(s?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Ye,[e.createElementVNode("div",ve,[e.createElementVNode("span",et,[e.createVNode(e.unref(P),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",tt,e.toDisplayString(s?.userName),1),e.createElementVNode("span",ot,e.toDisplayString(s?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",nt,[e.createElementVNode("div",lt,[e.createElementVNode("span",st,e.toDisplayString(s?.action),1),s?.entityId?(e.openBlock(),e.createElementBlock("span",rt,e.toDisplayString(s?.entityId),1)):e.createCommentVNode("",!0)]),s?.changes?.[s?.entityId]?(e.openBlock(),e.createElementBlock("div",at,[s?.changes?.[s?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",it,e.toDisplayString(s?.changes?.[s?.entityId]?.old),1)):e.createCommentVNode("",!0),s?.changes?.[s?.entityId]?.old&&s?.changes?.[s?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(me),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),s?.changes?.[s?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(s?.changes?.[s?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),dt={key:0,class:"text-xl font-semibold"},mt={class:"flex gap-1"},pt={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"},ft=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(r){const l=e.useModel(r,"modelValue"),o={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",t.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[t.title?(e.openBlock(),e.createElementBlock("h3",dt,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",mt,[e.createElementVNode("button",{class:e.normalizeClass(["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",l.value==="list"?o.active:o.inactive]),onClick:n[0]||(n[0]=k=>l.value="list")},[e.createVNode(e.unref(be),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["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",l.value==="grid"?o.active:o.inactive]),onClick:n[1]||(n[1]=k=>l.value="grid")},[e.createVNode(e.unref(he),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:n[2]||(n[2]=k=>t.$emit("onAddFile",k))},null,32),e.createElementVNode("div",pt,[e.createVNode(e.unref(X),{class:"h-4 w-4"}),n[3]||(n[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),R={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:D,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:ge,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:Ee,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:D,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:de,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:J,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:J,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:D,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:D,label:"PPT"}};function ee(r,l="en"){const o={month:"short",day:"numeric"};return new Intl.DateTimeFormat(l,o).format(r)}function te(r){if(r===0)return"0 B";const l=1024,o=["B","KB","MB","GB","TB"],t=Math.floor(Math.log(r)/Math.log(l));return`${parseFloat((r/Math.pow(l,t)).toFixed(1))} ${o[t]}`}const gt={class:"space-y-0.5"},ht=["onClick"],yt=["onClick"],kt={class:"flex items-center gap-2"},bt={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},xt={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},ut={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},_t={class:"flex items-center gap-1"},wt=["onClick"],Et=["onClick"],oe=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(r){return(l,o)=>(e.openBlock(),e.createElementBlock("div",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,t=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:t.id,onClick:e.withModifiers(n=>l.$emit("openLightbox",t),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(R)[t?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R)[t?.ext]?.icon||e.unref(R).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:n=>l.$emit("openLightbox",t)},[e.createElementVNode("div",kt,[e.createElementVNode("span",bt,e.toDisplayString(t?.uploaded_name||t?.name),1)])],8,yt),e.createElementVNode("div",xt,e.toDisplayString(e.unref(te)(t.size)),1),e.createElementVNode("div",ut,e.toDisplayString(e.unref(ee)(t.createdAt)),1),e.createElementVNode("div",_t,[e.createElementVNode("button",{onClick:e.withModifiers(n=>l.$emit("download",t),["stop"]),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"},[e.createVNode(e.unref(Z),{class:"h-3 w-3"})],8,wt),e.createElementVNode("button",{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",onClick:e.withModifiers(n=>l.$emit("delete",n,t?.file_id),["stop"])},[e.createVNode(e.unref(O),{class:"h-3 w-3"})],8,Et)])],8,ht))),128))]))}}),Bt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},Vt=["onClick"],Nt={class:"space-y-2"},Ct={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},$t=["src"],Dt={class:"space-y-1"},Mt=["title"],Lt={class:"text-xs text-gray-500 text-left"},Tt={class:"absolute top-2 right-1 flex items-center gap-1"},St=["onClick"],zt=["onClick"],Ft=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(r){return(l,o)=>(e.openBlock(),e.createElementBlock("div",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,t=>(e.openBlock(),e.createElementBlock("div",{key:t.id,onClick:e.withModifiers(n=>l.$emit("openLightbox",t),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",Nt,[e.createElementVNode("div",Ct,[t.ext==="png"||t.ext==="jpg"||t.ext==="jpeg"||t.ext==="gif"||t.ext==="svg"||t.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${t?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,$t)):(e.openBlock(),e.createBlock(e.unref(D),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",Dt,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:t.uploaded_name||t.name},e.toDisplayString(t.uploaded_name||t.name),9,Mt),e.createElementVNode("p",Lt,e.toDisplayString(e.unref(ee)(t.createdAt))+", "+e.toDisplayString(e.unref(te)(t.size)),1)])]),e.createElementVNode("div",Tt,[e.createElementVNode("button",{onClick:e.withModifiers(n=>l.$emit("download",t),["stop"]),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"},[e.createVNode(e.unref(Z),{class:"h-3 w-3"})],8,St),e.createElementVNode("button",{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",onClick:e.withModifiers(n=>l.$emit("delete",n,t?.file_id),["stop"])},[e.createVNode(e.unref(O),{class:"h-3 w-3"})],8,zt)])],8,Vt))),128))]))}}),It={class:"mx-auto font-sans"},jt={key:1},W=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(r,{emit:l}){const o=r,t=e.ref(!1),n=e.ref(null),k=e.ref(!1),s=e.ref(0),y=e.ref(o.files??[]),c=l;y.value.length===0&&f();const d=(g,p)=>{n.value=p,t.value=!0},a=()=>{n.value&&(V(n.value),n.value=null,t.value=!1)},h=e.computed(()=>Array.isArray(y.value)?y.value.map(g=>g?.file_path):[]),m=g=>{const p=h.value.findIndex(B=>B===g.file_path);p!==-1&&(k.value=!0,s.value=p)},u=g=>{o.onAddFile?o.onAddFile(g):x(g),c("add",g)},V=g=>{o.onDelete?o.onDelete(g):i(g),c("delete",g)},N=g=>{const p=document.createElement("a");p.setAttribute("download",g?.uploaded_name||g?.name),p.href=g?.file_path||g?.path,p.click()},b=e.ref("list");async function f(){if(!o.id)return;const g=await fetch(`/api/widget/file/${o.id}`).then(p=>p.json());g.rows.forEach(p=>{p.timestamp=new Date(p.cdate),p.id=p.entity_id,p.entityType=p.entity_type,p.entityId=p.entity_id,p.entityType=p.entity_type,p.action=p.change_type,p.userId=p.change_user_id,p.userName=p.username,p.timestamp=new Date(p.cdate),p.description=p.username,p.status=p.username}),y.value=g.rows}const x=async g=>{if(!(!g.target||!g.target.files||g.target.files.length===0))try{await Promise.all(Array.from(g.target.files).map(async p=>{const B=new FormData;B.append("file",p);const $=`/api/widget/file/${o.id}`,w=await fetch($,{method:"POST",body:B});if(!w.ok)throw new Error(`HTTP error! status: ${w.status}`);return p})),await f()}catch(p){console.error("Помилка при завантаженні файлів:",p)}},i=async g=>{try{await fetch(`/api/widget/file/${o.id}/${g}`,{method:"DELETE"}),await f()}catch(p){console.error(p)}};return(g,p)=>{const B=e.resolveComponent("MessageBox"),$=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",It,[e.createVNode(ft,{modelValue:b.value,"onUpdate:modelValue":p[0]||(p[0]=w=>b.value=w),title:o.title,onOnAddFile:p[1]||(p[1]=w=>u(w))},null,8,["modelValue","title"]),y.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(g.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:g.maxHeight+"px"})},[b.value==="list"?(e.openBlock(),e.createBlock(oe,{key:0,onDelete:d,onDownload:N,onOpenLightbox:p[2]||(p[2]=w=>m(w)),files:y.value},null,8,["files"])):e.createCommentVNode("",!0),b.value==="grid"?(e.openBlock(),e.createBlock(Ft,{key:1,onDelete:d,onDownload:N,onOpenLightbox:p[3]||(p[3]=w=>m(w)),files:y.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",jt,p[6]||(p[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(B,{modelValue:t.value,"onUpdate:modelValue":p[4]||(p[4]=w=>t.value=w),onConfirm:a,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode($,{modelValue:k.value,"onUpdate:modelValue":p[5]||(p[5]=w=>k.value=w),images:h.value,"start-index":s.value},null,8,["modelValue","images","start-index"])],64)}}}),At={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},Ht=["onClick"],Ot={key:0,rel:"noreferrer",class:"relative block h-full w-full"},Pt=["src"],Ut={key:0,class:"thumb-cover"},Rt=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(r,{emit:l}){const o=l,t=e.ref(!1),n=e.ref(0),k=r,s=e.computed(()=>Array.isArray(k.items)?k.items.map(c=>c?.file_path):[]),y=c=>{const d=s.value.findIndex(a=>a===c.file_path);d!==-1&&(t.value=!0,n.value=d)};return(c,d)=>{const a=e.resolveComponent("Lightbox");return c.items?.length>=1?(e.openBlock(),e.createElementBlock("div",At,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,(h,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+m,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:m,onClick:e.withModifiers(u=>y(h),["stop"])},[m<5?(e.openBlock(),e.createElementBlock("div",Ot,[e.createElementVNode("img",{src:`/file/resize?filepath=${h?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",m===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,Pt),m===4&&c.items?.length>5?(e.openBlock(),e.createElementBlock("div",Ut," +"+e.toDisplayString(c.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Ht))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-c.items.length),h=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+h,class:e.normalizeClass(["h-full w-full image"+(c.items.length+h-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(a,{modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=h=>t.value=h),images:s.value,"start-index":n.value,delete:"true",download:"true",onDelete:d[1]||(d[1]=h=>o("delete",h))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),Wt={key:0,class:"text-xl font-semibold"},qt={class:"flex gap-1"},Gt={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"},Kt=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(r){return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",l.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[l.title?(e.openBlock(),e.createElementBlock("h3",Wt,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",qt,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:o[0]||(o[0]=t=>l.$emit("onAddImage",t))},null,32),e.createElementVNode("div",Gt,[e.createVNode(e.unref(X),{class:"h-4 w-4"}),o[1]||(o[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),Zt={class:"w-full mx-auto font-sans",ref:"containerRef"},Jt={key:1},A=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(r,{emit:l}){const o=r,t=e.ref(o.items??[]),n=l;t.value.length===0&&c();const k=a=>{o.onAddImage?o.onAddImage(a):y(a),n("add",a)},s=a=>{const h=t.value.find(m=>m.file_path===a)?.file_id;h&&(o.onDelete?o.onDelete(h):d(h))},y=async a=>{if(!(!a.target||!a.target.files||a.target.files.length===0))try{await Promise.all(Array.from(a.target.files).map(async h=>{const m=new FormData;m.append("file",h);const u=`/api/widget/file/${o.id}`,V=await fetch(u,{method:"POST",body:m});if(!V.ok)throw new Error(`HTTP error! status: ${V.status}`);return h})),await c()}catch(h){console.error("Помилка при завантаженні файлів:",h)}};async function c(){if(!o.id)return;const a=await fetch(`/api/widget/file/${o.id}`).then(h=>h.json());t.value=a.rows}const d=async a=>{try{await fetch(`/api/widget/file/${o.id}/${a}`,{method:"DELETE"}),await c()}catch(h){console.error(h)}};return(a,h)=>(e.openBlock(),e.createElementBlock("div",Zt,[e.createVNode(Kt,{title:a.title,onOnAddImage:h[0]||(h[0]=m=>k(m))},null,8,["title"]),t.value.length>0?(e.openBlock(),e.createBlock(Rt,{key:0,items:t.value,onDelete:h[1]||(h[1]=m=>s(m))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",Jt,h[2]||(h[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),Xt={class:"text-value"},Qt={class:"text-sm text-gray-900"},Yt=e.defineComponent({__name:"TextValue",props:{item:{}},setup(r){const l=r,o=e.computed(()=>{const t=l.item.value;return typeof t=="boolean"?t?"Так":"Ні":t==null?"—":String(t)});return(t,n)=>(e.openBlock(),e.createElementBlock("div",Xt,[e.createElementVNode("span",Qt,e.toDisplayString(o.value),1)]))}}),C=(r,l)=>{const o=r.__vccOpts||r;for(const[t,n]of l)o[t]=n;return o},vt=C(Yt,[["__scopeId","data-v-c14550b7"]]),eo={class:"link-value"},to=["href"],oo=C(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(r){const l=r,o=e.computed(()=>{const t=String(l.item.value);try{const n=new URL(t);return n.hostname+n.pathname}catch{return t}});return(t,n)=>(e.openBlock(),e.createElementBlock("div",eo,[e.createElementVNode("a",{href:String(t.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(o.value)+" ",1),n[0]||(n[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,to)]))}}),[["__scopeId","data-v-e6eb07a6"]]),no={class:"date-value"},lo={class:"text-sm text-gray-900"},so=C(e.defineComponent({__name:"DateValue",props:{item:{}},setup(r){const l=r,o=e.computed(()=>{const t=l.item.value;if(t instanceof Date)return t.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof t=="string"){const n=new Date(t);if(!isNaN(n.getTime()))return n.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(t)});return(t,n)=>(e.openBlock(),e.createElementBlock("div",no,[e.createElementVNode("span",lo,e.toDisplayString(o.value),1)]))}}),[["__scopeId","data-v-b9600618"]]),ro={class:"status-value"},ao={key:0,class:"mr-1"},io=C(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(r){const l=r,o=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),t=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(n,k)=>(e.openBlock(),e.createElementBlock("div",ro,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",o.value])},[t.value?(e.openBlock(),e.createElementBlock("span",ao,[e.createElementVNode("i",{class:e.normalizeClass(t.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(n.item.value)),1)],2)]))}}),[["__scopeId","data-v-c72e0b01"]]),co={class:"custom-value"},mo={class:"text-sm text-gray-900"},po=C(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(r){return(l,o)=>(e.openBlock(),e.createElementBlock("div",co,[e.renderSlot(l.$slots,"default",{item:l.item,value:l.item.value},()=>[e.createElementVNode("span",mo,e.toDisplayString(String(l.item.value)),1)],!0)]))}}),[["__scopeId","data-v-11a73810"]]),fo=["id"],go={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},ho={key:1,class:"overflow-x-auto"},yo={class:"min-w-full divide-y divide-gray-200"},ko={class:"bg-white divide-y divide-gray-200"},bo={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},xo={class:"flex items-center gap-2"},uo=["title"],_o={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},wo={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},Eo={class:"flex items-start gap-3"},Bo={key:0,class:"flex-shrink-0"},Vo={class:"flex-1 min-w-0"},No={class:"flex items-center gap-2 mb-2"},Co={class:"text-sm font-medium text-gray-900"},$o=["title"],Do={key:3,class:"overflow-x-auto"},Mo={class:"min-w-full divide-y divide-gray-200"},Lo={class:"bg-white divide-y divide-gray-200"},To={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},So={class:"flex items-center gap-2"},zo=["title"],Fo={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},q=C(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(r){const l=o=>{switch(o.type){case"link":return oo;case"date":return so;case"status":return io;case"custom":return po;default:return vt}};return(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",o.className]),id:o.id,style:e.normalizeStyle(o.style)},[o.title?(e.openBlock(),e.createElementBlock("h3",go,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),o.view==="table"?(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("table",yo,[e.createElementVNode("tbody",ko,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,n=>(e.openBlock(),e.createElementBlock("tr",{key:n.id||n.label},[e.createElementVNode("td",bo,[e.createElementVNode("div",xo,[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([n.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label)+" ",1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:n.tooltip},t[0]||(t[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,uo)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",_o,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])]))),128))])])])):o.view==="grid"?(e.openBlock(),e.createElementBlock("div",wo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id||n.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",Eo,[n.icon?(e.openBlock(),e.createElementBlock("div",Bo,[e.createElementVNode("i",{class:e.normalizeClass([n.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",Vo,[e.createElementVNode("div",No,[e.createElementVNode("h4",Co,e.toDisplayString(n.label),1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:n.tooltip},t[1]||(t[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,$o)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",Do,[e.createElementVNode("table",Mo,[e.createElementVNode("tbody",Lo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,n=>(e.openBlock(),e.createElementBlock("tr",{key:n.id||n.label},[e.createElementVNode("td",To,[e.createElementVNode("div",So,[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([n.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label)+" ",1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:n.tooltip},t[2]||(t[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,zo)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",Fo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])]))),128))])])]))],14,fo))}}),[["__scopeId","data-v-36d43e50"]]),Io={draw:{toolbar:{actions:{title:"Скасувати малювання",text:"Скасувати"},finish:{title:"Завершити малювання",text:"Завершити"},undo:{title:"Видалити останню точку",text:"Видалити останню"},buttons:{polyline:"Намалювати лінію",polygon:"Намалювати полігон",rectangle:"Намалювати прямокутник",circle:"Намалювати коло",marker:"Додати точку",circlemarker:"Додати маркер-коло"}},handlers:{circle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати коло",end:"Відпустіть кнопку миші, щоб завершити"},radius:"Радіус"},circlemarker:{tooltip:{start:"Клацніть на карту, щоб додати маркер-коло"}},marker:{tooltip:{start:"Клацніть на карту, щоб додати точку"}},polygon:{tooltip:{start:"Клацніть, щоб почати малювати полігон",cont:"Клацайте, щоб продовжити малювати полігон",end:"Клацніть першу точку, щоб завершити полігон"}},polyline:{error:"<strong>Помилка:</strong> лінія не може перетинатися сама з собою",tooltip:{start:"Клацніть, щоб почати малювати лінію",cont:"Клацайте, щоб продовжити малювати лінію",end:"Клацніть останню точку, щоб завершити лінію"}},rectangle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати прямокутник",end:"Відпустіть кнопку миші, щоб завершити"}},simpleshape:{tooltip:{end:"Відпустіть кнопку миші, щоб завершити"}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни",text:"Зберегти"},cancel:{title:"Скасувати редагування",text:"Скасувати"},clearAll:{title:"Очистити всі шари",text:"Очистити все"}},buttons:{edit:"Редагувати шари",editDisabled:"Немає шарів для редагування",remove:"Видалити шари",removeDisabled:"Немає шарів для видалення"}},handlers:{edit:{tooltip:{text:"Перетягніть маркери, щоб редагувати шари",subtext:"Натисніть 'Скасувати', щоб повернутися"}},remove:{tooltip:{text:"Клацніть на шари, щоб видалити їх"}}}}};function jo(r){return r?r.type==="FeatureCollection"||r.type==="Feature"?r:r.geom?{type:"Feature",geometry:{type:r.geom.type,coordinates:r.geom.coordinates},properties:{}}:r.type&&r.coordinates?{type:"Feature",geometry:r,properties:{}}:null:null}const Ao={class:"relative min-h-[300px] h-full pb-[3.25rem]"},Ho={key:1,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},Oo={class:"flex items-center justify-between p-2 border-b"},Po={class:"p-2 border-b"},Uo={class:"flex items-center"},Ro={class:"flex items-center"},Wo={class:"flex items-center"},qo={class:"p-2"},Go={class:"flex items-center"},Ko={class:"flex items-center"},Zo=["onUpdate:modelValue","onChange"],Jo={class:"ml-2"},H=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},tms:{}},setup(r){const l=r,o=e.ref(null);let t,n;const k={topo100:{url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},orto10:{url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},osmb:{url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}},s=e.ref("topo100");let y;const c=e.ref(!0),d=e.ref(!1),a=e.ref(h());function h(){return l.tms?(Array.isArray(l.tms)?l.tms:l.tms?.split(",")).map((i,g)=>({url:l.pattern?l.pattern.replace("{{id}}",i):i,name:"Шар "+g,visible:!0,i:g})):[]}function m(){return new Promise((x,i)=>{if(window.L&&window.L.Draw)return x(0);const g=B=>{if(Array.from(document.styleSheets).some(T=>T?.href?.includes(B)))return;const w=document.createElement("link");w.rel="stylesheet",w.href=B,document.head.appendChild(w)},p=B=>new Promise(($,w)=>{const T=Array.from(document.scripts).find(z=>z.src===B);if(T){T.addEventListener("load",()=>$()),T.addEventListener("error",z=>w(z));return}const S=document.createElement("script");S.src=B,S.async=!0,S.onload=()=>$(),S.onerror=z=>w(z),document.body.appendChild(S)});g("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),g("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),p("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(()=>p("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(()=>x(0)).catch(i)})}e.onMounted(async()=>{await m(),L.drawLocal=Io,t=L.map(o.value,{zoomControl:!1}).setView([50,30],10),L.control.zoom({position:"bottomright"}).addTo(t),y=L.tileLayer(k.topo100.url,{maxZoom:19}).addTo(t),s.value="topo100",n=new L.FeatureGroup().addTo(t),a.value.length&&f(0);const x=jo(l.geom);if(x){const i=[];L.geoJSON(x).eachLayer(g=>i.push(g)),i.length&&n.addLayer(i[0]),n.toGeoJSON(),u()}});function u(x=30){const i=n.getLayers();if(!i.length)return;const p=L.featureGroup(i).getBounds();p&&p.isValid()&&t.fitBounds(p,{padding:[x,x]})}function V(x){y&&y.removeFrom(t);const i=k[x];y=L.tileLayer(i.url,i.options||{}).addTo(t),s.value=x}function N(){V(s.value)}function b(){n&&(c.value?n.addTo(t):n.removeFrom(t))}function f(x){const i=a.value[x];i.layer||(i.layer=L.tileLayer(i.url,{maxZoom:19})),i.visible?i.layer.addTo(t):i.layer.removeFrom(t)}return(x,i)=>(e.openBlock(),e.createElementBlock("div",Ao,[e.createElementVNode("div",{ref_key:"mapContainer",ref:o,class:"w-full h-full min-h-[300px]"},null,512),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:i[0]||(i[0]=g=>d.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"}," Шари ")),d.value?(e.openBlock(),e.createElementBlock("div",Ho,[e.createElementVNode("div",Oo,[i[7]||(i[7]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:i[1]||(i[1]=g=>d.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"},i[6]||(i[6]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))]),e.createElementVNode("div",Po,[e.createElementVNode("div",null,[e.createElementVNode("label",Uo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"topo100","onUpdate:modelValue":i[2]||(i[2]=g=>s.value=g),onChange:N},null,544),[[e.vModelRadio,s.value]]),i[8]||(i[8]=e.createElementVNode("span",{class:"ml-2"},"Карта України",-1))])]),e.createElementVNode("div",null,[e.createElementVNode("label",Ro,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"orto10","onUpdate:modelValue":i[3]||(i[3]=g=>s.value=g),onChange:N},null,544),[[e.vModelRadio,s.value]]),i[9]||(i[9]=e.createElementVNode("span",{class:"ml-2"},"Ortophoto 1:10К",-1))])]),e.createElementVNode("div",null,[e.createElementVNode("label",Wo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"osmb","onUpdate:modelValue":i[4]||(i[4]=g=>s.value=g),onChange:N},null,544),[[e.vModelRadio,s.value]]),i[10]||(i[10]=e.createElementVNode("span",{class:"ml-2"},"Open Street Map",-1))])])]),e.createElementVNode("div",qo,[e.createElementVNode("label",Go,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[5]||(i[5]=g=>c.value=g),onChange:b},null,544),[[e.vModelCheckbox,c.value]]),i[11]||(i[11]=e.createElementVNode("span",{class:"ml-2"}," Геометрія/Межі ",-1))]),l.tms?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,g=>(e.openBlock(),e.createElementBlock("label",Ko,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":p=>g.visible=p,onChange:p=>f(g.i)},null,40,Zo),[[e.vModelCheckbox,g.visible]]),e.createElementVNode("span",Jo,e.toDisplayString(g.name),1)]))),256)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}}),Xo={class:"flex justify-between items-center mb-[15px]"},Qo={class:"font-semibold text-[16px]"},Yo={class:"overflow-x-auto"},vo={class:"min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600"},en={class:"text-left font-medium text-gray-700"},tn={class:"py-2 min-w-[200px]"},on={key:0,class:"py-2 min-w-[200px]"},nn={class:"divide-y divide-gray-200"},ln={class:"bg-white odd:bg-gray-50"},sn={class:"py-2 pr-5"},rn=["href"],an={class:"py-2 pr-5 gap-2 inline-flex"},cn=["onClick"],dn=["onClick"],ne=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(r){const l=e.getCurrentInstance(),o=e.ref([]),t=e.ref([]),n=r,k=e.ref([]),s=e.ref(""),y=e.ref("");async function c(){const b=await fetch("/api/data/"+n.token).then(f=>f.json());o.value=b.rows,t.value=b.columns,k.value=b.actions,s.value=b.form,y.value=b.addToken}const{$notify:d=console.log,$confirm:a,$form:h}=l?.appContext?.config?.globalProperties||{};async function m(b){await h({token:b.token}),c()}function u(){h({token:y.value})}function V(b){a({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const f=await fetch(`/api/table/${b.token}`,{method:"DELETE"});if(!f.ok){const{error:x,code:i}=await f.json();d({title:"Помилка",type:"warning",message:x});return}d({title:"Видаленно",message:"Успішно видалено"}),await c()}})}e.onMounted(async()=>{await c()});function N(b,f){return f.format?.toLowerCase()==="text"?b[f.name]:b[f.name+"_data"]??b[f.name+"_text"]??"-"}return(b,f)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Xo,[e.createElementVNode("div",Qo,e.toDisplayString(b.title),1),k.value.includes("add")&&y.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-blue-100 text-blue-500 hover:bg-blue-500 focus:ring-blue-500"},"Додати")):e.createCommentVNode("",!0)]),e.createElementVNode("div",Yo,[e.createElementVNode("table",vo,[e.createElementVNode("thead",en,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,x=>(e.openBlock(),e.createElementBlock("th",tn,e.toDisplayString(x.ua),1))),256)),k.value.includes("edit")?(e.openBlock(),e.createElementBlock("th",on," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,x=>(e.openBlock(),e.createElementBlock("tr",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,i=>(e.openBlock(),e.createElementBlock("td",sn,[i.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:i.link.replace("{{id}}",x.id),class:"font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"},e.toDisplayString(N(x,i)),9,rn)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(N(x,i)),1)],64))]))),256)),e.createElementVNode("td",an,[x.token?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:i=>m(x),class:"inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"},f[0]||(f[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12px",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M20,16v4a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4H8",fill:"none",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),e.createElementVNode("polygon",{fill:"none",points:"12.5 15.8 22 6.2 17.8 2 8.3 11.5 8 16 12.5 15.8",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)]),8,cn)):e.createCommentVNode("",!0),x.token?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:i=>V(x),class:"inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"},f[1]||(f[1]=[e.createStaticVNode('<svg class="flex-shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg>',1)]),8,dn)):e.createCommentVNode("",!0)])]))),256))])])])]))}}),le={"vs-widget-map":H,"vs-widget-comments":I,"vs-widget-history":j,"vs-widget-gallery":A,"vs-widget-file":oe,"vs-widget-list":q,"vs-widget-table":ne},mn={key:0,class:"mb-4 pb-2 border-b border-gray-200"},pn={class:"text-lg font-semibold text-gray-900"},fn=["innerHTML"],gn={key:0,class:"mb-4 pb-2 border-b border-gray-200"},hn={class:"text-lg font-semibold text-gray-900"},yn=["innerHTML"],G=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(r){const l=r,o=e.computed(()=>l.col?{[`lg:col-span-${l.col}`]:!0}:{});function t(s){return le[s]||s}const n=function(s={}){return s.props&&Object.entries(s.props).forEach(([y,c])=>{s[y]=l.data[c]}),s},k=e.computed(()=>{const s={};return s.col&&(s.col=s.col),s});return(s,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full bg-gray-50 rounded-lg p-4 col-span-12",o.value])},[s.title?(e.openBlock(),e.createElementBlock("div",mn,[e.createElementVNode("h3",pn,e.toDisplayString(s.title),1)])):e.createCommentVNode("",!0),s.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:s.html,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"},null,8,fn)):s.type?.includes("tabs")?(e.openBlock(),e.createBlock(M,{key:2,view:"tab",panels:s.items,data:s.data},null,8,["panels","data"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(s.items,c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.title||c.label?(e.openBlock(),e.createElementBlock("div",gn,[e.createElementVNode("h3",hn,e.toDisplayString(c.title||c.label),1)])):e.createCommentVNode("",!0),c.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:c.html,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"},null,8,yn)):c.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t(c.component)),e.mergeProps({key:2,ref_for:!0},{geom:s.data.geom,id:s.data.id,...k.value,...n(c),data:s.data},{class:"w-full"}),null,16)):e.renderSlot(s.$slots,"default",{key:3})],64))),256))],2))}}),kn={class:"md:flex gap-[20px]"},bn={key:0,class:"col-span-4"},xn=["innerHTML"],un={key:1,class:"overflow-hidden w-full"},_n={class:"flex border-b border-gray-200 bg-gray-50"},wn=["onClick"],En={class:"p-1"},Bn=["innerHTML"],Vn={key:2,class:"p-1 w-full"},Nn={class:"grid grid-cols-12 gap-4"},M=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!0},id:{},className:{},style:{}},setup(r){const l=r,o=e.ref(0),t=e.ref([]);function n(a){return le[a]||a}function k(a){return t.value=a.filter(h=>h.type==="pin"),a.filter(h=>h.type!=="pin")}const s=e.computed(()=>l.panels&&l.panels.length>0?l.normalizeTabs?k(l.panels):l.panels:l.data&&Array.isArray(l.data)?l.data.filter(h=>h.type==="tabs")[0]?.items||[]:[]),y=e.computed(()=>l.panels&&l.panels.length>0?l.normalizeTabs?k(l.panels):l.panels:l.data&&Array.isArray(l.data)?l.data:[]),c=e.computed(()=>({[`view-${l.view}`]:!0})),d=a=>{const h={...a};return l.data&&(h.data=l.data),h};return(a,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a.classWrapper||c.value)},[e.createElementVNode("div",kn,[t.value.length!==0?(e.openBlock(),e.createElementBlock("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value[0].items,(m,u)=>(e.openBlock(),e.createElementBlock("div",{key:m.name||u,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 w-full m-1 mb-3"},[m.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:m.html,class:"text-gray-900 leading-relaxed"},null,8,xn)):m.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(m.component)),e.mergeProps({key:1,ref_for:!0},m.component==="Card"?m:d(m),{id:a.data.id,class:"w-full h-full"}),null,16,["id"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),a.view==="tab"?(e.openBlock(),e.createElementBlock("div",un,[e.createElementVNode("div",_n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(m,u)=>(e.openBlock(),e.createElementBlock("button",{key:m.name||u,onClick:V=>o.value=u,class:e.normalizeClass(["px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",{"text-blue-600 bg-white border-b-2 border-blue-600":o.value===u}])},e.toDisplayString(m.title||m.label||m.name||`Tab ${u+1}`),11,wn))),128))]),e.createElementVNode("div",En,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(m,u)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:m.name||u,class:e.normalizeClass([a.classPanel||"w-full border-gray-100 py-2",`col-span-${m.col||12}`])},[m.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:m.html,class:"text-gray-900 leading-relaxed"},null,8,Bn)):a.$slots[`tab-${u}`]?e.renderSlot(a.$slots,`tab-${u}`,{key:1,item:m,data:a.data}):m.component||m.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(m.component||m.name)),e.mergeProps({key:2,ref_for:!0},m.component==="Card"?m:d(m),{id:a.data.id,class:"w-full h-full"}),null,16,["id"])):e.renderSlot(a.$slots,m.slot||`tab-${u}`,{key:3,item:m,data:a.data})],2)),[[e.vShow,o.value===u]])),128))])])):(e.openBlock(),e.createElementBlock("div",Vn,[e.createElementVNode("div",Nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(m,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m.name||u},[a.$slots[`panel-${u}`]?e.renderSlot(a.$slots,`panel-${u}`,{key:0,item:m,data:a.data}):m.items||m.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G),e.mergeProps({key:1,ref_for:!0},d(m),{items:m.items,class:"w-full h-full"}),null,16,["items"])):m.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(m.component)),e.mergeProps({key:2,ref_for:!0},d(m),{class:"w-full h-full"}),null,16)):e.renderSlot(a.$slots,m.slot||`panel-${u}`,{key:3,item:m,data:a.data})],64))),128))])]))])],2))}}),Cn=["onClick"],se=C(e.defineComponent({__name:"CopyNotification",setup(r,{expose:l}){const o=e.ref([]);let t=1;const n=()=>{if(o.value.length>=10){const y=o.value[0];clearTimeout(y.timer),o.value.shift()}const s={id:t++,timer:setTimeout(()=>{k(s.id)},1500)};o.value.push(s)},k=s=>{const y=o.value.findIndex(c=>c.id===s);if(y!==-1){const c=o.value[y];clearTimeout(c.timer),o.value.splice(y,1)}};return l({addNotification:n}),e.onUnmounted(()=>{o.value.forEach(s=>{clearTimeout(s.timer)})}),(s,y)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,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"},[e.createVNode(e.unref(pe),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),y[0]||(y[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:d=>k(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(U),{class:"h-4 w-4"})],8,Cn)]))),128))]),_:1})]))}}),[["__scopeId","data-v-55903525"]]);M.install=function(r){r.component("vs-widget-file",W),r.component("vs-widget-comments",I),r.component("vs-widget-history",j),r.component("vs-widget-gallery",A),r.component("vs-widget-map",H),r.component("CommentsWidget",I),r.component("HistoryWidget",j),r.component("GalleryWidget",A),r.component("FilesWidget",W),r.component("MapWidget",H),r.component("Card",M),r.component("CardItem",G),r.component("DescriptionListWidget",q),r.component("CopyNotification",se)},E.Card=M,E.CardItem=G,E.CommentsWidget=I,E.CopyNotification=se,E.DescriptionListWidget=q,E.FilesWidget=W,E.GalleryWidget=A,E.HistoryWidget=j,E.MapWidget=H,E.TableWidget=ne,E.default=M,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -15,6 +15,7 @@ export interface ICardItem {
15
15
  type?: string;
16
16
  token?: string;
17
17
  count?: number;
18
+ props?: object;
18
19
  items?: ICardItem[];
19
20
  }
20
21
  export interface ICard {
@@ -82,6 +83,7 @@ export interface HistoryWidgetProps extends BaseWidgetProps {
82
83
  }
83
84
  export interface MapWidgetProps extends BaseWidgetProps {
84
85
  geom?: object;
86
+ tms?: string;
85
87
  }
86
88
  export interface FileItem {
87
89
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5B;AAGD,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,SAAS,EAAE,CAAA;IACpB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,IAAI,CAAC,EAAE,KA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EAAE,CAAA;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,eAAe,CAAA;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAmLD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB/C,QAAA,MAAM,eAAe,sRAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,4 +1,9 @@
1
- import { MapWidgetProps } from "../../types";
1
+ interface MapWidgetProps {
2
+ pattern?: string;
3
+ geom?: object;
4
+ id?: string;
5
+ tms?: string;
6
+ }
2
7
  declare const _default: import("vue").DefineComponent<MapWidgetProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MapWidgetProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
8
  export default _default;
4
9
  //# sourceMappingURL=MapWidget.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapWidget.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/map/MapWidget.vue"],"names":[],"mappings":"AAkMA,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;;AAoU3C,wBAMG"}
1
+ {"version":3,"file":"MapWidget.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/map/MapWidget.vue"],"names":[],"mappings":"AA6OA,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;;AAiXD,wBAMG"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opengis/widgets",
3
3
  "private": false,
4
- "version": "0.0.15",
4
+ "version": "0.0.16",
5
5
  "type": "module",
6
6
  "description": "A collection of independent widgets for comments, history, files, and gallery",
7
7
  "types": "./dist/index.d.ts",